@automate.ax/catalog 0.75.0 → 0.77.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/authoring.d.ts +1 -0
- package/dist/authoring.js +1 -0
- package/dist/catalog.d.ts +142 -74
- package/dist/catalog.js +74 -13
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/triggers/airtable.js +1 -2
- package/dist/triggers/asana.js +1 -2
- package/dist/triggers/brevo.js +1 -2
- package/dist/triggers/core-dashboard.d.ts +374 -0
- package/dist/triggers/core-dashboard.js +202 -0
- package/dist/triggers/core-http.d.ts +30 -0
- package/dist/triggers/core-http.js +43 -0
- package/dist/triggers/core-invocation.d.ts +9 -0
- package/dist/triggers/core-invocation.js +15 -0
- package/dist/triggers/core-mailhook.d.ts +35 -0
- package/dist/triggers/core-mailhook.js +63 -0
- package/dist/triggers/core-schedule.d.ts +9 -0
- package/dist/triggers/core-schedule.js +17 -0
- package/dist/triggers/core.d.ts +15 -426
- package/dist/triggers/core.js +16 -346
- package/dist/triggers/github.js +4 -5
- package/dist/triggers/google.d.ts +143 -0
- package/dist/triggers/google.js +92 -5
- package/dist/triggers/index.d.ts +347 -74
- package/dist/triggers/index.js +2 -1
- package/dist/triggers/linear.js +1 -2
- package/dist/triggers/microsoft.js +3 -4
- package/dist/triggers/name.d.ts +13 -0
- package/dist/triggers/name.js +31 -0
- package/dist/triggers/resend.js +1 -2
- package/dist/triggers/slack.js +3 -4
- package/dist/triggers/trello.js +1 -2
- package/dist/triggers/vercel.d.ts +27 -27
- package/dist/triggers/vercel.js +10 -11
- package/dist/triggers/whatsapp.js +1 -2
- package/dist/types.d.ts +1 -1
- package/dist/types.js +3 -3
- package/package.json +118 -5
- package/src/authoring.ts +8 -0
- package/src/catalog.ts +76 -13
- package/src/index.ts +2 -0
- package/src/triggers/airtable.ts +1 -2
- package/src/triggers/asana.ts +1 -2
- package/src/triggers/brevo.ts +1 -2
- package/src/triggers/core-dashboard.ts +361 -0
- package/src/triggers/core-http.ts +69 -0
- package/src/triggers/core-invocation.ts +18 -0
- package/src/triggers/core-mailhook.ts +83 -0
- package/src/triggers/core-schedule.ts +21 -0
- package/src/triggers/core.ts +38 -544
- package/src/triggers/github.ts +4 -5
- package/src/triggers/google.ts +93 -5
- package/src/triggers/index.ts +2 -1
- package/src/triggers/linear.ts +1 -2
- package/src/triggers/microsoft.ts +3 -4
- package/src/triggers/name.ts +37 -0
- package/src/triggers/resend.ts +1 -2
- package/src/triggers/slack.ts +3 -4
- package/src/triggers/trello.ts +1 -2
- package/src/triggers/vercel.ts +10 -11
- package/src/triggers/whatsapp.ts +1 -2
- package/src/types.ts +4 -4
package/src/triggers/github.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { githubService } from "../catalog"
|
|
2
1
|
import type { IntegrationAccountRequirement, TriggerDefinition } from "../types"
|
|
3
2
|
|
|
4
3
|
const GITHUB_ISSUES_ACCOUNT = {
|
|
@@ -7,7 +6,7 @@ const GITHUB_ISSUES_ACCOUNT = {
|
|
|
7
6
|
requiredScopes: ["issues:read"],
|
|
8
7
|
},
|
|
9
8
|
],
|
|
10
|
-
serviceId:
|
|
9
|
+
serviceId: "github",
|
|
11
10
|
} as const satisfies IntegrationAccountRequirement
|
|
12
11
|
|
|
13
12
|
const GITHUB_PULL_REQUESTS_ACCOUNT = {
|
|
@@ -16,7 +15,7 @@ const GITHUB_PULL_REQUESTS_ACCOUNT = {
|
|
|
16
15
|
requiredScopes: ["pull_requests:read"],
|
|
17
16
|
},
|
|
18
17
|
],
|
|
19
|
-
serviceId:
|
|
18
|
+
serviceId: "github",
|
|
20
19
|
} as const satisfies IntegrationAccountRequirement
|
|
21
20
|
|
|
22
21
|
const GITHUB_CONTENTS_ACCOUNT = {
|
|
@@ -25,7 +24,7 @@ const GITHUB_CONTENTS_ACCOUNT = {
|
|
|
25
24
|
requiredScopes: ["contents:read"],
|
|
26
25
|
},
|
|
27
26
|
],
|
|
28
|
-
serviceId:
|
|
27
|
+
serviceId: "github",
|
|
29
28
|
} as const satisfies IntegrationAccountRequirement
|
|
30
29
|
|
|
31
30
|
const GITHUB_ACTIONS_ACCOUNT = {
|
|
@@ -34,7 +33,7 @@ const GITHUB_ACTIONS_ACCOUNT = {
|
|
|
34
33
|
requiredScopes: ["actions:read"],
|
|
35
34
|
},
|
|
36
35
|
],
|
|
37
|
-
serviceId:
|
|
36
|
+
serviceId: "github",
|
|
38
37
|
} as const satisfies IntegrationAccountRequirement
|
|
39
38
|
|
|
40
39
|
export const githubTriggerDefinitions = {
|
package/src/triggers/google.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { googleService } from "../catalog"
|
|
2
1
|
import type { IntegrationAccountRequirement, TriggerDefinition } from "../types"
|
|
3
2
|
|
|
4
3
|
const GMAIL_ACCOUNT = {
|
|
@@ -16,7 +15,7 @@ const GMAIL_ACCOUNT = {
|
|
|
16
15
|
],
|
|
17
16
|
},
|
|
18
17
|
],
|
|
19
|
-
serviceId:
|
|
18
|
+
serviceId: "google",
|
|
20
19
|
} as const satisfies IntegrationAccountRequirement
|
|
21
20
|
|
|
22
21
|
const GOOGLE_CALENDAR_ACCOUNT = {
|
|
@@ -36,7 +35,7 @@ const GOOGLE_CALENDAR_ACCOUNT = {
|
|
|
36
35
|
],
|
|
37
36
|
},
|
|
38
37
|
],
|
|
39
|
-
serviceId:
|
|
38
|
+
serviceId: "google",
|
|
40
39
|
} as const satisfies IntegrationAccountRequirement
|
|
41
40
|
|
|
42
41
|
const GOOGLE_FORMS_ACCOUNT = {
|
|
@@ -56,7 +55,7 @@ const GOOGLE_FORMS_ACCOUNT = {
|
|
|
56
55
|
],
|
|
57
56
|
},
|
|
58
57
|
],
|
|
59
|
-
serviceId:
|
|
58
|
+
serviceId: "google",
|
|
60
59
|
} as const satisfies IntegrationAccountRequirement
|
|
61
60
|
|
|
62
61
|
const GOOGLE_FORM_RESPONSES_ACCOUNT = {
|
|
@@ -99,7 +98,18 @@ const GOOGLE_FORM_RESPONSES_ACCOUNT = {
|
|
|
99
98
|
],
|
|
100
99
|
},
|
|
101
100
|
],
|
|
102
|
-
serviceId:
|
|
101
|
+
serviceId: "google",
|
|
102
|
+
} as const satisfies IntegrationAccountRequirement
|
|
103
|
+
|
|
104
|
+
const GOOGLE_MEET_ACCOUNT = {
|
|
105
|
+
connectionOptions: [
|
|
106
|
+
{
|
|
107
|
+
requiredScopes: [
|
|
108
|
+
"https://www.googleapis.com/auth/meetings.space.readonly",
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
serviceId: "google",
|
|
103
113
|
} as const satisfies IntegrationAccountRequirement
|
|
104
114
|
|
|
105
115
|
export const googleTriggerDefinitions = {
|
|
@@ -155,4 +165,82 @@ export const googleTriggerDefinitions = {
|
|
|
155
165
|
name: "Google Form response submitted",
|
|
156
166
|
type: "googleForms.response.submitted",
|
|
157
167
|
},
|
|
168
|
+
googleMeetConferenceEnded: {
|
|
169
|
+
account: GOOGLE_MEET_ACCOUNT,
|
|
170
|
+
icon: "google-meet",
|
|
171
|
+
name: "Google Meet conference ended",
|
|
172
|
+
type: "googleMeet.conference.ended",
|
|
173
|
+
},
|
|
174
|
+
googleMeetConferenceStarted: {
|
|
175
|
+
account: GOOGLE_MEET_ACCOUNT,
|
|
176
|
+
icon: "google-meet",
|
|
177
|
+
name: "Google Meet conference started",
|
|
178
|
+
type: "googleMeet.conference.started",
|
|
179
|
+
},
|
|
180
|
+
googleMeetParticipantJoined: {
|
|
181
|
+
account: GOOGLE_MEET_ACCOUNT,
|
|
182
|
+
icon: "google-meet",
|
|
183
|
+
name: "Google Meet participant joined",
|
|
184
|
+
type: "googleMeet.participant.joined",
|
|
185
|
+
},
|
|
186
|
+
googleMeetParticipantLeft: {
|
|
187
|
+
account: GOOGLE_MEET_ACCOUNT,
|
|
188
|
+
icon: "google-meet",
|
|
189
|
+
name: "Google Meet participant left",
|
|
190
|
+
type: "googleMeet.participant.left",
|
|
191
|
+
},
|
|
192
|
+
googleMeetRecordingEnded: {
|
|
193
|
+
account: GOOGLE_MEET_ACCOUNT,
|
|
194
|
+
icon: "google-meet",
|
|
195
|
+
name: "Google Meet recording ended",
|
|
196
|
+
type: "googleMeet.recording.ended",
|
|
197
|
+
},
|
|
198
|
+
googleMeetRecordingFileGenerated: {
|
|
199
|
+
account: GOOGLE_MEET_ACCOUNT,
|
|
200
|
+
icon: "google-meet",
|
|
201
|
+
name: "Google Meet recording generated",
|
|
202
|
+
type: "googleMeet.recording.fileGenerated",
|
|
203
|
+
},
|
|
204
|
+
googleMeetRecordingStarted: {
|
|
205
|
+
account: GOOGLE_MEET_ACCOUNT,
|
|
206
|
+
icon: "google-meet",
|
|
207
|
+
name: "Google Meet recording started",
|
|
208
|
+
type: "googleMeet.recording.started",
|
|
209
|
+
},
|
|
210
|
+
googleMeetSmartNoteEnded: {
|
|
211
|
+
account: GOOGLE_MEET_ACCOUNT,
|
|
212
|
+
icon: "google-meet",
|
|
213
|
+
name: "Google Meet smart note ended",
|
|
214
|
+
type: "googleMeet.smartNote.ended",
|
|
215
|
+
},
|
|
216
|
+
googleMeetSmartNoteFileGenerated: {
|
|
217
|
+
account: GOOGLE_MEET_ACCOUNT,
|
|
218
|
+
icon: "google-meet",
|
|
219
|
+
name: "Google Meet smart note generated",
|
|
220
|
+
type: "googleMeet.smartNote.fileGenerated",
|
|
221
|
+
},
|
|
222
|
+
googleMeetSmartNoteStarted: {
|
|
223
|
+
account: GOOGLE_MEET_ACCOUNT,
|
|
224
|
+
icon: "google-meet",
|
|
225
|
+
name: "Google Meet smart note started",
|
|
226
|
+
type: "googleMeet.smartNote.started",
|
|
227
|
+
},
|
|
228
|
+
googleMeetTranscriptEnded: {
|
|
229
|
+
account: GOOGLE_MEET_ACCOUNT,
|
|
230
|
+
icon: "google-meet",
|
|
231
|
+
name: "Google Meet transcript ended",
|
|
232
|
+
type: "googleMeet.transcript.ended",
|
|
233
|
+
},
|
|
234
|
+
googleMeetTranscriptFileGenerated: {
|
|
235
|
+
account: GOOGLE_MEET_ACCOUNT,
|
|
236
|
+
icon: "google-meet",
|
|
237
|
+
name: "Google Meet transcript generated",
|
|
238
|
+
type: "googleMeet.transcript.fileGenerated",
|
|
239
|
+
},
|
|
240
|
+
googleMeetTranscriptStarted: {
|
|
241
|
+
account: GOOGLE_MEET_ACCOUNT,
|
|
242
|
+
icon: "google-meet",
|
|
243
|
+
name: "Google Meet transcript started",
|
|
244
|
+
type: "googleMeet.transcript.started",
|
|
245
|
+
},
|
|
158
246
|
} as const satisfies Record<string, TriggerDefinition>
|
package/src/triggers/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { airtableTriggerDefinitions } from "./airtable"
|
|
2
2
|
import { asanaTriggerDefinitions } from "./asana"
|
|
3
3
|
import { brevoTriggerDefinitions } from "./brevo"
|
|
4
|
-
import { coreTriggerDefinitions
|
|
4
|
+
import { coreTriggerDefinitions } from "./core"
|
|
5
5
|
import { githubTriggerDefinitions } from "./github"
|
|
6
6
|
import { googleTriggerDefinitions } from "./google"
|
|
7
7
|
import { linearTriggerDefinitions } from "./linear"
|
|
@@ -11,6 +11,7 @@ import { slackTriggerDefinitions } from "./slack"
|
|
|
11
11
|
import { trelloTriggerDefinitions } from "./trello"
|
|
12
12
|
import { vercelTriggerDefinitions } from "./vercel"
|
|
13
13
|
import { whatsappTriggerDefinitions } from "./whatsapp"
|
|
14
|
+
import { sentenceCase } from "./name"
|
|
14
15
|
import { getIntegrationService } from "../catalog"
|
|
15
16
|
import type {
|
|
16
17
|
TriggerDefinition,
|
package/src/triggers/linear.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { linearService } from "../catalog"
|
|
2
1
|
import type { IntegrationAccountRequirement, TriggerDefinition } from "../types"
|
|
3
2
|
|
|
4
3
|
const LINEAR_ACCOUNT = {
|
|
@@ -7,7 +6,7 @@ const LINEAR_ACCOUNT = {
|
|
|
7
6
|
requiredScopes: ["read"],
|
|
8
7
|
},
|
|
9
8
|
],
|
|
10
|
-
serviceId:
|
|
9
|
+
serviceId: "linear",
|
|
11
10
|
} as const satisfies IntegrationAccountRequirement
|
|
12
11
|
|
|
13
12
|
export const linearTriggerDefinitions = {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { microsoftService } from "../catalog"
|
|
2
1
|
import type { IntegrationAccountRequirement, TriggerDefinition } from "../types"
|
|
3
2
|
|
|
4
3
|
const OUTLOOK_ACCOUNT = {
|
|
@@ -12,7 +11,7 @@ const OUTLOOK_ACCOUNT = {
|
|
|
12
11
|
],
|
|
13
12
|
},
|
|
14
13
|
],
|
|
15
|
-
serviceId:
|
|
14
|
+
serviceId: "microsoft",
|
|
16
15
|
} as const satisfies IntegrationAccountRequirement
|
|
17
16
|
|
|
18
17
|
const TEAMS_CHANNEL_MESSAGE_ACCOUNT = {
|
|
@@ -30,7 +29,7 @@ const TEAMS_CHANNEL_MESSAGE_ACCOUNT = {
|
|
|
30
29
|
],
|
|
31
30
|
},
|
|
32
31
|
],
|
|
33
|
-
serviceId:
|
|
32
|
+
serviceId: "microsoft",
|
|
34
33
|
} as const satisfies IntegrationAccountRequirement
|
|
35
34
|
|
|
36
35
|
const TEAMS_CHAT_MESSAGE_ACCOUNT = {
|
|
@@ -44,7 +43,7 @@ const TEAMS_CHAT_MESSAGE_ACCOUNT = {
|
|
|
44
43
|
],
|
|
45
44
|
},
|
|
46
45
|
],
|
|
47
|
-
serviceId:
|
|
46
|
+
serviceId: "microsoft",
|
|
48
47
|
} as const satisfies IntegrationAccountRequirement
|
|
49
48
|
|
|
50
49
|
export const microsoftTriggerDefinitions = {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { TriggerDefinition } from "../types"
|
|
2
|
+
|
|
3
|
+
const NAMESPACE_DISPLAY_NAMES: Partial<Record<string, string>> = {
|
|
4
|
+
github: "GitHub",
|
|
5
|
+
whatsapp: "WhatsApp",
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Resolves a definition's display name without loading the global catalog.
|
|
10
|
+
*
|
|
11
|
+
* @param definition - Trigger definition to name.
|
|
12
|
+
*/
|
|
13
|
+
export function getTriggerDefinitionName(definition: TriggerDefinition) {
|
|
14
|
+
if (definition.name) return definition.name
|
|
15
|
+
|
|
16
|
+
const [namespace = definition.type] = definition.type.split(".")
|
|
17
|
+
const inferredName = sentenceCase(definition.type)
|
|
18
|
+
const namespaceDisplayName = NAMESPACE_DISPLAY_NAMES[namespace]
|
|
19
|
+
|
|
20
|
+
return namespaceDisplayName
|
|
21
|
+
? inferredName.replace(sentenceCase(namespace), namespaceDisplayName)
|
|
22
|
+
: inferredName
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Converts a stable identifier to a sentence-cased display name.
|
|
27
|
+
*
|
|
28
|
+
* @param value - Stable identifier to format.
|
|
29
|
+
*/
|
|
30
|
+
export function sentenceCase(value: string) {
|
|
31
|
+
const words = value
|
|
32
|
+
.replaceAll(/([a-z\d])([A-Z])/g, "$1 $2")
|
|
33
|
+
.replaceAll(/[._-]+/g, " ")
|
|
34
|
+
.toLowerCase()
|
|
35
|
+
|
|
36
|
+
return words.charAt(0).toUpperCase() + words.slice(1)
|
|
37
|
+
}
|
package/src/triggers/resend.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { resendService } from "../catalog"
|
|
2
1
|
import type { IntegrationAccountRequirement, TriggerDefinition } from "../types"
|
|
3
2
|
|
|
4
3
|
const RESEND_ACCOUNT = {
|
|
@@ -7,7 +6,7 @@ const RESEND_ACCOUNT = {
|
|
|
7
6
|
requiredScopes: [],
|
|
8
7
|
},
|
|
9
8
|
],
|
|
10
|
-
serviceId:
|
|
9
|
+
serviceId: "resend",
|
|
11
10
|
} as const satisfies IntegrationAccountRequirement
|
|
12
11
|
|
|
13
12
|
export const resendTriggerDefinitions = {
|
package/src/triggers/slack.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { slackService } from "../catalog"
|
|
2
1
|
import type { IntegrationAccountRequirement, TriggerDefinition } from "../types"
|
|
3
2
|
|
|
4
3
|
const SLACK_APP_MENTION_ACCOUNT = {
|
|
@@ -7,7 +6,7 @@ const SLACK_APP_MENTION_ACCOUNT = {
|
|
|
7
6
|
requiredScopes: ["app_mentions:read"],
|
|
8
7
|
},
|
|
9
8
|
],
|
|
10
|
-
serviceId:
|
|
9
|
+
serviceId: "slack",
|
|
11
10
|
} as const satisfies IntegrationAccountRequirement
|
|
12
11
|
|
|
13
12
|
const SLACK_MESSAGE_ACCOUNT = {
|
|
@@ -26,7 +25,7 @@ const SLACK_MESSAGE_ACCOUNT = {
|
|
|
26
25
|
],
|
|
27
26
|
},
|
|
28
27
|
],
|
|
29
|
-
serviceId:
|
|
28
|
+
serviceId: "slack",
|
|
30
29
|
} as const satisfies IntegrationAccountRequirement
|
|
31
30
|
|
|
32
31
|
const SLACK_REACTION_ACCOUNT = {
|
|
@@ -35,7 +34,7 @@ const SLACK_REACTION_ACCOUNT = {
|
|
|
35
34
|
requiredScopes: ["reactions:read"],
|
|
36
35
|
},
|
|
37
36
|
],
|
|
38
|
-
serviceId:
|
|
37
|
+
serviceId: "slack",
|
|
39
38
|
} as const satisfies IntegrationAccountRequirement
|
|
40
39
|
|
|
41
40
|
export const slackTriggerDefinitions = {
|
package/src/triggers/trello.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { trelloService } from "../catalog"
|
|
2
1
|
import type { IntegrationAccountRequirement, TriggerDefinition } from "../types"
|
|
3
2
|
|
|
4
3
|
const TRELLO_ACCOUNT = {
|
|
@@ -7,7 +6,7 @@ const TRELLO_ACCOUNT = {
|
|
|
7
6
|
requiredScopes: [],
|
|
8
7
|
},
|
|
9
8
|
],
|
|
10
|
-
serviceId:
|
|
9
|
+
serviceId: "trello",
|
|
11
10
|
} as const satisfies IntegrationAccountRequirement
|
|
12
11
|
|
|
13
12
|
export const trelloTriggerDefinitions = {
|
package/src/triggers/vercel.ts
CHANGED
|
@@ -1,54 +1,53 @@
|
|
|
1
|
-
import { vercelService } from "../catalog"
|
|
2
1
|
import type { IntegrationAccountRequirement, TriggerDefinition } from "../types"
|
|
3
2
|
|
|
4
3
|
const VERCEL_DEPLOYMENT_ACCOUNT = {
|
|
5
4
|
connectionOptions: [
|
|
6
5
|
{
|
|
7
|
-
|
|
6
|
+
connectionMethodId: "oauth",
|
|
8
7
|
requiredScopes: ["deployment:read"],
|
|
9
8
|
},
|
|
10
9
|
],
|
|
11
|
-
serviceId:
|
|
10
|
+
serviceId: "vercel",
|
|
12
11
|
} as const satisfies IntegrationAccountRequirement
|
|
13
12
|
|
|
14
13
|
const VERCEL_INTEGRATION_CONFIGURATION_ACCOUNT = {
|
|
15
14
|
connectionOptions: [
|
|
16
15
|
{
|
|
17
|
-
|
|
16
|
+
connectionMethodId: "oauth",
|
|
18
17
|
requiredScopes: [],
|
|
19
18
|
},
|
|
20
19
|
],
|
|
21
|
-
serviceId:
|
|
20
|
+
serviceId: "vercel",
|
|
22
21
|
} as const satisfies IntegrationAccountRequirement
|
|
23
22
|
|
|
24
23
|
const VERCEL_PROJECT_ACCOUNT = {
|
|
25
24
|
connectionOptions: [
|
|
26
25
|
{
|
|
27
|
-
|
|
26
|
+
connectionMethodId: "oauth",
|
|
28
27
|
requiredScopes: ["project:read"],
|
|
29
28
|
},
|
|
30
29
|
],
|
|
31
|
-
serviceId:
|
|
30
|
+
serviceId: "vercel",
|
|
32
31
|
} as const satisfies IntegrationAccountRequirement
|
|
33
32
|
|
|
34
33
|
const VERCEL_PROJECT_DOMAIN_ACCOUNT = {
|
|
35
34
|
connectionOptions: [
|
|
36
35
|
{
|
|
37
|
-
|
|
36
|
+
connectionMethodId: "oauth",
|
|
38
37
|
requiredScopes: ["domain:read"],
|
|
39
38
|
},
|
|
40
39
|
],
|
|
41
|
-
serviceId:
|
|
40
|
+
serviceId: "vercel",
|
|
42
41
|
} as const satisfies IntegrationAccountRequirement
|
|
43
42
|
|
|
44
43
|
const VERCEL_PROJECT_ENVIRONMENT_VARIABLE_ACCOUNT = {
|
|
45
44
|
connectionOptions: [
|
|
46
45
|
{
|
|
47
|
-
|
|
46
|
+
connectionMethodId: "oauth",
|
|
48
47
|
requiredScopes: ["global-project-env-vars:read"],
|
|
49
48
|
},
|
|
50
49
|
],
|
|
51
|
-
serviceId:
|
|
50
|
+
serviceId: "vercel",
|
|
52
51
|
} as const satisfies IntegrationAccountRequirement
|
|
53
52
|
|
|
54
53
|
export const vercelTriggerDefinitions = {
|
package/src/triggers/whatsapp.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { whatsappService } from "../catalog"
|
|
2
1
|
import type { IntegrationAccountRequirement, TriggerDefinition } from "../types"
|
|
3
2
|
|
|
4
3
|
const WHATSAPP_ACCOUNT = {
|
|
@@ -7,7 +6,7 @@ const WHATSAPP_ACCOUNT = {
|
|
|
7
6
|
requiredScopes: ["whatsapp_business_messaging"],
|
|
8
7
|
},
|
|
9
8
|
],
|
|
10
|
-
serviceId:
|
|
9
|
+
serviceId: "whatsapp",
|
|
11
10
|
} as const satisfies IntegrationAccountRequirement
|
|
12
11
|
|
|
13
12
|
export const whatsappTriggerDefinitions = {
|
package/src/types.ts
CHANGED
|
@@ -99,7 +99,7 @@ export const integrationScope = {
|
|
|
99
99
|
|
|
100
100
|
/** One connection method accepted by an integration account requirement. */
|
|
101
101
|
export interface IntegrationAccountConnectionOption {
|
|
102
|
-
|
|
102
|
+
connectionMethodId?: string
|
|
103
103
|
requiredScopes: readonly IntegrationScopeRequirement[]
|
|
104
104
|
}
|
|
105
105
|
|
|
@@ -201,14 +201,14 @@ export function defineIntegrationService<
|
|
|
201
201
|
`Integration service ${service.id} has no fields for form connection: ${emptyFormConnection.id}`,
|
|
202
202
|
)
|
|
203
203
|
}
|
|
204
|
-
const
|
|
204
|
+
const duplicateConnectionMethodId = service.connectionMethods.find(
|
|
205
205
|
(connection, index) =>
|
|
206
206
|
service.connectionMethods.findIndex(({ id }) => id === connection.id) !==
|
|
207
207
|
index,
|
|
208
208
|
)?.id
|
|
209
|
-
if (
|
|
209
|
+
if (duplicateConnectionMethodId) {
|
|
210
210
|
throw new Error(
|
|
211
|
-
`Integration service ${service.id} has duplicate connection ID: ${
|
|
211
|
+
`Integration service ${service.id} has duplicate connection method ID: ${duplicateConnectionMethodId}`,
|
|
212
212
|
)
|
|
213
213
|
}
|
|
214
214
|
if (
|