@paypay/mini-app-js-sdk 2.41.0 → 2.48.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 (61) hide show
  1. package/dist/client/clientUtils.d.ts +2 -1
  2. package/dist/client/communicationWithCore.d.ts +16 -0
  3. package/dist/client/functions/copyToClipboard.d.ts +2 -0
  4. package/dist/client/functions/coreWindowBridgeFunctions.d.ts +12 -0
  5. package/dist/client/functions/getKycPassportInfo.d.ts +3 -0
  6. package/dist/client/functions/logout.d.ts +6 -0
  7. package/dist/client/functions/renderCoupons.d.ts +6 -0
  8. package/dist/client/functions/scanCode.d.ts +2 -0
  9. package/dist/client/functions/setTitle.d.ts +2 -0
  10. package/dist/client/functions/share.d.ts +2 -0
  11. package/dist/client/functions/storageFunctions.d.ts +6 -0
  12. package/dist/client/functions/verifyMultiFactorAuthResult.d.ts +3 -0
  13. package/dist/client/index.d.ts +4 -54
  14. package/dist/client/types.d.ts +37 -2
  15. package/dist/client/{clientFunctions → windowBridgeFunctions}/storageFunctions.d.ts +10 -0
  16. package/dist/client/{clientFunctions → windowBridgeFunctions}/urlFunctions.d.ts +1 -0
  17. package/dist/core/coreFunctions/fetchCoupons.d.ts +4 -0
  18. package/dist/core/coreFunctions/getLoginUrl.d.ts +5 -1
  19. package/dist/core/coreFunctions/index.d.ts +17 -7
  20. package/dist/core/coreFunctions/logEvent.d.ts +4 -0
  21. package/dist/core/coreFunctions/markAsReady.d.ts +4 -0
  22. package/dist/core/coreFunctions/middlewares/initRequired.d.ts +2 -0
  23. package/dist/core/coreFunctions/middlewares/loginRequired.d.ts +2 -0
  24. package/dist/core/coreUtils.d.ts +1 -1
  25. package/dist/core/index.d.ts +1 -1
  26. package/dist/environment-variables.d.ts +0 -1
  27. package/dist/jsbridge-core/jsbridge.d.ts +4 -5
  28. package/dist/mini-app-api.d.ts +4 -4
  29. package/dist/mini-app-js-sdk.browser.js +2 -2
  30. package/dist/mini-app-js-sdk.es.js +865 -1493
  31. package/dist/model/bridge/getPlatformInformation.d.ts +1 -1
  32. package/dist/model/bridge/getTopBarHeight.d.ts +1 -1
  33. package/dist/model/bridge/renderPayButton.d.ts +0 -6
  34. package/dist/model/miniAppError.d.ts +2 -5
  35. package/dist/package/lottie/lottie.d.ts +6 -6
  36. package/dist/types/checkPaymentMethod.d.ts +1 -1
  37. package/dist/types/getKycInformation.d.ts +3 -3
  38. package/dist/types/getKycPassportInfo.d.ts +2 -2
  39. package/dist/types/getPlatformInformation.d.ts +0 -1
  40. package/dist/types/init.d.ts +2 -3
  41. package/dist/types/makePayment.d.ts +421 -1
  42. package/dist/types/topup.d.ts +1 -1
  43. package/dist/types.d.ts +8 -2
  44. package/dist/utils/analytics.d.ts +1 -0
  45. package/dist/utils/api.d.ts +0 -1
  46. package/dist/utils/getAppDetail.d.ts +1 -0
  47. package/dist/utils/helper.d.ts +7 -4
  48. package/dist/utils/minimumAppVersion.d.ts +0 -5
  49. package/dist/utils/minimumJSSDKVersion.d.ts +1 -0
  50. package/dist/utils/storage.d.ts +0 -2
  51. package/dist/utils/windowBridge.d.ts +24 -3
  52. package/dist/views/coupon/components/Arrow/index.d.ts +5 -5
  53. package/dist/views/coupon/components/CouponAction/index.d.ts +27 -7
  54. package/dist/views/coupon/components/CouponContainer/index.d.ts +3 -3
  55. package/dist/views/coupon/index.d.ts +27 -7
  56. package/dist/views/registerPaymentFeatures/types.d.ts +1 -1
  57. package/package.json +55 -67
  58. package/dist/composition-api/useShowUpdateWarningKycPassport.d.ts +0 -4
  59. package/dist/model/makePayment.d.ts +0 -430
  60. package/dist/types/getLoginUrl.d.ts +0 -8
  61. /package/dist/client/{clientFunctions → windowBridgeFunctions}/index.d.ts +0 -0
