@snabcentr/common-lib 1.66.0 → 1.67.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 +3 -3
- package/dist/sc-common-lib.js +891 -858
- 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/auth/index.d.ts +1 -0
- package/dist/src/auth/index.d.ts.map +1 -1
- package/dist/src/auth/states/auth-state-store.d.ts +50 -0
- package/dist/src/auth/states/auth-state-store.d.ts.map +1 -0
- package/dist/src/auth/states/index.d.ts +2 -0
- package/dist/src/auth/states/index.d.ts.map +1 -0
- package/dist/src/http/classes/http-requester.d.ts +4 -0
- package/dist/src/http/classes/http-requester.d.ts.map +1 -1
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/references/index.d.ts +1 -0
- package/dist/src/references/index.d.ts.map +1 -1
- package/dist/src/references/states/index.d.ts +2 -0
- package/dist/src/references/states/index.d.ts.map +1 -0
- package/dist/src/{states/references-store.d.ts → references/states/references-state-store.d.ts} +18 -18
- package/dist/src/references/states/references-state-store.d.ts.map +1 -0
- package/dist/src/user/index.d.ts +1 -0
- package/dist/src/user/index.d.ts.map +1 -1
- package/dist/src/user/providers/user-auth-data-provider.d.ts +17 -0
- package/dist/src/user/providers/user-auth-data-provider.d.ts.map +1 -0
- package/dist/src/user/providers/user-data-provider.d.ts.map +1 -1
- package/dist/src/user/states/index.d.ts +2 -0
- package/dist/src/user/states/index.d.ts.map +1 -0
- package/dist/src/user/states/user-state-store.d.ts +21 -0
- package/dist/src/user/states/user-state-store.d.ts.map +1 -0
- package/package.json +2 -1
- package/dist/src/states/index.d.ts +0 -3
- package/dist/src/states/index.d.ts.map +0 -1
- package/dist/src/states/references-store.d.ts.map +0 -1
- package/dist/src/states/user-state-store.d.ts +0 -45
- package/dist/src/states/user-state-store.d.ts.map +0 -1
package/dist/sc-common-lib.js
CHANGED
|
@@ -2,13 +2,13 @@ var hr = Object.defineProperty;
|
|
|
2
2
|
var gr = (n, r, e) => r in n ? hr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
3
|
var t = (n, r, e) => gr(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import { jwtDecode as Ve } from "jwt-decode";
|
|
5
|
-
import { merge as Ee, isNil as
|
|
6
|
-
import { objectToCamel as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
class
|
|
5
|
+
import { merge as Ee, isUndefined as mr, isNil as T, noop as C, toUpper as fr, constant as yr, isString as m, cloneDeep as wr, toLower as Cr, isFunction as Ie, isEmpty as Le, map as pe, forEach as vr, isDate as Pr, isArray as Je, omitBy as Rr, isObject as Ar } from "lodash-es";
|
|
6
|
+
import { objectToCamel as ke, objectToSnake as Ue } from "ts-case-convert";
|
|
7
|
+
import { defineStore as X } from "pinia";
|
|
8
|
+
import { ref as f, computed as v } from "vue";
|
|
9
|
+
import { parseISO as y, format as z, isAfter as ar, startOfToday as Ke, addSeconds as Dr, addBusinessDays as $r, endOfTomorrow as Tr, startOfTomorrow as br, endOfYesterday as _r, startOfYesterday as Sr, endOfToday as Ir, endOfDay as Lr, startOfDay as kr } from "date-fns";
|
|
10
|
+
import dr from "axios";
|
|
11
|
+
class ue {
|
|
12
12
|
/**
|
|
13
13
|
* Инициализирует экземпляр класса {@link JwtPayload}.
|
|
14
14
|
*
|
|
@@ -107,10 +107,10 @@ class pe {
|
|
|
107
107
|
* @param jwtToken JWT-ключ доступа.
|
|
108
108
|
*/
|
|
109
109
|
static getJwtPayload(r) {
|
|
110
|
-
return new
|
|
110
|
+
return new ue(ke(Ve(r)));
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
class Dt extends
|
|
113
|
+
class Dt extends ue {
|
|
114
114
|
/**
|
|
115
115
|
* Инициализирует экземпляр класса {@link DetailedJwtPayload}.
|
|
116
116
|
*
|
|
@@ -150,9 +150,93 @@ class Dt extends pe {
|
|
|
150
150
|
* @param jwtToken JWT-ключ доступа.
|
|
151
151
|
*/
|
|
152
152
|
static getJwtPayload(e) {
|
|
153
|
-
return new
|
|
153
|
+
return new ue(ke(Ve(e)));
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
+
const W = class W {
|
|
157
|
+
/**
|
|
158
|
+
* Инициализирует и возвращает конфигурацию приложения.
|
|
159
|
+
*
|
|
160
|
+
* @param config Данные для первоначальной инициализации.
|
|
161
|
+
*/
|
|
162
|
+
static init(r) {
|
|
163
|
+
W.config = r;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Возвращает текущую конфигурацию приложения.
|
|
167
|
+
*/
|
|
168
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
169
|
+
static getConfig() {
|
|
170
|
+
if (mr(W.config))
|
|
171
|
+
throw new Error("Config is undefined. Please set config by AppConfigProvider.init().");
|
|
172
|
+
return W.config;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Выполняет загрузку конфигурации по указанному пути.
|
|
176
|
+
*
|
|
177
|
+
* @param path Путь к конфигурации.
|
|
178
|
+
*/
|
|
179
|
+
static loadRemoteConfig(r = "/config.json") {
|
|
180
|
+
const e = fetch(r).then((s) => s.ok ? s.json() : (console.error(new Error(`Ошибка загрузки ${r}: ${s.statusText}`)), new Promise((i) => {
|
|
181
|
+
i({});
|
|
182
|
+
})));
|
|
183
|
+
return e.catch((s) => {
|
|
184
|
+
console.error(s);
|
|
185
|
+
}), e;
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* Конфигурация приложения.
|
|
190
|
+
*/
|
|
191
|
+
t(W, "config");
|
|
192
|
+
let D = W;
|
|
193
|
+
const Pe = X("__auth_state_private", () => {
|
|
194
|
+
var e;
|
|
195
|
+
const n = f(Promise.resolve((e = D.getConfig().devMode) == null ? void 0 : e.initAuthBearerToken)), r = f(void 0);
|
|
196
|
+
return {
|
|
197
|
+
/**
|
|
198
|
+
* {@link Promise<string>} для получения ключа доступа к системам.
|
|
199
|
+
*/
|
|
200
|
+
accessToken: n,
|
|
201
|
+
/**
|
|
202
|
+
* Функция для обновления ключа доступа к системам.
|
|
203
|
+
*/
|
|
204
|
+
accessTokenUpdater: r
|
|
205
|
+
};
|
|
206
|
+
}), Re = X("__auth_state", () => {
|
|
207
|
+
const n = v(() => {
|
|
208
|
+
const s = Pe();
|
|
209
|
+
if (T(s.accessToken) && !T(s.accessTokenUpdater)) {
|
|
210
|
+
const i = s.accessTokenUpdater();
|
|
211
|
+
s.accessToken = i, i.then((o) => {
|
|
212
|
+
s.accessToken = Promise.resolve(o);
|
|
213
|
+
}).catch(C);
|
|
214
|
+
}
|
|
215
|
+
return s.accessToken;
|
|
216
|
+
});
|
|
217
|
+
function r(s) {
|
|
218
|
+
Pe().accessTokenUpdater = s;
|
|
219
|
+
}
|
|
220
|
+
function e() {
|
|
221
|
+
Pe().accessToken = void 0;
|
|
222
|
+
}
|
|
223
|
+
return {
|
|
224
|
+
/**
|
|
225
|
+
* {@link Promise<string>} для получения ключа доступа к системам.
|
|
226
|
+
*/
|
|
227
|
+
accessToken: n,
|
|
228
|
+
/**
|
|
229
|
+
* Устанавливает механизм для обновления ключа доступа к системам.
|
|
230
|
+
*
|
|
231
|
+
* @param updater Механизм для обновления ключа доступа к системам.
|
|
232
|
+
*/
|
|
233
|
+
setAccessTokenUpdater: r,
|
|
234
|
+
/**
|
|
235
|
+
* Выполняет очистку ключа доступа к системам.
|
|
236
|
+
*/
|
|
237
|
+
invalidateAccessToken: e
|
|
238
|
+
};
|
|
239
|
+
});
|
|
156
240
|
class B {
|
|
157
241
|
/**
|
|
158
242
|
* Инициализирует экземпляр класса {@link Identity}.
|
|
@@ -169,16 +253,16 @@ class B {
|
|
|
169
253
|
* @inheritDoc
|
|
170
254
|
*/
|
|
171
255
|
t(this, "guid");
|
|
172
|
-
this.id = r == null ? void 0 : r.id,
|
|
256
|
+
this.id = r == null ? void 0 : r.id, T(this.id) && (T(e) ? typeof (r == null ? void 0 : r.id) == "number" ? this.id = -1 : typeof (r == null ? void 0 : r.id) == "string" && (this.id = "") : this.id = e), this.guid = (r == null ? void 0 : r.guid) ?? "";
|
|
173
257
|
}
|
|
174
258
|
/**
|
|
175
259
|
* Возвращает признак, что это новая запись.
|
|
176
260
|
*/
|
|
177
261
|
isNewRec() {
|
|
178
|
-
return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" :
|
|
262
|
+
return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : T(this.id);
|
|
179
263
|
}
|
|
180
264
|
}
|
|
181
|
-
class
|
|
265
|
+
class $ extends B {
|
|
182
266
|
/**
|
|
183
267
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
184
268
|
*
|
|
@@ -193,7 +277,7 @@ class a extends B {
|
|
|
193
277
|
this.name = (e == null ? void 0 : e.name) ?? "";
|
|
194
278
|
}
|
|
195
279
|
}
|
|
196
|
-
class Qe extends
|
|
280
|
+
class Qe extends $ {
|
|
197
281
|
/**
|
|
198
282
|
* Инициализирует экземпляр класса {@link CatalogableItem}.
|
|
199
283
|
*
|
|
@@ -216,7 +300,7 @@ class Qe extends a {
|
|
|
216
300
|
this.slug = (e == null ? void 0 : e.slug) ?? "", this.code = (e == null ? void 0 : e.code) ?? "";
|
|
217
301
|
}
|
|
218
302
|
}
|
|
219
|
-
class
|
|
303
|
+
class be extends Qe {
|
|
220
304
|
/**
|
|
221
305
|
* Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
|
|
222
306
|
*
|
|
@@ -231,7 +315,7 @@ class Te extends Qe {
|
|
|
231
315
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
232
316
|
}
|
|
233
317
|
}
|
|
234
|
-
class
|
|
318
|
+
class oe extends be {
|
|
235
319
|
/**
|
|
236
320
|
* Инициализирует экземпляр класса {@link BaseCategory}.
|
|
237
321
|
*
|
|
@@ -255,11 +339,11 @@ class ne extends Te {
|
|
|
255
339
|
* Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
|
|
256
340
|
*/
|
|
257
341
|
t(this, "currencyRates");
|
|
258
|
-
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category", this.currencyRates = e != null && e.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([s, i]) => [
|
|
342
|
+
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category", this.currencyRates = e != null && e.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([s, i]) => [fr(s), i])) : void 0;
|
|
259
343
|
}
|
|
260
344
|
}
|
|
261
345
|
var Ye = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(Ye || {});
|
|
262
|
-
class
|
|
346
|
+
class w extends $ {
|
|
263
347
|
/**
|
|
264
348
|
* Инициализирует экземпляр класса {@link Reference}.
|
|
265
349
|
*
|
|
@@ -278,15 +362,15 @@ class C extends a {
|
|
|
278
362
|
this.description = e == null ? void 0 : e.description, this.slug = e == null ? void 0 : e.slug;
|
|
279
363
|
}
|
|
280
364
|
}
|
|
281
|
-
class
|
|
365
|
+
class ye extends w {
|
|
282
366
|
/**
|
|
283
367
|
* Возвращает значение справочника коэффициента розничной цены.
|
|
284
368
|
*/
|
|
285
369
|
static getRetailPriceCoefficient() {
|
|
286
|
-
return { id: -2, slug: Ye.Retail, name: "Розн. цена", guid: "", isNewRec:
|
|
370
|
+
return { id: -2, slug: Ye.Retail, name: "Розн. цена", guid: "", isNewRec: yr(!0) };
|
|
287
371
|
}
|
|
288
372
|
}
|
|
289
|
-
class
|
|
373
|
+
class de {
|
|
290
374
|
/**
|
|
291
375
|
* Инициализирует экземпляр класса {@link ProductPriceCoefficient}.
|
|
292
376
|
*
|
|
@@ -313,7 +397,7 @@ class xe {
|
|
|
313
397
|
* Признак того, что указанный коэффициент доступен текущему пользователю только для просмотра.
|
|
314
398
|
*/
|
|
315
399
|
t(this, "readOnly");
|
|
316
|
-
this.coefficient = new
|
|
400
|
+
this.coefficient = new ye(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;
|
|
317
401
|
}
|
|
318
402
|
}
|
|
319
403
|
class Xe {
|
|
@@ -334,9 +418,9 @@ class Xe {
|
|
|
334
418
|
this.lat = (r == null ? void 0 : r.lat) ?? 0, this.long = (r == null ? void 0 : r.long) ?? 0;
|
|
335
419
|
}
|
|
336
420
|
}
|
|
337
|
-
class J extends
|
|
421
|
+
class J extends w {
|
|
338
422
|
}
|
|
339
|
-
class
|
|
423
|
+
class we extends w {
|
|
340
424
|
/**
|
|
341
425
|
* Инициализирует экземпляр класса {@link Warehouse}.
|
|
342
426
|
*
|
|
@@ -368,7 +452,7 @@ class Ce extends C {
|
|
|
368
452
|
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((i) => new J(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new Xe(e == null ? void 0 : e.coordinates);
|
|
369
453
|
}
|
|
370
454
|
}
|
|
371
|
-
class
|
|
455
|
+
class xr {
|
|
372
456
|
/**
|
|
373
457
|
* Инициализирует экземпляр класса {@link StockCount}.
|
|
374
458
|
*
|
|
@@ -383,46 +467,9 @@ class dr {
|
|
|
383
467
|
* Количество остатков товара на складе.
|
|
384
468
|
*/
|
|
385
469
|
t(this, "count");
|
|
386
|
-
this.warehouse = new
|
|
470
|
+
this.warehouse = new we(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
387
471
|
}
|
|
388
472
|
}
|
|
389
|
-
const W = class W {
|
|
390
|
-
/**
|
|
391
|
-
* Инициализирует и возвращает конфигурацию приложения.
|
|
392
|
-
*
|
|
393
|
-
* @param config Данные для первоначальной инициализации.
|
|
394
|
-
*/
|
|
395
|
-
static init(r) {
|
|
396
|
-
W.config = r;
|
|
397
|
-
}
|
|
398
|
-
/**
|
|
399
|
-
* Возвращает текущую конфигурацию приложения.
|
|
400
|
-
*/
|
|
401
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
402
|
-
static getConfig() {
|
|
403
|
-
if (yr(W.config))
|
|
404
|
-
throw new Error("Config is undefined. Please set config by AppConfigProvider.init().");
|
|
405
|
-
return W.config;
|
|
406
|
-
}
|
|
407
|
-
/**
|
|
408
|
-
* Выполняет загрузку конфигурации по указанному пути.
|
|
409
|
-
*
|
|
410
|
-
* @param path Путь к конфигурации.
|
|
411
|
-
*/
|
|
412
|
-
static loadRemoteConfig(r = "/config.json") {
|
|
413
|
-
const e = fetch(r).then((s) => s.ok ? s.json() : (console.error(new Error(`Ошибка загрузки ${r}: ${s.statusText}`)), new Promise((i) => {
|
|
414
|
-
i({});
|
|
415
|
-
})));
|
|
416
|
-
return e.catch((s) => {
|
|
417
|
-
console.error(s);
|
|
418
|
-
}), e;
|
|
419
|
-
}
|
|
420
|
-
};
|
|
421
|
-
/**
|
|
422
|
-
* Конфигурация приложения.
|
|
423
|
-
*/
|
|
424
|
-
t(W, "config");
|
|
425
|
-
let $ = W;
|
|
426
473
|
class Nr extends Qe {
|
|
427
474
|
/**
|
|
428
475
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
@@ -461,14 +508,14 @@ class Or {
|
|
|
461
508
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
462
509
|
}
|
|
463
510
|
}
|
|
464
|
-
class
|
|
511
|
+
class _ extends Nr {
|
|
465
512
|
/**
|
|
466
513
|
* Инициализирует экземпляр класса {@link Product}.
|
|
467
514
|
*
|
|
468
515
|
* @param data Данные для первоначальной инициализации.
|
|
469
516
|
*/
|
|
470
517
|
constructor(e) {
|
|
471
|
-
var i, o, c,
|
|
518
|
+
var i, o, c, p;
|
|
472
519
|
super(e);
|
|
473
520
|
/**
|
|
474
521
|
* Артикул производителя/поставщика.
|
|
@@ -546,16 +593,16 @@ class b extends Nr {
|
|
|
546
593
|
* Список коэффициентов цен на продукт.
|
|
547
594
|
*/
|
|
548
595
|
t(this, "priceCoefficients");
|
|
549
|
-
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = (e == null ? void 0 : e.unit) ?? "", this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.quantityUnit = e == null ? void 0 : e.quantityUnit, this.currency = (e == null ? void 0 : e.currency) ?? "", this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = m(e == null ? void 0 : e.costDate) ?
|
|
550
|
-
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((
|
|
551
|
-
s && (this.category = new
|
|
596
|
+
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = (e == null ? void 0 : e.unit) ?? "", this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.quantityUnit = e == null ? void 0 : e.quantityUnit, this.currency = (e == null ? void 0 : e.currency) ?? "", this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = m(e == null ? void 0 : e.costDate) ? y(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((u) => new xr(u))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
|
|
597
|
+
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((u) => u.isPrimary));
|
|
598
|
+
s && (this.category = new be({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((u) => new be(u))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((u) => new Or(u, D.getConfig().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 = ((p = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : p.map((u) => new de(u))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
552
599
|
}
|
|
553
600
|
/**
|
|
554
601
|
* Возвращает признак, что это измеряемый товар.
|
|
555
602
|
*/
|
|
556
603
|
getIsMeasurable() {
|
|
557
604
|
var s;
|
|
558
|
-
const e = (s =
|
|
605
|
+
const e = (s = D.getConfig().catalog) == null ? void 0 : s.products.units;
|
|
559
606
|
return [...(e == null ? void 0 : e.linear) ?? ["пог.м.", "м."], ...(e == null ? void 0 : e.square) ?? ["м2"]].includes(this.unit);
|
|
560
607
|
}
|
|
561
608
|
/**
|
|
@@ -623,7 +670,7 @@ class qr extends B {
|
|
|
623
670
|
* Признак того, что позиция является дополнительной продажей.
|
|
624
671
|
*/
|
|
625
672
|
t(this, "isAdditionalSale");
|
|
626
|
-
this.product = new
|
|
673
|
+
this.product = new _(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new oe(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && wr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
|
|
627
674
|
}
|
|
628
675
|
}
|
|
629
676
|
class Ur extends qr {
|
|
@@ -676,7 +723,7 @@ class Ur extends qr {
|
|
|
676
723
|
this.currency = 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;
|
|
677
724
|
}
|
|
678
725
|
}
|
|
679
|
-
class
|
|
726
|
+
class le {
|
|
680
727
|
/**
|
|
681
728
|
* Инициализирует экземпляр класса {@link Cart}.
|
|
682
729
|
*
|
|
@@ -698,128 +745,7 @@ class ce {
|
|
|
698
745
|
this.items = r.items.map((e) => new Ur(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
|
|
699
746
|
}
|
|
700
747
|
}
|
|
701
|
-
class
|
|
702
|
-
}
|
|
703
|
-
class Ze extends a {
|
|
704
|
-
/**
|
|
705
|
-
* Инициализирует экземпляр класса {@link UserCommonInfo}.
|
|
706
|
-
*
|
|
707
|
-
* @param data Данные для первоначальной инициализации.
|
|
708
|
-
*/
|
|
709
|
-
constructor(e) {
|
|
710
|
-
super(e);
|
|
711
|
-
/**
|
|
712
|
-
* Номер телефона. В формате "79203436527" или "+79203436527".
|
|
713
|
-
*/
|
|
714
|
-
t(this, "phone");
|
|
715
|
-
/**
|
|
716
|
-
* Адрес электронной почты.
|
|
717
|
-
*/
|
|
718
|
-
t(this, "email");
|
|
719
|
-
/**
|
|
720
|
-
* Признак подписки на новости и информационные сообщения.
|
|
721
|
-
*/
|
|
722
|
-
t(this, "getNews");
|
|
723
|
-
/**
|
|
724
|
-
* Направление продаж.
|
|
725
|
-
*/
|
|
726
|
-
t(this, "salesDirection");
|
|
727
|
-
/**
|
|
728
|
-
* Дата и время регистрации пользователя.
|
|
729
|
-
*/
|
|
730
|
-
t(this, "createdAt");
|
|
731
|
-
/**
|
|
732
|
-
* Дата и время последней аутентификации пользователя.
|
|
733
|
-
*/
|
|
734
|
-
t(this, "lastLoginAt");
|
|
735
|
-
/**
|
|
736
|
-
* Признак активности учетной записи пользователя.
|
|
737
|
-
*/
|
|
738
|
-
t(this, "isActive");
|
|
739
|
-
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 S(e.salesDirection) : void 0, this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = m(e == null ? void 0 : e.lastLoginAt) ? f(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
class Gr extends Ze {
|
|
743
|
-
/**
|
|
744
|
-
* Инициализирует экземпляр класса {@link User}.
|
|
745
|
-
*
|
|
746
|
-
* @param data Данные для первоначальной инициализации.
|
|
747
|
-
*/
|
|
748
|
-
constructor(e) {
|
|
749
|
-
super(e);
|
|
750
|
-
/**
|
|
751
|
-
* Тип пользователя.
|
|
752
|
-
*/
|
|
753
|
-
t(this, "type");
|
|
754
|
-
/**
|
|
755
|
-
* Признак того, что менеджер может работать с рекламациями.
|
|
756
|
-
*/
|
|
757
|
-
t(this, "canDoReclamations");
|
|
758
|
-
/**
|
|
759
|
-
* URI путь к фотографии пользователя.
|
|
760
|
-
*/
|
|
761
|
-
t(this, "photo");
|
|
762
|
-
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;
|
|
763
|
-
}
|
|
764
|
-
}
|
|
765
|
-
class Mr extends h {
|
|
766
|
-
/**
|
|
767
|
-
* Возвращает данные о текущем пользователе.
|
|
768
|
-
*/
|
|
769
|
-
// eslint-disable-next-line class-methods-use-this
|
|
770
|
-
getCurrentUser() {
|
|
771
|
-
return this.get("/internal/users/info", {}, (r) => new Gr(r.data));
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
const le = ye("__user_state_private", () => {
|
|
775
|
-
var s;
|
|
776
|
-
const n = y({}), r = y(Promise.resolve((s = $.getConfig().devMode) == null ? void 0 : s.initAuthBearerToken)), e = y(void 0);
|
|
777
|
-
return {
|
|
778
|
-
/**
|
|
779
|
-
* Список загружаемых/загруженных на данный момент значений.
|
|
780
|
-
*/
|
|
781
|
-
dataLoaderList: n,
|
|
782
|
-
/**
|
|
783
|
-
* {@link Promise<string>} для получения ключа доступа к системам.
|
|
784
|
-
*/
|
|
785
|
-
accessTokenPromise: r,
|
|
786
|
-
/**
|
|
787
|
-
* Данные о текущем пользователе.
|
|
788
|
-
*/
|
|
789
|
-
currentUser: e
|
|
790
|
-
};
|
|
791
|
-
}), Ue = ye("user_state", () => {
|
|
792
|
-
const n = v({
|
|
793
|
-
get() {
|
|
794
|
-
return le().accessTokenPromise;
|
|
795
|
-
},
|
|
796
|
-
set(s) {
|
|
797
|
-
le().accessTokenPromise = s;
|
|
798
|
-
}
|
|
799
|
-
}), r = () => {
|
|
800
|
-
le().accessTokenPromise = void 0;
|
|
801
|
-
}, e = v(() => {
|
|
802
|
-
const s = le();
|
|
803
|
-
return !s.currentUser && !s.dataLoaderList.currentUser && (s.dataLoaderList.currentUser = !0, h.getInstance(Mr).getCurrentUser().then((i) => {
|
|
804
|
-
s.currentUser = i;
|
|
805
|
-
}).catch(w).finally(w)), s.currentUser;
|
|
806
|
-
});
|
|
807
|
-
return {
|
|
808
|
-
/**
|
|
809
|
-
* {@link Promise<string>} для получения ключа доступа к системам.
|
|
810
|
-
*/
|
|
811
|
-
accessTokenPromise: n,
|
|
812
|
-
/**
|
|
813
|
-
* Выполняет очистку ключа доступа к системам.
|
|
814
|
-
*/
|
|
815
|
-
invalidateJwtAccessToken: r,
|
|
816
|
-
/**
|
|
817
|
-
* Данные о текущем пользователе.
|
|
818
|
-
*/
|
|
819
|
-
currentUser: e
|
|
820
|
-
};
|
|
821
|
-
});
|
|
822
|
-
class ke {
|
|
748
|
+
class xe {
|
|
823
749
|
/**
|
|
824
750
|
* Инициализирует экземпляр указанного класса.
|
|
825
751
|
*
|
|
@@ -838,7 +764,7 @@ class ke {
|
|
|
838
764
|
return new r(e);
|
|
839
765
|
}
|
|
840
766
|
}
|
|
841
|
-
const
|
|
767
|
+
const S = class S {
|
|
842
768
|
/**
|
|
843
769
|
* Инициализирует экземпляр класса {@link HttpRequester}.
|
|
844
770
|
*/
|
|
@@ -850,7 +776,7 @@ const _ = class _ {
|
|
|
850
776
|
/**
|
|
851
777
|
* Базовый URL путь для выполнения запросов.
|
|
852
778
|
*/
|
|
853
|
-
t(this, "baseUrl", `${
|
|
779
|
+
t(this, "baseUrl", `${D.getConfig().http.portalApiUrl}/api`);
|
|
854
780
|
/**
|
|
855
781
|
* Обработчик ошибок выполнения запросов текущего экземпляра класса.
|
|
856
782
|
*
|
|
@@ -858,7 +784,11 @@ const _ = class _ {
|
|
|
858
784
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
859
785
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
860
786
|
*/
|
|
861
|
-
t(this, "errorResponseHandler",
|
|
787
|
+
t(this, "errorResponseHandler", C);
|
|
788
|
+
/**
|
|
789
|
+
* Список идентификаторов обработчиков запросов для возможности отключить те или иные обработчики.
|
|
790
|
+
*/
|
|
791
|
+
t(this, "interceptorIds", { request: {}, response: {} });
|
|
862
792
|
/**
|
|
863
793
|
* Перехватчик запроса для установки URL для выполнения запросов.
|
|
864
794
|
*
|
|
@@ -872,8 +802,8 @@ const _ = class _ {
|
|
|
872
802
|
*/
|
|
873
803
|
// eslint-disable-next-line class-methods-use-this
|
|
874
804
|
t(this, "authRequestInterceptor", async (r) => {
|
|
875
|
-
|
|
876
|
-
return e && r.headers.set("Authorization", `Bearer ${e}`), r;
|
|
805
|
+
let e;
|
|
806
|
+
return T(Re().accessToken) || (e = await Re().accessToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
|
|
877
807
|
});
|
|
878
808
|
/**
|
|
879
809
|
* Перехватчик запроса для преобразования данных запроса.
|
|
@@ -881,7 +811,7 @@ const _ = class _ {
|
|
|
881
811
|
* @param request Данные запроса.
|
|
882
812
|
*/
|
|
883
813
|
// eslint-disable-next-line class-methods-use-this
|
|
884
|
-
t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params =
|
|
814
|
+
t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = Ue(r.params)), ["put", "patch", "post"].includes(Cr(r.method)) && r.data && (r.data = Ue(r.data))), r));
|
|
885
815
|
/**
|
|
886
816
|
* Перехватчик ошибок ответов на запрос.
|
|
887
817
|
*
|
|
@@ -890,7 +820,7 @@ const _ = class _ {
|
|
|
890
820
|
t(this, "authErrorsResponseInterceptors", (r) => {
|
|
891
821
|
var s;
|
|
892
822
|
const e = r.rawError ? (s = r.rawError) == null ? void 0 : s.config : void 0;
|
|
893
|
-
return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (
|
|
823
|
+
return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (Re().invalidateAccessToken(), e.__isRetryRequest = !0, this.httpClient(e)) : Promise.reject(r);
|
|
894
824
|
});
|
|
895
825
|
/**
|
|
896
826
|
* Перехватчик ответа для преобразования данных ответа на запрос.
|
|
@@ -898,18 +828,23 @@ const _ = class _ {
|
|
|
898
828
|
* @param response Данные ответа на запрос.
|
|
899
829
|
*/
|
|
900
830
|
// eslint-disable-next-line class-methods-use-this
|
|
901
|
-
t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data =
|
|
902
|
-
const r =
|
|
903
|
-
this.errorResponseHandler =
|
|
831
|
+
t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = ke(r.data)), r));
|
|
832
|
+
const r = D.getConfig().version;
|
|
833
|
+
this.errorResponseHandler = S.defaultErrorsResponseHandler, this.httpClient = dr.create({
|
|
904
834
|
headers: {
|
|
905
|
-
"APP-VERSION": `${r.name} (${r.version}, ${z(r.date,
|
|
835
|
+
"APP-VERSION": `${r.name} (${r.version}, ${z(r.date, D.getConfig().dateFormats.uiDate)})`,
|
|
906
836
|
Accept: "application/json",
|
|
907
837
|
"Content-Type": "application/json"
|
|
908
838
|
}
|
|
909
|
-
}), this.httpClient.interceptors.request.use(this.setBaseUrlRequestInterceptor, (e) => Promise.reject(e)), this.
|
|
839
|
+
}), this.interceptorIds.request.setBaseUrlRequestInterceptor = this.httpClient.interceptors.request.use(this.setBaseUrlRequestInterceptor, (e) => Promise.reject(e)), this.interceptorIds.request.authRequestInterceptor = this.httpClient.interceptors.request.use(this.authRequestInterceptor, (e) => Promise.reject(e)), this.interceptorIds.request.dataConverterRequestInterceptor = this.httpClient.interceptors.request.use(
|
|
840
|
+
this.dataConverterRequestInterceptor,
|
|
841
|
+
(e) => Promise.reject(e)
|
|
842
|
+
), this.interceptorIds.response.convertHttpErrorResponseInterceptor = this.httpClient.interceptors.response.use(
|
|
843
|
+
(e) => e,
|
|
844
|
+
(e) => S.convertHttpErrorResponse(e)
|
|
845
|
+
), this.interceptorIds.response.authErrorsResponseInterceptor = this.httpClient.interceptors.response.use((e) => e, this.authErrorsResponseInterceptors), this.interceptorIds.response.dataConverterResponseInterceptor = this.httpClient.interceptors.response.use(
|
|
910
846
|
this.dataConverterResponseInterceptor,
|
|
911
|
-
|
|
912
|
-
(e) => _.convertHttpErrorResponse(e)
|
|
847
|
+
(e) => Promise.reject(e)
|
|
913
848
|
);
|
|
914
849
|
}
|
|
915
850
|
/**
|
|
@@ -918,7 +853,7 @@ const _ = class _ {
|
|
|
918
853
|
* @param handler Ссылка на функцию-обработчик ошибок.
|
|
919
854
|
*/
|
|
920
855
|
static setDefaultErrorsResponseHandler(r) {
|
|
921
|
-
|
|
856
|
+
S.defaultErrorsResponseHandler = r;
|
|
922
857
|
}
|
|
923
858
|
/**
|
|
924
859
|
* Возвращает экземпляр объекта текущего класса.
|
|
@@ -926,7 +861,7 @@ const _ = class _ {
|
|
|
926
861
|
* @param type Тип данных, которыми оперирует метод.
|
|
927
862
|
*/
|
|
928
863
|
static getInstance(r) {
|
|
929
|
-
return Object.prototype.hasOwnProperty.call(
|
|
864
|
+
return Object.prototype.hasOwnProperty.call(S.instances, r.name) || (S.instances[r.name] = xe.simpleInstanceInitializer(r)), S.instances[r.name];
|
|
930
865
|
}
|
|
931
866
|
/**
|
|
932
867
|
* Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
|
|
@@ -934,17 +869,20 @@ const _ = class _ {
|
|
|
934
869
|
* @param error Данные об ошибке.
|
|
935
870
|
*/
|
|
936
871
|
static convertHttpErrorResponse(r) {
|
|
937
|
-
var
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
872
|
+
var e, s;
|
|
873
|
+
if (!T(r.request) || !T(r.response)) {
|
|
874
|
+
const i = r == null ? void 0 : r.response;
|
|
875
|
+
return Promise.reject({
|
|
876
|
+
status: (i == null ? void 0 : i.status) ?? 0,
|
|
877
|
+
statusText: (i == null ? void 0 : i.statusText) ?? "Unknown",
|
|
878
|
+
message: ((e = i == null ? void 0 : i.data) == null ? void 0 : e.message) ?? "Unknown Error. Probably network error.",
|
|
879
|
+
errors: (s = i == null ? void 0 : i.data) == null ? void 0 : s.errors,
|
|
880
|
+
headers: (i == null ? void 0 : i.headers) ?? {},
|
|
881
|
+
data: i == null ? void 0 : i.data,
|
|
882
|
+
rawError: r
|
|
883
|
+
});
|
|
884
|
+
}
|
|
885
|
+
return Promise.reject(r);
|
|
948
886
|
}
|
|
949
887
|
/**
|
|
950
888
|
* Выполняет запрос с указанными параметрами.
|
|
@@ -1021,15 +959,15 @@ const _ = class _ {
|
|
|
1021
959
|
* Экземпляр объекта текущего класса.
|
|
1022
960
|
*/
|
|
1023
961
|
// eslint-disable-next-line no-use-before-define
|
|
1024
|
-
t(
|
|
962
|
+
t(S, "instances", {}), /**
|
|
1025
963
|
* Базовый обработчик ошибок выполнения запросов.
|
|
1026
964
|
*
|
|
1027
965
|
* @param error Данные об ошибке.
|
|
1028
966
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
1029
967
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1030
968
|
*/
|
|
1031
|
-
t(
|
|
1032
|
-
let h =
|
|
969
|
+
t(S, "defaultErrorsResponseHandler", C);
|
|
970
|
+
let h = S;
|
|
1033
971
|
class $t extends h {
|
|
1034
972
|
/**
|
|
1035
973
|
* Возвращает содержимое корзины указанного клиента.
|
|
@@ -1039,7 +977,7 @@ class $t extends h {
|
|
|
1039
977
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_get
|
|
1040
978
|
*/
|
|
1041
979
|
getCart(r) {
|
|
1042
|
-
return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new
|
|
980
|
+
return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new le(e.data));
|
|
1043
981
|
}
|
|
1044
982
|
/**
|
|
1045
983
|
* Удаляет всё содержимое корзины.
|
|
@@ -1077,7 +1015,7 @@ class $t extends h {
|
|
|
1077
1015
|
isAdditionalSale: e.isAdditionalSale,
|
|
1078
1016
|
...e.configuratorParams
|
|
1079
1017
|
},
|
|
1080
|
-
(i) => new
|
|
1018
|
+
(i) => new le(i.data),
|
|
1081
1019
|
s
|
|
1082
1020
|
);
|
|
1083
1021
|
}
|
|
@@ -1107,7 +1045,7 @@ class $t extends h {
|
|
|
1107
1045
|
isAdditionalSale: e.isAdditionalSale,
|
|
1108
1046
|
...e.configuratorParams
|
|
1109
1047
|
},
|
|
1110
|
-
(i) => new
|
|
1048
|
+
(i) => new le(i.data),
|
|
1111
1049
|
s
|
|
1112
1050
|
);
|
|
1113
1051
|
}
|
|
@@ -1130,11 +1068,11 @@ class $t extends h {
|
|
|
1130
1068
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_add_products_from_csv
|
|
1131
1069
|
*/
|
|
1132
1070
|
addCartItemFromCSV(r) {
|
|
1133
|
-
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, {}, (e) => new
|
|
1071
|
+
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, {}, (e) => new le(e.data));
|
|
1134
1072
|
}
|
|
1135
1073
|
}
|
|
1136
|
-
var
|
|
1137
|
-
class
|
|
1074
|
+
var Gr = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(Gr || {}), Ne = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(Ne || {}), Mr = /* @__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))(Mr || {});
|
|
1075
|
+
class U extends oe {
|
|
1138
1076
|
/**
|
|
1139
1077
|
* Инициализирует экземпляр класса {@link Category}.
|
|
1140
1078
|
*
|
|
@@ -1151,10 +1089,10 @@ class q extends ne {
|
|
|
1151
1089
|
* Список продуктов категории.
|
|
1152
1090
|
*/
|
|
1153
1091
|
t(this, "products");
|
|
1154
|
-
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new
|
|
1092
|
+
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new U(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new _(o));
|
|
1155
1093
|
}
|
|
1156
1094
|
}
|
|
1157
|
-
class
|
|
1095
|
+
class Ze extends $ {
|
|
1158
1096
|
/**
|
|
1159
1097
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1160
1098
|
*
|
|
@@ -1166,10 +1104,10 @@ class er extends a {
|
|
|
1166
1104
|
* Дата и время последнего изменения.
|
|
1167
1105
|
*/
|
|
1168
1106
|
t(this, "updatedAt");
|
|
1169
|
-
this.updatedAt = m(e == null ? void 0 : e.updatedAt) ?
|
|
1107
|
+
this.updatedAt = m(e == null ? void 0 : e.updatedAt) ? y(e.updatedAt) : e == null ? void 0 : e.updatedAt;
|
|
1170
1108
|
}
|
|
1171
1109
|
}
|
|
1172
|
-
class
|
|
1110
|
+
class Fr extends Ze {
|
|
1173
1111
|
/**
|
|
1174
1112
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1175
1113
|
*
|
|
@@ -1181,10 +1119,10 @@ class Hr extends er {
|
|
|
1181
1119
|
* Дата и время последнего удаления.
|
|
1182
1120
|
*/
|
|
1183
1121
|
t(this, "deletedAt");
|
|
1184
|
-
this.deletedAt = m(e == null ? void 0 : e.deletedAt) ?
|
|
1122
|
+
this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? y(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1185
1123
|
}
|
|
1186
1124
|
}
|
|
1187
|
-
class
|
|
1125
|
+
class Tt {
|
|
1188
1126
|
/**
|
|
1189
1127
|
* Возвращает актуальные и не просроченные данные из хранилища.
|
|
1190
1128
|
*
|
|
@@ -1195,7 +1133,7 @@ class at {
|
|
|
1195
1133
|
if (e)
|
|
1196
1134
|
try {
|
|
1197
1135
|
const s = JSON.parse(e);
|
|
1198
|
-
if (
|
|
1136
|
+
if (ar(y(s.availableFor) || Ke(), /* @__PURE__ */ new Date()))
|
|
1199
1137
|
return s.data ?? {};
|
|
1200
1138
|
} catch {
|
|
1201
1139
|
localStorage.removeItem(r);
|
|
@@ -1218,7 +1156,7 @@ class at {
|
|
|
1218
1156
|
);
|
|
1219
1157
|
}
|
|
1220
1158
|
}
|
|
1221
|
-
class G extends
|
|
1159
|
+
class G extends $ {
|
|
1222
1160
|
/**
|
|
1223
1161
|
* Инициализирует экземпляр класса {@link UserShortInfo}.
|
|
1224
1162
|
*
|
|
@@ -1233,7 +1171,7 @@ class G extends a {
|
|
|
1233
1171
|
this.type = e == null ? void 0 : e.type;
|
|
1234
1172
|
}
|
|
1235
1173
|
}
|
|
1236
|
-
class
|
|
1174
|
+
class Br extends $ {
|
|
1237
1175
|
/**
|
|
1238
1176
|
* Инициализирует экземпляр класса {@link DiscountShortInfo}.
|
|
1239
1177
|
*
|
|
@@ -1269,10 +1207,10 @@ class zr extends a {
|
|
|
1269
1207
|
* Дата и время удаления.
|
|
1270
1208
|
*/
|
|
1271
1209
|
t(this, "deletedAt");
|
|
1272
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = m(e == null ? void 0 : e.publishedAt) ?
|
|
1210
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = m(e == null ? void 0 : e.publishedAt) ? y(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 G(e == null ? void 0 : e.owner), this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? y(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1273
1211
|
}
|
|
1274
1212
|
}
|
|
1275
|
-
class j extends
|
|
1213
|
+
class j extends Ze {
|
|
1276
1214
|
/**
|
|
1277
1215
|
* Инициализирует экземпляр класса {@link PriceTemplate}.
|
|
1278
1216
|
*
|
|
@@ -1288,10 +1226,10 @@ class j extends er {
|
|
|
1288
1226
|
* Дата и время создания шаблона.
|
|
1289
1227
|
*/
|
|
1290
1228
|
t(this, "createdAt");
|
|
1291
|
-
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = m(e == null ? void 0 : e.createdAt) ?
|
|
1229
|
+
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = m(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
|
|
1292
1230
|
}
|
|
1293
1231
|
}
|
|
1294
|
-
class K extends
|
|
1232
|
+
class K extends _ {
|
|
1295
1233
|
/**
|
|
1296
1234
|
* Инициализирует экземпляр класса {@link ClientProduct}.
|
|
1297
1235
|
*
|
|
@@ -1327,10 +1265,10 @@ class K extends b {
|
|
|
1327
1265
|
* Признак того, что указанный продукт входит в список избранных продуктов клиента.
|
|
1328
1266
|
*/
|
|
1329
1267
|
t(this, "isFavorite");
|
|
1330
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ??
|
|
1268
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? Ne.Product, this.discount = e != null && e.discount ? new Br(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new j(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;
|
|
1331
1269
|
}
|
|
1332
1270
|
}
|
|
1333
|
-
class
|
|
1271
|
+
class Hr {
|
|
1334
1272
|
/**
|
|
1335
1273
|
* Инициализирует экземпляр класса {@link ContactLinks}.
|
|
1336
1274
|
*
|
|
@@ -1348,7 +1286,9 @@ class jr {
|
|
|
1348
1286
|
this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
|
|
1349
1287
|
}
|
|
1350
1288
|
}
|
|
1351
|
-
class
|
|
1289
|
+
class I extends w {
|
|
1290
|
+
}
|
|
1291
|
+
class te extends $ {
|
|
1352
1292
|
/**
|
|
1353
1293
|
* Инициализирует экземпляр класса {@link ManagerCommon}.
|
|
1354
1294
|
*
|
|
@@ -1359,7 +1299,7 @@ class re extends a {
|
|
|
1359
1299
|
/**
|
|
1360
1300
|
* Направление продаж.
|
|
1361
1301
|
*/
|
|
1362
|
-
t(this, "salesDirection", new
|
|
1302
|
+
t(this, "salesDirection", new I());
|
|
1363
1303
|
/**
|
|
1364
1304
|
* URI путь к фотографии пользователя.
|
|
1365
1305
|
*/
|
|
@@ -1372,10 +1312,10 @@ class re extends a {
|
|
|
1372
1312
|
* Признак того, что менеджер является основным для клиента.
|
|
1373
1313
|
*/
|
|
1374
1314
|
t(this, "isDefault");
|
|
1375
|
-
e && (this.salesDirection = new
|
|
1315
|
+
e && (this.salesDirection = new I(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new Hr(e.contacts)), e.isDefault !== void 0 && (this.isDefault = e.isDefault));
|
|
1376
1316
|
}
|
|
1377
1317
|
}
|
|
1378
|
-
class
|
|
1318
|
+
class Ce extends te {
|
|
1379
1319
|
/**
|
|
1380
1320
|
* Инициализирует экземпляр класса {@link Manager}.
|
|
1381
1321
|
*
|
|
@@ -1406,7 +1346,7 @@ class ve extends re {
|
|
|
1406
1346
|
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;
|
|
1407
1347
|
}
|
|
1408
1348
|
}
|
|
1409
|
-
class
|
|
1349
|
+
class zr extends oe {
|
|
1410
1350
|
/**
|
|
1411
1351
|
* Инициализирует экземпляр класса {@link BaseClientCategory}.
|
|
1412
1352
|
*
|
|
@@ -1434,10 +1374,10 @@ class Wr extends ne {
|
|
|
1434
1374
|
* Данные о менеджере за которым закреплена категория.
|
|
1435
1375
|
*/
|
|
1436
1376
|
t(this, "manager");
|
|
1437
|
-
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
|
|
1377
|
+
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 Ce(e.manager) : void 0;
|
|
1438
1378
|
}
|
|
1439
1379
|
}
|
|
1440
|
-
class he extends
|
|
1380
|
+
class he extends zr {
|
|
1441
1381
|
/**
|
|
1442
1382
|
* Инициализирует экземпляр класса {@link ClientCategory}.
|
|
1443
1383
|
*
|
|
@@ -1457,7 +1397,7 @@ class he extends Wr {
|
|
|
1457
1397
|
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new he(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new K(o));
|
|
1458
1398
|
}
|
|
1459
1399
|
}
|
|
1460
|
-
class
|
|
1400
|
+
class er {
|
|
1461
1401
|
/**
|
|
1462
1402
|
* Инициализирует экземпляр класса {@link PriceTemplateICatalogableItem}.
|
|
1463
1403
|
*
|
|
@@ -1472,10 +1412,10 @@ class rr {
|
|
|
1472
1412
|
* Процент, который прибавляется к значению выбранного коэффициента.
|
|
1473
1413
|
*/
|
|
1474
1414
|
t(this, "increasePercent");
|
|
1475
|
-
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new
|
|
1415
|
+
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new ye(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
|
|
1476
1416
|
}
|
|
1477
1417
|
}
|
|
1478
|
-
class
|
|
1418
|
+
class Ae extends er {
|
|
1479
1419
|
/**
|
|
1480
1420
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1481
1421
|
*
|
|
@@ -1487,12 +1427,12 @@ class Re extends rr {
|
|
|
1487
1427
|
* Базовые данные о продукте.
|
|
1488
1428
|
*/
|
|
1489
1429
|
t(this, "productCategory");
|
|
1490
|
-
this.productCategory = new
|
|
1430
|
+
this.productCategory = new oe(e == null ? void 0 : e.productCategory);
|
|
1491
1431
|
}
|
|
1492
1432
|
}
|
|
1493
|
-
class Q extends
|
|
1433
|
+
class Q extends w {
|
|
1494
1434
|
}
|
|
1495
|
-
class
|
|
1435
|
+
class se extends w {
|
|
1496
1436
|
/**
|
|
1497
1437
|
* Инициализирует экземпляр класса {@link Region}.
|
|
1498
1438
|
*
|
|
@@ -1507,7 +1447,7 @@ class te extends C {
|
|
|
1507
1447
|
e && (this.country = new Q(e.country));
|
|
1508
1448
|
}
|
|
1509
1449
|
}
|
|
1510
|
-
class
|
|
1450
|
+
class Oe extends w {
|
|
1511
1451
|
/**
|
|
1512
1452
|
* Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
|
|
1513
1453
|
*
|
|
@@ -1518,11 +1458,50 @@ class Ne extends C {
|
|
|
1518
1458
|
/**
|
|
1519
1459
|
* Данные о регионе, в котором расположен город.
|
|
1520
1460
|
*/
|
|
1521
|
-
t(this, "region", new
|
|
1522
|
-
e && (this.region = new
|
|
1461
|
+
t(this, "region", new se());
|
|
1462
|
+
e && (this.region = new se(e.region));
|
|
1523
1463
|
}
|
|
1524
1464
|
}
|
|
1525
|
-
class
|
|
1465
|
+
class rr extends $ {
|
|
1466
|
+
/**
|
|
1467
|
+
* Инициализирует экземпляр класса {@link UserCommonInfo}.
|
|
1468
|
+
*
|
|
1469
|
+
* @param data Данные для первоначальной инициализации.
|
|
1470
|
+
*/
|
|
1471
|
+
constructor(e) {
|
|
1472
|
+
super(e);
|
|
1473
|
+
/**
|
|
1474
|
+
* Номер телефона. В формате "79203436527" или "+79203436527".
|
|
1475
|
+
*/
|
|
1476
|
+
t(this, "phone");
|
|
1477
|
+
/**
|
|
1478
|
+
* Адрес электронной почты.
|
|
1479
|
+
*/
|
|
1480
|
+
t(this, "email");
|
|
1481
|
+
/**
|
|
1482
|
+
* Признак подписки на новости и информационные сообщения.
|
|
1483
|
+
*/
|
|
1484
|
+
t(this, "getNews");
|
|
1485
|
+
/**
|
|
1486
|
+
* Направление продаж.
|
|
1487
|
+
*/
|
|
1488
|
+
t(this, "salesDirection");
|
|
1489
|
+
/**
|
|
1490
|
+
* Дата и время регистрации пользователя.
|
|
1491
|
+
*/
|
|
1492
|
+
t(this, "createdAt");
|
|
1493
|
+
/**
|
|
1494
|
+
* Дата и время последней аутентификации пользователя.
|
|
1495
|
+
*/
|
|
1496
|
+
t(this, "lastLoginAt");
|
|
1497
|
+
/**
|
|
1498
|
+
* Признак активности учетной записи пользователя.
|
|
1499
|
+
*/
|
|
1500
|
+
t(this, "isActive");
|
|
1501
|
+
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 I(e.salesDirection) : void 0, this.createdAt = m(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = m(e == null ? void 0 : e.lastLoginAt) ? y(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
class ce extends rr {
|
|
1526
1505
|
/**
|
|
1527
1506
|
* Инициализирует экземпляр класса {@link Client}.
|
|
1528
1507
|
*
|
|
@@ -1564,10 +1543,10 @@ class oe extends Ze {
|
|
|
1564
1543
|
* Список менеджеров клиента.
|
|
1565
1544
|
*/
|
|
1566
1545
|
t(this, "managers");
|
|
1567
|
-
this.salesDirection = new
|
|
1546
|
+
this.salesDirection = new I(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 Oe(e == null ? void 0 : e.city), this.comment = e == null ? void 0 : e.comment, this.isPhoneApproved = (e == null ? void 0 : e.isPhoneApproved) ?? !1, this.isEmailApproved = (e == null ? void 0 : e.isEmailApproved) ?? !1, this.managers = ((s = e == null ? void 0 : e.managers) == null ? void 0 : s.map((i) => new te(i))) ?? [];
|
|
1568
1547
|
}
|
|
1569
1548
|
}
|
|
1570
|
-
class
|
|
1549
|
+
class Z extends B {
|
|
1571
1550
|
/**
|
|
1572
1551
|
* Инициализирует новый экземпляр класса.
|
|
1573
1552
|
*
|
|
@@ -1591,10 +1570,10 @@ class X extends B {
|
|
|
1591
1570
|
* Данные шаблона прайс-листа.
|
|
1592
1571
|
*/
|
|
1593
1572
|
t(this, "priceTemplate");
|
|
1594
|
-
this.createdAt = m(e == null ? void 0 : e.createdAt) ?
|
|
1573
|
+
this.createdAt = m(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? y(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new ce(e == null ? void 0 : e.client), this.priceTemplate = new j(e == null ? void 0 : e.priceTemplate);
|
|
1595
1574
|
}
|
|
1596
1575
|
}
|
|
1597
|
-
class
|
|
1576
|
+
class ae extends er {
|
|
1598
1577
|
/**
|
|
1599
1578
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1600
1579
|
*
|
|
@@ -1606,12 +1585,12 @@ class Ae extends rr {
|
|
|
1606
1585
|
* Базовые данные о продукте.
|
|
1607
1586
|
*/
|
|
1608
1587
|
t(this, "product");
|
|
1609
|
-
this.product = new
|
|
1588
|
+
this.product = new _(e == null ? void 0 : e.product);
|
|
1610
1589
|
}
|
|
1611
1590
|
}
|
|
1612
|
-
class tr extends
|
|
1591
|
+
class tr extends w {
|
|
1613
1592
|
}
|
|
1614
|
-
class
|
|
1593
|
+
class ee extends $ {
|
|
1615
1594
|
/**
|
|
1616
1595
|
* Инициализирует экземпляр класса {@link Property}.
|
|
1617
1596
|
*
|
|
@@ -1650,10 +1629,10 @@ class H {
|
|
|
1650
1629
|
* Может быть строкой, числом, boolean, диапазоном или JSON объектом.
|
|
1651
1630
|
*/
|
|
1652
1631
|
t(this, "value");
|
|
1653
|
-
this.property = new
|
|
1632
|
+
this.property = new ee(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
|
|
1654
1633
|
}
|
|
1655
1634
|
}
|
|
1656
|
-
class
|
|
1635
|
+
class O {
|
|
1657
1636
|
/**
|
|
1658
1637
|
* Инициализирует экземпляр класса {@link DatePeriod}.
|
|
1659
1638
|
*
|
|
@@ -1668,10 +1647,10 @@ class N {
|
|
|
1668
1647
|
* Окончание периода.
|
|
1669
1648
|
*/
|
|
1670
1649
|
t(this, "to");
|
|
1671
|
-
this.from = m(r == null ? void 0 : r.from) ?
|
|
1650
|
+
this.from = m(r == null ? void 0 : r.from) ? y(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = m(r == null ? void 0 : r.to) ? y(r.to) : (r == null ? void 0 : r.to) ?? null;
|
|
1672
1651
|
}
|
|
1673
1652
|
}
|
|
1674
|
-
class
|
|
1653
|
+
class bt {
|
|
1675
1654
|
/**
|
|
1676
1655
|
* Инициализирует экземпляр класса {@link TemplatesListFilters}.
|
|
1677
1656
|
*
|
|
@@ -1693,12 +1672,12 @@ class Tt {
|
|
|
1693
1672
|
/**
|
|
1694
1673
|
* Период создания.
|
|
1695
1674
|
*/
|
|
1696
|
-
t(this, "createdAt", new
|
|
1675
|
+
t(this, "createdAt", new O());
|
|
1697
1676
|
/**
|
|
1698
1677
|
* Период изменения.
|
|
1699
1678
|
*/
|
|
1700
|
-
t(this, "updatedAt", new
|
|
1701
|
-
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.description = r == null ? void 0 : r.description, this.createdAt = new
|
|
1679
|
+
t(this, "updatedAt", new O());
|
|
1680
|
+
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.description = r == null ? void 0 : r.description, this.createdAt = new O(r == null ? void 0 : r.createdAt), this.updatedAt = new O(r == null ? void 0 : r.updatedAt);
|
|
1702
1681
|
}
|
|
1703
1682
|
/**
|
|
1704
1683
|
* Выполняет сброс указанного фильтра в значение по умолчанию.
|
|
@@ -1729,21 +1708,21 @@ class Tt {
|
|
|
1729
1708
|
var e, s, i, o;
|
|
1730
1709
|
const r = {};
|
|
1731
1710
|
return Object.keys(this).forEach((c) => {
|
|
1732
|
-
const
|
|
1711
|
+
const p = this[c];
|
|
1733
1712
|
// eslint-disable-next-line prettier/prettier
|
|
1734
|
-
|
|
1713
|
+
T(p) || m(p) && p.trim().length === 0 || Ie(p.isNewRec) && p.isNewRec() || (r[c] = p);
|
|
1735
1714
|
}), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((s = r == null ? void 0 : r.createdAt) != null && s.to) && delete r.createdAt, !((i = r == null ? void 0 : r.updatedAt) != null && i.from) && !((o = r == null ? void 0 : r.updatedAt) != null && o.to) && delete r.updatedAt, r;
|
|
1736
1715
|
}
|
|
1737
1716
|
}
|
|
1738
|
-
class
|
|
1717
|
+
class jr extends w {
|
|
1739
1718
|
}
|
|
1740
|
-
class sr extends
|
|
1719
|
+
class sr extends w {
|
|
1741
1720
|
}
|
|
1742
|
-
class
|
|
1721
|
+
class _t extends w {
|
|
1743
1722
|
}
|
|
1744
|
-
class
|
|
1723
|
+
class Wr extends w {
|
|
1745
1724
|
}
|
|
1746
|
-
class ge extends
|
|
1725
|
+
class ge extends $ {
|
|
1747
1726
|
/**
|
|
1748
1727
|
* Инициализирует экземпляр класса {@link Currency}.
|
|
1749
1728
|
*
|
|
@@ -1762,8 +1741,8 @@ class ge extends a {
|
|
|
1762
1741
|
e && (this.signature = e.signature ?? "", this.symbol = e.symbol ?? "");
|
|
1763
1742
|
}
|
|
1764
1743
|
}
|
|
1765
|
-
var
|
|
1766
|
-
class M extends
|
|
1744
|
+
var b = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(b || {});
|
|
1745
|
+
class M extends w {
|
|
1767
1746
|
/**
|
|
1768
1747
|
* Возвращает сгенерированную запись-описание физического лица.
|
|
1769
1748
|
*/
|
|
@@ -1771,24 +1750,24 @@ class M extends C {
|
|
|
1771
1750
|
return new M({
|
|
1772
1751
|
id: 1,
|
|
1773
1752
|
guid: "",
|
|
1774
|
-
slug:
|
|
1753
|
+
slug: b.Person,
|
|
1775
1754
|
name: ""
|
|
1776
1755
|
});
|
|
1777
1756
|
}
|
|
1778
1757
|
}
|
|
1779
|
-
class
|
|
1758
|
+
class Vr extends w {
|
|
1780
1759
|
}
|
|
1781
|
-
class
|
|
1760
|
+
class Er extends w {
|
|
1782
1761
|
}
|
|
1783
|
-
class Y extends
|
|
1762
|
+
class Y extends w {
|
|
1784
1763
|
}
|
|
1785
|
-
class
|
|
1764
|
+
class Jr extends w {
|
|
1786
1765
|
}
|
|
1787
|
-
class
|
|
1766
|
+
class Kr extends w {
|
|
1788
1767
|
}
|
|
1789
|
-
class ir extends
|
|
1768
|
+
class ir extends w {
|
|
1790
1769
|
}
|
|
1791
|
-
class nr extends
|
|
1770
|
+
class nr extends w {
|
|
1792
1771
|
}
|
|
1793
1772
|
const V = class V extends h {
|
|
1794
1773
|
/**
|
|
@@ -1800,7 +1779,7 @@ const V = class V extends h {
|
|
|
1800
1779
|
* Время кэширования данных ответов на запросы (секунд).
|
|
1801
1780
|
*/
|
|
1802
1781
|
t(this, "responseDataCacheTimeout");
|
|
1803
|
-
this.responseDataCacheTimeout =
|
|
1782
|
+
this.responseDataCacheTimeout = D.getConfig().http.responseDataCacheTimeout;
|
|
1804
1783
|
}
|
|
1805
1784
|
/**
|
|
1806
1785
|
* Возвращает кэшированные данные.
|
|
@@ -1822,7 +1801,7 @@ const V = class V extends h {
|
|
|
1822
1801
|
*/
|
|
1823
1802
|
cacheResponse(e, s) {
|
|
1824
1803
|
V.responseDataCache.set(e, {
|
|
1825
|
-
validTo:
|
|
1804
|
+
validTo: Dr(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
|
|
1826
1805
|
val: s
|
|
1827
1806
|
});
|
|
1828
1807
|
}
|
|
@@ -1837,9 +1816,9 @@ const V = class V extends h {
|
|
|
1837
1816
|
*/
|
|
1838
1817
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
1839
1818
|
getTypedDataArrayRequester(e, s, i = !1, o = {}) {
|
|
1840
|
-
const c = s + (Le(o) ? "" : ` >>> ${JSON.stringify(o)}`),
|
|
1841
|
-
return
|
|
1842
|
-
const R =
|
|
1819
|
+
const c = s + (Le(o) ? "" : ` >>> ${JSON.stringify(o)}`), p = i ? V.getCachedResponse(c) : void 0;
|
|
1820
|
+
return p ? Promise.resolve(p) : this.get(s, o).then((u) => {
|
|
1821
|
+
const R = u.map((a) => xe.instanceInitializer(e, a));
|
|
1843
1822
|
return i && R && this.cacheResponse(s, R), R;
|
|
1844
1823
|
});
|
|
1845
1824
|
}
|
|
@@ -1848,8 +1827,8 @@ const V = class V extends h {
|
|
|
1848
1827
|
* Кэш результатов запросов.
|
|
1849
1828
|
*/
|
|
1850
1829
|
t(V, "responseDataCache", /* @__PURE__ */ new Map());
|
|
1851
|
-
let
|
|
1852
|
-
class A extends
|
|
1830
|
+
let ie = V;
|
|
1831
|
+
class A extends ie {
|
|
1853
1832
|
/**
|
|
1854
1833
|
* Возвращает {@link Promise} для получения данных указанного справочника.
|
|
1855
1834
|
*
|
|
@@ -1858,7 +1837,7 @@ class A extends se {
|
|
|
1858
1837
|
* и использовать в случае аналогичных запросов.
|
|
1859
1838
|
*/
|
|
1860
1839
|
getReference(r, e = !1) {
|
|
1861
|
-
return this.getTypedDataArrayRequester(
|
|
1840
|
+
return this.getTypedDataArrayRequester(jr, `/internal/references/${r}`, e);
|
|
1862
1841
|
}
|
|
1863
1842
|
/**
|
|
1864
1843
|
* Возвращает {@link Promise} для получения справочника данных о канале
|
|
@@ -1871,7 +1850,7 @@ class A extends se {
|
|
|
1871
1850
|
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
1872
1851
|
*/
|
|
1873
1852
|
getContactPositions() {
|
|
1874
|
-
return this.getTypedDataArrayRequester(
|
|
1853
|
+
return this.getTypedDataArrayRequester(Wr, "/internal/references/contact-position", !0);
|
|
1875
1854
|
}
|
|
1876
1855
|
/**
|
|
1877
1856
|
* Возвращает {@link Promise} для получения справочника списка валют.
|
|
@@ -1896,19 +1875,19 @@ class A extends se {
|
|
|
1896
1875
|
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
1897
1876
|
*/
|
|
1898
1877
|
getOrderPaymentStatuses() {
|
|
1899
|
-
return this.getTypedDataArrayRequester(
|
|
1878
|
+
return this.getTypedDataArrayRequester(Vr, "/public/references/order-payment-status", !0);
|
|
1900
1879
|
}
|
|
1901
1880
|
/**
|
|
1902
1881
|
* Возвращает {@link Promise} для получения справочника данных статусов заказов.
|
|
1903
1882
|
*/
|
|
1904
1883
|
getOrderStatuses() {
|
|
1905
|
-
return this.getTypedDataArrayRequester(
|
|
1884
|
+
return this.getTypedDataArrayRequester(Er, "/public/references/order-status", !0);
|
|
1906
1885
|
}
|
|
1907
1886
|
/**
|
|
1908
1887
|
* Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
|
|
1909
1888
|
*/
|
|
1910
1889
|
getPaymentTypes() {
|
|
1911
|
-
return this.getTypedDataArrayRequester(
|
|
1890
|
+
return this.getTypedDataArrayRequester(Jr, "/public/references/payment-type", !0);
|
|
1912
1891
|
}
|
|
1913
1892
|
/**
|
|
1914
1893
|
* Возвращает {@link Promise} для получения справочника типов ресурсов.
|
|
@@ -1920,7 +1899,7 @@ class A extends se {
|
|
|
1920
1899
|
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
1921
1900
|
*/
|
|
1922
1901
|
getSalesDirections() {
|
|
1923
|
-
return this.getTypedDataArrayRequester(
|
|
1902
|
+
return this.getTypedDataArrayRequester(I, "/public/references/sales-direction", !0);
|
|
1924
1903
|
}
|
|
1925
1904
|
/**
|
|
1926
1905
|
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
@@ -1934,7 +1913,7 @@ class A extends se {
|
|
|
1934
1913
|
* @param term Терм поиска.
|
|
1935
1914
|
*/
|
|
1936
1915
|
searchCity(r) {
|
|
1937
|
-
return this.getTypedDataArrayRequester(
|
|
1916
|
+
return this.getTypedDataArrayRequester(Oe, `/internal/references/city-with-region-and-country/search?term=${r}`);
|
|
1938
1917
|
}
|
|
1939
1918
|
/**
|
|
1940
1919
|
* Выполняет поиск данных о регионах по терму в названии.
|
|
@@ -1942,7 +1921,7 @@ class A extends se {
|
|
|
1942
1921
|
* @param term Терм поиска.
|
|
1943
1922
|
*/
|
|
1944
1923
|
searchRegion(r) {
|
|
1945
|
-
return this.getTypedDataArrayRequester(
|
|
1924
|
+
return this.getTypedDataArrayRequester(se, `/internal/references/region-with-country/search?term=${r}`);
|
|
1946
1925
|
}
|
|
1947
1926
|
/**
|
|
1948
1927
|
* Выполняет поиск данных о странах по терму в названии.
|
|
@@ -1962,7 +1941,7 @@ class A extends se {
|
|
|
1962
1941
|
* Возвращает {@link Promise} для получения справочника складов.
|
|
1963
1942
|
*/
|
|
1964
1943
|
getWarehouses() {
|
|
1965
|
-
return this.getTypedDataArrayRequester(
|
|
1944
|
+
return this.getTypedDataArrayRequester(we, "/public/references/warehouse", !0);
|
|
1966
1945
|
}
|
|
1967
1946
|
/**
|
|
1968
1947
|
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
@@ -1973,18 +1952,317 @@ class A extends se {
|
|
|
1973
1952
|
/**
|
|
1974
1953
|
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
1975
1954
|
*/
|
|
1976
|
-
getPriceCoefficients() {
|
|
1977
|
-
return this.getTypedDataArrayRequester(
|
|
1955
|
+
getPriceCoefficients() {
|
|
1956
|
+
return this.getTypedDataArrayRequester(ye, "/internal/references/price-coefficient", !0);
|
|
1957
|
+
}
|
|
1958
|
+
/**
|
|
1959
|
+
* Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
|
|
1960
|
+
*/
|
|
1961
|
+
getProductFileType() {
|
|
1962
|
+
return this.getTypedDataArrayRequester(Kr, "/public/references/product-file-type", !0);
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1965
|
+
class Qr extends ie {
|
|
1966
|
+
/**
|
|
1967
|
+
* Возвращает {@link Promise} для получения справочника списка менеджеров.
|
|
1968
|
+
*/
|
|
1969
|
+
async getManagers() {
|
|
1970
|
+
const r = "/internal/managers", e = ie.getCachedResponse(r);
|
|
1971
|
+
if (e)
|
|
1972
|
+
return e;
|
|
1973
|
+
const i = (await this.get(r)).data.map((o) => xe.instanceInitializer(Ce, o));
|
|
1974
|
+
return this.cacheResponse(r, i), i;
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1977
|
+
const P = X("__references_private", () => {
|
|
1978
|
+
const n = f({}), r = f(void 0), e = f(void 0), s = f(void 0), i = f(void 0), o = f(void 0), c = f(void 0), p = f(void 0), u = f(void 0), R = f(void 0), a = f(void 0), L = f(void 0), k = f(void 0), d = f(void 0), x = f(void 0), N = f(void 0), q = f(void 0), l = f(void 0);
|
|
1979
|
+
return {
|
|
1980
|
+
/**
|
|
1981
|
+
* Список загружаемых/загруженных на данный момент значений.
|
|
1982
|
+
*/
|
|
1983
|
+
dataLoaderList: n,
|
|
1984
|
+
/**
|
|
1985
|
+
* Справочник каналов первичного интереса.
|
|
1986
|
+
*/
|
|
1987
|
+
channelPrimaryInterestReference: r,
|
|
1988
|
+
/**
|
|
1989
|
+
* Справочник должностей контактных лиц.
|
|
1990
|
+
*/
|
|
1991
|
+
contactPositionsReference: e,
|
|
1992
|
+
/**
|
|
1993
|
+
* Справочник валют.
|
|
1994
|
+
*/
|
|
1995
|
+
currencyReference: s,
|
|
1996
|
+
/**
|
|
1997
|
+
* Справочник типов доставки.
|
|
1998
|
+
*/
|
|
1999
|
+
deliveryTypeReference: i,
|
|
2000
|
+
/**
|
|
2001
|
+
* Список менеджеров.
|
|
2002
|
+
*/
|
|
2003
|
+
managersList: o,
|
|
2004
|
+
/**
|
|
2005
|
+
* Справочник организационно-правовых форм.
|
|
2006
|
+
*/
|
|
2007
|
+
opfReference: c,
|
|
2008
|
+
/**
|
|
2009
|
+
* Справочник статусов оплаты заказа.
|
|
2010
|
+
*/
|
|
2011
|
+
orderPaymentStatusReference: p,
|
|
2012
|
+
/**
|
|
2013
|
+
* Справочник статусов заказов.
|
|
2014
|
+
*/
|
|
2015
|
+
orderStatusReference: u,
|
|
2016
|
+
/**
|
|
2017
|
+
* Справочник типов оплаты заказов.
|
|
2018
|
+
*/
|
|
2019
|
+
paymentTypeReference: R,
|
|
2020
|
+
/**
|
|
2021
|
+
* Справочник групп партнеров.
|
|
2022
|
+
*/
|
|
2023
|
+
partnerGroupReference: a,
|
|
2024
|
+
/**
|
|
2025
|
+
* Справочник типов файлов продукктов/категорий.
|
|
2026
|
+
*/
|
|
2027
|
+
productFileTypeReference: L,
|
|
2028
|
+
/**
|
|
2029
|
+
* Справочник типов ресурсов.
|
|
2030
|
+
*/
|
|
2031
|
+
resourceTypesReference: k,
|
|
2032
|
+
/**
|
|
2033
|
+
* Справочник направлений продаж.
|
|
2034
|
+
*/
|
|
2035
|
+
salesDirectionsReference: d,
|
|
2036
|
+
/**
|
|
2037
|
+
* Справочник источников первичного интереса.
|
|
2038
|
+
*/
|
|
2039
|
+
sourcePrimaryInterestReference: x,
|
|
2040
|
+
/**
|
|
2041
|
+
* Справочник складов.
|
|
2042
|
+
*/
|
|
2043
|
+
warehousesReference: N,
|
|
2044
|
+
/**
|
|
2045
|
+
* Справочник типов свойств.
|
|
2046
|
+
*/
|
|
2047
|
+
propertyTypesReference: q,
|
|
2048
|
+
/**
|
|
2049
|
+
* Справочник коэффициентов цен.
|
|
2050
|
+
*/
|
|
2051
|
+
priceCoefficientsReference: l
|
|
2052
|
+
};
|
|
2053
|
+
}), St = X("references", () => {
|
|
2054
|
+
const n = v(() => {
|
|
2055
|
+
const l = P();
|
|
2056
|
+
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(A).getChannelPrimaryInterest().then((g) => {
|
|
2057
|
+
l.channelPrimaryInterestReference = g;
|
|
2058
|
+
}).catch(C)), l.channelPrimaryInterestReference;
|
|
2059
|
+
}), r = v(() => {
|
|
2060
|
+
const l = P();
|
|
2061
|
+
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(A).getContactPositions().then((g) => {
|
|
2062
|
+
l.contactPositionsReference = g;
|
|
2063
|
+
}).catch(C)), l.contactPositionsReference;
|
|
2064
|
+
}), e = v(() => {
|
|
2065
|
+
const l = P();
|
|
2066
|
+
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(A).getCurrency().then((g) => {
|
|
2067
|
+
l.currencyReference = g;
|
|
2068
|
+
}).catch(C)), l.currencyReference;
|
|
2069
|
+
}), s = v(() => {
|
|
2070
|
+
const l = P();
|
|
2071
|
+
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(A).getOpf().then((g) => {
|
|
2072
|
+
l.opfReference = g;
|
|
2073
|
+
}).catch(C)), l.opfReference;
|
|
2074
|
+
}), i = v(() => {
|
|
2075
|
+
const l = P();
|
|
2076
|
+
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(A).getOrderPaymentStatuses().then((g) => {
|
|
2077
|
+
l.orderPaymentStatusReference = g;
|
|
2078
|
+
}).catch(C)), l.orderPaymentStatusReference;
|
|
2079
|
+
}), o = v(() => {
|
|
2080
|
+
const l = P();
|
|
2081
|
+
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(A).getOrderStatuses().then((g) => {
|
|
2082
|
+
l.orderStatusReference = g;
|
|
2083
|
+
}).catch(C)), l.orderStatusReference;
|
|
2084
|
+
}), c = v(() => {
|
|
2085
|
+
const l = P();
|
|
2086
|
+
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(A).getPaymentTypes().then((g) => {
|
|
2087
|
+
l.paymentTypeReference = g;
|
|
2088
|
+
}).catch(C)), l.paymentTypeReference;
|
|
2089
|
+
}), p = v(() => {
|
|
2090
|
+
const l = P();
|
|
2091
|
+
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(A).getPartnerGroup().then((g) => {
|
|
2092
|
+
l.partnerGroupReference = g;
|
|
2093
|
+
}).catch(C)), l.partnerGroupReference;
|
|
2094
|
+
}), u = v(() => {
|
|
2095
|
+
const l = P();
|
|
2096
|
+
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(A).getProductFileType().then((g) => {
|
|
2097
|
+
l.productFileTypeReference = g;
|
|
2098
|
+
}).catch(C)), l.productFileTypeReference;
|
|
2099
|
+
}), R = v(() => {
|
|
2100
|
+
const l = P();
|
|
2101
|
+
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(A).getResourceTypes().then((g) => {
|
|
2102
|
+
l.resourceTypesReference = g;
|
|
2103
|
+
}).catch(C)), l.resourceTypesReference;
|
|
2104
|
+
}), a = v(() => {
|
|
2105
|
+
const l = P();
|
|
2106
|
+
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(A).getSalesDirections().then((g) => {
|
|
2107
|
+
l.salesDirectionsReference = g;
|
|
2108
|
+
}).catch(C)), l.salesDirectionsReference;
|
|
2109
|
+
}), L = v(() => {
|
|
2110
|
+
const l = P();
|
|
2111
|
+
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(A).getSourcePrimaryInterest().then((g) => {
|
|
2112
|
+
l.sourcePrimaryInterestReference = g;
|
|
2113
|
+
}).catch(C)), l.sourcePrimaryInterestReference;
|
|
2114
|
+
}), k = v(() => {
|
|
2115
|
+
const l = P();
|
|
2116
|
+
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(A).getDeliveryTypes().then((g) => {
|
|
2117
|
+
l.deliveryTypeReference = g;
|
|
2118
|
+
}).catch(C)), l.deliveryTypeReference;
|
|
2119
|
+
}), d = v(() => {
|
|
2120
|
+
const l = P();
|
|
2121
|
+
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(Qr).getManagers().then((g) => {
|
|
2122
|
+
l.managersList = g;
|
|
2123
|
+
}).catch(C)), l.managersList;
|
|
2124
|
+
}), x = v(() => {
|
|
2125
|
+
const l = P();
|
|
2126
|
+
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(A).getWarehouses().then((g) => {
|
|
2127
|
+
l.warehousesReference = g;
|
|
2128
|
+
}).catch(C)), l.warehousesReference;
|
|
2129
|
+
}), N = v(() => {
|
|
2130
|
+
const l = P();
|
|
2131
|
+
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(A).getPropertyTypes().then((g) => {
|
|
2132
|
+
l.propertyTypesReference = g;
|
|
2133
|
+
}).catch(C)), l.propertyTypesReference;
|
|
2134
|
+
}), q = v(() => {
|
|
2135
|
+
const l = P();
|
|
2136
|
+
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(A).getPriceCoefficients().then((g) => {
|
|
2137
|
+
l.priceCoefficientsReference = g;
|
|
2138
|
+
}).catch(C)), l.priceCoefficientsReference;
|
|
2139
|
+
});
|
|
2140
|
+
return {
|
|
2141
|
+
/**
|
|
2142
|
+
* Справочник каналов первичного интереса.
|
|
2143
|
+
*/
|
|
2144
|
+
channelPrimaryInterestsReference: n,
|
|
2145
|
+
/**
|
|
2146
|
+
* Справочник должностей контактных лиц.
|
|
2147
|
+
*/
|
|
2148
|
+
contactPositionsReference: r,
|
|
2149
|
+
/**
|
|
2150
|
+
* Справочник валют.
|
|
2151
|
+
*/
|
|
2152
|
+
currencyReference: e,
|
|
2153
|
+
/**
|
|
2154
|
+
* Справочник организационно-правовых форм.
|
|
2155
|
+
*/
|
|
2156
|
+
opfReference: s,
|
|
2157
|
+
/**
|
|
2158
|
+
* Справочник статусов оплаты заказа.
|
|
2159
|
+
*/
|
|
2160
|
+
orderPaymentStatusReference: i,
|
|
2161
|
+
/**
|
|
2162
|
+
* Справочник статусов заказов.
|
|
2163
|
+
*/
|
|
2164
|
+
orderStatusReference: o,
|
|
2165
|
+
/**
|
|
2166
|
+
* Справочник типов оплаты заказов.
|
|
2167
|
+
*/
|
|
2168
|
+
paymentTypeReference: c,
|
|
2169
|
+
/**
|
|
2170
|
+
* Справочник групп партнеров.
|
|
2171
|
+
*/
|
|
2172
|
+
partnerGroupsReference: p,
|
|
2173
|
+
/**
|
|
2174
|
+
* Справочник типов файлов продуктов/категорий.
|
|
2175
|
+
*/
|
|
2176
|
+
productFilesTypesReference: u,
|
|
2177
|
+
/**
|
|
2178
|
+
* Справочник типов ресурсов.
|
|
2179
|
+
*/
|
|
2180
|
+
resourceTypesReference: R,
|
|
2181
|
+
/**
|
|
2182
|
+
* Справочник направлений продаж.
|
|
2183
|
+
*/
|
|
2184
|
+
salesDirectionsReference: a,
|
|
2185
|
+
/**
|
|
2186
|
+
* Справочник каналов первичного интереса.
|
|
2187
|
+
*/
|
|
2188
|
+
sourcePrimaryInterestsReference: L,
|
|
2189
|
+
/**
|
|
2190
|
+
* Справочник типов доставки.
|
|
2191
|
+
*/
|
|
2192
|
+
deliveryTypeReference: k,
|
|
2193
|
+
/**
|
|
2194
|
+
* Список менеджеров.
|
|
2195
|
+
*/
|
|
2196
|
+
managersList: d,
|
|
2197
|
+
/**
|
|
2198
|
+
* Справочник складов.
|
|
2199
|
+
*/
|
|
2200
|
+
warehousesReference: x,
|
|
2201
|
+
/**
|
|
2202
|
+
* Справочник типов свойств.
|
|
2203
|
+
*/
|
|
2204
|
+
propertyTypesReference: N,
|
|
2205
|
+
/**
|
|
2206
|
+
* Справочник коэффициентов цен.
|
|
2207
|
+
*/
|
|
2208
|
+
priceCoefficientsReference: q
|
|
2209
|
+
};
|
|
2210
|
+
});
|
|
2211
|
+
var Yr = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(Yr || {});
|
|
2212
|
+
class Xr extends rr {
|
|
2213
|
+
/**
|
|
2214
|
+
* Инициализирует экземпляр класса {@link User}.
|
|
2215
|
+
*
|
|
2216
|
+
* @param data Данные для первоначальной инициализации.
|
|
2217
|
+
*/
|
|
2218
|
+
constructor(e) {
|
|
2219
|
+
super(e);
|
|
2220
|
+
/**
|
|
2221
|
+
* Тип пользователя.
|
|
2222
|
+
*/
|
|
2223
|
+
t(this, "type");
|
|
2224
|
+
/**
|
|
2225
|
+
* Признак того, что менеджер может работать с рекламациями.
|
|
2226
|
+
*/
|
|
2227
|
+
t(this, "canDoReclamations");
|
|
2228
|
+
/**
|
|
2229
|
+
* URI путь к фотографии пользователя.
|
|
2230
|
+
*/
|
|
2231
|
+
t(this, "photo");
|
|
2232
|
+
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;
|
|
1978
2233
|
}
|
|
2234
|
+
}
|
|
2235
|
+
class Zr extends h {
|
|
1979
2236
|
/**
|
|
1980
|
-
* Возвращает
|
|
2237
|
+
* Возвращает данные о текущем пользователе.
|
|
1981
2238
|
*/
|
|
1982
|
-
|
|
1983
|
-
|
|
2239
|
+
// eslint-disable-next-line class-methods-use-this
|
|
2240
|
+
getCurrentUser() {
|
|
2241
|
+
return this.get("/internal/users/info", {}, (r) => new Xr(r.data));
|
|
1984
2242
|
}
|
|
1985
2243
|
}
|
|
1986
|
-
|
|
1987
|
-
|
|
2244
|
+
const et = X("__user_state_private", () => {
|
|
2245
|
+
const n = f({}), r = f(void 0);
|
|
2246
|
+
return {
|
|
2247
|
+
/**
|
|
2248
|
+
* Список загружаемых/загруженных на данный момент значений.
|
|
2249
|
+
*/
|
|
2250
|
+
dataLoaderList: n,
|
|
2251
|
+
/**
|
|
2252
|
+
* Данные о текущем пользователе.
|
|
2253
|
+
*/
|
|
2254
|
+
currentUser: r
|
|
2255
|
+
};
|
|
2256
|
+
}), It = X("user_state", () => ({
|
|
2257
|
+
/**
|
|
2258
|
+
* Данные о текущем пользователе.
|
|
2259
|
+
*/
|
|
2260
|
+
currentUser: v(async () => {
|
|
2261
|
+
const r = et();
|
|
2262
|
+
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, r.currentUser = await h.getInstance(Zr).getCurrentUser()), r.currentUser;
|
|
2263
|
+
})
|
|
2264
|
+
}));
|
|
2265
|
+
class rt {
|
|
1988
2266
|
/**
|
|
1989
2267
|
* Инициализирует экземпляр класса {@link ProductPriceHistory}.
|
|
1990
2268
|
*
|
|
@@ -2027,7 +2305,7 @@ class Zr {
|
|
|
2027
2305
|
* Данные о валюте.
|
|
2028
2306
|
*/
|
|
2029
2307
|
t(this, "currency");
|
|
2030
|
-
this.cost = r.cost, this.costDate = m(r.costDate) ?
|
|
2308
|
+
this.cost = r.cost, this.costDate = m(r.costDate) ? y(r.costDate) : r.costDate, this.isLowCost = r.isLowCost, this.isRetail = r.isRetail, this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.client = r.client ? new G(r.client) : void 0, this.executor = r.executor ? new G(r.executor) : void 0, this.currency = r.currency ? new ge(r.currency) : void 0;
|
|
2031
2309
|
}
|
|
2032
2310
|
}
|
|
2033
2311
|
class Ge {
|
|
@@ -2045,10 +2323,10 @@ class Ge {
|
|
|
2045
2323
|
* Список рекомендованных категорий продуктов.
|
|
2046
2324
|
*/
|
|
2047
2325
|
t(this, "productCategories", []);
|
|
2048
|
-
r != null && r.products && (this.products = r.products.map((e) => new
|
|
2326
|
+
r != null && r.products && (this.products = r.products.map((e) => new _(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new U(e)));
|
|
2049
2327
|
}
|
|
2050
2328
|
}
|
|
2051
|
-
class
|
|
2329
|
+
class re extends $ {
|
|
2052
2330
|
/**
|
|
2053
2331
|
* Инициализирует экземпляр класса {@link PricingRole}.
|
|
2054
2332
|
*
|
|
@@ -2102,10 +2380,10 @@ class Me {
|
|
|
2102
2380
|
* Минимальный коэффициент цены.
|
|
2103
2381
|
*/
|
|
2104
2382
|
t(this, "minCoefficient");
|
|
2105
|
-
this.role = new
|
|
2383
|
+
this.role = new re(r == null ? void 0 : r.role), this.category = new oe(r == null ? void 0 : r.category), this.minCoefficient = new ye(r == null ? void 0 : r.minCoefficient);
|
|
2106
2384
|
}
|
|
2107
2385
|
}
|
|
2108
|
-
class
|
|
2386
|
+
class tt {
|
|
2109
2387
|
/**
|
|
2110
2388
|
* Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
|
|
2111
2389
|
*
|
|
@@ -2127,7 +2405,7 @@ class et {
|
|
|
2127
2405
|
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;
|
|
2128
2406
|
}
|
|
2129
2407
|
}
|
|
2130
|
-
class
|
|
2408
|
+
class st {
|
|
2131
2409
|
/**
|
|
2132
2410
|
* Инициализирует экземпляр класса {@link HttpParamsConfig}.
|
|
2133
2411
|
*
|
|
@@ -2149,7 +2427,7 @@ class rt {
|
|
|
2149
2427
|
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;
|
|
2150
2428
|
}
|
|
2151
2429
|
}
|
|
2152
|
-
class
|
|
2430
|
+
class it {
|
|
2153
2431
|
/**
|
|
2154
2432
|
* Инициализирует экземпляр класса {@link SentryConfig}.
|
|
2155
2433
|
*
|
|
@@ -2194,7 +2472,7 @@ class tt {
|
|
|
2194
2472
|
}, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
|
|
2195
2473
|
}
|
|
2196
2474
|
}
|
|
2197
|
-
class
|
|
2475
|
+
class nt {
|
|
2198
2476
|
/**
|
|
2199
2477
|
* Инициализирует экземпляр класса {@link VersionConfig}.
|
|
2200
2478
|
*
|
|
@@ -2213,10 +2491,10 @@ class st {
|
|
|
2213
2491
|
* Текущая версия приложения.
|
|
2214
2492
|
*/
|
|
2215
2493
|
t(this, "version");
|
|
2216
|
-
this.date = m(r == null ? void 0 : r.date) ?
|
|
2494
|
+
this.date = m(r == null ? void 0 : r.date) ? y(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";
|
|
2217
2495
|
}
|
|
2218
2496
|
}
|
|
2219
|
-
class
|
|
2497
|
+
class Lt {
|
|
2220
2498
|
/**
|
|
2221
2499
|
* Инициализирует экземпляр класса {@link AppBaseConfig}.
|
|
2222
2500
|
*
|
|
@@ -2256,17 +2534,17 @@ class _t {
|
|
|
2256
2534
|
*/
|
|
2257
2535
|
t(this, "dateFormats");
|
|
2258
2536
|
var e, s, i;
|
|
2259
|
-
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new
|
|
2537
|
+
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new st(r == null ? void 0 : r.http), this.deviceTypeByResolution = new tt(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new it({
|
|
2260
2538
|
environment: this.environment,
|
|
2261
2539
|
...r == null ? void 0 : r.sentry
|
|
2262
|
-
}), this.urls = r == null ? void 0 : r.urls, this.version = new
|
|
2540
|
+
}), this.urls = r == null ? void 0 : r.urls, this.version = new nt(r == null ? void 0 : r.version), this.dateFormats = {
|
|
2263
2541
|
api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
|
|
2264
2542
|
uiDate: ((s = r == null ? void 0 : r.dateFormats) == null ? void 0 : s.uiDate) ?? "dd.MM.yyyy",
|
|
2265
2543
|
uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
|
|
2266
2544
|
};
|
|
2267
2545
|
}
|
|
2268
2546
|
}
|
|
2269
|
-
class
|
|
2547
|
+
class kt extends h {
|
|
2270
2548
|
/**
|
|
2271
2549
|
* Возвращает данные о результатах поиска категорий и товаров.
|
|
2272
2550
|
*
|
|
@@ -2293,11 +2571,11 @@ class St extends h {
|
|
|
2293
2571
|
*/
|
|
2294
2572
|
// eslint-disable-next-line class-methods-use-this
|
|
2295
2573
|
getPriceExportLink(r = "csv", e = !1, s = void 0, i = void 0) {
|
|
2296
|
-
let c = `${
|
|
2574
|
+
let c = `${D.getConfig().http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
|
|
2297
2575
|
return s && (c += `&category_id=${s}`), i && (c += `&client_id=${i}`), c;
|
|
2298
2576
|
}
|
|
2299
2577
|
}
|
|
2300
|
-
class
|
|
2578
|
+
class dt extends h {
|
|
2301
2579
|
/**
|
|
2302
2580
|
* Импортирует цены клиента из CSV файла.
|
|
2303
2581
|
*
|
|
@@ -2496,7 +2774,7 @@ class Lt extends h {
|
|
|
2496
2774
|
return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
|
|
2497
2775
|
}
|
|
2498
2776
|
}
|
|
2499
|
-
class
|
|
2777
|
+
class xt extends h {
|
|
2500
2778
|
/**
|
|
2501
2779
|
* Возвращает список шаблонов прайс-листа привязанных к клиенту.
|
|
2502
2780
|
*
|
|
@@ -2508,7 +2786,7 @@ class It extends h {
|
|
|
2508
2786
|
return this.get(
|
|
2509
2787
|
`/internal/clients/${r}/price/templates`,
|
|
2510
2788
|
{},
|
|
2511
|
-
(e) => e.data.map((s) => new
|
|
2789
|
+
(e) => e.data.map((s) => new Z(s))
|
|
2512
2790
|
);
|
|
2513
2791
|
}
|
|
2514
2792
|
/**
|
|
@@ -2519,7 +2797,7 @@ class It extends h {
|
|
|
2519
2797
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_get_active
|
|
2520
2798
|
*/
|
|
2521
2799
|
getActiveTemplate(r) {
|
|
2522
|
-
return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new
|
|
2800
|
+
return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new Z(e.data));
|
|
2523
2801
|
}
|
|
2524
2802
|
/**
|
|
2525
2803
|
* Добавляет связь между клиентом и шаблоном прайс-листа.
|
|
@@ -2531,14 +2809,14 @@ class It extends h {
|
|
|
2531
2809
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_attach
|
|
2532
2810
|
*/
|
|
2533
2811
|
attachTemplate(r, e, s) {
|
|
2534
|
-
const i =
|
|
2812
|
+
const i = D.getConfig().dateFormats.api;
|
|
2535
2813
|
return this.post(
|
|
2536
2814
|
`/internal/clients/${r}/price/templates/${e}`,
|
|
2537
2815
|
s && {
|
|
2538
2816
|
startAt: s.startAt && z(s.startAt, i),
|
|
2539
2817
|
endAt: s.endAt && z(s.endAt, i)
|
|
2540
2818
|
},
|
|
2541
|
-
(o) => new
|
|
2819
|
+
(o) => new Z(o.data),
|
|
2542
2820
|
{},
|
|
2543
2821
|
!0
|
|
2544
2822
|
);
|
|
@@ -2565,14 +2843,14 @@ class It extends h {
|
|
|
2565
2843
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_change
|
|
2566
2844
|
*/
|
|
2567
2845
|
changeTemplate(r, e, s, i) {
|
|
2568
|
-
const o =
|
|
2846
|
+
const o = D.getConfig().dateFormats.api;
|
|
2569
2847
|
return this.patch(
|
|
2570
2848
|
`/internal/clients/${r}/price/templates/${e}/${s}`,
|
|
2571
2849
|
i && {
|
|
2572
2850
|
startAt: i.startAt && z(i.startAt, o),
|
|
2573
2851
|
endAt: i.endAt && z(i.endAt, o)
|
|
2574
2852
|
},
|
|
2575
|
-
(c) => new
|
|
2853
|
+
(c) => new Z(c.data)
|
|
2576
2854
|
);
|
|
2577
2855
|
}
|
|
2578
2856
|
/**
|
|
@@ -2588,7 +2866,7 @@ class It extends h {
|
|
|
2588
2866
|
return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
|
|
2589
2867
|
}
|
|
2590
2868
|
}
|
|
2591
|
-
class
|
|
2869
|
+
class Nt extends h {
|
|
2592
2870
|
/**
|
|
2593
2871
|
* Возвращает список данных о корневых категориях.
|
|
2594
2872
|
*
|
|
@@ -2602,7 +2880,7 @@ class xt extends h {
|
|
|
2602
2880
|
{
|
|
2603
2881
|
showHidden: r
|
|
2604
2882
|
},
|
|
2605
|
-
(e) => e.data.map((s) => new
|
|
2883
|
+
(e) => e.data.map((s) => new U(s))
|
|
2606
2884
|
);
|
|
2607
2885
|
}
|
|
2608
2886
|
/**
|
|
@@ -2621,7 +2899,7 @@ class xt extends h {
|
|
|
2621
2899
|
showHidden: e,
|
|
2622
2900
|
withNestedCategories: s
|
|
2623
2901
|
},
|
|
2624
|
-
(i) => new
|
|
2902
|
+
(i) => new U(i.data)
|
|
2625
2903
|
);
|
|
2626
2904
|
}
|
|
2627
2905
|
/**
|
|
@@ -2630,7 +2908,7 @@ class xt extends h {
|
|
|
2630
2908
|
* @param categoryID Идентификатор категории продуктов.
|
|
2631
2909
|
*/
|
|
2632
2910
|
getPublicCategoryData(r) {
|
|
2633
|
-
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new
|
|
2911
|
+
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new U(e.data));
|
|
2634
2912
|
}
|
|
2635
2913
|
/**
|
|
2636
2914
|
* Возвращает список продуктов категории.
|
|
@@ -2648,7 +2926,7 @@ class xt extends h {
|
|
|
2648
2926
|
showHidden: s,
|
|
2649
2927
|
withPriceCoefficients: e
|
|
2650
2928
|
},
|
|
2651
|
-
(i) =>
|
|
2929
|
+
(i) => pe(i.data, (o) => new _(o))
|
|
2652
2930
|
);
|
|
2653
2931
|
}
|
|
2654
2932
|
/**
|
|
@@ -2661,7 +2939,7 @@ class xt extends h {
|
|
|
2661
2939
|
getCategoryProductsCoefficients(r) {
|
|
2662
2940
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
2663
2941
|
const { data: s } = e;
|
|
2664
|
-
return vr(s, (i) => i.map((o) => new
|
|
2942
|
+
return vr(s, (i) => i.map((o) => new de(o))), s;
|
|
2665
2943
|
});
|
|
2666
2944
|
}
|
|
2667
2945
|
/**
|
|
@@ -2673,14 +2951,14 @@ class xt extends h {
|
|
|
2673
2951
|
publicSimpleSearch(r, e = 10) {
|
|
2674
2952
|
return new Promise((s, i) => {
|
|
2675
2953
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2676
|
-
s(o.categories.map((c) => new
|
|
2954
|
+
s(o.categories.map((c) => new U(c)));
|
|
2677
2955
|
}).catch((o) => {
|
|
2678
2956
|
i(o);
|
|
2679
2957
|
});
|
|
2680
2958
|
});
|
|
2681
2959
|
}
|
|
2682
2960
|
}
|
|
2683
|
-
class
|
|
2961
|
+
class Ot extends h {
|
|
2684
2962
|
/**
|
|
2685
2963
|
* Возвращает данные об указанном продукте.
|
|
2686
2964
|
*
|
|
@@ -2690,7 +2968,7 @@ class kt extends h {
|
|
|
2690
2968
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
|
|
2691
2969
|
*/
|
|
2692
2970
|
getProductData(r, e = !1) {
|
|
2693
|
-
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new
|
|
2971
|
+
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new _(s.data));
|
|
2694
2972
|
}
|
|
2695
2973
|
/**
|
|
2696
2974
|
* Возвращает публичные данные об указанном продукте.
|
|
@@ -2698,7 +2976,7 @@ class kt extends h {
|
|
|
2698
2976
|
* @param productId Идентификатор продукта.
|
|
2699
2977
|
*/
|
|
2700
2978
|
getPublicProductData(r) {
|
|
2701
|
-
return this.get(`/public/catalog/products/${r}`, {}, (e) => new
|
|
2979
|
+
return this.get(`/public/catalog/products/${r}`, {}, (e) => new _(e.data));
|
|
2702
2980
|
}
|
|
2703
2981
|
/**
|
|
2704
2982
|
* Возвращает данные о коэффициентах цен для указанного продукта.
|
|
@@ -2711,7 +2989,7 @@ class kt extends h {
|
|
|
2711
2989
|
return this.get(
|
|
2712
2990
|
`/internal/catalog/products/${r}/coefficients`,
|
|
2713
2991
|
{},
|
|
2714
|
-
(e) =>
|
|
2992
|
+
(e) => pe(e.data, (s) => new de(s))
|
|
2715
2993
|
);
|
|
2716
2994
|
}
|
|
2717
2995
|
/**
|
|
@@ -2724,7 +3002,7 @@ class kt extends h {
|
|
|
2724
3002
|
*/
|
|
2725
3003
|
getProductPriceHistory(r, e) {
|
|
2726
3004
|
const s = {};
|
|
2727
|
-
return
|
|
3005
|
+
return T(e) || (s.clientId = e), this.get(`/internal/price/products/${r}/history`, s, (i) => pe(i.data, (o) => new rt(o)));
|
|
2728
3006
|
}
|
|
2729
3007
|
/**
|
|
2730
3008
|
* Выполняет публичный поиск данных о продуктах по терму.
|
|
@@ -2735,14 +3013,14 @@ class kt extends h {
|
|
|
2735
3013
|
publicSimpleSearch(r, e = 10) {
|
|
2736
3014
|
return new Promise((s, i) => {
|
|
2737
3015
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2738
|
-
s(o.products.map((c) => new
|
|
3016
|
+
s(o.products.map((c) => new _(c)));
|
|
2739
3017
|
}).catch((o) => {
|
|
2740
3018
|
i(o);
|
|
2741
3019
|
});
|
|
2742
3020
|
});
|
|
2743
3021
|
}
|
|
2744
3022
|
}
|
|
2745
|
-
class
|
|
3023
|
+
class qt extends h {
|
|
2746
3024
|
/**
|
|
2747
3025
|
* Возвращает список данных о корневых категориях указанного клиента.
|
|
2748
3026
|
*
|
|
@@ -2800,11 +3078,11 @@ class dt extends h {
|
|
|
2800
3078
|
showHidden: i,
|
|
2801
3079
|
withPriceCoefficients: s
|
|
2802
3080
|
},
|
|
2803
|
-
(o) =>
|
|
3081
|
+
(o) => pe(o.data, (c) => new K(c))
|
|
2804
3082
|
);
|
|
2805
3083
|
}
|
|
2806
3084
|
}
|
|
2807
|
-
class
|
|
3085
|
+
class Ut extends h {
|
|
2808
3086
|
/**
|
|
2809
3087
|
* Возвращает данные об указанном продукте для указанного клиента.
|
|
2810
3088
|
*
|
|
@@ -2825,7 +3103,7 @@ class Nt extends h {
|
|
|
2825
3103
|
);
|
|
2826
3104
|
}
|
|
2827
3105
|
}
|
|
2828
|
-
var
|
|
3106
|
+
var qe = /* @__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))(qe || {});
|
|
2829
3107
|
class Fe {
|
|
2830
3108
|
/**
|
|
2831
3109
|
* Инициализирует экземпляр класса {@link FilterItem}.
|
|
@@ -2845,7 +3123,7 @@ class Fe {
|
|
|
2845
3123
|
* Значение с которым сравнивается поле.
|
|
2846
3124
|
*/
|
|
2847
3125
|
t(this, "value");
|
|
2848
|
-
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ??
|
|
3126
|
+
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? qe.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
|
|
2849
3127
|
}
|
|
2850
3128
|
/**
|
|
2851
3129
|
* Преобразует фильтр в примитивное представление для API.
|
|
@@ -2857,10 +3135,10 @@ class Fe {
|
|
|
2857
3135
|
field: this.field,
|
|
2858
3136
|
op: this.op
|
|
2859
3137
|
};
|
|
2860
|
-
return r.value = Pr(this.value) ? z(this.value,
|
|
3138
|
+
return r.value = Pr(this.value) ? z(this.value, D.getConfig().dateFormats.api) : this.value, r;
|
|
2861
3139
|
}
|
|
2862
3140
|
}
|
|
2863
|
-
class
|
|
3141
|
+
class ne {
|
|
2864
3142
|
/**
|
|
2865
3143
|
* Инициализирует экземпляр класса {@link FilterGroup}.
|
|
2866
3144
|
*
|
|
@@ -2880,7 +3158,7 @@ class ie {
|
|
|
2880
3158
|
*/
|
|
2881
3159
|
t(this, "groups");
|
|
2882
3160
|
var e, s;
|
|
2883
|
-
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 Fe(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new
|
|
3161
|
+
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 Fe(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new ne(i))) ?? [];
|
|
2884
3162
|
}
|
|
2885
3163
|
/**
|
|
2886
3164
|
* Преобразует группу фильтров в примитивное представление для API.
|
|
@@ -2890,12 +3168,12 @@ class ie {
|
|
|
2890
3168
|
toPrimitive() {
|
|
2891
3169
|
return {
|
|
2892
3170
|
groupOp: this.groupOp,
|
|
2893
|
-
filters: this.filters.map((r) => r instanceof Fe &&
|
|
2894
|
-
groups: this.groups.map((r) => r instanceof
|
|
3171
|
+
filters: this.filters.map((r) => r instanceof Fe && Ie(r.toPrimitive) ? r.toPrimitive() : r),
|
|
3172
|
+
groups: this.groups.map((r) => r instanceof ne ? r.toPrimitive() : r)
|
|
2895
3173
|
};
|
|
2896
3174
|
}
|
|
2897
3175
|
}
|
|
2898
|
-
class
|
|
3176
|
+
class ve extends h {
|
|
2899
3177
|
/**
|
|
2900
3178
|
* Получает пагинированный список данных.
|
|
2901
3179
|
*
|
|
@@ -2907,15 +3185,15 @@ class Pe extends h {
|
|
|
2907
3185
|
* @param successHandler Обработчик успешного выполнения запроса.
|
|
2908
3186
|
* @param disableDefaultNotificationErrorResponseHandler Признак отключения стандартного обработчика ошибок.
|
|
2909
3187
|
*/
|
|
2910
|
-
getPaginated(r, e, s, i, o, c,
|
|
2911
|
-
let
|
|
3188
|
+
getPaginated(r, e, s, i, o, c, p) {
|
|
3189
|
+
let u = {
|
|
2912
3190
|
page: (i == null ? void 0 : i.page) ?? 1,
|
|
2913
3191
|
perPage: (i == null ? void 0 : i.pageSize) ?? 10
|
|
2914
3192
|
};
|
|
2915
|
-
return e && (
|
|
3193
|
+
return e && (u.filters = JSON.stringify((e instanceof ne ? e : new ne(e)).toPrimitive())), Le(s) || (u.sort = Je(s) ? s : [s]), o && (u = { ...u, ...o }), this.get(r, u, c, p);
|
|
2916
3194
|
}
|
|
2917
3195
|
}
|
|
2918
|
-
class
|
|
3196
|
+
class Gt extends ve {
|
|
2919
3197
|
/**
|
|
2920
3198
|
* Возвращает список шаблонов прайс-листа.
|
|
2921
3199
|
*
|
|
@@ -2987,7 +3265,7 @@ class Ot extends Pe {
|
|
|
2987
3265
|
return this.get(
|
|
2988
3266
|
`/internal/price/templates/${r}/products`,
|
|
2989
3267
|
{},
|
|
2990
|
-
(e) => e.data.map((s) => new
|
|
3268
|
+
(e) => e.data.map((s) => new ae(s))
|
|
2991
3269
|
);
|
|
2992
3270
|
}
|
|
2993
3271
|
/**
|
|
@@ -2999,7 +3277,7 @@ class Ot extends Pe {
|
|
|
2999
3277
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get
|
|
3000
3278
|
*/
|
|
3001
3279
|
getProductTemplatePrice(r, e) {
|
|
3002
|
-
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new
|
|
3280
|
+
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new ae(s.data));
|
|
3003
3281
|
}
|
|
3004
3282
|
/**
|
|
3005
3283
|
* Сохраняет цену на продукт в шаблоне прайс-листа.
|
|
@@ -3018,7 +3296,7 @@ class Ot extends Pe {
|
|
|
3018
3296
|
price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
|
|
3019
3297
|
increase_percent: s.value
|
|
3020
3298
|
},
|
|
3021
|
-
(o) => new
|
|
3299
|
+
(o) => new ae(o.data)
|
|
3022
3300
|
);
|
|
3023
3301
|
}
|
|
3024
3302
|
/**
|
|
@@ -3043,7 +3321,7 @@ class Ot extends Pe {
|
|
|
3043
3321
|
return this.get(
|
|
3044
3322
|
`/internal/price/templates/${r}/categories`,
|
|
3045
3323
|
{},
|
|
3046
|
-
(e) => e.data.map((s) => new
|
|
3324
|
+
(e) => e.data.map((s) => new Ae(s))
|
|
3047
3325
|
);
|
|
3048
3326
|
}
|
|
3049
3327
|
/**
|
|
@@ -3058,7 +3336,7 @@ class Ot extends Pe {
|
|
|
3058
3336
|
return this.get(
|
|
3059
3337
|
`/internal/price/templates/${r}/categories/${e}`,
|
|
3060
3338
|
{},
|
|
3061
|
-
(s) => new
|
|
3339
|
+
(s) => new Ae(s.data)
|
|
3062
3340
|
);
|
|
3063
3341
|
}
|
|
3064
3342
|
/**
|
|
@@ -3084,7 +3362,7 @@ class Ot extends Pe {
|
|
|
3084
3362
|
},
|
|
3085
3363
|
params: i ? { recursively: !0 } : {}
|
|
3086
3364
|
},
|
|
3087
|
-
(c) => new
|
|
3365
|
+
(c) => new Ae(c.data)
|
|
3088
3366
|
);
|
|
3089
3367
|
}
|
|
3090
3368
|
/**
|
|
@@ -3115,18 +3393,18 @@ class Ot extends Pe {
|
|
|
3115
3393
|
return this.get(
|
|
3116
3394
|
`/internal/price/templates/${r}/clients`,
|
|
3117
3395
|
{},
|
|
3118
|
-
(e) => e.data.map((s) => new
|
|
3396
|
+
(e) => e.data.map((s) => new Z(s))
|
|
3119
3397
|
);
|
|
3120
3398
|
}
|
|
3121
3399
|
}
|
|
3122
|
-
class
|
|
3400
|
+
class Mt extends h {
|
|
3123
3401
|
/**
|
|
3124
3402
|
* Возвращает список ролей ценообразования.
|
|
3125
3403
|
*
|
|
3126
3404
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get_list
|
|
3127
3405
|
*/
|
|
3128
3406
|
getRoles() {
|
|
3129
|
-
return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new
|
|
3407
|
+
return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new re(e)));
|
|
3130
3408
|
}
|
|
3131
3409
|
/**
|
|
3132
3410
|
* Добавляет новую роль ценообразования.
|
|
@@ -3136,7 +3414,7 @@ class qt extends h {
|
|
|
3136
3414
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_create
|
|
3137
3415
|
*/
|
|
3138
3416
|
createRole(r) {
|
|
3139
|
-
return this.post("/internal/price/roles", r, (e) => new
|
|
3417
|
+
return this.post("/internal/price/roles", r, (e) => new re(e.data));
|
|
3140
3418
|
}
|
|
3141
3419
|
/**
|
|
3142
3420
|
* Возвращает данные роли ценообразования.
|
|
@@ -3146,7 +3424,7 @@ class qt extends h {
|
|
|
3146
3424
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get
|
|
3147
3425
|
*/
|
|
3148
3426
|
getRole(r) {
|
|
3149
|
-
return this.get(`/internal/price/roles/${r}`, {}, (e) => new
|
|
3427
|
+
return this.get(`/internal/price/roles/${r}`, {}, (e) => new re(e.data));
|
|
3150
3428
|
}
|
|
3151
3429
|
/**
|
|
3152
3430
|
* Обновляет данные роли ценообразования.
|
|
@@ -3157,7 +3435,7 @@ class qt extends h {
|
|
|
3157
3435
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_update
|
|
3158
3436
|
*/
|
|
3159
3437
|
updateRole(r, e) {
|
|
3160
|
-
return this.patch(`/internal/price/roles/${r}`, e, (s) => new
|
|
3438
|
+
return this.patch(`/internal/price/roles/${r}`, e, (s) => new re(s.data));
|
|
3161
3439
|
}
|
|
3162
3440
|
/**
|
|
3163
3441
|
* Удаляет роль ценообразования.
|
|
@@ -3199,7 +3477,7 @@ class qt extends h {
|
|
|
3199
3477
|
);
|
|
3200
3478
|
}
|
|
3201
3479
|
}
|
|
3202
|
-
class
|
|
3480
|
+
class Ft extends ve {
|
|
3203
3481
|
/**
|
|
3204
3482
|
* Возвращает пагинированный список свойств.
|
|
3205
3483
|
*
|
|
@@ -3212,7 +3490,7 @@ class Ut extends Pe {
|
|
|
3212
3490
|
getProperties(r, e, s) {
|
|
3213
3491
|
return this.getPaginated("/internal/catalog/properties", r, e, s, {}, (i) => {
|
|
3214
3492
|
const o = { ...i.data };
|
|
3215
|
-
return o.data = o.data.map((c) => new
|
|
3493
|
+
return o.data = o.data.map((c) => new ee(c)), o;
|
|
3216
3494
|
});
|
|
3217
3495
|
}
|
|
3218
3496
|
/**
|
|
@@ -3229,7 +3507,7 @@ class Ut extends Pe {
|
|
|
3229
3507
|
...s,
|
|
3230
3508
|
type: e
|
|
3231
3509
|
},
|
|
3232
|
-
(i) => new
|
|
3510
|
+
(i) => new ee(i.data)
|
|
3233
3511
|
);
|
|
3234
3512
|
}
|
|
3235
3513
|
/**
|
|
@@ -3239,7 +3517,7 @@ class Ut extends Pe {
|
|
|
3239
3517
|
* @see /doc/api/internal#/operations/api_internal_catalog_properties_get
|
|
3240
3518
|
*/
|
|
3241
3519
|
getProperty(r) {
|
|
3242
|
-
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new
|
|
3520
|
+
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new ee(e.data));
|
|
3243
3521
|
}
|
|
3244
3522
|
/**
|
|
3245
3523
|
* Обновляет существующее свойство.
|
|
@@ -3256,7 +3534,7 @@ class Ut extends Pe {
|
|
|
3256
3534
|
...i,
|
|
3257
3535
|
type: s
|
|
3258
3536
|
},
|
|
3259
|
-
(o) => new
|
|
3537
|
+
(o) => new ee(o.data)
|
|
3260
3538
|
);
|
|
3261
3539
|
}
|
|
3262
3540
|
/**
|
|
@@ -3571,7 +3849,7 @@ class Ut extends Pe {
|
|
|
3571
3849
|
return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
|
|
3572
3850
|
}
|
|
3573
3851
|
}
|
|
3574
|
-
class
|
|
3852
|
+
class Bt extends h {
|
|
3575
3853
|
/**
|
|
3576
3854
|
* Возвращает данные о рекомендациях указанной категории продуктов.
|
|
3577
3855
|
*
|
|
@@ -3634,8 +3912,8 @@ function Be(n, r, e) {
|
|
|
3634
3912
|
return !1;
|
|
3635
3913
|
}), s;
|
|
3636
3914
|
}
|
|
3637
|
-
var
|
|
3638
|
-
class
|
|
3915
|
+
var ot = /* @__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))(ot || {});
|
|
3916
|
+
class _e extends B {
|
|
3639
3917
|
/**
|
|
3640
3918
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
3641
3919
|
*
|
|
@@ -3666,7 +3944,7 @@ class be extends B {
|
|
|
3666
3944
|
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new ge(e.currency));
|
|
3667
3945
|
}
|
|
3668
3946
|
}
|
|
3669
|
-
class
|
|
3947
|
+
class Se extends $ {
|
|
3670
3948
|
/**
|
|
3671
3949
|
* Инициализирует экземпляр класса {@link Contact}.
|
|
3672
3950
|
*
|
|
@@ -3685,7 +3963,7 @@ class _e extends a {
|
|
|
3685
3963
|
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;
|
|
3686
3964
|
}
|
|
3687
3965
|
}
|
|
3688
|
-
class F extends
|
|
3966
|
+
class F extends Se {
|
|
3689
3967
|
/**
|
|
3690
3968
|
* Инициализирует экземпляр класса {@link ContactPerson}.
|
|
3691
3969
|
*
|
|
@@ -3717,10 +3995,10 @@ class F extends _e {
|
|
|
3717
3995
|
* Дата и время последнего удаления.
|
|
3718
3996
|
*/
|
|
3719
3997
|
t(this, "deletedAt");
|
|
3720
|
-
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 = m(e == null ? void 0 : e.deletedAt) ?
|
|
3998
|
+
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 = m(e == null ? void 0 : e.deletedAt) ? y(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
3721
3999
|
}
|
|
3722
4000
|
}
|
|
3723
|
-
class or extends
|
|
4001
|
+
class or extends $ {
|
|
3724
4002
|
/**
|
|
3725
4003
|
* Инициализирует экземпляр класса {@link ContragentBase}.
|
|
3726
4004
|
*
|
|
@@ -3732,7 +4010,7 @@ class or extends a {
|
|
|
3732
4010
|
/**
|
|
3733
4011
|
* Данные о менеджере.
|
|
3734
4012
|
*/
|
|
3735
|
-
t(this, "manager", new
|
|
4013
|
+
t(this, "manager", new te());
|
|
3736
4014
|
/**
|
|
3737
4015
|
* Данные об организационно-правовой форме.
|
|
3738
4016
|
*/
|
|
@@ -3740,7 +4018,7 @@ class or extends a {
|
|
|
3740
4018
|
/**
|
|
3741
4019
|
* Направление продаж.
|
|
3742
4020
|
*/
|
|
3743
|
-
t(this, "salesDirection", new
|
|
4021
|
+
t(this, "salesDirection", new I());
|
|
3744
4022
|
/**
|
|
3745
4023
|
* Группа партнеров (направление деятельности).
|
|
3746
4024
|
*/
|
|
@@ -3778,7 +4056,7 @@ class or extends a {
|
|
|
3778
4056
|
*/
|
|
3779
4057
|
t(this, "updater");
|
|
3780
4058
|
if (e) {
|
|
3781
|
-
if (this.opf = new M(e.opf), this.salesDirection = new
|
|
4059
|
+
if (this.opf = new M(e.opf), this.salesDirection = new I(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = m(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : e.createdAt, this.creator = e.creator ? new G(e.creator) : void 0, this.updatedAt = m(e == null ? void 0 : e.updatedAt) ? y(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new G(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new Y(e.partnerGroup)), e.manager && (this.manager = new te(e.manager)), e.contacts) {
|
|
3782
4060
|
const s = [];
|
|
3783
4061
|
e.contacts.forEach((i) => {
|
|
3784
4062
|
s.push(new F(i));
|
|
@@ -3787,13 +4065,13 @@ class or extends a {
|
|
|
3787
4065
|
if (e.bankAccounts) {
|
|
3788
4066
|
const s = [];
|
|
3789
4067
|
e.bankAccounts.forEach((i) => {
|
|
3790
|
-
s.push(new
|
|
4068
|
+
s.push(new _e(i));
|
|
3791
4069
|
}), this.bankAccounts = s;
|
|
3792
4070
|
}
|
|
3793
4071
|
}
|
|
3794
4072
|
}
|
|
3795
4073
|
}
|
|
3796
|
-
class
|
|
4074
|
+
class ct extends or {
|
|
3797
4075
|
/**
|
|
3798
4076
|
* Инициализирует экземпляр класса {@link ContragentPerson}.
|
|
3799
4077
|
*
|
|
@@ -3861,7 +4139,7 @@ class lr extends cr {
|
|
|
3861
4139
|
e && (this.kpp = e.kpp ?? "");
|
|
3862
4140
|
}
|
|
3863
4141
|
}
|
|
3864
|
-
class
|
|
4142
|
+
class lt extends lr {
|
|
3865
4143
|
/**
|
|
3866
4144
|
* Инициализирует экземпляр класса {@link ContragentUlNr}.
|
|
3867
4145
|
*
|
|
@@ -3892,14 +4170,14 @@ class me {
|
|
|
3892
4170
|
*/
|
|
3893
4171
|
static createInstance(r) {
|
|
3894
4172
|
switch (r.opf.slug) {
|
|
3895
|
-
case
|
|
4173
|
+
case b.Ic:
|
|
3896
4174
|
return new cr(r);
|
|
3897
|
-
case
|
|
4175
|
+
case b.UlR:
|
|
3898
4176
|
return new lr(r);
|
|
3899
|
-
case
|
|
3900
|
-
return new
|
|
4177
|
+
case b.UlNr:
|
|
4178
|
+
return new lt(r);
|
|
3901
4179
|
default:
|
|
3902
|
-
return new
|
|
4180
|
+
return new ct(r);
|
|
3903
4181
|
}
|
|
3904
4182
|
}
|
|
3905
4183
|
}
|
|
@@ -3918,7 +4196,7 @@ class De extends B {
|
|
|
3918
4196
|
this.isPrimary = e.isPrimary;
|
|
3919
4197
|
}
|
|
3920
4198
|
}
|
|
3921
|
-
class
|
|
4199
|
+
class pt extends F {
|
|
3922
4200
|
/**
|
|
3923
4201
|
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
3924
4202
|
*
|
|
@@ -3946,7 +4224,7 @@ class ct extends F {
|
|
|
3946
4224
|
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new De(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new De(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new De(s))));
|
|
3947
4225
|
}
|
|
3948
4226
|
}
|
|
3949
|
-
class fe extends
|
|
4227
|
+
class fe extends Fr {
|
|
3950
4228
|
/**
|
|
3951
4229
|
* Инициализирует экземпляр класса {@link DeliveryAddress}.
|
|
3952
4230
|
*
|
|
@@ -3986,7 +4264,7 @@ class fe extends Hr {
|
|
|
3986
4264
|
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new Xe(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new F(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;
|
|
3987
4265
|
}
|
|
3988
4266
|
}
|
|
3989
|
-
class He extends
|
|
4267
|
+
class He extends ce {
|
|
3990
4268
|
/**
|
|
3991
4269
|
* Инициализирует экземпляр класса {@link Client}.
|
|
3992
4270
|
*
|
|
@@ -4040,10 +4318,10 @@ class He extends oe {
|
|
|
4040
4318
|
* Дополнительные данные о клиенте.
|
|
4041
4319
|
*/
|
|
4042
4320
|
t(this, "extraData");
|
|
4043
|
-
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((
|
|
4321
|
+
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((p) => me.createInstance(p))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((p) => new Y(p))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((p) => new F(p))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((p) => new fe(p))) ?? [], this.channelPrimaryInterest = new sr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new nr(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new J(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.isExcludedFromMsCallsToClients = (e == null ? void 0 : e.isExcludedFromMsCallsToClients) ?? !1, this.preferredWarehouse = e != null && e.preferredWarehouse ? new we(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
|
|
4044
4322
|
}
|
|
4045
4323
|
}
|
|
4046
|
-
class
|
|
4324
|
+
class Ht {
|
|
4047
4325
|
/**
|
|
4048
4326
|
* Инициализирует экземпляр класса {@link ClientsListFilters}.
|
|
4049
4327
|
*
|
|
@@ -4093,11 +4371,11 @@ class Mt {
|
|
|
4093
4371
|
/**
|
|
4094
4372
|
* Период регистрации.
|
|
4095
4373
|
*/
|
|
4096
|
-
t(this, "createdAt", new
|
|
4374
|
+
t(this, "createdAt", new O());
|
|
4097
4375
|
/**
|
|
4098
4376
|
* Период последнего входа.
|
|
4099
4377
|
*/
|
|
4100
|
-
t(this, "lastLoginDate", new
|
|
4378
|
+
t(this, "lastLoginDate", new O());
|
|
4101
4379
|
/**
|
|
4102
4380
|
* Признак того, что в указанный период последнего входа, клиентом был сделан заказ.
|
|
4103
4381
|
*/
|
|
@@ -4138,11 +4416,11 @@ class Mt {
|
|
|
4138
4416
|
* Данные о параметрах поиска последнего заказа который сделал пользователь.
|
|
4139
4417
|
*/
|
|
4140
4418
|
t(this, "lastOrder");
|
|
4141
|
-
var e, s, i, o, c,
|
|
4142
|
-
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.cities = (e = r == null ? void 0 : r.cities) == null ? void 0 : e.map((
|
|
4143
|
-
createdAt: new
|
|
4419
|
+
var e, s, i, o, c, p;
|
|
4420
|
+
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.cities = (e = r == null ? void 0 : r.cities) == null ? void 0 : e.map((u) => new Oe(u)), this.region = new se(r == null ? void 0 : r.region), this.country = new Q(r == null ? void 0 : r.country), this.phone = r == null ? void 0 : r.phone, this.email = r == null ? void 0 : r.email, this.isActive = r && Object.prototype.hasOwnProperty.call(r, "isActive") ? r == null ? void 0 : r.isActive : !0, this.createdAt = new O(r == null ? void 0 : r.createdAt), this.lastLoginDate = new O(r == null ? void 0 : r.lastLoginDate), this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = r != null && r.managers && r.managers.length > 0 ? r.managers.map((u) => new Ce(u)) : [], this.salesDirections = (s = r == null ? void 0 : r.salesDirections) == null ? void 0 : s.map((u) => new I(u)), this.contragentInn = r == null ? void 0 : r.contragentInn, this.contragentType = new M(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new J(r == null ? void 0 : r.preferredDeliveryType), this.partnerGroups = (i = r == null ? void 0 : r.partnerGroups) == null ? void 0 : i.map((u) => new Y(u)), this.contact = new Se(r == null ? void 0 : r.contact), this.lastOrder = {
|
|
4421
|
+
createdAt: new O((o = r == null ? void 0 : r.lastOrder) == null ? void 0 : o.createdAt),
|
|
4144
4422
|
creator: (c = r == null ? void 0 : r.lastOrder) == null ? void 0 : c.creator,
|
|
4145
|
-
isApproved: (
|
|
4423
|
+
isApproved: (p = r == null ? void 0 : r.lastOrder) == null ? void 0 : p.isApproved
|
|
4146
4424
|
};
|
|
4147
4425
|
}
|
|
4148
4426
|
/**
|
|
@@ -4165,7 +4443,7 @@ class Mt {
|
|
|
4165
4443
|
this.cities = [];
|
|
4166
4444
|
break;
|
|
4167
4445
|
case "region":
|
|
4168
|
-
this.region = new
|
|
4446
|
+
this.region = new se();
|
|
4169
4447
|
break;
|
|
4170
4448
|
case "isActive":
|
|
4171
4449
|
this.isActive = !0;
|
|
@@ -4198,7 +4476,7 @@ class Mt {
|
|
|
4198
4476
|
this.partnerGroups = [];
|
|
4199
4477
|
break;
|
|
4200
4478
|
case "contact":
|
|
4201
|
-
this.contact = new
|
|
4479
|
+
this.contact = new Se();
|
|
4202
4480
|
break;
|
|
4203
4481
|
}
|
|
4204
4482
|
return this;
|
|
@@ -4211,13 +4489,13 @@ class Mt {
|
|
|
4211
4489
|
var e, s, i, o;
|
|
4212
4490
|
const r = {};
|
|
4213
4491
|
return Object.keys(this).forEach((c) => {
|
|
4214
|
-
const
|
|
4492
|
+
const p = this[c];
|
|
4215
4493
|
// eslint-disable-next-line prettier/prettier
|
|
4216
|
-
|
|
4494
|
+
T(p) || m(p) && p.trim().length === 0 || Ie(p.isNewRec) && p.isNewRec() || (r[c] = p);
|
|
4217
4495
|
}), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((s = r == null ? void 0 : r.createdAt) != null && s.to) && delete r.createdAt, !((i = r == null ? void 0 : r.lastLoginDate) != null && i.from) && !((o = r == null ? void 0 : r.lastLoginDate) != null && o.to) && delete r.lastLoginDate, r;
|
|
4218
4496
|
}
|
|
4219
4497
|
}
|
|
4220
|
-
class
|
|
4498
|
+
class pr extends B {
|
|
4221
4499
|
/**
|
|
4222
4500
|
* Инициализирует экземпляр класса {@link OrderShortInfo}.
|
|
4223
4501
|
*
|
|
@@ -4237,10 +4515,10 @@ class ur extends B {
|
|
|
4237
4515
|
* Признак того, что заказ подтвержден в 1С.
|
|
4238
4516
|
*/
|
|
4239
4517
|
t(this, "isApproved1c");
|
|
4240
|
-
this.createdAt = m(e == null ? void 0 : e.createdAt) ?
|
|
4518
|
+
this.createdAt = m(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new G(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
|
|
4241
4519
|
}
|
|
4242
4520
|
}
|
|
4243
|
-
class
|
|
4521
|
+
class ut extends $ {
|
|
4244
4522
|
/**
|
|
4245
4523
|
* Инициализирует экземпляр класса {@link ClientAdditionalData}.
|
|
4246
4524
|
*
|
|
@@ -4273,10 +4551,10 @@ class lt extends a {
|
|
|
4273
4551
|
* Список менеджеров.
|
|
4274
4552
|
*/
|
|
4275
4553
|
t(this, "managers");
|
|
4276
|
-
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new F(o))), e.lastOrder && (this.lastOrder = new
|
|
4554
|
+
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new F(o))), e.lastOrder && (this.lastOrder = new pr(e.lastOrder)), (i = e.partnerGroups) != null && i.length && (this.partnerGroups = e.partnerGroups.map((o) => new Y(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new J(e.preferredDeliveryType)), e.salesDirection && (this.salesDirection = new I(e.salesDirection)), e.managers && (this.managers = e.managers.map((o) => new te(o)));
|
|
4277
4555
|
}
|
|
4278
4556
|
}
|
|
4279
|
-
class
|
|
4557
|
+
class ht {
|
|
4280
4558
|
/**
|
|
4281
4559
|
* Инициализирует экземпляр класса {@link DataTablePaginationRequestParams}.
|
|
4282
4560
|
*
|
|
@@ -4294,7 +4572,7 @@ class ut {
|
|
|
4294
4572
|
this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
|
|
4295
4573
|
}
|
|
4296
4574
|
}
|
|
4297
|
-
class
|
|
4575
|
+
class zt extends ht {
|
|
4298
4576
|
/**
|
|
4299
4577
|
* Инициализирует экземпляр класса {@link DataTablePagination}.
|
|
4300
4578
|
*
|
|
@@ -4325,7 +4603,7 @@ class Ft extends ut {
|
|
|
4325
4603
|
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;
|
|
4326
4604
|
}
|
|
4327
4605
|
}
|
|
4328
|
-
class
|
|
4606
|
+
class jt {
|
|
4329
4607
|
/**
|
|
4330
4608
|
* Инициализирует экземпляр класса {@link ISortRequestParams}.
|
|
4331
4609
|
*
|
|
@@ -4343,7 +4621,7 @@ class Bt {
|
|
|
4343
4621
|
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
4344
4622
|
}
|
|
4345
4623
|
}
|
|
4346
|
-
class
|
|
4624
|
+
class Wt extends ve {
|
|
4347
4625
|
/**
|
|
4348
4626
|
* Возвращает данные об указанном клиенте.
|
|
4349
4627
|
*
|
|
@@ -4366,7 +4644,7 @@ class Ht extends Pe {
|
|
|
4366
4644
|
getClientsList(r, e, s, i) {
|
|
4367
4645
|
return this.getPaginated("/internal/clients", r, e, s, i, (o) => {
|
|
4368
4646
|
const c = { ...o.data };
|
|
4369
|
-
return c.data = c.data.map((
|
|
4647
|
+
return c.data = c.data.map((p) => new ce(p)), c;
|
|
4370
4648
|
});
|
|
4371
4649
|
}
|
|
4372
4650
|
/**
|
|
@@ -4379,7 +4657,7 @@ class Ht extends Pe {
|
|
|
4379
4657
|
return this.getClientsList({
|
|
4380
4658
|
groupOp: "and",
|
|
4381
4659
|
groups: [],
|
|
4382
|
-
filters: [{ field: "phone", op:
|
|
4660
|
+
filters: [{ field: "phone", op: qe.Contains, value: r }]
|
|
4383
4661
|
});
|
|
4384
4662
|
}
|
|
4385
4663
|
/**
|
|
@@ -4393,7 +4671,7 @@ class Ht extends Pe {
|
|
|
4393
4671
|
const s = r.map((i) => i.id);
|
|
4394
4672
|
return this.post("/internal/clients/additional-data", { clients: s, requested_data_types: e }, (i) => {
|
|
4395
4673
|
let o = [];
|
|
4396
|
-
return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new
|
|
4674
|
+
return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new ut(c))), o;
|
|
4397
4675
|
});
|
|
4398
4676
|
}
|
|
4399
4677
|
/**
|
|
@@ -4405,7 +4683,7 @@ class Ht extends Pe {
|
|
|
4405
4683
|
getAllClientContacts(r) {
|
|
4406
4684
|
return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
|
|
4407
4685
|
let s = [];
|
|
4408
|
-
return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new
|
|
4686
|
+
return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new pt(i))), s;
|
|
4409
4687
|
});
|
|
4410
4688
|
}
|
|
4411
4689
|
/**
|
|
@@ -4545,16 +4823,16 @@ class Ht extends Pe {
|
|
|
4545
4823
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
|
|
4546
4824
|
*/
|
|
4547
4825
|
createContragentClientData(r, e, s = {}) {
|
|
4548
|
-
var
|
|
4826
|
+
var u, R, a, L, k, d, x, N;
|
|
4549
4827
|
let i;
|
|
4550
|
-
const o = e, c = e,
|
|
4828
|
+
const o = e, c = e, p = e;
|
|
4551
4829
|
switch (e.opf.slug) {
|
|
4552
|
-
case
|
|
4830
|
+
case b.Ic:
|
|
4553
4831
|
i = {
|
|
4554
4832
|
opf: o.opf.slug,
|
|
4555
4833
|
name: o.name,
|
|
4556
4834
|
alternative_name: o.alternativeName,
|
|
4557
|
-
partner_group_id: (
|
|
4835
|
+
partner_group_id: (u = o.partnerGroup) == null ? void 0 : u.id,
|
|
4558
4836
|
manager_id: (R = o.manager) == null ? void 0 : R.id,
|
|
4559
4837
|
comment: o.comment,
|
|
4560
4838
|
inn: o.inn,
|
|
@@ -4567,12 +4845,12 @@ class Ht extends Pe {
|
|
|
4567
4845
|
actual_address: o.actualAddress
|
|
4568
4846
|
};
|
|
4569
4847
|
break;
|
|
4570
|
-
case
|
|
4848
|
+
case b.UlR:
|
|
4571
4849
|
i = {
|
|
4572
4850
|
opf: c.opf.slug,
|
|
4573
4851
|
name: c.name,
|
|
4574
4852
|
alternative_name: c.alternativeName,
|
|
4575
|
-
partner_group_id: (
|
|
4853
|
+
partner_group_id: (a = c.partnerGroup) == null ? void 0 : a.id,
|
|
4576
4854
|
manager_id: (L = c.manager) == null ? void 0 : L.id,
|
|
4577
4855
|
comment: c.comment,
|
|
4578
4856
|
inn: c.inn,
|
|
@@ -4586,23 +4864,23 @@ class Ht extends Pe {
|
|
|
4586
4864
|
actual_address: c.actualAddress
|
|
4587
4865
|
};
|
|
4588
4866
|
break;
|
|
4589
|
-
case
|
|
4867
|
+
case b.UlNr:
|
|
4590
4868
|
i = {
|
|
4591
|
-
opf:
|
|
4592
|
-
name:
|
|
4593
|
-
alternative_name:
|
|
4594
|
-
partner_group_id: (
|
|
4595
|
-
manager_id: (
|
|
4596
|
-
comment:
|
|
4597
|
-
director_name:
|
|
4598
|
-
director_position:
|
|
4599
|
-
director_acts_on:
|
|
4600
|
-
legal_address:
|
|
4601
|
-
postal_address:
|
|
4602
|
-
actual_address:
|
|
4603
|
-
registration_country_id:
|
|
4604
|
-
registration_number:
|
|
4605
|
-
tax_number:
|
|
4869
|
+
opf: p.opf.slug,
|
|
4870
|
+
name: p.name,
|
|
4871
|
+
alternative_name: p.alternativeName,
|
|
4872
|
+
partner_group_id: (k = p.partnerGroup) == null ? void 0 : k.id,
|
|
4873
|
+
manager_id: (d = p.manager) == null ? void 0 : d.id,
|
|
4874
|
+
comment: p.comment,
|
|
4875
|
+
director_name: p.directorName,
|
|
4876
|
+
director_position: p.directorPosition,
|
|
4877
|
+
director_acts_on: p.directorActsOn,
|
|
4878
|
+
legal_address: p.legalAddress,
|
|
4879
|
+
postal_address: p.postalAddress,
|
|
4880
|
+
actual_address: p.actualAddress,
|
|
4881
|
+
registration_country_id: p.registrationCountry.id,
|
|
4882
|
+
registration_number: p.registrationNumber,
|
|
4883
|
+
tax_number: p.taxNumber || void 0
|
|
4606
4884
|
};
|
|
4607
4885
|
break;
|
|
4608
4886
|
default:
|
|
@@ -4610,8 +4888,8 @@ class Ht extends Pe {
|
|
|
4610
4888
|
opf: e.opf.slug,
|
|
4611
4889
|
name: e.name,
|
|
4612
4890
|
alternative_name: e.alternativeName,
|
|
4613
|
-
partner_group_id: (
|
|
4614
|
-
manager_id: (
|
|
4891
|
+
partner_group_id: (x = e.partnerGroup) == null ? void 0 : x.id,
|
|
4892
|
+
manager_id: (N = e.manager) == null ? void 0 : N.id,
|
|
4615
4893
|
comment: e.comment
|
|
4616
4894
|
};
|
|
4617
4895
|
break;
|
|
@@ -4619,7 +4897,7 @@ class Ht extends Pe {
|
|
|
4619
4897
|
return this.post(
|
|
4620
4898
|
`/internal/clients/${r}/contragents`,
|
|
4621
4899
|
i,
|
|
4622
|
-
(
|
|
4900
|
+
(q) => me.createInstance(q.data),
|
|
4623
4901
|
s
|
|
4624
4902
|
);
|
|
4625
4903
|
}
|
|
@@ -4634,16 +4912,16 @@ class Ht extends Pe {
|
|
|
4634
4912
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
|
|
4635
4913
|
*/
|
|
4636
4914
|
updateContragentClientData(r, e, s = {}) {
|
|
4637
|
-
var
|
|
4915
|
+
var u, R, a, L, k, d, x, N;
|
|
4638
4916
|
let i;
|
|
4639
|
-
const o = e, c = e,
|
|
4917
|
+
const o = e, c = e, p = e;
|
|
4640
4918
|
switch (e.opf.slug) {
|
|
4641
|
-
case
|
|
4919
|
+
case b.Ic:
|
|
4642
4920
|
i = {
|
|
4643
4921
|
opf: o.opf.slug,
|
|
4644
4922
|
name: o.name,
|
|
4645
4923
|
alternative_name: o.alternativeName,
|
|
4646
|
-
partner_group_id: (
|
|
4924
|
+
partner_group_id: (u = o.partnerGroup) == null ? void 0 : u.id,
|
|
4647
4925
|
manager_id: (R = o.manager) == null ? void 0 : R.id,
|
|
4648
4926
|
comment: o.comment,
|
|
4649
4927
|
inn: o.inn,
|
|
@@ -4656,12 +4934,12 @@ class Ht extends Pe {
|
|
|
4656
4934
|
actual_address: o.actualAddress
|
|
4657
4935
|
};
|
|
4658
4936
|
break;
|
|
4659
|
-
case
|
|
4937
|
+
case b.UlR:
|
|
4660
4938
|
i = {
|
|
4661
4939
|
opf: c.opf.slug,
|
|
4662
4940
|
name: c.name,
|
|
4663
4941
|
alternative_name: c.alternativeName,
|
|
4664
|
-
partner_group_id: (
|
|
4942
|
+
partner_group_id: (a = c.partnerGroup) == null ? void 0 : a.id,
|
|
4665
4943
|
manager_id: (L = c.manager) == null ? void 0 : L.id,
|
|
4666
4944
|
comment: c.comment,
|
|
4667
4945
|
inn: c.inn,
|
|
@@ -4675,23 +4953,23 @@ class Ht extends Pe {
|
|
|
4675
4953
|
actual_address: c.actualAddress
|
|
4676
4954
|
};
|
|
4677
4955
|
break;
|
|
4678
|
-
case
|
|
4956
|
+
case b.UlNr:
|
|
4679
4957
|
i = {
|
|
4680
|
-
opf:
|
|
4681
|
-
name:
|
|
4682
|
-
alternative_name:
|
|
4683
|
-
partner_group_id: (
|
|
4684
|
-
manager_id: (
|
|
4685
|
-
comment:
|
|
4686
|
-
director_name:
|
|
4687
|
-
director_position:
|
|
4688
|
-
director_acts_on:
|
|
4689
|
-
legal_address:
|
|
4690
|
-
postal_address:
|
|
4691
|
-
actual_address:
|
|
4692
|
-
registration_country_id:
|
|
4693
|
-
registration_number:
|
|
4694
|
-
tax_number:
|
|
4958
|
+
opf: p.opf.slug,
|
|
4959
|
+
name: p.name,
|
|
4960
|
+
alternative_name: p.alternativeName,
|
|
4961
|
+
partner_group_id: (k = p.partnerGroup) == null ? void 0 : k.id,
|
|
4962
|
+
manager_id: (d = p.manager) == null ? void 0 : d.id,
|
|
4963
|
+
comment: p.comment,
|
|
4964
|
+
director_name: p.directorName,
|
|
4965
|
+
director_position: p.directorPosition,
|
|
4966
|
+
director_acts_on: p.directorActsOn,
|
|
4967
|
+
legal_address: p.legalAddress,
|
|
4968
|
+
postal_address: p.postalAddress,
|
|
4969
|
+
actual_address: p.actualAddress,
|
|
4970
|
+
registration_country_id: p.registrationCountry.id,
|
|
4971
|
+
registration_number: p.registrationNumber,
|
|
4972
|
+
tax_number: p.taxNumber || void 0
|
|
4695
4973
|
};
|
|
4696
4974
|
break;
|
|
4697
4975
|
default:
|
|
@@ -4699,8 +4977,8 @@ class Ht extends Pe {
|
|
|
4699
4977
|
opf: e.opf.slug,
|
|
4700
4978
|
name: e.name,
|
|
4701
4979
|
alternative_name: e.alternativeName,
|
|
4702
|
-
partner_group_id: (
|
|
4703
|
-
manager_id: (
|
|
4980
|
+
partner_group_id: (x = e.partnerGroup) == null ? void 0 : x.id,
|
|
4981
|
+
manager_id: (N = e.manager) == null ? void 0 : N.id,
|
|
4704
4982
|
comment: e.comment
|
|
4705
4983
|
};
|
|
4706
4984
|
break;
|
|
@@ -4708,7 +4986,7 @@ class Ht extends Pe {
|
|
|
4708
4986
|
return this.patch(
|
|
4709
4987
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
4710
4988
|
i,
|
|
4711
|
-
(
|
|
4989
|
+
(q) => me.createInstance(q.data),
|
|
4712
4990
|
s
|
|
4713
4991
|
);
|
|
4714
4992
|
}
|
|
@@ -4746,7 +5024,7 @@ class Ht extends Pe {
|
|
|
4746
5024
|
}), e.operatingHours && (i.operating_hours = {
|
|
4747
5025
|
from: e.operatingHours.from,
|
|
4748
5026
|
to: e.operatingHours.to
|
|
4749
|
-
}), this.post(`/internal/clients/${r}/delivery-addresses`, i, (
|
|
5027
|
+
}), this.post(`/internal/clients/${r}/delivery-addresses`, i, (p) => new fe(p.data), s);
|
|
4750
5028
|
}
|
|
4751
5029
|
/**
|
|
4752
5030
|
* Обновляет данные об адресе доставки клиента.
|
|
@@ -4775,7 +5053,7 @@ class Ht extends Pe {
|
|
|
4775
5053
|
}), this.patch(
|
|
4776
5054
|
`/internal/clients/${r}/delivery-addresses/${e.id}`,
|
|
4777
5055
|
i,
|
|
4778
|
-
(
|
|
5056
|
+
(p) => new fe(p.data),
|
|
4779
5057
|
s
|
|
4780
5058
|
);
|
|
4781
5059
|
}
|
|
@@ -4811,7 +5089,7 @@ class Ht extends Pe {
|
|
|
4811
5089
|
correspondent_account: s.correspondentAccount,
|
|
4812
5090
|
currency_id: s.currency.id
|
|
4813
5091
|
},
|
|
4814
|
-
(o) => new
|
|
5092
|
+
(o) => new _e(o.data),
|
|
4815
5093
|
i
|
|
4816
5094
|
);
|
|
4817
5095
|
}
|
|
@@ -4837,7 +5115,7 @@ class Ht extends Pe {
|
|
|
4837
5115
|
correspondent_account: s.correspondentAccount,
|
|
4838
5116
|
currency_id: s.currency.id
|
|
4839
5117
|
},
|
|
4840
|
-
(o) => new
|
|
5118
|
+
(o) => new _e(o.data),
|
|
4841
5119
|
i
|
|
4842
5120
|
);
|
|
4843
5121
|
}
|
|
@@ -5034,14 +5312,14 @@ class Ht extends Pe {
|
|
|
5034
5312
|
* в случае ошибок в запросах.
|
|
5035
5313
|
*/
|
|
5036
5314
|
createContact(r, e, s, i = {}) {
|
|
5037
|
-
var c,
|
|
5315
|
+
var c, p;
|
|
5038
5316
|
const o = {
|
|
5039
5317
|
name: e.name,
|
|
5040
5318
|
position: e.position,
|
|
5041
5319
|
comment: e.comment,
|
|
5042
5320
|
...s
|
|
5043
5321
|
};
|
|
5044
|
-
return (c = e.phone) != null && c.length && (o.phone = e.phone), (
|
|
5322
|
+
return (c = e.phone) != null && c.length && (o.phone = e.phone), (p = e.email) != null && p.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (u) => new F(u.data), i);
|
|
5045
5323
|
}
|
|
5046
5324
|
/**
|
|
5047
5325
|
* Устанавливает признак основного контактного лица.
|
|
@@ -5070,7 +5348,7 @@ class Ht extends Pe {
|
|
|
5070
5348
|
return this.get(`/internal/clients/${r.id}/verification/email?email=${r.email}`);
|
|
5071
5349
|
}
|
|
5072
5350
|
}
|
|
5073
|
-
class
|
|
5351
|
+
class Vt extends h {
|
|
5074
5352
|
/**
|
|
5075
5353
|
* Выполняет проверку занят ли указанный номер телефона.
|
|
5076
5354
|
*
|
|
@@ -5084,7 +5362,7 @@ class zt extends h {
|
|
|
5084
5362
|
});
|
|
5085
5363
|
}
|
|
5086
5364
|
}
|
|
5087
|
-
class
|
|
5365
|
+
class Et extends h {
|
|
5088
5366
|
/**
|
|
5089
5367
|
* Возвращает настройки указанного конфигуратора для указанной категории.
|
|
5090
5368
|
*
|
|
@@ -5112,7 +5390,7 @@ class jt extends h {
|
|
|
5112
5390
|
const i = this.get(
|
|
5113
5391
|
`internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.editor}/product`,
|
|
5114
5392
|
{ params: e },
|
|
5115
|
-
(c) => new
|
|
5393
|
+
(c) => new _(c.data)
|
|
5116
5394
|
);
|
|
5117
5395
|
return i.catch((c) => {
|
|
5118
5396
|
this.errorResponseHandler(c, s);
|
|
@@ -5155,16 +5433,16 @@ class jt extends h {
|
|
|
5155
5433
|
return this.delete(`internal/catalog/categories/${r.id}/configurators/${(s = r.properties) == null ? void 0 : s.editor}/template/${e}`);
|
|
5156
5434
|
}
|
|
5157
5435
|
}
|
|
5158
|
-
class
|
|
5436
|
+
class Jt {
|
|
5159
5437
|
/**
|
|
5160
5438
|
* Возвращает диапазон дат по умолчанию.
|
|
5161
5439
|
*/
|
|
5162
5440
|
static defaultDateRanges() {
|
|
5163
|
-
const r =
|
|
5441
|
+
const r = $r(/* @__PURE__ */ new Date(), 1);
|
|
5164
5442
|
return {
|
|
5165
5443
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
5166
|
-
nextWorkingDay: { label: "Следующий рабочий день", from:
|
|
5167
|
-
today: { label: "Сегодня", from: Ke(), to:
|
|
5444
|
+
nextWorkingDay: { label: "Следующий рабочий день", from: kr(r), to: Lr(r) },
|
|
5445
|
+
today: { label: "Сегодня", from: Ke(), to: Ir() },
|
|
5168
5446
|
yesterday: { label: "Вчера", from: Sr(), to: _r() },
|
|
5169
5447
|
tomorrow: { label: "Завтра", from: br(), to: Tr() }
|
|
5170
5448
|
};
|
|
@@ -5211,12 +5489,12 @@ const E = class E {
|
|
|
5211
5489
|
*/
|
|
5212
5490
|
t(E, "linearValues", ["пог.м.", "м.", "м2"]);
|
|
5213
5491
|
let ze = E;
|
|
5214
|
-
class
|
|
5492
|
+
class Kt {
|
|
5215
5493
|
/**
|
|
5216
5494
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
5217
5495
|
*/
|
|
5218
5496
|
static generateUndefinedManagerInstance() {
|
|
5219
|
-
return new
|
|
5497
|
+
return new Ce({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
|
|
5220
5498
|
}
|
|
5221
5499
|
/**
|
|
5222
5500
|
* Выполняет проверку, является ли указанная запись записью-заглушкой с данными о неопределённом менеджере.
|
|
@@ -5227,26 +5505,14 @@ class Vt {
|
|
|
5227
5505
|
return r.id === 0 && r.guid === "-undefined-";
|
|
5228
5506
|
}
|
|
5229
5507
|
}
|
|
5230
|
-
class
|
|
5231
|
-
/**
|
|
5232
|
-
* Возвращает {@link Promise} для получения справочника списка менеджеров.
|
|
5233
|
-
*/
|
|
5234
|
-
async getManagers() {
|
|
5235
|
-
const r = "/internal/managers", e = se.getCachedResponse(r);
|
|
5236
|
-
if (e)
|
|
5237
|
-
return e;
|
|
5238
|
-
const i = (await this.get(r)).data.map((o) => ke.instanceInitializer(ve, o));
|
|
5239
|
-
return this.cacheResponse(r, i), i;
|
|
5240
|
-
}
|
|
5241
|
-
}
|
|
5242
|
-
class pr extends ur {
|
|
5508
|
+
class ur extends pr {
|
|
5243
5509
|
/**
|
|
5244
5510
|
* Инициализирует экземпляр класса {@link OrderInfo}.
|
|
5245
5511
|
*
|
|
5246
5512
|
* @param data Данные для первоначальной инициализации.
|
|
5247
5513
|
*/
|
|
5248
5514
|
constructor(e) {
|
|
5249
|
-
var s, i, o, c,
|
|
5515
|
+
var s, i, o, c, p, u, R, a;
|
|
5250
5516
|
super(e);
|
|
5251
5517
|
/**
|
|
5252
5518
|
* Краткие данные о клиенте.
|
|
@@ -5288,19 +5554,19 @@ class pr extends ur {
|
|
|
5288
5554
|
* Признак того, что заказ создан из товаров, которые имеют признак "Нет в наличии".
|
|
5289
5555
|
*/
|
|
5290
5556
|
t(this, "isNotInStock");
|
|
5291
|
-
this.client = new
|
|
5557
|
+
this.client = new ce(e == null ? void 0 : e.client), this.payment = {
|
|
5292
5558
|
type: ((s = e == null ? void 0 : e.payment) == null ? void 0 : s.type) ?? -1,
|
|
5293
5559
|
status: ((i = e == null ? void 0 : e.payment) == null ? void 0 : i.status) ?? -1,
|
|
5294
5560
|
onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
|
|
5295
5561
|
}, this.delivery = {
|
|
5296
5562
|
type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
|
|
5297
|
-
date: m((
|
|
5563
|
+
date: m((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ? y(e.delivery.date) : ((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ?? /* @__PURE__ */ new Date(),
|
|
5298
5564
|
address: (R = e == null ? void 0 : e.delivery) != null && R.address ? new fe(e.delivery.address) : void 0,
|
|
5299
|
-
warehouse: (
|
|
5300
|
-
}, this.attachedUser = new G(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new
|
|
5565
|
+
warehouse: (a = e == null ? void 0 : e.delivery) != null && a.warehouse ? new we(e.delivery.warehouse) : void 0
|
|
5566
|
+
}, this.attachedUser = new G(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new I(e == null ? void 0 : e.salesDirection), this.pendingAt = m(e == null ? void 0 : e.pendingAt) ? y(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = m(e == null ? void 0 : e.processedAt) ? y(e.processedAt) : e == null ? void 0 : e.processedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1;
|
|
5301
5567
|
}
|
|
5302
5568
|
}
|
|
5303
|
-
class
|
|
5569
|
+
class gt extends B {
|
|
5304
5570
|
/**
|
|
5305
5571
|
* Инициализирует экземпляр класса {@link OrderProduct}.
|
|
5306
5572
|
*
|
|
@@ -5383,7 +5649,7 @@ class ht extends B {
|
|
|
5383
5649
|
this.product = new K(e.product), this.quantity = e.quantity, this.currency = e.currency, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.cost = e.cost, this.costRub = e.costRub, this.marker = e.marker, this.height = e.height, this.length = e.length, this.width = e.width, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams, this.sawing = e.sawing;
|
|
5384
5650
|
}
|
|
5385
5651
|
}
|
|
5386
|
-
class
|
|
5652
|
+
class mt extends ur {
|
|
5387
5653
|
/**
|
|
5388
5654
|
* Инициализирует экземпляр класса {@link Order}.
|
|
5389
5655
|
*
|
|
@@ -5423,10 +5689,10 @@ class gt extends pr {
|
|
|
5423
5689
|
* Признак, что разрешена передача заказа в работу без оплаты.
|
|
5424
5690
|
*/
|
|
5425
5691
|
t(this, "isAllowProcessingWithoutPayment");
|
|
5426
|
-
this.products = (e.products ?? []).map((s) => new
|
|
5692
|
+
this.products = (e.products ?? []).map((s) => new gt(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? me.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new w(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
|
|
5427
5693
|
}
|
|
5428
5694
|
}
|
|
5429
|
-
class
|
|
5695
|
+
class Qt extends ve {
|
|
5430
5696
|
/**
|
|
5431
5697
|
* Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
|
|
5432
5698
|
*
|
|
@@ -5439,7 +5705,7 @@ class Et extends Pe {
|
|
|
5439
5705
|
getOrders(r, e, s) {
|
|
5440
5706
|
return this.getPaginated("/internal/orders", r, e ? [e] : void 0, s, {}, (i) => {
|
|
5441
5707
|
const o = { ...i.data };
|
|
5442
|
-
return o.data = o.data.map((c) => new
|
|
5708
|
+
return o.data = o.data.map((c) => new ur(c)), o;
|
|
5443
5709
|
});
|
|
5444
5710
|
}
|
|
5445
5711
|
/**
|
|
@@ -5457,7 +5723,7 @@ class Et extends Pe {
|
|
|
5457
5723
|
* @param orderId Идентификатор заказа для которого необходимо вернуть данные.
|
|
5458
5724
|
*/
|
|
5459
5725
|
getOrder(r) {
|
|
5460
|
-
return this.get(`/internal/orders/${r}`, {}, (e) => new
|
|
5726
|
+
return this.get(`/internal/orders/${r}`, {}, (e) => new mt(e.data));
|
|
5461
5727
|
}
|
|
5462
5728
|
}
|
|
5463
5729
|
class $e {
|
|
@@ -5487,10 +5753,10 @@ class $e {
|
|
|
5487
5753
|
* Источник клиентской цены.
|
|
5488
5754
|
*/
|
|
5489
5755
|
t(this, "source");
|
|
5490
|
-
this.client = new
|
|
5756
|
+
this.client = new ce(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) ?? Ne.Product;
|
|
5491
5757
|
}
|
|
5492
5758
|
}
|
|
5493
|
-
const
|
|
5759
|
+
const Te = (n) => {
|
|
5494
5760
|
var r, e, s, i, o;
|
|
5495
5761
|
return n ? Rr(
|
|
5496
5762
|
{
|
|
@@ -5501,13 +5767,13 @@ const ae = (n) => {
|
|
|
5501
5767
|
salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
|
|
5502
5768
|
hideNotActive: n.hideNotActive
|
|
5503
5769
|
},
|
|
5504
|
-
(c) =>
|
|
5770
|
+
(c) => T(c) || (Je(c) || Ar(c)) && Le(c)
|
|
5505
5771
|
) : {};
|
|
5506
5772
|
}, je = (n) => {
|
|
5507
5773
|
const r = {};
|
|
5508
5774
|
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;
|
|
5509
5775
|
};
|
|
5510
|
-
class
|
|
5776
|
+
class Yt extends h {
|
|
5511
5777
|
/**
|
|
5512
5778
|
* Возвращает список клиентских цен на продукты в указанном диапазоне цены.
|
|
5513
5779
|
*
|
|
@@ -5522,7 +5788,7 @@ class Jt extends h {
|
|
|
5522
5788
|
`/internal/price/products/${r}/analyze`,
|
|
5523
5789
|
{
|
|
5524
5790
|
...je(e),
|
|
5525
|
-
filters:
|
|
5791
|
+
filters: Te(s)
|
|
5526
5792
|
},
|
|
5527
5793
|
(i) => i.data.map((o) => new $e(o))
|
|
5528
5794
|
);
|
|
@@ -5541,7 +5807,7 @@ class Jt extends h {
|
|
|
5541
5807
|
`/internal/price/categories/${r}/analyze`,
|
|
5542
5808
|
{
|
|
5543
5809
|
...je(e),
|
|
5544
|
-
filters:
|
|
5810
|
+
filters: Te(s)
|
|
5545
5811
|
},
|
|
5546
5812
|
(i) => i.data.map((o) => new $e(o))
|
|
5547
5813
|
);
|
|
@@ -5562,13 +5828,13 @@ class Jt extends h {
|
|
|
5562
5828
|
`/internal/price/categories/${r}/analyze/square`,
|
|
5563
5829
|
{
|
|
5564
5830
|
...e,
|
|
5565
|
-
filters:
|
|
5831
|
+
filters: Te(s)
|
|
5566
5832
|
},
|
|
5567
5833
|
(i) => i.data.map((o) => new $e(o))
|
|
5568
5834
|
);
|
|
5569
5835
|
}
|
|
5570
5836
|
}
|
|
5571
|
-
class
|
|
5837
|
+
class ft {
|
|
5572
5838
|
/**
|
|
5573
5839
|
* Инициализирует экземпляр класса {@link MetaTagItem}.
|
|
5574
5840
|
*
|
|
@@ -5622,10 +5888,10 @@ class We {
|
|
|
5622
5888
|
*/
|
|
5623
5889
|
t(this, "meta");
|
|
5624
5890
|
var e;
|
|
5625
|
-
this.resourceType = new ir(r == null ? void 0 : r.resourceType), this.resourceId = (r == null ? void 0 : r.resourceId) ?? "", this.h1 = r == null ? void 0 : r.h1, this.title = r == null ? void 0 : r.title, this.description = r == null ? void 0 : r.description, this.keywords = r == null ? void 0 : r.keywords, this.meta = ((e = r == null ? void 0 : r.meta) == null ? void 0 : e.map((s) => new
|
|
5891
|
+
this.resourceType = new ir(r == null ? void 0 : r.resourceType), this.resourceId = (r == null ? void 0 : r.resourceId) ?? "", this.h1 = r == null ? void 0 : r.h1, this.title = r == null ? void 0 : r.title, this.description = r == null ? void 0 : r.description, this.keywords = r == null ? void 0 : r.keywords, this.meta = ((e = r == null ? void 0 : r.meta) == null ? void 0 : e.map((s) => new ft(s))) ?? [];
|
|
5626
5892
|
}
|
|
5627
5893
|
}
|
|
5628
|
-
class
|
|
5894
|
+
class Xt extends h {
|
|
5629
5895
|
/**
|
|
5630
5896
|
* Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
|
|
5631
5897
|
*
|
|
@@ -5656,241 +5922,7 @@ class Kt extends h {
|
|
|
5656
5922
|
return this.delete(`/internal/seo/${r.slug}/${e}`);
|
|
5657
5923
|
}
|
|
5658
5924
|
}
|
|
5659
|
-
|
|
5660
|
-
const n = y({}), r = y(void 0), e = y(void 0), s = y(void 0), i = y(void 0), o = y(void 0), c = y(void 0), u = y(void 0), p = y(void 0), R = y(void 0), D = y(void 0), L = y(void 0), I = y(void 0), x = y(void 0), k = y(void 0), d = y(void 0), O = y(void 0), l = y(void 0);
|
|
5661
|
-
return {
|
|
5662
|
-
/**
|
|
5663
|
-
* Список загружаемых/загруженных на данный момент значений.
|
|
5664
|
-
*/
|
|
5665
|
-
dataLoaderList: n,
|
|
5666
|
-
/**
|
|
5667
|
-
* Справочник каналов первичного интереса.
|
|
5668
|
-
*/
|
|
5669
|
-
channelPrimaryInterestReference: r,
|
|
5670
|
-
/**
|
|
5671
|
-
* Справочник должностей контактных лиц.
|
|
5672
|
-
*/
|
|
5673
|
-
contactPositionsReference: e,
|
|
5674
|
-
/**
|
|
5675
|
-
* Справочник валют.
|
|
5676
|
-
*/
|
|
5677
|
-
currencyReference: s,
|
|
5678
|
-
/**
|
|
5679
|
-
* Справочник типов доставки.
|
|
5680
|
-
*/
|
|
5681
|
-
deliveryTypeReference: i,
|
|
5682
|
-
/**
|
|
5683
|
-
* Список менеджеров.
|
|
5684
|
-
*/
|
|
5685
|
-
managersList: o,
|
|
5686
|
-
/**
|
|
5687
|
-
* Справочник организационно-правовых форм.
|
|
5688
|
-
*/
|
|
5689
|
-
opfReference: c,
|
|
5690
|
-
/**
|
|
5691
|
-
* Справочник статусов оплаты заказа.
|
|
5692
|
-
*/
|
|
5693
|
-
orderPaymentStatusReference: u,
|
|
5694
|
-
/**
|
|
5695
|
-
* Справочник статусов заказов.
|
|
5696
|
-
*/
|
|
5697
|
-
orderStatusReference: p,
|
|
5698
|
-
/**
|
|
5699
|
-
* Справочник типов оплаты заказов.
|
|
5700
|
-
*/
|
|
5701
|
-
paymentTypeReference: R,
|
|
5702
|
-
/**
|
|
5703
|
-
* Справочник групп партнеров.
|
|
5704
|
-
*/
|
|
5705
|
-
partnerGroupReference: D,
|
|
5706
|
-
/**
|
|
5707
|
-
* Справочник типов файлов продукктов/категорий.
|
|
5708
|
-
*/
|
|
5709
|
-
productFileTypeReference: L,
|
|
5710
|
-
/**
|
|
5711
|
-
* Справочник типов ресурсов.
|
|
5712
|
-
*/
|
|
5713
|
-
resourceTypesReference: I,
|
|
5714
|
-
/**
|
|
5715
|
-
* Справочник направлений продаж.
|
|
5716
|
-
*/
|
|
5717
|
-
salesDirectionsReference: x,
|
|
5718
|
-
/**
|
|
5719
|
-
* Справочник источников первичного интереса.
|
|
5720
|
-
*/
|
|
5721
|
-
sourcePrimaryInterestReference: k,
|
|
5722
|
-
/**
|
|
5723
|
-
* Справочник складов.
|
|
5724
|
-
*/
|
|
5725
|
-
warehousesReference: d,
|
|
5726
|
-
/**
|
|
5727
|
-
* Справочник типов свойств.
|
|
5728
|
-
*/
|
|
5729
|
-
propertyTypesReference: O,
|
|
5730
|
-
/**
|
|
5731
|
-
* Справочник коэффициентов цен.
|
|
5732
|
-
*/
|
|
5733
|
-
priceCoefficientsReference: l
|
|
5734
|
-
};
|
|
5735
|
-
}), Qt = ye("references", () => {
|
|
5736
|
-
const n = v(() => {
|
|
5737
|
-
const l = P();
|
|
5738
|
-
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(A).getChannelPrimaryInterest().then((g) => {
|
|
5739
|
-
l.channelPrimaryInterestReference = g;
|
|
5740
|
-
}).catch(w)), l.channelPrimaryInterestReference;
|
|
5741
|
-
}), r = v(() => {
|
|
5742
|
-
const l = P();
|
|
5743
|
-
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(A).getContactPositions().then((g) => {
|
|
5744
|
-
l.contactPositionsReference = g;
|
|
5745
|
-
}).catch(w)), l.contactPositionsReference;
|
|
5746
|
-
}), e = v(() => {
|
|
5747
|
-
const l = P();
|
|
5748
|
-
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(A).getCurrency().then((g) => {
|
|
5749
|
-
l.currencyReference = g;
|
|
5750
|
-
}).catch(w)), l.currencyReference;
|
|
5751
|
-
}), s = v(() => {
|
|
5752
|
-
const l = P();
|
|
5753
|
-
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(A).getOpf().then((g) => {
|
|
5754
|
-
l.opfReference = g;
|
|
5755
|
-
}).catch(w)), l.opfReference;
|
|
5756
|
-
}), i = v(() => {
|
|
5757
|
-
const l = P();
|
|
5758
|
-
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(A).getOrderPaymentStatuses().then((g) => {
|
|
5759
|
-
l.orderPaymentStatusReference = g;
|
|
5760
|
-
}).catch(w)), l.orderPaymentStatusReference;
|
|
5761
|
-
}), o = v(() => {
|
|
5762
|
-
const l = P();
|
|
5763
|
-
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(A).getOrderStatuses().then((g) => {
|
|
5764
|
-
l.orderStatusReference = g;
|
|
5765
|
-
}).catch(w)), l.orderStatusReference;
|
|
5766
|
-
}), c = v(() => {
|
|
5767
|
-
const l = P();
|
|
5768
|
-
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(A).getPaymentTypes().then((g) => {
|
|
5769
|
-
l.paymentTypeReference = g;
|
|
5770
|
-
}).catch(w)), l.paymentTypeReference;
|
|
5771
|
-
}), u = v(() => {
|
|
5772
|
-
const l = P();
|
|
5773
|
-
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(A).getPartnerGroup().then((g) => {
|
|
5774
|
-
l.partnerGroupReference = g;
|
|
5775
|
-
}).catch(w)), l.partnerGroupReference;
|
|
5776
|
-
}), p = v(() => {
|
|
5777
|
-
const l = P();
|
|
5778
|
-
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(A).getProductFileType().then((g) => {
|
|
5779
|
-
l.productFileTypeReference = g;
|
|
5780
|
-
}).catch(w)), l.productFileTypeReference;
|
|
5781
|
-
}), R = v(() => {
|
|
5782
|
-
const l = P();
|
|
5783
|
-
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(A).getResourceTypes().then((g) => {
|
|
5784
|
-
l.resourceTypesReference = g;
|
|
5785
|
-
}).catch(w)), l.resourceTypesReference;
|
|
5786
|
-
}), D = v(() => {
|
|
5787
|
-
const l = P();
|
|
5788
|
-
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(A).getSalesDirections().then((g) => {
|
|
5789
|
-
l.salesDirectionsReference = g;
|
|
5790
|
-
}).catch(w)), l.salesDirectionsReference;
|
|
5791
|
-
}), L = v(() => {
|
|
5792
|
-
const l = P();
|
|
5793
|
-
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(A).getSourcePrimaryInterest().then((g) => {
|
|
5794
|
-
l.sourcePrimaryInterestReference = g;
|
|
5795
|
-
}).catch(w)), l.sourcePrimaryInterestReference;
|
|
5796
|
-
}), I = v(() => {
|
|
5797
|
-
const l = P();
|
|
5798
|
-
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(A).getDeliveryTypes().then((g) => {
|
|
5799
|
-
l.deliveryTypeReference = g;
|
|
5800
|
-
}).catch(w)), l.deliveryTypeReference;
|
|
5801
|
-
}), x = v(() => {
|
|
5802
|
-
const l = P();
|
|
5803
|
-
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(pt).getManagers().then((g) => {
|
|
5804
|
-
l.managersList = g;
|
|
5805
|
-
}).catch(w)), l.managersList;
|
|
5806
|
-
}), k = v(() => {
|
|
5807
|
-
const l = P();
|
|
5808
|
-
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(A).getWarehouses().then((g) => {
|
|
5809
|
-
l.warehousesReference = g;
|
|
5810
|
-
}).catch(w)), l.warehousesReference;
|
|
5811
|
-
}), d = v(() => {
|
|
5812
|
-
const l = P();
|
|
5813
|
-
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(A).getPropertyTypes().then((g) => {
|
|
5814
|
-
l.propertyTypesReference = g;
|
|
5815
|
-
}).catch(w)), l.propertyTypesReference;
|
|
5816
|
-
}), O = v(() => {
|
|
5817
|
-
const l = P();
|
|
5818
|
-
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(A).getPriceCoefficients().then((g) => {
|
|
5819
|
-
l.priceCoefficientsReference = g;
|
|
5820
|
-
}).catch(w)), l.priceCoefficientsReference;
|
|
5821
|
-
});
|
|
5822
|
-
return {
|
|
5823
|
-
/**
|
|
5824
|
-
* Справочник каналов первичного интереса.
|
|
5825
|
-
*/
|
|
5826
|
-
channelPrimaryInterestsReference: n,
|
|
5827
|
-
/**
|
|
5828
|
-
* Справочник должностей контактных лиц.
|
|
5829
|
-
*/
|
|
5830
|
-
contactPositionsReference: r,
|
|
5831
|
-
/**
|
|
5832
|
-
* Справочник валют.
|
|
5833
|
-
*/
|
|
5834
|
-
currencyReference: e,
|
|
5835
|
-
/**
|
|
5836
|
-
* Справочник организационно-правовых форм.
|
|
5837
|
-
*/
|
|
5838
|
-
opfReference: s,
|
|
5839
|
-
/**
|
|
5840
|
-
* Справочник статусов оплаты заказа.
|
|
5841
|
-
*/
|
|
5842
|
-
orderPaymentStatusReference: i,
|
|
5843
|
-
/**
|
|
5844
|
-
* Справочник статусов заказов.
|
|
5845
|
-
*/
|
|
5846
|
-
orderStatusReference: o,
|
|
5847
|
-
/**
|
|
5848
|
-
* Справочник типов оплаты заказов.
|
|
5849
|
-
*/
|
|
5850
|
-
paymentTypeReference: c,
|
|
5851
|
-
/**
|
|
5852
|
-
* Справочник групп партнеров.
|
|
5853
|
-
*/
|
|
5854
|
-
partnerGroupsReference: u,
|
|
5855
|
-
/**
|
|
5856
|
-
* Справочник типов файлов продуктов/категорий.
|
|
5857
|
-
*/
|
|
5858
|
-
productFilesTypesReference: p,
|
|
5859
|
-
/**
|
|
5860
|
-
* Справочник типов ресурсов.
|
|
5861
|
-
*/
|
|
5862
|
-
resourceTypesReference: R,
|
|
5863
|
-
/**
|
|
5864
|
-
* Справочник направлений продаж.
|
|
5865
|
-
*/
|
|
5866
|
-
salesDirectionsReference: D,
|
|
5867
|
-
/**
|
|
5868
|
-
* Справочник каналов первичного интереса.
|
|
5869
|
-
*/
|
|
5870
|
-
sourcePrimaryInterestsReference: L,
|
|
5871
|
-
/**
|
|
5872
|
-
* Справочник типов доставки.
|
|
5873
|
-
*/
|
|
5874
|
-
deliveryTypeReference: I,
|
|
5875
|
-
/**
|
|
5876
|
-
* Список менеджеров.
|
|
5877
|
-
*/
|
|
5878
|
-
managersList: x,
|
|
5879
|
-
/**
|
|
5880
|
-
* Справочник складов.
|
|
5881
|
-
*/
|
|
5882
|
-
warehousesReference: k,
|
|
5883
|
-
/**
|
|
5884
|
-
* Справочник типов свойств.
|
|
5885
|
-
*/
|
|
5886
|
-
propertyTypesReference: d,
|
|
5887
|
-
/**
|
|
5888
|
-
* Справочник коэффициентов цен.
|
|
5889
|
-
*/
|
|
5890
|
-
priceCoefficientsReference: O
|
|
5891
|
-
};
|
|
5892
|
-
});
|
|
5893
|
-
class Yt extends h {
|
|
5925
|
+
class Zt extends h {
|
|
5894
5926
|
/**
|
|
5895
5927
|
* Возвращает подсказки по адресам.
|
|
5896
5928
|
*
|
|
@@ -5937,7 +5969,7 @@ class Yt extends h {
|
|
|
5937
5969
|
});
|
|
5938
5970
|
}
|
|
5939
5971
|
}
|
|
5940
|
-
class
|
|
5972
|
+
class es {
|
|
5941
5973
|
/**
|
|
5942
5974
|
* Инициализирует экземпляр класса {@link FieldValidationResultData}.
|
|
5943
5975
|
*
|
|
@@ -5961,142 +5993,143 @@ class Xt {
|
|
|
5961
5993
|
}
|
|
5962
5994
|
}
|
|
5963
5995
|
export {
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5996
|
+
jr as AnyReference,
|
|
5997
|
+
Lt as AppBaseConfig,
|
|
5998
|
+
D as AppConfigProvider,
|
|
5999
|
+
_e as BankAccount,
|
|
6000
|
+
ve as BasePaginationProvider,
|
|
6001
|
+
Gr as CalculationTypeEnum,
|
|
6002
|
+
le as Cart,
|
|
5971
6003
|
Ur as CartItem,
|
|
5972
6004
|
qr as CartItemBase,
|
|
5973
6005
|
$t as CartProvider,
|
|
5974
|
-
|
|
6006
|
+
kt as CatalogProvider,
|
|
5975
6007
|
Qe as CatalogableItem,
|
|
5976
|
-
|
|
6008
|
+
U as Category,
|
|
5977
6009
|
Me as CategoryPricingRule,
|
|
5978
6010
|
sr as ChannelPrimaryInterest,
|
|
5979
|
-
|
|
5980
|
-
|
|
6011
|
+
_t as City,
|
|
6012
|
+
Oe as CityWithRegionAndCountry,
|
|
5981
6013
|
He as Client,
|
|
5982
|
-
|
|
6014
|
+
ut as ClientAdditionalData,
|
|
5983
6015
|
he as ClientCategory,
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
6016
|
+
Wt as ClientDataProvider,
|
|
6017
|
+
dt as ClientPriceProvider,
|
|
6018
|
+
xt as ClientPriceTemplateProvider,
|
|
5987
6019
|
K as ClientProduct,
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
6020
|
+
qt as ClientProductCategoryDataProvider,
|
|
6021
|
+
Ut as ClientProductDataProvider,
|
|
6022
|
+
ce as ClientShortInfo,
|
|
6023
|
+
ot as ClientsAdditionalDataRequestTypeEnum,
|
|
6024
|
+
Ht as ClientsListFilters,
|
|
6025
|
+
Et as ConfiguratorProvider,
|
|
6026
|
+
Se as Contact,
|
|
6027
|
+
Hr as ContactLinks,
|
|
5996
6028
|
F as ContactPerson,
|
|
5997
|
-
|
|
5998
|
-
|
|
6029
|
+
pt as ContactPersonRelated,
|
|
6030
|
+
Wr as ContactPosition,
|
|
5999
6031
|
De as ContactRelation,
|
|
6000
6032
|
or as ContragentBase,
|
|
6001
6033
|
me as ContragentFactory,
|
|
6002
6034
|
cr as ContragentIc,
|
|
6003
|
-
|
|
6004
|
-
|
|
6035
|
+
ct as ContragentPerson,
|
|
6036
|
+
lt as ContragentUlNr,
|
|
6005
6037
|
lr as ContragentUlR,
|
|
6006
|
-
|
|
6038
|
+
Ne as CostSourceEnum,
|
|
6007
6039
|
Q as Country,
|
|
6008
6040
|
ge as Currency,
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6041
|
+
Zt as DataSuggestionProvider,
|
|
6042
|
+
zt as DataTablePagination,
|
|
6043
|
+
ht as DataTablePaginationRequestParams,
|
|
6044
|
+
jt as DataTableSortRequestParams,
|
|
6045
|
+
Jt as DateTimeProvider,
|
|
6046
|
+
Fr as DeletableNamedIdentity,
|
|
6015
6047
|
fe as DeliveryAddress,
|
|
6016
6048
|
J as DeliveryType,
|
|
6017
6049
|
Dt as DetailedJwtPayload,
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6050
|
+
tt as DeviceTypeResolutionConfig,
|
|
6051
|
+
Br as DiscountShortInfo,
|
|
6052
|
+
es as FieldValidationResultData,
|
|
6053
|
+
ne as FilterGroup,
|
|
6022
6054
|
Fe as FilterItem,
|
|
6023
|
-
|
|
6055
|
+
qe as FilterOpEnum,
|
|
6024
6056
|
Xe as GeoCoordinates,
|
|
6025
6057
|
Nr as HiddenCatalogableItem,
|
|
6026
|
-
|
|
6027
|
-
|
|
6058
|
+
ie as HttpCachedRequester,
|
|
6059
|
+
st as HttpParamsConfig,
|
|
6028
6060
|
h as HttpRequester,
|
|
6029
6061
|
B as Identity,
|
|
6030
6062
|
Or as Image,
|
|
6031
|
-
|
|
6032
|
-
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6063
|
+
ue as JwtPayload,
|
|
6064
|
+
Ce as Manager,
|
|
6065
|
+
te as ManagerCommon,
|
|
6066
|
+
Kt as ManagerDataFactory,
|
|
6067
|
+
Qr as ManagerDataProvider,
|
|
6068
|
+
ft as MetaTagItem,
|
|
6069
|
+
$ as NamedIdentity,
|
|
6038
6070
|
M as Opf,
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
|
|
6046
|
-
|
|
6071
|
+
b as OpfEnum,
|
|
6072
|
+
mt as Order,
|
|
6073
|
+
ur as OrderInfo,
|
|
6074
|
+
Vr as OrderPaymentStatus,
|
|
6075
|
+
gt as OrderProduct,
|
|
6076
|
+
pr as OrderShortInfo,
|
|
6077
|
+
Er as OrderStatus,
|
|
6078
|
+
Qt as OrdersDataProvider,
|
|
6047
6079
|
Y as PartnerGroup,
|
|
6048
|
-
|
|
6049
|
-
|
|
6080
|
+
Jr as PaymentType,
|
|
6081
|
+
Tt as PreferencesStorageProvider,
|
|
6050
6082
|
$e as PriceAnalyze,
|
|
6051
|
-
|
|
6052
|
-
|
|
6083
|
+
Yt as PriceAnalyzeProvider,
|
|
6084
|
+
ye as PriceCoefficient,
|
|
6053
6085
|
Ye as PriceCoefficientEnum,
|
|
6054
6086
|
j as PriceTemplate,
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6087
|
+
Ae as PriceTemplateCategory,
|
|
6088
|
+
Z as PriceTemplateClient,
|
|
6089
|
+
er as PriceTemplateICatalogableItem,
|
|
6090
|
+
ae as PriceTemplateProduct,
|
|
6091
|
+
Gt as PriceTemplateProvider,
|
|
6092
|
+
re as PricingRole,
|
|
6093
|
+
Mt as PricingRoleProvider,
|
|
6094
|
+
be as PrimaryCatalogableItem,
|
|
6095
|
+
_ as Product,
|
|
6096
|
+
Nt as ProductCategoryDataProvider,
|
|
6097
|
+
Ot as ProductDataProvider,
|
|
6098
|
+
Kr as ProductFileType,
|
|
6099
|
+
de as ProductPriceCoefficient,
|
|
6100
|
+
rt as ProductPriceHistory,
|
|
6101
|
+
Ft as PropertiesProvider,
|
|
6102
|
+
ee as Property,
|
|
6071
6103
|
tr as PropertyType,
|
|
6072
|
-
|
|
6104
|
+
Mr as PropertyTypeEnum,
|
|
6073
6105
|
H as PropertyValue,
|
|
6074
|
-
|
|
6106
|
+
Bt as RecommendationsDataProvider,
|
|
6075
6107
|
Ge as RecommendationsList,
|
|
6076
|
-
|
|
6108
|
+
w as Reference,
|
|
6077
6109
|
A as ReferenceDataProvider,
|
|
6078
|
-
|
|
6110
|
+
se as Region,
|
|
6079
6111
|
ir as ResourceType,
|
|
6080
|
-
|
|
6081
|
-
|
|
6112
|
+
I as SalesDirection,
|
|
6113
|
+
it as SentryConfig,
|
|
6082
6114
|
We as Seo,
|
|
6083
|
-
|
|
6115
|
+
Xt as SeoDataProvider,
|
|
6084
6116
|
nr as SourcePrimaryInterest,
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6117
|
+
xr as StockCount,
|
|
6118
|
+
bt as TemplatesListFilters,
|
|
6119
|
+
xe as TypedInstanceFactory,
|
|
6088
6120
|
ze as UnitsHelper,
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6121
|
+
Vt as UnknownClientDataProvider,
|
|
6122
|
+
Ze as UpdatableNamedIdentity,
|
|
6123
|
+
Xr as User,
|
|
6124
|
+
rr as UserCommonInfo,
|
|
6125
|
+
Zr as UserDataProvider,
|
|
6094
6126
|
G as UserShortInfo,
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6127
|
+
Yr as UserTypeEnum,
|
|
6128
|
+
nt as VersionConfig,
|
|
6129
|
+
we as Warehouse,
|
|
6098
6130
|
Be as findCatalogItemByIdRecursive,
|
|
6099
|
-
|
|
6100
|
-
|
|
6131
|
+
Re as useAuthStateStore,
|
|
6132
|
+
St as useReferencesStore,
|
|
6133
|
+
It as useUserStateStore
|
|
6101
6134
|
};
|
|
6102
6135
|
//# sourceMappingURL=sc-common-lib.js.map
|