squarefi-bff-api-module 1.36.51 → 1.36.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/frontend.d.ts +3 -3
- package/dist/api/frontend.js +3 -3
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.js +2 -0
- package/dist/api/mass-payouts.d.ts +29 -0
- package/dist/api/mass-payouts.js +40 -0
- package/dist/api/types/autogen/apiV1External.types.d.ts +193 -38
- package/dist/api/types/autogen/apiV1Frontend.types.d.ts +1981 -589
- package/dist/api/types/autogen/apiV1Legacy.types.d.ts +43 -5
- package/dist/api/types/autogen/apiV1Tenant.types.d.ts +141 -24
- package/dist/api/types/types.d.ts +172 -7
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +2 -0
- package/package.json +1 -1
|
@@ -1309,13 +1309,45 @@ export interface paths {
|
|
|
1309
1309
|
};
|
|
1310
1310
|
requestBody?: never;
|
|
1311
1311
|
responses: {
|
|
1312
|
-
/** @description Sensitive card details retrieved successfully
|
|
1312
|
+
/** @description Sensitive card details retrieved successfully.
|
|
1313
|
+
*
|
|
1314
|
+
* This legacy surface answers with a BARE object — no `{ success, data }` envelope —
|
|
1315
|
+
* and splits the vendor's `MM/YY` expiry into `expiry_month` / `expiry_year`.
|
|
1316
|
+
* The `/api` and `/admin` surfaces return the envelope and the raw `expiry_date`
|
|
1317
|
+
* instead (`CardSensitiveData`), so the two shapes are not interchangeable.
|
|
1318
|
+
* */
|
|
1313
1319
|
200: {
|
|
1314
1320
|
headers: {
|
|
1315
1321
|
[name: string]: unknown;
|
|
1316
1322
|
};
|
|
1317
1323
|
content: {
|
|
1318
|
-
"application/json":
|
|
1324
|
+
"application/json": {
|
|
1325
|
+
/**
|
|
1326
|
+
* @description Full card number
|
|
1327
|
+
* @example 4111111111111111
|
|
1328
|
+
*/
|
|
1329
|
+
card_number: string;
|
|
1330
|
+
/**
|
|
1331
|
+
* @description Card security code
|
|
1332
|
+
* @example 123
|
|
1333
|
+
*/
|
|
1334
|
+
cvv: string;
|
|
1335
|
+
/**
|
|
1336
|
+
* @description Card expiration month (MM)
|
|
1337
|
+
* @example 07
|
|
1338
|
+
*/
|
|
1339
|
+
expiry_month: string;
|
|
1340
|
+
/**
|
|
1341
|
+
* @description Card expiration year, as the vendor's two-digit YY
|
|
1342
|
+
* @example 29
|
|
1343
|
+
*/
|
|
1344
|
+
expiry_year: string;
|
|
1345
|
+
/**
|
|
1346
|
+
* @description 3-D Secure password where the vendor exposes one (Wallester); null otherwise
|
|
1347
|
+
* @example null
|
|
1348
|
+
*/
|
|
1349
|
+
security_code: string | null;
|
|
1350
|
+
};
|
|
1319
1351
|
};
|
|
1320
1352
|
};
|
|
1321
1353
|
/** @description Server Error */
|
|
@@ -1348,7 +1380,14 @@ export interface paths {
|
|
|
1348
1380
|
put?: never;
|
|
1349
1381
|
/**
|
|
1350
1382
|
* Get encrypted sensitive card details
|
|
1351
|
-
* @description Retrieves sensitive information about a specific card including full card number, CVV, and expiry date.
|
|
1383
|
+
* @description Retrieves sensitive information about a specific card including full card number, CVV, and expiry date.
|
|
1384
|
+
* The response is encrypted using the provided public key.
|
|
1385
|
+
*
|
|
1386
|
+
* Decrypting `data` with the matching private key yields
|
|
1387
|
+
* `{ success, data: { card_number, cvv, expiry_month, expiry_year, security_code } }` —
|
|
1388
|
+
* the same split-expiry shape the plaintext legacy `GET .../sensitive` returns, NOT the
|
|
1389
|
+
* `expiry_date` form of `CardSensitiveData` on the `/api` and `/admin` surfaces.
|
|
1390
|
+
*
|
|
1352
1391
|
*/
|
|
1353
1392
|
post: {
|
|
1354
1393
|
parameters: {
|
|
@@ -7416,7 +7455,7 @@ export type webhooks = Record<string, never>;
|
|
|
7416
7455
|
export interface components {
|
|
7417
7456
|
schemas: {
|
|
7418
7457
|
/**
|
|
7419
|
-
* @description Order type identifier. Must be one of the active values from the `order_types` table. Examples: `EXCHANGE_OMNI` (omnibus exchange), `
|
|
7458
|
+
* @description Order type identifier. Must be one of the active values from the `order_types` table. Examples: `EXCHANGE_OMNI` (omnibus exchange), `BRL_WIRE_OFFRAMP` (wire offramp), `OMNIBUS_CRYPTO_TRANSFER` (crypto withdrawal). `L2F_*` ids are historical (rail retired) and cannot be used to create orders. Legacy `DEPOSIT_*`, `WITHDRAWAL_*` and `AUTO_CONVERT_CRYPTO` are intentionally excluded.
|
|
7420
7459
|
* @example EXCHANGE_OMNI
|
|
7421
7460
|
* @enum {string}
|
|
7422
7461
|
*/
|
|
@@ -8282,7 +8321,6 @@ export interface components {
|
|
|
8282
8321
|
Country: unknown;
|
|
8283
8322
|
IssuingCardList: unknown;
|
|
8284
8323
|
IssuingCard: unknown;
|
|
8285
|
-
CardSensitiveData: unknown;
|
|
8286
8324
|
CardLimitsUpdateRequest: unknown;
|
|
8287
8325
|
IssuingCardLimits: unknown;
|
|
8288
8326
|
CardUpdateRequest: unknown;
|
|
@@ -2487,7 +2487,7 @@ export interface paths {
|
|
|
2487
2487
|
};
|
|
2488
2488
|
};
|
|
2489
2489
|
};
|
|
2490
|
-
/** @description Validation error
|
|
2490
|
+
/** @description Validation error — invalid body, pair disabled by the exchange config, or calculated amount too small. Balance is checked only at approve. */
|
|
2491
2491
|
400: {
|
|
2492
2492
|
headers: {
|
|
2493
2493
|
[name: string]: unknown;
|
|
@@ -3404,8 +3404,10 @@ export interface paths {
|
|
|
3404
3404
|
* debits the funds (transaction written as `complete`) and triggers the
|
|
3405
3405
|
* order execution pipeline. Exchange orders (EXCHANGE_OMNI) and internal
|
|
3406
3406
|
* transfers (TRANSFER_INTERNAL / OMNIBUS_INTERNAL_TRANSFER) settle
|
|
3407
|
-
* synchronously and land in COMPLETE. An insufficient balance
|
|
3408
|
-
*
|
|
3407
|
+
* synchronously and land in COMPLETE. An insufficient balance answers
|
|
3408
|
+
* 400 `INSUFFICIENT_FUNDS` and releases the order back to NEW; FAILED is
|
|
3409
|
+
* reached only when a step after the debit fails. Only orders with
|
|
3410
|
+
* status NEW can be approved. Orders
|
|
3409
3411
|
* created with `scheduled_at` move to EXPECTED instead — no funds are
|
|
3410
3412
|
* debited until execution at the requested time.
|
|
3411
3413
|
*
|
|
@@ -3422,7 +3424,7 @@ export interface paths {
|
|
|
3422
3424
|
};
|
|
3423
3425
|
requestBody?: never;
|
|
3424
3426
|
responses: {
|
|
3425
|
-
/** @description Order approved
|
|
3427
|
+
/** @description Order approved — PROCESSING for workflow rails, COMPLETE for exchange / internal transfers, EXPECTED for scheduled orders */
|
|
3426
3428
|
200: {
|
|
3427
3429
|
headers: {
|
|
3428
3430
|
[name: string]: unknown;
|
|
@@ -3432,11 +3434,23 @@ export interface paths {
|
|
|
3432
3434
|
/** @example true */
|
|
3433
3435
|
success?: boolean;
|
|
3434
3436
|
data?: components["schemas"]["TenantOrder"];
|
|
3435
|
-
/** @example Order approved and processing started */
|
|
3436
|
-
message?: string;
|
|
3437
3437
|
};
|
|
3438
3438
|
};
|
|
3439
3439
|
};
|
|
3440
|
+
/** @description Insufficient funds (`INSUFFICIENT_FUNDS` — the order is released back to NEW) or validation error */
|
|
3441
|
+
400: {
|
|
3442
|
+
headers: {
|
|
3443
|
+
[name: string]: unknown;
|
|
3444
|
+
};
|
|
3445
|
+
content?: never;
|
|
3446
|
+
};
|
|
3447
|
+
/** @description Order does not belong to the tenant */
|
|
3448
|
+
403: {
|
|
3449
|
+
headers: {
|
|
3450
|
+
[name: string]: unknown;
|
|
3451
|
+
};
|
|
3452
|
+
content?: never;
|
|
3453
|
+
};
|
|
3440
3454
|
/** @description Order not found */
|
|
3441
3455
|
404: {
|
|
3442
3456
|
headers: {
|
|
@@ -3444,7 +3458,7 @@ export interface paths {
|
|
|
3444
3458
|
};
|
|
3445
3459
|
content?: never;
|
|
3446
3460
|
};
|
|
3447
|
-
/** @description
|
|
3461
|
+
/** @description Order is not in an approvable state (`INVALID_STATE`), or another lifecycle call holds the order lock (`OPERATION_IN_PROGRESS`) */
|
|
3448
3462
|
409: {
|
|
3449
3463
|
headers: {
|
|
3450
3464
|
[name: string]: unknown;
|
|
@@ -3511,11 +3525,16 @@ export interface paths {
|
|
|
3511
3525
|
/** @example true */
|
|
3512
3526
|
success?: boolean;
|
|
3513
3527
|
data?: components["schemas"]["TenantOrder"];
|
|
3514
|
-
/** @example Order canceled successfully */
|
|
3515
|
-
message?: string;
|
|
3516
3528
|
};
|
|
3517
3529
|
};
|
|
3518
3530
|
};
|
|
3531
|
+
/** @description Order does not belong to the tenant */
|
|
3532
|
+
403: {
|
|
3533
|
+
headers: {
|
|
3534
|
+
[name: string]: unknown;
|
|
3535
|
+
};
|
|
3536
|
+
content?: never;
|
|
3537
|
+
};
|
|
3519
3538
|
/** @description Order not found */
|
|
3520
3539
|
404: {
|
|
3521
3540
|
headers: {
|
|
@@ -3523,7 +3542,7 @@ export interface paths {
|
|
|
3523
3542
|
};
|
|
3524
3543
|
content?: never;
|
|
3525
3544
|
};
|
|
3526
|
-
/** @description
|
|
3545
|
+
/** @description Order is not in a cancelable state (`INVALID_STATE`), or another lifecycle call holds the order lock (`OPERATION_IN_PROGRESS`) */
|
|
3527
3546
|
409: {
|
|
3528
3547
|
headers: {
|
|
3529
3548
|
[name: string]: unknown;
|
|
@@ -3612,6 +3631,78 @@ export interface paths {
|
|
|
3612
3631
|
patch?: never;
|
|
3613
3632
|
trace?: never;
|
|
3614
3633
|
};
|
|
3634
|
+
"/admin/orders/{order_id}/confirmation-pdf": {
|
|
3635
|
+
parameters: {
|
|
3636
|
+
query?: never;
|
|
3637
|
+
header?: never;
|
|
3638
|
+
path?: never;
|
|
3639
|
+
cookie?: never;
|
|
3640
|
+
};
|
|
3641
|
+
/**
|
|
3642
|
+
* Download payment confirmation (PDF)
|
|
3643
|
+
* @description Operation-level proof that ONE payment was executed. One format serves both directions — on a deposit the payer is the external sender and the beneficiary is the customer's account, on a withdrawal the roles swap — and both payment kinds. A bank transfer is documented with payer and beneficiary requisites, amount in digits and in words, fee and rail; an on-chain transfer with both wallet addresses, the network, the token contract, gas paid and the transaction hash plus the explorer address where it can be verified. Carries no balances.
|
|
3644
|
+
*
|
|
3645
|
+
* Only settled payments between two identifiable parties qualify: card top-ups, exchanges, book transfers between wallets and payments that have not reached COMPLETE are refused with 409 rather than documented, since the recipient reads this document as proof the money moved.
|
|
3646
|
+
*
|
|
3647
|
+
*/
|
|
3648
|
+
get: {
|
|
3649
|
+
parameters: {
|
|
3650
|
+
query?: never;
|
|
3651
|
+
header?: never;
|
|
3652
|
+
path: {
|
|
3653
|
+
/** @description Order ID or order UUID */
|
|
3654
|
+
order_id: string;
|
|
3655
|
+
};
|
|
3656
|
+
cookie?: never;
|
|
3657
|
+
};
|
|
3658
|
+
requestBody?: never;
|
|
3659
|
+
responses: {
|
|
3660
|
+
/** @description PDF document */
|
|
3661
|
+
200: {
|
|
3662
|
+
headers: {
|
|
3663
|
+
[name: string]: unknown;
|
|
3664
|
+
};
|
|
3665
|
+
content: {
|
|
3666
|
+
"application/pdf": string;
|
|
3667
|
+
};
|
|
3668
|
+
};
|
|
3669
|
+
/** @description Order not found (also returned when the id exists in another tenant — no info leak) */
|
|
3670
|
+
404: {
|
|
3671
|
+
headers: {
|
|
3672
|
+
[name: string]: unknown;
|
|
3673
|
+
};
|
|
3674
|
+
content: {
|
|
3675
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3676
|
+
};
|
|
3677
|
+
};
|
|
3678
|
+
/** @description Order is not an executed payment between two identifiable parties */
|
|
3679
|
+
409: {
|
|
3680
|
+
headers: {
|
|
3681
|
+
[name: string]: unknown;
|
|
3682
|
+
};
|
|
3683
|
+
content: {
|
|
3684
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3685
|
+
};
|
|
3686
|
+
};
|
|
3687
|
+
/** @description Internal server error */
|
|
3688
|
+
500: {
|
|
3689
|
+
headers: {
|
|
3690
|
+
[name: string]: unknown;
|
|
3691
|
+
};
|
|
3692
|
+
content: {
|
|
3693
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
3694
|
+
};
|
|
3695
|
+
};
|
|
3696
|
+
};
|
|
3697
|
+
};
|
|
3698
|
+
put?: never;
|
|
3699
|
+
post?: never;
|
|
3700
|
+
delete?: never;
|
|
3701
|
+
options?: never;
|
|
3702
|
+
head?: never;
|
|
3703
|
+
patch?: never;
|
|
3704
|
+
trace?: never;
|
|
3705
|
+
};
|
|
3615
3706
|
"/admin/orders/{order_id}": {
|
|
3616
3707
|
parameters: {
|
|
3617
3708
|
query?: never;
|
|
@@ -6156,6 +6247,14 @@ export interface paths {
|
|
|
6156
6247
|
};
|
|
6157
6248
|
};
|
|
6158
6249
|
};
|
|
6250
|
+
/** @description Missing/invalid fields, or a `user_data_id` precondition not met (user not verified, no KYC applicant, or the applicant is unknown to the KYC provider). Code `INVALID_REQUEST`; the message names the failed precondition.
|
|
6251
|
+
* */
|
|
6252
|
+
400: {
|
|
6253
|
+
headers: {
|
|
6254
|
+
[name: string]: unknown;
|
|
6255
|
+
};
|
|
6256
|
+
content?: never;
|
|
6257
|
+
};
|
|
6159
6258
|
/** @description Vendor or sub-account not found */
|
|
6160
6259
|
404: {
|
|
6161
6260
|
headers: {
|
|
@@ -6171,6 +6270,14 @@ export interface paths {
|
|
|
6171
6270
|
};
|
|
6172
6271
|
content?: never;
|
|
6173
6272
|
};
|
|
6273
|
+
/** @description The KYC provider failed while the dossier was being pulled for `user_data_id` (code `EXTERNAL_SERVICE_ERROR`). Retry later; the draft was not created.
|
|
6274
|
+
* */
|
|
6275
|
+
502: {
|
|
6276
|
+
headers: {
|
|
6277
|
+
[name: string]: unknown;
|
|
6278
|
+
};
|
|
6279
|
+
content?: never;
|
|
6280
|
+
};
|
|
6174
6281
|
};
|
|
6175
6282
|
};
|
|
6176
6283
|
delete?: never;
|
|
@@ -7790,18 +7897,28 @@ export interface components {
|
|
|
7790
7897
|
/** @description Per transaction amount spent */
|
|
7791
7898
|
per_transaction_spent?: number;
|
|
7792
7899
|
};
|
|
7793
|
-
/** @description Sensitive card data */
|
|
7900
|
+
/** @description Sensitive card data, live-fetched from the vendor on every call and never persisted. */
|
|
7794
7901
|
CardSensitiveData: {
|
|
7795
|
-
/**
|
|
7796
|
-
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
|
|
7804
|
-
|
|
7902
|
+
/**
|
|
7903
|
+
* @description Full card number
|
|
7904
|
+
* @example 4111111111111111
|
|
7905
|
+
*/
|
|
7906
|
+
card_number: string;
|
|
7907
|
+
/**
|
|
7908
|
+
* @description Card expiration date, `MM/YY`
|
|
7909
|
+
* @example 07/29
|
|
7910
|
+
*/
|
|
7911
|
+
expiry_date: string;
|
|
7912
|
+
/**
|
|
7913
|
+
* @description Card security code
|
|
7914
|
+
* @example 123
|
|
7915
|
+
*/
|
|
7916
|
+
cvv: string;
|
|
7917
|
+
/**
|
|
7918
|
+
* @description 3-D Secure password where the vendor exposes one (Wallester); `null` otherwise.
|
|
7919
|
+
* @example null
|
|
7920
|
+
*/
|
|
7921
|
+
security_code: string | null;
|
|
7805
7922
|
};
|
|
7806
7923
|
/** @description Card transaction */
|
|
7807
7924
|
IssuingTransaction: {
|
|
@@ -8534,7 +8651,7 @@ export interface components {
|
|
|
8534
8651
|
};
|
|
8535
8652
|
};
|
|
8536
8653
|
/**
|
|
8537
|
-
* @description Order type identifier. Must be one of the active values from the `order_types` table. Examples: `EXCHANGE_OMNI` (omnibus exchange), `
|
|
8654
|
+
* @description Order type identifier. Must be one of the active values from the `order_types` table. Examples: `EXCHANGE_OMNI` (omnibus exchange), `BRL_WIRE_OFFRAMP` (wire offramp), `OMNIBUS_CRYPTO_TRANSFER` (crypto withdrawal). `L2F_*` ids are historical (rail retired) and cannot be used to create orders. Legacy `DEPOSIT_*`, `WITHDRAWAL_*` and `AUTO_CONVERT_CRYPTO` are intentionally excluded.
|
|
8538
8655
|
* @example EXCHANGE_OMNI
|
|
8539
8656
|
* @enum {string}
|
|
8540
8657
|
*/
|
|
@@ -8622,7 +8739,7 @@ export interface components {
|
|
|
8622
8739
|
virtual_account_id: string;
|
|
8623
8740
|
/**
|
|
8624
8741
|
* Format: uuid
|
|
8625
|
-
* @description Bank counterparty destination UUID created via POST /api/counterparty/destinations. The destination type must match the rail (
|
|
8742
|
+
* @description Bank counterparty destination UUID created via POST /api/counterparty/destinations. The destination type must match the rail (FEDWIRE for wire, ACH, SEPA, SWIFT, CHAPS, FPS).
|
|
8626
8743
|
*/
|
|
8627
8744
|
counterparty_destination_id: string;
|
|
8628
8745
|
/** @description Free-form reference visible in order/transaction listings */
|
|
@@ -8671,7 +8788,7 @@ export interface components {
|
|
|
8671
8788
|
amount_to?: number | null;
|
|
8672
8789
|
order_type?: string;
|
|
8673
8790
|
/** @enum {string} */
|
|
8674
|
-
status?: "NEW" | "EXPECTED" | "PROCESSING" | "COMPLETE" | "FAILED" | "CANCELED" | "REFUNDED";
|
|
8791
|
+
status?: "NEW" | "PENDING" | "EXPECTED" | "PROCESSING" | "COMPLETE" | "FAILED" | "CANCELED" | "REFUNDED";
|
|
8675
8792
|
/** Format: uuid */
|
|
8676
8793
|
sub_account_id?: string | null;
|
|
8677
8794
|
info?: string | null;
|
|
@@ -115,6 +115,17 @@ export declare namespace API {
|
|
|
115
115
|
card_issuing_fee: number | null;
|
|
116
116
|
card_monthly_fee: number | null;
|
|
117
117
|
initial_topup: number | null;
|
|
118
|
+
/**
|
|
119
|
+
* Minimum top-up in the program's currency, compared against the amount
|
|
120
|
+
* CREDITED to the card (after fees and conversion) — the same figure the
|
|
121
|
+
* server checks before it refuses a deposit with `TOPUP_BELOW_MINIMUM`.
|
|
122
|
+
* `0` means the program sets no minimum. Does not apply to the initial
|
|
123
|
+
* top-up at issuance.
|
|
124
|
+
*
|
|
125
|
+
* Optional on the type because programs served by a backend older than
|
|
126
|
+
* the `issuing_programs.min_topup` migration omit it.
|
|
127
|
+
*/
|
|
128
|
+
min_topup?: number;
|
|
118
129
|
status?: IssuingProgramStatus | string;
|
|
119
130
|
}
|
|
120
131
|
}
|
|
@@ -270,7 +281,34 @@ export declare namespace API {
|
|
|
270
281
|
adjustment_type: string;
|
|
271
282
|
review_status: string;
|
|
272
283
|
group: string;
|
|
284
|
+
/**
|
|
285
|
+
* What actually left the card: `billing_amount` plus `fee` for a debit
|
|
286
|
+
* (minus it for a credit, which arrives net of what the vendor keeps).
|
|
287
|
+
* Equals `billing_amount` when no fee sits inside the operation, so it is
|
|
288
|
+
* the figure to show as the transaction's amount.
|
|
289
|
+
*/
|
|
273
290
|
total_amount: number;
|
|
291
|
+
/**
|
|
292
|
+
* Fee charged INSIDE this operation, in billing currency. `0` for vendors
|
|
293
|
+
* that bill fees as their own transactions — those arrive as separate rows
|
|
294
|
+
* with `transaction_type: FEE`. Optional: older backends omit it.
|
|
295
|
+
*/
|
|
296
|
+
fee?: number;
|
|
297
|
+
/** Vendor's itemisation of `fee`; empty when it gave none. */
|
|
298
|
+
fee_details?: TransactionFee[];
|
|
299
|
+
/**
|
|
300
|
+
* Units of billing currency per unit of transaction currency, so
|
|
301
|
+
* `transaction_amount * conversion_rate ≈ billing_amount`. 1 when the
|
|
302
|
+
* currencies match.
|
|
303
|
+
*/
|
|
304
|
+
conversion_rate?: number;
|
|
305
|
+
}
|
|
306
|
+
/** One line of a transaction's fee itemisation (`TransactionItem.fee_details`). */
|
|
307
|
+
interface TransactionFee {
|
|
308
|
+
amount: number;
|
|
309
|
+
currency: string;
|
|
310
|
+
/** Vendor's own fee code — no cross-vendor meaning. */
|
|
311
|
+
type: string | null;
|
|
274
312
|
}
|
|
275
313
|
interface TransactionsList {
|
|
276
314
|
data: TransactionItem[];
|
|
@@ -385,7 +423,7 @@ export declare namespace API {
|
|
|
385
423
|
};
|
|
386
424
|
namespace Destination {
|
|
387
425
|
type CounterpartyDestinationType = componentsV1Frontend['schemas']['CounterpartyDestination']['type'];
|
|
388
|
-
type BankingDestinationType = Extract<CounterpartyDestinationType, 'FEDWIRE'> | Extract<CounterpartyDestinationType, 'ACH'> | Extract<CounterpartyDestinationType, 'SWIFT'> | Extract<CounterpartyDestinationType, 'SEPA'> | Extract<CounterpartyDestinationType, 'CHAPS'> | Extract<CounterpartyDestinationType, 'FPS'>;
|
|
426
|
+
type BankingDestinationType = Extract<CounterpartyDestinationType, 'FEDWIRE'> | Extract<CounterpartyDestinationType, 'ACH'> | Extract<CounterpartyDestinationType, 'RTP'> | Extract<CounterpartyDestinationType, 'SWIFT'> | Extract<CounterpartyDestinationType, 'SEPA'> | Extract<CounterpartyDestinationType, 'CHAPS'> | Extract<CounterpartyDestinationType, 'FPS'>;
|
|
389
427
|
type CryptoDestinationType = Extract<CounterpartyDestinationType, 'CRYPTO_EXTERNAL'> | Extract<CounterpartyDestinationType, 'CRYPTO_INTERNAL'>;
|
|
390
428
|
type InternalDestinationType = Extract<CounterpartyDestinationType, 'INTERNAL'>;
|
|
391
429
|
type DestinationType = BankingDestinationType | CryptoDestinationType | InternalDestinationType;
|
|
@@ -1331,6 +1369,133 @@ export declare namespace API {
|
|
|
1331
1369
|
}
|
|
1332
1370
|
}
|
|
1333
1371
|
}
|
|
1372
|
+
/**
|
|
1373
|
+
* Mass payouts (SFI-1528): a wallet-scoped batch of payouts to existing counterparty
|
|
1374
|
+
* destinations. A batch is created as a DRAFT, freely edited and previewed, then submitted
|
|
1375
|
+
* and approved — nothing moves until approval. Templates are reusable recipient lists
|
|
1376
|
+
* (no documents, no schedule) a draft can be seeded from.
|
|
1377
|
+
*
|
|
1378
|
+
* Every path is scoped by the source `wallet_id`, so each Request carries it alongside the
|
|
1379
|
+
* query/body. Responses are the frontend `{ success, data }` envelope as the spec declares it.
|
|
1380
|
+
*/
|
|
1381
|
+
namespace MassPayouts {
|
|
1382
|
+
type BatchesRoot = pathsV1Frontend['/frontend/mass-payouts/{wallet_id}'];
|
|
1383
|
+
type BatchRoot = pathsV1Frontend['/frontend/mass-payouts/{wallet_id}/{id}'];
|
|
1384
|
+
type BatchItemsRoot = pathsV1Frontend['/frontend/mass-payouts/{wallet_id}/{id}/items'];
|
|
1385
|
+
type BatchPreviewRoot = pathsV1Frontend['/frontend/mass-payouts/{wallet_id}/{id}/preview'];
|
|
1386
|
+
type BatchSubmitRoot = pathsV1Frontend['/frontend/mass-payouts/{wallet_id}/{id}/submit'];
|
|
1387
|
+
type BatchApproveRoot = pathsV1Frontend['/frontend/mass-payouts/{wallet_id}/{id}/approve'];
|
|
1388
|
+
type BatchCancelRoot = pathsV1Frontend['/frontend/mass-payouts/{wallet_id}/{id}/cancel'];
|
|
1389
|
+
type BatchReportCsvRoot = pathsV1Frontend['/frontend/mass-payouts/{wallet_id}/{id}/report.csv'];
|
|
1390
|
+
type TemplatesRoot = pathsV1Frontend['/frontend/mass-payouts/{wallet_id}/templates'];
|
|
1391
|
+
type TemplateRoot = pathsV1Frontend['/frontend/mass-payouts/{wallet_id}/templates/{template_id}'];
|
|
1392
|
+
/** The batch itself: progress counters, totals and the approval/schedule state. */
|
|
1393
|
+
export type MassPayout = componentsV1Frontend['schemas']['MassPayout'];
|
|
1394
|
+
/** A stored recipient row, with its own status and the order created for it at execution. */
|
|
1395
|
+
export type MassPayoutItem = componentsV1Frontend['schemas']['MassPayoutItem'];
|
|
1396
|
+
/** A recipient row as written on create/update. */
|
|
1397
|
+
export type MassPayoutItemInput = componentsV1Frontend['schemas']['MassPayoutItemInput'];
|
|
1398
|
+
/** Supporting attachment; an `INVOICE` satisfies the invoice rule for large rows. */
|
|
1399
|
+
export type MassPayoutDocument = componentsV1Frontend['schemas']['MassPayoutDocument'];
|
|
1400
|
+
/** Exact recipient total for one payout currency (cross-currency rows are listed here). */
|
|
1401
|
+
export type MassPayoutCurrencyTotal = componentsV1Frontend['schemas']['MassPayoutCurrencyTotal'];
|
|
1402
|
+
export type MassPayoutTemplate = componentsV1Frontend['schemas']['MassPayoutTemplate'];
|
|
1403
|
+
export type MassPayoutTemplateItem = componentsV1Frontend['schemas']['MassPayoutTemplateItem'];
|
|
1404
|
+
export type MassPayoutTemplateItemInput = componentsV1Frontend['schemas']['MassPayoutTemplateItemInput'];
|
|
1405
|
+
export type MassPayoutTemplateWithItems = componentsV1Frontend['schemas']['MassPayoutTemplateWithItems'];
|
|
1406
|
+
/**
|
|
1407
|
+
* Status unions read off the schemas rather than re-declared, so a spec change lands here
|
|
1408
|
+
* automatically. `SCHEDULED` = approved with a future send date; `CANCELED` on an item means
|
|
1409
|
+
* it was never attempted.
|
|
1410
|
+
*/
|
|
1411
|
+
export type MassPayoutStatus = NonNullable<MassPayout['status']>;
|
|
1412
|
+
export type MassPayoutItemStatus = NonNullable<MassPayoutItem['status']>;
|
|
1413
|
+
export type MassPayoutDocumentType = MassPayoutDocument['type'];
|
|
1414
|
+
export namespace List {
|
|
1415
|
+
type Request = BatchesRoot['get']['parameters']['path'] & NonNullable<BatchesRoot['get']['parameters']['query']>;
|
|
1416
|
+
type Response = BatchesRoot['get']['responses']['200']['content']['application/json'];
|
|
1417
|
+
}
|
|
1418
|
+
export namespace Create {
|
|
1419
|
+
type Request = BatchesRoot['post']['parameters']['path'] & BatchesRoot['post']['requestBody']['content']['application/json'];
|
|
1420
|
+
type Response = BatchesRoot['post']['responses']['200']['content']['application/json'];
|
|
1421
|
+
}
|
|
1422
|
+
export namespace GetById {
|
|
1423
|
+
type Request = BatchRoot['get']['parameters']['path'];
|
|
1424
|
+
type Response = BatchRoot['get']['responses']['200']['content']['application/json'];
|
|
1425
|
+
}
|
|
1426
|
+
/**
|
|
1427
|
+
* Draft-only. `items` fully replaces the recipient list; `virtual_account_id: null` clears the
|
|
1428
|
+
* source virtual account and `scheduled_at: null` makes the batch execute right after approval.
|
|
1429
|
+
*/
|
|
1430
|
+
export namespace Update {
|
|
1431
|
+
type Request = BatchRoot['put']['parameters']['path'] & BatchRoot['put']['requestBody']['content']['application/json'];
|
|
1432
|
+
type Response = BatchRoot['put']['responses']['200']['content']['application/json'];
|
|
1433
|
+
}
|
|
1434
|
+
export namespace Items {
|
|
1435
|
+
type Request = BatchItemsRoot['get']['parameters']['path'] & NonNullable<BatchItemsRoot['get']['parameters']['query']>;
|
|
1436
|
+
type Response = BatchItemsRoot['get']['responses']['200']['content']['application/json'];
|
|
1437
|
+
}
|
|
1438
|
+
/**
|
|
1439
|
+
* Dry run before submitting: per-item fee estimates, the total debit in the batch source
|
|
1440
|
+
* currency and the balance check, plus `problems[]` for the rows that would block a submit.
|
|
1441
|
+
*/
|
|
1442
|
+
export namespace Preview {
|
|
1443
|
+
type Request = BatchPreviewRoot['get']['parameters']['path'];
|
|
1444
|
+
type Response = BatchPreviewRoot['get']['responses']['200']['content']['application/json'];
|
|
1445
|
+
type PreviewItem = NonNullable<NonNullable<Response['data']>['items']>[number];
|
|
1446
|
+
/**
|
|
1447
|
+
* The same shape the submit refusal returns in `error.details.problems` — the spec types the
|
|
1448
|
+
* error envelope's `details` as free-form, so this is the one declared home for it.
|
|
1449
|
+
*/
|
|
1450
|
+
type PreviewProblem = NonNullable<NonNullable<Response['data']>['problems']>[number];
|
|
1451
|
+
}
|
|
1452
|
+
/** DRAFT to PENDING_APPROVAL. Refused while any recipient is invalid. */
|
|
1453
|
+
export namespace Submit {
|
|
1454
|
+
type Request = BatchSubmitRoot['post']['parameters']['path'];
|
|
1455
|
+
type Response = BatchSubmitRoot['post']['responses']['200']['content']['application/json'];
|
|
1456
|
+
}
|
|
1457
|
+
/** Approve and start execution (or arm the schedule when `scheduled_at` is set). */
|
|
1458
|
+
export namespace Approve {
|
|
1459
|
+
type Request = BatchApproveRoot['post']['parameters']['path'];
|
|
1460
|
+
type Response = BatchApproveRoot['post']['responses']['200']['content']['application/json'];
|
|
1461
|
+
}
|
|
1462
|
+
export namespace Cancel {
|
|
1463
|
+
type Request = BatchCancelRoot['post']['parameters']['path'];
|
|
1464
|
+
type Response = BatchCancelRoot['post']['responses']['200']['content']['application/json'];
|
|
1465
|
+
}
|
|
1466
|
+
/** Streaming `text/csv`, not the JSON envelope — the response is the raw CSV body. */
|
|
1467
|
+
export namespace ReportCsv {
|
|
1468
|
+
type Request = BatchReportCsvRoot['get']['parameters']['path'];
|
|
1469
|
+
type Response = BatchReportCsvRoot['get']['responses']['200']['content']['text/csv'];
|
|
1470
|
+
}
|
|
1471
|
+
export namespace Templates {
|
|
1472
|
+
namespace List {
|
|
1473
|
+
type Request = TemplatesRoot['get']['parameters']['path'] & NonNullable<TemplatesRoot['get']['parameters']['query']>;
|
|
1474
|
+
type Response = TemplatesRoot['get']['responses']['200']['content']['application/json'];
|
|
1475
|
+
}
|
|
1476
|
+
namespace Create {
|
|
1477
|
+
type Request = TemplatesRoot['post']['parameters']['path'] & TemplatesRoot['post']['requestBody']['content']['application/json'];
|
|
1478
|
+
type Response = TemplatesRoot['post']['responses']['200']['content']['application/json'];
|
|
1479
|
+
}
|
|
1480
|
+
namespace GetById {
|
|
1481
|
+
type Request = TemplateRoot['get']['parameters']['path'];
|
|
1482
|
+
type Response = TemplateRoot['get']['responses']['200']['content']['application/json'];
|
|
1483
|
+
}
|
|
1484
|
+
/**
|
|
1485
|
+
* `items` fully replaces the row list; `virtual_account_id: null` clears the template's
|
|
1486
|
+
* source account.
|
|
1487
|
+
*/
|
|
1488
|
+
namespace Update {
|
|
1489
|
+
type Request = TemplateRoot['put']['parameters']['path'] & TemplateRoot['put']['requestBody']['content']['application/json'];
|
|
1490
|
+
type Response = TemplateRoot['put']['responses']['200']['content']['application/json'];
|
|
1491
|
+
}
|
|
1492
|
+
namespace Delete {
|
|
1493
|
+
type Request = TemplateRoot['delete']['parameters']['path'];
|
|
1494
|
+
type Response = TemplateRoot['delete']['responses']['200']['content']['application/json'];
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
export {};
|
|
1498
|
+
}
|
|
1334
1499
|
namespace Orders {
|
|
1335
1500
|
namespace Create {
|
|
1336
1501
|
namespace ByOrderType {
|
|
@@ -2191,27 +2356,27 @@ export declare namespace API {
|
|
|
2191
2356
|
type Response = OrderEnvelope;
|
|
2192
2357
|
}
|
|
2193
2358
|
namespace Wire {
|
|
2194
|
-
type Request = componentsV1Frontend['schemas']['
|
|
2359
|
+
type Request = componentsV1Frontend['schemas']['FrontendFiatWithdrawalRequest'];
|
|
2195
2360
|
type Response = OrderEnvelope;
|
|
2196
2361
|
}
|
|
2197
2362
|
namespace Ach {
|
|
2198
|
-
type Request = componentsV1Frontend['schemas']['
|
|
2363
|
+
type Request = componentsV1Frontend['schemas']['FrontendFiatWithdrawalRequest'];
|
|
2199
2364
|
type Response = OrderEnvelope;
|
|
2200
2365
|
}
|
|
2201
2366
|
namespace Sepa {
|
|
2202
|
-
type Request = componentsV1Frontend['schemas']['
|
|
2367
|
+
type Request = componentsV1Frontend['schemas']['FrontendFiatWithdrawalRequest'];
|
|
2203
2368
|
type Response = OrderEnvelope;
|
|
2204
2369
|
}
|
|
2205
2370
|
namespace Swift {
|
|
2206
|
-
type Request = componentsV1Frontend['schemas']['
|
|
2371
|
+
type Request = componentsV1Frontend['schemas']['FrontendFiatWithdrawalRequest'];
|
|
2207
2372
|
type Response = OrderEnvelope;
|
|
2208
2373
|
}
|
|
2209
2374
|
namespace Chaps {
|
|
2210
|
-
type Request = componentsV1Frontend['schemas']['
|
|
2375
|
+
type Request = componentsV1Frontend['schemas']['FrontendFiatWithdrawalRequest'];
|
|
2211
2376
|
type Response = OrderEnvelope;
|
|
2212
2377
|
}
|
|
2213
2378
|
namespace Fps {
|
|
2214
|
-
type Request = componentsV1Frontend['schemas']['
|
|
2379
|
+
type Request = componentsV1Frontend['schemas']['FrontendFiatWithdrawalRequest'];
|
|
2215
2380
|
type Response = OrderEnvelope;
|
|
2216
2381
|
}
|
|
2217
2382
|
}
|
package/dist/constants.d.ts
CHANGED
|
@@ -391,6 +391,7 @@ export declare const counterpartyTypeCheck: IsEnumEqualToUnion<CounterpartyType,
|
|
|
391
391
|
export declare enum CounterpartyDestinationType {
|
|
392
392
|
FEDWIRE = "FEDWIRE",
|
|
393
393
|
ACH = "ACH",
|
|
394
|
+
RTP = "RTP",
|
|
394
395
|
SWIFT = "SWIFT",
|
|
395
396
|
SEPA = "SEPA",
|
|
396
397
|
CRYPTO_EXTERNAL = "CRYPTO_EXTERNAL",
|
package/dist/constants.js
CHANGED
|
@@ -415,6 +415,7 @@ export var CounterpartyDestinationType;
|
|
|
415
415
|
(function (CounterpartyDestinationType) {
|
|
416
416
|
CounterpartyDestinationType["FEDWIRE"] = "FEDWIRE";
|
|
417
417
|
CounterpartyDestinationType["ACH"] = "ACH";
|
|
418
|
+
CounterpartyDestinationType["RTP"] = "RTP";
|
|
418
419
|
CounterpartyDestinationType["SWIFT"] = "SWIFT";
|
|
419
420
|
CounterpartyDestinationType["SEPA"] = "SEPA";
|
|
420
421
|
CounterpartyDestinationType["CRYPTO_EXTERNAL"] = "CRYPTO_EXTERNAL";
|
|
@@ -427,6 +428,7 @@ export var CounterpartyDestinationType;
|
|
|
427
428
|
export const counterpartyBankingDestinationTypes = {
|
|
428
429
|
FEDWIRE: CounterpartyDestinationType.FEDWIRE,
|
|
429
430
|
ACH: CounterpartyDestinationType.ACH,
|
|
431
|
+
RTP: CounterpartyDestinationType.RTP,
|
|
430
432
|
SWIFT: CounterpartyDestinationType.SWIFT,
|
|
431
433
|
SEPA: CounterpartyDestinationType.SEPA,
|
|
432
434
|
CHAPS: CounterpartyDestinationType.CHAPS,
|