forked from Increase/increase-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathevent-subscriptions.ts
More file actions
627 lines (606 loc) · 28.4 KB
/
event-subscriptions.ts
File metadata and controls
627 lines (606 loc) · 28.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
import { APIResource } from '../resource';
import { isRequestOptions } from '../core';
import * as Core from '../core';
import * as EventSubscriptionsAPI from './event-subscriptions';
import { Page, type PageParams } from '../pagination';
export class EventSubscriptions extends APIResource {
/**
* Create an Event Subscription
*/
create(
body: EventSubscriptionCreateParams,
options?: Core.RequestOptions,
): Core.APIPromise<EventSubscription> {
return this._client.post('/event_subscriptions', { body, ...options });
}
/**
* Retrieve an Event Subscription
*/
retrieve(eventSubscriptionId: string, options?: Core.RequestOptions): Core.APIPromise<EventSubscription> {
return this._client.get(`/event_subscriptions/${eventSubscriptionId}`, options);
}
/**
* Update an Event Subscription
*/
update(
eventSubscriptionId: string,
body: EventSubscriptionUpdateParams,
options?: Core.RequestOptions,
): Core.APIPromise<EventSubscription> {
return this._client.patch(`/event_subscriptions/${eventSubscriptionId}`, { body, ...options });
}
/**
* List Event Subscriptions
*/
list(
query?: EventSubscriptionListParams,
options?: Core.RequestOptions,
): Core.PagePromise<EventSubscriptionsPage, EventSubscription>;
list(options?: Core.RequestOptions): Core.PagePromise<EventSubscriptionsPage, EventSubscription>;
list(
query: EventSubscriptionListParams | Core.RequestOptions = {},
options?: Core.RequestOptions,
): Core.PagePromise<EventSubscriptionsPage, EventSubscription> {
if (isRequestOptions(query)) {
return this.list({}, query);
}
return this._client.getAPIList('/event_subscriptions', EventSubscriptionsPage, { query, ...options });
}
}
export class EventSubscriptionsPage extends Page<EventSubscription> {}
/**
* Webhooks are event notifications we send to you by HTTPS POST requests. Event
* Subscriptions are how you configure your application to listen for them. You can
* create an Event Subscription through your
* [developer dashboard](https://dashboard.increase.com/developers/webhooks) or the
* API. For more information, see our
* [webhooks guide](https://increase.com/documentation/webhooks).
*/
export interface EventSubscription {
/**
* The event subscription identifier.
*/
id: string;
/**
* The time the event subscription was created.
*/
created_at: string;
/**
* The idempotency key you chose for this object. This value is unique across
* Increase and is used to ensure that a request is only processed once. Learn more
* about [idempotency](https://increase.com/documentation/idempotency-keys).
*/
idempotency_key: string | null;
/**
* If specified, this subscription will only receive webhooks for Events associated
* with this OAuth Connection.
*/
oauth_connection_id: string | null;
/**
* If specified, this subscription will only receive webhooks for Events with the
* specified `category`.
*
* - `account.created` - Occurs whenever an Account is created.
* - `account.updated` - Occurs whenever an Account is updated.
* - `account_number.created` - Occurs whenever an Account Number is created.
* - `account_number.updated` - Occurs whenever an Account Number is updated.
* - `account_statement.created` - Occurs whenever an Account Statement is created.
* - `account_transfer.created` - Occurs whenever an Account Transfer is created.
* - `account_transfer.updated` - Occurs whenever an Account Transfer is updated.
* - `ach_prenotification.created` - Occurs whenever an ACH Prenotification is
* created.
* - `ach_prenotification.updated` - Occurs whenever an ACH Prenotification is
* updated.
* - `ach_transfer.created` - Occurs whenever an ACH Transfer is created.
* - `ach_transfer.updated` - Occurs whenever an ACH Transfer is updated.
* - `bookkeeping_account.created` - Occurs whenever a Bookkeeping Account is
* created.
* - `bookkeeping_account.updated` - Occurs whenever a Bookkeeping Account is
* updated.
* - `bookkeeping_entry_set.updated` - Occurs whenever a Bookkeeping Entry Set is
* created.
* - `card.created` - Occurs whenever a Card is created.
* - `card.updated` - Occurs whenever a Card is updated.
* - `card_payment.created` - Occurs whenever a Card Payment is created.
* - `card_payment.updated` - Occurs whenever a Card Payment is updated.
* - `card_profile.created` - Occurs whenever a Card Profile is created.
* - `card_profile.updated` - Occurs whenever a Card Profile is updated.
* - `card_dispute.created` - Occurs whenever a Card Dispute is created.
* - `card_dispute.updated` - Occurs whenever a Card Dispute is updated.
* - `check_deposit.created` - Occurs whenever a Check Deposit is created.
* - `check_deposit.updated` - Occurs whenever a Check Deposit is updated.
* - `check_transfer.created` - Occurs whenever a Check Transfer is created.
* - `check_transfer.updated` - Occurs whenever a Check Transfer is updated.
* - `declined_transaction.created` - Occurs whenever a Declined Transaction is
* created.
* - `digital_card_profile.created` - Occurs whenever a Digital Card Profile is
* created.
* - `digital_card_profile.updated` - Occurs whenever a Digital Card Profile is
* updated.
* - `digital_wallet_token.created` - Occurs whenever a Digital Wallet Token is
* created.
* - `digital_wallet_token.updated` - Occurs whenever a Digital Wallet Token is
* updated.
* - `document.created` - Occurs whenever a Document is created.
* - `entity.created` - Occurs whenever an Entity is created.
* - `entity.updated` - Occurs whenever an Entity is updated.
* - `event_subscription.created` - Occurs whenever an Event Subscription is
* created.
* - `event_subscription.updated` - Occurs whenever an Event Subscription is
* updated.
* - `export.created` - Occurs whenever an Export is created.
* - `export.updated` - Occurs whenever an Export is updated.
* - `external_account.created` - Occurs whenever an External Account is created.
* - `external_account.updated` - Occurs whenever an External Account is updated.
* - `file.created` - Occurs whenever a File is created.
* - `group.updated` - Occurs whenever a Group is updated.
* - `group.heartbeat` - Increase may send webhooks with this category to see if a
* webhook endpoint is working properly.
* - `inbound_ach_transfer.created` - Occurs whenever an Inbound ACH Transfer is
* created.
* - `inbound_ach_transfer.updated` - Occurs whenever an Inbound ACH Transfer is
* updated.
* - `inbound_ach_transfer_return.created` - Occurs whenever an Inbound ACH
* Transfer Return is created.
* - `inbound_ach_transfer_return.updated` - Occurs whenever an Inbound ACH
* Transfer Return is updated.
* - `inbound_check_deposit.created` - Occurs whenever an Inbound Check Deposit is
* created.
* - `inbound_check_deposit.updated` - Occurs whenever an Inbound Check Deposit is
* updated.
* - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created.
* - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated.
* - `inbound_real_time_payments_transfer.created` - Occurs whenever an Inbound
* Real-Time Payments Transfer is created.
* - `inbound_real_time_payments_transfer.updated` - Occurs whenever an Inbound
* Real-Time Payments Transfer is updated.
* - `inbound_wire_drawdown_request.created` - Occurs whenever an Inbound Wire
* Drawdown Request is created.
* - `inbound_wire_transfer.created` - Occurs whenever an Inbound Wire Transfer is
* created.
* - `inbound_wire_transfer.updated` - Occurs whenever an Inbound Wire Transfer is
* updated.
* - `intrafi_account_enrollment.created` - Occurs whenever an IntraFi Account
* Enrollment is created.
* - `intrafi_account_enrollment.updated` - Occurs whenever an IntraFi Account
* Enrollment is updated.
* - `intrafi_exclusion.created` - Occurs whenever an IntraFi Exclusion is created.
* - `intrafi_exclusion.updated` - Occurs whenever an IntraFi Exclusion is updated.
* - `lockbox.created` - Occurs whenever a Lockbox is created.
* - `lockbox.updated` - Occurs whenever a Lockbox is updated.
* - `oauth_connection.created` - Occurs whenever an OAuth Connection is created.
* - `oauth_connection.deactivated` - Occurs whenever an OAuth Connection is
* deactivated.
* - `pending_transaction.created` - Occurs whenever a Pending Transaction is
* created.
* - `pending_transaction.updated` - Occurs whenever a Pending Transaction is
* updated.
* - `physical_card.created` - Occurs whenever a Physical Card is created.
* - `physical_card.updated` - Occurs whenever a Physical Card is updated.
* - `physical_card_profile.created` - Occurs whenever a Physical Card Profile is
* created.
* - `physical_card_profile.updated` - Occurs whenever a Physical Card Profile is
* updated.
* - `proof_of_authorization_request.created` - Occurs whenever a Proof of
* Authorization Request is created.
* - `proof_of_authorization_request.updated` - Occurs whenever a Proof of
* Authorization Request is updated.
* - `proof_of_authorization_request_submission.created` - Occurs whenever a Proof
* of Authorization Request Submission is created.
* - `proof_of_authorization_request_submission.updated` - Occurs whenever a Proof
* of Authorization Request Submission is updated.
* - `real_time_decision.card_authorization_requested` - Occurs whenever a
* Real-Time Decision is created in response to a card authorization.
* - `real_time_decision.digital_wallet_token_requested` - Occurs whenever a
* Real-Time Decision is created in response to a digital wallet provisioning
* attempt.
* - `real_time_decision.digital_wallet_authentication_requested` - Occurs whenever
* a Real-Time Decision is created in response to a digital wallet requiring
* two-factor authentication.
* - `real_time_decision.card_authentication_requested` - Occurs whenever a
* Real-Time Decision is created in response to 3DS authentication.
* - `real_time_decision.card_authentication_challenge_requested` - Occurs whenever
* a Real-Time Decision is created in response to 3DS authentication challenges.
* - `real_time_payments_transfer.created` - Occurs whenever a Real-Time Payments
* Transfer is created.
* - `real_time_payments_transfer.updated` - Occurs whenever a Real-Time Payments
* Transfer is updated.
* - `real_time_payments_request_for_payment.created` - Occurs whenever a Real-Time
* Payments Request for Payment is created.
* - `real_time_payments_request_for_payment.updated` - Occurs whenever a Real-Time
* Payments Request for Payment is updated.
* - `transaction.created` - Occurs whenever a Transaction is created.
* - `wire_drawdown_request.created` - Occurs whenever a Wire Drawdown Request is
* created.
* - `wire_drawdown_request.updated` - Occurs whenever a Wire Drawdown Request is
* updated.
* - `wire_transfer.created` - Occurs whenever a Wire Transfer is created.
* - `wire_transfer.updated` - Occurs whenever a Wire Transfer is updated.
*/
selected_event_category:
| 'account.created'
| 'account.updated'
| 'account_number.created'
| 'account_number.updated'
| 'account_statement.created'
| 'account_transfer.created'
| 'account_transfer.updated'
| 'ach_prenotification.created'
| 'ach_prenotification.updated'
| 'ach_transfer.created'
| 'ach_transfer.updated'
| 'bookkeeping_account.created'
| 'bookkeeping_account.updated'
| 'bookkeeping_entry_set.updated'
| 'card.created'
| 'card.updated'
| 'card_payment.created'
| 'card_payment.updated'
| 'card_profile.created'
| 'card_profile.updated'
| 'card_dispute.created'
| 'card_dispute.updated'
| 'check_deposit.created'
| 'check_deposit.updated'
| 'check_transfer.created'
| 'check_transfer.updated'
| 'declined_transaction.created'
| 'digital_card_profile.created'
| 'digital_card_profile.updated'
| 'digital_wallet_token.created'
| 'digital_wallet_token.updated'
| 'document.created'
| 'entity.created'
| 'entity.updated'
| 'event_subscription.created'
| 'event_subscription.updated'
| 'export.created'
| 'export.updated'
| 'external_account.created'
| 'external_account.updated'
| 'file.created'
| 'group.updated'
| 'group.heartbeat'
| 'inbound_ach_transfer.created'
| 'inbound_ach_transfer.updated'
| 'inbound_ach_transfer_return.created'
| 'inbound_ach_transfer_return.updated'
| 'inbound_check_deposit.created'
| 'inbound_check_deposit.updated'
| 'inbound_mail_item.created'
| 'inbound_mail_item.updated'
| 'inbound_real_time_payments_transfer.created'
| 'inbound_real_time_payments_transfer.updated'
| 'inbound_wire_drawdown_request.created'
| 'inbound_wire_transfer.created'
| 'inbound_wire_transfer.updated'
| 'intrafi_account_enrollment.created'
| 'intrafi_account_enrollment.updated'
| 'intrafi_exclusion.created'
| 'intrafi_exclusion.updated'
| 'lockbox.created'
| 'lockbox.updated'
| 'oauth_connection.created'
| 'oauth_connection.deactivated'
| 'pending_transaction.created'
| 'pending_transaction.updated'
| 'physical_card.created'
| 'physical_card.updated'
| 'physical_card_profile.created'
| 'physical_card_profile.updated'
| 'proof_of_authorization_request.created'
| 'proof_of_authorization_request.updated'
| 'proof_of_authorization_request_submission.created'
| 'proof_of_authorization_request_submission.updated'
| 'real_time_decision.card_authorization_requested'
| 'real_time_decision.digital_wallet_token_requested'
| 'real_time_decision.digital_wallet_authentication_requested'
| 'real_time_decision.card_authentication_requested'
| 'real_time_decision.card_authentication_challenge_requested'
| 'real_time_payments_transfer.created'
| 'real_time_payments_transfer.updated'
| 'real_time_payments_request_for_payment.created'
| 'real_time_payments_request_for_payment.updated'
| 'transaction.created'
| 'wire_drawdown_request.created'
| 'wire_drawdown_request.updated'
| 'wire_transfer.created'
| 'wire_transfer.updated'
| null;
/**
* This indicates if we'll send notifications to this subscription.
*
* - `active` - The subscription is active and Events will be delivered normally.
* - `disabled` - The subscription is temporarily disabled and Events will not be
* delivered.
* - `deleted` - The subscription is permanently disabled and Events will not be
* delivered.
* - `requires_attention` - The subscription is temporarily disabled due to
* delivery errors and Events will not be delivered.
*/
status: 'active' | 'disabled' | 'deleted' | 'requires_attention';
/**
* A constant representing the object's type. For this resource it will always be
* `event_subscription`.
*/
type: 'event_subscription';
/**
* The webhook url where we'll send notifications.
*/
url: string;
}
export interface EventSubscriptionCreateParams {
/**
* The URL you'd like us to send webhooks to.
*/
url: string;
/**
* If specified, this subscription will only receive webhooks for Events associated
* with the specified OAuth Connection.
*/
oauth_connection_id?: string;
/**
* If specified, this subscription will only receive webhooks for Events with the
* specified `category`.
*
* - `account.created` - Occurs whenever an Account is created.
* - `account.updated` - Occurs whenever an Account is updated.
* - `account_number.created` - Occurs whenever an Account Number is created.
* - `account_number.updated` - Occurs whenever an Account Number is updated.
* - `account_statement.created` - Occurs whenever an Account Statement is created.
* - `account_transfer.created` - Occurs whenever an Account Transfer is created.
* - `account_transfer.updated` - Occurs whenever an Account Transfer is updated.
* - `ach_prenotification.created` - Occurs whenever an ACH Prenotification is
* created.
* - `ach_prenotification.updated` - Occurs whenever an ACH Prenotification is
* updated.
* - `ach_transfer.created` - Occurs whenever an ACH Transfer is created.
* - `ach_transfer.updated` - Occurs whenever an ACH Transfer is updated.
* - `bookkeeping_account.created` - Occurs whenever a Bookkeeping Account is
* created.
* - `bookkeeping_account.updated` - Occurs whenever a Bookkeeping Account is
* updated.
* - `bookkeeping_entry_set.updated` - Occurs whenever a Bookkeeping Entry Set is
* created.
* - `card.created` - Occurs whenever a Card is created.
* - `card.updated` - Occurs whenever a Card is updated.
* - `card_payment.created` - Occurs whenever a Card Payment is created.
* - `card_payment.updated` - Occurs whenever a Card Payment is updated.
* - `card_profile.created` - Occurs whenever a Card Profile is created.
* - `card_profile.updated` - Occurs whenever a Card Profile is updated.
* - `card_dispute.created` - Occurs whenever a Card Dispute is created.
* - `card_dispute.updated` - Occurs whenever a Card Dispute is updated.
* - `check_deposit.created` - Occurs whenever a Check Deposit is created.
* - `check_deposit.updated` - Occurs whenever a Check Deposit is updated.
* - `check_transfer.created` - Occurs whenever a Check Transfer is created.
* - `check_transfer.updated` - Occurs whenever a Check Transfer is updated.
* - `declined_transaction.created` - Occurs whenever a Declined Transaction is
* created.
* - `digital_card_profile.created` - Occurs whenever a Digital Card Profile is
* created.
* - `digital_card_profile.updated` - Occurs whenever a Digital Card Profile is
* updated.
* - `digital_wallet_token.created` - Occurs whenever a Digital Wallet Token is
* created.
* - `digital_wallet_token.updated` - Occurs whenever a Digital Wallet Token is
* updated.
* - `document.created` - Occurs whenever a Document is created.
* - `entity.created` - Occurs whenever an Entity is created.
* - `entity.updated` - Occurs whenever an Entity is updated.
* - `event_subscription.created` - Occurs whenever an Event Subscription is
* created.
* - `event_subscription.updated` - Occurs whenever an Event Subscription is
* updated.
* - `export.created` - Occurs whenever an Export is created.
* - `export.updated` - Occurs whenever an Export is updated.
* - `external_account.created` - Occurs whenever an External Account is created.
* - `external_account.updated` - Occurs whenever an External Account is updated.
* - `file.created` - Occurs whenever a File is created.
* - `group.updated` - Occurs whenever a Group is updated.
* - `group.heartbeat` - Increase may send webhooks with this category to see if a
* webhook endpoint is working properly.
* - `inbound_ach_transfer.created` - Occurs whenever an Inbound ACH Transfer is
* created.
* - `inbound_ach_transfer.updated` - Occurs whenever an Inbound ACH Transfer is
* updated.
* - `inbound_ach_transfer_return.created` - Occurs whenever an Inbound ACH
* Transfer Return is created.
* - `inbound_ach_transfer_return.updated` - Occurs whenever an Inbound ACH
* Transfer Return is updated.
* - `inbound_check_deposit.created` - Occurs whenever an Inbound Check Deposit is
* created.
* - `inbound_check_deposit.updated` - Occurs whenever an Inbound Check Deposit is
* updated.
* - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created.
* - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated.
* - `inbound_real_time_payments_transfer.created` - Occurs whenever an Inbound
* Real-Time Payments Transfer is created.
* - `inbound_real_time_payments_transfer.updated` - Occurs whenever an Inbound
* Real-Time Payments Transfer is updated.
* - `inbound_wire_drawdown_request.created` - Occurs whenever an Inbound Wire
* Drawdown Request is created.
* - `inbound_wire_transfer.created` - Occurs whenever an Inbound Wire Transfer is
* created.
* - `inbound_wire_transfer.updated` - Occurs whenever an Inbound Wire Transfer is
* updated.
* - `intrafi_account_enrollment.created` - Occurs whenever an IntraFi Account
* Enrollment is created.
* - `intrafi_account_enrollment.updated` - Occurs whenever an IntraFi Account
* Enrollment is updated.
* - `intrafi_exclusion.created` - Occurs whenever an IntraFi Exclusion is created.
* - `intrafi_exclusion.updated` - Occurs whenever an IntraFi Exclusion is updated.
* - `lockbox.created` - Occurs whenever a Lockbox is created.
* - `lockbox.updated` - Occurs whenever a Lockbox is updated.
* - `oauth_connection.created` - Occurs whenever an OAuth Connection is created.
* - `oauth_connection.deactivated` - Occurs whenever an OAuth Connection is
* deactivated.
* - `pending_transaction.created` - Occurs whenever a Pending Transaction is
* created.
* - `pending_transaction.updated` - Occurs whenever a Pending Transaction is
* updated.
* - `physical_card.created` - Occurs whenever a Physical Card is created.
* - `physical_card.updated` - Occurs whenever a Physical Card is updated.
* - `physical_card_profile.created` - Occurs whenever a Physical Card Profile is
* created.
* - `physical_card_profile.updated` - Occurs whenever a Physical Card Profile is
* updated.
* - `proof_of_authorization_request.created` - Occurs whenever a Proof of
* Authorization Request is created.
* - `proof_of_authorization_request.updated` - Occurs whenever a Proof of
* Authorization Request is updated.
* - `proof_of_authorization_request_submission.created` - Occurs whenever a Proof
* of Authorization Request Submission is created.
* - `proof_of_authorization_request_submission.updated` - Occurs whenever a Proof
* of Authorization Request Submission is updated.
* - `real_time_decision.card_authorization_requested` - Occurs whenever a
* Real-Time Decision is created in response to a card authorization.
* - `real_time_decision.digital_wallet_token_requested` - Occurs whenever a
* Real-Time Decision is created in response to a digital wallet provisioning
* attempt.
* - `real_time_decision.digital_wallet_authentication_requested` - Occurs whenever
* a Real-Time Decision is created in response to a digital wallet requiring
* two-factor authentication.
* - `real_time_decision.card_authentication_requested` - Occurs whenever a
* Real-Time Decision is created in response to 3DS authentication.
* - `real_time_decision.card_authentication_challenge_requested` - Occurs whenever
* a Real-Time Decision is created in response to 3DS authentication challenges.
* - `real_time_payments_transfer.created` - Occurs whenever a Real-Time Payments
* Transfer is created.
* - `real_time_payments_transfer.updated` - Occurs whenever a Real-Time Payments
* Transfer is updated.
* - `real_time_payments_request_for_payment.created` - Occurs whenever a Real-Time
* Payments Request for Payment is created.
* - `real_time_payments_request_for_payment.updated` - Occurs whenever a Real-Time
* Payments Request for Payment is updated.
* - `transaction.created` - Occurs whenever a Transaction is created.
* - `wire_drawdown_request.created` - Occurs whenever a Wire Drawdown Request is
* created.
* - `wire_drawdown_request.updated` - Occurs whenever a Wire Drawdown Request is
* updated.
* - `wire_transfer.created` - Occurs whenever a Wire Transfer is created.
* - `wire_transfer.updated` - Occurs whenever a Wire Transfer is updated.
*/
selected_event_category?:
| 'account.created'
| 'account.updated'
| 'account_number.created'
| 'account_number.updated'
| 'account_statement.created'
| 'account_transfer.created'
| 'account_transfer.updated'
| 'ach_prenotification.created'
| 'ach_prenotification.updated'
| 'ach_transfer.created'
| 'ach_transfer.updated'
| 'bookkeeping_account.created'
| 'bookkeeping_account.updated'
| 'bookkeeping_entry_set.updated'
| 'card.created'
| 'card.updated'
| 'card_payment.created'
| 'card_payment.updated'
| 'card_profile.created'
| 'card_profile.updated'
| 'card_dispute.created'
| 'card_dispute.updated'
| 'check_deposit.created'
| 'check_deposit.updated'
| 'check_transfer.created'
| 'check_transfer.updated'
| 'declined_transaction.created'
| 'digital_card_profile.created'
| 'digital_card_profile.updated'
| 'digital_wallet_token.created'
| 'digital_wallet_token.updated'
| 'document.created'
| 'entity.created'
| 'entity.updated'
| 'event_subscription.created'
| 'event_subscription.updated'
| 'export.created'
| 'export.updated'
| 'external_account.created'
| 'external_account.updated'
| 'file.created'
| 'group.updated'
| 'group.heartbeat'
| 'inbound_ach_transfer.created'
| 'inbound_ach_transfer.updated'
| 'inbound_ach_transfer_return.created'
| 'inbound_ach_transfer_return.updated'
| 'inbound_check_deposit.created'
| 'inbound_check_deposit.updated'
| 'inbound_mail_item.created'
| 'inbound_mail_item.updated'
| 'inbound_real_time_payments_transfer.created'
| 'inbound_real_time_payments_transfer.updated'
| 'inbound_wire_drawdown_request.created'
| 'inbound_wire_transfer.created'
| 'inbound_wire_transfer.updated'
| 'intrafi_account_enrollment.created'
| 'intrafi_account_enrollment.updated'
| 'intrafi_exclusion.created'
| 'intrafi_exclusion.updated'
| 'lockbox.created'
| 'lockbox.updated'
| 'oauth_connection.created'
| 'oauth_connection.deactivated'
| 'pending_transaction.created'
| 'pending_transaction.updated'
| 'physical_card.created'
| 'physical_card.updated'
| 'physical_card_profile.created'
| 'physical_card_profile.updated'
| 'proof_of_authorization_request.created'
| 'proof_of_authorization_request.updated'
| 'proof_of_authorization_request_submission.created'
| 'proof_of_authorization_request_submission.updated'
| 'real_time_decision.card_authorization_requested'
| 'real_time_decision.digital_wallet_token_requested'
| 'real_time_decision.digital_wallet_authentication_requested'
| 'real_time_decision.card_authentication_requested'
| 'real_time_decision.card_authentication_challenge_requested'
| 'real_time_payments_transfer.created'
| 'real_time_payments_transfer.updated'
| 'real_time_payments_request_for_payment.created'
| 'real_time_payments_request_for_payment.updated'
| 'transaction.created'
| 'wire_drawdown_request.created'
| 'wire_drawdown_request.updated'
| 'wire_transfer.created'
| 'wire_transfer.updated';
/**
* The key that will be used to sign webhooks. If no value is passed, a random
* string will be used as default.
*/
shared_secret?: string;
}
export interface EventSubscriptionUpdateParams {
/**
* The status to update the Event Subscription with.
*
* - `active` - The subscription is active and Events will be delivered normally.
* - `disabled` - The subscription is temporarily disabled and Events will not be
* delivered.
* - `deleted` - The subscription is permanently disabled and Events will not be
* delivered.
*/
status?: 'active' | 'disabled' | 'deleted';
}
export interface EventSubscriptionListParams extends PageParams {
/**
* Filter records to the one with the specified `idempotency_key` you chose for
* that object. This value is unique across Increase and is used to ensure that a
* request is only processed once. Learn more about
* [idempotency](https://increase.com/documentation/idempotency-keys).
*/
idempotency_key?: string;
}
export namespace EventSubscriptions {
export import EventSubscription = EventSubscriptionsAPI.EventSubscription;
export import EventSubscriptionsPage = EventSubscriptionsAPI.EventSubscriptionsPage;
export import EventSubscriptionCreateParams = EventSubscriptionsAPI.EventSubscriptionCreateParams;
export import EventSubscriptionUpdateParams = EventSubscriptionsAPI.EventSubscriptionUpdateParams;
export import EventSubscriptionListParams = EventSubscriptionsAPI.EventSubscriptionListParams;
}