squarefi-bff-api-module 1.36.89 → 1.36.91

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.
@@ -5014,10 +5014,21 @@ export interface paths {
5014
5014
  * `scheduled` narrows it to scheduled payments: `all`, `upcoming` (approved and
5015
5015
  * waiting, `EXPECTED`) or `past` (any status but `NEW` and `EXPECTED`); it combines
5016
5016
  * with `status`. Any other value is rejected with 400.
5017
+ *
5018
+ * Every key is checked before the query runs (SFI-2693): an unknown field, a value of the
5019
+ * wrong type (e.g. a status that does not exist, a non-uuid id) or an object on a plain
5020
+ * field answers 400 `INVALID_REQUEST`, and `details.field` names the field. An object is
5021
+ * accepted on `meta` only — `[{"meta":{"direction":"out"}}]` matches `meta->>direction`.
5017
5022
  * */
5018
5023
  filters?: string;
5019
5024
  date_from?: string;
5020
5025
  date_to?: string;
5026
+ /** @description Part of the recipient's name or nickname (`meta.counterparty_account_name`,
5027
+ * `meta.counterparty_account_nickname`), case-insensitive. Combines with `filters`,
5028
+ * sorting and pagination; `pagination` counts the matches only. Up to 100 characters;
5029
+ * `*`, `%`, `"` and `\` are ignored.
5030
+ * */
5031
+ search?: string;
5021
5032
  /** @description If `true`, includes dust orders (amount below render threshold for either currency). Defaults to `false` — dust orders are hidden. */
5022
5033
  show_low_balance?: "true" | "false";
5023
5034
  };
@@ -8465,6 +8476,12 @@ export interface components {
8465
8476
  fee?: number | null;
8466
8477
  /** Format: uuid */
8467
8478
  fee_currency?: string | null;
8479
+ /** @description Fiat payouts: fixed part of `fee` (the rail's flat charge), in `fee_currency`. Absent on other order types and on payouts created before it was stored — show `fee` as one line then. */
8480
+ fixed_commission?: number | null;
8481
+ /** @description Percentage part of `fee`, in `fee_currency`. Each part is truncated to cents on its own, so `fixed_commission + percent_commission` can fall a cent short of `fee`; the total is always `fee`. */
8482
+ percent_commission?: number | null;
8483
+ /** @description Percent rate behind `percent_commission`, in whole percent (1 = 1%). */
8484
+ base_markup?: number | null;
8468
8485
  network_fee?: number | null;
8469
8486
  /** Format: uuid */
8470
8487
  network_fee_currency?: string | null;
@@ -9837,10 +9837,21 @@ export interface paths {
9837
9837
  * failed or canceled (any status but `NEW` and `EXPECTED`). It combines with `status`,
9838
9838
  * e.g. `[{"scheduled":"past"},{"status":["PROCESSING","COMPLETE"]}]` lists the sent ones.
9839
9839
  * Any other value is rejected with 400.
9840
+ *
9841
+ * Every key is checked before the query runs (SFI-2693): an unknown field, a value of the
9842
+ * wrong type (e.g. a status that does not exist, a non-uuid id) or an object on a plain
9843
+ * field answers 400 `INVALID_REQUEST`, and `details.field` names the field. An object is
9844
+ * accepted on `meta` only — `[{"meta":{"direction":"out"}}]` matches `meta->>direction`.
9840
9845
  * */
9841
9846
  filters?: string;
9842
9847
  date_from?: string;
9843
9848
  date_to?: string;
9849
+ /** @description Part of the recipient's name or nickname (`meta.counterparty_account_name`,
9850
+ * `meta.counterparty_account_nickname`), case-insensitive. Combines with `filters`,
9851
+ * sorting and pagination; `pagination` counts the matches only. Up to 100 characters;
9852
+ * `*`, `%`, `"` and `\` are ignored.
9853
+ * */
9854
+ search?: string;
9844
9855
  /** @description If `true`, includes dust orders (amount below render threshold for either currency). Defaults to `false` — dust orders are hidden. */
9845
9856
  show_low_balance?: "true" | "false";
9846
9857
  };
@@ -9866,7 +9877,7 @@ export interface paths {
9866
9877
  };
9867
9878
  };
9868
9879
  };
