squarefi-bff-api-module 1.36.23 → 1.36.25
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/orders.d.ts +32 -1
- package/dist/api/orders.js +55 -3
- package/dist/api/types/autogen/apiV1External.types.d.ts +4 -94
- package/dist/api/types/autogen/apiV1Frontend.types.d.ts +37 -5
- package/dist/api/types/autogen/apiV1Legacy.types.d.ts +1 -1
- package/dist/api/types/autogen/apiV1Tenant.types.d.ts +270 -5
- package/dist/api/types/autogen/apiV2.types.d.ts +68 -1006
- package/dist/api/types/types.d.ts +125 -13
- package/package.json +1 -1
package/dist/api/orders.d.ts
CHANGED
|
@@ -17,7 +17,6 @@ export declare const orders: {
|
|
|
17
17
|
WITHDRAW_CARD_SUBACCOUNT: (data: API.Orders.Create.ByOrderType.WITHDRAW_CARD_SUBACCOUNT.Request) => Promise<API.Orders.Create.ByOrderType.WITHDRAW_CARD_SUBACCOUNT.Response>;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
-
setComment: ({ order_id, ...data }: API.Orders.Comment.Request) => Promise<API.Orders.Comment.Response>;
|
|
21
20
|
v2: {
|
|
22
21
|
calc: ({ signal, ...params }: API.Orders.V2.Calc.Request) => Promise<API.Orders.V2.Calc.Response>;
|
|
23
22
|
orderTypes: {
|
|
@@ -59,4 +58,36 @@ export declare const orders: {
|
|
|
59
58
|
};
|
|
60
59
|
getById: ({ order_uuid }: API.Orders.V2.GetById.Request) => Promise<API.Orders.V2.GetById.Response>;
|
|
61
60
|
};
|
|
61
|
+
frontend: {
|
|
62
|
+
create: {
|
|
63
|
+
withdrawal: {
|
|
64
|
+
crypto: (data: API.Orders.Frontend.Create.Withdrawal.Crypto.Request) => Promise<API.Orders.Frontend.Create.Withdrawal.Crypto.Response>;
|
|
65
|
+
internal: (data: API.Orders.Frontend.Create.Withdrawal.Internal.Request) => Promise<API.Orders.Frontend.Create.Withdrawal.Internal.Response>;
|
|
66
|
+
wire: (data: API.Orders.Frontend.Create.Withdrawal.Wire.Request) => Promise<API.Orders.Frontend.Create.Withdrawal.Wire.Response>;
|
|
67
|
+
ach: (data: API.Orders.Frontend.Create.Withdrawal.Ach.Request) => Promise<API.Orders.Frontend.Create.Withdrawal.Ach.Response>;
|
|
68
|
+
sepa: (data: API.Orders.Frontend.Create.Withdrawal.Sepa.Request) => Promise<API.Orders.Frontend.Create.Withdrawal.Sepa.Response>;
|
|
69
|
+
swift: (data: API.Orders.Frontend.Create.Withdrawal.Swift.Request) => Promise<API.Orders.Frontend.Create.Withdrawal.Swift.Response>;
|
|
70
|
+
chaps: (data: API.Orders.Frontend.Create.Withdrawal.Chaps.Request) => Promise<API.Orders.Frontend.Create.Withdrawal.Chaps.Response>;
|
|
71
|
+
fps: (data: API.Orders.Frontend.Create.Withdrawal.Fps.Request) => Promise<API.Orders.Frontend.Create.Withdrawal.Fps.Response>;
|
|
72
|
+
card: (data: API.Orders.Frontend.Create.Withdrawal.Card.Request) => Promise<API.Orders.Frontend.Create.Withdrawal.Card.Response>;
|
|
73
|
+
};
|
|
74
|
+
exchange: (data: API.Orders.Frontend.Create.Exchange.Request) => Promise<API.Orders.Frontend.Create.Exchange.Response>;
|
|
75
|
+
};
|
|
76
|
+
approve: ({ order_id, ...data }: API.Orders.Frontend.Approve.Request) => Promise<API.Orders.Frontend.Approve.Response>;
|
|
77
|
+
cancel: ({ order_id, ...data }: API.Orders.Frontend.Cancel.Request) => Promise<API.Orders.Frontend.Cancel.Response>;
|
|
78
|
+
setComment: ({ order_id, ...data }: API.Orders.Frontend.Comment.Request) => Promise<API.Orders.Frontend.Comment.Response>;
|
|
79
|
+
calc: ({ signal, ...params }: API.Orders.Frontend.Calc.Request) => Promise<API.Orders.Frontend.Calc.Response>;
|
|
80
|
+
getById: ({ order_id }: API.Orders.Frontend.GetById.Request) => Promise<API.Orders.Frontend.GetById.Response>;
|
|
81
|
+
getByUuid: ({ order_uuid, }: API.Orders.Frontend.GetByUuid.Request) => Promise<API.Orders.Frontend.GetByUuid.Response>;
|
|
82
|
+
list: {
|
|
83
|
+
byWallet: ({ wallet_uuid, filters, ...props }: API.Orders.Frontend.List.ByWallet.Request) => Promise<API.Orders.Frontend.List.ByWallet.Response>;
|
|
84
|
+
csv: {
|
|
85
|
+
getByWalletUuid: ({ wallet_uuid, filters, ...props }: API.Orders.Frontend.List.Csv.Request) => Promise<API.Orders.Frontend.List.Csv.Response>;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
types: {
|
|
89
|
+
list: () => Promise<API.Orders.Frontend.Types.List.Response>;
|
|
90
|
+
getById: ({ id, }: API.Orders.Frontend.Types.GetById.Request) => Promise<API.Orders.Frontend.Types.GetById.Response>;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
62
93
|
};
|
package/dist/api/orders.js
CHANGED
|
@@ -33,9 +33,6 @@ export const orders = {
|
|
|
33
33
|
[OrderType.WITHDRAW_CARD_SUBACCOUNT]: (data) => apiClientV1.postRequest('/orders/WITHDRAW_CARD_SUBACCOUNT', { data }),
|
|
34
34
|
},
|
|
35
35
|
},
|
|
36
|
-
setComment: ({ order_id, ...data }) => apiClientV1Frontend.putRequest(`/frontend/orders/${order_id}/comment`, {
|
|
37
|
-
data,
|
|
38
|
-
}),
|
|
39
36
|
v2: {
|
|
40
37
|
calc: ({ signal, ...params }) => apiClientV1.getRequest('/v2/orders/calc', {
|
|
41
38
|
params,
|
|
@@ -110,4 +107,59 @@ export const orders = {
|
|
|
110
107
|
},
|
|
111
108
|
getById: ({ order_uuid }) => apiClientV1.getRequest(`/v2/orders/id/${order_uuid}`),
|
|
112
109
|
},
|
|
110
|
+
frontend: {
|
|
111
|
+
create: {
|
|
112
|
+
withdrawal: {
|
|
113
|
+
crypto: (data) => apiClientV1Frontend.postRequest('/frontend/orders/withdrawal/crypto', { data }),
|
|
114
|
+
internal: (data) => apiClientV1Frontend.postRequest('/frontend/orders/withdrawal/internal', { data }),
|
|
115
|
+
wire: (data) => apiClientV1Frontend.postRequest('/frontend/orders/withdrawal/wire', { data }),
|
|
116
|
+
ach: (data) => apiClientV1Frontend.postRequest('/frontend/orders/withdrawal/ach', { data }),
|
|
117
|
+
sepa: (data) => apiClientV1Frontend.postRequest('/frontend/orders/withdrawal/sepa', { data }),
|
|
118
|
+
swift: (data) => apiClientV1Frontend.postRequest('/frontend/orders/withdrawal/swift', { data }),
|
|
119
|
+
chaps: (data) => apiClientV1Frontend.postRequest('/frontend/orders/withdrawal/chaps', { data }),
|
|
120
|
+
fps: (data) => apiClientV1Frontend.postRequest('/frontend/orders/withdrawal/fps', { data }),
|
|
121
|
+
card: (data) => apiClientV1Frontend.postRequest('/frontend/orders/withdrawal/card', { data }),
|
|
122
|
+
},
|
|
123
|
+
exchange: (data) => apiClientV1Frontend.postRequest('/frontend/orders/exchange', {
|
|
124
|
+
data,
|
|
125
|
+
}),
|
|
126
|
+
},
|
|
127
|
+
approve: ({ order_id, ...data }) => apiClientV1Frontend.postRequest(`/frontend/orders/${order_id}/approve`, {
|
|
128
|
+
data,
|
|
129
|
+
}),
|
|
130
|
+
cancel: ({ order_id, ...data }) => apiClientV1Frontend.postRequest(`/frontend/orders/${order_id}/cancel`, {
|
|
131
|
+
data,
|
|
132
|
+
}),
|
|
133
|
+
setComment: ({ order_id, ...data }) => apiClientV1Frontend.putRequest(`/frontend/orders/${order_id}/comment`, {
|
|
134
|
+
data,
|
|
135
|
+
}),
|
|
136
|
+
calc: ({ signal, ...params }) => apiClientV1Frontend.getRequest('/frontend/orders/calc', {
|
|
137
|
+
params,
|
|
138
|
+
signal,
|
|
139
|
+
}),
|
|
140
|
+
getById: ({ order_id }) => apiClientV1Frontend.getRequest(`/frontend/orders/id/${order_id}`),
|
|
141
|
+
getByUuid: ({ order_uuid, }) => apiClientV1Frontend.getRequest(`/frontend/orders/uuid/${order_uuid}`),
|
|
142
|
+
list: {
|
|
143
|
+
byWallet: ({ wallet_uuid, filters, ...props }) => {
|
|
144
|
+
const params = {
|
|
145
|
+
...props,
|
|
146
|
+
filters: Array.isArray(filters) ? JSON.stringify(filters) : filters,
|
|
147
|
+
};
|
|
148
|
+
return apiClientV1Frontend.getRequest(`/frontend/orders/wallet/${wallet_uuid}`, { params });
|
|
149
|
+
},
|
|
150
|
+
csv: {
|
|
151
|
+
getByWalletUuid: ({ wallet_uuid, filters, ...props }) => {
|
|
152
|
+
const params = {
|
|
153
|
+
...props,
|
|
154
|
+
filters: Array.isArray(filters) ? JSON.stringify(filters) : filters,
|
|
155
|
+
};
|
|
156
|
+
return apiClientV1Frontend.getRequest(`/frontend/orders/wallet/${wallet_uuid}/csv`, { params });
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
types: {
|
|
161
|
+
list: () => apiClientV1Frontend.getRequest('/frontend/orders/types'),
|
|
162
|
+
getById: ({ id, }) => apiClientV1Frontend.getRequest(`/frontend/orders/types/${id}`),
|
|
163
|
+
},
|
|
164
|
+
},
|
|
113
165
|
};
|
|
@@ -73,96 +73,6 @@ export interface paths {
|
|
|
73
73
|
patch?: never;
|
|
74
74
|
trace?: never;
|
|
75
75
|
};
|
|
76
|
-
"/api/access/info": {
|
|
77
|
-
parameters: {
|
|
78
|
-
query?: never;
|
|
79
|
-
header?: never;
|
|
80
|
-
path?: never;
|
|
81
|
-
cookie?: never;
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* Get API key
|
|
85
|
-
* @description Returns information about the currently authenticated API key.
|
|
86
|
-
*
|
|
87
|
-
* **Authentication**: x-api-key header required
|
|
88
|
-
*
|
|
89
|
-
*/
|
|
90
|
-
get: {
|
|
91
|
-
parameters: {
|
|
92
|
-
query?: never;
|
|
93
|
-
header?: never;
|
|
94
|
-
path?: never;
|
|
95
|
-
cookie?: never;
|
|
96
|
-
};
|
|
97
|
-
requestBody?: never;
|
|
98
|
-
responses: {
|
|
99
|
-
/** @description API key information retrieved successfully */
|
|
100
|
-
200: {
|
|
101
|
-
headers: {
|
|
102
|
-
[name: string]: unknown;
|
|
103
|
-
};
|
|
104
|
-
content: {
|
|
105
|
-
"application/json": {
|
|
106
|
-
/** @example true */
|
|
107
|
-
success?: boolean;
|
|
108
|
-
data?: {
|
|
109
|
-
key?: {
|
|
110
|
-
/** Format: uuid */
|
|
111
|
-
id?: string;
|
|
112
|
-
name?: string;
|
|
113
|
-
/** @enum {string} */
|
|
114
|
-
role?: "READ_ONLY" | "DEVELOPER" | "PRODUCTION" | "OWNER";
|
|
115
|
-
/** Format: uuid */
|
|
116
|
-
wallet_id?: string;
|
|
117
|
-
/** Format: uuid */
|
|
118
|
-
user_id?: string;
|
|
119
|
-
is_enabled?: boolean;
|
|
120
|
-
/** Format: date-time */
|
|
121
|
-
created_at?: string;
|
|
122
|
-
/** Format: date-time */
|
|
123
|
-
updated_at?: string;
|
|
124
|
-
};
|
|
125
|
-
wallet?: {
|
|
126
|
-
/** Format: uuid */
|
|
127
|
-
uuid?: string;
|
|
128
|
-
/** Format: uuid */
|
|
129
|
-
user_id?: string;
|
|
130
|
-
/** Format: uuid */
|
|
131
|
-
tenant_id?: string;
|
|
132
|
-
/** Format: date-time */
|
|
133
|
-
created_at?: string;
|
|
134
|
-
};
|
|
135
|
-
/** @description Detailed permissions based on role */
|
|
136
|
-
permissions?: {
|
|
137
|
-
can_read?: boolean;
|
|
138
|
-
can_write?: boolean;
|
|
139
|
-
can_create_orders?: boolean;
|
|
140
|
-
can_manage_cards?: boolean;
|
|
141
|
-
can_manage_keys?: boolean;
|
|
142
|
-
};
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
/** @description Invalid or missing API key */
|
|
148
|
-
401: {
|
|
149
|
-
headers: {
|
|
150
|
-
[name: string]: unknown;
|
|
151
|
-
};
|
|
152
|
-
content: {
|
|
153
|
-
"application/json": components["schemas"]["ApiErrorResponse"];
|
|
154
|
-
};
|
|
155
|
-
};
|
|
156
|
-
};
|
|
157
|
-
};
|
|
158
|
-
put?: never;
|
|
159
|
-
post?: never;
|
|
160
|
-
delete?: never;
|
|
161
|
-
options?: never;
|
|
162
|
-
head?: never;
|
|
163
|
-
patch?: never;
|
|
164
|
-
trace?: never;
|
|
165
|
-
};
|
|
166
76
|
"/api/access/webhooks": {
|
|
167
77
|
parameters: {
|
|
168
78
|
query?: never;
|
|
@@ -4308,8 +4218,8 @@ export interface paths {
|
|
|
4308
4218
|
put?: never;
|
|
4309
4219
|
/**
|
|
4310
4220
|
* Approve order
|
|
4311
|
-
* @description Transitions the order from
|
|
4312
|
-
* Only orders with status
|
|
4221
|
+
* @description Transitions the order from NEW to PROCESSING and triggers the order execution pipeline.
|
|
4222
|
+
* Only orders with status NEW can be approved.
|
|
4313
4223
|
*
|
|
4314
4224
|
*/
|
|
4315
4225
|
post: {
|
|
@@ -4346,7 +4256,7 @@ export interface paths {
|
|
|
4346
4256
|
};
|
|
4347
4257
|
content?: never;
|
|
4348
4258
|
};
|
|
4349
|
-
/** @description Invalid status transition (order is not in
|
|
4259
|
+
/** @description Invalid status transition (order is not in NEW status) */
|
|
4350
4260
|
409: {
|
|
4351
4261
|
headers: {
|
|
4352
4262
|
[name: string]: unknown;
|
|
@@ -4382,7 +4292,7 @@ export interface paths {
|
|
|
4382
4292
|
put?: never;
|
|
4383
4293
|
/**
|
|
4384
4294
|
* Cancel order
|
|
4385
|
-
* @description Cancels an order. Orders in
|
|
4295
|
+
* @description Cancels an order. Orders in NEW or FAILED status can be canceled.
|
|
4386
4296
|
* Optionally provide a cancellation reason.
|
|
4387
4297
|
*
|
|
4388
4298
|
*/
|
|
@@ -5694,7 +5694,7 @@ export interface paths {
|
|
|
5694
5694
|
put?: never;
|
|
5695
5695
|
/**
|
|
5696
5696
|
* Approve an order
|
|
5697
|
-
* @description Moves a
|
|
5697
|
+
* @description Moves a NEW order to PROCESSING, triggering its workflow. Validates the order's request_id via OTP.
|
|
5698
5698
|
*/
|
|
5699
5699
|
post: {
|
|
5700
5700
|
parameters: {
|
|
@@ -5755,7 +5755,7 @@ export interface paths {
|
|
|
5755
5755
|
put?: never;
|
|
5756
5756
|
/**
|
|
5757
5757
|
* Cancel an order
|
|
5758
|
-
* @description Cancels a
|
|
5758
|
+
* @description Cancels a NEW/FAILED order, cancels its workflow run, and refunds the blocked funds.
|
|
5759
5759
|
*/
|
|
5760
5760
|
post: {
|
|
5761
5761
|
parameters: {
|
|
@@ -6085,7 +6085,14 @@ export interface paths {
|
|
|
6085
6085
|
headers: {
|
|
6086
6086
|
[name: string]: unknown;
|
|
6087
6087
|
};
|
|
6088
|
-
content
|
|
6088
|
+
content: {
|
|
6089
|
+
"application/json": {
|
|
6090
|
+
/** @example true */
|
|
6091
|
+
success: boolean;
|
|
6092
|
+
data: components["schemas"]["Order"][];
|
|
6093
|
+
pagination: components["schemas"]["PaginationResponse"];
|
|
6094
|
+
};
|
|
6095
|
+
};
|
|
6089
6096
|
};
|
|
6090
6097
|
/** @description Access denied to wallet */
|
|
6091
6098
|
403: {
|
|
@@ -6194,7 +6201,13 @@ export interface paths {
|
|
|
6194
6201
|
headers: {
|
|
6195
6202
|
[name: string]: unknown;
|
|
6196
6203
|
};
|
|
6197
|
-
content
|
|
6204
|
+
content: {
|
|
6205
|
+
"application/json": {
|
|
6206
|
+
/** @example true */
|
|
6207
|
+
success: boolean;
|
|
6208
|
+
data: components["schemas"]["OrderDetail"];
|
|
6209
|
+
};
|
|
6210
|
+
};
|
|
6198
6211
|
};
|
|
6199
6212
|
/** @description Order not found */
|
|
6200
6213
|
404: {
|
|
@@ -6243,7 +6256,13 @@ export interface paths {
|
|
|
6243
6256
|
headers: {
|
|
6244
6257
|
[name: string]: unknown;
|
|
6245
6258
|
};
|
|
6246
|
-
content
|
|
6259
|
+
content: {
|
|
6260
|
+
"application/json": {
|
|
6261
|
+
/** @example true */
|
|
6262
|
+
success: boolean;
|
|
6263
|
+
data: components["schemas"]["OrderDetail"];
|
|
6264
|
+
};
|
|
6265
|
+
};
|
|
6247
6266
|
};
|
|
6248
6267
|
/** @description Order not found */
|
|
6249
6268
|
404: {
|
|
@@ -10662,6 +10681,19 @@ export interface components {
|
|
|
10662
10681
|
/** Format: date-time */
|
|
10663
10682
|
updated_at?: string | null;
|
|
10664
10683
|
};
|
|
10684
|
+
/** @description Single-order read shape (GET /orders/id/{order_id} and GET /orders/uuid/{order_uuid}) — the base Order plus context objects hydrated from its `meta` references. */
|
|
10685
|
+
OrderDetail: components["schemas"]["Order"] & {
|
|
10686
|
+
/** @description Virtual account referenced by the order (fiat off-ramp/on-ramp), hydrated with currency and vendor details. Absent/null when the order has no `meta.virtual_account_id`. */
|
|
10687
|
+
virtual_account?: components["schemas"]["VirtualAccount"] | null;
|
|
10688
|
+
/** @description Raw `counterparty_destinations` row with embedded `counterparty_account`, `external_banking_data` and `external_crypto_data`. Present when the order has a `meta.counterparty_destination_id`; absent otherwise. */
|
|
10689
|
+
counterparty_destination?: {
|
|
10690
|
+
[key: string]: unknown;
|
|
10691
|
+
} | null;
|
|
10692
|
+
/** @description Documents attached to the order; empty array when none (or when document loading failed). */
|
|
10693
|
+
documents?: {
|
|
10694
|
+
[key: string]: unknown;
|
|
10695
|
+
}[];
|
|
10696
|
+
};
|
|
10665
10697
|
FrontendCryptoTransferRequest: {
|
|
10666
10698
|
/**
|
|
10667
10699
|
* Format: uuid
|
|
@@ -8602,7 +8602,7 @@ export interface components {
|
|
|
8602
8602
|
* @description Payment method associated with this order type
|
|
8603
8603
|
* @enum {string|null}
|
|
8604
8604
|
*/
|
|
8605
|
-
payment_method?: "FEDWIRE" | "ACH" | "RTP" | "SWIFT" | "SEPA" | "CHAPS" | "FPS" | "CRYPTO_EXTERNAL" | "CRYPTO_INTERNAL" | null;
|
|
8605
|
+
payment_method?: "FEDWIRE" | "ACH" | "RTP" | "SWIFT" | "SEPA" | "CHAPS" | "FPS" | "CRYPTO_EXTERNAL" | "CRYPTO_INTERNAL" | "CARD" | null;
|
|
8606
8606
|
/**
|
|
8607
8607
|
* Format: uuid
|
|
8608
8608
|
* @description Associated KYC rail configuration ID
|
|
@@ -1798,7 +1798,12 @@ export interface paths {
|
|
|
1798
1798
|
};
|
|
1799
1799
|
/**
|
|
1800
1800
|
* Initialize Persona KYC session for a wallet
|
|
1801
|
-
* @
|
|
1801
|
+
* @deprecated
|
|
1802
|
+
* @description **Deprecated** — use the provider-agnostic
|
|
1803
|
+
* `POST /admin/kyc_verification/{wallet_id}/init` instead. This endpoint is
|
|
1804
|
+
* Persona-only and calls a deprecated upstream method.
|
|
1805
|
+
*
|
|
1806
|
+
* Creates a Persona inquiry via the Auth API for the specified wallet
|
|
1802
1807
|
* and returns the hosted Persona URL.
|
|
1803
1808
|
*
|
|
1804
1809
|
*/
|
|
@@ -1908,7 +1913,12 @@ export interface paths {
|
|
|
1908
1913
|
};
|
|
1909
1914
|
/**
|
|
1910
1915
|
* Resume Persona KYC session for a wallet
|
|
1911
|
-
* @
|
|
1916
|
+
* @deprecated
|
|
1917
|
+
* @description **Deprecated** — use the provider-agnostic
|
|
1918
|
+
* `POST /admin/kyc_verification/{wallet_id}/resume` instead. This endpoint is
|
|
1919
|
+
* Persona-only and calls a deprecated upstream method.
|
|
1920
|
+
*
|
|
1921
|
+
* Resumes an existing Persona inquiry via the Auth API for the specified wallet
|
|
1912
1922
|
* and returns the hosted Persona URL.
|
|
1913
1923
|
*
|
|
1914
1924
|
*/
|
|
@@ -2009,6 +2019,261 @@ export interface paths {
|
|
|
2009
2019
|
patch?: never;
|
|
2010
2020
|
trace?: never;
|
|
2011
2021
|
};
|
|
2022
|
+
"/admin/kyc_verification/{wallet_id}/init": {
|
|
2023
|
+
parameters: {
|
|
2024
|
+
query?: never;
|
|
2025
|
+
header?: never;
|
|
2026
|
+
path?: never;
|
|
2027
|
+
cookie?: never;
|
|
2028
|
+
};
|
|
2029
|
+
get?: never;
|
|
2030
|
+
put?: never;
|
|
2031
|
+
/**
|
|
2032
|
+
* Initialize KYC verification for a wallet
|
|
2033
|
+
* @description Starts a provider-agnostic KYC data-collection flow for the wallet. The
|
|
2034
|
+
* KYC provider (Persona, Sumsub, …) is resolved internally per tenant — the
|
|
2035
|
+
* caller does not choose it. Returns the provider verification id plus an
|
|
2036
|
+
* optional short-lived SDK token and provider-specific payload the client
|
|
2037
|
+
* uses to launch the verification.
|
|
2038
|
+
*
|
|
2039
|
+
* Provider-agnostic replacement for the deprecated
|
|
2040
|
+
* `POST/GET /admin/kyc_persona/{wallet_id}/init`.
|
|
2041
|
+
*
|
|
2042
|
+
*/
|
|
2043
|
+
post: {
|
|
2044
|
+
parameters: {
|
|
2045
|
+
query?: never;
|
|
2046
|
+
header?: never;
|
|
2047
|
+
path: {
|
|
2048
|
+
/** @description Wallet UUID */
|
|
2049
|
+
wallet_id: string;
|
|
2050
|
+
};
|
|
2051
|
+
cookie?: never;
|
|
2052
|
+
};
|
|
2053
|
+
requestBody: {
|
|
2054
|
+
content: {
|
|
2055
|
+
"application/json": {
|
|
2056
|
+
/**
|
|
2057
|
+
* @description KYC entity type
|
|
2058
|
+
* @enum {string}
|
|
2059
|
+
*/
|
|
2060
|
+
type: "individual" | "business";
|
|
2061
|
+
};
|
|
2062
|
+
};
|
|
2063
|
+
};
|
|
2064
|
+
responses: {
|
|
2065
|
+
/** @description KYC verification initialized */
|
|
2066
|
+
200: {
|
|
2067
|
+
headers: {
|
|
2068
|
+
[name: string]: unknown;
|
|
2069
|
+
};
|
|
2070
|
+
content: {
|
|
2071
|
+
"application/json": {
|
|
2072
|
+
/** @example true */
|
|
2073
|
+
success: boolean;
|
|
2074
|
+
data: {
|
|
2075
|
+
/**
|
|
2076
|
+
* Format: uuid
|
|
2077
|
+
* @description Echo of the wallet from the path
|
|
2078
|
+
*/
|
|
2079
|
+
wallet_id: string;
|
|
2080
|
+
/**
|
|
2081
|
+
* @description Provider that handled the flow (e.g. persona, sumsub)
|
|
2082
|
+
* @example persona
|
|
2083
|
+
*/
|
|
2084
|
+
provider_type: string;
|
|
2085
|
+
/**
|
|
2086
|
+
* @description Provider verification id — Persona: inquiryId, Sumsub: applicantId
|
|
2087
|
+
* @example inq_ABDNxhp9ZzD3yehivCbMVvmjwh5g5r
|
|
2088
|
+
*/
|
|
2089
|
+
verification_id: string;
|
|
2090
|
+
/** @description Short-lived SDK/session token when the provider mints one — otherwise null */
|
|
2091
|
+
verification_token?: string | null;
|
|
2092
|
+
/** @description Provider-specific payload forwarded to the client SDK */
|
|
2093
|
+
provider_data?: {
|
|
2094
|
+
[key: string]: unknown;
|
|
2095
|
+
} | null;
|
|
2096
|
+
};
|
|
2097
|
+
};
|
|
2098
|
+
};
|
|
2099
|
+
};
|
|
2100
|
+
/** @description Validation error (`type` missing or not in [individual, business]) */
|
|
2101
|
+
400: {
|
|
2102
|
+
headers: {
|
|
2103
|
+
[name: string]: unknown;
|
|
2104
|
+
};
|
|
2105
|
+
content?: never;
|
|
2106
|
+
};
|
|
2107
|
+
/** @description Missing or invalid tenant API key */
|
|
2108
|
+
401: {
|
|
2109
|
+
headers: {
|
|
2110
|
+
[name: string]: unknown;
|
|
2111
|
+
};
|
|
2112
|
+
content?: never;
|
|
2113
|
+
};
|
|
2114
|
+
/** @description Wallet does not belong to tenant or insufficient admin role */
|
|
2115
|
+
403: {
|
|
2116
|
+
headers: {
|
|
2117
|
+
[name: string]: unknown;
|
|
2118
|
+
};
|
|
2119
|
+
content?: never;
|
|
2120
|
+
};
|
|
2121
|
+
/** @description Wallet not found upstream */
|
|
2122
|
+
404: {
|
|
2123
|
+
headers: {
|
|
2124
|
+
[name: string]: unknown;
|
|
2125
|
+
};
|
|
2126
|
+
content?: never;
|
|
2127
|
+
};
|
|
2128
|
+
/** @description KYC provider BFF unavailable or returned an error */
|
|
2129
|
+
502: {
|
|
2130
|
+
headers: {
|
|
2131
|
+
[name: string]: unknown;
|
|
2132
|
+
};
|
|
2133
|
+
content?: never;
|
|
2134
|
+
};
|
|
2135
|
+
/** @description KYC admin BFF is not configured for this deployment */
|
|
2136
|
+
503: {
|
|
2137
|
+
headers: {
|
|
2138
|
+
[name: string]: unknown;
|
|
2139
|
+
};
|
|
2140
|
+
content?: never;
|
|
2141
|
+
};
|
|
2142
|
+
};
|
|
2143
|
+
};
|
|
2144
|
+
delete?: never;
|
|
2145
|
+
options?: never;
|
|
2146
|
+
head?: never;
|
|
2147
|
+
patch?: never;
|
|
2148
|
+
trace?: never;
|
|
2149
|
+
};
|
|
2150
|
+
"/admin/kyc_verification/{wallet_id}/resume": {
|
|
2151
|
+
parameters: {
|
|
2152
|
+
query?: never;
|
|
2153
|
+
header?: never;
|
|
2154
|
+
path?: never;
|
|
2155
|
+
cookie?: never;
|
|
2156
|
+
};
|
|
2157
|
+
get?: never;
|
|
2158
|
+
put?: never;
|
|
2159
|
+
/**
|
|
2160
|
+
* Resume KYC verification for a wallet
|
|
2161
|
+
* @description Resumes an existing provider-agnostic KYC data-collection flow for the
|
|
2162
|
+
* wallet. The provider is resolved internally per tenant. `verification_ref`
|
|
2163
|
+
* is the provider reference returned by init (Persona: `inquiry_id`,
|
|
2164
|
+
* Sumsub: `applicant_id`).
|
|
2165
|
+
*
|
|
2166
|
+
* Provider-agnostic replacement for the deprecated
|
|
2167
|
+
* `POST/GET /admin/kyc_persona/{wallet_id}/resume`.
|
|
2168
|
+
*
|
|
2169
|
+
*/
|
|
2170
|
+
post: {
|
|
2171
|
+
parameters: {
|
|
2172
|
+
query?: never;
|
|
2173
|
+
header?: never;
|
|
2174
|
+
path: {
|
|
2175
|
+
/** @description Wallet UUID */
|
|
2176
|
+
wallet_id: string;
|
|
2177
|
+
};
|
|
2178
|
+
cookie?: never;
|
|
2179
|
+
};
|
|
2180
|
+
requestBody: {
|
|
2181
|
+
content: {
|
|
2182
|
+
"application/json": {
|
|
2183
|
+
/**
|
|
2184
|
+
* @description Provider verification reference (Persona: inquiry_id, Sumsub: applicant_id)
|
|
2185
|
+
* @example inq_ABDNxhp9ZzD3yehivCbMVvmjwh5g5r
|
|
2186
|
+
*/
|
|
2187
|
+
verification_ref: string;
|
|
2188
|
+
};
|
|
2189
|
+
};
|
|
2190
|
+
};
|
|
2191
|
+
responses: {
|
|
2192
|
+
/** @description KYC verification resumed */
|
|
2193
|
+
200: {
|
|
2194
|
+
headers: {
|
|
2195
|
+
[name: string]: unknown;
|
|
2196
|
+
};
|
|
2197
|
+
content: {
|
|
2198
|
+
"application/json": {
|
|
2199
|
+
/** @example true */
|
|
2200
|
+
success: boolean;
|
|
2201
|
+
data: {
|
|
2202
|
+
/**
|
|
2203
|
+
* Format: uuid
|
|
2204
|
+
* @description Echo of the wallet from the path
|
|
2205
|
+
*/
|
|
2206
|
+
wallet_id: string;
|
|
2207
|
+
/**
|
|
2208
|
+
* @description Provider that handled the flow (e.g. persona, sumsub)
|
|
2209
|
+
* @example persona
|
|
2210
|
+
*/
|
|
2211
|
+
provider_type: string;
|
|
2212
|
+
/**
|
|
2213
|
+
* @description Provider verification id — Persona: inquiryId, Sumsub: applicantId
|
|
2214
|
+
* @example inq_ABDNxhp9ZzD3yehivCbMVvmjwh5g5r
|
|
2215
|
+
*/
|
|
2216
|
+
verification_id: string;
|
|
2217
|
+
/** @description Short-lived SDK/session token — Persona: sessionToken, Sumsub: accessToken — otherwise null */
|
|
2218
|
+
verification_token?: string | null;
|
|
2219
|
+
/** @description Provider-specific payload forwarded to the client SDK */
|
|
2220
|
+
provider_data?: {
|
|
2221
|
+
[key: string]: unknown;
|
|
2222
|
+
} | null;
|
|
2223
|
+
};
|
|
2224
|
+
};
|
|
2225
|
+
};
|
|
2226
|
+
};
|
|
2227
|
+
/** @description Validation error (`verification_ref` missing or empty) */
|
|
2228
|
+
400: {
|
|
2229
|
+
headers: {
|
|
2230
|
+
[name: string]: unknown;
|
|
2231
|
+
};
|
|
2232
|
+
content?: never;
|
|
2233
|
+
};
|
|
2234
|
+
/** @description Missing or invalid tenant API key */
|
|
2235
|
+
401: {
|
|
2236
|
+
headers: {
|
|
2237
|
+
[name: string]: unknown;
|
|
2238
|
+
};
|
|
2239
|
+
content?: never;
|
|
2240
|
+
};
|
|
2241
|
+
/** @description Wallet does not belong to tenant or insufficient admin role */
|
|
2242
|
+
403: {
|
|
2243
|
+
headers: {
|
|
2244
|
+
[name: string]: unknown;
|
|
2245
|
+
};
|
|
2246
|
+
content?: never;
|
|
2247
|
+
};
|
|
2248
|
+
/** @description No such verification to resume upstream */
|
|
2249
|
+
404: {
|
|
2250
|
+
headers: {
|
|
2251
|
+
[name: string]: unknown;
|
|
2252
|
+
};
|
|
2253
|
+
content?: never;
|
|
2254
|
+
};
|
|
2255
|
+
/** @description KYC provider BFF unavailable or returned an error */
|
|
2256
|
+
502: {
|
|
2257
|
+
headers: {
|
|
2258
|
+
[name: string]: unknown;
|
|
2259
|
+
};
|
|
2260
|
+
content?: never;
|
|
2261
|
+
};
|
|
2262
|
+
/** @description KYC admin BFF is not configured for this deployment */
|
|
2263
|
+
503: {
|
|
2264
|
+
headers: {
|
|
2265
|
+
[name: string]: unknown;
|
|
2266
|
+
};
|
|
2267
|
+
content?: never;
|
|
2268
|
+
};
|
|
2269
|
+
};
|
|
2270
|
+
};
|
|
2271
|
+
delete?: never;
|
|
2272
|
+
options?: never;
|
|
2273
|
+
head?: never;
|
|
2274
|
+
patch?: never;
|
|
2275
|
+
trace?: never;
|
|
2276
|
+
};
|
|
2012
2277
|
"/admin/orders/{wallet_id}/deposit/ach": {
|
|
2013
2278
|
parameters: {
|
|
2014
2279
|
query?: never;
|
|
@@ -3272,8 +3537,8 @@ export interface paths {
|
|
|
3272
3537
|
put?: never;
|
|
3273
3538
|
/**
|
|
3274
3539
|
* Approve order
|
|
3275
|
-
* @description Transitions the order from
|
|
3276
|
-
* Only orders with status
|
|
3540
|
+
* @description Transitions the order from NEW to PROCESSING and triggers the order execution pipeline.
|
|
3541
|
+
* Only orders with status NEW can be approved.
|
|
3277
3542
|
*
|
|
3278
3543
|
*/
|
|
3279
3544
|
post: {
|
|
@@ -3336,7 +3601,7 @@ export interface paths {
|
|
|
3336
3601
|
put?: never;
|
|
3337
3602
|
/**
|
|
3338
3603
|
* Cancel order
|
|
3339
|
-
* @description Cancels an order. Orders in
|
|
3604
|
+
* @description Cancels an order. Orders in NEW or FAILED status can be canceled.
|
|
3340
3605
|
* Optionally provide a cancellation reason.
|
|
3341
3606
|
*
|
|
3342
3607
|
*/
|