@paypay/mini-app-js-sdk 2.10.0 → 2.12.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 (48) hide show
  1. package/dist/client/clientUtils.d.ts +8 -1
  2. package/dist/client/coreIframe.d.ts +1 -0
  3. package/dist/client/index.d.ts +10 -1
  4. package/dist/client/supportedFunctionsList.d.ts +2 -2
  5. package/dist/core/coreFunctions/claimCoupon.d.ts +6 -0
  6. package/dist/core/coreFunctions/fetchCoupons.d.ts +8 -0
  7. package/dist/core/coreFunctions/index.d.ts +4 -0
  8. package/dist/core/coreFunctions/logEvent.d.ts +12 -0
  9. package/dist/core/coreFunctions/logout.d.ts +1 -0
  10. package/dist/core/coreUtils.d.ts +6 -2
  11. package/dist/core/coupon/couponFunctions/index.d.ts +1 -0
  12. package/dist/core/coupon/couponFunctions/renderCoupons.d.ts +9 -0
  13. package/dist/core/coupon/index.d.ts +3 -0
  14. package/dist/core/index.d.ts +5 -0
  15. package/dist/environment-variables.d.ts +2 -0
  16. package/dist/index.d.ts +3 -0
  17. package/dist/jsbridge-core/lib/browser.d.ts +3 -0
  18. package/dist/jsbridge-core/paypay-jsbridge.d.ts +16 -0
  19. package/dist/mini-app-js-sdk.browser.js +1 -1
  20. package/dist/mini-app-js-sdk.d.ts +10 -0
  21. package/dist/mini-app-js-sdk.es.js +898 -126
  22. package/dist/model/bridge/getLoginUrl.d.ts +9 -0
  23. package/dist/model/bridge/index.d.ts +47 -0
  24. package/dist/model/bridge/render.d.ts +0 -12
  25. package/dist/model/bridge/renderLoginButton.d.ts +2 -2
  26. package/dist/model/makePayment.d.ts +7 -0
  27. package/dist/package/button/index.d.ts +1 -1
  28. package/dist/package/lottie/index.d.ts +73 -0
  29. package/dist/package/lottie/lottie.d.ts +77 -0
  30. package/dist/resources/en.d.ts +1 -0
  31. package/dist/resources/images.d.ts +2 -0
  32. package/dist/resources/ja.d.ts +1 -0
  33. package/dist/types.d.ts +30 -5
  34. package/dist/utils/analytics.d.ts +3 -1
  35. package/dist/utils/api.d.ts +32 -25
  36. package/dist/utils/browsers.d.ts +3 -0
  37. package/dist/utils/fetch.d.ts +2 -1
  38. package/dist/utils/getLanguage.d.ts +1 -0
  39. package/dist/utils/helper.d.ts +3 -2
  40. package/dist/utils/storage.d.ts +6 -0
  41. package/dist/utils/windowBridge.d.ts +24 -0
  42. package/dist/views/coupon/components/Arrow/index.d.ts +17 -0
  43. package/dist/views/coupon/components/CouponAction/index.d.ts +39 -0
  44. package/dist/views/coupon/components/CouponContainer/index.d.ts +14 -0
  45. package/dist/views/coupon/index.d.ts +38 -0
  46. package/dist/views/coupon/types.d.ts +34 -0
  47. package/dist/views/registerPaymentFeatures/types.d.ts +8 -0
  48. package/package.json +8 -5
