@paypay/mini-app-js-sdk 1.21.0 → 1.25.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/useInpuAddress.d.ts +1 -1
- 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 +9365 -6514
- package/dist/mini-app-js-sdk.min.css +1 -1
- package/dist/model/bridge/checkAccessToken.d.ts +1 -1
- package/dist/model/bridge/checkPaymentMethod.d.ts +1 -1
- package/dist/model/bridge/closeApp.d.ts +1 -1
- package/dist/model/bridge/copyToClipboard.d.ts +1 -1
- package/dist/model/bridge/debug.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/getDeviceInformation.d.ts +1 -1
- package/dist/model/bridge/getSessionData.d.ts +1 -1
- package/dist/model/bridge/getStorageData.d.ts +1 -1
- package/dist/model/bridge/getTopBarHeight.d.ts +1 -1
- package/dist/model/bridge/getUAID.d.ts +1 -1
- package/dist/model/bridge/getUserAddress.d.ts +1 -1
- package/dist/model/bridge/inputAddress.d.ts +1 -1
- package/dist/model/bridge/logout.d.ts +1 -1
- package/dist/model/bridge/openApp.d.ts +1 -1
- package/dist/model/bridge/openMap.d.ts +1 -1
- package/dist/model/bridge/openWebview.d.ts +1 -1
- 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 +76 -59
- 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 +27 -8
- 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 +60 -17
- package/dist/package/lottie/index.d.ts +5 -8
- package/dist/package/overlay/index.d.ts +5 -4
- 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 +271 -4
- package/dist/package/payment-method/Wallet.vue.d.ts +274 -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 +269 -2
- package/dist/package/payment-type/Wallet.vue.d.ts +270 -2
- package/dist/package/payment-type/index.d.ts +4 -6
- package/dist/package/select-list/Components.d.ts +43 -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 +295 -0
- package/dist/types.d.ts +50 -18
- package/dist/utils/api.d.ts +44 -26
- package/dist/utils/create/bem.d.ts +2 -2
- package/dist/utils/create/index.d.ts +1 -1
- package/dist/utils/fetch.d.ts +3 -3
- package/dist/utils/getImages.d.ts +36 -5
- package/dist/utils/getLanguage.d.ts +233 -2
- package/dist/utils/helper.d.ts +17 -15
- package/dist/utils/popstateHandler.d.ts +2 -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 +242 -10
- 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 +280 -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 +252 -11
- package/dist/views/get-user-address/Sheet/AddSheet/DeleteHalfSheet.vue.d.ts +271 -4
- package/dist/views/get-user-address/Sheet/AddSheet/Footer.vue.d.ts +255 -3
- package/dist/views/get-user-address/Sheet/AddSheet/TagForm.vue.d.ts +236 -4
- package/dist/views/get-user-address/Sheet/AddSheet/index.vue.d.ts +262 -19
- 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 +244 -3
- package/dist/views/get-user-address/Sheet/DisplaySheet/Footer.vue.d.ts +251 -4
- package/dist/views/get-user-address/Sheet/DisplaySheet/index.vue.d.ts +311 -11
- package/dist/views/get-user-address/Sheet/SelectedAddress/NoRegisteredAddressMessage.vue.d.ts +249 -0
- package/dist/views/get-user-address/Sheet/SelectedAddress/SelectedAddress.vue.d.ts +268 -0
- package/dist/views/get-user-address/Sheet/SelectedAddress/components/AddressInfo.vue.d.ts +263 -0
- package/dist/views/get-user-address/Sheet/SelectedAddress/components/Footer.vue.d.ts +255 -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 +3 -2
- package/dist/views/input-address/hook/error-handle.d.ts +10 -3
- package/dist/views/make-payment/App.vue.d.ts +3 -3
- package/dist/views/make-payment/Main.vue.d.ts +80 -511
- package/dist/views/make-payment/Sheets/AddressInfo.vue.d.ts +239 -8
- package/dist/views/make-payment/Sheets/CashBackDetailList.vue.d.ts +238 -5
- package/dist/views/make-payment/Sheets/CashBackDetails/BirthdayConfirm.vue.d.ts +269 -2
- package/dist/views/make-payment/Sheets/CashBackDetails/BirthdayConfirmError.vue.d.ts +269 -2
- package/dist/views/make-payment/Sheets/CashBackDetails/hooks.d.ts +5 -4
- package/dist/views/make-payment/Sheets/CashBackDetails/index.vue.d.ts +276 -9
- package/dist/views/make-payment/Sheets/Charge/ChoosePaymentMethod.vue.d.ts +249 -3
- package/dist/views/make-payment/Sheets/Charge/TopContent.vue.d.ts +372 -13
- package/dist/views/make-payment/Sheets/Charge/TopInfo.vue.d.ts +283 -7
- package/dist/views/make-payment/Sheets/Charge/index.vue.d.ts +564 -236
- package/dist/views/make-payment/Sheets/ChoosePayment.vue.d.ts +241 -6
- package/dist/views/make-payment/Sheets/CloseConfirmation.vue.d.ts +274 -0
- package/dist/views/make-payment/Sheets/Consult.vue.d.ts +1 -1
- package/dist/views/make-payment/Sheets/DuplicatePayment.vue.d.ts +242 -10
- package/dist/views/make-payment/Sheets/PayMethod.vue.d.ts +337 -0
- package/dist/views/make-payment/Sheets/Payment.vue.d.ts +347 -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 +302 -8
- package/dist/views/make-payment/hooks/app-hooks.d.ts +178 -361
- package/dist/views/make-payment/hooks/ui-hooks.d.ts +30 -16
- 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 +4 -4
- package/dist/views/make-payment/utils/paymentMethod.d.ts +3 -1
- package/dist/views/open-app/App.vue.d.ts +275 -6
- package/dist/views/open-map/App.vue.d.ts +240 -6
- package/dist/views/show-alert/App.vue.d.ts +5 -5
- package/dist/views/show-update-warning/App.vue.d.ts +275 -6
- package/dist/views/smart-button/App.vue.d.ts +11 -11
- package/dist/views/take-photo/App.vue.d.ts +239 -5
- package/dist/views/topup/App.vue.d.ts +309 -23
- package/dist/views/topup/BannerInfo.vue.d.ts +15 -11
- package/dist/views/topup/CashbackInfo.vue.d.ts +235 -3
- package/dist/views/topup/TopupCompletion.vue.d.ts +278 -7
- package/package.json +5 -4
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;
|
|
@@ -45,7 +50,7 @@ export interface InitParams extends NativeParams<MiniAppResult, MiniAppErrorResu
|
|
|
45
50
|
env?: string;
|
|
46
51
|
mode?: string;
|
|
47
52
|
}
|
|
48
|
-
interface IosMapParams {
|
|
53
|
+
export interface IosMapParams {
|
|
49
54
|
label: string;
|
|
50
55
|
scheme?: string;
|
|
51
56
|
url: 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,14 +105,24 @@ 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;
|
|
107
124
|
}
|
|
108
|
-
export interface ShowUpdateWarningParams extends NativeParams<
|
|
125
|
+
export interface ShowUpdateWarningParams extends NativeParams<MiniAppResult, MiniAppErrorResultType, void> {
|
|
109
126
|
isMandatory?: boolean;
|
|
110
127
|
}
|
|
111
128
|
interface IosOpenApp {
|
|
@@ -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,17 @@ 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
|
+
}
|
|
301
|
+
export declare type PopStateInputParams = ShowErrorSheetParams | GetUserAddressParams | InputAddressParams | MakePaymentParams | OpenAppParams | MapParams | ShowAlertParams | ShowUpdateWarningParams | TakePhotoParams | TopupParams;
|
|
279
302
|
export declare type Permission = {
|
|
280
303
|
blocker: boolean;
|
|
281
304
|
name: string;
|
|
@@ -334,12 +357,21 @@ export declare enum PpLocalStorageKey {
|
|
|
334
357
|
appDetail = "ppjssdk.appDetail",
|
|
335
358
|
appConfig = "ppjssdk.appConfig",
|
|
336
359
|
clientId = "ppjssdk.clientId",
|
|
337
|
-
|
|
338
|
-
|
|
360
|
+
userInfo = "ppjssdk.userInfo",
|
|
361
|
+
lastPaymentMethod = "ppjssdk.lastPaymentMethod",
|
|
362
|
+
lastTopupPayMethod = "ppjssdk.lastTopupPayMethod"
|
|
339
363
|
}
|
|
340
364
|
export declare enum CookieDuration {
|
|
341
365
|
oneDay = 1,
|
|
342
366
|
oneMonth = 30,
|
|
343
367
|
oneYear = 365
|
|
344
368
|
}
|
|
369
|
+
export declare enum RenderType {
|
|
370
|
+
COVER = "cover",
|
|
371
|
+
CONTAIN = "contain"
|
|
372
|
+
}
|
|
373
|
+
export declare type AddressUpdateEvent = {
|
|
374
|
+
selectedAddress: Address;
|
|
375
|
+
addresses: Address[];
|
|
376
|
+
};
|
|
345
377
|
export {};
|
package/dist/utils/api.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { MiniAppErrorType } from '../model/miniAppError';
|
|
2
2
|
import { UIComponentsError } from '../model/uiComponents';
|
|
3
|
-
import { Amount } from '../types';
|
|
4
3
|
import { Address } from '../types';
|
|
5
4
|
export declare type TopupQuery = {
|
|
6
5
|
merchant?: string;
|
|
@@ -18,9 +17,25 @@ export declare type TopupBody = {
|
|
|
18
17
|
requestedAt: number;
|
|
19
18
|
prepaidOnly?: boolean;
|
|
20
19
|
};
|
|
21
|
-
export
|
|
20
|
+
export interface TopupResponseData {
|
|
21
|
+
merchantTopUpId: string;
|
|
22
|
+
topUpId: string;
|
|
23
|
+
status: string;
|
|
24
|
+
statusLabel: string;
|
|
25
|
+
statusLabelColor: string;
|
|
26
|
+
amount: {
|
|
27
|
+
amount: number;
|
|
28
|
+
currency: string;
|
|
29
|
+
};
|
|
30
|
+
acceptedAt?: number;
|
|
31
|
+
requestedAt: number;
|
|
32
|
+
responseValidTill: number;
|
|
33
|
+
}
|
|
34
|
+
export interface TopupResponse {
|
|
22
35
|
status: number;
|
|
23
|
-
signed:
|
|
36
|
+
signed: {
|
|
37
|
+
jws?: string;
|
|
38
|
+
};
|
|
24
39
|
uiComponents?: {
|
|
25
40
|
displayErrorResponse: UIComponentsError;
|
|
26
41
|
};
|
|
@@ -28,34 +43,31 @@ export declare type TopupResponse = {
|
|
|
28
43
|
resultInfo: {
|
|
29
44
|
code: MiniAppErrorType;
|
|
30
45
|
};
|
|
31
|
-
data:
|
|
32
|
-
status: string;
|
|
33
|
-
amount: Amount;
|
|
34
|
-
};
|
|
46
|
+
data: TopupResponseData;
|
|
35
47
|
};
|
|
36
|
-
}
|
|
37
|
-
|
|
48
|
+
}
|
|
49
|
+
declare type WalletInfoResponse = {
|
|
38
50
|
data: {
|
|
39
51
|
payload: {
|
|
40
52
|
walletSummary: {
|
|
41
53
|
allTotalBalanceInfo: {
|
|
42
|
-
balance:
|
|
43
|
-
currency:
|
|
54
|
+
balance: number;
|
|
55
|
+
currency: string;
|
|
44
56
|
};
|
|
45
57
|
totalBalanceInfo: {
|
|
46
|
-
balance:
|
|
47
|
-
currency:
|
|
58
|
+
balance: number;
|
|
59
|
+
currency: string;
|
|
48
60
|
};
|
|
49
61
|
transferableBalanceInfo: {
|
|
50
|
-
balance:
|
|
51
|
-
currency:
|
|
62
|
+
balance: number;
|
|
63
|
+
currency: string;
|
|
52
64
|
};
|
|
53
65
|
payoutableBalanceInfo: {
|
|
54
|
-
balance:
|
|
55
|
-
currency:
|
|
66
|
+
balance: number;
|
|
67
|
+
currency: string;
|
|
56
68
|
};
|
|
57
69
|
};
|
|
58
|
-
cashBackUseStatus:
|
|
70
|
+
cashBackUseStatus: string;
|
|
59
71
|
};
|
|
60
72
|
};
|
|
61
73
|
};
|
|
@@ -68,14 +80,14 @@ export declare type BalanceParams = {
|
|
|
68
80
|
sourceInfoApp?: string;
|
|
69
81
|
};
|
|
70
82
|
export declare function getBalance(params?: BalanceParams): Promise<unknown>;
|
|
71
|
-
export declare function getCashBackInfo(): Promise<import("./fetch").ErrorResponse |
|
|
83
|
+
export declare function getCashBackInfo(): Promise<import("./fetch").ErrorResponse | WalletInfoResponse>;
|
|
72
84
|
export declare type getCashBackResponse = {
|
|
73
|
-
signed:
|
|
74
|
-
unsigned:
|
|
85
|
+
signed: unknown;
|
|
86
|
+
unsigned: unknown;
|
|
75
87
|
};
|
|
76
|
-
|
|
88
|
+
declare type CashBackParams = {
|
|
77
89
|
paymentId: string;
|
|
78
|
-
}
|
|
90
|
+
};
|
|
79
91
|
export declare function getCashbackDetail(params: CashBackParams): Promise<unknown>;
|
|
80
92
|
export declare type ShallowAddress = {
|
|
81
93
|
prefecture: string;
|
|
@@ -94,9 +106,14 @@ export declare type AddressParams = {
|
|
|
94
106
|
zipcode: string;
|
|
95
107
|
};
|
|
96
108
|
export declare function getAddressByZip(params: AddressParams): Promise<import("./fetch").ErrorResponse | GetAddressByZipResponse>;
|
|
109
|
+
export declare type SetSelectedAddressResponse = {
|
|
110
|
+
signed: unknown;
|
|
111
|
+
statusCode: number;
|
|
112
|
+
unsigned: unknown;
|
|
113
|
+
};
|
|
97
114
|
export declare type GetAddressListResponse = {
|
|
98
115
|
status: number;
|
|
99
|
-
signed:
|
|
116
|
+
signed: unknown;
|
|
100
117
|
unsigned: {
|
|
101
118
|
resultInfo: {
|
|
102
119
|
code: MiniAppErrorType;
|
|
@@ -110,6 +127,7 @@ export declare function getAddressList(): Promise<GetAddressListResponse | impor
|
|
|
110
127
|
export declare function postAddress(body: Address): Promise<GetAddressListResponse | import("./fetch").ErrorResponse>;
|
|
111
128
|
export declare function editAddress(body: Address, id: number): Promise<GetAddressListResponse | import("./fetch").ErrorResponse>;
|
|
112
129
|
export declare function deleteAddress(id: number): Promise<GetAddressListResponse | import("./fetch").ErrorResponse>;
|
|
130
|
+
export declare function setSelectedAddress(addressId: number): Promise<import("./fetch").ErrorResponse | SetSelectedAddressResponse>;
|
|
113
131
|
export declare type VERIFY_STATUS = 'NOT_VERIFIED' | 'VERIFIED';
|
|
114
132
|
export declare type ProfileInfo = {
|
|
115
133
|
firstName?: string;
|
|
@@ -137,9 +155,9 @@ export declare type ProfileResponse = {
|
|
|
137
155
|
};
|
|
138
156
|
export declare function getUserProfileData(): Promise<import("./fetch").ErrorResponse | ProfileResponse>;
|
|
139
157
|
export declare type RegisterEmailResponse = {
|
|
140
|
-
signed:
|
|
158
|
+
signed: unknown;
|
|
141
159
|
statusCode: number;
|
|
142
|
-
unsigned:
|
|
160
|
+
unsigned: unknown;
|
|
143
161
|
};
|
|
144
162
|
export declare function registerEmail(email: string): Promise<import("./fetch").ErrorResponse | RegisterEmailResponse>;
|
|
145
163
|
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) =>
|
|
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, mods?: import("./bem").Mods) =>
|
|
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
|
@@ -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;
|
|
@@ -7,8 +7,8 @@ export declare type ErrorResponse = {
|
|
|
7
7
|
declare function ppFetch<T>(options: {
|
|
8
8
|
method: string;
|
|
9
9
|
url: string;
|
|
10
|
-
params?:
|
|
11
|
-
data?:
|
|
10
|
+
params?: Record<string, string | number | boolean | undefined>;
|
|
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,234 @@
|
|
|
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
|
+
selectDeliveryAddress: string;
|
|
157
|
+
};
|
|
158
|
+
errorSheet: {
|
|
159
|
+
title: string;
|
|
160
|
+
title1: string;
|
|
161
|
+
desc: string;
|
|
162
|
+
topup: string;
|
|
163
|
+
topupDesc: string;
|
|
164
|
+
pay: string;
|
|
165
|
+
payDesc: string;
|
|
166
|
+
};
|
|
167
|
+
paymentMethod: {
|
|
168
|
+
expired: string;
|
|
169
|
+
ordinary: string;
|
|
170
|
+
current: string;
|
|
171
|
+
checkGreen: string;
|
|
172
|
+
authenticated: string;
|
|
173
|
+
yjTitle: string;
|
|
174
|
+
ppCardTitle: string;
|
|
175
|
+
brand: string;
|
|
176
|
+
};
|
|
177
|
+
paymentMethodStatus: {
|
|
178
|
+
ACTIVATED: string;
|
|
179
|
+
OFF: string;
|
|
180
|
+
APPLYING: string;
|
|
181
|
+
MAINTENANCE: string;
|
|
182
|
+
BUSY: string;
|
|
183
|
+
SUSPENDED: string;
|
|
184
|
+
};
|
|
185
|
+
wallet: {
|
|
186
|
+
title: string;
|
|
187
|
+
desc: string;
|
|
188
|
+
eMoney: string;
|
|
189
|
+
nonUsable: string;
|
|
190
|
+
cashBackUsable: string;
|
|
191
|
+
cashBackExpirable: string;
|
|
192
|
+
balance: string;
|
|
193
|
+
};
|
|
194
|
+
softbank: {
|
|
195
|
+
desc: string;
|
|
196
|
+
desc1: string;
|
|
197
|
+
isDisable: string;
|
|
198
|
+
};
|
|
199
|
+
registerEmail: {
|
|
200
|
+
title: string;
|
|
201
|
+
warning: string;
|
|
202
|
+
cancelTxt: string;
|
|
203
|
+
errorTitleAlreadyRegistered: string;
|
|
204
|
+
errorDescriptionAlreadyRegistered: string;
|
|
205
|
+
errorTitle: string;
|
|
206
|
+
errorDescription: string;
|
|
207
|
+
};
|
|
208
|
+
smartLogin: {
|
|
209
|
+
title: string;
|
|
210
|
+
signIn: string;
|
|
211
|
+
continueAs: string;
|
|
212
|
+
};
|
|
213
|
+
smartPay: {
|
|
214
|
+
pay: string;
|
|
215
|
+
paypay: string;
|
|
216
|
+
cashback: string;
|
|
217
|
+
};
|
|
218
|
+
cashbackList: {
|
|
219
|
+
close: string;
|
|
220
|
+
};
|
|
221
|
+
desktopTitle: {
|
|
222
|
+
Payment: string;
|
|
223
|
+
addNewAddress: string;
|
|
224
|
+
editAddress: string;
|
|
225
|
+
paymentCompletion: string;
|
|
226
|
+
getUserAddress: string;
|
|
227
|
+
};
|
|
228
|
+
closeConfirmation: {
|
|
229
|
+
title: string;
|
|
230
|
+
confirm: string;
|
|
231
|
+
cancel: string;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
2
234
|
export declare function getPayPayLanguage(): string;
|
|
3
|
-
export declare const LANGUAGE_KEY = "lg";
|
package/dist/utils/helper.d.ts
CHANGED
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
import { MiniAppErrorType } from '../model/miniAppError';
|
|
2
|
+
import { PaymentMethodStatus } from '../model/makePayment';
|
|
2
3
|
export declare function isDef<T>(val: T): val is NonNullable<T>;
|
|
3
|
-
export declare function isFunction(val: unknown): val is
|
|
4
|
+
export declare function isFunction(val: unknown): val is () => void;
|
|
4
5
|
export declare function isNumeric(val: string | number): val is string;
|
|
5
6
|
export declare function formatNumber(value: string, options?: {
|
|
6
7
|
allowDot?: boolean;
|
|
7
8
|
allowMinus?: boolean;
|
|
8
9
|
}): string;
|
|
9
10
|
export declare const numberWithCommas: (x?: number) => string;
|
|
10
|
-
export declare function formatCurrency(val: number, n: number
|
|
11
|
+
export declare function formatCurrency(val: number, n: number): string;
|
|
11
12
|
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 =
|
|
13
|
+
export declare function isObject(val: unknown): val is Record<string, unknown>;
|
|
14
|
+
export declare function isPromise<T = unknown>(val: unknown): val is Promise<T>;
|
|
15
|
+
interface LastPayment {
|
|
16
|
+
paymentAt: number;
|
|
17
|
+
}
|
|
14
18
|
export declare function checkDuplicateTopup(amount: number): boolean;
|
|
15
|
-
export declare const debounce: (fn:
|
|
19
|
+
export declare const debounce: (fn: (args?: unknown) => unknown) => (...params: unknown[]) => void;
|
|
16
20
|
interface PersistenceLastPayment {
|
|
17
21
|
price: number;
|
|
18
22
|
}
|
|
19
23
|
export declare function savePayment(lastPayment: PersistenceLastPayment): boolean;
|
|
20
|
-
interface PersistenceLastAddress {
|
|
21
|
-
addressId: number;
|
|
22
|
-
}
|
|
23
|
-
export declare function saveAddress(lastAddress: PersistenceLastAddress): boolean;
|
|
24
24
|
interface PersistenceLastTopup {
|
|
25
25
|
amount: number;
|
|
26
26
|
}
|
|
27
27
|
export declare function saveTopup(lastTopup: PersistenceLastTopup): boolean;
|
|
28
|
-
export declare function getLastPayment():
|
|
29
|
-
export declare function
|
|
28
|
+
export declare function getLastPayment(): (LastPayment & PersistenceLastPayment) | null;
|
|
29
|
+
export declare function getLastPaymentMethod(): string | null;
|
|
30
|
+
export declare function getLastTopupPayMethod(): string | null;
|
|
30
31
|
export declare function existDuplicatePayment(price: number): boolean;
|
|
31
32
|
export declare enum MiniAppRuntime {
|
|
32
33
|
android = "ANDROID",
|
|
@@ -35,13 +36,14 @@ export declare enum MiniAppRuntime {
|
|
|
35
36
|
}
|
|
36
37
|
export declare function getRuntime(): MiniAppRuntime;
|
|
37
38
|
export declare function isPayPayMiniApp(): boolean;
|
|
38
|
-
export declare function getAppVersion(): string;
|
|
39
|
+
export declare function getAppVersion(): string | null;
|
|
39
40
|
export declare function semVerCompare(a: string, b: string): boolean;
|
|
40
41
|
export declare function delay(time?: number): Promise<boolean>;
|
|
41
|
-
export declare const createErrorCode: (errorCode: MiniAppErrorType, jws?: string) => {
|
|
42
|
+
export declare const createErrorCode: (errorCode: MiniAppErrorType, jws?: string | null | undefined) => {
|
|
42
43
|
errorCode: MiniAppErrorType;
|
|
43
|
-
jws: string;
|
|
44
|
+
jws: string | null | undefined;
|
|
44
45
|
};
|
|
45
|
-
export declare const getSelectedAddressId: (addressList: any) => any;
|
|
46
46
|
export declare function updateLocalisedString(data: string, target: string, value: string): string;
|
|
47
|
+
export declare function handleHeightResize(el: HTMLElement, windowHeight: number, isScrollable: boolean, offsetHeight: number): boolean;
|
|
48
|
+
export declare function getPaymentMethodStatus(isExpired: boolean, val?: PaymentMethodStatus): unknown;
|
|
47
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
|
};
|