@paypay/mini-app-js-sdk 1.65.0 → 2.0.0-beta.1

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 (182) 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 +4 -3
  8. package/dist/mini-app-js-sdk.browser.js +2 -1
  9. package/dist/mini-app-js-sdk.es.js +660 -44604
  10. package/dist/model/bridge/getKycPassportInfo.d.ts +2 -3
  11. package/dist/model/bridge/render.d.ts +4 -0
  12. package/dist/model/bridge/renderPayButton.d.ts +8 -1
  13. package/dist/model/bridge/showStorageAccessPermissionAlert.d.ts +2 -0
  14. package/dist/model/bridge/verifyMultiFactorAuthResult.d.ts +2 -3
  15. package/dist/model/miniAppError.d.ts +2 -1
  16. package/dist/package/button/index.d.ts +1 -1
  17. package/dist/types.d.ts +154 -8
  18. package/dist/utils/api.d.ts +2 -1
  19. package/dist/utils/fetch.d.ts +1 -0
  20. package/dist/utils/helper.d.ts +5 -0
  21. package/dist/utils/ip.d.ts +1 -1
  22. package/dist/utils/storage.d.ts +20 -13
  23. package/package.json +23 -10
  24. package/dist/composition-api/dom/useCountDown.d.ts +0 -20
  25. package/dist/composition-api/dom/useEventListener.d.ts +0 -8
  26. package/dist/composition-api/dom/useOnMountedOrActivated.d.ts +0 -1
  27. package/dist/index.d.ts +0 -3
  28. package/dist/jsbridge-core/lib/browser.d.ts +0 -3
  29. package/dist/jsbridge-core/paypay-jsbridge.d.ts +0 -16
  30. package/dist/mini-app-js-sdk.d.ts +0 -10
  31. package/dist/mini-app-js-sdk.min.css +0 -1
  32. package/dist/model/OPAErrorCodes.d.ts +0 -4
  33. package/dist/model/bridge/index.d.ts +0 -47
  34. package/dist/package/action-sheet/index.d.ts +0 -123
  35. package/dist/package/banner-header/index.vue.d.ts +0 -71
  36. package/dist/package/button/LoadingIndicator.vue.d.ts +0 -2
  37. package/dist/package/charge-amount-list/index.vue.d.ts +0 -100
  38. package/dist/package/charge-amount-more-list/index.vue.d.ts +0 -25
  39. package/dist/package/date-button/index.vue.d.ts +0 -21
  40. package/dist/package/desktop-header/index.d.ts +0 -26
  41. package/dist/package/divider/index.d.ts +0 -24
  42. package/dist/package/header/index.d.ts +0 -99
  43. package/dist/package/input/currency/index.d.ts +0 -124
  44. package/dist/package/input/email/index.d.ts +0 -137
  45. package/dist/package/input/text/index.d.ts +0 -151
  46. package/dist/package/input/utils.d.ts +0 -6
  47. package/dist/package/input/zip/index.d.ts +0 -107
  48. package/dist/package/lottie/index.d.ts +0 -77
  49. package/dist/package/overlay/index.d.ts +0 -52
  50. package/dist/package/payment-method/Bank.vue.d.ts +0 -59
  51. package/dist/package/payment-method/CreditCard.vue.d.ts +0 -55
  52. package/dist/package/payment-method/PayLaterCC.vue.d.ts +0 -544
  53. package/dist/package/payment-method/SbidBank.vue.d.ts +0 -545
  54. package/dist/package/payment-method/Wallet.vue.d.ts +0 -549
  55. package/dist/package/payment-method/index.d.ts +0 -32
  56. package/dist/package/payment-method-list/index.vue.d.ts +0 -58
  57. package/dist/package/payment-type/Bank.vue.d.ts +0 -46
  58. package/dist/package/payment-type/CreditCard.vue.d.ts +0 -56
  59. package/dist/package/payment-type/PayLaterCC.vue.d.ts +0 -555
  60. package/dist/package/payment-type/Sbid.vue.d.ts +0 -544
  61. package/dist/package/payment-type/Wallet.vue.d.ts +0 -558
  62. package/dist/package/payment-type/index.d.ts +0 -38
  63. package/dist/package/select-list/Components.d.ts +0 -130
  64. package/dist/package/select-list/index.d.ts +0 -109
  65. package/dist/package/skeleton-loader/SkeletonLoader.vue.d.ts +0 -18
  66. package/dist/package/wallet-breakdown/WalletBreakdown.vue.d.ts +0 -543
  67. package/dist/utils/uiConstants.d.ts +0 -1
  68. package/dist/utils/useBreakpoints.d.ts +0 -5
  69. package/dist/utils/utils.d.ts +0 -2
  70. package/dist/views/email-registration/App.vue.d.ts +0 -59
  71. package/dist/views/email-registration/hooks/callback.d.ts +0 -9
  72. package/dist/views/email-registration/hooks/const.d.ts +0 -1
  73. package/dist/views/email-registration/hooks/ui.d.ts +0 -23
  74. package/dist/views/email-registration/parts/AuthMailNotFoundSheet.vue.d.ts +0 -42
  75. package/dist/views/email-registration/parts/RegisterEmail.vue.d.ts +0 -76
  76. package/dist/views/email-registration/parts/SentEmailAuthDoneSheet.vue.d.ts +0 -24
  77. package/dist/views/email-registration/parts/SentEmailSheet.vue.d.ts +0 -54
  78. package/dist/views/error-sheet/Index.vue.d.ts +0 -608
  79. package/dist/views/get-bank-info/GetBankInfoWrapper.vue.d.ts +0 -44
  80. package/dist/views/get-bank-info/components/GetBankInfoPopup.vue.d.ts +0 -564
  81. package/dist/views/get-bank-info/components/PayoutMethodList.vue.d.ts +0 -35
  82. package/dist/views/get-bank-info/components/PayoutMethodView.vue.d.ts +0 -22
  83. package/dist/views/get-bank-info/types.d.ts +0 -29
  84. package/dist/views/get-kyc-passport/GetKycPassportFallbackBiometricAuth.vue.d.ts +0 -541
  85. package/dist/views/get-kyc-passport/GetKycPassportOTPExpiredError.vue.d.ts +0 -539
  86. package/dist/views/get-kyc-passport/GetKycPassportOverVerifiLimitError.vue.d.ts +0 -539
  87. package/dist/views/get-kyc-passport/GetKycPassportRootView.vue.d.ts +0 -36
  88. package/dist/views/get-user-address/App.vue.d.ts +0 -67
  89. package/dist/views/get-user-address/Sheet/AddSheet/Contents.vue.d.ts +0 -621
  90. package/dist/views/get-user-address/Sheet/AddSheet/DeleteHalfSheet.vue.d.ts +0 -542
  91. package/dist/views/get-user-address/Sheet/AddSheet/Footer.vue.d.ts +0 -585
  92. package/dist/views/get-user-address/Sheet/AddSheet/TagForm.vue.d.ts +0 -556
  93. package/dist/views/get-user-address/Sheet/AddSheet/constants.d.ts +0 -4
  94. package/dist/views/get-user-address/Sheet/AddSheet/index.vue.d.ts +0 -625
  95. package/dist/views/get-user-address/Sheet/App.vue.d.ts +0 -89
  96. package/dist/views/get-user-address/Sheet/DisplaySheet/Address.vue.d.ts +0 -566
  97. package/dist/views/get-user-address/Sheet/DisplaySheet/Footer.vue.d.ts +0 -548
  98. package/dist/views/get-user-address/Sheet/DisplaySheet/index.vue.d.ts +0 -632
  99. package/dist/views/get-user-address/Sheet/SelectedAddress/NoRegisteredAddressMessage.vue.d.ts +0 -532
  100. package/dist/views/get-user-address/Sheet/SelectedAddress/SelectedAddress.vue.d.ts +0 -555
  101. package/dist/views/get-user-address/Sheet/SelectedAddress/components/AddressInfo.vue.d.ts +0 -550
  102. package/dist/views/get-user-address/Sheet/SelectedAddress/components/Footer.vue.d.ts +0 -542
  103. package/dist/views/get-user-address/hooks/ui-hooks.d.ts +0 -57
  104. package/dist/views/get-user-address/store/error-handle.d.ts +0 -12
  105. package/dist/views/get-user-address/store/root.d.ts +0 -18
  106. package/dist/views/init-kyc-passport/App.vue.d.ts +0 -38
  107. package/dist/views/init-kyc-passport/UpdateWarning.vue.d.ts +0 -55
  108. package/dist/views/input-address/App.vue.d.ts +0 -40
  109. package/dist/views/input-address/hook/app.d.ts +0 -14
  110. package/dist/views/input-address/hook/error-handle.d.ts +0 -8
  111. package/dist/views/input-address/hook/root.d.ts +0 -10
  112. package/dist/views/make-payment/App.vue.d.ts +0 -6663
  113. package/dist/views/make-payment/Main.vue.d.ts +0 -6676
  114. package/dist/views/make-payment/Sheets/AddressInfo.vue.d.ts +0 -540
  115. package/dist/views/make-payment/Sheets/CashBackDetailList.vue.d.ts +0 -543
  116. package/dist/views/make-payment/Sheets/CashBackDetails/BirthdayConfirm.vue.d.ts +0 -535
  117. package/dist/views/make-payment/Sheets/CashBackDetails/BirthdayConfirmError.vue.d.ts +0 -531
  118. package/dist/views/make-payment/Sheets/CashBackDetails/FloatingButton.vue.d.ts +0 -29
  119. package/dist/views/make-payment/Sheets/CashBackDetails/hooks.d.ts +0 -27
  120. package/dist/views/make-payment/Sheets/CashBackDetails/index.vue.d.ts +0 -575
  121. package/dist/views/make-payment/Sheets/Charge/ChoosePaymentMethod.vue.d.ts +0 -610
  122. package/dist/views/make-payment/Sheets/Charge/TopContent.vue.d.ts +0 -735
  123. package/dist/views/make-payment/Sheets/Charge/TopInfo.vue.d.ts +0 -576
  124. package/dist/views/make-payment/Sheets/Charge/index.vue.d.ts +0 -1501
  125. package/dist/views/make-payment/Sheets/ChoosePayment.vue.d.ts +0 -575
  126. package/dist/views/make-payment/Sheets/CloseConfirmation.vue.d.ts +0 -521
  127. package/dist/views/make-payment/Sheets/Consult.vue.d.ts +0 -27
  128. package/dist/views/make-payment/Sheets/DuplicatePayment.vue.d.ts +0 -546
  129. package/dist/views/make-payment/Sheets/MaintenanceInfo.vue.d.ts +0 -20
  130. package/dist/views/make-payment/Sheets/PayMethod.vue.d.ts +0 -612
  131. package/dist/views/make-payment/Sheets/Payment.vue.d.ts +0 -738
  132. package/dist/views/make-payment/Sheets/PaymentCompletion/CashBackDetailRow.vue.d.ts +0 -42
  133. package/dist/views/make-payment/Sheets/PaymentCompletion/index.vue.d.ts +0 -631
  134. package/dist/views/make-payment/store/util-for-handle-error.d.ts +0 -16
  135. package/dist/views/make-payment/store.d.ts +0 -6328
  136. package/dist/views/make-payment/utils/paymentMethod.d.ts +0 -4
  137. package/dist/views/open-app/App.vue.d.ts +0 -546
  138. package/dist/views/open-map/App.vue.d.ts +0 -546
  139. package/dist/views/register-user-info/RegisterUserInfoCancelConfirmationSheet.vue.d.ts +0 -1184
  140. package/dist/views/register-user-info/RegisterUserInfoCategoryView.vue.d.ts +0 -1199
  141. package/dist/views/register-user-info/RegisterUserInfoDataPointGroup.vue.d.ts +0 -19
  142. package/dist/views/register-user-info/RegisterUserInfoErrorSheet.vue.d.ts +0 -7
  143. package/dist/views/register-user-info/RegisterUserInfoFooterView.vue.d.ts +0 -1184
  144. package/dist/views/register-user-info/RegisterUserInfoKycInfoSheet.vue.d.ts +0 -1189
  145. package/dist/views/register-user-info/RegisterUserInfoMailInfoSheet.vue.d.ts +0 -1189
  146. package/dist/views/register-user-info/RegisterUserInfoProgressView.vue.d.ts +0 -6
  147. package/dist/views/register-user-info/RegisterUserInfoRootView.vue.d.ts +0 -684
  148. package/dist/views/register-user-info/RegisterUserInfoUneditableDataView.vue.d.ts +0 -16
  149. package/dist/views/register-user-info/api.d.ts +0 -23
  150. package/dist/views/register-user-info/input/RegisterUserInfoEmailInput.vue.d.ts +0 -536
  151. package/dist/views/register-user-info/input/RegisterUserInfoSelectionButtonInput.vue.d.ts +0 -18
  152. package/dist/views/register-user-info/input/RegisterUserInfoSimpleInput.vue.d.ts +0 -34
  153. package/dist/views/register-user-info/store.d.ts +0 -448
  154. package/dist/views/register-user-info/types.d.ts +0 -32
  155. package/dist/views/register-user-info/utils.d.ts +0 -4
  156. package/dist/views/register-user-info/validators.d.ts +0 -10
  157. package/dist/views/registerPaymentFeatures/AutoTopupMethod.vue.d.ts +0 -140
  158. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesAmountErrorSheet.vue.d.ts +0 -98
  159. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesAmountSettingSheet.vue.d.ts +0 -99
  160. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesAutoTopupConfirmSheet.vue.d.ts +0 -100
  161. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesChooseAmount.vue.d.ts +0 -105
  162. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesChoosePaymentMethodSheet.vue.d.ts +0 -96
  163. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesDefaultErrorSheet.vue.d.ts +0 -96
  164. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesFooterUpdateWarning.vue.d.ts +0 -102
  165. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesFooterView.vue.d.ts +0 -96
  166. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesFooterViewWithEnableButton.vue.d.ts +0 -106
  167. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesMainView.vue.d.ts +0 -129
  168. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesRootView.vue.d.ts +0 -151
  169. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesSettingCompleteSheet.vue.d.ts +0 -99
  170. package/dist/views/registerPaymentFeatures/RegisterPaymentFeaturesTopupMethodSettingSheet.vue.d.ts +0 -99
  171. package/dist/views/registerPaymentFeatures/fallback-method/FallbackMethodAppUpdateWarning.vue.d.ts +0 -33
  172. package/dist/views/registerPaymentFeatures/store.d.ts +0 -95
  173. package/dist/views/show-alert/App.vue.d.ts +0 -42
  174. package/dist/views/show-update-warning/App.vue.d.ts +0 -548
  175. package/dist/views/smart-button/App.vue.d.ts +0 -100
  176. package/dist/views/sms-auth/App.vue.d.ts +0 -580
  177. package/dist/views/sms-auth/store.d.ts +0 -321
  178. package/dist/views/three-d-secure-sheet/ThreeDSecureSheet.vue.d.ts +0 -40
  179. package/dist/views/topup/App.vue.d.ts +0 -641
  180. package/dist/views/topup/BannerInfo.vue.d.ts +0 -35
  181. package/dist/views/topup/CashbackInfo.vue.d.ts +0 -571
  182. package/dist/views/topup/TopupCompletion.vue.d.ts +0 -548
