@augustusbank/typescript-sdk 0.20.0 → 0.22.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/CHANGELOG.md +28 -0
- package/client.d.mts +6 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -0
- package/client.d.ts.map +1 -1
- package/client.js +6 -0
- package/client.js.map +1 -1
- package/client.mjs +6 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/account-holders.d.mts +1555 -1184
- package/resources/account-holders.d.mts.map +1 -1
- package/resources/account-holders.d.ts +1555 -1184
- package/resources/account-holders.d.ts.map +1 -1
- package/resources/account-holders.js +59 -0
- package/resources/account-holders.js.map +1 -1
- package/resources/account-holders.mjs +59 -0
- package/resources/account-holders.mjs.map +1 -1
- package/resources/account-programs.d.mts +2 -2
- package/resources/account-programs.d.ts +2 -2
- package/resources/accounts.d.mts +206 -43
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +206 -43
- package/resources/accounts.d.ts.map +1 -1
- package/resources/accounts.js +53 -0
- package/resources/accounts.js.map +1 -1
- package/resources/accounts.mjs +53 -0
- package/resources/accounts.mjs.map +1 -1
- package/resources/api-keys.d.mts +1 -1
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +1 -1
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-versions.d.mts +3 -0
- package/resources/api-versions.d.mts.map +1 -1
- package/resources/api-versions.d.ts +3 -0
- package/resources/api-versions.d.ts.map +1 -1
- package/resources/conversions.d.mts +36 -81
- package/resources/conversions.d.mts.map +1 -1
- package/resources/conversions.d.ts +36 -81
- package/resources/conversions.d.ts.map +1 -1
- package/resources/conversions.js +25 -1
- package/resources/conversions.js.map +1 -1
- package/resources/conversions.mjs +25 -1
- package/resources/conversions.mjs.map +1 -1
- package/resources/counterparties.d.mts +1042 -0
- package/resources/counterparties.d.mts.map +1 -0
- package/resources/counterparties.d.ts +1042 -0
- package/resources/counterparties.d.ts.map +1 -0
- package/resources/counterparties.js +45 -0
- package/resources/counterparties.js.map +1 -0
- package/resources/counterparties.mjs +41 -0
- package/resources/counterparties.mjs.map +1 -0
- package/resources/deposits.d.mts +38 -186
- package/resources/deposits.d.mts.map +1 -1
- package/resources/deposits.d.ts +38 -186
- package/resources/deposits.d.ts.map +1 -1
- package/resources/index.d.mts +2 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -0
- package/resources/index.mjs.map +1 -1
- package/resources/payouts.d.mts +458 -276
- package/resources/payouts.d.mts.map +1 -1
- package/resources/payouts.d.ts +458 -276
- package/resources/payouts.d.ts.map +1 -1
- package/resources/payouts.js +27 -0
- package/resources/payouts.js.map +1 -1
- package/resources/payouts.mjs +27 -0
- package/resources/payouts.mjs.map +1 -1
- package/resources/quotes/indicative.d.mts +7 -11
- package/resources/quotes/indicative.d.mts.map +1 -1
- package/resources/quotes/indicative.d.ts +7 -11
- package/resources/quotes/indicative.d.ts.map +1 -1
- package/resources/quotes/quotes.d.mts +4 -8
- package/resources/quotes/quotes.d.mts.map +1 -1
- package/resources/quotes/quotes.d.ts +4 -8
- package/resources/quotes/quotes.d.ts.map +1 -1
- package/resources/quotes/quotes.js.map +1 -1
- package/resources/quotes/quotes.mjs.map +1 -1
- package/resources/returns.d.mts +84 -39
- package/resources/returns.d.mts.map +1 -1
- package/resources/returns.d.ts +84 -39
- package/resources/returns.d.ts.map +1 -1
- package/resources/returns.js +22 -0
- package/resources/returns.js.map +1 -1
- package/resources/returns.mjs +22 -0
- package/resources/returns.mjs.map +1 -1
- package/resources/scopes.d.mts +4 -1
- package/resources/scopes.d.mts.map +1 -1
- package/resources/scopes.d.ts +4 -1
- package/resources/scopes.d.ts.map +1 -1
- package/resources/simulations/account-programs.d.mts +281 -0
- package/resources/simulations/account-programs.d.mts.map +1 -0
- package/resources/simulations/account-programs.d.ts +281 -0
- package/resources/simulations/account-programs.d.ts.map +1 -0
- package/resources/simulations/account-programs.js +98 -0
- package/resources/simulations/account-programs.js.map +1 -0
- package/resources/simulations/account-programs.mjs +94 -0
- package/resources/simulations/account-programs.mjs.map +1 -0
- package/resources/simulations/accounts.d.mts +270 -0
- package/resources/simulations/accounts.d.mts.map +1 -0
- package/resources/simulations/accounts.d.ts +270 -0
- package/resources/simulations/accounts.d.ts.map +1 -0
- package/resources/simulations/accounts.js +91 -0
- package/resources/simulations/accounts.js.map +1 -0
- package/resources/simulations/accounts.mjs +87 -0
- package/resources/simulations/accounts.mjs.map +1 -0
- package/resources/simulations/deposits.d.mts +218 -0
- package/resources/simulations/deposits.d.mts.map +1 -0
- package/resources/simulations/deposits.d.ts +218 -0
- package/resources/simulations/deposits.d.ts.map +1 -0
- package/resources/simulations/deposits.js +25 -0
- package/resources/simulations/deposits.js.map +1 -0
- package/resources/simulations/deposits.mjs +21 -0
- package/resources/simulations/deposits.mjs.map +1 -0
- package/resources/simulations/index.d.mts +6 -0
- package/resources/simulations/index.d.mts.map +1 -0
- package/resources/simulations/index.d.ts +6 -0
- package/resources/simulations/index.d.ts.map +1 -0
- package/resources/simulations/index.js +15 -0
- package/resources/simulations/index.js.map +1 -0
- package/resources/simulations/index.mjs +7 -0
- package/resources/simulations/index.mjs.map +1 -0
- package/resources/simulations/payouts.d.mts +76 -0
- package/resources/simulations/payouts.d.mts.map +1 -0
- package/resources/simulations/payouts.d.ts +76 -0
- package/resources/simulations/payouts.d.ts.map +1 -0
- package/resources/simulations/payouts.js +39 -0
- package/resources/simulations/payouts.js.map +1 -0
- package/resources/simulations/payouts.mjs +35 -0
- package/resources/simulations/payouts.mjs.map +1 -0
- package/resources/simulations/simulations.d.mts +22 -0
- package/resources/simulations/simulations.d.mts.map +1 -0
- package/resources/simulations/simulations.d.ts +22 -0
- package/resources/simulations/simulations.d.ts.map +1 -0
- package/resources/simulations/simulations.js +29 -0
- package/resources/simulations/simulations.js.map +1 -0
- package/resources/simulations/simulations.mjs +24 -0
- package/resources/simulations/simulations.mjs.map +1 -0
- package/resources/simulations.d.mts +2 -0
- package/resources/simulations.d.mts.map +1 -0
- package/resources/simulations.d.ts +2 -0
- package/resources/simulations.d.ts.map +1 -0
- package/resources/simulations.js +6 -0
- package/resources/simulations.js.map +1 -0
- package/resources/simulations.mjs +3 -0
- package/resources/simulations.mjs.map +1 -0
- package/resources/transactions.d.mts +300 -180
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +300 -180
- package/resources/transactions.d.ts.map +1 -1
- package/resources/webhook-subscriptions.d.mts +54 -4
- package/resources/webhook-subscriptions.d.mts.map +1 -1
- package/resources/webhook-subscriptions.d.ts +54 -4
- package/resources/webhook-subscriptions.d.ts.map +1 -1
- package/resources/webhook-subscriptions.js +49 -0
- package/resources/webhook-subscriptions.js.map +1 -1
- package/resources/webhook-subscriptions.mjs +49 -0
- package/resources/webhook-subscriptions.mjs.map +1 -1
- package/resources/webhooks.d.mts +736 -953
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +736 -953
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +32 -0
- package/src/resources/account-holders.ts +1701 -1282
- package/src/resources/account-programs.ts +2 -2
- package/src/resources/accounts.ts +236 -44
- package/src/resources/api-keys.ts +3 -0
- package/src/resources/api-versions.ts +3 -0
- package/src/resources/conversions.ts +36 -93
- package/src/resources/counterparties.ts +3127 -0
- package/src/resources/deposits.ts +54 -269
- package/src/resources/index.ts +13 -0
- package/src/resources/payouts.ts +2089 -367
- package/src/resources/quotes/indicative.ts +7 -12
- package/src/resources/quotes/quotes.ts +4 -9
- package/src/resources/returns.ts +144 -40
- package/src/resources/scopes.ts +7 -1
- package/src/resources/simulations/account-programs.ts +363 -0
- package/src/resources/simulations/accounts.ts +340 -0
- package/src/resources/simulations/deposits.ts +530 -0
- package/src/resources/simulations/index.ts +32 -0
- package/src/resources/simulations/payouts.ts +98 -0
- package/src/resources/simulations/simulations.ts +82 -0
- package/src/resources/simulations.ts +3 -0
- package/src/resources/transactions.ts +910 -232
- package/src/resources/webhook-subscriptions.ts +54 -4
- package/src/resources/webhooks.ts +948 -1126
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -9,6 +9,15 @@ import { path } from '../internal/utils/path';
|
|
|
9
9
|
export class WebhookSubscriptions extends APIResource {
|
|
10
10
|
/**
|
|
11
11
|
* Creates a new webhook subscription.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const webhookSubscription =
|
|
16
|
+
* await client.webhookSubscriptions.create({
|
|
17
|
+
* events: ['payout.paid'],
|
|
18
|
+
* url: 'https://sandbox.example.com/webhooks/augustus',
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
12
21
|
*/
|
|
13
22
|
create(
|
|
14
23
|
body: WebhookSubscriptionCreateParams,
|
|
@@ -19,6 +28,14 @@ export class WebhookSubscriptions extends APIResource {
|
|
|
19
28
|
|
|
20
29
|
/**
|
|
21
30
|
* Retrieves a webhook subscription by ID.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* const webhookSubscription =
|
|
35
|
+
* await client.webhookSubscriptions.retrieve(
|
|
36
|
+
* '550e8400-e29b-41d4-a716-446655440009',
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
22
39
|
*/
|
|
23
40
|
retrieve(id: string, options?: RequestOptions): APIPromise<WebhookSubscriptionRetrieveResponse> {
|
|
24
41
|
return this._client.get(path`/v1/webhook_subscriptions/${id}`, options);
|
|
@@ -26,6 +43,14 @@ export class WebhookSubscriptions extends APIResource {
|
|
|
26
43
|
|
|
27
44
|
/**
|
|
28
45
|
* Updates the URL and/or subscribed events.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const webhookSubscription =
|
|
50
|
+
* await client.webhookSubscriptions.update(
|
|
51
|
+
* '550e8400-e29b-41d4-a716-446655440009',
|
|
52
|
+
* );
|
|
53
|
+
* ```
|
|
29
54
|
*/
|
|
30
55
|
update(
|
|
31
56
|
id: string,
|
|
@@ -37,6 +62,14 @@ export class WebhookSubscriptions extends APIResource {
|
|
|
37
62
|
|
|
38
63
|
/**
|
|
39
64
|
* Lists webhook subscriptions for the merchant with cursor-based pagination.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* // Automatically fetches more pages as needed.
|
|
69
|
+
* for await (const webhookSubscriptionListResponse of client.webhookSubscriptions.list()) {
|
|
70
|
+
* // ...
|
|
71
|
+
* }
|
|
72
|
+
* ```
|
|
40
73
|
*/
|
|
41
74
|
list(
|
|
42
75
|
query: WebhookSubscriptionListParams | null | undefined = {},
|
|
@@ -50,6 +83,14 @@ export class WebhookSubscriptions extends APIResource {
|
|
|
50
83
|
|
|
51
84
|
/**
|
|
52
85
|
* Permanently deletes a webhook subscription. This cannot be undone.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```ts
|
|
89
|
+
* const webhookSubscription =
|
|
90
|
+
* await client.webhookSubscriptions.delete(
|
|
91
|
+
* '550e8400-e29b-41d4-a716-446655440009',
|
|
92
|
+
* );
|
|
93
|
+
* ```
|
|
53
94
|
*/
|
|
54
95
|
delete(id: string, options?: RequestOptions): APIPromise<WebhookSubscriptionDeleteResponse> {
|
|
55
96
|
return this._client.delete(path`/v1/webhook_subscriptions/${id}`, options);
|
|
@@ -61,6 +102,14 @@ export class WebhookSubscriptions extends APIResource {
|
|
|
61
102
|
* and signature verification in any environment without creating a real business
|
|
62
103
|
* event. Test-event failures do not affect the subscription's health counters or
|
|
63
104
|
* trigger failure-notification emails.
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* ```ts
|
|
108
|
+
* const response =
|
|
109
|
+
* await client.webhookSubscriptions.sendTestEvent(
|
|
110
|
+
* '550e8400-e29b-41d4-a716-446655440009',
|
|
111
|
+
* );
|
|
112
|
+
* ```
|
|
64
113
|
*/
|
|
65
114
|
sendTestEvent(id: string, options?: RequestOptions): APIPromise<WebhookSubscriptionSendTestEventResponse> {
|
|
66
115
|
return this._client.post(path`/v1/webhook_subscriptions/${id}/send_test_event`, options);
|
|
@@ -383,7 +432,8 @@ export interface WebhookSubscriptionCreateParams {
|
|
|
383
432
|
|
|
384
433
|
export interface WebhookSubscriptionUpdateParams {
|
|
385
434
|
/**
|
|
386
|
-
*
|
|
435
|
+
* New event types. Omit or send null to keep the current events. Use ["*"] for all
|
|
436
|
+
* events.
|
|
387
437
|
*/
|
|
388
438
|
events?: Array<
|
|
389
439
|
| 'payout.created'
|
|
@@ -401,12 +451,12 @@ export interface WebhookSubscriptionUpdateParams {
|
|
|
401
451
|
| 'account_holder.active'
|
|
402
452
|
| 'account_holder.closed'
|
|
403
453
|
| '*'
|
|
404
|
-
|
|
454
|
+
> | null;
|
|
405
455
|
|
|
406
456
|
/**
|
|
407
|
-
* The HTTPS URL
|
|
457
|
+
* The new HTTPS URL. Omit or send null to keep the current URL.
|
|
408
458
|
*/
|
|
409
|
-
url?: string;
|
|
459
|
+
url?: string | null;
|
|
410
460
|
}
|
|
411
461
|
|
|
412
462
|
export interface WebhookSubscriptionListParams extends CursorPageParams {}
|