9869
- /** @description `INVALID_REQUEST` — `filters` is not a JSON array, `mass_payout_id` / `rfi_case_id` is not a uuid, or `scheduled` is not `all` / `upcoming` / `past` */
9880
+ /** @description `INVALID_REQUEST` — `filters` is not a JSON array, `mass_payout_id` / `rfi_case_id` is not a uuid, `scheduled` is not `all` / `upcoming` / `past`, or a filter names an unknown field or carries a value of the wrong type (`details.field` names it) */
9870
9881
  400: {
9871
9882
  headers: {
9872
9883
  [name: string]: unknown;
@@ -10026,8 +10037,19 @@ export interface paths {
10026
10037
  * failed or canceled (any status but `NEW` and `EXPECTED`). It combines with `status`,
10027
10038
  * e.g. `[{"scheduled":"past"},{"status":["PROCESSING","COMPLETE"]}]` lists the sent ones.
10028
10039
  * Any other value is rejected with 400.
10040
+ *
10041
+ * Every key is checked before the query runs (SFI-2693): an unknown field, a value of the
10042
+ * wrong type (e.g. a status that does not exist, a non-uuid id) or an object on a plain
10043
+ * field answers 400 `INVALID_REQUEST`, and `details.field` names the field. An object is
10044
+ * accepted on `meta` only — `[{"meta":{"direction":"out"}}]` matches `meta->>direction`.
10029
10045
  * */
10030
10046
  filters?: string;
10047
+ /** @description Part of the recipient's name or nickname (`meta.counterparty_account_name`,
10048
+ * `meta.counterparty_account_nickname`), case-insensitive. Combines with `filters`,
10049
+ * sorting and pagination; `pagination` counts the matches only. Up to 100 characters;
10050
+ * `*`, `%`, `"` and `\` are ignored.
10051
+ * */
10052
+ search?: string;
10031
10053
  /** @description If `true`, includes dust orders (amount below render threshold for either currency). Defaults to `false` — dust orders are hidden. */
10032
10054
  show_low_balance?: "true" | "false";
10033
10055
  };
@@ -10048,7 +10070,7 @@ export interface paths {
10048
10070
  "text/csv": string;
10049
10071
  };
10050
10072
  };
10051
- /** @description `INVALID_REQUEST` — `filters` is not a JSON array, `mass_payout_id` / `rfi_case_id` is not a uuid, or `scheduled` is not `all` / `upcoming` / `past` */
10073
+ /** @description `INVALID_REQUEST` — `filters` is not a JSON array, `mass_payout_id` / `rfi_case_id` is not a uuid, `scheduled` is not `all` / `upcoming` / `past`, or a filter names an unknown field or carries a value of the wrong type (`details.field` names it) */
10052
10074
  400: {
10053
10075
  headers: {
10054
10076
  [name: string]: unknown;
@@ -15987,6 +16009,26 @@ export interface components {
15987
16009
  * @example 1.5
15988
16010
  */
15989
16011
  comission: number;
16012
+ /**
16013
+ * Format: uuid
16014
+ * @description Currency UUID `comission` and its two parts are denominated in. Omitted by older engines — then it is the same currency on both sides.
16015
+ */
16016
+ commission_currency?: string;
16017
+ /**
16018
+ * @description Fixed part of `comission` (the rail's flat charge), in `commission_currency`.
16019
+ * @example 0.5
16020
+ */
16021
+ fixed_commission: number;
16022
+ /**
16023
+ * @description Percentage part of `comission`, in `commission_currency`. Each part is truncated to cents on its own, so `fixed_commission + percent_commission` can fall a cent short of `comission`; the total is always `comission`.
16024
+ * @example 1
16025
+ */
16026
+ percent_commission: number;
16027
+ /**
16028
+ * @description Percent rate behind `percent_commission`, in whole percent (1 = 1%).
16029
+ * @example 1
16030
+ */
16031
+ base_markup: number;
15990
16032
  /**
15991
16033
  * @description Estimated blockchain network fee (crypto withdrawals only, otherwise 0).
15992
16034
  * @example 0
@@ -17372,6 +17414,12 @@ export interface components {
17372
17414
  fee?: number | null;
17373
17415
  /** Format: uuid */
17374
17416
  fee_currency?: string | null;
17417
+ /** @description Fiat payouts: fixed part of `fee` (the rail's flat charge), in `fee_currency`. Absent on other order types and on payouts created before it was stored — show `fee` as one line then. */
17418
+ fixed_commission?: number | null;
17419
+ /** @description Percentage part of `fee`, in `fee_currency`. Each part is truncated to cents on its own, so `fixed_commission + percent_commission` can fall a cent short of `fee`; the total is always `fee`. */
17420
+ percent_commission?: number | null;
17421
+ /** @description Percent rate behind `percent_commission`, in whole percent (1 = 1%). */
17422
+ base_markup?: number | null;
17375
17423
  network_fee?: number | null;
17376
17424
  /** Format: uuid */
17377
17425
  network_fee_currency?: string | null;
@@ -17985,6 +18033,12 @@ export interface components {
17985
18033
  transaction_amount_currency?: string;
17986
18034
  fee?: number;
17987
18035
  fee_currency?: string;
18036
+ /** @description Fiat payouts: fixed part of `fee` (the rail's flat charge), in `fee_currency`. Absent on other order types and on payouts created before it was stored — show `fee` as one line then. */
18037
+ fixed_commission?: number;
18038
+ /** @description Percentage part of `fee`, in `fee_currency`. Each part is truncated to cents on its own, so `fixed_commission + percent_commission` can fall a cent short of `fee`; the total is always `fee`. */
18039
+ percent_commission?: number;
18040
+ /** @description Percent rate behind `percent_commission`, in whole percent (1 = 1%). */
18041
+ base_markup?: number;
17988
18042
  network_fee?: number;
17989
18043
  network_fee_currency?: string;
17990
18044
  exchange_rate?: number;
@@ -2732,6 +2732,11 @@ export interface paths {
2732
2732
  * - JSONB meta field: `[{"meta->>workflow_status":"PROCESSING"}]`
2733
2733
  * - By your own reference: `[{"meta->>reference":"invoice-2026-04-001"}]`
2734
2734
  *
2735
+ * Every key is checked before the query runs (SFI-2693): an unknown field, a value of the
2736
+ * wrong type (e.g. a status that does not exist, a non-uuid id) or an object on a plain
2737
+ * field answers 400 `INVALID_REQUEST`, and `details.field` names the field. An object is
2738
+ * accepted on `meta` only — `[{"meta":{"direction":"out"}}]` matches `meta->>direction`.
2739
+ *
2735
2740
  * @example [{"status":"COMPLETE"}]
2736
2741
  */
2737
2742
  filters?: string;
@@ -2739,6 +2744,12 @@ export interface paths {
2739
2744
  date_from?: string;
2740
2745
  /** @description Filter orders created up to this date (inclusive). Format - ISO 8601 (e.g., 2024-12-31T23:59:59Z) */
2741
2746
  date_to?: string;
2747
+ /** @description Part of the recipient's name or nickname (`meta.counterparty_account_name`,
2748
+ * `meta.counterparty_account_nickname`), case-insensitive. Combines with `filters`,
2749
+ * sorting and pagination; `pagination` counts the matches only. Up to 100 characters;
2750
+ * `*`, `%`, `"` and `\` are ignored.
2751
+ * */
2752
+ search?: string;
2742
2753
  /** @description If `true`, includes dust orders (amount below render threshold for either currency). Defaults to `false` — dust orders are hidden. */
2743
2754
  show_low_balance?: "true" | "false";
2744
2755
  };
@@ -3372,6 +3372,11 @@ export interface paths {
3372
3372
  * waiting, `EXPECTED`) or `past` (any status but `NEW` and `EXPECTED`); it combines with
3373
3373
  * `status`. Malformed JSON or a non-array value is rejected with 400.
3374
3374
  *
3375
+ * Every key is checked before the query runs (SFI-2693): an unknown field, a value of the
3376
+ * wrong type (e.g. a status that does not exist, a non-uuid id) or an object on a plain
3377
+ * field answers 400 `INVALID_REQUEST`, and `details.field` names the field. An object is
3378
+ * accepted on `meta` only — `[{"meta":{"direction":"out"}}]` matches `meta->>direction`.
3379
+ *
3375
3380
  * @example [{"status":"COMPLETE"}]
3376
3381
  */
3377
3382
  filters?: string;
@@ -3379,6 +3384,12 @@ export interface paths {
3379
3384
  date_from?: string;
3380
3385
  /** @description Orders created up to this date (inclusive), ISO 8601 */
3381
3386
  date_to?: string;
3387
+ /** @description Part of the recipient's name or nickname (`meta.counterparty_account_name`,
3388
+ * `meta.counterparty_account_nickname`), case-insensitive. Combines with `filters`,
3389
+ * sorting and pagination; `pagination` counts the matches only. Up to 100 characters;
3390
+ * `*`, `%`, `"` and `\` are ignored.
3391
+ * */
3392
+ search?: string;
3382
3393
  /** @description If `true`, includes dust orders (amount below render threshold for either currency). Defaults to `false` — dust orders are hidden. */
3383
3394
  show_low_balance?: "true" | "false";
3384
3395
  };
@@ -3404,7 +3415,7 @@ export interface paths {
3404
3415
  };
3405
3416
  };
3406
3417
  };
3407
- /** @description Invalid `filters` (not a JSON array), non-uuid `mass_payout_id`, or `scheduled` other than `all` / `upcoming` / `past` */
3418
+ /** @description Invalid `filters` (not a JSON array), non-uuid `mass_payout_id`, `scheduled` other than `all` / `upcoming` / `past`, or a filter with an unknown field or a value of the wrong type (`details.field` names it) */
3408
3419
  400: {
3409
3420
  headers: {
3410
3421
  [name: string]: unknown;
@@ -2781,28 +2781,20 @@ export declare namespace API {
2781
2781
  }
2782
2782
  namespace List {
2783
2783
  namespace ByWallet {
2784
- interface Request {
2785
- wallet_uuid: string;
2786
- offset?: number;
2787
- limit?: number;
2788
- sort_by?: string;
2789
- sort_order?: 'asc' | 'desc';
2784
+ type ByWalletRoot = pathsV1Frontend['/frontend/orders/wallet/{wallet_uuid}'];
2785
+ export type Request = ByWalletRoot['get']['parameters']['path'] & Omit<NonNullable<ByWalletRoot['get']['parameters']['query']>, 'filters'> & {
2790
2786
  filters?: API.Orders.V2.List.ByWallet.OrderListFilter[];
2791
- date_from?: string;
2792
- date_to?: string;
2793
- show_low_balance?: 'true' | 'false';
2794
- }
2795
- type Response = pathsV1Frontend['/frontend/orders/wallet/{wallet_uuid}']['get']['responses'][200]['content']['application/json'];
2787
+ };
2788
+ export type Response = ByWalletRoot['get']['responses'][200]['content']['application/json'];
2789
+ export {};
2796
2790
  }
2797
2791
  namespace Csv {
2798
- interface Request {
2799
- wallet_uuid: string;
2792
+ type CsvRoot = pathsV1Frontend['/frontend/orders/wallet/{wallet_uuid}/csv'];
2793
+ export type Request = CsvRoot['get']['parameters']['path'] & Omit<NonNullable<CsvRoot['get']['parameters']['query']>, 'filters'> & {
2800
2794
  filters?: API.Orders.V2.List.ByWallet.OrderListFilter[];
2801
- date_from?: string;
2802
- date_to?: string;
2803
- show_low_balance?: 'true' | 'false';
2804
- }
2805
- type Response = string;
2795
+ };
2796
+ export type Response = string;
2797
+ export {};
2806
2798
  }
2807
2799
  }
2808
2800
  namespace ScheduledFunding {
@@ -9,6 +9,10 @@ type CalcResult = {
9
9
  network_fee: number;
10
10
  transaction_fee: number;
11
11
  from_symbol: string;
12
+ commission_currency?: string;
13
+ fixed_commission?: number;
14
+ percent_commission?: number;
15
+ base_markup?: number;
12
16
  };
13
17
  type CalcData = CalcResult & {
14
18
  is_subtract: boolean;
@@ -67,6 +67,10 @@ export const useOrderCalc = ({ from_currency_id, to_currency_id, calcHandler, di
67
67
  network_fee: data.network_fee,
68
68
  transaction_fee: data.transaction_fee,
69
69
  from_symbol: data.from_symbol,
70
+ commission_currency: data.commission_currency,
71
+ fixed_commission: data.fixed_commission,
72
+ percent_commission: data.percent_commission,
73
+ base_markup: data.base_markup,
70
74
  is_reverse,
71
75
  is_subtract,
72
76
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarefi-bff-api-module",
3
- "version": "1.36.89",
3
+ "version": "1.36.91",
4
4
  "description": "Squarefi BFF API client module",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",