@snabcentr/common-lib 1.89.2 → 1.90.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/sc-common-lib.js +104 -96
- 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/orders/classes/orders-list-filters.d.ts +9 -1
- package/dist/src/orders/classes/orders-list-filters.d.ts.map +1 -1
- package/dist/src/orders/interfaces/i-orders-list-filters.d.ts +11 -2
- package/dist/src/orders/interfaces/i-orders-list-filters.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/sc-common-lib.js
CHANGED
|
@@ -2,7 +2,7 @@ var Lr = Object.defineProperty;
|
|
|
2
2
|
var ar = (n, r, e) => r in n ? Lr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
3
|
var t = (n, r, e) => ar(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import { jwtDecode as ir } from "jwt-decode";
|
|
5
|
-
import { merge as
|
|
5
|
+
import { merge as ce, isNil as T, isEmpty as Y, noop as w, mapValues as nr, isArray as H, every as dr, split as xr, isString as v, constant as Or, toUpper as _r, cloneDeep as qr, toLower as Nr, isFunction as Ue, map as he, forEach as Ur, isDate as xe, omitBy as or, isObject as cr } from "lodash-es";
|
|
6
6
|
import { objectToCamel as He, objectToSnake as Je } from "ts-case-convert";
|
|
7
7
|
import { defineStore as z } from "pinia";
|
|
8
8
|
import { ref as y, markRaw as Hr, computed as A } from "vue";
|
|
@@ -99,7 +99,7 @@ class F {
|
|
|
99
99
|
* @inheritDoc
|
|
100
100
|
*/
|
|
101
101
|
t(this, "email", "");
|
|
102
|
-
|
|
102
|
+
ce(this, r);
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
105
|
* Возвращает данные полезной нагрузки для указанного JWT-токена.
|
|
@@ -143,7 +143,7 @@ class Gt extends F {
|
|
|
143
143
|
* @inheritDoc
|
|
144
144
|
*/
|
|
145
145
|
t(this, "address");
|
|
146
|
-
|
|
146
|
+
ce(this, e);
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
149
|
* Возвращает данные полезной нагрузки для указанного JWT-токена.
|
|
@@ -355,7 +355,7 @@ const L = z("common.config", () => {
|
|
|
355
355
|
* @param appConfig Конфигурация приложения.
|
|
356
356
|
*/
|
|
357
357
|
setConfig: (s) => {
|
|
358
|
-
n.value =
|
|
358
|
+
n.value = ce(n.value, s);
|
|
359
359
|
}
|
|
360
360
|
};
|
|
361
361
|
});
|
|
@@ -555,8 +555,8 @@ const E = z("common.auth_state_private", () => {
|
|
|
555
555
|
const D = xr(f, ".");
|
|
556
556
|
if (D.length < 2)
|
|
557
557
|
return !1;
|
|
558
|
-
const [
|
|
559
|
-
return H(W) && W.includes(
|
|
558
|
+
const [te, se] = D, W = (J = E().userPermissions) == null ? void 0 : J[te];
|
|
559
|
+
return H(W) && W.includes(se);
|
|
560
560
|
};
|
|
561
561
|
return H(o) ? dr(o, (f) => m(f)) : m(o);
|
|
562
562
|
});
|
|
@@ -591,7 +591,7 @@ const E = z("common.auth_state_private", () => {
|
|
|
591
591
|
hasUserPermission: i
|
|
592
592
|
};
|
|
593
593
|
});
|
|
594
|
-
class
|
|
594
|
+
class ee {
|
|
595
595
|
/**
|
|
596
596
|
* Инициализирует экземпляр класса {@link Identity}.
|
|
597
597
|
*
|
|
@@ -616,7 +616,7 @@ class re {
|
|
|
616
616
|
return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : T(this.id);
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
|
-
class k extends
|
|
619
|
+
class k extends ee {
|
|
620
620
|
/**
|
|
621
621
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
622
622
|
*
|
|
@@ -631,7 +631,7 @@ class k extends re {
|
|
|
631
631
|
this.name = (e == null ? void 0 : e.name) ?? "";
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
|
-
class
|
|
634
|
+
class le extends k {
|
|
635
635
|
/**
|
|
636
636
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
637
637
|
*
|
|
@@ -718,7 +718,7 @@ class tt {
|
|
|
718
718
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
|
-
class ur extends
|
|
721
|
+
class ur extends le {
|
|
722
722
|
/**
|
|
723
723
|
* Инициализирует экземпляр класса {@link CatalogableItem}.
|
|
724
724
|
*
|
|
@@ -918,7 +918,7 @@ class hr {
|
|
|
918
918
|
}
|
|
919
919
|
class N extends R {
|
|
920
920
|
}
|
|
921
|
-
class
|
|
921
|
+
class ge extends R {
|
|
922
922
|
/**
|
|
923
923
|
* Инициализирует экземпляр класса {@link Warehouse}.
|
|
924
924
|
*
|
|
@@ -965,7 +965,7 @@ class nt {
|
|
|
965
965
|
* Количество остатков товара на складе.
|
|
966
966
|
*/
|
|
967
967
|
t(this, "count");
|
|
968
|
-
this.warehouse = new
|
|
968
|
+
this.warehouse = new ge(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
969
969
|
}
|
|
970
970
|
}
|
|
971
971
|
class x extends k {
|
|
@@ -1189,7 +1189,7 @@ class me extends _e {
|
|
|
1189
1189
|
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", this.currencyRates = e != null && e.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([s, i]) => [_r(s), i])) : void 0;
|
|
1190
1190
|
}
|
|
1191
1191
|
}
|
|
1192
|
-
class gr extends
|
|
1192
|
+
class gr extends ee {
|
|
1193
1193
|
/**
|
|
1194
1194
|
* Инициализирует экземпляр класса {@link OrderItemBase}.
|
|
1195
1195
|
*
|
|
@@ -1944,9 +1944,9 @@ class ze extends k {
|
|
|
1944
1944
|
this.photo = e.photo, this.contacts = new mr(e.contacts), this.curatedDirection = new Be(e.curatedDirection);
|
|
1945
1945
|
}
|
|
1946
1946
|
}
|
|
1947
|
-
class
|
|
1947
|
+
class X extends R {
|
|
1948
1948
|
}
|
|
1949
|
-
class
|
|
1949
|
+
class ue extends R {
|
|
1950
1950
|
/**
|
|
1951
1951
|
* Инициализирует экземпляр класса {@link Region}.
|
|
1952
1952
|
*
|
|
@@ -1957,8 +1957,8 @@ class pe extends R {
|
|
|
1957
1957
|
/**
|
|
1958
1958
|
* Данные о стране, в которой расположен регион.
|
|
1959
1959
|
*/
|
|
1960
|
-
t(this, "country", new
|
|
1961
|
-
e && (this.country = new
|
|
1960
|
+
t(this, "country", new X());
|
|
1961
|
+
e && (this.country = new X(e.country));
|
|
1962
1962
|
}
|
|
1963
1963
|
}
|
|
1964
1964
|
class Ae extends R {
|
|
@@ -1972,8 +1972,8 @@ class Ae extends R {
|
|
|
1972
1972
|
/**
|
|
1973
1973
|
* Данные о регионе, в котором расположен город.
|
|
1974
1974
|
*/
|
|
1975
|
-
t(this, "region", new
|
|
1976
|
-
e && (this.region = new
|
|
1975
|
+
t(this, "region", new ue());
|
|
1976
|
+
e && (this.region = new ue(e.region));
|
|
1977
1977
|
}
|
|
1978
1978
|
}
|
|
1979
1979
|
class yr extends k {
|
|
@@ -2015,7 +2015,7 @@ class yr extends k {
|
|
|
2015
2015
|
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 O(e.salesDirection) : void 0, this.createdAt = v(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = v(e == null ? void 0 : e.lastLoginAt) ? C(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
2016
2016
|
}
|
|
2017
2017
|
}
|
|
2018
|
-
class
|
|
2018
|
+
class re extends yr {
|
|
2019
2019
|
/**
|
|
2020
2020
|
* Инициализирует экземпляр класса {@link Client}.
|
|
2021
2021
|
*
|
|
@@ -2064,7 +2064,7 @@ class te extends yr {
|
|
|
2064
2064
|
this.salesDirection = new O(e == null ? void 0 : e.salesDirection), this.debt = (e == null ? void 0 : e.debt) ?? 0, this.alternativeName = (e == null ? void 0 : e.alternativeName) ?? "", this.city = new Ae(e == null ? void 0 : e.city), this.comment = e == null ? void 0 : e.comment, this.isPhoneApproved = (e == null ? void 0 : e.isPhoneApproved) ?? !1, this.isEmailApproved = (e == null ? void 0 : e.isEmailApproved) ?? !1, this.managers = ((s = e == null ? void 0 : e.managers) == null ? void 0 : s.map((o) => new Me(o))) ?? [], this.curators = ((i = e == null ? void 0 : e.curators) == null ? void 0 : i.map((o) => new ze(o))) ?? void 0;
|
|
2065
2065
|
}
|
|
2066
2066
|
}
|
|
2067
|
-
class
|
|
2067
|
+
class ie extends ee {
|
|
2068
2068
|
/**
|
|
2069
2069
|
* Инициализирует новый экземпляр класса.
|
|
2070
2070
|
*
|
|
@@ -2088,7 +2088,7 @@ class ne extends re {
|
|
|
2088
2088
|
* Данные шаблона прайс-листа.
|
|
2089
2089
|
*/
|
|
2090
2090
|
t(this, "priceTemplate");
|
|
2091
|
-
this.createdAt = v(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = v(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new
|
|
2091
|
+
this.createdAt = v(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = v(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new re(e == null ? void 0 : e.client), this.priceTemplate = new K(e == null ? void 0 : e.priceTemplate);
|
|
2092
2092
|
}
|
|
2093
2093
|
}
|
|
2094
2094
|
class ke extends fr {
|
|
@@ -2108,7 +2108,7 @@ class ke extends fr {
|
|
|
2108
2108
|
}
|
|
2109
2109
|
class wr extends R {
|
|
2110
2110
|
}
|
|
2111
|
-
class
|
|
2111
|
+
class ne extends k {
|
|
2112
2112
|
/**
|
|
2113
2113
|
* Инициализирует экземпляр класса {@link Property}.
|
|
2114
2114
|
*
|
|
@@ -2147,7 +2147,7 @@ class V {
|
|
|
2147
2147
|
* Может быть строкой, числом, boolean, диапазоном или JSON объектом.
|
|
2148
2148
|
*/
|
|
2149
2149
|
t(this, "value");
|
|
2150
|
-
this.property = new
|
|
2150
|
+
this.property = new ne(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
|
|
2151
2151
|
}
|
|
2152
2152
|
}
|
|
2153
2153
|
class S {
|
|
@@ -2232,7 +2232,7 @@ class zt {
|
|
|
2232
2232
|
}), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((s = r == null ? void 0 : r.createdAt) != null && s.to) && delete r.createdAt, !((i = r == null ? void 0 : r.updatedAt) != null && i.from) && !((o = r == null ? void 0 : r.updatedAt) != null && o.to) && delete r.updatedAt, r;
|
|
2233
2233
|
}
|
|
2234
2234
|
}
|
|
2235
|
-
class
|
|
2235
|
+
class oe extends k {
|
|
2236
2236
|
/**
|
|
2237
2237
|
* Инициализирует экземпляр класса {@link PricingRole}.
|
|
2238
2238
|
*
|
|
@@ -2286,7 +2286,7 @@ class Qe {
|
|
|
2286
2286
|
* Минимальный коэффициент цены.
|
|
2287
2287
|
*/
|
|
2288
2288
|
t(this, "minCoefficient");
|
|
2289
|
-
this.role = new
|
|
2289
|
+
this.role = new oe(r == null ? void 0 : r.role), this.category = new me(r == null ? void 0 : r.category), this.minCoefficient = new Re(r == null ? void 0 : r.minCoefficient);
|
|
2290
2290
|
}
|
|
2291
2291
|
}
|
|
2292
2292
|
class Wt extends p {
|
|
@@ -2531,7 +2531,7 @@ class Et extends p {
|
|
|
2531
2531
|
return this.get(
|
|
2532
2532
|
`/internal/clients/${r}/price/templates`,
|
|
2533
2533
|
{},
|
|
2534
|
-
(e) => e.data.map((s) => new
|
|
2534
|
+
(e) => e.data.map((s) => new ie(s))
|
|
2535
2535
|
);
|
|
2536
2536
|
}
|
|
2537
2537
|
/**
|
|
@@ -2542,7 +2542,7 @@ class Et extends p {
|
|
|
2542
2542
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_get_active
|
|
2543
2543
|
*/
|
|
2544
2544
|
getActiveTemplate(r) {
|
|
2545
|
-
return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new
|
|
2545
|
+
return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new ie(e.data), !0);
|
|
2546
2546
|
}
|
|
2547
2547
|
/**
|
|
2548
2548
|
* Добавляет связь между клиентом и шаблоном прайс-листа.
|
|
@@ -2561,7 +2561,7 @@ class Et extends p {
|
|
|
2561
2561
|
startAt: s.startAt && U(s.startAt, i),
|
|
2562
2562
|
endAt: s.endAt && U(s.endAt, i)
|
|
2563
2563
|
},
|
|
2564
|
-
(o) => new
|
|
2564
|
+
(o) => new ie(o.data),
|
|
2565
2565
|
{},
|
|
2566
2566
|
!0
|
|
2567
2567
|
);
|
|
@@ -2595,7 +2595,7 @@ class Et extends p {
|
|
|
2595
2595
|
startAt: i.startAt && U(i.startAt, o),
|
|
2596
2596
|
endAt: i.endAt && U(i.endAt, o)
|
|
2597
2597
|
},
|
|
2598
|
-
(c) => new
|
|
2598
|
+
(c) => new ie(c.data)
|
|
2599
2599
|
);
|
|
2600
2600
|
}
|
|
2601
2601
|
/**
|
|
@@ -2671,7 +2671,7 @@ class Vt extends p {
|
|
|
2671
2671
|
showHidden: s,
|
|
2672
2672
|
withPriceCoefficients: e
|
|
2673
2673
|
},
|
|
2674
|
-
(i) =>
|
|
2674
|
+
(i) => he(i.data, (o) => new I(o))
|
|
2675
2675
|
);
|
|
2676
2676
|
}
|
|
2677
2677
|
/**
|
|
@@ -2734,7 +2734,7 @@ class Kt extends p {
|
|
|
2734
2734
|
return this.get(
|
|
2735
2735
|
`/internal/catalog/products/${r}/coefficients`,
|
|
2736
2736
|
{},
|
|
2737
|
-
(e) =>
|
|
2737
|
+
(e) => he(e.data, (s) => new je(s))
|
|
2738
2738
|
);
|
|
2739
2739
|
}
|
|
2740
2740
|
/**
|
|
@@ -2811,7 +2811,7 @@ class Qt extends p {
|
|
|
2811
2811
|
showHidden: i,
|
|
2812
2812
|
withPriceCoefficients: s
|
|
2813
2813
|
},
|
|
2814
|
-
(o) =>
|
|
2814
|
+
(o) => he(o.data, (c) => new j(c))
|
|
2815
2815
|
);
|
|
2816
2816
|
}
|
|
2817
2817
|
}
|
|
@@ -3127,7 +3127,7 @@ class Xt extends De {
|
|
|
3127
3127
|
return this.get(
|
|
3128
3128
|
`/internal/price/templates/${r}/clients`,
|
|
3129
3129
|
{},
|
|
3130
|
-
(e) => e.data.map((s) => new
|
|
3130
|
+
(e) => e.data.map((s) => new ie(s))
|
|
3131
3131
|
);
|
|
3132
3132
|
}
|
|
3133
3133
|
}
|
|
@@ -3138,7 +3138,7 @@ class Zt extends p {
|
|
|
3138
3138
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get_list
|
|
3139
3139
|
*/
|
|
3140
3140
|
getRoles() {
|
|
3141
|
-
return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new
|
|
3141
|
+
return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new oe(e)));
|
|
3142
3142
|
}
|
|
3143
3143
|
/**
|
|
3144
3144
|
* Добавляет новую роль ценообразования.
|
|
@@ -3148,7 +3148,7 @@ class Zt extends p {
|
|
|
3148
3148
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_create
|
|
3149
3149
|
*/
|
|
3150
3150
|
createRole(r) {
|
|
3151
|
-
return this.post("/internal/price/roles", r, (e) => new
|
|
3151
|
+
return this.post("/internal/price/roles", r, (e) => new oe(e.data));
|
|
3152
3152
|
}
|
|
3153
3153
|
/**
|
|
3154
3154
|
* Возвращает данные роли ценообразования.
|
|
@@ -3158,7 +3158,7 @@ class Zt extends p {
|
|
|
3158
3158
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get
|
|
3159
3159
|
*/
|
|
3160
3160
|
getRole(r) {
|
|
3161
|
-
return this.get(`/internal/price/roles/${r}`, {}, (e) => new
|
|
3161
|
+
return this.get(`/internal/price/roles/${r}`, {}, (e) => new oe(e.data));
|
|
3162
3162
|
}
|
|
3163
3163
|
/**
|
|
3164
3164
|
* Обновляет данные роли ценообразования.
|
|
@@ -3169,7 +3169,7 @@ class Zt extends p {
|
|
|
3169
3169
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_update
|
|
3170
3170
|
*/
|
|
3171
3171
|
updateRole(r, e) {
|
|
3172
|
-
return this.patch(`/internal/price/roles/${r}`, e, (s) => new
|
|
3172
|
+
return this.patch(`/internal/price/roles/${r}`, e, (s) => new oe(s.data));
|
|
3173
3173
|
}
|
|
3174
3174
|
/**
|
|
3175
3175
|
* Удаляет роль ценообразования.
|
|
@@ -3224,7 +3224,7 @@ class es extends De {
|
|
|
3224
3224
|
getProperties(r, e, s) {
|
|
3225
3225
|
return this.getPaginated("/internal/catalog/properties", r, e, s, {}, (i) => {
|
|
3226
3226
|
const o = { ...i.data };
|
|
3227
|
-
return o.data = o.data.map((c) => new
|
|
3227
|
+
return o.data = o.data.map((c) => new ne(c)), o;
|
|
3228
3228
|
});
|
|
3229
3229
|
}
|
|
3230
3230
|
/**
|
|
@@ -3241,7 +3241,7 @@ class es extends De {
|
|
|
3241
3241
|
...s,
|
|
3242
3242
|
type: e
|
|
3243
3243
|
},
|
|
3244
|
-
(i) => new
|
|
3244
|
+
(i) => new ne(i.data)
|
|
3245
3245
|
);
|
|
3246
3246
|
}
|
|
3247
3247
|
/**
|
|
@@ -3251,7 +3251,7 @@ class es extends De {
|
|
|
3251
3251
|
* @see /doc/api/internal#/operations/api_internal_catalog_properties_get
|
|
3252
3252
|
*/
|
|
3253
3253
|
getProperty(r) {
|
|
3254
|
-
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new
|
|
3254
|
+
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new ne(e.data));
|
|
3255
3255
|
}
|
|
3256
3256
|
/**
|
|
3257
3257
|
* Обновляет существующее свойство.
|
|
@@ -3268,7 +3268,7 @@ class es extends De {
|
|
|
3268
3268
|
...i,
|
|
3269
3269
|
type: s
|
|
3270
3270
|
},
|
|
3271
|
-
(o) => new
|
|
3271
|
+
(o) => new ne(o.data)
|
|
3272
3272
|
);
|
|
3273
3273
|
}
|
|
3274
3274
|
/**
|
|
@@ -3641,7 +3641,7 @@ class rs extends p {
|
|
|
3641
3641
|
showHidden: i,
|
|
3642
3642
|
withPriceCoefficients: s
|
|
3643
3643
|
},
|
|
3644
|
-
(o) =>
|
|
3644
|
+
(o) => he(o.data, (c) => new I(c))
|
|
3645
3645
|
);
|
|
3646
3646
|
}
|
|
3647
3647
|
}
|
|
@@ -3703,7 +3703,7 @@ class ft extends R {
|
|
|
3703
3703
|
}
|
|
3704
3704
|
class yt extends R {
|
|
3705
3705
|
}
|
|
3706
|
-
class
|
|
3706
|
+
class Z extends R {
|
|
3707
3707
|
}
|
|
3708
3708
|
class Rr extends R {
|
|
3709
3709
|
}
|
|
@@ -3732,7 +3732,7 @@ class Pr extends R {
|
|
|
3732
3732
|
}
|
|
3733
3733
|
class Ar extends R {
|
|
3734
3734
|
}
|
|
3735
|
-
class qe extends
|
|
3735
|
+
class qe extends ee {
|
|
3736
3736
|
/**
|
|
3737
3737
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
3738
3738
|
*
|
|
@@ -3833,7 +3833,7 @@ class Dr extends k {
|
|
|
3833
3833
|
/**
|
|
3834
3834
|
* Группа партнеров (направление деятельности).
|
|
3835
3835
|
*/
|
|
3836
|
-
t(this, "partnerGroup", new
|
|
3836
|
+
t(this, "partnerGroup", new Z());
|
|
3837
3837
|
/**
|
|
3838
3838
|
* Список контактных лиц контрагента.
|
|
3839
3839
|
*/
|
|
@@ -3867,7 +3867,7 @@ class Dr extends k {
|
|
|
3867
3867
|
*/
|
|
3868
3868
|
t(this, "updater");
|
|
3869
3869
|
if (e) {
|
|
3870
|
-
if (this.opf = new M(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = v(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e.createdAt, this.creator = e.creator ? new d(e.creator) : void 0, this.updatedAt = v(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new d(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new
|
|
3870
|
+
if (this.opf = new M(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = v(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e.createdAt, this.creator = e.creator ? new d(e.creator) : void 0, this.updatedAt = v(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new d(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new Z(e.partnerGroup)), e.contacts) {
|
|
3871
3871
|
const s = [];
|
|
3872
3872
|
e.contacts.forEach((i) => {
|
|
3873
3873
|
s.push(new B(i));
|
|
@@ -3961,7 +3961,7 @@ class Ct extends $r {
|
|
|
3961
3961
|
/**
|
|
3962
3962
|
* Страна регистрации юридического лица нерезидента.
|
|
3963
3963
|
*/
|
|
3964
|
-
t(this, "registrationCountry", new
|
|
3964
|
+
t(this, "registrationCountry", new X());
|
|
3965
3965
|
/**
|
|
3966
3966
|
* Регистрационный номер юридического лица нерезидента.
|
|
3967
3967
|
*/
|
|
@@ -3970,7 +3970,7 @@ class Ct extends $r {
|
|
|
3970
3970
|
* Налоговый номер юридического лица нерезидента.
|
|
3971
3971
|
*/
|
|
3972
3972
|
t(this, "taxNumber", "");
|
|
3973
|
-
e && (this.registrationCountry = new
|
|
3973
|
+
e && (this.registrationCountry = new X(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
|
|
3974
3974
|
}
|
|
3975
3975
|
}
|
|
3976
3976
|
class ve {
|
|
@@ -3992,7 +3992,7 @@ class ve {
|
|
|
3992
3992
|
}
|
|
3993
3993
|
}
|
|
3994
3994
|
}
|
|
3995
|
-
class Ie extends
|
|
3995
|
+
class Ie extends ee {
|
|
3996
3996
|
/**
|
|
3997
3997
|
* Инициализирует экземпляр класса {@link ContactRelation}.
|
|
3998
3998
|
*
|
|
@@ -4075,7 +4075,7 @@ class Ce extends rt {
|
|
|
4075
4075
|
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new hr(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new B(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;
|
|
4076
4076
|
}
|
|
4077
4077
|
}
|
|
4078
|
-
class er extends
|
|
4078
|
+
class er extends re {
|
|
4079
4079
|
/**
|
|
4080
4080
|
* Инициализирует экземпляр класса {@link Client}.
|
|
4081
4081
|
*
|
|
@@ -4125,7 +4125,7 @@ class er extends te {
|
|
|
4125
4125
|
* @inheritDoc
|
|
4126
4126
|
*/
|
|
4127
4127
|
t(this, "extraData");
|
|
4128
|
-
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => ve.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new
|
|
4128
|
+
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => ve.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new Z(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new B(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new Ce(u))) ?? [], this.channelPrimaryInterest = new vr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Ar(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new N(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.preferredWarehouse = e != null && e.preferredWarehouse ? new ge(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
|
|
4129
4129
|
}
|
|
4130
4130
|
}
|
|
4131
4131
|
class br {
|
|
@@ -4243,7 +4243,7 @@ class is extends br {
|
|
|
4243
4243
|
* @inheritDoc
|
|
4244
4244
|
*/
|
|
4245
4245
|
t(this, "lastOrder");
|
|
4246
|
-
this.id = e == null ? void 0 : e.id, 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 = (s = e == null ? void 0 : e.cities) == null ? void 0 : s.map((D) => new Ae(D)), this.region = new
|
|
4246
|
+
this.id = e == null ? void 0 : e.id, 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 = (s = e == null ? void 0 : e.cities) == null ? void 0 : s.map((D) => new Ae(D)), this.region = new ue(e == null ? void 0 : e.region), this.country = new X(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 S(e == null ? void 0 : e.createdAt), this.lastLoginDate = new S(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((D) => new Pe(D))) ?? [], this.curators = ((o = e == null ? void 0 : e.curators) == null ? void 0 : o.map((D) => new ze(D))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((D) => new O(D)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new M(e == null ? void 0 : e.contragentType), this.preferredDeliveryType = e != null && e.preferredDeliveryType ? new N(e == null ? void 0 : e.preferredDeliveryType) : void 0, this.partnerGroups = (u = e == null ? void 0 : e.partnerGroups) == null ? void 0 : u.map((D) => new Z(D)), this.contact = new Ne(e == null ? void 0 : e.contact), this.lastOrder = {
|
|
4247
4247
|
createdAt: new S((h = e == null ? void 0 : e.lastOrder) == null ? void 0 : h.createdAt),
|
|
4248
4248
|
creator: (m = e == null ? void 0 : e.lastOrder) == null ? void 0 : m.creator,
|
|
4249
4249
|
isApproved: (f = e == null ? void 0 : e.lastOrder) == null ? void 0 : f.isApproved
|
|
@@ -4258,7 +4258,7 @@ class is extends br {
|
|
|
4258
4258
|
this.cities = [];
|
|
4259
4259
|
break;
|
|
4260
4260
|
case "region":
|
|
4261
|
-
this.region = new
|
|
4261
|
+
this.region = new ue();
|
|
4262
4262
|
break;
|
|
4263
4263
|
case "isActive":
|
|
4264
4264
|
this.isActive = !0;
|
|
@@ -4308,7 +4308,7 @@ class is extends br {
|
|
|
4308
4308
|
return !((s = e == null ? void 0 : e.createdAt) != null && s.from) && !((i = e == null ? void 0 : e.createdAt) != null && i.to) && delete e.createdAt, !((o = e == null ? void 0 : e.lastLoginDate) != null && o.from) && !((c = e == null ? void 0 : e.lastLoginDate) != null && c.to) && delete e.lastLoginDate, e;
|
|
4309
4309
|
}
|
|
4310
4310
|
}
|
|
4311
|
-
class Sr extends
|
|
4311
|
+
class Sr extends ee {
|
|
4312
4312
|
/**
|
|
4313
4313
|
* Инициализирует экземпляр класса {@link OrderShortInfo}.
|
|
4314
4314
|
*
|
|
@@ -4368,7 +4368,7 @@ class Pt extends k {
|
|
|
4368
4368
|
* @inheritDoc
|
|
4369
4369
|
*/
|
|
4370
4370
|
t(this, "curators");
|
|
4371
|
-
this.contacts = ((s = e.contacts) == null ? void 0 : s.map((u) => new B(u))) ?? void 0, this.lastOrder = e.lastOrder ? new Sr(e.lastOrder) : void 0, this.partnerGroups = ((i = e.partnerGroups) == null ? void 0 : i.map((u) => new
|
|
4371
|
+
this.contacts = ((s = e.contacts) == null ? void 0 : s.map((u) => new B(u))) ?? void 0, this.lastOrder = e.lastOrder ? new Sr(e.lastOrder) : void 0, this.partnerGroups = ((i = e.partnerGroups) == null ? void 0 : i.map((u) => new Z(u))) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new N(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new O(e.salesDirection) : void 0, this.managers = ((o = e.managers) == null ? void 0 : o.map((u) => new Me(u))) ?? void 0, this.curators = ((c = e.curators) == null ? void 0 : c.map((u) => new ze(u))) ?? void 0;
|
|
4372
4372
|
}
|
|
4373
4373
|
}
|
|
4374
4374
|
class At {
|
|
@@ -4599,7 +4599,7 @@ class a extends De {
|
|
|
4599
4599
|
i,
|
|
4600
4600
|
(c) => {
|
|
4601
4601
|
const u = { ...c.data };
|
|
4602
|
-
return u.data = u.data.map((h) => new
|
|
4602
|
+
return u.data = u.data.map((h) => new re(h)), u;
|
|
4603
4603
|
},
|
|
4604
4604
|
void 0,
|
|
4605
4605
|
o
|
|
@@ -5184,7 +5184,7 @@ const Q = class Q extends p {
|
|
|
5184
5184
|
* Кэш результатов запросов.
|
|
5185
5185
|
*/
|
|
5186
5186
|
t(Q, "responseDataCache", /* @__PURE__ */ new Map());
|
|
5187
|
-
let
|
|
5187
|
+
let pe = Q;
|
|
5188
5188
|
class cs extends p {
|
|
5189
5189
|
/**
|
|
5190
5190
|
* Выполняет проверку занят ли указанный номер телефона.
|
|
@@ -5376,12 +5376,12 @@ class gs {
|
|
|
5376
5376
|
return r.id === 0 && r.guid === "-undefined-";
|
|
5377
5377
|
}
|
|
5378
5378
|
}
|
|
5379
|
-
class Tt extends
|
|
5379
|
+
class Tt extends pe {
|
|
5380
5380
|
/**
|
|
5381
5381
|
* Возвращает {@link Promise} для получения справочника списка менеджеров.
|
|
5382
5382
|
*/
|
|
5383
5383
|
async getManagers() {
|
|
5384
|
-
const r = "/internal/managers", e =
|
|
5384
|
+
const r = "/internal/managers", e = pe.getCachedResponse(r);
|
|
5385
5385
|
if (e)
|
|
5386
5386
|
return e;
|
|
5387
5387
|
const i = (await this.get(r)).data.map((o) => Fe.instanceInitializer(Pe, o));
|
|
@@ -5445,7 +5445,7 @@ class Ir extends Sr {
|
|
|
5445
5445
|
* @inheritDoc
|
|
5446
5446
|
*/
|
|
5447
5447
|
t(this, "isLargeOrder");
|
|
5448
|
-
this.client = new
|
|
5448
|
+
this.client = new re(e == null ? void 0 : e.client), this.payment = {
|
|
5449
5449
|
type: ((s = e == null ? void 0 : e.payment) == null ? void 0 : s.type) ?? -1,
|
|
5450
5450
|
status: ((i = e == null ? void 0 : e.payment) == null ? void 0 : i.status) ?? -1,
|
|
5451
5451
|
onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
|
|
@@ -5453,12 +5453,12 @@ class Ir extends Sr {
|
|
|
5453
5453
|
type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
|
|
5454
5454
|
date: v((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? C(e.delivery.date) : ((h = e == null ? void 0 : e.delivery) == null ? void 0 : h.date) ?? /* @__PURE__ */ new Date(),
|
|
5455
5455
|
address: (m = e == null ? void 0 : e.delivery) != null && m.address ? new Ce(e.delivery.address) : void 0,
|
|
5456
|
-
warehouse: (f = e == null ? void 0 : e.delivery) != null && f.warehouse ? new
|
|
5456
|
+
warehouse: (f = e == null ? void 0 : e.delivery) != null && f.warehouse ? new ge(e.delivery.warehouse) : void 0
|
|
5457
5457
|
}, this.attachedUser = e != null && e.attachedUser ? new d(e == null ? void 0 : e.attachedUser) : void 0, this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new O(e == null ? void 0 : e.salesDirection), this.pendingAt = v(e == null ? void 0 : e.pendingAt) ? C(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = v(e == null ? void 0 : e.processedAt) ? C(e.processedAt) : e == null ? void 0 : e.processedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1, this.sum = (e == null ? void 0 : e.sum) ?? 0, this.isLargeOrder = (e == null ? void 0 : e.isLargeOrder) ?? !1;
|
|
5458
5458
|
}
|
|
5459
5459
|
}
|
|
5460
5460
|
var $t = /* @__PURE__ */ ((n) => (n.New = "new", n.WorkedOut = "worked_out", n.Pending = "pending", n.Completed = "completed", n.Declined = "declined", n.Deleted = "deleted", n))($t || {});
|
|
5461
|
-
class b extends
|
|
5461
|
+
class b extends pe {
|
|
5462
5462
|
/**
|
|
5463
5463
|
* Возвращает {@link Promise} для получения данных указанного справочника.
|
|
5464
5464
|
*
|
|
@@ -5499,7 +5499,7 @@ class b extends he {
|
|
|
5499
5499
|
* групп партнеров (направлений деятельности).
|
|
5500
5500
|
*/
|
|
5501
5501
|
getPartnerGroup() {
|
|
5502
|
-
return this.getTypedDataArrayRequester(
|
|
5502
|
+
return this.getTypedDataArrayRequester(Z, "/internal/references/partner-group", !0);
|
|
5503
5503
|
}
|
|
5504
5504
|
/**
|
|
5505
5505
|
* Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
|
|
@@ -5563,7 +5563,7 @@ class b extends he {
|
|
|
5563
5563
|
* @param term Терм поиска.
|
|
5564
5564
|
*/
|
|
5565
5565
|
searchRegion(r) {
|
|
5566
|
-
return this.getTypedDataArrayRequester(
|
|
5566
|
+
return this.getTypedDataArrayRequester(ue, `/internal/references/region-with-country/search?term=${r}`);
|
|
5567
5567
|
}
|
|
5568
5568
|
/**
|
|
5569
5569
|
* Выполняет поиск данных о странах по терму в названии.
|
|
@@ -5571,7 +5571,7 @@ class b extends he {
|
|
|
5571
5571
|
* @param term Терм поиска.
|
|
5572
5572
|
*/
|
|
5573
5573
|
searchCountry(r) {
|
|
5574
|
-
return this.getTypedDataArrayRequester(
|
|
5574
|
+
return this.getTypedDataArrayRequester(X, `/internal/references/country/search?term=${r}`);
|
|
5575
5575
|
}
|
|
5576
5576
|
/**
|
|
5577
5577
|
* Возвращает {@link Promise} для получения справочника типов доставки.
|
|
@@ -5583,7 +5583,7 @@ class b extends he {
|
|
|
5583
5583
|
* Возвращает {@link Promise} для получения справочника складов.
|
|
5584
5584
|
*/
|
|
5585
5585
|
getWarehouses() {
|
|
5586
|
-
return this.getTypedDataArrayRequester(
|
|
5586
|
+
return this.getTypedDataArrayRequester(ge, "/public/references/warehouse", !0);
|
|
5587
5587
|
}
|
|
5588
5588
|
/**
|
|
5589
5589
|
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
@@ -5605,7 +5605,7 @@ class b extends he {
|
|
|
5605
5605
|
}
|
|
5606
5606
|
}
|
|
5607
5607
|
const $ = z("common.references_private", () => {
|
|
5608
|
-
const n = y({}), r = y(void 0), e = y(void 0), s = y(void 0), i = y(void 0), o = y(void 0), c = y(void 0), u = y(void 0), h = y(void 0), m = y(void 0), f = y(void 0), D = y(void 0),
|
|
5608
|
+
const n = y({}), r = y(void 0), e = y(void 0), s = y(void 0), i = y(void 0), o = y(void 0), c = y(void 0), u = y(void 0), h = y(void 0), m = y(void 0), f = y(void 0), D = y(void 0), te = y(void 0), se = y(void 0), W = y(void 0), J = y(void 0), Te = y(void 0), $e = y(void 0), l = y(void 0);
|
|
5609
5609
|
return {
|
|
5610
5610
|
/**
|
|
5611
5611
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -5658,11 +5658,11 @@ const $ = z("common.references_private", () => {
|
|
|
5658
5658
|
/**
|
|
5659
5659
|
* Справочник типов файлов продукктов/категорий.
|
|
5660
5660
|
*/
|
|
5661
|
-
productFileTypeReference:
|
|
5661
|
+
productFileTypeReference: te,
|
|
5662
5662
|
/**
|
|
5663
5663
|
* Справочник типов ресурсов.
|
|
5664
5664
|
*/
|
|
5665
|
-
resourceTypesReference:
|
|
5665
|
+
resourceTypesReference: se,
|
|
5666
5666
|
/**
|
|
5667
5667
|
* Справочник направлений продаж.
|
|
5668
5668
|
*/
|
|
@@ -5745,12 +5745,12 @@ const $ = z("common.references_private", () => {
|
|
|
5745
5745
|
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, p.getInstance(b).getSalesDirections().then((g) => {
|
|
5746
5746
|
l.salesDirectionsReference = g;
|
|
5747
5747
|
}).catch(w)), l.salesDirectionsReference;
|
|
5748
|
-
}),
|
|
5748
|
+
}), te = A(() => {
|
|
5749
5749
|
const l = $();
|
|
5750
5750
|
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, p.getInstance(b).getSourcePrimaryInterest().then((g) => {
|
|
5751
5751
|
l.sourcePrimaryInterestReference = g;
|
|
5752
5752
|
}).catch(w)), l.sourcePrimaryInterestReference;
|
|
5753
|
-
}),
|
|
5753
|
+
}), se = A(() => {
|
|
5754
5754
|
const l = $();
|
|
5755
5755
|
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, p.getInstance(b).getDeliveryTypes().then((g) => {
|
|
5756
5756
|
l.deliveryTypeReference = g;
|
|
@@ -5828,11 +5828,11 @@ const $ = z("common.references_private", () => {
|
|
|
5828
5828
|
/**
|
|
5829
5829
|
* Справочник каналов первичного интереса.
|
|
5830
5830
|
*/
|
|
5831
|
-
sourcePrimaryInterestsReference:
|
|
5831
|
+
sourcePrimaryInterestsReference: te,
|
|
5832
5832
|
/**
|
|
5833
5833
|
* Справочник типов доставки.
|
|
5834
5834
|
*/
|
|
5835
|
-
deliveryTypeReference:
|
|
5835
|
+
deliveryTypeReference: se,
|
|
5836
5836
|
/**
|
|
5837
5837
|
* Список менеджеров.
|
|
5838
5838
|
*/
|
|
@@ -5858,7 +5858,7 @@ class fs extends br {
|
|
|
5858
5858
|
* @param data Данные для первоначальной инициализации.
|
|
5859
5859
|
*/
|
|
5860
5860
|
constructor(e) {
|
|
5861
|
-
var s, i, o;
|
|
5861
|
+
var s, i, o, c;
|
|
5862
5862
|
super();
|
|
5863
5863
|
/**
|
|
5864
5864
|
* @inheritDoc
|
|
@@ -5943,12 +5943,20 @@ class fs extends br {
|
|
|
5943
5943
|
/**
|
|
5944
5944
|
* @inheritDoc
|
|
5945
5945
|
*/
|
|
5946
|
-
t(this, "
|
|
5946
|
+
t(this, "warehouses");
|
|
5947
5947
|
/**
|
|
5948
5948
|
* @inheritDoc
|
|
5949
5949
|
*/
|
|
5950
5950
|
t(this, "isLargeOrder");
|
|
5951
|
-
|
|
5951
|
+
/**
|
|
5952
|
+
* @inheritDoc
|
|
5953
|
+
*/
|
|
5954
|
+
t(this, "isToProcess");
|
|
5955
|
+
/**
|
|
5956
|
+
* @inheritDoc
|
|
5957
|
+
*/
|
|
5958
|
+
t(this, "onlyMyRegions");
|
|
5959
|
+
this.attachedOperators = (s = e == null ? void 0 : e.attachedOperators) == null ? void 0 : s.map((u) => new Cr(u)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new re(e.client) : void 0, this.contragent = e == null ? void 0 : e.contragent, this.createdAt = new S(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new d(e.creator) : void 0, this.deliveryDate = new S(e == null ? void 0 : e.deliveryDate), this.deliveryAddressSearch = e == null ? void 0 : e.deliveryAddressSearch, this.clientCities = (i = e == null ? void 0 : e.clientCities) == null ? void 0 : i.map((u) => new Ae(u)), this.id = e == null ? void 0 : e.id, this.isApproved = e == null ? void 0 : e.isApproved, this.isApproved1c = e == null ? void 0 : e.isApproved1c, this.isNotInStock = e == null ? void 0 : e.isNotInStock, this.isOnOrder = e == null ? void 0 : e.isOnOrder, this.isLargeOrder = e == null ? void 0 : e.isLargeOrder, this.pendingAt = new S(e == null ? void 0 : e.pendingAt), this.processedAt = new S(e == null ? void 0 : e.processedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new O(u)), this.status = e == null ? void 0 : e.status, this.deliveryType = e != null && e.deliveryType ? new N(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new Rr(e.paymentType) : void 0, this.warehouses = (c = e == null ? void 0 : e.warehouses) == null ? void 0 : c.map((u) => new ge(u)), this.isToProcess = e == null ? void 0 : e.isToProcess;
|
|
5952
5960
|
}
|
|
5953
5961
|
/**
|
|
5954
5962
|
* @inheritDoc
|
|
@@ -5983,7 +5991,7 @@ class fs extends br {
|
|
|
5983
5991
|
this.status = [];
|
|
5984
5992
|
break;
|
|
5985
5993
|
case "warehouse":
|
|
5986
|
-
this.
|
|
5994
|
+
this.warehouses = [];
|
|
5987
5995
|
break;
|
|
5988
5996
|
default:
|
|
5989
5997
|
this[e] = void 0;
|
|
@@ -6242,7 +6250,7 @@ class ae {
|
|
|
6242
6250
|
* Источник клиентской цены.
|
|
6243
6251
|
*/
|
|
6244
6252
|
t(this, "source");
|
|
6245
|
-
this.client = new
|
|
6253
|
+
this.client = new re(r == null ? void 0 : r.client), this.product = new I(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) ?? Ge.Product;
|
|
6246
6254
|
}
|
|
6247
6255
|
}
|
|
6248
6256
|
const de = (n) => {
|
|
@@ -6370,10 +6378,10 @@ class St {
|
|
|
6370
6378
|
* @inheritDoc
|
|
6371
6379
|
*/
|
|
6372
6380
|
t(this, "currency");
|
|
6373
|
-
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = v(r.costDate) ? C(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new
|
|
6381
|
+
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = v(r.costDate) ? C(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new le(r.product) : void 0, this.client = r.client ? new d(r.client) : void 0, this.executor = r.executor ? new d(r.executor) : void 0, this.currency = r.currency ? new x(r.currency) : void 0;
|
|
6374
6382
|
}
|
|
6375
6383
|
}
|
|
6376
|
-
class kt extends
|
|
6384
|
+
class kt extends le {
|
|
6377
6385
|
/**
|
|
6378
6386
|
* Инициализирует экземпляр класса {@link ProductPriceHistory}.
|
|
6379
6387
|
*
|
|
@@ -6385,7 +6393,7 @@ class kt extends ue {
|
|
|
6385
6393
|
* @inheritDoc
|
|
6386
6394
|
*/
|
|
6387
6395
|
t(this, "history");
|
|
6388
|
-
this.history =
|
|
6396
|
+
this.history = he(e.history, (s) => new St(s));
|
|
6389
6397
|
}
|
|
6390
6398
|
}
|
|
6391
6399
|
class vs extends p {
|
|
@@ -6399,7 +6407,7 @@ class vs extends p {
|
|
|
6399
6407
|
getProductPriceHistory(r) {
|
|
6400
6408
|
var o, c, u, h, m;
|
|
6401
6409
|
const e = L().config.dateFormats.api, s = or(
|
|
6402
|
-
|
|
6410
|
+
ce(r, {
|
|
6403
6411
|
costDate: {
|
|
6404
6412
|
from: xe((o = r.costDate) == null ? void 0 : o.from) ? U(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
|
|
6405
6413
|
to: xe((u = r.costDate) == null ? void 0 : u.to) ? U(r.costDate.to, e) : (h = r.costDate) == null ? void 0 : h.to
|
|
@@ -6408,7 +6416,7 @@ class vs extends p {
|
|
|
6408
6416
|
(f) => T(f) || (H(f) || cr(f)) && Y(f)
|
|
6409
6417
|
), i = ((m = r.product) == null ? void 0 : m[0]) ?? 0;
|
|
6410
6418
|
return delete s.product, this.get(`/internal/price/products/${i}/history`, s).then((f) => [
|
|
6411
|
-
new kt(
|
|
6419
|
+
new kt(ce(f[0], { history: f }))
|
|
6412
6420
|
]);
|
|
6413
6421
|
}
|
|
6414
6422
|
}
|
|
@@ -6427,7 +6435,7 @@ class tr {
|
|
|
6427
6435
|
* Список рекомендованных категорий продуктов.
|
|
6428
6436
|
*/
|
|
6429
6437
|
t(this, "productCategories", []);
|
|
6430
|
-
r != null && r.products && (this.products = r.products.map((e) => new
|
|
6438
|
+
r != null && r.products && (this.products = r.products.map((e) => new le(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new le(e)));
|
|
6431
6439
|
}
|
|
6432
6440
|
}
|
|
6433
6441
|
class Cs extends p {
|
|
@@ -6736,10 +6744,10 @@ export {
|
|
|
6736
6744
|
j as ClientProduct,
|
|
6737
6745
|
Qt as ClientProductCategoryDataProvider,
|
|
6738
6746
|
Yt as ClientProductDataProvider,
|
|
6739
|
-
|
|
6747
|
+
re as ClientShortInfo,
|
|
6740
6748
|
ht as ClientsAdditionalDataRequestTypeEnum,
|
|
6741
6749
|
is as ClientsListFilters,
|
|
6742
|
-
|
|
6750
|
+
le as CodedIdentity,
|
|
6743
6751
|
us as ConfiguratorProvider,
|
|
6744
6752
|
Dt as ConfiguratorsEnum,
|
|
6745
6753
|
Ne as Contact,
|
|
@@ -6755,7 +6763,7 @@ export {
|
|
|
6755
6763
|
Ct as ContragentUlNr,
|
|
6756
6764
|
$r as ContragentUlR,
|
|
6757
6765
|
Ge as CostSourceEnum,
|
|
6758
|
-
|
|
6766
|
+
X as Country,
|
|
6759
6767
|
Be as CuratedDirection,
|
|
6760
6768
|
ze as Curator,
|
|
6761
6769
|
x as Currency,
|
|
@@ -6776,10 +6784,10 @@ export {
|
|
|
6776
6784
|
We as FilterOpEnum,
|
|
6777
6785
|
hr as GeoCoordinates,
|
|
6778
6786
|
st as HiddenCatalogableItem,
|
|
6779
|
-
|
|
6787
|
+
pe as HttpCachedRequester,
|
|
6780
6788
|
Yr as HttpParamsConfig,
|
|
6781
6789
|
p as HttpRequester,
|
|
6782
|
-
|
|
6790
|
+
ee as Identity,
|
|
6783
6791
|
tt as Image,
|
|
6784
6792
|
F as JwtPayload,
|
|
6785
6793
|
Pe as Manager,
|
|
@@ -6802,7 +6810,7 @@ export {
|
|
|
6802
6810
|
ys as OrdersDataProvider,
|
|
6803
6811
|
fs as OrdersListFilters,
|
|
6804
6812
|
br as PaginationFiltersBase,
|
|
6805
|
-
|
|
6813
|
+
Z as PartnerGroup,
|
|
6806
6814
|
Rr as PaymentType,
|
|
6807
6815
|
ye as PreferencesStorageProvider,
|
|
6808
6816
|
ae as PriceAnalyze,
|
|
@@ -6813,11 +6821,11 @@ export {
|
|
|
6813
6821
|
St as PriceHistoryItem,
|
|
6814
6822
|
K as PriceTemplate,
|
|
6815
6823
|
Se as PriceTemplateCategory,
|
|
6816
|
-
|
|
6824
|
+
ie as PriceTemplateClient,
|
|
6817
6825
|
fr as PriceTemplateICatalogableItem,
|
|
6818
6826
|
ke as PriceTemplateProduct,
|
|
6819
6827
|
Xt as PriceTemplateProvider,
|
|
6820
|
-
|
|
6828
|
+
oe as PricingRole,
|
|
6821
6829
|
Zt as PricingRoleProvider,
|
|
6822
6830
|
_e as PrimaryCatalogableItem,
|
|
6823
6831
|
I as Product,
|
|
@@ -6828,7 +6836,7 @@ export {
|
|
|
6828
6836
|
kt as ProductPriceHistory,
|
|
6829
6837
|
Ke as ProductUnit,
|
|
6830
6838
|
es as PropertiesProvider,
|
|
6831
|
-
|
|
6839
|
+
ne as Property,
|
|
6832
6840
|
wr as PropertyType,
|
|
6833
6841
|
lt as PropertyTypeEnum,
|
|
6834
6842
|
V as PropertyValue,
|
|
@@ -6837,7 +6845,7 @@ export {
|
|
|
6837
6845
|
R as Reference,
|
|
6838
6846
|
ss as ReferenceDataFactory,
|
|
6839
6847
|
b as ReferenceDataProvider,
|
|
6840
|
-
|
|
6848
|
+
ue as Region,
|
|
6841
6849
|
Pr as ResourceType,
|
|
6842
6850
|
O as SalesDirection,
|
|
6843
6851
|
Xr as SentryConfig,
|
|
@@ -6859,7 +6867,7 @@ export {
|
|
|
6859
6867
|
d as UserShortInfo,
|
|
6860
6868
|
Lt as UserTypeEnum,
|
|
6861
6869
|
ls as VersionConfig,
|
|
6862
|
-
|
|
6870
|
+
ge as Warehouse,
|
|
6863
6871
|
Zr as WebSocketConfig,
|
|
6864
6872
|
Xe as findCatalogItemByIdRecursive,
|
|
6865
6873
|
Ze as flattenCatalogItems,
|