@@ -13,4 +13,5 @@ export declare function isSupportedSmartpayment(functionName: string): boolean;
13
13
  export declare function isFunctionRunning(): boolean;
14
14
  export declare function functionEnd(messageId: string): void;
15
15
  export declare function functionStart(): string;
16
- export declare function promiseToCallback<S, E extends MiniAppErrorResultType = MiniAppErrorResultType, P extends NativeParams<S, E> = NativeParams<S, E>>(functionName: string, target: (params: P) => Promise<S>, getCore: () => CoreFunctions, getLoggingParams?: (params: P) => Partial<Parameters<CoreFunctions['logEvent']>[0]>): (params: P) => void;
16
+ export declare function promiseToCallback<T, S, E extends MiniAppErrorResultType = MiniAppErrorResultType>(functionName: string, target: (params: T) => Promise<S>, getLoggingParams?: (params: T) => Partial<Parameters<CoreFunctions['logEvent']>[0]>): (params: T & NativeParams<S, E>) => Promise<S>;
17
+ export declare function callbackToPromise<R, E extends MiniAppErrorResultType = MiniAppErrorResultType, P extends NativeParams<R, E> = NativeParams<R, E>>(target: (params: P) => unknown, functionName: string): (params: P) => Promise<R>;
@@ -0,0 +1,16 @@
1
+ import * as clientWindowBridgeFunctions from '../client/windowBridgeFunctions';
2
+ import { NativeParams } from '../jsbridge-core/jsbridge';
3
+ import { ClientMessageData, PPFunctionNameType, ResultErrorType } from '../types';
4
+ import { WindowBridgeFunctions } from '../utils/windowBridge';
5
+ export declare type ClientFunctions = WindowBridgeFunctions<typeof clientWindowBridgeFunctions>;
6
+ export declare const coreFunctions: WindowBridgeFunctions<{
7
+ claimCoupon: typeof import("../core/coreFunctions/claimCoupon").claimCoupon;
8
+ fetchCoupons: typeof import("../core/coreFunctions/fetchCoupons").fetchCoupons;
9
+ getLoginUrl: typeof import("../core/coreFunctions/getLoginUrl").getLoginUrl;
10
+ getPaymentSettings: typeof import("../core/coreFunctions/getPaymentSettings").getPaymentSettings;
11
+ logEvent: typeof import("../core/coreFunctions/logEvent").logEvent;
12
+ logout: typeof import("../core/coreFunctions/logout").logout;
13
+ markAsReady: typeof import("../core/coreFunctions/markAsReady").markAsReady;
14
+ }>;
15
+ export declare function postMessageToCore(messageData: ClientMessageData): Promise<void>;
16
+ export declare function triggerPostMessageToCore<T>(type: PPFunctionNameType, showIframeFlag: boolean, params: NativeParams<T, ResultErrorType>, postMessageParams: unknown): void;
@@ -0,0 +1,2 @@
1
+ import { CopyToClipBoardParams } from '../../types';
2
+ export declare function copyToClipboard(params: CopyToClipBoardParams): void;
@@ -0,0 +1,12 @@
1
+ export declare const getLoginUrl: (params: {
2
+ redirectUrl?: string | undefined;
3
+ redirectType?: import("../../types").RedirectType | undefined;
4
+ } & import("../../jsbridge-core/jsbridge").NativeParams<{
5
+ url: string;
6
+ loginUrlValidTill: number;
7
+ }, import("../../types").MiniAppErrorResultType>) => Promise<{
8
+ url: string;
9
+ loginUrlValidTill: number;
10
+ }>;
11
+ export declare const getPaymentSettings: (params: import("../../jsbridge-core/jsbridge").NativeParams<import("../../core/coreFunctions/getPaymentSettings").PaymentSettingsType, import("../../types").MiniAppErrorResultType>) => Promise<import("../../core/coreFunctions/getPaymentSettings").PaymentSettingsType>;
12
+ export declare const markAsReady: (params: import("../../jsbridge-core/jsbridge").NativeParams<void, import("../../types").MiniAppErrorResultType>) => Promise<void>;
@@ -0,0 +1,3 @@
1
+ import { NativeParams } from '../../jsbridge-core/jsbridge';
2
+ import { GetKycPassportInfoResult } from '../../types/getKycPassportInfo';
3
+ export declare function getKycPassportInfo(params: NativeParams<GetKycPassportInfoResult>): void;
@@ -0,0 +1,6 @@
1
+ import { MiniAppStatusType } from '../../model/miniAppStatus';
2
+ export declare const logout: (params: import("../../jsbridge-core/jsbridge").NativeParams<{
3
+ statusCode: MiniAppStatusType;
4
+ }, import("../../types").MiniAppErrorResultType>) => Promise<{
5
+ statusCode: MiniAppStatusType;
6
+ }>;
@@ -0,0 +1,6 @@
1
+ import { RenderCouponsParams } from '../../types';
2
+ export interface UpdateCouponIframeHeightMessage {
3
+ eventName: 'update-iframe-height';
4
+ height: number;
5
+ }
6
+ export declare const renderCoupons: (params: RenderCouponsParams & import("../../jsbridge-core/jsbridge").NativeParams<void, import('../../types').MiniAppErrorResultType>) => Promise<void>;
@@ -0,0 +1,2 @@
1
+ import { ScanCodeClientParams } from '../../types';
2
+ export declare function scanCode(params: ScanCodeClientParams): void;
@@ -0,0 +1,2 @@
1
+ import { SetTitleParams } from '../../types';
2
+ export declare function setTitle(params: SetTitleParams): void;
@@ -0,0 +1,2 @@
1
+ import { ShareParams } from '../../types';
2
+ export declare function share(params: ShareParams): void;
@@ -0,0 +1,6 @@
1
+ import { GetDataParams, RemoveDataParams, SetDataParams } from '../../types';
2
+ export declare function getSessionData(params: GetDataParams): void;
3
+ export declare function setSessionData(params: SetDataParams): void;
4
+ export declare function setStorageData(params: SetDataParams): void;
5
+ export declare function getStorageData(params: GetDataParams): void;
6
+ export declare function removeStorageData(params: RemoveDataParams): void;
@@ -0,0 +1,3 @@
1
+ import { NativeParams } from '../../jsbridge-core/jsbridge';
2
+ import { VerifyMultiFactorAuthStatus } from '../../types/verifyMultiFactorAuthResult';
3
+ export declare function verifyMultiFactorAuthResult(params: NativeParams<VerifyMultiFactorAuthStatus>): void;
@@ -1,56 +1,6 @@
1
- import { NativeParams } from '../jsbridge-core/jsbridge';
2
- import { MiniAppModule } from '../mini-app-api';
3
- import { MiniAppStatusType } from '../model/miniAppStatus';
4
- import { CopyToClipBoardParams, GetDataParams, RemoveDataParams, RenderCouponsParams, RenderSmartButtonParams, ScanCodeClientParams, SdkType, SetDataParams, SetTitleParams, ShareParams } from '../types';
5
- import { WindowBridgeFunctions } from '../utils/windowBridge';
6
- import { GetKycPassportInfoResult } from '../types/getKycPassportInfo';
7
- import type { GetLoginUrlParams } from '../types/getLoginUrl';
8
- import { InitClientParams } from '../types/init';
9
- import { VerifyMultiFactorAuthStatus } from '../types/verifyMultiFactorAuthResult';
10
- import * as clientWindowBridgeFunctions from '../client/clientFunctions';
11
- export declare type ClientFunctions = WindowBridgeFunctions<typeof clientWindowBridgeFunctions>;
1
+ import { SdkType } from '../types';
12
2
  export declare function clearInternalInitSyncState(): void;
