@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.
Files changed (234) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +2 -2
  3. package/api-promise.d.mts +1 -0
  4. package/api-promise.d.mts.map +1 -1
  5. package/api-promise.d.ts +1 -0
  6. package/api-promise.d.ts.map +1 -1
  7. package/api-promise.mjs +1 -0
  8. package/api-promise.mjs.map +1 -1
  9. package/client.d.mts +37 -13
  10. package/client.d.mts.map +1 -1
  11. package/client.d.ts +37 -13
  12. package/client.d.ts.map +1 -1
  13. package/client.js +30 -6
  14. package/client.js.map +1 -1
  15. package/client.mjs +31 -7
  16. package/client.mjs.map +1 -1
  17. package/core/api-promise.d.mts.map +1 -1
  18. package/core/api-promise.d.ts.map +1 -1
  19. package/core/api-promise.mjs.map +1 -1
  20. package/core/error.mjs.map +1 -1
  21. package/core/resource.d.mts.map +1 -1
  22. package/core/resource.d.ts.map +1 -1
  23. package/core/uploads.d.mts.map +1 -1
  24. package/core/uploads.d.ts.map +1 -1
  25. package/core/uploads.mjs.map +1 -1
  26. package/error.d.mts +1 -0
  27. package/error.d.mts.map +1 -1
  28. package/error.d.ts +1 -0
  29. package/error.d.ts.map +1 -1
  30. package/error.mjs +1 -0
  31. package/error.mjs.map +1 -1
  32. package/index.d.mts.map +1 -1
  33. package/index.d.ts.map +1 -1
  34. package/index.mjs.map +1 -1
  35. package/internal/detect-platform.mjs.map +1 -1
  36. package/internal/headers.mjs.map +1 -1
  37. package/internal/parse.d.mts.map +1 -1
  38. package/internal/parse.d.ts.map +1 -1
  39. package/internal/parse.mjs.map +1 -1
  40. package/internal/qs/formats.d.mts.map +1 -1
  41. package/internal/qs/formats.d.ts.map +1 -1
  42. package/internal/qs/index.d.mts +2 -2
  43. package/internal/qs/index.d.mts.map +1 -1
  44. package/internal/qs/index.d.ts +2 -2
  45. package/internal/qs/index.d.ts.map +1 -1
  46. package/internal/qs/index.mjs.map +1 -1
  47. package/internal/qs/stringify.d.mts.map +1 -1
  48. package/internal/qs/stringify.d.ts.map +1 -1
  49. package/internal/qs/stringify.mjs.map +1 -1
  50. package/internal/qs/utils.d.mts.map +1 -1
  51. package/internal/qs/utils.d.ts.map +1 -1
  52. package/internal/qs/utils.mjs.map +1 -1
  53. package/internal/request-options.d.mts.map +1 -1
  54. package/internal/request-options.d.ts.map +1 -1
  55. package/internal/shims.d.mts +6 -0
  56. package/internal/shims.d.mts.map +1 -1
  57. package/internal/shims.d.ts +6 -0
  58. package/internal/shims.d.ts.map +1 -1
  59. package/internal/to-file.d.mts.map +1 -1
  60. package/internal/to-file.d.ts.map +1 -1
  61. package/internal/to-file.mjs.map +1 -1
  62. package/internal/types.d.mts +4 -4
  63. package/internal/types.d.mts.map +1 -1
  64. package/internal/types.d.ts +4 -4
  65. package/internal/types.d.ts.map +1 -1
  66. package/internal/uploads.d.mts.map +1 -1
  67. package/internal/uploads.d.ts.map +1 -1
  68. package/internal/uploads.mjs.map +1 -1
  69. package/internal/utils/base64.mjs.map +1 -1
  70. package/internal/utils/log.d.mts.map +1 -1
  71. package/internal/utils/log.d.ts.map +1 -1
  72. package/internal/utils/log.mjs.map +1 -1
  73. package/internal/utils/path.mjs.map +1 -1
  74. package/internal/utils/query.mjs.map +1 -1
  75. package/internal/utils/values.mjs.map +1 -1
  76. package/internal/utils.d.mts.map +1 -1
  77. package/internal/utils.d.ts.map +1 -1
  78. package/internal/utils.mjs.map +1 -1
  79. package/lib/envelope.d.mts.map +1 -1
  80. package/lib/envelope.d.ts.map +1 -1
  81. package/lib/envelope.mjs.map +1 -1
  82. package/package.json +1 -1
  83. package/resource.d.mts +1 -0
  84. package/resource.d.mts.map +1 -1
  85. package/resource.d.ts +1 -0
  86. package/resource.d.ts.map +1 -1
  87. package/resource.mjs +1 -0
  88. package/resource.mjs.map +1 -1
  89. package/resources/agents.d.mts +4 -153
  90. package/resources/agents.d.mts.map +1 -1
  91. package/resources/agents.d.ts +4 -153
  92. package/resources/agents.d.ts.map +1 -1
  93. package/resources/agents.js +5 -5
  94. package/resources/agents.js.map +1 -1
  95. package/resources/agents.mjs +5 -5
  96. package/resources/agents.mjs.map +1 -1
  97. package/resources/api-keys.d.mts +16 -2
  98. package/resources/api-keys.d.mts.map +1 -1
  99. package/resources/api-keys.d.ts +16 -2
  100. package/resources/api-keys.d.ts.map +1 -1
  101. package/resources/api-keys.js +7 -4
  102. package/resources/api-keys.js.map +1 -1
  103. package/resources/api-keys.mjs +7 -4
  104. package/resources/api-keys.mjs.map +1 -1
  105. package/resources/counterparties.d.mts +5 -55
  106. package/resources/counterparties.d.mts.map +1 -1
  107. package/resources/counterparties.d.ts +5 -55
  108. package/resources/counterparties.d.ts.map +1 -1
  109. package/resources/counterparties.js +1 -3
  110. package/resources/counterparties.js.map +1 -1
  111. package/resources/counterparties.mjs +1 -3
  112. package/resources/counterparties.mjs.map +1 -1
  113. package/resources/customers.d.mts.map +1 -1
  114. package/resources/customers.d.ts.map +1 -1
  115. package/resources/customers.mjs.map +1 -1
  116. package/resources/delegations.d.mts.map +1 -1
  117. package/resources/delegations.d.ts.map +1 -1
  118. package/resources/delegations.mjs.map +1 -1
  119. package/resources/escalations.d.mts +1124 -0
  120. package/resources/escalations.d.mts.map +1 -0
  121. package/resources/escalations.d.ts +1124 -0
  122. package/resources/escalations.d.ts.map +1 -0
  123. package/resources/escalations.js +110 -0
  124. package/resources/escalations.js.map +1 -0
  125. package/resources/escalations.mjs +106 -0
  126. package/resources/escalations.mjs.map +1 -0
  127. package/resources/external-accounts.d.mts +239 -0
  128. package/resources/external-accounts.d.mts.map +1 -0
  129. package/resources/external-accounts.d.ts +239 -0
  130. package/resources/external-accounts.d.ts.map +1 -0
  131. package/resources/external-accounts.js +47 -0
  132. package/resources/external-accounts.js.map +1 -0
  133. package/resources/external-accounts.mjs +43 -0
  134. package/resources/external-accounts.mjs.map +1 -0
  135. package/resources/index.d.mts +8 -4
  136. package/resources/index.d.mts.map +1 -1
  137. package/resources/index.d.ts +8 -4
  138. package/resources/index.d.ts.map +1 -1
  139. package/resources/index.js +9 -1
  140. package/resources/index.js.map +1 -1
  141. package/resources/index.mjs +5 -1
  142. package/resources/index.mjs.map +1 -1
  143. package/resources/invitations.d.mts +17 -8
  144. package/resources/invitations.d.mts.map +1 -1
  145. package/resources/invitations.d.ts +17 -8
  146. package/resources/invitations.d.ts.map +1 -1
  147. package/resources/invitations.js +7 -5
  148. package/resources/invitations.js.map +1 -1
  149. package/resources/invitations.mjs +7 -5
  150. package/resources/invitations.mjs.map +1 -1
  151. package/resources/parties.d.mts +55 -28
  152. package/resources/parties.d.mts.map +1 -1
  153. package/resources/parties.d.ts +55 -28
  154. package/resources/parties.d.ts.map +1 -1
  155. package/resources/parties.js +30 -4
  156. package/resources/parties.js.map +1 -1
  157. package/resources/parties.mjs +30 -4
  158. package/resources/parties.mjs.map +1 -1
  159. package/resources/payment-requests.d.mts +751 -39
  160. package/resources/payment-requests.d.mts.map +1 -1
  161. package/resources/payment-requests.d.ts +751 -39
  162. package/resources/payment-requests.d.ts.map +1 -1
  163. package/resources/payment-requests.js +82 -2
  164. package/resources/payment-requests.js.map +1 -1
  165. package/resources/payment-requests.mjs +82 -2
  166. package/resources/payment-requests.mjs.map +1 -1
  167. package/resources/payments.d.mts +390 -24
  168. package/resources/payments.d.mts.map +1 -1
  169. package/resources/payments.d.ts +390 -24
  170. package/resources/payments.d.ts.map +1 -1
  171. package/resources/payments.js +53 -3
  172. package/resources/payments.js.map +1 -1
  173. package/resources/payments.mjs +53 -3
  174. package/resources/payments.mjs.map +1 -1
  175. package/resources/transactions.d.mts +53 -113
  176. package/resources/transactions.d.mts.map +1 -1
  177. package/resources/transactions.d.ts +53 -113
  178. package/resources/transactions.d.ts.map +1 -1
  179. package/resources/transactions.js +3 -3
  180. package/resources/transactions.mjs +3 -3
  181. package/resources/transactions.mjs.map +1 -1
  182. package/resources/transfers.d.mts +1030 -0
  183. package/resources/transfers.d.mts.map +1 -0
  184. package/resources/transfers.d.ts +1030 -0
  185. package/resources/transfers.d.ts.map +1 -0
  186. package/resources/transfers.js +114 -0
  187. package/resources/transfers.js.map +1 -0
  188. package/resources/transfers.mjs +110 -0
  189. package/resources/transfers.mjs.map +1 -0
  190. package/resources/wallet.d.mts +117 -437
  191. package/resources/wallet.d.mts.map +1 -1
  192. package/resources/wallet.d.ts +117 -437
  193. package/resources/wallet.d.ts.map +1 -1
  194. package/resources/wallet.js +9 -122
  195. package/resources/wallet.js.map +1 -1
  196. package/resources/wallet.mjs +9 -122
  197. package/resources/wallet.mjs.map +1 -1
  198. package/resources/webhooks.d.mts +775 -0
  199. package/resources/webhooks.d.mts.map +1 -0
  200. package/resources/webhooks.d.ts +775 -0
  201. package/resources/webhooks.d.ts.map +1 -0
  202. package/resources/webhooks.js +163 -0
  203. package/resources/webhooks.js.map +1 -0
  204. package/resources/webhooks.mjs +159 -0
  205. package/resources/webhooks.mjs.map +1 -0
  206. package/resources.d.mts.map +1 -1
  207. package/resources.d.ts.map +1 -1
  208. package/resources.mjs.map +1 -1
  209. package/src/client.ts +156 -32
  210. package/src/resources/agents.ts +5 -185
  211. package/src/resources/api-keys.ts +26 -4
  212. package/src/resources/counterparties.ts +5 -64
  213. package/src/resources/escalations.ts +1422 -0
  214. package/src/resources/external-accounts.ts +324 -0
  215. package/src/resources/index.ts +65 -13
  216. package/src/resources/invitations.ts +27 -11
  217. package/src/resources/parties.ts +88 -33
  218. package/src/resources/payment-requests.ts +945 -44
  219. package/src/resources/payments.ts +518 -23
  220. package/src/resources/transactions.ts +53 -129
  221. package/src/resources/transfers.ts +1338 -0
  222. package/src/resources/wallet.ts +133 -597
  223. package/src/resources/webhooks.ts +1232 -0
  224. package/src/version.ts +1 -1
  225. package/uploads.d.mts +1 -0
  226. package/uploads.d.mts.map +1 -1
  227. package/uploads.d.ts +1 -0
  228. package/uploads.d.ts.map +1 -1
  229. package/uploads.mjs +1 -0
  230. package/uploads.mjs.map +1 -1
  231. package/version.d.mts +1 -1
  232. package/version.d.ts +1 -1
  233. package/version.js +1 -1
  234. package/version.mjs +1 -1
