@naturalpay/sdk 0.2.1 → 0.3.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 +29 -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 +17 -5
- package/client.d.mts.map +1 -1
- package/client.d.ts +17 -5
- package/client.d.ts.map +1 -1
- package/client.js +16 -4
- package/client.js.map +1 -1
- package/client.mjs +16 -4
- 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.map +1 -1
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-keys.js +1 -1
- package/resources/api-keys.js.map +1 -1
- package/resources/api-keys.mjs +1 -1
- 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/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 +3 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -1
- 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/invitations.d.mts +1 -1
- package/resources/invitations.d.mts.map +1 -1
- package/resources/invitations.d.ts +1 -1
- package/resources/invitations.d.ts.map +1 -1
- package/resources/invitations.js +1 -1
- package/resources/invitations.mjs +1 -1
- package/resources/invitations.mjs.map +1 -1
- package/resources/parties.d.mts +2 -2
- package/resources/parties.d.mts.map +1 -1
- package/resources/parties.d.ts +2 -2
- package/resources/parties.d.ts.map +1 -1
- package/resources/parties.js +3 -3
- package/resources/parties.js.map +1 -1
- package/resources/parties.mjs +3 -3
- package/resources/parties.mjs.map +1 -1
- package/resources/payment-requests.d.mts +24 -17
- package/resources/payment-requests.d.mts.map +1 -1
- package/resources/payment-requests.d.ts +24 -17
- package/resources/payment-requests.d.ts.map +1 -1
- package/resources/payment-requests.js +0 -1
- package/resources/payment-requests.js.map +1 -1
- package/resources/payment-requests.mjs +0 -1
- package/resources/payment-requests.mjs.map +1 -1
- package/resources/payments.d.mts +1 -1
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +1 -1
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.mjs.map +1 -1
- package/resources/transactions.d.mts +18 -10
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +18 -10
- package/resources/transactions.d.ts.map +1 -1
- package/resources/transactions.js +2 -2
- package/resources/transactions.mjs +2 -2
- package/resources/transactions.mjs.map +1 -1
- package/resources/wallet.d.mts +196 -328
- package/resources/wallet.d.mts.map +1 -1
- package/resources/wallet.d.ts +196 -328
- package/resources/wallet.d.ts.map +1 -1
- package/resources/wallet.js +16 -63
- package/resources/wallet.js.map +1 -1
- package/resources/wallet.mjs +16 -63
- 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 +69 -21
- package/src/resources/agents.ts +5 -185
- package/src/resources/api-keys.ts +1 -1
- package/src/resources/counterparties.ts +5 -64
- package/src/resources/external-accounts.ts +324 -0
- package/src/resources/index.ts +26 -8
- package/src/resources/invitations.ts +1 -1
- package/src/resources/parties.ts +3 -3
- package/src/resources/payment-requests.ts +28 -18
- package/src/resources/payments.ts +1 -1
- package/src/resources/transactions.ts +20 -10
- package/src/resources/wallet.ts +223 -419
- package/src/resources/webhooks.ts +1225 -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/resources/wallet.d.mts
CHANGED
|
@@ -2,28 +2,31 @@ import { APIResource } from "../core/resource.mjs";
|
|
|
2
2
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
3
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
4
|
/**
|
|
5
|
-
* Wallet balance, deposits, withdrawals, and external
|
|
5
|
+
* Wallet balance, deposits, withdrawals, and external accounts
|
|
6
6
|
*/
|
|
7
7
|
export declare class Wallet extends APIResource {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* List wallets for the authenticated party, including balance and ACH deposit
|
|
10
|
+
* instructions when available. Currently returns at most one wallet.
|
|
10
11
|
*
|
|
11
12
|
* @example
|
|
12
13
|
* ```ts
|
|
13
|
-
* const
|
|
14
|
+
* const wallets = await client.wallet.list();
|
|
14
15
|
* ```
|
|
15
16
|
*/
|
|
16
|
-
|
|
17
|
+
list(params?: WalletListParams | null | undefined, options?: RequestOptions): APIPromise<WalletListResponse>;
|
|
17
18
|
/**
|
|
18
|
-
* Get
|
|
19
|
+
* Get a wallet visible to the authenticated party, including balance and ACH
|
|
20
|
+
* deposit instructions when available.
|
|
19
21
|
*
|
|
20
22
|
* @example
|
|
21
23
|
* ```ts
|
|
22
|
-
* const
|
|
23
|
-
*
|
|
24
|
+
* const wallet = await client.wallet.get(
|
|
25
|
+
* 'wal_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
26
|
+
* );
|
|
24
27
|
* ```
|
|
25
28
|
*/
|
|
26
|
-
|
|
29
|
+
get(walletID: string, params?: WalletGetParams | null | undefined, options?: RequestOptions): APIPromise<WalletGetResponse>;
|
|
27
30
|
/**
|
|
28
31
|
* Initiate a wallet deposit.
|
|
29
32
|
*
|
|
@@ -31,8 +34,7 @@ export declare class Wallet extends APIResource {
|
|
|
31
34
|
* ```ts
|
|
32
35
|
* const response = await client.wallet.initiateDeposit({
|
|
33
36
|
* amount: 1,
|
|
34
|
-
*
|
|
35
|
-
* 'efs_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
37
|
+
* externalAccountId: 'ea_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
36
38
|
* 'Idempotency-Key': 'Idempotency-Key',
|
|
37
39
|
* });
|
|
38
40
|
* ```
|
|
@@ -45,40 +47,18 @@ export declare class Wallet extends APIResource {
|
|
|
45
47
|
* ```ts
|
|
46
48
|
* const response = await client.wallet.initiateWithdrawal({
|
|
47
49
|
* amount: 1,
|
|
48
|
-
*
|
|
49
|
-
* 'efs_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
50
|
+
* externalAccountId: 'ea_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
50
51
|
* 'Idempotency-Key': 'Idempotency-Key',
|
|
51
52
|
* });
|
|
52
53
|
* ```
|
|
53
54
|
*/
|
|
54
55
|
initiateWithdrawal(params: WalletInitiateWithdrawalParams, options?: RequestOptions): APIPromise<WalletInitiateWithdrawalResponse>;
|
|
55
|
-
/**
|
|
56
|
-
* List linked external funding sources with cursor pagination.
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* ```ts
|
|
60
|
-
* const response =
|
|
61
|
-
* await client.wallet.listPaymentInstruments();
|
|
62
|
-
* ```
|
|
63
|
-
*/
|
|
64
|
-
listPaymentInstruments(params?: WalletListPaymentInstrumentsParams | null | undefined, options?: RequestOptions): APIPromise<WalletListPaymentInstrumentsResponse>;
|
|
65
|
-
/**
|
|
66
|
-
* Remove (unlink) a bank account.
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* ```ts
|
|
70
|
-
* const response =
|
|
71
|
-
* await client.wallet.removePaymentInstrument(
|
|
72
|
-
* 'efs_ecc2efdd09bd231a9ad9bd2aada37aa7',
|
|
73
|
-
* );
|
|
74
|
-
* ```
|
|
75
|
-
*/
|
|
76
|
-
removePaymentInstrument(externalFundingSourceID: string, params?: WalletRemovePaymentInstrumentParams | null | undefined, options?: RequestOptions): APIPromise<WalletRemovePaymentInstrumentResponse>;
|
|
77
56
|
}
|
|
78
|
-
export interface
|
|
79
|
-
data:
|
|
57
|
+
export interface WalletListResponse {
|
|
58
|
+
data: Array<WalletListResponse.Data>;
|
|
59
|
+
meta: WalletListResponse.Meta;
|
|
80
60
|
}
|
|
81
|
-
export declare namespace
|
|
61
|
+
export declare namespace WalletListResponse {
|
|
82
62
|
interface Data {
|
|
83
63
|
/**
|
|
84
64
|
* Resource ID
|
|
@@ -103,17 +83,70 @@ export declare namespace WalletGetBalanceResponse {
|
|
|
103
83
|
*/
|
|
104
84
|
interface Attributes {
|
|
105
85
|
/**
|
|
106
|
-
*
|
|
86
|
+
* Wallet ledger balance
|
|
107
87
|
*/
|
|
108
|
-
|
|
88
|
+
balance: Attributes.Balance;
|
|
109
89
|
/**
|
|
110
|
-
*
|
|
90
|
+
* Claimable payment totals
|
|
91
|
+
*/
|
|
92
|
+
claims: Attributes.Claims;
|
|
93
|
+
/**
|
|
94
|
+
* ACH deposit instructions for this wallet, when available
|
|
95
|
+
*/
|
|
96
|
+
depositInstructions: Attributes.DepositInstructions | null;
|
|
97
|
+
/**
|
|
98
|
+
* Wallet readiness status
|
|
99
|
+
*/
|
|
100
|
+
status: 'active';
|
|
101
|
+
}
|
|
102
|
+
namespace Attributes {
|
|
103
|
+
/**
|
|
104
|
+
* Wallet ledger balance
|
|
111
105
|
*/
|
|
112
|
-
|
|
106
|
+
interface Balance {
|
|
107
|
+
/**
|
|
108
|
+
* Amount currently available to spend or withdraw (cents)
|
|
109
|
+
*/
|
|
110
|
+
available: number;
|
|
111
|
+
/**
|
|
112
|
+
* Currency code
|
|
113
|
+
*/
|
|
114
|
+
currency: 'USD';
|
|
115
|
+
/**
|
|
116
|
+
* Total wallet ledger balance (cents)
|
|
117
|
+
*/
|
|
118
|
+
total: number;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Claimable payment totals
|
|
122
|
+
*/
|
|
123
|
+
interface Claims {
|
|
124
|
+
/**
|
|
125
|
+
* Total unclaimed product-payment amount (cents)
|
|
126
|
+
*/
|
|
127
|
+
amount: number;
|
|
128
|
+
/**
|
|
129
|
+
* Number of unclaimed product payments
|
|
130
|
+
*/
|
|
131
|
+
count: number;
|
|
132
|
+
}
|
|
113
133
|
/**
|
|
114
|
-
*
|
|
134
|
+
* ACH deposit instructions for this wallet, when available
|
|
115
135
|
*/
|
|
116
|
-
|
|
136
|
+
interface DepositInstructions {
|
|
137
|
+
/**
|
|
138
|
+
* Account number for ACH deposits
|
|
139
|
+
*/
|
|
140
|
+
accountNumber: string;
|
|
141
|
+
/**
|
|
142
|
+
* Name of the receiving bank
|
|
143
|
+
*/
|
|
144
|
+
bankName: string;
|
|
145
|
+
/**
|
|
146
|
+
* Bank routing number for ACH deposits
|
|
147
|
+
*/
|
|
148
|
+
routingNumber: string;
|
|
149
|
+
}
|
|
117
150
|
}
|
|
118
151
|
/**
|
|
119
152
|
* Resource relationships
|
|
@@ -148,168 +181,20 @@ export declare namespace WalletGetBalanceResponse {
|
|
|
148
181
|
}
|
|
149
182
|
}
|
|
150
183
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
data: WalletGetDepositInstructionsResponse.Data;
|
|
154
|
-
}
|
|
155
|
-
export declare namespace WalletGetDepositInstructionsResponse {
|
|
156
|
-
interface Data {
|
|
157
|
-
/**
|
|
158
|
-
* Resource ID (the wallet handle)
|
|
159
|
-
*/
|
|
160
|
-
id: string;
|
|
161
|
-
/**
|
|
162
|
-
* Resource attributes
|
|
163
|
-
*/
|
|
164
|
-
attributes: Data.Attributes;
|
|
165
|
-
/**
|
|
166
|
-
* Resource type
|
|
167
|
-
*/
|
|
168
|
-
type: string;
|
|
169
|
-
}
|
|
170
|
-
namespace Data {
|
|
171
|
-
/**
|
|
172
|
-
* Resource attributes
|
|
173
|
-
*/
|
|
174
|
-
interface Attributes {
|
|
175
|
-
/**
|
|
176
|
-
* Account number for ACH deposits
|
|
177
|
-
*/
|
|
178
|
-
accountNumber: string;
|
|
179
|
-
/**
|
|
180
|
-
* Name of the receiving bank
|
|
181
|
-
*/
|
|
182
|
-
bankName: string;
|
|
183
|
-
/**
|
|
184
|
-
* Bank routing number for ACH deposits
|
|
185
|
-
*/
|
|
186
|
-
routingNumber: string;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
export interface WalletInitiateDepositResponse {
|
|
191
|
-
data: WalletInitiateDepositResponse.Data;
|
|
192
|
-
}
|
|
193
|
-
export declare namespace WalletInitiateDepositResponse {
|
|
194
|
-
interface Data {
|
|
195
|
-
/**
|
|
196
|
-
* Transaction handle (txn_xxx). Empty when the operation failed before a
|
|
197
|
-
* transaction was created.
|
|
198
|
-
*/
|
|
199
|
-
id: string;
|
|
200
|
-
/**
|
|
201
|
-
* Resource attributes
|
|
202
|
-
*/
|
|
203
|
-
attributes: Data.Attributes;
|
|
204
|
-
/**
|
|
205
|
-
* Resource type
|
|
206
|
-
*/
|
|
207
|
-
type: string;
|
|
208
|
-
}
|
|
209
|
-
namespace Data {
|
|
210
|
-
/**
|
|
211
|
-
* Resource attributes
|
|
212
|
-
*/
|
|
213
|
-
interface Attributes {
|
|
214
|
-
/**
|
|
215
|
-
* Amount in cents
|
|
216
|
-
*/
|
|
217
|
-
amount: number;
|
|
218
|
-
/**
|
|
219
|
-
* Currency code
|
|
220
|
-
*/
|
|
221
|
-
currency: string;
|
|
222
|
-
/**
|
|
223
|
-
* Error message if failed
|
|
224
|
-
*/
|
|
225
|
-
error: string | null;
|
|
226
|
-
/**
|
|
227
|
-
* Detailed error information
|
|
228
|
-
*/
|
|
229
|
-
errorDetails: string | null;
|
|
230
|
-
/**
|
|
231
|
-
* Estimated settlement time
|
|
232
|
-
*/
|
|
233
|
-
estimatedSettlement: string | null;
|
|
234
|
-
/**
|
|
235
|
-
* Operation status
|
|
236
|
-
*/
|
|
237
|
-
status: 'PROCESSING' | 'IN_REVIEW' | 'COMPLETED' | 'FAILED' | 'RETURNED';
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
export interface WalletInitiateWithdrawalResponse {
|
|
242
|
-
data: WalletInitiateWithdrawalResponse.Data;
|
|
243
|
-
}
|
|
244
|
-
export declare namespace WalletInitiateWithdrawalResponse {
|
|
245
|
-
interface Data {
|
|
246
|
-
/**
|
|
247
|
-
* Transaction handle (txn_xxx). Empty when the operation failed before a
|
|
248
|
-
* transaction was created.
|
|
249
|
-
*/
|
|
250
|
-
id: string;
|
|
251
|
-
/**
|
|
252
|
-
* Resource attributes
|
|
253
|
-
*/
|
|
254
|
-
attributes: Data.Attributes;
|
|
255
|
-
/**
|
|
256
|
-
* Resource type
|
|
257
|
-
*/
|
|
258
|
-
type: string;
|
|
184
|
+
interface Meta {
|
|
185
|
+
pagination: Meta.Pagination;
|
|
259
186
|
}
|
|
260
|
-
namespace
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
interface Attributes {
|
|
265
|
-
/**
|
|
266
|
-
* Amount in cents
|
|
267
|
-
*/
|
|
268
|
-
amount: number;
|
|
269
|
-
/**
|
|
270
|
-
* Currency code
|
|
271
|
-
*/
|
|
272
|
-
currency: string;
|
|
273
|
-
/**
|
|
274
|
-
* Error message if failed
|
|
275
|
-
*/
|
|
276
|
-
error: string | null;
|
|
277
|
-
/**
|
|
278
|
-
* Detailed error information
|
|
279
|
-
*/
|
|
280
|
-
errorDetails: string | null;
|
|
281
|
-
/**
|
|
282
|
-
* Estimated settlement time
|
|
283
|
-
*/
|
|
284
|
-
estimatedSettlement: string | null;
|
|
285
|
-
/**
|
|
286
|
-
* Payment instruction ID
|
|
287
|
-
*/
|
|
288
|
-
instructionId: string | null;
|
|
289
|
-
/**
|
|
290
|
-
* MFA challenge ID
|
|
291
|
-
*/
|
|
292
|
-
mfaChallengeId: string | null;
|
|
293
|
-
/**
|
|
294
|
-
* MFA challenge expiration
|
|
295
|
-
*/
|
|
296
|
-
mfaExpiresAt: string | null;
|
|
297
|
-
/**
|
|
298
|
-
* Whether MFA is required
|
|
299
|
-
*/
|
|
300
|
-
mfaRequired: boolean;
|
|
301
|
-
/**
|
|
302
|
-
* Operation status
|
|
303
|
-
*/
|
|
304
|
-
status: 'PROCESSING' | 'IN_REVIEW' | 'COMPLETED' | 'FAILED' | 'RETURNED';
|
|
187
|
+
namespace Meta {
|
|
188
|
+
interface Pagination {
|
|
189
|
+
hasMore: boolean;
|
|
190
|
+
nextCursor: string | null;
|
|
305
191
|
}
|
|
306
192
|
}
|
|
307
193
|
}
|
|
308
|
-
export interface
|
|
309
|
-
data:
|
|
310
|
-
meta: WalletListPaymentInstrumentsResponse.Meta;
|
|
194
|
+
export interface WalletGetResponse {
|
|
195
|
+
data: WalletGetResponse.Data;
|
|
311
196
|
}
|
|
312
|
-
export declare namespace
|
|
197
|
+
export declare namespace WalletGetResponse {
|
|
313
198
|
interface Data {
|
|
314
199
|
/**
|
|
315
200
|
* Resource ID
|
|
@@ -334,46 +219,83 @@ export declare namespace WalletListPaymentInstrumentsResponse {
|
|
|
334
219
|
*/
|
|
335
220
|
interface Attributes {
|
|
336
221
|
/**
|
|
337
|
-
*
|
|
222
|
+
* Wallet ledger balance
|
|
338
223
|
*/
|
|
339
|
-
|
|
224
|
+
balance: Attributes.Balance;
|
|
340
225
|
/**
|
|
341
|
-
*
|
|
226
|
+
* Claimable payment totals
|
|
342
227
|
*/
|
|
343
|
-
|
|
228
|
+
claims: Attributes.Claims;
|
|
344
229
|
/**
|
|
345
|
-
*
|
|
230
|
+
* ACH deposit instructions for this wallet, when available
|
|
346
231
|
*/
|
|
347
|
-
|
|
232
|
+
depositInstructions: Attributes.DepositInstructions | null;
|
|
348
233
|
/**
|
|
349
|
-
*
|
|
234
|
+
* Wallet readiness status
|
|
350
235
|
*/
|
|
351
|
-
|
|
236
|
+
status: 'active';
|
|
237
|
+
}
|
|
238
|
+
namespace Attributes {
|
|
352
239
|
/**
|
|
353
|
-
*
|
|
240
|
+
* Wallet ledger balance
|
|
354
241
|
*/
|
|
355
|
-
|
|
242
|
+
interface Balance {
|
|
243
|
+
/**
|
|
244
|
+
* Amount currently available to spend or withdraw (cents)
|
|
245
|
+
*/
|
|
246
|
+
available: number;
|
|
247
|
+
/**
|
|
248
|
+
* Currency code
|
|
249
|
+
*/
|
|
250
|
+
currency: 'USD';
|
|
251
|
+
/**
|
|
252
|
+
* Total wallet ledger balance (cents)
|
|
253
|
+
*/
|
|
254
|
+
total: number;
|
|
255
|
+
}
|
|
356
256
|
/**
|
|
357
|
-
*
|
|
257
|
+
* Claimable payment totals
|
|
358
258
|
*/
|
|
359
|
-
|
|
259
|
+
interface Claims {
|
|
260
|
+
/**
|
|
261
|
+
* Total unclaimed product-payment amount (cents)
|
|
262
|
+
*/
|
|
263
|
+
amount: number;
|
|
264
|
+
/**
|
|
265
|
+
* Number of unclaimed product payments
|
|
266
|
+
*/
|
|
267
|
+
count: number;
|
|
268
|
+
}
|
|
360
269
|
/**
|
|
361
|
-
*
|
|
270
|
+
* ACH deposit instructions for this wallet, when available
|
|
362
271
|
*/
|
|
363
|
-
|
|
272
|
+
interface DepositInstructions {
|
|
273
|
+
/**
|
|
274
|
+
* Account number for ACH deposits
|
|
275
|
+
*/
|
|
276
|
+
accountNumber: string;
|
|
277
|
+
/**
|
|
278
|
+
* Name of the receiving bank
|
|
279
|
+
*/
|
|
280
|
+
bankName: string;
|
|
281
|
+
/**
|
|
282
|
+
* Bank routing number for ACH deposits
|
|
283
|
+
*/
|
|
284
|
+
routingNumber: string;
|
|
285
|
+
}
|
|
364
286
|
}
|
|
365
287
|
/**
|
|
366
288
|
* Resource relationships
|
|
367
289
|
*/
|
|
368
290
|
interface Relationships {
|
|
369
291
|
/**
|
|
370
|
-
* Party that owns the
|
|
292
|
+
* Party that owns the wallet
|
|
371
293
|
*/
|
|
372
294
|
party: Relationships.Party;
|
|
373
295
|
}
|
|
374
296
|
namespace Relationships {
|
|
375
297
|
/**
|
|
376
|
-
* Party that owns the
|
|
298
|
+
* Party that owns the wallet
|
|
377
299
|
*/
|
|
378
300
|
interface Party {
|
|
379
301
|
/**
|
|
@@ -395,34 +317,21 @@ export declare namespace WalletListPaymentInstrumentsResponse {
|
|
|
395
317
|
}
|
|
396
318
|
}
|
|
397
319
|
}
|
|
398
|
-
interface Meta {
|
|
399
|
-
pagination: Meta.Pagination;
|
|
400
|
-
}
|
|
401
|
-
namespace Meta {
|
|
402
|
-
interface Pagination {
|
|
403
|
-
hasMore: boolean;
|
|
404
|
-
nextCursor: string | null;
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
320
|
}
|
|
408
|
-
export interface
|
|
409
|
-
data:
|
|
410
|
-
meta: WalletRemovePaymentInstrumentResponse.Meta;
|
|
321
|
+
export interface WalletInitiateDepositResponse {
|
|
322
|
+
data: WalletInitiateDepositResponse.Data;
|
|
411
323
|
}
|
|
412
|
-
export declare namespace
|
|
324
|
+
export declare namespace WalletInitiateDepositResponse {
|
|
413
325
|
interface Data {
|
|
414
326
|
/**
|
|
415
|
-
*
|
|
327
|
+
* Transaction handle (txn_xxx). Empty when the operation failed before a
|
|
328
|
+
* transaction was created.
|
|
416
329
|
*/
|
|
417
330
|
id: string;
|
|
418
331
|
/**
|
|
419
332
|
* Resource attributes
|
|
420
333
|
*/
|
|
421
334
|
attributes: Data.Attributes;
|
|
422
|
-
/**
|
|
423
|
-
* Resource relationships
|
|
424
|
-
*/
|
|
425
|
-
relationships: Data.Relationships;
|
|
426
335
|
/**
|
|
427
336
|
* Resource type
|
|
428
337
|
*/
|
|
@@ -434,90 +343,79 @@ export declare namespace WalletRemovePaymentInstrumentResponse {
|
|
|
434
343
|
*/
|
|
435
344
|
interface Attributes {
|
|
436
345
|
/**
|
|
437
|
-
*
|
|
438
|
-
*/
|
|
439
|
-
accountName: string | null;
|
|
440
|
-
/**
|
|
441
|
-
* Account type (checking, savings)
|
|
346
|
+
* Amount in cents
|
|
442
347
|
*/
|
|
443
|
-
|
|
348
|
+
amount: number;
|
|
444
349
|
/**
|
|
445
|
-
*
|
|
350
|
+
* Currency code
|
|
446
351
|
*/
|
|
447
|
-
|
|
352
|
+
currency: string;
|
|
448
353
|
/**
|
|
449
|
-
*
|
|
354
|
+
* Estimated settlement time
|
|
450
355
|
*/
|
|
451
|
-
|
|
356
|
+
estimatedSettlement: string | null;
|
|
452
357
|
/**
|
|
453
|
-
*
|
|
358
|
+
* Operation status
|
|
454
359
|
*/
|
|
455
|
-
|
|
360
|
+
status: 'PROCESSING' | 'IN_REVIEW' | 'AWAITING_APPROVAL' | 'COMPLETED' | 'FAILED' | 'RETURNED';
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
export interface WalletInitiateWithdrawalResponse {
|
|
365
|
+
data: WalletInitiateWithdrawalResponse.Data;
|
|
366
|
+
}
|
|
367
|
+
export declare namespace WalletInitiateWithdrawalResponse {
|
|
368
|
+
interface Data {
|
|
369
|
+
/**
|
|
370
|
+
* Transaction handle (txn_xxx). Empty when the operation failed before a
|
|
371
|
+
* transaction was created.
|
|
372
|
+
*/
|
|
373
|
+
id: string;
|
|
374
|
+
/**
|
|
375
|
+
* Resource attributes
|
|
376
|
+
*/
|
|
377
|
+
attributes: Data.Attributes;
|
|
378
|
+
/**
|
|
379
|
+
* Resource type
|
|
380
|
+
*/
|
|
381
|
+
type: string;
|
|
382
|
+
}
|
|
383
|
+
namespace Data {
|
|
384
|
+
/**
|
|
385
|
+
* Resource attributes
|
|
386
|
+
*/
|
|
387
|
+
interface Attributes {
|
|
456
388
|
/**
|
|
457
|
-
*
|
|
389
|
+
* Amount in cents
|
|
458
390
|
*/
|
|
459
|
-
|
|
391
|
+
amount: number;
|
|
460
392
|
/**
|
|
461
|
-
*
|
|
393
|
+
* Currency code
|
|
462
394
|
*/
|
|
463
|
-
|
|
464
|
-
}
|
|
465
|
-
/**
|
|
466
|
-
* Resource relationships
|
|
467
|
-
*/
|
|
468
|
-
interface Relationships {
|
|
395
|
+
currency: string;
|
|
469
396
|
/**
|
|
470
|
-
*
|
|
397
|
+
* Estimated settlement time
|
|
471
398
|
*/
|
|
472
|
-
|
|
473
|
-
}
|
|
474
|
-
namespace Relationships {
|
|
399
|
+
estimatedSettlement: string | null;
|
|
475
400
|
/**
|
|
476
|
-
*
|
|
401
|
+
* Operation status
|
|
477
402
|
*/
|
|
478
|
-
|
|
479
|
-
/**
|
|
480
|
-
* Related resource identifier
|
|
481
|
-
*/
|
|
482
|
-
data: Party.Data;
|
|
483
|
-
}
|
|
484
|
-
namespace Party {
|
|
485
|
-
/**
|
|
486
|
-
* Related resource identifier
|
|
487
|
-
*/
|
|
488
|
-
interface Data {
|
|
489
|
-
id: string;
|
|
490
|
-
/**
|
|
491
|
-
* Resource type
|
|
492
|
-
*/
|
|
493
|
-
type: string;
|
|
494
|
-
}
|
|
495
|
-
}
|
|
403
|
+
status: 'PROCESSING' | 'IN_REVIEW' | 'AWAITING_APPROVAL' | 'COMPLETED' | 'FAILED' | 'RETURNED';
|
|
496
404
|
}
|
|
497
405
|
}
|
|
498
|
-
interface Meta {
|
|
499
|
-
/**
|
|
500
|
-
* Indicates the resource was deleted
|
|
501
|
-
*/
|
|
502
|
-
deleted: true;
|
|
503
|
-
}
|
|
504
406
|
}
|
|
505
|
-
export interface
|
|
407
|
+
export interface WalletListParams {
|
|
506
408
|
/**
|
|
507
|
-
*
|
|
508
|
-
*/
|
|
509
|
-
partyId?: string;
|
|
510
|
-
/**
|
|
511
|
-
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
409
|
+
* Agent ID (agt_xxx) identifying which agent is making the request.
|
|
512
410
|
*/
|
|
513
411
|
'X-Agent-ID'?: string;
|
|
514
412
|
/**
|
|
515
|
-
*
|
|
516
|
-
*
|
|
413
|
+
* Required when X-Agent-ID is present. Session or conversation ID for agent
|
|
414
|
+
* observability.
|
|
517
415
|
*/
|
|
518
416
|
'X-Instance-ID'?: string;
|
|
519
417
|
}
|
|
520
|
-
export interface
|
|
418
|
+
export interface WalletGetParams {
|
|
521
419
|
/**
|
|
522
420
|
* Agent ID (agt_xxx) identifying which agent is making the request.
|
|
523
421
|
*/
|
|
@@ -534,9 +432,9 @@ export interface WalletInitiateDepositParams {
|
|
|
534
432
|
*/
|
|
535
433
|
amount: number;
|
|
536
434
|
/**
|
|
537
|
-
* Body param: External
|
|
435
|
+
* Body param: External account ID (ea\_\*)
|
|
538
436
|
*/
|
|
539
|
-
|
|
437
|
+
externalAccountId: string;
|
|
540
438
|
/**
|
|
541
439
|
* Header param: Unique key for idempotent request handling. If a request with the
|
|
542
440
|
* same key was already processed, the original response is returned.
|
|
@@ -566,9 +464,9 @@ export interface WalletInitiateWithdrawalParams {
|
|
|
566
464
|
*/
|
|
567
465
|
amount: number;
|
|
568
466
|
/**
|
|
569
|
-
* Body param: External
|
|
467
|
+
* Body param: External account ID (ea\_\*)
|
|
570
468
|
*/
|
|
571
|
-
|
|
469
|
+
externalAccountId: string;
|
|
572
470
|
/**
|
|
573
471
|
* Header param: Unique key for idempotent request handling. If a request with the
|
|
574
472
|
* same key was already processed, the original response is returned.
|
|
@@ -592,37 +490,7 @@ export interface WalletInitiateWithdrawalParams {
|
|
|
592
490
|
*/
|
|
593
491
|
'X-Instance-ID'?: string;
|
|
594
492
|
}
|
|
595
|
-
export interface WalletListPaymentInstrumentsParams {
|
|
596
|
-
/**
|
|
597
|
-
* Query param
|
|
598
|
-
*/
|
|
599
|
-
cursor?: string;
|
|
600
|
-
/**
|
|
601
|
-
* Query param
|
|
602
|
-
*/
|
|
603
|
-
limit?: number;
|
|
604
|
-
/**
|
|
605
|
-
* Header param: Agent ID (agt_xxx) identifying which agent is making the request.
|
|
606
|
-
*/
|
|
607
|
-
'X-Agent-ID'?: string;
|
|
608
|
-
/**
|
|
609
|
-
* Header param: Required when X-Agent-ID is present. Session or conversation ID
|
|
610
|
-
* for agent observability.
|
|
611
|
-
*/
|
|
612
|
-
'X-Instance-ID'?: string;
|
|
613
|
-
}
|
|
614
|
-
export interface WalletRemovePaymentInstrumentParams {
|
|
615
|
-
/**
|
|
616
|
-
* Agent ID (agt_xxx) identifying which agent is making the request.
|
|
617
|
-
*/
|
|
618
|
-
'X-Agent-ID'?: string;
|
|
619
|
-
/**
|
|
620
|
-
* Required when X-Agent-ID is present. Session or conversation ID for agent
|
|
621
|
-
* observability.
|
|
622
|
-
*/
|
|
623
|
-
'X-Instance-ID'?: string;
|
|
624
|
-
}
|
|
625
493
|
export declare namespace Wallet {
|
|
626
|
-
export { type
|
|
494
|
+
export { type WalletListResponse as WalletListResponse, type WalletGetResponse as WalletGetResponse, type WalletInitiateDepositResponse as WalletInitiateDepositResponse, type WalletInitiateWithdrawalResponse as WalletInitiateWithdrawalResponse, type WalletListParams as WalletListParams, type WalletGetParams as WalletGetParams, type WalletInitiateDepositParams as WalletInitiateDepositParams, type WalletInitiateWithdrawalParams as WalletInitiateWithdrawalParams, };
|
|
627
495
|
}
|
|
628
496
|
//# sourceMappingURL=wallet.d.mts.map
|