@inno_user/inno_clouds_lib 9.1.12 → 9.2.1

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,3 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, SVGSVGElement>;
3
+ export default _default;
@@ -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, {}, SVGSVGElement>;
3
+ export default _default;
@@ -1,6 +1,5 @@
1
1
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
2
  declare const _default: DefineComponent<{}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {
3
3
  cardInputManualRef: HTMLInputElement;
4
- cardInputRef: HTMLInputElement;
5
4
  }, any>;
6
5
  export default _default;
@@ -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;
@@ -60,7 +60,7 @@ declare class InitConnection {
60
60
  sendSmsCodeForAuth(code: number, phone: number): Promise<any>;
61
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, 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;