@snabcentr/common-lib 2.7.5 → 2.7.7

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.
@@ -4,6 +4,6 @@
4
4
  "name": "public-api",
5
5
  "src": "src/public-api.ts",
6
6
  "isEntry": true,
7
- "integrity": "sha384-6PH+xT1k0S5wlePBiEUDsiBw1miqThb1Rs6ub6B9QK87ylVVsOYFsbyqfZiM56KZ"
7
+ "integrity": "sha384-gYDtXVfdSfxadtFk49KqAk3jkEHSubm0SPn+s9wfNmF1lL3tS37uH1CMiaOSk4GW"
8
8
  }
9
9
  }
@@ -1,6 +1,4 @@
1
- ## 2.7.5 (2026-06-09)
1
+ ## 2.7.7 (2026-06-15)
2
2
 
3
- ### added (1 change)
4
-
5
- - [#13197: Добавлен признак учёта клиентов подчинённых менеджеров в фильтры списка клиентов](web_soft/libs/ts/snabcentr-common-lib@dfa6da05189d34968ba2dd029fac26aab44b6756) ([merge request](web_soft/libs/ts/snabcentr-common-lib!195))
3
+ No changes.
6
4
 
@@ -336,7 +336,7 @@ class tt {
336
336
  };
337
337
  }
338
338
  }
