@snabcentr/common-lib 1.72.0 → 1.72.2
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 +21 -2
- package/dist/sc-common-lib.js +861 -746
- 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 +19 -1
- package/dist/src/auth/states/auth-state-store.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 a, cloneDeep as Sr, toLower as _r, isFunction as qe, map as Pe, forEach as dr, 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 C, startOfToday as Le, format as q, addSeconds as Ir, 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 ie {
|
|
|
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 ie {
|
|
|
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 kt extends ie {
|
|
|
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 kt extends ie {
|
|
|
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,11 +189,145 @@ const W = class W {
|
|
|
189
189
|
/**
|
|
190
190
|
* Конфигурация приложения.
|
|
191
191
|
*/
|
|
192
|
-
t(
|
|
193
|
-
let
|
|
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(C(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(C(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());
|
|
325
|
+
function i() {
|
|
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;
|
|
329
|
+
}).catch(w);
|
|
330
|
+
}
|
|
197
331
|
return {
|
|
198
332
|
/**
|
|
199
333
|
* {@link Promise<string>} для получения jwt-ключа доступа к системам.
|
|
@@ -210,46 +344,55 @@ const ee = Z("__auth_state_private", () => {
|
|
|
210
344
|
/**
|
|
211
345
|
* Список вычисляемых свойств для проверки наличия у пользователя прав доступа.
|
|
212
346
|
*/
|
|
213
|
-
userPermissionsComputedRefs: s
|
|
347
|
+
userPermissionsComputedRefs: s,
|
|
348
|
+
/**
|
|
349
|
+
* Принудительно пересчитывает права доступа пользователя на основе текущего JWT токена.
|
|
350
|
+
*/
|
|
351
|
+
recalculateUserPermissions: i
|
|
214
352
|
};
|
|
215
|
-
}),
|
|
216
|
-
const n =
|
|
217
|
-
const
|
|
218
|
-
if (
|
|
219
|
-
const
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
}).catch(
|
|
353
|
+
}), Te = te("__auth_state", () => {
|
|
354
|
+
const n = P(() => {
|
|
355
|
+
const o = B();
|
|
356
|
+
if (D(o.jwtToken) && !D(o.jwtTokenUpdater)) {
|
|
357
|
+
const c = o.jwtTokenUpdater();
|
|
358
|
+
o.jwtToken = c, c.then((u) => {
|
|
359
|
+
o.jwtToken = Promise.resolve(u), fe.saveActualDataToStorage("sc.token", u, Ee(u)), o.recalculateUserPermissions();
|
|
360
|
+
}).catch(w);
|
|
223
361
|
}
|
|
224
|
-
return
|
|
362
|
+
return o.jwtToken;
|
|
225
363
|
});
|
|
226
|
-
function r(
|
|
227
|
-
|
|
228
|
-
}
|
|
229
|
-
function e() {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
const c =
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
364
|
+
function r(o) {
|
|
365
|
+
B().jwtTokenUpdater = o;
|
|
366
|
+
}
|
|
367
|
+
function e(o) {
|
|
368
|
+
const c = B();
|
|
369
|
+
c.jwtToken = Promise.resolve(o), fe.saveActualDataToStorage("sc.token", o, Ee(o)), c.recalculateUserPermissions();
|
|
370
|
+
}
|
|
371
|
+
function s() {
|
|
372
|
+
const o = B();
|
|
373
|
+
o.jwtToken = void 0, o.userPermissions = void 0, fe.saveActualDataToStorage("sc.token", void 0);
|
|
374
|
+
}
|
|
375
|
+
function i(o) {
|
|
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;
|
|
380
|
+
}).catch(w);
|
|
381
|
+
const u = Q(o) ? o.join(" && ") : o;
|
|
382
|
+
if (c.userPermissionsComputedRefs.has(u))
|
|
383
|
+
return c.userPermissionsComputedRefs.get(u);
|
|
384
|
+
const p = P(() => {
|
|
385
|
+
const f = (m) => {
|
|
243
386
|
var _;
|
|
244
|
-
const
|
|
245
|
-
if (
|
|
387
|
+
const A = $r(m, ".");
|
|
388
|
+
if (A.length < 2)
|
|
246
389
|
return !1;
|
|
247
|
-
const [
|
|
248
|
-
return
|
|
390
|
+
const [d, I] = A, S = (_ = B().userPermissions) == null ? void 0 : _[d];
|
|
391
|
+
return Q(S) && S.includes(I);
|
|
249
392
|
};
|
|
250
|
-
return
|
|
393
|
+
return Q(o) ? Ar(o, (m) => f(m)) : f(o);
|
|
251
394
|
});
|
|
252
|
-
return
|
|
395
|
+
return c.userPermissionsComputedRefs.set(u, p), p;
|
|
253
396
|
}
|
|
254
397
|
return {
|
|
255
398
|
/**
|
|
@@ -262,19 +405,25 @@ const ee = Z("__auth_state_private", () => {
|
|
|
262
405
|
* @param updater Механизм для обновления jwt-ключа доступа к системам.
|
|
263
406
|
*/
|
|
264
407
|
setJwtTokenUpdater: r,
|
|
408
|
+
/**
|
|
409
|
+
* Устанавливает новый JWT токен и автоматически пересчитывает права доступа.
|
|
410
|
+
*
|
|
411
|
+
* @param token Новый JWT токен.
|
|
412
|
+
*/
|
|
413
|
+
setJwtToken: e,
|
|
265
414
|
/**
|
|
266
415
|
* Выполняет очистку jwt-ключа доступа к системам.
|
|
267
416
|
*/
|
|
268
|
-
invalidateJwtToken:
|
|
417
|
+
invalidateJwtToken: s,
|
|
269
418
|
/**
|
|
270
419
|
* Возвращает вычисляемое поле для проверки наличия указанных прав доступа.
|
|
271
420
|
*
|
|
272
421
|
* @param name Проверяемое право доступа или их список. Должны быть представлены в виде значения: <РЕСУРС>.<РОЛЬ>.
|
|
273
422
|
*/
|
|
274
|
-
hasUserPermission:
|
|
423
|
+
hasUserPermission: i
|
|
275
424
|
};
|
|
276
425
|
});
|
|
277
|
-
class
|
|
426
|
+
class H {
|
|
278
427
|
/**
|
|
279
428
|
* Инициализирует экземпляр класса {@link Identity}.
|
|
280
429
|
*
|
|
@@ -290,16 +439,16 @@ class M {
|
|
|
290
439
|
* @inheritDoc
|
|
291
440
|
*/
|
|
292
441
|
t(this, "guid");
|
|
293
|
-
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) ?? "";
|
|
294
443
|
}
|
|
295
444
|
/**
|
|
296
445
|
* Возвращает признак, что это новая запись.
|
|
297
446
|
*/
|
|
298
447
|
isNewRec() {
|
|
299
|
-
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);
|
|
300
449
|
}
|
|
301
450
|
}
|
|
302
|
-
class
|
|
451
|
+
class b extends H {
|
|
303
452
|
/**
|
|
304
453
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
305
454
|
*
|
|
@@ -314,7 +463,7 @@ class T extends M {
|
|
|
314
463
|
this.name = (e == null ? void 0 : e.name) ?? "";
|
|
315
464
|
}
|
|
316
465
|
}
|
|
317
|
-
class
|
|
466
|
+
class oe extends b {
|
|
318
467
|
/**
|
|
319
468
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
320
469
|
*
|
|
@@ -329,7 +478,7 @@ class ne extends T {
|
|
|
329
478
|
this.code = (e == null ? void 0 : e.code) ?? "";
|
|
330
479
|
}
|
|
331
480
|
}
|
|
332
|
-
class
|
|
481
|
+
class nr extends oe {
|
|
333
482
|
/**
|
|
334
483
|
* Инициализирует экземпляр класса {@link CatalogableItem}.
|
|
335
484
|
*
|
|
@@ -348,7 +497,7 @@ class rr extends ne {
|
|
|
348
497
|
this.slug = (e == null ? void 0 : e.slug) ?? "";
|
|
349
498
|
}
|
|
350
499
|
}
|
|
351
|
-
class
|
|
500
|
+
class xe extends nr {
|
|
352
501
|
/**
|
|
353
502
|
* Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
|
|
354
503
|
*
|
|
@@ -363,7 +512,7 @@ class Le extends rr {
|
|
|
363
512
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
364
513
|
}
|
|
365
514
|
}
|
|
366
|
-
class
|
|
515
|
+
class he extends xe {
|
|
367
516
|
/**
|
|
368
517
|
* Инициализирует экземпляр класса {@link BaseCategory}.
|
|
369
518
|
*
|
|
@@ -387,11 +536,11 @@ class ue extends Le {
|
|
|
387
536
|
* Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
|
|
388
537
|
*/
|
|
389
538
|
t(this, "currencyRates");
|
|
390
|
-
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;
|
|
391
540
|
}
|
|
392
541
|
}
|
|
393
|
-
var
|
|
394
|
-
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 v extends b {
|
|
395
544
|
/**
|
|
396
545
|
* Инициализирует экземпляр класса {@link Reference}.
|
|
397
546
|
*
|
|
@@ -410,15 +559,15 @@ class P extends T {
|
|
|
410
559
|
this.description = e == null ? void 0 : e.description, this.slug = e == null ? void 0 : e.slug;
|
|
411
560
|
}
|
|
412
561
|
}
|
|
413
|
-
class Re extends
|
|
562
|
+
class Re extends v {
|
|
414
563
|
/**
|
|
415
564
|
* Возвращает значение справочника коэффициента розничной цены.
|
|
416
565
|
*/
|
|
417
566
|
static getRetailPriceCoefficient() {
|
|
418
|
-
return { id: -2, slug:
|
|
567
|
+
return { id: -2, slug: or.Retail, name: "Розн. цена", guid: "", isNewRec: br(!0) };
|
|
419
568
|
}
|
|
420
569
|
}
|
|
421
|
-
class
|
|
570
|
+
class Ge {
|
|
422
571
|
/**
|
|
423
572
|
* Инициализирует экземпляр класса {@link ProductPriceCoefficient}.
|
|
424
573
|
*
|
|
@@ -448,7 +597,7 @@ class qe {
|
|
|
448
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;
|
|
449
598
|
}
|
|
450
599
|
}
|
|
451
|
-
class
|
|
600
|
+
class cr {
|
|
452
601
|
/**
|
|
453
602
|
* Инициализирует экземпляр класса {@link GeoCoordinates}.
|
|
454
603
|
*
|
|
@@ -466,9 +615,9 @@ class sr {
|
|
|
466
615
|
this.lat = (r == null ? void 0 : r.lat) ?? 0, this.long = (r == null ? void 0 : r.long) ?? 0;
|
|
467
616
|
}
|
|
468
617
|
}
|
|
469
|
-
class
|
|
618
|
+
class X extends v {
|
|
470
619
|
}
|
|
471
|
-
class
|
|
620
|
+
class De extends v {
|
|
472
621
|
/**
|
|
473
622
|
* Инициализирует экземпляр класса {@link Warehouse}.
|
|
474
623
|
*
|
|
@@ -497,10 +646,10 @@ class ae extends P {
|
|
|
497
646
|
* Координаты склада.
|
|
498
647
|
*/
|
|
499
648
|
t(this, "coordinates");
|
|
500
|
-
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);
|
|
501
650
|
}
|
|
502
651
|
}
|
|
503
|
-
class
|
|
652
|
+
class Mr {
|
|
504
653
|
/**
|
|
505
654
|
* Инициализирует экземпляр класса {@link StockCount}.
|
|
506
655
|
*
|
|
@@ -515,10 +664,10 @@ class Fr {
|
|
|
515
664
|
* Количество остатков товара на складе.
|
|
516
665
|
*/
|
|
517
666
|
t(this, "count");
|
|
518
|
-
this.warehouse = new
|
|
667
|
+
this.warehouse = new De(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
519
668
|
}
|
|
520
669
|
}
|
|
521
|
-
class
|
|
670
|
+
class Hr extends nr {
|
|
522
671
|
/**
|
|
523
672
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
524
673
|
*
|
|
@@ -533,7 +682,7 @@ class jr extends rr {
|
|
|
533
682
|
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1;
|
|
534
683
|
}
|
|
535
684
|
}
|
|
536
|
-
class
|
|
685
|
+
class Br {
|
|
537
686
|
/**
|
|
538
687
|
* Инициализирует экземпляр класса {@link Image}.
|
|
539
688
|
*
|
|
@@ -556,14 +705,14 @@ class Mr {
|
|
|
556
705
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
557
706
|
}
|
|
558
707
|
}
|
|
559
|
-
class
|
|
708
|
+
class x extends Hr {
|
|
560
709
|
/**
|
|
561
710
|
* Инициализирует экземпляр класса {@link Product}.
|
|
562
711
|
*
|
|
563
712
|
* @param data Данные для первоначальной инициализации.
|
|
564
713
|
*/
|
|
565
714
|
constructor(e) {
|
|
566
|
-
var i, o, c,
|
|
715
|
+
var i, o, c, u;
|
|
567
716
|
super(e);
|
|
568
717
|
/**
|
|
569
718
|
* Артикул производителя/поставщика.
|
|
@@ -641,16 +790,16 @@ class k extends jr {
|
|
|
641
790
|
* Список коэффициентов цен на продукт.
|
|
642
791
|
*/
|
|
643
792
|
t(this, "priceCoefficients");
|
|
644
|
-
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 =
|
|
645
|
-
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((
|
|
646
|
-
s && (this.category = 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 = a(e == null ? void 0 : e.costDate) ? C(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((p) => new Mr(p))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
|
|
794
|
+
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((p) => p.isPrimary));
|
|
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);
|
|
647
796
|
}
|
|
648
797
|
/**
|
|
649
798
|
* Возвращает признак, что это измеряемый товар.
|
|
650
799
|
*/
|
|
651
800
|
getIsMeasurable() {
|
|
652
801
|
var s;
|
|
653
|
-
const e = (s =
|
|
802
|
+
const e = (s = T.getConfig().catalog) == null ? void 0 : s.products.units;
|
|
654
803
|
return [...(e == null ? void 0 : e.linear) ?? ["пог.м.", "м."], ...(e == null ? void 0 : e.square) ?? ["м2"]].includes(this.unit);
|
|
655
804
|
}
|
|
656
805
|
/**
|
|
@@ -666,7 +815,7 @@ class k extends jr {
|
|
|
666
815
|
return this.retailCostRub ?? this.costRub;
|
|
667
816
|
}
|
|
668
817
|
}
|
|
669
|
-
class
|
|
818
|
+
class zr extends H {
|
|
670
819
|
/**
|
|
671
820
|
* Инициализирует экземпляр класса {@link CartItemBase}.
|
|
672
821
|
*
|
|
@@ -718,10 +867,10 @@ class Hr extends M {
|
|
|
718
867
|
* Признак того, что позиция является дополнительной продажей.
|
|
719
868
|
*/
|
|
720
869
|
t(this, "isAdditionalSale");
|
|
721
|
-
this.product = 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;
|
|
722
871
|
}
|
|
723
872
|
}
|
|
724
|
-
class
|
|
873
|
+
class Er extends zr {
|
|
725
874
|
/**
|
|
726
875
|
* Инициализирует экземпляр класса {@link CartItem}.
|
|
727
876
|
*
|
|
@@ -771,7 +920,7 @@ class Br extends Hr {
|
|
|
771
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;
|
|
772
921
|
}
|
|
773
922
|
}
|
|
774
|
-
class
|
|
923
|
+
class me {
|
|
775
924
|
/**
|
|
776
925
|
* Инициализирует экземпляр класса {@link Cart}.
|
|
777
926
|
*
|
|
@@ -790,10 +939,10 @@ class ge {
|
|
|
790
939
|
* Список итоговых сумм по направлениям продаж.
|
|
791
940
|
*/
|
|
792
941
|
t(this, "directionsSum");
|
|
793
|
-
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;
|
|
794
943
|
}
|
|
795
944
|
}
|
|
796
|
-
class
|
|
945
|
+
class Fe {
|
|
797
946
|
/**
|
|
798
947
|
* Инициализирует экземпляр указанного класса.
|
|
799
948
|
*
|
|
@@ -824,7 +973,7 @@ const L = class L {
|
|
|
824
973
|
/**
|
|
825
974
|
* Базовый URL путь для выполнения запросов.
|
|
826
975
|
*/
|
|
827
|
-
t(this, "baseUrl", `${
|
|
976
|
+
t(this, "baseUrl", `${T.getConfig().http.portalApiUrl}/api`);
|
|
828
977
|
/**
|
|
829
978
|
* Обработчик ошибок выполнения запросов текущего экземпляра класса.
|
|
830
979
|
*
|
|
@@ -832,7 +981,7 @@ const L = class L {
|
|
|
832
981
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
833
982
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
834
983
|
*/
|
|
835
|
-
t(this, "errorResponseHandler",
|
|
984
|
+
t(this, "errorResponseHandler", w);
|
|
836
985
|
/**
|
|
837
986
|
* Список идентификаторов обработчиков запросов для возможности отключить те или иные обработчики.
|
|
838
987
|
*/
|
|
@@ -851,7 +1000,7 @@ const L = class L {
|
|
|
851
1000
|
// eslint-disable-next-line class-methods-use-this
|
|
852
1001
|
t(this, "authRequestInterceptor", async (r) => {
|
|
853
1002
|
let e;
|
|
854
|
-
return
|
|
1003
|
+
return D(Te().jwtToken) || (e = await Te().jwtToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
|
|
855
1004
|
});
|
|
856
1005
|
/**
|
|
857
1006
|
* Перехватчик запроса для преобразования данных запроса.
|
|
@@ -859,7 +1008,7 @@ const L = class L {
|
|
|
859
1008
|
* @param request Данные запроса.
|
|
860
1009
|
*/
|
|
861
1010
|
// eslint-disable-next-line class-methods-use-this
|
|
862
|
-
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));
|
|
863
1012
|
/**
|
|
864
1013
|
* Перехватчик ошибок ответов на запрос.
|
|
865
1014
|
*
|
|
@@ -868,7 +1017,7 @@ const L = class L {
|
|
|
868
1017
|
t(this, "authErrorsResponseInterceptors", (r) => {
|
|
869
1018
|
var s;
|
|
870
1019
|
const e = r.rawError ? (s = r.rawError) == null ? void 0 : s.config : void 0;
|
|
871
|
-
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);
|
|
872
1021
|
});
|
|
873
1022
|
/**
|
|
874
1023
|
* Перехватчик ответа для преобразования данных ответа на запрос.
|
|
@@ -876,11 +1025,11 @@ const L = class L {
|
|
|
876
1025
|
* @param response Данные ответа на запрос.
|
|
877
1026
|
*/
|
|
878
1027
|
// eslint-disable-next-line class-methods-use-this
|
|
879
|
-
t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data =
|
|
880
|
-
const r =
|
|
881
|
-
this.errorResponseHandler = L.defaultErrorsResponseHandler, this.httpClient =
|
|
1028
|
+
t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = Ue(r.data)), r));
|
|
1029
|
+
const r = T.getConfig().version;
|
|
1030
|
+
this.errorResponseHandler = L.defaultErrorsResponseHandler, this.httpClient = jr.create({
|
|
882
1031
|
headers: {
|
|
883
|
-
"APP-VERSION": `${r.name} (${r.version}, ${q(r.date,
|
|
1032
|
+
"APP-VERSION": `${r.name} (${r.version}, ${q(r.date, T.getConfig().dateFormats.uiDate)})`,
|
|
884
1033
|
Accept: "application/json",
|
|
885
1034
|
"Content-Type": "application/json"
|
|
886
1035
|
}
|
|
@@ -909,7 +1058,7 @@ const L = class L {
|
|
|
909
1058
|
* @param type Тип данных, которыми оперирует метод.
|
|
910
1059
|
*/
|
|
911
1060
|
static getInstance(r) {
|
|
912
|
-
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];
|
|
913
1062
|
}
|
|
914
1063
|
/**
|
|
915
1064
|
* Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
|
|
@@ -918,7 +1067,7 @@ const L = class L {
|
|
|
918
1067
|
*/
|
|
919
1068
|
static convertHttpErrorResponse(r) {
|
|
920
1069
|
var e, s;
|
|
921
|
-
if (
|
|
1070
|
+
if (!D(r.request) || !D(r.response)) {
|
|
922
1071
|
const i = r == null ? void 0 : r.response;
|
|
923
1072
|
return Promise.reject({
|
|
924
1073
|
status: (i == null ? void 0 : i.status) ?? 0,
|
|
@@ -1014,9 +1163,9 @@ t(L, "instances", {}), /**
|
|
|
1014
1163
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
1015
1164
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1016
1165
|
*/
|
|
1017
|
-
t(L, "defaultErrorsResponseHandler",
|
|
1166
|
+
t(L, "defaultErrorsResponseHandler", w);
|
|
1018
1167
|
let h = L;
|
|
1019
|
-
class
|
|
1168
|
+
class Ot extends h {
|
|
1020
1169
|
/**
|
|
1021
1170
|
* Возвращает содержимое корзины указанного клиента.
|
|
1022
1171
|
*
|
|
@@ -1025,7 +1174,7 @@ class xt extends h {
|
|
|
1025
1174
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_get
|
|
1026
1175
|
*/
|
|
1027
1176
|
getCart(r) {
|
|
1028
|
-
return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new
|
|
1177
|
+
return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new me(e.data));
|
|
1029
1178
|
}
|
|
1030
1179
|
/**
|
|
1031
1180
|
* Удаляет всё содержимое корзины.
|
|
@@ -1063,7 +1212,7 @@ class xt extends h {
|
|
|
1063
1212
|
isAdditionalSale: e.isAdditionalSale,
|
|
1064
1213
|
...e.configuratorParams
|
|
1065
1214
|
},
|
|
1066
|
-
(i) => new
|
|
1215
|
+
(i) => new me(i.data),
|
|
1067
1216
|
s
|
|
1068
1217
|
);
|
|
1069
1218
|
}
|
|
@@ -1093,7 +1242,7 @@ class xt extends h {
|
|
|
1093
1242
|
isAdditionalSale: e.isAdditionalSale,
|
|
1094
1243
|
...e.configuratorParams
|
|
1095
1244
|
},
|
|
1096
|
-
(i) => new
|
|
1245
|
+
(i) => new me(i.data),
|
|
1097
1246
|
s
|
|
1098
1247
|
);
|
|
1099
1248
|
}
|
|
@@ -1117,7 +1266,7 @@ class xt extends h {
|
|
|
1117
1266
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_add_products_from_csv
|
|
1118
1267
|
*/
|
|
1119
1268
|
addCartItemFromCSV(r, e) {
|
|
1120
|
-
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));
|
|
1121
1270
|
}
|
|
1122
1271
|
/**
|
|
1123
1272
|
* Возвращает пример CSV файла для добавления продуктов в корзину.
|
|
@@ -1130,8 +1279,8 @@ class xt extends h {
|
|
|
1130
1279
|
return this.get(`internal/clients/${r.id}/cart/add-products-from-csv/example`, {}, (e) => new Blob([e.data], { type: "text/csv" }));
|
|
1131
1280
|
}
|
|
1132
1281
|
}
|
|
1133
|
-
var
|
|
1134
|
-
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 {
|
|
1135
1284
|
/**
|
|
1136
1285
|
* Инициализирует экземпляр класса {@link Category}.
|
|
1137
1286
|
*
|
|
@@ -1148,10 +1297,10 @@ class B extends ue {
|
|
|
1148
1297
|
* Список продуктов категории.
|
|
1149
1298
|
*/
|
|
1150
1299
|
t(this, "products");
|
|
1151
|
-
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));
|
|
1152
1301
|
}
|
|
1153
1302
|
}
|
|
1154
|
-
class
|
|
1303
|
+
class lr extends b {
|
|
1155
1304
|
/**
|
|
1156
1305
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1157
1306
|
*
|
|
@@ -1163,10 +1312,10 @@ class ir extends T {
|
|
|
1163
1312
|
* Дата и время последнего изменения.
|
|
1164
1313
|
*/
|
|
1165
1314
|
t(this, "updatedAt");
|
|
1166
|
-
this.updatedAt =
|
|
1315
|
+
this.updatedAt = a(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e == null ? void 0 : e.updatedAt;
|
|
1167
1316
|
}
|
|
1168
1317
|
}
|
|
1169
|
-
class
|
|
1318
|
+
class Vr extends lr {
|
|
1170
1319
|
/**
|
|
1171
1320
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1172
1321
|
*
|
|
@@ -1178,44 +1327,10 @@ class Er extends ir {
|
|
|
1178
1327
|
* Дата и время последнего удаления.
|
|
1179
1328
|
*/
|
|
1180
1329
|
t(this, "deletedAt");
|
|
1181
|
-
this.deletedAt =
|
|
1330
|
+
this.deletedAt = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1182
1331
|
}
|
|
1183
1332
|
}
|
|
1184
|
-
class
|
|
1185
|
-
/**
|
|
1186
|
-
* Возвращает актуальные и не просроченные данные из хранилища.
|
|
1187
|
-
*
|
|
1188
|
-
* @param keyName Название ключа из которого необходимо получить данные.
|
|
1189
|
-
*/
|
|
1190
|
-
static getActualDataFromStorage(r) {
|
|
1191
|
-
const e = localStorage.getItem(r);
|
|
1192
|
-
if (e)
|
|
1193
|
-
try {
|
|
1194
|
-
const s = JSON.parse(e);
|
|
1195
|
-
if (Sr(v(s.availableFor) || er(), /* @__PURE__ */ new Date()))
|
|
1196
|
-
return s.data ?? {};
|
|
1197
|
-
} catch {
|
|
1198
|
-
localStorage.removeItem(r);
|
|
1199
|
-
}
|
|
1200
|
-
}
|
|
1201
|
-
/**
|
|
1202
|
-
* Сохраняет данные в хранилище.
|
|
1203
|
-
*
|
|
1204
|
-
* @param keyName Название ключа в который необходимо сохранить данные.
|
|
1205
|
-
* @param data Данные, которые необходимо сохранить.
|
|
1206
|
-
* @param availableFor Дата и время до которого будут храниться настройки.
|
|
1207
|
-
*/
|
|
1208
|
-
static saveActualDataToStorage(r, e, s) {
|
|
1209
|
-
localStorage.setItem(
|
|
1210
|
-
r,
|
|
1211
|
-
JSON.stringify({
|
|
1212
|
-
availableFor: s,
|
|
1213
|
-
data: e
|
|
1214
|
-
})
|
|
1215
|
-
);
|
|
1216
|
-
}
|
|
1217
|
-
}
|
|
1218
|
-
class G extends T {
|
|
1333
|
+
class F extends b {
|
|
1219
1334
|
/**
|
|
1220
1335
|
* Инициализирует экземпляр класса {@link UserShortInfo}.
|
|
1221
1336
|
*
|
|
@@ -1230,7 +1345,7 @@ class G extends T {
|
|
|
1230
1345
|
this.type = e == null ? void 0 : e.type;
|
|
1231
1346
|
}
|
|
1232
1347
|
}
|
|
1233
|
-
class
|
|
1348
|
+
class Kr extends b {
|
|
1234
1349
|
/**
|
|
1235
1350
|
* Инициализирует экземпляр класса {@link DiscountShortInfo}.
|
|
1236
1351
|
*
|
|
@@ -1266,10 +1381,10 @@ class Vr extends T {
|
|
|
1266
1381
|
* Дата и время удаления.
|
|
1267
1382
|
*/
|
|
1268
1383
|
t(this, "deletedAt");
|
|
1269
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt =
|
|
1384
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = a(e == null ? void 0 : e.publishedAt) ? C(e.publishedAt) : e == null ? void 0 : e.publishedAt, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new F(e == null ? void 0 : e.owner), this.deletedAt = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1270
1385
|
}
|
|
1271
1386
|
}
|
|
1272
|
-
class
|
|
1387
|
+
class W extends lr {
|
|
1273
1388
|
/**
|
|
1274
1389
|
* Инициализирует экземпляр класса {@link PriceTemplate}.
|
|
1275
1390
|
*
|
|
@@ -1285,10 +1400,10 @@ class z extends ir {
|
|
|
1285
1400
|
* Дата и время создания шаблона.
|
|
1286
1401
|
*/
|
|
1287
1402
|
t(this, "createdAt");
|
|
1288
|
-
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt =
|
|
1403
|
+
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
|
|
1289
1404
|
}
|
|
1290
1405
|
}
|
|
1291
|
-
class
|
|
1406
|
+
class Z extends x {
|
|
1292
1407
|
/**
|
|
1293
1408
|
* Инициализирует экземпляр класса {@link ClientProduct}.
|
|
1294
1409
|
*
|
|
@@ -1324,10 +1439,10 @@ class Q extends k {
|
|
|
1324
1439
|
* Признак того, что указанный продукт входит в список избранных продуктов клиента.
|
|
1325
1440
|
*/
|
|
1326
1441
|
t(this, "isFavorite");
|
|
1327
|
-
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;
|
|
1328
1443
|
}
|
|
1329
1444
|
}
|
|
1330
|
-
class
|
|
1445
|
+
class Qr {
|
|
1331
1446
|
/**
|
|
1332
1447
|
* Инициализирует экземпляр класса {@link ContactLinks}.
|
|
1333
1448
|
*
|
|
@@ -1345,9 +1460,9 @@ class Jr {
|
|
|
1345
1460
|
this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
|
|
1346
1461
|
}
|
|
1347
1462
|
}
|
|
1348
|
-
class
|
|
1463
|
+
class N extends v {
|
|
1349
1464
|
}
|
|
1350
|
-
class
|
|
1465
|
+
class ce extends b {
|
|
1351
1466
|
/**
|
|
1352
1467
|
* Инициализирует экземпляр класса {@link ManagerCommon}.
|
|
1353
1468
|
*
|
|
@@ -1358,7 +1473,7 @@ class oe extends T {
|
|
|
1358
1473
|
/**
|
|
1359
1474
|
* Направление продаж.
|
|
1360
1475
|
*/
|
|
1361
|
-
t(this, "salesDirection", new
|
|
1476
|
+
t(this, "salesDirection", new N());
|
|
1362
1477
|
/**
|
|
1363
1478
|
* URI путь к фотографии пользователя.
|
|
1364
1479
|
*/
|
|
@@ -1371,10 +1486,10 @@ class oe extends T {
|
|
|
1371
1486
|
* Признак того, что менеджер является основным для клиента.
|
|
1372
1487
|
*/
|
|
1373
1488
|
t(this, "isDefault");
|
|
1374
|
-
e && (this.salesDirection = new
|
|
1489
|
+
e && (this.salesDirection = new N(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new Qr(e.contacts)), e.isDefault !== void 0 && (this.isDefault = e.isDefault));
|
|
1375
1490
|
}
|
|
1376
1491
|
}
|
|
1377
|
-
class
|
|
1492
|
+
class Yr extends b {
|
|
1378
1493
|
/**
|
|
1379
1494
|
* Инициализирует экземпляр класса {@link IUserPricingRole}.
|
|
1380
1495
|
*
|
|
@@ -1397,7 +1512,7 @@ class Kr extends T {
|
|
|
1397
1512
|
this.description = e.description, this.canChangeLowCost = e.canChangeLowCost, this.parentRoleId = e.parentRoleId;
|
|
1398
1513
|
}
|
|
1399
1514
|
}
|
|
1400
|
-
class Ae extends
|
|
1515
|
+
class Ae extends ce {
|
|
1401
1516
|
/**
|
|
1402
1517
|
* Инициализирует экземпляр класса {@link Manager}.
|
|
1403
1518
|
*
|
|
@@ -1429,10 +1544,10 @@ class Ae extends oe {
|
|
|
1429
1544
|
* Данные роли ценообразования менеджера.
|
|
1430
1545
|
*/
|
|
1431
1546
|
t(this, "pricingRole");
|
|
1432
|
-
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
|
|
1547
|
+
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;
|
|
1433
1548
|
}
|
|
1434
1549
|
}
|
|
1435
|
-
class
|
|
1550
|
+
class Xr extends he {
|
|
1436
1551
|
/**
|
|
1437
1552
|
* Инициализирует экземпляр класса {@link BaseClientCategory}.
|
|
1438
1553
|
*
|
|
@@ -1463,7 +1578,7 @@ class Qr extends ue {
|
|
|
1463
1578
|
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;
|
|
1464
1579
|
}
|
|
1465
1580
|
}
|
|
1466
|
-
class
|
|
1581
|
+
class we extends Xr {
|
|
1467
1582
|
/**
|
|
1468
1583
|
* Инициализирует экземпляр класса {@link ClientCategory}.
|
|
1469
1584
|
*
|
|
@@ -1480,10 +1595,10 @@ class fe extends Qr {
|
|
|
1480
1595
|
* Список продуктов категории.
|
|
1481
1596
|
*/
|
|
1482
1597
|
t(this, "products");
|
|
1483
|
-
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new
|
|
1598
|
+
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));
|
|
1484
1599
|
}
|
|
1485
1600
|
}
|
|
1486
|
-
class
|
|
1601
|
+
class ur {
|
|
1487
1602
|
/**
|
|
1488
1603
|
* Инициализирует экземпляр класса {@link PriceTemplateICatalogableItem}.
|
|
1489
1604
|
*
|
|
@@ -1501,7 +1616,7 @@ class nr {
|
|
|
1501
1616
|
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new Re(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
|
|
1502
1617
|
}
|
|
1503
1618
|
}
|
|
1504
|
-
class
|
|
1619
|
+
class be extends ur {
|
|
1505
1620
|
/**
|
|
1506
1621
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1507
1622
|
*
|
|
@@ -1513,12 +1628,12 @@ class Te extends nr {
|
|
|
1513
1628
|
* Базовые данные о продукте.
|
|
1514
1629
|
*/
|
|
1515
1630
|
t(this, "productCategory");
|
|
1516
|
-
this.productCategory = new
|
|
1631
|
+
this.productCategory = new he(e == null ? void 0 : e.productCategory);
|
|
1517
1632
|
}
|
|
1518
1633
|
}
|
|
1519
|
-
class
|
|
1634
|
+
class ee extends v {
|
|
1520
1635
|
}
|
|
1521
|
-
class
|
|
1636
|
+
class le extends v {
|
|
1522
1637
|
/**
|
|
1523
1638
|
* Инициализирует экземпляр класса {@link Region}.
|
|
1524
1639
|
*
|
|
@@ -1529,11 +1644,11 @@ class ce extends P {
|
|
|
1529
1644
|
/**
|
|
1530
1645
|
* Данные о стране, в которой расположен регион.
|
|
1531
1646
|
*/
|
|
1532
|
-
t(this, "country", new
|
|
1533
|
-
e && (this.country = new
|
|
1647
|
+
t(this, "country", new ee());
|
|
1648
|
+
e && (this.country = new ee(e.country));
|
|
1534
1649
|
}
|
|
1535
1650
|
}
|
|
1536
|
-
class
|
|
1651
|
+
class Me extends v {
|
|
1537
1652
|
/**
|
|
1538
1653
|
* Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
|
|
1539
1654
|
*
|
|
@@ -1544,11 +1659,11 @@ class Fe extends P {
|
|
|
1544
1659
|
/**
|
|
1545
1660
|
* Данные о регионе, в котором расположен город.
|
|
1546
1661
|
*/
|
|
1547
|
-
t(this, "region", new
|
|
1548
|
-
e && (this.region = new
|
|
1662
|
+
t(this, "region", new le());
|
|
1663
|
+
e && (this.region = new le(e.region));
|
|
1549
1664
|
}
|
|
1550
1665
|
}
|
|
1551
|
-
class
|
|
1666
|
+
class pr extends b {
|
|
1552
1667
|
/**
|
|
1553
1668
|
* Инициализирует экземпляр класса {@link UserCommonInfo}.
|
|
1554
1669
|
*
|
|
@@ -1584,10 +1699,10 @@ class or extends T {
|
|
|
1584
1699
|
* Признак активности учетной записи пользователя.
|
|
1585
1700
|
*/
|
|
1586
1701
|
t(this, "isActive");
|
|
1587
|
-
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
|
|
1702
|
+
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 = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = a(e == null ? void 0 : e.lastLoginAt) ? C(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
1588
1703
|
}
|
|
1589
1704
|
}
|
|
1590
|
-
class
|
|
1705
|
+
class ge extends pr {
|
|
1591
1706
|
/**
|
|
1592
1707
|
* Инициализирует экземпляр класса {@link Client}.
|
|
1593
1708
|
*
|
|
@@ -1629,10 +1744,10 @@ class he extends or {
|
|
|
1629
1744
|
* Список менеджеров клиента.
|
|
1630
1745
|
*/
|
|
1631
1746
|
t(this, "managers");
|
|
1632
|
-
this.salesDirection = new
|
|
1747
|
+
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))) ?? [];
|
|
1633
1748
|
}
|
|
1634
1749
|
}
|
|
1635
|
-
class
|
|
1750
|
+
class se extends H {
|
|
1636
1751
|
/**
|
|
1637
1752
|
* Инициализирует новый экземпляр класса.
|
|
1638
1753
|
*
|
|
@@ -1656,10 +1771,10 @@ class re extends M {
|
|
|
1656
1771
|
* Данные шаблона прайс-листа.
|
|
1657
1772
|
*/
|
|
1658
1773
|
t(this, "priceTemplate");
|
|
1659
|
-
this.createdAt =
|
|
1774
|
+
this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new ge(e == null ? void 0 : e.client), this.priceTemplate = new W(e == null ? void 0 : e.priceTemplate);
|
|
1660
1775
|
}
|
|
1661
1776
|
}
|
|
1662
|
-
class
|
|
1777
|
+
class Se extends ur {
|
|
1663
1778
|
/**
|
|
1664
1779
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1665
1780
|
*
|
|
@@ -1671,12 +1786,12 @@ class be extends nr {
|
|
|
1671
1786
|
* Базовые данные о продукте.
|
|
1672
1787
|
*/
|
|
1673
1788
|
t(this, "product");
|
|
1674
|
-
this.product = new
|
|
1789
|
+
this.product = new x(e == null ? void 0 : e.product);
|
|
1675
1790
|
}
|
|
1676
1791
|
}
|
|
1677
|
-
class
|
|
1792
|
+
class hr extends v {
|
|
1678
1793
|
}
|
|
1679
|
-
class
|
|
1794
|
+
class ie extends b {
|
|
1680
1795
|
/**
|
|
1681
1796
|
* Инициализирует экземпляр класса {@link Property}.
|
|
1682
1797
|
*
|
|
@@ -1696,10 +1811,10 @@ class te extends T {
|
|
|
1696
1811
|
* Дополнительные метаданные свойства.
|
|
1697
1812
|
*/
|
|
1698
1813
|
t(this, "metadata");
|
|
1699
|
-
this.type = new
|
|
1814
|
+
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;
|
|
1700
1815
|
}
|
|
1701
1816
|
}
|
|
1702
|
-
class
|
|
1817
|
+
class z {
|
|
1703
1818
|
/**
|
|
1704
1819
|
* Инициализирует экземпляр класса {@link PropertyValue}.
|
|
1705
1820
|
*
|
|
@@ -1715,7 +1830,7 @@ class H {
|
|
|
1715
1830
|
* Может быть строкой, числом, boolean, диапазоном или JSON объектом.
|
|
1716
1831
|
*/
|
|
1717
1832
|
t(this, "value");
|
|
1718
|
-
this.property = new
|
|
1833
|
+
this.property = new ie(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
|
|
1719
1834
|
}
|
|
1720
1835
|
}
|
|
1721
1836
|
class O {
|
|
@@ -1733,10 +1848,10 @@ class O {
|
|
|
1733
1848
|
* Окончание периода.
|
|
1734
1849
|
*/
|
|
1735
1850
|
t(this, "to");
|
|
1736
|
-
this.from =
|
|
1851
|
+
this.from = a(r == null ? void 0 : r.from) ? C(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = a(r == null ? void 0 : r.to) ? C(r.to) : (r == null ? void 0 : r.to) ?? null;
|
|
1737
1852
|
}
|
|
1738
1853
|
}
|
|
1739
|
-
class
|
|
1854
|
+
class qt {
|
|
1740
1855
|
/**
|
|
1741
1856
|
* Инициализирует экземпляр класса {@link TemplatesListFilters}.
|
|
1742
1857
|
*
|
|
@@ -1794,13 +1909,13 @@ class Ot {
|
|
|
1794
1909
|
var e, s, i, o;
|
|
1795
1910
|
const r = {};
|
|
1796
1911
|
return Object.keys(this).forEach((c) => {
|
|
1797
|
-
const
|
|
1912
|
+
const u = this[c];
|
|
1798
1913
|
// eslint-disable-next-line prettier/prettier
|
|
1799
|
-
|
|
1914
|
+
D(u) || a(u) && u.trim().length === 0 || qe(u.isNewRec) && u.isNewRec() || (r[c] = u);
|
|
1800
1915
|
}), !((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;
|
|
1801
1916
|
}
|
|
1802
1917
|
}
|
|
1803
|
-
class
|
|
1918
|
+
class ne extends b {
|
|
1804
1919
|
/**
|
|
1805
1920
|
* Инициализирует экземпляр класса {@link PricingRole}.
|
|
1806
1921
|
*
|
|
@@ -1835,7 +1950,7 @@ class se extends T {
|
|
|
1835
1950
|
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;
|
|
1836
1951
|
}
|
|
1837
1952
|
}
|
|
1838
|
-
class
|
|
1953
|
+
class We {
|
|
1839
1954
|
/**
|
|
1840
1955
|
* Инициализирует экземпляр класса {@link PricingRoleCategoryRule}.
|
|
1841
1956
|
*
|
|
@@ -1854,10 +1969,10 @@ class He {
|
|
|
1854
1969
|
* Минимальный коэффициент цены.
|
|
1855
1970
|
*/
|
|
1856
1971
|
t(this, "minCoefficient");
|
|
1857
|
-
this.role = new
|
|
1972
|
+
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);
|
|
1858
1973
|
}
|
|
1859
1974
|
}
|
|
1860
|
-
class
|
|
1975
|
+
class Zr {
|
|
1861
1976
|
/**
|
|
1862
1977
|
* Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
|
|
1863
1978
|
*
|
|
@@ -1879,7 +1994,7 @@ class Yr {
|
|
|
1879
1994
|
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;
|
|
1880
1995
|
}
|
|
1881
1996
|
}
|
|
1882
|
-
class
|
|
1997
|
+
class et {
|
|
1883
1998
|
/**
|
|
1884
1999
|
* Инициализирует экземпляр класса {@link HttpParamsConfig}.
|
|
1885
2000
|
*
|
|
@@ -1901,7 +2016,7 @@ class Xr {
|
|
|
1901
2016
|
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;
|
|
1902
2017
|
}
|
|
1903
2018
|
}
|
|
1904
|
-
class
|
|
2019
|
+
class rt {
|
|
1905
2020
|
/**
|
|
1906
2021
|
* Инициализирует экземпляр класса {@link SentryConfig}.
|
|
1907
2022
|
*
|
|
@@ -1946,7 +2061,7 @@ class Zr {
|
|
|
1946
2061
|
}, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
|
|
1947
2062
|
}
|
|
1948
2063
|
}
|
|
1949
|
-
class
|
|
2064
|
+
class tt {
|
|
1950
2065
|
/**
|
|
1951
2066
|
* Инициализирует экземпляр класса {@link VersionConfig}.
|
|
1952
2067
|
*
|
|
@@ -1965,10 +2080,10 @@ class et {
|
|
|
1965
2080
|
* Текущая версия приложения.
|
|
1966
2081
|
*/
|
|
1967
2082
|
t(this, "version");
|
|
1968
|
-
this.date =
|
|
2083
|
+
this.date = a(r == null ? void 0 : r.date) ? C(r.date) : (r == null ? void 0 : r.date) ?? /* @__PURE__ */ new Date(), this.name = (r == null ? void 0 : r.name) ?? "", this.version = (r == null ? void 0 : r.version) ?? "0.0.0";
|
|
1969
2084
|
}
|
|
1970
2085
|
}
|
|
1971
|
-
class
|
|
2086
|
+
class st {
|
|
1972
2087
|
/**
|
|
1973
2088
|
* Инициализирует экземпляр класса {@link WebSocketConfig}.
|
|
1974
2089
|
*
|
|
@@ -2007,7 +2122,7 @@ class rt {
|
|
|
2007
2122
|
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"];
|
|
2008
2123
|
}
|
|
2009
2124
|
}
|
|
2010
|
-
class
|
|
2125
|
+
class Ut {
|
|
2011
2126
|
/**
|
|
2012
2127
|
* Инициализирует экземпляр класса {@link AppBaseConfig}.
|
|
2013
2128
|
*
|
|
@@ -2051,17 +2166,17 @@ class qt {
|
|
|
2051
2166
|
*/
|
|
2052
2167
|
t(this, "dateFormats");
|
|
2053
2168
|
var e, s, i;
|
|
2054
|
-
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new
|
|
2169
|
+
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({
|
|
2055
2170
|
environment: this.environment,
|
|
2056
2171
|
...r == null ? void 0 : r.sentry
|
|
2057
|
-
}), this.urls = r == null ? void 0 : r.urls, this.version = new
|
|
2172
|
+
}), 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 = {
|
|
2058
2173
|
api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
|
|
2059
2174
|
uiDate: ((s = r == null ? void 0 : r.dateFormats) == null ? void 0 : s.uiDate) ?? "dd.MM.yyyy",
|
|
2060
2175
|
uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
|
|
2061
2176
|
};
|
|
2062
2177
|
}
|
|
2063
2178
|
}
|
|
2064
|
-
class
|
|
2179
|
+
class Gt extends h {
|
|
2065
2180
|
/**
|
|
2066
2181
|
* Возвращает данные о результатах поиска категорий и товаров.
|
|
2067
2182
|
*
|
|
@@ -2088,11 +2203,11 @@ class Ut extends h {
|
|
|
2088
2203
|
*/
|
|
2089
2204
|
// eslint-disable-next-line class-methods-use-this
|
|
2090
2205
|
getPriceExportLink(r = "csv", e = !1, s = void 0, i = void 0) {
|
|
2091
|
-
let c = `${
|
|
2206
|
+
let c = `${T.getConfig().http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
|
|
2092
2207
|
return s && (c += `&category_id=${s}`), i && (c += `&client_id=${i}`), c;
|
|
2093
2208
|
}
|
|
2094
2209
|
}
|
|
2095
|
-
class
|
|
2210
|
+
class Ft extends h {
|
|
2096
2211
|
/**
|
|
2097
2212
|
* Импортирует цены клиента из CSV файла.
|
|
2098
2213
|
*
|
|
@@ -2216,7 +2331,7 @@ class Gt extends h {
|
|
|
2216
2331
|
price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
|
|
2217
2332
|
increase_percent: s.value
|
|
2218
2333
|
},
|
|
2219
|
-
(o) => new
|
|
2334
|
+
(o) => new Z(o.data)
|
|
2220
2335
|
);
|
|
2221
2336
|
}
|
|
2222
2337
|
/**
|
|
@@ -2228,7 +2343,7 @@ class Gt extends h {
|
|
|
2228
2343
|
* @see /doc/api/internal#/operations/api_internal_client_price_products_remove
|
|
2229
2344
|
*/
|
|
2230
2345
|
removeProductPrice(r, e) {
|
|
2231
|
-
return this.delete(`/internal/clients/${r}/price/products/${e}`, (s) => new
|
|
2346
|
+
return this.delete(`/internal/clients/${r}/price/products/${e}`, (s) => new Z(s.data));
|
|
2232
2347
|
}
|
|
2233
2348
|
/**
|
|
2234
2349
|
* Добавляет указанный продукт в список товаров для дополнительных продаж.
|
|
@@ -2291,7 +2406,7 @@ class Gt extends h {
|
|
|
2291
2406
|
return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
|
|
2292
2407
|
}
|
|
2293
2408
|
}
|
|
2294
|
-
class
|
|
2409
|
+
class jt extends h {
|
|
2295
2410
|
/**
|
|
2296
2411
|
* Возвращает список шаблонов прайс-листа привязанных к клиенту.
|
|
2297
2412
|
*
|
|
@@ -2303,7 +2418,7 @@ class Ft extends h {
|
|
|
2303
2418
|
return this.get(
|
|
2304
2419
|
`/internal/clients/${r}/price/templates`,
|
|
2305
2420
|
{},
|
|
2306
|
-
(e) => e.data.map((s) => new
|
|
2421
|
+
(e) => e.data.map((s) => new se(s))
|
|
2307
2422
|
);
|
|
2308
2423
|
}
|
|
2309
2424
|
/**
|
|
@@ -2314,7 +2429,7 @@ class Ft extends h {
|
|
|
2314
2429
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_get_active
|
|
2315
2430
|
*/
|
|
2316
2431
|
getActiveTemplate(r) {
|
|
2317
|
-
return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new
|
|
2432
|
+
return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new se(e.data));
|
|
2318
2433
|
}
|
|
2319
2434
|
/**
|
|
2320
2435
|
* Добавляет связь между клиентом и шаблоном прайс-листа.
|
|
@@ -2326,14 +2441,14 @@ class Ft extends h {
|
|
|
2326
2441
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_attach
|
|
2327
2442
|
*/
|
|
2328
2443
|
attachTemplate(r, e, s) {
|
|
2329
|
-
const i =
|
|
2444
|
+
const i = T.getConfig().dateFormats.api;
|
|
2330
2445
|
return this.post(
|
|
2331
2446
|
`/internal/clients/${r}/price/templates/${e}`,
|
|
2332
2447
|
s && {
|
|
2333
2448
|
startAt: s.startAt && q(s.startAt, i),
|
|
2334
2449
|
endAt: s.endAt && q(s.endAt, i)
|
|
2335
2450
|
},
|
|
2336
|
-
(o) => new
|
|
2451
|
+
(o) => new se(o.data),
|
|
2337
2452
|
{},
|
|
2338
2453
|
!0
|
|
2339
2454
|
);
|
|
@@ -2360,14 +2475,14 @@ class Ft extends h {
|
|
|
2360
2475
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_change
|
|
2361
2476
|
*/
|
|
2362
2477
|
changeTemplate(r, e, s, i) {
|
|
2363
|
-
const o =
|
|
2478
|
+
const o = T.getConfig().dateFormats.api;
|
|
2364
2479
|
return this.patch(
|
|
2365
2480
|
`/internal/clients/${r}/price/templates/${e}/${s}`,
|
|
2366
2481
|
i && {
|
|
2367
2482
|
startAt: i.startAt && q(i.startAt, o),
|
|
2368
2483
|
endAt: i.endAt && q(i.endAt, o)
|
|
2369
2484
|
},
|
|
2370
|
-
(c) => new
|
|
2485
|
+
(c) => new se(c.data)
|
|
2371
2486
|
);
|
|
2372
2487
|
}
|
|
2373
2488
|
/**
|
|
@@ -2383,7 +2498,7 @@ class Ft extends h {
|
|
|
2383
2498
|
return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
|
|
2384
2499
|
}
|
|
2385
2500
|
}
|
|
2386
|
-
class
|
|
2501
|
+
class Mt extends h {
|
|
2387
2502
|
/**
|
|
2388
2503
|
* Возвращает список данных о корневых категориях.
|
|
2389
2504
|
*
|
|
@@ -2397,7 +2512,7 @@ class jt extends h {
|
|
|
2397
2512
|
{
|
|
2398
2513
|
showHidden: r
|
|
2399
2514
|
},
|
|
2400
|
-
(e) => e.data.map((s) => new
|
|
2515
|
+
(e) => e.data.map((s) => new E(s))
|
|
2401
2516
|
);
|
|
2402
2517
|
}
|
|
2403
2518
|
/**
|
|
@@ -2416,7 +2531,7 @@ class jt extends h {
|
|
|
2416
2531
|
showHidden: e,
|
|
2417
2532
|
withNestedCategories: s
|
|
2418
2533
|
},
|
|
2419
|
-
(i) => new
|
|
2534
|
+
(i) => new E(i.data)
|
|
2420
2535
|
);
|
|
2421
2536
|
}
|
|
2422
2537
|
/**
|
|
@@ -2425,7 +2540,7 @@ class jt extends h {
|
|
|
2425
2540
|
* @param categoryID Идентификатор категории продуктов.
|
|
2426
2541
|
*/
|
|
2427
2542
|
getPublicCategoryData(r) {
|
|
2428
|
-
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new
|
|
2543
|
+
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new E(e.data));
|
|
2429
2544
|
}
|
|
2430
2545
|
/**
|
|
2431
2546
|
* Возвращает список продуктов категории.
|
|
@@ -2443,7 +2558,7 @@ class jt extends h {
|
|
|
2443
2558
|
showHidden: s,
|
|
2444
2559
|
withPriceCoefficients: e
|
|
2445
2560
|
},
|
|
2446
|
-
(i) =>
|
|
2561
|
+
(i) => Pe(i.data, (o) => new x(o))
|
|
2447
2562
|
);
|
|
2448
2563
|
}
|
|
2449
2564
|
/**
|
|
@@ -2456,7 +2571,7 @@ class jt extends h {
|
|
|
2456
2571
|
getCategoryProductsCoefficients(r) {
|
|
2457
2572
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
2458
2573
|
const { data: s } = e;
|
|
2459
|
-
return
|
|
2574
|
+
return dr(s, (i) => i.map((o) => new Ge(o))), s;
|
|
2460
2575
|
});
|
|
2461
2576
|
}
|
|
2462
2577
|
/**
|
|
@@ -2468,14 +2583,14 @@ class jt extends h {
|
|
|
2468
2583
|
publicSimpleSearch(r, e = 10) {
|
|
2469
2584
|
return new Promise((s, i) => {
|
|
2470
2585
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2471
|
-
s(o.categories.map((c) => new
|
|
2586
|
+
s(o.categories.map((c) => new E(c)));
|
|
2472
2587
|
}).catch((o) => {
|
|
2473
2588
|
i(o);
|
|
2474
2589
|
});
|
|
2475
2590
|
});
|
|
2476
2591
|
}
|
|
2477
2592
|
}
|
|
2478
|
-
class
|
|
2593
|
+
class Ht extends h {
|
|
2479
2594
|
/**
|
|
2480
2595
|
* Возвращает данные об указанном продукте.
|
|
2481
2596
|
*
|
|
@@ -2485,7 +2600,7 @@ class Mt extends h {
|
|
|
2485
2600
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
|
|
2486
2601
|
*/
|
|
2487
2602
|
getProductData(r, e = !1) {
|
|
2488
|
-
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new
|
|
2603
|
+
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new x(s.data));
|
|
2489
2604
|
}
|
|
2490
2605
|
/**
|
|
2491
2606
|
* Возвращает публичные данные об указанном продукте.
|
|
@@ -2493,7 +2608,7 @@ class Mt extends h {
|
|
|
2493
2608
|
* @param productId Идентификатор продукта.
|
|
2494
2609
|
*/
|
|
2495
2610
|
getPublicProductData(r) {
|
|
2496
|
-
return this.get(`/public/catalog/products/${r}`, {}, (e) => new
|
|
2611
|
+
return this.get(`/public/catalog/products/${r}`, {}, (e) => new x(e.data));
|
|
2497
2612
|
}
|
|
2498
2613
|
/**
|
|
2499
2614
|
* Возвращает данные о коэффициентах цен для указанного продукта.
|
|
@@ -2506,7 +2621,7 @@ class Mt extends h {
|
|
|
2506
2621
|
return this.get(
|
|
2507
2622
|
`/internal/catalog/products/${r}/coefficients`,
|
|
2508
2623
|
{},
|
|
2509
|
-
(e) =>
|
|
2624
|
+
(e) => Pe(e.data, (s) => new Ge(s))
|
|
2510
2625
|
);
|
|
2511
2626
|
}
|
|
2512
2627
|
/**
|
|
@@ -2518,14 +2633,14 @@ class Mt extends h {
|
|
|
2518
2633
|
publicSimpleSearch(r, e = 10) {
|
|
2519
2634
|
return new Promise((s, i) => {
|
|
2520
2635
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2521
|
-
s(o.products.map((c) => new
|
|
2636
|
+
s(o.products.map((c) => new x(c)));
|
|
2522
2637
|
}).catch((o) => {
|
|
2523
2638
|
i(o);
|
|
2524
2639
|
});
|
|
2525
2640
|
});
|
|
2526
2641
|
}
|
|
2527
2642
|
}
|
|
2528
|
-
class
|
|
2643
|
+
class Bt extends h {
|
|
2529
2644
|
/**
|
|
2530
2645
|
* Возвращает список данных о корневых категориях указанного клиента.
|
|
2531
2646
|
*
|
|
@@ -2541,7 +2656,7 @@ class Ht extends h {
|
|
|
2541
2656
|
clientId: r,
|
|
2542
2657
|
showHidden: e
|
|
2543
2658
|
},
|
|
2544
|
-
(s) => s.data.map((i) => new
|
|
2659
|
+
(s) => s.data.map((i) => new we(i))
|
|
2545
2660
|
);
|
|
2546
2661
|
}
|
|
2547
2662
|
/**
|
|
@@ -2562,7 +2677,7 @@ class Ht extends h {
|
|
|
2562
2677
|
showHidden: s,
|
|
2563
2678
|
withNestedCategories: i
|
|
2564
2679
|
},
|
|
2565
|
-
(o) => new
|
|
2680
|
+
(o) => new we(o.data)
|
|
2566
2681
|
);
|
|
2567
2682
|
}
|
|
2568
2683
|
/**
|
|
@@ -2583,11 +2698,11 @@ class Ht extends h {
|
|
|
2583
2698
|
showHidden: i,
|
|
2584
2699
|
withPriceCoefficients: s
|
|
2585
2700
|
},
|
|
2586
|
-
(o) =>
|
|
2701
|
+
(o) => Pe(o.data, (c) => new Z(c))
|
|
2587
2702
|
);
|
|
2588
2703
|
}
|
|
2589
2704
|
}
|
|
2590
|
-
class
|
|
2705
|
+
class zt extends h {
|
|
2591
2706
|
/**
|
|
2592
2707
|
* Возвращает данные об указанном продукте для указанного клиента.
|
|
2593
2708
|
*
|
|
@@ -2604,12 +2719,12 @@ class Bt extends h {
|
|
|
2604
2719
|
clientId: e,
|
|
2605
2720
|
withPriceCoefficients: s
|
|
2606
2721
|
},
|
|
2607
|
-
(i) => new
|
|
2722
|
+
(i) => new Z(i.data)
|
|
2608
2723
|
);
|
|
2609
2724
|
}
|
|
2610
2725
|
}
|
|
2611
|
-
var
|
|
2612
|
-
class
|
|
2726
|
+
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 || {});
|
|
2727
|
+
class Je {
|
|
2613
2728
|
/**
|
|
2614
2729
|
* Инициализирует экземпляр класса {@link FilterItem}.
|
|
2615
2730
|
*
|
|
@@ -2628,7 +2743,7 @@ class Be {
|
|
|
2628
2743
|
* Значение с которым сравнивается поле.
|
|
2629
2744
|
*/
|
|
2630
2745
|
t(this, "value");
|
|
2631
|
-
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ??
|
|
2746
|
+
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) ?? "";
|
|
2632
2747
|
}
|
|
2633
2748
|
/**
|
|
2634
2749
|
* Преобразует фильтр в примитивное представление для API.
|
|
@@ -2640,10 +2755,10 @@ class Be {
|
|
|
2640
2755
|
field: this.field,
|
|
2641
2756
|
op: this.op
|
|
2642
2757
|
};
|
|
2643
|
-
return r.value =
|
|
2758
|
+
return r.value = ke(this.value) ? q(this.value, T.getConfig().dateFormats.api) : this.value, r;
|
|
2644
2759
|
}
|
|
2645
2760
|
}
|
|
2646
|
-
class
|
|
2761
|
+
class ue {
|
|
2647
2762
|
/**
|
|
2648
2763
|
* Инициализирует экземпляр класса {@link FilterGroup}.
|
|
2649
2764
|
*
|
|
@@ -2663,7 +2778,7 @@ class le {
|
|
|
2663
2778
|
*/
|
|
2664
2779
|
t(this, "groups");
|
|
2665
2780
|
var e, s;
|
|
2666
|
-
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
|
|
2781
|
+
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))) ?? [];
|
|
2667
2782
|
}
|
|
2668
2783
|
/**
|
|
2669
2784
|
* Преобразует группу фильтров в примитивное представление для API.
|
|
@@ -2673,12 +2788,12 @@ class le {
|
|
|
2673
2788
|
toPrimitive() {
|
|
2674
2789
|
return {
|
|
2675
2790
|
groupOp: this.groupOp,
|
|
2676
|
-
filters: this.filters.map((r) => r instanceof
|
|
2677
|
-
groups: this.groups.map((r) => r instanceof
|
|
2791
|
+
filters: this.filters.map((r) => r instanceof Je && qe(r.toPrimitive) ? r.toPrimitive() : r),
|
|
2792
|
+
groups: this.groups.map((r) => r instanceof ue ? r.toPrimitive() : r)
|
|
2678
2793
|
};
|
|
2679
2794
|
}
|
|
2680
2795
|
}
|
|
2681
|
-
class
|
|
2796
|
+
class $e extends h {
|
|
2682
2797
|
/**
|
|
2683
2798
|
* Получает пагинированный список данных.
|
|
2684
2799
|
*
|
|
@@ -2690,15 +2805,15 @@ class De extends h {
|
|
|
2690
2805
|
* @param successHandler Обработчик успешного выполнения запроса.
|
|
2691
2806
|
* @param disableDefaultNotificationErrorResponseHandler Признак отключения стандартного обработчика ошибок.
|
|
2692
2807
|
*/
|
|
2693
|
-
getPaginated(r, e, s, i, o, c,
|
|
2694
|
-
let
|
|
2808
|
+
getPaginated(r, e, s, i, o, c, u) {
|
|
2809
|
+
let p = {
|
|
2695
2810
|
page: (i == null ? void 0 : i.page) ?? 1,
|
|
2696
2811
|
perPage: (i == null ? void 0 : i.pageSize) ?? 10
|
|
2697
2812
|
};
|
|
2698
|
-
return e && (
|
|
2813
|
+
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);
|
|
2699
2814
|
}
|
|
2700
2815
|
}
|
|
2701
|
-
class
|
|
2816
|
+
class Et extends $e {
|
|
2702
2817
|
/**
|
|
2703
2818
|
* Возвращает список шаблонов прайс-листа.
|
|
2704
2819
|
*
|
|
@@ -2711,7 +2826,7 @@ class zt extends De {
|
|
|
2711
2826
|
getTemplateList(r, e, s) {
|
|
2712
2827
|
return this.getPaginated("/internal/price/templates", r, e, s, {}, (i) => {
|
|
2713
2828
|
const o = { ...i.data };
|
|
2714
|
-
return o.data = o.data.map((c) => new
|
|
2829
|
+
return o.data = o.data.map((c) => new W(c)), o;
|
|
2715
2830
|
});
|
|
2716
2831
|
}
|
|
2717
2832
|
/**
|
|
@@ -2724,7 +2839,7 @@ class zt extends De {
|
|
|
2724
2839
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_create
|
|
2725
2840
|
*/
|
|
2726
2841
|
createTemplate(r, e = {}) {
|
|
2727
|
-
return this.post("/internal/price/templates", r, (s) => new
|
|
2842
|
+
return this.post("/internal/price/templates", r, (s) => new W(s.data), e);
|
|
2728
2843
|
}
|
|
2729
2844
|
/**
|
|
2730
2845
|
* Возвращает данные о шаблоне прайс-листа.
|
|
@@ -2734,7 +2849,7 @@ class zt extends De {
|
|
|
2734
2849
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_get
|
|
2735
2850
|
*/
|
|
2736
2851
|
getTemplate(r) {
|
|
2737
|
-
return this.get(`/internal/price/templates/${r}`, {}, (e) => new
|
|
2852
|
+
return this.get(`/internal/price/templates/${r}`, {}, (e) => new W(e.data));
|
|
2738
2853
|
}
|
|
2739
2854
|
/**
|
|
2740
2855
|
* Изменяет данные о шаблоне прайс-листа.
|
|
@@ -2747,7 +2862,7 @@ class zt extends De {
|
|
|
2747
2862
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_update
|
|
2748
2863
|
*/
|
|
2749
2864
|
updateTemplate(r, e, s = {}) {
|
|
2750
|
-
return this.patch(`/internal/price/templates/${r}`, e, (i) => new
|
|
2865
|
+
return this.patch(`/internal/price/templates/${r}`, e, (i) => new W(i.data), s);
|
|
2751
2866
|
}
|
|
2752
2867
|
/**
|
|
2753
2868
|
* Удаляет данные о шаблоне прайс-листа.
|
|
@@ -2770,7 +2885,7 @@ class zt extends De {
|
|
|
2770
2885
|
return this.get(
|
|
2771
2886
|
`/internal/price/templates/${r}/products`,
|
|
2772
2887
|
{},
|
|
2773
|
-
(e) => e.data.map((s) => new
|
|
2888
|
+
(e) => e.data.map((s) => new Se(s))
|
|
2774
2889
|
);
|
|
2775
2890
|
}
|
|
2776
2891
|
/**
|
|
@@ -2782,7 +2897,7 @@ class zt extends De {
|
|
|
2782
2897
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get
|
|
2783
2898
|
*/
|
|
2784
2899
|
getProductTemplatePrice(r, e) {
|
|
2785
|
-
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new
|
|
2900
|
+
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new Se(s.data));
|
|
2786
2901
|
}
|
|
2787
2902
|
/**
|
|
2788
2903
|
* Сохраняет цену на продукт в шаблоне прайс-листа.
|
|
@@ -2801,7 +2916,7 @@ class zt extends De {
|
|
|
2801
2916
|
price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
|
|
2802
2917
|
increase_percent: s.value
|
|
2803
2918
|
},
|
|
2804
|
-
(o) => new
|
|
2919
|
+
(o) => new Se(o.data)
|
|
2805
2920
|
);
|
|
2806
2921
|
}
|
|
2807
2922
|
/**
|
|
@@ -2826,7 +2941,7 @@ class zt extends De {
|
|
|
2826
2941
|
return this.get(
|
|
2827
2942
|
`/internal/price/templates/${r}/categories`,
|
|
2828
2943
|
{},
|
|
2829
|
-
(e) => e.data.map((s) => new
|
|
2944
|
+
(e) => e.data.map((s) => new be(s))
|
|
2830
2945
|
);
|
|
2831
2946
|
}
|
|
2832
2947
|
/**
|
|
@@ -2841,7 +2956,7 @@ class zt extends De {
|
|
|
2841
2956
|
return this.get(
|
|
2842
2957
|
`/internal/price/templates/${r}/categories/${e}`,
|
|
2843
2958
|
{},
|
|
2844
|
-
(s) => new
|
|
2959
|
+
(s) => new be(s.data)
|
|
2845
2960
|
);
|
|
2846
2961
|
}
|
|
2847
2962
|
/**
|
|
@@ -2867,7 +2982,7 @@ class zt extends De {
|
|
|
2867
2982
|
},
|
|
2868
2983
|
params: i ? { recursively: !0 } : {}
|
|
2869
2984
|
},
|
|
2870
|
-
(c) => new
|
|
2985
|
+
(c) => new be(c.data)
|
|
2871
2986
|
);
|
|
2872
2987
|
}
|
|
2873
2988
|
/**
|
|
@@ -2898,7 +3013,7 @@ class zt extends De {
|
|
|
2898
3013
|
return this.get(
|
|
2899
3014
|
`/internal/price/templates/${r}/clients`,
|
|
2900
3015
|
{},
|
|
2901
|
-
(e) => e.data.map((s) => new
|
|
3016
|
+
(e) => e.data.map((s) => new se(s))
|
|
2902
3017
|
);
|
|
2903
3018
|
}
|
|
2904
3019
|
}
|
|
@@ -2909,7 +3024,7 @@ class Wt extends h {
|
|
|
2909
3024
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get_list
|
|
2910
3025
|
*/
|
|
2911
3026
|
getRoles() {
|
|
2912
|
-
return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new
|
|
3027
|
+
return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new ne(e)));
|
|
2913
3028
|
}
|
|
2914
3029
|
/**
|
|
2915
3030
|
* Добавляет новую роль ценообразования.
|
|
@@ -2919,7 +3034,7 @@ class Wt extends h {
|
|
|
2919
3034
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_create
|
|
2920
3035
|
*/
|
|
2921
3036
|
createRole(r) {
|
|
2922
|
-
return this.post("/internal/price/roles", r, (e) => new
|
|
3037
|
+
return this.post("/internal/price/roles", r, (e) => new ne(e.data));
|
|
2923
3038
|
}
|
|
2924
3039
|
/**
|
|
2925
3040
|
* Возвращает данные роли ценообразования.
|
|
@@ -2929,7 +3044,7 @@ class Wt extends h {
|
|
|
2929
3044
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get
|
|
2930
3045
|
*/
|
|
2931
3046
|
getRole(r) {
|
|
2932
|
-
return this.get(`/internal/price/roles/${r}`, {}, (e) => new
|
|
3047
|
+
return this.get(`/internal/price/roles/${r}`, {}, (e) => new ne(e.data));
|
|
2933
3048
|
}
|
|
2934
3049
|
/**
|
|
2935
3050
|
* Обновляет данные роли ценообразования.
|
|
@@ -2940,7 +3055,7 @@ class Wt extends h {
|
|
|
2940
3055
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_update
|
|
2941
3056
|
*/
|
|
2942
3057
|
updateRole(r, e) {
|
|
2943
|
-
return this.patch(`/internal/price/roles/${r}`, e, (s) => new
|
|
3058
|
+
return this.patch(`/internal/price/roles/${r}`, e, (s) => new ne(s.data));
|
|
2944
3059
|
}
|
|
2945
3060
|
/**
|
|
2946
3061
|
* Удаляет роль ценообразования.
|
|
@@ -2963,7 +3078,7 @@ class Wt extends h {
|
|
|
2963
3078
|
return this.get(
|
|
2964
3079
|
`/internal/price/roles/rules/categories/${r}`,
|
|
2965
3080
|
{},
|
|
2966
|
-
(e) => e.data.map((s) => new
|
|
3081
|
+
(e) => e.data.map((s) => new We(s))
|
|
2967
3082
|
);
|
|
2968
3083
|
}
|
|
2969
3084
|
/**
|
|
@@ -2978,11 +3093,11 @@ class Wt extends h {
|
|
|
2978
3093
|
return this.patch(
|
|
2979
3094
|
`/internal/price/roles/rules/categories/${r}`,
|
|
2980
3095
|
e,
|
|
2981
|
-
(s) => s.data.map((i) => new
|
|
3096
|
+
(s) => s.data.map((i) => new We(i))
|
|
2982
3097
|
);
|
|
2983
3098
|
}
|
|
2984
3099
|
}
|
|
2985
|
-
class
|
|
3100
|
+
class Jt extends $e {
|
|
2986
3101
|
/**
|
|
2987
3102
|
* Возвращает пагинированный список свойств.
|
|
2988
3103
|
*
|
|
@@ -2995,7 +3110,7 @@ class Et extends De {
|
|
|
2995
3110
|
getProperties(r, e, s) {
|
|
2996
3111
|
return this.getPaginated("/internal/catalog/properties", r, e, s, {}, (i) => {
|
|
2997
3112
|
const o = { ...i.data };
|
|
2998
|
-
return o.data = o.data.map((c) => new
|
|
3113
|
+
return o.data = o.data.map((c) => new ie(c)), o;
|
|
2999
3114
|
});
|
|
3000
3115
|
}
|
|
3001
3116
|
/**
|
|
@@ -3012,7 +3127,7 @@ class Et extends De {
|
|
|
3012
3127
|
...s,
|
|
3013
3128
|
type: e
|
|
3014
3129
|
},
|
|
3015
|
-
(i) => new
|
|
3130
|
+
(i) => new ie(i.data)
|
|
3016
3131
|
);
|
|
3017
3132
|
}
|
|
3018
3133
|
/**
|
|
@@ -3022,7 +3137,7 @@ class Et extends De {
|
|
|
3022
3137
|
* @see /doc/api/internal#/operations/api_internal_catalog_properties_get
|
|
3023
3138
|
*/
|
|
3024
3139
|
getProperty(r) {
|
|
3025
|
-
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new
|
|
3140
|
+
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new ie(e.data));
|
|
3026
3141
|
}
|
|
3027
3142
|
/**
|
|
3028
3143
|
* Обновляет существующее свойство.
|
|
@@ -3039,7 +3154,7 @@ class Et extends De {
|
|
|
3039
3154
|
...i,
|
|
3040
3155
|
type: s
|
|
3041
3156
|
},
|
|
3042
|
-
(o) => new
|
|
3157
|
+
(o) => new ie(o.data)
|
|
3043
3158
|
);
|
|
3044
3159
|
}
|
|
3045
3160
|
/**
|
|
@@ -3058,7 +3173,7 @@ class Et extends De {
|
|
|
3058
3173
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get_list
|
|
3059
3174
|
*/
|
|
3060
3175
|
getProductProperties(r) {
|
|
3061
|
-
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new
|
|
3176
|
+
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new z(s)));
|
|
3062
3177
|
}
|
|
3063
3178
|
/**
|
|
3064
3179
|
* Возвращает значение свойства продукта.
|
|
@@ -3068,7 +3183,7 @@ class Et extends De {
|
|
|
3068
3183
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get
|
|
3069
3184
|
*/
|
|
3070
3185
|
getProductProperty(r, e) {
|
|
3071
|
-
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new
|
|
3186
|
+
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new z(s.data));
|
|
3072
3187
|
}
|
|
3073
3188
|
/**
|
|
3074
3189
|
* Обновляет значение свойства продукта.
|
|
@@ -3079,7 +3194,7 @@ class Et extends De {
|
|
|
3079
3194
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_update
|
|
3080
3195
|
*/
|
|
3081
3196
|
updateProductProperty(r, e, s) {
|
|
3082
|
-
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new
|
|
3197
|
+
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new z(i.data));
|
|
3083
3198
|
}
|
|
3084
3199
|
/**
|
|
3085
3200
|
* Удаляет значение свойства продукта.
|
|
@@ -3204,7 +3319,7 @@ class Et extends De {
|
|
|
3204
3319
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get_list
|
|
3205
3320
|
*/
|
|
3206
3321
|
getCategoryProperties(r) {
|
|
3207
|
-
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new
|
|
3322
|
+
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new z(s)));
|
|
3208
3323
|
}
|
|
3209
3324
|
/**
|
|
3210
3325
|
* Возвращает значение свойства категории.
|
|
@@ -3214,7 +3329,7 @@ class Et extends De {
|
|
|
3214
3329
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get
|
|
3215
3330
|
*/
|
|
3216
3331
|
getCategoryProperty(r, e) {
|
|
3217
|
-
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new
|
|
3332
|
+
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new z(s.data));
|
|
3218
3333
|
}
|
|
3219
3334
|
/**
|
|
3220
3335
|
* Обновляет значение свойства категории.
|
|
@@ -3225,7 +3340,7 @@ class Et extends De {
|
|
|
3225
3340
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_update
|
|
3226
3341
|
*/
|
|
3227
3342
|
updateCategoryProperty(r, e, s) {
|
|
3228
|
-
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new
|
|
3343
|
+
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new z(i.data));
|
|
3229
3344
|
}
|
|
3230
3345
|
/**
|
|
3231
3346
|
* Удаляет значение свойства категории.
|
|
@@ -3354,7 +3469,7 @@ class Et extends De {
|
|
|
3354
3469
|
return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
|
|
3355
3470
|
}
|
|
3356
3471
|
}
|
|
3357
|
-
function
|
|
3472
|
+
function Ve(n, r, e) {
|
|
3358
3473
|
let s;
|
|
3359
3474
|
return n.some((i) => {
|
|
3360
3475
|
if (i.type === e && i.id === r)
|
|
@@ -3363,37 +3478,37 @@ function ze(n, r, e) {
|
|
|
3363
3478
|
return !1;
|
|
3364
3479
|
const o = i;
|
|
3365
3480
|
if (o.products && o.products.length > 0) {
|
|
3366
|
-
const c =
|
|
3481
|
+
const c = Ve(o.products, r, e);
|
|
3367
3482
|
if (c)
|
|
3368
3483
|
return s = c, !0;
|
|
3369
3484
|
}
|
|
3370
3485
|
if (o.categories && o.categories.length > 0) {
|
|
3371
|
-
const c =
|
|
3486
|
+
const c = Ve(o.categories, r, e);
|
|
3372
3487
|
if (c)
|
|
3373
3488
|
return s = c, !0;
|
|
3374
3489
|
}
|
|
3375
3490
|
return !1;
|
|
3376
3491
|
}), s;
|
|
3377
3492
|
}
|
|
3378
|
-
function
|
|
3493
|
+
function Ke(n) {
|
|
3379
3494
|
const r = [];
|
|
3380
3495
|
return n.forEach((e) => {
|
|
3381
3496
|
if (r.push(e), e.type === "category") {
|
|
3382
3497
|
const s = e;
|
|
3383
|
-
s.products && s.products.length > 0 && r.push(...
|
|
3498
|
+
s.products && s.products.length > 0 && r.push(...Ke(s.products)), s.categories && s.categories.length > 0 && r.push(...Ke(s.categories));
|
|
3384
3499
|
}
|
|
3385
3500
|
}), r;
|
|
3386
3501
|
}
|
|
3387
|
-
var
|
|
3388
|
-
class
|
|
3502
|
+
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 || {});
|
|
3503
|
+
class nt extends v {
|
|
3389
3504
|
}
|
|
3390
|
-
class
|
|
3505
|
+
class gr extends v {
|
|
3391
3506
|
}
|
|
3392
|
-
class Vt extends
|
|
3507
|
+
class Vt extends v {
|
|
3393
3508
|
}
|
|
3394
|
-
class
|
|
3509
|
+
class ot extends v {
|
|
3395
3510
|
}
|
|
3396
|
-
class
|
|
3511
|
+
class ae extends b {
|
|
3397
3512
|
/**
|
|
3398
3513
|
* Инициализирует экземпляр класса {@link Currency}.
|
|
3399
3514
|
*
|
|
@@ -3412,34 +3527,34 @@ class ye extends T {
|
|
|
3412
3527
|
e && (this.signature = e.signature ?? "", this.symbol = e.symbol ?? "");
|
|
3413
3528
|
}
|
|
3414
3529
|
}
|
|
3415
|
-
class
|
|
3530
|
+
class j extends v {
|
|
3416
3531
|
/**
|
|
3417
3532
|
* Возвращает сгенерированную запись-описание физического лица.
|
|
3418
3533
|
*/
|
|
3419
3534
|
static generatePersonItem() {
|
|
3420
|
-
return new
|
|
3535
|
+
return new j({
|
|
3421
3536
|
id: 1,
|
|
3422
3537
|
guid: "",
|
|
3423
|
-
slug:
|
|
3538
|
+
slug: k.Person,
|
|
3424
3539
|
name: ""
|
|
3425
3540
|
});
|
|
3426
3541
|
}
|
|
3427
3542
|
}
|
|
3428
|
-
class
|
|
3543
|
+
class ct extends v {
|
|
3429
3544
|
}
|
|
3430
|
-
class
|
|
3545
|
+
class lt extends v {
|
|
3431
3546
|
}
|
|
3432
|
-
class
|
|
3547
|
+
class re extends v {
|
|
3433
3548
|
}
|
|
3434
|
-
class
|
|
3549
|
+
class ut extends v {
|
|
3435
3550
|
}
|
|
3436
|
-
class
|
|
3551
|
+
class pt extends v {
|
|
3437
3552
|
}
|
|
3438
|
-
class
|
|
3553
|
+
class mr extends v {
|
|
3439
3554
|
}
|
|
3440
|
-
class
|
|
3555
|
+
class fr extends v {
|
|
3441
3556
|
}
|
|
3442
|
-
class
|
|
3557
|
+
class Ne extends H {
|
|
3443
3558
|
/**
|
|
3444
3559
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
3445
3560
|
*
|
|
@@ -3466,11 +3581,11 @@ class ke extends M {
|
|
|
3466
3581
|
/**
|
|
3467
3582
|
* Данные о валюте.
|
|
3468
3583
|
*/
|
|
3469
|
-
t(this, "currency", new
|
|
3470
|
-
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new
|
|
3584
|
+
t(this, "currency", new ae());
|
|
3585
|
+
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new ae(e.currency));
|
|
3471
3586
|
}
|
|
3472
3587
|
}
|
|
3473
|
-
class
|
|
3588
|
+
class Oe extends b {
|
|
3474
3589
|
/**
|
|
3475
3590
|
* Инициализирует экземпляр класса {@link Contact}.
|
|
3476
3591
|
*
|
|
@@ -3489,7 +3604,7 @@ class xe extends T {
|
|
|
3489
3604
|
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;
|
|
3490
3605
|
}
|
|
3491
3606
|
}
|
|
3492
|
-
class
|
|
3607
|
+
class M extends Oe {
|
|
3493
3608
|
/**
|
|
3494
3609
|
* Инициализирует экземпляр класса {@link ContactPerson}.
|
|
3495
3610
|
*
|
|
@@ -3521,10 +3636,10 @@ class j extends xe {
|
|
|
3521
3636
|
* Дата и время последнего удаления.
|
|
3522
3637
|
*/
|
|
3523
3638
|
t(this, "deletedAt");
|
|
3524
|
-
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 =
|
|
3639
|
+
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1, this.position = e == null ? void 0 : e.position, this.notDisturb = (e == null ? void 0 : e.notDisturb) ?? !1, this.comment = e == null ? void 0 : e.comment, this.updatedAt = e == null ? void 0 : e.updatedAt, this.deletedAt = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
3525
3640
|
}
|
|
3526
3641
|
}
|
|
3527
|
-
class
|
|
3642
|
+
class yr extends b {
|
|
3528
3643
|
/**
|
|
3529
3644
|
* Инициализирует экземпляр класса {@link ContragentBase}.
|
|
3530
3645
|
*
|
|
@@ -3536,19 +3651,19 @@ class hr extends T {
|
|
|
3536
3651
|
/**
|
|
3537
3652
|
* Данные о менеджере.
|
|
3538
3653
|
*/
|
|
3539
|
-
t(this, "manager", new
|
|
3654
|
+
t(this, "manager", new ce());
|
|
3540
3655
|
/**
|
|
3541
3656
|
* Данные об организационно-правовой форме.
|
|
3542
3657
|
*/
|
|
3543
|
-
t(this, "opf",
|
|
3658
|
+
t(this, "opf", j.generatePersonItem());
|
|
3544
3659
|
/**
|
|
3545
3660
|
* Направление продаж.
|
|
3546
3661
|
*/
|
|
3547
|
-
t(this, "salesDirection", new
|
|
3662
|
+
t(this, "salesDirection", new N());
|
|
3548
3663
|
/**
|
|
3549
3664
|
* Группа партнеров (направление деятельности).
|
|
3550
3665
|
*/
|
|
3551
|
-
t(this, "partnerGroup", new
|
|
3666
|
+
t(this, "partnerGroup", new re());
|
|
3552
3667
|
/**
|
|
3553
3668
|
* Список контактных лиц контрагента.
|
|
3554
3669
|
*/
|
|
@@ -3582,22 +3697,22 @@ class hr extends T {
|
|
|
3582
3697
|
*/
|
|
3583
3698
|
t(this, "updater");
|
|
3584
3699
|
if (e) {
|
|
3585
|
-
if (this.opf = new
|
|
3700
|
+
if (this.opf = new j(e.opf), this.salesDirection = new N(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e.createdAt, this.creator = e.creator ? new F(e.creator) : void 0, this.updatedAt = a(e == null ? void 0 : e.updatedAt) ? C(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) {
|
|
3586
3701
|
const s = [];
|
|
3587
3702
|
e.contacts.forEach((i) => {
|
|
3588
|
-
s.push(new
|
|
3703
|
+
s.push(new M(i));
|
|
3589
3704
|
}), this.contacts = s;
|
|
3590
3705
|
}
|
|
3591
3706
|
if (e.bankAccounts) {
|
|
3592
3707
|
const s = [];
|
|
3593
3708
|
e.bankAccounts.forEach((i) => {
|
|
3594
|
-
s.push(new
|
|
3709
|
+
s.push(new Ne(i));
|
|
3595
3710
|
}), this.bankAccounts = s;
|
|
3596
3711
|
}
|
|
3597
3712
|
}
|
|
3598
3713
|
}
|
|
3599
3714
|
}
|
|
3600
|
-
class
|
|
3715
|
+
class ht extends yr {
|
|
3601
3716
|
/**
|
|
3602
3717
|
* Инициализирует экземпляр класса {@link ContragentPerson}.
|
|
3603
3718
|
*
|
|
@@ -3607,7 +3722,7 @@ class pt extends hr {
|
|
|
3607
3722
|
super(r);
|
|
3608
3723
|
}
|
|
3609
3724
|
}
|
|
3610
|
-
class
|
|
3725
|
+
class wr extends yr {
|
|
3611
3726
|
/**
|
|
3612
3727
|
* Инициализирует экземпляр класса {@link ContragentIc}.
|
|
3613
3728
|
*
|
|
@@ -3650,7 +3765,7 @@ class gr extends hr {
|
|
|
3650
3765
|
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 ?? "");
|
|
3651
3766
|
}
|
|
3652
3767
|
}
|
|
3653
|
-
class
|
|
3768
|
+
class ar extends wr {
|
|
3654
3769
|
/**
|
|
3655
3770
|
* Инициализирует экземпляр класса {@link ContragentUlR}.
|
|
3656
3771
|
*
|
|
@@ -3665,7 +3780,7 @@ class mr extends gr {
|
|
|
3665
3780
|
e && (this.kpp = e.kpp ?? "");
|
|
3666
3781
|
}
|
|
3667
3782
|
}
|
|
3668
|
-
class
|
|
3783
|
+
class gt extends ar {
|
|
3669
3784
|
/**
|
|
3670
3785
|
* Инициализирует экземпляр класса {@link ContragentUlNr}.
|
|
3671
3786
|
*
|
|
@@ -3676,7 +3791,7 @@ class ut extends mr {
|
|
|
3676
3791
|
/**
|
|
3677
3792
|
* Страна регистрации юридического лица нерезидента.
|
|
3678
3793
|
*/
|
|
3679
|
-
t(this, "registrationCountry", new
|
|
3794
|
+
t(this, "registrationCountry", new ee());
|
|
3680
3795
|
/**
|
|
3681
3796
|
* Регистрационный номер юридического лица нерезидента.
|
|
3682
3797
|
*/
|
|
@@ -3685,10 +3800,10 @@ class ut extends mr {
|
|
|
3685
3800
|
* Налоговый номер юридического лица нерезидента.
|
|
3686
3801
|
*/
|
|
3687
3802
|
t(this, "taxNumber", "");
|
|
3688
|
-
e && (this.registrationCountry = new
|
|
3803
|
+
e && (this.registrationCountry = new ee(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
|
|
3689
3804
|
}
|
|
3690
3805
|
}
|
|
3691
|
-
class
|
|
3806
|
+
class Ce {
|
|
3692
3807
|
/**
|
|
3693
3808
|
* Инициализирует и возвращает экземпляр класса с данными о контрагенте.
|
|
3694
3809
|
*
|
|
@@ -3696,18 +3811,18 @@ class we {
|
|
|
3696
3811
|
*/
|
|
3697
3812
|
static createInstance(r) {
|
|
3698
3813
|
switch (r.opf.slug) {
|
|
3699
|
-
case
|
|
3700
|
-
return new
|
|
3701
|
-
case
|
|
3702
|
-
return new
|
|
3703
|
-
case
|
|
3704
|
-
return new
|
|
3814
|
+
case k.Ic:
|
|
3815
|
+
return new wr(r);
|
|
3816
|
+
case k.UlR:
|
|
3817
|
+
return new ar(r);
|
|
3818
|
+
case k.UlNr:
|
|
3819
|
+
return new gt(r);
|
|
3705
3820
|
default:
|
|
3706
|
-
return new
|
|
3821
|
+
return new ht(r);
|
|
3707
3822
|
}
|
|
3708
3823
|
}
|
|
3709
3824
|
}
|
|
3710
|
-
class _e extends
|
|
3825
|
+
class _e extends H {
|
|
3711
3826
|
/**
|
|
3712
3827
|
* Инициализирует экземпляр класса {@link ContactRelation}.
|
|
3713
3828
|
*
|
|
@@ -3722,7 +3837,7 @@ class _e extends M {
|
|
|
3722
3837
|
this.isPrimary = e.isPrimary;
|
|
3723
3838
|
}
|
|
3724
3839
|
}
|
|
3725
|
-
class
|
|
3840
|
+
class mt extends M {
|
|
3726
3841
|
/**
|
|
3727
3842
|
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
3728
3843
|
*
|
|
@@ -3750,7 +3865,7 @@ class ht extends j {
|
|
|
3750
3865
|
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))));
|
|
3751
3866
|
}
|
|
3752
3867
|
}
|
|
3753
|
-
class
|
|
3868
|
+
class ve extends Vr {
|
|
3754
3869
|
/**
|
|
3755
3870
|
* Инициализирует экземпляр класса {@link DeliveryAddress}.
|
|
3756
3871
|
*
|
|
@@ -3787,10 +3902,10 @@ class Ce extends Er {
|
|
|
3787
3902
|
* Признак того, что указанный адрес является адресом транспортной компании.
|
|
3788
3903
|
*/
|
|
3789
3904
|
t(this, "isTransportCompanyAddress");
|
|
3790
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new
|
|
3905
|
+
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;
|
|
3791
3906
|
}
|
|
3792
3907
|
}
|
|
3793
|
-
class
|
|
3908
|
+
class Qe extends ge {
|
|
3794
3909
|
/**
|
|
3795
3910
|
* Инициализирует экземпляр класса {@link Client}.
|
|
3796
3911
|
*
|
|
@@ -3844,10 +3959,10 @@ class Ee extends he {
|
|
|
3844
3959
|
* Дополнительные данные о клиенте.
|
|
3845
3960
|
*/
|
|
3846
3961
|
t(this, "extraData");
|
|
3847
|
-
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((
|
|
3962
|
+
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => Ce.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new 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 ve(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) ?? {};
|
|
3848
3963
|
}
|
|
3849
3964
|
}
|
|
3850
|
-
class
|
|
3965
|
+
class Kt {
|
|
3851
3966
|
/**
|
|
3852
3967
|
* Инициализирует экземпляр класса {@link ClientsListFilters}.
|
|
3853
3968
|
*
|
|
@@ -3942,11 +4057,11 @@ class Jt {
|
|
|
3942
4057
|
* Данные о параметрах поиска последнего заказа который сделал пользователь.
|
|
3943
4058
|
*/
|
|
3944
4059
|
t(this, "lastOrder");
|
|
3945
|
-
var e, s, i, o, c,
|
|
3946
|
-
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((
|
|
4060
|
+
var e, s, i, o, c, u;
|
|
4061
|
+
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 = {
|
|
3947
4062
|
createdAt: new O((o = r == null ? void 0 : r.lastOrder) == null ? void 0 : o.createdAt),
|
|
3948
4063
|
creator: (c = r == null ? void 0 : r.lastOrder) == null ? void 0 : c.creator,
|
|
3949
|
-
isApproved: (
|
|
4064
|
+
isApproved: (u = r == null ? void 0 : r.lastOrder) == null ? void 0 : u.isApproved
|
|
3950
4065
|
};
|
|
3951
4066
|
}
|
|
3952
4067
|
/**
|
|
@@ -3969,7 +4084,7 @@ class Jt {
|
|
|
3969
4084
|
this.cities = [];
|
|
3970
4085
|
break;
|
|
3971
4086
|
case "region":
|
|
3972
|
-
this.region = new
|
|
4087
|
+
this.region = new le();
|
|
3973
4088
|
break;
|
|
3974
4089
|
case "isActive":
|
|
3975
4090
|
this.isActive = !0;
|
|
@@ -3993,16 +4108,16 @@ class Jt {
|
|
|
3993
4108
|
this.salesDirections = [];
|
|
3994
4109
|
break;
|
|
3995
4110
|
case "contragentType":
|
|
3996
|
-
this.contragentType = new
|
|
4111
|
+
this.contragentType = new j();
|
|
3997
4112
|
break;
|
|
3998
4113
|
case "preferredDeliveryType":
|
|
3999
|
-
this.preferredDeliveryType = new
|
|
4114
|
+
this.preferredDeliveryType = new X();
|
|
4000
4115
|
break;
|
|
4001
4116
|
case "partnerGroups":
|
|
4002
4117
|
this.partnerGroups = [];
|
|
4003
4118
|
break;
|
|
4004
4119
|
case "contact":
|
|
4005
|
-
this.contact = new
|
|
4120
|
+
this.contact = new Oe();
|
|
4006
4121
|
break;
|
|
4007
4122
|
}
|
|
4008
4123
|
return this;
|
|
@@ -4015,13 +4130,13 @@ class Jt {
|
|
|
4015
4130
|
var e, s, i, o;
|
|
4016
4131
|
const r = {};
|
|
4017
4132
|
return Object.keys(this).forEach((c) => {
|
|
4018
|
-
const
|
|
4133
|
+
const u = this[c];
|
|
4019
4134
|
// eslint-disable-next-line prettier/prettier
|
|
4020
|
-
|
|
4135
|
+
D(u) || a(u) && u.trim().length === 0 || qe(u.isNewRec) && u.isNewRec() || (r[c] = u);
|
|
4021
4136
|
}), !((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;
|
|
4022
4137
|
}
|
|
4023
4138
|
}
|
|
4024
|
-
class
|
|
4139
|
+
class Cr extends H {
|
|
4025
4140
|
/**
|
|
4026
4141
|
* Инициализирует экземпляр класса {@link OrderShortInfo}.
|
|
4027
4142
|
*
|
|
@@ -4041,10 +4156,10 @@ class fr extends M {
|
|
|
4041
4156
|
* Признак того, что заказ подтвержден в 1С.
|
|
4042
4157
|
*/
|
|
4043
4158
|
t(this, "isApproved1c");
|
|
4044
|
-
this.createdAt =
|
|
4159
|
+
this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(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;
|
|
4045
4160
|
}
|
|
4046
4161
|
}
|
|
4047
|
-
class
|
|
4162
|
+
class ft extends b {
|
|
4048
4163
|
/**
|
|
4049
4164
|
* Инициализирует экземпляр класса {@link ClientAdditionalData}.
|
|
4050
4165
|
*
|
|
@@ -4077,10 +4192,10 @@ class gt extends T {
|
|
|
4077
4192
|
* Список менеджеров.
|
|
4078
4193
|
*/
|
|
4079
4194
|
t(this, "managers");
|
|
4080
|
-
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new
|
|
4195
|
+
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new M(o))), e.lastOrder && (this.lastOrder = new Cr(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)));
|
|
4081
4196
|
}
|
|
4082
4197
|
}
|
|
4083
|
-
class
|
|
4198
|
+
class yt {
|
|
4084
4199
|
/**
|
|
4085
4200
|
* Инициализирует экземпляр класса {@link DataTablePaginationRequestParams}.
|
|
4086
4201
|
*
|
|
@@ -4098,7 +4213,7 @@ class mt {
|
|
|
4098
4213
|
this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
|
|
4099
4214
|
}
|
|
4100
4215
|
}
|
|
4101
|
-
class
|
|
4216
|
+
class Qt extends yt {
|
|
4102
4217
|
/**
|
|
4103
4218
|
* Инициализирует экземпляр класса {@link DataTablePagination}.
|
|
4104
4219
|
*
|
|
@@ -4129,7 +4244,7 @@ class Kt extends mt {
|
|
|
4129
4244
|
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;
|
|
4130
4245
|
}
|
|
4131
4246
|
}
|
|
4132
|
-
class
|
|
4247
|
+
class Yt {
|
|
4133
4248
|
/**
|
|
4134
4249
|
* Инициализирует экземпляр класса {@link ISortRequestParams}.
|
|
4135
4250
|
*
|
|
@@ -4147,7 +4262,7 @@ class Qt {
|
|
|
4147
4262
|
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
4148
4263
|
}
|
|
4149
4264
|
}
|
|
4150
|
-
class
|
|
4265
|
+
class Xt extends $e {
|
|
4151
4266
|
/**
|
|
4152
4267
|
* Возвращает данные об указанном клиенте.
|
|
4153
4268
|
*
|
|
@@ -4155,7 +4270,7 @@ class Yt extends De {
|
|
|
4155
4270
|
* @see /doc/api/internal#/Клиенты/api_internal_client_get_full_info
|
|
4156
4271
|
*/
|
|
4157
4272
|
getClient(r) {
|
|
4158
|
-
return this.get(`/internal/clients/${r}`, {}, (e) => new
|
|
4273
|
+
return this.get(`/internal/clients/${r}`, {}, (e) => new Qe(e.data));
|
|
4159
4274
|
}
|
|
4160
4275
|
/**
|
|
4161
4276
|
* Возвращает данные о клиентах, удовлетворяющих указанным параметрам поиска.
|
|
@@ -4170,7 +4285,7 @@ class Yt extends De {
|
|
|
4170
4285
|
getClientsList(r, e, s, i) {
|
|
4171
4286
|
return this.getPaginated("/internal/clients", r, e, s, i, (o) => {
|
|
4172
4287
|
const c = { ...o.data };
|
|
4173
|
-
return c.data = c.data.map((
|
|
4288
|
+
return c.data = c.data.map((u) => new ge(u)), c;
|
|
4174
4289
|
});
|
|
4175
4290
|
}
|
|
4176
4291
|
/**
|
|
@@ -4183,7 +4298,7 @@ class Yt extends De {
|
|
|
4183
4298
|
return this.getClientsList({
|
|
4184
4299
|
groupOp: "and",
|
|
4185
4300
|
groups: [],
|
|
4186
|
-
filters: [{ field: "phone", op:
|
|
4301
|
+
filters: [{ field: "phone", op: He.Contains, value: r }]
|
|
4187
4302
|
});
|
|
4188
4303
|
}
|
|
4189
4304
|
/**
|
|
@@ -4197,7 +4312,7 @@ class Yt extends De {
|
|
|
4197
4312
|
const s = r.map((i) => i.id);
|
|
4198
4313
|
return this.post("/internal/clients/additional-data", { clients: s, requested_data_types: e }, (i) => {
|
|
4199
4314
|
let o = [];
|
|
4200
|
-
return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new
|
|
4315
|
+
return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new ft(c))), o;
|
|
4201
4316
|
});
|
|
4202
4317
|
}
|
|
4203
4318
|
/**
|
|
@@ -4209,7 +4324,7 @@ class Yt extends De {
|
|
|
4209
4324
|
getAllClientContacts(r) {
|
|
4210
4325
|
return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
|
|
4211
4326
|
let s = [];
|
|
4212
|
-
return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new
|
|
4327
|
+
return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new mt(i))), s;
|
|
4213
4328
|
});
|
|
4214
4329
|
}
|
|
4215
4330
|
/**
|
|
@@ -4239,7 +4354,7 @@ class Yt extends De {
|
|
|
4239
4354
|
is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients,
|
|
4240
4355
|
preferred_warehouse_id: (s = r.preferredWarehouse) == null ? void 0 : s.id
|
|
4241
4356
|
},
|
|
4242
|
-
(i) => new
|
|
4357
|
+
(i) => new Qe(i.data),
|
|
4243
4358
|
e
|
|
4244
4359
|
);
|
|
4245
4360
|
}
|
|
@@ -4349,16 +4464,16 @@ class Yt extends De {
|
|
|
4349
4464
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
|
|
4350
4465
|
*/
|
|
4351
4466
|
createContragentClientData(r, e, s = {}) {
|
|
4352
|
-
var
|
|
4467
|
+
var p, f, m, A, d, I, S, _;
|
|
4353
4468
|
let i;
|
|
4354
|
-
const o = e, c = e,
|
|
4469
|
+
const o = e, c = e, u = e;
|
|
4355
4470
|
switch (e.opf.slug) {
|
|
4356
|
-
case
|
|
4471
|
+
case k.Ic:
|
|
4357
4472
|
i = {
|
|
4358
4473
|
opf: o.opf.slug,
|
|
4359
4474
|
name: o.name,
|
|
4360
4475
|
alternative_name: o.alternativeName,
|
|
4361
|
-
partner_group_id: (
|
|
4476
|
+
partner_group_id: (p = o.partnerGroup) == null ? void 0 : p.id,
|
|
4362
4477
|
manager_id: (f = o.manager) == null ? void 0 : f.id,
|
|
4363
4478
|
comment: o.comment,
|
|
4364
4479
|
inn: o.inn,
|
|
@@ -4371,13 +4486,13 @@ class Yt extends De {
|
|
|
4371
4486
|
actual_address: o.actualAddress
|
|
4372
4487
|
};
|
|
4373
4488
|
break;
|
|
4374
|
-
case
|
|
4489
|
+
case k.UlR:
|
|
4375
4490
|
i = {
|
|
4376
4491
|
opf: c.opf.slug,
|
|
4377
4492
|
name: c.name,
|
|
4378
4493
|
alternative_name: c.alternativeName,
|
|
4379
4494
|
partner_group_id: (m = c.partnerGroup) == null ? void 0 : m.id,
|
|
4380
|
-
manager_id: (
|
|
4495
|
+
manager_id: (A = c.manager) == null ? void 0 : A.id,
|
|
4381
4496
|
comment: c.comment,
|
|
4382
4497
|
inn: c.inn,
|
|
4383
4498
|
kpp: c.kpp,
|
|
@@ -4390,23 +4505,23 @@ class Yt extends De {
|
|
|
4390
4505
|
actual_address: c.actualAddress
|
|
4391
4506
|
};
|
|
4392
4507
|
break;
|
|
4393
|
-
case
|
|
4508
|
+
case k.UlNr:
|
|
4394
4509
|
i = {
|
|
4395
|
-
opf:
|
|
4396
|
-
name:
|
|
4397
|
-
alternative_name:
|
|
4398
|
-
partner_group_id: (
|
|
4399
|
-
manager_id: (
|
|
4400
|
-
comment:
|
|
4401
|
-
director_name:
|
|
4402
|
-
director_position:
|
|
4403
|
-
director_acts_on:
|
|
4404
|
-
legal_address:
|
|
4405
|
-
postal_address:
|
|
4406
|
-
actual_address:
|
|
4407
|
-
registration_country_id:
|
|
4408
|
-
registration_number:
|
|
4409
|
-
tax_number:
|
|
4510
|
+
opf: u.opf.slug,
|
|
4511
|
+
name: u.name,
|
|
4512
|
+
alternative_name: u.alternativeName,
|
|
4513
|
+
partner_group_id: (d = u.partnerGroup) == null ? void 0 : d.id,
|
|
4514
|
+
manager_id: (I = u.manager) == null ? void 0 : I.id,
|
|
4515
|
+
comment: u.comment,
|
|
4516
|
+
director_name: u.directorName,
|
|
4517
|
+
director_position: u.directorPosition,
|
|
4518
|
+
director_acts_on: u.directorActsOn,
|
|
4519
|
+
legal_address: u.legalAddress,
|
|
4520
|
+
postal_address: u.postalAddress,
|
|
4521
|
+
actual_address: u.actualAddress,
|
|
4522
|
+
registration_country_id: u.registrationCountry.id,
|
|
4523
|
+
registration_number: u.registrationNumber,
|
|
4524
|
+
tax_number: u.taxNumber || void 0
|
|
4410
4525
|
};
|
|
4411
4526
|
break;
|
|
4412
4527
|
default:
|
|
@@ -4414,8 +4529,8 @@ class Yt extends De {
|
|
|
4414
4529
|
opf: e.opf.slug,
|
|
4415
4530
|
name: e.name,
|
|
4416
4531
|
alternative_name: e.alternativeName,
|
|
4417
|
-
partner_group_id: (
|
|
4418
|
-
manager_id: (
|
|
4532
|
+
partner_group_id: (S = e.partnerGroup) == null ? void 0 : S.id,
|
|
4533
|
+
manager_id: (_ = e.manager) == null ? void 0 : _.id,
|
|
4419
4534
|
comment: e.comment
|
|
4420
4535
|
};
|
|
4421
4536
|
break;
|
|
@@ -4423,7 +4538,7 @@ class Yt extends De {
|
|
|
4423
4538
|
return this.post(
|
|
4424
4539
|
`/internal/clients/${r}/contragents`,
|
|
4425
4540
|
i,
|
|
4426
|
-
(U) =>
|
|
4541
|
+
(U) => Ce.createInstance(U.data),
|
|
4427
4542
|
s
|
|
4428
4543
|
);
|
|
4429
4544
|
}
|
|
@@ -4438,16 +4553,16 @@ class Yt extends De {
|
|
|
4438
4553
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
|
|
4439
4554
|
*/
|
|
4440
4555
|
updateContragentClientData(r, e, s = {}) {
|
|
4441
|
-
var
|
|
4556
|
+
var p, f, m, A, d, I, S, _;
|
|
4442
4557
|
let i;
|
|
4443
|
-
const o = e, c = e,
|
|
4558
|
+
const o = e, c = e, u = e;
|
|
4444
4559
|
switch (e.opf.slug) {
|
|
4445
|
-
case
|
|
4560
|
+
case k.Ic:
|
|
4446
4561
|
i = {
|
|
4447
4562
|
opf: o.opf.slug,
|
|
4448
4563
|
name: o.name,
|
|
4449
4564
|
alternative_name: o.alternativeName,
|
|
4450
|
-
partner_group_id: (
|
|
4565
|
+
partner_group_id: (p = o.partnerGroup) == null ? void 0 : p.id,
|
|
4451
4566
|
manager_id: (f = o.manager) == null ? void 0 : f.id,
|
|
4452
4567
|
comment: o.comment,
|
|
4453
4568
|
inn: o.inn,
|
|
@@ -4460,13 +4575,13 @@ class Yt extends De {
|
|
|
4460
4575
|
actual_address: o.actualAddress
|
|
4461
4576
|
};
|
|
4462
4577
|
break;
|
|
4463
|
-
case
|
|
4578
|
+
case k.UlR:
|
|
4464
4579
|
i = {
|
|
4465
4580
|
opf: c.opf.slug,
|
|
4466
4581
|
name: c.name,
|
|
4467
4582
|
alternative_name: c.alternativeName,
|
|
4468
4583
|
partner_group_id: (m = c.partnerGroup) == null ? void 0 : m.id,
|
|
4469
|
-
manager_id: (
|
|
4584
|
+
manager_id: (A = c.manager) == null ? void 0 : A.id,
|
|
4470
4585
|
comment: c.comment,
|
|
4471
4586
|
inn: c.inn,
|
|
4472
4587
|
kpp: c.kpp,
|
|
@@ -4479,23 +4594,23 @@ class Yt extends De {
|
|
|
4479
4594
|
actual_address: c.actualAddress
|
|
4480
4595
|
};
|
|
4481
4596
|
break;
|
|
4482
|
-
case
|
|
4597
|
+
case k.UlNr:
|
|
4483
4598
|
i = {
|
|
4484
|
-
opf:
|
|
4485
|
-
name:
|
|
4486
|
-
alternative_name:
|
|
4487
|
-
partner_group_id: (
|
|
4488
|
-
manager_id: (
|
|
4489
|
-
comment:
|
|
4490
|
-
director_name:
|
|
4491
|
-
director_position:
|
|
4492
|
-
director_acts_on:
|
|
4493
|
-
legal_address:
|
|
4494
|
-
postal_address:
|
|
4495
|
-
actual_address:
|
|
4496
|
-
registration_country_id:
|
|
4497
|
-
registration_number:
|
|
4498
|
-
tax_number:
|
|
4599
|
+
opf: u.opf.slug,
|
|
4600
|
+
name: u.name,
|
|
4601
|
+
alternative_name: u.alternativeName,
|
|
4602
|
+
partner_group_id: (d = u.partnerGroup) == null ? void 0 : d.id,
|
|
4603
|
+
manager_id: (I = u.manager) == null ? void 0 : I.id,
|
|
4604
|
+
comment: u.comment,
|
|
4605
|
+
director_name: u.directorName,
|
|
4606
|
+
director_position: u.directorPosition,
|
|
4607
|
+
director_acts_on: u.directorActsOn,
|
|
4608
|
+
legal_address: u.legalAddress,
|
|
4609
|
+
postal_address: u.postalAddress,
|
|
4610
|
+
actual_address: u.actualAddress,
|
|
4611
|
+
registration_country_id: u.registrationCountry.id,
|
|
4612
|
+
registration_number: u.registrationNumber,
|
|
4613
|
+
tax_number: u.taxNumber || void 0
|
|
4499
4614
|
};
|
|
4500
4615
|
break;
|
|
4501
4616
|
default:
|
|
@@ -4503,8 +4618,8 @@ class Yt extends De {
|
|
|
4503
4618
|
opf: e.opf.slug,
|
|
4504
4619
|
name: e.name,
|
|
4505
4620
|
alternative_name: e.alternativeName,
|
|
4506
|
-
partner_group_id: (
|
|
4507
|
-
manager_id: (
|
|
4621
|
+
partner_group_id: (S = e.partnerGroup) == null ? void 0 : S.id,
|
|
4622
|
+
manager_id: (_ = e.manager) == null ? void 0 : _.id,
|
|
4508
4623
|
comment: e.comment
|
|
4509
4624
|
};
|
|
4510
4625
|
break;
|
|
@@ -4512,7 +4627,7 @@ class Yt extends De {
|
|
|
4512
4627
|
return this.patch(
|
|
4513
4628
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
4514
4629
|
i,
|
|
4515
|
-
(U) =>
|
|
4630
|
+
(U) => Ce.createInstance(U.data),
|
|
4516
4631
|
s
|
|
4517
4632
|
);
|
|
4518
4633
|
}
|
|
@@ -4550,7 +4665,7 @@ class Yt extends De {
|
|
|
4550
4665
|
}), e.operatingHours && (i.operating_hours = {
|
|
4551
4666
|
from: e.operatingHours.from,
|
|
4552
4667
|
to: e.operatingHours.to
|
|
4553
|
-
}), this.post(`/internal/clients/${r}/delivery-addresses`, i, (
|
|
4668
|
+
}), this.post(`/internal/clients/${r}/delivery-addresses`, i, (u) => new ve(u.data), s);
|
|
4554
4669
|
}
|
|
4555
4670
|
/**
|
|
4556
4671
|
* Обновляет данные об адресе доставки клиента.
|
|
@@ -4579,7 +4694,7 @@ class Yt extends De {
|
|
|
4579
4694
|
}), this.patch(
|
|
4580
4695
|
`/internal/clients/${r}/delivery-addresses/${e.id}`,
|
|
4581
4696
|
i,
|
|
4582
|
-
(
|
|
4697
|
+
(u) => new ve(u.data),
|
|
4583
4698
|
s
|
|
4584
4699
|
);
|
|
4585
4700
|
}
|
|
@@ -4615,7 +4730,7 @@ class Yt extends De {
|
|
|
4615
4730
|
correspondent_account: s.correspondentAccount,
|
|
4616
4731
|
currency_id: s.currency.id
|
|
4617
4732
|
},
|
|
4618
|
-
(o) => new
|
|
4733
|
+
(o) => new Ne(o.data),
|
|
4619
4734
|
i
|
|
4620
4735
|
);
|
|
4621
4736
|
}
|
|
@@ -4641,7 +4756,7 @@ class Yt extends De {
|
|
|
4641
4756
|
correspondent_account: s.correspondentAccount,
|
|
4642
4757
|
currency_id: s.currency.id
|
|
4643
4758
|
},
|
|
4644
|
-
(o) => new
|
|
4759
|
+
(o) => new Ne(o.data),
|
|
4645
4760
|
i
|
|
4646
4761
|
);
|
|
4647
4762
|
}
|
|
@@ -4702,7 +4817,7 @@ class Yt extends De {
|
|
|
4702
4817
|
comment: e.comment,
|
|
4703
4818
|
not_disturb: e.notDisturb
|
|
4704
4819
|
},
|
|
4705
|
-
(i) => new
|
|
4820
|
+
(i) => new M(i.data),
|
|
4706
4821
|
s
|
|
4707
4822
|
);
|
|
4708
4823
|
}
|
|
@@ -4838,14 +4953,14 @@ class Yt extends De {
|
|
|
4838
4953
|
* в случае ошибок в запросах.
|
|
4839
4954
|
*/
|
|
4840
4955
|
createContact(r, e, s, i = {}) {
|
|
4841
|
-
var c,
|
|
4956
|
+
var c, u;
|
|
4842
4957
|
const o = {
|
|
4843
4958
|
name: e.name,
|
|
4844
4959
|
position: e.position,
|
|
4845
4960
|
comment: e.comment,
|
|
4846
4961
|
...s
|
|
4847
4962
|
};
|
|
4848
|
-
return (c = e.phone) != null && c.length && (o.phone = e.phone), (
|
|
4963
|
+
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);
|
|
4849
4964
|
}
|
|
4850
4965
|
/**
|
|
4851
4966
|
* Устанавливает признак основного контактного лица.
|
|
@@ -4874,7 +4989,7 @@ class Yt extends De {
|
|
|
4874
4989
|
return this.get(`/internal/clients/${r.id}/verification/email?email=${r.email}`);
|
|
4875
4990
|
}
|
|
4876
4991
|
}
|
|
4877
|
-
const
|
|
4992
|
+
const V = class V extends h {
|
|
4878
4993
|
/**
|
|
4879
4994
|
* Инициализирует экземпляр класса {@link HttpCachedRequester}.
|
|
4880
4995
|
*/
|
|
@@ -4884,7 +4999,7 @@ const E = class E extends h {
|
|
|
4884
4999
|
* Время кэширования данных ответов на запросы (секунд).
|
|
4885
5000
|
*/
|
|
4886
5001
|
t(this, "responseDataCacheTimeout");
|
|
4887
|
-
this.responseDataCacheTimeout =
|
|
5002
|
+
this.responseDataCacheTimeout = T.getConfig().http.responseDataCacheTimeout;
|
|
4888
5003
|
}
|
|
4889
5004
|
/**
|
|
4890
5005
|
* Возвращает кэшированные данные.
|
|
@@ -4894,7 +5009,7 @@ const E = class E extends h {
|
|
|
4894
5009
|
*/
|
|
4895
5010
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
4896
5011
|
static getCachedResponse(e) {
|
|
4897
|
-
const s =
|
|
5012
|
+
const s = V.responseDataCache.get(e);
|
|
4898
5013
|
if (s && s.validTo > /* @__PURE__ */ new Date())
|
|
4899
5014
|
return s.val;
|
|
4900
5015
|
}
|
|
@@ -4905,7 +5020,7 @@ const E = class E extends h {
|
|
|
4905
5020
|
* @param data Данные для кэширования.
|
|
4906
5021
|
*/
|
|
4907
5022
|
cacheResponse(e, s) {
|
|
4908
|
-
|
|
5023
|
+
V.responseDataCache.set(e, {
|
|
4909
5024
|
validTo: Ir(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
|
|
4910
5025
|
val: s
|
|
4911
5026
|
});
|
|
@@ -4921,9 +5036,9 @@ const E = class E extends h {
|
|
|
4921
5036
|
*/
|
|
4922
5037
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
4923
5038
|
getTypedDataArrayRequester(e, s, i = !1, o = {}) {
|
|
4924
|
-
const c = s + (
|
|
4925
|
-
return
|
|
4926
|
-
const f =
|
|
5039
|
+
const c = s + (Y(o) ? "" : ` >>> ${JSON.stringify(o)}`), u = i ? V.getCachedResponse(c) : void 0;
|
|
5040
|
+
return u ? Promise.resolve(u) : this.get(s, o).then((p) => {
|
|
5041
|
+
const f = p.map((m) => Fe.instanceInitializer(e, m));
|
|
4927
5042
|
return i && f && this.cacheResponse(s, f), f;
|
|
4928
5043
|
});
|
|
4929
5044
|
}
|
|
@@ -4931,9 +5046,9 @@ const E = class E extends h {
|
|
|
4931
5046
|
/**
|
|
4932
5047
|
* Кэш результатов запросов.
|
|
4933
5048
|
*/
|
|
4934
|
-
t(
|
|
4935
|
-
let pe =
|
|
4936
|
-
class
|
|
5049
|
+
t(V, "responseDataCache", /* @__PURE__ */ new Map());
|
|
5050
|
+
let pe = V;
|
|
5051
|
+
class Zt extends h {
|
|
4937
5052
|
/**
|
|
4938
5053
|
* Выполняет проверку занят ли указанный номер телефона.
|
|
4939
5054
|
*
|
|
@@ -4947,7 +5062,7 @@ class Xt extends h {
|
|
|
4947
5062
|
});
|
|
4948
5063
|
}
|
|
4949
5064
|
}
|
|
4950
|
-
class
|
|
5065
|
+
class es extends h {
|
|
4951
5066
|
/**
|
|
4952
5067
|
* Возвращает настройки указанного конфигуратора для указанной категории.
|
|
4953
5068
|
*
|
|
@@ -4975,7 +5090,7 @@ class Zt extends h {
|
|
|
4975
5090
|
const i = this.get(
|
|
4976
5091
|
`internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.configurator}/product`,
|
|
4977
5092
|
{ params: e },
|
|
4978
|
-
(c) => new
|
|
5093
|
+
(c) => new x(c.data)
|
|
4979
5094
|
);
|
|
4980
5095
|
return i.catch((c) => {
|
|
4981
5096
|
this.errorResponseHandler(c, s);
|
|
@@ -5018,29 +5133,29 @@ class Zt extends h {
|
|
|
5018
5133
|
return this.delete(`internal/catalog/categories/${r.id}/configurators/${(s = r.properties) == null ? void 0 : s.configurator}/template/${e}`);
|
|
5019
5134
|
}
|
|
5020
5135
|
}
|
|
5021
|
-
class
|
|
5136
|
+
class rs {
|
|
5022
5137
|
/**
|
|
5023
5138
|
* Возвращает диапазон дат по умолчанию.
|
|
5024
5139
|
*/
|
|
5025
5140
|
static defaultDateRanges() {
|
|
5026
|
-
const r =
|
|
5141
|
+
const r = kr(/* @__PURE__ */ new Date(), 1);
|
|
5027
5142
|
return {
|
|
5028
5143
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
5029
|
-
nextWorkingDay: { label: "Следующий рабочий день", from:
|
|
5030
|
-
today: { label: "Сегодня", from:
|
|
5031
|
-
yesterday: { label: "Вчера", from:
|
|
5032
|
-
tomorrow: { label: "Завтра", from:
|
|
5144
|
+
nextWorkingDay: { label: "Следующий рабочий день", from: Gr(r), to: Ur(r) },
|
|
5145
|
+
today: { label: "Сегодня", from: Le(), to: qr() },
|
|
5146
|
+
yesterday: { label: "Вчера", from: Or(), to: Nr() },
|
|
5147
|
+
tomorrow: { label: "Завтра", from: xr(), to: Lr() }
|
|
5033
5148
|
};
|
|
5034
5149
|
}
|
|
5035
5150
|
}
|
|
5036
|
-
const
|
|
5151
|
+
const K = class K {
|
|
5037
5152
|
/**
|
|
5038
5153
|
* Устанавливает список единиц измерения линейной величины.
|
|
5039
5154
|
*
|
|
5040
5155
|
* @param linearValues Список единиц измерения линейной величины.
|
|
5041
5156
|
*/
|
|
5042
5157
|
static setLinearValues(r) {
|
|
5043
|
-
|
|
5158
|
+
K.linearValues = r;
|
|
5044
5159
|
}
|
|
5045
5160
|
/**
|
|
5046
5161
|
* Возвращает признак, что указанный товар имеет линейную единицу измерения.
|
|
@@ -5048,7 +5163,7 @@ const V = class V {
|
|
|
5048
5163
|
* @param product Данные о товаре для которого нужно проверить линейность его единицы измерения.
|
|
5049
5164
|
*/
|
|
5050
5165
|
static productIsMeasurable(r) {
|
|
5051
|
-
return
|
|
5166
|
+
return K.linearValues.includes(r.unit);
|
|
5052
5167
|
}
|
|
5053
5168
|
/**
|
|
5054
5169
|
* Возвращает кратность количества для указанного товара.
|
|
@@ -5057,7 +5172,7 @@ const V = class V {
|
|
|
5057
5172
|
*/
|
|
5058
5173
|
static getProductMultiplicity(r) {
|
|
5059
5174
|
var e, s;
|
|
5060
|
-
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((s = r.properties) != null && s.minCount) && !
|
|
5175
|
+
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((s = r.properties) != null && s.minCount) && !K.productIsMeasurable(r) ? r.properties.minCount : 1;
|
|
5061
5176
|
}
|
|
5062
5177
|
/**
|
|
5063
5178
|
* Возвращает кратность длины для указанного товара.
|
|
@@ -5072,9 +5187,9 @@ const V = class V {
|
|
|
5072
5187
|
/**
|
|
5073
5188
|
* Список единиц измерения линейной величины.
|
|
5074
5189
|
*/
|
|
5075
|
-
t(
|
|
5076
|
-
let
|
|
5077
|
-
class
|
|
5190
|
+
t(K, "linearValues", ["пог.м.", "м.", "м2"]);
|
|
5191
|
+
let Ye = K;
|
|
5192
|
+
class ts {
|
|
5078
5193
|
/**
|
|
5079
5194
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
5080
5195
|
*/
|
|
@@ -5090,7 +5205,7 @@ class rs {
|
|
|
5090
5205
|
return r.id === 0 && r.guid === "-undefined-";
|
|
5091
5206
|
}
|
|
5092
5207
|
}
|
|
5093
|
-
class
|
|
5208
|
+
class wt extends pe {
|
|
5094
5209
|
/**
|
|
5095
5210
|
* Возвращает {@link Promise} для получения справочника списка менеджеров.
|
|
5096
5211
|
*/
|
|
@@ -5098,18 +5213,18 @@ class ft extends pe {
|
|
|
5098
5213
|
const r = "/internal/managers", e = pe.getCachedResponse(r);
|
|
5099
5214
|
if (e)
|
|
5100
5215
|
return e;
|
|
5101
|
-
const i = (await this.get(r)).data.map((o) =>
|
|
5216
|
+
const i = (await this.get(r)).data.map((o) => Fe.instanceInitializer(Ae, o));
|
|
5102
5217
|
return this.cacheResponse(r, i), i;
|
|
5103
5218
|
}
|
|
5104
5219
|
}
|
|
5105
|
-
class
|
|
5220
|
+
class vr extends Cr {
|
|
5106
5221
|
/**
|
|
5107
5222
|
* Инициализирует экземпляр класса {@link OrderInfo}.
|
|
5108
5223
|
*
|
|
5109
5224
|
* @param data Данные для первоначальной инициализации.
|
|
5110
5225
|
*/
|
|
5111
5226
|
constructor(e) {
|
|
5112
|
-
var s, i, o, c,
|
|
5227
|
+
var s, i, o, c, u, p, f, m;
|
|
5113
5228
|
super(e);
|
|
5114
5229
|
/**
|
|
5115
5230
|
* Краткие данные о клиенте.
|
|
@@ -5151,19 +5266,19 @@ class yr extends fr {
|
|
|
5151
5266
|
* Признак того, что заказ создан из товаров, которые имеют признак "Нет в наличии".
|
|
5152
5267
|
*/
|
|
5153
5268
|
t(this, "isNotInStock");
|
|
5154
|
-
this.client = new
|
|
5269
|
+
this.client = new ge(e == null ? void 0 : e.client), this.payment = {
|
|
5155
5270
|
type: ((s = e == null ? void 0 : e.payment) == null ? void 0 : s.type) ?? -1,
|
|
5156
5271
|
status: ((i = e == null ? void 0 : e.payment) == null ? void 0 : i.status) ?? -1,
|
|
5157
5272
|
onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
|
|
5158
5273
|
}, this.delivery = {
|
|
5159
5274
|
type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
|
|
5160
|
-
date:
|
|
5161
|
-
address: (f = e == null ? void 0 : e.delivery) != null && f.address ? new
|
|
5162
|
-
warehouse: (m = e == null ? void 0 : e.delivery) != null && m.warehouse ? new
|
|
5163
|
-
}, this.attachedUser = new
|
|
5275
|
+
date: a((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? C(e.delivery.date) : ((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ?? /* @__PURE__ */ new Date(),
|
|
5276
|
+
address: (f = e == null ? void 0 : e.delivery) != null && f.address ? new ve(e.delivery.address) : void 0,
|
|
5277
|
+
warehouse: (m = e == null ? void 0 : e.delivery) != null && m.warehouse ? new De(e.delivery.warehouse) : void 0
|
|
5278
|
+
}, 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 = a(e == null ? void 0 : e.pendingAt) ? C(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = a(e == null ? void 0 : e.processedAt) ? C(e.processedAt) : e == null ? void 0 : e.processedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1;
|
|
5164
5279
|
}
|
|
5165
5280
|
}
|
|
5166
|
-
class
|
|
5281
|
+
class at extends H {
|
|
5167
5282
|
/**
|
|
5168
5283
|
* Инициализирует экземпляр класса {@link OrderProduct}.
|
|
5169
5284
|
*
|
|
@@ -5243,10 +5358,10 @@ class yt extends M {
|
|
|
5243
5358
|
* который соответствует указанной ширине. Количество не ограничено.
|
|
5244
5359
|
*/
|
|
5245
5360
|
t(this, "sawing");
|
|
5246
|
-
this.product = new
|
|
5361
|
+
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;
|
|
5247
5362
|
}
|
|
5248
5363
|
}
|
|
5249
|
-
class
|
|
5364
|
+
class Ct extends vr {
|
|
5250
5365
|
/**
|
|
5251
5366
|
* Инициализирует экземпляр класса {@link Order}.
|
|
5252
5367
|
*
|
|
@@ -5286,10 +5401,10 @@ class wt extends yr {
|
|
|
5286
5401
|
* Признак, что разрешена передача заказа в работу без оплаты.
|
|
5287
5402
|
*/
|
|
5288
5403
|
t(this, "isAllowProcessingWithoutPayment");
|
|
5289
|
-
this.products = (e.products ?? []).map((s) => new
|
|
5404
|
+
this.products = (e.products ?? []).map((s) => new at(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? Ce.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new v(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
|
|
5290
5405
|
}
|
|
5291
5406
|
}
|
|
5292
|
-
class
|
|
5407
|
+
class ss extends $e {
|
|
5293
5408
|
/**
|
|
5294
5409
|
* Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
|
|
5295
5410
|
*
|
|
@@ -5302,7 +5417,7 @@ class ts extends De {
|
|
|
5302
5417
|
getOrders(r, e, s) {
|
|
5303
5418
|
return this.getPaginated("/internal/orders", r, e ? [e] : void 0, s, {}, (i) => {
|
|
5304
5419
|
const o = { ...i.data };
|
|
5305
|
-
return o.data = o.data.map((c) => new
|
|
5420
|
+
return o.data = o.data.map((c) => new vr(c)), o;
|
|
5306
5421
|
});
|
|
5307
5422
|
}
|
|
5308
5423
|
/**
|
|
@@ -5320,10 +5435,10 @@ class ts extends De {
|
|
|
5320
5435
|
* @param orderId Идентификатор заказа для которого необходимо вернуть данные.
|
|
5321
5436
|
*/
|
|
5322
5437
|
getOrder(r) {
|
|
5323
|
-
return this.get(`/internal/orders/${r}`, {}, (e) => new
|
|
5438
|
+
return this.get(`/internal/orders/${r}`, {}, (e) => new Ct(e.data));
|
|
5324
5439
|
}
|
|
5325
5440
|
}
|
|
5326
|
-
class
|
|
5441
|
+
class de {
|
|
5327
5442
|
/**
|
|
5328
5443
|
* Инициализирует экземпляр класса {@link PriceAnalyze}.
|
|
5329
5444
|
*
|
|
@@ -5350,12 +5465,12 @@ class Se {
|
|
|
5350
5465
|
* Источник клиентской цены.
|
|
5351
5466
|
*/
|
|
5352
5467
|
t(this, "source");
|
|
5353
|
-
this.client = new
|
|
5468
|
+
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;
|
|
5354
5469
|
}
|
|
5355
5470
|
}
|
|
5356
5471
|
const Ie = (n) => {
|
|
5357
5472
|
var r, e, s, i, o;
|
|
5358
|
-
return n ?
|
|
5473
|
+
return n ? sr(
|
|
5359
5474
|
{
|
|
5360
5475
|
cities: (r = n.cities) == null ? void 0 : r.map((c) => c.id),
|
|
5361
5476
|
clients: (e = n.clients) == null ? void 0 : e.map((c) => c.id),
|
|
@@ -5364,13 +5479,13 @@ const Ie = (n) => {
|
|
|
5364
5479
|
salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
|
|
5365
5480
|
hideNotActive: n.hideNotActive
|
|
5366
5481
|
},
|
|
5367
|
-
(c) =>
|
|
5482
|
+
(c) => D(c) || (Q(c) || ir(c)) && Y(c)
|
|
5368
5483
|
) : {};
|
|
5369
|
-
},
|
|
5484
|
+
}, Xe = (n) => {
|
|
5370
5485
|
const r = {};
|
|
5371
5486
|
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;
|
|
5372
5487
|
};
|
|
5373
|
-
class
|
|
5488
|
+
class is extends h {
|
|
5374
5489
|
/**
|
|
5375
5490
|
* Возвращает список клиентских цен на продукты в указанном диапазоне цены.
|
|
5376
5491
|
*
|
|
@@ -5384,10 +5499,10 @@ class ss extends h {
|
|
|
5384
5499
|
return this.get(
|
|
5385
5500
|
`/internal/price/products/${r}/analyze`,
|
|
5386
5501
|
{
|
|
5387
|
-
...
|
|
5502
|
+
...Xe(e),
|
|
5388
5503
|
filters: Ie(s)
|
|
5389
5504
|
},
|
|
5390
|
-
(i) => i.data.map((o) => new
|
|
5505
|
+
(i) => i.data.map((o) => new de(o))
|
|
5391
5506
|
);
|
|
5392
5507
|
}
|
|
5393
5508
|
/**
|
|
@@ -5403,10 +5518,10 @@ class ss extends h {
|
|
|
5403
5518
|
return this.get(
|
|
5404
5519
|
`/internal/price/categories/${r}/analyze`,
|
|
5405
5520
|
{
|
|
5406
|
-
...
|
|
5521
|
+
...Xe(e),
|
|
5407
5522
|
filters: Ie(s)
|
|
5408
5523
|
},
|
|
5409
|
-
(i) => i.data.map((o) => new
|
|
5524
|
+
(i) => i.data.map((o) => new de(o))
|
|
5410
5525
|
);
|
|
5411
5526
|
}
|
|
5412
5527
|
/**
|
|
@@ -5427,11 +5542,11 @@ class ss extends h {
|
|
|
5427
5542
|
...e,
|
|
5428
5543
|
filters: Ie(s)
|
|
5429
5544
|
},
|
|
5430
|
-
(i) => i.data.map((o) => new
|
|
5545
|
+
(i) => i.data.map((o) => new de(o))
|
|
5431
5546
|
);
|
|
5432
5547
|
}
|
|
5433
5548
|
}
|
|
5434
|
-
class
|
|
5549
|
+
class vt {
|
|
5435
5550
|
/**
|
|
5436
5551
|
* Инициализирует экземпляр класса {@link PriceHistoryItem}.
|
|
5437
5552
|
*
|
|
@@ -5478,10 +5593,10 @@ class Ct {
|
|
|
5478
5593
|
* @inheritDoc
|
|
5479
5594
|
*/
|
|
5480
5595
|
t(this, "currency");
|
|
5481
|
-
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate =
|
|
5596
|
+
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = a(r.costDate) ? C(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new 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 ae(r.currency) : void 0;
|
|
5482
5597
|
}
|
|
5483
5598
|
}
|
|
5484
|
-
class
|
|
5599
|
+
class Pt extends oe {
|
|
5485
5600
|
/**
|
|
5486
5601
|
* Инициализирует экземпляр класса {@link ProductPriceHistory}.
|
|
5487
5602
|
*
|
|
@@ -5493,10 +5608,10 @@ class vt extends ne {
|
|
|
5493
5608
|
* @inheritDoc
|
|
5494
5609
|
*/
|
|
5495
5610
|
t(this, "history");
|
|
5496
|
-
this.history =
|
|
5611
|
+
this.history = Pe(e.history, (s) => new vt(s));
|
|
5497
5612
|
}
|
|
5498
5613
|
}
|
|
5499
|
-
class
|
|
5614
|
+
class ns extends h {
|
|
5500
5615
|
/**
|
|
5501
5616
|
* Возвращает данные об истории изменения цен.
|
|
5502
5617
|
*
|
|
@@ -5505,22 +5620,22 @@ class is extends h {
|
|
|
5505
5620
|
* @see /docs/api#/operations/api_internal_price_history_get
|
|
5506
5621
|
*/
|
|
5507
5622
|
getProductPriceHistory(r) {
|
|
5508
|
-
var o, c,
|
|
5509
|
-
const e =
|
|
5510
|
-
|
|
5623
|
+
var o, c, u, p, f;
|
|
5624
|
+
const e = T.getConfig().dateFormats.api, s = sr(
|
|
5625
|
+
ye(r, {
|
|
5511
5626
|
costDate: {
|
|
5512
|
-
from:
|
|
5513
|
-
to:
|
|
5627
|
+
from: ke((o = r.costDate) == null ? void 0 : o.from) ? q(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
|
|
5628
|
+
to: ke((u = r.costDate) == null ? void 0 : u.to) ? q(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
|
|
5514
5629
|
}
|
|
5515
5630
|
}),
|
|
5516
|
-
(m) =>
|
|
5631
|
+
(m) => D(m) || (Q(m) || ir(m)) && Y(m)
|
|
5517
5632
|
), i = ((f = r.product) == null ? void 0 : f[0]) ?? 0;
|
|
5518
5633
|
return delete s.product, this.get(`/internal/price/products/${i}/history`, s).then((m) => [
|
|
5519
|
-
new
|
|
5634
|
+
new Pt(ye(m[0], { history: m }))
|
|
5520
5635
|
]);
|
|
5521
5636
|
}
|
|
5522
5637
|
}
|
|
5523
|
-
class
|
|
5638
|
+
class Ze {
|
|
5524
5639
|
/**
|
|
5525
5640
|
* Инициализирует экземпляр класса {@link RecommendationsList}.
|
|
5526
5641
|
*
|
|
@@ -5535,10 +5650,10 @@ class Ke {
|
|
|
5535
5650
|
* Список рекомендованных категорий продуктов.
|
|
5536
5651
|
*/
|
|
5537
5652
|
t(this, "productCategories", []);
|
|
5538
|
-
r != null && r.products && (this.products = r.products.map((e) => new
|
|
5653
|
+
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)));
|
|
5539
5654
|
}
|
|
5540
5655
|
}
|
|
5541
|
-
class
|
|
5656
|
+
class os extends h {
|
|
5542
5657
|
/**
|
|
5543
5658
|
* Возвращает данные о рекомендациях указанной категории продуктов.
|
|
5544
5659
|
*
|
|
@@ -5546,7 +5661,7 @@ class ns extends h {
|
|
|
5546
5661
|
* @see /docs/api#/operations/api_internal_recommendations_product_category_get
|
|
5547
5662
|
*/
|
|
5548
5663
|
getProductCategoryRecommendations(r) {
|
|
5549
|
-
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new
|
|
5664
|
+
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new Ze(e.data));
|
|
5550
5665
|
}
|
|
5551
5666
|
/**
|
|
5552
5667
|
* Возвращает данные о рекомендациях указанного продукта.
|
|
@@ -5555,7 +5670,7 @@ class ns extends h {
|
|
|
5555
5670
|
* @see /docs/api#/operations/api_internal_recommendations_product_get
|
|
5556
5671
|
*/
|
|
5557
5672
|
getProductRecommendations(r) {
|
|
5558
|
-
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new
|
|
5673
|
+
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new Ze(e.data));
|
|
5559
5674
|
}
|
|
5560
5675
|
/**
|
|
5561
5676
|
* Выполняет сохранение данных о рекомендуемых категориях продуктов.
|
|
@@ -5584,7 +5699,7 @@ class ns extends h {
|
|
|
5584
5699
|
});
|
|
5585
5700
|
}
|
|
5586
5701
|
}
|
|
5587
|
-
class
|
|
5702
|
+
class $ extends pe {
|
|
5588
5703
|
/**
|
|
5589
5704
|
* Возвращает {@link Promise} для получения данных указанного справочника.
|
|
5590
5705
|
*
|
|
@@ -5593,75 +5708,75 @@ class A extends pe {
|
|
|
5593
5708
|
* и использовать в случае аналогичных запросов.
|
|
5594
5709
|
*/
|
|
5595
5710
|
getReference(r, e = !1) {
|
|
5596
|
-
return this.getTypedDataArrayRequester(
|
|
5711
|
+
return this.getTypedDataArrayRequester(nt, `/internal/references/${r}`, e);
|
|
5597
5712
|
}
|
|
5598
5713
|
/**
|
|
5599
5714
|
* Возвращает {@link Promise} для получения справочника данных о канале
|
|
5600
5715
|
* первичного интереса.
|
|
5601
5716
|
*/
|
|
5602
5717
|
getChannelPrimaryInterest() {
|
|
5603
|
-
return this.getTypedDataArrayRequester(
|
|
5718
|
+
return this.getTypedDataArrayRequester(gr, "/internal/references/channel-primary-interest", !0);
|
|
5604
5719
|
}
|
|
5605
5720
|
/**
|
|
5606
5721
|
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
5607
5722
|
*/
|
|
5608
5723
|
getContactPositions() {
|
|
5609
|
-
return this.getTypedDataArrayRequester(
|
|
5724
|
+
return this.getTypedDataArrayRequester(ot, "/internal/references/contact-position", !0);
|
|
5610
5725
|
}
|
|
5611
5726
|
/**
|
|
5612
5727
|
* Возвращает {@link Promise} для получения справочника списка валют.
|
|
5613
5728
|
*/
|
|
5614
5729
|
getCurrency() {
|
|
5615
|
-
return this.getTypedDataArrayRequester(
|
|
5730
|
+
return this.getTypedDataArrayRequester(ae, "/public/references/currency", !0);
|
|
5616
5731
|
}
|
|
5617
5732
|
/**
|
|
5618
5733
|
* Возвращает {@link Promise} для получения справочника данных
|
|
5619
5734
|
* групп партнеров (направлений деятельности).
|
|
5620
5735
|
*/
|
|
5621
5736
|
getPartnerGroup() {
|
|
5622
|
-
return this.getTypedDataArrayRequester(
|
|
5737
|
+
return this.getTypedDataArrayRequester(re, "/internal/references/partner-group", !0);
|
|
5623
5738
|
}
|
|
5624
5739
|
/**
|
|
5625
5740
|
* Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
|
|
5626
5741
|
*/
|
|
5627
5742
|
getOpf() {
|
|
5628
|
-
return this.getTypedDataArrayRequester(
|
|
5743
|
+
return this.getTypedDataArrayRequester(j, "/public/references/opf", !0);
|
|
5629
5744
|
}
|
|
5630
5745
|
/**
|
|
5631
5746
|
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
5632
5747
|
*/
|
|
5633
5748
|
getOrderPaymentStatuses() {
|
|
5634
|
-
return this.getTypedDataArrayRequester(
|
|
5749
|
+
return this.getTypedDataArrayRequester(ct, "/public/references/order-payment-status", !0);
|
|
5635
5750
|
}
|
|
5636
5751
|
/**
|
|
5637
5752
|
* Возвращает {@link Promise} для получения справочника данных статусов заказов.
|
|
5638
5753
|
*/
|
|
5639
5754
|
getOrderStatuses() {
|
|
5640
|
-
return this.getTypedDataArrayRequester(
|
|
5755
|
+
return this.getTypedDataArrayRequester(lt, "/public/references/order-status", !0);
|
|
5641
5756
|
}
|
|
5642
5757
|
/**
|
|
5643
5758
|
* Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
|
|
5644
5759
|
*/
|
|
5645
5760
|
getPaymentTypes() {
|
|
5646
|
-
return this.getTypedDataArrayRequester(
|
|
5761
|
+
return this.getTypedDataArrayRequester(ut, "/public/references/payment-type", !0);
|
|
5647
5762
|
}
|
|
5648
5763
|
/**
|
|
5649
5764
|
* Возвращает {@link Promise} для получения справочника типов ресурсов.
|
|
5650
5765
|
*/
|
|
5651
5766
|
getResourceTypes() {
|
|
5652
|
-
return this.getTypedDataArrayRequester(
|
|
5767
|
+
return this.getTypedDataArrayRequester(mr, "/internal/references/resource-type", !0);
|
|
5653
5768
|
}
|
|
5654
5769
|
/**
|
|
5655
5770
|
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
5656
5771
|
*/
|
|
5657
5772
|
getSalesDirections() {
|
|
5658
|
-
return this.getTypedDataArrayRequester(
|
|
5773
|
+
return this.getTypedDataArrayRequester(N, "/public/references/sales-direction", !0);
|
|
5659
5774
|
}
|
|
5660
5775
|
/**
|
|
5661
5776
|
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
5662
5777
|
*/
|
|
5663
5778
|
getSourcePrimaryInterest() {
|
|
5664
|
-
return this.getTypedDataArrayRequester(
|
|
5779
|
+
return this.getTypedDataArrayRequester(fr, "/internal/references/source-primary-interest", !0);
|
|
5665
5780
|
}
|
|
5666
5781
|
/**
|
|
5667
5782
|
* Выполняет поиск данных о городах по терму в названии.
|
|
@@ -5669,7 +5784,7 @@ class A extends pe {
|
|
|
5669
5784
|
* @param term Терм поиска.
|
|
5670
5785
|
*/
|
|
5671
5786
|
searchCity(r) {
|
|
5672
|
-
return this.getTypedDataArrayRequester(
|
|
5787
|
+
return this.getTypedDataArrayRequester(Me, `/internal/references/city-with-region-and-country/search?term=${r}`);
|
|
5673
5788
|
}
|
|
5674
5789
|
/**
|
|
5675
5790
|
* Выполняет поиск данных о регионах по терму в названии.
|
|
@@ -5677,7 +5792,7 @@ class A extends pe {
|
|
|
5677
5792
|
* @param term Терм поиска.
|
|
5678
5793
|
*/
|
|
5679
5794
|
searchRegion(r) {
|
|
5680
|
-
return this.getTypedDataArrayRequester(
|
|
5795
|
+
return this.getTypedDataArrayRequester(le, `/internal/references/region-with-country/search?term=${r}`);
|
|
5681
5796
|
}
|
|
5682
5797
|
/**
|
|
5683
5798
|
* Выполняет поиск данных о странах по терму в названии.
|
|
@@ -5685,25 +5800,25 @@ class A extends pe {
|
|
|
5685
5800
|
* @param term Терм поиска.
|
|
5686
5801
|
*/
|
|
5687
5802
|
searchCountry(r) {
|
|
5688
|
-
return this.getTypedDataArrayRequester(
|
|
5803
|
+
return this.getTypedDataArrayRequester(ee, `/internal/references/country/search?term=${r}`);
|
|
5689
5804
|
}
|
|
5690
5805
|
/**
|
|
5691
5806
|
* Возвращает {@link Promise} для получения справочника типов доставки.
|
|
5692
5807
|
*/
|
|
5693
5808
|
getDeliveryTypes() {
|
|
5694
|
-
return this.getTypedDataArrayRequester(
|
|
5809
|
+
return this.getTypedDataArrayRequester(X, "/internal/references/delivery-type", !0);
|
|
5695
5810
|
}
|
|
5696
5811
|
/**
|
|
5697
5812
|
* Возвращает {@link Promise} для получения справочника складов.
|
|
5698
5813
|
*/
|
|
5699
5814
|
getWarehouses() {
|
|
5700
|
-
return this.getTypedDataArrayRequester(
|
|
5815
|
+
return this.getTypedDataArrayRequester(De, "/public/references/warehouse", !0);
|
|
5701
5816
|
}
|
|
5702
5817
|
/**
|
|
5703
5818
|
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
5704
5819
|
*/
|
|
5705
5820
|
getPropertyTypes() {
|
|
5706
|
-
return this.getTypedDataArrayRequester(
|
|
5821
|
+
return this.getTypedDataArrayRequester(hr, "/internal/references/property-type", !0);
|
|
5707
5822
|
}
|
|
5708
5823
|
/**
|
|
5709
5824
|
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
@@ -5715,11 +5830,11 @@ class A extends pe {
|
|
|
5715
5830
|
* Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
|
|
5716
5831
|
*/
|
|
5717
5832
|
getProductFileType() {
|
|
5718
|
-
return this.getTypedDataArrayRequester(
|
|
5833
|
+
return this.getTypedDataArrayRequester(pt, "/public/references/product-file-type", !0);
|
|
5719
5834
|
}
|
|
5720
5835
|
}
|
|
5721
|
-
const
|
|
5722
|
-
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),
|
|
5836
|
+
const R = te("__references_private", () => {
|
|
5837
|
+
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), d = y(void 0), I = y(void 0), S = y(void 0), _ = y(void 0), U = y(void 0), l = y(void 0);
|
|
5723
5838
|
return {
|
|
5724
5839
|
/**
|
|
5725
5840
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -5752,11 +5867,11 @@ const a = Z("__references_private", () => {
|
|
|
5752
5867
|
/**
|
|
5753
5868
|
* Справочник статусов оплаты заказа.
|
|
5754
5869
|
*/
|
|
5755
|
-
orderPaymentStatusReference:
|
|
5870
|
+
orderPaymentStatusReference: u,
|
|
5756
5871
|
/**
|
|
5757
5872
|
* Справочник статусов заказов.
|
|
5758
5873
|
*/
|
|
5759
|
-
orderStatusReference:
|
|
5874
|
+
orderStatusReference: p,
|
|
5760
5875
|
/**
|
|
5761
5876
|
* Справочник типов оплаты заказов.
|
|
5762
5877
|
*/
|
|
@@ -5768,23 +5883,23 @@ const a = Z("__references_private", () => {
|
|
|
5768
5883
|
/**
|
|
5769
5884
|
* Справочник типов файлов продукктов/категорий.
|
|
5770
5885
|
*/
|
|
5771
|
-
productFileTypeReference:
|
|
5886
|
+
productFileTypeReference: A,
|
|
5772
5887
|
/**
|
|
5773
5888
|
* Справочник типов ресурсов.
|
|
5774
5889
|
*/
|
|
5775
|
-
resourceTypesReference:
|
|
5890
|
+
resourceTypesReference: d,
|
|
5776
5891
|
/**
|
|
5777
5892
|
* Справочник направлений продаж.
|
|
5778
5893
|
*/
|
|
5779
|
-
salesDirectionsReference:
|
|
5894
|
+
salesDirectionsReference: I,
|
|
5780
5895
|
/**
|
|
5781
5896
|
* Справочник источников первичного интереса.
|
|
5782
5897
|
*/
|
|
5783
|
-
sourcePrimaryInterestReference:
|
|
5898
|
+
sourcePrimaryInterestReference: S,
|
|
5784
5899
|
/**
|
|
5785
5900
|
* Справочник складов.
|
|
5786
5901
|
*/
|
|
5787
|
-
warehousesReference:
|
|
5902
|
+
warehousesReference: _,
|
|
5788
5903
|
/**
|
|
5789
5904
|
* Справочник типов свойств.
|
|
5790
5905
|
*/
|
|
@@ -5794,92 +5909,92 @@ const a = Z("__references_private", () => {
|
|
|
5794
5909
|
*/
|
|
5795
5910
|
priceCoefficientsReference: l
|
|
5796
5911
|
};
|
|
5797
|
-
}),
|
|
5798
|
-
const n =
|
|
5799
|
-
const l =
|
|
5800
|
-
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(
|
|
5912
|
+
}), cs = te("references", () => {
|
|
5913
|
+
const n = P(() => {
|
|
5914
|
+
const l = R();
|
|
5915
|
+
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance($).getChannelPrimaryInterest().then((g) => {
|
|
5801
5916
|
l.channelPrimaryInterestReference = g;
|
|
5802
|
-
}).catch(
|
|
5803
|
-
}), r =
|
|
5804
|
-
const l =
|
|
5805
|
-
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(
|
|
5917
|
+
}).catch(w)), l.channelPrimaryInterestReference;
|
|
5918
|
+
}), r = P(() => {
|
|
5919
|
+
const l = R();
|
|
5920
|
+
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance($).getContactPositions().then((g) => {
|
|
5806
5921
|
l.contactPositionsReference = g;
|
|
5807
|
-
}).catch(
|
|
5808
|
-
}), e =
|
|
5809
|
-
const l =
|
|
5810
|
-
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(
|
|
5922
|
+
}).catch(w)), l.contactPositionsReference;
|
|
5923
|
+
}), e = P(() => {
|
|
5924
|
+
const l = R();
|
|
5925
|
+
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance($).getCurrency().then((g) => {
|
|
5811
5926
|
l.currencyReference = g;
|
|
5812
|
-
}).catch(
|
|
5813
|
-
}), s =
|
|
5814
|
-
const l =
|
|
5815
|
-
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(
|
|
5927
|
+
}).catch(w)), l.currencyReference;
|
|
5928
|
+
}), s = P(() => {
|
|
5929
|
+
const l = R();
|
|
5930
|
+
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance($).getOpf().then((g) => {
|
|
5816
5931
|
l.opfReference = g;
|
|
5817
|
-
}).catch(
|
|
5818
|
-
}), i =
|
|
5819
|
-
const l =
|
|
5820
|
-
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(
|
|
5932
|
+
}).catch(w)), l.opfReference;
|
|
5933
|
+
}), i = P(() => {
|
|
5934
|
+
const l = R();
|
|
5935
|
+
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance($).getOrderPaymentStatuses().then((g) => {
|
|
5821
5936
|
l.orderPaymentStatusReference = g;
|
|
5822
|
-
}).catch(
|
|
5823
|
-
}), o =
|
|
5824
|
-
const l =
|
|
5825
|
-
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(
|
|
5937
|
+
}).catch(w)), l.orderPaymentStatusReference;
|
|
5938
|
+
}), o = P(() => {
|
|
5939
|
+
const l = R();
|
|
5940
|
+
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance($).getOrderStatuses().then((g) => {
|
|
5826
5941
|
l.orderStatusReference = g;
|
|
5827
|
-
}).catch(
|
|
5828
|
-
}), c =
|
|
5829
|
-
const l =
|
|
5830
|
-
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(
|
|
5942
|
+
}).catch(w)), l.orderStatusReference;
|
|
5943
|
+
}), c = P(() => {
|
|
5944
|
+
const l = R();
|
|
5945
|
+
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance($).getPaymentTypes().then((g) => {
|
|
5831
5946
|
l.paymentTypeReference = g;
|
|
5832
|
-
}).catch(
|
|
5833
|
-
}),
|
|
5834
|
-
const l =
|
|
5835
|
-
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(
|
|
5947
|
+
}).catch(w)), l.paymentTypeReference;
|
|
5948
|
+
}), u = P(() => {
|
|
5949
|
+
const l = R();
|
|
5950
|
+
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance($).getPartnerGroup().then((g) => {
|
|
5836
5951
|
l.partnerGroupReference = g;
|
|
5837
|
-
}).catch(
|
|
5838
|
-
}),
|
|
5839
|
-
const l =
|
|
5840
|
-
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(
|
|
5952
|
+
}).catch(w)), l.partnerGroupReference;
|
|
5953
|
+
}), p = P(() => {
|
|
5954
|
+
const l = R();
|
|
5955
|
+
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance($).getProductFileType().then((g) => {
|
|
5841
5956
|
l.productFileTypeReference = g;
|
|
5842
|
-
}).catch(
|
|
5843
|
-
}), f =
|
|
5844
|
-
const l =
|
|
5845
|
-
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(
|
|
5957
|
+
}).catch(w)), l.productFileTypeReference;
|
|
5958
|
+
}), f = P(() => {
|
|
5959
|
+
const l = R();
|
|
5960
|
+
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance($).getResourceTypes().then((g) => {
|
|
5846
5961
|
l.resourceTypesReference = g;
|
|
5847
|
-
}).catch(
|
|
5848
|
-
}), m =
|
|
5849
|
-
const l =
|
|
5850
|
-
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(
|
|
5962
|
+
}).catch(w)), l.resourceTypesReference;
|
|
5963
|
+
}), m = P(() => {
|
|
5964
|
+
const l = R();
|
|
5965
|
+
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance($).getSalesDirections().then((g) => {
|
|
5851
5966
|
l.salesDirectionsReference = g;
|
|
5852
|
-
}).catch(
|
|
5853
|
-
}),
|
|
5854
|
-
const l =
|
|
5855
|
-
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(
|
|
5967
|
+
}).catch(w)), l.salesDirectionsReference;
|
|
5968
|
+
}), A = P(() => {
|
|
5969
|
+
const l = R();
|
|
5970
|
+
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance($).getSourcePrimaryInterest().then((g) => {
|
|
5856
5971
|
l.sourcePrimaryInterestReference = g;
|
|
5857
|
-
}).catch(
|
|
5858
|
-
}),
|
|
5859
|
-
const l =
|
|
5860
|
-
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(
|
|
5972
|
+
}).catch(w)), l.sourcePrimaryInterestReference;
|
|
5973
|
+
}), d = P(() => {
|
|
5974
|
+
const l = R();
|
|
5975
|
+
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance($).getDeliveryTypes().then((g) => {
|
|
5861
5976
|
l.deliveryTypeReference = g;
|
|
5862
|
-
}).catch(
|
|
5863
|
-
}),
|
|
5864
|
-
const l =
|
|
5865
|
-
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(
|
|
5977
|
+
}).catch(w)), l.deliveryTypeReference;
|
|
5978
|
+
}), I = P(() => {
|
|
5979
|
+
const l = R();
|
|
5980
|
+
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(wt).getManagers().then((g) => {
|
|
5866
5981
|
l.managersList = g;
|
|
5867
|
-
}).catch(
|
|
5868
|
-
}),
|
|
5869
|
-
const l =
|
|
5870
|
-
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(
|
|
5982
|
+
}).catch(w)), l.managersList;
|
|
5983
|
+
}), S = P(() => {
|
|
5984
|
+
const l = R();
|
|
5985
|
+
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance($).getWarehouses().then((g) => {
|
|
5871
5986
|
l.warehousesReference = g;
|
|
5872
|
-
}).catch(
|
|
5873
|
-
}),
|
|
5874
|
-
const l =
|
|
5875
|
-
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(
|
|
5987
|
+
}).catch(w)), l.warehousesReference;
|
|
5988
|
+
}), _ = P(() => {
|
|
5989
|
+
const l = R();
|
|
5990
|
+
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance($).getPropertyTypes().then((g) => {
|
|
5876
5991
|
l.propertyTypesReference = g;
|
|
5877
|
-
}).catch(
|
|
5878
|
-
}), U =
|
|
5879
|
-
const l =
|
|
5880
|
-
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(
|
|
5992
|
+
}).catch(w)), l.propertyTypesReference;
|
|
5993
|
+
}), U = P(() => {
|
|
5994
|
+
const l = R();
|
|
5995
|
+
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance($).getPriceCoefficients().then((g) => {
|
|
5881
5996
|
l.priceCoefficientsReference = g;
|
|
5882
|
-
}).catch(
|
|
5997
|
+
}).catch(w)), l.priceCoefficientsReference;
|
|
5883
5998
|
});
|
|
5884
5999
|
return {
|
|
5885
6000
|
/**
|
|
@@ -5913,11 +6028,11 @@ const a = Z("__references_private", () => {
|
|
|
5913
6028
|
/**
|
|
5914
6029
|
* Справочник групп партнеров.
|
|
5915
6030
|
*/
|
|
5916
|
-
partnerGroupsReference:
|
|
6031
|
+
partnerGroupsReference: u,
|
|
5917
6032
|
/**
|
|
5918
6033
|
* Справочник типов файлов продуктов/категорий.
|
|
5919
6034
|
*/
|
|
5920
|
-
productFilesTypesReference:
|
|
6035
|
+
productFilesTypesReference: p,
|
|
5921
6036
|
/**
|
|
5922
6037
|
* Справочник типов ресурсов.
|
|
5923
6038
|
*/
|
|
@@ -5929,30 +6044,30 @@ const a = Z("__references_private", () => {
|
|
|
5929
6044
|
/**
|
|
5930
6045
|
* Справочник каналов первичного интереса.
|
|
5931
6046
|
*/
|
|
5932
|
-
sourcePrimaryInterestsReference:
|
|
6047
|
+
sourcePrimaryInterestsReference: A,
|
|
5933
6048
|
/**
|
|
5934
6049
|
* Справочник типов доставки.
|
|
5935
6050
|
*/
|
|
5936
|
-
deliveryTypeReference:
|
|
6051
|
+
deliveryTypeReference: d,
|
|
5937
6052
|
/**
|
|
5938
6053
|
* Список менеджеров.
|
|
5939
6054
|
*/
|
|
5940
|
-
managersList:
|
|
6055
|
+
managersList: I,
|
|
5941
6056
|
/**
|
|
5942
6057
|
* Справочник складов.
|
|
5943
6058
|
*/
|
|
5944
|
-
warehousesReference:
|
|
6059
|
+
warehousesReference: S,
|
|
5945
6060
|
/**
|
|
5946
6061
|
* Справочник типов свойств.
|
|
5947
6062
|
*/
|
|
5948
|
-
propertyTypesReference:
|
|
6063
|
+
propertyTypesReference: _,
|
|
5949
6064
|
/**
|
|
5950
6065
|
* Справочник коэффициентов цен.
|
|
5951
6066
|
*/
|
|
5952
6067
|
priceCoefficientsReference: U
|
|
5953
6068
|
};
|
|
5954
6069
|
});
|
|
5955
|
-
class
|
|
6070
|
+
class Rt {
|
|
5956
6071
|
/**
|
|
5957
6072
|
* Инициализирует экземпляр класса {@link MetaTagItem}.
|
|
5958
6073
|
*
|
|
@@ -5970,7 +6085,7 @@ class Pt {
|
|
|
5970
6085
|
this.name = r.name, this.content = r.content;
|
|
5971
6086
|
}
|
|
5972
6087
|
}
|
|
5973
|
-
class
|
|
6088
|
+
class er {
|
|
5974
6089
|
/**
|
|
5975
6090
|
* Инициализирует экземпляр класса {@link Seo}.
|
|
5976
6091
|
*
|
|
@@ -6006,10 +6121,10 @@ class Qe {
|
|
|
6006
6121
|
*/
|
|
6007
6122
|
t(this, "meta");
|
|
6008
6123
|
var e;
|
|
6009
|
-
this.resourceType = new
|
|
6124
|
+
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))) ?? [];
|
|
6010
6125
|
}
|
|
6011
6126
|
}
|
|
6012
|
-
class
|
|
6127
|
+
class ls extends h {
|
|
6013
6128
|
/**
|
|
6014
6129
|
* Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
|
|
6015
6130
|
*
|
|
@@ -6017,7 +6132,7 @@ class cs extends h {
|
|
|
6017
6132
|
* @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
|
|
6018
6133
|
*/
|
|
6019
6134
|
getResourceSeoData(r, e) {
|
|
6020
|
-
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new
|
|
6135
|
+
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new er(s.data));
|
|
6021
6136
|
}
|
|
6022
6137
|
/**
|
|
6023
6138
|
* Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
|
|
@@ -6028,7 +6143,7 @@ class cs extends h {
|
|
|
6028
6143
|
* в случае ошибок в запросах.
|
|
6029
6144
|
*/
|
|
6030
6145
|
saveResourceSeoData(r, e = {}) {
|
|
6031
|
-
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new
|
|
6146
|
+
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new er(s.data), e);
|
|
6032
6147
|
}
|
|
6033
6148
|
/**
|
|
6034
6149
|
* Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
|
|
@@ -6040,7 +6155,7 @@ class cs extends h {
|
|
|
6040
6155
|
return this.delete(`/internal/seo/${r.slug}/${e}`);
|
|
6041
6156
|
}
|
|
6042
6157
|
}
|
|
6043
|
-
class
|
|
6158
|
+
class us extends h {
|
|
6044
6159
|
/**
|
|
6045
6160
|
* Возвращает подсказки по адресам.
|
|
6046
6161
|
*
|
|
@@ -6087,8 +6202,8 @@ class ls extends h {
|
|
|
6087
6202
|
});
|
|
6088
6203
|
}
|
|
6089
6204
|
}
|
|
6090
|
-
var
|
|
6091
|
-
class
|
|
6205
|
+
var Dt = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(Dt || {});
|
|
6206
|
+
class At extends pr {
|
|
6092
6207
|
/**
|
|
6093
6208
|
* Инициализирует экземпляр класса {@link User}.
|
|
6094
6209
|
*
|
|
@@ -6116,7 +6231,7 @@ class ps extends h {
|
|
|
6116
6231
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
6117
6232
|
*/
|
|
6118
6233
|
constructor() {
|
|
6119
|
-
super(), this.baseUrl = `${
|
|
6234
|
+
super(), this.baseUrl = `${T.getConfig().http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
|
|
6120
6235
|
}
|
|
6121
6236
|
/**
|
|
6122
6237
|
* Функция для получения обновленных токенов доступа.
|
|
@@ -6127,16 +6242,16 @@ class ps extends h {
|
|
|
6127
6242
|
return this.get("internal/users/current-tokens").then((r) => r.accessToken);
|
|
6128
6243
|
}
|
|
6129
6244
|
}
|
|
6130
|
-
class
|
|
6245
|
+
class $t extends h {
|
|
6131
6246
|
/**
|
|
6132
6247
|
* Возвращает данные о текущем пользователе.
|
|
6133
6248
|
*/
|
|
6134
6249
|
// eslint-disable-next-line class-methods-use-this
|
|
6135
6250
|
getCurrentUser() {
|
|
6136
|
-
return this.get("/internal/users/info", {}, (r) => new
|
|
6251
|
+
return this.get("/internal/users/info", {}, (r) => new At(r.data));
|
|
6137
6252
|
}
|
|
6138
6253
|
}
|
|
6139
|
-
const
|
|
6254
|
+
const Tt = te("__user_state_private", () => {
|
|
6140
6255
|
const n = y({}), r = y(void 0);
|
|
6141
6256
|
return {
|
|
6142
6257
|
/**
|
|
@@ -6148,20 +6263,20 @@ const Dt = Z("__user_state_private", () => {
|
|
|
6148
6263
|
*/
|
|
6149
6264
|
currentUser: r
|
|
6150
6265
|
};
|
|
6151
|
-
}),
|
|
6266
|
+
}), hs = te("user_state", () => ({
|
|
6152
6267
|
/**
|
|
6153
6268
|
* Данные о текущем пользователе.
|
|
6154
6269
|
*/
|
|
6155
|
-
currentUser:
|
|
6156
|
-
const r =
|
|
6157
|
-
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(
|
|
6270
|
+
currentUser: P(() => {
|
|
6271
|
+
const r = Tt();
|
|
6272
|
+
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance($t).getCurrentUser().then((e) => {
|
|
6158
6273
|
r.currentUser = e;
|
|
6159
|
-
}).catch(
|
|
6274
|
+
}).catch(w).finally(() => {
|
|
6160
6275
|
r.dataLoaderList.currentUser = !1;
|
|
6161
6276
|
})), r.currentUser;
|
|
6162
6277
|
})
|
|
6163
6278
|
}));
|
|
6164
|
-
class
|
|
6279
|
+
class gs {
|
|
6165
6280
|
/**
|
|
6166
6281
|
* Инициализирует экземпляр класса {@link FieldValidationResultData}.
|
|
6167
6282
|
*
|
|
@@ -6185,150 +6300,150 @@ class hs {
|
|
|
6185
6300
|
}
|
|
6186
6301
|
}
|
|
6187
6302
|
export {
|
|
6188
|
-
|
|
6189
|
-
|
|
6190
|
-
|
|
6191
|
-
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
|
|
6201
|
-
|
|
6202
|
-
|
|
6303
|
+
nt as AnyReference,
|
|
6304
|
+
Ut as AppBaseConfig,
|
|
6305
|
+
T as AppConfigProvider,
|
|
6306
|
+
Ne as BankAccount,
|
|
6307
|
+
$e as BasePaginationProvider,
|
|
6308
|
+
Wr as CalculationTypeEnum,
|
|
6309
|
+
me as Cart,
|
|
6310
|
+
Er as CartItem,
|
|
6311
|
+
zr as CartItemBase,
|
|
6312
|
+
Ot as CartProvider,
|
|
6313
|
+
Gt as CatalogProvider,
|
|
6314
|
+
nr as CatalogableItem,
|
|
6315
|
+
E as Category,
|
|
6316
|
+
We as CategoryPricingRule,
|
|
6317
|
+
gr as ChannelPrimaryInterest,
|
|
6203
6318
|
Vt as City,
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
|
|
6223
|
-
|
|
6319
|
+
Me as CityWithRegionAndCountry,
|
|
6320
|
+
Qe as Client,
|
|
6321
|
+
ft as ClientAdditionalData,
|
|
6322
|
+
we as ClientCategory,
|
|
6323
|
+
Xt as ClientDataProvider,
|
|
6324
|
+
Ft as ClientPriceProvider,
|
|
6325
|
+
jt as ClientPriceTemplateProvider,
|
|
6326
|
+
Z as ClientProduct,
|
|
6327
|
+
Bt as ClientProductCategoryDataProvider,
|
|
6328
|
+
zt as ClientProductDataProvider,
|
|
6329
|
+
ge as ClientShortInfo,
|
|
6330
|
+
it as ClientsAdditionalDataRequestTypeEnum,
|
|
6331
|
+
Kt as ClientsListFilters,
|
|
6332
|
+
oe as CodedIdentity,
|
|
6333
|
+
es as ConfiguratorProvider,
|
|
6334
|
+
Oe as Contact,
|
|
6335
|
+
Qr as ContactLinks,
|
|
6336
|
+
M as ContactPerson,
|
|
6337
|
+
mt as ContactPersonRelated,
|
|
6338
|
+
ot as ContactPosition,
|
|
6224
6339
|
_e as ContactRelation,
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6340
|
+
yr as ContragentBase,
|
|
6341
|
+
Ce as ContragentFactory,
|
|
6342
|
+
wr as ContragentIc,
|
|
6343
|
+
ht as ContragentPerson,
|
|
6344
|
+
gt as ContragentUlNr,
|
|
6345
|
+
ar as ContragentUlR,
|
|
6346
|
+
je as CostSourceEnum,
|
|
6347
|
+
ee as Country,
|
|
6348
|
+
ae as Currency,
|
|
6349
|
+
us as DataSuggestionProvider,
|
|
6350
|
+
Qt as DataTablePagination,
|
|
6351
|
+
yt as DataTablePaginationRequestParams,
|
|
6352
|
+
Yt as DataTableSortRequestParams,
|
|
6353
|
+
rs as DateTimeProvider,
|
|
6354
|
+
Vr as DeletableNamedIdentity,
|
|
6355
|
+
ve as DeliveryAddress,
|
|
6356
|
+
X as DeliveryType,
|
|
6357
|
+
Nt as DetailedJwtPayload,
|
|
6358
|
+
Zr as DeviceTypeResolutionConfig,
|
|
6359
|
+
Kr as DiscountShortInfo,
|
|
6360
|
+
gs as FieldValidationResultData,
|
|
6361
|
+
ue as FilterGroup,
|
|
6362
|
+
Je as FilterItem,
|
|
6363
|
+
He as FilterOpEnum,
|
|
6364
|
+
cr as GeoCoordinates,
|
|
6365
|
+
Hr as HiddenCatalogableItem,
|
|
6251
6366
|
pe as HttpCachedRequester,
|
|
6252
|
-
|
|
6367
|
+
et as HttpParamsConfig,
|
|
6253
6368
|
h as HttpRequester,
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6369
|
+
H as Identity,
|
|
6370
|
+
Br as Image,
|
|
6371
|
+
G as JwtPayload,
|
|
6257
6372
|
Ae as Manager,
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6373
|
+
ce as ManagerCommon,
|
|
6374
|
+
ts as ManagerDataFactory,
|
|
6375
|
+
wt as ManagerDataProvider,
|
|
6376
|
+
Rt as MetaTagItem,
|
|
6377
|
+
b as NamedIdentity,
|
|
6378
|
+
j as Opf,
|
|
6379
|
+
k as OpfEnum,
|
|
6380
|
+
Ct as Order,
|
|
6381
|
+
vr as OrderInfo,
|
|
6382
|
+
ct as OrderPaymentStatus,
|
|
6383
|
+
at as OrderProduct,
|
|
6384
|
+
Cr as OrderShortInfo,
|
|
6385
|
+
lt as OrderStatus,
|
|
6386
|
+
ss as OrdersDataProvider,
|
|
6387
|
+
re as PartnerGroup,
|
|
6388
|
+
ut as PaymentType,
|
|
6389
|
+
fe as PreferencesStorageProvider,
|
|
6390
|
+
de as PriceAnalyze,
|
|
6391
|
+
is as PriceAnalyzeProvider,
|
|
6277
6392
|
Re as PriceCoefficient,
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6393
|
+
or as PriceCoefficientEnum,
|
|
6394
|
+
ns as PriceHistoryDataProvider,
|
|
6395
|
+
vt as PriceHistoryItem,
|
|
6396
|
+
W as PriceTemplate,
|
|
6397
|
+
be as PriceTemplateCategory,
|
|
6398
|
+
se as PriceTemplateClient,
|
|
6399
|
+
ur as PriceTemplateICatalogableItem,
|
|
6400
|
+
Se as PriceTemplateProduct,
|
|
6401
|
+
Et as PriceTemplateProvider,
|
|
6402
|
+
ne as PricingRole,
|
|
6288
6403
|
Wt as PricingRoleProvider,
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6404
|
+
xe as PrimaryCatalogableItem,
|
|
6405
|
+
x as Product,
|
|
6406
|
+
Mt as ProductCategoryDataProvider,
|
|
6407
|
+
Ht as ProductDataProvider,
|
|
6408
|
+
pt as ProductFileType,
|
|
6409
|
+
Ge as ProductPriceCoefficient,
|
|
6410
|
+
Pt as ProductPriceHistory,
|
|
6411
|
+
Jt as PropertiesProvider,
|
|
6412
|
+
ie as Property,
|
|
6413
|
+
hr as PropertyType,
|
|
6414
|
+
Jr as PropertyTypeEnum,
|
|
6415
|
+
z as PropertyValue,
|
|
6416
|
+
os as RecommendationsDataProvider,
|
|
6417
|
+
Ze as RecommendationsList,
|
|
6418
|
+
v as Reference,
|
|
6419
|
+
$ as ReferenceDataProvider,
|
|
6420
|
+
le as Region,
|
|
6421
|
+
mr as ResourceType,
|
|
6422
|
+
N as SalesDirection,
|
|
6423
|
+
rt as SentryConfig,
|
|
6424
|
+
er as Seo,
|
|
6425
|
+
ls as SeoDataProvider,
|
|
6426
|
+
fr as SourcePrimaryInterest,
|
|
6427
|
+
Mr as StockCount,
|
|
6428
|
+
qt as TemplatesListFilters,
|
|
6429
|
+
Fe as TypedInstanceFactory,
|
|
6430
|
+
Ye as UnitsHelper,
|
|
6431
|
+
Zt as UnknownClientDataProvider,
|
|
6432
|
+
lr as UpdatableNamedIdentity,
|
|
6433
|
+
At as User,
|
|
6319
6434
|
ps as UserAuthDataProvider,
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6435
|
+
pr as UserCommonInfo,
|
|
6436
|
+
$t as UserDataProvider,
|
|
6437
|
+
Yr as UserPricingRole,
|
|
6438
|
+
F as UserShortInfo,
|
|
6439
|
+
Dt as UserTypeEnum,
|
|
6440
|
+
tt as VersionConfig,
|
|
6441
|
+
De as Warehouse,
|
|
6442
|
+
st as WebSocketConfig,
|
|
6443
|
+
Ve as findCatalogItemByIdRecursive,
|
|
6444
|
+
Ke as flattenCatalogItems,
|
|
6445
|
+
Te as useAuthStateStore,
|
|
6446
|
+
cs as useReferencesStore,
|
|
6447
|
+
hs as useUserStateStore
|
|
6333
6448
|
};
|
|
6334
6449
|
//# sourceMappingURL=sc-common-lib.js.map
|