@paypay/mini-app-js-sdk 1.65.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 (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 +153 -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 +24 -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;
@@ -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,6 +497,9 @@ 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
  }
485
505
  export interface LogAppsFlyerEventParams extends NativeParams<void> {
@@ -506,6 +526,131 @@ export interface GetUserPaymentFeatureSettingsParams extends NativeParams<MiniAp
506
526
  merchant?: string;
507
527
  productType?: string;
508
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
+ };
509
654
  export declare const KycPassportUrlParam: {
510
655
  authType: string;
511
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 };
@@ -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,45 @@
1
1
  {
2
2
  "name": "@paypay/mini-app-js-sdk",
3
- "version": "1.65.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;