@augustusbank/typescript-sdk 0.23.0 → 0.25.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 +14 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/account-holders.d.mts +40 -0
- package/resources/account-holders.d.mts.map +1 -1
- package/resources/account-holders.d.ts +40 -0
- package/resources/account-holders.d.ts.map +1 -1
- package/resources/accounts.d.mts +58 -3
- package/resources/accounts.d.mts.map +1 -1
- package/resources/accounts.d.ts +58 -3
- package/resources/accounts.d.ts.map +1 -1
- package/resources/api-versions.d.mts +2 -0
- package/resources/api-versions.d.mts.map +1 -1
- package/resources/api-versions.d.ts +2 -0
- package/resources/api-versions.d.ts.map +1 -1
- package/resources/conversions.d.mts +12 -4
- package/resources/conversions.d.mts.map +1 -1
- package/resources/conversions.d.ts +12 -4
- package/resources/conversions.d.ts.map +1 -1
- package/resources/counterparties.d.mts +88 -0
- package/resources/counterparties.d.mts.map +1 -1
- package/resources/counterparties.d.ts +88 -0
- package/resources/counterparties.d.ts.map +1 -1
- package/resources/counterparties.js +40 -0
- package/resources/counterparties.js.map +1 -1
- package/resources/counterparties.mjs +40 -0
- package/resources/counterparties.mjs.map +1 -1
- package/resources/events.d.mts +3 -3
- package/resources/events.d.mts.map +1 -1
- package/resources/events.d.ts +3 -3
- package/resources/events.d.ts.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/payouts.d.mts +12 -4
- package/resources/payouts.d.mts.map +1 -1
- package/resources/payouts.d.ts +12 -4
- package/resources/payouts.d.ts.map +1 -1
- package/resources/returns.d.mts +32 -0
- package/resources/returns.d.mts.map +1 -1
- package/resources/returns.d.ts +32 -0
- package/resources/returns.d.ts.map +1 -1
- package/resources/scopes.d.mts +2 -0
- package/resources/scopes.d.mts.map +1 -1
- package/resources/scopes.d.ts +2 -0
- package/resources/scopes.d.ts.map +1 -1
- package/resources/simulations/account-programs.d.mts +1 -1
- package/resources/simulations/account-programs.d.ts +1 -1
- package/resources/simulations/account-programs.js +1 -1
- package/resources/simulations/account-programs.mjs +1 -1
- package/resources/simulations/accounts.d.mts +1 -1
- package/resources/simulations/accounts.d.ts +1 -1
- package/resources/simulations/accounts.js +1 -1
- package/resources/simulations/accounts.mjs +1 -1
- package/resources/simulations/counterparties.d.mts +32 -0
- package/resources/simulations/counterparties.d.mts.map +1 -0
- package/resources/simulations/counterparties.d.ts +32 -0
- package/resources/simulations/counterparties.d.ts.map +1 -0
- package/resources/simulations/counterparties.js +25 -0
- package/resources/simulations/counterparties.js.map +1 -0
- package/resources/simulations/counterparties.mjs +21 -0
- package/resources/simulations/counterparties.mjs.map +1 -0
- package/resources/simulations/deposits.d.mts +1 -1
- package/resources/simulations/deposits.d.ts +1 -1
- package/resources/simulations/deposits.js +1 -1
- package/resources/simulations/deposits.mjs +1 -1
- package/resources/simulations/index.d.mts +1 -0
- package/resources/simulations/index.d.mts.map +1 -1
- package/resources/simulations/index.d.ts +1 -0
- package/resources/simulations/index.d.ts.map +1 -1
- package/resources/simulations/index.js +3 -1
- package/resources/simulations/index.js.map +1 -1
- package/resources/simulations/index.mjs +1 -0
- package/resources/simulations/index.mjs.map +1 -1
- package/resources/simulations/simulations.d.mts +4 -0
- package/resources/simulations/simulations.d.mts.map +1 -1
- package/resources/simulations/simulations.d.ts +4 -0
- package/resources/simulations/simulations.d.ts.map +1 -1
- package/resources/simulations/simulations.js +4 -0
- package/resources/simulations/simulations.js.map +1 -1
- package/resources/simulations/simulations.mjs +4 -0
- package/resources/simulations/simulations.mjs.map +1 -1
- package/resources/webhook-subscriptions.d.mts +56 -8
- package/resources/webhook-subscriptions.d.mts.map +1 -1
- package/resources/webhook-subscriptions.d.ts +56 -8
- package/resources/webhook-subscriptions.d.ts.map +1 -1
- package/resources/webhooks.d.mts +1258 -10
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +1258 -10
- package/resources/webhooks.d.ts.map +1 -1
- package/src/client.ts +12 -0
- package/src/resources/account-holders.ts +35 -0
- package/src/resources/accounts.ts +51 -3
- package/src/resources/api-versions.ts +4 -0
- package/src/resources/conversions.ts +12 -4
- package/src/resources/counterparties.ts +82 -0
- package/src/resources/events.ts +18 -0
- package/src/resources/index.ts +6 -0
- package/src/resources/payouts.ts +12 -4
- package/src/resources/returns.ts +28 -0
- package/src/resources/scopes.ts +4 -0
- package/src/resources/simulations/account-programs.ts +1 -1
- package/src/resources/simulations/accounts.ts +1 -1
- package/src/resources/simulations/counterparties.ts +40 -0
- package/src/resources/simulations/deposits.ts +1 -1
- package/src/resources/simulations/index.ts +1 -0
- package/src/resources/simulations/simulations.ts +6 -0
- package/src/resources/webhook-subscriptions.ts +90 -0
- package/src/resources/webhooks.ts +3073 -8
- 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
|
@@ -157,6 +157,13 @@ export interface AccountCreateResponse {
|
|
|
157
157
|
*/
|
|
158
158
|
label: string;
|
|
159
159
|
|
|
160
|
+
/**
|
|
161
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
162
|
+
* information, such as correlating this resource with an object in your own
|
|
163
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
164
|
+
*/
|
|
165
|
+
metadata: { [key: string]: string };
|
|
166
|
+
|
|
160
167
|
/**
|
|
161
168
|
* Current status of the account.
|
|
162
169
|
*/
|
|
@@ -332,6 +339,13 @@ export interface AccountRetrieveResponse {
|
|
|
332
339
|
*/
|
|
333
340
|
label: string;
|
|
334
341
|
|
|
342
|
+
/**
|
|
343
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
344
|
+
* information, such as correlating this resource with an object in your own
|
|
345
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
346
|
+
*/
|
|
347
|
+
metadata: { [key: string]: string };
|
|
348
|
+
|
|
335
349
|
/**
|
|
336
350
|
* Current status of the account.
|
|
337
351
|
*/
|
|
@@ -507,6 +521,13 @@ export interface AccountListResponse {
|
|
|
507
521
|
*/
|
|
508
522
|
label: string;
|
|
509
523
|
|
|
524
|
+
/**
|
|
525
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
526
|
+
* information, such as correlating this resource with an object in your own
|
|
527
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
528
|
+
*/
|
|
529
|
+
metadata: { [key: string]: string };
|
|
530
|
+
|
|
510
531
|
/**
|
|
511
532
|
* Current status of the account.
|
|
512
533
|
*/
|
|
@@ -682,6 +703,13 @@ export interface AccountCloseResponse {
|
|
|
682
703
|
*/
|
|
683
704
|
label: string;
|
|
684
705
|
|
|
706
|
+
/**
|
|
707
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
708
|
+
* information, such as correlating this resource with an object in your own
|
|
709
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
710
|
+
*/
|
|
711
|
+
metadata: { [key: string]: string };
|
|
712
|
+
|
|
685
713
|
/**
|
|
686
714
|
* Current status of the account.
|
|
687
715
|
*/
|
|
@@ -857,6 +885,13 @@ export interface AccountFreezeResponse {
|
|
|
857
885
|
*/
|
|
858
886
|
label: string;
|
|
859
887
|
|
|
888
|
+
/**
|
|
889
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
890
|
+
* information, such as correlating this resource with an object in your own
|
|
891
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
892
|
+
*/
|
|
893
|
+
metadata: { [key: string]: string };
|
|
894
|
+
|
|
860
895
|
/**
|
|
861
896
|
* Current status of the account.
|
|
862
897
|
*/
|
|
@@ -1070,6 +1105,13 @@ export interface AccountUnfreezeResponse {
|
|
|
1070
1105
|
*/
|
|
1071
1106
|
label: string;
|
|
1072
1107
|
|
|
1108
|
+
/**
|
|
1109
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
1110
|
+
* information, such as correlating this resource with an object in your own
|
|
1111
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
1112
|
+
*/
|
|
1113
|
+
metadata: { [key: string]: string };
|
|
1114
|
+
|
|
1073
1115
|
/**
|
|
1074
1116
|
* Current status of the account.
|
|
1075
1117
|
*/
|
|
@@ -1217,17 +1259,23 @@ export interface AccountCreateParams {
|
|
|
1217
1259
|
* ID of the account program to create the account under.
|
|
1218
1260
|
*/
|
|
1219
1261
|
account_program_id: string;
|
|
1262
|
+
|
|
1263
|
+
/**
|
|
1264
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
1265
|
+
* information, such as correlating this resource with an object in your own
|
|
1266
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
1267
|
+
*/
|
|
1268
|
+
metadata?: { [key: string]: string } | null;
|
|
1220
1269
|
}
|
|
1221
1270
|
|
|
1222
1271
|
export interface AccountListParams extends CursorPageParams {
|
|
1223
1272
|
/**
|
|
1224
|
-
* Filter by account holder name (case-insensitive phrase match).
|
|
1225
|
-
* are excluded when set.
|
|
1273
|
+
* Filter by account holder name (case-insensitive phrase match).
|
|
1226
1274
|
*/
|
|
1227
1275
|
account_holder_name?: string;
|
|
1228
1276
|
|
|
1229
1277
|
/**
|
|
1230
|
-
* Filter by exact fiat account number.
|
|
1278
|
+
* Filter by exact fiat account number.
|
|
1231
1279
|
*/
|
|
1232
1280
|
account_number?: string;
|
|
1233
1281
|
|
|
@@ -78,7 +78,9 @@ export interface ConversionCreateResponse {
|
|
|
78
78
|
created_at: string;
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
81
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
82
|
+
* information, such as correlating this resource with an object in your own
|
|
83
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
82
84
|
*/
|
|
83
85
|
metadata: { [key: string]: string };
|
|
84
86
|
|
|
@@ -135,7 +137,9 @@ export interface ConversionRetrieveResponse {
|
|
|
135
137
|
created_at: string;
|
|
136
138
|
|
|
137
139
|
/**
|
|
138
|
-
*
|
|
140
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
141
|
+
* information, such as correlating this resource with an object in your own
|
|
142
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
139
143
|
*/
|
|
140
144
|
metadata: { [key: string]: string };
|
|
141
145
|
|
|
@@ -192,7 +196,9 @@ export interface ConversionListResponse {
|
|
|
192
196
|
created_at: string;
|
|
193
197
|
|
|
194
198
|
/**
|
|
195
|
-
*
|
|
199
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
200
|
+
* information, such as correlating this resource with an object in your own
|
|
201
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
196
202
|
*/
|
|
197
203
|
metadata: { [key: string]: string };
|
|
198
204
|
|
|
@@ -249,7 +255,9 @@ export interface ConversionCreateParams {
|
|
|
249
255
|
target_account_id: string;
|
|
250
256
|
|
|
251
257
|
/**
|
|
252
|
-
*
|
|
258
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
259
|
+
* information, such as correlating this resource with an object in your own
|
|
260
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
253
261
|
*/
|
|
254
262
|
metadata?: { [key: string]: string } | null;
|
|
255
263
|
}
|
|
@@ -9,6 +9,17 @@ import { path } from '../internal/utils/path';
|
|
|
9
9
|
export class Counterparties extends APIResource {
|
|
10
10
|
/**
|
|
11
11
|
* Creates a counterparty owned by the merchant.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const counterparty = await client.counterparties.create({
|
|
16
|
+
* financial_address: {
|
|
17
|
+
* account_holder_name: 'Acme Sandbox Ltd.',
|
|
18
|
+
* iban: 'DE89370400440532013000',
|
|
19
|
+
* type: 'iban',
|
|
20
|
+
* },
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
12
23
|
*/
|
|
13
24
|
create(body: CounterpartyCreateParams, options?: RequestOptions): APIPromise<CounterpartyCreateResponse> {
|
|
14
25
|
return this._client.post('/v1/counterparties', { body, ...options });
|
|
@@ -16,6 +27,13 @@ export class Counterparties extends APIResource {
|
|
|
16
27
|
|
|
17
28
|
/**
|
|
18
29
|
* Retrieves a counterparty owned by the merchant.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```ts
|
|
33
|
+
* const counterparty = await client.counterparties.retrieve(
|
|
34
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
35
|
+
* );
|
|
36
|
+
* ```
|
|
19
37
|
*/
|
|
20
38
|
retrieve(id: string, options?: RequestOptions): APIPromise<CounterpartyRetrieveResponse> {
|
|
21
39
|
return this._client.get(path`/v1/counterparties/${id}`, options);
|
|
@@ -23,6 +41,13 @@ export class Counterparties extends APIResource {
|
|
|
23
41
|
|
|
24
42
|
/**
|
|
25
43
|
* Updates the mutable details of a counterparty owned by the merchant.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const counterparty = await client.counterparties.update(
|
|
48
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
49
|
+
* );
|
|
50
|
+
* ```
|
|
26
51
|
*/
|
|
27
52
|
update(
|
|
28
53
|
id: string,
|
|
@@ -34,6 +59,14 @@ export class Counterparties extends APIResource {
|
|
|
34
59
|
|
|
35
60
|
/**
|
|
36
61
|
* Lists counterparties owned by the merchant with cursor-based pagination.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* // Automatically fetches more pages as needed.
|
|
66
|
+
* for await (const counterpartyListResponse of client.counterparties.list()) {
|
|
67
|
+
* // ...
|
|
68
|
+
* }
|
|
69
|
+
* ```
|
|
37
70
|
*/
|
|
38
71
|
list(
|
|
39
72
|
query: CounterpartyListParams | null | undefined = {},
|
|
@@ -48,6 +81,13 @@ export class Counterparties extends APIResource {
|
|
|
48
81
|
/**
|
|
49
82
|
* Blocks payments to and from a counterparty owned by the merchant. Blocking an
|
|
50
83
|
* already-blocked counterparty succeeds without changing the existing block.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```ts
|
|
87
|
+
* const response = await client.counterparties.block(
|
|
88
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
89
|
+
* );
|
|
90
|
+
* ```
|
|
51
91
|
*/
|
|
52
92
|
block(id: string, options?: RequestOptions): APIPromise<CounterpartyBlockResponse> {
|
|
53
93
|
return this._client.post(path`/v1/counterparties/${id}/block`, options);
|
|
@@ -93,6 +133,13 @@ export interface CounterpartyCreateResponse {
|
|
|
93
133
|
*/
|
|
94
134
|
is_self_owned: boolean;
|
|
95
135
|
|
|
136
|
+
/**
|
|
137
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
138
|
+
* information, such as correlating this resource with an object in your own
|
|
139
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
140
|
+
*/
|
|
141
|
+
metadata: { [key: string]: string };
|
|
142
|
+
|
|
96
143
|
/**
|
|
97
144
|
* Name of the counterparty, or null if not recorded.
|
|
98
145
|
*/
|
|
@@ -552,6 +599,13 @@ export interface CounterpartyRetrieveResponse {
|
|
|
552
599
|
*/
|
|
553
600
|
is_self_owned: boolean;
|
|
554
601
|
|
|
602
|
+
/**
|
|
603
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
604
|
+
* information, such as correlating this resource with an object in your own
|
|
605
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
606
|
+
*/
|
|
607
|
+
metadata: { [key: string]: string };
|
|
608
|
+
|
|
555
609
|
/**
|
|
556
610
|
* Name of the counterparty, or null if not recorded.
|
|
557
611
|
*/
|
|
@@ -1011,6 +1065,13 @@ export interface CounterpartyUpdateResponse {
|
|
|
1011
1065
|
*/
|
|
1012
1066
|
is_self_owned: boolean;
|
|
1013
1067
|
|
|
1068
|
+
/**
|
|
1069
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
1070
|
+
* information, such as correlating this resource with an object in your own
|
|
1071
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
1072
|
+
*/
|
|
1073
|
+
metadata: { [key: string]: string };
|
|
1074
|
+
|
|
1014
1075
|
/**
|
|
1015
1076
|
* Name of the counterparty, or null if not recorded.
|
|
1016
1077
|
*/
|
|
@@ -1470,6 +1531,13 @@ export interface CounterpartyListResponse {
|
|
|
1470
1531
|
*/
|
|
1471
1532
|
is_self_owned: boolean;
|
|
1472
1533
|
|
|
1534
|
+
/**
|
|
1535
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
1536
|
+
* information, such as correlating this resource with an object in your own
|
|
1537
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
1538
|
+
*/
|
|
1539
|
+
metadata: { [key: string]: string };
|
|
1540
|
+
|
|
1473
1541
|
/**
|
|
1474
1542
|
* Name of the counterparty, or null if not recorded.
|
|
1475
1543
|
*/
|
|
@@ -1929,6 +1997,13 @@ export interface CounterpartyBlockResponse {
|
|
|
1929
1997
|
*/
|
|
1930
1998
|
is_self_owned: boolean;
|
|
1931
1999
|
|
|
2000
|
+
/**
|
|
2001
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
2002
|
+
* information, such as correlating this resource with an object in your own
|
|
2003
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
2004
|
+
*/
|
|
2005
|
+
metadata: { [key: string]: string };
|
|
2006
|
+
|
|
1932
2007
|
/**
|
|
1933
2008
|
* Name of the counterparty, or null if not recorded.
|
|
1934
2009
|
*/
|
|
@@ -2378,6 +2453,13 @@ export interface CounterpartyCreateParams {
|
|
|
2378
2453
|
*/
|
|
2379
2454
|
is_self_owned?: boolean;
|
|
2380
2455
|
|
|
2456
|
+
/**
|
|
2457
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
2458
|
+
* information, such as correlating this resource with an object in your own
|
|
2459
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
2460
|
+
*/
|
|
2461
|
+
metadata?: { [key: string]: string } | null;
|
|
2462
|
+
|
|
2381
2463
|
/**
|
|
2382
2464
|
* Name of the counterparty.
|
|
2383
2465
|
*/
|
package/src/resources/events.ts
CHANGED
|
@@ -71,6 +71,12 @@ export interface EventRetrieveResponse {
|
|
|
71
71
|
| 'conversion.failed'
|
|
72
72
|
| 'account_holder.active'
|
|
73
73
|
| 'account_holder.closed'
|
|
74
|
+
| 'counterparty.created'
|
|
75
|
+
| 'counterparty.verified'
|
|
76
|
+
| 'counterparty.rejected'
|
|
77
|
+
| 'counterparty.blocked'
|
|
78
|
+
| 'counterparty.unblocked'
|
|
79
|
+
| 'counterparty.updated'
|
|
74
80
|
| 'ping.test';
|
|
75
81
|
|
|
76
82
|
/**
|
|
@@ -122,6 +128,12 @@ export interface EventListResponse {
|
|
|
122
128
|
| 'conversion.failed'
|
|
123
129
|
| 'account_holder.active'
|
|
124
130
|
| 'account_holder.closed'
|
|
131
|
+
| 'counterparty.created'
|
|
132
|
+
| 'counterparty.verified'
|
|
133
|
+
| 'counterparty.rejected'
|
|
134
|
+
| 'counterparty.blocked'
|
|
135
|
+
| 'counterparty.unblocked'
|
|
136
|
+
| 'counterparty.updated'
|
|
125
137
|
| 'ping.test';
|
|
126
138
|
|
|
127
139
|
/**
|
|
@@ -153,6 +165,12 @@ export interface EventListParams extends CursorPageParams {
|
|
|
153
165
|
| 'conversion.failed'
|
|
154
166
|
| 'account_holder.active'
|
|
155
167
|
| 'account_holder.closed'
|
|
168
|
+
| 'counterparty.created'
|
|
169
|
+
| 'counterparty.verified'
|
|
170
|
+
| 'counterparty.rejected'
|
|
171
|
+
| 'counterparty.blocked'
|
|
172
|
+
| 'counterparty.unblocked'
|
|
173
|
+
| 'counterparty.updated'
|
|
156
174
|
| 'ping.test';
|
|
157
175
|
}
|
|
158
176
|
|
package/src/resources/index.ts
CHANGED
|
@@ -139,6 +139,12 @@ export {
|
|
|
139
139
|
type ConversionFailedWebhookEvent,
|
|
140
140
|
type AccountHolderActiveWebhookEvent,
|
|
141
141
|
type AccountHolderClosedWebhookEvent,
|
|
142
|
+
type CounterpartyCreatedWebhookEvent,
|
|
143
|
+
type CounterpartyVerifiedWebhookEvent,
|
|
144
|
+
type CounterpartyRejectedWebhookEvent,
|
|
145
|
+
type CounterpartyBlockedWebhookEvent,
|
|
146
|
+
type CounterpartyUnblockedWebhookEvent,
|
|
147
|
+
type CounterpartyUpdatedWebhookEvent,
|
|
142
148
|
type PingTestWebhookEvent,
|
|
143
149
|
type UnwrapWebhookEvent,
|
|
144
150
|
} from './webhooks';
|
package/src/resources/payouts.ts
CHANGED
|
@@ -96,7 +96,9 @@ export interface PayoutCreateResponse {
|
|
|
96
96
|
initiated_at: string;
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
|
-
*
|
|
99
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
100
|
+
* information, such as correlating this resource with an object in your own
|
|
101
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
100
102
|
*/
|
|
101
103
|
metadata: { [key: string]: string };
|
|
102
104
|
|
|
@@ -230,7 +232,9 @@ export interface PayoutRetrieveResponse {
|
|
|
230
232
|
initiated_at: string;
|
|
231
233
|
|
|
232
234
|
/**
|
|
233
|
-
*
|
|
235
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
236
|
+
* information, such as correlating this resource with an object in your own
|
|
237
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
234
238
|
*/
|
|
235
239
|
metadata: { [key: string]: string };
|
|
236
240
|
|
|
@@ -364,7 +368,9 @@ export interface PayoutListResponse {
|
|
|
364
368
|
initiated_at: string;
|
|
365
369
|
|
|
366
370
|
/**
|
|
367
|
-
*
|
|
371
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
372
|
+
* information, such as correlating this resource with an object in your own
|
|
373
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
368
374
|
*/
|
|
369
375
|
metadata: { [key: string]: string };
|
|
370
376
|
|
|
@@ -483,7 +489,9 @@ export interface PayoutCreateParams {
|
|
|
483
489
|
currency: 'EUR' | 'GBP' | 'USD' | 'USDC';
|
|
484
490
|
|
|
485
491
|
/**
|
|
486
|
-
*
|
|
492
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
493
|
+
* information, such as correlating this resource with an object in your own
|
|
494
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
487
495
|
*/
|
|
488
496
|
metadata?: { [key: string]: string } | null;
|
|
489
497
|
|
package/src/resources/returns.ts
CHANGED
|
@@ -87,6 +87,13 @@ export interface ReturnCreateResponse {
|
|
|
87
87
|
*/
|
|
88
88
|
initiated_at: string;
|
|
89
89
|
|
|
90
|
+
/**
|
|
91
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
92
|
+
* information, such as correlating this resource with an object in your own
|
|
93
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
94
|
+
*/
|
|
95
|
+
metadata: { [key: string]: string };
|
|
96
|
+
|
|
90
97
|
/**
|
|
91
98
|
* Payment scheme or blockchain used for the return, or null when unknown.
|
|
92
99
|
*/
|
|
@@ -199,6 +206,13 @@ export interface ReturnRetrieveResponse {
|
|
|
199
206
|
*/
|
|
200
207
|
initiated_at: string;
|
|
201
208
|
|
|
209
|
+
/**
|
|
210
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
211
|
+
* information, such as correlating this resource with an object in your own
|
|
212
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
213
|
+
*/
|
|
214
|
+
metadata: { [key: string]: string };
|
|
215
|
+
|
|
202
216
|
/**
|
|
203
217
|
* Payment scheme or blockchain used for the return, or null when unknown.
|
|
204
218
|
*/
|
|
@@ -311,6 +325,13 @@ export interface ReturnListResponse {
|
|
|
311
325
|
*/
|
|
312
326
|
initiated_at: string;
|
|
313
327
|
|
|
328
|
+
/**
|
|
329
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
330
|
+
* information, such as correlating this resource with an object in your own
|
|
331
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
332
|
+
*/
|
|
333
|
+
metadata: { [key: string]: string };
|
|
334
|
+
|
|
314
335
|
/**
|
|
315
336
|
* Payment scheme or blockchain used for the return, or null when unknown.
|
|
316
337
|
*/
|
|
@@ -397,6 +418,13 @@ export interface ReturnCreateParams {
|
|
|
397
418
|
* Deposit to return funds from.
|
|
398
419
|
*/
|
|
399
420
|
deposit_id: string;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Set of up to 50 key-value string pairs you can attach to store structured
|
|
424
|
+
* information, such as correlating this resource with an object in your own
|
|
425
|
+
* system. Keys may be up to 40 characters and values up to 500 characters.
|
|
426
|
+
*/
|
|
427
|
+
metadata?: { [key: string]: string } | null;
|
|
400
428
|
}
|
|
401
429
|
|
|
402
430
|
export interface ReturnListParams extends CursorPageParams {
|
package/src/resources/scopes.ts
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
import { path } from '../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class Counterparties extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Submits a rejected provider decision for an existing counterparty with a pending
|
|
11
|
+
* verification attempt. This endpoint is unavailable in live production.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const response =
|
|
16
|
+
* await client.simulations.counterparties.reject(
|
|
17
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
18
|
+
* );
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
reject(id: string, options?: RequestOptions): APIPromise<CounterpartyRejectResponse> {
|
|
22
|
+
return this._client.post(path`/v1/simulations/counterparties/${id}/reject`, options);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface CounterpartyRejectResponse {
|
|
27
|
+
/**
|
|
28
|
+
* Counterparty whose verification is being simulated.
|
|
29
|
+
*/
|
|
30
|
+
counterparty_id: string;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Resource type discriminator.
|
|
34
|
+
*/
|
|
35
|
+
type: 'counterparty_simulation';
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export declare namespace Counterparties {
|
|
39
|
+
export { type CounterpartyRejectResponse as CounterpartyRejectResponse };
|
|
40
|
+
}
|
|
@@ -13,7 +13,7 @@ export class Deposits extends APIResource {
|
|
|
13
13
|
* ```ts
|
|
14
14
|
* const deposit = await client.simulations.deposits.create({
|
|
15
15
|
* account_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
16
|
-
* amount: '
|
|
16
|
+
* amount: '100.50',
|
|
17
17
|
* currency: 'EUR',
|
|
18
18
|
* });
|
|
19
19
|
* ```
|
|
@@ -23,6 +23,7 @@ export {
|
|
|
23
23
|
type AccountDrainParams,
|
|
24
24
|
} from './accounts';
|
|
25
25
|
export { Conversions, type ConversionCompleteResponse, type ConversionFailResponse } from './conversions';
|
|
26
|
+
export { Counterparties, type CounterpartyRejectResponse } from './counterparties';
|
|
26
27
|
export { Deposits, type DepositCreateResponse, type DepositCreateParams } from './deposits';
|
|
27
28
|
export {
|
|
28
29
|
Payouts,
|
|
@@ -27,6 +27,8 @@ import {
|
|
|
27
27
|
} from './accounts';
|
|
28
28
|
import * as ConversionsAPI from './conversions';
|
|
29
29
|
import { ConversionCompleteResponse, ConversionFailResponse, Conversions } from './conversions';
|
|
30
|
+
import * as CounterpartiesAPI from './counterparties';
|
|
31
|
+
import { Counterparties, CounterpartyRejectResponse } from './counterparties';
|
|
30
32
|
import * as DepositsAPI from './deposits';
|
|
31
33
|
import { DepositCreateParams, DepositCreateResponse, Deposits } from './deposits';
|
|
32
34
|
import * as PayoutsAPI from './payouts';
|
|
@@ -51,6 +53,7 @@ import {
|
|
|
51
53
|
export class Simulations extends APIResource {
|
|
52
54
|
deposits: DepositsAPI.Deposits = new DepositsAPI.Deposits(this._client);
|
|
53
55
|
conversions: ConversionsAPI.Conversions = new ConversionsAPI.Conversions(this._client);
|
|
56
|
+
counterparties: CounterpartiesAPI.Counterparties = new CounterpartiesAPI.Counterparties(this._client);
|
|
54
57
|
payouts: PayoutsAPI.Payouts = new PayoutsAPI.Payouts(this._client);
|
|
55
58
|
returns: ReturnsAPI.Returns = new ReturnsAPI.Returns(this._client);
|
|
56
59
|
accountPrograms: AccountProgramsAPI.AccountPrograms = new AccountProgramsAPI.AccountPrograms(this._client);
|
|
@@ -59,6 +62,7 @@ export class Simulations extends APIResource {
|
|
|
59
62
|
|
|
60
63
|
Simulations.Deposits = Deposits;
|
|
61
64
|
Simulations.Conversions = Conversions;
|
|
65
|
+
Simulations.Counterparties = Counterparties;
|
|
62
66
|
Simulations.Payouts = Payouts;
|
|
63
67
|
Simulations.Returns = Returns;
|
|
64
68
|
Simulations.AccountPrograms = AccountPrograms;
|
|
@@ -77,6 +81,8 @@ export declare namespace Simulations {
|
|
|
77
81
|
type ConversionFailResponse as ConversionFailResponse,
|
|
78
82
|
};
|
|
79
83
|
|
|
84
|
+
export { Counterparties as Counterparties, type CounterpartyRejectResponse as CounterpartyRejectResponse };
|
|
85
|
+
|
|
80
86
|
export {
|
|
81
87
|
Payouts as Payouts,
|
|
82
88
|
type PayoutRejectResponse as PayoutRejectResponse,
|