squarefi-bff-api-module 1.36.52 → 1.36.54
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 +83 -12
- package/dist/api/types/autogen/apiV1Tenant.types.d.ts +6 -0
- package/dist/api/types/autogen/apiV2.types.d.ts +70 -1
- package/dist/api/types/types.d.ts +72 -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
|
};
|
|
@@ -4236,6 +4236,8 @@ export interface paths {
|
|
|
4236
4236
|
* - Missing required fields
|
|
4237
4237
|
* - Invalid reference_id format
|
|
4238
4238
|
* - Invalid amount (must be positive number)
|
|
4239
|
+
* - `TOPUP_BELOW_MINIMUM` — credited amount is below the program's
|
|
4240
|
+
* `min_topup` threshold (`error.details.min_topup`, program currency)
|
|
4239
4241
|
* */
|
|
4240
4242
|
400: {
|
|
4241
4243
|
headers: {
|
|
@@ -4852,7 +4854,11 @@ export interface paths {
|
|
|
4852
4854
|
limit?: number;
|
|
4853
4855
|
sort_by?: string;
|
|
4854
4856
|
sort_order?: "asc" | "desc";
|
|
4855
|
-
/** @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
|
+
* */
|
|
4856
4862
|
filters?: string;
|
|
4857
4863
|
date_from?: string;
|
|
4858
4864
|
date_to?: string;
|
|
@@ -8139,6 +8145,12 @@ export interface components {
|
|
|
8139
8145
|
sub_account_id?: string | null;
|
|
8140
8146
|
info?: string | null;
|
|
8141
8147
|
meta?: components["schemas"]["OrderMeta"];
|
|
8148
|
+
/** @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>"}]`. */
|
|
8149
|
+
mass_payout?: {
|
|
8150
|
+
/** Format: uuid */
|
|
8151
|
+
id?: string;
|
|
8152
|
+
name?: string | null;
|
|
8153
|
+
} | null;
|
|
8142
8154
|
/**
|
|
8143
8155
|
* Format: date-time
|
|
8144
8156
|
* @description Requested execution time for scheduled payments (status EXPECTED); null for immediate orders
|
|
@@ -3632,7 +3632,10 @@ export interface paths {
|
|
|
3632
3632
|
};
|
|
3633
3633
|
content?: never;
|
|
3634
3634
|
};
|
|
3635
|
-
/** @description Validation error
|
|
3635
|
+
/** @description Validation error. Includes `TOPUP_BELOW_MINIMUM` — credited amount is
|
|
3636
|
+
* below the program's `min_topup` threshold (`error.details.min_topup`,
|
|
3637
|
+
* program currency). No order created, wallet not debited.
|
|
3638
|
+
* */
|
|
3636
3639
|
400: {
|
|
3637
3640
|
headers: {
|
|
3638
3641
|
[name: string]: unknown;
|
|
@@ -4283,6 +4286,9 @@ export interface paths {
|
|
|
4283
4286
|
* - Invalid reference_id format
|
|
4284
4287
|
* - Invalid amount (must be positive number)
|
|
4285
4288
|
* - Insufficient wallet balance (`INSUFFICIENT_BALANCE`)
|
|
4289
|
+
* - `TOPUP_BELOW_MINIMUM` — credited amount is below the program's
|
|
4290
|
+
* `min_topup` threshold; `error.details.min_topup` carries the
|
|
4291
|
+
* threshold (program currency). No order created, wallet not debited.
|
|
4286
4292
|
* */
|
|
4287
4293
|
400: {
|
|
4288
4294
|
headers: {
|
|
@@ -6693,7 +6699,10 @@ export interface paths {
|
|
|
6693
6699
|
parameters: {
|
|
6694
6700
|
query?: {
|
|
6695
6701
|
status?: "DRAFT" | "PENDING_APPROVAL" | "SCHEDULED" | "PROCESSING" | "COMPLETED" | "FAILED" | "CANCELED";
|
|
6696
|
-
/** @description
|
|
6702
|
+
/** @description Search box of the batch list: a case-insensitive PARTIAL match
|
|
6703
|
+
* against the batch name, so a fragment finds it. LIKE metacharacters
|
|
6704
|
+
* in the term are matched literally.
|
|
6705
|
+
* */
|
|
6697
6706
|
name?: string;
|
|
6698
6707
|
/** @description Only batches created at or after this moment */
|
|
6699
6708
|
date_from?: string;
|
|
@@ -7170,9 +7179,18 @@ export interface paths {
|
|
|
7170
7179
|
* standard order flow, funds are debited per order). The estimated total
|
|
7171
7180
|
* debit is checked against the wallet balance first — a batch that
|
|
7172
7181
|
* cannot cover all payouts is refused instead of paying only part of the
|
|
7173
|
-
* list. Requires an administrative wallet role.
|
|
7174
|
-
*
|
|
7175
|
-
*
|
|
7182
|
+
* list. Requires an administrative wallet role.
|
|
7183
|
+
*
|
|
7184
|
+
* **Second factor, per action and mandatory.** Request an OTP
|
|
7185
|
+
* verification for THIS batch id and have the user complete it before
|
|
7186
|
+
* calling approve — the endpoint checks that verification and refuses
|
|
7187
|
+
* unless it came back APPROVED. Releasing a whole batch of payments is
|
|
7188
|
+
* verified exactly like approving a single order. The check runs before
|
|
7189
|
+
* anything is claimed or estimated, so a failed one leaves the batch
|
|
7190
|
+
* untouched and approve can simply be retried.
|
|
7191
|
+
*
|
|
7192
|
+
* On Clerk-authenticated tenants a second factor verified within the last
|
|
7193
|
+
* 10 minutes is required on top of that — a stale one is rejected with
|
|
7176
7194
|
* `TWO_FACTOR_REVERIFICATION_REQUIRED` (Supabase-authenticated tenants
|
|
7177
7195
|
* have no step-up check). Execution continues past failed items;
|
|
7178
7196
|
* progress is visible through the batch counters.
|
|
@@ -7213,7 +7231,10 @@ export interface paths {
|
|
|
7213
7231
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
7214
7232
|
};
|
|
7215
7233
|
};
|
|
7216
|
-
/** @description Caller lacks an administrative wallet role,
|
|
7234
|
+
/** @description Caller lacks an administrative wallet role, the OTP verification for
|
|
7235
|
+
* this batch is not APPROVED (`VERIFICATION_NOT_APPROVED`), or (Clerk
|
|
7236
|
+
* tenants) the second-factor verification is stale.
|
|
7237
|
+
* */
|
|
7217
7238
|
403: {
|
|
7218
7239
|
headers: {
|
|
7219
7240
|
[name: string]: unknown;
|
|
@@ -7222,6 +7243,15 @@ export interface paths {
|
|
|
7222
7243
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
7223
7244
|
};
|
|
7224
7245
|
};
|
|
7246
|
+
/** @description Batch not found, or no OTP verification was requested for it (`REQUEST_ID_NOT_FOUND`) */
|
|
7247
|
+
404: {
|
|
7248
|
+
headers: {
|
|
7249
|
+
[name: string]: unknown;
|
|
7250
|
+
};
|
|
7251
|
+
content: {
|
|
7252
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
7253
|
+
};
|
|
7254
|
+
};
|
|
7225
7255
|
/** @description Batch is not awaiting approval, or another operation on it is in flight */
|
|
7226
7256
|
409: {
|
|
7227
7257
|
headers: {
|
|
@@ -9111,7 +9141,11 @@ export interface paths {
|
|
|
9111
9141
|
limit?: number;
|
|
9112
9142
|
sort_by?: string;
|
|
9113
9143
|
sort_order?: "asc" | "desc";
|
|
9114
|
-
/** @description JSON-encoded filters
|
|
9144
|
+
/** @description JSON-encoded array of filters, e.g. `[{"status":"COMPLETE"}]`.
|
|
9145
|
+
* Besides order columns it accepts `mass_payout_id` (uuid), which narrows the
|
|
9146
|
+
* result to the orders of one mass payout batch — the same batch reported by
|
|
9147
|
+
* the `mass_payout_id` field of each order. A non-uuid value is rejected with 400.
|
|
9148
|
+
* */
|
|
9115
9149
|
filters?: string;
|
|
9116
9150
|
date_from?: string;
|
|
9117
9151
|
date_to?: string;
|
|
@@ -9178,7 +9212,11 @@ export interface paths {
|
|
|
9178
9212
|
query?: {
|
|
9179
9213
|
date_from?: string;
|
|
9180
9214
|
date_to?: string;
|
|
9181
|
-
/** @description JSON-encoded filters
|
|
9215
|
+
/** @description JSON-encoded array of filters, e.g. `[{"status":"COMPLETE"}]`.
|
|
9216
|
+
* Besides order columns it accepts `mass_payout_id` (uuid), which narrows the
|
|
9217
|
+
* result to the orders of one mass payout batch — the same batch reported by
|
|
9218
|
+
* the `mass_payout_id` field of each order. A non-uuid value is rejected with 400.
|
|
9219
|
+
* */
|
|
9182
9220
|
filters?: string;
|
|
9183
9221
|
/** @description If `true`, includes dust orders (amount below render threshold for either currency). Defaults to `false` — dust orders are hidden. */
|
|
9184
9222
|
show_low_balance?: "true" | "false";
|
|
@@ -13543,6 +13581,8 @@ export interface components {
|
|
|
13543
13581
|
card_issuing_fee?: number | null;
|
|
13544
13582
|
card_monthly_fee?: number | null;
|
|
13545
13583
|
initial_topup?: number | null;
|
|
13584
|
+
/** @description Minimum top-up amount in program currency, compared against the credited amount (0 = no minimum) */
|
|
13585
|
+
min_topup?: number;
|
|
13546
13586
|
card_design?: {
|
|
13547
13587
|
[key: string]: unknown;
|
|
13548
13588
|
} | null;
|
|
@@ -14394,6 +14434,13 @@ export interface components {
|
|
|
14394
14434
|
/** @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. */
|
|
14395
14435
|
is_threshold_amount?: boolean;
|
|
14396
14436
|
meta?: components["schemas"]["OrderMeta"];
|
|
14437
|
+
/** @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>"}]`. */
|
|
14438
|
+
mass_payout?: {
|
|
14439
|
+
/** Format: uuid */
|
|
14440
|
+
id?: string;
|
|
14441
|
+
/** @description Batch name — null only when the batch can no longer be resolved. */
|
|
14442
|
+
name?: string | null;
|
|
14443
|
+
} | null;
|
|
14397
14444
|
/**
|
|
14398
14445
|
* Format: date-time
|
|
14399
14446
|
* @description Requested execution time for scheduled payments (status EXPECTED); null for immediate orders
|
|
@@ -14813,9 +14860,17 @@ export interface components {
|
|
|
14813
14860
|
currency_id?: string;
|
|
14814
14861
|
/**
|
|
14815
14862
|
* Format: uuid
|
|
14816
|
-
* @description Source virtual account
|
|
14863
|
+
* @description Source virtual account, required for a banking batch — its
|
|
14864
|
+
* methods are what such a batch sends through.
|
|
14865
|
+
*
|
|
14866
|
+
* A batch sends ONE way only: internal, crypto or banking, never a
|
|
14867
|
+
* mix. The first recipient by upload position sets the kind and the
|
|
14868
|
+
* rest must match it; a recipient of another kind is reported as a
|
|
14869
|
+
* problem by preview and blocks submit/approve.
|
|
14870
|
+
*
|
|
14817
14871
|
*/
|
|
14818
14872
|
virtual_account_id?: string | null;
|
|
14873
|
+
/** @description Batch name — required, free-form and NOT unique. Two batches of one wallet may share a name. */
|
|
14819
14874
|
name?: string;
|
|
14820
14875
|
/**
|
|
14821
14876
|
* @description SCHEDULED = approved with a future send date; execution starts automatically at that moment
|
|
@@ -14896,7 +14951,13 @@ export interface components {
|
|
|
14896
14951
|
amount: number;
|
|
14897
14952
|
/**
|
|
14898
14953
|
* Format: uuid
|
|
14899
|
-
* @description Payout currency of this row; omit for the batch source currency.
|
|
14954
|
+
* @description Payout currency of this row; omit for the batch source currency.
|
|
14955
|
+
* A differing value makes the payout a cross-currency one (the debit
|
|
14956
|
+
* is converted at execution time) and is accepted on banking rows
|
|
14957
|
+
* only — their off-ramp settles in the target currency. Crypto and
|
|
14958
|
+
* internal rows have no exchange leg, so they must stay in the batch
|
|
14959
|
+
* source currency.
|
|
14960
|
+
*
|
|
14900
14961
|
*/
|
|
14901
14962
|
to_currency_id?: string;
|
|
14902
14963
|
/** @description Optional payment reference for this row */
|
|
@@ -14904,10 +14965,19 @@ export interface components {
|
|
|
14904
14965
|
/** @description Supporting documents; an INVOICE attachment is required for rows at or above the invoice threshold */
|
|
14905
14966
|
documents?: components["schemas"]["MassPayoutDocument"][];
|
|
14906
14967
|
};
|
|
14968
|
+
/** @description A template row has no documents field: an invoice belongs to one
|
|
14969
|
+
* concrete payment, never to the reusable recipient list. Attach
|
|
14970
|
+
* documents to the rows of a batch instead.
|
|
14971
|
+
* */
|
|
14907
14972
|
MassPayoutTemplateItemInput: {
|
|
14908
14973
|
/** Format: uuid */
|
|
14909
14974
|
destination_id: string;
|
|
14910
|
-
|
|
14975
|
+
/** @description Optional in a template: omit it (or send null) to save a recipient
|
|
14976
|
+
* list whose amounts are filled in later. When present it must be
|
|
14977
|
+
* positive. A batch created from the template still requires an
|
|
14978
|
+
* amount on every row.
|
|
14979
|
+
* */
|
|
14980
|
+
amount?: number | null;
|
|
14911
14981
|
/** Format: uuid */
|
|
14912
14982
|
to_currency_id?: string;
|
|
14913
14983
|
reference?: string;
|
|
@@ -14917,7 +14987,8 @@ export interface components {
|
|
|
14917
14987
|
id?: string;
|
|
14918
14988
|
/** Format: uuid */
|
|
14919
14989
|
destination_id?: string;
|
|
14920
|
-
amount
|
|
14990
|
+
/** @description Null when the template row has no amount yet. */
|
|
14991
|
+
amount?: number | null;
|
|
14921
14992
|
/** Format: uuid */
|
|
14922
14993
|
to_currency_id?: string | null;
|
|
14923
14994
|
reference?: string | null;
|
|
@@ -8794,6 +8794,12 @@ export interface components {
|
|
|
8794
8794
|
info?: string | null;
|
|
8795
8795
|
/** @description Filtered to META_ALLOWED_FIELDS */
|
|
8796
8796
|
meta?: Record<string, never> | null;
|
|
8797
|
+
/** @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>"}]`. */
|
|
8798
|
+
mass_payout?: {
|
|
8799
|
+
/** Format: uuid */
|
|
8800
|
+
id?: string;
|
|
8801
|
+
name?: string | null;
|
|
8802
|
+
} | null;
|
|
8797
8803
|
/**
|
|
8798
8804
|
* Format: date-time
|
|
8799
8805
|
* @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
|
};
|
|
@@ -115,6 +115,17 @@ export declare namespace API {
|
|
|
115
115
|
card_issuing_fee: number | null;
|
|
116
116
|
card_monthly_fee: number | null;
|
|
117
117
|
initial_topup: number | null;
|
|
118
|
+
/**
|
|
119
|
+
* Minimum top-up in the program's currency, compared against the amount
|
|
120
|
+
* CREDITED to the card (after fees and conversion) — the same figure the
|
|
121
|
+
* server checks before it refuses a deposit with `TOPUP_BELOW_MINIMUM`.
|
|
122
|
+
* `0` means the program sets no minimum. Does not apply to the initial
|
|
123
|
+
* top-up at issuance.
|
|
124
|
+
*
|
|
125
|
+
* Optional on the type because programs served by a backend older than
|
|
126
|
+
* the `issuing_programs.min_topup` migration omit it.
|
|
127
|
+
*/
|
|
128
|
+
min_topup?: number;
|
|
118
129
|
status?: IssuingProgramStatus | string;
|
|
119
130
|
}
|
|
120
131
|
}
|
|
@@ -270,7 +281,34 @@ export declare namespace API {
|
|
|
270
281
|
adjustment_type: string;
|
|
271
282
|
review_status: string;
|
|
272
283
|
group: string;
|
|
284
|
+
/**
|
|
285
|
+
* What actually left the card: `billing_amount` plus `fee` for a debit
|
|
286
|
+
* (minus it for a credit, which arrives net of what the vendor keeps).
|
|
287
|
+
* Equals `billing_amount` when no fee sits inside the operation, so it is
|
|
288
|
+
* the figure to show as the transaction's amount.
|
|
289
|
+
*/
|
|
273
290
|
total_amount: number;
|
|
291
|
+
/**
|
|
292
|
+
* Fee charged INSIDE this operation, in billing currency. `0` for vendors
|
|
293
|
+
* that bill fees as their own transactions — those arrive as separate rows
|
|
294
|
+
* with `transaction_type: FEE`. Optional: older backends omit it.
|
|
295
|
+
*/
|
|
296
|
+
fee?: number;
|
|
297
|
+
/** Vendor's itemisation of `fee`; empty when it gave none. */
|
|
298
|
+
fee_details?: TransactionFee[];
|
|
299
|
+
/**
|
|
300
|
+
* Units of billing currency per unit of transaction currency, so
|
|
301
|
+
* `transaction_amount * conversion_rate ≈ billing_amount`. 1 when the
|
|
302
|
+
* currencies match.
|
|
303
|
+
*/
|
|
304
|
+
conversion_rate?: number;
|
|
305
|
+
}
|
|
306
|
+
/** One line of a transaction's fee itemisation (`TransactionItem.fee_details`). */
|
|
307
|
+
interface TransactionFee {
|
|
308
|
+
amount: number;
|
|
309
|
+
currency: string;
|
|
310
|
+
/** Vendor's own fee code — no cross-vendor meaning. */
|
|
311
|
+
type: string | null;
|
|
274
312
|
}
|
|
275
313
|
interface TransactionsList {
|
|
276
314
|
data: TransactionItem[];
|
|
@@ -1365,6 +1403,17 @@ export declare namespace API {
|
|
|
1365
1403
|
export type MassPayoutTemplateItem = componentsV1Frontend['schemas']['MassPayoutTemplateItem'];
|
|
1366
1404
|
export type MassPayoutTemplateItemInput = componentsV1Frontend['schemas']['MassPayoutTemplateItemInput'];
|
|
1367
1405
|
export type MassPayoutTemplateWithItems = componentsV1Frontend['schemas']['MassPayoutTemplateWithItems'];
|
|
1406
|
+
/**
|
|
1407
|
+
* The tenant's own mass payout limits and feature flag, delivered by `tenants.config.get()`
|
|
1408
|
+
* under `mass_payouts`. Read them rather than hardcoding a recipient cap — every whitelabel
|
|
1409
|
+
* tenant carries its own, and the only other way to learn one is to trip a 400.
|
|
1410
|
+
*/
|
|
1411
|
+
export type Config = components['schemas']['SystemMassPayoutsConfigDto'];
|
|
1412
|
+
/**
|
|
1413
|
+
* Batch an order came from, as reported on the order itself — `null` for a standalone order.
|
|
1414
|
+
* Filter a feed down to one batch with the `mass_payout_id` order-list filter.
|
|
1415
|
+
*/
|
|
1416
|
+
export type OrderMassPayoutRef = componentsV1Frontend['schemas']['Order']['mass_payout'];
|
|
1368
1417
|
/**
|
|
1369
1418
|
* Status unions read off the schemas rather than re-declared, so a spec change lands here
|
|
1370
1419
|
* automatically. `SCHEDULED` = approved with a future send date; `CANCELED` on an item means
|
|
@@ -2085,7 +2134,13 @@ export declare namespace API {
|
|
|
2085
2134
|
type OrderListOrderTypeFilter = Record<'order_type', OrderType[] | OrderType>;
|
|
2086
2135
|
type OrderListFromUuidFilter = Record<'from_uuid', string[] | string>;
|
|
2087
2136
|
type OrderListToUuidFilter = Record<'to_uuid', string[] | string>;
|
|
2088
|
-
|
|
2137
|
+
/**
|
|
2138
|
+
* Narrows the feed to the orders of one mass payout batch — the batch each order
|
|
2139
|
+
* reports back in `mass_payout`. A single uuid only (not an array); a non-uuid value
|
|
2140
|
+
* is refused with 400.
|
|
2141
|
+
*/
|
|
2142
|
+
type OrderListMassPayoutFilter = Record<'mass_payout_id', string>;
|
|
2143
|
+
type OrderListFilter = OrderListStatusFilter | OrderListOrderTypeFilter | OrderListFromUuidFilter | OrderListToUuidFilter | OrderListMassPayoutFilter;
|
|
2089
2144
|
interface Request {
|
|
2090
2145
|
wallet_uuid: string;
|
|
2091
2146
|
offset?: number;
|
|
@@ -2993,6 +3048,22 @@ export declare namespace API {
|
|
|
2993
3048
|
type Response = operations['StorageController_getFile']['responses']['200']['content']['application/octet-stream'];
|
|
2994
3049
|
}
|
|
2995
3050
|
}
|
|
3051
|
+
/**
|
|
3052
|
+
* Attachments for orders and mass payouts, in a bucket of their own (not the KYC one). The
|
|
3053
|
+
* uploaded file's link is what `documents[].url` expects on an order or a mass payout row.
|
|
3054
|
+
*/
|
|
3055
|
+
namespace OrderDocuments {
|
|
3056
|
+
namespace Upload {
|
|
3057
|
+
type Response = operations['StorageController_uploadOrderDocument']['responses']['201']['content']['application/json'];
|
|
3058
|
+
}
|
|
3059
|
+
namespace GetFileById {
|
|
3060
|
+
interface Request {
|
|
3061
|
+
folderId: string;
|
|
3062
|
+
fileId: string;
|
|
3063
|
+
}
|
|
3064
|
+
type Response = operations['StorageController_getFile']['responses']['200']['content']['application/octet-stream'];
|
|
3065
|
+
}
|
|
3066
|
+
}
|
|
2996
3067
|
}
|
|
2997
3068
|
namespace Referrals {
|
|
2998
3069
|
namespace Levels {
|