@paypay/mini-app-js-sdk 1.28.0 → 1.29.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.
@@ -65,8 +65,8 @@ function normalizeNativeResponseData(data2) {
65
65
  }
66
66
  class JsBridge {
67
67
  constructor(global2) {
68
- this.version = "1.28.0";
69
- this.revision = "8e77fc7";
68
+ this.version = "1.29.0";
69
+ this.revision = "c280ce6";
70
70
  this.messageHandlers = new Map();
71
71
  this.responseCallbacks = new Map();
72
72
  this.global = global2;
@@ -959,7 +959,7 @@ const birthdayConfirm$1 = {
959
959
  const birthdayConfirmError$1 = {
960
960
  title: "\u3053\u306E\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u3067\u5F53\u9078\u3057\u305F",
961
961
  title2: "PayPay\u6B8B\u9AD8\u306F\u7372\u5F97\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002",
962
- desc: "\u8868\u793A\u3055\u308C\u3066\u3044\u308B\u7372\u5F97\u30DC\u30FC\u30CA\u30B9\u984D\u306F\u3001",
962
+ desc: "\u8868\u793A\u3055\u308C\u3066\u3044\u308B\u7372\u5F97\u30DD\u30A4\u30F3\u30C8\u984D\u306F\u3001",
963
963
  desc2: "\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u898F\u7D04\u306B\u57FA\u3065\u304D\u5F8C\u65E5\u53D6\u308A\u6D88\u3057\u307E\u3059",
964
964
  helpBtn: "\u30D8\u30EB\u30D7\u30DA\u30FC\u30B8\u3092\u78BA\u8A8D",
965
965
  closeBtn: "\u9589\u3058\u308B"
@@ -1069,8 +1069,8 @@ const wallet$1 = {
1069
1069
  desc: "\u5185\u8A33\u3092\u898B\u308B",
1070
1070
  eMoney: "PayPay\u30DE\u30CD\u30FC",
1071
1071
  nonUsable: "PayPay\u30DE\u30CD\u30FC\u30E9\u30A4\u30C8",
1072
- cashBackUsable: "PayPay\u30DC\u30FC\u30CA\u30B9",
1073
- cashBackExpirable: "PayPay\u30DC\u30FC\u30CA\u30B9\u30E9\u30A4\u30C8",
1072
+ cashBackUsable: "PayPay\u30DD\u30A4\u30F3\u30C8",
1073
+ cashBackExpirable: "PayPay\u30DD\u30A4\u30F3\u30C8\u30E9\u30A4\u30C8",
1074
1074
  balance: "\u5229\u7528\u53EF\u80FD\u984D\uFF1A"
1075
1075
  };
1076
1076
  const payLater$2 = {
@@ -1528,7 +1528,7 @@ const opaUrl = () => {
1528
1528
  const createHeaderMiniAppApi = (urlEndpoint, customHeaders) => {
1529
1529
  let headers = new Headers(__spreadValues({
1530
1530
  "Content-Type": "application/json",
1531
- "Client-Version": "1.28.0",
1531
+ "Client-Version": "1.29.0",
1532
1532
  "Client-OS-Type": getRuntime()
1533
1533
  }, customHeaders));
1534
1534
  if (urlEndpoint === "web-api/app/v2/payment/methods" || urlEndpoint === "web-api/app/v2/payment/consult" || urlEndpoint === "web-api/app/v1/payment/cashbackDetail" || urlEndpoint === "web-api/app/v1/confirmAgeForCashback" || urlEndpoint === "web-api/app/v1/internal/request" || urlEndpoint === "web-api/app/v1/addressbyzip" || urlEndpoint === "/web-api/app/platform/v1/balance") {
@@ -20128,7 +20128,8 @@ const _sfc_main$11 = defineComponent({
20128
20128
  cashBack: formatAmount(cashBackBalanceInfo == null ? void 0 : cashBackBalanceInfo.balance),
20129
20129
  cashBackUsable: cashBackBalanceInfo == null ? void 0 : cashBackBalanceInfo.usable,
20130
20130
  cashBackExpirable: formatAmount(cashBackExpirableBalanceInfo == null ? void 0 : cashBackExpirableBalanceInfo.balance),
20131
- cashBackExpirebleUsable: cashBackBalanceInfo == null ? void 0 : cashBackBalanceInfo.usable
20131
+ cashBackExpirebleUsable: cashBackBalanceInfo == null ? void 0 : cashBackBalanceInfo.usable,
20132
+ showExpirableBalance: cashBackExpirableBalanceInfo && (cashBackExpirableBalanceInfo == null ? void 0 : cashBackExpirableBalanceInfo.balance) > 0
20132
20133
  };
20133
20134
  });
20134
20135
  return {
@@ -20180,14 +20181,15 @@ function _sfc_render$11(_ctx, _cache, $props, $setup, $data, $options) {
20180
20181
  class: normalizeClass({ "non-usable": !_ctx.walletDetail.cashBackUsable })
20181
20182
  }, [
20182
20183
  createBaseVNode("span", null, toDisplayString(_ctx.lg.wallet.cashBackUsable), 1),
20183
- createBaseVNode("span", null, toDisplayString(_ctx.walletDetail.cashBack) + "\u5186", 1)
20184
+ createBaseVNode("span", null, toDisplayString(_ctx.walletDetail.cashBack) + "pt", 1)
20184
20185
  ], 2),
20185
- createBaseVNode("li", {
20186
+ _ctx.walletDetail.showExpirableBalance ? (openBlock(), createElementBlock("li", {
20187
+ key: 0,
20186
20188
  class: normalizeClass({ "non-usable": !_ctx.walletDetail.cashBackExpirebleUsable })
20187
20189
  }, [
20188
20190
  createBaseVNode("span", null, toDisplayString(_ctx.lg.wallet.cashBackExpirable), 1),
20189
- createBaseVNode("span", null, toDisplayString(_ctx.walletDetail.cashBackExpirable) + "\u5186", 1)
20190
- ], 2)
20191
+ createBaseVNode("span", null, toDisplayString(_ctx.walletDetail.cashBackExpirable) + "pt", 1)
20192
+ ], 2)) : createCommentVNode("", true)
20191
20193
  ])
20192
20194
  ], 2)) : createCommentVNode("", true)
20193
20195
  ]),
