squarefi-bff-api-module 1.36.88 → 1.36.90

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.
@@ -784,7 +784,138 @@ export interface paths {
784
784
  };
785
785
  };
786
786
  put?: never;
787
- post?: never;
787
+ /** Create destination */
788
+ post: {
789
+ parameters: {
790
+ query?: never;
791
+ header?: never;
792
+ path?: never;
793
+ cookie?: never;
794
+ };
795
+ requestBody: {
796
+ content: {
797
+ "application/json": {
798
+ /**
799
+ * Format: uuid
800
+ * @description Parent counterparty account ID
801
+ */
802
+ counterparty_account_id: string;
803
+ /**
804
+ * @description Payment rail type
805
+ * @enum {string}
806
+ */
807
+ type: "ACH" | "RTP" | "SWIFT" | "SEPA" | "CRYPTO_EXTERNAL" | "CRYPTO_INTERNAL" | "CHAPS" | "FPS" | "FEDWIRE" | "INTERNAL";
808
+ /** @description User-friendly alias for this destination */
809
+ nickname?: string;
810
+ /** @description Required for banking types (ACH, RTP, SWIFT, SEPA, CHAPS, FPS, FEDWIRE). What each rail needs:
811
+ *
812
+ * | Rail | Required | Format |
813
+ * | --- | --- | --- |
814
+ * | ACH, RTP, FEDWIRE | `routing_number`, `account_number` | ABA routing number (9 digits, valid check digit); account 4–17 letters or digits |
815
+ * | SEPA | `iban` | IBAN of a SEPA-zone country; length, account format and check digits per country; `swift_bic` optional |
816
+ * | SWIFT | `swift_bic`, `account_number` (or `iban`) | valid SWIFT/BIC (not a test BIC); an IBAN-shaped account must be a valid IBAN; for a US bank `routing_number` is optional and must be valid when given |
817
+ * | CHAPS, FPS | `sort_code`, `account_number` | UK: 6-digit sort code and 8-digit account; FPS in HKD: 3-digit bank clearing code |
818
+ *
819
+ * Every problem is returned at once in `error.details.issues`. `POST /api/counterparty/destinations/validate` checks a payload without saving it.
820
+ * */
821
+ banking_data?: {
822
+ /** @description Bank account number (on SWIFT, the IBAN where the bank's country uses one) */
823
+ account_number?: string;
824
+ /** @description US ABA routing number */
825
+ routing_number?: string;
826
+ /** @description Bank name */
827
+ bank_name?: string;
828
+ /** @description SWIFT/BIC code */
829
+ swift_bic?: string;
830
+ /** @description IBAN */
831
+ iban?: string;
832
+ /** @description Sort code (6 digits, UK banking) */
833
+ sort_code?: string;
834
+ /** @description Additional notes/reference */
835
+ note?: string;
836
+ /** @description Bank/beneficiary postal address */
837
+ address?: {
838
+ country_id?: number;
839
+ city?: string;
840
+ postcode?: string;
841
+ street1?: string;
842
+ street2?: string;
843
+ /** @description Required when the selected country has states; countries without states may omit it */
844
+ state_id?: number | null;
845
+ };
846
+ };
847
+ /** @description Required for crypto types (CRYPTO_EXTERNAL, CRYPTO_INTERNAL) */
848
+ crypto_data?: {
849
+ /** @description Blockchain address */
850
+ address?: string;
851
+ /**
852
+ * Format: uuid
853
+ * @description Currency UUID
854
+ */
855
+ currency_id?: string;
856
+ /** @description Memo/tag (for XRP, XLM, etc.) */
857
+ memo?: string;
858
+ /**
859
+ * @description Hosting classification of the address (custodial VASP, self-hosted/unhosted, or unknown)
860
+ * @default unknown
861
+ * @enum {string}
862
+ */
863
+ wallet_custody_type?: "custodial" | "selfhosted" | "unknown";
864
+ };
865
+ /** @description Required for type INTERNAL — points at the receiver wallet on the same platform. An account holds one INTERNAL destination per wallet; if it already has an active one to this wallet, that destination is returned instead of a new one. */
866
+ internal_data?: {
867
+ /**
868
+ * Format: uuid
869
+ * @description Target (receiver) wallet uuid on the same platform.
870
+ */
871
+ wallet_id: string;
872
+ /** @description Optional, reserved for future use. */
873
+ description?: string;
874
+ };
875
+ };
876
+ };
877
+ };
878
+ responses: {
879
+ /** @description Destination created */
880
+ 201: {
881
+ headers: {
882
+ [name: string]: unknown;
883
+ };
884
+ content: {
885
+ "application/json": {
886
+ /** @example true */
887
+ success?: boolean;
888
+ data?: {
889
+ destination?: components["schemas"]["CounterpartyDestination"];
890
+ /** @example Destination created successfully */
891
+ message?: string;
892
+ };
893
+ };
894
+ };
895
+ };
896
+ /** @description Validation error. Bank-details problems come as `VALIDATION_ERROR` with every problem in `error.details.issues` (`field`, `code`, `message`, optional `country` / `detected`).
897
+ *
898
+ * **Until 2026-10-12 00:00 UTC** the stricter bank-details rules (per-country IBAN checks, SEPA-zone IBAN, BIC format, ABA check digit, account formats) are reported by the validation endpoint but do not refuse this request; from then on they do.
899
+ * */
900
+ 400: {
901
+ headers: {
902
+ [name: string]: unknown;
903
+ };
904
+ content: {
905
+ "application/json": components["schemas"]["ApiErrorResponse"];
906
+ };
907
+ };
908
+ /** @description Account not found */
909
+ 404: {
910
+ headers: {
911
+ [name: string]: unknown;
912
+ };
913
+ content: {
914
+ "application/json": components["schemas"]["ApiErrorResponse"];
915
+ };
916
+ };
917
+ };
918
+ };
788
919
  delete?: never;
