@paypay/mini-app-js-sdk 1.15.0 → 1.19.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 (192) hide show
  1. package/dist/composition-api/dom/index.d.ts +4 -4
  2. package/dist/composition-api/dom/useEventListener.d.ts +8 -8
  3. package/dist/composition-api/dom/useHorizontalScrollDirective.d.ts +4 -4
  4. package/dist/composition-api/dom/useOnMountedOrActivated.d.ts +1 -1
  5. package/dist/composition-api/dom/useVerticalScrollDirective.d.ts +4 -4
  6. package/dist/composition-api/useErrorSheet.d.ts +3 -3
  7. package/dist/composition-api/useGetUserAddress.d.ts +2 -2
  8. package/dist/composition-api/useHeightProperties.d.ts +19 -19
  9. package/dist/composition-api/useInpuAddress.d.ts +2 -2
  10. package/dist/composition-api/useMakePayment.d.ts +3 -3
  11. package/dist/composition-api/useOpenApp.d.ts +3 -3
  12. package/dist/composition-api/useOpenMap.d.ts +3 -3
  13. package/dist/composition-api/useRegisterEmail.d.ts +2 -2
  14. package/dist/composition-api/useRenderSmartButton.d.ts +3 -0
  15. package/dist/composition-api/useShowAlert.d.ts +3 -3
  16. package/dist/composition-api/useShowUpdateWarning.d.ts +3 -3
  17. package/dist/composition-api/useTakePhoto.d.ts +3 -3
  18. package/dist/composition-api/useTopup.d.ts +3 -3
  19. package/dist/index.d.ts +3 -3
  20. package/dist/jsbridge-core/index.d.ts +4 -4
  21. package/dist/jsbridge-core/jsbridge.d.ts +62 -62
  22. package/dist/jsbridge-core/lib/browser.d.ts +3 -3
  23. package/dist/jsbridge-core/lib/logger.d.ts +9 -9
  24. package/dist/jsbridge-core/lib/reconstructParams.d.ts +2 -2
  25. package/dist/jsbridge-core/module.d.ts +15 -14
  26. package/dist/jsbridge-core/namespace.d.ts +2 -2
  27. package/dist/jsbridge-core/paypay-jsbridge.d.ts +17 -16
  28. package/dist/mini-app-api.d.ts +51 -48
  29. package/dist/mini-app-js-sdk.browser.js +1 -1
  30. package/dist/mini-app-js-sdk.d.ts +9 -9
  31. package/dist/mini-app-js-sdk.es.js +31001 -1
  32. package/dist/mini-app-js-sdk.min.css +1 -1
  33. package/dist/model/bridge/checkAccessToken.d.ts +3 -3
  34. package/dist/model/bridge/checkPaymentMethod.d.ts +2 -2
  35. package/dist/model/bridge/closeApp.d.ts +2 -2
  36. package/dist/model/bridge/copyToClipboard.d.ts +2 -2
  37. package/dist/model/bridge/debug.d.ts +3 -3
  38. package/dist/model/bridge/getAppDetail.d.ts +17 -17
  39. package/dist/model/bridge/getAuthStatus.d.ts +3 -0
  40. package/dist/model/bridge/getBalance.d.ts +2 -2
  41. package/dist/model/bridge/getConfigure.d.ts +39 -39
  42. package/dist/model/bridge/getDeviceInformation.d.ts +3 -3
  43. package/dist/model/bridge/getKycInformation.d.ts +2 -2
  44. package/dist/model/bridge/getPermissionStatus.d.ts +2 -2
  45. package/dist/model/bridge/getPlatformInformation.d.ts +3 -3
  46. package/dist/model/bridge/getSessionData.d.ts +2 -2
  47. package/dist/model/bridge/getStorageData.d.ts +2 -2
  48. package/dist/model/bridge/getTopBarHeight.d.ts +3 -3
  49. package/dist/model/bridge/getUAID.d.ts +3 -3
  50. package/dist/model/bridge/getUserAddress.d.ts +2 -2
  51. package/dist/model/bridge/getUserLocation.d.ts +2 -2
  52. package/dist/model/bridge/getUserProfile.d.ts +3 -3
  53. package/dist/model/bridge/index.d.ts +43 -41
  54. package/dist/model/bridge/init.d.ts +2 -2
  55. package/dist/model/bridge/inputAddress.d.ts +2 -2
  56. package/dist/model/bridge/logout.d.ts +3 -3
  57. package/dist/model/bridge/makePayment.d.ts +2 -2
  58. package/dist/model/bridge/openApp.d.ts +2 -2
  59. package/dist/model/bridge/openMap.d.ts +2 -2
  60. package/dist/model/bridge/openWebview.d.ts +3 -3
  61. package/dist/model/bridge/registerEmail.d.ts +2 -2
  62. package/dist/model/bridge/registerKyc.d.ts +2 -2
  63. package/dist/model/bridge/removeStorageData.d.ts +2 -2
  64. package/dist/model/bridge/render.d.ts +2 -0
  65. package/dist/model/bridge/renderLoginButton.d.ts +2 -0
  66. package/dist/model/bridge/renderPayButton.d.ts +2 -0
  67. package/dist/model/bridge/request.d.ts +2 -2
  68. package/dist/model/bridge/requestInternal.d.ts +2 -2
  69. package/dist/model/bridge/scanCode.d.ts +3 -3
  70. package/dist/model/bridge/setSessionData.d.ts +2 -2
  71. package/dist/model/bridge/setStorageData.d.ts +2 -2
  72. package/dist/model/bridge/setTitle.d.ts +2 -2
  73. package/dist/model/bridge/share.d.ts +2 -2
  74. package/dist/model/bridge/showAlert.d.ts +2 -2
  75. package/dist/model/bridge/showErrorSheet.d.ts +2 -2
  76. package/dist/model/bridge/showUpdateWarning.d.ts +2 -2
  77. package/dist/model/bridge/startMultiFactorAuth.d.ts +2 -2
  78. package/dist/model/bridge/takePhoto.d.ts +2 -2
  79. package/dist/model/bridge/topup.d.ts +2 -2
  80. package/dist/model/bridge/verifyMultiFactorAuthResult.d.ts +3 -3
  81. package/dist/model/makePayment.d.ts +324 -323
  82. package/dist/model/miniAppError.d.ts +57 -55
  83. package/dist/model/miniAppStatus.d.ts +9 -8
  84. package/dist/model/permission.d.ts +21 -18
  85. package/dist/model/uiComponents.d.ts +23 -23
  86. package/dist/package/action-sheet/index.d.ts +90 -78
  87. package/dist/package/banner-header/index.vue.d.ts +56 -48
  88. package/dist/package/button/index.d.ts +69 -57
  89. package/dist/package/charge-amount-list/index.vue.d.ts +54 -47
  90. package/dist/package/charge-amount-more-list/index.vue.d.ts +19 -17
  91. package/dist/package/date-button/index.vue.d.ts +21 -19
  92. package/dist/package/divider/index.d.ts +21 -19
  93. package/dist/package/header/index.d.ts +65 -54
  94. package/dist/package/index.d.ts +16 -16
  95. package/dist/package/input/index.d.ts +169 -141
  96. package/dist/package/input/utils.d.ts +10 -10
  97. package/dist/package/lottie/index.d.ts +61 -53
  98. package/dist/package/overlay/index.d.ts +44 -39
  99. package/dist/package/payment-method/Bank.vue.d.ts +35 -32
  100. package/dist/package/payment-method/CreditCard.vue.d.ts +42 -39
  101. package/dist/package/payment-method/SbidBank.vue.d.ts +21 -19
  102. package/dist/package/payment-method/Wallet.vue.d.ts +31 -29
  103. package/dist/package/payment-method/index.d.ts +15 -13
  104. package/dist/package/payment-method-list/index.vue.d.ts +27 -24
  105. package/dist/package/payment-type/Bank.vue.d.ts +31 -28
  106. package/dist/package/payment-type/{CrediCard.vue.d.ts → CreditCard.vue.d.ts} +32 -30
  107. package/dist/package/payment-type/Sbid.vue.d.ts +17 -15
  108. package/dist/package/payment-type/Wallet.vue.d.ts +17 -15
  109. package/dist/package/payment-type/index.d.ts +15 -13
  110. package/dist/package/select-list/Components.d.ts +65 -57
  111. package/dist/package/select-list/index.d.ts +73 -62
  112. package/dist/package/switch/index.d.ts +22 -17
  113. package/dist/types.d.ts +344 -299
  114. package/dist/utils/api.d.ts +147 -142
  115. package/dist/utils/common.d.ts +2 -2
  116. package/dist/utils/create/bem.d.ts +6 -6
  117. package/dist/utils/create/index.d.ts +5 -5
  118. package/dist/utils/fetch.d.ts +16 -16
  119. package/dist/utils/getImages.d.ts +5 -5
  120. package/dist/utils/getLanguage.d.ts +3 -3
  121. package/dist/utils/helper.d.ts +47 -40
  122. package/dist/utils/ip.d.ts +2 -2
  123. package/dist/utils/miniAppRequest.d.ts +9 -9
  124. package/dist/utils/popstateHandler.d.ts +4 -4
  125. package/dist/utils/secondary-list.d.ts +1 -1
  126. package/dist/utils/storage.d.ts +26 -22
  127. package/dist/views/email-registration/App.vue.d.ts +79 -71
  128. package/dist/views/email-registration/components/EmailButton.vue.d.ts +45 -37
  129. package/dist/views/email-registration/components/icons.d.ts +2 -2
  130. package/dist/views/email-registration/hooks/callback.d.ts +7 -7
  131. package/dist/views/email-registration/hooks/ui.d.ts +29 -29
  132. package/dist/views/email-registration/parts/RegisterEmail/RegisterEmail.vue.d.ts +52 -46
  133. package/dist/views/email-registration/parts/RegisterEmail/ResendEmailSheet.vue.d.ts +24 -19
  134. package/dist/views/error-sheet/Index.vue.d.ts +52 -43
  135. package/dist/views/get-user-address/App.vue.d.ts +44 -32
  136. package/dist/views/get-user-address/Sheet/AddSheet/Contents.vue.d.ts +73 -63
  137. package/dist/views/get-user-address/Sheet/AddSheet/DeleteHalfSheet.vue.d.ts +23 -18
  138. package/dist/views/get-user-address/Sheet/AddSheet/Footer.vue.d.ts +33 -29
  139. package/dist/views/get-user-address/Sheet/AddSheet/TagForm.vue.d.ts +35 -30
  140. package/dist/views/get-user-address/Sheet/AddSheet/constants.d.ts +4 -4
  141. package/dist/views/get-user-address/Sheet/AddSheet/index.vue.d.ts +83 -64
  142. package/dist/views/get-user-address/Sheet/App.vue.d.ts +62 -44
  143. package/dist/views/get-user-address/Sheet/DisplaySheet/Address.vue.d.ts +32 -25
  144. package/dist/views/get-user-address/Sheet/DisplaySheet/Footer.vue.d.ts +25 -10
  145. package/dist/views/get-user-address/Sheet/DisplaySheet/index.vue.d.ts +41 -24
  146. package/dist/views/get-user-address/hooks/ui-hooks.d.ts +14 -11
  147. package/dist/views/get-user-address/store/error-handle.d.ts +12 -12
  148. package/dist/views/get-user-address/store/root.d.ts +14 -12
  149. package/dist/views/input-address/App.vue.d.ts +36 -32
  150. package/dist/views/input-address/hook/app.d.ts +13 -13
  151. package/dist/views/input-address/hook/error-handle.d.ts +10 -10
  152. package/dist/views/input-address/hook/root.d.ts +10 -10
  153. package/dist/views/make-payment/App.vue.d.ts +52 -32
  154. package/dist/views/make-payment/Main.vue.d.ts +630 -590
  155. package/dist/views/make-payment/Sheets/AddressInfo.vue.d.ts +25 -0
  156. package/dist/views/make-payment/Sheets/CashBackDetailList.vue.d.ts +20 -16
  157. package/dist/views/make-payment/Sheets/CashBackDetails/BirthdayConfirm.vue.d.ts +19 -17
  158. package/dist/views/make-payment/Sheets/CashBackDetails/BirthdayConfirmError.vue.d.ts +16 -14
  159. package/dist/views/make-payment/Sheets/CashBackDetails/FloatingButton.vue.d.ts +24 -21
  160. package/dist/views/make-payment/Sheets/CashBackDetails/hooks.d.ts +26 -26
  161. package/dist/views/make-payment/Sheets/CashBackDetails/index.vue.d.ts +53 -50
  162. package/dist/views/make-payment/Sheets/Charge/ChoosePaymentMethod.vue.d.ts +32 -29
  163. package/dist/views/make-payment/Sheets/Charge/TopContent.vue.d.ts +80 -71
  164. package/dist/views/make-payment/Sheets/Charge/TopInfo.vue.d.ts +49 -44
  165. package/dist/views/make-payment/Sheets/Charge/index.vue.d.ts +522 -515
  166. package/dist/views/make-payment/Sheets/ChoosePayment.vue.d.ts +38 -34
  167. package/dist/views/make-payment/Sheets/Consult.vue.d.ts +23 -21
  168. package/dist/views/make-payment/Sheets/DuplicatePayment.vue.d.ts +27 -22
  169. package/dist/views/make-payment/Sheets/Payment.vue.d.ts +108 -71
  170. package/dist/views/make-payment/Sheets/PaymentCompletion/CashBackDetailRow.vue.d.ts +36 -33
  171. package/dist/views/make-payment/Sheets/PaymentCompletion/index.vue.d.ts +69 -62
  172. package/dist/views/make-payment/hooks/app-hooks.d.ts +568 -565
  173. package/dist/views/make-payment/hooks/ui-hooks.d.ts +72 -51
  174. package/dist/views/make-payment/store/age-confirm.d.ts +9 -9
  175. package/dist/views/make-payment/store/handle-error.d.ts +36 -36
  176. package/dist/views/make-payment/store/root.d.ts +22 -22
  177. package/dist/views/make-payment/store/util-for-handle-error.d.ts +16 -16
  178. package/dist/views/make-payment/utils/paymentMethod.d.ts +3 -3
  179. package/dist/views/open-app/App.vue.d.ts +28 -23
  180. package/dist/views/open-map/App.vue.d.ts +28 -23
  181. package/dist/views/show-alert/App.vue.d.ts +36 -29
  182. package/dist/views/show-update-warning/App.vue.d.ts +28 -23
  183. package/dist/views/smart-button/App.vue.d.ts +87 -0
  184. package/dist/views/take-photo/App.vue.d.ts +25 -20
  185. package/dist/views/take-photo/helper.d.ts +2 -2
  186. package/dist/views/topup/App.vue.d.ts +102 -95
  187. package/dist/views/topup/BannerInfo.vue.d.ts +23 -19
  188. package/dist/views/topup/CashbackInfo.vue.d.ts +44 -37
  189. package/dist/views/topup/TopupCompletion.vue.d.ts +26 -22
  190. package/package.json +26 -33
  191. package/dist/utils/mock-data/mockData.d.ts +0 -64
  192. package/dist/utils/ns.d.ts +0 -5