13
- declare function init(params: InitClientParams): void;
14
- declare function verifyMultiFactorAuthResult(params: NativeParams<VerifyMultiFactorAuthStatus>): void;
15
- declare function getKycPassportInfo(params: NativeParams<GetKycPassportInfoResult>): void;
16
- declare function share(params: ShareParams): void;
17
- declare function setTitle(params: SetTitleParams): void;
18
- declare function render(params: RenderSmartButtonParams): void;
19
- export interface UpdateCouponIframeHeightMessage {
20
- eventName: 'update-iframe-height';
21
- height: number;
22
- }
23
- declare function scanCode(params: ScanCodeClientParams): void;
24
- declare function getSessionData(params: GetDataParams): void;
25
- declare function setSessionData(params: SetDataParams): void;
26
- declare function setStorageData(params: SetDataParams): void;
27
- declare function getStorageData(params: GetDataParams): void;
28
- declare function removeStorageData(params: RemoveDataParams): void;
29
- declare function copyToClipboard(params: CopyToClipBoardParams): void;
30
- declare const clientFunctions: {
31
- init: typeof init;
32
- verifyMultiFactorAuthResult: typeof verifyMultiFactorAuthResult;
33
- share: typeof share;
34
- setTitle: typeof setTitle;
35
- render: typeof render;
36
- renderCoupons: (params: RenderCouponsParams) => void;
37
- scanCode: typeof scanCode;
38
- copyToClipboard: typeof copyToClipboard;
39
- getSessionData: typeof getSessionData;
40
- setSessionData: typeof setSessionData;
41
- getStorageData: typeof getStorageData;
42
- setStorageData: typeof setStorageData;
43
- removeStorageData: typeof removeStorageData;
44
- getKycPassportInfo: typeof getKycPassportInfo;
45
- logout: (params: NativeParams<{
46
- statusCode: MiniAppStatusType;
47
- }, import('../types').MiniAppErrorResultType>) => void;
48
- getPaymentSettings: (params: NativeParams<import("../core/coreFunctions/getPaymentSettings").PaymentSettingsType, import('../types').MiniAppErrorResultType>) => void;
49
- getLoginUrl: (params: GetLoginUrlParams) => void;
50
- markAsReady: (params: NativeParams<void, import('../types').MiniAppErrorResultType>) => void;
51
- };
52
- export declare type ClientSDKType = Omit<MiniAppModule, keyof typeof clientFunctions> & typeof clientFunctions;
53
- export declare function getClient({ sdkType }: {
3
+ export declare function getClient<T extends Record<string, unknown>>({ sdkType, clientFunctions, }: {
54
4
  sdkType: SdkType;
55
- }): ClientSDKType;
56
- export {};
5
+ clientFunctions: T;
6
+ }): T;
@@ -1,5 +1,40 @@
1
1
  import { miniAppSupportedFunctions } from '../client/supportedFunctionsList';
