@paypay/mini-app-js-sdk 1.65.0 → 1.66.0
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/mini-app-js-sdk.browser.js +1 -1
- package/dist/mini-app-js-sdk.es.js +17 -12
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -50,8 +50,8 @@ function normalizeNativeResponseData(data2) {
|
|
|
50
50
|
}
|
|
51
51
|
class JsBridge {
|
|
52
52
|
constructor(global2) {
|
|
53
|
-
this.version = "1.
|
|
54
|
-
this.revision = "
|
|
53
|
+
this.version = "1.66.0";
|
|
54
|
+
this.revision = "f8f8cf0";
|
|
55
55
|
this.messageHandlers = /* @__PURE__ */ new Map();
|
|
56
56
|
this.responseCallbacks = /* @__PURE__ */ new Map();
|
|
57
57
|
this.global = global2;
|
|
@@ -2099,7 +2099,7 @@ const opaUrl = () => {
|
|
|
2099
2099
|
const createHeaderMiniAppApi = (urlEndpoint, customHeaders) => {
|
|
2100
2100
|
let headers = new Headers({
|
|
2101
2101
|
"Content-Type": "application/json",
|
|
2102
|
-
"Client-Version": "1.
|
|
2102
|
+
"Client-Version": "1.66.0",
|
|
2103
2103
|
"Client-OS-Type": getRuntime(),
|
|
2104
2104
|
...customHeaders
|
|
2105
2105
|
});
|
|
@@ -36636,7 +36636,7 @@ function debug(params) {
|
|
|
36636
36636
|
function execute$a(params) {
|
|
36637
36637
|
var _a2;
|
|
36638
36638
|
(_a2 = params == null ? void 0 : params.success) == null ? void 0 : _a2.call(params, {
|
|
36639
|
-
v: "1.
|
|
36639
|
+
v: "1.66.0"
|
|
36640
36640
|
});
|
|
36641
36641
|
}
|
|
36642
36642
|
function useCallBack(props, ctx) {
|
|
@@ -43926,7 +43926,7 @@ const initUpdateWarning = (params) => {
|
|
|
43926
43926
|
document.body.appendChild(container2);
|
|
43927
43927
|
};
|
|
43928
43928
|
async function initKycPassport(params) {
|
|
43929
|
-
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D;
|
|
43929
|
+
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F;
|
|
43930
43930
|
const success2 = params.success;
|
|
43931
43931
|
const fail = params.fail;
|
|
43932
43932
|
const complete = params.complete;
|
|
@@ -43980,7 +43980,12 @@ async function initKycPassport(params) {
|
|
|
43980
43980
|
} else {
|
|
43981
43981
|
const status2 = String((_p = (_o = (_n = res == null ? void 0 : res.body) == null ? void 0 : _n.unsigned) == null ? void 0 : _o.data) == null ? void 0 : _p.status);
|
|
43982
43982
|
if (status2 !== "COMPLETED") {
|
|
43983
|
-
|
|
43983
|
+
if (status2 === MiniAppErrorType.kycUpdateRequired && (params == null ? void 0 : params.isSkipKYCRequiredHalfsheet)) {
|
|
43984
|
+
(_q = params == null ? void 0 : params.fail) == null ? void 0 : _q.call(params, { errorCode: MiniAppErrorType.kycUpdateRequired });
|
|
43985
|
+
return (_r = params == null ? void 0 : params.complete) == null ? void 0 : _r.call(params);
|
|
43986
|
+
} else {
|
|
43987
|
+
return initKycPassportError(params, status2);
|
|
43988
|
+
}
|
|
43984
43989
|
}
|
|
43985
43990
|
let callbackUrl = new URL(params.callbackUrl);
|
|
43986
43991
|
callbackUrl.searchParams.set("ppFunction", "kycPassport");
|
|
@@ -43988,26 +43993,26 @@ async function initKycPassport(params) {
|
|
|
43988
43993
|
"ppEkycDocuments",
|
|
43989
43994
|
params.eKycDocuments ? params.eKycDocuments.join(",") : ""
|
|
43990
43995
|
);
|
|
43991
|
-
if (((
|
|
43996
|
+
if (((_u = (_t = (_s = res == null ? void 0 : res.body) == null ? void 0 : _s.unsigned) == null ? void 0 : _t.data) == null ? void 0 : _u.kycPassportMethod) === KycPassportMethod.biometric) {
|
|
43992
43997
|
try {
|
|
43993
43998
|
await startMultiFactorAuth({
|
|
43994
43999
|
type: KycPassportMethod.biometric,
|
|
43995
44000
|
...params,
|
|
43996
44001
|
callbackUrl: reconstructKycPassportCallbackUrl(
|
|
43997
44002
|
callbackUrl.href,
|
|
43998
|
-
(
|
|
44003
|
+
(_x = (_w = (_v = res == null ? void 0 : res.body) == null ? void 0 : _v.unsigned) == null ? void 0 : _w.data) == null ? void 0 : _x.kycPassportMethod
|
|
43999
44004
|
)
|
|
44000
44005
|
});
|
|
44001
44006
|
} catch (_) {
|
|
44002
|
-
(
|
|
44003
|
-
(
|
|
44007
|
+
(_y = params.fail) == null ? void 0 : _y.call(params, { errorCode: MiniAppErrorType.invalidUrl });
|
|
44008
|
+
(_z = params.complete) == null ? void 0 : _z.call(params);
|
|
44004
44009
|
}
|
|
44005
|
-
} else if (((
|
|
44010
|
+
} else if (((_C = (_B = (_A = res == null ? void 0 : res.body) == null ? void 0 : _A.unsigned) == null ? void 0 : _B.data) == null ? void 0 : _C.kycPassportMethod) === KycPassportMethod.otp) {
|
|
44006
44011
|
initSmsAuth({
|
|
44007
44012
|
...params,
|
|
44008
44013
|
callbackUrl: reconstructKycPassportCallbackUrl(
|
|
44009
44014
|
callbackUrl.href,
|
|
44010
|
-
(
|
|
44015
|
+
(_F = (_E = (_D = res == null ? void 0 : res.body) == null ? void 0 : _D.unsigned) == null ? void 0 : _E.data) == null ? void 0 : _F.kycPassportMethod
|
|
44011
44016
|
)
|
|
44012
44017
|
});
|
|
44013
44018
|
}
|
package/dist/types.d.ts
CHANGED
|
@@ -266,6 +266,7 @@ export interface RegisterKycParams extends NativeParams<unknown> {
|
|
|
266
266
|
export interface InitKycPassportParams extends NativeParams<unknown> {
|
|
267
267
|
eKycDocuments?: Array<string>;
|
|
268
268
|
callbackUrl: string;
|
|
269
|
+
isSkipKYCRequiredHalfsheet?: boolean;
|
|
269
270
|
}
|
|
270
271
|
export interface StartMultiFactorAuthParams extends NativeParams<MiniAppResult> {
|
|
271
272
|
type: string;
|