@@ -1,4 +1,4 @@
1
- export * from './useOnMountedOrActivated';
2
- export * from './useEventListener';
3
- export * from './useHorizontalScrollDirective';
4
- export * from './useVerticalScrollDirective';
1
+ export * from './useOnMountedOrActivated';
2
+ export * from './useEventListener';
3
+ export * from './useHorizontalScrollDirective';
4
+ export * from './useVerticalScrollDirective';
@@ -1,8 +1,8 @@
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
+ 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,4 +1,4 @@
1
- export declare const HORIZONTAL_SCROLL_KEY = "horizontal-scroll";
2
- export declare const useHorizontalScrollDirective: {
3
- mounted: (el: Element) => void;
4
- };
1
+ export declare const HORIZONTAL_SCROLL_KEY = "horizontal-scroll";
2
+ export declare const useHorizontalScrollDirective: {
3
+ mounted: (el: Element) => void;
4
+ };
@@ -1 +1 @@
1
- export declare function onMountedOrActivated(hook: () => unknown): void;
1
+ export declare function onMountedOrActivated(hook: () => unknown): void;
@@ -1,4 +1,4 @@
1
- export declare const VERTICAL_SCROLL_KEY = "vertical-scroll";
2
- export declare const useVerticalScrollDirective: {
3
- mounted: (el: Element) => void;
4
- };
1
+ export declare const VERTICAL_SCROLL_KEY = "vertical-scroll";
2
+ export declare const useVerticalScrollDirective: {
3
+ mounted: (el: Element) => void;
4
+ };
@@ -1,3 +1,3 @@
1
- import { ShowErrorSheetParams } from '../types';
2
- declare const initErrorSheet: (initErrorSheet: ShowErrorSheetParams) => void;
3
- export { initErrorSheet };
1
+ import { ShowErrorSheetParams } from '../types';
2
+ declare const initErrorSheet: (initErrorSheet: ShowErrorSheetParams) => void;
3
+ export { initErrorSheet };
@@ -1,2 +1,2 @@
1
- import { GetUserAddressParams } from '../types';
2
- export declare const initGetUserAddress: (params: GetUserAddressParams) => Promise<void>;
1
+ import { GetUserAddressParams } from '../types';
2
+ export declare const initGetUserAddress: (params: GetUserAddressParams) => Promise<void>;
@@ -1,19 +1,19 @@
1
- export declare function useGetHeights(): {
2
- statusBarHeight: number;
3
- navBarHeight: number;
4
- bottomHeight: number;
5
- isNative: boolean;
6
- };
7
- export declare function useGetHeightProperties(): {
8
- innerHeightProperty: string;
9
- bottomHeightProperty: string;
10
- fullFillHeightProperty: string;
11
- headerHeight: number;
12
- navBarHeight: number;
13
- statusBarHeight: number;
14
- bottomHeight: number;
15
- isNone: boolean;
16
- isCustom: boolean;
17
- isDefault: boolean;
18
- isNative: boolean;
19
- };
1
+ export declare function useGetHeights(): {
2
+ statusBarHeight: number;
3
+ navBarHeight: number;
4
+ bottomHeight: number;
5
+ isNative: boolean;
6
+ };
7
+ export declare function useGetHeightProperties(): {
8
+ innerHeightProperty: string;
9
+ bottomHeightProperty: string;
10
+ fullFillHeightProperty: string;
11
+ headerHeight: number;
12
+ navBarHeight: number;
13
+ statusBarHeight: number;
14
+ bottomHeight: number;
15
+ isNone: boolean;
16
+ isCustom: boolean;
17
+ isDefault: boolean;
18
+ isNative: boolean;
19
+ };
@@ -1,2 +1,2 @@
1
- import { InputAddressParams } from '../types';
2
- export declare const initInputAddress: (params: InputAddressParams) => Promise<void>;
1
+ import { InputAddressParams } from '../types';
2
+ export declare const initInputAddress: (params: InputAddressParams) => Promise<void>;
@@ -1,3 +1,3 @@
1
- import { MakePaymentParams } from '../types';
2
- declare const initMakePayment: (initMakePayment: MakePaymentParams) => void;
3
- export { initMakePayment };
1
+ import { MakePaymentParams } from '../types';
2
+ declare const initMakePayment: (initMakePayment: MakePaymentParams) => Promise<void>;
3
+ export { initMakePayment };
@@ -1,3 +1,3 @@
1
- import { OpenAppParams } from '../types';
2
- declare const initOpenApp: (initOpenApp: OpenAppParams) => void;
3
- export { initOpenApp };
1
+ import { OpenAppParams } from '../types';
2
+ declare const initOpenApp: (initOpenApp: OpenAppParams) => void;
3
+ export { initOpenApp };
@@ -1,3 +1,3 @@
1
- import { MapParams } from '../types';
2
- declare const initOpenMap: (initOpenMap: MapParams) => void;
3
- export { initOpenMap };
1
+ import { MapParams } from '../types';
2
+ declare const initOpenMap: (initOpenMap: MapParams) => void;
3
+ export { initOpenMap };
@@ -1,2 +1,2 @@
1
- import { NativeParams } from '../jsbridge-core';
2
- export declare function initRegisterEmail(initRegisterEmail: NativeParams<any, any, any>): Promise<void>;
1
+ import { NativeParams } from '../jsbridge-core';
2
+ export declare function initRegisterEmail(initRegisterEmail: NativeParams<any, any, any>): Promise<void>;
@@ -0,0 +1,3 @@
1
+ import { RenderSmartButtonParams, SmartButtonParam } from '../types';
2
+ declare const initSmartButton: (params: RenderSmartButtonParams, data: SmartButtonParam, preferredLanguage: string, isLoggedIn?: boolean) => void;
3
+ export { initSmartButton };
@@ -1,3 +1,3 @@
1
- import { ShowAlertParams } from '../types';
2
- declare const initAlertSheet: (initAlertSheet: ShowAlertParams) => void;
3
- export { initAlertSheet };
1
+ import { ShowAlertParams } from '../types';
2
+ declare const initAlertSheet: (initAlertSheet: ShowAlertParams) => void;
3
+ export { initAlertSheet };
@@ -1,3 +1,3 @@
1
- import { ShowUpdateWarningParams } from '../types';
2
- declare const initShowUpdateWarning: (params: ShowUpdateWarningParams) => void;
3
- export { initShowUpdateWarning };
1
+ import { ShowUpdateWarningParams } from '../types';
2
+ declare const initShowUpdateWarning: (params: ShowUpdateWarningParams) => void;
3
+ export { initShowUpdateWarning };
@@ -1,3 +1,3 @@
1
- import { TakePhotoParams } from '../types';
2
- declare const initTakePhoto: (initTakePhoto: TakePhotoParams) => void;
3
- export { initTakePhoto };
1
+ import { TakePhotoParams } from '../types';
2
+ declare const initTakePhoto: (initTakePhoto: TakePhotoParams) => void;
3
+ export { initTakePhoto };
@@ -1,3 +1,3 @@
1
- import { TopupParams } from '../types';
2
- declare const initTopup: (topupParams: TopupParams) => void;
3
- export { initTopup };
1
+ import { TopupParams } from '../types';
2
+ declare const initTopup: (topupParams: TopupParams) => void;
3
+ export { initTopup };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { PayPayJsBridge } from './mini-app-js-sdk';
2
- declare const paypayJsBridge: PayPayJsBridge;
3
- export default paypayJsBridge;
1
+ import { PayPayJsBridge } from './mini-app-js-sdk';
2
+ declare const paypayJsBridge: PayPayJsBridge;
3
+ export default paypayJsBridge;
@@ -1,4 +1,4 @@
1
- export * from './jsbridge';
2
- export * from './paypay-jsbridge';
3
- export * from './module';
4
- export * from './lib/browser';
1
+ export * from './jsbridge';
2
+ export * from './paypay-jsbridge';
3
+ export * from './module';
4
+ export * from './lib/browser';
@@ -1,62 +1,62 @@
1
- export interface WebKitMessageHandler {
2
- postMessage(message: unknown): void;
3
- }
4
- export interface WebKit {
5
- messageHandlers: Record<string, WebKitMessageHandler>;
6
- }
7
- export declare type AndroidMessageHandler = (message: string) => void;
8
- export interface WebViewWindow extends Window {
9
- webkit?: WebKit;
10
- messageHandlers?: Record<string, AndroidMessageHandler>;
11
- }
12
- export declare enum NativeResponseStatus {
13
- Succcess = "success",
14
- Fail = "fail",
15
- Complete = "complete"
16
- }
17
- export declare type Primitive = string | number | boolean;
18
- export interface NativeMessage {
19
- callbackId: string;
20
- params?: Record<string, Primitive | Record<string, Primitive>>;
21
- }
22
- export interface NativeResponseDataLegacy {
23
- status: number;
24
- msg: string;
25
- }
26
- export interface NativeResponseData {
27
- status: NativeResponseStatus;
28
- data: NativeSuccessResponseData | NativeErrorResponseData | NativeCompleteResponseData;
29
- }
30
- export interface NativeResponse {
31
- responseId: string;
32
- responseData: NativeResponseData | NativeResponseDataLegacy;
33
- }
34
- export declare type NativeResponseCallback = (data: NativeResponseData) => void;
35
- export declare type NativeCallback<R = unknown> = (arg?: R) => void;
36
- declare type NativeSuccessResponseData<T = unknown> = T | null;
37
- declare type NativeErrorResponseData<E = unknown> = E;
38
- declare type NativeCompleteResponseData<R = unknown> = R | null;
39
- export interface NativeParams<T, E, R> {
40
- success?: NativeCallback<NativeSuccessResponseData<T>>;
41
- fail?: NativeCallback<NativeErrorResponseData<E>>;
42
- complete?: NativeCallback<NativeCompleteResponseData<R>>;
43
- }
44
- export interface NativeOptions {
45
- transformResponse?(data: any): any;
46
- }
47
- export declare type MessageHandler = (response: NativeResponseData, callback: NativeResponseCallback) => void;
48
- export declare class JsBridge {
49
- version: unknown;
50
- messageHandlers: Map<string, MessageHandler>;
51
- responseCallbacks: Map<string, NativeResponseCallback>;
52
- private global;
53
- constructor(global: WebViewWindow);
54
- generateCallbackId(): string;
55
- registerHandler(handlerName: string, handler: MessageHandler): void;
56
- callHandler(handlerName: string, params: unknown, responseCallback?: NativeResponseCallback): void;
57
- callNative<T extends NativeParams<unknown, unknown, unknown>>(methodName: string, params?: T, options?: NativeOptions): void;
58
- private dispatchMessageToNative;
59
- private handleMessageFromNative;
60
- _handleMessageFromNative(message: NativeResponse): void;
61
- }
62
- export {};
1
+ export interface WebKitMessageHandler {
2
+ postMessage(message: unknown): void;
3
+ }
4
+ export interface WebKit {
5
+ messageHandlers: Record<string, WebKitMessageHandler>;
6
+ }
7
+ export declare type AndroidMessageHandler = (message: string) => void;
8
+ export interface WebViewWindow extends Window {
9
+ webkit?: WebKit;
10
+ messageHandlers?: Record<string, AndroidMessageHandler>;
11
+ }
12
+ export declare enum NativeResponseStatus {
13
+ Succcess = "success",
14
+ Fail = "fail",
15
+ Complete = "complete"
16
+ }
17
+ export declare type Primitive = string | number | boolean;
18
+ export interface NativeMessage {
19
+ callbackId: string;
20
+ params?: Record<string, Primitive | Record<string, Primitive>>;
21
+ }
22
+ export interface NativeResponseDataLegacy {
23
+ status: number;
24
+ msg: string;
25
+ }
26
+ export interface NativeResponseData {
27
+ status: NativeResponseStatus;
28
+ data: NativeSuccessResponseData | NativeErrorResponseData | NativeCompleteResponseData;
29
+ }
30
+ export interface NativeResponse {
31
+ responseId: string;
32
+ responseData: NativeResponseData | NativeResponseDataLegacy;
33
+ }
34
+ export declare type NativeResponseCallback = (data: NativeResponseData) => void;
35
+ export declare type NativeCallback<R = unknown> = (arg?: R) => void;
36
+ declare type NativeSuccessResponseData<T = unknown> = T | null;
37
+ declare type NativeErrorResponseData<E = unknown> = E;
38
+ declare type NativeCompleteResponseData<R = unknown> = R | null;
39
+ export interface NativeParams<T, E, R> {
40
+ success?: NativeCallback<NativeSuccessResponseData<T>>;
41
+ fail?: NativeCallback<NativeErrorResponseData<E>>;
42
+ complete?: NativeCallback<NativeCompleteResponseData<R>>;
43
+ }
44
+ export interface NativeOptions {
45
+ transformResponse?(data: any): any;
46
+ }
47
+ export declare type MessageHandler = (response: NativeResponseData, callback: NativeResponseCallback) => void;
48
+ export declare class JsBridge {
49
+ version: string;
50
+ messageHandlers: Map<string, MessageHandler>;
51
+ responseCallbacks: Map<string, NativeResponseCallback>;
52
+ private global;
53
+ constructor(global: WebViewWindow);
54
+ generateCallbackId(): string;
55
+ registerHandler(handlerName: string, handler: MessageHandler): void;
56
+ callHandler(handlerName: string, params: unknown, responseCallback?: NativeResponseCallback): void;
57
+ callNative<T extends NativeParams<unknown, unknown, unknown>>(methodName: string, params?: T, options?: NativeOptions): void;
58
+ private dispatchMessageToNative;
59
+ private handleMessageFromNative;
60
+ _handleMessageFromNative(message: NativeResponse): void;
61
+ }
62
+ export {};
@@ -1,3 +1,3 @@
1
- import { JsBridge } from '../jsbridge';
2
- export declare function exposeJsBridge(jsBridge: JsBridge): boolean;
3
- export declare function exposePayPayJsBridge(paypayJsBridge: unknown): boolean;
1
+ import { JsBridge } from '../jsbridge';
2
+ export declare function exposeJsBridge(jsBridge: JsBridge): boolean;
3
+ export declare function exposePayPayJsBridge(paypayJsBridge: unknown): boolean;
@@ -1,9 +1,9 @@
1
- export declare type LogLevel = 'error' | 'warn' | 'info' | 'log' | 'debug';
2
- declare const _default: {
3
- error: (...message: any[]) => void;
4
- warn: (...message: any[]) => void;
5
- info: (...message: any[]) => void;
6
- log: (...message: any[]) => void;
7
- debug: (...message: any[]) => void;
8
- };
9
- export default _default;
1
+ export declare type LogLevel = 'error' | 'warn' | 'info' | 'log' | 'debug';
2
+ declare const _default: {
3
+ error: (...message: any[]) => void;
4
+ warn: (...message: any[]) => void;
5
+ info: (...message: any[]) => void;
6
+ log: (...message: any[]) => void;
7
+ debug: (...message: any[]) => void;
8
+ };
9
+ export default _default;
@@ -1,2 +1,2 @@
1
- import { NativeParams } from '../jsbridge';
2
- export declare function reconstructParams(params: NativeParams<any, any, any>): void;
1
+ import { NativeParams } from '../jsbridge';
2
+ export declare function reconstructParams(params: NativeParams<any, any, any>): void;
@@ -1,14 +1,15 @@
1
- import { JsBridge, NativeParams } from './jsbridge';
2
- export declare type NativeMethod<T = never, E = unknown, R = unknown> = (params?: NativeParams<T, E, R> & T) => unknown;
3
- export declare abstract class JsBridgeModule {
4
- jsBridge: JsBridge;
5
- instances: Record<string, JsBridgeModule>;
6
- state: {
7
- executing: boolean;
8
- };
9
- isExecutableService: (params: NativeParams<unknown, unknown, unknown>) => boolean;
10
- }
11
- export interface JsBridgeModuleConstructor<M extends JsBridgeModule = JsBridgeModule> {
12
- new (jsBridge: JsBridge): M;
13
- readonly prototype: M;
14
- }
1
+ import { MiniAppErrorResultType } from '../types';
2
+ import { JsBridge, NativeParams } from './jsbridge';
3
+ export declare type NativeMethod<T = never, E = unknown, R = unknown> = (params?: NativeParams<T, E, R> & T) => unknown;
4
+ export declare abstract class JsBridgeModule {
5
+ jsBridge: JsBridge;
6
+ instances: Record<string, JsBridgeModule>;
7
+ state: {
8
+ executing: boolean;
9
+ };
10
+ isExecutableService: (params: NativeParams<never, MiniAppErrorResultType, void>) => boolean;
11
+ }
12
+ export interface JsBridgeModuleConstructor<M extends JsBridgeModule = JsBridgeModule> {
13
+ new (jsBridge: JsBridge): M;
14
+ readonly prototype: M;
15
+ }
@@ -1,2 +1,2 @@
1
- export declare const jsBridgeNamespace = "_PayPayJsBridge";
2
- export declare const paypayNamespaces: string[];
1
+ export declare const jsBridgeNamespace = "_PayPayJsBridge";
2
+ export declare const paypayNamespaces: string[];
@@ -1,16 +1,17 @@
1
- import { JsBridgeModule, JsBridgeModuleConstructor } from './module';
2
- import { JsBridge, NativeParams } from './jsbridge';
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<unknown, unknown, unknown>): 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
+ import { JsBridgeModule, JsBridgeModuleConstructor } from './module';
2
+ import { JsBridge, NativeParams } from './jsbridge';
3
+ import { MiniAppErrorResultType } from '../types';
4
+ export declare class PayPayJsBridgeBase {
5
+ jsBridge: JsBridge;
6
+ instances: Record<string, JsBridgeModule>;
7
+ state: {
8
+ executing: boolean;
9
+ };
10
+ constructor(jsBridge: JsBridge);
11
+ isExecutableService(params: NativeParams<never, MiniAppErrorResultType, void>): boolean;
12
+ }
13
+ export interface PayPayJsBridgeBaseConstructor {
14
+ new (jsBridge: JsBridge): PayPayJsBridgeBase;
15
+ readonly prototype: PayPayJsBridgeBase;
16
+ }
17
+ export declare function composePayPayJsBridge(bridgeConstructor: PayPayJsBridgeBaseConstructor, ...moduleConstructors: JsBridgeModuleConstructor[]): void;
@@ -1,48 +1,51 @@
1
- import { JsBridge, JsBridgeModule, NativeParams } from './jsbridge-core';
2
- import { CopyToClipBoardParams, GetDataParams, GetPermissionStatusParams, InitParams, InputAddressParams, MakePaymentParams, MapParams, MiniAppResult, OpenAppParams, OpenWebviewParams, ShowErrorSheetParams, RequestParams, RequestInternalParams, SetDataParams, ShowAlertParams, ShowUpdateWarningParams, TopupParams, TakePhotoParams, ShareParams, GetUserLocationParams, GetBalanceParams, CloseAppParams, GetUserAddressParams, GetKycInformationParams, CheckPaymentMethodParams, SetTitleParams, SetEnablePullDownRefreshParams, RegisterKycParams, StartMultiFactorAuthParams } from './types';
3
- export declare class MiniAppModule extends JsBridgeModule {
4
- constructor(jsBridge: JsBridge);
5
- private detectMode;
6
- init(params: InitParams): void;
7
- copyToClipboard(params: CopyToClipBoardParams): void;
8
- openWebview(params: OpenWebviewParams): void;
9
- openMap(params: MapParams): void;
10
- closeApp(params: CloseAppParams): void;
11
- request(params: RequestParams): void;
12
- requestInternal(params: RequestInternalParams): void;
13
- getUAID(params: NativeParams<MiniAppResult, unknown, void>): void;
14
- getBalance(params: GetBalanceParams): void;
15
- makePayment(params: MakePaymentParams): void;
16
- getUserProfile(params: NativeParams<MiniAppResult, unknown, void>): void;
17
- topup(params: TopupParams): void;
18
- setSessionData(params: SetDataParams): void;
19
- getSessionData(params: GetDataParams): void;
20
- setStorageData(params: SetDataParams): void;
21
- getStorageData(params: GetDataParams): void;
22
- removeStorageData(params: GetDataParams): void;
23
- getPermissionStatus(params: GetPermissionStatusParams): void;
24
- scanCode(params: NativeParams<MiniAppResult, unknown, void>): void;
25
- showAlert(params: ShowAlertParams): void;
26
- showErrorSheet(params: ShowErrorSheetParams): void;
27
- getTopBarHeight(params: NativeParams<MiniAppResult, unknown, void>): void;
28
- setTitle(params: SetTitleParams): void;
29
- showUpdateWarning(params: ShowUpdateWarningParams): void;
30
- getPlatformInformation(params: NativeParams<MiniAppResult, unknown, void>): void;
31
- getDeviceInformation(params: NativeParams<MiniAppResult, unknown, void>): void;
32
- openApp(params: OpenAppParams): void;
33
- share(params: ShareParams): void;
34
- getKycInformation(params: GetKycInformationParams): void;
35
- getUserAddress(params: GetUserAddressParams): void;
36
- inputAddress(params: InputAddressParams): void;
37
- getUserLocation(params?: GetUserLocationParams): void;
38
- takePhoto(params?: TakePhotoParams): void;
39
- checkPaymentMethod(params?: CheckPaymentMethodParams): void;
40
- debug(params: NativeParams<MiniAppResult, unknown, void>): void;
41
- checkAccessToken(params: NativeParams<MiniAppResult, unknown, void>): void;
42
- registerEmail(params: NativeParams<any, any, any>): void;
43
- setEnablePullDownRefresh(params?: SetEnablePullDownRefreshParams): void;
44
- registerKyc(params: RegisterKycParams): void;
45
- startMultiFactorAuth(params: StartMultiFactorAuthParams): void;
46
- logout(params: NativeParams<MiniAppResult, unknown, void>): void;
47
- verifyMultiFactorAuthResult(params: NativeParams<MiniAppResult, unknown, void>): void;
48
- }
1
+ import { JsBridge, JsBridgeModule, NativeParams } from './jsbridge-core';
2
+ import { CopyToClipBoardParams, GetDataParams, GetPermissionStatusParams, InitParams, InputAddressParams, MakePaymentParams, MapParams, MiniAppResult, OpenAppParams, OpenWebviewParams, ShowErrorSheetParams, RequestParams, RequestInternalParams, SetDataParams, ShowAlertParams, ShowUpdateWarningParams, TopupParams, TakePhotoParams, ShareParams, GetUserLocationParams, GetBalanceParams, CloseAppParams, GetUserAddressParams, GetKycInformationParams, CheckPaymentMethodParams, SetTitleParams, SetEnablePullDownRefreshParams, RegisterKycParams, StartMultiFactorAuthParams, RenderSmartButtonParams } from './types';
3
+ export declare class MiniAppModule extends JsBridgeModule {
4
+ constructor(jsBridge: JsBridge);
5
+ private detectMode;
6
+ init(params: InitParams): void;
7
+ copyToClipboard(params: CopyToClipBoardParams): void;
8
+ openWebview(params: OpenWebviewParams): void;
9
+ openMap(params: MapParams): void;
10
+ closeApp(params: CloseAppParams): void;
11
+ request(params: RequestParams): void;
12
+ requestInternal(params: RequestInternalParams): void;
13
+ getUAID(params: NativeParams<MiniAppResult, unknown, void>): void;
14
+ getBalance(params: GetBalanceParams): void;
15
+ getAuthStatus(params: NativeParams<MiniAppResult, unknown, void>): void;
16
+ makePayment(params: MakePaymentParams): void;
17
+ createOrder(params: MakePaymentParams): void;
18
+ getUserProfile(params: NativeParams<MiniAppResult, unknown, void>): void;
19
+ topup(params: TopupParams): void;
20
+ setSessionData(params: SetDataParams): void;
21
+ getSessionData(params: GetDataParams): void;
22
+ setStorageData(params: SetDataParams): void;
23
+ getStorageData(params: GetDataParams): void;
24
+ removeStorageData(params: GetDataParams): void;
25
+ getPermissionStatus(params: GetPermissionStatusParams): void;
26
+ scanCode(params: NativeParams<MiniAppResult, unknown, void>): void;
27
+ showAlert(params: ShowAlertParams): void;
28
+ showErrorSheet(params: ShowErrorSheetParams): void;
29
+ getTopBarHeight(params: NativeParams<MiniAppResult, unknown, void>): void;
30
+ setTitle(params: SetTitleParams): void;
31
+ showUpdateWarning(params: ShowUpdateWarningParams): void;
32
+ getPlatformInformation(params: NativeParams<MiniAppResult, unknown, void>): void;
33
+ getDeviceInformation(params: NativeParams<MiniAppResult, unknown, void>): void;
34
+ openApp(params: OpenAppParams): void;
35
+ share(params: ShareParams): void;
36
+ getKycInformation(params: GetKycInformationParams): void;
37
+ getUserAddress(params: GetUserAddressParams): void;
38
+ inputAddress(params: InputAddressParams): void;
39
+ getUserLocation(params?: GetUserLocationParams): void;
40
+ takePhoto(params?: TakePhotoParams): void;
41
+ checkPaymentMethod(params?: CheckPaymentMethodParams): void;
42
+ debug(params: NativeParams<MiniAppResult, unknown, void>): void;
43
+ checkAccessToken(params: NativeParams<MiniAppResult, unknown, void>): void;
44
+ registerEmail(params: NativeParams<any, any, any>): void;
45
+ setEnablePullDownRefresh(params?: SetEnablePullDownRefreshParams): void;
46
+ registerKyc(params: RegisterKycParams): void;
47
+ startMultiFactorAuth(params: StartMultiFactorAuthParams): void;
48
+ logout(params: NativeParams<MiniAppResult, unknown, void>): void;
49
+ verifyMultiFactorAuthResult(params: NativeParams<MiniAppResult, unknown, void>): void;
50
+ render(params: RenderSmartButtonParams): void;
51
+ }