@@ -1,3 +1,2 @@
1
- import { NativeParams } from '../../jsbridge-core/jsbridge';
2
- import { MiniAppResult } from '../../types';
3
- export declare function getKycPassportInfo(params: NativeParams<MiniAppResult>): Promise<void>;
1
+ import { GetKycPassportInfoParams } from '../../types';
2
+ export declare function getKycPassportInfo(params: GetKycPassportInfoParams): Promise<void>;
@@ -1,2 +1,6 @@
1
1
  import { RenderSmartButtonParams } from '../../types';
2
+ export declare function getRenderButtonInfo(params: RenderSmartButtonParams): Promise<{
3
+ data: import('../../types').SmartButtonParam;
4
+ preferredLanguage: string;
5
+ } | null>;
2
6
  export declare function render(params: RenderSmartButtonParams): void;
@@ -2,6 +2,13 @@ import { RenderSmartButtonParams, SmartButtonParam } from '../../types';
2
2
  export declare function getRenderPayInfo(params: RenderSmartButtonParams): Promise<{
3
3
  renderParams: RenderSmartButtonParams;
4
4
  data: SmartButtonParam;
5
- loggedIn: boolean;
6
5
  preferredLanguage: string;
6
+ isLoggedIn?: undefined;
7
+ isJustLoggedIn?: undefined;
8
+ } | {
9
+ renderParams: RenderSmartButtonParams;
10
+ data: SmartButtonParam;
11
+ isLoggedIn: boolean;
12
+ preferredLanguage: string;
13
+ isJustLoggedIn: boolean;
7
14
  } | null>;
