squarefi-bff-api-module 1.36.43 → 1.36.44

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.
@@ -3860,23 +3860,55 @@ export interface paths {
3860
3860
  success?: boolean;
3861
3861
  data?: {
3862
3862
  /** Format: uuid */
3863
- id?: string;
3864
- name?: string;
3863
+ id: string;
3864
+ name: string;
3865
3865
  description?: string | null;
3866
3866
  /** @enum {string} */
3867
- form_factor?: "VIRTUAL" | "PHYSICAL";
3867
+ form_factor: "VIRTUAL" | "PHYSICAL";
3868
3868
  /** @enum {string} */
3869
- type?: "DEBIT" | "CREDIT" | "PREPAID";
3869
+ type: "DEBIT" | "CREDIT" | "PREPAID";
3870
3870
  /** @enum {string} */
3871
- brand?: "VISA" | "MASTERCARD";
3871
+ brand: "VISA" | "MASTERCARD";
3872
3872
  /** @enum {string} */
3873
- sub_account_type?: "prepaid" | "balance";
3873
+ sub_account_type: "prepaid" | "balance";
3874
3874
  /** Format: uuid */
3875
- account_currency?: string;
3875
+ account_currency: string;
3876
+ /**
3877
+ * Format: uuid
3878
+ * @description The program's KYC rail. Returned on the frontend route so the wallet UI
3879
+ * can hide programs whose rail is closed for submission and unusable
3880
+ * (never submitted or rejected).
3881
+ *
3882
+ */
3883
+ kyc_rails_id?: string | null;
3884
+ /** @description What a cardholder on this program must carry. Set per program in the
3885
+ * vendor config, so it can change without a release — read it instead of
3886
+ * hardcoding the form. Absent only when the program has no vendor config.
3887
+ * */
3888
+ cardholder_requirements?: {
3889
+ /** @enum {string} */
3890
+ level?: "minimal" | "basic" | "full";
3891
+ /** @description Required field names; address fields are dotted (address.line1). */
3892
+ required?: string[];
3893
+ required_documents?: ("gov_id_front" | "gov_id_back" | "selfie")[];
3894
+ /** @description Human-readable constraints the field list cannot express. */
3895
+ notes?: string[];
3896
+ /** @description What each country changes, keyed by ISO 3166-1 alpha-3 with a `default`
3897
+ * entry; empty when the vendor reviews nothing.
3898
+ * */
3899
+ country_rules?: {
3900
+ [key: string]: {
3901
+ gov_id_types?: string[];
3902
+ required_by_nationality?: string[];
3903
+ required_by_address?: string[];
3904
+ notes?: string[];
3905
+ };
3906
+ };
3907
+ };
3876
3908
  /** @description Required fields for card creation */
3877
3909
  required_fields?: Record<string, never>;
3878
3910
  /** @description Array of order type IDs */
3879
- order_types?: string[];
3911
+ order_types: string[];
3880
3912
  /** @description Card issuing price from user group settings */
3881
3913
  issuing_price_usd?: number;
3882
3914
  /** @description Maximum cards allowed from group settings */
@@ -3886,11 +3918,11 @@ export interface paths {
3886
3918
  /** @description Monthly card creation limit from group settings */
3887
3919
  cards_per_month?: number | null;
3888
3920
  /** @enum {string} */
3889
- status?: "ACTIVE" | "INACTIVE";
3921
+ status: "ACTIVE" | "INACTIVE";
3890
3922
  /** @description Default card spending limit */
3891
- card_limit?: number;
3923
+ card_limit: number;
3892
3924
  /** @description Whether card supports Apple/Google Pay */
3893
- tokenizable?: boolean;
3925
+ tokenizable: boolean;
3894
3926
  /** @description Icon URL for UI display */
3895
3927
  icon?: string | null;
3896
3928
  /** @description Program code */
@@ -3983,21 +4015,53 @@ export interface paths {
3983
4015
  success?: boolean;
3984
4016
  data?: {
3985
4017
  /** Format: uuid */
3986
- id?: string;
3987
- name?: string;
4018
+ id: string;
4019
+ name: string;
3988
4020
  description?: string | null;
3989
4021
  /** @enum {string} */
3990
- form_factor?: "VIRTUAL" | "PHYSICAL";
4022
+ form_factor: "VIRTUAL" | "PHYSICAL";
3991
4023
  /** @enum {string} */
3992
- type?: "DEBIT" | "CREDIT" | "PREPAID";
4024
+ type: "DEBIT" | "CREDIT" | "PREPAID";
3993
4025
  /** @enum {string} */
3994
- brand?: "VISA" | "MASTERCARD";
4026
+ brand: "VISA" | "MASTERCARD";
3995
4027
  /** @enum {string} */
3996
- sub_account_type?: "prepaid" | "balance";
4028
+ sub_account_type: "prepaid" | "balance";
3997
4029
  /** Format: uuid */
3998
- account_currency?: string;
4030
+ account_currency: string;
4031
+ /**
4032
+ * Format: uuid
4033
+ * @description The program's KYC rail. Returned on the frontend route so the wallet UI
4034
+ * can hide programs whose rail is closed for submission and unusable
4035
+ * (never submitted or rejected).
4036
+ *
4037
+ */
4038
+ kyc_rails_id?: string | null;
4039
+ /** @description What a cardholder on this program must carry. Set per program in the
4040
+ * vendor config, so it can change without a release — read it instead of
4041
+ * hardcoding the form. Absent only when the program has no vendor config.
4042
+ * */
4043
+ cardholder_requirements?: {
4044
+ /** @enum {string} */
4045
+ level?: "minimal" | "basic" | "full";
4046
+ /** @description Required field names; address fields are dotted (address.line1). */
4047
+ required?: string[];
4048
+ required_documents?: ("gov_id_front" | "gov_id_back" | "selfie")[];
4049
+ /** @description Human-readable constraints the field list cannot express. */
4050
+ notes?: string[];
4051
+ /** @description What each country changes, keyed by ISO 3166-1 alpha-3 with a `default`
4052
+ * entry; empty when the vendor reviews nothing.
4053
+ * */
4054
+ country_rules?: {
4055
+ [key: string]: {
4056
+ gov_id_types?: string[];
4057
+ required_by_nationality?: string[];
4058
+ required_by_address?: string[];
4059
+ notes?: string[];
4060
+ };
4061
+ };
4062
+ };
3999
4063
  required_fields?: Record<string, never>;
4000
- order_types?: {
4064
+ order_types: {
4001
4065
  /** @description Order type ID (e.g. TRANSFER_CARD_SUBACCOUNT) */
4002
4066
  id?: string;
4003
4067
  tokens?: {
@@ -938,65 +938,34 @@ export declare namespace API {
938
938
  namespace Programs {
939
939
  type ProgramsRoot = pathsV1Frontend['/frontend/issuing/config/programs'];
940
940
  type ProgramByIdRoot = pathsV1Frontend['/frontend/issuing/config/programs/{id}'];
941
- /** What each country changes about the cardholder dossier. */
942
- export interface CountryRule {
943
- /** Allowed `gov_id_type` values for a document issued by this country. */
944
- gov_id_types?: string[];
945
- /** Extra fields required when this is the member's nationality. */
946
- required_by_nationality?: string[];
947
- /** Extra fields required when this is the address country. */
948
- required_by_address?: string[];
949
- notes?: string[];
950
- }
951
941
  /**
952
- * The per-program cardholder KYC bar. Set in the program's vendor config, so it can
953
- * change without a release — read it instead of hardcoding the form. Hand-declared
954
- * until the deployed frontend spec documents it on this route; then it collapses onto
955
- * the autogen field (same forward-compat pattern as the Cardholder wire shape).
942
+ * A program as the frontend config route returns it — including `cardholder_requirements`
943
+ * (the per-program cardholder KYC bar) and `kyc_rails_id` (the wallet UI hides programs on
944
+ * a closed/rejected rail). Both come straight from the generated spec.
956
945
  */
957
- export interface CardholderRequirements {
958
- /** The KYC level the program demands. */
959
- level: 'minimal' | 'basic' | 'full';
960
- /** Required field names; address fields are dotted (`address.line1`). */
961
- required: string[];
962
- /** Document photos the program requires. */
963
- required_documents: Array<'gov_id_front' | 'gov_id_back' | 'selfie'>;
964
- /** Human-readable constraints the field list cannot express. */
965
- notes?: string[];
966
- /** Per-country overrides, keyed by ISO 3166-1 alpha-3 with a `default` entry. */
967
- country_rules?: Record<string, CountryRule>;
968
- }
969
- type AutogenProgram = NonNullable<ProgramsRoot['get']['responses']['200']['content']['application/json']['data']>[number];
946
+ export type Program = NonNullable<ProgramsRoot['get']['responses']['200']['content']['application/json']['data']>[number];
970
947
  /**
971
- * A program as the frontend config route returns it. `cardholder_requirements` and
972
- * `kyc_rails_id` are hand-added because the deployed spec does not document them yet;
973
- * once it does and the types regenerate, the intersection is a no-op.
948
+ * The per-program cardholder KYC bar (`level` / `required` / `required_documents` /
949
+ * `country_rules`). Set in the program's vendor config, so it can change without a
950
+ * release — read it instead of hardcoding the form.
974
951
  */
975
- export type Program = AutogenProgram & {
976
- /** The program's KYC rail; the wallet UI hides programs on a closed/rejected rail. */
977
- kyc_rails_id?: string | null;
978
- cardholder_requirements?: CardholderRequirements;
979
- };
952
+ export type CardholderRequirements = NonNullable<Program['cardholder_requirements']>;
953
+ /** The KYC level a program demands. */
954
+ export type CardholderKycLevel = NonNullable<CardholderRequirements['level']>;
955
+ /** What each country changes about the cardholder dossier (a `country_rules` entry). */
956
+ export type CountryRule = NonNullable<NonNullable<CardholderRequirements['country_rules']>[string]>;
980
957
  export namespace List {
981
958
  /** The spec omits `wallet_id`, but the handler reads it to resolve the tariff group. */
982
- export type Request = NonNullable<ProgramsRoot['get']['parameters']['query']> & {
959
+ type Request = NonNullable<ProgramsRoot['get']['parameters']['query']> & {
983
960
  wallet_id?: string;
984
961
  };
985
- type RawResponse = ProgramsRoot['get']['responses']['200']['content']['application/json'];
986
- export type Response = Omit<RawResponse, 'data'> & {
987
- data?: Program[];
988
- };
989
- export {};
962
+ type Response = ProgramsRoot['get']['responses']['200']['content']['application/json'];
990
963
  }
991
964
  export namespace Get {
992
- export type Request = {
965
+ type Request = {
993
966
  id: string;
994
967
  } & NonNullable<ProgramByIdRoot['get']['parameters']['query']>;
995
- type RawResponse = ProgramByIdRoot['get']['responses']['200']['content']['application/json'];
996
- export type Response = Omit<RawResponse, 'data'> & {
997
- data?: Program;
998
- };
999
- export {};
968
+ type Response = ProgramByIdRoot['get']['responses']['200']['content']['application/json'];
1000
969
  }
1001
970
  export {};
1002
971
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squarefi-bff-api-module",
3
- "version": "1.36.43",
3
+ "version": "1.36.44",
4
4
  "description": "Squarefi BFF API client module",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",