@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
@@ -2,83 +2,25 @@ 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 funding sources
5
+ * Wallet balance, deposits, withdrawals, and external accounts
6
6
  */
7
7
  export declare class Wallet extends APIResource {
8
8
  /**
9
- * Get spendable and total wallet ledger balance.
10
- *
11
- * @example
12
- * ```ts
13
- * const response = await client.wallet.getBalance();
14
- * ```
9
+ * List wallets for the authenticated party, including balance and ACH deposit
10
+ * instructions when available. Currently returns at most one wallet.
15
11
  */
16
- getBalance(params?: WalletGetBalanceParams | null | undefined, options?: RequestOptions): APIPromise<WalletGetBalanceResponse>;
12
+ list(params?: WalletListParams | null | undefined, options?: RequestOptions): APIPromise<WalletListResponse>;
17
13
  /**
18
- * Get account and routing numbers for ACH deposits.
19
- *
20
- * @example
21
- * ```ts
22
- * const response =
23
- * await client.wallet.getDepositInstructions();
24
- * ```
14
+ * Get a wallet visible to the authenticated party, including balance and ACH
15
+ * deposit instructions when available.
25
16
  */
26
- getDepositInstructions(params?: WalletGetDepositInstructionsParams | null | undefined, options?: RequestOptions): APIPromise<WalletGetDepositInstructionsResponse>;
27
- /**
28
- * Initiate a wallet deposit.
29
- *
30
- * @example
31
- * ```ts
32
- * const response = await client.wallet.initiateDeposit({
33
- * amount: 1,
34
- * externalFundingSourceId:
35
- * 'efs_ecc2efdd09bd231a9ad9bd2aada37aa7',
36
- * 'Idempotency-Key': 'Idempotency-Key',
37
- * });
38
- * ```
39
- */
40
- initiateDeposit(params: WalletInitiateDepositParams, options?: RequestOptions): APIPromise<WalletInitiateDepositResponse>;
41
- /**
42
- * Initiate a wallet withdrawal.
43
- *
44
- * @example
45
- * ```ts
46
- * const response = await client.wallet.initiateWithdrawal({
47
- * amount: 1,
48
- * externalFundingSourceId:
49
- * 'efs_ecc2efdd09bd231a9ad9bd2aada37aa7',
50
- * 'Idempotency-Key': 'Idempotency-Key',
51
- * });
52
- * ```
53
- */
54
- 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>;
17
+ get(walletID: string, params?: WalletGetParams | null | undefined, options?: RequestOptions): APIPromise<WalletGetResponse>;
77
18
  }