@@ -22569,7 +22571,8 @@ function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
22569
22571
  _ctx.address.receiver ? (openBlock(), createElementBlock("div", {
22570
22572
  key: 1,
22571
22573
  class: normalizeClass([_ctx.style.text, _ctx.style.receiver]),
22572
- "data-test": "address-receiver"
22574
+ "data-test": "address-receiver",
22575
+ "data-testid": "address-receiver"
22573
22576
  }, toDisplayString(_ctx.address.receiver), 3)) : createCommentVNode("", true),
22574
22577
  _ctx.selected ? (openBlock(), createElementBlock("div", {
22575
22578
  key: 2,
@@ -25723,7 +25726,7 @@ const _hoisted_5$8 = {
25723
25726
  class: "price",
25724
25727
  "data-test": "cashback-detail-list-price"
25725
25728
  };
25726
- const _hoisted_6$5 = /* @__PURE__ */ createBaseVNode("span", { class: "unit" }, "\u5186", -1);
25729
+ const _hoisted_6$5 = /* @__PURE__ */ createBaseVNode("span", { class: "unit" }, "pt", -1);
25727
25730
  const _hoisted_7$4 = { class: "make-payment-cashback-detail-list--container" };
25728
25731
  const _hoisted_8$3 = ["onClick"];
25729
25732
  const _hoisted_9$3 = { class: "campaign" };
@@ -25882,7 +25885,7 @@ function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
25882
25885
  createTextVNode(toDisplayString(_ctx.cashBackInfo.cashBackAmount) + " ", 1),
25883
25886
  createBaseVNode("span", {
25884
25887
  class: normalizeClass(_ctx.style.cashBackUnit)
25885
- }, "\u5186\u76F8\u5F53", 2)
25888
+ }, "pt", 2)
25886
25889
  ], 2)) : createCommentVNode("", true)
25887
25890
  ], 2),