@@ -0,0 +1,2 @@
1
+ import { ShowStorageAccessPermissionAlertParams } from '../../types';
2
+ export declare function showStorageAccessPermissionAlert(params: ShowStorageAccessPermissionAlertParams): void;
@@ -1,3 +1,2 @@
1
- import { NativeParams } from '../../jsbridge-core/jsbridge';
2
- import { MiniAppResult } from '../../types';
3
- export declare function verifyMultiFactorAuthResult(params: NativeParams<MiniAppResult>): Promise<void>;
1
+ import { VerifyMultiFactorAuthResultParams } from '../../types';
2
+ export declare function verifyMultiFactorAuthResult(params: VerifyMultiFactorAuthResultParams): Promise<void>;
@@ -58,7 +58,8 @@ export declare enum MiniAppErrorType {
58
58
  unacceptableOp = "UNACCEPTABLE_OP",
59
59
  kycUpdateRequired = "KYC_UPDATE_REQUIRED",
60
60
  notCompleted = "NOT_COMPLETED",
61
- kycValidationInProcess = "KYC_VALIDATION_IN_PROCESS"
61
+ kycValidationInProcess = "KYC_VALIDATION_IN_PROCESS",
62
+ storageAccessDenied = "STORAGE_ACCESS_DENIED"
62
63
  }