78
- export interface WalletGetBalanceResponse {
79
- data: WalletGetBalanceResponse.Data;
19
+ export interface WalletListResponse {
20
+ data: Array<WalletListResponse.Data>;
21
+ meta: WalletListResponse.Meta;
80
22
  }
81
- export declare namespace WalletGetBalanceResponse {
23
+ export declare namespace WalletListResponse {
82
24
  interface Data {
83
25
  /**
84
26
  * Resource ID
@@ -103,277 +45,83 @@ export declare namespace WalletGetBalanceResponse {
103
45
  */
104
46
  interface Attributes {
105
47
  /**
106
- * Amount currently available to spend or withdraw (cents)
48
+ * Wallet ledger balance
107
49
  */
108
- availableAmountMinor: number;
50
+ balance: Attributes.Balance;
109
51
  /**
110
- * Currency code
52
+ * Claimable payment totals
111
53
  */
112
- currency: 'USD';
54
+ claims: Attributes.Claims;
113
55
  /**
114
- * Total wallet ledger balance (cents)
56
+ * ACH deposit instructions for this wallet, when available
115
57
  */
116
- totalAmountMinor: number;
117
- }
118
- /**
119
- * Resource relationships
120
- */
121
- interface Relationships {
58
+ depositInstructions: Attributes.DepositInstructions | null;
122
59
  /**
123
- * Party that owns the wallet
60
+ * Wallet readiness status
124
61
  */
125
- party: Relationships.Party;
62
+ status: 'active';
126
63
  }
127
- namespace Relationships {
64
+ namespace Attributes {
128
65
  /**
129
- * Party that owns the wallet
66
+ * Wallet ledger balance
130
67
  */
131
- interface Party {
68
+ interface Balance {
132
69
  /**
133
- * Related resource identifier
70
+ * Amount currently available to spend or withdraw (cents)
134
71
  */
135
- data: Party.Data;
136
- }
137
- namespace Party {
72
+ available: number;
138
73
  /**
139
- * Related resource identifier
74
+ * Currency code
140
75
  */
141
- interface Data {
142
- id: string;
143
- /**
144
- * Resource type
145
- */
146
- type: string;
147
- }
76
+ currency: 'USD';
77
+ /**
78
+ * Total wallet ledger balance (cents)
79
+ */
80
+ total: number;
148
81
  }
149
- }
150
- }
151
- }
152
- export interface WalletGetDepositInstructionsResponse {
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;
259
- }
260
- namespace Data {
261
- /**
262
- * Resource attributes
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
82
  /**
302
- * Operation status
83
+ * Claimable payment totals
303
84
  */
304
- status: 'PROCESSING' | 'IN_REVIEW' | 'COMPLETED' | 'FAILED' | 'RETURNED';
305
- }
306
- }
307
- }
308
- export interface WalletListPaymentInstrumentsResponse {
309
- data: Array<WalletListPaymentInstrumentsResponse.Data>;
310
- meta: WalletListPaymentInstrumentsResponse.Meta;
311
- }
312
- export declare namespace WalletListPaymentInstrumentsResponse {
313
- interface Data {
314
- /**
315
- * Resource ID
316
- */
317
- id: string;
318
- /**
319
- * Resource attributes
320
- */
321
- attributes: Data.Attributes;
322
- /**
323
- * Resource relationships
324
- */
325
- relationships: Data.Relationships;
326
- /**
327
- * Resource type
328
- */
329
- type: string;
330
- }
331
- namespace Data {
332
- /**
333
- * Resource attributes
334
- */
335
- interface Attributes {
336
- /**
337
- * Account display name
338
- */
339
- accountName: string | null;
340
- /**
341
- * Account type (checking, savings)
342
- */
343
- accountType: 'checking' | 'savings' | 'unknown' | null;
344
- /**
345
- * Bank institution name
346
- */
347
- bankName: string | null;
348
- /**
349
- * When the funding source was linked
350
- */
351
- createdAt: string;
352
- /**
353
- * Last 4 digits of account
354
- */
355
- lastFour: string;
356
- /**
357
- * Status (new, active, disabled)
358
- */
359
- status: 'new' | 'active' | 'disabled' | 'deleted' | 'unknown';
85
+ interface Claims {
86
+ /**
87
+ * Total unclaimed product-payment amount (cents)
88
+ */
89
+ amount: number;
90
+ /**
91
+ * Number of unclaimed product payments
92
+ */
93
+ count: number;
94
+ }
360
95
  /**
361
- * Verification state
96
+ * ACH deposit instructions for this wallet, when available
362
97
  */
363
- verificationState: string | null;
98
+ interface DepositInstructions {
99
+ /**
100
+ * Account number for ACH deposits
101
+ */
102
+ accountNumber: string;
103
+ /**
104
+ * Name of the receiving bank
105
+ */
106
+ bankName: string;
107
+ /**
108
+ * Bank routing number for ACH deposits
109
+ */
110
+ routingNumber: string;
111
+ }
364
112
  }
365
113
  /**
366
114
  * Resource relationships
367
115
  */
368
116
  interface Relationships {
369
117
  /**
370
- * Party that owns the funding source
118
+ * Party that owns the wallet
371
119
  */
372
120
  party: Relationships.Party;
373
121
  }
374
122
  namespace Relationships {
375
123
  /**
376
- * Party that owns the funding source
124
+ * Party that owns the wallet
377
125
  */
378
126
  interface Party {
379
127
  /**
@@ -405,11 +153,10 @@ export declare namespace WalletListPaymentInstrumentsResponse {
405
153
  }
406
154
  }
407
155
  }
408
- export interface WalletRemovePaymentInstrumentResponse {
409
- data: WalletRemovePaymentInstrumentResponse.Data;
410
- meta: WalletRemovePaymentInstrumentResponse.Meta;
156
+ export interface WalletGetResponse {
157
+ data: WalletGetResponse.Data;
411
158
  }
412
- export declare namespace WalletRemovePaymentInstrumentResponse {
159
+ export declare namespace WalletGetResponse {
413
160
  interface Data {
414
161
  /**
415
162
  * Resource ID
@@ -434,46 +181,83 @@ export declare namespace WalletRemovePaymentInstrumentResponse {
434
181
  */
435
182
  interface Attributes {
436
183
  /**
437
- * Account display name
184
+ * Wallet ledger balance
438
185
  */
439
- accountName: string | null;
186
+ balance: Attributes.Balance;
440
187
  /**
441
- * Account type (checking, savings)
188
+ * Claimable payment totals
442
189
  */
443
- accountType: 'checking' | 'savings' | 'unknown' | null;
190
+ claims: Attributes.Claims;
444
191
  /**
445
- * Bank institution name
192
+ * ACH deposit instructions for this wallet, when available
446
193
  */
447
- bankName: string | null;
194
+ depositInstructions: Attributes.DepositInstructions | null;
448
195
  /**
449
- * When the funding source was linked
196
+ * Wallet readiness status
450
197
  */
451
- createdAt: string;
198
+ status: 'active';
199
+ }
200
+ namespace Attributes {
452
201
  /**
453
- * Last 4 digits of account
202
+ * Wallet ledger balance
454
203
  */
455
- lastFour: string;
204
+ interface Balance {
205
+ /**
206
+ * Amount currently available to spend or withdraw (cents)
207
+ */
208
+ available: number;
209
+ /**
210
+ * Currency code
211
+ */
212
+ currency: 'USD';
213
+ /**
214
+ * Total wallet ledger balance (cents)
215
+ */
216
+ total: number;
217
+ }
456
218
  /**
457
- * Status (new, active, disabled)
219
+ * Claimable payment totals
458
220
  */
459
- status: 'new' | 'active' | 'disabled' | 'deleted' | 'unknown';
221
+ interface Claims {
222
+ /**
223
+ * Total unclaimed product-payment amount (cents)
224
+ */
225
+ amount: number;
226
+ /**
227
+ * Number of unclaimed product payments
228
+ */
229
+ count: number;
230
+ }
460
231
  /**
461
- * Verification state
232
+ * ACH deposit instructions for this wallet, when available
462
233
  */
463
- verificationState: string | null;
234
+ interface DepositInstructions {
235
+ /**
236
+ * Account number for ACH deposits
237
+ */
238
+ accountNumber: string;
239
+ /**
240
+ * Name of the receiving bank
241
+ */
242
+ bankName: string;
243
+ /**
244
+ * Bank routing number for ACH deposits
245
+ */
246
+ routingNumber: string;
247
+ }
464
248
  }
465
249
  /**
466
250
  * Resource relationships
467
251
  */
468
252
  interface Relationships {
469
253
  /**
470
- * Party that owns the funding source
254
+ * Party that owns the wallet
471
255
  */
472
256
  party: Relationships.Party;
473
257
  }
474
258
  namespace Relationships {
475
259
  /**
476
- * Party that owns the funding source
260
+ * Party that owns the wallet
477
261
  */
478
262
  interface Party {
479
263
  /**
@@ -495,29 +279,8 @@ export declare namespace WalletRemovePaymentInstrumentResponse {
495
279
  }
496
280
  }
497
281
  }
498
- interface Meta {
499
- /**
500
- * Indicates the resource was deleted
501
- */
502
- deleted: true;
503
- }
504
282
  }
505
- export interface WalletGetBalanceParams {
506
- /**
507
- * Query param
508
- */
509
- partyId?: string;
510
- /**
511
- * Header param: Agent ID (agt_xxx) identifying which agent is making the request.
512
- */
513
- 'X-Agent-ID'?: string;
514
- /**
515
- * Header param: Required when X-Agent-ID is present. Session or conversation ID
516
- * for agent observability.
517
- */
518
- 'X-Instance-ID'?: string;
519
- }
520
- export interface WalletGetDepositInstructionsParams {
283
+ export interface WalletListParams {
521
284
  /**
522
285
  * Agent ID (agt_xxx) identifying which agent is making the request.
523
286
  */
@@ -528,90 +291,7 @@ export interface WalletGetDepositInstructionsParams {
528
291
  */
529
292
  'X-Instance-ID'?: string;
530
293
  }
531
- export interface WalletInitiateDepositParams {
532
- /**
533
- * Body param: Amount in cents
534
- */
535
- amount: number;
536
- /**
537
- * Body param: External funding source ID (efs\_\*)
538
- */
539
- externalFundingSourceId: string;
540
- /**
541
- * Header param: Unique key for idempotent request handling. If a request with the
542
- * same key was already processed, the original response is returned.
543
- */
544
- 'Idempotency-Key': string;
545
- /**
546
- * Body param: Currency code
547
- */
548
- currency?: string;
549
- /**
550
- * Body param: Deposit description
551
- */
552
- description?: string;
553
- /**
554
- * Header param: Agent ID (agt_xxx) identifying which agent is making the request.
555
- */
556
- 'X-Agent-ID'?: string;
557
- /**
558
- * Header param: Required when X-Agent-ID is present. Session or conversation ID
559
- * for agent observability.
560
- */
561
- 'X-Instance-ID'?: string;
562
- }
563
- export interface WalletInitiateWithdrawalParams {
564
- /**
565
- * Body param: Amount in cents
566
- */
567
- amount: number;
568
- /**
569
- * Body param: External funding source ID (efs\_\*)
570
- */
571
- externalFundingSourceId: string;
572
- /**
573
- * Header param: Unique key for idempotent request handling. If a request with the
574
- * same key was already processed, the original response is returned.
575
- */
576
- 'Idempotency-Key': string;
577
- /**
578
- * Body param: Currency code
579
- */
580
- currency?: string;
581
- /**
582
- * Body param: Withdrawal description
583
- */
584
- description?: string;
585
- /**
586
- * Header param: Agent ID (agt_xxx) identifying which agent is making the request.
587
- */
588
- 'X-Agent-ID'?: string;
589
- /**
590
- * Header param: Required when X-Agent-ID is present. Session or conversation ID
591
- * for agent observability.
592
- */
593
- 'X-Instance-ID'?: string;
594
- }
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 {
294
+ export interface WalletGetParams {
615
295
  /**
616
296
  * Agent ID (agt_xxx) identifying which agent is making the request.
617
297
  */
@@ -623,6 +303,6 @@ export interface WalletRemovePaymentInstrumentParams {
623
303
  'X-Instance-ID'?: string;
624
304
  }
625
305
  export declare namespace Wallet {
626
- export { type WalletGetBalanceResponse as WalletGetBalanceResponse, type WalletGetDepositInstructionsResponse as WalletGetDepositInstructionsResponse, type WalletInitiateDepositResponse as WalletInitiateDepositResponse, type WalletInitiateWithdrawalResponse as WalletInitiateWithdrawalResponse, type WalletListPaymentInstrumentsResponse as WalletListPaymentInstrumentsResponse, type WalletRemovePaymentInstrumentResponse as WalletRemovePaymentInstrumentResponse, type WalletGetBalanceParams as WalletGetBalanceParams, type WalletGetDepositInstructionsParams as WalletGetDepositInstructionsParams, type WalletInitiateDepositParams as WalletInitiateDepositParams, type WalletInitiateWithdrawalParams as WalletInitiateWithdrawalParams, type WalletListPaymentInstrumentsParams as WalletListPaymentInstrumentsParams, type WalletRemovePaymentInstrumentParams as WalletRemovePaymentInstrumentParams, };
306
+ export { type WalletListResponse as WalletListResponse, type WalletGetResponse as WalletGetResponse, type WalletListParams as WalletListParams, type WalletGetParams as WalletGetParams, };
627
307
  }
628
308
  //# sourceMappingURL=wallet.d.mts.map