@snabcentr/common-lib 1.58.2 → 1.59.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.
- package/dist/manifest.json +1 -1
- package/dist/release_notes.tmp +3 -3
- package/dist/sc-common-lib.js +335 -266
- package/dist/sc-common-lib.js.map +1 -1
- package/dist/sc-common-lib.umd.cjs +1 -1
- package/dist/sc-common-lib.umd.cjs.map +1 -1
- package/dist/src/catalog/classes/index.d.ts +1 -0
- package/dist/src/catalog/classes/index.d.ts.map +1 -1
- package/dist/src/catalog/classes/templates-list-filters.d.ts +45 -0
- package/dist/src/catalog/classes/templates-list-filters.d.ts.map +1 -0
- package/dist/src/catalog/interfaces/i-templates-list-filters.d.ts +28 -0
- package/dist/src/catalog/interfaces/i-templates-list-filters.d.ts.map +1 -0
- package/dist/src/catalog/interfaces/index.d.ts +1 -0
- package/dist/src/catalog/interfaces/index.d.ts.map +1 -1
- package/dist/src/catalog/providers/price-template-provider.d.ts +9 -4
- package/dist/src/catalog/providers/price-template-provider.d.ts.map +1 -1
- package/dist/src/clients/interfaces/i-clients-list-filters.d.ts +2 -6
- package/dist/src/clients/interfaces/i-clients-list-filters.d.ts.map +1 -1
- package/dist/src/pagination/filters/i-pagination-filters-base.d.ts +17 -0
- package/dist/src/pagination/filters/i-pagination-filters-base.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/sc-common-lib.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var tr = Object.defineProperty;
|
|
2
2
|
var sr = (n, r, e) => r in n ? tr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
3
|
var t = (n, r, e) => sr(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
-
import { toUpper as ir, constant as nr, isUndefined as or, isString as m, cloneDeep as cr, noop as y, toLower as lr,
|
|
5
|
-
import { parseISO as f, format as
|
|
6
|
-
import
|
|
7
|
-
import { objectToSnake as
|
|
4
|
+
import { toUpper as ir, constant as nr, isUndefined as or, isString as m, cloneDeep as cr, noop as y, toLower as lr, isNil as _e, isFunction as Se, map as oe, forEach as pr, isDate as ur, isEmpty as hr } from "lodash-es";
|
|
5
|
+
import { parseISO as f, format as B, addSeconds as gr, isAfter as mr, startOfToday as Fe, addBusinessDays as fr, endOfTomorrow as yr, startOfTomorrow as wr, endOfYesterday as Cr, startOfYesterday as vr, endOfToday as Pr, endOfDay as Rr, startOfDay as Dr } from "date-fns";
|
|
6
|
+
import Ar from "axios";
|
|
7
|
+
import { objectToSnake as ke, objectToCamel as $r } from "ts-case-convert";
|
|
8
8
|
import { defineStore as ge } from "pinia";
|
|
9
9
|
import { ref as C, computed as v } from "vue";
|
|
10
|
-
class
|
|
10
|
+
class H {
|
|
11
11
|
/**
|
|
12
12
|
* Инициализирует экземпляр класса {@link Identity}.
|
|
13
13
|
*
|
|
@@ -31,7 +31,7 @@ class d {
|
|
|
31
31
|
return this.id === -1;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
class D extends
|
|
34
|
+
class D extends H {
|
|
35
35
|
/**
|
|
36
36
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
37
37
|
*
|
|
@@ -139,7 +139,7 @@ class me extends w {
|
|
|
139
139
|
return { id: -2, slug: ze.Retail, name: "Розн. цена", guid: "", isNewRec: nr(!0) };
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
class
|
|
142
|
+
class Le {
|
|
143
143
|
/**
|
|
144
144
|
* Инициализирует экземпляр класса {@link ProductPriceCoefficient}.
|
|
145
145
|
*
|
|
@@ -239,23 +239,23 @@ class Tr {
|
|
|
239
239
|
this.warehouse = new fe(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
240
240
|
}
|
|
241
241
|
}
|
|
242
|
-
const
|
|
242
|
+
const j = class j {
|
|
243
243
|
/**
|
|
244
244
|
* Инициализирует и возвращает конфигурацию приложения.
|
|
245
245
|
*
|
|
246
246
|
* @param config Данные для первоначальной инициализации.
|
|
247
247
|
*/
|
|
248
248
|
static init(r) {
|
|
249
|
-
|
|
249
|
+
j.config = r;
|
|
250
250
|
}
|
|
251
251
|
/**
|
|
252
252
|
* Возвращает текущую конфигурацию приложения.
|
|
253
253
|
*/
|
|
254
254
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
255
255
|
static getConfig() {
|
|
256
|
-
if (or(
|
|
256
|
+
if (or(j.config))
|
|
257
257
|
throw new Error("Config is undefined. Please set config by AppConfigProvider.init().");
|
|
258
|
-
return
|
|
258
|
+
return j.config;
|
|
259
259
|
}
|
|
260
260
|
/**
|
|
261
261
|
* Выполняет загрузку конфигурации по указанному пути.
|
|
@@ -274,8 +274,8 @@ const W = class W {
|
|
|
274
274
|
/**
|
|
275
275
|
* Конфигурация приложения.
|
|
276
276
|
*/
|
|
277
|
-
t(
|
|
278
|
-
let T =
|
|
277
|
+
t(j, "config");
|
|
278
|
+
let T = j;
|
|
279
279
|
class br extends He {
|
|
280
280
|
/**
|
|
281
281
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
@@ -393,7 +393,7 @@ class _ extends br {
|
|
|
393
393
|
t(this, "priceCoefficients");
|
|
394
394
|
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = (e == null ? void 0 : e.unit) ?? "", this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.quantityUnit = e == null ? void 0 : e.quantityUnit, this.currency = (e == null ? void 0 : e.currency) ?? "", this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = m(e == null ? void 0 : e.costDate) ? f(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((g) => new Tr(g))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
|
|
395
395
|
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((g) => g.isPrimary));
|
|
396
|
-
s && (this.category = new De({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((g) => new De(g))), this.images = ((l = e == null ? void 0 : e.images) == null ? void 0 : l.map((g) => new _r(g, T.getConfig().http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.priceCoefficients = ((p = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : p.map((g) => new
|
|
396
|
+
s && (this.category = new De({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((g) => new De(g))), this.images = ((l = e == null ? void 0 : e.images) == null ? void 0 : l.map((g) => new _r(g, T.getConfig().http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.priceCoefficients = ((p = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : p.map((g) => new Le(g))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
397
397
|
}
|
|
398
398
|
/**
|
|
399
399
|
* Возвращает признак, что это измеряемый товар.
|
|
@@ -403,7 +403,7 @@ class _ extends br {
|
|
|
403
403
|
return [...e.linear, ...e.square].includes(this.unit);
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
|
-
class Sr extends
|
|
406
|
+
class Sr extends H {
|
|
407
407
|
/**
|
|
408
408
|
* Инициализирует экземпляр класса {@link CartItemBase}.
|
|
409
409
|
*
|
|
@@ -458,7 +458,7 @@ class Sr extends d {
|
|
|
458
458
|
this.product = new _(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new se(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && cr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
class
|
|
461
|
+
class Lr extends Sr {
|
|
462
462
|
/**
|
|
463
463
|
* Инициализирует экземпляр класса {@link CartItem}.
|
|
464
464
|
*
|
|
@@ -527,10 +527,10 @@ class ne {
|
|
|
527
527
|
* Список итоговых сумм по направлениям продаж.
|
|
528
528
|
*/
|
|
529
529
|
t(this, "directionsSum");
|
|
530
|
-
this.items = r.items.map((e) => new
|
|
530
|
+
this.items = r.items.map((e) => new Lr(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
|
-
class
|
|
533
|
+
class ar {
|
|
534
534
|
/**
|
|
535
535
|
* Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
|
|
536
536
|
*
|
|
@@ -697,7 +697,7 @@ class ft {
|
|
|
697
697
|
*/
|
|
698
698
|
t(this, "minSearchTermLength");
|
|
699
699
|
var e, s, i;
|
|
700
|
-
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.currentDomain = (r == null ? void 0 : r.currentDomain) ?? "", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new Ir(r == null ? void 0 : r.http), this.deviceTypeByResolution = new
|
|
700
|
+
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.currentDomain = (r == null ? void 0 : r.currentDomain) ?? "", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new Ir(r == null ? void 0 : r.http), this.deviceTypeByResolution = new ar(r == null ? void 0 : r.deviceTypeByResolution), this.products = {
|
|
701
701
|
units: {
|
|
702
702
|
linear: ["пог.м.", "м."],
|
|
703
703
|
square: ["м2"]
|
|
@@ -713,7 +713,7 @@ class ft {
|
|
|
713
713
|
}, this.minSearchTermLength = (r == null ? void 0 : r.minSearchTermLength) ?? 3, r != null && r.themes && (this.themes = r.themes);
|
|
714
714
|
}
|
|
715
715
|
}
|
|
716
|
-
class
|
|
716
|
+
class ae {
|
|
717
717
|
/**
|
|
718
718
|
* Инициализирует экземпляр указанного класса.
|
|
719
719
|
*
|
|
@@ -732,7 +732,7 @@ class Se {
|
|
|
732
732
|
return new r(e);
|
|
733
733
|
}
|
|
734
734
|
}
|
|
735
|
-
const
|
|
735
|
+
const L = class L {
|
|
736
736
|
/**
|
|
737
737
|
* Инициализирует экземпляр класса {@link HttpRequester}.
|
|
738
738
|
*
|
|
@@ -753,22 +753,22 @@ const a = class a {
|
|
|
753
753
|
*/
|
|
754
754
|
t(this, "defaultInstanceNotificationErrorResponseHandler", y);
|
|
755
755
|
const s = T.getConfig().version;
|
|
756
|
-
this.defaultInstanceNotificationErrorResponseHandler =
|
|
756
|
+
this.defaultInstanceNotificationErrorResponseHandler = L.baseDefaultNotificationErrorResponseHandler, this.httpClient = Ar.create({
|
|
757
757
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
758
758
|
baseURL: r,
|
|
759
759
|
headers: {
|
|
760
|
-
"APP-VERSION": `${s.name} (${s.version}, ${
|
|
760
|
+
"APP-VERSION": `${s.name} (${s.version}, ${B(s.date, T.getConfig().dateFormats.api)})`,
|
|
761
761
|
Accept: "application/json",
|
|
762
762
|
"Content-Type": "application/json",
|
|
763
763
|
...e
|
|
764
764
|
}
|
|
765
765
|
}), this.httpClient.interceptors.request.use(
|
|
766
|
-
(i) => (i.method && (i.method === "get" && i.params && (i.params =
|
|
766
|
+
(i) => (i.method && (i.method === "get" && i.params && (i.params = ke(i.params)), ["put", "patch", "post"].includes(lr(i.method)) && i.data && (i.data = ke(i.data))), i),
|
|
767
767
|
(i) => Promise.reject(i)
|
|
768
768
|
), this.httpClient.interceptors.response.use(
|
|
769
|
-
(i) => (i.data && (i.data =
|
|
769
|
+
(i) => (i.data && (i.data = $r(i.data)), i),
|
|
770
770
|
// Возвращаем изменённую структуру сообщения об ошибке.
|
|
771
|
-
(i) =>
|
|
771
|
+
(i) => L.convertHttpErrorResponse(i)
|
|
772
772
|
);
|
|
773
773
|
}
|
|
774
774
|
/**
|
|
@@ -777,7 +777,7 @@ const a = class a {
|
|
|
777
777
|
* @param handler Ссылка на функцию-обработчик уведомлений об ошибках.
|
|
778
778
|
*/
|
|
779
779
|
static setBaseDefaultNotificationErrorResponseHandler(r) {
|
|
780
|
-
|
|
780
|
+
L.baseDefaultNotificationErrorResponseHandler = r;
|
|
781
781
|
}
|
|
782
782
|
/**
|
|
783
783
|
* Возвращает экземпляр объекта текущего класса.
|
|
@@ -785,7 +785,7 @@ const a = class a {
|
|
|
785
785
|
* @param type Тип данных, которыми оперирует метод.
|
|
786
786
|
*/
|
|
787
787
|
static getInstance(r) {
|
|
788
|
-
return Object.prototype.hasOwnProperty.call(
|
|
788
|
+
return Object.prototype.hasOwnProperty.call(L.instances, r.name) || (L.instances[r.name] = ae.simpleInstanceInitializer(r)), L.instances[r.name];
|
|
789
789
|
}
|
|
790
790
|
/**
|
|
791
791
|
* Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
|
|
@@ -880,16 +880,16 @@ const a = class a {
|
|
|
880
880
|
* Экземпляр объекта текущего класса.
|
|
881
881
|
*/
|
|
882
882
|
// eslint-disable-next-line no-use-before-define
|
|
883
|
-
t(
|
|
883
|
+
t(L, "instances", {}), /**
|
|
884
884
|
* Базовый обработчик по умолчанию используемый для отображения уведомлений и ошибок валидации всех ошибочных HTTP ответов на запросы.
|
|
885
885
|
*
|
|
886
886
|
* Параметры:
|
|
887
887
|
* - error Данные об ошибке.
|
|
888
888
|
* - validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
889
889
|
*/
|
|
890
|
-
t(
|
|
891
|
-
let
|
|
892
|
-
const
|
|
890
|
+
t(L, "baseDefaultNotificationErrorResponseHandler", y);
|
|
891
|
+
let Ae = L;
|
|
892
|
+
const V = class V extends Ae {
|
|
893
893
|
/**
|
|
894
894
|
* Инициализирует экземпляр класса {@link HttpBaseCachedRequester}.
|
|
895
895
|
*
|
|
@@ -912,7 +912,7 @@ const j = class j extends $e {
|
|
|
912
912
|
* @param url URL запроса.
|
|
913
913
|
*/
|
|
914
914
|
static getCachedResponse(e) {
|
|
915
|
-
const s =
|
|
915
|
+
const s = V.responseDataCache.get(e);
|
|
916
916
|
if (s && s.validTo > /* @__PURE__ */ new Date())
|
|
917
917
|
return s.val;
|
|
918
918
|
}
|
|
@@ -923,7 +923,7 @@ const j = class j extends $e {
|
|
|
923
923
|
* @param data Данные для кэширования.
|
|
924
924
|
*/
|
|
925
925
|
cacheResponse(e, s) {
|
|
926
|
-
|
|
926
|
+
V.responseDataCache.set(e, {
|
|
927
927
|
validTo: gr(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
|
|
928
928
|
val: s
|
|
929
929
|
});
|
|
@@ -938,9 +938,9 @@ const j = class j extends $e {
|
|
|
938
938
|
*/
|
|
939
939
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
940
940
|
getTypedDataArrayRequester(e, s, i = !1) {
|
|
941
|
-
const o = i ?
|
|
941
|
+
const o = i ? V.getCachedResponse(s) : void 0;
|
|
942
942
|
return o ? Promise.resolve(o) : this.get(s).then((l) => {
|
|
943
|
-
const p = l.map((g) =>
|
|
943
|
+
const p = l.map((g) => ae.instanceInitializer(e, g));
|
|
944
944
|
return i && p && this.cacheResponse(s, p), p;
|
|
945
945
|
});
|
|
946
946
|
}
|
|
@@ -948,9 +948,9 @@ const j = class j extends $e {
|
|
|
948
948
|
/**
|
|
949
949
|
* Кэш результатов запросов.
|
|
950
950
|
*/
|
|
951
|
-
t(
|
|
952
|
-
let
|
|
953
|
-
class u extends
|
|
951
|
+
t(V, "responseDataCache", /* @__PURE__ */ new Map());
|
|
952
|
+
let $e = V;
|
|
953
|
+
class u extends $e {
|
|
954
954
|
/**
|
|
955
955
|
* Инициализирует экземпляр класса {@link HttpRequester}.
|
|
956
956
|
*/
|
|
@@ -1063,8 +1063,8 @@ class yt extends u {
|
|
|
1063
1063
|
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, {}, (e) => new ne(e.data));
|
|
1064
1064
|
}
|
|
1065
1065
|
}
|
|
1066
|
-
var Nr = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(Nr || {}),
|
|
1067
|
-
class
|
|
1066
|
+
var Nr = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(Nr || {}), Ie = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(Ie || {}), Or = /* @__PURE__ */ ((n) => (n.Unknown = "unknown", n.Bool = "bool", n.Integer = "integer", n.Float = "float", n.String = "string", n.Range = "range", n.Json = "json", n.Object = "object", n))(Or || {});
|
|
1067
|
+
class U extends se {
|
|
1068
1068
|
/**
|
|
1069
1069
|
* Инициализирует экземпляр класса {@link Category}.
|
|
1070
1070
|
*
|
|
@@ -1081,7 +1081,7 @@ class q extends se {
|
|
|
1081
1081
|
* Список продуктов категории.
|
|
1082
1082
|
*/
|
|
1083
1083
|
t(this, "products");
|
|
1084
|
-
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new
|
|
1084
|
+
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new U(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new _(o));
|
|
1085
1085
|
}
|
|
1086
1086
|
}
|
|
1087
1087
|
var qr = /* @__PURE__ */ ((n) => (n.phone = "phone", n.tablet = "tablet", n.laptop = "laptop", n))(qr || {});
|
|
@@ -1126,7 +1126,7 @@ class wt {
|
|
|
1126
1126
|
if (e)
|
|
1127
1127
|
try {
|
|
1128
1128
|
const s = JSON.parse(e);
|
|
1129
|
-
if (mr(f(s.availableFor) ||
|
|
1129
|
+
if (mr(f(s.availableFor) || Fe(), /* @__PURE__ */ new Date()))
|
|
1130
1130
|
return s.data ?? {};
|
|
1131
1131
|
} catch {
|
|
1132
1132
|
localStorage.removeItem(r);
|
|
@@ -1149,7 +1149,7 @@ class wt {
|
|
|
1149
1149
|
);
|
|
1150
1150
|
}
|
|
1151
1151
|
}
|
|
1152
|
-
class
|
|
1152
|
+
class d extends D {
|
|
1153
1153
|
/**
|
|
1154
1154
|
* Инициализирует экземпляр класса {@link UserShortInfo}.
|
|
1155
1155
|
*
|
|
@@ -1164,7 +1164,7 @@ class U extends D {
|
|
|
1164
1164
|
this.type = e == null ? void 0 : e.type;
|
|
1165
1165
|
}
|
|
1166
1166
|
}
|
|
1167
|
-
class
|
|
1167
|
+
class dr extends D {
|
|
1168
1168
|
/**
|
|
1169
1169
|
* Инициализирует экземпляр класса {@link DiscountShortInfo}.
|
|
1170
1170
|
*
|
|
@@ -1200,10 +1200,10 @@ class Gr extends D {
|
|
|
1200
1200
|
* Дата и время удаления.
|
|
1201
1201
|
*/
|
|
1202
1202
|
t(this, "deletedAt");
|
|
1203
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = m(e == null ? void 0 : e.publishedAt) ? f(e.publishedAt) : e == null ? void 0 : e.publishedAt, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new
|
|
1203
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = m(e == null ? void 0 : e.publishedAt) ? f(e.publishedAt) : e == null ? void 0 : e.publishedAt, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new d(e == null ? void 0 : e.owner), this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? f(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1204
1204
|
}
|
|
1205
1205
|
}
|
|
1206
|
-
class
|
|
1206
|
+
class W extends We {
|
|
1207
1207
|
/**
|
|
1208
1208
|
* Инициализирует экземпляр класса {@link PriceTemplate}.
|
|
1209
1209
|
*
|
|
@@ -1222,7 +1222,7 @@ class B extends We {
|
|
|
1222
1222
|
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
|
|
1223
1223
|
}
|
|
1224
1224
|
}
|
|
1225
|
-
class
|
|
1225
|
+
class J extends _ {
|
|
1226
1226
|
/**
|
|
1227
1227
|
* Инициализирует экземпляр класса {@link ClientProduct}.
|
|
1228
1228
|
*
|
|
@@ -1258,10 +1258,10 @@ class E extends _ {
|
|
|
1258
1258
|
* Признак того, что указанный продукт входит в список избранных продуктов клиента.
|
|
1259
1259
|
*/
|
|
1260
1260
|
t(this, "isFavorite");
|
|
1261
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ??
|
|
1261
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? Ie.Product, this.discount = e != null && e.discount ? new dr(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new W(e.priceTemplate) : void 0, this.isPreviouslyOrdered = e == null ? void 0 : e.isPreviouslyOrdered, this.isRequired = e == null ? void 0 : e.isRequired, this.isFavorite = e == null ? void 0 : e.isFavorite;
|
|
1262
1262
|
}
|
|
1263
1263
|
}
|
|
1264
|
-
class
|
|
1264
|
+
class Gr {
|
|
1265
1265
|
/**
|
|
1266
1266
|
* Инициализирует экземпляр класса {@link ContactLinks}.
|
|
1267
1267
|
*
|
|
@@ -1305,7 +1305,7 @@ class ee extends D {
|
|
|
1305
1305
|
* Признак того, что менеджер является основным для клиента.
|
|
1306
1306
|
*/
|
|
1307
1307
|
t(this, "isDefault");
|
|
1308
|
-
e && (this.salesDirection = new S(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new
|
|
1308
|
+
e && (this.salesDirection = new S(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new Gr(e.contacts)), e.isDefault !== void 0 && (this.isDefault = e.isDefault));
|
|
1309
1309
|
}
|
|
1310
1310
|
}
|
|
1311
1311
|
class ye extends ee {
|
|
@@ -1339,7 +1339,7 @@ class ye extends ee {
|
|
|
1339
1339
|
this.isActive = (e == null ? void 0 : e.isActive) ?? !1, this.isSupervisor = (e == null ? void 0 : e.isSupervisor) ?? !1, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.createdAt = e == null ? void 0 : e.createdAt, this.supervisorId = e == null ? void 0 : e.supervisorId;
|
|
1340
1340
|
}
|
|
1341
1341
|
}
|
|
1342
|
-
class
|
|
1342
|
+
class Mr extends se {
|
|
1343
1343
|
/**
|
|
1344
1344
|
* Инициализирует экземпляр класса {@link BaseClientCategory}.
|
|
1345
1345
|
*
|
|
@@ -1370,7 +1370,7 @@ class Fr extends se {
|
|
|
1370
1370
|
this.isDisabled = (e == null ? void 0 : e.isDisabled) ?? !1, this.isRequired = (e == null ? void 0 : e.isRequired) ?? !1, this.isFavorite = (e == null ? void 0 : e.isFavorite) ?? !1, this.hidingComment = e == null ? void 0 : e.hidingComment, this.manager = e != null && e.manager ? new ye(e.manager) : void 0;
|
|
1371
1371
|
}
|
|
1372
1372
|
}
|
|
1373
|
-
class ce extends
|
|
1373
|
+
class ce extends Mr {
|
|
1374
1374
|
/**
|
|
1375
1375
|
* Инициализирует экземпляр класса {@link ClientCategory}.
|
|
1376
1376
|
*
|
|
@@ -1387,7 +1387,7 @@ class ce extends Fr {
|
|
|
1387
1387
|
* Список продуктов категории.
|
|
1388
1388
|
*/
|
|
1389
1389
|
t(this, "products");
|
|
1390
|
-
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new ce(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new
|
|
1390
|
+
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new ce(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new J(o));
|
|
1391
1391
|
}
|
|
1392
1392
|
}
|
|
1393
1393
|
class je {
|
|
@@ -1423,7 +1423,7 @@ class Ce extends je {
|
|
|
1423
1423
|
this.productCategory = new se(e == null ? void 0 : e.productCategory);
|
|
1424
1424
|
}
|
|
1425
1425
|
}
|
|
1426
|
-
class
|
|
1426
|
+
class Q extends w {
|
|
1427
1427
|
}
|
|
1428
1428
|
class re extends w {
|
|
1429
1429
|
/**
|
|
@@ -1436,8 +1436,8 @@ class re extends w {
|
|
|
1436
1436
|
/**
|
|
1437
1437
|
* Данные о стране, в которой расположен регион.
|
|
1438
1438
|
*/
|
|
1439
|
-
t(this, "country", new
|
|
1440
|
-
e && (this.country = new
|
|
1439
|
+
t(this, "country", new Q());
|
|
1440
|
+
e && (this.country = new Q(e.country));
|
|
1441
1441
|
}
|
|
1442
1442
|
}
|
|
1443
1443
|
class le extends w {
|
|
@@ -1539,7 +1539,7 @@ class ie extends Ve {
|
|
|
1539
1539
|
this.salesDirection = new S(e == null ? void 0 : e.salesDirection), this.debt = (e == null ? void 0 : e.debt) ?? 0, this.alternativeName = (e == null ? void 0 : e.alternativeName) ?? "", this.city = new le(e == null ? void 0 : e.city), this.comment = e == null ? void 0 : e.comment, this.isPhoneApproved = (e == null ? void 0 : e.isPhoneApproved) ?? !1, this.isEmailApproved = (e == null ? void 0 : e.isEmailApproved) ?? !1, this.managers = ((s = e == null ? void 0 : e.managers) == null ? void 0 : s.map((i) => new ee(i))) ?? [];
|
|
1540
1540
|
}
|
|
1541
1541
|
}
|
|
1542
|
-
class Y extends
|
|
1542
|
+
class Y extends H {
|
|
1543
1543
|
/**
|
|
1544
1544
|
* Инициализирует новый экземпляр класса.
|
|
1545
1545
|
*
|
|
@@ -1563,7 +1563,7 @@ class Y extends d {
|
|
|
1563
1563
|
* Данные шаблона прайс-листа.
|
|
1564
1564
|
*/
|
|
1565
1565
|
t(this, "priceTemplate");
|
|
1566
|
-
this.startAt = m(e == null ? void 0 : e.startAt) ? f(e.startAt) : (e == null ? void 0 : e.startAt) ?? /* @__PURE__ */ new Date(), this.endAt = m(e == null ? void 0 : e.endAt) ? f(e.endAt) : (e == null ? void 0 : e.endAt) ?? /* @__PURE__ */ new Date(), this.client = new ie(e == null ? void 0 : e.client), this.priceTemplate = new
|
|
1566
|
+
this.startAt = m(e == null ? void 0 : e.startAt) ? f(e.startAt) : (e == null ? void 0 : e.startAt) ?? /* @__PURE__ */ new Date(), this.endAt = m(e == null ? void 0 : e.endAt) ? f(e.endAt) : (e == null ? void 0 : e.endAt) ?? /* @__PURE__ */ new Date(), this.client = new ie(e == null ? void 0 : e.client), this.priceTemplate = new W(e == null ? void 0 : e.priceTemplate);
|
|
1567
1567
|
}
|
|
1568
1568
|
}
|
|
1569
1569
|
class ve extends je {
|
|
@@ -1581,7 +1581,7 @@ class ve extends je {
|
|
|
1581
1581
|
this.product = new _(e == null ? void 0 : e.product);
|
|
1582
1582
|
}
|
|
1583
1583
|
}
|
|
1584
|
-
class
|
|
1584
|
+
class Ee extends w {
|
|
1585
1585
|
}
|
|
1586
1586
|
class X extends D {
|
|
1587
1587
|
/**
|
|
@@ -1603,10 +1603,10 @@ class X extends D {
|
|
|
1603
1603
|
* Дополнительные метаданные свойства.
|
|
1604
1604
|
*/
|
|
1605
1605
|
t(this, "metadata");
|
|
1606
|
-
this.type = new
|
|
1606
|
+
this.type = new Ee(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata;
|
|
1607
1607
|
}
|
|
1608
1608
|
}
|
|
1609
|
-
class
|
|
1609
|
+
class z {
|
|
1610
1610
|
/**
|
|
1611
1611
|
* Инициализирует экземпляр класса {@link PropertyValue}.
|
|
1612
1612
|
*
|
|
@@ -1625,11 +1625,93 @@ class H {
|
|
|
1625
1625
|
this.property = new X(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
|
|
1626
1626
|
}
|
|
1627
1627
|
}
|
|
1628
|
-
class
|
|
1628
|
+
class O {
|
|
1629
|
+
/**
|
|
1630
|
+
* Инициализирует экземпляр класса {@link DatePeriod}.
|
|
1631
|
+
*
|
|
1632
|
+
* @param data Данные для первоначальной инициализации.
|
|
1633
|
+
*/
|
|
1634
|
+
constructor(r) {
|
|
1635
|
+
/**
|
|
1636
|
+
* Начало периода.
|
|
1637
|
+
*/
|
|
1638
|
+
t(this, "from");
|
|
1639
|
+
/**
|
|
1640
|
+
* Окончание периода.
|
|
1641
|
+
*/
|
|
1642
|
+
t(this, "to");
|
|
1643
|
+
this.from = m(r == null ? void 0 : r.from) ? f(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = m(r == null ? void 0 : r.to) ? f(r.to) : (r == null ? void 0 : r.to) ?? null;
|
|
1644
|
+
}
|
|
1629
1645
|
}
|
|
1630
|
-
class
|
|
1646
|
+
class Ct {
|
|
1647
|
+
/**
|
|
1648
|
+
* Инициализирует экземпляр класса {@link TemplatesListFilters}.
|
|
1649
|
+
*
|
|
1650
|
+
* @param data Данные для первоначальной инициализации.
|
|
1651
|
+
*/
|
|
1652
|
+
constructor(r) {
|
|
1653
|
+
/**
|
|
1654
|
+
* Идентификатор шаблона прайс-листа.
|
|
1655
|
+
*/
|
|
1656
|
+
t(this, "id");
|
|
1657
|
+
/**
|
|
1658
|
+
* Название шаблона прайс-листа.
|
|
1659
|
+
*/
|
|
1660
|
+
t(this, "name");
|
|
1661
|
+
/**
|
|
1662
|
+
* Описание шаблона прайс-листа.
|
|
1663
|
+
*/
|
|
1664
|
+
t(this, "description");
|
|
1665
|
+
/**
|
|
1666
|
+
* Период создания.
|
|
1667
|
+
*/
|
|
1668
|
+
t(this, "createdAt", new O());
|
|
1669
|
+
/**
|
|
1670
|
+
* Период изменения.
|
|
1671
|
+
*/
|
|
1672
|
+
t(this, "updatedAt", new O());
|
|
1673
|
+
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.description = r == null ? void 0 : r.description, this.createdAt = new O(r == null ? void 0 : r.createdAt), this.updatedAt = new O(r == null ? void 0 : r.updatedAt);
|
|
1674
|
+
}
|
|
1675
|
+
/**
|
|
1676
|
+
* Выполняет сброс указанного фильтра в значение по умолчанию.
|
|
1677
|
+
*
|
|
1678
|
+
* @param key Название фильтра, значение которого необходимо сбросить.
|
|
1679
|
+
*/
|
|
1680
|
+
resetFilterValue(r) {
|
|
1681
|
+
switch (r) {
|
|
1682
|
+
case "id":
|
|
1683
|
+
case "name":
|
|
1684
|
+
case "description":
|
|
1685
|
+
this[r] = void 0;
|
|
1686
|
+
break;
|
|
1687
|
+
case "createdAt":
|
|
1688
|
+
this.createdAt.from = null, this.createdAt.to = null;
|
|
1689
|
+
break;
|
|
1690
|
+
case "updatedAt":
|
|
1691
|
+
this.updatedAt.from = null, this.updatedAt.to = null;
|
|
1692
|
+
break;
|
|
1693
|
+
}
|
|
1694
|
+
return this;
|
|
1695
|
+
}
|
|
1696
|
+
/**
|
|
1697
|
+
* Возвращает очищенное значение фильтров, содержащие
|
|
1698
|
+
* только актуальные данные.
|
|
1699
|
+
*/
|
|
1700
|
+
asClearRaw() {
|
|
1701
|
+
var e, s, i, o;
|
|
1702
|
+
const r = {};
|
|
1703
|
+
return Object.keys(this).forEach((l) => {
|
|
1704
|
+
const p = this[l];
|
|
1705
|
+
// eslint-disable-next-line prettier/prettier
|
|
1706
|
+
_e(p) || m(p) && p.trim().length === 0 || Se(p.isNewRec) && p.isNewRec() || (r[l] = p);
|
|
1707
|
+
}), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((s = r == null ? void 0 : r.createdAt) != null && s.to) && delete r.createdAt, !((i = r == null ? void 0 : r.updatedAt) != null && i.from) && !((o = r == null ? void 0 : r.updatedAt) != null && o.to) && delete r.updatedAt, r;
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1710
|
+
class Fr extends w {
|
|
1711
|
+
}
|
|
1712
|
+
class Ke extends w {
|
|
1631
1713
|
}
|
|
1632
|
-
class
|
|
1714
|
+
class vt extends w {
|
|
1633
1715
|
}
|
|
1634
1716
|
class Hr extends w {
|
|
1635
1717
|
}
|
|
@@ -1689,14 +1771,14 @@ class R extends u {
|
|
|
1689
1771
|
* и использовать в случае аналогичных запросов.
|
|
1690
1772
|
*/
|
|
1691
1773
|
getReference(r, e = !1) {
|
|
1692
|
-
return this.getTypedDataArrayRequester(
|
|
1774
|
+
return this.getTypedDataArrayRequester(Fr, `/internal/references/${r}`, e);
|
|
1693
1775
|
}
|
|
1694
1776
|
/**
|
|
1695
1777
|
* Возвращает {@link Promise} для получения справочника данных о канале
|
|
1696
1778
|
* первичного интереса.
|
|
1697
1779
|
*/
|
|
1698
1780
|
getChannelPrimaryInterest() {
|
|
1699
|
-
return this.getTypedDataArrayRequester(
|
|
1781
|
+
return this.getTypedDataArrayRequester(Ke, "/internal/references/channel-primary-interest", !0);
|
|
1700
1782
|
}
|
|
1701
1783
|
/**
|
|
1702
1784
|
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
@@ -1781,7 +1863,7 @@ class R extends u {
|
|
|
1781
1863
|
* @param term Терм поиска.
|
|
1782
1864
|
*/
|
|
1783
1865
|
searchCountry(r) {
|
|
1784
|
-
return this.getTypedDataArrayRequester(
|
|
1866
|
+
return this.getTypedDataArrayRequester(Q, `/internal/references/country/search?term=${r}`);
|
|
1785
1867
|
}
|
|
1786
1868
|
/**
|
|
1787
1869
|
* Возвращает {@link Promise} для получения справочника типов доставки.
|
|
@@ -1799,7 +1881,7 @@ class R extends u {
|
|
|
1799
1881
|
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
1800
1882
|
*/
|
|
1801
1883
|
getPropertyTypes() {
|
|
1802
|
-
return this.getTypedDataArrayRequester(
|
|
1884
|
+
return this.getTypedDataArrayRequester(Ee, "/internal/references/property-type", !0);
|
|
1803
1885
|
}
|
|
1804
1886
|
/**
|
|
1805
1887
|
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
@@ -1815,7 +1897,7 @@ class R extends u {
|
|
|
1815
1897
|
}
|
|
1816
1898
|
}
|
|
1817
1899
|
var Vr = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(Vr || {});
|
|
1818
|
-
class
|
|
1900
|
+
class Er extends Ve {
|
|
1819
1901
|
/**
|
|
1820
1902
|
* Инициализирует экземпляр класса {@link User}.
|
|
1821
1903
|
*
|
|
@@ -1838,13 +1920,13 @@ class Kr extends Ve {
|
|
|
1838
1920
|
this.type = e == null ? void 0 : e.type, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.photo = e == null ? void 0 : e.photo;
|
|
1839
1921
|
}
|
|
1840
1922
|
}
|
|
1841
|
-
class
|
|
1923
|
+
class Kr extends u {
|
|
1842
1924
|
/**
|
|
1843
1925
|
* Возвращает данные о текущем пользователе.
|
|
1844
1926
|
*/
|
|
1845
1927
|
// eslint-disable-next-line class-methods-use-this
|
|
1846
1928
|
getCurrentUser() {
|
|
1847
|
-
return this.get("/internal/users/info", {}, (r) => new
|
|
1929
|
+
return this.get("/internal/users/info", {}, (r) => new Er(r.data));
|
|
1848
1930
|
}
|
|
1849
1931
|
}
|
|
1850
1932
|
class Jr {
|
|
@@ -1890,10 +1972,10 @@ class Jr {
|
|
|
1890
1972
|
* Данные о валюте.
|
|
1891
1973
|
*/
|
|
1892
1974
|
t(this, "currency");
|
|
1893
|
-
this.cost = r.cost, this.costDate = m(r.costDate) ? f(r.costDate) : r.costDate, this.isLowCost = r.isLowCost, this.isRetail = r.isRetail, this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.client = r.client ? new
|
|
1975
|
+
this.cost = r.cost, this.costDate = m(r.costDate) ? f(r.costDate) : r.costDate, this.isLowCost = r.isLowCost, this.isRetail = r.isRetail, this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.client = r.client ? new d(r.client) : void 0, this.executor = r.executor ? new d(r.executor) : void 0, this.currency = r.currency ? new pe(r.currency) : void 0;
|
|
1894
1976
|
}
|
|
1895
1977
|
}
|
|
1896
|
-
class
|
|
1978
|
+
class Ne {
|
|
1897
1979
|
/**
|
|
1898
1980
|
* Инициализирует экземпляр класса {@link RecommendationsList}.
|
|
1899
1981
|
*
|
|
@@ -1908,7 +1990,7 @@ class xe {
|
|
|
1908
1990
|
* Список рекомендованных категорий продуктов.
|
|
1909
1991
|
*/
|
|
1910
1992
|
t(this, "productCategories", []);
|
|
1911
|
-
r != null && r.products && (this.products = r.products.map((e) => new _(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new
|
|
1993
|
+
r != null && r.products && (this.products = r.products.map((e) => new _(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new U(e)));
|
|
1912
1994
|
}
|
|
1913
1995
|
}
|
|
1914
1996
|
class Z extends D {
|
|
@@ -1946,7 +2028,7 @@ class Z extends D {
|
|
|
1946
2028
|
this.description = e == null ? void 0 : e.description, this.canChangeLowCost = (e == null ? void 0 : e.canChangeLowCost) ?? !1, this.parentRoleId = e == null ? void 0 : e.parentRoleId;
|
|
1947
2029
|
}
|
|
1948
2030
|
}
|
|
1949
|
-
class
|
|
2031
|
+
class Oe {
|
|
1950
2032
|
/**
|
|
1951
2033
|
* Инициализирует экземпляр класса {@link PricingRoleCategoryRule}.
|
|
1952
2034
|
*
|
|
@@ -1995,10 +2077,10 @@ class Pe {
|
|
|
1995
2077
|
* Источник клиентской цены.
|
|
1996
2078
|
*/
|
|
1997
2079
|
t(this, "source");
|
|
1998
|
-
this.client = new ie(r == null ? void 0 : r.client), this.product = new _(r == null ? void 0 : r.product), this.cost = (r == null ? void 0 : r.cost) ?? 0, this.costCoefficient = (r == null ? void 0 : r.costCoefficient) ?? 0, this.source = (r == null ? void 0 : r.source) ??
|
|
2080
|
+
this.client = new ie(r == null ? void 0 : r.client), this.product = new _(r == null ? void 0 : r.product), this.cost = (r == null ? void 0 : r.cost) ?? 0, this.costCoefficient = (r == null ? void 0 : r.costCoefficient) ?? 0, this.source = (r == null ? void 0 : r.source) ?? Ie.Product;
|
|
1999
2081
|
}
|
|
2000
2082
|
}
|
|
2001
|
-
class
|
|
2083
|
+
class Pt extends u {
|
|
2002
2084
|
/**
|
|
2003
2085
|
* Возвращает данные о результатах поиска категорий и товаров.
|
|
2004
2086
|
*
|
|
@@ -2029,7 +2111,7 @@ class vt extends u {
|
|
|
2029
2111
|
return s && (l += `&category_id=${s}`), i && (l += `&client_id=${i}`), l;
|
|
2030
2112
|
}
|
|
2031
2113
|
}
|
|
2032
|
-
class
|
|
2114
|
+
class Rt extends u {
|
|
2033
2115
|
/**
|
|
2034
2116
|
* Импортирует цены клиента из CSV файла.
|
|
2035
2117
|
*
|
|
@@ -2153,7 +2235,7 @@ class Pt extends u {
|
|
|
2153
2235
|
price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
|
|
2154
2236
|
increase_percent: s.value
|
|
2155
2237
|
},
|
|
2156
|
-
(o) => new
|
|
2238
|
+
(o) => new J(o.data)
|
|
2157
2239
|
);
|
|
2158
2240
|
}
|
|
2159
2241
|
/**
|
|
@@ -2165,7 +2247,7 @@ class Pt extends u {
|
|
|
2165
2247
|
* @see /doc/api/internal#/operations/api_internal_client_price_products_remove
|
|
2166
2248
|
*/
|
|
2167
2249
|
removeProductPrice(r, e) {
|
|
2168
|
-
return this.delete(`/internal/clients/${r}/price/products/${e}`, (s) => new
|
|
2250
|
+
return this.delete(`/internal/clients/${r}/price/products/${e}`, (s) => new J(s.data));
|
|
2169
2251
|
}
|
|
2170
2252
|
/**
|
|
2171
2253
|
* Добавляет указанный продукт в список товаров для дополнительных продаж.
|
|
@@ -2228,7 +2310,7 @@ class Pt extends u {
|
|
|
2228
2310
|
return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
|
|
2229
2311
|
}
|
|
2230
2312
|
}
|
|
2231
|
-
class
|
|
2313
|
+
class Dt extends u {
|
|
2232
2314
|
/**
|
|
2233
2315
|
* Возвращает список шаблонов прайс-листа привязанных к клиенту.
|
|
2234
2316
|
*
|
|
@@ -2267,8 +2349,8 @@ class Rt extends u {
|
|
|
2267
2349
|
return this.post(
|
|
2268
2350
|
`/internal/clients/${r}/price/templates/${e}`,
|
|
2269
2351
|
s && {
|
|
2270
|
-
startAt: s.startAt &&
|
|
2271
|
-
endAt: s.endAt &&
|
|
2352
|
+
startAt: s.startAt && B(s.startAt, i),
|
|
2353
|
+
endAt: s.endAt && B(s.endAt, i)
|
|
2272
2354
|
},
|
|
2273
2355
|
(o) => new Y(o.data)
|
|
2274
2356
|
);
|
|
@@ -2299,8 +2381,8 @@ class Rt extends u {
|
|
|
2299
2381
|
return this.patch(
|
|
2300
2382
|
`/internal/clients/${r}/price/templates/${e}/${s}`,
|
|
2301
2383
|
i && {
|
|
2302
|
-
startAt: i.startAt &&
|
|
2303
|
-
endAt: i.endAt &&
|
|
2384
|
+
startAt: i.startAt && B(i.startAt, o),
|
|
2385
|
+
endAt: i.endAt && B(i.endAt, o)
|
|
2304
2386
|
},
|
|
2305
2387
|
(l) => new Y(l.data)
|
|
2306
2388
|
);
|
|
@@ -2318,7 +2400,7 @@ class Rt extends u {
|
|
|
2318
2400
|
return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
|
|
2319
2401
|
}
|
|
2320
2402
|
}
|
|
2321
|
-
class
|
|
2403
|
+
class At extends u {
|
|
2322
2404
|
/**
|
|
2323
2405
|
* Возвращает список данных о корневых категориях.
|
|
2324
2406
|
*
|
|
@@ -2332,7 +2414,7 @@ class Dt extends u {
|
|
|
2332
2414
|
{
|
|
2333
2415
|
showHidden: r
|
|
2334
2416
|
},
|
|
2335
|
-
(e) => e.data.map((s) => new
|
|
2417
|
+
(e) => e.data.map((s) => new U(s))
|
|
2336
2418
|
);
|
|
2337
2419
|
}
|
|
2338
2420
|
/**
|
|
@@ -2351,7 +2433,7 @@ class Dt extends u {
|
|
|
2351
2433
|
showHidden: e,
|
|
2352
2434
|
withNestedCategories: s
|
|
2353
2435
|
},
|
|
2354
|
-
(i) => new
|
|
2436
|
+
(i) => new U(i.data)
|
|
2355
2437
|
);
|
|
2356
2438
|
}
|
|
2357
2439
|
/**
|
|
@@ -2360,7 +2442,7 @@ class Dt extends u {
|
|
|
2360
2442
|
* @param categoryID Идентификатор категории продуктов.
|
|
2361
2443
|
*/
|
|
2362
2444
|
getPublicCategoryData(r) {
|
|
2363
|
-
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new
|
|
2445
|
+
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new U(e.data));
|
|
2364
2446
|
}
|
|
2365
2447
|
/**
|
|
2366
2448
|
* Возвращает список продуктов категории.
|
|
@@ -2391,7 +2473,7 @@ class Dt extends u {
|
|
|
2391
2473
|
getCategoryProductsCoefficients(r) {
|
|
2392
2474
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
2393
2475
|
const { data: s } = e;
|
|
2394
|
-
return pr(s, (i) => i.map((o) => new
|
|
2476
|
+
return pr(s, (i) => i.map((o) => new Le(o))), s;
|
|
2395
2477
|
});
|
|
2396
2478
|
}
|
|
2397
2479
|
/**
|
|
@@ -2403,7 +2485,7 @@ class Dt extends u {
|
|
|
2403
2485
|
publicSimpleSearch(r, e = 10) {
|
|
2404
2486
|
return new Promise((s, i) => {
|
|
2405
2487
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2406
|
-
s(o.categories.map((l) => new
|
|
2488
|
+
s(o.categories.map((l) => new U(l)));
|
|
2407
2489
|
}).catch((o) => {
|
|
2408
2490
|
i(o);
|
|
2409
2491
|
});
|
|
@@ -2441,7 +2523,7 @@ class $t extends u {
|
|
|
2441
2523
|
return this.get(
|
|
2442
2524
|
`/internal/catalog/products/${r}/coefficients`,
|
|
2443
2525
|
{},
|
|
2444
|
-
(e) => oe(e.data, (s) => new
|
|
2526
|
+
(e) => oe(e.data, (s) => new Le(s))
|
|
2445
2527
|
);
|
|
2446
2528
|
}
|
|
2447
2529
|
/**
|
|
@@ -2454,7 +2536,7 @@ class $t extends u {
|
|
|
2454
2536
|
*/
|
|
2455
2537
|
getProductPriceHistory(r, e) {
|
|
2456
2538
|
const s = {};
|
|
2457
|
-
return
|
|
2539
|
+
return _e(e) || (s.clientId = e), this.get(`/internal/price/products/${r}/history`, s, (i) => oe(i.data, (o) => new Jr(o)));
|
|
2458
2540
|
}
|
|
2459
2541
|
/**
|
|
2460
2542
|
* Выполняет публичный поиск данных о продуктах по терму.
|
|
@@ -2472,7 +2554,7 @@ class $t extends u {
|
|
|
2472
2554
|
});
|
|
2473
2555
|
}
|
|
2474
2556
|
}
|
|
2475
|
-
class
|
|
2557
|
+
class Tt extends u {
|
|
2476
2558
|
/**
|
|
2477
2559
|
* Возвращает список данных о корневых категориях указанного клиента.
|
|
2478
2560
|
*
|
|
@@ -2530,11 +2612,11 @@ class At extends u {
|
|
|
2530
2612
|
showHidden: i,
|
|
2531
2613
|
withPriceCoefficients: s
|
|
2532
2614
|
},
|
|
2533
|
-
(o) => oe(o.data, (l) => new
|
|
2615
|
+
(o) => oe(o.data, (l) => new J(l))
|
|
2534
2616
|
);
|
|
2535
2617
|
}
|
|
2536
2618
|
}
|
|
2537
|
-
class
|
|
2619
|
+
class bt extends u {
|
|
2538
2620
|
/**
|
|
2539
2621
|
* Возвращает данные об указанном продукте для указанного клиента.
|
|
2540
2622
|
*
|
|
@@ -2551,12 +2633,12 @@ class Tt extends u {
|
|
|
2551
2633
|
clientId: e,
|
|
2552
2634
|
withPriceCoefficients: s
|
|
2553
2635
|
},
|
|
2554
|
-
(i) => new
|
|
2636
|
+
(i) => new J(i.data)
|
|
2555
2637
|
);
|
|
2556
2638
|
}
|
|
2557
2639
|
}
|
|
2558
|
-
var
|
|
2559
|
-
class
|
|
2640
|
+
var xe = /* @__PURE__ */ ((n) => (n.BeginWith = "bw", n.Contains = "cn", n.Custom = "custom", n.EndsWith = "ew", n.Equals = "eq", n.GreaterOrEqual = "ge", n.GreaterThan = "gt", n.InList = "in", n.LessOrEqual = "le", n.LessThan = "lt", n.NotBeginWith = "bn", n.NotContains = "nc", n.NotEndsWith = "en", n.NotEqual = "ne", n.NotInList = "ni", n.NotNull = "nn", n.Null = "nu", n))(xe || {});
|
|
2641
|
+
class qe {
|
|
2560
2642
|
/**
|
|
2561
2643
|
* Инициализирует экземпляр класса {@link FilterItem}.
|
|
2562
2644
|
*
|
|
@@ -2575,7 +2657,7 @@ class Ne {
|
|
|
2575
2657
|
* Значение с которым сравнивается поле.
|
|
2576
2658
|
*/
|
|
2577
2659
|
t(this, "value");
|
|
2578
|
-
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ??
|
|
2660
|
+
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? xe.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
|
|
2579
2661
|
}
|
|
2580
2662
|
/**
|
|
2581
2663
|
* Преобразует фильтр в примитивное представление для API.
|
|
@@ -2587,7 +2669,7 @@ class Ne {
|
|
|
2587
2669
|
field: this.field,
|
|
2588
2670
|
op: this.op
|
|
2589
2671
|
};
|
|
2590
|
-
return r.value = ur(this.value) ?
|
|
2672
|
+
return r.value = ur(this.value) ? B(this.value, T.getConfig().dateFormats.api) : this.value, r;
|
|
2591
2673
|
}
|
|
2592
2674
|
}
|
|
2593
2675
|
class te {
|
|
@@ -2610,7 +2692,7 @@ class te {
|
|
|
2610
2692
|
*/
|
|
2611
2693
|
t(this, "groups");
|
|
2612
2694
|
var e, s;
|
|
2613
|
-
this.groupOp = (r == null ? void 0 : r.groupOp) ?? "and", this.filters = ((e = r == null ? void 0 : r.filters) == null ? void 0 : e.map((i) => new
|
|
2695
|
+
this.groupOp = (r == null ? void 0 : r.groupOp) ?? "and", this.filters = ((e = r == null ? void 0 : r.filters) == null ? void 0 : e.map((i) => new qe(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new te(i))) ?? [];
|
|
2614
2696
|
}
|
|
2615
2697
|
/**
|
|
2616
2698
|
* Преобразует группу фильтров в примитивное представление для API.
|
|
@@ -2620,7 +2702,7 @@ class te {
|
|
|
2620
2702
|
toPrimitive() {
|
|
2621
2703
|
return {
|
|
2622
2704
|
groupOp: this.groupOp,
|
|
2623
|
-
filters: this.filters.map((r) => r instanceof
|
|
2705
|
+
filters: this.filters.map((r) => r instanceof qe && Se(r.toPrimitive) ? r.toPrimitive() : r),
|
|
2624
2706
|
groups: this.groups.map((r) => r instanceof te ? r.toPrimitive() : r)
|
|
2625
2707
|
};
|
|
2626
2708
|
}
|
|
@@ -2645,7 +2727,7 @@ class we extends u {
|
|
|
2645
2727
|
return e && (g.filters = JSON.stringify((e instanceof te ? e : new te(e)).toPrimitive())), hr(s) || (g.sort = s), o && (g = { ...g, ...o }), this.get(r, g, l, p);
|
|
2646
2728
|
}
|
|
2647
2729
|
}
|
|
2648
|
-
class
|
|
2730
|
+
class _t extends we {
|
|
2649
2731
|
/**
|
|
2650
2732
|
* Возвращает список шаблонов прайс-листа.
|
|
2651
2733
|
*
|
|
@@ -2658,18 +2740,20 @@ class bt extends we {
|
|
|
2658
2740
|
getTemplateList(r, e, s) {
|
|
2659
2741
|
return this.getPaginated("/internal/price/templates", r, e, s, {}, (i) => {
|
|
2660
2742
|
const o = { ...i.data };
|
|
2661
|
-
return o.data = o.data.map((l) => new
|
|
2743
|
+
return o.data = o.data.map((l) => new W(l)), o;
|
|
2662
2744
|
});
|
|
2663
2745
|
}
|
|
2664
2746
|
/**
|
|
2665
2747
|
* Создание нового шаблона прайс-листа.
|
|
2666
2748
|
*
|
|
2667
2749
|
* @param data Данные для создания шаблона прайс-листа.
|
|
2668
|
-
*
|
|
2750
|
+
* @param validationFieldResultData Список полей, для которых необходимо
|
|
2751
|
+
* установить данные об ошибках валидации
|
|
2752
|
+
* в случае ошибок в запросах.
|
|
2669
2753
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_create
|
|
2670
2754
|
*/
|
|
2671
|
-
createTemplate(r) {
|
|
2672
|
-
return this.post("/internal/price/templates", r, (
|
|
2755
|
+
createTemplate(r, e = {}) {
|
|
2756
|
+
return this.post("/internal/price/templates", r, (s) => new W(s.data), e);
|
|
2673
2757
|
}
|
|
2674
2758
|
/**
|
|
2675
2759
|
* Возвращает данные о шаблоне прайс-листа.
|
|
@@ -2679,18 +2763,20 @@ class bt extends we {
|
|
|
2679
2763
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_get
|
|
2680
2764
|
*/
|
|
2681
2765
|
getTemplate(r) {
|
|
2682
|
-
return this.get(`/internal/price/templates/${r}`, {}, (e) => new
|
|
2766
|
+
return this.get(`/internal/price/templates/${r}`, {}, (e) => new W(e.data));
|
|
2683
2767
|
}
|
|
2684
2768
|
/**
|
|
2685
2769
|
* Изменяет данные о шаблоне прайс-листа.
|
|
2686
2770
|
*
|
|
2687
2771
|
* @param priceTemplateId Идентификатор шаблона прайс-листа.
|
|
2688
2772
|
* @param data Данные для изменения шаблона прайс-листа.
|
|
2689
|
-
*
|
|
2773
|
+
* @param validationFieldResultData Список полей, для которых необходимо
|
|
2774
|
+
* установить данные об ошибках валидации
|
|
2775
|
+
* в случае ошибок в запросах.
|
|
2690
2776
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_update
|
|
2691
2777
|
*/
|
|
2692
|
-
updateTemplate(r, e) {
|
|
2693
|
-
return this.patch(`/internal/price/templates/${r}`, e, (
|
|
2778
|
+
updateTemplate(r, e, s = {}) {
|
|
2779
|
+
return this.patch(`/internal/price/templates/${r}`, e, (i) => new W(i.data), s);
|
|
2694
2780
|
}
|
|
2695
2781
|
/**
|
|
2696
2782
|
* Удаляет данные о шаблоне прайс-листа.
|
|
@@ -2833,7 +2919,7 @@ class bt extends we {
|
|
|
2833
2919
|
);
|
|
2834
2920
|
}
|
|
2835
2921
|
}
|
|
2836
|
-
class
|
|
2922
|
+
class St extends u {
|
|
2837
2923
|
/**
|
|
2838
2924
|
* Возвращает список ролей ценообразования.
|
|
2839
2925
|
*
|
|
@@ -2894,7 +2980,7 @@ class _t extends u {
|
|
|
2894
2980
|
return this.get(
|
|
2895
2981
|
`/internal/price/roles/rules/categories/${r}`,
|
|
2896
2982
|
{},
|
|
2897
|
-
(e) => e.data.map((s) => new
|
|
2983
|
+
(e) => e.data.map((s) => new Oe(s))
|
|
2898
2984
|
);
|
|
2899
2985
|
}
|
|
2900
2986
|
/**
|
|
@@ -2909,11 +2995,11 @@ class _t extends u {
|
|
|
2909
2995
|
return this.patch(
|
|
2910
2996
|
`/internal/price/roles/rules/categories/${r}`,
|
|
2911
2997
|
e,
|
|
2912
|
-
(s) => s.data.map((i) => new
|
|
2998
|
+
(s) => s.data.map((i) => new Oe(i))
|
|
2913
2999
|
);
|
|
2914
3000
|
}
|
|
2915
3001
|
}
|
|
2916
|
-
class
|
|
3002
|
+
class Lt extends we {
|
|
2917
3003
|
/**
|
|
2918
3004
|
* Возвращает пагинированный список свойств.
|
|
2919
3005
|
*
|
|
@@ -2989,7 +3075,7 @@ class St extends we {
|
|
|
2989
3075
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get_list
|
|
2990
3076
|
*/
|
|
2991
3077
|
getProductProperties(r) {
|
|
2992
|
-
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new
|
|
3078
|
+
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new z(s)));
|
|
2993
3079
|
}
|
|
2994
3080
|
/**
|
|
2995
3081
|
* Возвращает значение свойства продукта.
|
|
@@ -2999,7 +3085,7 @@ class St extends we {
|
|
|
2999
3085
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get
|
|
3000
3086
|
*/
|
|
3001
3087
|
getProductProperty(r, e) {
|
|
3002
|
-
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new
|
|
3088
|
+
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new z(s.data));
|
|
3003
3089
|
}
|
|
3004
3090
|
/**
|
|
3005
3091
|
* Обновляет значение свойства продукта.
|
|
@@ -3010,7 +3096,7 @@ class St extends we {
|
|
|
3010
3096
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_update
|
|
3011
3097
|
*/
|
|
3012
3098
|
updateProductProperty(r, e, s) {
|
|
3013
|
-
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new
|
|
3099
|
+
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new z(i.data));
|
|
3014
3100
|
}
|
|
3015
3101
|
/**
|
|
3016
3102
|
* Удаляет значение свойства продукта.
|
|
@@ -3135,7 +3221,7 @@ class St extends we {
|
|
|
3135
3221
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get_list
|
|
3136
3222
|
*/
|
|
3137
3223
|
getCategoryProperties(r) {
|
|
3138
|
-
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new
|
|
3224
|
+
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new z(s)));
|
|
3139
3225
|
}
|
|
3140
3226
|
/**
|
|
3141
3227
|
* Возвращает значение свойства категории.
|
|
@@ -3145,7 +3231,7 @@ class St extends we {
|
|
|
3145
3231
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get
|
|
3146
3232
|
*/
|
|
3147
3233
|
getCategoryProperty(r, e) {
|
|
3148
|
-
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new
|
|
3234
|
+
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new z(s.data));
|
|
3149
3235
|
}
|
|
3150
3236
|
/**
|
|
3151
3237
|
* Обновляет значение свойства категории.
|
|
@@ -3156,7 +3242,7 @@ class St extends we {
|
|
|
3156
3242
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_update
|
|
3157
3243
|
*/
|
|
3158
3244
|
updateCategoryProperty(r, e, s) {
|
|
3159
|
-
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new
|
|
3245
|
+
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new z(i.data));
|
|
3160
3246
|
}
|
|
3161
3247
|
/**
|
|
3162
3248
|
* Удаляет значение свойства категории.
|
|
@@ -3292,7 +3378,7 @@ class at extends u {
|
|
|
3292
3378
|
* @param productCategory Данные о категории продуктов, для которой необходимо получить рекомендации.
|
|
3293
3379
|
*/
|
|
3294
3380
|
getProductCategoryRecommendations(r) {
|
|
3295
|
-
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new
|
|
3381
|
+
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new Ne(e.data));
|
|
3296
3382
|
}
|
|
3297
3383
|
/**
|
|
3298
3384
|
* Возвращает данные о рекомендациях указанного продукта.
|
|
@@ -3300,7 +3386,7 @@ class at extends u {
|
|
|
3300
3386
|
* @param product Данные о продукте, для которого необходимо получить рекомендации.
|
|
3301
3387
|
*/
|
|
3302
3388
|
getProductRecommendations(r) {
|
|
3303
|
-
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new
|
|
3389
|
+
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new Ne(e.data));
|
|
3304
3390
|
}
|
|
3305
3391
|
/**
|
|
3306
3392
|
* Выполняет сохранение данных о рекомендуемых категориях продуктов.
|
|
@@ -3327,11 +3413,11 @@ class at extends u {
|
|
|
3327
3413
|
});
|
|
3328
3414
|
}
|
|
3329
3415
|
}
|
|
3330
|
-
const
|
|
3416
|
+
const Ue = (n) => {
|
|
3331
3417
|
const r = {};
|
|
3332
3418
|
return n.from && (n.from.coefficient || n.from.value) && (r.from = {}, n.from.coefficient && (r.from.priceCoefficientId = n.from.coefficient.id), n.from.value && (r.from.increasePercent = n.from.value)), n.to && (n.to.coefficient || n.to.value) && (r.to = {}, n.to.coefficient && (r.to.priceCoefficientId = n.to.coefficient.id), n.to.value && (r.to.increasePercent = n.to.value)), r;
|
|
3333
3419
|
};
|
|
3334
|
-
class
|
|
3420
|
+
class It extends u {
|
|
3335
3421
|
/**
|
|
3336
3422
|
* Возвращает список клиентских цен на продукты в указанном диапазоне цены.
|
|
3337
3423
|
*
|
|
@@ -3343,7 +3429,7 @@ class Lt extends u {
|
|
|
3343
3429
|
analyzeProductPrices(r, e) {
|
|
3344
3430
|
return this.get(
|
|
3345
3431
|
`/internal/price/products/${r}/analyze`,
|
|
3346
|
-
{ ...
|
|
3432
|
+
{ ...Ue(e) },
|
|
3347
3433
|
(s) => s.data.map((i) => new Pe(i))
|
|
3348
3434
|
);
|
|
3349
3435
|
}
|
|
@@ -3358,7 +3444,7 @@ class Lt extends u {
|
|
|
3358
3444
|
analyzeCategoryPrices(r, e) {
|
|
3359
3445
|
return this.get(
|
|
3360
3446
|
`/internal/price/categories/${r}/analyze`,
|
|
3361
|
-
{ ...
|
|
3447
|
+
{ ...Ue(e) },
|
|
3362
3448
|
(s) => s.data.map((i) => new Pe(i))
|
|
3363
3449
|
);
|
|
3364
3450
|
}
|
|
@@ -3381,7 +3467,7 @@ class Lt extends u {
|
|
|
3381
3467
|
}
|
|
3382
3468
|
}
|
|
3383
3469
|
var Qr = /* @__PURE__ */ ((n) => (n.LastOrder = "last_order", n.Contacts = "contacts", n.PartnerGroups = "partner_groups", n.PreferredDeliveryType = "preferred_delivery_type", n.SalesDirection = "sales_direction", n.Managers = "managers", n))(Qr || {});
|
|
3384
|
-
class Te extends
|
|
3470
|
+
class Te extends H {
|
|
3385
3471
|
/**
|
|
3386
3472
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
3387
3473
|
*
|
|
@@ -3524,7 +3610,7 @@ class Ye extends D {
|
|
|
3524
3610
|
*/
|
|
3525
3611
|
t(this, "updater");
|
|
3526
3612
|
if (e) {
|
|
3527
|
-
if (this.opf = new G(e.opf), this.salesDirection = new S(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : e.createdAt, this.creator = e.creator ? new
|
|
3613
|
+
if (this.opf = new G(e.opf), this.salesDirection = new S(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : e.createdAt, this.creator = e.creator ? new d(e.creator) : void 0, this.updatedAt = m(e == null ? void 0 : e.updatedAt) ? f(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new d(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new M(e.partnerGroup)), e.manager && (this.manager = new ee(e.manager)), e.contacts) {
|
|
3528
3614
|
const s = [];
|
|
3529
3615
|
e.contacts.forEach((i) => {
|
|
3530
3616
|
s.push(new F(i));
|
|
@@ -3618,7 +3704,7 @@ class Xr extends Ze {
|
|
|
3618
3704
|
/**
|
|
3619
3705
|
* Страна регистрации юридического лица нерезидента.
|
|
3620
3706
|
*/
|
|
3621
|
-
t(this, "registrationCountry", new
|
|
3707
|
+
t(this, "registrationCountry", new Q());
|
|
3622
3708
|
/**
|
|
3623
3709
|
* Регистрационный номер юридического лица нерезидента.
|
|
3624
3710
|
*/
|
|
@@ -3627,7 +3713,7 @@ class Xr extends Ze {
|
|
|
3627
3713
|
* Налоговый номер юридического лица нерезидента.
|
|
3628
3714
|
*/
|
|
3629
3715
|
t(this, "taxNumber", "");
|
|
3630
|
-
e && (this.registrationCountry = new
|
|
3716
|
+
e && (this.registrationCountry = new Q(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
|
|
3631
3717
|
}
|
|
3632
3718
|
}
|
|
3633
3719
|
class ue {
|
|
@@ -3649,7 +3735,7 @@ class ue {
|
|
|
3649
3735
|
}
|
|
3650
3736
|
}
|
|
3651
3737
|
}
|
|
3652
|
-
class Re extends
|
|
3738
|
+
class Re extends H {
|
|
3653
3739
|
/**
|
|
3654
3740
|
* Инициализирует экземпляр класса {@link ContactRelation}.
|
|
3655
3741
|
*
|
|
@@ -3732,7 +3818,7 @@ class he extends Ur {
|
|
|
3732
3818
|
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new Be(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new F(i))) ?? [], this.comment = e == null ? void 0 : e.comment, this.operatingHours = e == null ? void 0 : e.operatingHours, this.isOneTime = e == null ? void 0 : e.isOneTime, this.isTransportCompanyAddress = e == null ? void 0 : e.isTransportCompanyAddress;
|
|
3733
3819
|
}
|
|
3734
3820
|
}
|
|
3735
|
-
class
|
|
3821
|
+
class de extends ie {
|
|
3736
3822
|
/**
|
|
3737
3823
|
* Инициализирует экземпляр класса {@link Client}.
|
|
3738
3824
|
*
|
|
@@ -3786,28 +3872,10 @@ class qe extends ie {
|
|
|
3786
3872
|
* Дополнительные данные о клиенте.
|
|
3787
3873
|
*/
|
|
3788
3874
|
t(this, "extraData");
|
|
3789
|
-
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((p) => ue.createInstance(p))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((p) => new M(p))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((p) => new F(p))) ?? [], this.deliveryAddresses = ((l = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : l.map((p) => new he(p))) ?? [], this.channelPrimaryInterest = new
|
|
3875
|
+
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((p) => ue.createInstance(p))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((p) => new M(p))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((p) => new F(p))) ?? [], this.deliveryAddresses = ((l = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : l.map((p) => new he(p))) ?? [], this.channelPrimaryInterest = new Ke(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Qe(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new K(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.isExcludedFromMsCallsToClients = (e == null ? void 0 : e.isExcludedFromMsCallsToClients) ?? !1, this.preferredWarehouse = e != null && e.preferredWarehouse ? new fe(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
|
|
3790
3876
|
}
|
|
3791
3877
|
}
|
|
3792
|
-
class
|
|
3793
|
-
/**
|
|
3794
|
-
* Инициализирует экземпляр класса {@link DatePeriod}.
|
|
3795
|
-
*
|
|
3796
|
-
* @param data Данные для первоначальной инициализации.
|
|
3797
|
-
*/
|
|
3798
|
-
constructor(r) {
|
|
3799
|
-
/**
|
|
3800
|
-
* Начало периода.
|
|
3801
|
-
*/
|
|
3802
|
-
t(this, "from");
|
|
3803
|
-
/**
|
|
3804
|
-
* Окончание периода.
|
|
3805
|
-
*/
|
|
3806
|
-
t(this, "to");
|
|
3807
|
-
this.from = m(r == null ? void 0 : r.from) ? f(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = m(r == null ? void 0 : r.to) ? f(r.to) : (r == null ? void 0 : r.to) ?? null;
|
|
3808
|
-
}
|
|
3809
|
-
}
|
|
3810
|
-
class It {
|
|
3878
|
+
class xt {
|
|
3811
3879
|
/**
|
|
3812
3880
|
* Инициализирует экземпляр класса {@link ClientsListFilters}.
|
|
3813
3881
|
*
|
|
@@ -3857,11 +3925,11 @@ class It {
|
|
|
3857
3925
|
/**
|
|
3858
3926
|
* Период регистрации.
|
|
3859
3927
|
*/
|
|
3860
|
-
t(this, "createdAt", new
|
|
3928
|
+
t(this, "createdAt", new O());
|
|
3861
3929
|
/**
|
|
3862
3930
|
* Период последнего входа.
|
|
3863
3931
|
*/
|
|
3864
|
-
t(this, "lastLoginDate", new
|
|
3932
|
+
t(this, "lastLoginDate", new O());
|
|
3865
3933
|
/**
|
|
3866
3934
|
* Признак того, что в указанный период последнего входа, клиентом был сделан заказ.
|
|
3867
3935
|
*/
|
|
@@ -3899,8 +3967,8 @@ class It {
|
|
|
3899
3967
|
*/
|
|
3900
3968
|
t(this, "lastOrder");
|
|
3901
3969
|
var e, s, i;
|
|
3902
|
-
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.city = new le(r == null ? void 0 : r.city), this.region = new re(r == null ? void 0 : r.region), this.country = new
|
|
3903
|
-
createdAt: new
|
|
3970
|
+
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.city = new le(r == null ? void 0 : r.city), this.region = new re(r == null ? void 0 : r.region), this.country = new Q(r == null ? void 0 : r.country), this.phone = r == null ? void 0 : r.phone, this.email = r == null ? void 0 : r.email, this.isActive = r && Object.prototype.hasOwnProperty.call(r, "isActive") ? r == null ? void 0 : r.isActive : !0, this.createdAt = new O(r == null ? void 0 : r.createdAt), this.lastLoginDate = new O(r == null ? void 0 : r.lastLoginDate), this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = r != null && r.managers && r.managers.length > 0 ? r.managers.map((o) => new ye(o)) : [], this.salesDirection = new S(r == null ? void 0 : r.salesDirection), this.contragentInn = r == null ? void 0 : r.contragentInn, this.contragentType = new G(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new K(r == null ? void 0 : r.preferredDeliveryType), this.partnerGroup = new M(r == null ? void 0 : r.partnerGroup), this.contact = new be(r == null ? void 0 : r.contact), this.lastOrder = {
|
|
3971
|
+
createdAt: new O((e = r == null ? void 0 : r.lastOrder) == null ? void 0 : e.createdAt),
|
|
3904
3972
|
creator: (s = r == null ? void 0 : r.lastOrder) == null ? void 0 : s.creator,
|
|
3905
3973
|
isApproved: (i = r == null ? void 0 : r.lastOrder) == null ? void 0 : i.isApproved
|
|
3906
3974
|
};
|
|
@@ -3973,11 +4041,11 @@ class It {
|
|
|
3973
4041
|
return Object.keys(this).forEach((l) => {
|
|
3974
4042
|
const p = this[l];
|
|
3975
4043
|
// eslint-disable-next-line prettier/prettier
|
|
3976
|
-
|
|
4044
|
+
_e(p) || m(p) && p.trim().length === 0 || Se(p.isNewRec) && p.isNewRec() || (r[l] = p);
|
|
3977
4045
|
}), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((s = r == null ? void 0 : r.createdAt) != null && s.to) && delete r.createdAt, !((i = r == null ? void 0 : r.lastLoginDate) != null && i.from) && !((o = r == null ? void 0 : r.lastLoginDate) != null && o.to) && delete r.lastLoginDate, r;
|
|
3978
4046
|
}
|
|
3979
4047
|
}
|
|
3980
|
-
class er extends
|
|
4048
|
+
class er extends H {
|
|
3981
4049
|
/**
|
|
3982
4050
|
* Инициализирует экземпляр класса {@link OrderShortInfo}.
|
|
3983
4051
|
*
|
|
@@ -3997,7 +4065,7 @@ class er extends d {
|
|
|
3997
4065
|
* Признак того, что заказ подтвержден в 1С.
|
|
3998
4066
|
*/
|
|
3999
4067
|
t(this, "isApproved1c");
|
|
4000
|
-
this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new
|
|
4068
|
+
this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new d(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
|
|
4001
4069
|
}
|
|
4002
4070
|
}
|
|
4003
4071
|
class et extends D {
|
|
@@ -4054,7 +4122,7 @@ class rt {
|
|
|
4054
4122
|
this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
|
|
4055
4123
|
}
|
|
4056
4124
|
}
|
|
4057
|
-
class
|
|
4125
|
+
class kt extends rt {
|
|
4058
4126
|
/**
|
|
4059
4127
|
* Инициализирует экземпляр класса {@link DataTablePagination}.
|
|
4060
4128
|
*
|
|
@@ -4085,7 +4153,7 @@ class xt extends rt {
|
|
|
4085
4153
|
this.itemCount = (e == null ? void 0 : e.itemCount) ?? 0, this.pageCount = (e == null ? void 0 : e.pageCount) ?? 1, this.pageSlot = (e == null ? void 0 : e.pageSlot) ?? 5, this.pageSizes = (e == null ? void 0 : e.pageSizes) ?? [25, 50, 100], this.showSizePicker = (e == null ? void 0 : e.showSizePicker) ?? !0;
|
|
4086
4154
|
}
|
|
4087
4155
|
}
|
|
4088
|
-
class
|
|
4156
|
+
class Nt {
|
|
4089
4157
|
/**
|
|
4090
4158
|
* Инициализирует экземпляр класса {@link ISortRequestParams}.
|
|
4091
4159
|
*
|
|
@@ -4103,7 +4171,7 @@ class kt {
|
|
|
4103
4171
|
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
4104
4172
|
}
|
|
4105
4173
|
}
|
|
4106
|
-
class
|
|
4174
|
+
class Ot extends we {
|
|
4107
4175
|
/**
|
|
4108
4176
|
* Возвращает данные об указанном клиенте.
|
|
4109
4177
|
*
|
|
@@ -4111,7 +4179,7 @@ class Nt extends we {
|
|
|
4111
4179
|
* @see /doc/api/internal#/Клиенты/api_internal_client_get_full_info
|
|
4112
4180
|
*/
|
|
4113
4181
|
getClient(r) {
|
|
4114
|
-
return this.get(`/internal/clients/${r}`, {}, (e) => new
|
|
4182
|
+
return this.get(`/internal/clients/${r}`, {}, (e) => new de(e.data));
|
|
4115
4183
|
}
|
|
4116
4184
|
/**
|
|
4117
4185
|
* Возвращает данные о клиентах, удовлетворяющих указанным параметрам поиска.
|
|
@@ -4139,7 +4207,7 @@ class Nt extends we {
|
|
|
4139
4207
|
return this.getClientsList({
|
|
4140
4208
|
groupOp: "and",
|
|
4141
4209
|
groups: [],
|
|
4142
|
-
filters: [{ field: "phone", op:
|
|
4210
|
+
filters: [{ field: "phone", op: xe.Contains, value: r }]
|
|
4143
4211
|
});
|
|
4144
4212
|
}
|
|
4145
4213
|
/**
|
|
@@ -4195,7 +4263,7 @@ class Nt extends we {
|
|
|
4195
4263
|
is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients,
|
|
4196
4264
|
preferred_warehouse_id: (s = r.preferredWarehouse) == null ? void 0 : s.id
|
|
4197
4265
|
},
|
|
4198
|
-
(i) => new
|
|
4266
|
+
(i) => new de(i.data),
|
|
4199
4267
|
e
|
|
4200
4268
|
);
|
|
4201
4269
|
}
|
|
@@ -4305,7 +4373,7 @@ class Nt extends we {
|
|
|
4305
4373
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
|
|
4306
4374
|
*/
|
|
4307
4375
|
createContragentClientData(r, e, s = {}) {
|
|
4308
|
-
var g,
|
|
4376
|
+
var g, A, $, a, I, x, k, N;
|
|
4309
4377
|
let i;
|
|
4310
4378
|
const o = e, l = e, p = e;
|
|
4311
4379
|
switch (e.opf.slug) {
|
|
@@ -4315,7 +4383,7 @@ class Nt extends we {
|
|
|
4315
4383
|
name: o.name,
|
|
4316
4384
|
alternative_name: o.alternativeName,
|
|
4317
4385
|
partner_group_id: (g = o.partnerGroup) == null ? void 0 : g.id,
|
|
4318
|
-
manager_id: (
|
|
4386
|
+
manager_id: (A = o.manager) == null ? void 0 : A.id,
|
|
4319
4387
|
comment: o.comment,
|
|
4320
4388
|
inn: o.inn,
|
|
4321
4389
|
okpo: o.okpo,
|
|
@@ -4332,8 +4400,8 @@ class Nt extends we {
|
|
|
4332
4400
|
opf: l.opf.slug,
|
|
4333
4401
|
name: l.name,
|
|
4334
4402
|
alternative_name: l.alternativeName,
|
|
4335
|
-
partner_group_id: (
|
|
4336
|
-
manager_id: (
|
|
4403
|
+
partner_group_id: ($ = l.partnerGroup) == null ? void 0 : $.id,
|
|
4404
|
+
manager_id: (a = l.manager) == null ? void 0 : a.id,
|
|
4337
4405
|
comment: l.comment,
|
|
4338
4406
|
inn: l.inn,
|
|
4339
4407
|
kpp: l.kpp,
|
|
@@ -4379,7 +4447,7 @@ class Nt extends we {
|
|
|
4379
4447
|
return this.post(
|
|
4380
4448
|
`/internal/clients/${r}/contragents`,
|
|
4381
4449
|
i,
|
|
4382
|
-
(
|
|
4450
|
+
(q) => ue.createInstance(q.data),
|
|
4383
4451
|
s
|
|
4384
4452
|
);
|
|
4385
4453
|
}
|
|
@@ -4394,7 +4462,7 @@ class Nt extends we {
|
|
|
4394
4462
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
|
|
4395
4463
|
*/
|
|
4396
4464
|
updateContragentClientData(r, e, s = {}) {
|
|
4397
|
-
var g,
|
|
4465
|
+
var g, A, $, a, I, x, k, N;
|
|
4398
4466
|
let i;
|
|
4399
4467
|
const o = e, l = e, p = e;
|
|
4400
4468
|
switch (e.opf.slug) {
|
|
@@ -4404,7 +4472,7 @@ class Nt extends we {
|
|
|
4404
4472
|
name: o.name,
|
|
4405
4473
|
alternative_name: o.alternativeName,
|
|
4406
4474
|
partner_group_id: (g = o.partnerGroup) == null ? void 0 : g.id,
|
|
4407
|
-
manager_id: (
|
|
4475
|
+
manager_id: (A = o.manager) == null ? void 0 : A.id,
|
|
4408
4476
|
comment: o.comment,
|
|
4409
4477
|
inn: o.inn,
|
|
4410
4478
|
okpo: o.okpo,
|
|
@@ -4421,8 +4489,8 @@ class Nt extends we {
|
|
|
4421
4489
|
opf: l.opf.slug,
|
|
4422
4490
|
name: l.name,
|
|
4423
4491
|
alternative_name: l.alternativeName,
|
|
4424
|
-
partner_group_id: (
|
|
4425
|
-
manager_id: (
|
|
4492
|
+
partner_group_id: ($ = l.partnerGroup) == null ? void 0 : $.id,
|
|
4493
|
+
manager_id: (a = l.manager) == null ? void 0 : a.id,
|
|
4426
4494
|
comment: l.comment,
|
|
4427
4495
|
inn: l.inn,
|
|
4428
4496
|
kpp: l.kpp,
|
|
@@ -4468,7 +4536,7 @@ class Nt extends we {
|
|
|
4468
4536
|
return this.patch(
|
|
4469
4537
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
4470
4538
|
i,
|
|
4471
|
-
(
|
|
4539
|
+
(q) => ue.createInstance(q.data),
|
|
4472
4540
|
s
|
|
4473
4541
|
);
|
|
4474
4542
|
}
|
|
@@ -4830,7 +4898,7 @@ class Nt extends we {
|
|
|
4830
4898
|
return this.get(`/internal/clients/${r.id}/verification/email?email=${r.email}`);
|
|
4831
4899
|
}
|
|
4832
4900
|
}
|
|
4833
|
-
class
|
|
4901
|
+
class qt extends u {
|
|
4834
4902
|
/**
|
|
4835
4903
|
* Выполняет проверку занят ли указанный номер телефона.
|
|
4836
4904
|
*
|
|
@@ -4844,7 +4912,7 @@ class Ot extends u {
|
|
|
4844
4912
|
});
|
|
4845
4913
|
}
|
|
4846
4914
|
}
|
|
4847
|
-
class
|
|
4915
|
+
class Ut extends u {
|
|
4848
4916
|
/**
|
|
4849
4917
|
* Возвращает настройки указанного конфигуратора для указанной категории.
|
|
4850
4918
|
*
|
|
@@ -4915,7 +4983,7 @@ class qt extends u {
|
|
|
4915
4983
|
return this.delete(`internal/catalog/categories/${r.id}/configurators/${(s = r.properties) == null ? void 0 : s.editor}/template/${e}`);
|
|
4916
4984
|
}
|
|
4917
4985
|
}
|
|
4918
|
-
class
|
|
4986
|
+
class dt {
|
|
4919
4987
|
/**
|
|
4920
4988
|
* Возвращает диапазон дат по умолчанию.
|
|
4921
4989
|
*/
|
|
@@ -4924,20 +4992,20 @@ class Ut {
|
|
|
4924
4992
|
return {
|
|
4925
4993
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
4926
4994
|
nextWorkingDay: { label: "Следующий рабочий день", from: Dr(r), to: Rr(r) },
|
|
4927
|
-
today: { label: "Сегодня", from:
|
|
4995
|
+
today: { label: "Сегодня", from: Fe(), to: Pr() },
|
|
4928
4996
|
yesterday: { label: "Вчера", from: vr(), to: Cr() },
|
|
4929
4997
|
tomorrow: { label: "Завтра", from: wr(), to: yr() }
|
|
4930
4998
|
};
|
|
4931
4999
|
}
|
|
4932
5000
|
}
|
|
4933
|
-
const
|
|
5001
|
+
const E = class E {
|
|
4934
5002
|
/**
|
|
4935
5003
|
* Устанавливает список единиц измерения линейной величины.
|
|
4936
5004
|
*
|
|
4937
5005
|
* @param linearValues Список единиц измерения линейной величины.
|
|
4938
5006
|
*/
|
|
4939
5007
|
static setLinearValues(r) {
|
|
4940
|
-
|
|
5008
|
+
E.linearValues = r;
|
|
4941
5009
|
}
|
|
4942
5010
|
/**
|
|
4943
5011
|
* Возвращает признак, что указанный товар имеет линейную единицу измерения.
|
|
@@ -4945,7 +5013,7 @@ const V = class V {
|
|
|
4945
5013
|
* @param product Данные о товаре для которого нужно проверить линейность его единицы измерения.
|
|
4946
5014
|
*/
|
|
4947
5015
|
static productIsMeasurable(r) {
|
|
4948
|
-
return
|
|
5016
|
+
return E.linearValues.includes(r.unit);
|
|
4949
5017
|
}
|
|
4950
5018
|
/**
|
|
4951
5019
|
* Возвращает кратность количества для указанного товара.
|
|
@@ -4954,7 +5022,7 @@ const V = class V {
|
|
|
4954
5022
|
*/
|
|
4955
5023
|
static getProductMultiplicity(r) {
|
|
4956
5024
|
var e, s;
|
|
4957
|
-
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((s = r.properties) != null && s.minCount) && !
|
|
5025
|
+
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((s = r.properties) != null && s.minCount) && !E.productIsMeasurable(r) ? r.properties.minCount : 1;
|
|
4958
5026
|
}
|
|
4959
5027
|
/**
|
|
4960
5028
|
* Возвращает кратность длины для указанного товара.
|
|
@@ -4969,8 +5037,8 @@ const V = class V {
|
|
|
4969
5037
|
/**
|
|
4970
5038
|
* Список единиц измерения линейной величины.
|
|
4971
5039
|
*/
|
|
4972
|
-
t(
|
|
4973
|
-
let
|
|
5040
|
+
t(E, "linearValues", ["пог.м.", "м.", "м2"]);
|
|
5041
|
+
let Ge = E;
|
|
4974
5042
|
class Gt {
|
|
4975
5043
|
/**
|
|
4976
5044
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
@@ -4994,7 +5062,7 @@ class tt extends u {
|
|
|
4994
5062
|
getManagers() {
|
|
4995
5063
|
const r = "/internal/managers", e = u.getCachedResponse(r);
|
|
4996
5064
|
return e ? Promise.resolve(e) : this.get(r).then((s) => {
|
|
4997
|
-
const i = s.data.map((o) =>
|
|
5065
|
+
const i = s.data.map((o) => ae.instanceInitializer(ye, o));
|
|
4998
5066
|
return i && this.cacheResponse(r, i), i;
|
|
4999
5067
|
});
|
|
5000
5068
|
}
|
|
@@ -5006,7 +5074,7 @@ class rr extends er {
|
|
|
5006
5074
|
* @param data Данные для первоначальной инициализации.
|
|
5007
5075
|
*/
|
|
5008
5076
|
constructor(e) {
|
|
5009
|
-
var s, i, o, l, p, g,
|
|
5077
|
+
var s, i, o, l, p, g, A, $;
|
|
5010
5078
|
super(e);
|
|
5011
5079
|
/**
|
|
5012
5080
|
* Краткие данные о клиенте.
|
|
@@ -5055,12 +5123,12 @@ class rr extends er {
|
|
|
5055
5123
|
}, this.delivery = {
|
|
5056
5124
|
type: ((l = e == null ? void 0 : e.delivery) == null ? void 0 : l.type) ?? -1,
|
|
5057
5125
|
date: m((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ? f(e.delivery.date) : ((g = e == null ? void 0 : e.delivery) == null ? void 0 : g.date) ?? /* @__PURE__ */ new Date(),
|
|
5058
|
-
address: (
|
|
5059
|
-
warehouse: (
|
|
5060
|
-
}, this.attachedUser = new
|
|
5126
|
+
address: (A = e == null ? void 0 : e.delivery) != null && A.address ? new he(e.delivery.address) : void 0,
|
|
5127
|
+
warehouse: ($ = e == null ? void 0 : e.delivery) != null && $.warehouse ? new fe(e.delivery.warehouse) : void 0
|
|
5128
|
+
}, this.attachedUser = new d(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new S(e == null ? void 0 : e.salesDirection), this.pendingAt = m(e == null ? void 0 : e.pendingAt) ? f(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = m(e == null ? void 0 : e.processedAt) ? f(e.processedAt) : e == null ? void 0 : e.processedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1;
|
|
5061
5129
|
}
|
|
5062
5130
|
}
|
|
5063
|
-
class st extends
|
|
5131
|
+
class st extends H {
|
|
5064
5132
|
/**
|
|
5065
5133
|
* Инициализирует экземпляр класса {@link OrderProduct}.
|
|
5066
5134
|
*
|
|
@@ -5140,7 +5208,7 @@ class st extends d {
|
|
|
5140
5208
|
* который соответствует указанной ширине. Количество не ограничено.
|
|
5141
5209
|
*/
|
|
5142
5210
|
t(this, "sawing");
|
|
5143
|
-
this.product = new
|
|
5211
|
+
this.product = new J(e.product), this.quantity = e.quantity, this.currency = e.currency, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.cost = e.cost, this.costRub = e.costRub, this.marker = e.marker, this.height = e.height, this.length = e.length, this.width = e.width, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams, this.sawing = e.sawing;
|
|
5144
5212
|
}
|
|
5145
5213
|
}
|
|
5146
5214
|
class it extends rr {
|
|
@@ -5238,7 +5306,7 @@ class nt {
|
|
|
5238
5306
|
this.name = r.name, this.content = r.content;
|
|
5239
5307
|
}
|
|
5240
5308
|
}
|
|
5241
|
-
class
|
|
5309
|
+
class Me {
|
|
5242
5310
|
/**
|
|
5243
5311
|
* Инициализирует экземпляр класса {@link Seo}.
|
|
5244
5312
|
*
|
|
@@ -5285,7 +5353,7 @@ class Ft extends u {
|
|
|
5285
5353
|
* @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
|
|
5286
5354
|
*/
|
|
5287
5355
|
getResourceSeoData(r, e) {
|
|
5288
|
-
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new
|
|
5356
|
+
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new Me(s.data));
|
|
5289
5357
|
}
|
|
5290
5358
|
/**
|
|
5291
5359
|
* Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
|
|
@@ -5296,7 +5364,7 @@ class Ft extends u {
|
|
|
5296
5364
|
* в случае ошибок в запросах.
|
|
5297
5365
|
*/
|
|
5298
5366
|
saveResourceSeoData(r, e = {}) {
|
|
5299
|
-
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new
|
|
5367
|
+
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new Me(s.data), e);
|
|
5300
5368
|
}
|
|
5301
5369
|
/**
|
|
5302
5370
|
* Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
|
|
@@ -5309,7 +5377,7 @@ class Ft extends u {
|
|
|
5309
5377
|
}
|
|
5310
5378
|
}
|
|
5311
5379
|
const P = ge("__references_private", () => {
|
|
5312
|
-
const n = C({}), r = C(void 0), e = C(void 0), s = C(void 0), i = C(void 0), o = C(void 0), l = C(void 0), p = C(void 0), g = C(void 0),
|
|
5380
|
+
const n = C({}), r = C(void 0), e = C(void 0), s = C(void 0), i = C(void 0), o = C(void 0), l = C(void 0), p = C(void 0), g = C(void 0), A = C(void 0), $ = C(void 0), a = C(void 0), I = C(void 0), x = C(void 0), k = C(void 0), N = C(void 0), q = C(void 0), c = C(void 0);
|
|
5313
5381
|
return {
|
|
5314
5382
|
/**
|
|
5315
5383
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -5350,15 +5418,15 @@ const P = ge("__references_private", () => {
|
|
|
5350
5418
|
/**
|
|
5351
5419
|
* Справочник типов оплаты заказов.
|
|
5352
5420
|
*/
|
|
5353
|
-
paymentTypeReference:
|
|
5421
|
+
paymentTypeReference: A,
|
|
5354
5422
|
/**
|
|
5355
5423
|
* Справочник групп партнеров.
|
|
5356
5424
|
*/
|
|
5357
|
-
partnerGroupReference:
|
|
5425
|
+
partnerGroupReference: $,
|
|
5358
5426
|
/**
|
|
5359
5427
|
* Справочник типов файлов продукктов/категорий.
|
|
5360
5428
|
*/
|
|
5361
|
-
productFileTypeReference:
|
|
5429
|
+
productFileTypeReference: a,
|
|
5362
5430
|
/**
|
|
5363
5431
|
* Справочник типов ресурсов.
|
|
5364
5432
|
*/
|
|
@@ -5378,13 +5446,13 @@ const P = ge("__references_private", () => {
|
|
|
5378
5446
|
/**
|
|
5379
5447
|
* Справочник типов свойств.
|
|
5380
5448
|
*/
|
|
5381
|
-
propertyTypesReference:
|
|
5449
|
+
propertyTypesReference: q,
|
|
5382
5450
|
/**
|
|
5383
5451
|
* Справочник коэффициентов цен.
|
|
5384
5452
|
*/
|
|
5385
5453
|
priceCoefficientsReference: c
|
|
5386
5454
|
};
|
|
5387
|
-
}),
|
|
5455
|
+
}), Ht = ge("references", () => {
|
|
5388
5456
|
const n = v(() => {
|
|
5389
5457
|
const c = P();
|
|
5390
5458
|
return !c.channelPrimaryInterestReference && !c.dataLoaderList.channelPrimaryInterestReference && (c.dataLoaderList.channelPrimaryInterestReference = !0, u.getInstance(R).getChannelPrimaryInterest().then((h) => {
|
|
@@ -5430,17 +5498,17 @@ const P = ge("__references_private", () => {
|
|
|
5430
5498
|
return !c.productFileTypeReference && !c.dataLoaderList.productFileTypeReference && (c.dataLoaderList.productFileTypeReference = !0, u.getInstance(R).getProductFileType().then((h) => {
|
|
5431
5499
|
c.productFileTypeReference = h;
|
|
5432
5500
|
}).catch(y)), c.productFileTypeReference;
|
|
5433
|
-
}),
|
|
5501
|
+
}), A = v(() => {
|
|
5434
5502
|
const c = P();
|
|
5435
5503
|
return !c.resourceTypesReference && !c.dataLoaderList.resourceTypesReference && (c.dataLoaderList.resourceTypesReference = !0, u.getInstance(R).getResourceTypes().then((h) => {
|
|
5436
5504
|
c.resourceTypesReference = h;
|
|
5437
5505
|
}).catch(y)), c.resourceTypesReference;
|
|
5438
|
-
}),
|
|
5506
|
+
}), $ = v(() => {
|
|
5439
5507
|
const c = P();
|
|
5440
5508
|
return !c.salesDirectionsReference && !c.dataLoaderList.salesDirectionsReference && (c.dataLoaderList.salesDirectionsReference = !0, u.getInstance(R).getSalesDirections().then((h) => {
|
|
5441
5509
|
c.salesDirectionsReference = h;
|
|
5442
5510
|
}).catch(y)), c.salesDirectionsReference;
|
|
5443
|
-
}),
|
|
5511
|
+
}), a = v(() => {
|
|
5444
5512
|
const c = P();
|
|
5445
5513
|
return !c.sourcePrimaryInterestReference && !c.dataLoaderList.sourcePrimaryInterestReference && (c.dataLoaderList.sourcePrimaryInterestReference = !0, u.getInstance(R).getSourcePrimaryInterest().then((h) => {
|
|
5446
5514
|
c.sourcePrimaryInterestReference = h;
|
|
@@ -5465,7 +5533,7 @@ const P = ge("__references_private", () => {
|
|
|
5465
5533
|
return !c.propertyTypesReference && !c.dataLoaderList.propertyTypesReference && (c.dataLoaderList.propertyTypesReference = !0, u.getInstance(R).getPropertyTypes().then((h) => {
|
|
5466
5534
|
c.propertyTypesReference = h;
|
|
5467
5535
|
}).catch(y)), c.propertyTypesReference;
|
|
5468
|
-
}),
|
|
5536
|
+
}), q = v(() => {
|
|
5469
5537
|
const c = P();
|
|
5470
5538
|
return !c.priceCoefficientsReference && !c.dataLoaderList.priceCoefficientsReference && (c.dataLoaderList.priceCoefficientsReference = !0, u.getInstance(R).getPriceCoefficients().then((h) => {
|
|
5471
5539
|
c.priceCoefficientsReference = h;
|
|
@@ -5511,15 +5579,15 @@ const P = ge("__references_private", () => {
|
|
|
5511
5579
|
/**
|
|
5512
5580
|
* Справочник типов ресурсов.
|
|
5513
5581
|
*/
|
|
5514
|
-
resourceTypesReference:
|
|
5582
|
+
resourceTypesReference: A,
|
|
5515
5583
|
/**
|
|
5516
5584
|
* Справочник направлений продаж.
|
|
5517
5585
|
*/
|
|
5518
|
-
salesDirectionsReference:
|
|
5586
|
+
salesDirectionsReference: $,
|
|
5519
5587
|
/**
|
|
5520
5588
|
* Справочник каналов первичного интереса.
|
|
5521
5589
|
*/
|
|
5522
|
-
sourcePrimaryInterestsReference:
|
|
5590
|
+
sourcePrimaryInterestsReference: a,
|
|
5523
5591
|
/**
|
|
5524
5592
|
* Справочник типов доставки.
|
|
5525
5593
|
*/
|
|
@@ -5539,7 +5607,7 @@ const P = ge("__references_private", () => {
|
|
|
5539
5607
|
/**
|
|
5540
5608
|
* Справочник коэффициентов цен.
|
|
5541
5609
|
*/
|
|
5542
|
-
priceCoefficientsReference:
|
|
5610
|
+
priceCoefficientsReference: q
|
|
5543
5611
|
};
|
|
5544
5612
|
}), ot = ge("__user_state_private", () => {
|
|
5545
5613
|
const n = C({}), r = C(void 0);
|
|
@@ -5553,18 +5621,18 @@ const P = ge("__references_private", () => {
|
|
|
5553
5621
|
*/
|
|
5554
5622
|
currentUser: r
|
|
5555
5623
|
};
|
|
5556
|
-
}),
|
|
5624
|
+
}), zt = ge("user_state", () => ({
|
|
5557
5625
|
/**
|
|
5558
5626
|
* Данные о текущем пользователе.
|
|
5559
5627
|
*/
|
|
5560
5628
|
currentUser: v(() => {
|
|
5561
5629
|
const r = ot();
|
|
5562
|
-
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, u.getInstance(
|
|
5630
|
+
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, u.getInstance(Kr).getCurrentUser().then((e) => {
|
|
5563
5631
|
r.currentUser = e;
|
|
5564
5632
|
}).catch(y).finally(y)), r.currentUser;
|
|
5565
5633
|
})
|
|
5566
5634
|
}));
|
|
5567
|
-
class
|
|
5635
|
+
class Bt extends u {
|
|
5568
5636
|
/**
|
|
5569
5637
|
* Возвращает подсказки по адресам.
|
|
5570
5638
|
*
|
|
@@ -5611,7 +5679,7 @@ class zt extends u {
|
|
|
5611
5679
|
});
|
|
5612
5680
|
}
|
|
5613
5681
|
}
|
|
5614
|
-
class
|
|
5682
|
+
class Wt {
|
|
5615
5683
|
/**
|
|
5616
5684
|
* Инициализирует экземпляр класса {@link FieldValidationResultData}.
|
|
5617
5685
|
*
|
|
@@ -5635,38 +5703,38 @@ class Bt {
|
|
|
5635
5703
|
}
|
|
5636
5704
|
}
|
|
5637
5705
|
export {
|
|
5638
|
-
|
|
5706
|
+
Fr as AnyReference,
|
|
5639
5707
|
ft as AppBaseConfig,
|
|
5640
5708
|
T as AppConfigProvider,
|
|
5641
5709
|
Te as BankAccount,
|
|
5642
5710
|
we as BasePaginationProvider,
|
|
5643
5711
|
Nr as CalculationTypeEnum,
|
|
5644
5712
|
ne as Cart,
|
|
5645
|
-
|
|
5713
|
+
Lr as CartItem,
|
|
5646
5714
|
Sr as CartItemBase,
|
|
5647
5715
|
yt as CartProvider,
|
|
5648
|
-
|
|
5716
|
+
Pt as CatalogProvider,
|
|
5649
5717
|
He as CatalogableItem,
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5718
|
+
U as Category,
|
|
5719
|
+
Oe as CategoryPricingRule,
|
|
5720
|
+
Ke as ChannelPrimaryInterest,
|
|
5721
|
+
vt as City,
|
|
5654
5722
|
le as CityWithRegionAndCountry,
|
|
5655
|
-
|
|
5723
|
+
de as Client,
|
|
5656
5724
|
et as ClientAdditionalData,
|
|
5657
5725
|
ce as ClientCategory,
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5726
|
+
Ot as ClientDataProvider,
|
|
5727
|
+
Rt as ClientPriceProvider,
|
|
5728
|
+
Dt as ClientPriceTemplateProvider,
|
|
5729
|
+
J as ClientProduct,
|
|
5730
|
+
Tt as ClientProductCategoryDataProvider,
|
|
5731
|
+
bt as ClientProductDataProvider,
|
|
5664
5732
|
ie as ClientShortInfo,
|
|
5665
5733
|
Qr as ClientsAdditionalDataRequestTypeEnum,
|
|
5666
|
-
|
|
5667
|
-
|
|
5734
|
+
xt as ClientsListFilters,
|
|
5735
|
+
Ut as ConfiguratorProvider,
|
|
5668
5736
|
be as Contact,
|
|
5669
|
-
|
|
5737
|
+
Gr as ContactLinks,
|
|
5670
5738
|
F as ContactPerson,
|
|
5671
5739
|
Zr as ContactPersonRelated,
|
|
5672
5740
|
Hr as ContactPosition,
|
|
@@ -5677,30 +5745,30 @@ export {
|
|
|
5677
5745
|
Yr as ContragentPerson,
|
|
5678
5746
|
Xr as ContragentUlNr,
|
|
5679
5747
|
Ze as ContragentUlR,
|
|
5680
|
-
|
|
5681
|
-
|
|
5748
|
+
Ie as CostSourceEnum,
|
|
5749
|
+
Q as Country,
|
|
5682
5750
|
pe as Currency,
|
|
5683
|
-
|
|
5684
|
-
|
|
5751
|
+
Bt as DataSuggestionProvider,
|
|
5752
|
+
kt as DataTablePagination,
|
|
5685
5753
|
rt as DataTablePaginationRequestParams,
|
|
5686
|
-
|
|
5687
|
-
|
|
5754
|
+
Nt as DataTableSortRequestParams,
|
|
5755
|
+
dt as DateTimeProvider,
|
|
5688
5756
|
Ur as DeletableNamedIdentity,
|
|
5689
5757
|
he as DeliveryAddress,
|
|
5690
5758
|
K as DeliveryType,
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5759
|
+
ar as DeviceTypeResolutionConfig,
|
|
5760
|
+
dr as DiscountShortInfo,
|
|
5761
|
+
Wt as FieldValidationResultData,
|
|
5694
5762
|
te as FilterGroup,
|
|
5695
|
-
|
|
5696
|
-
|
|
5763
|
+
qe as FilterItem,
|
|
5764
|
+
xe as FilterOpEnum,
|
|
5697
5765
|
Be as GeoCoordinates,
|
|
5698
5766
|
br as HiddenCatalogableItem,
|
|
5699
|
-
|
|
5700
|
-
|
|
5767
|
+
$e as HttpBaseCachedRequester,
|
|
5768
|
+
Ae as HttpBaseRequester,
|
|
5701
5769
|
Ir as HttpParamsConfig,
|
|
5702
5770
|
u as HttpRequester,
|
|
5703
|
-
|
|
5771
|
+
H as Identity,
|
|
5704
5772
|
_r as Image,
|
|
5705
5773
|
ye as Manager,
|
|
5706
5774
|
ee as ManagerCommon,
|
|
@@ -5721,54 +5789,55 @@ export {
|
|
|
5721
5789
|
Wr as PaymentType,
|
|
5722
5790
|
wt as PreferencesStorageProvider,
|
|
5723
5791
|
Pe as PriceAnalyze,
|
|
5724
|
-
|
|
5792
|
+
It as PriceAnalyzeProvider,
|
|
5725
5793
|
me as PriceCoefficient,
|
|
5726
5794
|
ze as PriceCoefficientEnum,
|
|
5727
|
-
|
|
5795
|
+
W as PriceTemplate,
|
|
5728
5796
|
Ce as PriceTemplateCategory,
|
|
5729
5797
|
Y as PriceTemplateClient,
|
|
5730
5798
|
je as PriceTemplateICatalogableItem,
|
|
5731
5799
|
ve as PriceTemplateProduct,
|
|
5732
|
-
|
|
5800
|
+
_t as PriceTemplateProvider,
|
|
5733
5801
|
Z as PricingRole,
|
|
5734
|
-
|
|
5802
|
+
St as PricingRoleProvider,
|
|
5735
5803
|
De as PrimaryCatalogableItem,
|
|
5736
5804
|
_ as Product,
|
|
5737
|
-
|
|
5805
|
+
At as ProductCategoryDataProvider,
|
|
5738
5806
|
$t as ProductDataProvider,
|
|
5739
5807
|
jr as ProductFileType,
|
|
5740
|
-
|
|
5808
|
+
Le as ProductPriceCoefficient,
|
|
5741
5809
|
Jr as ProductPriceHistory,
|
|
5742
|
-
|
|
5810
|
+
Lt as PropertiesProvider,
|
|
5743
5811
|
X as Property,
|
|
5744
|
-
|
|
5812
|
+
Ee as PropertyType,
|
|
5745
5813
|
Or as PropertyTypeEnum,
|
|
5746
|
-
|
|
5814
|
+
z as PropertyValue,
|
|
5747
5815
|
at as RecommendationsDataProvider,
|
|
5748
|
-
|
|
5816
|
+
Ne as RecommendationsList,
|
|
5749
5817
|
w as Reference,
|
|
5750
5818
|
R as ReferenceDataProvider,
|
|
5751
5819
|
re as Region,
|
|
5752
5820
|
Je as ResourceType,
|
|
5753
5821
|
S as SalesDirection,
|
|
5754
5822
|
xr as SentryConfig,
|
|
5755
|
-
|
|
5823
|
+
Me as Seo,
|
|
5756
5824
|
Ft as SeoDataProvider,
|
|
5757
5825
|
Qe as SourcePrimaryInterest,
|
|
5758
5826
|
Tr as StockCount,
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5827
|
+
Ct as TemplatesListFilters,
|
|
5828
|
+
ae as TypedInstanceFactory,
|
|
5829
|
+
Ge as UnitsHelper,
|
|
5830
|
+
qt as UnknownClientDataProvider,
|
|
5762
5831
|
We as UpdatableNamedIdentity,
|
|
5763
|
-
|
|
5832
|
+
Er as User,
|
|
5764
5833
|
Ve as UserCommonInfo,
|
|
5765
|
-
|
|
5766
|
-
|
|
5834
|
+
Kr as UserDataProvider,
|
|
5835
|
+
d as UserShortInfo,
|
|
5767
5836
|
Vr as UserTypeEnum,
|
|
5768
5837
|
kr as VersionConfig,
|
|
5769
5838
|
fe as Warehouse,
|
|
5770
5839
|
qr as WindowResolutionEnum,
|
|
5771
|
-
|
|
5772
|
-
|
|
5840
|
+
Ht as useReferencesStore,
|
|
5841
|
+
zt as useUserStateStore
|
|
5773
5842
|
};
|
|
5774
5843
|
//# sourceMappingURL=sc-common-lib.js.map
|