@augustusbank/typescript-sdk 0.32.0 → 0.33.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.
Files changed (76) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/client.d.mts +7 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +7 -4
  5. package/client.d.ts.map +1 -1
  6. package/client.js +3 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +3 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/accounts.d.mts +24 -6
  12. package/resources/accounts.d.mts.map +1 -1
  13. package/resources/accounts.d.ts +24 -6
  14. package/resources/accounts.d.ts.map +1 -1
  15. package/resources/api-keys.d.mts +1 -1
  16. package/resources/api-keys.d.mts.map +1 -1
  17. package/resources/api-keys.d.ts +1 -1
  18. package/resources/api-keys.d.ts.map +1 -1
  19. package/resources/counterparties.d.mts +227 -12
  20. package/resources/counterparties.d.mts.map +1 -1
  21. package/resources/counterparties.d.ts +227 -12
  22. package/resources/counterparties.d.ts.map +1 -1
  23. package/resources/counterparties.js +16 -0
  24. package/resources/counterparties.js.map +1 -1
  25. package/resources/counterparties.mjs +16 -0
  26. package/resources/counterparties.mjs.map +1 -1
  27. package/resources/events.d.mts +3 -3
  28. package/resources/events.d.mts.map +1 -1
  29. package/resources/events.d.ts +3 -3
  30. package/resources/events.d.ts.map +1 -1
  31. package/resources/index.d.mts +3 -2
  32. package/resources/index.d.mts.map +1 -1
  33. package/resources/index.d.ts +3 -2
  34. package/resources/index.d.ts.map +1 -1
  35. package/resources/index.js +3 -1
  36. package/resources/index.js.map +1 -1
  37. package/resources/index.mjs +1 -0
  38. package/resources/index.mjs.map +1 -1
  39. package/resources/payout-tracking-events.d.mts +358 -0
  40. package/resources/payout-tracking-events.d.mts.map +1 -0
  41. package/resources/payout-tracking-events.d.ts +358 -0
  42. package/resources/payout-tracking-events.d.ts.map +1 -0
  43. package/resources/payout-tracking-events.js +23 -0
  44. package/resources/payout-tracking-events.js.map +1 -0
  45. package/resources/payout-tracking-events.mjs +19 -0
  46. package/resources/payout-tracking-events.mjs.map +1 -0
  47. package/resources/scopes.d.mts +1 -1
  48. package/resources/scopes.d.mts.map +1 -1
  49. package/resources/scopes.d.ts +1 -1
  50. package/resources/scopes.d.ts.map +1 -1
  51. package/resources/transactions.d.mts +4 -4
  52. package/resources/transactions.d.ts +4 -4
  53. package/resources/webhook-subscriptions.d.mts +8 -8
  54. package/resources/webhook-subscriptions.d.mts.map +1 -1
  55. package/resources/webhook-subscriptions.d.ts +8 -8
  56. package/resources/webhook-subscriptions.d.ts.map +1 -1
  57. package/resources/webhooks.d.mts +196 -14
  58. package/resources/webhooks.d.mts.map +1 -1
  59. package/resources/webhooks.d.ts +196 -14
  60. package/resources/webhooks.d.ts.map +1 -1
  61. package/src/client.ts +21 -0
  62. package/src/resources/accounts.ts +24 -6
  63. package/src/resources/api-keys.ts +1 -0
  64. package/src/resources/counterparties.ts +536 -12
  65. package/src/resources/events.ts +3 -0
  66. package/src/resources/index.ts +9 -0
  67. package/src/resources/payout-tracking-events.ts +479 -0
  68. package/src/resources/scopes.ts +2 -1
  69. package/src/resources/transactions.ts +4 -4
  70. package/src/resources/webhook-subscriptions.ts +8 -0
  71. package/src/resources/webhooks.ts +241 -12
  72. package/src/version.ts +1 -1
  73. package/version.d.mts +1 -1
  74. package/version.d.ts +1 -1
  75. package/version.js +1 -1
  76. package/version.mjs +1 -1