2
- declare const client: import('../client/index').ClientSDKType;
3
- export declare type MiniAppSdkType = Pick<typeof client, (typeof miniAppSupportedFunctions)[number]>;
2
+ import { copyToClipboard } from './functions/copyToClipboard';
3
+ import { getKycPassportInfo } from './functions/getKycPassportInfo';
4
+ import { scanCode } from './functions/scanCode';
5
+ import { setTitle } from './functions/setTitle';
6
+ import { share } from './functions/share';
7
+ import { getSessionData, getStorageData, removeStorageData, setSessionData, setStorageData } from './functions/storageFunctions';
8
+ import { verifyMultiFactorAuthResult } from './functions/verifyMultiFactorAuthResult';
9
+ import { MiniAppModule } from '../mini-app-api';
10
+ declare const clientFunctions: {
11
+ verifyMultiFactorAuthResult: typeof verifyMultiFactorAuthResult;
12
+ share: typeof share;
13
+ setTitle: typeof setTitle;
14
+ renderCoupons: (params: import('../types').RenderCouponsParams & import("../jsbridge-core/jsbridge").NativeParams<void, import('../types').MiniAppErrorResultType>) => Promise<void>;
15
+ scanCode: typeof scanCode;
16
+ copyToClipboard: typeof copyToClipboard;
17
+ getSessionData: typeof getSessionData;
18
+ setSessionData: typeof setSessionData;
19
+ getStorageData: typeof getStorageData;
20
+ setStorageData: typeof setStorageData;
21
+ removeStorageData: typeof removeStorageData;
22
+ getKycPassportInfo: typeof getKycPassportInfo;
23
+ logout: (params: import("../jsbridge-core/jsbridge").NativeParams<{
24
+ statusCode: import("../model/miniAppStatus").MiniAppStatusType;
25
+ }, import('../types').MiniAppErrorResultType>) => Promise<{
26
+ statusCode: import("../model/miniAppStatus").MiniAppStatusType;
27
+ }>;
28
+ getPaymentSettings: (params: import("../jsbridge-core/jsbridge").NativeParams<import("../core/coreFunctions/getPaymentSettings").PaymentSettingsType, import('../types').MiniAppErrorResultType>) => Promise<import("../core/coreFunctions/getPaymentSettings").PaymentSettingsType>;
29
+ markAsReady: (params: import("../jsbridge-core/jsbridge").NativeParams<void, import('../types').MiniAppErrorResultType>) => Promise<void>;
30
+ };
31
+ declare type ClientFunctionsType = typeof clientFunctions;
32
+ declare type AllSdkFunctionsType = Omit<MiniAppModule, keyof ClientFunctionsType> & ClientFunctionsType;
33
+ declare type MAFunctionsType = Pick<AllSdkFunctionsType, (typeof miniAppSupportedFunctions)[number]>;
34
+ export declare type MiniAppSdkType = {
35
+ [K in keyof MAFunctionsType]: (...params: Parameters<MAFunctionsType[K]>) => Parameters<MAFunctionsType[K]>[0] extends {
36
+ success?: (result: infer R) => void;
37
+ } ? Promise<R> : ReturnType<MAFunctionsType[K]>;
38
+ };
4
39
  declare const miniAppSdk: MiniAppSdkType;
