@inno_user/inno_clouds_lib 9.1.9 → 9.1.10

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.
@@ -0,0 +1,23 @@
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;
@@ -0,0 +1,18 @@
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
+ };
@@ -0,0 +1,19 @@
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
+ }
@@ -0,0 +1,48 @@
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>;
@@ -0,0 +1,2 @@
1
+ import { PaymentHandler } from '../../types/payment';
2
+ export declare function createSBPHandler(): PaymentHandler;
@@ -0,0 +1,2 @@
1
+ import { PaymentHandler } from '../../types/payment';
2
+ export declare const createTerminalHandler: () => PaymentHandler;
@@ -0,0 +1,2 @@
1
+ import { PaymentHandler } from '../../types/payment';
2
+ export declare const createYoukassaHandler: () => PaymentHandler;
@@ -0,0 +1,3 @@
1
+ import { CartCleanupService, PaymentConfig } from '../../types/payment';
2
+ /** сервис очистки корзины */
3
+ export declare function createCartCleanupService(config: PaymentConfig): CartCleanupService;
@@ -0,0 +1,2 @@
1
+ import { PaymentErrorHandler } from '../../types/payment';
2
+ export declare function createPaymentErrorHandler(): PaymentErrorHandler;
@@ -0,0 +1,3 @@
1
+ import { PaymentConfig, PaymentNavigationService } from '../../types/payment';
2
+ /** сервис навигации */
3
+ export declare function createPaymentNavigationService(config: PaymentConfig): PaymentNavigationService;
@@ -1,5 +1,5 @@
1
1
  import { ICallStaffRequest } from './types/iRequests';
2
- import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
2
+ import { AxiosInstance, 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, payload: ICallStaffRequest, options?: AxiosRequestConfig): Promise<string | undefined>;
61
+ callStaff(tableId: string, reason: ICallStaffRequest['reason']): 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, is_requestKiosk?: boolean): Promise<any>;
63
+ initPaymentLink(order: string, paymentMethod: string): 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>;
@@ -0,0 +1,28 @@
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;
@@ -1,7 +1,7 @@
1
+ import { PaymentContext, PaymentConfig } from '../types/payment';
1
2
  import { StoreDefinition } from 'pinia';
2
3
  import { Ref, ComputedRef } from 'vue';
3
4
  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,17 +21,26 @@ 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
- orderSocket: (orderId: string, is_requestKiosk: boolean, is_tableservice?: boolean, signal?: AbortSignal) => void;
24
+ discountBtn: Ref<boolean, boolean>;
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>;
25
30
  deleteCart: (path?: string | null, clearTokens?: boolean) => void;
26
31
  setGuestInfo: (info: any) => any;
27
32
  setState: (state: "wait" | "success" | "not_found") => void;
28
33
  openDrawer: () => void;
29
34
  closeDrawer: () => void;
30
35
  clearCard: () => void;
