@paypay/mini-app-js-sdk 1.64.0 → 2.0.0-beta.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.
Files changed (187) hide show
  1. package/dist/client/clientUtils.d.ts +14 -0
  2. package/dist/client/index.d.ts +34 -0
  3. package/dist/client/supportedFunctionsList.d.ts +2 -0
  4. package/dist/client/types.d.ts +5 -0
  5. package/dist/core/coreUtils.d.ts +6 -0
  6. package/dist/jsbridge-core/jsbridge.d.ts +1 -1
  7. package/dist/mini-app-api.d.ts +5 -3
  8. package/dist/mini-app-js-sdk.browser.js +2 -1
  9. package/dist/mini-app-js-sdk.es.js +661 -44555
  10. package/dist/model/bridge/getKycPassportInfo.d.ts +2 -3
  11. package/dist/model/bridge/logAppsFlyerEvent.d.ts +2 -0
  12. package/dist/model/bridge/render.d.ts +4 -0
  13. package/dist/model/bridge/renderPayButton.d.ts +8 -1
  14. package/dist/model/bridge/showStorageAccessPermissionAlert.d.ts +2 -0
  15. package/dist/model/bridge/verifyMultiFactorAuthResult.d.ts +2 -3
  16. package/dist/model/miniAppError.d.ts +2 -1
  17. package/dist/package/button/index.d.ts +1 -1
  18. package/dist/resources/en.d.ts +496 -0
  19. package/dist/resources/ja.d.ts +515 -0
  20. package/dist/types.d.ts +157 -8
  21. package/dist/utils/api.d.ts +2 -1
  22. package/dist/utils/fetch.d.ts +1 -0
  23. package/dist/utils/getLanguage.d.ts +83 -1
  24. package/dist/utils/helper.d.ts +5 -0
  25. package/dist/utils/ip.d.ts +1 -1
  26. package/dist/utils/minimumAppVersion.d.ts +1 -0
  27. package/dist/utils/storage.d.ts +20 -13
  28. package/package.json +24 -10
  29. package/dist/composition-api/dom/useCountDown.d.ts +0 -20
  30. package/dist/composition-api/dom/useEventListener.d.ts +0 -8
  31. package/dist/composition-api/dom/useOnMountedOrActivated.d.ts +0 -1
  32. package/dist/index.d.ts +0 -3
  33. package/dist/jsbridge-core/lib/browser.d.ts +0 -3
  34. package/dist/jsbridge-core/paypay-jsbridge.d.ts +0 -16
  35. package/dist/mini-app-js-sdk.d.ts +0 -10
  36. package/dist/mini-app-js-sdk.min.css +0 -1
  37. package/dist/model/OPAErrorCodes.d.ts +0 -4
  38. package/dist/model/bridge/index.d.ts +0 -47
  39. package/dist/package/action-sheet/index.d.ts +0 -123
  40. package/dist/package/banner-header/index.vue.d.ts +0 -71
  41. package/dist/package/button/LoadingIndicator.vue.d.ts +0 -2
  42. package/dist/package/charge-amount-list/index.vue.d.ts +0 -100
  43. package/dist/package/charge-amount-more-list/index.vue.d.ts +0 -25
  44. package/dist/package/date-button/index.vue.d.ts +0 -21
  45. package/dist/package/desktop-header/index.d.ts +0 -26
  46. package/dist/package/divider/index.d.ts +0 -24
  47. package/dist/package/header/index.d.ts +0 -99
  48. package/dist/package/input/currency/index.d.ts +0 -124
  49. package/dist/package/input/email/index.d.ts +0 -137
  50. package/dist/package/input/text/index.d.ts +0 -151
  51. package/dist/package/input/utils.d.ts +0 -6
  52. package/dist/package/input/zip/index.d.ts +0 -107
  53. package/dist/package/lottie/index.d.ts +0 -77
  54. package/dist/package/overlay/index.d.ts +0 -52
  55. package/dist/package/payment-method/Bank.vue.d.ts +0 -59
  56. package/dist/package/payment-method/CreditCard.vue.d.ts +0 -55
  57. package/dist/package/payment-method/PayLaterCC.vue.d.ts +0 -462
  58. package/dist/package/payment-method/SbidBank.vue.d.ts +0 -463
  59. package/dist/package/payment-method/Wallet.vue.d.ts +0 -467
  60. package/dist/package/payment-method/index.d.ts +0 -32
  61. package/dist/package/payment-method-list/index.vue.d.ts +0 -58
  62. package/dist/package/payment-type/Bank.vue.d.ts +0 -46
  63. package/dist/package/payment-type/CreditCard.vue.d.ts +0 -56
  64. package/dist/package/payment-type/PayLaterCC.vue.d.ts +0 -473
  65. package/dist/package/payment-type/Sbid.vue.d.ts +0 -462
  66. package/dist/package/payment-type/Wallet.vue.d.ts +0 -476
  67. package/dist/package/payment-type/index.d.ts +0 -38
  68. package/dist/package/select-list/Components.d.ts +0 -130
  69. package/dist/package/select-list/index.d.ts +0 -109
  70. package/dist/package/skeleton-loader/SkeletonLoader.vue.d.ts +0 -18
  71. package/dist/package/wallet-breakdown/WalletBreakdown.vue.d.ts +0 -461
  72. package/dist/utils/uiConstants.d.ts +0 -1
  73. package/dist/utils/useBreakpoints.d.ts +0 -5
  74. package/dist/utils/utils.d.ts +0 -2
  75. package/dist/views/email-registration/App.vue.d.ts +0 -59
  76. package/dist/views/email-registration/hooks/callback.d.ts +0 -9
  77. package/dist/views/email-registration/hooks/const.d.ts +0 -1
  78. package/dist/views/email-registration/hooks/ui.d.ts +0 -23
  79. package/dist/views/email-registration/parts/AuthMailNotFoundSheet.vue.d.ts +0 -42
  80. package/dist/views/email-registration/parts/RegisterEmail.vue.d.ts +0 -76
  81. package/dist/views/email-registration/parts/SentEmailAuthDoneSheet.vue.d.ts +0 -24
  82. package/dist/views/email-registration/parts/SentEmailSheet.vue.d.ts +0 -54
  83. package/dist/views/error-sheet/Index.vue.d.ts +0 -526
  84. package/dist/views/get-bank-info/GetBankInfoWrapper.vue.d.ts +0 -44
  85. package/dist/views/get-bank-info/components/GetBankInfoPopup.vue.d.ts +0 -482
  86. package/dist/views/get-bank-info/components/PayoutMethodList.vue.d.ts +0 -35
  87. package/dist/views/get-bank-info/components/PayoutMethodView.vue.d.ts +0 -22
  88. package/dist/views/get-bank-info/types.d.ts +0 -29
  89. package/dist/views/get-kyc-passport/GetKycPassportFallbackBiometricAuth.vue.d.ts +0 -459
  90. package/dist/views/get-kyc-passport/GetKycPassportOTPExpiredError.vue.d.ts +0 -457
  91. package/dist/views/get-kyc-passport/GetKycPassportOverVerifiLimitError.vue.d.ts +0 -457
  92. package/dist/views/get-kyc-passport/GetKycPassportRootView.vue.d.ts +0 -36
  93. package/dist/views/get-user-address/App.vue.d.ts +0 -67
  94. package/dist/views/get-user-address/Sheet/AddSheet/Contents.vue.d.ts +0 -539
  95. package/dist/views/get-user-address/Sheet/AddSheet/DeleteHalfSheet.vue.d.ts +0 -460
  96. package/dist/views/get-user-address/Sheet/AddSheet/Footer.vue.d.ts +0 -503
  97. package/dist/views/get-user-address/Sheet/AddSheet/TagForm.vue.d.ts +0 -474
  98. package/dist/views/get-user-address/Sheet/AddSheet/constants.d.ts +0 -4
  99. package/dist/views/get-user-address/Sheet/AddSheet/index.vue.d.ts +0 -543
  100. package/dist/views/get-user-address/Sheet/App.vue.d.ts +0 -89
  101. package/dist/views/get-user-address/Sheet/DisplaySheet/Address.vue.d.ts +0 -484
  102. package/dist/views/get-user-address/Sheet/DisplaySheet/Footer.vue.d.ts +0 -466
  103. package/dist/views/get-user-address/Sheet/DisplaySheet/index.vue.d.ts +0 -550
  104. package/dist/views/get-user-address/Sheet/SelectedAddress/NoRegisteredAddressMessage.vue.d.ts +0 -450
  105. package/dist/views/get-user-address/Sheet/SelectedAddress/SelectedAddress.vue.d.ts +0 -473
  106. package/dist/views/get-user-address/Sheet/SelectedAddress/components/AddressInfo.vue.d.ts +0 -468
  107. package/dist/views/get-user-address/Sheet/SelectedAddress/components/Footer.vue.d.ts +0 -460
  108. package/dist/views/get-user-address/hooks/ui-hooks.d.ts +0 -57
  109. package/dist/views/get-user-address/store/error-handle.d.ts +0 -12
  110. package/dist/views/get-user-address/store/root.d.ts +0 -18
  111. package/dist/views/init-kyc-passport/App.vue.d.ts +0 -38
  112. package/dist/views/init-kyc-passport/UpdateWarning.vue.d.ts +0 -55
  113. package/dist/views/input-address/App.vue.d.ts +0 -40
  114. package/dist/views/input-address/hook/app.d.ts +0 -14
  115. package/dist/views/input-address/hook/error-handle.d.ts +0 -8
  116. package/dist/views/input-address/hook/root.d.ts +0 -10
  117. package/dist/views/make-payment/App.vue.d.ts +0 -6663
  118. package/dist/views/make-payment/Main.vue.d.ts +0 -6676
  119. package/dist/views/make-payment/Sheets/AddressInfo.vue.d.ts +0 -458
  120. package/dist/views/make-payment/Sheets/CashBackDetailList.vue.d.ts +0 -461
  121. package/dist/views/make-payment/Sheets/CashBackDetails/BirthdayConfirm.vue.d.ts +0 -453
  122. package/dist/views/make-payment/Sheets/CashBackDetails/BirthdayConfirmError.vue.d.ts +0 -449
  123. package/dist/views/make-payment/Sheets/CashBackDetails/FloatingButton.vue.d.ts +0 -29
  124. package/dist/views/make-payment/Sheets/CashBackDetails/hooks.d.ts +0 -27
  125. package/dist/views/make-payment/Sheets/CashBackDetails/index.vue.d.ts +0 -493
  126. package/dist/views/make-payment/Sheets/Charge/ChoosePaymentMethod.vue.d.ts +0 -528
  127. package/dist/views/make-payment/Sheets/Charge/TopContent.vue.d.ts +0 -653
  128. package/dist/views/make-payment/Sheets/Charge/TopInfo.vue.d.ts +0 -494
  129. package/dist/views/make-payment/Sheets/Charge/index.vue.d.ts +0 -1419
  130. package/dist/views/make-payment/Sheets/ChoosePayment.vue.d.ts +0 -493
  131. package/dist/views/make-payment/Sheets/CloseConfirmation.vue.d.ts +0 -439
  132. package/dist/views/make-payment/Sheets/Consult.vue.d.ts +0 -27
  133. package/dist/views/make-payment/Sheets/DuplicatePayment.vue.d.ts +0 -464
  134. package/dist/views/make-payment/Sheets/MaintenanceInfo.vue.d.ts +0 -20
  135. package/dist/views/make-payment/Sheets/PayMethod.vue.d.ts +0 -530
  136. package/dist/views/make-payment/Sheets/Payment.vue.d.ts +0 -656
  137. package/dist/views/make-payment/Sheets/PaymentCompletion/CashBackDetailRow.vue.d.ts +0 -42
  138. package/dist/views/make-payment/Sheets/PaymentCompletion/index.vue.d.ts +0 -549
  139. package/dist/views/make-payment/store/util-for-handle-error.d.ts +0 -16
  140. package/dist/views/make-payment/store.d.ts +0 -6328
  141. package/dist/views/make-payment/utils/paymentMethod.d.ts +0 -4
  142. package/dist/views/open-app/App.vue.d.ts +0 -464
  143. package/dist/views/open-map/App.vue.d.ts +0 -464
  144. package/dist/views/register-user-info/RegisterUserInfoCancelConfirmationSheet.vue.d.ts +0 -1102
  145. package/dist/views/register-user-info/RegisterUserInfoCategoryView.vue.d.ts +0 -1117
  146. package/dist/views/register-user-info/RegisterUserInfoDataPointGroup.vue.d.ts +0 -19
  147. package/dist/views/register-user-info/RegisterUserInfoErrorSheet.vue.d.ts +0 -7
  148. package/dist/views/register-user-info/RegisterUserInfoFooterView.vue.d.ts +0 -1102
  149. package/dist/views/register-user-info/RegisterUserInfoKycInfoSheet.vue.d.ts +0 -1107
  150. package/dist/views/register-user-info/RegisterUserInfoMailInfoSheet.vue.d.ts +0 -1107
  151. package/dist/views/register-user-info/RegisterUserInfoProgressView.vue.d.ts +0 -6
  152. package/dist/views/register-user-info/RegisterUserInfoRootView.vue.d.ts +0 -684
  153. package/dist/views/register-user-info/RegisterUserInfoUneditableDataView.vue.d.ts +0 -16
  154. package/dist/views/register-user-info/api.d.ts +0 -23
  155. package/dist/views/register-user-info/input/RegisterUserInfoEmailInput.vue.d.ts +0 -454
  156. package/dist/views/register-user-info/input/RegisterUserInfoSelectionButtonInput.vue.d.ts +0 -18
  157. package/dist/views/register-user-info/input/RegisterUserInfoSimpleInput.vue.d.ts +0 -34
  158. package/dist/views/register-user-info/store.d.ts +0 -448
  159. package/dist/views/register-user-info/types.d.ts +0 -32
  160. package/dist/views/register-user-info/utils.d.ts +0 -4
  161. package/dist/views/register-user-info/validators.d.ts +0 -10
  162. package/dist/views/registerPaymentFeatures/AutoTopupMethod.vue.d.ts +0 -140
  163. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesAmountErrorSheet.vue.d.ts +0 -98
  164. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesAmountSettingSheet.vue.d.ts +0 -99
  165. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesAutoTopupConfirmSheet.vue.d.ts +0 -100
  166. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesChooseAmount.vue.d.ts +0 -105
  167. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesChoosePaymentMethodSheet.vue.d.ts +0 -96
  168. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesDefaultErrorSheet.vue.d.ts +0 -96
  169. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesFooterUpdateWarning.vue.d.ts +0 -102
  170. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesFooterView.vue.d.ts +0 -96
  171. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesFooterViewWithEnableButton.vue.d.ts +0 -106
  172. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesMainView.vue.d.ts +0 -129
  173. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesRootView.vue.d.ts +0 -151
  174. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesSettingCompleteSheet.vue.d.ts +0 -99
  175. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesTopupMethodSettingSheet.vue.d.ts +0 -99
  176. package/dist/views/registerPaymentFeatures/fallback-method/FallbackMethodAppUpdateWarning.vue.d.ts +0 -33
  177. package/dist/views/registerPaymentFeatures/store.d.ts +0 -95
  178. package/dist/views/show-alert/App.vue.d.ts +0 -42
  179. package/dist/views/show-update-warning/App.vue.d.ts +0 -466
  180. package/dist/views/smart-button/App.vue.d.ts +0 -100
  181. package/dist/views/sms-auth/App.vue.d.ts +0 -580
  182. package/dist/views/sms-auth/store.d.ts +0 -321
  183. package/dist/views/three-d-secure-sheet/ThreeDSecureSheet.vue.d.ts +0 -40
  184. package/dist/views/topup/App.vue.d.ts +0 -559
  185. package/dist/views/topup/BannerInfo.vue.d.ts +0 -35
  186. package/dist/views/topup/CashbackInfo.vue.d.ts +0 -489
  187. package/dist/views/topup/TopupCompletion.vue.d.ts +0 -466
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { NativeParams } from './jsbridge-core/jsbridge';
1
+ import { NativeParams, NativeResponse } from './jsbridge-core/jsbridge';
2
2
  import { MiniAppErrorType } from './model/miniAppError';
