@naturalpay/sdk 0.2.1 → 0.4.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 +42 -0
- package/README.md +2 -2
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/client.d.mts +37 -13
- package/client.d.mts.map +1 -1
- package/client.d.ts +37 -13
- package/client.d.ts.map +1 -1
- package/client.js +30 -6
- package/client.js.map +1 -1
- package/client.mjs +31 -7
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/qs/formats.d.mts.map +1 -1
- package/internal/qs/formats.d.ts.map +1 -1
- package/internal/qs/index.d.mts +2 -2
- package/internal/qs/index.d.mts.map +1 -1
- package/internal/qs/index.d.ts +2 -2
- package/internal/qs/index.d.ts.map +1 -1
- package/internal/qs/index.mjs.map +1 -1
- package/internal/qs/stringify.d.mts.map +1 -1
- package/internal/qs/stringify.d.ts.map +1 -1
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/qs/utils.d.mts.map +1 -1
- package/internal/qs/utils.d.ts.map +1 -1
- package/internal/qs/utils.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +4 -4
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +4 -4
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/lib/envelope.d.mts.map +1 -1
- package/lib/envelope.d.ts.map +1 -1
- package/lib/envelope.mjs.map +1 -1
- package/package.json +1 -1
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/agents.d.mts +4 -153
- package/resources/agents.d.mts.map +1 -1
- package/resources/agents.d.ts +4 -153
- package/resources/agents.d.ts.map +1 -1
- package/resources/agents.js +5 -5
- package/resources/agents.js.map +1 -1
- package/resources/agents.mjs +5 -5
- package/resources/agents.mjs.map +1 -1
- package/resources/api-keys.d.mts +16 -2
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +16 -2
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-keys.js +7 -4
- package/resources/api-keys.js.map +1 -1
- package/resources/api-keys.mjs +7 -4
- package/resources/api-keys.mjs.map +1 -1
- package/resources/counterparties.d.mts +5 -55
- package/resources/counterparties.d.mts.map +1 -1
- package/resources/counterparties.d.ts +5 -55
- package/resources/counterparties.d.ts.map +1 -1
- package/resources/counterparties.js +1 -3
- package/resources/counterparties.js.map +1 -1
- package/resources/counterparties.mjs +1 -3
- package/resources/counterparties.mjs.map +1 -1
- package/resources/customers.d.mts.map +1 -1
- package/resources/customers.d.ts.map +1 -1
- package/resources/customers.mjs.map +1 -1
- package/resources/delegations.d.mts.map +1 -1
- package/resources/delegations.d.ts.map +1 -1
- package/resources/delegations.mjs.map +1 -1
- package/resources/escalations.d.mts +1124 -0
- package/resources/escalations.d.mts.map +1 -0
- package/resources/escalations.d.ts +1124 -0
- package/resources/escalations.d.ts.map +1 -0
- package/resources/escalations.js +110 -0
- package/resources/escalations.js.map +1 -0
- package/resources/escalations.mjs +106 -0
- package/resources/escalations.mjs.map +1 -0
- package/resources/external-accounts.d.mts +239 -0
- package/resources/external-accounts.d.mts.map +1 -0
- package/resources/external-accounts.d.ts +239 -0
- package/resources/external-accounts.d.ts.map +1 -0
- package/resources/external-accounts.js +47 -0
- package/resources/external-accounts.js.map +1 -0
- package/resources/external-accounts.mjs +43 -0
- package/resources/external-accounts.mjs.map +1 -0
- package/resources/index.d.mts +8 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +8 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +9 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +5 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invitations.d.mts +17 -8
- package/resources/invitations.d.mts.map +1 -1
- package/resources/invitations.d.ts +17 -8
- package/resources/invitations.d.ts.map +1 -1
- package/resources/invitations.js +7 -5
- package/resources/invitations.js.map +1 -1
- package/resources/invitations.mjs +7 -5
- package/resources/invitations.mjs.map +1 -1
- package/resources/parties.d.mts +55 -28
- package/resources/parties.d.mts.map +1 -1
- package/resources/parties.d.ts +55 -28
- package/resources/parties.d.ts.map +1 -1
- package/resources/parties.js +30 -4
- package/resources/parties.js.map +1 -1
- package/resources/parties.mjs +30 -4
- package/resources/parties.mjs.map +1 -1
- package/resources/payment-requests.d.mts +751 -39
- package/resources/payment-requests.d.mts.map +1 -1
- package/resources/payment-requests.d.ts +751 -39
- package/resources/payment-requests.d.ts.map +1 -1
- package/resources/payment-requests.js +82 -2
- package/resources/payment-requests.js.map +1 -1
- package/resources/payment-requests.mjs +82 -2
- package/resources/payment-requests.mjs.map +1 -1
- package/resources/payments.d.mts +390 -24
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +390 -24
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +53 -3
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +53 -3
- package/resources/payments.mjs.map +1 -1
- package/resources/transactions.d.mts +53 -113
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +53 -113
- package/resources/transactions.d.ts.map +1 -1
- package/resources/transactions.js +3 -3
- package/resources/transactions.mjs +3 -3
- package/resources/transactions.mjs.map +1 -1
- package/resources/transfers.d.mts +1030 -0
- package/resources/transfers.d.mts.map +1 -0
- package/resources/transfers.d.ts +1030 -0
- package/resources/transfers.d.ts.map +1 -0
- package/resources/transfers.js +114 -0
- package/resources/transfers.js.map +1 -0
- package/resources/transfers.mjs +110 -0
- package/resources/transfers.mjs.map +1 -0
- package/resources/wallet.d.mts +117 -437
- package/resources/wallet.d.mts.map +1 -1
- package/resources/wallet.d.ts +117 -437
- package/resources/wallet.d.ts.map +1 -1
- package/resources/wallet.js +9 -122
- package/resources/wallet.js.map +1 -1
- package/resources/wallet.mjs +9 -122
- package/resources/wallet.mjs.map +1 -1
- package/resources/webhooks.d.mts +775 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +775 -0
- package/resources/webhooks.d.ts.map +1 -0
- package/resources/webhooks.js +163 -0
- package/resources/webhooks.js.map +1 -0
- package/resources/webhooks.mjs +159 -0
- package/resources/webhooks.mjs.map +1 -0
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +156 -32
- package/src/resources/agents.ts +5 -185
- package/src/resources/api-keys.ts +26 -4
- package/src/resources/counterparties.ts +5 -64
- package/src/resources/escalations.ts +1422 -0
- package/src/resources/external-accounts.ts +324 -0
- package/src/resources/index.ts +65 -13
- package/src/resources/invitations.ts +27 -11
- package/src/resources/parties.ts +88 -33
- package/src/resources/payment-requests.ts +945 -44
- package/src/resources/payments.ts +518 -23
- package/src/resources/transactions.ts +53 -129
- package/src/resources/transfers.ts +1338 -0
- package/src/resources/wallet.ts +133 -597
- package/src/resources/webhooks.ts +1232 -0
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +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/resources/wallet.ts
CHANGED
|
@@ -7,151 +7,19 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
7
7
|
import { path } from '../internal/utils/path';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
* Wallet balance, deposits, withdrawals, and external
|
|
10
|
+
* Wallet balance, deposits, withdrawals, and external accounts
|
|
11
11
|
*/
|
|
12
12
|
export class Wallet extends APIResource {
|
|
13
13
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```ts
|
|
18
|
-
* const response = await client.wallet.getBalance();
|
|
19
|
-
* ```
|
|
14
|
+
* List wallets for the authenticated party, including balance and ACH deposit
|
|
15
|
+
* instructions when available. Currently returns at most one wallet.
|
|
20
16
|
*/
|
|
21
|
-
|
|
22
|
-
params:
|
|
17
|
+
list(
|
|
18
|
+
params: WalletListParams | null | undefined = {},
|
|
23
19
|
options?: RequestOptions,
|
|
24
|
-
): APIPromise<
|
|
25
|
-
const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID, ...query } = params ?? {};
|
|
26
|
-
return this._client.get('/wallet/balance', {
|
|
27
|
-
query,
|
|
28
|
-
...options,
|
|
29
|
-
headers: buildHeaders([
|
|
30
|
-
{
|
|
31
|
-
...(xAgentID != null ? { 'X-Agent-ID': xAgentID } : undefined),
|
|
32
|
-
...(xInstanceID != null ? { 'X-Instance-ID': xInstanceID } : undefined),
|
|
33
|
-
},
|
|
34
|
-
options?.headers,
|
|
35
|
-
]),
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Get account and routing numbers for ACH deposits.
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* ```ts
|
|
44
|
-
* const response =
|
|
45
|
-
* await client.wallet.getDepositInstructions();
|
|
46
|
-
* ```
|
|
47
|
-
*/
|
|
48
|
-
getDepositInstructions(
|
|
49
|
-
params: WalletGetDepositInstructionsParams | null | undefined = {},
|
|
50
|
-
options?: RequestOptions,
|
|
51
|
-
): APIPromise<WalletGetDepositInstructionsResponse> {
|
|
20
|
+
): APIPromise<WalletListResponse> {
|
|
52
21
|
const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID } = params ?? {};
|
|
53
|
-
return this._client.get('/
|
|
54
|
-
...options,
|
|
55
|
-
headers: buildHeaders([
|
|
56
|
-
{
|
|
57
|
-
...(xAgentID != null ? { 'X-Agent-ID': xAgentID } : undefined),
|
|
58
|
-
...(xInstanceID != null ? { 'X-Instance-ID': xInstanceID } : undefined),
|
|
59
|
-
},
|
|
60
|
-
options?.headers,
|
|
61
|
-
]),
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Initiate a wallet deposit.
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* ```ts
|
|
70
|
-
* const response = await client.wallet.initiateDeposit({
|
|
71
|
-
* amount: 1,
|
|
72
|
-
* externalFundingSourceId:
|
|
73
|
-
* 'efs_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
74
|
-
* 'Idempotency-Key': 'Idempotency-Key',
|
|
75
|
-
* });
|
|
76
|
-
* ```
|
|
77
|
-
*/
|
|
78
|
-
initiateDeposit(
|
|
79
|
-
params: WalletInitiateDepositParams,
|
|
80
|
-
options?: RequestOptions,
|
|
81
|
-
): APIPromise<WalletInitiateDepositResponse> {
|
|
82
|
-
const {
|
|
83
|
-
'Idempotency-Key': idempotencyKey,
|
|
84
|
-
'X-Agent-ID': xAgentID,
|
|
85
|
-
'X-Instance-ID': xInstanceID,
|
|
86
|
-
...body
|
|
87
|
-
} = params;
|
|
88
|
-
return this._client.post('/wallet/deposit', {
|
|
89
|
-
body,
|
|
90
|
-
...options,
|
|
91
|
-
headers: buildHeaders([
|
|
92
|
-
{
|
|
93
|
-
'Idempotency-Key': idempotencyKey,
|
|
94
|
-
...(xAgentID != null ? { 'X-Agent-ID': xAgentID } : undefined),
|
|
95
|
-
...(xInstanceID != null ? { 'X-Instance-ID': xInstanceID } : undefined),
|
|
96
|
-
},
|
|
97
|
-
options?.headers,
|
|
98
|
-
]),
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Initiate a wallet withdrawal.
|
|
104
|
-
*
|
|
105
|
-
* @example
|
|
106
|
-
* ```ts
|
|
107
|
-
* const response = await client.wallet.initiateWithdrawal({
|
|
108
|
-
* amount: 1,
|
|
109
|
-
* externalFundingSourceId:
|
|
110
|
-
* 'efs_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
111
|
-
* 'Idempotency-Key': 'Idempotency-Key',
|
|
112
|
-
* });
|
|
113
|
-
* ```
|
|
114
|
-
*/
|
|
115
|
-
initiateWithdrawal(
|
|
116
|
-
params: WalletInitiateWithdrawalParams,
|
|
117
|
-
options?: RequestOptions,
|
|
118
|
-
): APIPromise<WalletInitiateWithdrawalResponse> {
|
|
119
|
-
const {
|
|
120
|
-
'Idempotency-Key': idempotencyKey,
|
|
121
|
-
'X-Agent-ID': xAgentID,
|
|
122
|
-
'X-Instance-ID': xInstanceID,
|
|
123
|
-
...body
|
|
124
|
-
} = params;
|
|
125
|
-
return this._client.post('/wallet/withdraw', {
|
|
126
|
-
body,
|
|
127
|
-
...options,
|
|
128
|
-
headers: buildHeaders([
|
|
129
|
-
{
|
|
130
|
-
'Idempotency-Key': idempotencyKey,
|
|
131
|
-
...(xAgentID != null ? { 'X-Agent-ID': xAgentID } : undefined),
|
|
132
|
-
...(xInstanceID != null ? { 'X-Instance-ID': xInstanceID } : undefined),
|
|
133
|
-
},
|
|
134
|
-
options?.headers,
|
|
135
|
-
]),
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* List linked external funding sources with cursor pagination.
|
|
141
|
-
*
|
|
142
|
-
* @example
|
|
143
|
-
* ```ts
|
|
144
|
-
* const response =
|
|
145
|
-
* await client.wallet.listPaymentInstruments();
|
|
146
|
-
* ```
|
|
147
|
-
*/
|
|
148
|
-
listPaymentInstruments(
|
|
149
|
-
params: WalletListPaymentInstrumentsParams | null | undefined = {},
|
|
150
|
-
options?: RequestOptions,
|
|
151
|
-
): APIPromise<WalletListPaymentInstrumentsResponse> {
|
|
152
|
-
const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID, ...query } = params ?? {};
|
|
153
|
-
return this._client.get('/wallet/external-funding-sources', {
|
|
154
|
-
query,
|
|
22
|
+
return this._client.get('/wallets', {
|
|
155
23
|
...options,
|
|
156
24
|
headers: buildHeaders([
|
|
157
25
|
{
|
|
@@ -164,23 +32,16 @@ export class Wallet extends APIResource {
|
|
|
164
32
|
}
|
|
165
33
|
|
|
166
34
|
/**
|
|
167
|
-
*
|
|
168
|
-
*
|
|
169
|
-
* @example
|
|
170
|
-
* ```ts
|
|
171
|
-
* const response =
|
|
172
|
-
* await client.wallet.removePaymentInstrument(
|
|
173
|
-
* 'efs_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
174
|
-
* );
|
|
175
|
-
* ```
|
|
35
|
+
* Get a wallet visible to the authenticated party, including balance and ACH
|
|
36
|
+
* deposit instructions when available.
|
|
176
37
|
*/
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
params:
|
|
38
|
+
get(
|
|
39
|
+
walletID: string,
|
|
40
|
+
params: WalletGetParams | null | undefined = {},
|
|
180
41
|
options?: RequestOptions,
|
|
181
|
-
): APIPromise<
|
|
42
|
+
): APIPromise<WalletGetResponse> {
|
|
182
43
|
const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID } = params ?? {};
|
|
183
|
-
return this._client.
|
|
44
|
+
return this._client.get(path`/wallets/${walletID}`, {
|
|
184
45
|
...options,
|
|
185
46
|
headers: buildHeaders([
|
|
186
47
|
{
|
|
@@ -193,11 +54,13 @@ export class Wallet extends APIResource {
|
|
|
193
54
|
}
|
|
194
55
|
}
|
|
195
56
|
|
|
196
|
-
export interface
|
|
197
|
-
data:
|
|
57
|
+
export interface WalletListResponse {
|
|
58
|
+
data: Array<WalletListResponse.Data>;
|
|
59
|
+
|
|
60
|
+
meta: WalletListResponse.Meta;
|
|
198
61
|
}
|
|
199
62
|
|
|
200
|
-
export namespace
|
|
63
|
+
export namespace WalletListResponse {
|
|
201
64
|
export interface Data {
|
|
202
65
|
/**
|
|
203
66
|
* Resource ID
|
|
@@ -226,314 +89,81 @@ export namespace WalletGetBalanceResponse {
|
|
|
226
89
|
*/
|
|
227
90
|
export interface Attributes {
|
|
228
91
|
/**
|
|
229
|
-
*
|
|
92
|
+
* Wallet ledger balance
|
|
230
93
|
*/
|
|
231
|
-
|
|
94
|
+
balance: Attributes.Balance;
|
|
232
95
|
|
|
233
96
|
/**
|
|
234
|
-
*
|
|
97
|
+
* Claimable payment totals
|
|
235
98
|
*/
|
|
236
|
-
|
|
99
|
+
claims: Attributes.Claims;
|
|
237
100
|
|
|
238
101
|
/**
|
|
239
|
-
*
|
|
102
|
+
* ACH deposit instructions for this wallet, when available
|
|
240
103
|
*/
|
|
241
|
-
|
|
242
|
-
}
|
|
104
|
+
depositInstructions: Attributes.DepositInstructions | null;
|
|
243
105
|
|
|
244
|
-
/**
|
|
245
|
-
* Resource relationships
|
|
246
|
-
*/
|
|
247
|
-
export interface Relationships {
|
|
248
106
|
/**
|
|
249
|
-
*
|
|
107
|
+
* Wallet readiness status
|
|
250
108
|
*/
|
|
251
|
-
|
|
109
|
+
status: 'active';
|
|
252
110
|
}
|
|
253
111
|
|
|
254
|
-
export namespace
|
|
112
|
+
export namespace Attributes {
|
|
255
113
|
/**
|
|
256
|
-
*
|
|
114
|
+
* Wallet ledger balance
|
|
257
115
|
*/
|
|
258
|
-
export interface
|
|
116
|
+
export interface Balance {
|
|
259
117
|
/**
|
|
260
|
-
*
|
|
118
|
+
* Amount currently available to spend or withdraw (cents)
|
|
261
119
|
*/
|
|
262
|
-
|
|
263
|
-
}
|
|
120
|
+
available: number;
|
|
264
121
|
|
|
265
|
-
export namespace Party {
|
|
266
122
|
/**
|
|
267
|
-
*
|
|
123
|
+
* Currency code
|
|
268
124
|
*/
|
|
269
|
-
|
|
270
|
-
id: string;
|
|
125
|
+
currency: 'USD';
|
|
271
126
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
}
|
|
127
|
+
/**
|
|
128
|
+
* Total wallet ledger balance (cents)
|
|
129
|
+
*/
|
|
130
|
+
total: number;
|
|
277
131
|
}
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
export interface WalletGetDepositInstructionsResponse {
|
|
283
|
-
data: WalletGetDepositInstructionsResponse.Data;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
export namespace WalletGetDepositInstructionsResponse {
|
|
287
|
-
export interface Data {
|
|
288
|
-
/**
|
|
289
|
-
* Resource ID (the wallet handle)
|
|
290
|
-
*/
|
|
291
|
-
id: string;
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* Resource attributes
|
|
295
|
-
*/
|
|
296
|
-
attributes: Data.Attributes;
|
|
297
|
-
|
|
298
|
-
/**
|
|
299
|
-
* Resource type
|
|
300
|
-
*/
|
|
301
|
-
type: string;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
export namespace Data {
|
|
305
|
-
/**
|
|
306
|
-
* Resource attributes
|
|
307
|
-
*/
|
|
308
|
-
export interface Attributes {
|
|
309
|
-
/**
|
|
310
|
-
* Account number for ACH deposits
|
|
311
|
-
*/
|
|
312
|
-
accountNumber: string;
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* Name of the receiving bank
|
|
316
|
-
*/
|
|
317
|
-
bankName: string;
|
|
318
|
-
|
|
319
|
-
/**
|
|
320
|
-
* Bank routing number for ACH deposits
|
|
321
|
-
*/
|
|
322
|
-
routingNumber: string;
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
export interface WalletInitiateDepositResponse {
|
|
328
|
-
data: WalletInitiateDepositResponse.Data;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
export namespace WalletInitiateDepositResponse {
|
|
332
|
-
export interface Data {
|
|
333
|
-
/**
|
|
334
|
-
* Transaction handle (txn_xxx). Empty when the operation failed before a
|
|
335
|
-
* transaction was created.
|
|
336
|
-
*/
|
|
337
|
-
id: string;
|
|
338
|
-
|
|
339
|
-
/**
|
|
340
|
-
* Resource attributes
|
|
341
|
-
*/
|
|
342
|
-
attributes: Data.Attributes;
|
|
343
|
-
|
|
344
|
-
/**
|
|
345
|
-
* Resource type
|
|
346
|
-
*/
|
|
347
|
-
type: string;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
export namespace Data {
|
|
351
|
-
/**
|
|
352
|
-
* Resource attributes
|
|
353
|
-
*/
|
|
354
|
-
export interface Attributes {
|
|
355
|
-
/**
|
|
356
|
-
* Amount in cents
|
|
357
|
-
*/
|
|
358
|
-
amount: number;
|
|
359
|
-
|
|
360
|
-
/**
|
|
361
|
-
* Currency code
|
|
362
|
-
*/
|
|
363
|
-
currency: string;
|
|
364
|
-
|
|
365
|
-
/**
|
|
366
|
-
* Error message if failed
|
|
367
|
-
*/
|
|
368
|
-
error: string | null;
|
|
369
|
-
|
|
370
|
-
/**
|
|
371
|
-
* Detailed error information
|
|
372
|
-
*/
|
|
373
|
-
errorDetails: string | null;
|
|
374
|
-
|
|
375
|
-
/**
|
|
376
|
-
* Estimated settlement time
|
|
377
|
-
*/
|
|
378
|
-
estimatedSettlement: string | null;
|
|
379
|
-
|
|
380
|
-
/**
|
|
381
|
-
* Operation status
|
|
382
|
-
*/
|
|
383
|
-
status: 'PROCESSING' | 'IN_REVIEW' | 'COMPLETED' | 'FAILED' | 'RETURNED';
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
export interface WalletInitiateWithdrawalResponse {
|
|
389
|
-
data: WalletInitiateWithdrawalResponse.Data;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
export namespace WalletInitiateWithdrawalResponse {
|
|
393
|
-
export interface Data {
|
|
394
|
-
/**
|
|
395
|
-
* Transaction handle (txn_xxx). Empty when the operation failed before a
|
|
396
|
-
* transaction was created.
|
|
397
|
-
*/
|
|
398
|
-
id: string;
|
|
399
|
-
|
|
400
|
-
/**
|
|
401
|
-
* Resource attributes
|
|
402
|
-
*/
|
|
403
|
-
attributes: Data.Attributes;
|
|
404
|
-
|
|
405
|
-
/**
|
|
406
|
-
* Resource type
|
|
407
|
-
*/
|
|
408
|
-
type: string;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
export namespace Data {
|
|
412
|
-
/**
|
|
413
|
-
* Resource attributes
|
|
414
|
-
*/
|
|
415
|
-
export interface Attributes {
|
|
416
|
-
/**
|
|
417
|
-
* Amount in cents
|
|
418
|
-
*/
|
|
419
|
-
amount: number;
|
|
420
|
-
|
|
421
|
-
/**
|
|
422
|
-
* Currency code
|
|
423
|
-
*/
|
|
424
|
-
currency: string;
|
|
425
132
|
|
|
426
133
|
/**
|
|
427
|
-
*
|
|
134
|
+
* Claimable payment totals
|
|
428
135
|
*/
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
errorDetails: string | null;
|
|
435
|
-
|
|
436
|
-
/**
|
|
437
|
-
* Estimated settlement time
|
|
438
|
-
*/
|
|
439
|
-
estimatedSettlement: string | null;
|
|
440
|
-
|
|
441
|
-
/**
|
|
442
|
-
* Payment instruction ID
|
|
443
|
-
*/
|
|
444
|
-
instructionId: string | null;
|
|
445
|
-
|
|
446
|
-
/**
|
|
447
|
-
* MFA challenge ID
|
|
448
|
-
*/
|
|
449
|
-
mfaChallengeId: string | null;
|
|
450
|
-
|
|
451
|
-
/**
|
|
452
|
-
* MFA challenge expiration
|
|
453
|
-
*/
|
|
454
|
-
mfaExpiresAt: string | null;
|
|
455
|
-
|
|
456
|
-
/**
|
|
457
|
-
* Whether MFA is required
|
|
458
|
-
*/
|
|
459
|
-
mfaRequired: boolean;
|
|
460
|
-
|
|
461
|
-
/**
|
|
462
|
-
* Operation status
|
|
463
|
-
*/
|
|
464
|
-
status: 'PROCESSING' | 'IN_REVIEW' | 'COMPLETED' | 'FAILED' | 'RETURNED';
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
export interface WalletListPaymentInstrumentsResponse {
|
|
470
|
-
data: Array<WalletListPaymentInstrumentsResponse.Data>;
|
|
471
|
-
|
|
472
|
-
meta: WalletListPaymentInstrumentsResponse.Meta;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
export namespace WalletListPaymentInstrumentsResponse {
|
|
476
|
-
export interface Data {
|
|
477
|
-
/**
|
|
478
|
-
* Resource ID
|
|
479
|
-
*/
|
|
480
|
-
id: string;
|
|
481
|
-
|
|
482
|
-
/**
|
|
483
|
-
* Resource attributes
|
|
484
|
-
*/
|
|
485
|
-
attributes: Data.Attributes;
|
|
486
|
-
|
|
487
|
-
/**
|
|
488
|
-
* Resource relationships
|
|
489
|
-
*/
|
|
490
|
-
relationships: Data.Relationships;
|
|
491
|
-
|
|
492
|
-
/**
|
|
493
|
-
* Resource type
|
|
494
|
-
*/
|
|
495
|
-
type: string;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
export namespace Data {
|
|
499
|
-
/**
|
|
500
|
-
* Resource attributes
|
|
501
|
-
*/
|
|
502
|
-
export interface Attributes {
|
|
503
|
-
/**
|
|
504
|
-
* Account display name
|
|
505
|
-
*/
|
|
506
|
-
accountName: string | null;
|
|
507
|
-
|
|
508
|
-
/**
|
|
509
|
-
* Account type (checking, savings)
|
|
510
|
-
*/
|
|
511
|
-
accountType: 'checking' | 'savings' | 'unknown' | null;
|
|
512
|
-
|
|
513
|
-
/**
|
|
514
|
-
* Bank institution name
|
|
515
|
-
*/
|
|
516
|
-
bankName: string | null;
|
|
136
|
+
export interface Claims {
|
|
137
|
+
/**
|
|
138
|
+
* Total unclaimed product-payment amount (cents)
|
|
139
|
+
*/
|
|
140
|
+
amount: number;
|
|
517
141
|
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
142
|
+
/**
|
|
143
|
+
* Number of unclaimed product payments
|
|
144
|
+
*/
|
|
145
|
+
count: number;
|
|
146
|
+
}
|
|
522
147
|
|
|
523
148
|
/**
|
|
524
|
-
*
|
|
149
|
+
* ACH deposit instructions for this wallet, when available
|
|
525
150
|
*/
|
|
526
|
-
|
|
151
|
+
export interface DepositInstructions {
|
|
152
|
+
/**
|
|
153
|
+
* Account number for ACH deposits
|
|
154
|
+
*/
|
|
155
|
+
accountNumber: string;
|
|
527
156
|
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
157
|
+
/**
|
|
158
|
+
* Name of the receiving bank
|
|
159
|
+
*/
|
|
160
|
+
bankName: string;
|
|
532
161
|
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
162
|
+
/**
|
|
163
|
+
* Bank routing number for ACH deposits
|
|
164
|
+
*/
|
|
165
|
+
routingNumber: string;
|
|
166
|
+
}
|
|
537
167
|
}
|
|
538
168
|
|
|
539
169
|
/**
|
|
@@ -541,14 +171,14 @@ export namespace WalletListPaymentInstrumentsResponse {
|
|
|
541
171
|
*/
|
|
542
172
|
export interface Relationships {
|
|
543
173
|
/**
|
|
544
|
-
* Party that owns the
|
|
174
|
+
* Party that owns the wallet
|
|
545
175
|
*/
|
|
546
176
|
party: Relationships.Party;
|
|
547
177
|
}
|
|
548
178
|
|
|
549
179
|
export namespace Relationships {
|
|
550
180
|
/**
|
|
551
|
-
* Party that owns the
|
|
181
|
+
* Party that owns the wallet
|
|
552
182
|
*/
|
|
553
183
|
export interface Party {
|
|
554
184
|
/**
|
|
@@ -586,13 +216,11 @@ export namespace WalletListPaymentInstrumentsResponse {
|
|
|
586
216
|
}
|
|
587
217
|
}
|
|
588
218
|
|
|
589
|
-
export interface
|
|
590
|
-
data:
|
|
591
|
-
|
|
592
|
-
meta: WalletRemovePaymentInstrumentResponse.Meta;
|
|
219
|
+
export interface WalletGetResponse {
|
|
220
|
+
data: WalletGetResponse.Data;
|
|
593
221
|
}
|
|
594
222
|
|
|
595
|
-
export namespace
|
|
223
|
+
export namespace WalletGetResponse {
|
|
596
224
|
export interface Data {
|
|
597
225
|
/**
|
|
598
226
|
* Resource ID
|
|
@@ -621,39 +249,81 @@ export namespace WalletRemovePaymentInstrumentResponse {
|
|
|
621
249
|
*/
|
|
622
250
|
export interface Attributes {
|
|
623
251
|
/**
|
|
624
|
-
*
|
|
252
|
+
* Wallet ledger balance
|
|
625
253
|
*/
|
|
626
|
-
|
|
254
|
+
balance: Attributes.Balance;
|
|
627
255
|
|
|
628
256
|
/**
|
|
629
|
-
*
|
|
257
|
+
* Claimable payment totals
|
|
630
258
|
*/
|
|
631
|
-
|
|
259
|
+
claims: Attributes.Claims;
|
|
632
260
|
|
|
633
261
|
/**
|
|
634
|
-
*
|
|
262
|
+
* ACH deposit instructions for this wallet, when available
|
|
635
263
|
*/
|
|
636
|
-
|
|
264
|
+
depositInstructions: Attributes.DepositInstructions | null;
|
|
637
265
|
|
|
638
266
|
/**
|
|
639
|
-
*
|
|
267
|
+
* Wallet readiness status
|
|
640
268
|
*/
|
|
641
|
-
|
|
269
|
+
status: 'active';
|
|
270
|
+
}
|
|
642
271
|
|
|
272
|
+
export namespace Attributes {
|
|
643
273
|
/**
|
|
644
|
-
*
|
|
274
|
+
* Wallet ledger balance
|
|
645
275
|
*/
|
|
646
|
-
|
|
276
|
+
export interface Balance {
|
|
277
|
+
/**
|
|
278
|
+
* Amount currently available to spend or withdraw (cents)
|
|
279
|
+
*/
|
|
280
|
+
available: number;
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* Currency code
|
|
284
|
+
*/
|
|
285
|
+
currency: 'USD';
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Total wallet ledger balance (cents)
|
|
289
|
+
*/
|
|
290
|
+
total: number;
|
|
291
|
+
}
|
|
647
292
|
|
|
648
293
|
/**
|
|
649
|
-
*
|
|
294
|
+
* Claimable payment totals
|
|
650
295
|
*/
|
|
651
|
-
|
|
296
|
+
export interface Claims {
|
|
297
|
+
/**
|
|
298
|
+
* Total unclaimed product-payment amount (cents)
|
|
299
|
+
*/
|
|
300
|
+
amount: number;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Number of unclaimed product payments
|
|
304
|
+
*/
|
|
305
|
+
count: number;
|
|
306
|
+
}
|
|
652
307
|
|
|
653
308
|
/**
|
|
654
|
-
*
|
|
309
|
+
* ACH deposit instructions for this wallet, when available
|
|
655
310
|
*/
|
|
656
|
-
|
|
311
|
+
export interface DepositInstructions {
|
|
312
|
+
/**
|
|
313
|
+
* Account number for ACH deposits
|
|
314
|
+
*/
|
|
315
|
+
accountNumber: string;
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Name of the receiving bank
|
|
319
|
+
*/
|
|
320
|
+
bankName: string;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Bank routing number for ACH deposits
|
|
324
|
+
*/
|
|
325
|
+
routingNumber: string;
|
|
326
|
+
}
|
|
657
327
|
}
|
|
658
328
|
|
|
659
329
|
/**
|
|
@@ -661,14 +331,14 @@ export namespace WalletRemovePaymentInstrumentResponse {
|
|
|
661
331
|
*/
|
|
662
332
|
export interface Relationships {
|
|
663
333
|
/**
|
|
664
|
-
* Party that owns the
|
|
334
|
+
* Party that owns the wallet
|
|
665
335
|
*/
|
|
666
336
|
party: Relationships.Party;
|
|
667
337
|
}
|
|
668
338
|
|
|
669
339
|
export namespace Relationships {
|
|
670
340
|
/**
|
|
671
|
-
* Party that owns the
|
|
341
|
+
* Party that owns the wallet
|
|
672
342
|
*/
|
|
673
343
|
export interface Party {
|
|
674
344
|
/**
|
|
@@ -692,34 +362,9 @@ export namespace WalletRemovePaymentInstrumentResponse {
|
|
|
692
362
|
}
|
|
693
363
|
}
|
|
694
364
|
}
|
|
695
|
-
|
|
696
|
-
export interface Meta {
|
|
697
|
-
/**
|
|
698
|
-
* Indicates the resource was deleted
|
|
699
|
-
*/
|
|
700
|
-
deleted: true;
|
|
701
|
-
}
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
export interface WalletGetBalanceParams {
|
|
705
|
-
/**
|
|
706
|
-
* Query param
|
|
707
|
-
*/
|
|
708
|
-
partyId?: string;
|
|
709
|
-
|
|
710
|
-
/**
|
|
711
|
-
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
712
|
-
*/
|
|
713
|
-
'X-Agent-ID'?: string;
|
|
714
|
-
|
|
715
|
-
/**
|
|
716
|
-
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
717
|
-
* for agent observability.
|
|
718
|
-
*/
|
|
719
|
-
'X-Instance-ID'?: string;
|
|
720
365
|
}
|
|
721
366
|
|
|
722
|
-
export interface
|
|
367
|
+
export interface WalletListParams {
|
|
723
368
|
/**
|
|
724
369
|
* Agent ID (agt_xxx) identifying which agent is making the request.
|
|
725
370
|
*/
|
|
@@ -732,108 +377,7 @@ export interface WalletGetDepositInstructionsParams {
|
|
|
732
377
|
'X-Instance-ID'?: string;
|
|
733
378
|
}
|
|
734
379
|
|
|
735
|
-
export interface
|
|
736
|
-
/**
|
|
737
|
-
* Body param: Amount in cents
|
|
738
|
-
*/
|
|
739
|
-
amount: number;
|
|
740
|
-
|
|
741
|
-
/**
|
|
742
|
-
* Body param: External funding source ID (efs\_\*)
|
|
743
|
-
*/
|
|
744
|
-
externalFundingSourceId: string;
|
|
745
|
-
|
|
746
|
-
/**
|
|
747
|
-
* Header param: Unique key for idempotent request handling. If a request with the
|
|
748
|
-
* same key was already processed, the original response is returned.
|
|
749
|
-
*/
|
|
750
|
-
'Idempotency-Key': string;
|
|
751
|
-
|
|
752
|
-
/**
|
|
753
|
-
* Body param: Currency code
|
|
754
|
-
*/
|
|
755
|
-
currency?: string;
|
|
756
|
-
|
|
757
|
-
/**
|
|
758
|
-
* Body param: Deposit description
|
|
759
|
-
*/
|
|
760
|
-
description?: string;
|
|
761
|
-
|
|
762
|
-
/**
|
|
763
|
-
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
764
|
-
*/
|
|
765
|
-
'X-Agent-ID'?: string;
|
|
766
|
-
|
|
767
|
-
/**
|
|
768
|
-
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
769
|
-
* for agent observability.
|
|
770
|
-
*/
|
|
771
|
-
'X-Instance-ID'?: string;
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
export interface WalletInitiateWithdrawalParams {
|
|
775
|
-
/**
|
|
776
|
-
* Body param: Amount in cents
|
|
777
|
-
*/
|
|
778
|
-
amount: number;
|
|
779
|
-
|
|
780
|
-
/**
|
|
781
|
-
* Body param: External funding source ID (efs\_\*)
|
|
782
|
-
*/
|
|
783
|
-
externalFundingSourceId: string;
|
|
784
|
-
|
|
785
|
-
/**
|
|
786
|
-
* Header param: Unique key for idempotent request handling. If a request with the
|
|
787
|
-
* same key was already processed, the original response is returned.
|
|
788
|
-
*/
|
|
789
|
-
'Idempotency-Key': string;
|
|
790
|
-
|
|
791
|
-
/**
|
|
792
|
-
* Body param: Currency code
|
|
793
|
-
*/
|
|
794
|
-
currency?: string;
|
|
795
|
-
|
|
796
|
-
/**
|
|
797
|
-
* Body param: Withdrawal description
|
|
798
|
-
*/
|
|
799
|
-
description?: string;
|
|
800
|
-
|
|
801
|
-
/**
|
|
802
|
-
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
803
|
-
*/
|
|
804
|
-
'X-Agent-ID'?: string;
|
|
805
|
-
|
|
806
|
-
/**
|
|
807
|
-
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
808
|
-
* for agent observability.
|
|
809
|
-
*/
|
|
810
|
-
'X-Instance-ID'?: string;
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
export interface WalletListPaymentInstrumentsParams {
|
|
814
|
-
/**
|
|
815
|
-
* Query param
|
|
816
|
-
*/
|
|
817
|
-
cursor?: string;
|
|
818
|
-
|
|
819
|
-
/**
|
|
820
|
-
* Query param
|
|
821
|
-
*/
|
|
822
|
-
limit?: number;
|
|
823
|
-
|
|
824
|
-
/**
|
|
825
|
-
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
826
|
-
*/
|
|
827
|
-
'X-Agent-ID'?: string;
|
|
828
|
-
|
|
829
|
-
/**
|
|
830
|
-
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
831
|
-
* for agent observability.
|
|
832
|
-
*/
|
|
833
|
-
'X-Instance-ID'?: string;
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
export interface WalletRemovePaymentInstrumentParams {
|
|
380
|
+
export interface WalletGetParams {
|
|
837
381
|
/**
|
|
838
382
|
* Agent ID (agt_xxx) identifying which agent is making the request.
|
|
839
383
|
*/
|
|
@@ -848,17 +392,9 @@ export interface WalletRemovePaymentInstrumentParams {
|
|
|
848
392
|
|
|
849
393
|
export declare namespace Wallet {
|
|
850
394
|
export {
|
|
851
|
-
type
|
|
852
|
-
type
|
|
853
|
-
type
|
|
854
|
-
type
|
|
855
|
-
type WalletListPaymentInstrumentsResponse as WalletListPaymentInstrumentsResponse,
|
|
856
|
-
type WalletRemovePaymentInstrumentResponse as WalletRemovePaymentInstrumentResponse,
|
|
857
|
-
type WalletGetBalanceParams as WalletGetBalanceParams,
|
|
858
|
-
type WalletGetDepositInstructionsParams as WalletGetDepositInstructionsParams,
|
|
859
|
-
type WalletInitiateDepositParams as WalletInitiateDepositParams,
|
|
860
|
-
type WalletInitiateWithdrawalParams as WalletInitiateWithdrawalParams,
|
|
861
|
-
type WalletListPaymentInstrumentsParams as WalletListPaymentInstrumentsParams,
|
|
862
|
-
type WalletRemovePaymentInstrumentParams as WalletRemovePaymentInstrumentParams,
|
|
395
|
+
type WalletListResponse as WalletListResponse,
|
|
396
|
+
type WalletGetResponse as WalletGetResponse,
|
|
397
|
+
type WalletListParams as WalletListParams,
|
|
398
|
+
type WalletGetParams as WalletGetParams,
|
|
863
399
|
};
|
|
864
400
|
}
|