@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
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.AccountPrograms = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
7
|
+
class AccountPrograms extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Creates a Mock-US USD account program owned by the caller merchant. This
|
|
10
|
+
* endpoint is unavailable in live production.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const accountProgram =
|
|
15
|
+
* await client.simulations.accountPrograms.create({
|
|
16
|
+
* label: 'x',
|
|
17
|
+
* type: 'fbo-program',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
create(body, options) {
|
|
22
|
+
return this._client.post('/v1/simulations/account_programs', { body, ...options });
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Closes an account program. All child accounts must be drained via the drain
|
|
26
|
+
* endpoint first. This endpoint is unavailable in live production.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const response =
|
|
31
|
+
* await client.simulations.accountPrograms.close(
|
|
32
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
33
|
+
* { reason: 'aml_risk_fraud' },
|
|
34
|
+
* );
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
close(id, body, options) {
|
|
38
|
+
return this._client.post((0, path_1.path) `/v1/simulations/account_programs/${id}/close`, { body, ...options });
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Creates outbound payouts that drain the residual balance of every frozen account
|
|
42
|
+
* under the program to the provided destination. The program must be frozen. Every
|
|
43
|
+
* returned `payout_ids[i]` must be settled via
|
|
44
|
+
* `POST /v1/simulations/payouts/{id}/send` for the program balance to reach zero.
|
|
45
|
+
* This endpoint is unavailable in live production.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```ts
|
|
49
|
+
* const response =
|
|
50
|
+
* await client.simulations.accountPrograms.drain(
|
|
51
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
52
|
+
* {
|
|
53
|
+
* destination: {
|
|
54
|
+
* account_holder_name: 'Acme Sandbox Ltd.',
|
|
55
|
+
* bic: 'COBADEFFXXX',
|
|
56
|
+
* iban: 'DE89370400440532013000',
|
|
57
|
+
* type: 'iban',
|
|
58
|
+
* },
|
|
59
|
+
* },
|
|
60
|
+
* );
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
drain(id, body, options) {
|
|
64
|
+
return this._client.post((0, path_1.path) `/v1/simulations/account_programs/${id}/drain`, { body, ...options });
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Freezes an existing account program and its virtual accounts. This endpoint is
|
|
68
|
+
* unavailable in live production.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* const response =
|
|
73
|
+
* await client.simulations.accountPrograms.freeze(
|
|
74
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
75
|
+
* );
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
freeze(id, options) {
|
|
79
|
+
return this._client.post((0, path_1.path) `/v1/simulations/account_programs/${id}/freeze`, options);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Unfreezes an existing account program and its virtual accounts. This endpoint is
|
|
83
|
+
* unavailable in live production.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```ts
|
|
87
|
+
* const response =
|
|
88
|
+
* await client.simulations.accountPrograms.unfreeze(
|
|
89
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
90
|
+
* );
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
unfreeze(id, options) {
|
|
94
|
+
return this._client.post((0, path_1.path) `/v1/simulations/account_programs/${id}/unfreeze`, options);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
exports.AccountPrograms = AccountPrograms;
|
|
98
|
+
//# sourceMappingURL=account-programs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-programs.js","sourceRoot":"","sources":["../../src/resources/simulations/account-programs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD,MAAa,eAAgB,SAAQ,sBAAW;IAC9C;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kCAAkC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CACH,EAAU,EACV,IAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,oCAAoC,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrG,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,KAAK,CACH,EAAU,EACV,IAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,oCAAoC,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrG,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,oCAAoC,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,oCAAoC,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IAC3F,CAAC;CACF;AAxGD,0CAwGC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
4
|
+
export class AccountPrograms extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Creates a Mock-US USD account program owned by the caller merchant. This
|
|
7
|
+
* endpoint is unavailable in live production.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const accountProgram =
|
|
12
|
+
* await client.simulations.accountPrograms.create({
|
|
13
|
+
* label: 'x',
|
|
14
|
+
* type: 'fbo-program',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
create(body, options) {
|
|
19
|
+
return this._client.post('/v1/simulations/account_programs', { body, ...options });
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Closes an account program. All child accounts must be drained via the drain
|
|
23
|
+
* endpoint first. This endpoint is unavailable in live production.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const response =
|
|
28
|
+
* await client.simulations.accountPrograms.close(
|
|
29
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
30
|
+
* { reason: 'aml_risk_fraud' },
|
|
31
|
+
* );
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
close(id, body, options) {
|
|
35
|
+
return this._client.post(path `/v1/simulations/account_programs/${id}/close`, { body, ...options });
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Creates outbound payouts that drain the residual balance of every frozen account
|
|
39
|
+
* under the program to the provided destination. The program must be frozen. Every
|
|
40
|
+
* returned `payout_ids[i]` must be settled via
|
|
41
|
+
* `POST /v1/simulations/payouts/{id}/send` for the program balance to reach zero.
|
|
42
|
+
* This endpoint is unavailable in live production.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const response =
|
|
47
|
+
* await client.simulations.accountPrograms.drain(
|
|
48
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
49
|
+
* {
|
|
50
|
+
* destination: {
|
|
51
|
+
* account_holder_name: 'Acme Sandbox Ltd.',
|
|
52
|
+
* bic: 'COBADEFFXXX',
|
|
53
|
+
* iban: 'DE89370400440532013000',
|
|
54
|
+
* type: 'iban',
|
|
55
|
+
* },
|
|
56
|
+
* },
|
|
57
|
+
* );
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
drain(id, body, options) {
|
|
61
|
+
return this._client.post(path `/v1/simulations/account_programs/${id}/drain`, { body, ...options });
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Freezes an existing account program and its virtual accounts. This endpoint is
|
|
65
|
+
* unavailable in live production.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```ts
|
|
69
|
+
* const response =
|
|
70
|
+
* await client.simulations.accountPrograms.freeze(
|
|
71
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
72
|
+
* );
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
freeze(id, options) {
|
|
76
|
+
return this._client.post(path `/v1/simulations/account_programs/${id}/freeze`, options);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Unfreezes an existing account program and its virtual accounts. This endpoint is
|
|
80
|
+
* unavailable in live production.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```ts
|
|
84
|
+
* const response =
|
|
85
|
+
* await client.simulations.accountPrograms.unfreeze(
|
|
86
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
87
|
+
* );
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
unfreeze(id, options) {
|
|
91
|
+
return this._client.post(path `/v1/simulations/account_programs/${id}/unfreeze`, options);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=account-programs.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-programs.mjs","sourceRoot":"","sources":["../../src/resources/simulations/account-programs.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAGlD,OAAO,EAAE,IAAI,EAAE,sCAAkC;AAEjD,MAAM,OAAO,eAAgB,SAAQ,WAAW;IAC9C;;;;;;;;;;;;OAYG;IACH,MAAM,CACJ,IAAgC,EAChC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kCAAkC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CACH,EAAU,EACV,IAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,oCAAoC,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrG,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,KAAK,CACH,EAAU,EACV,IAA+B,EAC/B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,oCAAoC,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrG,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,oCAAoC,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;IACzF,CAAC;IAED;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,oCAAoC,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IAC3F,CAAC;CACF"}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
4
|
+
export declare class Accounts extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Creates a Mock-US USD operating (DDA) account owned by the caller merchant. This
|
|
7
|
+
* endpoint is unavailable in live production.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const account = await client.simulations.accounts.create({
|
|
12
|
+
* label: 'x',
|
|
13
|
+
* });
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
create(body: AccountCreateParams, options?: RequestOptions): APIPromise<AccountCreateResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Closes an operating (DDA) account. The account must be drained via the drain
|
|
19
|
+
* endpoint first. This endpoint is unavailable in live production.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```ts
|
|
23
|
+
* const response = await client.simulations.accounts.close(
|
|
24
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
25
|
+
* { reason: 'aml_risk_fraud' },
|
|
26
|
+
* );
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
close(id: string, body: AccountCloseParams, options?: RequestOptions): APIPromise<AccountCloseResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Creates an outbound payout that drains the residual balance of a frozen
|
|
32
|
+
* operating (DDA) account to the provided destination. The returned `payout_id`
|
|
33
|
+
* must be settled via `POST /v1/simulations/payouts/{id}/send` for the account
|
|
34
|
+
* balance to reach zero. This endpoint is unavailable in live production.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const response = await client.simulations.accounts.drain(
|
|
39
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
40
|
+
* {
|
|
41
|
+
* destination: {
|
|
42
|
+
* account_holder_name: 'Acme Sandbox Ltd.',
|
|
43
|
+
* bic: 'COBADEFFXXX',
|
|
44
|
+
* iban: 'DE89370400440532013000',
|
|
45
|
+
* type: 'iban',
|
|
46
|
+
* },
|
|
47
|
+
* },
|
|
48
|
+
* );
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
drain(id: string, body: AccountDrainParams, options?: RequestOptions): APIPromise<AccountDrainResponse>;
|
|
52
|
+
/**
|
|
53
|
+
* Freezes an existing operating (DDA) account. This endpoint is unavailable in
|
|
54
|
+
* live production.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* const response = await client.simulations.accounts.freeze(
|
|
59
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
60
|
+
* );
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
freeze(id: string, options?: RequestOptions): APIPromise<AccountFreezeResponse>;
|
|
64
|
+
/**
|
|
65
|
+
* Unfreezes an existing operating (DDA) account. This endpoint is unavailable in
|
|
66
|
+
* live production.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* const response = await client.simulations.accounts.unfreeze(
|
|
71
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
72
|
+
* );
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
unfreeze(id: string, options?: RequestOptions): APIPromise<AccountUnfreezeResponse>;
|
|
76
|
+
}
|
|
77
|
+
export interface AccountCreateResponse {
|
|
78
|
+
/**
|
|
79
|
+
* Account whose lifecycle is being simulated.
|
|
80
|
+
*/
|
|
81
|
+
account_id: string;
|
|
82
|
+
/**
|
|
83
|
+
* Account lifecycle event submitted to the sandbox.
|
|
84
|
+
*/
|
|
85
|
+
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
86
|
+
/**
|
|
87
|
+
* Payout created by a drain event. Feed to
|
|
88
|
+
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
89
|
+
*/
|
|
90
|
+
payout_id: string | null;
|
|
91
|
+
/**
|
|
92
|
+
* Whether the simulation submission was successful.
|
|
93
|
+
*/
|
|
94
|
+
success: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Resource type discriminator.
|
|
97
|
+
*/
|
|
98
|
+
type: 'account_simulation';
|
|
99
|
+
}
|
|
100
|
+
export interface AccountCloseResponse {
|
|
101
|
+
/**
|
|
102
|
+
* Account whose lifecycle is being simulated.
|
|
103
|
+
*/
|
|
104
|
+
account_id: string;
|
|
105
|
+
/**
|
|
106
|
+
* Account lifecycle event submitted to the sandbox.
|
|
107
|
+
*/
|
|
108
|
+
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
109
|
+
/**
|
|
110
|
+
* Payout created by a drain event. Feed to
|
|
111
|
+
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
112
|
+
*/
|
|
113
|
+
payout_id: string | null;
|
|
114
|
+
/**
|
|
115
|
+
* Whether the simulation submission was successful.
|
|
116
|
+
*/
|
|
117
|
+
success: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* Resource type discriminator.
|
|
120
|
+
*/
|
|
121
|
+
type: 'account_simulation';
|
|
122
|
+
}
|
|
123
|
+
export interface AccountDrainResponse {
|
|
124
|
+
/**
|
|
125
|
+
* Account whose lifecycle is being simulated.
|
|
126
|
+
*/
|
|
127
|
+
account_id: string;
|
|
128
|
+
/**
|
|
129
|
+
* Account lifecycle event submitted to the sandbox.
|
|
130
|
+
*/
|
|
131
|
+
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
132
|
+
/**
|
|
133
|
+
* Payout created by a drain event. Feed to
|
|
134
|
+
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
135
|
+
*/
|
|
136
|
+
payout_id: string | null;
|
|
137
|
+
/**
|
|
138
|
+
* Whether the simulation submission was successful.
|
|
139
|
+
*/
|
|
140
|
+
success: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Resource type discriminator.
|
|
143
|
+
*/
|
|
144
|
+
type: 'account_simulation';
|
|
145
|
+
}
|
|
146
|
+
export interface AccountFreezeResponse {
|
|
147
|
+
/**
|
|
148
|
+
* Account whose lifecycle is being simulated.
|
|
149
|
+
*/
|
|
150
|
+
account_id: string;
|
|
151
|
+
/**
|
|
152
|
+
* Account lifecycle event submitted to the sandbox.
|
|
153
|
+
*/
|
|
154
|
+
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
155
|
+
/**
|
|
156
|
+
* Payout created by a drain event. Feed to
|
|
157
|
+
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
158
|
+
*/
|
|
159
|
+
payout_id: string | null;
|
|
160
|
+
/**
|
|
161
|
+
* Whether the simulation submission was successful.
|
|
162
|
+
*/
|
|
163
|
+
success: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* Resource type discriminator.
|
|
166
|
+
*/
|
|
167
|
+
type: 'account_simulation';
|
|
168
|
+
}
|
|
169
|
+
export interface AccountUnfreezeResponse {
|
|
170
|
+
/**
|
|
171
|
+
* Account whose lifecycle is being simulated.
|
|
172
|
+
*/
|
|
173
|
+
account_id: string;
|
|
174
|
+
/**
|
|
175
|
+
* Account lifecycle event submitted to the sandbox.
|
|
176
|
+
*/
|
|
177
|
+
event: 'create' | 'freeze' | 'unfreeze' | 'close' | 'drain';
|
|
178
|
+
/**
|
|
179
|
+
* Payout created by a drain event. Feed to
|
|
180
|
+
* `POST /v1/simulations/payouts/{id}/send` to settle. `null` for non-drain events.
|
|
181
|
+
*/
|
|
182
|
+
payout_id: string | null;
|
|
183
|
+
/**
|
|
184
|
+
* Whether the simulation submission was successful.
|
|
185
|
+
*/
|
|
186
|
+
success: boolean;
|
|
187
|
+
/**
|
|
188
|
+
* Resource type discriminator.
|
|
189
|
+
*/
|
|
190
|
+
type: 'account_simulation';
|
|
191
|
+
}
|
|
192
|
+
export interface AccountCreateParams {
|
|
193
|
+
/**
|
|
194
|
+
* Human-readable label for the operating account.
|
|
195
|
+
*/
|
|
196
|
+
label: string;
|
|
197
|
+
}
|
|
198
|
+
export interface AccountCloseParams {
|
|
199
|
+
/**
|
|
200
|
+
* Reason for closing the account.
|
|
201
|
+
*/
|
|
202
|
+
reason: 'aml_risk_fraud' | 'client_request';
|
|
203
|
+
}
|
|
204
|
+
export interface AccountDrainParams {
|
|
205
|
+
/**
|
|
206
|
+
* Fiat financial address to which the residual balance of the frozen account is
|
|
207
|
+
* drained.
|
|
208
|
+
*/
|
|
209
|
+
destination: AccountDrainParams.IbanFinancialAddress | AccountDrainParams.SortCodeFinancialAddress | AccountDrainParams.AbaFinancialAddress;
|
|
210
|
+
}
|
|
211
|
+
export declare namespace AccountDrainParams {
|
|
212
|
+
interface IbanFinancialAddress {
|
|
213
|
+
/**
|
|
214
|
+
* Name of the account holder.
|
|
215
|
+
*/
|
|
216
|
+
account_holder_name: string;
|
|
217
|
+
/**
|
|
218
|
+
* Bank Identifier Code, or null if not provided.
|
|
219
|
+
*/
|
|
220
|
+
bic: string | null;
|
|
221
|
+
/**
|
|
222
|
+
* International Bank Account Number.
|
|
223
|
+
*/
|
|
224
|
+
iban: string;
|
|
225
|
+
/**
|
|
226
|
+
* Discriminator for IBAN financial address.
|
|
227
|
+
*/
|
|
228
|
+
type: 'iban';
|
|
229
|
+
}
|
|
230
|
+
interface SortCodeFinancialAddress {
|
|
231
|
+
/**
|
|
232
|
+
* Name of the account holder.
|
|
233
|
+
*/
|
|
234
|
+
account_holder_name: string;
|
|
235
|
+
/**
|
|
236
|
+
* UK account number (8 digits).
|
|
237
|
+
*/
|
|
238
|
+
account_number: string;
|
|
239
|
+
/**
|
|
240
|
+
* UK sort code (6 digits).
|
|
241
|
+
*/
|
|
242
|
+
sort_code: string;
|
|
243
|
+
/**
|
|
244
|
+
* Discriminator for UK sort code financial address.
|
|
245
|
+
*/
|
|
246
|
+
type: 'sort_code';
|
|
247
|
+
}
|
|
248
|
+
interface AbaFinancialAddress {
|
|
249
|
+
/**
|
|
250
|
+
* Name of the account holder.
|
|
251
|
+
*/
|
|
252
|
+
account_holder_name: string;
|
|
253
|
+
/**
|
|
254
|
+
* Bank account number.
|
|
255
|
+
*/
|
|
256
|
+
account_number: string;
|
|
257
|
+
/**
|
|
258
|
+
* ABA routing number (9 digits).
|
|
259
|
+
*/
|
|
260
|
+
routing_number: string;
|
|
261
|
+
/**
|
|
262
|
+
* Discriminator for ABA wire financial address.
|
|
263
|
+
*/
|
|
264
|
+
type: 'aba';
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
export declare namespace Accounts {
|
|
268
|
+
export { type AccountCreateResponse as AccountCreateResponse, type AccountCloseResponse as AccountCloseResponse, type AccountDrainResponse as AccountDrainResponse, type AccountFreezeResponse as AccountFreezeResponse, type AccountUnfreezeResponse as AccountUnfreezeResponse, type AccountCreateParams as AccountCreateParams, type AccountCloseParams as AccountCloseParams, type AccountDrainParams as AccountDrainParams, };
|
|
269
|
+
}
|
|
270
|
+
//# sourceMappingURL=accounts.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accounts.d.mts","sourceRoot":"","sources":["../../src/resources/simulations/accounts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAGhE,qBAAa,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAI9F;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAIvG;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAIvG;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,qBAAqB,CAAC;IAI/E;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;CAGpF;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,KAAK,EAAE,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,OAAO,CAAC;IAE5D;;;OAGG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;OA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