@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.
Files changed (210) hide show
  1. package/CHANGELOG.md +29 -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 +17 -5
  10. package/client.d.mts.map +1 -1
  11. package/client.d.ts +17 -5
  12. package/client.d.ts.map +1 -1
  13. package/client.js +16 -4
  14. package/client.js.map +1 -1
  15. package/client.mjs +16 -4
  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.map +1 -1
  98. package/resources/api-keys.d.ts.map +1 -1
  99. package/resources/api-keys.js +1 -1
  100. package/resources/api-keys.js.map +1 -1
  101. package/resources/api-keys.mjs +1 -1
  102. package/resources/api-keys.mjs.map +1 -1
  103. package/resources/counterparties.d.mts +5 -55
  104. package/resources/counterparties.d.mts.map +1 -1
  105. package/resources/counterparties.d.ts +5 -55
  106. package/resources/counterparties.d.ts.map +1 -1
  107. package/resources/counterparties.js +1 -3
  108. package/resources/counterparties.js.map +1 -1
  109. package/resources/counterparties.mjs +1 -3
  110. package/resources/counterparties.mjs.map +1 -1
  111. package/resources/customers.d.mts.map +1 -1
  112. package/resources/customers.d.ts.map +1 -1
  113. package/resources/customers.mjs.map +1 -1
  114. package/resources/delegations.d.mts.map +1 -1
  115. package/resources/delegations.d.ts.map +1 -1
  116. package/resources/delegations.mjs.map +1 -1
  117. package/resources/external-accounts.d.mts +239 -0
  118. package/resources/external-accounts.d.mts.map +1 -0
  119. package/resources/external-accounts.d.ts +239 -0
  120. package/resources/external-accounts.d.ts.map +1 -0
  121. package/resources/external-accounts.js +47 -0
  122. package/resources/external-accounts.js.map +1 -0
  123. package/resources/external-accounts.mjs +43 -0
  124. package/resources/external-accounts.mjs.map +1 -0
  125. package/resources/index.d.mts +3 -1
  126. package/resources/index.d.mts.map +1 -1
  127. package/resources/index.d.ts +3 -1
  128. package/resources/index.d.ts.map +1 -1
  129. package/resources/index.js +5 -1
  130. package/resources/index.js.map +1 -1
  131. package/resources/index.mjs +2 -0
  132. package/resources/index.mjs.map +1 -1
  133. package/resources/invitations.d.mts +1 -1
  134. package/resources/invitations.d.mts.map +1 -1
  135. package/resources/invitations.d.ts +1 -1
  136. package/resources/invitations.d.ts.map +1 -1
  137. package/resources/invitations.js +1 -1
  138. package/resources/invitations.mjs +1 -1
  139. package/resources/invitations.mjs.map +1 -1
  140. package/resources/parties.d.mts +2 -2
  141. package/resources/parties.d.mts.map +1 -1
  142. package/resources/parties.d.ts +2 -2
  143. package/resources/parties.d.ts.map +1 -1
  144. package/resources/parties.js +3 -3
  145. package/resources/parties.js.map +1 -1
  146. package/resources/parties.mjs +3 -3
  147. package/resources/parties.mjs.map +1 -1
  148. package/resources/payment-requests.d.mts +24 -17
  149. package/resources/payment-requests.d.mts.map +1 -1
  150. package/resources/payment-requests.d.ts +24 -17
  151. package/resources/payment-requests.d.ts.map +1 -1
  152. package/resources/payment-requests.js +0 -1
  153. package/resources/payment-requests.js.map +1 -1
  154. package/resources/payment-requests.mjs +0 -1
  155. package/resources/payment-requests.mjs.map +1 -1
  156. package/resources/payments.d.mts +1 -1
  157. package/resources/payments.d.mts.map +1 -1
  158. package/resources/payments.d.ts +1 -1
  159. package/resources/payments.d.ts.map +1 -1
  160. package/resources/payments.mjs.map +1 -1
  161. package/resources/transactions.d.mts +18 -10
  162. package/resources/transactions.d.mts.map +1 -1
  163. package/resources/transactions.d.ts +18 -10
  164. package/resources/transactions.d.ts.map +1 -1
  165. package/resources/transactions.js +2 -2
  166. package/resources/transactions.mjs +2 -2
  167. package/resources/transactions.mjs.map +1 -1
  168. package/resources/wallet.d.mts +196 -328
  169. package/resources/wallet.d.mts.map +1 -1
  170. package/resources/wallet.d.ts +196 -328
  171. package/resources/wallet.d.ts.map +1 -1
  172. package/resources/wallet.js +16 -63
  173. package/resources/wallet.js.map +1 -1
  174. package/resources/wallet.mjs +16 -63
  175. package/resources/wallet.mjs.map +1 -1
  176. package/resources/webhooks.d.mts +775 -0
  177. package/resources/webhooks.d.mts.map +1 -0
  178. package/resources/webhooks.d.ts +775 -0
  179. package/resources/webhooks.d.ts.map +1 -0
  180. package/resources/webhooks.js +163 -0
  181. package/resources/webhooks.js.map +1 -0
  182. package/resources/webhooks.mjs +159 -0
  183. package/resources/webhooks.mjs.map +1 -0
  184. package/resources.d.mts.map +1 -1
  185. package/resources.d.ts.map +1 -1
  186. package/resources.mjs.map +1 -1
  187. package/src/client.ts +69 -21
  188. package/src/resources/agents.ts +5 -185
  189. package/src/resources/api-keys.ts +1 -1
  190. package/src/resources/counterparties.ts +5 -64
  191. package/src/resources/external-accounts.ts +324 -0
  192. package/src/resources/index.ts +26 -8
  193. package/src/resources/invitations.ts +1 -1
  194. package/src/resources/parties.ts +3 -3
  195. package/src/resources/payment-requests.ts +28 -18
  196. package/src/resources/payments.ts +1 -1
  197. package/src/resources/transactions.ts +20 -10
  198. package/src/resources/wallet.ts +223 -419
  199. package/src/resources/webhooks.ts +1225 -0
  200. package/src/version.ts +1 -1
  201. package/uploads.d.mts +1 -0
  202. package/uploads.d.mts.map +1 -1
  203. package/uploads.d.ts +1 -0
  204. package/uploads.d.ts.map +1 -1
  205. package/uploads.mjs +1 -0
  206. package/uploads.mjs.map +1 -1
  207. package/version.d.mts +1 -1
  208. package/version.d.ts +1 -1
  209. package/version.js +1 -1
  210. package/version.mjs +1 -1
