@snabcentr/common-lib 1.72.1 → 1.72.3
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 +10 -9
- package/dist/sc-common-lib.js +721 -623
- 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/states/auth-state-store.d.ts.map +1 -1
- package/dist/src/managers/classes/manager-common.d.ts +8 -4
- package/dist/src/managers/classes/manager-common.d.ts.map +1 -1
- package/dist/src/managers/interfaces/i-manager-common.d.ts +4 -0
- package/dist/src/managers/interfaces/i-manager-common.d.ts.map +1 -1
- package/dist/src/system/providers/preferences-storage-provider.d.ts +10 -2
- package/dist/src/system/providers/preferences-storage-provider.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/sc-common-lib.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var t = (n, r, e) =>
|
|
4
|
-
import { jwtDecode as
|
|
5
|
-
import { merge as
|
|
6
|
-
import { objectToCamel as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
class
|
|
1
|
+
var Pr = Object.defineProperty;
|
|
2
|
+
var Rr = (n, r, e) => r in n ? Pr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
|
+
var t = (n, r, e) => Rr(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
+
import { jwtDecode as rr } from "jwt-decode";
|
|
5
|
+
import { merge as ye, isUndefined as Dr, isNil as D, isEmpty as Y, noop as w, mapValues as tr, isArray as Q, every as Ar, split as $r, toUpper as Tr, constant as br, isString as C, cloneDeep as Sr, toLower as _r, isFunction as qe, map as Pe, forEach as Ir, isDate as ke, omitBy as sr, isObject as ir } from "lodash-es";
|
|
6
|
+
import { objectToCamel as Ue, objectToSnake as Be } from "ts-case-convert";
|
|
7
|
+
import { isAfter as ze, parseISO as v, startOfToday as Le, format as q, addSeconds as dr, addBusinessDays as kr, endOfTomorrow as Lr, startOfTomorrow as xr, endOfYesterday as Nr, startOfYesterday as Or, endOfToday as qr, endOfDay as Ur, startOfDay as Gr } from "date-fns";
|
|
8
|
+
import { defineStore as te } from "pinia";
|
|
9
|
+
import { ref as y, markRaw as Fr, computed as P } from "vue";
|
|
10
|
+
import jr from "axios";
|
|
11
|
+
class G {
|
|
12
12
|
/**
|
|
13
13
|
* Инициализирует экземпляр класса {@link JwtPayload}.
|
|
14
14
|
*
|
|
@@ -99,7 +99,7 @@ class Q {
|
|
|
99
99
|
* @inheritDoc
|
|
100
100
|
*/
|
|
101
101
|
t(this, "email", "");
|
|
102
|
-
|
|
102
|
+
ye(this, r);
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
105
|
* Возвращает данные полезной нагрузки для указанного JWT-токена.
|
|
@@ -107,11 +107,11 @@ class Q {
|
|
|
107
107
|
* @param jwtToken JWT-ключ доступа.
|
|
108
108
|
*/
|
|
109
109
|
static getJwtPayload(r) {
|
|
110
|
-
const e =
|
|
110
|
+
const e = rr(r), s = new G(Ue(e));
|
|
111
111
|
return s.resourceAccess = e.resource_access, s;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
class
|
|
114
|
+
class Nt extends G {
|
|
115
115
|
/**
|
|
116
116
|
* Инициализирует экземпляр класса {@link DetailedJwtPayload}.
|
|
117
117
|
*
|
|
@@ -143,7 +143,7 @@ class Lt extends Q {
|
|
|
143
143
|
* @inheritDoc
|
|
144
144
|
*/
|
|
145
145
|
t(this, "address");
|
|
146
|
-
|
|
146
|
+
ye(this, e);
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
149
|
* Возвращает данные полезной нагрузки для указанного JWT-токена.
|
|
@@ -151,26 +151,26 @@ class Lt extends Q {
|
|
|
151
151
|
* @param jwtToken JWT-ключ доступа.
|
|
152
152
|
*/
|
|
153
153
|
static getJwtPayload(e) {
|
|
154
|
-
return new
|
|
154
|
+
return new G(Ue(rr(e)));
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
const
|
|
157
|
+
const J = class J {
|
|
158
158
|
/**
|
|
159
159
|
* Инициализирует и возвращает конфигурацию приложения.
|
|
160
160
|
*
|
|
161
161
|
* @param config Данные для первоначальной инициализации.
|
|
162
162
|
*/
|
|
163
163
|
static init(r) {
|
|
164
|
-
|
|
164
|
+
J.config = r;
|
|
165
165
|
}
|
|
166
166
|
/**
|
|
167
167
|
* Возвращает текущую конфигурацию приложения.
|
|
168
168
|
*/
|
|
169
169
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
170
170
|
static getConfig() {
|
|
171
|
-
if (
|
|
171
|
+
if (Dr(J.config))
|
|
172
172
|
throw new Error("Config is undefined. Please set config by AppConfigProvider.init().");
|
|
173
|
-
return
|
|
173
|
+
return J.config;
|
|
174
174
|
}
|
|
175
175
|
/**
|
|
176
176
|
* Выполняет загрузку конфигурации по указанному пути.
|
|
@@ -189,15 +189,143 @@ const E = class E {
|
|
|
189
189
|
/**
|
|
190
190
|
* Конфигурация приложения.
|
|
191
191
|
*/
|
|
192
|
-
t(
|
|
193
|
-
let T =
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
192
|
+
t(J, "config");
|
|
193
|
+
let T = J;
|
|
194
|
+
class fe {
|
|
195
|
+
/**
|
|
196
|
+
* Возвращает актуальные и не просроченные данные из хранилища.
|
|
197
|
+
*
|
|
198
|
+
* @param keyName Название ключа из которого необходимо получить данные.
|
|
199
|
+
*/
|
|
200
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
201
|
+
static getActualDataFromStorage(r) {
|
|
202
|
+
if (!this.isLocalStorageAvailable())
|
|
203
|
+
return;
|
|
204
|
+
let e = null;
|
|
205
|
+
try {
|
|
206
|
+
e = localStorage.getItem(r);
|
|
207
|
+
} catch {
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
if (e)
|
|
211
|
+
try {
|
|
212
|
+
const s = JSON.parse(e);
|
|
213
|
+
if (!s.availableFor || ze(v(s.availableFor) || Le(), /* @__PURE__ */ new Date())) {
|
|
214
|
+
if (D(s.data) || Y(s.data))
|
|
215
|
+
throw new Error("Data is empty");
|
|
216
|
+
return s.data;
|
|
217
|
+
}
|
|
218
|
+
} catch {
|
|
219
|
+
try {
|
|
220
|
+
localStorage.removeItem(r);
|
|
221
|
+
} catch {
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Сохраняет данные в хранилище.
|
|
227
|
+
*
|
|
228
|
+
* @param keyName Название ключа в который необходимо сохранить данные.
|
|
229
|
+
* @param data Данные, которые необходимо сохранить.
|
|
230
|
+
* @param availableFor Дата и время до которого будут храниться настройки. Если не задан, данные будут храниться бессрочно.
|
|
231
|
+
*/
|
|
232
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
233
|
+
static saveActualDataToStorage(r, e, s) {
|
|
234
|
+
if (this.isLocalStorageAvailable())
|
|
235
|
+
try {
|
|
236
|
+
if (D(e) || Y(e))
|
|
237
|
+
throw new Error("Data is empty");
|
|
238
|
+
const i = JSON.stringify({
|
|
239
|
+
availableFor: s,
|
|
240
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
241
|
+
data: e
|
|
242
|
+
});
|
|
243
|
+
localStorage.setItem(r, i);
|
|
244
|
+
} catch (i) {
|
|
245
|
+
if (i instanceof DOMException && i.code === DOMException.QUOTA_EXCEEDED_ERR) {
|
|
246
|
+
this.clearOldData();
|
|
247
|
+
try {
|
|
248
|
+
const o = JSON.stringify({
|
|
249
|
+
availableFor: s,
|
|
250
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
251
|
+
data: e
|
|
252
|
+
});
|
|
253
|
+
localStorage.setItem(r, o);
|
|
254
|
+
} catch {
|
|
255
|
+
}
|
|
256
|
+
} else
|
|
257
|
+
try {
|
|
258
|
+
localStorage.removeItem(r);
|
|
259
|
+
} catch {
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Проверяет доступность localStorage в браузере.
|
|
265
|
+
*/
|
|
266
|
+
static isLocalStorageAvailable() {
|
|
267
|
+
try {
|
|
268
|
+
const r = "__localStorage_test__";
|
|
269
|
+
return localStorage.setItem(r, "test"), localStorage.removeItem(r), !0;
|
|
270
|
+
} catch {
|
|
271
|
+
return !1;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Очищает устаревшие данные из localStorage для освобождения места.
|
|
276
|
+
*/
|
|
277
|
+
static clearOldData() {
|
|
278
|
+
try {
|
|
279
|
+
const r = [];
|
|
280
|
+
for (let e = 0; e < localStorage.length; e++) {
|
|
281
|
+
const s = localStorage.key(e);
|
|
282
|
+
if (s)
|
|
283
|
+
try {
|
|
284
|
+
const i = localStorage.getItem(s);
|
|
285
|
+
if (i) {
|
|
286
|
+
const o = JSON.parse(i);
|
|
287
|
+
o.availableFor && !ze(v(o.availableFor) || Le(), /* @__PURE__ */ new Date()) && r.push(s);
|
|
288
|
+
}
|
|
289
|
+
} catch {
|
|
290
|
+
r.push(s);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
r.forEach((e) => {
|
|
294
|
+
try {
|
|
295
|
+
localStorage.removeItem(e);
|
|
296
|
+
} catch {
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
} catch {
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
function Ee(n) {
|
|
304
|
+
try {
|
|
305
|
+
const r = G.getJwtPayload(n);
|
|
306
|
+
return new Date(r.exp * 1e3);
|
|
307
|
+
} catch {
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
const B = te("__auth_state_private", () => {
|
|
312
|
+
const n = y(
|
|
313
|
+
(() => {
|
|
314
|
+
var u;
|
|
315
|
+
const o = fe.getActualDataFromStorage(
|
|
316
|
+
"sc.token"
|
|
317
|
+
/* JwtToken */
|
|
318
|
+
);
|
|
319
|
+
if (o)
|
|
320
|
+
return Promise.resolve(o);
|
|
321
|
+
const c = (u = T.getConfig().devMode) == null ? void 0 : u.initAuthBearerToken;
|
|
322
|
+
return c ? Promise.resolve(c) : void 0;
|
|
323
|
+
})()
|
|
324
|
+
), r = y(void 0), e = y(void 0), s = Fr(/* @__PURE__ */ new Map());
|
|
197
325
|
function i() {
|
|
198
|
-
e.value = void 0,
|
|
199
|
-
const
|
|
200
|
-
e.value =
|
|
326
|
+
e.value = void 0, D(n.value) || n.value.then((o) => {
|
|
327
|
+
const c = G.getJwtPayload(o);
|
|
328
|
+
e.value = c.exp * 1e3 > Date.now() ? tr(c.resourceAccess, (u) => (u == null ? void 0 : u.roles) ?? []) : void 0;
|
|
201
329
|
}).catch(w);
|
|
202
330
|
}
|
|
203
331
|
return {
|
|
@@ -222,47 +350,47 @@ const H = re("__auth_state_private", () => {
|
|
|
222
350
|
*/
|
|
223
351
|
recalculateUserPermissions: i
|
|
224
352
|
};
|
|
225
|
-
}),
|
|
226
|
-
const n =
|
|
227
|
-
const o =
|
|
228
|
-
if (
|
|
353
|
+
}), Te = te("__auth_state", () => {
|
|
354
|
+
const n = P(() => {
|
|
355
|
+
const o = B();
|
|
356
|
+
if (D(o.jwtToken) && !D(o.jwtTokenUpdater)) {
|
|
229
357
|
const c = o.jwtTokenUpdater();
|
|
230
358
|
o.jwtToken = c, c.then((u) => {
|
|
231
|
-
o.jwtToken = Promise.resolve(u), o.recalculateUserPermissions();
|
|
359
|
+
o.jwtToken = Promise.resolve(u), fe.saveActualDataToStorage("sc.token", u, Ee(u)), o.recalculateUserPermissions();
|
|
232
360
|
}).catch(w);
|
|
233
361
|
}
|
|
234
362
|
return o.jwtToken;
|
|
235
363
|
});
|
|
236
364
|
function r(o) {
|
|
237
|
-
|
|
365
|
+
B().jwtTokenUpdater = o;
|
|
238
366
|
}
|
|
239
367
|
function e(o) {
|
|
240
|
-
const c =
|
|
241
|
-
c.jwtToken = Promise.resolve(o), c.recalculateUserPermissions();
|
|
368
|
+
const c = B();
|
|
369
|
+
c.jwtToken = Promise.resolve(o), fe.saveActualDataToStorage("sc.token", o, Ee(o)), c.recalculateUserPermissions();
|
|
242
370
|
}
|
|
243
371
|
function s() {
|
|
244
|
-
const o =
|
|
245
|
-
o.jwtToken = void 0, o.userPermissions = void 0;
|
|
372
|
+
const o = B();
|
|
373
|
+
o.jwtToken = void 0, o.userPermissions = void 0, fe.saveActualDataToStorage("sc.token", void 0);
|
|
246
374
|
}
|
|
247
375
|
function i(o) {
|
|
248
|
-
const c =
|
|
249
|
-
|
|
250
|
-
const m =
|
|
251
|
-
c.userPermissions = m.exp * 1e3 > Date.now() ?
|
|
376
|
+
const c = B();
|
|
377
|
+
!D(c.jwtToken) && D(c.userPermissions) && c.jwtToken.then((f) => {
|
|
378
|
+
const m = G.getJwtPayload(f);
|
|
379
|
+
c.userPermissions = m.exp * 1e3 > Date.now() ? tr(m.resourceAccess, (A) => (A == null ? void 0 : A.roles) ?? []) : void 0;
|
|
252
380
|
}).catch(w);
|
|
253
|
-
const u =
|
|
381
|
+
const u = Q(o) ? o.join(" && ") : o;
|
|
254
382
|
if (c.userPermissionsComputedRefs.has(u))
|
|
255
383
|
return c.userPermissionsComputedRefs.get(u);
|
|
256
|
-
const p =
|
|
384
|
+
const p = P(() => {
|
|
257
385
|
const f = (m) => {
|
|
258
|
-
var
|
|
259
|
-
const A =
|
|
386
|
+
var _;
|
|
387
|
+
const A = $r(m, ".");
|
|
260
388
|
if (A.length < 2)
|
|
261
389
|
return !1;
|
|
262
|
-
const [
|
|
263
|
-
return
|
|
390
|
+
const [I, d] = A, S = (_ = B().userPermissions) == null ? void 0 : _[I];
|
|
391
|
+
return Q(S) && S.includes(d);
|
|
264
392
|
};
|
|
265
|
-
return
|
|
393
|
+
return Q(o) ? Ar(o, (m) => f(m)) : f(o);
|
|
266
394
|
});
|
|
267
395
|
return c.userPermissionsComputedRefs.set(u, p), p;
|
|
268
396
|
}
|
|
@@ -295,7 +423,7 @@ const H = re("__auth_state_private", () => {
|
|
|
295
423
|
hasUserPermission: i
|
|
296
424
|
};
|
|
297
425
|
});
|
|
298
|
-
class
|
|
426
|
+
class H {
|
|
299
427
|
/**
|
|
300
428
|
* Инициализирует экземпляр класса {@link Identity}.
|
|
301
429
|
*
|
|
@@ -311,16 +439,16 @@ class M {
|
|
|
311
439
|
* @inheritDoc
|
|
312
440
|
*/
|
|
313
441
|
t(this, "guid");
|
|
314
|
-
this.id = r == null ? void 0 : r.id,
|
|
442
|
+
this.id = r == null ? void 0 : r.id, D(this.id) && (D(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) ?? "";
|
|
315
443
|
}
|
|
316
444
|
/**
|
|
317
445
|
* Возвращает признак, что это новая запись.
|
|
318
446
|
*/
|
|
319
447
|
isNewRec() {
|
|
320
|
-
return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" :
|
|
448
|
+
return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : D(this.id);
|
|
321
449
|
}
|
|
322
450
|
}
|
|
323
|
-
class b extends
|
|
451
|
+
class b extends H {
|
|
324
452
|
/**
|
|
325
453
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
326
454
|
*
|
|
@@ -335,7 +463,7 @@ class b extends M {
|
|
|
335
463
|
this.name = (e == null ? void 0 : e.name) ?? "";
|
|
336
464
|
}
|
|
337
465
|
}
|
|
338
|
-
class
|
|
466
|
+
class oe extends b {
|
|
339
467
|
/**
|
|
340
468
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
341
469
|
*
|
|
@@ -350,7 +478,7 @@ class ne extends b {
|
|
|
350
478
|
this.code = (e == null ? void 0 : e.code) ?? "";
|
|
351
479
|
}
|
|
352
480
|
}
|
|
353
|
-
class
|
|
481
|
+
class nr extends oe {
|
|
354
482
|
/**
|
|
355
483
|
* Инициализирует экземпляр класса {@link CatalogableItem}.
|
|
356
484
|
*
|
|
@@ -369,7 +497,7 @@ class tr extends ne {
|
|
|
369
497
|
this.slug = (e == null ? void 0 : e.slug) ?? "";
|
|
370
498
|
}
|
|
371
499
|
}
|
|
372
|
-
class
|
|
500
|
+
class xe extends nr {
|
|
373
501
|
/**
|
|
374
502
|
* Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
|
|
375
503
|
*
|
|
@@ -384,7 +512,7 @@ class ke extends tr {
|
|
|
384
512
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
385
513
|
}
|
|
386
514
|
}
|
|
387
|
-
class
|
|
515
|
+
class he extends xe {
|
|
388
516
|
/**
|
|
389
517
|
* Инициализирует экземпляр класса {@link BaseCategory}.
|
|
390
518
|
*
|
|
@@ -408,11 +536,11 @@ class pe extends ke {
|
|
|
408
536
|
* Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
|
|
409
537
|
*/
|
|
410
538
|
t(this, "currencyRates");
|
|
411
|
-
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]) => [
|
|
539
|
+
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]) => [Tr(s), i])) : void 0;
|
|
412
540
|
}
|
|
413
541
|
}
|
|
414
|
-
var
|
|
415
|
-
class
|
|
542
|
+
var or = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(or || {});
|
|
543
|
+
class a extends b {
|
|
416
544
|
/**
|
|
417
545
|
* Инициализирует экземпляр класса {@link Reference}.
|
|
418
546
|
*
|
|
@@ -431,15 +559,15 @@ class P extends b {
|
|
|
431
559
|
this.description = e == null ? void 0 : e.description, this.slug = e == null ? void 0 : e.slug;
|
|
432
560
|
}
|
|
433
561
|
}
|
|
434
|
-
class Re extends
|
|
562
|
+
class Re extends a {
|
|
435
563
|
/**
|
|
436
564
|
* Возвращает значение справочника коэффициента розничной цены.
|
|
437
565
|
*/
|
|
438
566
|
static getRetailPriceCoefficient() {
|
|
439
|
-
return { id: -2, slug:
|
|
567
|
+
return { id: -2, slug: or.Retail, name: "Розн. цена", guid: "", isNewRec: br(!0) };
|
|
440
568
|
}
|
|
441
569
|
}
|
|
442
|
-
class
|
|
570
|
+
class Ge {
|
|
443
571
|
/**
|
|
444
572
|
* Инициализирует экземпляр класса {@link ProductPriceCoefficient}.
|
|
445
573
|
*
|
|
@@ -469,7 +597,7 @@ class qe {
|
|
|
469
597
|
this.coefficient = new Re(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;
|
|
470
598
|
}
|
|
471
599
|
}
|
|
472
|
-
class
|
|
600
|
+
class cr {
|
|
473
601
|
/**
|
|
474
602
|
* Инициализирует экземпляр класса {@link GeoCoordinates}.
|
|
475
603
|
*
|
|
@@ -487,9 +615,9 @@ class ir {
|
|
|
487
615
|
this.lat = (r == null ? void 0 : r.lat) ?? 0, this.long = (r == null ? void 0 : r.long) ?? 0;
|
|
488
616
|
}
|
|
489
617
|
}
|
|
490
|
-
class
|
|
618
|
+
class X extends a {
|
|
491
619
|
}
|
|
492
|
-
class
|
|
620
|
+
class De extends a {
|
|
493
621
|
/**
|
|
494
622
|
* Инициализирует экземпляр класса {@link Warehouse}.
|
|
495
623
|
*
|
|
@@ -518,10 +646,10 @@ class ae extends P {
|
|
|
518
646
|
* Координаты склада.
|
|
519
647
|
*/
|
|
520
648
|
t(this, "coordinates");
|
|
521
|
-
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
|
|
649
|
+
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 X(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new cr(e == null ? void 0 : e.coordinates);
|
|
522
650
|
}
|
|
523
651
|
}
|
|
524
|
-
class
|
|
652
|
+
class Mr {
|
|
525
653
|
/**
|
|
526
654
|
* Инициализирует экземпляр класса {@link StockCount}.
|
|
527
655
|
*
|
|
@@ -536,10 +664,10 @@ class jr {
|
|
|
536
664
|
* Количество остатков товара на складе.
|
|
537
665
|
*/
|
|
538
666
|
t(this, "count");
|
|
539
|
-
this.warehouse = new
|
|
667
|
+
this.warehouse = new De(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
540
668
|
}
|
|
541
669
|
}
|
|
542
|
-
class
|
|
670
|
+
class Hr extends nr {
|
|
543
671
|
/**
|
|
544
672
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
545
673
|
*
|
|
@@ -554,7 +682,7 @@ class Fr extends tr {
|
|
|
554
682
|
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1;
|
|
555
683
|
}
|
|
556
684
|
}
|
|
557
|
-
class
|
|
685
|
+
class Br {
|
|
558
686
|
/**
|
|
559
687
|
* Инициализирует экземпляр класса {@link Image}.
|
|
560
688
|
*
|
|
@@ -577,7 +705,7 @@ class Mr {
|
|
|
577
705
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
578
706
|
}
|
|
579
707
|
}
|
|
580
|
-
class x extends
|
|
708
|
+
class x extends Hr {
|
|
581
709
|
/**
|
|
582
710
|
* Инициализирует экземпляр класса {@link Product}.
|
|
583
711
|
*
|
|
@@ -662,9 +790,9 @@ class x extends Fr {
|
|
|
662
790
|
* Список коэффициентов цен на продукт.
|
|
663
791
|
*/
|
|
664
792
|
t(this, "priceCoefficients");
|
|
665
|
-
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 = C(e == null ? void 0 : e.costDate) ? v(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((p) => new
|
|
793
|
+
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 = C(e == null ? void 0 : e.costDate) ? v(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((p) => new Mr(p))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
|
|
666
794
|
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((p) => p.isPrimary));
|
|
667
|
-
s && (this.category = new
|
|
795
|
+
s && (this.category = new xe({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new xe(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new Br(p, T.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 = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((p) => new Ge(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
668
796
|
}
|
|
669
797
|
/**
|
|
670
798
|
* Возвращает признак, что это измеряемый товар.
|
|
@@ -687,7 +815,7 @@ class x extends Fr {
|
|
|
687
815
|
return this.retailCostRub ?? this.costRub;
|
|
688
816
|
}
|
|
689
817
|
}
|
|
690
|
-
class
|
|
818
|
+
class zr extends H {
|
|
691
819
|
/**
|
|
692
820
|
* Инициализирует экземпляр класса {@link CartItemBase}.
|
|
693
821
|
*
|
|
@@ -739,10 +867,10 @@ class Hr extends M {
|
|
|
739
867
|
* Признак того, что позиция является дополнительной продажей.
|
|
740
868
|
*/
|
|
741
869
|
t(this, "isAdditionalSale");
|
|
742
|
-
this.product = new x(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new
|
|
870
|
+
this.product = new x(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new he(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Sr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
|
|
743
871
|
}
|
|
744
872
|
}
|
|
745
|
-
class
|
|
873
|
+
class Er extends zr {
|
|
746
874
|
/**
|
|
747
875
|
* Инициализирует экземпляр класса {@link CartItem}.
|
|
748
876
|
*
|
|
@@ -792,7 +920,7 @@ class Br extends Hr {
|
|
|
792
920
|
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;
|
|
793
921
|
}
|
|
794
922
|
}
|
|
795
|
-
class
|
|
923
|
+
class me {
|
|
796
924
|
/**
|
|
797
925
|
* Инициализирует экземпляр класса {@link Cart}.
|
|
798
926
|
*
|
|
@@ -811,10 +939,10 @@ class ge {
|
|
|
811
939
|
* Список итоговых сумм по направлениям продаж.
|
|
812
940
|
*/
|
|
813
941
|
t(this, "directionsSum");
|
|
814
|
-
this.items = r.items.map((e) => new
|
|
942
|
+
this.items = r.items.map((e) => new Er(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
|
|
815
943
|
}
|
|
816
944
|
}
|
|
817
|
-
class
|
|
945
|
+
class Fe {
|
|
818
946
|
/**
|
|
819
947
|
* Инициализирует экземпляр указанного класса.
|
|
820
948
|
*
|
|
@@ -872,7 +1000,7 @@ const L = class L {
|
|
|
872
1000
|
// eslint-disable-next-line class-methods-use-this
|
|
873
1001
|
t(this, "authRequestInterceptor", async (r) => {
|
|
874
1002
|
let e;
|
|
875
|
-
return
|
|
1003
|
+
return D(Te().jwtToken) || (e = await Te().jwtToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
|
|
876
1004
|
});
|
|
877
1005
|
/**
|
|
878
1006
|
* Перехватчик запроса для преобразования данных запроса.
|
|
@@ -880,7 +1008,7 @@ const L = class L {
|
|
|
880
1008
|
* @param request Данные запроса.
|
|
881
1009
|
*/
|
|
882
1010
|
// eslint-disable-next-line class-methods-use-this
|
|
883
|
-
t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params =
|
|
1011
|
+
t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = Be(r.params)), ["put", "patch", "post"].includes(_r(r.method)) && r.data && (r.data = Be(r.data))), r));
|
|
884
1012
|
/**
|
|
885
1013
|
* Перехватчик ошибок ответов на запрос.
|
|
886
1014
|
*
|
|
@@ -889,7 +1017,7 @@ const L = class L {
|
|
|
889
1017
|
t(this, "authErrorsResponseInterceptors", (r) => {
|
|
890
1018
|
var s;
|
|
891
1019
|
const e = r.rawError ? (s = r.rawError) == null ? void 0 : s.config : void 0;
|
|
892
|
-
return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (
|
|
1020
|
+
return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (Te().invalidateJwtToken(), e.__isRetryRequest = !0, this.httpClient(e)) : Promise.reject(r);
|
|
893
1021
|
});
|
|
894
1022
|
/**
|
|
895
1023
|
* Перехватчик ответа для преобразования данных ответа на запрос.
|
|
@@ -897,9 +1025,9 @@ const L = class L {
|
|
|
897
1025
|
* @param response Данные ответа на запрос.
|
|
898
1026
|
*/
|
|
899
1027
|
// eslint-disable-next-line class-methods-use-this
|
|
900
|
-
t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data =
|
|
1028
|
+
t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = Ue(r.data)), r));
|
|
901
1029
|
const r = T.getConfig().version;
|
|
902
|
-
this.errorResponseHandler = L.defaultErrorsResponseHandler, this.httpClient =
|
|
1030
|
+
this.errorResponseHandler = L.defaultErrorsResponseHandler, this.httpClient = jr.create({
|
|
903
1031
|
headers: {
|
|
904
1032
|
"APP-VERSION": `${r.name} (${r.version}, ${q(r.date, T.getConfig().dateFormats.uiDate)})`,
|
|
905
1033
|
Accept: "application/json",
|
|
@@ -930,7 +1058,7 @@ const L = class L {
|
|
|
930
1058
|
* @param type Тип данных, которыми оперирует метод.
|
|
931
1059
|
*/
|
|
932
1060
|
static getInstance(r) {
|
|
933
|
-
return Object.prototype.hasOwnProperty.call(L.instances, r.name) || (L.instances[r.name] =
|
|
1061
|
+
return Object.prototype.hasOwnProperty.call(L.instances, r.name) || (L.instances[r.name] = Fe.simpleInstanceInitializer(r)), L.instances[r.name];
|
|
934
1062
|
}
|
|
935
1063
|
/**
|
|
936
1064
|
* Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
|
|
@@ -939,7 +1067,7 @@ const L = class L {
|
|
|
939
1067
|
*/
|
|
940
1068
|
static convertHttpErrorResponse(r) {
|
|
941
1069
|
var e, s;
|
|
942
|
-
if (
|
|
1070
|
+
if (!D(r.request) || !D(r.response)) {
|
|
943
1071
|
const i = r == null ? void 0 : r.response;
|
|
944
1072
|
return Promise.reject({
|
|
945
1073
|
status: (i == null ? void 0 : i.status) ?? 0,
|
|
@@ -1037,7 +1165,7 @@ t(L, "instances", {}), /**
|
|
|
1037
1165
|
*/
|
|
1038
1166
|
t(L, "defaultErrorsResponseHandler", w);
|
|
1039
1167
|
let h = L;
|
|
1040
|
-
class
|
|
1168
|
+
class Ot extends h {
|
|
1041
1169
|
/**
|
|
1042
1170
|
* Возвращает содержимое корзины указанного клиента.
|
|
1043
1171
|
*
|
|
@@ -1046,7 +1174,7 @@ class xt extends h {
|
|
|
1046
1174
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_get
|
|
1047
1175
|
*/
|
|
1048
1176
|
getCart(r) {
|
|
1049
|
-
return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new
|
|
1177
|
+
return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new me(e.data));
|
|
1050
1178
|
}
|
|
1051
1179
|
/**
|
|
1052
1180
|
* Удаляет всё содержимое корзины.
|
|
@@ -1084,7 +1212,7 @@ class xt extends h {
|
|
|
1084
1212
|
isAdditionalSale: e.isAdditionalSale,
|
|
1085
1213
|
...e.configuratorParams
|
|
1086
1214
|
},
|
|
1087
|
-
(i) => new
|
|
1215
|
+
(i) => new me(i.data),
|
|
1088
1216
|
s
|
|
1089
1217
|
);
|
|
1090
1218
|
}
|
|
@@ -1114,7 +1242,7 @@ class xt extends h {
|
|
|
1114
1242
|
isAdditionalSale: e.isAdditionalSale,
|
|
1115
1243
|
...e.configuratorParams
|
|
1116
1244
|
},
|
|
1117
|
-
(i) => new
|
|
1245
|
+
(i) => new me(i.data),
|
|
1118
1246
|
s
|
|
1119
1247
|
);
|
|
1120
1248
|
}
|
|
@@ -1138,7 +1266,7 @@ class xt extends h {
|
|
|
1138
1266
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_add_products_from_csv
|
|
1139
1267
|
*/
|
|
1140
1268
|
addCartItemFromCSV(r, e) {
|
|
1141
|
-
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, e, (s) => new
|
|
1269
|
+
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, e, (s) => new me(s.data));
|
|
1142
1270
|
}
|
|
1143
1271
|
/**
|
|
1144
1272
|
* Возвращает пример CSV файла для добавления продуктов в корзину.
|
|
@@ -1151,8 +1279,8 @@ class xt extends h {
|
|
|
1151
1279
|
return this.get(`internal/clients/${r.id}/cart/add-products-from-csv/example`, {}, (e) => new Blob([e.data], { type: "text/csv" }));
|
|
1152
1280
|
}
|
|
1153
1281
|
}
|
|
1154
|
-
var
|
|
1155
|
-
class
|
|
1282
|
+
var Wr = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(Wr || {}), je = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(je || {}), Jr = /* @__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))(Jr || {});
|
|
1283
|
+
class E extends he {
|
|
1156
1284
|
/**
|
|
1157
1285
|
* Инициализирует экземпляр класса {@link Category}.
|
|
1158
1286
|
*
|
|
@@ -1169,10 +1297,10 @@ class z extends pe {
|
|
|
1169
1297
|
* Список продуктов категории.
|
|
1170
1298
|
*/
|
|
1171
1299
|
t(this, "products");
|
|
1172
|
-
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new
|
|
1300
|
+
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new E(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new x(o));
|
|
1173
1301
|
}
|
|
1174
1302
|
}
|
|
1175
|
-
class
|
|
1303
|
+
class lr extends b {
|
|
1176
1304
|
/**
|
|
1177
1305
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1178
1306
|
*
|
|
@@ -1187,7 +1315,7 @@ class nr extends b {
|
|
|
1187
1315
|
this.updatedAt = C(e == null ? void 0 : e.updatedAt) ? v(e.updatedAt) : e == null ? void 0 : e.updatedAt;
|
|
1188
1316
|
}
|
|
1189
1317
|
}
|
|
1190
|
-
class
|
|
1318
|
+
class Vr extends lr {
|
|
1191
1319
|
/**
|
|
1192
1320
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1193
1321
|
*
|
|
@@ -1202,41 +1330,7 @@ class Er extends nr {
|
|
|
1202
1330
|
this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? v(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1203
1331
|
}
|
|
1204
1332
|
}
|
|
1205
|
-
class
|
|
1206
|
-
/**
|
|
1207
|
-
* Возвращает актуальные и не просроченные данные из хранилища.
|
|
1208
|
-
*
|
|
1209
|
-
* @param keyName Название ключа из которого необходимо получить данные.
|
|
1210
|
-
*/
|
|
1211
|
-
static getActualDataFromStorage(r) {
|
|
1212
|
-
const e = localStorage.getItem(r);
|
|
1213
|
-
if (e)
|
|
1214
|
-
try {
|
|
1215
|
-
const s = JSON.parse(e);
|
|
1216
|
-
if (Sr(v(s.availableFor) || rr(), /* @__PURE__ */ new Date()))
|
|
1217
|
-
return s.data ?? {};
|
|
1218
|
-
} catch {
|
|
1219
|
-
localStorage.removeItem(r);
|
|
1220
|
-
}
|
|
1221
|
-
}
|
|
1222
|
-
/**
|
|
1223
|
-
* Сохраняет данные в хранилище.
|
|
1224
|
-
*
|
|
1225
|
-
* @param keyName Название ключа в который необходимо сохранить данные.
|
|
1226
|
-
* @param data Данные, которые необходимо сохранить.
|
|
1227
|
-
* @param availableFor Дата и время до которого будут храниться настройки.
|
|
1228
|
-
*/
|
|
1229
|
-
static saveActualDataToStorage(r, e, s) {
|
|
1230
|
-
localStorage.setItem(
|
|
1231
|
-
r,
|
|
1232
|
-
JSON.stringify({
|
|
1233
|
-
availableFor: s,
|
|
1234
|
-
data: e
|
|
1235
|
-
})
|
|
1236
|
-
);
|
|
1237
|
-
}
|
|
1238
|
-
}
|
|
1239
|
-
class G extends b {
|
|
1333
|
+
class F extends b {
|
|
1240
1334
|
/**
|
|
1241
1335
|
* Инициализирует экземпляр класса {@link UserShortInfo}.
|
|
1242
1336
|
*
|
|
@@ -1251,7 +1345,7 @@ class G extends b {
|
|
|
1251
1345
|
this.type = e == null ? void 0 : e.type;
|
|
1252
1346
|
}
|
|
1253
1347
|
}
|
|
1254
|
-
class
|
|
1348
|
+
class Kr extends b {
|
|
1255
1349
|
/**
|
|
1256
1350
|
* Инициализирует экземпляр класса {@link DiscountShortInfo}.
|
|
1257
1351
|
*
|
|
@@ -1287,10 +1381,10 @@ class Jr extends b {
|
|
|
1287
1381
|
* Дата и время удаления.
|
|
1288
1382
|
*/
|
|
1289
1383
|
t(this, "deletedAt");
|
|
1290
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = C(e == null ? void 0 : e.publishedAt) ? v(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
|
|
1384
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = C(e == null ? void 0 : e.publishedAt) ? v(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 F(e == null ? void 0 : e.owner), this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? v(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1291
1385
|
}
|
|
1292
1386
|
}
|
|
1293
|
-
class W extends
|
|
1387
|
+
class W extends lr {
|
|
1294
1388
|
/**
|
|
1295
1389
|
* Инициализирует экземпляр класса {@link PriceTemplate}.
|
|
1296
1390
|
*
|
|
@@ -1309,7 +1403,7 @@ class W extends nr {
|
|
|
1309
1403
|
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = C(e == null ? void 0 : e.createdAt) ? v(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
|
|
1310
1404
|
}
|
|
1311
1405
|
}
|
|
1312
|
-
class
|
|
1406
|
+
class Z extends x {
|
|
1313
1407
|
/**
|
|
1314
1408
|
* Инициализирует экземпляр класса {@link ClientProduct}.
|
|
1315
1409
|
*
|
|
@@ -1345,10 +1439,10 @@ class X extends x {
|
|
|
1345
1439
|
* Признак того, что указанный продукт входит в список избранных продуктов клиента.
|
|
1346
1440
|
*/
|
|
1347
1441
|
t(this, "isFavorite");
|
|
1348
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ??
|
|
1442
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? je.Product, this.discount = e != null && e.discount ? new Kr(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new W(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;
|
|
1349
1443
|
}
|
|
1350
1444
|
}
|
|
1351
|
-
class
|
|
1445
|
+
class Qr {
|
|
1352
1446
|
/**
|
|
1353
1447
|
* Инициализирует экземпляр класса {@link ContactLinks}.
|
|
1354
1448
|
*
|
|
@@ -1366,9 +1460,9 @@ class Vr {
|
|
|
1366
1460
|
this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
|
|
1367
1461
|
}
|
|
1368
1462
|
}
|
|
1369
|
-
class N extends
|
|
1463
|
+
class N extends a {
|
|
1370
1464
|
}
|
|
1371
|
-
class
|
|
1465
|
+
class ce extends b {
|
|
1372
1466
|
/**
|
|
1373
1467
|
* Инициализирует экземпляр класса {@link ManagerCommon}.
|
|
1374
1468
|
*
|
|
@@ -1377,25 +1471,29 @@ class oe extends b {
|
|
|
1377
1471
|
constructor(e) {
|
|
1378
1472
|
super(e);
|
|
1379
1473
|
/**
|
|
1380
|
-
*
|
|
1474
|
+
* @inheritDoc
|
|
1381
1475
|
*/
|
|
1382
|
-
t(this, "salesDirection"
|
|
1476
|
+
t(this, "salesDirection");
|
|
1383
1477
|
/**
|
|
1384
|
-
*
|
|
1478
|
+
* @inheritDoc
|
|
1385
1479
|
*/
|
|
1386
1480
|
t(this, "photo");
|
|
1387
1481
|
/**
|
|
1388
|
-
*
|
|
1482
|
+
* @inheritDoc
|
|
1389
1483
|
*/
|
|
1390
1484
|
t(this, "contacts");
|
|
1391
1485
|
/**
|
|
1392
|
-
*
|
|
1486
|
+
* @inheritDoc
|
|
1393
1487
|
*/
|
|
1394
1488
|
t(this, "isDefault");
|
|
1395
|
-
|
|
1489
|
+
/**
|
|
1490
|
+
* @inheritDoc
|
|
1491
|
+
*/
|
|
1492
|
+
t(this, "isRegionalDirector");
|
|
1493
|
+
this.salesDirection = e != null && e.salesDirection ? new N(e.salesDirection) : new N(), this.photo = e == null ? void 0 : e.photo, this.contacts = e != null && e.contacts ? new Qr(e.contacts) : void 0, this.isDefault = (e == null ? void 0 : e.isDefault) ?? !1, this.isRegionalDirector = (e == null ? void 0 : e.isRegionalDirector) ?? !1;
|
|
1396
1494
|
}
|
|
1397
1495
|
}
|
|
1398
|
-
class
|
|
1496
|
+
class Yr extends b {
|
|
1399
1497
|
/**
|
|
1400
1498
|
* Инициализирует экземпляр класса {@link IUserPricingRole}.
|
|
1401
1499
|
*
|
|
@@ -1418,7 +1516,7 @@ class Kr extends b {
|
|
|
1418
1516
|
this.description = e.description, this.canChangeLowCost = e.canChangeLowCost, this.parentRoleId = e.parentRoleId;
|
|
1419
1517
|
}
|
|
1420
1518
|
}
|
|
1421
|
-
class Ae extends
|
|
1519
|
+
class Ae extends ce {
|
|
1422
1520
|
/**
|
|
1423
1521
|
* Инициализирует экземпляр класса {@link Manager}.
|
|
1424
1522
|
*
|
|
@@ -1450,10 +1548,10 @@ class Ae extends oe {
|
|
|
1450
1548
|
* Данные роли ценообразования менеджера.
|
|
1451
1549
|
*/
|
|
1452
1550
|
t(this, "pricingRole");
|
|
1453
|
-
this.isActive = (e == null ? void 0 : e.isActive) ?? !1, this.isSupervisor = (e == null ? void 0 : e.isSupervisor) ?? !1, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.createdAt = e == null ? void 0 : e.createdAt, this.supervisorId = e == null ? void 0 : e.supervisorId, this.pricingRole = e != null && e.pricingRole ? new
|
|
1551
|
+
this.isActive = (e == null ? void 0 : e.isActive) ?? !1, this.isSupervisor = (e == null ? void 0 : e.isSupervisor) ?? !1, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.createdAt = e == null ? void 0 : e.createdAt, this.supervisorId = e == null ? void 0 : e.supervisorId, this.pricingRole = e != null && e.pricingRole ? new Yr(e.pricingRole) : void 0;
|
|
1454
1552
|
}
|
|
1455
1553
|
}
|
|
1456
|
-
class
|
|
1554
|
+
class Xr extends he {
|
|
1457
1555
|
/**
|
|
1458
1556
|
* Инициализирует экземпляр класса {@link BaseClientCategory}.
|
|
1459
1557
|
*
|
|
@@ -1484,7 +1582,7 @@ class Qr extends pe {
|
|
|
1484
1582
|
this.isDisabled = (e == null ? void 0 : e.isDisabled) ?? !1, this.isRequired = (e == null ? void 0 : e.isRequired) ?? !1, this.isFavorite = (e == null ? void 0 : e.isFavorite) ?? !1, this.hidingComment = e == null ? void 0 : e.hidingComment, this.manager = e != null && e.manager ? new Ae(e.manager) : void 0;
|
|
1485
1583
|
}
|
|
1486
1584
|
}
|
|
1487
|
-
class
|
|
1585
|
+
class we extends Xr {
|
|
1488
1586
|
/**
|
|
1489
1587
|
* Инициализирует экземпляр класса {@link ClientCategory}.
|
|
1490
1588
|
*
|
|
@@ -1501,10 +1599,10 @@ class fe extends Qr {
|
|
|
1501
1599
|
* Список продуктов категории.
|
|
1502
1600
|
*/
|
|
1503
1601
|
t(this, "products");
|
|
1504
|
-
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new
|
|
1602
|
+
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new we(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new Z(o));
|
|
1505
1603
|
}
|
|
1506
1604
|
}
|
|
1507
|
-
class
|
|
1605
|
+
class ur {
|
|
1508
1606
|
/**
|
|
1509
1607
|
* Инициализирует экземпляр класса {@link PriceTemplateICatalogableItem}.
|
|
1510
1608
|
*
|
|
@@ -1522,7 +1620,7 @@ class or {
|
|
|
1522
1620
|
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new Re(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
|
|
1523
1621
|
}
|
|
1524
1622
|
}
|
|
1525
|
-
class
|
|
1623
|
+
class be extends ur {
|
|
1526
1624
|
/**
|
|
1527
1625
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1528
1626
|
*
|
|
@@ -1534,12 +1632,12 @@ class Te extends or {
|
|
|
1534
1632
|
* Базовые данные о продукте.
|
|
1535
1633
|
*/
|
|
1536
1634
|
t(this, "productCategory");
|
|
1537
|
-
this.productCategory = new
|
|
1635
|
+
this.productCategory = new he(e == null ? void 0 : e.productCategory);
|
|
1538
1636
|
}
|
|
1539
1637
|
}
|
|
1540
|
-
class
|
|
1638
|
+
class ee extends a {
|
|
1541
1639
|
}
|
|
1542
|
-
class
|
|
1640
|
+
class le extends a {
|
|
1543
1641
|
/**
|
|
1544
1642
|
* Инициализирует экземпляр класса {@link Region}.
|
|
1545
1643
|
*
|
|
@@ -1550,11 +1648,11 @@ class ce extends P {
|
|
|
1550
1648
|
/**
|
|
1551
1649
|
* Данные о стране, в которой расположен регион.
|
|
1552
1650
|
*/
|
|
1553
|
-
t(this, "country", new
|
|
1554
|
-
e && (this.country = new
|
|
1651
|
+
t(this, "country", new ee());
|
|
1652
|
+
e && (this.country = new ee(e.country));
|
|
1555
1653
|
}
|
|
1556
1654
|
}
|
|
1557
|
-
class
|
|
1655
|
+
class Me extends a {
|
|
1558
1656
|
/**
|
|
1559
1657
|
* Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
|
|
1560
1658
|
*
|
|
@@ -1565,11 +1663,11 @@ class je extends P {
|
|
|
1565
1663
|
/**
|
|
1566
1664
|
* Данные о регионе, в котором расположен город.
|
|
1567
1665
|
*/
|
|
1568
|
-
t(this, "region", new
|
|
1569
|
-
e && (this.region = new
|
|
1666
|
+
t(this, "region", new le());
|
|
1667
|
+
e && (this.region = new le(e.region));
|
|
1570
1668
|
}
|
|
1571
1669
|
}
|
|
1572
|
-
class
|
|
1670
|
+
class pr extends b {
|
|
1573
1671
|
/**
|
|
1574
1672
|
* Инициализирует экземпляр класса {@link UserCommonInfo}.
|
|
1575
1673
|
*
|
|
@@ -1608,7 +1706,7 @@ class cr extends b {
|
|
|
1608
1706
|
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 N(e.salesDirection) : void 0, this.createdAt = C(e == null ? void 0 : e.createdAt) ? v(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = C(e == null ? void 0 : e.lastLoginAt) ? v(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
1609
1707
|
}
|
|
1610
1708
|
}
|
|
1611
|
-
class
|
|
1709
|
+
class ge extends pr {
|
|
1612
1710
|
/**
|
|
1613
1711
|
* Инициализирует экземпляр класса {@link Client}.
|
|
1614
1712
|
*
|
|
@@ -1650,10 +1748,10 @@ class he extends cr {
|
|
|
1650
1748
|
* Список менеджеров клиента.
|
|
1651
1749
|
*/
|
|
1652
1750
|
t(this, "managers");
|
|
1653
|
-
this.salesDirection = new N(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
|
|
1751
|
+
this.salesDirection = new N(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 Me(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 ce(i))) ?? [];
|
|
1654
1752
|
}
|
|
1655
1753
|
}
|
|
1656
|
-
class
|
|
1754
|
+
class se extends H {
|
|
1657
1755
|
/**
|
|
1658
1756
|
* Инициализирует новый экземпляр класса.
|
|
1659
1757
|
*
|
|
@@ -1677,10 +1775,10 @@ class te extends M {
|
|
|
1677
1775
|
* Данные шаблона прайс-листа.
|
|
1678
1776
|
*/
|
|
1679
1777
|
t(this, "priceTemplate");
|
|
1680
|
-
this.createdAt = C(e == null ? void 0 : e.createdAt) ? v(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? v(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new
|
|
1778
|
+
this.createdAt = C(e == null ? void 0 : e.createdAt) ? v(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? v(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new ge(e == null ? void 0 : e.client), this.priceTemplate = new W(e == null ? void 0 : e.priceTemplate);
|
|
1681
1779
|
}
|
|
1682
1780
|
}
|
|
1683
|
-
class
|
|
1781
|
+
class Se extends ur {
|
|
1684
1782
|
/**
|
|
1685
1783
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1686
1784
|
*
|
|
@@ -1695,9 +1793,9 @@ class be extends or {
|
|
|
1695
1793
|
this.product = new x(e == null ? void 0 : e.product);
|
|
1696
1794
|
}
|
|
1697
1795
|
}
|
|
1698
|
-
class
|
|
1796
|
+
class hr extends a {
|
|
1699
1797
|
}
|
|
1700
|
-
class
|
|
1798
|
+
class ie extends b {
|
|
1701
1799
|
/**
|
|
1702
1800
|
* Инициализирует экземпляр класса {@link Property}.
|
|
1703
1801
|
*
|
|
@@ -1717,10 +1815,10 @@ class se extends b {
|
|
|
1717
1815
|
* Дополнительные метаданные свойства.
|
|
1718
1816
|
*/
|
|
1719
1817
|
t(this, "metadata");
|
|
1720
|
-
this.type = new
|
|
1818
|
+
this.type = new hr(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata;
|
|
1721
1819
|
}
|
|
1722
1820
|
}
|
|
1723
|
-
class
|
|
1821
|
+
class z {
|
|
1724
1822
|
/**
|
|
1725
1823
|
* Инициализирует экземпляр класса {@link PropertyValue}.
|
|
1726
1824
|
*
|
|
@@ -1736,7 +1834,7 @@ class B {
|
|
|
1736
1834
|
* Может быть строкой, числом, boolean, диапазоном или JSON объектом.
|
|
1737
1835
|
*/
|
|
1738
1836
|
t(this, "value");
|
|
1739
|
-
this.property = new
|
|
1837
|
+
this.property = new ie(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
|
|
1740
1838
|
}
|
|
1741
1839
|
}
|
|
1742
1840
|
class O {
|
|
@@ -1757,7 +1855,7 @@ class O {
|
|
|
1757
1855
|
this.from = C(r == null ? void 0 : r.from) ? v(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = C(r == null ? void 0 : r.to) ? v(r.to) : (r == null ? void 0 : r.to) ?? null;
|
|
1758
1856
|
}
|
|
1759
1857
|
}
|
|
1760
|
-
class
|
|
1858
|
+
class qt {
|
|
1761
1859
|
/**
|
|
1762
1860
|
* Инициализирует экземпляр класса {@link TemplatesListFilters}.
|
|
1763
1861
|
*
|
|
@@ -1817,11 +1915,11 @@ class Ot {
|
|
|
1817
1915
|
return Object.keys(this).forEach((c) => {
|
|
1818
1916
|
const u = this[c];
|
|
1819
1917
|
// eslint-disable-next-line prettier/prettier
|
|
1820
|
-
|
|
1918
|
+
D(u) || C(u) && u.trim().length === 0 || qe(u.isNewRec) && u.isNewRec() || (r[c] = u);
|
|
1821
1919
|
}), !((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;
|
|
1822
1920
|
}
|
|
1823
1921
|
}
|
|
1824
|
-
class
|
|
1922
|
+
class ne extends b {
|
|
1825
1923
|
/**
|
|
1826
1924
|
* Инициализирует экземпляр класса {@link PricingRole}.
|
|
1827
1925
|
*
|
|
@@ -1856,7 +1954,7 @@ class ie extends b {
|
|
|
1856
1954
|
this.description = e == null ? void 0 : e.description, this.canChangeLowCost = (e == null ? void 0 : e.canChangeLowCost) ?? !1, this.parentRoleId = e == null ? void 0 : e.parentRoleId;
|
|
1857
1955
|
}
|
|
1858
1956
|
}
|
|
1859
|
-
class
|
|
1957
|
+
class We {
|
|
1860
1958
|
/**
|
|
1861
1959
|
* Инициализирует экземпляр класса {@link PricingRoleCategoryRule}.
|
|
1862
1960
|
*
|
|
@@ -1875,10 +1973,10 @@ class He {
|
|
|
1875
1973
|
* Минимальный коэффициент цены.
|
|
1876
1974
|
*/
|
|
1877
1975
|
t(this, "minCoefficient");
|
|
1878
|
-
this.role = new
|
|
1976
|
+
this.role = new ne(r == null ? void 0 : r.role), this.category = new he(r == null ? void 0 : r.category), this.minCoefficient = new Re(r == null ? void 0 : r.minCoefficient);
|
|
1879
1977
|
}
|
|
1880
1978
|
}
|
|
1881
|
-
class
|
|
1979
|
+
class Zr {
|
|
1882
1980
|
/**
|
|
1883
1981
|
* Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
|
|
1884
1982
|
*
|
|
@@ -1900,7 +1998,7 @@ class Yr {
|
|
|
1900
1998
|
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;
|
|
1901
1999
|
}
|
|
1902
2000
|
}
|
|
1903
|
-
class
|
|
2001
|
+
class et {
|
|
1904
2002
|
/**
|
|
1905
2003
|
* Инициализирует экземпляр класса {@link HttpParamsConfig}.
|
|
1906
2004
|
*
|
|
@@ -1922,7 +2020,7 @@ class Xr {
|
|
|
1922
2020
|
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;
|
|
1923
2021
|
}
|
|
1924
2022
|
}
|
|
1925
|
-
class
|
|
2023
|
+
class rt {
|
|
1926
2024
|
/**
|
|
1927
2025
|
* Инициализирует экземпляр класса {@link SentryConfig}.
|
|
1928
2026
|
*
|
|
@@ -1967,7 +2065,7 @@ class Zr {
|
|
|
1967
2065
|
}, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
|
|
1968
2066
|
}
|
|
1969
2067
|
}
|
|
1970
|
-
class
|
|
2068
|
+
class tt {
|
|
1971
2069
|
/**
|
|
1972
2070
|
* Инициализирует экземпляр класса {@link VersionConfig}.
|
|
1973
2071
|
*
|
|
@@ -1989,7 +2087,7 @@ class et {
|
|
|
1989
2087
|
this.date = C(r == null ? void 0 : r.date) ? v(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";
|
|
1990
2088
|
}
|
|
1991
2089
|
}
|
|
1992
|
-
class
|
|
2090
|
+
class st {
|
|
1993
2091
|
/**
|
|
1994
2092
|
* Инициализирует экземпляр класса {@link WebSocketConfig}.
|
|
1995
2093
|
*
|
|
@@ -2028,7 +2126,7 @@ class rt {
|
|
|
2028
2126
|
this.broadcaster = r.broadcaster ?? "reverb", this.key = r.key ?? "", this.wsHost = r.wsHost ?? "", this.wsPort = r.wsPort ?? 8080, this.wssPort = r.wssPort ?? 8080, this.forceTLS = r.forceTLS ?? !1, this.enabledTransports = r.enabledTransports ?? ["wss"];
|
|
2029
2127
|
}
|
|
2030
2128
|
}
|
|
2031
|
-
class
|
|
2129
|
+
class Ut {
|
|
2032
2130
|
/**
|
|
2033
2131
|
* Инициализирует экземпляр класса {@link AppBaseConfig}.
|
|
2034
2132
|
*
|
|
@@ -2072,17 +2170,17 @@ class qt {
|
|
|
2072
2170
|
*/
|
|
2073
2171
|
t(this, "dateFormats");
|
|
2074
2172
|
var e, s, i;
|
|
2075
|
-
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new
|
|
2173
|
+
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new et(r == null ? void 0 : r.http), this.deviceTypeByResolution = new Zr(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new rt({
|
|
2076
2174
|
environment: this.environment,
|
|
2077
2175
|
...r == null ? void 0 : r.sentry
|
|
2078
|
-
}), this.urls = r == null ? void 0 : r.urls, this.version = new
|
|
2176
|
+
}), this.urls = r == null ? void 0 : r.urls, this.version = new tt(r == null ? void 0 : r.version), this.websocket = r != null && r.websocket ? new st(r.websocket) : void 0, this.dateFormats = {
|
|
2079
2177
|
api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
|
|
2080
2178
|
uiDate: ((s = r == null ? void 0 : r.dateFormats) == null ? void 0 : s.uiDate) ?? "dd.MM.yyyy",
|
|
2081
2179
|
uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
|
|
2082
2180
|
};
|
|
2083
2181
|
}
|
|
2084
2182
|
}
|
|
2085
|
-
class
|
|
2183
|
+
class Gt extends h {
|
|
2086
2184
|
/**
|
|
2087
2185
|
* Возвращает данные о результатах поиска категорий и товаров.
|
|
2088
2186
|
*
|
|
@@ -2113,7 +2211,7 @@ class Ut extends h {
|
|
|
2113
2211
|
return s && (c += `&category_id=${s}`), i && (c += `&client_id=${i}`), c;
|
|
2114
2212
|
}
|
|
2115
2213
|
}
|
|
2116
|
-
class
|
|
2214
|
+
class Ft extends h {
|
|
2117
2215
|
/**
|
|
2118
2216
|
* Импортирует цены клиента из CSV файла.
|
|
2119
2217
|
*
|
|
@@ -2237,7 +2335,7 @@ class Gt extends h {
|
|
|
2237
2335
|
price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
|
|
2238
2336
|
increase_percent: s.value
|
|
2239
2337
|
},
|
|
2240
|
-
(o) => new
|
|
2338
|
+
(o) => new Z(o.data)
|
|
2241
2339
|
);
|
|
2242
2340
|
}
|
|
2243
2341
|
/**
|
|
@@ -2249,7 +2347,7 @@ class Gt extends h {
|
|
|
2249
2347
|
* @see /doc/api/internal#/operations/api_internal_client_price_products_remove
|
|
2250
2348
|
*/
|
|
2251
2349
|
removeProductPrice(r, e) {
|
|
2252
|
-
return this.delete(`/internal/clients/${r}/price/products/${e}`, (s) => new
|
|
2350
|
+
return this.delete(`/internal/clients/${r}/price/products/${e}`, (s) => new Z(s.data));
|
|
2253
2351
|
}
|
|
2254
2352
|
/**
|
|
2255
2353
|
* Добавляет указанный продукт в список товаров для дополнительных продаж.
|
|
@@ -2324,7 +2422,7 @@ class jt extends h {
|
|
|
2324
2422
|
return this.get(
|
|
2325
2423
|
`/internal/clients/${r}/price/templates`,
|
|
2326
2424
|
{},
|
|
2327
|
-
(e) => e.data.map((s) => new
|
|
2425
|
+
(e) => e.data.map((s) => new se(s))
|
|
2328
2426
|
);
|
|
2329
2427
|
}
|
|
2330
2428
|
/**
|
|
@@ -2335,7 +2433,7 @@ class jt extends h {
|
|
|
2335
2433
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_get_active
|
|
2336
2434
|
*/
|
|
2337
2435
|
getActiveTemplate(r) {
|
|
2338
|
-
return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new
|
|
2436
|
+
return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new se(e.data));
|
|
2339
2437
|
}
|
|
2340
2438
|
/**
|
|
2341
2439
|
* Добавляет связь между клиентом и шаблоном прайс-листа.
|
|
@@ -2354,7 +2452,7 @@ class jt extends h {
|
|
|
2354
2452
|
startAt: s.startAt && q(s.startAt, i),
|
|
2355
2453
|
endAt: s.endAt && q(s.endAt, i)
|
|
2356
2454
|
},
|
|
2357
|
-
(o) => new
|
|
2455
|
+
(o) => new se(o.data),
|
|
2358
2456
|
{},
|
|
2359
2457
|
!0
|
|
2360
2458
|
);
|
|
@@ -2388,7 +2486,7 @@ class jt extends h {
|
|
|
2388
2486
|
startAt: i.startAt && q(i.startAt, o),
|
|
2389
2487
|
endAt: i.endAt && q(i.endAt, o)
|
|
2390
2488
|
},
|
|
2391
|
-
(c) => new
|
|
2489
|
+
(c) => new se(c.data)
|
|
2392
2490
|
);
|
|
2393
2491
|
}
|
|
2394
2492
|
/**
|
|
@@ -2404,7 +2502,7 @@ class jt extends h {
|
|
|
2404
2502
|
return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
|
|
2405
2503
|
}
|
|
2406
2504
|
}
|
|
2407
|
-
class
|
|
2505
|
+
class Mt extends h {
|
|
2408
2506
|
/**
|
|
2409
2507
|
* Возвращает список данных о корневых категориях.
|
|
2410
2508
|
*
|
|
@@ -2418,7 +2516,7 @@ class Ft extends h {
|
|
|
2418
2516
|
{
|
|
2419
2517
|
showHidden: r
|
|
2420
2518
|
},
|
|
2421
|
-
(e) => e.data.map((s) => new
|
|
2519
|
+
(e) => e.data.map((s) => new E(s))
|
|
2422
2520
|
);
|
|
2423
2521
|
}
|
|
2424
2522
|
/**
|
|
@@ -2437,7 +2535,7 @@ class Ft extends h {
|
|
|
2437
2535
|
showHidden: e,
|
|
2438
2536
|
withNestedCategories: s
|
|
2439
2537
|
},
|
|
2440
|
-
(i) => new
|
|
2538
|
+
(i) => new E(i.data)
|
|
2441
2539
|
);
|
|
2442
2540
|
}
|
|
2443
2541
|
/**
|
|
@@ -2446,7 +2544,7 @@ class Ft extends h {
|
|
|
2446
2544
|
* @param categoryID Идентификатор категории продуктов.
|
|
2447
2545
|
*/
|
|
2448
2546
|
getPublicCategoryData(r) {
|
|
2449
|
-
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new
|
|
2547
|
+
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new E(e.data));
|
|
2450
2548
|
}
|
|
2451
2549
|
/**
|
|
2452
2550
|
* Возвращает список продуктов категории.
|
|
@@ -2464,7 +2562,7 @@ class Ft extends h {
|
|
|
2464
2562
|
showHidden: s,
|
|
2465
2563
|
withPriceCoefficients: e
|
|
2466
2564
|
},
|
|
2467
|
-
(i) =>
|
|
2565
|
+
(i) => Pe(i.data, (o) => new x(o))
|
|
2468
2566
|
);
|
|
2469
2567
|
}
|
|
2470
2568
|
/**
|
|
@@ -2477,7 +2575,7 @@ class Ft extends h {
|
|
|
2477
2575
|
getCategoryProductsCoefficients(r) {
|
|
2478
2576
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
2479
2577
|
const { data: s } = e;
|
|
2480
|
-
return
|
|
2578
|
+
return Ir(s, (i) => i.map((o) => new Ge(o))), s;
|
|
2481
2579
|
});
|
|
2482
2580
|
}
|
|
2483
2581
|
/**
|
|
@@ -2489,14 +2587,14 @@ class Ft extends h {
|
|
|
2489
2587
|
publicSimpleSearch(r, e = 10) {
|
|
2490
2588
|
return new Promise((s, i) => {
|
|
2491
2589
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2492
|
-
s(o.categories.map((c) => new
|
|
2590
|
+
s(o.categories.map((c) => new E(c)));
|
|
2493
2591
|
}).catch((o) => {
|
|
2494
2592
|
i(o);
|
|
2495
2593
|
});
|
|
2496
2594
|
});
|
|
2497
2595
|
}
|
|
2498
2596
|
}
|
|
2499
|
-
class
|
|
2597
|
+
class Ht extends h {
|
|
2500
2598
|
/**
|
|
2501
2599
|
* Возвращает данные об указанном продукте.
|
|
2502
2600
|
*
|
|
@@ -2527,7 +2625,7 @@ class Mt extends h {
|
|
|
2527
2625
|
return this.get(
|
|
2528
2626
|
`/internal/catalog/products/${r}/coefficients`,
|
|
2529
2627
|
{},
|
|
2530
|
-
(e) =>
|
|
2628
|
+
(e) => Pe(e.data, (s) => new Ge(s))
|
|
2531
2629
|
);
|
|
2532
2630
|
}
|
|
2533
2631
|
/**
|
|
@@ -2546,7 +2644,7 @@ class Mt extends h {
|
|
|
2546
2644
|
});
|
|
2547
2645
|
}
|
|
2548
2646
|
}
|
|
2549
|
-
class
|
|
2647
|
+
class Bt extends h {
|
|
2550
2648
|
/**
|
|
2551
2649
|
* Возвращает список данных о корневых категориях указанного клиента.
|
|
2552
2650
|
*
|
|
@@ -2562,7 +2660,7 @@ class Ht extends h {
|
|
|
2562
2660
|
clientId: r,
|
|
2563
2661
|
showHidden: e
|
|
2564
2662
|
},
|
|
2565
|
-
(s) => s.data.map((i) => new
|
|
2663
|
+
(s) => s.data.map((i) => new we(i))
|
|
2566
2664
|
);
|
|
2567
2665
|
}
|
|
2568
2666
|
/**
|
|
@@ -2583,7 +2681,7 @@ class Ht extends h {
|
|
|
2583
2681
|
showHidden: s,
|
|
2584
2682
|
withNestedCategories: i
|
|
2585
2683
|
},
|
|
2586
|
-
(o) => new
|
|
2684
|
+
(o) => new we(o.data)
|
|
2587
2685
|
);
|
|
2588
2686
|
}
|
|
2589
2687
|
/**
|
|
@@ -2604,11 +2702,11 @@ class Ht extends h {
|
|
|
2604
2702
|
showHidden: i,
|
|
2605
2703
|
withPriceCoefficients: s
|
|
2606
2704
|
},
|
|
2607
|
-
(o) =>
|
|
2705
|
+
(o) => Pe(o.data, (c) => new Z(c))
|
|
2608
2706
|
);
|
|
2609
2707
|
}
|
|
2610
2708
|
}
|
|
2611
|
-
class
|
|
2709
|
+
class zt extends h {
|
|
2612
2710
|
/**
|
|
2613
2711
|
* Возвращает данные об указанном продукте для указанного клиента.
|
|
2614
2712
|
*
|
|
@@ -2625,12 +2723,12 @@ class Bt extends h {
|
|
|
2625
2723
|
clientId: e,
|
|
2626
2724
|
withPriceCoefficients: s
|
|
2627
2725
|
},
|
|
2628
|
-
(i) => new
|
|
2726
|
+
(i) => new Z(i.data)
|
|
2629
2727
|
);
|
|
2630
2728
|
}
|
|
2631
2729
|
}
|
|
2632
|
-
var
|
|
2633
|
-
class
|
|
2730
|
+
var He = /* @__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))(He || {});
|
|
2731
|
+
class Je {
|
|
2634
2732
|
/**
|
|
2635
2733
|
* Инициализирует экземпляр класса {@link FilterItem}.
|
|
2636
2734
|
*
|
|
@@ -2649,7 +2747,7 @@ class Be {
|
|
|
2649
2747
|
* Значение с которым сравнивается поле.
|
|
2650
2748
|
*/
|
|
2651
2749
|
t(this, "value");
|
|
2652
|
-
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ??
|
|
2750
|
+
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? He.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
|
|
2653
2751
|
}
|
|
2654
2752
|
/**
|
|
2655
2753
|
* Преобразует фильтр в примитивное представление для API.
|
|
@@ -2661,10 +2759,10 @@ class Be {
|
|
|
2661
2759
|
field: this.field,
|
|
2662
2760
|
op: this.op
|
|
2663
2761
|
};
|
|
2664
|
-
return r.value =
|
|
2762
|
+
return r.value = ke(this.value) ? q(this.value, T.getConfig().dateFormats.api) : this.value, r;
|
|
2665
2763
|
}
|
|
2666
2764
|
}
|
|
2667
|
-
class
|
|
2765
|
+
class ue {
|
|
2668
2766
|
/**
|
|
2669
2767
|
* Инициализирует экземпляр класса {@link FilterGroup}.
|
|
2670
2768
|
*
|
|
@@ -2684,7 +2782,7 @@ class le {
|
|
|
2684
2782
|
*/
|
|
2685
2783
|
t(this, "groups");
|
|
2686
2784
|
var e, s;
|
|
2687
|
-
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
|
|
2785
|
+
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 Je(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new ue(i))) ?? [];
|
|
2688
2786
|
}
|
|
2689
2787
|
/**
|
|
2690
2788
|
* Преобразует группу фильтров в примитивное представление для API.
|
|
@@ -2694,12 +2792,12 @@ class le {
|
|
|
2694
2792
|
toPrimitive() {
|
|
2695
2793
|
return {
|
|
2696
2794
|
groupOp: this.groupOp,
|
|
2697
|
-
filters: this.filters.map((r) => r instanceof
|
|
2698
|
-
groups: this.groups.map((r) => r instanceof
|
|
2795
|
+
filters: this.filters.map((r) => r instanceof Je && qe(r.toPrimitive) ? r.toPrimitive() : r),
|
|
2796
|
+
groups: this.groups.map((r) => r instanceof ue ? r.toPrimitive() : r)
|
|
2699
2797
|
};
|
|
2700
2798
|
}
|
|
2701
2799
|
}
|
|
2702
|
-
class
|
|
2800
|
+
class $e extends h {
|
|
2703
2801
|
/**
|
|
2704
2802
|
* Получает пагинированный список данных.
|
|
2705
2803
|
*
|
|
@@ -2716,10 +2814,10 @@ class De extends h {
|
|
|
2716
2814
|
page: (i == null ? void 0 : i.page) ?? 1,
|
|
2717
2815
|
perPage: (i == null ? void 0 : i.pageSize) ?? 10
|
|
2718
2816
|
};
|
|
2719
|
-
return e && (p.filters = JSON.stringify((e instanceof
|
|
2817
|
+
return e && (p.filters = JSON.stringify((e instanceof ue ? e : new ue(e)).toPrimitive())), Y(s) || (p.sort = Q(s) ? s : [s]), o && (p = { ...p, ...o }), this.get(r, p, c, u);
|
|
2720
2818
|
}
|
|
2721
2819
|
}
|
|
2722
|
-
class
|
|
2820
|
+
class Et extends $e {
|
|
2723
2821
|
/**
|
|
2724
2822
|
* Возвращает список шаблонов прайс-листа.
|
|
2725
2823
|
*
|
|
@@ -2791,7 +2889,7 @@ class zt extends De {
|
|
|
2791
2889
|
return this.get(
|
|
2792
2890
|
`/internal/price/templates/${r}/products`,
|
|
2793
2891
|
{},
|
|
2794
|
-
(e) => e.data.map((s) => new
|
|
2892
|
+
(e) => e.data.map((s) => new Se(s))
|
|
2795
2893
|
);
|
|
2796
2894
|
}
|
|
2797
2895
|
/**
|
|
@@ -2803,7 +2901,7 @@ class zt extends De {
|
|
|
2803
2901
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get
|
|
2804
2902
|
*/
|
|
2805
2903
|
getProductTemplatePrice(r, e) {
|
|
2806
|
-
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new
|
|
2904
|
+
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new Se(s.data));
|
|
2807
2905
|
}
|
|
2808
2906
|
/**
|
|
2809
2907
|
* Сохраняет цену на продукт в шаблоне прайс-листа.
|
|
@@ -2822,7 +2920,7 @@ class zt extends De {
|
|
|
2822
2920
|
price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
|
|
2823
2921
|
increase_percent: s.value
|
|
2824
2922
|
},
|
|
2825
|
-
(o) => new
|
|
2923
|
+
(o) => new Se(o.data)
|
|
2826
2924
|
);
|
|
2827
2925
|
}
|
|
2828
2926
|
/**
|
|
@@ -2847,7 +2945,7 @@ class zt extends De {
|
|
|
2847
2945
|
return this.get(
|
|
2848
2946
|
`/internal/price/templates/${r}/categories`,
|
|
2849
2947
|
{},
|
|
2850
|
-
(e) => e.data.map((s) => new
|
|
2948
|
+
(e) => e.data.map((s) => new be(s))
|
|
2851
2949
|
);
|
|
2852
2950
|
}
|
|
2853
2951
|
/**
|
|
@@ -2862,7 +2960,7 @@ class zt extends De {
|
|
|
2862
2960
|
return this.get(
|
|
2863
2961
|
`/internal/price/templates/${r}/categories/${e}`,
|
|
2864
2962
|
{},
|
|
2865
|
-
(s) => new
|
|
2963
|
+
(s) => new be(s.data)
|
|
2866
2964
|
);
|
|
2867
2965
|
}
|
|
2868
2966
|
/**
|
|
@@ -2888,7 +2986,7 @@ class zt extends De {
|
|
|
2888
2986
|
},
|
|
2889
2987
|
params: i ? { recursively: !0 } : {}
|
|
2890
2988
|
},
|
|
2891
|
-
(c) => new
|
|
2989
|
+
(c) => new be(c.data)
|
|
2892
2990
|
);
|
|
2893
2991
|
}
|
|
2894
2992
|
/**
|
|
@@ -2919,7 +3017,7 @@ class zt extends De {
|
|
|
2919
3017
|
return this.get(
|
|
2920
3018
|
`/internal/price/templates/${r}/clients`,
|
|
2921
3019
|
{},
|
|
2922
|
-
(e) => e.data.map((s) => new
|
|
3020
|
+
(e) => e.data.map((s) => new se(s))
|
|
2923
3021
|
);
|
|
2924
3022
|
}
|
|
2925
3023
|
}
|
|
@@ -2930,7 +3028,7 @@ class Wt extends h {
|
|
|
2930
3028
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get_list
|
|
2931
3029
|
*/
|
|
2932
3030
|
getRoles() {
|
|
2933
|
-
return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new
|
|
3031
|
+
return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new ne(e)));
|
|
2934
3032
|
}
|
|
2935
3033
|
/**
|
|
2936
3034
|
* Добавляет новую роль ценообразования.
|
|
@@ -2940,7 +3038,7 @@ class Wt extends h {
|
|
|
2940
3038
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_create
|
|
2941
3039
|
*/
|
|
2942
3040
|
createRole(r) {
|
|
2943
|
-
return this.post("/internal/price/roles", r, (e) => new
|
|
3041
|
+
return this.post("/internal/price/roles", r, (e) => new ne(e.data));
|
|
2944
3042
|
}
|
|
2945
3043
|
/**
|
|
2946
3044
|
* Возвращает данные роли ценообразования.
|
|
@@ -2950,7 +3048,7 @@ class Wt extends h {
|
|
|
2950
3048
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get
|
|
2951
3049
|
*/
|
|
2952
3050
|
getRole(r) {
|
|
2953
|
-
return this.get(`/internal/price/roles/${r}`, {}, (e) => new
|
|
3051
|
+
return this.get(`/internal/price/roles/${r}`, {}, (e) => new ne(e.data));
|
|
2954
3052
|
}
|
|
2955
3053
|
/**
|
|
2956
3054
|
* Обновляет данные роли ценообразования.
|
|
@@ -2961,7 +3059,7 @@ class Wt extends h {
|
|
|
2961
3059
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_update
|
|
2962
3060
|
*/
|
|
2963
3061
|
updateRole(r, e) {
|
|
2964
|
-
return this.patch(`/internal/price/roles/${r}`, e, (s) => new
|
|
3062
|
+
return this.patch(`/internal/price/roles/${r}`, e, (s) => new ne(s.data));
|
|
2965
3063
|
}
|
|
2966
3064
|
/**
|
|
2967
3065
|
* Удаляет роль ценообразования.
|
|
@@ -2984,7 +3082,7 @@ class Wt extends h {
|
|
|
2984
3082
|
return this.get(
|
|
2985
3083
|
`/internal/price/roles/rules/categories/${r}`,
|
|
2986
3084
|
{},
|
|
2987
|
-
(e) => e.data.map((s) => new
|
|
3085
|
+
(e) => e.data.map((s) => new We(s))
|
|
2988
3086
|
);
|
|
2989
3087
|
}
|
|
2990
3088
|
/**
|
|
@@ -2999,11 +3097,11 @@ class Wt extends h {
|
|
|
2999
3097
|
return this.patch(
|
|
3000
3098
|
`/internal/price/roles/rules/categories/${r}`,
|
|
3001
3099
|
e,
|
|
3002
|
-
(s) => s.data.map((i) => new
|
|
3100
|
+
(s) => s.data.map((i) => new We(i))
|
|
3003
3101
|
);
|
|
3004
3102
|
}
|
|
3005
3103
|
}
|
|
3006
|
-
class
|
|
3104
|
+
class Jt extends $e {
|
|
3007
3105
|
/**
|
|
3008
3106
|
* Возвращает пагинированный список свойств.
|
|
3009
3107
|
*
|
|
@@ -3016,7 +3114,7 @@ class Et extends De {
|
|
|
3016
3114
|
getProperties(r, e, s) {
|
|
3017
3115
|
return this.getPaginated("/internal/catalog/properties", r, e, s, {}, (i) => {
|
|
3018
3116
|
const o = { ...i.data };
|
|
3019
|
-
return o.data = o.data.map((c) => new
|
|
3117
|
+
return o.data = o.data.map((c) => new ie(c)), o;
|
|
3020
3118
|
});
|
|
3021
3119
|
}
|
|
3022
3120
|
/**
|
|
@@ -3033,7 +3131,7 @@ class Et extends De {
|
|
|
3033
3131
|
...s,
|
|
3034
3132
|
type: e
|
|
3035
3133
|
},
|
|
3036
|
-
(i) => new
|
|
3134
|
+
(i) => new ie(i.data)
|
|
3037
3135
|
);
|
|
3038
3136
|
}
|
|
3039
3137
|
/**
|
|
@@ -3043,7 +3141,7 @@ class Et extends De {
|
|
|
3043
3141
|
* @see /doc/api/internal#/operations/api_internal_catalog_properties_get
|
|
3044
3142
|
*/
|
|
3045
3143
|
getProperty(r) {
|
|
3046
|
-
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new
|
|
3144
|
+
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new ie(e.data));
|
|
3047
3145
|
}
|
|
3048
3146
|
/**
|
|
3049
3147
|
* Обновляет существующее свойство.
|
|
@@ -3060,7 +3158,7 @@ class Et extends De {
|
|
|
3060
3158
|
...i,
|
|
3061
3159
|
type: s
|
|
3062
3160
|
},
|
|
3063
|
-
(o) => new
|
|
3161
|
+
(o) => new ie(o.data)
|
|
3064
3162
|
);
|
|
3065
3163
|
}
|
|
3066
3164
|
/**
|
|
@@ -3079,7 +3177,7 @@ class Et extends De {
|
|
|
3079
3177
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get_list
|
|
3080
3178
|
*/
|
|
3081
3179
|
getProductProperties(r) {
|
|
3082
|
-
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new
|
|
3180
|
+
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new z(s)));
|
|
3083
3181
|
}
|
|
3084
3182
|
/**
|
|
3085
3183
|
* Возвращает значение свойства продукта.
|
|
@@ -3089,7 +3187,7 @@ class Et extends De {
|
|
|
3089
3187
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get
|
|
3090
3188
|
*/
|
|
3091
3189
|
getProductProperty(r, e) {
|
|
3092
|
-
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new
|
|
3190
|
+
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new z(s.data));
|
|
3093
3191
|
}
|
|
3094
3192
|
/**
|
|
3095
3193
|
* Обновляет значение свойства продукта.
|
|
@@ -3100,7 +3198,7 @@ class Et extends De {
|
|
|
3100
3198
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_update
|
|
3101
3199
|
*/
|
|
3102
3200
|
updateProductProperty(r, e, s) {
|
|
3103
|
-
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new
|
|
3201
|
+
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new z(i.data));
|
|
3104
3202
|
}
|
|
3105
3203
|
/**
|
|
3106
3204
|
* Удаляет значение свойства продукта.
|
|
@@ -3225,7 +3323,7 @@ class Et extends De {
|
|
|
3225
3323
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get_list
|
|
3226
3324
|
*/
|
|
3227
3325
|
getCategoryProperties(r) {
|
|
3228
|
-
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new
|
|
3326
|
+
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new z(s)));
|
|
3229
3327
|
}
|
|
3230
3328
|
/**
|
|
3231
3329
|
* Возвращает значение свойства категории.
|
|
@@ -3235,7 +3333,7 @@ class Et extends De {
|
|
|
3235
3333
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get
|
|
3236
3334
|
*/
|
|
3237
3335
|
getCategoryProperty(r, e) {
|
|
3238
|
-
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new
|
|
3336
|
+
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new z(s.data));
|
|
3239
3337
|
}
|
|
3240
3338
|
/**
|
|
3241
3339
|
* Обновляет значение свойства категории.
|
|
@@ -3246,7 +3344,7 @@ class Et extends De {
|
|
|
3246
3344
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_update
|
|
3247
3345
|
*/
|
|
3248
3346
|
updateCategoryProperty(r, e, s) {
|
|
3249
|
-
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new
|
|
3347
|
+
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new z(i.data));
|
|
3250
3348
|
}
|
|
3251
3349
|
/**
|
|
3252
3350
|
* Удаляет значение свойства категории.
|
|
@@ -3375,7 +3473,7 @@ class Et extends De {
|
|
|
3375
3473
|
return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
|
|
3376
3474
|
}
|
|
3377
3475
|
}
|
|
3378
|
-
function
|
|
3476
|
+
function Ve(n, r, e) {
|
|
3379
3477
|
let s;
|
|
3380
3478
|
return n.some((i) => {
|
|
3381
3479
|
if (i.type === e && i.id === r)
|
|
@@ -3384,37 +3482,37 @@ function ze(n, r, e) {
|
|
|
3384
3482
|
return !1;
|
|
3385
3483
|
const o = i;
|
|
3386
3484
|
if (o.products && o.products.length > 0) {
|
|
3387
|
-
const c =
|
|
3485
|
+
const c = Ve(o.products, r, e);
|
|
3388
3486
|
if (c)
|
|
3389
3487
|
return s = c, !0;
|
|
3390
3488
|
}
|
|
3391
3489
|
if (o.categories && o.categories.length > 0) {
|
|
3392
|
-
const c =
|
|
3490
|
+
const c = Ve(o.categories, r, e);
|
|
3393
3491
|
if (c)
|
|
3394
3492
|
return s = c, !0;
|
|
3395
3493
|
}
|
|
3396
3494
|
return !1;
|
|
3397
3495
|
}), s;
|
|
3398
3496
|
}
|
|
3399
|
-
function
|
|
3497
|
+
function Ke(n) {
|
|
3400
3498
|
const r = [];
|
|
3401
3499
|
return n.forEach((e) => {
|
|
3402
3500
|
if (r.push(e), e.type === "category") {
|
|
3403
3501
|
const s = e;
|
|
3404
|
-
s.products && s.products.length > 0 && r.push(...
|
|
3502
|
+
s.products && s.products.length > 0 && r.push(...Ke(s.products)), s.categories && s.categories.length > 0 && r.push(...Ke(s.categories));
|
|
3405
3503
|
}
|
|
3406
3504
|
}), r;
|
|
3407
3505
|
}
|
|
3408
|
-
var
|
|
3409
|
-
class
|
|
3506
|
+
var it = /* @__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))(it || {}), k = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(k || {});
|
|
3507
|
+
class nt extends a {
|
|
3410
3508
|
}
|
|
3411
|
-
class
|
|
3509
|
+
class gr extends a {
|
|
3412
3510
|
}
|
|
3413
|
-
class
|
|
3511
|
+
class Vt extends a {
|
|
3414
3512
|
}
|
|
3415
|
-
class
|
|
3513
|
+
class ot extends a {
|
|
3416
3514
|
}
|
|
3417
|
-
class
|
|
3515
|
+
class Ce extends b {
|
|
3418
3516
|
/**
|
|
3419
3517
|
* Инициализирует экземпляр класса {@link Currency}.
|
|
3420
3518
|
*
|
|
@@ -3433,7 +3531,7 @@ class ye extends b {
|
|
|
3433
3531
|
e && (this.signature = e.signature ?? "", this.symbol = e.symbol ?? "");
|
|
3434
3532
|
}
|
|
3435
3533
|
}
|
|
3436
|
-
class j extends
|
|
3534
|
+
class j extends a {
|
|
3437
3535
|
/**
|
|
3438
3536
|
* Возвращает сгенерированную запись-описание физического лица.
|
|
3439
3537
|
*/
|
|
@@ -3446,21 +3544,21 @@ class j extends P {
|
|
|
3446
3544
|
});
|
|
3447
3545
|
}
|
|
3448
3546
|
}
|
|
3449
|
-
class
|
|
3547
|
+
class ct extends a {
|
|
3450
3548
|
}
|
|
3451
|
-
class
|
|
3549
|
+
class lt extends a {
|
|
3452
3550
|
}
|
|
3453
|
-
class
|
|
3551
|
+
class re extends a {
|
|
3454
3552
|
}
|
|
3455
|
-
class
|
|
3553
|
+
class ut extends a {
|
|
3456
3554
|
}
|
|
3457
|
-
class
|
|
3555
|
+
class pt extends a {
|
|
3458
3556
|
}
|
|
3459
|
-
class
|
|
3557
|
+
class mr extends a {
|
|
3460
3558
|
}
|
|
3461
|
-
class
|
|
3559
|
+
class fr extends a {
|
|
3462
3560
|
}
|
|
3463
|
-
class
|
|
3561
|
+
class Ne extends H {
|
|
3464
3562
|
/**
|
|
3465
3563
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
3466
3564
|
*
|
|
@@ -3487,11 +3585,11 @@ class Le extends M {
|
|
|
3487
3585
|
/**
|
|
3488
3586
|
* Данные о валюте.
|
|
3489
3587
|
*/
|
|
3490
|
-
t(this, "currency", new
|
|
3491
|
-
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new
|
|
3588
|
+
t(this, "currency", new Ce());
|
|
3589
|
+
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new Ce(e.currency));
|
|
3492
3590
|
}
|
|
3493
3591
|
}
|
|
3494
|
-
class
|
|
3592
|
+
class Oe extends b {
|
|
3495
3593
|
/**
|
|
3496
3594
|
* Инициализирует экземпляр класса {@link Contact}.
|
|
3497
3595
|
*
|
|
@@ -3510,7 +3608,7 @@ class xe extends b {
|
|
|
3510
3608
|
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;
|
|
3511
3609
|
}
|
|
3512
3610
|
}
|
|
3513
|
-
class
|
|
3611
|
+
class M extends Oe {
|
|
3514
3612
|
/**
|
|
3515
3613
|
* Инициализирует экземпляр класса {@link ContactPerson}.
|
|
3516
3614
|
*
|
|
@@ -3545,7 +3643,7 @@ class F extends xe {
|
|
|
3545
3643
|
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 = C(e == null ? void 0 : e.deletedAt) ? v(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
3546
3644
|
}
|
|
3547
3645
|
}
|
|
3548
|
-
class
|
|
3646
|
+
class yr extends b {
|
|
3549
3647
|
/**
|
|
3550
3648
|
* Инициализирует экземпляр класса {@link ContragentBase}.
|
|
3551
3649
|
*
|
|
@@ -3557,7 +3655,7 @@ class gr extends b {
|
|
|
3557
3655
|
/**
|
|
3558
3656
|
* Данные о менеджере.
|
|
3559
3657
|
*/
|
|
3560
|
-
t(this, "manager", new
|
|
3658
|
+
t(this, "manager", new ce());
|
|
3561
3659
|
/**
|
|
3562
3660
|
* Данные об организационно-правовой форме.
|
|
3563
3661
|
*/
|
|
@@ -3569,7 +3667,7 @@ class gr extends b {
|
|
|
3569
3667
|
/**
|
|
3570
3668
|
* Группа партнеров (направление деятельности).
|
|
3571
3669
|
*/
|
|
3572
|
-
t(this, "partnerGroup", new
|
|
3670
|
+
t(this, "partnerGroup", new re());
|
|
3573
3671
|
/**
|
|
3574
3672
|
* Список контактных лиц контрагента.
|
|
3575
3673
|
*/
|
|
@@ -3603,22 +3701,22 @@ class gr extends b {
|
|
|
3603
3701
|
*/
|
|
3604
3702
|
t(this, "updater");
|
|
3605
3703
|
if (e) {
|
|
3606
|
-
if (this.opf = new j(e.opf), this.salesDirection = new N(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = C(e == null ? void 0 : e.createdAt) ? v(e.createdAt) : e.createdAt, this.creator = e.creator ? new
|
|
3704
|
+
if (this.opf = new j(e.opf), this.salesDirection = new N(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = C(e == null ? void 0 : e.createdAt) ? v(e.createdAt) : e.createdAt, this.creator = e.creator ? new F(e.creator) : void 0, this.updatedAt = C(e == null ? void 0 : e.updatedAt) ? v(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new F(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new re(e.partnerGroup)), e.manager && (this.manager = new ce(e.manager)), e.contacts) {
|
|
3607
3705
|
const s = [];
|
|
3608
3706
|
e.contacts.forEach((i) => {
|
|
3609
|
-
s.push(new
|
|
3707
|
+
s.push(new M(i));
|
|
3610
3708
|
}), this.contacts = s;
|
|
3611
3709
|
}
|
|
3612
3710
|
if (e.bankAccounts) {
|
|
3613
3711
|
const s = [];
|
|
3614
3712
|
e.bankAccounts.forEach((i) => {
|
|
3615
|
-
s.push(new
|
|
3713
|
+
s.push(new Ne(i));
|
|
3616
3714
|
}), this.bankAccounts = s;
|
|
3617
3715
|
}
|
|
3618
3716
|
}
|
|
3619
3717
|
}
|
|
3620
3718
|
}
|
|
3621
|
-
class
|
|
3719
|
+
class ht extends yr {
|
|
3622
3720
|
/**
|
|
3623
3721
|
* Инициализирует экземпляр класса {@link ContragentPerson}.
|
|
3624
3722
|
*
|
|
@@ -3628,7 +3726,7 @@ class ut extends gr {
|
|
|
3628
3726
|
super(r);
|
|
3629
3727
|
}
|
|
3630
3728
|
}
|
|
3631
|
-
class
|
|
3729
|
+
class wr extends yr {
|
|
3632
3730
|
/**
|
|
3633
3731
|
* Инициализирует экземпляр класса {@link ContragentIc}.
|
|
3634
3732
|
*
|
|
@@ -3671,7 +3769,7 @@ class mr extends gr {
|
|
|
3671
3769
|
e && (this.inn = e.inn ?? "", this.okpo = e.okpo ?? "", this.directorName = e.directorName ?? "", this.directorPosition = e.directorPosition ?? "", this.directorActsOn = e.directorActsOn ?? "", this.legalAddress = e.legalAddress ?? "", this.postalAddress = e.postalAddress ?? "", this.actualAddress = e.actualAddress ?? "");
|
|
3672
3770
|
}
|
|
3673
3771
|
}
|
|
3674
|
-
class
|
|
3772
|
+
class Cr extends wr {
|
|
3675
3773
|
/**
|
|
3676
3774
|
* Инициализирует экземпляр класса {@link ContragentUlR}.
|
|
3677
3775
|
*
|
|
@@ -3686,7 +3784,7 @@ class fr extends mr {
|
|
|
3686
3784
|
e && (this.kpp = e.kpp ?? "");
|
|
3687
3785
|
}
|
|
3688
3786
|
}
|
|
3689
|
-
class
|
|
3787
|
+
class gt extends Cr {
|
|
3690
3788
|
/**
|
|
3691
3789
|
* Инициализирует экземпляр класса {@link ContragentUlNr}.
|
|
3692
3790
|
*
|
|
@@ -3697,7 +3795,7 @@ class pt extends fr {
|
|
|
3697
3795
|
/**
|
|
3698
3796
|
* Страна регистрации юридического лица нерезидента.
|
|
3699
3797
|
*/
|
|
3700
|
-
t(this, "registrationCountry", new
|
|
3798
|
+
t(this, "registrationCountry", new ee());
|
|
3701
3799
|
/**
|
|
3702
3800
|
* Регистрационный номер юридического лица нерезидента.
|
|
3703
3801
|
*/
|
|
@@ -3706,10 +3804,10 @@ class pt extends fr {
|
|
|
3706
3804
|
* Налоговый номер юридического лица нерезидента.
|
|
3707
3805
|
*/
|
|
3708
3806
|
t(this, "taxNumber", "");
|
|
3709
|
-
e && (this.registrationCountry = new
|
|
3807
|
+
e && (this.registrationCountry = new ee(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
|
|
3710
3808
|
}
|
|
3711
3809
|
}
|
|
3712
|
-
class
|
|
3810
|
+
class ve {
|
|
3713
3811
|
/**
|
|
3714
3812
|
* Инициализирует и возвращает экземпляр класса с данными о контрагенте.
|
|
3715
3813
|
*
|
|
@@ -3718,17 +3816,17 @@ class we {
|
|
|
3718
3816
|
static createInstance(r) {
|
|
3719
3817
|
switch (r.opf.slug) {
|
|
3720
3818
|
case k.Ic:
|
|
3721
|
-
return new
|
|
3819
|
+
return new wr(r);
|
|
3722
3820
|
case k.UlR:
|
|
3723
|
-
return new
|
|
3821
|
+
return new Cr(r);
|
|
3724
3822
|
case k.UlNr:
|
|
3725
|
-
return new
|
|
3823
|
+
return new gt(r);
|
|
3726
3824
|
default:
|
|
3727
|
-
return new
|
|
3825
|
+
return new ht(r);
|
|
3728
3826
|
}
|
|
3729
3827
|
}
|
|
3730
3828
|
}
|
|
3731
|
-
class _e extends
|
|
3829
|
+
class _e extends H {
|
|
3732
3830
|
/**
|
|
3733
3831
|
* Инициализирует экземпляр класса {@link ContactRelation}.
|
|
3734
3832
|
*
|
|
@@ -3743,7 +3841,7 @@ class _e extends M {
|
|
|
3743
3841
|
this.isPrimary = e.isPrimary;
|
|
3744
3842
|
}
|
|
3745
3843
|
}
|
|
3746
|
-
class
|
|
3844
|
+
class mt extends M {
|
|
3747
3845
|
/**
|
|
3748
3846
|
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
3749
3847
|
*
|
|
@@ -3771,7 +3869,7 @@ class ht extends F {
|
|
|
3771
3869
|
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new _e(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new _e(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new _e(s))));
|
|
3772
3870
|
}
|
|
3773
3871
|
}
|
|
3774
|
-
class
|
|
3872
|
+
class ae extends Vr {
|
|
3775
3873
|
/**
|
|
3776
3874
|
* Инициализирует экземпляр класса {@link DeliveryAddress}.
|
|
3777
3875
|
*
|
|
@@ -3808,10 +3906,10 @@ class Ce extends Er {
|
|
|
3808
3906
|
* Признак того, что указанный адрес является адресом транспортной компании.
|
|
3809
3907
|
*/
|
|
3810
3908
|
t(this, "isTransportCompanyAddress");
|
|
3811
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new
|
|
3909
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new cr(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new M(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;
|
|
3812
3910
|
}
|
|
3813
3911
|
}
|
|
3814
|
-
class
|
|
3912
|
+
class Qe extends ge {
|
|
3815
3913
|
/**
|
|
3816
3914
|
* Инициализирует экземпляр класса {@link Client}.
|
|
3817
3915
|
*
|
|
@@ -3865,10 +3963,10 @@ class Ee extends he {
|
|
|
3865
3963
|
* Дополнительные данные о клиенте.
|
|
3866
3964
|
*/
|
|
3867
3965
|
t(this, "extraData");
|
|
3868
|
-
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) =>
|
|
3966
|
+
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => ve.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new re(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new M(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new ae(u))) ?? [], this.channelPrimaryInterest = new gr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new fr(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new X(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 De(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
|
|
3869
3967
|
}
|
|
3870
3968
|
}
|
|
3871
|
-
class
|
|
3969
|
+
class Kt {
|
|
3872
3970
|
/**
|
|
3873
3971
|
* Инициализирует экземпляр класса {@link ClientsListFilters}.
|
|
3874
3972
|
*
|
|
@@ -3964,7 +4062,7 @@ class Vt {
|
|
|
3964
4062
|
*/
|
|
3965
4063
|
t(this, "lastOrder");
|
|
3966
4064
|
var e, s, i, o, c, u;
|
|
3967
|
-
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((p) => new
|
|
4065
|
+
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((p) => new Me(p)), this.region = new le(r == null ? void 0 : r.region), this.country = new ee(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((p) => new Ae(p)) : [], this.salesDirections = (s = r == null ? void 0 : r.salesDirections) == null ? void 0 : s.map((p) => new N(p)), this.contragentInn = r == null ? void 0 : r.contragentInn, this.contragentType = new j(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new X(r == null ? void 0 : r.preferredDeliveryType), this.partnerGroups = (i = r == null ? void 0 : r.partnerGroups) == null ? void 0 : i.map((p) => new re(p)), this.contact = new Oe(r == null ? void 0 : r.contact), this.lastOrder = {
|
|
3968
4066
|
createdAt: new O((o = r == null ? void 0 : r.lastOrder) == null ? void 0 : o.createdAt),
|
|
3969
4067
|
creator: (c = r == null ? void 0 : r.lastOrder) == null ? void 0 : c.creator,
|
|
3970
4068
|
isApproved: (u = r == null ? void 0 : r.lastOrder) == null ? void 0 : u.isApproved
|
|
@@ -3990,7 +4088,7 @@ class Vt {
|
|
|
3990
4088
|
this.cities = [];
|
|
3991
4089
|
break;
|
|
3992
4090
|
case "region":
|
|
3993
|
-
this.region = new
|
|
4091
|
+
this.region = new le();
|
|
3994
4092
|
break;
|
|
3995
4093
|
case "isActive":
|
|
3996
4094
|
this.isActive = !0;
|
|
@@ -4017,13 +4115,13 @@ class Vt {
|
|
|
4017
4115
|
this.contragentType = new j();
|
|
4018
4116
|
break;
|
|
4019
4117
|
case "preferredDeliveryType":
|
|
4020
|
-
this.preferredDeliveryType = new
|
|
4118
|
+
this.preferredDeliveryType = new X();
|
|
4021
4119
|
break;
|
|
4022
4120
|
case "partnerGroups":
|
|
4023
4121
|
this.partnerGroups = [];
|
|
4024
4122
|
break;
|
|
4025
4123
|
case "contact":
|
|
4026
|
-
this.contact = new
|
|
4124
|
+
this.contact = new Oe();
|
|
4027
4125
|
break;
|
|
4028
4126
|
}
|
|
4029
4127
|
return this;
|
|
@@ -4038,11 +4136,11 @@ class Vt {
|
|
|
4038
4136
|
return Object.keys(this).forEach((c) => {
|
|
4039
4137
|
const u = this[c];
|
|
4040
4138
|
// eslint-disable-next-line prettier/prettier
|
|
4041
|
-
|
|
4139
|
+
D(u) || C(u) && u.trim().length === 0 || qe(u.isNewRec) && u.isNewRec() || (r[c] = u);
|
|
4042
4140
|
}), !((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;
|
|
4043
4141
|
}
|
|
4044
4142
|
}
|
|
4045
|
-
class
|
|
4143
|
+
class vr extends H {
|
|
4046
4144
|
/**
|
|
4047
4145
|
* Инициализирует экземпляр класса {@link OrderShortInfo}.
|
|
4048
4146
|
*
|
|
@@ -4062,10 +4160,10 @@ class yr extends M {
|
|
|
4062
4160
|
* Признак того, что заказ подтвержден в 1С.
|
|
4063
4161
|
*/
|
|
4064
4162
|
t(this, "isApproved1c");
|
|
4065
|
-
this.createdAt = C(e == null ? void 0 : e.createdAt) ? v(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new
|
|
4163
|
+
this.createdAt = C(e == null ? void 0 : e.createdAt) ? v(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new F(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
|
|
4066
4164
|
}
|
|
4067
4165
|
}
|
|
4068
|
-
class
|
|
4166
|
+
class ft extends b {
|
|
4069
4167
|
/**
|
|
4070
4168
|
* Инициализирует экземпляр класса {@link ClientAdditionalData}.
|
|
4071
4169
|
*
|
|
@@ -4098,10 +4196,10 @@ class gt extends b {
|
|
|
4098
4196
|
* Список менеджеров.
|
|
4099
4197
|
*/
|
|
4100
4198
|
t(this, "managers");
|
|
4101
|
-
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new
|
|
4199
|
+
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new M(o))), e.lastOrder && (this.lastOrder = new vr(e.lastOrder)), (i = e.partnerGroups) != null && i.length && (this.partnerGroups = e.partnerGroups.map((o) => new re(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new X(e.preferredDeliveryType)), e.salesDirection && (this.salesDirection = new N(e.salesDirection)), e.managers && (this.managers = e.managers.map((o) => new ce(o)));
|
|
4102
4200
|
}
|
|
4103
4201
|
}
|
|
4104
|
-
class
|
|
4202
|
+
class yt {
|
|
4105
4203
|
/**
|
|
4106
4204
|
* Инициализирует экземпляр класса {@link DataTablePaginationRequestParams}.
|
|
4107
4205
|
*
|
|
@@ -4119,7 +4217,7 @@ class mt {
|
|
|
4119
4217
|
this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
|
|
4120
4218
|
}
|
|
4121
4219
|
}
|
|
4122
|
-
class
|
|
4220
|
+
class Qt extends yt {
|
|
4123
4221
|
/**
|
|
4124
4222
|
* Инициализирует экземпляр класса {@link DataTablePagination}.
|
|
4125
4223
|
*
|
|
@@ -4150,7 +4248,7 @@ class Kt extends mt {
|
|
|
4150
4248
|
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;
|
|
4151
4249
|
}
|
|
4152
4250
|
}
|
|
4153
|
-
class
|
|
4251
|
+
class Yt {
|
|
4154
4252
|
/**
|
|
4155
4253
|
* Инициализирует экземпляр класса {@link ISortRequestParams}.
|
|
4156
4254
|
*
|
|
@@ -4168,7 +4266,7 @@ class Qt {
|
|
|
4168
4266
|
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
4169
4267
|
}
|
|
4170
4268
|
}
|
|
4171
|
-
class
|
|
4269
|
+
class Xt extends $e {
|
|
4172
4270
|
/**
|
|
4173
4271
|
* Возвращает данные об указанном клиенте.
|
|
4174
4272
|
*
|
|
@@ -4176,7 +4274,7 @@ class Yt extends De {
|
|
|
4176
4274
|
* @see /doc/api/internal#/Клиенты/api_internal_client_get_full_info
|
|
4177
4275
|
*/
|
|
4178
4276
|
getClient(r) {
|
|
4179
|
-
return this.get(`/internal/clients/${r}`, {}, (e) => new
|
|
4277
|
+
return this.get(`/internal/clients/${r}`, {}, (e) => new Qe(e.data));
|
|
4180
4278
|
}
|
|
4181
4279
|
/**
|
|
4182
4280
|
* Возвращает данные о клиентах, удовлетворяющих указанным параметрам поиска.
|
|
@@ -4191,7 +4289,7 @@ class Yt extends De {
|
|
|
4191
4289
|
getClientsList(r, e, s, i) {
|
|
4192
4290
|
return this.getPaginated("/internal/clients", r, e, s, i, (o) => {
|
|
4193
4291
|
const c = { ...o.data };
|
|
4194
|
-
return c.data = c.data.map((u) => new
|
|
4292
|
+
return c.data = c.data.map((u) => new ge(u)), c;
|
|
4195
4293
|
});
|
|
4196
4294
|
}
|
|
4197
4295
|
/**
|
|
@@ -4204,7 +4302,7 @@ class Yt extends De {
|
|
|
4204
4302
|
return this.getClientsList({
|
|
4205
4303
|
groupOp: "and",
|
|
4206
4304
|
groups: [],
|
|
4207
|
-
filters: [{ field: "phone", op:
|
|
4305
|
+
filters: [{ field: "phone", op: He.Contains, value: r }]
|
|
4208
4306
|
});
|
|
4209
4307
|
}
|
|
4210
4308
|
/**
|
|
@@ -4218,7 +4316,7 @@ class Yt extends De {
|
|
|
4218
4316
|
const s = r.map((i) => i.id);
|
|
4219
4317
|
return this.post("/internal/clients/additional-data", { clients: s, requested_data_types: e }, (i) => {
|
|
4220
4318
|
let o = [];
|
|
4221
|
-
return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new
|
|
4319
|
+
return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new ft(c))), o;
|
|
4222
4320
|
});
|
|
4223
4321
|
}
|
|
4224
4322
|
/**
|
|
@@ -4230,7 +4328,7 @@ class Yt extends De {
|
|
|
4230
4328
|
getAllClientContacts(r) {
|
|
4231
4329
|
return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
|
|
4232
4330
|
let s = [];
|
|
4233
|
-
return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new
|
|
4331
|
+
return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new mt(i))), s;
|
|
4234
4332
|
});
|
|
4235
4333
|
}
|
|
4236
4334
|
/**
|
|
@@ -4260,7 +4358,7 @@ class Yt extends De {
|
|
|
4260
4358
|
is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients,
|
|
4261
4359
|
preferred_warehouse_id: (s = r.preferredWarehouse) == null ? void 0 : s.id
|
|
4262
4360
|
},
|
|
4263
|
-
(i) => new
|
|
4361
|
+
(i) => new Qe(i.data),
|
|
4264
4362
|
e
|
|
4265
4363
|
);
|
|
4266
4364
|
}
|
|
@@ -4370,7 +4468,7 @@ class Yt extends De {
|
|
|
4370
4468
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
|
|
4371
4469
|
*/
|
|
4372
4470
|
createContragentClientData(r, e, s = {}) {
|
|
4373
|
-
var p, f, m, A, d,
|
|
4471
|
+
var p, f, m, A, I, d, S, _;
|
|
4374
4472
|
let i;
|
|
4375
4473
|
const o = e, c = e, u = e;
|
|
4376
4474
|
switch (e.opf.slug) {
|
|
@@ -4416,8 +4514,8 @@ class Yt extends De {
|
|
|
4416
4514
|
opf: u.opf.slug,
|
|
4417
4515
|
name: u.name,
|
|
4418
4516
|
alternative_name: u.alternativeName,
|
|
4419
|
-
partner_group_id: (
|
|
4420
|
-
manager_id: (
|
|
4517
|
+
partner_group_id: (I = u.partnerGroup) == null ? void 0 : I.id,
|
|
4518
|
+
manager_id: (d = u.manager) == null ? void 0 : d.id,
|
|
4421
4519
|
comment: u.comment,
|
|
4422
4520
|
director_name: u.directorName,
|
|
4423
4521
|
director_position: u.directorPosition,
|
|
@@ -4435,8 +4533,8 @@ class Yt extends De {
|
|
|
4435
4533
|
opf: e.opf.slug,
|
|
4436
4534
|
name: e.name,
|
|
4437
4535
|
alternative_name: e.alternativeName,
|
|
4438
|
-
partner_group_id: (
|
|
4439
|
-
manager_id: (
|
|
4536
|
+
partner_group_id: (S = e.partnerGroup) == null ? void 0 : S.id,
|
|
4537
|
+
manager_id: (_ = e.manager) == null ? void 0 : _.id,
|
|
4440
4538
|
comment: e.comment
|
|
4441
4539
|
};
|
|
4442
4540
|
break;
|
|
@@ -4444,7 +4542,7 @@ class Yt extends De {
|
|
|
4444
4542
|
return this.post(
|
|
4445
4543
|
`/internal/clients/${r}/contragents`,
|
|
4446
4544
|
i,
|
|
4447
|
-
(U) =>
|
|
4545
|
+
(U) => ve.createInstance(U.data),
|
|
4448
4546
|
s
|
|
4449
4547
|
);
|
|
4450
4548
|
}
|
|
@@ -4459,7 +4557,7 @@ class Yt extends De {
|
|
|
4459
4557
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
|
|
4460
4558
|
*/
|
|
4461
4559
|
updateContragentClientData(r, e, s = {}) {
|
|
4462
|
-
var p, f, m, A, d,
|
|
4560
|
+
var p, f, m, A, I, d, S, _;
|
|
4463
4561
|
let i;
|
|
4464
4562
|
const o = e, c = e, u = e;
|
|
4465
4563
|
switch (e.opf.slug) {
|
|
@@ -4505,8 +4603,8 @@ class Yt extends De {
|
|
|
4505
4603
|
opf: u.opf.slug,
|
|
4506
4604
|
name: u.name,
|
|
4507
4605
|
alternative_name: u.alternativeName,
|
|
4508
|
-
partner_group_id: (
|
|
4509
|
-
manager_id: (
|
|
4606
|
+
partner_group_id: (I = u.partnerGroup) == null ? void 0 : I.id,
|
|
4607
|
+
manager_id: (d = u.manager) == null ? void 0 : d.id,
|
|
4510
4608
|
comment: u.comment,
|
|
4511
4609
|
director_name: u.directorName,
|
|
4512
4610
|
director_position: u.directorPosition,
|
|
@@ -4524,8 +4622,8 @@ class Yt extends De {
|
|
|
4524
4622
|
opf: e.opf.slug,
|
|
4525
4623
|
name: e.name,
|
|
4526
4624
|
alternative_name: e.alternativeName,
|
|
4527
|
-
partner_group_id: (
|
|
4528
|
-
manager_id: (
|
|
4625
|
+
partner_group_id: (S = e.partnerGroup) == null ? void 0 : S.id,
|
|
4626
|
+
manager_id: (_ = e.manager) == null ? void 0 : _.id,
|
|
4529
4627
|
comment: e.comment
|
|
4530
4628
|
};
|
|
4531
4629
|
break;
|
|
@@ -4533,7 +4631,7 @@ class Yt extends De {
|
|
|
4533
4631
|
return this.patch(
|
|
4534
4632
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
4535
4633
|
i,
|
|
4536
|
-
(U) =>
|
|
4634
|
+
(U) => ve.createInstance(U.data),
|
|
4537
4635
|
s
|
|
4538
4636
|
);
|
|
4539
4637
|
}
|
|
@@ -4571,7 +4669,7 @@ class Yt extends De {
|
|
|
4571
4669
|
}), e.operatingHours && (i.operating_hours = {
|
|
4572
4670
|
from: e.operatingHours.from,
|
|
4573
4671
|
to: e.operatingHours.to
|
|
4574
|
-
}), this.post(`/internal/clients/${r}/delivery-addresses`, i, (u) => new
|
|
4672
|
+
}), this.post(`/internal/clients/${r}/delivery-addresses`, i, (u) => new ae(u.data), s);
|
|
4575
4673
|
}
|
|
4576
4674
|
/**
|
|
4577
4675
|
* Обновляет данные об адресе доставки клиента.
|
|
@@ -4600,7 +4698,7 @@ class Yt extends De {
|
|
|
4600
4698
|
}), this.patch(
|
|
4601
4699
|
`/internal/clients/${r}/delivery-addresses/${e.id}`,
|
|
4602
4700
|
i,
|
|
4603
|
-
(u) => new
|
|
4701
|
+
(u) => new ae(u.data),
|
|
4604
4702
|
s
|
|
4605
4703
|
);
|
|
4606
4704
|
}
|
|
@@ -4636,7 +4734,7 @@ class Yt extends De {
|
|
|
4636
4734
|
correspondent_account: s.correspondentAccount,
|
|
4637
4735
|
currency_id: s.currency.id
|
|
4638
4736
|
},
|
|
4639
|
-
(o) => new
|
|
4737
|
+
(o) => new Ne(o.data),
|
|
4640
4738
|
i
|
|
4641
4739
|
);
|
|
4642
4740
|
}
|
|
@@ -4662,7 +4760,7 @@ class Yt extends De {
|
|
|
4662
4760
|
correspondent_account: s.correspondentAccount,
|
|
4663
4761
|
currency_id: s.currency.id
|
|
4664
4762
|
},
|
|
4665
|
-
(o) => new
|
|
4763
|
+
(o) => new Ne(o.data),
|
|
4666
4764
|
i
|
|
4667
4765
|
);
|
|
4668
4766
|
}
|
|
@@ -4723,7 +4821,7 @@ class Yt extends De {
|
|
|
4723
4821
|
comment: e.comment,
|
|
4724
4822
|
not_disturb: e.notDisturb
|
|
4725
4823
|
},
|
|
4726
|
-
(i) => new
|
|
4824
|
+
(i) => new M(i.data),
|
|
4727
4825
|
s
|
|
4728
4826
|
);
|
|
4729
4827
|
}
|
|
@@ -4866,7 +4964,7 @@ class Yt extends De {
|
|
|
4866
4964
|
comment: e.comment,
|
|
4867
4965
|
...s
|
|
4868
4966
|
};
|
|
4869
|
-
return (c = e.phone) != null && c.length && (o.phone = e.phone), (u = e.email) != null && u.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (p) => new
|
|
4967
|
+
return (c = e.phone) != null && c.length && (o.phone = e.phone), (u = e.email) != null && u.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (p) => new M(p.data), i);
|
|
4870
4968
|
}
|
|
4871
4969
|
/**
|
|
4872
4970
|
* Устанавливает признак основного контактного лица.
|
|
@@ -4895,7 +4993,7 @@ class Yt extends De {
|
|
|
4895
4993
|
return this.get(`/internal/clients/${r.id}/verification/email?email=${r.email}`);
|
|
4896
4994
|
}
|
|
4897
4995
|
}
|
|
4898
|
-
const
|
|
4996
|
+
const V = class V extends h {
|
|
4899
4997
|
/**
|
|
4900
4998
|
* Инициализирует экземпляр класса {@link HttpCachedRequester}.
|
|
4901
4999
|
*/
|
|
@@ -4915,7 +5013,7 @@ const J = class J extends h {
|
|
|
4915
5013
|
*/
|
|
4916
5014
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
4917
5015
|
static getCachedResponse(e) {
|
|
4918
|
-
const s =
|
|
5016
|
+
const s = V.responseDataCache.get(e);
|
|
4919
5017
|
if (s && s.validTo > /* @__PURE__ */ new Date())
|
|
4920
5018
|
return s.val;
|
|
4921
5019
|
}
|
|
@@ -4926,7 +5024,7 @@ const J = class J extends h {
|
|
|
4926
5024
|
* @param data Данные для кэширования.
|
|
4927
5025
|
*/
|
|
4928
5026
|
cacheResponse(e, s) {
|
|
4929
|
-
|
|
5027
|
+
V.responseDataCache.set(e, {
|
|
4930
5028
|
validTo: dr(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
|
|
4931
5029
|
val: s
|
|
4932
5030
|
});
|
|
@@ -4942,9 +5040,9 @@ const J = class J extends h {
|
|
|
4942
5040
|
*/
|
|
4943
5041
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
4944
5042
|
getTypedDataArrayRequester(e, s, i = !1, o = {}) {
|
|
4945
|
-
const c = s + (
|
|
5043
|
+
const c = s + (Y(o) ? "" : ` >>> ${JSON.stringify(o)}`), u = i ? V.getCachedResponse(c) : void 0;
|
|
4946
5044
|
return u ? Promise.resolve(u) : this.get(s, o).then((p) => {
|
|
4947
|
-
const f = p.map((m) =>
|
|
5045
|
+
const f = p.map((m) => Fe.instanceInitializer(e, m));
|
|
4948
5046
|
return i && f && this.cacheResponse(s, f), f;
|
|
4949
5047
|
});
|
|
4950
5048
|
}
|
|
@@ -4952,9 +5050,9 @@ const J = class J extends h {
|
|
|
4952
5050
|
/**
|
|
4953
5051
|
* Кэш результатов запросов.
|
|
4954
5052
|
*/
|
|
4955
|
-
t(
|
|
4956
|
-
let
|
|
4957
|
-
class
|
|
5053
|
+
t(V, "responseDataCache", /* @__PURE__ */ new Map());
|
|
5054
|
+
let pe = V;
|
|
5055
|
+
class Zt extends h {
|
|
4958
5056
|
/**
|
|
4959
5057
|
* Выполняет проверку занят ли указанный номер телефона.
|
|
4960
5058
|
*
|
|
@@ -4968,7 +5066,7 @@ class Xt extends h {
|
|
|
4968
5066
|
});
|
|
4969
5067
|
}
|
|
4970
5068
|
}
|
|
4971
|
-
class
|
|
5069
|
+
class es extends h {
|
|
4972
5070
|
/**
|
|
4973
5071
|
* Возвращает настройки указанного конфигуратора для указанной категории.
|
|
4974
5072
|
*
|
|
@@ -5039,29 +5137,29 @@ class Zt extends h {
|
|
|
5039
5137
|
return this.delete(`internal/catalog/categories/${r.id}/configurators/${(s = r.properties) == null ? void 0 : s.configurator}/template/${e}`);
|
|
5040
5138
|
}
|
|
5041
5139
|
}
|
|
5042
|
-
class
|
|
5140
|
+
class rs {
|
|
5043
5141
|
/**
|
|
5044
5142
|
* Возвращает диапазон дат по умолчанию.
|
|
5045
5143
|
*/
|
|
5046
5144
|
static defaultDateRanges() {
|
|
5047
|
-
const r =
|
|
5145
|
+
const r = kr(/* @__PURE__ */ new Date(), 1);
|
|
5048
5146
|
return {
|
|
5049
5147
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
5050
|
-
nextWorkingDay: { label: "Следующий рабочий день", from:
|
|
5051
|
-
today: { label: "Сегодня", from:
|
|
5052
|
-
yesterday: { label: "Вчера", from:
|
|
5053
|
-
tomorrow: { label: "Завтра", from:
|
|
5148
|
+
nextWorkingDay: { label: "Следующий рабочий день", from: Gr(r), to: Ur(r) },
|
|
5149
|
+
today: { label: "Сегодня", from: Le(), to: qr() },
|
|
5150
|
+
yesterday: { label: "Вчера", from: Or(), to: Nr() },
|
|
5151
|
+
tomorrow: { label: "Завтра", from: xr(), to: Lr() }
|
|
5054
5152
|
};
|
|
5055
5153
|
}
|
|
5056
5154
|
}
|
|
5057
|
-
const
|
|
5155
|
+
const K = class K {
|
|
5058
5156
|
/**
|
|
5059
5157
|
* Устанавливает список единиц измерения линейной величины.
|
|
5060
5158
|
*
|
|
5061
5159
|
* @param linearValues Список единиц измерения линейной величины.
|
|
5062
5160
|
*/
|
|
5063
5161
|
static setLinearValues(r) {
|
|
5064
|
-
|
|
5162
|
+
K.linearValues = r;
|
|
5065
5163
|
}
|
|
5066
5164
|
/**
|
|
5067
5165
|
* Возвращает признак, что указанный товар имеет линейную единицу измерения.
|
|
@@ -5069,7 +5167,7 @@ const V = class V {
|
|
|
5069
5167
|
* @param product Данные о товаре для которого нужно проверить линейность его единицы измерения.
|
|
5070
5168
|
*/
|
|
5071
5169
|
static productIsMeasurable(r) {
|
|
5072
|
-
return
|
|
5170
|
+
return K.linearValues.includes(r.unit);
|
|
5073
5171
|
}
|
|
5074
5172
|
/**
|
|
5075
5173
|
* Возвращает кратность количества для указанного товара.
|
|
@@ -5078,7 +5176,7 @@ const V = class V {
|
|
|
5078
5176
|
*/
|
|
5079
5177
|
static getProductMultiplicity(r) {
|
|
5080
5178
|
var e, s;
|
|
5081
|
-
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((s = r.properties) != null && s.minCount) && !
|
|
5179
|
+
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((s = r.properties) != null && s.minCount) && !K.productIsMeasurable(r) ? r.properties.minCount : 1;
|
|
5082
5180
|
}
|
|
5083
5181
|
/**
|
|
5084
5182
|
* Возвращает кратность длины для указанного товара.
|
|
@@ -5093,9 +5191,9 @@ const V = class V {
|
|
|
5093
5191
|
/**
|
|
5094
5192
|
* Список единиц измерения линейной величины.
|
|
5095
5193
|
*/
|
|
5096
|
-
t(
|
|
5097
|
-
let
|
|
5098
|
-
class
|
|
5194
|
+
t(K, "linearValues", ["пог.м.", "м.", "м2"]);
|
|
5195
|
+
let Ye = K;
|
|
5196
|
+
class ts {
|
|
5099
5197
|
/**
|
|
5100
5198
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
5101
5199
|
*/
|
|
@@ -5111,19 +5209,19 @@ class rs {
|
|
|
5111
5209
|
return r.id === 0 && r.guid === "-undefined-";
|
|
5112
5210
|
}
|
|
5113
5211
|
}
|
|
5114
|
-
class
|
|
5212
|
+
class wt extends pe {
|
|
5115
5213
|
/**
|
|
5116
5214
|
* Возвращает {@link Promise} для получения справочника списка менеджеров.
|
|
5117
5215
|
*/
|
|
5118
5216
|
async getManagers() {
|
|
5119
|
-
const r = "/internal/managers", e =
|
|
5217
|
+
const r = "/internal/managers", e = pe.getCachedResponse(r);
|
|
5120
5218
|
if (e)
|
|
5121
5219
|
return e;
|
|
5122
|
-
const i = (await this.get(r)).data.map((o) =>
|
|
5220
|
+
const i = (await this.get(r)).data.map((o) => Fe.instanceInitializer(Ae, o));
|
|
5123
5221
|
return this.cacheResponse(r, i), i;
|
|
5124
5222
|
}
|
|
5125
5223
|
}
|
|
5126
|
-
class
|
|
5224
|
+
class ar extends vr {
|
|
5127
5225
|
/**
|
|
5128
5226
|
* Инициализирует экземпляр класса {@link OrderInfo}.
|
|
5129
5227
|
*
|
|
@@ -5172,19 +5270,19 @@ class wr extends yr {
|
|
|
5172
5270
|
* Признак того, что заказ создан из товаров, которые имеют признак "Нет в наличии".
|
|
5173
5271
|
*/
|
|
5174
5272
|
t(this, "isNotInStock");
|
|
5175
|
-
this.client = new
|
|
5273
|
+
this.client = new ge(e == null ? void 0 : e.client), this.payment = {
|
|
5176
5274
|
type: ((s = e == null ? void 0 : e.payment) == null ? void 0 : s.type) ?? -1,
|
|
5177
5275
|
status: ((i = e == null ? void 0 : e.payment) == null ? void 0 : i.status) ?? -1,
|
|
5178
5276
|
onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
|
|
5179
5277
|
}, this.delivery = {
|
|
5180
5278
|
type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
|
|
5181
5279
|
date: C((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? v(e.delivery.date) : ((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ?? /* @__PURE__ */ new Date(),
|
|
5182
|
-
address: (f = e == null ? void 0 : e.delivery) != null && f.address ? new
|
|
5183
|
-
warehouse: (m = e == null ? void 0 : e.delivery) != null && m.warehouse ? new
|
|
5184
|
-
}, this.attachedUser = new
|
|
5280
|
+
address: (f = e == null ? void 0 : e.delivery) != null && f.address ? new ae(e.delivery.address) : void 0,
|
|
5281
|
+
warehouse: (m = e == null ? void 0 : e.delivery) != null && m.warehouse ? new De(e.delivery.warehouse) : void 0
|
|
5282
|
+
}, this.attachedUser = new F(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new N(e == null ? void 0 : e.salesDirection), this.pendingAt = C(e == null ? void 0 : e.pendingAt) ? v(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = C(e == null ? void 0 : e.processedAt) ? v(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;
|
|
5185
5283
|
}
|
|
5186
5284
|
}
|
|
5187
|
-
class
|
|
5285
|
+
class Ct extends H {
|
|
5188
5286
|
/**
|
|
5189
5287
|
* Инициализирует экземпляр класса {@link OrderProduct}.
|
|
5190
5288
|
*
|
|
@@ -5264,10 +5362,10 @@ class yt extends M {
|
|
|
5264
5362
|
* который соответствует указанной ширине. Количество не ограничено.
|
|
5265
5363
|
*/
|
|
5266
5364
|
t(this, "sawing");
|
|
5267
|
-
this.product = new
|
|
5365
|
+
this.product = new Z(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;
|
|
5268
5366
|
}
|
|
5269
5367
|
}
|
|
5270
|
-
class
|
|
5368
|
+
class vt extends ar {
|
|
5271
5369
|
/**
|
|
5272
5370
|
* Инициализирует экземпляр класса {@link Order}.
|
|
5273
5371
|
*
|
|
@@ -5307,10 +5405,10 @@ class wt extends wr {
|
|
|
5307
5405
|
* Признак, что разрешена передача заказа в работу без оплаты.
|
|
5308
5406
|
*/
|
|
5309
5407
|
t(this, "isAllowProcessingWithoutPayment");
|
|
5310
|
-
this.products = (e.products ?? []).map((s) => new
|
|
5408
|
+
this.products = (e.products ?? []).map((s) => new Ct(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? ve.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new a(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
|
|
5311
5409
|
}
|
|
5312
5410
|
}
|
|
5313
|
-
class
|
|
5411
|
+
class ss extends $e {
|
|
5314
5412
|
/**
|
|
5315
5413
|
* Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
|
|
5316
5414
|
*
|
|
@@ -5323,7 +5421,7 @@ class ts extends De {
|
|
|
5323
5421
|
getOrders(r, e, s) {
|
|
5324
5422
|
return this.getPaginated("/internal/orders", r, e ? [e] : void 0, s, {}, (i) => {
|
|
5325
5423
|
const o = { ...i.data };
|
|
5326
|
-
return o.data = o.data.map((c) => new
|
|
5424
|
+
return o.data = o.data.map((c) => new ar(c)), o;
|
|
5327
5425
|
});
|
|
5328
5426
|
}
|
|
5329
5427
|
/**
|
|
@@ -5341,10 +5439,10 @@ class ts extends De {
|
|
|
5341
5439
|
* @param orderId Идентификатор заказа для которого необходимо вернуть данные.
|
|
5342
5440
|
*/
|
|
5343
5441
|
getOrder(r) {
|
|
5344
|
-
return this.get(`/internal/orders/${r}`, {}, (e) => new
|
|
5442
|
+
return this.get(`/internal/orders/${r}`, {}, (e) => new vt(e.data));
|
|
5345
5443
|
}
|
|
5346
5444
|
}
|
|
5347
|
-
class
|
|
5445
|
+
class Ie {
|
|
5348
5446
|
/**
|
|
5349
5447
|
* Инициализирует экземпляр класса {@link PriceAnalyze}.
|
|
5350
5448
|
*
|
|
@@ -5371,12 +5469,12 @@ class Se {
|
|
|
5371
5469
|
* Источник клиентской цены.
|
|
5372
5470
|
*/
|
|
5373
5471
|
t(this, "source");
|
|
5374
|
-
this.client = new
|
|
5472
|
+
this.client = new ge(r == null ? void 0 : r.client), this.product = new x(r == null ? void 0 : r.product), this.cost = (r == null ? void 0 : r.cost) ?? 0, this.costCoefficient = (r == null ? void 0 : r.costCoefficient) ?? 0, this.source = (r == null ? void 0 : r.source) ?? je.Product;
|
|
5375
5473
|
}
|
|
5376
5474
|
}
|
|
5377
5475
|
const de = (n) => {
|
|
5378
5476
|
var r, e, s, i, o;
|
|
5379
|
-
return n ?
|
|
5477
|
+
return n ? sr(
|
|
5380
5478
|
{
|
|
5381
5479
|
cities: (r = n.cities) == null ? void 0 : r.map((c) => c.id),
|
|
5382
5480
|
clients: (e = n.clients) == null ? void 0 : e.map((c) => c.id),
|
|
@@ -5385,13 +5483,13 @@ const de = (n) => {
|
|
|
5385
5483
|
salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
|
|
5386
5484
|
hideNotActive: n.hideNotActive
|
|
5387
5485
|
},
|
|
5388
|
-
(c) =>
|
|
5486
|
+
(c) => D(c) || (Q(c) || ir(c)) && Y(c)
|
|
5389
5487
|
) : {};
|
|
5390
|
-
},
|
|
5488
|
+
}, Xe = (n) => {
|
|
5391
5489
|
const r = {};
|
|
5392
5490
|
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;
|
|
5393
5491
|
};
|
|
5394
|
-
class
|
|
5492
|
+
class is extends h {
|
|
5395
5493
|
/**
|
|
5396
5494
|
* Возвращает список клиентских цен на продукты в указанном диапазоне цены.
|
|
5397
5495
|
*
|
|
@@ -5405,10 +5503,10 @@ class ss extends h {
|
|
|
5405
5503
|
return this.get(
|
|
5406
5504
|
`/internal/price/products/${r}/analyze`,
|
|
5407
5505
|
{
|
|
5408
|
-
...
|
|
5506
|
+
...Xe(e),
|
|
5409
5507
|
filters: de(s)
|
|
5410
5508
|
},
|
|
5411
|
-
(i) => i.data.map((o) => new
|
|
5509
|
+
(i) => i.data.map((o) => new Ie(o))
|
|
5412
5510
|
);
|
|
5413
5511
|
}
|
|
5414
5512
|
/**
|
|
@@ -5424,10 +5522,10 @@ class ss extends h {
|
|
|
5424
5522
|
return this.get(
|
|
5425
5523
|
`/internal/price/categories/${r}/analyze`,
|
|
5426
5524
|
{
|
|
5427
|
-
...
|
|
5525
|
+
...Xe(e),
|
|
5428
5526
|
filters: de(s)
|
|
5429
5527
|
},
|
|
5430
|
-
(i) => i.data.map((o) => new
|
|
5528
|
+
(i) => i.data.map((o) => new Ie(o))
|
|
5431
5529
|
);
|
|
5432
5530
|
}
|
|
5433
5531
|
/**
|
|
@@ -5448,11 +5546,11 @@ class ss extends h {
|
|
|
5448
5546
|
...e,
|
|
5449
5547
|
filters: de(s)
|
|
5450
5548
|
},
|
|
5451
|
-
(i) => i.data.map((o) => new
|
|
5549
|
+
(i) => i.data.map((o) => new Ie(o))
|
|
5452
5550
|
);
|
|
5453
5551
|
}
|
|
5454
5552
|
}
|
|
5455
|
-
class
|
|
5553
|
+
class at {
|
|
5456
5554
|
/**
|
|
5457
5555
|
* Инициализирует экземпляр класса {@link PriceHistoryItem}.
|
|
5458
5556
|
*
|
|
@@ -5499,10 +5597,10 @@ class Ct {
|
|
|
5499
5597
|
* @inheritDoc
|
|
5500
5598
|
*/
|
|
5501
5599
|
t(this, "currency");
|
|
5502
|
-
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = C(r.costDate) ? v(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new
|
|
5600
|
+
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = C(r.costDate) ? v(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new oe(r.product) : void 0, this.client = r.client ? new F(r.client) : void 0, this.executor = r.executor ? new F(r.executor) : void 0, this.currency = r.currency ? new Ce(r.currency) : void 0;
|
|
5503
5601
|
}
|
|
5504
5602
|
}
|
|
5505
|
-
class
|
|
5603
|
+
class Pt extends oe {
|
|
5506
5604
|
/**
|
|
5507
5605
|
* Инициализирует экземпляр класса {@link ProductPriceHistory}.
|
|
5508
5606
|
*
|
|
@@ -5514,10 +5612,10 @@ class vt extends ne {
|
|
|
5514
5612
|
* @inheritDoc
|
|
5515
5613
|
*/
|
|
5516
5614
|
t(this, "history");
|
|
5517
|
-
this.history =
|
|
5615
|
+
this.history = Pe(e.history, (s) => new at(s));
|
|
5518
5616
|
}
|
|
5519
5617
|
}
|
|
5520
|
-
class
|
|
5618
|
+
class ns extends h {
|
|
5521
5619
|
/**
|
|
5522
5620
|
* Возвращает данные об истории изменения цен.
|
|
5523
5621
|
*
|
|
@@ -5527,21 +5625,21 @@ class is extends h {
|
|
|
5527
5625
|
*/
|
|
5528
5626
|
getProductPriceHistory(r) {
|
|
5529
5627
|
var o, c, u, p, f;
|
|
5530
|
-
const e = T.getConfig().dateFormats.api, s =
|
|
5531
|
-
|
|
5628
|
+
const e = T.getConfig().dateFormats.api, s = sr(
|
|
5629
|
+
ye(r, {
|
|
5532
5630
|
costDate: {
|
|
5533
|
-
from:
|
|
5534
|
-
to:
|
|
5631
|
+
from: ke((o = r.costDate) == null ? void 0 : o.from) ? q(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
|
|
5632
|
+
to: ke((u = r.costDate) == null ? void 0 : u.to) ? q(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
|
|
5535
5633
|
}
|
|
5536
5634
|
}),
|
|
5537
|
-
(m) =>
|
|
5635
|
+
(m) => D(m) || (Q(m) || ir(m)) && Y(m)
|
|
5538
5636
|
), i = ((f = r.product) == null ? void 0 : f[0]) ?? 0;
|
|
5539
5637
|
return delete s.product, this.get(`/internal/price/products/${i}/history`, s).then((m) => [
|
|
5540
|
-
new
|
|
5638
|
+
new Pt(ye(m[0], { history: m }))
|
|
5541
5639
|
]);
|
|
5542
5640
|
}
|
|
5543
5641
|
}
|
|
5544
|
-
class
|
|
5642
|
+
class Ze {
|
|
5545
5643
|
/**
|
|
5546
5644
|
* Инициализирует экземпляр класса {@link RecommendationsList}.
|
|
5547
5645
|
*
|
|
@@ -5556,10 +5654,10 @@ class Ke {
|
|
|
5556
5654
|
* Список рекомендованных категорий продуктов.
|
|
5557
5655
|
*/
|
|
5558
5656
|
t(this, "productCategories", []);
|
|
5559
|
-
r != null && r.products && (this.products = r.products.map((e) => new
|
|
5657
|
+
r != null && r.products && (this.products = r.products.map((e) => new oe(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new oe(e)));
|
|
5560
5658
|
}
|
|
5561
5659
|
}
|
|
5562
|
-
class
|
|
5660
|
+
class os extends h {
|
|
5563
5661
|
/**
|
|
5564
5662
|
* Возвращает данные о рекомендациях указанной категории продуктов.
|
|
5565
5663
|
*
|
|
@@ -5567,7 +5665,7 @@ class ns extends h {
|
|
|
5567
5665
|
* @see /docs/api#/operations/api_internal_recommendations_product_category_get
|
|
5568
5666
|
*/
|
|
5569
5667
|
getProductCategoryRecommendations(r) {
|
|
5570
|
-
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new
|
|
5668
|
+
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new Ze(e.data));
|
|
5571
5669
|
}
|
|
5572
5670
|
/**
|
|
5573
5671
|
* Возвращает данные о рекомендациях указанного продукта.
|
|
@@ -5576,7 +5674,7 @@ class ns extends h {
|
|
|
5576
5674
|
* @see /docs/api#/operations/api_internal_recommendations_product_get
|
|
5577
5675
|
*/
|
|
5578
5676
|
getProductRecommendations(r) {
|
|
5579
|
-
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new
|
|
5677
|
+
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new Ze(e.data));
|
|
5580
5678
|
}
|
|
5581
5679
|
/**
|
|
5582
5680
|
* Выполняет сохранение данных о рекомендуемых категориях продуктов.
|
|
@@ -5605,7 +5703,7 @@ class ns extends h {
|
|
|
5605
5703
|
});
|
|
5606
5704
|
}
|
|
5607
5705
|
}
|
|
5608
|
-
class
|
|
5706
|
+
class $ extends pe {
|
|
5609
5707
|
/**
|
|
5610
5708
|
* Возвращает {@link Promise} для получения данных указанного справочника.
|
|
5611
5709
|
*
|
|
@@ -5614,33 +5712,33 @@ class D extends ue {
|
|
|
5614
5712
|
* и использовать в случае аналогичных запросов.
|
|
5615
5713
|
*/
|
|
5616
5714
|
getReference(r, e = !1) {
|
|
5617
|
-
return this.getTypedDataArrayRequester(
|
|
5715
|
+
return this.getTypedDataArrayRequester(nt, `/internal/references/${r}`, e);
|
|
5618
5716
|
}
|
|
5619
5717
|
/**
|
|
5620
5718
|
* Возвращает {@link Promise} для получения справочника данных о канале
|
|
5621
5719
|
* первичного интереса.
|
|
5622
5720
|
*/
|
|
5623
5721
|
getChannelPrimaryInterest() {
|
|
5624
|
-
return this.getTypedDataArrayRequester(
|
|
5722
|
+
return this.getTypedDataArrayRequester(gr, "/internal/references/channel-primary-interest", !0);
|
|
5625
5723
|
}
|
|
5626
5724
|
/**
|
|
5627
5725
|
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
5628
5726
|
*/
|
|
5629
5727
|
getContactPositions() {
|
|
5630
|
-
return this.getTypedDataArrayRequester(
|
|
5728
|
+
return this.getTypedDataArrayRequester(ot, "/internal/references/contact-position", !0);
|
|
5631
5729
|
}
|
|
5632
5730
|
/**
|
|
5633
5731
|
* Возвращает {@link Promise} для получения справочника списка валют.
|
|
5634
5732
|
*/
|
|
5635
5733
|
getCurrency() {
|
|
5636
|
-
return this.getTypedDataArrayRequester(
|
|
5734
|
+
return this.getTypedDataArrayRequester(Ce, "/public/references/currency", !0);
|
|
5637
5735
|
}
|
|
5638
5736
|
/**
|
|
5639
5737
|
* Возвращает {@link Promise} для получения справочника данных
|
|
5640
5738
|
* групп партнеров (направлений деятельности).
|
|
5641
5739
|
*/
|
|
5642
5740
|
getPartnerGroup() {
|
|
5643
|
-
return this.getTypedDataArrayRequester(
|
|
5741
|
+
return this.getTypedDataArrayRequester(re, "/internal/references/partner-group", !0);
|
|
5644
5742
|
}
|
|
5645
5743
|
/**
|
|
5646
5744
|
* Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
|
|
@@ -5652,25 +5750,25 @@ class D extends ue {
|
|
|
5652
5750
|
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
5653
5751
|
*/
|
|
5654
5752
|
getOrderPaymentStatuses() {
|
|
5655
|
-
return this.getTypedDataArrayRequester(
|
|
5753
|
+
return this.getTypedDataArrayRequester(ct, "/public/references/order-payment-status", !0);
|
|
5656
5754
|
}
|
|
5657
5755
|
/**
|
|
5658
5756
|
* Возвращает {@link Promise} для получения справочника данных статусов заказов.
|
|
5659
5757
|
*/
|
|
5660
5758
|
getOrderStatuses() {
|
|
5661
|
-
return this.getTypedDataArrayRequester(
|
|
5759
|
+
return this.getTypedDataArrayRequester(lt, "/public/references/order-status", !0);
|
|
5662
5760
|
}
|
|
5663
5761
|
/**
|
|
5664
5762
|
* Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
|
|
5665
5763
|
*/
|
|
5666
5764
|
getPaymentTypes() {
|
|
5667
|
-
return this.getTypedDataArrayRequester(
|
|
5765
|
+
return this.getTypedDataArrayRequester(ut, "/public/references/payment-type", !0);
|
|
5668
5766
|
}
|
|
5669
5767
|
/**
|
|
5670
5768
|
* Возвращает {@link Promise} для получения справочника типов ресурсов.
|
|
5671
5769
|
*/
|
|
5672
5770
|
getResourceTypes() {
|
|
5673
|
-
return this.getTypedDataArrayRequester(
|
|
5771
|
+
return this.getTypedDataArrayRequester(mr, "/internal/references/resource-type", !0);
|
|
5674
5772
|
}
|
|
5675
5773
|
/**
|
|
5676
5774
|
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
@@ -5682,7 +5780,7 @@ class D extends ue {
|
|
|
5682
5780
|
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
5683
5781
|
*/
|
|
5684
5782
|
getSourcePrimaryInterest() {
|
|
5685
|
-
return this.getTypedDataArrayRequester(
|
|
5783
|
+
return this.getTypedDataArrayRequester(fr, "/internal/references/source-primary-interest", !0);
|
|
5686
5784
|
}
|
|
5687
5785
|
/**
|
|
5688
5786
|
* Выполняет поиск данных о городах по терму в названии.
|
|
@@ -5690,7 +5788,7 @@ class D extends ue {
|
|
|
5690
5788
|
* @param term Терм поиска.
|
|
5691
5789
|
*/
|
|
5692
5790
|
searchCity(r) {
|
|
5693
|
-
return this.getTypedDataArrayRequester(
|
|
5791
|
+
return this.getTypedDataArrayRequester(Me, `/internal/references/city-with-region-and-country/search?term=${r}`);
|
|
5694
5792
|
}
|
|
5695
5793
|
/**
|
|
5696
5794
|
* Выполняет поиск данных о регионах по терму в названии.
|
|
@@ -5698,7 +5796,7 @@ class D extends ue {
|
|
|
5698
5796
|
* @param term Терм поиска.
|
|
5699
5797
|
*/
|
|
5700
5798
|
searchRegion(r) {
|
|
5701
|
-
return this.getTypedDataArrayRequester(
|
|
5799
|
+
return this.getTypedDataArrayRequester(le, `/internal/references/region-with-country/search?term=${r}`);
|
|
5702
5800
|
}
|
|
5703
5801
|
/**
|
|
5704
5802
|
* Выполняет поиск данных о странах по терму в названии.
|
|
@@ -5706,25 +5804,25 @@ class D extends ue {
|
|
|
5706
5804
|
* @param term Терм поиска.
|
|
5707
5805
|
*/
|
|
5708
5806
|
searchCountry(r) {
|
|
5709
|
-
return this.getTypedDataArrayRequester(
|
|
5807
|
+
return this.getTypedDataArrayRequester(ee, `/internal/references/country/search?term=${r}`);
|
|
5710
5808
|
}
|
|
5711
5809
|
/**
|
|
5712
5810
|
* Возвращает {@link Promise} для получения справочника типов доставки.
|
|
5713
5811
|
*/
|
|
5714
5812
|
getDeliveryTypes() {
|
|
5715
|
-
return this.getTypedDataArrayRequester(
|
|
5813
|
+
return this.getTypedDataArrayRequester(X, "/internal/references/delivery-type", !0);
|
|
5716
5814
|
}
|
|
5717
5815
|
/**
|
|
5718
5816
|
* Возвращает {@link Promise} для получения справочника складов.
|
|
5719
5817
|
*/
|
|
5720
5818
|
getWarehouses() {
|
|
5721
|
-
return this.getTypedDataArrayRequester(
|
|
5819
|
+
return this.getTypedDataArrayRequester(De, "/public/references/warehouse", !0);
|
|
5722
5820
|
}
|
|
5723
5821
|
/**
|
|
5724
5822
|
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
5725
5823
|
*/
|
|
5726
5824
|
getPropertyTypes() {
|
|
5727
|
-
return this.getTypedDataArrayRequester(
|
|
5825
|
+
return this.getTypedDataArrayRequester(hr, "/internal/references/property-type", !0);
|
|
5728
5826
|
}
|
|
5729
5827
|
/**
|
|
5730
5828
|
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
@@ -5736,11 +5834,11 @@ class D extends ue {
|
|
|
5736
5834
|
* Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
|
|
5737
5835
|
*/
|
|
5738
5836
|
getProductFileType() {
|
|
5739
|
-
return this.getTypedDataArrayRequester(
|
|
5837
|
+
return this.getTypedDataArrayRequester(pt, "/public/references/product-file-type", !0);
|
|
5740
5838
|
}
|
|
5741
5839
|
}
|
|
5742
|
-
const
|
|
5743
|
-
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), f = y(void 0), m = y(void 0), A = y(void 0),
|
|
5840
|
+
const R = te("__references_private", () => {
|
|
5841
|
+
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), f = y(void 0), m = y(void 0), A = y(void 0), I = y(void 0), d = y(void 0), S = y(void 0), _ = y(void 0), U = y(void 0), l = y(void 0);
|
|
5744
5842
|
return {
|
|
5745
5843
|
/**
|
|
5746
5844
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -5793,19 +5891,19 @@ const a = re("__references_private", () => {
|
|
|
5793
5891
|
/**
|
|
5794
5892
|
* Справочник типов ресурсов.
|
|
5795
5893
|
*/
|
|
5796
|
-
resourceTypesReference:
|
|
5894
|
+
resourceTypesReference: I,
|
|
5797
5895
|
/**
|
|
5798
5896
|
* Справочник направлений продаж.
|
|
5799
5897
|
*/
|
|
5800
|
-
salesDirectionsReference:
|
|
5898
|
+
salesDirectionsReference: d,
|
|
5801
5899
|
/**
|
|
5802
5900
|
* Справочник источников первичного интереса.
|
|
5803
5901
|
*/
|
|
5804
|
-
sourcePrimaryInterestReference:
|
|
5902
|
+
sourcePrimaryInterestReference: S,
|
|
5805
5903
|
/**
|
|
5806
5904
|
* Справочник складов.
|
|
5807
5905
|
*/
|
|
5808
|
-
warehousesReference:
|
|
5906
|
+
warehousesReference: _,
|
|
5809
5907
|
/**
|
|
5810
5908
|
* Справочник типов свойств.
|
|
5811
5909
|
*/
|
|
@@ -5815,90 +5913,90 @@ const a = re("__references_private", () => {
|
|
|
5815
5913
|
*/
|
|
5816
5914
|
priceCoefficientsReference: l
|
|
5817
5915
|
};
|
|
5818
|
-
}),
|
|
5819
|
-
const n =
|
|
5820
|
-
const l =
|
|
5821
|
-
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(
|
|
5916
|
+
}), cs = te("references", () => {
|
|
5917
|
+
const n = P(() => {
|
|
5918
|
+
const l = R();
|
|
5919
|
+
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance($).getChannelPrimaryInterest().then((g) => {
|
|
5822
5920
|
l.channelPrimaryInterestReference = g;
|
|
5823
5921
|
}).catch(w)), l.channelPrimaryInterestReference;
|
|
5824
|
-
}), r =
|
|
5825
|
-
const l =
|
|
5826
|
-
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(
|
|
5922
|
+
}), r = P(() => {
|
|
5923
|
+
const l = R();
|
|
5924
|
+
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance($).getContactPositions().then((g) => {
|
|
5827
5925
|
l.contactPositionsReference = g;
|
|
5828
5926
|
}).catch(w)), l.contactPositionsReference;
|
|
5829
|
-
}), e =
|
|
5830
|
-
const l =
|
|
5831
|
-
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(
|
|
5927
|
+
}), e = P(() => {
|
|
5928
|
+
const l = R();
|
|
5929
|
+
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance($).getCurrency().then((g) => {
|
|
5832
5930
|
l.currencyReference = g;
|
|
5833
5931
|
}).catch(w)), l.currencyReference;
|
|
5834
|
-
}), s =
|
|
5835
|
-
const l =
|
|
5836
|
-
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(
|
|
5932
|
+
}), s = P(() => {
|
|
5933
|
+
const l = R();
|
|
5934
|
+
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance($).getOpf().then((g) => {
|
|
5837
5935
|
l.opfReference = g;
|
|
5838
5936
|
}).catch(w)), l.opfReference;
|
|
5839
|
-
}), i =
|
|
5840
|
-
const l =
|
|
5841
|
-
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(
|
|
5937
|
+
}), i = P(() => {
|
|
5938
|
+
const l = R();
|
|
5939
|
+
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance($).getOrderPaymentStatuses().then((g) => {
|
|
5842
5940
|
l.orderPaymentStatusReference = g;
|
|
5843
5941
|
}).catch(w)), l.orderPaymentStatusReference;
|
|
5844
|
-
}), o =
|
|
5845
|
-
const l =
|
|
5846
|
-
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(
|
|
5942
|
+
}), o = P(() => {
|
|
5943
|
+
const l = R();
|
|
5944
|
+
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance($).getOrderStatuses().then((g) => {
|
|
5847
5945
|
l.orderStatusReference = g;
|
|
5848
5946
|
}).catch(w)), l.orderStatusReference;
|
|
5849
|
-
}), c =
|
|
5850
|
-
const l =
|
|
5851
|
-
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(
|
|
5947
|
+
}), c = P(() => {
|
|
5948
|
+
const l = R();
|
|
5949
|
+
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance($).getPaymentTypes().then((g) => {
|
|
5852
5950
|
l.paymentTypeReference = g;
|
|
5853
5951
|
}).catch(w)), l.paymentTypeReference;
|
|
5854
|
-
}), u =
|
|
5855
|
-
const l =
|
|
5856
|
-
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(
|
|
5952
|
+
}), u = P(() => {
|
|
5953
|
+
const l = R();
|
|
5954
|
+
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance($).getPartnerGroup().then((g) => {
|
|
5857
5955
|
l.partnerGroupReference = g;
|
|
5858
5956
|
}).catch(w)), l.partnerGroupReference;
|
|
5859
|
-
}), p =
|
|
5860
|
-
const l =
|
|
5861
|
-
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(
|
|
5957
|
+
}), p = P(() => {
|
|
5958
|
+
const l = R();
|
|
5959
|
+
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance($).getProductFileType().then((g) => {
|
|
5862
5960
|
l.productFileTypeReference = g;
|
|
5863
5961
|
}).catch(w)), l.productFileTypeReference;
|
|
5864
|
-
}), f =
|
|
5865
|
-
const l =
|
|
5866
|
-
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(
|
|
5962
|
+
}), f = P(() => {
|
|
5963
|
+
const l = R();
|
|
5964
|
+
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance($).getResourceTypes().then((g) => {
|
|
5867
5965
|
l.resourceTypesReference = g;
|
|
5868
5966
|
}).catch(w)), l.resourceTypesReference;
|
|
5869
|
-
}), m =
|
|
5870
|
-
const l =
|
|
5871
|
-
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(
|
|
5967
|
+
}), m = P(() => {
|
|
5968
|
+
const l = R();
|
|
5969
|
+
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance($).getSalesDirections().then((g) => {
|
|
5872
5970
|
l.salesDirectionsReference = g;
|
|
5873
5971
|
}).catch(w)), l.salesDirectionsReference;
|
|
5874
|
-
}), A =
|
|
5875
|
-
const l =
|
|
5876
|
-
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(
|
|
5972
|
+
}), A = P(() => {
|
|
5973
|
+
const l = R();
|
|
5974
|
+
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance($).getSourcePrimaryInterest().then((g) => {
|
|
5877
5975
|
l.sourcePrimaryInterestReference = g;
|
|
5878
5976
|
}).catch(w)), l.sourcePrimaryInterestReference;
|
|
5879
|
-
}),
|
|
5880
|
-
const l =
|
|
5881
|
-
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(
|
|
5977
|
+
}), I = P(() => {
|
|
5978
|
+
const l = R();
|
|
5979
|
+
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance($).getDeliveryTypes().then((g) => {
|
|
5882
5980
|
l.deliveryTypeReference = g;
|
|
5883
5981
|
}).catch(w)), l.deliveryTypeReference;
|
|
5884
|
-
}),
|
|
5885
|
-
const l =
|
|
5886
|
-
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(
|
|
5982
|
+
}), d = P(() => {
|
|
5983
|
+
const l = R();
|
|
5984
|
+
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(wt).getManagers().then((g) => {
|
|
5887
5985
|
l.managersList = g;
|
|
5888
5986
|
}).catch(w)), l.managersList;
|
|
5889
|
-
}),
|
|
5890
|
-
const l =
|
|
5891
|
-
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(
|
|
5987
|
+
}), S = P(() => {
|
|
5988
|
+
const l = R();
|
|
5989
|
+
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance($).getWarehouses().then((g) => {
|
|
5892
5990
|
l.warehousesReference = g;
|
|
5893
5991
|
}).catch(w)), l.warehousesReference;
|
|
5894
|
-
}),
|
|
5895
|
-
const l =
|
|
5896
|
-
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(
|
|
5992
|
+
}), _ = P(() => {
|
|
5993
|
+
const l = R();
|
|
5994
|
+
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance($).getPropertyTypes().then((g) => {
|
|
5897
5995
|
l.propertyTypesReference = g;
|
|
5898
5996
|
}).catch(w)), l.propertyTypesReference;
|
|
5899
|
-
}), U =
|
|
5900
|
-
const l =
|
|
5901
|
-
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(
|
|
5997
|
+
}), U = P(() => {
|
|
5998
|
+
const l = R();
|
|
5999
|
+
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance($).getPriceCoefficients().then((g) => {
|
|
5902
6000
|
l.priceCoefficientsReference = g;
|
|
5903
6001
|
}).catch(w)), l.priceCoefficientsReference;
|
|
5904
6002
|
});
|
|
@@ -5954,26 +6052,26 @@ const a = re("__references_private", () => {
|
|
|
5954
6052
|
/**
|
|
5955
6053
|
* Справочник типов доставки.
|
|
5956
6054
|
*/
|
|
5957
|
-
deliveryTypeReference:
|
|
6055
|
+
deliveryTypeReference: I,
|
|
5958
6056
|
/**
|
|
5959
6057
|
* Список менеджеров.
|
|
5960
6058
|
*/
|
|
5961
|
-
managersList:
|
|
6059
|
+
managersList: d,
|
|
5962
6060
|
/**
|
|
5963
6061
|
* Справочник складов.
|
|
5964
6062
|
*/
|
|
5965
|
-
warehousesReference:
|
|
6063
|
+
warehousesReference: S,
|
|
5966
6064
|
/**
|
|
5967
6065
|
* Справочник типов свойств.
|
|
5968
6066
|
*/
|
|
5969
|
-
propertyTypesReference:
|
|
6067
|
+
propertyTypesReference: _,
|
|
5970
6068
|
/**
|
|
5971
6069
|
* Справочник коэффициентов цен.
|
|
5972
6070
|
*/
|
|
5973
6071
|
priceCoefficientsReference: U
|
|
5974
6072
|
};
|
|
5975
6073
|
});
|
|
5976
|
-
class
|
|
6074
|
+
class Rt {
|
|
5977
6075
|
/**
|
|
5978
6076
|
* Инициализирует экземпляр класса {@link MetaTagItem}.
|
|
5979
6077
|
*
|
|
@@ -5991,7 +6089,7 @@ class Pt {
|
|
|
5991
6089
|
this.name = r.name, this.content = r.content;
|
|
5992
6090
|
}
|
|
5993
6091
|
}
|
|
5994
|
-
class
|
|
6092
|
+
class er {
|
|
5995
6093
|
/**
|
|
5996
6094
|
* Инициализирует экземпляр класса {@link Seo}.
|
|
5997
6095
|
*
|
|
@@ -6027,10 +6125,10 @@ class Qe {
|
|
|
6027
6125
|
*/
|
|
6028
6126
|
t(this, "meta");
|
|
6029
6127
|
var e;
|
|
6030
|
-
this.resourceType = new
|
|
6128
|
+
this.resourceType = new mr(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 Rt(s))) ?? [];
|
|
6031
6129
|
}
|
|
6032
6130
|
}
|
|
6033
|
-
class
|
|
6131
|
+
class ls extends h {
|
|
6034
6132
|
/**
|
|
6035
6133
|
* Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
|
|
6036
6134
|
*
|
|
@@ -6038,7 +6136,7 @@ class cs extends h {
|
|
|
6038
6136
|
* @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
|
|
6039
6137
|
*/
|
|
6040
6138
|
getResourceSeoData(r, e) {
|
|
6041
|
-
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new
|
|
6139
|
+
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new er(s.data));
|
|
6042
6140
|
}
|
|
6043
6141
|
/**
|
|
6044
6142
|
* Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
|
|
@@ -6049,7 +6147,7 @@ class cs extends h {
|
|
|
6049
6147
|
* в случае ошибок в запросах.
|
|
6050
6148
|
*/
|
|
6051
6149
|
saveResourceSeoData(r, e = {}) {
|
|
6052
|
-
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new
|
|
6150
|
+
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new er(s.data), e);
|
|
6053
6151
|
}
|
|
6054
6152
|
/**
|
|
6055
6153
|
* Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
|
|
@@ -6061,7 +6159,7 @@ class cs extends h {
|
|
|
6061
6159
|
return this.delete(`/internal/seo/${r.slug}/${e}`);
|
|
6062
6160
|
}
|
|
6063
6161
|
}
|
|
6064
|
-
class
|
|
6162
|
+
class us extends h {
|
|
6065
6163
|
/**
|
|
6066
6164
|
* Возвращает подсказки по адресам.
|
|
6067
6165
|
*
|
|
@@ -6108,8 +6206,8 @@ class ls extends h {
|
|
|
6108
6206
|
});
|
|
6109
6207
|
}
|
|
6110
6208
|
}
|
|
6111
|
-
var
|
|
6112
|
-
class
|
|
6209
|
+
var Dt = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(Dt || {});
|
|
6210
|
+
class At extends pr {
|
|
6113
6211
|
/**
|
|
6114
6212
|
* Инициализирует экземпляр класса {@link User}.
|
|
6115
6213
|
*
|
|
@@ -6132,7 +6230,7 @@ class at extends cr {
|
|
|
6132
6230
|
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;
|
|
6133
6231
|
}
|
|
6134
6232
|
}
|
|
6135
|
-
class
|
|
6233
|
+
class ps extends h {
|
|
6136
6234
|
/**
|
|
6137
6235
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
6138
6236
|
*/
|
|
@@ -6148,16 +6246,16 @@ class us extends h {
|
|
|
6148
6246
|
return this.get("internal/users/current-tokens").then((r) => r.accessToken);
|
|
6149
6247
|
}
|
|
6150
6248
|
}
|
|
6151
|
-
class
|
|
6249
|
+
class $t extends h {
|
|
6152
6250
|
/**
|
|
6153
6251
|
* Возвращает данные о текущем пользователе.
|
|
6154
6252
|
*/
|
|
6155
6253
|
// eslint-disable-next-line class-methods-use-this
|
|
6156
6254
|
getCurrentUser() {
|
|
6157
|
-
return this.get("/internal/users/info", {}, (r) => new
|
|
6255
|
+
return this.get("/internal/users/info", {}, (r) => new At(r.data));
|
|
6158
6256
|
}
|
|
6159
6257
|
}
|
|
6160
|
-
const
|
|
6258
|
+
const Tt = te("__user_state_private", () => {
|
|
6161
6259
|
const n = y({}), r = y(void 0);
|
|
6162
6260
|
return {
|
|
6163
6261
|
/**
|
|
@@ -6169,20 +6267,20 @@ const Dt = re("__user_state_private", () => {
|
|
|
6169
6267
|
*/
|
|
6170
6268
|
currentUser: r
|
|
6171
6269
|
};
|
|
6172
|
-
}),
|
|
6270
|
+
}), hs = te("user_state", () => ({
|
|
6173
6271
|
/**
|
|
6174
6272
|
* Данные о текущем пользователе.
|
|
6175
6273
|
*/
|
|
6176
|
-
currentUser:
|
|
6177
|
-
const r =
|
|
6178
|
-
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(
|
|
6274
|
+
currentUser: P(() => {
|
|
6275
|
+
const r = Tt();
|
|
6276
|
+
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance($t).getCurrentUser().then((e) => {
|
|
6179
6277
|
r.currentUser = e;
|
|
6180
6278
|
}).catch(w).finally(() => {
|
|
6181
6279
|
r.dataLoaderList.currentUser = !1;
|
|
6182
6280
|
})), r.currentUser;
|
|
6183
6281
|
})
|
|
6184
6282
|
}));
|
|
6185
|
-
class
|
|
6283
|
+
class gs {
|
|
6186
6284
|
/**
|
|
6187
6285
|
* Инициализирует экземпляр класса {@link FieldValidationResultData}.
|
|
6188
6286
|
*
|
|
@@ -6206,150 +6304,150 @@ class hs {
|
|
|
6206
6304
|
}
|
|
6207
6305
|
}
|
|
6208
6306
|
export {
|
|
6209
|
-
|
|
6210
|
-
|
|
6307
|
+
nt as AnyReference,
|
|
6308
|
+
Ut as AppBaseConfig,
|
|
6211
6309
|
T as AppConfigProvider,
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6310
|
+
Ne as BankAccount,
|
|
6311
|
+
$e as BasePaginationProvider,
|
|
6312
|
+
Wr as CalculationTypeEnum,
|
|
6313
|
+
me as Cart,
|
|
6314
|
+
Er as CartItem,
|
|
6315
|
+
zr as CartItemBase,
|
|
6316
|
+
Ot as CartProvider,
|
|
6317
|
+
Gt as CatalogProvider,
|
|
6318
|
+
nr as CatalogableItem,
|
|
6319
|
+
E as Category,
|
|
6320
|
+
We as CategoryPricingRule,
|
|
6321
|
+
gr as ChannelPrimaryInterest,
|
|
6322
|
+
Vt as City,
|
|
6323
|
+
Me as CityWithRegionAndCountry,
|
|
6324
|
+
Qe as Client,
|
|
6325
|
+
ft as ClientAdditionalData,
|
|
6326
|
+
we as ClientCategory,
|
|
6327
|
+
Xt as ClientDataProvider,
|
|
6328
|
+
Ft as ClientPriceProvider,
|
|
6231
6329
|
jt as ClientPriceTemplateProvider,
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6330
|
+
Z as ClientProduct,
|
|
6331
|
+
Bt as ClientProductCategoryDataProvider,
|
|
6332
|
+
zt as ClientProductDataProvider,
|
|
6333
|
+
ge as ClientShortInfo,
|
|
6334
|
+
it as ClientsAdditionalDataRequestTypeEnum,
|
|
6335
|
+
Kt as ClientsListFilters,
|
|
6336
|
+
oe as CodedIdentity,
|
|
6337
|
+
es as ConfiguratorProvider,
|
|
6338
|
+
Oe as Contact,
|
|
6339
|
+
Qr as ContactLinks,
|
|
6340
|
+
M as ContactPerson,
|
|
6341
|
+
mt as ContactPersonRelated,
|
|
6342
|
+
ot as ContactPosition,
|
|
6245
6343
|
_e as ContactRelation,
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6344
|
+
yr as ContragentBase,
|
|
6345
|
+
ve as ContragentFactory,
|
|
6346
|
+
wr as ContragentIc,
|
|
6347
|
+
ht as ContragentPerson,
|
|
6348
|
+
gt as ContragentUlNr,
|
|
6349
|
+
Cr as ContragentUlR,
|
|
6350
|
+
je as CostSourceEnum,
|
|
6351
|
+
ee as Country,
|
|
6352
|
+
Ce as Currency,
|
|
6353
|
+
us as DataSuggestionProvider,
|
|
6354
|
+
Qt as DataTablePagination,
|
|
6355
|
+
yt as DataTablePaginationRequestParams,
|
|
6356
|
+
Yt as DataTableSortRequestParams,
|
|
6357
|
+
rs as DateTimeProvider,
|
|
6358
|
+
Vr as DeletableNamedIdentity,
|
|
6359
|
+
ae as DeliveryAddress,
|
|
6360
|
+
X as DeliveryType,
|
|
6361
|
+
Nt as DetailedJwtPayload,
|
|
6362
|
+
Zr as DeviceTypeResolutionConfig,
|
|
6363
|
+
Kr as DiscountShortInfo,
|
|
6364
|
+
gs as FieldValidationResultData,
|
|
6365
|
+
ue as FilterGroup,
|
|
6366
|
+
Je as FilterItem,
|
|
6367
|
+
He as FilterOpEnum,
|
|
6368
|
+
cr as GeoCoordinates,
|
|
6369
|
+
Hr as HiddenCatalogableItem,
|
|
6370
|
+
pe as HttpCachedRequester,
|
|
6371
|
+
et as HttpParamsConfig,
|
|
6274
6372
|
h as HttpRequester,
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6373
|
+
H as Identity,
|
|
6374
|
+
Br as Image,
|
|
6375
|
+
G as JwtPayload,
|
|
6278
6376
|
Ae as Manager,
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6377
|
+
ce as ManagerCommon,
|
|
6378
|
+
ts as ManagerDataFactory,
|
|
6379
|
+
wt as ManagerDataProvider,
|
|
6380
|
+
Rt as MetaTagItem,
|
|
6283
6381
|
b as NamedIdentity,
|
|
6284
6382
|
j as Opf,
|
|
6285
6383
|
k as OpfEnum,
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6384
|
+
vt as Order,
|
|
6385
|
+
ar as OrderInfo,
|
|
6386
|
+
ct as OrderPaymentStatus,
|
|
6387
|
+
Ct as OrderProduct,
|
|
6388
|
+
vr as OrderShortInfo,
|
|
6389
|
+
lt as OrderStatus,
|
|
6390
|
+
ss as OrdersDataProvider,
|
|
6391
|
+
re as PartnerGroup,
|
|
6392
|
+
ut as PaymentType,
|
|
6393
|
+
fe as PreferencesStorageProvider,
|
|
6394
|
+
Ie as PriceAnalyze,
|
|
6395
|
+
is as PriceAnalyzeProvider,
|
|
6298
6396
|
Re as PriceCoefficient,
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6397
|
+
or as PriceCoefficientEnum,
|
|
6398
|
+
ns as PriceHistoryDataProvider,
|
|
6399
|
+
at as PriceHistoryItem,
|
|
6302
6400
|
W as PriceTemplate,
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6401
|
+
be as PriceTemplateCategory,
|
|
6402
|
+
se as PriceTemplateClient,
|
|
6403
|
+
ur as PriceTemplateICatalogableItem,
|
|
6404
|
+
Se as PriceTemplateProduct,
|
|
6405
|
+
Et as PriceTemplateProvider,
|
|
6406
|
+
ne as PricingRole,
|
|
6309
6407
|
Wt as PricingRoleProvider,
|
|
6310
|
-
|
|
6408
|
+
xe as PrimaryCatalogableItem,
|
|
6311
6409
|
x as Product,
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6410
|
+
Mt as ProductCategoryDataProvider,
|
|
6411
|
+
Ht as ProductDataProvider,
|
|
6412
|
+
pt as ProductFileType,
|
|
6413
|
+
Ge as ProductPriceCoefficient,
|
|
6414
|
+
Pt as ProductPriceHistory,
|
|
6415
|
+
Jt as PropertiesProvider,
|
|
6416
|
+
ie as Property,
|
|
6417
|
+
hr as PropertyType,
|
|
6418
|
+
Jr as PropertyTypeEnum,
|
|
6419
|
+
z as PropertyValue,
|
|
6420
|
+
os as RecommendationsDataProvider,
|
|
6421
|
+
Ze as RecommendationsList,
|
|
6422
|
+
a as Reference,
|
|
6423
|
+
$ as ReferenceDataProvider,
|
|
6424
|
+
le as Region,
|
|
6425
|
+
mr as ResourceType,
|
|
6328
6426
|
N as SalesDirection,
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6352
|
-
|
|
6353
|
-
|
|
6427
|
+
rt as SentryConfig,
|
|
6428
|
+
er as Seo,
|
|
6429
|
+
ls as SeoDataProvider,
|
|
6430
|
+
fr as SourcePrimaryInterest,
|
|
6431
|
+
Mr as StockCount,
|
|
6432
|
+
qt as TemplatesListFilters,
|
|
6433
|
+
Fe as TypedInstanceFactory,
|
|
6434
|
+
Ye as UnitsHelper,
|
|
6435
|
+
Zt as UnknownClientDataProvider,
|
|
6436
|
+
lr as UpdatableNamedIdentity,
|
|
6437
|
+
At as User,
|
|
6438
|
+
ps as UserAuthDataProvider,
|
|
6439
|
+
pr as UserCommonInfo,
|
|
6440
|
+
$t as UserDataProvider,
|
|
6441
|
+
Yr as UserPricingRole,
|
|
6442
|
+
F as UserShortInfo,
|
|
6443
|
+
Dt as UserTypeEnum,
|
|
6444
|
+
tt as VersionConfig,
|
|
6445
|
+
De as Warehouse,
|
|
6446
|
+
st as WebSocketConfig,
|
|
6447
|
+
Ve as findCatalogItemByIdRecursive,
|
|
6448
|
+
Ke as flattenCatalogItems,
|
|
6449
|
+
Te as useAuthStateStore,
|
|
6450
|
+
cs as useReferencesStore,
|
|
6451
|
+
hs as useUserStateStore
|
|
6354
6452
|
};
|
|
6355
6453
|
//# sourceMappingURL=sc-common-lib.js.map
|