@@ -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 funding sources
10
+ * Wallet balance, deposits, withdrawals, and external accounts
11
11
  */
12
12
  export class Wallet extends APIResource {
13
13
  /**
14
- * Get spendable and total wallet ledger balance.
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
- getBalance(
22
- params: WalletGetBalanceParams | null | undefined = {},
17
+ list(
18
+ params: WalletListParams | null | undefined = {},
23
19
  options?: RequestOptions,
24
- ): APIPromise<WalletGetBalanceResponse> {
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('/wallet/deposit-instructions', {
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
- * Remove (unlink) a bank account.
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
- removePaymentInstrument(
178
- externalFundingSourceID: string,
179
- params: WalletRemovePaymentInstrumentParams | null | undefined = {},
38
+ get(
39
+ walletID: string,
40
+ params: WalletGetParams | null | undefined = {},
180
41
  options?: RequestOptions,
181
- ): APIPromise<WalletRemovePaymentInstrumentResponse> {
42
+ ): APIPromise<WalletGetResponse> {
182
43
  const { 'X-Agent-ID': xAgentID, 'X-Instance-ID': xInstanceID } = params ?? {};
183
- return this._client.delete(path`/wallet/external-funding-sources/${externalFundingSourceID}`, {
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 WalletGetBalanceResponse {
197
- data: WalletGetBalanceResponse.Data;
57
+ export interface WalletListResponse {
58
+ data: Array<WalletListResponse.Data>;
59
+
60
+ meta: WalletListResponse.Meta;
198
61
  }
199
62
 
200
- export namespace WalletGetBalanceResponse {
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
- * Amount currently available to spend or withdraw (cents)
92
+ * Wallet ledger balance
230
93
  */
231
- availableAmountMinor: number;
94
+ balance: Attributes.Balance;
232
95
 
233
96
  /**
234
- * Currency code
97
+ * Claimable payment totals
235
98
  */
236
- currency: 'USD';
99
+ claims: Attributes.Claims;
237
100
 
238
101
  /**
239
- * Total wallet ledger balance (cents)
102
+ * ACH deposit instructions for this wallet, when available
240
103
  */
241
- totalAmountMinor: number;
242
- }
104
+ depositInstructions: Attributes.DepositInstructions | null;
243
105
 
