squarefi-bff-api-module 1.36.36 → 1.36.38
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/types/autogen/apiV1External.types.d.ts +110 -14
- package/dist/api/types/autogen/apiV1Frontend.types.d.ts +859 -192
- package/dist/api/types/autogen/apiV1Legacy.types.d.ts +17 -118
- package/dist/api/types/autogen/apiV1Tenant.types.d.ts +56 -74
- package/dist/api/types/autogen/apiV2.types.d.ts +6 -0
- package/package.json +1 -1
|
@@ -1067,104 +1067,6 @@ export interface paths {
|
|
|
1067
1067
|
patch?: never;
|
|
1068
1068
|
trace?: never;
|
|
1069
1069
|
};
|
|
1070
|
-
"/tenant/me": {
|
|
1071
|
-
parameters: {
|
|
1072
|
-
query?: never;
|
|
1073
|
-
header?: never;
|
|
1074
|
-
path?: never;
|
|
1075
|
-
cookie?: never;
|
|
1076
|
-
};
|
|
1077
|
-
/**
|
|
1078
|
-
* Get authenticated tenant
|
|
1079
|
-
* @deprecated
|
|
1080
|
-
* @description Returns information about the authenticated tenant
|
|
1081
|
-
*/
|
|
1082
|
-
get: {
|
|
1083
|
-
parameters: {
|
|
1084
|
-
query?: never;
|
|
1085
|
-
header?: never;
|
|
1086
|
-
path?: never;
|
|
1087
|
-
cookie?: never;
|
|
1088
|
-
};
|
|
1089
|
-
requestBody?: never;
|
|
1090
|
-
responses: {
|
|
1091
|
-
/** @description Authenticated tenant information */
|
|
1092
|
-
200: {
|
|
1093
|
-
headers: {
|
|
1094
|
-
[name: string]: unknown;
|
|
1095
|
-
};
|
|
1096
|
-
content: {
|
|
1097
|
-
"application/json": components["schemas"]["Tenant"];
|
|
1098
|
-
};
|
|
1099
|
-
};
|
|
1100
|
-
/** @description Server error */
|
|
1101
|
-
500: {
|
|
1102
|
-
headers: {
|
|
1103
|
-
[name: string]: unknown;
|
|
1104
|
-
};
|
|
1105
|
-
content: {
|
|
1106
|
-
"application/json": components["schemas"]["Error"];
|
|
1107
|
-
};
|
|
1108
|
-
};
|
|
1109
|
-
};
|
|
1110
|
-
};
|
|
1111
|
-
put?: never;
|
|
1112
|
-
post?: never;
|
|
1113
|
-
delete?: never;
|
|
1114
|
-
options?: never;
|
|
1115
|
-
head?: never;
|
|
1116
|
-
patch?: never;
|
|
1117
|
-
trace?: never;
|
|
1118
|
-
};
|
|
1119
|
-
"/tenant/config": {
|
|
1120
|
-
parameters: {
|
|
1121
|
-
query?: never;
|
|
1122
|
-
header?: never;
|
|
1123
|
-
path?: never;
|
|
1124
|
-
cookie?: never;
|
|
1125
|
-
};
|
|
1126
|
-
/**
|
|
1127
|
-
* Get tenant configuration
|
|
1128
|
-
* @deprecated
|
|
1129
|
-
* @description Returns configuration for the authenticated tenant
|
|
1130
|
-
*/
|
|
1131
|
-
get: {
|
|
1132
|
-
parameters: {
|
|
1133
|
-
query?: never;
|
|
1134
|
-
header?: never;
|
|
1135
|
-
path?: never;
|
|
1136
|
-
cookie?: never;
|
|
1137
|
-
};
|
|
1138
|
-
requestBody?: never;
|
|
1139
|
-
responses: {
|
|
1140
|
-
/** @description Tenant configuration */
|
|
1141
|
-
200: {
|
|
1142
|
-
headers: {
|
|
1143
|
-
[name: string]: unknown;
|
|
1144
|
-
};
|
|
1145
|
-
content: {
|
|
1146
|
-
"application/json": components["schemas"]["TenantConfig"];
|
|
1147
|
-
};
|
|
1148
|
-
};
|
|
1149
|
-
/** @description Server error */
|
|
1150
|
-
500: {
|
|
1151
|
-
headers: {
|
|
1152
|
-
[name: string]: unknown;
|
|
1153
|
-
};
|
|
1154
|
-
content: {
|
|
1155
|
-
"application/json": components["schemas"]["Error"];
|
|
1156
|
-
};
|
|
1157
|
-
};
|
|
1158
|
-
};
|
|
1159
|
-
};
|
|
1160
|
-
put?: never;
|
|
1161
|
-
post?: never;
|
|
1162
|
-
delete?: never;
|
|
1163
|
-
options?: never;
|
|
1164
|
-
head?: never;
|
|
1165
|
-
patch?: never;
|
|
1166
|
-
trace?: never;
|
|
1167
|
-
};
|
|
1168
1070
|
"/issuing/cards": {
|
|
1169
1071
|
parameters: {
|
|
1170
1072
|
query?: never;
|
|
@@ -2201,17 +2103,7 @@ export interface paths {
|
|
|
2201
2103
|
};
|
|
2202
2104
|
/**
|
|
2203
2105
|
* Get card transactions
|
|
2204
|
-
* @description Retrieves a list of transactions for a specific card with filtering and pagination options.
|
|
2205
|
-
* This endpoint now combines external card transactions with local top-up transactions.
|
|
2206
|
-
*
|
|
2207
|
-
* **Pagination Strategy**: Due to combining two data sources (external API and local DB),
|
|
2208
|
-
* pagination fetches larger batches from both sources to ensure proper sorting before
|
|
2209
|
-
* applying the requested pagination. This prevents missing transactions that should appear
|
|
2210
|
-
* on the current page after sorting.
|
|
2211
|
-
*
|
|
2212
|
-
* **Note**: For cards, the system needs to find the associated fiat_account to match local top-up transactions.
|
|
2213
|
-
* This should be replaced with direct card_id in transaction metadata in the future.
|
|
2214
|
-
*
|
|
2106
|
+
* @description Retrieves a list of transactions for a specific card, including card top-ups, with filtering and pagination options.
|
|
2215
2107
|
*/
|
|
2216
2108
|
get: {
|
|
2217
2109
|
parameters: {
|
|
@@ -2226,14 +2118,14 @@ export interface paths {
|
|
|
2226
2118
|
offset?: number;
|
|
2227
2119
|
/** @description Whether to use the new response format */
|
|
2228
2120
|
new_scheme?: boolean;
|
|
2229
|
-
/** @description Filter by transaction type */
|
|
2230
|
-
transaction_type?:
|
|
2231
|
-
/** @description Filter by start date (ISO 8601)
|
|
2121
|
+
/** @description Filter by transaction type (case-insensitive). Unknown values are rejected with a validation error. */
|
|
2122
|
+
transaction_type?: "AUTHORIZATION" | "CLEARING" | "REFUND" | "REVERSAL" | "DEPOSIT" | "WITHDRAWAL" | "TRANSFER" | "FEE" | "ATM" | "ACCOUNT_VERIFICATION" | "ORIGINAL_CREDIT" | "OTHER";
|
|
2123
|
+
/** @description Filter by start date (ISO 8601), matched against `cleared_at` (fallback `created_at`). */
|
|
2232
2124
|
from?: string;
|
|
2233
|
-
/** @description Filter by end date (ISO 8601)
|
|
2125
|
+
/** @description Filter by end date (ISO 8601), matched against `cleared_at` (fallback `created_at`). */
|
|
2234
2126
|
to?: string;
|
|
2235
|
-
/** @description Filter by transaction status
|
|
2236
|
-
status?: "PENDING" | "APPROVED" | "DECLINED" | "CANCELED";
|
|
2127
|
+
/** @description Filter by transaction status (case-insensitive). */
|
|
2128
|
+
status?: "PENDING" | "APPROVED" | "COMPLETED" | "DECLINED" | "CANCELED" | "REVERSED" | "EXPIRED";
|
|
2237
2129
|
};
|
|
2238
2130
|
header?: never;
|
|
2239
2131
|
path?: never;
|
|
@@ -2241,7 +2133,7 @@ export interface paths {
|
|
|
2241
2133
|
};
|
|
2242
2134
|
requestBody?: never;
|
|
2243
2135
|
responses: {
|
|
2244
|
-
/** @description List of transactions retrieved successfully (includes
|
|
2136
|
+
/** @description List of transactions retrieved successfully (includes card top-ups) */
|
|
2245
2137
|
200: {
|
|
2246
2138
|
headers: {
|
|
2247
2139
|
[name: string]: unknown;
|
|
@@ -2250,6 +2142,15 @@ export interface paths {
|
|
|
2250
2142
|
"application/json": components["schemas"]["IssuingTransactionList"];
|
|
2251
2143
|
};
|
|
2252
2144
|
};
|
|
2145
|
+
/** @description Validation error (unknown transaction_type) */
|
|
2146
|
+
400: {
|
|
2147
|
+
headers: {
|
|
2148
|
+
[name: string]: unknown;
|
|
2149
|
+
};
|
|
2150
|
+
content: {
|
|
2151
|
+
"application/json": components["schemas"]["Error"];
|
|
2152
|
+
};
|
|
2153
|
+
};
|
|
2253
2154
|
/** @description Server Error */
|
|
2254
2155
|
500: {
|
|
2255
2156
|
headers: {
|
|
@@ -8371,8 +8272,6 @@ export interface components {
|
|
|
8371
8272
|
Transaction: unknown;
|
|
8372
8273
|
CryptoCurrency: unknown;
|
|
8373
8274
|
Country: unknown;
|
|
8374
|
-
Tenant: unknown;
|
|
8375
|
-
TenantConfig: unknown;
|
|
8376
8275
|
IssuingCardList: unknown;
|
|
8377
8276
|
IssuingCard: unknown;
|
|
8378
8277
|
CardSensitiveData: unknown;
|
|
@@ -2643,10 +2643,10 @@ export interface paths {
|
|
|
2643
2643
|
* @description Sends crypto from the wallet's omnibus balance via a counterparty
|
|
2644
2644
|
* destination. Two-phase: created `NEW` without touching the balance;
|
|
2645
2645
|
* `POST /admin/orders/{id}/approve` checks the balance, debits the funds
|
|
2646
|
-
* and dispatches the on-chain send.
|
|
2647
|
-
*
|
|
2648
|
-
*
|
|
2649
|
-
*
|
|
2646
|
+
* and dispatches the on-chain send. This endpoint is external-only: the
|
|
2647
|
+
* order always goes on-chain, even if the destination address belongs to
|
|
2648
|
+
* a wallet on this platform. Internal (off-chain) transfers are created
|
|
2649
|
+
* only through the internal transfer endpoint.
|
|
2650
2650
|
*
|
|
2651
2651
|
*/
|
|
2652
2652
|
post: {
|
|
@@ -6079,11 +6079,12 @@ export interface paths {
|
|
|
6079
6079
|
*/
|
|
6080
6080
|
cardholder_relationship?: "EMPLOYEE" | "CONTRACTOR";
|
|
6081
6081
|
/**
|
|
6082
|
-
* @description Identity document type (KYC vendors)
|
|
6082
|
+
* @description Identity document type (KYC vendors). Which values are accepted depends on the country that issued the document — read cardholder_requirements.country_rules[gov_id_country].gov_id_types instead of hardcoding the list (id_card_cn is the mainland China resident ID, id_card_hk the HKID).
|
|
6083
|
+
*
|
|
6083
6084
|
* @enum {string}
|
|
6084
6085
|
*/
|
|
6085
|
-
gov_id_type?: "passport" | "id_card" | "driving_license";
|
|
6086
|
-
/** @description Identity document number */
|
|
6086
|
+
gov_id_type?: "passport" | "id_card" | "driving_license" | "residence_permit_eu" | "residence_permit_ae" | "id_card_cn" | "id_card_hk";
|
|
6087
|
+
/** @description Identity document number (passport / driving licence / national ID). */
|
|
6087
6088
|
gov_id_number?: string;
|
|
6088
6089
|
/**
|
|
6089
6090
|
* @description Issuing country of the identity document (2-3 letter code)
|
|
@@ -6097,9 +6098,16 @@ export interface paths {
|
|
|
6097
6098
|
gov_id_issuance_date?: string;
|
|
6098
6099
|
/**
|
|
6099
6100
|
* Format: date
|
|
6100
|
-
* @description Identity document expiry date (YYYY-MM-DD)
|
|
6101
|
+
* @description Identity document expiry date (YYYY-MM-DD). Required by the vendor review even for a document issued for life (an Indonesian KTP, "SEUMUR HIDUP"), which has no expiry printed on it — send the issuance date plus 100 years.
|
|
6102
|
+
*
|
|
6101
6103
|
*/
|
|
6102
6104
|
gov_id_expiration_date?: string;
|
|
6105
|
+
/**
|
|
6106
|
+
* @description Tax identifier of the cardholder, separate from the document number. Required by Interlace CONSUMER programs when nationality is USA, where it must be a valid SSN (9 digits or XXX-XX-XXXX).
|
|
6107
|
+
*
|
|
6108
|
+
* @example 123-45-6789
|
|
6109
|
+
*/
|
|
6110
|
+
tax_identification_number?: string;
|
|
6103
6111
|
/** @description Cardholder's address */
|
|
6104
6112
|
address?: {
|
|
6105
6113
|
/**
|
|
@@ -6114,7 +6122,11 @@ export interface paths {
|
|
|
6114
6122
|
line2?: string;
|
|
6115
6123
|
/** @example New York */
|
|
6116
6124
|
city?: string;
|
|
6117
|
-
/**
|
|
6125
|
+
/**
|
|
6126
|
+
* @description Subdivision. Required for a US or Canadian address and must be the two-letter code (AL, ON); optional elsewhere.
|
|
6127
|
+
*
|
|
6128
|
+
* @example NY
|
|
6129
|
+
*/
|
|
6118
6130
|
state?: string;
|
|
6119
6131
|
/** @example 10001 */
|
|
6120
6132
|
postal_code?: string;
|
|
@@ -6236,67 +6248,7 @@ export interface paths {
|
|
|
6236
6248
|
};
|
|
6237
6249
|
options?: never;
|
|
6238
6250
|
head?: never;
|
|
6239
|
-
|
|
6240
|
-
patch: {
|
|
6241
|
-
parameters: {
|
|
6242
|
-
query?: never;
|
|
6243
|
-
header?: never;
|
|
6244
|
-
path: {
|
|
6245
|
-
cardholder_id: string;
|
|
6246
|
-
};
|
|
6247
|
-
cookie?: never;
|
|
6248
|
-
};
|
|
6249
|
-
requestBody: {
|
|
6250
|
-
content: {
|
|
6251
|
-
"application/json": {
|
|
6252
|
-
/** Format: uuid */
|
|
6253
|
-
wallet_id: string;
|
|
6254
|
-
first_name?: string;
|
|
6255
|
-
last_name?: string;
|
|
6256
|
-
email?: string;
|
|
6257
|
-
phone?: string;
|
|
6258
|
-
/** @description ISO 3166-1 alpha-3 country code */
|
|
6259
|
-
nationality?: string;
|
|
6260
|
-
/** @enum {string} */
|
|
6261
|
-
gender?: "M" | "F";
|
|
6262
|
-
/** @enum {string} */
|
|
6263
|
-
cardholder_relationship?: "EMPLOYEE" | "CONTRACTOR";
|
|
6264
|
-
/** @enum {string} */
|
|
6265
|
-
gov_id_type?: "passport" | "id_card" | "driving_license";
|
|
6266
|
-
gov_id_number?: string;
|
|
6267
|
-
/** @description 2-3 letter uppercase country code */
|
|
6268
|
-
gov_id_country?: string;
|
|
6269
|
-
/** Format: date */
|
|
6270
|
-
gov_id_issuance_date?: string;
|
|
6271
|
-
/** Format: date */
|
|
6272
|
-
gov_id_expiration_date?: string;
|
|
6273
|
-
address?: {
|
|
6274
|
-
line1?: string;
|
|
6275
|
-
line2?: string;
|
|
6276
|
-
city?: string;
|
|
6277
|
-
state?: string;
|
|
6278
|
-
postal_code?: string;
|
|
6279
|
-
country?: string;
|
|
6280
|
-
};
|
|
6281
|
-
};
|
|
6282
|
-
};
|
|
6283
|
-
};
|
|
6284
|
-
responses: {
|
|
6285
|
-
/** @description Cardholder updated */
|
|
6286
|
-
200: {
|
|
6287
|
-
headers: {
|
|
6288
|
-
[name: string]: unknown;
|
|
6289
|
-
};
|
|
6290
|
-
content: {
|
|
6291
|
-
"application/json": {
|
|
6292
|
-
/** @example true */
|
|
6293
|
-
success?: boolean;
|
|
6294
|
-
data?: components["schemas"]["Cardholder"];
|
|
6295
|
-
};
|
|
6296
|
-
};
|
|
6297
|
-
};
|
|
6298
|
-
};
|
|
6299
|
-
};
|
|
6251
|
+
patch?: never;
|
|
6300
6252
|
trace?: never;
|
|
6301
6253
|
};
|
|
6302
6254
|
"/admin/issuing/cardholders/{cardholder_id}/documents": {
|
|
@@ -6395,8 +6347,14 @@ export interface paths {
|
|
|
6395
6347
|
* Upload KYC document files
|
|
6396
6348
|
* @description Uploads KYC files against a wallet via `multipart/form-data`, with no
|
|
6397
6349
|
* cardholder involved. The form field name is the document type (`selfie`,
|
|
6398
|
-
* `gov_id_front`, `gov_id_back`); one file per type, 5MB max each,
|
|
6399
|
-
* png/jpeg
|
|
6350
|
+
* `gov_id_front`, `gov_id_back`); one file per type, 5MB max each, photos
|
|
6351
|
+
* only (png/jpeg).
|
|
6352
|
+
*
|
|
6353
|
+
* Send the file the camera produced, unchanged: cropping, resizing or
|
|
6354
|
+
* re-encoding a document photo can make the vendor's tampering check
|
|
6355
|
+
* answer `Forgery attempt has been made.` — a verdict far worse than the
|
|
6356
|
+
* poor quality it was meant to fix. Too small to read means retake it
|
|
6357
|
+
* (card filling the frame, straight, no glare), not improve the file.
|
|
6400
6358
|
*
|
|
6401
6359
|
* The response returns an `id` per file; pass those to
|
|
6402
6360
|
* `POST /admin/issuing/cardholders/{cardholder_id}/documents` to attach
|
|
@@ -6540,6 +6498,13 @@ export interface paths {
|
|
|
6540
6498
|
* not met; `error.details.missing` lists every field and file still needed. A failed
|
|
6541
6499
|
* submit leaves the draft untouched, so it can be retried.
|
|
6542
6500
|
*
|
|
6501
|
+
* A cardholder whose identity review came back `review_status: REJECTED` or `REQUEST`
|
|
6502
|
+
* (both readable, with `reject_reason`, on the cardholder) may be submitted again: fix
|
|
6503
|
+
* what the vendor named, replace the document if that is what it disliked, and call this
|
|
6504
|
+
* endpoint once more. The review restarts on the vendor account the person already has —
|
|
6505
|
+
* the same document cannot be registered twice at the vendor, so a fresh cardholder is
|
|
6506
|
+
* NOT the way to retry. While a review is running, another submit is refused with `409`.
|
|
6507
|
+
*
|
|
6543
6508
|
*/
|
|
6544
6509
|
post: {
|
|
6545
6510
|
parameters: {
|
|
@@ -6581,7 +6546,7 @@ export interface paths {
|
|
|
6581
6546
|
};
|
|
6582
6547
|
content?: never;
|
|
6583
6548
|
};
|
|
6584
|
-
/** @description Cardholder is
|
|
6549
|
+
/** @description Cardholder is live at the vendor, or its review is still running */
|
|
6585
6550
|
409: {
|
|
6586
6551
|
headers: {
|
|
6587
6552
|
[name: string]: unknown;
|
|
@@ -8551,7 +8516,13 @@ export interface components {
|
|
|
8551
8516
|
} | null;
|
|
8552
8517
|
};
|
|
8553
8518
|
CryptoTransferRequest: {
|
|
8519
|
+
/** @description Amount to send, in `from_currency_id` units. With `is_reverse: true` — the amount the recipient must receive, in destination-currency units. */
|
|
8554
8520
|
amount: number;
|
|
8521
|
+
/**
|
|
8522
|
+
* @description When true, `amount` is the receive-amount and the debited amount is grossed up with fees.
|
|
8523
|
+
* @default false
|
|
8524
|
+
*/
|
|
8525
|
+
is_reverse: boolean;
|
|
8555
8526
|
/** Format: uuid */
|
|
8556
8527
|
from_currency_id: string;
|
|
8557
8528
|
/** Format: uuid */
|
|
@@ -8567,7 +8538,13 @@ export interface components {
|
|
|
8567
8538
|
scheduled_at?: string;
|
|
8568
8539
|
};
|
|
8569
8540
|
OfframpOrderRequest: {
|
|
8541
|
+
/** @description Amount to send, in `from_currency_id` units. With `is_reverse: true` — the amount the recipient must receive, in destination-currency units. */
|
|
8570
8542
|
amount: number;
|
|
8543
|
+
/**
|
|
8544
|
+
* @description When true, `amount` is the receive-amount and the debited amount is grossed up with fees.
|
|
8545
|
+
* @default false
|
|
8546
|
+
*/
|
|
8547
|
+
is_reverse: boolean;
|
|
8571
8548
|
/** Format: uuid */
|
|
8572
8549
|
from_currency_id: string;
|
|
8573
8550
|
/** Format: uuid */
|
|
@@ -8590,8 +8567,13 @@ export interface components {
|
|
|
8590
8567
|
scheduled_at?: string;
|
|
8591
8568
|
};
|
|
8592
8569
|
ExchangeOrderRequest: {
|
|
8593
|
-
/** @description Amount to exchange
|
|
8570
|
+
/** @description Amount to exchange, in `from_currency_id` units. With `is_reverse: true` — the amount to receive, in `to_currency_id` units. */
|
|
8594
8571
|
amount: number;
|
|
8572
|
+
/**
|
|
8573
|
+
* @description When true, `amount` is the receive-amount and the debited amount is grossed up with fees.
|
|
8574
|
+
* @default false
|
|
8575
|
+
*/
|
|
8576
|
+
is_reverse: boolean;
|
|
8595
8577
|
/**
|
|
8596
8578
|
* Format: uuid
|
|
8597
8579
|
* @description Source currency UUID
|
|
@@ -1969,11 +1969,16 @@ export interface components {
|
|
|
1969
1969
|
readonly support_text?: string | null;
|
|
1970
1970
|
readonly support_phone?: string | null;
|
|
1971
1971
|
};
|
|
1972
|
+
MailingDataEntity: {
|
|
1973
|
+
readonly support_email?: string | null;
|
|
1974
|
+
};
|
|
1972
1975
|
SupportedLocalesEntity: {
|
|
1973
1976
|
default: string;
|
|
1974
1977
|
supported: string[];
|
|
1975
1978
|
};
|
|
1976
1979
|
SystemConfigDto: {
|
|
1980
|
+
tenant_id: string;
|
|
1981
|
+
app_url: string | null;
|
|
1977
1982
|
/** @enum {string} */
|
|
1978
1983
|
default_theme_mode: "dark" | "light";
|
|
1979
1984
|
enable_kyc: boolean;
|
|
@@ -1990,6 +1995,7 @@ export interface components {
|
|
|
1990
1995
|
enable_referral_program: boolean;
|
|
1991
1996
|
readonly metrics_data?: components["schemas"]["MetricsDataEntity"] | null;
|
|
1992
1997
|
readonly statement_branding?: components["schemas"]["StatementBrandingEntity"] | null;
|
|
1998
|
+
readonly mailing_data?: components["schemas"]["MailingDataEntity"] | null;
|
|
1993
1999
|
/** @enum {string} */
|
|
1994
2000
|
kyc_data_provider: "persona" | "sumsub";
|
|
1995
2001
|
readonly supported_locales?: components["schemas"]["SupportedLocalesEntity"] | null;
|