@privy-io/api-types 0.20.0 → 0.22.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 (146) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/client.d.mts +25 -16
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +25 -16
  5. package/client.d.ts.map +1 -1
  6. package/client.js +9 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +9 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/actions.d.mts +14 -0
  12. package/resources/actions.d.mts.map +1 -0
  13. package/resources/actions.d.ts +14 -0
  14. package/resources/actions.d.ts.map +1 -0
  15. package/resources/actions.js +9 -0
  16. package/resources/actions.js.map +1 -0
  17. package/resources/actions.mjs +5 -0
  18. package/resources/actions.mjs.map +1 -0
  19. package/resources/apps.d.mts +4 -0
  20. package/resources/apps.d.mts.map +1 -1
  21. package/resources/apps.d.ts +4 -0
  22. package/resources/apps.d.ts.map +1 -1
  23. package/resources/cards.d.mts +449 -0
  24. package/resources/cards.d.mts.map +1 -0
  25. package/resources/cards.d.ts +449 -0
  26. package/resources/cards.d.ts.map +1 -0
  27. package/resources/cards.js +9 -0
  28. package/resources/cards.js.map +1 -0
  29. package/resources/cards.mjs +5 -0
  30. package/resources/cards.mjs.map +1 -0
  31. package/resources/client-auth.d.mts +22 -5
  32. package/resources/client-auth.d.mts.map +1 -1
  33. package/resources/client-auth.d.ts +22 -5
  34. package/resources/client-auth.d.ts.map +1 -1
  35. package/resources/fiat.d.mts +921 -2
  36. package/resources/fiat.d.mts.map +1 -1
  37. package/resources/fiat.d.ts +921 -2
  38. package/resources/fiat.d.ts.map +1 -1
  39. package/resources/fiat.js.map +1 -1
  40. package/resources/fiat.mjs.map +1 -1
  41. package/resources/index.d.mts +11 -8
  42. package/resources/index.d.mts.map +1 -1
  43. package/resources/index.d.ts +11 -8
  44. package/resources/index.d.ts.map +1 -1
  45. package/resources/index.js +7 -1
  46. package/resources/index.js.map +1 -1
  47. package/resources/index.mjs +3 -0
  48. package/resources/index.mjs.map +1 -1
  49. package/resources/intents.d.mts +1 -0
  50. package/resources/intents.d.mts.map +1 -1
  51. package/resources/intents.d.ts +1 -0
  52. package/resources/intents.d.ts.map +1 -1
  53. package/resources/onramps.d.mts +39 -1
  54. package/resources/onramps.d.mts.map +1 -1
  55. package/resources/onramps.d.ts +39 -1
  56. package/resources/onramps.d.ts.map +1 -1
  57. package/resources/onramps.js.map +1 -1
  58. package/resources/onramps.mjs.map +1 -1
  59. package/resources/organizations.d.mts +54 -1
  60. package/resources/organizations.d.mts.map +1 -1
  61. package/resources/organizations.d.ts +54 -1
  62. package/resources/organizations.d.ts.map +1 -1
  63. package/resources/organizations.js.map +1 -1
  64. package/resources/organizations.mjs.map +1 -1
  65. package/resources/policies.d.mts +26 -3
  66. package/resources/policies.d.mts.map +1 -1
  67. package/resources/policies.d.ts +26 -3
  68. package/resources/policies.d.ts.map +1 -1
  69. package/resources/shared.d.mts +31 -1
  70. package/resources/shared.d.mts.map +1 -1
  71. package/resources/shared.d.ts +31 -1
  72. package/resources/shared.d.ts.map +1 -1
  73. package/resources/swaps.d.mts +11 -1
  74. package/resources/swaps.d.mts.map +1 -1
  75. package/resources/swaps.d.ts +11 -1
  76. package/resources/swaps.d.ts.map +1 -1
  77. package/resources/transactions.d.mts +3 -0
  78. package/resources/transactions.d.mts.map +1 -1
  79. package/resources/transactions.d.ts +3 -0
  80. package/resources/transactions.d.ts.map +1 -1
  81. package/resources/wallet-automations.d.mts +387 -0
  82. package/resources/wallet-automations.d.mts.map +1 -0
  83. package/resources/wallet-automations.d.ts +387 -0
  84. package/resources/wallet-automations.d.ts.map +1 -0
  85. package/resources/wallet-automations.js +9 -0
  86. package/resources/wallet-automations.js.map +1 -0
  87. package/resources/wallet-automations.mjs +5 -0
  88. package/resources/wallet-automations.mjs.map +1 -0
  89. package/resources/wallets/actions.d.mts +207 -8
  90. package/resources/wallets/actions.d.mts.map +1 -1
  91. package/resources/wallets/actions.d.ts +207 -8
  92. package/resources/wallets/actions.d.ts.map +1 -1
  93. package/resources/wallets/actions.js.map +1 -1
  94. package/resources/wallets/actions.mjs.map +1 -1
  95. package/resources/wallets/balance.d.mts +3 -3
  96. package/resources/wallets/balance.d.mts.map +1 -1
  97. package/resources/wallets/balance.d.ts +3 -3
  98. package/resources/wallets/balance.d.ts.map +1 -1
  99. package/resources/wallets/index.d.mts +2 -2
  100. package/resources/wallets/index.d.mts.map +1 -1
  101. package/resources/wallets/index.d.ts +2 -2
  102. package/resources/wallets/index.d.ts.map +1 -1
  103. package/resources/wallets/index.js.map +1 -1
  104. package/resources/wallets/index.mjs.map +1 -1
  105. package/resources/wallets/transactions.d.mts +11 -2
  106. package/resources/wallets/transactions.d.mts.map +1 -1
  107. package/resources/wallets/transactions.d.ts +11 -2
  108. package/resources/wallets/transactions.d.ts.map +1 -1
  109. package/resources/wallets/wallets.d.mts +672 -48
  110. package/resources/wallets/wallets.d.mts.map +1 -1
  111. package/resources/wallets/wallets.d.ts +672 -48
  112. package/resources/wallets/wallets.d.ts.map +1 -1
  113. package/resources/wallets/wallets.js.map +1 -1
  114. package/resources/wallets/wallets.mjs.map +1 -1
  115. package/resources/webhooks.d.mts +686 -3
  116. package/resources/webhooks.d.mts.map +1 -1
  117. package/resources/webhooks.d.ts +686 -3
  118. package/resources/webhooks.d.ts.map +1 -1
  119. package/resources/webhooks.js.map +1 -1
  120. package/resources/webhooks.mjs.map +1 -1
  121. package/src/client.ts +481 -0
  122. package/src/resources/actions.ts +17 -0
  123. package/src/resources/apps.ts +5 -0
  124. package/src/resources/cards.ts +586 -0
  125. package/src/resources/client-auth.ts +29 -4
  126. package/src/resources/fiat.ts +1226 -3
  127. package/src/resources/index.ts +236 -0
  128. package/src/resources/intents.ts +2 -0
  129. package/src/resources/onramps.ts +43 -0
  130. package/src/resources/organizations.ts +68 -0
  131. package/src/resources/policies.ts +61 -0
  132. package/src/resources/shared.ts +44 -0
  133. package/src/resources/swaps.ts +13 -1
  134. package/src/resources/transactions.ts +3 -0
  135. package/src/resources/wallet-automations.ts +529 -0
  136. package/src/resources/wallets/actions.ts +261 -7
  137. package/src/resources/wallets/balance.ts +41 -1
  138. package/src/resources/wallets/index.ts +55 -0
  139. package/src/resources/wallets/transactions.ts +11 -1
  140. package/src/resources/wallets/wallets.ts +888 -39
  141. package/src/resources/webhooks.ts +878 -9
  142. package/src/version.ts +1 -1
  143. package/version.d.mts +1 -1
  144. package/version.d.ts +1 -1
  145. package/version.js +1 -1
  146. package/version.mjs +1 -1
