@paypay/mini-app-js-sdk 1.24.0 → 1.27.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 +2 -1
- package/dist/mini-app-js-sdk.browser.js +1 -1
- package/dist/mini-app-js-sdk.es.js +434 -353
- 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 +18 -6
- package/dist/package/desktop-header/index.d.ts +3 -3
- package/dist/package/input/index.d.ts +0 -16
- package/dist/package/input/utils.d.ts +0 -4
- package/dist/package/overlay/index.d.ts +4 -3
- package/dist/package/payment-method/Bank.vue.d.ts +1 -1
- package/dist/package/payment-method/CreditCard.vue.d.ts +1 -1
- package/dist/package/payment-method/SbidBank.vue.d.ts +1 -1
- package/dist/types.d.ts +2 -1
- package/dist/utils/api.d.ts +2 -2
- package/dist/utils/create/bem.d.ts +1 -1
- package/dist/utils/create/index.d.ts +1 -1
- package/dist/utils/fetch.d.ts +44 -3
- package/dist/utils/helper.d.ts +6 -3
- package/dist/utils/miniAppRequest.d.ts +2 -1
- package/dist/utils/popstateHandler.d.ts +2 -1
- package/dist/views/make-payment/Main.vue.d.ts +1 -0
- package/dist/views/make-payment/Sheets/CashBackDetails/index.vue.d.ts +1 -0
- package/dist/views/make-payment/Sheets/Charge/TopInfo.vue.d.ts +2 -7
- package/dist/views/make-payment/Sheets/Charge/index.vue.d.ts +22 -11
- package/dist/views/make-payment/hooks/app-hooks.d.ts +12 -7
- package/dist/views/topup/App.vue.d.ts +4 -4
- package/package.json +3 -1
|
@@ -7,10 +7,10 @@ export interface PaymentIdQuery {
|
|
|
7
7
|
sourceInfoApp?: string;
|
|
8
8
|
type?: string;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export declare type PaymentQuery = {
|
|
11
11
|
merchant?: string;
|
|
12
12
|
agreeSimilarTransaction: boolean;
|
|
13
|
-
}
|
|
13
|
+
};
|
|
14
14
|
interface PaymentBody {
|
|
15
15
|
merchantPaymentId: string;
|
|
16
16
|
amount: Amount;
|
|
@@ -63,7 +63,7 @@ declare type MethodBase = {
|
|
|
63
63
|
bankInfo?: unknown;
|
|
64
64
|
sbidCarrierBillingInfo?: unknown;
|
|
65
65
|
paymentMethodDescriptionInfo?: {
|
|
66
|
-
statusDescription: Record<string, unknown
|
|
66
|
+
statusDescription: Record<string, unknown> | null;
|
|
67
67
|
};
|
|
68
68
|
};
|
|
69
69
|
export declare type BannerInfo = {
|
|
@@ -162,7 +162,12 @@ export declare type SbidBankMethod = Omit<MethodBase, 'sbidCarrierBillingInfo'>
|
|
|
162
162
|
paymentMethodStatus?: PaymentMethodStatus;
|
|
163
163
|
};
|
|
164
164
|
};
|
|
165
|
-
export declare type PayLaterMethod = Omit<MethodBase, ''
|
|
165
|
+
export declare type PayLaterMethod = Omit<MethodBase, 'payLaterCcInfo'> & {
|
|
166
|
+
payLaterCcInfo?: {
|
|
167
|
+
availableAmount?: number;
|
|
168
|
+
paymentMethodStatus?: PaymentMethodStatus;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
166
171
|
export declare type ResponseBase = {
|
|
167
172
|
status: number;
|
|
168
173
|
signed: {
|
|
@@ -178,7 +183,7 @@ export declare type ResponseBase = {
|
|
|
178
183
|
};
|
|
179
184
|
};
|
|
180
185
|
export declare type PaymentMethod = WalletMethod | CreditMethod | BankMethod | SbidBankMethod | PayLaterMethod;
|
|
181
|
-
export declare type
|
|
186
|
+
export declare type GetPaymentMethodsResponse = ResponseBase & {
|
|
182
187
|
unsigned: {
|
|
183
188
|
data: {
|
|
184
189
|
payload: {
|
|
@@ -192,7 +197,13 @@ export declare const getPaymentMethods: (params: {
|
|
|
192
197
|
type: string;
|
|
193
198
|
productType?: string;
|
|
194
199
|
sourceInfoApp?: string;
|
|
195
|
-
}) => Promise<ErrorResponse |
|
|
200
|
+
}) => Promise<ErrorResponse | GetPaymentMethodsResponse>;
|
|
201
|
+
export declare const getPaymentMethods2: (params: {
|
|
202
|
+
merchant?: string;
|
|
203
|
+
type: string;
|
|
204
|
+
productType?: string;
|
|
205
|
+
sourceInfoApp?: string;
|
|
206
|
+
}) => Promise<import("../utils/fetch").PPFetchResult<GetPaymentMethodsResponse, Record<string, unknown>>>;
|
|
196
207
|
export declare type PaymentResult = {
|
|
197
208
|
requestedAt: number;
|
|
198
209
|
storeId: string;
|
|
@@ -280,6 +291,7 @@ export declare type CashBackDetailAnimation = {
|
|
|
280
291
|
optionalText: string;
|
|
281
292
|
campaignId: string;
|
|
282
293
|
url: string;
|
|
294
|
+
largeUrl?: string;
|
|
283
295
|
};
|
|
284
296
|
declare type CashBackDetailInfo = {
|
|
285
297
|
amountText: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const DesktopHeader: import("vue").DefineComponent<{
|
|
2
2
|
class: {
|
|
3
|
-
type:
|
|
3
|
+
type: StringConstructor;
|
|
4
4
|
required: false;
|
|
5
5
|
default: string;
|
|
6
6
|
};
|
|
@@ -14,8 +14,8 @@ export declare const DesktopHeader: import("vue").DefineComponent<{
|
|
|
14
14
|
title?: unknown;
|
|
15
15
|
} & {
|
|
16
16
|
title: string;
|
|
17
|
-
class: string
|
|
17
|
+
class: string;
|
|
18
18
|
} & {}>, {
|
|
19
19
|
title: string;
|
|
20
|
-
class: string
|
|
20
|
+
class: string;
|
|
21
21
|
}>;
|
|
@@ -25,11 +25,6 @@ export declare const Input: import("vue").DefineComponent<{
|
|
|
25
25
|
required: false;
|
|
26
26
|
default: string;
|
|
27
27
|
};
|
|
28
|
-
formatter: {
|
|
29
|
-
type: FunctionConstructor;
|
|
30
|
-
required: false;
|
|
31
|
-
default: (v: unknown) => unknown;
|
|
32
|
-
};
|
|
33
28
|
autofocus: {
|
|
34
29
|
type: BooleanConstructor;
|
|
35
30
|
required: false;
|
|
@@ -85,11 +80,6 @@ export declare const Input: import("vue").DefineComponent<{
|
|
|
85
80
|
required: false;
|
|
86
81
|
default: () => {}[];
|
|
87
82
|
};
|
|
88
|
-
formatTrigger: {
|
|
89
|
-
type: PropType<FieldValidateTrigger>;
|
|
90
|
-
required: false;
|
|
91
|
-
default: string;
|
|
92
|
-
};
|
|
93
83
|
validateTrigger: {
|
|
94
84
|
type: PropType<FieldValidateTrigger>;
|
|
95
85
|
required: false;
|
|
@@ -130,7 +120,6 @@ export declare const Input: import("vue").DefineComponent<{
|
|
|
130
120
|
border?: unknown;
|
|
131
121
|
disabled?: unknown;
|
|
132
122
|
size?: unknown;
|
|
133
|
-
formatter?: unknown;
|
|
134
123
|
autofocus?: unknown;
|
|
135
124
|
prepend?: unknown;
|
|
136
125
|
append?: unknown;
|
|
@@ -142,7 +131,6 @@ export declare const Input: import("vue").DefineComponent<{
|
|
|
142
131
|
inputAlign?: unknown;
|
|
143
132
|
errorMessage?: unknown;
|
|
144
133
|
rules?: unknown;
|
|
145
|
-
formatTrigger?: unknown;
|
|
146
134
|
validateTrigger?: unknown;
|
|
147
135
|
id?: unknown;
|
|
148
136
|
prependClassName?: unknown;
|
|
@@ -159,7 +147,6 @@ export declare const Input: import("vue").DefineComponent<{
|
|
|
159
147
|
size: InputSize;
|
|
160
148
|
id: string;
|
|
161
149
|
border: boolean;
|
|
162
|
-
formatter: Function;
|
|
163
150
|
autofocus: boolean;
|
|
164
151
|
prepend: string;
|
|
165
152
|
append: string;
|
|
@@ -170,7 +157,6 @@ export declare const Input: import("vue").DefineComponent<{
|
|
|
170
157
|
inputAlign: string;
|
|
171
158
|
errorMessage: string;
|
|
172
159
|
rules: FieldRule[];
|
|
173
|
-
formatTrigger: FieldValidateTrigger;
|
|
174
160
|
validateTrigger: FieldValidateTrigger;
|
|
175
161
|
prependClassName: string;
|
|
176
162
|
appendClassName: string;
|
|
@@ -190,7 +176,6 @@ export declare const Input: import("vue").DefineComponent<{
|
|
|
190
176
|
size: InputSize;
|
|
191
177
|
id: string;
|
|
192
178
|
border: boolean;
|
|
193
|
-
formatter: Function;
|
|
194
179
|
autofocus: boolean;
|
|
195
180
|
prepend: string;
|
|
196
181
|
append: string;
|
|
@@ -201,7 +186,6 @@ export declare const Input: import("vue").DefineComponent<{
|
|
|
201
186
|
inputAlign: string;
|
|
202
187
|
errorMessage: string;
|
|
203
188
|
rules: FieldRule[];
|
|
204
|
-
formatTrigger: FieldValidateTrigger;
|
|
205
189
|
validateTrigger: FieldValidateTrigger;
|
|
206
190
|
prependClassName: string;
|
|
207
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;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
1
2
|
export declare const OverLay: import("vue").DefineComponent<{
|
|
2
3
|
show: BooleanConstructor;
|
|
3
4
|
appear: {
|
|
@@ -5,7 +6,7 @@ export declare const OverLay: import("vue").DefineComponent<{
|
|
|
5
6
|
default: boolean;
|
|
6
7
|
};
|
|
7
8
|
click: {
|
|
8
|
-
type:
|
|
9
|
+
type: PropType<unknown>;
|
|
9
10
|
default: () => () => void;
|
|
10
11
|
};
|
|
11
12
|
onTouchstart: {
|
|
@@ -32,13 +33,13 @@ export declare const OverLay: import("vue").DefineComponent<{
|
|
|
32
33
|
} & {
|
|
33
34
|
show: boolean;
|
|
34
35
|
appear: boolean;
|
|
35
|
-
click:
|
|
36
|
+
click: () => void;
|
|
36
37
|
onTouchstart: Function;
|
|
37
38
|
dontPreventSwipe: boolean;
|
|
38
39
|
} & {}>, {
|
|
39
40
|
show: boolean;
|
|
40
41
|
appear: boolean;
|
|
41
|
-
click:
|
|
42
|
+
click: () => void;
|
|
42
43
|
onTouchstart: Function;
|
|
43
44
|
dontPreventSwipe: boolean;
|
|
44
45
|
}>;
|
|
@@ -19,7 +19,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
19
19
|
digits: string | undefined;
|
|
20
20
|
}>;
|
|
21
21
|
isDisable: import("vue").ComputedRef<boolean>;
|
|
22
|
-
paymentMethodStatus: import("vue").ComputedRef<
|
|
22
|
+
paymentMethodStatus: import("vue").ComputedRef<unknown>;
|
|
23
23
|
maintainanceInfo: import("vue").ComputedRef<unknown>;
|
|
24
24
|
getClass: string;
|
|
25
25
|
style: Record<string, string>;
|
|
@@ -19,7 +19,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
19
19
|
imgStyle: string;
|
|
20
20
|
style: string;
|
|
21
21
|
}>;
|
|
22
|
-
paymentMethodStatusText: ComputedRef<
|
|
22
|
+
paymentMethodStatusText: ComputedRef<unknown>;
|
|
23
23
|
maintainanceInfo: ComputedRef<unknown>;
|
|
24
24
|
getClass: string;
|
|
25
25
|
isActivated: ComputedRef<boolean>;
|
|
@@ -43,7 +43,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
43
43
|
bankIcon: string;
|
|
44
44
|
confetti: string;
|
|
45
45
|
};
|
|
46
|
-
paymentMethodStatus: import("vue").ComputedRef<
|
|
46
|
+
paymentMethodStatus: import("vue").ComputedRef<unknown>;
|
|
47
47
|
maintainanceInfo: import("vue").ComputedRef<unknown>;
|
|
48
48
|
getClass: string;
|
|
49
49
|
lg: {
|
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;
|
|
@@ -298,6 +298,7 @@ export interface UserInfo {
|
|
|
298
298
|
avatarUrl: string;
|
|
299
299
|
nickName: string;
|
|
300
300
|
}
|
|
301
|
+
export declare type PopStateInputParams = ShowErrorSheetParams | GetUserAddressParams | InputAddressParams | MakePaymentParams | OpenAppParams | MapParams | ShowAlertParams | ShowUpdateWarningParams | TakePhotoParams | TopupParams;
|
|
301
302
|
export declare type Permission = {
|
|
302
303
|
blocker: boolean;
|
|
303
304
|
name: string;
|
package/dist/utils/api.d.ts
CHANGED
|
@@ -85,9 +85,9 @@ export declare type getCashBackResponse = {
|
|
|
85
85
|
signed: unknown;
|
|
86
86
|
unsigned: unknown;
|
|
87
87
|
};
|
|
88
|
-
|
|
88
|
+
declare type CashBackParams = {
|
|
89
89
|
paymentId: string;
|
|
90
|
-
}
|
|
90
|
+
};
|
|
91
91
|
export declare function getCashbackDetail(params: CashBackParams): Promise<unknown>;
|
|
92
92
|
export declare type ShallowAddress = {
|
|
93
93
|
prefecture: string;
|
|
@@ -2,5 +2,5 @@ export declare type Mod = string | {
|
|
|
2
2
|
[key: string]: unknown;
|
|
3
3
|
};
|
|
4
4
|
export declare type Mods = Mod | Mod[];
|
|
5
|
-
export declare function createBEM(name: string): (el?: Mods | undefined, mods?: Mods | undefined) =>
|
|
5
|
+
export declare function createBEM(name: string): (el?: Mods | undefined, mods?: Mods | undefined) => string;
|
|
6
6
|
export declare type BEM = ReturnType<typeof createBEM>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare function createNamespace(name: string): readonly [(el?: import("./bem").Mods | undefined, mods?: import("./bem").Mods | undefined) =>
|
|
1
|
+
export declare function createNamespace(name: string): readonly [(el?: import("./bem").Mods | undefined, mods?: import("./bem").Mods | undefined) => string];
|
|
2
2
|
export declare type ObjectLiteralStyle = {
|
|
3
3
|
[className: string]: boolean;
|
|
4
4
|
};
|
package/dist/utils/fetch.d.ts
CHANGED
|
@@ -4,13 +4,54 @@ 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
|
-
params?:
|
|
10
|
+
params?: Record<string, string | number | boolean | undefined>;
|
|
11
11
|
data?: unknown;
|
|
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 };
|
package/dist/utils/helper.d.ts
CHANGED
|
@@ -8,10 +8,13 @@ export declare function formatNumber(value: string, options?: {
|
|
|
8
8
|
allowMinus?: boolean;
|
|
9
9
|
}): string;
|
|
10
10
|
export declare const numberWithCommas: (x?: number) => string;
|
|
11
|
-
export declare function formatCurrency(val: number, n: number
|
|
11
|
+
export declare function formatCurrency(val: number, n: number): string;
|
|
12
12
|
export declare function trigger(target: Element, type: string): void;
|
|
13
13
|
export declare function isObject(val: unknown): val is Record<string, unknown>;
|
|
14
14
|
export declare function isPromise<T = unknown>(val: unknown): val is Promise<T>;
|
|
15
|
+
interface LastPayment {
|
|
16
|
+
paymentAt: number;
|
|
17
|
+
}
|
|
15
18
|
export declare function checkDuplicateTopup(amount: number): boolean;
|
|
16
19
|
export declare const debounce: (fn: (args?: unknown) => unknown) => (...params: unknown[]) => void;
|
|
17
20
|
interface PersistenceLastPayment {
|
|
@@ -22,7 +25,7 @@ interface PersistenceLastTopup {
|
|
|
22
25
|
amount: number;
|
|
23
26
|
}
|
|
24
27
|
export declare function saveTopup(lastTopup: PersistenceLastTopup): boolean;
|
|
25
|
-
export declare function getLastPayment():
|
|
28
|
+
export declare function getLastPayment(): (LastPayment & PersistenceLastPayment) | null;
|
|
26
29
|
export declare function getLastPaymentMethod(): string | null;
|
|
27
30
|
export declare function getLastTopupPayMethod(): string | null;
|
|
28
31
|
export declare function existDuplicatePayment(price: number): boolean;
|
|
@@ -42,5 +45,5 @@ export declare const createErrorCode: (errorCode: MiniAppErrorType, jws?: string
|
|
|
42
45
|
};
|
|
43
46
|
export declare function updateLocalisedString(data: string, target: string, value: string): string;
|
|
44
47
|
export declare function handleHeightResize(el: HTMLElement, windowHeight: number, isScrollable: boolean, offsetHeight: number): boolean;
|
|
45
|
-
export declare function getPaymentMethodStatus(isExpired: boolean, val?: PaymentMethodStatus):
|
|
48
|
+
export declare function getPaymentMethodStatus(isExpired: boolean, val?: PaymentMethodStatus): unknown;
|
|
46
49
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { PopStateInputParams } from '../types';
|
|
2
|
+
export declare const popStateHandler: (callback: () => void, inputParams?: PopStateInputParams | undefined) => {
|
|
2
3
|
mounted(): void;
|
|
3
4
|
unmounted(): void;
|
|
4
5
|
};
|
|
@@ -13,6 +13,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13
13
|
}, {
|
|
14
14
|
createAnime: (s: AnimationItem) => void;
|
|
15
15
|
animation: import("vue").ComputedRef<import("../../../../model/makePayment").CashBackDetailAnimation>;
|
|
16
|
+
animationUrl: import("vue").ComputedRef<string>;
|
|
16
17
|
type: import("vue").ComputedRef<{
|
|
17
18
|
lottie: boolean;
|
|
18
19
|
tierCampaignBottom: boolean;
|
|
@@ -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;
|
|
@@ -72,7 +75,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
72
75
|
paymentMethodDescriptionInfo?: {
|
|
73
76
|
statusDescription: {
|
|
74
77
|
[x: string]: unknown;
|
|
75
|
-
};
|
|
78
|
+
} | null;
|
|
76
79
|
} | undefined;
|
|
77
80
|
walletInfo?: {
|
|
78
81
|
cashBackBalanceInfo?: {
|
|
@@ -164,7 +167,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
164
167
|
paymentMethodDescriptionInfo?: {
|
|
165
168
|
statusDescription: {
|
|
166
169
|
[x: string]: unknown;
|
|
167
|
-
};
|
|
170
|
+
} | null;
|
|
168
171
|
} | undefined;
|
|
169
172
|
creditCardInfo?: {
|
|
170
173
|
brand?: import("../../../../model/makePayment").CreditTypes | undefined;
|
|
@@ -204,7 +207,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
204
207
|
paymentMethodDescriptionInfo?: {
|
|
205
208
|
statusDescription: {
|
|
206
209
|
[x: string]: unknown;
|
|
207
|
-
};
|
|
210
|
+
} | null;
|
|
208
211
|
} | undefined;
|
|
209
212
|
bankInfo?: {
|
|
210
213
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -251,7 +254,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
251
254
|
paymentMethodDescriptionInfo?: {
|
|
252
255
|
statusDescription: {
|
|
253
256
|
[x: string]: unknown;
|
|
254
|
-
};
|
|
257
|
+
} | null;
|
|
255
258
|
} | undefined;
|
|
256
259
|
sbidCarrierBillingInfo?: {
|
|
257
260
|
paymentMethodStatus?: import("../../../../model/makePayment").PaymentMethodStatus | undefined;
|
|
@@ -286,7 +289,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
286
289
|
paymentMethodDescriptionInfo?: {
|
|
287
290
|
statusDescription: {
|
|
288
291
|
[x: string]: unknown;
|
|
289
|
-
};
|
|
292
|
+
} | null;
|
|
293
|
+
} | undefined;
|
|
294
|
+
payLaterCcInfo?: {
|
|
295
|
+
availableAmount?: number | undefined;
|
|
296
|
+
paymentMethodStatus?: import("../../../../model/makePayment").PaymentMethodStatus | undefined;
|
|
290
297
|
} | undefined;
|
|
291
298
|
}>;
|
|
292
299
|
bannerInfo: import("vue").ComputedRef<{
|
|
@@ -341,7 +348,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
341
348
|
paymentMethodDescriptionInfo?: {
|
|
342
349
|
statusDescription: {
|
|
343
350
|
[x: string]: unknown;
|
|
344
|
-
};
|
|
351
|
+
} | null;
|
|
345
352
|
} | undefined;
|
|
346
353
|
walletInfo?: {
|
|
347
354
|
cashBackBalanceInfo?: {
|
|
@@ -433,7 +440,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
433
440
|
paymentMethodDescriptionInfo?: {
|
|
434
441
|
statusDescription: {
|
|
435
442
|
[x: string]: unknown;
|
|
436
|
-
};
|
|
443
|
+
} | null;
|
|
437
444
|
} | undefined;
|
|
438
445
|
creditCardInfo?: {
|
|
439
446
|
brand?: import("../../../../model/makePayment").CreditTypes | undefined;
|
|
@@ -473,7 +480,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
473
480
|
paymentMethodDescriptionInfo?: {
|
|
474
481
|
statusDescription: {
|
|
475
482
|
[x: string]: unknown;
|
|
476
|
-
};
|
|
483
|
+
} | null;
|
|
477
484
|
} | undefined;
|
|
478
485
|
bankInfo?: {
|
|
479
486
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -520,7 +527,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
520
527
|
paymentMethodDescriptionInfo?: {
|
|
521
528
|
statusDescription: {
|
|
522
529
|
[x: string]: unknown;
|
|
523
|
-
};
|
|
530
|
+
} | null;
|
|
524
531
|
} | undefined;
|
|
525
532
|
sbidCarrierBillingInfo?: {
|
|
526
533
|
paymentMethodStatus?: import("../../../../model/makePayment").PaymentMethodStatus | undefined;
|
|
@@ -555,7 +562,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
555
562
|
paymentMethodDescriptionInfo?: {
|
|
556
563
|
statusDescription: {
|
|
557
564
|
[x: string]: unknown;
|
|
558
|
-
};
|
|
565
|
+
} | null;
|
|
566
|
+
} | undefined;
|
|
567
|
+
payLaterCcInfo?: {
|
|
568
|
+
availableAmount?: number | undefined;
|
|
569
|
+
paymentMethodStatus?: import("../../../../model/makePayment").PaymentMethodStatus | undefined;
|
|
559
570
|
} | undefined;
|
|
560
571
|
})[]>;
|
|
561
572
|
setMoney: (price: number) => number;
|
|
@@ -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;
|
|
@@ -76,7 +76,7 @@ export declare function useConsult(props: Props): {
|
|
|
76
76
|
paymentMethodDescriptionInfo?: {
|
|
77
77
|
statusDescription: {
|
|
78
78
|
[x: string]: unknown;
|
|
79
|
-
};
|
|
79
|
+
} | null;
|
|
80
80
|
} | undefined;
|
|
81
81
|
walletInfo?: {
|
|
82
82
|
cashBackBalanceInfo?: {
|
|
@@ -168,7 +168,7 @@ export declare function useConsult(props: Props): {
|
|
|
168
168
|
paymentMethodDescriptionInfo?: {
|
|
169
169
|
statusDescription: {
|
|
170
170
|
[x: string]: unknown;
|
|
171
|
-
};
|
|
171
|
+
} | null;
|
|
172
172
|
} | undefined;
|
|
173
173
|
creditCardInfo?: {
|
|
174
174
|
brand?: import("../../../model/makePayment").CreditTypes | undefined;
|
|
@@ -208,7 +208,7 @@ export declare function useConsult(props: Props): {
|
|
|
208
208
|
paymentMethodDescriptionInfo?: {
|
|
209
209
|
statusDescription: {
|
|
210
210
|
[x: string]: unknown;
|
|
211
|
-
};
|
|
211
|
+
} | null;
|
|
212
212
|
} | undefined;
|
|
213
213
|
bankInfo?: {
|
|
214
214
|
paymentMethodStatusLabel?: string | undefined;
|
|
@@ -255,7 +255,7 @@ export declare function useConsult(props: Props): {
|
|
|
255
255
|
paymentMethodDescriptionInfo?: {
|
|
256
256
|
statusDescription: {
|
|
257
257
|
[x: string]: unknown;
|
|
258
|
-
};
|
|
258
|
+
} | null;
|
|
259
259
|
} | undefined;
|
|
260
260
|
sbidCarrierBillingInfo?: {
|
|
261
261
|
paymentMethodStatus?: import("../../../model/makePayment").PaymentMethodStatus | undefined;
|
|
@@ -290,7 +290,11 @@ export declare function useConsult(props: Props): {
|
|
|
290
290
|
paymentMethodDescriptionInfo?: {
|
|
291
291
|
statusDescription: {
|
|
292
292
|
[x: string]: unknown;
|
|
293
|
-
};
|
|
293
|
+
} | null;
|
|
294
|
+
} | undefined;
|
|
295
|
+
payLaterCcInfo?: {
|
|
296
|
+
availableAmount?: number | undefined;
|
|
297
|
+
paymentMethodStatus?: import("../../../model/makePayment").PaymentMethodStatus | undefined;
|
|
294
298
|
} | undefined;
|
|
295
299
|
})[];
|
|
296
300
|
prepaidOnly: boolean | null;
|
|
@@ -342,6 +346,7 @@ export declare function useCashBackDetail(props: Props): {
|
|
|
342
346
|
optionalText: string;
|
|
343
347
|
campaignId: string;
|
|
344
348
|
url: string;
|
|
349
|
+
largeUrl?: string | undefined;
|
|
345
350
|
}[];
|
|
346
351
|
optionalText: string;
|
|
347
352
|
animationUrl: string;
|
|
@@ -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.27.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",
|