@snabcentr/common-lib 1.90.4 → 1.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/manifest.json +1 -1
- package/dist/release_notes.tmp +2 -2
- package/dist/sc-common-lib.js +1332 -1322
- 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/cart/interfaces/i-base-cart-validation-result.d.ts +2 -1
- package/dist/src/cart/interfaces/i-base-cart-validation-result.d.ts.map +1 -1
- package/dist/src/cart/providers/cart-provider.d.ts +1 -1
- package/dist/src/cart/providers/cart-provider.d.ts.map +1 -1
- package/dist/src/catalog/classes/price-template.d.ts +1 -1
- package/dist/src/catalog/classes/price-template.d.ts.map +1 -1
- package/dist/src/catalog/interfaces/i-discount-short-info.d.ts +1 -1
- package/dist/src/catalog/interfaces/i-discount-short-info.d.ts.map +1 -1
- package/dist/src/catalog/interfaces/i-pricing-role-create-data.d.ts +1 -1
- package/dist/src/catalog/interfaces/i-pricing-role-create-data.d.ts.map +1 -1
- package/dist/src/catalog/interfaces/i-pricing-role.d.ts +1 -1
- package/dist/src/catalog/interfaces/i-pricing-role.d.ts.map +1 -1
- package/dist/src/catalog/interfaces/i-product-price-coefficient.d.ts +1 -1
- package/dist/src/catalog/interfaces/i-product-price-coefficient.d.ts.map +1 -1
- package/dist/src/catalog/interfaces/i-property-type.d.ts +1 -1
- package/dist/src/catalog/interfaces/i-property-type.d.ts.map +1 -1
- package/dist/src/catalog/methods/flatten-catalog-items.d.ts.map +1 -1
- package/dist/src/catalog/providers/client-price-provider.d.ts +5 -1
- package/dist/src/catalog/providers/client-price-provider.d.ts.map +1 -1
- package/dist/src/catalog/providers/client-price-template-provider.d.ts +2 -1
- package/dist/src/catalog/providers/client-price-template-provider.d.ts.map +1 -1
- package/dist/src/catalog/providers/price-template-provider.d.ts +10 -3
- package/dist/src/catalog/providers/price-template-provider.d.ts.map +1 -1
- package/dist/src/catalog/providers/properties-provider.d.ts +11 -5
- package/dist/src/catalog/providers/properties-provider.d.ts.map +1 -1
- package/dist/src/clients/classes/bank-account.d.ts +3 -3
- package/dist/src/clients/classes/bank-account.d.ts.map +1 -1
- package/dist/src/clients/classes/clients-list-filters.d.ts +4 -0
- package/dist/src/clients/classes/clients-list-filters.d.ts.map +1 -1
- package/dist/src/clients/classes/contragent/contragent-person.d.ts +1 -1
- package/dist/src/clients/classes/contragent/contragent-person.d.ts.map +1 -1
- package/dist/src/clients/classes/contragent/contragent-ul-nr.d.ts +2 -2
- package/dist/src/clients/classes/contragent/contragent-ul-nr.d.ts.map +1 -1
- package/dist/src/clients/classes/contragent/contragent-ul-r.d.ts +1 -1
- package/dist/src/clients/classes/contragent/contragent-ul-r.d.ts.map +1 -1
- package/dist/src/clients/classes/delivery-address.d.ts +3 -3
- package/dist/src/clients/classes/delivery-address.d.ts.map +1 -1
- package/dist/src/clients/interfaces/contragent/i-contragent-base.d.ts +6 -3
- package/dist/src/clients/interfaces/contragent/i-contragent-base.d.ts.map +1 -1
- package/dist/src/clients/interfaces/contragent/i-contragent-ul-nr.d.ts +1 -1
- package/dist/src/clients/interfaces/contragent/i-contragent-ul-nr.d.ts.map +1 -1
- package/dist/src/clients/interfaces/i-bank-account.d.ts +2 -2
- package/dist/src/clients/interfaces/i-bank-account.d.ts.map +1 -1
- package/dist/src/clients/interfaces/i-client-short-info.d.ts +3 -2
- package/dist/src/clients/interfaces/i-client-short-info.d.ts.map +1 -1
- package/dist/src/clients/interfaces/i-clients-list-filters.d.ts +11 -1
- package/dist/src/clients/interfaces/i-clients-list-filters.d.ts.map +1 -1
- package/dist/src/clients/interfaces/i-delivery-address.d.ts +3 -3
- package/dist/src/clients/interfaces/i-delivery-address.d.ts.map +1 -1
- package/dist/src/clients/providers/client-data-provider.d.ts +8 -8
- package/dist/src/clients/providers/client-data-provider.d.ts.map +1 -1
- package/dist/src/clients/providers/unknown-client-data-provider.d.ts +1 -1
- package/dist/src/clients/providers/unknown-client-data-provider.d.ts.map +1 -1
- package/dist/src/configurator/providers/configurator-provider.d.ts.map +1 -1
- package/dist/src/contacts/interfaces/i-contact-person.d.ts +2 -1
- package/dist/src/contacts/interfaces/i-contact-person.d.ts.map +1 -1
- package/dist/src/contacts/interfaces/i-contact-relation.d.ts +1 -1
- package/dist/src/contacts/interfaces/i-contact-relation.d.ts.map +1 -1
- package/dist/src/contacts/interfaces/i-contact.d.ts +1 -1
- package/dist/src/contacts/interfaces/i-contact.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/managers/interfaces/i-manager-common.d.ts +3 -3
- package/dist/src/managers/interfaces/i-manager-common.d.ts.map +1 -1
- package/dist/src/orders/classes/orders-list-filters.d.ts +2 -1
- package/dist/src/orders/classes/orders-list-filters.d.ts.map +1 -1
- package/dist/src/orders/interfaces/i-order-short-info.d.ts +2 -2
- package/dist/src/orders/interfaces/i-order-short-info.d.ts.map +1 -1
- package/dist/src/orders/providers/orders-data-provider.d.ts +4 -4
- package/dist/src/orders/providers/orders-data-provider.d.ts.map +1 -1
- package/dist/src/pagination/filters/pagination-filters-base.d.ts.map +1 -1
- package/dist/src/pagination/providers/base-pagination-provider.d.ts +4 -4
- package/dist/src/pagination/providers/base-pagination-provider.d.ts.map +1 -1
- package/dist/src/price-analyze/interfaces/i-price-analyze.d.ts +1 -1
- package/dist/src/price-analyze/interfaces/i-price-analyze.d.ts.map +1 -1
- package/dist/src/references/classes/currency.d.ts +1 -1
- package/dist/src/references/classes/currency.d.ts.map +1 -1
- package/dist/src/references/classes/product-unit.d.ts +1 -1
- package/dist/src/references/classes/product-unit.d.ts.map +1 -1
- package/dist/src/references/interfaces/i-channel-primary-interest.d.ts +1 -1
- package/dist/src/references/interfaces/i-channel-primary-interest.d.ts.map +1 -1
- package/dist/src/references/interfaces/i-city-with-region-and-country.d.ts +1 -1
- package/dist/src/references/interfaces/i-city-with-region-and-country.d.ts.map +1 -1
- package/dist/src/references/interfaces/i-city.d.ts +1 -1
- package/dist/src/references/interfaces/i-city.d.ts.map +1 -1
- package/dist/src/references/interfaces/i-contact-position.d.ts +1 -1
- package/dist/src/references/interfaces/i-contact-position.d.ts.map +1 -1
- package/dist/src/references/interfaces/i-country.d.ts +1 -1
- package/dist/src/references/interfaces/i-country.d.ts.map +1 -1
- package/dist/src/references/interfaces/i-curated-direction.d.ts +1 -1
- package/dist/src/references/interfaces/i-curated-direction.d.ts.map +1 -1
- package/dist/src/references/interfaces/i-currency.d.ts +1 -1
- package/dist/src/references/interfaces/i-currency.d.ts.map +1 -1
- package/dist/src/references/interfaces/i-delivery-type.d.ts +1 -1
- package/dist/src/references/interfaces/i-delivery-type.d.ts.map +1 -1
- package/dist/src/references/interfaces/i-operator.d.ts +1 -1
- package/dist/src/references/interfaces/i-operator.d.ts.map +1 -1
- package/dist/src/references/interfaces/i-opf.d.ts +1 -1
- package/dist/src/references/interfaces/i-opf.d.ts.map +1 -1
- package/dist/src/references/interfaces/i-order-payment-status.d.ts +1 -1
- package/dist/src/references/interfaces/i-order-payment-status.d.ts.map +1 -1
- package/dist/src/references/interfaces/i-order-status.d.ts +1 -1
- package/dist/src/references/interfaces/i-order-status.d.ts.map +1 -1
- package/dist/src/references/interfaces/i-partner-group.d.ts +1 -1
- package/dist/src/references/interfaces/i-partner-group.d.ts.map +1 -1
- package/dist/src/references/interfaces/i-payment-type.d.ts +1 -1
- package/dist/src/references/interfaces/i-payment-type.d.ts.map +1 -1
- package/dist/src/references/interfaces/i-product-file-type.d.ts +1 -1
- package/dist/src/references/interfaces/i-product-file-type.d.ts.map +1 -1
- package/dist/src/references/interfaces/i-product-unit.d.ts +1 -1
- package/dist/src/references/interfaces/i-product-unit.d.ts.map +1 -1
- package/dist/src/references/interfaces/i-region.d.ts +1 -1
- package/dist/src/references/interfaces/i-region.d.ts.map +1 -1
- package/dist/src/references/interfaces/i-sales-direction.d.ts +1 -1
- package/dist/src/references/interfaces/i-sales-direction.d.ts.map +1 -1
- package/dist/src/references/interfaces/i-source-primary-interest.d.ts +1 -1
- package/dist/src/references/interfaces/i-source-primary-interest.d.ts.map +1 -1
- package/dist/src/seo/providers/seo-data-provider.d.ts +1 -1
- package/dist/src/seo/providers/seo-data-provider.d.ts.map +1 -1
- package/dist/src/suggestion/interfaces/i-address-suggestion.d.ts +2 -2
- package/dist/src/suggestion/interfaces/i-address-suggestion.d.ts.map +1 -1
- package/dist/src/suggestion/interfaces/i-bank-suggestion.d.ts +1 -1
- package/dist/src/suggestion/interfaces/i-bank-suggestion.d.ts.map +1 -1
- package/dist/src/suggestion/interfaces/i-organization-suggestion.d.ts +2 -2
- package/dist/src/suggestion/interfaces/i-organization-suggestion.d.ts.map +1 -1
- package/dist/src/suggestion/providers/data-suggestion-provider.d.ts +5 -3
- package/dist/src/suggestion/providers/data-suggestion-provider.d.ts.map +1 -1
- package/dist/src/{data-table → table-data}/classes/filter-group.d.ts.map +1 -1
- package/dist/src/{data-table → table-data}/classes/filter-item.d.ts +3 -2
- package/dist/src/table-data/classes/filter-item.d.ts.map +1 -0
- package/dist/src/table-data/classes/index.d.ts +6 -0
- package/dist/src/{data-table → table-data}/classes/index.d.ts.map +1 -1
- package/dist/src/{data-table/classes/data-table-pagination-request-params.d.ts → table-data/classes/table-data-pagination-request-params.d.ts} +3 -3
- package/dist/src/table-data/classes/table-data-pagination-request-params.d.ts.map +1 -0
- package/dist/src/{data-table/classes/data-table-pagination.d.ts → table-data/classes/table-data-pagination.d.ts} +4 -4
- package/dist/src/{data-table/classes/data-table-pagination.d.ts.map → table-data/classes/table-data-pagination.d.ts.map} +1 -1
- package/dist/src/{data-table/classes/data-table-sort-request-params.d.ts → table-data/classes/table-data-sort-request-params.d.ts} +2 -2
- package/dist/src/table-data/classes/table-data-sort-request-params.d.ts.map +1 -0
- package/dist/src/{data-table → table-data}/enums/filter-op-enum.d.ts.map +1 -1
- package/dist/src/table-data/enums/index.d.ts.map +1 -0
- package/dist/src/table-data/index.d.ts.map +1 -0
- package/dist/src/table-data/interfaces/i-filter-group.d.ts.map +1 -0
- package/dist/src/{data-table → table-data}/interfaces/i-filter-item.d.ts +3 -2
- package/dist/src/table-data/interfaces/i-filter-item.d.ts.map +1 -0
- package/dist/src/{data-table → table-data}/interfaces/i-pagination-request-params.d.ts.map +1 -1
- package/dist/src/{data-table → table-data}/interfaces/i-pagination.d.ts.map +1 -1
- package/dist/src/{data-table → table-data}/interfaces/i-sort-request-params.d.ts.map +1 -1
- package/dist/src/{data-table → table-data}/interfaces/index.d.ts.map +1 -1
- package/dist/src/user/classes/user-short-info.d.ts +2 -2
- package/dist/src/user/classes/user-short-info.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/src/data-table/classes/data-table-pagination-request-params.d.ts.map +0 -1
- package/dist/src/data-table/classes/data-table-sort-request-params.d.ts.map +0 -1
- package/dist/src/data-table/classes/filter-item.d.ts.map +0 -1
- package/dist/src/data-table/classes/index.d.ts +0 -6
- package/dist/src/data-table/enums/index.d.ts.map +0 -1
- package/dist/src/data-table/index.d.ts.map +0 -1
- package/dist/src/data-table/interfaces/i-filter-group.d.ts.map +0 -1
- package/dist/src/data-table/interfaces/i-filter-item.d.ts.map +0 -1
- /package/dist/src/{data-table → table-data}/classes/filter-group.d.ts +0 -0
- /package/dist/src/{data-table → table-data}/enums/filter-op-enum.d.ts +0 -0
- /package/dist/src/{data-table → table-data}/enums/index.d.ts +0 -0
- /package/dist/src/{data-table → table-data}/index.d.ts +0 -0
- /package/dist/src/{data-table → table-data}/interfaces/i-filter-group.d.ts +0 -0
- /package/dist/src/{data-table → table-data}/interfaces/i-pagination-request-params.d.ts +0 -0
- /package/dist/src/{data-table → table-data}/interfaces/i-pagination.d.ts +0 -0
- /package/dist/src/{data-table → table-data}/interfaces/i-sort-request-params.d.ts +0 -0
- /package/dist/src/{data-table → table-data}/interfaces/index.d.ts +0 -0
package/dist/sc-common-lib.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var dr = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var t = (n, r, e) =>
|
|
4
|
-
import { jwtDecode as
|
|
5
|
-
import { merge as ce, isNil as
|
|
6
|
-
import { objectToCamel as
|
|
2
|
+
var ar = (n, r, e) => r in n ? dr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
|
+
var t = (n, r, e) => ar(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
+
import { jwtDecode as nr } from "jwt-decode";
|
|
5
|
+
import { merge as ce, isNil as $, isEmpty as Y, noop as w, mapValues as or, isArray as H, every as xr, split as Or, isString as v, constant as _r, toUpper as qr, cloneDeep as Nr, toLower as Ur, isFunction as Ue, map as he, forEach as Hr, isDate as xe, isObject as He, omitBy as cr } from "lodash-es";
|
|
6
|
+
import { objectToCamel as Fe, objectToSnake as Ee } from "ts-case-convert";
|
|
7
7
|
import { defineStore as z } from "pinia";
|
|
8
8
|
import { ref as y, markRaw as Fr, computed as A } from "vue";
|
|
9
|
-
import { isAfter as
|
|
9
|
+
import { isAfter as Ve, parseISO as C, startOfToday as Oe, format as a, addBusinessDays as Mr, endOfTomorrow as jr, startOfTomorrow as Gr, endOfYesterday as Br, startOfYesterday as zr, endOfToday as Wr, endOfDay as Jr, startOfDay as Er, addSeconds as Vr } from "date-fns";
|
|
10
10
|
import Kr, { CanceledError as Qr } from "axios";
|
|
11
11
|
class F {
|
|
12
12
|
/**
|
|
@@ -107,7 +107,7 @@ class F {
|
|
|
107
107
|
* @param jwtToken JWT-ключ доступа.
|
|
108
108
|
*/
|
|
109
109
|
static getJwtPayload(r) {
|
|
110
|
-
const e =
|
|
110
|
+
const e = nr(r), s = new F(Fe(e));
|
|
111
111
|
return s.resourceAccess = e.resource_access, s;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
@@ -151,7 +151,7 @@ class jt extends F {
|
|
|
151
151
|
* @param jwtToken JWT-ключ доступа.
|
|
152
152
|
*/
|
|
153
153
|
static getJwtPayload(e) {
|
|
154
|
-
return new F(
|
|
154
|
+
return new F(Fe(nr(e)));
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
class Yr {
|
|
@@ -378,8 +378,8 @@ class we {
|
|
|
378
378
|
if (e)
|
|
379
379
|
try {
|
|
380
380
|
const s = JSON.parse(e);
|
|
381
|
-
if (!s.availableFor ||
|
|
382
|
-
if (
|
|
381
|
+
if (!s.availableFor || Ve(C(s.availableFor) || Oe(), /* @__PURE__ */ new Date())) {
|
|
382
|
+
if ($(s.data) || Y(s.data))
|
|
383
383
|
throw new Error("Data is empty");
|
|
384
384
|
return s.data;
|
|
385
385
|
}
|
|
@@ -401,7 +401,7 @@ class we {
|
|
|
401
401
|
static saveActualDataToStorage(r, e, s) {
|
|
402
402
|
if (this.isLocalStorageAvailable())
|
|
403
403
|
try {
|
|
404
|
-
if (
|
|
404
|
+
if ($(e) || Y(e))
|
|
405
405
|
throw new Error("Data is empty");
|
|
406
406
|
const i = JSON.stringify({
|
|
407
407
|
availableFor: s,
|
|
@@ -452,7 +452,7 @@ class we {
|
|
|
452
452
|
const i = localStorage.getItem(s);
|
|
453
453
|
if (i) {
|
|
454
454
|
const o = JSON.parse(i);
|
|
455
|
-
o.availableFor && !
|
|
455
|
+
o.availableFor && !Ve(C(o.availableFor) || Oe(), /* @__PURE__ */ new Date()) && r.push(s);
|
|
456
456
|
}
|
|
457
457
|
} catch {
|
|
458
458
|
r.push(s);
|
|
@@ -468,7 +468,7 @@ class we {
|
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
|
-
function
|
|
471
|
+
function Ke(n) {
|
|
472
472
|
try {
|
|
473
473
|
const r = F.getJwtPayload(n);
|
|
474
474
|
return new Date(r.exp * 1e3);
|
|
@@ -491,9 +491,9 @@ const E = z("common.auth_state_private", () => {
|
|
|
491
491
|
})()
|
|
492
492
|
), r = y(void 0), e = y(void 0), s = Fr(/* @__PURE__ */ new Map());
|
|
493
493
|
function i() {
|
|
494
|
-
e.value = void 0,
|
|
494
|
+
e.value = void 0, $(n.value) || n.value.then((o) => {
|
|
495
495
|
const c = F.getJwtPayload(o);
|
|
496
|
-
e.value = c.exp * 1e3 > Date.now() ?
|
|
496
|
+
e.value = c.exp * 1e3 > Date.now() ? or(c.resourceAccess, (u) => (u == null ? void 0 : u.roles) ?? []) : void 0;
|
|
497
497
|
}).catch(w);
|
|
498
498
|
}
|
|
499
499
|
return {
|
|
@@ -521,10 +521,10 @@ const E = z("common.auth_state_private", () => {
|
|
|
521
521
|
}), be = z("common.auth_state", () => {
|
|
522
522
|
const n = A(() => {
|
|
523
523
|
const o = E();
|
|
524
|
-
if (
|
|
524
|
+
if ($(o.jwtToken) && !$(o.jwtTokenUpdater)) {
|
|
525
525
|
const c = o.jwtTokenUpdater();
|
|
526
526
|
o.jwtToken = c, c.then((u) => {
|
|
527
|
-
o.jwtToken = Promise.resolve(u), we.saveActualDataToStorage("sc.token", u,
|
|
527
|
+
o.jwtToken = Promise.resolve(u), we.saveActualDataToStorage("sc.token", u, Ke(u)), o.recalculateUserPermissions();
|
|
528
528
|
}).catch(w);
|
|
529
529
|
}
|
|
530
530
|
return o.jwtToken;
|
|
@@ -534,7 +534,7 @@ const E = z("common.auth_state_private", () => {
|
|
|
534
534
|
}
|
|
535
535
|
function e(o) {
|
|
536
536
|
const c = E();
|
|
537
|
-
c.jwtToken = Promise.resolve(o), we.saveActualDataToStorage("sc.token", o,
|
|
537
|
+
c.jwtToken = Promise.resolve(o), we.saveActualDataToStorage("sc.token", o, Ke(o)), c.recalculateUserPermissions();
|
|
538
538
|
}
|
|
539
539
|
function s() {
|
|
540
540
|
const o = E();
|
|
@@ -542,14 +542,14 @@ const E = z("common.auth_state_private", () => {
|
|
|
542
542
|
}
|
|
543
543
|
function i(o) {
|
|
544
544
|
const c = E();
|
|
545
|
-
|
|
545
|
+
!$(c.jwtToken) && $(c.userPermissions) && c.jwtToken.then((m) => {
|
|
546
546
|
const f = F.getJwtPayload(m);
|
|
547
|
-
c.userPermissions = f.exp * 1e3 > Date.now() ?
|
|
547
|
+
c.userPermissions = f.exp * 1e3 > Date.now() ? or(f.resourceAccess, (D) => (D == null ? void 0 : D.roles) ?? []) : void 0;
|
|
548
548
|
}).catch(w);
|
|
549
549
|
const u = H(o) ? o.join(" && ") : o;
|
|
550
550
|
if (c.userPermissionsComputedRefs.has(u))
|
|
551
551
|
return c.userPermissionsComputedRefs.get(u);
|
|
552
|
-
const
|
|
552
|
+
const p = A(() => {
|
|
553
553
|
const m = (f) => {
|
|
554
554
|
var J;
|
|
555
555
|
const D = Or(f, ".");
|
|
@@ -558,9 +558,9 @@ const E = z("common.auth_state_private", () => {
|
|
|
558
558
|
const [te, se] = D, W = (J = E().userPermissions) == null ? void 0 : J[te];
|
|
559
559
|
return H(W) && W.includes(se);
|
|
560
560
|
};
|
|
561
|
-
return H(o) ?
|
|
561
|
+
return H(o) ? xr(o, (f) => m(f)) : m(o);
|
|
562
562
|
});
|
|
563
|
-
return c.userPermissionsComputedRefs.set(u,
|
|
563
|
+
return c.userPermissionsComputedRefs.set(u, p), p;
|
|
564
564
|
}
|
|
565
565
|
return {
|
|
566
566
|
/**
|
|
@@ -607,13 +607,13 @@ class ee {
|
|
|
607
607
|
* @inheritDoc
|
|
608
608
|
*/
|
|
609
609
|
t(this, "guid");
|
|
610
|
-
this.id = r == null ? void 0 : r.id,
|
|
610
|
+
this.id = r == null ? void 0 : r.id, $(this.id) && ($(e) ? typeof (r == null ? void 0 : r.id) == "number" ? this.id = -1 : typeof (r == null ? void 0 : r.id) == "string" && (this.id = "") : this.id = e), this.guid = (r == null ? void 0 : r.guid) ?? "";
|
|
611
611
|
}
|
|
612
612
|
/**
|
|
613
613
|
* Возвращает признак, что это новая запись.
|
|
614
614
|
*/
|
|
615
615
|
isNewRec() {
|
|
616
|
-
return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" :
|
|
616
|
+
return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : $(this.id);
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
619
|
class k extends ee {
|
|
@@ -631,161 +631,6 @@ class k extends ee {
|
|
|
631
631
|
this.name = (e == null ? void 0 : e.name) ?? "";
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
|
-
class le extends k {
|
|
635
|
-
/**
|
|
636
|
-
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
637
|
-
*
|
|
638
|
-
* @param data Данные для первоначальной инициализации.
|
|
639
|
-
*/
|
|
640
|
-
constructor(e) {
|
|
641
|
-
super(e);
|
|
642
|
-
/**
|
|
643
|
-
* @inheritDoc
|
|
644
|
-
*/
|
|
645
|
-
t(this, "code", "");
|
|
646
|
-
this.code = (e == null ? void 0 : e.code) ?? "";
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
class R extends k {
|
|
650
|
-
/**
|
|
651
|
-
* Инициализирует экземпляр класса {@link Reference}.
|
|
652
|
-
*
|
|
653
|
-
* @param data Данные для первоначальной инициализации.
|
|
654
|
-
*/
|
|
655
|
-
constructor(e) {
|
|
656
|
-
super(e);
|
|
657
|
-
/**
|
|
658
|
-
* Краткое название.
|
|
659
|
-
*/
|
|
660
|
-
t(this, "slug");
|
|
661
|
-
/**
|
|
662
|
-
* Описание.
|
|
663
|
-
*/
|
|
664
|
-
t(this, "description");
|
|
665
|
-
this.description = e == null ? void 0 : e.description, this.slug = e == null ? void 0 : e.slug;
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
class lr extends k {
|
|
669
|
-
/**
|
|
670
|
-
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
671
|
-
*
|
|
672
|
-
* @param data Данные для первоначальной инициализации.
|
|
673
|
-
*/
|
|
674
|
-
constructor(e) {
|
|
675
|
-
super(e);
|
|
676
|
-
/**
|
|
677
|
-
* Дата и время последнего изменения.
|
|
678
|
-
*/
|
|
679
|
-
t(this, "updatedAt");
|
|
680
|
-
this.updatedAt = v(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e == null ? void 0 : e.updatedAt;
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
class tt extends lr {
|
|
684
|
-
/**
|
|
685
|
-
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
686
|
-
*
|
|
687
|
-
* @param data Данные для первоначальной инициализации.
|
|
688
|
-
*/
|
|
689
|
-
constructor(e) {
|
|
690
|
-
super(e);
|
|
691
|
-
/**
|
|
692
|
-
* Дата и время последнего удаления.
|
|
693
|
-
*/
|
|
694
|
-
t(this, "deletedAt");
|
|
695
|
-
this.deletedAt = v(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
class st {
|
|
699
|
-
/**
|
|
700
|
-
* Инициализирует экземпляр класса {@link Image}.
|
|
701
|
-
*
|
|
702
|
-
* @param data Данные для первоначальной инициализации.
|
|
703
|
-
* @param mediaServer URL адрес медиа сервера.
|
|
704
|
-
*/
|
|
705
|
-
constructor(r, e) {
|
|
706
|
-
/**
|
|
707
|
-
* Путь к основному изображению.
|
|
708
|
-
*/
|
|
709
|
-
t(this, "image");
|
|
710
|
-
/**
|
|
711
|
-
* Путь к предпросмотру изображения.
|
|
712
|
-
*/
|
|
713
|
-
t(this, "preview");
|
|
714
|
-
/**
|
|
715
|
-
* Признак того, что изображение является основным.
|
|
716
|
-
*/
|
|
717
|
-
t(this, "isDefault");
|
|
718
|
-
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
class ur extends le {
|
|
722
|
-
/**
|
|
723
|
-
* Инициализирует экземпляр класса {@link CatalogableItem}.
|
|
724
|
-
*
|
|
725
|
-
* @param data Данные для первоначальной инициализации.
|
|
726
|
-
*/
|
|
727
|
-
constructor(e) {
|
|
728
|
-
super(e);
|
|
729
|
-
/**
|
|
730
|
-
* Символьное обозначение.
|
|
731
|
-
*/
|
|
732
|
-
t(this, "slug");
|
|
733
|
-
/**
|
|
734
|
-
* Тип элемента.
|
|
735
|
-
*/
|
|
736
|
-
t(this, "type");
|
|
737
|
-
this.slug = (e == null ? void 0 : e.slug) ?? "";
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
class it extends ur {
|
|
741
|
-
/**
|
|
742
|
-
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
743
|
-
*
|
|
744
|
-
* @param data Данные для первоначальной инициализации.
|
|
745
|
-
*/
|
|
746
|
-
constructor(e) {
|
|
747
|
-
super(e);
|
|
748
|
-
/**
|
|
749
|
-
* Признак того, что категория скрыта.
|
|
750
|
-
*/
|
|
751
|
-
t(this, "isHidden");
|
|
752
|
-
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1;
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
class _e extends ur {
|
|
756
|
-
/**
|
|
757
|
-
* Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
|
|
758
|
-
*
|
|
759
|
-
* @param data Данные для первоначальной инициализации.
|
|
760
|
-
*/
|
|
761
|
-
constructor(e) {
|
|
762
|
-
super(e);
|
|
763
|
-
/**
|
|
764
|
-
* Признак того, что категория является основной для продукта.
|
|
765
|
-
*/
|
|
766
|
-
t(this, "isPrimary");
|
|
767
|
-
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
class Fe {
|
|
771
|
-
/**
|
|
772
|
-
* Инициализирует экземпляр указанного класса.
|
|
773
|
-
*
|
|
774
|
-
* @param type Тип класса, на основе которого необходимо создать экземпляр (тип возвращаемых данных).
|
|
775
|
-
*/
|
|
776
|
-
static simpleInstanceInitializer(r) {
|
|
777
|
-
return new r();
|
|
778
|
-
}
|
|
779
|
-
/**
|
|
780
|
-
* Инициализирует экземпляр указанного класса.
|
|
781
|
-
*
|
|
782
|
-
* @param type Тип класса, на основе которого необходимо создать экземпляр (тип возвращаемых данных).
|
|
783
|
-
* @param data Начальные данные для инициализации (параметры конструктора).
|
|
784
|
-
*/
|
|
785
|
-
static instanceInitializer(r, e) {
|
|
786
|
-
return new r(e);
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
634
|
class x extends k {
|
|
790
635
|
/**
|
|
791
636
|
* Инициализирует экземпляр класса {@link UserShortInfo}.
|
|
@@ -801,7 +646,7 @@ class x extends k {
|
|
|
801
646
|
this.type = e == null ? void 0 : e.type;
|
|
802
647
|
}
|
|
803
648
|
}
|
|
804
|
-
class
|
|
649
|
+
class tt extends k {
|
|
805
650
|
/**
|
|
806
651
|
* Инициализирует экземпляр класса {@link DiscountShortInfo}.
|
|
807
652
|
*
|
|
@@ -840,6 +685,21 @@ class nt extends k {
|
|
|
840
685
|
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = v(e == null ? void 0 : e.publishedAt) ? C(e.publishedAt) : e == null ? void 0 : e.publishedAt, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new x(e == null ? void 0 : e.owner), this.deletedAt = v(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
841
686
|
}
|
|
842
687
|
}
|
|
688
|
+
class lr extends k {
|
|
689
|
+
/**
|
|
690
|
+
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
691
|
+
*
|
|
692
|
+
* @param data Данные для первоначальной инициализации.
|
|
693
|
+
*/
|
|
694
|
+
constructor(e) {
|
|
695
|
+
super(e);
|
|
696
|
+
/**
|
|
697
|
+
* Дата и время последнего изменения.
|
|
698
|
+
*/
|
|
699
|
+
t(this, "updatedAt");
|
|
700
|
+
this.updatedAt = v(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e == null ? void 0 : e.updatedAt;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
843
703
|
class K extends lr {
|
|
844
704
|
/**
|
|
845
705
|
* Инициализирует экземпляр класса {@link PriceTemplate}.
|
|
@@ -859,13 +719,32 @@ class K extends lr {
|
|
|
859
719
|
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = v(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
|
|
860
720
|
}
|
|
861
721
|
}
|
|
862
|
-
var
|
|
722
|
+
var ur = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(ur || {});
|
|
723
|
+
class R extends k {
|
|
724
|
+
/**
|
|
725
|
+
* Инициализирует экземпляр класса {@link Reference}.
|
|
726
|
+
*
|
|
727
|
+
* @param data Данные для первоначальной инициализации.
|
|
728
|
+
*/
|
|
729
|
+
constructor(e) {
|
|
730
|
+
super(e);
|
|
731
|
+
/**
|
|
732
|
+
* Краткое название.
|
|
733
|
+
*/
|
|
734
|
+
t(this, "slug");
|
|
735
|
+
/**
|
|
736
|
+
* Описание.
|
|
737
|
+
*/
|
|
738
|
+
t(this, "description");
|
|
739
|
+
this.description = e == null ? void 0 : e.description, this.slug = e == null ? void 0 : e.slug;
|
|
740
|
+
}
|
|
741
|
+
}
|
|
863
742
|
class Pe extends R {
|
|
864
743
|
/**
|
|
865
744
|
* Возвращает значение справочника коэффициента розничной цены.
|
|
866
745
|
*/
|
|
867
746
|
static getRetailPriceCoefficient() {
|
|
868
|
-
return { id: -2, slug:
|
|
747
|
+
return { id: -2, slug: ur.Retail, name: "Розн. цена", guid: "", isNewRec: _r(!0) };
|
|
869
748
|
}
|
|
870
749
|
}
|
|
871
750
|
class Me {
|
|
@@ -898,7 +777,7 @@ class Me {
|
|
|
898
777
|
this.coefficient = new Pe(r == null ? void 0 : r.coefficient), this.value = (r == null ? void 0 : r.value) ?? 0, this.cost = (r == null ? void 0 : r.cost) ?? 0, this.percent = (r == null ? void 0 : r.percent) ?? 0, this.readOnly = (r == null ? void 0 : r.readOnly) ?? !0;
|
|
899
778
|
}
|
|
900
779
|
}
|
|
901
|
-
class
|
|
780
|
+
class pr {
|
|
902
781
|
/**
|
|
903
782
|
* Инициализирует экземпляр класса {@link GeoCoordinates}.
|
|
904
783
|
*
|
|
@@ -916,7 +795,7 @@ class hr {
|
|
|
916
795
|
this.lat = (r == null ? void 0 : r.lat) ?? 0, this.long = (r == null ? void 0 : r.long) ?? 0;
|
|
917
796
|
}
|
|
918
797
|
}
|
|
919
|
-
class
|
|
798
|
+
class U extends R {
|
|
920
799
|
}
|
|
921
800
|
class ge extends R {
|
|
922
801
|
/**
|
|
@@ -947,10 +826,10 @@ class ge extends R {
|
|
|
947
826
|
* Координаты склада.
|
|
948
827
|
*/
|
|
949
828
|
t(this, "coordinates");
|
|
950
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((i) => new
|
|
829
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((i) => new U(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new pr(e == null ? void 0 : e.coordinates);
|
|
951
830
|
}
|
|
952
831
|
}
|
|
953
|
-
class
|
|
832
|
+
class st {
|
|
954
833
|
/**
|
|
955
834
|
* Инициализирует экземпляр класса {@link StockCount}.
|
|
956
835
|
*
|
|
@@ -968,7 +847,7 @@ class ot {
|
|
|
968
847
|
this.warehouse = new ge(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
969
848
|
}
|
|
970
849
|
}
|
|
971
|
-
class
|
|
850
|
+
class O extends k {
|
|
972
851
|
/**
|
|
973
852
|
* Инициализирует экземпляр класса {@link Currency}.
|
|
974
853
|
*
|
|
@@ -995,7 +874,7 @@ class a extends k {
|
|
|
995
874
|
e && (this.signature = e.signature ?? "", this.code = e.code, this.symbol = e.symbol ?? "", this.precision = e.precision);
|
|
996
875
|
}
|
|
997
876
|
}
|
|
998
|
-
class
|
|
877
|
+
class Qe extends k {
|
|
999
878
|
/**
|
|
1000
879
|
* Инициализирует экземпляр класса {@link ProductUnit}.
|
|
1001
880
|
*
|
|
@@ -1022,52 +901,139 @@ class Ke extends k {
|
|
|
1022
901
|
e && (this.slug = e.slug ?? "", this.description = e.description, this.isSquare = e.isSquare ?? !1, this.isLinear = e.isLinear ?? !1);
|
|
1023
902
|
}
|
|
1024
903
|
}
|
|
1025
|
-
class
|
|
904
|
+
class le extends k {
|
|
1026
905
|
/**
|
|
1027
|
-
* Инициализирует экземпляр класса {@link
|
|
906
|
+
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
1028
907
|
*
|
|
1029
908
|
* @param data Данные для первоначальной инициализации.
|
|
1030
909
|
*/
|
|
1031
910
|
constructor(e) {
|
|
1032
|
-
var i, o, c, u;
|
|
1033
911
|
super(e);
|
|
1034
912
|
/**
|
|
1035
|
-
*
|
|
1036
|
-
*/
|
|
1037
|
-
t(this, "supplierSku");
|
|
1038
|
-
/**
|
|
1039
|
-
* Единица измерения.
|
|
1040
|
-
*/
|
|
1041
|
-
t(this, "unit");
|
|
1042
|
-
/**
|
|
1043
|
-
* Норма упаковки.
|
|
913
|
+
* @inheritDoc
|
|
1044
914
|
*/
|
|
1045
|
-
t(this, "
|
|
915
|
+
t(this, "code", "");
|
|
916
|
+
this.code = (e == null ? void 0 : e.code) ?? "";
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
class hr extends le {
|
|
920
|
+
/**
|
|
921
|
+
* Инициализирует экземпляр класса {@link CatalogableItem}.
|
|
922
|
+
*
|
|
923
|
+
* @param data Данные для первоначальной инициализации.
|
|
924
|
+
*/
|
|
925
|
+
constructor(e) {
|
|
926
|
+
super(e);
|
|
1046
927
|
/**
|
|
1047
|
-
*
|
|
928
|
+
* Символьное обозначение.
|
|
1048
929
|
*/
|
|
1049
|
-
t(this, "
|
|
930
|
+
t(this, "slug");
|
|
1050
931
|
/**
|
|
1051
|
-
*
|
|
932
|
+
* Тип элемента.
|
|
1052
933
|
*/
|
|
1053
|
-
t(this, "
|
|
934
|
+
t(this, "type");
|
|
935
|
+
this.slug = (e == null ? void 0 : e.slug) ?? "";
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
class it extends hr {
|
|
939
|
+
/**
|
|
940
|
+
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
941
|
+
*
|
|
942
|
+
* @param data Данные для первоначальной инициализации.
|
|
943
|
+
*/
|
|
944
|
+
constructor(e) {
|
|
945
|
+
super(e);
|
|
1054
946
|
/**
|
|
1055
|
-
*
|
|
947
|
+
* Признак того, что категория скрыта.
|
|
1056
948
|
*/
|
|
1057
|
-
t(this, "
|
|
949
|
+
t(this, "isHidden");
|
|
950
|
+
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1;
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
class nt {
|
|
954
|
+
/**
|
|
955
|
+
* Инициализирует экземпляр класса {@link Image}.
|
|
956
|
+
*
|
|
957
|
+
* @param data Данные для первоначальной инициализации.
|
|
958
|
+
* @param mediaServer URL адрес медиа сервера.
|
|
959
|
+
*/
|
|
960
|
+
constructor(r, e) {
|
|
1058
961
|
/**
|
|
1059
|
-
*
|
|
962
|
+
* Путь к основному изображению.
|
|
1060
963
|
*/
|
|
1061
|
-
t(this, "
|
|
964
|
+
t(this, "image");
|
|
1062
965
|
/**
|
|
1063
|
-
*
|
|
966
|
+
* Путь к предпросмотру изображения.
|
|
1064
967
|
*/
|
|
1065
|
-
t(this, "
|
|
968
|
+
t(this, "preview");
|
|
1066
969
|
/**
|
|
1067
|
-
* Признак
|
|
970
|
+
* Признак того, что изображение является основным.
|
|
1068
971
|
*/
|
|
1069
|
-
t(this, "
|
|
1070
|
-
|
|
972
|
+
t(this, "isDefault");
|
|
973
|
+
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
class _e extends hr {
|
|
977
|
+
/**
|
|
978
|
+
* Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
|
|
979
|
+
*
|
|
980
|
+
* @param data Данные для первоначальной инициализации.
|
|
981
|
+
*/
|
|
982
|
+
constructor(e) {
|
|
983
|
+
super(e);
|
|
984
|
+
/**
|
|
985
|
+
* Признак того, что категория является основной для продукта.
|
|
986
|
+
*/
|
|
987
|
+
t(this, "isPrimary");
|
|
988
|
+
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
class I extends it {
|
|
992
|
+
/**
|
|
993
|
+
* Инициализирует экземпляр класса {@link Product}.
|
|
994
|
+
*
|
|
995
|
+
* @param data Данные для первоначальной инициализации.
|
|
996
|
+
*/
|
|
997
|
+
constructor(e) {
|
|
998
|
+
var i, o, c, u;
|
|
999
|
+
super(e);
|
|
1000
|
+
/**
|
|
1001
|
+
* Артикул производителя/поставщика.
|
|
1002
|
+
*/
|
|
1003
|
+
t(this, "supplierSku");
|
|
1004
|
+
/**
|
|
1005
|
+
* Единица измерения.
|
|
1006
|
+
*/
|
|
1007
|
+
t(this, "unit");
|
|
1008
|
+
/**
|
|
1009
|
+
* Норма упаковки.
|
|
1010
|
+
*/
|
|
1011
|
+
t(this, "pack");
|
|
1012
|
+
/**
|
|
1013
|
+
* Минимальное количество товара для заказа.
|
|
1014
|
+
*/
|
|
1015
|
+
t(this, "minCount");
|
|
1016
|
+
/**
|
|
1017
|
+
* Валюта товара или услуги.
|
|
1018
|
+
*/
|
|
1019
|
+
t(this, "currency");
|
|
1020
|
+
/**
|
|
1021
|
+
* Стоимость товара или услуги.
|
|
1022
|
+
*/
|
|
1023
|
+
t(this, "cost");
|
|
1024
|
+
/**
|
|
1025
|
+
* Стоимость продукта в рублях.
|
|
1026
|
+
*/
|
|
1027
|
+
t(this, "costRub");
|
|
1028
|
+
/**
|
|
1029
|
+
* Дата установки цены.
|
|
1030
|
+
*/
|
|
1031
|
+
t(this, "costDate");
|
|
1032
|
+
/**
|
|
1033
|
+
* Признак товара "Под заказ".
|
|
1034
|
+
*/
|
|
1035
|
+
t(this, "onOrder");
|
|
1036
|
+
/**
|
|
1071
1037
|
* Данные о количестве товара, доступном на складах.
|
|
1072
1038
|
*/
|
|
1073
1039
|
t(this, "stockCount");
|
|
@@ -1099,9 +1065,9 @@ class I extends it {
|
|
|
1099
1065
|
* Список коэффициентов цен на продукт.
|
|
1100
1066
|
*/
|
|
1101
1067
|
t(this, "priceCoefficients");
|
|
1102
|
-
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new
|
|
1103
|
-
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((
|
|
1104
|
-
s && (this.category = new _e({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((
|
|
1068
|
+
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 = v(e == null ? void 0 : e.costDate) ? C(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((p) => new st(p))) ?? [], this.type = "product";
|
|
1069
|
+
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((p) => p.isPrimary));
|
|
1070
|
+
s && (this.category = new _e({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new _e(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new nt(p, L().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((p) => new Me(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
1105
1071
|
}
|
|
1106
1072
|
/**
|
|
1107
1073
|
* Возвращает признак, что это измеряемый товар.
|
|
@@ -1159,7 +1125,7 @@ class M extends I {
|
|
|
1159
1125
|
* Признак того, что указанный продукт входит в список избранных продуктов клиента.
|
|
1160
1126
|
*/
|
|
1161
1127
|
t(this, "isFavorite");
|
|
1162
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? je.Product, this.discount = e != null && e.discount ? new
|
|
1128
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? je.Product, this.discount = e != null && e.discount ? new tt(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new K(e.priceTemplate) : void 0, this.isPreviouslyOrdered = e == null ? void 0 : e.isPreviouslyOrdered, this.isRequired = e == null ? void 0 : e.isRequired, this.isFavorite = e == null ? void 0 : e.isFavorite;
|
|
1163
1129
|
}
|
|
1164
1130
|
}
|
|
1165
1131
|
class me extends _e {
|
|
@@ -1245,10 +1211,10 @@ class gr extends ee {
|
|
|
1245
1211
|
* @inheritDoc
|
|
1246
1212
|
*/
|
|
1247
1213
|
t(this, "creatorUser");
|
|
1248
|
-
this.product = new M(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new me(), this.currency = e.currency ? new
|
|
1214
|
+
this.product = new M(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new me(), this.currency = e.currency ? new O(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Nr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creatorUser = e.creatorUser && new x(e.creatorUser);
|
|
1249
1215
|
}
|
|
1250
1216
|
}
|
|
1251
|
-
let
|
|
1217
|
+
let ot = class extends gr {
|
|
1252
1218
|
/**
|
|
1253
1219
|
* Инициализирует экземпляр класса {@link OrderItem}.
|
|
1254
1220
|
*
|
|
@@ -1292,7 +1258,7 @@ let ct = class extends gr {
|
|
|
1292
1258
|
* @inheritDoc
|
|
1293
1259
|
*/
|
|
1294
1260
|
t(this, "currency");
|
|
1295
|
-
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 = H(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new
|
|
1261
|
+
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 = H(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new O(e.currency);
|
|
1296
1262
|
}
|
|
1297
1263
|
};
|
|
1298
1264
|
class ye {
|
|
@@ -1314,7 +1280,26 @@ class ye {
|
|
|
1314
1280
|
* @inheritDoc
|
|
1315
1281
|
*/
|
|
1316
1282
|
t(this, "directionsSum");
|
|
1317
|
-
this.items = r.items.map((e) => new
|
|
1283
|
+
this.items = r.items.map((e) => new ot(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
class Ge {
|
|
1287
|
+
/**
|
|
1288
|
+
* Инициализирует экземпляр указанного класса.
|
|
1289
|
+
*
|
|
1290
|
+
* @param type Тип класса, на основе которого необходимо создать экземпляр (тип возвращаемых данных).
|
|
1291
|
+
*/
|
|
1292
|
+
static simpleInstanceInitializer(r) {
|
|
1293
|
+
return new r();
|
|
1294
|
+
}
|
|
1295
|
+
/**
|
|
1296
|
+
* Инициализирует экземпляр указанного класса.
|
|
1297
|
+
*
|
|
1298
|
+
* @param type Тип класса, на основе которого необходимо создать экземпляр (тип возвращаемых данных).
|
|
1299
|
+
* @param data Начальные данные для инициализации (параметры конструктора).
|
|
1300
|
+
*/
|
|
1301
|
+
static instanceInitializer(r, e) {
|
|
1302
|
+
return new r(e);
|
|
1318
1303
|
}
|
|
1319
1304
|
}
|
|
1320
1305
|
const P = class P {
|
|
@@ -1356,7 +1341,7 @@ const P = class P {
|
|
|
1356
1341
|
// eslint-disable-next-line class-methods-use-this
|
|
1357
1342
|
t(this, "authRequestInterceptor", async (r) => {
|
|
1358
1343
|
let e;
|
|
1359
|
-
return
|
|
1344
|
+
return $(be().jwtToken) || (e = await be().jwtToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
|
|
1360
1345
|
});
|
|
1361
1346
|
/**
|
|
1362
1347
|
* Перехватчик запроса для вызова пользовательских хуков.
|
|
@@ -1371,7 +1356,7 @@ const P = class P {
|
|
|
1371
1356
|
* @param request Данные запроса.
|
|
1372
1357
|
*/
|
|
1373
1358
|
// eslint-disable-next-line class-methods-use-this
|
|
1374
|
-
t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params =
|
|
1359
|
+
t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = Ee(r.params)), ["put", "patch", "post"].includes(Ur(r.method)) && r.data && (r.data = Ee(r.data))), r));
|
|
1375
1360
|
/**
|
|
1376
1361
|
* Перехватчик ошибок ответов на запрос.
|
|
1377
1362
|
*
|
|
@@ -1407,7 +1392,7 @@ const P = class P {
|
|
|
1407
1392
|
* @param response Данные ответа на запрос.
|
|
1408
1393
|
*/
|
|
1409
1394
|
// eslint-disable-next-line class-methods-use-this
|
|
1410
|
-
t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data =
|
|
1395
|
+
t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = Fe(r.data)), r));
|
|
1411
1396
|
this.errorResponseHandler = P.defaultErrorsResponseHandler, this.httpClient = Kr.create({
|
|
1412
1397
|
headers: {
|
|
1413
1398
|
Accept: "application/json",
|
|
@@ -1472,7 +1457,7 @@ const P = class P {
|
|
|
1472
1457
|
* @param type Тип данных, которыми оперирует метод.
|
|
1473
1458
|
*/
|
|
1474
1459
|
static getInstance(r) {
|
|
1475
|
-
return Object.prototype.hasOwnProperty.call(P.instances, r.name) || (P.instances[r.name] =
|
|
1460
|
+
return Object.prototype.hasOwnProperty.call(P.instances, r.name) || (P.instances[r.name] = Ge.simpleInstanceInitializer(r)), P.instances[r.name];
|
|
1476
1461
|
}
|
|
1477
1462
|
/**
|
|
1478
1463
|
* Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
|
|
@@ -1481,8 +1466,8 @@ const P = class P {
|
|
|
1481
1466
|
*/
|
|
1482
1467
|
static convertHttpErrorResponse(r) {
|
|
1483
1468
|
var e, s;
|
|
1484
|
-
if (
|
|
1485
|
-
const i =
|
|
1469
|
+
if ($(r) || !$(r.request) || !$(r.response)) {
|
|
1470
|
+
const i = $(r) ? {} : r == null ? void 0 : r.response;
|
|
1486
1471
|
return Promise.reject({
|
|
1487
1472
|
status: (i == null ? void 0 : i.status) ?? 0,
|
|
1488
1473
|
statusText: (i == null ? void 0 : i.statusText) ?? "Unknown",
|
|
@@ -1585,8 +1570,8 @@ t(P, "requestHooks", []), /**
|
|
|
1585
1570
|
* Список зарегистрированных хуков для ответов.
|
|
1586
1571
|
*/
|
|
1587
1572
|
t(P, "responseHooks", []);
|
|
1588
|
-
let
|
|
1589
|
-
class Bt extends
|
|
1573
|
+
let h = P;
|
|
1574
|
+
class Bt extends h {
|
|
1590
1575
|
/**
|
|
1591
1576
|
* Возвращает содержимое корзины указанного клиента.
|
|
1592
1577
|
*
|
|
@@ -1700,8 +1685,8 @@ class Bt extends p {
|
|
|
1700
1685
|
return this.get(`internal/clients/${r.id}/cart/add-products-from-csv/example`, {}, (e) => new Blob([e.data], { type: "text/csv" }));
|
|
1701
1686
|
}
|
|
1702
1687
|
}
|
|
1703
|
-
var
|
|
1704
|
-
class
|
|
1688
|
+
var ct = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(ct || {}), lt = /* @__PURE__ */ ((n) => (n.Unknown = "unknown", n.Bool = "bool", n.Integer = "integer", n.Float = "float", n.String = "string", n.Range = "range", n.Json = "json", n.Object = "object", n))(lt || {});
|
|
1689
|
+
class q extends me {
|
|
1705
1690
|
/**
|
|
1706
1691
|
* Инициализирует экземпляр класса {@link Category}.
|
|
1707
1692
|
*
|
|
@@ -1718,7 +1703,7 @@ class _ extends me {
|
|
|
1718
1703
|
* Список продуктов категории.
|
|
1719
1704
|
*/
|
|
1720
1705
|
t(this, "products");
|
|
1721
|
-
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new
|
|
1706
|
+
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new q(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new I(o));
|
|
1722
1707
|
}
|
|
1723
1708
|
}
|
|
1724
1709
|
class mr {
|
|
@@ -1739,9 +1724,9 @@ class mr {
|
|
|
1739
1724
|
this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
|
|
1740
1725
|
}
|
|
1741
1726
|
}
|
|
1742
|
-
class
|
|
1727
|
+
class _ extends R {
|
|
1743
1728
|
}
|
|
1744
|
-
class
|
|
1729
|
+
class Be extends k {
|
|
1745
1730
|
/**
|
|
1746
1731
|
* Инициализирует экземпляр класса {@link ManagerCommon}.
|
|
1747
1732
|
*
|
|
@@ -1769,10 +1754,10 @@ class Ge extends k {
|
|
|
1769
1754
|
* @inheritDoc
|
|
1770
1755
|
*/
|
|
1771
1756
|
t(this, "isRegionalDirector");
|
|
1772
|
-
this.salesDirection = e != null && e.salesDirection ? new
|
|
1757
|
+
this.salesDirection = e != null && e.salesDirection ? new _(e.salesDirection) : new _(), this.photo = e == null ? void 0 : e.photo, this.contacts = e != null && e.contacts ? new mr(e.contacts) : void 0, this.isDefault = (e == null ? void 0 : e.isDefault) ?? !1, this.isRegionalDirector = (e == null ? void 0 : e.isRegionalDirector) ?? !1;
|
|
1773
1758
|
}
|
|
1774
1759
|
}
|
|
1775
|
-
class
|
|
1760
|
+
class ze extends R {
|
|
1776
1761
|
}
|
|
1777
1762
|
class fr extends k {
|
|
1778
1763
|
/**
|
|
@@ -1797,7 +1782,7 @@ class fr extends k {
|
|
|
1797
1782
|
this.description = e.description, this.canChangeLowCost = e.canChangeLowCost, this.parentRoleId = e.parentRoleId;
|
|
1798
1783
|
}
|
|
1799
1784
|
}
|
|
1800
|
-
class fe extends
|
|
1785
|
+
class fe extends Be {
|
|
1801
1786
|
/**
|
|
1802
1787
|
* Инициализирует экземпляр класса {@link Manager}.
|
|
1803
1788
|
*
|
|
@@ -1834,10 +1819,10 @@ class fe extends Ge {
|
|
|
1834
1819
|
* Список направлений кураторства.
|
|
1835
1820
|
*/
|
|
1836
1821
|
t(this, "curatedDirections");
|
|
1837
|
-
this.isActive = (e == null ? void 0 : e.isActive) ?? !1, this.isSupervisor = (e == null ? void 0 : e.isSupervisor) ?? !1, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.createdAt = e == null ? void 0 : e.createdAt, this.supervisorId = e == null ? void 0 : e.supervisorId, this.pricingRole = e != null && e.pricingRole ? new fr(e.pricingRole) : void 0, this.curatedDirections = ((s = e == null ? void 0 : e.curatedDirections) == null ? void 0 : s.map((i) => new
|
|
1822
|
+
this.isActive = (e == null ? void 0 : e.isActive) ?? !1, this.isSupervisor = (e == null ? void 0 : e.isSupervisor) ?? !1, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.createdAt = e == null ? void 0 : e.createdAt, this.supervisorId = e == null ? void 0 : e.supervisorId, this.pricingRole = e != null && e.pricingRole ? new fr(e.pricingRole) : void 0, this.curatedDirections = ((s = e == null ? void 0 : e.curatedDirections) == null ? void 0 : s.map((i) => new ze(i))) ?? [];
|
|
1838
1823
|
}
|
|
1839
1824
|
}
|
|
1840
|
-
class
|
|
1825
|
+
class ut extends me {
|
|
1841
1826
|
/**
|
|
1842
1827
|
* Инициализирует экземпляр класса {@link BaseClientCategory}.
|
|
1843
1828
|
*
|
|
@@ -1868,7 +1853,7 @@ class pt extends me {
|
|
|
1868
1853
|
this.isDisabled = (e == null ? void 0 : e.isDisabled) ?? !1, this.isRequired = (e == null ? void 0 : e.isRequired) ?? !1, this.isFavorite = (e == null ? void 0 : e.isFavorite) ?? !1, this.hidingComment = e == null ? void 0 : e.hidingComment, this.manager = e != null && e.manager ? new fe(e.manager) : void 0;
|
|
1869
1854
|
}
|
|
1870
1855
|
}
|
|
1871
|
-
class ve extends
|
|
1856
|
+
class ve extends ut {
|
|
1872
1857
|
/**
|
|
1873
1858
|
* Инициализирует экземпляр класса {@link ClientCategory}.
|
|
1874
1859
|
*
|
|
@@ -1921,7 +1906,7 @@ class Se extends yr {
|
|
|
1921
1906
|
this.productCategory = new me(e == null ? void 0 : e.productCategory);
|
|
1922
1907
|
}
|
|
1923
1908
|
}
|
|
1924
|
-
class
|
|
1909
|
+
class We extends k {
|
|
1925
1910
|
/**
|
|
1926
1911
|
* Инициализирует экземпляр класса {@link Curator}.
|
|
1927
1912
|
*
|
|
@@ -1941,7 +1926,7 @@ class ze extends k {
|
|
|
1941
1926
|
* @inheritDoc
|
|
1942
1927
|
*/
|
|
1943
1928
|
t(this, "curatedDirection");
|
|
1944
|
-
this.photo = e.photo, this.contacts = new mr(e.contacts), this.curatedDirection = new
|
|
1929
|
+
this.photo = e.photo, this.contacts = new mr(e.contacts), this.curatedDirection = new ze(e.curatedDirection);
|
|
1945
1930
|
}
|
|
1946
1931
|
}
|
|
1947
1932
|
class X extends R {
|
|
@@ -2012,7 +1997,7 @@ class wr extends k {
|
|
|
2012
1997
|
* Признак активности учетной записи пользователя.
|
|
2013
1998
|
*/
|
|
2014
1999
|
t(this, "isActive");
|
|
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
|
|
2000
|
+
this.phone = /^\d+$/.test((e == null ? void 0 : e.phone) ?? "") ? `+${e == null ? void 0 : e.phone}` : (e == null ? void 0 : e.phone) ?? "", this.email = (e == null ? void 0 : e.email) ?? "", this.getNews = (e == null ? void 0 : e.getNews) ?? !1, this.salesDirection = e != null && e.salesDirection ? new _(e.salesDirection) : void 0, this.createdAt = 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
2001
|
}
|
|
2017
2002
|
}
|
|
2018
2003
|
class re extends wr {
|
|
@@ -2061,7 +2046,7 @@ class re extends wr {
|
|
|
2061
2046
|
* @inheritDoc
|
|
2062
2047
|
*/
|
|
2063
2048
|
t(this, "curators");
|
|
2064
|
-
this.salesDirection = new
|
|
2049
|
+
this.salesDirection = new _(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 Be(o))) ?? [], this.curators = ((i = e == null ? void 0 : e.curators) == null ? void 0 : i.map((o) => new We(o))) ?? void 0;
|
|
2065
2050
|
}
|
|
2066
2051
|
}
|
|
2067
2052
|
class ie extends ee {
|
|
@@ -2150,7 +2135,7 @@ class V {
|
|
|
2150
2135
|
this.property = new ne(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
|
|
2151
2136
|
}
|
|
2152
2137
|
}
|
|
2153
|
-
class
|
|
2138
|
+
class T {
|
|
2154
2139
|
/**
|
|
2155
2140
|
* Инициализирует экземпляр класса {@link DatePeriod}.
|
|
2156
2141
|
*
|
|
@@ -2190,12 +2175,12 @@ class zt {
|
|
|
2190
2175
|
/**
|
|
2191
2176
|
* Период создания.
|
|
2192
2177
|
*/
|
|
2193
|
-
t(this, "createdAt", new
|
|
2178
|
+
t(this, "createdAt", new T());
|
|
2194
2179
|
/**
|
|
2195
2180
|
* Период изменения.
|
|
2196
2181
|
*/
|
|
2197
|
-
t(this, "updatedAt", new
|
|
2198
|
-
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.description = r == null ? void 0 : r.description, this.createdAt = new
|
|
2182
|
+
t(this, "updatedAt", new T());
|
|
2183
|
+
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.description = r == null ? void 0 : r.description, this.createdAt = new T(r == null ? void 0 : r.createdAt), this.updatedAt = new T(r == null ? void 0 : r.updatedAt);
|
|
2199
2184
|
}
|
|
2200
2185
|
/**
|
|
2201
2186
|
* Выполняет сброс указанного фильтра в значение по умолчанию.
|
|
@@ -2228,7 +2213,7 @@ class zt {
|
|
|
2228
2213
|
return Object.keys(this).forEach((c) => {
|
|
2229
2214
|
const u = this[c];
|
|
2230
2215
|
// eslint-disable-next-line prettier/prettier
|
|
2231
|
-
|
|
2216
|
+
$(u) || v(u) && u.trim().length === 0 || Ue(u.isNewRec) && u.isNewRec() || (r[c] = u);
|
|
2232
2217
|
}), !((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
2218
|
}
|
|
2234
2219
|
}
|
|
@@ -2267,7 +2252,7 @@ class oe extends k {
|
|
|
2267
2252
|
this.description = e == null ? void 0 : e.description, this.canChangeLowCost = (e == null ? void 0 : e.canChangeLowCost) ?? !1, this.parentRoleId = e == null ? void 0 : e.parentRoleId;
|
|
2268
2253
|
}
|
|
2269
2254
|
}
|
|
2270
|
-
class
|
|
2255
|
+
class Ye {
|
|
2271
2256
|
/**
|
|
2272
2257
|
* Инициализирует экземпляр класса {@link PricingRoleCategoryRule}.
|
|
2273
2258
|
*
|
|
@@ -2289,7 +2274,7 @@ class Qe {
|
|
|
2289
2274
|
this.role = new oe(r == null ? void 0 : r.role), this.category = new me(r == null ? void 0 : r.category), this.minCoefficient = new Pe(r == null ? void 0 : r.minCoefficient);
|
|
2290
2275
|
}
|
|
2291
2276
|
}
|
|
2292
|
-
class Wt extends
|
|
2277
|
+
class Wt extends h {
|
|
2293
2278
|
/**
|
|
2294
2279
|
* Возвращает данные о результатах поиска категорий и товаров.
|
|
2295
2280
|
*
|
|
@@ -2320,7 +2305,7 @@ class Wt extends p {
|
|
|
2320
2305
|
return s && (c += `&category_id=${s}`), i && (c += `&client_id=${i}`), c;
|
|
2321
2306
|
}
|
|
2322
2307
|
}
|
|
2323
|
-
class Jt extends
|
|
2308
|
+
class Jt extends h {
|
|
2324
2309
|
/**
|
|
2325
2310
|
* Импортирует цены клиента из CSV файла.
|
|
2326
2311
|
*
|
|
@@ -2519,7 +2504,7 @@ class Jt extends p {
|
|
|
2519
2504
|
return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
|
|
2520
2505
|
}
|
|
2521
2506
|
}
|
|
2522
|
-
class Et extends
|
|
2507
|
+
class Et extends h {
|
|
2523
2508
|
/**
|
|
2524
2509
|
* Возвращает список шаблонов прайс-листа привязанных к клиенту.
|
|
2525
2510
|
*
|
|
@@ -2558,8 +2543,8 @@ class Et extends p {
|
|
|
2558
2543
|
return this.post(
|
|
2559
2544
|
`/internal/clients/${r}/price/templates/${e}`,
|
|
2560
2545
|
s && {
|
|
2561
|
-
startAt: s.startAt &&
|
|
2562
|
-
endAt: s.endAt &&
|
|
2546
|
+
startAt: s.startAt && a(s.startAt, i),
|
|
2547
|
+
endAt: s.endAt && a(s.endAt, i)
|
|
2563
2548
|
},
|
|
2564
2549
|
(o) => new ie(o.data),
|
|
2565
2550
|
{},
|
|
@@ -2592,8 +2577,8 @@ class Et extends p {
|
|
|
2592
2577
|
return this.patch(
|
|
2593
2578
|
`/internal/clients/${r}/price/templates/${e}/${s}`,
|
|
2594
2579
|
i && {
|
|
2595
|
-
startAt: i.startAt &&
|
|
2596
|
-
endAt: i.endAt &&
|
|
2580
|
+
startAt: i.startAt && a(i.startAt, o),
|
|
2581
|
+
endAt: i.endAt && a(i.endAt, o)
|
|
2597
2582
|
},
|
|
2598
2583
|
(c) => new ie(c.data)
|
|
2599
2584
|
);
|
|
@@ -2611,7 +2596,7 @@ class Et extends p {
|
|
|
2611
2596
|
return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
|
|
2612
2597
|
}
|
|
2613
2598
|
}
|
|
2614
|
-
class Vt extends
|
|
2599
|
+
class Vt extends h {
|
|
2615
2600
|
/**
|
|
2616
2601
|
* Возвращает список данных о корневых категориях.
|
|
2617
2602
|
*
|
|
@@ -2625,7 +2610,7 @@ class Vt extends p {
|
|
|
2625
2610
|
{
|
|
2626
2611
|
showHidden: r
|
|
2627
2612
|
},
|
|
2628
|
-
(e) => e.data.map((s) => new
|
|
2613
|
+
(e) => e.data.map((s) => new q(s))
|
|
2629
2614
|
);
|
|
2630
2615
|
}
|
|
2631
2616
|
/**
|
|
@@ -2644,7 +2629,7 @@ class Vt extends p {
|
|
|
2644
2629
|
showHidden: e,
|
|
2645
2630
|
withNestedCategories: s
|
|
2646
2631
|
},
|
|
2647
|
-
(i) => new
|
|
2632
|
+
(i) => new q(i.data)
|
|
2648
2633
|
);
|
|
2649
2634
|
}
|
|
2650
2635
|
/**
|
|
@@ -2653,7 +2638,7 @@ class Vt extends p {
|
|
|
2653
2638
|
* @param categoryID Идентификатор категории продуктов.
|
|
2654
2639
|
*/
|
|
2655
2640
|
getPublicCategoryData(r) {
|
|
2656
|
-
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new
|
|
2641
|
+
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new q(e.data));
|
|
2657
2642
|
}
|
|
2658
2643
|
/**
|
|
2659
2644
|
* Возвращает список продуктов категории.
|
|
@@ -2696,14 +2681,14 @@ class Vt extends p {
|
|
|
2696
2681
|
publicSimpleSearch(r, e = 10) {
|
|
2697
2682
|
return new Promise((s, i) => {
|
|
2698
2683
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2699
|
-
s(o.categories.map((c) => new
|
|
2684
|
+
s(o.categories.map((c) => new q(c)));
|
|
2700
2685
|
}).catch((o) => {
|
|
2701
2686
|
i(o);
|
|
2702
2687
|
});
|
|
2703
2688
|
});
|
|
2704
2689
|
}
|
|
2705
2690
|
}
|
|
2706
|
-
class Kt extends
|
|
2691
|
+
class Kt extends h {
|
|
2707
2692
|
/**
|
|
2708
2693
|
* Возвращает данные об указанном продукте.
|
|
2709
2694
|
*
|
|
@@ -2753,7 +2738,7 @@ class Kt extends p {
|
|
|
2753
2738
|
});
|
|
2754
2739
|
}
|
|
2755
2740
|
}
|
|
2756
|
-
class Qt extends
|
|
2741
|
+
class Qt extends h {
|
|
2757
2742
|
/**
|
|
2758
2743
|
* Возвращает список данных о корневых категориях указанного клиента.
|
|
2759
2744
|
*
|
|
@@ -2815,7 +2800,7 @@ class Qt extends p {
|
|
|
2815
2800
|
);
|
|
2816
2801
|
}
|
|
2817
2802
|
}
|
|
2818
|
-
class Yt extends
|
|
2803
|
+
class Yt extends h {
|
|
2819
2804
|
/**
|
|
2820
2805
|
* Возвращает данные об указанном продукте для указанного клиента.
|
|
2821
2806
|
*
|
|
@@ -2836,8 +2821,8 @@ class Yt extends p {
|
|
|
2836
2821
|
);
|
|
2837
2822
|
}
|
|
2838
2823
|
}
|
|
2839
|
-
var
|
|
2840
|
-
class
|
|
2824
|
+
var Je = /* @__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))(Je || {});
|
|
2825
|
+
class Xe {
|
|
2841
2826
|
/**
|
|
2842
2827
|
* Инициализирует экземпляр класса {@link FilterItem}.
|
|
2843
2828
|
*
|
|
@@ -2856,7 +2841,7 @@ class Ye {
|
|
|
2856
2841
|
* Значение с которым сравнивается поле.
|
|
2857
2842
|
*/
|
|
2858
2843
|
t(this, "value");
|
|
2859
|
-
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ??
|
|
2844
|
+
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? Je.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
|
|
2860
2845
|
}
|
|
2861
2846
|
/**
|
|
2862
2847
|
* Преобразует фильтр в примитивное представление для API.
|
|
@@ -2864,11 +2849,14 @@ class Ye {
|
|
|
2864
2849
|
* @returns Примитивное представление фильтра.
|
|
2865
2850
|
*/
|
|
2866
2851
|
toPrimitive() {
|
|
2867
|
-
const r = {
|
|
2852
|
+
const r = L().config.dateFormats.api, e = {
|
|
2868
2853
|
field: this.field,
|
|
2869
2854
|
op: this.op
|
|
2870
2855
|
};
|
|
2871
|
-
return
|
|
2856
|
+
return xe(this.value) ? e.value = a(this.value, r) : He(this.value) ? e.value = {
|
|
2857
|
+
from: this.value.from ? a(this.value.from, r) : null,
|
|
2858
|
+
to: this.value.to ? a(this.value.to, r) : null
|
|
2859
|
+
} : e.value = this.value, e;
|
|
2872
2860
|
}
|
|
2873
2861
|
}
|
|
2874
2862
|
class j {
|
|
@@ -2891,7 +2879,7 @@ class j {
|
|
|
2891
2879
|
*/
|
|
2892
2880
|
t(this, "groups");
|
|
2893
2881
|
var e, s;
|
|
2894
|
-
this.groupOp = (r == null ? void 0 : r.groupOp) ?? "and", this.filters = ((e = r == null ? void 0 : r.filters) == null ? void 0 : e.map((i) => new
|
|
2882
|
+
this.groupOp = (r == null ? void 0 : r.groupOp) ?? "and", this.filters = ((e = r == null ? void 0 : r.filters) == null ? void 0 : e.map((i) => new Xe(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new j(i))) ?? [];
|
|
2895
2883
|
}
|
|
2896
2884
|
/**
|
|
2897
2885
|
* Преобразует группу фильтров в примитивное представление для API.
|
|
@@ -2901,12 +2889,12 @@ class j {
|
|
|
2901
2889
|
toPrimitive() {
|
|
2902
2890
|
return {
|
|
2903
2891
|
groupOp: this.groupOp,
|
|
2904
|
-
filters: this.filters.map((r) => r instanceof
|
|
2892
|
+
filters: this.filters.map((r) => r instanceof Xe && Ue(r.toPrimitive) ? r.toPrimitive() : r),
|
|
2905
2893
|
groups: this.groups.map((r) => r instanceof j ? r.toPrimitive() : r)
|
|
2906
2894
|
};
|
|
2907
2895
|
}
|
|
2908
2896
|
}
|
|
2909
|
-
class De extends
|
|
2897
|
+
class De extends h {
|
|
2910
2898
|
/**
|
|
2911
2899
|
* Получает пагинированный список данных.
|
|
2912
2900
|
*
|
|
@@ -2919,12 +2907,12 @@ class De extends p {
|
|
|
2919
2907
|
* @param disableDefaultNotificationErrorResponseHandler Признак отключения стандартного обработчика ошибок.
|
|
2920
2908
|
* @param signal Сигнал отмены запроса.
|
|
2921
2909
|
*/
|
|
2922
|
-
getPaginated(r, e, s, i, o, c, u,
|
|
2910
|
+
getPaginated(r, e, s, i, o, c, u, p = void 0) {
|
|
2923
2911
|
let m = {
|
|
2924
2912
|
page: (i == null ? void 0 : i.page) ?? 1,
|
|
2925
2913
|
perPage: (i == null ? void 0 : i.pageSize) ?? 10
|
|
2926
2914
|
};
|
|
2927
|
-
return e && (m.filters = JSON.stringify((e instanceof j ? e : new j(e)).toPrimitive())), Y(s) || (m.sort = H(s) ? s : [s]), o && (m = { ...m, ...o }), this.get(r, m, c, u,
|
|
2915
|
+
return e && (m.filters = JSON.stringify((e instanceof j ? e : new j(e)).toPrimitive())), Y(s) || (m.sort = H(s) ? s : [s]), o && (m = { ...m, ...o }), this.get(r, m, c, u, p);
|
|
2928
2916
|
}
|
|
2929
2917
|
}
|
|
2930
2918
|
class Xt extends De {
|
|
@@ -3131,7 +3119,7 @@ class Xt extends De {
|
|
|
3131
3119
|
);
|
|
3132
3120
|
}
|
|
3133
3121
|
}
|
|
3134
|
-
class Zt extends
|
|
3122
|
+
class Zt extends h {
|
|
3135
3123
|
/**
|
|
3136
3124
|
* Возвращает список ролей ценообразования.
|
|
3137
3125
|
*
|
|
@@ -3192,7 +3180,7 @@ class Zt extends p {
|
|
|
3192
3180
|
return this.get(
|
|
3193
3181
|
`/internal/price/roles/rules/categories/${r}`,
|
|
3194
3182
|
{},
|
|
3195
|
-
(e) => e.data.map((s) => new
|
|
3183
|
+
(e) => e.data.map((s) => new Ye(s))
|
|
3196
3184
|
);
|
|
3197
3185
|
}
|
|
3198
3186
|
/**
|
|
@@ -3207,7 +3195,7 @@ class Zt extends p {
|
|
|
3207
3195
|
return this.patch(
|
|
3208
3196
|
`/internal/price/roles/rules/categories/${r}`,
|
|
3209
3197
|
e,
|
|
3210
|
-
(s) => s.data.map((i) => new
|
|
3198
|
+
(s) => s.data.map((i) => new Ye(i))
|
|
3211
3199
|
);
|
|
3212
3200
|
}
|
|
3213
3201
|
}
|
|
@@ -3583,7 +3571,7 @@ class es extends De {
|
|
|
3583
3571
|
return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
|
|
3584
3572
|
}
|
|
3585
3573
|
}
|
|
3586
|
-
class rs extends
|
|
3574
|
+
class rs extends h {
|
|
3587
3575
|
/**
|
|
3588
3576
|
* Возвращает список данных о корневых категориях указанного шаблона прайс-листа.
|
|
3589
3577
|
*
|
|
@@ -3599,7 +3587,7 @@ class rs extends p {
|
|
|
3599
3587
|
priceTemplateId: r,
|
|
3600
3588
|
showHidden: e
|
|
3601
3589
|
},
|
|
3602
|
-
(s) => s.data.map((i) => new
|
|
3590
|
+
(s) => s.data.map((i) => new q(i))
|
|
3603
3591
|
);
|
|
3604
3592
|
}
|
|
3605
3593
|
/**
|
|
@@ -3620,7 +3608,7 @@ class rs extends p {
|
|
|
3620
3608
|
showHidden: s,
|
|
3621
3609
|
withNestedCategories: i
|
|
3622
3610
|
},
|
|
3623
|
-
(o) => new
|
|
3611
|
+
(o) => new q(o.data)
|
|
3624
3612
|
);
|
|
3625
3613
|
}
|
|
3626
3614
|
/**
|
|
@@ -3645,7 +3633,7 @@ class rs extends p {
|
|
|
3645
3633
|
);
|
|
3646
3634
|
}
|
|
3647
3635
|
}
|
|
3648
|
-
function
|
|
3636
|
+
function Ze(n, r, e) {
|
|
3649
3637
|
let s;
|
|
3650
3638
|
return n.some((i) => {
|
|
3651
3639
|
if (i.type === e && i.id === r)
|
|
@@ -3654,84 +3642,28 @@ function Xe(n, r, e) {
|
|
|
3654
3642
|
return !1;
|
|
3655
3643
|
const o = i;
|
|
3656
3644
|
if (o.products && o.products.length > 0) {
|
|
3657
|
-
const c =
|
|
3645
|
+
const c = Ze(o.products, r, e);
|
|
3658
3646
|
if (c)
|
|
3659
3647
|
return s = c, !0;
|
|
3660
3648
|
}
|
|
3661
3649
|
if (o.categories && o.categories.length > 0) {
|
|
3662
|
-
const c =
|
|
3650
|
+
const c = Ze(o.categories, r, e);
|
|
3663
3651
|
if (c)
|
|
3664
3652
|
return s = c, !0;
|
|
3665
3653
|
}
|
|
3666
3654
|
return !1;
|
|
3667
3655
|
}), s;
|
|
3668
3656
|
}
|
|
3669
|
-
function
|
|
3657
|
+
function er(n) {
|
|
3670
3658
|
const r = [];
|
|
3671
3659
|
return n.forEach((e) => {
|
|
3672
3660
|
if (r.push(e), e.type === "category") {
|
|
3673
3661
|
const s = e;
|
|
3674
|
-
s.products && s.products.length > 0 && r.push(...
|
|
3662
|
+
s.products && s.products.length > 0 && r.push(...er(s.products)), s.categories && s.categories.length > 0 && r.push(...er(s.categories));
|
|
3675
3663
|
}
|
|
3676
3664
|
}), r;
|
|
3677
3665
|
}
|
|
3678
|
-
var
|
|
3679
|
-
class gt extends R {
|
|
3680
|
-
}
|
|
3681
|
-
class Cr extends R {
|
|
3682
|
-
}
|
|
3683
|
-
class ts extends R {
|
|
3684
|
-
}
|
|
3685
|
-
class mt extends R {
|
|
3686
|
-
}
|
|
3687
|
-
class G extends R {
|
|
3688
|
-
/**
|
|
3689
|
-
* Возвращает сгенерированную запись-описание физического лица.
|
|
3690
|
-
*/
|
|
3691
|
-
static generatePersonItem() {
|
|
3692
|
-
return new G({
|
|
3693
|
-
id: 1,
|
|
3694
|
-
guid: "",
|
|
3695
|
-
slug: q.Person,
|
|
3696
|
-
name: ""
|
|
3697
|
-
});
|
|
3698
|
-
}
|
|
3699
|
-
}
|
|
3700
|
-
class Rr extends R {
|
|
3701
|
-
}
|
|
3702
|
-
class ft extends R {
|
|
3703
|
-
}
|
|
3704
|
-
class yt extends R {
|
|
3705
|
-
}
|
|
3706
|
-
class Z extends R {
|
|
3707
|
-
}
|
|
3708
|
-
class Pr extends R {
|
|
3709
|
-
}
|
|
3710
|
-
class wt extends R {
|
|
3711
|
-
}
|
|
3712
|
-
class ss {
|
|
3713
|
-
/**
|
|
3714
|
-
* Генерирует и возвращает данные-заглушку неопределённой записи справочника.
|
|
3715
|
-
*
|
|
3716
|
-
* @param Ctor Конструктор конкретного класса справочника.
|
|
3717
|
-
* @param name Название записи.
|
|
3718
|
-
*/
|
|
3719
|
-
static generateUndefinedInstance(r, e = "- Не определён -") {
|
|
3720
|
-
return new r({ id: 0, name: e, slug: "-undefined-" });
|
|
3721
|
-
}
|
|
3722
|
-
/**
|
|
3723
|
-
* Выполняет проверку, является ли указанная запись записью-заглушкой с данными о неопределённой записи справочника.
|
|
3724
|
-
*
|
|
3725
|
-
* @param reference Запись для проверки.
|
|
3726
|
-
*/
|
|
3727
|
-
static isUndefinedInstance(r) {
|
|
3728
|
-
return r.id === 0 && r.slug === "-undefined-";
|
|
3729
|
-
}
|
|
3730
|
-
}
|
|
3731
|
-
class Ar extends R {
|
|
3732
|
-
}
|
|
3733
|
-
class Dr extends R {
|
|
3734
|
-
}
|
|
3666
|
+
var pt = /* @__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))(pt || {}), N = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(N || {});
|
|
3735
3667
|
class qe extends ee {
|
|
3736
3668
|
/**
|
|
3737
3669
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
@@ -3759,8 +3691,8 @@ class qe extends ee {
|
|
|
3759
3691
|
/**
|
|
3760
3692
|
* Данные о валюте.
|
|
3761
3693
|
*/
|
|
3762
|
-
t(this, "currency", new
|
|
3763
|
-
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new
|
|
3694
|
+
t(this, "currency", new O());
|
|
3695
|
+
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new O(e.currency));
|
|
3764
3696
|
}
|
|
3765
3697
|
}
|
|
3766
3698
|
class Ne extends k {
|
|
@@ -3782,7 +3714,7 @@ class Ne extends k {
|
|
|
3782
3714
|
this.email = e == null ? void 0 : e.email, this.phone = /^\d+$/.test((e == null ? void 0 : e.phone) ?? "") ? `+${e == null ? void 0 : e.phone}` : e == null ? void 0 : e.phone;
|
|
3783
3715
|
}
|
|
3784
3716
|
}
|
|
3785
|
-
class
|
|
3717
|
+
class G extends Ne {
|
|
3786
3718
|
/**
|
|
3787
3719
|
* Инициализирует экземпляр класса {@link ContactPerson}.
|
|
3788
3720
|
*
|
|
@@ -3817,7 +3749,22 @@ class B extends Ne {
|
|
|
3817
3749
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1, this.position = e == null ? void 0 : e.position, this.notDisturb = (e == null ? void 0 : e.notDisturb) ?? !1, this.comment = e == null ? void 0 : e.comment, this.updatedAt = e == null ? void 0 : e.updatedAt, this.deletedAt = v(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
3818
3750
|
}
|
|
3819
3751
|
}
|
|
3820
|
-
class
|
|
3752
|
+
class B extends R {
|
|
3753
|
+
/**
|
|
3754
|
+
* Возвращает сгенерированную запись-описание физического лица.
|
|
3755
|
+
*/
|
|
3756
|
+
static generatePersonItem() {
|
|
3757
|
+
return new B({
|
|
3758
|
+
id: 1,
|
|
3759
|
+
guid: "",
|
|
3760
|
+
slug: N.Person,
|
|
3761
|
+
name: ""
|
|
3762
|
+
});
|
|
3763
|
+
}
|
|
3764
|
+
}
|
|
3765
|
+
class Z extends R {
|
|
3766
|
+
}
|
|
3767
|
+
class Cr extends k {
|
|
3821
3768
|
/**
|
|
3822
3769
|
* Инициализирует экземпляр класса {@link ContragentBase}.
|
|
3823
3770
|
*
|
|
@@ -3829,7 +3776,7 @@ class Tr extends k {
|
|
|
3829
3776
|
/**
|
|
3830
3777
|
* Данные об организационно-правовой форме.
|
|
3831
3778
|
*/
|
|
3832
|
-
t(this, "opf",
|
|
3779
|
+
t(this, "opf", B.generatePersonItem());
|
|
3833
3780
|
/**
|
|
3834
3781
|
* Группа партнеров (направление деятельности).
|
|
3835
3782
|
*/
|
|
@@ -3867,10 +3814,10 @@ class Tr extends k {
|
|
|
3867
3814
|
*/
|
|
3868
3815
|
t(this, "updater");
|
|
3869
3816
|
if (e) {
|
|
3870
|
-
if (this.opf = new
|
|
3817
|
+
if (this.opf = new B(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 x(e.creator) : void 0, this.updatedAt = v(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new x(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new Z(e.partnerGroup)), e.contacts) {
|
|
3871
3818
|
const s = [];
|
|
3872
3819
|
e.contacts.forEach((i) => {
|
|
3873
|
-
s.push(new
|
|
3820
|
+
s.push(new G(i));
|
|
3874
3821
|
}), this.contacts = s;
|
|
3875
3822
|
}
|
|
3876
3823
|
if (e.bankAccounts) {
|
|
@@ -3882,7 +3829,7 @@ class Tr extends k {
|
|
|
3882
3829
|
}
|
|
3883
3830
|
}
|
|
3884
3831
|
}
|
|
3885
|
-
class
|
|
3832
|
+
class ht extends Cr {
|
|
3886
3833
|
/**
|
|
3887
3834
|
* Инициализирует экземпляр класса {@link ContragentPerson}.
|
|
3888
3835
|
*
|
|
@@ -3892,7 +3839,7 @@ class vt extends Tr {
|
|
|
3892
3839
|
super(r);
|
|
3893
3840
|
}
|
|
3894
3841
|
}
|
|
3895
|
-
class
|
|
3842
|
+
class Rr extends Cr {
|
|
3896
3843
|
/**
|
|
3897
3844
|
* Инициализирует экземпляр класса {@link ContragentIc}.
|
|
3898
3845
|
*
|
|
@@ -3935,7 +3882,7 @@ class $r extends Tr {
|
|
|
3935
3882
|
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 ?? "");
|
|
3936
3883
|
}
|
|
3937
3884
|
}
|
|
3938
|
-
class
|
|
3885
|
+
class Pr extends Rr {
|
|
3939
3886
|
/**
|
|
3940
3887
|
* Инициализирует экземпляр класса {@link ContragentUlR}.
|
|
3941
3888
|
*
|
|
@@ -3950,7 +3897,7 @@ class br extends $r {
|
|
|
3950
3897
|
e && (this.kpp = e.kpp ?? "");
|
|
3951
3898
|
}
|
|
3952
3899
|
}
|
|
3953
|
-
class
|
|
3900
|
+
class gt extends Pr {
|
|
3954
3901
|
/**
|
|
3955
3902
|
* Инициализирует экземпляр класса {@link ContragentUlNr}.
|
|
3956
3903
|
*
|
|
@@ -3981,61 +3928,33 @@ class Ce {
|
|
|
3981
3928
|
*/
|
|
3982
3929
|
static createInstance(r) {
|
|
3983
3930
|
switch (r.opf.slug) {
|
|
3984
|
-
case
|
|
3985
|
-
return new
|
|
3986
|
-
case
|
|
3987
|
-
return new
|
|
3988
|
-
case
|
|
3989
|
-
return new
|
|
3931
|
+
case N.Ic:
|
|
3932
|
+
return new Rr(r);
|
|
3933
|
+
case N.UlR:
|
|
3934
|
+
return new Pr(r);
|
|
3935
|
+
case N.UlNr:
|
|
3936
|
+
return new gt(r);
|
|
3990
3937
|
default:
|
|
3991
|
-
return new
|
|
3938
|
+
return new ht(r);
|
|
3992
3939
|
}
|
|
3993
3940
|
}
|
|
3994
3941
|
}
|
|
3995
|
-
class
|
|
3996
|
-
/**
|
|
3997
|
-
* Инициализирует экземпляр класса {@link ContactRelation}.
|
|
3998
|
-
*
|
|
3999
|
-
* @param data Данные для первоначальной инициализации.
|
|
4000
|
-
*/
|
|
4001
|
-
constructor(e) {
|
|
4002
|
-
super(e);
|
|
4003
|
-
/**
|
|
4004
|
-
* Признак того, что контакт является основным.
|
|
4005
|
-
*/
|
|
4006
|
-
t(this, "isPrimary");
|
|
4007
|
-
this.isPrimary = e.isPrimary;
|
|
4008
|
-
}
|
|
4009
|
-
}
|
|
4010
|
-
class Rt extends B {
|
|
3942
|
+
class mt extends lr {
|
|
4011
3943
|
/**
|
|
4012
|
-
* Инициализирует экземпляр класса {@link
|
|
3944
|
+
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
4013
3945
|
*
|
|
4014
3946
|
* @param data Данные для первоначальной инициализации.
|
|
4015
3947
|
*/
|
|
4016
3948
|
constructor(e) {
|
|
4017
3949
|
super(e);
|
|
4018
3950
|
/**
|
|
4019
|
-
*
|
|
3951
|
+
* Дата и время последнего удаления.
|
|
4020
3952
|
*/
|
|
4021
|
-
t(this, "
|
|
4022
|
-
|
|
4023
|
-
* Список клиентов, с которыми связано контактное лицо.
|
|
4024
|
-
*/
|
|
4025
|
-
clients: [],
|
|
4026
|
-
/**
|
|
4027
|
-
* Список контрагентов, с которыми связано контактное лицо.
|
|
4028
|
-
*/
|
|
4029
|
-
contragents: [],
|
|
4030
|
-
/**
|
|
4031
|
-
* Список адресов доставки, с которыми связано контактное лицо.
|
|
4032
|
-
*/
|
|
4033
|
-
addresses: []
|
|
4034
|
-
});
|
|
4035
|
-
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new Ie(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new Ie(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new Ie(s))));
|
|
3953
|
+
t(this, "deletedAt");
|
|
3954
|
+
this.deletedAt = v(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
4036
3955
|
}
|
|
4037
3956
|
}
|
|
4038
|
-
class Re extends
|
|
3957
|
+
class Re extends mt {
|
|
4039
3958
|
/**
|
|
4040
3959
|
* Инициализирует экземпляр класса {@link DeliveryAddress}.
|
|
4041
3960
|
*
|
|
@@ -4072,10 +3991,14 @@ class Re extends tt {
|
|
|
4072
3991
|
* Признак того, что указанный адрес является адресом транспортной компании.
|
|
4073
3992
|
*/
|
|
4074
3993
|
t(this, "isTransportCompanyAddress");
|
|
4075
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new
|
|
3994
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new pr(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new G(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
3995
|
}
|
|
4077
3996
|
}
|
|
4078
|
-
class
|
|
3997
|
+
class Ar extends R {
|
|
3998
|
+
}
|
|
3999
|
+
class Dr extends R {
|
|
4000
|
+
}
|
|
4001
|
+
class rr extends re {
|
|
4079
4002
|
/**
|
|
4080
4003
|
* Инициализирует экземпляр класса {@link Client}.
|
|
4081
4004
|
*
|
|
@@ -4125,10 +4048,10 @@ class er extends re {
|
|
|
4125
4048
|
* @inheritDoc
|
|
4126
4049
|
*/
|
|
4127
4050
|
t(this, "extraData");
|
|
4128
|
-
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => Ce.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
|
|
4051
|
+
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => Ce.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 G(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new Re(u))) ?? [], this.channelPrimaryInterest = new Ar(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Dr(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new U(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
4052
|
}
|
|
4130
4053
|
}
|
|
4131
|
-
class
|
|
4054
|
+
class Tr {
|
|
4132
4055
|
/**
|
|
4133
4056
|
* Возвращает очищенное значение фильтров, содержащие
|
|
4134
4057
|
* только актуальные данные.
|
|
@@ -4137,19 +4060,19 @@ class Sr {
|
|
|
4137
4060
|
const r = {};
|
|
4138
4061
|
return Object.keys(this).forEach((e) => {
|
|
4139
4062
|
const s = this[e];
|
|
4140
|
-
|
|
4063
|
+
$(s) || // eslint-disable-next-line prettier/prettier,lodash/prefer-lodash-method
|
|
4141
4064
|
v(s) && s.trim().length === 0 || Ue(s.isNewRec) && s.isNewRec() || (r[e] = s);
|
|
4142
4065
|
}), r;
|
|
4143
4066
|
}
|
|
4144
4067
|
}
|
|
4145
|
-
class
|
|
4068
|
+
class ts extends Tr {
|
|
4146
4069
|
/**
|
|
4147
4070
|
* Инициализирует экземпляр класса {@link ClientsListFilters}.
|
|
4148
4071
|
*
|
|
4149
4072
|
* @param data Данные для первоначальной инициализации.
|
|
4150
4073
|
*/
|
|
4151
4074
|
constructor(e) {
|
|
4152
|
-
var s, i, o, c, u,
|
|
4075
|
+
var s, i, o, c, u, p, m, f;
|
|
4153
4076
|
super();
|
|
4154
4077
|
/**
|
|
4155
4078
|
* @inheritDoc
|
|
@@ -4194,11 +4117,11 @@ class is extends Sr {
|
|
|
4194
4117
|
/**
|
|
4195
4118
|
* @inheritDoc
|
|
4196
4119
|
*/
|
|
4197
|
-
t(this, "createdAt", new
|
|
4120
|
+
t(this, "createdAt", new T());
|
|
4198
4121
|
/**
|
|
4199
4122
|
* @inheritDoc
|
|
4200
4123
|
*/
|
|
4201
|
-
t(this, "lastLoginDate", new
|
|
4124
|
+
t(this, "lastLoginDate", new T());
|
|
4202
4125
|
/**
|
|
4203
4126
|
* @inheritDoc
|
|
4204
4127
|
*/
|
|
@@ -4247,11 +4170,15 @@ class is extends Sr {
|
|
|
4247
4170
|
* @inheritDoc
|
|
4248
4171
|
*/
|
|
4249
4172
|
t(this, "lastOrder");
|
|
4250
|
-
|
|
4251
|
-
|
|
4173
|
+
/**
|
|
4174
|
+
* @inheritDoc
|
|
4175
|
+
*/
|
|
4176
|
+
t(this, "noOrdersPeriod", new T());
|
|
4177
|
+
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 T(e == null ? void 0 : e.createdAt), this.lastLoginDate = new T(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 fe(D))) ?? [], this.includeSubordinateManagers = (e == null ? void 0 : e.includeSubordinateManagers) ?? !0, this.curators = ((o = e == null ? void 0 : e.curators) == null ? void 0 : o.map((D) => new We(D))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((D) => new _(D)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new B(e == null ? void 0 : e.contragentType), this.preferredDeliveryType = e != null && e.preferredDeliveryType ? new U(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 = {
|
|
4178
|
+
createdAt: new T((p = e == null ? void 0 : e.lastOrder) == null ? void 0 : p.createdAt),
|
|
4252
4179
|
creator: (m = e == null ? void 0 : e.lastOrder) == null ? void 0 : m.creator,
|
|
4253
4180
|
isApproved: (f = e == null ? void 0 : e.lastOrder) == null ? void 0 : f.isApproved
|
|
4254
|
-
};
|
|
4181
|
+
}, this.noOrdersPeriod = new T(e == null ? void 0 : e.noOrdersPeriod);
|
|
4255
4182
|
}
|
|
4256
4183
|
/**
|
|
4257
4184
|
* @inheritDoc
|
|
@@ -4273,6 +4200,9 @@ class is extends Sr {
|
|
|
4273
4200
|
case "lastLoginDate":
|
|
4274
4201
|
this.lastLoginDate.from = null, this.lastLoginDate.to = null;
|
|
4275
4202
|
break;
|
|
4203
|
+
case "noOrdersPeriod":
|
|
4204
|
+
this.noOrdersPeriod.from = null, this.noOrdersPeriod.to = null;
|
|
4205
|
+
break;
|
|
4276
4206
|
case "lastOrder":
|
|
4277
4207
|
this.lastOrder = {};
|
|
4278
4208
|
break;
|
|
@@ -4286,10 +4216,10 @@ class is extends Sr {
|
|
|
4286
4216
|
this.salesDirections = [];
|
|
4287
4217
|
break;
|
|
4288
4218
|
case "contragentType":
|
|
4289
|
-
this.contragentType = new
|
|
4219
|
+
this.contragentType = new B();
|
|
4290
4220
|
break;
|
|
4291
4221
|
case "preferredDeliveryType":
|
|
4292
|
-
this.preferredDeliveryType = new
|
|
4222
|
+
this.preferredDeliveryType = new U();
|
|
4293
4223
|
break;
|
|
4294
4224
|
case "partnerGroups":
|
|
4295
4225
|
this.partnerGroups = [];
|
|
@@ -4307,12 +4237,12 @@ class is extends Sr {
|
|
|
4307
4237
|
* @inheritDoc
|
|
4308
4238
|
*/
|
|
4309
4239
|
asClearRaw() {
|
|
4310
|
-
var s, i, o, c;
|
|
4240
|
+
var s, i, o, c, u, p;
|
|
4311
4241
|
const e = super.asClearRaw();
|
|
4312
|
-
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;
|
|
4242
|
+
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, !((u = e == null ? void 0 : e.noOrdersPeriod) != null && u.from) && !((p = e == null ? void 0 : e.noOrdersPeriod) != null && p.to) && delete e.noOrdersPeriod, e;
|
|
4313
4243
|
}
|
|
4314
4244
|
}
|
|
4315
|
-
class
|
|
4245
|
+
class $r extends ee {
|
|
4316
4246
|
/**
|
|
4317
4247
|
* Инициализирует экземпляр класса {@link OrderShortInfo}.
|
|
4318
4248
|
*
|
|
@@ -4335,7 +4265,7 @@ class kr extends ee {
|
|
|
4335
4265
|
this.createdAt = v(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new x(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
|
|
4336
4266
|
}
|
|
4337
4267
|
}
|
|
4338
|
-
class
|
|
4268
|
+
class ft extends k {
|
|
4339
4269
|
/**
|
|
4340
4270
|
* Инициализирует экземпляр класса {@link ClientAdditionalData}.
|
|
4341
4271
|
*
|
|
@@ -4372,74 +4302,50 @@ class Pt extends k {
|
|
|
4372
4302
|
* @inheritDoc
|
|
4373
4303
|
*/
|
|
4374
4304
|
t(this, "curators");
|
|
4375
|
-
this.contacts = ((s = e.contacts) == null ? void 0 : s.map((u) => new
|
|
4376
|
-
}
|
|
4377
|
-
}
|
|
4378
|
-
class At {
|
|
4379
|
-
/**
|
|
4380
|
-
* Инициализирует экземпляр класса {@link DataTablePaginationRequestParams}.
|
|
4381
|
-
*
|
|
4382
|
-
* @param data Данные для первоначальной инициализации.
|
|
4383
|
-
*/
|
|
4384
|
-
constructor(r) {
|
|
4385
|
-
/**
|
|
4386
|
-
* Номер текущей страницы.
|
|
4387
|
-
*/
|
|
4388
|
-
t(this, "page", 1);
|
|
4389
|
-
/**
|
|
4390
|
-
* Количество записей на странице.
|
|
4391
|
-
*/
|
|
4392
|
-
t(this, "pageSize", 50);
|
|
4393
|
-
this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
|
|
4305
|
+
this.contacts = ((s = e.contacts) == null ? void 0 : s.map((u) => new G(u))) ?? void 0, this.lastOrder = e.lastOrder ? new $r(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 U(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new _(e.salesDirection) : void 0, this.managers = ((o = e.managers) == null ? void 0 : o.map((u) => new Be(u))) ?? void 0, this.curators = ((c = e.curators) == null ? void 0 : c.map((u) => new We(u))) ?? void 0;
|
|
4394
4306
|
}
|
|
4395
4307
|
}
|
|
4396
|
-
class
|
|
4308
|
+
class Ie extends ee {
|
|
4397
4309
|
/**
|
|
4398
|
-
* Инициализирует экземпляр класса {@link
|
|
4310
|
+
* Инициализирует экземпляр класса {@link ContactRelation}.
|
|
4399
4311
|
*
|
|
4400
4312
|
* @param data Данные для первоначальной инициализации.
|
|
4401
4313
|
*/
|
|
4402
4314
|
constructor(e) {
|
|
4403
4315
|
super(e);
|
|
4404
4316
|
/**
|
|
4405
|
-
*
|
|
4406
|
-
*/
|
|
4407
|
-
t(this, "itemCount", 0);
|
|
4408
|
-
/**
|
|
4409
|
-
* Число страниц с данными.
|
|
4410
|
-
*/
|
|
4411
|
-
t(this, "pageCount", 1);
|
|
4412
|
-
/**
|
|
4413
|
-
* Число отображаемых номеров страниц.
|
|
4414
|
-
*/
|
|
4415
|
-
t(this, "pageSlot", 5);
|
|
4416
|
-
/**
|
|
4417
|
-
* Значения для выпадающего списка "Количество записей на странице".
|
|
4418
|
-
*/
|
|
4419
|
-
t(this, "pageSizes", [25, 50, 100]);
|
|
4420
|
-
/**
|
|
4421
|
-
* Признак необходимости отображать список выбора числа отображаемых записей.
|
|
4317
|
+
* Признак того, что контакт является основным.
|
|
4422
4318
|
*/
|
|
4423
|
-
t(this, "
|
|
4424
|
-
this.
|
|
4319
|
+
t(this, "isPrimary");
|
|
4320
|
+
this.isPrimary = e.isPrimary;
|
|
4425
4321
|
}
|
|
4426
4322
|
}
|
|
4427
|
-
class
|
|
4323
|
+
class yt extends G {
|
|
4428
4324
|
/**
|
|
4429
|
-
* Инициализирует экземпляр класса {@link
|
|
4325
|
+
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
4430
4326
|
*
|
|
4431
4327
|
* @param data Данные для первоначальной инициализации.
|
|
4432
4328
|
*/
|
|
4433
|
-
constructor(
|
|
4434
|
-
|
|
4435
|
-
* Поле по которому необходимо выполнить сортировку
|
|
4436
|
-
*/
|
|
4437
|
-
t(this, "field");
|
|
4329
|
+
constructor(e) {
|
|
4330
|
+
super(e);
|
|
4438
4331
|
/**
|
|
4439
|
-
*
|
|
4332
|
+
* Список связей контактного лица с сущностями.
|
|
4440
4333
|
*/
|
|
4441
|
-
t(this, "
|
|
4442
|
-
|
|
4334
|
+
t(this, "relations", {
|
|
4335
|
+
/**
|
|
4336
|
+
* Список клиентов, с которыми связано контактное лицо.
|
|
4337
|
+
*/
|
|
4338
|
+
clients: [],
|
|
4339
|
+
/**
|
|
4340
|
+
* Список контрагентов, с которыми связано контактное лицо.
|
|
4341
|
+
*/
|
|
4342
|
+
contragents: [],
|
|
4343
|
+
/**
|
|
4344
|
+
* Список адресов доставки, с которыми связано контактное лицо.
|
|
4345
|
+
*/
|
|
4346
|
+
addresses: []
|
|
4347
|
+
});
|
|
4348
|
+
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new Ie(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new Ie(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new Ie(s))));
|
|
4443
4349
|
}
|
|
4444
4350
|
}
|
|
4445
4351
|
class d extends De {
|
|
@@ -4470,11 +4376,11 @@ class d extends De {
|
|
|
4470
4376
|
* @param contragent Данные о контрагенте клиента.
|
|
4471
4377
|
*/
|
|
4472
4378
|
static transformContragentClientDataToRequest(r) {
|
|
4473
|
-
var c, u,
|
|
4379
|
+
var c, u, p, m;
|
|
4474
4380
|
let e;
|
|
4475
4381
|
const s = r, i = r, o = r;
|
|
4476
4382
|
switch (r.opf.slug) {
|
|
4477
|
-
case
|
|
4383
|
+
case N.Ic:
|
|
4478
4384
|
e = {
|
|
4479
4385
|
opf: s.opf.slug,
|
|
4480
4386
|
name: s.name,
|
|
@@ -4491,7 +4397,7 @@ class d extends De {
|
|
|
4491
4397
|
actual_address: s.actualAddress
|
|
4492
4398
|
};
|
|
4493
4399
|
break;
|
|
4494
|
-
case
|
|
4400
|
+
case N.UlR:
|
|
4495
4401
|
e = {
|
|
4496
4402
|
opf: i.opf.slug,
|
|
4497
4403
|
name: i.name,
|
|
@@ -4509,12 +4415,12 @@ class d extends De {
|
|
|
4509
4415
|
actual_address: i.actualAddress
|
|
4510
4416
|
};
|
|
4511
4417
|
break;
|
|
4512
|
-
case
|
|
4418
|
+
case N.UlNr:
|
|
4513
4419
|
e = {
|
|
4514
4420
|
opf: o.opf.slug,
|
|
4515
4421
|
name: o.name,
|
|
4516
4422
|
alternative_name: o.alternativeName,
|
|
4517
|
-
partner_group_id: (
|
|
4423
|
+
partner_group_id: (p = o.partnerGroup) == null ? void 0 : p.id,
|
|
4518
4424
|
comment: o.comment,
|
|
4519
4425
|
director_name: o.directorName,
|
|
4520
4426
|
director_position: o.directorPosition,
|
|
@@ -4581,7 +4487,7 @@ class d extends De {
|
|
|
4581
4487
|
* @see /doc/api/internal#/Клиенты/api_internal_client_get_full_info
|
|
4582
4488
|
*/
|
|
4583
4489
|
getClient(r) {
|
|
4584
|
-
return this.get(`/internal/clients/${r}`, {}, (e) => new
|
|
4490
|
+
return this.get(`/internal/clients/${r}`, {}, (e) => new rr(e.data));
|
|
4585
4491
|
}
|
|
4586
4492
|
/**
|
|
4587
4493
|
* Возвращает данные о клиентах, удовлетворяющих указанным параметрам поиска.
|
|
@@ -4603,7 +4509,7 @@ class d extends De {
|
|
|
4603
4509
|
i,
|
|
4604
4510
|
(c) => {
|
|
4605
4511
|
const u = { ...c.data };
|
|
4606
|
-
return u.data = u.data.map((
|
|
4512
|
+
return u.data = u.data.map((p) => new re(p)), u;
|
|
4607
4513
|
},
|
|
4608
4514
|
void 0,
|
|
4609
4515
|
o
|
|
@@ -4629,7 +4535,7 @@ class d extends De {
|
|
|
4629
4535
|
return this.getClientsList({
|
|
4630
4536
|
groupOp: "and",
|
|
4631
4537
|
groups: [],
|
|
4632
|
-
filters: [{ field: "phone", op:
|
|
4538
|
+
filters: [{ field: "phone", op: Je.Contains, value: r }]
|
|
4633
4539
|
});
|
|
4634
4540
|
}
|
|
4635
4541
|
/**
|
|
@@ -4643,7 +4549,7 @@ class d extends De {
|
|
|
4643
4549
|
const s = r.map((i) => i.id);
|
|
4644
4550
|
return this.post("/internal/clients/additional-data", { clients: s, requested_data_types: e }, (i) => {
|
|
4645
4551
|
let o = [];
|
|
4646
|
-
return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new
|
|
4552
|
+
return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new ft(c))), o;
|
|
4647
4553
|
});
|
|
4648
4554
|
}
|
|
4649
4555
|
/**
|
|
@@ -4655,7 +4561,7 @@ class d extends De {
|
|
|
4655
4561
|
getAllClientContacts(r) {
|
|
4656
4562
|
return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
|
|
4657
4563
|
let s = [];
|
|
4658
|
-
return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new
|
|
4564
|
+
return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new yt(i))), s;
|
|
4659
4565
|
});
|
|
4660
4566
|
}
|
|
4661
4567
|
/**
|
|
@@ -4666,7 +4572,7 @@ class d extends De {
|
|
|
4666
4572
|
* @see /doc/api/internal#/Клиенты/api_internal_client_create
|
|
4667
4573
|
*/
|
|
4668
4574
|
createClientCommonData(r, e = {}) {
|
|
4669
|
-
return this.post("/internal/clients", d.transformClientDataToRequest(r), (s) => new
|
|
4575
|
+
return this.post("/internal/clients", d.transformClientDataToRequest(r), (s) => new rr(s.data), e);
|
|
4670
4576
|
}
|
|
4671
4577
|
/**
|
|
4672
4578
|
* Обновляет данные указанного клиента.
|
|
@@ -4964,7 +4870,7 @@ class d extends De {
|
|
|
4964
4870
|
comment: e.comment,
|
|
4965
4871
|
not_disturb: e.notDisturb
|
|
4966
4872
|
},
|
|
4967
|
-
(i) => new
|
|
4873
|
+
(i) => new G(i.data),
|
|
4968
4874
|
s
|
|
4969
4875
|
);
|
|
4970
4876
|
}
|
|
@@ -5101,7 +5007,7 @@ class d extends De {
|
|
|
5101
5007
|
comment: e.comment,
|
|
5102
5008
|
...s
|
|
5103
5009
|
};
|
|
5104
|
-
return (c = e.phone) != null && c.length && (o.phone = e.phone), (u = e.email) != null && u.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (
|
|
5010
|
+
return (c = e.phone) != null && c.length && (o.phone = e.phone), (u = e.email) != null && u.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (p) => new G(p.data), i);
|
|
5105
5011
|
}
|
|
5106
5012
|
/**
|
|
5107
5013
|
* Устанавливает признак основного контактного лица.
|
|
@@ -5130,66 +5036,7 @@ class d extends De {
|
|
|
5130
5036
|
return this.get(`/internal/clients/${r.id}/verification/email?email=${r.email}`);
|
|
5131
5037
|
}
|
|
5132
5038
|
}
|
|
5133
|
-
|
|
5134
|
-
/**
|
|
5135
|
-
* Инициализирует экземпляр класса {@link HttpCachedRequester}.
|
|
5136
|
-
*/
|
|
5137
|
-
constructor() {
|
|
5138
|
-
super();
|
|
5139
|
-
/**
|
|
5140
|
-
* Время кэширования данных ответов на запросы (секунд).
|
|
5141
|
-
*/
|
|
5142
|
-
t(this, "responseDataCacheTimeout");
|
|
5143
|
-
this.responseDataCacheTimeout = L().config.http.responseDataCacheTimeout;
|
|
5144
|
-
}
|
|
5145
|
-
/**
|
|
5146
|
-
* Возвращает кэшированные данные.
|
|
5147
|
-
* Если кэшированные данные отсутствуют, то вернет undefined.
|
|
5148
|
-
*
|
|
5149
|
-
* @param key Ключ запроса.
|
|
5150
|
-
*/
|
|
5151
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
5152
|
-
static getCachedResponse(e) {
|
|
5153
|
-
const s = Q.responseDataCache.get(e);
|
|
5154
|
-
if (s && s.validTo > /* @__PURE__ */ new Date())
|
|
5155
|
-
return s.val;
|
|
5156
|
-
}
|
|
5157
|
-
/**
|
|
5158
|
-
* Сохраняет указанные данные из запроса в кэш результатов.
|
|
5159
|
-
*
|
|
5160
|
-
* @param url URL запроса.
|
|
5161
|
-
* @param data Данные для кэширования.
|
|
5162
|
-
*/
|
|
5163
|
-
cacheResponse(e, s) {
|
|
5164
|
-
Q.responseDataCache.set(e, {
|
|
5165
|
-
validTo: Mr(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
|
|
5166
|
-
val: s
|
|
5167
|
-
});
|
|
5168
|
-
}
|
|
5169
|
-
/**
|
|
5170
|
-
* Возвращает {@link Promise} типизированного результата выполнения запроса.
|
|
5171
|
-
*
|
|
5172
|
-
* @param type Тип возвращаемых данных.
|
|
5173
|
-
* @param url URL запроса для получения данных.
|
|
5174
|
-
* @param useResponseDataCache Признак необходимости кэшировать данные ответов на запросы
|
|
5175
|
-
* и использовать в случае аналогичных запросов.
|
|
5176
|
-
* @param params Дополнительные параметры запроса.
|
|
5177
|
-
*/
|
|
5178
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
5179
|
-
getTypedDataArrayRequester(e, s, i = !1, o = {}) {
|
|
5180
|
-
const c = s + (Y(o) ? "" : ` >>> ${JSON.stringify(o)}`), u = i ? Q.getCachedResponse(c) : void 0;
|
|
5181
|
-
return u ? Promise.resolve(u) : this.get(s, o).then((h) => {
|
|
5182
|
-
const m = h.map((f) => Fe.instanceInitializer(e, f));
|
|
5183
|
-
return i && m && this.cacheResponse(s, m), m;
|
|
5184
|
-
});
|
|
5185
|
-
}
|
|
5186
|
-
};
|
|
5187
|
-
/**
|
|
5188
|
-
* Кэш результатов запросов.
|
|
5189
|
-
*/
|
|
5190
|
-
t(Q, "responseDataCache", /* @__PURE__ */ new Map());
|
|
5191
|
-
let pe = Q;
|
|
5192
|
-
class cs extends p {
|
|
5039
|
+
class ss extends h {
|
|
5193
5040
|
/**
|
|
5194
5041
|
* Выполняет проверку занят ли указанный номер телефона.
|
|
5195
5042
|
*
|
|
@@ -5203,7 +5050,7 @@ class cs extends p {
|
|
|
5203
5050
|
});
|
|
5204
5051
|
}
|
|
5205
5052
|
}
|
|
5206
|
-
class
|
|
5053
|
+
class is {
|
|
5207
5054
|
/**
|
|
5208
5055
|
* Инициализирует экземпляр класса {@link VersionConfig}.
|
|
5209
5056
|
*
|
|
@@ -5225,8 +5072,8 @@ class ls {
|
|
|
5225
5072
|
this.date = v(r == null ? void 0 : r.date) ? C(r.date) : (r == null ? void 0 : r.date) ?? /* @__PURE__ */ new Date(), this.name = (r == null ? void 0 : r.name) ?? "", this.version = (r == null ? void 0 : r.version) ?? "0.0.0";
|
|
5226
5073
|
}
|
|
5227
5074
|
}
|
|
5228
|
-
var
|
|
5229
|
-
class
|
|
5075
|
+
var wt = /* @__PURE__ */ ((n) => (n.Kozyrek = "kozyrek", n.Mosquitto = "mosquitto", n.Strip = "strip", n.MetalForDoors = "metal_for_doors", n.Sandwich = "sandwich", n.SandwichM2 = "sandwich_m2", n))(wt || {});
|
|
5076
|
+
class ns extends h {
|
|
5230
5077
|
/**
|
|
5231
5078
|
* Возвращает настройки указанного конфигуратора для указанной категории.
|
|
5232
5079
|
*
|
|
@@ -5317,22 +5164,89 @@ class us extends p {
|
|
|
5317
5164
|
});
|
|
5318
5165
|
}
|
|
5319
5166
|
}
|
|
5320
|
-
class
|
|
5167
|
+
class vt {
|
|
5168
|
+
/**
|
|
5169
|
+
* Инициализирует экземпляр класса {@link TableDataPaginationRequestParams}.
|
|
5170
|
+
*
|
|
5171
|
+
* @param data Данные для первоначальной инициализации.
|
|
5172
|
+
*/
|
|
5173
|
+
constructor(r) {
|
|
5174
|
+
/**
|
|
5175
|
+
* Номер текущей страницы.
|
|
5176
|
+
*/
|
|
5177
|
+
t(this, "page", 1);
|
|
5178
|
+
/**
|
|
5179
|
+
* Количество записей на странице.
|
|
5180
|
+
*/
|
|
5181
|
+
t(this, "pageSize", 50);
|
|
5182
|
+
this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
|
|
5183
|
+
}
|
|
5184
|
+
}
|
|
5185
|
+
class os extends vt {
|
|
5186
|
+
/**
|
|
5187
|
+
* Инициализирует экземпляр класса {@link TableDataPagination}.
|
|
5188
|
+
*
|
|
5189
|
+
* @param data Данные для первоначальной инициализации.
|
|
5190
|
+
*/
|
|
5191
|
+
constructor(e) {
|
|
5192
|
+
super(e);
|
|
5193
|
+
/**
|
|
5194
|
+
* Количество записей в таблице.
|
|
5195
|
+
*/
|
|
5196
|
+
t(this, "itemCount", 0);
|
|
5197
|
+
/**
|
|
5198
|
+
* Число страниц с данными.
|
|
5199
|
+
*/
|
|
5200
|
+
t(this, "pageCount", 1);
|
|
5201
|
+
/**
|
|
5202
|
+
* Число отображаемых номеров страниц.
|
|
5203
|
+
*/
|
|
5204
|
+
t(this, "pageSlot", 5);
|
|
5205
|
+
/**
|
|
5206
|
+
* Значения для выпадающего списка "Количество записей на странице".
|
|
5207
|
+
*/
|
|
5208
|
+
t(this, "pageSizes", [25, 50, 100]);
|
|
5209
|
+
/**
|
|
5210
|
+
* Признак необходимости отображать список выбора числа отображаемых записей.
|
|
5211
|
+
*/
|
|
5212
|
+
t(this, "showSizePicker", !0);
|
|
5213
|
+
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;
|
|
5214
|
+
}
|
|
5215
|
+
}
|
|
5216
|
+
class cs {
|
|
5217
|
+
/**
|
|
5218
|
+
* Инициализирует экземпляр класса {@link ISortRequestParams}.
|
|
5219
|
+
*
|
|
5220
|
+
* @param data Данные для первоначальной инициализации.
|
|
5221
|
+
*/
|
|
5222
|
+
constructor(r) {
|
|
5223
|
+
/**
|
|
5224
|
+
* Поле по которому необходимо выполнить сортировку
|
|
5225
|
+
*/
|
|
5226
|
+
t(this, "field");
|
|
5227
|
+
/**
|
|
5228
|
+
* Направление сортировки.
|
|
5229
|
+
*/
|
|
5230
|
+
t(this, "direction");
|
|
5231
|
+
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
5232
|
+
}
|
|
5233
|
+
}
|
|
5234
|
+
class ls {
|
|
5321
5235
|
/**
|
|
5322
5236
|
* Возвращает диапазон дат по умолчанию.
|
|
5323
5237
|
*/
|
|
5324
5238
|
static defaultDateRanges() {
|
|
5325
|
-
const r =
|
|
5239
|
+
const r = Mr(/* @__PURE__ */ new Date(), 1);
|
|
5326
5240
|
return {
|
|
5327
5241
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
5328
|
-
nextWorkingDay: { label: "Следующий рабочий день", from:
|
|
5329
|
-
today: { label: "Сегодня", from: Oe(), to:
|
|
5330
|
-
yesterday: { label: "Вчера", from:
|
|
5331
|
-
tomorrow: { label: "Завтра", from:
|
|
5242
|
+
nextWorkingDay: { label: "Следующий рабочий день", from: Er(r), to: Jr(r) },
|
|
5243
|
+
today: { label: "Сегодня", from: Oe(), to: Wr() },
|
|
5244
|
+
yesterday: { label: "Вчера", from: zr(), to: Br() },
|
|
5245
|
+
tomorrow: { label: "Завтра", from: Gr(), to: jr() }
|
|
5332
5246
|
};
|
|
5333
5247
|
}
|
|
5334
5248
|
}
|
|
5335
|
-
class
|
|
5249
|
+
class br {
|
|
5336
5250
|
/**
|
|
5337
5251
|
* Возвращает признак, что указанный товар имеет линейную единицу измерения.
|
|
5338
5252
|
*
|
|
@@ -5348,7 +5262,7 @@ class Ir {
|
|
|
5348
5262
|
*/
|
|
5349
5263
|
static getProductMultiplicity(r) {
|
|
5350
5264
|
var e, s;
|
|
5351
|
-
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((s = r.properties) != null && s.minCount) && !
|
|
5265
|
+
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((s = r.properties) != null && s.minCount) && !br.productIsMeasurable(r) ? r.properties.minCount : 1;
|
|
5352
5266
|
}
|
|
5353
5267
|
/**
|
|
5354
5268
|
* Возвращает кратность длины для указанного товара.
|
|
@@ -5360,11 +5274,70 @@ class Ir {
|
|
|
5360
5274
|
return (e = r.properties) != null && e.lengthStep ? r.properties.lengthStep : !((s = r.properties) != null && s.ignoreMinCountCheck) && ((i = r.properties) != null && i.minCount) ? r.properties.minCount : 0.01;
|
|
5361
5275
|
}
|
|
5362
5276
|
}
|
|
5363
|
-
|
|
5277
|
+
const Q = class Q extends h {
|
|
5278
|
+
/**
|
|
5279
|
+
* Инициализирует экземпляр класса {@link HttpCachedRequester}.
|
|
5280
|
+
*/
|
|
5281
|
+
constructor() {
|
|
5282
|
+
super();
|
|
5283
|
+
/**
|
|
5284
|
+
* Время кэширования данных ответов на запросы (секунд).
|
|
5285
|
+
*/
|
|
5286
|
+
t(this, "responseDataCacheTimeout");
|
|
5287
|
+
this.responseDataCacheTimeout = L().config.http.responseDataCacheTimeout;
|
|
5288
|
+
}
|
|
5289
|
+
/**
|
|
5290
|
+
* Возвращает кэшированные данные.
|
|
5291
|
+
* Если кэшированные данные отсутствуют, то вернет undefined.
|
|
5292
|
+
*
|
|
5293
|
+
* @param key Ключ запроса.
|
|
5294
|
+
*/
|
|
5295
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
5296
|
+
static getCachedResponse(e) {
|
|
5297
|
+
const s = Q.responseDataCache.get(e);
|
|
5298
|
+
if (s && s.validTo > /* @__PURE__ */ new Date())
|
|
5299
|
+
return s.val;
|
|
5300
|
+
}
|
|
5301
|
+
/**
|
|
5302
|
+
* Сохраняет указанные данные из запроса в кэш результатов.
|
|
5303
|
+
*
|
|
5304
|
+
* @param url URL запроса.
|
|
5305
|
+
* @param data Данные для кэширования.
|
|
5306
|
+
*/
|
|
5307
|
+
cacheResponse(e, s) {
|
|
5308
|
+
Q.responseDataCache.set(e, {
|
|
5309
|
+
validTo: Vr(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
|
|
5310
|
+
val: s
|
|
5311
|
+
});
|
|
5312
|
+
}
|
|
5313
|
+
/**
|
|
5314
|
+
* Возвращает {@link Promise} типизированного результата выполнения запроса.
|
|
5315
|
+
*
|
|
5316
|
+
* @param type Тип возвращаемых данных.
|
|
5317
|
+
* @param url URL запроса для получения данных.
|
|
5318
|
+
* @param useResponseDataCache Признак необходимости кэшировать данные ответов на запросы
|
|
5319
|
+
* и использовать в случае аналогичных запросов.
|
|
5320
|
+
* @param params Дополнительные параметры запроса.
|
|
5321
|
+
*/
|
|
5322
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
5323
|
+
getTypedDataArrayRequester(e, s, i = !1, o = {}) {
|
|
5324
|
+
const c = s + (Y(o) ? "" : ` >>> ${JSON.stringify(o)}`), u = i ? Q.getCachedResponse(c) : void 0;
|
|
5325
|
+
return u ? Promise.resolve(u) : this.get(s, o).then((p) => {
|
|
5326
|
+
const m = p.map((f) => Ge.instanceInitializer(e, f));
|
|
5327
|
+
return i && m && this.cacheResponse(s, m), m;
|
|
5328
|
+
});
|
|
5329
|
+
}
|
|
5330
|
+
};
|
|
5331
|
+
/**
|
|
5332
|
+
* Кэш результатов запросов.
|
|
5333
|
+
*/
|
|
5334
|
+
t(Q, "responseDataCache", /* @__PURE__ */ new Map());
|
|
5335
|
+
let pe = Q;
|
|
5336
|
+
function us(n, r) {
|
|
5364
5337
|
const e = [2, 0, 1, 1, 1, 2];
|
|
5365
5338
|
return r[n % 100 > 4 && n % 100 < 20 ? 2 : e[Math.min(n % 10, 5)]];
|
|
5366
5339
|
}
|
|
5367
|
-
class
|
|
5340
|
+
class ps {
|
|
5368
5341
|
/**
|
|
5369
5342
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
5370
5343
|
*/
|
|
@@ -5380,7 +5353,7 @@ class gs {
|
|
|
5380
5353
|
return r.id === 0 && r.guid === "-undefined-";
|
|
5381
5354
|
}
|
|
5382
5355
|
}
|
|
5383
|
-
class
|
|
5356
|
+
class Ct extends pe {
|
|
5384
5357
|
/**
|
|
5385
5358
|
* Возвращает {@link Promise} для получения справочника списка менеджеров.
|
|
5386
5359
|
*/
|
|
@@ -5388,18 +5361,18 @@ class Tt extends pe {
|
|
|
5388
5361
|
const r = "/internal/managers", e = pe.getCachedResponse(r);
|
|
5389
5362
|
if (e)
|
|
5390
5363
|
return e;
|
|
5391
|
-
const i = (await this.get(r)).data.map((o) =>
|
|
5364
|
+
const i = (await this.get(r)).data.map((o) => Ge.instanceInitializer(fe, o));
|
|
5392
5365
|
return this.cacheResponse(r, i), i;
|
|
5393
5366
|
}
|
|
5394
5367
|
}
|
|
5395
|
-
class
|
|
5368
|
+
class Sr extends $r {
|
|
5396
5369
|
/**
|
|
5397
5370
|
* Инициализирует экземпляр класса {@link OrderInfo}.
|
|
5398
5371
|
*
|
|
5399
5372
|
* @param data Данные для первоначальной инициализации.
|
|
5400
5373
|
*/
|
|
5401
5374
|
constructor(e) {
|
|
5402
|
-
var s, i, o, c, u,
|
|
5375
|
+
var s, i, o, c, u, p, m, f;
|
|
5403
5376
|
super(e);
|
|
5404
5377
|
/**
|
|
5405
5378
|
* @inheritDoc
|
|
@@ -5455,513 +5428,123 @@ class Lr extends kr {
|
|
|
5455
5428
|
onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
|
|
5456
5429
|
}, this.delivery = {
|
|
5457
5430
|
type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
|
|
5458
|
-
date: v((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? C(e.delivery.date) : ((
|
|
5431
|
+
date: v((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? C(e.delivery.date) : ((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ?? /* @__PURE__ */ new Date(),
|
|
5459
5432
|
address: (m = e == null ? void 0 : e.delivery) != null && m.address ? new Re(e.delivery.address) : void 0,
|
|
5460
5433
|
warehouse: (f = e == null ? void 0 : e.delivery) != null && f.warehouse ? new ge(e.delivery.warehouse) : void 0
|
|
5461
|
-
}, this.attachedUser = e != null && e.attachedUser ? new x(e == null ? void 0 : e.attachedUser) : void 0, this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new
|
|
5434
|
+
}, this.attachedUser = e != null && e.attachedUser ? new x(e == null ? void 0 : e.attachedUser) : void 0, this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new _(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;
|
|
5462
5435
|
}
|
|
5463
5436
|
}
|
|
5464
|
-
|
|
5465
|
-
|
|
5437
|
+
class kr extends R {
|
|
5438
|
+
}
|
|
5439
|
+
class Ir extends R {
|
|
5440
|
+
}
|
|
5441
|
+
class hs extends Tr {
|
|
5466
5442
|
/**
|
|
5467
|
-
*
|
|
5443
|
+
* Инициализирует экземпляр класса {@link OrdersListFilters}.
|
|
5468
5444
|
*
|
|
5469
|
-
* @param
|
|
5470
|
-
* @param useResponseDataCache Признак необходимости кэшировать данные ответов на запросы
|
|
5471
|
-
* и использовать в случае аналогичных запросов.
|
|
5472
|
-
*/
|
|
5473
|
-
getReference(r, e = !1) {
|
|
5474
|
-
return this.getTypedDataArrayRequester(gt, `/internal/references/${r}`, e);
|
|
5475
|
-
}
|
|
5476
|
-
/**
|
|
5477
|
-
* Возвращает {@link Promise} для получения справочника данных о канале
|
|
5478
|
-
* первичного интереса.
|
|
5479
|
-
*/
|
|
5480
|
-
getChannelPrimaryInterest() {
|
|
5481
|
-
return this.getTypedDataArrayRequester(Cr, "/internal/references/channel-primary-interest", !0);
|
|
5482
|
-
}
|
|
5483
|
-
/**
|
|
5484
|
-
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
5485
|
-
*/
|
|
5486
|
-
getContactPositions() {
|
|
5487
|
-
return this.getTypedDataArrayRequester(mt, "/internal/references/contact-position", !0);
|
|
5488
|
-
}
|
|
5489
|
-
/**
|
|
5490
|
-
* Возвращает {@link Promise} для получения справочника списка направлений кураторства.
|
|
5491
|
-
*/
|
|
5492
|
-
getCuratedDirection() {
|
|
5493
|
-
return this.getTypedDataArrayRequester(Be, "/internal/references/curated-direction", !0);
|
|
5494
|
-
}
|
|
5495
|
-
/**
|
|
5496
|
-
* Возвращает {@link Promise} для получения справочника списка валют.
|
|
5497
|
-
*/
|
|
5498
|
-
getCurrency() {
|
|
5499
|
-
return this.getTypedDataArrayRequester(a, "/public/references/currency", !0);
|
|
5500
|
-
}
|
|
5501
|
-
/**
|
|
5502
|
-
* Возвращает {@link Promise} для получения справочника данных
|
|
5503
|
-
* групп партнеров (направлений деятельности).
|
|
5504
|
-
*/
|
|
5505
|
-
getPartnerGroup() {
|
|
5506
|
-
return this.getTypedDataArrayRequester(Z, "/internal/references/partner-group", !0);
|
|
5507
|
-
}
|
|
5508
|
-
/**
|
|
5509
|
-
* Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
|
|
5510
|
-
*/
|
|
5511
|
-
getOpf() {
|
|
5512
|
-
return this.getTypedDataArrayRequester(G, "/public/references/opf", !0);
|
|
5513
|
-
}
|
|
5514
|
-
/**
|
|
5515
|
-
* Возвращает {@link Promise} для получения справочника операторов.
|
|
5516
|
-
*/
|
|
5517
|
-
getOperators() {
|
|
5518
|
-
return this.getTypedDataArrayRequester(Rr, "/internal/references/operator", !0);
|
|
5519
|
-
}
|
|
5520
|
-
/**
|
|
5521
|
-
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
5522
|
-
*/
|
|
5523
|
-
getOrderPaymentStatuses() {
|
|
5524
|
-
return this.getTypedDataArrayRequester(ft, "/public/references/order-payment-status", !0);
|
|
5525
|
-
}
|
|
5526
|
-
/**
|
|
5527
|
-
* Возвращает {@link Promise} для получения справочника данных статусов заказов.
|
|
5528
|
-
*/
|
|
5529
|
-
getOrderStatuses() {
|
|
5530
|
-
return this.getTypedDataArrayRequester(yt, "/internal/references/order-status", !0);
|
|
5531
|
-
}
|
|
5532
|
-
/**
|
|
5533
|
-
* Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
|
|
5534
|
-
*/
|
|
5535
|
-
getPaymentTypes() {
|
|
5536
|
-
return this.getTypedDataArrayRequester(Pr, "/public/references/payment-type", !0);
|
|
5537
|
-
}
|
|
5538
|
-
/**
|
|
5539
|
-
* Возвращает {@link Promise} для получения справочника типов ресурсов.
|
|
5540
|
-
*/
|
|
5541
|
-
getResourceTypes() {
|
|
5542
|
-
return this.getTypedDataArrayRequester(Ar, "/internal/references/resource-type", !0);
|
|
5543
|
-
}
|
|
5544
|
-
/**
|
|
5545
|
-
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
5546
|
-
*/
|
|
5547
|
-
getSalesDirections() {
|
|
5548
|
-
return this.getTypedDataArrayRequester(O, "/public/references/sales-direction", !0);
|
|
5549
|
-
}
|
|
5550
|
-
/**
|
|
5551
|
-
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
5445
|
+
* @param data Данные для первоначальной инициализации.
|
|
5552
5446
|
*/
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
/**
|
|
5557
|
-
* Выполняет поиск данных о городах по терму в названии.
|
|
5558
|
-
*
|
|
5559
|
-
* @param term Терм поиска.
|
|
5560
|
-
*/
|
|
5561
|
-
searchCity(r) {
|
|
5562
|
-
return this.getTypedDataArrayRequester(Ae, `/internal/references/city-with-region-and-country/search?term=${r}`);
|
|
5563
|
-
}
|
|
5564
|
-
/**
|
|
5565
|
-
* Выполняет поиск данных о регионах по терму в названии.
|
|
5566
|
-
*
|
|
5567
|
-
* @param term Терм поиска.
|
|
5568
|
-
*/
|
|
5569
|
-
searchRegion(r) {
|
|
5570
|
-
return this.getTypedDataArrayRequester(ue, `/internal/references/region-with-country/search?term=${r}`);
|
|
5571
|
-
}
|
|
5572
|
-
/**
|
|
5573
|
-
* Выполняет поиск данных о странах по терму в названии.
|
|
5574
|
-
*
|
|
5575
|
-
* @param term Терм поиска.
|
|
5576
|
-
*/
|
|
5577
|
-
searchCountry(r) {
|
|
5578
|
-
return this.getTypedDataArrayRequester(X, `/internal/references/country/search?term=${r}`);
|
|
5579
|
-
}
|
|
5580
|
-
/**
|
|
5581
|
-
* Возвращает {@link Promise} для получения справочника типов доставки.
|
|
5582
|
-
*/
|
|
5583
|
-
getDeliveryTypes() {
|
|
5584
|
-
return this.getTypedDataArrayRequester(N, "/internal/references/delivery-type", !0);
|
|
5585
|
-
}
|
|
5586
|
-
/**
|
|
5587
|
-
* Возвращает {@link Promise} для получения справочника складов.
|
|
5588
|
-
*/
|
|
5589
|
-
getWarehouses() {
|
|
5590
|
-
return this.getTypedDataArrayRequester(ge, "/public/references/warehouse", !0);
|
|
5591
|
-
}
|
|
5592
|
-
/**
|
|
5593
|
-
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
5594
|
-
*/
|
|
5595
|
-
getPropertyTypes() {
|
|
5596
|
-
return this.getTypedDataArrayRequester(vr, "/internal/references/property-type", !0);
|
|
5597
|
-
}
|
|
5598
|
-
/**
|
|
5599
|
-
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
5600
|
-
*/
|
|
5601
|
-
getPriceCoefficients() {
|
|
5602
|
-
return this.getTypedDataArrayRequester(Pe, "/internal/references/price-coefficient", !0);
|
|
5603
|
-
}
|
|
5604
|
-
/**
|
|
5605
|
-
* Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
|
|
5606
|
-
*/
|
|
5607
|
-
getProductFileType() {
|
|
5608
|
-
return this.getTypedDataArrayRequester(wt, "/public/references/product-file-type", !0);
|
|
5609
|
-
}
|
|
5610
|
-
}
|
|
5611
|
-
const $ = z("common.references_private", () => {
|
|
5612
|
-
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);
|
|
5613
|
-
return {
|
|
5614
|
-
/**
|
|
5615
|
-
* Список загружаемых/загруженных на данный момент значений.
|
|
5616
|
-
*/
|
|
5617
|
-
dataLoaderList: n,
|
|
5618
|
-
/**
|
|
5619
|
-
* Справочник каналов первичного интереса.
|
|
5620
|
-
*/
|
|
5621
|
-
channelPrimaryInterestReference: r,
|
|
5622
|
-
/**
|
|
5623
|
-
* Справочник должностей контактных лиц.
|
|
5624
|
-
*/
|
|
5625
|
-
contactPositionsReference: e,
|
|
5626
|
-
/**
|
|
5627
|
-
* Справочник валют.
|
|
5628
|
-
*/
|
|
5629
|
-
currencyReference: s,
|
|
5630
|
-
/**
|
|
5631
|
-
* Справочник типов доставки.
|
|
5632
|
-
*/
|
|
5633
|
-
deliveryTypeReference: i,
|
|
5634
|
-
/**
|
|
5635
|
-
* Список менеджеров.
|
|
5636
|
-
*/
|
|
5637
|
-
managersList: o,
|
|
5638
|
-
/**
|
|
5639
|
-
* Справочник организационно-правовых форм.
|
|
5640
|
-
*/
|
|
5641
|
-
opfReference: c,
|
|
5642
|
-
/**
|
|
5643
|
-
* Справочник операторов.
|
|
5644
|
-
*/
|
|
5645
|
-
operatorReference: u,
|
|
5646
|
-
/**
|
|
5647
|
-
* Справочник статусов оплаты заказа.
|
|
5648
|
-
*/
|
|
5649
|
-
orderPaymentStatusReference: h,
|
|
5650
|
-
/**
|
|
5651
|
-
* Справочник статусов заказов.
|
|
5652
|
-
*/
|
|
5653
|
-
orderStatusReference: m,
|
|
5654
|
-
/**
|
|
5655
|
-
* Справочник типов оплаты заказов.
|
|
5656
|
-
*/
|
|
5657
|
-
paymentTypeReference: f,
|
|
5658
|
-
/**
|
|
5659
|
-
* Справочник групп партнеров.
|
|
5660
|
-
*/
|
|
5661
|
-
partnerGroupReference: D,
|
|
5662
|
-
/**
|
|
5663
|
-
* Справочник типов файлов продукктов/категорий.
|
|
5664
|
-
*/
|
|
5665
|
-
productFileTypeReference: te,
|
|
5447
|
+
constructor(e) {
|
|
5448
|
+
var s, i, o, c;
|
|
5449
|
+
super();
|
|
5666
5450
|
/**
|
|
5667
|
-
*
|
|
5451
|
+
* @inheritDoc
|
|
5668
5452
|
*/
|
|
5669
|
-
|
|
5453
|
+
t(this, "attachedUsers");
|
|
5670
5454
|
/**
|
|
5671
|
-
*
|
|
5455
|
+
* @inheritDoc
|
|
5672
5456
|
*/
|
|
5673
|
-
|
|
5457
|
+
t(this, "clientSearchTerm");
|
|
5674
5458
|
/**
|
|
5675
|
-
*
|
|
5459
|
+
* @inheritDoc
|
|
5676
5460
|
*/
|
|
5677
|
-
|
|
5461
|
+
t(this, "client");
|
|
5678
5462
|
/**
|
|
5679
|
-
*
|
|
5463
|
+
* @inheritDoc
|
|
5680
5464
|
*/
|
|
5681
|
-
|
|
5465
|
+
t(this, "contragent");
|
|
5682
5466
|
/**
|
|
5683
|
-
*
|
|
5467
|
+
* @inheritDoc
|
|
5684
5468
|
*/
|
|
5685
|
-
|
|
5469
|
+
t(this, "createdAt", new T());
|
|
5686
5470
|
/**
|
|
5687
|
-
*
|
|
5471
|
+
* @inheritDoc
|
|
5688
5472
|
*/
|
|
5689
|
-
|
|
5690
|
-
};
|
|
5691
|
-
}), ms = z("common.references", () => {
|
|
5692
|
-
const n = A(() => {
|
|
5693
|
-
const l = $();
|
|
5694
|
-
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, p.getInstance(b).getChannelPrimaryInterest().then((g) => {
|
|
5695
|
-
l.channelPrimaryInterestReference = g;
|
|
5696
|
-
}).catch(w)), l.channelPrimaryInterestReference;
|
|
5697
|
-
}), r = A(() => {
|
|
5698
|
-
const l = $();
|
|
5699
|
-
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, p.getInstance(b).getContactPositions().then((g) => {
|
|
5700
|
-
l.contactPositionsReference = g;
|
|
5701
|
-
}).catch(w)), l.contactPositionsReference;
|
|
5702
|
-
}), e = A(() => {
|
|
5703
|
-
const l = $();
|
|
5704
|
-
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, p.getInstance(b).getCurrency().then((g) => {
|
|
5705
|
-
l.currencyReference = g;
|
|
5706
|
-
}).catch(w)), l.currencyReference;
|
|
5707
|
-
}), s = A(() => {
|
|
5708
|
-
const l = $();
|
|
5709
|
-
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, p.getInstance(b).getOpf().then((g) => {
|
|
5710
|
-
l.opfReference = g;
|
|
5711
|
-
}).catch(w)), l.opfReference;
|
|
5712
|
-
}), i = A(() => {
|
|
5713
|
-
const l = $();
|
|
5714
|
-
return !l.operatorReference && !l.dataLoaderList.operatorReference && (l.dataLoaderList.operatorReference = !0, p.getInstance(b).getOperators().then((g) => {
|
|
5715
|
-
l.operatorReference = g;
|
|
5716
|
-
}).catch(w)), l.operatorReference;
|
|
5717
|
-
}), o = A(() => {
|
|
5718
|
-
const l = $();
|
|
5719
|
-
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, p.getInstance(b).getOrderPaymentStatuses().then((g) => {
|
|
5720
|
-
l.orderPaymentStatusReference = g;
|
|
5721
|
-
}).catch(w)), l.orderPaymentStatusReference;
|
|
5722
|
-
}), c = A(() => {
|
|
5723
|
-
const l = $();
|
|
5724
|
-
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, p.getInstance(b).getOrderStatuses().then((g) => {
|
|
5725
|
-
l.orderStatusReference = g;
|
|
5726
|
-
}).catch(w)), l.orderStatusReference;
|
|
5727
|
-
}), u = A(() => {
|
|
5728
|
-
const l = $();
|
|
5729
|
-
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, p.getInstance(b).getPaymentTypes().then((g) => {
|
|
5730
|
-
l.paymentTypeReference = g;
|
|
5731
|
-
}).catch(w)), l.paymentTypeReference;
|
|
5732
|
-
}), h = A(() => {
|
|
5733
|
-
const l = $();
|
|
5734
|
-
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, p.getInstance(b).getPartnerGroup().then((g) => {
|
|
5735
|
-
l.partnerGroupReference = g;
|
|
5736
|
-
}).catch(w)), l.partnerGroupReference;
|
|
5737
|
-
}), m = A(() => {
|
|
5738
|
-
const l = $();
|
|
5739
|
-
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, p.getInstance(b).getProductFileType().then((g) => {
|
|
5740
|
-
l.productFileTypeReference = g;
|
|
5741
|
-
}).catch(w)), l.productFileTypeReference;
|
|
5742
|
-
}), f = A(() => {
|
|
5743
|
-
const l = $();
|
|
5744
|
-
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, p.getInstance(b).getResourceTypes().then((g) => {
|
|
5745
|
-
l.resourceTypesReference = g;
|
|
5746
|
-
}).catch(w)), l.resourceTypesReference;
|
|
5747
|
-
}), D = A(() => {
|
|
5748
|
-
const l = $();
|
|
5749
|
-
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, p.getInstance(b).getSalesDirections().then((g) => {
|
|
5750
|
-
l.salesDirectionsReference = g;
|
|
5751
|
-
}).catch(w)), l.salesDirectionsReference;
|
|
5752
|
-
}), te = A(() => {
|
|
5753
|
-
const l = $();
|
|
5754
|
-
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, p.getInstance(b).getSourcePrimaryInterest().then((g) => {
|
|
5755
|
-
l.sourcePrimaryInterestReference = g;
|
|
5756
|
-
}).catch(w)), l.sourcePrimaryInterestReference;
|
|
5757
|
-
}), se = A(() => {
|
|
5758
|
-
const l = $();
|
|
5759
|
-
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, p.getInstance(b).getDeliveryTypes().then((g) => {
|
|
5760
|
-
l.deliveryTypeReference = g;
|
|
5761
|
-
}).catch(w)), l.deliveryTypeReference;
|
|
5762
|
-
}), W = A(() => {
|
|
5763
|
-
const l = $();
|
|
5764
|
-
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, p.getInstance(Tt).getManagers().then((g) => {
|
|
5765
|
-
l.managersList = g;
|
|
5766
|
-
}).catch(w)), l.managersList;
|
|
5767
|
-
}), J = A(() => {
|
|
5768
|
-
const l = $();
|
|
5769
|
-
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, p.getInstance(b).getWarehouses().then((g) => {
|
|
5770
|
-
l.warehousesReference = g;
|
|
5771
|
-
}).catch(w)), l.warehousesReference;
|
|
5772
|
-
}), Te = A(() => {
|
|
5773
|
-
const l = $();
|
|
5774
|
-
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, p.getInstance(b).getPropertyTypes().then((g) => {
|
|
5775
|
-
l.propertyTypesReference = g;
|
|
5776
|
-
}).catch(w)), l.propertyTypesReference;
|
|
5777
|
-
}), $e = A(() => {
|
|
5778
|
-
const l = $();
|
|
5779
|
-
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, p.getInstance(b).getPriceCoefficients().then((g) => {
|
|
5780
|
-
l.priceCoefficientsReference = g;
|
|
5781
|
-
}).catch(w)), l.priceCoefficientsReference;
|
|
5782
|
-
});
|
|
5783
|
-
return {
|
|
5473
|
+
t(this, "creator");
|
|
5784
5474
|
/**
|
|
5785
|
-
*
|
|
5475
|
+
* @inheritDoc
|
|
5786
5476
|
*/
|
|
5787
|
-
|
|
5477
|
+
t(this, "deliveryDate", new T());
|
|
5788
5478
|
/**
|
|
5789
|
-
*
|
|
5479
|
+
* @inheritDoc
|
|
5790
5480
|
*/
|
|
5791
|
-
|
|
5481
|
+
t(this, "deliveryAddressSearch");
|
|
5792
5482
|
/**
|
|
5793
|
-
*
|
|
5483
|
+
* @inheritDoc
|
|
5794
5484
|
*/
|
|
5795
|
-
|
|
5485
|
+
t(this, "clientCities");
|
|
5796
5486
|
/**
|
|
5797
|
-
*
|
|
5487
|
+
* @inheritDoc
|
|
5798
5488
|
*/
|
|
5799
|
-
|
|
5489
|
+
t(this, "id");
|
|
5800
5490
|
/**
|
|
5801
|
-
*
|
|
5491
|
+
* @inheritDoc
|
|
5802
5492
|
*/
|
|
5803
|
-
|
|
5493
|
+
t(this, "isApproved");
|
|
5804
5494
|
/**
|
|
5805
|
-
*
|
|
5495
|
+
* @inheritDoc
|
|
5806
5496
|
*/
|
|
5807
|
-
|
|
5497
|
+
t(this, "isApproved1c");
|
|
5808
5498
|
/**
|
|
5809
|
-
*
|
|
5499
|
+
* @inheritDoc
|
|
5810
5500
|
*/
|
|
5811
|
-
|
|
5501
|
+
t(this, "isNotInStock");
|
|
5812
5502
|
/**
|
|
5813
|
-
*
|
|
5503
|
+
* @inheritDoc
|
|
5814
5504
|
*/
|
|
5815
|
-
|
|
5505
|
+
t(this, "isOnOrder");
|
|
5816
5506
|
/**
|
|
5817
|
-
*
|
|
5507
|
+
* @inheritDoc
|
|
5818
5508
|
*/
|
|
5819
|
-
|
|
5509
|
+
t(this, "pendingAt", new T());
|
|
5820
5510
|
/**
|
|
5821
|
-
*
|
|
5511
|
+
* @inheritDoc
|
|
5822
5512
|
*/
|
|
5823
|
-
|
|
5513
|
+
t(this, "processedAt", new T());
|
|
5824
5514
|
/**
|
|
5825
|
-
*
|
|
5515
|
+
* @inheritDoc
|
|
5826
5516
|
*/
|
|
5827
|
-
|
|
5517
|
+
t(this, "salesDirections");
|
|
5828
5518
|
/**
|
|
5829
|
-
*
|
|
5519
|
+
* @inheritDoc
|
|
5830
5520
|
*/
|
|
5831
|
-
|
|
5521
|
+
t(this, "status");
|
|
5832
5522
|
/**
|
|
5833
|
-
*
|
|
5523
|
+
* @inheritDoc
|
|
5834
5524
|
*/
|
|
5835
|
-
|
|
5525
|
+
t(this, "deliveryType");
|
|
5836
5526
|
/**
|
|
5837
|
-
*
|
|
5527
|
+
* @inheritDoc
|
|
5838
5528
|
*/
|
|
5839
|
-
|
|
5529
|
+
t(this, "paymentType");
|
|
5840
5530
|
/**
|
|
5841
|
-
*
|
|
5531
|
+
* @inheritDoc
|
|
5842
5532
|
*/
|
|
5843
|
-
|
|
5533
|
+
t(this, "warehouses");
|
|
5844
5534
|
/**
|
|
5845
|
-
*
|
|
5535
|
+
* @inheritDoc
|
|
5846
5536
|
*/
|
|
5847
|
-
|
|
5537
|
+
t(this, "isLargeOrder");
|
|
5848
5538
|
/**
|
|
5849
|
-
*
|
|
5539
|
+
* @inheritDoc
|
|
5850
5540
|
*/
|
|
5851
|
-
|
|
5541
|
+
t(this, "isToProcess");
|
|
5852
5542
|
/**
|
|
5853
|
-
*
|
|
5543
|
+
* @inheritDoc
|
|
5854
5544
|
*/
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
}
|
|
5858
|
-
class fs extends Sr {
|
|
5859
|
-
/**
|
|
5860
|
-
* Инициализирует экземпляр класса {@link OrdersListFilters}.
|
|
5861
|
-
*
|
|
5862
|
-
* @param data Данные для первоначальной инициализации.
|
|
5863
|
-
*/
|
|
5864
|
-
constructor(e) {
|
|
5865
|
-
var s, i, o, c;
|
|
5866
|
-
super();
|
|
5867
|
-
/**
|
|
5868
|
-
* @inheritDoc
|
|
5869
|
-
*/
|
|
5870
|
-
t(this, "attachedUsers");
|
|
5871
|
-
/**
|
|
5872
|
-
* @inheritDoc
|
|
5873
|
-
*/
|
|
5874
|
-
t(this, "clientSearchTerm");
|
|
5875
|
-
/**
|
|
5876
|
-
* @inheritDoc
|
|
5877
|
-
*/
|
|
5878
|
-
t(this, "client");
|
|
5879
|
-
/**
|
|
5880
|
-
* @inheritDoc
|
|
5881
|
-
*/
|
|
5882
|
-
t(this, "contragent");
|
|
5883
|
-
/**
|
|
5884
|
-
* @inheritDoc
|
|
5885
|
-
*/
|
|
5886
|
-
t(this, "createdAt", new S());
|
|
5887
|
-
/**
|
|
5888
|
-
* @inheritDoc
|
|
5889
|
-
*/
|
|
5890
|
-
t(this, "creator");
|
|
5891
|
-
/**
|
|
5892
|
-
* @inheritDoc
|
|
5893
|
-
*/
|
|
5894
|
-
t(this, "deliveryDate", new S());
|
|
5895
|
-
/**
|
|
5896
|
-
* @inheritDoc
|
|
5897
|
-
*/
|
|
5898
|
-
t(this, "deliveryAddressSearch");
|
|
5899
|
-
/**
|
|
5900
|
-
* @inheritDoc
|
|
5901
|
-
*/
|
|
5902
|
-
t(this, "clientCities");
|
|
5903
|
-
/**
|
|
5904
|
-
* @inheritDoc
|
|
5905
|
-
*/
|
|
5906
|
-
t(this, "id");
|
|
5907
|
-
/**
|
|
5908
|
-
* @inheritDoc
|
|
5909
|
-
*/
|
|
5910
|
-
t(this, "isApproved");
|
|
5911
|
-
/**
|
|
5912
|
-
* @inheritDoc
|
|
5913
|
-
*/
|
|
5914
|
-
t(this, "isApproved1c");
|
|
5915
|
-
/**
|
|
5916
|
-
* @inheritDoc
|
|
5917
|
-
*/
|
|
5918
|
-
t(this, "isNotInStock");
|
|
5919
|
-
/**
|
|
5920
|
-
* @inheritDoc
|
|
5921
|
-
*/
|
|
5922
|
-
t(this, "isOnOrder");
|
|
5923
|
-
/**
|
|
5924
|
-
* @inheritDoc
|
|
5925
|
-
*/
|
|
5926
|
-
t(this, "pendingAt", new S());
|
|
5927
|
-
/**
|
|
5928
|
-
* @inheritDoc
|
|
5929
|
-
*/
|
|
5930
|
-
t(this, "processedAt", new S());
|
|
5931
|
-
/**
|
|
5932
|
-
* @inheritDoc
|
|
5933
|
-
*/
|
|
5934
|
-
t(this, "salesDirections");
|
|
5935
|
-
/**
|
|
5936
|
-
* @inheritDoc
|
|
5937
|
-
*/
|
|
5938
|
-
t(this, "status");
|
|
5939
|
-
/**
|
|
5940
|
-
* @inheritDoc
|
|
5941
|
-
*/
|
|
5942
|
-
t(this, "deliveryType");
|
|
5943
|
-
/**
|
|
5944
|
-
* @inheritDoc
|
|
5945
|
-
*/
|
|
5946
|
-
t(this, "paymentType");
|
|
5947
|
-
/**
|
|
5948
|
-
* @inheritDoc
|
|
5949
|
-
*/
|
|
5950
|
-
t(this, "warehouses");
|
|
5951
|
-
/**
|
|
5952
|
-
* @inheritDoc
|
|
5953
|
-
*/
|
|
5954
|
-
t(this, "isLargeOrder");
|
|
5955
|
-
/**
|
|
5956
|
-
* @inheritDoc
|
|
5957
|
-
*/
|
|
5958
|
-
t(this, "isToProcess");
|
|
5959
|
-
/**
|
|
5960
|
-
* @inheritDoc
|
|
5961
|
-
*/
|
|
5962
|
-
t(this, "onlyMyRegions");
|
|
5963
|
-
this.attachedUsers = (s = e == null ? void 0 : e.attachedUsers) == null ? void 0 : s.map((u) => "isActive" in u ? new fe(u) : new Rr(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 x(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 Pr(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;
|
|
5964
|
-
}
|
|
5545
|
+
t(this, "onlyMyRegions");
|
|
5546
|
+
this.attachedUsers = (s = e == null ? void 0 : e.attachedUsers) == null ? void 0 : s.map((u) => "isActive" in u ? new fe(u) : new kr(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 T(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new x(e.creator) : void 0, this.deliveryDate = new T(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 T(e == null ? void 0 : e.pendingAt), this.processedAt = new T(e == null ? void 0 : e.processedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new _(u)), this.status = e == null ? void 0 : e.status, this.deliveryType = e != null && e.deliveryType ? new U(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new Ir(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;
|
|
5547
|
+
}
|
|
5965
5548
|
/**
|
|
5966
5549
|
* @inheritDoc
|
|
5967
5550
|
*/
|
|
@@ -5977,7 +5560,7 @@ class fs extends Sr {
|
|
|
5977
5560
|
this.deliveryDate.from = null, this.deliveryDate.to = null;
|
|
5978
5561
|
break;
|
|
5979
5562
|
case "deliveryType":
|
|
5980
|
-
this.deliveryType = new
|
|
5563
|
+
this.deliveryType = new U();
|
|
5981
5564
|
break;
|
|
5982
5565
|
case "clientCities":
|
|
5983
5566
|
this.clientCities = [];
|
|
@@ -6007,12 +5590,12 @@ class fs extends Sr {
|
|
|
6007
5590
|
* @inheritDoc
|
|
6008
5591
|
*/
|
|
6009
5592
|
asClearRaw() {
|
|
6010
|
-
var s, i, o, c, u,
|
|
5593
|
+
var s, i, o, c, u, p, m, f;
|
|
6011
5594
|
const e = super.asClearRaw();
|
|
6012
|
-
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.deliveryDate) != null && o.from) && !((c = e == null ? void 0 : e.deliveryDate) != null && c.to) && delete e.deliveryDate, !((u = e == null ? void 0 : e.pendingAt) != null && u.from) && !((
|
|
5595
|
+
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.deliveryDate) != null && o.from) && !((c = e == null ? void 0 : e.deliveryDate) != null && c.to) && delete e.deliveryDate, !((u = e == null ? void 0 : e.pendingAt) != null && u.from) && !((p = e == null ? void 0 : e.pendingAt) != null && p.to) && delete e.pendingAt, !((m = e == null ? void 0 : e.processedAt) != null && m.from) && !((f = e == null ? void 0 : e.processedAt) != null && f.to) && delete e.processedAt, e;
|
|
6013
5596
|
}
|
|
6014
5597
|
}
|
|
6015
|
-
class
|
|
5598
|
+
class Rt extends gr {
|
|
6016
5599
|
/**
|
|
6017
5600
|
* Инициализирует экземпляр класса {@link OrderItem}.
|
|
6018
5601
|
*
|
|
@@ -6060,10 +5643,10 @@ class bt extends gr {
|
|
|
6060
5643
|
* @inheritDoc
|
|
6061
5644
|
*/
|
|
6062
5645
|
t(this, "currency");
|
|
6063
|
-
this.product = new M(e.product), this.currency = new
|
|
5646
|
+
this.product = new M(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;
|
|
6064
5647
|
}
|
|
6065
5648
|
}
|
|
6066
|
-
class Le extends
|
|
5649
|
+
class Le extends Sr {
|
|
6067
5650
|
/**
|
|
6068
5651
|
* Инициализирует экземпляр класса {@link Order}.
|
|
6069
5652
|
*
|
|
@@ -6103,10 +5686,10 @@ class Le extends Lr {
|
|
|
6103
5686
|
* @inheritDoc
|
|
6104
5687
|
*/
|
|
6105
5688
|
t(this, "isAllowProcessingWithoutPayment");
|
|
6106
|
-
this.products = (e.products ?? []).map((s) => new
|
|
5689
|
+
this.products = (e.products ?? []).map((s) => new Rt(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? Ce.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new R(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
|
|
6107
5690
|
}
|
|
6108
5691
|
}
|
|
6109
|
-
class
|
|
5692
|
+
class gs extends De {
|
|
6110
5693
|
/**
|
|
6111
5694
|
* Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
|
|
6112
5695
|
*
|
|
@@ -6126,7 +5709,7 @@ class ys extends De {
|
|
|
6126
5709
|
{},
|
|
6127
5710
|
(o) => {
|
|
6128
5711
|
const c = { ...o.data };
|
|
6129
|
-
return c.data = c.data.map((u) => new
|
|
5712
|
+
return c.data = c.data.map((u) => new Sr(u)), c;
|
|
6130
5713
|
},
|
|
6131
5714
|
void 0,
|
|
6132
5715
|
i
|
|
@@ -6235,259 +5818,686 @@ class de {
|
|
|
6235
5818
|
*/
|
|
6236
5819
|
constructor(r) {
|
|
6237
5820
|
/**
|
|
6238
|
-
* Краткие данные о клиенте.
|
|
5821
|
+
* Краткие данные о клиенте.
|
|
5822
|
+
*/
|
|
5823
|
+
t(this, "client");
|
|
5824
|
+
/**
|
|
5825
|
+
* Базовые данные о продукте.
|
|
5826
|
+
*/
|
|
5827
|
+
t(this, "product");
|
|
5828
|
+
/**
|
|
5829
|
+
* Стоимость товара или услуги.
|
|
5830
|
+
*/
|
|
5831
|
+
t(this, "cost");
|
|
5832
|
+
/**
|
|
5833
|
+
* Коэффициент стоимости продукта от розничной цены.
|
|
5834
|
+
*/
|
|
5835
|
+
t(this, "costCoefficient");
|
|
5836
|
+
/**
|
|
5837
|
+
* Источник клиентской цены.
|
|
5838
|
+
*/
|
|
5839
|
+
t(this, "source");
|
|
5840
|
+
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) ?? je.Product;
|
|
5841
|
+
}
|
|
5842
|
+
}
|
|
5843
|
+
const ae = (n) => {
|
|
5844
|
+
var r, e, s, i, o;
|
|
5845
|
+
return n ? cr(
|
|
5846
|
+
{
|
|
5847
|
+
cities: (r = n.cities) == null ? void 0 : r.map((c) => c.id),
|
|
5848
|
+
clients: (e = n.clients) == null ? void 0 : e.map((c) => c.id),
|
|
5849
|
+
managers: (s = n.managers) == null ? void 0 : s.map((c) => c.id),
|
|
5850
|
+
partnerGroups: (i = n.partnerGroups) == null ? void 0 : i.map((c) => c.id),
|
|
5851
|
+
salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
|
|
5852
|
+
hideNotActive: n.hideNotActive
|
|
5853
|
+
},
|
|
5854
|
+
(c) => $(c) || (H(c) || He(c)) && Y(c)
|
|
5855
|
+
) : {};
|
|
5856
|
+
}, tr = (n) => {
|
|
5857
|
+
const r = {};
|
|
5858
|
+
return n.from && (n.from.coefficient || n.from.value) && (r.from = {}, n.from.coefficient && (r.from.priceCoefficientId = n.from.coefficient.id), n.from.value && (r.from.increasePercent = n.from.value)), n.to && (n.to.coefficient || n.to.value) && (r.to = {}, n.to.coefficient && (r.to.priceCoefficientId = n.to.coefficient.id), n.to.value && (r.to.increasePercent = n.to.value)), r;
|
|
5859
|
+
};
|
|
5860
|
+
class ms extends h {
|
|
5861
|
+
/**
|
|
5862
|
+
* Возвращает список клиентских цен на продукты в указанном диапазоне цены.
|
|
5863
|
+
*
|
|
5864
|
+
* @param productId Идентификатор продукта.
|
|
5865
|
+
* @param params Параметры анализа цен.
|
|
5866
|
+
* @param filters Параметры фильтрации данных.
|
|
5867
|
+
*
|
|
5868
|
+
* @see /doc/api/internal#/operations/api_internal_catalog_price_products_analyze
|
|
5869
|
+
*/
|
|
5870
|
+
analyzeProductPrices(r, e, s) {
|
|
5871
|
+
return this.get(
|
|
5872
|
+
`/internal/price/products/${r}/analyze`,
|
|
5873
|
+
{
|
|
5874
|
+
...tr(e),
|
|
5875
|
+
filters: ae(s)
|
|
5876
|
+
},
|
|
5877
|
+
(i) => i.data.map((o) => new de(o))
|
|
5878
|
+
);
|
|
5879
|
+
}
|
|
5880
|
+
/**
|
|
5881
|
+
* Возвращает список клиентских цен на продукты категории в указанном диапазоне цены.
|
|
5882
|
+
*
|
|
5883
|
+
* @param productCategoryId Идентификатор категории продукта.
|
|
5884
|
+
* @param params Параметры анализа цен.
|
|
5885
|
+
* @param filters Параметры фильтрации данных.
|
|
5886
|
+
*
|
|
5887
|
+
* @see /doc/api/internal#/operations/api_internal_catalog_price_categories_analyze
|
|
5888
|
+
*/
|
|
5889
|
+
analyzeCategoryPrices(r, e, s) {
|
|
5890
|
+
return this.get(
|
|
5891
|
+
`/internal/price/categories/${r}/analyze`,
|
|
5892
|
+
{
|
|
5893
|
+
...tr(e),
|
|
5894
|
+
filters: ae(s)
|
|
5895
|
+
},
|
|
5896
|
+
(i) => i.data.map((o) => new de(o))
|
|
5897
|
+
);
|
|
5898
|
+
}
|
|
5899
|
+
/**
|
|
5900
|
+
* Возвращает список клиентских цен на продукты категории в указанном диапазоне цены за квадратный метр.
|
|
5901
|
+
*
|
|
5902
|
+
* @param productCategoryId Идентификатор категории продукта.
|
|
5903
|
+
* @param params Параметры анализа цен.
|
|
5904
|
+
* @param params.from Цена больше или равна значению.
|
|
5905
|
+
* @param params.to Цена меньше или равна значению.
|
|
5906
|
+
* @param filters Параметры фильтрации данных.
|
|
5907
|
+
*
|
|
5908
|
+
* @see /doc/api/internal#/operations/api_internal_catalog_price_categories_analyze_by_square
|
|
5909
|
+
*/
|
|
5910
|
+
analyzeCategoryPricesBySquare(r, e, s) {
|
|
5911
|
+
return this.get(
|
|
5912
|
+
`/internal/price/categories/${r}/analyze/square`,
|
|
5913
|
+
{
|
|
5914
|
+
...e,
|
|
5915
|
+
filters: ae(s)
|
|
5916
|
+
},
|
|
5917
|
+
(i) => i.data.map((o) => new de(o))
|
|
5918
|
+
);
|
|
5919
|
+
}
|
|
5920
|
+
}
|
|
5921
|
+
class Pt {
|
|
5922
|
+
/**
|
|
5923
|
+
* Инициализирует экземпляр класса {@link PriceHistoryItem}.
|
|
5924
|
+
*
|
|
5925
|
+
* @param data Данные для первоначальной инициализации.
|
|
5926
|
+
*/
|
|
5927
|
+
constructor(r) {
|
|
5928
|
+
/**
|
|
5929
|
+
* @inheritDoc
|
|
5930
|
+
*/
|
|
5931
|
+
t(this, "cost");
|
|
5932
|
+
/**
|
|
5933
|
+
* @inheritDoc
|
|
5934
|
+
*/
|
|
5935
|
+
t(this, "isLowCost");
|
|
5936
|
+
/**
|
|
5937
|
+
* @inheritDoc
|
|
5938
|
+
*/
|
|
5939
|
+
t(this, "isRetail");
|
|
5940
|
+
/**
|
|
5941
|
+
* @inheritDoc
|
|
5942
|
+
*/
|
|
5943
|
+
t(this, "costDate");
|
|
5944
|
+
/**
|
|
5945
|
+
* @inheritDoc
|
|
5946
|
+
*/
|
|
5947
|
+
t(this, "discountName");
|
|
5948
|
+
/**
|
|
5949
|
+
* @inheritDoc
|
|
5950
|
+
*/
|
|
5951
|
+
t(this, "priceTemplateName");
|
|
5952
|
+
/**
|
|
5953
|
+
* @inheritDoc
|
|
5954
|
+
*/
|
|
5955
|
+
t(this, "product");
|
|
5956
|
+
/**
|
|
5957
|
+
* @inheritDoc
|
|
5958
|
+
*/
|
|
5959
|
+
t(this, "client");
|
|
5960
|
+
/**
|
|
5961
|
+
* @inheritDoc
|
|
5962
|
+
*/
|
|
5963
|
+
t(this, "executor");
|
|
5964
|
+
/**
|
|
5965
|
+
* @inheritDoc
|
|
5966
|
+
*/
|
|
5967
|
+
t(this, "currency");
|
|
5968
|
+
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 x(r.client) : void 0, this.executor = r.executor ? new x(r.executor) : void 0, this.currency = r.currency ? new O(r.currency) : void 0;
|
|
5969
|
+
}
|
|
5970
|
+
}
|
|
5971
|
+
class At extends le {
|
|
5972
|
+
/**
|
|
5973
|
+
* Инициализирует экземпляр класса {@link ProductPriceHistory}.
|
|
5974
|
+
*
|
|
5975
|
+
* @param data Данные для первоначальной инициализации.
|
|
5976
|
+
*/
|
|
5977
|
+
constructor(e) {
|
|
5978
|
+
super(e);
|
|
5979
|
+
/**
|
|
5980
|
+
* @inheritDoc
|
|
5981
|
+
*/
|
|
5982
|
+
t(this, "history");
|
|
5983
|
+
this.history = he(e.history, (s) => new Pt(s));
|
|
5984
|
+
}
|
|
5985
|
+
}
|
|
5986
|
+
class fs extends h {
|
|
5987
|
+
/**
|
|
5988
|
+
* Возвращает данные об истории изменения цен.
|
|
5989
|
+
*
|
|
5990
|
+
* @param filters Фильтры для поиска истории изменения цен.
|
|
5991
|
+
*
|
|
5992
|
+
* @see /docs/api#/operations/api_internal_price_history_get
|
|
5993
|
+
*/
|
|
5994
|
+
getProductPriceHistory(r) {
|
|
5995
|
+
var o, c, u, p, m;
|
|
5996
|
+
const e = L().config.dateFormats.api, s = cr(
|
|
5997
|
+
ce(r, {
|
|
5998
|
+
costDate: {
|
|
5999
|
+
from: xe((o = r.costDate) == null ? void 0 : o.from) ? a(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
|
|
6000
|
+
to: xe((u = r.costDate) == null ? void 0 : u.to) ? a(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
|
|
6001
|
+
}
|
|
6002
|
+
}),
|
|
6003
|
+
(f) => $(f) || (H(f) || He(f)) && Y(f)
|
|
6004
|
+
), i = ((m = r.product) == null ? void 0 : m[0]) ?? 0;
|
|
6005
|
+
return delete s.product, this.get(`/internal/price/products/${i}/history`, s).then((f) => [
|
|
6006
|
+
new At(ce(f[0], { history: f }))
|
|
6007
|
+
]);
|
|
6008
|
+
}
|
|
6009
|
+
}
|
|
6010
|
+
class sr {
|
|
6011
|
+
/**
|
|
6012
|
+
* Инициализирует экземпляр класса {@link RecommendationsList}.
|
|
6013
|
+
*
|
|
6014
|
+
* @param data Данные для первоначальной инициализации.
|
|
6015
|
+
*/
|
|
6016
|
+
constructor(r) {
|
|
6017
|
+
/**
|
|
6018
|
+
* Список рекомендованных продуктов.
|
|
6019
|
+
*/
|
|
6020
|
+
t(this, "products", []);
|
|
6021
|
+
/**
|
|
6022
|
+
* Список рекомендованных категорий продуктов.
|
|
6023
|
+
*/
|
|
6024
|
+
t(this, "productCategories", []);
|
|
6025
|
+
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)));
|
|
6026
|
+
}
|
|
6027
|
+
}
|
|
6028
|
+
class ys extends h {
|
|
6029
|
+
/**
|
|
6030
|
+
* Возвращает данные о рекомендациях указанной категории продуктов.
|
|
6031
|
+
*
|
|
6032
|
+
* @param productCategory Данные о категории продуктов, для которой необходимо получить рекомендации.
|
|
6033
|
+
* @see /docs/api#/operations/api_internal_recommendations_product_category_get
|
|
6034
|
+
*/
|
|
6035
|
+
getProductCategoryRecommendations(r) {
|
|
6036
|
+
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new sr(e.data));
|
|
6037
|
+
}
|
|
6038
|
+
/**
|
|
6039
|
+
* Возвращает данные о рекомендациях указанного продукта.
|
|
6040
|
+
*
|
|
6041
|
+
* @param product Данные о продукте, для которого необходимо получить рекомендации.
|
|
6042
|
+
* @see /docs/api#/operations/api_internal_recommendations_product_get
|
|
6043
|
+
*/
|
|
6044
|
+
getProductRecommendations(r) {
|
|
6045
|
+
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new sr(e.data));
|
|
6046
|
+
}
|
|
6047
|
+
/**
|
|
6048
|
+
* Выполняет сохранение данных о рекомендуемых категориях продуктов.
|
|
6049
|
+
*
|
|
6050
|
+
* @param productCategory Данные о категории для которой необходимо сохранить список рекомендуемых товаров.
|
|
6051
|
+
* @param recommendations Список рекомендованных продуктов и категорий.
|
|
6052
|
+
* @see /docs/api#/operations/api_internal_recommendations_product_category_save
|
|
6053
|
+
*/
|
|
6054
|
+
saveProductCategoryRecommendations(r, e) {
|
|
6055
|
+
return this.post(`/internal/catalog/recommendations/categories/${r.id}`, {
|
|
6056
|
+
product_categories: e.productCategories.map((s) => s.id),
|
|
6057
|
+
products: e.products.map((s) => s.id)
|
|
6058
|
+
});
|
|
6059
|
+
}
|
|
6060
|
+
/**
|
|
6061
|
+
* Выполняет сохранение данных о рекомендуемых продуктах.
|
|
6062
|
+
*
|
|
6063
|
+
* @param product Данные о продукте для которого необходимо сохранить список рекомендуемых товаров.
|
|
6064
|
+
* @param recommendations Список рекомендованных продуктов и категорий.
|
|
6065
|
+
* @see /docs/api#/operations/api_internal_recommendations_product_save
|
|
6066
|
+
*/
|
|
6067
|
+
saveProductRecommendations(r, e) {
|
|
6068
|
+
return this.post(`/internal/catalog/recommendations/products/${r.id}`, {
|
|
6069
|
+
product_categories: e.productCategories.map((s) => s.id),
|
|
6070
|
+
products: e.products.map((s) => s.id)
|
|
6071
|
+
});
|
|
6072
|
+
}
|
|
6073
|
+
}
|
|
6074
|
+
var Dt = /* @__PURE__ */ ((n) => (n.New = "new", n.WorkedOut = "worked_out", n.Pending = "pending", n.Completed = "completed", n.Declined = "declined", n.Deleted = "deleted", n))(Dt || {});
|
|
6075
|
+
class Tt extends R {
|
|
6076
|
+
}
|
|
6077
|
+
class ws extends R {
|
|
6078
|
+
}
|
|
6079
|
+
class $t extends R {
|
|
6080
|
+
}
|
|
6081
|
+
class bt extends R {
|
|
6082
|
+
}
|
|
6083
|
+
class St extends R {
|
|
6084
|
+
}
|
|
6085
|
+
class kt extends R {
|
|
6086
|
+
}
|
|
6087
|
+
class vs {
|
|
6088
|
+
/**
|
|
6089
|
+
* Генерирует и возвращает данные-заглушку неопределённой записи справочника.
|
|
6090
|
+
*
|
|
6091
|
+
* @param Ctor Конструктор конкретного класса справочника.
|
|
6092
|
+
* @param name Название записи.
|
|
6093
|
+
*/
|
|
6094
|
+
static generateUndefinedInstance(r, e = "- Не определён -") {
|
|
6095
|
+
return new r({ id: 0, name: e, slug: "-undefined-" });
|
|
6096
|
+
}
|
|
6097
|
+
/**
|
|
6098
|
+
* Выполняет проверку, является ли указанная запись записью-заглушкой с данными о неопределённой записи справочника.
|
|
6099
|
+
*
|
|
6100
|
+
* @param reference Запись для проверки.
|
|
6101
|
+
*/
|
|
6102
|
+
static isUndefinedInstance(r) {
|
|
6103
|
+
return r.id === 0 && r.slug === "-undefined-";
|
|
6104
|
+
}
|
|
6105
|
+
}
|
|
6106
|
+
class Lr extends R {
|
|
6107
|
+
}
|
|
6108
|
+
class S extends pe {
|
|
6109
|
+
/**
|
|
6110
|
+
* Возвращает {@link Promise} для получения данных указанного справочника.
|
|
6111
|
+
*
|
|
6112
|
+
* @param referenceName Название справочника.
|
|
6113
|
+
* @param useResponseDataCache Признак необходимости кэшировать данные ответов на запросы
|
|
6114
|
+
* и использовать в случае аналогичных запросов.
|
|
6115
|
+
*/
|
|
6116
|
+
getReference(r, e = !1) {
|
|
6117
|
+
return this.getTypedDataArrayRequester(Tt, `/internal/references/${r}`, e);
|
|
6118
|
+
}
|
|
6119
|
+
/**
|
|
6120
|
+
* Возвращает {@link Promise} для получения справочника данных о канале
|
|
6121
|
+
* первичного интереса.
|
|
6122
|
+
*/
|
|
6123
|
+
getChannelPrimaryInterest() {
|
|
6124
|
+
return this.getTypedDataArrayRequester(Ar, "/internal/references/channel-primary-interest", !0);
|
|
6125
|
+
}
|
|
6126
|
+
/**
|
|
6127
|
+
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
6128
|
+
*/
|
|
6129
|
+
getContactPositions() {
|
|
6130
|
+
return this.getTypedDataArrayRequester($t, "/internal/references/contact-position", !0);
|
|
6131
|
+
}
|
|
6132
|
+
/**
|
|
6133
|
+
* Возвращает {@link Promise} для получения справочника списка направлений кураторства.
|
|
6134
|
+
*/
|
|
6135
|
+
getCuratedDirection() {
|
|
6136
|
+
return this.getTypedDataArrayRequester(ze, "/internal/references/curated-direction", !0);
|
|
6137
|
+
}
|
|
6138
|
+
/**
|
|
6139
|
+
* Возвращает {@link Promise} для получения справочника списка валют.
|
|
6140
|
+
*/
|
|
6141
|
+
getCurrency() {
|
|
6142
|
+
return this.getTypedDataArrayRequester(O, "/public/references/currency", !0);
|
|
6143
|
+
}
|
|
6144
|
+
/**
|
|
6145
|
+
* Возвращает {@link Promise} для получения справочника данных
|
|
6146
|
+
* групп партнеров (направлений деятельности).
|
|
6147
|
+
*/
|
|
6148
|
+
getPartnerGroup() {
|
|
6149
|
+
return this.getTypedDataArrayRequester(Z, "/internal/references/partner-group", !0);
|
|
6150
|
+
}
|
|
6151
|
+
/**
|
|
6152
|
+
* Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
|
|
6153
|
+
*/
|
|
6154
|
+
getOpf() {
|
|
6155
|
+
return this.getTypedDataArrayRequester(B, "/public/references/opf", !0);
|
|
6156
|
+
}
|
|
6157
|
+
/**
|
|
6158
|
+
* Возвращает {@link Promise} для получения справочника операторов.
|
|
6159
|
+
*/
|
|
6160
|
+
getOperators() {
|
|
6161
|
+
return this.getTypedDataArrayRequester(kr, "/internal/references/operator", !0);
|
|
6162
|
+
}
|
|
6163
|
+
/**
|
|
6164
|
+
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
6165
|
+
*/
|
|
6166
|
+
getOrderPaymentStatuses() {
|
|
6167
|
+
return this.getTypedDataArrayRequester(bt, "/public/references/order-payment-status", !0);
|
|
6168
|
+
}
|
|
6169
|
+
/**
|
|
6170
|
+
* Возвращает {@link Promise} для получения справочника данных статусов заказов.
|
|
6171
|
+
*/
|
|
6172
|
+
getOrderStatuses() {
|
|
6173
|
+
return this.getTypedDataArrayRequester(St, "/internal/references/order-status", !0);
|
|
6174
|
+
}
|
|
6175
|
+
/**
|
|
6176
|
+
* Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
|
|
6177
|
+
*/
|
|
6178
|
+
getPaymentTypes() {
|
|
6179
|
+
return this.getTypedDataArrayRequester(Ir, "/public/references/payment-type", !0);
|
|
6180
|
+
}
|
|
6181
|
+
/**
|
|
6182
|
+
* Возвращает {@link Promise} для получения справочника типов ресурсов.
|
|
6183
|
+
*/
|
|
6184
|
+
getResourceTypes() {
|
|
6185
|
+
return this.getTypedDataArrayRequester(Lr, "/internal/references/resource-type", !0);
|
|
6186
|
+
}
|
|
6187
|
+
/**
|
|
6188
|
+
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
6189
|
+
*/
|
|
6190
|
+
getSalesDirections() {
|
|
6191
|
+
return this.getTypedDataArrayRequester(_, "/public/references/sales-direction", !0);
|
|
6192
|
+
}
|
|
6193
|
+
/**
|
|
6194
|
+
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
6195
|
+
*/
|
|
6196
|
+
getSourcePrimaryInterest() {
|
|
6197
|
+
return this.getTypedDataArrayRequester(Dr, "/internal/references/source-primary-interest", !0);
|
|
6198
|
+
}
|
|
6199
|
+
/**
|
|
6200
|
+
* Выполняет поиск данных о городах по терму в названии.
|
|
6201
|
+
*
|
|
6202
|
+
* @param term Терм поиска.
|
|
6203
|
+
*/
|
|
6204
|
+
searchCity(r) {
|
|
6205
|
+
return this.getTypedDataArrayRequester(Ae, `/internal/references/city-with-region-and-country/search?term=${r}`);
|
|
6206
|
+
}
|
|
6207
|
+
/**
|
|
6208
|
+
* Выполняет поиск данных о регионах по терму в названии.
|
|
6209
|
+
*
|
|
6210
|
+
* @param term Терм поиска.
|
|
6211
|
+
*/
|
|
6212
|
+
searchRegion(r) {
|
|
6213
|
+
return this.getTypedDataArrayRequester(ue, `/internal/references/region-with-country/search?term=${r}`);
|
|
6214
|
+
}
|
|
6215
|
+
/**
|
|
6216
|
+
* Выполняет поиск данных о странах по терму в названии.
|
|
6217
|
+
*
|
|
6218
|
+
* @param term Терм поиска.
|
|
6219
|
+
*/
|
|
6220
|
+
searchCountry(r) {
|
|
6221
|
+
return this.getTypedDataArrayRequester(X, `/internal/references/country/search?term=${r}`);
|
|
6222
|
+
}
|
|
6223
|
+
/**
|
|
6224
|
+
* Возвращает {@link Promise} для получения справочника типов доставки.
|
|
6225
|
+
*/
|
|
6226
|
+
getDeliveryTypes() {
|
|
6227
|
+
return this.getTypedDataArrayRequester(U, "/internal/references/delivery-type", !0);
|
|
6228
|
+
}
|
|
6229
|
+
/**
|
|
6230
|
+
* Возвращает {@link Promise} для получения справочника складов.
|
|
6231
|
+
*/
|
|
6232
|
+
getWarehouses() {
|
|
6233
|
+
return this.getTypedDataArrayRequester(ge, "/public/references/warehouse", !0);
|
|
6234
|
+
}
|
|
6235
|
+
/**
|
|
6236
|
+
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
6237
|
+
*/
|
|
6238
|
+
getPropertyTypes() {
|
|
6239
|
+
return this.getTypedDataArrayRequester(vr, "/internal/references/property-type", !0);
|
|
6240
|
+
}
|
|
6241
|
+
/**
|
|
6242
|
+
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
6243
|
+
*/
|
|
6244
|
+
getPriceCoefficients() {
|
|
6245
|
+
return this.getTypedDataArrayRequester(Pe, "/internal/references/price-coefficient", !0);
|
|
6246
|
+
}
|
|
6247
|
+
/**
|
|
6248
|
+
* Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
|
|
6249
|
+
*/
|
|
6250
|
+
getProductFileType() {
|
|
6251
|
+
return this.getTypedDataArrayRequester(kt, "/public/references/product-file-type", !0);
|
|
6252
|
+
}
|
|
6253
|
+
}
|
|
6254
|
+
const b = z("common.references_private", () => {
|
|
6255
|
+
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), p = 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);
|
|
6256
|
+
return {
|
|
6257
|
+
/**
|
|
6258
|
+
* Список загружаемых/загруженных на данный момент значений.
|
|
6259
|
+
*/
|
|
6260
|
+
dataLoaderList: n,
|
|
6261
|
+
/**
|
|
6262
|
+
* Справочник каналов первичного интереса.
|
|
6263
|
+
*/
|
|
6264
|
+
channelPrimaryInterestReference: r,
|
|
6265
|
+
/**
|
|
6266
|
+
* Справочник должностей контактных лиц.
|
|
6267
|
+
*/
|
|
6268
|
+
contactPositionsReference: e,
|
|
6269
|
+
/**
|
|
6270
|
+
* Справочник валют.
|
|
6271
|
+
*/
|
|
6272
|
+
currencyReference: s,
|
|
6273
|
+
/**
|
|
6274
|
+
* Справочник типов доставки.
|
|
6275
|
+
*/
|
|
6276
|
+
deliveryTypeReference: i,
|
|
6277
|
+
/**
|
|
6278
|
+
* Список менеджеров.
|
|
6279
|
+
*/
|
|
6280
|
+
managersList: o,
|
|
6281
|
+
/**
|
|
6282
|
+
* Справочник организационно-правовых форм.
|
|
6283
|
+
*/
|
|
6284
|
+
opfReference: c,
|
|
6285
|
+
/**
|
|
6286
|
+
* Справочник операторов.
|
|
6287
|
+
*/
|
|
6288
|
+
operatorReference: u,
|
|
6289
|
+
/**
|
|
6290
|
+
* Справочник статусов оплаты заказа.
|
|
6291
|
+
*/
|
|
6292
|
+
orderPaymentStatusReference: p,
|
|
6293
|
+
/**
|
|
6294
|
+
* Справочник статусов заказов.
|
|
6295
|
+
*/
|
|
6296
|
+
orderStatusReference: m,
|
|
6297
|
+
/**
|
|
6298
|
+
* Справочник типов оплаты заказов.
|
|
6299
|
+
*/
|
|
6300
|
+
paymentTypeReference: f,
|
|
6301
|
+
/**
|
|
6302
|
+
* Справочник групп партнеров.
|
|
6303
|
+
*/
|
|
6304
|
+
partnerGroupReference: D,
|
|
6305
|
+
/**
|
|
6306
|
+
* Справочник типов файлов продукктов/категорий.
|
|
6307
|
+
*/
|
|
6308
|
+
productFileTypeReference: te,
|
|
6309
|
+
/**
|
|
6310
|
+
* Справочник типов ресурсов.
|
|
6311
|
+
*/
|
|
6312
|
+
resourceTypesReference: se,
|
|
6313
|
+
/**
|
|
6314
|
+
* Справочник направлений продаж.
|
|
6315
|
+
*/
|
|
6316
|
+
salesDirectionsReference: W,
|
|
6317
|
+
/**
|
|
6318
|
+
* Справочник источников первичного интереса.
|
|
6319
|
+
*/
|
|
6320
|
+
sourcePrimaryInterestReference: J,
|
|
6321
|
+
/**
|
|
6322
|
+
* Справочник складов.
|
|
6323
|
+
*/
|
|
6324
|
+
warehousesReference: Te,
|
|
6325
|
+
/**
|
|
6326
|
+
* Справочник типов свойств.
|
|
6327
|
+
*/
|
|
6328
|
+
propertyTypesReference: $e,
|
|
6329
|
+
/**
|
|
6330
|
+
* Справочник коэффициентов цен.
|
|
6331
|
+
*/
|
|
6332
|
+
priceCoefficientsReference: l
|
|
6333
|
+
};
|
|
6334
|
+
}), Cs = z("common.references", () => {
|
|
6335
|
+
const n = A(() => {
|
|
6336
|
+
const l = b();
|
|
6337
|
+
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(S).getChannelPrimaryInterest().then((g) => {
|
|
6338
|
+
l.channelPrimaryInterestReference = g;
|
|
6339
|
+
}).catch(w)), l.channelPrimaryInterestReference;
|
|
6340
|
+
}), r = A(() => {
|
|
6341
|
+
const l = b();
|
|
6342
|
+
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(S).getContactPositions().then((g) => {
|
|
6343
|
+
l.contactPositionsReference = g;
|
|
6344
|
+
}).catch(w)), l.contactPositionsReference;
|
|
6345
|
+
}), e = A(() => {
|
|
6346
|
+
const l = b();
|
|
6347
|
+
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(S).getCurrency().then((g) => {
|
|
6348
|
+
l.currencyReference = g;
|
|
6349
|
+
}).catch(w)), l.currencyReference;
|
|
6350
|
+
}), s = A(() => {
|
|
6351
|
+
const l = b();
|
|
6352
|
+
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(S).getOpf().then((g) => {
|
|
6353
|
+
l.opfReference = g;
|
|
6354
|
+
}).catch(w)), l.opfReference;
|
|
6355
|
+
}), i = A(() => {
|
|
6356
|
+
const l = b();
|
|
6357
|
+
return !l.operatorReference && !l.dataLoaderList.operatorReference && (l.dataLoaderList.operatorReference = !0, h.getInstance(S).getOperators().then((g) => {
|
|
6358
|
+
l.operatorReference = g;
|
|
6359
|
+
}).catch(w)), l.operatorReference;
|
|
6360
|
+
}), o = A(() => {
|
|
6361
|
+
const l = b();
|
|
6362
|
+
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(S).getOrderPaymentStatuses().then((g) => {
|
|
6363
|
+
l.orderPaymentStatusReference = g;
|
|
6364
|
+
}).catch(w)), l.orderPaymentStatusReference;
|
|
6365
|
+
}), c = A(() => {
|
|
6366
|
+
const l = b();
|
|
6367
|
+
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(S).getOrderStatuses().then((g) => {
|
|
6368
|
+
l.orderStatusReference = g;
|
|
6369
|
+
}).catch(w)), l.orderStatusReference;
|
|
6370
|
+
}), u = A(() => {
|
|
6371
|
+
const l = b();
|
|
6372
|
+
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(S).getPaymentTypes().then((g) => {
|
|
6373
|
+
l.paymentTypeReference = g;
|
|
6374
|
+
}).catch(w)), l.paymentTypeReference;
|
|
6375
|
+
}), p = A(() => {
|
|
6376
|
+
const l = b();
|
|
6377
|
+
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(S).getPartnerGroup().then((g) => {
|
|
6378
|
+
l.partnerGroupReference = g;
|
|
6379
|
+
}).catch(w)), l.partnerGroupReference;
|
|
6380
|
+
}), m = A(() => {
|
|
6381
|
+
const l = b();
|
|
6382
|
+
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(S).getProductFileType().then((g) => {
|
|
6383
|
+
l.productFileTypeReference = g;
|
|
6384
|
+
}).catch(w)), l.productFileTypeReference;
|
|
6385
|
+
}), f = A(() => {
|
|
6386
|
+
const l = b();
|
|
6387
|
+
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(S).getResourceTypes().then((g) => {
|
|
6388
|
+
l.resourceTypesReference = g;
|
|
6389
|
+
}).catch(w)), l.resourceTypesReference;
|
|
6390
|
+
}), D = A(() => {
|
|
6391
|
+
const l = b();
|
|
6392
|
+
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(S).getSalesDirections().then((g) => {
|
|
6393
|
+
l.salesDirectionsReference = g;
|
|
6394
|
+
}).catch(w)), l.salesDirectionsReference;
|
|
6395
|
+
}), te = A(() => {
|
|
6396
|
+
const l = b();
|
|
6397
|
+
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(S).getSourcePrimaryInterest().then((g) => {
|
|
6398
|
+
l.sourcePrimaryInterestReference = g;
|
|
6399
|
+
}).catch(w)), l.sourcePrimaryInterestReference;
|
|
6400
|
+
}), se = A(() => {
|
|
6401
|
+
const l = b();
|
|
6402
|
+
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(S).getDeliveryTypes().then((g) => {
|
|
6403
|
+
l.deliveryTypeReference = g;
|
|
6404
|
+
}).catch(w)), l.deliveryTypeReference;
|
|
6405
|
+
}), W = A(() => {
|
|
6406
|
+
const l = b();
|
|
6407
|
+
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(Ct).getManagers().then((g) => {
|
|
6408
|
+
l.managersList = g;
|
|
6409
|
+
}).catch(w)), l.managersList;
|
|
6410
|
+
}), J = A(() => {
|
|
6411
|
+
const l = b();
|
|
6412
|
+
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(S).getWarehouses().then((g) => {
|
|
6413
|
+
l.warehousesReference = g;
|
|
6414
|
+
}).catch(w)), l.warehousesReference;
|
|
6415
|
+
}), Te = A(() => {
|
|
6416
|
+
const l = b();
|
|
6417
|
+
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(S).getPropertyTypes().then((g) => {
|
|
6418
|
+
l.propertyTypesReference = g;
|
|
6419
|
+
}).catch(w)), l.propertyTypesReference;
|
|
6420
|
+
}), $e = A(() => {
|
|
6421
|
+
const l = b();
|
|
6422
|
+
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(S).getPriceCoefficients().then((g) => {
|
|
6423
|
+
l.priceCoefficientsReference = g;
|
|
6424
|
+
}).catch(w)), l.priceCoefficientsReference;
|
|
6425
|
+
});
|
|
6426
|
+
return {
|
|
6427
|
+
/**
|
|
6428
|
+
* Справочник каналов первичного интереса.
|
|
6239
6429
|
*/
|
|
6240
|
-
|
|
6430
|
+
channelPrimaryInterestsReference: n,
|
|
6241
6431
|
/**
|
|
6242
|
-
*
|
|
6432
|
+
* Справочник должностей контактных лиц.
|
|
6243
6433
|
*/
|
|
6244
|
-
|
|
6434
|
+
contactPositionsReference: r,
|
|
6245
6435
|
/**
|
|
6246
|
-
*
|
|
6436
|
+
* Справочник валют.
|
|
6247
6437
|
*/
|
|
6248
|
-
|
|
6438
|
+
currencyReference: e,
|
|
6249
6439
|
/**
|
|
6250
|
-
*
|
|
6440
|
+
* Справочник организационно-правовых форм.
|
|
6251
6441
|
*/
|
|
6252
|
-
|
|
6442
|
+
opfReference: s,
|
|
6253
6443
|
/**
|
|
6254
|
-
*
|
|
6444
|
+
* Справочник операторов.
|
|
6255
6445
|
*/
|
|
6256
|
-
|
|
6257
|
-
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) ?? je.Product;
|
|
6258
|
-
}
|
|
6259
|
-
}
|
|
6260
|
-
const xe = (n) => {
|
|
6261
|
-
var r, e, s, i, o;
|
|
6262
|
-
return n ? or(
|
|
6263
|
-
{
|
|
6264
|
-
cities: (r = n.cities) == null ? void 0 : r.map((c) => c.id),
|
|
6265
|
-
clients: (e = n.clients) == null ? void 0 : e.map((c) => c.id),
|
|
6266
|
-
managers: (s = n.managers) == null ? void 0 : s.map((c) => c.id),
|
|
6267
|
-
partnerGroups: (i = n.partnerGroups) == null ? void 0 : i.map((c) => c.id),
|
|
6268
|
-
salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
|
|
6269
|
-
hideNotActive: n.hideNotActive
|
|
6270
|
-
},
|
|
6271
|
-
(c) => T(c) || (H(c) || cr(c)) && Y(c)
|
|
6272
|
-
) : {};
|
|
6273
|
-
}, rr = (n) => {
|
|
6274
|
-
const r = {};
|
|
6275
|
-
return n.from && (n.from.coefficient || n.from.value) && (r.from = {}, n.from.coefficient && (r.from.priceCoefficientId = n.from.coefficient.id), n.from.value && (r.from.increasePercent = n.from.value)), n.to && (n.to.coefficient || n.to.value) && (r.to = {}, n.to.coefficient && (r.to.priceCoefficientId = n.to.coefficient.id), n.to.value && (r.to.increasePercent = n.to.value)), r;
|
|
6276
|
-
};
|
|
6277
|
-
class ws extends p {
|
|
6278
|
-
/**
|
|
6279
|
-
* Возвращает список клиентских цен на продукты в указанном диапазоне цены.
|
|
6280
|
-
*
|
|
6281
|
-
* @param productId Идентификатор продукта.
|
|
6282
|
-
* @param params Параметры анализа цен.
|
|
6283
|
-
* @param filters Параметры фильтрации данных.
|
|
6284
|
-
*
|
|
6285
|
-
* @see /doc/api/internal#/operations/api_internal_catalog_price_products_analyze
|
|
6286
|
-
*/
|
|
6287
|
-
analyzeProductPrices(r, e, s) {
|
|
6288
|
-
return this.get(
|
|
6289
|
-
`/internal/price/products/${r}/analyze`,
|
|
6290
|
-
{
|
|
6291
|
-
...rr(e),
|
|
6292
|
-
filters: xe(s)
|
|
6293
|
-
},
|
|
6294
|
-
(i) => i.data.map((o) => new de(o))
|
|
6295
|
-
);
|
|
6296
|
-
}
|
|
6297
|
-
/**
|
|
6298
|
-
* Возвращает список клиентских цен на продукты категории в указанном диапазоне цены.
|
|
6299
|
-
*
|
|
6300
|
-
* @param productCategoryId Идентификатор категории продукта.
|
|
6301
|
-
* @param params Параметры анализа цен.
|
|
6302
|
-
* @param filters Параметры фильтрации данных.
|
|
6303
|
-
*
|
|
6304
|
-
* @see /doc/api/internal#/operations/api_internal_catalog_price_categories_analyze
|
|
6305
|
-
*/
|
|
6306
|
-
analyzeCategoryPrices(r, e, s) {
|
|
6307
|
-
return this.get(
|
|
6308
|
-
`/internal/price/categories/${r}/analyze`,
|
|
6309
|
-
{
|
|
6310
|
-
...rr(e),
|
|
6311
|
-
filters: xe(s)
|
|
6312
|
-
},
|
|
6313
|
-
(i) => i.data.map((o) => new de(o))
|
|
6314
|
-
);
|
|
6315
|
-
}
|
|
6316
|
-
/**
|
|
6317
|
-
* Возвращает список клиентских цен на продукты категории в указанном диапазоне цены за квадратный метр.
|
|
6318
|
-
*
|
|
6319
|
-
* @param productCategoryId Идентификатор категории продукта.
|
|
6320
|
-
* @param params Параметры анализа цен.
|
|
6321
|
-
* @param params.from Цена больше или равна значению.
|
|
6322
|
-
* @param params.to Цена меньше или равна значению.
|
|
6323
|
-
* @param filters Параметры фильтрации данных.
|
|
6324
|
-
*
|
|
6325
|
-
* @see /doc/api/internal#/operations/api_internal_catalog_price_categories_analyze_by_square
|
|
6326
|
-
*/
|
|
6327
|
-
analyzeCategoryPricesBySquare(r, e, s) {
|
|
6328
|
-
return this.get(
|
|
6329
|
-
`/internal/price/categories/${r}/analyze/square`,
|
|
6330
|
-
{
|
|
6331
|
-
...e,
|
|
6332
|
-
filters: xe(s)
|
|
6333
|
-
},
|
|
6334
|
-
(i) => i.data.map((o) => new de(o))
|
|
6335
|
-
);
|
|
6336
|
-
}
|
|
6337
|
-
}
|
|
6338
|
-
class St {
|
|
6339
|
-
/**
|
|
6340
|
-
* Инициализирует экземпляр класса {@link PriceHistoryItem}.
|
|
6341
|
-
*
|
|
6342
|
-
* @param data Данные для первоначальной инициализации.
|
|
6343
|
-
*/
|
|
6344
|
-
constructor(r) {
|
|
6446
|
+
operatorReference: i,
|
|
6345
6447
|
/**
|
|
6346
|
-
*
|
|
6448
|
+
* Справочник статусов оплаты заказа.
|
|
6347
6449
|
*/
|
|
6348
|
-
|
|
6450
|
+
orderPaymentStatusReference: o,
|
|
6349
6451
|
/**
|
|
6350
|
-
*
|
|
6452
|
+
* Справочник статусов заказов.
|
|
6351
6453
|
*/
|
|
6352
|
-
|
|
6454
|
+
orderStatusReference: c,
|
|
6353
6455
|
/**
|
|
6354
|
-
*
|
|
6456
|
+
* Справочник типов оплаты заказов.
|
|
6355
6457
|
*/
|
|
6356
|
-
|
|
6458
|
+
paymentTypeReference: u,
|
|
6357
6459
|
/**
|
|
6358
|
-
*
|
|
6460
|
+
* Справочник групп партнеров.
|
|
6359
6461
|
*/
|
|
6360
|
-
|
|
6462
|
+
partnerGroupsReference: p,
|
|
6361
6463
|
/**
|
|
6362
|
-
*
|
|
6464
|
+
* Справочник типов файлов продуктов/категорий.
|
|
6363
6465
|
*/
|
|
6364
|
-
|
|
6466
|
+
productFilesTypesReference: m,
|
|
6365
6467
|
/**
|
|
6366
|
-
*
|
|
6468
|
+
* Справочник типов ресурсов.
|
|
6367
6469
|
*/
|
|
6368
|
-
|
|
6470
|
+
resourceTypesReference: f,
|
|
6369
6471
|
/**
|
|
6370
|
-
*
|
|
6472
|
+
* Справочник направлений продаж.
|
|
6371
6473
|
*/
|
|
6372
|
-
|
|
6474
|
+
salesDirectionsReference: D,
|
|
6373
6475
|
/**
|
|
6374
|
-
*
|
|
6476
|
+
* Справочник каналов первичного интереса.
|
|
6375
6477
|
*/
|
|
6376
|
-
|
|
6478
|
+
sourcePrimaryInterestsReference: te,
|
|
6377
6479
|
/**
|
|
6378
|
-
*
|
|
6480
|
+
* Справочник типов доставки.
|
|
6379
6481
|
*/
|
|
6380
|
-
|
|
6482
|
+
deliveryTypeReference: se,
|
|
6381
6483
|
/**
|
|
6382
|
-
*
|
|
6484
|
+
* Список менеджеров.
|
|
6383
6485
|
*/
|
|
6384
|
-
|
|
6385
|
-
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 x(r.client) : void 0, this.executor = r.executor ? new x(r.executor) : void 0, this.currency = r.currency ? new a(r.currency) : void 0;
|
|
6386
|
-
}
|
|
6387
|
-
}
|
|
6388
|
-
class kt extends le {
|
|
6389
|
-
/**
|
|
6390
|
-
* Инициализирует экземпляр класса {@link ProductPriceHistory}.
|
|
6391
|
-
*
|
|
6392
|
-
* @param data Данные для первоначальной инициализации.
|
|
6393
|
-
*/
|
|
6394
|
-
constructor(e) {
|
|
6395
|
-
super(e);
|
|
6486
|
+
managersList: W,
|
|
6396
6487
|
/**
|
|
6397
|
-
*
|
|
6488
|
+
* Справочник складов.
|
|
6398
6489
|
*/
|
|
6399
|
-
|
|
6400
|
-
this.history = he(e.history, (s) => new St(s));
|
|
6401
|
-
}
|
|
6402
|
-
}
|
|
6403
|
-
class vs extends p {
|
|
6404
|
-
/**
|
|
6405
|
-
* Возвращает данные об истории изменения цен.
|
|
6406
|
-
*
|
|
6407
|
-
* @param filters Фильтры для поиска истории изменения цен.
|
|
6408
|
-
*
|
|
6409
|
-
* @see /docs/api#/operations/api_internal_price_history_get
|
|
6410
|
-
*/
|
|
6411
|
-
getProductPriceHistory(r) {
|
|
6412
|
-
var o, c, u, h, m;
|
|
6413
|
-
const e = L().config.dateFormats.api, s = or(
|
|
6414
|
-
ce(r, {
|
|
6415
|
-
costDate: {
|
|
6416
|
-
from: ae((o = r.costDate) == null ? void 0 : o.from) ? U(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
|
|
6417
|
-
to: ae((u = r.costDate) == null ? void 0 : u.to) ? U(r.costDate.to, e) : (h = r.costDate) == null ? void 0 : h.to
|
|
6418
|
-
}
|
|
6419
|
-
}),
|
|
6420
|
-
(f) => T(f) || (H(f) || cr(f)) && Y(f)
|
|
6421
|
-
), i = ((m = r.product) == null ? void 0 : m[0]) ?? 0;
|
|
6422
|
-
return delete s.product, this.get(`/internal/price/products/${i}/history`, s).then((f) => [
|
|
6423
|
-
new kt(ce(f[0], { history: f }))
|
|
6424
|
-
]);
|
|
6425
|
-
}
|
|
6426
|
-
}
|
|
6427
|
-
class tr {
|
|
6428
|
-
/**
|
|
6429
|
-
* Инициализирует экземпляр класса {@link RecommendationsList}.
|
|
6430
|
-
*
|
|
6431
|
-
* @param data Данные для первоначальной инициализации.
|
|
6432
|
-
*/
|
|
6433
|
-
constructor(r) {
|
|
6490
|
+
warehousesReference: J,
|
|
6434
6491
|
/**
|
|
6435
|
-
*
|
|
6492
|
+
* Справочник типов свойств.
|
|
6436
6493
|
*/
|
|
6437
|
-
|
|
6494
|
+
propertyTypesReference: Te,
|
|
6438
6495
|
/**
|
|
6439
|
-
*
|
|
6496
|
+
* Справочник коэффициентов цен.
|
|
6440
6497
|
*/
|
|
6441
|
-
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
}
|
|
6445
|
-
class Cs extends p {
|
|
6446
|
-
/**
|
|
6447
|
-
* Возвращает данные о рекомендациях указанной категории продуктов.
|
|
6448
|
-
*
|
|
6449
|
-
* @param productCategory Данные о категории продуктов, для которой необходимо получить рекомендации.
|
|
6450
|
-
* @see /docs/api#/operations/api_internal_recommendations_product_category_get
|
|
6451
|
-
*/
|
|
6452
|
-
getProductCategoryRecommendations(r) {
|
|
6453
|
-
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new tr(e.data));
|
|
6454
|
-
}
|
|
6455
|
-
/**
|
|
6456
|
-
* Возвращает данные о рекомендациях указанного продукта.
|
|
6457
|
-
*
|
|
6458
|
-
* @param product Данные о продукте, для которого необходимо получить рекомендации.
|
|
6459
|
-
* @see /docs/api#/operations/api_internal_recommendations_product_get
|
|
6460
|
-
*/
|
|
6461
|
-
getProductRecommendations(r) {
|
|
6462
|
-
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new tr(e.data));
|
|
6463
|
-
}
|
|
6464
|
-
/**
|
|
6465
|
-
* Выполняет сохранение данных о рекомендуемых категориях продуктов.
|
|
6466
|
-
*
|
|
6467
|
-
* @param productCategory Данные о категории для которой необходимо сохранить список рекомендуемых товаров.
|
|
6468
|
-
* @param recommendations Список рекомендованных продуктов и категорий.
|
|
6469
|
-
* @see /docs/api#/operations/api_internal_recommendations_product_category_save
|
|
6470
|
-
*/
|
|
6471
|
-
saveProductCategoryRecommendations(r, e) {
|
|
6472
|
-
return this.post(`/internal/catalog/recommendations/categories/${r.id}`, {
|
|
6473
|
-
product_categories: e.productCategories.map((s) => s.id),
|
|
6474
|
-
products: e.products.map((s) => s.id)
|
|
6475
|
-
});
|
|
6476
|
-
}
|
|
6477
|
-
/**
|
|
6478
|
-
* Выполняет сохранение данных о рекомендуемых продуктах.
|
|
6479
|
-
*
|
|
6480
|
-
* @param product Данные о продукте для которого необходимо сохранить список рекомендуемых товаров.
|
|
6481
|
-
* @param recommendations Список рекомендованных продуктов и категорий.
|
|
6482
|
-
* @see /docs/api#/operations/api_internal_recommendations_product_save
|
|
6483
|
-
*/
|
|
6484
|
-
saveProductRecommendations(r, e) {
|
|
6485
|
-
return this.post(`/internal/catalog/recommendations/products/${r.id}`, {
|
|
6486
|
-
product_categories: e.productCategories.map((s) => s.id),
|
|
6487
|
-
products: e.products.map((s) => s.id)
|
|
6488
|
-
});
|
|
6489
|
-
}
|
|
6490
|
-
}
|
|
6498
|
+
priceCoefficientsReference: $e
|
|
6499
|
+
};
|
|
6500
|
+
});
|
|
6491
6501
|
class It {
|
|
6492
6502
|
/**
|
|
6493
6503
|
* Инициализирует экземпляр класса {@link MetaTagItem}.
|
|
@@ -6506,7 +6516,7 @@ class It {
|
|
|
6506
6516
|
this.name = r.name, this.content = r.content;
|
|
6507
6517
|
}
|
|
6508
6518
|
}
|
|
6509
|
-
class
|
|
6519
|
+
class ir {
|
|
6510
6520
|
/**
|
|
6511
6521
|
* Инициализирует экземпляр класса {@link Seo}.
|
|
6512
6522
|
*
|
|
@@ -6546,10 +6556,10 @@ class sr {
|
|
|
6546
6556
|
*/
|
|
6547
6557
|
t(this, "tags");
|
|
6548
6558
|
var e;
|
|
6549
|
-
this.resourceType = new
|
|
6559
|
+
this.resourceType = new Lr(r == null ? void 0 : r.resourceType), this.resourceId = (r == null ? void 0 : r.resourceId) ?? "", this.h1 = r == null ? void 0 : r.h1, this.title = r == null ? void 0 : r.title, this.description = r == null ? void 0 : r.description, this.keywords = r == null ? void 0 : r.keywords, this.meta = ((e = r == null ? void 0 : r.meta) == null ? void 0 : e.map((s) => new It(s))) ?? [], this.tags = r == null ? void 0 : r.tags;
|
|
6550
6560
|
}
|
|
6551
6561
|
}
|
|
6552
|
-
class Rs extends
|
|
6562
|
+
class Rs extends h {
|
|
6553
6563
|
/**
|
|
6554
6564
|
* Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
|
|
6555
6565
|
*
|
|
@@ -6557,7 +6567,7 @@ class Rs extends p {
|
|
|
6557
6567
|
* @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
|
|
6558
6568
|
*/
|
|
6559
6569
|
getResourceSeoData(r, e) {
|
|
6560
|
-
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new
|
|
6570
|
+
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new ir(s.data));
|
|
6561
6571
|
}
|
|
6562
6572
|
/**
|
|
6563
6573
|
* Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
|
|
@@ -6568,7 +6578,7 @@ class Rs extends p {
|
|
|
6568
6578
|
* в случае ошибок в запросах.
|
|
6569
6579
|
*/
|
|
6570
6580
|
saveResourceSeoData(r, e = {}) {
|
|
6571
|
-
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new
|
|
6581
|
+
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new ir(s.data), e);
|
|
6572
6582
|
}
|
|
6573
6583
|
/**
|
|
6574
6584
|
* Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
|
|
@@ -6580,7 +6590,7 @@ class Rs extends p {
|
|
|
6580
6590
|
return this.delete(`/internal/seo/${r.slug}/${e}`);
|
|
6581
6591
|
}
|
|
6582
6592
|
}
|
|
6583
|
-
class Ps extends
|
|
6593
|
+
class Ps extends h {
|
|
6584
6594
|
/**
|
|
6585
6595
|
* Возвращает подсказки по адресам.
|
|
6586
6596
|
*
|
|
@@ -6655,7 +6665,7 @@ class dt extends wr {
|
|
|
6655
6665
|
this.type = e == null ? void 0 : e.type, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.photo = e == null ? void 0 : e.photo, this.pricingRole = e != null && e.pricingRole ? new fr(e.pricingRole) : void 0;
|
|
6656
6666
|
}
|
|
6657
6667
|
}
|
|
6658
|
-
class As extends
|
|
6668
|
+
class As extends h {
|
|
6659
6669
|
/**
|
|
6660
6670
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
6661
6671
|
*/
|
|
@@ -6671,7 +6681,7 @@ class As extends p {
|
|
|
6671
6681
|
return this.get("internal/users/current-tokens").then((r) => r.accessToken);
|
|
6672
6682
|
}
|
|
6673
6683
|
}
|
|
6674
|
-
class
|
|
6684
|
+
class at extends h {
|
|
6675
6685
|
/**
|
|
6676
6686
|
* Возвращает данные о текущем пользователе.
|
|
6677
6687
|
*/
|
|
@@ -6680,7 +6690,7 @@ class xt extends p {
|
|
|
6680
6690
|
return this.get("/internal/users/info", {}, (r) => new dt(r.data), !0);
|
|
6681
6691
|
}
|
|
6682
6692
|
}
|
|
6683
|
-
const
|
|
6693
|
+
const xt = z("common.user_state_private", () => {
|
|
6684
6694
|
const n = y({}), r = y(void 0);
|
|
6685
6695
|
return {
|
|
6686
6696
|
/**
|
|
@@ -6697,8 +6707,8 @@ const at = z("common.user_state_private", () => {
|
|
|
6697
6707
|
* Данные о текущем пользователе.
|
|
6698
6708
|
*/
|
|
6699
6709
|
currentUser: A(() => {
|
|
6700
|
-
const r =
|
|
6701
|
-
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0,
|
|
6710
|
+
const r = xt();
|
|
6711
|
+
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(at).getCurrentUser().then((e) => {
|
|
6702
6712
|
r.currentUser = e;
|
|
6703
6713
|
}).catch(w).finally(() => {
|
|
6704
6714
|
r.dataLoaderList.currentUser = !1;
|
|
@@ -6729,22 +6739,22 @@ class Ts {
|
|
|
6729
6739
|
}
|
|
6730
6740
|
}
|
|
6731
6741
|
export {
|
|
6732
|
-
|
|
6742
|
+
Tt as AnyReference,
|
|
6733
6743
|
rt as AppBaseConfig,
|
|
6734
6744
|
qe as BankAccount,
|
|
6735
6745
|
De as BasePaginationProvider,
|
|
6736
|
-
|
|
6746
|
+
ct as CalculationTypeEnum,
|
|
6737
6747
|
ye as Cart,
|
|
6738
6748
|
Bt as CartProvider,
|
|
6739
6749
|
Wt as CatalogProvider,
|
|
6740
|
-
|
|
6741
|
-
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
|
|
6750
|
+
hr as CatalogableItem,
|
|
6751
|
+
q as Category,
|
|
6752
|
+
Ye as CategoryPricingRule,
|
|
6753
|
+
Ar as ChannelPrimaryInterest,
|
|
6754
|
+
ws as City,
|
|
6745
6755
|
Ae as CityWithRegionAndCountry,
|
|
6746
|
-
|
|
6747
|
-
|
|
6756
|
+
rr as Client,
|
|
6757
|
+
ft as ClientAdditionalData,
|
|
6748
6758
|
ve as ClientCategory,
|
|
6749
6759
|
d as ClientDataProvider,
|
|
6750
6760
|
Jt as ClientPriceProvider,
|
|
@@ -6753,80 +6763,77 @@ export {
|
|
|
6753
6763
|
Qt as ClientProductCategoryDataProvider,
|
|
6754
6764
|
Yt as ClientProductDataProvider,
|
|
6755
6765
|
re as ClientShortInfo,
|
|
6756
|
-
|
|
6757
|
-
|
|
6766
|
+
pt as ClientsAdditionalDataRequestTypeEnum,
|
|
6767
|
+
ts as ClientsListFilters,
|
|
6758
6768
|
le as CodedIdentity,
|
|
6759
|
-
|
|
6760
|
-
|
|
6769
|
+
ns as ConfiguratorProvider,
|
|
6770
|
+
wt as ConfiguratorsEnum,
|
|
6761
6771
|
Ne as Contact,
|
|
6762
6772
|
mr as ContactLinks,
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
|
|
6773
|
+
G as ContactPerson,
|
|
6774
|
+
yt as ContactPersonRelated,
|
|
6775
|
+
$t as ContactPosition,
|
|
6766
6776
|
Ie as ContactRelation,
|
|
6767
|
-
|
|
6777
|
+
Cr as ContragentBase,
|
|
6768
6778
|
Ce as ContragentFactory,
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6779
|
+
Rr as ContragentIc,
|
|
6780
|
+
ht as ContragentPerson,
|
|
6781
|
+
gt as ContragentUlNr,
|
|
6782
|
+
Pr as ContragentUlR,
|
|
6773
6783
|
je as CostSourceEnum,
|
|
6774
6784
|
X as Country,
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
|
|
6785
|
+
ze as CuratedDirection,
|
|
6786
|
+
We as Curator,
|
|
6787
|
+
O as Currency,
|
|
6778
6788
|
Ps as DataSuggestionProvider,
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
os as DataTableSortRequestParams,
|
|
6782
|
-
ps as DateTimeProvider,
|
|
6783
|
-
tt as DeletableNamedIdentity,
|
|
6789
|
+
ls as DateTimeProvider,
|
|
6790
|
+
mt as DeletableNamedIdentity,
|
|
6784
6791
|
Re as DeliveryAddress,
|
|
6785
|
-
|
|
6792
|
+
U as DeliveryType,
|
|
6786
6793
|
jt as DetailedJwtPayload,
|
|
6787
6794
|
Yr as DeviceTypeResolutionConfig,
|
|
6788
|
-
|
|
6795
|
+
tt as DiscountShortInfo,
|
|
6789
6796
|
Ts as FieldValidationResultData,
|
|
6790
6797
|
j as FilterGroup,
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
6798
|
+
Xe as FilterItem,
|
|
6799
|
+
Je as FilterOpEnum,
|
|
6800
|
+
pr as GeoCoordinates,
|
|
6794
6801
|
it as HiddenCatalogableItem,
|
|
6795
6802
|
pe as HttpCachedRequester,
|
|
6796
6803
|
Xr as HttpParamsConfig,
|
|
6797
|
-
|
|
6804
|
+
h as HttpRequester,
|
|
6798
6805
|
ee as Identity,
|
|
6799
|
-
|
|
6806
|
+
nt as Image,
|
|
6800
6807
|
F as JwtPayload,
|
|
6801
6808
|
fe as Manager,
|
|
6802
|
-
|
|
6803
|
-
|
|
6804
|
-
|
|
6809
|
+
Be as ManagerCommon,
|
|
6810
|
+
ps as ManagerDataFactory,
|
|
6811
|
+
Ct as ManagerDataProvider,
|
|
6805
6812
|
It as MetaTagItem,
|
|
6806
6813
|
k as NamedIdentity,
|
|
6807
|
-
|
|
6808
|
-
|
|
6809
|
-
|
|
6814
|
+
kr as Operator,
|
|
6815
|
+
B as Opf,
|
|
6816
|
+
N as OpfEnum,
|
|
6810
6817
|
Le as Order,
|
|
6811
|
-
|
|
6812
|
-
|
|
6818
|
+
Sr as OrderInfo,
|
|
6819
|
+
Rt as OrderItem,
|
|
6813
6820
|
gr as OrderItemBase,
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
+
bt as OrderPaymentStatus,
|
|
6822
|
+
$r as OrderShortInfo,
|
|
6823
|
+
St as OrderStatus,
|
|
6824
|
+
Dt as OrderStatusEnum,
|
|
6825
|
+
gs as OrdersDataProvider,
|
|
6826
|
+
hs as OrdersListFilters,
|
|
6827
|
+
Tr as PaginationFiltersBase,
|
|
6821
6828
|
Z as PartnerGroup,
|
|
6822
|
-
|
|
6829
|
+
Ir as PaymentType,
|
|
6823
6830
|
we as PreferencesStorageProvider,
|
|
6824
6831
|
de as PriceAnalyze,
|
|
6825
|
-
|
|
6832
|
+
ms as PriceAnalyzeProvider,
|
|
6826
6833
|
Pe as PriceCoefficient,
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6834
|
+
ur as PriceCoefficientEnum,
|
|
6835
|
+
fs as PriceHistoryDataProvider,
|
|
6836
|
+
Pt as PriceHistoryItem,
|
|
6830
6837
|
K as PriceTemplate,
|
|
6831
6838
|
Se as PriceTemplateCategory,
|
|
6832
6839
|
ie as PriceTemplateClient,
|
|
@@ -6839,49 +6846,52 @@ export {
|
|
|
6839
6846
|
I as Product,
|
|
6840
6847
|
Vt as ProductCategoryDataProvider,
|
|
6841
6848
|
Kt as ProductDataProvider,
|
|
6842
|
-
|
|
6849
|
+
kt as ProductFileType,
|
|
6843
6850
|
Me as ProductPriceCoefficient,
|
|
6844
|
-
|
|
6845
|
-
|
|
6851
|
+
At as ProductPriceHistory,
|
|
6852
|
+
Qe as ProductUnit,
|
|
6846
6853
|
es as PropertiesProvider,
|
|
6847
6854
|
ne as Property,
|
|
6848
6855
|
vr as PropertyType,
|
|
6849
|
-
|
|
6856
|
+
lt as PropertyTypeEnum,
|
|
6850
6857
|
V as PropertyValue,
|
|
6851
|
-
|
|
6852
|
-
|
|
6858
|
+
ys as RecommendationsDataProvider,
|
|
6859
|
+
sr as RecommendationsList,
|
|
6853
6860
|
R as Reference,
|
|
6854
|
-
|
|
6855
|
-
|
|
6861
|
+
vs as ReferenceDataFactory,
|
|
6862
|
+
S as ReferenceDataProvider,
|
|
6856
6863
|
ue as Region,
|
|
6857
|
-
|
|
6858
|
-
|
|
6864
|
+
Lr as ResourceType,
|
|
6865
|
+
_ as SalesDirection,
|
|
6859
6866
|
Zr as SentryConfig,
|
|
6860
|
-
|
|
6867
|
+
ir as Seo,
|
|
6861
6868
|
Rs as SeoDataProvider,
|
|
6862
6869
|
Dr as SourcePrimaryInterest,
|
|
6863
|
-
|
|
6870
|
+
st as StockCount,
|
|
6871
|
+
os as TableDataPagination,
|
|
6872
|
+
vt as TableDataPaginationRequestParams,
|
|
6873
|
+
cs as TableDataSortRequestParams,
|
|
6864
6874
|
rs as TemplateProductCategoryDataProvider,
|
|
6865
6875
|
zt as TemplatesListFilters,
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6876
|
+
Ge as TypedInstanceFactory,
|
|
6877
|
+
br as UnitsHelper,
|
|
6878
|
+
ss as UnknownClientDataProvider,
|
|
6869
6879
|
lr as UpdatableNamedIdentity,
|
|
6870
6880
|
dt as User,
|
|
6871
6881
|
As as UserAuthDataProvider,
|
|
6872
6882
|
wr as UserCommonInfo,
|
|
6873
|
-
|
|
6883
|
+
at as UserDataProvider,
|
|
6874
6884
|
fr as UserPricingRole,
|
|
6875
6885
|
x as UserShortInfo,
|
|
6876
6886
|
Lt as UserTypeEnum,
|
|
6877
|
-
|
|
6887
|
+
is as VersionConfig,
|
|
6878
6888
|
ge as Warehouse,
|
|
6879
6889
|
et as WebSocketConfig,
|
|
6880
|
-
|
|
6881
|
-
|
|
6882
|
-
|
|
6890
|
+
Ze as findCatalogItemByIdRecursive,
|
|
6891
|
+
er as flattenCatalogItems,
|
|
6892
|
+
us as pluralize,
|
|
6883
6893
|
be as useAuthStateStore,
|
|
6884
6894
|
L as useBaseConfigStateStore,
|
|
6885
|
-
|
|
6895
|
+
Cs as useReferencesStore,
|
|
6886
6896
|
Ds as useUserStateStore
|
|
6887
6897
|
};
|