squarefi-bff-api-module 1.36.64 → 1.36.66

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.
@@ -2538,6 +2538,10 @@ export interface paths {
2538
2538
  sub_account_type?: "prepaid" | "balance";
2539
2539
  /** @description Filter cards by status.
2540
2540
  * Accepts a single value or a comma-separated list, e.g. `status=ACTIVE,CANCELED`.
2541
+ *
2542
+ * Cards whose creation was refused — FAILED with no card behind them — are left
2543
+ * out of the listing: they carry no number, no balance and nothing to act on.
2544
+ * Pass `status=FAILED` to get them back.
2541
2545
  * */
2542
2546
  status?: ("ACTIVE" | "INACTIVE" | "SUSPENDED" | "CANCELED")[];
2543
2547
  /** @description Filter cards by last 4 digits of the card number (partial, case-insensitive match) */
@@ -2696,6 +2696,10 @@ export interface paths {
2696
2696
  sub_account_type?: "prepaid" | "balance";
2697
2697
  /** @description Filter cards by status (matches issuing_cards.card_status).
2698
2698
  * Accepts a single value or a comma-separated list, e.g. `status=ACTIVE,FROZEN`.
2699
+ *
2700
+ * Cards whose creation the vendor refused — FAILED with no card behind them —
2701
+ * are left out of the listing: they carry no number, no balance and nothing the
2702
+ * client can act on. Pass `status=FAILED` to get them back.
2699
2703
  * */
2700
2704
  status?: ("ACTIVE" | "INACTIVE" | "FROZEN" | "CANCELED" | "CLOSED" | "BLOCKED" | "FAILED" | "PENDING")[];
2701
2705
  /** @description Filter cards by last 4 digits of the card number (partial, case-insensitive match) */
@@ -11253,7 +11257,7 @@ export interface paths {
11253
11257
  * Each wallet includes `access_role` (owner/admin/user/auditor) and `is_owner` boolean.
11254
11258
  *
11255
11259
  * Wallets where the caller holds the scoped `user` role are returned as a reduced shell
11256
- * (`uuid`, `name`, `display_name`, `tenant_id`, `kyc_info`, `created_at` + the role fields) — no `logo_url`.
11260
+ * (`uuid`, `name`, `display_name`, `tenant_id`, `kyc_entity_id`, `kyc_info`, `created_at` + the role fields) — no `logo_url`.
11257
11261
  *
11258
11262
  * **Authentication**: Bearer token with x-tenant-id header required
11259
11263
  *
@@ -11319,20 +11323,18 @@ export interface paths {
11319
11323
  access_role: "owner" | "admin" | "user" | "auditor";
11320
11324
  /** @description True if user is the wallet owner */
11321
11325
  is_owner: boolean;
11326
+ /**
11327
+ * Format: uuid
11328
+ * @description KYC entity the wallet was opened for (`GET /kyc/entities`) — group the
11329
+ * list by it to see which accounts an entity already has. `null` for a
11330
+ * wallet created without one.
11331
+ *
11332
+ */
11333
+ kyc_entity_id: string | null;
11322
11334
  /** @description KYC entity attached to the wallet (joined from `kyc_entity`).
11323
11335
  * `null` when the wallet has no KYC entity yet.
11324
11336
  * */
11325
- kyc_info: {
11326
- /** @description KYC entity type (e.g. INDIVIDUAL, BUSINESS) */
11327
- type: string;
11328
- /** @description KYC verification status (e.g. UNVERIFIED, PENDING, APPROVED, REJECTED) */
11329
- status: string;
11330
- business_name: string | null;
11331
- first_name: string | null;
11332
- last_name: string | null;
11333
- email: string | null;
11334
- phone: string | null;
11335
- } | null;
11337
+ kyc_info: components["schemas"]["WalletKycInfo"] | null;
11336
11338
  }[];
11337
11339
  pagination: {
11338
11340
  offset: number;
@@ -11369,6 +11371,10 @@ export interface paths {
11369
11371
  * - `empty_name: false` or omitted (default) → a random placeholder name
11370
11372
  * is generated (e.g., "Golden Vault 42").
11371
11373
  * - `empty_name: true` → the wallet is created with `name: null`.
11374
+ * - **purpose** — what the account is opened for, one of the listed codes.
11375
+ * `other` needs a free-text **purpose_other**; any other code refuses it.
11376
+ * Stored once with the wallet: it cannot be changed later and no
11377
+ * endpoint returns it.
11372
11378
  *
11373
11379
  * **Authentication**: Bearer token with x-tenant-id header required
11374
11380
  *
@@ -11406,6 +11412,21 @@ export interface paths {
11406
11412
  *
11407
11413
  */
11408
11414
  kyc_entity_id?: string;
11415
+ /**
11416
+ * @description What the account is opened for. Only the code travels — labels
11417
+ * are the client's. Write-once and never returned.
11418
+ *
11419
+ * @example payroll
11420
+ * @enum {string}
11421
+ */
11422
+ purpose?: "payroll" | "client_or_project_funds" | "treasury_or_reserves" | "separate_by_team" | "separate_by_currency_or_region" | "other";
11423
+ /**
11424
+ * @description Free-text purpose. Required when `purpose` is `other`, refused
11425
+ * with any other `purpose` (a blank value counts as absent).
11426
+ *
11427
+ * @example Contractor payouts
11428
+ */
11429
+ purpose_other?: string | null;
11409
11430
  };
11410
11431
  };
11411
11432
  };
@@ -11434,25 +11455,22 @@ export interface paths {
11434
11455
  tenant_id: string;
11435
11456
  /** Format: date-time */
11436
11457
  created_at: string;
11458
+ /**
11459
+ * Format: uuid
11460
+ * @description KYC entity the wallet was opened for. `null` for a wallet created without one.
11461
+ */
11462
+ kyc_entity_id: string | null;
11437
11463
  /** @description Mirrors the GET-wallet shape. `null` when the wallet was created
11438
11464
  * without `kyc_entity_id`; populated with the linked entity otherwise.
11439
11465
  * */
11440
- kyc_info: {
11441
- type: string;
11442
- status: string;
11443
- business_name: string | null;
11444
- first_name: string | null;
11445
- last_name: string | null;
11446
- email: string | null;
11447
- phone: string | null;
11448
- } | null;
11466
+ kyc_info: components["schemas"]["WalletKycInfo"] | null;
11449
11467
  };
11450
11468
  /** @example Wallet created successfully */
11451
11469
  message: string;
11452
11470
  };
11453
11471
  };
11454
11472
  };
