squarefi-bff-api-module 1.36.41 → 1.36.43
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.
package/dist/api/frontend.d.ts
CHANGED
|
@@ -33,5 +33,11 @@ export declare const frontend: {
|
|
|
33
33
|
deposit: ({ sub_account_id, ...data }: API.Frontend.Issuing.SubAccounts.Deposit.Request) => Promise<API.Frontend.Issuing.SubAccounts.Deposit.Response>;
|
|
34
34
|
withdraw: ({ sub_account_id, ...data }: API.Frontend.Issuing.SubAccounts.Withdraw.Request) => Promise<API.Frontend.Issuing.SubAccounts.Withdraw.Response>;
|
|
35
35
|
};
|
|
36
|
+
config: {
|
|
37
|
+
programs: {
|
|
38
|
+
getAll: (params?: API.Frontend.Issuing.Config.Programs.List.Request) => Promise<API.Frontend.Issuing.Config.Programs.List.Response>;
|
|
39
|
+
getById: ({ id, ...params }: API.Frontend.Issuing.Config.Programs.Get.Request) => Promise<API.Frontend.Issuing.Config.Programs.Get.Response>;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
36
42
|
};
|
|
37
43
|
};
|
package/dist/api/frontend.js
CHANGED
|
@@ -85,5 +85,15 @@ export const frontend = {
|
|
|
85
85
|
// taken from the sub-account, so only the amount is needed.
|
|
86
86
|
withdraw: ({ sub_account_id, ...data }) => apiClientV1Frontend.postRequest(`/frontend/issuing/sub-accounts/${sub_account_id}/withdraw`, { data }),
|
|
87
87
|
},
|
|
88
|
+
// Program catalogue. Unlike the legacy `issuing.config.programs` (GET
|
|
89
|
+
// /issuing/config/programs), the frontend route carries each program's
|
|
90
|
+
// `cardholder_requirements` (the per-program cardholder KYC bar) and keeps
|
|
91
|
+
// `kyc_rails_id` so the wallet can hide programs on a closed/rejected rail.
|
|
92
|
+
config: {
|
|
93
|
+
programs: {
|
|
94
|
+
getAll: (params = {}) => apiClientV1Frontend.getRequest('/frontend/issuing/config/programs', { params }),
|
|
95
|
+
getById: ({ id, ...params }) => apiClientV1Frontend.getRequest(`/frontend/issuing/config/programs/${id}`, { params }),
|
|
96
|
+
},
|
|
97
|
+
},
|
|
88
98
|
},
|
|
89
99
|
};
|
|
@@ -4524,6 +4524,10 @@ export interface paths {
|
|
|
4524
4524
|
* - `PENDING` — a verification review is in flight; wait.
|
|
4525
4525
|
* - `NEEDS_VERIFICATION` — no approved verification or no KYC applicant; the member has
|
|
4526
4526
|
* to (re)run identity verification.
|
|
4527
|
+
* - `NEEDS_VERIFICATION_UPGRADE` — the member IS verified, but not to the level this program
|
|
4528
|
+
* demands (a required document — usually the selfie — was never captured). Read
|
|
4529
|
+
* `required_level` to name the bar ("requires FULL verification"). Same remediation as
|
|
4530
|
+
* `NEEDS_VERIFICATION`, run to add the missing step.
|
|
4527
4531
|
* - `REJECTED` — a verification came back with a FINAL rejection; re-running it from the
|
|
4528
4532
|
* app is not possible (support resets it), so never render a "verify now" action.
|
|
4529
4533
|
* - `NOT_MEMBER` — the uuid is not an active member of this wallet.
|
|
@@ -4576,7 +4580,7 @@ export interface paths {
|
|
|
4576
4580
|
/** Format: uuid */
|
|
4577
4581
|
user_data_id: string;
|
|
4578
4582
|
/** @enum {string} */
|
|
4579
|
-
verdict: "READY" | "DRAFT" | "CAN_CREATE" | "PENDING" | "NEEDS_VERIFICATION" | "REJECTED" | "NOT_MEMBER";
|
|
4583
|
+
verdict: "READY" | "DRAFT" | "CAN_CREATE" | "PENDING" | "NEEDS_VERIFICATION" | "NEEDS_VERIFICATION_UPGRADE" | "REJECTED" | "NOT_MEMBER";
|
|
4580
4584
|
/**
|
|
4581
4585
|
* Format: uuid
|
|
4582
4586
|
* @description The linked cardholder for READY/DRAFT verdicts
|
|
@@ -4584,6 +4588,14 @@ export interface paths {
|
|
|
4584
4588
|
cardholder_id: string | null;
|
|
4585
4589
|
/** @description Fields to collect by hand (submit `missing` vocabulary) */
|
|
4586
4590
|
will_require: string[];
|
|
4591
|
+
/**
|
|
4592
|
+
* @description The KYC level this program demands. Lets the client name the bar in
|
|
4593
|
+
* the copy (e.g. "requires FULL verification" on a NEEDS_VERIFICATION
|
|
4594
|
+
* row). Null when the program bar could not be read.
|
|
4595
|
+
*
|
|
4596
|
+
* @enum {string|null}
|
|
4597
|
+
*/
|
|
4598
|
+
required_level?: "minimal" | "basic" | "full" | null;
|
|
4587
4599
|
}[];
|
|
4588
4600
|
};
|
|
4589
4601
|
};
|
|
@@ -850,6 +850,13 @@ export declare namespace API {
|
|
|
850
850
|
| 'PENDING'
|
|
851
851
|
/** No approved verification or no KYC applicant — the member must verify. */
|
|
852
852
|
| 'NEEDS_VERIFICATION'
|
|
853
|
+
/**
|
|
854
|
+
* The member IS verified, but not to the level THIS program demands (a
|
|
855
|
+
* required document — usually the selfie — was never captured). Same
|
|
856
|
+
* remediation as NEEDS_VERIFICATION; read the program's
|
|
857
|
+
* `cardholder_requirements.level` to name the bar ("requires FULL").
|
|
858
|
+
*/
|
|
859
|
+
| 'NEEDS_VERIFICATION_UPGRADE'
|
|
853
860
|
/**
|
|
854
861
|
* A verification came back with a FINAL rejection — only support can
|
|
855
862
|
* reset it. Never render an actionable "verify now" for this state.
|
|
@@ -870,6 +877,14 @@ export declare namespace API {
|
|
|
870
877
|
cardholder_id: string | null;
|
|
871
878
|
/** Fields to collect by hand (submit `missing` vocabulary). */
|
|
872
879
|
will_require: string[];
|
|
880
|
+
/**
|
|
881
|
+
* The KYC level this program demands, named for the copy on a
|
|
882
|
+
* NEEDS_VERIFICATION_UPGRADE row. Prefer the program's
|
|
883
|
+
* `cardholder_requirements.level` when the program is in hand; this is
|
|
884
|
+
* the same value carried on the verdict for convenience. Null when the
|
|
885
|
+
* program bar could not be read.
|
|
886
|
+
*/
|
|
887
|
+
required_level?: 'minimal' | 'basic' | 'full' | null;
|
|
873
888
|
};
|
|
874
889
|
type Response = {
|
|
875
890
|
success?: boolean;
|
|
@@ -919,6 +934,73 @@ export declare namespace API {
|
|
|
919
934
|
}
|
|
920
935
|
export {};
|
|
921
936
|
}
|
|
937
|
+
export namespace Config {
|
|
938
|
+
namespace Programs {
|
|
939
|
+
type ProgramsRoot = pathsV1Frontend['/frontend/issuing/config/programs'];
|
|
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
|
+
/**
|
|
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).
|
|
956
|
+
*/
|
|
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];
|
|
970
|
+
/**
|
|
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.
|
|
974
|
+
*/
|
|
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
|
+
};
|
|
980
|
+
export namespace List {
|
|
981
|
+
/** The spec omits `wallet_id`, but the handler reads it to resolve the tariff group. */
|
|
982
|
+
export type Request = NonNullable<ProgramsRoot['get']['parameters']['query']> & {
|
|
983
|
+
wallet_id?: string;
|
|
984
|
+
};
|
|
985
|
+
type RawResponse = ProgramsRoot['get']['responses']['200']['content']['application/json'];
|
|
986
|
+
export type Response = Omit<RawResponse, 'data'> & {
|
|
987
|
+
data?: Program[];
|
|
988
|
+
};
|
|
989
|
+
export {};
|
|
990
|
+
}
|
|
991
|
+
export namespace Get {
|
|
992
|
+
export type Request = {
|
|
993
|
+
id: string;
|
|
994
|
+
} & 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 {};
|
|
1000
|
+
}
|
|
1001
|
+
export {};
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
922
1004
|
export {};
|
|
923
1005
|
}
|
|
924
1006
|
}
|