squarefi-bff-api-module 1.36.49 → 1.36.51

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.
@@ -23,11 +23,6 @@ export declare const frontend: {
23
23
  limits: {
24
24
  update: ({ card_id, ...data }: API.Frontend.Issuing.Cards.Limits.Request) => Promise<API.Frontend.Issuing.Cards.Limits.Response>;
25
25
  };
26
- /**
27
- * PLAINTEXT PAN/CVV — server-to-server only. In a browser or mobile client use
28
- * `sensitiveEncrypted` instead, so the card number never travels readable.
29
- */
30
- sensitive: ({ card_id, }: API.Frontend.Issuing.Cards.Sensitive.Request) => Promise<API.Frontend.Issuing.Cards.Sensitive.Response>;
31
26
  /**
32
27
  * PAN/CVV over the encrypted channel: generates an AES-256 key, sends it encrypted to
33
28
  * the server's RSA public key (`SERVER_PUBLIC_KEY_BASE64`) and decrypts the answer —
@@ -40,11 +40,6 @@ export const frontend = {
40
40
  limits: {
41
41
  update: ({ card_id, ...data }) => apiClientV1Frontend.putRequest(`/frontend/issuing/cards/${card_id}/limits`, { data }),
42
42
  },
43
- /**
44
- * PLAINTEXT PAN/CVV — server-to-server only. In a browser or mobile client use
45
- * `sensitiveEncrypted` instead, so the card number never travels readable.
46
- */
47
- sensitive: ({ card_id, }) => apiClientV1Frontend.getRequest(`/frontend/issuing/cards/${card_id}/sensitive`),
48
43
  /**
49
44
  * PAN/CVV over the encrypted channel: generates an AES-256 key, sends it encrypted to
50
45
  * the server's RSA public key (`SERVER_PUBLIC_KEY_BASE64`) and decrypts the answer —
@@ -7396,7 +7396,7 @@ export interface components {
7396
7396
  * @description Cumulative KYC level; each level includes the previous one
7397
7397
  * @enum {string}
7398
7398
  */
7399
- level?: "minimal" | "basic" | "full";
7399
+ level?: "minimal" | "basic" | "declared" | "full";
7400
7400
  /**
7401
7401
  * @description Required field names; address fields are dotted (address.line1). Interlace CONSUMER also lists gov_id_issuance_date and gov_id_expiration_date (ISO YYYY-MM-DD).
7402
7402
  * @example [
@@ -2529,7 +2529,8 @@ export interface paths {
2529
2529
  cookie?: never;
2530
2530
  };
2531
2531
  /**
2532
- * Get card sensitive data
2532
+ * [DEPRECATED] Get card sensitive data
2533
+ * @deprecated
2533
2534
  * @description Retrieves sensitive card data including full card number, CVV, and expiry date.
2534
2535
  *
2535
2536
  * **Authentication**: Bearer token with x-tenant-id header required
@@ -3978,7 +3979,7 @@ export interface paths {
3978
3979
  * */
3979
3980
  cardholder_requirements?: {
3980
3981
  /** @enum {string} */
3981
- level?: "minimal" | "basic" | "full";
3982
+ level?: "minimal" | "basic" | "declared" | "full";
3982
3983
  /** @description Required field names; address fields are dotted (address.line1). */
3983
3984
  required?: string[];
3984
3985
  required_documents?: ("gov_id_front" | "gov_id_back" | "selfie")[];
@@ -4151,7 +4152,7 @@ export interface paths {
4151
4152
  * */
4152
4153
  cardholder_requirements?: {
4153
4154
  /** @enum {string} */
4154
- level?: "minimal" | "basic" | "full";
4155
+ level?: "minimal" | "basic" | "declared" | "full";
4155
4156
  /** @description Required field names; address fields are dotted (address.line1). */
4156
4157
  required?: string[];
4157
4158
  required_documents?: ("gov_id_front" | "gov_id_back" | "selfie")[];
@@ -4670,7 +4671,113 @@ export interface paths {
4670
4671
  };
4671
4672
  options?: never;
4672
4673
  head?: never;
4673
- patch?: never;
4674
+ /**
4675
+ * Update cardholder
4676
+ * @description Updates cardholder information.
4677
+ *
4678
+ * **Authentication**: Bearer token with x-tenant-id header required
4679
+ *
4680
+ * **Access Control**: Cardholder must belong to the user's wallet
4681
+ *
4682
+ */
4683
+ patch: {
4684
+ parameters: {
4685
+ query?: {
4686
+ /** @description Wallet ID for access validation */
4687
+ wallet_id?: string;
4688
+ };
4689
+ header?: never;
4690
+ path: {
4691
+ /** @description The ID of the cardholder to update */
4692
+ cardholder_id: string;
4693
+ };
4694
+ cookie?: never;
4695
+ };
4696
+ requestBody: {
4697
+ content: {
4698
+ "application/json": {
4699
+ /** @description Cardholder's first name */
4700
+ first_name?: string;
4701
+ /** @description Cardholder's last name */
4702
+ last_name?: string;
4703
+ /**
4704
+ * Format: email
4705
+ * @description Cardholder's email address
4706
+ */
4707
+ email?: string;
4708
+ /** @description Cardholder's phone number */
4709
+ phone?: string;
4710
+ /**
4711
+ * @description Cardholder's nationality as ISO 3166-1 alpha-3 country code
4712
+ * @example USA
4713
+ */
4714
+ nationality?: string;
4715
+ /** @enum {string} */
4716
+ gender?: "M" | "F";
4717
+ /** @enum {string} */
4718
+ cardholder_relationship?: "EMPLOYEE" | "CONTRACTOR";
4719
+ /** @enum {string} */
4720
+ gov_id_type?: "passport" | "id_card" | "driving_license" | "residence_permit_eu" | "residence_permit_ae" | "id_card_cn" | "id_card_hk";
4721
+ /** @description Identity document number (passport / driving licence / national ID). */
4722
+ gov_id_number?: string;
4723
+ /** @description 2-3 letter uppercase country code */
4724
+ gov_id_country?: string;
4725
+ /** Format: date */
4726
+ gov_id_issuance_date?: string;
4727
+ /** Format: date */
4728
+ gov_id_expiration_date?: string;
4729
+ /** @description Tax identifier (USA + Interlace CONSUMER: SSN, 9 digits or XXX-XX-XXXX) */
4730
+ tax_identification_number?: string;
4731
+ address?: {
4732
+ line1?: string;
4733
+ line2?: string;
4734
+ city?: string;
4735
+ state?: string;
4736
+ postal_code?: string;
4737
+ country?: string;
4738
+ };
4739
+ };
4740
+ };
4741
+ };
4742
+ responses: {
4743
+ /** @description Cardholder updated successfully */
4744
+ 200: {
4745
+ headers: {
4746
+ [name: string]: unknown;
4747
+ };
4748
+ content: {
4749
+ "application/json": {
4750
+ /** @example true */
4751
+ success?: boolean;
4752
+ data?: components["schemas"]["IssuingCardholder"];
4753
+ /** @example Cardholder updated successfully */
4754
+ message?: string;
4755
+ };
4756
+ };
4757
+ };
4758
+ /** @description Invalid request parameters */
4759
+ 400: {
4760
+ headers: {
4761
+ [name: string]: unknown;
4762
+ };
4763
+ content?: never;
4764
+ };
4765
+ /** @description Access denied to this cardholder */
4766
+ 403: {
4767
+ headers: {
4768
+ [name: string]: unknown;
4769
+ };
4770
+ content?: never;
4771
+ };
4772
+ /** @description Cardholder not found */
4773
+ 404: {
4774
+ headers: {
4775
+ [name: string]: unknown;
4776
+ };
4777
+ content?: never;
4778
+ };
4779
+ };
4780
+ };
4674
4781
  trace?: never;
4675
4782
  };
4676
4783
  "/frontend/issuing/cardholders/eligibility": {
@@ -4701,10 +4808,18 @@ export interface paths {
4701
4808
  * demands (a required document — usually the selfie — was never captured). Read
4702
4809
  * `required_level` to name the bar ("requires FULL verification"). Same remediation as
4703
4810
  * `NEEDS_VERIFICATION`, run to add the missing step.
4811
+ * - `NEEDS_RESUBMIT` — the VENDOR's review of the cardholder came back rejected (or asked
4812
+ * for part of the dossier again). Not a dead end: fix what `reject_reason` names —
4813
+ * `PATCH` the field, or re-upload and re-attach the document — then call
4814
+ * `POST /cardholders/{cardholder_id}/submit` again. The review restarts on the vendor
4815
+ * account the person already has; a fresh cardholder is NOT the way to retry.
4704
4816
  * - `REJECTED` — a verification came back with a FINAL rejection; re-running it from the
4705
4817
  * app is not possible (support resets it), so never render a "verify now" action.
4706
4818
  * - `NOT_MEMBER` — the uuid is not an active member of this wallet.
4707
4819
  *
4820
+ * A cardholder whose review is still running stays `READY`: re-submitting would only spend
4821
+ * another review, and the submit endpoint refuses it with `409 CARDHOLDER_NOT_DRAFT`.
4822
+ *
4708
4823
  * **`will_require`**: fields the client should expect to collect BY HAND (same vocabulary
4709
4824
  * as the submit 400 `missing` list, e.g. `address.line1`, `tax_identification_number`,
4710
4825
  * `email or phone`). For `DRAFT` it is the draft's actual leftovers; for `CAN_CREATE` it
@@ -4753,10 +4868,10 @@ export interface paths {
4753
4868
  /** Format: uuid */
4754
4869
  user_data_id: string;
4755
4870
  /** @enum {string} */
4756
- verdict: "READY" | "DRAFT" | "CAN_CREATE" | "PENDING" | "NEEDS_VERIFICATION" | "NEEDS_VERIFICATION_UPGRADE" | "REJECTED" | "NOT_MEMBER";
4871
+ verdict: "READY" | "DRAFT" | "CAN_CREATE" | "PENDING" | "NEEDS_VERIFICATION" | "NEEDS_VERIFICATION_UPGRADE" | "NEEDS_RESUBMIT" | "REJECTED" | "NOT_MEMBER";
4757
4872
  /**
4758
4873
  * Format: uuid
4759
- * @description The linked cardholder for READY/DRAFT verdicts
4874
+ * @description The linked cardholder for READY / DRAFT / NEEDS_RESUBMIT verdicts
4760
4875
  */
4761
4876
  cardholder_id: string | null;
4762
4877
  /** @description Fields to collect by hand (submit `missing` vocabulary) */
@@ -4768,7 +4883,12 @@ export interface paths {
4768
4883
  *
4769
4884
  * @enum {string|null}
4770
4885
  */
4771
- required_level?: "minimal" | "basic" | "full" | null;
4886
+ required_level?: "minimal" | "basic" | "declared" | "full" | null;
4887
+ /** @description What the vendor disliked, on a NEEDS_RESUBMIT verdict — show it before
4888
+ * asking for a correction. Null when the vendor named no reason, or the
4889
+ * verdict is not a rejection.
4890
+ * */
4891
+ reject_reason?: string | null;
4772
4892
  }[];
4773
4893
  };
4774
4894
  };
@@ -6141,7 +6261,7 @@ export interface paths {
6141
6261
  "application/json": components["schemas"]["ErrorResponse"];
6142
6262
  };
6143
6263
  };
6144
- /** @description Batch is not in DRAFT */
6264
+ /** @description Batch is not in DRAFT, or another operation on it is in flight */
6145
6265
  409: {
6146
6266
  headers: {
6147
6267
  [name: string]: unknown;
@@ -6212,7 +6332,7 @@ export interface paths {
6212
6332
  "application/json": components["schemas"]["ErrorResponse"];
6213
6333
  };
6214
6334
  };
6215
- /** @description Batch is not awaiting approval */
6335
+ /** @description Batch is not awaiting approval, or another operation on it is in flight */
6216
6336
  409: {
6217
6337
  headers: {
6218
6338
  [name: string]: unknown;
@@ -6647,9 +6767,15 @@ export interface paths {
6647
6767
  put?: never;
6648
6768
  /**
6649
6769
  * Issue a realtime subscription token
6650
- * @description Subscribe-only token for the realtime SDK (`authCallback`). `channels`
6651
- * lists the exact channel names the token grants — the personal channel
6652
- * plus one per accessible wallet. Tokens expire after ~1 hour; the SDK
6770
+ * @description Token for the realtime SDK (`authCallback`). `channels` lists the exact
6771
+ * channel names the token grants — the personal channel plus one per
6772
+ * accessible wallet. Every channel is subscribe-only; the personal channel
6773
+ * additionally grants `push-subscribe`, so a mobile client can activate
6774
+ * the device for push and subscribe it to that channel (the one native
6775
+ * pushes are published on) without any server-side registration step.
6776
+ * The token's `clientId` is the user's id — subscribe by client
6777
+ * (`subscribeClient`) to cover every device of the user at once, and
6778
+ * deactivate push on logout. Tokens expire after ~1 hour; the SDK
6653
6779
  * re-requests through the same endpoint.
6654
6780
  *
6655
6781
  */
@@ -12394,7 +12520,7 @@ export interface components {
12394
12520
  /** @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. */
12395
12521
  cardholder_requirements?: {
12396
12522
  /** @enum {string} */
12397
- level?: "minimal" | "basic" | "full";
12523
+ level?: "minimal" | "basic" | "declared" | "full";
12398
12524
  /** @description Required field names; address fields are dotted (address.line1). Interlace CONSUMER also lists gov_id_issuance_date and gov_id_expiration_date (ISO YYYY-MM-DD). */
12399
12525
  required?: string[];
12400
12526
  required_documents?: ("gov_id_front" | "gov_id_back" | "selfie")[];
@@ -6255,7 +6255,69 @@ export interface paths {
6255
6255
  };
6256
6256
  options?: never;
6257
6257
  head?: never;
6258
- patch?: never;
6258
+ /** Update cardholder */
6259
+ patch: {
6260
+ parameters: {
6261
+ query?: never;
6262
+ header?: never;
6263
+ path: {
6264
+ cardholder_id: string;
6265
+ };
6266
+ cookie?: never;
6267
+ };
6268
+ requestBody: {
6269
+ content: {
6270
+ "application/json": {
6271
+ /** Format: uuid */
6272
+ wallet_id: string;
6273
+ first_name?: string;
6274
+ last_name?: string;
6275
+ email?: string;
6276
+ phone?: string;
6277
+ /** @description ISO 3166-1 alpha-3 country code */
6278
+ nationality?: string;
6279
+ /** @enum {string} */
6280
+ gender?: "M" | "F";
6281
+ /** @enum {string} */
6282
+ cardholder_relationship?: "EMPLOYEE" | "CONTRACTOR";
6283
+ /** @enum {string} */
6284
+ gov_id_type?: "passport" | "id_card" | "driving_license" | "residence_permit_eu" | "residence_permit_ae" | "id_card_cn" | "id_card_hk";
6285
+ gov_id_number?: string;
6286
+ /** @description 2-3 letter uppercase country code */
6287
+ gov_id_country?: string;
6288
+ /** Format: date */
6289
+ gov_id_issuance_date?: string;
6290
+ /** Format: date */
6291
+ gov_id_expiration_date?: string;
6292
+ /** @description Tax identifier (USA + Interlace CONSUMER: SSN, 9 digits or XXX-XX-XXXX) */
6293
+ tax_identification_number?: string;
6294
+ address?: {
6295
+ line1?: string;
6296
+ line2?: string;
6297
+ city?: string;
6298
+ state?: string;
6299
+ postal_code?: string;
6300
+ country?: string;
6301
+ };
6302
+ };
6303
+ };
6304
+ };
6305
+ responses: {
6306
+ /** @description Cardholder updated */
6307
+ 200: {
6308
+ headers: {
6309
+ [name: string]: unknown;
6310
+ };
6311
+ content: {
6312
+ "application/json": {
6313
+ /** @example true */
6314
+ success?: boolean;
6315
+ data?: components["schemas"]["Cardholder"];
6316
+ };
6317
+ };
6318
+ };
6319
+ };
6320
+ };
6259
6321
  trace?: never;
6260
6322
  };
6261
6323
  "/admin/issuing/cardholders/{cardholder_id}/documents": {
@@ -676,7 +676,6 @@ export declare namespace API {
676
676
  type CardFreezeRoot = pathsV1Frontend['/frontend/issuing/cards/{card_id}/freeze'];
677
677
  type CardUnfreezeRoot = pathsV1Frontend['/frontend/issuing/cards/{card_id}/unfreeze'];
678
678
  type CardLimitsRoot = pathsV1Frontend['/frontend/issuing/cards/{card_id}/limits'];
679
- type CardSensitiveRoot = pathsV1Frontend['/frontend/issuing/cards/{card_id}/sensitive'];
680
679
  type CardTransactionsRoot = pathsV1Frontend['/frontend/issuing/cards/{card_id}/transactions'];
681
680
  type SubAccountTransactionsRoot = pathsV1Frontend['/frontend/issuing/sub-accounts/{sub_account_id}/transactions'];
682
681
  type CardDepositRoot = pathsV1Frontend['/frontend/issuing/cards/{card_id}/deposit'];
@@ -788,16 +787,6 @@ export declare namespace API {
788
787
  } & CardLimitsRoot['put']['requestBody']['content']['application/json'];
789
788
  type Response = CardLimitsRoot['put']['responses']['200']['content']['application/json'];
790
789
  }
791
- /**
792
- * Card PAN/CVV in PLAINTEXT. Server-to-server only — a browser or mobile client
793
- * should use `SensitiveEncrypted`, which never puts the PAN in a readable body.
794
- */
795
- namespace Sensitive {
796
- type Request = {
797
- card_id: string;
798
- };
799
- type Response = CardSensitiveRoot['get']['responses']['200']['content']['application/json'];
800
- }
801
790
  /**
802
791
  * Card PAN/CVV over an end-to-end encrypted channel: the client's AES-256 key is
803
792
  * sent encrypted to the server's RSA public key, and the answer comes back
@@ -969,6 +958,13 @@ export declare namespace API {
969
958
  * reset it. Never render an actionable "verify now" for this state.
970
959
  */
971
960
  | 'REJECTED'
961
+ /**
962
+ * The VENDOR rejected its review of the cardholder (or asked for part of the
963
+ * dossier again). Not a dead end: correct what `reject_reason` names and call
964
+ * `submit` again — the review restarts on the vendor account the person already
965
+ * has, so a fresh cardholder is NOT the way to retry.
966
+ */
967
+ | 'NEEDS_RESUBMIT'
972
968
  /** Not an active member of this wallet. */
973
969
  | 'NOT_MEMBER';
974
970
  type Request = {
@@ -991,7 +987,9 @@ export declare namespace API {
991
987
  * the same value carried on the verdict for convenience. Null when the
992
988
  * program bar could not be read.
993
989
  */
994
- required_level?: 'minimal' | 'basic' | 'full' | null;
990
+ required_level?: 'minimal' | 'basic' | 'declared' | 'full' | null;
991
+ /** What the vendor disliked, on a NEEDS_RESUBMIT verdict. */
992
+ reject_reason?: string | null;
995
993
  };
996
994
  type Response = {
997
995
  success?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarefi-bff-api-module",
3
- "version": "1.36.49",
3
+ "version": "1.36.51",
4
4
  "description": "Squarefi BFF API client module",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",