@retailcrm/embed-ui-v1-contexts 0.5.21 → 0.5.23-alpha.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,175 @@
1
+ import { ContextSchemaDescription, ContextSchemaUsage } from '@retailcrm/embed-ui-v1-types/context-doc';
2
+ import { Schema } from '../../../types/order/card-items';
3
+ import { PredicateWithMeta } from '../../predicates';
4
+ export declare const isDimensions: PredicateWithMeta<{
5
+ L: number | null;
6
+ W: number | null;
7
+ H: number | null;
8
+ }>;
9
+ export declare const isMoney: PredicateWithMeta<{
10
+ amount: number;
11
+ currency: string;
12
+ }>;
13
+ export declare const isWeightUnit: PredicateWithMeta<"grams" | "kilograms" | "tons">;
14
+ export declare const isWeight: PredicateWithMeta<{
15
+ value: number;
16
+ unit: "grams" | "kilograms" | "tons";
17
+ }>;
18
+ export declare const isProperty: PredicateWithMeta<{
19
+ code: string;
20
+ name: string;
21
+ value: string;
22
+ }>;
23
+ export declare const isDiscountType: PredicateWithMeta<"bonus_charge" | "loyalty_event" | "loyalty_level" | "manual_order" | "manual_product" | "personal" | "round">;
24
+ export declare const isDiscount: PredicateWithMeta<{
25
+ type: "bonus_charge" | "loyalty_event" | "loyalty_level" | "manual_order" | "manual_product" | "personal" | "round";
26
+ amount: number;
27
+ }>;
28
+ export declare const isOffer: PredicateWithMeta<{
29
+ id: number;
30
+ name: string;
31
+ image: string | null;
32
+ dimensions: {
33
+ L: number | null;
34
+ W: number | null;
35
+ H: number | null;
36
+ };
37
+ weight: {
38
+ value: number;
39
+ unit: "grams" | "kilograms" | "tons";
40
+ } | null;
41
+ article: string | null;
42
+ barcode: string | null;
43
+ properties: {
44
+ code: string;
45
+ name: string;
46
+ value: string;
47
+ }[];
48
+ unit: string | null;
49
+ purchasePrice: {
50
+ amount: number;
51
+ currency: string;
52
+ } | null;
53
+ }>;
54
+ export declare const isPriceType: PredicateWithMeta<{
55
+ id: number;
56
+ code: string;
57
+ name: string;
58
+ title: string;
59
+ default: boolean;
60
+ currency: string;
61
+ }>;
62
+ export declare const isProductType: PredicateWithMeta<"PRODUCT" | "SERVICE">;
63
+ export declare const isProductGroup: PredicateWithMeta<{
64
+ id: number;
65
+ name: string;
66
+ }>;
67
+ export declare const isProduct: PredicateWithMeta<{
68
+ id: number;
69
+ type: "PRODUCT" | "SERVICE";
70
+ name: string;
71
+ image: string | null;
72
+ article: string | null;
73
+ manufacturer: string | null;
74
+ markable: boolean;
75
+ groups: {
76
+ id: number;
77
+ name: string;
78
+ }[];
79
+ unit: string | null;
80
+ url: string | null;
81
+ recommendationProviderType: "SERVICE" | "NONE" | "SYSTEM";
82
+ }>;
83
+ export declare const isStatus: PredicateWithMeta<{
84
+ id: number;
85
+ name: string;
86
+ isCancel: boolean | undefined;
87
+ }>;
88
+ export declare const isItem: PredicateWithMeta<{
89
+ id: number | null;
90
+ index: number;
91
+ type: "PRODUCT" | "SERVICE";
92
+ offer: {
93
+ id: number;
94
+ name: string;
95
+ image: string | null;
96
+ dimensions: {
97
+ L: number | null;
98
+ W: number | null;
99
+ H: number | null;
100
+ };
101
+ weight: {
102
+ value: number;
103
+ unit: "grams" | "kilograms" | "tons";
104
+ } | null;
105
+ article: string | null;
106
+ barcode: string | null;
107
+ properties: {
108
+ code: string;
109
+ name: string;
110
+ value: string;
111
+ }[];
112
+ unit: string | null;
113
+ purchasePrice: {
114
+ amount: number;
115
+ currency: string;
116
+ } | null;
117
+ } | null;
118
+ product: {
119
+ id: number;
120
+ type: "PRODUCT" | "SERVICE";
121
+ name: string;
122
+ image: string | null;
123
+ article: string | null;
124
+ manufacturer: string | null;
125
+ markable: boolean;
126
+ groups: {
127
+ id: number;
128
+ name: string;
129
+ }[];
130
+ unit: string | null;
131
+ url: string | null;
132
+ recommendationProviderType: "SERVICE" | "NONE" | "SYSTEM";
133
+ } | null;
134
+ properties: {
135
+ code: string;
136
+ name: string;
137
+ value: string;
138
+ }[];
139
+ quantity: number;
140
+ purchasePrice: {
141
+ amount: number;
142
+ currency: string;
143
+ } | null;
144
+ initialPrice: {
145
+ amount: number;
146
+ currency: string;
147
+ } | null;
148
+ priceType: {
149
+ id: number;
150
+ code: string;
151
+ name: string;
152
+ title: string;
153
+ default: boolean;
154
+ currency: string;
155
+ } | null;
156
+ bonusesChargeTotal: number;
157
+ bonusesCreditTotal: number;
158
+ discounts: {
159
+ type: "bonus_charge" | "loyalty_event" | "loyalty_level" | "manual_order" | "manual_product" | "personal" | "round";
160
+ amount: number;
161
+ }[];
162
+ discountTotal: number;
163
+ vatRate: number | `${number}` | "none";
164
+ vatSum: number;
165
+ comment: string;
166
+ status: {
167
+ id: number;
168
+ name: string;
169
+ isCancel: boolean | undefined;
170
+ } | null;
171
+ }>;
172
+ export declare const id = "order/card:items";
173
+ export declare const schema: Schema;
174
+ export declare const description: ContextSchemaDescription<Schema>;
175
+ export declare const usage: ContextSchemaUsage;
@@ -0,0 +1,6 @@
1
+ import { ContextSchemaDescription, ContextSchemaUsage } from '@retailcrm/embed-ui-v1-types/context-doc';
2
+ import { Schema } from '../../../types/order/card-settings';
3
+ export declare const id = "order/card:settings";
4
+ export declare const schema: Schema;
5
+ export declare const description: ContextSchemaDescription<Schema>;
6
+ export declare const usage: ContextSchemaUsage;
package/dist/meta.json CHANGED
@@ -393,6 +393,214 @@
393
393
  "call": "const order = useContext()"
