squarefi-bff-api-module 1.36.53 → 1.36.55
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/mass-payouts.d.ts +5 -0
- package/dist/api/mass-payouts.js +10 -0
- package/dist/api/storage.d.ts +9 -0
- package/dist/api/storage.js +15 -0
- package/dist/api/types/autogen/apiV1External.types.d.ts +13 -1
- package/dist/api/types/autogen/apiV1Frontend.types.d.ts +104 -17
- package/dist/api/types/autogen/apiV1Legacy.types.d.ts +54 -1
- package/dist/api/types/autogen/apiV1Tenant.types.d.ts +8 -0
- package/dist/api/types/autogen/apiV2.types.d.ts +70 -1
- package/dist/api/types/types.d.ts +70 -1
- package/package.json +1 -1
|
@@ -7,6 +7,11 @@ import { API } from './types/types';
|
|
|
7
7
|
*
|
|
8
8
|
* `list` / `items` filter by a single status value (not an array), so they need none of the
|
|
9
9
|
* comma-joining the issuing list endpoints do.
|
|
10
|
+
*
|
|
11
|
+
* Two limits live outside this client. The recipient caps are per-tenant and come from
|
|
12
|
+
* `tenants.config.get()` under `mass_payouts` (`API.MassPayouts.Config`) — never hardcode them.
|
|
13
|
+
* The batch a payment belongs to is read off the order (`mass_payout`), and a feed is narrowed to
|
|
14
|
+
* one batch with the `mass_payout_id` order-list filter, not from here.
|
|
10
15
|
*/
|
|
11
16
|
export declare const massPayouts: {
|
|
12
17
|
list: ({ wallet_id, ...params }: API.MassPayouts.List.Request) => Promise<API.MassPayouts.List.Response>;
|
package/dist/api/mass-payouts.js
CHANGED
|
@@ -7,6 +7,11 @@ import { apiClientV1Frontend } from '../utils/apiClientFactory';
|
|
|
7
7
|
*
|
|
8
8
|
* `list` / `items` filter by a single status value (not an array), so they need none of the
|
|
9
9
|
* comma-joining the issuing list endpoints do.
|
|
10
|
+
*
|
|
11
|
+
* Two limits live outside this client. The recipient caps are per-tenant and come from
|
|
12
|
+
* `tenants.config.get()` under `mass_payouts` (`API.MassPayouts.Config`) — never hardcode them.
|
|
13
|
+
* The batch a payment belongs to is read off the order (`mass_payout`), and a feed is narrowed to
|
|
14
|
+
* one batch with the `mass_payout_id` order-list filter, not from here.
|
|
10
15
|
*/
|
|
11
16
|
export const massPayouts = {
|
|
12
17
|
list: ({ wallet_id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/mass-payouts/${wallet_id}`, { params }),
|
|
@@ -22,6 +27,11 @@ export const massPayouts = {
|
|
|
22
27
|
}),
|
|
23
28
|
preview: ({ wallet_id, id }) => apiClientV1Frontend.getRequest(`/frontend/mass-payouts/${wallet_id}/${id}/preview`),
|
|
24
29
|
submit: ({ wallet_id, id }) => apiClientV1Frontend.postRequest(`/frontend/mass-payouts/${wallet_id}/${id}/submit`),
|
|
30
|
+
// Second factor is mandatory and per-batch: run the `totp.otp_verification` flow with the batch
|
|
31
|
+
// id as `request_id` and let the user complete it BEFORE calling this, or approve answers 403
|
|
32
|
+
// `VERIFICATION_NOT_APPROVED` (404 `REQUEST_ID_NOT_FOUND` when none was ever requested). The
|
|
33
|
+
// check runs before anything is claimed, so a refusal leaves the batch untouched and approve can
|
|
34
|
+
// simply be retried. Clerk tenants additionally need a step-up verified within the last 10 min.
|
|
25
35
|
approve: ({ wallet_id, id }) => apiClientV1Frontend.postRequest(`/frontend/mass-payouts/${wallet_id}/${id}/approve`),
|
|
26
36
|
cancel: ({ wallet_id, id }) => apiClientV1Frontend.postRequest(`/frontend/mass-payouts/${wallet_id}/${id}/cancel`),
|
|
27
37
|
// `text/csv`, not the JSON envelope — the raw CSV body is resolved as a string. `responseType`
|
package/dist/api/storage.d.ts
CHANGED
|
@@ -5,4 +5,13 @@ export declare const storage: {
|
|
|
5
5
|
getFileUrl: ({ path }: API.Storage.KYC.GetFileUrl.Request) => Promise<API.Storage.KYC.GetFileUrl.Response>;
|
|
6
6
|
getFileById: ({ folderId, fileId, }: API.Storage.KYC.GetFileById.Request) => Promise<API.Storage.KYC.GetFileById.Response>;
|
|
7
7
|
};
|
|
8
|
+
/**
|
|
9
|
+
* Supporting documents for orders and mass payouts. Separate bucket from KYC. Upload the file
|
|
10
|
+
* first, then pass the returned path as `documents[].url` on the order or the mass payout row —
|
|
11
|
+
* the payout schemas carry the link only, never the bytes. PDF/JPEG/PNG, up to 20 MB.
|
|
12
|
+
*/
|
|
13
|
+
orderDocuments: {
|
|
14
|
+
upload: (file: File) => Promise<API.Storage.OrderDocuments.Upload.Response>;
|
|
15
|
+
getFileById: ({ folderId, fileId, }: API.Storage.OrderDocuments.GetFileById.Request) => Promise<API.Storage.OrderDocuments.GetFileById.Response>;
|
|
16
|
+
};
|
|
8
17
|
};
|
package/dist/api/storage.js
CHANGED
|
@@ -13,4 +13,19 @@ export const storage = {
|
|
|
13
13
|
}),
|
|
14
14
|
getFileById: ({ folderId, fileId, }) => apiClientV2.getRequest(`/storage/kyc/${folderId}/${fileId}`),
|
|
15
15
|
},
|
|
16
|
+
/**
|
|
17
|
+
* Supporting documents for orders and mass payouts. Separate bucket from KYC. Upload the file
|
|
18
|
+
* first, then pass the returned path as `documents[].url` on the order or the mass payout row —
|
|
19
|
+
* the payout schemas carry the link only, never the bytes. PDF/JPEG/PNG, up to 20 MB.
|
|
20
|
+
*/
|
|
21
|
+
orderDocuments: {
|
|
22
|
+
upload: (file) => {
|
|
23
|
+
const formData = new FormData();
|
|
24
|
+
formData.append('file', file);
|
|
25
|
+
return apiClientV2.postRequest('/storage/order-documents', {
|
|
26
|
+
data: formData,
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
getFileById: ({ folderId, fileId, }) => apiClientV2.getRequest(`/storage/order-documents/${folderId}/${fileId}`),
|
|
30
|
+
},
|
|
16
31
|
};
|
|
@@ -4854,7 +4854,11 @@ export interface paths {
|
|
|
4854
4854
|
limit?: number;
|
|
4855
4855
|
sort_by?: string;
|
|
4856
4856
|
sort_order?: "asc" | "desc";
|
|
4857
|
-
/** @description JSON-encoded filters
|
|
4857
|
+
/** @description JSON-encoded array of filters, e.g. `[{"status":"COMPLETE"}]`.
|
|
4858
|
+
* Besides order columns it accepts `mass_payout_id` (uuid), which narrows the
|
|
4859
|
+
* result to the orders of one mass payout batch — the same batch reported by
|
|
4860
|
+
* the `mass_payout_id` field of each order. A non-uuid value is rejected with 400.
|
|
4861
|
+
* */
|
|
4858
4862
|
filters?: string;
|
|
4859
4863
|
date_from?: string;
|
|
4860
4864
|
date_to?: string;
|
|
@@ -7375,6 +7379,8 @@ export interface components {
|
|
|
7375
7379
|
* @description Associated issuing program ID
|
|
7376
7380
|
*/
|
|
7377
7381
|
issuing_program_id?: string;
|
|
7382
|
+
/** @description Cards issued to this person (every status, canceled included), including cards on sibling per-vendor rows of the same person. Always present on list/get/PATCH; 0 when none. */
|
|
7383
|
+
cards_count?: number;
|
|
7378
7384
|
address?: components["schemas"]["CardholderAddress"];
|
|
7379
7385
|
};
|
|
7380
7386
|
/** @description An uploaded KYC file, addressable before it is attached to a cardholder */
|
|
@@ -8141,6 +8147,12 @@ export interface components {
|
|
|
8141
8147
|
sub_account_id?: string | null;
|
|
8142
8148
|
info?: string | null;
|
|
8143
8149
|
meta?: components["schemas"]["OrderMeta"];
|
|
8150
|
+
/** @description Batch this order was created by, when it was sent as part of a mass payout; null for a standalone order. Filter the list by it with `filters=[{"mass_payout_id":"<uuid>"}]`. */
|
|
8151
|
+
mass_payout?: {
|
|
8152
|
+
/** Format: uuid */
|
|
8153
|
+
id?: string;
|
|
8154
|
+
name?: string | null;
|
|
8155
|
+
} | null;
|
|
8144
8156
|
/**
|
|
8145
8157
|
* Format: date-time
|
|
8146
8158
|
* @description Requested execution time for scheduled payments (status EXPECTED); null for immediate orders
|
|
@@ -4602,8 +4602,8 @@ export interface paths {
|
|
|
4602
4602
|
code?: string | null;
|
|
4603
4603
|
/** @description Initial topup amount */
|
|
4604
4604
|
initial_topup?: number | null;
|
|
4605
|
-
/** @description Card design
|
|
4606
|
-
card_design?:
|
|
4605
|
+
/** @description Card artwork for this program; null = use the app's built-in design */
|
|
4606
|
+
card_design?: components["schemas"]["CardDesign"] | null;
|
|
4607
4607
|
/** @description Legal consent text for card creation */
|
|
4608
4608
|
consent_text?: string | null;
|
|
4609
4609
|
/** @description One-time card issuing fee */
|
|
@@ -4702,7 +4702,8 @@ export interface paths {
|
|
|
4702
4702
|
icon?: string | null;
|
|
4703
4703
|
code?: string | null;
|
|
4704
4704
|
initial_topup?: number | null;
|
|
4705
|
-
|
|
4705
|
+
/** @description Card artwork for this program; null = use the app's built-in design */
|
|
4706
|
+
card_design?: components["schemas"]["CardDesign"] | null;
|
|
4706
4707
|
consent_text?: string | null;
|
|
4707
4708
|
card_issuing_fee?: number | null;
|
|
4708
4709
|
card_monthly_fee?: number | null;
|
|
@@ -6699,7 +6700,10 @@ export interface paths {
|
|
|
6699
6700
|
parameters: {
|
|
6700
6701
|
query?: {
|
|
6701
6702
|
status?: "DRAFT" | "PENDING_APPROVAL" | "SCHEDULED" | "PROCESSING" | "COMPLETED" | "FAILED" | "CANCELED";
|
|
6702
|
-
/** @description
|
|
6703
|
+
/** @description Search box of the batch list: a case-insensitive PARTIAL match
|
|
6704
|
+
* against the batch name, so a fragment finds it. LIKE metacharacters
|
|
6705
|
+
* in the term are matched literally.
|
|
6706
|
+
* */
|
|
6703
6707
|
name?: string;
|
|
6704
6708
|
/** @description Only batches created at or after this moment */
|
|
6705
6709
|
date_from?: string;
|
|
@@ -7176,9 +7180,18 @@ export interface paths {
|
|
|
7176
7180
|
* standard order flow, funds are debited per order). The estimated total
|
|
7177
7181
|
* debit is checked against the wallet balance first — a batch that
|
|
7178
7182
|
* cannot cover all payouts is refused instead of paying only part of the
|
|
7179
|
-
* list. Requires an administrative wallet role.
|
|
7180
|
-
*
|
|
7181
|
-
*
|
|
7183
|
+
* list. Requires an administrative wallet role.
|
|
7184
|
+
*
|
|
7185
|
+
* **Second factor, per action and mandatory.** Request an OTP
|
|
7186
|
+
* verification for THIS batch id and have the user complete it before
|
|
7187
|
+
* calling approve — the endpoint checks that verification and refuses
|
|
7188
|
+
* unless it came back APPROVED. Releasing a whole batch of payments is
|
|
7189
|
+
* verified exactly like approving a single order. The check runs before
|
|
7190
|
+
* anything is claimed or estimated, so a failed one leaves the batch
|
|
7191
|
+
* untouched and approve can simply be retried.
|
|
7192
|
+
*
|
|
7193
|
+
* On Clerk-authenticated tenants a second factor verified within the last
|
|
7194
|
+
* 10 minutes is required on top of that — a stale one is rejected with
|
|
7182
7195
|
* `TWO_FACTOR_REVERIFICATION_REQUIRED` (Supabase-authenticated tenants
|
|
7183
7196
|
* have no step-up check). Execution continues past failed items;
|
|
7184
7197
|
* progress is visible through the batch counters.
|
|
@@ -7219,7 +7232,10 @@ export interface paths {
|
|
|
7219
7232
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
7220
7233
|
};
|
|
7221
7234
|
};
|
|
7222
|
-
/** @description Caller lacks an administrative wallet role,
|
|
7235
|
+
/** @description Caller lacks an administrative wallet role, the OTP verification for
|
|
7236
|
+
* this batch is not APPROVED (`VERIFICATION_NOT_APPROVED`), or (Clerk
|
|
7237
|
+
* tenants) the second-factor verification is stale.
|
|
7238
|
+
* */
|
|
7223
7239
|
403: {
|
|
7224
7240
|
headers: {
|
|
7225
7241
|
[name: string]: unknown;
|
|
@@ -7228,6 +7244,15 @@ export interface paths {
|
|
|
7228
7244
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
7229
7245
|
};
|
|
7230
7246
|
};
|
|
7247
|
+
/** @description Batch not found, or no OTP verification was requested for it (`REQUEST_ID_NOT_FOUND`) */
|
|
7248
|
+
404: {
|
|
7249
|
+
headers: {
|
|
7250
|
+
[name: string]: unknown;
|
|
7251
|
+
};
|
|
7252
|
+
content: {
|
|
7253
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7254
|
+
};
|
|
7255
|
+
};
|
|
7231
7256
|
/** @description Batch is not awaiting approval, or another operation on it is in flight */
|
|
7232
7257
|
409: {
|
|
7233
7258
|
headers: {
|
|
@@ -9117,7 +9142,11 @@ export interface paths {
|
|
|
9117
9142
|
limit?: number;
|
|
9118
9143
|
sort_by?: string;
|
|
9119
9144
|
sort_order?: "asc" | "desc";
|
|
9120
|
-
/** @description JSON-encoded filters
|
|
9145
|
+
/** @description JSON-encoded array of filters, e.g. `[{"status":"COMPLETE"}]`.
|
|
9146
|
+
* Besides order columns it accepts `mass_payout_id` (uuid), which narrows the
|
|
9147
|
+
* result to the orders of one mass payout batch — the same batch reported by
|
|
9148
|
+
* the `mass_payout_id` field of each order. A non-uuid value is rejected with 400.
|
|
9149
|
+
* */
|
|
9121
9150
|
filters?: string;
|
|
9122
9151
|
date_from?: string;
|
|
9123
9152
|
date_to?: string;
|
|
@@ -9184,7 +9213,11 @@ export interface paths {
|
|
|
9184
9213
|
query?: {
|
|
9185
9214
|
date_from?: string;
|
|
9186
9215
|
date_to?: string;
|
|
9187
|
-
/** @description JSON-encoded filters
|
|
9216
|
+
/** @description JSON-encoded array of filters, e.g. `[{"status":"COMPLETE"}]`.
|
|
9217
|
+
* Besides order columns it accepts `mass_payout_id` (uuid), which narrows the
|
|
9218
|
+
* result to the orders of one mass payout batch — the same batch reported by
|
|
9219
|
+
* the `mass_payout_id` field of each order. A non-uuid value is rejected with 400.
|
|
9220
|
+
* */
|
|
9188
9221
|
filters?: string;
|
|
9189
9222
|
/** @description If `true`, includes dust orders (amount below render threshold for either currency). Defaults to `false` — dust orders are hidden. */
|
|
9190
9223
|
show_low_balance?: "true" | "false";
|
|
@@ -13501,6 +13534,27 @@ export interface components {
|
|
|
13501
13534
|
/** Format: date-time */
|
|
13502
13535
|
created_at: string;
|
|
13503
13536
|
};
|
|
13537
|
+
/** @description How a card issued on this program is painted. Normalized on read, so every field here is either absent or usable — the abandoned shapes still in the column (`style.color`, `front_img`/`back_img`, a double-encoded JSON string) never reach a client. `null` means the program has no design: fall back to the app's built-in artwork. */
|
|
13538
|
+
CardDesign: {
|
|
13539
|
+
/**
|
|
13540
|
+
* @description Contract version.
|
|
13541
|
+
* @enum {integer}
|
|
13542
|
+
*/
|
|
13543
|
+
version: 1;
|
|
13544
|
+
/** @description The card face. One artwork for both themes — a card is a printed object, it does not restyle when the app does. */
|
|
13545
|
+
cover?: {
|
|
13546
|
+
/**
|
|
13547
|
+
* Format: uri
|
|
13548
|
+
* @description Absolute https URL of the artwork, authored at 2x of 318×200 (636×400).
|
|
13549
|
+
*/
|
|
13550
|
+
image_url?: string;
|
|
13551
|
+
};
|
|
13552
|
+
/**
|
|
13553
|
+
* @description Hex colour for every text on the card (balance, nickname, masked PAN). Set it when the artwork needs contrast the app-wide card text colour does not give.
|
|
13554
|
+
* @example #ffffff
|
|
13555
|
+
*/
|
|
13556
|
+
text_color?: string;
|
|
13557
|
+
};
|
|
13504
13558
|
/** @description Issuing program configuration (`issuing_programs` row). When joined it also carries nested `order_types`, `kyc_rails` and `integration_vendors` (hence additionalProperties). */
|
|
13505
13559
|
IssuingProgram: {
|
|
13506
13560
|
/** Format: uuid */
|
|
@@ -13551,9 +13605,7 @@ export interface components {
|
|
|
13551
13605
|
initial_topup?: number | null;
|
|
13552
13606
|
/** @description Minimum top-up amount in program currency, compared against the credited amount (0 = no minimum) */
|
|
13553
13607
|
min_topup?: number;
|
|
13554
|
-
card_design?:
|
|
13555
|
-
[key: string]: unknown;
|
|
13556
|
-
} | null;
|
|
13608
|
+
card_design?: components["schemas"]["CardDesign"] | null;
|
|
13557
13609
|
/** Format: uuid */
|
|
13558
13610
|
kyc_rails_id?: string | null;
|
|
13559
13611
|
/** Format: uuid */
|
|
@@ -13660,6 +13712,8 @@ export interface components {
|
|
|
13660
13712
|
/** @description Embedded sub-account summary, or null when no sub-account is linked. Present on the normal (vendor-enriched) response; omitted only in the degraded local-only error mode. */
|
|
13661
13713
|
sub_account: components["schemas"]["IssuingCardSubAccount"] | null;
|
|
13662
13714
|
limits?: components["schemas"]["IssuingCardLimits"] | null;
|
|
13715
|
+
/** @description This card's artwork, copied from its issuing program so a client needs no second request to paint the card. `null` = the program has no design, use the app's built-in artwork. */
|
|
13716
|
+
card_design?: components["schemas"]["CardDesign"] | null;
|
|
13663
13717
|
/** Format: date-time */
|
|
13664
13718
|
created_at?: string;
|
|
13665
13719
|
/** Format: date-time */
|
|
@@ -13849,6 +13903,8 @@ export interface components {
|
|
|
13849
13903
|
* @description CORE user this cardholder is linked to (user_data provisioning mode); null for manually-created cardholders.
|
|
13850
13904
|
*/
|
|
13851
13905
|
user_data_uuid?: string | null;
|
|
13906
|
+
/** @description Cards issued to this person (every status, canceled included), including cards on sibling per-vendor rows of the same person. Always present on list/get/PATCH; 0 when none. */
|
|
13907
|
+
cards_count?: number;
|
|
13852
13908
|
vendor_id?: string | null;
|
|
13853
13909
|
vendor_name?: string | null;
|
|
13854
13910
|
vendor_type?: string | null;
|
|
@@ -14402,6 +14458,13 @@ export interface components {
|
|
|
14402
14458
|
/** @description Computed dust flag — amount below the render threshold for either currency. Returned by the list endpoint (GET /frontend/orders/wallet/{wallet_uuid}); absent from single-order reads. */
|
|
14403
14459
|
is_threshold_amount?: boolean;
|
|
14404
14460
|
meta?: components["schemas"]["OrderMeta"];
|
|
14461
|
+
/** @description Batch this order was created by, when it was sent as part of a mass payout; null for a standalone order. Filter the list by it with `filters=[{"mass_payout_id":"<uuid>"}]`. */
|
|
14462
|
+
mass_payout?: {
|
|
14463
|
+
/** Format: uuid */
|
|
14464
|
+
id?: string;
|
|
14465
|
+
/** @description Batch name — null only when the batch can no longer be resolved. */
|
|
14466
|
+
name?: string | null;
|
|
14467
|
+
} | null;
|
|
14405
14468
|
/**
|
|
14406
14469
|
* Format: date-time
|
|
14407
14470
|
* @description Requested execution time for scheduled payments (status EXPECTED); null for immediate orders
|
|
@@ -14821,9 +14884,17 @@ export interface components {
|
|
|
14821
14884
|
currency_id?: string;
|
|
14822
14885
|
/**
|
|
14823
14886
|
* Format: uuid
|
|
14824
|
-
* @description Source virtual account
|
|
14887
|
+
* @description Source virtual account, required for a banking batch — its
|
|
14888
|
+
* methods are what such a batch sends through.
|
|
14889
|
+
*
|
|
14890
|
+
* A batch sends ONE way only: internal, crypto or banking, never a
|
|
14891
|
+
* mix. The first recipient by upload position sets the kind and the
|
|
14892
|
+
* rest must match it; a recipient of another kind is reported as a
|
|
14893
|
+
* problem by preview and blocks submit/approve.
|
|
14894
|
+
*
|
|
14825
14895
|
*/
|
|
14826
14896
|
virtual_account_id?: string | null;
|
|
14897
|
+
/** @description Batch name — required, free-form and NOT unique. Two batches of one wallet may share a name. */
|
|
14827
14898
|
name?: string;
|
|
14828
14899
|
/**
|
|
14829
14900
|
* @description SCHEDULED = approved with a future send date; execution starts automatically at that moment
|
|
@@ -14904,7 +14975,13 @@ export interface components {
|
|
|
14904
14975
|
amount: number;
|
|
14905
14976
|
/**
|
|
14906
14977
|
* Format: uuid
|
|
14907
|
-
* @description Payout currency of this row; omit for the batch source currency.
|
|
14978
|
+
* @description Payout currency of this row; omit for the batch source currency.
|
|
14979
|
+
* A differing value makes the payout a cross-currency one (the debit
|
|
14980
|
+
* is converted at execution time) and is accepted on banking rows
|
|
14981
|
+
* only — their off-ramp settles in the target currency. Crypto and
|
|
14982
|
+
* internal rows have no exchange leg, so they must stay in the batch
|
|
14983
|
+
* source currency.
|
|
14984
|
+
*
|
|
14908
14985
|
*/
|
|
14909
14986
|
to_currency_id?: string;
|
|
14910
14987
|
/** @description Optional payment reference for this row */
|
|
@@ -14912,10 +14989,19 @@ export interface components {
|
|
|
14912
14989
|
/** @description Supporting documents; an INVOICE attachment is required for rows at or above the invoice threshold */
|
|
14913
14990
|
documents?: components["schemas"]["MassPayoutDocument"][];
|
|
14914
14991
|
};
|
|
14992
|
+
/** @description A template row has no documents field: an invoice belongs to one
|
|
14993
|
+
* concrete payment, never to the reusable recipient list. Attach
|
|
14994
|
+
* documents to the rows of a batch instead.
|
|
14995
|
+
* */
|
|
14915
14996
|
MassPayoutTemplateItemInput: {
|
|
14916
14997
|
/** Format: uuid */
|
|
14917
14998
|
destination_id: string;
|
|
14918
|
-
|
|
14999
|
+
/** @description Optional in a template: omit it (or send null) to save a recipient
|
|
15000
|
+
* list whose amounts are filled in later. When present it must be
|
|
15001
|
+
* positive. A batch created from the template still requires an
|
|
15002
|
+
* amount on every row.
|
|
15003
|
+
* */
|
|
15004
|
+
amount?: number | null;
|
|
14919
15005
|
/** Format: uuid */
|
|
14920
15006
|
to_currency_id?: string;
|
|
14921
15007
|
reference?: string;
|
|
@@ -14925,7 +15011,8 @@ export interface components {
|
|
|
14925
15011
|
id?: string;
|
|
14926
15012
|
/** Format: uuid */
|
|
14927
15013
|
destination_id?: string;
|
|
14928
|
-
amount
|
|
15014
|
+
/** @description Null when the template row has no amount yet. */
|
|
15015
|
+
amount?: number | null;
|
|
14929
15016
|
/** Format: uuid */
|
|
14930
15017
|
to_currency_id?: string | null;
|
|
14931
15018
|
reference?: string | null;
|
|
@@ -7528,6 +7528,60 @@ export interface components {
|
|
|
7528
7528
|
mon_min_usd?: number;
|
|
7529
7529
|
} | null;
|
|
7530
7530
|
};
|
|
7531
|
+
AuthResponse: {
|
|
7532
|
+
/** @description JWT access token */
|
|
7533
|
+
access_token?: string;
|
|
7534
|
+
/**
|
|
7535
|
+
* @description Token type (bearer)
|
|
7536
|
+
* @enum {string}
|
|
7537
|
+
*/
|
|
7538
|
+
token_type?: "bearer";
|
|
7539
|
+
/** @description Seconds until token expiration */
|
|
7540
|
+
expires_in?: number;
|
|
7541
|
+
/** @description Token expiration timestamp */
|
|
7542
|
+
expires_at?: number;
|
|
7543
|
+
/** @description Refresh token for obtaining new access token */
|
|
7544
|
+
refresh_token?: string;
|
|
7545
|
+
user?: components["schemas"]["User"];
|
|
7546
|
+
};
|
|
7547
|
+
User: {
|
|
7548
|
+
/** @description User's unique identifier */
|
|
7549
|
+
id?: string;
|
|
7550
|
+
/** @description Audience for the token */
|
|
7551
|
+
aud?: string;
|
|
7552
|
+
/** @description User's role */
|
|
7553
|
+
role?: string;
|
|
7554
|
+
/** @description User's email address */
|
|
7555
|
+
email?: string;
|
|
7556
|
+
/**
|
|
7557
|
+
* Format: date-time
|
|
7558
|
+
* @description When email was confirmed
|
|
7559
|
+
*/
|
|
7560
|
+
email_confirmed_at?: string;
|
|
7561
|
+
/** @description User's phone number */
|
|
7562
|
+
phone?: string;
|
|
7563
|
+
/**
|
|
7564
|
+
* Format: date-time
|
|
7565
|
+
* @description When user was confirmed
|
|
7566
|
+
*/
|
|
7567
|
+
confirmed_at?: string;
|
|
7568
|
+
/**
|
|
7569
|
+
* Format: date-time
|
|
7570
|
+
* @description When recovery email was sent
|
|
7571
|
+
*/
|
|
7572
|
+
recovery_sent_at?: string;
|
|
7573
|
+
/**
|
|
7574
|
+
* Format: date-time
|
|
7575
|
+
* @description Last sign in timestamp
|
|
7576
|
+
*/
|
|
7577
|
+
last_sign_in_at?: string;
|
|
7578
|
+
identities?: Record<string, never>[];
|
|
7579
|
+
/** Format: date-time */
|
|
7580
|
+
created_at?: string;
|
|
7581
|
+
/** Format: date-time */
|
|
7582
|
+
updated_at?: string;
|
|
7583
|
+
is_anonymous?: boolean;
|
|
7584
|
+
};
|
|
7531
7585
|
SubAccount: {
|
|
7532
7586
|
/**
|
|
7533
7587
|
* @description Unique identifier for the sub-account
|
|
@@ -8311,7 +8365,6 @@ export interface components {
|
|
|
8311
8365
|
[key: string]: unknown;
|
|
8312
8366
|
};
|
|
8313
8367
|
};
|
|
8314
|
-
User: unknown;
|
|
8315
8368
|
Wallet: unknown;
|
|
8316
8369
|
WalletDetailed: unknown;
|
|
8317
8370
|
CryptoAddress: unknown;
|
|
@@ -8043,6 +8043,8 @@ export interface components {
|
|
|
8043
8043
|
* @description Associated issuing program ID
|
|
8044
8044
|
*/
|
|
8045
8045
|
issuing_program_id?: string;
|
|
8046
|
+
/** @description Cards issued to this person (every status, canceled included), including cards on sibling per-vendor rows of the same person. Always present on list/get/PATCH; 0 when none. */
|
|
8047
|
+
cards_count?: number;
|
|
8046
8048
|
address?: components["schemas"]["CardholderAddress"];
|
|
8047
8049
|
};
|
|
8048
8050
|
/** @description An uploaded KYC file, addressable before it is attached to a cardholder */
|
|
@@ -8794,6 +8796,12 @@ export interface components {
|
|
|
8794
8796
|
info?: string | null;
|
|
8795
8797
|
/** @description Filtered to META_ALLOWED_FIELDS */
|
|
8796
8798
|
meta?: Record<string, never> | null;
|
|
8799
|
+
/** @description Batch this order was created by, when it was sent as part of a mass payout; null for a standalone order. Filter the list by it with `filters=[{"mass_payout_id":"<uuid>"}]`. */
|
|
8800
|
+
mass_payout?: {
|
|
8801
|
+
/** Format: uuid */
|
|
8802
|
+
id?: string;
|
|
8803
|
+
name?: string | null;
|
|
8804
|
+
} | null;
|
|
8797
8805
|
/**
|
|
8798
8806
|
* Format: date-time
|
|
8799
8807
|
* @description Requested execution time for scheduled payments (status EXPECTED); null for immediate orders
|
|
@@ -313,6 +313,26 @@ export interface paths {
|
|
|
313
313
|
patch?: never;
|
|
314
314
|
trace?: never;
|
|
315
315
|
};
|
|
316
|
+
"/storage/order-documents": {
|
|
317
|
+
parameters: {
|
|
318
|
+
query?: never;
|
|
319
|
+
header?: never;
|
|
320
|
+
path?: never;
|
|
321
|
+
cookie?: never;
|
|
322
|
+
};
|
|
323
|
+
get?: never;
|
|
324
|
+
put?: never;
|
|
325
|
+
/**
|
|
326
|
+
* Upload an order / mass payout document
|
|
327
|
+
* @description Uploads a document attachment for an order or a mass payout into the dedicated bucket (separate from KYC files) and returns a URL suitable for documents[].url when creating the order / mass payout.
|
|
328
|
+
*/
|
|
329
|
+
post: operations["StorageController_uploadOrderDocument"];
|
|
330
|
+
delete?: never;
|
|
331
|
+
options?: never;
|
|
332
|
+
head?: never;
|
|
333
|
+
patch?: never;
|
|
334
|
+
trace?: never;
|
|
335
|
+
};
|
|
316
336
|
"/storage/{type}/{folder_id}/{file_id}": {
|
|
317
337
|
parameters: {
|
|
318
338
|
query?: never;
|
|
@@ -1976,6 +1996,18 @@ export interface components {
|
|
|
1976
1996
|
default: string;
|
|
1977
1997
|
supported: string[];
|
|
1978
1998
|
};
|
|
1999
|
+
SystemMassPayoutsConfigDto: {
|
|
2000
|
+
/** @description Whether mass payouts are available to this tenant. When false, every mass payout endpoint answers as if the feature did not exist. */
|
|
2001
|
+
enabled: boolean;
|
|
2002
|
+
/** @description Recipient rows one batch may carry. Exceeding it is rejected on create/update. */
|
|
2003
|
+
max_items: number;
|
|
2004
|
+
/** @description Rows one template may carry — a template is materialized into a batch, so it shares the batch cap. */
|
|
2005
|
+
max_template_items: number;
|
|
2006
|
+
/** @description Templates one wallet may keep. */
|
|
2007
|
+
max_templates_per_wallet: number;
|
|
2008
|
+
/** @description Supporting documents allowed per recipient row of a batch (template rows carry none). */
|
|
2009
|
+
max_item_documents: number;
|
|
2010
|
+
};
|
|
1979
2011
|
SystemConfigDto: {
|
|
1980
2012
|
tenant_id: string;
|
|
1981
2013
|
app_url: string | null;
|
|
@@ -2002,6 +2034,7 @@ export interface components {
|
|
|
2002
2034
|
/** @enum {string} */
|
|
2003
2035
|
auth_provider: "supabase" | "clerk";
|
|
2004
2036
|
base_currency: string;
|
|
2037
|
+
mass_payouts: components["schemas"]["SystemMassPayoutsConfigDto"];
|
|
2005
2038
|
};
|
|
2006
2039
|
SystemChainsResponseDto: {
|
|
2007
2040
|
total: number;
|
|
@@ -2814,12 +2847,48 @@ export interface operations {
|
|
|
2814
2847
|
};
|
|
2815
2848
|
};
|
|
2816
2849
|
};
|
|
2850
|
+
StorageController_uploadOrderDocument: {
|
|
2851
|
+
parameters: {
|
|
2852
|
+
query?: never;
|
|
2853
|
+
header?: never;
|
|
2854
|
+
path?: never;
|
|
2855
|
+
cookie?: never;
|
|
2856
|
+
};
|
|
2857
|
+
requestBody: {
|
|
2858
|
+
content: {
|
|
2859
|
+
"multipart/form-data": {
|
|
2860
|
+
/**
|
|
2861
|
+
* Format: binary
|
|
2862
|
+
* @description Allowed types: PDF, JPEG, PNG. Max size: 20 MB.
|
|
2863
|
+
*/
|
|
2864
|
+
file: string;
|
|
2865
|
+
};
|
|
2866
|
+
};
|
|
2867
|
+
};
|
|
2868
|
+
responses: {
|
|
2869
|
+
201: {
|
|
2870
|
+
headers: {
|
|
2871
|
+
[name: string]: unknown;
|
|
2872
|
+
};
|
|
2873
|
+
content: {
|
|
2874
|
+
"application/json": components["schemas"]["StorageUploadFileResponseDto"];
|
|
2875
|
+
};
|
|
2876
|
+
};
|
|
2877
|
+
/** @description Unauthorized */
|
|
2878
|
+
401: {
|
|
2879
|
+
headers: {
|
|
2880
|
+
[name: string]: unknown;
|
|
2881
|
+
};
|
|
2882
|
+
content?: never;
|
|
2883
|
+
};
|
|
2884
|
+
};
|
|
2885
|
+
};
|
|
2817
2886
|
StorageController_getFile: {
|
|
2818
2887
|
parameters: {
|
|
2819
2888
|
query?: never;
|
|
2820
2889
|
header?: never;
|
|
2821
2890
|
path: {
|
|
2822
|
-
type: "kyc" | "logo";
|
|
2891
|
+
type: "kyc" | "logo" | "order-documents";
|
|
2823
2892
|
folder_id: string;
|
|
2824
2893
|
file_id: string;
|
|
2825
2894
|
};
|
|
@@ -88,6 +88,27 @@ export declare namespace API {
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
namespace Cards {
|
|
91
|
+
/**
|
|
92
|
+
* How a card is painted: the artwork of the issuing program it belongs to.
|
|
93
|
+
*
|
|
94
|
+
* Normalized by the BFF on every read, so each field is either absent or
|
|
95
|
+
* usable — the abandoned shapes the `card_design` column still holds
|
|
96
|
+
* (`style.color`, `front_img`/`back_img`, a double-encoded JSON string)
|
|
97
|
+
* never reach a client. `null` means the program has no design and the app
|
|
98
|
+
* paints its own built-in artwork instead.
|
|
99
|
+
*
|
|
100
|
+
* One artwork covers both themes: a card face is a printed object, not a UI
|
|
101
|
+
* surface, so it does not restyle when the app does.
|
|
102
|
+
*/
|
|
103
|
+
interface CardDesign {
|
|
104
|
+
version: 1;
|
|
105
|
+
cover?: {
|
|
106
|
+
/** Absolute https URL of the artwork, authored at 636×400 (2× the card). */
|
|
107
|
+
image_url?: string;
|
|
108
|
+
};
|
|
109
|
+
/** Hex colour for every text on the card face (balance, nickname, PAN). */
|
|
110
|
+
text_color?: string;
|
|
111
|
+
}
|
|
91
112
|
namespace Config {
|
|
92
113
|
type IssuingProgramOrderType = {
|
|
93
114
|
id: string;
|
|
@@ -127,6 +148,12 @@ export declare namespace API {
|
|
|
127
148
|
*/
|
|
128
149
|
min_topup?: number;
|
|
129
150
|
status?: IssuingProgramStatus | string;
|
|
151
|
+
/**
|
|
152
|
+
* The program's artwork. Present on DETAILED program responses only;
|
|
153
|
+
* `null` when the program has none. Cards carry their own copy
|
|
154
|
+
* (`IssuingCardListItem.card_design`) — read that when painting a card.
|
|
155
|
+
*/
|
|
156
|
+
card_design?: API.Cards.CardDesign | null;
|
|
130
157
|
}
|
|
131
158
|
}
|
|
132
159
|
interface User {
|
|
@@ -204,6 +231,13 @@ export declare namespace API {
|
|
|
204
231
|
type: CardType | string;
|
|
205
232
|
form_factor: CardFormFactor | string;
|
|
206
233
|
tokenizable: boolean;
|
|
234
|
+
/**
|
|
235
|
+
* This card's artwork, copied from its issuing program. Served WITH the
|
|
236
|
+
* card on purpose: joining against the program catalogue client-side
|
|
237
|
+
* costs a second request AND makes the card visibly swap artwork once
|
|
238
|
+
* that lands. `null` = no design, paint the app's built-in one.
|
|
239
|
+
*/
|
|
240
|
+
card_design?: API.Cards.CardDesign | null;
|
|
207
241
|
}
|
|
208
242
|
interface IssuingCardDetailItem {
|
|
209
243
|
id: string;
|
|
@@ -220,6 +254,8 @@ export declare namespace API {
|
|
|
220
254
|
tokenizable: boolean;
|
|
221
255
|
issuing_programs: API.Cards.Config.Program;
|
|
222
256
|
limits?: API.Cards.Limits.Limits;
|
|
257
|
+
/** This card's artwork; see `IssuingCardListItem.card_design`. */
|
|
258
|
+
card_design?: API.Cards.CardDesign | null;
|
|
223
259
|
}
|
|
224
260
|
interface SubAccountCardListItem {
|
|
225
261
|
type: string;
|
|
@@ -1403,6 +1439,17 @@ export declare namespace API {
|
|
|
1403
1439
|
export type MassPayoutTemplateItem = componentsV1Frontend['schemas']['MassPayoutTemplateItem'];
|
|
1404
1440
|
export type MassPayoutTemplateItemInput = componentsV1Frontend['schemas']['MassPayoutTemplateItemInput'];
|
|
1405
1441
|
export type MassPayoutTemplateWithItems = componentsV1Frontend['schemas']['MassPayoutTemplateWithItems'];
|
|
1442
|
+
/**
|
|
1443
|
+
* The tenant's own mass payout limits and feature flag, delivered by `tenants.config.get()`
|
|
1444
|
+
* under `mass_payouts`. Read them rather than hardcoding a recipient cap — every whitelabel
|
|
1445
|
+
* tenant carries its own, and the only other way to learn one is to trip a 400.
|
|
1446
|
+
*/
|
|
1447
|
+
export type Config = components['schemas']['SystemMassPayoutsConfigDto'];
|
|
1448
|
+
/**
|
|
1449
|
+
* Batch an order came from, as reported on the order itself — `null` for a standalone order.
|
|
1450
|
+
* Filter a feed down to one batch with the `mass_payout_id` order-list filter.
|
|
1451
|
+
*/
|
|
1452
|
+
export type OrderMassPayoutRef = componentsV1Frontend['schemas']['Order']['mass_payout'];
|
|
1406
1453
|
/**
|
|
1407
1454
|
* Status unions read off the schemas rather than re-declared, so a spec change lands here
|
|
1408
1455
|
* automatically. `SCHEDULED` = approved with a future send date; `CANCELED` on an item means
|
|
@@ -2123,7 +2170,13 @@ export declare namespace API {
|
|
|
2123
2170
|
type OrderListOrderTypeFilter = Record<'order_type', OrderType[] | OrderType>;
|
|
2124
2171
|
type OrderListFromUuidFilter = Record<'from_uuid', string[] | string>;
|
|
2125
2172
|
type OrderListToUuidFilter = Record<'to_uuid', string[] | string>;
|
|
2126
|
-
|
|
2173
|
+
/**
|
|
2174
|
+
* Narrows the feed to the orders of one mass payout batch — the batch each order
|
|
2175
|
+
* reports back in `mass_payout`. A single uuid only (not an array); a non-uuid value
|
|
2176
|
+
* is refused with 400.
|
|
2177
|
+
*/
|
|
2178
|
+
type OrderListMassPayoutFilter = Record<'mass_payout_id', string>;
|
|
2179
|
+
type OrderListFilter = OrderListStatusFilter | OrderListOrderTypeFilter | OrderListFromUuidFilter | OrderListToUuidFilter | OrderListMassPayoutFilter;
|
|
2127
2180
|
interface Request {
|
|
2128
2181
|
wallet_uuid: string;
|
|
2129
2182
|
offset?: number;
|
|
@@ -3031,6 +3084,22 @@ export declare namespace API {
|
|
|
3031
3084
|
type Response = operations['StorageController_getFile']['responses']['200']['content']['application/octet-stream'];
|
|
3032
3085
|
}
|
|
3033
3086
|
}
|
|
3087
|
+
/**
|
|
3088
|
+
* Attachments for orders and mass payouts, in a bucket of their own (not the KYC one). The
|
|
3089
|
+
* uploaded file's link is what `documents[].url` expects on an order or a mass payout row.
|
|
3090
|
+
*/
|
|
3091
|
+
namespace OrderDocuments {
|
|
3092
|
+
namespace Upload {
|
|
3093
|
+
type Response = operations['StorageController_uploadOrderDocument']['responses']['201']['content']['application/json'];
|
|
3094
|
+
}
|
|
3095
|
+
namespace GetFileById {
|
|
3096
|
+
interface Request {
|
|
3097
|
+
folderId: string;
|
|
3098
|
+
fileId: string;
|
|
3099
|
+
}
|
|
3100
|
+
type Response = operations['StorageController_getFile']['responses']['200']['content']['application/octet-stream'];
|
|
3101
|
+
}
|
|
3102
|
+
}
|
|
3034
3103
|
}
|
|
3035
3104
|
namespace Referrals {
|
|
3036
3105
|
namespace Levels {
|