3
3
  import { ButtonType } from './package/button';
4
4
  export declare type MiniAppResult = Record<string, unknown>;
@@ -46,10 +46,22 @@ export interface CopyToClipBoardParams extends NativeParams<void> {
46
46
  export interface GetPermissionStatusParams extends NativeParams<MiniAppResult> {
47
47
  name?: string;
48
48
  }
49
+ export interface InitClientParams extends NativeParams<MiniAppResult> {
50
+ clientId?: string;
51
+ env?: string;
52
+ mode?: string;
53
+ debugMode?: boolean;
54
+ }
49
55
  export interface InitParams extends NativeParams<MiniAppResult> {
50
56
  clientId?: string;
51
57
  env?: string;
52
58
  mode?: string;
59
+ token?: string;
60
+ ott?: string;
61
+ clientOrigin?: string;
62
+ refreshToken?: string;
63
+ clientVersion?: string;
64
+ debugMode?: boolean;
53
65
  }
54
66
  export interface IosMapParams {
55
67
  label: string;
@@ -267,6 +279,9 @@ export interface InitKycPassportParams extends NativeParams<unknown> {
267
279
  eKycDocuments?: Array<string>;
268
280
  callbackUrl: string;
269
281
  }
282
+ export interface GetKycPassportInfoParams extends NativeParams<unknown> {
283
+ url: string;
284
+ }
270
285
  export interface StartMultiFactorAuthParams extends NativeParams<MiniAppResult> {
271
286
  type: string;
272
287
  callbackUrl: string;
@@ -286,11 +301,14 @@ export interface RenderSmartButtonParams extends NativeParams<MiniAppResult> {
286
301
  orderInfo?: SmartPayParams;
287
302
  autoInvoke?: boolean;
288
303
  callback?: () => void;
304
+ getDefault?: boolean;
305
+ renderId?: string;
289
306
  }
290
307
  export interface SmartButtonParam {
291
308
  title: string;
292
309
  avatarUrl?: string;
293
310
  cashbackInfo?: string;
311
+ localStorageAvailable?: boolean;
294
312
  }
295
313
  declare type SmartPayCurrency = 'JPY';
296
314
  interface SmartPayAmount {
@@ -393,21 +411,19 @@ export declare enum PpLocalStorageKey {
393
411
  lastTopup = "ppjssdk.lastTopup",
394
412
  appDetail = "ppjssdk.appDetail",
395
413
  appConfig = "ppjssdk.appConfig",
396
- clientId = "ppjssdk.clientId",
397
414
  userInfo = "ppjssdk.userInfo",
398
415
  lastPaymentMethod = "ppjssdk.lastPaymentMethod",
399
416
  lastTopupPayMethod = "ppjssdk.lastTopupPayMethod",
400
- codeVerifier = "ppjssdk.codeVerifier"
417
+ codeVerifier = "ppjssdk.codeVerifier",
418
+ clientOrigin = "ppjssdk.clientOrigin",
419
+ clientVersion = "ppjssdk.clientVersion",
420
+ debugMode = "ppjssdk.debugMode",
421
+ merchant = "ppjssdk.merchant"
401
422
  }
402
423
  export declare enum KycPassportMethod {
403
424
  biometric = "BIOMETRIC",
404
425
  otp = "OTP"
405
426
  }
406
- export declare enum CookieDuration {
407
- oneDay = 1,
408
- oneMonth = 30,
409
- oneYear = 365
410
- }
411
427
  export declare enum RenderType {
412
428
  COVER = "cover",
413
429
  CONTAIN = "contain"
@@ -470,6 +486,7 @@ interface AuthStatusFailResult extends MiniAppErrorResultType {
470
486
  challengeMethod: ChallengeMethod;
471
487
  } | null;
472
488
  }
489
+ export declare type ResultErrorType = MiniAppErrorResultType | AuthStatusFailResult;
473
490
  export interface GetAuthStatusParams extends NativeParams<MiniAppResult, AuthStatusFailResult> {
474
491
  isInternal?: boolean;
475
492
  }
@@ -480,8 +497,15 @@ export declare type ErrorSheetButton = {
480
497
  actionType?: undefined;
481
498
  };
482
499
  export interface ScanCodeParams extends NativeParams<MiniAppResult> {
500
+ redirectUrlOnCancel: string;
501
+ }
502
+ export interface ScanCodeClientParams extends NativeParams<MiniAppResult> {
483
503
  redirectUrlOnCancel?: string;
484
504
  }
505
+ export interface LogAppsFlyerEventParams extends NativeParams<void> {
506
+ eventName: string;
507
+ parameters: Record<string, unknown>;
508
+ }
485
509
  export declare const AddShortcutTypes: {
486
510
  readonly FAVORITE: "FAVORITE";
487
511
  readonly OS_HOME_SCREEN_ICON: "OS_HOME_SCREEN_ICON";
@@ -502,6 +526,131 @@ export interface GetUserPaymentFeatureSettingsParams extends NativeParams<MiniAp
502
526
  merchant?: string;
503
527
  productType?: string;
504
528
  }
529
+ export declare const PPFunctionResult: {
530
+ readonly success: "success";
531
+ readonly fail: "fail";
532
+ readonly complete: "complete";
533
+ };
534
+ export declare type PPFunctionResultType = typeof PPFunctionResult[keyof typeof PPFunctionResult];
535
+ export declare type CoreMessageData<T> = {
536
+ name: PPFunctionNameType;
537
+ result: PPFunctionResultType;
538
+ data?: MiniAppResult | MiniAppErrorResultType | T;
539
+ messageId: string;
540
+ };
541
+ export declare type CoreCallUtilMessageData = {
542
+ name: PPUtilFunctionNameType;
543
+ data?: unknown;
544
+ };
545
+ export declare type ClientMessageData = {
546
+ name: PPFunctionNameType;
547
+ params?: unknown;
548
+ messageId: string;
549
+ };
550
+ export declare type RenderButtonInfo = {
551
+ type: 'pay' | 'login';
552
+ renderId?: string;
553
+ };
554
+ export declare type PayButtonInfo = {
555
+ data: SmartButtonParam;
556
+ preferredLanguage: string;
557
+ isLoggedIn?: boolean;
558
+ isJustLoggedIn?: boolean;
559
+ };
560
+ export declare type CashbackResponse = {
561
+ unsigned?: {
562
+ resultInfo?: {
563
+ code?: string;
564
+ };
565
+ data?: {
566
+ normalCashbackPercentage?: string;
567
+ lotteryCashbackPercentage?: string;
568
+ };
569
+ };
570
+ };
571
+ export interface VerifyMultiFactorAuthResultParams extends NativeParams<MiniAppResult> {
572
+ sessionId: string | null;
573
+ }
574
+ export interface ShowStorageAccessPermissionAlertParams extends NativeParams<void> {
575
+ clientUrl: string;
576
+ }
577
+ export declare type LinkOption = {
578
+ url: string;
579
+ target?: string;
580
+ };
581
+ export declare type HandleMessageFromNativeParams = {
582
+ json: NativeResponse;
583
+ };
584
+ export declare const PPFunctionName: {
585
+ readonly init: "init";
586
+ readonly getBankInfo: "getBankInfo";
587
+ readonly showAlert: "showAlert";
588
+ readonly render: "render";
589
+ readonly makePayment: "makePayment";
590
+ readonly getUAID: "getUAID";
591
+ readonly logout: "logout";
592
+ readonly startMultiFactorAuth: "startMultiFactorAuth";
593
+ readonly verifyMultiFactorAuthResult: "verifyMultiFactorAuthResult";
594
+ readonly getPermissionStatus: "getPermissionStatus";
595
+ readonly registerKyc: "registerKyc";
596
+ readonly getKycInformation: "getKycInformation";
597
+ readonly getUserAddress: "getUserAddress";
598
+ readonly getUserLocation: "getUserLocation";
599
+ readonly getUserProfile: "getUserProfile";
600
+ readonly registerEmail: "registerEmail";
601
+ readonly showUpdateWarning: "showUpdateWarning";
602
+ readonly showErrorSheet: "showErrorSheet";
603
+ readonly getPlatformInformation: "getPlatformInformation";
604
+ readonly share: "share";
605
+ readonly setTitle: "setTitle";
606
+ readonly getTopBarHeight: "getTopBarHeight";
607
+ readonly openWebview: "openWebview";
608
+ readonly openMap: "openMap";
609
+ readonly closeApp: "closeApp";
610
+ readonly openApp: "openApp";
611
+ readonly checkPaymentMethod: "checkPaymentMethod";
612
+ readonly getBalance: "getBalance";
613
+ readonly topup: "topup";
614
+ readonly registerPaymentFeatures: "registerPaymentFeatures";
615
+ readonly registerUserInfo: "registerUserInfo";
616
+ readonly requestInternal: "requestInternal";
617
+ readonly scanCode: "scanCode";
618
+ readonly getAuthStatus: "getAuthStatus";
619
+ readonly openMiniApp: "openMiniApp";
620
+ readonly inputAddress: "inputAddress";
621
+ readonly checkAccessToken: "checkAccessToken";
622
+ readonly getCashbackInformation: "getCashbackInformation";
623
+ readonly request: "request";
624
+ readonly getDeviceInformation: "getDeviceInformation";
625
+ readonly debug: "debug";
626
+ readonly copyToClipboard: "copyToClipboard";
627
+ readonly createOrder: "createOrder";
628
+ readonly showStorageAccessPermissionAlert: "showStorageAccessPermissionAlert";
629
+ readonly handleMessageFromNative: "handleMessageFromNative";
630
+ readonly initKycPassport: "initKycPassport";
631
+ readonly smsAuth: "smsAuth";
632
+ readonly getKycPassportInfo: "getKycPassportInfo";
633
+ };
634
+ export declare type PPFunctionNameType = typeof PPFunctionName[keyof typeof PPFunctionName];
635
+ export declare const PPUtilFunctionName: {
636
+ readonly reload: "reload";
637
+ readonly link: "link";
638
+ readonly saveRefreshToken: "saveRefreshToken";
639
+ readonly makeVisible: "makeVisible";
640
+ readonly consoleDebugInfo: "consoleDebugInfo";
641
+ };
642
+ export declare type PPUtilFunctionNameType = typeof PPUtilFunctionName[keyof typeof PPUtilFunctionName];
643
+ export declare type SaveRefreshTokenOption = {
644
+ refreshToken: string;
645
+ domain: string;
646
+ isSecure: boolean;
647
+ };
648
+ export declare type ClientJsBridge = {
649
+ _handleMessageFromNative: (json: NativeResponse) => void;
650
+ };
651
+ export declare type ConsoleDebugInfoParams = {
652
+ params: unknown[];
653
+ };
505
654
  export declare const KycPassportUrlParam: {
506
655
  authType: string;
507
656
  ekycDocuments: string;
@@ -1,6 +1,6 @@
1
1
  import { MiniAppErrorType } from '../model/miniAppError';
2
2
  import { UIComponentsError } from '../model/uiComponents';
3
- import { Address, InitKycPassportParams, NewAddress } from '../types';
3
+ import { Address, InitKycPassportParams, CashbackResponse, NewAddress, SmartPayParams } from '../types';
4
4
  export declare type TopupQuery = {
5
5
  merchant?: string;
6
6
  agreeSimilarTransaction?: boolean;
@@ -317,5 +317,6 @@ export declare type UserLocationResponse = {
317
317
  export declare function getUserLocationRequest(params: {
318
318
  validTimeMinutes: number;
319
319
  }): Promise<import("./fetch").PPFetchResult<UserLocationResponse, Record<string, unknown>>>;
320
+ export declare function getExpectedCashbackInfo(orderInfo: SmartPayParams): Promise<import("./fetch").PPFetchResult<CashbackResponse, Record<string, unknown>>>;
320
321
  export declare function isValidUrl(urlChallenge: string): boolean;
321
322
  export {};
@@ -68,4 +68,5 @@ export declare type PPFetchResult<T, E = Record<string, unknown>> = {
68
68
  body?: null;
69
69
  };
70
70
  export declare function ppFetch2<T, E = Record<string, unknown>>(options: PPFetchOptions): Promise<PPFetchResult<T, E>>;
71
+ export declare function fetchRefreshToken(refreshToken?: string): Promise<boolean>;
71
72
  export { createHeaderMiniAppApi };
@@ -345,7 +345,7 @@ export declare function getLanguage(): {
345
345
  title: string;
346
346
  close: string;
347
347
  };
348
- "3dSecureSheet": {
348
+ '3dSecureSheet': {
349
349
  title: string;
350
350
  descriptionForYJCardOrPPCard: string;
351
351
  description: string;
@@ -422,6 +422,88 @@ export declare function getLanguage(): {
422
422
  };
423
423
  };
424
424
  };
425
+ showStorageAccessPermission: {
426
+ alert: {
427
+ title: string;
428
+ text: string;
429
+ button: string;
430
+ unknown: {
431
+ button: string;
432
+ text: string;
433
+ };
434
+ };
435
+ guide: {
436
+ ui: {
437
+ complete: string;
438
+ next: string;
439
+ prev: string;
440
+ refresh: string;
441
+ settingCookie: string;
442
+ refreshPage: string;
443
+ };
444
+ title: string;
445
+ complete: string;
446
+ desktop: {
447
+ chrome: {
448
+ text1: string;
449
+ text2: string;
450
+ text3: string;
451
+ text4: string;
452
+ };
453
+ safari: {
454
+ text1: string;
455
+ text2: string;
456
+ text3: string;
457
+ };
458
+ edge: {
459
+ text1: string;
460
+ text2: string;
461
+ text3: string;
462
+ text4: string;
463
+ };
464
+ firefox: {
465
+ text1: string;
466
+ };
467
+ };
468
+ mobile: {
469
+ android: {
470
+ edge: {
471
+ text1: string;
472
+ text2: string;
473
+ text3: string;
474
+ text4: string;
475
+ text5: string;
476
+ };
477
+ firefox: {
478
+ text1: string;
479
+ text2: string;
480
+ text3: string;
481
+ text4: string;
482
+ };
483
+ chrome: {
484
+ text1: string;
485
+ text2: string;
486
+ text3: string;
487
+ text4: string;
488
+ text5: string;
489
+ };
490
+ };
491
+ ios: {
492
+ safari: {
493
+ text1: string;
494
+ text2: string;
495
+ };
496
+ edge: {
497
+ text1: string;
498
+ text2: string;
499
+ text3: string;
500
+ text4: string;
501
+ text5: string;
502
+ };
503
+ };
504
+ };
505
+ };
506
+ };
425
507
  getKycPassport: {
426
508
  fallbackSmsSheet: {
427
509
  title: string;
@@ -40,6 +40,8 @@ export declare enum MiniAppRuntime {
40
40
  export declare function getRuntime(): MiniAppRuntime;
41
41
  export declare function isPayPayMiniApp(): boolean;
42
42
  export declare function getAppVersion(): string | null;
43
+ export declare function getEventLabel(merchant?: string | null): string;
44
+ export declare function getEventCategory(): string;
43
45
  export declare function semVerCompare(a: string, b: string): boolean;
44
46
  export declare function checkVersion(minVersion: string): boolean;
45
47
  export declare function delay(time?: number): Promise<boolean>;
@@ -57,6 +59,9 @@ export declare function generateCodeVerifier(length?: number): string;
57
59
  export declare function generateCodeChallange(codeVerifier: string): Promise<string>;
58
60
  export declare function openUrl(linkUrl: string): void;
59
61
  export declare function getButtonType(button: UIComponentsErrorButton | ErrorSheetButton, onlyButton?: boolean): "success" | "default" | "primary" | "warning" | "danger" | "link" | "outLined";
62
+ export declare function saveUserData(): void;
63
+ export declare function getDomain(subdomainCookieSharing: boolean, hostname: string): string;
64
+ export declare function getRandomString(): string;
60
65
  export declare function isAlphabet(value: string): boolean;
61
66
  export declare function reconstructKycPassportCallbackUrl(url: string, type: string): string;
62
67
  export {};
@@ -1,2 +1,2 @@
1
- export declare function isLocalIP(hostName: string): boolean;
2
1
  export declare function isIP(hostName: string): boolean;
2
+ export declare function isLocalIP(hostName: string): boolean;
@@ -4,4 +4,5 @@ export declare const MinVersion: {
4
4
  OS_HOME_SCREEN_ICON: string;
5
5
  START_MULTIFACTOR_AUTH_ANDROID_FIX: string;
6
6
  KYC_PASSPORT: string;
7
+ LOG_APP_FLYER_EVENT: string;
7
8
  };
@@ -1,32 +1,39 @@
1
- export declare function parseDomain(str: string): string;
2
- export declare function getDomain(appDetail?: string | null): string;
3
- export declare function getAccessToken(): string | undefined;
4
- export declare function removeCookie(key: string): void;
1
+ import { PpLocalStorageKey } from '../types';
2
+ export declare function getKeyWithClientId(baseKey: PpLocalStorageKey): string;
3
+ export declare function getAccessToken(): string | null;
4
+ export declare function removeLocalStorage(key: string): void;
5
5
  export declare function saveAccessToken(token: string): void;
6
6
  export declare function getRefreshToken(): string;
7
7
  export declare function saveRefreshToken(token: string): void;
8
8
  export declare function saveEnv(env: string): void;
9
- export declare function getEnv(): string | undefined;
9
+ export declare function getEnv(): string | null;
10
10
  export declare function getClientUUID(): string;
11
11
  export declare function getDeviceUUIDFromNative(): string;
12
12
  export declare function getDeviceUUID(): string;
13
13
  export declare function saveLastPayment(payment: string): void;
14
14
  export declare function saveLastPaymentMethod(methodId: string): void;
15
15
  export declare function saveLastTopupPayMethod(methodId: string): void;
16
- export declare function getLastPaymentMethod(): string | undefined;
17
- export declare function getLastTopupPayMethod(): string | undefined;
18
- export declare function getLastPayment(): string | undefined;
16
+ export declare function getLastPaymentMethod(): string | null;
17
+ export declare function getLastTopupPayMethod(): string | null;
18
+ export declare function getLastPayment(): string | null;
19
19
  export declare function saveLastTopup(topup: string): void;
20
20
  export declare function getLastTopup(): string;
21
21
  export declare function saveAppDetail(appDetail: string): void;
22
- export declare function getAppDetail(): string | undefined;
22
+ export declare function getAppDetail(): string | null;
23
23
  export declare function removeAppDetail(): void;
24
24
  export declare function saveAppConfig(appConfig: string): void;
25
- export declare function getAppConfig(): string | undefined;
26
- export declare function getClientId(): string | undefined;
25
+ export declare function getAppConfig(): string | null;
26
+ export declare function getClientId(): string | null;
27
27
  export declare function saveClientId(id: string): void;
28
- export declare function getUserInfo(): string | undefined;
28
+ export declare function getUserInfo(): string | null;
29
29
  export declare function saveUserInfo(userData: string): void;
30
- export declare function getCodeVerifier(): string | undefined;
30
+ export declare function getCodeVerifier(): string | null;
31
31
  export declare function saveCodeVerifier(codeVerifier: string): void;
32
32
  export declare function removeCodeVerifier(): void;
33
+ export declare function saveClientOrigin(origin: string): void;
34
+ export declare function getClientOrigin(): string;
35
+ export declare function isEnableLocalStorage(): boolean;
36
+ export declare function saveClientVersion(clientVersion: string): void;
37
+ export declare function getClientVersion(): string;
38
+ export declare function saveDebugMode(isDebugMode: boolean): void;
39
+ export declare function getDebugMode(): boolean;
package/package.json CHANGED
@@ -1,35 +1,45 @@
1
1
  {
2
2
  "name": "@paypay/mini-app-js-sdk",
3
- "version": "1.64.0",
3
+ "version": "2.0.0-beta.0",
4
4
  "private": false,
5
5
  "scripts": {
6
- "build": "vite build",
7
- "dev": "vite",
6
+ "build": "yarn build:client && yarn build:core && yarn build:client:nightly",
7
+ "build:miniApp": "SDK_TYPE=miniApp yarn build",
8
+ "build:smartPayment": "SDK_TYPE=smartPayment yarn build",
9
+ "build:client": "vite build",
10
+ "build:client:nightly": "NIGHTLY_BUILD=1 vite build",
11
+ "build:core": "vite build --config vite.config.core.ts",
12
+ "dev": "yarn dev:client & yarn dev:core",
13
+ "dev:client": "vite --host 0.0.0.0",
14
+ "dev:core": "vite --config vite.config.core.ts",
8
15
  "lint": "yarn lint:script && yarn lint:style",
9
16
  "lint:script": "eslint src test --ext .ts,.tsx,.vue",
10
17
  "lint:style": "stylelint src/**/*.{css,less,vue}",
11
18
  "format": "prettier --write '{src,test}/**/*.{ts,tsx,vue,less}'",
12
19
  "upgrade": "yarn upgrade-interactive",
13
20
  "test": "jest --silent --coverage",
14
- "test:watch": "jest --watch"
21
+ "test:watch": "jest --watch",
22
+ "preview": "DEV_MODE=preview yarn dev:client & vite preview --config vite.config.core.ts --port 4173"
15
23
  },
16
24
  "license": "MIT",
17
25
  "author": "paypay",
18
26
  "main": "dist/mini-app-js-sdk.es.js",
19
27
  "module": "dist/mini-app-js-sdk.es.js",
20
28
  "unpkg": "dist/mini-app-js-sdk.browser.js",
21
- "types": "dist/mini-app-js-sdk.d.ts",
29
+ "types": "dist/client/types.d.ts",
22
30
  "engines": {
23
31
  "node": ">=10.0.0"
24
32
  },
25
33
  "dependencies": {
26
- "js-cookie": "^3.0.1",
27
- "lottie-web": "^5.10.1",
28
- "pinia": "^2.0.28",
29
- "uuid": "^9.0.0",
30
- "vue": "^3.2.39"
34
+ "js-cookie": "^3.0.1"
31
35
  },
32
36
  "devDependencies": {
37
+ "uuid": "^8.3.2",
38
+ "vue": "^3.2.39",
39
+ "ua-parser-js": "^1.0.2",
40
+ "pinia": "^2.0.20",
41
+ "firebase": "^9.13.0",
42
+ "lottie-web": "^5.9.6",
33
43
  "@babel/core": "^7.15.5",
34
44
  "@babel/plugin-transform-typescript": "^7.15.4",
35
45
  "@babel/preset-env": "^7.15.4",
@@ -38,8 +48,10 @@
38
48
  "@rollup/plugin-replace": "^3.0.0",
39
49
  "@testing-library/jest-dom": "^5.16.2",
40
50
  "@testing-library/vue": "^6.4.2",
51
+ "@types/ip": "^1.1.0",
41
52
  "@types/jest": "^26.0.24",
42
53
  "@types/js-cookie": "^2.2.7",
54
+ "@types/ua-parser-js": "^0.7.36",
43
55
  "@types/uuid": "^8.3.1",
44
56
  "@typescript-eslint/eslint-plugin": "^5.8.0",
45
57
  "@typescript-eslint/parser": "^4.31.0",
@@ -55,6 +67,7 @@
55
67
  "eslint-plugin-vue": "^7.17.0",
56
68
  "husky": "^7.0.2",
57
69
  "identity-obj-proxy": "^3.0.0",
70
+ "ip": "^1.1.8",
58
71
  "isomorphic-fetch": "^3.0.0",
59
72
  "jest": "^26.6.3",
60
73
  "jest-canvas-mock": "^2.3.1",
@@ -69,6 +82,7 @@
69
82
  "ts-jest": "^26.5.6",
70
83
  "typescript": "~4.4.2",
71
84
  "vite": "^2.9.15",
85
+ "vite-plugin-css-injected-by-js": "^2.1.0",
72
86
  "vite-plugin-dts": "^0.9.10",
73
87
  "vue-eslint-parser": "^7.11.0",
74
88
  "vue-jest": "5.0.0-alpha.9",
@@ -1,20 +0,0 @@
1
- export declare type CurrentTime = {
2
- days: number;
3
- hours: number;
4
- total: number;
5
- minutes: number;
6
- seconds: number;
7
- milliseconds: number;
8
- };
9
- export declare type UseCountDownOptions = {
10
- time: number;
11
- millisecond?: boolean;
12
- onChange?: (current: CurrentTime) => void;
13
- onFinish?: () => void;
14
- };
15
- export declare function useCountDown(options: UseCountDownOptions): {
16
- start: () => void;
17
- pause: () => void;
18
- reset: (totalTime?: number) => void;
19
- current: import("vue").ComputedRef<CurrentTime>;
20
- };
@@ -1,8 +0,0 @@
1
- import { Ref } from 'vue';
2
- export declare let supportsPassive: boolean;
3
- export declare type UseEventListenerOptions = {
4
- target?: EventTarget | Ref<EventTarget | undefined>;
5
- capture?: boolean;
6
- passive?: boolean;
7
- };
8
- export declare function useEventListener(type: string, listener: EventListener, options?: UseEventListenerOptions): void;
@@ -1 +0,0 @@
1
- export declare function onMountedOrActivated(hook: () => unknown): void;
package/dist/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import { PayPayJsBridge } from './mini-app-js-sdk';
2
- declare const paypayJsBridge: PayPayJsBridge;
3
- export default paypayJsBridge;
@@ -1,3 +0,0 @@
1
- import { JsBridge } from '../jsbridge';
2
- export declare function exposeJsBridge(jsBridge: JsBridge): boolean;
3
- export declare function exposePayPayJsBridge(paypayJsBridge: unknown): boolean;
@@ -1,16 +0,0 @@
1
- import { JsBridge, NativeParams } from './jsbridge';
2
- import { JsBridgeModule, JsBridgeModuleConstructor } from './module';
3
- export declare class PayPayJsBridgeBase {
4
- jsBridge: JsBridge;
5
- instances: Record<string, JsBridgeModule>;
6
- state: {
7
- executing: boolean;
8
- };
9
- constructor(jsBridge: JsBridge);
10
- isExecutableService(params: NativeParams<never>): boolean;
11
- }
12
- export interface PayPayJsBridgeBaseConstructor {
13
- new (jsBridge: JsBridge): PayPayJsBridgeBase;
14
- readonly prototype: PayPayJsBridgeBase;
15
- }
16
- export declare function composePayPayJsBridge(bridgeConstructor: PayPayJsBridgeBaseConstructor, ...moduleConstructors: JsBridgeModuleConstructor[]): void;
@@ -1,10 +0,0 @@
1
- import { PayPayJsBridgeBase } from './jsbridge-core/paypay-jsbridge';
2
- import { JsBridge } from './jsbridge-core/jsbridge';
3
- import { MiniAppModule } from './mini-app-api';
4
- export declare class PayPayJsBridge extends PayPayJsBridgeBase {
5
- }
6
- export interface PayPayJsBridge extends MiniAppModule {
7
- }
8
- export declare const jsBridge: JsBridge;
9
- export declare const pp: PayPayJsBridge;
10
- export default pp;