Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions components/google_workspace/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/google_workspace",
"version": "0.0.7",
"version": "0.0.8",
"description": "Pipedream Google Workspace Admin Components",
"main": "dist/app/google_workspace.app.mjs",
"keywords": [
Expand All @@ -17,7 +17,7 @@
},
"dependencies": {
"@googleapis/admin": "^6.0.2",
"@pipedream/platform": "^1.2.0",
"@pipedream/platform": "^3.1.0",
"googleapis": "^108.0.0",
"uuidv4": "^6.2.13"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {
ConfigurationError,
DEFAULT_POLLING_SOURCE_TIMER_INTERVAL,
} from "@pipedream/platform";
import googleWorkspace from "../app/google_workspace.app";
import constants from "../common/constants";
import googleWorkspace from "../../app/google_workspace.app";
import constants from "../../common/constants";

export default {
props: {
Expand All @@ -19,6 +19,12 @@ export default {
intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL,
},
},
eventName: {
propDefinition: [
googleWorkspace,
"eventName",
],
},
},
hooks: {
async activate() {
Expand Down Expand Up @@ -115,6 +121,12 @@ export default {
getMetadata() {
throw new Error("getMetadata not implemented!");
},
isCorrectEventType(data) {
if (this.eventName) {
return data.events.find((event) => event.name === this.eventName);
}
return true;
},
},
async run(event) {
const {
Expand Down Expand Up @@ -144,6 +156,10 @@ export default {
} = body;

events.forEach((event) => {
if (!this.isCorrectEventType(event)) {
return;
}

const data = {
...otherProps,
...event,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { defineSource } from "@pipedream/types";
import common from "../common";
import common from "../common/common";

export default defineSource({
...common,
key: "google_workspace-new-admin-activity-by-app-name",
name: "New Admin Activity By Application Name",
description: "Emit new admin activities by selected user",
version: "0.0.4",
version: "0.0.5",
type: "source",
dedupe: "unique",
props: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { defineSource } from "@pipedream/types";
import common from "../common";
import common from "../common/common";

export default defineSource({
...common,
key: "google_workspace-new-admin-activity-by-user-and-app-name",
name: "New Admin Activity By User And Application Name",
description: "Emit new admin activities by selected user and application name",
version: "0.0.4",
version: "0.0.5",
type: "source",
dedupe: "unique",
props: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { defineSource } from "@pipedream/types";
import common from "../common";
import common from "../common/common";

export default defineSource({
...common,
key: "google_workspace-new-admin-activity-by-user",
name: "New Admin Activity By User",
description: "Emit new admin activities by selected user",
version: "0.0.4",
version: "0.0.5",
type: "source",
dedupe: "unique",
props: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { defineSource } from "@pipedream/types";
import common from "../common";
import common from "../common/common";

export default defineSource({
...common,
key: "google_workspace-new-admin-activity",
name: "New Admin Activity",
description: "Emit new admin activities",
version: "0.0.4",
version: "0.0.5",
type: "source",
dedupe: "unique",
methods: {
Expand Down
19 changes: 8 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading