@snabcentr/common-lib 2.10.0 → 2.12.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 +1 -1
- package/dist/sc-common-lib.js +1441 -1419
- 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/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/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 +5 -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 +7 -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/offers/interfaces/i-offer-short-info.d.ts +1 -1
- package/dist/src/offers/interfaces/i-offer-short-info.d.ts.map +1 -1
- package/dist/src/offers/providers/offers-data-provider.d.ts +4 -4
- package/dist/src/offers/providers/offers-data-provider.d.ts.map +1 -1
- package/dist/src/orders/classes/order-editor-data.d.ts +1 -1
- package/dist/src/orders/classes/order-editor-data.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/index.d.ts +1 -0
- package/dist/src/references/classes/index.d.ts.map +1 -1
- package/dist/src/references/classes/order-status-detail.d.ts +9 -0
- package/dist/src/references/classes/order-status-detail.d.ts.map +1 -0
- 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/enums/order-status-detail-enum.d.ts +16 -0
- package/dist/src/references/enums/order-status-detail-enum.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-detail.d.ts +8 -0
- package/dist/src/references/interfaces/i-order-status-detail.d.ts.map +1 -0
- 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/references/interfaces/index.d.ts +1 -0
- package/dist/src/references/interfaces/index.d.ts.map +1 -1
- package/dist/src/references/providers/reference-data-provider.d.ts +5 -0
- package/dist/src/references/providers/reference-data-provider.d.ts.map +1 -1
- package/dist/src/references/states/references-state-store.d.ts +14 -1
- package/dist/src/references/states/references-state-store.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 +2 -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 +2 -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 +0 -1
- package/dist/src/table-data/interfaces/index.d.ts.map +1 -0
- package/dist/src/user/classes/user-short-info.d.ts +1 -1
- 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/interfaces/i-filter-range-value.d.ts +0 -17
- package/dist/src/data-table/interfaces/i-filter-range-value.d.ts.map +0 -1
- package/dist/src/data-table/interfaces/index.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/sc-common-lib.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var s = (n, r, e) =>
|
|
4
|
-
import { jwtDecode as
|
|
5
|
-
import { merge as he, isNil as $, isEmpty as re, noop as v, mapValues as
|
|
6
|
-
import { objectToCamel as
|
|
1
|
+
var Nr = Object.defineProperty;
|
|
2
|
+
var Ur = (n, r, e) => r in n ? Nr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
|
+
var s = (n, r, e) => Ur(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
+
import { jwtDecode as ur } from "jwt-decode";
|
|
5
|
+
import { merge as he, isNil as $, isEmpty as re, noop as v, mapValues as pr, isArray as H, every as Fr, split as Hr, isString as a, constant as Mr, toUpper as jr, cloneDeep as Gr, toLower as Br, isFunction as Me, map as ye, forEach as zr, isDate as qe, isObject as je, omitBy as hr } from "lodash-es";
|
|
6
|
+
import { objectToCamel as Ge, objectToSnake as Ye } from "ts-case-convert";
|
|
7
7
|
import { defineStore as W } from "pinia";
|
|
8
|
-
import { ref as y, markRaw as
|
|
9
|
-
import { isAfter as
|
|
10
|
-
import
|
|
8
|
+
import { ref as y, markRaw as Wr, computed as P } from "vue";
|
|
9
|
+
import { isAfter as Xe, parseISO as C, startOfToday as Ne, format as L, addBusinessDays as Jr, endOfTomorrow as Vr, startOfTomorrow as Er, endOfYesterday as Kr, startOfYesterday as Qr, endOfToday as Yr, endOfDay as Xr, startOfDay as Zr, addSeconds as et } from "date-fns";
|
|
10
|
+
import rt, { CanceledError as tt } from "axios";
|
|
11
11
|
class M {
|
|
12
12
|
/**
|
|
13
13
|
* Инициализирует экземпляр класса {@link JwtPayload}.
|
|
@@ -107,11 +107,11 @@ class M {
|
|
|
107
107
|
* @param jwtToken JWT-ключ доступа.
|
|
108
108
|
*/
|
|
109
109
|
static getJwtPayload(r) {
|
|
110
|
-
const e =
|
|
110
|
+
const e = ur(r), t = new M(Ge(e));
|
|
111
111
|
return t.resourceAccess = e.resource_access, t;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
class
|
|
114
|
+
class Et extends M {
|
|
115
115
|
/**
|
|
116
116
|
* Инициализирует экземпляр класса {@link DetailedJwtPayload}.
|
|
117
117
|
*
|
|
@@ -151,10 +151,10 @@ class Jt extends M {
|
|
|
151
151
|
* @param jwtToken JWT-ключ доступа.
|
|
152
152
|
*/
|
|
153
153
|
static getJwtPayload(e) {
|
|
154
|
-
return new M(
|
|
154
|
+
return new M(Ge(ur(e)));
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
class
|
|
157
|
+
class st {
|
|
158
158
|
/**
|
|
159
159
|
* Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
|
|
160
160
|
*
|
|
@@ -176,7 +176,7 @@ class tt {
|
|
|
176
176
|
this.phone = (r == null ? void 0 : r.phone) ?? 360, this.tablet = (r == null ? void 0 : r.tablet) ?? 600, this.laptop = (r == null ? void 0 : r.laptop) ?? 1024;
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
-
class
|
|
179
|
+
class it {
|
|
180
180
|
/**
|
|
181
181
|
* Инициализирует экземпляр класса {@link HttpParamsConfig}.
|
|
182
182
|
*
|
|
@@ -198,7 +198,7 @@ class st {
|
|
|
198
198
|
this.portalApiUrl = (r == null ? void 0 : r.portalApiUrl) ?? "", this.mediaUrl = (r == null ? void 0 : r.mediaUrl) ?? "", this.responseDataCacheTimeout = (r == null ? void 0 : r.responseDataCacheTimeout) ?? 3 * 60 * 60;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
class
|
|
201
|
+
class nt {
|
|
202
202
|
/**
|
|
203
203
|
* Инициализирует экземпляр класса {@link SentryConfig}.
|
|
204
204
|
*
|
|
@@ -243,7 +243,7 @@ class it {
|
|
|
243
243
|
}, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
class
|
|
246
|
+
class ot {
|
|
247
247
|
/**
|
|
248
248
|
* Инициализирует экземпляр класса {@link WebSocketConfig}.
|
|
249
249
|
*
|
|
@@ -282,7 +282,7 @@ class nt {
|
|
|
282
282
|
this.broadcaster = r.broadcaster ?? "reverb", this.key = r.key ?? "", this.wsHost = r.wsHost ?? "", this.wsPort = r.wsPort ?? 8080, this.wssPort = r.wssPort ?? 8080, this.forceTLS = r.forceTLS ?? !1, this.enabledTransports = r.enabledTransports ?? ["wss"];
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
|
-
class
|
|
285
|
+
class ct {
|
|
286
286
|
/**
|
|
287
287
|
* Инициализирует экземпляр класса {@link AppBaseConfig}.
|
|
288
288
|
*
|
|
@@ -326,10 +326,10 @@ class ot {
|
|
|
326
326
|
*/
|
|
327
327
|
s(this, "dateFormats");
|
|
328
328
|
var e, t, i;
|
|
329
|
-
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new
|
|
329
|
+
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new it(r == null ? void 0 : r.http), this.deviceTypeByResolution = new st(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new nt({
|
|
330
330
|
environment: this.environment,
|
|
331
331
|
...r == null ? void 0 : r.sentry
|
|
332
|
-
}), this.tableDefaultHeightCoefficient = (r == null ? void 0 : r.tableDefaultHeightCoefficient) ?? 0.7, this.urls = r == null ? void 0 : r.urls, this.websocket = r != null && r.websocket ? new
|
|
332
|
+
}), this.tableDefaultHeightCoefficient = (r == null ? void 0 : r.tableDefaultHeightCoefficient) ?? 0.7, this.urls = r == null ? void 0 : r.urls, this.websocket = r != null && r.websocket ? new ot(r.websocket) : void 0, this.dateFormats = {
|
|
333
333
|
api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
|
|
334
334
|
uiDate: ((t = r == null ? void 0 : r.dateFormats) == null ? void 0 : t.uiDate) ?? "dd.MM.yyyy",
|
|
335
335
|
uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
|
|
@@ -337,7 +337,7 @@ class ot {
|
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
339
|
const k = W("common.config", () => {
|
|
340
|
-
const n = y(new
|
|
340
|
+
const n = y(new ct());
|
|
341
341
|
return {
|
|
342
342
|
/**
|
|
343
343
|
* Конфигурационные данные приложения.
|
|
@@ -359,7 +359,7 @@ const k = W("common.config", () => {
|
|
|
359
359
|
}
|
|
360
360
|
};
|
|
361
361
|
});
|
|
362
|
-
class
|
|
362
|
+
class Re {
|
|
363
363
|
/**
|
|
364
364
|
* Возвращает актуальные и не просроченные данные из хранилища.
|
|
365
365
|
*
|
|
@@ -378,7 +378,7 @@ class Pe {
|
|
|
378
378
|
if (e)
|
|
379
379
|
try {
|
|
380
380
|
const t = JSON.parse(e);
|
|
381
|
-
if (!t.availableFor ||
|
|
381
|
+
if (!t.availableFor || Xe(C(t.availableFor) || Ne(), /* @__PURE__ */ new Date())) {
|
|
382
382
|
if ($(t.data) || re(t.data))
|
|
383
383
|
throw new Error("Data is empty");
|
|
384
384
|
return t.data;
|
|
@@ -452,7 +452,7 @@ class Pe {
|
|
|
452
452
|
const i = localStorage.getItem(t);
|
|
453
453
|
if (i) {
|
|
454
454
|
const o = JSON.parse(i);
|
|
455
|
-
o.availableFor && !
|
|
455
|
+
o.availableFor && !Xe(C(o.availableFor) || Ne(), /* @__PURE__ */ new Date()) && r.push(t);
|
|
456
456
|
}
|
|
457
457
|
} catch {
|
|
458
458
|
r.push(t);
|
|
@@ -468,7 +468,7 @@ class Pe {
|
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
|
-
function
|
|
471
|
+
function Ze(n) {
|
|
472
472
|
try {
|
|
473
473
|
const r = M.getJwtPayload(n);
|
|
474
474
|
return new Date(r.exp * 1e3);
|
|
@@ -480,7 +480,7 @@ const Q = W("common.auth_state_private", () => {
|
|
|
480
480
|
const n = y(
|
|
481
481
|
(() => {
|
|
482
482
|
var u;
|
|
483
|
-
const o =
|
|
483
|
+
const o = Re.getActualDataFromStorage(
|
|
484
484
|
"sc.token"
|
|
485
485
|
/* JwtToken */
|
|
486
486
|
);
|
|
@@ -489,11 +489,11 @@ const Q = W("common.auth_state_private", () => {
|
|
|
489
489
|
const c = (u = k().config.devMode) == null ? void 0 : u.initAuthBearerToken;
|
|
490
490
|
return c ? Promise.resolve(c) : void 0;
|
|
491
491
|
})()
|
|
492
|
-
), r = y(void 0), e = y(void 0), t =
|
|
492
|
+
), r = y(void 0), e = y(void 0), t = Wr(/* @__PURE__ */ new Map());
|
|
493
493
|
function i() {
|
|
494
494
|
e.value = void 0, $(n.value) || n.value.then((o) => {
|
|
495
495
|
const c = M.getJwtPayload(o);
|
|
496
|
-
e.value = c.exp * 1e3 > Date.now() ?
|
|
496
|
+
e.value = c.exp * 1e3 > Date.now() ? pr(c.resourceAccess, (u) => (u == null ? void 0 : u.roles) ?? []) : void 0;
|
|
497
497
|
}).catch(v);
|
|
498
498
|
}
|
|
499
499
|
return {
|
|
@@ -518,13 +518,13 @@ const Q = W("common.auth_state_private", () => {
|
|
|
518
518
|
*/
|
|
519
519
|
recalculateUserPermissions: i
|
|
520
520
|
};
|
|
521
|
-
}),
|
|
522
|
-
const n =
|
|
521
|
+
}), ke = W("common.auth_state", () => {
|
|
522
|
+
const n = P(() => {
|
|
523
523
|
const o = Q();
|
|
524
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),
|
|
527
|
+
o.jwtToken = Promise.resolve(u), Re.saveActualDataToStorage("sc.token", u, Ze(u)), o.recalculateUserPermissions();
|
|
528
528
|
}).catch(v);
|
|
529
529
|
}
|
|
530
530
|
return o.jwtToken;
|
|
@@ -534,31 +534,31 @@ const Q = W("common.auth_state_private", () => {
|
|
|
534
534
|
}
|
|
535
535
|
function e(o) {
|
|
536
536
|
const c = Q();
|
|
537
|
-
c.jwtToken = Promise.resolve(o),
|
|
537
|
+
c.jwtToken = Promise.resolve(o), Re.saveActualDataToStorage("sc.token", o, Ze(o)), c.recalculateUserPermissions();
|
|
538
538
|
}
|
|
539
539
|
function t() {
|
|
540
540
|
const o = Q();
|
|
541
|
-
o.jwtToken = void 0, o.userPermissions = void 0,
|
|
541
|
+
o.jwtToken = void 0, o.userPermissions = void 0, Re.saveActualDataToStorage("sc.token", void 0);
|
|
542
542
|
}
|
|
543
543
|
function i(o) {
|
|
544
544
|
const c = Q();
|
|
545
545
|
!$(c.jwtToken) && $(c.userPermissions) && c.jwtToken.then((m) => {
|
|
546
546
|
const f = M.getJwtPayload(m);
|
|
547
|
-
c.userPermissions = f.exp * 1e3 > Date.now() ?
|
|
547
|
+
c.userPermissions = f.exp * 1e3 > Date.now() ? pr(f.resourceAccess, (D) => (D == null ? void 0 : D.roles) ?? []) : void 0;
|
|
548
548
|
}).catch(v);
|
|
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 p =
|
|
552
|
+
const p = P(() => {
|
|
553
553
|
const m = (f) => {
|
|
554
554
|
var K;
|
|
555
|
-
const D =
|
|
555
|
+
const D = Hr(f, ".");
|
|
556
556
|
if (D.length < 2)
|
|
557
557
|
return !1;
|
|
558
|
-
const [ie, ne] = D,
|
|
559
|
-
return H(
|
|
558
|
+
const [ie, ne] = D, E = (K = Q().userPermissions) == null ? void 0 : K[ie];
|
|
559
|
+
return H(E) && E.includes(ne);
|
|
560
560
|
};
|
|
561
|
-
return H(o) ?
|
|
561
|
+
return H(o) ? Fr(o, (f) => m(f)) : m(o);
|
|
562
562
|
});
|
|
563
563
|
return c.userPermissionsComputedRefs.set(u, p), p;
|
|
564
564
|
}
|
|
@@ -616,7 +616,7 @@ class J {
|
|
|
616
616
|
return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : $(this.id);
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
|
-
class
|
|
619
|
+
class b extends J {
|
|
620
620
|
/**
|
|
621
621
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
622
622
|
*
|
|
@@ -631,162 +631,7 @@ class S extends J {
|
|
|
631
631
|
this.name = (e == null ? void 0 : e.name) ?? "";
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
|
-
class
|
|
635
|
-
/**
|
|
636
|
-
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
637
|
-
*
|
|
638
|
-
* @param data Данные для первоначальной инициализации.
|
|
639
|
-
*/
|
|
640
|
-
constructor(e) {
|
|
641
|
-
super(e);
|
|
642
|
-
/**
|
|
643
|
-
* @inheritDoc
|
|
644
|
-
*/
|
|
645
|
-
s(this, "code", "");
|
|
646
|
-
this.code = (e == null ? void 0 : e.code) ?? "";
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
class w extends S {
|
|
650
|
-
/**
|
|
651
|
-
* Инициализирует экземпляр класса {@link Reference}.
|
|
652
|
-
*
|
|
653
|
-
* @param data Данные для первоначальной инициализации.
|
|
654
|
-
*/
|
|
655
|
-
constructor(e) {
|
|
656
|
-
super(e);
|
|
657
|
-
/**
|
|
658
|
-
* Краткое название.
|
|
659
|
-
*/
|
|
660
|
-
s(this, "slug");
|
|
661
|
-
/**
|
|
662
|
-
* Описание.
|
|
663
|
-
*/
|
|
664
|
-
s(this, "description");
|
|
665
|
-
this.description = e == null ? void 0 : e.description, this.slug = e == null ? void 0 : e.slug;
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
class hr extends S {
|
|
669
|
-
/**
|
|
670
|
-
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
671
|
-
*
|
|
672
|
-
* @param data Данные для первоначальной инициализации.
|
|
673
|
-
*/
|
|
674
|
-
constructor(e) {
|
|
675
|
-
super(e);
|
|
676
|
-
/**
|
|
677
|
-
* Дата и время последнего изменения.
|
|
678
|
-
*/
|
|
679
|
-
s(this, "updatedAt");
|
|
680
|
-
this.updatedAt = a(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e == null ? void 0 : e.updatedAt;
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
class gr extends hr {
|
|
684
|
-
/**
|
|
685
|
-
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
686
|
-
*
|
|
687
|
-
* @param data Данные для первоначальной инициализации.
|
|
688
|
-
*/
|
|
689
|
-
constructor(e) {
|
|
690
|
-
super(e);
|
|
691
|
-
/**
|
|
692
|
-
* Дата и время последнего удаления.
|
|
693
|
-
*/
|
|
694
|
-
s(this, "deletedAt");
|
|
695
|
-
this.deletedAt = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
696
|
-
}
|
|
697
|
-
}
|
|
698
|
-
class ct {
|
|
699
|
-
/**
|
|
700
|
-
* Инициализирует экземпляр класса {@link Image}.
|
|
701
|
-
*
|
|
702
|
-
* @param data Данные для первоначальной инициализации.
|
|
703
|
-
* @param mediaServer URL адрес медиа сервера.
|
|
704
|
-
*/
|
|
705
|
-
constructor(r, e) {
|
|
706
|
-
/**
|
|
707
|
-
* Путь к основному изображению.
|
|
708
|
-
*/
|
|
709
|
-
s(this, "image");
|
|
710
|
-
/**
|
|
711
|
-
* Путь к предпросмотру изображения.
|
|
712
|
-
*/
|
|
713
|
-
s(this, "preview");
|
|
714
|
-
/**
|
|
715
|
-
* Признак того, что изображение является основным.
|
|
716
|
-
*/
|
|
717
|
-
s(this, "isDefault");
|
|
718
|
-
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
class mr extends ge {
|
|
722
|
-
/**
|
|
723
|
-
* Инициализирует экземпляр класса {@link CatalogableItem}.
|
|
724
|
-
*
|
|
725
|
-
* @param data Данные для первоначальной инициализации.
|
|
726
|
-
*/
|
|
727
|
-
constructor(e) {
|
|
728
|
-
super(e);
|
|
729
|
-
/**
|
|
730
|
-
* Символьное обозначение.
|
|
731
|
-
*/
|
|
732
|
-
s(this, "slug");
|
|
733
|
-
/**
|
|
734
|
-
* Тип элемента.
|
|
735
|
-
*/
|
|
736
|
-
s(this, "type");
|
|
737
|
-
this.slug = (e == null ? void 0 : e.slug) ?? "";
|
|
738
|
-
}
|
|
739
|
-
}
|
|
740
|
-
class lt extends mr {
|
|
741
|
-
/**
|
|
742
|
-
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
743
|
-
*
|
|
744
|
-
* @param data Данные для первоначальной инициализации.
|
|
745
|
-
*/
|
|
746
|
-
constructor(e) {
|
|
747
|
-
super(e);
|
|
748
|
-
/**
|
|
749
|
-
* Признак того, что категория скрыта.
|
|
750
|
-
*/
|
|
751
|
-
s(this, "isHidden");
|
|
752
|
-
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1;
|
|
753
|
-
}
|
|
754
|
-
}
|
|
755
|
-
class Ne extends mr {
|
|
756
|
-
/**
|
|
757
|
-
* Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
|
|
758
|
-
*
|
|
759
|
-
* @param data Данные для первоначальной инициализации.
|
|
760
|
-
*/
|
|
761
|
-
constructor(e) {
|
|
762
|
-
super(e);
|
|
763
|
-
/**
|
|
764
|
-
* Признак того, что категория является основной для продукта.
|
|
765
|
-
*/
|
|
766
|
-
s(this, "isPrimary");
|
|
767
|
-
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
768
|
-
}
|
|
769
|
-
}
|
|
770
|
-
class Ge {
|
|
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
|
-
class _ extends S {
|
|
634
|
+
class I extends b {
|
|
790
635
|
/**
|
|
791
636
|
* Инициализирует экземпляр класса {@link UserShortInfo}.
|
|
792
637
|
*
|
|
@@ -801,7 +646,7 @@ class _ extends S {
|
|
|
801
646
|
this.type = e == null ? void 0 : e.type;
|
|
802
647
|
}
|
|
803
648
|
}
|
|
804
|
-
class
|
|
649
|
+
class lt extends b {
|
|
805
650
|
/**
|
|
806
651
|
* Инициализирует экземпляр класса {@link DiscountShortInfo}.
|
|
807
652
|
*
|
|
@@ -837,10 +682,25 @@ class ut extends S {
|
|
|
837
682
|
* Дата и время удаления.
|
|
838
683
|
*/
|
|
839
684
|
s(this, "deletedAt");
|
|
840
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = a(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
|
|
685
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = a(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 I(e == null ? void 0 : e.owner), this.deletedAt = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
class gr extends b {
|
|
689
|
+
/**
|
|
690
|
+
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
691
|
+
*
|
|
692
|
+
* @param data Данные для первоначальной инициализации.
|
|
693
|
+
*/
|
|
694
|
+
constructor(e) {
|
|
695
|
+
super(e);
|
|
696
|
+
/**
|
|
697
|
+
* Дата и время последнего изменения.
|
|
698
|
+
*/
|
|
699
|
+
s(this, "updatedAt");
|
|
700
|
+
this.updatedAt = a(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e == null ? void 0 : e.updatedAt;
|
|
841
701
|
}
|
|
842
702
|
}
|
|
843
|
-
class Z extends
|
|
703
|
+
class Z extends gr {
|
|
844
704
|
/**
|
|
845
705
|
* Инициализирует экземпляр класса {@link PriceTemplate}.
|
|
846
706
|
*
|
|
@@ -859,13 +719,32 @@ class Z extends hr {
|
|
|
859
719
|
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
|
|
860
720
|
}
|
|
861
721
|
}
|
|
862
|
-
var
|
|
863
|
-
class
|
|
722
|
+
var mr = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(mr || {});
|
|
723
|
+
class w extends b {
|
|
724
|
+
/**
|
|
725
|
+
* Инициализирует экземпляр класса {@link Reference}.
|
|
726
|
+
*
|
|
727
|
+
* @param data Данные для первоначальной инициализации.
|
|
728
|
+
*/
|
|
729
|
+
constructor(e) {
|
|
730
|
+
super(e);
|
|
731
|
+
/**
|
|
732
|
+
* Краткое название.
|
|
733
|
+
*/
|
|
734
|
+
s(this, "slug");
|
|
735
|
+
/**
|
|
736
|
+
* Описание.
|
|
737
|
+
*/
|
|
738
|
+
s(this, "description");
|
|
739
|
+
this.description = e == null ? void 0 : e.description, this.slug = e == null ? void 0 : e.slug;
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
class de extends w {
|
|
864
743
|
/**
|
|
865
744
|
* Возвращает значение справочника коэффициента розничной цены.
|
|
866
745
|
*/
|
|
867
746
|
static getRetailPriceCoefficient() {
|
|
868
|
-
return { id: -2, slug:
|
|
747
|
+
return { id: -2, slug: mr.Retail, name: "Розн. цена", guid: "", isNewRec: Mr(!0) };
|
|
869
748
|
}
|
|
870
749
|
}
|
|
871
750
|
class Be {
|
|
@@ -895,10 +774,10 @@ class Be {
|
|
|
895
774
|
* Признак того, что указанный коэффициент доступен текущему пользователю только для просмотра.
|
|
896
775
|
*/
|
|
897
776
|
s(this, "readOnly");
|
|
898
|
-
this.coefficient = new
|
|
777
|
+
this.coefficient = new de(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 fr {
|
|
902
781
|
/**
|
|
903
782
|
* Инициализирует экземпляр класса {@link GeoCoordinates}.
|
|
904
783
|
*
|
|
@@ -947,10 +826,10 @@ class we extends w {
|
|
|
947
826
|
* Координаты склада.
|
|
948
827
|
*/
|
|
949
828
|
s(this, "coordinates");
|
|
950
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((t = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : t.map((i) => new F(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new
|
|
829
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((t = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : t.map((i) => new F(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new fr(e == null ? void 0 : e.coordinates);
|
|
951
830
|
}
|
|
952
831
|
}
|
|
953
|
-
class
|
|
832
|
+
class ut {
|
|
954
833
|
/**
|
|
955
834
|
* Инициализирует экземпляр класса {@link StockCount}.
|
|
956
835
|
*
|
|
@@ -968,7 +847,7 @@ class pt {
|
|
|
968
847
|
this.warehouse = new we(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
969
848
|
}
|
|
970
849
|
}
|
|
971
|
-
class x extends
|
|
850
|
+
class x extends b {
|
|
972
851
|
/**
|
|
973
852
|
* Инициализирует экземпляр класса {@link Currency}.
|
|
974
853
|
*
|
|
@@ -995,7 +874,7 @@ class x extends S {
|
|
|
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 er extends b {
|
|
999
878
|
/**
|
|
1000
879
|
* Инициализирует экземпляр класса {@link ProductUnit}.
|
|
1001
880
|
*
|
|
@@ -1022,49 +901,136 @@ class Ze extends S {
|
|
|
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 ge extends b {
|
|
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
|
-
s(this, "supplierSku");
|
|
1038
|
-
/**
|
|
1039
|
-
* Единица измерения.
|
|
913
|
+
* @inheritDoc
|
|
1040
914
|
*/
|
|
1041
|
-
s(this, "
|
|
915
|
+
s(this, "code", "");
|
|
916
|
+
this.code = (e == null ? void 0 : e.code) ?? "";
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
class yr extends ge {
|
|
920
|
+
/**
|
|
921
|
+
* Инициализирует экземпляр класса {@link CatalogableItem}.
|
|
922
|
+
*
|
|
923
|
+
* @param data Данные для первоначальной инициализации.
|
|
924
|
+
*/
|
|
925
|
+
constructor(e) {
|
|
926
|
+
super(e);
|
|
1042
927
|
/**
|
|
1043
|
-
*
|
|
928
|
+
* Символьное обозначение.
|
|
1044
929
|
*/
|
|
1045
|
-
s(this, "
|
|
930
|
+
s(this, "slug");
|
|
1046
931
|
/**
|
|
1047
|
-
*
|
|
932
|
+
* Тип элемента.
|
|
1048
933
|
*/
|
|
1049
|
-
s(this, "
|
|
934
|
+
s(this, "type");
|
|
935
|
+
this.slug = (e == null ? void 0 : e.slug) ?? "";
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
class pt extends yr {
|
|
939
|
+
/**
|
|
940
|
+
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
941
|
+
*
|
|
942
|
+
* @param data Данные для первоначальной инициализации.
|
|
943
|
+
*/
|
|
944
|
+
constructor(e) {
|
|
945
|
+
super(e);
|
|
1050
946
|
/**
|
|
1051
|
-
*
|
|
947
|
+
* Признак того, что категория скрыта.
|
|
1052
948
|
*/
|
|
1053
|
-
s(this, "
|
|
949
|
+
s(this, "isHidden");
|
|
950
|
+
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1;
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
class ht {
|
|
954
|
+
/**
|
|
955
|
+
* Инициализирует экземпляр класса {@link Image}.
|
|
956
|
+
*
|
|
957
|
+
* @param data Данные для первоначальной инициализации.
|
|
958
|
+
* @param mediaServer URL адрес медиа сервера.
|
|
959
|
+
*/
|
|
960
|
+
constructor(r, e) {
|
|
1054
961
|
/**
|
|
1055
|
-
*
|
|
962
|
+
* Путь к основному изображению.
|
|
1056
963
|
*/
|
|
1057
|
-
s(this, "
|
|
964
|
+
s(this, "image");
|
|
1058
965
|
/**
|
|
1059
|
-
*
|
|
966
|
+
* Путь к предпросмотру изображения.
|
|
1060
967
|
*/
|
|
1061
|
-
s(this, "
|
|
968
|
+
s(this, "preview");
|
|
1062
969
|
/**
|
|
1063
|
-
*
|
|
970
|
+
* Признак того, что изображение является основным.
|
|
1064
971
|
*/
|
|
1065
|
-
s(this, "
|
|
1066
|
-
|
|
1067
|
-
|
|
972
|
+
s(this, "isDefault");
|
|
973
|
+
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
class Ue extends yr {
|
|
977
|
+
/**
|
|
978
|
+
* Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
|
|
979
|
+
*
|
|
980
|
+
* @param data Данные для первоначальной инициализации.
|
|
981
|
+
*/
|
|
982
|
+
constructor(e) {
|
|
983
|
+
super(e);
|
|
984
|
+
/**
|
|
985
|
+
* Признак того, что категория является основной для продукта.
|
|
986
|
+
*/
|
|
987
|
+
s(this, "isPrimary");
|
|
988
|
+
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
class _ extends pt {
|
|
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
|
+
s(this, "supplierSku");
|
|
1004
|
+
/**
|
|
1005
|
+
* Единица измерения.
|
|
1006
|
+
*/
|
|
1007
|
+
s(this, "unit");
|
|
1008
|
+
/**
|
|
1009
|
+
* Норма упаковки.
|
|
1010
|
+
*/
|
|
1011
|
+
s(this, "pack");
|
|
1012
|
+
/**
|
|
1013
|
+
* Минимальное количество товара для заказа.
|
|
1014
|
+
*/
|
|
1015
|
+
s(this, "minCount");
|
|
1016
|
+
/**
|
|
1017
|
+
* Валюта товара или услуги.
|
|
1018
|
+
*/
|
|
1019
|
+
s(this, "currency");
|
|
1020
|
+
/**
|
|
1021
|
+
* Стоимость товара или услуги.
|
|
1022
|
+
*/
|
|
1023
|
+
s(this, "cost");
|
|
1024
|
+
/**
|
|
1025
|
+
* Стоимость продукта в рублях.
|
|
1026
|
+
*/
|
|
1027
|
+
s(this, "costRub");
|
|
1028
|
+
/**
|
|
1029
|
+
* Дата установки цены.
|
|
1030
|
+
*/
|
|
1031
|
+
s(this, "costDate");
|
|
1032
|
+
/**
|
|
1033
|
+
* Признак товара "Под заказ".
|
|
1068
1034
|
*/
|
|
1069
1035
|
s(this, "onOrder");
|
|
1070
1036
|
/**
|
|
@@ -1099,9 +1065,9 @@ class I extends lt {
|
|
|
1099
1065
|
* Список коэффициентов цен на продукт.
|
|
1100
1066
|
*/
|
|
1101
1067
|
s(this, "priceCoefficients");
|
|
1102
|
-
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new
|
|
1068
|
+
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new er(e.unit) : new er(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new x(e.currency) : new x(), this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = a(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 ut(p))) ?? [], this.type = "product";
|
|
1103
1069
|
const t = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((p) => p.isPrimary));
|
|
1104
|
-
t && (this.category = new
|
|
1070
|
+
t && (this.category = new Ue({ ...t, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new Ue(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new ht(p, k().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 Be(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
1105
1071
|
}
|
|
1106
1072
|
/**
|
|
1107
1073
|
* Возвращает признак, что это измеряемый товар.
|
|
@@ -1123,7 +1089,7 @@ class I extends lt {
|
|
|
1123
1089
|
}
|
|
1124
1090
|
}
|
|
1125
1091
|
var ze = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(ze || {});
|
|
1126
|
-
class j extends
|
|
1092
|
+
class j extends _ {
|
|
1127
1093
|
/**
|
|
1128
1094
|
* Инициализирует экземпляр класса {@link ClientProduct}.
|
|
1129
1095
|
*
|
|
@@ -1159,10 +1125,10 @@ class j extends I {
|
|
|
1159
1125
|
* Признак того, что указанный продукт входит в список избранных продуктов клиента.
|
|
1160
1126
|
*/
|
|
1161
1127
|
s(this, "isFavorite");
|
|
1162
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? ze.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) ?? ze.Product, this.discount = e != null && e.discount ? new lt(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new Z(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
|
-
class ve extends
|
|
1131
|
+
class ve extends Ue {
|
|
1166
1132
|
/**
|
|
1167
1133
|
* Инициализирует экземпляр класса {@link BaseCategory}.
|
|
1168
1134
|
*
|
|
@@ -1186,7 +1152,7 @@ class ve extends Ne {
|
|
|
1186
1152
|
* Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
|
|
1187
1153
|
*/
|
|
1188
1154
|
s(this, "currencyRates");
|
|
1189
|
-
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category", this.currencyRates = e != null && e.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([t, i]) => [
|
|
1155
|
+
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category", this.currencyRates = e != null && e.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([t, i]) => [jr(t), i])) : void 0;
|
|
1190
1156
|
}
|
|
1191
1157
|
}
|
|
1192
1158
|
class wr extends J {
|
|
@@ -1265,7 +1231,7 @@ class wr extends J {
|
|
|
1265
1231
|
* @inheritDoc
|
|
1266
1232
|
*/
|
|
1267
1233
|
s(this, "replacementId");
|
|
1268
|
-
this.product = new j(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new ve(), this.currency = e.currency ? new x(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams &&
|
|
1234
|
+
this.product = new j(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new ve(), this.currency = e.currency ? new x(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Gr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new I(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId, this.replacementId = e.replacementId;
|
|
1269
1235
|
}
|
|
1270
1236
|
}
|
|
1271
1237
|
let vr = class extends wr {
|
|
@@ -1337,7 +1303,26 @@ class oe {
|
|
|
1337
1303
|
this.items = r.items.map((e) => new vr(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
|
|
1338
1304
|
}
|
|
1339
1305
|
}
|
|
1340
|
-
|
|
1306
|
+
class We {
|
|
1307
|
+
/**
|
|
1308
|
+
* Инициализирует экземпляр указанного класса.
|
|
1309
|
+
*
|
|
1310
|
+
* @param type Тип класса, на основе которого необходимо создать экземпляр (тип возвращаемых данных).
|
|
1311
|
+
*/
|
|
1312
|
+
static simpleInstanceInitializer(r) {
|
|
1313
|
+
return new r();
|
|
1314
|
+
}
|
|
1315
|
+
/**
|
|
1316
|
+
* Инициализирует экземпляр указанного класса.
|
|
1317
|
+
*
|
|
1318
|
+
* @param type Тип класса, на основе которого необходимо создать экземпляр (тип возвращаемых данных).
|
|
1319
|
+
* @param data Начальные данные для инициализации (параметры конструктора).
|
|
1320
|
+
*/
|
|
1321
|
+
static instanceInitializer(r, e) {
|
|
1322
|
+
return new r(e);
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
const R = class R {
|
|
1341
1326
|
/**
|
|
1342
1327
|
* Инициализирует экземпляр класса {@link HttpRequester}.
|
|
1343
1328
|
*/
|
|
@@ -1376,7 +1361,7 @@ const P = class P {
|
|
|
1376
1361
|
// eslint-disable-next-line class-methods-use-this
|
|
1377
1362
|
s(this, "authRequestInterceptor", async (r) => {
|
|
1378
1363
|
let e;
|
|
1379
|
-
return $(
|
|
1364
|
+
return $(ke().jwtToken) || (e = await ke().jwtToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
|
|
1380
1365
|
});
|
|
1381
1366
|
/**
|
|
1382
1367
|
* Перехватчик запроса для вызова пользовательских хуков.
|
|
@@ -1384,14 +1369,14 @@ const P = class P {
|
|
|
1384
1369
|
* @param request Данные запроса.
|
|
1385
1370
|
*/
|
|
1386
1371
|
// eslint-disable-next-line class-methods-use-this
|
|
1387
|
-
s(this, "userRequestHooksInterceptor", async (r) =>
|
|
1372
|
+
s(this, "userRequestHooksInterceptor", async (r) => R.requestHooks.reduce(async (e, t) => t(await e), Promise.resolve(r)));
|
|
1388
1373
|
/**
|
|
1389
1374
|
* Перехватчик запроса для преобразования данных запроса.
|
|
1390
1375
|
*
|
|
1391
1376
|
* @param request Данные запроса.
|
|
1392
1377
|
*/
|
|
1393
1378
|
// eslint-disable-next-line class-methods-use-this
|
|
1394
|
-
s(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params =
|
|
1379
|
+
s(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = Ye(r.params)), ["put", "patch", "post"].includes(Br(r.method)) && r.data && (r.data = Ye(r.data))), r));
|
|
1395
1380
|
/**
|
|
1396
1381
|
* Перехватчик ошибок ответов на запрос.
|
|
1397
1382
|
*
|
|
@@ -1400,7 +1385,7 @@ const P = class P {
|
|
|
1400
1385
|
s(this, "authErrorsResponseInterceptors", (r) => {
|
|
1401
1386
|
var t;
|
|
1402
1387
|
const e = r.rawError ? (t = r.rawError) == null ? void 0 : t.config : void 0;
|
|
1403
|
-
return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (
|
|
1388
|
+
return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (ke().invalidateJwtToken(), e.__isRetryRequest = !0, this.httpClient(e)) : Promise.reject(r);
|
|
1404
1389
|
});
|
|
1405
1390
|
/**
|
|
1406
1391
|
* Перехватчик ответа для приведения отмены запроса (AbortController) к единому виду.
|
|
@@ -1411,7 +1396,7 @@ const P = class P {
|
|
|
1411
1396
|
s(this, "canceledResponseInterceptor", (r) => {
|
|
1412
1397
|
const e = r.rawError ?? r;
|
|
1413
1398
|
if (e.name === "CanceledError" || e.code === "ERR_CANCELED")
|
|
1414
|
-
throw new
|
|
1399
|
+
throw new tt("Request canceled");
|
|
1415
1400
|
return Promise.reject(r);
|
|
1416
1401
|
});
|
|
1417
1402
|
/**
|
|
@@ -1420,15 +1405,15 @@ const P = class P {
|
|
|
1420
1405
|
* @param response Данные ответа на запрос.
|
|
1421
1406
|
*/
|
|
1422
1407
|
// eslint-disable-next-line class-methods-use-this
|
|
1423
|
-
s(this, "userResponseHooksInterceptor", async (r) =>
|
|
1408
|
+
s(this, "userResponseHooksInterceptor", async (r) => R.responseHooks.reduce(async (e, t) => t(await e), Promise.resolve(r)));
|
|
1424
1409
|
/**
|
|
1425
1410
|
* Перехватчик ответа для преобразования данных ответа на запрос.
|
|
1426
1411
|
*
|
|
1427
1412
|
* @param response Данные ответа на запрос.
|
|
1428
1413
|
*/
|
|
1429
1414
|
// eslint-disable-next-line class-methods-use-this
|
|
1430
|
-
s(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data =
|
|
1431
|
-
this.errorResponseHandler =
|
|
1415
|
+
s(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = Ge(r.data)), r));
|
|
1416
|
+
this.errorResponseHandler = R.defaultErrorsResponseHandler, this.httpClient = rt.create({
|
|
1432
1417
|
headers: {
|
|
1433
1418
|
Accept: "application/json",
|
|
1434
1419
|
"Content-Type": "application/json"
|
|
@@ -1438,7 +1423,7 @@ const P = class P {
|
|
|
1438
1423
|
(r) => Promise.reject(r)
|
|
1439
1424
|
), this.interceptorIds.response.convertHttpErrorResponseInterceptor = this.httpClient.interceptors.response.use(
|
|
1440
1425
|
(r) => r,
|
|
1441
|
-
(r) =>
|
|
1426
|
+
(r) => R.convertHttpErrorResponse(r)
|
|
1442
1427
|
), this.interceptorIds.response.canceledResponseInterceptor = this.httpClient.interceptors.response.use((r) => r, this.canceledResponseInterceptor), this.interceptorIds.response.authErrorsResponseInterceptor = this.httpClient.interceptors.response.use((r) => r, this.authErrorsResponseInterceptors), this.interceptorIds.response.dataConverterResponseInterceptor = this.httpClient.interceptors.response.use(
|
|
1443
1428
|
this.dataConverterResponseInterceptor,
|
|
1444
1429
|
(r) => Promise.reject(r)
|
|
@@ -1450,7 +1435,7 @@ const P = class P {
|
|
|
1450
1435
|
* @param handler Ссылка на функцию-обработчик ошибок.
|
|
1451
1436
|
*/
|
|
1452
1437
|
static setDefaultErrorsResponseHandler(r) {
|
|
1453
|
-
|
|
1438
|
+
R.defaultErrorsResponseHandler = r;
|
|
1454
1439
|
}
|
|
1455
1440
|
/**
|
|
1456
1441
|
* Регистрирует хук, который будет вызываться перед выполнением каждого HTTP запроса.
|
|
@@ -1458,7 +1443,7 @@ const P = class P {
|
|
|
1458
1443
|
* @param hook Функция-хук для обработки запроса.
|
|
1459
1444
|
*/
|
|
1460
1445
|
static addRequestHook(r) {
|
|
1461
|
-
|
|
1446
|
+
R.requestHooks.includes(r) || R.requestHooks.push(r);
|
|
1462
1447
|
}
|
|
1463
1448
|
/**
|
|
1464
1449
|
* Удаляет зарегистрированный хук запроса.
|
|
@@ -1466,8 +1451,8 @@ const P = class P {
|
|
|
1466
1451
|
* @param hook Функция-хук для удаления.
|
|
1467
1452
|
*/
|
|
1468
1453
|
static removeRequestHook(r) {
|
|
1469
|
-
const e =
|
|
1470
|
-
e !== -1 &&
|
|
1454
|
+
const e = R.requestHooks.indexOf(r);
|
|
1455
|
+
e !== -1 && R.requestHooks.splice(e, 1);
|
|
1471
1456
|
}
|
|
1472
1457
|
/**
|
|
1473
1458
|
* Регистрирует хук, который будет вызываться после получения ответа на каждый HTTP запрос.
|
|
@@ -1475,7 +1460,7 @@ const P = class P {
|
|
|
1475
1460
|
* @param hook Функция-хук для обработки ответа.
|
|
1476
1461
|
*/
|
|
1477
1462
|
static addResponseHook(r) {
|
|
1478
|
-
|
|
1463
|
+
R.responseHooks.includes(r) || R.responseHooks.push(r);
|
|
1479
1464
|
}
|
|
1480
1465
|
/**
|
|
1481
1466
|
* Удаляет зарегистрированный хук ответа.
|
|
@@ -1483,8 +1468,8 @@ const P = class P {
|
|
|
1483
1468
|
* @param hook Функция-хук для удаления.
|
|
1484
1469
|
*/
|
|
1485
1470
|
static removeResponseHook(r) {
|
|
1486
|
-
const e =
|
|
1487
|
-
e !== -1 &&
|
|
1471
|
+
const e = R.responseHooks.indexOf(r);
|
|
1472
|
+
e !== -1 && R.responseHooks.splice(e, 1);
|
|
1488
1473
|
}
|
|
1489
1474
|
/**
|
|
1490
1475
|
* Возвращает экземпляр объекта текущего класса.
|
|
@@ -1492,7 +1477,7 @@ const P = class P {
|
|
|
1492
1477
|
* @param type Тип данных, которыми оперирует метод.
|
|
1493
1478
|
*/
|
|
1494
1479
|
static getInstance(r) {
|
|
1495
|
-
return Object.prototype.hasOwnProperty.call(
|
|
1480
|
+
return Object.prototype.hasOwnProperty.call(R.instances, r.name) || (R.instances[r.name] = We.simpleInstanceInitializer(r)), R.instances[r.name];
|
|
1496
1481
|
}
|
|
1497
1482
|
/**
|
|
1498
1483
|
* Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
|
|
@@ -1591,22 +1576,22 @@ const P = class P {
|
|
|
1591
1576
|
* Экземпляр объекта текущего класса.
|
|
1592
1577
|
*/
|
|
1593
1578
|
// eslint-disable-next-line no-use-before-define
|
|
1594
|
-
s(
|
|
1579
|
+
s(R, "instances", {}), /**
|
|
1595
1580
|
* Базовый обработчик ошибок выполнения запросов.
|
|
1596
1581
|
*
|
|
1597
1582
|
* @param error Данные об ошибке.
|
|
1598
1583
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
1599
1584
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1600
1585
|
*/
|
|
1601
|
-
s(
|
|
1586
|
+
s(R, "defaultErrorsResponseHandler", v), /**
|
|
1602
1587
|
* Список зарегистрированных хуков для запросов.
|
|
1603
1588
|
*/
|
|
1604
|
-
s(
|
|
1589
|
+
s(R, "requestHooks", []), /**
|
|
1605
1590
|
* Список зарегистрированных хуков для ответов.
|
|
1606
1591
|
*/
|
|
1607
|
-
s(
|
|
1608
|
-
let h =
|
|
1609
|
-
class
|
|
1592
|
+
s(R, "responseHooks", []);
|
|
1593
|
+
let h = R;
|
|
1594
|
+
class Qt extends h {
|
|
1610
1595
|
/**
|
|
1611
1596
|
* Возвращает содержимое корзины указанного клиента.
|
|
1612
1597
|
*
|
|
@@ -1720,7 +1705,7 @@ class Vt extends h {
|
|
|
1720
1705
|
return this.get(`internal/clients/${r.id}/cart/add-products-from-csv/example`, {}, (e) => new Blob([e.data], { type: "text/csv" }));
|
|
1721
1706
|
}
|
|
1722
1707
|
}
|
|
1723
|
-
var
|
|
1708
|
+
var gt = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(gt || {}), mt = /* @__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))(mt || {});
|
|
1724
1709
|
class N extends ve {
|
|
1725
1710
|
/**
|
|
1726
1711
|
* Инициализирует экземпляр класса {@link Category}.
|
|
@@ -1738,7 +1723,7 @@ class N extends ve {
|
|
|
1738
1723
|
* Список продуктов категории.
|
|
1739
1724
|
*/
|
|
1740
1725
|
s(this, "products");
|
|
1741
|
-
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new N(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new
|
|
1726
|
+
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new N(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new _(o));
|
|
1742
1727
|
}
|
|
1743
1728
|
}
|
|
1744
1729
|
class ar {
|
|
@@ -1761,7 +1746,7 @@ class ar {
|
|
|
1761
1746
|
}
|
|
1762
1747
|
class q extends w {
|
|
1763
1748
|
}
|
|
1764
|
-
class
|
|
1749
|
+
class Je extends b {
|
|
1765
1750
|
/**
|
|
1766
1751
|
* Инициализирует экземпляр класса {@link ManagerCommon}.
|
|
1767
1752
|
*
|
|
@@ -1792,9 +1777,9 @@ class We extends S {
|
|
|
1792
1777
|
this.salesDirection = e != null && e.salesDirection ? new q(e.salesDirection) : new q(), this.photo = e == null ? void 0 : e.photo, this.contacts = e != null && e.contacts ? new ar(e.contacts) : void 0, this.isDefault = (e == null ? void 0 : e.isDefault) ?? !1, this.isRegionalDirector = (e == null ? void 0 : e.isRegionalDirector) ?? !1;
|
|
1793
1778
|
}
|
|
1794
1779
|
}
|
|
1795
|
-
class
|
|
1780
|
+
class Ve extends w {
|
|
1796
1781
|
}
|
|
1797
|
-
class Cr extends
|
|
1782
|
+
class Cr extends b {
|
|
1798
1783
|
/**
|
|
1799
1784
|
* Инициализирует экземпляр класса {@link IUserPricingRole}.
|
|
1800
1785
|
*
|
|
@@ -1817,7 +1802,7 @@ class Cr extends S {
|
|
|
1817
1802
|
this.description = e.description, this.canChangeLowCost = e.canChangeLowCost, this.parentRoleId = e.parentRoleId;
|
|
1818
1803
|
}
|
|
1819
1804
|
}
|
|
1820
|
-
class ae extends
|
|
1805
|
+
class ae extends Je {
|
|
1821
1806
|
/**
|
|
1822
1807
|
* Инициализирует экземпляр класса {@link Manager}.
|
|
1823
1808
|
*
|
|
@@ -1854,10 +1839,10 @@ class ae extends We {
|
|
|
1854
1839
|
* Список направлений кураторства.
|
|
1855
1840
|
*/
|
|
1856
1841
|
s(this, "curatedDirections");
|
|
1857
|
-
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 Cr(e.pricingRole) : void 0, this.curatedDirections = ((t = e == null ? void 0 : e.curatedDirections) == null ? void 0 : t.map((i) => new
|
|
1842
|
+
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 Cr(e.pricingRole) : void 0, this.curatedDirections = ((t = e == null ? void 0 : e.curatedDirections) == null ? void 0 : t.map((i) => new Ve(i))) ?? [];
|
|
1858
1843
|
}
|
|
1859
1844
|
}
|
|
1860
|
-
class
|
|
1845
|
+
class ft extends ve {
|
|
1861
1846
|
/**
|
|
1862
1847
|
* Инициализирует экземпляр класса {@link BaseClientCategory}.
|
|
1863
1848
|
*
|
|
@@ -1888,7 +1873,7 @@ class mt extends ve {
|
|
|
1888
1873
|
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 ae(e.manager) : void 0;
|
|
1889
1874
|
}
|
|
1890
1875
|
}
|
|
1891
|
-
class
|
|
1876
|
+
class Pe extends ft {
|
|
1892
1877
|
/**
|
|
1893
1878
|
* Инициализирует экземпляр класса {@link ClientCategory}.
|
|
1894
1879
|
*
|
|
@@ -1905,10 +1890,10 @@ class Re extends mt {
|
|
|
1905
1890
|
* Список продуктов категории.
|
|
1906
1891
|
*/
|
|
1907
1892
|
s(this, "products");
|
|
1908
|
-
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new
|
|
1893
|
+
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new Pe(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new j(o));
|
|
1909
1894
|
}
|
|
1910
1895
|
}
|
|
1911
|
-
class
|
|
1896
|
+
class Rr {
|
|
1912
1897
|
/**
|
|
1913
1898
|
* Инициализирует экземпляр класса {@link PriceTemplateICatalogableItem}.
|
|
1914
1899
|
*
|
|
@@ -1923,10 +1908,10 @@ class Pr {
|
|
|
1923
1908
|
* Процент, который прибавляется к значению выбранного коэффициента.
|
|
1924
1909
|
*/
|
|
1925
1910
|
s(this, "increasePercent");
|
|
1926
|
-
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new
|
|
1911
|
+
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new de(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
|
|
1927
1912
|
}
|
|
1928
1913
|
}
|
|
1929
|
-
class
|
|
1914
|
+
class Le extends Rr {
|
|
1930
1915
|
/**
|
|
1931
1916
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1932
1917
|
*
|
|
@@ -1941,7 +1926,7 @@ class ke extends Pr {
|
|
|
1941
1926
|
this.productCategory = new ve(e == null ? void 0 : e.productCategory);
|
|
1942
1927
|
}
|
|
1943
1928
|
}
|
|
1944
|
-
class Ee extends
|
|
1929
|
+
class Ee extends b {
|
|
1945
1930
|
/**
|
|
1946
1931
|
* Инициализирует экземпляр класса {@link Curator}.
|
|
1947
1932
|
*
|
|
@@ -1961,7 +1946,7 @@ class Ee extends S {
|
|
|
1961
1946
|
* @inheritDoc
|
|
1962
1947
|
*/
|
|
1963
1948
|
s(this, "curatedDirection");
|
|
1964
|
-
this.photo = e.photo, this.contacts = new ar(e.contacts), this.curatedDirection = new
|
|
1949
|
+
this.photo = e.photo, this.contacts = new ar(e.contacts), this.curatedDirection = new Ve(e.curatedDirection);
|
|
1965
1950
|
}
|
|
1966
1951
|
}
|
|
1967
1952
|
class te extends w {
|
|
@@ -1981,7 +1966,7 @@ class me extends w {
|
|
|
1981
1966
|
e && (this.country = new te(e.country));
|
|
1982
1967
|
}
|
|
1983
1968
|
}
|
|
1984
|
-
class
|
|
1969
|
+
class Ae extends w {
|
|
1985
1970
|
/**
|
|
1986
1971
|
* Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
|
|
1987
1972
|
*
|
|
@@ -1996,7 +1981,7 @@ class $e extends w {
|
|
|
1996
1981
|
e && (this.region = new me(e.region));
|
|
1997
1982
|
}
|
|
1998
1983
|
}
|
|
1999
|
-
class
|
|
1984
|
+
class Pr extends b {
|
|
2000
1985
|
/**
|
|
2001
1986
|
* Инициализирует экземпляр класса {@link UserCommonInfo}.
|
|
2002
1987
|
*
|
|
@@ -2035,7 +2020,7 @@ class Rr extends S {
|
|
|
2035
2020
|
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 q(e.salesDirection) : void 0, this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = a(e == null ? void 0 : e.lastLoginAt) ? C(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
2036
2021
|
}
|
|
2037
2022
|
}
|
|
2038
|
-
class
|
|
2023
|
+
class V extends Pr {
|
|
2039
2024
|
/**
|
|
2040
2025
|
* Инициализирует экземпляр класса {@link Client}.
|
|
2041
2026
|
*
|
|
@@ -2081,7 +2066,7 @@ class E extends Rr {
|
|
|
2081
2066
|
* @inheritDoc
|
|
2082
2067
|
*/
|
|
2083
2068
|
s(this, "curators");
|
|
2084
|
-
this.salesDirection = new q(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
|
|
2069
|
+
this.salesDirection = new q(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 = ((t = e == null ? void 0 : e.managers) == null ? void 0 : t.map((o) => new Je(o))) ?? [], this.curators = ((i = e == null ? void 0 : e.curators) == null ? void 0 : i.map((o) => new Ee(o))) ?? void 0;
|
|
2085
2070
|
}
|
|
2086
2071
|
}
|
|
2087
2072
|
class ce extends J {
|
|
@@ -2108,10 +2093,10 @@ class ce extends J {
|
|
|
2108
2093
|
* Данные шаблона прайс-листа.
|
|
2109
2094
|
*/
|
|
2110
2095
|
s(this, "priceTemplate");
|
|
2111
|
-
this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new
|
|
2096
|
+
this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new V(e == null ? void 0 : e.client), this.priceTemplate = new Z(e == null ? void 0 : e.priceTemplate);
|
|
2112
2097
|
}
|
|
2113
2098
|
}
|
|
2114
|
-
class
|
|
2099
|
+
class _e extends Rr {
|
|
2115
2100
|
/**
|
|
2116
2101
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
2117
2102
|
*
|
|
@@ -2123,12 +2108,12 @@ class Le extends Pr {
|
|
|
2123
2108
|
* Базовые данные о продукте.
|
|
2124
2109
|
*/
|
|
2125
2110
|
s(this, "product");
|
|
2126
|
-
this.product = new
|
|
2111
|
+
this.product = new _(e == null ? void 0 : e.product);
|
|
2127
2112
|
}
|
|
2128
2113
|
}
|
|
2129
2114
|
class Dr extends w {
|
|
2130
2115
|
}
|
|
2131
|
-
class le extends
|
|
2116
|
+
class le extends b {
|
|
2132
2117
|
/**
|
|
2133
2118
|
* Инициализирует экземпляр класса {@link Property}.
|
|
2134
2119
|
*
|
|
@@ -2188,7 +2173,7 @@ class A {
|
|
|
2188
2173
|
this.from = a(r == null ? void 0 : r.from) ? C(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = a(r == null ? void 0 : r.to) ? C(r.to) : (r == null ? void 0 : r.to) ?? null;
|
|
2189
2174
|
}
|
|
2190
2175
|
}
|
|
2191
|
-
class
|
|
2176
|
+
class Yt {
|
|
2192
2177
|
/**
|
|
2193
2178
|
* Инициализирует экземпляр класса {@link TemplatesListFilters}.
|
|
2194
2179
|
*
|
|
@@ -2248,11 +2233,11 @@ class Kt {
|
|
|
2248
2233
|
return Object.keys(this).forEach((c) => {
|
|
2249
2234
|
const u = this[c];
|
|
2250
2235
|
// eslint-disable-next-line prettier/prettier
|
|
2251
|
-
$(u) || a(u) && u.trim().length === 0 ||
|
|
2236
|
+
$(u) || a(u) && u.trim().length === 0 || Me(u.isNewRec) && u.isNewRec() || (r[c] = u);
|
|
2252
2237
|
}), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((t = r == null ? void 0 : r.createdAt) != null && t.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;
|
|
2253
2238
|
}
|
|
2254
2239
|
}
|
|
2255
|
-
class ue extends
|
|
2240
|
+
class ue extends b {
|
|
2256
2241
|
/**
|
|
2257
2242
|
* Инициализирует экземпляр класса {@link PricingRole}.
|
|
2258
2243
|
*
|
|
@@ -2287,7 +2272,7 @@ class ue extends S {
|
|
|
2287
2272
|
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;
|
|
2288
2273
|
}
|
|
2289
2274
|
}
|
|
2290
|
-
class
|
|
2275
|
+
class rr {
|
|
2291
2276
|
/**
|
|
2292
2277
|
* Инициализирует экземпляр класса {@link PricingRoleCategoryRule}.
|
|
2293
2278
|
*
|
|
@@ -2306,10 +2291,10 @@ class er {
|
|
|
2306
2291
|
* Минимальный коэффициент цены.
|
|
2307
2292
|
*/
|
|
2308
2293
|
s(this, "minCoefficient");
|
|
2309
|
-
this.role = new ue(r == null ? void 0 : r.role), this.category = new ve(r == null ? void 0 : r.category), this.minCoefficient = new
|
|
2294
|
+
this.role = new ue(r == null ? void 0 : r.role), this.category = new ve(r == null ? void 0 : r.category), this.minCoefficient = new de(r == null ? void 0 : r.minCoefficient);
|
|
2310
2295
|
}
|
|
2311
2296
|
}
|
|
2312
|
-
class
|
|
2297
|
+
class Xt extends h {
|
|
2313
2298
|
/**
|
|
2314
2299
|
* Возвращает данные о результатах поиска категорий и товаров.
|
|
2315
2300
|
*
|
|
@@ -2340,7 +2325,7 @@ class Qt extends h {
|
|
|
2340
2325
|
return t && (c += `&category_id=${t}`), i && (c += `&client_id=${i}`), c;
|
|
2341
2326
|
}
|
|
2342
2327
|
}
|
|
2343
|
-
class
|
|
2328
|
+
class Zt extends h {
|
|
2344
2329
|
/**
|
|
2345
2330
|
* Импортирует цены клиента из CSV файла.
|
|
2346
2331
|
*
|
|
@@ -2539,7 +2524,7 @@ class Yt extends h {
|
|
|
2539
2524
|
return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
|
|
2540
2525
|
}
|
|
2541
2526
|
}
|
|
2542
|
-
class
|
|
2527
|
+
class es extends h {
|
|
2543
2528
|
/**
|
|
2544
2529
|
* Возвращает список шаблонов прайс-листа привязанных к клиенту.
|
|
2545
2530
|
*
|
|
@@ -2631,7 +2616,7 @@ class Xt extends h {
|
|
|
2631
2616
|
return this.delete(`/internal/clients/${r}/price/templates/${e}/${t}`);
|
|
2632
2617
|
}
|
|
2633
2618
|
}
|
|
2634
|
-
class
|
|
2619
|
+
class rs extends h {
|
|
2635
2620
|
/**
|
|
2636
2621
|
* Возвращает список данных о корневых категориях.
|
|
2637
2622
|
*
|
|
@@ -2691,7 +2676,7 @@ class Zt extends h {
|
|
|
2691
2676
|
showHidden: t,
|
|
2692
2677
|
withPriceCoefficients: e
|
|
2693
2678
|
},
|
|
2694
|
-
(i) => ye(i.data, (o) => new
|
|
2679
|
+
(i) => ye(i.data, (o) => new _(o))
|
|
2695
2680
|
);
|
|
2696
2681
|
}
|
|
2697
2682
|
/**
|
|
@@ -2704,7 +2689,7 @@ class Zt extends h {
|
|
|
2704
2689
|
getCategoryProductsCoefficients(r) {
|
|
2705
2690
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
2706
2691
|
const { data: t } = e;
|
|
2707
|
-
return
|
|
2692
|
+
return zr(t, (i) => i.map((o) => new Be(o))), t;
|
|
2708
2693
|
});
|
|
2709
2694
|
}
|
|
2710
2695
|
/**
|
|
@@ -2723,7 +2708,7 @@ class Zt extends h {
|
|
|
2723
2708
|
});
|
|
2724
2709
|
}
|
|
2725
2710
|
}
|
|
2726
|
-
class
|
|
2711
|
+
class ts extends h {
|
|
2727
2712
|
/**
|
|
2728
2713
|
* Возвращает данные об указанном продукте.
|
|
2729
2714
|
*
|
|
@@ -2733,7 +2718,7 @@ class es extends h {
|
|
|
2733
2718
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
|
|
2734
2719
|
*/
|
|
2735
2720
|
getProductData(r, e = !1) {
|
|
2736
|
-
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (t) => new
|
|
2721
|
+
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (t) => new _(t.data));
|
|
2737
2722
|
}
|
|
2738
2723
|
/**
|
|
2739
2724
|
* Возвращает публичные данные об указанном продукте.
|
|
@@ -2741,7 +2726,7 @@ class es extends h {
|
|
|
2741
2726
|
* @param productId Идентификатор продукта.
|
|
2742
2727
|
*/
|
|
2743
2728
|
getPublicProductData(r) {
|
|
2744
|
-
return this.get(`/public/catalog/products/${r}`, {}, (e) => new
|
|
2729
|
+
return this.get(`/public/catalog/products/${r}`, {}, (e) => new _(e.data));
|
|
2745
2730
|
}
|
|
2746
2731
|
/**
|
|
2747
2732
|
* Возвращает данные о коэффициентах цен для указанного продукта.
|
|
@@ -2766,14 +2751,14 @@ class es extends h {
|
|
|
2766
2751
|
publicSimpleSearch(r, e = 10) {
|
|
2767
2752
|
return new Promise((t, i) => {
|
|
2768
2753
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2769
|
-
t(o.products.map((c) => new
|
|
2754
|
+
t(o.products.map((c) => new _(c)));
|
|
2770
2755
|
}).catch((o) => {
|
|
2771
2756
|
i(o);
|
|
2772
2757
|
});
|
|
2773
2758
|
});
|
|
2774
2759
|
}
|
|
2775
2760
|
}
|
|
2776
|
-
class
|
|
2761
|
+
class ss extends h {
|
|
2777
2762
|
/**
|
|
2778
2763
|
* Возвращает список данных о корневых категориях указанного клиента.
|
|
2779
2764
|
*
|
|
@@ -2789,7 +2774,7 @@ class rs extends h {
|
|
|
2789
2774
|
clientId: r,
|
|
2790
2775
|
showHidden: e
|
|
2791
2776
|
},
|
|
2792
|
-
(t) => t.data.map((i) => new
|
|
2777
|
+
(t) => t.data.map((i) => new Pe(i))
|
|
2793
2778
|
);
|
|
2794
2779
|
}
|
|
2795
2780
|
/**
|
|
@@ -2810,7 +2795,7 @@ class rs extends h {
|
|
|
2810
2795
|
showHidden: t,
|
|
2811
2796
|
withNestedCategories: i
|
|
2812
2797
|
},
|
|
2813
|
-
(o) => new
|
|
2798
|
+
(o) => new Pe(o.data)
|
|
2814
2799
|
);
|
|
2815
2800
|
}
|
|
2816
2801
|
/**
|
|
@@ -2835,7 +2820,7 @@ class rs extends h {
|
|
|
2835
2820
|
);
|
|
2836
2821
|
}
|
|
2837
2822
|
}
|
|
2838
|
-
class
|
|
2823
|
+
class is extends h {
|
|
2839
2824
|
/**
|
|
2840
2825
|
* Возвращает данные об указанном продукте для указанного клиента.
|
|
2841
2826
|
*
|
|
@@ -2856,8 +2841,8 @@ class ts extends h {
|
|
|
2856
2841
|
);
|
|
2857
2842
|
}
|
|
2858
2843
|
}
|
|
2859
|
-
var
|
|
2860
|
-
class
|
|
2844
|
+
var Ke = /* @__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))(Ke || {});
|
|
2845
|
+
class tr {
|
|
2861
2846
|
/**
|
|
2862
2847
|
* Инициализирует экземпляр класса {@link FilterItem}.
|
|
2863
2848
|
*
|
|
@@ -2876,7 +2861,7 @@ class rr {
|
|
|
2876
2861
|
* Значение с которым сравнивается поле.
|
|
2877
2862
|
*/
|
|
2878
2863
|
s(this, "value");
|
|
2879
|
-
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ??
|
|
2864
|
+
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? Ke.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
|
|
2880
2865
|
}
|
|
2881
2866
|
/**
|
|
2882
2867
|
* Преобразует фильтр в примитивное представление для API.
|
|
@@ -2888,7 +2873,7 @@ class rr {
|
|
|
2888
2873
|
field: this.field,
|
|
2889
2874
|
op: this.op
|
|
2890
2875
|
};
|
|
2891
|
-
return
|
|
2876
|
+
return qe(this.value) ? e.value = L(this.value, r) : je(this.value) ? e.value = {
|
|
2892
2877
|
from: this.value.from ? L(this.value.from, r) : null,
|
|
2893
2878
|
to: this.value.to ? L(this.value.to, r) : null
|
|
2894
2879
|
} : e.value = this.value, e;
|
|
@@ -2914,7 +2899,7 @@ class G {
|
|
|
2914
2899
|
*/
|
|
2915
2900
|
s(this, "groups");
|
|
2916
2901
|
var e, t;
|
|
2917
|
-
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
|
|
2902
|
+
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 tr(i))) ?? [], this.groups = ((t = r == null ? void 0 : r.groups) == null ? void 0 : t.map((i) => new G(i))) ?? [];
|
|
2918
2903
|
}
|
|
2919
2904
|
/**
|
|
2920
2905
|
* Преобразует группу фильтров в примитивное представление для API.
|
|
@@ -2924,7 +2909,7 @@ class G {
|
|
|
2924
2909
|
toPrimitive() {
|
|
2925
2910
|
return {
|
|
2926
2911
|
groupOp: this.groupOp,
|
|
2927
|
-
filters: this.filters.map((r) => r instanceof
|
|
2912
|
+
filters: this.filters.map((r) => r instanceof tr && Me(r.toPrimitive) ? r.toPrimitive() : r),
|
|
2928
2913
|
groups: this.groups.map((r) => r instanceof G ? r.toPrimitive() : r)
|
|
2929
2914
|
};
|
|
2930
2915
|
}
|
|
@@ -2950,7 +2935,7 @@ class Ce extends h {
|
|
|
2950
2935
|
return e && (m.filters = JSON.stringify((e instanceof G ? e : new G(e)).toPrimitive())), re(t) || (m.sort = H(t) ? t : [t]), o && (m = { ...m, ...o }), this.get(r, m, c, u, p);
|
|
2951
2936
|
}
|
|
2952
2937
|
}
|
|
2953
|
-
class
|
|
2938
|
+
class ns extends Ce {
|
|
2954
2939
|
/**
|
|
2955
2940
|
* Возвращает список шаблонов прайс-листа.
|
|
2956
2941
|
*
|
|
@@ -3022,7 +3007,7 @@ class ss extends Ce {
|
|
|
3022
3007
|
return this.get(
|
|
3023
3008
|
`/internal/price/templates/${r}/products`,
|
|
3024
3009
|
{},
|
|
3025
|
-
(e) => e.data.map((t) => new
|
|
3010
|
+
(e) => e.data.map((t) => new _e(t))
|
|
3026
3011
|
);
|
|
3027
3012
|
}
|
|
3028
3013
|
/**
|
|
@@ -3034,7 +3019,7 @@ class ss extends Ce {
|
|
|
3034
3019
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get
|
|
3035
3020
|
*/
|
|
3036
3021
|
getProductTemplatePrice(r, e) {
|
|
3037
|
-
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (t) => new
|
|
3022
|
+
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (t) => new _e(t.data));
|
|
3038
3023
|
}
|
|
3039
3024
|
/**
|
|
3040
3025
|
* Сохраняет цену на продукт в шаблоне прайс-листа.
|
|
@@ -3053,7 +3038,7 @@ class ss extends Ce {
|
|
|
3053
3038
|
price_coefficient_id: (i = t.coefficient) == null ? void 0 : i.id,
|
|
3054
3039
|
increase_percent: t.value
|
|
3055
3040
|
},
|
|
3056
|
-
(o) => new
|
|
3041
|
+
(o) => new _e(o.data)
|
|
3057
3042
|
);
|
|
3058
3043
|
}
|
|
3059
3044
|
/**
|
|
@@ -3078,7 +3063,7 @@ class ss extends Ce {
|
|
|
3078
3063
|
return this.get(
|
|
3079
3064
|
`/internal/price/templates/${r}/categories`,
|
|
3080
3065
|
{},
|
|
3081
|
-
(e) => e.data.map((t) => new
|
|
3066
|
+
(e) => e.data.map((t) => new Le(t))
|
|
3082
3067
|
);
|
|
3083
3068
|
}
|
|
3084
3069
|
/**
|
|
@@ -3093,7 +3078,7 @@ class ss extends Ce {
|
|
|
3093
3078
|
return this.get(
|
|
3094
3079
|
`/internal/price/templates/${r}/categories/${e}`,
|
|
3095
3080
|
{},
|
|
3096
|
-
(t) => new
|
|
3081
|
+
(t) => new Le(t.data)
|
|
3097
3082
|
);
|
|
3098
3083
|
}
|
|
3099
3084
|
/**
|
|
@@ -3119,7 +3104,7 @@ class ss extends Ce {
|
|
|
3119
3104
|
},
|
|
3120
3105
|
params: i ? { recursively: !0 } : {}
|
|
3121
3106
|
},
|
|
3122
|
-
(c) => new
|
|
3107
|
+
(c) => new Le(c.data)
|
|
3123
3108
|
);
|
|
3124
3109
|
}
|
|
3125
3110
|
/**
|
|
@@ -3154,7 +3139,7 @@ class ss extends Ce {
|
|
|
3154
3139
|
);
|
|
3155
3140
|
}
|
|
3156
3141
|
}
|
|
3157
|
-
class
|
|
3142
|
+
class os extends h {
|
|
3158
3143
|
/**
|
|
3159
3144
|
* Возвращает список ролей ценообразования.
|
|
3160
3145
|
*
|
|
@@ -3215,7 +3200,7 @@ class is extends h {
|
|
|
3215
3200
|
return this.get(
|
|
3216
3201
|
`/internal/price/roles/rules/categories/${r}`,
|
|
3217
3202
|
{},
|
|
3218
|
-
(e) => e.data.map((t) => new
|
|
3203
|
+
(e) => e.data.map((t) => new rr(t))
|
|
3219
3204
|
);
|
|
3220
3205
|
}
|
|
3221
3206
|
/**
|
|
@@ -3230,11 +3215,11 @@ class is extends h {
|
|
|
3230
3215
|
return this.patch(
|
|
3231
3216
|
`/internal/price/roles/rules/categories/${r}`,
|
|
3232
3217
|
e,
|
|
3233
|
-
(t) => t.data.map((i) => new
|
|
3218
|
+
(t) => t.data.map((i) => new rr(i))
|
|
3234
3219
|
);
|
|
3235
3220
|
}
|
|
3236
3221
|
}
|
|
3237
|
-
class
|
|
3222
|
+
class cs extends Ce {
|
|
3238
3223
|
/**
|
|
3239
3224
|
* Возвращает пагинированный список свойств.
|
|
3240
3225
|
*
|
|
@@ -3606,7 +3591,7 @@ class ns extends Ce {
|
|
|
3606
3591
|
return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
|
|
3607
3592
|
}
|
|
3608
3593
|
}
|
|
3609
|
-
class
|
|
3594
|
+
class ls extends h {
|
|
3610
3595
|
/**
|
|
3611
3596
|
* Возвращает список данных о корневых категориях указанного шаблона прайс-листа.
|
|
3612
3597
|
*
|
|
@@ -3664,11 +3649,11 @@ class os extends h {
|
|
|
3664
3649
|
showHidden: i,
|
|
3665
3650
|
withPriceCoefficients: t
|
|
3666
3651
|
},
|
|
3667
|
-
(o) => ye(o.data, (c) => new
|
|
3652
|
+
(o) => ye(o.data, (c) => new _(c))
|
|
3668
3653
|
);
|
|
3669
3654
|
}
|
|
3670
3655
|
}
|
|
3671
|
-
function
|
|
3656
|
+
function sr(n, r, e) {
|
|
3672
3657
|
let t;
|
|
3673
3658
|
return n.some((i) => {
|
|
3674
3659
|
if (i.type === e && i.id === r)
|
|
@@ -3677,85 +3662,29 @@ function tr(n, r, e) {
|
|
|
3677
3662
|
return !1;
|
|
3678
3663
|
const o = i;
|
|
3679
3664
|
if (o.products && o.products.length > 0) {
|
|
3680
|
-
const c =
|
|
3665
|
+
const c = sr(o.products, r, e);
|
|
3681
3666
|
if (c)
|
|
3682
3667
|
return t = c, !0;
|
|
3683
3668
|
}
|
|
3684
3669
|
if (o.categories && o.categories.length > 0) {
|
|
3685
|
-
const c =
|
|
3670
|
+
const c = sr(o.categories, r, e);
|
|
3686
3671
|
if (c)
|
|
3687
3672
|
return t = c, !0;
|
|
3688
3673
|
}
|
|
3689
3674
|
return !1;
|
|
3690
3675
|
}), t;
|
|
3691
3676
|
}
|
|
3692
|
-
function
|
|
3677
|
+
function ir(n) {
|
|
3693
3678
|
const r = [];
|
|
3694
3679
|
return n.forEach((e) => {
|
|
3695
3680
|
if (r.push(e), e.type === "category") {
|
|
3696
3681
|
const t = e;
|
|
3697
|
-
t.products && t.products.length > 0 && r.push(...
|
|
3682
|
+
t.products && t.products.length > 0 && r.push(...ir(t.products)), t.categories && t.categories.length > 0 && r.push(...ir(t.categories));
|
|
3698
3683
|
}
|
|
3699
3684
|
}), r;
|
|
3700
3685
|
}
|
|
3701
|
-
var
|
|
3702
|
-
class
|
|
3703
|
-
}
|
|
3704
|
-
class Ar extends w {
|
|
3705
|
-
}
|
|
3706
|
-
class cs extends w {
|
|
3707
|
-
}
|
|
3708
|
-
class wt extends w {
|
|
3709
|
-
}
|
|
3710
|
-
class B extends w {
|
|
3711
|
-
/**
|
|
3712
|
-
* Возвращает сгенерированную запись-описание физического лица.
|
|
3713
|
-
*/
|
|
3714
|
-
static generatePersonItem() {
|
|
3715
|
-
return new B({
|
|
3716
|
-
id: 1,
|
|
3717
|
-
guid: "",
|
|
3718
|
-
slug: U.Person,
|
|
3719
|
-
name: ""
|
|
3720
|
-
});
|
|
3721
|
-
}
|
|
3722
|
-
}
|
|
3723
|
-
class $r extends w {
|
|
3724
|
-
}
|
|
3725
|
-
class vt extends w {
|
|
3726
|
-
}
|
|
3727
|
-
class de extends w {
|
|
3728
|
-
}
|
|
3729
|
-
class se extends w {
|
|
3730
|
-
}
|
|
3731
|
-
class dr extends w {
|
|
3732
|
-
}
|
|
3733
|
-
class at extends w {
|
|
3734
|
-
}
|
|
3735
|
-
class ls {
|
|
3736
|
-
/**
|
|
3737
|
-
* Генерирует и возвращает данные-заглушку неопределённой записи справочника.
|
|
3738
|
-
*
|
|
3739
|
-
* @param Ctor Конструктор конкретного класса справочника.
|
|
3740
|
-
* @param name Название записи.
|
|
3741
|
-
*/
|
|
3742
|
-
static generateUndefinedInstance(r, e = "- Не определён -") {
|
|
3743
|
-
return new r({ id: 0, name: e, slug: "-undefined-" });
|
|
3744
|
-
}
|
|
3745
|
-
/**
|
|
3746
|
-
* Выполняет проверку, является ли указанная запись записью-заглушкой с данными о неопределённой записи справочника.
|
|
3747
|
-
*
|
|
3748
|
-
* @param reference Запись для проверки.
|
|
3749
|
-
*/
|
|
3750
|
-
static isUndefinedInstance(r) {
|
|
3751
|
-
return r.id === 0 && r.slug === "-undefined-";
|
|
3752
|
-
}
|
|
3753
|
-
}
|
|
3754
|
-
class Tr extends w {
|
|
3755
|
-
}
|
|
3756
|
-
class br extends w {
|
|
3757
|
-
}
|
|
3758
|
-
class Ue extends J {
|
|
3686
|
+
var yt = /* @__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))(yt || {}), U = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(U || {});
|
|
3687
|
+
class Fe extends J {
|
|
3759
3688
|
/**
|
|
3760
3689
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
3761
3690
|
*
|
|
@@ -3786,7 +3715,7 @@ class Ue extends J {
|
|
|
3786
3715
|
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new x(e.currency));
|
|
3787
3716
|
}
|
|
3788
3717
|
}
|
|
3789
|
-
class
|
|
3718
|
+
class He extends b {
|
|
3790
3719
|
/**
|
|
3791
3720
|
* Инициализирует экземпляр класса {@link Contact}.
|
|
3792
3721
|
*
|
|
@@ -3805,7 +3734,7 @@ class Fe extends S {
|
|
|
3805
3734
|
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;
|
|
3806
3735
|
}
|
|
3807
3736
|
}
|
|
3808
|
-
class
|
|
3737
|
+
class B extends He {
|
|
3809
3738
|
/**
|
|
3810
3739
|
* Инициализирует экземпляр класса {@link ContactPerson}.
|
|
3811
3740
|
*
|
|
@@ -3840,7 +3769,37 @@ class z extends Fe {
|
|
|
3840
3769
|
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 = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
3841
3770
|
}
|
|
3842
3771
|
}
|
|
3843
|
-
class
|
|
3772
|
+
class z extends w {
|
|
3773
|
+
/**
|
|
3774
|
+
* Возвращает сгенерированную запись-описание физического лица.
|
|
3775
|
+
*/
|
|
3776
|
+
static generatePersonItem() {
|
|
3777
|
+
return new z({
|
|
3778
|
+
id: 1,
|
|
3779
|
+
guid: "",
|
|
3780
|
+
slug: U.Person,
|
|
3781
|
+
name: ""
|
|
3782
|
+
});
|
|
3783
|
+
}
|
|
3784
|
+
}
|
|
3785
|
+
class se extends w {
|
|
3786
|
+
}
|
|
3787
|
+
class dr extends gr {
|
|
3788
|
+
/**
|
|
3789
|
+
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
3790
|
+
*
|
|
3791
|
+
* @param data Данные для первоначальной инициализации.
|
|
3792
|
+
*/
|
|
3793
|
+
constructor(e) {
|
|
3794
|
+
super(e);
|
|
3795
|
+
/**
|
|
3796
|
+
* Дата и время последнего удаления.
|
|
3797
|
+
*/
|
|
3798
|
+
s(this, "deletedAt");
|
|
3799
|
+
this.deletedAt = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
3800
|
+
}
|
|
3801
|
+
}
|
|
3802
|
+
class Ar extends dr {
|
|
3844
3803
|
/**
|
|
3845
3804
|
* Инициализирует экземпляр класса {@link ContragentBase}.
|
|
3846
3805
|
*
|
|
@@ -3852,7 +3811,7 @@ class Sr extends gr {
|
|
|
3852
3811
|
/**
|
|
3853
3812
|
* Данные об организационно-правовой форме.
|
|
3854
3813
|
*/
|
|
3855
|
-
s(this, "opf",
|
|
3814
|
+
s(this, "opf", z.generatePersonItem());
|
|
3856
3815
|
/**
|
|
3857
3816
|
* Группа партнеров (направление деятельности).
|
|
3858
3817
|
*/
|
|
@@ -3886,22 +3845,22 @@ class Sr extends gr {
|
|
|
3886
3845
|
*/
|
|
3887
3846
|
s(this, "updater");
|
|
3888
3847
|
if (e) {
|
|
3889
|
-
if (this.opf = new
|
|
3848
|
+
if (this.opf = new z(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e.createdAt, this.creator = e.creator ? new I(e.creator) : void 0, this.updater = e.updater ? new I(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new se(e.partnerGroup)), e.contacts) {
|
|
3890
3849
|
const t = [];
|
|
3891
3850
|
e.contacts.forEach((i) => {
|
|
3892
|
-
t.push(new
|
|
3851
|
+
t.push(new B(i));
|
|
3893
3852
|
}), this.contacts = t;
|
|
3894
3853
|
}
|
|
3895
3854
|
if (e.bankAccounts) {
|
|
3896
3855
|
const t = [];
|
|
3897
3856
|
e.bankAccounts.forEach((i) => {
|
|
3898
|
-
t.push(new
|
|
3857
|
+
t.push(new Fe(i));
|
|
3899
3858
|
}), this.bankAccounts = t;
|
|
3900
3859
|
}
|
|
3901
3860
|
}
|
|
3902
3861
|
}
|
|
3903
3862
|
}
|
|
3904
|
-
class
|
|
3863
|
+
class wt extends Ar {
|
|
3905
3864
|
/**
|
|
3906
3865
|
* Инициализирует экземпляр класса {@link ContragentPerson}.
|
|
3907
3866
|
*
|
|
@@ -3911,7 +3870,7 @@ class Ct extends Sr {
|
|
|
3911
3870
|
super(r);
|
|
3912
3871
|
}
|
|
3913
3872
|
}
|
|
3914
|
-
class
|
|
3873
|
+
class $r extends Ar {
|
|
3915
3874
|
/**
|
|
3916
3875
|
* Инициализирует экземпляр класса {@link ContragentIc}.
|
|
3917
3876
|
*
|
|
@@ -3954,7 +3913,7 @@ class kr extends Sr {
|
|
|
3954
3913
|
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 ?? "");
|
|
3955
3914
|
}
|
|
3956
3915
|
}
|
|
3957
|
-
class
|
|
3916
|
+
class Tr extends $r {
|
|
3958
3917
|
/**
|
|
3959
3918
|
* Инициализирует экземпляр класса {@link ContragentUlR}.
|
|
3960
3919
|
*
|
|
@@ -3969,7 +3928,7 @@ class Lr extends kr {
|
|
|
3969
3928
|
e && (this.kpp = e.kpp ?? "");
|
|
3970
3929
|
}
|
|
3971
3930
|
}
|
|
3972
|
-
class
|
|
3931
|
+
class vt extends Tr {
|
|
3973
3932
|
/**
|
|
3974
3933
|
* Инициализирует экземпляр класса {@link ContragentUlNr}.
|
|
3975
3934
|
*
|
|
@@ -4001,60 +3960,17 @@ class De {
|
|
|
4001
3960
|
static createInstance(r) {
|
|
4002
3961
|
switch (r.opf.slug) {
|
|
4003
3962
|
case U.Ic:
|
|
4004
|
-
return new
|
|
3963
|
+
return new $r(r);
|
|
4005
3964
|
case U.UlR:
|
|
4006
|
-
return new
|
|
3965
|
+
return new Tr(r);
|
|
4007
3966
|
case U.UlNr:
|
|
4008
|
-
return new
|
|
3967
|
+
return new vt(r);
|
|
4009
3968
|
default:
|
|
4010
|
-
return new
|
|
3969
|
+
return new wt(r);
|
|
4011
3970
|
}
|
|
4012
3971
|
}
|
|
4013
3972
|
}
|
|
4014
|
-
class
|
|
4015
|
-
/**
|
|
4016
|
-
* Инициализирует экземпляр класса {@link ContactRelation}.
|
|
4017
|
-
*
|
|
4018
|
-
* @param data Данные для первоначальной инициализации.
|
|
4019
|
-
*/
|
|
4020
|
-
constructor(e) {
|
|
4021
|
-
super(e);
|
|
4022
|
-
/**
|
|
4023
|
-
* Признак того, что контакт является основным.
|
|
4024
|
-
*/
|
|
4025
|
-
s(this, "isPrimary");
|
|
4026
|
-
this.isPrimary = e.isPrimary;
|
|
4027
|
-
}
|
|
4028
|
-
}
|
|
4029
|
-
class Rt extends z {
|
|
4030
|
-
/**
|
|
4031
|
-
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
4032
|
-
*
|
|
4033
|
-
* @param data Данные для первоначальной инициализации.
|
|
4034
|
-
*/
|
|
4035
|
-
constructor(e) {
|
|
4036
|
-
super(e);
|
|
4037
|
-
/**
|
|
4038
|
-
* Список связей контактного лица с сущностями.
|
|
4039
|
-
*/
|
|
4040
|
-
s(this, "relations", {
|
|
4041
|
-
/**
|
|
4042
|
-
* Список клиентов, с которыми связано контактное лицо.
|
|
4043
|
-
*/
|
|
4044
|
-
clients: [],
|
|
4045
|
-
/**
|
|
4046
|
-
* Список контрагентов, с которыми связано контактное лицо.
|
|
4047
|
-
*/
|
|
4048
|
-
contragents: [],
|
|
4049
|
-
/**
|
|
4050
|
-
* Список адресов доставки, с которыми связано контактное лицо.
|
|
4051
|
-
*/
|
|
4052
|
-
addresses: []
|
|
4053
|
-
});
|
|
4054
|
-
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((t) => new Ie(t))), e.relations.clients && (this.relations.clients = e.relations.clients.map((t) => new Ie(t))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((t) => new Ie(t))));
|
|
4055
|
-
}
|
|
4056
|
-
}
|
|
4057
|
-
class pe extends gr {
|
|
3973
|
+
class pe extends dr {
|
|
4058
3974
|
/**
|
|
4059
3975
|
* Инициализирует экземпляр класса {@link DeliveryAddress}.
|
|
4060
3976
|
*
|
|
@@ -4091,10 +4007,14 @@ class pe extends gr {
|
|
|
4091
4007
|
* Признак того, что указанный адрес является адресом транспортной компании.
|
|
4092
4008
|
*/
|
|
4093
4009
|
s(this, "isTransportCompanyAddress");
|
|
4094
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new
|
|
4010
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new fr(e == null ? void 0 : e.coordinates), this.contacts = ((t = e == null ? void 0 : e.contacts) == null ? void 0 : t.map((i) => new B(i))) ?? [], this.comment = e == null ? void 0 : e.comment, this.operatingHours = e == null ? void 0 : e.operatingHours, this.isOneTime = e == null ? void 0 : e.isOneTime, this.isTransportCompanyAddress = e == null ? void 0 : e.isTransportCompanyAddress;
|
|
4095
4011
|
}
|
|
4096
4012
|
}
|
|
4097
|
-
class
|
|
4013
|
+
class Sr extends w {
|
|
4014
|
+
}
|
|
4015
|
+
class br extends w {
|
|
4016
|
+
}
|
|
4017
|
+
class nr extends V {
|
|
4098
4018
|
/**
|
|
4099
4019
|
* Инициализирует экземпляр класса {@link Client}.
|
|
4100
4020
|
*
|
|
@@ -4144,10 +4064,10 @@ class ir extends E {
|
|
|
4144
4064
|
* @inheritDoc
|
|
4145
4065
|
*/
|
|
4146
4066
|
s(this, "extraData");
|
|
4147
|
-
this.contragents = ((t = e == null ? void 0 : e.contragents) == null ? void 0 : t.map((u) => De.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new se(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new
|
|
4067
|
+
this.contragents = ((t = e == null ? void 0 : e.contragents) == null ? void 0 : t.map((u) => De.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new se(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new B(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new pe(u))) ?? [], this.channelPrimaryInterest = new Sr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new br(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new F(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.preferredWarehouse = e != null && e.preferredWarehouse ? new we(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
|
|
4148
4068
|
}
|
|
4149
4069
|
}
|
|
4150
|
-
class
|
|
4070
|
+
class Qe {
|
|
4151
4071
|
/**
|
|
4152
4072
|
* Возвращает очищенное значение фильтров, содержащие
|
|
4153
4073
|
* только актуальные данные.
|
|
@@ -4157,11 +4077,11 @@ class Ke {
|
|
|
4157
4077
|
return Object.keys(this).forEach((e) => {
|
|
4158
4078
|
const t = this[e];
|
|
4159
4079
|
$(t) || // eslint-disable-next-line prettier/prettier,lodash/prefer-lodash-method
|
|
4160
|
-
a(t) && t.trim().length === 0 ||
|
|
4080
|
+
a(t) && t.trim().length === 0 || Me(t.isNewRec) && t.isNewRec() || (r[e] = t);
|
|
4161
4081
|
}), r;
|
|
4162
4082
|
}
|
|
4163
4083
|
}
|
|
4164
|
-
class us extends
|
|
4084
|
+
class us extends Qe {
|
|
4165
4085
|
/**
|
|
4166
4086
|
* Инициализирует экземпляр класса {@link ClientsListFilters}.
|
|
4167
4087
|
*
|
|
@@ -4270,7 +4190,7 @@ class us extends Ke {
|
|
|
4270
4190
|
* @inheritDoc
|
|
4271
4191
|
*/
|
|
4272
4192
|
s(this, "noOrdersPeriod", new A());
|
|
4273
|
-
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 = (t = e == null ? void 0 : e.cities) == null ? void 0 : t.map((D) => new
|
|
4193
|
+
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 = (t = e == null ? void 0 : e.cities) == null ? void 0 : t.map((D) => new Ae(D)), this.region = new me(e == null ? void 0 : e.region), this.country = new te(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 A(e == null ? void 0 : e.createdAt), this.lastLoginDate = new A(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 ae(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 Ee(D))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((D) => new q(D)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new z(e == null ? void 0 : e.contragentType), this.preferredDeliveryType = e != null && e.preferredDeliveryType ? new F(e == null ? void 0 : e.preferredDeliveryType) : void 0, this.partnerGroups = (u = e == null ? void 0 : e.partnerGroups) == null ? void 0 : u.map((D) => new se(D)), this.contact = new He(e == null ? void 0 : e.contact), this.lastOrder = {
|
|
4274
4194
|
createdAt: new A((p = e == null ? void 0 : e.lastOrder) == null ? void 0 : p.createdAt),
|
|
4275
4195
|
creator: (m = e == null ? void 0 : e.lastOrder) == null ? void 0 : m.creator,
|
|
4276
4196
|
isApproved: (f = e == null ? void 0 : e.lastOrder) == null ? void 0 : f.isApproved
|
|
@@ -4312,7 +4232,7 @@ class us extends Ke {
|
|
|
4312
4232
|
this.salesDirections = [];
|
|
4313
4233
|
break;
|
|
4314
4234
|
case "contragentType":
|
|
4315
|
-
this.contragentType = new
|
|
4235
|
+
this.contragentType = new z();
|
|
4316
4236
|
break;
|
|
4317
4237
|
case "preferredDeliveryType":
|
|
4318
4238
|
this.preferredDeliveryType = new F();
|
|
@@ -4321,7 +4241,7 @@ class us extends Ke {
|
|
|
4321
4241
|
this.partnerGroups = [];
|
|
4322
4242
|
break;
|
|
4323
4243
|
case "contact":
|
|
4324
|
-
this.contact = new
|
|
4244
|
+
this.contact = new He();
|
|
4325
4245
|
break;
|
|
4326
4246
|
default:
|
|
4327
4247
|
this[e] = void 0;
|
|
@@ -4338,7 +4258,7 @@ class us extends Ke {
|
|
|
4338
4258
|
return !((t = e == null ? void 0 : e.createdAt) != null && t.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;
|
|
4339
4259
|
}
|
|
4340
4260
|
}
|
|
4341
|
-
class
|
|
4261
|
+
class kr extends J {
|
|
4342
4262
|
/**
|
|
4343
4263
|
* Инициализирует экземпляр класса {@link OrderShortInfo}.
|
|
4344
4264
|
*
|
|
@@ -4354,10 +4274,10 @@ class Ir extends J {
|
|
|
4354
4274
|
* @inheritDoc
|
|
4355
4275
|
*/
|
|
4356
4276
|
s(this, "creator");
|
|
4357
|
-
this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new
|
|
4277
|
+
this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new I(e == null ? void 0 : e.creator);
|
|
4358
4278
|
}
|
|
4359
4279
|
}
|
|
4360
|
-
class
|
|
4280
|
+
class at extends b {
|
|
4361
4281
|
/**
|
|
4362
4282
|
* Инициализирует экземпляр класса {@link ClientAdditionalData}.
|
|
4363
4283
|
*
|
|
@@ -4394,74 +4314,50 @@ class Dt extends S {
|
|
|
4394
4314
|
* @inheritDoc
|
|
4395
4315
|
*/
|
|
4396
4316
|
s(this, "curators");
|
|
4397
|
-
this.contacts = ((t = e.contacts) == null ? void 0 : t.map((u) => new
|
|
4317
|
+
this.contacts = ((t = e.contacts) == null ? void 0 : t.map((u) => new B(u))) ?? void 0, this.lastOrder = e.lastOrder ? new kr(e.lastOrder) : void 0, this.partnerGroups = ((i = e.partnerGroups) == null ? void 0 : i.map((u) => new se(u))) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new F(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new q(e.salesDirection) : void 0, this.managers = ((o = e.managers) == null ? void 0 : o.map((u) => new Je(u))) ?? void 0, this.curators = ((c = e.curators) == null ? void 0 : c.map((u) => new Ee(u))) ?? void 0;
|
|
4398
4318
|
}
|
|
4399
4319
|
}
|
|
4400
|
-
class
|
|
4320
|
+
class Ie extends J {
|
|
4401
4321
|
/**
|
|
4402
|
-
* Инициализирует экземпляр класса {@link
|
|
4322
|
+
* Инициализирует экземпляр класса {@link ContactRelation}.
|
|
4403
4323
|
*
|
|
4404
4324
|
* @param data Данные для первоначальной инициализации.
|
|
4405
4325
|
*/
|
|
4406
|
-
constructor(
|
|
4407
|
-
|
|
4408
|
-
* Номер текущей страницы.
|
|
4409
|
-
*/
|
|
4410
|
-
s(this, "page", 1);
|
|
4326
|
+
constructor(e) {
|
|
4327
|
+
super(e);
|
|
4411
4328
|
/**
|
|
4412
|
-
*
|
|
4329
|
+
* Признак того, что контакт является основным.
|
|
4413
4330
|
*/
|
|
4414
|
-
s(this, "
|
|
4415
|
-
this.
|
|
4331
|
+
s(this, "isPrimary");
|
|
4332
|
+
this.isPrimary = e.isPrimary;
|
|
4416
4333
|
}
|
|
4417
4334
|
}
|
|
4418
|
-
class
|
|
4335
|
+
class Ct extends B {
|
|
4419
4336
|
/**
|
|
4420
|
-
* Инициализирует экземпляр класса {@link
|
|
4337
|
+
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
4421
4338
|
*
|
|
4422
4339
|
* @param data Данные для первоначальной инициализации.
|
|
4423
4340
|
*/
|
|
4424
4341
|
constructor(e) {
|
|
4425
4342
|
super(e);
|
|
4426
4343
|
/**
|
|
4427
|
-
*
|
|
4428
|
-
*/
|
|
4429
|
-
s(this, "itemCount", 0);
|
|
4430
|
-
/**
|
|
4431
|
-
* Число страниц с данными.
|
|
4432
|
-
*/
|
|
4433
|
-
s(this, "pageCount", 1);
|
|
4434
|
-
/**
|
|
4435
|
-
* Число отображаемых номеров страниц.
|
|
4436
|
-
*/
|
|
4437
|
-
s(this, "pageSlot", 5);
|
|
4438
|
-
/**
|
|
4439
|
-
* Значения для выпадающего списка "Количество записей на странице".
|
|
4440
|
-
*/
|
|
4441
|
-
s(this, "pageSizes", [25, 50, 100]);
|
|
4442
|
-
/**
|
|
4443
|
-
* Признак необходимости отображать список выбора числа отображаемых записей.
|
|
4344
|
+
* Список связей контактного лица с сущностями.
|
|
4444
4345
|
*/
|
|
4445
|
-
s(this, "
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
/**
|
|
4461
|
-
* Направление сортировки.
|
|
4462
|
-
*/
|
|
4463
|
-
s(this, "direction");
|
|
4464
|
-
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
4346
|
+
s(this, "relations", {
|
|
4347
|
+
/**
|
|
4348
|
+
* Список клиентов, с которыми связано контактное лицо.
|
|
4349
|
+
*/
|
|
4350
|
+
clients: [],
|
|
4351
|
+
/**
|
|
4352
|
+
* Список контрагентов, с которыми связано контактное лицо.
|
|
4353
|
+
*/
|
|
4354
|
+
contragents: [],
|
|
4355
|
+
/**
|
|
4356
|
+
* Список адресов доставки, с которыми связано контактное лицо.
|
|
4357
|
+
*/
|
|
4358
|
+
addresses: []
|
|
4359
|
+
});
|
|
4360
|
+
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((t) => new Ie(t))), e.relations.clients && (this.relations.clients = e.relations.clients.map((t) => new Ie(t))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((t) => new Ie(t))));
|
|
4465
4361
|
}
|
|
4466
4362
|
}
|
|
4467
4363
|
class O extends Ce {
|
|
@@ -4603,7 +4499,7 @@ class O extends Ce {
|
|
|
4603
4499
|
* @see /doc/api/internal#/Клиенты/api_internal_client_get_full_info
|
|
4604
4500
|
*/
|
|
4605
4501
|
getClient(r) {
|
|
4606
|
-
return this.get(`/internal/clients/${r}`, {}, (e) => new
|
|
4502
|
+
return this.get(`/internal/clients/${r}`, {}, (e) => new nr(e.data));
|
|
4607
4503
|
}
|
|
4608
4504
|
/**
|
|
4609
4505
|
* Возвращает данные о клиентах, удовлетворяющих указанным параметрам поиска.
|
|
@@ -4625,7 +4521,7 @@ class O extends Ce {
|
|
|
4625
4521
|
i,
|
|
4626
4522
|
(c) => {
|
|
4627
4523
|
const u = { ...c.data };
|
|
4628
|
-
return u.data = u.data.map((p) => new
|
|
4524
|
+
return u.data = u.data.map((p) => new V(p)), u;
|
|
4629
4525
|
},
|
|
4630
4526
|
void 0,
|
|
4631
4527
|
o
|
|
@@ -4651,7 +4547,7 @@ class O extends Ce {
|
|
|
4651
4547
|
return this.getClientsList({
|
|
4652
4548
|
groupOp: "and",
|
|
4653
4549
|
groups: [],
|
|
4654
|
-
filters: [{ field: "phone", op:
|
|
4550
|
+
filters: [{ field: "phone", op: Ke.Contains, value: r }]
|
|
4655
4551
|
});
|
|
4656
4552
|
}
|
|
4657
4553
|
/**
|
|
@@ -4665,7 +4561,7 @@ class O extends Ce {
|
|
|
4665
4561
|
const t = r.map((i) => i.id);
|
|
4666
4562
|
return this.post("/internal/clients/additional-data", { clients: t, requested_data_types: e }, (i) => {
|
|
4667
4563
|
let o = [];
|
|
4668
|
-
return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new
|
|
4564
|
+
return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new at(c))), o;
|
|
4669
4565
|
});
|
|
4670
4566
|
}
|
|
4671
4567
|
/**
|
|
@@ -4677,7 +4573,7 @@ class O extends Ce {
|
|
|
4677
4573
|
getAllClientContacts(r) {
|
|
4678
4574
|
return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
|
|
4679
4575
|
let t = [];
|
|
4680
|
-
return (e == null ? void 0 : e.data.length) > 0 && (t = e.data.map((i) => new
|
|
4576
|
+
return (e == null ? void 0 : e.data.length) > 0 && (t = e.data.map((i) => new Ct(i))), t;
|
|
4681
4577
|
});
|
|
4682
4578
|
}
|
|
4683
4579
|
/**
|
|
@@ -4688,7 +4584,7 @@ class O extends Ce {
|
|
|
4688
4584
|
* @see /doc/api/internal#/Клиенты/api_internal_client_create
|
|
4689
4585
|
*/
|
|
4690
4586
|
createClientCommonData(r, e = {}) {
|
|
4691
|
-
return this.post("/internal/clients", O.transformClientDataToRequest(r), (t) => new
|
|
4587
|
+
return this.post("/internal/clients", O.transformClientDataToRequest(r), (t) => new nr(t.data), e);
|
|
4692
4588
|
}
|
|
4693
4589
|
/**
|
|
4694
4590
|
* Обновляет данные указанного клиента.
|
|
@@ -4926,7 +4822,7 @@ class O extends Ce {
|
|
|
4926
4822
|
return this.post(
|
|
4927
4823
|
`/internal/clients/${r}/contragents/${e}/bank-accounts`,
|
|
4928
4824
|
O.transformClientContragentBankAccountToRequest(t),
|
|
4929
|
-
(o) => new
|
|
4825
|
+
(o) => new Fe(o.data),
|
|
4930
4826
|
i
|
|
4931
4827
|
);
|
|
4932
4828
|
}
|
|
@@ -4943,7 +4839,7 @@ class O extends Ce {
|
|
|
4943
4839
|
return this.patch(
|
|
4944
4840
|
`/internal/clients/${r}/contragents/${e}/bank-accounts/${t.id}`,
|
|
4945
4841
|
O.transformClientContragentBankAccountToRequest(t),
|
|
4946
|
-
(o) => new
|
|
4842
|
+
(o) => new Fe(o.data),
|
|
4947
4843
|
i
|
|
4948
4844
|
);
|
|
4949
4845
|
}
|
|
@@ -4999,7 +4895,7 @@ class O extends Ce {
|
|
|
4999
4895
|
comment: e.comment,
|
|
5000
4896
|
not_disturb: e.notDisturb
|
|
5001
4897
|
},
|
|
5002
|
-
(i) => new
|
|
4898
|
+
(i) => new B(i.data),
|
|
5003
4899
|
t
|
|
5004
4900
|
);
|
|
5005
4901
|
}
|
|
@@ -5136,7 +5032,7 @@ class O extends Ce {
|
|
|
5136
5032
|
comment: e.comment,
|
|
5137
5033
|
...t
|
|
5138
5034
|
};
|
|
5139
|
-
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
|
|
5035
|
+
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 B(p.data), i);
|
|
5140
5036
|
}
|
|
5141
5037
|
/**
|
|
5142
5038
|
* Устанавливает признак основного контактного лица.
|
|
@@ -5165,66 +5061,7 @@ class O extends Ce {
|
|
|
5165
5061
|
return this.get(`/internal/clients/${r.id}/verification/email?email=${r.email}`);
|
|
5166
5062
|
}
|
|
5167
5063
|
}
|
|
5168
|
-
|
|
5169
|
-
/**
|
|
5170
|
-
* Инициализирует экземпляр класса {@link HttpCachedRequester}.
|
|
5171
|
-
*/
|
|
5172
|
-
constructor() {
|
|
5173
|
-
super();
|
|
5174
|
-
/**
|
|
5175
|
-
* Время кэширования данных ответов на запросы (секунд).
|
|
5176
|
-
*/
|
|
5177
|
-
s(this, "responseDataCacheTimeout");
|
|
5178
|
-
this.responseDataCacheTimeout = k().config.http.responseDataCacheTimeout;
|
|
5179
|
-
}
|
|
5180
|
-
/**
|
|
5181
|
-
* Возвращает кэшированные данные.
|
|
5182
|
-
* Если кэшированные данные отсутствуют, то вернет undefined.
|
|
5183
|
-
*
|
|
5184
|
-
* @param key Ключ запроса.
|
|
5185
|
-
*/
|
|
5186
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
5187
|
-
static getCachedResponse(e) {
|
|
5188
|
-
const t = ee.responseDataCache.get(e);
|
|
5189
|
-
if (t && t.validTo > /* @__PURE__ */ new Date())
|
|
5190
|
-
return t.val;
|
|
5191
|
-
}
|
|
5192
|
-
/**
|
|
5193
|
-
* Сохраняет указанные данные из запроса в кэш результатов.
|
|
5194
|
-
*
|
|
5195
|
-
* @param url URL запроса.
|
|
5196
|
-
* @param data Данные для кэширования.
|
|
5197
|
-
*/
|
|
5198
|
-
cacheResponse(e, t) {
|
|
5199
|
-
ee.responseDataCache.set(e, {
|
|
5200
|
-
validTo: Wr(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
|
|
5201
|
-
val: t
|
|
5202
|
-
});
|
|
5203
|
-
}
|
|
5204
|
-
/**
|
|
5205
|
-
* Возвращает {@link Promise} типизированного результата выполнения запроса.
|
|
5206
|
-
*
|
|
5207
|
-
* @param type Тип возвращаемых данных.
|
|
5208
|
-
* @param url URL запроса для получения данных.
|
|
5209
|
-
* @param useResponseDataCache Признак необходимости кэшировать данные ответов на запросы
|
|
5210
|
-
* и использовать в случае аналогичных запросов.
|
|
5211
|
-
* @param params Дополнительные параметры запроса.
|
|
5212
|
-
*/
|
|
5213
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
5214
|
-
getTypedDataArrayRequester(e, t, i = !1, o = {}) {
|
|
5215
|
-
const c = t + (re(o) ? "" : ` >>> ${JSON.stringify(o)}`), u = i ? ee.getCachedResponse(c) : void 0;
|
|
5216
|
-
return u ? Promise.resolve(u) : this.get(t, o).then((p) => {
|
|
5217
|
-
const m = p.map((f) => Ge.instanceInitializer(e, f));
|
|
5218
|
-
return i && m && this.cacheResponse(t, m), m;
|
|
5219
|
-
});
|
|
5220
|
-
}
|
|
5221
|
-
};
|
|
5222
|
-
/**
|
|
5223
|
-
* Кэш результатов запросов.
|
|
5224
|
-
*/
|
|
5225
|
-
s(ee, "responseDataCache", /* @__PURE__ */ new Map());
|
|
5226
|
-
let fe = ee;
|
|
5227
|
-
class gs extends h {
|
|
5064
|
+
class ps extends h {
|
|
5228
5065
|
/**
|
|
5229
5066
|
* Выполняет проверку занят ли указанный номер телефона.
|
|
5230
5067
|
*
|
|
@@ -5238,7 +5075,7 @@ class gs extends h {
|
|
|
5238
5075
|
});
|
|
5239
5076
|
}
|
|
5240
5077
|
}
|
|
5241
|
-
class
|
|
5078
|
+
class hs {
|
|
5242
5079
|
/**
|
|
5243
5080
|
* Инициализирует экземпляр класса {@link VersionConfig}.
|
|
5244
5081
|
*
|
|
@@ -5260,8 +5097,8 @@ class ms {
|
|
|
5260
5097
|
this.date = a(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";
|
|
5261
5098
|
}
|
|
5262
5099
|
}
|
|
5263
|
-
var
|
|
5264
|
-
class
|
|
5100
|
+
var Rt = /* @__PURE__ */ ((n) => (n.Kozyrek = "kozyrek", n.Mosquitto = "mosquitto", n.Strip = "strip", n.MetalForDoors = "metal_for_doors", n.Sandwich = "sandwich", n.SandwichM2 = "sandwich_m2", n))(Rt || {});
|
|
5101
|
+
class gs extends h {
|
|
5265
5102
|
/**
|
|
5266
5103
|
* Возвращает настройки указанного конфигуратора для указанной категории.
|
|
5267
5104
|
*
|
|
@@ -5291,7 +5128,7 @@ class fs extends h {
|
|
|
5291
5128
|
const o = this.get(
|
|
5292
5129
|
`internal/catalog/categories/${r.id}/configurators/${(c = r.properties) == null ? void 0 : c.configurator}/product`,
|
|
5293
5130
|
{ params: t, client_id: e },
|
|
5294
|
-
(u) => new
|
|
5131
|
+
(u) => new _(u.data)
|
|
5295
5132
|
);
|
|
5296
5133
|
return o.catch((u) => {
|
|
5297
5134
|
this.errorResponseHandler(u, i);
|
|
@@ -5352,6 +5189,73 @@ class fs extends h {
|
|
|
5352
5189
|
});
|
|
5353
5190
|
}
|
|
5354
5191
|
}
|
|
5192
|
+
class Pt {
|
|
5193
|
+
/**
|
|
5194
|
+
* Инициализирует экземпляр класса {@link TableDataPaginationRequestParams}.
|
|
5195
|
+
*
|
|
5196
|
+
* @param data Данные для первоначальной инициализации.
|
|
5197
|
+
*/
|
|
5198
|
+
constructor(r) {
|
|
5199
|
+
/**
|
|
5200
|
+
* Номер текущей страницы.
|
|
5201
|
+
*/
|
|
5202
|
+
s(this, "page", 1);
|
|
5203
|
+
/**
|
|
5204
|
+
* Количество записей на странице.
|
|
5205
|
+
*/
|
|
5206
|
+
s(this, "pageSize", 50);
|
|
5207
|
+
this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
|
|
5208
|
+
}
|
|
5209
|
+
}
|
|
5210
|
+
class ms extends Pt {
|
|
5211
|
+
/**
|
|
5212
|
+
* Инициализирует экземпляр класса {@link TableDataPagination}.
|
|
5213
|
+
*
|
|
5214
|
+
* @param data Данные для первоначальной инициализации.
|
|
5215
|
+
*/
|
|
5216
|
+
constructor(e) {
|
|
5217
|
+
super(e);
|
|
5218
|
+
/**
|
|
5219
|
+
* Количество записей в таблице.
|
|
5220
|
+
*/
|
|
5221
|
+
s(this, "itemCount", 0);
|
|
5222
|
+
/**
|
|
5223
|
+
* Число страниц с данными.
|
|
5224
|
+
*/
|
|
5225
|
+
s(this, "pageCount", 1);
|
|
5226
|
+
/**
|
|
5227
|
+
* Число отображаемых номеров страниц.
|
|
5228
|
+
*/
|
|
5229
|
+
s(this, "pageSlot", 5);
|
|
5230
|
+
/**
|
|
5231
|
+
* Значения для выпадающего списка "Количество записей на странице".
|
|
5232
|
+
*/
|
|
5233
|
+
s(this, "pageSizes", [25, 50, 100]);
|
|
5234
|
+
/**
|
|
5235
|
+
* Признак необходимости отображать список выбора числа отображаемых записей.
|
|
5236
|
+
*/
|
|
5237
|
+
s(this, "showSizePicker", !0);
|
|
5238
|
+
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;
|
|
5239
|
+
}
|
|
5240
|
+
}
|
|
5241
|
+
class fs {
|
|
5242
|
+
/**
|
|
5243
|
+
* Инициализирует экземпляр класса {@link ISortRequestParams}.
|
|
5244
|
+
*
|
|
5245
|
+
* @param data Данные для первоначальной инициализации.
|
|
5246
|
+
*/
|
|
5247
|
+
constructor(r) {
|
|
5248
|
+
/**
|
|
5249
|
+
* Поле по которому необходимо выполнить сортировку
|
|
5250
|
+
*/
|
|
5251
|
+
s(this, "field");
|
|
5252
|
+
/**
|
|
5253
|
+
* Направление сортировки.
|
|
5254
|
+
*/
|
|
5255
|
+
s(this, "direction");
|
|
5256
|
+
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
5257
|
+
}
|
|
5258
|
+
}
|
|
5355
5259
|
class ys {
|
|
5356
5260
|
/**
|
|
5357
5261
|
* Возвращает диапазон дат по умолчанию.
|
|
@@ -5361,13 +5265,13 @@ class ys {
|
|
|
5361
5265
|
return {
|
|
5362
5266
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
5363
5267
|
nextWorkingDay: { label: "Следующий рабочий день", from: Zr(r), to: Xr(r) },
|
|
5364
|
-
today: { label: "Сегодня", from:
|
|
5268
|
+
today: { label: "Сегодня", from: Ne(), to: Yr() },
|
|
5365
5269
|
yesterday: { label: "Вчера", from: Qr(), to: Kr() },
|
|
5366
|
-
tomorrow: { label: "Завтра", from:
|
|
5270
|
+
tomorrow: { label: "Завтра", from: Er(), to: Vr() }
|
|
5367
5271
|
};
|
|
5368
5272
|
}
|
|
5369
5273
|
}
|
|
5370
|
-
class
|
|
5274
|
+
class Lr {
|
|
5371
5275
|
/**
|
|
5372
5276
|
* Возвращает признак, что указанный товар имеет линейную единицу измерения.
|
|
5373
5277
|
*
|
|
@@ -5383,7 +5287,7 @@ class _r {
|
|
|
5383
5287
|
*/
|
|
5384
5288
|
static getProductMultiplicity(r) {
|
|
5385
5289
|
var e, t;
|
|
5386
|
-
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((t = r.properties) != null && t.minCount) && !
|
|
5290
|
+
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((t = r.properties) != null && t.minCount) && !Lr.productIsMeasurable(r) ? r.properties.minCount : 1;
|
|
5387
5291
|
}
|
|
5388
5292
|
/**
|
|
5389
5293
|
* Возвращает кратность длины для указанного товара.
|
|
@@ -5395,6 +5299,65 @@ class _r {
|
|
|
5395
5299
|
return (e = r.properties) != null && e.lengthStep ? r.properties.lengthStep : !((t = r.properties) != null && t.ignoreMinCountCheck) && ((i = r.properties) != null && i.minCount) ? r.properties.minCount : 0.01;
|
|
5396
5300
|
}
|
|
5397
5301
|
}
|
|
5302
|
+
const ee = class ee extends h {
|
|
5303
|
+
/**
|
|
5304
|
+
* Инициализирует экземпляр класса {@link HttpCachedRequester}.
|
|
5305
|
+
*/
|
|
5306
|
+
constructor() {
|
|
5307
|
+
super();
|
|
5308
|
+
/**
|
|
5309
|
+
* Время кэширования данных ответов на запросы (секунд).
|
|
5310
|
+
*/
|
|
5311
|
+
s(this, "responseDataCacheTimeout");
|
|
5312
|
+
this.responseDataCacheTimeout = k().config.http.responseDataCacheTimeout;
|
|
5313
|
+
}
|
|
5314
|
+
/**
|
|
5315
|
+
* Возвращает кэшированные данные.
|
|
5316
|
+
* Если кэшированные данные отсутствуют, то вернет undefined.
|
|
5317
|
+
*
|
|
5318
|
+
* @param key Ключ запроса.
|
|
5319
|
+
*/
|
|
5320
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
5321
|
+
static getCachedResponse(e) {
|
|
5322
|
+
const t = ee.responseDataCache.get(e);
|
|
5323
|
+
if (t && t.validTo > /* @__PURE__ */ new Date())
|
|
5324
|
+
return t.val;
|
|
5325
|
+
}
|
|
5326
|
+
/**
|
|
5327
|
+
* Сохраняет указанные данные из запроса в кэш результатов.
|
|
5328
|
+
*
|
|
5329
|
+
* @param url URL запроса.
|
|
5330
|
+
* @param data Данные для кэширования.
|
|
5331
|
+
*/
|
|
5332
|
+
cacheResponse(e, t) {
|
|
5333
|
+
ee.responseDataCache.set(e, {
|
|
5334
|
+
validTo: et(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
|
|
5335
|
+
val: t
|
|
5336
|
+
});
|
|
5337
|
+
}
|
|
5338
|
+
/**
|
|
5339
|
+
* Возвращает {@link Promise} типизированного результата выполнения запроса.
|
|
5340
|
+
*
|
|
5341
|
+
* @param type Тип возвращаемых данных.
|
|
5342
|
+
* @param url URL запроса для получения данных.
|
|
5343
|
+
* @param useResponseDataCache Признак необходимости кэшировать данные ответов на запросы
|
|
5344
|
+
* и использовать в случае аналогичных запросов.
|
|
5345
|
+
* @param params Дополнительные параметры запроса.
|
|
5346
|
+
*/
|
|
5347
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
5348
|
+
getTypedDataArrayRequester(e, t, i = !1, o = {}) {
|
|
5349
|
+
const c = t + (re(o) ? "" : ` >>> ${JSON.stringify(o)}`), u = i ? ee.getCachedResponse(c) : void 0;
|
|
5350
|
+
return u ? Promise.resolve(u) : this.get(t, o).then((p) => {
|
|
5351
|
+
const m = p.map((f) => We.instanceInitializer(e, f));
|
|
5352
|
+
return i && m && this.cacheResponse(t, m), m;
|
|
5353
|
+
});
|
|
5354
|
+
}
|
|
5355
|
+
};
|
|
5356
|
+
/**
|
|
5357
|
+
* Кэш результатов запросов.
|
|
5358
|
+
*/
|
|
5359
|
+
s(ee, "responseDataCache", /* @__PURE__ */ new Map());
|
|
5360
|
+
let fe = ee;
|
|
5398
5361
|
function ws(n, r) {
|
|
5399
5362
|
const e = [2, 0, 1, 1, 1, 2];
|
|
5400
5363
|
return r[n % 100 > 4 && n % 100 < 20 ? 2 : e[Math.min(n % 10, 5)]];
|
|
@@ -5415,7 +5378,7 @@ class vs {
|
|
|
5415
5378
|
return r.id === 0 && r.guid === "-undefined-";
|
|
5416
5379
|
}
|
|
5417
5380
|
}
|
|
5418
|
-
class
|
|
5381
|
+
class Dt extends fe {
|
|
5419
5382
|
/**
|
|
5420
5383
|
* Возвращает {@link Promise} для получения справочника списка менеджеров.
|
|
5421
5384
|
*/
|
|
@@ -5423,11 +5386,11 @@ class dt extends fe {
|
|
|
5423
5386
|
const r = "/internal/managers", e = fe.getCachedResponse(r);
|
|
5424
5387
|
if (e)
|
|
5425
5388
|
return e;
|
|
5426
|
-
const i = (await this.get(r)).data.map((o) =>
|
|
5389
|
+
const i = (await this.get(r)).data.map((o) => We.instanceInitializer(ae, o));
|
|
5427
5390
|
return this.cacheResponse(r, i), i;
|
|
5428
5391
|
}
|
|
5429
5392
|
}
|
|
5430
|
-
class
|
|
5393
|
+
class _r extends J {
|
|
5431
5394
|
/**
|
|
5432
5395
|
* Инициализирует экземпляр класса {@link OfferShortInfo}.
|
|
5433
5396
|
*
|
|
@@ -5451,10 +5414,10 @@ class Or extends J {
|
|
|
5451
5414
|
* @inheritDoc
|
|
5452
5415
|
*/
|
|
5453
5416
|
s(this, "sum");
|
|
5454
|
-
this.name = e == null ? void 0 : e.name, this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.client = new
|
|
5417
|
+
this.name = e == null ? void 0 : e.name, this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.client = new V(e == null ? void 0 : e.client), this.sum = e == null ? void 0 : e.sum;
|
|
5455
5418
|
}
|
|
5456
5419
|
}
|
|
5457
|
-
class X extends
|
|
5420
|
+
class X extends _r {
|
|
5458
5421
|
/**
|
|
5459
5422
|
* Инициализирует экземпляр класса {@link Offer}.
|
|
5460
5423
|
*
|
|
@@ -5473,7 +5436,7 @@ class X extends Or {
|
|
|
5473
5436
|
this.sum = e.sum ?? 0, this.products = (e.products ?? []).map((t) => new vr(t));
|
|
5474
5437
|
}
|
|
5475
5438
|
}
|
|
5476
|
-
class as extends
|
|
5439
|
+
class as extends Qe {
|
|
5477
5440
|
/**
|
|
5478
5441
|
* Инициализирует экземпляр класса {@link OffersListFilters}.
|
|
5479
5442
|
*
|
|
@@ -5514,7 +5477,9 @@ class as extends Ke {
|
|
|
5514
5477
|
return !((t = e == null ? void 0 : e.createdAt) != null && t.from) && !((i = e == null ? void 0 : e.createdAt) != null && i.to) && delete e.createdAt, e;
|
|
5515
5478
|
}
|
|
5516
5479
|
}
|
|
5517
|
-
class
|
|
5480
|
+
class $e extends w {
|
|
5481
|
+
}
|
|
5482
|
+
class Ir extends kr {
|
|
5518
5483
|
/**
|
|
5519
5484
|
* Инициализирует экземпляр класса {@link OrderInfo}.
|
|
5520
5485
|
*
|
|
@@ -5571,7 +5536,7 @@ class xr extends Ir {
|
|
|
5571
5536
|
* @inheritDoc
|
|
5572
5537
|
*/
|
|
5573
5538
|
s(this, "isLargeOrder");
|
|
5574
|
-
this.client = new
|
|
5539
|
+
this.client = new V(e == null ? void 0 : e.client), this.payment = {
|
|
5575
5540
|
type: ((t = e == null ? void 0 : e.payment) == null ? void 0 : t.type) ?? -1,
|
|
5576
5541
|
status: ((i = e == null ? void 0 : e.payment) == null ? void 0 : i.status) ?? -1,
|
|
5577
5542
|
onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
|
|
@@ -5580,10 +5545,10 @@ class xr extends Ir {
|
|
|
5580
5545
|
date: a((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(),
|
|
5581
5546
|
address: (m = e == null ? void 0 : e.delivery) != null && m.address ? new pe(e.delivery.address) : void 0,
|
|
5582
5547
|
warehouse: (f = e == null ? void 0 : e.delivery) != null && f.warehouse ? new we(e.delivery.warehouse) : void 0
|
|
5583
|
-
}, this.attachedUser = e != null && e.attachedUser ? new
|
|
5548
|
+
}, this.attachedUser = e != null && e.attachedUser ? new I(e == null ? void 0 : e.attachedUser) : void 0, this.status = new $e(e == null ? void 0 : e.status), this.statusDetail = e != null && e.statusDetail ? new w(e.statusDetail) : void 0, this.salesDirection = new q(e == null ? void 0 : e.salesDirection), this.attachedAt = a(e == null ? void 0 : e.attachedAt) ? C(e.attachedAt) : e == null ? void 0 : e.attachedAt, 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;
|
|
5584
5549
|
}
|
|
5585
5550
|
}
|
|
5586
|
-
class
|
|
5551
|
+
class dt extends wr {
|
|
5587
5552
|
/**
|
|
5588
5553
|
* Инициализирует экземпляр класса {@link OrderItem}.
|
|
5589
5554
|
*
|
|
@@ -5643,7 +5608,7 @@ class Tt extends wr {
|
|
|
5643
5608
|
this.product = new j(e.product), this.currency = new x(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, t && (this.replacement = t, this.quantity !== t.quantity && this.changedFields.push("quantity"), this.length !== t.length && this.changedFields.push("length"));
|
|
5644
5609
|
}
|
|
5645
5610
|
}
|
|
5646
|
-
class
|
|
5611
|
+
class S extends Ir {
|
|
5647
5612
|
/**
|
|
5648
5613
|
* Инициализирует экземпляр класса {@link Order}.
|
|
5649
5614
|
*
|
|
@@ -5707,8 +5672,8 @@ class b extends xr {
|
|
|
5707
5672
|
this.products = (e.products ?? []).map((i) => {
|
|
5708
5673
|
var c;
|
|
5709
5674
|
const o = i.replacementId ? (c = e.products) == null ? void 0 : c.find((u) => u.id === i.replacementId) : void 0;
|
|
5710
|
-
return new
|
|
5711
|
-
}), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? De.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new w(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = (t = e.nextStatuses) == null ? void 0 : t.map((i) => new
|
|
5675
|
+
return new dt(i, o);
|
|
5676
|
+
}), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? De.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new w(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = (t = e.nextStatuses) == null ? void 0 : t.map((i) => new $e(i)), this.actions = e.actions, this.operatorsComment = e.operatorsComment, this.operatorsForWarehouseComment = e.operatorsForWarehouseComment, this.erpOrderUrl = e.erpOrderUrl;
|
|
5712
5677
|
}
|
|
5713
5678
|
}
|
|
5714
5679
|
class Cs extends Ce {
|
|
@@ -5731,7 +5696,7 @@ class Cs extends Ce {
|
|
|
5731
5696
|
{},
|
|
5732
5697
|
(o) => {
|
|
5733
5698
|
const c = { ...o.data };
|
|
5734
|
-
return c.data = c.data.map((u) => new
|
|
5699
|
+
return c.data = c.data.map((u) => new _r(u)), c;
|
|
5735
5700
|
},
|
|
5736
5701
|
void 0,
|
|
5737
5702
|
i
|
|
@@ -5810,7 +5775,7 @@ class Cs extends Ce {
|
|
|
5810
5775
|
deliveryDate: e.deliveryDate ? L(e.deliveryDate, o) : void 0,
|
|
5811
5776
|
items: t != null && t.length ? t : void 0
|
|
5812
5777
|
},
|
|
5813
|
-
(c) => c.data.map((u) => new
|
|
5778
|
+
(c) => c.data.map((u) => new S(u)),
|
|
5814
5779
|
i
|
|
5815
5780
|
);
|
|
5816
5781
|
}
|
|
@@ -5910,8 +5875,8 @@ class Cs extends Ce {
|
|
|
5910
5875
|
return this.post(`/internal/orders/offers/${r}/send`, e);
|
|
5911
5876
|
}
|
|
5912
5877
|
}
|
|
5913
|
-
var
|
|
5914
|
-
class
|
|
5878
|
+
var At = /* @__PURE__ */ ((n) => (n.View = "view", n.Share = "share", n.EditTags = "edit_tags", n.SaveOrderIgnoredProducts = "save_order_ignored_products", n.ChangeStatus = "change_status", n.ChangeProducts = "change_products", n.ChangeOrderParameters = "change_order_parameters", n.Recalculate = "recalculate", n.AttachOrder = "attach_order", n.DetachOrder = "detach_order", n.ChangeAttachedOperator = "change_attached_operator", n.SendOnlinePaymentLink = "send_online_payment_link", n.ConfirmOnlineFullPayment = "confirm_online_full_payment", n.MergeOrders = "merge_orders", n.GetHistory = "get_history", n.CloneOrder = "clone_order", n.DeleteAttachedFile = "delete_attached_file", n))(At || {});
|
|
5879
|
+
class Rs {
|
|
5915
5880
|
/**
|
|
5916
5881
|
* Инициализирует экземпляр класса {@link OrderEditorData}.
|
|
5917
5882
|
*
|
|
@@ -5978,502 +5943,112 @@ class Ps {
|
|
|
5978
5943
|
this.paymentType = r == null ? void 0 : r.payment.type, this.deliveryType = r == null ? void 0 : r.delivery.type, this.contragentId = (e = r == null ? void 0 : r.contragent) == null ? void 0 : e.id, this.deliveryDate = r != null && r.delivery.date ? new Date(r.delivery.date) : void 0, this.addressId = (t = r == null ? void 0 : r.delivery.address) == null ? void 0 : t.id, this.warehouseId = (i = r == null ? void 0 : r.delivery.warehouse) == null ? void 0 : i.id, this.comment = r == null ? void 0 : r.comment, this.barcode = r == null ? void 0 : r.barcode, this.operatorsComment = r == null ? void 0 : r.operatorsComment, this.operatorsForWarehouseComment = r == null ? void 0 : r.operatorsForWarehouseComment, this.isAllowProcessingWithoutPayment = r == null ? void 0 : r.isAllowProcessingWithoutPayment;
|
|
5979
5944
|
}
|
|
5980
5945
|
}
|
|
5981
|
-
|
|
5982
|
-
|
|
5946
|
+
class Or extends w {
|
|
5947
|
+
}
|
|
5948
|
+
class xr extends w {
|
|
5949
|
+
}
|
|
5950
|
+
class Ps extends Qe {
|
|
5983
5951
|
/**
|
|
5984
|
-
*
|
|
5952
|
+
* Инициализирует экземпляр класса {@link OrdersListFilters}.
|
|
5985
5953
|
*
|
|
5986
|
-
* @param
|
|
5987
|
-
* @param useResponseDataCache Признак необходимости кэшировать данные ответов на запросы
|
|
5988
|
-
* и использовать в случае аналогичных запросов.
|
|
5989
|
-
*/
|
|
5990
|
-
getReference(r, e = !1) {
|
|
5991
|
-
return this.getTypedDataArrayRequester(yt, `/internal/references/${r}`, e);
|
|
5992
|
-
}
|
|
5993
|
-
/**
|
|
5994
|
-
* Возвращает {@link Promise} для получения справочника данных о канале
|
|
5995
|
-
* первичного интереса.
|
|
5996
|
-
*/
|
|
5997
|
-
getChannelPrimaryInterest() {
|
|
5998
|
-
return this.getTypedDataArrayRequester(Ar, "/internal/references/channel-primary-interest", !0);
|
|
5999
|
-
}
|
|
6000
|
-
/**
|
|
6001
|
-
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
6002
|
-
*/
|
|
6003
|
-
getContactPositions() {
|
|
6004
|
-
return this.getTypedDataArrayRequester(wt, "/internal/references/contact-position", !0);
|
|
6005
|
-
}
|
|
6006
|
-
/**
|
|
6007
|
-
* Возвращает {@link Promise} для получения справочника списка направлений кураторства.
|
|
6008
|
-
*/
|
|
6009
|
-
getCuratedDirection() {
|
|
6010
|
-
return this.getTypedDataArrayRequester(Je, "/internal/references/curated-direction", !0);
|
|
6011
|
-
}
|
|
6012
|
-
/**
|
|
6013
|
-
* Возвращает {@link Promise} для получения справочника списка валют.
|
|
6014
|
-
*/
|
|
6015
|
-
getCurrency() {
|
|
6016
|
-
return this.getTypedDataArrayRequester(x, "/public/references/currency", !0);
|
|
6017
|
-
}
|
|
6018
|
-
/**
|
|
6019
|
-
* Возвращает {@link Promise} для получения справочника данных
|
|
6020
|
-
* групп партнеров (направлений деятельности).
|
|
6021
|
-
*/
|
|
6022
|
-
getPartnerGroup() {
|
|
6023
|
-
return this.getTypedDataArrayRequester(se, "/internal/references/partner-group", !0);
|
|
6024
|
-
}
|
|
6025
|
-
/**
|
|
6026
|
-
* Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
|
|
5954
|
+
* @param data Данные для первоначальной инициализации.
|
|
6027
5955
|
*/
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
/**
|
|
6032
|
-
* Возвращает {@link Promise} для получения справочника операторов.
|
|
6033
|
-
*/
|
|
6034
|
-
getOperators() {
|
|
6035
|
-
return this.getTypedDataArrayRequester($r, "/internal/references/operator", !0);
|
|
6036
|
-
}
|
|
6037
|
-
/**
|
|
6038
|
-
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
6039
|
-
*/
|
|
6040
|
-
getOrderPaymentStatuses() {
|
|
6041
|
-
return this.getTypedDataArrayRequester(vt, "/public/references/order-payment-status", !0);
|
|
6042
|
-
}
|
|
6043
|
-
/**
|
|
6044
|
-
* Возвращает {@link Promise} для получения справочника данных статусов заказов.
|
|
6045
|
-
*/
|
|
6046
|
-
getOrderStatuses() {
|
|
6047
|
-
return this.getTypedDataArrayRequester(de, "/internal/references/order-status", !0);
|
|
6048
|
-
}
|
|
6049
|
-
/**
|
|
6050
|
-
* Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
|
|
6051
|
-
*/
|
|
6052
|
-
getPaymentTypes() {
|
|
6053
|
-
return this.getTypedDataArrayRequester(dr, "/public/references/payment-type", !0);
|
|
6054
|
-
}
|
|
6055
|
-
/**
|
|
6056
|
-
* Возвращает {@link Promise} для получения справочника типов ресурсов.
|
|
6057
|
-
*/
|
|
6058
|
-
getResourceTypes() {
|
|
6059
|
-
return this.getTypedDataArrayRequester(Tr, "/internal/references/resource-type", !0);
|
|
6060
|
-
}
|
|
6061
|
-
/**
|
|
6062
|
-
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
6063
|
-
*/
|
|
6064
|
-
getSalesDirections() {
|
|
6065
|
-
return this.getTypedDataArrayRequester(q, "/public/references/sales-direction", !0);
|
|
6066
|
-
}
|
|
6067
|
-
/**
|
|
6068
|
-
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
6069
|
-
*/
|
|
6070
|
-
getSourcePrimaryInterest() {
|
|
6071
|
-
return this.getTypedDataArrayRequester(br, "/internal/references/source-primary-interest", !0);
|
|
6072
|
-
}
|
|
6073
|
-
/**
|
|
6074
|
-
* Выполняет поиск данных о городах по терму в названии.
|
|
6075
|
-
*
|
|
6076
|
-
* @param term Терм поиска.
|
|
6077
|
-
*/
|
|
6078
|
-
searchCity(r) {
|
|
6079
|
-
return this.getTypedDataArrayRequester($e, `/internal/references/city-with-region-and-country/search?term=${r}`);
|
|
6080
|
-
}
|
|
6081
|
-
/**
|
|
6082
|
-
* Выполняет поиск данных о регионах по терму в названии.
|
|
6083
|
-
*
|
|
6084
|
-
* @param term Терм поиска.
|
|
6085
|
-
*/
|
|
6086
|
-
searchRegion(r) {
|
|
6087
|
-
return this.getTypedDataArrayRequester(me, `/internal/references/region-with-country/search?term=${r}`);
|
|
6088
|
-
}
|
|
6089
|
-
/**
|
|
6090
|
-
* Выполняет поиск данных о странах по терму в названии.
|
|
6091
|
-
*
|
|
6092
|
-
* @param term Терм поиска.
|
|
6093
|
-
*/
|
|
6094
|
-
searchCountry(r) {
|
|
6095
|
-
return this.getTypedDataArrayRequester(te, `/internal/references/country/search?term=${r}`);
|
|
6096
|
-
}
|
|
6097
|
-
/**
|
|
6098
|
-
* Возвращает {@link Promise} для получения справочника типов доставки.
|
|
6099
|
-
*/
|
|
6100
|
-
getDeliveryTypes() {
|
|
6101
|
-
return this.getTypedDataArrayRequester(F, "/internal/references/delivery-type", !0);
|
|
6102
|
-
}
|
|
6103
|
-
/**
|
|
6104
|
-
* Возвращает {@link Promise} для получения справочника складов.
|
|
6105
|
-
*/
|
|
6106
|
-
getWarehouses() {
|
|
6107
|
-
return this.getTypedDataArrayRequester(we, "/public/references/warehouse", !0);
|
|
6108
|
-
}
|
|
6109
|
-
/**
|
|
6110
|
-
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
6111
|
-
*/
|
|
6112
|
-
getPropertyTypes() {
|
|
6113
|
-
return this.getTypedDataArrayRequester(Dr, "/internal/references/property-type", !0);
|
|
6114
|
-
}
|
|
6115
|
-
/**
|
|
6116
|
-
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
6117
|
-
*/
|
|
6118
|
-
getPriceCoefficients() {
|
|
6119
|
-
return this.getTypedDataArrayRequester(Ae, "/internal/references/price-coefficient", !0);
|
|
6120
|
-
}
|
|
6121
|
-
/**
|
|
6122
|
-
* Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
|
|
6123
|
-
*/
|
|
6124
|
-
getProductFileType() {
|
|
6125
|
-
return this.getTypedDataArrayRequester(at, "/public/references/product-file-type", !0);
|
|
6126
|
-
}
|
|
6127
|
-
}
|
|
6128
|
-
const d = W("common.references_private", () => {
|
|
6129
|
-
const n = y({}), r = y(void 0), e = y(void 0), t = 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), ie = y(void 0), ne = y(void 0), V = y(void 0), K = y(void 0), Te = y(void 0), be = y(void 0), l = y(void 0);
|
|
6130
|
-
return {
|
|
5956
|
+
constructor(e) {
|
|
5957
|
+
var t, i, o, c;
|
|
5958
|
+
super();
|
|
6131
5959
|
/**
|
|
6132
|
-
*
|
|
5960
|
+
* @inheritDoc
|
|
6133
5961
|
*/
|
|
6134
|
-
|
|
5962
|
+
s(this, "attachedUsers");
|
|
6135
5963
|
/**
|
|
6136
|
-
*
|
|
5964
|
+
* @inheritDoc
|
|
6137
5965
|
*/
|
|
6138
|
-
|
|
5966
|
+
s(this, "clientSearchTerm");
|
|
6139
5967
|
/**
|
|
6140
|
-
*
|
|
5968
|
+
* @inheritDoc
|
|
6141
5969
|
*/
|
|
6142
|
-
|
|
5970
|
+
s(this, "client");
|
|
6143
5971
|
/**
|
|
6144
|
-
*
|
|
5972
|
+
* @inheritDoc
|
|
6145
5973
|
*/
|
|
6146
|
-
|
|
5974
|
+
s(this, "contragent");
|
|
6147
5975
|
/**
|
|
6148
|
-
*
|
|
5976
|
+
* @inheritDoc
|
|
6149
5977
|
*/
|
|
6150
|
-
|
|
5978
|
+
s(this, "createdAt", new A());
|
|
6151
5979
|
/**
|
|
6152
|
-
*
|
|
5980
|
+
* @inheritDoc
|
|
6153
5981
|
*/
|
|
6154
|
-
|
|
5982
|
+
s(this, "creator");
|
|
6155
5983
|
/**
|
|
6156
|
-
*
|
|
5984
|
+
* @inheritDoc
|
|
6157
5985
|
*/
|
|
6158
|
-
|
|
5986
|
+
s(this, "deliveryDate", new A());
|
|
6159
5987
|
/**
|
|
6160
|
-
*
|
|
5988
|
+
* @inheritDoc
|
|
6161
5989
|
*/
|
|
6162
|
-
|
|
5990
|
+
s(this, "deliveryAddressSearch");
|
|
6163
5991
|
/**
|
|
6164
|
-
*
|
|
5992
|
+
* @inheritDoc
|
|
6165
5993
|
*/
|
|
6166
|
-
|
|
5994
|
+
s(this, "clientCities");
|
|
6167
5995
|
/**
|
|
6168
|
-
*
|
|
5996
|
+
* @inheritDoc
|
|
6169
5997
|
*/
|
|
6170
|
-
|
|
5998
|
+
s(this, "id");
|
|
6171
5999
|
/**
|
|
6172
|
-
*
|
|
6000
|
+
* @inheritDoc
|
|
6173
6001
|
*/
|
|
6174
|
-
|
|
6002
|
+
s(this, "isApproved");
|
|
6175
6003
|
/**
|
|
6176
|
-
*
|
|
6004
|
+
* @inheritDoc
|
|
6177
6005
|
*/
|
|
6178
|
-
|
|
6006
|
+
s(this, "isNotInStock");
|
|
6179
6007
|
/**
|
|
6180
|
-
*
|
|
6008
|
+
* @inheritDoc
|
|
6181
6009
|
*/
|
|
6182
|
-
|
|
6010
|
+
s(this, "isOnOrder");
|
|
6183
6011
|
/**
|
|
6184
|
-
*
|
|
6012
|
+
* @inheritDoc
|
|
6185
6013
|
*/
|
|
6186
|
-
|
|
6014
|
+
s(this, "attachedAt", new A());
|
|
6187
6015
|
/**
|
|
6188
|
-
*
|
|
6016
|
+
* @inheritDoc
|
|
6189
6017
|
*/
|
|
6190
|
-
|
|
6018
|
+
s(this, "salesDirections");
|
|
6191
6019
|
/**
|
|
6192
|
-
*
|
|
6020
|
+
* @inheritDoc
|
|
6193
6021
|
*/
|
|
6194
|
-
|
|
6022
|
+
s(this, "status");
|
|
6195
6023
|
/**
|
|
6196
|
-
*
|
|
6024
|
+
* @inheritDoc
|
|
6197
6025
|
*/
|
|
6198
|
-
|
|
6026
|
+
s(this, "statusDetail");
|
|
6199
6027
|
/**
|
|
6200
|
-
*
|
|
6028
|
+
* @inheritDoc
|
|
6201
6029
|
*/
|
|
6202
|
-
|
|
6030
|
+
s(this, "deliveryType");
|
|
6203
6031
|
/**
|
|
6204
|
-
*
|
|
6032
|
+
* @inheritDoc
|
|
6205
6033
|
*/
|
|
6206
|
-
|
|
6207
|
-
};
|
|
6208
|
-
}), Rs = W("common.references", () => {
|
|
6209
|
-
const n = R(() => {
|
|
6210
|
-
const l = d();
|
|
6211
|
-
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(T).getChannelPrimaryInterest().then((g) => {
|
|
6212
|
-
l.channelPrimaryInterestReference = g;
|
|
6213
|
-
}).catch(v)), l.channelPrimaryInterestReference;
|
|
6214
|
-
}), r = R(() => {
|
|
6215
|
-
const l = d();
|
|
6216
|
-
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(T).getContactPositions().then((g) => {
|
|
6217
|
-
l.contactPositionsReference = g;
|
|
6218
|
-
}).catch(v)), l.contactPositionsReference;
|
|
6219
|
-
}), e = R(() => {
|
|
6220
|
-
const l = d();
|
|
6221
|
-
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(T).getCurrency().then((g) => {
|
|
6222
|
-
l.currencyReference = g;
|
|
6223
|
-
}).catch(v)), l.currencyReference;
|
|
6224
|
-
}), t = R(() => {
|
|
6225
|
-
const l = d();
|
|
6226
|
-
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(T).getOpf().then((g) => {
|
|
6227
|
-
l.opfReference = g;
|
|
6228
|
-
}).catch(v)), l.opfReference;
|
|
6229
|
-
}), i = R(() => {
|
|
6230
|
-
const l = d();
|
|
6231
|
-
return !l.operatorReference && !l.dataLoaderList.operatorReference && (l.dataLoaderList.operatorReference = !0, h.getInstance(T).getOperators().then((g) => {
|
|
6232
|
-
l.operatorReference = g;
|
|
6233
|
-
}).catch(v)), l.operatorReference;
|
|
6234
|
-
}), o = R(() => {
|
|
6235
|
-
const l = d();
|
|
6236
|
-
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(T).getOrderPaymentStatuses().then((g) => {
|
|
6237
|
-
l.orderPaymentStatusReference = g;
|
|
6238
|
-
}).catch(v)), l.orderPaymentStatusReference;
|
|
6239
|
-
}), c = R(() => {
|
|
6240
|
-
const l = d();
|
|
6241
|
-
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(T).getOrderStatuses().then((g) => {
|
|
6242
|
-
l.orderStatusReference = g;
|
|
6243
|
-
}).catch(v)), l.orderStatusReference;
|
|
6244
|
-
}), u = R(() => {
|
|
6245
|
-
const l = d();
|
|
6246
|
-
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(T).getPaymentTypes().then((g) => {
|
|
6247
|
-
l.paymentTypeReference = g;
|
|
6248
|
-
}).catch(v)), l.paymentTypeReference;
|
|
6249
|
-
}), p = R(() => {
|
|
6250
|
-
const l = d();
|
|
6251
|
-
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(T).getPartnerGroup().then((g) => {
|
|
6252
|
-
l.partnerGroupReference = g;
|
|
6253
|
-
}).catch(v)), l.partnerGroupReference;
|
|
6254
|
-
}), m = R(() => {
|
|
6255
|
-
const l = d();
|
|
6256
|
-
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(T).getProductFileType().then((g) => {
|
|
6257
|
-
l.productFileTypeReference = g;
|
|
6258
|
-
}).catch(v)), l.productFileTypeReference;
|
|
6259
|
-
}), f = R(() => {
|
|
6260
|
-
const l = d();
|
|
6261
|
-
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(T).getResourceTypes().then((g) => {
|
|
6262
|
-
l.resourceTypesReference = g;
|
|
6263
|
-
}).catch(v)), l.resourceTypesReference;
|
|
6264
|
-
}), D = R(() => {
|
|
6265
|
-
const l = d();
|
|
6266
|
-
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(T).getSalesDirections().then((g) => {
|
|
6267
|
-
l.salesDirectionsReference = g;
|
|
6268
|
-
}).catch(v)), l.salesDirectionsReference;
|
|
6269
|
-
}), ie = R(() => {
|
|
6270
|
-
const l = d();
|
|
6271
|
-
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(T).getSourcePrimaryInterest().then((g) => {
|
|
6272
|
-
l.sourcePrimaryInterestReference = g;
|
|
6273
|
-
}).catch(v)), l.sourcePrimaryInterestReference;
|
|
6274
|
-
}), ne = R(() => {
|
|
6275
|
-
const l = d();
|
|
6276
|
-
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(T).getDeliveryTypes().then((g) => {
|
|
6277
|
-
l.deliveryTypeReference = g;
|
|
6278
|
-
}).catch(v)), l.deliveryTypeReference;
|
|
6279
|
-
}), V = R(() => {
|
|
6280
|
-
const l = d();
|
|
6281
|
-
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(dt).getManagers().then((g) => {
|
|
6282
|
-
l.managersList = g;
|
|
6283
|
-
}).catch(v)), l.managersList;
|
|
6284
|
-
}), K = R(() => {
|
|
6285
|
-
const l = d();
|
|
6286
|
-
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(T).getWarehouses().then((g) => {
|
|
6287
|
-
l.warehousesReference = g;
|
|
6288
|
-
}).catch(v)), l.warehousesReference;
|
|
6289
|
-
}), Te = R(() => {
|
|
6290
|
-
const l = d();
|
|
6291
|
-
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(T).getPropertyTypes().then((g) => {
|
|
6292
|
-
l.propertyTypesReference = g;
|
|
6293
|
-
}).catch(v)), l.propertyTypesReference;
|
|
6294
|
-
}), be = R(() => {
|
|
6295
|
-
const l = d();
|
|
6296
|
-
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(T).getPriceCoefficients().then((g) => {
|
|
6297
|
-
l.priceCoefficientsReference = g;
|
|
6298
|
-
}).catch(v)), l.priceCoefficientsReference;
|
|
6299
|
-
});
|
|
6300
|
-
return {
|
|
6034
|
+
s(this, "paymentType");
|
|
6301
6035
|
/**
|
|
6302
|
-
*
|
|
6036
|
+
* @inheritDoc
|
|
6303
6037
|
*/
|
|
6304
|
-
|
|
6038
|
+
s(this, "warehouses");
|
|
6305
6039
|
/**
|
|
6306
|
-
*
|
|
6040
|
+
* @inheritDoc
|
|
6307
6041
|
*/
|
|
6308
|
-
|
|
6042
|
+
s(this, "isLargeOrder");
|
|
6309
6043
|
/**
|
|
6310
|
-
*
|
|
6044
|
+
* @inheritDoc
|
|
6311
6045
|
*/
|
|
6312
|
-
|
|
6046
|
+
s(this, "isToProcess");
|
|
6313
6047
|
/**
|
|
6314
|
-
*
|
|
6315
|
-
*/
|
|
6316
|
-
opfReference: t,
|
|
6317
|
-
/**
|
|
6318
|
-
* Справочник операторов.
|
|
6319
|
-
*/
|
|
6320
|
-
operatorReference: i,
|
|
6321
|
-
/**
|
|
6322
|
-
* Справочник статусов оплаты заказа.
|
|
6323
|
-
*/
|
|
6324
|
-
orderPaymentStatusReference: o,
|
|
6325
|
-
/**
|
|
6326
|
-
* Справочник статусов заказов.
|
|
6327
|
-
*/
|
|
6328
|
-
orderStatusReference: c,
|
|
6329
|
-
/**
|
|
6330
|
-
* Справочник типов оплаты заказов.
|
|
6331
|
-
*/
|
|
6332
|
-
paymentTypeReference: u,
|
|
6333
|
-
/**
|
|
6334
|
-
* Справочник групп партнеров.
|
|
6335
|
-
*/
|
|
6336
|
-
partnerGroupsReference: p,
|
|
6337
|
-
/**
|
|
6338
|
-
* Справочник типов файлов продуктов/категорий.
|
|
6339
|
-
*/
|
|
6340
|
-
productFilesTypesReference: m,
|
|
6341
|
-
/**
|
|
6342
|
-
* Справочник типов ресурсов.
|
|
6343
|
-
*/
|
|
6344
|
-
resourceTypesReference: f,
|
|
6345
|
-
/**
|
|
6346
|
-
* Справочник направлений продаж.
|
|
6347
|
-
*/
|
|
6348
|
-
salesDirectionsReference: D,
|
|
6349
|
-
/**
|
|
6350
|
-
* Справочник каналов первичного интереса.
|
|
6351
|
-
*/
|
|
6352
|
-
sourcePrimaryInterestsReference: ie,
|
|
6353
|
-
/**
|
|
6354
|
-
* Справочник типов доставки.
|
|
6355
|
-
*/
|
|
6356
|
-
deliveryTypeReference: ne,
|
|
6357
|
-
/**
|
|
6358
|
-
* Список менеджеров.
|
|
6359
|
-
*/
|
|
6360
|
-
managersList: V,
|
|
6361
|
-
/**
|
|
6362
|
-
* Справочник складов.
|
|
6363
|
-
*/
|
|
6364
|
-
warehousesReference: K,
|
|
6365
|
-
/**
|
|
6366
|
-
* Справочник типов свойств.
|
|
6367
|
-
*/
|
|
6368
|
-
propertyTypesReference: Te,
|
|
6369
|
-
/**
|
|
6370
|
-
* Справочник коэффициентов цен.
|
|
6371
|
-
*/
|
|
6372
|
-
priceCoefficientsReference: be
|
|
6373
|
-
};
|
|
6374
|
-
});
|
|
6375
|
-
class Ds extends Ke {
|
|
6376
|
-
/**
|
|
6377
|
-
* Инициализирует экземпляр класса {@link OrdersListFilters}.
|
|
6378
|
-
*
|
|
6379
|
-
* @param data Данные для первоначальной инициализации.
|
|
6380
|
-
*/
|
|
6381
|
-
constructor(e) {
|
|
6382
|
-
var t, i, o, c;
|
|
6383
|
-
super();
|
|
6384
|
-
/**
|
|
6385
|
-
* @inheritDoc
|
|
6386
|
-
*/
|
|
6387
|
-
s(this, "attachedUsers");
|
|
6388
|
-
/**
|
|
6389
|
-
* @inheritDoc
|
|
6390
|
-
*/
|
|
6391
|
-
s(this, "clientSearchTerm");
|
|
6392
|
-
/**
|
|
6393
|
-
* @inheritDoc
|
|
6394
|
-
*/
|
|
6395
|
-
s(this, "client");
|
|
6396
|
-
/**
|
|
6397
|
-
* @inheritDoc
|
|
6398
|
-
*/
|
|
6399
|
-
s(this, "contragent");
|
|
6400
|
-
/**
|
|
6401
|
-
* @inheritDoc
|
|
6402
|
-
*/
|
|
6403
|
-
s(this, "createdAt", new A());
|
|
6404
|
-
/**
|
|
6405
|
-
* @inheritDoc
|
|
6406
|
-
*/
|
|
6407
|
-
s(this, "creator");
|
|
6408
|
-
/**
|
|
6409
|
-
* @inheritDoc
|
|
6410
|
-
*/
|
|
6411
|
-
s(this, "deliveryDate", new A());
|
|
6412
|
-
/**
|
|
6413
|
-
* @inheritDoc
|
|
6414
|
-
*/
|
|
6415
|
-
s(this, "deliveryAddressSearch");
|
|
6416
|
-
/**
|
|
6417
|
-
* @inheritDoc
|
|
6418
|
-
*/
|
|
6419
|
-
s(this, "clientCities");
|
|
6420
|
-
/**
|
|
6421
|
-
* @inheritDoc
|
|
6422
|
-
*/
|
|
6423
|
-
s(this, "id");
|
|
6424
|
-
/**
|
|
6425
|
-
* @inheritDoc
|
|
6426
|
-
*/
|
|
6427
|
-
s(this, "isApproved");
|
|
6428
|
-
/**
|
|
6429
|
-
* @inheritDoc
|
|
6430
|
-
*/
|
|
6431
|
-
s(this, "isNotInStock");
|
|
6432
|
-
/**
|
|
6433
|
-
* @inheritDoc
|
|
6434
|
-
*/
|
|
6435
|
-
s(this, "isOnOrder");
|
|
6436
|
-
/**
|
|
6437
|
-
* @inheritDoc
|
|
6438
|
-
*/
|
|
6439
|
-
s(this, "attachedAt", new A());
|
|
6440
|
-
/**
|
|
6441
|
-
* @inheritDoc
|
|
6442
|
-
*/
|
|
6443
|
-
s(this, "salesDirections");
|
|
6444
|
-
/**
|
|
6445
|
-
* @inheritDoc
|
|
6446
|
-
*/
|
|
6447
|
-
s(this, "status");
|
|
6448
|
-
/**
|
|
6449
|
-
* @inheritDoc
|
|
6450
|
-
*/
|
|
6451
|
-
s(this, "statusDetail");
|
|
6452
|
-
/**
|
|
6453
|
-
* @inheritDoc
|
|
6454
|
-
*/
|
|
6455
|
-
s(this, "deliveryType");
|
|
6456
|
-
/**
|
|
6457
|
-
* @inheritDoc
|
|
6458
|
-
*/
|
|
6459
|
-
s(this, "paymentType");
|
|
6460
|
-
/**
|
|
6461
|
-
* @inheritDoc
|
|
6462
|
-
*/
|
|
6463
|
-
s(this, "warehouses");
|
|
6464
|
-
/**
|
|
6465
|
-
* @inheritDoc
|
|
6466
|
-
*/
|
|
6467
|
-
s(this, "isLargeOrder");
|
|
6468
|
-
/**
|
|
6469
|
-
* @inheritDoc
|
|
6470
|
-
*/
|
|
6471
|
-
s(this, "isToProcess");
|
|
6472
|
-
/**
|
|
6473
|
-
* @inheritDoc
|
|
6048
|
+
* @inheritDoc
|
|
6474
6049
|
*/
|
|
6475
6050
|
s(this, "onlyMyRegions");
|
|
6476
|
-
this.attachedUsers = (t = e == null ? void 0 : e.attachedUsers) == null ? void 0 : t.map((u) => "isActive" in u ? new ae(u) : new
|
|
6051
|
+
this.attachedUsers = (t = e == null ? void 0 : e.attachedUsers) == null ? void 0 : t.map((u) => "isActive" in u ? new ae(u) : new Or(u)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new V(e.client) : void 0, this.contragent = e == null ? void 0 : e.contragent, this.createdAt = new A(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new I(e.creator) : void 0, this.deliveryDate = new A(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.isNotInStock = e == null ? void 0 : e.isNotInStock, this.isOnOrder = e == null ? void 0 : e.isOnOrder, this.isLargeOrder = e == null ? void 0 : e.isLargeOrder, this.attachedAt = new A(e == null ? void 0 : e.attachedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new q(u)), this.status = e == null ? void 0 : e.status, this.statusDetail = e == null ? void 0 : e.statusDetail, this.deliveryType = e != null && e.deliveryType ? new F(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new xr(e.paymentType) : void 0, this.warehouses = (c = e == null ? void 0 : e.warehouses) == null ? void 0 : c.map((u) => new we(u)), this.isToProcess = e == null ? void 0 : e.isToProcess;
|
|
6477
6052
|
}
|
|
6478
6053
|
/**
|
|
6479
6054
|
* @inheritDoc
|
|
@@ -6522,7 +6097,7 @@ class Ds extends Ke {
|
|
|
6522
6097
|
return !((t = e == null ? void 0 : e.createdAt) != null && t.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.attachedAt) != null && u.from) && !((p = e == null ? void 0 : e.attachedAt) != null && p.to) && delete e.attachedAt, e;
|
|
6523
6098
|
}
|
|
6524
6099
|
}
|
|
6525
|
-
class
|
|
6100
|
+
class $t {
|
|
6526
6101
|
/**
|
|
6527
6102
|
* Инициализирует экземпляр класса {@link OrderStatusHistoryInfo}.
|
|
6528
6103
|
*
|
|
@@ -6545,10 +6120,10 @@ class Lt {
|
|
|
6545
6120
|
* @inheritDoc
|
|
6546
6121
|
*/
|
|
6547
6122
|
s(this, "createdAt");
|
|
6548
|
-
this.user = new
|
|
6123
|
+
this.user = new I(r == null ? void 0 : r.user), this.status = new $e(r == null ? void 0 : r.status), this.statusDetail = r != null && r.statusDetail ? new w(r.statusDetail) : void 0, this.createdAt = a(r == null ? void 0 : r.createdAt) ? C(r.createdAt) : (r == null ? void 0 : r.createdAt) ?? /* @__PURE__ */ new Date();
|
|
6549
6124
|
}
|
|
6550
6125
|
}
|
|
6551
|
-
class
|
|
6126
|
+
class Ds extends Ce {
|
|
6552
6127
|
/**
|
|
6553
6128
|
* Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
|
|
6554
6129
|
*
|
|
@@ -6568,7 +6143,7 @@ class As extends Ce {
|
|
|
6568
6143
|
{},
|
|
6569
6144
|
(o) => {
|
|
6570
6145
|
const c = { ...o.data };
|
|
6571
|
-
return c.data = c.data.map((u) => new
|
|
6146
|
+
return c.data = c.data.map((u) => new Ir(u)), c;
|
|
6572
6147
|
},
|
|
6573
6148
|
void 0,
|
|
6574
6149
|
i
|
|
@@ -6608,7 +6183,7 @@ class As extends Ce {
|
|
|
6608
6183
|
* @see /doc/api/internal#/Заказы/api_internal_orders_get
|
|
6609
6184
|
*/
|
|
6610
6185
|
getOrder(r) {
|
|
6611
|
-
return this.get(`/internal/orders/${r}`, {}, (e) => new
|
|
6186
|
+
return this.get(`/internal/orders/${r}`, {}, (e) => new S(e.data));
|
|
6612
6187
|
}
|
|
6613
6188
|
/**
|
|
6614
6189
|
* Создаёт новый заказ клиента из содержимого корзины текущего пользователя.
|
|
@@ -6634,7 +6209,7 @@ class As extends Ce {
|
|
|
6634
6209
|
deliveryDate: L(t.deliveryDate, c),
|
|
6635
6210
|
items: i != null && i.length ? i : void 0
|
|
6636
6211
|
},
|
|
6637
|
-
(u) => u.data.map((p) => new
|
|
6212
|
+
(u) => u.data.map((p) => new S(p)),
|
|
6638
6213
|
o
|
|
6639
6214
|
);
|
|
6640
6215
|
}
|
|
@@ -6646,7 +6221,7 @@ class As extends Ce {
|
|
|
6646
6221
|
* @see /doc/api/internal#/Заказы/api_internal_orders_attach
|
|
6647
6222
|
*/
|
|
6648
6223
|
attachOrder(r) {
|
|
6649
|
-
return this.patch(`/internal/orders/${r}/attach`, {}, (e) => new
|
|
6224
|
+
return this.patch(`/internal/orders/${r}/attach`, {}, (e) => new S(e.data));
|
|
6650
6225
|
}
|
|
6651
6226
|
/**
|
|
6652
6227
|
* Открепляет указанный заказ от оператора и возвращает полные данные заказа.
|
|
@@ -6656,7 +6231,7 @@ class As extends Ce {
|
|
|
6656
6231
|
* @see /doc/api/internal#/Заказы/api_internal_orders_detach
|
|
6657
6232
|
*/
|
|
6658
6233
|
detachOrder(r) {
|
|
6659
|
-
return this.patch(`/internal/orders/${r}/detach`, {}, (e) => new
|
|
6234
|
+
return this.patch(`/internal/orders/${r}/detach`, {}, (e) => new S(e.data));
|
|
6660
6235
|
}
|
|
6661
6236
|
/**
|
|
6662
6237
|
* Объединяет указанные заказы в базовый заказ и возвращает обновлённые данные базового заказа.
|
|
@@ -6667,7 +6242,7 @@ class As extends Ce {
|
|
|
6667
6242
|
* @see /doc/api/internal#/Заказы/api_internal_orders_merge
|
|
6668
6243
|
*/
|
|
6669
6244
|
mergeOrders(r, e) {
|
|
6670
|
-
return this.patch(`/internal/orders/${r}/merge`, { ids: e }, (t) => new
|
|
6245
|
+
return this.patch(`/internal/orders/${r}/merge`, { ids: e }, (t) => new S(t.data));
|
|
6671
6246
|
}
|
|
6672
6247
|
/**
|
|
6673
6248
|
* Пересчитывает стоимость корзины указанного заказа и возвращает обновлённые данные заказа.
|
|
@@ -6677,7 +6252,7 @@ class As extends Ce {
|
|
|
6677
6252
|
* @see /doc/api/internal#/Заказы/api_internal_orders_recalculate
|
|
6678
6253
|
*/
|
|
6679
6254
|
recalculateOrder(r) {
|
|
6680
|
-
return this.patch(`/internal/orders/${r}/recalculate`, {}, (e) => new
|
|
6255
|
+
return this.patch(`/internal/orders/${r}/recalculate`, {}, (e) => new S(e.data));
|
|
6681
6256
|
}
|
|
6682
6257
|
/**
|
|
6683
6258
|
* Копирует товары указанного заказа в текущую корзину пользователя.
|
|
@@ -6708,7 +6283,7 @@ class As extends Ce {
|
|
|
6708
6283
|
...e,
|
|
6709
6284
|
deliveryDate: e.deliveryDate ? L(e.deliveryDate, i) : void 0
|
|
6710
6285
|
},
|
|
6711
|
-
(o) => new
|
|
6286
|
+
(o) => new S(o.data),
|
|
6712
6287
|
t
|
|
6713
6288
|
);
|
|
6714
6289
|
}
|
|
@@ -6738,7 +6313,7 @@ class As extends Ce {
|
|
|
6738
6313
|
is_additional_sale: e.isAdditionalSale,
|
|
6739
6314
|
...e.configuratorParams
|
|
6740
6315
|
},
|
|
6741
|
-
(i) => new
|
|
6316
|
+
(i) => new S(i.data),
|
|
6742
6317
|
t
|
|
6743
6318
|
);
|
|
6744
6319
|
}
|
|
@@ -6761,7 +6336,7 @@ class As extends Ce {
|
|
|
6761
6336
|
status: e,
|
|
6762
6337
|
statusDetail: t
|
|
6763
6338
|
},
|
|
6764
|
-
(o) => new
|
|
6339
|
+
(o) => new S(o.data),
|
|
6765
6340
|
i
|
|
6766
6341
|
);
|
|
6767
6342
|
}
|
|
@@ -6775,7 +6350,7 @@ class As extends Ce {
|
|
|
6775
6350
|
* @see /doc/api/internal#/Заказы/api_internal_orders_status_change
|
|
6776
6351
|
*/
|
|
6777
6352
|
changeOrderStatusDetail(r, e) {
|
|
6778
|
-
return this.patch(`/internal/orders/${r}/status`, { statusDetail: e }, (t) => new
|
|
6353
|
+
return this.patch(`/internal/orders/${r}/status`, { statusDetail: e }, (t) => new S(t.data));
|
|
6779
6354
|
}
|
|
6780
6355
|
/**
|
|
6781
6356
|
* Возвращает историю изменения статусов заказа.
|
|
@@ -6788,7 +6363,7 @@ class As extends Ce {
|
|
|
6788
6363
|
return this.get(
|
|
6789
6364
|
`/internal/orders/${r}/history`,
|
|
6790
6365
|
{},
|
|
6791
|
-
(e) => e.data.map((t) => new
|
|
6366
|
+
(e) => e.data.map((t) => new $t(t))
|
|
6792
6367
|
);
|
|
6793
6368
|
}
|
|
6794
6369
|
/**
|
|
@@ -6800,7 +6375,7 @@ class As extends Ce {
|
|
|
6800
6375
|
* @see /doc/api/internal#/Заказы/api_internal_orders_change_attached_operator
|
|
6801
6376
|
*/
|
|
6802
6377
|
changeAttachedOperator(r, e) {
|
|
6803
|
-
return this.patch(`/internal/orders/${r}/change-attached-operator`, { operatorId: e }, (t) => new
|
|
6378
|
+
return this.patch(`/internal/orders/${r}/change-attached-operator`, { operatorId: e }, (t) => new S(t.data));
|
|
6804
6379
|
}
|
|
6805
6380
|
/**
|
|
6806
6381
|
* Удаляет файл, прикреплённый к заказу клиентом, и возвращает обновлённые данные заказа.
|
|
@@ -6810,7 +6385,7 @@ class As extends Ce {
|
|
|
6810
6385
|
* @see /doc/api/internal#/Заказы/api_internal_orders_attached_file_delete
|
|
6811
6386
|
*/
|
|
6812
6387
|
deleteOrderAttachedFile(r) {
|
|
6813
|
-
return this.delete(`/internal/orders/${r}/file/attached`, (e) => new
|
|
6388
|
+
return this.delete(`/internal/orders/${r}/file/attached`, (e) => new S(e.data));
|
|
6814
6389
|
}
|
|
6815
6390
|
/**
|
|
6816
6391
|
* Удаляет продукт из заказа и возвращает обновлённые данные заказа.
|
|
@@ -6821,7 +6396,7 @@ class As extends Ce {
|
|
|
6821
6396
|
* @see /doc/api/internal#/operations/api_internal_orders_product_delete
|
|
6822
6397
|
*/
|
|
6823
6398
|
deleteOrderProduct(r, e) {
|
|
6824
|
-
return this.delete(`/internal/orders/${r}/products/${e}`, (t) => new
|
|
6399
|
+
return this.delete(`/internal/orders/${r}/products/${e}`, (t) => new S(t.data));
|
|
6825
6400
|
}
|
|
6826
6401
|
/**
|
|
6827
6402
|
* Изменяет продукт заказа и возвращает обновлённые данные заказа.
|
|
@@ -6849,7 +6424,7 @@ class As extends Ce {
|
|
|
6849
6424
|
marker: t.marker,
|
|
6850
6425
|
...t.configuratorParams
|
|
6851
6426
|
},
|
|
6852
|
-
(o) => new
|
|
6427
|
+
(o) => new S(o.data),
|
|
6853
6428
|
i
|
|
6854
6429
|
);
|
|
6855
6430
|
}
|
|
@@ -6897,7 +6472,7 @@ class As extends Ce {
|
|
|
6897
6472
|
);
|
|
6898
6473
|
}
|
|
6899
6474
|
}
|
|
6900
|
-
class
|
|
6475
|
+
class Oe {
|
|
6901
6476
|
/**
|
|
6902
6477
|
* Инициализирует экземпляр класса {@link PriceAnalyze}.
|
|
6903
6478
|
*
|
|
@@ -6905,260 +6480,706 @@ class _e {
|
|
|
6905
6480
|
*/
|
|
6906
6481
|
constructor(r) {
|
|
6907
6482
|
/**
|
|
6908
|
-
* Краткие данные о клиенте.
|
|
6483
|
+
* Краткие данные о клиенте.
|
|
6484
|
+
*/
|
|
6485
|
+
s(this, "client");
|
|
6486
|
+
/**
|
|
6487
|
+
* Базовые данные о продукте.
|
|
6488
|
+
*/
|
|
6489
|
+
s(this, "product");
|
|
6490
|
+
/**
|
|
6491
|
+
* Стоимость товара или услуги.
|
|
6492
|
+
*/
|
|
6493
|
+
s(this, "cost");
|
|
6494
|
+
/**
|
|
6495
|
+
* Коэффициент стоимости продукта от розничной цены.
|
|
6496
|
+
*/
|
|
6497
|
+
s(this, "costCoefficient");
|
|
6498
|
+
/**
|
|
6499
|
+
* Источник клиентской цены.
|
|
6500
|
+
*/
|
|
6501
|
+
s(this, "source");
|
|
6502
|
+
this.client = new V(r == null ? void 0 : r.client), this.product = new _(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) ?? ze.Product;
|
|
6503
|
+
}
|
|
6504
|
+
}
|
|
6505
|
+
const xe = (n) => {
|
|
6506
|
+
var r, e, t, i, o;
|
|
6507
|
+
return n ? hr(
|
|
6508
|
+
{
|
|
6509
|
+
cities: (r = n.cities) == null ? void 0 : r.map((c) => c.id),
|
|
6510
|
+
clients: (e = n.clients) == null ? void 0 : e.map((c) => c.id),
|
|
6511
|
+
managers: (t = n.managers) == null ? void 0 : t.map((c) => c.id),
|
|
6512
|
+
partnerGroups: (i = n.partnerGroups) == null ? void 0 : i.map((c) => c.id),
|
|
6513
|
+
salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
|
|
6514
|
+
hideNotActive: n.hideNotActive
|
|
6515
|
+
},
|
|
6516
|
+
(c) => $(c) || (H(c) || je(c)) && re(c)
|
|
6517
|
+
) : {};
|
|
6518
|
+
}, or = (n) => {
|
|
6519
|
+
const r = {};
|
|
6520
|
+
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;
|
|
6521
|
+
};
|
|
6522
|
+
class ds extends h {
|
|
6523
|
+
/**
|
|
6524
|
+
* Возвращает список клиентских цен на продукты в указанном диапазоне цены.
|
|
6525
|
+
*
|
|
6526
|
+
* @param productId Идентификатор продукта.
|
|
6527
|
+
* @param params Параметры анализа цен.
|
|
6528
|
+
* @param filters Параметры фильтрации данных.
|
|
6529
|
+
*
|
|
6530
|
+
* @see /doc/api/internal#/operations/api_internal_catalog_price_products_analyze
|
|
6531
|
+
*/
|
|
6532
|
+
analyzeProductPrices(r, e, t) {
|
|
6533
|
+
return this.get(
|
|
6534
|
+
`/internal/price/products/${r}/analyze`,
|
|
6535
|
+
{
|
|
6536
|
+
...or(e),
|
|
6537
|
+
filters: xe(t)
|
|
6538
|
+
},
|
|
6539
|
+
(i) => i.data.map((o) => new Oe(o))
|
|
6540
|
+
);
|
|
6541
|
+
}
|
|
6542
|
+
/**
|
|
6543
|
+
* Возвращает список клиентских цен на продукты категории в указанном диапазоне цены.
|
|
6544
|
+
*
|
|
6545
|
+
* @param productCategoryId Идентификатор категории продукта.
|
|
6546
|
+
* @param params Параметры анализа цен.
|
|
6547
|
+
* @param filters Параметры фильтрации данных.
|
|
6548
|
+
*
|
|
6549
|
+
* @see /doc/api/internal#/operations/api_internal_catalog_price_categories_analyze
|
|
6550
|
+
*/
|
|
6551
|
+
analyzeCategoryPrices(r, e, t) {
|
|
6552
|
+
return this.get(
|
|
6553
|
+
`/internal/price/categories/${r}/analyze`,
|
|
6554
|
+
{
|
|
6555
|
+
...or(e),
|
|
6556
|
+
filters: xe(t)
|
|
6557
|
+
},
|
|
6558
|
+
(i) => i.data.map((o) => new Oe(o))
|
|
6559
|
+
);
|
|
6560
|
+
}
|
|
6561
|
+
/**
|
|
6562
|
+
* Возвращает список клиентских цен на продукты категории в указанном диапазоне цены за квадратный метр.
|
|
6563
|
+
*
|
|
6564
|
+
* @param productCategoryId Идентификатор категории продукта.
|
|
6565
|
+
* @param params Параметры анализа цен.
|
|
6566
|
+
* @param params.from Цена больше или равна значению.
|
|
6567
|
+
* @param params.to Цена меньше или равна значению.
|
|
6568
|
+
* @param filters Параметры фильтрации данных.
|
|
6569
|
+
*
|
|
6570
|
+
* @see /doc/api/internal#/operations/api_internal_catalog_price_categories_analyze_by_square
|
|
6571
|
+
*/
|
|
6572
|
+
analyzeCategoryPricesBySquare(r, e, t) {
|
|
6573
|
+
return this.get(
|
|
6574
|
+
`/internal/price/categories/${r}/analyze/square`,
|
|
6575
|
+
{
|
|
6576
|
+
...e,
|
|
6577
|
+
filters: xe(t)
|
|
6578
|
+
},
|
|
6579
|
+
(i) => i.data.map((o) => new Oe(o))
|
|
6580
|
+
);
|
|
6581
|
+
}
|
|
6582
|
+
}
|
|
6583
|
+
class Tt {
|
|
6584
|
+
/**
|
|
6585
|
+
* Инициализирует экземпляр класса {@link PriceHistoryItem}.
|
|
6586
|
+
*
|
|
6587
|
+
* @param data Данные для первоначальной инициализации.
|
|
6588
|
+
*/
|
|
6589
|
+
constructor(r) {
|
|
6590
|
+
/**
|
|
6591
|
+
* @inheritDoc
|
|
6592
|
+
*/
|
|
6593
|
+
s(this, "cost");
|
|
6594
|
+
/**
|
|
6595
|
+
* @inheritDoc
|
|
6596
|
+
*/
|
|
6597
|
+
s(this, "isLowCost");
|
|
6598
|
+
/**
|
|
6599
|
+
* @inheritDoc
|
|
6600
|
+
*/
|
|
6601
|
+
s(this, "isRetail");
|
|
6602
|
+
/**
|
|
6603
|
+
* @inheritDoc
|
|
6604
|
+
*/
|
|
6605
|
+
s(this, "costDate");
|
|
6606
|
+
/**
|
|
6607
|
+
* @inheritDoc
|
|
6608
|
+
*/
|
|
6609
|
+
s(this, "discountName");
|
|
6610
|
+
/**
|
|
6611
|
+
* @inheritDoc
|
|
6612
|
+
*/
|
|
6613
|
+
s(this, "priceTemplateName");
|
|
6614
|
+
/**
|
|
6615
|
+
* @inheritDoc
|
|
6616
|
+
*/
|
|
6617
|
+
s(this, "product");
|
|
6618
|
+
/**
|
|
6619
|
+
* @inheritDoc
|
|
6620
|
+
*/
|
|
6621
|
+
s(this, "client");
|
|
6622
|
+
/**
|
|
6623
|
+
* @inheritDoc
|
|
6624
|
+
*/
|
|
6625
|
+
s(this, "executor");
|
|
6626
|
+
/**
|
|
6627
|
+
* @inheritDoc
|
|
6628
|
+
*/
|
|
6629
|
+
s(this, "currency");
|
|
6630
|
+
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = a(r.costDate) ? C(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new ge(r.product) : void 0, this.client = r.client ? new I(r.client) : void 0, this.executor = r.executor ? new I(r.executor) : void 0, this.currency = r.currency ? new x(r.currency) : void 0;
|
|
6631
|
+
}
|
|
6632
|
+
}
|
|
6633
|
+
class St extends ge {
|
|
6634
|
+
/**
|
|
6635
|
+
* Инициализирует экземпляр класса {@link ProductPriceHistory}.
|
|
6636
|
+
*
|
|
6637
|
+
* @param data Данные для первоначальной инициализации.
|
|
6638
|
+
*/
|
|
6639
|
+
constructor(e) {
|
|
6640
|
+
super(e);
|
|
6641
|
+
/**
|
|
6642
|
+
* @inheritDoc
|
|
6643
|
+
*/
|
|
6644
|
+
s(this, "history");
|
|
6645
|
+
this.history = ye(e.history, (t) => new Tt(t));
|
|
6646
|
+
}
|
|
6647
|
+
}
|
|
6648
|
+
class As extends h {
|
|
6649
|
+
/**
|
|
6650
|
+
* Возвращает данные об истории изменения цен.
|
|
6651
|
+
*
|
|
6652
|
+
* @param filters Фильтры для поиска истории изменения цен.
|
|
6653
|
+
*
|
|
6654
|
+
* @see /docs/api#/operations/api_internal_price_history_get
|
|
6655
|
+
*/
|
|
6656
|
+
getProductPriceHistory(r) {
|
|
6657
|
+
var o, c, u, p, m;
|
|
6658
|
+
const e = k().config.dateFormats.api, t = hr(
|
|
6659
|
+
he(r, {
|
|
6660
|
+
costDate: {
|
|
6661
|
+
from: qe((o = r.costDate) == null ? void 0 : o.from) ? L(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
|
|
6662
|
+
to: qe((u = r.costDate) == null ? void 0 : u.to) ? L(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
|
|
6663
|
+
}
|
|
6664
|
+
}),
|
|
6665
|
+
(f) => $(f) || (H(f) || je(f)) && re(f)
|
|
6666
|
+
), i = ((m = r.product) == null ? void 0 : m[0]) ?? 0;
|
|
6667
|
+
return delete t.product, this.get(`/internal/price/products/${i}/history`, t).then((f) => [
|
|
6668
|
+
new St(he(f[0], { history: f }))
|
|
6669
|
+
]);
|
|
6670
|
+
}
|
|
6671
|
+
}
|
|
6672
|
+
class cr {
|
|
6673
|
+
/**
|
|
6674
|
+
* Инициализирует экземпляр класса {@link RecommendationsList}.
|
|
6675
|
+
*
|
|
6676
|
+
* @param data Данные для первоначальной инициализации.
|
|
6677
|
+
*/
|
|
6678
|
+
constructor(r) {
|
|
6679
|
+
/**
|
|
6680
|
+
* Список рекомендованных продуктов.
|
|
6681
|
+
*/
|
|
6682
|
+
s(this, "products", []);
|
|
6683
|
+
/**
|
|
6684
|
+
* Список рекомендованных категорий продуктов.
|
|
6685
|
+
*/
|
|
6686
|
+
s(this, "productCategories", []);
|
|
6687
|
+
r != null && r.products && (this.products = r.products.map((e) => new ge(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new ge(e)));
|
|
6688
|
+
}
|
|
6689
|
+
}
|
|
6690
|
+
class $s extends h {
|
|
6691
|
+
/**
|
|
6692
|
+
* Возвращает данные о рекомендациях указанной категории продуктов.
|
|
6693
|
+
*
|
|
6694
|
+
* @param productCategory Данные о категории продуктов, для которой необходимо получить рекомендации.
|
|
6695
|
+
* @see /docs/api#/operations/api_internal_recommendations_product_category_get
|
|
6696
|
+
*/
|
|
6697
|
+
getProductCategoryRecommendations(r) {
|
|
6698
|
+
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new cr(e.data));
|
|
6699
|
+
}
|
|
6700
|
+
/**
|
|
6701
|
+
* Возвращает данные о рекомендациях указанного продукта.
|
|
6702
|
+
*
|
|
6703
|
+
* @param product Данные о продукте, для которого необходимо получить рекомендации.
|
|
6704
|
+
* @see /docs/api#/operations/api_internal_recommendations_product_get
|
|
6705
|
+
*/
|
|
6706
|
+
getProductRecommendations(r) {
|
|
6707
|
+
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new cr(e.data));
|
|
6708
|
+
}
|
|
6709
|
+
/**
|
|
6710
|
+
* Выполняет сохранение данных о рекомендуемых категориях продуктов.
|
|
6711
|
+
*
|
|
6712
|
+
* @param productCategory Данные о категории для которой необходимо сохранить список рекомендуемых товаров.
|
|
6713
|
+
* @param recommendations Список рекомендованных продуктов и категорий.
|
|
6714
|
+
* @see /docs/api#/operations/api_internal_recommendations_product_category_save
|
|
6715
|
+
*/
|
|
6716
|
+
saveProductCategoryRecommendations(r, e) {
|
|
6717
|
+
return this.post(`/internal/catalog/recommendations/categories/${r.id}`, {
|
|
6718
|
+
product_categories: e.productCategories.map((t) => t.id),
|
|
6719
|
+
products: e.products.map((t) => t.id)
|
|
6720
|
+
});
|
|
6721
|
+
}
|
|
6722
|
+
/**
|
|
6723
|
+
* Выполняет сохранение данных о рекомендуемых продуктах.
|
|
6724
|
+
*
|
|
6725
|
+
* @param product Данные о продукте для которого необходимо сохранить список рекомендуемых товаров.
|
|
6726
|
+
* @param recommendations Список рекомендованных продуктов и категорий.
|
|
6727
|
+
* @see /docs/api#/operations/api_internal_recommendations_product_save
|
|
6728
|
+
*/
|
|
6729
|
+
saveProductRecommendations(r, e) {
|
|
6730
|
+
return this.post(`/internal/catalog/recommendations/products/${r.id}`, {
|
|
6731
|
+
product_categories: e.productCategories.map((t) => t.id),
|
|
6732
|
+
products: e.products.map((t) => t.id)
|
|
6733
|
+
});
|
|
6734
|
+
}
|
|
6735
|
+
}
|
|
6736
|
+
var bt = /* @__PURE__ */ ((n) => (n.New = "new", n.Processing = "processing", n.AwaitingSupplyProducts = "awaiting_supply_products", n.InvoiceIssued = "invoice_issued", n.ProcessingOnStock = "processing_on_stock", n.Finished = "finished", n.OrderUpdated = "order_updated", n.Canceled = "canceled", n.Error = "error", n))(bt || {}), kt = /* @__PURE__ */ ((n) => (n.CanceledBy1c = "canceled_by1c", n.CanceledByClient = "canceled_by_client", n.FinishedNotApproved = "finished_not_approved", n.ProcessingByPurchasingDepartment = "processing_by_purchasing_department", n.WillWaiting = "will_waiting", n))(kt || {});
|
|
6737
|
+
class Lt extends w {
|
|
6738
|
+
}
|
|
6739
|
+
class Ts extends w {
|
|
6740
|
+
}
|
|
6741
|
+
class _t extends w {
|
|
6742
|
+
}
|
|
6743
|
+
class It extends w {
|
|
6744
|
+
}
|
|
6745
|
+
class Ot extends w {
|
|
6746
|
+
}
|
|
6747
|
+
class xt extends w {
|
|
6748
|
+
}
|
|
6749
|
+
class Ss {
|
|
6750
|
+
/**
|
|
6751
|
+
* Генерирует и возвращает данные-заглушку неопределённой записи справочника.
|
|
6752
|
+
*
|
|
6753
|
+
* @param Ctor Конструктор конкретного класса справочника.
|
|
6754
|
+
* @param name Название записи.
|
|
6755
|
+
*/
|
|
6756
|
+
static generateUndefinedInstance(r, e = "- Не определён -") {
|
|
6757
|
+
return new r({ id: 0, name: e, slug: "-undefined-" });
|
|
6758
|
+
}
|
|
6759
|
+
/**
|
|
6760
|
+
* Выполняет проверку, является ли указанная запись записью-заглушкой с данными о неопределённой записи справочника.
|
|
6761
|
+
*
|
|
6762
|
+
* @param reference Запись для проверки.
|
|
6763
|
+
*/
|
|
6764
|
+
static isUndefinedInstance(r) {
|
|
6765
|
+
return r.id === 0 && r.slug === "-undefined-";
|
|
6766
|
+
}
|
|
6767
|
+
}
|
|
6768
|
+
class qr extends w {
|
|
6769
|
+
}
|
|
6770
|
+
class T extends fe {
|
|
6771
|
+
/**
|
|
6772
|
+
* Возвращает {@link Promise} для получения данных указанного справочника.
|
|
6773
|
+
*
|
|
6774
|
+
* @param referenceName Название справочника.
|
|
6775
|
+
* @param useResponseDataCache Признак необходимости кэшировать данные ответов на запросы
|
|
6776
|
+
* и использовать в случае аналогичных запросов.
|
|
6777
|
+
*/
|
|
6778
|
+
getReference(r, e = !1) {
|
|
6779
|
+
return this.getTypedDataArrayRequester(Lt, `/internal/references/${r}`, e);
|
|
6780
|
+
}
|
|
6781
|
+
/**
|
|
6782
|
+
* Возвращает {@link Promise} для получения справочника данных о канале
|
|
6783
|
+
* первичного интереса.
|
|
6784
|
+
*/
|
|
6785
|
+
getChannelPrimaryInterest() {
|
|
6786
|
+
return this.getTypedDataArrayRequester(Sr, "/internal/references/channel-primary-interest", !0);
|
|
6787
|
+
}
|
|
6788
|
+
/**
|
|
6789
|
+
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
6790
|
+
*/
|
|
6791
|
+
getContactPositions() {
|
|
6792
|
+
return this.getTypedDataArrayRequester(_t, "/internal/references/contact-position", !0);
|
|
6793
|
+
}
|
|
6794
|
+
/**
|
|
6795
|
+
* Возвращает {@link Promise} для получения справочника списка направлений кураторства.
|
|
6796
|
+
*/
|
|
6797
|
+
getCuratedDirection() {
|
|
6798
|
+
return this.getTypedDataArrayRequester(Ve, "/internal/references/curated-direction", !0);
|
|
6799
|
+
}
|
|
6800
|
+
/**
|
|
6801
|
+
* Возвращает {@link Promise} для получения справочника списка валют.
|
|
6802
|
+
*/
|
|
6803
|
+
getCurrency() {
|
|
6804
|
+
return this.getTypedDataArrayRequester(x, "/public/references/currency", !0);
|
|
6805
|
+
}
|
|
6806
|
+
/**
|
|
6807
|
+
* Возвращает {@link Promise} для получения справочника данных
|
|
6808
|
+
* групп партнеров (направлений деятельности).
|
|
6809
|
+
*/
|
|
6810
|
+
getPartnerGroup() {
|
|
6811
|
+
return this.getTypedDataArrayRequester(se, "/internal/references/partner-group", !0);
|
|
6812
|
+
}
|
|
6813
|
+
/**
|
|
6814
|
+
* Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
|
|
6815
|
+
*/
|
|
6816
|
+
getOpf() {
|
|
6817
|
+
return this.getTypedDataArrayRequester(z, "/public/references/opf", !0);
|
|
6818
|
+
}
|
|
6819
|
+
/**
|
|
6820
|
+
* Возвращает {@link Promise} для получения справочника операторов.
|
|
6821
|
+
*/
|
|
6822
|
+
getOperators() {
|
|
6823
|
+
return this.getTypedDataArrayRequester(Or, "/internal/references/operator", !0);
|
|
6824
|
+
}
|
|
6825
|
+
/**
|
|
6826
|
+
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
6827
|
+
*/
|
|
6828
|
+
getOrderPaymentStatuses() {
|
|
6829
|
+
return this.getTypedDataArrayRequester(It, "/public/references/order-payment-status", !0);
|
|
6830
|
+
}
|
|
6831
|
+
/**
|
|
6832
|
+
* Возвращает {@link Promise} для получения справочника данных статусов заказов.
|
|
6833
|
+
*/
|
|
6834
|
+
getOrderStatuses() {
|
|
6835
|
+
return this.getTypedDataArrayRequester($e, "/internal/references/order-status", !0);
|
|
6836
|
+
}
|
|
6837
|
+
/**
|
|
6838
|
+
* Возвращает {@link Promise} для получения справочника детализирующих статусов (подстатусов) заказов.
|
|
6839
|
+
*/
|
|
6840
|
+
getOrderStatusDetails() {
|
|
6841
|
+
return this.getTypedDataArrayRequester(Ot, "/internal/references/order-status-detail", !0);
|
|
6842
|
+
}
|
|
6843
|
+
/**
|
|
6844
|
+
* Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
|
|
6845
|
+
*/
|
|
6846
|
+
getPaymentTypes() {
|
|
6847
|
+
return this.getTypedDataArrayRequester(xr, "/public/references/payment-type", !0);
|
|
6848
|
+
}
|
|
6849
|
+
/**
|
|
6850
|
+
* Возвращает {@link Promise} для получения справочника типов ресурсов.
|
|
6851
|
+
*/
|
|
6852
|
+
getResourceTypes() {
|
|
6853
|
+
return this.getTypedDataArrayRequester(qr, "/internal/references/resource-type", !0);
|
|
6854
|
+
}
|
|
6855
|
+
/**
|
|
6856
|
+
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
6857
|
+
*/
|
|
6858
|
+
getSalesDirections() {
|
|
6859
|
+
return this.getTypedDataArrayRequester(q, "/public/references/sales-direction", !0);
|
|
6860
|
+
}
|
|
6861
|
+
/**
|
|
6862
|
+
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
6863
|
+
*/
|
|
6864
|
+
getSourcePrimaryInterest() {
|
|
6865
|
+
return this.getTypedDataArrayRequester(br, "/internal/references/source-primary-interest", !0);
|
|
6866
|
+
}
|
|
6867
|
+
/**
|
|
6868
|
+
* Выполняет поиск данных о городах по терму в названии.
|
|
6869
|
+
*
|
|
6870
|
+
* @param term Терм поиска.
|
|
6871
|
+
*/
|
|
6872
|
+
searchCity(r) {
|
|
6873
|
+
return this.getTypedDataArrayRequester(Ae, `/internal/references/city-with-region-and-country/search?term=${r}`);
|
|
6874
|
+
}
|
|
6875
|
+
/**
|
|
6876
|
+
* Выполняет поиск данных о регионах по терму в названии.
|
|
6877
|
+
*
|
|
6878
|
+
* @param term Терм поиска.
|
|
6879
|
+
*/
|
|
6880
|
+
searchRegion(r) {
|
|
6881
|
+
return this.getTypedDataArrayRequester(me, `/internal/references/region-with-country/search?term=${r}`);
|
|
6882
|
+
}
|
|
6883
|
+
/**
|
|
6884
|
+
* Выполняет поиск данных о странах по терму в названии.
|
|
6885
|
+
*
|
|
6886
|
+
* @param term Терм поиска.
|
|
6887
|
+
*/
|
|
6888
|
+
searchCountry(r) {
|
|
6889
|
+
return this.getTypedDataArrayRequester(te, `/internal/references/country/search?term=${r}`);
|
|
6890
|
+
}
|
|
6891
|
+
/**
|
|
6892
|
+
* Возвращает {@link Promise} для получения справочника типов доставки.
|
|
6893
|
+
*/
|
|
6894
|
+
getDeliveryTypes() {
|
|
6895
|
+
return this.getTypedDataArrayRequester(F, "/internal/references/delivery-type", !0);
|
|
6896
|
+
}
|
|
6897
|
+
/**
|
|
6898
|
+
* Возвращает {@link Promise} для получения справочника складов.
|
|
6899
|
+
*/
|
|
6900
|
+
getWarehouses() {
|
|
6901
|
+
return this.getTypedDataArrayRequester(we, "/public/references/warehouse", !0);
|
|
6902
|
+
}
|
|
6903
|
+
/**
|
|
6904
|
+
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
6905
|
+
*/
|
|
6906
|
+
getPropertyTypes() {
|
|
6907
|
+
return this.getTypedDataArrayRequester(Dr, "/internal/references/property-type", !0);
|
|
6908
|
+
}
|
|
6909
|
+
/**
|
|
6910
|
+
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
6911
|
+
*/
|
|
6912
|
+
getPriceCoefficients() {
|
|
6913
|
+
return this.getTypedDataArrayRequester(de, "/internal/references/price-coefficient", !0);
|
|
6914
|
+
}
|
|
6915
|
+
/**
|
|
6916
|
+
* Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
|
|
6917
|
+
*/
|
|
6918
|
+
getProductFileType() {
|
|
6919
|
+
return this.getTypedDataArrayRequester(xt, "/public/references/product-file-type", !0);
|
|
6920
|
+
}
|
|
6921
|
+
}
|
|
6922
|
+
const d = W("common.references_private", () => {
|
|
6923
|
+
const n = y({}), r = y(void 0), e = y(void 0), t = 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), ie = y(void 0), ne = y(void 0), E = y(void 0), K = y(void 0), Te = y(void 0), Se = y(void 0), be = y(void 0), l = y(void 0);
|
|
6924
|
+
return {
|
|
6925
|
+
/**
|
|
6926
|
+
* Список загружаемых/загруженных на данный момент значений.
|
|
6927
|
+
*/
|
|
6928
|
+
dataLoaderList: n,
|
|
6929
|
+
/**
|
|
6930
|
+
* Справочник каналов первичного интереса.
|
|
6931
|
+
*/
|
|
6932
|
+
channelPrimaryInterestReference: r,
|
|
6933
|
+
/**
|
|
6934
|
+
* Справочник должностей контактных лиц.
|
|
6935
|
+
*/
|
|
6936
|
+
contactPositionsReference: e,
|
|
6937
|
+
/**
|
|
6938
|
+
* Справочник валют.
|
|
6939
|
+
*/
|
|
6940
|
+
currencyReference: t,
|
|
6941
|
+
/**
|
|
6942
|
+
* Справочник типов доставки.
|
|
6943
|
+
*/
|
|
6944
|
+
deliveryTypeReference: i,
|
|
6945
|
+
/**
|
|
6946
|
+
* Список менеджеров.
|
|
6947
|
+
*/
|
|
6948
|
+
managersList: o,
|
|
6949
|
+
/**
|
|
6950
|
+
* Справочник организационно-правовых форм.
|
|
6951
|
+
*/
|
|
6952
|
+
opfReference: c,
|
|
6953
|
+
/**
|
|
6954
|
+
* Справочник операторов.
|
|
6955
|
+
*/
|
|
6956
|
+
operatorReference: u,
|
|
6957
|
+
/**
|
|
6958
|
+
* Справочник статусов оплаты заказа.
|
|
6959
|
+
*/
|
|
6960
|
+
orderPaymentStatusReference: p,
|
|
6961
|
+
/**
|
|
6962
|
+
* Справочник статусов заказов.
|
|
6963
|
+
*/
|
|
6964
|
+
orderStatusReference: m,
|
|
6965
|
+
/**
|
|
6966
|
+
* Справочник детализирующих статусов (подстатусов) заказов.
|
|
6967
|
+
*/
|
|
6968
|
+
orderStatusDetailReference: f,
|
|
6969
|
+
/**
|
|
6970
|
+
* Справочник типов оплаты заказов.
|
|
6971
|
+
*/
|
|
6972
|
+
paymentTypeReference: D,
|
|
6973
|
+
/**
|
|
6974
|
+
* Справочник групп партнеров.
|
|
6975
|
+
*/
|
|
6976
|
+
partnerGroupReference: ie,
|
|
6977
|
+
/**
|
|
6978
|
+
* Справочник типов файлов продукктов/категорий.
|
|
6979
|
+
*/
|
|
6980
|
+
productFileTypeReference: ne,
|
|
6981
|
+
/**
|
|
6982
|
+
* Справочник типов ресурсов.
|
|
6983
|
+
*/
|
|
6984
|
+
resourceTypesReference: E,
|
|
6985
|
+
/**
|
|
6986
|
+
* Справочник направлений продаж.
|
|
6987
|
+
*/
|
|
6988
|
+
salesDirectionsReference: K,
|
|
6989
|
+
/**
|
|
6990
|
+
* Справочник источников первичного интереса.
|
|
6991
|
+
*/
|
|
6992
|
+
sourcePrimaryInterestReference: Te,
|
|
6993
|
+
/**
|
|
6994
|
+
* Справочник складов.
|
|
6995
|
+
*/
|
|
6996
|
+
warehousesReference: Se,
|
|
6997
|
+
/**
|
|
6998
|
+
* Справочник типов свойств.
|
|
6999
|
+
*/
|
|
7000
|
+
propertyTypesReference: be,
|
|
7001
|
+
/**
|
|
7002
|
+
* Справочник коэффициентов цен.
|
|
7003
|
+
*/
|
|
7004
|
+
priceCoefficientsReference: l
|
|
7005
|
+
};
|
|
7006
|
+
}), bs = W("common.references", () => {
|
|
7007
|
+
const n = P(() => {
|
|
7008
|
+
const l = d();
|
|
7009
|
+
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(T).getChannelPrimaryInterest().then((g) => {
|
|
7010
|
+
l.channelPrimaryInterestReference = g;
|
|
7011
|
+
}).catch(v)), l.channelPrimaryInterestReference;
|
|
7012
|
+
}), r = P(() => {
|
|
7013
|
+
const l = d();
|
|
7014
|
+
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(T).getContactPositions().then((g) => {
|
|
7015
|
+
l.contactPositionsReference = g;
|
|
7016
|
+
}).catch(v)), l.contactPositionsReference;
|
|
7017
|
+
}), e = P(() => {
|
|
7018
|
+
const l = d();
|
|
7019
|
+
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(T).getCurrency().then((g) => {
|
|
7020
|
+
l.currencyReference = g;
|
|
7021
|
+
}).catch(v)), l.currencyReference;
|
|
7022
|
+
}), t = P(() => {
|
|
7023
|
+
const l = d();
|
|
7024
|
+
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(T).getOpf().then((g) => {
|
|
7025
|
+
l.opfReference = g;
|
|
7026
|
+
}).catch(v)), l.opfReference;
|
|
7027
|
+
}), i = P(() => {
|
|
7028
|
+
const l = d();
|
|
7029
|
+
return !l.operatorReference && !l.dataLoaderList.operatorReference && (l.dataLoaderList.operatorReference = !0, h.getInstance(T).getOperators().then((g) => {
|
|
7030
|
+
l.operatorReference = g;
|
|
7031
|
+
}).catch(v)), l.operatorReference;
|
|
7032
|
+
}), o = P(() => {
|
|
7033
|
+
const l = d();
|
|
7034
|
+
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(T).getOrderPaymentStatuses().then((g) => {
|
|
7035
|
+
l.orderPaymentStatusReference = g;
|
|
7036
|
+
}).catch(v)), l.orderPaymentStatusReference;
|
|
7037
|
+
}), c = P(() => {
|
|
7038
|
+
const l = d();
|
|
7039
|
+
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(T).getOrderStatuses().then((g) => {
|
|
7040
|
+
l.orderStatusReference = g;
|
|
7041
|
+
}).catch(v)), l.orderStatusReference;
|
|
7042
|
+
}), u = P(() => {
|
|
7043
|
+
const l = d();
|
|
7044
|
+
return !l.orderStatusDetailReference && !l.dataLoaderList.orderStatusDetailReference && (l.dataLoaderList.orderStatusDetailReference = !0, h.getInstance(T).getOrderStatusDetails().then((g) => {
|
|
7045
|
+
l.orderStatusDetailReference = g;
|
|
7046
|
+
}).catch(v)), l.orderStatusDetailReference;
|
|
7047
|
+
}), p = P(() => {
|
|
7048
|
+
const l = d();
|
|
7049
|
+
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(T).getPaymentTypes().then((g) => {
|
|
7050
|
+
l.paymentTypeReference = g;
|
|
7051
|
+
}).catch(v)), l.paymentTypeReference;
|
|
7052
|
+
}), m = P(() => {
|
|
7053
|
+
const l = d();
|
|
7054
|
+
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(T).getPartnerGroup().then((g) => {
|
|
7055
|
+
l.partnerGroupReference = g;
|
|
7056
|
+
}).catch(v)), l.partnerGroupReference;
|
|
7057
|
+
}), f = P(() => {
|
|
7058
|
+
const l = d();
|
|
7059
|
+
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(T).getProductFileType().then((g) => {
|
|
7060
|
+
l.productFileTypeReference = g;
|
|
7061
|
+
}).catch(v)), l.productFileTypeReference;
|
|
7062
|
+
}), D = P(() => {
|
|
7063
|
+
const l = d();
|
|
7064
|
+
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(T).getResourceTypes().then((g) => {
|
|
7065
|
+
l.resourceTypesReference = g;
|
|
7066
|
+
}).catch(v)), l.resourceTypesReference;
|
|
7067
|
+
}), ie = P(() => {
|
|
7068
|
+
const l = d();
|
|
7069
|
+
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(T).getSalesDirections().then((g) => {
|
|
7070
|
+
l.salesDirectionsReference = g;
|
|
7071
|
+
}).catch(v)), l.salesDirectionsReference;
|
|
7072
|
+
}), ne = P(() => {
|
|
7073
|
+
const l = d();
|
|
7074
|
+
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(T).getSourcePrimaryInterest().then((g) => {
|
|
7075
|
+
l.sourcePrimaryInterestReference = g;
|
|
7076
|
+
}).catch(v)), l.sourcePrimaryInterestReference;
|
|
7077
|
+
}), E = P(() => {
|
|
7078
|
+
const l = d();
|
|
7079
|
+
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(T).getDeliveryTypes().then((g) => {
|
|
7080
|
+
l.deliveryTypeReference = g;
|
|
7081
|
+
}).catch(v)), l.deliveryTypeReference;
|
|
7082
|
+
}), K = P(() => {
|
|
7083
|
+
const l = d();
|
|
7084
|
+
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(Dt).getManagers().then((g) => {
|
|
7085
|
+
l.managersList = g;
|
|
7086
|
+
}).catch(v)), l.managersList;
|
|
7087
|
+
}), Te = P(() => {
|
|
7088
|
+
const l = d();
|
|
7089
|
+
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(T).getWarehouses().then((g) => {
|
|
7090
|
+
l.warehousesReference = g;
|
|
7091
|
+
}).catch(v)), l.warehousesReference;
|
|
7092
|
+
}), Se = P(() => {
|
|
7093
|
+
const l = d();
|
|
7094
|
+
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(T).getPropertyTypes().then((g) => {
|
|
7095
|
+
l.propertyTypesReference = g;
|
|
7096
|
+
}).catch(v)), l.propertyTypesReference;
|
|
7097
|
+
}), be = P(() => {
|
|
7098
|
+
const l = d();
|
|
7099
|
+
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(T).getPriceCoefficients().then((g) => {
|
|
7100
|
+
l.priceCoefficientsReference = g;
|
|
7101
|
+
}).catch(v)), l.priceCoefficientsReference;
|
|
7102
|
+
});
|
|
7103
|
+
return {
|
|
7104
|
+
/**
|
|
7105
|
+
* Справочник каналов первичного интереса.
|
|
6909
7106
|
*/
|
|
6910
|
-
|
|
7107
|
+
channelPrimaryInterestsReference: n,
|
|
6911
7108
|
/**
|
|
6912
|
-
*
|
|
7109
|
+
* Справочник должностей контактных лиц.
|
|
6913
7110
|
*/
|
|
6914
|
-
|
|
7111
|
+
contactPositionsReference: r,
|
|
6915
7112
|
/**
|
|
6916
|
-
*
|
|
7113
|
+
* Справочник валют.
|
|
6917
7114
|
*/
|
|
6918
|
-
|
|
7115
|
+
currencyReference: e,
|
|
6919
7116
|
/**
|
|
6920
|
-
*
|
|
7117
|
+
* Справочник организационно-правовых форм.
|
|
6921
7118
|
*/
|
|
6922
|
-
|
|
7119
|
+
opfReference: t,
|
|
6923
7120
|
/**
|
|
6924
|
-
*
|
|
7121
|
+
* Справочник операторов.
|
|
6925
7122
|
*/
|
|
6926
|
-
|
|
6927
|
-
this.client = new E(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) ?? ze.Product;
|
|
6928
|
-
}
|
|
6929
|
-
}
|
|
6930
|
-
const Oe = (n) => {
|
|
6931
|
-
var r, e, t, i, o;
|
|
6932
|
-
return n ? pr(
|
|
6933
|
-
{
|
|
6934
|
-
cities: (r = n.cities) == null ? void 0 : r.map((c) => c.id),
|
|
6935
|
-
clients: (e = n.clients) == null ? void 0 : e.map((c) => c.id),
|
|
6936
|
-
managers: (t = n.managers) == null ? void 0 : t.map((c) => c.id),
|
|
6937
|
-
partnerGroups: (i = n.partnerGroups) == null ? void 0 : i.map((c) => c.id),
|
|
6938
|
-
salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
|
|
6939
|
-
hideNotActive: n.hideNotActive
|
|
6940
|
-
},
|
|
6941
|
-
(c) => $(c) || (H(c) || Me(c)) && re(c)
|
|
6942
|
-
) : {};
|
|
6943
|
-
}, nr = (n) => {
|
|
6944
|
-
const r = {};
|
|
6945
|
-
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;
|
|
6946
|
-
};
|
|
6947
|
-
class $s extends h {
|
|
6948
|
-
/**
|
|
6949
|
-
* Возвращает список клиентских цен на продукты в указанном диапазоне цены.
|
|
6950
|
-
*
|
|
6951
|
-
* @param productId Идентификатор продукта.
|
|
6952
|
-
* @param params Параметры анализа цен.
|
|
6953
|
-
* @param filters Параметры фильтрации данных.
|
|
6954
|
-
*
|
|
6955
|
-
* @see /doc/api/internal#/operations/api_internal_catalog_price_products_analyze
|
|
6956
|
-
*/
|
|
6957
|
-
analyzeProductPrices(r, e, t) {
|
|
6958
|
-
return this.get(
|
|
6959
|
-
`/internal/price/products/${r}/analyze`,
|
|
6960
|
-
{
|
|
6961
|
-
...nr(e),
|
|
6962
|
-
filters: Oe(t)
|
|
6963
|
-
},
|
|
6964
|
-
(i) => i.data.map((o) => new _e(o))
|
|
6965
|
-
);
|
|
6966
|
-
}
|
|
6967
|
-
/**
|
|
6968
|
-
* Возвращает список клиентских цен на продукты категории в указанном диапазоне цены.
|
|
6969
|
-
*
|
|
6970
|
-
* @param productCategoryId Идентификатор категории продукта.
|
|
6971
|
-
* @param params Параметры анализа цен.
|
|
6972
|
-
* @param filters Параметры фильтрации данных.
|
|
6973
|
-
*
|
|
6974
|
-
* @see /doc/api/internal#/operations/api_internal_catalog_price_categories_analyze
|
|
6975
|
-
*/
|
|
6976
|
-
analyzeCategoryPrices(r, e, t) {
|
|
6977
|
-
return this.get(
|
|
6978
|
-
`/internal/price/categories/${r}/analyze`,
|
|
6979
|
-
{
|
|
6980
|
-
...nr(e),
|
|
6981
|
-
filters: Oe(t)
|
|
6982
|
-
},
|
|
6983
|
-
(i) => i.data.map((o) => new _e(o))
|
|
6984
|
-
);
|
|
6985
|
-
}
|
|
6986
|
-
/**
|
|
6987
|
-
* Возвращает список клиентских цен на продукты категории в указанном диапазоне цены за квадратный метр.
|
|
6988
|
-
*
|
|
6989
|
-
* @param productCategoryId Идентификатор категории продукта.
|
|
6990
|
-
* @param params Параметры анализа цен.
|
|
6991
|
-
* @param params.from Цена больше или равна значению.
|
|
6992
|
-
* @param params.to Цена меньше или равна значению.
|
|
6993
|
-
* @param filters Параметры фильтрации данных.
|
|
6994
|
-
*
|
|
6995
|
-
* @see /doc/api/internal#/operations/api_internal_catalog_price_categories_analyze_by_square
|
|
6996
|
-
*/
|
|
6997
|
-
analyzeCategoryPricesBySquare(r, e, t) {
|
|
6998
|
-
return this.get(
|
|
6999
|
-
`/internal/price/categories/${r}/analyze/square`,
|
|
7000
|
-
{
|
|
7001
|
-
...e,
|
|
7002
|
-
filters: Oe(t)
|
|
7003
|
-
},
|
|
7004
|
-
(i) => i.data.map((o) => new _e(o))
|
|
7005
|
-
);
|
|
7006
|
-
}
|
|
7007
|
-
}
|
|
7008
|
-
class It {
|
|
7009
|
-
/**
|
|
7010
|
-
* Инициализирует экземпляр класса {@link PriceHistoryItem}.
|
|
7011
|
-
*
|
|
7012
|
-
* @param data Данные для первоначальной инициализации.
|
|
7013
|
-
*/
|
|
7014
|
-
constructor(r) {
|
|
7123
|
+
operatorReference: i,
|
|
7015
7124
|
/**
|
|
7016
|
-
*
|
|
7125
|
+
* Справочник статусов оплаты заказа.
|
|
7017
7126
|
*/
|
|
7018
|
-
|
|
7127
|
+
orderPaymentStatusReference: o,
|
|
7019
7128
|
/**
|
|
7020
|
-
*
|
|
7129
|
+
* Справочник статусов заказов.
|
|
7021
7130
|
*/
|
|
7022
|
-
|
|
7131
|
+
orderStatusReference: c,
|
|
7023
7132
|
/**
|
|
7024
|
-
*
|
|
7133
|
+
* Справочник детализирующих статусов (подстатусов) заказов.
|
|
7025
7134
|
*/
|
|
7026
|
-
|
|
7135
|
+
orderStatusDetailReference: u,
|
|
7027
7136
|
/**
|
|
7028
|
-
*
|
|
7137
|
+
* Справочник типов оплаты заказов.
|
|
7029
7138
|
*/
|
|
7030
|
-
|
|
7139
|
+
paymentTypeReference: p,
|
|
7031
7140
|
/**
|
|
7032
|
-
*
|
|
7141
|
+
* Справочник групп партнеров.
|
|
7033
7142
|
*/
|
|
7034
|
-
|
|
7143
|
+
partnerGroupsReference: m,
|
|
7035
7144
|
/**
|
|
7036
|
-
*
|
|
7145
|
+
* Справочник типов файлов продуктов/категорий.
|
|
7037
7146
|
*/
|
|
7038
|
-
|
|
7147
|
+
productFilesTypesReference: f,
|
|
7039
7148
|
/**
|
|
7040
|
-
*
|
|
7149
|
+
* Справочник типов ресурсов.
|
|
7041
7150
|
*/
|
|
7042
|
-
|
|
7151
|
+
resourceTypesReference: D,
|
|
7043
7152
|
/**
|
|
7044
|
-
*
|
|
7153
|
+
* Справочник направлений продаж.
|
|
7045
7154
|
*/
|
|
7046
|
-
|
|
7155
|
+
salesDirectionsReference: ie,
|
|
7047
7156
|
/**
|
|
7048
|
-
*
|
|
7157
|
+
* Справочник каналов первичного интереса.
|
|
7049
7158
|
*/
|
|
7050
|
-
|
|
7159
|
+
sourcePrimaryInterestsReference: ne,
|
|
7051
7160
|
/**
|
|
7052
|
-
*
|
|
7161
|
+
* Справочник типов доставки.
|
|
7053
7162
|
*/
|
|
7054
|
-
|
|
7055
|
-
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = a(r.costDate) ? C(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new ge(r.product) : void 0, this.client = r.client ? new _(r.client) : void 0, this.executor = r.executor ? new _(r.executor) : void 0, this.currency = r.currency ? new x(r.currency) : void 0;
|
|
7056
|
-
}
|
|
7057
|
-
}
|
|
7058
|
-
class _t extends ge {
|
|
7059
|
-
/**
|
|
7060
|
-
* Инициализирует экземпляр класса {@link ProductPriceHistory}.
|
|
7061
|
-
*
|
|
7062
|
-
* @param data Данные для первоначальной инициализации.
|
|
7063
|
-
*/
|
|
7064
|
-
constructor(e) {
|
|
7065
|
-
super(e);
|
|
7163
|
+
deliveryTypeReference: E,
|
|
7066
7164
|
/**
|
|
7067
|
-
*
|
|
7165
|
+
* Список менеджеров.
|
|
7068
7166
|
*/
|
|
7069
|
-
|
|
7070
|
-
this.history = ye(e.history, (t) => new It(t));
|
|
7071
|
-
}
|
|
7072
|
-
}
|
|
7073
|
-
class ds extends h {
|
|
7074
|
-
/**
|
|
7075
|
-
* Возвращает данные об истории изменения цен.
|
|
7076
|
-
*
|
|
7077
|
-
* @param filters Фильтры для поиска истории изменения цен.
|
|
7078
|
-
*
|
|
7079
|
-
* @see /docs/api#/operations/api_internal_price_history_get
|
|
7080
|
-
*/
|
|
7081
|
-
getProductPriceHistory(r) {
|
|
7082
|
-
var o, c, u, p, m;
|
|
7083
|
-
const e = k().config.dateFormats.api, t = pr(
|
|
7084
|
-
he(r, {
|
|
7085
|
-
costDate: {
|
|
7086
|
-
from: xe((o = r.costDate) == null ? void 0 : o.from) ? L(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
|
|
7087
|
-
to: xe((u = r.costDate) == null ? void 0 : u.to) ? L(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
|
|
7088
|
-
}
|
|
7089
|
-
}),
|
|
7090
|
-
(f) => $(f) || (H(f) || Me(f)) && re(f)
|
|
7091
|
-
), i = ((m = r.product) == null ? void 0 : m[0]) ?? 0;
|
|
7092
|
-
return delete t.product, this.get(`/internal/price/products/${i}/history`, t).then((f) => [
|
|
7093
|
-
new _t(he(f[0], { history: f }))
|
|
7094
|
-
]);
|
|
7095
|
-
}
|
|
7096
|
-
}
|
|
7097
|
-
class or {
|
|
7098
|
-
/**
|
|
7099
|
-
* Инициализирует экземпляр класса {@link RecommendationsList}.
|
|
7100
|
-
*
|
|
7101
|
-
* @param data Данные для первоначальной инициализации.
|
|
7102
|
-
*/
|
|
7103
|
-
constructor(r) {
|
|
7167
|
+
managersList: K,
|
|
7104
7168
|
/**
|
|
7105
|
-
*
|
|
7169
|
+
* Справочник складов.
|
|
7106
7170
|
*/
|
|
7107
|
-
|
|
7171
|
+
warehousesReference: Te,
|
|
7108
7172
|
/**
|
|
7109
|
-
*
|
|
7173
|
+
* Справочник типов свойств.
|
|
7110
7174
|
*/
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
|
|
7116
|
-
|
|
7117
|
-
|
|
7118
|
-
|
|
7119
|
-
* @param productCategory Данные о категории продуктов, для которой необходимо получить рекомендации.
|
|
7120
|
-
* @see /docs/api#/operations/api_internal_recommendations_product_category_get
|
|
7121
|
-
*/
|
|
7122
|
-
getProductCategoryRecommendations(r) {
|
|
7123
|
-
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new or(e.data));
|
|
7124
|
-
}
|
|
7125
|
-
/**
|
|
7126
|
-
* Возвращает данные о рекомендациях указанного продукта.
|
|
7127
|
-
*
|
|
7128
|
-
* @param product Данные о продукте, для которого необходимо получить рекомендации.
|
|
7129
|
-
* @see /docs/api#/operations/api_internal_recommendations_product_get
|
|
7130
|
-
*/
|
|
7131
|
-
getProductRecommendations(r) {
|
|
7132
|
-
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new or(e.data));
|
|
7133
|
-
}
|
|
7134
|
-
/**
|
|
7135
|
-
* Выполняет сохранение данных о рекомендуемых категориях продуктов.
|
|
7136
|
-
*
|
|
7137
|
-
* @param productCategory Данные о категории для которой необходимо сохранить список рекомендуемых товаров.
|
|
7138
|
-
* @param recommendations Список рекомендованных продуктов и категорий.
|
|
7139
|
-
* @see /docs/api#/operations/api_internal_recommendations_product_category_save
|
|
7140
|
-
*/
|
|
7141
|
-
saveProductCategoryRecommendations(r, e) {
|
|
7142
|
-
return this.post(`/internal/catalog/recommendations/categories/${r.id}`, {
|
|
7143
|
-
product_categories: e.productCategories.map((t) => t.id),
|
|
7144
|
-
products: e.products.map((t) => t.id)
|
|
7145
|
-
});
|
|
7146
|
-
}
|
|
7147
|
-
/**
|
|
7148
|
-
* Выполняет сохранение данных о рекомендуемых продуктах.
|
|
7149
|
-
*
|
|
7150
|
-
* @param product Данные о продукте для которого необходимо сохранить список рекомендуемых товаров.
|
|
7151
|
-
* @param recommendations Список рекомендованных продуктов и категорий.
|
|
7152
|
-
* @see /docs/api#/operations/api_internal_recommendations_product_save
|
|
7153
|
-
*/
|
|
7154
|
-
saveProductRecommendations(r, e) {
|
|
7155
|
-
return this.post(`/internal/catalog/recommendations/products/${r.id}`, {
|
|
7156
|
-
product_categories: e.productCategories.map((t) => t.id),
|
|
7157
|
-
products: e.products.map((t) => t.id)
|
|
7158
|
-
});
|
|
7159
|
-
}
|
|
7160
|
-
}
|
|
7161
|
-
class Ot {
|
|
7175
|
+
propertyTypesReference: Se,
|
|
7176
|
+
/**
|
|
7177
|
+
* Справочник коэффициентов цен.
|
|
7178
|
+
*/
|
|
7179
|
+
priceCoefficientsReference: be
|
|
7180
|
+
};
|
|
7181
|
+
});
|
|
7182
|
+
class qt {
|
|
7162
7183
|
/**
|
|
7163
7184
|
* Инициализирует экземпляр класса {@link MetaTagItem}.
|
|
7164
7185
|
*
|
|
@@ -7176,7 +7197,7 @@ class Ot {
|
|
|
7176
7197
|
this.name = r.name, this.content = r.content;
|
|
7177
7198
|
}
|
|
7178
7199
|
}
|
|
7179
|
-
class
|
|
7200
|
+
class lr {
|
|
7180
7201
|
/**
|
|
7181
7202
|
* Инициализирует экземпляр класса {@link Seo}.
|
|
7182
7203
|
*
|
|
@@ -7216,10 +7237,10 @@ class cr {
|
|
|
7216
7237
|
*/
|
|
7217
7238
|
s(this, "tags");
|
|
7218
7239
|
var e;
|
|
7219
|
-
this.resourceType = new
|
|
7240
|
+
this.resourceType = new qr(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((t) => new qt(t))) ?? [], this.tags = r == null ? void 0 : r.tags;
|
|
7220
7241
|
}
|
|
7221
7242
|
}
|
|
7222
|
-
class
|
|
7243
|
+
class ks extends h {
|
|
7223
7244
|
/**
|
|
7224
7245
|
* Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
|
|
7225
7246
|
*
|
|
@@ -7227,7 +7248,7 @@ class bs extends h {
|
|
|
7227
7248
|
* @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
|
|
7228
7249
|
*/
|
|
7229
7250
|
getResourceSeoData(r, e) {
|
|
7230
|
-
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (t) => new
|
|
7251
|
+
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (t) => new lr(t.data));
|
|
7231
7252
|
}
|
|
7232
7253
|
/**
|
|
7233
7254
|
* Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
|
|
@@ -7238,7 +7259,7 @@ class bs extends h {
|
|
|
7238
7259
|
* в случае ошибок в запросах.
|
|
7239
7260
|
*/
|
|
7240
7261
|
saveResourceSeoData(r, e = {}) {
|
|
7241
|
-
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (t) => new
|
|
7262
|
+
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (t) => new lr(t.data), e);
|
|
7242
7263
|
}
|
|
7243
7264
|
/**
|
|
7244
7265
|
* Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
|
|
@@ -7250,7 +7271,7 @@ class bs extends h {
|
|
|
7250
7271
|
return this.delete(`/internal/seo/${r.slug}/${e}`);
|
|
7251
7272
|
}
|
|
7252
7273
|
}
|
|
7253
|
-
class
|
|
7274
|
+
class Ls extends h {
|
|
7254
7275
|
/**
|
|
7255
7276
|
* Возвращает подсказки по адресам.
|
|
7256
7277
|
*
|
|
@@ -7297,8 +7318,8 @@ class Ss extends h {
|
|
|
7297
7318
|
});
|
|
7298
7319
|
}
|
|
7299
7320
|
}
|
|
7300
|
-
var
|
|
7301
|
-
class
|
|
7321
|
+
var Nt = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(Nt || {});
|
|
7322
|
+
class Ut extends Pr {
|
|
7302
7323
|
/**
|
|
7303
7324
|
* Инициализирует экземпляр класса {@link User}.
|
|
7304
7325
|
*
|
|
@@ -7325,7 +7346,7 @@ class qt extends Rr {
|
|
|
7325
7346
|
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 Cr(e.pricingRole) : void 0;
|
|
7326
7347
|
}
|
|
7327
7348
|
}
|
|
7328
|
-
class
|
|
7349
|
+
class _s extends h {
|
|
7329
7350
|
/**
|
|
7330
7351
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
7331
7352
|
*/
|
|
@@ -7341,16 +7362,16 @@ class ks extends h {
|
|
|
7341
7362
|
return this.get("internal/users/current-tokens").then((r) => r.accessToken);
|
|
7342
7363
|
}
|
|
7343
7364
|
}
|
|
7344
|
-
class
|
|
7365
|
+
class Ft extends h {
|
|
7345
7366
|
/**
|
|
7346
7367
|
* Возвращает данные о текущем пользователе.
|
|
7347
7368
|
*/
|
|
7348
7369
|
// eslint-disable-next-line class-methods-use-this
|
|
7349
7370
|
getCurrentUser() {
|
|
7350
|
-
return this.get("/internal/users/info", {}, (r) => new
|
|
7371
|
+
return this.get("/internal/users/info", {}, (r) => new Ut(r.data), !0);
|
|
7351
7372
|
}
|
|
7352
7373
|
}
|
|
7353
|
-
const
|
|
7374
|
+
const Ht = W("common.user_state_private", () => {
|
|
7354
7375
|
const n = y({}), r = y(void 0);
|
|
7355
7376
|
return {
|
|
7356
7377
|
/**
|
|
@@ -7362,20 +7383,20 @@ const Ut = W("common.user_state_private", () => {
|
|
|
7362
7383
|
*/
|
|
7363
7384
|
currentUser: r
|
|
7364
7385
|
};
|
|
7365
|
-
}),
|
|
7386
|
+
}), Is = W("common.user_state", () => ({
|
|
7366
7387
|
/**
|
|
7367
7388
|
* Данные о текущем пользователе.
|
|
7368
7389
|
*/
|
|
7369
|
-
currentUser:
|
|
7370
|
-
const r =
|
|
7371
|
-
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(
|
|
7390
|
+
currentUser: P(() => {
|
|
7391
|
+
const r = Ht();
|
|
7392
|
+
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(Ft).getCurrentUser().then((e) => {
|
|
7372
7393
|
r.currentUser = e;
|
|
7373
7394
|
}).catch(v).finally(() => {
|
|
7374
7395
|
r.dataLoaderList.currentUser = !1;
|
|
7375
7396
|
})), r.currentUser;
|
|
7376
7397
|
})
|
|
7377
7398
|
}));
|
|
7378
|
-
class
|
|
7399
|
+
class Os {
|
|
7379
7400
|
/**
|
|
7380
7401
|
* Инициализирует экземпляр класса {@link FieldValidationResultData}.
|
|
7381
7402
|
*
|
|
@@ -7399,167 +7420,168 @@ class Is {
|
|
|
7399
7420
|
}
|
|
7400
7421
|
}
|
|
7401
7422
|
export {
|
|
7402
|
-
|
|
7403
|
-
|
|
7404
|
-
|
|
7423
|
+
Lt as AnyReference,
|
|
7424
|
+
ct as AppBaseConfig,
|
|
7425
|
+
Fe as BankAccount,
|
|
7405
7426
|
Ce as BasePaginationProvider,
|
|
7406
|
-
|
|
7427
|
+
gt as CalculationTypeEnum,
|
|
7407
7428
|
oe as Cart,
|
|
7408
|
-
|
|
7409
|
-
|
|
7410
|
-
|
|
7429
|
+
Qt as CartProvider,
|
|
7430
|
+
Xt as CatalogProvider,
|
|
7431
|
+
yr as CatalogableItem,
|
|
7411
7432
|
N as Category,
|
|
7412
|
-
|
|
7413
|
-
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
|
|
7433
|
+
rr as CategoryPricingRule,
|
|
7434
|
+
Sr as ChannelPrimaryInterest,
|
|
7435
|
+
Ts as City,
|
|
7436
|
+
Ae as CityWithRegionAndCountry,
|
|
7437
|
+
nr as Client,
|
|
7438
|
+
at as ClientAdditionalData,
|
|
7439
|
+
Pe as ClientCategory,
|
|
7419
7440
|
O as ClientDataProvider,
|
|
7420
|
-
|
|
7421
|
-
|
|
7441
|
+
Zt as ClientPriceProvider,
|
|
7442
|
+
es as ClientPriceTemplateProvider,
|
|
7422
7443
|
j as ClientProduct,
|
|
7423
|
-
|
|
7424
|
-
|
|
7425
|
-
|
|
7426
|
-
|
|
7444
|
+
ss as ClientProductCategoryDataProvider,
|
|
7445
|
+
is as ClientProductDataProvider,
|
|
7446
|
+
V as ClientShortInfo,
|
|
7447
|
+
yt as ClientsAdditionalDataRequestTypeEnum,
|
|
7427
7448
|
us as ClientsListFilters,
|
|
7428
7449
|
ge as CodedIdentity,
|
|
7429
|
-
|
|
7430
|
-
|
|
7431
|
-
|
|
7450
|
+
gs as ConfiguratorProvider,
|
|
7451
|
+
Rt as ConfiguratorsEnum,
|
|
7452
|
+
He as Contact,
|
|
7432
7453
|
ar as ContactLinks,
|
|
7433
|
-
|
|
7434
|
-
|
|
7435
|
-
|
|
7454
|
+
B as ContactPerson,
|
|
7455
|
+
Ct as ContactPersonRelated,
|
|
7456
|
+
_t as ContactPosition,
|
|
7436
7457
|
Ie as ContactRelation,
|
|
7437
|
-
|
|
7458
|
+
Ar as ContragentBase,
|
|
7438
7459
|
De as ContragentFactory,
|
|
7439
|
-
|
|
7440
|
-
|
|
7441
|
-
|
|
7442
|
-
|
|
7460
|
+
$r as ContragentIc,
|
|
7461
|
+
wt as ContragentPerson,
|
|
7462
|
+
vt as ContragentUlNr,
|
|
7463
|
+
Tr as ContragentUlR,
|
|
7443
7464
|
ze as CostSourceEnum,
|
|
7444
7465
|
te as Country,
|
|
7445
|
-
|
|
7466
|
+
Ve as CuratedDirection,
|
|
7446
7467
|
Ee as Curator,
|
|
7447
7468
|
x as Currency,
|
|
7448
|
-
|
|
7449
|
-
ps as DataTablePagination,
|
|
7450
|
-
At as DataTablePaginationRequestParams,
|
|
7451
|
-
hs as DataTableSortRequestParams,
|
|
7469
|
+
Ls as DataSuggestionProvider,
|
|
7452
7470
|
ys as DateTimeProvider,
|
|
7453
|
-
|
|
7471
|
+
dr as DeletableNamedIdentity,
|
|
7454
7472
|
pe as DeliveryAddress,
|
|
7455
7473
|
F as DeliveryType,
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7459
|
-
|
|
7474
|
+
Et as DetailedJwtPayload,
|
|
7475
|
+
st as DeviceTypeResolutionConfig,
|
|
7476
|
+
lt as DiscountShortInfo,
|
|
7477
|
+
Os as FieldValidationResultData,
|
|
7460
7478
|
G as FilterGroup,
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
7479
|
+
tr as FilterItem,
|
|
7480
|
+
Ke as FilterOpEnum,
|
|
7481
|
+
fr as GeoCoordinates,
|
|
7482
|
+
pt as HiddenCatalogableItem,
|
|
7465
7483
|
fe as HttpCachedRequester,
|
|
7466
|
-
|
|
7484
|
+
it as HttpParamsConfig,
|
|
7467
7485
|
h as HttpRequester,
|
|
7468
7486
|
J as Identity,
|
|
7469
|
-
|
|
7487
|
+
ht as Image,
|
|
7470
7488
|
M as JwtPayload,
|
|
7471
7489
|
ae as Manager,
|
|
7472
|
-
|
|
7490
|
+
Je as ManagerCommon,
|
|
7473
7491
|
vs as ManagerDataFactory,
|
|
7474
|
-
|
|
7475
|
-
|
|
7476
|
-
|
|
7492
|
+
Dt as ManagerDataProvider,
|
|
7493
|
+
qt as MetaTagItem,
|
|
7494
|
+
b as NamedIdentity,
|
|
7477
7495
|
X as Offer,
|
|
7478
|
-
|
|
7496
|
+
_r as OfferShortInfo,
|
|
7479
7497
|
Cs as OffersDataProvider,
|
|
7480
7498
|
as as OffersListFilters,
|
|
7481
|
-
|
|
7482
|
-
|
|
7499
|
+
Or as Operator,
|
|
7500
|
+
z as Opf,
|
|
7483
7501
|
U as OpfEnum,
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7502
|
+
S as Order,
|
|
7503
|
+
At as OrderAction,
|
|
7504
|
+
Rs as OrderEditorData,
|
|
7505
|
+
Ir as OrderInfo,
|
|
7506
|
+
dt as OrderItem,
|
|
7489
7507
|
wr as OrderItemBase,
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7508
|
+
It as OrderPaymentStatus,
|
|
7509
|
+
kr as OrderShortInfo,
|
|
7510
|
+
$e as OrderStatus,
|
|
7511
|
+
Ot as OrderStatusDetail,
|
|
7493
7512
|
kt as OrderStatusDetailEnum,
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7513
|
+
bt as OrderStatusEnum,
|
|
7514
|
+
$t as OrderStatusHistoryInfo,
|
|
7515
|
+
Ds as OrdersDataProvider,
|
|
7516
|
+
Ps as OrdersListFilters,
|
|
7517
|
+
Qe as PaginationFiltersBase,
|
|
7499
7518
|
se as PartnerGroup,
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
|
|
7507
|
-
|
|
7519
|
+
xr as PaymentType,
|
|
7520
|
+
Re as PreferencesStorageProvider,
|
|
7521
|
+
Oe as PriceAnalyze,
|
|
7522
|
+
ds as PriceAnalyzeProvider,
|
|
7523
|
+
de as PriceCoefficient,
|
|
7524
|
+
mr as PriceCoefficientEnum,
|
|
7525
|
+
As as PriceHistoryDataProvider,
|
|
7526
|
+
Tt as PriceHistoryItem,
|
|
7508
7527
|
Z as PriceTemplate,
|
|
7509
|
-
|
|
7528
|
+
Le as PriceTemplateCategory,
|
|
7510
7529
|
ce as PriceTemplateClient,
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7530
|
+
Rr as PriceTemplateICatalogableItem,
|
|
7531
|
+
_e as PriceTemplateProduct,
|
|
7532
|
+
ns as PriceTemplateProvider,
|
|
7514
7533
|
ue as PricingRole,
|
|
7515
|
-
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7519
|
-
|
|
7520
|
-
|
|
7534
|
+
os as PricingRoleProvider,
|
|
7535
|
+
Ue as PrimaryCatalogableItem,
|
|
7536
|
+
_ as Product,
|
|
7537
|
+
rs as ProductCategoryDataProvider,
|
|
7538
|
+
ts as ProductDataProvider,
|
|
7539
|
+
xt as ProductFileType,
|
|
7521
7540
|
Be as ProductPriceCoefficient,
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
|
|
7541
|
+
St as ProductPriceHistory,
|
|
7542
|
+
er as ProductUnit,
|
|
7543
|
+
cs as PropertiesProvider,
|
|
7525
7544
|
le as Property,
|
|
7526
7545
|
Dr as PropertyType,
|
|
7527
|
-
|
|
7546
|
+
mt as PropertyTypeEnum,
|
|
7528
7547
|
Y as PropertyValue,
|
|
7529
|
-
|
|
7530
|
-
|
|
7548
|
+
$s as RecommendationsDataProvider,
|
|
7549
|
+
cr as RecommendationsList,
|
|
7531
7550
|
w as Reference,
|
|
7532
|
-
|
|
7551
|
+
Ss as ReferenceDataFactory,
|
|
7533
7552
|
T as ReferenceDataProvider,
|
|
7534
7553
|
me as Region,
|
|
7535
|
-
|
|
7554
|
+
qr as ResourceType,
|
|
7536
7555
|
q as SalesDirection,
|
|
7537
|
-
|
|
7538
|
-
|
|
7539
|
-
|
|
7556
|
+
nt as SentryConfig,
|
|
7557
|
+
lr as Seo,
|
|
7558
|
+
ks as SeoDataProvider,
|
|
7540
7559
|
br as SourcePrimaryInterest,
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
|
|
7560
|
+
ut as StockCount,
|
|
7561
|
+
ms as TableDataPagination,
|
|
7562
|
+
Pt as TableDataPaginationRequestParams,
|
|
7563
|
+
fs as TableDataSortRequestParams,
|
|
7564
|
+
ls as TemplateProductCategoryDataProvider,
|
|
7565
|
+
Yt as TemplatesListFilters,
|
|
7566
|
+
We as TypedInstanceFactory,
|
|
7567
|
+
Lr as UnitsHelper,
|
|
7568
|
+
ps as UnknownClientDataProvider,
|
|
7569
|
+
gr as UpdatableNamedIdentity,
|
|
7570
|
+
Ut as User,
|
|
7571
|
+
_s as UserAuthDataProvider,
|
|
7572
|
+
Pr as UserCommonInfo,
|
|
7573
|
+
Ft as UserDataProvider,
|
|
7552
7574
|
Cr as UserPricingRole,
|
|
7553
|
-
|
|
7554
|
-
|
|
7555
|
-
|
|
7575
|
+
I as UserShortInfo,
|
|
7576
|
+
Nt as UserTypeEnum,
|
|
7577
|
+
hs as VersionConfig,
|
|
7556
7578
|
we as Warehouse,
|
|
7557
|
-
|
|
7558
|
-
|
|
7559
|
-
|
|
7579
|
+
ot as WebSocketConfig,
|
|
7580
|
+
sr as findCatalogItemByIdRecursive,
|
|
7581
|
+
ir as flattenCatalogItems,
|
|
7560
7582
|
ws as pluralize,
|
|
7561
|
-
|
|
7583
|
+
ke as useAuthStateStore,
|
|
7562
7584
|
k as useBaseConfigStateStore,
|
|
7563
|
-
|
|
7564
|
-
|
|
7585
|
+
bs as useReferencesStore,
|
|
7586
|
+
Is as useUserStateStore
|
|
7565
7587
|
};
|