25888
25891
  createBaseVNode("div", {
@@ -32142,6 +32145,19 @@ function openApp$1(params) {
32142
32145
  }
32143
32146
  initOpenApp(params);
32144
32147
  }
32148
+ function openMiniApp(params) {
32149
+ var _a, _b;
32150
+ if (params) {
32151
+ reconstructParams(params);
32152
+ }
32153
+ const clientId = getClientId();
32154
+ if (!clientId) {
32155
+ return (_a = params == null ? void 0 : params.fail) == null ? void 0 : _a.call(params, { errorCode: MiniAppErrorType.sdkNotInitialized });
32156
+ }
32157
+ const appUrl = (params == null ? void 0 : params.redirectUrl) ? `paypay://miniapp?appId=${clientId}&redirectUrl=${encodeURIComponent(params == null ? void 0 : params.redirectUrl)}` : `paypay://miniapp?appId=${clientId}`;
32158
+ window.location.href = appUrl;
32159
+ (_b = params == null ? void 0 : params.success) == null ? void 0 : _b.call(params);
32160
+ }
32145
32161
  async function checkPaymentMethod(params) {
32146
32162
  var _a, _b, _c, _d, _e, _f, _g, _h;
32147
32163
  reconstructParams(params);
@@ -32214,7 +32230,7 @@ function debug(params) {
32214
32230
  function execute$5(params) {
32215
32231
  var _a;
32216
32232
  (_a = params == null ? void 0 : params.success) == null ? void 0 : _a.call(params, {
32217
- v: "1.28.0"
32233
+ v: "1.29.0"
32218
32234
  });
32219
32235
  }
32220
32236
  function useCallBack(props, ctx) {
@@ -33568,7 +33584,7 @@ const birthdayConfirm = {
33568
33584
  const birthdayConfirmError = {
33569
33585
  title: "Winning this campaign",
33570
33586
  title2: "PayPay balance could not be earned.",
33571
- desc: "The displayed bonus amount is",
33587
+ desc: "The displayed point amount is",
33572
33588
  desc2: "Cancelled at a later date based on campaign terms",
33573
33589
  helpBtn: "Check help page",
33574
33590
  closeBtn: "Close"
@@ -33676,8 +33692,8 @@ const wallet = {
33676
33692
  desc: "See the breakdown",
33677
33693
  eMoney: "PayPay Money",
33678
33694
  nonUsable: "PayPay Money Lite",
33679
- cashBackUsable: "PayPay Bonus",
33680
- cashBackExpirable: "PayPay Bonus Light",
33695
+ cashBackUsable: "PayPay Point",
33696
+ cashBackExpirable: "PayPay Point Light",
33681
33697
  balance: "Available amount:"
33682
33698
  };
33683
33699
  const payLater = {
@@ -33963,6 +33979,9 @@ class MiniAppModule extends JsBridgeModule {
33963
33979
  this.jsBridge.callNative("openMap", params);
33964
33980
  }
33965
33981
  }
33982
+ openMiniApp(params) {
33983
+ openMiniApp(params);
33984
+ }
33966
33985
  closeApp(params) {
33967
33986
  closeApp(params);
33968
33987
  }
@@ -23,6 +23,7 @@ export * from './getUserAddress';
23
23
  export * from './inputAddress';
24
24
  export * from './openMap';
25
25
  export * from './openApp';
26
+ export * from './openMiniApp';
26
27
  export * from './checkPaymentMethod';
27
28
  export * from './requestInternal';
28
29
  export * from './debug';
@@ -0,0 +1,2 @@
1
+ import { OpenMiniAppParams } from '../../types';
2
+ export declare function openMiniApp(params?: OpenMiniAppParams): void;
@@ -15,6 +15,7 @@ declare const _default: import("vue").DefineComponent<{
15
15
  cashBackUsable: boolean | undefined;
16
16
  cashBackExpirable: string;
17
17
  cashBackExpirebleUsable: boolean | undefined;
18
+ showExpirableBalance: boolean | undefined;
18
19
  }>;
19
20
  images: {
20
21
  iconBalanceError: string;
package/dist/types.d.ts CHANGED
@@ -206,6 +206,9 @@ export interface GetBalanceParams extends NativeParams<MiniAppResult> {
206
206
  merchant?: string;
207
207
  sourceInfoApp?: string;
208
208
  }
209
+ export interface OpenMiniAppParams extends NativeParams<void> {
210
+ redirectUrl?: string;
211
+ }
209
212
  export interface CloseAppParams extends NativeParams<unknown> {
210
213
  options?: {
211
214
  deeplink?: string;
@@ -59,12 +59,12 @@ declare const _default: import("vue").DefineComponent<{
59
59
  url?: unknown;
60
60
  success?: unknown;
61
61
  } & {
62
+ success: Function;
62
63
  title: string;
63
64
  type: SmartButtonType;
64
65
  isShortText: boolean;
65
66
  buttonSize: SmartButtonSize;
66
67
  theme: SmartButtonTheme;
67
- success: Function;
68
68
  avatarUrl: string;
69
69
  cashbackInfo: string;
70
70
  preferredLanguage: SmartButtonLg;
@@ -73,13 +73,13 @@ declare const _default: import("vue").DefineComponent<{
73
73
  }> & {
74
74
  onClick?: ((...args: any[]) => any) | undefined;
75
75
  }, {
76
+ success: Function;
76
77
  url: string | undefined;
77
78
  title: string;
78
79
  type: SmartButtonType;
79
80
  isShortText: boolean;
80
81
  buttonSize: SmartButtonSize;
81
82
  theme: SmartButtonTheme;
82
- success: Function;
83
83
  avatarUrl: string;
84
84
  cashbackInfo: string;
85
85
  preferredLanguage: SmartButtonLg;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paypay/mini-app-js-sdk",
3
- "version": "1.28.0",
3
+ "version": "1.29.0",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "build": "vite build",