squarefi-bff-api-module 1.36.67 → 1.36.69
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 +9 -0
- package/dist/api/frontend.js +12 -0
- package/dist/api/types/autogen/apiV1External.types.d.ts +7 -2
- package/dist/api/types/autogen/apiV1Frontend.types.d.ts +359 -15
- package/dist/api/types/types.d.ts +46 -2
- package/dist/api/user.d.ts +4 -0
- package/dist/api/user.js +10 -0
- package/dist/api/wallets.d.ts +4 -0
- package/dist/api/wallets.js +12 -0
- package/package.json +1 -1
package/dist/api/frontend.d.ts
CHANGED
|
@@ -62,4 +62,13 @@ export declare const frontend: {
|
|
|
62
62
|
};
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
|
+
reference: {
|
|
66
|
+
exchangeRates: {
|
|
67
|
+
list: (params?: API.Frontend.Reference.ExchangeRates.List.Request) => Promise<API.Frontend.Reference.ExchangeRates.List.Response>;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
notificationPreferences: {
|
|
71
|
+
get: () => Promise<API.Frontend.NotificationPreferences.Get.Response>;
|
|
72
|
+
update: (data: API.Frontend.NotificationPreferences.Update.Request) => Promise<API.Frontend.NotificationPreferences.Update.Response>;
|
|
73
|
+
};
|
|
65
74
|
};
|
package/dist/api/frontend.js
CHANGED
|
@@ -131,4 +131,16 @@ export const frontend = {
|
|
|
131
131
|
},
|
|
132
132
|
},
|
|
133
133
|
},
|
|
134
|
+
reference: {
|
|
135
|
+
// Frontend twin of `exchange.byOrderType.*` (legacy `GET /exchange/`): the same tenant pairs, but paged in
|
|
136
|
+
// memory — 50 per page by default, 500 at most, in no particular order — and behind the bearer session.
|
|
137
|
+
exchangeRates: {
|
|
138
|
+
list: (params = {}) => apiClientV1Frontend.getRequest('/frontend/reference/exchange_rates', { params }),
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
// IN_APP stays on (400 INBOX_CHANNEL_LOCKED); channels vary by tenant (TELEGRAM needs a bot); PUT upserts any subset.
|
|
142
|
+
notificationPreferences: {
|
|
143
|
+
get: () => apiClientV1Frontend.getRequest('/frontend/notification-preferences'),
|
|
144
|
+
update: (data) => apiClientV1Frontend.putRequest('/frontend/notification-preferences', { data }),
|
|
145
|
+
},
|
|
134
146
|
};
|
|
@@ -1996,7 +1996,7 @@ export interface paths {
|
|
|
1996
1996
|
"application/json": components["schemas"]["ApiErrorResponse"];
|
|
1997
1997
|
};
|
|
1998
1998
|
};
|
|
1999
|
-
/** @description
|
|
1999
|
+
/** @description A cardholder already exists for this person in this wallet + issuing_program — the member named by `user_data_id` already holds one, or one carries this email. `error.details.cardholder_id` names it (when it could be resolved) so the client can adopt it instead of dead-ending. When `user_data_id` names a member who may adopt the row, the row is first completed from that member's KYC dossier: empty identity fields and document photos of a type it does not hold are filled in, and nothing already on it is changed.
|
|
2000
2000
|
* */
|
|
2001
2001
|
409: {
|
|
2002
2002
|
headers: {
|
|
@@ -8267,7 +8267,7 @@ export interface components {
|
|
|
8267
8267
|
/** Format: uuid */
|
|
8268
8268
|
transaction_amount_currency?: string | null;
|
|
8269
8269
|
billing_amount?: number | null;
|
|
8270
|
-
/**
|
|
8270
|
+
/** @description Currency of `billing_amount`. Not uniform across rails: a currency uuid on most orders, an ISO code (e.g. `EUR`) on L2F off-ramps, the destination currency uuid on BC/DLS on-ramps. Use the order's `from_uuid` for the debited currency. */
|
|
8271
8271
|
billing_amount_currency?: string | null;
|
|
8272
8272
|
fee?: number | null;
|
|
8273
8273
|
/** Format: uuid */
|
|
@@ -8286,6 +8286,11 @@ export interface components {
|
|
|
8286
8286
|
from_currency_id?: string | null;
|
|
8287
8287
|
/** Format: uuid */
|
|
8288
8288
|
to_currency_id?: string | null;
|
|
8289
|
+
/**
|
|
8290
|
+
* @description Leg side of an internal transfer: 'out' on the sender's order, 'in' on the receiver's. Card authorizations carry 'out', their refunds 'in'.
|
|
8291
|
+
* @enum {string|null}
|
|
8292
|
+
*/
|
|
8293
|
+
direction?: "in" | "out" | null;
|
|
8289
8294
|
/** Format: uuid */
|
|
8290
8295
|
counterparty_account_id?: string | null;
|
|
8291
8296
|
counterparty_account_name?: string | null;
|
|
@@ -5438,7 +5438,7 @@ export interface paths {
|
|
|
5438
5438
|
};
|
|
5439
5439
|
content?: never;
|
|
5440
5440
|
};
|
|
5441
|
-
/** @description
|
|
5441
|
+
/** @description A cardholder already exists for this person in this wallet + issuing_program — the member named by `user_data_id` already holds one, or one carries this email. `error.details.cardholder_id` names it (when it could be resolved) so the client can adopt it instead of dead-ending. When `user_data_id` names a member who may adopt the row, the row is first completed from that member's KYC dossier: empty identity fields and document photos of a type it does not hold are filled in, and nothing already on it is changed. Re-read the row for its refreshed `missing_kyc_fields`.
|
|
5442
5442
|
* */
|
|
5443
5443
|
409: {
|
|
5444
5444
|
headers: {
|
|
@@ -5749,6 +5749,13 @@ export interface paths {
|
|
|
5749
5749
|
* demands (a required document — usually the selfie — was never captured). Read
|
|
5750
5750
|
* `required_level` to name the bar ("requires FULL verification"). Same remediation as
|
|
5751
5751
|
* `NEEDS_VERIFICATION`, run to add the missing step.
|
|
5752
|
+
* - `NEEDS_COMPLETION` — an ACTIVE cardholder is linked (`cardholder_id`), but it does not
|
|
5753
|
+
* hold what the program's ISSUANCE bar asks for — typically one written before that bar
|
|
5754
|
+
* existed. Creating a card now is refused with `400`; `will_require` names the same
|
|
5755
|
+
* fields that 400 would. Nothing is submitted again: `PATCH` the fields, and for the
|
|
5756
|
+
* document photos call `POST /cardholders` with the member's `user_data_id` — it answers
|
|
5757
|
+
* `409` with this `cardholder_id` after completing the row from the member's KYC
|
|
5758
|
+
* dossier. When the member has not passed that verification, run it first.
|
|
5752
5759
|
* - `NEEDS_RESUBMIT` — the VENDOR's review of the cardholder came back rejected (or asked
|
|
5753
5760
|
* for part of the dossier again). Not a dead end: fix what `reject_reason` names —
|
|
5754
5761
|
* `PATCH` the field, or re-upload and re-attach the document — then call
|
|
@@ -5767,7 +5774,8 @@ export interface paths {
|
|
|
5767
5774
|
*
|
|
5768
5775
|
* **`will_require`**: fields the client should expect to collect BY HAND (same vocabulary
|
|
5769
5776
|
* as the submit 400 `missing` list, e.g. `address.line1`, `tax_identification_number`,
|
|
5770
|
-
* `email or phone`). For `DRAFT` it is the draft's actual leftovers; for `
|
|
5777
|
+
* `email or phone`). For `DRAFT` it is the draft's actual leftovers; for `NEEDS_COMPLETION`
|
|
5778
|
+
* it is what the card create refuses the row over; for `CAN_CREATE` it
|
|
5771
5779
|
* is a projection that assumes the KYC dossier covers what it usually covers — the created
|
|
5772
5780
|
* draft's `missing_kyc_fields` is the authoritative version.
|
|
5773
5781
|
*
|
|
@@ -5813,10 +5821,10 @@ export interface paths {
|
|
|
5813
5821
|
/** Format: uuid */
|
|
5814
5822
|
user_data_id: string;
|
|
5815
5823
|
/** @enum {string} */
|
|
5816
|
-
verdict: "READY" | "DRAFT" | "CAN_CREATE" | "PENDING" | "NEEDS_VERIFICATION" | "NEEDS_VERIFICATION_UPGRADE" | "NEEDS_RESUBMIT" | "ISSUER_REVIEW_PENDING" | "REJECTED" | "NOT_MEMBER";
|
|
5824
|
+
verdict: "READY" | "DRAFT" | "CAN_CREATE" | "PENDING" | "NEEDS_VERIFICATION" | "NEEDS_VERIFICATION_UPGRADE" | "NEEDS_COMPLETION" | "NEEDS_RESUBMIT" | "ISSUER_REVIEW_PENDING" | "REJECTED" | "NOT_MEMBER";
|
|
5817
5825
|
/**
|
|
5818
5826
|
* Format: uuid
|
|
5819
|
-
* @description The linked cardholder for READY / DRAFT / NEEDS_RESUBMIT / ISSUER_REVIEW_PENDING verdicts
|
|
5827
|
+
* @description The linked cardholder for READY / DRAFT / NEEDS_COMPLETION / NEEDS_RESUBMIT / ISSUER_REVIEW_PENDING verdicts
|
|
5820
5828
|
*
|
|
5821
5829
|
*/
|
|
5822
5830
|
cardholder_id: string | null;
|
|
@@ -9374,12 +9382,18 @@ export interface paths {
|
|
|
9374
9382
|
};
|
|
9375
9383
|
requestBody?: never;
|
|
9376
9384
|
responses: {
|
|
9377
|
-
/** @description
|
|
9385
|
+
/** @description The whole order-type catalogue, each with the tenant markup */
|
|
9378
9386
|
200: {
|
|
9379
9387
|
headers: {
|
|
9380
9388
|
[name: string]: unknown;
|
|
9381
9389
|
};
|
|
9382
|
-
content
|
|
9390
|
+
content: {
|
|
9391
|
+
"application/json": {
|
|
9392
|
+
/** @example true */
|
|
9393
|
+
success: boolean;
|
|
9394
|
+
data: components["schemas"]["OrderTypeInfo"][];
|
|
9395
|
+
};
|
|
9396
|
+
};
|
|
9383
9397
|
};
|
|
9384
9398
|
};
|
|
9385
9399
|
};
|
|
@@ -9421,14 +9435,22 @@ export interface paths {
|
|
|
9421
9435
|
headers: {
|
|
9422
9436
|
[name: string]: unknown;
|
|
9423
9437
|
};
|
|
9424
|
-
content
|
|
9438
|
+
content: {
|
|
9439
|
+
"application/json": {
|
|
9440
|
+
/** @example true */
|
|
9441
|
+
success: boolean;
|
|
9442
|
+
data: components["schemas"]["OrderTypeInfo"];
|
|
9443
|
+
};
|
|
9444
|
+
};
|
|
9425
9445
|
};
|
|
9426
9446
|
/** @description Order type not found */
|
|
9427
9447
|
404: {
|
|
9428
9448
|
headers: {
|
|
9429
9449
|
[name: string]: unknown;
|
|
9430
9450
|
};
|
|
9431
|
-
content
|
|
9451
|
+
content: {
|
|
9452
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
9453
|
+
};
|
|
9432
9454
|
};
|
|
9433
9455
|
};
|
|
9434
9456
|
};
|
|
@@ -10111,7 +10133,14 @@ export interface paths {
|
|
|
10111
10133
|
headers: {
|
|
10112
10134
|
[name: string]: unknown;
|
|
10113
10135
|
};
|
|
10114
|
-
content
|
|
10136
|
+
content: {
|
|
10137
|
+
"application/json": {
|
|
10138
|
+
/** @example true */
|
|
10139
|
+
success: boolean;
|
|
10140
|
+
data: components["schemas"]["ExchangeRate"][];
|
|
10141
|
+
pagination: components["schemas"]["PaginationResponse"];
|
|
10142
|
+
};
|
|
10143
|
+
};
|
|
10115
10144
|
};
|
|
10116
10145
|
401: components["responses"]["UnauthorizedError"];
|
|
10117
10146
|
};
|
|
@@ -10164,7 +10193,14 @@ export interface paths {
|
|
|
10164
10193
|
headers: {
|
|
10165
10194
|
[name: string]: unknown;
|
|
10166
10195
|
};
|
|
10167
|
-
content
|
|
10196
|
+
content: {
|
|
10197
|
+
"application/json": {
|
|
10198
|
+
/** @example true */
|
|
10199
|
+
success: boolean;
|
|
10200
|
+
data: components["schemas"]["ReferenceOrderType"][];
|
|
10201
|
+
pagination: components["schemas"]["PaginationResponse"];
|
|
10202
|
+
};
|
|
10203
|
+
};
|
|
10168
10204
|
};
|
|
10169
10205
|
401: components["responses"]["UnauthorizedError"];
|
|
10170
10206
|
};
|
|
@@ -12687,11 +12723,11 @@ export interface paths {
|
|
|
12687
12723
|
* **Access Control**: Any active wallet member. The response shape depends on the caller's role and
|
|
12688
12724
|
* is told apart by `access_role`:
|
|
12689
12725
|
* - `owner` / `admin` / `auditor` — the full wallet (`WalletDetails`): identity, KYC, `balance`,
|
|
12690
|
-
* `fiat_accounts`, `base_currency
|
|
12726
|
+
* `fiat_accounts`, `base_currency`, the totals and `api_access_enabled`.
|
|
12691
12727
|
* - `user` — a shell-only wallet (`WalletDetailsScopedUser`): `uuid`, `id`, `name`, `display_name`,
|
|
12692
12728
|
* `tenant_id`, `kyc_entity_id`, `kyc_info`, `created_at` + the role fields. `logo_url`, `balance`, `fiat_accounts`,
|
|
12693
|
-
* `base_currency`, `fiat_total`, `crypto_total`, `pending_balance` and `
|
|
12694
|
-
* (not null) for that role — check `access_role` before reading them.
|
|
12729
|
+
* `base_currency`, `fiat_total`, `crypto_total`, `pending_balance`, `total_amount` and `api_access_enabled`
|
|
12730
|
+
* are absent (not null) for that role — check `access_role` before reading them.
|
|
12695
12731
|
*
|
|
12696
12732
|
*/
|
|
12697
12733
|
get: {
|
|
@@ -12854,6 +12890,215 @@ export interface paths {
|
|
|
12854
12890
|
};
|
|
12855
12891
|
trace?: never;
|
|
12856
12892
|
};
|
|
12893
|
+
"/frontend/wallets/{wallet_id}/logo": {
|
|
12894
|
+
parameters: {
|
|
12895
|
+
query?: never;
|
|
12896
|
+
header?: never;
|
|
12897
|
+
path?: never;
|
|
12898
|
+
cookie?: never;
|
|
12899
|
+
};
|
|
12900
|
+
get?: never;
|
|
12901
|
+
put?: never;
|
|
12902
|
+
/**
|
|
12903
|
+
* Upload wallet logo
|
|
12904
|
+
* @description Uploads the company logo of the wallet and points `logo_url` at it. Replaces the legacy
|
|
12905
|
+
* `POST /wallets/{wallet_id}/logo`, which answered `{ fullPath }`: this endpoint answers with the
|
|
12906
|
+
* updated wallet — read the new URL from `data.logo_url`.
|
|
12907
|
+
*
|
|
12908
|
+
* The file is checked by its content: PNG, JPEG or WebP, at most 1 MB. SVG is refused.
|
|
12909
|
+
* The previous logo file is kept in storage; only the wallet's pointer changes.
|
|
12910
|
+
*
|
|
12911
|
+
* **Rate limit**: 10 uploads per hour per wallet; over it the endpoint answers `429 RATE_LIMIT_EXCEEDED`.
|
|
12912
|
+
*
|
|
12913
|
+
* **Authentication**: Bearer token with x-tenant-id header required
|
|
12914
|
+
*
|
|
12915
|
+
* **Access Control**: Owner or admin of the wallet; wallet KYC must be APPROVED
|
|
12916
|
+
*
|
|
12917
|
+
*/
|
|
12918
|
+
post: {
|
|
12919
|
+
parameters: {
|
|
12920
|
+
query?: never;
|
|
12921
|
+
header?: never;
|
|
12922
|
+
path: {
|
|
12923
|
+
/** @description The ID of the wallet */
|
|
12924
|
+
wallet_id: string;
|
|
12925
|
+
};
|
|
12926
|
+
cookie?: never;
|
|
12927
|
+
};
|
|
12928
|
+
requestBody: {
|
|
12929
|
+
content: {
|
|
12930
|
+
"multipart/form-data": {
|
|
12931
|
+
/**
|
|
12932
|
+
* Format: binary
|
|
12933
|
+
* @description PNG, JPEG or WebP image, at most 1 MB.
|
|
12934
|
+
*/
|
|
12935
|
+
file: string;
|
|
12936
|
+
};
|
|
12937
|
+
};
|
|
12938
|
+
};
|
|
12939
|
+
responses: {
|
|
12940
|
+
/** @description Logo uploaded. `data` is the updated wallet, the same shape `PATCH /frontend/wallets/{wallet_id}` returns. */
|
|
12941
|
+
200: {
|
|
12942
|
+
headers: {
|
|
12943
|
+
[name: string]: unknown;
|
|
12944
|
+
};
|
|
12945
|
+
content: {
|
|
12946
|
+
"application/json": {
|
|
12947
|
+
/** @example true */
|
|
12948
|
+
success: boolean;
|
|
12949
|
+
data: {
|
|
12950
|
+
/** Format: uuid */
|
|
12951
|
+
uuid: string;
|
|
12952
|
+
name: string | null;
|
|
12953
|
+
/** @description Computed label — wallet name, else KYC-derived (business_name / first+last), else "New account". Always present. */
|
|
12954
|
+
display_name: string;
|
|
12955
|
+
/**
|
|
12956
|
+
* @description Public URL of the uploaded logo.
|
|
12957
|
+
* @example https://api.example.com/storage/logo/0b5c2f4e-6a1d-4c8e-9f3a-2d7b1e5c8a90/7f1e2d3c-4b5a-4968-8776-5a4b3c2d1e0f.png
|
|
12958
|
+
*/
|
|
12959
|
+
logo_url: string;
|
|
12960
|
+
/** Format: uuid */
|
|
12961
|
+
tenant_id: string;
|
|
12962
|
+
/** Format: date-time */
|
|
12963
|
+
created_at: string;
|
|
12964
|
+
/** Format: uuid */
|
|
12965
|
+
kyc_entity_id: string | null;
|
|
12966
|
+
kyc_info: components["schemas"]["WalletKycInfo"] | null;
|
|
12967
|
+
};
|
|
12968
|
+
/** @example Wallet logo uploaded successfully */
|
|
12969
|
+
message: string;
|
|
12970
|
+
};
|
|
12971
|
+
};
|
|
12972
|
+
};
|
|
12973
|
+
/** @description No file, more than one file, a file over 1 MB, or content that is not a PNG, JPEG or WebP image
|
|
12974
|
+
* (`INVALID_WALLET_LOGO`).
|
|
12975
|
+
* */
|
|
12976
|
+
400: {
|
|
12977
|
+
headers: {
|
|
12978
|
+
[name: string]: unknown;
|
|
12979
|
+
};
|
|
12980
|
+
content?: never;
|
|
12981
|
+
};
|
|
12982
|
+
/** @description Caller is not owner/admin of the wallet, or wallet KYC not approved */
|
|
12983
|
+
403: {
|
|
12984
|
+
headers: {
|
|
12985
|
+
[name: string]: unknown;
|
|
12986
|
+
};
|
|
12987
|
+
content?: never;
|
|
12988
|
+
};
|
|
12989
|
+
/** @description Wallet not found */
|
|
12990
|
+
404: {
|
|
12991
|
+
headers: {
|
|
12992
|
+
[name: string]: unknown;
|
|
12993
|
+
};
|
|
12994
|
+
content?: never;
|
|
12995
|
+
};
|
|
12996
|
+
/** @description More than 10 logo uploads for this wallet within the last hour (`RATE_LIMIT_EXCEEDED`) */
|
|
12997
|
+
429: {
|
|
12998
|
+
headers: {
|
|
12999
|
+
[name: string]: unknown;
|
|
13000
|
+
};
|
|
13001
|
+
content?: never;
|
|
13002
|
+
};
|
|
13003
|
+
/** @description Server error */
|
|
13004
|
+
500: {
|
|
13005
|
+
headers: {
|
|
13006
|
+
[name: string]: unknown;
|
|
13007
|
+
};
|
|
13008
|
+
content?: never;
|
|
13009
|
+
};
|
|
13010
|
+
/** @description Logo upload is not configured on this server */
|
|
13011
|
+
503: {
|
|
13012
|
+
headers: {
|
|
13013
|
+
[name: string]: unknown;
|
|
13014
|
+
};
|
|
13015
|
+
content?: never;
|
|
13016
|
+
};
|
|
13017
|
+
};
|
|
13018
|
+
};
|
|
13019
|
+
/**
|
|
13020
|
+
* Reset wallet logo
|
|
13021
|
+
* @description Removes the company logo of the wallet: `logo_url` becomes `null`. Idempotent — resetting a wallet
|
|
13022
|
+
* without a logo succeeds the same way.
|
|
13023
|
+
*
|
|
13024
|
+
* **Authentication**: Bearer token with x-tenant-id header required
|
|
13025
|
+
*
|
|
13026
|
+
* **Access Control**: Owner or admin of the wallet; wallet KYC must be APPROVED
|
|
13027
|
+
*
|
|
13028
|
+
*/
|
|
13029
|
+
delete: {
|
|
13030
|
+
parameters: {
|
|
13031
|
+
query?: never;
|
|
13032
|
+
header?: never;
|
|
13033
|
+
path: {
|
|
13034
|
+
/** @description The ID of the wallet */
|
|
13035
|
+
wallet_id: string;
|
|
13036
|
+
};
|
|
13037
|
+
cookie?: never;
|
|
13038
|
+
};
|
|
13039
|
+
requestBody?: never;
|
|
13040
|
+
responses: {
|
|
13041
|
+
/** @description Logo removed. `data` is the updated wallet, the same shape `PATCH /frontend/wallets/{wallet_id}` returns. */
|
|
13042
|
+
200: {
|
|
13043
|
+
headers: {
|
|
13044
|
+
[name: string]: unknown;
|
|
13045
|
+
};
|
|
13046
|
+
content: {
|
|
13047
|
+
"application/json": {
|
|
13048
|
+
/** @example true */
|
|
13049
|
+
success: boolean;
|
|
13050
|
+
data: {
|
|
13051
|
+
/** Format: uuid */
|
|
13052
|
+
uuid: string;
|
|
13053
|
+
name: string | null;
|
|
13054
|
+
/** @description Computed label — wallet name, else KYC-derived (business_name / first+last), else "New account". Always present. */
|
|
13055
|
+
display_name: string;
|
|
13056
|
+
/**
|
|
13057
|
+
* @description Always `null` after a reset.
|
|
13058
|
+
* @example null
|
|
13059
|
+
*/
|
|
13060
|
+
logo_url: string | null;
|
|
13061
|
+
/** Format: uuid */
|
|
13062
|
+
tenant_id: string;
|
|
13063
|
+
/** Format: date-time */
|
|
13064
|
+
created_at: string;
|
|
13065
|
+
/** Format: uuid */
|
|
13066
|
+
kyc_entity_id: string | null;
|
|
13067
|
+
kyc_info: components["schemas"]["WalletKycInfo"] | null;
|
|
13068
|
+
};
|
|
13069
|
+
/** @example Wallet logo removed successfully */
|
|
13070
|
+
message: string;
|
|
13071
|
+
};
|
|
13072
|
+
};
|
|
13073
|
+
};
|
|
13074
|
+
/** @description Caller is not owner/admin of the wallet, or wallet KYC not approved */
|
|
13075
|
+
403: {
|
|
13076
|
+
headers: {
|
|
13077
|
+
[name: string]: unknown;
|
|
13078
|
+
};
|
|
13079
|
+
content?: never;
|
|
13080
|
+
};
|
|
13081
|
+
/** @description Wallet not found */
|
|
13082
|
+
404: {
|
|
13083
|
+
headers: {
|
|
13084
|
+
[name: string]: unknown;
|
|
13085
|
+
};
|
|
13086
|
+
content?: never;
|
|
13087
|
+
};
|
|
13088
|
+
/** @description Server error */
|
|
13089
|
+
500: {
|
|
13090
|
+
headers: {
|
|
13091
|
+
[name: string]: unknown;
|
|
13092
|
+
};
|
|
13093
|
+
content?: never;
|
|
13094
|
+
};
|
|
13095
|
+
};
|
|
13096
|
+
};
|
|
13097
|
+
options?: never;
|
|
13098
|
+
head?: never;
|
|
13099
|
+
patch?: never;
|
|
13100
|
+
trace?: never;
|
|
13101
|
+
};
|
|
12857
13102
|
"/frontend/wallets/{wallet_id}/balance": {
|
|
12858
13103
|
parameters: {
|
|
12859
13104
|
query?: never;
|
|
@@ -14485,6 +14730,90 @@ export interface components {
|
|
|
14485
14730
|
total: number;
|
|
14486
14731
|
has_more: boolean;
|
|
14487
14732
|
};
|
|
14733
|
+
/** @description A currency pair enabled for the tenant: the `exchange_rates` row with the tenant FX spread applied. Pairs a vendor rate table adds for its own order types (Reap Payments, `RPP_*`) have no `id`. */
|
|
14734
|
+
ExchangeRate: {
|
|
14735
|
+
/** @description Absent on a vendor-only pair */
|
|
14736
|
+
id?: number;
|
|
14737
|
+
/** Format: date-time */
|
|
14738
|
+
updated_at: string;
|
|
14739
|
+
/** @description Symbol of the currency sold */
|
|
14740
|
+
from?: string;
|
|
14741
|
+
/** @description Symbol of the currency bought */
|
|
14742
|
+
to?: string;
|
|
14743
|
+
/** @description Rate the tenant trades at — `base_rate` with `fx_spread_percent` taken off */
|
|
14744
|
+
rate: number;
|
|
14745
|
+
/** @description Exact inverse of `rate` */
|
|
14746
|
+
inverted_rate: number;
|
|
14747
|
+
/**
|
|
14748
|
+
* @description Feed the market rate came from; `reap_payments` on vendor pairs
|
|
14749
|
+
* @enum {string|null}
|
|
14750
|
+
*/
|
|
14751
|
+
rate_source?: "cryptomus" | "coingecko" | "openexchangerates" | "reap_payments" | null;
|
|
14752
|
+
/** Format: uuid */
|
|
14753
|
+
from_uuid: string;
|
|
14754
|
+
/** Format: uuid */
|
|
14755
|
+
to_uuid: string;
|
|
14756
|
+
/** @description Market rate before the tenant FX spread */
|
|
14757
|
+
base_rate: number;
|
|
14758
|
+
/** @description Tenant FX spread taken off `base_rate`, in percent; 0 when none applies */
|
|
14759
|
+
fx_spread_percent: number;
|
|
14760
|
+
};
|
|
14761
|
+
/**
|
|
14762
|
+
* @description Rail an order type pays through (`order_types.payment_method`)
|
|
14763
|
+
* @enum {string}
|
|
14764
|
+
*/
|
|
14765
|
+
OrderPaymentMethod: "ACH" | "SWIFT" | "SEPA" | "CRYPTO_EXTERNAL" | "CRYPTO_INTERNAL" | "CHAPS" | "FPS" | "FEDWIRE" | "RTP" | "INTERNAL" | "CARD";
|
|
14766
|
+
/** @description The tenant's markup for the order type (`tenant_order_type_rates`) */
|
|
14767
|
+
OrderTypeTenantRates: {
|
|
14768
|
+
markup_percent: number | null;
|
|
14769
|
+
markup_fixed: number | null;
|
|
14770
|
+
mon_min_usd: number | null;
|
|
14771
|
+
};
|
|
14772
|
+
/** @description An order type from the global catalogue (`order_types`), with its KYC rails and the tenant markup. */
|
|
14773
|
+
OrderTypeInfo: {
|
|
14774
|
+
/** @description Order type id, e.g. `TRANSFER_CARD_SUBACCOUNT` */
|
|
14775
|
+
id: string;
|
|
14776
|
+
name: string | null;
|
|
14777
|
+
description: string | null;
|
|
14778
|
+
/** @enum {string|null} */
|
|
14779
|
+
transaction_type: "deposit" | "withdrawal" | null;
|
|
14780
|
+
payment_method: components["schemas"]["OrderPaymentMethod"] | null;
|
|
14781
|
+
is_internal: boolean | null;
|
|
14782
|
+
/** @description Trusted order types skip the OTP step on approve */
|
|
14783
|
+
is_trusted: boolean;
|
|
14784
|
+
is_deprecated: boolean;
|
|
14785
|
+
/** @description Payouts are limited to the wallet owner's own account */
|
|
14786
|
+
first_party_only: boolean;
|
|
14787
|
+
/**
|
|
14788
|
+
* Format: uuid
|
|
14789
|
+
* @description Legacy single rail; use `order_types_kyc_rails`
|
|
14790
|
+
*/
|
|
14791
|
+
kyc_rails_id: string | null;
|
|
14792
|
+
/** @description Minimum amount the product should allow */
|
|
14793
|
+
min_amount: number | null;
|
|
14794
|
+
/** @description Maximum amount the product should allow */
|
|
14795
|
+
max_amount: number | null;
|
|
14796
|
+
order_types_kyc_rails: {
|
|
14797
|
+
/** Format: uuid */
|
|
14798
|
+
id: string;
|
|
14799
|
+
/** Format: uuid */
|
|
14800
|
+
kyc_rail_id: string;
|
|
14801
|
+
}[];
|
|
14802
|
+
/** @description Null when the tenant has no rate row for the type; absent if the rates lookup failed */
|
|
14803
|
+
tenant_rates?: components["schemas"]["OrderTypeTenantRates"] | null;
|
|
14804
|
+
};
|
|
14805
|
+
/** @description An order type enabled for the tenant — one with a `tenant_order_type_rates` row. */
|
|
14806
|
+
ReferenceOrderType: {
|
|
14807
|
+
id: string;
|
|
14808
|
+
description: string | null;
|
|
14809
|
+
is_internal: boolean | null;
|
|
14810
|
+
payment_method: components["schemas"]["OrderPaymentMethod"] | null;
|
|
14811
|
+
is_trusted: boolean;
|
|
14812
|
+
min_amount: number | null;
|
|
14813
|
+
max_amount: number | null;
|
|
14814
|
+
first_party_only: boolean;
|
|
14815
|
+
tenant_rates: components["schemas"]["OrderTypeTenantRates"];
|
|
14816
|
+
};
|
|
14488
14817
|
ErrorResponse: {
|
|
14489
14818
|
/** @example false */
|
|
14490
14819
|
success?: boolean;
|
|
@@ -15692,7 +16021,7 @@ export interface components {
|
|
|
15692
16021
|
transaction_amount_currency?: string | null;
|
|
15693
16022
|
/** @description Total amount debited (including fees) */
|
|
15694
16023
|
billing_amount?: number | null;
|
|
15695
|
-
/**
|
|
16024
|
+
/** @description Currency of `billing_amount`. Not uniform across rails: a currency uuid on most orders, an ISO code (e.g. `EUR`) on L2F off-ramps, the destination currency uuid on BC/DLS on-ramps. Use the order's `from_uuid` for the debited currency. */
|
|
15696
16025
|
billing_amount_currency?: string | null;
|
|
15697
16026
|
fee?: number | null;
|
|
15698
16027
|
/** Format: uuid */
|
|
@@ -15739,6 +16068,11 @@ export interface components {
|
|
|
15739
16068
|
linked_order_uuid?: string | null;
|
|
15740
16069
|
/** @description True when the order settled as an internal (on-platform) transfer */
|
|
15741
16070
|
is_internal?: boolean | null;
|
|
16071
|
+
/**
|
|
16072
|
+
* @description Leg side of an internal transfer: 'out' on the sender's order, 'in' on the receiver's. Card authorizations carry 'out', their refunds 'in'.
|
|
16073
|
+
* @enum {string|null}
|
|
16074
|
+
*/
|
|
16075
|
+
direction?: "in" | "out" | null;
|
|
15742
16076
|
/** Format: uuid */
|
|
15743
16077
|
counterparty_account_id?: string | null;
|
|
15744
16078
|
counterparty_account_name?: string | null;
|
|
@@ -16171,6 +16505,11 @@ export interface components {
|
|
|
16171
16505
|
crypto_total: number;
|
|
16172
16506
|
pending_balance: number;
|
|
16173
16507
|
total_amount: number;
|
|
16508
|
+
/**
|
|
16509
|
+
* @description Whether the wallet may use the developer API (`/api/*` with a wallet-bound key). Off by default; only a platform owner switches it. While `false`, API keys of this wallet are refused with `403 WALLET_API_DISABLED`.
|
|
16510
|
+
* @example false
|
|
16511
|
+
*/
|
|
16512
|
+
api_access_enabled: boolean;
|
|
16174
16513
|
/**
|
|
16175
16514
|
* @description The caller's role for this wallet. Never `user` on this shape. (enum property replaced by openapi-typescript)
|
|
16176
16515
|
* @enum {string}
|
|
@@ -16184,7 +16523,7 @@ export interface components {
|
|
|
16184
16523
|
/** @description `true` exactly when `access_role` is `owner`. */
|
|
16185
16524
|
is_owner: boolean;
|
|
16186
16525
|
};
|
|
16187
|
-
/** @description Shell-only wallet read for the scoped `user` role: identity, KYC and display name. No main-account financials are ever included — `logo_url`, `balance`, `fiat_accounts`, `base_currency`, `fiat_total`, `crypto_total`, `pending_balance` and `
|
|
16526
|
+
/** @description Shell-only wallet read for the scoped `user` role: identity, KYC and display name. No main-account financials are ever included — `logo_url`, `balance`, `fiat_accounts`, `base_currency`, `fiat_total`, `crypto_total`, `pending_balance`, `total_amount` and `api_access_enabled` are absent, not null. Check `access_role` before reading balances. */
|
|
16188
16527
|
WalletDetailsScopedUser: {
|
|
16189
16528
|
/** Format: uuid */
|
|
16190
16529
|
uuid: string;
|
|
@@ -16259,6 +16598,11 @@ export interface components {
|
|
|
16259
16598
|
to_fiat_account_id?: string;
|
|
16260
16599
|
to_vendor_id?: string;
|
|
16261
16600
|
txid?: string;
|
|
16601
|
+
/**
|
|
16602
|
+
* @description Which side of the movement this row is: 'out' debits the wallet, 'in' credits it. Set on internal-transfer legs (copied from the order's meta), card authorizations ('out') and their refunds ('in').
|
|
16603
|
+
* @enum {string}
|
|
16604
|
+
*/
|
|
16605
|
+
direction?: "in" | "out";
|
|
16262
16606
|
/** Format: uuid */
|
|
16263
16607
|
order_id?: string;
|
|
16264
16608
|
} & {
|
|
@@ -751,6 +751,32 @@ export declare namespace API {
|
|
|
751
751
|
}
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
|
+
namespace Reference {
|
|
755
|
+
namespace ExchangeRates {
|
|
756
|
+
type ExchangeRatesRoot = pathsV1Frontend['/frontend/reference/exchange_rates'];
|
|
757
|
+
export type ExchangeRate = componentsV1Frontend['schemas']['ExchangeRate'];
|
|
758
|
+
export namespace List {
|
|
759
|
+
type Request = NonNullable<ExchangeRatesRoot['get']['parameters']['query']>;
|
|
760
|
+
type Response = ExchangeRatesRoot['get']['responses'][200]['content']['application/json'];
|
|
761
|
+
}
|
|
762
|
+
export {};
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
namespace NotificationPreferences {
|
|
766
|
+
type NotificationPreferencesRoot = pathsV1Frontend['/frontend/notification-preferences'];
|
|
767
|
+
export type ChannelPreference = componentsV1Frontend['schemas']['NotificationPreference'];
|
|
768
|
+
export type CategoryPreference = componentsV1Frontend['schemas']['NotificationCategoryPreference'];
|
|
769
|
+
export type Channel = ChannelPreference['channel'];
|
|
770
|
+
export type Category = CategoryPreference['category'];
|
|
771
|
+
export namespace Get {
|
|
772
|
+
type Response = NotificationPreferencesRoot['get']['responses'][200]['content']['application/json'];
|
|
773
|
+
}
|
|
774
|
+
export namespace Update {
|
|
775
|
+
type Request = NotificationPreferencesRoot['put']['requestBody']['content']['application/json'];
|
|
776
|
+
type Response = NotificationPreferencesRoot['put']['responses'][200]['content']['application/json'];
|
|
777
|
+
}
|
|
778
|
+
export {};
|
|
779
|
+
}
|
|
754
780
|
namespace Issuing {
|
|
755
781
|
type CardsRoot = pathsV1Frontend['/frontend/issuing/cards'];
|
|
756
782
|
type CardRoot = pathsV1Frontend['/frontend/issuing/cards/{card_id}'];
|
|
@@ -2534,11 +2560,11 @@ export declare namespace API {
|
|
|
2534
2560
|
}
|
|
2535
2561
|
namespace Types {
|
|
2536
2562
|
namespace List {
|
|
2537
|
-
type Response =
|
|
2563
|
+
type Response = pathsV1Frontend['/frontend/orders/types']['get']['responses'][200]['content']['application/json'];
|
|
2538
2564
|
}
|
|
2539
2565
|
namespace GetById {
|
|
2540
2566
|
type Request = pathsV1Frontend['/frontend/orders/types/{id}']['get']['parameters']['path'];
|
|
2541
|
-
type Response =
|
|
2567
|
+
type Response = pathsV1Frontend['/frontend/orders/types/{id}']['get']['responses'][200]['content']['application/json'];
|
|
2542
2568
|
}
|
|
2543
2569
|
}
|
|
2544
2570
|
}
|
|
@@ -2929,6 +2955,11 @@ export declare namespace API {
|
|
|
2929
2955
|
type Request = operations['UserController_updateMyUserData']['requestBody']['content']['application/json'];
|
|
2930
2956
|
type Response = operations['UserController_updateMyUserData']['responses']['200']['content']['application/json'];
|
|
2931
2957
|
}
|
|
2958
|
+
namespace Logo {
|
|
2959
|
+
namespace Upload {
|
|
2960
|
+
type Response = operations['UserController_uploadLogoFile']['responses']['200']['content']['application/json'];
|
|
2961
|
+
}
|
|
2962
|
+
}
|
|
2932
2963
|
}
|
|
2933
2964
|
namespace Verification {
|
|
2934
2965
|
type Flow = components['schemas']['UserVerificationFlow'];
|
|
@@ -2949,6 +2980,7 @@ export declare namespace API {
|
|
|
2949
2980
|
}
|
|
2950
2981
|
type WalletsRoot = pathsV1Frontend['/frontend/wallets'];
|
|
2951
2982
|
type WalletByIdRoot = pathsV1Frontend['/frontend/wallets/{wallet_id}'];
|
|
2983
|
+
type WalletLogoRoot = pathsV1Frontend['/frontend/wallets/{wallet_id}/logo'];
|
|
2952
2984
|
type WalletBalanceRoot = pathsV1Frontend['/frontend/wallets/{wallet_id}/balance'];
|
|
2953
2985
|
type WalletDashboardRoot = pathsV1Frontend['/frontend/wallets/{wallet_id}/dashboard'];
|
|
2954
2986
|
type WalletAddressesRoot = pathsV1Frontend['/frontend/wallets/{wallet_id}/addresses'];
|
|
@@ -2985,6 +3017,18 @@ export declare namespace API {
|
|
|
2985
3017
|
type Response = WalletByIdRoot['patch']['responses']['200']['content']['application/json'];
|
|
2986
3018
|
}
|
|
2987
3019
|
}
|
|
3020
|
+
export namespace Logo {
|
|
3021
|
+
namespace Upload {
|
|
3022
|
+
type Request = WalletLogoRoot['post']['parameters']['path'] & {
|
|
3023
|
+
file: File;
|
|
3024
|
+
};
|
|
3025
|
+
type Response = WalletLogoRoot['post']['responses']['200']['content']['application/json'];
|
|
3026
|
+
}
|
|
3027
|
+
namespace Delete {
|
|
3028
|
+
type Request = WalletLogoRoot['delete']['parameters']['path'];
|
|
3029
|
+
type Response = WalletLogoRoot['delete']['responses']['200']['content']['application/json'];
|
|
3030
|
+
}
|
|
3031
|
+
}
|
|
2988
3032
|
export namespace Balance {
|
|
2989
3033
|
type Request = WalletBalanceRoot['get']['parameters']['path'] & NonNullable<WalletBalanceRoot['get']['parameters']['query']>;
|
|
2990
3034
|
type Response = WalletBalanceRoot['get']['responses']['200']['content']['application/json'];
|
package/dist/api/user.d.ts
CHANGED
|
@@ -6,6 +6,10 @@ export declare const user: {
|
|
|
6
6
|
userData: {
|
|
7
7
|
get: (options?: GetUserDataOptions) => Promise<API.User.UserData.Get.Response>;
|
|
8
8
|
update: (data: API.User.UserData.Update.Request) => Promise<API.User.UserData.Update.Response>;
|
|
9
|
+
logo: {
|
|
10
|
+
upload: (file: File) => Promise<API.User.UserData.Logo.Upload.Response>;
|
|
11
|
+
delete: () => Promise<void>;
|
|
12
|
+
};
|
|
9
13
|
};
|
|
10
14
|
verification: {
|
|
11
15
|
init: (data: API.User.Verification.Init.Request) => Promise<API.User.Verification.Init.Response>;
|
package/dist/api/user.js
CHANGED
|
@@ -3,6 +3,16 @@ export const user = {
|
|
|
3
3
|
userData: {
|
|
4
4
|
get: (options) => apiClientV2.getRequest('/user/user-data', options?.bypassUnauthorizedHandler ? { context: { bypassUnauthorizedHandler: true } } : undefined),
|
|
5
5
|
update: (data) => apiClientV2.patchRequest('/user/user-data', { data }),
|
|
6
|
+
logo: {
|
|
7
|
+
upload: (file) => {
|
|
8
|
+
const formData = new FormData();
|
|
9
|
+
formData.append('file', file);
|
|
10
|
+
return apiClientV2.postRequest('/user/user-data/logo', {
|
|
11
|
+
data: formData,
|
|
12
|
+
});
|
|
13
|
+
},
|
|
14
|
+
delete: () => apiClientV2.deleteRequest('/user/user-data/logo'),
|
|
15
|
+
},
|
|
6
16
|
},
|
|
7
17
|
verification: {
|
|
8
18
|
// Starts (or moves up) the per-user Sumsub level for the requested step and returns the WebSDK
|
package/dist/api/wallets.d.ts
CHANGED
|
@@ -4,6 +4,10 @@ export declare const wallets: {
|
|
|
4
4
|
getAll: (params?: API.Wallets.WalletsList.Request) => Promise<API.Wallets.WalletsList.Response>;
|
|
5
5
|
getByUuid: ({ wallet_id, ...params }: API.Wallets.Wallet.GetByUuid.Request) => Promise<API.Wallets.Wallet.GetByUuid.Response>;
|
|
6
6
|
update: ({ wallet_id, ...data }: API.Wallets.Wallet.Update.Request) => Promise<API.Wallets.Wallet.Update.Response>;
|
|
7
|
+
logo: {
|
|
8
|
+
upload: ({ wallet_id, file }: API.Wallets.Logo.Upload.Request) => Promise<API.Wallets.Logo.Upload.Response>;
|
|
9
|
+
delete: ({ wallet_id }: API.Wallets.Logo.Delete.Request) => Promise<API.Wallets.Logo.Delete.Response>;
|
|
10
|
+
};
|
|
7
11
|
getBalance: ({ wallet_id, ...params }: API.Wallets.Balance.Request) => Promise<API.Wallets.Balance.Response>;
|
|
8
12
|
getDashboard: ({ wallet_id, ...params }: API.Wallets.Dashboard.Request) => Promise<API.Wallets.Dashboard.Response>;
|
|
9
13
|
addresses: {
|
package/dist/api/wallets.js
CHANGED
|
@@ -9,6 +9,18 @@ export const wallets = {
|
|
|
9
9
|
update: ({ wallet_id, ...data }) => apiClientV1Frontend.patchRequest(`/frontend/wallets/${wallet_id}`, {
|
|
10
10
|
data,
|
|
11
11
|
}),
|
|
12
|
+
// Company logo. Both calls answer with the updated wallet (read `data.logo_url`), unlike the legacy apiV2
|
|
13
|
+
// `POST /wallets/{wallet_id}/logo` and its `{ fullPath }`. Owner/admin only; the wallet's KYC must be APPROVED.
|
|
14
|
+
logo: {
|
|
15
|
+
upload: ({ wallet_id, file }) => {
|
|
16
|
+
const formData = new FormData();
|
|
17
|
+
formData.append('file', file);
|
|
18
|
+
return apiClientV1Frontend.postRequest(`/frontend/wallets/${wallet_id}/logo`, {
|
|
19
|
+
data: formData,
|
|
20
|
+
});
|
|
21
|
+
},
|
|
22
|
+
delete: ({ wallet_id }) => apiClientV1Frontend.deleteRequest(`/frontend/wallets/${wallet_id}/logo`),
|
|
23
|
+
},
|
|
12
24
|
getBalance: ({ wallet_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/wallets/${wallet_id}/balance`, { params }),
|
|
13
25
|
getDashboard: ({ wallet_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/wallets/${wallet_id}/dashboard`, { params }),
|
|
14
26
|
addresses: {
|