@paypay/mini-app-js-sdk 2.65.0 → 2.70.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/client/clientUtils.d.ts +1 -0
- package/dist/client/communicationWithCore.d.ts +2 -0
- package/dist/client/functions/logPageNav.d.ts +2 -0
- package/dist/client/functions/logPerf.d.ts +2 -0
- package/dist/client/observeTtid.d.ts +2 -0
- package/dist/client/supportedFunctionsList.d.ts +2 -2
- package/dist/client/types.d.ts +3 -1
- package/dist/composition-api/useKycPassport.d.ts +1 -2
- package/dist/constants/permissionName.d.ts +1 -1
- package/dist/constants/sdkFunctionNames.d.ts +1 -1
- package/dist/core/clientState.d.ts +1 -0
- package/dist/core/coreFunctions/index.d.ts +4 -0
- package/dist/core/coreFunctions/logEvent.d.ts +1 -1
- package/dist/core/coreFunctions/logPageNav.d.ts +6 -0
- package/dist/core/coreFunctions/logPerf.d.ts +6 -0
- package/dist/core/sentry.d.ts +8 -1
- package/dist/core/vueErrorHandler.d.ts +6 -0
- package/dist/mini-app-api.d.ts +3 -2
- package/dist/mini-app-js-sdk.browser.js +1 -1
- package/dist/mini-app-js-sdk.es.js +226 -47
- package/dist/model/bridge/openAuthSession.d.ts +2 -0
- package/dist/resources/images.d.ts +3 -0
- package/dist/resources/locales/payment/index.d.ts +10 -0
- package/dist/resources/locales/payment/ja.d.ts +5 -0
- package/dist/resources/locales/topup/index.d.ts +8 -0
- package/dist/resources/locales/topup/ja.d.ts +4 -0
- package/dist/types/getKycInformation.d.ts +1 -0
- package/dist/types/init.d.ts +5 -0
- package/dist/types/makePayment.d.ts +12 -0
- package/dist/types/openAuthSession.d.ts +4 -0
- package/dist/types.d.ts +0 -4
- package/dist/utils/analytics.d.ts +2 -2
- package/dist/utils/api.d.ts +4 -0
- package/dist/utils/helper.d.ts +5 -3
- package/dist/utils/minimumAppVersion.d.ts +1 -0
- package/dist/utils/openTelemetry/index.d.ts +4 -0
- package/dist/utils/openTelemetry/openTelemetry.d.ts +5 -0
- package/dist/utils/openTelemetry/types.d.ts +21 -0
- package/dist/utils/windowBridge.d.ts +1 -1
- package/dist/views/coupon/components/CouponAction/index.d.ts +4 -0
- package/dist/views/coupon/index.d.ts +4 -0
- package/dist/views/make-payment/store.d.ts +197 -0
- package/dist/views/make-payment/utils/paymentMethod.d.ts +1 -0
- package/package.json +8 -1
- package/dist/model/bridge/getCashbackInformation.d.ts +0 -2
|
@@ -6,18 +6,18 @@ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
8
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
-
var __spreadValues = (
|
|
10
|
-
for (var prop in
|
|
11
|
-
if (__hasOwnProp.call(
|
|
12
|
-
__defNormalProp(
|
|
9
|
+
var __spreadValues = (a2, b2) => {
|
|
10
|
+
for (var prop in b2 || (b2 = {}))
|
|
11
|
+
if (__hasOwnProp.call(b2, prop))
|
|
12
|
+
__defNormalProp(a2, prop, b2[prop]);
|
|
13
13
|
if (__getOwnPropSymbols)
|
|
14
|
-
for (var prop of __getOwnPropSymbols(
|
|
15
|
-
if (__propIsEnum.call(
|
|
16
|
-
__defNormalProp(
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b2)) {
|
|
15
|
+
if (__propIsEnum.call(b2, prop))
|
|
16
|
+
__defNormalProp(a2, prop, b2[prop]);
|
|
17
17
|
}
|
|
18
|
-
return
|
|
18
|
+
return a2;
|
|
19
19
|
};
|
|
20
|
-
var __spreadProps = (
|
|
20
|
+
var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
|
|
21
21
|
var __objRest = (source, exclude) => {
|
|
22
22
|
var target = {};
|
|
23
23
|
for (var prop in source)
|
|
@@ -30,20 +30,21 @@ var __objRest = (source, exclude) => {
|
|
|
30
30
|
}
|
|
31
31
|
return target;
|
|
32
32
|
};
|
|
33
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
33
34
|
var __async = (__this, __arguments, generator) => {
|
|
34
35
|
return new Promise((resolve, reject) => {
|
|
35
36
|
var fulfilled = (value) => {
|
|
36
37
|
try {
|
|
37
38
|
step(generator.next(value));
|
|
38
|
-
} catch (
|
|
39
|
-
reject(
|
|
39
|
+
} catch (e2) {
|
|
40
|
+
reject(e2);
|
|
40
41
|
}
|
|
41
42
|
};
|
|
42
43
|
var rejected = (value) => {
|
|
43
44
|
try {
|
|
44
45
|
step(generator.throw(value));
|
|
45
|
-
} catch (
|
|
46
|
-
reject(
|
|
46
|
+
} catch (e2) {
|
|
47
|
+
reject(e2);
|
|
47
48
|
}
|
|
48
49
|
};
|
|
49
50
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
@@ -52,8 +53,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
52
53
|
};
|
|
53
54
|
/*! js-cookie v3.0.5 | MIT */
|
|
54
55
|
function assign(target) {
|
|
55
|
-
for (var
|
|
56
|
-
var source = arguments[
|
|
56
|
+
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
57
|
+
var source = arguments[i2];
|
|
57
58
|
for (var key in source) {
|
|
58
59
|
target[key] = source[key];
|
|
59
60
|
}
|
|
@@ -106,8 +107,8 @@ function init$2(converter, defaultAttributes) {
|
|
|
106
107
|
}
|
|
107
108
|
var cookies = document.cookie ? document.cookie.split("; ") : [];
|
|
108
109
|
var jar = {};
|
|
109
|
-
for (var
|
|
110
|
-
var parts = cookies[
|
|
110
|
+
for (var i2 = 0; i2 < cookies.length; i2++) {
|
|
111
|
+
var parts = cookies[i2].split("=");
|
|
111
112
|
var value = parts.slice(1).join("=");
|
|
112
113
|
try {
|
|
113
114
|
var found = decodeURIComponent(parts[0]);
|
|
@@ -115,7 +116,7 @@ function init$2(converter, defaultAttributes) {
|
|
|
115
116
|
if (name === found) {
|
|
116
117
|
break;
|
|
117
118
|
}
|
|
118
|
-
} catch (
|
|
119
|
+
} catch (e2) {
|
|
119
120
|
}
|
|
120
121
|
}
|
|
121
122
|
return name ? jar[name] : jar;
|
|
@@ -151,6 +152,7 @@ const jsBridgeNamespace = "_PayPayJsBridge";
|
|
|
151
152
|
const miniAppSupportedFunctions = [
|
|
152
153
|
"init",
|
|
153
154
|
"openWebview",
|
|
155
|
+
"openAuthSession",
|
|
154
156
|
"openMap",
|
|
155
157
|
"closeApp",
|
|
156
158
|
"makePayment",
|
|
@@ -203,7 +205,9 @@ const miniAppSupportedFunctions = [
|
|
|
203
205
|
"getPayPayCardInfo",
|
|
204
206
|
"getExternalLinkageInformation",
|
|
205
207
|
"markAsReady",
|
|
206
|
-
"renderCoupons"
|
|
208
|
+
"renderCoupons",
|
|
209
|
+
"logPageNav",
|
|
210
|
+
"logPerf"
|
|
207
211
|
];
|
|
208
212
|
const smartPaymentSupportedFunctions = [
|
|
209
213
|
"init",
|
|
@@ -216,13 +220,12 @@ const smartPaymentSupportedFunctions = [
|
|
|
216
220
|
"getBalance",
|
|
217
221
|
"getUserAddress",
|
|
218
222
|
"getUAID",
|
|
219
|
-
"getCashbackInformation",
|
|
220
223
|
"renderCoupons",
|
|
221
224
|
"getLoginUrl",
|
|
222
225
|
"renderButton"
|
|
223
226
|
];
|
|
224
|
-
const JS_SDK_VERSION = "2.
|
|
225
|
-
const REVISION = "
|
|
227
|
+
const JS_SDK_VERSION = "2.70.0";
|
|
228
|
+
const REVISION = "5fda1d5";
|
|
226
229
|
const coreBaseUrl = new URL("https://mini-app-sdk-core.paypay.ne.jp/");
|
|
227
230
|
const CORE_IFRAME_ORIGIN = coreBaseUrl.origin;
|
|
228
231
|
const CORE_IFRAME_URL = new URL(
|
|
@@ -372,7 +375,7 @@ function isFunction(val) {
|
|
|
372
375
|
function getRandomString(length = 6) {
|
|
373
376
|
const randomValues = new Uint8Array(length);
|
|
374
377
|
crypto.getRandomValues(randomValues);
|
|
375
|
-
return Array.from(randomValues, (
|
|
378
|
+
return Array.from(randomValues, (n2) => (n2 % 36).toString(36)).join("");
|
|
376
379
|
}
|
|
377
380
|
function middlewareHandler(middlewares, message, messageHandler, params) {
|
|
378
381
|
let index = -1;
|
|
@@ -469,6 +472,7 @@ class WindowBridge {
|
|
|
469
472
|
`Function '${functionName}' does not exists on the target window`,
|
|
470
473
|
functionNotFound
|
|
471
474
|
);
|
|
475
|
+
return;
|
|
472
476
|
}
|
|
473
477
|
const params = deepClone(receivedMessageEvent.data.params);
|
|
474
478
|
if (hasCallbacks(params)) {
|
|
@@ -501,7 +505,12 @@ class WindowBridge {
|
|
|
501
505
|
} else {
|
|
502
506
|
console.error(error);
|
|
503
507
|
}
|
|
504
|
-
this.sendErrorResponse(
|
|
508
|
+
this.sendErrorResponse(
|
|
509
|
+
receivedMessageEvent,
|
|
510
|
+
message,
|
|
511
|
+
errorCode,
|
|
512
|
+
error instanceof PPError ? void 0 : error
|
|
513
|
+
);
|
|
505
514
|
}
|
|
506
515
|
});
|
|
507
516
|
}
|
|
@@ -538,12 +547,13 @@ class WindowBridge {
|
|
|
538
547
|
}
|
|
539
548
|
callback(...args);
|
|
540
549
|
}
|
|
541
|
-
sendErrorResponse(receivedMessageEvent, message, errorCode) {
|
|
550
|
+
sendErrorResponse(receivedMessageEvent, message, errorCode, originalError) {
|
|
542
551
|
if (this.errorLogger) {
|
|
543
552
|
this.errorLogger(
|
|
544
553
|
receivedMessageEvent.data.functionName,
|
|
545
554
|
message,
|
|
546
|
-
errorCode
|
|
555
|
+
errorCode,
|
|
556
|
+
originalError
|
|
547
557
|
);
|
|
548
558
|
}
|
|
549
559
|
this.sendResponse(receivedMessageEvent, {
|
|
@@ -838,13 +848,13 @@ function postMessageToCore(messageData) {
|
|
|
838
848
|
}
|
|
839
849
|
function triggerPostMessageToCore(type, params, postMessageParams) {
|
|
840
850
|
const messageId = getRandomString();
|
|
841
|
-
const fnMessageHandler = (
|
|
842
|
-
if (!checkIFrameOrigin(
|
|
851
|
+
const fnMessageHandler = (e2) => {
|
|
852
|
+
if (!checkIFrameOrigin(e2.origin)) {
|
|
843
853
|
return;
|
|
844
854
|
}
|
|
845
|
-
if (
|
|
846
|
-
if (
|
|
847
|
-
receiveMessageFromIframe(
|
|
855
|
+
if (e2.data.name === type) {
|
|
856
|
+
if (e2.data.messageId === messageId) {
|
|
857
|
+
receiveMessageFromIframe(e2.data, params, fnMessageHandler);
|
|
848
858
|
}
|
|
849
859
|
}
|
|
850
860
|
};
|
|
@@ -966,6 +976,143 @@ function callbackToPromise(target, functionName) {
|
|
|
966
976
|
return promise;
|
|
967
977
|
};
|
|
968
978
|
}
|
|
979
|
+
function getPageLoadStartTime() {
|
|
980
|
+
var _a;
|
|
981
|
+
if (performance.timeOrigin) {
|
|
982
|
+
return performance.timeOrigin;
|
|
983
|
+
}
|
|
984
|
+
if ((_a = performance.timing) == null ? void 0 : _a.navigationStart) {
|
|
985
|
+
return performance.timing.navigationStart;
|
|
986
|
+
}
|
|
987
|
+
return Date.now() - performance.now();
|
|
988
|
+
}
|
|
989
|
+
let t = -1;
|
|
990
|
+
const n = () => t, e = (n2) => {
|
|
991
|
+
addEventListener("pageshow", (e2) => {
|
|
992
|
+
e2.persisted && (t = e2.timeStamp, n2(e2));
|
|
993
|
+
}, true);
|
|
994
|
+
}, i = (t2, n2, e2, i2) => {
|
|
995
|
+
let o2, s2;
|
|
996
|
+
return (a2) => {
|
|
997
|
+
n2.value >= 0 && (a2 || i2) && (s2 = n2.value - (o2 != null ? o2 : 0), (s2 || void 0 === o2) && (o2 = n2.value, n2.delta = s2, n2.rating = ((t3, n3) => t3 > n3[1] ? "poor" : t3 > n3[0] ? "needs-improvement" : "good")(n2.value, e2), t2(n2)));
|
|
998
|
+
};
|
|
999
|
+
}, o = (t2) => {
|
|
1000
|
+
requestAnimationFrame(() => requestAnimationFrame(t2));
|
|
1001
|
+
}, s = () => {
|
|
1002
|
+
const t2 = performance.getEntriesByType("navigation")[0];
|
|
1003
|
+
if (t2 && t2.responseStart > 0 && t2.responseStart < performance.now()) return t2;
|
|
1004
|
+
}, a = () => {
|
|
1005
|
+
var _a, _b;
|
|
1006
|
+
return (_b = (_a = s()) == null ? void 0 : _a.activationStart) != null ? _b : 0;
|
|
1007
|
+
};
|
|
1008
|
+
let r = -1;
|
|
1009
|
+
const c = /* @__PURE__ */ new Set(), f = () => "hidden" !== document.visibilityState || document.prerendering ? 1 / 0 : 0, d = (t2) => {
|
|
1010
|
+
if ("hidden" === document.visibilityState) {
|
|
1011
|
+
if ("visibilitychange" === t2.type) for (const t3 of c) t3();
|
|
1012
|
+
isFinite(r) || (r = "visibilitychange" === t2.type ? t2.timeStamp : 0, removeEventListener("prerenderingchange", d, true));
|
|
1013
|
+
}
|
|
1014
|
+
}, h = (t2 = false) => {
|
|
1015
|
+
var _a;
|
|
1016
|
+
if (t2 && (r = 1 / 0), r < 0) {
|
|
1017
|
+
const t3 = a(), n2 = document.prerendering ? void 0 : (_a = globalThis.performance.getEntriesByType("visibility-state").find((n3) => "hidden" === n3.name && n3.startTime >= t3)) == null ? void 0 : _a.startTime;
|
|
1018
|
+
r = n2 != null ? n2 : f(), addEventListener("visibilitychange", d, true), addEventListener("prerenderingchange", d, true), e(() => {
|
|
1019
|
+
setTimeout(() => {
|
|
1020
|
+
r = f();
|
|
1021
|
+
});
|
|
1022
|
+
});
|
|
1023
|
+
}
|
|
1024
|
+
return { get firstHiddenTime() {
|
|
1025
|
+
return r;
|
|
1026
|
+
}, onHidden(t3) {
|
|
1027
|
+
c.add(t3);
|
|
1028
|
+
} };
|
|
1029
|
+
}, l = (t2, e2 = -1, i2, o2 = 0, r2, c2, f2) => {
|
|
1030
|
+
const d2 = s(), h2 = (d2 == null ? void 0 : d2.navigationId) || 0;
|
|
1031
|
+
let l2 = "navigate";
|
|
1032
|
+
i2 ? l2 = i2 : n() >= 0 ? l2 = "back-forward-cache" : d2 && (document.prerendering || a() > 0 ? l2 = "prerender" : document.wasDiscarded ? l2 = "restore" : d2.type && (l2 = d2.type.replace(/_/g, "-")));
|
|
1033
|
+
return { name: t2, value: e2, rating: "good", delta: 0, entries: [], id: `v6-${Date.now()}-${Math.floor(8999999999999 * Math.random()) + 1e12}`, navigationType: l2, navigationId: o2 || h2, navigationInteractionId: r2, navigationURL: c2 || (d2 == null ? void 0 : d2.name), navigationStartTime: f2 || 0 };
|
|
1034
|
+
}, g = /* @__PURE__ */ new WeakMap();
|
|
1035
|
+
function u(t2, n2) {
|
|
1036
|
+
let e2 = g.get(n2);
|
|
1037
|
+
return e2 || (e2 = /* @__PURE__ */ new WeakMap(), g.set(n2, e2)), e2.get(t2) || e2.set(t2, new n2()), e2.get(t2);
|
|
1038
|
+
}
|
|
1039
|
+
const m = (t2, n2, e2 = {}) => {
|
|
1040
|
+
try {
|
|
1041
|
+
const i2 = t2.filter((t3) => PerformanceObserver.supportedEntryTypes.includes(t3));
|
|
1042
|
+
if (i2.length > 0) {
|
|
1043
|
+
const t3 = new PerformanceObserver((t4) => {
|
|
1044
|
+
queueMicrotask(() => {
|
|
1045
|
+
const e3 = t4.getEntries();
|
|
1046
|
+
i2.length > 1 && e3.sort((t5, n3) => t5.startTime + t5.duration - (n3.startTime + n3.duration)), n2(e3);
|
|
1047
|
+
});
|
|
1048
|
+
});
|
|
1049
|
+
for (const n3 of i2) t3.observe(__spreadValues({ type: n3, buffered: true }, e2));
|
|
1050
|
+
return t3;
|
|
1051
|
+
}
|
|
1052
|
+
} catch (e3) {
|
|
1053
|
+
}
|
|
1054
|
+
}, p = (t2) => {
|
|
1055
|
+
var _a, _b, _c;
|
|
1056
|
+
return ((_a = globalThis.PerformanceObserver) == null ? void 0 : _a.supportedEntryTypes.includes("soft-navigation")) && "function" == typeof ((_c = (_b = globalThis.PerformanceSoftNavigation) == null ? void 0 : _b.prototype) == null ? void 0 : _c.getLargestInteractionContentfulPaint) && t2 && t2.reportSoftNavs;
|
|
1057
|
+
}, b = (t2, n2) => {
|
|
1058
|
+
if (t2.set(n2.navigationId, n2), t2.size > 2) {
|
|
1059
|
+
const n3 = t2.keys().next().value;
|
|
1060
|
+
void 0 !== n3 && t2.delete(n3);
|
|
1061
|
+
}
|
|
1062
|
+
};
|
|
1063
|
+
class y {
|
|
1064
|
+
constructor() {
|
|
1065
|
+
__publicField(this, "l");
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
const E = (t2) => {
|
|
1069
|
+
document.prerendering ? addEventListener("prerenderingchange", t2, true) : t2();
|
|
1070
|
+
}, M = [1800, 3e3], _ = (t2, s2 = {}) => {
|
|
1071
|
+
const r2 = p(s2);
|
|
1072
|
+
E(() => {
|
|
1073
|
+
const c2 = u(s2, y), f2 = h();
|
|
1074
|
+
let d2, g2 = l("FCP");
|
|
1075
|
+
const v = m(["paint"], (t3) => {
|
|
1076
|
+
for (const n2 of t3) "first-contentful-paint" === n2.name && (v.disconnect(), n2.startTime < f2.firstHiddenTime && (g2.value = Math.max(n2.startTime - a(), 0), g2.entries.push(n2), g2.navigationId = n2.navigationId || g2.navigationId, d2(true)));
|
|
1077
|
+
});
|
|
1078
|
+
if (v && (d2 = i(t2, g2, M, s2.reportAllChanges), e((e2) => {
|
|
1079
|
+
g2 = l("FCP", -1, "back-forward-cache", g2.navigationId, g2.navigationInteractionId, g2.navigationURL, n()), d2 = i(t2, g2, M, s2.reportAllChanges), o(() => {
|
|
1080
|
+
g2.value = performance.now() - e2.timeStamp, d2(true);
|
|
1081
|
+
});
|
|
1082
|
+
})), r2) {
|
|
1083
|
+
m(["soft-navigation"], (n2) => {
|
|
1084
|
+
n2.forEach((n3) => {
|
|
1085
|
+
c2.l && n3.navigationId && b(c2.l, n3);
|
|
1086
|
+
const e2 = Math.max((n3.presentationTime || n3.paintTime || 0) - n3.startTime, 0);
|
|
1087
|
+
g2 = l("FCP", e2, "soft-navigation", n3.navigationId, n3.interactionId, n3.name, n3.startTime), d2 = i(t2, g2, M, s2.reportAllChanges), d2(true);
|
|
1088
|
+
});
|
|
1089
|
+
}, s2);
|
|
1090
|
+
}
|
|
1091
|
+
});
|
|
1092
|
+
};
|
|
1093
|
+
let observing = false;
|
|
1094
|
+
let stopObserving = false;
|
|
1095
|
+
function stopObservingTtid() {
|
|
1096
|
+
stopObserving = true;
|
|
1097
|
+
}
|
|
1098
|
+
function observeTtid() {
|
|
1099
|
+
if (observing) {
|
|
1100
|
+
return;
|
|
1101
|
+
}
|
|
1102
|
+
observing = true;
|
|
1103
|
+
const pageLoadStartTime = getPageLoadStartTime();
|
|
1104
|
+
_((metric) => {
|
|
1105
|
+
if (stopObserving) {
|
|
1106
|
+
return;
|
|
1107
|
+
}
|
|
1108
|
+
stopObserving = true;
|
|
1109
|
+
void coreFunctions.logPerf({
|
|
1110
|
+
type: "TTID",
|
|
1111
|
+
startTime: pageLoadStartTime,
|
|
1112
|
+
endTime: pageLoadStartTime + metric.value
|
|
1113
|
+
});
|
|
1114
|
+
});
|
|
1115
|
+
}
|
|
969
1116
|
let clientSdkType;
|
|
970
1117
|
let initDonePromise;
|
|
971
1118
|
void getCoreIframe();
|
|
@@ -973,39 +1120,39 @@ function clearInternalInitSyncState() {
|
|
|
973
1120
|
initDonePromise = Promise.resolve(false);
|
|
974
1121
|
}
|
|
975
1122
|
clearInternalInitSyncState();
|
|
976
|
-
const commonMessageHandler = (
|
|
1123
|
+
const commonMessageHandler = (e2) => {
|
|
977
1124
|
var _a;
|
|
978
|
-
if ((_a =
|
|
1125
|
+
if ((_a = e2.data) == null ? void 0 : _a.forWindowBridge) {
|
|
979
1126
|
return;
|
|
980
1127
|
}
|
|
981
|
-
if (!checkIFrameOrigin(
|
|
1128
|
+
if (!checkIFrameOrigin(e2.origin)) {
|
|
982
1129
|
return;
|
|
983
1130
|
}
|
|
984
|
-
if (
|
|
1131
|
+
if (e2.data.name === reload) {
|
|
985
1132
|
window.location.reload();
|
|
986
1133
|
}
|
|
987
|
-
if (
|
|
1134
|
+
if (e2.data.name === makeVisible) {
|
|
988
1135
|
showCoreIframe(true);
|
|
989
1136
|
return;
|
|
990
1137
|
}
|
|
991
|
-
if (
|
|
1138
|
+
if (e2.data.name === showIframe) {
|
|
992
1139
|
showCoreIframe(true);
|
|
993
1140
|
return;
|
|
994
1141
|
}
|
|
995
|
-
if (
|
|
1142
|
+
if (e2.data.name === hideIframe) {
|
|
996
1143
|
showCoreIframe(false);
|
|
997
1144
|
return;
|
|
998
1145
|
}
|
|
999
|
-
if (
|
|
1000
|
-
const linkOption =
|
|
1146
|
+
if (e2.data.name === link) {
|
|
1147
|
+
const linkOption = e2.data.data;
|
|
1001
1148
|
if (linkOption.target === "_blank") {
|
|
1002
1149
|
window.open(linkOption.url, "_blank");
|
|
1003
1150
|
} else {
|
|
1004
1151
|
window.location.href = linkOption.url;
|
|
1005
1152
|
}
|
|
1006
1153
|
}
|
|
1007
|
-
if (
|
|
1008
|
-
const { params } =
|
|
1154
|
+
if (e2.data.name === consoleDebugInfo$1) {
|
|
1155
|
+
const { params } = e2.data.data;
|
|
1009
1156
|
consoleDebugInfo(params);
|
|
1010
1157
|
}
|
|
1011
1158
|
};
|
|
@@ -1021,12 +1168,13 @@ addEventListener("popstate", () => {
|
|
|
1021
1168
|
});
|
|
1022
1169
|
function init(params) {
|
|
1023
1170
|
const refreshToken2 = getRefreshToken(params.clientId, params.useLocalStorage);
|
|
1024
|
-
const clientVersion = "2.
|
|
1171
|
+
const clientVersion = "2.70.0";
|
|
1025
1172
|
const initParams = __spreadProps(__spreadValues({}, params), {
|
|
1026
1173
|
refreshToken: refreshToken2,
|
|
1027
1174
|
clientVersion,
|
|
1028
1175
|
clientSdkType,
|
|
1029
|
-
clientUrl: window.location.href
|
|
1176
|
+
clientUrl: window.location.href,
|
|
1177
|
+
clientPageLoadStartTime: getPageLoadStartTime()
|
|
1030
1178
|
});
|
|
1031
1179
|
if (params.disableBackgroundScrollLock != null) {
|
|
1032
1180
|
setDisableBackgroundScrollLock(!!params.disableBackgroundScrollLock);
|
|
@@ -1039,6 +1187,9 @@ function init(params) {
|
|
|
1039
1187
|
var _a;
|
|
1040
1188
|
initDonePromiseResolve(true);
|
|
1041
1189
|
(_a = params.complete) == null ? void 0 : _a.call(params);
|
|
1190
|
+
if (params.pageName) {
|
|
1191
|
+
observeTtid();
|
|
1192
|
+
}
|
|
1042
1193
|
};
|
|
1043
1194
|
initDonePromise.then(() => getCoreIframe()).then(() => {
|
|
1044
1195
|
triggerPostMessageToCore(
|
|
@@ -1098,8 +1249,8 @@ function executePendingFunctionCalls(client2) {
|
|
|
1098
1249
|
}
|
|
1099
1250
|
}
|
|
1100
1251
|
const clientProperties = {
|
|
1101
|
-
version: "2.
|
|
1102
|
-
revision: "
|
|
1252
|
+
version: "2.70.0",
|
|
1253
|
+
revision: "5fda1d5"
|
|
1103
1254
|
};
|
|
1104
1255
|
function isInitClientParams(params) {
|
|
1105
1256
|
return params.clientId !== void 0;
|
|
@@ -1214,6 +1365,32 @@ const logout = promiseToCallback("logout", () => __async(void 0, null, function*
|
|
|
1214
1365
|
yield coreFunctions.logout();
|
|
1215
1366
|
return { statusCode: MiniAppStatusType.loggedOut };
|
|
1216
1367
|
}));
|
|
1368
|
+
const logPageNav = promiseToCallback(
|
|
1369
|
+
"logPageNav",
|
|
1370
|
+
(_d) => {
|
|
1371
|
+
var _e = _d, {
|
|
1372
|
+
startTime,
|
|
1373
|
+
url
|
|
1374
|
+
} = _e, params = __objRest(_e, [
|
|
1375
|
+
"startTime",
|
|
1376
|
+
"url"
|
|
1377
|
+
]);
|
|
1378
|
+
stopObservingTtid();
|
|
1379
|
+
return coreFunctions.logPageNav(__spreadValues({
|
|
1380
|
+
startTime: startTime != null ? startTime : getPageLoadStartTime() + performance.now(),
|
|
1381
|
+
url: url != null ? url : window.location.href
|
|
1382
|
+
}, params));
|
|
1383
|
+
}
|
|
1384
|
+
);
|
|
1385
|
+
const logPerf = promiseToCallback(
|
|
1386
|
+
"logPerf",
|
|
1387
|
+
(_f) => {
|
|
1388
|
+
var _g = _f, { endTime } = _g, params = __objRest(_g, ["endTime"]);
|
|
1389
|
+
return coreFunctions.logPerf(__spreadValues({
|
|
1390
|
+
endTime: endTime != null ? endTime : getPageLoadStartTime() + performance.now()
|
|
1391
|
+
}, params));
|
|
1392
|
+
}
|
|
1393
|
+
);
|
|
1217
1394
|
const renderCoupons = promiseToCallback(
|
|
1218
1395
|
"renderCoupons",
|
|
1219
1396
|
(params) => __async(void 0, null, function* () {
|
|
@@ -1365,7 +1542,9 @@ const clientFunctions = {
|
|
|
1365
1542
|
getKycPassportInfo,
|
|
1366
1543
|
logout,
|
|
1367
1544
|
getPaymentSettings,
|
|
1368
|
-
markAsReady
|
|
1545
|
+
markAsReady,
|
|
1546
|
+
logPageNav,
|
|
1547
|
+
logPerf
|
|
1369
1548
|
};
|
|
1370
1549
|
const client = getClient({ sdkType: SdkType.MiniApp, clientFunctions });
|
|
1371
1550
|
const miniAppSdk = client;
|
|
@@ -51,6 +51,9 @@ export declare const img_mobileIcon: string;
|
|
|
51
51
|
export declare const img_exclaimIcon: string;
|
|
52
52
|
export declare const img_iconPpcdGold: string;
|
|
53
53
|
export declare const img_iconPpcd: string;
|
|
54
|
+
export declare const img_iconPpcdPink: string;
|
|
55
|
+
export declare const img_iconPpcdBlue: string;
|
|
56
|
+
export declare const img_iconPpcdLavender: string;
|
|
54
57
|
export declare const img_kyc: string;
|
|
55
58
|
export declare const img_ppCredit: string;
|
|
56
59
|
export declare const qr_kyc: string;
|
|
@@ -74,6 +74,11 @@ declare const _default: {
|
|
|
74
74
|
bodyAddTopup: string;
|
|
75
75
|
close: string;
|
|
76
76
|
};
|
|
77
|
+
bankSync: {
|
|
78
|
+
topupInfoBox: {
|
|
79
|
+
description: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
77
82
|
giftVoucher: {
|
|
78
83
|
applicableGVInfo: string;
|
|
79
84
|
pmpSettingInfoBox: {
|
|
@@ -334,6 +339,11 @@ declare const _default: {
|
|
|
334
339
|
bodyAddTopup: string;
|
|
335
340
|
close: string;
|
|
336
341
|
};
|
|
342
|
+
bankSync: {
|
|
343
|
+
topupInfoBox: {
|
|
344
|
+
description: string;
|
|
345
|
+
};
|
|
346
|
+
};
|
|
337
347
|
giftVoucher: {
|
|
338
348
|
applicableGVInfo: string;
|
|
339
349
|
pmpSettingInfoBox: {
|
|
@@ -53,6 +53,10 @@ declare const _default: {
|
|
|
53
53
|
overdraftAmount: {
|
|
54
54
|
excessUsage: string;
|
|
55
55
|
};
|
|
56
|
+
bankSync: {
|
|
57
|
+
title: string;
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
56
60
|
};
|
|
57
61
|
en: {
|
|
58
62
|
topup: {
|
|
@@ -108,6 +112,10 @@ declare const _default: {
|
|
|
108
112
|
overdraftAmount: {
|
|
109
113
|
excessUsage: string;
|
|
110
114
|
};
|
|
115
|
+
bankSync: {
|
|
116
|
+
title: string;
|
|
117
|
+
description: string;
|
|
118
|
+
};
|
|
111
119
|
};
|
|
112
120
|
};
|
|
113
121
|
export default _default;
|
|
@@ -28,6 +28,7 @@ export declare const KycStatus: {
|
|
|
28
28
|
readonly completed: "COMPLETED";
|
|
29
29
|
readonly notCompleted: "NOT_COMPLETED";
|
|
30
30
|
readonly kycValidationInProcess: "KYC_VALIDATION_IN_PROCESS";
|
|
31
|
+
readonly kycUpdateRequiredFraudDetected: "KYC_UPDATE_REQUIRED_FRAUD_DETECTED";
|
|
31
32
|
};
|
|
32
33
|
export declare type KycStatusType = (typeof KycStatus)[keyof typeof KycStatus];
|
|
33
34
|
export interface KycData {
|
package/dist/types/init.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export interface InitClientParams extends NativeParams<InitResult> {
|
|
|
7
7
|
debugMode?: boolean;
|
|
8
8
|
useLocalStorage?: boolean;
|
|
9
9
|
disableBackgroundScrollLock?: boolean;
|
|
10
|
+
pageName?: string;
|
|
11
|
+
otelEndpoint?: string;
|
|
10
12
|
}
|
|
11
13
|
export interface InitParams extends NativeParams<InitResult> {
|
|
12
14
|
clientId: string;
|
|
@@ -21,6 +23,9 @@ export interface InitParams extends NativeParams<InitResult> {
|
|
|
21
23
|
clientSdkType?: SdkType;
|
|
22
24
|
clientUrl?: string;
|
|
23
25
|
useLocalStorage?: boolean;
|
|
26
|
+
pageName?: string;
|
|
27
|
+
clientPageLoadStartTime?: number;
|
|
28
|
+
otelEndpoint?: string;
|
|
24
29
|
}
|
|
25
30
|
export declare const PPEnv: {
|
|
26
31
|
readonly staging: "staging";
|
|
@@ -155,6 +155,10 @@ export declare type WalletMethod = MethodBase & {
|
|
|
155
155
|
cashBackExpirableBalanceInfo?: Balance;
|
|
156
156
|
};
|
|
157
157
|
};
|
|
158
|
+
bankSyncMode?: {
|
|
159
|
+
enabled: boolean;
|
|
160
|
+
label: string;
|
|
161
|
+
};
|
|
158
162
|
};
|
|
159
163
|
declare type PointToggleInfo = {
|
|
160
164
|
cashBackUseStatus: 'USE' | 'SAVE' | 'INVEST' | null;
|
|
@@ -179,6 +183,13 @@ export declare enum PayPayCardType {
|
|
|
179
183
|
GOLD = "GOLD",
|
|
180
184
|
REGULAR = "REGULAR"
|
|
181
185
|
}
|
|
186
|
+
export declare enum PayPayCardFaceCode {
|
|
187
|
+
BLACK = "BLACK",
|
|
188
|
+
PINK = "PINK",
|
|
189
|
+
BLUE = "BLUE",
|
|
190
|
+
LAVENDER = "LAVENDER",
|
|
191
|
+
GOLD = "GOLD"
|
|
192
|
+
}
|
|
182
193
|
export declare type CreditCardInfo = {
|
|
183
194
|
brand?: CreditTypes;
|
|
184
195
|
isAuthenticated?: boolean;
|
|
@@ -256,6 +267,7 @@ export declare type PayLaterCCInfo = {
|
|
|
256
267
|
last4digits?: string;
|
|
257
268
|
linkedCardBrand?: Exclude<CreditTypes, CreditTypes.AMEX | CreditTypes.DINERS | CreditTypes.OTHER>;
|
|
258
269
|
linkedCardType?: PayPayCardType;
|
|
270
|
+
faceCode?: PayPayCardFaceCode;
|
|
259
271
|
availableAmount?: number;
|
|
260
272
|
paymentMethodStatus?: PaymentMethodStatus;
|
|
261
273
|
paymentMethodStatusLabel?: string;
|
package/dist/types.d.ts
CHANGED
|
@@ -53,10 +53,6 @@ export interface SetDataParams extends NativeParams<void> {
|
|
|
53
53
|
export interface GetDataParams extends NativeParams<MiniAppResult> {
|
|
54
54
|
key: string;
|
|
55
55
|
}
|
|
56
|
-
export interface GetCashbackInfoParams extends NativeParams<MiniAppResult> {
|
|
57
|
-
merchantPaymentId: string;
|
|
58
|
-
merchant?: string;
|
|
59
|
-
}
|
|
60
56
|
export interface RemoveDataParams extends NativeParams<void> {
|
|
61
57
|
key: string;
|
|
62
58
|
}
|
|
@@ -4,11 +4,11 @@ import { PPEnvType } from '../types/init';
|
|
|
4
4
|
interface EventParams {
|
|
5
5
|
env: PPEnvType;
|
|
6
6
|
event_category?: string;
|
|
7
|
-
event_label?:
|
|
7
|
+
event_label?: string | number;
|
|
8
8
|
screen_name: string;
|
|
9
9
|
event_action?: string;
|
|
10
10
|
error_value?: string;
|
|
11
|
-
event_label2?:
|
|
11
|
+
event_label2?: string | number;
|
|
12
12
|
merchant_id?: string;
|
|
13
13
|
order_type?: string;
|
|
14
14
|
user_agent?: string;
|
package/dist/utils/api.d.ts
CHANGED
|
@@ -66,6 +66,10 @@ export declare type BalanceInfo = {
|
|
|
66
66
|
amount: number;
|
|
67
67
|
currency: string;
|
|
68
68
|
};
|
|
69
|
+
bankSyncMode?: {
|
|
70
|
+
enabled: boolean;
|
|
71
|
+
label: string;
|
|
72
|
+
};
|
|
69
73
|
};
|
|
70
74
|
export declare function topup(queryParams: TopupQuery, body: TopupBody, paymentParams?: MakePaymentParams): Promise<PPFetchResult<TopupResponse>>;
|
|
71
75
|
export declare type BalanceParams = {
|
package/dist/utils/helper.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { UIComponentsErrorButton } from '../model/uiComponents';
|
|
|
3
3
|
import { ErrorSheetButton, PaymentLabelType, SmartPayParams } from '../types';
|
|
4
4
|
import { FontSize } from '../types/getPlatformInformation';
|
|
5
5
|
import { InitParams } from '../types/init';
|
|
6
|
-
import { BankInfo, CreditCardInfo, InfoBanner, MakePaymentParams, OrderType, PayLaterCCInfo, PaymentMethod, SbidBankInfo } from '../types/makePayment';
|
|
6
|
+
import { BankInfo, CreditCardInfo, InfoBanner, MakePaymentParams, OrderType, PayLaterCCInfo, PayPayCardFaceCode, PaymentMethod, SbidBankInfo } from '../types/makePayment';
|
|
7
7
|
import { PPFetchResult } from './fetch';
|
|
8
8
|
export declare function isDef<T>(val: T): val is NonNullable<T>;
|
|
9
9
|
export declare function isNumeric(val: string | number): val is string;
|
|
@@ -81,8 +81,10 @@ export declare function makeDefaultErrorHandler(params: {
|
|
|
81
81
|
fail?: (error: {
|
|
82
82
|
errorCode: ErrorCodesType;
|
|
83
83
|
}) => void;
|
|
84
|
-
} | undefined, onComplete: () => void): (err: unknown) => void;
|
|
84
|
+
} | undefined, onComplete: () => void, reportException?: (error: unknown) => void): (err: unknown) => void;
|
|
85
85
|
export declare function getCardBrandImage(brandName: string): string;
|
|
86
|
+
export declare const PAYPAY_CARD_FACE_IMAGE_MAP: Record<PayPayCardFaceCode, string>;
|
|
87
|
+
export declare function getPayPayCardFaceImage(payLaterCcInfo?: Pick<PayLaterCCInfo, 'faceCode' | 'linkedCardType'>): string | undefined;
|
|
86
88
|
export declare function hasMultiplePPCD(paymentMethods: PaymentMethod[] | undefined): boolean;
|
|
87
89
|
export declare function addAdditionalInfoForMultiplePPCD(paymentMethods: PaymentMethod[]): void;
|
|
88
90
|
declare type OrderInfo = SmartPayParams | MakePaymentParams;
|
|
@@ -96,5 +98,5 @@ export declare function getOverDraftInfoBanner(banners?: Array<InfoBanner>): Inf
|
|
|
96
98
|
export declare function isValidUrl(urlChallenge: string): boolean;
|
|
97
99
|
export declare function calculateTopMargin(navigationStyle: string, statusBarHeight: number, navBarHeight: number): number;
|
|
98
100
|
export declare function getWindowByName(frames: Window, windowName: string): Window | undefined;
|
|
99
|
-
export declare function isPaymentMethodDisabled(paymentMethod: PaymentMethod,
|
|
101
|
+
export declare function isPaymentMethodDisabled(paymentMethod: PaymentMethod, ignoreMaintenanceFlag?: boolean): boolean;
|
|
100
102
|
export {};
|