@snabcentr/common-lib 1.46.0 → 1.48.0
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 +262 -230
- 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/enums/calculation-type-enum.d.ts +18 -0
- package/dist/src/catalog/enums/calculation-type-enum.d.ts.map +1 -0
- package/dist/src/catalog/enums/index.d.ts +1 -0
- package/dist/src/catalog/enums/index.d.ts.map +1 -1
- package/dist/src/catalog/enums/price-coefficient-enum.d.ts +5 -1
- package/dist/src/catalog/enums/price-coefficient-enum.d.ts.map +1 -1
- package/dist/src/catalog/interfaces/i-price-update-data.d.ts +5 -6
- package/dist/src/catalog/interfaces/i-price-update-data.d.ts.map +1 -1
- package/dist/src/catalog/providers/client-price-provider.d.ts.map +1 -1
- package/dist/src/catalog/providers/price-template-provider.d.ts.map +1 -1
- package/dist/src/references/classes/price-coefficient.d.ts +5 -0
- package/dist/src/references/classes/price-coefficient.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/sc-common-lib.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var t = (n, r, e) =>
|
|
4
|
-
import { isUndefined as
|
|
5
|
-
import { format as Y, addSeconds as
|
|
6
|
-
import
|
|
7
|
-
import { objectToSnake as xe, objectToCamel as
|
|
1
|
+
var er = Object.defineProperty;
|
|
2
|
+
var rr = (n, r, e) => r in n ? er(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
|
+
var t = (n, r, e) => rr(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
+
import { constant as tr, isUndefined as sr, cloneDeep as ir, noop as m, toLower as nr, isString as C, isNil as Me, isFunction as or, isEmpty as cr, isArray as lr, map as ne, forEach as pr } from "lodash-es";
|
|
5
|
+
import { format as Y, addSeconds as ur, parseISO as D, isAfter as hr, startOfToday as $e, parse as E, getDay as gr, startOfTomorrow as Ce, nextMonday as mr, getUnixTime as k, endOfTomorrow as fr, endOfYesterday as yr, startOfYesterday as wr, endOfToday as Cr, endOfDay as vr, startOfDay as Pr } from "date-fns";
|
|
6
|
+
import Rr from "axios";
|
|
7
|
+
import { objectToSnake as xe, objectToCamel as ar } from "ts-case-convert";
|
|
8
8
|
import { defineStore as ge } from "pinia";
|
|
9
9
|
import { ref as y, computed as w } from "vue";
|
|
10
10
|
class F {
|
|
@@ -107,6 +107,7 @@ class te extends De {
|
|
|
107
107
|
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category";
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
+
var Ge = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(Ge || {});
|
|
110
111
|
class f extends a {
|
|
111
112
|
/**
|
|
112
113
|
* Инициализирует экземпляр класса {@link Reference}.
|
|
@@ -127,6 +128,12 @@ class f extends a {
|
|
|
127
128
|
}
|
|
128
129
|
}
|
|
129
130
|
class me extends f {
|
|
131
|
+
/**
|
|
132
|
+
* Возвращает значение справочника коэффициента розничной цены.
|
|
133
|
+
*/
|
|
134
|
+
static getRetailPriceCoefficient() {
|
|
135
|
+
return { id: -2, slug: Ge.Retail, name: "Розничная цена", guid: "", isNewRec: tr(!0) };
|
|
136
|
+
}
|
|
130
137
|
}
|
|
131
138
|
class Se {
|
|
132
139
|
/**
|
|
@@ -158,7 +165,7 @@ class Se {
|
|
|
158
165
|
this.coefficient = new me(r == null ? void 0 : r.coefficient), this.value = (r == null ? void 0 : r.value) ?? 0, this.cost = (r == null ? void 0 : r.cost) ?? 0, this.percent = (r == null ? void 0 : r.percent) ?? 0, this.readOnly = (r == null ? void 0 : r.readOnly) ?? !0;
|
|
159
166
|
}
|
|
160
167
|
}
|
|
161
|
-
class
|
|
168
|
+
class He {
|
|
162
169
|
/**
|
|
163
170
|
* Инициализирует экземпляр класса {@link GeoCoordinates}.
|
|
164
171
|
*
|
|
@@ -207,10 +214,10 @@ class fe extends f {
|
|
|
207
214
|
* Координаты склада.
|
|
208
215
|
*/
|
|
209
216
|
t(this, "coordinates");
|
|
210
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((i) => new K(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new
|
|
217
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((i) => new K(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new He(e == null ? void 0 : e.coordinates);
|
|
211
218
|
}
|
|
212
219
|
}
|
|
213
|
-
class
|
|
220
|
+
class $r {
|
|
214
221
|
/**
|
|
215
222
|
* Инициализирует экземпляр класса {@link StockCount}.
|
|
216
223
|
*
|
|
@@ -242,7 +249,7 @@ const W = class W {
|
|
|
242
249
|
*/
|
|
243
250
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
244
251
|
static getConfig() {
|
|
245
|
-
if (
|
|
252
|
+
if (sr(W.config))
|
|
246
253
|
throw new Error("Config is undefined. Please set config by AppConfigProvider.init().");
|
|
247
254
|
return W.config;
|
|
248
255
|
}
|
|
@@ -265,7 +272,7 @@ const W = class W {
|
|
|
265
272
|
*/
|
|
266
273
|
t(W, "config");
|
|
267
274
|
let N = W;
|
|
268
|
-
class
|
|
275
|
+
class Dr extends Ue {
|
|
269
276
|
/**
|
|
270
277
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
271
278
|
*
|
|
@@ -280,7 +287,7 @@ class ar extends Ue {
|
|
|
280
287
|
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1;
|
|
281
288
|
}
|
|
282
289
|
}
|
|
283
|
-
class
|
|
290
|
+
class Ar {
|
|
284
291
|
/**
|
|
285
292
|
* Инициализирует экземпляр класса {@link Image}.
|
|
286
293
|
*
|
|
@@ -303,7 +310,7 @@ class $r {
|
|
|
303
310
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
304
311
|
}
|
|
305
312
|
}
|
|
306
|
-
class T extends
|
|
313
|
+
class T extends Dr {
|
|
307
314
|
/**
|
|
308
315
|
* Инициализирует экземпляр класса {@link Product}.
|
|
309
316
|
*
|
|
@@ -376,9 +383,9 @@ class T extends ar {
|
|
|
376
383
|
* Список коэффициентов цен на продукт.
|
|
377
384
|
*/
|
|
378
385
|
t(this, "priceCoefficients");
|
|
379
|
-
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 = 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
|
|
386
|
+
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 = 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 $r(g))) ?? [], this.type = "product";
|
|
380
387
|
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((g) => g.isPrimary));
|
|
381
|
-
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
|
|
388
|
+
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 Ar(g, N.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 Se(g))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
382
389
|
}
|
|
383
390
|
/**
|
|
384
391
|
* Возвращает признак, что это измеряемый товар.
|
|
@@ -388,7 +395,7 @@ class T extends ar {
|
|
|
388
395
|
return [...e.linear, ...e.square].includes(this.unit);
|
|
389
396
|
}
|
|
390
397
|
}
|
|
391
|
-
class
|
|
398
|
+
class Tr extends F {
|
|
392
399
|
/**
|
|
393
400
|
* Инициализирует экземпляр класса {@link CartItemBase}.
|
|
394
401
|
*
|
|
@@ -440,10 +447,10 @@ class Dr extends F {
|
|
|
440
447
|
* Признак того, что позиция является дополнительной продажей.
|
|
441
448
|
*/
|
|
442
449
|
t(this, "isAdditionalSale");
|
|
443
|
-
this.product = new T(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new te(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams &&
|
|
450
|
+
this.product = new T(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new te(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && ir(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
|
|
444
451
|
}
|
|
445
452
|
}
|
|
446
|
-
class
|
|
453
|
+
class br extends Tr {
|
|
447
454
|
/**
|
|
448
455
|
* Инициализирует экземпляр класса {@link CartItem}.
|
|
449
456
|
*
|
|
@@ -512,10 +519,10 @@ class ie {
|
|
|
512
519
|
* Список итоговых сумм по направлениям продаж.
|
|
513
520
|
*/
|
|
514
521
|
t(this, "directionsSum");
|
|
515
|
-
this.items = r.items.map((e) => new
|
|
522
|
+
this.items = r.items.map((e) => new br(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
|
|
516
523
|
}
|
|
517
524
|
}
|
|
518
|
-
class
|
|
525
|
+
class _r {
|
|
519
526
|
/**
|
|
520
527
|
* Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
|
|
521
528
|
*
|
|
@@ -537,7 +544,7 @@ class Tr {
|
|
|
537
544
|
this.phone = (r == null ? void 0 : r.phone) ?? 360, this.tablet = (r == null ? void 0 : r.tablet) ?? 600, this.laptop = (r == null ? void 0 : r.laptop) ?? 1024;
|
|
538
545
|
}
|
|
539
546
|
}
|
|
540
|
-
class
|
|
547
|
+
class Sr {
|
|
541
548
|
/**
|
|
542
549
|
* Инициализирует экземпляр класса {@link HttpParamsConfig}.
|
|
543
550
|
*
|
|
@@ -559,7 +566,7 @@ class br {
|
|
|
559
566
|
this.apiUri = (r == null ? void 0 : r.apiUri) ?? "", this.mediaUrl = (r == null ? void 0 : r.mediaUrl) ?? "", this.responseDataCacheTimeout = (r == null ? void 0 : r.responseDataCacheTimeout) ?? 3 * 60 * 60;
|
|
560
567
|
}
|
|
561
568
|
}
|
|
562
|
-
class
|
|
569
|
+
class Lr {
|
|
563
570
|
/**
|
|
564
571
|
* Инициализирует экземпляр класса {@link SentryConfig}.
|
|
565
572
|
*
|
|
@@ -604,7 +611,7 @@ class _r {
|
|
|
604
611
|
}, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
|
|
605
612
|
}
|
|
606
613
|
}
|
|
607
|
-
class
|
|
614
|
+
class dr {
|
|
608
615
|
/**
|
|
609
616
|
* Инициализирует экземпляр класса {@link VersionConfig}.
|
|
610
617
|
*
|
|
@@ -626,7 +633,7 @@ class Sr {
|
|
|
626
633
|
this.date = (r == null ? void 0 : r.date) ?? Y(/* @__PURE__ */ new Date(), "dd.MM.yyyy"), this.name = (r == null ? void 0 : r.name) ?? "", this.version = (r == null ? void 0 : r.version) ?? "0.0.0";
|
|
627
634
|
}
|
|
628
635
|
}
|
|
629
|
-
class
|
|
636
|
+
class ht {
|
|
630
637
|
/**
|
|
631
638
|
* Инициализирует экземпляр класса {@link AppBaseConfig}.
|
|
632
639
|
*
|
|
@@ -669,16 +676,16 @@ class pt {
|
|
|
669
676
|
* Данные о текущем выпуске приложения.
|
|
670
677
|
*/
|
|
671
678
|
t(this, "version");
|
|
672
|
-
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
|
|
679
|
+
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 Sr(r == null ? void 0 : r.http), this.deviceTypeByResolution = new _r(r == null ? void 0 : r.deviceTypeByResolution), this.products = {
|
|
673
680
|
units: {
|
|
674
681
|
linear: ["пог.м.", "м."],
|
|
675
682
|
square: ["м2"]
|
|
676
683
|
},
|
|
677
684
|
...r == null ? void 0 : r.products
|
|
678
|
-
}, this.sentry = new
|
|
685
|
+
}, this.sentry = new Lr({
|
|
679
686
|
environment: this.environment,
|
|
680
687
|
...r == null ? void 0 : r.sentry
|
|
681
|
-
}), this.urls = r == null ? void 0 : r.urls, this.version = new
|
|
688
|
+
}), this.urls = r == null ? void 0 : r.urls, this.version = new dr(r == null ? void 0 : r.version);
|
|
682
689
|
}
|
|
683
690
|
}
|
|
684
691
|
class Le {
|
|
@@ -721,7 +728,7 @@ const b = class b {
|
|
|
721
728
|
*/
|
|
722
729
|
t(this, "defaultInstanceNotificationErrorResponseHandler", m);
|
|
723
730
|
const s = N.getConfig().version;
|
|
724
|
-
this.defaultInstanceNotificationErrorResponseHandler = b.baseDefaultNotificationErrorResponseHandler, this.httpClient =
|
|
731
|
+
this.defaultInstanceNotificationErrorResponseHandler = b.baseDefaultNotificationErrorResponseHandler, this.httpClient = Rr.create({
|
|
725
732
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
726
733
|
baseURL: r,
|
|
727
734
|
headers: {
|
|
@@ -731,10 +738,10 @@ const b = class b {
|
|
|
731
738
|
...e
|
|
732
739
|
}
|
|
733
740
|
}), this.httpClient.interceptors.request.use(
|
|
734
|
-
(i) => (i.method && (i.method === "get" && i.params && (i.params = xe(i.params)), ["put", "patch", "post"].includes(
|
|
741
|
+
(i) => (i.method && (i.method === "get" && i.params && (i.params = xe(i.params)), ["put", "patch", "post"].includes(nr(i.method)) && i.data && (i.data = xe(i.data))), i),
|
|
735
742
|
(i) => Promise.reject(i)
|
|
736
743
|
), this.httpClient.interceptors.response.use(
|
|
737
|
-
(i) => (i.data && (i.data =
|
|
744
|
+
(i) => (i.data && (i.data = ar(i.data)), i),
|
|
738
745
|
// Возвращаем изменённую структуру сообщения об ошибке.
|
|
739
746
|
(i) => b.convertHttpErrorResponse(i)
|
|
740
747
|
);
|
|
@@ -892,7 +899,7 @@ const j = class j extends Ae {
|
|
|
892
899
|
*/
|
|
893
900
|
cacheResponse(e, s) {
|
|
894
901
|
j.responseDataCache.set(e, {
|
|
895
|
-
validTo:
|
|
902
|
+
validTo: ur(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
|
|
896
903
|
val: s
|
|
897
904
|
});
|
|
898
905
|
}
|
|
@@ -928,7 +935,7 @@ class u extends Te {
|
|
|
928
935
|
(s = r.devMode) != null && s.authBearerToken && (e.Authorization = `Bearer ${(i = r.devMode) == null ? void 0 : i.authBearerToken}`), super(`${r.http.apiUri}/api`, e);
|
|
929
936
|
}
|
|
930
937
|
}
|
|
931
|
-
class
|
|
938
|
+
class gt extends u {
|
|
932
939
|
/**
|
|
933
940
|
* Возвращает содержимое корзины указанного клиента.
|
|
934
941
|
*
|
|
@@ -1031,7 +1038,7 @@ class ut extends u {
|
|
|
1031
1038
|
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, {}, (e) => new ie(e.data));
|
|
1032
1039
|
}
|
|
1033
1040
|
}
|
|
1034
|
-
var
|
|
1041
|
+
var xr = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(xr || {}), de = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(de || {}), Ir = /* @__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))(Ir || {});
|
|
1035
1042
|
class q extends te {
|
|
1036
1043
|
/**
|
|
1037
1044
|
* Инициализирует экземпляр класса {@link Category}.
|
|
@@ -1052,7 +1059,7 @@ class q extends te {
|
|
|
1052
1059
|
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new q(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new T(o));
|
|
1053
1060
|
}
|
|
1054
1061
|
}
|
|
1055
|
-
class
|
|
1062
|
+
class Fe extends a {
|
|
1056
1063
|
/**
|
|
1057
1064
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1058
1065
|
*
|
|
@@ -1067,7 +1074,7 @@ class He extends a {
|
|
|
1067
1074
|
this.updatedAt = e != null && e.updatedAt ? C(e.updatedAt) ? D(e.updatedAt) : e.updatedAt : void 0;
|
|
1068
1075
|
}
|
|
1069
1076
|
}
|
|
1070
|
-
class
|
|
1077
|
+
class kr extends Fe {
|
|
1071
1078
|
/**
|
|
1072
1079
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1073
1080
|
*
|
|
@@ -1082,7 +1089,7 @@ class xr extends He {
|
|
|
1082
1089
|
this.deletedAt = e != null && e.deletedAt ? C(e.deletedAt) ? D(e.deletedAt) : e.deletedAt : void 0;
|
|
1083
1090
|
}
|
|
1084
1091
|
}
|
|
1085
|
-
class
|
|
1092
|
+
class mt {
|
|
1086
1093
|
/**
|
|
1087
1094
|
* Возвращает актуальные и не просроченные данные из хранилища.
|
|
1088
1095
|
*
|
|
@@ -1093,7 +1100,7 @@ class ht {
|
|
|
1093
1100
|
if (e)
|
|
1094
1101
|
try {
|
|
1095
1102
|
const s = JSON.parse(e);
|
|
1096
|
-
if (
|
|
1103
|
+
if (hr(D(s.availableFor) || $e(), /* @__PURE__ */ new Date()))
|
|
1097
1104
|
return s.data || {};
|
|
1098
1105
|
} catch {
|
|
1099
1106
|
localStorage.removeItem(r);
|
|
@@ -1131,7 +1138,7 @@ class M extends a {
|
|
|
1131
1138
|
this.type = e == null ? void 0 : e.type;
|
|
1132
1139
|
}
|
|
1133
1140
|
}
|
|
1134
|
-
class
|
|
1141
|
+
class Nr extends a {
|
|
1135
1142
|
/**
|
|
1136
1143
|
* Инициализирует экземпляр класса {@link DiscountShortInfo}.
|
|
1137
1144
|
*
|
|
@@ -1170,7 +1177,7 @@ class Ir extends a {
|
|
|
1170
1177
|
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = e != null && e.publishedAt ? C(e.publishedAt) ? D(e.publishedAt) : e.publishedAt : void 0, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new M(e == null ? void 0 : e.owner), this.deletedAt = e != null && e.deletedAt ? C(e.deletedAt) ? D(e.deletedAt) : e.deletedAt : void 0;
|
|
1171
1178
|
}
|
|
1172
1179
|
}
|
|
1173
|
-
class B extends
|
|
1180
|
+
class B extends Fe {
|
|
1174
1181
|
/**
|
|
1175
1182
|
* Инициализирует экземпляр класса {@link PriceTemplate}.
|
|
1176
1183
|
*
|
|
@@ -1225,10 +1232,10 @@ class J extends T {
|
|
|
1225
1232
|
* Признак того, что указанный продукт входит в список избранных продуктов клиента.
|
|
1226
1233
|
*/
|
|
1227
1234
|
t(this, "isFavorite");
|
|
1228
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? de.Product, this.discount = e != null && e.discount ? new
|
|
1235
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? de.Product, this.discount = e != null && e.discount ? new Nr(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new B(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;
|
|
1229
1236
|
}
|
|
1230
1237
|
}
|
|
1231
|
-
class
|
|
1238
|
+
class Or {
|
|
1232
1239
|
/**
|
|
1233
1240
|
* Инициализирует экземпляр класса {@link ContactLinks}.
|
|
1234
1241
|
*
|
|
@@ -1272,7 +1279,7 @@ class oe extends a {
|
|
|
1272
1279
|
* Признак того, что менеджер является основным для клиента.
|
|
1273
1280
|
*/
|
|
1274
1281
|
t(this, "isDefault");
|
|
1275
|
-
e && (this.salesDirection = new _(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new
|
|
1282
|
+
e && (this.salesDirection = new _(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new Or(e.contacts)), e.isDefault !== void 0 && (this.isDefault = e.isDefault));
|
|
1276
1283
|
}
|
|
1277
1284
|
}
|
|
1278
1285
|
class ye extends oe {
|
|
@@ -1306,7 +1313,7 @@ class ye extends oe {
|
|
|
1306
1313
|
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;
|
|
1307
1314
|
}
|
|
1308
1315
|
}
|
|
1309
|
-
class
|
|
1316
|
+
class qr extends te {
|
|
1310
1317
|
/**
|
|
1311
1318
|
* Инициализирует экземпляр класса {@link BaseClientCategory}.
|
|
1312
1319
|
*
|
|
@@ -1337,7 +1344,7 @@ class Nr extends te {
|
|
|
1337
1344
|
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;
|
|
1338
1345
|
}
|
|
1339
1346
|
}
|
|
1340
|
-
class ce extends
|
|
1347
|
+
class ce extends qr {
|
|
1341
1348
|
/**
|
|
1342
1349
|
* Инициализирует экземпляр класса {@link ClientCategory}.
|
|
1343
1350
|
*
|
|
@@ -1357,7 +1364,7 @@ class ce extends Nr {
|
|
|
1357
1364
|
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));
|
|
1358
1365
|
}
|
|
1359
1366
|
}
|
|
1360
|
-
class
|
|
1367
|
+
class ze {
|
|
1361
1368
|
/**
|
|
1362
1369
|
* Инициализирует экземпляр класса {@link PriceTemplateICatalogableItem}.
|
|
1363
1370
|
*
|
|
@@ -1375,7 +1382,7 @@ class Fe {
|
|
|
1375
1382
|
this.coefficient = (r == null ? void 0 : r.coefficient) && new me(r.coefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
|
|
1376
1383
|
}
|
|
1377
1384
|
}
|
|
1378
|
-
class ve extends
|
|
1385
|
+
class ve extends ze {
|
|
1379
1386
|
/**
|
|
1380
1387
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1381
1388
|
*
|
|
@@ -1422,7 +1429,7 @@ class le extends f {
|
|
|
1422
1429
|
e && (this.region = new re(e.region));
|
|
1423
1430
|
}
|
|
1424
1431
|
}
|
|
1425
|
-
class
|
|
1432
|
+
class Be extends a {
|
|
1426
1433
|
/**
|
|
1427
1434
|
* Инициализирует экземпляр класса {@link UserCommonInfo}.
|
|
1428
1435
|
*
|
|
@@ -1461,7 +1468,7 @@ class ze extends a {
|
|
|
1461
1468
|
this.phone = /^\d+$/.test((e == null ? void 0 : e.phone) ?? "") ? `+${e == null ? void 0 : e.phone}` : (e == null ? void 0 : e.phone) ?? "", this.email = (e == null ? void 0 : e.email) ?? "", this.getNews = (e == null ? void 0 : e.getNews) ?? !1, this.salesDirection = e != null && e.salesDirection ? new _(e.salesDirection) : void 0, this.createdAt = C(e == null ? void 0 : e.createdAt) ? D(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = C(e == null ? void 0 : e.lastLoginAt) ? D(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
1462
1469
|
}
|
|
1463
1470
|
}
|
|
1464
|
-
class se extends
|
|
1471
|
+
class se extends Be {
|
|
1465
1472
|
/**
|
|
1466
1473
|
* Инициализирует экземпляр класса {@link Client}.
|
|
1467
1474
|
*
|
|
@@ -1533,7 +1540,7 @@ class X extends F {
|
|
|
1533
1540
|
this.startAt = C(e == null ? void 0 : e.startAt) ? D(e.startAt) : (e == null ? void 0 : e.startAt) ?? /* @__PURE__ */ new Date(), this.endAt = C(e == null ? void 0 : e.endAt) ? D(e.endAt) : (e == null ? void 0 : e.endAt) ?? /* @__PURE__ */ new Date(), this.client = new se(e == null ? void 0 : e.client), this.priceTemplate = new B(e == null ? void 0 : e.priceTemplate);
|
|
1534
1541
|
}
|
|
1535
1542
|
}
|
|
1536
|
-
class Pe extends
|
|
1543
|
+
class Pe extends ze {
|
|
1537
1544
|
/**
|
|
1538
1545
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1539
1546
|
*
|
|
@@ -1548,7 +1555,7 @@ class Pe extends Fe {
|
|
|
1548
1555
|
this.product = new T(e == null ? void 0 : e.product);
|
|
1549
1556
|
}
|
|
1550
1557
|
}
|
|
1551
|
-
class
|
|
1558
|
+
class We extends f {
|
|
1552
1559
|
}
|
|
1553
1560
|
class Z extends a {
|
|
1554
1561
|
/**
|
|
@@ -1570,7 +1577,7 @@ class Z extends a {
|
|
|
1570
1577
|
* Дополнительные метаданные свойства.
|
|
1571
1578
|
*/
|
|
1572
1579
|
t(this, "metadata");
|
|
1573
|
-
this.type = new
|
|
1580
|
+
this.type = new We(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata;
|
|
1574
1581
|
}
|
|
1575
1582
|
}
|
|
1576
1583
|
class z {
|
|
@@ -1592,13 +1599,13 @@ class z {
|
|
|
1592
1599
|
this.property = new Z(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
|
|
1593
1600
|
}
|
|
1594
1601
|
}
|
|
1595
|
-
class
|
|
1602
|
+
class Mr extends f {
|
|
1596
1603
|
}
|
|
1597
|
-
class
|
|
1604
|
+
class je extends f {
|
|
1598
1605
|
}
|
|
1599
|
-
class
|
|
1606
|
+
class ft extends f {
|
|
1600
1607
|
}
|
|
1601
|
-
class
|
|
1608
|
+
class Ur extends f {
|
|
1602
1609
|
}
|
|
1603
1610
|
class pe extends a {
|
|
1604
1611
|
/**
|
|
@@ -1633,20 +1640,20 @@ class U extends f {
|
|
|
1633
1640
|
});
|
|
1634
1641
|
}
|
|
1635
1642
|
}
|
|
1636
|
-
class
|
|
1643
|
+
class Gr extends f {
|
|
1637
1644
|
}
|
|
1638
|
-
class
|
|
1645
|
+
class Hr extends f {
|
|
1639
1646
|
}
|
|
1640
1647
|
class G extends f {
|
|
1641
1648
|
}
|
|
1642
|
-
class
|
|
1649
|
+
class Fr extends f {
|
|
1643
1650
|
}
|
|
1644
|
-
class
|
|
1645
|
-
}
|
|
1646
|
-
class je extends f {
|
|
1651
|
+
class zr extends f {
|
|
1647
1652
|
}
|
|
1648
1653
|
class Ve extends f {
|
|
1649
1654
|
}
|
|
1655
|
+
class Ee extends f {
|
|
1656
|
+
}
|
|
1650
1657
|
class R extends u {
|
|
1651
1658
|
/**
|
|
1652
1659
|
* Возвращает {@link Promise} для получения данных указанного справочника.
|
|
@@ -1656,20 +1663,20 @@ class R extends u {
|
|
|
1656
1663
|
* и использовать в случае аналогичных запросов.
|
|
1657
1664
|
*/
|
|
1658
1665
|
getReference(r, e = !1) {
|
|
1659
|
-
return this.getTypedDataArrayRequester(
|
|
1666
|
+
return this.getTypedDataArrayRequester(Mr, `/internal/references/${r}`, e);
|
|
1660
1667
|
}
|
|
1661
1668
|
/**
|
|
1662
1669
|
* Возвращает {@link Promise} для получения справочника данных о канале
|
|
1663
1670
|
* первичного интереса.
|
|
1664
1671
|
*/
|
|
1665
1672
|
getChannelPrimaryInterest() {
|
|
1666
|
-
return this.getTypedDataArrayRequester(
|
|
1673
|
+
return this.getTypedDataArrayRequester(je, "/internal/references/channel-primary-interest", !0);
|
|
1667
1674
|
}
|
|
1668
1675
|
/**
|
|
1669
1676
|
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
1670
1677
|
*/
|
|
1671
1678
|
getContactPositions() {
|
|
1672
|
-
return this.getTypedDataArrayRequester(
|
|
1679
|
+
return this.getTypedDataArrayRequester(Ur, "/internal/references/contact-position", !0);
|
|
1673
1680
|
}
|
|
1674
1681
|
/**
|
|
1675
1682
|
* Возвращает {@link Promise} для получения справочника списка валют.
|
|
@@ -1694,25 +1701,25 @@ class R extends u {
|
|
|
1694
1701
|
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
1695
1702
|
*/
|
|
1696
1703
|
getOrderPaymentStatuses() {
|
|
1697
|
-
return this.getTypedDataArrayRequester(
|
|
1704
|
+
return this.getTypedDataArrayRequester(Gr, "/public/references/order-payment-status", !0);
|
|
1698
1705
|
}
|
|
1699
1706
|
/**
|
|
1700
1707
|
* Возвращает {@link Promise} для получения справочника данных статусов заказов.
|
|
1701
1708
|
*/
|
|
1702
1709
|
getOrderStatuses() {
|
|
1703
|
-
return this.getTypedDataArrayRequester(
|
|
1710
|
+
return this.getTypedDataArrayRequester(Hr, "/public/references/order-status", !0);
|
|
1704
1711
|
}
|
|
1705
1712
|
/**
|
|
1706
1713
|
* Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
|
|
1707
1714
|
*/
|
|
1708
1715
|
getPaymentTypes() {
|
|
1709
|
-
return this.getTypedDataArrayRequester(
|
|
1716
|
+
return this.getTypedDataArrayRequester(Fr, "/public/references/payment-type", !0);
|
|
1710
1717
|
}
|
|
1711
1718
|
/**
|
|
1712
1719
|
* Возвращает {@link Promise} для получения справочника типов ресурсов.
|
|
1713
1720
|
*/
|
|
1714
1721
|
getResourceTypes() {
|
|
1715
|
-
return this.getTypedDataArrayRequester(
|
|
1722
|
+
return this.getTypedDataArrayRequester(Ve, "/internal/references/resource-type", !0);
|
|
1716
1723
|
}
|
|
1717
1724
|
/**
|
|
1718
1725
|
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
@@ -1724,7 +1731,7 @@ class R extends u {
|
|
|
1724
1731
|
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
1725
1732
|
*/
|
|
1726
1733
|
getSourcePrimaryInterest() {
|
|
1727
|
-
return this.getTypedDataArrayRequester(
|
|
1734
|
+
return this.getTypedDataArrayRequester(Ee, "/internal/references/source-primary-interest", !0);
|
|
1728
1735
|
}
|
|
1729
1736
|
/**
|
|
1730
1737
|
* Выполняет поиск данных о городах по терму в названии.
|
|
@@ -1766,7 +1773,7 @@ class R extends u {
|
|
|
1766
1773
|
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
1767
1774
|
*/
|
|
1768
1775
|
getPropertyTypes() {
|
|
1769
|
-
return this.getTypedDataArrayRequester(
|
|
1776
|
+
return this.getTypedDataArrayRequester(We, "/internal/references/property-type", !0);
|
|
1770
1777
|
}
|
|
1771
1778
|
/**
|
|
1772
1779
|
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
@@ -1778,11 +1785,11 @@ class R extends u {
|
|
|
1778
1785
|
* Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
|
|
1779
1786
|
*/
|
|
1780
1787
|
getProductFileType() {
|
|
1781
|
-
return this.getTypedDataArrayRequester(
|
|
1788
|
+
return this.getTypedDataArrayRequester(zr, "/public/references/product-file-type", !0);
|
|
1782
1789
|
}
|
|
1783
1790
|
}
|
|
1784
|
-
var
|
|
1785
|
-
class
|
|
1791
|
+
var Br = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(Br || {});
|
|
1792
|
+
class Wr extends Be {
|
|
1786
1793
|
/**
|
|
1787
1794
|
* Инициализирует экземпляр класса {@link User}.
|
|
1788
1795
|
*
|
|
@@ -1805,16 +1812,16 @@ class zr extends ze {
|
|
|
1805
1812
|
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;
|
|
1806
1813
|
}
|
|
1807
1814
|
}
|
|
1808
|
-
class
|
|
1815
|
+
class jr extends u {
|
|
1809
1816
|
/**
|
|
1810
1817
|
* Возвращает данные о текущем пользователе.
|
|
1811
1818
|
*/
|
|
1812
1819
|
// eslint-disable-next-line class-methods-use-this
|
|
1813
1820
|
getCurrentUser() {
|
|
1814
|
-
return this.get("/internal/users/info", {}, (r) => new
|
|
1821
|
+
return this.get("/internal/users/info", {}, (r) => new Wr(r.data));
|
|
1815
1822
|
}
|
|
1816
1823
|
}
|
|
1817
|
-
class
|
|
1824
|
+
class Vr {
|
|
1818
1825
|
/**
|
|
1819
1826
|
* Инициализирует экземпляр класса {@link ProductPriceHistory}.
|
|
1820
1827
|
*
|
|
@@ -1935,7 +1942,7 @@ class ke {
|
|
|
1935
1942
|
this.role = new ee(r == null ? void 0 : r.role), this.category = new te(r == null ? void 0 : r.category), this.minCoefficient = new me(r == null ? void 0 : r.minCoefficient);
|
|
1936
1943
|
}
|
|
1937
1944
|
}
|
|
1938
|
-
var
|
|
1945
|
+
var Er = /* @__PURE__ */ ((n) => (n.LastOrder = "last_order", n.Contacts = "contacts", n.PartnerGroups = "partner_groups", n.PreferredDeliveryType = "preferred_delivery_type", n))(Er || {});
|
|
1939
1946
|
class be extends F {
|
|
1940
1947
|
/**
|
|
1941
1948
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
@@ -2021,7 +2028,7 @@ class H extends _e {
|
|
|
2021
2028
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1, this.position = e == null ? void 0 : e.position, this.notDisturb = (e == null ? void 0 : e.notDisturb) ?? !1, this.comment = e == null ? void 0 : e.comment, this.updatedAt = e == null ? void 0 : e.updatedAt, this.deletedAt = e != null && e.deletedAt ? C(e.deletedAt) ? D(e.deletedAt) : e.deletedAt : void 0;
|
|
2022
2029
|
}
|
|
2023
2030
|
}
|
|
2024
|
-
class
|
|
2031
|
+
class Ke extends a {
|
|
2025
2032
|
/**
|
|
2026
2033
|
* Инициализирует экземпляр класса {@link ContragentBase}.
|
|
2027
2034
|
*
|
|
@@ -2094,7 +2101,7 @@ class Ee extends a {
|
|
|
2094
2101
|
}
|
|
2095
2102
|
}
|
|
2096
2103
|
}
|
|
2097
|
-
class
|
|
2104
|
+
class Kr extends Ke {
|
|
2098
2105
|
/**
|
|
2099
2106
|
* Инициализирует экземпляр класса {@link ContragentPerson}.
|
|
2100
2107
|
*
|
|
@@ -2104,7 +2111,7 @@ class Vr extends Ee {
|
|
|
2104
2111
|
super(r);
|
|
2105
2112
|
}
|
|
2106
2113
|
}
|
|
2107
|
-
class
|
|
2114
|
+
class Je extends Ke {
|
|
2108
2115
|
/**
|
|
2109
2116
|
* Инициализирует экземпляр класса {@link ContragentIc}.
|
|
2110
2117
|
*
|
|
@@ -2147,7 +2154,7 @@ class Ke extends Ee {
|
|
|
2147
2154
|
e && (this.inn = e.inn ?? "", this.okpo = e.okpo ?? "", this.directorName = e.directorName ?? "", this.directorPosition = e.directorPosition ?? "", this.directorActsOn = e.directorActsOn ?? "", this.legalAddress = e.legalAddress ?? "", this.postalAddress = e.postalAddress ?? "", this.actualAddress = e.actualAddress ?? "");
|
|
2148
2155
|
}
|
|
2149
2156
|
}
|
|
2150
|
-
class
|
|
2157
|
+
class Qe extends Je {
|
|
2151
2158
|
/**
|
|
2152
2159
|
* Инициализирует экземпляр класса {@link ContragentUlR}.
|
|
2153
2160
|
*
|
|
@@ -2162,7 +2169,7 @@ class Je extends Ke {
|
|
|
2162
2169
|
e && (this.kpp = e.kpp ?? "");
|
|
2163
2170
|
}
|
|
2164
2171
|
}
|
|
2165
|
-
class
|
|
2172
|
+
class Jr extends Qe {
|
|
2166
2173
|
/**
|
|
2167
2174
|
* Инициализирует экземпляр класса {@link ContragentUlNr}.
|
|
2168
2175
|
*
|
|
@@ -2194,13 +2201,13 @@ class ue {
|
|
|
2194
2201
|
static createInstance(r) {
|
|
2195
2202
|
switch (r.opf.slug) {
|
|
2196
2203
|
case A.Ic:
|
|
2197
|
-
return new Ke(r);
|
|
2198
|
-
case A.UlR:
|
|
2199
2204
|
return new Je(r);
|
|
2205
|
+
case A.UlR:
|
|
2206
|
+
return new Qe(r);
|
|
2200
2207
|
case A.UlNr:
|
|
2201
|
-
return new
|
|
2208
|
+
return new Jr(r);
|
|
2202
2209
|
default:
|
|
2203
|
-
return new
|
|
2210
|
+
return new Kr(r);
|
|
2204
2211
|
}
|
|
2205
2212
|
}
|
|
2206
2213
|
}
|
|
@@ -2219,7 +2226,7 @@ class Re extends F {
|
|
|
2219
2226
|
this.isPrimary = e.isPrimary;
|
|
2220
2227
|
}
|
|
2221
2228
|
}
|
|
2222
|
-
class
|
|
2229
|
+
class Qr extends H {
|
|
2223
2230
|
/**
|
|
2224
2231
|
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
2225
2232
|
*
|
|
@@ -2247,7 +2254,7 @@ class Kr extends H {
|
|
|
2247
2254
|
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new Re(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new Re(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new Re(s))));
|
|
2248
2255
|
}
|
|
2249
2256
|
}
|
|
2250
|
-
class he extends
|
|
2257
|
+
class he extends kr {
|
|
2251
2258
|
/**
|
|
2252
2259
|
* Инициализирует экземпляр класса {@link DeliveryAddress}.
|
|
2253
2260
|
*
|
|
@@ -2284,7 +2291,7 @@ class he extends xr {
|
|
|
2284
2291
|
* Признак того, что указанный адрес является адресом транспортной компании.
|
|
2285
2292
|
*/
|
|
2286
2293
|
t(this, "isTransportCompanyAddress");
|
|
2287
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new
|
|
2294
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new He(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new H(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;
|
|
2288
2295
|
}
|
|
2289
2296
|
}
|
|
2290
2297
|
class Ne extends se {
|
|
@@ -2341,10 +2348,10 @@ class Ne extends se {
|
|
|
2341
2348
|
* Дополнительные данные о клиенте.
|
|
2342
2349
|
*/
|
|
2343
2350
|
t(this, "extraData");
|
|
2344
|
-
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 G(p))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((p) => new H(p))) ?? [], this.deliveryAddresses = ((l = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : l.map((p) => new he(p))) ?? [], this.channelPrimaryInterest = new
|
|
2351
|
+
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 G(p))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((p) => new H(p))) ?? [], this.deliveryAddresses = ((l = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : l.map((p) => new he(p))) ?? [], this.channelPrimaryInterest = new je(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Ee(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) ?? {};
|
|
2345
2352
|
}
|
|
2346
2353
|
}
|
|
2347
|
-
class
|
|
2354
|
+
class yt {
|
|
2348
2355
|
/**
|
|
2349
2356
|
* Инициализирует экземпляр класса {@link ClientsListFilters}.
|
|
2350
2357
|
*
|
|
@@ -2524,11 +2531,11 @@ class mt {
|
|
|
2524
2531
|
return Object.keys(this).forEach((l) => {
|
|
2525
2532
|
const p = this[l];
|
|
2526
2533
|
// eslint-disable-next-line prettier/prettier
|
|
2527
|
-
Me(p) || C(p) && p.trim().length === 0 ||
|
|
2534
|
+
Me(p) || C(p) && p.trim().length === 0 || or(p.isNewRec) && p.isNewRec() || (r[l] = p);
|
|
2528
2535
|
}), !((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;
|
|
2529
2536
|
}
|
|
2530
2537
|
}
|
|
2531
|
-
class
|
|
2538
|
+
class Ye extends F {
|
|
2532
2539
|
/**
|
|
2533
2540
|
* Инициализирует экземпляр класса {@link OrderShortInfo}.
|
|
2534
2541
|
*
|
|
@@ -2551,7 +2558,7 @@ class Qe extends F {
|
|
|
2551
2558
|
this.createdAt = C(e == null ? void 0 : e.createdAt) ? E(e.createdAt, "dd.MM.yyyy HH:mm", /* @__PURE__ */ new Date()) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new M(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
|
|
2552
2559
|
}
|
|
2553
2560
|
}
|
|
2554
|
-
class
|
|
2561
|
+
class Xe extends Ye {
|
|
2555
2562
|
/**
|
|
2556
2563
|
* Инициализирует экземпляр класса {@link OrderInfo}.
|
|
2557
2564
|
*
|
|
@@ -2612,7 +2619,7 @@ class Ye extends Qe {
|
|
|
2612
2619
|
}, this.attachedUser = new M(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new _(e == null ? void 0 : e.salesDirection), this.pendingAt = C(e == null ? void 0 : e.pendingAt) ? E(e == null ? void 0 : e.pendingAt, "dd.MM.yyyy HH:mm", /* @__PURE__ */ new Date()) : (e == null ? void 0 : e.pendingAt) ?? /* @__PURE__ */ new Date(), this.processedAt = C(e == null ? void 0 : e.processedAt) ? E(e == null ? void 0 : e.processedAt, "dd.MM.yyyy HH:mm", /* @__PURE__ */ new Date()) : (e == null ? void 0 : e.processedAt) ?? /* @__PURE__ */ new Date(), this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1;
|
|
2613
2620
|
}
|
|
2614
2621
|
}
|
|
2615
|
-
class
|
|
2622
|
+
class Yr extends F {
|
|
2616
2623
|
/**
|
|
2617
2624
|
* Инициализирует экземпляр класса {@link OrderProduct}.
|
|
2618
2625
|
*
|
|
@@ -2695,7 +2702,7 @@ class Jr extends F {
|
|
|
2695
2702
|
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;
|
|
2696
2703
|
}
|
|
2697
2704
|
}
|
|
2698
|
-
class
|
|
2705
|
+
class Xr extends Xe {
|
|
2699
2706
|
/**
|
|
2700
2707
|
* Инициализирует экземпляр класса {@link Order}.
|
|
2701
2708
|
*
|
|
@@ -2735,7 +2742,7 @@ class Qr extends Ye {
|
|
|
2735
2742
|
* Признак, что разрешена передача заказа в работу без оплаты.
|
|
2736
2743
|
*/
|
|
2737
2744
|
t(this, "isAllowProcessingWithoutPayment");
|
|
2738
|
-
this.products = (e.products ?? []).map((s) => new
|
|
2745
|
+
this.products = (e.products ?? []).map((s) => new Yr(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? ue.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new f(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
|
|
2739
2746
|
}
|
|
2740
2747
|
}
|
|
2741
2748
|
class we extends u {
|
|
@@ -2754,12 +2761,12 @@ class we extends u {
|
|
|
2754
2761
|
page: (i == null ? void 0 : i.page) ?? 1,
|
|
2755
2762
|
per_page: (i == null ? void 0 : i.pageSize) ?? (i == null ? void 0 : i.perPage) ?? 10
|
|
2756
2763
|
};
|
|
2757
|
-
return e && (p.filters = JSON.stringify(e)),
|
|
2764
|
+
return e && (p.filters = JSON.stringify(e)), cr(s) || (lr(s) ? s : [s]).forEach((g, v) => {
|
|
2758
2765
|
p[`sort[${v}][field]`] = g.field, p[`sort[${v}][direction]`] = g.direction;
|
|
2759
2766
|
}), this.get(r, p, o, l);
|
|
2760
2767
|
}
|
|
2761
2768
|
}
|
|
2762
|
-
class
|
|
2769
|
+
class wt extends we {
|
|
2763
2770
|
/**
|
|
2764
2771
|
* Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
|
|
2765
2772
|
*
|
|
@@ -2771,7 +2778,7 @@ class ft extends we {
|
|
|
2771
2778
|
getOrders(r, e, s) {
|
|
2772
2779
|
return this.getPaginated("/internal/orders", r, e ? [e] : void 0, s, (i) => {
|
|
2773
2780
|
const o = { ...i.data };
|
|
2774
|
-
return o.data = o.data.map((l) => new
|
|
2781
|
+
return o.data = o.data.map((l) => new Xe(l)), o;
|
|
2775
2782
|
});
|
|
2776
2783
|
}
|
|
2777
2784
|
/**
|
|
@@ -2789,10 +2796,10 @@ class ft extends we {
|
|
|
2789
2796
|
* @param orderId Идентификатор заказа для которого необходимо вернуть данные.
|
|
2790
2797
|
*/
|
|
2791
2798
|
getOrder(r) {
|
|
2792
|
-
return this.get(`/internal/orders/${r}`, {}, (e) => new
|
|
2799
|
+
return this.get(`/internal/orders/${r}`, {}, (e) => new Xr(e.data));
|
|
2793
2800
|
}
|
|
2794
2801
|
}
|
|
2795
|
-
class
|
|
2802
|
+
class Zr extends a {
|
|
2796
2803
|
/**
|
|
2797
2804
|
* Инициализирует экземпляр класса {@link ClientAdditionalData}.
|
|
2798
2805
|
*
|
|
@@ -2817,11 +2824,11 @@ class Yr extends a {
|
|
|
2817
2824
|
* Данные о последнем заказе клиента.
|
|
2818
2825
|
*/
|
|
2819
2826
|
t(this, "lastOrder");
|
|
2820
|
-
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new H(o))), e.lastOrder && (this.lastOrder = new
|
|
2827
|
+
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new H(o))), e.lastOrder && (this.lastOrder = new Ye(e.lastOrder)), (i = e.partnerGroups) != null && i.length && (this.partnerGroups = e.partnerGroups.map((o) => new G(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new K(e.preferredDeliveryType));
|
|
2821
2828
|
}
|
|
2822
2829
|
}
|
|
2823
|
-
var
|
|
2824
|
-
class
|
|
2830
|
+
var Ze = /* @__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))(Ze || {});
|
|
2831
|
+
class et {
|
|
2825
2832
|
/**
|
|
2826
2833
|
* Инициализирует экземпляр класса {@link DataTablePaginationRequestParams}.
|
|
2827
2834
|
*
|
|
@@ -2845,7 +2852,7 @@ class Xr {
|
|
|
2845
2852
|
this.page = (r == null ? void 0 : r.page) ?? 1, this.perPage = (r == null ? void 0 : r.perPage) ?? 50, this.pageSize = (r == null ? void 0 : r.pageSize) ?? this.perPage;
|
|
2846
2853
|
}
|
|
2847
2854
|
}
|
|
2848
|
-
class
|
|
2855
|
+
class Ct extends et {
|
|
2849
2856
|
/**
|
|
2850
2857
|
* Инициализирует экземпляр класса {@link DataTablePagination}.
|
|
2851
2858
|
*
|
|
@@ -2876,7 +2883,7 @@ class yt extends Xr {
|
|
|
2876
2883
|
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;
|
|
2877
2884
|
}
|
|
2878
2885
|
}
|
|
2879
|
-
class
|
|
2886
|
+
class vt {
|
|
2880
2887
|
/**
|
|
2881
2888
|
* Инициализирует экземпляр класса {@link ISortRequestParams}.
|
|
2882
2889
|
*
|
|
@@ -2894,7 +2901,7 @@ class wt {
|
|
|
2894
2901
|
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
2895
2902
|
}
|
|
2896
2903
|
}
|
|
2897
|
-
class
|
|
2904
|
+
class Pt extends we {
|
|
2898
2905
|
/**
|
|
2899
2906
|
* Возвращает данные об указанном клиенте.
|
|
2900
2907
|
*
|
|
@@ -2928,7 +2935,7 @@ class Ct extends we {
|
|
|
2928
2935
|
return this.getClientsList({
|
|
2929
2936
|
groupOp: "and",
|
|
2930
2937
|
groups: [],
|
|
2931
|
-
filters: [{ field: "phone", op:
|
|
2938
|
+
filters: [{ field: "phone", op: Ze.Contains, value: r }]
|
|
2932
2939
|
});
|
|
2933
2940
|
}
|
|
2934
2941
|
/**
|
|
@@ -2941,7 +2948,7 @@ class Ct extends we {
|
|
|
2941
2948
|
getAdditionalClientsData(r, e) {
|
|
2942
2949
|
return this.post("/internal/clients/additional-data", { clients: r, requested_data_types: e }, (s) => {
|
|
2943
2950
|
let i = [];
|
|
2944
|
-
return (s == null ? void 0 : s.data.length) > 0 && (i = s.data.map((o) => new
|
|
2951
|
+
return (s == null ? void 0 : s.data.length) > 0 && (i = s.data.map((o) => new Zr(o))), i;
|
|
2945
2952
|
});
|
|
2946
2953
|
}
|
|
2947
2954
|
/**
|
|
@@ -2953,7 +2960,7 @@ class Ct extends we {
|
|
|
2953
2960
|
getAllClientContacts(r) {
|
|
2954
2961
|
return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
|
|
2955
2962
|
let s = [];
|
|
2956
|
-
return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new
|
|
2963
|
+
return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new Qr(i))), s;
|
|
2957
2964
|
});
|
|
2958
2965
|
}
|
|
2959
2966
|
/**
|
|
@@ -3624,7 +3631,7 @@ class Ct extends we {
|
|
|
3624
3631
|
return this.get(`/internal/clients/${r.id}/verification/email?email=${r.email}`);
|
|
3625
3632
|
}
|
|
3626
3633
|
}
|
|
3627
|
-
class
|
|
3634
|
+
class Rt extends u {
|
|
3628
3635
|
/**
|
|
3629
3636
|
* Выполняет проверку занят ли указанный номер телефона.
|
|
3630
3637
|
*
|
|
@@ -3668,7 +3675,7 @@ class ae {
|
|
|
3668
3675
|
this.client = new se(r == null ? void 0 : r.client), this.product = new T(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) ?? de.Product;
|
|
3669
3676
|
}
|
|
3670
3677
|
}
|
|
3671
|
-
class
|
|
3678
|
+
class at extends u {
|
|
3672
3679
|
/**
|
|
3673
3680
|
* Возвращает данные о результатах поиска категорий и товаров.
|
|
3674
3681
|
*
|
|
@@ -3699,7 +3706,7 @@ class Pt extends u {
|
|
|
3699
3706
|
return s && (l += `&category_id=${s}`), i && (l += `&client_id=${i}`), l;
|
|
3700
3707
|
}
|
|
3701
3708
|
}
|
|
3702
|
-
class
|
|
3709
|
+
class $t extends u {
|
|
3703
3710
|
/**
|
|
3704
3711
|
* Импортирует цены клиента из CSV файла.
|
|
3705
3712
|
*
|
|
@@ -3721,7 +3728,11 @@ class Rt extends u {
|
|
|
3721
3728
|
* @see /doc/api/internal#/operations/api_internal_client_price_category_update
|
|
3722
3729
|
*/
|
|
3723
3730
|
updateCategoryPrices(r, e, s) {
|
|
3724
|
-
|
|
3731
|
+
var i;
|
|
3732
|
+
return this.patch(`/internal/clients/${r}/price/categories/${e}`, {
|
|
3733
|
+
price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
|
|
3734
|
+
increase_percent: s.value
|
|
3735
|
+
});
|
|
3725
3736
|
}
|
|
3726
3737
|
/**
|
|
3727
3738
|
* Удаляет клиентские цены на продукты категории.
|
|
@@ -3812,7 +3823,15 @@ class Rt extends u {
|
|
|
3812
3823
|
* @see /doc/api/internal#/operations/api_internal_client_price_products_update
|
|
3813
3824
|
*/
|
|
3814
3825
|
updateProductPrice(r, e, s) {
|
|
3815
|
-
|
|
3826
|
+
var i;
|
|
3827
|
+
return this.patch(
|
|
3828
|
+
`/internal/clients/${r}/price/products/${e}`,
|
|
3829
|
+
{
|
|
3830
|
+
price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
|
|
3831
|
+
increase_percent: s.value
|
|
3832
|
+
},
|
|
3833
|
+
(o) => new J(o.data)
|
|
3834
|
+
);
|
|
3816
3835
|
}
|
|
3817
3836
|
/**
|
|
3818
3837
|
* Удаляет удаляет клиентскую цену на продукт.
|
|
@@ -3886,7 +3905,7 @@ class Rt extends u {
|
|
|
3886
3905
|
return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
|
|
3887
3906
|
}
|
|
3888
3907
|
}
|
|
3889
|
-
class
|
|
3908
|
+
class Dt extends u {
|
|
3890
3909
|
/**
|
|
3891
3910
|
* Возвращает список шаблонов прайс-листа привязанных к клиенту.
|
|
3892
3911
|
*
|
|
@@ -3974,7 +3993,7 @@ class at extends u {
|
|
|
3974
3993
|
return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
|
|
3975
3994
|
}
|
|
3976
3995
|
}
|
|
3977
|
-
class
|
|
3996
|
+
class At extends u {
|
|
3978
3997
|
/**
|
|
3979
3998
|
* Возвращает список данных о корневых категориях.
|
|
3980
3999
|
*
|
|
@@ -4047,7 +4066,7 @@ class $t extends u {
|
|
|
4047
4066
|
getCategoryProductsCoefficients(r) {
|
|
4048
4067
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
4049
4068
|
const { data: s } = e;
|
|
4050
|
-
return
|
|
4069
|
+
return pr(s, (i) => i.map((o) => new Se(o))), s;
|
|
4051
4070
|
});
|
|
4052
4071
|
}
|
|
4053
4072
|
/**
|
|
@@ -4066,7 +4085,7 @@ class $t extends u {
|
|
|
4066
4085
|
});
|
|
4067
4086
|
}
|
|
4068
4087
|
}
|
|
4069
|
-
class
|
|
4088
|
+
class Tt extends u {
|
|
4070
4089
|
/**
|
|
4071
4090
|
* Возвращает данные об указанном продукте.
|
|
4072
4091
|
*
|
|
@@ -4110,7 +4129,7 @@ class Dt extends u {
|
|
|
4110
4129
|
*/
|
|
4111
4130
|
getProductPriceHistory(r, e) {
|
|
4112
4131
|
const s = {};
|
|
4113
|
-
return Me(e) || (s.clientId = e), this.get(`/internal/price/products/${r}/history`, s, (i) => ne(i.data, (o) => new
|
|
4132
|
+
return Me(e) || (s.clientId = e), this.get(`/internal/price/products/${r}/history`, s, (i) => ne(i.data, (o) => new Vr(o)));
|
|
4114
4133
|
}
|
|
4115
4134
|
/**
|
|
4116
4135
|
* Выполняет публичный поиск данных о продуктах по терму.
|
|
@@ -4128,7 +4147,7 @@ class Dt extends u {
|
|
|
4128
4147
|
});
|
|
4129
4148
|
}
|
|
4130
4149
|
}
|
|
4131
|
-
class
|
|
4150
|
+
class bt extends u {
|
|
4132
4151
|
/**
|
|
4133
4152
|
* Возвращает список данных о корневых категориях указанного клиента.
|
|
4134
4153
|
*
|
|
@@ -4190,7 +4209,7 @@ class At extends u {
|
|
|
4190
4209
|
);
|
|
4191
4210
|
}
|
|
4192
4211
|
}
|
|
4193
|
-
class
|
|
4212
|
+
class _t extends u {
|
|
4194
4213
|
/**
|
|
4195
4214
|
* Возвращает данные об указанном продукте для указанного клиента.
|
|
4196
4215
|
*
|
|
@@ -4211,7 +4230,7 @@ class Tt extends u {
|
|
|
4211
4230
|
);
|
|
4212
4231
|
}
|
|
4213
4232
|
}
|
|
4214
|
-
class
|
|
4233
|
+
class St extends we {
|
|
4215
4234
|
/**
|
|
4216
4235
|
* Возвращает список шаблонов прайс-листа.
|
|
4217
4236
|
*
|
|
@@ -4303,7 +4322,15 @@ class bt extends we {
|
|
|
4303
4322
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_save
|
|
4304
4323
|
*/
|
|
4305
4324
|
saveProductTemplatePrice(r, e, s) {
|
|
4306
|
-
|
|
4325
|
+
var i;
|
|
4326
|
+
return this.post(
|
|
4327
|
+
`/internal/price/templates/${r}/products/${e}`,
|
|
4328
|
+
{
|
|
4329
|
+
price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
|
|
4330
|
+
increase_percent: s.value
|
|
4331
|
+
},
|
|
4332
|
+
(o) => new Pe(o.data)
|
|
4333
|
+
);
|
|
4307
4334
|
}
|
|
4308
4335
|
/**
|
|
4309
4336
|
* Удаляет данные о цене на продукт в шаблоне прайс-листа.
|
|
@@ -4355,10 +4382,14 @@ class bt extends we {
|
|
|
4355
4382
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_category_save
|
|
4356
4383
|
*/
|
|
4357
4384
|
saveCategoryTemplatePrice(r, e, s) {
|
|
4385
|
+
var i;
|
|
4358
4386
|
return this.post(
|
|
4359
4387
|
`/internal/price/templates/${r}/categories/${e}`,
|
|
4360
|
-
|
|
4361
|
-
|
|
4388
|
+
{
|
|
4389
|
+
price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
|
|
4390
|
+
increase_percent: s.value
|
|
4391
|
+
},
|
|
4392
|
+
(o) => new ve(o.data)
|
|
4362
4393
|
);
|
|
4363
4394
|
}
|
|
4364
4395
|
/**
|
|
@@ -4387,7 +4418,7 @@ class bt extends we {
|
|
|
4387
4418
|
);
|
|
4388
4419
|
}
|
|
4389
4420
|
}
|
|
4390
|
-
class
|
|
4421
|
+
class Lt extends u {
|
|
4391
4422
|
/**
|
|
4392
4423
|
* Возвращает список ролей ценообразования.
|
|
4393
4424
|
*
|
|
@@ -4467,7 +4498,7 @@ class _t extends u {
|
|
|
4467
4498
|
);
|
|
4468
4499
|
}
|
|
4469
4500
|
}
|
|
4470
|
-
class
|
|
4501
|
+
class dt extends we {
|
|
4471
4502
|
/**
|
|
4472
4503
|
* Возвращает пагинированный список свойств.
|
|
4473
4504
|
*
|
|
@@ -4838,7 +4869,7 @@ class St extends we {
|
|
|
4838
4869
|
return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
|
|
4839
4870
|
}
|
|
4840
4871
|
}
|
|
4841
|
-
class
|
|
4872
|
+
class xt extends u {
|
|
4842
4873
|
/**
|
|
4843
4874
|
* Возвращает данные о рекомендациях указанной категории продуктов.
|
|
4844
4875
|
*
|
|
@@ -4880,7 +4911,7 @@ class Lt extends u {
|
|
|
4880
4911
|
});
|
|
4881
4912
|
}
|
|
4882
4913
|
}
|
|
4883
|
-
class
|
|
4914
|
+
class It extends u {
|
|
4884
4915
|
/**
|
|
4885
4916
|
* Возвращает список клиентских цен на продукты в указанном диапазоне цены.
|
|
4886
4917
|
*
|
|
@@ -4925,7 +4956,7 @@ class dt extends u {
|
|
|
4925
4956
|
);
|
|
4926
4957
|
}
|
|
4927
4958
|
}
|
|
4928
|
-
class
|
|
4959
|
+
class kt extends u {
|
|
4929
4960
|
/**
|
|
4930
4961
|
* Возвращает настройки указанного конфигуратора для указанной категории.
|
|
4931
4962
|
*
|
|
@@ -4996,7 +5027,7 @@ class xt extends u {
|
|
|
4996
5027
|
return this.delete(`internal/catalog/categories/${r.id}/configurators/${(s = r.properties) == null ? void 0 : s.editor}/template/${e}`);
|
|
4997
5028
|
}
|
|
4998
5029
|
}
|
|
4999
|
-
class
|
|
5030
|
+
class Nt {
|
|
5000
5031
|
/**
|
|
5001
5032
|
* Возвращает Unix Timestamp диапазон дат (в секундах) по умолчанию.
|
|
5002
5033
|
*
|
|
@@ -5006,13 +5037,13 @@ class It {
|
|
|
5006
5037
|
* Для пересчета в JavaScript Unix Timestamp значение необходимо умножить на 1000.
|
|
5007
5038
|
*/
|
|
5008
5039
|
static defaultDateRanges() {
|
|
5009
|
-
const r = [0, 6].includes(
|
|
5040
|
+
const r = [0, 6].includes(gr(Ce())) ? mr($e()) : Ce();
|
|
5010
5041
|
return {
|
|
5011
5042
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
5012
|
-
nextWorkingDay: { label: "Следующий рабочий день", from: k(
|
|
5013
|
-
today: { label: "Сегодня", from: k($e()), to: k(
|
|
5014
|
-
yesterday: { label: "Вчера", from: k(
|
|
5015
|
-
tomorrow: { label: "Завтра", from: k(Ce()), to: k(
|
|
5043
|
+
nextWorkingDay: { label: "Следующий рабочий день", from: k(Pr(r)), to: k(vr(r)) },
|
|
5044
|
+
today: { label: "Сегодня", from: k($e()), to: k(Cr()) },
|
|
5045
|
+
yesterday: { label: "Вчера", from: k(wr()), to: k(yr()) },
|
|
5046
|
+
tomorrow: { label: "Завтра", from: k(Ce()), to: k(fr()) }
|
|
5016
5047
|
};
|
|
5017
5048
|
}
|
|
5018
5049
|
}
|
|
@@ -5057,7 +5088,7 @@ const V = class V {
|
|
|
5057
5088
|
*/
|
|
5058
5089
|
t(V, "linearValues", ["пог.м.", "м.", "м2"]);
|
|
5059
5090
|
let Oe = V;
|
|
5060
|
-
class
|
|
5091
|
+
class Ot {
|
|
5061
5092
|
/**
|
|
5062
5093
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
5063
5094
|
*/
|
|
@@ -5073,7 +5104,7 @@ class kt {
|
|
|
5073
5104
|
return r.id === 0 && r.guid === "-undefined-";
|
|
5074
5105
|
}
|
|
5075
5106
|
}
|
|
5076
|
-
class
|
|
5107
|
+
class rt extends u {
|
|
5077
5108
|
/**
|
|
5078
5109
|
* Возвращает {@link Promise} для получения справочника списка менеджеров.
|
|
5079
5110
|
*/
|
|
@@ -5085,7 +5116,7 @@ class Zr extends u {
|
|
|
5085
5116
|
});
|
|
5086
5117
|
}
|
|
5087
5118
|
}
|
|
5088
|
-
class
|
|
5119
|
+
class tt {
|
|
5089
5120
|
/**
|
|
5090
5121
|
* Инициализирует экземпляр класса {@link MetaTagItem}.
|
|
5091
5122
|
*
|
|
@@ -5139,10 +5170,10 @@ class qe {
|
|
|
5139
5170
|
*/
|
|
5140
5171
|
t(this, "meta");
|
|
5141
5172
|
var e;
|
|
5142
|
-
this.resourceType = new
|
|
5173
|
+
this.resourceType = new Ve(r == null ? void 0 : r.resourceType), this.resourceId = (r == null ? void 0 : r.resourceId) ?? "", this.h1 = r == null ? void 0 : r.h1, this.title = r == null ? void 0 : r.title, this.description = r == null ? void 0 : r.description, this.keywords = r == null ? void 0 : r.keywords, this.meta = ((e = r == null ? void 0 : r.meta) == null ? void 0 : e.map((s) => new tt(s))) ?? [];
|
|
5143
5174
|
}
|
|
5144
5175
|
}
|
|
5145
|
-
class
|
|
5176
|
+
class qt extends u {
|
|
5146
5177
|
/**
|
|
5147
5178
|
* Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
|
|
5148
5179
|
*
|
|
@@ -5249,7 +5280,7 @@ const P = ge("__references_private", () => {
|
|
|
5249
5280
|
*/
|
|
5250
5281
|
priceCoefficientsReference: c
|
|
5251
5282
|
};
|
|
5252
|
-
}),
|
|
5283
|
+
}), Mt = ge("references", () => {
|
|
5253
5284
|
const n = w(() => {
|
|
5254
5285
|
const c = P();
|
|
5255
5286
|
return !c.channelPrimaryInterestReference && !c.dataLoaderList.channelPrimaryInterestReference && (c.dataLoaderList.channelPrimaryInterestReference = !0, u.getInstance(R).getChannelPrimaryInterest().then((h) => {
|
|
@@ -5317,7 +5348,7 @@ const P = ge("__references_private", () => {
|
|
|
5317
5348
|
}).catch(m)), c.deliveryTypeReference;
|
|
5318
5349
|
}), d = w(() => {
|
|
5319
5350
|
const c = P();
|
|
5320
|
-
return !c.managersList && !c.dataLoaderList.managersList && (c.dataLoaderList.managersList = !0, u.getInstance(
|
|
5351
|
+
return !c.managersList && !c.dataLoaderList.managersList && (c.dataLoaderList.managersList = !0, u.getInstance(rt).getManagers().then((h) => {
|
|
5321
5352
|
c.managersList = h;
|
|
5322
5353
|
}).catch(m)), c.managersList;
|
|
5323
5354
|
}), x = w(() => {
|
|
@@ -5406,7 +5437,7 @@ const P = ge("__references_private", () => {
|
|
|
5406
5437
|
*/
|
|
5407
5438
|
priceCoefficientsReference: O
|
|
5408
5439
|
};
|
|
5409
|
-
}),
|
|
5440
|
+
}), st = ge("__user_state_private", () => {
|
|
5410
5441
|
const n = y({}), r = y(void 0);
|
|
5411
5442
|
return {
|
|
5412
5443
|
/**
|
|
@@ -5418,18 +5449,18 @@ const P = ge("__references_private", () => {
|
|
|
5418
5449
|
*/
|
|
5419
5450
|
currentUser: r
|
|
5420
5451
|
};
|
|
5421
|
-
}),
|
|
5452
|
+
}), Ut = ge("user_state", () => ({
|
|
5422
5453
|
/**
|
|
5423
5454
|
* Данные о текущем пользователе.
|
|
5424
5455
|
*/
|
|
5425
5456
|
currentUser: w(() => {
|
|
5426
|
-
const r =
|
|
5427
|
-
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, u.getInstance(
|
|
5457
|
+
const r = st();
|
|
5458
|
+
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, u.getInstance(jr).getCurrentUser().then((e) => {
|
|
5428
5459
|
r.currentUser = e;
|
|
5429
5460
|
}).catch(m).finally(m)), r.currentUser;
|
|
5430
5461
|
})
|
|
5431
5462
|
}));
|
|
5432
|
-
class
|
|
5463
|
+
class Gt extends u {
|
|
5433
5464
|
/**
|
|
5434
5465
|
* Возвращает подсказки по адресам.
|
|
5435
5466
|
*
|
|
@@ -5476,7 +5507,7 @@ class Mt extends u {
|
|
|
5476
5507
|
});
|
|
5477
5508
|
}
|
|
5478
5509
|
}
|
|
5479
|
-
class
|
|
5510
|
+
class Ht {
|
|
5480
5511
|
/**
|
|
5481
5512
|
* Инициализирует экземпляр класса {@link FieldValidationResultData}.
|
|
5482
5513
|
*
|
|
@@ -5500,135 +5531,136 @@ class Ut {
|
|
|
5500
5531
|
}
|
|
5501
5532
|
}
|
|
5502
5533
|
export {
|
|
5503
|
-
|
|
5504
|
-
|
|
5534
|
+
Mr as AnyReference,
|
|
5535
|
+
ht as AppBaseConfig,
|
|
5505
5536
|
N as AppConfigProvider,
|
|
5506
5537
|
be as BankAccount,
|
|
5507
5538
|
we as BasePaginationProvider,
|
|
5539
|
+
xr as CalculationTypeEnum,
|
|
5508
5540
|
ie as Cart,
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5541
|
+
br as CartItem,
|
|
5542
|
+
Tr as CartItemBase,
|
|
5543
|
+
gt as CartProvider,
|
|
5544
|
+
at as CatalogProvider,
|
|
5513
5545
|
Ue as CatalogableItem,
|
|
5514
5546
|
q as Category,
|
|
5515
5547
|
ke as CategoryPricingRule,
|
|
5516
|
-
|
|
5517
|
-
|
|
5548
|
+
je as ChannelPrimaryInterest,
|
|
5549
|
+
ft as City,
|
|
5518
5550
|
le as CityWithRegionAndCountry,
|
|
5519
5551
|
Ne as Client,
|
|
5520
|
-
|
|
5552
|
+
Zr as ClientAdditionalData,
|
|
5521
5553
|
ce as ClientCategory,
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5554
|
+
Pt as ClientDataProvider,
|
|
5555
|
+
$t as ClientPriceProvider,
|
|
5556
|
+
Dt as ClientPriceTemplateProvider,
|
|
5525
5557
|
J as ClientProduct,
|
|
5526
|
-
|
|
5527
|
-
|
|
5558
|
+
bt as ClientProductCategoryDataProvider,
|
|
5559
|
+
_t as ClientProductDataProvider,
|
|
5528
5560
|
se as ClientShortInfo,
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5561
|
+
Er as ClientsAdditionalDataRequestTypeEnum,
|
|
5562
|
+
yt as ClientsListFilters,
|
|
5563
|
+
kt as ConfiguratorProvider,
|
|
5532
5564
|
_e as Contact,
|
|
5533
|
-
|
|
5565
|
+
Or as ContactLinks,
|
|
5534
5566
|
H as ContactPerson,
|
|
5535
|
-
|
|
5536
|
-
|
|
5567
|
+
Qr as ContactPersonRelated,
|
|
5568
|
+
Ur as ContactPosition,
|
|
5537
5569
|
Re as ContactRelation,
|
|
5538
|
-
|
|
5570
|
+
Ke as ContragentBase,
|
|
5539
5571
|
ue as ContragentFactory,
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5572
|
+
Je as ContragentIc,
|
|
5573
|
+
Kr as ContragentPerson,
|
|
5574
|
+
Jr as ContragentUlNr,
|
|
5575
|
+
Qe as ContragentUlR,
|
|
5544
5576
|
de as CostSourceEnum,
|
|
5545
5577
|
Q as Country,
|
|
5546
5578
|
pe as Currency,
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5579
|
+
Gt as DataSuggestionProvider,
|
|
5580
|
+
Ct as DataTablePagination,
|
|
5581
|
+
et as DataTablePaginationRequestParams,
|
|
5582
|
+
vt as DataTableSortRequestParams,
|
|
5583
|
+
Nt as DateTimeProvider,
|
|
5584
|
+
kr as DeletableNamedIdentity,
|
|
5553
5585
|
he as DeliveryAddress,
|
|
5554
5586
|
K as DeliveryType,
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5559
|
-
|
|
5560
|
-
|
|
5587
|
+
_r as DeviceTypeResolutionConfig,
|
|
5588
|
+
Nr as DiscountShortInfo,
|
|
5589
|
+
Ht as FieldValidationResultData,
|
|
5590
|
+
Ze as FilterOpEnum,
|
|
5591
|
+
He as GeoCoordinates,
|
|
5592
|
+
Dr as HiddenCatalogableItem,
|
|
5561
5593
|
Te as HttpBaseCachedRequester,
|
|
5562
5594
|
Ae as HttpBaseRequester,
|
|
5563
|
-
|
|
5595
|
+
Sr as HttpParamsConfig,
|
|
5564
5596
|
u as HttpRequester,
|
|
5565
5597
|
F as Identity,
|
|
5566
|
-
|
|
5598
|
+
Ar as Image,
|
|
5567
5599
|
ye as Manager,
|
|
5568
5600
|
oe as ManagerCommon,
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5601
|
+
Ot as ManagerDataFactory,
|
|
5602
|
+
rt as ManagerDataProvider,
|
|
5603
|
+
tt as MetaTagItem,
|
|
5572
5604
|
a as NamedIdentity,
|
|
5573
5605
|
U as Opf,
|
|
5574
5606
|
A as OpfEnum,
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5607
|
+
Xr as Order,
|
|
5608
|
+
Xe as OrderInfo,
|
|
5609
|
+
Gr as OrderPaymentStatus,
|
|
5610
|
+
Yr as OrderProduct,
|
|
5611
|
+
Ye as OrderShortInfo,
|
|
5612
|
+
Hr as OrderStatus,
|
|
5613
|
+
wt as OrdersDataProvider,
|
|
5582
5614
|
G as PartnerGroup,
|
|
5583
|
-
|
|
5584
|
-
|
|
5615
|
+
Fr as PaymentType,
|
|
5616
|
+
mt as PreferencesStorageProvider,
|
|
5585
5617
|
ae as PriceAnalyze,
|
|
5586
|
-
|
|
5587
|
-
|
|
5618
|
+
It as PriceAnalyzeProvider,
|
|
5619
|
+
Ge as PriceCoefficientEnum,
|
|
5588
5620
|
B as PriceTemplate,
|
|
5589
5621
|
ve as PriceTemplateCategory,
|
|
5590
5622
|
X as PriceTemplateClient,
|
|
5591
|
-
|
|
5623
|
+
ze as PriceTemplateICatalogableItem,
|
|
5592
5624
|
Pe as PriceTemplateProduct,
|
|
5593
|
-
|
|
5625
|
+
St as PriceTemplateProvider,
|
|
5594
5626
|
ee as PricingRole,
|
|
5595
|
-
|
|
5627
|
+
Lt as PricingRoleProvider,
|
|
5596
5628
|
De as PrimaryCatalogableItem,
|
|
5597
5629
|
T as Product,
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5630
|
+
At as ProductCategoryDataProvider,
|
|
5631
|
+
Tt as ProductDataProvider,
|
|
5632
|
+
zr as ProductFileType,
|
|
5601
5633
|
Se as ProductPriceCoefficient,
|
|
5602
|
-
|
|
5603
|
-
|
|
5634
|
+
Vr as ProductPriceHistory,
|
|
5635
|
+
dt as PropertiesProvider,
|
|
5604
5636
|
Z as Property,
|
|
5605
|
-
|
|
5606
|
-
|
|
5637
|
+
We as PropertyType,
|
|
5638
|
+
Ir as PropertyTypeEnum,
|
|
5607
5639
|
z as PropertyValue,
|
|
5608
|
-
|
|
5640
|
+
xt as RecommendationsDataProvider,
|
|
5609
5641
|
Ie as RecommendationsList,
|
|
5610
5642
|
f as Reference,
|
|
5611
5643
|
R as ReferenceDataProvider,
|
|
5612
5644
|
re as Region,
|
|
5613
|
-
|
|
5645
|
+
Ve as ResourceType,
|
|
5614
5646
|
_ as SalesDirection,
|
|
5615
|
-
|
|
5647
|
+
Lr as SentryConfig,
|
|
5616
5648
|
qe as Seo,
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5649
|
+
qt as SeoDataProvider,
|
|
5650
|
+
Ee as SourcePrimaryInterest,
|
|
5651
|
+
$r as StockCount,
|
|
5620
5652
|
Le as TypedInstanceFactory,
|
|
5621
5653
|
Oe as UnitsHelper,
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5654
|
+
Rt as UnknownClientDataProvider,
|
|
5655
|
+
Fe as UpdatableNamedIdentity,
|
|
5656
|
+
Wr as User,
|
|
5657
|
+
Be as UserCommonInfo,
|
|
5658
|
+
jr as UserDataProvider,
|
|
5627
5659
|
M as UserShortInfo,
|
|
5628
|
-
|
|
5629
|
-
|
|
5660
|
+
Br as UserTypeEnum,
|
|
5661
|
+
dr as VersionConfig,
|
|
5630
5662
|
fe as Warehouse,
|
|
5631
|
-
|
|
5632
|
-
|
|
5663
|
+
Mt as useReferencesStore,
|
|
5664
|
+
Ut as useUserStateStore
|
|
5633
5665
|
};
|
|
5634
5666
|
//# sourceMappingURL=sc-common-lib.js.map
|