@automate.ax/catalog 0.121.0 → 0.122.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/triggers/google.d.ts +586 -0
- package/dist/triggers/google.js +83 -0
- package/dist/triggers/index.d.ts +1309 -164
- package/package.json +2 -2
- package/src/triggers/google.ts +161 -0
package/dist/triggers/google.js
CHANGED
|
@@ -117,6 +117,41 @@ const GOOGLE_MEET_ACCOUNT = {
|
|
|
117
117
|
],
|
|
118
118
|
serviceId: "google",
|
|
119
119
|
};
|
|
120
|
+
const GOOGLE_DRIVE_FILE_EVENT_ACCOUNT = {
|
|
121
|
+
connectionOptions: [
|
|
122
|
+
{
|
|
123
|
+
requiredScopes: [
|
|
124
|
+
{
|
|
125
|
+
requirements: [
|
|
126
|
+
"https://www.googleapis.com/auth/drive",
|
|
127
|
+
"https://www.googleapis.com/auth/drive.readonly",
|
|
128
|
+
"https://www.googleapis.com/auth/drive.metadata",
|
|
129
|
+
],
|
|
130
|
+
type: "or",
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
serviceId: "google",
|
|
136
|
+
};
|
|
137
|
+
const GOOGLE_DRIVE_METADATA_EVENT_ACCOUNT = {
|
|
138
|
+
connectionOptions: [
|
|
139
|
+
{
|
|
140
|
+
requiredScopes: [
|
|
141
|
+
{
|
|
142
|
+
requirements: [
|
|
143
|
+
"https://www.googleapis.com/auth/drive",
|
|
144
|
+
"https://www.googleapis.com/auth/drive.readonly",
|
|
145
|
+
"https://www.googleapis.com/auth/drive.metadata",
|
|
146
|
+
"https://www.googleapis.com/auth/drive.metadata.readonly",
|
|
147
|
+
],
|
|
148
|
+
type: "or",
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
},
|
|
152
|
+
],
|
|
153
|
+
serviceId: "google",
|
|
154
|
+
};
|
|
120
155
|
const GOOGLE_SHEETS_ACCOUNT = {
|
|
121
156
|
connectionOptions: [
|
|
122
157
|
{
|
|
@@ -211,6 +246,38 @@ export const googleTriggerDefinitions = {
|
|
|
211
246
|
name: "Google Form response submitted",
|
|
212
247
|
type: "googleForms.response.submitted",
|
|
213
248
|
},
|
|
249
|
+
googleDriveEvent: {
|
|
250
|
+
account: GOOGLE_DRIVE_FILE_EVENT_ACCOUNT,
|
|
251
|
+
icon: "google-drive",
|
|
252
|
+
name: "Google Drive event",
|
|
253
|
+
type: "googleDrive.event",
|
|
254
|
+
},
|
|
255
|
+
googleDriveAccessProposalCreated: driveTrigger("Access proposal created", "googleDrive.accessProposal.created"),
|
|
256
|
+
googleDriveAccessProposalResolved: driveTrigger("Access proposal resolved", "googleDrive.accessProposal.resolved"),
|
|
257
|
+
googleDriveApprovalCancelled: driveTrigger("Approval cancelled", "googleDrive.approval.cancelled"),
|
|
258
|
+
googleDriveApprovalCompleted: driveTrigger("Approval completed", "googleDrive.approval.completed"),
|
|
259
|
+
googleDriveApprovalCreated: driveTrigger("Approval created", "googleDrive.approval.created"),
|
|
260
|
+
googleDriveApprovalReset: driveTrigger("Approval reset", "googleDrive.approval.reset"),
|
|
261
|
+
googleDriveApprovalResponded: driveTrigger("Approval reviewer responded", "googleDrive.approval.responded"),
|
|
262
|
+
googleDriveApprovalReviewersChanged: driveTrigger("Approval reviewers changed", "googleDrive.approval.reviewersChanged"),
|
|
263
|
+
googleDriveCommentCreated: driveTrigger("Comment created", "googleDrive.comment.created"),
|
|
264
|
+
googleDriveCommentDeleted: driveTrigger("Comment deleted", "googleDrive.comment.deleted"),
|
|
265
|
+
googleDriveCommentEdited: driveTrigger("Comment edited", "googleDrive.comment.edited"),
|
|
266
|
+
googleDriveCommentReopened: driveTrigger("Comment reopened", "googleDrive.comment.reopened"),
|
|
267
|
+
googleDriveCommentResolved: driveTrigger("Comment resolved", "googleDrive.comment.resolved"),
|
|
268
|
+
googleDriveFileContentChanged: driveTrigger("File content changed", "googleDrive.file.contentChanged"),
|
|
269
|
+
googleDriveFileCreated: driveTrigger("File created", "googleDrive.file.created"),
|
|
270
|
+
googleDriveFileDeleted: driveTrigger("File deleted", "googleDrive.file.deleted"),
|
|
271
|
+
googleDriveFileMoved: driveTrigger("File moved", "googleDrive.file.moved"),
|
|
272
|
+
googleDriveFileRenamed: driveTrigger("File renamed", "googleDrive.file.renamed"),
|
|
273
|
+
googleDriveFileTrashed: driveTrigger("File trashed", "googleDrive.file.trashed"),
|
|
274
|
+
googleDriveFileUntrashed: driveTrigger("File untrashed", "googleDrive.file.untrashed"),
|
|
275
|
+
googleDrivePermissionCreated: driveTrigger("Permission created", "googleDrive.permission.created"),
|
|
276
|
+
googleDrivePermissionDeleted: driveTrigger("Permission deleted", "googleDrive.permission.deleted"),
|
|
277
|
+
googleDrivePermissionEdited: driveTrigger("Permission edited", "googleDrive.permission.edited"),
|
|
278
|
+
googleDriveReplyCreated: driveTrigger("Reply created", "googleDrive.reply.created"),
|
|
279
|
+
googleDriveReplyDeleted: driveTrigger("Reply deleted", "googleDrive.reply.deleted"),
|
|
280
|
+
googleDriveReplyEdited: driveTrigger("Reply edited", "googleDrive.reply.edited"),
|
|
214
281
|
googleMeetConferenceEnded: {
|
|
215
282
|
account: GOOGLE_MEET_ACCOUNT,
|
|
216
283
|
icon: "google-meet",
|
|
@@ -296,3 +363,19 @@ export const googleTriggerDefinitions = {
|
|
|
296
363
|
type: "googleSheets.cells.changed",
|
|
297
364
|
},
|
|
298
365
|
};
|
|
366
|
+
/**
|
|
367
|
+
* Defines one Google Drive trigger with its exact stable event type.
|
|
368
|
+
*
|
|
369
|
+
* @param name - Customer-facing event name without the provider prefix.
|
|
370
|
+
* @param type - Stable internal event type.
|
|
371
|
+
*/
|
|
372
|
+
function driveTrigger(name, type) {
|
|
373
|
+
return {
|
|
374
|
+
account: type.startsWith("googleDrive.file.")
|
|
375
|
+
? GOOGLE_DRIVE_FILE_EVENT_ACCOUNT
|
|
376
|
+
: GOOGLE_DRIVE_METADATA_EVENT_ACCOUNT,
|
|
377
|
+
icon: "google-drive",
|
|
378
|
+
name: `Google Drive ${name.toLowerCase()}`,
|
|
379
|
+
type,
|
|
380
|
+
};
|
|
381
|
+
}
|