339
- const d = W("common.config", () => {
339
+ const I = W("common.config", () => {
340
340
  const i = y(new tt());
341
341
  return {
342
342
  /**
@@ -486,7 +486,7 @@ const V = W("common.auth_state_private", () => {
486
486
  );
487
487
  if (o)
488
488
  return Promise.resolve(o);
489
- const c = (u = d().config.devMode) == null ? void 0 : u.initAuthBearerToken;
489
+ const c = (u = I().config.devMode) == null ? void 0 : u.initAuthBearerToken;
490
490
  return c ? Promise.resolve(c) : void 0;
491
491
  })()
492
492
  ), r = y(void 0), e = y(void 0), s = Mr(/* @__PURE__ */ new Map());
@@ -1101,7 +1101,7 @@ class L extends it {
1101
1101
  t(this, "priceCoefficients");
1102
1102
  this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new Qe(e.unit) : new Qe(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new O(e.currency) : new O(), this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = C(e == null ? void 0 : e.costDate) ? R(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((n = e == null ? void 0 : e.stockCount) == null ? void 0 : n.map((h) => new ot(h))) ?? [], this.type = "product";
1103
1103
  const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((h) => h.isPrimary));
1104
- s && (this.category = new qe({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((h) => new qe(h))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((h) => new st(h, d().config.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((h) => new je(h))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
1104
+ s && (this.category = new qe({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((h) => new qe(h))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((h) => new st(h, I().config.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((h) => new je(h))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
1105
1105
  }
1106
1106
  /**
1107
1107
  * Возвращает признак, что это измеряемый товар.
@@ -1349,7 +1349,7 @@ const a = class a {
1349
1349
  /**
1350
1350
  * Базовый URL путь для выполнения запросов.
1351
1351
  */
1352
- t(this, "baseUrl", `${d().config.http.portalApiUrl}/api`);
1352
+ t(this, "baseUrl", `${I().config.http.portalApiUrl}/api`);
1353
1353
  /**
1354
1354
  * Обработчик ошибок выполнения запросов текущего экземпляра класса.
1355
1355
  *
@@ -2336,7 +2336,7 @@ class Vt extends p {
2336
2336
  */
2337
2337
  // eslint-disable-next-line class-methods-use-this
2338
2338
  getPriceExportLink(r = "csv", e = !1, s = void 0, n = void 0) {
2339
- let c = `${d().config.http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
2339
+ let c = `${I().config.http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
2340
2340
  return s && (c += `&category_id=${s}`), n && (c += `&client_id=${n}`), c;
2341
2341
  }
2342
2342
  }
@@ -2574,7 +2574,7 @@ class Qt extends p {
2574
2574
  * @see /doc/api/internal#/operations/api_internal_client_price_template_attach
2575
2575
  */
2576
2576
  attachTemplate(r, e, s) {
2577
- const n = d().config.dateFormats.api;
2577
+ const n = I().config.dateFormats.api;
2578
2578
  return this.post(
2579
2579
  `/internal/clients/${r}/price/templates/${e}`,
2580
2580
  s && {
@@ -2608,7 +2608,7 @@ class Qt extends p {
2608
2608
  * @see /doc/api/internal#/operations/api_internal_client_price_template_change
2609
2609
  */
2610
2610
  changeTemplate(r, e, s, n) {
2611
- const o = d().config.dateFormats.api;
2611
+ const o = I().config.dateFormats.api;
2612
2612
  return this.patch(
2613
2613
  `/internal/clients/${r}/price/templates/${e}/${s}`,
2614
2614
  n && {
@@ -2888,7 +2888,7 @@ class Xe {
2888
2888
  field: this.field,
2889
2889
  op: this.op
2890
2890
  };
2891
- return r.value = xe(this.value) ? k(this.value, d().config.dateFormats.api) : this.value, r;
2891
+ return r.value = xe(this.value) ? k(this.value, I().config.dateFormats.api) : this.value, r;
2892
2892
  }
2893
2893
  }
2894
2894
  class G {
@@ -5165,7 +5165,7 @@ const Y = class Y extends p {
5165
5165
  * Время кэширования данных ответов на запросы (секунд).
5166
5166
  */
5167
5167
  t(this, "responseDataCacheTimeout");
5168
- this.responseDataCacheTimeout = d().config.http.responseDataCacheTimeout;
5168
+ this.responseDataCacheTimeout = I().config.http.responseDataCacheTimeout;
5169
5169
  }
5170
5170
  /**
5171
5171
  * Возвращает кэшированные данные.
@@ -6158,7 +6158,7 @@ class St extends fr {
6158
6158
  this.product = new j(e.product), this.currency = new O(e.currency), this.cost = e.cost, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.costRub = e.costRub, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.sawing = e.sawing, s && (this.replacement = s, this.quantity !== s.quantity && this.changedFields.push("quantity"), this.length !== s.length && this.changedFields.push("length"));
6159
6159
  }
6160
6160
  }
6161
- class I extends kr {
6161
+ class d extends kr {
6162
6162
  /**
6163
6163
  * Инициализирует экземпляр класса {@link Order}.
6164
6164
  *
@@ -6312,7 +6312,7 @@ class Cs extends Ae {
6312
6312
  * @see /doc/api/internal#/Заказы/api_internal_orders_get
6313
6313
  */
6314
6314
  getOrder(r) {
6315
- return this.get(`/internal/orders/${r}`, {}, (e) => new I(e.data));
6315
+ return this.get(`/internal/orders/${r}`, {}, (e) => new d(e.data));
6316
6316
  }
6317
6317
  /**
6318
6318
  * Создаёт новый заказ клиента из содержимого корзины текущего пользователя.
@@ -6326,14 +6326,14 @@ class Cs extends Ae {
6326
6326
  * @see /doc/api/internal#/operations/api_internal_client_orders_create
6327
6327
  */
6328
6328
  createClientOrder(r, e, s, n = {}) {
6329
- const o = d().config.dateFormats.api;
6329
+ const o = I().config.dateFormats.api;
6330
6330
  return this.post(
6331
6331
  `/internal/clients/${r}/orders/${e}`,
6332
6332
  {
6333
6333
  ...s,
6334
6334
  deliveryDate: k(s.deliveryDate, o)
6335
6335
  },
6336
- (c) => c.data.map((u) => new I(u)),
6336
+ (c) => c.data.map((u) => new d(u)),
6337
6337
  n
6338
6338
  );
6339
6339
  }
@@ -6345,7 +6345,7 @@ class Cs extends Ae {
6345
6345
  * @see /doc/api/internal#/Заказы/api_internal_orders_attach
6346
6346
  */
6347
6347
  attachOrder(r) {
6348
- return this.patch(`/internal/orders/${r}/attach`, {}, (e) => new I(e.data));
6348
+ return this.patch(`/internal/orders/${r}/attach`, {}, (e) => new d(e.data));
6349
6349
  }
6350
6350
  /**
6351
6351
  * Открепляет указанный заказ от оператора и возвращает полные данные заказа.
@@ -6355,7 +6355,27 @@ class Cs extends Ae {
6355
6355
  * @see /doc/api/internal#/Заказы/api_internal_orders_detach
6356
6356
  */
6357
6357
  detachOrder(r) {
6358
- return this.patch(`/internal/orders/${r}/detach`, {}, (e) => new I(e.data));
6358
+ return this.patch(`/internal/orders/${r}/detach`, {}, (e) => new d(e.data));
6359
+ }
6360
+ /**
6361
+ * Пересчитывает стоимость корзины указанного заказа и возвращает обновлённые данные заказа.
6362
+ *
6363
+ * @param orderId Идентификатор заказа.
6364
+ *
6365
+ * @see /doc/api/internal#/Заказы/api_internal_orders_recalculate
6366
+ */
6367
+ recalculateOrder(r) {
6368
+ return this.patch(`/internal/orders/${r}/recalculate`, {}, (e) => new d(e.data));
6369
+ }
6370
+ /**
6371
+ * Копирует товары указанного заказа в текущую корзину пользователя.
6372
+ *
6373
+ * @param orderId Идентификатор заказа-источника.
6374
+ *
6375
+ * @see /doc/api/internal#/Заказы/api_internal_orders_clone
6376
+ */
6377
+ cloneOrder(r) {
6378
+ return this.get(`/internal/orders/${r}/clone`, {});
6359
6379
  }
6360
6380
  /**
6361
6381
  * Обновляет данные заказа без изменения состава товаров и возвращает обновлённые данные заказа.
@@ -6369,14 +6389,14 @@ class Cs extends Ae {
6369
6389
  * @see /doc/api/internal#/Заказы/api_internal_orders_update
6370
6390
  */
6371
6391
  updateOrder(r, e, s = {}) {
6372
- const n = d().config.dateFormats.api;
6392
+ const n = I().config.dateFormats.api;
6373
6393
  return this.patch(
6374
6394
  `/internal/orders/${r}`,
6375
6395
  {
6376
6396
  ...e,
6377
6397
  deliveryDate: e.deliveryDate ? k(e.deliveryDate, n) : void 0
6378
6398
  },
6379
- (o) => new I(o.data),
6399
+ (o) => new d(o.data),
6380
6400
  s
6381
6401
  );
6382
6402
  }
@@ -6406,7 +6426,7 @@ class Cs extends Ae {
6406
6426
  is_additional_sale: e.isAdditionalSale,
6407
6427
  ...e.configuratorParams
6408
6428
  },
6409
- (n) => new I(n.data),
6429
+ (n) => new d(n.data),
6410
6430
  s
6411
6431
  );
6412
6432
  }
@@ -6429,7 +6449,7 @@ class Cs extends Ae {
6429
6449
  status: e,
6430
6450
  statusDetail: s
6431
6451
  },
6432
- (o) => new I(o.data),
6452
+ (o) => new d(o.data),
6433
6453
  n
6434
6454
  );
6435
6455
  }
@@ -6443,7 +6463,7 @@ class Cs extends Ae {
6443
6463
  * @see /doc/api/internal#/Заказы/api_internal_orders_status_change
6444
6464
  */
6445
6465
  changeOrderStatusDetail(r, e) {
6446
- return this.patch(`/internal/orders/${r}/status`, { statusDetail: e }, (s) => new I(s.data));
6466
+ return this.patch(`/internal/orders/${r}/status`, { statusDetail: e }, (s) => new d(s.data));
6447
6467
  }
6448
6468
  /**
6449
6469
  * Возвращает историю изменения статусов заказа.
@@ -6468,7 +6488,7 @@ class Cs extends Ae {
6468
6488
  * @see /doc/api/internal#/Заказы/api_internal_orders_change_attached_operator
6469
6489
  */
6470
6490
  changeAttachedOperator(r, e) {
6471
- return this.patch(`/internal/orders/${r}/change-attached-operator`, { operatorId: e }, (s) => new I(s.data));
6491
+ return this.patch(`/internal/orders/${r}/change-attached-operator`, { operatorId: e }, (s) => new d(s.data));
6472
6492
  }
6473
6493
  /**
6474
6494
  * Удаляет файл, прикреплённый к заказу клиентом, и возвращает обновлённые данные заказа.
@@ -6478,7 +6498,7 @@ class Cs extends Ae {
6478
6498
  * @see /doc/api/internal#/Заказы/api_internal_orders_attached_file_delete
6479
6499
  */
6480
6500
  deleteOrderAttachedFile(r) {
6481
- return this.delete(`/internal/orders/${r}/file/attached`, (e) => new I(e.data));
6501
+ return this.delete(`/internal/orders/${r}/file/attached`, (e) => new d(e.data));
6482
6502
  }
6483
6503
  /**
6484
6504
  * Удаляет продукт из заказа и возвращает обновлённые данные заказа.
@@ -6489,7 +6509,7 @@ class Cs extends Ae {
6489
6509
  * @see /doc/api/internal#/operations/api_internal_orders_product_delete
6490
6510
  */
6491
6511
  deleteOrderProduct(r, e) {
6492
- return this.delete(`/internal/orders/${r}/products/${e}`, (s) => new I(s.data));
6512
+ return this.delete(`/internal/orders/${r}/products/${e}`, (s) => new d(s.data));
6493
6513
  }
6494
6514
  /**
6495
6515
  * Изменяет продукт заказа и возвращает обновлённые данные заказа.
@@ -6517,7 +6537,7 @@ class Cs extends Ae {
6517
6537
  marker: s.marker,
6518
6538
  ...s.configuratorParams
6519
6539
  },
6520
- (o) => new I(o.data),
6540
+ (o) => new d(o.data),
6521
6541
  n
6522
6542
  );
6523
6543
  }
@@ -6552,7 +6572,7 @@ class Cs extends Ae {
6552
6572
  * @see /doc/api/internal#/operations/api_internal_orders_delivery_get_cost
6553
6573
  */
6554
6574
  getDeliveryCost(r, e, s, n = void 0) {
6555
- const o = d().config.dateFormats.api;
6575
+ const o = I().config.dateFormats.api;
6556
6576
  return this.get(
6557
6577
  `/internal/orders/delivery/${r}/cost`,
6558
6578
  {
@@ -6748,7 +6768,7 @@ class Ps extends p {
6748
6768
  */
6749
6769
  getProductPriceHistory(r) {
6750
6770
  var o, c, u, h, m;
6751
- const e = d().config.dateFormats.api, s = cr(
6771
+ const e = I().config.dateFormats.api, s = cr(
6752
6772
  pe(r, {
6753
6773
  costDate: {
6754
6774
  from: xe((o = r.costDate) == null ? void 0 : o.from) ? k(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
@@ -6994,7 +7014,7 @@ class Ts extends p {
6994
7014
  * Инициализирует экземпляр класса {@link UserAuthDataProvider}.
6995
7015
  */
6996
7016
  constructor() {
6997
- super(), this.baseUrl = `${d().config.http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
7017
+ super(), this.baseUrl = `${I().config.http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
6998
7018
  }
6999
7019
  /**
7000
7020
  * Функция для получения обновленных токенов доступа.
@@ -7141,7 +7161,7 @@ export {
7141
7161
  Rr as Operator,
7142
7162
  B as Opf,
7143
7163
  U as OpfEnum,
7144
- I as Order,
7164
+ d as Order,
7145
7165
  $t as OrderAction,
7146
7166
  ws as OrderEditorData,
7147
7167
  kr as OrderInfo,
@@ -7219,7 +7239,7 @@ export {
7219
7239
  er as flattenCatalogItems,
7220
7240
  fs as pluralize,
7221
7241
  Se as useAuthStateStore,
7222
- d as useBaseConfigStateStore,
7242
+ I as useBaseConfigStateStore,
7223
7243
  vs as useReferencesStore,
7224
7244
  bs as useUserStateStore
7225
7245
  };