@@ -1,18 +1,1112 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
+ import * as SharedAPI from './shared';
4
5
 
5
6
  export class Fiat extends APIResource {}
6
7
 
8
+ /**
9
+ * Request body for creating a Bridge external fiat account.
10
+ */
11
+ export interface BridgeCreateExternalFiatAccountRequestBody {
12
+ /**
13
+ * Bank account details. The `type` field discriminates which shape applies.
14
+ */
15
+ account: ExternalFiatAccountData;
16
+
17
+ account_owner_name: string;
18
+
19
+ currency: string;
20
+
21
+ /**
22
+ * Discriminator: the external fiat account is orchestrated via Bridge.
23
+ */
24
+ provider: 'bridge';
25
+
26
+ /**
27
+ * Physical address associated with an external fiat account.
28
+ */
29
+ address?: ExternalFiatAccountAddress;
30
+
31
+ bank_name?: string;
32
+
33
+ /**
34
+ * The Privy API environment.
35
+ */
36
+ environment?: SharedAPI.IntegrationEnvironment;
37
+ }
38
+
39
+ /**
40
+ * Request body for creating a Bridge fiat deposit account linked to a wallet.
41
+ */
42
+ export interface BridgeCreateFiatDepositAccountRequestBody {
43
+ /**
44
+ * The destination crypto asset and chain for a fiat deposit account.
45
+ */
46
+ destination: FiatDepositAccountDestination;
47
+
48
+ /**
49
+ * Discriminator: the fiat deposit account is orchestrated via Bridge.
50
+ */
51
+ provider: 'bridge';
52
+
53
+ /**
54
+ * The source fiat currency for a fiat deposit account.
55
+ */
56
+ source: CreateFiatDepositAccountSource;
57
+
58
+ /**
59
+ * The Privy API environment.
60
+ */
61
+ environment?: SharedAPI.IntegrationEnvironment;
62
+ }
63
+
64
+ /**
65
+ * A Bridge external fiat account linked to a user.
66
+ */
67
+ export interface BridgeExternalFiatAccount {
68
+ id: string;
69
+
70
+ account_owner_name: string;
71
+
72
+ account_type: string;
73
+
74
+ created_at: string;
75
+
76
+ currency: string;
77
+
78
+ /**
79
+ * The Privy API environment.
80
+ */
81
+ environment: SharedAPI.IntegrationEnvironment;
82
+
83
+ /**
84
+ * Discriminator: the external fiat account is orchestrated via Bridge.
85
+ */
86
+ provider: 'bridge';
87
+
88
+ user_id: string;
89
+
90
+ bank_name?: string;
91
+
92
+ last_4?: string;
93
+ }
94
+
95
+ /**
96
+ * A Bridge fiat deposit account linked to a wallet.
97
+ */
98
+ export interface BridgeFiatDepositAccount {
99
+ id: string;
100
+
101
+ created_at: string;
102
+
103
+ /**
104
+ * Bank or payment deposit instructions for a fiat deposit account. Shape varies by
105
+ * source currency.
106
+ */
107
+ deposit_instructions: FiatDepositInstructions | null;
108
+
109
+ /**
110
+ * The destination crypto asset and chain for a fiat deposit account.
111
+ */
112
+ destination: FiatDepositAccountDestination;
113
+
114
+ /**
115
+ * The Privy API environment.
116
+ */
117
+ environment: SharedAPI.IntegrationEnvironment;
118
+
119
+ /**
120
+ * Discriminator: the fiat deposit account is orchestrated via Bridge.
121
+ */
122
+ provider: 'bridge';
123
+
124
+ /**
125
+ * The source fiat currency and available payment rails for a fiat deposit account.
126
+ */
127
+ source: FiatDepositAccountSource;
128
+
129
+ /**
130
+ * Activation status of a fiat deposit account.
131
+ */
132
+ status: FiatDepositAccountStatus;
133
+
134
+ wallet_id: string;
135
+ }
136
+
137
+ /**
138
+ * A Bridge external fiat account linked to an organization.
139
+ */
140
+ export interface BridgeOrganizationExternalFiatAccount {
141
+ id: string;
142
+
143
+ account_owner_name: string;
144
+
145
+ account_type: string;
146
+
147
+ created_at: string;
148
+
149
+ currency: string;
150
+
151
+ /**
152
+ * The Privy API environment.
153
+ */
154
+ environment: SharedAPI.IntegrationEnvironment;
155
+
156
+ organization_id: string;
157
+
158
+ /**
159
+ * Discriminator: the external fiat account is orchestrated via Bridge.
160
+ */
161
+ provider: 'bridge';
162
+
163
+ bank_name?: string;
164
+
165
+ last_4?: string;
166
+ }
167
+
168
+ /**
169
+ * Request body for creating a Bridge external fiat account.
170
+ */
171
+ export interface CreateExternalFiatAccountRequestBody {
172
+ /**
173
+ * Bank account details. The `type` field discriminates which shape applies.
174
+ */
175
+ account: ExternalFiatAccountData;
176
+
177
+ account_owner_name: string;
178
+
179
+ currency: string;
180
+
181
+ /**
182
+ * Discriminator: the external fiat account is orchestrated via Bridge.
183
+ */
184
+ provider: 'bridge';
185
+
186
+ /**
187
+ * Physical address associated with an external fiat account.
188
+ */
189
+ address?: ExternalFiatAccountAddress;
190
+
191
+ bank_name?: string;
192
+
193
+ /**
194
+ * The Privy API environment.
195
+ */
196
+ environment?: SharedAPI.IntegrationEnvironment;
197
+ }
198
+
199
+ /**
200
+ * Request body for creating a Bridge fiat deposit account linked to a wallet.
201
+ */
202
+ export interface CreateFiatDepositAccountRequestBody {
203
+ /**
204
+ * The destination crypto asset and chain for a fiat deposit account.
205
+ */
206
+ destination: FiatDepositAccountDestination;
207
+
208
+ /**
209
+ * Discriminator: the fiat deposit account is orchestrated via Bridge.
210
+ */
211
+ provider: 'bridge';
212
+
213
+ /**
214
+ * The source fiat currency for a fiat deposit account.
215
+ */
216
+ source: CreateFiatDepositAccountSource;
217
+
218
+ /**
219
+ * The Privy API environment.
220
+ */
221
+ environment?: SharedAPI.IntegrationEnvironment;
222
+ }
223
+
224
+ /**
225
+ * The source fiat currency for a fiat deposit account.
226
+ */
227
+ export interface CreateFiatDepositAccountSource {
228
+ currency: string;
229
+ }
230
+
231
+ /**
232
+ * Request body for initiating a payout (crypto to fiat offramp) from a wallet.
233
+ */
234
+ export interface CreatePayoutRequestBody {
235
+ /**
236
+ * The destination bank account for a payout.
237
+ */
238
+ destination: PayoutDestination;
239
+
240
+ /**
241
+ * The source crypto asset, chain, and amount for a payout.
242
+ */
243
+ source: PayoutSource;
244
+ }
245
+
246
+ /**
247
+ * A Bridge external fiat account linked to a user.
248
+ */
249
+ export interface ExternalFiatAccount {
250
+ id: string;
251
+
252
+ account_owner_name: string;
253
+
254
+ account_type: string;
255
+
256
+ created_at: string;
257
+
258
+ currency: string;
259
+
260
+ /**
261
+ * The Privy API environment.
262
+ */
263
+ environment: SharedAPI.IntegrationEnvironment;
264
+
265
+ /**
266
+ * Discriminator: the external fiat account is orchestrated via Bridge.
267
+ */
268
+ provider: 'bridge';
269
+
270
+ user_id: string;
271
+
272
+ bank_name?: string;
273
+
274
+ last_4?: string;
275
+ }
276
+
277
+ /**
278
+ * Physical address associated with an external fiat account.
279
+ */
280
+ export interface ExternalFiatAccountAddress {
281
+ city: string;
282
+
283
+ country: string;
284
+
285
+ street_line_1: string;
286
+
287
+ postal_code?: string;
288
+
289
+ state?: string;
290
+
291
+ street_line_2?: string;
292
+ }
293
+
294
+ /**
295
+ * Bank account details. The `type` field discriminates which shape applies.
296
+ */
297
+ export type ExternalFiatAccountData =
298
+ | ExternalFiatAccountUsData
299
+ | ExternalFiatAccountGBData
300
+ | ExternalFiatAccountPixData
301
+ | ExternalFiatAccountIbanData
302
+ | ExternalFiatAccountSwiftData;
303
+
304
+ /**
305
+ * UK bank account data for an external fiat account. Pays out over Faster
306
+ * Payments.
307
+ */
308
+ export interface ExternalFiatAccountGBData {
309
+ /**
310
+ * The 8-digit UK bank account number.
311
+ */
312
+ account_number: string;
313
+
314
+ /**
315
+ * The 6-digit sort code, without hyphens.
316
+ */
317
+ sort_code: string;
318
+
319
+ type: 'gb';
320
+ }
321
+
322
+ /**
323
+ * IBAN bank account data for an external fiat account. Pays out over SEPA.
324
+ */
325
+ export interface ExternalFiatAccountIbanData {
326
+ /**
327
+ * The IBAN. Up to 34 characters, per ISO 13616.
328
+ */
329
+ account_number: string;
330
+
331
+ /**
332
+ * The BIC/SWIFT code of the beneficiary bank.
333
+ */
334
+ bic: string;
335
+
336
+ /**
337
+ * Country the account is held in, as an ISO 3166-1 alpha-3 code.
338
+ */
339
+ country: string;
340
+
341
+ type: 'iban';
342
+ }
343
+
344
+ /**
345
+ * Brazilian Pix account data for an external fiat account. Provide exactly one of
346
+ * `pix_key` or `br_code`.
347
+ */
348
+ export interface ExternalFiatAccountPixData {
349
+ type: 'pix';
350
+
351
+ /**
352
+ * The Pix "copia e cola" (copy and paste) BR Code.
353
+ */
354
+ br_code?: string;
355
+
356
+ /**
357
+ * Optional CPF/CNPJ associated with the account, digits only.
358
+ */
359
+ document_number?: string;
360
+
361
+ /**
362
+ * The Pix key: an EVP (UUID), CPF, CNPJ, Brazilian phone number (+55…), or email
363
+ * address.
364
+ */
365
+ pix_key?: string;
366
+ }
367
+
368
+ /**
369
+ * Response containing a single external fiat account.
370
+ */
371
+ export interface ExternalFiatAccountResponse {
372
+ /**
373
+ * A Bridge external fiat account linked to a user.
374
+ */
375
+ external_fiat_account: ExternalFiatAccount;
376
+ }
377
+
378
+ /**
379
+ * Business relationship between the payer and the SWIFT account owner.
380
+ */
381
+ export type ExternalFiatAccountSwiftCategory = 'client' | 'parent_company' | 'subsidiary' | 'supplier';
382
+
383
+ /**
384
+ * SWIFT bank account data for an external fiat account. Pays out over wire. The
385
+ * beneficiary address is required for SWIFT and is supplied as the request's
386
+ * top-level `address`.
387
+ */
388
+ export interface ExternalFiatAccountSwiftData {
389
+ account_number: string;
390
+
391
+ /**
392
+ * The BIC/SWIFT code of the beneficiary bank.
393
+ */
394
+ bic: string;
395
+
396
+ /**
397
+ * Business relationship between the payer and the SWIFT account owner.
398
+ */
399
+ category: ExternalFiatAccountSwiftCategory;
400
+
401
+ purpose_of_funds: Array<ExternalFiatAccountSwiftPurposeOfFunds>;
402
+
403
+ short_business_description: string;
404
+
405
+ type: 'swift';
406
+
407
+ /**
408
+ * Country the account is held in, as an ISO 3166-1 alpha-3 code.
409
+ */
410
+ country?: string;
411
+ }
412
+
413
+ /**
414
+ * Reason funds are sent to a SWIFT account, required for cross-border compliance.
415
+ */
416
+ export type ExternalFiatAccountSwiftPurposeOfFunds =
417
+ | 'intra_group_transfer'
418
+ | 'invoice_for_goods_and_services';
419
+
420
+ /**
421
+ * US bank account data for an external fiat account.
422
+ */
423
+ export interface ExternalFiatAccountUsData {
424
+ account_number: string;
425
+
426
+ routing_number: string;
427
+
428
+ type: 'us';
429
+
430
+ checking_or_savings?: string;
431
+ }
432
+
7
433
  /**
8
434
  * Supported fiat currencies.
9
435
  */
