diff --git a/components/google_workspace/package.json b/components/google_workspace/package.json index 308217fed7dfc..8e0977e283d37 100644 --- a/components/google_workspace/package.json +++ b/components/google_workspace/package.json @@ -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": [ @@ -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" }, diff --git a/components/google_workspace/sources/common.ts b/components/google_workspace/sources/common/common.ts similarity index 90% rename from components/google_workspace/sources/common.ts rename to components/google_workspace/sources/common/common.ts index 33e9b059b0d20..ac3698b6003d5 100644 --- a/components/google_workspace/sources/common.ts +++ b/components/google_workspace/sources/common/common.ts @@ -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: { @@ -19,6 +19,12 @@ export default { intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, }, }, + eventName: { + propDefinition: [ + googleWorkspace, + "eventName", + ], + }, }, hooks: { async activate() { @@ -115,6 +121,12 @@ export default { getMetadata() { throw new Error("getMetadata not implemented!"); }, + isCorrectEventType(data) { + if (this.eventName) { + return data.name === this.eventName; + } + return true; + }, }, async run(event) { const { @@ -148,6 +160,9 @@ export default { ...otherProps, ...event, }; + if (!this.isCorrectEventType(data)) { + return; + } this.$emit(data, this.getMetadata(data)); }); }, diff --git a/components/google_workspace/sources/new-admin-activity-by-app-name/new-admin-activity-by-app-name.ts b/components/google_workspace/sources/new-admin-activity-by-app-name/new-admin-activity-by-app-name.ts index 2c2458bb0164b..19342b8bf8adb 100644 --- a/components/google_workspace/sources/new-admin-activity-by-app-name/new-admin-activity-by-app-name.ts +++ b/components/google_workspace/sources/new-admin-activity-by-app-name/new-admin-activity-by-app-name.ts @@ -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: { diff --git a/components/google_workspace/sources/new-admin-activity-by-user-and-app-name/new-admin-activity-by-user-and-app-name.ts b/components/google_workspace/sources/new-admin-activity-by-user-and-app-name/new-admin-activity-by-user-and-app-name.ts index eedddaa6af93a..32596685a1b3c 100644 --- a/components/google_workspace/sources/new-admin-activity-by-user-and-app-name/new-admin-activity-by-user-and-app-name.ts +++ b/components/google_workspace/sources/new-admin-activity-by-user-and-app-name/new-admin-activity-by-user-and-app-name.ts @@ -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: { diff --git a/components/google_workspace/sources/new-admin-activity-by-user/new-admin-activity-by-user.ts b/components/google_workspace/sources/new-admin-activity-by-user/new-admin-activity-by-user.ts index 113a12bf6ad1c..bbc9b19466cf5 100644 --- a/components/google_workspace/sources/new-admin-activity-by-user/new-admin-activity-by-user.ts +++ b/components/google_workspace/sources/new-admin-activity-by-user/new-admin-activity-by-user.ts @@ -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: { diff --git a/components/google_workspace/sources/new-admin-activity/new-admin-activity.ts b/components/google_workspace/sources/new-admin-activity/new-admin-activity.ts index 057b4b59d6449..b9ebb4f6e12d6 100644 --- a/components/google_workspace/sources/new-admin-activity/new-admin-activity.ts +++ b/components/google_workspace/sources/new-admin-activity/new-admin-activity.ts @@ -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: { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 502e2501ae683..57670f105e85b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2147,8 +2147,7 @@ importers: components/captaindata: {} - components/capturekit: - specifiers: {} + components/capturekit: {} components/carbone: {} @@ -4406,8 +4405,7 @@ importers: specifier: ^1.4.1 version: 1.6.6 - components/exact_mails: - specifiers: {} + components/exact_mails: {} components/exhibitday: dependencies: @@ -5791,8 +5789,8 @@ importers: specifier: ^6.0.2 version: 6.0.2 '@pipedream/platform': - specifier: ^1.2.0 - version: 1.6.6 + specifier: ^3.1.0 + version: 3.1.0 googleapis: specifier: ^108.0.0 version: 108.0.1 @@ -14485,8 +14483,7 @@ importers: components/veriff: {} - components/verifi_email: - specifiers: {} + components/verifi_email: {} components/verifiedemail: {} @@ -36003,7 +36000,7 @@ snapshots: '@pipedream/linear_app@0.7.1': dependencies: '@linear/sdk': 13.0.0 - '@pipedream/platform': 3.0.3 + '@pipedream/platform': 3.1.0 transitivePeerDependencies: - debug - encoding @@ -36165,7 +36162,7 @@ snapshots: '@pipedream/ramp@0.1.2': dependencies: - '@pipedream/platform': 3.0.3 + '@pipedream/platform': 3.1.0 uuid: 10.0.0 transitivePeerDependencies: - debug @@ -36209,7 +36206,7 @@ snapshots: '@pipedream/shopify@0.7.0': dependencies: - '@pipedream/platform': 3.0.3 + '@pipedream/platform': 3.1.0 async-retry: 1.3.3 bottleneck: 2.19.5 form-data: 4.0.2