@paypay/mini-app-js-sdk 1.16.0 → 1.20.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 +4 -4
- package/dist/composition-api/dom/useEventListener.d.ts +8 -8
- package/dist/composition-api/dom/useHorizontalScrollDirective.d.ts +4 -4
- package/dist/composition-api/dom/useOnMountedOrActivated.d.ts +1 -1
- package/dist/composition-api/dom/useVerticalScrollDirective.d.ts +4 -4
- package/dist/composition-api/useErrorSheet.d.ts +3 -3
- package/dist/composition-api/useGetUserAddress.d.ts +2 -2
- package/dist/composition-api/useHeightProperties.d.ts +19 -19
- package/dist/composition-api/useInpuAddress.d.ts +2 -2
- package/dist/composition-api/useMakePayment.d.ts +3 -3
- package/dist/composition-api/useOpenApp.d.ts +3 -3
- package/dist/composition-api/useOpenMap.d.ts +3 -3
- package/dist/composition-api/useRegisterEmail.d.ts +2 -2
- package/dist/composition-api/useRenderSmartButton.d.ts +3 -0
- package/dist/composition-api/useShowAlert.d.ts +3 -3
- package/dist/composition-api/useShowUpdateWarning.d.ts +3 -3
- package/dist/composition-api/useTakePhoto.d.ts +3 -3
- package/dist/composition-api/useTopup.d.ts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/jsbridge-core/index.d.ts +4 -4
- package/dist/jsbridge-core/jsbridge.d.ts +62 -62
- package/dist/jsbridge-core/lib/browser.d.ts +3 -3
- package/dist/jsbridge-core/lib/logger.d.ts +9 -9
- package/dist/jsbridge-core/lib/reconstructParams.d.ts +2 -2
- package/dist/jsbridge-core/module.d.ts +15 -14
- package/dist/jsbridge-core/namespace.d.ts +2 -2
- package/dist/jsbridge-core/paypay-jsbridge.d.ts +17 -16
- package/dist/mini-app-api.d.ts +51 -48
- package/dist/mini-app-js-sdk.browser.js +1 -1
- package/dist/mini-app-js-sdk.d.ts +9 -9
- package/dist/mini-app-js-sdk.es.js +31001 -1
- package/dist/mini-app-js-sdk.min.css +1 -1
- package/dist/model/bridge/checkAccessToken.d.ts +3 -3
- package/dist/model/bridge/checkPaymentMethod.d.ts +2 -2
- package/dist/model/bridge/closeApp.d.ts +2 -2
- package/dist/model/bridge/copyToClipboard.d.ts +2 -2
- package/dist/model/bridge/debug.d.ts +3 -3
- package/dist/model/bridge/getAppDetail.d.ts +17 -17
- package/dist/model/bridge/getAuthStatus.d.ts +3 -0
- package/dist/model/bridge/getBalance.d.ts +2 -2
- package/dist/model/bridge/getConfigure.d.ts +39 -39
- package/dist/model/bridge/getDeviceInformation.d.ts +3 -3
- package/dist/model/bridge/getKycInformation.d.ts +2 -2
- package/dist/model/bridge/getPermissionStatus.d.ts +2 -2
- package/dist/model/bridge/getPlatformInformation.d.ts +3 -3
- package/dist/model/bridge/getSessionData.d.ts +2 -2
- package/dist/model/bridge/getStorageData.d.ts +2 -2
- package/dist/model/bridge/getTopBarHeight.d.ts +3 -3
- package/dist/model/bridge/getUAID.d.ts +3 -3
- package/dist/model/bridge/getUserAddress.d.ts +2 -2
- package/dist/model/bridge/getUserLocation.d.ts +2 -2
- package/dist/model/bridge/getUserProfile.d.ts +3 -3
- package/dist/model/bridge/index.d.ts +43 -41
- package/dist/model/bridge/init.d.ts +2 -2
- package/dist/model/bridge/inputAddress.d.ts +2 -2
- package/dist/model/bridge/logout.d.ts +3 -3
- package/dist/model/bridge/makePayment.d.ts +2 -2
- package/dist/model/bridge/openApp.d.ts +2 -2
- package/dist/model/bridge/openMap.d.ts +2 -2
- package/dist/model/bridge/openWebview.d.ts +3 -3
- package/dist/model/bridge/registerEmail.d.ts +2 -2
- package/dist/model/bridge/registerKyc.d.ts +2 -2
- package/dist/model/bridge/removeStorageData.d.ts +2 -2
- package/dist/model/bridge/render.d.ts +2 -0
- package/dist/model/bridge/renderLoginButton.d.ts +2 -0
- package/dist/model/bridge/renderPayButton.d.ts +2 -0
- package/dist/model/bridge/request.d.ts +2 -2
- package/dist/model/bridge/requestInternal.d.ts +2 -2
- package/dist/model/bridge/scanCode.d.ts +3 -3
- package/dist/model/bridge/setSessionData.d.ts +2 -2
- package/dist/model/bridge/setStorageData.d.ts +2 -2
- package/dist/model/bridge/setTitle.d.ts +2 -2
- package/dist/model/bridge/share.d.ts +2 -2
- package/dist/model/bridge/showAlert.d.ts +2 -2
- package/dist/model/bridge/showErrorSheet.d.ts +2 -2
- package/dist/model/bridge/showUpdateWarning.d.ts +2 -2
- package/dist/model/bridge/startMultiFactorAuth.d.ts +2 -2
- package/dist/model/bridge/takePhoto.d.ts +2 -2
- package/dist/model/bridge/topup.d.ts +2 -2
- package/dist/model/bridge/verifyMultiFactorAuthResult.d.ts +3 -3
- package/dist/model/makePayment.d.ts +324 -323
- package/dist/model/miniAppError.d.ts +57 -55
- package/dist/model/miniAppStatus.d.ts +9 -8
- package/dist/model/permission.d.ts +21 -18
- package/dist/model/uiComponents.d.ts +23 -23
- package/dist/package/action-sheet/index.d.ts +90 -91
- package/dist/package/banner-header/index.vue.d.ts +56 -56
- package/dist/package/button/index.d.ts +69 -69
- package/dist/package/charge-amount-list/index.vue.d.ts +54 -54
- package/dist/package/charge-amount-more-list/index.vue.d.ts +19 -19
- package/dist/package/date-button/index.vue.d.ts +21 -21
- package/dist/package/divider/index.d.ts +21 -22
- package/dist/package/header/index.d.ts +65 -65
- package/dist/package/index.d.ts +16 -16
- package/dist/package/input/index.d.ts +169 -170
- package/dist/package/input/utils.d.ts +10 -10
- package/dist/package/lottie/index.d.ts +61 -62
- package/dist/package/overlay/index.d.ts +44 -45
- package/dist/package/payment-method/Bank.vue.d.ts +35 -35
- package/dist/package/payment-method/CreditCard.vue.d.ts +42 -42
- package/dist/package/payment-method/SbidBank.vue.d.ts +21 -21
- package/dist/package/payment-method/Wallet.vue.d.ts +31 -31
- package/dist/package/payment-method/index.d.ts +15 -15
- package/dist/package/payment-method-list/index.vue.d.ts +27 -27
- package/dist/package/payment-type/Bank.vue.d.ts +31 -31
- package/dist/package/payment-type/{CrediCard.vue.d.ts → CreditCard.vue.d.ts} +32 -32
- package/dist/package/payment-type/Sbid.vue.d.ts +17 -17
- package/dist/package/payment-type/Wallet.vue.d.ts +17 -17
- package/dist/package/payment-type/index.d.ts +15 -15
- package/dist/package/select-list/Components.d.ts +65 -65
- package/dist/package/select-list/index.d.ts +73 -73
- package/dist/package/switch/index.d.ts +22 -23
- package/dist/types.d.ts +344 -299
- package/dist/utils/api.d.ts +147 -142
- package/dist/utils/common.d.ts +2 -2
- package/dist/utils/create/bem.d.ts +6 -6
- package/dist/utils/create/index.d.ts +5 -5
- package/dist/utils/fetch.d.ts +16 -16
- package/dist/utils/getImages.d.ts +5 -5
- package/dist/utils/getLanguage.d.ts +3 -3
- package/dist/utils/helper.d.ts +47 -40
- package/dist/utils/ip.d.ts +2 -2
- package/dist/utils/miniAppRequest.d.ts +9 -9
- package/dist/utils/popstateHandler.d.ts +4 -4
- package/dist/utils/secondary-list.d.ts +1 -1
- package/dist/utils/storage.d.ts +26 -22
- package/dist/views/email-registration/App.vue.d.ts +79 -79
- package/dist/views/email-registration/components/EmailButton.vue.d.ts +45 -45
- package/dist/views/email-registration/components/icons.d.ts +2 -2
- package/dist/views/email-registration/hooks/callback.d.ts +7 -7
- package/dist/views/email-registration/hooks/ui.d.ts +29 -29
- package/dist/views/email-registration/parts/RegisterEmail/RegisterEmail.vue.d.ts +52 -52
- package/dist/views/email-registration/parts/RegisterEmail/ResendEmailSheet.vue.d.ts +24 -24
- package/dist/views/error-sheet/Index.vue.d.ts +52 -52
- package/dist/views/get-user-address/App.vue.d.ts +44 -36
- package/dist/views/get-user-address/Sheet/AddSheet/Contents.vue.d.ts +73 -72
- package/dist/views/get-user-address/Sheet/AddSheet/DeleteHalfSheet.vue.d.ts +23 -23
- package/dist/views/get-user-address/Sheet/AddSheet/Footer.vue.d.ts +33 -33
- package/dist/views/get-user-address/Sheet/AddSheet/TagForm.vue.d.ts +35 -35
- package/dist/views/get-user-address/Sheet/AddSheet/constants.d.ts +4 -4
- package/dist/views/get-user-address/Sheet/AddSheet/index.vue.d.ts +83 -75
- package/dist/views/get-user-address/Sheet/App.vue.d.ts +62 -49
- package/dist/views/get-user-address/Sheet/DisplaySheet/Address.vue.d.ts +32 -28
- package/dist/views/get-user-address/Sheet/DisplaySheet/Footer.vue.d.ts +25 -13
- package/dist/views/get-user-address/Sheet/DisplaySheet/index.vue.d.ts +41 -30
- package/dist/views/get-user-address/hooks/ui-hooks.d.ts +14 -11
- package/dist/views/get-user-address/store/error-handle.d.ts +12 -12
- package/dist/views/get-user-address/store/root.d.ts +14 -12
- package/dist/views/input-address/App.vue.d.ts +36 -36
- package/dist/views/input-address/hook/app.d.ts +13 -13
- package/dist/views/input-address/hook/error-handle.d.ts +10 -10
- package/dist/views/input-address/hook/root.d.ts +10 -10
- package/dist/views/make-payment/App.vue.d.ts +52 -36
- package/dist/views/make-payment/Main.vue.d.ts +630 -594
- package/dist/views/make-payment/Sheets/AddressInfo.vue.d.ts +25 -0
- package/dist/views/make-payment/Sheets/CashBackDetailList.vue.d.ts +20 -20
- package/dist/views/make-payment/Sheets/CashBackDetails/BirthdayConfirm.vue.d.ts +19 -19
- package/dist/views/make-payment/Sheets/CashBackDetails/BirthdayConfirmError.vue.d.ts +16 -16
- package/dist/views/make-payment/Sheets/CashBackDetails/FloatingButton.vue.d.ts +24 -24
- package/dist/views/make-payment/Sheets/CashBackDetails/hooks.d.ts +26 -26
- package/dist/views/make-payment/Sheets/CashBackDetails/index.vue.d.ts +53 -53
- package/dist/views/make-payment/Sheets/Charge/ChoosePaymentMethod.vue.d.ts +32 -32
- package/dist/views/make-payment/Sheets/Charge/TopContent.vue.d.ts +80 -80
- package/dist/views/make-payment/Sheets/Charge/TopInfo.vue.d.ts +49 -49
- package/dist/views/make-payment/Sheets/Charge/index.vue.d.ts +522 -520
- package/dist/views/make-payment/Sheets/ChoosePayment.vue.d.ts +38 -38
- package/dist/views/make-payment/Sheets/Consult.vue.d.ts +23 -23
- package/dist/views/make-payment/Sheets/DuplicatePayment.vue.d.ts +27 -27
- package/dist/views/make-payment/Sheets/Payment.vue.d.ts +108 -81
- package/dist/views/make-payment/Sheets/PaymentCompletion/CashBackDetailRow.vue.d.ts +36 -36
- package/dist/views/make-payment/Sheets/PaymentCompletion/index.vue.d.ts +69 -69
- package/dist/views/make-payment/hooks/app-hooks.d.ts +568 -565
- package/dist/views/make-payment/hooks/ui-hooks.d.ts +72 -51
- package/dist/views/make-payment/store/age-confirm.d.ts +9 -9
- package/dist/views/make-payment/store/handle-error.d.ts +36 -36
- package/dist/views/make-payment/store/root.d.ts +22 -22
- package/dist/views/make-payment/store/util-for-handle-error.d.ts +16 -16
- package/dist/views/make-payment/utils/paymentMethod.d.ts +3 -3
- package/dist/views/open-app/App.vue.d.ts +28 -28
- package/dist/views/open-map/App.vue.d.ts +28 -28
- package/dist/views/show-alert/App.vue.d.ts +36 -36
- package/dist/views/show-update-warning/App.vue.d.ts +28 -28
- package/dist/views/smart-button/App.vue.d.ts +87 -0
- package/dist/views/take-photo/App.vue.d.ts +25 -25
- package/dist/views/take-photo/helper.d.ts +2 -2
- package/dist/views/topup/App.vue.d.ts +102 -100
- package/dist/views/topup/BannerInfo.vue.d.ts +23 -23
- package/dist/views/topup/CashbackInfo.vue.d.ts +44 -44
- package/dist/views/topup/TopupCompletion.vue.d.ts +26 -26
- package/package.json +9 -16
- package/dist/utils/mock-data/mockData.d.ts +0 -64
- package/dist/utils/ns.d.ts +0 -5
|
@@ -1,51 +1,72 @@
|
|
|
1
|
-
import { MakePaymentParams } from '../../../types';
|
|
2
|
-
import { MakePaymentResponse, PaymentResult } from '../../../model/makePayment';
|
|
3
|
-
import { SetupContext } from 'vue';
|
|
4
|
-
export interface Props {
|
|
5
|
-
show: Boolean;
|
|
6
|
-
paymentParams: MakePaymentParams;
|
|
7
|
-
orderItems: any;
|
|
8
|
-
}
|
|
9
|
-
export declare function
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
1
|
+
import { MakePaymentParams, Address } from '../../../types';
|
|
2
|
+
import { MakePaymentResponse, PaymentResult } from '../../../model/makePayment';
|
|
3
|
+
import { SetupContext } from 'vue';
|
|
4
|
+
export interface Props {
|
|
5
|
+
show: Boolean;
|
|
6
|
+
paymentParams: MakePaymentParams;
|
|
7
|
+
orderItems: any;
|
|
8
|
+
}
|
|
9
|
+
export declare function useAddressControl(props: Props, { emit }: SetupContext): {
|
|
10
|
+
setSelectedAddress: (index: number, address: Address[]) => void;
|
|
11
|
+
selectedAddress: import("vue").ComputedRef<{
|
|
12
|
+
id: number;
|
|
13
|
+
kyc: boolean;
|
|
14
|
+
street1: string;
|
|
15
|
+
country: string;
|
|
16
|
+
zip: string;
|
|
17
|
+
state: string;
|
|
18
|
+
city: string;
|
|
19
|
+
tags?: string[];
|
|
20
|
+
title?: string;
|
|
21
|
+
receiver?: string;
|
|
22
|
+
street2?: string;
|
|
23
|
+
}>;
|
|
24
|
+
defaultAddressIndex: import("vue").ComputedRef<number>;
|
|
25
|
+
closeUserAddress: () => boolean;
|
|
26
|
+
choosedAddress: (address: Address) => void;
|
|
27
|
+
isVisibleUserAddress: import("vue").ComputedRef<boolean>;
|
|
28
|
+
getUserAddress: () => boolean;
|
|
29
|
+
};
|
|
30
|
+
export declare function useUIControl(props: Props, { emit }: SetupContext): {
|
|
31
|
+
startPaying: () => boolean;
|
|
32
|
+
endPaying: () => boolean;
|
|
33
|
+
startLoading: () => boolean;
|
|
34
|
+
endLoading: () => boolean;
|
|
35
|
+
backClick: () => boolean;
|
|
36
|
+
selectMethods: () => boolean;
|
|
37
|
+
paymentSuccess: (res: MakePaymentResponse, address: Address) => void;
|
|
38
|
+
endHandle: (handler: Promise<boolean>) => void;
|
|
39
|
+
reset: () => void;
|
|
40
|
+
showPaymentResult: (result: PaymentResult) => void;
|
|
41
|
+
closeDuplicatePayment: () => void;
|
|
42
|
+
checkDuplicateTopup: (amount: number) => boolean;
|
|
43
|
+
closeDuplicateTopup: () => boolean;
|
|
44
|
+
paymentHandler: import("vue").ComputedRef<boolean>;
|
|
45
|
+
isVisiblePaymentMethod: import("vue").ComputedRef<boolean>;
|
|
46
|
+
isDone: import("vue").ComputedRef<boolean>;
|
|
47
|
+
paying: import("vue").ComputedRef<boolean>;
|
|
48
|
+
loading: import("vue").ComputedRef<boolean>;
|
|
49
|
+
afterPayment: import("vue").ComputedRef<boolean>;
|
|
50
|
+
paymentResult: import("vue").ComputedRef<{
|
|
51
|
+
requestedAt: number;
|
|
52
|
+
storeId: string;
|
|
53
|
+
amount: {
|
|
54
|
+
amount: number;
|
|
55
|
+
currency?: string;
|
|
56
|
+
};
|
|
57
|
+
statusLabelString: string;
|
|
58
|
+
statusLabelColor: string;
|
|
59
|
+
userAuthorizationId: string;
|
|
60
|
+
acceptedAt: number;
|
|
61
|
+
merchantName: string;
|
|
62
|
+
orderDescription: string;
|
|
63
|
+
status: "COMPLETED" | "AUTHORIZED";
|
|
64
|
+
paymentId: string;
|
|
65
|
+
expiresAt: number;
|
|
66
|
+
}>;
|
|
67
|
+
showDuplicatePayment: import("vue").ComputedRef<boolean>;
|
|
68
|
+
showDuplicatePaymentEnd: import("vue").ComputedRef<boolean>;
|
|
69
|
+
duplicatePayment: import("vue").ComputedRef<boolean>;
|
|
70
|
+
duplicateTopup: import("vue").ComputedRef<boolean>;
|
|
71
|
+
showDuplicateTopup: import("vue").ComputedRef<boolean>;
|
|
72
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ErrorHandlingStore } from './handle-error';
|
|
2
|
-
import { SendAgePayload } from '../../../model/makePayment';
|
|
3
|
-
declare type AgeConfirmRoot = {
|
|
4
|
-
postAgeConfirm: (sendAgePayload: postAgeConfirmParams, dateString: string) => Promise<boolean>;
|
|
5
|
-
};
|
|
6
|
-
declare type postAgeConfirmParams = Omit<SendAgePayload, 'date' | 'month' | 'year' | 'orderType'>;
|
|
7
|
-
export declare function initAgeConfirm(props: ErrorHandlingStore): AgeConfirmRoot;
|
|
8
|
-
export declare function getAgeConfirm(): AgeConfirmRoot;
|
|
9
|
-
export {};
|
|
1
|
+
import { ErrorHandlingStore } from './handle-error';
|
|
2
|
+
import { SendAgePayload } from '../../../model/makePayment';
|
|
3
|
+
declare type AgeConfirmRoot = {
|
|
4
|
+
postAgeConfirm: (sendAgePayload: postAgeConfirmParams, dateString: string) => Promise<boolean>;
|
|
5
|
+
};
|
|
6
|
+
declare type postAgeConfirmParams = Omit<SendAgePayload, 'date' | 'month' | 'year' | 'orderType'>;
|
|
7
|
+
export declare function initAgeConfirm(props: ErrorHandlingStore): AgeConfirmRoot;
|
|
8
|
+
export declare function getAgeConfirm(): AgeConfirmRoot;
|
|
9
|
+
export {};
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { ComputedRef } from 'vue';
|
|
2
|
-
import { ResponseBase } from '../../../model/makePayment';
|
|
3
|
-
import { UIComponentsError } from '../../../model/uiComponents';
|
|
4
|
-
import { ErrorResponse } from '../../../utils/fetch';
|
|
5
|
-
import { RootStore } from './root';
|
|
6
|
-
import { API_TYPES_NEVER_RETURN, API_TYPES } from './util-for-handle-error';
|
|
7
|
-
declare type InsufficientParams = {
|
|
8
|
-
type?: 'insufficientParams' | 'topupSuccessButNotAddToBalance';
|
|
9
|
-
};
|
|
10
|
-
export declare type ErrorHandlingStore = {
|
|
11
|
-
errorTitle: ComputedRef<string>;
|
|
12
|
-
errorDescription: ComputedRef<string>;
|
|
13
|
-
errorIcon: ComputedRef<string>;
|
|
14
|
-
isError: ComputedRef<boolean>;
|
|
15
|
-
isErrorOverlay: ComputedRef<boolean>;
|
|
16
|
-
closeError: (immediately: boolean) => void;
|
|
17
|
-
handleError: (res: ResponseBase | ErrorResponse, options: HandleErrorOptions) => boolean;
|
|
18
|
-
consultError: ComputedRef<UIComponentsError>;
|
|
19
|
-
showConsultError: ComputedRef<boolean>;
|
|
20
|
-
openLogicError: (options?: InsufficientParams, jws?: string) => void;
|
|
21
|
-
};
|
|
22
|
-
export declare type FLOW_TYPES = 'topup' | 'pay';
|
|
23
|
-
export declare type ErrorOptionsNeverReturn = {
|
|
24
|
-
type?: FLOW_TYPES;
|
|
25
|
-
api: API_TYPES_NEVER_RETURN;
|
|
26
|
-
dryRun: true;
|
|
27
|
-
};
|
|
28
|
-
export declare type ErrorOptions = {
|
|
29
|
-
type?: FLOW_TYPES;
|
|
30
|
-
api: API_TYPES;
|
|
31
|
-
dryRun?: boolean;
|
|
32
|
-
};
|
|
33
|
-
export declare type HandleErrorOptions = ErrorOptionsNeverReturn | ErrorOptions;
|
|
34
|
-
export declare function initErrorHandling(props: RootStore): ErrorHandlingStore;
|
|
35
|
-
export declare function getErrorHandling(): ErrorHandlingStore;
|
|
36
|
-
export {};
|
|
1
|
+
import { ComputedRef } from 'vue';
|
|
2
|
+
import { ResponseBase } from '../../../model/makePayment';
|
|
3
|
+
import { UIComponentsError } from '../../../model/uiComponents';
|
|
4
|
+
import { ErrorResponse } from '../../../utils/fetch';
|
|
5
|
+
import { RootStore } from './root';
|
|
6
|
+
import { API_TYPES_NEVER_RETURN, API_TYPES } from './util-for-handle-error';
|
|
7
|
+
declare type InsufficientParams = {
|
|
8
|
+
type?: 'insufficientParams' | 'topupSuccessButNotAddToBalance';
|
|
9
|
+
};
|
|
10
|
+
export declare type ErrorHandlingStore = {
|
|
11
|
+
errorTitle: ComputedRef<string>;
|
|
12
|
+
errorDescription: ComputedRef<string>;
|
|
13
|
+
errorIcon: ComputedRef<string>;
|
|
14
|
+
isError: ComputedRef<boolean>;
|
|
15
|
+
isErrorOverlay: ComputedRef<boolean>;
|
|
16
|
+
closeError: (immediately: boolean) => void;
|
|
17
|
+
handleError: (res: ResponseBase | ErrorResponse, options: HandleErrorOptions) => boolean;
|
|
18
|
+
consultError: ComputedRef<UIComponentsError>;
|
|
19
|
+
showConsultError: ComputedRef<boolean>;
|
|
20
|
+
openLogicError: (options?: InsufficientParams, jws?: string) => void;
|
|
21
|
+
};
|
|
22
|
+
export declare type FLOW_TYPES = 'topup' | 'pay';
|
|
23
|
+
export declare type ErrorOptionsNeverReturn = {
|
|
24
|
+
type?: FLOW_TYPES;
|
|
25
|
+
api: API_TYPES_NEVER_RETURN;
|
|
26
|
+
dryRun: true;
|
|
27
|
+
};
|
|
28
|
+
export declare type ErrorOptions = {
|
|
29
|
+
type?: FLOW_TYPES;
|
|
30
|
+
api: API_TYPES;
|
|
31
|
+
dryRun?: boolean;
|
|
32
|
+
};
|
|
33
|
+
export declare type HandleErrorOptions = ErrorOptionsNeverReturn | ErrorOptions;
|
|
34
|
+
export declare function initErrorHandling(props: RootStore): ErrorHandlingStore;
|
|
35
|
+
export declare function getErrorHandling(): ErrorHandlingStore;
|
|
36
|
+
export {};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { SetupContext } from 'vue';
|
|
2
|
-
import { MiniAppErrorType } from '../../../model/miniAppError';
|
|
3
|
-
import { MakePaymentParams } from '../../../types';
|
|
4
|
-
export interface Props {
|
|
5
|
-
show: Boolean;
|
|
6
|
-
paymentParams: MakePaymentParams;
|
|
7
|
-
orderItems: any;
|
|
8
|
-
}
|
|
9
|
-
export interface RootStore {
|
|
10
|
-
endApplication: () => void;
|
|
11
|
-
cancel: () => void;
|
|
12
|
-
cancelSimilarTxn: () => void;
|
|
13
|
-
success: () => void;
|
|
14
|
-
setJws: (s: {
|
|
15
|
-
jws: string;
|
|
16
|
-
}) => void;
|
|
17
|
-
paymentFail: () => void;
|
|
18
|
-
unHandleError: () => void;
|
|
19
|
-
preFail: (status?: MiniAppErrorType, jws?: string) => void;
|
|
20
|
-
}
|
|
21
|
-
export declare function initRoot(props: Props, { emit }: SetupContext): RootStore;
|
|
22
|
-
export declare function getRoot(): RootStore;
|
|
1
|
+
import { SetupContext } from 'vue';
|
|
2
|
+
import { MiniAppErrorType } from '../../../model/miniAppError';
|
|
3
|
+
import { Address, MakePaymentParams } from '../../../types';
|
|
4
|
+
export interface Props {
|
|
5
|
+
show: Boolean;
|
|
6
|
+
paymentParams: MakePaymentParams;
|
|
7
|
+
orderItems: any;
|
|
8
|
+
}
|
|
9
|
+
export interface RootStore {
|
|
10
|
+
endApplication: () => void;
|
|
11
|
+
cancel: () => void;
|
|
12
|
+
cancelSimilarTxn: () => void;
|
|
13
|
+
success: () => void;
|
|
14
|
+
setJws: (s: {
|
|
15
|
+
jws: string;
|
|
16
|
+
}, address: Address) => void;
|
|
17
|
+
paymentFail: () => void;
|
|
18
|
+
unHandleError: () => void;
|
|
19
|
+
preFail: (status?: MiniAppErrorType, jws?: string) => void;
|
|
20
|
+
}
|
|
21
|
+
export declare function initRoot(props: Props, { emit }: SetupContext): RootStore;
|
|
22
|
+
export declare function getRoot(): RootStore;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { MiniAppErrorType } from '../../../model/miniAppError';
|
|
2
|
-
import { ResponseBase } from '../../../model/makePayment';
|
|
3
|
-
import { ErrorResponse } from '../../../utils/fetch';
|
|
4
|
-
export declare type API_TYPES = 'consult' | 'payment' | 'topup' | 'paymentMethod';
|
|
5
|
-
export declare type API_TYPES_NEVER_RETURN = 'ageConfirm' | 'cashback';
|
|
6
|
-
export declare function createErrorFromType(type?: string): {
|
|
7
|
-
errorTitle: string;
|
|
8
|
-
errorDescription: string;
|
|
9
|
-
errorIcon: string;
|
|
10
|
-
};
|
|
11
|
-
export declare function createErrorFromErrorCodeAndType(type?: string, code?: string): {
|
|
12
|
-
errorTitle: string;
|
|
13
|
-
errorDescription: string;
|
|
14
|
-
errorIcon: string;
|
|
15
|
-
};
|
|
16
|
-
export declare function createErrorCodeForFailCallBack(res: ResponseBase | ErrorResponse, api: API_TYPES | API_TYPES_NEVER_RETURN): MiniAppErrorType;
|
|
1
|
+
import { MiniAppErrorType } from '../../../model/miniAppError';
|
|
2
|
+
import { ResponseBase } from '../../../model/makePayment';
|
|
3
|
+
import { ErrorResponse } from '../../../utils/fetch';
|
|
4
|
+
export declare type API_TYPES = 'consult' | 'payment' | 'topup' | 'paymentMethod' | 'address';
|
|
5
|
+
export declare type API_TYPES_NEVER_RETURN = 'ageConfirm' | 'cashback';
|
|
6
|
+
export declare function createErrorFromType(type?: string): {
|
|
7
|
+
errorTitle: string;
|
|
8
|
+
errorDescription: string;
|
|
9
|
+
errorIcon: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function createErrorFromErrorCodeAndType(type?: string, code?: string): {
|
|
12
|
+
errorTitle: string;
|
|
13
|
+
errorDescription: string;
|
|
14
|
+
errorIcon: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function createErrorCodeForFailCallBack(res: ResponseBase | ErrorResponse, api: API_TYPES | API_TYPES_NEVER_RETURN): MiniAppErrorType;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PaymentMethod } from '../../../model/makePayment';
|
|
2
|
-
export declare function isAvailablePaymentMethod(paymentMethod: PaymentMethod): boolean;
|
|
3
|
-
export declare function hasAvailablePaymentMethod(paymentMethods: PaymentMethod[]): boolean;
|
|
1
|
+
import { PaymentMethod } from '../../../model/makePayment';
|
|
2
|
+
export declare function isAvailablePaymentMethod(paymentMethod: PaymentMethod): boolean;
|
|
3
|
+
export declare function hasAvailablePaymentMethod(paymentMethods: PaymentMethod[]): boolean;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
show: BooleanConstructor;
|
|
3
|
-
appParams: {
|
|
4
|
-
type: ObjectConstructor;
|
|
5
|
-
default: () => void;
|
|
6
|
-
};
|
|
7
|
-
}, {
|
|
8
|
-
errorShow: import("vue").ComputedRef<boolean>;
|
|
9
|
-
cancel: () => void;
|
|
10
|
-
closeErrorSheet: () => void;
|
|
11
|
-
openApp: () => void;
|
|
12
|
-
style: Record<string, string>;
|
|
13
|
-
images: any;
|
|
14
|
-
}, {
|
|
15
|
-
lg: any;
|
|
16
|
-
}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
17
|
-
show?: unknown;
|
|
18
|
-
appParams?: unknown;
|
|
19
|
-
} & {
|
|
20
|
-
show: boolean;
|
|
21
|
-
appParams: Record<string, any>;
|
|
22
|
-
} & {}> & {
|
|
23
|
-
onClick?: (...args: any[]) => any;
|
|
24
|
-
}, {
|
|
25
|
-
show: boolean;
|
|
26
|
-
appParams: Record<string, any>;
|
|
27
|
-
}>;
|
|
28
|
-
export default _default;
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
show: BooleanConstructor;
|
|
3
|
+
appParams: {
|
|
4
|
+
type: ObjectConstructor;
|
|
5
|
+
default: () => void;
|
|
6
|
+
};
|
|
7
|
+
}, {
|
|
8
|
+
errorShow: import("vue").ComputedRef<boolean>;
|
|
9
|
+
cancel: () => void;
|
|
10
|
+
closeErrorSheet: () => void;
|
|
11
|
+
openApp: () => void;
|
|
12
|
+
style: Record<string, string>;
|
|
13
|
+
images: any;
|
|
14
|
+
}, {
|
|
15
|
+
lg: any;
|
|
16
|
+
}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
17
|
+
show?: unknown;
|
|
18
|
+
appParams?: unknown;
|
|
19
|
+
} & {
|
|
20
|
+
show: boolean;
|
|
21
|
+
appParams: Record<string, any>;
|
|
22
|
+
} & {}> & {
|
|
23
|
+
onClick?: (...args: any[]) => any;
|
|
24
|
+
}, {
|
|
25
|
+
show: boolean;
|
|
26
|
+
appParams: Record<string, any>;
|
|
27
|
+
}>;
|
|
28
|
+
export default _default;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
show: BooleanConstructor;
|
|
3
|
-
mapParams: {
|
|
4
|
-
type: ObjectConstructor;
|
|
5
|
-
default: () => void;
|
|
6
|
-
};
|
|
7
|
-
}, unknown, {
|
|
8
|
-
errorShow: boolean;
|
|
9
|
-
ios: any;
|
|
10
|
-
iosLength: number;
|
|
11
|
-
lg: any;
|
|
12
|
-
}, {}, {
|
|
13
|
-
loadMap(url: string): void;
|
|
14
|
-
cancel(): void;
|
|
15
|
-
closeErrorSheet(): void;
|
|
16
|
-
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
17
|
-
show?: unknown;
|
|
18
|
-
mapParams?: unknown;
|
|
19
|
-
} & {
|
|
20
|
-
show: boolean;
|
|
21
|
-
mapParams: Record<string, any>;
|
|
22
|
-
} & {}> & {
|
|
23
|
-
onClick?: (...args: any[]) => any;
|
|
24
|
-
}, {
|
|
25
|
-
show: boolean;
|
|
26
|
-
mapParams: Record<string, any>;
|
|
27
|
-
}>;
|
|
28
|
-
export default _default;
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
show: BooleanConstructor;
|
|
3
|
+
mapParams: {
|
|
4
|
+
type: ObjectConstructor;
|
|
5
|
+
default: () => void;
|
|
6
|
+
};
|
|
7
|
+
}, unknown, {
|
|
8
|
+
errorShow: boolean;
|
|
9
|
+
ios: any;
|
|
10
|
+
iosLength: number;
|
|
11
|
+
lg: any;
|
|
12
|
+
}, {}, {
|
|
13
|
+
loadMap(url: string): void;
|
|
14
|
+
cancel(): void;
|
|
15
|
+
closeErrorSheet(): void;
|
|
16
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
17
|
+
show?: unknown;
|
|
18
|
+
mapParams?: unknown;
|
|
19
|
+
} & {
|
|
20
|
+
show: boolean;
|
|
21
|
+
mapParams: Record<string, any>;
|
|
22
|
+
} & {}> & {
|
|
23
|
+
onClick?: (...args: any[]) => any;
|
|
24
|
+
}, {
|
|
25
|
+
show: boolean;
|
|
26
|
+
mapParams: Record<string, any>;
|
|
27
|
+
}>;
|
|
28
|
+
export default _default;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
show: BooleanConstructor;
|
|
3
|
-
title: {
|
|
4
|
-
type: StringConstructor;
|
|
5
|
-
default: string;
|
|
6
|
-
};
|
|
7
|
-
text: {
|
|
8
|
-
type: StringConstructor;
|
|
9
|
-
default: string;
|
|
10
|
-
};
|
|
11
|
-
buttonTitle: {
|
|
12
|
-
type: StringConstructor;
|
|
13
|
-
default: string;
|
|
14
|
-
};
|
|
15
|
-
}, {
|
|
16
|
-
onClick: () => void;
|
|
17
|
-
style: Record<string, string>;
|
|
18
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close-click"[], "close-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
19
|
-
show?: unknown;
|
|
20
|
-
title?: unknown;
|
|
21
|
-
text?: unknown;
|
|
22
|
-
buttonTitle?: unknown;
|
|
23
|
-
} & {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
buttonTitle: string;
|
|
28
|
-
} & {}> & {
|
|
29
|
-
"onClose-click"?: (...args: any[]) => any;
|
|
30
|
-
}, {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
buttonTitle: string;
|
|
35
|
-
}>;
|
|
36
|
-
export default _default;
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
show: BooleanConstructor;
|
|
3
|
+
title: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
text: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
buttonTitle: {
|
|
12
|
+
type: StringConstructor;
|
|
13
|
+
default: string;
|
|
14
|
+
};
|
|
15
|
+
}, {
|
|
16
|
+
onClick: () => void;
|
|
17
|
+
style: Record<string, string>;
|
|
18
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close-click"[], "close-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
19
|
+
show?: unknown;
|
|
20
|
+
title?: unknown;
|
|
21
|
+
text?: unknown;
|
|
22
|
+
buttonTitle?: unknown;
|
|
23
|
+
} & {
|
|
24
|
+
title: string;
|
|
25
|
+
text: string;
|
|
26
|
+
show: boolean;
|
|
27
|
+
buttonTitle: string;
|
|
28
|
+
} & {}> & {
|
|
29
|
+
"onClose-click"?: (...args: any[]) => any;
|
|
30
|
+
}, {
|
|
31
|
+
title: string;
|
|
32
|
+
text: string;
|
|
33
|
+
show: boolean;
|
|
34
|
+
buttonTitle: string;
|
|
35
|
+
}>;
|
|
36
|
+
export default _default;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
show: BooleanConstructor;
|
|
3
|
-
warningParams: {
|
|
4
|
-
type: ObjectConstructor;
|
|
5
|
-
default: () => void;
|
|
6
|
-
};
|
|
7
|
-
}, unknown, {
|
|
8
|
-
errorShow: boolean;
|
|
9
|
-
lg: any;
|
|
10
|
-
images: any;
|
|
11
|
-
}, {
|
|
12
|
-
description(): string;
|
|
13
|
-
}, {
|
|
14
|
-
handleClick(action: string): void;
|
|
15
|
-
closeErrorSheet(): void;
|
|
16
|
-
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close-click"[], "close-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
17
|
-
show?: unknown;
|
|
18
|
-
warningParams?: unknown;
|
|
19
|
-
} & {
|
|
20
|
-
show: boolean;
|
|
21
|
-
warningParams: Record<string, any>;
|
|
22
|
-
} & {}> & {
|
|
23
|
-
"onClose-click"?: (...args: any[]) => any;
|
|
24
|
-
}, {
|
|
25
|
-
show: boolean;
|
|
26
|
-
warningParams: Record<string, any>;
|
|
27
|
-
}>;
|
|
28
|
-
export default _default;
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
show: BooleanConstructor;
|
|
3
|
+
warningParams: {
|
|
4
|
+
type: ObjectConstructor;
|
|
5
|
+
default: () => void;
|
|
6
|
+
};
|
|
7
|
+
}, unknown, {
|
|
8
|
+
errorShow: boolean;
|
|
9
|
+
lg: any;
|
|
10
|
+
images: any;
|
|
11
|
+
}, {
|
|
12
|
+
description(): string;
|
|
13
|
+
}, {
|
|
14
|
+
handleClick(action: string): void;
|
|
15
|
+
closeErrorSheet(): void;
|
|
16
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close-click"[], "close-click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
17
|
+
show?: unknown;
|
|
18
|
+
warningParams?: unknown;
|
|
19
|
+
} & {
|
|
20
|
+
show: boolean;
|
|
21
|
+
warningParams: Record<string, any>;
|
|
22
|
+
} & {}> & {
|
|
23
|
+
"onClose-click"?: (...args: any[]) => any;
|
|
24
|
+
}, {
|
|
25
|
+
show: boolean;
|
|
26
|
+
warningParams: Record<string, any>;
|
|
27
|
+
}>;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { SmartButtonType, SmartButtonSize, SmartButtonTheme, SmartButtonLg } from '../../types';
|
|
3
|
+
declare const _default: import("vue").DefineComponent<{
|
|
4
|
+
type: {
|
|
5
|
+
type: PropType<SmartButtonType>;
|
|
6
|
+
default: string;
|
|
7
|
+
};
|
|
8
|
+
title: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
buttonSize: {
|
|
13
|
+
type: PropType<SmartButtonSize>;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
theme: {
|
|
17
|
+
type: PropType<SmartButtonTheme>;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
avatarUrl: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
cashbackInfo: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
isShortText: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
preferredLanguage: {
|
|
33
|
+
type: PropType<SmartButtonLg>;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
url: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
default: any;
|
|
39
|
+
};
|
|
40
|
+
success: {
|
|
41
|
+
type: FunctionConstructor;
|
|
42
|
+
default: () => void;
|
|
43
|
+
required: false;
|
|
44
|
+
};
|
|
45
|
+
}, {
|
|
46
|
+
onClick: () => void;
|
|
47
|
+
onError: (e: any) => void;
|
|
48
|
+
iconUrl: any;
|
|
49
|
+
smallBtn: boolean;
|
|
50
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "click"[], "click", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
|
51
|
+
type?: unknown;
|
|
52
|
+
title?: unknown;
|
|
53
|
+
buttonSize?: unknown;
|
|
54
|
+
theme?: unknown;
|
|
55
|
+
avatarUrl?: unknown;
|
|
56
|
+
cashbackInfo?: unknown;
|
|
57
|
+
isShortText?: unknown;
|
|
58
|
+
preferredLanguage?: unknown;
|
|
59
|
+
url?: unknown;
|
|
60
|
+
success?: unknown;
|
|
61
|
+
} & {
|
|
62
|
+
title: string;
|
|
63
|
+
success: Function;
|
|
64
|
+
type: SmartButtonType;
|
|
65
|
+
buttonSize: SmartButtonSize;
|
|
66
|
+
theme: SmartButtonTheme;
|
|
67
|
+
avatarUrl: string;
|
|
68
|
+
cashbackInfo: string;
|
|
69
|
+
isShortText: boolean;
|
|
70
|
+
preferredLanguage: SmartButtonLg;
|
|
71
|
+
} & {
|
|
72
|
+
url?: string;
|
|
73
|
+
}> & {
|
|
74
|
+
onClick?: (...args: any[]) => any;
|
|
75
|
+
}, {
|
|
76
|
+
title: string;
|
|
77
|
+
success: Function;
|
|
78
|
+
type: SmartButtonType;
|
|
79
|
+
url: string;
|
|
80
|
+
buttonSize: SmartButtonSize;
|
|
81
|
+
theme: SmartButtonTheme;
|
|
82
|
+
avatarUrl: string;
|
|
83
|
+
cashbackInfo: string;
|
|
84
|
+
isShortText: boolean;
|
|
85
|
+
preferredLanguage: SmartButtonLg;
|
|
86
|
+
}>;
|
|
87
|
+
export default _default;
|