@snabcentr/common-lib 2.25.1 → 2.25.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.
@@ -4,6 +4,6 @@
4
4
  "name": "public-api",
5
5
  "src": "src/public-api.ts",
6
6
  "isEntry": true,
7
- "integrity": "sha384-L3MSYQGU/VRTDt+IHg8RHr9g5CVEfeOxxGn72tP/z3h7LssNmh9r4p501icl7pz1"
7
+ "integrity": "sha384-c8VCzFImPaEVNxnhhv2CBGvtvFy5I5gV89uW2I+GF0ms1Kc4rJJ2Z7GRJ0o3Jrzq"
8
8
  }
9
9
  }
@@ -1,4 +1,6 @@
1
- ## 2.25.1 (2026-10-07)
1
+ ## 2.25.2 (2026-10-08)
2
2
 
3
- No changes.
3
+ ### added (1 change)
4
+
5
+ - [#14051: В данные о контрагенте добавлен ОГРН и подсказки по организациям](web_soft/libs/ts/snabcentr-common-lib@f7c7ec3f4b92330c8987378c76984e2fd3c6f1fa) ([merge request](web_soft/libs/ts/snabcentr-common-lib!235))
4
6
 
@@ -5,7 +5,7 @@ import { jwtDecode as Kr } from "jwt-decode";
5
5
  import { merge as Ne, isNil as m, isEmpty as J, noop as T, mapValues as Xr, isArray as W, every as Ot, split as Lt, startsWith as Zr, endsWith as It, includes as xt, isString as R, isFunction as br, map as De, isObject as Ve, isDate as Je, isError as _r, toLower as _t, isPlainObject as Nt, isUndefined as He, constant as qt, toUpper as Et, cloneDeep as Ut, forEach as Ft, round as Mt, omitBy as et } from "lodash-es";
6
6
  import { objectToCamel as Sr, objectToSnake as Ht } from "ts-case-convert";
7
7
  import { defineStore as ne } from "pinia";
8
- import { ref as v, markRaw as Bt, computed as A } from "vue";
8
+ import { ref as w, markRaw as Bt, computed as A } from "vue";
9
9
  import { isAfter as Nr, parseISO as C, startOfToday as qe, format as k, endOfMonth as x, addMonths as $, differenceInCalendarMonths as zt, startOfMonth as E, getDate as qr, getDaysInMonth as Wt, endOfDay as z, startOfDay as ge, setDate as jt, startOfWeek as ee, addWeeks as ar, differenceInCalendarDays as We, addDays as re, isValid as Gt, subDays as je, addBusinessDays as Yt, startOfYear as ue, endOfYear as de, endOfWeek as $e, endOfTomorrow as Qt, startOfTomorrow as Vt, endOfYesterday as Jt, startOfYesterday as Kt, endOfToday as Xt, startOfQuarter as ke, endOfQuarter as Be, addYears as ir, addQuarters as nr, subYears as or, subQuarters as cr, subMonths as lr, subWeeks as Er, addSeconds as Zt } from "date-fns";
10
10
  import es, { CanceledError as rs } from "axios";
11
11
  class Te {
@@ -338,7 +338,7 @@ class os {
338
338
  }
339
339
  }
340
340
  const O = ne("common.config", () => {
341
- const n = v(new os());
341
+ const n = w(new os());
342
342
  return {
343
343
  /**
344
344
  * Конфигурационные данные приложения.
@@ -479,7 +479,7 @@ function Ur(n) {
479
479
  }
480
480
  }
481
481
  const pe = ne("common.auth_state_private", () => {
482
- const n = v(
482
+ const n = w(
483
483
  (() => {
484
484
  var u;
485
485
  const o = Ge.getActualDataFromStorage(
@@ -491,7 +491,7 @@ const pe = ne("common.auth_state_private", () => {
491
491
  const c = (u = O().config.devMode) == null ? void 0 : u.initAuthBearerToken;
492
492
  return c ? Promise.resolve(c) : void 0;
493
493
  })()
494
- ), r = v(void 0), e = v(void 0), t = Bt(/* @__PURE__ */ new Map());
494
+ ), r = w(void 0), e = w(void 0), t = Bt(/* @__PURE__ */ new Map());
495
495
  function i() {
496
496
  e.value = void 0, m(n.value) || n.value.then((o) => {
497
497
  const c = Te.getJwtPayload(o);
@@ -619,7 +619,7 @@ class G {
619
619
  return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : m(this.id);
620
620
  }
621
621
  }
622
- class wr extends G {
622
+ class vr extends G {
623
623
  /**
624
624
  * Инициализирует экземпляр класса {@link BlogPostMediaFile}.
625
625
  *
@@ -740,7 +740,7 @@ class ur extends ae {
740
740
  * @inheritDoc
741
741
  */
742
742
  s(this, "media");
743
- this.content = (e == null ? void 0 : e.content) ?? "", this.media = ((e == null ? void 0 : e.media) ?? []).map((t) => new wr(t));
743
+ this.content = (e == null ? void 0 : e.content) ?? "", this.media = ((e == null ? void 0 : e.media) ?? []).map((t) => new vr(t));
744
744
  }
745
745
  /**
746
746
  * Возвращает данные статьи для отправки на портал.
@@ -911,7 +911,7 @@ class _ {
911
911
  return De(e, (t) => _.instanceInitializer(r, t));
912
912
  }
913
913
  }
914
- const w = class w {
914
+ const v = class v {
915
915
  /**
916
916
  * Инициализирует экземпляр класса {@link HttpRequester}.
917
917
  */
@@ -950,7 +950,7 @@ const w = class w {
950
950
  * @param request Данные запроса.
951
951
  */
952
952
  // eslint-disable-next-line class-methods-use-this
953
- s(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && !m(r.params) && (r.params = w.toSnakeCaseData(r.params)), ["put", "patch", "post"].includes(_t(r.method)) && !m(r.data) && (r.data = w.toSnakeCaseData(r.data))), r));
953
+ s(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && !m(r.params) && (r.params = v.toSnakeCaseData(r.params)), ["put", "patch", "post"].includes(_t(r.method)) && !m(r.data) && (r.data = v.toSnakeCaseData(r.data))), r));
954
954
  /**
955
955
  * Перехватчик ошибок ответов на запрос.
956
956
  *
@@ -964,7 +964,7 @@ const w = class w {
964
964
  return Promise.reject(r);
965
965
  e.__isRetryRequest = !0;
966
966
  try {
967
- await w.isStaleUnauthorizedRequest(e) || await w.refreshAccessToken();
967
+ await v.isStaleUnauthorizedRequest(e) || await v.refreshAccessToken();
968
968
  } catch {
969
969
  return Promise.reject(r);
970
970
  }
@@ -990,7 +990,7 @@ const w = class w {
990
990
  * @param response Данные ответа на запрос.
991
991
  */
992
992
  // eslint-disable-next-line class-methods-use-this
993
- s(this, "dataConverterResponseInterceptor", (r) => (r.data = w.toCamelCaseData(r.data), r));
993
+ s(this, "dataConverterResponseInterceptor", (r) => (r.data = v.toCamelCaseData(r.data), r));
994
994
  this.httpClient = es.create({
995
995
  headers: {
996
996
  Accept: "application/json",
@@ -1003,14 +1003,14 @@ const w = class w {
1003
1003
  this.authRequestInterceptor,
1004
1004
  (r) => Promise.reject(r)
1005
1005
  ), this.interceptorIds.request[M.DEFAULT_REQUEST_INTERCEPTOR] = this.httpClient.interceptors.request.use(
1006
- (r) => w.applyDefaultRequestHook(r),
1006
+ (r) => v.applyDefaultRequestHook(r),
1007
1007
  (r) => Promise.reject(r)
1008
1008
  ), this.interceptorIds.request[M.BASE_URL_REQUEST_INTERCEPTOR] = this.httpClient.interceptors.request.use(
1009
1009
  this.setBaseUrlRequestInterceptor,
1010
1010
  (r) => Promise.reject(r)
1011
1011
  ), this.interceptorIds.response[M.CONVERT_HTTP_ERROR_RESPONSE_INTERCEPTOR] = this.httpClient.interceptors.response.use(
1012
1012
  (r) => r,
1013
- (r) => w.convertHttpErrorResponse(r)
1013
+ (r) => v.convertHttpErrorResponse(r)
1014
1014
  ), this.interceptorIds.response[M.CANCELED_RESPONSE_INTERCEPTOR] = this.httpClient.interceptors.response.use(
1015
1015
  (r) => r,
1016
1016
  this.canceledResponseInterceptor
@@ -1028,7 +1028,7 @@ const w = class w {
1028
1028
  * @param handler Ссылка на функцию-обработчик ошибок.
1029
1029
  */
1030
1030
  static setDefaultErrorsResponseHandler(r) {
1031
- w.defaultErrorsResponseHandler = r;
1031
+ v.defaultErrorsResponseHandler = r;
1032
1032
  }
1033
1033
  /**
1034
1034
  * Устанавливает базовый хук для запросов.
@@ -1036,7 +1036,7 @@ const w = class w {
1036
1036
  * @param hook Ссылка на функцию-хук.
1037
1037
  */
1038
1038
  static setDefaultRequestHook(r) {
1039
- w.defaultRequestHook = r;
1039
+ v.defaultRequestHook = r;
1040
1040
  }
1041
1041
  /**
1042
1042
  * Проверяет, что значение можно безопасно пропустить через конвертер ключей.
@@ -1054,7 +1054,7 @@ const w = class w {
1054
1054
  * @param data Исходные данные.
1055
1055
  */
1056
1056
  static toCamelCaseData(r) {
1057
- return w.canConvertCaseKeys(r) ? Sr(r) : r;
1057
+ return v.canConvertCaseKeys(r) ? Sr(r) : r;
1058
1058
  }
1059
1059
  /**
1060
1060
  * Приводит ключи данных к snake_case, если значение является обычным объектом или массивом.
@@ -1062,7 +1062,7 @@ const w = class w {
1062
1062
  * @param data Исходные данные.
1063
1063
  */
1064
1064
  static toSnakeCaseData(r) {
1065
- return w.canConvertCaseKeys(r) ? Ht(r) : r;
1065
+ return v.canConvertCaseKeys(r) ? Ht(r) : r;
1066
1066
  }
1067
1067
  /**
1068
1068
  * Возвращает токен доступа из заголовка Authorization исходного запроса.
@@ -1084,7 +1084,7 @@ const w = class w {
1084
1084
  * @param request Данные запроса.
1085
1085
  */
1086
1086
  static async isStaleUnauthorizedRequest(r) {
1087
- const e = w.getRequestAccessToken(r);
1087
+ const e = v.getRequestAccessToken(r);
1088
1088
  if (m(e))
1089
1089
  return !1;
1090
1090
  const t = ze().jwtToken;
@@ -1100,13 +1100,13 @@ const w = class w {
1100
1100
  * Сбрасывает токен и запускает одно обновление на все параллельные ответы 401.
1101
1101
  */
1102
1102
  static refreshAccessToken() {
1103
- if (!m(w.tokenRefreshPromise))
1104
- return w.tokenRefreshPromise;
1103
+ if (!m(v.tokenRefreshPromise))
1104
+ return v.tokenRefreshPromise;
1105
1105
  ze().invalidateJwtToken();
1106
1106
  const e = ze().jwtToken ?? Promise.resolve();
1107
- return w.tokenRefreshPromise = e.finally(() => {
1108
- w.tokenRefreshPromise = void 0;
1109
- }), w.tokenRefreshPromise;
1107
+ return v.tokenRefreshPromise = e.finally(() => {
1108
+ v.tokenRefreshPromise = void 0;
1109
+ }), v.tokenRefreshPromise;
1110
1110
  }
1111
1111
  /**
1112
1112
  * Вызывает базовый хук запроса.
@@ -1116,7 +1116,7 @@ const w = class w {
1116
1116
  * @param request Данные запроса.
1117
1117
  */
1118
1118
  static applyDefaultRequestHook(r) {
1119
- return m(w.defaultRequestHook) ? r : w.defaultRequestHook(r);
1119
+ return m(v.defaultRequestHook) ? r : v.defaultRequestHook(r);
1120
1120
  }
1121
1121
  /**
1122
1122
  * Возвращает экземпляр объекта текущего класса.
@@ -1124,7 +1124,7 @@ const w = class w {
1124
1124
  * @param type Тип данных, которыми оперирует метод.
1125
1125
  */
1126
1126
  static getInstance(r) {
1127
- return Object.prototype.hasOwnProperty.call(w.instances, r.name) || (w.instances[r.name] = _.simpleInstanceInitializer(r)), w.instances[r.name];
1127
+ return Object.prototype.hasOwnProperty.call(v.instances, r.name) || (v.instances[r.name] = _.simpleInstanceInitializer(r)), v.instances[r.name];
1128
1128
  }
1129
1129
  /**
1130
1130
  * Приводит данные об ошибке к форме ошибки HTTP запроса.
@@ -1175,7 +1175,7 @@ const w = class w {
1175
1175
  request(r, e = void 0, t = {}, i = !1) {
1176
1176
  const o = this.httpClient.request(r).then((c) => e ? e(c) : c.data);
1177
1177
  return o.catch((c) => {
1178
- (c == null ? void 0 : c.name) !== "CanceledError" && w.defaultErrorsResponseHandler(w.toHttpResponseError(c), t, i);
1178
+ (c == null ? void 0 : c.name) !== "CanceledError" && v.defaultErrorsResponseHandler(v.toHttpResponseError(c), t, i);
1179
1179
  }), o;
1180
1180
  }
1181
1181
  /**
@@ -1263,21 +1263,21 @@ const w = class w {
1263
1263
  * Экземпляр объекта текущего класса.
1264
1264
  */
1265
1265
  // eslint-disable-next-line no-use-before-define
1266
- s(w, "instances", {}), /**
1266
+ s(v, "instances", {}), /**
1267
1267
  * Базовый обработчик ошибок выполнения запросов.
1268
1268
  *
1269
1269
  * @param error Данные об ошибке.
1270
1270
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
1271
1271
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1272
1272
  */
1273
- s(w, "defaultErrorsResponseHandler", T), /**
1273
+ s(v, "defaultErrorsResponseHandler", T), /**
1274
1274
  * Базовый хук для запросов.
1275
1275
  */
1276
- s(w, "defaultRequestHook"), /**
1276
+ s(v, "defaultRequestHook"), /**
1277
1277
  * Общий Promise обновления токена для параллельных ответов 401.
1278
1278
  */
1279
- s(w, "tokenRefreshPromise");
1280
- let h = w;
1279
+ s(v, "tokenRefreshPromise");
1280
+ let h = v;
1281
1281
  var dr = /* @__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))(dr || {});
1282
1282
  class Fr {
1283
1283
  /**
@@ -1406,7 +1406,7 @@ class Y extends h {
1406
1406
  );
1407
1407
  }
1408
1408
  }
1409
- class vr extends Y {
1409
+ class wr extends Y {
1410
1410
  /**
1411
1411
  * Возвращает данные статьи блога, подготовленные для отправки на портал.
1412
1412
  *
@@ -1463,7 +1463,7 @@ class vr extends Y {
1463
1463
  * @see /doc/api/internal#/operations/api_internal_blog_create
1464
1464
  */
1465
1465
  createPost(r, e = {}) {
1466
- return this.post("/internal/blog", vr.preparePostSaveData(r), (t) => new ur(t.data), e);
1466
+ return this.post("/internal/blog", wr.preparePostSaveData(r), (t) => new ur(t.data), e);
1467
1467
  }
1468
1468
  /**
1469
1469
  * Изменяет данные о статье блога.
@@ -1477,7 +1477,7 @@ class vr extends Y {
1477
1477
  * @see /doc/api/internal#/operations/api_internal_blog_update
1478
1478
  */
1479
1479
  updatePost(r, e, t = {}) {
1480
- return this.patch(`/internal/blog/${r}`, vr.preparePostSaveData(e), (i) => new ur(i.data), t);
1480
+ return this.patch(`/internal/blog/${r}`, wr.preparePostSaveData(e), (i) => new ur(i.data), t);
1481
1481
  }
1482
1482
  /**
1483
1483
  * Удаляет статью блога.
@@ -1512,7 +1512,7 @@ class vr extends Y {
1512
1512
  i && i(c.total ? Math.round(c.loaded / c.total * 100) : 0);
1513
1513
  }
1514
1514
  },
1515
- (c) => new wr(c.data),
1515
+ (c) => new vr(c.data),
1516
1516
  o
1517
1517
  );
1518
1518
  }
@@ -1532,7 +1532,7 @@ class vr extends Y {
1532
1532
  return this.patch(
1533
1533
  `/internal/blog/${r}/media/${e}`,
1534
1534
  { isCover: t },
1535
- (o) => new wr(o.data),
1535
+ (o) => new vr(o.data),
1536
1536
  i
1537
1537
  );
1538
1538
  }
@@ -2650,9 +2650,9 @@ class xr extends L {
2650
2650
  this.photo = e.photo, this.contacts = new lt(e.contacts), this.curatedDirection = new Ir(e.curatedDirection);
2651
2651
  }
2652
2652
  }
2653
- class we extends D {
2654
- }
2655
2653
  class ve extends D {
2654
+ }
2655
+ class we extends D {
2656
2656
  /**
2657
2657
  * Инициализирует экземпляр класса {@link Region}.
2658
2658
  *
@@ -2663,8 +2663,8 @@ class ve extends D {
2663
2663
  /**
2664
2664
  * Данные о стране, в которой расположен регион.
2665
2665
  */
2666
- s(this, "country", new we());
2667
- e && (this.country = new we(e.country));
2666
+ s(this, "country", new ve());
2667
+ e && (this.country = new ve(e.country));
2668
2668
  }
2669
2669
  }
2670
2670
  class Re extends D {
@@ -2678,8 +2678,8 @@ class Re extends D {
2678
2678
  /**
2679
2679
  * Данные о регионе, в котором расположен город.
2680
2680
  */
2681
- s(this, "region", new ve());
2682
- e && (this.region = new ve(e.region));
2681
+ s(this, "region", new we());
2682
+ e && (this.region = new we(e.region));
2683
2683
  }
2684
2684
  }
2685
2685
  class ht extends L {
@@ -4444,7 +4444,7 @@ function Wr(n) {
4444
4444
  }
4445
4445
  }), r;
4446
4446
  }
4447
- var ws = /* @__PURE__ */ ((n) => (n.LastOrder = "last_order", n.Contacts = "contacts", n.PartnerGroups = "partner_groups", n.PreferredDeliveryType = "preferred_delivery_type", n.SalesDirection = "sales_direction", n.Managers = "managers", n.Curators = "curators", n))(ws || {}), V = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(V || {});
4447
+ var vs = /* @__PURE__ */ ((n) => (n.LastOrder = "last_order", n.Contacts = "contacts", n.PartnerGroups = "partner_groups", n.PreferredDeliveryType = "preferred_delivery_type", n.SalesDirection = "sales_direction", n.Managers = "managers", n.Curators = "curators", n))(vs || {}), V = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(V || {});
4448
4448
  class Cr extends G {
4449
4449
  /**
4450
4450
  * Инициализирует экземпляр класса {@link BankAccount}.
@@ -4621,7 +4621,7 @@ class mt extends ft {
4621
4621
  }
4622
4622
  }
4623
4623
  }
4624
- class vs extends mt {
4624
+ class ws extends mt {
4625
4625
  /**
4626
4626
  * Инициализирует экземпляр класса {@link ContragentPerson}.
4627
4627
  *
@@ -4647,6 +4647,10 @@ class yt extends mt {
4647
4647
  * Код ОКПО.
4648
4648
  */
4649
4649
  s(this, "okpo", "");
4650
+ /**
4651
+ * ОГРН (ОГРНИП для индивидуального предпринимателя).
4652
+ */
4653
+ s(this, "ogrn", "");
4650
4654
  /**
4651
4655
  * ФИО руководителя.
4652
4656
  */
@@ -4671,7 +4675,7 @@ class yt extends mt {
4671
4675
  * Фактический адрес.
4672
4676
  */
4673
4677
  s(this, "actualAddress", "");
4674
- 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 ?? "");
4678
+ e && (this.inn = e.inn ?? "", this.okpo = e.okpo ?? "", this.ogrn = e.ogrn ?? "", this.directorName = e.directorName ?? "", this.directorPosition = e.directorPosition ?? "", this.directorActsOn = e.directorActsOn ?? "", this.legalAddress = e.legalAddress ?? "", this.postalAddress = e.postalAddress ?? "", this.actualAddress = e.actualAddress ?? "");
4675
4679
  }
4676
4680
  }
4677
4681
  class at extends yt {
@@ -4700,7 +4704,7 @@ class Rs extends at {
4700
4704
  /**
4701
4705
  * Страна регистрации юридического лица нерезидента.
4702
4706
  */
4703
- s(this, "registrationCountry", new we());
4707
+ s(this, "registrationCountry", new ve());
4704
4708
  /**
4705
4709
  * Регистрационный номер юридического лица нерезидента.
4706
4710
  */
@@ -4709,7 +4713,7 @@ class Rs extends at {
4709
4713
  * Налоговый номер юридического лица нерезидента.
4710
4714
  */
4711
4715
  s(this, "taxNumber", "");
4712
- e && (this.registrationCountry = new we(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
4716
+ e && (this.registrationCountry = new ve(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
4713
4717
  }
4714
4718
  }
4715
4719
  class Xe {
@@ -4727,7 +4731,7 @@ class Xe {
4727
4731
  case V.UlNr:
4728
4732
  return new Rs(r);
4729
4733
  default:
4730
- return new vs(r);
4734
+ return new ws(r);
4731
4735
  }
4732
4736
  }
4733
4737
  }
@@ -4771,10 +4775,10 @@ class _e extends ft {
4771
4775
  this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new it(e == null ? void 0 : e.coordinates), this.contacts = ((t = e == null ? void 0 : e.contacts) == null ? void 0 : t.map((i) => new se(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;
4772
4776
  }
4773
4777
  }
4774
- class wt extends D {
4775
- }
4776
4778
  class vt extends D {
4777
4779
  }
4780
+ class wt extends D {
4781
+ }
4778
4782
  class jr extends oe {
4779
4783
  /**
4780
4784
  * Инициализирует экземпляр класса {@link Client}.
@@ -4825,7 +4829,7 @@ class jr extends oe {
4825
4829
  * @inheritDoc
4826
4830
  */
4827
4831
  s(this, "extraData");
4828
- this.contragents = ((t = e == null ? void 0 : e.contragents) == null ? void 0 : t.map((u) => Xe.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new Ce(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new se(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new _e(u))) ?? [], this.channelPrimaryInterest = new wt(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new vt(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.preferredWarehouse = e != null && e.preferredWarehouse ? new Me(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
4832
+ this.contragents = ((t = e == null ? void 0 : e.contragents) == null ? void 0 : t.map((u) => Xe.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new Ce(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new se(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new _e(u))) ?? [], this.channelPrimaryInterest = new vt(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new wt(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.preferredWarehouse = e != null && e.preferredWarehouse ? new Me(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
4829
4833
  }
4830
4834
  }
4831
4835
  class gi extends Fe {
@@ -4941,7 +4945,7 @@ class gi extends Fe {
4941
4945
  * @inheritDoc
4942
4946
  */
4943
4947
  s(this, "noOrdersPeriod", new b());
4944
- this.id = e == null ? void 0 : e.id, this.guid = e == null ? void 0 : e.guid, this.name = e == null ? void 0 : e.name, this.alternativeName = e == null ? void 0 : e.alternativeName, this.searchTerm = e == null ? void 0 : e.searchTerm, this.cities = (t = e == null ? void 0 : e.cities) == null ? void 0 : t.map((P) => new Re(P)), this.region = new ve(e == null ? void 0 : e.region), this.country = new we(e == null ? void 0 : e.country), this.phone = e == null ? void 0 : e.phone, this.email = e == null ? void 0 : e.email, this.isActive = e && Object.prototype.hasOwnProperty.call(e, "isActive") ? e == null ? void 0 : e.isActive : !0, this.createdAt = new b(e == null ? void 0 : e.createdAt), this.lastLoginDate = new b(e == null ? void 0 : e.lastLoginDate), this.lastLoginDateHasOrder = (e == null ? void 0 : e.lastLoginDateHasOrder) ?? void 0, this.managers = ((i = e == null ? void 0 : e.managers) == null ? void 0 : i.map((P) => new Z(P))) ?? [], this.includeSubordinateManagers = (e == null ? void 0 : e.includeSubordinateManagers) ?? !0, this.curators = ((o = e == null ? void 0 : e.curators) == null ? void 0 : o.map((P) => new xr(P))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((P) => new U(P)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new ie(e == null ? void 0 : e.contragentType), this.preferredDeliveryType = e != null && e.preferredDeliveryType ? new K(e == null ? void 0 : e.preferredDeliveryType) : void 0, this.partnerGroups = (u = e == null ? void 0 : e.partnerGroups) == null ? void 0 : u.map((P) => new Ce(P)), this.contact = new Dr(e == null ? void 0 : e.contact), this.lastOrder = {
4948
+ this.id = e == null ? void 0 : e.id, this.guid = e == null ? void 0 : e.guid, this.name = e == null ? void 0 : e.name, this.alternativeName = e == null ? void 0 : e.alternativeName, this.searchTerm = e == null ? void 0 : e.searchTerm, this.cities = (t = e == null ? void 0 : e.cities) == null ? void 0 : t.map((P) => new Re(P)), this.region = new we(e == null ? void 0 : e.region), this.country = new ve(e == null ? void 0 : e.country), this.phone = e == null ? void 0 : e.phone, this.email = e == null ? void 0 : e.email, this.isActive = e && Object.prototype.hasOwnProperty.call(e, "isActive") ? e == null ? void 0 : e.isActive : !0, this.createdAt = new b(e == null ? void 0 : e.createdAt), this.lastLoginDate = new b(e == null ? void 0 : e.lastLoginDate), this.lastLoginDateHasOrder = (e == null ? void 0 : e.lastLoginDateHasOrder) ?? void 0, this.managers = ((i = e == null ? void 0 : e.managers) == null ? void 0 : i.map((P) => new Z(P))) ?? [], this.includeSubordinateManagers = (e == null ? void 0 : e.includeSubordinateManagers) ?? !0, this.curators = ((o = e == null ? void 0 : e.curators) == null ? void 0 : o.map((P) => new xr(P))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((P) => new U(P)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new ie(e == null ? void 0 : e.contragentType), this.preferredDeliveryType = e != null && e.preferredDeliveryType ? new K(e == null ? void 0 : e.preferredDeliveryType) : void 0, this.partnerGroups = (u = e == null ? void 0 : e.partnerGroups) == null ? void 0 : u.map((P) => new Ce(P)), this.contact = new Dr(e == null ? void 0 : e.contact), this.lastOrder = {
4945
4949
  createdAt: new b((p = e == null ? void 0 : e.lastOrder) == null ? void 0 : p.createdAt),
4946
4950
  creator: (g = e == null ? void 0 : e.lastOrder) == null ? void 0 : g.creator,
4947
4951
  isApproved: (a = e == null ? void 0 : e.lastOrder) == null ? void 0 : a.isApproved
@@ -4956,7 +4960,7 @@ class gi extends Fe {
4956
4960
  this.cities = [];
4957
4961
  break;
4958
4962
  case "region":
4959
- this.region = new ve();
4963
+ this.region = new we();
4960
4964
  break;
4961
4965
  case "isActive":
4962
4966
  this.isActive = !0;
@@ -5152,6 +5156,7 @@ class H extends Y {
5152
5156
  comment: t.comment,
5153
5157
  inn: t.inn,
5154
5158
  okpo: t.okpo,
5159
+ ogrn: t.ogrn || void 0,
5155
5160
  director_name: t.directorName,
5156
5161
  director_position: t.directorPosition,
5157
5162
  director_acts_on: t.directorActsOn,
@@ -5170,6 +5175,7 @@ class H extends Y {
5170
5175
  inn: i.inn,
5171
5176
  kpp: i.kpp,
5172
5177
  okpo: i.okpo,
5178
+ ogrn: i.ogrn || void 0,
5173
5179
  director_name: i.directorName,
5174
5180
  director_position: i.directorPosition,
5175
5181
  director_acts_on: i.directorActsOn,
@@ -5972,7 +5978,7 @@ class ai extends Ps {
5972
5978
  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;
5973
5979
  }
5974
5980
  }
5975
- class wi {
5981
+ class vi {
5976
5982
  /**
5977
5983
  * Инициализирует экземпляр класса {@link ISortRequestParams}.
5978
5984
  *
@@ -6097,7 +6103,7 @@ class Tr {
6097
6103
  return Gt(e) ? e : void 0;
6098
6104
  }
6099
6105
  }
6100
- function vi(n) {
6106
+ function wi(n) {
6101
6107
  return k(je(qe(), n), "yyyy-MM-dd");
6102
6108
  }
6103
6109
  function As(n, r) {
@@ -8016,7 +8022,7 @@ const B = class B extends Ue {
8016
8022
  * первичного интереса.
8017
8023
  */
8018
8024
  getChannelPrimaryInterest() {
8019
- return this.getTypedDataArrayRequester(wt, "/internal/references/channel-primary-interest", !0);
8025
+ return this.getTypedDataArrayRequester(vt, "/internal/references/channel-primary-interest", !0);
8020
8026
  }
8021
8027
  /**
8022
8028
  * Возвращает {@link Promise} для получения справочника должностей контактных лиц.
@@ -8095,7 +8101,7 @@ const B = class B extends Ue {
8095
8101
  * Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
8096
8102
  */
8097
8103
  getSourcePrimaryInterest() {
8098
- return this.getTypedDataArrayRequester(vt, "/internal/references/source-primary-interest", !0);
8104
+ return this.getTypedDataArrayRequester(wt, "/internal/references/source-primary-interest", !0);
8099
8105
  }
8100
8106
  /**
8101
8107
  * Выполняет поиск данных о городах по терму в названии.
@@ -8111,7 +8117,7 @@ const B = class B extends Ue {
8111
8117
  * @param term Терм поиска.
8112
8118
  */
8113
8119
  searchRegion(r) {
8114
- return this.getTypedDataArrayRequester(ve, `/internal/references/region-with-country/search?term=${r}`);
8120
+ return this.getTypedDataArrayRequester(we, `/internal/references/region-with-country/search?term=${r}`);
8115
8121
  }
8116
8122
  /**
8117
8123
  * Возвращает {@link Promise} для получения справочника регионов указанной страны.
@@ -8121,7 +8127,7 @@ const B = class B extends Ue {
8121
8127
  * @param countryId Идентификатор страны.
8122
8128
  */
8123
8129
  getRegionsByCountry(r) {
8124
- return this.getTypedDataArrayRequester(ve, "/internal/references/region", !1, { params: { countryId: r } }).then(
8130
+ return this.getTypedDataArrayRequester(we, "/internal/references/region", !1, { params: { countryId: r } }).then(
8125
8131
  (e) => B.withoutUnknownLocation(e)
8126
8132
  );
8127
8133
  }
@@ -8183,7 +8189,7 @@ const B = class B extends Ue {
8183
8189
  * @param term Терм поиска.
8184
8190
  */
8185
8191
  searchCountry(r) {
8186
- return this.getTypedDataArrayRequester(we, `/internal/references/country/search?term=${r}`);
8192
+ return this.getTypedDataArrayRequester(ve, `/internal/references/country/search?term=${r}`);
8187
8193
  }
8188
8194
  /**
8189
8195
  * Возвращает {@link Promise} для получения справочника типов доставки.
@@ -8223,7 +8229,7 @@ const B = class B extends Ue {
8223
8229
  s(B, "unknownLocationId", 1);
8224
8230
  let S = B;
8225
8231
  const d = ne("common.references_private", () => {
8226
- const n = v({}), r = v(void 0), e = v(void 0), t = v(void 0), i = v(void 0), o = v(void 0), c = v(void 0), u = v(void 0), p = v(void 0), g = v(void 0), a = v(void 0), P = v(void 0), be = v(void 0), Se = v(void 0), ce = v(void 0), le = v(void 0), rr = v(void 0), tr = v(void 0), sr = v(void 0), l = v(void 0);
8232
+ const n = w({}), r = w(void 0), e = w(void 0), t = w(void 0), i = w(void 0), o = w(void 0), c = w(void 0), u = w(void 0), p = w(void 0), g = w(void 0), a = w(void 0), P = w(void 0), be = w(void 0), Se = w(void 0), ce = w(void 0), le = w(void 0), rr = w(void 0), tr = w(void 0), sr = w(void 0), l = w(void 0);
8227
8233
  return {
8228
8234
  /**
8229
8235
  * Список загружаемых/загруженных на данный момент значений.
@@ -8675,7 +8681,7 @@ class Bs extends h {
8675
8681
  }
8676
8682
  }
8677
8683
  const Pr = ne("common.user_state_private", () => {
8678
- const n = v({}), r = v(void 0), e = v(void 0);
8684
+ const n = w({}), r = w(void 0), e = w(void 0);
8679
8685
  return {
8680
8686
  /**
8681
8687
  * Список загружаемых/загруженных на данный момент значений.
@@ -8921,12 +8927,12 @@ export {
8921
8927
  Cr as BankAccount,
8922
8928
  Y as BasePaginationProvider,
8923
8929
  ur as BlogPost,
8924
- wr as BlogPostMediaFile,
8930
+ vr as BlogPostMediaFile,
8925
8931
  Ye as BlogPostMediaTypeEnum,
8926
8932
  Qe as BlogPostPublicationStatusEnum,
8927
8933
  ae as BlogPostShortInfo,
8928
8934
  Ks as BlogPostsListFilters,
8929
- vr as BlogProvider,
8935
+ wr as BlogProvider,
8930
8936
  hs as CalculationTypeEnum,
8931
8937
  y as CalendarHelper,
8932
8938
  Oe as Cart,
@@ -8938,7 +8944,7 @@ export {
8938
8944
  Br as CategoryFilterSetting,
8939
8945
  ys as CategoryFilterValue,
8940
8946
  Hr as CategoryPricingRule,
8941
- wt as ChannelPrimaryInterest,
8947
+ vt as ChannelPrimaryInterest,
8942
8948
  Ns as City,
8943
8949
  Re as CityWithRegionAndCountry,
8944
8950
  Qr as CityWithUserRegion,
@@ -8952,7 +8958,7 @@ export {
8952
8958
  oi as ClientProductCategoryDataProvider,
8953
8959
  ci as ClientProductDataProvider,
8954
8960
  oe as ClientShortInfo,
8955
- ws as ClientsAdditionalDataRequestTypeEnum,
8961
+ vs as ClientsAdditionalDataRequestTypeEnum,
8956
8962
  gi as ClientsListFilters,
8957
8963
  Ee as CodedIdentity,
8958
8964
  yi as ConfiguratorProvider,
@@ -8966,11 +8972,11 @@ export {
8966
8972
  mt as ContragentBase,
8967
8973
  Xe as ContragentFactory,
8968
8974
  yt as ContragentIc,
8969
- vs as ContragentPerson,
8975
+ ws as ContragentPerson,
8970
8976
  Rs as ContragentUlNr,
8971
8977
  at as ContragentUlR,
8972
8978
  kr as CostSourceEnum,
8973
- we as Country,
8979
+ ve as Country,
8974
8980
  Ir as CuratedDirection,
8975
8981
  xr as Curator,
8976
8982
  j as Currency,
@@ -9066,7 +9072,7 @@ export {
9066
9072
  D as Reference,
9067
9073
  Ni as ReferenceDataFactory,
9068
9074
  S as ReferenceDataProvider,
9069
- ve as Region,
9075
+ we as Region,
9070
9076
  St as ResourceType,
9071
9077
  Di as STANDARD_PERIOD_GROUPS,
9072
9078
  Ti as STANDARD_PERIOD_SECTIONS,
@@ -9074,11 +9080,11 @@ export {
9074
9080
  is as SentryConfig,
9075
9081
  Vr as Seo,
9076
9082
  Ei as SeoDataProvider,
9077
- vt as SourcePrimaryInterest,
9083
+ wt as SourcePrimaryInterest,
9078
9084
  ls as StockCount,
9079
9085
  ai as TableDataPagination,
9080
9086
  Ps as TableDataPaginationRequestParams,
9081
- wi as TableDataSortRequestParams,
9087
+ vi as TableDataSortRequestParams,
9082
9088
  hi as TemplateProductCategoryDataProvider,
9083
9089
  ei as TemplatesListFilters,
9084
9090
  _ as TypedInstanceFactory,
@@ -9101,7 +9107,7 @@ export {
9101
9107
  Me as Warehouse,
9102
9108
  ns as WebSocketConfig,
9103
9109
  Li as currentOrderInjectionKey,
9104
- vi as daysAgoIso,
9110
+ wi as daysAgoIso,
9105
9111
  zr as findCatalogItemByIdRecursive,
9106
9112
  Wr as flattenCatalogItems,
9107
9113
  Pi as formatPercentChange,