10
- export type FiatCurrency = 'usd' | 'eur';
436
+ export type FiatCurrency = 'usd' | 'eur';
437
+
438
+ /**
439
+ * A Bridge fiat deposit account linked to a wallet.
440
+ */
441
+ export interface FiatDepositAccount {
442
+ id: string;
443
+
444
+ created_at: string;
445
+
446
+ /**
447
+ * Bank or payment deposit instructions for a fiat deposit account. Shape varies by
448
+ * source currency.
449
+ */
450
+ deposit_instructions: FiatDepositInstructions | null;
451
+
452
+ /**
453
+ * The destination crypto asset and chain for a fiat deposit account.
454
+ */
455
+ destination: FiatDepositAccountDestination;
456
+
457
+ /**
458
+ * The Privy API environment.
459
+ */
460
+ environment: SharedAPI.IntegrationEnvironment;
461
+
462
+ /**
463
+ * Discriminator: the fiat deposit account is orchestrated via Bridge.
464
+ */
465
+ provider: 'bridge';
466
+
467
+ /**
468
+ * The source fiat currency and available payment rails for a fiat deposit account.
469
+ */
470
+ source: FiatDepositAccountSource;
471
+
472
+ /**
473
+ * Activation status of a fiat deposit account.
474
+ */
475
+ status: FiatDepositAccountStatus;
476
+
477
+ wallet_id: string;
478
+ }
479
+
480
+ /**
481
+ * The destination crypto asset and chain for a fiat deposit account.
482
+ */
483
+ export interface FiatDepositAccountDestination {
484
+ /**
485
+ * Destination crypto asset (e.g. "usdc").
486
+ */
487
+ asset: string;
488
+
489
+ /**
490
+ * Destination chain (e.g. "base", "tempo").
491
+ */
492
+ chain: string;
493
+ }
494
+
495
+ /**
496
+ * Response containing a single fiat deposit account.
497
+ */
498
+ export interface FiatDepositAccountResponse {
499
+ /**
500
+ * A Bridge fiat deposit account linked to a wallet.
501
+ */
502
+ fiat_deposit_account: FiatDepositAccount;
503
+ }
504
+
505
+ /**
506
+ * The source fiat currency and available payment rails for a fiat deposit account.
507
+ */
508
+ export interface FiatDepositAccountSource {
509
+ currency: string;
510
+
511
+ payment_rails: Array<string>;
512
+ }
513
+
514
+ /**
515
+ * Activation status of a fiat deposit account.
516
+ */
517
+ export type FiatDepositAccountStatus = 'activated' | 'deactivated';
518
+
519
+ /**
520
+ * Bank or payment deposit instructions for a fiat deposit account. Shape varies by
521
+ * source currency.
522
+ */
523
+ export interface FiatDepositInstructions {
524
+ account_holder_name?: string;
525
+
526
+ account_number?: string;
527
+
528
+ bank_account_number?: string;
529
+
530
+ bank_address?: string;
531
+
532
+ bank_beneficiary_address?: string;
533
+
534
+ bank_beneficiary_name?: string;
535
+
536
+ bank_name?: string;
537
+
538
+ bank_routing_number?: string;
539
+
540
+ bic?: string;
541
+
542
+ br_code?: string;
543
+
544
+ bre_b_key?: string;
545
+
546
+ clabe?: string;
547
+
548
+ deposit_message?: string;
549
+
550
+ iban?: string;
551
+
552
+ payment_rails?: Array<string>;
553
+
554
+ sort_code?: string;
555
+ }
556
+
557
+ /**
558
+ * Supported fiat payment rails.
559
+ */
560
+ export type FiatPaymentRail = 'sepa' | 'ach_push' | 'wire' | 'fednow' | 'faster_payments';
561
+
562
+ /**
563
+ * Request body for initiating a hosted KYB flow for an organization.
564
+ */
565
+ export interface KYBLinksRequestBody {
566
+ /**
567
+ * Email address for the organization.
568
+ */
569
+ email: string;
570
+
571
+ /**
572
+ * KYC/KYB provider identifier.
573
+ */
574
+ provider: KyxProvider;
575
+
576
+ /**
577
+ * Legal name of the business.
578
+ */
579
+ business_name?: string;
580
+
581
+ /**
582
+ * Client-side agreement ID for ToS acceptance.
583
+ */
584
+ client_agreement_id?: string;
585
+
586
+ /**
587
+ * Endorsements to request during KYB.
588
+ */
589
+ endorsements?: Array<KyxEndorsementName>;
590
+
591
+ /**
592
+ * Provider environment (production or sandbox).
593
+ */
594
+ environment?: KyxEnvironment;
595
+
596
+ /**
597
+ * URI to redirect after completing KYB.
598
+ */
599
+ redirect_uri?: string;
600
+ }
601
+
602
+ /**
603
+ * List of KYB status snapshots, one per configured provider/environment.
604
+ */
605
+ export interface KYBStatusListResponse {
606
+ kyb_statuses: Array<KYBStatusResponse>;
607
+
608
+ next_cursor: string | null;
609
+ }
610
+
611
+ /**
612
+ * Full KYB status for an organization with a given provider.
613
+ */
614
+ export interface KYBStatusResponse {
615
+ /**
616
+ * Capability statuses for the customer.
617
+ */
618
+ capabilities: KyxCapabilities;
619
+
620
+ endorsements: Array<KyxEndorsement>;
621
+
622
+ /**
623
+ * Provider environment (production or sandbox).
624
+ */
625
+ environment: KyxEnvironment;
626
+
627
+ /**
628
+ * Items that will be required in the future.
629
+ */
630
+ future_requirements_due: Array<string>;
631
+
632
+ /**
633
+ * Verification status detail for a KYC or KYB check.
634
+ */
635
+ kyb: KyxVerificationStatusDetail;
636
+
637
+ /**
638
+ * KYC/KYB provider identifier.
639
+ */
640
+ provider: KyxProvider;
641
+
642
+ /**
643
+ * Top-level items still needed (e.g. link a bank account).
644
+ */
645
+ requirements_due: Array<string>;
646
+
647
+ /**
648
+ * KYC/KYB status for the user.
649
+ */
650
+ status: KyxProviderStatus;
651
+
652
+ /**
653
+ * Terms of Service acceptance status for a KYC or KYB flow.
654
+ */
655
+ tos: KyxTosStatusDetail;
656
+ }
657
+
658
+ /**
659
+ * Request body for initiating Terms of Service acceptance for an organization.
660
+ */
661
+ export interface KYBTosRequestBody {
662
+ /**
663
+ * Email address for the organization.
664
+ */
665
+ email: string;
666
+
667
+ /**
668
+ * KYC/KYB provider identifier.
669
+ */
670
+ provider: KyxProvider;
671
+
672
+ /**
673
+ * Legal name of the business.
674
+ */
675
+ business_name?: string;
676
+
677
+ /**
678
+ * Provider environment (production or sandbox).
679
+ */
680
+ environment?: KyxEnvironment;
681
+ }
682
+
683
+ /**
684
+ * An identity document for KYC verification.
685
+ */
686
+ export interface KYCIdentifyingDocument {
687
+ /**
688
+ * ISO 3166-1 alpha-3 issuing country code.
689
+ */
690
+ issuing_country: string;
691
+
692
+ /**
693
+ * Document type identifier.
694
+ */
695
+ type: string;
696
+
697
+ /**
698
+ * Document description.
699
+ */
700
+ description?: string;
701
+
702
+ /**
703
+ * Document expiration date.
704
+ */
705
+ expiration?: string;
706
+
707
+ /**
708
+ * Base64-encoded back image.
709
+ */
710
+ image_back?: string;
711
+
712
+ /**
713
+ * Base64-encoded front image.
714
+ */
715
+ image_front?: string;
716
+
717
+ /**
718
+ * Document number.
719
+ */
720
+ number?: string;
721
+ }
722
+
723
+ /**
724
+ * Request body for initiating a hosted KYC flow.
725
+ */
726
+ export interface KYCLinksRequestBody {
727
+ /**
728
+ * KYC/KYB provider identifier.
729
+ */
730
+ provider: KyxProvider;
731
+
732
+ /**
733
+ * Client-side agreement ID for ToS acceptance.
734
+ */
735
+ client_agreement_id?: string;
736
+
737
+ /**
738
+ * Email address for the KYC session.
739
+ */
740
+ email?: string;
741
+
742
+ /**
743
+ * Endorsements to request during KYC.
744
+ */
745
+ endorsements?: Array<KyxEndorsementName>;
746
+
747
+ /**
748
+ * Provider environment (production or sandbox).
749
+ */
750
+ environment?: KyxEnvironment;
751
+
752
+ /**
753
+ * URI to redirect the user after completing KYC.
754
+ */
755
+ redirect_uri?: string;
756
+ }
757
+
758
+ /**
759
+ * Residential address for KYC data submission.
760
+ */
761
+ export interface KYCResidentialAddress {
762
+ /**
763
+ * City.
764
+ */
765
+ city: string;
766
+
767
+ /**
768
+ * ISO 3166-1 alpha-3 country code.
769
+ */
770
+ country: string;
771
+
772
+ /**
773
+ * Street address line 1.
774
+ */
775
+ street_line_1: string;
776
+
777
+ /**
778
+ * State or province code.
779
+ */
780
+ subdivision: string;
781
+
782
+ /**
783
+ * Postal code.
784
+ */
785
+ postal_code?: string;
786
+
787
+ /**
788
+ * Street address line 2.
789
+ */
790
+ street_line_2?: string;
791
+ }
11
792
 