63
64
  export declare class MiniAppError extends Error {
64
65
  constructor(type: MiniAppErrorType);
@@ -83,8 +83,8 @@ export declare const Button: import("vue").DefineComponent<{
83
83
  type: ButtonType;
84
84
  name: string;
85
85
  class: string | Record<string, any>;
86
- disabled: boolean;
87
86
  loading: boolean;
87
+ disabled: boolean;
88
88
  block: boolean;
89
89
  size: ButtonSize;
90
90
  tabIndex: number;
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;
@@ -266,6 +278,10 @@ export interface RegisterKycParams extends NativeParams<unknown> {
266
278
  export interface InitKycPassportParams extends NativeParams<unknown> {
267
279
  eKycDocuments?: Array<string>;
268
280
  callbackUrl: string;
281
+ isSkipKYCRequiredHalfsheet?: boolean;
282
+ }
283
+ export interface GetKycPassportInfoParams extends NativeParams<unknown> {
284
+ url: string;
269
285
  }
270
286
  export interface StartMultiFactorAuthParams extends NativeParams<MiniAppResult> {
271
287
  type: string;
@@ -286,11 +302,14 @@ export interface RenderSmartButtonParams extends NativeParams<MiniAppResult> {
286
302
  orderInfo?: SmartPayParams;
287
303
  autoInvoke?: boolean;
288
304
  callback?: () => void;
305
+ getDefault?: boolean;
306
+ renderId?: string;
289
307
  }
290
308
  export interface SmartButtonParam {
291
309
  title: string;
292
310
  avatarUrl?: string;
293
311
  cashbackInfo?: string;
312
+ localStorageAvailable?: boolean;
294
313
  }
295
314
  declare type SmartPayCurrency = 'JPY';
296
315
  interface SmartPayAmount {
@@ -393,21 +412,19 @@ export declare enum PpLocalStorageKey {
393
412
  lastTopup = "ppjssdk.lastTopup",
394
413
  appDetail = "ppjssdk.appDetail",
395
414
  appConfig = "ppjssdk.appConfig",
396
- clientId = "ppjssdk.clientId",
397
415
  userInfo = "ppjssdk.userInfo",
398
416
  lastPaymentMethod = "ppjssdk.lastPaymentMethod",
399
417
  lastTopupPayMethod = "ppjssdk.lastTopupPayMethod",
400
- codeVerifier = "ppjssdk.codeVerifier"
418
+ codeVerifier = "ppjssdk.codeVerifier",
419
+ clientOrigin = "ppjssdk.clientOrigin",
420
+ clientVersion = "ppjssdk.clientVersion",
421
+ debugMode = "ppjssdk.debugMode",
422
+ merchant = "ppjssdk.merchant"
401
423
  }
402
424
  export declare enum KycPassportMethod {
403
425
  biometric = "BIOMETRIC",
404
426
  otp = "OTP"
405
427
  }
406
- export declare enum CookieDuration {
407
- oneDay = 1,
408
- oneMonth = 30,
409
- oneYear = 365
410
- }
411
428
  export declare enum RenderType {
412
429
  COVER = "cover",
413
430
  CONTAIN = "contain"
@@ -470,6 +487,7 @@ interface AuthStatusFailResult extends MiniAppErrorResultType {
470
487
  challengeMethod: ChallengeMethod;
471
488
  } | null;
472
489
  }
490
+ export declare type ResultErrorType = MiniAppErrorResultType | AuthStatusFailResult;
473
491
  export interface GetAuthStatusParams extends NativeParams<MiniAppResult, AuthStatusFailResult> {
474
492
  isInternal?: boolean;
475
493
  }
@@ -480,6 +498,9 @@ export declare type ErrorSheetButton = {
480
498
  actionType?: undefined;
481
499
  };
482
500
  export interface ScanCodeParams extends NativeParams<MiniAppResult> {
501
+ redirectUrlOnCancel: string;
502
+ }
503
+ export interface ScanCodeClientParams extends NativeParams<MiniAppResult> {
483
504
  redirectUrlOnCancel?: string;
484
505
  }
485
506
  export interface LogAppsFlyerEventParams extends NativeParams<void> {
@@ -506,6 +527,131 @@ export interface GetUserPaymentFeatureSettingsParams extends NativeParams<MiniAp
506
527
  merchant?: string;
507
528
  productType?: string;
508
529
  }
530
+ export declare const PPFunctionResult: {
531
+ readonly success: "success";
532
+ readonly fail: "fail";
533
+ readonly complete: "complete";
534
+ };
535
+ export declare type PPFunctionResultType = typeof PPFunctionResult[keyof typeof PPFunctionResult];
536
+ export declare type CoreMessageData<T> = {
537
+ name: PPFunctionNameType;
538
+ result: PPFunctionResultType;
539
+ data?: MiniAppResult | MiniAppErrorResultType | T;
540
+ messageId: string;
541
+ };
542
+ export declare type CoreCallUtilMessageData = {
543
+ name: PPUtilFunctionNameType;
544
+ data?: unknown;
545
+ };
546
+ export declare type ClientMessageData = {
547
+ name: PPFunctionNameType;
548
+ params?: unknown;
549
+ messageId: string;
550
+ };
551
+ export declare type RenderButtonInfo = {
552
+ type: 'pay' | 'login';
553
+ renderId?: string;
554
+ };
555
+ export declare type PayButtonInfo = {
556
+ data: SmartButtonParam;
557
+ preferredLanguage: string;
558
+ isLoggedIn?: boolean;
559
+ isJustLoggedIn?: boolean;
560
+ };
561
+ export declare type CashbackResponse = {
562
+ unsigned?: {
563
+ resultInfo?: {
564
+ code?: string;
565
+ };
566
+ data?: {
567
+ normalCashbackPercentage?: string;
568
+ lotteryCashbackPercentage?: string;
569
+ };
570
+ };
571
+ };
572
+ export interface VerifyMultiFactorAuthResultParams extends NativeParams<MiniAppResult> {
573
+ sessionId: string | null;
574
+ }
575
+ export interface ShowStorageAccessPermissionAlertParams extends NativeParams<void> {
576
+ clientUrl: string;
577
+ }
578
+ export declare type LinkOption = {
579
+ url: string;
580
+ target?: string;
581
+ };
582
+ export declare type HandleMessageFromNativeParams = {
583
+ json: NativeResponse;
584
+ };
585
+ export declare const PPFunctionName: {
586
+ readonly init: "init";
587
+ readonly getBankInfo: "getBankInfo";
588
+ readonly showAlert: "showAlert";
589
+ readonly render: "render";
590
+ readonly makePayment: "makePayment";
591
+ readonly getUAID: "getUAID";
592
+ readonly logout: "logout";
593
+ readonly startMultiFactorAuth: "startMultiFactorAuth";
594
+ readonly verifyMultiFactorAuthResult: "verifyMultiFactorAuthResult";
595
+ readonly getPermissionStatus: "getPermissionStatus";
596
+ readonly registerKyc: "registerKyc";
597
+ readonly getKycInformation: "getKycInformation";
598
+ readonly getUserAddress: "getUserAddress";
599
+ readonly getUserLocation: "getUserLocation";
600
+ readonly getUserProfile: "getUserProfile";
601
+ readonly registerEmail: "registerEmail";
602
+ readonly showUpdateWarning: "showUpdateWarning";
603
+ readonly showErrorSheet: "showErrorSheet";
604
+ readonly getPlatformInformation: "getPlatformInformation";
605
+ readonly share: "share";
606
+ readonly setTitle: "setTitle";
607
+ readonly getTopBarHeight: "getTopBarHeight";
608
+ readonly openWebview: "openWebview";
609
+ readonly openMap: "openMap";
610
+ readonly closeApp: "closeApp";
611
+ readonly openApp: "openApp";
612
+ readonly checkPaymentMethod: "checkPaymentMethod";
613
+ readonly getBalance: "getBalance";
614
+ readonly topup: "topup";
615
+ readonly registerPaymentFeatures: "registerPaymentFeatures";
616
+ readonly registerUserInfo: "registerUserInfo";
617
+ readonly requestInternal: "requestInternal";
618
+ readonly scanCode: "scanCode";
619
+ readonly getAuthStatus: "getAuthStatus";
620
+ readonly openMiniApp: "openMiniApp";
621
+ readonly inputAddress: "inputAddress";
622
+ readonly checkAccessToken: "checkAccessToken";
623
+ readonly getCashbackInformation: "getCashbackInformation";
624
+ readonly request: "request";
625
+ readonly getDeviceInformation: "getDeviceInformation";
626
+ readonly debug: "debug";
627
+ readonly copyToClipboard: "copyToClipboard";
628
+ readonly createOrder: "createOrder";
629
+ readonly showStorageAccessPermissionAlert: "showStorageAccessPermissionAlert";
630
+ readonly handleMessageFromNative: "handleMessageFromNative";
631
+ readonly initKycPassport: "initKycPassport";
632
+ readonly smsAuth: "smsAuth";
633
+ readonly getKycPassportInfo: "getKycPassportInfo";
634
+ };
635
+ export declare type PPFunctionNameType = typeof PPFunctionName[keyof typeof PPFunctionName];
636
+ export declare const PPUtilFunctionName: {
637
+ readonly reload: "reload";
638
+ readonly link: "link";
639
+ readonly saveRefreshToken: "saveRefreshToken";
640
+ readonly makeVisible: "makeVisible";
641
+ readonly consoleDebugInfo: "consoleDebugInfo";
642
+ };
643
+ export declare type PPUtilFunctionNameType = typeof PPUtilFunctionName[keyof typeof PPUtilFunctionName];
644
+ export declare type SaveRefreshTokenOption = {
645
+ refreshToken: string;
646
+ domain: string;
647
+ isSecure: boolean;
648
+ };
649
+ export declare type ClientJsBridge = {
650
+ _handleMessageFromNative: (json: NativeResponse) => void;
651
+ };
652
+ export declare type ConsoleDebugInfoParams = {
653
+ params: unknown[];
654
+ };
509
655
  export declare const KycPassportUrlParam: {
510
656
  authType: string;
511
657
  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 };
@@ -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;
@@ -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,44 @@
1
1
  {
2
2
  "name": "@paypay/mini-app-js-sdk",
3
- "version": "1.65.0",
3
+ "version": "2.0.0-beta.1",
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
+ "lottie-web": "^5.9.6",
33
42
  "@babel/core": "^7.15.5",
34
43
  "@babel/plugin-transform-typescript": "^7.15.4",
35
44
  "@babel/preset-env": "^7.15.4",
@@ -38,8 +47,10 @@
38
47
  "@rollup/plugin-replace": "^3.0.0",
39
48
  "@testing-library/jest-dom": "^5.16.2",
40
49
  "@testing-library/vue": "^6.4.2",
50
+ "@types/ip": "^1.1.0",
41
51
  "@types/jest": "^26.0.24",
42
52
  "@types/js-cookie": "^2.2.7",
53
+ "@types/ua-parser-js": "^0.7.36",
43
54
  "@types/uuid": "^8.3.1",
44
55
  "@typescript-eslint/eslint-plugin": "^5.8.0",
45
56
  "@typescript-eslint/parser": "^4.31.0",
@@ -55,6 +66,7 @@
55
66
  "eslint-plugin-vue": "^7.17.0",
56
67
  "husky": "^7.0.2",
57
68
  "identity-obj-proxy": "^3.0.0",
69
+ "ip": "^1.1.8",
58
70
  "isomorphic-fetch": "^3.0.0",
59
71
  "jest": "^26.6.3",
60
72
  "jest-canvas-mock": "^2.3.1",
@@ -69,6 +81,7 @@
69
81
  "ts-jest": "^26.5.6",
70
82
  "typescript": "~4.4.2",
71
83
  "vite": "^2.9.15",
84
+ "vite-plugin-css-injected-by-js": "^2.1.0",
72
85
  "vite-plugin-dts": "^0.9.10",
73
86
  "vue-eslint-parser": "^7.11.0",
74
87
  "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;