@automate.ax/catalog 0.55.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/LICENSE +21 -0
- package/README.md +3 -0
- package/dist/catalog.d.ts +1106 -0
- package/dist/catalog.js +349 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/triggers/airtable.d.ts +62 -0
- package/dist/triggers/airtable.js +36 -0
- package/dist/triggers/asana.d.ts +65 -0
- package/dist/triggers/asana.js +39 -0
- package/dist/triggers/brevo.d.ts +111 -0
- package/dist/triggers/brevo.js +65 -0
- package/dist/triggers/core.d.ts +50 -0
- package/dist/triggers/core.js +74 -0
- package/dist/triggers/github.d.ts +228 -0
- package/dist/triggers/github.js +136 -0
- package/dist/triggers/google.d.ts +126 -0
- package/dist/triggers/google.js +143 -0
- package/dist/triggers/index.d.ts +2598 -0
- package/dist/triggers/index.js +97 -0
- package/dist/triggers/linear.d.ts +110 -0
- package/dist/triggers/linear.js +59 -0
- package/dist/triggers/microsoft.d.ts +40 -0
- package/dist/triggers/microsoft.js +60 -0
- package/dist/triggers/resend.d.ts +110 -0
- package/dist/triggers/resend.js +59 -0
- package/dist/triggers/slack.d.ts +41 -0
- package/dist/triggers/slack.js +53 -0
- package/dist/triggers/trello.d.ts +56 -0
- package/dist/triggers/trello.js +35 -0
- package/dist/triggers/vercel.d.ts +279 -0
- package/dist/triggers/vercel.js +163 -0
- package/dist/triggers/whatsapp.d.ts +65 -0
- package/dist/triggers/whatsapp.js +39 -0
- package/dist/types.d.ts +134 -0
- package/dist/types.js +59 -0
- package/package.json +70 -0
- package/src/catalog.ts +403 -0
- package/src/index.ts +68 -0
- package/src/triggers/airtable.ts +39 -0
- package/src/triggers/asana.ts +42 -0
- package/src/triggers/brevo.ts +68 -0
- package/src/triggers/core.ts +93 -0
- package/src/triggers/github.ts +142 -0
- package/src/triggers/google.ts +149 -0
- package/src/triggers/index.ts +128 -0
- package/src/triggers/linear.ts +62 -0
- package/src/triggers/microsoft.ts +65 -0
- package/src/triggers/resend.ts +62 -0
- package/src/triggers/slack.ts +58 -0
- package/src/triggers/trello.ts +38 -0
- package/src/triggers/vercel.ts +170 -0
- package/src/triggers/whatsapp.ts +42 -0
- package/src/types.ts +219 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { brevoService } from "../catalog.js";
|
|
2
|
+
const BREVO_ACCOUNT = {
|
|
3
|
+
connectionOptions: [
|
|
4
|
+
{
|
|
5
|
+
requiredScopes: [],
|
|
6
|
+
},
|
|
7
|
+
],
|
|
8
|
+
serviceId: brevoService.id,
|
|
9
|
+
};
|
|
10
|
+
export const brevoTriggerDefinitions = {
|
|
11
|
+
brevoTransactionalBlocked: {
|
|
12
|
+
account: BREVO_ACCOUNT,
|
|
13
|
+
name: "Brevo email blocked",
|
|
14
|
+
type: "brevo.transactional.blocked",
|
|
15
|
+
},
|
|
16
|
+
brevoTransactionalClicked: {
|
|
17
|
+
account: BREVO_ACCOUNT,
|
|
18
|
+
name: "Brevo email clicked",
|
|
19
|
+
type: "brevo.transactional.clicked",
|
|
20
|
+
},
|
|
21
|
+
brevoTransactionalDeferred: {
|
|
22
|
+
account: BREVO_ACCOUNT,
|
|
23
|
+
name: "Brevo email deferred",
|
|
24
|
+
type: "brevo.transactional.deferred",
|
|
25
|
+
},
|
|
26
|
+
brevoTransactionalDelivered: {
|
|
27
|
+
account: BREVO_ACCOUNT,
|
|
28
|
+
name: "Brevo email delivered",
|
|
29
|
+
type: "brevo.transactional.delivered",
|
|
30
|
+
},
|
|
31
|
+
brevoTransactionalEvent: {
|
|
32
|
+
account: BREVO_ACCOUNT,
|
|
33
|
+
type: "brevo.transactional.event",
|
|
34
|
+
},
|
|
35
|
+
brevoTransactionalHardBounced: {
|
|
36
|
+
account: BREVO_ACCOUNT,
|
|
37
|
+
name: "Brevo email hard bounced",
|
|
38
|
+
type: "brevo.transactional.hardBounced",
|
|
39
|
+
},
|
|
40
|
+
brevoTransactionalMarkedAsSpam: {
|
|
41
|
+
account: BREVO_ACCOUNT,
|
|
42
|
+
name: "Brevo email marked as spam",
|
|
43
|
+
type: "brevo.transactional.markedAsSpam",
|
|
44
|
+
},
|
|
45
|
+
brevoTransactionalOpened: {
|
|
46
|
+
account: BREVO_ACCOUNT,
|
|
47
|
+
name: "Brevo email opened",
|
|
48
|
+
type: "brevo.transactional.opened",
|
|
49
|
+
},
|
|
50
|
+
brevoTransactionalSent: {
|
|
51
|
+
account: BREVO_ACCOUNT,
|
|
52
|
+
name: "Brevo email sent",
|
|
53
|
+
type: "brevo.transactional.sent",
|
|
54
|
+
},
|
|
55
|
+
brevoTransactionalSoftBounced: {
|
|
56
|
+
account: BREVO_ACCOUNT,
|
|
57
|
+
name: "Brevo email soft bounced",
|
|
58
|
+
type: "brevo.transactional.softBounced",
|
|
59
|
+
},
|
|
60
|
+
brevoTransactionalUnsubscribed: {
|
|
61
|
+
account: BREVO_ACCOUNT,
|
|
62
|
+
name: "Brevo email unsubscribed",
|
|
63
|
+
type: "brevo.transactional.unsubscribed",
|
|
64
|
+
},
|
|
65
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export declare const coreTriggerDefinitions: {
|
|
2
|
+
readonly automationInvoked: {
|
|
3
|
+
readonly getDetails: ({ config }: import("..").TriggerPresentationContext) => {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}[];
|
|
7
|
+
readonly icon: "automation";
|
|
8
|
+
readonly name: "Invocation";
|
|
9
|
+
readonly type: "automation.invoked";
|
|
10
|
+
};
|
|
11
|
+
readonly cronTick: {
|
|
12
|
+
readonly getDetails: ({ config }: import("..").TriggerPresentationContext) => {
|
|
13
|
+
label: string;
|
|
14
|
+
value: string;
|
|
15
|
+
}[];
|
|
16
|
+
readonly icon: "schedule";
|
|
17
|
+
readonly name: "Cron schedule";
|
|
18
|
+
readonly type: "cron.tick";
|
|
19
|
+
};
|
|
20
|
+
readonly httpRequest: {
|
|
21
|
+
readonly getDetails: ({ appOrigin, automationId, config, hookSlot, projectId }: import("..").TriggerPresentationContext) => {
|
|
22
|
+
copyable: true;
|
|
23
|
+
label: string;
|
|
24
|
+
value: string;
|
|
25
|
+
}[];
|
|
26
|
+
readonly icon: "webhook";
|
|
27
|
+
readonly name: "HTTP request";
|
|
28
|
+
readonly type: "http.request";
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export type HttpTriggerScope = "trigger" | "automation" | "project";
|
|
32
|
+
export interface HttpTriggerEndpointOptions {
|
|
33
|
+
appOrigin: string;
|
|
34
|
+
automationId: string;
|
|
35
|
+
hookSlot: number;
|
|
36
|
+
projectId: string;
|
|
37
|
+
scope: HttpTriggerScope;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Returns the public URL for one deployed HTTP trigger.
|
|
41
|
+
*
|
|
42
|
+
* @param options - Public origin and trigger identity.
|
|
43
|
+
*/
|
|
44
|
+
export declare function getHttpTriggerEndpoint(options: HttpTriggerEndpointOptions): string;
|
|
45
|
+
/**
|
|
46
|
+
* Returns the durable endpoint identity for one configured HTTP scope.
|
|
47
|
+
*
|
|
48
|
+
* @param options - Trigger and owning resource identity.
|
|
49
|
+
*/
|
|
50
|
+
export declare function getHttpTriggerEndpointKey(options: Omit<HttpTriggerEndpointOptions, "appOrigin">): string;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as z from "zod/mini";
|
|
2
|
+
const CRON_PRESENTATION_CONFIG_SCHEMA = z.object({
|
|
3
|
+
schedule: z.string(),
|
|
4
|
+
timeZone: z.prefault(z.string(), "UTC"),
|
|
5
|
+
});
|
|
6
|
+
const HTTP_PRESENTATION_CONFIG_SCHEMA = z.object({
|
|
7
|
+
scope: z.prefault(z.enum(["trigger", "automation", "project"]), "trigger"),
|
|
8
|
+
});
|
|
9
|
+
const INVOCATION_PRESENTATION_CONFIG_SCHEMA = z.object({
|
|
10
|
+
entrypoint: z.string(),
|
|
11
|
+
});
|
|
12
|
+
export const coreTriggerDefinitions = {
|
|
13
|
+
automationInvoked: {
|
|
14
|
+
getDetails: ({ config }) => [
|
|
15
|
+
{
|
|
16
|
+
label: "Entrypoint",
|
|
17
|
+
value: INVOCATION_PRESENTATION_CONFIG_SCHEMA.parse(config).entrypoint,
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
icon: "automation",
|
|
21
|
+
name: "Invocation",
|
|
22
|
+
type: "automation.invoked",
|
|
23
|
+
},
|
|
24
|
+
cronTick: {
|
|
25
|
+
getDetails: ({ config }) => {
|
|
26
|
+
const parsedConfig = CRON_PRESENTATION_CONFIG_SCHEMA.parse(config);
|
|
27
|
+
return [
|
|
28
|
+
{ label: "Schedule", value: parsedConfig.schedule },
|
|
29
|
+
{ label: "Time zone", value: parsedConfig.timeZone },
|
|
30
|
+
];
|
|
31
|
+
},
|
|
32
|
+
icon: "schedule",
|
|
33
|
+
name: "Cron schedule",
|
|
34
|
+
type: "cron.tick",
|
|
35
|
+
},
|
|
36
|
+
httpRequest: {
|
|
37
|
+
getDetails: ({ appOrigin, automationId, config, hookSlot, projectId }) => [
|
|
38
|
+
{
|
|
39
|
+
copyable: true,
|
|
40
|
+
label: "URL",
|
|
41
|
+
value: getHttpTriggerEndpoint({
|
|
42
|
+
appOrigin,
|
|
43
|
+
automationId,
|
|
44
|
+
hookSlot,
|
|
45
|
+
projectId,
|
|
46
|
+
scope: HTTP_PRESENTATION_CONFIG_SCHEMA.parse(config).scope,
|
|
47
|
+
}),
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
icon: "webhook",
|
|
51
|
+
name: "HTTP request",
|
|
52
|
+
type: "http.request",
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Returns the public URL for one deployed HTTP trigger.
|
|
57
|
+
*
|
|
58
|
+
* @param options - Public origin and trigger identity.
|
|
59
|
+
*/
|
|
60
|
+
export function getHttpTriggerEndpoint(options) {
|
|
61
|
+
return new URL(`/x/${getHttpTriggerEndpointKey(options)}/`, options.appOrigin).toString();
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Returns the durable endpoint identity for one configured HTTP scope.
|
|
65
|
+
*
|
|
66
|
+
* @param options - Trigger and owning resource identity.
|
|
67
|
+
*/
|
|
68
|
+
export function getHttpTriggerEndpointKey(options) {
|
|
69
|
+
if (options.scope === "project")
|
|
70
|
+
return options.projectId;
|
|
71
|
+
if (options.scope === "automation")
|
|
72
|
+
return options.automationId;
|
|
73
|
+
return `${options.automationId}:${options.hookSlot}`;
|
|
74
|
+
}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
export declare const githubTriggerDefinitions: {
|
|
2
|
+
readonly githubIssueClosed: {
|
|
3
|
+
readonly account: {
|
|
4
|
+
readonly connectionOptions: readonly [{
|
|
5
|
+
readonly requiredScopes: readonly ["issues:read"];
|
|
6
|
+
}];
|
|
7
|
+
readonly serviceId: "github";
|
|
8
|
+
};
|
|
9
|
+
readonly type: "github.issue.closed";
|
|
10
|
+
};
|
|
11
|
+
readonly githubIssueEvent: {
|
|
12
|
+
readonly account: {
|
|
13
|
+
readonly connectionOptions: readonly [{
|
|
14
|
+
readonly requiredScopes: readonly ["issues:read"];
|
|
15
|
+
}];
|
|
16
|
+
readonly serviceId: "github";
|
|
17
|
+
};
|
|
18
|
+
readonly type: "github.issue.event";
|
|
19
|
+
};
|
|
20
|
+
readonly githubIssueOpened: {
|
|
21
|
+
readonly account: {
|
|
22
|
+
readonly connectionOptions: readonly [{
|
|
23
|
+
readonly requiredScopes: readonly ["issues:read"];
|
|
24
|
+
}];
|
|
25
|
+
readonly serviceId: "github";
|
|
26
|
+
};
|
|
27
|
+
readonly type: "github.issue.opened";
|
|
28
|
+
};
|
|
29
|
+
readonly githubIssueReopened: {
|
|
30
|
+
readonly account: {
|
|
31
|
+
readonly connectionOptions: readonly [{
|
|
32
|
+
readonly requiredScopes: readonly ["issues:read"];
|
|
33
|
+
}];
|
|
34
|
+
readonly serviceId: "github";
|
|
35
|
+
};
|
|
36
|
+
readonly type: "github.issue.reopened";
|
|
37
|
+
};
|
|
38
|
+
readonly githubPullRequestClosed: {
|
|
39
|
+
readonly account: {
|
|
40
|
+
readonly connectionOptions: readonly [{
|
|
41
|
+
readonly requiredScopes: readonly ["pull_requests:read"];
|
|
42
|
+
}];
|
|
43
|
+
readonly serviceId: "github";
|
|
44
|
+
};
|
|
45
|
+
readonly type: "github.pull-request.closed";
|
|
46
|
+
};
|
|
47
|
+
readonly githubPullRequestEvent: {
|
|
48
|
+
readonly account: {
|
|
49
|
+
readonly connectionOptions: readonly [{
|
|
50
|
+
readonly requiredScopes: readonly ["pull_requests:read"];
|
|
51
|
+
}];
|
|
52
|
+
readonly serviceId: "github";
|
|
53
|
+
};
|
|
54
|
+
readonly type: "github.pull-request.event";
|
|
55
|
+
};
|
|
56
|
+
readonly githubPullRequestMerged: {
|
|
57
|
+
readonly account: {
|
|
58
|
+
readonly connectionOptions: readonly [{
|
|
59
|
+
readonly requiredScopes: readonly ["pull_requests:read"];
|
|
60
|
+
}];
|
|
61
|
+
readonly serviceId: "github";
|
|
62
|
+
};
|
|
63
|
+
readonly type: "github.pull-request.merged";
|
|
64
|
+
};
|
|
65
|
+
readonly githubPullRequestOpened: {
|
|
66
|
+
readonly account: {
|
|
67
|
+
readonly connectionOptions: readonly [{
|
|
68
|
+
readonly requiredScopes: readonly ["pull_requests:read"];
|
|
69
|
+
}];
|
|
70
|
+
readonly serviceId: "github";
|
|
71
|
+
};
|
|
72
|
+
readonly type: "github.pull-request.opened";
|
|
73
|
+
};
|
|
74
|
+
readonly githubPullRequestReadyForReview: {
|
|
75
|
+
readonly account: {
|
|
76
|
+
readonly connectionOptions: readonly [{
|
|
77
|
+
readonly requiredScopes: readonly ["pull_requests:read"];
|
|
78
|
+
}];
|
|
79
|
+
readonly serviceId: "github";
|
|
80
|
+
};
|
|
81
|
+
readonly type: "github.pull-request.ready-for-review";
|
|
82
|
+
};
|
|
83
|
+
readonly githubPullRequestReviewApproved: {
|
|
84
|
+
readonly account: {
|
|
85
|
+
readonly connectionOptions: readonly [{
|
|
86
|
+
readonly requiredScopes: readonly ["pull_requests:read"];
|
|
87
|
+
}];
|
|
88
|
+
readonly serviceId: "github";
|
|
89
|
+
};
|
|
90
|
+
readonly type: "github.pull-request-review.approved";
|
|
91
|
+
};
|
|
92
|
+
readonly githubPullRequestReviewChangesRequested: {
|
|
93
|
+
readonly account: {
|
|
94
|
+
readonly connectionOptions: readonly [{
|
|
95
|
+
readonly requiredScopes: readonly ["pull_requests:read"];
|
|
96
|
+
}];
|
|
97
|
+
readonly serviceId: "github";
|
|
98
|
+
};
|
|
99
|
+
readonly name: "GitHub pull request changes requested";
|
|
100
|
+
readonly type: "github.pull-request-review.changes-requested";
|
|
101
|
+
};
|
|
102
|
+
readonly githubPullRequestReviewDismissed: {
|
|
103
|
+
readonly account: {
|
|
104
|
+
readonly connectionOptions: readonly [{
|
|
105
|
+
readonly requiredScopes: readonly ["pull_requests:read"];
|
|
106
|
+
}];
|
|
107
|
+
readonly serviceId: "github";
|
|
108
|
+
};
|
|
109
|
+
readonly type: "github.pull-request-review.dismissed";
|
|
110
|
+
};
|
|
111
|
+
readonly githubPullRequestReviewEvent: {
|
|
112
|
+
readonly account: {
|
|
113
|
+
readonly connectionOptions: readonly [{
|
|
114
|
+
readonly requiredScopes: readonly ["pull_requests:read"];
|
|
115
|
+
}];
|
|
116
|
+
readonly serviceId: "github";
|
|
117
|
+
};
|
|
118
|
+
readonly type: "github.pull-request-review.event";
|
|
119
|
+
};
|
|
120
|
+
readonly githubPullRequestReviewSubmitted: {
|
|
121
|
+
readonly account: {
|
|
122
|
+
readonly connectionOptions: readonly [{
|
|
123
|
+
readonly requiredScopes: readonly ["pull_requests:read"];
|
|
124
|
+
}];
|
|
125
|
+
readonly serviceId: "github";
|
|
126
|
+
};
|
|
127
|
+
readonly type: "github.pull-request-review.submitted";
|
|
128
|
+
};
|
|
129
|
+
readonly githubPullRequestSynchronized: {
|
|
130
|
+
readonly account: {
|
|
131
|
+
readonly connectionOptions: readonly [{
|
|
132
|
+
readonly requiredScopes: readonly ["pull_requests:read"];
|
|
133
|
+
}];
|
|
134
|
+
readonly serviceId: "github";
|
|
135
|
+
};
|
|
136
|
+
readonly type: "github.pull-request.synchronized";
|
|
137
|
+
};
|
|
138
|
+
readonly githubPush: {
|
|
139
|
+
readonly account: {
|
|
140
|
+
readonly connectionOptions: readonly [{
|
|
141
|
+
readonly requiredScopes: readonly ["contents:read"];
|
|
142
|
+
}];
|
|
143
|
+
readonly serviceId: "github";
|
|
144
|
+
};
|
|
145
|
+
readonly type: "github.push";
|
|
146
|
+
};
|
|
147
|
+
readonly githubReleaseEvent: {
|
|
148
|
+
readonly account: {
|
|
149
|
+
readonly connectionOptions: readonly [{
|
|
150
|
+
readonly requiredScopes: readonly ["contents:read"];
|
|
151
|
+
}];
|
|
152
|
+
readonly serviceId: "github";
|
|
153
|
+
};
|
|
154
|
+
readonly type: "github.release.event";
|
|
155
|
+
};
|
|
156
|
+
readonly githubReleasePublished: {
|
|
157
|
+
readonly account: {
|
|
158
|
+
readonly connectionOptions: readonly [{
|
|
159
|
+
readonly requiredScopes: readonly ["contents:read"];
|
|
160
|
+
}];
|
|
161
|
+
readonly serviceId: "github";
|
|
162
|
+
};
|
|
163
|
+
readonly type: "github.release.published";
|
|
164
|
+
};
|
|
165
|
+
readonly githubWorkflowRunCancelled: {
|
|
166
|
+
readonly account: {
|
|
167
|
+
readonly connectionOptions: readonly [{
|
|
168
|
+
readonly requiredScopes: readonly ["actions:read"];
|
|
169
|
+
}];
|
|
170
|
+
readonly serviceId: "github";
|
|
171
|
+
};
|
|
172
|
+
readonly type: "github.workflow-run.cancelled";
|
|
173
|
+
};
|
|
174
|
+
readonly githubWorkflowRunCompleted: {
|
|
175
|
+
readonly account: {
|
|
176
|
+
readonly connectionOptions: readonly [{
|
|
177
|
+
readonly requiredScopes: readonly ["actions:read"];
|
|
178
|
+
}];
|
|
179
|
+
readonly serviceId: "github";
|
|
180
|
+
};
|
|
181
|
+
readonly type: "github.workflow-run.completed";
|
|
182
|
+
};
|
|
183
|
+
readonly githubWorkflowRunEvent: {
|
|
184
|
+
readonly account: {
|
|
185
|
+
readonly connectionOptions: readonly [{
|
|
186
|
+
readonly requiredScopes: readonly ["actions:read"];
|
|
187
|
+
}];
|
|
188
|
+
readonly serviceId: "github";
|
|
189
|
+
};
|
|
190
|
+
readonly type: "github.workflow-run.event";
|
|
191
|
+
};
|
|
192
|
+
readonly githubWorkflowRunFailed: {
|
|
193
|
+
readonly account: {
|
|
194
|
+
readonly connectionOptions: readonly [{
|
|
195
|
+
readonly requiredScopes: readonly ["actions:read"];
|
|
196
|
+
}];
|
|
197
|
+
readonly serviceId: "github";
|
|
198
|
+
};
|
|
199
|
+
readonly type: "github.workflow-run.failed";
|
|
200
|
+
};
|
|
201
|
+
readonly githubWorkflowRunRequested: {
|
|
202
|
+
readonly account: {
|
|
203
|
+
readonly connectionOptions: readonly [{
|
|
204
|
+
readonly requiredScopes: readonly ["actions:read"];
|
|
205
|
+
}];
|
|
206
|
+
readonly serviceId: "github";
|
|
207
|
+
};
|
|
208
|
+
readonly type: "github.workflow-run.requested";
|
|
209
|
+
};
|
|
210
|
+
readonly githubWorkflowRunStarted: {
|
|
211
|
+
readonly account: {
|
|
212
|
+
readonly connectionOptions: readonly [{
|
|
213
|
+
readonly requiredScopes: readonly ["actions:read"];
|
|
214
|
+
}];
|
|
215
|
+
readonly serviceId: "github";
|
|
216
|
+
};
|
|
217
|
+
readonly type: "github.workflow-run.started";
|
|
218
|
+
};
|
|
219
|
+
readonly githubWorkflowRunSucceeded: {
|
|
220
|
+
readonly account: {
|
|
221
|
+
readonly connectionOptions: readonly [{
|
|
222
|
+
readonly requiredScopes: readonly ["actions:read"];
|
|
223
|
+
}];
|
|
224
|
+
readonly serviceId: "github";
|
|
225
|
+
};
|
|
226
|
+
readonly type: "github.workflow-run.succeeded";
|
|
227
|
+
};
|
|
228
|
+
};
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { githubService } from "../catalog.js";
|
|
2
|
+
const GITHUB_ISSUES_ACCOUNT = {
|
|
3
|
+
connectionOptions: [
|
|
4
|
+
{
|
|
5
|
+
requiredScopes: ["issues:read"],
|
|
6
|
+
},
|
|
7
|
+
],
|
|
8
|
+
serviceId: githubService.id,
|
|
9
|
+
};
|
|
10
|
+
const GITHUB_PULL_REQUESTS_ACCOUNT = {
|
|
11
|
+
connectionOptions: [
|
|
12
|
+
{
|
|
13
|
+
requiredScopes: ["pull_requests:read"],
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
serviceId: githubService.id,
|
|
17
|
+
};
|
|
18
|
+
const GITHUB_CONTENTS_ACCOUNT = {
|
|
19
|
+
connectionOptions: [
|
|
20
|
+
{
|
|
21
|
+
requiredScopes: ["contents:read"],
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
serviceId: githubService.id,
|
|
25
|
+
};
|
|
26
|
+
const GITHUB_ACTIONS_ACCOUNT = {
|
|
27
|
+
connectionOptions: [
|
|
28
|
+
{
|
|
29
|
+
requiredScopes: ["actions:read"],
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
serviceId: githubService.id,
|
|
33
|
+
};
|
|
34
|
+
export const githubTriggerDefinitions = {
|
|
35
|
+
githubIssueClosed: {
|
|
36
|
+
account: GITHUB_ISSUES_ACCOUNT,
|
|
37
|
+
type: "github.issue.closed",
|
|
38
|
+
},
|
|
39
|
+
githubIssueEvent: {
|
|
40
|
+
account: GITHUB_ISSUES_ACCOUNT,
|
|
41
|
+
type: "github.issue.event",
|
|
42
|
+
},
|
|
43
|
+
githubIssueOpened: {
|
|
44
|
+
account: GITHUB_ISSUES_ACCOUNT,
|
|
45
|
+
type: "github.issue.opened",
|
|
46
|
+
},
|
|
47
|
+
githubIssueReopened: {
|
|
48
|
+
account: GITHUB_ISSUES_ACCOUNT,
|
|
49
|
+
type: "github.issue.reopened",
|
|
50
|
+
},
|
|
51
|
+
githubPullRequestClosed: {
|
|
52
|
+
account: GITHUB_PULL_REQUESTS_ACCOUNT,
|
|
53
|
+
type: "github.pull-request.closed",
|
|
54
|
+
},
|
|
55
|
+
githubPullRequestEvent: {
|
|
56
|
+
account: GITHUB_PULL_REQUESTS_ACCOUNT,
|
|
57
|
+
type: "github.pull-request.event",
|
|
58
|
+
},
|
|
59
|
+
githubPullRequestMerged: {
|
|
60
|
+
account: GITHUB_PULL_REQUESTS_ACCOUNT,
|
|
61
|
+
type: "github.pull-request.merged",
|
|
62
|
+
},
|
|
63
|
+
githubPullRequestOpened: {
|
|
64
|
+
account: GITHUB_PULL_REQUESTS_ACCOUNT,
|
|
65
|
+
type: "github.pull-request.opened",
|
|
66
|
+
},
|
|
67
|
+
githubPullRequestReadyForReview: {
|
|
68
|
+
account: GITHUB_PULL_REQUESTS_ACCOUNT,
|
|
69
|
+
type: "github.pull-request.ready-for-review",
|
|
70
|
+
},
|
|
71
|
+
githubPullRequestReviewApproved: {
|
|
72
|
+
account: GITHUB_PULL_REQUESTS_ACCOUNT,
|
|
73
|
+
type: "github.pull-request-review.approved",
|
|
74
|
+
},
|
|
75
|
+
githubPullRequestReviewChangesRequested: {
|
|
76
|
+
account: GITHUB_PULL_REQUESTS_ACCOUNT,
|
|
77
|
+
name: "GitHub pull request changes requested",
|
|
78
|
+
type: "github.pull-request-review.changes-requested",
|
|
79
|
+
},
|
|
80
|
+
githubPullRequestReviewDismissed: {
|
|
81
|
+
account: GITHUB_PULL_REQUESTS_ACCOUNT,
|
|
82
|
+
type: "github.pull-request-review.dismissed",
|
|
83
|
+
},
|
|
84
|
+
githubPullRequestReviewEvent: {
|
|
85
|
+
account: GITHUB_PULL_REQUESTS_ACCOUNT,
|
|
86
|
+
type: "github.pull-request-review.event",
|
|
87
|
+
},
|
|
88
|
+
githubPullRequestReviewSubmitted: {
|
|
89
|
+
account: GITHUB_PULL_REQUESTS_ACCOUNT,
|
|
90
|
+
type: "github.pull-request-review.submitted",
|
|
91
|
+
},
|
|
92
|
+
githubPullRequestSynchronized: {
|
|
93
|
+
account: GITHUB_PULL_REQUESTS_ACCOUNT,
|
|
94
|
+
type: "github.pull-request.synchronized",
|
|
95
|
+
},
|
|
96
|
+
githubPush: {
|
|
97
|
+
account: GITHUB_CONTENTS_ACCOUNT,
|
|
98
|
+
type: "github.push",
|
|
99
|
+
},
|
|
100
|
+
githubReleaseEvent: {
|
|
101
|
+
account: GITHUB_CONTENTS_ACCOUNT,
|
|
102
|
+
type: "github.release.event",
|
|
103
|
+
},
|
|
104
|
+
githubReleasePublished: {
|
|
105
|
+
account: GITHUB_CONTENTS_ACCOUNT,
|
|
106
|
+
type: "github.release.published",
|
|
107
|
+
},
|
|
108
|
+
githubWorkflowRunCancelled: {
|
|
109
|
+
account: GITHUB_ACTIONS_ACCOUNT,
|
|
110
|
+
type: "github.workflow-run.cancelled",
|
|
111
|
+
},
|
|
112
|
+
githubWorkflowRunCompleted: {
|
|
113
|
+
account: GITHUB_ACTIONS_ACCOUNT,
|
|
114
|
+
type: "github.workflow-run.completed",
|
|
115
|
+
},
|
|
116
|
+
githubWorkflowRunEvent: {
|
|
117
|
+
account: GITHUB_ACTIONS_ACCOUNT,
|
|
118
|
+
type: "github.workflow-run.event",
|
|
119
|
+
},
|
|
120
|
+
githubWorkflowRunFailed: {
|
|
121
|
+
account: GITHUB_ACTIONS_ACCOUNT,
|
|
122
|
+
type: "github.workflow-run.failed",
|
|
123
|
+
},
|
|
124
|
+
githubWorkflowRunRequested: {
|
|
125
|
+
account: GITHUB_ACTIONS_ACCOUNT,
|
|
126
|
+
type: "github.workflow-run.requested",
|
|
127
|
+
},
|
|
128
|
+
githubWorkflowRunStarted: {
|
|
129
|
+
account: GITHUB_ACTIONS_ACCOUNT,
|
|
130
|
+
type: "github.workflow-run.started",
|
|
131
|
+
},
|
|
132
|
+
githubWorkflowRunSucceeded: {
|
|
133
|
+
account: GITHUB_ACTIONS_ACCOUNT,
|
|
134
|
+
type: "github.workflow-run.succeeded",
|
|
135
|
+
},
|
|
136
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
export declare const googleTriggerDefinitions: {
|
|
2
|
+
readonly gmailLabelAdded: {
|
|
3
|
+
readonly account: {
|
|
4
|
+
readonly connectionOptions: readonly [{
|
|
5
|
+
readonly requiredScopes: readonly [{
|
|
6
|
+
readonly requirements: readonly ["https://mail.google.com/", "https://www.googleapis.com/auth/gmail.modify", "https://www.googleapis.com/auth/gmail.readonly"];
|
|
7
|
+
readonly type: "or";
|
|
8
|
+
}];
|
|
9
|
+
}];
|
|
10
|
+
readonly serviceId: "google";
|
|
11
|
+
};
|
|
12
|
+
readonly type: "gmail.label.added";
|
|
13
|
+
};
|
|
14
|
+
readonly gmailLabelRemoved: {
|
|
15
|
+
readonly account: {
|
|
16
|
+
readonly connectionOptions: readonly [{
|
|
17
|
+
readonly requiredScopes: readonly [{
|
|
18
|
+
readonly requirements: readonly ["https://mail.google.com/", "https://www.googleapis.com/auth/gmail.modify", "https://www.googleapis.com/auth/gmail.readonly"];
|
|
19
|
+
readonly type: "or";
|
|
20
|
+
}];
|
|
21
|
+
}];
|
|
22
|
+
readonly serviceId: "google";
|
|
23
|
+
};
|
|
24
|
+
readonly type: "gmail.label.removed";
|
|
25
|
+
};
|
|
26
|
+
readonly gmailMessageReceived: {
|
|
27
|
+
readonly account: {
|
|
28
|
+
readonly connectionOptions: readonly [{
|
|
29
|
+
readonly requiredScopes: readonly [{
|
|
30
|
+
readonly requirements: readonly ["https://mail.google.com/", "https://www.googleapis.com/auth/gmail.modify", "https://www.googleapis.com/auth/gmail.readonly"];
|
|
31
|
+
readonly type: "or";
|
|
32
|
+
}];
|
|
33
|
+
}];
|
|
34
|
+
readonly serviceId: "google";
|
|
35
|
+
};
|
|
36
|
+
readonly name: "Gmail email received";
|
|
37
|
+
readonly type: "gmail.message.received";
|
|
38
|
+
};
|
|
39
|
+
readonly gmailMessageSent: {
|
|
40
|
+
readonly account: {
|
|
41
|
+
readonly connectionOptions: readonly [{
|
|
42
|
+
readonly requiredScopes: readonly [{
|
|
43
|
+
readonly requirements: readonly ["https://mail.google.com/", "https://www.googleapis.com/auth/gmail.modify", "https://www.googleapis.com/auth/gmail.readonly"];
|
|
44
|
+
readonly type: "or";
|
|
45
|
+
}];
|
|
46
|
+
}];
|
|
47
|
+
readonly serviceId: "google";
|
|
48
|
+
};
|
|
49
|
+
readonly name: "Gmail email sent";
|
|
50
|
+
readonly type: "gmail.message.sent";
|
|
51
|
+
};
|
|
52
|
+
readonly googleCalendarEventCreated: {
|
|
53
|
+
readonly account: {
|
|
54
|
+
readonly connectionOptions: readonly [{
|
|
55
|
+
readonly requiredScopes: readonly [{
|
|
56
|
+
readonly requirements: readonly ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.readonly", "https://www.googleapis.com/auth/calendar.events", "https://www.googleapis.com/auth/calendar.events.readonly", "https://www.googleapis.com/auth/calendar.events.owned"];
|
|
57
|
+
readonly type: "or";
|
|
58
|
+
}];
|
|
59
|
+
}];
|
|
60
|
+
readonly serviceId: "google";
|
|
61
|
+
};
|
|
62
|
+
readonly name: "Google Calendar event created";
|
|
63
|
+
readonly type: "googleCalendar.event.created";
|
|
64
|
+
};
|
|
65
|
+
readonly googleCalendarEventDeleted: {
|
|
66
|
+
readonly account: {
|
|
67
|
+
readonly connectionOptions: readonly [{
|
|
68
|
+
readonly requiredScopes: readonly [{
|
|
69
|
+
readonly requirements: readonly ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.readonly", "https://www.googleapis.com/auth/calendar.events", "https://www.googleapis.com/auth/calendar.events.readonly", "https://www.googleapis.com/auth/calendar.events.owned"];
|
|
70
|
+
readonly type: "or";
|
|
71
|
+
}];
|
|
72
|
+
}];
|
|
73
|
+
readonly serviceId: "google";
|
|
74
|
+
};
|
|
75
|
+
readonly name: "Google Calendar event deleted";
|
|
76
|
+
readonly type: "googleCalendar.event.deleted";
|
|
77
|
+
};
|
|
78
|
+
readonly googleCalendarEventUpdated: {
|
|
79
|
+
readonly account: {
|
|
80
|
+
readonly connectionOptions: readonly [{
|
|
81
|
+
readonly requiredScopes: readonly [{
|
|
82
|
+
readonly requirements: readonly ["https://www.googleapis.com/auth/calendar", "https://www.googleapis.com/auth/calendar.readonly", "https://www.googleapis.com/auth/calendar.events", "https://www.googleapis.com/auth/calendar.events.readonly", "https://www.googleapis.com/auth/calendar.events.owned"];
|
|
83
|
+
readonly type: "or";
|
|
84
|
+
}];
|
|
85
|
+
}];
|
|
86
|
+
readonly serviceId: "google";
|
|
87
|
+
};
|
|
88
|
+
readonly name: "Google Calendar event updated";
|
|
89
|
+
readonly type: "googleCalendar.event.updated";
|
|
90
|
+
};
|
|
91
|
+
readonly googleFormsFormChanged: {
|
|
92
|
+
readonly account: {
|
|
93
|
+
readonly connectionOptions: readonly [{
|
|
94
|
+
readonly requiredScopes: readonly [{
|
|
95
|
+
readonly requirements: readonly ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.readonly", "https://www.googleapis.com/auth/forms.body", "https://www.googleapis.com/auth/forms.body.readonly"];
|
|
96
|
+
readonly type: "or";
|
|
97
|
+
}];
|
|
98
|
+
}];
|
|
99
|
+
readonly serviceId: "google";
|
|
100
|
+
};
|
|
101
|
+
readonly name: "Google Form changed";
|
|
102
|
+
readonly type: "googleForms.form.changed";
|
|
103
|
+
};
|
|
104
|
+
readonly googleFormsResponseSubmitted: {
|
|
105
|
+
readonly account: {
|
|
106
|
+
readonly connectionOptions: readonly [{
|
|
107
|
+
readonly requiredScopes: readonly [{
|
|
108
|
+
readonly requirements: readonly ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.readonly", "https://www.googleapis.com/auth/forms.body", "https://www.googleapis.com/auth/forms.body.readonly"];
|
|
109
|
+
readonly type: "or";
|
|
110
|
+
}, {
|
|
111
|
+
readonly requirements: readonly [{
|
|
112
|
+
readonly requirements: readonly ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/forms.responses.readonly"];
|
|
113
|
+
readonly type: "or";
|
|
114
|
+
}, {
|
|
115
|
+
readonly requirements: readonly ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive.readonly", "https://www.googleapis.com/auth/forms.body", "https://www.googleapis.com/auth/forms.body.readonly"];
|
|
116
|
+
readonly type: "or";
|
|
117
|
+
}];
|
|
118
|
+
readonly type: "and";
|
|
119
|
+
}];
|
|
120
|
+
}];
|
|
121
|
+
readonly serviceId: "google";
|
|
122
|
+
};
|
|
123
|
+
readonly name: "Google Form response submitted";
|
|
124
|
+
readonly type: "googleForms.response.submitted";
|
|
125
|
+
};
|
|
126
|
+
};
|