12
793
  /**
13
- * Supported fiat payment rails.
794
+ * List of KYC status snapshots, one per configured provider/environment.
795
+ */
796
+ export interface KYCStatusListResponse {
797
+ kyc_statuses: Array<KYCStatusResponse>;
798
+
799
+ next_cursor: string | null;
800
+ }
801
+
802
+ /**
803
+ * Full KYC status for a user with a given provider.
804
+ */
805
+ export interface KYCStatusResponse {
806
+ /**
807
+ * Capability statuses for the customer.
808
+ */
809
+ capabilities: KyxCapabilities;
810
+
811
+ endorsements: Array<KyxEndorsement>;
812
+
813
+ /**
814
+ * Provider environment (production or sandbox).
815
+ */
816
+ environment: KyxEnvironment;
817
+
818
+ /**
819
+ * Items that will be required in the future.
820
+ */
821
+ future_requirements_due: Array<string>;
822
+
823
+ /**
824
+ * Verification status detail for a KYC or KYB check.
825
+ */
826
+ kyc: KyxVerificationStatusDetail;
827
+
828
+ /**
829
+ * KYC/KYB provider identifier.
830
+ */
831
+ provider: KyxProvider;
832
+
833
+ /**
834
+ * Top-level items still needed (e.g. link a bank account).
835
+ */
836
+ requirements_due: Array<string>;
837
+
838
+ /**
839
+ * KYC/KYB status for the user.
840
+ */
841
+ status: KyxProviderStatus;
842
+
843
+ /**
844
+ * Terms of Service acceptance status for a KYC or KYB flow.
845
+ */
846
+ tos: KyxTosStatusDetail;
847
+ }
848
+
849
+ /**
850
+ * KYC verification data for headless submission.
851
+ */
852
+ export interface KYCSubmitData {
853
+ /**
854
+ * Date of birth in YYYY-MM-DD format.
855
+ */
856
+ date_of_birth: string;
857
+
858
+ /**
859
+ * Legal first name.
860
+ */
861
+ first_name: string;
862
+
863
+ /**
864
+ * Identifying documents.
865
+ */
866
+ identifying_information: Array<KYCIdentifyingDocument>;
867
+
868
+ /**
869
+ * Legal last name.
870
+ */
871
+ last_name: string;
872
+
873
+ /**
874
+ * Residential address for KYC data submission.
875
+ */
876
+ residential_address: KYCResidentialAddress;
877
+
878
+ /**
879
+ * Email address.
880
+ */
881
+ email?: string;
882
+
883
+ /**
884
+ * Phone number in E.164 format.
885
+ */
886
+ phone?: string;
887
+ }
888
+
889
+ /**
890
+ * Request body for headless KYC data submission.
891
+ */
892
+ export interface KYCSubmitRequestBody {
893
+ /**
894
+ * KYC verification data for headless submission.
895
+ */
896
+ data: KYCSubmitData;
897
+
898
+ /**
899
+ * KYC/KYB provider identifier.
900
+ */
901
+ provider: KyxProvider;
902
+
903
+ /**
904
+ * Client-side agreement ID for ToS acceptance.
905
+ */
906
+ client_agreement_id?: string;
907
+
908
+ /**
909
+ * Endorsements to request during KYC.
910
+ */
911
+ endorsements?: Array<KyxEndorsementName>;
912
+
913
+ /**
914
+ * Provider environment (production or sandbox).
915
+ */
916
+ environment?: KyxEnvironment;
917
+ }
918
+
919
+ /**
920
+ * Capability statuses for the customer.
921
+ */
922
+ export interface KyxCapabilities {
923
+ /**
924
+ * Status of a capability. Passthrough from the provider.
925
+ */
926
+ payin_crypto: KyxCapabilityStatus;
927
+
928
+ /**
929
+ * Status of a capability. Passthrough from the provider.
930
+ */
931
+ payin_fiat: KyxCapabilityStatus;
932
+
933
+ /**
934
+ * Status of a capability. Passthrough from the provider.
935
+ */
936
+ payout_crypto: KyxCapabilityStatus;
937
+
938
+ /**
939
+ * Status of a capability. Passthrough from the provider.
940
+ */
941
+ payout_fiat: KyxCapabilityStatus;
942
+ }
943
+
944
+ /**
945
+ * Status of a capability. Passthrough from the provider.
946
+ */
947
+ export type KyxCapabilityStatus = string;
948
+
949
+ /**
950
+ * An endorsement with its approval status and missing requirements.
951
+ */
952
+ export interface KyxEndorsement {
953
+ /**
954
+ * Missing requirements, or null if complete.
955
+ */
956
+ missing: Array<string> | null;
957
+
958
+ /**
959
+ * Endorsement identifier.
960
+ */
961
+ name: KyxEndorsementName;
962
+
963
+ /**
964
+ * Status of an endorsement. Passthrough from the provider.
965
+ */
966
+ status: KyxEndorsementStatus;
967
+ }
968
+
969
+ /**
970
+ * Endorsement identifier.
971
+ */
972
+ export type KyxEndorsementName = string;
973
+
974
+ /**
975
+ * Status of an endorsement. Passthrough from the provider.
976
+ */
977
+ export type KyxEndorsementStatus = string;
978
+
979
+ /**
980
+ * Provider environment (production or sandbox).
981
+ */
982
+ export type KyxEnvironment = 'production' | 'sandbox';
983
+
984
+ /**
985
+ * KYC/KYB provider identifier.
986
+ */
987
+ export type KyxProvider = 'bridge';
988
+
989
+ /**
990
+ * KYC/KYB status for the user.
991
+ */
992
+ export type KyxProviderStatus = string;
993
+
994
+ /**
995
+ * Request body for initiating Terms of Service acceptance.
996
+ */
997
+ export interface KyxTosRequestBody {
998
+ /**
999
+ * KYC/KYB provider identifier.
1000
+ */
1001
+ provider: KyxProvider;
1002
+
1003
+ /**
1004
+ * Email for the user. If not provided, falls back to the user's linked email.
1005
+ */
1006
+ email?: string;
1007
+
1008
+ /**
1009
+ * Provider environment (production or sandbox).
1010
+ */
1011
+ environment?: KyxEnvironment;
1012
+ }
1013
+
1014
+ /**
1015
+ * Response containing a Terms of Service link.
1016
+ */
1017
+ export interface KyxTosResponse {
1018
+ /**
1019
+ * Provider environment (production or sandbox).
1020
+ */
1021
+ environment: KyxEnvironment;
1022
+
1023
+ /**
1024
+ * URL for the Terms of Service acceptance page.
1025
+ */
1026
+ link: string;
1027
+
1028
+ /**
1029
+ * KYC/KYB provider identifier.
1030
+ */
1031
+ provider: KyxProvider;
1032
+
1033
+ /**
1034
+ * Status of Terms of Service acceptance. Passthrough from the provider.
1035
+ */
1036
+ status: KyxTosStatus;
1037
+ }
1038
+
1039
+ /**
1040
+ * Status of Terms of Service acceptance. Passthrough from the provider.
1041
+ */
1042
+ export type KyxTosStatus = string;
1043
+
1044
+ /**
1045
+ * Terms of Service acceptance status for a KYC or KYB flow.
1046
+ */
1047
+ export interface KyxTosStatusDetail {
1048
+ /**
1049
+ * Status of Terms of Service acceptance. Passthrough from the provider.
1050
+ */
1051
+ status: KyxTosStatus;
1052
+
1053
+ /**
1054
+ * ToS acceptance link, if pending.
1055
+ */
1056
+ link?: string;
1057
+ }
1058
+
1059
+ /**
1060
+ * Status of KYC/KYB verification. Passthrough from the provider.
1061
+ */
1062
+ export type KyxVerificationStatus = string;
1063
+
1064
+ /**
1065
+ * Verification status detail for a KYC or KYB check.
1066
+ */
1067
+ export interface KyxVerificationStatusDetail {
1068
+ /**
1069
+ * Status of KYC/KYB verification. Passthrough from the provider.
1070
+ */
1071
+ status: KyxVerificationStatus;
1072
+
1073
+ /**
1074
+ * Verification link, if applicable.
1075
+ */
1076
+ link?: string;
1077
+
1078
+ /**
1079
+ * Reasons for rejection, if status is closed or action_required.
1080
+ */
1081
+ rejection_reasons?: Array<string>;
1082
+ }
1083
+
1084
+ /**
1085
+ * A list of external fiat accounts linked to a user.
1086
+ */
1087
+ export interface ListExternalFiatAccountsResponse {
1088
+ external_fiat_accounts: Array<ExternalFiatAccount>;
1089
+
1090
+ next_cursor: string | null;
1091
+ }
1092
+
1093
+ /**
1094
+ * A list of fiat deposit accounts linked to a wallet.
1095
+ */
1096
+ export interface ListFiatDepositAccountsResponse {
1097
+ fiat_deposit_accounts: Array<FiatDepositAccount>;
1098
+
1099
+ next_cursor: string | null;
1100
+ }
1101
+
1102
+ /**
1103
+ * A list of external fiat accounts linked to an organization.
14
1104
  */
