@adyen/kyc-components 3.46.2 → 3.46.3
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/es/adyen-kyc-components.es.js +28 -5
- package/dist/types/components/Dropins/types.d.ts +1 -2
- package/dist/types/core/hooks/useComponentApi.d.ts +1 -0
- package/dist/types/core/models/api/openid-initiate.d.ts +3 -0
- package/dist/types/core/services/componentApi/open-singpass-authorization-link.d.ts +3 -0
- package/package.json +1 -1
|
@@ -42127,6 +42127,26 @@ const verifyTin = async (context, data) => {
|
|
|
42127
42127
|
data
|
|
42128
42128
|
);
|
|
42129
42129
|
};
|
|
42130
|
+
async function convertToSingpassLinkResponse(openIdInitiateResponse) {
|
|
42131
|
+
const response = await Promise.resolve(openIdInitiateResponse);
|
|
42132
|
+
const item = { authUrl: response.authUrl, success: true };
|
|
42133
|
+
return { item };
|
|
42134
|
+
}
|
|
42135
|
+
const openSingpassAuthorizationLink = async (context) => {
|
|
42136
|
+
const { loadingContext, legalEntityId } = context;
|
|
42137
|
+
return convertToSingpassLinkResponse(
|
|
42138
|
+
httpPost({
|
|
42139
|
+
loadingContext,
|
|
42140
|
+
errorLevel: "warn",
|
|
42141
|
+
errorMessage: `Failed to initiate`,
|
|
42142
|
+
path: `${legalEntityId}/openid/initiate`,
|
|
42143
|
+
authentication: "jwt",
|
|
42144
|
+
headers: {
|
|
42145
|
+
"Content-Type": "application/json"
|
|
42146
|
+
}
|
|
42147
|
+
})
|
|
42148
|
+
);
|
|
42149
|
+
};
|
|
42130
42150
|
const COMPONENTS_API_VERSION = "v1";
|
|
42131
42151
|
const makeComponentApi = (rootLegalEntityId, base) => {
|
|
42132
42152
|
const loadingContext = `${base}api/${COMPONENTS_API_VERSION}/`;
|
|
@@ -42189,7 +42209,8 @@ const makeComponentApi = (rootLegalEntityId, base) => {
|
|
|
42189
42209
|
getCompanyDataset: async (request) => getCompanyDataset(baseRequestContext, request),
|
|
42190
42210
|
refreshCompanyDataset: async (request) => refreshCompanyDataset(baseRequestContext, request),
|
|
42191
42211
|
clearCompanyData: async () => clearCompanyData(baseRequestContext),
|
|
42192
|
-
verifyTin: async (request) => verifyTin(baseRequestContext, request)
|
|
42212
|
+
verifyTin: async (request) => verifyTin(baseRequestContext, request),
|
|
42213
|
+
openSingpassAuthorizationLink: async () => openSingpassAuthorizationLink(baseRequestContext)
|
|
42193
42214
|
};
|
|
42194
42215
|
};
|
|
42195
42216
|
const useComponentApi = (rootLegalEntityId) => {
|
|
@@ -43139,7 +43160,8 @@ function OnboardingDropinComponent({
|
|
|
43139
43160
|
getCompanyDataset: getCompanyDataset2,
|
|
43140
43161
|
refreshCompanyDataset: refreshCompanyDataset2,
|
|
43141
43162
|
clearCompanyData: clearCompanyData2,
|
|
43142
|
-
verifyTin: verifyTin2
|
|
43163
|
+
verifyTin: verifyTin2,
|
|
43164
|
+
openSingpassAuthorizationLink: openSingpassAuthorizationLink2
|
|
43143
43165
|
} = useComponentApi(legalEntityId);
|
|
43144
43166
|
const [legalEntity, setLegalEntity] = useState();
|
|
43145
43167
|
const [loadingStatus, setLoadingStatus] = useState("loading");
|
|
@@ -43204,7 +43226,8 @@ function OnboardingDropinComponent({
|
|
|
43204
43226
|
handleGetCompanyDataset: getCompanyDataset2,
|
|
43205
43227
|
handleRefreshCompanyDataset: refreshCompanyDataset2,
|
|
43206
43228
|
handleClearCompanyData: clearCompanyData2,
|
|
43207
|
-
handleVerifyTin: verifyTin2
|
|
43229
|
+
handleVerifyTin: verifyTin2,
|
|
43230
|
+
handleOpenSingpassAuthorizationLink: openSingpassAuthorizationLink2
|
|
43208
43231
|
}
|
|
43209
43232
|
);
|
|
43210
43233
|
}
|
|
@@ -45804,7 +45827,7 @@ const ConfigurationApiProvider = ({
|
|
|
45804
45827
|
}) => {
|
|
45805
45828
|
const authContext = useAuthContext();
|
|
45806
45829
|
const { isEmbeddedDropin, loadingContext } = authContext;
|
|
45807
|
-
const sdkVersion = "3.46.
|
|
45830
|
+
const sdkVersion = "3.46.3";
|
|
45808
45831
|
const rootLegalEntityId = useGlobalStore((store) => store.rootLegalEntity.id);
|
|
45809
45832
|
useAnalytics({
|
|
45810
45833
|
onUserEvent,
|
|
@@ -46689,7 +46712,7 @@ const DebugModal = ({ onExit }) => {
|
|
|
46689
46712
|
const [tab, setTab] = useState("metadata");
|
|
46690
46713
|
const rootLegalEntity = useGlobalStore((store) => store.rootLegalEntity);
|
|
46691
46714
|
const metadata = {
|
|
46692
|
-
sdkVersion: "3.46.
|
|
46715
|
+
sdkVersion: "3.46.3",
|
|
46693
46716
|
locale: i18n.locale,
|
|
46694
46717
|
rootLegalEntityId: rootLegalEntity.id
|
|
46695
46718
|
};
|
|
@@ -16,7 +16,7 @@ import type { BaseTrackingPayload } from '../../core/utils';
|
|
|
16
16
|
import type { Language } from '../../language/Language';
|
|
17
17
|
import type { TranslationKey } from '../../language/types';
|
|
18
18
|
import type { TaskTypes } from '../../stores/globalStore/taskTypes';
|
|
19
|
-
interface SingpassLinkResponseItem {
|
|
19
|
+
export interface SingpassLinkResponseItem {
|
|
20
20
|
authUrl: string;
|
|
21
21
|
success: boolean;
|
|
22
22
|
}
|
|
@@ -87,4 +87,3 @@ export interface DropinProps {
|
|
|
87
87
|
taskType?: TaskTypes;
|
|
88
88
|
taskName?: TranslationKey;
|
|
89
89
|
}
|
|
90
|
-
export {};
|
|
@@ -45,6 +45,7 @@ export type ComponentApi = {
|
|
|
45
45
|
refreshCompanyDataset: Required<DropinAPIHandlers>['handleRefreshCompanyDataset'];
|
|
46
46
|
clearCompanyData: Required<DropinAPIHandlers>['handleClearCompanyData'];
|
|
47
47
|
verifyTin: Required<DropinAPIHandlers>['handleVerifyTin'];
|
|
48
|
+
openSingpassAuthorizationLink: Required<DropinAPIHandlers>['handleOpenSingpassAuthorizationLink'];
|
|
48
49
|
};
|
|
49
50
|
export declare const COMPONENTS_API_VERSION = "v1";
|
|
50
51
|
export declare const makeComponentApi: (rootLegalEntityId: string, base: string) => ComponentApi;
|