@automate.ax/catalog 0.83.3 → 0.84.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/catalog.d.ts +115 -38
- package/dist/catalog.js +19 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/triggers/index.d.ts +520 -0
- package/dist/triggers/index.js +2 -0
- package/dist/triggers/stripe.d.ts +262 -0
- package/dist/triggers/stripe.js +107 -0
- package/package.json +7 -1
- package/src/catalog.ts +23 -1
- package/src/index.ts +1 -0
- package/src/triggers/index.ts +2 -0
- package/src/triggers/stripe.ts +110 -0
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
export declare const stripeTriggerDefinitions: {
|
|
2
|
+
readonly stripeChargeDisputeClosed: {
|
|
3
|
+
readonly account: {
|
|
4
|
+
readonly connectionOptions: readonly [{
|
|
5
|
+
readonly connectionMethodId: "api-key";
|
|
6
|
+
readonly requiredScopes: readonly [];
|
|
7
|
+
}];
|
|
8
|
+
readonly serviceId: "stripe";
|
|
9
|
+
};
|
|
10
|
+
readonly type: "stripe.charge.dispute.closed";
|
|
11
|
+
};
|
|
12
|
+
readonly stripeChargeDisputeCreated: {
|
|
13
|
+
readonly account: {
|
|
14
|
+
readonly connectionOptions: readonly [{
|
|
15
|
+
readonly connectionMethodId: "api-key";
|
|
16
|
+
readonly requiredScopes: readonly [];
|
|
17
|
+
}];
|
|
18
|
+
readonly serviceId: "stripe";
|
|
19
|
+
};
|
|
20
|
+
readonly type: "stripe.charge.dispute.created";
|
|
21
|
+
};
|
|
22
|
+
readonly stripeCheckoutSessionCompleted: {
|
|
23
|
+
readonly account: {
|
|
24
|
+
readonly connectionOptions: readonly [{
|
|
25
|
+
readonly connectionMethodId: "api-key";
|
|
26
|
+
readonly requiredScopes: readonly [];
|
|
27
|
+
}];
|
|
28
|
+
readonly serviceId: "stripe";
|
|
29
|
+
};
|
|
30
|
+
readonly type: "stripe.checkout.session.completed";
|
|
31
|
+
};
|
|
32
|
+
readonly stripeCheckoutSessionAsyncPaymentFailed: {
|
|
33
|
+
readonly account: {
|
|
34
|
+
readonly connectionOptions: readonly [{
|
|
35
|
+
readonly connectionMethodId: "api-key";
|
|
36
|
+
readonly requiredScopes: readonly [];
|
|
37
|
+
}];
|
|
38
|
+
readonly serviceId: "stripe";
|
|
39
|
+
};
|
|
40
|
+
readonly type: "stripe.checkout.session.asyncPaymentFailed";
|
|
41
|
+
};
|
|
42
|
+
readonly stripeCheckoutSessionAsyncPaymentSucceeded: {
|
|
43
|
+
readonly account: {
|
|
44
|
+
readonly connectionOptions: readonly [{
|
|
45
|
+
readonly connectionMethodId: "api-key";
|
|
46
|
+
readonly requiredScopes: readonly [];
|
|
47
|
+
}];
|
|
48
|
+
readonly serviceId: "stripe";
|
|
49
|
+
};
|
|
50
|
+
readonly type: "stripe.checkout.session.asyncPaymentSucceeded";
|
|
51
|
+
};
|
|
52
|
+
readonly stripeCheckoutSessionExpired: {
|
|
53
|
+
readonly account: {
|
|
54
|
+
readonly connectionOptions: readonly [{
|
|
55
|
+
readonly connectionMethodId: "api-key";
|
|
56
|
+
readonly requiredScopes: readonly [];
|
|
57
|
+
}];
|
|
58
|
+
readonly serviceId: "stripe";
|
|
59
|
+
};
|
|
60
|
+
readonly type: "stripe.checkout.session.expired";
|
|
61
|
+
};
|
|
62
|
+
readonly stripeCustomerCreated: {
|
|
63
|
+
readonly account: {
|
|
64
|
+
readonly connectionOptions: readonly [{
|
|
65
|
+
readonly connectionMethodId: "api-key";
|
|
66
|
+
readonly requiredScopes: readonly [];
|
|
67
|
+
}];
|
|
68
|
+
readonly serviceId: "stripe";
|
|
69
|
+
};
|
|
70
|
+
readonly type: "stripe.customer.created";
|
|
71
|
+
};
|
|
72
|
+
readonly stripeCustomerDeleted: {
|
|
73
|
+
readonly account: {
|
|
74
|
+
readonly connectionOptions: readonly [{
|
|
75
|
+
readonly connectionMethodId: "api-key";
|
|
76
|
+
readonly requiredScopes: readonly [];
|
|
77
|
+
}];
|
|
78
|
+
readonly serviceId: "stripe";
|
|
79
|
+
};
|
|
80
|
+
readonly type: "stripe.customer.deleted";
|
|
81
|
+
};
|
|
82
|
+
readonly stripeCustomerSubscriptionCreated: {
|
|
83
|
+
readonly account: {
|
|
84
|
+
readonly connectionOptions: readonly [{
|
|
85
|
+
readonly connectionMethodId: "api-key";
|
|
86
|
+
readonly requiredScopes: readonly [];
|
|
87
|
+
}];
|
|
88
|
+
readonly serviceId: "stripe";
|
|
89
|
+
};
|
|
90
|
+
readonly type: "stripe.customer.subscription.created";
|
|
91
|
+
};
|
|
92
|
+
readonly stripeCustomerSubscriptionDeleted: {
|
|
93
|
+
readonly account: {
|
|
94
|
+
readonly connectionOptions: readonly [{
|
|
95
|
+
readonly connectionMethodId: "api-key";
|
|
96
|
+
readonly requiredScopes: readonly [];
|
|
97
|
+
}];
|
|
98
|
+
readonly serviceId: "stripe";
|
|
99
|
+
};
|
|
100
|
+
readonly type: "stripe.customer.subscription.deleted";
|
|
101
|
+
};
|
|
102
|
+
readonly stripeCustomerSubscriptionTrialWillEnd: {
|
|
103
|
+
readonly account: {
|
|
104
|
+
readonly connectionOptions: readonly [{
|
|
105
|
+
readonly connectionMethodId: "api-key";
|
|
106
|
+
readonly requiredScopes: readonly [];
|
|
107
|
+
}];
|
|
108
|
+
readonly serviceId: "stripe";
|
|
109
|
+
};
|
|
110
|
+
readonly type: "stripe.customer.subscription.trialWillEnd";
|
|
111
|
+
};
|
|
112
|
+
readonly stripeCustomerSubscriptionUpdated: {
|
|
113
|
+
readonly account: {
|
|
114
|
+
readonly connectionOptions: readonly [{
|
|
115
|
+
readonly connectionMethodId: "api-key";
|
|
116
|
+
readonly requiredScopes: readonly [];
|
|
117
|
+
}];
|
|
118
|
+
readonly serviceId: "stripe";
|
|
119
|
+
};
|
|
120
|
+
readonly type: "stripe.customer.subscription.updated";
|
|
121
|
+
};
|
|
122
|
+
readonly stripeCustomerUpdated: {
|
|
123
|
+
readonly account: {
|
|
124
|
+
readonly connectionOptions: readonly [{
|
|
125
|
+
readonly connectionMethodId: "api-key";
|
|
126
|
+
readonly requiredScopes: readonly [];
|
|
127
|
+
}];
|
|
128
|
+
readonly serviceId: "stripe";
|
|
129
|
+
};
|
|
130
|
+
readonly type: "stripe.customer.updated";
|
|
131
|
+
};
|
|
132
|
+
readonly stripeEvent: {
|
|
133
|
+
readonly account: {
|
|
134
|
+
readonly connectionOptions: readonly [{
|
|
135
|
+
readonly connectionMethodId: "api-key";
|
|
136
|
+
readonly requiredScopes: readonly [];
|
|
137
|
+
}];
|
|
138
|
+
readonly serviceId: "stripe";
|
|
139
|
+
};
|
|
140
|
+
readonly type: "stripe.event";
|
|
141
|
+
};
|
|
142
|
+
readonly stripeInvoiceFinalized: {
|
|
143
|
+
readonly account: {
|
|
144
|
+
readonly connectionOptions: readonly [{
|
|
145
|
+
readonly connectionMethodId: "api-key";
|
|
146
|
+
readonly requiredScopes: readonly [];
|
|
147
|
+
}];
|
|
148
|
+
readonly serviceId: "stripe";
|
|
149
|
+
};
|
|
150
|
+
readonly type: "stripe.invoice.finalized";
|
|
151
|
+
};
|
|
152
|
+
readonly stripeInvoiceOverdue: {
|
|
153
|
+
readonly account: {
|
|
154
|
+
readonly connectionOptions: readonly [{
|
|
155
|
+
readonly connectionMethodId: "api-key";
|
|
156
|
+
readonly requiredScopes: readonly [];
|
|
157
|
+
}];
|
|
158
|
+
readonly serviceId: "stripe";
|
|
159
|
+
};
|
|
160
|
+
readonly type: "stripe.invoice.overdue";
|
|
161
|
+
};
|
|
162
|
+
readonly stripeInvoicePaid: {
|
|
163
|
+
readonly account: {
|
|
164
|
+
readonly connectionOptions: readonly [{
|
|
165
|
+
readonly connectionMethodId: "api-key";
|
|
166
|
+
readonly requiredScopes: readonly [];
|
|
167
|
+
}];
|
|
168
|
+
readonly serviceId: "stripe";
|
|
169
|
+
};
|
|
170
|
+
readonly type: "stripe.invoice.paid";
|
|
171
|
+
};
|
|
172
|
+
readonly stripeInvoicePaymentFailed: {
|
|
173
|
+
readonly account: {
|
|
174
|
+
readonly connectionOptions: readonly [{
|
|
175
|
+
readonly connectionMethodId: "api-key";
|
|
176
|
+
readonly requiredScopes: readonly [];
|
|
177
|
+
}];
|
|
178
|
+
readonly serviceId: "stripe";
|
|
179
|
+
};
|
|
180
|
+
readonly type: "stripe.invoice.paymentFailed";
|
|
181
|
+
};
|
|
182
|
+
readonly stripeInvoiceVoided: {
|
|
183
|
+
readonly account: {
|
|
184
|
+
readonly connectionOptions: readonly [{
|
|
185
|
+
readonly connectionMethodId: "api-key";
|
|
186
|
+
readonly requiredScopes: readonly [];
|
|
187
|
+
}];
|
|
188
|
+
readonly serviceId: "stripe";
|
|
189
|
+
};
|
|
190
|
+
readonly type: "stripe.invoice.voided";
|
|
191
|
+
};
|
|
192
|
+
readonly stripePaymentIntentCanceled: {
|
|
193
|
+
readonly account: {
|
|
194
|
+
readonly connectionOptions: readonly [{
|
|
195
|
+
readonly connectionMethodId: "api-key";
|
|
196
|
+
readonly requiredScopes: readonly [];
|
|
197
|
+
}];
|
|
198
|
+
readonly serviceId: "stripe";
|
|
199
|
+
};
|
|
200
|
+
readonly type: "stripe.paymentIntent.canceled";
|
|
201
|
+
};
|
|
202
|
+
readonly stripePaymentIntentPaymentFailed: {
|
|
203
|
+
readonly account: {
|
|
204
|
+
readonly connectionOptions: readonly [{
|
|
205
|
+
readonly connectionMethodId: "api-key";
|
|
206
|
+
readonly requiredScopes: readonly [];
|
|
207
|
+
}];
|
|
208
|
+
readonly serviceId: "stripe";
|
|
209
|
+
};
|
|
210
|
+
readonly type: "stripe.paymentIntent.paymentFailed";
|
|
211
|
+
};
|
|
212
|
+
readonly stripePaymentIntentSucceeded: {
|
|
213
|
+
readonly account: {
|
|
214
|
+
readonly connectionOptions: readonly [{
|
|
215
|
+
readonly connectionMethodId: "api-key";
|
|
216
|
+
readonly requiredScopes: readonly [];
|
|
217
|
+
}];
|
|
218
|
+
readonly serviceId: "stripe";
|
|
219
|
+
};
|
|
220
|
+
readonly type: "stripe.paymentIntent.succeeded";
|
|
221
|
+
};
|
|
222
|
+
readonly stripePayoutFailed: {
|
|
223
|
+
readonly account: {
|
|
224
|
+
readonly connectionOptions: readonly [{
|
|
225
|
+
readonly connectionMethodId: "api-key";
|
|
226
|
+
readonly requiredScopes: readonly [];
|
|
227
|
+
}];
|
|
228
|
+
readonly serviceId: "stripe";
|
|
229
|
+
};
|
|
230
|
+
readonly type: "stripe.payout.failed";
|
|
231
|
+
};
|
|
232
|
+
readonly stripePayoutPaid: {
|
|
233
|
+
readonly account: {
|
|
234
|
+
readonly connectionOptions: readonly [{
|
|
235
|
+
readonly connectionMethodId: "api-key";
|
|
236
|
+
readonly requiredScopes: readonly [];
|
|
237
|
+
}];
|
|
238
|
+
readonly serviceId: "stripe";
|
|
239
|
+
};
|
|
240
|
+
readonly type: "stripe.payout.paid";
|
|
241
|
+
};
|
|
242
|
+
readonly stripeRefundCreated: {
|
|
243
|
+
readonly account: {
|
|
244
|
+
readonly connectionOptions: readonly [{
|
|
245
|
+
readonly connectionMethodId: "api-key";
|
|
246
|
+
readonly requiredScopes: readonly [];
|
|
247
|
+
}];
|
|
248
|
+
readonly serviceId: "stripe";
|
|
249
|
+
};
|
|
250
|
+
readonly type: "stripe.refund.created";
|
|
251
|
+
};
|
|
252
|
+
readonly stripeRefundFailed: {
|
|
253
|
+
readonly account: {
|
|
254
|
+
readonly connectionOptions: readonly [{
|
|
255
|
+
readonly connectionMethodId: "api-key";
|
|
256
|
+
readonly requiredScopes: readonly [];
|
|
257
|
+
}];
|
|
258
|
+
readonly serviceId: "stripe";
|
|
259
|
+
};
|
|
260
|
+
readonly type: "stripe.refund.failed";
|
|
261
|
+
};
|
|
262
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
const STRIPE_ACCOUNT = {
|
|
2
|
+
connectionOptions: [{ connectionMethodId: "api-key", requiredScopes: [] }],
|
|
3
|
+
serviceId: "stripe",
|
|
4
|
+
};
|
|
5
|
+
export const stripeTriggerDefinitions = {
|
|
6
|
+
stripeChargeDisputeClosed: {
|
|
7
|
+
account: STRIPE_ACCOUNT,
|
|
8
|
+
type: "stripe.charge.dispute.closed",
|
|
9
|
+
},
|
|
10
|
+
stripeChargeDisputeCreated: {
|
|
11
|
+
account: STRIPE_ACCOUNT,
|
|
12
|
+
type: "stripe.charge.dispute.created",
|
|
13
|
+
},
|
|
14
|
+
stripeCheckoutSessionCompleted: {
|
|
15
|
+
account: STRIPE_ACCOUNT,
|
|
16
|
+
type: "stripe.checkout.session.completed",
|
|
17
|
+
},
|
|
18
|
+
stripeCheckoutSessionAsyncPaymentFailed: {
|
|
19
|
+
account: STRIPE_ACCOUNT,
|
|
20
|
+
type: "stripe.checkout.session.asyncPaymentFailed",
|
|
21
|
+
},
|
|
22
|
+
stripeCheckoutSessionAsyncPaymentSucceeded: {
|
|
23
|
+
account: STRIPE_ACCOUNT,
|
|
24
|
+
type: "stripe.checkout.session.asyncPaymentSucceeded",
|
|
25
|
+
},
|
|
26
|
+
stripeCheckoutSessionExpired: {
|
|
27
|
+
account: STRIPE_ACCOUNT,
|
|
28
|
+
type: "stripe.checkout.session.expired",
|
|
29
|
+
},
|
|
30
|
+
stripeCustomerCreated: {
|
|
31
|
+
account: STRIPE_ACCOUNT,
|
|
32
|
+
type: "stripe.customer.created",
|
|
33
|
+
},
|
|
34
|
+
stripeCustomerDeleted: {
|
|
35
|
+
account: STRIPE_ACCOUNT,
|
|
36
|
+
type: "stripe.customer.deleted",
|
|
37
|
+
},
|
|
38
|
+
stripeCustomerSubscriptionCreated: {
|
|
39
|
+
account: STRIPE_ACCOUNT,
|
|
40
|
+
type: "stripe.customer.subscription.created",
|
|
41
|
+
},
|
|
42
|
+
stripeCustomerSubscriptionDeleted: {
|
|
43
|
+
account: STRIPE_ACCOUNT,
|
|
44
|
+
type: "stripe.customer.subscription.deleted",
|
|
45
|
+
},
|
|
46
|
+
stripeCustomerSubscriptionTrialWillEnd: {
|
|
47
|
+
account: STRIPE_ACCOUNT,
|
|
48
|
+
type: "stripe.customer.subscription.trialWillEnd",
|
|
49
|
+
},
|
|
50
|
+
stripeCustomerSubscriptionUpdated: {
|
|
51
|
+
account: STRIPE_ACCOUNT,
|
|
52
|
+
type: "stripe.customer.subscription.updated",
|
|
53
|
+
},
|
|
54
|
+
stripeCustomerUpdated: {
|
|
55
|
+
account: STRIPE_ACCOUNT,
|
|
56
|
+
type: "stripe.customer.updated",
|
|
57
|
+
},
|
|
58
|
+
stripeEvent: { account: STRIPE_ACCOUNT, type: "stripe.event" },
|
|
59
|
+
stripeInvoiceFinalized: {
|
|
60
|
+
account: STRIPE_ACCOUNT,
|
|
61
|
+
type: "stripe.invoice.finalized",
|
|
62
|
+
},
|
|
63
|
+
stripeInvoiceOverdue: {
|
|
64
|
+
account: STRIPE_ACCOUNT,
|
|
65
|
+
type: "stripe.invoice.overdue",
|
|
66
|
+
},
|
|
67
|
+
stripeInvoicePaid: {
|
|
68
|
+
account: STRIPE_ACCOUNT,
|
|
69
|
+
type: "stripe.invoice.paid",
|
|
70
|
+
},
|
|
71
|
+
stripeInvoicePaymentFailed: {
|
|
72
|
+
account: STRIPE_ACCOUNT,
|
|
73
|
+
type: "stripe.invoice.paymentFailed",
|
|
74
|
+
},
|
|
75
|
+
stripeInvoiceVoided: {
|
|
76
|
+
account: STRIPE_ACCOUNT,
|
|
77
|
+
type: "stripe.invoice.voided",
|
|
78
|
+
},
|
|
79
|
+
stripePaymentIntentCanceled: {
|
|
80
|
+
account: STRIPE_ACCOUNT,
|
|
81
|
+
type: "stripe.paymentIntent.canceled",
|
|
82
|
+
},
|
|
83
|
+
stripePaymentIntentPaymentFailed: {
|
|
84
|
+
account: STRIPE_ACCOUNT,
|
|
85
|
+
type: "stripe.paymentIntent.paymentFailed",
|
|
86
|
+
},
|
|
87
|
+
stripePaymentIntentSucceeded: {
|
|
88
|
+
account: STRIPE_ACCOUNT,
|
|
89
|
+
type: "stripe.paymentIntent.succeeded",
|
|
90
|
+
},
|
|
91
|
+
stripePayoutFailed: {
|
|
92
|
+
account: STRIPE_ACCOUNT,
|
|
93
|
+
type: "stripe.payout.failed",
|
|
94
|
+
},
|
|
95
|
+
stripePayoutPaid: {
|
|
96
|
+
account: STRIPE_ACCOUNT,
|
|
97
|
+
type: "stripe.payout.paid",
|
|
98
|
+
},
|
|
99
|
+
stripeRefundCreated: {
|
|
100
|
+
account: STRIPE_ACCOUNT,
|
|
101
|
+
type: "stripe.refund.created",
|
|
102
|
+
},
|
|
103
|
+
stripeRefundFailed: {
|
|
104
|
+
account: STRIPE_ACCOUNT,
|
|
105
|
+
type: "stripe.refund.failed",
|
|
106
|
+
},
|
|
107
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automate.ax/catalog",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.84.0",
|
|
4
4
|
"description": "Shared integration service and trigger definitions for Automate.ax.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"./triggers/name": "./src/triggers/name.ts",
|
|
37
37
|
"./triggers/resend": "./src/triggers/resend.ts",
|
|
38
38
|
"./triggers/slack": "./src/triggers/slack.ts",
|
|
39
|
+
"./triggers/stripe": "./src/triggers/stripe.ts",
|
|
39
40
|
"./triggers/trello": "./src/triggers/trello.ts",
|
|
40
41
|
"./triggers/vercel": "./src/triggers/vercel.ts",
|
|
41
42
|
"./triggers/whatsapp": "./src/triggers/whatsapp.ts"
|
|
@@ -167,6 +168,11 @@
|
|
|
167
168
|
"types": "./dist/triggers/slack.d.ts",
|
|
168
169
|
"default": "./dist/triggers/slack.js"
|
|
169
170
|
},
|
|
171
|
+
"./triggers/stripe": {
|
|
172
|
+
"bun": "./src/triggers/stripe.ts",
|
|
173
|
+
"types": "./dist/triggers/stripe.d.ts",
|
|
174
|
+
"default": "./dist/triggers/stripe.js"
|
|
175
|
+
},
|
|
170
176
|
"./triggers/trello": {
|
|
171
177
|
"bun": "./src/triggers/trello.ts",
|
|
172
178
|
"types": "./dist/triggers/trello.d.ts",
|
package/src/catalog.ts
CHANGED
|
@@ -361,6 +361,23 @@ export const slackService = defineIntegrationService({
|
|
|
361
361
|
name: "Slack",
|
|
362
362
|
})
|
|
363
363
|
|
|
364
|
+
export const stripeService = defineApiKeyService({
|
|
365
|
+
connectionNotice: {
|
|
366
|
+
action: {
|
|
367
|
+
href: "https://docs.stripe.com/keys#limit-access",
|
|
368
|
+
label: "Review permissions",
|
|
369
|
+
},
|
|
370
|
+
description:
|
|
371
|
+
"Restricted keys need read access to Account for connection checks. Managed triggers also need write access to Webhook Endpoints.",
|
|
372
|
+
title: "Stripe restricted-key permissions",
|
|
373
|
+
},
|
|
374
|
+
credentialUrl: "https://dashboard.stripe.com/apikeys",
|
|
375
|
+
description: "Connect a Stripe account with a secret or restricted API key.",
|
|
376
|
+
id: "stripe",
|
|
377
|
+
name: "Stripe",
|
|
378
|
+
placeholder: "sk_test_... or rk_test_...",
|
|
379
|
+
})
|
|
380
|
+
|
|
364
381
|
export const tidycalService = defineIntegrationService({
|
|
365
382
|
connectionMethods: [{ id: "oauth", name: "OAuth", type: "redirect" }],
|
|
366
383
|
description: "Connect a TidyCal account.",
|
|
@@ -460,6 +477,7 @@ export const integrationCatalog = defineIntegrationCatalog([
|
|
|
460
477
|
resendService,
|
|
461
478
|
scrapflyService,
|
|
462
479
|
slackService,
|
|
480
|
+
stripeService,
|
|
463
481
|
tidycalService,
|
|
464
482
|
togetheraiService,
|
|
465
483
|
trelloService,
|
|
@@ -482,7 +500,8 @@ export function getIntegrationService(
|
|
|
482
500
|
return integrationCatalog.find((service) => service.id === id)
|
|
483
501
|
}
|
|
484
502
|
|
|
485
|
-
interface ApiKeyServiceDefinition
|
|
503
|
+
interface ApiKeyServiceDefinition
|
|
504
|
+
extends Pick<IntegrationServiceDefinition, "connectionNotice"> {
|
|
486
505
|
credentialUrl?: string
|
|
487
506
|
description: string
|
|
488
507
|
icon?: string
|
|
@@ -515,6 +534,9 @@ function defineApiKeyService<const TId extends string>(
|
|
|
515
534
|
type: "form",
|
|
516
535
|
},
|
|
517
536
|
],
|
|
537
|
+
...(service.connectionNotice
|
|
538
|
+
? { connectionNotice: service.connectionNotice }
|
|
539
|
+
: {}),
|
|
518
540
|
description: service.description,
|
|
519
541
|
...(service.icon ? { icon: service.icon } : {}),
|
|
520
542
|
id: service.id,
|
package/src/index.ts
CHANGED
package/src/triggers/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ import { linearTriggerDefinitions } from "./linear"
|
|
|
9
9
|
import { microsoftTriggerDefinitions } from "./microsoft"
|
|
10
10
|
import { resendTriggerDefinitions } from "./resend"
|
|
11
11
|
import { slackTriggerDefinitions } from "./slack"
|
|
12
|
+
import { stripeTriggerDefinitions } from "./stripe"
|
|
12
13
|
import { trelloTriggerDefinitions } from "./trello"
|
|
13
14
|
import { vercelTriggerDefinitions } from "./vercel"
|
|
14
15
|
import { whatsappTriggerDefinitions } from "./whatsapp"
|
|
@@ -52,6 +53,7 @@ export const triggerDefinitions = {
|
|
|
52
53
|
...microsoftTriggerDefinitions,
|
|
53
54
|
...resendTriggerDefinitions,
|
|
54
55
|
...slackTriggerDefinitions,
|
|
56
|
+
...stripeTriggerDefinitions,
|
|
55
57
|
...trelloTriggerDefinitions,
|
|
56
58
|
...vercelTriggerDefinitions,
|
|
57
59
|
...whatsappTriggerDefinitions,
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { IntegrationAccountRequirement, TriggerDefinition } from "../types"
|
|
2
|
+
|
|
3
|
+
const STRIPE_ACCOUNT = {
|
|
4
|
+
connectionOptions: [{ connectionMethodId: "api-key", requiredScopes: [] }],
|
|
5
|
+
serviceId: "stripe",
|
|
6
|
+
} as const satisfies IntegrationAccountRequirement
|
|
7
|
+
|
|
8
|
+
export const stripeTriggerDefinitions = {
|
|
9
|
+
stripeChargeDisputeClosed: {
|
|
10
|
+
account: STRIPE_ACCOUNT,
|
|
11
|
+
type: "stripe.charge.dispute.closed",
|
|
12
|
+
},
|
|
13
|
+
stripeChargeDisputeCreated: {
|
|
14
|
+
account: STRIPE_ACCOUNT,
|
|
15
|
+
type: "stripe.charge.dispute.created",
|
|
16
|
+
},
|
|
17
|
+
stripeCheckoutSessionCompleted: {
|
|
18
|
+
account: STRIPE_ACCOUNT,
|
|
19
|
+
type: "stripe.checkout.session.completed",
|
|
20
|
+
},
|
|
21
|
+
stripeCheckoutSessionAsyncPaymentFailed: {
|
|
22
|
+
account: STRIPE_ACCOUNT,
|
|
23
|
+
type: "stripe.checkout.session.asyncPaymentFailed",
|
|
24
|
+
},
|
|
25
|
+
stripeCheckoutSessionAsyncPaymentSucceeded: {
|
|
26
|
+
account: STRIPE_ACCOUNT,
|
|
27
|
+
type: "stripe.checkout.session.asyncPaymentSucceeded",
|
|
28
|
+
},
|
|
29
|
+
stripeCheckoutSessionExpired: {
|
|
30
|
+
account: STRIPE_ACCOUNT,
|
|
31
|
+
type: "stripe.checkout.session.expired",
|
|
32
|
+
},
|
|
33
|
+
stripeCustomerCreated: {
|
|
34
|
+
account: STRIPE_ACCOUNT,
|
|
35
|
+
type: "stripe.customer.created",
|
|
36
|
+
},
|
|
37
|
+
stripeCustomerDeleted: {
|
|
38
|
+
account: STRIPE_ACCOUNT,
|
|
39
|
+
type: "stripe.customer.deleted",
|
|
40
|
+
},
|
|
41
|
+
stripeCustomerSubscriptionCreated: {
|
|
42
|
+
account: STRIPE_ACCOUNT,
|
|
43
|
+
type: "stripe.customer.subscription.created",
|
|
44
|
+
},
|
|
45
|
+
stripeCustomerSubscriptionDeleted: {
|
|
46
|
+
account: STRIPE_ACCOUNT,
|
|
47
|
+
type: "stripe.customer.subscription.deleted",
|
|
48
|
+
},
|
|
49
|
+
stripeCustomerSubscriptionTrialWillEnd: {
|
|
50
|
+
account: STRIPE_ACCOUNT,
|
|
51
|
+
type: "stripe.customer.subscription.trialWillEnd",
|
|
52
|
+
},
|
|
53
|
+
stripeCustomerSubscriptionUpdated: {
|
|
54
|
+
account: STRIPE_ACCOUNT,
|
|
55
|
+
type: "stripe.customer.subscription.updated",
|
|
56
|
+
},
|
|
57
|
+
stripeCustomerUpdated: {
|
|
58
|
+
account: STRIPE_ACCOUNT,
|
|
59
|
+
type: "stripe.customer.updated",
|
|
60
|
+
},
|
|
61
|
+
stripeEvent: { account: STRIPE_ACCOUNT, type: "stripe.event" },
|
|
62
|
+
stripeInvoiceFinalized: {
|
|
63
|
+
account: STRIPE_ACCOUNT,
|
|
64
|
+
type: "stripe.invoice.finalized",
|
|
65
|
+
},
|
|
66
|
+
stripeInvoiceOverdue: {
|
|
67
|
+
account: STRIPE_ACCOUNT,
|
|
68
|
+
type: "stripe.invoice.overdue",
|
|
69
|
+
},
|
|
70
|
+
stripeInvoicePaid: {
|
|
71
|
+
account: STRIPE_ACCOUNT,
|
|
72
|
+
type: "stripe.invoice.paid",
|
|
73
|
+
},
|
|
74
|
+
stripeInvoicePaymentFailed: {
|
|
75
|
+
account: STRIPE_ACCOUNT,
|
|
76
|
+
type: "stripe.invoice.paymentFailed",
|
|
77
|
+
},
|
|
78
|
+
stripeInvoiceVoided: {
|
|
79
|
+
account: STRIPE_ACCOUNT,
|
|
80
|
+
type: "stripe.invoice.voided",
|
|
81
|
+
},
|
|
82
|
+
stripePaymentIntentCanceled: {
|
|
83
|
+
account: STRIPE_ACCOUNT,
|
|
84
|
+
type: "stripe.paymentIntent.canceled",
|
|
85
|
+
},
|
|
86
|
+
stripePaymentIntentPaymentFailed: {
|
|
87
|
+
account: STRIPE_ACCOUNT,
|
|
88
|
+
type: "stripe.paymentIntent.paymentFailed",
|
|
89
|
+
},
|
|
90
|
+
stripePaymentIntentSucceeded: {
|
|
91
|
+
account: STRIPE_ACCOUNT,
|
|
92
|
+
type: "stripe.paymentIntent.succeeded",
|
|
93
|
+
},
|
|
94
|
+
stripePayoutFailed: {
|
|
95
|
+
account: STRIPE_ACCOUNT,
|
|
96
|
+
type: "stripe.payout.failed",
|
|
97
|
+
},
|
|
98
|
+
stripePayoutPaid: {
|
|
99
|
+
account: STRIPE_ACCOUNT,
|
|
100
|
+
type: "stripe.payout.paid",
|
|
101
|
+
},
|
|
102
|
+
stripeRefundCreated: {
|
|
103
|
+
account: STRIPE_ACCOUNT,
|
|
104
|
+
type: "stripe.refund.created",
|
|
105
|
+
},
|
|
106
|
+
stripeRefundFailed: {
|
|
107
|
+
account: STRIPE_ACCOUNT,
|
|
108
|
+
type: "stripe.refund.failed",
|
|
109
|
+
},
|
|
110
|
+
} as const satisfies Record<string, TriggerDefinition>
|