@snabcentr/common-lib 1.65.0 → 1.65.2
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 +80 -72
- 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/clients/classes/clients-list-filters.d.ts +4 -0
- package/dist/src/clients/classes/clients-list-filters.d.ts.map +1 -1
- package/dist/src/clients/interfaces/i-clients-list-filters.d.ts +4 -0
- package/dist/src/clients/interfaces/i-clients-list-filters.d.ts.map +1 -1
- package/dist/src/http/classes/http-requester.d.ts +6 -0
- package/dist/src/http/classes/http-requester.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/manifest.json
CHANGED
package/dist/release_notes.tmp
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
## 1.65.
|
|
1
|
+
## 1.65.2 (2025-08-28)
|
|
2
2
|
|
|
3
|
-
###
|
|
3
|
+
### added (1 change)
|
|
4
4
|
|
|
5
|
-
- [#
|
|
5
|
+
- [#12144: Добавлено свойство isManagerRequired в фильтры клиентов.](web_soft/libs/ts/snabcentr-common-lib@400e9373320d375f19120b18058a7bd1b0aa3833) ([merge request](web_soft/libs/ts/snabcentr-common-lib!125))
|
|
6
6
|
|
package/dist/sc-common-lib.js
CHANGED
|
@@ -3,9 +3,9 @@ var pr = (n, r, e) => r in n ? ur(n, r, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var t = (n, r, e) => pr(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import { jwtDecode as je } from "jwt-decode";
|
|
5
5
|
import { merge as We, isNil as U, toUpper as hr, constant as gr, isUndefined as mr, isString as f, cloneDeep as fr, noop as m, toLower as yr, isFunction as _e, isEmpty as Se, map as le, forEach as wr, isDate as Cr, isArray as Ee, omitBy as vr, isObject as Pr } from "lodash-es";
|
|
6
|
-
import { objectToCamel as
|
|
7
|
-
import { parseISO as y, format as z, isAfter as Rr, startOfToday as Ve, addSeconds as Ar, addBusinessDays as Dr, endOfTomorrow as
|
|
8
|
-
import
|
|
6
|
+
import { objectToCamel as Ie, objectToSnake as Oe } from "ts-case-convert";
|
|
7
|
+
import { parseISO as y, format as z, isAfter as Rr, startOfToday as Ve, addSeconds as Ar, addBusinessDays as Dr, endOfTomorrow as ar, startOfTomorrow as $r, endOfYesterday as Tr, startOfYesterday as br, endOfToday as _r, endOfDay as Sr, startOfDay as Ir } from "date-fns";
|
|
8
|
+
import Lr from "axios";
|
|
9
9
|
import { defineStore as fe } from "pinia";
|
|
10
10
|
import { ref as C, computed as v } from "vue";
|
|
11
11
|
class ue {
|
|
@@ -107,7 +107,7 @@ class ue {
|
|
|
107
107
|
* @param jwtToken JWT-ключ доступа.
|
|
108
108
|
*/
|
|
109
109
|
static getJwtPayload(r) {
|
|
110
|
-
return new ue(
|
|
110
|
+
return new ue(Ie(je(r)));
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
class At extends ue {
|
|
@@ -150,7 +150,7 @@ class At extends ue {
|
|
|
150
150
|
* @param jwtToken JWT-ключ доступа.
|
|
151
151
|
*/
|
|
152
152
|
static getJwtPayload(e) {
|
|
153
|
-
return new ue(
|
|
153
|
+
return new ue(Ie(je(e)));
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
class B {
|
|
@@ -178,7 +178,7 @@ class B {
|
|
|
178
178
|
return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : U(this.id);
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
class
|
|
181
|
+
class $ extends B {
|
|
182
182
|
/**
|
|
183
183
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
184
184
|
*
|
|
@@ -193,7 +193,7 @@ class a extends B {
|
|
|
193
193
|
this.name = (e == null ? void 0 : e.name) ?? "";
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
|
-
class Je extends
|
|
196
|
+
class Je extends $ {
|
|
197
197
|
/**
|
|
198
198
|
* Инициализирует экземпляр класса {@link CatalogableItem}.
|
|
199
199
|
*
|
|
@@ -216,7 +216,7 @@ class Je extends a {
|
|
|
216
216
|
this.slug = (e == null ? void 0 : e.slug) ?? "", this.code = (e == null ? void 0 : e.code) ?? "";
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
|
-
class
|
|
219
|
+
class $e extends Je {
|
|
220
220
|
/**
|
|
221
221
|
* Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
|
|
222
222
|
*
|
|
@@ -231,7 +231,7 @@ class ae extends Je {
|
|
|
231
231
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
232
232
|
}
|
|
233
233
|
}
|
|
234
|
-
class ne extends
|
|
234
|
+
class ne extends $e {
|
|
235
235
|
/**
|
|
236
236
|
* Инициализирует экземпляр класса {@link BaseCategory}.
|
|
237
237
|
*
|
|
@@ -259,7 +259,7 @@ class ne extends ae {
|
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
261
|
var Ke = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(Ke || {});
|
|
262
|
-
class w extends
|
|
262
|
+
class w extends $ {
|
|
263
263
|
/**
|
|
264
264
|
* Инициализирует экземпляр класса {@link Reference}.
|
|
265
265
|
*
|
|
@@ -286,7 +286,7 @@ class ye extends w {
|
|
|
286
286
|
return { id: -2, slug: Ke.Retail, name: "Розн. цена", guid: "", isNewRec: gr(!0) };
|
|
287
287
|
}
|
|
288
288
|
}
|
|
289
|
-
class
|
|
289
|
+
class Le {
|
|
290
290
|
/**
|
|
291
291
|
* Инициализирует экземпляр класса {@link ProductPriceCoefficient}.
|
|
292
292
|
*
|
|
@@ -422,7 +422,7 @@ const W = class W {
|
|
|
422
422
|
* Конфигурация приложения.
|
|
423
423
|
*/
|
|
424
424
|
t(W, "config");
|
|
425
|
-
let
|
|
425
|
+
let a = W;
|
|
426
426
|
class kr extends Je {
|
|
427
427
|
/**
|
|
428
428
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
@@ -548,14 +548,14 @@ class b extends kr {
|
|
|
548
548
|
t(this, "priceCoefficients");
|
|
549
549
|
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 = f(e == null ? void 0 : e.costDate) ? y(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((p) => new xr(p))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
|
|
550
550
|
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((p) => p.isPrimary));
|
|
551
|
-
s && (this.category = new
|
|
551
|
+
s && (this.category = new $e({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new $e(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new dr(p, a.getConfig().http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((p) => new Le(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
552
552
|
}
|
|
553
553
|
/**
|
|
554
554
|
* Возвращает признак, что это измеряемый товар.
|
|
555
555
|
*/
|
|
556
556
|
getIsMeasurable() {
|
|
557
557
|
var s;
|
|
558
|
-
const e = (s =
|
|
558
|
+
const e = (s = a.getConfig().catalog) == null ? void 0 : s.products.units;
|
|
559
559
|
return [...(e == null ? void 0 : e.linear) ?? ["пог.м.", "м."], ...(e == null ? void 0 : e.square) ?? ["м2"]].includes(this.unit);
|
|
560
560
|
}
|
|
561
561
|
/**
|
|
@@ -899,7 +899,7 @@ const _ = class _ {
|
|
|
899
899
|
* Возвращает базовый URL путь для выполнения запросов.
|
|
900
900
|
*/
|
|
901
901
|
// eslint-disable-next-line class-methods-use-this
|
|
902
|
-
t(this, "getBaseUrl", () => `${
|
|
902
|
+
t(this, "getBaseUrl", () => `${a.getConfig().http.portalApiUrl}/api`);
|
|
903
903
|
/**
|
|
904
904
|
* Возвращает токен доступа к системе.
|
|
905
905
|
*/
|
|
@@ -907,7 +907,7 @@ const _ = class _ {
|
|
|
907
907
|
t(this, "getAccessToken", () => {
|
|
908
908
|
var s, i;
|
|
909
909
|
let r;
|
|
910
|
-
const e =
|
|
910
|
+
const e = a.getConfig();
|
|
911
911
|
return (s = e.devMode) != null && s.authBearerToken && (r = (i = e.devMode) == null ? void 0 : i.authBearerToken), Promise.resolve(r);
|
|
912
912
|
});
|
|
913
913
|
/**
|
|
@@ -920,6 +920,12 @@ const _ = class _ {
|
|
|
920
920
|
* @param error Данные об ошибке.
|
|
921
921
|
*/
|
|
922
922
|
t(this, "requestErrorHandler", m);
|
|
923
|
+
/**
|
|
924
|
+
* Перехватчик запроса для установки URL для выполнения запросов.
|
|
925
|
+
*
|
|
926
|
+
* @param request Данные запроса.
|
|
927
|
+
*/
|
|
928
|
+
t(this, "setBaseUrlRequestInterceptor", (r) => (r.baseURL = this.getBaseUrl(), r));
|
|
923
929
|
/**
|
|
924
930
|
* Перехватчик запроса для установки заголовков аутентификации.
|
|
925
931
|
*
|
|
@@ -952,17 +958,15 @@ const _ = class _ {
|
|
|
952
958
|
* @param response Данные ответа на запрос.
|
|
953
959
|
*/
|
|
954
960
|
// eslint-disable-next-line class-methods-use-this
|
|
955
|
-
t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data =
|
|
956
|
-
const r =
|
|
957
|
-
this.defaultInstanceNotificationErrorResponseHandler = _.baseDefaultNotificationErrorResponseHandler, this.httpClient =
|
|
958
|
-
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
959
|
-
baseURL: this.getBaseUrl(),
|
|
961
|
+
t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = Ie(r.data)), r));
|
|
962
|
+
const r = a.getConfig().version;
|
|
963
|
+
this.defaultInstanceNotificationErrorResponseHandler = _.baseDefaultNotificationErrorResponseHandler, this.httpClient = Lr.create({
|
|
960
964
|
headers: {
|
|
961
|
-
"APP-VERSION": `${r.name} (${r.version}, ${z(r.date,
|
|
965
|
+
"APP-VERSION": `${r.name} (${r.version}, ${z(r.date, a.getConfig().dateFormats.uiDate)})`,
|
|
962
966
|
Accept: "application/json",
|
|
963
967
|
"Content-Type": "application/json"
|
|
964
968
|
}
|
|
965
|
-
}), this.httpClient.interceptors.request.use(this.authRequestInterceptor, (e) => Promise.reject(e)), this.httpClient.interceptors.request.use(this.dataConverterRequestInterceptor, (e) => Promise.reject(e)), this.httpClient.interceptors.response.use((e) => e, this.authErrorsResponseInterceptors), this.httpClient.interceptors.response.use(
|
|
969
|
+
}), this.httpClient.interceptors.request.use(this.setBaseUrlRequestInterceptor, (e) => Promise.reject(e)), this.httpClient.interceptors.request.use(this.authRequestInterceptor, (e) => Promise.reject(e)), this.httpClient.interceptors.request.use(this.dataConverterRequestInterceptor, (e) => Promise.reject(e)), this.httpClient.interceptors.response.use((e) => e, this.authErrorsResponseInterceptors), this.httpClient.interceptors.response.use(
|
|
966
970
|
this.dataConverterResponseInterceptor,
|
|
967
971
|
// Возвращаем изменённую структуру сообщения об ошибке.
|
|
968
972
|
(e) => _.convertHttpErrorResponse(e)
|
|
@@ -1086,7 +1090,7 @@ t(_, "instances", {}), /**
|
|
|
1086
1090
|
*/
|
|
1087
1091
|
t(_, "baseDefaultNotificationErrorResponseHandler", m);
|
|
1088
1092
|
let h = _;
|
|
1089
|
-
class
|
|
1093
|
+
class at extends h {
|
|
1090
1094
|
/**
|
|
1091
1095
|
* Возвращает содержимое корзины указанного клиента.
|
|
1092
1096
|
*
|
|
@@ -1210,7 +1214,7 @@ class q extends ne {
|
|
|
1210
1214
|
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 b(o));
|
|
1211
1215
|
}
|
|
1212
1216
|
}
|
|
1213
|
-
class Ye extends
|
|
1217
|
+
class Ye extends $ {
|
|
1214
1218
|
/**
|
|
1215
1219
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1216
1220
|
*
|
|
@@ -1240,7 +1244,7 @@ class Hr extends Ye {
|
|
|
1240
1244
|
this.deletedAt = f(e == null ? void 0 : e.deletedAt) ? y(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1241
1245
|
}
|
|
1242
1246
|
}
|
|
1243
|
-
class
|
|
1247
|
+
class $t {
|
|
1244
1248
|
/**
|
|
1245
1249
|
* Возвращает актуальные и не просроченные данные из хранилища.
|
|
1246
1250
|
*
|
|
@@ -1274,7 +1278,7 @@ class at {
|
|
|
1274
1278
|
);
|
|
1275
1279
|
}
|
|
1276
1280
|
}
|
|
1277
|
-
class G extends
|
|
1281
|
+
class G extends $ {
|
|
1278
1282
|
/**
|
|
1279
1283
|
* Инициализирует экземпляр класса {@link UserShortInfo}.
|
|
1280
1284
|
*
|
|
@@ -1289,7 +1293,7 @@ class G extends a {
|
|
|
1289
1293
|
this.type = e == null ? void 0 : e.type;
|
|
1290
1294
|
}
|
|
1291
1295
|
}
|
|
1292
|
-
class zr extends
|
|
1296
|
+
class zr extends $ {
|
|
1293
1297
|
/**
|
|
1294
1298
|
* Инициализирует экземпляр класса {@link DiscountShortInfo}.
|
|
1295
1299
|
*
|
|
@@ -1406,7 +1410,7 @@ class jr {
|
|
|
1406
1410
|
}
|
|
1407
1411
|
class S extends w {
|
|
1408
1412
|
}
|
|
1409
|
-
class re extends
|
|
1413
|
+
class re extends $ {
|
|
1410
1414
|
/**
|
|
1411
1415
|
* Инициализирует экземпляр класса {@link ManagerCommon}.
|
|
1412
1416
|
*
|
|
@@ -1580,7 +1584,7 @@ class de extends w {
|
|
|
1580
1584
|
e && (this.region = new te(e.region));
|
|
1581
1585
|
}
|
|
1582
1586
|
}
|
|
1583
|
-
class Ze extends
|
|
1587
|
+
class Ze extends $ {
|
|
1584
1588
|
/**
|
|
1585
1589
|
* Инициализирует экземпляр класса {@link UserCommonInfo}.
|
|
1586
1590
|
*
|
|
@@ -1708,7 +1712,7 @@ class Re extends Xe {
|
|
|
1708
1712
|
}
|
|
1709
1713
|
class er extends w {
|
|
1710
1714
|
}
|
|
1711
|
-
class Z extends
|
|
1715
|
+
class Z extends $ {
|
|
1712
1716
|
/**
|
|
1713
1717
|
* Инициализирует экземпляр класса {@link Property}.
|
|
1714
1718
|
*
|
|
@@ -1840,7 +1844,7 @@ class bt extends w {
|
|
|
1840
1844
|
}
|
|
1841
1845
|
class Vr extends w {
|
|
1842
1846
|
}
|
|
1843
|
-
class he extends
|
|
1847
|
+
class he extends $ {
|
|
1844
1848
|
/**
|
|
1845
1849
|
* Инициализирует экземпляр класса {@link Currency}.
|
|
1846
1850
|
*
|
|
@@ -1897,7 +1901,7 @@ const E = class E extends h {
|
|
|
1897
1901
|
* Время кэширования данных ответов на запросы (секунд).
|
|
1898
1902
|
*/
|
|
1899
1903
|
t(this, "responseDataCacheTimeout");
|
|
1900
|
-
this.responseDataCacheTimeout =
|
|
1904
|
+
this.responseDataCacheTimeout = a.getConfig().http.responseDataCacheTimeout;
|
|
1901
1905
|
}
|
|
1902
1906
|
/**
|
|
1903
1907
|
* Возвращает кэшированные данные.
|
|
@@ -2177,7 +2181,7 @@ class qe {
|
|
|
2177
2181
|
r != null && r.products && (this.products = r.products.map((e) => new b(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new q(e)));
|
|
2178
2182
|
}
|
|
2179
2183
|
}
|
|
2180
|
-
class ee extends
|
|
2184
|
+
class ee extends $ {
|
|
2181
2185
|
/**
|
|
2182
2186
|
* Инициализирует экземпляр класса {@link PricingRole}.
|
|
2183
2187
|
*
|
|
@@ -2261,7 +2265,7 @@ class _t extends h {
|
|
|
2261
2265
|
*/
|
|
2262
2266
|
// eslint-disable-next-line class-methods-use-this
|
|
2263
2267
|
getPriceExportLink(r = "csv", e = !1, s = void 0, i = void 0) {
|
|
2264
|
-
let c = `${
|
|
2268
|
+
let c = `${a.getConfig().http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
|
|
2265
2269
|
return s && (c += `&category_id=${s}`), i && (c += `&client_id=${i}`), c;
|
|
2266
2270
|
}
|
|
2267
2271
|
}
|
|
@@ -2464,7 +2468,7 @@ class St extends h {
|
|
|
2464
2468
|
return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
|
|
2465
2469
|
}
|
|
2466
2470
|
}
|
|
2467
|
-
class
|
|
2471
|
+
class It extends h {
|
|
2468
2472
|
/**
|
|
2469
2473
|
* Возвращает список шаблонов прайс-листа привязанных к клиенту.
|
|
2470
2474
|
*
|
|
@@ -2499,7 +2503,7 @@ class Lt extends h {
|
|
|
2499
2503
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_attach
|
|
2500
2504
|
*/
|
|
2501
2505
|
attachTemplate(r, e, s) {
|
|
2502
|
-
const i =
|
|
2506
|
+
const i = a.getConfig().dateFormats.api;
|
|
2503
2507
|
return this.post(
|
|
2504
2508
|
`/internal/clients/${r}/price/templates/${e}`,
|
|
2505
2509
|
s && {
|
|
@@ -2533,7 +2537,7 @@ class Lt extends h {
|
|
|
2533
2537
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_change
|
|
2534
2538
|
*/
|
|
2535
2539
|
changeTemplate(r, e, s, i) {
|
|
2536
|
-
const o =
|
|
2540
|
+
const o = a.getConfig().dateFormats.api;
|
|
2537
2541
|
return this.patch(
|
|
2538
2542
|
`/internal/clients/${r}/price/templates/${e}/${s}`,
|
|
2539
2543
|
i && {
|
|
@@ -2556,7 +2560,7 @@ class Lt extends h {
|
|
|
2556
2560
|
return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
|
|
2557
2561
|
}
|
|
2558
2562
|
}
|
|
2559
|
-
class
|
|
2563
|
+
class Lt extends h {
|
|
2560
2564
|
/**
|
|
2561
2565
|
* Возвращает список данных о корневых категориях.
|
|
2562
2566
|
*
|
|
@@ -2629,7 +2633,7 @@ class It extends h {
|
|
|
2629
2633
|
getCategoryProductsCoefficients(r) {
|
|
2630
2634
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
2631
2635
|
const { data: s } = e;
|
|
2632
|
-
return wr(s, (i) => i.map((o) => new
|
|
2636
|
+
return wr(s, (i) => i.map((o) => new Le(o))), s;
|
|
2633
2637
|
});
|
|
2634
2638
|
}
|
|
2635
2639
|
/**
|
|
@@ -2679,7 +2683,7 @@ class xt extends h {
|
|
|
2679
2683
|
return this.get(
|
|
2680
2684
|
`/internal/catalog/products/${r}/coefficients`,
|
|
2681
2685
|
{},
|
|
2682
|
-
(e) => le(e.data, (s) => new
|
|
2686
|
+
(e) => le(e.data, (s) => new Le(s))
|
|
2683
2687
|
);
|
|
2684
2688
|
}
|
|
2685
2689
|
/**
|
|
@@ -2825,7 +2829,7 @@ class Ge {
|
|
|
2825
2829
|
field: this.field,
|
|
2826
2830
|
op: this.op
|
|
2827
2831
|
};
|
|
2828
|
-
return r.value = Cr(this.value) ? z(this.value,
|
|
2832
|
+
return r.value = Cr(this.value) ? z(this.value, a.getConfig().dateFormats.api) : this.value, r;
|
|
2829
2833
|
}
|
|
2830
2834
|
}
|
|
2831
2835
|
class ie {
|
|
@@ -3634,7 +3638,7 @@ class Te extends B {
|
|
|
3634
3638
|
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new he(e.currency));
|
|
3635
3639
|
}
|
|
3636
3640
|
}
|
|
3637
|
-
class be extends
|
|
3641
|
+
class be extends $ {
|
|
3638
3642
|
/**
|
|
3639
3643
|
* Инициализирует экземпляр класса {@link Contact}.
|
|
3640
3644
|
*
|
|
@@ -3688,7 +3692,7 @@ class F extends be {
|
|
|
3688
3692
|
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 = f(e == null ? void 0 : e.deletedAt) ? y(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
3689
3693
|
}
|
|
3690
3694
|
}
|
|
3691
|
-
class ir extends
|
|
3695
|
+
class ir extends $ {
|
|
3692
3696
|
/**
|
|
3693
3697
|
* Инициализирует экземпляр класса {@link ContragentBase}.
|
|
3694
3698
|
*
|
|
@@ -4074,6 +4078,10 @@ class Gt {
|
|
|
4074
4078
|
* Данные о менеджерах клиентов.
|
|
4075
4079
|
*/
|
|
4076
4080
|
t(this, "managers");
|
|
4081
|
+
/**
|
|
4082
|
+
* Признак того, что наличие менеджера у клиента является обязательным.
|
|
4083
|
+
*/
|
|
4084
|
+
t(this, "isManagerRequired");
|
|
4077
4085
|
/**
|
|
4078
4086
|
* Направления продаж.
|
|
4079
4087
|
*/
|
|
@@ -4204,7 +4212,7 @@ class cr extends B {
|
|
|
4204
4212
|
this.createdAt = f(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new G(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
|
|
4205
4213
|
}
|
|
4206
4214
|
}
|
|
4207
|
-
class ot extends
|
|
4215
|
+
class ot extends $ {
|
|
4208
4216
|
/**
|
|
4209
4217
|
* Инициализирует экземпляр класса {@link ClientAdditionalData}.
|
|
4210
4218
|
*
|
|
@@ -4509,7 +4517,7 @@ class Bt extends ve {
|
|
|
4509
4517
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
|
|
4510
4518
|
*/
|
|
4511
4519
|
createContragentClientData(r, e, s = {}) {
|
|
4512
|
-
var p, R, D,
|
|
4520
|
+
var p, R, D, I, L, x, k, d;
|
|
4513
4521
|
let i;
|
|
4514
4522
|
const o = e, c = e, u = e;
|
|
4515
4523
|
switch (e.opf.slug) {
|
|
@@ -4537,7 +4545,7 @@ class Bt extends ve {
|
|
|
4537
4545
|
name: c.name,
|
|
4538
4546
|
alternative_name: c.alternativeName,
|
|
4539
4547
|
partner_group_id: (D = c.partnerGroup) == null ? void 0 : D.id,
|
|
4540
|
-
manager_id: (
|
|
4548
|
+
manager_id: (I = c.manager) == null ? void 0 : I.id,
|
|
4541
4549
|
comment: c.comment,
|
|
4542
4550
|
inn: c.inn,
|
|
4543
4551
|
kpp: c.kpp,
|
|
@@ -4555,7 +4563,7 @@ class Bt extends ve {
|
|
|
4555
4563
|
opf: u.opf.slug,
|
|
4556
4564
|
name: u.name,
|
|
4557
4565
|
alternative_name: u.alternativeName,
|
|
4558
|
-
partner_group_id: (
|
|
4566
|
+
partner_group_id: (L = u.partnerGroup) == null ? void 0 : L.id,
|
|
4559
4567
|
manager_id: (x = u.manager) == null ? void 0 : x.id,
|
|
4560
4568
|
comment: u.comment,
|
|
4561
4569
|
director_name: u.directorName,
|
|
@@ -4598,7 +4606,7 @@ class Bt extends ve {
|
|
|
4598
4606
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
|
|
4599
4607
|
*/
|
|
4600
4608
|
updateContragentClientData(r, e, s = {}) {
|
|
4601
|
-
var p, R, D,
|
|
4609
|
+
var p, R, D, I, L, x, k, d;
|
|
4602
4610
|
let i;
|
|
4603
4611
|
const o = e, c = e, u = e;
|
|
4604
4612
|
switch (e.opf.slug) {
|
|
@@ -4626,7 +4634,7 @@ class Bt extends ve {
|
|
|
4626
4634
|
name: c.name,
|
|
4627
4635
|
alternative_name: c.alternativeName,
|
|
4628
4636
|
partner_group_id: (D = c.partnerGroup) == null ? void 0 : D.id,
|
|
4629
|
-
manager_id: (
|
|
4637
|
+
manager_id: (I = c.manager) == null ? void 0 : I.id,
|
|
4630
4638
|
comment: c.comment,
|
|
4631
4639
|
inn: c.inn,
|
|
4632
4640
|
kpp: c.kpp,
|
|
@@ -4644,7 +4652,7 @@ class Bt extends ve {
|
|
|
4644
4652
|
opf: u.opf.slug,
|
|
4645
4653
|
name: u.name,
|
|
4646
4654
|
alternative_name: u.alternativeName,
|
|
4647
|
-
partner_group_id: (
|
|
4655
|
+
partner_group_id: (L = u.partnerGroup) == null ? void 0 : L.id,
|
|
4648
4656
|
manager_id: (x = u.manager) == null ? void 0 : x.id,
|
|
4649
4657
|
comment: u.comment,
|
|
4650
4658
|
director_name: u.directorName,
|
|
@@ -5127,10 +5135,10 @@ class jt {
|
|
|
5127
5135
|
const r = Dr(/* @__PURE__ */ new Date(), 1);
|
|
5128
5136
|
return {
|
|
5129
5137
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
5130
|
-
nextWorkingDay: { label: "Следующий рабочий день", from:
|
|
5138
|
+
nextWorkingDay: { label: "Следующий рабочий день", from: Ir(r), to: Sr(r) },
|
|
5131
5139
|
today: { label: "Сегодня", from: Ve(), to: _r() },
|
|
5132
5140
|
yesterday: { label: "Вчера", from: br(), to: Tr() },
|
|
5133
|
-
tomorrow: { label: "Завтра", from:
|
|
5141
|
+
tomorrow: { label: "Завтра", from: $r(), to: ar() }
|
|
5134
5142
|
};
|
|
5135
5143
|
}
|
|
5136
5144
|
}
|
|
@@ -5454,7 +5462,7 @@ class De {
|
|
|
5454
5462
|
this.client = new oe(r == null ? void 0 : r.client), this.product = new b(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) ?? ke.Product;
|
|
5455
5463
|
}
|
|
5456
5464
|
}
|
|
5457
|
-
const
|
|
5465
|
+
const ae = (n) => {
|
|
5458
5466
|
var r, e, s, i, o;
|
|
5459
5467
|
return n ? vr(
|
|
5460
5468
|
{
|
|
@@ -5486,7 +5494,7 @@ class Vt extends h {
|
|
|
5486
5494
|
`/internal/price/products/${r}/analyze`,
|
|
5487
5495
|
{
|
|
5488
5496
|
...He(e),
|
|
5489
|
-
filters:
|
|
5497
|
+
filters: ae(s)
|
|
5490
5498
|
},
|
|
5491
5499
|
(i) => i.data.map((o) => new De(o))
|
|
5492
5500
|
);
|
|
@@ -5505,7 +5513,7 @@ class Vt extends h {
|
|
|
5505
5513
|
`/internal/price/categories/${r}/analyze`,
|
|
5506
5514
|
{
|
|
5507
5515
|
...He(e),
|
|
5508
|
-
filters:
|
|
5516
|
+
filters: ae(s)
|
|
5509
5517
|
},
|
|
5510
5518
|
(i) => i.data.map((o) => new De(o))
|
|
5511
5519
|
);
|
|
@@ -5526,7 +5534,7 @@ class Vt extends h {
|
|
|
5526
5534
|
`/internal/price/categories/${r}/analyze/square`,
|
|
5527
5535
|
{
|
|
5528
5536
|
...e,
|
|
5529
|
-
filters:
|
|
5537
|
+
filters: ae(s)
|
|
5530
5538
|
},
|
|
5531
5539
|
(i) => i.data.map((o) => new De(o))
|
|
5532
5540
|
);
|
|
@@ -5621,7 +5629,7 @@ class Jt extends h {
|
|
|
5621
5629
|
}
|
|
5622
5630
|
}
|
|
5623
5631
|
const P = fe("__references_private", () => {
|
|
5624
|
-
const n = C({}), r = C(void 0), e = C(void 0), s = C(void 0), i = C(void 0), o = C(void 0), c = C(void 0), u = C(void 0), p = C(void 0), R = C(void 0), D = C(void 0),
|
|
5632
|
+
const n = C({}), r = C(void 0), e = C(void 0), s = C(void 0), i = C(void 0), o = C(void 0), c = C(void 0), u = C(void 0), p = C(void 0), R = C(void 0), D = C(void 0), I = C(void 0), L = C(void 0), x = C(void 0), k = C(void 0), d = C(void 0), O = C(void 0), l = C(void 0);
|
|
5625
5633
|
return {
|
|
5626
5634
|
/**
|
|
5627
5635
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -5670,11 +5678,11 @@ const P = fe("__references_private", () => {
|
|
|
5670
5678
|
/**
|
|
5671
5679
|
* Справочник типов файлов продукктов/категорий.
|
|
5672
5680
|
*/
|
|
5673
|
-
productFileTypeReference:
|
|
5681
|
+
productFileTypeReference: I,
|
|
5674
5682
|
/**
|
|
5675
5683
|
* Справочник типов ресурсов.
|
|
5676
5684
|
*/
|
|
5677
|
-
resourceTypesReference:
|
|
5685
|
+
resourceTypesReference: L,
|
|
5678
5686
|
/**
|
|
5679
5687
|
* Справочник направлений продаж.
|
|
5680
5688
|
*/
|
|
@@ -5752,12 +5760,12 @@ const P = fe("__references_private", () => {
|
|
|
5752
5760
|
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(A).getSalesDirections().then((g) => {
|
|
5753
5761
|
l.salesDirectionsReference = g;
|
|
5754
5762
|
}).catch(m)), l.salesDirectionsReference;
|
|
5755
|
-
}),
|
|
5763
|
+
}), I = v(() => {
|
|
5756
5764
|
const l = P();
|
|
5757
5765
|
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(A).getSourcePrimaryInterest().then((g) => {
|
|
5758
5766
|
l.sourcePrimaryInterestReference = g;
|
|
5759
5767
|
}).catch(m)), l.sourcePrimaryInterestReference;
|
|
5760
|
-
}),
|
|
5768
|
+
}), L = v(() => {
|
|
5761
5769
|
const l = P();
|
|
5762
5770
|
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(A).getDeliveryTypes().then((g) => {
|
|
5763
5771
|
l.deliveryTypeReference = g;
|
|
@@ -5831,11 +5839,11 @@ const P = fe("__references_private", () => {
|
|
|
5831
5839
|
/**
|
|
5832
5840
|
* Справочник каналов первичного интереса.
|
|
5833
5841
|
*/
|
|
5834
|
-
sourcePrimaryInterestsReference:
|
|
5842
|
+
sourcePrimaryInterestsReference: I,
|
|
5835
5843
|
/**
|
|
5836
5844
|
* Справочник типов доставки.
|
|
5837
5845
|
*/
|
|
5838
|
-
deliveryTypeReference:
|
|
5846
|
+
deliveryTypeReference: L,
|
|
5839
5847
|
/**
|
|
5840
5848
|
* Список менеджеров.
|
|
5841
5849
|
*/
|
|
@@ -5949,14 +5957,14 @@ class Xt {
|
|
|
5949
5957
|
export {
|
|
5950
5958
|
Er as AnyReference,
|
|
5951
5959
|
Dt as AppBaseConfig,
|
|
5952
|
-
|
|
5960
|
+
a as AppConfigProvider,
|
|
5953
5961
|
Te as BankAccount,
|
|
5954
5962
|
ve as BasePaginationProvider,
|
|
5955
5963
|
Fr as CalculationTypeEnum,
|
|
5956
5964
|
ce as Cart,
|
|
5957
5965
|
Or as CartItem,
|
|
5958
5966
|
Nr as CartItemBase,
|
|
5959
|
-
|
|
5967
|
+
at as CartProvider,
|
|
5960
5968
|
_t as CatalogProvider,
|
|
5961
5969
|
Je as CatalogableItem,
|
|
5962
5970
|
q as Category,
|
|
@@ -5969,7 +5977,7 @@ export {
|
|
|
5969
5977
|
pe as ClientCategory,
|
|
5970
5978
|
Bt as ClientDataProvider,
|
|
5971
5979
|
St as ClientPriceProvider,
|
|
5972
|
-
|
|
5980
|
+
It as ClientPriceTemplateProvider,
|
|
5973
5981
|
K as ClientProduct,
|
|
5974
5982
|
kt as ClientProductCategoryDataProvider,
|
|
5975
5983
|
dt as ClientProductDataProvider,
|
|
@@ -6020,7 +6028,7 @@ export {
|
|
|
6020
6028
|
Wt as ManagerDataFactory,
|
|
6021
6029
|
lt as ManagerDataProvider,
|
|
6022
6030
|
ht as MetaTagItem,
|
|
6023
|
-
|
|
6031
|
+
$ as NamedIdentity,
|
|
6024
6032
|
M as Opf,
|
|
6025
6033
|
T as OpfEnum,
|
|
6026
6034
|
pt as Order,
|
|
@@ -6032,7 +6040,7 @@ export {
|
|
|
6032
6040
|
Et as OrdersDataProvider,
|
|
6033
6041
|
Y as PartnerGroup,
|
|
6034
6042
|
Qr as PaymentType,
|
|
6035
|
-
|
|
6043
|
+
$t as PreferencesStorageProvider,
|
|
6036
6044
|
De as PriceAnalyze,
|
|
6037
6045
|
Vt as PriceAnalyzeProvider,
|
|
6038
6046
|
ye as PriceCoefficient,
|
|
@@ -6045,12 +6053,12 @@ export {
|
|
|
6045
6053
|
Nt as PriceTemplateProvider,
|
|
6046
6054
|
ee as PricingRole,
|
|
6047
6055
|
Ot as PricingRoleProvider,
|
|
6048
|
-
|
|
6056
|
+
$e as PrimaryCatalogableItem,
|
|
6049
6057
|
b as Product,
|
|
6050
|
-
|
|
6058
|
+
Lt as ProductCategoryDataProvider,
|
|
6051
6059
|
xt as ProductDataProvider,
|
|
6052
6060
|
Yr as ProductFileType,
|
|
6053
|
-
|
|
6061
|
+
Le as ProductPriceCoefficient,
|
|
6054
6062
|
rt as ProductPriceHistory,
|
|
6055
6063
|
qt as PropertiesProvider,
|
|
6056
6064
|
Z as Property,
|