11455
- /** @description Bad request — invalid name, or `kyc_entity_id` is malformed / not an entity of the current user / belongs to another tenant */
11473
+ /** @description Bad request — invalid name; `kyc_entity_id` is malformed / not an entity of the current user / belongs to another tenant; `purpose` is not a listed code; `purpose_other` is missing for `other`, longer than 255 characters or sent with another `purpose` */
11456
11474
  400: {
11457
11475
  headers: {
11458
11476
  [name: string]: unknown;
@@ -11661,9 +11679,14 @@ export interface paths {
11661
11679
  *
11662
11680
  * **Authentication**: Bearer token with x-tenant-id header required
11663
11681
  *
11664
- * **Access Control**: Any active wallet member. The scoped `user` role receives a shell-only
11665
- * response (`uuid`, `name`, `display_name`, `tenant_id`, `kyc_info`, `created_at` + the role fields) —
11666
- * `logo_url`, `balance`, `fiat_accounts` and the totals are omitted for that role.
11682
+ * **Access Control**: Any active wallet member. The response shape depends on the caller's role and
11683
+ * is told apart by `access_role`:
11684
+ * - `owner` / `admin` / `auditor` the full wallet (`WalletDetails`): identity, KYC, `balance`,
11685
+ * `fiat_accounts`, `base_currency` and the totals.
11686
+ * - `user` — a shell-only wallet (`WalletDetailsScopedUser`): `uuid`, `id`, `name`, `display_name`,
11687
+ * `tenant_id`, `kyc_entity_id`, `kyc_info`, `created_at` + the role fields. `logo_url`, `balance`, `fiat_accounts`,
11688
+ * `base_currency`, `fiat_total`, `crypto_total`, `pending_balance` and `total_amount` are absent
11689
+ * (not null) for that role — check `access_role` before reading them.
11667
11690
  *
11668
11691
  */
11669
11692
  get: {
@@ -11692,62 +11715,7 @@ export interface paths {
11692
11715
  "application/json": {
11693
11716
  /** @example true */
11694
11717
  success: boolean;
11695
- data: {
11696
- /** Format: uuid */
11697
- uuid: string;
11698
- name: string | null;
11699
- /**
11700
- * @description Computed label — wallet name, else KYC-derived (business_name / first+last), else "New account". Always present.
11701
- * @example Acme LLC
11702
- */
11703
- display_name?: string;
11704
- logo_url: string | null;
11705
- /** Format: uuid */
11706
- tenant_id: string;
11707
- /** Format: date-time */
11708
- created_at: string;
11709
- kyc_info: {
11710
- type: string;
11711
- status: string;
11712
- business_name: string | null;
11713
- first_name: string | null;
11714
- last_name: string | null;
11715
- email: string | null;
11716
- phone: string | null;
11717
- } | null;
11718
- /** @description Aggregated crypto balances */
11719
- balance: {
11720
- symbol: string;
11721
- icon?: string | null;
11722
- name: string;
11723
- is_crypto: boolean;
11724
- decimal: number;
11725
- amount: number;
11726
- fiat_amount: number;
11727
- details: components["schemas"]["AggregatedBalanceDetails"][];
11728
- }[];
11729
- fiat_accounts: Record<string, never>[];
11730
- /** @description User's base currency */
11731
- base_currency: string | null;
11732
- fiat_total: number;
11733
- crypto_total: number;
11734
- pending_balance: number;
11735
- total_amount: number;
11736
- /**
11737
- * @description Legacy alias of `access_role`. Always equals `access_role` when
11738
- * present. Kept for backward compatibility — prefer `access_role`.
11739
- * Only present when called via member access.
11740
- *
11741
- * @enum {string}
11742
- */
11743
- role?: "owner" | "admin" | "user" | "auditor";
11744
- /**
11745
- * @description User's role for this wallet (only present when called via member access)
11746
- * @enum {string}
11747
- */
11748
- access_role?: "owner" | "admin" | "user" | "auditor";
11749
- is_owner?: boolean;
11750
- };
11718
+ data: components["schemas"]["WalletDetails"] | components["schemas"]["WalletDetailsScopedUser"];
11751
11719
  };
11752
11720
  };
11753
11721
  };
@@ -11834,18 +11802,15 @@ export interface paths {
11834
11802
  tenant_id: string;
11835
11803
  /** Format: date-time */
11836
11804
  created_at: string;
11805
+ /**
11806
+ * Format: uuid
11807
+ * @description KYC entity the wallet was opened for. `null` for a wallet created without one.
11808
+ */
11809
+ kyc_entity_id: string | null;
11837
11810
  /** @description KYC entity attached to the wallet (joined from `kyc_entity`).
11838
11811
  * `null` when the wallet has no KYC entity yet.
11839
11812
  * */
11840
- kyc_info: {
11841
- type: string;
11842
- status: string;
11843
- business_name: string | null;
11844
- first_name: string | null;
11845
- last_name: string | null;
11846
- email: string | null;
11847
- phone: string | null;
11848
- } | null;
11813
+ kyc_info: components["schemas"]["WalletKycInfo"] | null;
11849
11814
  };
11850
11815
  /** @example Wallet updated successfully */
11851
11816
  message: string;
@@ -15137,6 +15102,121 @@ export interface components {
15137
15102
  /** Format: date-time */
15138
15103
  created_at: string;
15139
15104
  };
15105
+ /** @description KYC entity attached to the wallet. `null` when the wallet has no KYC entity yet. */
15106
+ WalletKycInfo: {
15107
+ /**
15108
+ * @description KYC entity type, lower-case.
15109
+ * @enum {string}
15110
+ */
15111
+ type: "individual" | "business" | "universal";
15112
+ /**
15113
+ * @description KYC verification status. A refusal is one of three values: `DECLINED`, `REJECT` or `SOFT_REJECT`. Only `APPROVED` (full access) and `HOLD` (read-only) open the wallet.
15114
+ * @enum {string}
15115
+ */
15116
+ status: "APPROVED" | "DECLINED" | "PENDING" | "PROCESSING" | "HOLD" | "NEEDS_ATTENTION" | "DOUBLE" | "SOFT_REJECT" | "REJECT" | "UNVERIFIED" | "WAITING_ON_UBOS" | "WAITING_ON_REVIEW";
15117
+ business_name: string | null;
15118
+ first_name: string | null;
15119
+ last_name: string | null;
15120
+ email: string | null;
15121
+ phone: string | null;
15122
+ };
15123
+ /** @description One aggregated crypto balance of the wallet: every balance row sharing the same symbol is merged into a single entry, and `details[]` keeps the per-row breakdown. */
15124
+ WalletBalanceEntry: {
15125
+ symbol: string;
15126
+ icon?: string | null;
15127
+ name: string;
15128
+ is_crypto: boolean;
15129
+ decimal: number;
15130
+ amount: number;
15131
+ /** @description Amount converted to `base_currency` */
15132
+ fiat_amount: number;
15133
+ details: components["schemas"]["AggregatedBalanceDetails"][];
15134
+ };
15135
+ /** @description Full wallet read for the `owner`, `admin` and `auditor` roles: identity, KYC, aggregated balances, fiat accounts and the totals. The scoped `user` role never receives this shape — see `WalletDetailsScopedUser`; the two are told apart by `access_role`. */
15136
+ WalletDetails: {
15137
+ /** Format: uuid */
15138
+ uuid: string;
15139
+ /** @description Legacy wallet identifier. Address the wallet by `uuid`; `id` is informational only. */
15140
+ id: string | null;
15141
+ name: string | null;
15142
+ /**
15143
+ * @description Computed label — wallet name, else KYC-derived (business_name / first+last), else "New account". Always present.
15144
+ * @example Acme LLC
15145
+ */
15146
+ display_name: string;
15147
+ logo_url: string | null;
15148
+ /** Format: uuid */
15149
+ tenant_id: string;
15150
+ /** Format: date-time */
15151
+ created_at: string;
15152
+ /**
15153
+ * Format: uuid
15154
+ * @description KYC entity the wallet was opened for (`GET /kyc/entities`). `null` for a wallet created without one.
15155
+ */
15156
+ kyc_entity_id: string | null;
15157
+ kyc_info: components["schemas"]["WalletKycInfo"] | null;
15158
+ /** @description Aggregated crypto balances */
15159
+ balance: components["schemas"]["WalletBalanceEntry"][];
15160
+ fiat_accounts: {
15161
+ [key: string]: unknown;
15162
+ }[];
15163
+ /** @description The caller's base currency; every `fiat_amount` and total is expressed in it. `null` when the caller has none. */
15164
+ base_currency: string | null;
15165
+ fiat_total: number;
15166
+ crypto_total: number;
15167
+ pending_balance: number;
15168
+ total_amount: number;
15169
+ /**
15170
+ * @description The caller's role for this wallet. Never `user` on this shape. (enum property replaced by openapi-typescript)
15171
+ * @enum {string}
15172
+ */
15173
+ access_role: "owner" | "admin" | "auditor";
15174
+ /**
15175
+ * @description Legacy alias of `access_role`. Always equals `access_role`. Kept for backward compatibility — prefer `access_role`.
15176
+ * @enum {string}
15177
+ */
15178
+ role: "owner" | "admin" | "auditor";
15179
+ /** @description `true` exactly when `access_role` is `owner`. */
15180
+ is_owner: boolean;
15181
+ };
15182
+ /** @description Shell-only wallet read for the scoped `user` role: identity, KYC and display name. No main-account financials are ever included — `logo_url`, `balance`, `fiat_accounts`, `base_currency`, `fiat_total`, `crypto_total`, `pending_balance` and `total_amount` are absent, not null. Check `access_role` before reading balances. */
15183
+ WalletDetailsScopedUser: {
15184
+ /** Format: uuid */
15185
+ uuid: string;
15186
+ /** @description Legacy wallet identifier. Address the wallet by `uuid`; `id` is informational only. */
15187
+ id: string | null;
15188
+ name: string | null;
15189
+ /**
15190
+ * @description Computed label — wallet name, else KYC-derived (business_name / first+last), else "New account". Always present.
15191
+ * @example Acme LLC
15192
+ */
15193
+ display_name: string;
15194
+ /** Format: uuid */
15195
+ tenant_id: string;
15196
+ /** Format: date-time */
15197
+ created_at: string;
15198
+ /**
15199
+ * Format: uuid
15200
+ * @description KYC entity the wallet was opened for (`GET /kyc/entities`). `null` for a wallet created without one.
15201
+ */
15202
+ kyc_entity_id: string | null;
15203
+ kyc_info: components["schemas"]["WalletKycInfo"] | null;
15204
+ /**
15205
+ * @description Always `user` on this shape. (enum property replaced by openapi-typescript)
15206
+ * @enum {string}
15207
+ */
15208
+ access_role: "user";
15209
+ /**
15210
+ * @description Legacy alias of `access_role`. Always equals `access_role`. Kept for backward compatibility — prefer `access_role`.
15211
+ * @enum {string}
15212
+ */
15213
+ role: "user";
15214
+ /**
15215
+ * @description Always `false` on this shape.
15216
+ * @example false
15217
+ */
15218
+ is_owner: boolean;
15219
+ };
15140
15220
  /** @description Unified currency record. `is_crypto: true` identifies a blockchain asset, `false` a fiat one. The joined `meta` JSONB blob carries currency-specific details (e.g. `chain_id`/contract for crypto, ISO code/country for fiat). */
15141
15221
  Currency: {
15142
15222
  id?: number;
@@ -1121,7 +1121,9 @@ export interface paths {
1121
1121
  *
1122
1122
  * Common filter fields:
1123
1123
  * - `last4`: Filter by last 4 digits of card (partial, case-insensitive match)
1124
- * - `card_status`: Filter by status (ACTIVE, INACTIVE, CANCELED)
1124
+ * - `card_status`: Filter by status (ACTIVE, INACTIVE, CANCELED). Cards whose
1125
+ * creation the vendor refused (FAILED with no card behind them) are left out
1126
+ * of the listing unless you ask for them with `card_status=FAILED`.
1125
1127
  * - `fiat_account.type`: Filter by account type (prepaid, balance)
1126
1128
  * - `from_created_at`: Filter cards created on or after this date (ISO 8601 format)
1127
1129
  * - `to_created_at`: Filter cards created on or before this date (ISO 8601 format)
@@ -1628,6 +1628,7 @@ export interface components {
1628
1628
  KycEntityDto: {
1629
1629
  id: string;
1630
1630
  user_data_uuid: string;
1631
+ created_at: string;
1631
1632
  /** @enum {string} */
1632
1633
  type: "individual" | "business" | "universal";
1633
1634
  id_number?: string | null;
@@ -2009,6 +2010,12 @@ export interface components {
2009
2010
  MailingDataEntity: {
2010
2011
  readonly support_email?: string | null;
2011
2012
  };
2013
+ AppLinksEntity: {
2014
+ readonly terms_of_use_url?: string | null;
2015
+ readonly privacy_policy_url?: string | null;
2016
+ readonly fraud_and_security_url?: string | null;
2017
+ readonly consumer_protection_url?: string | null;
2018
+ };
2012
2019
  SupportedLocalesEntity: {
2013
2020
  default: string;
2014
2021
  supported: string[];
@@ -2051,6 +2058,7 @@ export interface components {
2051
2058
  readonly metrics_data?: components["schemas"]["MetricsDataEntity"] | null;
2052
2059
  readonly statement_branding?: components["schemas"]["StatementBrandingEntity"] | null;
2053
2060
  readonly mailing_data?: components["schemas"]["MailingDataEntity"] | null;
2061
+ readonly app_links?: components["schemas"]["AppLinksEntity"] | null;
2054
2062
  /** @enum {string} */
2055
2063
  kyc_data_provider: "persona" | "sumsub";
2056
2064
  readonly supported_locales?: components["schemas"]["SupportedLocalesEntity"] | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarefi-bff-api-module",
3
- "version": "1.36.64",
3
+ "version": "1.36.66",
4
4
  "description": "Squarefi BFF API client module",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",