@metamask-previews/kyc-controller 0.0.0-preview-11d78534e
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/CHANGELOG.md +21 -0
- package/LICENSE +6 -0
- package/LICENSE.APACHE2 +201 -0
- package/LICENSE.MIT +21 -0
- package/README.md +648 -0
- package/dist/KycController-method-action-types.cjs +7 -0
- package/dist/KycController-method-action-types.cjs.map +1 -0
- package/dist/KycController-method-action-types.d.cts +143 -0
- package/dist/KycController-method-action-types.d.cts.map +1 -0
- package/dist/KycController-method-action-types.d.mts +143 -0
- package/dist/KycController-method-action-types.d.mts.map +1 -0
- package/dist/KycController-method-action-types.mjs +6 -0
- package/dist/KycController-method-action-types.mjs.map +1 -0
- package/dist/KycController.cjs +800 -0
- package/dist/KycController.cjs.map +1 -0
- package/dist/KycController.d.cts +219 -0
- package/dist/KycController.d.cts.map +1 -0
- package/dist/KycController.d.mts +219 -0
- package/dist/KycController.d.mts.map +1 -0
- package/dist/KycController.mjs +795 -0
- package/dist/KycController.mjs.map +1 -0
- package/dist/KycService-method-action-types.cjs +7 -0
- package/dist/KycService-method-action-types.cjs.map +1 -0
- package/dist/KycService-method-action-types.d.cts +74 -0
- package/dist/KycService-method-action-types.d.cts.map +1 -0
- package/dist/KycService-method-action-types.d.mts +74 -0
- package/dist/KycService-method-action-types.d.mts.map +1 -0
- package/dist/KycService-method-action-types.mjs +6 -0
- package/dist/KycService-method-action-types.mjs.map +1 -0
- package/dist/KycService.cjs +238 -0
- package/dist/KycService.cjs.map +1 -0
- package/dist/KycService.d.cts +169 -0
- package/dist/KycService.d.cts.map +1 -0
- package/dist/KycService.d.mts +169 -0
- package/dist/KycService.d.mts.map +1 -0
- package/dist/KycService.mjs +234 -0
- package/dist/KycService.mjs.map +1 -0
- package/dist/countryCodes.cjs +274 -0
- package/dist/countryCodes.cjs.map +1 -0
- package/dist/countryCodes.d.cts +18 -0
- package/dist/countryCodes.d.cts.map +1 -0
- package/dist/countryCodes.d.mts +18 -0
- package/dist/countryCodes.d.mts.map +1 -0
- package/dist/countryCodes.mjs +270 -0
- package/dist/countryCodes.mjs.map +1 -0
- package/dist/crypto.cjs +165 -0
- package/dist/crypto.cjs.map +1 -0
- package/dist/crypto.d.cts +83 -0
- package/dist/crypto.d.cts.map +1 -0
- package/dist/crypto.d.mts +83 -0
- package/dist/crypto.d.mts.map +1 -0
- package/dist/crypto.mjs +160 -0
- package/dist/crypto.mjs.map +1 -0
- package/dist/index.cjs +21 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +12 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +12 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +6 -0
- package/dist/index.mjs.map +1 -0
- package/dist/selectors.cjs +30 -0
- package/dist/selectors.cjs.map +1 -0
- package/dist/selectors.d.cts +24 -0
- package/dist/selectors.d.cts.map +1 -0
- package/dist/selectors.d.mts +24 -0
- package/dist/selectors.d.mts.map +1 -0
- package/dist/selectors.mjs +24 -0
- package/dist/selectors.mjs.map +1 -0
- package/dist/types.cjs +10 -0
- package/dist/types.cjs.map +1 -0
- package/dist/types.d.cts +93 -0
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.mts +93 -0
- package/dist/types.d.mts.map +1 -0
- package/dist/types.mjs +9 -0
- package/dist/types.mjs.map +1 -0
- package/package.json +89 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is auto generated.
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
*/
|
|
5
|
+
import type { KycController } from "./KycController.cjs";
|
|
6
|
+
/**
|
|
7
|
+
* Resolves persisted terms + geolocation, and auto-creates a session when
|
|
8
|
+
* terms are already accepted and an email is available.
|
|
9
|
+
*
|
|
10
|
+
* @param params - Optional parameters.
|
|
11
|
+
* @param params.email - The account email to associate with the session.
|
|
12
|
+
* @param params.product - The consuming feature the flow runs for. When
|
|
13
|
+
* provided, the controller automatically runs the KYC-required check once
|
|
14
|
+
* authentication completes (and chains into document verification when KYC
|
|
15
|
+
* is required). When omitted, the flow stops at `form` and the consumer must
|
|
16
|
+
* call `checkKycRequired` manually.
|
|
17
|
+
*/
|
|
18
|
+
export type KycControllerInitializeAction = {
|
|
19
|
+
type: `KycController:initialize`;
|
|
20
|
+
handler: KycController['initialize'];
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Loads the disclaimers for the resolved (or provided) country.
|
|
24
|
+
*
|
|
25
|
+
* @param params - Optional parameters.
|
|
26
|
+
* @param params.country - ISO 3166-1 alpha-3 country code override.
|
|
27
|
+
*/
|
|
28
|
+
export type KycControllerLoadDisclaimersAction = {
|
|
29
|
+
type: `KycController:loadDisclaimers`;
|
|
30
|
+
handler: KycController['loadDisclaimers'];
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Captures terms acceptance for the currently loaded disclaimers and creates
|
|
34
|
+
* a session.
|
|
35
|
+
*
|
|
36
|
+
* @param params - Optional parameters.
|
|
37
|
+
* @param params.email - The account email to associate with the session.
|
|
38
|
+
* @param params.product - The consuming feature the flow runs for. See
|
|
39
|
+
* {@link initialize} for how the product drives the automatic post
|
|
40
|
+
* authentication continuation.
|
|
41
|
+
*/
|
|
42
|
+
export type KycControllerAcceptTermsAndStartSessionAction = {
|
|
43
|
+
type: `KycController:acceptTermsAndStartSession`;
|
|
44
|
+
handler: KycController['acceptTermsAndStartSession'];
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Clears the persisted terms acceptance.
|
|
48
|
+
*/
|
|
49
|
+
export type KycControllerClearSavedTermsAction = {
|
|
50
|
+
type: `KycController:clearSavedTerms`;
|
|
51
|
+
handler: KycController['clearSavedTerms'];
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Handles a message posted by a Check/Auth frame and advances the flow.
|
|
55
|
+
*
|
|
56
|
+
* The transport-agnostic caller (WebView on mobile, iframe on web) forwards
|
|
57
|
+
* the raw message and injects the returned `reply` back into the frame.
|
|
58
|
+
*
|
|
59
|
+
* @param params - The parameters.
|
|
60
|
+
* @param params.message - The raw message posted by the frame.
|
|
61
|
+
* @returns An object whose optional `reply` should be posted back.
|
|
62
|
+
*/
|
|
63
|
+
export type KycControllerHandleFrameMessageAction = {
|
|
64
|
+
type: `KycController:handleFrameMessage`;
|
|
65
|
+
handler: KycController['handleFrameMessage'];
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Builds the Check-frame URL, or `null` when no session exists yet.
|
|
69
|
+
*
|
|
70
|
+
* @returns The Check-frame URL or `null`.
|
|
71
|
+
*/
|
|
72
|
+
export type KycControllerBuildCheckFrameUrlAction = {
|
|
73
|
+
type: `KycController:buildCheckFrameUrl`;
|
|
74
|
+
handler: KycController['buildCheckFrameUrl'];
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Builds the Auth-frame URL, or `null` when no client token is available.
|
|
78
|
+
*
|
|
79
|
+
* @returns The Auth-frame URL or `null`.
|
|
80
|
+
*/
|
|
81
|
+
export type KycControllerBuildAuthFrameUrlAction = {
|
|
82
|
+
type: `KycController:buildAuthFrameUrl`;
|
|
83
|
+
handler: KycController['buildAuthFrameUrl'];
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Builds the Reset-frame URL.
|
|
87
|
+
*
|
|
88
|
+
* @returns The Reset-frame URL.
|
|
89
|
+
*/
|
|
90
|
+
export type KycControllerBuildResetFrameUrlAction = {
|
|
91
|
+
type: `KycController:buildResetFrameUrl`;
|
|
92
|
+
handler: KycController['buildResetFrameUrl'];
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Checks whether KYC is required for a product and caches the result.
|
|
96
|
+
*
|
|
97
|
+
* @param params - The parameters.
|
|
98
|
+
* @param params.product - The consuming feature.
|
|
99
|
+
* @param params.country - Optional alpha-3 country override.
|
|
100
|
+
* @returns Whether KYC is required.
|
|
101
|
+
*/
|
|
102
|
+
export type KycControllerCheckKycRequiredAction = {
|
|
103
|
+
type: `KycController:checkKycRequired`;
|
|
104
|
+
handler: KycController['checkKycRequired'];
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Reads the cached "is KYC required" result for a product.
|
|
108
|
+
*
|
|
109
|
+
* @param params - The parameters.
|
|
110
|
+
* @param params.product - The consuming feature.
|
|
111
|
+
* @returns The cached value, or `undefined` if not yet checked.
|
|
112
|
+
*/
|
|
113
|
+
export type KycControllerGetKycStatusAction = {
|
|
114
|
+
type: `KycController:getKycStatus`;
|
|
115
|
+
handler: KycController['getKycStatus'];
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* Runs the SumSub document-verification sub-flow: creates a UKYC session,
|
|
119
|
+
* exchanges the wrapped key for an applicant access token, and presents the
|
|
120
|
+
* SDK via the injected launcher.
|
|
121
|
+
*
|
|
122
|
+
* @param params - Optional parameters.
|
|
123
|
+
* @param params.locale - BCP-47 locale for the SDK UI.
|
|
124
|
+
* @param params.debug - Enables SDK debug logging.
|
|
125
|
+
* @returns The SDK result.
|
|
126
|
+
*/
|
|
127
|
+
export type KycControllerStartSumSubAction = {
|
|
128
|
+
type: `KycController:startSumSub`;
|
|
129
|
+
handler: KycController['startSumSub'];
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Resets the flow to idle, clearing session tokens and sub-flow state while
|
|
133
|
+
* preserving persisted terms acceptance and the per-product cache.
|
|
134
|
+
*/
|
|
135
|
+
export type KycControllerResetAction = {
|
|
136
|
+
type: `KycController:reset`;
|
|
137
|
+
handler: KycController['reset'];
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* Union of all KycController action types.
|
|
141
|
+
*/
|
|
142
|
+
export type KycControllerMethodActions = KycControllerInitializeAction | KycControllerLoadDisclaimersAction | KycControllerAcceptTermsAndStartSessionAction | KycControllerClearSavedTermsAction | KycControllerHandleFrameMessageAction | KycControllerBuildCheckFrameUrlAction | KycControllerBuildAuthFrameUrlAction | KycControllerBuildResetFrameUrlAction | KycControllerCheckKycRequiredAction | KycControllerGetKycStatusAction | KycControllerStartSumSubAction | KycControllerResetAction;
|
|
143
|
+
//# sourceMappingURL=KycController-method-action-types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KycController-method-action-types.d.cts","sourceRoot":"","sources":["../src/KycController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,4BAAwB;AAErD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,IAAI,EAAE,0BAA0B,CAAC;IACjC,OAAO,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;CACtC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,kCAAkC,GAAG;IAC/C,IAAI,EAAE,+BAA+B,CAAC;IACtC,OAAO,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;CAC3C,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,6CAA6C,GAAG;IAC1D,IAAI,EAAE,0CAA0C,CAAC;IACjD,OAAO,EAAE,aAAa,CAAC,4BAA4B,CAAC,CAAC;CACtD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG;IAC/C,IAAI,EAAE,+BAA+B,CAAC;IACtC,OAAO,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;CAC3C,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAClD,IAAI,EAAE,kCAAkC,CAAC;IACzC,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAC9C,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAClD,IAAI,EAAE,kCAAkC,CAAC;IACzC,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAC9C,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,oCAAoC,GAAG;IACjD,IAAI,EAAE,iCAAiC,CAAC;IACxC,OAAO,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAClD,IAAI,EAAE,kCAAkC,CAAC;IACzC,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAC9C,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,mCAAmC,GAAG;IAChD,IAAI,EAAE,gCAAgC,CAAC;IACvC,OAAO,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;CAC5C,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,4BAA4B,CAAC;IACnC,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;CACxC,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,8BAA8B,GAAG;IAC3C,IAAI,EAAE,2BAA2B,CAAC;IAClC,OAAO,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;CACvC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAClC,6BAA6B,GAC7B,kCAAkC,GAClC,6CAA6C,GAC7C,kCAAkC,GAClC,qCAAqC,GACrC,qCAAqC,GACrC,oCAAoC,GACpC,qCAAqC,GACrC,mCAAmC,GACnC,+BAA+B,GAC/B,8BAA8B,GAC9B,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is auto generated.
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
*/
|
|
5
|
+
import type { KycController } from "./KycController.mjs";
|
|
6
|
+
/**
|
|
7
|
+
* Resolves persisted terms + geolocation, and auto-creates a session when
|
|
8
|
+
* terms are already accepted and an email is available.
|
|
9
|
+
*
|
|
10
|
+
* @param params - Optional parameters.
|
|
11
|
+
* @param params.email - The account email to associate with the session.
|
|
12
|
+
* @param params.product - The consuming feature the flow runs for. When
|
|
13
|
+
* provided, the controller automatically runs the KYC-required check once
|
|
14
|
+
* authentication completes (and chains into document verification when KYC
|
|
15
|
+
* is required). When omitted, the flow stops at `form` and the consumer must
|
|
16
|
+
* call `checkKycRequired` manually.
|
|
17
|
+
*/
|
|
18
|
+
export type KycControllerInitializeAction = {
|
|
19
|
+
type: `KycController:initialize`;
|
|
20
|
+
handler: KycController['initialize'];
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Loads the disclaimers for the resolved (or provided) country.
|
|
24
|
+
*
|
|
25
|
+
* @param params - Optional parameters.
|
|
26
|
+
* @param params.country - ISO 3166-1 alpha-3 country code override.
|
|
27
|
+
*/
|
|
28
|
+
export type KycControllerLoadDisclaimersAction = {
|
|
29
|
+
type: `KycController:loadDisclaimers`;
|
|
30
|
+
handler: KycController['loadDisclaimers'];
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Captures terms acceptance for the currently loaded disclaimers and creates
|
|
34
|
+
* a session.
|
|
35
|
+
*
|
|
36
|
+
* @param params - Optional parameters.
|
|
37
|
+
* @param params.email - The account email to associate with the session.
|
|
38
|
+
* @param params.product - The consuming feature the flow runs for. See
|
|
39
|
+
* {@link initialize} for how the product drives the automatic post
|
|
40
|
+
* authentication continuation.
|
|
41
|
+
*/
|
|
42
|
+
export type KycControllerAcceptTermsAndStartSessionAction = {
|
|
43
|
+
type: `KycController:acceptTermsAndStartSession`;
|
|
44
|
+
handler: KycController['acceptTermsAndStartSession'];
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Clears the persisted terms acceptance.
|
|
48
|
+
*/
|
|
49
|
+
export type KycControllerClearSavedTermsAction = {
|
|
50
|
+
type: `KycController:clearSavedTerms`;
|
|
51
|
+
handler: KycController['clearSavedTerms'];
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Handles a message posted by a Check/Auth frame and advances the flow.
|
|
55
|
+
*
|
|
56
|
+
* The transport-agnostic caller (WebView on mobile, iframe on web) forwards
|
|
57
|
+
* the raw message and injects the returned `reply` back into the frame.
|
|
58
|
+
*
|
|
59
|
+
* @param params - The parameters.
|
|
60
|
+
* @param params.message - The raw message posted by the frame.
|
|
61
|
+
* @returns An object whose optional `reply` should be posted back.
|
|
62
|
+
*/
|
|
63
|
+
export type KycControllerHandleFrameMessageAction = {
|
|
64
|
+
type: `KycController:handleFrameMessage`;
|
|
65
|
+
handler: KycController['handleFrameMessage'];
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Builds the Check-frame URL, or `null` when no session exists yet.
|
|
69
|
+
*
|
|
70
|
+
* @returns The Check-frame URL or `null`.
|
|
71
|
+
*/
|
|
72
|
+
export type KycControllerBuildCheckFrameUrlAction = {
|
|
73
|
+
type: `KycController:buildCheckFrameUrl`;
|
|
74
|
+
handler: KycController['buildCheckFrameUrl'];
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Builds the Auth-frame URL, or `null` when no client token is available.
|
|
78
|
+
*
|
|
79
|
+
* @returns The Auth-frame URL or `null`.
|
|
80
|
+
*/
|
|
81
|
+
export type KycControllerBuildAuthFrameUrlAction = {
|
|
82
|
+
type: `KycController:buildAuthFrameUrl`;
|
|
83
|
+
handler: KycController['buildAuthFrameUrl'];
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Builds the Reset-frame URL.
|
|
87
|
+
*
|
|
88
|
+
* @returns The Reset-frame URL.
|
|
89
|
+
*/
|
|
90
|
+
export type KycControllerBuildResetFrameUrlAction = {
|
|
91
|
+
type: `KycController:buildResetFrameUrl`;
|
|
92
|
+
handler: KycController['buildResetFrameUrl'];
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Checks whether KYC is required for a product and caches the result.
|
|
96
|
+
*
|
|
97
|
+
* @param params - The parameters.
|
|
98
|
+
* @param params.product - The consuming feature.
|
|
99
|
+
* @param params.country - Optional alpha-3 country override.
|
|
100
|
+
* @returns Whether KYC is required.
|
|
101
|
+
*/
|
|
102
|
+
export type KycControllerCheckKycRequiredAction = {
|
|
103
|
+
type: `KycController:checkKycRequired`;
|
|
104
|
+
handler: KycController['checkKycRequired'];
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Reads the cached "is KYC required" result for a product.
|
|
108
|
+
*
|
|
109
|
+
* @param params - The parameters.
|
|
110
|
+
* @param params.product - The consuming feature.
|
|
111
|
+
* @returns The cached value, or `undefined` if not yet checked.
|
|
112
|
+
*/
|
|
113
|
+
export type KycControllerGetKycStatusAction = {
|
|
114
|
+
type: `KycController:getKycStatus`;
|
|
115
|
+
handler: KycController['getKycStatus'];
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* Runs the SumSub document-verification sub-flow: creates a UKYC session,
|
|
119
|
+
* exchanges the wrapped key for an applicant access token, and presents the
|
|
120
|
+
* SDK via the injected launcher.
|
|
121
|
+
*
|
|
122
|
+
* @param params - Optional parameters.
|
|
123
|
+
* @param params.locale - BCP-47 locale for the SDK UI.
|
|
124
|
+
* @param params.debug - Enables SDK debug logging.
|
|
125
|
+
* @returns The SDK result.
|
|
126
|
+
*/
|
|
127
|
+
export type KycControllerStartSumSubAction = {
|
|
128
|
+
type: `KycController:startSumSub`;
|
|
129
|
+
handler: KycController['startSumSub'];
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Resets the flow to idle, clearing session tokens and sub-flow state while
|
|
133
|
+
* preserving persisted terms acceptance and the per-product cache.
|
|
134
|
+
*/
|
|
135
|
+
export type KycControllerResetAction = {
|
|
136
|
+
type: `KycController:reset`;
|
|
137
|
+
handler: KycController['reset'];
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* Union of all KycController action types.
|
|
141
|
+
*/
|
|
142
|
+
export type KycControllerMethodActions = KycControllerInitializeAction | KycControllerLoadDisclaimersAction | KycControllerAcceptTermsAndStartSessionAction | KycControllerClearSavedTermsAction | KycControllerHandleFrameMessageAction | KycControllerBuildCheckFrameUrlAction | KycControllerBuildAuthFrameUrlAction | KycControllerBuildResetFrameUrlAction | KycControllerCheckKycRequiredAction | KycControllerGetKycStatusAction | KycControllerStartSumSubAction | KycControllerResetAction;
|
|
143
|
+
//# sourceMappingURL=KycController-method-action-types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KycController-method-action-types.d.mts","sourceRoot":"","sources":["../src/KycController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,4BAAwB;AAErD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,IAAI,EAAE,0BAA0B,CAAC;IACjC,OAAO,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;CACtC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,kCAAkC,GAAG;IAC/C,IAAI,EAAE,+BAA+B,CAAC;IACtC,OAAO,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;CAC3C,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,6CAA6C,GAAG;IAC1D,IAAI,EAAE,0CAA0C,CAAC;IACjD,OAAO,EAAE,aAAa,CAAC,4BAA4B,CAAC,CAAC;CACtD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,kCAAkC,GAAG;IAC/C,IAAI,EAAE,+BAA+B,CAAC;IACtC,OAAO,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;CAC3C,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAClD,IAAI,EAAE,kCAAkC,CAAC;IACzC,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAC9C,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAClD,IAAI,EAAE,kCAAkC,CAAC;IACzC,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAC9C,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,oCAAoC,GAAG;IACjD,IAAI,EAAE,iCAAiC,CAAC;IACxC,OAAO,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,qCAAqC,GAAG;IAClD,IAAI,EAAE,kCAAkC,CAAC;IACzC,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;CAC9C,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,mCAAmC,GAAG;IAChD,IAAI,EAAE,gCAAgC,CAAC;IACvC,OAAO,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;CAC5C,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,4BAA4B,CAAC;IACnC,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;CACxC,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,8BAA8B,GAAG;IAC3C,IAAI,EAAE,2BAA2B,CAAC;IAClC,OAAO,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;CACvC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAClC,6BAA6B,GAC7B,kCAAkC,GAClC,6CAA6C,GAC7C,kCAAkC,GAClC,qCAAqC,GACrC,qCAAqC,GACrC,oCAAoC,GACpC,qCAAqC,GACrC,mCAAmC,GACnC,+BAA+B,GAC/B,8BAA8B,GAC9B,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KycController-method-action-types.mjs","sourceRoot":"","sources":["../src/KycController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { KycController } from './KycController';\n\n/**\n * Resolves persisted terms + geolocation, and auto-creates a session when\n * terms are already accepted and an email is available.\n *\n * @param params - Optional parameters.\n * @param params.email - The account email to associate with the session.\n * @param params.product - The consuming feature the flow runs for. When\n * provided, the controller automatically runs the KYC-required check once\n * authentication completes (and chains into document verification when KYC\n * is required). When omitted, the flow stops at `form` and the consumer must\n * call `checkKycRequired` manually.\n */\nexport type KycControllerInitializeAction = {\n type: `KycController:initialize`;\n handler: KycController['initialize'];\n};\n\n/**\n * Loads the disclaimers for the resolved (or provided) country.\n *\n * @param params - Optional parameters.\n * @param params.country - ISO 3166-1 alpha-3 country code override.\n */\nexport type KycControllerLoadDisclaimersAction = {\n type: `KycController:loadDisclaimers`;\n handler: KycController['loadDisclaimers'];\n};\n\n/**\n * Captures terms acceptance for the currently loaded disclaimers and creates\n * a session.\n *\n * @param params - Optional parameters.\n * @param params.email - The account email to associate with the session.\n * @param params.product - The consuming feature the flow runs for. See\n * {@link initialize} for how the product drives the automatic post\n * authentication continuation.\n */\nexport type KycControllerAcceptTermsAndStartSessionAction = {\n type: `KycController:acceptTermsAndStartSession`;\n handler: KycController['acceptTermsAndStartSession'];\n};\n\n/**\n * Clears the persisted terms acceptance.\n */\nexport type KycControllerClearSavedTermsAction = {\n type: `KycController:clearSavedTerms`;\n handler: KycController['clearSavedTerms'];\n};\n\n/**\n * Handles a message posted by a Check/Auth frame and advances the flow.\n *\n * The transport-agnostic caller (WebView on mobile, iframe on web) forwards\n * the raw message and injects the returned `reply` back into the frame.\n *\n * @param params - The parameters.\n * @param params.message - The raw message posted by the frame.\n * @returns An object whose optional `reply` should be posted back.\n */\nexport type KycControllerHandleFrameMessageAction = {\n type: `KycController:handleFrameMessage`;\n handler: KycController['handleFrameMessage'];\n};\n\n/**\n * Builds the Check-frame URL, or `null` when no session exists yet.\n *\n * @returns The Check-frame URL or `null`.\n */\nexport type KycControllerBuildCheckFrameUrlAction = {\n type: `KycController:buildCheckFrameUrl`;\n handler: KycController['buildCheckFrameUrl'];\n};\n\n/**\n * Builds the Auth-frame URL, or `null` when no client token is available.\n *\n * @returns The Auth-frame URL or `null`.\n */\nexport type KycControllerBuildAuthFrameUrlAction = {\n type: `KycController:buildAuthFrameUrl`;\n handler: KycController['buildAuthFrameUrl'];\n};\n\n/**\n * Builds the Reset-frame URL.\n *\n * @returns The Reset-frame URL.\n */\nexport type KycControllerBuildResetFrameUrlAction = {\n type: `KycController:buildResetFrameUrl`;\n handler: KycController['buildResetFrameUrl'];\n};\n\n/**\n * Checks whether KYC is required for a product and caches the result.\n *\n * @param params - The parameters.\n * @param params.product - The consuming feature.\n * @param params.country - Optional alpha-3 country override.\n * @returns Whether KYC is required.\n */\nexport type KycControllerCheckKycRequiredAction = {\n type: `KycController:checkKycRequired`;\n handler: KycController['checkKycRequired'];\n};\n\n/**\n * Reads the cached \"is KYC required\" result for a product.\n *\n * @param params - The parameters.\n * @param params.product - The consuming feature.\n * @returns The cached value, or `undefined` if not yet checked.\n */\nexport type KycControllerGetKycStatusAction = {\n type: `KycController:getKycStatus`;\n handler: KycController['getKycStatus'];\n};\n\n/**\n * Runs the SumSub document-verification sub-flow: creates a UKYC session,\n * exchanges the wrapped key for an applicant access token, and presents the\n * SDK via the injected launcher.\n *\n * @param params - Optional parameters.\n * @param params.locale - BCP-47 locale for the SDK UI.\n * @param params.debug - Enables SDK debug logging.\n * @returns The SDK result.\n */\nexport type KycControllerStartSumSubAction = {\n type: `KycController:startSumSub`;\n handler: KycController['startSumSub'];\n};\n\n/**\n * Resets the flow to idle, clearing session tokens and sub-flow state while\n * preserving persisted terms acceptance and the per-product cache.\n */\nexport type KycControllerResetAction = {\n type: `KycController:reset`;\n handler: KycController['reset'];\n};\n\n/**\n * Union of all KycController action types.\n */\nexport type KycControllerMethodActions =\n | KycControllerInitializeAction\n | KycControllerLoadDisclaimersAction\n | KycControllerAcceptTermsAndStartSessionAction\n | KycControllerClearSavedTermsAction\n | KycControllerHandleFrameMessageAction\n | KycControllerBuildCheckFrameUrlAction\n | KycControllerBuildAuthFrameUrlAction\n | KycControllerBuildResetFrameUrlAction\n | KycControllerCheckKycRequiredAction\n | KycControllerGetKycStatusAction\n | KycControllerStartSumSubAction\n | KycControllerResetAction;\n"]}
|