31
- makeInitPaymentLinkRequest: (orderId: string, is_requestKiosk: boolean, is_tableservice?: boolean) => Promise<void>;
32
36
  showNotification: (message: string) => void;
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>;
37
+ createPaymentHandler: (context: PaymentContext, is_requestKiosk: boolean, is_tableservice: boolean, paymentMethodId?: string) => {
38
+ handler: any;
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<{
35
44
  isButtonDisabled: Ref<boolean, boolean>;
36
45
  orderCompleted_lib: Ref<number | null, number | null>;
37
46
  extraDiscount: Ref<number, number>;
@@ -51,17 +60,26 @@ export declare const useCartStore: StoreDefinition<"cartLib", Pick<{
51
60
  isDrawerOpen: Ref<boolean, boolean>;
52
61
  currentState: Ref<"wait" | "success" | "not_found", "wait" | "success" | "not_found">;
53
62
  isAuthorized: ComputedRef<boolean>;
54
- orderSocket: (orderId: string, is_requestKiosk: boolean, is_tableservice?: boolean, signal?: AbortSignal) => void;
63
+ discountBtn: Ref<boolean, boolean>;
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>;
55
69
  deleteCart: (path?: string | null, clearTokens?: boolean) => void;
56
70
  setGuestInfo: (info: any) => any;
57
71
  setState: (state: "wait" | "success" | "not_found") => void;
58
72
  openDrawer: () => void;
59
73
  closeDrawer: () => void;
60
74
  clearCard: () => void;
61
- makeInitPaymentLinkRequest: (orderId: string, is_requestKiosk: boolean, is_tableservice?: boolean) => Promise<void>;
62
75
  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[];
63
82
  }, "isAuthorized">, Pick<{
64
- statusWSCreate: Ref<null, null>;
65
83
  isButtonDisabled: Ref<boolean, boolean>;
66
84
  orderCompleted_lib: Ref<number | null, number | null>;
67
85
  extraDiscount: Ref<number, number>;
@@ -81,13 +99,23 @@ export declare const useCartStore: StoreDefinition<"cartLib", Pick<{
81
99
  isDrawerOpen: Ref<boolean, boolean>;
82
100
  currentState: Ref<"wait" | "success" | "not_found", "wait" | "success" | "not_found">;
83
101
  isAuthorized: ComputedRef<boolean>;
84
- orderSocket: (orderId: string, is_requestKiosk: boolean, is_tableservice?: boolean, signal?: AbortSignal) => void;
102
+ discountBtn: Ref<boolean, boolean>;
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>;
85
108
  deleteCart: (path?: string | null, clearTokens?: boolean) => void;
86
109
  setGuestInfo: (info: any) => any;
87
110
  setState: (state: "wait" | "success" | "not_found") => void;
88
111
  openDrawer: () => void;
89
112
  closeDrawer: () => void;
90
113
  clearCard: () => void;
91
- makeInitPaymentLinkRequest: (orderId: string, is_requestKiosk: boolean, is_tableservice?: boolean) => Promise<void>;
92
114
  showNotification: (message: string) => void;
93
- }, "orderSocket" | "deleteCart" | "setGuestInfo" | "setState" | "openDrawer" | "closeDrawer" | "clearCard" | "makeInitPaymentLinkRequest" | "showNotification">>;
115
+ createPaymentHandler: (context: PaymentContext, is_requestKiosk: boolean, is_tableservice: boolean, paymentMethodId?: string) => {
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">>;
@@ -223,15 +223,12 @@ export declare const useMainStore: StoreDefinition<"mainLib", Pick<{
223
223
  notificationData_lib: Ref<{
224
224
  textNotification: string;
225
225
  fastAdd?: any;
226
- callback?: any;
227
226
  }, {
228
227
  textNotification: string;
229
228
  fastAdd?: any;
230
- callback?: any;
231
229
  } | {
232
230
  textNotification: string;
233
231
  fastAdd?: any;
234
- callback?: any;
235
232
  }>;
236
233
  xApiKey_lib: Ref<string, string>;
237
234
  countBonus: Ref<number, number>;
@@ -480,15 +477,12 @@ export declare const useMainStore: StoreDefinition<"mainLib", Pick<{
480
477
  notificationData_lib: Ref<{
481
478
  textNotification: string;
482
479
  fastAdd?: any;
483
- callback?: any;
484
480
  }, {
485
481
  textNotification: string;
486
482
  fastAdd?: any;
487
- callback?: any;
488
483
  } | {
489
484
  textNotification: string;
490
485
  fastAdd?: any;
491
- callback?: any;
492
486
  }>;
493
487
  xApiKey_lib: Ref<string, string>;
494
488
  countBonus: Ref<number, number>;
@@ -737,15 +731,12 @@ export declare const useMainStore: StoreDefinition<"mainLib", Pick<{
737
731
  notificationData_lib: Ref<{
738
732
  textNotification: string;
739
733
  fastAdd?: any;
740
- callback?: any;
741
734
  }, {
742
735
  textNotification: string;
743
736
  fastAdd?: any;
744
- callback?: any;
745
737
  } | {
746
738
  textNotification: string;
747
739
  fastAdd?: any;
748
- callback?: any;
749
740
  }>;
750
741
  xApiKey_lib: Ref<string, string>;
751
742
  countBonus: Ref<number, number>;
@@ -15,7 +15,6 @@ 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;
19
18
  splash_image_url: string | null;
20
19
  splash_video: string | null;
21
20
  splash_duration: 0;
@@ -63,7 +62,6 @@ export declare const useThemeStore: StoreDefinition<"themeLib", Pick<{
63
62
  cards_color: string | null;
64
63
  text_color: string | null;
65
64
  nonworking_bg_color: string | null;
66
- retail_mode?: null | boolean | undefined;
67
65
  splash_image_url: string | null;
68
66
  splash_video: string | null;
69
67
  splash_duration: 0;
@@ -112,7 +110,6 @@ export declare const useThemeStore: StoreDefinition<"themeLib", Pick<{
112
110
  cards_color: string | null;
113
111
  text_color: string | null;
114
112
  nonworking_bg_color: string | null;
115
- retail_mode?: null | boolean | undefined;
116
113
  splash_image_url: string | null;
117
114
  splash_video: string | null;
118
115
  splash_duration: 0;
@@ -162,7 +159,6 @@ export declare const useThemeStore: StoreDefinition<"themeLib", Pick<{
162
159
  cards_color: string | null;
163
160
  text_color: string | null;
164
161
  nonworking_bg_color: string | null;
165
- retail_mode?: null | boolean | undefined;
166
162
  splash_image_url: string | null;
167
163
  splash_video: string | null;
168
164
  splash_duration: 0;
@@ -210,7 +206,6 @@ export declare const useThemeStore: StoreDefinition<"themeLib", Pick<{
210
206
  cards_color: string | null;
211
207
  text_color: string | null;
212
208
  nonworking_bg_color: string | null;
213
- retail_mode?: null | boolean | undefined;
214
209
  splash_image_url: string | null;
215
210
  splash_video: string | null;
216
211
  splash_duration: 0;
@@ -259,7 +254,6 @@ export declare const useThemeStore: StoreDefinition<"themeLib", Pick<{
259
254
  cards_color: string | null;
260
255
  text_color: string | null;
261
256
  nonworking_bg_color: string | null;
262
- retail_mode?: null | boolean | undefined;
263
257
  splash_image_url: string | null;
264
258
  splash_video: string | null;
265
259
  splash_duration: 0;
@@ -309,7 +303,6 @@ export declare const useThemeStore: StoreDefinition<"themeLib", Pick<{
309
303
  cards_color: string | null;
310
304
  text_color: string | null;
311
305
  nonworking_bg_color: string | null;
312
- retail_mode?: null | boolean | undefined;
313
306
  splash_image_url: string | null;
314
307
  splash_video: string | null;
315
308
  splash_duration: 0;
@@ -357,7 +350,6 @@ export declare const useThemeStore: StoreDefinition<"themeLib", Pick<{
357
350
  cards_color: string | null;
358
351
  text_color: string | null;
359
352
  nonworking_bg_color: string | null;
360
- retail_mode?: null | boolean | undefined;
361
353
  splash_image_url: string | null;
362
354
  splash_video: string | null;
363
355
  splash_duration: 0;
@@ -406,7 +398,6 @@ export declare const useThemeStore: StoreDefinition<"themeLib", Pick<{
406
398
  cards_color: string | null;
407
399
  text_color: string | null;
408
400
  nonworking_bg_color: string | null;
409
- retail_mode?: null | boolean | undefined;
410
401
  splash_image_url: string | null;
411
402
  splash_video: string | null;
412
403
  splash_duration: 0;
@@ -1,8 +1,6 @@
1
- export type ICallStaffRequest = {
1
+ export interface ICallStaffRequest {
2
2
  reason: 'request_waiter' | 'request_bill' | 'request_hookah';
3
- } | {
4
- button_id: string;
5
- };
3
+ }
6
4
  export interface ICallStaffResponse {
7
5
  response_text: string;
8
6
  }
@@ -11,7 +11,6 @@ export interface ITheme {
11
11
  cards_color: string | null;
12
12
  text_color: string | null;
13
13
  nonworking_bg_color: string | null;
14
- retail_mode?: null | boolean;
15
14
  splash_image_url: string | null;
16
15
  splash_video: string | null;
17
16
  splash_duration: 0;
@@ -0,0 +1,134 @@
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
+ }
@@ -0,0 +1,3 @@
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;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@inno_user/inno_clouds_lib",
3
3
  "private": false,
4
- "version": "9.1.9",
4
+ "version": "9.1.10",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"