@@ -3070,9 +3070,9 @@ export declare namespace CounterpartyPendingWebhookEvent {
3070
3070
  */
3071
3071
  email: string | null;
3072
3072
  /**
3073
- * Whether the counterparty is a business or an individual.
3073
+ * Classification of the counterparty.
3074
3074
  */
3075
- entity_type: 'business' | 'individual';
3075
+ entity_type: 'business' | 'individual' | 'non_profit' | 'sole_proprietor';
3076
3076
  /**
3077
3077
  * Financial address of the counterparty.
3078
3078
  */
@@ -3294,9 +3294,9 @@ export declare namespace CounterpartyActiveWebhookEvent {
3294
3294
  */
3295
3295
  email: string | null;
3296
3296
  /**
3297
- * Whether the counterparty is a business or an individual.
3297
+ * Classification of the counterparty.
3298
3298
  */
3299
- entity_type: 'business' | 'individual';
3299
+ entity_type: 'business' | 'individual' | 'non_profit' | 'sole_proprietor';
3300
3300
  /**
3301
3301
  * Financial address of the counterparty.
3302
3302
  */
@@ -3518,9 +3518,9 @@ export declare namespace CounterpartyRejectedWebhookEvent {
3518
3518
  */
3519
3519
  email: string | null;
3520
3520
  /**
3521
- * Whether the counterparty is a business or an individual.
3521
+ * Classification of the counterparty.
3522
3522
  */
3523
- entity_type: 'business' | 'individual';
3523
+ entity_type: 'business' | 'individual' | 'non_profit' | 'sole_proprietor';
3524
3524
  /**
3525
3525
  * Financial address of the counterparty.
3526
3526
  */
@@ -3742,9 +3742,9 @@ export declare namespace CounterpartyBlockedWebhookEvent {
3742
3742
  */
3743
3743
  email: string | null;
3744
3744
  /**
3745
- * Whether the counterparty is a business or an individual.
3745
+ * Classification of the counterparty.
3746
3746
  */
3747
- entity_type: 'business' | 'individual';
3747
+ entity_type: 'business' | 'individual' | 'non_profit' | 'sole_proprietor';
3748
3748
  /**
3749
3749
  * Financial address of the counterparty.
3750
3750
  */
@@ -3966,9 +3966,9 @@ export declare namespace CounterpartyUnblockedWebhookEvent {
3966
3966
  */
3967
3967
  email: string | null;
3968
3968
  /**
3969
- * Whether the counterparty is a business or an individual.
3969
+ * Classification of the counterparty.
3970
3970
  */
3971
- entity_type: 'business' | 'individual';
3971
+ entity_type: 'business' | 'individual' | 'non_profit' | 'sole_proprietor';
3972
3972
  /**
3973
3973
  * Financial address of the counterparty.
3974
3974
  */
@@ -4190,9 +4190,9 @@ export declare namespace CounterpartyUpdatedWebhookEvent {
4190
4190
  */
4191
4191
  email: string | null;
4192
4192
  /**
4193
- * Whether the counterparty is a business or an individual.
4193
+ * Classification of the counterparty.
4194
4194
  */
4195
- entity_type: 'business' | 'individual';
4195
+ entity_type: 'business' | 'individual' | 'non_profit' | 'sole_proprietor';
4196
4196
  /**
4197
4197
  * Financial address of the counterparty.
4198
4198
  */
@@ -4370,6 +4370,188 @@ export declare namespace CounterpartyUpdatedWebhookEvent {
4370
4370
  }
4371
4371
  }
4372
4372
  }
4373
+ export interface PayoutTrackingEventCreatedWebhookEvent {
4374
+ /**
4375
+ * Unique identifier for the event. Stable across retries.
4376
+ */
4377
+ id: string;
4378
+ /**
4379
+ * API version the payload was rendered at. Stable across retries and redeliveries.
4380
+ */
4381
+ api_version: string;
4382
+ /**
4383
+ * ISO 8601 UTC timestamp when the event was created.
4384
+ */
4385
+ date: string;
4386
+ /**
4387
+ * Full resource snapshot at the time of the event.
4388
+ */
4389
+ payload: PayoutTrackingEventCreatedWebhookEvent.Payload;
4390
+ /**
4391
+ * Event type in resource.action format.
4392
+ */
4393
+ type: 'payout_tracking_event.created';
4394
+ }
4395
+ export declare namespace PayoutTrackingEventCreatedWebhookEvent {
4396
+ /**
4397
+ * Full resource snapshot at the time of the event.
4398
+ */
4399
+ interface Payload {
4400
+ /**
4401
+ * Unique identifier of the tracking event.
4402
+ */
4403
+ id: string;
4404
+ /**
4405
+ * Amount credited to the beneficiary. Set only on a credited event, otherwise
4406
+ * null.
4407
+ */
4408
+ beneficiary_amount: Payload.BeneficiaryAmount | null;
4409
+ /**
4410
+ * ISO 8601 UTC timestamp when Augustus recorded the event.
4411
+ */
4412
+ created_at: string;
4413
+ /**
4414
+ * Fee deducted at this step. Null when none was reported.
4415
+ */
4416
+ fee: Payload.Fee | null;
4417
+ /**
4418
+ * Institution that acted on or reported this step. Null when unknown.
4419
+ */
4420
+ institution: Payload.Institution | null;
4421
+ /**
4422
+ * Whether Augustus considers delivery finished. A later event, such as returned,
4423
+ * can still follow.
4424
+ */
4425
+ is_terminal: boolean;
4426
+ /**
4427
+ * Normalized point in the payout journey. New values may be added.
4428
+ */
4429
+ milestone: 'initiated' | 'submitted' | 'sent' | 'failed' | 'returned' | 'accepted' | 'settled' | 'forwarded' | 'credited' | 'rejected' | 'returning' | 'visibility_lost' | 'other';
4430
+ /**
4431
+ * Raw network status. Null when the step has none.
4432
+ */
4433
+ network_status: Payload.NetworkStatus | null;
4434
+ /**
4435
+ * ISO 8601 UTC timestamp when the step happened. Null when the source has no
4436
+ * timestamp. Can be out of order with sequence.
4437
+ */
4438
+ occurred_at: string | null;
4439
+ /**
4440
+ * ID of the payout this event belongs to.
4441
+ */
4442
+ payout_id: string;
4443
+ /**
4444
+ * How far Augustus can follow the payout: end_to_end when the rail confirms the
4445
+ * beneficiary credit, network when it only confirms settlement. New values may be
4446
+ * added.
4447
+ */
4448
+ scope: 'network' | 'end_to_end';
4449
+ /**
4450
+ * Gap-free counter per payout, in the order Augustus recorded the events. A gap
4451
+ * means you missed a recorded event, such as a dropped webhook. A sequence without
4452
+ * gaps does not mean every network step was observed.
4453
+ */
4454
+ sequence: number;
4455
+ /**
4456
+ * Where Augustus learned this step: augustus for steps Augustus records itself,
4457
+ * swift_gpi for SWIFT gpi statuses, other for any other source. New values may be
4458
+ * added.
4459
+ */
4460
+ source: 'augustus' | 'swift_gpi' | 'other';
4461
+ /**
4462
+ * Reason for the current state. Null when none applies.
4463
+ */
4464
+ status_reason: Payload.StatusReason | null;
4465
+ /**
4466
+ * Resource type discriminator.
4467
+ */
4468
+ type: 'payout_tracking_event';
4469
+ }
4470
+ namespace Payload {
4471
+ /**
4472
+ * Amount credited to the beneficiary. Set only on a credited event, otherwise
4473
+ * null.
4474
+ */
4475
+ interface BeneficiaryAmount {
4476
+ /**
4477
+ * Credited amount as a string decimal (e.g. "100.50").
4478
+ */
4479
+ amount: string;
4480
+ /**
4481
+ * ISO 4217 currency code of the credited amount.
4482
+ */
4483
+ currency: string;
4484
+ }
4485
+ /**
4486
+ * Fee deducted at this step. Null when none was reported.
4487
+ */
4488
+ interface Fee {
4489
+ /**
4490
+ * Fee amount as a string decimal (e.g. "10.00").
4491
+ */
4492
+ amount: string;
4493
+ /**
4494
+ * Who bears the charges under the payment charge agreement: debtor (OUR), creditor
4495
+ * (BEN), shared (SHA), or other for any other agreement. New values may be added.
4496
+ */
4497
+ borne_by: 'debtor' | 'creditor' | 'shared' | 'other';
4498
+ /**
4499
+ * ISO 4217 currency code of the fee.
4500
+ */
4501
+ currency: string;
4502
+ }
4503
+ /**
4504
+ * Institution that acted on or reported this step. Null when unknown.
4505
+ */
4506
+ interface Institution {
4507
+ /**
4508
+ * Identifier of the institution, typed by scheme.
4509
+ */
4510
+ identifier: Institution.Identifier;
4511
+ }
4512
+ namespace Institution {
4513
+ /**
4514
+ * Identifier of the institution, typed by scheme.
4515
+ */
4516
+ interface Identifier {
4517
+ /**
4518
+ * Identifier scheme. Only bic today.
4519
+ */
4520
+ type: 'bic';
4521
+ /**
4522
+ * ISO 9362 Bank Identifier Code (8 or 11 characters).
4523
+ */
4524
+ value: string;
4525
+ }
4526
+ }
4527
+ /**
4528
+ * Raw network status. Null when the step has none.
4529
+ */
4530
+ interface NetworkStatus {
4531
+ /**
4532
+ * Status code reported by the network, such as ACSP, ACSC, ACCC or RJCT.
4533
+ */
4534
+ code: string;
4535
+ /**
4536
+ * Reason code for the status, such as G000. Null when the network reports none.
4537
+ */
4538
+ reason_code: string | null;
4539
+ }
4540
+ /**
4541
+ * Reason for the current state. Null when none applies.
4542
+ */
4543
+ interface StatusReason {
4544
+ /**
4545
+ * Normalized reason code assigned by Augustus. New codes may be added.
4546
+ */
4547
+ code: string;
4548
+ /**
4549
+ * Explanation of the reason code, written by Augustus.
4550
+ */
4551
+ description: string;
4552
+ }
4553
+ }
4554
+ }
4373
4555
  export interface PingTestWebhookEvent {
4374
4556
  /**
4375
4557
  * Unique identifier for the event. Stable across retries.
@@ -4420,8 +4602,8 @@ export declare namespace PingTestWebhookEvent {
4420
4602
  type: 'ping';
4421
4603
  }
4422
4604
  }
4423
- export type UnwrapWebhookEvent = PayoutInitiatedWebhookEvent | PayoutSubmittedWebhookEvent | PayoutSentWebhookEvent | PayoutFailedWebhookEvent | PayoutReturnedWebhookEvent | ReturnInitiatedWebhookEvent | ReturnSubmittedWebhookEvent | ReturnSentWebhookEvent | ReturnFailedWebhookEvent | ReturnReturnedWebhookEvent | DepositSettledWebhookEvent | ConversionCreatedWebhookEvent | ConversionCompletedWebhookEvent | ConversionFailedWebhookEvent | AccountHolderActiveWebhookEvent | AccountHolderClosedWebhookEvent | CounterpartyPendingWebhookEvent | CounterpartyActiveWebhookEvent | CounterpartyRejectedWebhookEvent | CounterpartyBlockedWebhookEvent | CounterpartyUnblockedWebhookEvent | CounterpartyUpdatedWebhookEvent | PingTestWebhookEvent;
4605
+ export type UnwrapWebhookEvent = PayoutInitiatedWebhookEvent | PayoutSubmittedWebhookEvent | PayoutSentWebhookEvent | PayoutFailedWebhookEvent | PayoutReturnedWebhookEvent | ReturnInitiatedWebhookEvent | ReturnSubmittedWebhookEvent | ReturnSentWebhookEvent | ReturnFailedWebhookEvent | ReturnReturnedWebhookEvent | DepositSettledWebhookEvent | ConversionCreatedWebhookEvent | ConversionCompletedWebhookEvent | ConversionFailedWebhookEvent | AccountHolderActiveWebhookEvent | AccountHolderClosedWebhookEvent | CounterpartyPendingWebhookEvent | CounterpartyActiveWebhookEvent | CounterpartyRejectedWebhookEvent | CounterpartyBlockedWebhookEvent | CounterpartyUnblockedWebhookEvent | CounterpartyUpdatedWebhookEvent | PayoutTrackingEventCreatedWebhookEvent | PingTestWebhookEvent;
4424
4606
  export declare namespace Webhooks {
4425
- export { type PayoutInitiatedWebhookEvent as PayoutInitiatedWebhookEvent, type PayoutSubmittedWebhookEvent as PayoutSubmittedWebhookEvent, type PayoutSentWebhookEvent as PayoutSentWebhookEvent, type PayoutFailedWebhookEvent as PayoutFailedWebhookEvent, type PayoutReturnedWebhookEvent as PayoutReturnedWebhookEvent, type ReturnInitiatedWebhookEvent as ReturnInitiatedWebhookEvent, type ReturnSubmittedWebhookEvent as ReturnSubmittedWebhookEvent, type ReturnSentWebhookEvent as ReturnSentWebhookEvent, type ReturnFailedWebhookEvent as ReturnFailedWebhookEvent, type ReturnReturnedWebhookEvent as ReturnReturnedWebhookEvent, type DepositSettledWebhookEvent as DepositSettledWebhookEvent, type ConversionCreatedWebhookEvent as ConversionCreatedWebhookEvent, type ConversionCompletedWebhookEvent as ConversionCompletedWebhookEvent, type ConversionFailedWebhookEvent as ConversionFailedWebhookEvent, type AccountHolderActiveWebhookEvent as AccountHolderActiveWebhookEvent, type AccountHolderClosedWebhookEvent as AccountHolderClosedWebhookEvent, type CounterpartyPendingWebhookEvent as CounterpartyPendingWebhookEvent, type CounterpartyActiveWebhookEvent as CounterpartyActiveWebhookEvent, type CounterpartyRejectedWebhookEvent as CounterpartyRejectedWebhookEvent, type CounterpartyBlockedWebhookEvent as CounterpartyBlockedWebhookEvent, type CounterpartyUnblockedWebhookEvent as CounterpartyUnblockedWebhookEvent, type CounterpartyUpdatedWebhookEvent as CounterpartyUpdatedWebhookEvent, type PingTestWebhookEvent as PingTestWebhookEvent, type UnwrapWebhookEvent as UnwrapWebhookEvent, };
4607
+ export { type PayoutInitiatedWebhookEvent as PayoutInitiatedWebhookEvent, type PayoutSubmittedWebhookEvent as PayoutSubmittedWebhookEvent, type PayoutSentWebhookEvent as PayoutSentWebhookEvent, type PayoutFailedWebhookEvent as PayoutFailedWebhookEvent, type PayoutReturnedWebhookEvent as PayoutReturnedWebhookEvent, type ReturnInitiatedWebhookEvent as ReturnInitiatedWebhookEvent, type ReturnSubmittedWebhookEvent as ReturnSubmittedWebhookEvent, type ReturnSentWebhookEvent as ReturnSentWebhookEvent, type ReturnFailedWebhookEvent as ReturnFailedWebhookEvent, type ReturnReturnedWebhookEvent as ReturnReturnedWebhookEvent, type DepositSettledWebhookEvent as DepositSettledWebhookEvent, type ConversionCreatedWebhookEvent as ConversionCreatedWebhookEvent, type ConversionCompletedWebhookEvent as ConversionCompletedWebhookEvent, type ConversionFailedWebhookEvent as ConversionFailedWebhookEvent, type AccountHolderActiveWebhookEvent as AccountHolderActiveWebhookEvent, type AccountHolderClosedWebhookEvent as AccountHolderClosedWebhookEvent, type CounterpartyPendingWebhookEvent as CounterpartyPendingWebhookEvent, type CounterpartyActiveWebhookEvent as CounterpartyActiveWebhookEvent, type CounterpartyRejectedWebhookEvent as CounterpartyRejectedWebhookEvent, type CounterpartyBlockedWebhookEvent as CounterpartyBlockedWebhookEvent, type CounterpartyUnblockedWebhookEvent as CounterpartyUnblockedWebhookEvent, type CounterpartyUpdatedWebhookEvent as CounterpartyUpdatedWebhookEvent, type PayoutTrackingEventCreatedWebhookEvent as PayoutTrackingEventCreatedWebhookEvent, type PingTestWebhookEvent as PingTestWebhookEvent, type UnwrapWebhookEvent as UnwrapWebhookEvent, };
4426
4608
  }
4427
4609
  //# sourceMappingURL=webhooks.d.ts.map