squarefi-bff-api-module 1.36.77 → 1.36.79
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 +6 -0
- package/dist/api/frontend.js +8 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.js +2 -0
- package/dist/api/kyc.d.ts +1 -0
- package/dist/api/kyc.js +1 -0
- package/dist/api/rfi.d.ts +11 -0
- package/dist/api/rfi.js +26 -0
- package/dist/api/types/autogen/apiV1External.types.d.ts +6 -1
- package/dist/api/types/autogen/apiV1Frontend.types.d.ts +331 -1
- package/dist/api/types/autogen/apiV1Tenant.types.d.ts +2 -0
- package/dist/api/types/types.d.ts +73 -0
- package/package.json +1 -1
package/dist/api/frontend.d.ts
CHANGED
|
@@ -70,6 +70,12 @@ export declare const frontend: {
|
|
|
70
70
|
getAll: ({ wallet_id, ...params }: API.Frontend.VirtualAccounts.Programs.List.Request) => Promise<API.Frontend.VirtualAccounts.Programs.List.Response>;
|
|
71
71
|
};
|
|
72
72
|
};
|
|
73
|
+
kycRails: {
|
|
74
|
+
getAll: ({ wallet_id }: API.Frontend.KycRails.List.Request) => Promise<API.Frontend.KycRails.List.Response>;
|
|
75
|
+
getById: ({ wallet_id, rail_id }: API.Frontend.KycRails.Get.Request) => Promise<API.Frontend.KycRails.Get.Response>;
|
|
76
|
+
submit: ({ wallet_id, rail_id, }: API.Frontend.KycRails.Submit.Request) => Promise<API.Frontend.KycRails.Submit.Response>;
|
|
77
|
+
confirmTerms: ({ wallet_id, rail_id, }: API.Frontend.KycRails.ConfirmTerms.Request) => Promise<API.Frontend.KycRails.ConfirmTerms.Response>;
|
|
78
|
+
};
|
|
73
79
|
reference: {
|
|
74
80
|
exchangeRates: {
|
|
75
81
|
list: (params?: API.Frontend.Reference.ExchangeRates.List.Request) => Promise<API.Frontend.Reference.ExchangeRates.List.Response>;
|
package/dist/api/frontend.js
CHANGED
|
@@ -144,6 +144,14 @@ export const frontend = {
|
|
|
144
144
|
getAll: ({ wallet_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/virtual-accounts/programs/wallet/${wallet_id}`, { params }),
|
|
145
145
|
},
|
|
146
146
|
},
|
|
147
|
+
// Frontend twin of `kyc.rails.*` (BFF `/kyc/{wallet_id}/rails`). Reads take any wallet member; `submit` and
|
|
148
|
+
// `confirmTerms` take the wallet admin or owner, and only they get the rail's `extra_actions`.
|
|
149
|
+
kycRails: {
|
|
150
|
+
getAll: ({ wallet_id }) => apiClientV1Frontend.getRequest(`/frontend/wallets/${wallet_id}/kyc-rails`),
|
|
151
|
+
getById: ({ wallet_id, rail_id }) => apiClientV1Frontend.getRequest(`/frontend/wallets/${wallet_id}/kyc-rails/${rail_id}`),
|
|
152
|
+
submit: ({ wallet_id, rail_id, }) => apiClientV1Frontend.postRequest(`/frontend/wallets/${wallet_id}/kyc-rails/${rail_id}`),
|
|
153
|
+
confirmTerms: ({ wallet_id, rail_id, }) => apiClientV1Frontend.postRequest(`/frontend/wallets/${wallet_id}/kyc-rails/${rail_id}/terms-and-conditions`),
|
|
154
|
+
},
|
|
147
155
|
reference: {
|
|
148
156
|
// Frontend twin of `exchange.byOrderType.*` (legacy `GET /exchange/`): the same tenant pairs, but paged in
|
|
149
157
|
// memory — 50 per page by default, 500 at most, in no particular order — and behind the bearer session.
|
package/dist/api/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { list } from './list';
|
|
|
10
10
|
import { massPayouts } from './mass-payouts';
|
|
11
11
|
import { orders } from './orders';
|
|
12
12
|
import { referrals } from './referrals';
|
|
13
|
+
import { rfi } from './rfi';
|
|
13
14
|
import { statements } from './statements';
|
|
14
15
|
import { storage } from './storage';
|
|
15
16
|
import { tenants } from './tenants';
|
|
@@ -30,6 +31,7 @@ type Api = {
|
|
|
30
31
|
massPayouts: typeof massPayouts;
|
|
31
32
|
orders: typeof orders;
|
|
32
33
|
referrals: typeof referrals;
|
|
34
|
+
rfi: typeof rfi;
|
|
33
35
|
statements: typeof statements;
|
|
34
36
|
storage: typeof storage;
|
|
35
37
|
tenants: typeof tenants;
|
package/dist/api/index.js
CHANGED
|
@@ -10,6 +10,7 @@ import { list } from './list';
|
|
|
10
10
|
import { massPayouts } from './mass-payouts';
|
|
11
11
|
import { orders } from './orders';
|
|
12
12
|
import { referrals } from './referrals';
|
|
13
|
+
import { rfi } from './rfi';
|
|
13
14
|
import { statements } from './statements';
|
|
14
15
|
import { storage } from './storage';
|
|
15
16
|
import { tenants } from './tenants';
|
|
@@ -30,6 +31,7 @@ export const squarefi_bff_api_client = {
|
|
|
30
31
|
massPayouts,
|
|
31
32
|
orders,
|
|
32
33
|
referrals,
|
|
34
|
+
rfi,
|
|
33
35
|
statements,
|
|
34
36
|
storage,
|
|
35
37
|
tenants,
|
package/dist/api/kyc.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export declare const kyc: {
|
|
|
17
17
|
init: ({ kyc_entity_id, ...params }: API.KYC.Entity.Init.Request) => Promise<API.KYC.Entity.Init.Response>;
|
|
18
18
|
resume: ({ kyc_entity_id, verification_ref, }: API.KYC.Entity.Resume.Request) => Promise<API.KYC.Entity.Resume.Response>;
|
|
19
19
|
};
|
|
20
|
+
/** @deprecated BFF rails are replaced by CORE `/frontend/wallets/{wallet_id}/kyc-rails` (SFI-2614). Use `frontend.kycRails`. */
|
|
20
21
|
rails: {
|
|
21
22
|
info: {
|
|
22
23
|
getAll: ({ wallet_id }: API.KYC.Rails.RailInfo.List.Request) => Promise<API.KYC.Rails.RailInfo.List.Response>;
|
package/dist/api/kyc.js
CHANGED
|
@@ -17,6 +17,7 @@ export const kyc = {
|
|
|
17
17
|
init: ({ kyc_entity_id, ...params }) => apiClientV2.postRequest(`/kyc/entities/${kyc_entity_id}/init`, { params }),
|
|
18
18
|
resume: ({ kyc_entity_id, verification_ref, }) => apiClientV2.postRequest(`/kyc/entities/${kyc_entity_id}/resume/${verification_ref}`),
|
|
19
19
|
},
|
|
20
|
+
/** @deprecated BFF rails are replaced by CORE `/frontend/wallets/{wallet_id}/kyc-rails` (SFI-2614). Use `frontend.kycRails`. */
|
|
20
21
|
rails: {
|
|
21
22
|
info: {
|
|
22
23
|
getAll: ({ wallet_id }) => apiClientV2.getRequest(`/kyc/${wallet_id}/rails`),
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { API } from './types/types';
|
|
2
|
+
/**
|
|
3
|
+
* Requests for information from compliance (SFI-2280), scoped by `wallet_id`. The client can only
|
|
4
|
+
* read and answer them: the spec declares no method to close, edit or delete one.
|
|
5
|
+
*/
|
|
6
|
+
export declare const rfi: {
|
|
7
|
+
list: ({ wallet_id, ...params }: API.Rfi.List.Request) => Promise<API.Rfi.List.Response>;
|
|
8
|
+
getById: ({ wallet_id, case_id }: API.Rfi.GetById.Request) => Promise<API.Rfi.GetById.Response>;
|
|
9
|
+
reply: ({ wallet_id, case_id, body, files, signal, timeout, }: API.Rfi.Reply.Request) => Promise<API.Rfi.Reply.Response>;
|
|
10
|
+
getAttachmentLink: ({ wallet_id, case_id, attachment_id, }: API.Rfi.GetAttachmentLink.Request) => Promise<API.Rfi.GetAttachmentLink.Response>;
|
|
11
|
+
};
|
package/dist/api/rfi.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { apiClientV1Frontend } from '../utils/apiClientFactory';
|
|
2
|
+
/**
|
|
3
|
+
* Requests for information from compliance (SFI-2280), scoped by `wallet_id`. The client can only
|
|
4
|
+
* read and answer them: the spec declares no method to close, edit or delete one.
|
|
5
|
+
*/
|
|
6
|
+
export const rfi = {
|
|
7
|
+
list: ({ wallet_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/rfi/${wallet_id}`, { params }),
|
|
8
|
+
getById: ({ wallet_id, case_id }) => apiClientV1Frontend.getRequest(`/frontend/rfi/${wallet_id}/${case_id}`),
|
|
9
|
+
// Each file is its own part named `files` (repeated, not `files[]`) — the form verified live.
|
|
10
|
+
// Content-Type is left to the browser, which adds the multipart boundary. A reply carries up to
|
|
11
|
+
// 10 files of 20 MB, which the client's 60 s default timeout may not cover: pass `timeout`.
|
|
12
|
+
reply: ({ wallet_id, case_id, body, files, signal, timeout, }) => {
|
|
13
|
+
const formData = new FormData();
|
|
14
|
+
if (body)
|
|
15
|
+
formData.append('body', body);
|
|
16
|
+
files?.forEach((file) => formData.append('files', file));
|
|
17
|
+
return apiClientV1Frontend.postRequest(`/frontend/rfi/${wallet_id}/${case_id}/messages`, {
|
|
18
|
+
data: formData,
|
|
19
|
+
signal,
|
|
20
|
+
timeout,
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
// The signed link lives `expires_in` seconds (about 120): open it right away and request a new
|
|
24
|
+
// one for every download instead of storing it.
|
|
25
|
+
getAttachmentLink: ({ wallet_id, case_id, attachment_id, }) => apiClientV1Frontend.getRequest(`/frontend/rfi/${wallet_id}/${case_id}/attachments/${attachment_id}`),
|
|
26
|
+
};
|
|
@@ -2428,6 +2428,8 @@ export interface paths {
|
|
|
2428
2428
|
* Pass `status=FAILED` to get them back.
|
|
2429
2429
|
* */
|
|
2430
2430
|
status?: ("ACTIVE" | "INACTIVE" | "SUSPENDED" | "CANCELED")[];
|
|
2431
|
+
/** @description Only cards issued to this cardholder. */
|
|
2432
|
+
cardholder_id?: string;
|
|
2431
2433
|
/** @description Filter cards by last 4 digits of the card number (partial, case-insensitive match) */
|
|
2432
2434
|
last4?: string;
|
|
2433
2435
|
/** @description Number of items to skip */
|
|
@@ -4261,7 +4263,10 @@ export interface paths {
|
|
|
4261
4263
|
/**
|
|
4262
4264
|
* Withdraw funds from sub-account
|
|
4263
4265
|
* @description Withdraws funds from a sub-account back to the associated wallet.
|
|
4264
|
-
*
|
|
4266
|
+
* The sub-account is debited in its account_currency. The wallet is credited
|
|
4267
|
+
* in the tenant's base currency when the tenant has auto-exchange on (converted
|
|
4268
|
+
* at the tenant's WITHDRAW_CARD_SUBACCOUNT rate inside the same order), otherwise
|
|
4269
|
+
* — or when that pair has no rate — in the sub-account's account_currency.
|
|
4265
4270
|
*
|
|
4266
4271
|
* **Authentication**: x-api-key header required
|
|
4267
4272
|
*
|
|
@@ -2903,6 +2903,8 @@ export interface paths {
|
|
|
2903
2903
|
* client can act on. Pass `status=FAILED` to get them back.
|
|
2904
2904
|
* */
|
|
2905
2905
|
status?: ("ACTIVE" | "INACTIVE" | "FROZEN" | "CANCELED" | "CLOSED" | "BLOCKED" | "FAILED" | "PENDING")[];
|
|
2906
|
+
/** @description Only cards issued to this cardholder. */
|
|
2907
|
+
cardholder_id?: string;
|
|
2906
2908
|
/** @description Filter cards by last 4 digits of the card number (partial, case-insensitive match) */
|
|
2907
2909
|
last4?: string;
|
|
2908
2910
|
/** @description Number of items to skip */
|
|
@@ -4764,7 +4766,10 @@ export interface paths {
|
|
|
4764
4766
|
/**
|
|
4765
4767
|
* Withdraw funds from sub-account
|
|
4766
4768
|
* @description Withdraws funds from a sub-account back to the associated wallet.
|
|
4767
|
-
*
|
|
4769
|
+
* The sub-account is debited in its account_currency. The wallet is credited
|
|
4770
|
+
* in the tenant's base currency when the tenant has auto-exchange on (converted
|
|
4771
|
+
* at the tenant's WITHDRAW_CARD_SUBACCOUNT rate inside the same order), otherwise
|
|
4772
|
+
* — or when that pair has no rate — in the sub-account's account_currency.
|
|
4768
4773
|
*
|
|
4769
4774
|
* **Authentication**: Bearer token with x-tenant-id header required
|
|
4770
4775
|
*
|
|
@@ -15127,6 +15132,279 @@ export interface paths {
|
|
|
15127
15132
|
patch?: never;
|
|
15128
15133
|
trace?: never;
|
|
15129
15134
|
};
|
|
15135
|
+
"/frontend/wallets/{wallet_id}/kyc-rails": {
|
|
15136
|
+
parameters: {
|
|
15137
|
+
query?: never;
|
|
15138
|
+
header?: never;
|
|
15139
|
+
path?: never;
|
|
15140
|
+
cookie?: never;
|
|
15141
|
+
};
|
|
15142
|
+
/**
|
|
15143
|
+
* KYC rails of the wallet
|
|
15144
|
+
* @description The tenant's KYC rails of the wallet's entity type and the universal ones, each with the wallet's
|
|
15145
|
+
* application on it. A rail is listed while it is active; an archived rail stays listed only when the
|
|
15146
|
+
* wallet is approved on it. `can_submit` tells whether `POST …/kyc-rails/{rail_id}` would be accepted now.
|
|
15147
|
+
*
|
|
15148
|
+
* Replaces the BFF `GET /kyc/{wallet_id}/rails`; items have its shape plus `can_submit`.
|
|
15149
|
+
*
|
|
15150
|
+
* **Access Control**: any member of the wallet except the scoped `user` role. No KYC gate.
|
|
15151
|
+
*
|
|
15152
|
+
*/
|
|
15153
|
+
get: {
|
|
15154
|
+
parameters: {
|
|
15155
|
+
query?: never;
|
|
15156
|
+
header?: never;
|
|
15157
|
+
path: {
|
|
15158
|
+
wallet_id: components["parameters"]["KycRailsWalletId"];
|
|
15159
|
+
};
|
|
15160
|
+
cookie?: never;
|
|
15161
|
+
};
|
|
15162
|
+
requestBody?: never;
|
|
15163
|
+
responses: {
|
|
15164
|
+
/** @description Rails of the wallet */
|
|
15165
|
+
200: {
|
|
15166
|
+
headers: {
|
|
15167
|
+
[name: string]: unknown;
|
|
15168
|
+
};
|
|
15169
|
+
content: {
|
|
15170
|
+
"application/json": {
|
|
15171
|
+
/** @example true */
|
|
15172
|
+
success: boolean;
|
|
15173
|
+
data: components["schemas"]["WalletKycRail"][];
|
|
15174
|
+
count: number;
|
|
15175
|
+
};
|
|
15176
|
+
};
|
|
15177
|
+
};
|
|
15178
|
+
401: components["responses"]["UnauthorizedError"];
|
|
15179
|
+
403: components["responses"]["ForbiddenError"];
|
|
15180
|
+
/** @description Wallet not found (NOT_FOUND) */
|
|
15181
|
+
404: {
|
|
15182
|
+
headers: {
|
|
15183
|
+
[name: string]: unknown;
|
|
15184
|
+
};
|
|
15185
|
+
content?: never;
|
|
15186
|
+
};
|
|
15187
|
+
};
|
|
15188
|
+
};
|
|
15189
|
+
put?: never;
|
|
15190
|
+
post?: never;
|
|
15191
|
+
delete?: never;
|
|
15192
|
+
options?: never;
|
|
15193
|
+
head?: never;
|
|
15194
|
+
patch?: never;
|
|
15195
|
+
trace?: never;
|
|
15196
|
+
};
|
|
15197
|
+
"/frontend/wallets/{wallet_id}/kyc-rails/{rail_id}": {
|
|
15198
|
+
parameters: {
|
|
15199
|
+
query?: never;
|
|
15200
|
+
header?: never;
|
|
15201
|
+
path?: never;
|
|
15202
|
+
cookie?: never;
|
|
15203
|
+
};
|
|
15204
|
+
/**
|
|
15205
|
+
* One KYC rail of the wallet
|
|
15206
|
+
* @description One rail with the wallet's application on it, under the visibility rule of the list.
|
|
15207
|
+
*
|
|
15208
|
+
* Replaces the BFF `GET /kyc/{wallet_id}/rails/{rail_id}`.
|
|
15209
|
+
*
|
|
15210
|
+
* **Access Control**: any member of the wallet except the scoped `user` role. No KYC gate.
|
|
15211
|
+
*
|
|
15212
|
+
*/
|
|
15213
|
+
get: {
|
|
15214
|
+
parameters: {
|
|
15215
|
+
query?: never;
|
|
15216
|
+
header?: never;
|
|
15217
|
+
path: {
|
|
15218
|
+
wallet_id: components["parameters"]["KycRailsWalletId"];
|
|
15219
|
+
/** @description `kyc_rails.id` of the wallet's tenant */
|
|
15220
|
+
rail_id: components["parameters"]["KycRailId"];
|
|
15221
|
+
};
|
|
15222
|
+
cookie?: never;
|
|
15223
|
+
};
|
|
15224
|
+
requestBody?: never;
|
|
15225
|
+
responses: {
|
|
15226
|
+
/** @description The rail */
|
|
15227
|
+
200: {
|
|
15228
|
+
headers: {
|
|
15229
|
+
[name: string]: unknown;
|
|
15230
|
+
};
|
|
15231
|
+
content: {
|
|
15232
|
+
"application/json": components["schemas"]["WalletKycRailResponse"];
|
|
15233
|
+
};
|
|
15234
|
+
};
|
|
15235
|
+
/** @description `rail_id` is not a UUID (VALIDATION_ERROR) */
|
|
15236
|
+
400: {
|
|
15237
|
+
headers: {
|
|
15238
|
+
[name: string]: unknown;
|
|
15239
|
+
};
|
|
15240
|
+
content?: never;
|
|
15241
|
+
};
|
|
15242
|
+
401: components["responses"]["UnauthorizedError"];
|
|
15243
|
+
403: components["responses"]["ForbiddenError"];
|
|
15244
|
+
/** @description No such rail on the wallet's tenant, or an archived rail the wallet is not approved on (RAIL_NOT_FOUND) */
|
|
15245
|
+
404: {
|
|
15246
|
+
headers: {
|
|
15247
|
+
[name: string]: unknown;
|
|
15248
|
+
};
|
|
15249
|
+
content?: never;
|
|
15250
|
+
};
|
|
15251
|
+
};
|
|
15252
|
+
};
|
|
15253
|
+
put?: never;
|
|
15254
|
+
/**
|
|
15255
|
+
* Submit the wallet to a KYC rail
|
|
15256
|
+
* @description Puts the wallet on the rail, the way compliance does from the panel: a rail whose vendor CORE onboards
|
|
15257
|
+
* itself is submitted here, any other goes through the KYC-admin service. A manual rail waits for
|
|
15258
|
+
* compliance (`WAITING_ON_REVIEW`); a universal rail is approved on the spot. An application the vendor
|
|
15259
|
+
* sent back (`HOLD`, `SOFT_REJECT`) is resubmitted. No body.
|
|
15260
|
+
*
|
|
15261
|
+
* Refused unless the rail has an onboarding implementation (Rail.io rails never do), takes submissions,
|
|
15262
|
+
* fits the entity type, and the entity's KYC is `APPROVED` or `WAITING_ON_REVIEW`. On a tenant without KYC
|
|
15263
|
+
* only the tenant's default universal rail can be submitted without it.
|
|
15264
|
+
*
|
|
15265
|
+
* Replaces the BFF `POST /kyc/{wallet_id}/rails/{rail_id}`.
|
|
15266
|
+
*
|
|
15267
|
+
* **Access Control**: wallet `admin` or `owner`. No KYC gate.
|
|
15268
|
+
*
|
|
15269
|
+
*/
|
|
15270
|
+
post: {
|
|
15271
|
+
parameters: {
|
|
15272
|
+
query?: never;
|
|
15273
|
+
header?: never;
|
|
15274
|
+
path: {
|
|
15275
|
+
wallet_id: components["parameters"]["KycRailsWalletId"];
|
|
15276
|
+
/** @description `kyc_rails.id` of the wallet's tenant */
|
|
15277
|
+
rail_id: components["parameters"]["KycRailId"];
|
|
15278
|
+
};
|
|
15279
|
+
cookie?: never;
|
|
15280
|
+
};
|
|
15281
|
+
requestBody?: never;
|
|
15282
|
+
responses: {
|
|
15283
|
+
/** @description The rail after the submission */
|
|
15284
|
+
200: {
|
|
15285
|
+
headers: {
|
|
15286
|
+
[name: string]: unknown;
|
|
15287
|
+
};
|
|
15288
|
+
content: {
|
|
15289
|
+
"application/json": components["schemas"]["WalletKycRailResponse"];
|
|
15290
|
+
};
|
|
15291
|
+
};
|
|
15292
|
+
/** @description `rail_id` is not a UUID (VALIDATION_ERROR); the rail has no onboarding implementation, or is a universal
|
|
15293
|
+
* rail other than the tenant's default on a tenant without KYC (RAIL_NOT_AVAILABLE); the rail takes no
|
|
15294
|
+
* submissions (RAIL_SUBMIT_UNAVAILABLE); the rail is of the other entity type (RAIL_TYPE_MISMATCH); the
|
|
15295
|
+
* onboarding behind the rail refused the submission (RAIL_SUBMISSION_REJECTED — the vendor's reason is
|
|
15296
|
+
* logged, never returned)
|
|
15297
|
+
* */
|
|
15298
|
+
400: {
|
|
15299
|
+
headers: {
|
|
15300
|
+
[name: string]: unknown;
|
|
15301
|
+
};
|
|
15302
|
+
content?: never;
|
|
15303
|
+
};
|
|
15304
|
+
401: components["responses"]["UnauthorizedError"];
|
|
15305
|
+
/** @description Not an admin of the wallet (ACCESS_DENIED), or the entity's KYC is not approved or under review (KYC_NOT_APPROVED) */
|
|
15306
|
+
403: {
|
|
15307
|
+
headers: {
|
|
15308
|
+
[name: string]: unknown;
|
|
15309
|
+
};
|
|
15310
|
+
content?: never;
|
|
15311
|
+
};
|
|
15312
|
+
/** @description No such rail on the wallet's tenant, or an archived one (RAIL_NOT_FOUND) */
|
|
15313
|
+
404: {
|
|
15314
|
+
headers: {
|
|
15315
|
+
[name: string]: unknown;
|
|
15316
|
+
};
|
|
15317
|
+
content?: never;
|
|
15318
|
+
};
|
|
15319
|
+
/** @description Already approved on the rail (RAIL_ALREADY_APPROVED), an application is with the vendor
|
|
15320
|
+
* (RAIL_SUBMISSION_IN_PROGRESS), or the same submission is being processed (OPERATION_IN_PROGRESS)
|
|
15321
|
+
* */
|
|
15322
|
+
409: {
|
|
15323
|
+
headers: {
|
|
15324
|
+
[name: string]: unknown;
|
|
15325
|
+
};
|
|
15326
|
+
content?: never;
|
|
15327
|
+
};
|
|
15328
|
+
/** @description The onboarding behind the rail failed or is unreachable (RAIL_SUBMISSION_FAILED), or the lock service is down (SERVICE_UNAVAILABLE) */
|
|
15329
|
+
503: {
|
|
15330
|
+
headers: {
|
|
15331
|
+
[name: string]: unknown;
|
|
15332
|
+
};
|
|
15333
|
+
content?: never;
|
|
15334
|
+
};
|
|
15335
|
+
};
|
|
15336
|
+
};
|
|
15337
|
+
delete?: never;
|
|
15338
|
+
options?: never;
|
|
15339
|
+
head?: never;
|
|
15340
|
+
patch?: never;
|
|
15341
|
+
trace?: never;
|
|
15342
|
+
};
|
|
15343
|
+
"/frontend/wallets/{wallet_id}/kyc-rails/{rail_id}/terms-and-conditions": {
|
|
15344
|
+
parameters: {
|
|
15345
|
+
query?: never;
|
|
15346
|
+
header?: never;
|
|
15347
|
+
path?: never;
|
|
15348
|
+
cookie?: never;
|
|
15349
|
+
};
|
|
15350
|
+
get?: never;
|
|
15351
|
+
put?: never;
|
|
15352
|
+
/**
|
|
15353
|
+
* Accept the terms of a KYC rail
|
|
15354
|
+
* @description Records that the wallet accepted the rail's terms (`wallet_rail.terms_confirmed`). The wallet must have
|
|
15355
|
+
* submitted to the rail first. No body.
|
|
15356
|
+
*
|
|
15357
|
+
* Replaces the BFF `POST /kyc/{wallet_id}/rails/{rail_id}/terms-and-conditions`.
|
|
15358
|
+
*
|
|
15359
|
+
* **Access Control**: wallet `admin` or `owner`. No KYC gate.
|
|
15360
|
+
*
|
|
15361
|
+
*/
|
|
15362
|
+
post: {
|
|
15363
|
+
parameters: {
|
|
15364
|
+
query?: never;
|
|
15365
|
+
header?: never;
|
|
15366
|
+
path: {
|
|
15367
|
+
wallet_id: components["parameters"]["KycRailsWalletId"];
|
|
15368
|
+
/** @description `kyc_rails.id` of the wallet's tenant */
|
|
15369
|
+
rail_id: components["parameters"]["KycRailId"];
|
|
15370
|
+
};
|
|
15371
|
+
cookie?: never;
|
|
15372
|
+
};
|
|
15373
|
+
requestBody?: never;
|
|
15374
|
+
responses: {
|
|
15375
|
+
/** @description The rail with the terms accepted */
|
|
15376
|
+
200: {
|
|
15377
|
+
headers: {
|
|
15378
|
+
[name: string]: unknown;
|
|
15379
|
+
};
|
|
15380
|
+
content: {
|
|
15381
|
+
"application/json": components["schemas"]["WalletKycRailResponse"];
|
|
15382
|
+
};
|
|
15383
|
+
};
|
|
15384
|
+
/** @description `rail_id` is not a UUID (VALIDATION_ERROR) */
|
|
15385
|
+
400: {
|
|
15386
|
+
headers: {
|
|
15387
|
+
[name: string]: unknown;
|
|
15388
|
+
};
|
|
15389
|
+
content?: never;
|
|
15390
|
+
};
|
|
15391
|
+
401: components["responses"]["UnauthorizedError"];
|
|
15392
|
+
403: components["responses"]["ForbiddenError"];
|
|
15393
|
+
/** @description No such rail (RAIL_NOT_FOUND), or the wallet never submitted to it (RAIL_NOT_SUBMITTED) */
|
|
15394
|
+
404: {
|
|
15395
|
+
headers: {
|
|
15396
|
+
[name: string]: unknown;
|
|
15397
|
+
};
|
|
15398
|
+
content?: never;
|
|
15399
|
+
};
|
|
15400
|
+
};
|
|
15401
|
+
};
|
|
15402
|
+
delete?: never;
|
|
15403
|
+
options?: never;
|
|
15404
|
+
head?: never;
|
|
15405
|
+
patch?: never;
|
|
15406
|
+
trace?: never;
|
|
15407
|
+
};
|
|
15130
15408
|
"/frontend/notifications/test": {
|
|
15131
15409
|
parameters: {
|
|
15132
15410
|
query?: never;
|
|
@@ -17007,6 +17285,50 @@ export interface components {
|
|
|
17007
17285
|
email: string | null;
|
|
17008
17286
|
phone: string | null;
|
|
17009
17287
|
};
|
|
17288
|
+
/** @description A terms-and-conditions document of a KYC rail. */
|
|
17289
|
+
WalletKycRailTerms: {
|
|
17290
|
+
title: string;
|
|
17291
|
+
description: string | null;
|
|
17292
|
+
link: string | null;
|
|
17293
|
+
};
|
|
17294
|
+
/** @description Something the user has to do with the rail vendor: `verification` — a vendor self-verification link (`type` names it, `full_name` the person it is for); `kyb_onboarding` — the vendor-hosted onboarding link. */
|
|
17295
|
+
WalletKycRailExtraAction: {
|
|
17296
|
+
/** @enum {string} */
|
|
17297
|
+
action: "verification" | "kyb_onboarding";
|
|
17298
|
+
type: string;
|
|
17299
|
+
full_name: string | null;
|
|
17300
|
+
/** Format: uri */
|
|
17301
|
+
url: string;
|
|
17302
|
+
};
|
|
17303
|
+
/** @description The wallet's application on the rail. `null` on the rail while the wallet never submitted to it. */
|
|
17304
|
+
WalletKycRailApplication: {
|
|
17305
|
+
/**
|
|
17306
|
+
* @description `APPROVED` — onboarded. `PROCESSING` / `PENDING` — with the vendor. `HOLD` / `SOFT_REJECT` — the vendor asked for a resubmission. `WAITING_ON_REVIEW` — a manual rail waiting for compliance.
|
|
17307
|
+
* @enum {string}
|
|
17308
|
+
*/
|
|
17309
|
+
status: "APPROVED" | "DECLINED" | "PENDING" | "PROCESSING" | "HOLD" | "NEEDS_ATTENTION" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED" | "WAITING_ON_UBOS" | "WAITING_ON_REVIEW";
|
|
17310
|
+
/** @description Neutral text for the status, for display. Never the vendor's or compliance's own words. */
|
|
17311
|
+
message: string | null;
|
|
17312
|
+
terms_confirmed: boolean;
|
|
17313
|
+
/** @description Vendor links to follow. Always empty for a caller below wallet `admin` — the links are one-time capabilities. */
|
|
17314
|
+
extra_actions: components["schemas"]["WalletKycRailExtraAction"][];
|
|
17315
|
+
/** @description The terms the rail had when the wallet first submitted — what the user accepted. */
|
|
17316
|
+
terms_and_conditions: components["schemas"]["WalletKycRailTerms"][];
|
|
17317
|
+
};
|
|
17318
|
+
/** @description A KYC rail of the wallet's tenant with the wallet's application on it. Same shape as the BFF `GET /kyc/{wallet_id}/rails` item, plus `can_submit`. Vendor texts are not returned: `wallet_rail.message` is a neutral text for the status. */
|
|
17319
|
+
WalletKycRail: {
|
|
17320
|
+
/** Format: uuid */
|
|
17321
|
+
id: string;
|
|
17322
|
+
code: string | null;
|
|
17323
|
+
name: string;
|
|
17324
|
+
/** @description The rail takes submissions at all. */
|
|
17325
|
+
is_submit_available: boolean;
|
|
17326
|
+
/** @description The wallet can submit to the rail right now: it has an onboarding implementation, is of the entity's type or universal, the entity's KYC is approved or under review, and no application is approved or with the vendor. */
|
|
17327
|
+
can_submit: boolean;
|
|
17328
|
+
/** @description The rail's active terms, in display order. */
|
|
17329
|
+
terms_and_conditions: components["schemas"]["WalletKycRailTerms"][];
|
|
17330
|
+
wallet_rail: components["schemas"]["WalletKycRailApplication"] | null;
|
|
17331
|
+
};
|
|
17010
17332
|
/** @description One aggregated crypto balance of the wallet: every balance row sharing the same symbol is merged into a single entry, and `details[]` keeps the per-row breakdown. */
|
|
17011
17333
|
WalletBalanceEntry: {
|
|
17012
17334
|
symbol: string;
|
|
@@ -17946,6 +18268,11 @@ export interface components {
|
|
|
17946
18268
|
/** @description Every transaction the request covers, in the order compliance linked them */
|
|
17947
18269
|
transactions?: components["schemas"]["RfiTransaction"][];
|
|
17948
18270
|
};
|
|
18271
|
+
WalletKycRailResponse: {
|
|
18272
|
+
/** @example true */
|
|
18273
|
+
success: boolean;
|
|
18274
|
+
data: components["schemas"]["WalletKycRail"];
|
|
18275
|
+
};
|
|
17949
18276
|
};
|
|
17950
18277
|
responses: {
|
|
17951
18278
|
/** @description Authentication credentials are missing or invalid */
|
|
@@ -18021,6 +18348,9 @@ export interface components {
|
|
|
18021
18348
|
/** @description The account the requests are about. Requests and their conversations are kept per account. */
|
|
18022
18349
|
RfiWalletId: string;
|
|
18023
18350
|
RfiCaseId: string;
|
|
18351
|
+
KycRailsWalletId: string;
|
|
18352
|
+
/** @description `kyc_rails.id` of the wallet's tenant */
|
|
18353
|
+
KycRailId: string;
|
|
18024
18354
|
};
|
|
18025
18355
|
requestBodies: never;
|
|
18026
18356
|
headers: never;
|
|
@@ -6513,6 +6513,8 @@ export interface paths {
|
|
|
6513
6513
|
* Accepts a single value or a comma-separated list, e.g. `status=ACTIVE,CANCELED`.
|
|
6514
6514
|
* */
|
|
6515
6515
|
status?: ("ACTIVE" | "INACTIVE" | "SUSPENDED" | "CANCELED")[];
|
|
6516
|
+
/** @description Only cards issued to this cardholder. */
|
|
6517
|
+
cardholder_id?: string;
|
|
6516
6518
|
sub_account_type?: "balance" | "prepaid";
|
|
6517
6519
|
offset?: number;
|
|
6518
6520
|
limit?: number;
|
|
@@ -816,6 +816,33 @@ export declare namespace API {
|
|
|
816
816
|
}
|
|
817
817
|
export {};
|
|
818
818
|
}
|
|
819
|
+
namespace KycRails {
|
|
820
|
+
type ListRoot = pathsV1Frontend['/frontend/wallets/{wallet_id}/kyc-rails'];
|
|
821
|
+
type RailRoot = pathsV1Frontend['/frontend/wallets/{wallet_id}/kyc-rails/{rail_id}'];
|
|
822
|
+
type TermsRoot = pathsV1Frontend['/frontend/wallets/{wallet_id}/kyc-rails/{rail_id}/terms-and-conditions'];
|
|
823
|
+
export type WalletKycRail = componentsV1Frontend['schemas']['WalletKycRail'];
|
|
824
|
+
export type WalletKycRailApplication = componentsV1Frontend['schemas']['WalletKycRailApplication'];
|
|
825
|
+
export type WalletKycRailExtraAction = componentsV1Frontend['schemas']['WalletKycRailExtraAction'];
|
|
826
|
+
export type WalletKycRailTerms = componentsV1Frontend['schemas']['WalletKycRailTerms'];
|
|
827
|
+
export type RailStatus = WalletKycRailApplication['status'];
|
|
828
|
+
export namespace List {
|
|
829
|
+
type Request = ListRoot['get']['parameters']['path'];
|
|
830
|
+
type Response = ListRoot['get']['responses'][200]['content']['application/json'];
|
|
831
|
+
}
|
|
832
|
+
export namespace Get {
|
|
833
|
+
type Request = RailRoot['get']['parameters']['path'];
|
|
834
|
+
type Response = RailRoot['get']['responses'][200]['content']['application/json'];
|
|
835
|
+
}
|
|
836
|
+
export namespace Submit {
|
|
837
|
+
type Request = RailRoot['post']['parameters']['path'];
|
|
838
|
+
type Response = RailRoot['post']['responses'][200]['content']['application/json'];
|
|
839
|
+
}
|
|
840
|
+
export namespace ConfirmTerms {
|
|
841
|
+
type Request = TermsRoot['post']['parameters']['path'];
|
|
842
|
+
type Response = TermsRoot['post']['responses'][200]['content']['application/json'];
|
|
843
|
+
}
|
|
844
|
+
export {};
|
|
845
|
+
}
|
|
819
846
|
namespace Reference {
|
|
820
847
|
namespace ExchangeRates {
|
|
821
848
|
type ExchangeRatesRoot = pathsV1Frontend['/frontend/reference/exchange_rates'];
|
|
@@ -1661,6 +1688,52 @@ export declare namespace API {
|
|
|
1661
1688
|
}
|
|
1662
1689
|
export {};
|
|
1663
1690
|
}
|
|
1691
|
+
/**
|
|
1692
|
+
* Requests for information (RFI, SFI-2280): compliance's questions about an account or its
|
|
1693
|
+
* transactions, answered by the account's team with text and files.
|
|
1694
|
+
*
|
|
1695
|
+
* Every path is scoped by `wallet_id`, so each Request carries it. Responses are the frontend
|
|
1696
|
+
* `{ success, data }` envelope as the spec declares it. Every `Rfi*` field is optional for now
|
|
1697
|
+
* because the spec declares no `required`; the types tighten on the regeneration that adds it.
|
|
1698
|
+
*/
|
|
1699
|
+
namespace Rfi {
|
|
1700
|
+
type CasesRoot = pathsV1Frontend['/frontend/rfi/{wallet_id}'];
|
|
1701
|
+
type CaseRoot = pathsV1Frontend['/frontend/rfi/{wallet_id}/{case_id}'];
|
|
1702
|
+
type CaseMessagesRoot = pathsV1Frontend['/frontend/rfi/{wallet_id}/{case_id}/messages'];
|
|
1703
|
+
type CaseAttachmentRoot = pathsV1Frontend['/frontend/rfi/{wallet_id}/{case_id}/attachments/{attachment_id}'];
|
|
1704
|
+
export type Case = componentsV1Frontend['schemas']['RfiCase'];
|
|
1705
|
+
export type CaseDetail = componentsV1Frontend['schemas']['RfiCaseDetail'];
|
|
1706
|
+
export type Message = componentsV1Frontend['schemas']['RfiMessage'];
|
|
1707
|
+
export type Attachment = componentsV1Frontend['schemas']['RfiAttachment'];
|
|
1708
|
+
export type Transaction = componentsV1Frontend['schemas']['RfiTransaction'];
|
|
1709
|
+
export type CaseStatus = NonNullable<Case['status']>;
|
|
1710
|
+
export type CaseType = NonNullable<Case['type']>;
|
|
1711
|
+
export type MessageAuthor = NonNullable<Message['author']>;
|
|
1712
|
+
/** The list's `status` filter. `open` = `action_required` + `awaiting_compliance`; no case has it. */
|
|
1713
|
+
export type ListStatus = NonNullable<List.Request['status']>;
|
|
1714
|
+
export type Summary = NonNullable<NonNullable<List.Response['data']>['summary']>;
|
|
1715
|
+
export namespace List {
|
|
1716
|
+
type Request = CasesRoot['get']['parameters']['path'] & NonNullable<CasesRoot['get']['parameters']['query']>;
|
|
1717
|
+
type Response = CasesRoot['get']['responses']['200']['content']['application/json'];
|
|
1718
|
+
}
|
|
1719
|
+
export namespace GetById {
|
|
1720
|
+
type Request = CaseRoot['get']['parameters']['path'];
|
|
1721
|
+
type Response = CaseRoot['get']['responses']['200']['content']['application/json'];
|
|
1722
|
+
}
|
|
1723
|
+
export namespace Reply {
|
|
1724
|
+
type Request = CaseMessagesRoot['post']['parameters']['path'] & Omit<CaseMessagesRoot['post']['requestBody']['content']['multipart/form-data'], 'files'> & {
|
|
1725
|
+
files?: File[];
|
|
1726
|
+
signal?: AbortSignal;
|
|
1727
|
+
timeout?: number;
|
|
1728
|
+
};
|
|
1729
|
+
type Response = CaseMessagesRoot['post']['responses']['201']['content']['application/json'];
|
|
1730
|
+
}
|
|
1731
|
+
export namespace GetAttachmentLink {
|
|
1732
|
+
type Request = CaseAttachmentRoot['get']['parameters']['path'];
|
|
1733
|
+
type Response = CaseAttachmentRoot['get']['responses']['200']['content']['application/json'];
|
|
1734
|
+
}
|
|
1735
|
+
export {};
|
|
1736
|
+
}
|
|
1664
1737
|
namespace Orders {
|
|
1665
1738
|
namespace Create {
|
|
1666
1739
|
namespace ByOrderType {
|