5
40
  export default miniAppSdk;
@@ -19,4 +19,14 @@ export declare function getLocalStorage({ name }: {
19
19
  export declare function removeLocalStorage({ name }: {
20
20
  name: string;
21
21
  }): void;
22
+ export declare function setSessionStorage({ name, value, }: {
23
+ name: string;
24
+ value: string;
25
+ }): void;
26
+ export declare function getSessionStorage({ name }: {
27
+ name: string;
28
+ }): string | null;
29
+ export declare function removeSessionStorage({ name }: {
30
+ name: string;
31
+ }): void;
22
32
  export {};
@@ -1 +1,2 @@
1
1
  export declare function removeQueryParametersFromUrl(removeParams: string[]): void;
2
+ export declare function getUrl(): string;
@@ -1,9 +1,13 @@
1
1
  import { PostLogInRedirectParams } from '../../types';
2
2
  import { Coupon } from '../../views/coupon/types';
3
+ import { initRequired } from './middlewares/initRequired';
3
4
  interface FetchCouponsParams extends PostLogInRedirectParams {
4
5
  merchantId: string;
5
6
  couponId: string;
6
7
  }
7
8
  export declare const FETCH_COUPONS_URL = "public/coupons/v1/coupons";
8
9
  export declare function fetchCoupons({ merchantId, couponId, ...postLoginRedirectParams }: FetchCouponsParams): Promise<Array<Coupon>>;
10
+ export declare namespace fetchCoupons {
11
+ var middlewares: (typeof initRequired)[];
12
+ }
9
13
  export {};
@@ -1,5 +1,6 @@
1
1
  import { PostLogInRedirectParams, RedirectType } from '../../types';
2
2
  import { PKCEChallengeType } from '../../types/getAuthStatus';
3
+ import { initRequired } from './middlewares/initRequired';
3
4
  interface LoginUrlData {
4
5
  loginUrl: string;
5
6
  loginUrlValidTill: number;
@@ -10,12 +11,15 @@ interface GetLoginUrlInternalParams extends PostLogInRedirectParams {
10
11
  }
11
12
  export declare const getLoginUrlEndpoint = "public/auth/v1/loginUrl";
12
13
  export declare function getLoginUrl(params: {
13
- redirectUrl: string;
14
+ redirectUrl?: string;
14
15
  redirectType?: RedirectType;
15
16
  }): Promise<{
16
17
  url: string;
17
18
  loginUrlValidTill: number;
18
19
  }>;
20
+ export declare namespace getLoginUrl {
21
+ var middlewares: (typeof initRequired)[];
22
+ }
19
23
  export declare function getLoginUrlInternal({ pkceCodeChallenge, postLoginRedirectUrl, postLoginRedirectType, scopes, }: GetLoginUrlInternalParams): Promise<{
20
24
  loginUrl: string;
21
25
  loginUrlValidTill: number;
@@ -1,7 +1,17 @@
1
- export { fetchCoupons } from './fetchCoupons';
2
- export { claimCoupon } from './claimCoupon';
3
- export { logEvent } from './logEvent';
4
- export { logout } from './logout';
5
- export { getPaymentSettings } from './getPaymentSettings';
6
- export { getLoginUrl } from './getLoginUrl';
7
- export { markAsReady } from './markAsReady';
1
+ import { claimCoupon } from './claimCoupon';
2
+ import { fetchCoupons } from './fetchCoupons';
3
+ import { getLoginUrl } from './getLoginUrl';
4
+ import { getPaymentSettings } from './getPaymentSettings';
5
+ import { logEvent } from './logEvent';
6
+ import { logout } from './logout';
7
+ import { markAsReady } from './markAsReady';
8
+ declare const coreFunctions: {
9
+ claimCoupon: typeof claimCoupon;
10
+ fetchCoupons: typeof fetchCoupons;
11
+ getLoginUrl: typeof getLoginUrl;
12
+ getPaymentSettings: typeof getPaymentSettings;
13
+ logEvent: typeof logEvent;
14
+ logout: typeof logout;
15
+ markAsReady: typeof markAsReady;
16
+ };
17
+ export default coreFunctions;
@@ -1,3 +1,4 @@
1
+ import { Middleware } from '../../utils/windowBridge';
1
2
  interface LogEventParams {
2
3
  eventName?: string;
3
4
  sendImmediately?: boolean;
@@ -12,4 +13,7 @@ interface LogEventParams {
12
13
  order_type?: string;
13
14
  }
14
15
  export declare function logEvent({ eventName, sendImmediately, clientId, event_category, event_category_suffix, screen_name, ...params }: LogEventParams): void;
16
+ export declare namespace logEvent {
17
+ var middlewares: Middleware[];
18
+ }
15
19
  export {};
@@ -1 +1,5 @@
1
+ import { Middleware } from '../../utils/windowBridge';
1
2
  export declare function markAsReady(): void;
3
+ export declare namespace markAsReady {
4
+ var middlewares: Middleware[];
5
+ }
@@ -0,0 +1,2 @@
1
+ import { MessageRequestType, NextCallback, Params } from '../../../utils/windowBridge';
2
+ export declare function initRequired(message: MessageEvent<MessageRequestType>, params: Params, next: NextCallback): Promise<unknown>;
@@ -0,0 +1,2 @@
1
+ import { MessageRequestType, NextCallback, Params } from '../../../utils/windowBridge';
2
+ export declare function loginRequired(message: MessageEvent<MessageRequestType>, params: Params, next: NextCallback): Promise<unknown>;
@@ -2,7 +2,7 @@ import { NativeParams } from '../jsbridge-core/jsbridge';
2
2
  import { ConsoleDebugInfoParams } from '../types';
3
3
  import { ChallengeMethod } from '../types/getAuthStatus';
4
4
  export declare const OTT_QUERY_PARAMETERS: string[];
5
- export declare function getClientFunctions(): import('../utils/windowBridge').WindowBridgeFunctions<typeof import("../client/clientFunctions")>;
5
+ export declare function getClientFunctions(): import('../utils/windowBridge').WindowBridgeFunctions<typeof import("../client/windowBridgeFunctions")>;
6
6
  export declare function linkOpen(url: string, target?: string, isFocus?: boolean): void;
7
7
  export declare function getDomain(subdomainCookieSharing: boolean, hostname: string): string;
8
8
  export declare function sendRefreshTokenToClient(refreshToken: string, subdomainCookieSharing: boolean): void;
@@ -1,4 +1,4 @@
1
- import * as coreFunctions from '../core/coreFunctions';
1
+ import coreFunctions from '../core/coreFunctions';
2
2
  import { WindowBridgeFunctions } from '../utils/windowBridge';
3
3
  export declare type CoreFunctions = WindowBridgeFunctions<typeof coreFunctions>;
4
4
  export declare function initCore(): void;
@@ -4,7 +4,6 @@ export declare const BUILD_TYPE: "prod" | "stg" | "preview" | "dev";
4
4
  export declare const CORE_IFRAME_ORIGIN: string;
5
5
  export declare const CORE_IFRAME_URL: string;
6
6
  export declare const COUPON_IFRAME_URL: string;
7
- export declare const REMOTE_STRINGS_URL: string;
8
7
  export declare const SENTRY_DSN: string | undefined;
9
8
  export declare const SENTRY_SAMPLE_RATE: number;
10
9
  export declare const GA_API_SECRET: string | undefined;
@@ -11,7 +11,7 @@ export interface WebViewWindow extends Window {
11
11
  messageHandlers?: Record<string, AndroidMessageHandler>;
12
12
  }
13
13
  export declare enum NativeResponseStatus {
14
- Succcess = "success",
14
+ Success = "success",
15
15
  Fail = "fail",
16
16
  Complete = "complete"
17
17
  }
@@ -25,15 +25,15 @@ export interface NativeResponseDataLegacy {
25
25
  }
26
26
  export interface NativeResponseData {
27
27
  status: NativeResponseStatus;
28
- data: NativeSuccessResponseData | NativeErrorResponseData;
28
+ data: {
29
+ data?: unknown;
30
+ };
29
31
  }
30
32
  export interface NativeResponse {
31
33
  responseId: string;
32
34
  responseData: NativeResponseData | NativeResponseDataLegacy;
33
35
  }
34
36
  export declare type NativeResponseCallback = (data: NativeResponseData, callbackId: string) => void;
35
- declare type NativeSuccessResponseData<T = unknown> = T;
36
- declare type NativeErrorResponseData<E = unknown> = E;
37
37
  export interface NativeParams<T, E extends MiniAppErrorResultType = MiniAppErrorResultType> {
38
38
  success?: (t: T) => void;
39
39
  fail?: (e: E) => void;
@@ -54,4 +54,3 @@ export declare class JsBridge {
54
54
  private handleMessageFromNative;
55
55
  _handleMessageFromNative(message: NativeResponse): void;
56
56
  }
57
- export {};
@@ -23,12 +23,12 @@ import { VerifyMultiFactorAuthResultParams } from './types/verifyMultiFactorAuth
23
23
  import { JsBridge, NativeParams } from './jsbridge-core/jsbridge';
24
24
  import { AddShortcutParams, CloseAppParams, GetCashbackInfoParams, MapParams, MiniAppResult, OpenAppParams, OpenMiniAppParams, RegisterPaymentFeaturesParams, RegisterUserInfoParams, RequestInternalParams, RequestParams, ScanCodeParams, SetEnablePullDownRefreshParams, ShareParams, ShortcutExistsParams, ShowAlertParams, ShowErrorSheetParams, SmsAuthParams } from './types';
25
25
  export declare class MiniAppModule {
26
- jsBridge: JsBridge;
27
- isExecuting: boolean;
26
+ private jsBridge;
27
+ private isExecuting;
28
28
  constructor(jsBridge: JsBridge);
29
- isExecutableService(params: NativeParams<never>): boolean;
29
+ private isExecutableService;
30
30
  private detectMode;
31
- handleModuleLoadingFailure(params?: Pick<NativeParams<unknown>, 'fail' | 'complete'>): void;
31
+ private handleModuleLoadingFailure;
32
32
  init(params: InitParams): void;
33
33
  getCashbackInformation(params: GetCashbackInfoParams): void;
34
34
  openWebview(params: OpenWebviewParams): void;