789
920
  options?: never;
790
921
  head?: never;
@@ -931,6 +1062,78 @@ export interface paths {
931
1062
  };
932
1063
  trace?: never;
933
1064
  };
1065
+ "/api/counterparty/destinations/validate": {
1066
+ parameters: {
1067
+ query?: never;
1068
+ header?: never;
1069
+ path?: never;
1070
+ cookie?: never;
1071
+ };
1072
+ get?: never;
1073
+ put?: never;
1074
+ /**
1075
+ * Validate destination details without saving
1076
+ * @description Dry run of `POST /api/counterparty/destinations`: the same body and the same checks — bank details per
1077
+ * payment method, address completeness, location reference data, bank-country consistency — with nothing
1078
+ * saved and no counterparty account needed. Answers `200` whether or not the details are valid;
1079
+ * `valid: false` comes with every problem in `issues`.
1080
+ *
1081
+ * It always applies the strict bank-details rules, including before they start refusing creation on this
1082
+ * surface (2026-10-12 00:00 UTC) — use it to find out what your integration sends that will be refused.
1083
+ * Without an account it cannot tell whether an INTERNAL target wallet is active — creation still checks
1084
+ * that. Rate limited to 60 requests per minute per API key's wallet.
1085
+ *
1086
+ */
1087
+ post: {
1088
+ parameters: {
1089
+ query?: never;
1090
+ header?: never;
1091
+ path?: never;
1092
+ cookie?: never;
1093
+ };
1094
+ requestBody: {
1095
+ content: {
1096
+ "application/json": {
1097
+ /** @enum {string} */
1098
+ type: "ACH" | "RTP" | "SWIFT" | "SEPA" | "CRYPTO_EXTERNAL" | "CRYPTO_INTERNAL" | "CHAPS" | "FPS" | "FEDWIRE" | "INTERNAL";
1099
+ /** @description Same shape as in `POST /api/counterparty/destinations`. */
1100
+ banking_data?: Record<string, never>;
1101
+ crypto_data?: Record<string, never>;
1102
+ internal_data?: Record<string, never>;
1103
+ };
1104
+ };
1105
+ };
1106
+ responses: {
1107
+ /** @description Validation result */
1108
+ 200: {
1109
+ headers: {
1110
+ [name: string]: unknown;
1111
+ };
1112
+ content: {
1113
+ "application/json": {
1114
+ /** @example true */
1115
+ success?: boolean;
1116
+ data?: components["schemas"]["DestinationValidationResult"];
1117
+ };
1118
+ };
1119
+ };
1120
+ /** @description Too many validation requests */
1121
+ 429: {
1122
+ headers: {
1123
+ [name: string]: unknown;
1124
+ };
1125
+ content: {
1126
+ "application/json": components["schemas"]["ApiErrorResponse"];
1127
+ };
1128
+ };
1129
+ };
1130
+ };
1131
+ delete?: never;
1132
+ options?: never;
1133
+ head?: never;
1134
+ patch?: never;
1135
+ trace?: never;
1136
+ };
934
1137
  "/api/crypto_wallets": {
935
1138
  parameters: {
936
1139
  query?: never;
@@ -4808,10 +5011,24 @@ export interface paths {
4808
5011
  * Besides order columns it accepts `mass_payout_id` (uuid), which narrows the
4809
5012
  * result to the orders of one mass payout batch — the same batch reported by
4810
5013
  * the `mass_payout_id` field of each order. A non-uuid value is rejected with 400.
5014
+ * `scheduled` narrows it to scheduled payments: `all`, `upcoming` (approved and
5015
+ * waiting, `EXPECTED`) or `past` (any status but `NEW` and `EXPECTED`); it combines
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`.
4811
5022
  * */
4812
5023
  filters?: string;
4813
5024
  date_from?: string;
4814
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;
4815
5032
  /** @description If `true`, includes dust orders (amount below render threshold for either currency). Defaults to `false` — dust orders are hidden. */
4816
5033
  show_low_balance?: "true" | "false";
4817
5034
  };
@@ -4921,6 +5138,9 @@ export interface paths {
4921
5138
  * status NEW can be approved. Orders
4922
5139
  * created with `scheduled_at` move to EXPECTED instead — no funds are
4923
5140
  * debited until execution at the requested time.
5141
+ * A scheduled order is approved only while its `scheduled_at` is at least
5142
+ * one hour away; a later approve answers 400 `SCHEDULED_AT_TOO_SOON`
5143
+ * (create the payment again with a new date).
4924
5144
  *
4925
5145
  */
4926
5146
  post: {
@@ -4948,7 +5168,7 @@ export interface paths {
4948
5168
  };
4949
5169
  };
4950
5170
  };
4951
- /** @description Insufficient funds (`INSUFFICIENT_FUNDS` — the order is released back to NEW) or validation error */
5171
+ /** @description Insufficient funds (`INSUFFICIENT_FUNDS` — the order is released back to NEW), a scheduled order less than an hour before its `scheduled_at` (`SCHEDULED_AT_TOO_SOON`), or validation error */
4952
5172
  400: {
4953
5173
  headers: {
4954
5174
  [name: string]: unknown;
@@ -5141,7 +5361,7 @@ export interface paths {
5141
5361
  note?: string;
5142
5362
  /**
5143
5363
  * Format: date-time
5144
- * @description Optional. Schedule the transfer for a future time (min 1 hour, max 90 days ahead). No funds are reserved; after approval the order waits in EXPECTED status and executes automatically.
5364
+ * @description Optional. Schedule the transfer for a future time (min 1 hour, max 90 days ahead). No funds are reserved; after approval the order waits in EXPECTED status and executes automatically, once. If the balance does not cover it then, it fails with `scheduled_failure.code` INSUFFICIENT_FUNDS and is not retried. Approve at least 1 hour before scheduled_at.
5145
5365
  * @example 2026-07-20T12:00:00Z
5146
5366
  */
5147
5367
  scheduled_at?: string;
@@ -6646,14 +6866,14 @@ export interface paths {
6646
6866
  * - Returns raw balance records without aggregation
6647
6867
  * - Includes crypto metadata for each balance
6648
6868
  * - No currency conversion or totals calculation
6649
- * - **Automatically filters out dust balances** below render_threshold
6869
+ * - **Automatically filters out dust balances** — smaller than the currency threshold in absolute value; a negative balance (a debt) beyond it is always returned
6650
6870
  * - **Does NOT include icon in crypto meta** (use frontend endpoint if icon needed)
6651
6871
  *
6652
6872
  */
6653
6873
  get: {
6654
6874
  parameters: {
6655
6875
  query?: {
6656
- /** @description When false (default), dust balances below threshold are hidden */
6876
+ /** @description When false (default), dust balances — smaller than the currency threshold in absolute value — are hidden */
6657
6877
  show_low_balance?: boolean;
6658
6878
  };
6659
6879
  header?: never;
@@ -7274,8 +7494,10 @@ export interface components {
7274
7494
  * @enum {string}
7275
7495
  */
7276
7496
  brand?: "VISA" | "MASTERCARD";
7277
- /** @description Whether card can be tokenized */
7497
+ /** @description Whether this card can be added to a mobile wallet; set when the card was issued. Which ones: `digital_wallets`. */
7278
7498
  tokenizable?: boolean;
7499
+ /** @description Mobile wallets this card can be added to: the wallets of the card's program, or none when the card's `tokenizable` is false. Left out when the program could not be read. */
7500
+ digital_wallets?: ("APPLE_PAY" | "GOOGLE_PAY")[];
7279
7501
  /** @description Total spending cap/limit */
7280
7502
  spend_cap?: number;
7281
7503
  /** @description Total amount spent */
@@ -7671,8 +7893,16 @@ export interface components {
7671
7893
  form_factor?: "virtual" | "physical" | "both";
7672
7894
  /** @description Program type */
7673
7895
  type?: string;
7674
- /** @description Whether cards can be tokenized */
7896
+ /** @description Whether cards of this program can be added to at least one mobile wallet. Which ones: `digital_wallets`. */
7675
7897
  tokenizable?: boolean;
7898
+ /**
7899
+ * @description Mobile wallets cards of this program can be added to. Empty when none; a program can support one wallet without the other.
7900
+ * @example [
7901
+ * "APPLE_PAY",
7902
+ * "GOOGLE_PAY"
7903
+ * ]
7904
+ */
7905
+ digital_wallets?: ("APPLE_PAY" | "GOOGLE_PAY")[];
7676
7906
  /** @description What a cardholder on this program must carry. Set per program in the vendor config, so it can change without a release — read it instead of hardcoding the form. */
7677
7907
  cardholder_requirements?: {
7678
7908
  /**
@@ -7870,7 +8100,7 @@ export interface components {
7870
8100
  * @description Destination/payment rail type
7871
8101
  * @enum {string}
7872
8102
  */
7873
- type?: "ACH" | "SWIFT" | "SEPA" | "CRYPTO_EXTERNAL" | "CRYPTO_INTERNAL" | "CHAPS" | "FPS" | "FEDWIRE" | "INTERNAL";
8103
+ type?: "ACH" | "RTP" | "SWIFT" | "SEPA" | "CRYPTO_EXTERNAL" | "CRYPTO_INTERNAL" | "CHAPS" | "FPS" | "FEDWIRE" | "INTERNAL";
7874
8104
  /** @description User-friendly alias */
7875
8105
  nickname?: string | null;
7876
8106
  /** Format: date-time */
@@ -7880,8 +8110,37 @@ export interface components {
7880
8110
  banking_data?: components["schemas"]["BankingData"];
7881
8111
  crypto_data?: components["schemas"]["CryptoData"];
7882
8112
  internal_data?: components["schemas"]["CounterpartyInternalData"];
8113
+ /** @description Banking destinations only: problems that make the stored bank details unpayable (an IBAN that fails its checks, an IBAN outside SEPA on a SEPA destination, a routing number that fails the ABA check). Non-empty means withdrawals to this destination are refused with `DESTINATION_INVALID` — details cannot be edited, so add a new destination. Empty for valid banking destinations; absent for crypto and internal ones. */
8114
+ validation_issues?: components["schemas"]["DestinationValidationIssue"][];
7883
8115
  counterparty_account?: components["schemas"]["CounterpartyAccountRef"];
7884
8116
  };
8117
+ /** @description One problem with a destination payload. `field` is the request path of the offending value (`iban`, `routing_number`, `address.city`…); `message` is ready to show under that field. */
8118
+ DestinationValidationIssue: {
8119
+ /** @example iban */
8120
+ field: string;
8121
+ /**
8122
+ * @description Machine-readable reason. Bank details: `REQUIRED`, `IBAN_WRONG_FORMAT`, `IBAN_INVALID_CHARACTERS`, `IBAN_COUNTRY_NOT_SUPPORTED`, `IBAN_WRONG_LENGTH`, `IBAN_WRONG_BBAN_FORMAT`, `IBAN_WRONG_CHECKSUM`, `IBAN_WRONG_NATIONAL_CHECKSUM`, `IBAN_QR_NOT_ALLOWED`, `IBAN_NOT_SEPA`, `IBAN_BIC_COUNTRY_MISMATCH`, `BIC_WRONG_FORMAT`, `BIC_UNKNOWN_COUNTRY`, `BIC_TEST_CODE`, `ROUTING_NUMBER_INVALID`, `ACCOUNT_NUMBER_INVALID`, `SORT_CODE_INVALID`, `WRONG_IDENTIFIER_TYPE`, `INVALID_VALUE`; reference data: `BANK_COUNTRY_MISMATCH`, `VALIDATION_ERROR`; dry run only: `INVALID_TYPE`. New codes may be added — show `message` for an unknown one.
8123
+ * @example IBAN_NOT_SEPA
8124
+ */
8125
+ code: string;
8126
+ /** @example IBAN country AE is outside the SEPA zone — SEPA transfers cannot reach it */
8127
+ message: string;
8128
+ /**
8129
+ * @description ISO 3166-1 alpha-2 country the problem is about, when there is one
8130
+ * @example AE
8131
+ */
8132
+ country?: string;
8133
+ /**
8134
+ * @description For `WRONG_IDENTIFIER_TYPE`: what the value looks like (an IBAN typed into a US account-number field…)
8135
+ * @enum {string}
8136
+ */
8137
+ detected?: "IBAN" | "BIC" | "ROUTING_NUMBER";
8138
+ };
8139
+ DestinationValidationResult: {
8140
+ /** @description True when creating the destination with this payload would pass every check */
8141
+ valid: boolean;
8142
+ issues: components["schemas"]["DestinationValidationIssue"][];
8143
+ };
7885
8144
  /** @description Owning counterparty account, embedded on destination reads; absent on create/update. */
7886
8145
  CounterpartyAccountRef: {
7887
8146
  /** Format: uuid */
@@ -8304,6 +8563,16 @@ export interface components {
8304
8563
  * @description Requested execution time for scheduled payments (status EXPECTED); null for immediate orders
8305
8564
  */
8306
8565
  scheduled_at?: string | null;
8566
+ /** @description Why a scheduled payment failed — set on a scheduled order in `FAILED`, null on any other scheduled order, absent on an immediate one. A scheduled payment is attempted once and never retried: `INSUFFICIENT_FUNDS` means nothing was debited and the payment can be created again; `PROVIDER_ERROR` — the payment was debited and the provider side failed; `EXECUTION_ERROR` — any other reason. */
8567
+ scheduled_failure?: {
8568
+ /** @enum {string} */
8569
+ code: "INSUFFICIENT_FUNDS" | "PROVIDER_ERROR" | "EXECUTION_ERROR";
8570
+ /**
8571
+ * @description Customer-facing text of the code.
8572
+ * @example The balance was insufficient at the scheduled time.
8573
+ */
8574
+ message: string;
8575
+ } | null;
8307
8576
  /** Format: date-time */
8308
8577
  created_at?: string;
8309
8578
  /** Format: date-time */
@@ -8355,7 +8624,7 @@ export interface components {
8355
8624
  note?: string;
8356
8625
  /**
8357
8626
  * Format: date-time
8358
- * @description Optional. Schedule the payment for a future time (min 1 hour, max 90 days ahead). No funds are reserved; after approval the order waits in `EXPECTED` status and executes automatically at the requested time (balance is checked then, with retries and email notifications on insufficient funds).
8627
+ * @description Optional. Schedule the payment for a future time (min 1 hour, max 90 days ahead). No funds are reserved; after approval the order waits in `EXPECTED` status and executes automatically at the requested time, once: the balance is checked then, and if it does not cover the payment the order fails with `scheduled_failure.code` `INSUFFICIENT_FUNDS` and is not retried. Approve at least 1 hour before `scheduled_at`.
8359
8628
  * @example 2026-07-20T12:00:00Z
8360
8629
  */
8361
8630
  scheduled_at?: string;
@@ -8407,7 +8676,7 @@ export interface components {
8407
8676
  note?: string;
8408
8677
  /**
8409
8678
  * Format: date-time
8410
- * @description Optional. Schedule the payment for a future time (min 1 hour, max 90 days ahead). No funds are reserved; after approval the order waits in `EXPECTED` status and executes automatically at the requested time (balance is checked then, with retries and email notifications on insufficient funds).
8679
+ * @description Optional. Schedule the payment for a future time (min 1 hour, max 90 days ahead). No funds are reserved; after approval the order waits in `EXPECTED` status and executes automatically at the requested time, once: the balance is checked then, and if it does not cover the payment the order fails with `scheduled_failure.code` `INSUFFICIENT_FUNDS` and is not retried. Approve at least 1 hour before `scheduled_at`.
8411
8680
  * @example 2026-07-20T12:00:00Z
8412
8681
  */
8413
8682
  scheduled_at?: string;
@@ -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;
@@ -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
  };