@paypay/mini-app-js-sdk 1.25.0 → 1.26.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/jsbridge-core/jsbridge.d.ts +1 -1
- package/dist/mini-app-js-sdk.browser.js +1 -1
- package/dist/mini-app-js-sdk.es.js +351 -290
- package/dist/mini-app-js-sdk.min.css +1 -1
- package/dist/model/bridge/getAppDetail.d.ts +1 -1
- package/dist/model/bridge/getConfigure.d.ts +2 -1
- package/dist/model/bridge/registerKyc.d.ts +1 -1
- package/dist/model/bridge/removeStorageData.d.ts +1 -1
- package/dist/model/bridge/render.d.ts +1 -1
- package/dist/model/bridge/renderLoginButton.d.ts +1 -1
- package/dist/model/bridge/renderPayButton.d.ts +1 -1
- package/dist/model/bridge/scanCode.d.ts +1 -1
- package/dist/model/bridge/setSessionData.d.ts +1 -1
- package/dist/model/bridge/setStorageData.d.ts +1 -1
- package/dist/model/bridge/setTitle.d.ts +1 -1
- package/dist/model/bridge/showAlert.d.ts +1 -1
- package/dist/model/bridge/showErrorSheet.d.ts +1 -1
- package/dist/model/bridge/showUpdateWarning.d.ts +1 -1
- package/dist/model/makePayment.d.ts +8 -2
- package/dist/package/input/index.d.ts +0 -19
- package/dist/package/input/utils.d.ts +0 -4
- package/dist/types.d.ts +1 -1
- package/dist/utils/fetch.d.ts +43 -2
- package/dist/utils/miniAppRequest.d.ts +2 -1
- package/dist/views/make-payment/Sheets/Charge/TopInfo.vue.d.ts +2 -7
- package/dist/views/make-payment/Sheets/Charge/index.vue.d.ts +4 -1
- package/dist/views/make-payment/hooks/app-hooks.d.ts +2 -2
- package/dist/views/topup/App.vue.d.ts +4 -4
- package/package.json +3 -1
|
@@ -4,9 +4,6 @@ export declare type InputSize = 'lg' | 'md' | 'sm';
|
|
|
4
4
|
export declare type InputMode = 'text' | 'none' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
|
|
5
5
|
export declare type InputType = 'hidden' | 'text' | 'search' | 'tel' | 'url' | 'email' | 'password' | 'datetime' | 'month' | 'week' | 'time' | 'datetime-local' | 'number' | 'range' | 'color' | 'checkbox' | 'radio' | 'file' | 'submit' | 'image' | 'reset' | 'button' | 'zipCode' | 'currency' | 'digit';
|
|
6
6
|
export declare type AutoCapitalize = 'off' | 'none' | 'on' | 'sentences' | 'characters';
|
|
7
|
-
export interface InputElementType extends HTMLInputElement {
|
|
8
|
-
composing?: boolean;
|
|
9
|
-
}
|
|
10
7
|
export declare const Input: import("vue").DefineComponent<{
|
|
11
8
|
name: {
|
|
12
9
|
type: StringConstructor;
|
|
@@ -28,11 +25,6 @@ export declare const Input: import("vue").DefineComponent<{
|
|
|
28
25
|
required: false;
|
|
29
26
|
default: string;
|
|
30
27
|
};
|
|
31
|
-
formatter: {
|
|
32
|
-
type: FunctionConstructor;
|
|
33
|
-
required: false;
|
|
34
|
-
default: (v: unknown) => unknown;
|
|
35
|
-
};
|
|
36
28
|
autofocus: {
|
|
37
29
|
type: BooleanConstructor;
|
|
38
30
|
required: false;
|
|
@@ -88,11 +80,6 @@ export declare const Input: import("vue").DefineComponent<{
|
|
|
88
80
|
required: false;
|
|
89
81
|
default: () => {}[];
|
|
90
82
|
};
|
|
91
|
-
formatTrigger: {
|
|
92
|
-
type: PropType<FieldValidateTrigger>;
|
|
93
|
-
required: false;
|
|
94
|
-
default: string;
|
|
95
|
-
};
|
|
96
83
|
validateTrigger: {
|
|
97
84
|
type: PropType<FieldValidateTrigger>;
|
|
98
85
|
required: false;
|
|
@@ -133,7 +120,6 @@ export declare const Input: import("vue").DefineComponent<{
|
|
|
133
120
|
border?: unknown;
|
|
134
121
|
disabled?: unknown;
|
|
135
122
|
size?: unknown;
|
|
136
|
-
formatter?: unknown;
|
|
137
123
|
autofocus?: unknown;
|
|
138
124
|
prepend?: unknown;
|
|
139
125
|
append?: unknown;
|
|
@@ -145,7 +131,6 @@ export declare const Input: import("vue").DefineComponent<{
|
|
|
145
131
|
inputAlign?: unknown;
|
|
146
132
|
errorMessage?: unknown;
|
|
147
133
|
rules?: unknown;
|
|
148
|
-
formatTrigger?: unknown;
|
|
149
134
|
validateTrigger?: unknown;
|
|
150
135
|
id?: unknown;
|
|
151
136
|
prependClassName?: unknown;
|
|
@@ -162,7 +147,6 @@ export declare const Input: import("vue").DefineComponent<{
|
|
|
162
147
|
size: InputSize;
|
|
163
148
|
id: string;
|
|
164
149
|
border: boolean;
|
|
165
|
-
formatter: Function;
|
|
166
150
|
autofocus: boolean;
|
|
167
151
|
prepend: string;
|
|
168
152
|
append: string;
|
|
@@ -173,7 +157,6 @@ export declare const Input: import("vue").DefineComponent<{
|
|
|
173
157
|
inputAlign: string;
|
|
174
158
|
errorMessage: string;
|
|
175
159
|
rules: FieldRule[];
|
|
176
|
-
formatTrigger: FieldValidateTrigger;
|
|
177
160
|
validateTrigger: FieldValidateTrigger;
|
|
178
161
|
prependClassName: string;
|
|
179
162
|
appendClassName: string;
|
|
@@ -193,7 +176,6 @@ export declare const Input: import("vue").DefineComponent<{
|
|
|
193
176
|
size: InputSize;
|
|
194
177
|
id: string;
|
|
195
178
|
border: boolean;
|
|
196
|
-
formatter: Function;
|
|
197
179
|
autofocus: boolean;
|
|
198
180
|
prepend: string;
|
|
199
181
|
append: string;
|
|
@@ -204,7 +186,6 @@ export declare const Input: import("vue").DefineComponent<{
|
|
|
204
186
|
inputAlign: string;
|
|
205
187
|
errorMessage: string;
|
|
206
188
|
rules: FieldRule[];
|
|
207
|
-
formatTrigger: FieldValidateTrigger;
|
|
208
189
|
validateTrigger: FieldValidateTrigger;
|
|
209
190
|
prependClassName: string;
|
|
210
191
|
appendClassName: string;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
export declare type FieldValidateTrigger = 'onSubmit' | 'onChange' | 'onBlur';
|
|
2
2
|
export declare type FieldRule = {
|
|
3
3
|
pattern?: RegExp;
|
|
4
|
-
trigger?: FieldValidateTrigger;
|
|
5
4
|
message?: string | ((value: unknown, rule: FieldRule) => string);
|
|
6
|
-
required?: boolean;
|
|
7
|
-
validator?: (value: unknown, rule: FieldRule) => boolean | Promise<boolean>;
|
|
8
|
-
formatter?: (value: unknown, rule: FieldRule) => unknown;
|
|
9
5
|
};
|
|
10
6
|
export declare function runSyncRule(value: unknown, rule: FieldRule): boolean;
|
package/dist/types.d.ts
CHANGED
|
@@ -242,7 +242,7 @@ export interface KycData {
|
|
|
242
242
|
address?: KycAddress;
|
|
243
243
|
job?: string;
|
|
244
244
|
}
|
|
245
|
-
export interface RegisterKycParams extends NativeParams<unknown,
|
|
245
|
+
export interface RegisterKycParams extends NativeParams<unknown, MiniAppErrorResultType, void> {
|
|
246
246
|
type?: string;
|
|
247
247
|
eKycDocuments?: Array<string>;
|
|
248
248
|
redirectUrl?: string;
|
package/dist/utils/fetch.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare type ErrorResponse = {
|
|
|
4
4
|
message: string;
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
|
-
declare
|
|
7
|
+
declare type PPFetchOptions = {
|
|
8
8
|
method: string;
|
|
9
9
|
url: string;
|
|
10
10
|
params?: Record<string, string | number | boolean | undefined>;
|
|
@@ -12,5 +12,46 @@ declare function ppFetch<T>(options: {
|
|
|
12
12
|
headers?: Record<string, string>;
|
|
13
13
|
suppressRefresh?: boolean;
|
|
14
14
|
timeout?: number;
|
|
15
|
-
}
|
|
15
|
+
};
|
|
16
|
+
declare function ppFetch<T>(options: PPFetchOptions): Promise<T | ErrorResponse>;
|
|
17
|
+
declare type APIBaseResponse = {
|
|
18
|
+
signed: {
|
|
19
|
+
jws: string;
|
|
20
|
+
};
|
|
21
|
+
unsigned: {
|
|
22
|
+
resultInfo: {
|
|
23
|
+
code: string;
|
|
24
|
+
};
|
|
25
|
+
data?: {
|
|
26
|
+
header?: {
|
|
27
|
+
resultCode?: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
} | {
|
|
32
|
+
signed?: undefined;
|
|
33
|
+
unsigned?: undefined;
|
|
34
|
+
resultInfo: {
|
|
35
|
+
code: string;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export declare type PPFetchResult<T, E = Record<string, unknown>> = {
|
|
39
|
+
ppFetchResult: 'success';
|
|
40
|
+
statusCode: number;
|
|
41
|
+
body: T;
|
|
42
|
+
} | {
|
|
43
|
+
ppFetchResult: 'apiError';
|
|
44
|
+
statusCode: number;
|
|
45
|
+
body: APIBaseResponse & E;
|
|
46
|
+
} | {
|
|
47
|
+
ppFetchResult: 'notInitialized';
|
|
48
|
+
body: null;
|
|
49
|
+
} | {
|
|
50
|
+
ppFetchResult: 'fetchError';
|
|
51
|
+
body: null;
|
|
52
|
+
} | {
|
|
53
|
+
ppFetchResult: 'timeout';
|
|
54
|
+
body: null;
|
|
55
|
+
};
|
|
56
|
+
export declare function ppFetch2<T, E = Record<string, unknown>>(options: PPFetchOptions): Promise<PPFetchResult<T, E>>;
|
|
16
57
|
export { createHeaderMiniAppApi, ppFetch };
|
|
@@ -3,10 +3,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3
3
|
appDetail: {
|
|
4
4
|
type: PropType<{
|
|
5
5
|
appName: string;
|
|
6
|
-
appLogo: string;
|
|
6
|
+
appLogo: string | null;
|
|
7
7
|
}>;
|
|
8
8
|
required: true;
|
|
9
|
-
default: () => {};
|
|
10
9
|
};
|
|
11
10
|
price: {
|
|
12
11
|
type: NumberConstructor;
|
|
@@ -309,16 +308,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
309
308
|
price: number;
|
|
310
309
|
appDetail: {
|
|
311
310
|
appName: string;
|
|
312
|
-
appLogo: string;
|
|
311
|
+
appLogo: string | null;
|
|
313
312
|
};
|
|
314
313
|
balance: number;
|
|
315
314
|
insufficientAmount: number;
|
|
316
315
|
} & {}>, {
|
|
317
316
|
price: number;
|
|
318
|
-
appDetail: {
|
|
319
|
-
appName: string;
|
|
320
|
-
appLogo: string;
|
|
321
|
-
};
|
|
322
317
|
balance: number;
|
|
323
318
|
insufficientAmount: number;
|
|
324
319
|
}>;
|
|
@@ -42,7 +42,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
42
42
|
insufficientAmount: import("vue").ComputedRef<number>;
|
|
43
43
|
back: () => void;
|
|
44
44
|
style: Record<string, string>;
|
|
45
|
-
appDetail:
|
|
45
|
+
appDetail: {
|
|
46
|
+
appName: string;
|
|
47
|
+
appLogo: string | null;
|
|
48
|
+
};
|
|
46
49
|
paymentMethod: import("vue").ComputedRef<{
|
|
47
50
|
paymentMethodId: string;
|
|
48
51
|
paymentMethodType: import("../../../../model/makePayment").PaymentMethodType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComputedRef } from 'vue';
|
|
2
|
-
import { BannerInfo, CashBackDetail, ConsultResponse,
|
|
2
|
+
import { BannerInfo, CashBackDetail, ConsultResponse, GetPaymentMethodsResponse, MakePaymentResponse, PaymentMethod, PaymentMethodType } from '../../../model/makePayment';
|
|
3
3
|
import { UIComponentsError } from '../../../model/uiComponents';
|
|
4
4
|
import { MakePaymentParams } from '../../../types';
|
|
5
5
|
import { ErrorResponse } from '../../../utils/fetch';
|
|
@@ -9,7 +9,7 @@ export interface Props {
|
|
|
9
9
|
}
|
|
10
10
|
export declare function usePaymentMethod(props: Props): {
|
|
11
11
|
getPaymentMethods: (dryRun?: boolean | undefined) => Promise<{
|
|
12
|
-
res: ErrorResponse |
|
|
12
|
+
res: ErrorResponse | GetPaymentMethodsResponse;
|
|
13
13
|
result: boolean;
|
|
14
14
|
}>;
|
|
15
15
|
showPaymentMethod: () => void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { PropType } from 'vue';
|
|
2
|
-
import { TopupResponseData } from '../../utils/api';
|
|
3
|
-
import { TopupParams } from '../../types';
|
|
4
|
-
import { MiniAppErrorType } from '../../model/miniAppError';
|
|
5
1
|
import { AnimationItem } from 'lottie-web';
|
|
2
|
+
import { PropType } from 'vue';
|
|
6
3
|
import { PaymentMethod as TPaymentMethod } from '../../model/makePayment';
|
|
4
|
+
import { MiniAppErrorType } from '../../model/miniAppError';
|
|
7
5
|
import { UIComponentsErrorButton } from '../../model/uiComponents';
|
|
6
|
+
import { TopupParams } from '../../types';
|
|
7
|
+
import { TopupResponseData } from '../../utils/api';
|
|
8
8
|
declare const _default: import("vue").DefineComponent<{
|
|
9
9
|
show: BooleanConstructor;
|
|
10
10
|
topupParams: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paypay/mini-app-js-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "vite build",
|
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
"@babel/plugin-transform-typescript": "^7.15.4",
|
|
32
32
|
"@babel/preset-env": "^7.15.4",
|
|
33
33
|
"@rollup/plugin-replace": "^3.0.0",
|
|
34
|
+
"@testing-library/jest-dom": "^5.16.2",
|
|
35
|
+
"@testing-library/vue": "^6.4.2",
|
|
34
36
|
"@types/jest": "^26.0.24",
|
|
35
37
|
"@types/js-cookie": "^2.2.7",
|
|
36
38
|
"@types/uuid": "^8.3.1",
|