squarefi-bff-api-module 1.36.50 → 1.36.52
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 +192 -39
- package/dist/api/types/autogen/apiV1Frontend.types.d.ts +2118 -608
- package/dist/api/types/autogen/apiV1Legacy.types.d.ts +43 -5
- package/dist/api/types/autogen/apiV1Tenant.types.d.ts +204 -25
- package/dist/api/types/types.d.ts +144 -8
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +2 -0
- package/package.json +1 -1
package/dist/api/frontend.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare const frontend: {
|
|
|
10
10
|
};
|
|
11
11
|
issuing: {
|
|
12
12
|
cards: {
|
|
13
|
-
list: ({ status, ...params }
|
|
13
|
+
list: ({ status, ...params }: API.Frontend.Issuing.Cards.List.Request) => Promise<API.Frontend.Issuing.Cards.List.Response>;
|
|
14
14
|
deposit: ({ card_id, ...data }: API.Frontend.Issuing.Cards.Deposit.Request) => Promise<API.Frontend.Issuing.Cards.Deposit.Response>;
|
|
15
15
|
withdraw: ({ card_id, ...data }: API.Frontend.Issuing.Cards.Withdraw.Request) => Promise<API.Frontend.Issuing.Cards.Withdraw.Response>;
|
|
16
16
|
getById: ({ card_id, }: API.Frontend.Issuing.Cards.Get.Request) => Promise<API.Frontend.Issuing.Cards.Get.Response>;
|
|
@@ -34,7 +34,7 @@ export declare const frontend: {
|
|
|
34
34
|
create: (data: API.Frontend.Issuing.Cards.Create.Request) => Promise<API.Frontend.Issuing.Cards.Create.Response>;
|
|
35
35
|
};
|
|
36
36
|
cardholders: {
|
|
37
|
-
list: (params
|
|
37
|
+
list: (params: API.Frontend.Issuing.Cardholders.List.Request) => Promise<API.Frontend.Issuing.Cardholders.List.Response>;
|
|
38
38
|
create: (data: API.Frontend.Issuing.Cardholders.Create.Request) => Promise<API.Frontend.Issuing.Cardholders.Create.Response>;
|
|
39
39
|
getById: ({ cardholder_id, ...params }: API.Frontend.Issuing.Cardholders.Get.Request) => Promise<API.Frontend.Issuing.Cardholders.Get.Response>;
|
|
40
40
|
delete: ({ cardholder_id, ...params }: API.Frontend.Issuing.Cardholders.Delete.Request) => Promise<API.Frontend.Issuing.Cardholders.Delete.Response>;
|
|
@@ -48,7 +48,7 @@ export declare const frontend: {
|
|
|
48
48
|
};
|
|
49
49
|
};
|
|
50
50
|
subAccounts: {
|
|
51
|
-
getAll: (params
|
|
51
|
+
getAll: (params: API.Frontend.Issuing.SubAccounts.List.Request) => Promise<API.Frontend.Issuing.SubAccounts.List.Response>;
|
|
52
52
|
getById: ({ sub_account_id, }: API.Frontend.Issuing.SubAccounts.Get.Request) => Promise<API.Frontend.Issuing.SubAccounts.Get.Response>;
|
|
53
53
|
create: (data: API.Frontend.Issuing.SubAccounts.Create.Request) => Promise<API.Frontend.Issuing.SubAccounts.Create.Response>;
|
|
54
54
|
transactions: ({ sub_account_id, ...params }: API.Frontend.Issuing.SubAccounts.Transactions.Request) => Promise<API.Frontend.Issuing.SubAccounts.Transactions.Response>;
|
package/dist/api/frontend.js
CHANGED
|
@@ -18,7 +18,7 @@ export const frontend = {
|
|
|
18
18
|
// `status` is a comma-separated list on the wire (`status=ACTIVE,FROZEN`). The spec types it as
|
|
19
19
|
// an array, which axios would default-serialize to `status[]=ACTIVE&status[]=FROZEN` — a form
|
|
20
20
|
// the endpoint does not parse — so join it here and keep the array in the public type.
|
|
21
|
-
list: ({ status, ...params }
|
|
21
|
+
list: ({ status, ...params }) => apiClientV1Frontend.getRequest('/frontend/issuing/cards', {
|
|
22
22
|
params: status?.length ? { ...params, status: status.join(',') } : params,
|
|
23
23
|
}),
|
|
24
24
|
deposit: ({ card_id, ...data }) => apiClientV1Frontend.postRequest(`/frontend/issuing/cards/${card_id}/deposit`, { data }),
|
|
@@ -70,7 +70,7 @@ export const frontend = {
|
|
|
70
70
|
// All write endpoints require the ADMIN role on the wallet; `wallet_id` travels as a query
|
|
71
71
|
// parameter for access validation.
|
|
72
72
|
cardholders: {
|
|
73
|
-
list: (params
|
|
73
|
+
list: (params) => apiClientV1Frontend.getRequest('/frontend/issuing/cardholders', { params }),
|
|
74
74
|
create: (data) => apiClientV1Frontend.postRequest('/frontend/issuing/cardholders', { data }),
|
|
75
75
|
getById: ({ cardholder_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/issuing/cardholders/${cardholder_id}`, { params }),
|
|
76
76
|
delete: ({ cardholder_id, ...params }) => apiClientV1Frontend.deleteRequest(`/frontend/issuing/cardholders/${cardholder_id}`, { params }),
|
|
@@ -111,7 +111,7 @@ export const frontend = {
|
|
|
111
111
|
// Local-first list (`fiat_accounts` + computed balances + the program embed with its
|
|
112
112
|
// cardholder KYC bar). `ids` (comma-separated) makes it a targeted read of specific
|
|
113
113
|
// sub-accounts — prefer that over `getById`, whose shape varies with the vendor.
|
|
114
|
-
getAll: (params
|
|
114
|
+
getAll: (params) => apiClientV1Frontend.getRequest('/frontend/issuing/sub-accounts', { params }),
|
|
115
115
|
getById: ({ sub_account_id, }) => apiClientV1Frontend.getRequest(`/frontend/issuing/sub-accounts/${sub_account_id}`),
|
|
116
116
|
create: (data) => apiClientV1Frontend.postRequest('/frontend/issuing/sub-accounts', { data }),
|
|
117
117
|
transactions: ({ sub_account_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/issuing/sub-accounts/${sub_account_id}/transactions`, { params }),
|
package/dist/api/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { frontend } from './frontend';
|
|
|
7
7
|
import { issuing } from './issuing';
|
|
8
8
|
import { kyc } from './kyc';
|
|
9
9
|
import { list } from './list';
|
|
10
|
+
import { massPayouts } from './mass-payouts';
|
|
10
11
|
import { orders } from './orders';
|
|
11
12
|
import { referrals } from './referrals';
|
|
12
13
|
import { statements } from './statements';
|
|
@@ -26,6 +27,7 @@ type Api = {
|
|
|
26
27
|
issuing: typeof issuing;
|
|
27
28
|
kyc: typeof kyc;
|
|
28
29
|
list: typeof list;
|
|
30
|
+
massPayouts: typeof massPayouts;
|
|
29
31
|
orders: typeof orders;
|
|
30
32
|
referrals: typeof referrals;
|
|
31
33
|
statements: typeof statements;
|
package/dist/api/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import { frontend } from './frontend';
|
|
|
7
7
|
import { issuing } from './issuing';
|
|
8
8
|
import { kyc } from './kyc';
|
|
9
9
|
import { list } from './list';
|
|
10
|
+
import { massPayouts } from './mass-payouts';
|
|
10
11
|
import { orders } from './orders';
|
|
11
12
|
import { referrals } from './referrals';
|
|
12
13
|
import { statements } from './statements';
|
|
@@ -26,6 +27,7 @@ export const squarefi_bff_api_client = {
|
|
|
26
27
|
issuing,
|
|
27
28
|
kyc,
|
|
28
29
|
list,
|
|
30
|
+
massPayouts,
|
|
29
31
|
orders,
|
|
30
32
|
referrals,
|
|
31
33
|
statements,
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { API } from './types/types';
|
|
2
|
+
/**
|
|
3
|
+
* Mass payouts (SFI-1528). Every endpoint is scoped by the source `wallet_id` and requires an
|
|
4
|
+
* administrative role on that wallet. The lifecycle is DRAFT -> (edit/preview) -> submit ->
|
|
5
|
+
* approve; nothing moves until approval, and `templates.*` are reusable recipient lists a draft
|
|
6
|
+
* can be seeded from.
|
|
7
|
+
*
|
|
8
|
+
* `list` / `items` filter by a single status value (not an array), so they need none of the
|
|
9
|
+
* comma-joining the issuing list endpoints do.
|
|
10
|
+
*/
|
|
11
|
+
export declare const massPayouts: {
|
|
12
|
+
list: ({ wallet_id, ...params }: API.MassPayouts.List.Request) => Promise<API.MassPayouts.List.Response>;
|
|
13
|
+
create: ({ wallet_id, ...data }: API.MassPayouts.Create.Request) => Promise<API.MassPayouts.Create.Response>;
|
|
14
|
+
getById: ({ wallet_id, id }: API.MassPayouts.GetById.Request) => Promise<API.MassPayouts.GetById.Response>;
|
|
15
|
+
update: ({ wallet_id, id, ...data }: API.MassPayouts.Update.Request) => Promise<API.MassPayouts.Update.Response>;
|
|
16
|
+
items: ({ wallet_id, id, ...params }: API.MassPayouts.Items.Request) => Promise<API.MassPayouts.Items.Response>;
|
|
17
|
+
preview: ({ wallet_id, id }: API.MassPayouts.Preview.Request) => Promise<API.MassPayouts.Preview.Response>;
|
|
18
|
+
submit: ({ wallet_id, id }: API.MassPayouts.Submit.Request) => Promise<API.MassPayouts.Submit.Response>;
|
|
19
|
+
approve: ({ wallet_id, id }: API.MassPayouts.Approve.Request) => Promise<API.MassPayouts.Approve.Response>;
|
|
20
|
+
cancel: ({ wallet_id, id }: API.MassPayouts.Cancel.Request) => Promise<API.MassPayouts.Cancel.Response>;
|
|
21
|
+
reportCsv: ({ wallet_id, id }: API.MassPayouts.ReportCsv.Request) => Promise<API.MassPayouts.ReportCsv.Response>;
|
|
22
|
+
templates: {
|
|
23
|
+
list: ({ wallet_id, ...params }: API.MassPayouts.Templates.List.Request) => Promise<API.MassPayouts.Templates.List.Response>;
|
|
24
|
+
create: ({ wallet_id, ...data }: API.MassPayouts.Templates.Create.Request) => Promise<API.MassPayouts.Templates.Create.Response>;
|
|
25
|
+
getById: ({ wallet_id, template_id, }: API.MassPayouts.Templates.GetById.Request) => Promise<API.MassPayouts.Templates.GetById.Response>;
|
|
26
|
+
update: ({ wallet_id, template_id, ...data }: API.MassPayouts.Templates.Update.Request) => Promise<API.MassPayouts.Templates.Update.Response>;
|
|
27
|
+
delete: ({ wallet_id, template_id, }: API.MassPayouts.Templates.Delete.Request) => Promise<API.MassPayouts.Templates.Delete.Response>;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { apiClientV1Frontend } from '../utils/apiClientFactory';
|
|
2
|
+
/**
|
|
3
|
+
* Mass payouts (SFI-1528). Every endpoint is scoped by the source `wallet_id` and requires an
|
|
4
|
+
* administrative role on that wallet. The lifecycle is DRAFT -> (edit/preview) -> submit ->
|
|
5
|
+
* approve; nothing moves until approval, and `templates.*` are reusable recipient lists a draft
|
|
6
|
+
* can be seeded from.
|
|
7
|
+
*
|
|
8
|
+
* `list` / `items` filter by a single status value (not an array), so they need none of the
|
|
9
|
+
* comma-joining the issuing list endpoints do.
|
|
10
|
+
*/
|
|
11
|
+
export const massPayouts = {
|
|
12
|
+
list: ({ wallet_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/mass-payouts/${wallet_id}`, { params }),
|
|
13
|
+
create: ({ wallet_id, ...data }) => apiClientV1Frontend.postRequest(`/frontend/mass-payouts/${wallet_id}`, { data }),
|
|
14
|
+
getById: ({ wallet_id, id }) => apiClientV1Frontend.getRequest(`/frontend/mass-payouts/${wallet_id}/${id}`),
|
|
15
|
+
// Draft-only. `items` fully replaces the recipient list; `virtual_account_id: null` clears the
|
|
16
|
+
// source virtual account and `scheduled_at: null` drops the schedule.
|
|
17
|
+
update: ({ wallet_id, id, ...data }) => apiClientV1Frontend.putRequest(`/frontend/mass-payouts/${wallet_id}/${id}`, {
|
|
18
|
+
data,
|
|
19
|
+
}),
|
|
20
|
+
items: ({ wallet_id, id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/mass-payouts/${wallet_id}/${id}/items`, {
|
|
21
|
+
params,
|
|
22
|
+
}),
|
|
23
|
+
preview: ({ wallet_id, id }) => apiClientV1Frontend.getRequest(`/frontend/mass-payouts/${wallet_id}/${id}/preview`),
|
|
24
|
+
submit: ({ wallet_id, id }) => apiClientV1Frontend.postRequest(`/frontend/mass-payouts/${wallet_id}/${id}/submit`),
|
|
25
|
+
approve: ({ wallet_id, id }) => apiClientV1Frontend.postRequest(`/frontend/mass-payouts/${wallet_id}/${id}/approve`),
|
|
26
|
+
cancel: ({ wallet_id, id }) => apiClientV1Frontend.postRequest(`/frontend/mass-payouts/${wallet_id}/${id}/cancel`),
|
|
27
|
+
// `text/csv`, not the JSON envelope — the raw CSV body is resolved as a string. `responseType`
|
|
28
|
+
// is the repo's mechanism for non-JSON answers (see `statements.pdfByWalletUuid`); this one
|
|
29
|
+
// stays on the axios frontend client rather than the native fetch one because the fetch client
|
|
30
|
+
// has no Bearer variant and no 401-refresh, which every other `/frontend/*` call relies on.
|
|
31
|
+
reportCsv: ({ wallet_id, id }) => apiClientV1Frontend.getRequest(`/frontend/mass-payouts/${wallet_id}/${id}/report.csv`, { responseType: 'text' }),
|
|
32
|
+
templates: {
|
|
33
|
+
list: ({ wallet_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/mass-payouts/${wallet_id}/templates`, { params }),
|
|
34
|
+
create: ({ wallet_id, ...data }) => apiClientV1Frontend.postRequest(`/frontend/mass-payouts/${wallet_id}/templates`, { data }),
|
|
35
|
+
getById: ({ wallet_id, template_id, }) => apiClientV1Frontend.getRequest(`/frontend/mass-payouts/${wallet_id}/templates/${template_id}`),
|
|
36
|
+
// `items` fully replaces the row list; `virtual_account_id: null` clears the source account.
|
|
37
|
+
update: ({ wallet_id, template_id, ...data }) => apiClientV1Frontend.putRequest(`/frontend/mass-payouts/${wallet_id}/templates/${template_id}`, { data }),
|
|
38
|
+
delete: ({ wallet_id, template_id, }) => apiClientV1Frontend.deleteRequest(`/frontend/mass-payouts/${wallet_id}/templates/${template_id}`),
|
|
39
|
+
},
|
|
40
|
+
};
|
|
@@ -1963,7 +1963,8 @@ export interface paths {
|
|
|
1963
1963
|
};
|
|
1964
1964
|
};
|
|
1965
1965
|
};
|
|
1966
|
-
/** @description Bad Request
|
|
1966
|
+
/** @description Bad Request — 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.
|
|
1967
|
+
* */
|
|
1967
1968
|
400: {
|
|
1968
1969
|
headers: {
|
|
1969
1970
|
[name: string]: unknown;
|
|
@@ -2009,6 +2010,16 @@ export interface paths {
|
|
|
2009
2010
|
"application/json": components["schemas"]["ApiErrorResponse"];
|
|
2010
2011
|
};
|
|
2011
2012
|
};
|
|
2013
|
+
/** @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.
|
|
2014
|
+
* */
|
|
2015
|
+
502: {
|
|
2016
|
+
headers: {
|
|
2017
|
+
[name: string]: unknown;
|
|
2018
|
+
};
|
|
2019
|
+
content: {
|
|
2020
|
+
"application/json": components["schemas"]["ApiErrorResponse"];
|
|
2021
|
+
};
|
|
2022
|
+
};
|
|
2012
2023
|
};
|
|
2013
2024
|
};
|
|
2014
2025
|
delete?: never;
|
|
@@ -2155,7 +2166,120 @@ export interface paths {
|
|
|
2155
2166
|
};
|
|
2156
2167
|
options?: never;
|
|
2157
2168
|
head?: never;
|
|
2158
|
-
|
|
2169
|
+
/**
|
|
2170
|
+
* Update cardholder
|
|
2171
|
+
* @description Updates cardholder information (local row + vendor propagation of personal fields).
|
|
2172
|
+
* Same contract as `PATCH /frontend/issuing/cardholders/{cardholder_id}`.
|
|
2173
|
+
*
|
|
2174
|
+
* **Authentication**: x-api-key header required
|
|
2175
|
+
*
|
|
2176
|
+
* **Access Control**: Cardholder must belong to the authenticated wallet
|
|
2177
|
+
*
|
|
2178
|
+
*/
|
|
2179
|
+
patch: {
|
|
2180
|
+
parameters: {
|
|
2181
|
+
query?: {
|
|
2182
|
+
/** @description Wallet ID (required for non-wallet-bound API keys) */
|
|
2183
|
+
wallet_id?: string;
|
|
2184
|
+
};
|
|
2185
|
+
header?: never;
|
|
2186
|
+
path: {
|
|
2187
|
+
/** @description The ID of the cardholder to update */
|
|
2188
|
+
cardholder_id: string;
|
|
2189
|
+
};
|
|
2190
|
+
cookie?: never;
|
|
2191
|
+
};
|
|
2192
|
+
requestBody: {
|
|
2193
|
+
content: {
|
|
2194
|
+
"application/json": {
|
|
2195
|
+
/** @description Cardholder's first name */
|
|
2196
|
+
first_name?: string;
|
|
2197
|
+
/** @description Cardholder's last name */
|
|
2198
|
+
last_name?: string;
|
|
2199
|
+
/**
|
|
2200
|
+
* Format: email
|
|
2201
|
+
* @description Cardholder's email address
|
|
2202
|
+
*/
|
|
2203
|
+
email?: string;
|
|
2204
|
+
/** @description Cardholder's phone number */
|
|
2205
|
+
phone?: string;
|
|
2206
|
+
/**
|
|
2207
|
+
* @description Cardholder's nationality as ISO 3166-1 alpha-3 country code
|
|
2208
|
+
* @example USA
|
|
2209
|
+
*/
|
|
2210
|
+
nationality?: string;
|
|
2211
|
+
/** @enum {string} */
|
|
2212
|
+
gender?: "M" | "F";
|
|
2213
|
+
/** @enum {string} */
|
|
2214
|
+
cardholder_relationship?: "EMPLOYEE" | "CONTRACTOR";
|
|
2215
|
+
/** @enum {string} */
|
|
2216
|
+
gov_id_type?: "passport" | "id_card" | "driving_license" | "residence_permit_eu" | "residence_permit_ae" | "id_card_cn" | "id_card_hk";
|
|
2217
|
+
/** @description Identity document number (passport / driving licence / national ID). */
|
|
2218
|
+
gov_id_number?: string;
|
|
2219
|
+
/** @description 2-3 letter uppercase country code */
|
|
2220
|
+
gov_id_country?: string;
|
|
2221
|
+
/** Format: date */
|
|
2222
|
+
gov_id_issuance_date?: string;
|
|
2223
|
+
/** Format: date */
|
|
2224
|
+
gov_id_expiration_date?: string;
|
|
2225
|
+
/** @description Tax identifier (USA + Interlace CONSUMER: SSN, 9 digits or XXX-XX-XXXX) */
|
|
2226
|
+
tax_identification_number?: string;
|
|
2227
|
+
address?: {
|
|
2228
|
+
line1?: string;
|
|
2229
|
+
line2?: string;
|
|
2230
|
+
city?: string;
|
|
2231
|
+
state?: string;
|
|
2232
|
+
postal_code?: string;
|
|
2233
|
+
country?: string;
|
|
2234
|
+
};
|
|
2235
|
+
};
|
|
2236
|
+
};
|
|
2237
|
+
};
|
|
2238
|
+
responses: {
|
|
2239
|
+
/** @description Cardholder updated successfully */
|
|
2240
|
+
200: {
|
|
2241
|
+
headers: {
|
|
2242
|
+
[name: string]: unknown;
|
|
2243
|
+
};
|
|
2244
|
+
content: {
|
|
2245
|
+
"application/json": {
|
|
2246
|
+
/** @example true */
|
|
2247
|
+
success?: boolean;
|
|
2248
|
+
data?: components["schemas"]["Cardholder"];
|
|
2249
|
+
/** @example Cardholder updated successfully */
|
|
2250
|
+
message?: string;
|
|
2251
|
+
};
|
|
2252
|
+
};
|
|
2253
|
+
};
|
|
2254
|
+
/** @description Invalid request parameters */
|
|
2255
|
+
400: {
|
|
2256
|
+
headers: {
|
|
2257
|
+
[name: string]: unknown;
|
|
2258
|
+
};
|
|
2259
|
+
content: {
|
|
2260
|
+
"application/json": components["schemas"]["ApiErrorResponse"];
|
|
2261
|
+
};
|
|
2262
|
+
};
|
|
2263
|
+
/** @description Access denied to this cardholder */
|
|
2264
|
+
403: {
|
|
2265
|
+
headers: {
|
|
2266
|
+
[name: string]: unknown;
|
|
2267
|
+
};
|
|
2268
|
+
content: {
|
|
2269
|
+
"application/json": components["schemas"]["ApiErrorResponse"];
|
|
2270
|
+
};
|
|
2271
|
+
};
|
|
2272
|
+
/** @description Cardholder not found */
|
|
2273
|
+
404: {
|
|
2274
|
+
headers: {
|
|
2275
|
+
[name: string]: unknown;
|
|
2276
|
+
};
|
|
2277
|
+
content: {
|
|
2278
|
+
"application/json": components["schemas"]["ApiErrorResponse"];
|
|
2279
|
+
};
|
|
2280
|
+
};
|
|
2281
|
+
};
|
|
2282
|
+
};
|
|
2159
2283
|
trace?: never;
|
|
2160
2284
|
};
|
|
2161
2285
|
"/api/issuing/cardholders/{cardholder_id}/documents": {
|
|
@@ -4518,7 +4642,7 @@ export interface paths {
|
|
|
4518
4642
|
};
|
|
4519
4643
|
};
|
|
4520
4644
|
};
|
|
4521
|
-
/** @description Validation error
|
|
4645
|
+
/** @description Validation error — invalid body, pair disabled by the exchange config, or calculated amount too small. Balance is checked only at approve. */
|
|
4522
4646
|
400: {
|
|
4523
4647
|
headers: {
|
|
4524
4648
|
[name: string]: unknown;
|
|
@@ -4774,7 +4898,7 @@ export interface paths {
|
|
|
4774
4898
|
};
|
|
4775
4899
|
/**
|
|
4776
4900
|
* Get order
|
|
4777
|
-
* @description Retrieves a specific order by its
|
|
4901
|
+
* @description Retrieves a specific order by its `id` (UUID; equal to `order_uuid` for orders created by the current flow).
|
|
4778
4902
|
*
|
|
4779
4903
|
* **Authentication**: x-api-key header required
|
|
4780
4904
|
*
|
|
@@ -4784,7 +4908,7 @@ export interface paths {
|
|
|
4784
4908
|
query?: never;
|
|
4785
4909
|
header?: never;
|
|
4786
4910
|
path: {
|
|
4787
|
-
order_id:
|
|
4911
|
+
order_id: string;
|
|
4788
4912
|
};
|
|
4789
4913
|
cookie?: never;
|
|
4790
4914
|
};
|
|
@@ -4835,8 +4959,10 @@ export interface paths {
|
|
|
4835
4959
|
* debits the funds (transaction written as `complete`) and triggers the
|
|
4836
4960
|
* order execution pipeline. Exchange orders (EXCHANGE_OMNI) and internal
|
|
4837
4961
|
* transfers (TRANSFER_INTERNAL / OMNIBUS_INTERNAL_TRANSFER) settle
|
|
4838
|
-
* synchronously and land in COMPLETE. An insufficient balance
|
|
4839
|
-
*
|
|
4962
|
+
* synchronously and land in COMPLETE. An insufficient balance answers
|
|
4963
|
+
* 400 `INSUFFICIENT_FUNDS` and releases the order back to NEW; FAILED is
|
|
4964
|
+
* reached only when a step after the debit fails. Only orders with
|
|
4965
|
+
* status NEW can be approved. Orders
|
|
4840
4966
|
* created with `scheduled_at` move to EXPECTED instead — no funds are
|
|
4841
4967
|
* debited until execution at the requested time.
|
|
4842
4968
|
*
|
|
@@ -4853,7 +4979,7 @@ export interface paths {
|
|
|
4853
4979
|
};
|
|
4854
4980
|
requestBody?: never;
|
|
4855
4981
|
responses: {
|
|
4856
|
-
/** @description Order approved
|
|
4982
|
+
/** @description Order approved — PROCESSING for workflow rails, COMPLETE for exchange / internal transfers, EXPECTED for scheduled orders */
|
|
4857
4983
|
200: {
|
|
4858
4984
|
headers: {
|
|
4859
4985
|
[name: string]: unknown;
|
|
@@ -4863,11 +4989,23 @@ export interface paths {
|
|
|
4863
4989
|
/** @example true */
|
|
4864
4990
|
success?: boolean;
|
|
4865
4991
|
data?: components["schemas"]["Order"];
|
|
4866
|
-
/** @example Order approved and processing started */
|
|
4867
|
-
message?: string;
|
|
4868
4992
|
};
|
|
4869
4993
|
};
|
|
4870
4994
|
};
|
|
4995
|
+
/** @description Insufficient funds (`INSUFFICIENT_FUNDS` — the order is released back to NEW) or validation error */
|
|
4996
|
+
400: {
|
|
4997
|
+
headers: {
|
|
4998
|
+
[name: string]: unknown;
|
|
4999
|
+
};
|
|
5000
|
+
content?: never;
|
|
5001
|
+
};
|
|
5002
|
+
/** @description Order does not belong to the API key's wallet */
|
|
5003
|
+
403: {
|
|
5004
|
+
headers: {
|
|
5005
|
+
[name: string]: unknown;
|
|
5006
|
+
};
|
|
5007
|
+
content?: never;
|
|
5008
|
+
};
|
|
4871
5009
|
/** @description Order not found */
|
|
4872
5010
|
404: {
|
|
4873
5011
|
headers: {
|
|
@@ -4875,7 +5013,7 @@ export interface paths {
|
|
|
4875
5013
|
};
|
|
4876
5014
|
content?: never;
|
|
4877
5015
|
};
|
|
4878
|
-
/** @description
|
|
5016
|
+
/** @description Order is not in an approvable state (`INVALID_STATE`), or another lifecycle call holds the order lock (`OPERATION_IN_PROGRESS`) */
|
|
4879
5017
|
409: {
|
|
4880
5018
|
headers: {
|
|
4881
5019
|
[name: string]: unknown;
|
|
@@ -4885,7 +5023,7 @@ export interface paths {
|
|
|
4885
5023
|
/** @example false */
|
|
4886
5024
|
success?: boolean;
|
|
4887
5025
|
error?: {
|
|
4888
|
-
/** @example
|
|
5026
|
+
/** @example INVALID_STATE */
|
|
4889
5027
|
code?: string;
|
|
4890
5028
|
message?: string;
|
|
4891
5029
|
};
|
|
@@ -4952,11 +5090,16 @@ export interface paths {
|
|
|
4952
5090
|
/** @example true */
|
|
4953
5091
|
success?: boolean;
|
|
4954
5092
|
data?: components["schemas"]["Order"];
|
|
4955
|
-
/** @example Order canceled successfully */
|
|
4956
|
-
message?: string;
|
|
4957
5093
|
};
|
|
4958
5094
|
};
|
|
4959
5095
|
};
|
|
5096
|
+
/** @description Order does not belong to the API key's wallet */
|
|
5097
|
+
403: {
|
|
5098
|
+
headers: {
|
|
5099
|
+
[name: string]: unknown;
|
|
5100
|
+
};
|
|
5101
|
+
content?: never;
|
|
5102
|
+
};
|
|
4960
5103
|
/** @description Order not found */
|
|
4961
5104
|
404: {
|
|
4962
5105
|
headers: {
|
|
@@ -4964,7 +5107,7 @@ export interface paths {
|
|
|
4964
5107
|
};
|
|
4965
5108
|
content?: never;
|
|
4966
5109
|
};
|
|
4967
|
-
/** @description
|
|
5110
|
+
/** @description Order is not in a cancelable state (`INVALID_STATE`), or another lifecycle call holds the order lock (`OPERATION_IN_PROGRESS`) */
|
|
4968
5111
|
409: {
|
|
4969
5112
|
headers: {
|
|
4970
5113
|
[name: string]: unknown;
|
|
@@ -5110,7 +5253,7 @@ export interface paths {
|
|
|
5110
5253
|
/**
|
|
5111
5254
|
* Crypto
|
|
5112
5255
|
* @description Sends crypto from the wallet's omnibus balance to an external blockchain
|
|
5113
|
-
* address
|
|
5256
|
+
* address via a previously-created counterparty
|
|
5114
5257
|
* destination.
|
|
5115
5258
|
*
|
|
5116
5259
|
* Two-phase: the order is created in `NEW` status without touching the
|
|
@@ -5121,7 +5264,7 @@ export interface paths {
|
|
|
5121
5264
|
* only through the internal transfer endpoint.
|
|
5122
5265
|
*
|
|
5123
5266
|
* **Prerequisites:**
|
|
5124
|
-
* - A counterparty destination of type `CRYPTO_EXTERNAL`
|
|
5267
|
+
* - A counterparty destination of type `CRYPTO_EXTERNAL`
|
|
5125
5268
|
* created via `POST /api/counterparty/destinations`.
|
|
5126
5269
|
* - Sufficient balance in `from_currency_id` at approve time on the wallet
|
|
5127
5270
|
* bound to the API key.
|
|
@@ -5214,8 +5357,8 @@ export interface paths {
|
|
|
5214
5357
|
* @description USD domestic Wire offramp. Funds are debited from the wallet's virtual account
|
|
5215
5358
|
* and sent to the bank counterparty destination.
|
|
5216
5359
|
*
|
|
5217
|
-
* `wallet_id` is resolved from the API key. `virtual_account_id`
|
|
5218
|
-
* auto-
|
|
5360
|
+
* `wallet_id` is resolved from the API key. `virtual_account_id` is
|
|
5361
|
+
* required (there is no auto-resolution).
|
|
5219
5362
|
*
|
|
5220
5363
|
*/
|
|
5221
5364
|
post: {
|
|
@@ -5301,8 +5444,8 @@ export interface paths {
|
|
|
5301
5444
|
* ACH
|
|
5302
5445
|
* @description USD ACH offramp. Cheaper than Wire but slower (T+1..T+2 business days).
|
|
5303
5446
|
*
|
|
5304
|
-
* `wallet_id` is resolved from the API key. `virtual_account_id`
|
|
5305
|
-
* auto-
|
|
5447
|
+
* `wallet_id` is resolved from the API key. `virtual_account_id` is
|
|
5448
|
+
* required (there is no auto-resolution).
|
|
5306
5449
|
*
|
|
5307
5450
|
*/
|
|
5308
5451
|
post: {
|
|
@@ -5387,7 +5530,7 @@ export interface paths {
|
|
|
5387
5530
|
/**
|
|
5388
5531
|
* SEPA
|
|
5389
5532
|
* @description EUR SEPA offramp (SEPA / SEPA Instant depending on counterparty support).
|
|
5390
|
-
* The counterparty destination must be of type `
|
|
5533
|
+
* The counterparty destination must be of type `SEPA`.
|
|
5391
5534
|
*
|
|
5392
5535
|
*/
|
|
5393
5536
|
post: {
|
|
@@ -6942,7 +7085,7 @@ export type webhooks = Record<string, never>;
|
|
|
6942
7085
|
export interface components {
|
|
6943
7086
|
schemas: {
|
|
6944
7087
|
/**
|
|
6945
|
-
* @description Order type identifier. Must be one of the active values from the `order_types` table. Examples: `EXCHANGE_OMNI` (omnibus exchange), `
|
|
7088
|
+
* @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.
|
|
6946
7089
|
* @example EXCHANGE_OMNI
|
|
6947
7090
|
* @enum {string}
|
|
6948
7091
|
*/
|
|
@@ -7084,18 +7227,28 @@ export interface components {
|
|
|
7084
7227
|
/** @description Per transaction amount spent */
|
|
7085
7228
|
per_transaction_spent?: number;
|
|
7086
7229
|
};
|
|
7087
|
-
/** @description Sensitive card data */
|
|
7230
|
+
/** @description Sensitive card data, live-fetched from the vendor on every call and never persisted. */
|
|
7088
7231
|
CardSensitiveData: {
|
|
7089
|
-
/**
|
|
7090
|
-
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7232
|
+
/**
|
|
7233
|
+
* @description Full card number
|
|
7234
|
+
* @example 4111111111111111
|
|
7235
|
+
*/
|
|
7236
|
+
card_number: string;
|
|
7237
|
+
/**
|
|
7238
|
+
* @description Card expiration date, `MM/YY`
|
|
7239
|
+
* @example 07/29
|
|
7240
|
+
*/
|
|
7241
|
+
expiry_date: string;
|
|
7242
|
+
/**
|
|
7243
|
+
* @description Card security code
|
|
7244
|
+
* @example 123
|
|
7245
|
+
*/
|
|
7246
|
+
cvv: string;
|
|
7247
|
+
/**
|
|
7248
|
+
* @description 3-D Secure password where the vendor exposes one (Wallester); `null` otherwise.
|
|
7249
|
+
* @example null
|
|
7250
|
+
*/
|
|
7251
|
+
security_code: string | null;
|
|
7099
7252
|
};
|
|
7100
7253
|
/** @description Card transaction */
|
|
7101
7254
|
IssuingTransaction: {
|
|
@@ -7396,7 +7549,7 @@ export interface components {
|
|
|
7396
7549
|
* @description Cumulative KYC level; each level includes the previous one
|
|
7397
7550
|
* @enum {string}
|
|
7398
7551
|
*/
|
|
7399
|
-
level?: "minimal" | "basic" | "full";
|
|
7552
|
+
level?: "minimal" | "basic" | "declared" | "full";
|
|
7400
7553
|
/**
|
|
7401
7554
|
* @description Required field names; address fields are dotted (address.line1). Interlace CONSUMER also lists gov_id_issuance_date and gov_id_expiration_date (ISO YYYY-MM-DD).
|
|
7402
7555
|
* @example [
|
|
@@ -7902,7 +8055,7 @@ export interface components {
|
|
|
7902
8055
|
meta?: Record<string, never> | null;
|
|
7903
8056
|
currency?: components["schemas"]["CurrencyRef"];
|
|
7904
8057
|
};
|
|
7905
|
-
/** @description
|
|
8058
|
+
/** @description Order metadata. List and single-read responses reduce it to the public allowlist; create/approve/cancel responses return the stored meta minus scheduler-internal keys */
|
|
7906
8059
|
OrderMeta: {
|
|
7907
8060
|
/** Format: uuid */
|
|
7908
8061
|
request_id?: string | null;
|
|
@@ -8021,7 +8174,7 @@ export interface components {
|
|
|
8021
8174
|
to_currency_id?: string;
|
|
8022
8175
|
/**
|
|
8023
8176
|
* Format: uuid
|
|
8024
|
-
* @description UUID of a `CRYPTO_EXTERNAL`
|
|
8177
|
+
* @description UUID of a `CRYPTO_EXTERNAL` counterparty destination previously created via `POST /api/counterparty/destinations`.
|
|
8025
8178
|
* @example b2f3d8c1-4a7e-4d22-9c5f-1e6a8d0b2a44
|
|
8026
8179
|
*/
|
|
8027
8180
|
counterparty_destination_id: string;
|
|
@@ -8072,13 +8225,13 @@ export interface components {
|
|
|
8072
8225
|
to_currency_id?: string;
|
|
8073
8226
|
/**
|
|
8074
8227
|
* Format: uuid
|
|
8075
|
-
* @description Virtual account UUID used as the funding source for the off-ramp
|
|
8228
|
+
* @description Virtual account UUID used as the funding source for the off-ramp (required; the order type is resolved from its program).
|
|
8076
8229
|
* @example 11111111-2222-3333-4444-555555555555
|
|
8077
8230
|
*/
|
|
8078
8231
|
virtual_account_id: string;
|
|
8079
8232
|
/**
|
|
8080
8233
|
* Format: uuid
|
|
8081
|
-
* @description Bank counterparty destination UUID created via `POST /api/counterparty/destinations`. The destination type must match the rail (
|
|
8234
|
+
* @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).
|
|
8082
8235
|
* @example b2f3d8c1-4a7e-4d22-9c5f-1e6a8d0b2a44
|
|
8083
8236
|
*/
|
|
8084
8237
|
counterparty_destination_id: string;
|