File tree Expand file tree Collapse file tree 6 files changed +28
-12
lines changed
components/google_workspace
new-admin-activity-by-app-name
new-admin-activity-by-user-and-app-name
new-admin-activity-by-user Expand file tree Collapse file tree 6 files changed +28
-12
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @pipedream/google_workspace" ,
3- "version" : " 0.0.7 " ,
3+ "version" : " 0.0.8 " ,
44 "description" : " Pipedream Google Workspace Admin Components" ,
55 "main" : " dist/app/google_workspace.app.mjs" ,
66 "keywords" : [
1717 },
1818 "dependencies" : {
1919 "@googleapis/admin" : " ^6.0.2" ,
20- "@pipedream/platform" : " ^1.2 .0" ,
20+ "@pipedream/platform" : " ^3.1 .0" ,
2121 "googleapis" : " ^108.0.0" ,
2222 "uuidv4" : " ^6.2.13"
2323 },
Original file line number Diff line number Diff line change 44 ConfigurationError ,
55 DEFAULT_POLLING_SOURCE_TIMER_INTERVAL ,
66} from "@pipedream/platform" ;
7- import googleWorkspace from "../app/google_workspace.app" ;
8- import constants from "../common/constants" ;
7+ import googleWorkspace from "../../ app/google_workspace.app" ;
8+ import constants from "../../ common/constants" ;
99
1010export default {
1111 props : {
@@ -19,6 +19,12 @@ export default {
1919 intervalSeconds : DEFAULT_POLLING_SOURCE_TIMER_INTERVAL ,
2020 } ,
2121 } ,
22+ eventName : {
23+ propDefinition : [
24+ googleWorkspace ,
25+ "eventName" ,
26+ ] ,
27+ } ,
2228 } ,
2329 hooks : {
2430 async activate ( ) {
@@ -115,6 +121,12 @@ export default {
115121 getMetadata ( ) {
116122 throw new Error ( "getMetadata not implemented!" ) ;
117123 } ,
124+ isCorrectEventType ( data ) {
125+ if ( this . eventName ) {
126+ return data . events . find ( ( event ) => event . name === this . eventName ) ;
127+ }
128+ return true ;
129+ } ,
118130 } ,
119131 async run ( event ) {
120132 const {
@@ -144,6 +156,10 @@ export default {
144156 } = body ;
145157
146158 events . forEach ( ( event ) => {
159+ if ( ! this . isCorrectEventType ( event ) ) {
160+ return ;
161+ }
162+
147163 const data = {
148164 ...otherProps ,
149165 ...event ,
Original file line number Diff line number Diff line change 11import { defineSource } from "@pipedream/types" ;
2- import common from "../common" ;
2+ import common from "../common/common " ;
33
44export default defineSource ( {
55 ...common ,
66 key : "google_workspace-new-admin-activity-by-app-name" ,
77 name : "New Admin Activity By Application Name" ,
88 description : "Emit new admin activities by selected user" ,
9- version : "0.0.4 " ,
9+ version : "0.0.5 " ,
1010 type : "source" ,
1111 dedupe : "unique" ,
1212 props : {
Original file line number Diff line number Diff line change 11import { defineSource } from "@pipedream/types" ;
2- import common from "../common" ;
2+ import common from "../common/common " ;
33
44export default defineSource ( {
55 ...common ,
66 key : "google_workspace-new-admin-activity-by-user-and-app-name" ,
77 name : "New Admin Activity By User And Application Name" ,
88 description : "Emit new admin activities by selected user and application name" ,
9- version : "0.0.4 " ,
9+ version : "0.0.5 " ,
1010 type : "source" ,
1111 dedupe : "unique" ,
1212 props : {
Original file line number Diff line number Diff line change 11import { defineSource } from "@pipedream/types" ;
2- import common from "../common" ;
2+ import common from "../common/common " ;
33
44export default defineSource ( {
55 ...common ,
66 key : "google_workspace-new-admin-activity-by-user" ,
77 name : "New Admin Activity By User" ,
88 description : "Emit new admin activities by selected user" ,
9- version : "0.0.4 " ,
9+ version : "0.0.5 " ,
1010 type : "source" ,
1111 dedupe : "unique" ,
1212 props : {
Original file line number Diff line number Diff line change 11import { defineSource } from "@pipedream/types" ;
2- import common from "../common" ;
2+ import common from "../common/common " ;
33
44export default defineSource ( {
55 ...common ,
66 key : "google_workspace-new-admin-activity" ,
77 name : "New Admin Activity" ,
88 description : "Emit new admin activities" ,
9- version : "0.0.4 " ,
9+ version : "0.0.5 " ,
1010 type : "source" ,
1111 dedupe : "unique" ,
1212 methods : {
You can’t perform that action at this time.
0 commit comments