244
- /**
245
- * Resource relationships
246
- */
247
- export interface Relationships {
248
106
  /**
249
- * Party that owns the wallet
107
+ * Wallet readiness status
250
108
  */
251
- party: Relationships.Party;
109
+ status: 'active';
252
110
  }
253
111
 
254
- export namespace Relationships {
112
+ export namespace Attributes {
255
113
  /**
256
- * Party that owns the wallet
114
+ * Wallet ledger balance
257
115
  */
258
- export interface Party {
116
+ export interface Balance {
259
117
  /**
260
- * Related resource identifier
118
+ * Amount currently available to spend or withdraw (cents)
261
119
  */
262
- data: Party.Data;
263
- }
120
+ available: number;
264
121
 
265
- export namespace Party {
266
122
  /**
267
- * Related resource identifier
123
+ * Currency code
268
124
  */
269
- export interface Data {
270
- id: string;
125
+ currency: 'USD';
271
126
 
272
- /**
273
- * Resource type
274
- */
275
- type: string;
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
- * Error message if failed
134
+ * Claimable payment totals
428
135
  */
429
- error: string | null;
430
-
431
- /**
432
- * Detailed error information
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
- * When the funding source was linked
520
- */
521
- createdAt: string;
142
+ /**
143
+ * Number of unclaimed product payments
144
+ */
145
+ count: number;
146
+ }
522
147
 
523
148
  /**
524
- * Last 4 digits of account
149
+ * ACH deposit instructions for this wallet, when available
525
150
  */
526
- lastFour: string;
151
+ export interface DepositInstructions {
152
+ /**
153
+ * Account number for ACH deposits
154
+ */
155
+ accountNumber: string;
527
156
 
528
- /**
529
- * Status (new, active, disabled)
530
- */
531
- status: 'new' | 'active' | 'disabled' | 'deleted' | 'unknown';
157
+ /**
158
+ * Name of the receiving bank
159
+ */
160
+ bankName: string;
532
161
 
533
- /**
534
- * Verification state
535
- */
536
- verificationState: string | null;
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 funding source
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 funding source
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 WalletRemovePaymentInstrumentResponse {
590
- data: WalletRemovePaymentInstrumentResponse.Data;
591
-
592
- meta: WalletRemovePaymentInstrumentResponse.Meta;
219
+ export interface WalletGetResponse {
220
+ data: WalletGetResponse.Data;
593
221
  }
594
222
 
595
- export namespace WalletRemovePaymentInstrumentResponse {
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
- * Account display name
252
+ * Wallet ledger balance
625
253
  */
626
- accountName: string | null;
254
+ balance: Attributes.Balance;
627
255
 
628
256
  /**
629
- * Account type (checking, savings)
257
+ * Claimable payment totals
630
258
  */
631
- accountType: 'checking' | 'savings' | 'unknown' | null;
259
+ claims: Attributes.Claims;
632
260
 
633
261
  /**
634
- * Bank institution name
262
+ * ACH deposit instructions for this wallet, when available
635
263
  */
636
- bankName: string | null;
264
+ depositInstructions: Attributes.DepositInstructions | null;
637
265
 
638
266
  /**
639
- * When the funding source was linked
267
+ * Wallet readiness status
640
268
  */
641
- createdAt: string;
269
+ status: 'active';
270
+ }
642
271
 
272
+ export namespace Attributes {
643
273
  /**
644
- * Last 4 digits of account
274
+ * Wallet ledger balance
645
275
  */
646
- lastFour: string;
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
- * Status (new, active, disabled)
294
+ * Claimable payment totals
650
295
  */
651
- status: 'new' | 'active' | 'disabled' | 'deleted' | 'unknown';
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
- * Verification state
309
+ * ACH deposit instructions for this wallet, when available
655
310
  */
656
- verificationState: string | null;
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 funding source
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 funding source
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 WalletGetDepositInstructionsParams {
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 WalletInitiateDepositParams {
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 WalletGetBalanceResponse as WalletGetBalanceResponse,
852
- type WalletGetDepositInstructionsResponse as WalletGetDepositInstructionsResponse,
853
- type WalletInitiateDepositResponse as WalletInitiateDepositResponse,
854
- type WalletInitiateWithdrawalResponse as WalletInitiateWithdrawalResponse,
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
  }