15
- export type FiatPaymentRail = 'sepa' | 'ach_push' | 'wire';
1105
+ export interface ListOrganizationExternalFiatAccountsResponse {
1106
+ external_fiat_accounts: Array<OrganizationExternalFiatAccount>;
1107
+
1108
+ next_cursor: string | null;
1109
+ }
16
1110
 
17
1111
  /**
18
1112
  * Deposit instructions for an offramp transfer.
@@ -160,10 +1254,135 @@ export type OnrampTransferStatus =
160
1254
  | 'returned'
161
1255
  | 'refunded';
162
1256
 
1257
+ /**
1258
+ * A Bridge external fiat account linked to an organization.
1259
+ */
1260
+ export interface OrganizationExternalFiatAccount {
1261
+ id: string;
1262
+
1263
+ account_owner_name: string;
1264
+
1265
+ account_type: string;
1266
+
1267
+ created_at: string;
1268
+
1269
+ currency: string;
1270
+
1271
+ /**
1272
+ * The Privy API environment.
1273
+ */
1274
+ environment: SharedAPI.IntegrationEnvironment;
1275
+
1276
+ organization_id: string;
1277
+
1278
+ /**
1279
+ * Discriminator: the external fiat account is orchestrated via Bridge.
1280
+ */
1281
+ provider: 'bridge';
1282
+
1283
+ bank_name?: string;
1284
+
1285
+ last_4?: string;
1286
+ }
1287
+
1288
+ /**
1289
+ * Response containing a single organization external fiat account.
1290
+ */
1291
+ export interface OrganizationExternalFiatAccountResponse {
1292
+ /**
1293
+ * A Bridge external fiat account linked to an organization.
1294
+ */
1295
+ external_fiat_account: OrganizationExternalFiatAccount;
1296
+ }
1297
+
1298
+ /**
1299
+ * The destination bank account for a payout.
1300
+ */
1301
+ export interface PayoutDestination {
1302
+ /**
1303
+ * The ID of a previously registered external fiat account to pay out to.
1304
+ */
1305
+ fiat_account_id: string;
1306
+ }
1307
+
1308
+ /**
1309
+ * The source crypto asset, chain, and amount for a payout.
1310
+ */
1311
+ export interface PayoutSource {
1312
+ /**
1313
+ * Amount to offramp, in the asset's standard units (e.g. "100.00").
1314
+ */
1315
+ amount: string;
1316
+
1317
+ /**
1318
+ * Source crypto asset (e.g. "usdc").
1319
+ */
1320
+ asset: string;
1321
+
1322
+ /**
1323
+ * Source chain (e.g. "base").
1324
+ */
1325
+ chain: string;
1326
+ }
1327
+
163
1328
  export declare namespace Fiat {
164
1329
  export {
1330
+ type BridgeCreateExternalFiatAccountRequestBody as BridgeCreateExternalFiatAccountRequestBody,
1331
+ type BridgeCreateFiatDepositAccountRequestBody as BridgeCreateFiatDepositAccountRequestBody,
1332
+ type BridgeExternalFiatAccount as BridgeExternalFiatAccount,
1333
+ type BridgeFiatDepositAccount as BridgeFiatDepositAccount,
1334
+ type BridgeOrganizationExternalFiatAccount as BridgeOrganizationExternalFiatAccount,
1335
+ type CreateExternalFiatAccountRequestBody as CreateExternalFiatAccountRequestBody,
1336
+ type CreateFiatDepositAccountRequestBody as CreateFiatDepositAccountRequestBody,
1337
+ type CreateFiatDepositAccountSource as CreateFiatDepositAccountSource,
1338
+ type CreatePayoutRequestBody as CreatePayoutRequestBody,
1339
+ type ExternalFiatAccount as ExternalFiatAccount,
1340
+ type ExternalFiatAccountAddress as ExternalFiatAccountAddress,
1341
+ type ExternalFiatAccountData as ExternalFiatAccountData,
1342
+ type ExternalFiatAccountGBData as ExternalFiatAccountGBData,
1343
+ type ExternalFiatAccountIbanData as ExternalFiatAccountIbanData,
1344
+ type ExternalFiatAccountPixData as ExternalFiatAccountPixData,
1345
+ type ExternalFiatAccountResponse as ExternalFiatAccountResponse,
1346
+ type ExternalFiatAccountSwiftCategory as ExternalFiatAccountSwiftCategory,
1347
+ type ExternalFiatAccountSwiftData as ExternalFiatAccountSwiftData,
1348
+ type ExternalFiatAccountSwiftPurposeOfFunds as ExternalFiatAccountSwiftPurposeOfFunds,
1349
+ type ExternalFiatAccountUsData as ExternalFiatAccountUsData,
165
1350
  type FiatCurrency as FiatCurrency,
1351
+ type FiatDepositAccount as FiatDepositAccount,
1352
+ type FiatDepositAccountDestination as FiatDepositAccountDestination,
1353
+ type FiatDepositAccountResponse as FiatDepositAccountResponse,
1354
+ type FiatDepositAccountSource as FiatDepositAccountSource,
1355
+ type FiatDepositAccountStatus as FiatDepositAccountStatus,
1356
+ type FiatDepositInstructions as FiatDepositInstructions,
166
1357
  type FiatPaymentRail as FiatPaymentRail,
1358
+ type KYBLinksRequestBody as KYBLinksRequestBody,
1359
+ type KYBStatusListResponse as KYBStatusListResponse,
1360
+ type KYBStatusResponse as KYBStatusResponse,
1361
+ type KYBTosRequestBody as KYBTosRequestBody,
1362
+ type KYCIdentifyingDocument as KYCIdentifyingDocument,
1363
+ type KYCLinksRequestBody as KYCLinksRequestBody,
1364
+ type KYCResidentialAddress as KYCResidentialAddress,
1365
+ type KYCStatusListResponse as KYCStatusListResponse,
1366
+ type KYCStatusResponse as KYCStatusResponse,
1367
+ type KYCSubmitData as KYCSubmitData,
1368
+ type KYCSubmitRequestBody as KYCSubmitRequestBody,
1369
+ type KyxCapabilities as KyxCapabilities,
1370
+ type KyxCapabilityStatus as KyxCapabilityStatus,
1371
+ type KyxEndorsement as KyxEndorsement,
1372
+ type KyxEndorsementName as KyxEndorsementName,
1373
+ type KyxEndorsementStatus as KyxEndorsementStatus,
1374
+ type KyxEnvironment as KyxEnvironment,
1375
+ type KyxProvider as KyxProvider,
1376
+ type KyxProviderStatus as KyxProviderStatus,
1377
+ type KyxTosRequestBody as KyxTosRequestBody,
1378
+ type KyxTosResponse as KyxTosResponse,
1379
+ type KyxTosStatus as KyxTosStatus,
1380
+ type KyxTosStatusDetail as KyxTosStatusDetail,
1381
+ type KyxVerificationStatus as KyxVerificationStatus,
1382
+ type KyxVerificationStatusDetail as KyxVerificationStatusDetail,
1383
+ type ListExternalFiatAccountsResponse as ListExternalFiatAccountsResponse,
1384
+ type ListFiatDepositAccountsResponse as ListFiatDepositAccountsResponse,
1385
+ type ListOrganizationExternalFiatAccountsResponse as ListOrganizationExternalFiatAccountsResponse,
167
1386
  type OfframpDepositInstructions as OfframpDepositInstructions,
168
1387
  type OfframpResponse as OfframpResponse,
169
1388
  type OnrampAsset as OnrampAsset,
@@ -173,5 +1392,9 @@ export declare namespace Fiat {
173
1392
  type OnrampKYCStatus as OnrampKYCStatus,
174
1393
  type OnrampResponse as OnrampResponse,
175
1394
  type OnrampTransferStatus as OnrampTransferStatus,
1395
+ type OrganizationExternalFiatAccount as OrganizationExternalFiatAccount,
1396
+ type OrganizationExternalFiatAccountResponse as OrganizationExternalFiatAccountResponse,
1397
+ type PayoutDestination as PayoutDestination,
1398
+ type PayoutSource as PayoutSource,
176
1399
  };
177
1400
  }