modern-treasury 3.3.0 → 4.4.2
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 +193 -0
- package/LICENSE +1 -1
- package/README.md +14 -5
- package/client.d.mts +16 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +16 -6
- package/client.d.ts.map +1 -1
- package/client.js +27 -3
- package/client.js.map +1 -1
- package/client.mjs +27 -3
- package/client.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js +5 -0
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +5 -0
- package/internal/parse.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/account-details.d.mts +4 -4
- package/resources/account-details.d.mts.map +1 -1
- package/resources/account-details.d.ts +4 -4
- package/resources/account-details.d.ts.map +1 -1
- package/resources/bulk-requests.d.mts +57 -4
- package/resources/bulk-requests.d.mts.map +1 -1
- package/resources/bulk-requests.d.ts +57 -4
- package/resources/bulk-requests.d.ts.map +1 -1
- package/resources/connection-legal-entities.d.mts +88 -21
- package/resources/connection-legal-entities.d.mts.map +1 -1
- package/resources/connection-legal-entities.d.ts +88 -21
- package/resources/connection-legal-entities.d.ts.map +1 -1
- package/resources/counterparties.d.mts +91 -20
- package/resources/counterparties.d.mts.map +1 -1
- package/resources/counterparties.d.ts +91 -20
- package/resources/counterparties.d.ts.map +1 -1
- package/resources/documents.d.mts +8 -8
- package/resources/documents.d.mts.map +1 -1
- package/resources/documents.d.ts +8 -8
- package/resources/documents.d.ts.map +1 -1
- package/resources/expected-payments.d.mts +60 -0
- package/resources/expected-payments.d.mts.map +1 -1
- package/resources/expected-payments.d.ts +60 -0
- package/resources/expected-payments.d.ts.map +1 -1
- package/resources/external-accounts.d.mts +1 -1
- package/resources/external-accounts.d.mts.map +1 -1
- package/resources/external-accounts.d.ts +1 -1
- package/resources/external-accounts.d.ts.map +1 -1
- package/resources/holds.d.mts +261 -0
- package/resources/holds.d.mts.map +1 -0
- package/resources/holds.d.ts +261 -0
- package/resources/holds.d.ts.map +1 -0
- package/resources/holds.js +35 -0
- package/resources/holds.js.map +1 -0
- package/resources/holds.mjs +31 -0
- package/resources/holds.mjs.map +1 -0
- package/resources/incoming-payment-details.d.mts +17 -4
- package/resources/incoming-payment-details.d.mts.map +1 -1
- package/resources/incoming-payment-details.d.ts +17 -4
- package/resources/incoming-payment-details.d.ts.map +1 -1
- package/resources/index.d.mts +4 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/internal-accounts/internal-accounts.d.mts +35 -0
- package/resources/internal-accounts/internal-accounts.d.mts.map +1 -1
- package/resources/internal-accounts/internal-accounts.d.ts +35 -0
- package/resources/internal-accounts/internal-accounts.d.ts.map +1 -1
- package/resources/internal-accounts/internal-accounts.js +12 -0
- package/resources/internal-accounts/internal-accounts.js.map +1 -1
- package/resources/internal-accounts/internal-accounts.mjs +12 -0
- package/resources/internal-accounts/internal-accounts.mjs.map +1 -1
- package/resources/invoices/invoices.d.mts +1 -21
- package/resources/invoices/invoices.d.mts.map +1 -1
- package/resources/invoices/invoices.d.ts +1 -21
- package/resources/invoices/invoices.d.ts.map +1 -1
- package/resources/invoices/invoices.js.map +1 -1
- package/resources/invoices/invoices.mjs.map +1 -1
- package/resources/journal-entries.d.mts +31 -0
- package/resources/journal-entries.d.mts.map +1 -0
- package/resources/journal-entries.d.ts +31 -0
- package/resources/journal-entries.d.ts.map +1 -0
- package/resources/journal-entries.js +30 -0
- package/resources/journal-entries.js.map +1 -0
- package/resources/journal-entries.mjs +26 -0
- package/resources/journal-entries.mjs.map +1 -0
- package/resources/journal-reports.d.mts +25 -0
- package/resources/journal-reports.d.mts.map +1 -0
- package/resources/journal-reports.d.ts +25 -0
- package/resources/journal-reports.d.ts.map +1 -0
- package/resources/journal-reports.js +39 -0
- package/resources/journal-reports.js.map +1 -0
- package/resources/journal-reports.mjs +35 -0
- package/resources/journal-reports.mjs.map +1 -0
- package/resources/ledger-account-categories.d.mts +9 -5
- package/resources/ledger-account-categories.d.mts.map +1 -1
- package/resources/ledger-account-categories.d.ts +9 -5
- package/resources/ledger-account-categories.d.ts.map +1 -1
- package/resources/ledger-accounts.d.mts +8 -0
- package/resources/ledger-accounts.d.mts.map +1 -1
- package/resources/ledger-accounts.d.ts +8 -0
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/ledger-entries.d.mts +6 -1
- package/resources/ledger-entries.d.mts.map +1 -1
- package/resources/ledger-entries.d.ts +6 -1
- package/resources/ledger-entries.d.ts.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.d.mts +5 -0
- package/resources/ledger-transactions/ledger-transactions.d.mts.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.d.ts +5 -0
- package/resources/ledger-transactions/ledger-transactions.d.ts.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.js.map +1 -1
- package/resources/ledger-transactions/ledger-transactions.mjs.map +1 -1
- package/resources/ledger-transactions/versions.d.mts +5 -0
- package/resources/ledger-transactions/versions.d.mts.map +1 -1
- package/resources/ledger-transactions/versions.d.ts +5 -0
- package/resources/ledger-transactions/versions.d.ts.map +1 -1
- package/resources/legal-entities.d.mts +264 -29
- package/resources/legal-entities.d.mts.map +1 -1
- package/resources/legal-entities.d.ts +264 -29
- package/resources/legal-entities.d.ts.map +1 -1
- package/resources/legal-entities.js.map +1 -1
- package/resources/legal-entities.mjs.map +1 -1
- package/resources/legal-entity-associations.d.mts +314 -230
- package/resources/legal-entity-associations.d.mts.map +1 -1
- package/resources/legal-entity-associations.d.ts +314 -230
- package/resources/legal-entity-associations.d.ts.map +1 -1
- package/resources/legal-entity-associations.js.map +1 -1
- package/resources/legal-entity-associations.mjs.map +1 -1
- package/resources/payment-orders/payment-orders.d.mts +31 -14
- package/resources/payment-orders/payment-orders.d.mts.map +1 -1
- package/resources/payment-orders/payment-orders.d.ts +31 -14
- package/resources/payment-orders/payment-orders.d.ts.map +1 -1
- package/resources/payment-orders/payment-orders.js.map +1 -1
- package/resources/payment-orders/payment-orders.mjs.map +1 -1
- package/resources/payment-orders/reversals.d.mts +4 -0
- package/resources/payment-orders/reversals.d.mts.map +1 -1
- package/resources/payment-orders/reversals.d.ts +4 -0
- package/resources/payment-orders/reversals.d.ts.map +1 -1
- package/resources/payment-references.d.mts +1 -1
- package/resources/payment-references.d.mts.map +1 -1
- package/resources/payment-references.d.ts +1 -1
- package/resources/payment-references.d.ts.map +1 -1
- package/resources/returns.d.mts +3 -3
- package/resources/returns.d.mts.map +1 -1
- package/resources/returns.d.ts +3 -3
- package/resources/returns.d.ts.map +1 -1
- package/resources/routing-details.d.mts +2 -2
- package/resources/routing-details.d.ts +2 -2
- package/resources/shared.d.mts +112 -30
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +112 -30
- package/resources/shared.d.ts.map +1 -1
- package/resources/transactions/transactions.d.mts +1 -1
- package/resources/transactions/transactions.d.mts.map +1 -1
- package/resources/transactions/transactions.d.ts +1 -1
- package/resources/transactions/transactions.d.ts.map +1 -1
- package/resources/transactions/transactions.js.map +1 -1
- package/resources/transactions/transactions.mjs.map +1 -1
- package/resources/virtual-accounts.d.mts +1 -1
- package/resources/virtual-accounts.d.mts.map +1 -1
- package/resources/virtual-accounts.d.ts +1 -1
- package/resources/virtual-accounts.d.ts.map +1 -1
- package/src/client.ts +65 -8
- package/src/internal/parse.ts +6 -0
- package/src/resources/account-details.ts +4 -2
- package/src/resources/bulk-requests.ts +68 -2
- package/src/resources/connection-legal-entities.ts +107 -21
- package/src/resources/counterparties.ts +111 -19
- package/src/resources/documents.ts +19 -15
- package/src/resources/expected-payments.ts +72 -0
- package/src/resources/external-accounts.ts +1 -0
- package/src/resources/holds.ts +336 -0
- package/src/resources/incoming-payment-details.ts +35 -3
- package/src/resources/index.ts +14 -0
- package/src/resources/internal-accounts/internal-accounts.ts +44 -0
- package/src/resources/invoices/invoices.ts +1 -25
- package/src/resources/journal-entries.ts +51 -0
- package/src/resources/journal-reports.ts +54 -0
- package/src/resources/ledger-account-categories.ts +11 -5
- package/src/resources/ledger-accounts.ts +10 -0
- package/src/resources/ledger-entries.ts +7 -1
- package/src/resources/ledger-transactions/ledger-transactions.ts +6 -0
- package/src/resources/ledger-transactions/versions.ts +6 -0
- package/src/resources/legal-entities.ts +332 -27
- package/src/resources/legal-entity-associations.ts +502 -390
- package/src/resources/payment-orders/payment-orders.ts +48 -19
- package/src/resources/payment-orders/reversals.ts +5 -0
- package/src/resources/payment-references.ts +8 -3
- package/src/resources/returns.ts +11 -5
- package/src/resources/routing-details.ts +2 -2
- package/src/resources/shared.ts +138 -36
- package/src/resources/transactions/transactions.ts +2 -1
- package/src/resources/virtual-accounts.ts +1 -0
- 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
package/src/internal/parse.ts
CHANGED
|
@@ -29,6 +29,12 @@ export async function defaultParseResponse<T>(client: ModernTreasury, props: API
|
|
|
29
29
|
const mediaType = contentType?.split(';')[0]?.trim();
|
|
30
30
|
const isJSON = mediaType?.includes('application/json') || mediaType?.endsWith('+json');
|
|
31
31
|
if (isJSON) {
|
|
32
|
+
const contentLength = response.headers.get('content-length');
|
|
33
|
+
if (contentLength === '0') {
|
|
34
|
+
// if there is no content we can't do anything
|
|
35
|
+
return undefined as T;
|
|
36
|
+
}
|
|
37
|
+
|
|
32
38
|
const json = await response.json();
|
|
33
39
|
return json as T;
|
|
34
40
|
}
|
|
@@ -78,6 +78,7 @@ export interface AccountDetail {
|
|
|
78
78
|
account_number_type:
|
|
79
79
|
| 'au_number'
|
|
80
80
|
| 'base_address'
|
|
81
|
+
| 'card_token'
|
|
81
82
|
| 'clabe'
|
|
82
83
|
| 'ethereum_address'
|
|
83
84
|
| 'hk_number'
|
|
@@ -113,7 +114,7 @@ export interface AccountDetail {
|
|
|
113
114
|
|
|
114
115
|
export interface AccountDetailCreateParams {
|
|
115
116
|
/**
|
|
116
|
-
* Path param
|
|
117
|
+
* Path param
|
|
117
118
|
*/
|
|
118
119
|
accounts_type: 'external_accounts';
|
|
119
120
|
|
|
@@ -129,6 +130,7 @@ export interface AccountDetailCreateParams {
|
|
|
129
130
|
account_number_type?:
|
|
130
131
|
| 'au_number'
|
|
131
132
|
| 'base_address'
|
|
133
|
+
| 'card_token'
|
|
132
134
|
| 'clabe'
|
|
133
135
|
| 'ethereum_address'
|
|
134
136
|
| 'hk_number'
|
|
@@ -154,7 +156,7 @@ export interface AccountDetailRetrieveParams {
|
|
|
154
156
|
|
|
155
157
|
export interface AccountDetailListParams extends PageParams {
|
|
156
158
|
/**
|
|
157
|
-
* Path param
|
|
159
|
+
* Path param
|
|
158
160
|
*/
|
|
159
161
|
accounts_type: Shared.AccountsType;
|
|
160
162
|
}
|
|
@@ -247,6 +247,11 @@ export namespace BulkRequestCreateParams {
|
|
|
247
247
|
*/
|
|
248
248
|
expires_at?: string | null;
|
|
249
249
|
|
|
250
|
+
/**
|
|
251
|
+
* An optional user-defined 180 character unique identifier.
|
|
252
|
+
*/
|
|
253
|
+
external_id?: string | null;
|
|
254
|
+
|
|
250
255
|
/**
|
|
251
256
|
* A payment type to fallback to if the original type is not valid for the
|
|
252
257
|
* receiving account. Currently, this only supports falling back from RTP to ACH
|
|
@@ -382,8 +387,8 @@ export namespace BulkRequestCreateParams {
|
|
|
382
387
|
subtype?: PaymentOrdersAPI.PaymentOrderSubtype | null;
|
|
383
388
|
|
|
384
389
|
/**
|
|
385
|
-
* A flag that determines whether a payment order should go through
|
|
386
|
-
* monitoring.
|
|
390
|
+
* @deprecated A flag that determines whether a payment order should go through
|
|
391
|
+
* transaction monitoring.
|
|
387
392
|
*/
|
|
388
393
|
transaction_monitoring_enabled?: boolean;
|
|
389
394
|
|
|
@@ -526,6 +531,7 @@ export namespace BulkRequestCreateParams {
|
|
|
526
531
|
account_number_type?:
|
|
527
532
|
| 'au_number'
|
|
528
533
|
| 'base_address'
|
|
534
|
+
| 'card_token'
|
|
529
535
|
| 'clabe'
|
|
530
536
|
| 'ethereum_address'
|
|
531
537
|
| 'hk_number'
|
|
@@ -614,6 +620,30 @@ export namespace BulkRequestCreateParams {
|
|
|
614
620
|
*/
|
|
615
621
|
amount_lower_bound?: number | null;
|
|
616
622
|
|
|
623
|
+
/**
|
|
624
|
+
* The amount reconciled for this expected payment. Value in specified currency's
|
|
625
|
+
* smallest unit. e.g. $10 would be represented as 1000.
|
|
626
|
+
*/
|
|
627
|
+
amount_reconciled?: number | null;
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* One of credit or debit. Indicates whether amount_reconciled is a credit or debit
|
|
631
|
+
* amount.
|
|
632
|
+
*/
|
|
633
|
+
amount_reconciled_direction?: 'credit' | 'debit' | null;
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* The amount that remains unreconciled for this expected payment. Value in
|
|
637
|
+
* specified currency's smallest unit. e.g. $10 would be represented as 1000.
|
|
638
|
+
*/
|
|
639
|
+
amount_unreconciled?: number | null;
|
|
640
|
+
|
|
641
|
+
/**
|
|
642
|
+
* One of credit or debit. Indicates whether amount_unreconciled is a credit or
|
|
643
|
+
* debit amount.
|
|
644
|
+
*/
|
|
645
|
+
amount_unreconciled_direction?: 'credit' | 'debit' | null;
|
|
646
|
+
|
|
617
647
|
/**
|
|
618
648
|
* The highest amount this expected payment may be equal to. Value in specified
|
|
619
649
|
* currency's smallest unit. e.g. $10 would be represented as 1000.
|
|
@@ -923,6 +953,11 @@ export namespace BulkRequestCreateParams {
|
|
|
923
953
|
*/
|
|
924
954
|
expires_at?: string | null;
|
|
925
955
|
|
|
956
|
+
/**
|
|
957
|
+
* An optional user-defined 180 character unique identifier.
|
|
958
|
+
*/
|
|
959
|
+
external_id?: string | null;
|
|
960
|
+
|
|
926
961
|
/**
|
|
927
962
|
* A payment type to fallback to if the original type is not valid for the
|
|
928
963
|
* receiving account. Currently, this only supports falling back from RTP to ACH
|
|
@@ -1220,6 +1255,7 @@ export namespace BulkRequestCreateParams {
|
|
|
1220
1255
|
account_number_type?:
|
|
1221
1256
|
| 'au_number'
|
|
1222
1257
|
| 'base_address'
|
|
1258
|
+
| 'card_token'
|
|
1223
1259
|
| 'clabe'
|
|
1224
1260
|
| 'ethereum_address'
|
|
1225
1261
|
| 'hk_number'
|
|
@@ -1310,6 +1346,30 @@ export namespace BulkRequestCreateParams {
|
|
|
1310
1346
|
*/
|
|
1311
1347
|
amount_lower_bound?: number | null;
|
|
1312
1348
|
|
|
1349
|
+
/**
|
|
1350
|
+
* The amount reconciled for this expected payment. Value in specified currency's
|
|
1351
|
+
* smallest unit. e.g. $10 would be represented as 1000.
|
|
1352
|
+
*/
|
|
1353
|
+
amount_reconciled?: number | null;
|
|
1354
|
+
|
|
1355
|
+
/**
|
|
1356
|
+
* One of credit or debit. Indicates whether amount_reconciled is a credit or debit
|
|
1357
|
+
* amount.
|
|
1358
|
+
*/
|
|
1359
|
+
amount_reconciled_direction?: 'credit' | 'debit' | null;
|
|
1360
|
+
|
|
1361
|
+
/**
|
|
1362
|
+
* The amount that remains unreconciled for this expected payment. Value in
|
|
1363
|
+
* specified currency's smallest unit. e.g. $10 would be represented as 1000.
|
|
1364
|
+
*/
|
|
1365
|
+
amount_unreconciled?: number | null;
|
|
1366
|
+
|
|
1367
|
+
/**
|
|
1368
|
+
* One of credit or debit. Indicates whether amount_unreconciled is a credit or
|
|
1369
|
+
* debit amount.
|
|
1370
|
+
*/
|
|
1371
|
+
amount_unreconciled_direction?: 'credit' | 'debit' | null;
|
|
1372
|
+
|
|
1313
1373
|
/**
|
|
1314
1374
|
* The highest amount this expected payment may be equal to. Value in specified
|
|
1315
1375
|
* currency's smallest unit. e.g. $10 would be represented as 1000.
|
|
@@ -1430,6 +1490,12 @@ export namespace BulkRequestCreateParams {
|
|
|
1430
1490
|
*/
|
|
1431
1491
|
effective_at?: string;
|
|
1432
1492
|
|
|
1493
|
+
/**
|
|
1494
|
+
* A unique string to represent the ledger transaction. Only one pending or posted
|
|
1495
|
+
* ledger transaction may have this ID in the ledger.
|
|
1496
|
+
*/
|
|
1497
|
+
external_id?: string | null;
|
|
1498
|
+
|
|
1433
1499
|
/**
|
|
1434
1500
|
* An array of ledger entry objects.
|
|
1435
1501
|
*/
|
|
@@ -80,7 +80,7 @@ export interface ConnectionLegalEntity {
|
|
|
80
80
|
/**
|
|
81
81
|
* The status of the connection legal entity.
|
|
82
82
|
*/
|
|
83
|
-
status: 'completed' | 'denied' | 'failed' | 'processing';
|
|
83
|
+
status: 'closed' | 'completed' | 'denied' | 'failed' | 'processing' | 'suspended';
|
|
84
84
|
|
|
85
85
|
updated_at: string;
|
|
86
86
|
|
|
@@ -119,6 +119,11 @@ export namespace ConnectionLegalEntityCreateParams {
|
|
|
119
119
|
|
|
120
120
|
bank_settings?: LegalEntity.BankSettings | null;
|
|
121
121
|
|
|
122
|
+
/**
|
|
123
|
+
* A description of the business.
|
|
124
|
+
*/
|
|
125
|
+
business_description?: string | null;
|
|
126
|
+
|
|
122
127
|
/**
|
|
123
128
|
* The business's legal business name.
|
|
124
129
|
*/
|
|
@@ -129,7 +134,20 @@ export namespace ConnectionLegalEntityCreateParams {
|
|
|
129
134
|
*/
|
|
130
135
|
citizenship_country?: string | null;
|
|
131
136
|
|
|
132
|
-
|
|
137
|
+
/**
|
|
138
|
+
* The connection ID for the connection the legal entity is associated with.
|
|
139
|
+
* Defaults to the id of the connection designated with an is_default value of true
|
|
140
|
+
* or the id of an existing operational connection if only one is available. Pass
|
|
141
|
+
* in a value of null to prevent the connection from being associated with the
|
|
142
|
+
* legal entity.
|
|
143
|
+
*/
|
|
144
|
+
connection_id?: string | null;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* The country code where the business is incorporated in the ISO 3166-1 alpha-2 or
|
|
148
|
+
* alpha-3 formats.
|
|
149
|
+
*/
|
|
150
|
+
country_of_incorporation?: string | null;
|
|
133
151
|
|
|
134
152
|
/**
|
|
135
153
|
* A business's formation date (YYYY-MM-DD).
|
|
@@ -148,6 +166,16 @@ export namespace ConnectionLegalEntityCreateParams {
|
|
|
148
166
|
*/
|
|
149
167
|
email?: string | null;
|
|
150
168
|
|
|
169
|
+
/**
|
|
170
|
+
* Monthly expected transaction volume in USD.
|
|
171
|
+
*/
|
|
172
|
+
expected_activity_volume?: number | null;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* An optional user-defined 180 character unique identifier.
|
|
176
|
+
*/
|
|
177
|
+
external_id?: string | null;
|
|
178
|
+
|
|
151
179
|
/**
|
|
152
180
|
* An individual's first name.
|
|
153
181
|
*/
|
|
@@ -163,6 +191,11 @@ export namespace ConnectionLegalEntityCreateParams {
|
|
|
163
191
|
*/
|
|
164
192
|
industry_classifications?: Array<Shared.LegalEntityIndustryClassification>;
|
|
165
193
|
|
|
194
|
+
/**
|
|
195
|
+
* A description of the intended use of the legal entity.
|
|
196
|
+
*/
|
|
197
|
+
intended_use?: string | null;
|
|
198
|
+
|
|
166
199
|
/**
|
|
167
200
|
* An individual's last name.
|
|
168
201
|
*/
|
|
@@ -171,7 +204,7 @@ export namespace ConnectionLegalEntityCreateParams {
|
|
|
171
204
|
/**
|
|
172
205
|
* The legal entity associations and its child legal entities.
|
|
173
206
|
*/
|
|
174
|
-
legal_entity_associations?: Array<
|
|
207
|
+
legal_entity_associations?: Array<Shared.LegalEntityAssociationInlineCreate> | null;
|
|
175
208
|
|
|
176
209
|
/**
|
|
177
210
|
* The type of legal entity.
|
|
@@ -190,6 +223,11 @@ export namespace ConnectionLegalEntityCreateParams {
|
|
|
190
223
|
| 'trust'
|
|
191
224
|
| null;
|
|
192
225
|
|
|
226
|
+
/**
|
|
227
|
+
* ISO 10383 market identifier code.
|
|
228
|
+
*/
|
|
229
|
+
listed_exchange?: string | null;
|
|
230
|
+
|
|
193
231
|
/**
|
|
194
232
|
* Additional data represented as key-value pairs. Both the key and value must be
|
|
195
233
|
* strings.
|
|
@@ -201,6 +239,12 @@ export namespace ConnectionLegalEntityCreateParams {
|
|
|
201
239
|
*/
|
|
202
240
|
middle_name?: string | null;
|
|
203
241
|
|
|
242
|
+
/**
|
|
243
|
+
* A list of countries where the business operates (ISO 3166-1 alpha-2 or alpha-3
|
|
244
|
+
* codes).
|
|
245
|
+
*/
|
|
246
|
+
operating_jurisdictions?: Array<string>;
|
|
247
|
+
|
|
204
248
|
phone_numbers?: Array<LegalEntity.PhoneNumber>;
|
|
205
249
|
|
|
206
250
|
/**
|
|
@@ -218,16 +262,42 @@ export namespace ConnectionLegalEntityCreateParams {
|
|
|
218
262
|
*/
|
|
219
263
|
prefix?: string | null;
|
|
220
264
|
|
|
265
|
+
/**
|
|
266
|
+
* A list of primary social media URLs for the business.
|
|
267
|
+
*/
|
|
268
|
+
primary_social_media_sites?: Array<string>;
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Array of regulatory bodies overseeing this institution.
|
|
272
|
+
*/
|
|
273
|
+
regulators?: Array<LegalEntity.Regulator> | null;
|
|
274
|
+
|
|
221
275
|
/**
|
|
222
276
|
* The risk rating of the legal entity. One of low, medium, high.
|
|
223
277
|
*/
|
|
224
278
|
risk_rating?: 'low' | 'medium' | 'high' | null;
|
|
225
279
|
|
|
280
|
+
/**
|
|
281
|
+
* The activation status of the legal entity. One of pending, active, suspended, or
|
|
282
|
+
* closed.
|
|
283
|
+
*/
|
|
284
|
+
status?: 'active' | 'closed' | 'pending' | 'suspended' | null;
|
|
285
|
+
|
|
226
286
|
/**
|
|
227
287
|
* An individual's suffix.
|
|
228
288
|
*/
|
|
229
289
|
suffix?: string | null;
|
|
230
290
|
|
|
291
|
+
/**
|
|
292
|
+
* Information describing a third-party verification run by an external vendor.
|
|
293
|
+
*/
|
|
294
|
+
third_party_verification?: LegalEntity.ThirdPartyVerification | null;
|
|
295
|
+
|
|
296
|
+
/**
|
|
297
|
+
* Stock ticker symbol for publicly traded companies.
|
|
298
|
+
*/
|
|
299
|
+
ticker_symbol?: string | null;
|
|
300
|
+
|
|
231
301
|
wealth_and_employment_details?: LegalEntity.WealthAndEmploymentDetails | null;
|
|
232
302
|
|
|
233
303
|
/**
|
|
@@ -279,42 +349,51 @@ export namespace ConnectionLegalEntityCreateParams {
|
|
|
279
349
|
updated_at: string;
|
|
280
350
|
}
|
|
281
351
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
child_legal_entity?: Shared.ChildLegalEntityCreate;
|
|
352
|
+
/**
|
|
353
|
+
* A list of phone numbers in E.164 format.
|
|
354
|
+
*/
|
|
355
|
+
export interface PhoneNumber {
|
|
356
|
+
phone_number?: string;
|
|
357
|
+
}
|
|
289
358
|
|
|
359
|
+
export interface Regulator {
|
|
290
360
|
/**
|
|
291
|
-
* The
|
|
361
|
+
* The country code where the regulator operates in the ISO 3166-1 alpha-2 format
|
|
362
|
+
* (e.g., "US", "CA", "GB").
|
|
292
363
|
*/
|
|
293
|
-
|
|
364
|
+
jurisdiction: string;
|
|
294
365
|
|
|
295
366
|
/**
|
|
296
|
-
*
|
|
367
|
+
* Full name of the regulatory body.
|
|
297
368
|
*/
|
|
298
|
-
|
|
369
|
+
name: string;
|
|
299
370
|
|
|
300
371
|
/**
|
|
301
|
-
*
|
|
372
|
+
* Registration or identification number with the regulator.
|
|
302
373
|
*/
|
|
303
|
-
|
|
374
|
+
registration_number: string;
|
|
304
375
|
}
|
|
305
376
|
|
|
306
377
|
/**
|
|
307
|
-
*
|
|
378
|
+
* Information describing a third-party verification run by an external vendor.
|
|
308
379
|
*/
|
|
309
|
-
export interface
|
|
310
|
-
|
|
380
|
+
export interface ThirdPartyVerification {
|
|
381
|
+
/**
|
|
382
|
+
* The vendor that performed the verification, e.g. `persona`.
|
|
383
|
+
*/
|
|
384
|
+
vendor: 'persona';
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* The identification of the third party verification in `vendor`'s system.
|
|
388
|
+
*/
|
|
389
|
+
vendor_verification_id: string;
|
|
311
390
|
}
|
|
312
391
|
|
|
313
392
|
export interface WealthAndEmploymentDetails {
|
|
314
393
|
id: string;
|
|
315
394
|
|
|
316
395
|
/**
|
|
317
|
-
* The annual income of the individual.
|
|
396
|
+
* The annual income of the individual in USD.
|
|
318
397
|
*/
|
|
319
398
|
annual_income: number | null;
|
|
320
399
|
|
|
@@ -438,17 +517,24 @@ export namespace ConnectionLegalEntityCreateParams {
|
|
|
438
517
|
| 'alimony'
|
|
439
518
|
| 'annuity'
|
|
440
519
|
| 'business_owner'
|
|
520
|
+
| 'business_revenue'
|
|
521
|
+
| 'debt_financing'
|
|
441
522
|
| 'general_employee'
|
|
442
523
|
| 'government_benefits'
|
|
443
524
|
| 'homemaker'
|
|
444
525
|
| 'inheritance_gift'
|
|
526
|
+
| 'intercompany_loan'
|
|
445
527
|
| 'investment'
|
|
528
|
+
| 'investor_funding'
|
|
446
529
|
| 'legal_settlement'
|
|
447
530
|
| 'lottery'
|
|
448
531
|
| 'real_estate'
|
|
532
|
+
| 'retained_earnings_or_savings'
|
|
449
533
|
| 'retired'
|
|
450
534
|
| 'retirement'
|
|
451
535
|
| 'salary'
|
|
536
|
+
| 'sale_of_business_assets'
|
|
537
|
+
| 'sale_of_real_estate'
|
|
452
538
|
| 'self_employed'
|
|
453
539
|
| 'senior_executive'
|
|
454
540
|
| 'trust_income'
|
|
@@ -487,7 +573,7 @@ export interface ConnectionLegalEntityListParams extends PageParams {
|
|
|
487
573
|
|
|
488
574
|
legal_entity_id?: string;
|
|
489
575
|
|
|
490
|
-
status?: 'completed' | 'denied' | 'failed' | 'processing';
|
|
576
|
+
status?: 'closed' | 'completed' | 'denied' | 'failed' | 'processing' | 'suspended';
|
|
491
577
|
}
|
|
492
578
|
|
|
493
579
|
export declare namespace ConnectionLegalEntities {
|
|
@@ -411,6 +411,7 @@ export namespace CounterpartyCreateParams {
|
|
|
411
411
|
account_number_type?:
|
|
412
412
|
| 'au_number'
|
|
413
413
|
| 'base_address'
|
|
414
|
+
| 'card_token'
|
|
414
415
|
| 'clabe'
|
|
415
416
|
| 'ethereum_address'
|
|
416
417
|
| 'hk_number'
|
|
@@ -504,6 +505,11 @@ export namespace CounterpartyCreateParams {
|
|
|
504
505
|
|
|
505
506
|
bank_settings?: LegalEntity.BankSettings | null;
|
|
506
507
|
|
|
508
|
+
/**
|
|
509
|
+
* A description of the business.
|
|
510
|
+
*/
|
|
511
|
+
business_description?: string | null;
|
|
512
|
+
|
|
507
513
|
/**
|
|
508
514
|
* The business's legal business name.
|
|
509
515
|
*/
|
|
@@ -514,7 +520,20 @@ export namespace CounterpartyCreateParams {
|
|
|
514
520
|
*/
|
|
515
521
|
citizenship_country?: string | null;
|
|
516
522
|
|
|
517
|
-
|
|
523
|
+
/**
|
|
524
|
+
* The connection ID for the connection the legal entity is associated with.
|
|
525
|
+
* Defaults to the id of the connection designated with an is_default value of true
|
|
526
|
+
* or the id of an existing operational connection if only one is available. Pass
|
|
527
|
+
* in a value of null to prevent the connection from being associated with the
|
|
528
|
+
* legal entity.
|
|
529
|
+
*/
|
|
530
|
+
connection_id?: string | null;
|
|
531
|
+
|
|
532
|
+
/**
|
|
533
|
+
* The country code where the business is incorporated in the ISO 3166-1 alpha-2 or
|
|
534
|
+
* alpha-3 formats.
|
|
535
|
+
*/
|
|
536
|
+
country_of_incorporation?: string | null;
|
|
518
537
|
|
|
519
538
|
/**
|
|
520
539
|
* A business's formation date (YYYY-MM-DD).
|
|
@@ -533,6 +552,16 @@ export namespace CounterpartyCreateParams {
|
|
|
533
552
|
*/
|
|
534
553
|
email?: string | null;
|
|
535
554
|
|
|
555
|
+
/**
|
|
556
|
+
* Monthly expected transaction volume in USD.
|
|
557
|
+
*/
|
|
558
|
+
expected_activity_volume?: number | null;
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* An optional user-defined 180 character unique identifier.
|
|
562
|
+
*/
|
|
563
|
+
external_id?: string | null;
|
|
564
|
+
|
|
536
565
|
/**
|
|
537
566
|
* An individual's first name.
|
|
538
567
|
*/
|
|
@@ -548,6 +577,11 @@ export namespace CounterpartyCreateParams {
|
|
|
548
577
|
*/
|
|
549
578
|
industry_classifications?: Array<Shared.LegalEntityIndustryClassification>;
|
|
550
579
|
|
|
580
|
+
/**
|
|
581
|
+
* A description of the intended use of the legal entity.
|
|
582
|
+
*/
|
|
583
|
+
intended_use?: string | null;
|
|
584
|
+
|
|
551
585
|
/**
|
|
552
586
|
* An individual's last name.
|
|
553
587
|
*/
|
|
@@ -556,7 +590,7 @@ export namespace CounterpartyCreateParams {
|
|
|
556
590
|
/**
|
|
557
591
|
* The legal entity associations and its child legal entities.
|
|
558
592
|
*/
|
|
559
|
-
legal_entity_associations?: Array<
|
|
593
|
+
legal_entity_associations?: Array<Shared.LegalEntityAssociationInlineCreate> | null;
|
|
560
594
|
|
|
561
595
|
/**
|
|
562
596
|
* The business's legal structure.
|
|
@@ -570,6 +604,11 @@ export namespace CounterpartyCreateParams {
|
|
|
570
604
|
| 'trust'
|
|
571
605
|
| null;
|
|
572
606
|
|
|
607
|
+
/**
|
|
608
|
+
* ISO 10383 market identifier code.
|
|
609
|
+
*/
|
|
610
|
+
listed_exchange?: string | null;
|
|
611
|
+
|
|
573
612
|
/**
|
|
574
613
|
* Additional data represented as key-value pairs. Both the key and value must be
|
|
575
614
|
* strings.
|
|
@@ -581,6 +620,12 @@ export namespace CounterpartyCreateParams {
|
|
|
581
620
|
*/
|
|
582
621
|
middle_name?: string | null;
|
|
583
622
|
|
|
623
|
+
/**
|
|
624
|
+
* A list of countries where the business operates (ISO 3166-1 alpha-2 or alpha-3
|
|
625
|
+
* codes).
|
|
626
|
+
*/
|
|
627
|
+
operating_jurisdictions?: Array<string>;
|
|
628
|
+
|
|
584
629
|
phone_numbers?: Array<LegalEntity.PhoneNumber>;
|
|
585
630
|
|
|
586
631
|
/**
|
|
@@ -598,16 +643,42 @@ export namespace CounterpartyCreateParams {
|
|
|
598
643
|
*/
|
|
599
644
|
prefix?: string | null;
|
|
600
645
|
|
|
646
|
+
/**
|
|
647
|
+
* A list of primary social media URLs for the business.
|
|
648
|
+
*/
|
|
649
|
+
primary_social_media_sites?: Array<string>;
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* Array of regulatory bodies overseeing this institution.
|
|
653
|
+
*/
|
|
654
|
+
regulators?: Array<LegalEntity.Regulator> | null;
|
|
655
|
+
|
|
601
656
|
/**
|
|
602
657
|
* The risk rating of the legal entity. One of low, medium, high.
|
|
603
658
|
*/
|
|
604
659
|
risk_rating?: 'low' | 'medium' | 'high' | null;
|
|
605
660
|
|
|
661
|
+
/**
|
|
662
|
+
* The activation status of the legal entity. One of pending, active, suspended, or
|
|
663
|
+
* closed.
|
|
664
|
+
*/
|
|
665
|
+
status?: 'active' | 'closed' | 'pending' | 'suspended' | null;
|
|
666
|
+
|
|
606
667
|
/**
|
|
607
668
|
* An individual's suffix.
|
|
608
669
|
*/
|
|
609
670
|
suffix?: string | null;
|
|
610
671
|
|
|
672
|
+
/**
|
|
673
|
+
* Information describing a third-party verification run by an external vendor.
|
|
674
|
+
*/
|
|
675
|
+
third_party_verification?: LegalEntity.ThirdPartyVerification | null;
|
|
676
|
+
|
|
677
|
+
/**
|
|
678
|
+
* Stock ticker symbol for publicly traded companies.
|
|
679
|
+
*/
|
|
680
|
+
ticker_symbol?: string | null;
|
|
681
|
+
|
|
611
682
|
wealth_and_employment_details?: LegalEntity.WealthAndEmploymentDetails | null;
|
|
612
683
|
|
|
613
684
|
/**
|
|
@@ -659,42 +730,51 @@ export namespace CounterpartyCreateParams {
|
|
|
659
730
|
updated_at: string;
|
|
660
731
|
}
|
|
661
732
|
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
child_legal_entity?: Shared.ChildLegalEntityCreate;
|
|
733
|
+
/**
|
|
734
|
+
* A list of phone numbers in E.164 format.
|
|
735
|
+
*/
|
|
736
|
+
export interface PhoneNumber {
|
|
737
|
+
phone_number?: string;
|
|
738
|
+
}
|
|
669
739
|
|
|
740
|
+
export interface Regulator {
|
|
670
741
|
/**
|
|
671
|
-
* The
|
|
742
|
+
* The country code where the regulator operates in the ISO 3166-1 alpha-2 format
|
|
743
|
+
* (e.g., "US", "CA", "GB").
|
|
672
744
|
*/
|
|
673
|
-
|
|
745
|
+
jurisdiction: string;
|
|
674
746
|
|
|
675
747
|
/**
|
|
676
|
-
*
|
|
748
|
+
* Full name of the regulatory body.
|
|
677
749
|
*/
|
|
678
|
-
|
|
750
|
+
name: string;
|
|
679
751
|
|
|
680
752
|
/**
|
|
681
|
-
*
|
|
753
|
+
* Registration or identification number with the regulator.
|
|
682
754
|
*/
|
|
683
|
-
|
|
755
|
+
registration_number: string;
|
|
684
756
|
}
|
|
685
757
|
|
|
686
758
|
/**
|
|
687
|
-
*
|
|
759
|
+
* Information describing a third-party verification run by an external vendor.
|
|
688
760
|
*/
|
|
689
|
-
export interface
|
|
690
|
-
|
|
761
|
+
export interface ThirdPartyVerification {
|
|
762
|
+
/**
|
|
763
|
+
* The vendor that performed the verification, e.g. `persona`.
|
|
764
|
+
*/
|
|
765
|
+
vendor: 'persona';
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* The identification of the third party verification in `vendor`'s system.
|
|
769
|
+
*/
|
|
770
|
+
vendor_verification_id: string;
|
|
691
771
|
}
|
|
692
772
|
|
|
693
773
|
export interface WealthAndEmploymentDetails {
|
|
694
774
|
id: string;
|
|
695
775
|
|
|
696
776
|
/**
|
|
697
|
-
* The annual income of the individual.
|
|
777
|
+
* The annual income of the individual in USD.
|
|
698
778
|
*/
|
|
699
779
|
annual_income: number | null;
|
|
700
780
|
|
|
@@ -818,17 +898,24 @@ export namespace CounterpartyCreateParams {
|
|
|
818
898
|
| 'alimony'
|
|
819
899
|
| 'annuity'
|
|
820
900
|
| 'business_owner'
|
|
901
|
+
| 'business_revenue'
|
|
902
|
+
| 'debt_financing'
|
|
821
903
|
| 'general_employee'
|
|
822
904
|
| 'government_benefits'
|
|
823
905
|
| 'homemaker'
|
|
824
906
|
| 'inheritance_gift'
|
|
907
|
+
| 'intercompany_loan'
|
|
825
908
|
| 'investment'
|
|
909
|
+
| 'investor_funding'
|
|
826
910
|
| 'legal_settlement'
|
|
827
911
|
| 'lottery'
|
|
828
912
|
| 'real_estate'
|
|
913
|
+
| 'retained_earnings_or_savings'
|
|
829
914
|
| 'retired'
|
|
830
915
|
| 'retirement'
|
|
831
916
|
| 'salary'
|
|
917
|
+
| 'sale_of_business_assets'
|
|
918
|
+
| 'sale_of_real_estate'
|
|
832
919
|
| 'self_employed'
|
|
833
920
|
| 'senior_executive'
|
|
834
921
|
| 'trust_income'
|
|
@@ -861,6 +948,11 @@ export interface CounterpartyUpdateParams {
|
|
|
861
948
|
*/
|
|
862
949
|
email?: string;
|
|
863
950
|
|
|
951
|
+
/**
|
|
952
|
+
* An optional user-defined 180 character unique identifier.
|
|
953
|
+
*/
|
|
954
|
+
external_id?: string | null;
|
|
955
|
+
|
|
864
956
|
/**
|
|
865
957
|
* The id of the legal entity.
|
|
866
958
|
*/
|