squarefi-bff-api-module 1.36.86 → 1.36.88

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.
@@ -80,6 +80,7 @@ export declare const orders: {
80
80
  getByWalletUuid: ({ wallet_uuid, filters, ...props }: API.Orders.Frontend.List.Csv.Request) => Promise<API.Orders.Frontend.List.Csv.Response>;
81
81
  };
82
82
  };
83
+ scheduledFunding: ({ wallet_uuid, }: API.Orders.Frontend.ScheduledFunding.Request) => Promise<API.Orders.Frontend.ScheduledFunding.Response>;
83
84
  types: {
84
85
  list: () => Promise<API.Orders.Frontend.Types.List.Response>;
85
86
  getById: ({ id, }: API.Orders.Frontend.Types.GetById.Request) => Promise<API.Orders.Frontend.Types.GetById.Response>;
@@ -149,6 +149,7 @@ export const orders = {
149
149
  },
150
150
  },
151
151
  },
152
+ scheduledFunding: ({ wallet_uuid, }) => apiClientV1Frontend.getRequest(`/frontend/orders/wallet/${wallet_uuid}/scheduled/funding`),
152
153
  types: {
153
154
  list: () => apiClientV1Frontend.getRequest('/frontend/orders/types'),
154
155
  getById: ({ id, }) => apiClientV1Frontend.getRequest(`/frontend/orders/types/${id}`),
@@ -5206,8 +5206,10 @@ export interface paths {
5206
5206
  status: "ACTIVE" | "INACTIVE";
5207
5207
  /** @description Default card spending limit */
5208
5208
  card_limit: number;
5209
- /** @description Whether card supports Apple/Google Pay */
5209
+ /** @description At least one mobile wallet is supported; which ones — `digital_wallets` */
5210
5210
  tokenizable: boolean;
5211
+ /** @description Mobile wallets cards of this program can be added to; empty when none. A program can support one without the other */
5212
+ digital_wallets: ("APPLE_PAY" | "GOOGLE_PAY")[];
5211
5213
  /** @description Icon URL for UI display */
5212
5214
  icon?: string | null;
5213
5215
  /** @description Program code */
@@ -5309,8 +5311,10 @@ export interface paths {
5309
5311
  status: "ACTIVE" | "INACTIVE";
5310
5312
  /** @description Default card spending limit */
5311
5313
  card_limit: number;
5312
- /** @description Whether card supports Apple/Google Pay */
5314
+ /** @description At least one mobile wallet is supported; which ones — `digital_wallets` */
5313
5315
  tokenizable: boolean;
5316
+ /** @description Mobile wallets cards of this program can be added to; empty when none. A program can support one without the other */
5317
+ digital_wallets: ("APPLE_PAY" | "GOOGLE_PAY")[];
5314
5318
  icon?: string | null;
5315
5319
  code?: string | null;
5316
5320
  initial_topup?: number | null;
@@ -8679,7 +8683,7 @@ export interface paths {
8679
8683
  is_reverse?: boolean;
8680
8684
  /**
8681
8685
  * Format: date-time
8682
- * @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.
8686
+ * @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.
8683
8687
  */
8684
8688
  scheduled_at?: string;
8685
8689
  /** @description Optional supporting documents persisted with the order. */
@@ -9352,6 +9356,9 @@ export interface paths {
9352
9356
  * (request the OTP for the order being approved). Orders created with
9353
9357
  * `scheduled_at` move to EXPECTED instead — no funds are debited until
9354
9358
  * execution at the requested time.
9359
+ * A scheduled order is approved only while its `scheduled_at` is at least
9360
+ * one hour away; a later approve answers 400 `SCHEDULED_AT_TOO_SOON`
9361
+ * (create the payment again with a new date).
9355
9362
  *
9356
9363
  */
9357
9364
  post: {
@@ -9385,7 +9392,7 @@ export interface paths {
9385
9392
  };
9386
9393
  };
9387
9394
  };
9388
- /** @description Insufficient funds (`INSUFFICIENT_FUNDS` — the order is released back to NEW) or validation error */
9395
+ /** @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 */
9389
9396
  400: {
9390
9397
  headers: {
9391
9398
  [name: string]: unknown;
@@ -9823,6 +9830,13 @@ export interface paths {
9823
9830
  * among them show only with `show_low_balance=true`, as everywhere in this list. It
9824
9831
  * combines with the other filters and the dates. A request of another account, or an
9825
9832
  * unknown id, gives an empty result; a non-uuid value is rejected with 400.
9833
+ *
9834
+ * `scheduled` narrows the result to scheduled payments (orders with `scheduled_at`):
9835
+ * `all` — every one of them, unapproved drafts included; `upcoming` — approved and
9836
+ * waiting for their date (`EXPECTED`); `past` — their turn has come: executing, sent,
9837
+ * failed or canceled (any status but `NEW` and `EXPECTED`). It combines with `status`,
9838
+ * e.g. `[{"scheduled":"past"},{"status":["PROCESSING","COMPLETE"]}]` lists the sent ones.
9839
+ * Any other value is rejected with 400.
9826
9840
  * */
9827
9841
  filters?: string;
9828
9842
  date_from?: string;
@@ -9852,7 +9866,7 @@ export interface paths {
9852
9866
  };
9853
9867
  };
9854
9868
  };
9855
- /** @description `INVALID_REQUEST` — `filters` is not a JSON array, or `mass_payout_id` / `rfi_case_id` is not a uuid */
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` */
9856
9870
  400: {
9857
9871
  headers: {
9858
9872
  [name: string]: unknown;
@@ -9878,6 +9892,101 @@ export interface paths {
9878
9892
  patch?: never;
9879
9893
  trace?: never;
9880
9894
  };
9895
+ "/frontend/orders/wallet/{wallet_uuid}/scheduled/funding": {
9896
+ parameters: {
9897
+ query?: never;
9898
+ header?: never;
9899
+ path?: never;
9900
+ cookie?: never;
9901
+ };
9902
+ /**
9903
+ * Scheduled payments funding
9904
+ * @description Whether the wallet's current balance covers its scheduled payments that wait for their date
9905
+ * (`EXPECTED`). Funds are not reserved for a scheduled payment — it is debited at its
9906
+ * `scheduled_at` and fails if the balance does not cover it then; there is no retry.
9907
+ *
9908
+ * Payments are taken in `scheduled_at` order, each from the balance of the currency it
9909
+ * debits (`from_uuid`, amount `amount_from`). A payment is `covered` when the current
9910
+ * balance still holds it after every earlier payment of that currency. Per currency the
9911
+ * response gives the scheduled total, the balance and the `shortfall` (0 when covered), also
9912
+ * in USD; `total_shortfall_usd` sums the currencies that have a USD rate.
9913
+ *
9914
+ * **Access Control**: User must have access to the wallet
9915
+ *
9916
+ */
9917
+ get: {
9918
+ parameters: {
9919
+ query?: never;
9920
+ header?: never;
9921
+ path: {
9922
+ wallet_uuid: string;
9923
+ };
9924
+ cookie?: never;
9925
+ };
9926
+ requestBody?: never;
9927
+ responses: {
9928
+ /** @description Funding forecast of the wallet's scheduled payments */
9929
+ 200: {
9930
+ headers: {
9931
+ [name: string]: unknown;
9932
+ };
9933
+ content: {
9934
+ "application/json": {
9935
+ /** @example true */
9936
+ success: boolean;
9937
+ data: {
9938
+ /** @description True when every waiting scheduled payment is covered. */
9939
+ sufficient: boolean;
9940
+ /** @example 41.84 */
9941
+ total_shortfall_usd: number;
9942
+ currencies: {
9943
+ /** Format: uuid */
9944
+ currency_id: string;
9945
+ /** @description Current balance in this currency. */
9946
+ available: number;
9947
+ /** @description Sum of the waiting scheduled payments in this currency. */
9948
+ scheduled_amount: number;
9949
+ /** @description Missing to send all of them; 0 when covered. */
9950
+ shortfall: number;
9951
+ /** @description The shortfall in USD; null when the currency has no USD rate. */
9952
+ shortfall_usd: number | null;
9953
+ sufficient: boolean;
9954
+ orders_count: number;
9955
+ }[];
9956
+ /** @description The waiting scheduled payments, earliest `scheduled_at` first. */
9957
+ orders: {
9958
+ /** Format: uuid */
9959
+ order_id: string;
9960
+ /** Format: uuid */
9961
+ order_uuid: string;
9962
+ /** Format: uuid */
9963
+ currency_id: string;
9964
+ amount: number;
9965
+ /** Format: date-time */
9966
+ scheduled_at: string;
9967
+ covered: boolean;
9968
+ }[];
9969
+ };
9970
+ };
9971
+ };
9972
+ };
9973
+ /** @description Access denied to wallet */
9974
+ 403: {
9975
+ headers: {
9976
+ [name: string]: unknown;
9977
+ };
9978
+ content?: never;
9979
+ };
9980
+ };
9981
+ };
9982
+ put?: never;
9983
+ post?: never;
9984
+ delete?: never;
9985
+ options?: never;
9986
+ head?: never;
9987
+ patch?: never;
9988
+ trace?: never;
9989
+ };
9881
9990
  "/frontend/orders/wallet/{wallet_uuid}/csv": {
9882
9991
  parameters: {
9883
9992
  query?: never;
@@ -9910,6 +10019,13 @@ export interface paths {
9910
10019
  * among them show only with `show_low_balance=true`, as everywhere in this list. It
9911
10020
  * combines with the other filters and the dates. A request of another account, or an
9912
10021
  * unknown id, gives an empty result; a non-uuid value is rejected with 400.
10022
+ *
10023
+ * `scheduled` narrows the result to scheduled payments (orders with `scheduled_at`):
10024
+ * `all` — every one of them, unapproved drafts included; `upcoming` — approved and
10025
+ * waiting for their date (`EXPECTED`); `past` — their turn has come: executing, sent,
10026
+ * failed or canceled (any status but `NEW` and `EXPECTED`). It combines with `status`,
10027
+ * e.g. `[{"scheduled":"past"},{"status":["PROCESSING","COMPLETE"]}]` lists the sent ones.
10028
+ * Any other value is rejected with 400.
9913
10029
  * */
9914
10030
  filters?: string;
9915
10031
  /** @description If `true`, includes dust orders (amount below render threshold for either currency). Defaults to `false` — dust orders are hidden. */
@@ -9932,7 +10048,7 @@ export interface paths {
9932
10048
  "text/csv": string;
9933
10049
  };
9934
10050
  };
9935
- /** @description `INVALID_REQUEST` — `filters` is not a JSON array, or `mass_payout_id` / `rfi_case_id` is not a uuid */
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` */
9936
10052
  400: {
9937
10053
  headers: {
9938
10054
  [name: string]: unknown;
@@ -11531,6 +11647,11 @@ export interface paths {
11531
11647
  * question, a new message from compliance and the closing also arrive as the
11532
11648
  * `RFI_REQUESTED` / `RFI_RESOLVED` notifications (in-app, push, email).
11533
11649
  *
11650
+ * No KYC status is required here or on any other `/frontend/rfi` path: requests are
11651
+ * read and answered while the account's verification is pending, under review, on
11652
+ * hold or declined — an onboarding request exists precisely because verification is
11653
+ * not finished.
11654
+ *
11534
11655
  */
11535
11656
  get: {
11536
11657
  parameters: {
@@ -11616,7 +11737,7 @@ export interface paths {
11616
11737
  * Get a compliance request with its conversation and covered transactions
11617
11738
  * @description The conversation holds compliance's questions and the client's answers, oldest first.
11618
11739
  * A request of another account answers 404, and so does every request of a workspace
11619
- * that still works RFI by email.
11740
+ * that still works RFI by email. Works at any KYC status of the account.
11620
11741
  *
11621
11742
  */
11622
11743
  get: {
@@ -11704,7 +11825,8 @@ export interface paths {
11704
11825
  *
11705
11826
  * The request moves to `awaiting_compliance`; answering again while compliance reviews is
11706
11827
  * allowed, and compliance may ask further rounds. Requires the `owner` or `admin` role on the
11707
- * wallet — an `auditor` reads only (`can_reply` is false for them).
11828
+ * wallet — an `auditor` reads only (`can_reply` is false for them). The KYC status of
11829
+ * the account does not matter: an answer is accepted while verification is unfinished too.
11708
11830
  * Do not set `Content-Type` manually — the browser adds the multipart boundary.
11709
11831
  *
11710
11832
  */
@@ -11782,7 +11904,7 @@ export interface paths {
11782
11904
  "application/json": components["schemas"]["ErrorResponse"];
11783
11905
  };
11784
11906
  };
11785
- /** @description `RATE_LIMIT_EXCEEDED` — more than 20 replies a minute */
11907
+ /** @description `RATE_LIMIT_EXCEEDED` — more than 20 answers within a minute by one user. The limit is counted per signed-in user, across all of their accounts and requests — not per account and not per request — and an attempt refused with 400, 404 or 409 counts too. Retry after a minute. */
11786
11908
  429: {
11787
11909
  headers: {
11788
11910
  [name: string]: unknown;
@@ -11806,7 +11928,10 @@ export interface paths {
11806
11928
  path?: never;
11807
11929
  cookie?: never;
11808
11930
  };
11809
- /** Get a short-lived download link for a file in the conversation */
11931
+ /**
11932
+ * Get a short-lived download link for a file in the conversation
11933
+ * @description Any wallet member who reads the request may open its files, at any KYC status of the account.
11934
+ */
11810
11935
  get: {
11811
11936
  parameters: {
11812
11937
  query?: never;
@@ -13353,8 +13478,9 @@ export interface paths {
13353
13478
  get: {
13354
13479
  parameters: {
13355
13480
  query?: {
13356
- /** @description When false (default), dust balances below the threshold are hidden
13357
- * from the response. Set to true to include all balances.
13481
+ /** @description When false (default), dust balances — smaller than the currency threshold in absolute value —
13482
+ * are hidden from the response; a negative balance (a debt) beyond the threshold
13483
+ * is always returned. Set to true to include all balances.
13358
13484
  * */
13359
13485
  show_low_balance?: boolean;
13360
13486
  };
@@ -13523,8 +13649,9 @@ export interface paths {
13523
13649
  get: {
13524
13650
  parameters: {
13525
13651
  query?: {
13526
- /** @description When false (default), dust balances below the threshold are hidden
13527
- * from the response. Set to true to include all balances.
13652
+ /** @description When false (default), dust balances — smaller than the currency threshold in absolute value —
13653
+ * are hidden from the response; a negative balance (a debt) beyond the threshold
13654
+ * is always returned. Set to true to include all balances.
13528
13655
  * */
13529
13656
  show_low_balance?: boolean;
13530
13657
  };
@@ -13909,14 +14036,14 @@ export interface paths {
13909
14036
  * - Returns raw balance records without aggregation
13910
14037
  * - Includes crypto metadata for each balance
13911
14038
  * - No currency conversion or totals calculation
13912
- * - **Automatically filters out dust balances** below render_threshold
14039
+ * - **Automatically filters out dust balances** — smaller than the currency threshold in absolute value; a negative balance (a debt) beyond it is always returned
13913
14040
  * - **Includes icon URL in crypto meta** for frontend display
13914
14041
  *
13915
14042
  */
13916
14043
  get: {
13917
14044
  parameters: {
13918
14045
  query?: {
13919
- /** @description When false (default), dust balances below threshold are hidden */
14046
+ /** @description When false (default), dust balances — smaller than the currency threshold in absolute value — are hidden */
13920
14047
  show_low_balance?: boolean;
13921
14048
  };
13922
14049
  header?: never;
@@ -15473,7 +15600,8 @@ export interface paths {
15473
15600
  * application on it. A rail is listed while it is active; an archived rail stays listed only when the
15474
15601
  * wallet is approved on it. `can_submit` tells whether `POST …/kyc-rails/{rail_id}` would be accepted now.
15475
15602
  *
15476
- * Replaces the BFF `GET /kyc/{wallet_id}/rails`; items have its shape plus `can_submit`.
15603
+ * Replaces the BFF `GET /kyc/{wallet_id}/rails`; items have its shape plus `can_submit`, without the
15604
+ * rail's `code` and `name` — match a rail to a program by `id` (`kyc_rails_id`).
15477
15605
  *
15478
15606
  * **Access Control**: any member of the wallet except the scoped `user` role. No KYC gate.
15479
15607
  *
@@ -15587,8 +15715,9 @@ export interface paths {
15587
15715
  * sent back (`HOLD`, `SOFT_REJECT`) is resubmitted. No body.
15588
15716
  *
15589
15717
  * Refused unless the rail has an onboarding implementation (retired rails never do), takes submissions,
15590
- * fits the entity type, and the entity's KYC is `APPROVED` or `WAITING_ON_REVIEW`. On a tenant without KYC
15591
- * only the tenant's default universal rail can be submitted without it.
15718
+ * fits the entity type, and the entity's KYC is `APPROVED` — an entity still under review
15719
+ * (`WAITING_ON_REVIEW`) cannot submit. On a tenant without KYC only the tenant's default universal rail
15720
+ * can be submitted without it.
15592
15721
  *
15593
15722
  * Replaces the BFF `POST /kyc/{wallet_id}/rails/{rail_id}`.
15594
15723
  *
@@ -15630,7 +15759,7 @@ export interface paths {
15630
15759
  content?: never;
15631
15760
  };
15632
15761
  401: components["responses"]["UnauthorizedError"];
15633
- /** @description Not an admin of the wallet (ACCESS_DENIED), or the entity's KYC is not approved or under review (KYC_NOT_APPROVED) */
15762
+ /** @description Not an admin of the wallet (ACCESS_DENIED), or the entity's KYC is not approved — under review included (KYC_NOT_APPROVED) */
15634
15763
  403: {
15635
15764
  headers: {
15636
15765
  [name: string]: unknown;
@@ -16296,7 +16425,10 @@ export interface components {
16296
16425
  brand?: "VISA" | "MASTERCARD" | "AMEX" | "UNIONPAY" | null;
16297
16426
  /** @enum {string|null} */
16298
16427
  form_factor?: "PHYSICAL" | "VIRTUAL" | null;
16428
+ /** @description At least one mobile wallet is supported; which ones: `digital_wallets`. */
16299
16429
  tokenizable: boolean;
16430
+ /** @description Mobile wallets cards of this program can be added to. Empty when none; a program can support one wallet without the other. */
16431
+ digital_wallets: ("APPLE_PAY" | "GOOGLE_PAY")[];
16300
16432
  /** @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. */
16301
16433
  cardholder_requirements?: {
16302
16434
  /** @enum {string} */
@@ -16405,7 +16537,10 @@ export interface components {
16405
16537
  * @example 06/29
16406
16538
  */
16407
16539
  expiration_date_short?: string;
16540
+ /** @description Whether this card can be added to a mobile wallet; set when the card was issued. Which ones: `digital_wallets`. */
16408
16541
  tokenizable?: boolean;
16542
+ /** @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. */
16543
+ digital_wallets?: ("APPLE_PAY" | "GOOGLE_PAY")[];
16409
16544
  spend_cap?: number;
16410
16545
  spent_amount?: number;
16411
16546
  /** Format: uuid */
@@ -17407,6 +17542,16 @@ export interface components {
17407
17542
  * @description Requested execution time for scheduled payments (status EXPECTED); null for immediate orders
17408
17543
  */
17409
17544
  scheduled_at?: string | null;
17545
+ /** @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. */
17546
+ scheduled_failure?: {
17547
+ /** @enum {string} */
17548
+ code: "INSUFFICIENT_FUNDS" | "PROVIDER_ERROR" | "EXECUTION_ERROR";
17549
+ /**
17550
+ * @description Customer-facing text of the code.
17551
+ * @example The balance was insufficient at the scheduled time.
17552
+ */
17553
+ message: string;
17554
+ } | null;
17410
17555
  /** Format: date-time */
17411
17556
  created_at: string;
17412
17557
  /** Format: date-time */
@@ -17556,7 +17701,7 @@ export interface components {
17556
17701
  note?: string;
17557
17702
  /**
17558
17703
  * Format: date-time
17559
- * @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.
17704
+ * @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, 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.
17560
17705
  */
17561
17706
  scheduled_at?: string;
17562
17707
  /** @description Optional supporting documents persisted with the order. */
@@ -17587,7 +17732,7 @@ export interface components {
17587
17732
  note?: string;
17588
17733
  /**
17589
17734
  * Format: date-time
17590
- * @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.
17735
+ * @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, 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.
17591
17736
  */
17592
17737
  scheduled_at?: string;
17593
17738
  /** @description Optional supporting documents persisted with the order. */
@@ -17676,10 +17821,10 @@ export interface components {
17676
17821
  description: string | null;
17677
17822
  link: string | null;
17678
17823
  };
17679
- /** @description Something the user has to do with the rail vendor: `verification` — a vendor self-verification link (`type` names it, `full_name` the person it is for); `kyb_onboarding` — the vendor-hosted onboarding link. */
17824
+ /** @description Something the user has to do with the rail vendor: `verification` — a vendor self-verification link (`type` names it, `full_name` the person it is for). */
17680
17825
  WalletKycRailExtraAction: {
17681
17826
  /** @enum {string} */
17682
- action: "verification" | "kyb_onboarding";
17827
+ action: "verification";
17683
17828
  type: string;
17684
17829
  full_name: string | null;
17685
17830
  /** Format: uri */
@@ -17700,15 +17845,16 @@ export interface components {
17700
17845
  /** @description The terms the rail had when the wallet first submitted — what the user accepted. */
17701
17846
  terms_and_conditions: components["schemas"]["WalletKycRailTerms"][];
17702
17847
  };
17703
- /** @description A KYC rail of the wallet's tenant with the wallet's application on it. Same shape as the BFF `GET /kyc/{wallet_id}/rails` item, plus `can_submit`. Vendor texts are not returned: `wallet_rail.message` is a neutral text for the status. */
17848
+ /** @description A KYC rail of the wallet's tenant with the wallet's application on it. The shape of the BFF `GET /kyc/{wallet_id}/rails` item, plus `can_submit`, without the vendor behind the rail: its `code` and `name` are not returned — a rail is identified by `id` — and `wallet_rail.message` is a neutral text for the status. */
17704
17849
  WalletKycRail: {
17705
- /** Format: uuid */
17850
+ /**
17851
+ * Format: uuid
17852
+ * @description What programs reference in `kyc_rails_id`.
17853
+ */
17706
17854
  id: string;
17707
- code: string | null;
17708
- name: string;
17709
17855
  /** @description The rail takes submissions at all. */
17710
17856
  is_submit_available: boolean;
17711
- /** @description The wallet can submit to the rail right now: it has an onboarding implementation, is of the entity's type or universal, the entity's KYC is approved or under review, and no application is approved or with the vendor. */
17857
+ /** @description The wallet can submit to the rail right now: it has an onboarding implementation, is of the entity's type or universal, the entity's KYC is approved (not merely under review), and no application is approved or with the vendor. */
17712
17858
  can_submit: boolean;
17713
17859
  /** @description The rail's active terms, in display order. */
17714
17860
  terms_and_conditions: components["schemas"]["WalletKycRailTerms"][];
@@ -18273,7 +18419,7 @@ export interface components {
18273
18419
  /** Format: uuid */
18274
18420
  id: string;
18275
18421
  /** @enum {string} */
18276
- type: "DEPOSIT_RECEIVED" | "DEPOSIT_NOT_ACCEPTED" | "TRANSFER_RECEIVED" | "ORDER_STATUS_CHANGED" | "KYC_STATUS_CHANGED" | "ANNOUNCEMENT" | "SYSTEM_MESSAGE" | "MASS_PAYOUT_STATUS_CHANGED" | "CARD_OTP" | "RFI_REQUESTED" | "RFI_RESOLVED" | "REPORT_READY";
18422
+ type: "DEPOSIT_RECEIVED" | "DEPOSIT_NOT_ACCEPTED" | "TRANSFER_RECEIVED" | "ORDER_STATUS_CHANGED" | "KYC_STATUS_CHANGED" | "ANNOUNCEMENT" | "SYSTEM_MESSAGE" | "MASS_PAYOUT_STATUS_CHANGED" | "CARD_OTP" | "RFI_REQUESTED" | "RFI_RESOLVED" | "REPORT_READY" | "SCHEDULED_PAYMENT_REMINDER" | "SCHEDULED_PAYMENT_LOW_BALANCE";
18277
18423
  /** @description Structured fact snapshot; the client renders the presentation. Shape depends on `type`; evolution is additive-only. */
18278
18424
  payload: Record<string, never>;
18279
18425
  /** Format: uuid */
@@ -18577,7 +18723,10 @@ export interface components {
18577
18723
  * @example RFI-000042
18578
18724
  */
18579
18725
  reference: string;
18580
- /** @enum {string} */
18726
+ /**
18727
+ * @description `onboarding` — questions during verification (KYC / KYB); `transaction` — questions about specific transactions; `ongoing` — a periodic review of an active client. The list may grow: a new value is added here and announced in the changelog before any request carries it.
18728
+ * @enum {string}
18729
+ */
18581
18730
  type: "onboarding" | "transaction" | "ongoing";
18582
18731
  /**
18583
18732
  * @description What the request is about — the subject compliance wrote when opening it. Show it as is above the conversation; `messages` hold the question itself.
@@ -18591,12 +18740,12 @@ export interface components {
18591
18740
  status: "action_required" | "awaiting_compliance" | "closed";
18592
18741
  /**
18593
18742
  * Format: date-time
18594
- * @description When the answer is due
18743
+ * @description When the answer is due. The date is set each time the request is handed to the client: when it is opened, and again on every new round — compliance asks after the client answered. A further message from compliance while the answer is still awaited keeps the date.
18595
18744
  */
18596
18745
  due_at: string | null;
18597
18746
  /** @description True only while `action_required` and past `due_at` (red banner) */
18598
18747
  overdue: boolean;
18599
- /** @description One of the covered transactions is held until the request closes */
18748
+ /** @description True while the request keeps one of its transactions on hold — the one marked `held` in `transactions`. Decided when the request is opened and never turned on later: only a `transaction` request holds, and only when one of the transactions it covers was frozen by compliance at that moment. A request holds at most one transaction. The hold ends when the request closes — compliance's decision lets the transaction through or fails it — and the flag is false from then on. */
18600
18749
  holds_transaction: boolean;
18601
18750
  /** @description The account is on hold while the request is open */
18602
18751
  holds_account: boolean;
@@ -18606,7 +18755,7 @@ export interface components {
18606
18755
  last_message: {
18607
18756
  /** @enum {string} */
18608
18757
  author: "compliance" | "client";
18609
- /** @description One line of the message, up to 140 characters, cut at a word */
18758
+ /** @description One line of the message, up to 140 characters, cut at a word; null when the message has no text — an answer of files only */
18610
18759
  preview: string | null;
18611
18760
  /** Format: date-time */
18612
18761
  created_at: string;
@@ -18636,6 +18785,7 @@ export interface components {
18636
18785
  * @enum {string}
18637
18786
  */
18638
18787
  author: "compliance" | "client";
18788
+ /** @description The text of the message. An empty string when the client answered with files only — show the attachments alone. */
18639
18789
  body: string;
18640
18790
  attachments: components["schemas"]["RfiAttachment"][];
18641
18791
  /** Format: date-time */
@@ -18649,6 +18799,8 @@ export interface components {
18649
18799
  amount_to: number | null;
18650
18800
  /** Format: date-time */
18651
18801
  created_at: string | null;
18802
+ /** @description True for the one transaction the request keeps on hold while it is open (see `holds_transaction`). False for every other transaction, and for all of them once the request is closed. */
18803
+ held: boolean;
18652
18804
  };
18653
18805
  RfiCaseDetail: components["schemas"]["RfiCase"] & {
18654
18806
  /** @description Whether YOU may answer this request now: it is open (`action_required` or `awaiting_compliance`) and your role on the account writes — `owner` or `admin`. False on a closed request and for an `auditor`, who reads the conversation only: show it read-only, without the answer box. Otherwise `POST …/messages` answers 409 `RFI_CLOSED` or 403 `ACCESS_DENIED` respectively. */
@@ -2019,10 +2019,9 @@ export declare namespace API {
2019
2019
  /**
2020
2020
  * Read off the `Order` schema rather than re-declared, so a status the backend adds lands here
2021
2021
  * on the next regeneration. `EXPECTED` = a scheduled payment waiting for its `scheduled_at`;
2022
- * `REFUNDED` = a failed order whose funds were paid back. `ERROR` is not in the schema: it exists on
2023
- * legacy orders only and is kept so code that handles it keeps compiling; new orders fail as `FAILED`.
2022
+ * `REFUNDED` = a failed order whose funds were paid back.
2024
2023
  */
2025
- type OrderStatus = NonNullable<API.Orders.Frontend.Order['status']> | 'ERROR';
2024
+ type OrderStatus = NonNullable<API.Orders.Frontend.Order['status']>;
2026
2025
  namespace OrderTypes {
2027
2026
  type OrderTypeKycRail = {
2028
2027
  id: string;
@@ -2449,7 +2448,14 @@ export declare namespace API {
2449
2448
  * (not an array); a non-uuid value is refused with 400.
2450
2449
  */
2451
2450
  type OrderListRfiCaseFilter = Record<'rfi_case_id', string>;
2452
- type OrderListFilter = OrderListStatusFilter | OrderListOrderTypeFilter | OrderListFromUuidFilter | OrderListToUuidFilter | OrderListMassPayoutFilter | OrderListRfiCaseFilter;
2451
+ /**
2452
+ * Narrows the feed to scheduled payments (orders with `scheduled_at`): `all` — every one of
2453
+ * them, unapproved drafts included; `upcoming` — approved and waiting for their date
2454
+ * (`EXPECTED`); `past` — their date has come (any status but `NEW` and `EXPECTED`). Combines
2455
+ * with `status`; any other value is refused with 400.
2456
+ */
2457
+ type OrderListScheduledFilter = Record<'scheduled', 'all' | 'upcoming' | 'past'>;
2458
+ type OrderListFilter = OrderListStatusFilter | OrderListOrderTypeFilter | OrderListFromUuidFilter | OrderListToUuidFilter | OrderListMassPayoutFilter | OrderListRfiCaseFilter | OrderListScheduledFilter;
2453
2459
  interface Request {
2454
2460
  wallet_uuid: string;
2455
2461
  offset?: number;
@@ -2667,6 +2673,8 @@ export declare namespace API {
2667
2673
  type OrderDocumentInput = componentsV1Frontend['schemas']['OrderDocumentInput'];
2668
2674
  type OrderCalculation = componentsV1Frontend['schemas']['OrderCalculation'];
2669
2675
  type Order = componentsV1Frontend['schemas']['Order'];
2676
+ type ScheduledFailure = NonNullable<Order['scheduled_failure']>;
2677
+ type ScheduledFailureCode = ScheduledFailure['code'];
2670
2678
  type OrderEnvelope = {
2671
2679
  success?: boolean;
2672
2680
  data?: Order;
@@ -2770,6 +2778,13 @@ export declare namespace API {
2770
2778
  type Response = string;
2771
2779
  }
2772
2780
  }
2781
+ namespace ScheduledFunding {
2782
+ type ScheduledFundingRoot = pathsV1Frontend['/frontend/orders/wallet/{wallet_uuid}/scheduled/funding'];
2783
+ export type Request = ScheduledFundingRoot['get']['parameters']['path'];
2784
+ export type Response = ScheduledFundingRoot['get']['responses'][200]['content']['application/json'];
2785
+ export type Data = NonNullable<Response['data']>;
2786
+ export {};
2787
+ }
2773
2788
  namespace Types {
2774
2789
  namespace List {
2775
2790
  type Response = pathsV1Frontend['/frontend/orders/types']['get']['responses'][200]['content']['application/json'];
@@ -351,8 +351,6 @@ export declare enum OrderStatuses {
351
351
  PROCESSING = "PROCESSING",
352
352
  CANCELED = "CANCELED",
353
353
  COMPLETE = "COMPLETE",
354
- /** @deprecated Legacy orders only; the `Order` schema has no `ERROR` and reports a failure as `FAILED`. */
355
- ERROR = "ERROR",
356
354
  FAILED = "FAILED",
357
355
  REFUNDED = "REFUNDED"
358
356
  }
package/dist/constants.js CHANGED
@@ -367,8 +367,6 @@ export var OrderStatuses;
367
367
  OrderStatuses["PROCESSING"] = "PROCESSING";
368
368
  OrderStatuses["CANCELED"] = "CANCELED";
369
369
  OrderStatuses["COMPLETE"] = "COMPLETE";
370
- /** @deprecated Legacy orders only; the `Order` schema has no `ERROR` and reports a failure as `FAILED`. */
371
- OrderStatuses["ERROR"] = "ERROR";
372
370
  OrderStatuses["FAILED"] = "FAILED";
373
371
  OrderStatuses["REFUNDED"] = "REFUNDED";
374
372
  })(OrderStatuses || (OrderStatuses = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarefi-bff-api-module",
3
- "version": "1.36.86",
3
+ "version": "1.36.88",
4
4
  "description": "Squarefi BFF API client module",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",