@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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/catalog",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.122.0",
|
|
4
4
|
"description": "Shared integration service and trigger definitions for Automate.ax.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"zshy": "^0.7.2"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
|
-
"typecheck": "tsc --noEmit",
|
|
67
|
+
"typecheck": "resource-broker run --pool automate-ax-validation --limit 2 --weight 1 -- tsc --noEmit",
|
|
68
68
|
"lint": "oxlint --type-aware --threads=2 && bun --bun eslint . --cache --cache-strategy content",
|
|
69
69
|
"lint:fix": "oxlint --type-aware --threads=2 --fix --fix-suggestions && bun --bun eslint . --fix --cache --cache-strategy content",
|
|
70
70
|
"check": "bun run typecheck && bun run lint",
|
package/src/triggers/google.ts
CHANGED
|
@@ -125,6 +125,43 @@ const GOOGLE_MEET_ACCOUNT = {
|
|
|
125
125
|
serviceId: "google",
|
|
126
126
|
} as const satisfies IntegrationAccountRequirement
|
|
127
127
|
|
|
128
|
+
const GOOGLE_DRIVE_FILE_EVENT_ACCOUNT = {
|
|
129
|
+
connectionOptions: [
|
|
130
|
+
{
|
|
131
|
+
requiredScopes: [
|
|
132
|
+
{
|
|
133
|
+
requirements: [
|
|
134
|
+
"https://www.googleapis.com/auth/drive",
|
|
135
|
+
"https://www.googleapis.com/auth/drive.readonly",
|
|
136
|
+
"https://www.googleapis.com/auth/drive.metadata",
|
|
137
|
+
],
|
|
138
|
+
type: "or",
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
serviceId: "google",
|
|
144
|
+
} as const satisfies IntegrationAccountRequirement
|
|
145
|
+
|
|
146
|
+
const GOOGLE_DRIVE_METADATA_EVENT_ACCOUNT = {
|
|
147
|
+
connectionOptions: [
|
|
148
|
+
{
|
|
149
|
+
requiredScopes: [
|
|
150
|
+
{
|
|
151
|
+
requirements: [
|
|
152
|
+
"https://www.googleapis.com/auth/drive",
|
|
153
|
+
"https://www.googleapis.com/auth/drive.readonly",
|
|
154
|
+
"https://www.googleapis.com/auth/drive.metadata",
|
|
155
|
+
"https://www.googleapis.com/auth/drive.metadata.readonly",
|
|
156
|
+
],
|
|
157
|
+
type: "or",
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
serviceId: "google",
|
|
163
|
+
} as const satisfies IntegrationAccountRequirement
|
|
164
|
+
|
|
128
165
|
const GOOGLE_SHEETS_ACCOUNT = {
|
|
129
166
|
connectionOptions: [
|
|
130
167
|
{
|
|
@@ -220,6 +257,113 @@ export const googleTriggerDefinitions = {
|
|
|
220
257
|
name: "Google Form response submitted",
|
|
221
258
|
type: "googleForms.response.submitted",
|
|
222
259
|
},
|
|
260
|
+
googleDriveEvent: {
|
|
261
|
+
account: GOOGLE_DRIVE_FILE_EVENT_ACCOUNT,
|
|
262
|
+
icon: "google-drive",
|
|
263
|
+
name: "Google Drive event",
|
|
264
|
+
type: "googleDrive.event",
|
|
265
|
+
},
|
|
266
|
+
googleDriveAccessProposalCreated: driveTrigger(
|
|
267
|
+
"Access proposal created",
|
|
268
|
+
"googleDrive.accessProposal.created",
|
|
269
|
+
),
|
|
270
|
+
googleDriveAccessProposalResolved: driveTrigger(
|
|
271
|
+
"Access proposal resolved",
|
|
272
|
+
"googleDrive.accessProposal.resolved",
|
|
273
|
+
),
|
|
274
|
+
googleDriveApprovalCancelled: driveTrigger(
|
|
275
|
+
"Approval cancelled",
|
|
276
|
+
"googleDrive.approval.cancelled",
|
|
277
|
+
),
|
|
278
|
+
googleDriveApprovalCompleted: driveTrigger(
|
|
279
|
+
"Approval completed",
|
|
280
|
+
"googleDrive.approval.completed",
|
|
281
|
+
),
|
|
282
|
+
googleDriveApprovalCreated: driveTrigger(
|
|
283
|
+
"Approval created",
|
|
284
|
+
"googleDrive.approval.created",
|
|
285
|
+
),
|
|
286
|
+
googleDriveApprovalReset: driveTrigger(
|
|
287
|
+
"Approval reset",
|
|
288
|
+
"googleDrive.approval.reset",
|
|
289
|
+
),
|
|
290
|
+
googleDriveApprovalResponded: driveTrigger(
|
|
291
|
+
"Approval reviewer responded",
|
|
292
|
+
"googleDrive.approval.responded",
|
|
293
|
+
),
|
|
294
|
+
googleDriveApprovalReviewersChanged: driveTrigger(
|
|
295
|
+
"Approval reviewers changed",
|
|
296
|
+
"googleDrive.approval.reviewersChanged",
|
|
297
|
+
),
|
|
298
|
+
googleDriveCommentCreated: driveTrigger(
|
|
299
|
+
"Comment created",
|
|
300
|
+
"googleDrive.comment.created",
|
|
301
|
+
),
|
|
302
|
+
googleDriveCommentDeleted: driveTrigger(
|
|
303
|
+
"Comment deleted",
|
|
304
|
+
"googleDrive.comment.deleted",
|
|
305
|
+
),
|
|
306
|
+
googleDriveCommentEdited: driveTrigger(
|
|
307
|
+
"Comment edited",
|
|
308
|
+
"googleDrive.comment.edited",
|
|
309
|
+
),
|
|
310
|
+
googleDriveCommentReopened: driveTrigger(
|
|
311
|
+
"Comment reopened",
|
|
312
|
+
"googleDrive.comment.reopened",
|
|
313
|
+
),
|
|
314
|
+
googleDriveCommentResolved: driveTrigger(
|
|
315
|
+
"Comment resolved",
|
|
316
|
+
"googleDrive.comment.resolved",
|
|
317
|
+
),
|
|
318
|
+
googleDriveFileContentChanged: driveTrigger(
|
|
319
|
+
"File content changed",
|
|
320
|
+
"googleDrive.file.contentChanged",
|
|
321
|
+
),
|
|
322
|
+
googleDriveFileCreated: driveTrigger(
|
|
323
|
+
"File created",
|
|
324
|
+
"googleDrive.file.created",
|
|
325
|
+
),
|
|
326
|
+
googleDriveFileDeleted: driveTrigger(
|
|
327
|
+
"File deleted",
|
|
328
|
+
"googleDrive.file.deleted",
|
|
329
|
+
),
|
|
330
|
+
googleDriveFileMoved: driveTrigger("File moved", "googleDrive.file.moved"),
|
|
331
|
+
googleDriveFileRenamed: driveTrigger(
|
|
332
|
+
"File renamed",
|
|
333
|
+
"googleDrive.file.renamed",
|
|
334
|
+
),
|
|
335
|
+
googleDriveFileTrashed: driveTrigger(
|
|
336
|
+
"File trashed",
|
|
337
|
+
"googleDrive.file.trashed",
|
|
338
|
+
),
|
|
339
|
+
googleDriveFileUntrashed: driveTrigger(
|
|
340
|
+
"File untrashed",
|
|
341
|
+
"googleDrive.file.untrashed",
|
|
342
|
+
),
|
|
343
|
+
googleDrivePermissionCreated: driveTrigger(
|
|
344
|
+
"Permission created",
|
|
345
|
+
"googleDrive.permission.created",
|
|
346
|
+
),
|
|
347
|
+
googleDrivePermissionDeleted: driveTrigger(
|
|
348
|
+
"Permission deleted",
|
|
349
|
+
"googleDrive.permission.deleted",
|
|
350
|
+
),
|
|
351
|
+
googleDrivePermissionEdited: driveTrigger(
|
|
352
|
+
"Permission edited",
|
|
353
|
+
"googleDrive.permission.edited",
|
|
354
|
+
),
|
|
355
|
+
googleDriveReplyCreated: driveTrigger(
|
|
356
|
+
"Reply created",
|
|
357
|
+
"googleDrive.reply.created",
|
|
358
|
+
),
|
|
359
|
+
googleDriveReplyDeleted: driveTrigger(
|
|
360
|
+
"Reply deleted",
|
|
361
|
+
"googleDrive.reply.deleted",
|
|
362
|
+
),
|
|
363
|
+
googleDriveReplyEdited: driveTrigger(
|
|
364
|
+
"Reply edited",
|
|
365
|
+
"googleDrive.reply.edited",
|
|
366
|
+
),
|
|
223
367
|
googleMeetConferenceEnded: {
|
|
224
368
|
account: GOOGLE_MEET_ACCOUNT,
|
|
225
369
|
icon: "google-meet",
|
|
@@ -305,3 +449,20 @@ export const googleTriggerDefinitions = {
|
|
|
305
449
|
type: "googleSheets.cells.changed",
|
|
306
450
|
},
|
|
307
451
|
} as const satisfies Record<string, TriggerDefinition>
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Defines one Google Drive trigger with its exact stable event type.
|
|
455
|
+
*
|
|
456
|
+
* @param name - Customer-facing event name without the provider prefix.
|
|
457
|
+
* @param type - Stable internal event type.
|
|
458
|
+
*/
|
|
459
|
+
function driveTrigger<const TType extends string>(name: string, type: TType) {
|
|
460
|
+
return {
|
|
461
|
+
account: type.startsWith("googleDrive.file.")
|
|
462
|
+
? GOOGLE_DRIVE_FILE_EVENT_ACCOUNT
|
|
463
|
+
: GOOGLE_DRIVE_METADATA_EVENT_ACCOUNT,
|
|
464
|
+
icon: "google-drive",
|
|
465
|
+
name: `Google Drive ${name.toLowerCase()}`,
|
|
466
|
+
type,
|
|
467
|
+
}
|
|
468
|
+
}
|