@automate.ax/catalog 0.83.3 → 0.85.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.
@@ -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>
@@ -0,0 +1,92 @@
1
+ import type { IntegrationAccountRequirement, TriggerDefinition } from "../types"
2
+
3
+ const WEBFLOW_SITE_READ_ACCOUNT = webflowAccount(["sites:read"])
4
+
5
+ export const webflowTriggerDefinitions = {
6
+ webflowCollectionItemChanged: {
7
+ account: webflowAccount(["cms:read"]),
8
+ type: "webflow.collectionItem.changed",
9
+ },
10
+ webflowCollectionItemCreated: {
11
+ account: webflowAccount(["cms:read"]),
12
+ type: "webflow.collectionItem.created",
13
+ },
14
+ webflowCollectionItemDeleted: {
15
+ account: webflowAccount(["cms:read"]),
16
+ type: "webflow.collectionItem.deleted",
17
+ },
18
+ webflowCollectionItemPublished: {
19
+ account: webflowAccount(["cms:read"]),
20
+ type: "webflow.collectionItem.published",
21
+ },
22
+ webflowCollectionItemUnpublished: {
23
+ account: webflowAccount(["cms:read"]),
24
+ type: "webflow.collectionItem.unpublished",
25
+ },
26
+ webflowCommentCreated: {
27
+ account: webflowAccount(["comments:read"]),
28
+ type: "webflow.comment.created",
29
+ },
30
+ webflowEvent: {
31
+ account: webflowAccount([
32
+ "cms:read",
33
+ "comments:read",
34
+ "ecommerce:read",
35
+ "forms:read",
36
+ "pages:read",
37
+ "sites:read",
38
+ ]),
39
+ type: "webflow.event",
40
+ },
41
+ webflowFormSubmitted: {
42
+ account: webflowAccount(["forms:read"]),
43
+ type: "webflow.form.submitted",
44
+ },
45
+ webflowInventoryChanged: {
46
+ account: webflowAccount(["ecommerce:read"]),
47
+ type: "webflow.inventory.changed",
48
+ },
49
+ webflowOrderChanged: {
50
+ account: webflowAccount(["ecommerce:read"]),
51
+ type: "webflow.order.changed",
52
+ },
53
+ webflowOrderCreated: {
54
+ account: webflowAccount(["ecommerce:read"]),
55
+ type: "webflow.order.created",
56
+ },
57
+ webflowPageCreated: {
58
+ account: webflowAccount(["pages:read"]),
59
+ type: "webflow.page.created",
60
+ },
61
+ webflowPageDeleted: {
62
+ account: webflowAccount(["pages:read"]),
63
+ type: "webflow.page.deleted",
64
+ },
65
+ webflowPageMetadataUpdated: {
66
+ account: webflowAccount(["pages:read"]),
67
+ type: "webflow.page.metadataUpdated",
68
+ },
69
+ webflowSitePublished: {
70
+ account: WEBFLOW_SITE_READ_ACCOUNT,
71
+ type: "webflow.site.published",
72
+ },
73
+ } as const satisfies Record<string, TriggerDefinition>
74
+
75
+ /**
76
+ * Requires webhook management plus the scopes needed for delivered events.
77
+ *
78
+ * @param eventScopes - Read scopes required by the selected provider events.
79
+ */
80
+ function webflowAccount(
81
+ eventScopes: readonly string[],
82
+ ): IntegrationAccountRequirement<"webflow"> {
83
+ return {
84
+ connectionOptions: [
85
+ {
86
+ connectionMethodId: "oauth",
87
+ requiredScopes: ["sites:write", ...eventScopes],
88
+ },
89
+ ],
90
+ serviceId: "webflow",
91
+ }
92
+ }