@@ -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 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.
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 response = await client.wallet.getBalance();
14
+ * const wallets = await client.wallet.list();
14
15
  * ```
15
16
  */
16
- getBalance(params?: WalletGetBalanceParams | null | undefined, options?: RequestOptions): APIPromise<WalletGetBalanceResponse>;
17
+ list(params?: WalletListParams | null | undefined, options?: RequestOptions): APIPromise<WalletListResponse>;
17
18
  /**
18
- * Get account and routing numbers for ACH deposits.
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 response =
23
- * await client.wallet.getDepositInstructions();
24
+ * const wallet = await client.wallet.get(
25
+ * 'wal_ecc2efdd09bd231a9ad9bd2aada37aa7',
26
+ * );
24
27
  * ```
25
28
  */
26
- getDepositInstructions(params?: WalletGetDepositInstructionsParams | null | undefined, options?: RequestOptions): APIPromise<WalletGetDepositInstructionsResponse>;
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
- * externalFundingSourceId:
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
- * externalFundingSourceId:
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 WalletGetBalanceResponse {
79
- data: WalletGetBalanceResponse.Data;
57
+ export interface WalletListResponse {
58
+ data: Array<WalletListResponse.Data>;
59
+ meta: WalletListResponse.Meta;
80
60
  }
81
- export declare namespace WalletGetBalanceResponse {
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
- * Amount currently available to spend or withdraw (cents)
86
+ * Wallet ledger balance
107
87
  */
108
- availableAmountMinor: number;
88
+ balance: Attributes.Balance;
109
89
  /**
110
- * Currency code
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
- currency: 'USD';
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
- * Total wallet ledger balance (cents)
134
+ * ACH deposit instructions for this wallet, when available
115
135
  */
116
- totalAmountMinor: number;
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
- 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;
184
+ interface Meta {
185
+ pagination: Meta.Pagination;
259
186
  }
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
- /**
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 WalletListPaymentInstrumentsResponse {
309
- data: Array<WalletListPaymentInstrumentsResponse.Data>;
310
- meta: WalletListPaymentInstrumentsResponse.Meta;
194
+ export interface WalletGetResponse {
195
+ data: WalletGetResponse.Data;
311
196
  }
312
- export declare namespace WalletListPaymentInstrumentsResponse {
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
- * Account display name
222
+ * Wallet ledger balance
338
223
  */
339
- accountName: string | null;
224
+ balance: Attributes.Balance;
340
225
  /**
341
- * Account type (checking, savings)
226
+ * Claimable payment totals
342
227
  */
343
- accountType: 'checking' | 'savings' | 'unknown' | null;
228
+ claims: Attributes.Claims;
344
229
  /**
345
- * Bank institution name
230
+ * ACH deposit instructions for this wallet, when available
346
231
  */
347
- bankName: string | null;
232
+ depositInstructions: Attributes.DepositInstructions | null;
348
233
  /**
349
- * When the funding source was linked
234
+ * Wallet readiness status
350
235
  */
351
- createdAt: string;
236
+ status: 'active';
237
+ }
238
+ namespace Attributes {
352
239
  /**
353
- * Last 4 digits of account
240
+ * Wallet ledger balance
354
241
  */
355
- lastFour: string;
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
- * Status (new, active, disabled)
257
+ * Claimable payment totals
358
258
  */
359
- status: 'new' | 'active' | 'disabled' | 'deleted' | 'unknown';
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
- * Verification state
270
+ * ACH deposit instructions for this wallet, when available
362
271
  */
363
- verificationState: string | null;
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 funding source
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 funding source
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 WalletRemovePaymentInstrumentResponse {
409
- data: WalletRemovePaymentInstrumentResponse.Data;
410
- meta: WalletRemovePaymentInstrumentResponse.Meta;
321
+ export interface WalletInitiateDepositResponse {
322
+ data: WalletInitiateDepositResponse.Data;
411
323
  }
412
- export declare namespace WalletRemovePaymentInstrumentResponse {
324
+ export declare namespace WalletInitiateDepositResponse {
413
325
  interface Data {
414
326
  /**
415
- * Resource ID
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
- * Account display name
438
- */
439
- accountName: string | null;
440
- /**
441
- * Account type (checking, savings)
346
+ * Amount in cents
442
347
  */
443
- accountType: 'checking' | 'savings' | 'unknown' | null;
348
+ amount: number;
444
349
  /**
445
- * Bank institution name
350
+ * Currency code
446
351
  */
447
- bankName: string | null;
352
+ currency: string;
448
353
  /**
449
- * When the funding source was linked
354
+ * Estimated settlement time
450
355
  */
451
- createdAt: string;
356
+ estimatedSettlement: string | null;
452
357
  /**
453
- * Last 4 digits of account
358
+ * Operation status
454
359
  */
455
- lastFour: string;
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
- * Status (new, active, disabled)
389
+ * Amount in cents
458
390
  */
459
- status: 'new' | 'active' | 'disabled' | 'deleted' | 'unknown';
391
+ amount: number;
460
392
  /**
461
- * Verification state
393
+ * Currency code
462
394
  */
463
- verificationState: string | null;
464
- }
465
- /**
466
- * Resource relationships
467
- */
468
- interface Relationships {
395
+ currency: string;
469
396
  /**
470
- * Party that owns the funding source
397
+ * Estimated settlement time
471
398
  */
472
- party: Relationships.Party;
473
- }
474
- namespace Relationships {
399
+ estimatedSettlement: string | null;
475
400
  /**
476
- * Party that owns the funding source
401
+ * Operation status
477
402
  */
478
- interface Party {
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 WalletGetBalanceParams {
407
+ export interface WalletListParams {
506
408
  /**
507
- * Query param
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
- * Header param: Required when X-Agent-ID is present. Session or conversation ID
516
- * for agent observability.
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 WalletGetDepositInstructionsParams {
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 funding source ID (efs\_\*)
435
+ * Body param: External account ID (ea\_\*)
538
436
  */
539
- externalFundingSourceId: string;
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 funding source ID (efs\_\*)
467
+ * Body param: External account ID (ea\_\*)
570
468
  */
571
- externalFundingSourceId: string;
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 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, };
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