@@ -0,0 +1,9 @@
1
+ import { PKCEChallengeType, PostLogInRedirectParams } from '../../types';
2
+ interface GetLoginUrlParams extends PostLogInRedirectParams {
3
+ pkceCodeChallenge: PKCEChallengeType;
4
+ scopes?: Array<string>;
5
+ }
6
+ export declare function getLoginUrl({ pkceCodeChallenge, postLoginRedirectUrl, postLoginRedirectType, scopes, }: GetLoginUrlParams): Promise<string>;
7
+ export declare function getLoginUrlWithPkce(params: Omit<GetLoginUrlParams, 'pkceCodeChallenge'>): Promise<string>;
8
+ export declare function getLoginUrlIfUserNotSignedIn(params: Omit<GetLoginUrlParams, 'pkceCodeChallenge'>): Promise<string | undefined>;
9
+ export {};
@@ -0,0 +1,47 @@
1
+ export * from './init';
2
+ export * from './copyToClipboard';
3
+ export * from './getUAID';
4
+ export * from './getBalance';
5
+ export * from './getUserProfile';
6
+ export * from './getKycInformation';
7
+ export * from './getPermissionStatus';
8
+ export * from './getTopBarHeight';
9
+ export * from './getPlatformInformation';
10
+ export * from './getDeviceInformation';
11
+ export * from './makePayment';
12
+ export * from './openWebview';
13
+ export * from './showErrorSheet';
14
+ export * from './showAlert';
15
+ export * from './topup';
16
+ export * from './showUpdateWarning';
17
+ export * from './scanCode';
18
+ export * from './closeApp';
19
+ export * from './setTitle';
20
+ export * from './getUserLocation';
21
+ export * from './getUserAddress';
22
+ export * from './inputAddress';
23
+ export * from './openMap';
24
+ export * from './openApp';
25
+ export * from './openMiniApp';
26
+ export * from './checkPaymentMethod';
27
+ export * from './requestInternal';
28
+ export * from './debug';
29
+ export * from './checkAccessToken';
30
+ export * from './registerEmail';
31
+ export * from './registerKyc';
32
+ export * from './startMultiFactorAuth';
33
+ export * from './logout';
34
+ export * from './verifyMultiFactorAuthResult';
35
+ export * from './getAuthStatus';
36
+ export * from './render';
37
+ export * from './smsAuth';
38
+ export * from './setSessionData';
39
+ export * from './getSessionData';
40
+ export * from './setStorageData';
41
+ export * from './getStorageData';
42
+ export * from './removeStorageData';
43
+ export * from './request';
44
+ export * from './share';
45
+ export * from './registerUserInfo';
46
+ export * from './getBankInfo';
47
+ export * from './registerPaymentFeatures';
@@ -2,17 +2,5 @@ import { RenderSmartButtonParams } from '../../types';
2
2
  export declare function getRenderButtonInfo(params: RenderSmartButtonParams): Promise<{
3
3
  data: import('../../types').SmartButtonParam;
4
4
  preferredLanguage: string;
5
- } | {
6
- renderParams: RenderSmartButtonParams;
7
- data: import('../../types').SmartButtonParam;
8
- preferredLanguage: string;
9
- isLoggedIn?: undefined;
10
- isJustLoggedIn?: undefined;
11
- } | {
12
- renderParams: RenderSmartButtonParams;
13
- data: import('../../types').SmartButtonParam;
14
- isLoggedIn: boolean;
15
- preferredLanguage: string;
16
- isJustLoggedIn: boolean;
17
5
  }>;
18
6
  export declare function render(params: RenderSmartButtonParams): void;
@@ -1,5 +1,5 @@
1
1
  import { RenderSmartButtonParams, SmartButtonParam } from '../../types';
2
- export declare function getRenderLoginInfo(params: RenderSmartButtonParams): {
2
+ export declare function getRenderLoginInfo(params: RenderSmartButtonParams): Promise<{
3
3
  data: SmartButtonParam;
4
4
  preferredLanguage: string;
5
- };
5
+ }>;
@@ -64,12 +64,14 @@ declare type MethodBase = {
64
64
  statusDescription: DescriptionInfo | null;
65
65
  additionalDescription: DescriptionInfo | null;
66
66
  detailDescription: DescriptionInfo | null;
67
+ label?: DescriptionInfo | null;
67
68
  amountInfo?: {
68
69
  label: string;
69
70
  amount: number;
70
71
  currency: string;
71
72
  };
72
73
  };
74
+ feeInfo?: TopupFeeInfo;
73
75
  };
