@paypay/mini-app-js-sdk 2.46.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.
- package/dist/client/clientUtils.d.ts +1 -1
- package/dist/client/communicationWithCore.d.ts +16 -0
- package/dist/client/functions/copyToClipboard.d.ts +2 -0
- package/dist/client/functions/coreWindowBridgeFunctions.d.ts +12 -0
- package/dist/client/functions/getKycPassportInfo.d.ts +3 -0
- package/dist/client/functions/logout.d.ts +6 -0
- package/dist/client/functions/renderCoupons.d.ts +6 -0
- package/dist/client/functions/scanCode.d.ts +2 -0
- package/dist/client/functions/setTitle.d.ts +2 -0
- package/dist/client/functions/share.d.ts +2 -0
- package/dist/client/functions/storageFunctions.d.ts +6 -0
- package/dist/client/functions/verifyMultiFactorAuthResult.d.ts +3 -0
- package/dist/client/index.d.ts +4 -59
- package/dist/client/types.d.ts +37 -2
- package/dist/client/{clientFunctions → windowBridgeFunctions}/storageFunctions.d.ts +10 -0
- package/dist/client/{clientFunctions → windowBridgeFunctions}/urlFunctions.d.ts +1 -0
- package/dist/core/coreFunctions/getLoginUrl.d.ts +1 -1
- package/dist/core/coreUtils.d.ts +1 -1
- package/dist/mini-app-js-sdk.browser.js +1 -1
- package/dist/mini-app-js-sdk.es.js +443 -557
- package/dist/model/bridge/getTopBarHeight.d.ts +1 -1
- package/dist/package/lottie/lottie.d.ts +6 -6
- package/dist/types/init.d.ts +0 -2
- package/dist/types/makePayment.d.ts +2 -1
- package/dist/utils/getAppDetail.d.ts +1 -0
- package/dist/utils/helper.d.ts +5 -2
- package/dist/views/coupon/components/Arrow/index.d.ts +5 -5
- package/dist/views/coupon/components/CouponAction/index.d.ts +4 -4
- package/dist/views/coupon/components/CouponContainer/index.d.ts +3 -3
- package/dist/views/coupon/index.d.ts +4 -4
- package/package.json +9 -9
- package/dist/types/getLoginUrl.d.ts +0 -8
- /package/dist/client/{clientFunctions → windowBridgeFunctions}/index.d.ts +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { NativeParams } from '../../jsbridge-core/jsbridge';
|
|
2
2
|
import { GetTopBarHeightResult } from '../../types/getTopBarHeight';
|
|
3
|
-
export declare function getTopBarHeight(params: NativeParams<GetTopBarHeightResult>): void
|
|
3
|
+
export declare function getTopBarHeight(params: NativeParams<GetTopBarHeightResult>): Promise<void>;
|
|
@@ -2,7 +2,7 @@ import { PropType } from 'vue';
|
|
|
2
2
|
import { AnimationItem } from 'lottie-web/build/player/lottie_svg';
|
|
3
3
|
import { RenderType } from '../../types';
|
|
4
4
|
declare type TRenderType = (typeof RenderType)[keyof typeof RenderType];
|
|
5
|
-
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
6
|
loop: {
|
|
7
7
|
type: BooleanConstructor;
|
|
8
8
|
default: boolean;
|
|
@@ -32,9 +32,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
32
32
|
default: RenderType;
|
|
33
33
|
required: false;
|
|
34
34
|
};
|
|
35
|
-
}
|
|
35
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
36
36
|
'create-lottie': (_p: AnimationItem) => true;
|
|
37
|
-
}, string, import("vue").
|
|
37
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
38
38
|
loop: {
|
|
39
39
|
type: BooleanConstructor;
|
|
40
40
|
default: boolean;
|
|
@@ -64,14 +64,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
64
64
|
default: RenderType;
|
|
65
65
|
required: false;
|
|
66
66
|
};
|
|
67
|
-
}>> & {
|
|
67
|
+
}>> & Readonly<{
|
|
68
68
|
"onCreate-lottie"?: ((_p: AnimationItem) => any) | undefined;
|
|
69
|
-
}
|
|
69
|
+
}>, {
|
|
70
70
|
path: string;
|
|
71
71
|
type: TRenderType;
|
|
72
72
|
loop: boolean;
|
|
73
73
|
autoplay: boolean;
|
|
74
74
|
styles: Record<string, any>;
|
|
75
75
|
className: string;
|
|
76
|
-
}>;
|
|
76
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
77
77
|
export default _default;
|
package/dist/types/init.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ export interface InitClientParams extends NativeParams<InitResult> {
|
|
|
5
5
|
env?: PPEnvType;
|
|
6
6
|
mode?: string;
|
|
7
7
|
debugMode?: boolean;
|
|
8
|
-
useAllFunctions?: boolean;
|
|
9
8
|
}
|
|
10
9
|
export interface InitParams extends NativeParams<InitResult> {
|
|
11
10
|
clientId: string;
|
|
@@ -17,7 +16,6 @@ export interface InitParams extends NativeParams<InitResult> {
|
|
|
17
16
|
codeVerifier?: string;
|
|
18
17
|
clientVersion?: string;
|
|
19
18
|
debugMode?: boolean;
|
|
20
|
-
useAllFunctions?: boolean;
|
|
21
19
|
clientSdkType?: SdkType;
|
|
22
20
|
clientUrl?: string;
|
|
23
21
|
}
|
|
@@ -52,8 +52,9 @@ export declare type MakePaymentResult = {
|
|
|
52
52
|
address: Address | null;
|
|
53
53
|
};
|
|
54
54
|
export declare const PaymentConsultResultCode: {
|
|
55
|
-
|
|
55
|
+
EKYC_REQUIRED_FOR_DONATION: string;
|
|
56
56
|
INSUFFICIENT_BALANCE_AND_NO_AVAILABLE_TOPUP_METHOD: string;
|
|
57
|
+
EKYC_REQUIRED_FOR_PAYMENT: string;
|
|
57
58
|
};
|
|
58
59
|
export declare type PaymentQuery = {
|
|
59
60
|
merchant?: string;
|
|
@@ -4,3 +4,4 @@ export declare function fetchAppDetail(accessToken?: string, options?: {
|
|
|
4
4
|
priority?: 'high' | 'low';
|
|
5
5
|
}): Promise<SerializedAppDetail>;
|
|
6
6
|
export declare function useAppDetail(): Ref<SerializedAppDetail | null>;
|
|
7
|
+
export declare function getCachedAppDetailOrFetch(): Promise<SerializedAppDetail>;
|
package/dist/utils/helper.d.ts
CHANGED
|
@@ -5,8 +5,9 @@ import { FontSize } from '../types/getPlatformInformation';
|
|
|
5
5
|
import { NativeParams } from '../jsbridge-core/jsbridge';
|
|
6
6
|
import { App } from 'vue';
|
|
7
7
|
import { OrderType, MakePaymentParams, BankInfo, CreditCardInfo, InfoBanner, PayLaterCCInfo, PaymentMethod, SbidBankInfo } from '../types/makePayment';
|
|
8
|
+
import { InitParams } from '../types/init';
|
|
8
9
|
export declare function isDef<T>(val: T): val is NonNullable<T>;
|
|
9
|
-
export declare function isFunction(val: unknown): val is () =>
|
|
10
|
+
export declare function isFunction(val: unknown): val is (...ars: Array<unknown>) => unknown;
|
|
10
11
|
export declare function isNumeric(val: string | number): val is string;
|
|
11
12
|
export declare function formatNumber(value: string, options?: {
|
|
12
13
|
allowDot?: boolean;
|
|
@@ -42,12 +43,13 @@ export declare enum MiniAppRuntime {
|
|
|
42
43
|
}
|
|
43
44
|
export declare function getRuntime(): MiniAppRuntime;
|
|
44
45
|
export declare function isPayPayMiniApp(): boolean;
|
|
46
|
+
export declare function getAndroidVersion(): number | null;
|
|
45
47
|
export declare function getAppVersion(): string | null;
|
|
46
48
|
export declare function semVerCompare(a: string, b: string): boolean;
|
|
47
49
|
export declare function checkVersion(minVersion: string): boolean;
|
|
48
50
|
export declare function checkJSSDKVersion(minVersion: string): boolean;
|
|
49
51
|
export declare function clientStorageFunctionsAreAvailable(): boolean;
|
|
50
|
-
export declare function
|
|
52
|
+
export declare function shouldRemoveOTTFromQueryParams(initParams: InitParams): boolean;
|
|
51
53
|
export declare function getPlatformFontSize(): FontSize;
|
|
52
54
|
export declare function delay(time?: number): Promise<boolean>;
|
|
53
55
|
export declare const createErrorCode: (errorCode: MiniAppErrorType, jws?: string | null | undefined) => {
|
|
@@ -91,4 +93,5 @@ export declare function isMobileSize(width: number): boolean;
|
|
|
91
93
|
export declare function isDesktopSize(width: number): boolean;
|
|
92
94
|
export declare function getOverDraftInfoBanner(banners?: Array<InfoBanner>): InfoBanner | undefined;
|
|
93
95
|
export declare function isValidUrl(urlChallenge: string): boolean;
|
|
96
|
+
export declare function calculateTopMargin(navigationStyle: string, statusBarHeight: number, navBarHeight: number): number;
|
|
94
97
|
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
declare const Arrow: import("vue").DefineComponent<{
|
|
2
|
+
declare const Arrow: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
3
3
|
direction: {
|
|
4
4
|
type: PropType<"up" | "down">;
|
|
5
5
|
default: string;
|
|
6
6
|
};
|
|
7
|
-
}
|
|
7
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
8
8
|
direction: {
|
|
9
9
|
type: PropType<"up" | "down">;
|
|
10
10
|
default: string;
|
|
11
11
|
};
|
|
12
|
-
}>> & {
|
|
12
|
+
}>> & Readonly<{
|
|
13
13
|
onClick?: ((...args: any[]) => any) | undefined;
|
|
14
|
-
}
|
|
14
|
+
}>, {
|
|
15
15
|
direction: "up" | "down";
|
|
16
|
-
}>;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
17
17
|
export default Arrow;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { RedirectType, Translation } from '../../../../types';
|
|
3
3
|
import { FormattedCoupon } from '../../types';
|
|
4
|
-
declare const CouponAction: import("vue").DefineComponent<{
|
|
4
|
+
declare const CouponAction: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
5
|
coupon: {
|
|
6
6
|
type: PropType<FormattedCoupon>;
|
|
7
7
|
required: true;
|
|
@@ -35,7 +35,7 @@ declare const CouponAction: import("vue").DefineComponent<{
|
|
|
35
35
|
required: false;
|
|
36
36
|
default: undefined;
|
|
37
37
|
};
|
|
38
|
-
}
|
|
38
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
39
39
|
coupon: {
|
|
40
40
|
type: PropType<FormattedCoupon>;
|
|
41
41
|
required: true;
|
|
@@ -69,7 +69,7 @@ declare const CouponAction: import("vue").DefineComponent<{
|
|
|
69
69
|
required: false;
|
|
70
70
|
default: undefined;
|
|
71
71
|
};
|
|
72
|
-
}
|
|
72
|
+
}>> & Readonly<{}>, {
|
|
73
73
|
postLoginRedirectType: RedirectType;
|
|
74
|
-
}>;
|
|
74
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
75
75
|
export default CouponAction;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { Locale, Translation } from '../../../../types';
|
|
3
|
-
declare const CouponContainer: import("vue").DefineComponent<{
|
|
3
|
+
declare const CouponContainer: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
4
|
locale: {
|
|
5
5
|
type: PropType<Locale>;
|
|
6
6
|
required: true;
|
|
@@ -9,7 +9,7 @@ declare const CouponContainer: import("vue").DefineComponent<{
|
|
|
9
9
|
type: PropType<Translation>;
|
|
10
10
|
required: true;
|
|
11
11
|
};
|
|
12
|
-
}
|
|
12
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
13
|
locale: {
|
|
14
14
|
type: PropType<Locale>;
|
|
15
15
|
required: true;
|
|
@@ -18,5 +18,5 @@ declare const CouponContainer: import("vue").DefineComponent<{
|
|
|
18
18
|
type: PropType<Translation>;
|
|
19
19
|
required: true;
|
|
20
20
|
};
|
|
21
|
-
}
|
|
21
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
22
22
|
export default CouponContainer;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
2
|
import { Locale, RedirectType, Translation } from '../../types';
|
|
3
3
|
import { FormattedCoupon } from './types';
|
|
4
|
-
export declare const CouponView: import("vue").DefineComponent<{
|
|
4
|
+
export declare const CouponView: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
5
|
coupon: {
|
|
6
6
|
type: PropType<FormattedCoupon>;
|
|
7
7
|
required: true;
|
|
@@ -39,7 +39,7 @@ export declare const CouponView: import("vue").DefineComponent<{
|
|
|
39
39
|
required: false;
|
|
40
40
|
default: undefined;
|
|
41
41
|
};
|
|
42
|
-
}
|
|
42
|
+
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
43
|
coupon: {
|
|
44
44
|
type: PropType<FormattedCoupon>;
|
|
45
45
|
required: true;
|
|
@@ -77,6 +77,6 @@ export declare const CouponView: import("vue").DefineComponent<{
|
|
|
77
77
|
required: false;
|
|
78
78
|
default: undefined;
|
|
79
79
|
};
|
|
80
|
-
}
|
|
80
|
+
}>> & Readonly<{}>, {
|
|
81
81
|
postLoginRedirectType: RedirectType;
|
|
82
|
-
}>;
|
|
82
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paypay/mini-app-js-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.48.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "yarn build:client && yarn build:core",
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
"dev:client": "vite --host 0.0.0.0",
|
|
16
16
|
"dev:core": "vite --config vite.config.core.ts",
|
|
17
17
|
"lint": "yarn lint:script && yarn lint:style",
|
|
18
|
-
"lint:script": "eslint src test --
|
|
18
|
+
"lint:script": "eslint src test --ext .ts,.tsx,.vue",
|
|
19
19
|
"lint:style": "stylelint src/**/*.{css,less,vue}",
|
|
20
20
|
"format": "prettier --write '{src,test}/**/*.{ts,tsx,vue,less}'",
|
|
21
21
|
"upgrade": "yarn upgrade-interactive",
|
|
22
|
-
"test": "vitest --
|
|
23
|
-
"test:watch": "vitest --
|
|
22
|
+
"test": "vitest --coverage.enabled --coverage.include=src/** --coverage.reporter=lcov --run --silent",
|
|
23
|
+
"test:watch": "vitest --watch",
|
|
24
24
|
"e2e:sp": "SDK=SP playwright test",
|
|
25
25
|
"e2e:sp:update": "yarn e2e:sp --update-snapshots",
|
|
26
26
|
"e2e:ma": "SDK=MA playwright test",
|
|
@@ -35,18 +35,19 @@
|
|
|
35
35
|
"unpkg": "dist/mini-app-js-sdk.browser.js",
|
|
36
36
|
"types": "dist/client/types.d.ts",
|
|
37
37
|
"engines": {
|
|
38
|
-
"node": ">=
|
|
38
|
+
"node": ">=22.0.0"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"js-cookie": "^3.0.5"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@braintree/browser-detection": "^2.0.1",
|
|
45
|
-
"@pinia/testing": "
|
|
45
|
+
"@pinia/testing": "0.1.7",
|
|
46
46
|
"@playwright/test": "^1.49.1",
|
|
47
47
|
"@rollup/plugin-html": "^1.1.0",
|
|
48
48
|
"@rollup/plugin-replace": "^6.0.2",
|
|
49
49
|
"@rollup/plugin-terser": "^0.4.4",
|
|
50
|
+
"@rollup/plugin-typescript": "^12.1.2",
|
|
50
51
|
"@sentry/browser": "^8.45.1",
|
|
51
52
|
"@sentry/vite-plugin": "^2.22.7",
|
|
52
53
|
"@testing-library/jest-dom": "^6.6.3",
|
|
@@ -77,13 +78,12 @@
|
|
|
77
78
|
"lottie-web": "^5.12.2",
|
|
78
79
|
"neoip": "^3.0.1",
|
|
79
80
|
"npm-run-all": "^4.1.5",
|
|
80
|
-
"pinia": "
|
|
81
|
+
"pinia": "2.3.1",
|
|
81
82
|
"postcss": "^8.4.49",
|
|
82
83
|
"postcss-html": "^1.7.0",
|
|
83
84
|
"postcss-less": "^6.0.0",
|
|
84
85
|
"prettier": "^3.4.2",
|
|
85
86
|
"rollup": "3.29.5",
|
|
86
|
-
"rollup-plugin-ts": "^3.4.5",
|
|
87
87
|
"rollup-plugin-visualizer": "^5.12.0",
|
|
88
88
|
"stylelint": "^16.13.2",
|
|
89
89
|
"terser": "^5.37.0",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"vitest": "^2.1.8",
|
|
96
96
|
"vitest-canvas-mock": "^0.3.3",
|
|
97
97
|
"vitest-fetch-mock": "^0.4.3",
|
|
98
|
-
"vue": "
|
|
98
|
+
"vue": "~3.5.13",
|
|
99
99
|
"vue-eslint-parser": "^9.4.3",
|
|
100
100
|
"vue-tsc": "^2.2.0"
|
|
101
101
|
},
|
|
File without changes
|