@automate.ax/catalog 0.157.0 → 0.159.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 +19 -0
- package/dist/catalog.js +7 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/triggers/index.d.ts +1072 -0
- package/dist/triggers/index.js +2 -0
- package/dist/triggers/square.d.ts +539 -0
- package/dist/triggers/square.js +576 -0
- package/package.json +7 -1
- package/src/catalog.ts +8 -0
- package/src/index.ts +1 -0
- package/src/triggers/index.ts +2 -0
- package/src/triggers/square.ts +585 -0
|
@@ -0,0 +1,585 @@
|
|
|
1
|
+
import {
|
|
2
|
+
integrationScope,
|
|
3
|
+
type IntegrationAccountRequirement,
|
|
4
|
+
type TriggerDefinition,
|
|
5
|
+
} from "../types"
|
|
6
|
+
|
|
7
|
+
export const squareTriggerDefinitions = {
|
|
8
|
+
squareBankAccountCreated: {
|
|
9
|
+
account: squareAccount(["BANK_ACCOUNTS_READ"]),
|
|
10
|
+
type: "square.bankAccount.created",
|
|
11
|
+
},
|
|
12
|
+
squareBankAccountDisabled: {
|
|
13
|
+
account: squareAccount(["BANK_ACCOUNTS_READ"]),
|
|
14
|
+
type: "square.bankAccount.disabled",
|
|
15
|
+
},
|
|
16
|
+
squareBankAccountVerified: {
|
|
17
|
+
account: squareAccount(["BANK_ACCOUNTS_READ"]),
|
|
18
|
+
type: "square.bankAccount.verified",
|
|
19
|
+
},
|
|
20
|
+
squareBookingCreated: {
|
|
21
|
+
account: squareAccount(["APPOINTMENTS_READ"]),
|
|
22
|
+
type: "square.booking.created",
|
|
23
|
+
},
|
|
24
|
+
squareBookingCustomAttributeDefinitionOwnedCreated: {
|
|
25
|
+
account: squareAccount([]),
|
|
26
|
+
type: "square.booking.customAttributeDefinition.owned.created",
|
|
27
|
+
},
|
|
28
|
+
squareBookingCustomAttributeDefinitionOwnedDeleted: {
|
|
29
|
+
account: squareAccount([]),
|
|
30
|
+
type: "square.booking.customAttributeDefinition.owned.deleted",
|
|
31
|
+
},
|
|
32
|
+
squareBookingCustomAttributeDefinitionOwnedUpdated: {
|
|
33
|
+
account: squareAccount([]),
|
|
34
|
+
type: "square.booking.customAttributeDefinition.owned.updated",
|
|
35
|
+
},
|
|
36
|
+
squareBookingCustomAttributeDefinitionVisibleCreated: {
|
|
37
|
+
account: squareAccount([]),
|
|
38
|
+
type: "square.booking.customAttributeDefinition.visible.created",
|
|
39
|
+
},
|
|
40
|
+
squareBookingCustomAttributeDefinitionVisibleDeleted: {
|
|
41
|
+
account: squareAccount([]),
|
|
42
|
+
type: "square.booking.customAttributeDefinition.visible.deleted",
|
|
43
|
+
},
|
|
44
|
+
squareBookingCustomAttributeDefinitionVisibleUpdated: {
|
|
45
|
+
account: squareAccount([]),
|
|
46
|
+
type: "square.booking.customAttributeDefinition.visible.updated",
|
|
47
|
+
},
|
|
48
|
+
squareBookingCustomAttributeOwnedDeleted: {
|
|
49
|
+
account: squareAccount([]),
|
|
50
|
+
type: "square.booking.customAttribute.owned.deleted",
|
|
51
|
+
},
|
|
52
|
+
squareBookingCustomAttributeOwnedUpdated: {
|
|
53
|
+
account: squareAccount([]),
|
|
54
|
+
type: "square.booking.customAttribute.owned.updated",
|
|
55
|
+
},
|
|
56
|
+
squareBookingCustomAttributeVisibleDeleted: {
|
|
57
|
+
account: squareAccount([]),
|
|
58
|
+
type: "square.booking.customAttribute.visible.deleted",
|
|
59
|
+
},
|
|
60
|
+
squareBookingCustomAttributeVisibleUpdated: {
|
|
61
|
+
account: squareAccount([]),
|
|
62
|
+
type: "square.booking.customAttribute.visible.updated",
|
|
63
|
+
},
|
|
64
|
+
squareBookingUpdated: {
|
|
65
|
+
account: squareAccount(["APPOINTMENTS_READ"]),
|
|
66
|
+
type: "square.booking.updated",
|
|
67
|
+
},
|
|
68
|
+
squareCardAutomaticallyUpdated: {
|
|
69
|
+
account: squareAccount(["PAYMENTS_READ"]),
|
|
70
|
+
type: "square.card.automaticallyUpdated",
|
|
71
|
+
},
|
|
72
|
+
squareCardCreated: {
|
|
73
|
+
account: squareAccount(["PAYMENTS_READ"]),
|
|
74
|
+
type: "square.card.created",
|
|
75
|
+
},
|
|
76
|
+
squareCardDisabled: {
|
|
77
|
+
account: squareAccount(["PAYMENTS_READ"]),
|
|
78
|
+
type: "square.card.disabled",
|
|
79
|
+
},
|
|
80
|
+
squareCardForgotten: {
|
|
81
|
+
account: squareAccount(["PAYMENTS_READ"]),
|
|
82
|
+
type: "square.card.forgotten",
|
|
83
|
+
},
|
|
84
|
+
squareCardUpdated: {
|
|
85
|
+
account: squareAccount(["PAYMENTS_READ"]),
|
|
86
|
+
type: "square.card.updated",
|
|
87
|
+
},
|
|
88
|
+
squareCatalogVersionUpdated: {
|
|
89
|
+
account: squareAccount(["ITEMS_READ"]),
|
|
90
|
+
type: "square.catalog.version.updated",
|
|
91
|
+
},
|
|
92
|
+
squareCustomerCreated: {
|
|
93
|
+
account: squareAccount(["CUSTOMERS_READ"]),
|
|
94
|
+
type: "square.customer.created",
|
|
95
|
+
},
|
|
96
|
+
squareCustomerCustomAttributeDefinitionOwnedCreated: {
|
|
97
|
+
account: squareAccount(["CUSTOMERS_READ"]),
|
|
98
|
+
type: "square.customer.customAttributeDefinition.owned.created",
|
|
99
|
+
},
|
|
100
|
+
squareCustomerCustomAttributeDefinitionOwnedDeleted: {
|
|
101
|
+
account: squareAccount(["CUSTOMERS_READ"]),
|
|
102
|
+
type: "square.customer.customAttributeDefinition.owned.deleted",
|
|
103
|
+
},
|
|
104
|
+
squareCustomerCustomAttributeDefinitionOwnedUpdated: {
|
|
105
|
+
account: squareAccount(["CUSTOMERS_READ"]),
|
|
106
|
+
type: "square.customer.customAttributeDefinition.owned.updated",
|
|
107
|
+
},
|
|
108
|
+
squareCustomerCustomAttributeDefinitionVisibleCreated: {
|
|
109
|
+
account: squareAccount(["CUSTOMERS_READ"]),
|
|
110
|
+
type: "square.customer.customAttributeDefinition.visible.created",
|
|
111
|
+
},
|
|
112
|
+
squareCustomerCustomAttributeDefinitionVisibleDeleted: {
|
|
113
|
+
account: squareAccount(["CUSTOMERS_READ"]),
|
|
114
|
+
type: "square.customer.customAttributeDefinition.visible.deleted",
|
|
115
|
+
},
|
|
116
|
+
squareCustomerCustomAttributeDefinitionVisibleUpdated: {
|
|
117
|
+
account: squareAccount(["CUSTOMERS_READ"]),
|
|
118
|
+
type: "square.customer.customAttributeDefinition.visible.updated",
|
|
119
|
+
},
|
|
120
|
+
squareCustomerCustomAttributeOwnedDeleted: {
|
|
121
|
+
account: squareAccount(["CUSTOMERS_READ"]),
|
|
122
|
+
type: "square.customer.customAttribute.owned.deleted",
|
|
123
|
+
},
|
|
124
|
+
squareCustomerCustomAttributeOwnedUpdated: {
|
|
125
|
+
account: squareAccount(["CUSTOMERS_READ"]),
|
|
126
|
+
type: "square.customer.customAttribute.owned.updated",
|
|
127
|
+
},
|
|
128
|
+
squareCustomerCustomAttributeVisibleDeleted: {
|
|
129
|
+
account: squareAccount(["CUSTOMERS_READ"]),
|
|
130
|
+
type: "square.customer.customAttribute.visible.deleted",
|
|
131
|
+
},
|
|
132
|
+
squareCustomerCustomAttributeVisibleUpdated: {
|
|
133
|
+
account: squareAccount(["CUSTOMERS_READ"]),
|
|
134
|
+
type: "square.customer.customAttribute.visible.updated",
|
|
135
|
+
},
|
|
136
|
+
squareCustomerDeleted: {
|
|
137
|
+
account: squareAccount(["CUSTOMERS_READ"]),
|
|
138
|
+
type: "square.customer.deleted",
|
|
139
|
+
},
|
|
140
|
+
squareCustomerUpdated: {
|
|
141
|
+
account: squareAccount(["CUSTOMERS_READ"]),
|
|
142
|
+
type: "square.customer.updated",
|
|
143
|
+
},
|
|
144
|
+
squareDeviceCodePaired: {
|
|
145
|
+
account: squareAccount(["DEVICE_CREDENTIAL_MANAGEMENT"]),
|
|
146
|
+
type: "square.device.code.paired",
|
|
147
|
+
},
|
|
148
|
+
squareDeviceCreated: {
|
|
149
|
+
account: squareAccount(["DEVICES_READ"]),
|
|
150
|
+
type: "square.device.created",
|
|
151
|
+
},
|
|
152
|
+
squareDisputeCreated: {
|
|
153
|
+
account: squareAccount(["PAYMENTS_READ"]),
|
|
154
|
+
type: "square.dispute.created",
|
|
155
|
+
},
|
|
156
|
+
squareDisputeEvidenceCreated: {
|
|
157
|
+
account: squareAccount(["PAYMENTS_READ"]),
|
|
158
|
+
type: "square.dispute.evidence.created",
|
|
159
|
+
},
|
|
160
|
+
squareDisputeEvidenceDeleted: {
|
|
161
|
+
account: squareAccount(["PAYMENTS_READ"]),
|
|
162
|
+
type: "square.dispute.evidence.deleted",
|
|
163
|
+
},
|
|
164
|
+
squareDisputeStateUpdated: {
|
|
165
|
+
account: squareAccount(["PAYMENTS_READ"]),
|
|
166
|
+
type: "square.dispute.state.updated",
|
|
167
|
+
},
|
|
168
|
+
squareGiftCardActivityCreated: {
|
|
169
|
+
account: squareAccount(["GIFTCARDS_READ"]),
|
|
170
|
+
type: "square.giftCard.activity.created",
|
|
171
|
+
},
|
|
172
|
+
squareGiftCardActivityUpdated: {
|
|
173
|
+
account: squareAccount(["GIFTCARDS_READ"]),
|
|
174
|
+
type: "square.giftCard.activity.updated",
|
|
175
|
+
},
|
|
176
|
+
squareGiftCardCreated: {
|
|
177
|
+
account: squareAccount(["GIFTCARDS_READ"]),
|
|
178
|
+
type: "square.giftCard.created",
|
|
179
|
+
},
|
|
180
|
+
squareGiftCardCustomerLinked: {
|
|
181
|
+
account: squareAccount(["GIFTCARDS_READ"]),
|
|
182
|
+
type: "square.giftCard.customerLinked",
|
|
183
|
+
},
|
|
184
|
+
squareGiftCardCustomerUnlinked: {
|
|
185
|
+
account: squareAccount(["GIFTCARDS_READ"]),
|
|
186
|
+
type: "square.giftCard.customerUnlinked",
|
|
187
|
+
},
|
|
188
|
+
squareGiftCardUpdated: {
|
|
189
|
+
account: squareAccount(["GIFTCARDS_READ"]),
|
|
190
|
+
type: "square.giftCard.updated",
|
|
191
|
+
},
|
|
192
|
+
squareInventoryCountUpdated: {
|
|
193
|
+
account: squareAccount(["INVENTORY_READ"]),
|
|
194
|
+
type: "square.inventory.count.updated",
|
|
195
|
+
},
|
|
196
|
+
squareInvoiceCanceled: {
|
|
197
|
+
account: squareAccount(["INVOICES_READ"]),
|
|
198
|
+
type: "square.invoice.canceled",
|
|
199
|
+
},
|
|
200
|
+
squareInvoiceCreated: {
|
|
201
|
+
account: squareAccount(["INVOICES_READ"]),
|
|
202
|
+
type: "square.invoice.created",
|
|
203
|
+
},
|
|
204
|
+
squareInvoiceDeleted: {
|
|
205
|
+
account: squareAccount(["INVOICES_READ"]),
|
|
206
|
+
type: "square.invoice.deleted",
|
|
207
|
+
},
|
|
208
|
+
squareInvoicePaymentMade: {
|
|
209
|
+
account: squareAccount(["INVOICES_READ"]),
|
|
210
|
+
type: "square.invoice.paymentMade",
|
|
211
|
+
},
|
|
212
|
+
squareInvoicePublished: {
|
|
213
|
+
account: squareAccount(["INVOICES_READ"]),
|
|
214
|
+
type: "square.invoice.published",
|
|
215
|
+
},
|
|
216
|
+
squareInvoiceRefunded: {
|
|
217
|
+
account: squareAccount(["INVOICES_READ"]),
|
|
218
|
+
type: "square.invoice.refunded",
|
|
219
|
+
},
|
|
220
|
+
squareInvoiceScheduledChargeFailed: {
|
|
221
|
+
account: squareAccount(["INVOICES_READ"]),
|
|
222
|
+
type: "square.invoice.scheduledChargeFailed",
|
|
223
|
+
},
|
|
224
|
+
squareInvoiceUpdated: {
|
|
225
|
+
account: squareAccount(["INVOICES_READ"]),
|
|
226
|
+
type: "square.invoice.updated",
|
|
227
|
+
},
|
|
228
|
+
squareJobCreated: {
|
|
229
|
+
account: squareAccount(["EMPLOYEES_READ"]),
|
|
230
|
+
type: "square.job.created",
|
|
231
|
+
},
|
|
232
|
+
squareJobUpdated: {
|
|
233
|
+
account: squareAccount(["EMPLOYEES_READ"]),
|
|
234
|
+
type: "square.job.updated",
|
|
235
|
+
},
|
|
236
|
+
squareLaborScheduledShiftCreated: {
|
|
237
|
+
account: squareAccount(["TIMECARDS_READ"]),
|
|
238
|
+
type: "square.labor.scheduledShift.created",
|
|
239
|
+
},
|
|
240
|
+
squareLaborScheduledShiftDeleted: {
|
|
241
|
+
account: squareAccount(["TIMECARDS_READ"]),
|
|
242
|
+
type: "square.labor.scheduledShift.deleted",
|
|
243
|
+
},
|
|
244
|
+
squareLaborScheduledShiftPublished: {
|
|
245
|
+
account: squareAccount(["TIMECARDS_READ"]),
|
|
246
|
+
type: "square.labor.scheduledShift.published",
|
|
247
|
+
},
|
|
248
|
+
squareLaborScheduledShiftUpdated: {
|
|
249
|
+
account: squareAccount(["TIMECARDS_READ"]),
|
|
250
|
+
type: "square.labor.scheduledShift.updated",
|
|
251
|
+
},
|
|
252
|
+
squareLaborTimecardCreated: {
|
|
253
|
+
account: squareAccount(["TIMECARDS_READ"]),
|
|
254
|
+
type: "square.labor.timecard.created",
|
|
255
|
+
},
|
|
256
|
+
squareLaborTimecardDeleted: {
|
|
257
|
+
account: squareAccount(["TIMECARDS_READ"]),
|
|
258
|
+
type: "square.labor.timecard.deleted",
|
|
259
|
+
},
|
|
260
|
+
squareLaborTimecardUpdated: {
|
|
261
|
+
account: squareAccount(["TIMECARDS_READ"]),
|
|
262
|
+
type: "square.labor.timecard.updated",
|
|
263
|
+
},
|
|
264
|
+
squareLocationCreated: {
|
|
265
|
+
account: squareAccount(["MERCHANT_PROFILE_READ"]),
|
|
266
|
+
type: "square.location.created",
|
|
267
|
+
},
|
|
268
|
+
squareLocationCustomAttributeDefinitionOwnedCreated: {
|
|
269
|
+
account: squareAccount(["MERCHANT_PROFILE_READ"]),
|
|
270
|
+
type: "square.location.customAttributeDefinition.owned.created",
|
|
271
|
+
},
|
|
272
|
+
squareLocationCustomAttributeDefinitionOwnedDeleted: {
|
|
273
|
+
account: squareAccount(["MERCHANT_PROFILE_READ"]),
|
|
274
|
+
type: "square.location.customAttributeDefinition.owned.deleted",
|
|
275
|
+
},
|
|
276
|
+
squareLocationCustomAttributeDefinitionOwnedUpdated: {
|
|
277
|
+
account: squareAccount(["MERCHANT_PROFILE_READ"]),
|
|
278
|
+
type: "square.location.customAttributeDefinition.owned.updated",
|
|
279
|
+
},
|
|
280
|
+
squareLocationCustomAttributeDefinitionVisibleCreated: {
|
|
281
|
+
account: squareAccount(["MERCHANT_PROFILE_READ"]),
|
|
282
|
+
type: "square.location.customAttributeDefinition.visible.created",
|
|
283
|
+
},
|
|
284
|
+
squareLocationCustomAttributeDefinitionVisibleDeleted: {
|
|
285
|
+
account: squareAccount(["MERCHANT_PROFILE_READ"]),
|
|
286
|
+
type: "square.location.customAttributeDefinition.visible.deleted",
|
|
287
|
+
},
|
|
288
|
+
squareLocationCustomAttributeDefinitionVisibleUpdated: {
|
|
289
|
+
account: squareAccount(["MERCHANT_PROFILE_READ"]),
|
|
290
|
+
type: "square.location.customAttributeDefinition.visible.updated",
|
|
291
|
+
},
|
|
292
|
+
squareLocationCustomAttributeOwnedDeleted: {
|
|
293
|
+
account: squareAccount(["MERCHANT_PROFILE_READ"]),
|
|
294
|
+
type: "square.location.customAttribute.owned.deleted",
|
|
295
|
+
},
|
|
296
|
+
squareLocationCustomAttributeOwnedUpdated: {
|
|
297
|
+
account: squareAccount(["MERCHANT_PROFILE_READ"]),
|
|
298
|
+
type: "square.location.customAttribute.owned.updated",
|
|
299
|
+
},
|
|
300
|
+
squareLocationCustomAttributeVisibleDeleted: {
|
|
301
|
+
account: squareAccount(["MERCHANT_PROFILE_READ"]),
|
|
302
|
+
type: "square.location.customAttribute.visible.deleted",
|
|
303
|
+
},
|
|
304
|
+
squareLocationCustomAttributeVisibleUpdated: {
|
|
305
|
+
account: squareAccount(["MERCHANT_PROFILE_READ"]),
|
|
306
|
+
type: "square.location.customAttribute.visible.updated",
|
|
307
|
+
},
|
|
308
|
+
squareLocationUpdated: {
|
|
309
|
+
account: squareAccount(["MERCHANT_PROFILE_READ"]),
|
|
310
|
+
type: "square.location.updated",
|
|
311
|
+
},
|
|
312
|
+
squareLoyaltyAccountCreated: {
|
|
313
|
+
account: squareAccount(["LOYALTY_READ"]),
|
|
314
|
+
type: "square.loyalty.account.created",
|
|
315
|
+
},
|
|
316
|
+
squareLoyaltyAccountDeleted: {
|
|
317
|
+
account: squareAccount(["LOYALTY_READ"]),
|
|
318
|
+
type: "square.loyalty.account.deleted",
|
|
319
|
+
},
|
|
320
|
+
squareLoyaltyAccountUpdated: {
|
|
321
|
+
account: squareAccount(["LOYALTY_READ"]),
|
|
322
|
+
type: "square.loyalty.account.updated",
|
|
323
|
+
},
|
|
324
|
+
squareLoyaltyEventCreated: {
|
|
325
|
+
account: squareAccount(["LOYALTY_READ"]),
|
|
326
|
+
type: "square.loyalty.event.created",
|
|
327
|
+
},
|
|
328
|
+
squareLoyaltyProgramCreated: {
|
|
329
|
+
account: squareAccount(["LOYALTY_READ"]),
|
|
330
|
+
type: "square.loyalty.program.created",
|
|
331
|
+
},
|
|
332
|
+
squareLoyaltyProgramUpdated: {
|
|
333
|
+
account: squareAccount(["LOYALTY_READ"]),
|
|
334
|
+
type: "square.loyalty.program.updated",
|
|
335
|
+
},
|
|
336
|
+
squareLoyaltyPromotionCreated: {
|
|
337
|
+
account: squareAccount(["LOYALTY_READ"]),
|
|
338
|
+
type: "square.loyalty.promotion.created",
|
|
339
|
+
},
|
|
340
|
+
squareLoyaltyPromotionUpdated: {
|
|
341
|
+
account: squareAccount(["LOYALTY_READ"]),
|
|
342
|
+
type: "square.loyalty.promotion.updated",
|
|
343
|
+
},
|
|
344
|
+
squareMerchantCustomAttributeDefinitionOwnedCreated: {
|
|
345
|
+
account: squareAccount(["MERCHANT_PROFILE_READ"]),
|
|
346
|
+
type: "square.merchant.customAttributeDefinition.owned.created",
|
|
347
|
+
},
|
|
348
|
+
squareMerchantCustomAttributeDefinitionOwnedDeleted: {
|
|
349
|
+
account: squareAccount(["MERCHANT_PROFILE_READ"]),
|
|
350
|
+
type: "square.merchant.customAttributeDefinition.owned.deleted",
|
|
351
|
+
},
|
|
352
|
+
squareMerchantCustomAttributeDefinitionOwnedUpdated: {
|
|
353
|
+
account: squareAccount(["MERCHANT_PROFILE_READ"]),
|
|
354
|
+
type: "square.merchant.customAttributeDefinition.owned.updated",
|
|
355
|
+
},
|
|
356
|
+
squareMerchantCustomAttributeDefinitionVisibleCreated: {
|
|
357
|
+
account: squareAccount(["MERCHANT_PROFILE_READ"]),
|
|
358
|
+
type: "square.merchant.customAttributeDefinition.visible.created",
|
|
359
|
+
},
|
|
360
|
+
squareMerchantCustomAttributeDefinitionVisibleDeleted: {
|
|
361
|
+
account: squareAccount(["MERCHANT_PROFILE_READ"]),
|
|
362
|
+
type: "square.merchant.customAttributeDefinition.visible.deleted",
|
|
363
|
+
},
|
|
364
|
+
squareMerchantCustomAttributeDefinitionVisibleUpdated: {
|
|
365
|
+
account: squareAccount(["MERCHANT_PROFILE_READ"]),
|
|
366
|
+
type: "square.merchant.customAttributeDefinition.visible.updated",
|
|
367
|
+
},
|
|
368
|
+
squareMerchantCustomAttributeOwnedDeleted: {
|
|
369
|
+
account: squareAccount(["MERCHANT_PROFILE_READ"]),
|
|
370
|
+
type: "square.merchant.customAttribute.owned.deleted",
|
|
371
|
+
},
|
|
372
|
+
squareMerchantCustomAttributeOwnedUpdated: {
|
|
373
|
+
account: squareAccount(["MERCHANT_PROFILE_READ"]),
|
|
374
|
+
type: "square.merchant.customAttribute.owned.updated",
|
|
375
|
+
},
|
|
376
|
+
squareMerchantCustomAttributeVisibleDeleted: {
|
|
377
|
+
account: squareAccount(["MERCHANT_PROFILE_READ"]),
|
|
378
|
+
type: "square.merchant.customAttribute.visible.deleted",
|
|
379
|
+
},
|
|
380
|
+
squareMerchantCustomAttributeVisibleUpdated: {
|
|
381
|
+
account: squareAccount(["MERCHANT_PROFILE_READ"]),
|
|
382
|
+
type: "square.merchant.customAttribute.visible.updated",
|
|
383
|
+
},
|
|
384
|
+
squareOauthAuthorizationRevoked: {
|
|
385
|
+
account: squareAccount([]),
|
|
386
|
+
type: "square.oauth.authorization.revoked",
|
|
387
|
+
},
|
|
388
|
+
squareOnlineCheckoutLocationSettingsUpdated: {
|
|
389
|
+
account: squareAccount(["MERCHANT_PROFILE_WRITE", "MERCHANT_PROFILE_READ"]),
|
|
390
|
+
type: "square.onlineCheckout.locationSettings.updated",
|
|
391
|
+
},
|
|
392
|
+
squareOnlineCheckoutMerchantSettingsUpdated: {
|
|
393
|
+
account: squareAccount(["MERCHANT_PROFILE_WRITE", "MERCHANT_PROFILE_READ"]),
|
|
394
|
+
type: "square.onlineCheckout.merchantSettings.updated",
|
|
395
|
+
},
|
|
396
|
+
squareOrderCreated: {
|
|
397
|
+
account: squareAccount(["ORDERS_READ"]),
|
|
398
|
+
type: "square.order.created",
|
|
399
|
+
},
|
|
400
|
+
squareOrderCustomAttributeDefinitionOwnedCreated: {
|
|
401
|
+
account: squareAccount(["ORDERS_READ"]),
|
|
402
|
+
type: "square.order.customAttributeDefinition.owned.created",
|
|
403
|
+
},
|
|
404
|
+
squareOrderCustomAttributeDefinitionOwnedDeleted: {
|
|
405
|
+
account: squareAccount(["ORDERS_READ"]),
|
|
406
|
+
type: "square.order.customAttributeDefinition.owned.deleted",
|
|
407
|
+
},
|
|
408
|
+
squareOrderCustomAttributeDefinitionOwnedUpdated: {
|
|
409
|
+
account: squareAccount(["ORDERS_READ"]),
|
|
410
|
+
type: "square.order.customAttributeDefinition.owned.updated",
|
|
411
|
+
},
|
|
412
|
+
squareOrderCustomAttributeDefinitionVisibleCreated: {
|
|
413
|
+
account: squareAccount(["ORDERS_READ"]),
|
|
414
|
+
type: "square.order.customAttributeDefinition.visible.created",
|
|
415
|
+
},
|
|
416
|
+
squareOrderCustomAttributeDefinitionVisibleDeleted: {
|
|
417
|
+
account: squareAccount(["ORDERS_READ"]),
|
|
418
|
+
type: "square.order.customAttributeDefinition.visible.deleted",
|
|
419
|
+
},
|
|
420
|
+
squareOrderCustomAttributeDefinitionVisibleUpdated: {
|
|
421
|
+
account: squareAccount(["ORDERS_READ"]),
|
|
422
|
+
type: "square.order.customAttributeDefinition.visible.updated",
|
|
423
|
+
},
|
|
424
|
+
squareOrderCustomAttributeOwnedDeleted: {
|
|
425
|
+
account: squareAccount(["ORDERS_READ"]),
|
|
426
|
+
type: "square.order.customAttribute.owned.deleted",
|
|
427
|
+
},
|
|
428
|
+
squareOrderCustomAttributeOwnedUpdated: {
|
|
429
|
+
account: squareAccount(["ORDERS_READ"]),
|
|
430
|
+
type: "square.order.customAttribute.owned.updated",
|
|
431
|
+
},
|
|
432
|
+
squareOrderCustomAttributeVisibleDeleted: {
|
|
433
|
+
account: squareAccount(["ORDERS_READ"]),
|
|
434
|
+
type: "square.order.customAttribute.visible.deleted",
|
|
435
|
+
},
|
|
436
|
+
squareOrderCustomAttributeVisibleUpdated: {
|
|
437
|
+
account: squareAccount(["ORDERS_READ"]),
|
|
438
|
+
type: "square.order.customAttribute.visible.updated",
|
|
439
|
+
},
|
|
440
|
+
squareOrderFulfillmentUpdated: {
|
|
441
|
+
account: squareAccount(["ORDERS_READ"]),
|
|
442
|
+
type: "square.order.fulfillment.updated",
|
|
443
|
+
},
|
|
444
|
+
squareOrderUpdated: {
|
|
445
|
+
account: squareAccount(["ORDERS_READ"]),
|
|
446
|
+
type: "square.order.updated",
|
|
447
|
+
},
|
|
448
|
+
squarePaymentCreated: {
|
|
449
|
+
account: squareAccount(["PAYMENTS_READ"]),
|
|
450
|
+
type: "square.payment.created",
|
|
451
|
+
},
|
|
452
|
+
squarePaymentUpdated: {
|
|
453
|
+
account: squareAccount(["PAYMENTS_READ"]),
|
|
454
|
+
type: "square.payment.updated",
|
|
455
|
+
},
|
|
456
|
+
squarePayoutFailed: {
|
|
457
|
+
account: squareAccount(["PAYOUTS_READ"]),
|
|
458
|
+
type: "square.payout.failed",
|
|
459
|
+
},
|
|
460
|
+
squarePayoutPaid: {
|
|
461
|
+
account: squareAccount(["PAYOUTS_READ"]),
|
|
462
|
+
type: "square.payout.paid",
|
|
463
|
+
},
|
|
464
|
+
squarePayoutSent: {
|
|
465
|
+
account: squareAccount(["PAYOUTS_READ"]),
|
|
466
|
+
type: "square.payout.sent",
|
|
467
|
+
},
|
|
468
|
+
squareRefundCreated: {
|
|
469
|
+
account: squareAccount(["PAYMENTS_READ"]),
|
|
470
|
+
type: "square.refund.created",
|
|
471
|
+
},
|
|
472
|
+
squareRefundUpdated: {
|
|
473
|
+
account: squareAccount(["PAYMENTS_READ"]),
|
|
474
|
+
type: "square.refund.updated",
|
|
475
|
+
},
|
|
476
|
+
squareSubscriptionCreated: {
|
|
477
|
+
account: squareAccount(["SUBSCRIPTIONS_READ"]),
|
|
478
|
+
type: "square.subscription.created",
|
|
479
|
+
},
|
|
480
|
+
squareSubscriptionUpdated: {
|
|
481
|
+
account: squareAccount(["SUBSCRIPTIONS_READ"]),
|
|
482
|
+
type: "square.subscription.updated",
|
|
483
|
+
},
|
|
484
|
+
squareTeamMemberCreated: {
|
|
485
|
+
account: squareAccount(["EMPLOYEES_READ"]),
|
|
486
|
+
type: "square.teamMember.created",
|
|
487
|
+
},
|
|
488
|
+
squareTeamMemberUpdated: {
|
|
489
|
+
account: squareAccount(["EMPLOYEES_READ"]),
|
|
490
|
+
type: "square.teamMember.updated",
|
|
491
|
+
},
|
|
492
|
+
squareTeamMemberWageSettingUpdated: {
|
|
493
|
+
account: squareAccount(["EMPLOYEES_READ"]),
|
|
494
|
+
type: "square.teamMember.wageSetting.updated",
|
|
495
|
+
},
|
|
496
|
+
squareTerminalActionCreated: {
|
|
497
|
+
account: squareAccount(["PAYMENTS_READ"]),
|
|
498
|
+
type: "square.terminal.action.created",
|
|
499
|
+
},
|
|
500
|
+
squareTerminalActionUpdated: {
|
|
501
|
+
account: squareAccount(["PAYMENTS_READ"]),
|
|
502
|
+
type: "square.terminal.action.updated",
|
|
503
|
+
},
|
|
504
|
+
squareTerminalCheckoutCreated: {
|
|
505
|
+
account: squareAccount(["PAYMENTS_READ"]),
|
|
506
|
+
type: "square.terminal.checkout.created",
|
|
507
|
+
},
|
|
508
|
+
squareTerminalCheckoutUpdated: {
|
|
509
|
+
account: squareAccount(["PAYMENTS_READ"]),
|
|
510
|
+
type: "square.terminal.checkout.updated",
|
|
511
|
+
},
|
|
512
|
+
squareTerminalRefundCreated: {
|
|
513
|
+
account: squareAccount(["PAYMENTS_READ"]),
|
|
514
|
+
type: "square.terminal.refund.created",
|
|
515
|
+
},
|
|
516
|
+
squareTerminalRefundUpdated: {
|
|
517
|
+
account: squareAccount(["PAYMENTS_READ"]),
|
|
518
|
+
type: "square.terminal.refund.updated",
|
|
519
|
+
},
|
|
520
|
+
squareTransferOrderCreated: {
|
|
521
|
+
account: squareAccount(["INVENTORY_WRITE", "INVENTORY_READ"]),
|
|
522
|
+
type: "square.transferOrder.created",
|
|
523
|
+
},
|
|
524
|
+
squareTransferOrderDeleted: {
|
|
525
|
+
account: squareAccount(["INVENTORY_WRITE"]),
|
|
526
|
+
type: "square.transferOrder.deleted",
|
|
527
|
+
},
|
|
528
|
+
squareTransferOrderUpdated: {
|
|
529
|
+
account: squareAccount(["INVENTORY_WRITE", "INVENTORY_READ"]),
|
|
530
|
+
type: "square.transferOrder.updated",
|
|
531
|
+
},
|
|
532
|
+
squareVendorCreated: {
|
|
533
|
+
account: squareAccount(["VENDOR_READ"]),
|
|
534
|
+
type: "square.vendor.created",
|
|
535
|
+
},
|
|
536
|
+
squareVendorUpdated: {
|
|
537
|
+
account: squareAccount(["VENDOR_READ"]),
|
|
538
|
+
type: "square.vendor.updated",
|
|
539
|
+
},
|
|
540
|
+
squareEvent: {
|
|
541
|
+
account: squareAccount([
|
|
542
|
+
"APPOINTMENTS_READ",
|
|
543
|
+
"BANK_ACCOUNTS_READ",
|
|
544
|
+
"CUSTOMERS_READ",
|
|
545
|
+
"DEVICES_READ",
|
|
546
|
+
"DEVICE_CREDENTIAL_MANAGEMENT",
|
|
547
|
+
"EMPLOYEES_READ",
|
|
548
|
+
"GIFTCARDS_READ",
|
|
549
|
+
"INVENTORY_READ",
|
|
550
|
+
"INVENTORY_WRITE",
|
|
551
|
+
"INVOICES_READ",
|
|
552
|
+
"ITEMS_READ",
|
|
553
|
+
"LOYALTY_READ",
|
|
554
|
+
"MERCHANT_PROFILE_READ",
|
|
555
|
+
"MERCHANT_PROFILE_WRITE",
|
|
556
|
+
"ORDERS_READ",
|
|
557
|
+
"PAYMENTS_READ",
|
|
558
|
+
"PAYOUTS_READ",
|
|
559
|
+
"SUBSCRIPTIONS_READ",
|
|
560
|
+
"TIMECARDS_READ",
|
|
561
|
+
"VENDOR_READ",
|
|
562
|
+
]),
|
|
563
|
+
type: "square.event",
|
|
564
|
+
},
|
|
565
|
+
} as const satisfies Record<string, TriggerDefinition>
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* Requires the seller OAuth scopes needed for delivered Square events.
|
|
569
|
+
*
|
|
570
|
+
* @param scopes - Provider permissions required by the event selection.
|
|
571
|
+
*/
|
|
572
|
+
function squareAccount(
|
|
573
|
+
scopes: readonly string[],
|
|
574
|
+
): IntegrationAccountRequirement<"square"> {
|
|
575
|
+
return {
|
|
576
|
+
connectionOptions: [
|
|
577
|
+
{
|
|
578
|
+
connectionMethodId: "oauth",
|
|
579
|
+
requiredScopes:
|
|
580
|
+
scopes.length < 2 ? scopes : [integrationScope.and(...scopes)],
|
|
581
|
+
},
|
|
582
|
+
],
|
|
583
|
+
serviceId: "square",
|
|
584
|
+
}
|
|
585
|
+
}
|