@inno_user/inno_clouds_lib 9.1.10 → 9.1.11
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/@inno_user/inno_clouds_lib.css +1 -1
- package/dist/@inno_user/inno_clouds_lib.es.js +3743 -4910
- package/dist/@inno_user/inno_clouds_lib.umd.js +6 -11
- package/dist/directives/vMuted.d.ts +2 -0
- package/dist/index.d.ts +2 -1
- package/dist/requests.d.ts +3 -3
- package/dist/store/cart.d.ts +11 -39
- package/dist/store/main.d.ts +9 -0
- package/dist/store/theme.d.ts +9 -0
- package/dist/types/iRequests.d.ts +4 -2
- package/dist/types/iTheme.d.ts +1 -0
- package/package.json +1 -1
- package/dist/components/cartPayment/CartPayment.vue.d.ts +0 -23
- package/dist/composables/useCreateOrder.d.ts +0 -18
- package/dist/payment/PaymentMethodRegistry.d.ts +0 -19
- package/dist/payment/handlers/basePaymentHandler.d.ts +0 -48
- package/dist/payment/handlers/sbpHandler.d.ts +0 -2
- package/dist/payment/handlers/terminalHandler.d.ts +0 -2
- package/dist/payment/handlers/youkassaHandler.d.ts +0 -2
- package/dist/payment/services/CartCleanupService.d.ts +0 -3
- package/dist/payment/services/PaymentErrorHandler.d.ts +0 -2
- package/dist/payment/services/PaymentNavigationService.d.ts +0 -3
- package/dist/semantics/paymentBoxes/PaymentBoxes.vue.d.ts +0 -28
- package/dist/types/payment.d.ts +0 -134
- package/dist/ui/cartComplete/completedQRCode/CompletedQRCode.vue.d.ts +0 -3
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { getWebSocketInstance } from './utils/WebSocketService';
|
|
|
18
18
|
import { useModulesStore as useModulesLibStore } from './store/modules';
|
|
19
19
|
import { default as NotificationWindow } from './ui/notificationWindow/NotificationWindow.vue';
|
|
20
20
|
import { vClickOutside } from './directives/vClickOutside';
|
|
21
|
+
import { vMuted } from './directives/vMuted';
|
|
21
22
|
import { useCachedMedia } from './hooks/useProductImage/useProductImage';
|
|
22
23
|
import { updateIndexedDB } from './utils/updateIndexedDB';
|
|
23
24
|
import { getCachedGroup, getCachedProduct, clearAllProductDB } from './utils/indexedDB';
|
|
@@ -36,7 +37,7 @@ import { useVirtuaLoop } from './composables/useVirtuaLoop';
|
|
|
36
37
|
import { preventZoom, PreventZoomConfig } from './utils/preventZoom';
|
|
37
38
|
import { default as clearLocalStorage } from './utils/clearLocalStorage';
|
|
38
39
|
import { default as PricePrerender } from './utils/pricePrerender';
|
|
39
|
-
export { InitConnection, getWebSocketInstance, useModulesLibStore, useImageCacheStore, vClickOutside, initPinia, initRouter, useRouter, useRoute, useCachedMedia, updateIndexedDB, RetryPage, CartPage, CardProductPage, CardReader, CardMain, GroupMain, TagsMain, CartBox, DrumItem, ButtonDefault, BottomSheet, BasketButton, ModalWindows, Recommendation, PopupWindowDefault, NotificationWindow,
|
|
40
|
+
export { InitConnection, getWebSocketInstance, useModulesLibStore, useImageCacheStore, vClickOutside, vMuted, initPinia, initRouter, useRouter, useRoute, useCachedMedia, updateIndexedDB, RetryPage, CartPage, CardProductPage, CardReader, CardMain, GroupMain, TagsMain, CartBox, DrumItem, ButtonDefault, BottomSheet, BasketButton, ModalWindows, Recommendation, PopupWindowDefault, NotificationWindow,
|
|
40
41
|
/** Stores */
|
|
41
42
|
useModalStore, useThemeStore, useMainLibStore, useCardLibStore, useCartLibStore,
|
|
42
43
|
/** Composables */
|
package/dist/requests.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ICallStaffRequest } from './types/iRequests';
|
|
2
|
-
import { AxiosInstance, AxiosResponse } from 'axios';
|
|
2
|
+
import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
3
3
|
interface ConnectionConfig {
|
|
4
4
|
domain: string;
|
|
5
5
|
area: string;
|
|
@@ -58,9 +58,9 @@ declare class InitConnection {
|
|
|
58
58
|
authorizeByCard(cardNumber: string): Promise<any>;
|
|
59
59
|
getLoyalSmsCode(phoneNumber: any): Promise<any>;
|
|
60
60
|
sendSmsCodeForAuth(code: number, phone: number): Promise<any>;
|
|
61
|
-
callStaff(tableId: string,
|
|
61
|
+
callStaff(tableId: string, payload: ICallStaffRequest, options?: AxiosRequestConfig): Promise<string | undefined>;
|
|
62
62
|
createOrder(clearCartProducts_lib: any, tableTitle: any, is_requestKiosk: boolean | undefined, comment: string, is_authorized?: boolean, is_tableservice?: boolean, signal?: AbortSignal): Promise<any>;
|
|
63
|
-
initPaymentLink(order: string,
|
|
63
|
+
initPaymentLink(order: string, is_requestKiosk?: boolean): Promise<any>;
|
|
64
64
|
orderPay(id: string): Promise< AxiosResponse<any, any, {}> | undefined>;
|
|
65
65
|
getProfile(): Promise<any>;
|
|
66
66
|
calculateDiscount(payload: any, is_requestKiosk?: boolean, is_authorized?: boolean, signal?: AbortSignal): Promise<any>;
|
package/dist/store/cart.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PaymentContext, PaymentConfig } from '../types/payment';
|
|
2
1
|
import { StoreDefinition } from 'pinia';
|
|
3
2
|
import { Ref, ComputedRef } from 'vue';
|
|
4
3
|
export declare const useCartStore: StoreDefinition<"cartLib", Pick<{
|
|
4
|
+
statusWSCreate: Ref<null, null>;
|
|
5
5
|
isButtonDisabled: Ref<boolean, boolean>;
|
|
6
6
|
orderCompleted_lib: Ref<number | null, number | null>;
|
|
7
7
|
extraDiscount: Ref<number, number>;
|
|
@@ -21,26 +21,17 @@ export declare const useCartStore: StoreDefinition<"cartLib", Pick<{
|
|
|
21
21
|
isDrawerOpen: Ref<boolean, boolean>;
|
|
22
22
|
currentState: Ref<"wait" | "success" | "not_found", "wait" | "success" | "not_found">;
|
|
23
23
|
isAuthorized: ComputedRef<boolean>;
|
|
24
|
-
|
|
25
|
-
linkQR: Ref<string, string>;
|
|
26
|
-
provider_type: Ref<any, any>;
|
|
27
|
-
is_paymentCart: Ref<boolean, boolean>;
|
|
28
|
-
selected_provider: Ref<any, any>;
|
|
29
|
-
configPayment: Ref<PaymentConfig | undefined, PaymentConfig | undefined>;
|
|
24
|
+
orderSocket: (orderId: string, is_requestKiosk: boolean, is_tableservice?: boolean, signal?: AbortSignal) => void;
|
|
30
25
|
deleteCart: (path?: string | null, clearTokens?: boolean) => void;
|
|
31
26
|
setGuestInfo: (info: any) => any;
|
|
32
27
|
setState: (state: "wait" | "success" | "not_found") => void;
|
|
33
28
|
openDrawer: () => void;
|
|
34
29
|
closeDrawer: () => void;
|
|
35
30
|
clearCard: () => void;
|
|
31
|
+
makeInitPaymentLinkRequest: (orderId: string, is_requestKiosk: boolean, is_tableservice?: boolean) => Promise<void>;
|
|
36
32
|
showNotification: (message: string) => void;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
config: PaymentConfig;
|
|
40
|
-
} | null;
|
|
41
|
-
getCurrentPaymentMethodId: () => string | null;
|
|
42
|
-
getAvailablePaymentMethods: (context: PaymentContext) => string[];
|
|
43
|
-
}, "error" | "count" | "is_notification_lib" | "notificationData_lib" | "isButtonDisabled" | "orderCompleted_lib" | "extraDiscount" | "orderNumber" | "textPaymentBtn_lib" | "guestInfo" | "isDrawerOpen" | "currentState" | "discountBtn" | "linkQR" | "provider_type" | "is_paymentCart" | "selected_provider" | "configPayment">, Pick<{
|
|
33
|
+
}, "error" | "count" | "is_notification_lib" | "notificationData_lib" | "statusWSCreate" | "isButtonDisabled" | "orderCompleted_lib" | "extraDiscount" | "orderNumber" | "textPaymentBtn_lib" | "guestInfo" | "isDrawerOpen" | "currentState">, Pick<{
|
|
34
|
+
statusWSCreate: Ref<null, null>;
|
|
44
35
|
isButtonDisabled: Ref<boolean, boolean>;
|
|
45
36
|
orderCompleted_lib: Ref<number | null, number | null>;
|
|
46
37
|
extraDiscount: Ref<number, number>;
|
|
@@ -60,26 +51,17 @@ export declare const useCartStore: StoreDefinition<"cartLib", Pick<{
|
|
|
60
51
|
isDrawerOpen: Ref<boolean, boolean>;
|
|
61
52
|
currentState: Ref<"wait" | "success" | "not_found", "wait" | "success" | "not_found">;
|
|
62
53
|
isAuthorized: ComputedRef<boolean>;
|
|
63
|
-
|
|
64
|
-
linkQR: Ref<string, string>;
|
|
65
|
-
provider_type: Ref<any, any>;
|
|
66
|
-
is_paymentCart: Ref<boolean, boolean>;
|
|
67
|
-
selected_provider: Ref<any, any>;
|
|
68
|
-
configPayment: Ref<PaymentConfig | undefined, PaymentConfig | undefined>;
|
|
54
|
+
orderSocket: (orderId: string, is_requestKiosk: boolean, is_tableservice?: boolean, signal?: AbortSignal) => void;
|
|
69
55
|
deleteCart: (path?: string | null, clearTokens?: boolean) => void;
|
|
70
56
|
setGuestInfo: (info: any) => any;
|
|
71
57
|
setState: (state: "wait" | "success" | "not_found") => void;
|
|
72
58
|
openDrawer: () => void;
|
|
73
59
|
closeDrawer: () => void;
|
|
74
60
|
clearCard: () => void;
|
|
61
|
+
makeInitPaymentLinkRequest: (orderId: string, is_requestKiosk: boolean, is_tableservice?: boolean) => Promise<void>;
|
|
75
62
|
showNotification: (message: string) => void;
|
|
76
|
-
createPaymentHandler: (context: PaymentContext, is_requestKiosk: boolean, is_tableservice: boolean, paymentMethodId?: string) => {
|
|
77
|
-
handler: any;
|
|
78
|
-
config: PaymentConfig;
|
|
79
|
-
} | null;
|
|
80
|
-
getCurrentPaymentMethodId: () => string | null;
|
|
81
|
-
getAvailablePaymentMethods: (context: PaymentContext) => string[];
|
|
82
63
|
}, "isAuthorized">, Pick<{
|
|
64
|
+
statusWSCreate: Ref<null, null>;
|
|
83
65
|
isButtonDisabled: Ref<boolean, boolean>;
|
|
84
66
|
orderCompleted_lib: Ref<number | null, number | null>;
|
|
85
67
|
extraDiscount: Ref<number, number>;
|
|
@@ -99,23 +81,13 @@ export declare const useCartStore: StoreDefinition<"cartLib", Pick<{
|
|
|
99
81
|
isDrawerOpen: Ref<boolean, boolean>;
|
|
100
82
|
currentState: Ref<"wait" | "success" | "not_found", "wait" | "success" | "not_found">;
|
|
101
83
|
isAuthorized: ComputedRef<boolean>;
|
|
102
|
-
|
|
103
|
-
linkQR: Ref<string, string>;
|
|
104
|
-
provider_type: Ref<any, any>;
|
|
105
|
-
is_paymentCart: Ref<boolean, boolean>;
|
|
106
|
-
selected_provider: Ref<any, any>;
|
|
107
|
-
configPayment: Ref<PaymentConfig | undefined, PaymentConfig | undefined>;
|
|
84
|
+
orderSocket: (orderId: string, is_requestKiosk: boolean, is_tableservice?: boolean, signal?: AbortSignal) => void;
|
|
108
85
|
deleteCart: (path?: string | null, clearTokens?: boolean) => void;
|
|
109
86
|
setGuestInfo: (info: any) => any;
|
|
110
87
|
setState: (state: "wait" | "success" | "not_found") => void;
|
|
111
88
|
openDrawer: () => void;
|
|
112
89
|
closeDrawer: () => void;
|
|
113
90
|
clearCard: () => void;
|
|
91
|
+
makeInitPaymentLinkRequest: (orderId: string, is_requestKiosk: boolean, is_tableservice?: boolean) => Promise<void>;
|
|
114
92
|
showNotification: (message: string) => void;
|
|
115
|
-
|
|
116
|
-
handler: any;
|
|
117
|
-
config: PaymentConfig;
|
|
118
|
-
} | null;
|
|
119
|
-
getCurrentPaymentMethodId: () => string | null;
|
|
120
|
-
getAvailablePaymentMethods: (context: PaymentContext) => string[];
|
|
121
|
-
}, "deleteCart" | "setGuestInfo" | "setState" | "openDrawer" | "closeDrawer" | "clearCard" | "showNotification" | "createPaymentHandler" | "getCurrentPaymentMethodId" | "getAvailablePaymentMethods">>;
|
|
93
|
+
}, "orderSocket" | "deleteCart" | "setGuestInfo" | "setState" | "openDrawer" | "closeDrawer" | "clearCard" | "makeInitPaymentLinkRequest" | "showNotification">>;
|
package/dist/store/main.d.ts
CHANGED
|
@@ -223,12 +223,15 @@ export declare const useMainStore: StoreDefinition<"mainLib", Pick<{
|
|
|
223
223
|
notificationData_lib: Ref<{
|
|
224
224
|
textNotification: string;
|
|
225
225
|
fastAdd?: any;
|
|
226
|
+
callback?: any;
|
|
226
227
|
}, {
|
|
227
228
|
textNotification: string;
|
|
228
229
|
fastAdd?: any;
|
|
230
|
+
callback?: any;
|
|
229
231
|
} | {
|
|
230
232
|
textNotification: string;
|
|
231
233
|
fastAdd?: any;
|
|
234
|
+
callback?: any;
|
|
232
235
|
}>;
|
|
233
236
|
xApiKey_lib: Ref<string, string>;
|
|
234
237
|
countBonus: Ref<number, number>;
|
|
@@ -477,12 +480,15 @@ export declare const useMainStore: StoreDefinition<"mainLib", Pick<{
|
|
|
477
480
|
notificationData_lib: Ref<{
|
|
478
481
|
textNotification: string;
|
|
479
482
|
fastAdd?: any;
|
|
483
|
+
callback?: any;
|
|
480
484
|
}, {
|
|
481
485
|
textNotification: string;
|
|
482
486
|
fastAdd?: any;
|
|
487
|
+
callback?: any;
|
|
483
488
|
} | {
|
|
484
489
|
textNotification: string;
|
|
485
490
|
fastAdd?: any;
|
|
491
|
+
callback?: any;
|
|
486
492
|
}>;
|
|
487
493
|
xApiKey_lib: Ref<string, string>;
|
|
488
494
|
countBonus: Ref<number, number>;
|
|
@@ -731,12 +737,15 @@ export declare const useMainStore: StoreDefinition<"mainLib", Pick<{
|
|
|
731
737
|
notificationData_lib: Ref<{
|
|
732
738
|
textNotification: string;
|
|
733
739
|
fastAdd?: any;
|
|
740
|
+
callback?: any;
|
|
734
741
|
}, {
|
|
735
742
|
textNotification: string;
|
|
736
743
|
fastAdd?: any;
|
|
744
|
+
callback?: any;
|
|
737
745
|
} | {
|
|
738
746
|
textNotification: string;
|
|
739
747
|
fastAdd?: any;
|
|
748
|
+
callback?: any;
|
|
740
749
|
}>;
|
|
741
750
|
xApiKey_lib: Ref<string, string>;
|
|
742
751
|
countBonus: Ref<number, number>;
|
package/dist/store/theme.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export declare const useThemeStore: StoreDefinition<"themeLib", Pick<{
|
|
|
15
15
|
cards_color: string | null;
|
|
16
16
|
text_color: string | null;
|
|
17
17
|
nonworking_bg_color: string | null;
|
|
18
|
+
retail_mode?: null | boolean | undefined;
|
|
18
19
|
splash_image_url: string | null;
|
|
19
20
|
splash_video: string | null;
|
|
20
21
|
splash_duration: 0;
|
|
@@ -62,6 +63,7 @@ export declare const useThemeStore: StoreDefinition<"themeLib", Pick<{
|
|
|
62
63
|
cards_color: string | null;
|
|
63
64
|
text_color: string | null;
|
|
64
65
|
nonworking_bg_color: string | null;
|
|
66
|
+
retail_mode?: null | boolean | undefined;
|
|
65
67
|
splash_image_url: string | null;
|
|
66
68
|
splash_video: string | null;
|
|
67
69
|
splash_duration: 0;
|
|
@@ -110,6 +112,7 @@ export declare const useThemeStore: StoreDefinition<"themeLib", Pick<{
|
|
|
110
112
|
cards_color: string | null;
|
|
111
113
|
text_color: string | null;
|
|
112
114
|
nonworking_bg_color: string | null;
|
|
115
|
+
retail_mode?: null | boolean | undefined;
|
|
113
116
|
splash_image_url: string | null;
|
|
114
117
|
splash_video: string | null;
|
|
115
118
|
splash_duration: 0;
|
|
@@ -159,6 +162,7 @@ export declare const useThemeStore: StoreDefinition<"themeLib", Pick<{
|
|
|
159
162
|
cards_color: string | null;
|
|
160
163
|
text_color: string | null;
|
|
161
164
|
nonworking_bg_color: string | null;
|
|
165
|
+
retail_mode?: null | boolean | undefined;
|
|
162
166
|
splash_image_url: string | null;
|
|
163
167
|
splash_video: string | null;
|
|
164
168
|
splash_duration: 0;
|
|
@@ -206,6 +210,7 @@ export declare const useThemeStore: StoreDefinition<"themeLib", Pick<{
|
|
|
206
210
|
cards_color: string | null;
|
|
207
211
|
text_color: string | null;
|
|
208
212
|
nonworking_bg_color: string | null;
|
|
213
|
+
retail_mode?: null | boolean | undefined;
|
|
209
214
|
splash_image_url: string | null;
|
|
210
215
|
splash_video: string | null;
|
|
211
216
|
splash_duration: 0;
|
|
@@ -254,6 +259,7 @@ export declare const useThemeStore: StoreDefinition<"themeLib", Pick<{
|
|
|
254
259
|
cards_color: string | null;
|
|
255
260
|
text_color: string | null;
|
|
256
261
|
nonworking_bg_color: string | null;
|
|
262
|
+
retail_mode?: null | boolean | undefined;
|
|
257
263
|
splash_image_url: string | null;
|
|
258
264
|
splash_video: string | null;
|
|
259
265
|
splash_duration: 0;
|
|
@@ -303,6 +309,7 @@ export declare const useThemeStore: StoreDefinition<"themeLib", Pick<{
|
|
|
303
309
|
cards_color: string | null;
|
|
304
310
|
text_color: string | null;
|
|
305
311
|
nonworking_bg_color: string | null;
|
|
312
|
+
retail_mode?: null | boolean | undefined;
|
|
306
313
|
splash_image_url: string | null;
|
|
307
314
|
splash_video: string | null;
|
|
308
315
|
splash_duration: 0;
|
|
@@ -350,6 +357,7 @@ export declare const useThemeStore: StoreDefinition<"themeLib", Pick<{
|
|
|
350
357
|
cards_color: string | null;
|
|
351
358
|
text_color: string | null;
|
|
352
359
|
nonworking_bg_color: string | null;
|
|
360
|
+
retail_mode?: null | boolean | undefined;
|
|
353
361
|
splash_image_url: string | null;
|
|
354
362
|
splash_video: string | null;
|
|
355
363
|
splash_duration: 0;
|
|
@@ -398,6 +406,7 @@ export declare const useThemeStore: StoreDefinition<"themeLib", Pick<{
|
|
|
398
406
|
cards_color: string | null;
|
|
399
407
|
text_color: string | null;
|
|
400
408
|
nonworking_bg_color: string | null;
|
|
409
|
+
retail_mode?: null | boolean | undefined;
|
|
401
410
|
splash_image_url: string | null;
|
|
402
411
|
splash_video: string | null;
|
|
403
412
|
splash_duration: 0;
|
package/dist/types/iTheme.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
configPage: {
|
|
4
|
-
tableDataId: any;
|
|
5
|
-
kiosk_menu: boolean;
|
|
6
|
-
qr_menu: boolean;
|
|
7
|
-
is_tableservice: boolean;
|
|
8
|
-
userData?: unknown;
|
|
9
|
-
};
|
|
10
|
-
comment: string;
|
|
11
|
-
cartItems: any[];
|
|
12
|
-
isAuthorized: boolean;
|
|
13
|
-
hasRmsDiscount?: boolean;
|
|
14
|
-
hideDiscountsButton?: boolean;
|
|
15
|
-
orderId?: string | null;
|
|
16
|
-
signal?: AbortSignal;
|
|
17
|
-
};
|
|
18
|
-
declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
19
|
-
selectPayment: (providerId: string) => any;
|
|
20
|
-
}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
|
-
onSelectPayment?: ((providerId: string) => any) | undefined;
|
|
22
|
-
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
23
|
-
export default _default;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { CreateOrderAndOpenSocketConfig } from '../payment/handlers/basePaymentHandler';
|
|
2
|
-
export interface CreateOrderConfigPage {
|
|
3
|
-
tableDataId: any;
|
|
4
|
-
kiosk_menu: boolean;
|
|
5
|
-
is_tableservice: boolean;
|
|
6
|
-
}
|
|
7
|
-
export interface CreateOrderParams {
|
|
8
|
-
paymentMethodId?: string;
|
|
9
|
-
items: any[];
|
|
10
|
-
tableDataId: any;
|
|
11
|
-
comment: string;
|
|
12
|
-
isAuthorized: boolean;
|
|
13
|
-
signal?: AbortSignal;
|
|
14
|
-
}
|
|
15
|
-
export declare function useCreateOrder(): {
|
|
16
|
-
getCreateOrderConfig: (configPage: CreateOrderConfigPage, paymentMethodId?: string) => CreateOrderAndOpenSocketConfig | null;
|
|
17
|
-
makeCreateOrderRequest: (configPage: CreateOrderConfigPage, params: CreateOrderParams) => Promise<any>;
|
|
18
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { PaymentContext, PaymentMethodConfig, PaymentHandler } from '../types/payment';
|
|
2
|
-
/**
|
|
3
|
-
* Регистр методов оплаты
|
|
4
|
-
* Централизованное место для регистрации и управления методами оплаты
|
|
5
|
-
*/
|
|
6
|
-
export declare class PaymentMethodRegistry {
|
|
7
|
-
private static methods;
|
|
8
|
-
/**
|
|
9
|
-
* Инициализация регистра с методами оплаты по умолчанию
|
|
10
|
-
*/
|
|
11
|
-
static initialize(): void;
|
|
12
|
-
static register(config: PaymentMethodConfig): void;
|
|
13
|
-
static getConfig(id: string): PaymentMethodConfig | null;
|
|
14
|
-
/** Получение доступных методов оплаты для контекста (возвращает id) */
|
|
15
|
-
static getAvailableMethods(context: PaymentContext): string[];
|
|
16
|
-
/** Проверка доступности метода для контекста */
|
|
17
|
-
static isMethodAvailable(id: string, context: PaymentContext): boolean;
|
|
18
|
-
static createHandler(id: string): PaymentHandler | null;
|
|
19
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { PaymentConfig, CreateOrderAndOpenSocketConfig } from '../../types/payment';
|
|
2
|
-
export type { CreateOrderAndOpenSocketConfig };
|
|
3
|
-
/**
|
|
4
|
-
* Инициализация WebSocket соединения для заказа
|
|
5
|
-
* Если ws уже передан в конфиге, использует его, иначе создает новый
|
|
6
|
-
*/
|
|
7
|
-
export declare function initWebSocket(orderId: string, config: PaymentConfig, onOpen: () => void, onMessage: (data: any) => void, onError: (error: any) => void, signal?: AbortSignal): any;
|
|
8
|
-
export declare function closeWebSocket(ws: any | null): void;
|
|
9
|
-
/**
|
|
10
|
-
* Инициализация платежной ссылки
|
|
11
|
-
*/
|
|
12
|
-
export declare function initPaymentLink(orderId: string, method: string): Promise<any>;
|
|
13
|
-
/**
|
|
14
|
-
* Обработчик сообщений WebSocket (базовая логика)
|
|
15
|
-
*/
|
|
16
|
-
export declare function baseWebSocketMessage(data: any, config: PaymentConfig, handleStatus: (data: any, config: PaymentConfig) => void): void;
|
|
17
|
-
/**
|
|
18
|
-
* Обработка RMS скидок
|
|
19
|
-
*/
|
|
20
|
-
export declare function handleRmsDiscounts(data: any, config: PaymentConfig): boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Обработка смены экранов статусов
|
|
23
|
-
*/
|
|
24
|
-
export declare const checkOrderStatus: (config: PaymentConfig, status: number | null) => void;
|
|
25
|
-
export declare const checkLoadCart: (config: PaymentConfig) => void;
|
|
26
|
-
export declare const checkResetBonuses: (config: PaymentConfig) => void;
|
|
27
|
-
export declare const checkCloseWebSocket: (config: PaymentConfig) => void;
|
|
28
|
-
/**
|
|
29
|
-
* Обработка table service
|
|
30
|
-
*/
|
|
31
|
-
export declare const handleTableService: (config: PaymentConfig, ws: any | null) => void;
|
|
32
|
-
/**
|
|
33
|
-
* Обработка оплаты заказа
|
|
34
|
-
*/
|
|
35
|
-
export declare const handleOrderPay: (data: any, config: PaymentConfig, ws: any, errorHandler: any) => void;
|
|
36
|
-
/**
|
|
37
|
-
* Обработка ошибок заказа
|
|
38
|
-
*/
|
|
39
|
-
export declare const handleOrderError: (config: PaymentConfig, ws: any, errorHandler: any) => void;
|
|
40
|
-
/**
|
|
41
|
-
* Создание заказа и открытие WebSocket с полной обработкой ошибок и редиректов
|
|
42
|
-
* Сокет всегда создается централизованно, handler определяется динамически при получении сообщений
|
|
43
|
-
*/
|
|
44
|
-
export declare function createOrderAndOpenSocket(items: any[], tableDataId: any, config: CreateOrderAndOpenSocketConfig, options: {
|
|
45
|
-
comment: string;
|
|
46
|
-
is_authorized: boolean;
|
|
47
|
-
signal?: AbortSignal;
|
|
48
|
-
}): Promise<any>;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
configPage: {
|
|
4
|
-
tableDataId: any;
|
|
5
|
-
kiosk_menu: boolean;
|
|
6
|
-
qr_menu: boolean;
|
|
7
|
-
is_tableservice: boolean;
|
|
8
|
-
userData?: unknown;
|
|
9
|
-
};
|
|
10
|
-
comment: string;
|
|
11
|
-
cartItems: any[];
|
|
12
|
-
isAuthorized: boolean;
|
|
13
|
-
hasRmsDiscount?: boolean;
|
|
14
|
-
hideDiscountsButton?: boolean;
|
|
15
|
-
orderId?: string | null;
|
|
16
|
-
signal?: AbortSignal;
|
|
17
|
-
provider: any;
|
|
18
|
-
};
|
|
19
|
-
declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
20
|
-
select: (providerId: string) => any;
|
|
21
|
-
}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
22
|
-
onSelect?: ((providerId: string) => any) | undefined;
|
|
23
|
-
}>, {
|
|
24
|
-
hasRmsDiscount: boolean;
|
|
25
|
-
hideDiscountsButton: boolean;
|
|
26
|
-
orderId: string | null;
|
|
27
|
-
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
28
|
-
export default _default;
|
package/dist/types/payment.d.ts
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Типы методов оплаты
|
|
3
|
-
*/
|
|
4
|
-
export type PaymentMethod = 'SBP' | 'YOOKASSA' | 'TERMINAL';
|
|
5
|
-
/**
|
|
6
|
-
* Типы контекстов (режимов работы)
|
|
7
|
-
*/
|
|
8
|
-
export type PaymentContext = 'kiosk' | 'qr' | 'tableservice';
|
|
9
|
-
export interface PaymentHandler {
|
|
10
|
-
/**
|
|
11
|
-
* Обработка статусов WebSocket для конкретного метода оплаты
|
|
12
|
-
* @param data - Данные из WebSocket
|
|
13
|
-
* @param config - Конфигурация платежа
|
|
14
|
-
*/
|
|
15
|
-
handleWebSocketStatus(data: any, config: PaymentConfig): void;
|
|
16
|
-
}
|
|
17
|
-
export interface PaymentMethodConfig {
|
|
18
|
-
id: string;
|
|
19
|
-
method: PaymentMethod;
|
|
20
|
-
availableContexts: PaymentContext[];
|
|
21
|
-
handlerFactory: () => PaymentHandler;
|
|
22
|
-
}
|
|
23
|
-
/** Интерфейс оплаты */
|
|
24
|
-
export interface PaymentConfig {
|
|
25
|
-
context: PaymentContext;
|
|
26
|
-
method: PaymentMethod;
|
|
27
|
-
is_requestKiosk: boolean;
|
|
28
|
-
is_tableservice: boolean;
|
|
29
|
-
showNotification: (message: string) => void;
|
|
30
|
-
deleteCart: (path: string | null, clearTokens: boolean) => void;
|
|
31
|
-
resetStores: () => void;
|
|
32
|
-
redirect?: (path: string) => void;
|
|
33
|
-
updateOrderStatus?: (status: number | null) => void;
|
|
34
|
-
setOrderNumber?: (number: number) => void;
|
|
35
|
-
loadCart?: () => void;
|
|
36
|
-
resetBonuses?: () => void;
|
|
37
|
-
ws?: any;
|
|
38
|
-
router?: any;
|
|
39
|
-
route?: any;
|
|
40
|
-
orderErrors?: string[];
|
|
41
|
-
errorHandler?: PaymentErrorHandler;
|
|
42
|
-
cartCleanup: CartCleanupService;
|
|
43
|
-
navigation?: PaymentNavigationService;
|
|
44
|
-
closeWebSocket?: () => void;
|
|
45
|
-
area?: string;
|
|
46
|
-
has_rms_discount?: boolean;
|
|
47
|
-
totalPrice?: any;
|
|
48
|
-
initialCartPrice?: any;
|
|
49
|
-
signal?: AbortSignal;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Конфигурация для создания заказа и открытия WebSocket.
|
|
53
|
-
* Заказ создаётся в basePaymentHandler, сокет открывается только внутри handler.processPayment.
|
|
54
|
-
*/
|
|
55
|
-
export interface CreateOrderAndOpenSocketConfig extends PaymentConfig {
|
|
56
|
-
route: {
|
|
57
|
-
params: {
|
|
58
|
-
orgId: string;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
handler: PaymentHandler;
|
|
62
|
-
setButtonDisabled: (value: boolean) => void;
|
|
63
|
-
/** Вызывается при 403 в режиме киоска (очистка apiKey, показ экрана ввода ключа) */
|
|
64
|
-
on403Kiosk?: () => void;
|
|
65
|
-
}
|
|
66
|
-
/** Интерфейс ошибки */
|
|
67
|
-
export interface PaymentErrorHandler {
|
|
68
|
-
/**
|
|
69
|
-
* Обработка ошибки платежа
|
|
70
|
-
* @param error - Ошибка
|
|
71
|
-
* @param config - Конфигурация платежа
|
|
72
|
-
*/
|
|
73
|
-
handlePaymentError(error: any, config: PaymentConfig): void;
|
|
74
|
-
/**
|
|
75
|
-
* Обработка ошибки оплаты заказа
|
|
76
|
-
* @param error - Ошибка
|
|
77
|
-
* @param config - Конфигурация платежа
|
|
78
|
-
*/
|
|
79
|
-
handleOrderPayError(error: any, config: PaymentConfig): void;
|
|
80
|
-
/**
|
|
81
|
-
* Обработка ошибки заказа
|
|
82
|
-
* @param status - Статус ошибки
|
|
83
|
-
* @param config - Конфигурация платежа
|
|
84
|
-
*/
|
|
85
|
-
handleOrderError(config: PaymentConfig): void;
|
|
86
|
-
/**
|
|
87
|
-
* Обработка ошибки создания заказа: редиректы, уведомления, очистка корзины
|
|
88
|
-
* @param error - Ошибка
|
|
89
|
-
* @param config - Конфигурация создания заказа
|
|
90
|
-
*/
|
|
91
|
-
handleCreateOrderError(error: any, config: CreateOrderAndOpenSocketConfig): void;
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Интерфейс для сервиса очистки корзины
|
|
95
|
-
*/
|
|
96
|
-
export interface CartCleanupService {
|
|
97
|
-
/**
|
|
98
|
-
* Очистка корзины и навигация
|
|
99
|
-
* @param path - Путь для навигации (null для отсутствия навигации)
|
|
100
|
-
* @param clearTokens - Очищать ли токены авторизации
|
|
101
|
-
*/
|
|
102
|
-
cleanupAndNavigate(path: string | null, clearTokens: boolean): void;
|
|
103
|
-
/**
|
|
104
|
-
* Очистка корзины без навигации
|
|
105
|
-
* @param clearTokens - Очищать ли токены авторизации
|
|
106
|
-
*/
|
|
107
|
-
cleanup(clearTokens: boolean): void;
|
|
108
|
-
/** Очистка токенов авторизации */
|
|
109
|
-
clearTokens(): void;
|
|
110
|
-
/** Сброс состояния сторов */
|
|
111
|
-
resetStores(): void;
|
|
112
|
-
}
|
|
113
|
-
/** Интерфейс для сервиса навигации */
|
|
114
|
-
export interface PaymentNavigationService {
|
|
115
|
-
redirectToError(): void;
|
|
116
|
-
/**
|
|
117
|
-
* Редирект на страницу успеха
|
|
118
|
-
* @param path - Дополнительный путь
|
|
119
|
-
*/
|
|
120
|
-
redirectToSuccess(path?: string): void;
|
|
121
|
-
/**
|
|
122
|
-
* Редирект на указанный путь
|
|
123
|
-
* @param path - Путь для редиректа
|
|
124
|
-
*/
|
|
125
|
-
redirect(path: string): void;
|
|
126
|
-
/**
|
|
127
|
-
* Получение пути для страницы ошибки
|
|
128
|
-
*/
|
|
129
|
-
getErrorPath(): string;
|
|
130
|
-
/**
|
|
131
|
-
* Получение пути для страницы успеха
|
|
132
|
-
*/
|
|
133
|
-
getSuccessPath(): string;
|
|
134
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
-
declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
3
|
-
export default _default;
|