@paypay/mini-app-js-sdk 1.21.0 → 1.22.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/composition-api/dom/index.d.ts +1 -0
- package/dist/composition-api/dom/useCountDown.d.ts +20 -0
- package/dist/composition-api/useRegisterEmail.d.ts +1 -1
- package/dist/composition-api/useRenderSmartButton.d.ts +1 -1
- package/dist/jsbridge-core/jsbridge.d.ts +2 -2
- package/dist/jsbridge-core/lib/logger.d.ts +5 -5
- package/dist/mini-app-api.d.ts +2 -2
- package/dist/mini-app-js-sdk.browser.js +1 -1
- package/dist/mini-app-js-sdk.es.js +8270 -5626
- package/dist/mini-app-js-sdk.min.css +1 -1
- package/dist/model/bridge/checkPaymentMethod.d.ts +1 -1
- package/dist/model/bridge/getAppDetail.d.ts +2 -16
- package/dist/model/bridge/getConfigure.d.ts +3 -3
- package/dist/model/bridge/registerEmail.d.ts +1 -1
- package/dist/model/bridge/registerKyc.d.ts +1 -1
- package/dist/model/bridge/renderLoginButton.d.ts +6 -2
- package/dist/model/bridge/renderPayButton.d.ts +5 -1
- package/dist/model/bridge/request.d.ts +1 -1
- package/dist/model/makePayment.d.ts +66 -56
- package/dist/model/uiComponents.d.ts +2 -1
- package/dist/package/action-sheet/index.d.ts +20 -13
- package/dist/package/banner-header/index.vue.d.ts +3 -3
- package/dist/package/button/index.d.ts +17 -9
- package/dist/package/charge-amount-list/index.vue.d.ts +1 -7
- package/dist/package/charge-amount-more-list/index.vue.d.ts +6 -2
- package/dist/package/date-button/index.vue.d.ts +1 -3
- package/dist/package/desktop-header/index.d.ts +21 -0
- package/dist/package/header/index.d.ts +7 -7
- package/dist/package/index.d.ts +1 -0
- package/dist/package/input/index.d.ts +57 -17
- package/dist/package/lottie/index.d.ts +5 -8
- package/dist/package/overlay/index.d.ts +1 -1
- package/dist/package/payment-method/Bank.vue.d.ts +7 -7
- package/dist/package/payment-method/CreditCard.vue.d.ts +5 -5
- package/dist/package/payment-method/SbidBank.vue.d.ts +262 -4
- package/dist/package/payment-method/Wallet.vue.d.ts +265 -7
- package/dist/package/payment-method-list/index.vue.d.ts +14 -2
- package/dist/package/payment-type/Bank.vue.d.ts +5 -5
- package/dist/package/payment-type/CreditCard.vue.d.ts +6 -6
- package/dist/package/payment-type/Sbid.vue.d.ts +260 -2
- package/dist/package/payment-type/Wallet.vue.d.ts +261 -2
- package/dist/package/payment-type/index.d.ts +4 -6
- package/dist/package/select-list/Components.d.ts +15 -3
- package/dist/package/select-list/index.d.ts +11 -2
- package/dist/package/switch/index.d.ts +1 -1
- package/dist/package/wallet-breakdown/WalletBreakdown.vue.d.ts +286 -0
- package/dist/types.d.ts +47 -16
- package/dist/utils/api.d.ts +25 -17
- package/dist/utils/create/bem.d.ts +2 -2
- package/dist/utils/create/index.d.ts +1 -1
- package/dist/utils/fetch.d.ts +2 -2
- package/dist/utils/getImages.d.ts +36 -5
- package/dist/utils/getLanguage.d.ts +224 -2
- package/dist/utils/helper.d.ts +10 -13
- package/dist/utils/popstateHandler.d.ts +1 -1
- package/dist/utils/storage.d.ts +12 -10
- package/dist/utils/uiConstants.d.ts +1 -0
- package/dist/utils/useBreakpoints.d.ts +5 -0
- package/dist/utils/utils.d.ts +2 -0
- package/dist/views/email-registration/App.vue.d.ts +231 -8
- package/dist/views/email-registration/components/EmailButton.vue.d.ts +3 -3
- package/dist/views/email-registration/hooks/callback.d.ts +2 -2
- package/dist/views/email-registration/hooks/ui.d.ts +2 -2
- package/dist/views/email-registration/parts/RegisterEmail/RegisterEmail.vue.d.ts +2 -2
- package/dist/views/email-registration/parts/RegisterEmail/ResendEmailSheet.vue.d.ts +1 -1
- package/dist/views/error-sheet/Index.vue.d.ts +271 -13
- package/dist/views/get-user-address/App.vue.d.ts +11 -3
- package/dist/views/get-user-address/Sheet/AddSheet/Contents.vue.d.ts +244 -10
- package/dist/views/get-user-address/Sheet/AddSheet/DeleteHalfSheet.vue.d.ts +262 -4
- package/dist/views/get-user-address/Sheet/AddSheet/Footer.vue.d.ts +246 -3
- package/dist/views/get-user-address/Sheet/AddSheet/TagForm.vue.d.ts +227 -4
- package/dist/views/get-user-address/Sheet/AddSheet/index.vue.d.ts +246 -18
- package/dist/views/get-user-address/Sheet/App.vue.d.ts +29 -12
- package/dist/views/get-user-address/Sheet/DisplaySheet/Address.vue.d.ts +235 -3
- package/dist/views/get-user-address/Sheet/DisplaySheet/Footer.vue.d.ts +227 -3
- package/dist/views/get-user-address/Sheet/DisplaySheet/index.vue.d.ts +302 -11
- package/dist/views/get-user-address/Sheet/SelectedAddress/NoRegisteredAddressMessage.vue.d.ts +240 -0
- package/dist/views/get-user-address/Sheet/SelectedAddress/SelectedAddress.vue.d.ts +259 -0
- package/dist/views/get-user-address/Sheet/SelectedAddress/components/AddressInfo.vue.d.ts +254 -0
- package/dist/views/get-user-address/Sheet/SelectedAddress/components/Footer.vue.d.ts +246 -0
- package/dist/views/get-user-address/hooks/ui-hooks.d.ts +45 -2
- package/dist/views/get-user-address/store/error-handle.d.ts +2 -1
- package/dist/views/get-user-address/store/root.d.ts +6 -2
- package/dist/views/input-address/App.vue.d.ts +6 -7
- package/dist/views/input-address/hook/app.d.ts +2 -2
- package/dist/views/input-address/hook/error-handle.d.ts +1 -1
- package/dist/views/make-payment/App.vue.d.ts +3 -3
- package/dist/views/make-payment/Main.vue.d.ts +77 -510
- package/dist/views/make-payment/Sheets/AddressInfo.vue.d.ts +230 -8
- package/dist/views/make-payment/Sheets/CashBackDetailList.vue.d.ts +229 -5
- package/dist/views/make-payment/Sheets/CashBackDetails/BirthdayConfirm.vue.d.ts +260 -2
- package/dist/views/make-payment/Sheets/CashBackDetails/BirthdayConfirmError.vue.d.ts +260 -2
- package/dist/views/make-payment/Sheets/CashBackDetails/hooks.d.ts +4 -4
- package/dist/views/make-payment/Sheets/CashBackDetails/index.vue.d.ts +267 -9
- package/dist/views/make-payment/Sheets/Charge/ChoosePaymentMethod.vue.d.ts +240 -3
- package/dist/views/make-payment/Sheets/Charge/TopContent.vue.d.ts +355 -13
- package/dist/views/make-payment/Sheets/Charge/TopInfo.vue.d.ts +262 -3
- package/dist/views/make-payment/Sheets/Charge/index.vue.d.ts +537 -226
- package/dist/views/make-payment/Sheets/ChoosePayment.vue.d.ts +232 -6
- package/dist/views/make-payment/Sheets/CloseConfirmation.vue.d.ts +265 -0
- package/dist/views/make-payment/Sheets/Consult.vue.d.ts +1 -1
- package/dist/views/make-payment/Sheets/DuplicatePayment.vue.d.ts +233 -10
- package/dist/views/make-payment/Sheets/PayMethod.vue.d.ts +328 -0
- package/dist/views/make-payment/Sheets/Payment.vue.d.ts +338 -18
- package/dist/views/make-payment/Sheets/PaymentCompletion/CashBackDetailRow.vue.d.ts +43 -9
- package/dist/views/make-payment/Sheets/PaymentCompletion/index.vue.d.ts +293 -8
- package/dist/views/make-payment/hooks/app-hooks.d.ts +167 -354
- package/dist/views/make-payment/hooks/ui-hooks.d.ts +29 -14
- package/dist/views/make-payment/store/age-confirm.d.ts +1 -1
- package/dist/views/make-payment/store/handle-error.d.ts +2 -2
- package/dist/views/make-payment/store/root.d.ts +3 -3
- package/dist/views/make-payment/utils/paymentMethod.d.ts +3 -1
- package/dist/views/open-app/App.vue.d.ts +261 -3
- package/dist/views/open-map/App.vue.d.ts +225 -2
- package/dist/views/show-alert/App.vue.d.ts +5 -5
- package/dist/views/show-update-warning/App.vue.d.ts +261 -3
- package/dist/views/smart-button/App.vue.d.ts +10 -10
- package/dist/views/take-photo/App.vue.d.ts +225 -2
- package/dist/views/topup/App.vue.d.ts +295 -19
- package/dist/views/topup/BannerInfo.vue.d.ts +15 -11
- package/dist/views/topup/CashbackInfo.vue.d.ts +226 -3
- package/dist/views/topup/TopupCompletion.vue.d.ts +261 -1
- package/package.json +4 -3
package/dist/types.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare type MiniAppResult = Record<string, unknown>;
|
|
|
5
5
|
export interface MiniAppErrorResultType {
|
|
6
6
|
errorCode: MiniAppErrorType;
|
|
7
7
|
}
|
|
8
|
-
interface OrderItem {
|
|
8
|
+
export interface OrderItem {
|
|
9
9
|
name: string;
|
|
10
10
|
category?: string;
|
|
11
11
|
quantity: number;
|
|
@@ -26,13 +26,18 @@ export interface MakePaymentParams extends NativeParams<MiniAppResult, unknown,
|
|
|
26
26
|
orderReceiptNumber?: string;
|
|
27
27
|
agreeSimilarTransaction?: boolean;
|
|
28
28
|
prepaidOnly?: boolean;
|
|
29
|
-
metadata?:
|
|
29
|
+
metadata?: unknown;
|
|
30
30
|
sourceInfoApp?: string;
|
|
31
31
|
alwaysDisplayCompletionScreen?: boolean;
|
|
32
32
|
storeInfo?: string;
|
|
33
33
|
productType?: string;
|
|
34
34
|
taxExempt?: boolean;
|
|
35
|
-
additionalUserInfo?:
|
|
35
|
+
additionalUserInfo?: {
|
|
36
|
+
userAddress?: {
|
|
37
|
+
visible: boolean;
|
|
38
|
+
mandatory: boolean;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
36
41
|
}
|
|
37
42
|
export interface CopyToClipBoardParams extends NativeParams<MiniAppResult, MiniAppErrorResultType, void> {
|
|
38
43
|
value: string;
|
|
@@ -76,7 +81,9 @@ export interface Amount {
|
|
|
76
81
|
amount: number;
|
|
77
82
|
currency?: string;
|
|
78
83
|
}
|
|
79
|
-
export interface TopupParams extends NativeParams<MiniAppResult, MiniAppErrorResultType
|
|
84
|
+
export interface TopupParams extends NativeParams<MiniAppResult, MiniAppErrorResultType & {
|
|
85
|
+
jws?: string;
|
|
86
|
+
}, void> {
|
|
80
87
|
merchantTopUpId: string;
|
|
81
88
|
requestedAt: number;
|
|
82
89
|
prepaidOnly?: boolean;
|
|
@@ -98,9 +105,19 @@ export interface ShowAlertParams extends NativeParams<void, MiniAppErrorResultTy
|
|
|
98
105
|
title?: string;
|
|
99
106
|
buttonTitle?: string;
|
|
100
107
|
}
|
|
108
|
+
export declare enum ButtonStyle {
|
|
109
|
+
primary = "primary",
|
|
110
|
+
secondary = "secondary"
|
|
111
|
+
}
|
|
112
|
+
export declare type ButtonList = {
|
|
113
|
+
title: string;
|
|
114
|
+
link: string;
|
|
115
|
+
style: ButtonStyle;
|
|
116
|
+
};
|
|
101
117
|
export interface ShowErrorSheetParams extends NativeParams<void, MiniAppErrorResultType, void> {
|
|
102
118
|
text: string;
|
|
103
119
|
title?: string;
|
|
120
|
+
buttons?: ButtonList[];
|
|
104
121
|
}
|
|
105
122
|
export interface SetEnablePullDownRefreshParams extends NativeParams<void, MiniAppErrorResultType, void> {
|
|
106
123
|
enabled: boolean;
|
|
@@ -158,8 +175,7 @@ export declare enum TakePhotoMode {
|
|
|
158
175
|
export interface TakePhotoResult extends MiniAppResult {
|
|
159
176
|
data?: string;
|
|
160
177
|
}
|
|
161
|
-
export
|
|
162
|
-
}
|
|
178
|
+
export declare type TakePhotoParams = NativeParams<TakePhotoResult, MiniAppErrorResultType, void>;
|
|
163
179
|
export interface SetTitleParams extends NativeParams<void, MiniAppErrorResultType, void> {
|
|
164
180
|
title?: string;
|
|
165
181
|
}
|
|
@@ -189,7 +205,9 @@ export interface GetBalanceParams extends NativeParams<MiniAppResult, MiniAppErr
|
|
|
189
205
|
sourceInfoApp?: string;
|
|
190
206
|
}
|
|
191
207
|
export interface CloseAppParams extends NativeParams<unknown, unknown, void> {
|
|
192
|
-
options?:
|
|
208
|
+
options?: {
|
|
209
|
+
deeplink?: string;
|
|
210
|
+
};
|
|
193
211
|
}
|
|
194
212
|
export interface GetKycInformationParams extends NativeParams<MiniAppResult, MiniAppErrorResultType, void> {
|
|
195
213
|
type?: string;
|
|
@@ -242,24 +260,24 @@ export interface RenderSmartButtonParams extends NativeParams<MiniAppResult, Min
|
|
|
242
260
|
type: SmartButtonType;
|
|
243
261
|
containerId: string;
|
|
244
262
|
locale?: SmartButtonLg;
|
|
245
|
-
isShortText?:
|
|
263
|
+
isShortText?: boolean;
|
|
246
264
|
buttonSize?: SmartButtonSize;
|
|
247
265
|
theme?: SmartButtonTheme;
|
|
248
266
|
url?: string;
|
|
249
267
|
orderInfo?: SmartPayParams;
|
|
250
|
-
callback:
|
|
268
|
+
callback: () => void;
|
|
251
269
|
}
|
|
252
270
|
export interface SmartButtonParam {
|
|
253
|
-
title:
|
|
254
|
-
avatarUrl?:
|
|
255
|
-
cashbackInfo?:
|
|
271
|
+
title: string;
|
|
272
|
+
avatarUrl?: string;
|
|
273
|
+
cashbackInfo?: string;
|
|
256
274
|
}
|
|
257
275
|
declare type SmartPayCurrency = 'JPY';
|
|
258
276
|
interface SmartPayAmount {
|
|
259
277
|
amount: number;
|
|
260
278
|
currency: SmartPayCurrency;
|
|
261
279
|
}
|
|
262
|
-
interface
|
|
280
|
+
interface SmartPayOrderItem {
|
|
263
281
|
name: string;
|
|
264
282
|
category?: string;
|
|
265
283
|
quantity: number;
|
|
@@ -270,12 +288,16 @@ interface SmartPayOrderItems {
|
|
|
270
288
|
export interface SmartPayParams {
|
|
271
289
|
amount: SmartPayAmount;
|
|
272
290
|
requestedAt: number;
|
|
273
|
-
orderItems?: Array<
|
|
291
|
+
orderItems?: Array<SmartPayOrderItem>;
|
|
274
292
|
productType?: string;
|
|
275
293
|
storeId?: string;
|
|
276
294
|
merchantPaymentId?: string;
|
|
277
295
|
merchantAlias?: string;
|
|
278
296
|
}
|
|
297
|
+
export interface UserInfo {
|
|
298
|
+
avatarUrl: string;
|
|
299
|
+
nickName: string;
|
|
300
|
+
}
|
|
279
301
|
export declare type Permission = {
|
|
280
302
|
blocker: boolean;
|
|
281
303
|
name: string;
|
|
@@ -334,12 +356,21 @@ export declare enum PpLocalStorageKey {
|
|
|
334
356
|
appDetail = "ppjssdk.appDetail",
|
|
335
357
|
appConfig = "ppjssdk.appConfig",
|
|
336
358
|
clientId = "ppjssdk.clientId",
|
|
337
|
-
|
|
338
|
-
|
|
359
|
+
userInfo = "ppjssdk.userInfo",
|
|
360
|
+
lastPaymentMethod = "ppjssdk.lastPaymentMethod",
|
|
361
|
+
lastTopupPayMethod = "ppjssdk.lastTopupPayMethod"
|
|
339
362
|
}
|
|
340
363
|
export declare enum CookieDuration {
|
|
341
364
|
oneDay = 1,
|
|
342
365
|
oneMonth = 30,
|
|
343
366
|
oneYear = 365
|
|
344
367
|
}
|
|
368
|
+
export declare enum RenderType {
|
|
369
|
+
COVER = "cover",
|
|
370
|
+
CONTAIN = "contain"
|
|
371
|
+
}
|
|
372
|
+
export declare type AddressUpdateEvent = {
|
|
373
|
+
selectedAddress: Address;
|
|
374
|
+
addresses: Address[];
|
|
375
|
+
};
|
|
345
376
|
export {};
|
package/dist/utils/api.d.ts
CHANGED
|
@@ -20,7 +20,9 @@ export declare type TopupBody = {
|
|
|
20
20
|
};
|
|
21
21
|
export declare type TopupResponse = {
|
|
22
22
|
status: number;
|
|
23
|
-
signed:
|
|
23
|
+
signed: {
|
|
24
|
+
jws?: string;
|
|
25
|
+
};
|
|
24
26
|
uiComponents?: {
|
|
25
27
|
displayErrorResponse: UIComponentsError;
|
|
26
28
|
};
|
|
@@ -34,28 +36,28 @@ export declare type TopupResponse = {
|
|
|
34
36
|
};
|
|
35
37
|
};
|
|
36
38
|
};
|
|
37
|
-
|
|
39
|
+
declare type WalletInfoResponse = {
|
|
38
40
|
data: {
|
|
39
41
|
payload: {
|
|
40
42
|
walletSummary: {
|
|
41
43
|
allTotalBalanceInfo: {
|
|
42
|
-
balance:
|
|
43
|
-
currency:
|
|
44
|
+
balance: number;
|
|
45
|
+
currency: string;
|
|
44
46
|
};
|
|
45
47
|
totalBalanceInfo: {
|
|
46
|
-
balance:
|
|
47
|
-
currency:
|
|
48
|
+
balance: number;
|
|
49
|
+
currency: string;
|
|
48
50
|
};
|
|
49
51
|
transferableBalanceInfo: {
|
|
50
|
-
balance:
|
|
51
|
-
currency:
|
|
52
|
+
balance: number;
|
|
53
|
+
currency: string;
|
|
52
54
|
};
|
|
53
55
|
payoutableBalanceInfo: {
|
|
54
|
-
balance:
|
|
55
|
-
currency:
|
|
56
|
+
balance: number;
|
|
57
|
+
currency: string;
|
|
56
58
|
};
|
|
57
59
|
};
|
|
58
|
-
cashBackUseStatus:
|
|
60
|
+
cashBackUseStatus: string;
|
|
59
61
|
};
|
|
60
62
|
};
|
|
61
63
|
};
|
|
@@ -68,10 +70,10 @@ export declare type BalanceParams = {
|
|
|
68
70
|
sourceInfoApp?: string;
|
|
69
71
|
};
|
|
70
72
|
export declare function getBalance(params?: BalanceParams): Promise<unknown>;
|
|
71
|
-
export declare function getCashBackInfo(): Promise<import("./fetch").ErrorResponse |
|
|
73
|
+
export declare function getCashBackInfo(): Promise<import("./fetch").ErrorResponse | WalletInfoResponse>;
|
|
72
74
|
export declare type getCashBackResponse = {
|
|
73
|
-
signed:
|
|
74
|
-
unsigned:
|
|
75
|
+
signed: unknown;
|
|
76
|
+
unsigned: unknown;
|
|
75
77
|
};
|
|
76
78
|
interface CashBackParams {
|
|
77
79
|
paymentId: string;
|
|
@@ -94,9 +96,14 @@ export declare type AddressParams = {
|
|
|
94
96
|
zipcode: string;
|
|
95
97
|
};
|
|
96
98
|
export declare function getAddressByZip(params: AddressParams): Promise<import("./fetch").ErrorResponse | GetAddressByZipResponse>;
|
|
99
|
+
export declare type SetSelectedAddressResponse = {
|
|
100
|
+
signed: unknown;
|
|
101
|
+
statusCode: number;
|
|
102
|
+
unsigned: unknown;
|
|
103
|
+
};
|
|
97
104
|
export declare type GetAddressListResponse = {
|
|
98
105
|
status: number;
|
|
99
|
-
signed:
|
|
106
|
+
signed: unknown;
|
|
100
107
|
unsigned: {
|
|
101
108
|
resultInfo: {
|
|
102
109
|
code: MiniAppErrorType;
|
|
@@ -110,6 +117,7 @@ export declare function getAddressList(): Promise<GetAddressListResponse | impor
|
|
|
110
117
|
export declare function postAddress(body: Address): Promise<GetAddressListResponse | import("./fetch").ErrorResponse>;
|
|
111
118
|
export declare function editAddress(body: Address, id: number): Promise<GetAddressListResponse | import("./fetch").ErrorResponse>;
|
|
112
119
|
export declare function deleteAddress(id: number): Promise<GetAddressListResponse | import("./fetch").ErrorResponse>;
|
|
120
|
+
export declare function setSelectedAddress(addressId: number): Promise<import("./fetch").ErrorResponse | SetSelectedAddressResponse>;
|
|
113
121
|
export declare type VERIFY_STATUS = 'NOT_VERIFIED' | 'VERIFIED';
|
|
114
122
|
export declare type ProfileInfo = {
|
|
115
123
|
firstName?: string;
|
|
@@ -137,9 +145,9 @@ export declare type ProfileResponse = {
|
|
|
137
145
|
};
|
|
138
146
|
export declare function getUserProfileData(): Promise<import("./fetch").ErrorResponse | ProfileResponse>;
|
|
139
147
|
export declare type RegisterEmailResponse = {
|
|
140
|
-
signed:
|
|
148
|
+
signed: unknown;
|
|
141
149
|
statusCode: number;
|
|
142
|
-
unsigned:
|
|
150
|
+
unsigned: unknown;
|
|
143
151
|
};
|
|
144
152
|
export declare function registerEmail(email: string): Promise<import("./fetch").ErrorResponse | RegisterEmailResponse>;
|
|
145
153
|
export declare function resendEmail(): Promise<import("./fetch").ErrorResponse | RegisterEmailResponse>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare type Mod = string | {
|
|
2
|
-
[key: string]:
|
|
2
|
+
[key: string]: unknown;
|
|
3
3
|
};
|
|
4
4
|
export declare type Mods = Mod | Mod[];
|
|
5
|
-
export declare function createBEM(name: string): (el?: Mods, mods?: Mods) => Mods;
|
|
5
|
+
export declare function createBEM(name: string): (el?: Mods | undefined, mods?: Mods | undefined) => Mods;
|
|
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, mods?: import("./bem").Mods) => import("./bem").Mods];
|
|
1
|
+
export declare function createNamespace(name: string): readonly [(el?: import("./bem").Mods | undefined, mods?: import("./bem").Mods | undefined) => import("./bem").Mods];
|
|
2
2
|
export declare type ObjectLiteralStyle = {
|
|
3
3
|
[className: string]: boolean;
|
|
4
4
|
};
|
package/dist/utils/fetch.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const createHeaderMiniAppApi: (urlEndpoint: string, customHeaders
|
|
1
|
+
declare const createHeaderMiniAppApi: (urlEndpoint: string, customHeaders?: Record<string, string> | undefined) => Headers | undefined;
|
|
2
2
|
export declare type ErrorResponse = {
|
|
3
3
|
error: {
|
|
4
4
|
message: string;
|
|
@@ -8,7 +8,7 @@ declare function ppFetch<T>(options: {
|
|
|
8
8
|
method: string;
|
|
9
9
|
url: string;
|
|
10
10
|
params?: any;
|
|
11
|
-
data?:
|
|
11
|
+
data?: unknown;
|
|
12
12
|
headers?: Record<string, string>;
|
|
13
13
|
suppressRefresh?: boolean;
|
|
14
14
|
timeout?: number;
|
|
@@ -1,5 +1,36 @@
|
|
|
1
|
-
export declare function
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export declare function getImages(): {
|
|
2
|
+
iconBalanceError: string;
|
|
3
|
+
animationDone: string;
|
|
4
|
+
merchant: string;
|
|
5
|
+
cashback: string;
|
|
6
|
+
iconCopy: string;
|
|
7
|
+
iconError: string;
|
|
8
|
+
iconOpenApp: string;
|
|
9
|
+
iconAppUpdate: string;
|
|
10
|
+
iconBackArrow: string;
|
|
11
|
+
paypay: string;
|
|
12
|
+
copyIcon: string;
|
|
13
|
+
jcb: string;
|
|
14
|
+
visa: string;
|
|
15
|
+
master: string;
|
|
16
|
+
amex: string;
|
|
17
|
+
iconAlert: string;
|
|
18
|
+
checkGreen: string;
|
|
19
|
+
yahoo: string;
|
|
20
|
+
ppCard: string;
|
|
21
|
+
softbank: string;
|
|
22
|
+
iconBirthday: string;
|
|
23
|
+
iconMinorAge: string;
|
|
24
|
+
iconClose: string;
|
|
25
|
+
myOffer: string;
|
|
26
|
+
lightBlue: string;
|
|
27
|
+
iconBalanceIcon: string;
|
|
28
|
+
share: string;
|
|
29
|
+
rightArrow: string;
|
|
30
|
+
iconGrayError: string;
|
|
31
|
+
paypayRec: string;
|
|
32
|
+
paypayRecWhite: string;
|
|
33
|
+
downArrow: string;
|
|
34
|
+
bankIcon: string;
|
|
35
|
+
confetti: string;
|
|
36
|
+
};
|
|
@@ -1,3 +1,225 @@
|
|
|
1
|
-
export declare function
|
|
1
|
+
export declare function getLanguage(): {
|
|
2
|
+
showUpdateWarning: {
|
|
3
|
+
closeBtn: string;
|
|
4
|
+
notNow: string;
|
|
5
|
+
update: string;
|
|
6
|
+
title: string;
|
|
7
|
+
errorText: string;
|
|
8
|
+
desc1: string;
|
|
9
|
+
desc2: string;
|
|
10
|
+
};
|
|
11
|
+
openApp: {
|
|
12
|
+
title: string;
|
|
13
|
+
body: string;
|
|
14
|
+
errorText: string;
|
|
15
|
+
openApp: string;
|
|
16
|
+
cancel: string;
|
|
17
|
+
};
|
|
18
|
+
openMap: {
|
|
19
|
+
title: string;
|
|
20
|
+
errorText: string;
|
|
21
|
+
};
|
|
22
|
+
topup: {
|
|
23
|
+
title: string;
|
|
24
|
+
balMoney: string;
|
|
25
|
+
charge: string;
|
|
26
|
+
minAmount: string;
|
|
27
|
+
maxAmount: string;
|
|
28
|
+
moneyLabel: string;
|
|
29
|
+
noMethod: string;
|
|
30
|
+
loading: string;
|
|
31
|
+
payBtn: string;
|
|
32
|
+
availableBalance: string;
|
|
33
|
+
availableBalanceAfter: string;
|
|
34
|
+
allBalance: string;
|
|
35
|
+
};
|
|
36
|
+
takePhoto: {
|
|
37
|
+
camera: string;
|
|
38
|
+
photo: string;
|
|
39
|
+
};
|
|
40
|
+
payment: {
|
|
41
|
+
title: string;
|
|
42
|
+
payAmount: string;
|
|
43
|
+
payAmountTaxExempt: string;
|
|
44
|
+
method: string;
|
|
45
|
+
address: string;
|
|
46
|
+
insufficientAmount: string;
|
|
47
|
+
paying: string;
|
|
48
|
+
pay: string;
|
|
49
|
+
charge: string;
|
|
50
|
+
cancel: string;
|
|
51
|
+
noAddress: string;
|
|
52
|
+
change: string;
|
|
53
|
+
close: string;
|
|
54
|
+
};
|
|
55
|
+
duplicate: {
|
|
56
|
+
header: string;
|
|
57
|
+
text1: string;
|
|
58
|
+
text2: string;
|
|
59
|
+
cancel: string;
|
|
60
|
+
agreeButtonText: string;
|
|
61
|
+
topHeader: string;
|
|
62
|
+
topText1: string;
|
|
63
|
+
topText2: string;
|
|
64
|
+
topAgreeButtonText: string;
|
|
65
|
+
};
|
|
66
|
+
birthdayConfirm: {
|
|
67
|
+
title: string;
|
|
68
|
+
title2: string;
|
|
69
|
+
desc: string;
|
|
70
|
+
desc1: string;
|
|
71
|
+
desc2: string;
|
|
72
|
+
desc3: string;
|
|
73
|
+
date: string;
|
|
74
|
+
primaryBtn: string;
|
|
75
|
+
cancelBtn: string;
|
|
76
|
+
};
|
|
77
|
+
birthdayConfirmError: {
|
|
78
|
+
title: string;
|
|
79
|
+
title2: string;
|
|
80
|
+
desc: string;
|
|
81
|
+
desc2: string;
|
|
82
|
+
helpBtn: string;
|
|
83
|
+
closeBtn: string;
|
|
84
|
+
};
|
|
85
|
+
cashbackDet: {
|
|
86
|
+
button1: string;
|
|
87
|
+
button2: string;
|
|
88
|
+
button3: string;
|
|
89
|
+
};
|
|
90
|
+
topContent: {
|
|
91
|
+
title: string;
|
|
92
|
+
chargeTitle: string;
|
|
93
|
+
chargeLabel: string;
|
|
94
|
+
loading: string;
|
|
95
|
+
unavailable1: string;
|
|
96
|
+
unavailable2: string;
|
|
97
|
+
amount: string;
|
|
98
|
+
return: string;
|
|
99
|
+
};
|
|
100
|
+
topInfo: {
|
|
101
|
+
sufficientRow: string;
|
|
102
|
+
insufficientAmount: string;
|
|
103
|
+
insufficientAmountText: string;
|
|
104
|
+
paymentAmount: string;
|
|
105
|
+
};
|
|
106
|
+
choosePayment: {
|
|
107
|
+
title: string;
|
|
108
|
+
desc1: string;
|
|
109
|
+
desc2: string;
|
|
110
|
+
title2: string;
|
|
111
|
+
addMethod: string;
|
|
112
|
+
noMethod: string;
|
|
113
|
+
};
|
|
114
|
+
topupCompletion: {
|
|
115
|
+
title: string;
|
|
116
|
+
idInfo: string;
|
|
117
|
+
copied: string;
|
|
118
|
+
};
|
|
119
|
+
userAddress: {
|
|
120
|
+
title: string;
|
|
121
|
+
header: string;
|
|
122
|
+
tagForm: string;
|
|
123
|
+
home: string;
|
|
124
|
+
work: string;
|
|
125
|
+
billing: string;
|
|
126
|
+
footer: string;
|
|
127
|
+
titlePre: string;
|
|
128
|
+
titleApp: string;
|
|
129
|
+
titlePlace: string;
|
|
130
|
+
receiverPre: string;
|
|
131
|
+
receiverPlace: string;
|
|
132
|
+
inputPre: string;
|
|
133
|
+
statePre: string;
|
|
134
|
+
statePlace: string;
|
|
135
|
+
cityPre: string;
|
|
136
|
+
cityPlace: string;
|
|
137
|
+
street1Pre: string;
|
|
138
|
+
streetPlace: string;
|
|
139
|
+
street2Pre: string;
|
|
140
|
+
street2Place: string;
|
|
141
|
+
footerBtn1: string;
|
|
142
|
+
footerBtn2: string;
|
|
143
|
+
displayTitle: string;
|
|
144
|
+
deleteTitle: string;
|
|
145
|
+
delete: string;
|
|
146
|
+
close: string;
|
|
147
|
+
addAddress: string;
|
|
148
|
+
address: string;
|
|
149
|
+
return: string;
|
|
150
|
+
change: string;
|
|
151
|
+
noAddress: string;
|
|
152
|
+
registerAddress: string;
|
|
153
|
+
confirmAddress: string;
|
|
154
|
+
returnEdit: string;
|
|
155
|
+
selectAddress: string;
|
|
156
|
+
};
|
|
157
|
+
errorSheet: {
|
|
158
|
+
title: string;
|
|
159
|
+
title1: string;
|
|
160
|
+
desc: string;
|
|
161
|
+
topup: string;
|
|
162
|
+
topupDesc: string;
|
|
163
|
+
pay: string;
|
|
164
|
+
payDesc: string;
|
|
165
|
+
};
|
|
166
|
+
paymentMethod: {
|
|
167
|
+
expired: string;
|
|
168
|
+
ordinary: string;
|
|
169
|
+
current: string;
|
|
170
|
+
checkGreen: string;
|
|
171
|
+
authenticated: string;
|
|
172
|
+
yjTitle: string;
|
|
173
|
+
ppCardTitle: string;
|
|
174
|
+
brand: string;
|
|
175
|
+
};
|
|
176
|
+
wallet: {
|
|
177
|
+
title: string;
|
|
178
|
+
desc: string;
|
|
179
|
+
eMoney: string;
|
|
180
|
+
nonUsable: string;
|
|
181
|
+
cashBackUsable: string;
|
|
182
|
+
cashBackExpirable: string;
|
|
183
|
+
balance: string;
|
|
184
|
+
};
|
|
185
|
+
softbank: {
|
|
186
|
+
desc: string;
|
|
187
|
+
desc1: string;
|
|
188
|
+
isDisable: string;
|
|
189
|
+
};
|
|
190
|
+
registerEmail: {
|
|
191
|
+
title: string;
|
|
192
|
+
warning: string;
|
|
193
|
+
cancelTxt: string;
|
|
194
|
+
errorTitleAlreadyRegistered: string;
|
|
195
|
+
errorDescriptionAlreadyRegistered: string;
|
|
196
|
+
errorTitle: string;
|
|
197
|
+
errorDescription: string;
|
|
198
|
+
};
|
|
199
|
+
smartLogin: {
|
|
200
|
+
title: string;
|
|
201
|
+
signIn: string;
|
|
202
|
+
continueAs: string;
|
|
203
|
+
};
|
|
204
|
+
smartPay: {
|
|
205
|
+
pay: string;
|
|
206
|
+
paypay: string;
|
|
207
|
+
cashback: string;
|
|
208
|
+
};
|
|
209
|
+
cashbackList: {
|
|
210
|
+
close: string;
|
|
211
|
+
};
|
|
212
|
+
desktopTitle: {
|
|
213
|
+
Payment: string;
|
|
214
|
+
addNewAddress: string;
|
|
215
|
+
editAddress: string;
|
|
216
|
+
paymentCompletion: string;
|
|
217
|
+
getUserAddress: string;
|
|
218
|
+
};
|
|
219
|
+
closeConfirmation: {
|
|
220
|
+
title: string;
|
|
221
|
+
confirm: string;
|
|
222
|
+
cancel: string;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
2
225
|
export declare function getPayPayLanguage(): string;
|
|
3
|
-
export declare const LANGUAGE_KEY = "lg";
|
package/dist/utils/helper.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MiniAppErrorType } from '../model/miniAppError';
|
|
2
2
|
export declare function isDef<T>(val: T): val is NonNullable<T>;
|
|
3
|
-
export declare function isFunction(val: unknown): val is
|
|
3
|
+
export declare function isFunction(val: unknown): val is () => void;
|
|
4
4
|
export declare function isNumeric(val: string | number): val is string;
|
|
5
5
|
export declare function formatNumber(value: string, options?: {
|
|
6
6
|
allowDot?: boolean;
|
|
@@ -9,24 +9,21 @@ export declare function formatNumber(value: string, options?: {
|
|
|
9
9
|
export declare const numberWithCommas: (x?: number) => string;
|
|
10
10
|
export declare function formatCurrency(val: number, n: number, x?: number): string;
|
|
11
11
|
export declare function trigger(target: Element, type: string): void;
|
|
12
|
-
export declare function isObject(val: unknown): val is Record<
|
|
13
|
-
export declare function isPromise<T =
|
|
12
|
+
export declare function isObject(val: unknown): val is Record<string, unknown>;
|
|
13
|
+
export declare function isPromise<T = unknown>(val: unknown): val is Promise<T>;
|
|
14
14
|
export declare function checkDuplicateTopup(amount: number): boolean;
|
|
15
|
-
export declare const debounce: (fn:
|
|
15
|
+
export declare const debounce: (fn: (args?: unknown) => unknown) => (...params: unknown[]) => void;
|
|
16
16
|
interface PersistenceLastPayment {
|
|
17
17
|
price: number;
|
|
18
18
|
}
|
|
19
19
|
export declare function savePayment(lastPayment: PersistenceLastPayment): boolean;
|
|
20
|
-
interface PersistenceLastAddress {
|
|
21
|
-
addressId: number;
|
|
22
|
-
}
|
|
23
|
-
export declare function saveAddress(lastAddress: PersistenceLastAddress): boolean;
|
|
24
20
|
interface PersistenceLastTopup {
|
|
25
21
|
amount: number;
|
|
26
22
|
}
|
|
27
23
|
export declare function saveTopup(lastTopup: PersistenceLastTopup): boolean;
|
|
28
24
|
export declare function getLastPayment(): any;
|
|
29
|
-
export declare function
|
|
25
|
+
export declare function getLastPaymentMethod(): string | null;
|
|
26
|
+
export declare function getLastTopupPayMethod(): string | null;
|
|
30
27
|
export declare function existDuplicatePayment(price: number): boolean;
|
|
31
28
|
export declare enum MiniAppRuntime {
|
|
32
29
|
android = "ANDROID",
|
|
@@ -35,13 +32,13 @@ export declare enum MiniAppRuntime {
|
|
|
35
32
|
}
|
|
36
33
|
export declare function getRuntime(): MiniAppRuntime;
|
|
37
34
|
export declare function isPayPayMiniApp(): boolean;
|
|
38
|
-
export declare function getAppVersion(): string;
|
|
35
|
+
export declare function getAppVersion(): string | null;
|
|
39
36
|
export declare function semVerCompare(a: string, b: string): boolean;
|
|
40
37
|
export declare function delay(time?: number): Promise<boolean>;
|
|
41
|
-
export declare const createErrorCode: (errorCode: MiniAppErrorType, jws?: string) => {
|
|
38
|
+
export declare const createErrorCode: (errorCode: MiniAppErrorType, jws?: string | null | undefined) => {
|
|
42
39
|
errorCode: MiniAppErrorType;
|
|
43
|
-
jws: string;
|
|
40
|
+
jws: string | null | undefined;
|
|
44
41
|
};
|
|
45
|
-
export declare const getSelectedAddressId: (addressList: any) => any;
|
|
46
42
|
export declare function updateLocalisedString(data: string, target: string, value: string): string;
|
|
43
|
+
export declare function handleHeightResize(el: HTMLElement, windowHeight: number, isScrollable: boolean, offsetHeight: number): boolean;
|
|
47
44
|
export {};
|
package/dist/utils/storage.d.ts
CHANGED
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
export declare function parseDomain(str: string): string;
|
|
2
|
-
export declare function getDomain(appDetail?: string): string;
|
|
3
|
-
export declare function getAccessToken(): string;
|
|
2
|
+
export declare function getDomain(appDetail?: string | null): string;
|
|
3
|
+
export declare function getAccessToken(): string | undefined;
|
|
4
4
|
export declare function removeCookie(key: string): void;
|
|
5
5
|
export declare function saveAccessToken(token: string): void;
|
|
6
6
|
export declare function getRefreshToken(): string;
|
|
7
7
|
export declare function saveRefreshToken(token: string): void;
|
|
8
8
|
export declare function saveEnv(env: string): void;
|
|
9
|
-
export declare function getEnv(): string;
|
|
9
|
+
export declare function getEnv(): string | undefined;
|
|
10
10
|
export declare function getClientUUID(): string;
|
|
11
11
|
export declare function getDeviceUUID(): string;
|
|
12
12
|
export declare function saveLastPayment(payment: string): void;
|
|
13
|
-
export declare function
|
|
14
|
-
export declare function
|
|
15
|
-
export declare function
|
|
13
|
+
export declare function saveLastPaymentMethod(methodId: string): void;
|
|
14
|
+
export declare function saveLastTopupPayMethod(methodId: string): void;
|
|
15
|
+
export declare function getLastPaymentMethod(): string | undefined;
|
|
16
|
+
export declare function getLastTopupPayMethod(): string | undefined;
|
|
17
|
+
export declare function getLastPayment(): string | undefined;
|
|
16
18
|
export declare function saveLastTopup(topup: string): void;
|
|
17
19
|
export declare function getLastTopup(): string;
|
|
18
20
|
export declare function saveAppDetail(appDetail: string): void;
|
|
19
|
-
export declare function getAppDetail(): string;
|
|
21
|
+
export declare function getAppDetail(): string | undefined;
|
|
20
22
|
export declare function removeAppDetail(): void;
|
|
21
23
|
export declare function saveAppConfig(appConfig: string): void;
|
|
22
|
-
export declare function getAppConfig(): string;
|
|
23
|
-
export declare function getClientId(): string;
|
|
24
|
+
export declare function getAppConfig(): string | undefined;
|
|
25
|
+
export declare function getClientId(): string | undefined;
|
|
24
26
|
export declare function saveClientId(id: string): void;
|
|
25
|
-
export declare function getUserInfo(): string;
|
|
27
|
+
export declare function getUserInfo(): string | undefined;
|
|
26
28
|
export declare function saveUserInfo(userData: string): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const UI_BREAKPOINT = 767;
|