74
76
  export declare type DescriptionInfo = {
75
77
  text: string;
@@ -215,6 +217,11 @@ export declare type ResponseBase = {
215
217
  };
216
218
  };
217
219
  export declare type PaymentMethod = WalletMethod | CreditMethod | BankMethod | SbidBankMethod | PayLaterCCMethod | PayLaterMethod;
220
+ export declare type TopupFeeInfo = {
221
+ feePercentage?: number;
222
+ label: string;
223
+ zeroFeeText?: string;
224
+ };
218
225
  declare type PaymentMethodPreference = {
219
226
  preTransactionAutoChargeEnabled: boolean;
220
227
  prioritizedPaymentMethodsEnabled: boolean;
@@ -1,7 +1,7 @@
1
1
  import { PropType } from 'vue';
2
2
  export declare type ButtonType = 'default' | 'primary' | 'success' | 'warning' | 'danger' | 'link' | 'outLined';
3
3
  export declare type ButtonSize = 'large' | 'normal' | 'small';
4
- export declare const Button: import("vue").DefineComponent<{
4
+ export declare const PButton: import("vue").DefineComponent<{
5
5
  disabled: BooleanConstructor;
6
6
  loading: BooleanConstructor;
7
7
  block: BooleanConstructor;
@@ -0,0 +1,73 @@
1
+ declare const Lottie: import("vue").DefineComponent<{
2
+ loop: {
3
+ type: BooleanConstructor;
4
+ default: boolean;
5
+ };
6
+ autoplay: {
7
+ type: BooleanConstructor;
8
+ default: boolean;
9
+ };
10
+ path: {
11
+ type: StringConstructor;
12
+ default: string;
13
+ };
14
+ styles: {
15
+ type: ObjectConstructor;
16
+ default: () => {
17
+ width: string;
18
+ height: string;
19
+ };
20
+ };
21
+ className: {
22
+ type: StringConstructor;
23
+ default: string;
24
+ required: false;
25
+ };
26
+ type: {
27
+ type: import("vue").PropType<import("../../types").RenderType>;
28
+ default: import("../../types").RenderType;
29
+ required: false;
30
+ };
31
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
32
+ 'create-lottie': (_p: import("lottie-web").AnimationItem) => true;
33
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
34
+ loop: {
35
+ type: BooleanConstructor;
36
+ default: boolean;
37
+ };
38
+ autoplay: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ };
42
+ path: {
43
+ type: StringConstructor;
44
+ default: string;
45
+ };
46
+ styles: {
47
+ type: ObjectConstructor;
48
+ default: () => {
49
+ width: string;
50
+ height: string;
51
+ };
52
+ };
53
+ className: {
54
+ type: StringConstructor;
55
+ default: string;
56
+ required: false;
57
+ };
58
+ type: {
59
+ type: import("vue").PropType<import("../../types").RenderType>;
60
+ default: import("../../types").RenderType;
61
+ required: false;
62
+ };
63
+ }>> & {
64
+ "onCreate-lottie"?: ((_p: import("lottie-web").AnimationItem) => any) | undefined;
65
+ }, {
66
+ path: string;
67
+ type: import("../../types").RenderType;
68
+ loop: boolean;
69
+ autoplay: boolean;
70
+ styles: Record<string, any>;
71
+ className: string;
72
+ }>;
73
+ export default Lottie;
@@ -0,0 +1,77 @@
1
+ import { PropType } from 'vue';
2
+ import { AnimationItem } from 'lottie-web/build/player/lottie_svg';
3
+ import { RenderType } from '../../types';
4
+ declare type TRenderType = (typeof RenderType)[keyof typeof RenderType];
5
+ declare const _default: import("vue").DefineComponent<{
6
+ loop: {
7
+ type: BooleanConstructor;
8
+ default: boolean;
9
+ };
10
+ autoplay: {
11
+ type: BooleanConstructor;
12
+ default: boolean;
13
+ };
14
+ path: {
15
+ type: StringConstructor;
16
+ default: string;
17
+ };
18
+ styles: {
19
+ type: ObjectConstructor;
20
+ default: () => {
21
+ width: string;
22
+ height: string;
23
+ };
24
+ };
25
+ className: {
26
+ type: StringConstructor;
27
+ default: string;
28
+ required: false;
29
+ };
30
+ type: {
31
+ type: PropType<TRenderType>;
32
+ default: RenderType;
33
+ required: false;
34
+ };
35
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
36
+ 'create-lottie': (_p: AnimationItem) => true;
37
+ }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
38
+ loop: {
39
+ type: BooleanConstructor;
40
+ default: boolean;
41
+ };
42
+ autoplay: {
43
+ type: BooleanConstructor;
44
+ default: boolean;
45
+ };
46
+ path: {
47
+ type: StringConstructor;
48
+ default: string;
49
+ };
50
+ styles: {
51
+ type: ObjectConstructor;
52
+ default: () => {
53
+ width: string;
54
+ height: string;
55
+ };
56
+ };
57
+ className: {
58
+ type: StringConstructor;
59
+ default: string;
60
+ required: false;
61
+ };
62
+ type: {
63
+ type: PropType<TRenderType>;
64
+ default: RenderType;
65
+ required: false;
66
+ };
67
+ }>> & {
68
+ "onCreate-lottie"?: ((_p: AnimationItem) => any) | undefined;
69
+ }, {
70
+ path: string;
71
+ type: TRenderType;
72
+ loop: boolean;
73
+ autoplay: boolean;
74
+ styles: Record<string, any>;
75
+ className: string;
76
+ }>;
77
+ export default _default;
@@ -319,6 +319,7 @@ export declare const en: {
319
319
  update: string;
320
320
  cancel: string;
321
321
  };
322
+ viewdetails: string;
322
323
  eMoneyOnly: string;
323
324
  topupNoticeEmoneyOnlyTitle: string;
324
325
  topupNoticeEmoneyOnlyDesc: string;
@@ -50,3 +50,5 @@ export declare const img_iconInfo: string;
50
50
  export declare const img_paypayMulti: string;
51
51
  export declare const img_mobileIcon: string;
52
52
  export declare const img_exclaimIcon: string;
53
+ export declare const img_iconCoupon: string;
54
+ export declare const img_miniappIconDefault: string;
@@ -334,6 +334,7 @@ export declare const ja: {
334
334
  update: string;
335
335
  cancel: string;
336
336
  };
337
+ viewdetails: string;
337
338
  eMoneyOnly: string;
338
339
  topupNoticeEmoneyOnlyTitle: string;
339
340
  topupNoticeEmoneyOnlyDesc: string;
package/dist/types.d.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  import { NativeParams, NativeResponse } from './jsbridge-core/jsbridge';
2
2
  import { MiniAppErrorType } from './model/miniAppError';
3
3
  import { ButtonType } from './package/button';
4
+ declare global {
5
+ type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
6
+ }
4
7
  export declare type MiniAppResult = Record<string, unknown>;
5
8
  export interface MiniAppErrorResultType {
6
9
  errorCode: MiniAppErrorType;
@@ -308,10 +311,27 @@ export interface RenderSmartButtonParams extends NativeParams<MiniAppResult> {
308
311
  callback?: () => void;
309
312
  getDefault?: boolean;
310
313
  renderId?: string;
314
+ redirectUrl?: string;
311
315
  clientOrigin?: string;
312
316
  }
317
+ export declare type Locale = 'ja' | 'en';
318
+ export declare type Translation = Record<string, string>;
319
+ export declare type RedirectType = 'WEB_LINK' | 'APP_DEEP_LINK' | 'UNIVERSAL_LINK';
320
+ export interface PostLogInRedirectParams {
321
+ postLoginRedirectUrl: string;
322
+ postLoginRedirectType?: RedirectType;
323
+ }
324
+ export interface RenderCouponsParams extends NativeParams<void>, Optional<PostLogInRedirectParams, 'postLoginRedirectUrl'> {
325
+ clientId?: string;
326
+ env?: string;
327
+ merchant: string;
328
+ couponId: string;
329
+ containerId: string;
330
+ locale?: Locale;
331
+ }
313
332
  export interface SmartButtonParam {
314
333
  title: string;
334
+ loginUrl?: string;
315
335
  avatarUrl?: string;
316
336
  cashbackInfo?: string;
317
337
  }
@@ -423,6 +443,7 @@ export declare enum PpLocalStorageKey {
423
443
  clientOrigin = "ppjssdk.clientOrigin",
424
444
  clientVersion = "ppjssdk.clientVersion",
425
445
  debugMode = "ppjssdk.debugMode",
446
+ claimCouponImmediately = "ppjssdk.claimCouponImmediately",
426
447
  merchant = "ppjssdk.merchant",
427
448
  consumedOTT = "ppjssdk.consumedOTT"
428
449
  }
@@ -486,11 +507,12 @@ export declare type SessionResponse = {
486
507
  export declare enum ChallengeMethod {
487
508
  S256 = "S256"
488
509
  }
510
+ export interface PKCEChallengeType {
511
+ challenge: string;
512
+ challengeMethod: ChallengeMethod;
513
+ }
489
514
  interface AuthStatusFailResult extends MiniAppErrorResultType {
490
- code: {
491
- challenge: string;
492
- challengeMethod: ChallengeMethod;
493
- } | null;
515
+ code: PKCEChallengeType | null;
494
516
  }
495
517
  export declare type ResultErrorType = MiniAppErrorResultType | AuthStatusFailResult;
496
518
  export interface GetAuthStatusClientParams extends NativeParams<MiniAppResult, AuthStatusFailResult> {
@@ -552,11 +574,13 @@ export declare type CoreMessageData<T> = {
552
574
  export declare type CoreCallUtilMessageData = {
553
575
  name: PPUtilFunctionNameType;
554
576
  data?: unknown;
577
+ forWindowBridge?: boolean;
555
578
  };
556
579
  export declare type ClientMessageData = {
557
- name: PPFunctionNameType;
580
+ name: Exclude<PPFunctionNameType, 'renderCoupons'>;
558
581
  params?: unknown;
559
582
  messageId: string;
583
+ forWindowBridge?: boolean;
560
584
  };
561
585
  export declare type RenderButtonInfo = {
562
586
  type: 'pay' | 'login';
@@ -640,6 +664,7 @@ export declare const PPFunctionName: {
640
664
  readonly initKycPassport: "initKycPassport";
641
665
  readonly smsAuth: "smsAuth";
642
666
  readonly getKycPassportInfo: "getKycPassportInfo";
667
+ readonly renderCoupons: "renderCoupons";
643
668
  };
644
669
  export declare type PPFunctionNameType = (typeof PPFunctionName)[keyof typeof PPFunctionName];
645
670
  export declare const PPUtilFunctionName: {
@@ -1,8 +1,10 @@
1
+ import { PPFunctionNameType } from '../types';
1
2
  export declare function logSDKEvent(eventName: string, eventParams: {
2
3
  event_category: string;
3
4
  event_label?: string;
4
5
  screen_name: string;
5
- event_action: string;
6
+ event_action?: string;
6
7
  error_value?: string;
7
8
  event_label2?: unknown;
8
9
  }): void;
10
+ export declare function handleLogSDKEvent(name: PPFunctionNameType, eventActionSuffix: string, errorValue?: string, params?: unknown): void;
@@ -1,6 +1,6 @@
1
1
  import { MiniAppErrorType } from '../model/miniAppError';
2
2
  import { UIComponentsError } from '../model/uiComponents';
3
- import { Address, InitKycPassportParams, CashbackResponse, NewAddress, SmartPayParams } from '../types';
3
+ import { Address, CashbackResponse, InitKycPassportParams, MakePaymentParams, NewAddress, SmartPayParams } from '../types';
4
4
  export declare type TopupQuery = {
5
5
  merchant?: string;
6
6
  agreeSimilarTransaction?: boolean;
@@ -16,6 +16,8 @@ export declare type TopupBody = {
16
16
  amount: PaymentAmount;
17
17
  requestedAt: number;
18
18
  prepaidOnly?: boolean;
19
+ feePercentage?: number;
20
+ agreedWithTheFee?: boolean;
19
21
  };
20
22
  export interface TopupResponseData {
21
23
  merchantTopUpId: string;
@@ -27,6 +29,10 @@ export interface TopupResponseData {
27
29
  amount: number;
28
30
  currency: string;
29
31
  };
32
+ fee?: {
33
+ amount: number;
34
+ currency: string;
35
+ };
30
36
  acceptedAt?: number;
31
37
  requestedAt: number;
32
38
  responseValidTill: number;
@@ -46,32 +52,28 @@ export interface TopupResponse {
46
52
  data: TopupResponseData;
47
53
  };
48
54
  }
49
- declare type WalletInfoResponse = {
50
- data: {
51
- payload: {
52
- walletSummary: {
53
- allTotalBalanceInfo: {
54
- balance: number;
55
- currency: string;
56
- };
57
- totalBalanceInfo: {
58
- balance: number;
59
- currency: string;
60
- };
61
- transferableBalanceInfo: {
62
- balance: number;
63
- currency: string;
64
- };
65
- payoutableBalanceInfo: {
66
- balance: number;
67
- currency: string;
68
- };
69
- };
70
- cashBackUseStatus: string;
55
+ export declare type WalletInfo = {
56
+ walletSummary: {
57
+ allTotalBalanceInfo: {
58
+ balance: number;
59
+ currency: string;
60
+ };
61
+ totalBalanceInfo: {
62
+ balance: number;
63
+ currency: string;
64
+ };
65
+ transferableBalanceInfo: {
66
+ balance: number;
67
+ currency: string;
68
+ };
69
+ payoutableBalanceInfo: {
70
+ balance: number;
71
+ currency: string;
71
72
  };
72
73
  };
74
+ cashBackUseStatus: string;
73
75
  };
74
- export declare function topup(queryParams: TopupQuery, body: TopupBody): Promise<{
76
+ export declare function topup(queryParams: TopupQuery, body: TopupBody, paymentParams?: MakePaymentParams): Promise<{
75
77
  ppFetchResult: "notAuthorized";
76
78
  body: null;
77
79
  } | {
@@ -129,7 +131,12 @@ export declare type BalanceParams = {
129
131
  sourceInfoApp?: string;
130
132
  };
131
133
  export declare function getBalance(params?: BalanceParams): Promise<import("./fetch").PPFetchResult<unknown, Record<string, unknown>>>;
132
- export declare function getCashBackInfo(): Promise<import("./fetch").PPFetchResult<WalletInfoResponse, Record<string, unknown>>>;
134
+ declare type WalletInfoResponse = {
135
+ data: {
136
+ payload: WalletInfo;
137
+ };
138
+ };
139
+ export declare function getWalletInfo(): Promise<import("./fetch").PPFetchResult<WalletInfoResponse, Record<string, unknown>>>;
133
140
  export declare type ShallowAddress = {
134
141
  prefecture: string;
135
142
  cityAndOaza: string;
@@ -0,0 +1,3 @@
1
+ declare type BrowserName = 'chrome' | 'safari' | 'firefox' | 'edge';
2
+ export declare function getCurrentBrowser(): BrowserName | undefined;
3
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { UIComponentsError } from '../model/uiComponents';
2
- declare const createHeaderMiniAppApi: (urlEndpoint: string, customHeaders?: Record<string, string> | undefined) => Headers | undefined;
2
+ declare const createHeaderMiniAppApi: (urlEndpoint: string, authorizationRequired?: boolean, customHeaders?: Record<string, string> | undefined) => Headers | undefined;
3
3
  export declare type ErrorResponse = {
4
4
  error: {
5
5
  message: string;
@@ -15,6 +15,7 @@ declare type PPFetchOptions = {
15
15
  timeout?: number;
16
16
  skipResultCodeCheck?: boolean;
17
17
  skipStatusCodeCheck?: boolean;
18
+ authorizationRequired?: boolean;
18
19
  };
19
20
  declare type APIBaseResponse = {
20
21
  signed: {
@@ -334,6 +334,7 @@ export declare function getLanguage(): {
334
334
  update: string;
335
335
  cancel: string;
336
336
  };
337
+ viewdetails: string;
337
338
  eMoneyOnly: string;
338
339
  topupNoticeEmoneyOnlyTitle: string;
339
340
  topupNoticeEmoneyOnlyDesc: string;
@@ -58,13 +58,14 @@ export declare function filterErrorButtonList(buttonList: UIComponentsErrorButto
58
58
  export declare function getFailErrorCode(ppFetchResult: string): MiniAppErrorType.timeOut | MiniAppErrorType.serverError | MiniAppErrorType.tokenExpired | MiniAppErrorType.notAuthorized;
59
59
  export declare function getStoreUrl(): "https://play.google.com/store/apps/details?id=jp.ne.paypay.android.app" | "https://itunes.apple.com/app/id1435783608";
60
60
  export declare function generateCodeVerifier(length?: number): string;
61
- export declare function generateCodeChallange(codeVerifier: string): Promise<string>;
61
+ export declare function generateCodeChallenge(codeVerifier: string): Promise<string>;
62
62
  export declare function openUrl(linkUrl: string): void;
63
- export declare function getButtonType(button: UIComponentsErrorButton | ErrorSheetButton, onlyButton?: boolean): "success" | "default" | "primary" | "warning" | "danger" | "link" | "outLined";
63
+ export declare function getButtonType(button: UIComponentsErrorButton | ErrorSheetButton, onlyButton?: boolean): "success" | "default" | "link" | "primary" | "warning" | "danger" | "outLined";
64
64
  export declare function saveUserData(): void;
65
65
  export declare function getRandomString(): string;
66
66
  export declare function isAlphabet(value: string): boolean;
67
67
  export declare function reconstructKycPassportCallbackUrl(url: string, type: string): string;
68
68
  export declare function getValueFromUA(paramName: string): string | undefined;
69
+ export declare function replaceStringPlaceholders(str: string, values: Record<string, string>): string;
69
70
  export declare function validateUrl(url: string): boolean;
70
71
  export {};
@@ -1,7 +1,12 @@
1
1
  import { PpLocalStorageKey } from '../types';
2
2
  export declare function getKeyWithClientId(baseKey: PpLocalStorageKey): string;
3
3
  export declare function getAccessToken(): string | null;
4
+ export declare function saveLocalStorage(key: string, value: string): void;
5
+ export declare function getLocalStorage(key: string): string | null;
4
6
  export declare function removeLocalStorage(key: string): void;
7
+ export declare function saveClaimCouponImmediately(couponId: string): void;
8
+ export declare function getClaimCouponImmediately(couponId: string): string | null;
9
+ export declare function removeClaimCouponImmediately(couponId: string): void;
5
10
  export declare function saveAccessToken(token: string): void;
6
11
  export declare function getRefreshToken(): string;
7
12
  export declare function saveRefreshToken(token: string): void;
@@ -9,6 +14,7 @@ export declare function getConsumedOtt(): string | null;
9
14
  export declare function saveConsumedOtt(ott: string): void;
10
15
  export declare function saveEnv(env: string): void;
11
16
  export declare function getEnv(): string | null;
17
+ export declare function isProdEnv(): boolean;
12
18
  export declare function getClientUUID(): string;
13
19
  export declare function getDeviceUUIDFromNative(): string;
14
20
  export declare function getDeviceUUID(): string;
@@ -0,0 +1,24 @@
1
+ declare type GetTargetWindowFunctionType = () => Promise<Window | undefined | null> | Window | undefined | null;
2
+ declare type FunctionType = (...args: Array<any>) => unknown;
3
+ declare type FunctionsCollection = Record<string, FunctionType>;
4
+ export declare type WindowBridgeFunctions<T extends FunctionsCollection> = {
5
+ [K in keyof T]: Parameters<T[K]>[0] extends undefined ? () => Promise<Awaited<ReturnType<T[K]>>> : (params: Parameters<T[K]>[0]) => Promise<Awaited<ReturnType<T[K]>>>;
6
+ };
7
+ export declare class WindowBridge {
8
+ private static _instance;
9
+ private deferredCallbacks;
10
+ private functions;
11
+ private allowedOrigins?;
12
+ private constructor();
13
+ private subscribeToMessageEvent;
14
+ private handleRequest;
15
+ private handleResponse;
16
+ private sendErrorResponse;
17
+ private sendSuccessResponse;
18
+ private sendResponse;
19
+ static init(functions: FunctionsCollection, allowedOrigins?: Array<string>): WindowBridge;
20
+ static getBridge(): WindowBridge;
21
+ static getTargetWindowFunctionProxy<T extends FunctionsCollection = FunctionsCollection>(getTargetWindow: GetTargetWindowFunctionType, targetWindowOrigin: string): T;
22
+ getTargetWindowFunctionProxy<T extends FunctionsCollection = FunctionsCollection>(getTargetWindow: GetTargetWindowFunctionType, targetWindowOrigin: string): T;
23
+ }
24
+ export {};
@@ -0,0 +1,17 @@
1
+ import { PropType } from 'vue';
2
+ declare const Arrow: import("vue").DefineComponent<{
3
+ direction: {
4
+ type: PropType<"up" | "down">;
5
+ default: string;
6
+ };
7
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
8
+ direction: {
9
+ type: PropType<"up" | "down">;
10
+ default: string;
11
+ };
12
+ }>> & {
13
+ onClick?: ((...args: any[]) => any) | undefined;
14
+ }, {
15
+ direction: "up" | "down";
16
+ }>;
17
+ export default Arrow;
@@ -0,0 +1,39 @@
1
+ import { PropType } from 'vue';
2
+ import { Translation } from '../../../../types';
3
+ import { FormattedCoupon } from '../../types';
4
+ declare const CouponAction: import("vue").DefineComponent<{
5
+ coupon: {
6
+ type: PropType<FormattedCoupon>;
7
+ required: true;
8
+ };
9
+ merchantId: {
10
+ type: StringConstructor;
11
+ required: true;
12
+ };
13
+ core: {
14
+ type: PropType<import("../../../../utils/windowBridge").WindowBridgeFunctions<typeof import("../../../../core/coreFunctions")>>;
15
+ required: true;
16
+ };
17
+ translation: {
18
+ type: PropType<Translation>;
19
+ required: true;
20
+ };
21
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
22
+ coupon: {
23
+ type: PropType<FormattedCoupon>;
24
+ required: true;
25
+ };
26
+ merchantId: {
27
+ type: StringConstructor;
28
+ required: true;
29
+ };
30
+ core: {
31
+ type: PropType<import("../../../../utils/windowBridge").WindowBridgeFunctions<typeof import("../../../../core/coreFunctions")>>;
32
+ required: true;
33
+ };
34
+ translation: {
35
+ type: PropType<Translation>;
36
+ required: true;
37
+ };
38
+ }>>, {}>;
39
+ export default CouponAction;
@@ -0,0 +1,14 @@
1
+ import { PropType } from 'vue';
2
+ import { Translation } from '../../../../types';
3
+ declare const CouponContainer: import("vue").DefineComponent<{
4
+ translation: {
5
+ type: PropType<Translation>;
6
+ required: true;
7
+ };
8
+ }, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
9
+ translation: {
10
+ type: PropType<Translation>;
11
+ required: true;
12
+ };
13
+ }>>, {}>;
14
+ export default CouponContainer;