394
394
  }
395
395
  },
396
+ "order/card:settings": {
397
+ "fields": [
398
+ {
399
+ "name": "changePriceTypeByPriority",
400
+ "type": "boolean",
401
+ "description": {
402
+ "en-GB": "Change price type for the order item when item quantity is changed",
403
+ "es-ES": "Cambiar el tipo de precio para el producto del pedido cuando se cambia la cantidad del producto",
404
+ "ru-RU": "Изменять тип цены для товара в заказе, при изменении количества товара"
405
+ },
406
+ "readonly": true
407
+ },
408
+ {
409
+ "name": "changePriceTypeIfUnavailable",
410
+ "type": "boolean",
411
+ "description": {
412
+ "en-GB": "Change the price type for the product/service in the order, if the current type is not available",
413
+ "es-ES": "Cambie el tipo de precio para el producto/servicio en el pedido, si el tipo actual no está disponible",
414
+ "ru-RU": "Изменять тип цены для товара в заказе, при изменении количества товара"
415
+ },
416
+ "readonly": true
417
+ },
418
+ {
419
+ "name": "defaultUnit",
420
+ "type": "string | null",
421
+ "description": {
422
+ "en-GB": "Default quantity unit of measurement",
423
+ "es-ES": "Unidad de medida de cantidad predeterminada",
424
+ "ru-RU": "Единица измерения количества по-умолчанию"
425
+ },
426
+ "readonly": true
427
+ },
428
+ {
429
+ "name": "duplicatesAllowed",
430
+ "type": "boolean",
431
+ "description": {
432
+ "en-GB": "Possibility of adding the same SKUs to the order as different items",
433
+ "es-ES": "La posibilidad de añadir las mismas variantes como diferentes productos al pedido",
434
+ "ru-RU": "Возможность добавлять в заказ одинаковые торговые предложения как разные позиции"
435
+ },
436
+ "readonly": true
437
+ },
438
+ {
439
+ "name": "quantityIsFractional",
440
+ "type": "boolean",
441
+ "description": {
442
+ "en-GB": "Integer or fractional quantity of items",
443
+ "es-ES": "Cantidad entera o fraccionada de productos",
444
+ "ru-RU": "Целое или дробное количество товара"
445
+ },
446
+ "readonly": true
447
+ },
448
+ {
449
+ "name": "priceEditable",
450
+ "type": "boolean",
451
+ "description": {
452
+ "en-GB": "Ability to edit item prices",
453
+ "es-ES": "Capacidad de editar precios de artículos",
454
+ "ru-RU": "Возможность редактировать цену товарных позиций"
455
+ },
456
+ "readonly": true
457
+ },
458
+ {
459
+ "name": "productsRemoveAllowed",
460
+ "type": "boolean",
461
+ "description": {
462
+ "en-GB": "Ability to delete items from the order",
463
+ "es-ES": "Posibilidad de eliminar artículos del pedido",
464
+ "ru-RU": "Возможность удалять товарные позиции из заказа"
465
+ },
466
+ "readonly": true
467
+ },
468
+ {
469
+ "name": "productsMarkingEnabled",
470
+ "type": "boolean",
471
+ "description": {
472
+ "en-GB": "Possibility of working with marked products",
473
+ "es-ES": "Posibilidad de trabajar con productos marcados",
474
+ "ru-RU": "Возможность работы с маркированными товарами"
475
+ },
476
+ "readonly": true
477
+ },
478
+ {
479
+ "name": "propertiesToShow.additional",
480
+ "type": "Array<string>",
481
+ "description": {
482
+ "en-GB": "Additional product fields displayed in the product list",
483
+ "es-ES": "Campos adicionales de productos que se muestran en la lista de productos",
484
+ "ru-RU": "Дополнительные поля товаров, выводимые в списке товарных позиций"
485
+ },
486
+ "readonly": true
487
+ },
488
+ {
489
+ "name": "propertiesToShow.base",
490
+ "type": "Array<string>",
491
+ "description": {
492
+ "en-GB": "Basic product fields displayed in the product list",
493
+ "es-ES": "Campos básicos de productos que se muestran en la lista de productos",
494
+ "ru-RU": "Базовые поля товаров, выводимые в списке товарных позиций"
495
+ },
496
+ "readonly": true
497
+ },
498
+ {
499
+ "name": "purchasePriceEditable",
500
+ "type": "boolean",
501
+ "description": {
502
+ "en-GB": "Ability to edit purchase prices in the product list",
503
+ "es-ES": "Capacidad de editar precios de compra en la lista de productos",
504
+ "ru-RU": "Возможность редактирования закупочных цен в списке товарных позиций"
505
+ },
506
+ "readonly": true
507
+ },
508
+ {
509
+ "name": "purchasePriceVisible",
510
+ "type": "boolean",
511
+ "description": {
512
+ "en-GB": "Display purchase prices in the product list",
513
+ "es-ES": "Mostrar precios de compra en la lista de productos",
514
+ "ru-RU": "Отображать закупочные цены в списке товарных позиций"
515
+ },
516
+ "readonly": true
517
+ },
518
+ {
519
+ "name": "reserveDeliveryNoteEditable",
520
+ "type": "boolean",
521
+ "description": {
522
+ "en-GB": "Ability to edit delivery note number when reserving products",
523
+ "es-ES": "Posibilidad de editar el número de albarán al reservar productos",
524
+ "ru-RU": "Возможность редактирования номера накладной при бронировании товаров"
525
+ },
526
+ "readonly": true
527
+ },
528
+ {
529
+ "name": "reserveInvoiceEditable",
530
+ "type": "boolean",
531
+ "description": {
532
+ "en-GB": "Ability to edit invoice number when reserving products",
533
+ "es-ES": "Posibilidad de editar el número de factura al reservar productos",
534
+ "ru-RU": "Возможность редактирования номера счет-фактуры при бронировании товара"
535
+ },
536
+ "readonly": true
537
+ },
538
+ {
539
+ "name": "reserveShipmentDateEditable",
540
+ "type": "boolean",
541
+ "description": {
542
+ "en-GB": "Ability to edit shipment date when reserving products",
543
+ "es-ES": "Posibilidad de editar la fecha de envío al reservar productos",
544
+ "ru-RU": "Возможность редактирования даты отгрузки при бронировании товара"
545
+ },
546
+ "readonly": true
547
+ },
548
+ {
549
+ "name": "reserveTelephonyEnabled",
550
+ "type": "boolean",
551
+ "description": {
552
+ "en-GB": "Telephony availability when reserving products",
553
+ "es-ES": "Disponibilidad de telefonía al reservar productos",
554
+ "ru-RU": "Доступность телефонии при бронировании товара"
555
+ },
556
+ "readonly": true
557
+ },
558
+ {
559
+ "name": "showArticle",
560
+ "type": "boolean",
561
+ "description": {
562
+ "en-GB": "Display SKU",
563
+ "es-ES": "Mostrar SKU",
564
+ "ru-RU": "Отображать артикул"
565
+ },
566
+ "readonly": true
567
+ },
568
+ {
569
+ "name": "showPriceTypes",
570
+ "type": "boolean",
571
+ "description": {
572
+ "en-GB": "Work with price types",
573
+ "es-ES": "Trabajo con tipos de precios",
574
+ "ru-RU": "Работа с типами цен"
575
+ },
576
+ "readonly": true
577
+ },
578
+ {
579
+ "name": "useStores",
580
+ "type": "boolean",
581
+ "description": {
582
+ "en-GB": "Work with warehouses",
583
+ "es-ES": "Trabajo con almacenes",
584
+ "ru-RU": "Работа со складами"
585
+ },
586
+ "readonly": true
587
+ },
588
+ {
589
+ "name": "useReserve",
590
+ "type": "boolean",
591
+ "description": {
592
+ "en-GB": "Work with reservations",
593
+ "es-ES": "Trabajo con reservas",
594
+ "ru-RU": "Работа с бронированием"
595
+ },
596
+ "readonly": true
597
+ }
598
+ ],
599
+ "usage": {
600
+ "import": "import { useContext } from '@retailcrm/embed-ui-v1-contexts/remote/order/card-settings'",
601
+ "call": "const orderSettings = useContext()"
602
+ }
603
+ },
396
604
  "user/current": {
397
605
  "fields": [
398
606
  {
@@ -9,8 +9,12 @@ const isExactly = (expected) => {
9
9
  };
10
10
  const isNull = withMeta((value) => value === null, "null");
11
11
  const isNumber = withMeta((value) => typeof value === "number", "number");
12
+ const isNumeric = withMeta((value) => {
13
+ return isNumber(value) || typeof value === "string" && !isNaN(Number(value));
14
+ }, "number | `${number}`");
12
15
  const isObject = withMeta((value) => typeof value === "object" && value !== null, "object");
13
16
  const isString = withMeta((value) => typeof value === "string", "string");
17
+ withMeta((value) => typeof value === "symbol", "symbol");
14
18
  const arrayOf = (predicate) => withMeta(
15
19
  (value) => {
16
20
  return isArray(value) && value.every(predicate);
@@ -23,13 +27,28 @@ const oneOf = (...predicates) => withMeta(
23
27
  },
24
28
  predicates.map((p) => p.type).join(" | ")
25
29
  );
30
+ const isShape = (shape, type = "object") => {
31
+ const properties = Object.keys(shape);
32
+ return withMeta((value) => {
33
+ return typeof value === "object" && value !== null && properties.every((p) => {
34
+ const config = shape[p];
35
+ const [predicate, required] = isArray(config) ? config : [config, true];
36
+ if (!(p in value)) {
37
+ return !required;
38
+ }
39
+ return predicate(value[p]);
40
+ });
41
+ }, type);
42
+ };
26
43
  exports.arrayOf = arrayOf;
27
44
  exports.isArray = isArray;
28
45
  exports.isBoolean = isBoolean;
29
46
  exports.isExactly = isExactly;
30
47
  exports.isNull = isNull;
31
48
  exports.isNumber = isNumber;
49
+ exports.isNumeric = isNumeric;
32
50
  exports.isObject = isObject;
51
+ exports.isShape = isShape;
33
52
  exports.isString = isString;
34
53
  exports.oneOf = oneOf;
35
54
  exports.withMeta = withMeta;
@@ -8,7 +8,17 @@ export declare const isBoolean: PredicateWithMeta<boolean>;
8
8
  export declare const isExactly: <T extends string | number>(expected: T) => PredicateWithMeta<T>;
9
9
  export declare const isNull: PredicateWithMeta<null>;
10
10
  export declare const isNumber: PredicateWithMeta<number>;
11
+ export declare const isNumeric: PredicateWithMeta<number | `${number}`>;
11
12
  export declare const isObject: PredicateWithMeta<object>;
12
13
  export declare const isString: PredicateWithMeta<string>;
14
+ export declare const isSymbol: PredicateWithMeta<string>;
13
15
  export declare const arrayOf: <T>(predicate: PredicateWithMeta<T>) => PredicateWithMeta<T[]>;
14
16
  export declare const oneOf: <T extends unknown[]>(...predicates: { [K in keyof T]: PredicateWithMeta<T[K]>; }) => PredicateWithMeta<T[number]>;
17
+ export type Shape<T extends object> = {
18
+ [K in keyof T]: [Predicate<T[K]>, boolean];
19
+ };
20
+ type ExtractType<T extends Shape<any>> = {
21
+ [K in keyof T]: T[K] extends [Predicate<infer U>, true] ? U : T[K] extends [Predicate<infer U>, false] ? U | undefined : never;
22
+ } extends infer O ? O : never;
23
+ export declare const isShape: <S extends Shape<any>>(shape: S, type?: string) => PredicateWithMeta<ExtractType<S>>;
24
+ export {};
@@ -8,8 +8,12 @@ const isExactly = (expected) => {
8
8
  };
9
9
  const isNull = withMeta((value) => value === null, "null");
10
10
  const isNumber = withMeta((value) => typeof value === "number", "number");
11
+ const isNumeric = withMeta((value) => {
12
+ return isNumber(value) || typeof value === "string" && !isNaN(Number(value));
13
+ }, "number | `${number}`");
11
14
  const isObject = withMeta((value) => typeof value === "object" && value !== null, "object");
12
15
  const isString = withMeta((value) => typeof value === "string", "string");
16
+ withMeta((value) => typeof value === "symbol", "symbol");
13
17
  const arrayOf = (predicate) => withMeta(
14
18
  (value) => {
15
19
  return isArray(value) && value.every(predicate);
@@ -22,15 +26,30 @@ const oneOf = (...predicates) => withMeta(
22
26
  },
23
27
  predicates.map((p) => p.type).join(" | ")
24
28
  );
29
+ const isShape = (shape, type = "object") => {
30
+ const properties = Object.keys(shape);
31
+ return withMeta((value) => {
32
+ return typeof value === "object" && value !== null && properties.every((p) => {
33
+ const config = shape[p];
34
+ const [predicate, required] = isArray(config) ? config : [config, true];
35
+ if (!(p in value)) {
36
+ return !required;
37
+ }
38
+ return predicate(value[p]);
39
+ });
40
+ }, type);
41
+ };
25
42
  export {
26
43
  arrayOf as a,
27
44
  isNull as b,
28
45
  isNumber as c,
29
46
  isExactly as d,
30
- isBoolean as e,
31
- isObject as f,
32
- isArray as g,
47
+ isShape as e,
48
+ isBoolean as f,
49
+ isNumeric as g,
50
+ isObject as h,
33
51
  isString as i,
52
+ isArray as j,
34
53
  oneOf as o,
35
54
  withMeta as w
36
55
  };
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const remote = require("../../remote.cjs");
4
+ const predicates = require("../../predicates.cjs.js");
5
+ const isDimensions = predicates.isShape({
6
+ L: [predicates.oneOf(predicates.isNumber, predicates.isNull), true],
7
+ W: [predicates.oneOf(predicates.isNumber, predicates.isNull), true],
8
+ H: [predicates.oneOf(predicates.isNumber, predicates.isNull), true]
9
+ });
10
+ const isMoney = predicates.isShape({
11
+ amount: [predicates.isNumber, true],
12
+ currency: [predicates.isString, true]
13
+ });
14
+ const isWeightUnit = predicates.oneOf(
15
+ predicates.isExactly("grams"),
16
+ predicates.isExactly("kilograms"),
17
+ predicates.isExactly("tons")
18
+ );
19
+ const isWeight = predicates.isShape({
20
+ value: [predicates.isNumber, true],
21
+ unit: [isWeightUnit, true]
22
+ });
23
+ const isProperty = predicates.isShape({
24
+ code: [predicates.isString, true],
25
+ name: [predicates.isString, true],
26
+ value: [predicates.isString, true]
27
+ });
28
+ const isDiscountType = predicates.oneOf(
29
+ predicates.isExactly("bonus_charge"),
30
+ predicates.isExactly("loyalty_event"),
31
+ predicates.isExactly("loyalty_level"),
32
+ predicates.isExactly("manual_order"),
33
+ predicates.isExactly("manual_product"),
34
+ predicates.isExactly("personal"),
35
+ predicates.isExactly("round")
36
+ );
37
+ const isDiscount = predicates.isShape({
38
+ type: [isDiscountType, true],
39
+ amount: [predicates.isNumber, true]
40
+ });
41
+ const isOffer = predicates.isShape({
42
+ id: [predicates.isNumber, true],
43
+ name: [predicates.isString, true],
44
+ image: [predicates.oneOf(predicates.isString, predicates.isNull), true],
45
+ dimensions: [isDimensions, true],
46
+ weight: [predicates.oneOf(isWeight, predicates.isNull), true],
47
+ article: [predicates.oneOf(predicates.isString, predicates.isNull), true],
48
+ barcode: [predicates.oneOf(predicates.isString, predicates.isNull), true],
49
+ properties: [predicates.arrayOf(isProperty), true],
50
+ unit: [predicates.oneOf(predicates.isString, predicates.isNull), true],
51
+ purchasePrice: [predicates.oneOf(isMoney, predicates.isNull), true]
52
+ });
53
+ const isPriceType = predicates.isShape({
54
+ id: [predicates.isNumber, true],
55
+ code: [predicates.isString, true],
56
+ name: [predicates.isString, true],
57
+ title: [predicates.isString, true],
58
+ default: [predicates.isBoolean, true],
59
+ currency: [predicates.isString, true]
60
+ });
61
+ const isProductType = predicates.oneOf(
62
+ predicates.isExactly("PRODUCT"),
63
+ predicates.isExactly("SERVICE")
64
+ );
65
+ const isProductGroup = predicates.isShape({
66
+ id: [predicates.isNumber, true],
67
+ name: [predicates.isString, true]
68
+ });
69
+ const isProduct = predicates.isShape({
70
+ id: [predicates.isNumber, true],
71
+ type: [isProductType, true],
72
+ name: [predicates.isString, true],
73
+ image: [predicates.oneOf(predicates.isString, predicates.isNull), true],
74
+ article: [predicates.oneOf(predicates.isString, predicates.isNull), true],
75
+ manufacturer: [predicates.oneOf(predicates.isString, predicates.isNull), true],
76
+ markable: [predicates.isBoolean, true],
77
+ groups: [predicates.arrayOf(isProductGroup), true],
78
+ unit: [predicates.oneOf(predicates.isString, predicates.isNull), true],
79
+ url: [predicates.oneOf(predicates.isString, predicates.isNull), true],
80
+ recommendationProviderType: [predicates.oneOf(
81
+ predicates.isExactly("NONE"),
82
+ predicates.isExactly("SERVICE"),
83
+ predicates.isExactly("SYSTEM")
84
+ ), true]
85
+ });
86
+ const isStatus = predicates.isShape({
87
+ id: [predicates.isNumber, true],
88
+ name: [predicates.isString, true],
89
+ isCancel: [predicates.isBoolean, false]
90
+ });
91
+ const isItem = predicates.isShape({
92
+ id: [predicates.oneOf(predicates.isNumber, predicates.isNull), true],
93
+ index: [predicates.isNumber, true],
94
+ type: [isProductType, true],
95
+ offer: [predicates.oneOf(isOffer, predicates.isNull), true],
96
+ product: [predicates.oneOf(isProduct, predicates.isNull), true],
97
+ properties: [predicates.arrayOf(isProperty), true],
98
+ quantity: [predicates.isNumber, true],
99
+ purchasePrice: [predicates.oneOf(isMoney, predicates.isNull), true],
100
+ initialPrice: [predicates.oneOf(isMoney, predicates.isNull), true],
101
+ priceType: [predicates.oneOf(isPriceType, predicates.isNull), true],
102
+ bonusesChargeTotal: [predicates.isNumber, true],
103
+ bonusesCreditTotal: [predicates.isNumber, true],
104
+ discounts: [predicates.arrayOf(isDiscount), true],
105
+ discountTotal: [predicates.isNumber, true],
106
+ vatRate: [predicates.oneOf(predicates.isExactly("none"), predicates.isNumeric), true],
107
+ vatSum: [predicates.isNumber, true],
108
+ comment: [predicates.isString, true],
109
+ status: [predicates.oneOf(isStatus, predicates.isNull), true]
110
+ }, "OrderItem");
111
+ const id = "order/card:items";
112
+ const schema = {
113
+ "items": {
114
+ accepts: predicates.arrayOf(isItem),
115
+ defaults: () => [],
116
+ readonly: true
117
+ }
118
+ };
119
+ const useContext = remote.defineContext(id, schema);
120
+ exports.schema = schema;
121
+ exports.useContext = useContext;
@@ -0,0 +1,12 @@
1
+ import { schema } from '../../common/order/card-items';
2
+ import { StoreDefinition } from 'pinia';
3
+ import { Context, TypeOf, RejectionHandler } from '@retailcrm/embed-ui-v1-types/context';
4
+ import { Schema } from '../../../types/order/card-items';
5
+ import { Maybe } from '@retailcrm/embed-ui-v1-types/scaffolding';
6
+ export { schema };
7
+ export declare const useContext: StoreDefinition<"order/card:items", Context<Schema>, {
8
+ schema: () => Schema;
9
+ }, {
10
+ initialize(): Promise<void>;
11
+ set<F extends never>(field: F, value: TypeOf< Schema[F]>, onReject?: Maybe<RejectionHandler>): void;
12
+ }>;
@@ -0,0 +1,121 @@
1
+ import { defineContext } from "../../remote.js";
2
+ import { e as isShape, o as oneOf, d as isExactly, c as isNumber, i as isString, a as arrayOf, f as isBoolean, b as isNull, g as isNumeric } from "../../predicates.es.js";
3
+ const isDimensions = isShape({
4
+ L: [oneOf(isNumber, isNull), true],
5
+ W: [oneOf(isNumber, isNull), true],
6
+ H: [oneOf(isNumber, isNull), true]
7
+ });
8
+ const isMoney = isShape({
9
+ amount: [isNumber, true],
10
+ currency: [isString, true]
11
+ });
12
+ const isWeightUnit = oneOf(
13
+ isExactly("grams"),
14
+ isExactly("kilograms"),
15
+ isExactly("tons")
16
+ );
17
+ const isWeight = isShape({
18
+ value: [isNumber, true],
19
+ unit: [isWeightUnit, true]
20
+ });
21
+ const isProperty = isShape({
22
+ code: [isString, true],
23
+ name: [isString, true],
24
+ value: [isString, true]
25
+ });
26
+ const isDiscountType = oneOf(
27
+ isExactly("bonus_charge"),
28
+ isExactly("loyalty_event"),
29
+ isExactly("loyalty_level"),
30
+ isExactly("manual_order"),
31
+ isExactly("manual_product"),
32
+ isExactly("personal"),
33
+ isExactly("round")
34
+ );
35
+ const isDiscount = isShape({
36
+ type: [isDiscountType, true],
37
+ amount: [isNumber, true]
38
+ });
39
+ const isOffer = isShape({
40
+ id: [isNumber, true],
41
+ name: [isString, true],
42
+ image: [oneOf(isString, isNull), true],
43
+ dimensions: [isDimensions, true],
44
+ weight: [oneOf(isWeight, isNull), true],
45
+ article: [oneOf(isString, isNull), true],
46
+ barcode: [oneOf(isString, isNull), true],
47
+ properties: [arrayOf(isProperty), true],
48
+ unit: [oneOf(isString, isNull), true],
49
+ purchasePrice: [oneOf(isMoney, isNull), true]
50
+ });
51
+ const isPriceType = isShape({
52
+ id: [isNumber, true],
53
+ code: [isString, true],
54
+ name: [isString, true],
55
+ title: [isString, true],
56
+ default: [isBoolean, true],
57
+ currency: [isString, true]
58
+ });
59
+ const isProductType = oneOf(
60
+ isExactly("PRODUCT"),
61
+ isExactly("SERVICE")
62
+ );
63
+ const isProductGroup = isShape({
64
+ id: [isNumber, true],
65
+ name: [isString, true]
66
+ });
67
+ const isProduct = isShape({
68
+ id: [isNumber, true],
69
+ type: [isProductType, true],
70
+ name: [isString, true],
71
+ image: [oneOf(isString, isNull), true],
72
+ article: [oneOf(isString, isNull), true],
73
+ manufacturer: [oneOf(isString, isNull), true],
74
+ markable: [isBoolean, true],
75
+ groups: [arrayOf(isProductGroup), true],
76
+ unit: [oneOf(isString, isNull), true],
77
+ url: [oneOf(isString, isNull), true],
78
+ recommendationProviderType: [oneOf(
79
+ isExactly("NONE"),
80
+ isExactly("SERVICE"),
81
+ isExactly("SYSTEM")
82
+ ), true]
83
+ });
84
+ const isStatus = isShape({
85
+ id: [isNumber, true],
86
+ name: [isString, true],
87
+ isCancel: [isBoolean, false]
88
+ });
89
+ const isItem = isShape({
90
+ id: [oneOf(isNumber, isNull), true],
91
+ index: [isNumber, true],
92
+ type: [isProductType, true],
93
+ offer: [oneOf(isOffer, isNull), true],
94
+ product: [oneOf(isProduct, isNull), true],
95
+ properties: [arrayOf(isProperty), true],
96
+ quantity: [isNumber, true],
97
+ purchasePrice: [oneOf(isMoney, isNull), true],
98
+ initialPrice: [oneOf(isMoney, isNull), true],
99
+ priceType: [oneOf(isPriceType, isNull), true],
100
+ bonusesChargeTotal: [isNumber, true],
101
+ bonusesCreditTotal: [isNumber, true],
102
+ discounts: [arrayOf(isDiscount), true],
103
+ discountTotal: [isNumber, true],
104
+ vatRate: [oneOf(isExactly("none"), isNumeric), true],
105
+ vatSum: [isNumber, true],
106
+ comment: [isString, true],
107
+ status: [oneOf(isStatus, isNull), true]
108
+ }, "OrderItem");
109
+ const id = "order/card:items";
110
+ const schema = {
111
+ "items": {
112
+ accepts: arrayOf(isItem),
113
+ defaults: () => [],
114
+ readonly: true
115
+ }
116
+ };
117
+ const useContext = defineContext(id, schema);
118
+ export {
119
+ schema,
120
+ useContext
121
+ };
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const remote = require("../../remote.cjs");
4
+ const predicates = require("../../predicates.cjs.js");
5
+ const id = "order/card:settings";
6
+ const schema = {
7
+ "changePriceTypeByPriority": {
8
+ accepts: predicates.isBoolean,
9
+ defaults: () => false,
10
+ readonly: true
11
+ },
12
+ "changePriceTypeIfUnavailable": {
13
+ accepts: predicates.isBoolean,
14
+ defaults: () => false,
15
+ readonly: true
16
+ },
17
+ "defaultUnit": {
18
+ accepts: predicates.oneOf(predicates.isString, predicates.isNull),
19
+ defaults: () => null,
20
+ readonly: true
21
+ },
22
+ "duplicatesAllowed": {
23
+ accepts: predicates.isBoolean,
24
+ defaults: () => false,
25
+ readonly: true
26
+ },
27
+ "quantityIsFractional": {
28
+ accepts: predicates.isBoolean,
29
+ defaults: () => false,
30
+ readonly: true
31
+ },
32
+ "priceEditable": {
33
+ accepts: predicates.isBoolean,
34
+ defaults: () => false,
35
+ readonly: true
36
+ },
37
+ "productsRemoveAllowed": {
38
+ accepts: predicates.isBoolean,
39
+ defaults: () => true,
40
+ readonly: true
41
+ },
42
+ "productsMarkingEnabled": {
43
+ accepts: predicates.isBoolean,
44
+ defaults: () => false,
45
+ readonly: true
46
+ },
47
+ "propertiesToShow.additional": {
48
+ accepts: predicates.arrayOf(predicates.isString),
49
+ defaults: () => [],
50
+ readonly: true
51
+ },
52
+ "propertiesToShow.base": {
53
+ accepts: predicates.arrayOf(predicates.isString),
54
+ defaults: () => [],
55
+ readonly: true
56
+ },
57
+ "purchasePriceEditable": {
58
+ accepts: predicates.isBoolean,
59
+ defaults: () => false,
60
+ readonly: true
61
+ },
62
+ "purchasePriceVisible": {
63
+ accepts: predicates.isBoolean,
64
+ defaults: () => false,
65
+ readonly: true
66
+ },
67
+ "reserveDeliveryNoteEditable": {
68
+ accepts: predicates.isBoolean,
69
+ defaults: () => false,
70
+ readonly: true
71
+ },
72
+ "reserveInvoiceEditable": {
73
+ accepts: predicates.isBoolean,
74
+ defaults: () => false,
75
+ readonly: true
76
+ },
77
+ "reserveShipmentDateEditable": {
78
+ accepts: predicates.isBoolean,
79
+ defaults: () => false,
80
+ readonly: true
81
+ },
82
+ "reserveTelephonyEnabled": {
83
+ accepts: predicates.isBoolean,
84
+ defaults: () => false,
85
+ readonly: true
86
+ },
87
+ "showArticle": {
88
+ accepts: predicates.isBoolean,
89
+ defaults: () => true,
90
+ readonly: true
91
+ },
92
+ "showPriceTypes": {
93
+ accepts: predicates.isBoolean,
94
+ defaults: () => false,
95
+ readonly: true
96
+ },
97
+ "useStores": {
98
+ accepts: predicates.isBoolean,
99
+ defaults: () => true,
100
+ readonly: true
101
+ },
102
+ "useReserve": {
103
+ accepts: predicates.isBoolean,
104
+ defaults: () => true,
105
+ readonly: true
106
+ }
107
+ };
108
+ const useContext = remote.defineContext(id, schema);
109
+ exports.schema = schema;
110
+ exports.useContext = useContext;
@@ -0,0 +1,12 @@
1
+ import { schema } from '../../common/order/card-settings';
2
+ import { StoreDefinition } from 'pinia';
3
+ import { Context, TypeOf, RejectionHandler } from '@retailcrm/embed-ui-v1-types/context';
4
+ import { Schema } from '../../../types/order/card-settings';
5
+ import { Maybe } from '@retailcrm/embed-ui-v1-types/scaffolding';
6
+ export { schema };
7
+ export declare const useContext: StoreDefinition<"order/card:settings", Context<Schema>, {
8
+ schema: () => Schema;
9
+ }, {
10
+ initialize(): Promise<void>;
11
+ set<F extends never>(field: F, value: TypeOf< Schema[F]>, onReject?: Maybe<RejectionHandler>): void;
12
+ }>;
@@ -0,0 +1,110 @@
1
+ import { defineContext } from "../../remote.js";
2
+ import { f as isBoolean, o as oneOf, a as arrayOf, b as isNull, i as isString } from "../../predicates.es.js";
3
+ const id = "order/card:settings";
4
+ const schema = {
5
+ "changePriceTypeByPriority": {
6
+ accepts: isBoolean,
7
+ defaults: () => false,
8
+ readonly: true
9
+ },
10
+ "changePriceTypeIfUnavailable": {
11
+ accepts: isBoolean,
12
+ defaults: () => false,
13
+ readonly: true
14
+ },
15
+ "defaultUnit": {
16
+ accepts: oneOf(isString, isNull),
17
+ defaults: () => null,
18
+ readonly: true
19
+ },
20
+ "duplicatesAllowed": {
21
+ accepts: isBoolean,
22
+ defaults: () => false,
23
+ readonly: true
24
+ },
25
+ "quantityIsFractional": {
26
+ accepts: isBoolean,
27
+ defaults: () => false,
28
+ readonly: true
29
+ },
30
+ "priceEditable": {
31
+ accepts: isBoolean,
32
+ defaults: () => false,
33
+ readonly: true
34
+ },
35
+ "productsRemoveAllowed": {
36
+ accepts: isBoolean,
37
+ defaults: () => true,
38
+ readonly: true
39
+ },
40
+ "productsMarkingEnabled": {
41
+ accepts: isBoolean,
42
+ defaults: () => false,
43
+ readonly: true
44
+ },
45
+ "propertiesToShow.additional": {
46
+ accepts: arrayOf(isString),
47
+ defaults: () => [],
48
+ readonly: true
49
+ },
50
+ "propertiesToShow.base": {
51
+ accepts: arrayOf(isString),
52
+ defaults: () => [],
53
+ readonly: true
54
+ },
55
+ "purchasePriceEditable": {
56
+ accepts: isBoolean,
57
+ defaults: () => false,
58
+ readonly: true
59
+ },
60
+ "purchasePriceVisible": {
61
+ accepts: isBoolean,
62
+ defaults: () => false,
63
+ readonly: true
64
+ },
65
+ "reserveDeliveryNoteEditable": {
66
+ accepts: isBoolean,
67
+ defaults: () => false,
68
+ readonly: true
69
+ },
70
+ "reserveInvoiceEditable": {
71
+ accepts: isBoolean,
72
+ defaults: () => false,
73
+ readonly: true
74
+ },
75
+ "reserveShipmentDateEditable": {
76
+ accepts: isBoolean,
77
+ defaults: () => false,
78
+ readonly: true
79
+ },
80
+ "reserveTelephonyEnabled": {
81
+ accepts: isBoolean,
82
+ defaults: () => false,
83
+ readonly: true
84
+ },
85
+ "showArticle": {
86
+ accepts: isBoolean,
87
+ defaults: () => true,
88
+ readonly: true
89
+ },
90
+ "showPriceTypes": {
91
+ accepts: isBoolean,
92
+ defaults: () => false,
93
+ readonly: true
94
+ },
95
+ "useStores": {
96
+ accepts: isBoolean,
97
+ defaults: () => true,
98
+ readonly: true
99
+ },
100
+ "useReserve": {
101
+ accepts: isBoolean,
102
+ defaults: () => true,
103
+ readonly: true
104
+ }
105
+ };
106
+ const useContext = defineContext(id, schema);
107
+ export {
108
+ schema,
109
+ useContext
110
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineContext } from "../remote.js";
2
- import { a as arrayOf, o as oneOf, i as isString, d as isExactly, w as withMeta, e as isBoolean, f as isObject, g as isArray } from "../predicates.es.js";
2
+ import { a as arrayOf, o as oneOf, i as isString, d as isExactly, w as withMeta, f as isBoolean, h as isObject, j as isArray } from "../predicates.es.js";
3
3
  import { k as keysOf } from "../utilities.es.js";
4
4
  const id = "settings";
5
5
  const locales = ["en-GB", "es-ES", "ru-RU"];
@@ -1,5 +1,5 @@
1
1
  import { defineContext } from "../../remote.js";
2
- import { o as oneOf, i as isString, a as arrayOf, e as isBoolean, b as isNull, c as isNumber } from "../../predicates.es.js";
2
+ import { o as oneOf, i as isString, a as arrayOf, f as isBoolean, b as isNull, c as isNumber } from "../../predicates.es.js";
3
3
  const id = "user/current";
4
4
  const schema = {
5
5
  "id": {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@retailcrm/embed-ui-v1-contexts",
3
3
  "description": "Reactive contexts for RetailCRM JS API",
4
4
  "type": "module",
5
- "version": "0.5.21",
5
+ "version": "0.5.23-alpha.1",
6
6
  "license": "MIT",
7
7
  "author": "RetailDriverLLC <integration@retailcrm.ru>",
8
8
  "repository": "git@github.com:retailcrm/embed-ui.git",
@@ -20,23 +20,17 @@
20
20
  "require": "./dist/remote.cjs",
21
21
  "default": "./dist/remote.js"
22
22
  },
23
- "./remote/customer/card": {
24
- "types": "./dist/remote/customer/card.d.ts",
25
- "import": "./dist/remote/customer/card.js",
26
- "require": "./dist/remote/customer/card.cjs",
27
- "default": "./dist/remote/customer/card.js"
23
+ "./remote/customer/*": {
24
+ "types": "./dist/remote/customer/*.d.ts",
25
+ "import": "./dist/remote/customer/*.js",
26
+ "require": "./dist/remote/customer/*.cjs",
27
+ "default": "./dist/remote/customer/*.js"
28
28
  },
29
- "./remote/customer/card-phone": {
30
- "types": "./dist/remote/customer/card-phone.d.ts",
31
- "import": "./dist/remote/customer/card-phone.js",
32
- "require": "./dist/remote/customer/card-phone.cjs",
33
- "default": "./dist/remote/customer/card-phone.js"
34
- },
35
- "./remote/order/card": {
36
- "types": "./dist/remote/order/card.d.ts",
37
- "import": "./dist/remote/order/card.js",
38
- "require": "./dist/remote/order/card.cjs",
39
- "default": "./dist/remote/order/card.js"
29
+ "./remote/order/*": {
30
+ "types": "./dist/remote/order/*.d.ts",
31
+ "import": "./dist/remote/order/*.js",
32
+ "require": "./dist/remote/order/*.cjs",
33
+ "default": "./dist/remote/order/*.js"
40
34
  },
41
35
  "./remote/user/current": {
42
36
  "types": "./dist/remote/user/current.d.ts",
@@ -75,6 +69,12 @@
75
69
  "remote/order/card": [
76
70
  "./dist/remote/order/card.d.ts"
77
71
  ],
72
+ "remote/order/card-items": [
73
+ "./dist/remote/order/card-items.d.ts"
74
+ ],
75
+ "remote/order/card-settings": [
76
+ "./dist/remote/order/card-settings.d.ts"
77
+ ],
78
78
  "remote/user/current": [
79
79
  "./dist/remote/user/current.d.ts"
80
80
  ],
@@ -102,11 +102,13 @@
102
102
  "pinia": "^2.2"
103
103
  },
104
104
  "dependencies": {
105
+ "@floating-ui/core": "^1.6.9",
106
+ "@floating-ui/dom": "^1.6.13",
105
107
  "@omnicajs/symfony-router": "^1.0.0",
106
- "@retailcrm/embed-ui-v1-types": "^0.5.21"
108
+ "@retailcrm/embed-ui-v1-types": "^0.5.23-alpha.1"
107
109
  },
108
110
  "devDependencies": {
109
- "@retailcrm/embed-ui-v1-testing": "^0.5.21",
111
+ "@retailcrm/embed-ui-v1-testing": "^0.5.23-alpha.1",
110
112
  "tsx": "^4.19.2",
111
113
  "typescript": "^5.6.3",
112
114
  "vite": "^5.4.11",
package/types/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import type { Schema as CustomerCardSchema } from './customer/card'
2
2
  import type { Schema as CustomerCardPhoneSchema } from './customer/card-phone'
3
3
  import type { Schema as OrderCardSchema } from './order/card'
4
+ import type { Schema as OrderCardSettingsSchema } from './order/card-settings'
4
5
  import type { Schema as CurrentUserSchema } from './user/current'
5
6
  import type { Schema as SettingsSchema } from './settings'
6
7
 
@@ -8,6 +9,7 @@ export type SchemaList = {
8
9
  'customer/card': CustomerCardSchema;
9
10
  'customer/card:phone': CustomerCardPhoneSchema;
10
11
  'order/card': OrderCardSchema;
12
+ 'order/card:settings': OrderCardSettingsSchema;
11
13
  'user/current': CurrentUserSchema;
12
14
  'settings': SettingsSchema;
13
15
  }
@@ -0,0 +1,102 @@
1
+ import type {
2
+ Dimensions,
3
+ Money,
4
+ Weight,
5
+ } from '@retailcrm/embed-ui-v1-types/domain'
6
+
7
+ import type { ReadonlyField } from '@retailcrm/embed-ui-v1-types/context'
8
+
9
+ export type DiscountType =
10
+ | 'bonus_charge'
11
+ | 'loyalty_event'
12
+ | 'loyalty_level'
13
+ | 'manual_order'
14
+ | 'manual_product'
15
+ | 'personal'
16
+ | 'round'
17
+
18
+ export type Discount = {
19
+ type: DiscountType;
20
+ amount: number;
21
+ }
22
+
23
+ export type PriceType = {
24
+ id: number;
25
+ code: string;
26
+ name: string;
27
+ title: string;
28
+ default: boolean;
29
+ currency: string;
30
+ }
31
+
32
+ export type Property = {
33
+ code: string;
34
+ name: string;
35
+ value: string;
36
+ }
37
+
38
+ export type Offer = {
39
+ id: number;
40
+ name: string;
41
+ image: string | null;
42
+ dimensions: Dimensions;
43
+ weight: Weight | null,
44
+ article: string | null;
45
+ barcode: string | null;
46
+ properties: Property[];
47
+ unit: string | null;
48
+ purchasePrice: Money | null;
49
+ }
50
+
51
+ export type Product = {
52
+ id: number;
53
+ type: 'PRODUCT' | 'SERVICE';
54
+ name: string;
55
+ image: string | null;
56
+ article: string | null;
57
+ manufacturer: string | null;
58
+ markable: boolean;
59
+ groups: ProductGroup[];
60
+ unit: string | null;
61
+ url: string | null;
62
+ recommendationProviderType: 'NONE' | 'SERVICE' | 'SYSTEM';
63
+ }
64
+
65
+ export type ProductGroup = {
66
+ id: number;
67
+ name: string;
68
+ }
69
+
70
+ export type OrderItem = {
71
+ id: number | null;
72
+ /** Temporal ID to identify items while editing */
73
+ index: number;
74
+ type: 'PRODUCT' | 'SERVICE';
75
+ offer: Offer | null;
76
+ product: Product | null;
77
+ properties: Property[];
78
+ quantity: number;
79
+ purchasePrice: Money | null;
80
+ initialPrice: Money | null;
81
+ priceType: PriceType | null;
82
+ /** Number of debited bonuses */
83
+ bonusesChargeTotal: number;
84
+ /** Number of accrued bonuses */
85
+ bonusesCreditTotal: number;
86
+ discounts: Discount[];
87
+ discountTotal: number;
88
+ vatRate: 'none' | number | `${number}`
89
+ vatSum: number;
90
+ comment: string;
91
+ status: OrderItemStatus | null;
92
+ }
93
+
94
+ export type OrderItemStatus = {
95
+ id: number;
96
+ name: string;
97
+ isCancel?: boolean;
98
+ }
99
+
100
+ export type Schema = {
101
+ 'items': ReadonlyField<ReadonlyArray<Readonly<OrderItem>>>;
102
+ }
@@ -0,0 +1,24 @@
1
+ import type { ReadonlyField } from '@retailcrm/embed-ui-v1-types/context'
2
+
3
+ export type Schema = {
4
+ 'changePriceTypeByPriority': ReadonlyField<boolean>;
5
+ 'changePriceTypeIfUnavailable': ReadonlyField<boolean>;
6
+ 'defaultUnit': ReadonlyField<string | null>;
7
+ 'duplicatesAllowed': ReadonlyField<boolean>;
8
+ 'quantityIsFractional': ReadonlyField<boolean>;
9
+ 'priceEditable': ReadonlyField<boolean>;
10
+ 'productsRemoveAllowed': ReadonlyField<boolean>;
11
+ 'productsMarkingEnabled': ReadonlyField<boolean>;
12
+ 'propertiesToShow.additional': ReadonlyField<string[]>;
13
+ 'propertiesToShow.base': ReadonlyField<string[]>;
14
+ 'purchasePriceEditable': ReadonlyField<boolean>;
15
+ 'purchasePriceVisible': ReadonlyField<boolean>;
16
+ 'reserveDeliveryNoteEditable': ReadonlyField<boolean>;
17
+ 'reserveInvoiceEditable': ReadonlyField<boolean>;
18
+ 'reserveShipmentDateEditable': ReadonlyField<boolean>;
19
+ 'reserveTelephonyEnabled': ReadonlyField<boolean>;
20
+ 'showArticle': ReadonlyField<boolean>;
21
+ 'showPriceTypes': ReadonlyField<boolean>;
22
+ 'useStores': ReadonlyField<boolean>;
23
+ 'useReserve': ReadonlyField<boolean>;
24
+ }