squarefi-bff-api-module 1.36.54 → 1.36.56

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.
@@ -7379,6 +7379,8 @@ export interface components {
7379
7379
  * @description Associated issuing program ID
7380
7380
  */
7381
7381
  issuing_program_id?: string;
7382
+ /** @description Cards issued to this person (every status, canceled included), including cards on sibling per-vendor rows of the same person. Always present on list/get/PATCH; 0 when none. */
7383
+ cards_count?: number;
7382
7384
  address?: components["schemas"]["CardholderAddress"];
7383
7385
  };
7384
7386
  /** @description An uploaded KYC file, addressable before it is attached to a cardholder */
@@ -4602,8 +4602,8 @@ export interface paths {
4602
4602
  code?: string | null;
4603
4603
  /** @description Initial topup amount */
4604
4604
  initial_topup?: number | null;
4605
- /** @description Card design configuration */
4606
- card_design?: Record<string, never> | null;
4605
+ /** @description Card artwork for this program; null = use the app's built-in design */
4606
+ card_design?: components["schemas"]["CardDesign"] | null;
4607
4607
  /** @description Legal consent text for card creation */
4608
4608
  consent_text?: string | null;
4609
4609
  /** @description One-time card issuing fee */
@@ -4702,7 +4702,8 @@ export interface paths {
4702
4702
  icon?: string | null;
4703
4703
  code?: string | null;
4704
4704
  initial_topup?: number | null;
4705
- card_design?: Record<string, never> | null;
4705
+ /** @description Card artwork for this program; null = use the app's built-in design */
4706
+ card_design?: components["schemas"]["CardDesign"] | null;
4706
4707
  consent_text?: string | null;
4707
4708
  card_issuing_fee?: number | null;
4708
4709
  card_monthly_fee?: number | null;
@@ -10759,6 +10760,126 @@ export interface paths {
10759
10760
  patch?: never;
10760
10761
  trace?: never;
10761
10762
  };
10763
+ "/frontend/wallets/active": {
10764
+ parameters: {
10765
+ query?: never;
10766
+ header?: never;
10767
+ path?: never;
10768
+ cookie?: never;
10769
+ };
10770
+ /**
10771
+ * Active wallet of the caller
10772
+ * @description The wallet the app should open for the authenticated user.
10773
+ *
10774
+ * Resolution order:
10775
+ * 1. the wallet the user picked in Settings — the membership flagged
10776
+ * `wallets_users.is_selected`, while it is still active and the
10777
+ * wallet is not deleted;
10778
+ * 2. otherwise the default kept for users who never picked one — the
10779
+ * `is_main` wallet, else the oldest one.
10780
+ *
10781
+ * The selection cannot outlive the access it rides on: the flag sits on
10782
+ * the membership row, so revoking membership drops it. A deleted wallet
10783
+ * or a deactivated membership falls back to the default.
10784
+ *
10785
+ * **Authentication**: Bearer token with x-tenant-id header required
10786
+ *
10787
+ */
10788
+ get: {
10789
+ parameters: {
10790
+ query?: never;
10791
+ header?: never;
10792
+ path?: never;
10793
+ cookie?: never;
10794
+ };
10795
+ requestBody?: never;
10796
+ responses: {
10797
+ /** @description Resolved active wallet id (`null` when the user reaches no wallet). */
10798
+ 200: {
10799
+ headers: {
10800
+ [name: string]: unknown;
10801
+ };
10802
+ content: {
10803
+ "application/json": {
10804
+ /** @example true */
10805
+ success?: boolean;
10806
+ data?: {
10807
+ /** Format: uuid */
10808
+ wallet_id?: string | null;
10809
+ };
10810
+ };
10811
+ };
10812
+ };
10813
+ 401: components["responses"]["UnauthorizedError"];
10814
+ };
10815
+ };
10816
+ /**
10817
+ * Select the active wallet
10818
+ * @description Stores the caller's active-wallet choice on their own `wallets_users`
10819
+ * row (`is_selected`), so it follows the account instead of the device.
10820
+ * At most one such row exists per user — the DB enforces it.
10821
+ *
10822
+ * The choice is per user, not per wallet: selecting a wallet shared with
10823
+ * the caller changes nothing for its owner or for the other members.
10824
+ * Any wallet the caller is an **active member** of may be selected —
10825
+ * ownership is not required.
10826
+ *
10827
+ * **Authentication**: Bearer token with x-tenant-id header required
10828
+ *
10829
+ */
10830
+ put: {
10831
+ parameters: {
10832
+ query?: never;
10833
+ header?: never;
10834
+ path?: never;
10835
+ cookie?: never;
10836
+ };
10837
+ requestBody: {
10838
+ content: {
10839
+ "application/json": {
10840
+ /** Format: uuid */
10841
+ wallet_id: string;
10842
+ };
10843
+ };
10844
+ };
10845
+ responses: {
10846
+ /** @description Selection stored. */
10847
+ 200: {
10848
+ headers: {
10849
+ [name: string]: unknown;
10850
+ };
10851
+ content: {
10852
+ "application/json": {
10853
+ /** @example true */
10854
+ success?: boolean;
10855
+ /** @example Active wallet updated successfully */
10856
+ message?: string;
10857
+ data?: {
10858
+ /** Format: uuid */
10859
+ wallet_id?: string;
10860
+ };
10861
+ };
10862
+ };
10863
+ };
10864
+ /** @description wallet_id missing or blank */
10865
+ 400: {
10866
+ headers: {
10867
+ [name: string]: unknown;
10868
+ };
10869
+ content?: never;
10870
+ };
10871
+ 401: components["responses"]["UnauthorizedError"];
10872
+ 403: components["responses"]["ForbiddenError"];
10873
+ 404: components["responses"]["NotFoundError"];
10874
+ };
10875
+ };
10876
+ post?: never;
10877
+ delete?: never;
10878
+ options?: never;
10879
+ head?: never;
10880
+ patch?: never;
10881
+ trace?: never;
10882
+ };
10762
10883
  "/frontend/wallets/accept-invite": {
10763
10884
  parameters: {
10764
10885
  query?: never;
@@ -13533,6 +13654,27 @@ export interface components {
13533
13654
  /** Format: date-time */
13534
13655
  created_at: string;
13535
13656
  };
13657
+ /** @description How a card issued on this program is painted. Normalized on read, so every field here is either absent or usable — the abandoned shapes still in the column (`style.color`, `front_img`/`back_img`, a double-encoded JSON string) never reach a client. `null` means the program has no design: fall back to the app's built-in artwork. */
13658
+ CardDesign: {
13659
+ /**
13660
+ * @description Contract version.
13661
+ * @enum {integer}
13662
+ */
13663
+ version: 1;
13664
+ /** @description The card face. One artwork for both themes — a card is a printed object, it does not restyle when the app does. */
13665
+ cover?: {
13666
+ /**
13667
+ * Format: uri
13668
+ * @description Absolute https URL of the artwork, authored at 2x of 318×200 (636×400).
13669
+ */
13670
+ image_url?: string;
13671
+ };
13672
+ /**
13673
+ * @description Hex colour for every text on the card (balance, nickname, masked PAN). Set it when the artwork needs contrast the app-wide card text colour does not give.
13674
+ * @example #ffffff
13675
+ */
13676
+ text_color?: string;
13677
+ };
13536
13678
  /** @description Issuing program configuration (`issuing_programs` row). When joined it also carries nested `order_types`, `kyc_rails` and `integration_vendors` (hence additionalProperties). */
13537
13679
  IssuingProgram: {
13538
13680
  /** Format: uuid */
@@ -13583,9 +13725,7 @@ export interface components {
13583
13725
  initial_topup?: number | null;
13584
13726
  /** @description Minimum top-up amount in program currency, compared against the credited amount (0 = no minimum) */
13585
13727
  min_topup?: number;
13586
- card_design?: {
13587
- [key: string]: unknown;
13588
- } | null;
13728
+ card_design?: components["schemas"]["CardDesign"] | null;
13589
13729
  /** Format: uuid */
13590
13730
  kyc_rails_id?: string | null;
13591
13731
  /** Format: uuid */
@@ -13692,6 +13832,8 @@ export interface components {
13692
13832
  /** @description Embedded sub-account summary, or null when no sub-account is linked. Present on the normal (vendor-enriched) response; omitted only in the degraded local-only error mode. */
13693
13833
  sub_account: components["schemas"]["IssuingCardSubAccount"] | null;
13694
13834
  limits?: components["schemas"]["IssuingCardLimits"] | null;
13835
+ /** @description This card's artwork, copied from its issuing program so a client needs no second request to paint the card. `null` = the program has no design, use the app's built-in artwork. */
13836
+ card_design?: components["schemas"]["CardDesign"] | null;
13695
13837
  /** Format: date-time */
13696
13838
  created_at?: string;
13697
13839
  /** Format: date-time */
@@ -13881,6 +14023,8 @@ export interface components {
13881
14023
  * @description CORE user this cardholder is linked to (user_data provisioning mode); null for manually-created cardholders.
13882
14024
  */
13883
14025
  user_data_uuid?: string | null;
14026
+ /** @description Cards issued to this person (every status, canceled included), including cards on sibling per-vendor rows of the same person. Always present on list/get/PATCH; 0 when none. */
14027
+ cards_count?: number;
13884
14028
  vendor_id?: string | null;
13885
14029
  vendor_name?: string | null;
13886
14030
  vendor_type?: string | null;
@@ -8043,6 +8043,8 @@ export interface components {
8043
8043
  * @description Associated issuing program ID
8044
8044
  */
8045
8045
  issuing_program_id?: string;
8046
+ /** @description Cards issued to this person (every status, canceled included), including cards on sibling per-vendor rows of the same person. Always present on list/get/PATCH; 0 when none. */
8047
+ cards_count?: number;
8046
8048
  address?: components["schemas"]["CardholderAddress"];
8047
8049
  };
8048
8050
  /** @description An uploaded KYC file, addressable before it is attached to a cardholder */
@@ -88,6 +88,27 @@ export declare namespace API {
88
88
  }
89
89
  }
90
90
  namespace Cards {
91
+ /**
92
+ * How a card is painted: the artwork of the issuing program it belongs to.
93
+ *
94
+ * Normalized by the BFF on every read, so each field is either absent or
95
+ * usable — the abandoned shapes the `card_design` column still holds
96
+ * (`style.color`, `front_img`/`back_img`, a double-encoded JSON string)
97
+ * never reach a client. `null` means the program has no design and the app
98
+ * paints its own built-in artwork instead.
99
+ *
100
+ * One artwork covers both themes: a card face is a printed object, not a UI
101
+ * surface, so it does not restyle when the app does.
102
+ */
103
+ interface CardDesign {
104
+ version: 1;
105
+ cover?: {
106
+ /** Absolute https URL of the artwork, authored at 636×400 (2× the card). */
107
+ image_url?: string;
108
+ };
109
+ /** Hex colour for every text on the card face (balance, nickname, PAN). */
110
+ text_color?: string;
111
+ }
91
112
  namespace Config {
92
113
  type IssuingProgramOrderType = {
93
114
  id: string;
@@ -127,6 +148,12 @@ export declare namespace API {
127
148
  */
128
149
  min_topup?: number;
129
150
  status?: IssuingProgramStatus | string;
151
+ /**
152
+ * The program's artwork. Present on DETAILED program responses only;
153
+ * `null` when the program has none. Cards carry their own copy
154
+ * (`IssuingCardListItem.card_design`) — read that when painting a card.
155
+ */
156
+ card_design?: API.Cards.CardDesign | null;
130
157
  }
131
158
  }
132
159
  interface User {
@@ -204,6 +231,13 @@ export declare namespace API {
204
231
  type: CardType | string;
205
232
  form_factor: CardFormFactor | string;
206
233
  tokenizable: boolean;
234
+ /**
235
+ * This card's artwork, copied from its issuing program. Served WITH the
236
+ * card on purpose: joining against the program catalogue client-side
237
+ * costs a second request AND makes the card visibly swap artwork once
238
+ * that lands. `null` = no design, paint the app's built-in one.
239
+ */
240
+ card_design?: API.Cards.CardDesign | null;
207
241
  }
208
242
  interface IssuingCardDetailItem {
209
243
  id: string;
@@ -220,6 +254,8 @@ export declare namespace API {
220
254
  tokenizable: boolean;
221
255
  issuing_programs: API.Cards.Config.Program;
222
256
  limits?: API.Cards.Limits.Limits;
257
+ /** This card's artwork; see `IssuingCardListItem.card_design`. */
258
+ card_design?: API.Cards.CardDesign | null;
223
259
  }
224
260
  interface SubAccountCardListItem {
225
261
  type: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarefi-bff-api-module",
3
- "version": "1.36.54",
3
+ "version": "1.36.56",
4
4
  "description": "Squarefi BFF API client module",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",