@snabcentr/common-lib 2.0.0 → 2.0.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 +8 -2
- package/dist/sc-common-lib.js +828 -713
- 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/http/classes/http-requester.d.ts +1 -1
- package/dist/src/http/classes/http-requester.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 Oe, isUndefined as Ar, isNil as A, isEmpty as Y, noop as y, mapValues as tr, isArray as Q, every as Dr, split as $r, toUpper as Tr, constant as br, isString as w, cloneDeep as Sr, toLower as _r, isFunction as Ue, map as he, forEach as dr, isDate as Ie, omitBy as sr, isObject as ir } from "lodash-es";
|
|
6
|
+
import { objectToCamel as qe, objectToSnake as Be } from "ts-case-convert";
|
|
7
|
+
import { isAfter as ze, parseISO as a, startOfToday as ke, format as U, addSeconds as Ir, addBusinessDays as kr, endOfTomorrow as Lr, startOfTomorrow as xr, endOfYesterday as Nr, startOfYesterday as Or, endOfToday as Ur, endOfDay as qr, startOfDay as Gr } from "date-fns";
|
|
8
|
+
import { defineStore as te } from "pinia";
|
|
9
|
+
import { ref as f, 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
|
+
Oe(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(qe(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
|
+
Oe(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(qe(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 (Ar(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 D = J;
|
|
194
|
+
class ye {
|
|
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(a(s.availableFor) || ke(), /* @__PURE__ */ new Date())) {
|
|
214
|
+
if (A(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 (A(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(a(o.availableFor) || ke(), /* @__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 = f(
|
|
313
|
+
(() => {
|
|
314
|
+
var p;
|
|
315
|
+
const o = ye.getActualDataFromStorage(
|
|
316
|
+
"sc.token"
|
|
317
|
+
/* JwtToken */
|
|
318
|
+
);
|
|
319
|
+
if (o)
|
|
320
|
+
return Promise.resolve(o);
|
|
321
|
+
const c = (p = D.getConfig().devMode) == null ? void 0 : p.initAuthBearerToken;
|
|
322
|
+
return c ? Promise.resolve(c) : void 0;
|
|
323
|
+
})()
|
|
324
|
+
), r = f(void 0), e = f(void 0), s = Fr(/* @__PURE__ */ new Map());
|
|
325
|
+
function i() {
|
|
326
|
+
e.value = void 0, A(n.value) || n.value.then((o) => {
|
|
327
|
+
const c = G.getJwtPayload(o);
|
|
328
|
+
e.value = c.exp * 1e3 > Date.now() ? tr(c.resourceAccess, (p) => (p == null ? void 0 : p.roles) ?? []) : void 0;
|
|
329
|
+
}).catch(y);
|
|
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
|
+
}), $e = te("__auth_state", () => {
|
|
354
|
+
const n = P(() => {
|
|
355
|
+
const o = B();
|
|
356
|
+
if (A(o.jwtToken) && !A(o.jwtTokenUpdater)) {
|
|
357
|
+
const c = o.jwtTokenUpdater();
|
|
358
|
+
o.jwtToken = c, c.then((p) => {
|
|
359
|
+
o.jwtToken = Promise.resolve(p), ye.saveActualDataToStorage("sc.token", p, Ee(p)), o.recalculateUserPermissions();
|
|
360
|
+
}).catch(y);
|
|
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), ye.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, ye.saveActualDataToStorage("sc.token", void 0);
|
|
374
|
+
}
|
|
375
|
+
function i(o) {
|
|
376
|
+
const c = B();
|
|
377
|
+
!A(c.jwtToken) && A(c.userPermissions) && c.jwtToken.then((m) => {
|
|
378
|
+
const C = G.getJwtPayload(m);
|
|
379
|
+
c.userPermissions = C.exp * 1e3 > Date.now() ? tr(C.resourceAccess, ($) => ($ == null ? void 0 : $.roles) ?? []) : void 0;
|
|
380
|
+
}).catch(y);
|
|
381
|
+
const p = Q(o) ? o.join(" && ") : o;
|
|
382
|
+
if (c.userPermissionsComputedRefs.has(p))
|
|
383
|
+
return c.userPermissionsComputedRefs.get(p);
|
|
384
|
+
const u = P(() => {
|
|
385
|
+
const m = (C) => {
|
|
243
386
|
var _;
|
|
244
|
-
const
|
|
245
|
-
if (
|
|
387
|
+
const $ = $r(C, ".");
|
|
388
|
+
if ($.length < 2)
|
|
246
389
|
return !1;
|
|
247
|
-
const [
|
|
248
|
-
return
|
|
390
|
+
const [d, I] = $, S = (_ = B().userPermissions) == null ? void 0 : _[d];
|
|
391
|
+
return Q(S) && S.includes(I);
|
|
249
392
|
};
|
|
250
|
-
return
|
|
393
|
+
return Q(o) ? Dr(o, (C) => m(C)) : m(o);
|
|
251
394
|
});
|
|
252
|
-
return
|
|
395
|
+
return c.userPermissionsComputedRefs.set(p, u), u;
|
|
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, A(this.id) && (A(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 === "" : A(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 Le extends nr {
|
|
352
501
|
/**
|
|
353
502
|
* Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
|
|
354
503
|
*
|
|
@@ -363,7 +512,7 @@ class de extends rr {
|
|
|
363
512
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
364
513
|
}
|
|
365
514
|
}
|
|
366
|
-
class
|
|
515
|
+
class ge extends Le {
|
|
367
516
|
/**
|
|
368
517
|
* Инициализирует экземпляр класса {@link BaseCategory}.
|
|
369
518
|
*
|
|
@@ -387,11 +536,11 @@ class he extends de {
|
|
|
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 Pe extends
|
|
562
|
+
class Pe 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 Pe(r == null ? void 0 : r.coefficient), this.value = (r == null ? void 0 : r.value) ?? 0, this.cost = (r == null ? void 0 : r.cost) ?? 0, this.percent = (r == null ? void 0 : r.percent) ?? 0, this.readOnly = (r == null ? void 0 : r.readOnly) ?? !0;
|
|
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 Re extends
|
|
620
|
+
class Re extends v {
|
|
472
621
|
/**
|
|
473
622
|
* Инициализирует экземпляр класса {@link Warehouse}.
|
|
474
623
|
*
|
|
@@ -497,10 +646,10 @@ class Re 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
|
*
|
|
@@ -518,7 +667,7 @@ class Fr {
|
|
|
518
667
|
this.warehouse = new Re(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,7 +705,7 @@ 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
|
*
|
|
@@ -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 =
|
|
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 = w(e == null ? void 0 : e.costDate) ? a(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((u) => new Mr(u))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
|
|
645
794
|
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((u) => u.isPrimary));
|
|
646
|
-
s && (this.category = new
|
|
795
|
+
s && (this.category = new Le({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((u) => new Le(u))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((u) => new Br(u, D.getConfig().http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((p = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : p.map((u) => new Ge(u))) ?? [], 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 = D.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 ge(), 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 fe {
|
|
775
924
|
/**
|
|
776
925
|
* Инициализирует экземпляр класса {@link Cart}.
|
|
777
926
|
*
|
|
@@ -790,10 +939,10 @@ class me {
|
|
|
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", `${D.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", y);
|
|
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 A($e().jwtToken) || (e = await $e().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) : ($e().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 = qe(r.data)), r));
|
|
1029
|
+
const r = D.getConfig().version;
|
|
1030
|
+
this.errorResponseHandler = L.defaultErrorsResponseHandler, this.httpClient = jr.create({
|
|
882
1031
|
headers: {
|
|
883
|
-
"APP-VERSION": `${r.name} (${r.version}, ${
|
|
1032
|
+
"APP-VERSION": `${r.name} (${r.version}, ${U(r.date, D.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 (!A(r.request) || !A(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", y);
|
|
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 fe(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 fe(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 fe(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 fe(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 ge {
|
|
1135
1284
|
/**
|
|
1136
1285
|
* Инициализирует экземпляр класса {@link Category}.
|
|
1137
1286
|
*
|
|
@@ -1148,10 +1297,10 @@ class B extends he {
|
|
|
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 = w(e == null ? void 0 : e.updatedAt) ? a(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 = w(e == null ? void 0 : e.deletedAt) ? a(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(C(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 = w(e == null ? void 0 : e.publishedAt) ? a(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 = w(e == null ? void 0 : e.deletedAt) ? a(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 = w(e == null ? void 0 : e.createdAt) ? a(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 ge {
|
|
1436
1551
|
/**
|
|
1437
1552
|
* Инициализирует экземпляр класса {@link BaseClientCategory}.
|
|
1438
1553
|
*
|
|
@@ -1463,7 +1578,7 @@ class Qr extends he {
|
|
|
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 pr {
|
|
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 Pe(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
|
|
1502
1617
|
}
|
|
1503
1618
|
}
|
|
1504
|
-
class
|
|
1619
|
+
class Te extends pr {
|
|
1505
1620
|
/**
|
|
1506
1621
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1507
1622
|
*
|
|
@@ -1513,12 +1628,12 @@ class $e extends nr {
|
|
|
1513
1628
|
* Базовые данные о продукте.
|
|
1514
1629
|
*/
|
|
1515
1630
|
t(this, "productCategory");
|
|
1516
|
-
this.productCategory = new
|
|
1631
|
+
this.productCategory = new ge(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 ur 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 = w(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = w(e == null ? void 0 : e.lastLoginAt) ? a(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 me extends ur {
|
|
1591
1706
|
/**
|
|
1592
1707
|
* Инициализирует экземпляр класса {@link Client}.
|
|
1593
1708
|
*
|
|
@@ -1629,10 +1744,10 @@ class ge 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 = w(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = w(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new me(e == null ? void 0 : e.client), this.priceTemplate = new W(e == null ? void 0 : e.priceTemplate);
|
|
1660
1775
|
}
|
|
1661
1776
|
}
|
|
1662
|
-
class
|
|
1777
|
+
class be extends pr {
|
|
1663
1778
|
/**
|
|
1664
1779
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1665
1780
|
*
|
|
@@ -1671,12 +1786,12 @@ class Te 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 = w(r == null ? void 0 : r.from) ? a(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = w(r == null ? void 0 : r.to) ? a(r.to) : (r == null ? void 0 : r.to) ?? null;
|
|
1737
1852
|
}
|
|
1738
1853
|
}
|
|
1739
|
-
class
|
|
1854
|
+
class Ut {
|
|
1740
1855
|
/**
|
|
1741
1856
|
* Инициализирует экземпляр класса {@link TemplatesListFilters}.
|
|
1742
1857
|
*
|
|
@@ -1796,11 +1911,11 @@ class Ot {
|
|
|
1796
1911
|
return Object.keys(this).forEach((c) => {
|
|
1797
1912
|
const p = this[c];
|
|
1798
1913
|
// eslint-disable-next-line prettier/prettier
|
|
1799
|
-
|
|
1914
|
+
A(p) || w(p) && p.trim().length === 0 || Ue(p.isNewRec) && p.isNewRec() || (r[c] = p);
|
|
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 ge(r == null ? void 0 : r.category), this.minCoefficient = new Pe(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
|
*
|
|
@@ -1909,7 +2024,7 @@ class Xr {
|
|
|
1909
2024
|
this.portalApiUrl = (r == null ? void 0 : r.portalApiUrl) ?? "", this.priceHistoryApiUrl = (r == null ? void 0 : r.priceHistoryApiUrl) ?? "", this.recommendationsApiUrl = (r == null ? void 0 : r.recommendationsApiUrl) ?? "", this.mediaUrl = (r == null ? void 0 : r.mediaUrl) ?? "", this.responseDataCacheTimeout = (r == null ? void 0 : r.responseDataCacheTimeout) ?? 3 * 60 * 60;
|
|
1910
2025
|
}
|
|
1911
2026
|
}
|
|
1912
|
-
class
|
|
2027
|
+
class rt {
|
|
1913
2028
|
/**
|
|
1914
2029
|
* Инициализирует экземпляр класса {@link SentryConfig}.
|
|
1915
2030
|
*
|
|
@@ -1954,7 +2069,7 @@ class Zr {
|
|
|
1954
2069
|
}, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
|
|
1955
2070
|
}
|
|
1956
2071
|
}
|
|
1957
|
-
class
|
|
2072
|
+
class tt {
|
|
1958
2073
|
/**
|
|
1959
2074
|
* Инициализирует экземпляр класса {@link VersionConfig}.
|
|
1960
2075
|
*
|
|
@@ -1973,10 +2088,10 @@ class et {
|
|
|
1973
2088
|
* Текущая версия приложения.
|
|
1974
2089
|
*/
|
|
1975
2090
|
t(this, "version");
|
|
1976
|
-
this.date =
|
|
2091
|
+
this.date = w(r == null ? void 0 : r.date) ? a(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";
|
|
1977
2092
|
}
|
|
1978
2093
|
}
|
|
1979
|
-
class
|
|
2094
|
+
class st {
|
|
1980
2095
|
/**
|
|
1981
2096
|
* Инициализирует экземпляр класса {@link WebSocketConfig}.
|
|
1982
2097
|
*
|
|
@@ -2059,17 +2174,17 @@ class qt {
|
|
|
2059
2174
|
*/
|
|
2060
2175
|
t(this, "dateFormats");
|
|
2061
2176
|
var e, s, i;
|
|
2062
|
-
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new
|
|
2177
|
+
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({
|
|
2063
2178
|
environment: this.environment,
|
|
2064
2179
|
...r == null ? void 0 : r.sentry
|
|
2065
|
-
}), this.urls = r == null ? void 0 : r.urls, this.version = new
|
|
2180
|
+
}), 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 = {
|
|
2066
2181
|
api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
|
|
2067
2182
|
uiDate: ((s = r == null ? void 0 : r.dateFormats) == null ? void 0 : s.uiDate) ?? "dd.MM.yyyy",
|
|
2068
2183
|
uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
|
|
2069
2184
|
};
|
|
2070
2185
|
}
|
|
2071
2186
|
}
|
|
2072
|
-
class
|
|
2187
|
+
class Gt extends h {
|
|
2073
2188
|
/**
|
|
2074
2189
|
* Возвращает данные о результатах поиска категорий и товаров.
|
|
2075
2190
|
*
|
|
@@ -2096,11 +2211,11 @@ class Ut extends h {
|
|
|
2096
2211
|
*/
|
|
2097
2212
|
// eslint-disable-next-line class-methods-use-this
|
|
2098
2213
|
getPriceExportLink(r = "csv", e = !1, s = void 0, i = void 0) {
|
|
2099
|
-
let c = `${
|
|
2214
|
+
let c = `${D.getConfig().http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
|
|
2100
2215
|
return s && (c += `&category_id=${s}`), i && (c += `&client_id=${i}`), c;
|
|
2101
2216
|
}
|
|
2102
2217
|
}
|
|
2103
|
-
class
|
|
2218
|
+
class Ft extends h {
|
|
2104
2219
|
/**
|
|
2105
2220
|
* Импортирует цены клиента из CSV файла.
|
|
2106
2221
|
*
|
|
@@ -2224,7 +2339,7 @@ class Gt extends h {
|
|
|
2224
2339
|
price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
|
|
2225
2340
|
increase_percent: s.value
|
|
2226
2341
|
},
|
|
2227
|
-
(o) => new
|
|
2342
|
+
(o) => new Z(o.data)
|
|
2228
2343
|
);
|
|
2229
2344
|
}
|
|
2230
2345
|
/**
|
|
@@ -2236,7 +2351,7 @@ class Gt extends h {
|
|
|
2236
2351
|
* @see /doc/api/internal#/operations/api_internal_client_price_products_remove
|
|
2237
2352
|
*/
|
|
2238
2353
|
removeProductPrice(r, e) {
|
|
2239
|
-
return this.delete(`/internal/clients/${r}/price/products/${e}`, (s) => new
|
|
2354
|
+
return this.delete(`/internal/clients/${r}/price/products/${e}`, (s) => new Z(s.data));
|
|
2240
2355
|
}
|
|
2241
2356
|
/**
|
|
2242
2357
|
* Добавляет указанный продукт в список товаров для дополнительных продаж.
|
|
@@ -2299,7 +2414,7 @@ class Gt extends h {
|
|
|
2299
2414
|
return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
|
|
2300
2415
|
}
|
|
2301
2416
|
}
|
|
2302
|
-
class
|
|
2417
|
+
class jt extends h {
|
|
2303
2418
|
/**
|
|
2304
2419
|
* Возвращает список шаблонов прайс-листа привязанных к клиенту.
|
|
2305
2420
|
*
|
|
@@ -2311,7 +2426,7 @@ class Ft extends h {
|
|
|
2311
2426
|
return this.get(
|
|
2312
2427
|
`/internal/clients/${r}/price/templates`,
|
|
2313
2428
|
{},
|
|
2314
|
-
(e) => e.data.map((s) => new
|
|
2429
|
+
(e) => e.data.map((s) => new se(s))
|
|
2315
2430
|
);
|
|
2316
2431
|
}
|
|
2317
2432
|
/**
|
|
@@ -2322,7 +2437,7 @@ class Ft extends h {
|
|
|
2322
2437
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_get_active
|
|
2323
2438
|
*/
|
|
2324
2439
|
getActiveTemplate(r) {
|
|
2325
|
-
return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new
|
|
2440
|
+
return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new se(e.data));
|
|
2326
2441
|
}
|
|
2327
2442
|
/**
|
|
2328
2443
|
* Добавляет связь между клиентом и шаблоном прайс-листа.
|
|
@@ -2334,14 +2449,14 @@ class Ft extends h {
|
|
|
2334
2449
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_attach
|
|
2335
2450
|
*/
|
|
2336
2451
|
attachTemplate(r, e, s) {
|
|
2337
|
-
const i =
|
|
2452
|
+
const i = D.getConfig().dateFormats.api;
|
|
2338
2453
|
return this.post(
|
|
2339
2454
|
`/internal/clients/${r}/price/templates/${e}`,
|
|
2340
2455
|
s && {
|
|
2341
|
-
startAt: s.startAt &&
|
|
2342
|
-
endAt: s.endAt &&
|
|
2456
|
+
startAt: s.startAt && U(s.startAt, i),
|
|
2457
|
+
endAt: s.endAt && U(s.endAt, i)
|
|
2343
2458
|
},
|
|
2344
|
-
(o) => new
|
|
2459
|
+
(o) => new se(o.data),
|
|
2345
2460
|
{},
|
|
2346
2461
|
!0
|
|
2347
2462
|
);
|
|
@@ -2368,14 +2483,14 @@ class Ft extends h {
|
|
|
2368
2483
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_change
|
|
2369
2484
|
*/
|
|
2370
2485
|
changeTemplate(r, e, s, i) {
|
|
2371
|
-
const o =
|
|
2486
|
+
const o = D.getConfig().dateFormats.api;
|
|
2372
2487
|
return this.patch(
|
|
2373
2488
|
`/internal/clients/${r}/price/templates/${e}/${s}`,
|
|
2374
2489
|
i && {
|
|
2375
|
-
startAt: i.startAt &&
|
|
2376
|
-
endAt: i.endAt &&
|
|
2490
|
+
startAt: i.startAt && U(i.startAt, o),
|
|
2491
|
+
endAt: i.endAt && U(i.endAt, o)
|
|
2377
2492
|
},
|
|
2378
|
-
(c) => new
|
|
2493
|
+
(c) => new se(c.data)
|
|
2379
2494
|
);
|
|
2380
2495
|
}
|
|
2381
2496
|
/**
|
|
@@ -2391,7 +2506,7 @@ class Ft extends h {
|
|
|
2391
2506
|
return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
|
|
2392
2507
|
}
|
|
2393
2508
|
}
|
|
2394
|
-
class
|
|
2509
|
+
class Mt extends h {
|
|
2395
2510
|
/**
|
|
2396
2511
|
* Возвращает список данных о корневых категориях.
|
|
2397
2512
|
*
|
|
@@ -2405,7 +2520,7 @@ class jt extends h {
|
|
|
2405
2520
|
{
|
|
2406
2521
|
showHidden: r
|
|
2407
2522
|
},
|
|
2408
|
-
(e) => e.data.map((s) => new
|
|
2523
|
+
(e) => e.data.map((s) => new E(s))
|
|
2409
2524
|
);
|
|
2410
2525
|
}
|
|
2411
2526
|
/**
|
|
@@ -2424,7 +2539,7 @@ class jt extends h {
|
|
|
2424
2539
|
showHidden: e,
|
|
2425
2540
|
withNestedCategories: s
|
|
2426
2541
|
},
|
|
2427
|
-
(i) => new
|
|
2542
|
+
(i) => new E(i.data)
|
|
2428
2543
|
);
|
|
2429
2544
|
}
|
|
2430
2545
|
/**
|
|
@@ -2433,7 +2548,7 @@ class jt extends h {
|
|
|
2433
2548
|
* @param categoryID Идентификатор категории продуктов.
|
|
2434
2549
|
*/
|
|
2435
2550
|
getPublicCategoryData(r) {
|
|
2436
|
-
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new
|
|
2551
|
+
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new E(e.data));
|
|
2437
2552
|
}
|
|
2438
2553
|
/**
|
|
2439
2554
|
* Возвращает список продуктов категории.
|
|
@@ -2451,7 +2566,7 @@ class jt extends h {
|
|
|
2451
2566
|
showHidden: s,
|
|
2452
2567
|
withPriceCoefficients: e
|
|
2453
2568
|
},
|
|
2454
|
-
(i) =>
|
|
2569
|
+
(i) => he(i.data, (o) => new x(o))
|
|
2455
2570
|
);
|
|
2456
2571
|
}
|
|
2457
2572
|
/**
|
|
@@ -2464,7 +2579,7 @@ class jt extends h {
|
|
|
2464
2579
|
getCategoryProductsCoefficients(r) {
|
|
2465
2580
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
2466
2581
|
const { data: s } = e;
|
|
2467
|
-
return
|
|
2582
|
+
return dr(s, (i) => i.map((o) => new Ge(o))), s;
|
|
2468
2583
|
});
|
|
2469
2584
|
}
|
|
2470
2585
|
/**
|
|
@@ -2476,14 +2591,14 @@ class jt extends h {
|
|
|
2476
2591
|
publicSimpleSearch(r, e = 10) {
|
|
2477
2592
|
return new Promise((s, i) => {
|
|
2478
2593
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2479
|
-
s(o.categories.map((c) => new
|
|
2594
|
+
s(o.categories.map((c) => new E(c)));
|
|
2480
2595
|
}).catch((o) => {
|
|
2481
2596
|
i(o);
|
|
2482
2597
|
});
|
|
2483
2598
|
});
|
|
2484
2599
|
}
|
|
2485
2600
|
}
|
|
2486
|
-
class
|
|
2601
|
+
class Ht extends h {
|
|
2487
2602
|
/**
|
|
2488
2603
|
* Возвращает данные об указанном продукте.
|
|
2489
2604
|
*
|
|
@@ -2493,7 +2608,7 @@ class Mt extends h {
|
|
|
2493
2608
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
|
|
2494
2609
|
*/
|
|
2495
2610
|
getProductData(r, e = !1) {
|
|
2496
|
-
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new
|
|
2611
|
+
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new x(s.data));
|
|
2497
2612
|
}
|
|
2498
2613
|
/**
|
|
2499
2614
|
* Возвращает публичные данные об указанном продукте.
|
|
@@ -2501,7 +2616,7 @@ class Mt extends h {
|
|
|
2501
2616
|
* @param productId Идентификатор продукта.
|
|
2502
2617
|
*/
|
|
2503
2618
|
getPublicProductData(r) {
|
|
2504
|
-
return this.get(`/public/catalog/products/${r}`, {}, (e) => new
|
|
2619
|
+
return this.get(`/public/catalog/products/${r}`, {}, (e) => new x(e.data));
|
|
2505
2620
|
}
|
|
2506
2621
|
/**
|
|
2507
2622
|
* Возвращает данные о коэффициентах цен для указанного продукта.
|
|
@@ -2514,7 +2629,7 @@ class Mt extends h {
|
|
|
2514
2629
|
return this.get(
|
|
2515
2630
|
`/internal/catalog/products/${r}/coefficients`,
|
|
2516
2631
|
{},
|
|
2517
|
-
(e) =>
|
|
2632
|
+
(e) => he(e.data, (s) => new Ge(s))
|
|
2518
2633
|
);
|
|
2519
2634
|
}
|
|
2520
2635
|
/**
|
|
@@ -2526,14 +2641,14 @@ class Mt extends h {
|
|
|
2526
2641
|
publicSimpleSearch(r, e = 10) {
|
|
2527
2642
|
return new Promise((s, i) => {
|
|
2528
2643
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2529
|
-
s(o.products.map((c) => new
|
|
2644
|
+
s(o.products.map((c) => new x(c)));
|
|
2530
2645
|
}).catch((o) => {
|
|
2531
2646
|
i(o);
|
|
2532
2647
|
});
|
|
2533
2648
|
});
|
|
2534
2649
|
}
|
|
2535
2650
|
}
|
|
2536
|
-
class
|
|
2651
|
+
class Bt extends h {
|
|
2537
2652
|
/**
|
|
2538
2653
|
* Возвращает список данных о корневых категориях указанного клиента.
|
|
2539
2654
|
*
|
|
@@ -2549,7 +2664,7 @@ class Ht extends h {
|
|
|
2549
2664
|
clientId: r,
|
|
2550
2665
|
showHidden: e
|
|
2551
2666
|
},
|
|
2552
|
-
(s) => s.data.map((i) => new
|
|
2667
|
+
(s) => s.data.map((i) => new we(i))
|
|
2553
2668
|
);
|
|
2554
2669
|
}
|
|
2555
2670
|
/**
|
|
@@ -2570,7 +2685,7 @@ class Ht extends h {
|
|
|
2570
2685
|
showHidden: s,
|
|
2571
2686
|
withNestedCategories: i
|
|
2572
2687
|
},
|
|
2573
|
-
(o) => new
|
|
2688
|
+
(o) => new we(o.data)
|
|
2574
2689
|
);
|
|
2575
2690
|
}
|
|
2576
2691
|
/**
|
|
@@ -2591,11 +2706,11 @@ class Ht extends h {
|
|
|
2591
2706
|
showHidden: i,
|
|
2592
2707
|
withPriceCoefficients: s
|
|
2593
2708
|
},
|
|
2594
|
-
(o) =>
|
|
2709
|
+
(o) => he(o.data, (c) => new Z(c))
|
|
2595
2710
|
);
|
|
2596
2711
|
}
|
|
2597
2712
|
}
|
|
2598
|
-
class
|
|
2713
|
+
class zt extends h {
|
|
2599
2714
|
/**
|
|
2600
2715
|
* Возвращает данные об указанном продукте для указанного клиента.
|
|
2601
2716
|
*
|
|
@@ -2612,12 +2727,12 @@ class Bt extends h {
|
|
|
2612
2727
|
clientId: e,
|
|
2613
2728
|
withPriceCoefficients: s
|
|
2614
2729
|
},
|
|
2615
|
-
(i) => new
|
|
2730
|
+
(i) => new Z(i.data)
|
|
2616
2731
|
);
|
|
2617
2732
|
}
|
|
2618
2733
|
}
|
|
2619
|
-
var
|
|
2620
|
-
class
|
|
2734
|
+
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 || {});
|
|
2735
|
+
class Je {
|
|
2621
2736
|
/**
|
|
2622
2737
|
* Инициализирует экземпляр класса {@link FilterItem}.
|
|
2623
2738
|
*
|
|
@@ -2636,7 +2751,7 @@ class Be {
|
|
|
2636
2751
|
* Значение с которым сравнивается поле.
|
|
2637
2752
|
*/
|
|
2638
2753
|
t(this, "value");
|
|
2639
|
-
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ??
|
|
2754
|
+
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) ?? "";
|
|
2640
2755
|
}
|
|
2641
2756
|
/**
|
|
2642
2757
|
* Преобразует фильтр в примитивное представление для API.
|
|
@@ -2648,10 +2763,10 @@ class Be {
|
|
|
2648
2763
|
field: this.field,
|
|
2649
2764
|
op: this.op
|
|
2650
2765
|
};
|
|
2651
|
-
return r.value = Ie(this.value) ?
|
|
2766
|
+
return r.value = Ie(this.value) ? U(this.value, D.getConfig().dateFormats.api) : this.value, r;
|
|
2652
2767
|
}
|
|
2653
2768
|
}
|
|
2654
|
-
class
|
|
2769
|
+
class pe {
|
|
2655
2770
|
/**
|
|
2656
2771
|
* Инициализирует экземпляр класса {@link FilterGroup}.
|
|
2657
2772
|
*
|
|
@@ -2671,7 +2786,7 @@ class le {
|
|
|
2671
2786
|
*/
|
|
2672
2787
|
t(this, "groups");
|
|
2673
2788
|
var e, s;
|
|
2674
|
-
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
|
|
2789
|
+
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 pe(i))) ?? [];
|
|
2675
2790
|
}
|
|
2676
2791
|
/**
|
|
2677
2792
|
* Преобразует группу фильтров в примитивное представление для API.
|
|
@@ -2681,12 +2796,12 @@ class le {
|
|
|
2681
2796
|
toPrimitive() {
|
|
2682
2797
|
return {
|
|
2683
2798
|
groupOp: this.groupOp,
|
|
2684
|
-
filters: this.filters.map((r) => r instanceof
|
|
2685
|
-
groups: this.groups.map((r) => r instanceof
|
|
2799
|
+
filters: this.filters.map((r) => r instanceof Je && Ue(r.toPrimitive) ? r.toPrimitive() : r),
|
|
2800
|
+
groups: this.groups.map((r) => r instanceof pe ? r.toPrimitive() : r)
|
|
2686
2801
|
};
|
|
2687
2802
|
}
|
|
2688
2803
|
}
|
|
2689
|
-
class
|
|
2804
|
+
class De extends h {
|
|
2690
2805
|
/**
|
|
2691
2806
|
* Получает пагинированный список данных.
|
|
2692
2807
|
*
|
|
@@ -2703,10 +2818,10 @@ class ae extends h {
|
|
|
2703
2818
|
page: (i == null ? void 0 : i.page) ?? 1,
|
|
2704
2819
|
perPage: (i == null ? void 0 : i.pageSize) ?? 10
|
|
2705
2820
|
};
|
|
2706
|
-
return e && (u.filters = JSON.stringify((e instanceof
|
|
2821
|
+
return e && (u.filters = JSON.stringify((e instanceof pe ? e : new pe(e)).toPrimitive())), Y(s) || (u.sort = Q(s) ? s : [s]), o && (u = { ...u, ...o }), this.get(r, u, c, p);
|
|
2707
2822
|
}
|
|
2708
2823
|
}
|
|
2709
|
-
class
|
|
2824
|
+
class Et extends De {
|
|
2710
2825
|
/**
|
|
2711
2826
|
* Возвращает список шаблонов прайс-листа.
|
|
2712
2827
|
*
|
|
@@ -2719,7 +2834,7 @@ class zt extends ae {
|
|
|
2719
2834
|
getTemplateList(r, e, s) {
|
|
2720
2835
|
return this.getPaginated("/internal/price/templates", r, e, s, {}, (i) => {
|
|
2721
2836
|
const o = { ...i.data };
|
|
2722
|
-
return o.data = o.data.map((c) => new
|
|
2837
|
+
return o.data = o.data.map((c) => new W(c)), o;
|
|
2723
2838
|
});
|
|
2724
2839
|
}
|
|
2725
2840
|
/**
|
|
@@ -2732,7 +2847,7 @@ class zt extends ae {
|
|
|
2732
2847
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_create
|
|
2733
2848
|
*/
|
|
2734
2849
|
createTemplate(r, e = {}) {
|
|
2735
|
-
return this.post("/internal/price/templates", r, (s) => new
|
|
2850
|
+
return this.post("/internal/price/templates", r, (s) => new W(s.data), e);
|
|
2736
2851
|
}
|
|
2737
2852
|
/**
|
|
2738
2853
|
* Возвращает данные о шаблоне прайс-листа.
|
|
@@ -2742,7 +2857,7 @@ class zt extends ae {
|
|
|
2742
2857
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_get
|
|
2743
2858
|
*/
|
|
2744
2859
|
getTemplate(r) {
|
|
2745
|
-
return this.get(`/internal/price/templates/${r}`, {}, (e) => new
|
|
2860
|
+
return this.get(`/internal/price/templates/${r}`, {}, (e) => new W(e.data));
|
|
2746
2861
|
}
|
|
2747
2862
|
/**
|
|
2748
2863
|
* Изменяет данные о шаблоне прайс-листа.
|
|
@@ -2755,7 +2870,7 @@ class zt extends ae {
|
|
|
2755
2870
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_update
|
|
2756
2871
|
*/
|
|
2757
2872
|
updateTemplate(r, e, s = {}) {
|
|
2758
|
-
return this.patch(`/internal/price/templates/${r}`, e, (i) => new
|
|
2873
|
+
return this.patch(`/internal/price/templates/${r}`, e, (i) => new W(i.data), s);
|
|
2759
2874
|
}
|
|
2760
2875
|
/**
|
|
2761
2876
|
* Удаляет данные о шаблоне прайс-листа.
|
|
@@ -2778,7 +2893,7 @@ class zt extends ae {
|
|
|
2778
2893
|
return this.get(
|
|
2779
2894
|
`/internal/price/templates/${r}/products`,
|
|
2780
2895
|
{},
|
|
2781
|
-
(e) => e.data.map((s) => new
|
|
2896
|
+
(e) => e.data.map((s) => new be(s))
|
|
2782
2897
|
);
|
|
2783
2898
|
}
|
|
2784
2899
|
/**
|
|
@@ -2790,7 +2905,7 @@ class zt extends ae {
|
|
|
2790
2905
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get
|
|
2791
2906
|
*/
|
|
2792
2907
|
getProductTemplatePrice(r, e) {
|
|
2793
|
-
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new
|
|
2908
|
+
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new be(s.data));
|
|
2794
2909
|
}
|
|
2795
2910
|
/**
|
|
2796
2911
|
* Сохраняет цену на продукт в шаблоне прайс-листа.
|
|
@@ -2809,7 +2924,7 @@ class zt extends ae {
|
|
|
2809
2924
|
price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
|
|
2810
2925
|
increase_percent: s.value
|
|
2811
2926
|
},
|
|
2812
|
-
(o) => new
|
|
2927
|
+
(o) => new be(o.data)
|
|
2813
2928
|
);
|
|
2814
2929
|
}
|
|
2815
2930
|
/**
|
|
@@ -2834,7 +2949,7 @@ class zt extends ae {
|
|
|
2834
2949
|
return this.get(
|
|
2835
2950
|
`/internal/price/templates/${r}/categories`,
|
|
2836
2951
|
{},
|
|
2837
|
-
(e) => e.data.map((s) => new
|
|
2952
|
+
(e) => e.data.map((s) => new Te(s))
|
|
2838
2953
|
);
|
|
2839
2954
|
}
|
|
2840
2955
|
/**
|
|
@@ -2849,7 +2964,7 @@ class zt extends ae {
|
|
|
2849
2964
|
return this.get(
|
|
2850
2965
|
`/internal/price/templates/${r}/categories/${e}`,
|
|
2851
2966
|
{},
|
|
2852
|
-
(s) => new
|
|
2967
|
+
(s) => new Te(s.data)
|
|
2853
2968
|
);
|
|
2854
2969
|
}
|
|
2855
2970
|
/**
|
|
@@ -2875,7 +2990,7 @@ class zt extends ae {
|
|
|
2875
2990
|
},
|
|
2876
2991
|
params: i ? { recursively: !0 } : {}
|
|
2877
2992
|
},
|
|
2878
|
-
(c) => new
|
|
2993
|
+
(c) => new Te(c.data)
|
|
2879
2994
|
);
|
|
2880
2995
|
}
|
|
2881
2996
|
/**
|
|
@@ -2906,7 +3021,7 @@ class zt extends ae {
|
|
|
2906
3021
|
return this.get(
|
|
2907
3022
|
`/internal/price/templates/${r}/clients`,
|
|
2908
3023
|
{},
|
|
2909
|
-
(e) => e.data.map((s) => new
|
|
3024
|
+
(e) => e.data.map((s) => new se(s))
|
|
2910
3025
|
);
|
|
2911
3026
|
}
|
|
2912
3027
|
}
|
|
@@ -2917,7 +3032,7 @@ class Wt extends h {
|
|
|
2917
3032
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get_list
|
|
2918
3033
|
*/
|
|
2919
3034
|
getRoles() {
|
|
2920
|
-
return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new
|
|
3035
|
+
return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new ne(e)));
|
|
2921
3036
|
}
|
|
2922
3037
|
/**
|
|
2923
3038
|
* Добавляет новую роль ценообразования.
|
|
@@ -2927,7 +3042,7 @@ class Wt extends h {
|
|
|
2927
3042
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_create
|
|
2928
3043
|
*/
|
|
2929
3044
|
createRole(r) {
|
|
2930
|
-
return this.post("/internal/price/roles", r, (e) => new
|
|
3045
|
+
return this.post("/internal/price/roles", r, (e) => new ne(e.data));
|
|
2931
3046
|
}
|
|
2932
3047
|
/**
|
|
2933
3048
|
* Возвращает данные роли ценообразования.
|
|
@@ -2937,7 +3052,7 @@ class Wt extends h {
|
|
|
2937
3052
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get
|
|
2938
3053
|
*/
|
|
2939
3054
|
getRole(r) {
|
|
2940
|
-
return this.get(`/internal/price/roles/${r}`, {}, (e) => new
|
|
3055
|
+
return this.get(`/internal/price/roles/${r}`, {}, (e) => new ne(e.data));
|
|
2941
3056
|
}
|
|
2942
3057
|
/**
|
|
2943
3058
|
* Обновляет данные роли ценообразования.
|
|
@@ -2948,7 +3063,7 @@ class Wt extends h {
|
|
|
2948
3063
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_update
|
|
2949
3064
|
*/
|
|
2950
3065
|
updateRole(r, e) {
|
|
2951
|
-
return this.patch(`/internal/price/roles/${r}`, e, (s) => new
|
|
3066
|
+
return this.patch(`/internal/price/roles/${r}`, e, (s) => new ne(s.data));
|
|
2952
3067
|
}
|
|
2953
3068
|
/**
|
|
2954
3069
|
* Удаляет роль ценообразования.
|
|
@@ -2971,7 +3086,7 @@ class Wt extends h {
|
|
|
2971
3086
|
return this.get(
|
|
2972
3087
|
`/internal/price/roles/rules/categories/${r}`,
|
|
2973
3088
|
{},
|
|
2974
|
-
(e) => e.data.map((s) => new
|
|
3089
|
+
(e) => e.data.map((s) => new We(s))
|
|
2975
3090
|
);
|
|
2976
3091
|
}
|
|
2977
3092
|
/**
|
|
@@ -2986,11 +3101,11 @@ class Wt extends h {
|
|
|
2986
3101
|
return this.patch(
|
|
2987
3102
|
`/internal/price/roles/rules/categories/${r}`,
|
|
2988
3103
|
e,
|
|
2989
|
-
(s) => s.data.map((i) => new
|
|
3104
|
+
(s) => s.data.map((i) => new We(i))
|
|
2990
3105
|
);
|
|
2991
3106
|
}
|
|
2992
3107
|
}
|
|
2993
|
-
class
|
|
3108
|
+
class Jt extends De {
|
|
2994
3109
|
/**
|
|
2995
3110
|
* Возвращает пагинированный список свойств.
|
|
2996
3111
|
*
|
|
@@ -3003,7 +3118,7 @@ class Et extends ae {
|
|
|
3003
3118
|
getProperties(r, e, s) {
|
|
3004
3119
|
return this.getPaginated("/internal/catalog/properties", r, e, s, {}, (i) => {
|
|
3005
3120
|
const o = { ...i.data };
|
|
3006
|
-
return o.data = o.data.map((c) => new
|
|
3121
|
+
return o.data = o.data.map((c) => new ie(c)), o;
|
|
3007
3122
|
});
|
|
3008
3123
|
}
|
|
3009
3124
|
/**
|
|
@@ -3020,7 +3135,7 @@ class Et extends ae {
|
|
|
3020
3135
|
...s,
|
|
3021
3136
|
type: e
|
|
3022
3137
|
},
|
|
3023
|
-
(i) => new
|
|
3138
|
+
(i) => new ie(i.data)
|
|
3024
3139
|
);
|
|
3025
3140
|
}
|
|
3026
3141
|
/**
|
|
@@ -3030,7 +3145,7 @@ class Et extends ae {
|
|
|
3030
3145
|
* @see /doc/api/internal#/operations/api_internal_catalog_properties_get
|
|
3031
3146
|
*/
|
|
3032
3147
|
getProperty(r) {
|
|
3033
|
-
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new
|
|
3148
|
+
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new ie(e.data));
|
|
3034
3149
|
}
|
|
3035
3150
|
/**
|
|
3036
3151
|
* Обновляет существующее свойство.
|
|
@@ -3047,7 +3162,7 @@ class Et extends ae {
|
|
|
3047
3162
|
...i,
|
|
3048
3163
|
type: s
|
|
3049
3164
|
},
|
|
3050
|
-
(o) => new
|
|
3165
|
+
(o) => new ie(o.data)
|
|
3051
3166
|
);
|
|
3052
3167
|
}
|
|
3053
3168
|
/**
|
|
@@ -3066,7 +3181,7 @@ class Et extends ae {
|
|
|
3066
3181
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get_list
|
|
3067
3182
|
*/
|
|
3068
3183
|
getProductProperties(r) {
|
|
3069
|
-
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new
|
|
3184
|
+
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new z(s)));
|
|
3070
3185
|
}
|
|
3071
3186
|
/**
|
|
3072
3187
|
* Возвращает значение свойства продукта.
|
|
@@ -3076,7 +3191,7 @@ class Et extends ae {
|
|
|
3076
3191
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get
|
|
3077
3192
|
*/
|
|
3078
3193
|
getProductProperty(r, e) {
|
|
3079
|
-
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new
|
|
3194
|
+
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new z(s.data));
|
|
3080
3195
|
}
|
|
3081
3196
|
/**
|
|
3082
3197
|
* Обновляет значение свойства продукта.
|
|
@@ -3087,7 +3202,7 @@ class Et extends ae {
|
|
|
3087
3202
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_update
|
|
3088
3203
|
*/
|
|
3089
3204
|
updateProductProperty(r, e, s) {
|
|
3090
|
-
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new
|
|
3205
|
+
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new z(i.data));
|
|
3091
3206
|
}
|
|
3092
3207
|
/**
|
|
3093
3208
|
* Удаляет значение свойства продукта.
|
|
@@ -3212,7 +3327,7 @@ class Et extends ae {
|
|
|
3212
3327
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get_list
|
|
3213
3328
|
*/
|
|
3214
3329
|
getCategoryProperties(r) {
|
|
3215
|
-
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new
|
|
3330
|
+
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new z(s)));
|
|
3216
3331
|
}
|
|
3217
3332
|
/**
|
|
3218
3333
|
* Возвращает значение свойства категории.
|
|
@@ -3222,7 +3337,7 @@ class Et extends ae {
|
|
|
3222
3337
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get
|
|
3223
3338
|
*/
|
|
3224
3339
|
getCategoryProperty(r, e) {
|
|
3225
|
-
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new
|
|
3340
|
+
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new z(s.data));
|
|
3226
3341
|
}
|
|
3227
3342
|
/**
|
|
3228
3343
|
* Обновляет значение свойства категории.
|
|
@@ -3233,7 +3348,7 @@ class Et extends ae {
|
|
|
3233
3348
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_update
|
|
3234
3349
|
*/
|
|
3235
3350
|
updateCategoryProperty(r, e, s) {
|
|
3236
|
-
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new
|
|
3351
|
+
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new z(i.data));
|
|
3237
3352
|
}
|
|
3238
3353
|
/**
|
|
3239
3354
|
* Удаляет значение свойства категории.
|
|
@@ -3362,7 +3477,7 @@ class Et extends ae {
|
|
|
3362
3477
|
return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
|
|
3363
3478
|
}
|
|
3364
3479
|
}
|
|
3365
|
-
function
|
|
3480
|
+
function Ve(n, r, e) {
|
|
3366
3481
|
let s;
|
|
3367
3482
|
return n.some((i) => {
|
|
3368
3483
|
if (i.type === e && i.id === r)
|
|
@@ -3371,37 +3486,37 @@ function ze(n, r, e) {
|
|
|
3371
3486
|
return !1;
|
|
3372
3487
|
const o = i;
|
|
3373
3488
|
if (o.products && o.products.length > 0) {
|
|
3374
|
-
const c =
|
|
3489
|
+
const c = Ve(o.products, r, e);
|
|
3375
3490
|
if (c)
|
|
3376
3491
|
return s = c, !0;
|
|
3377
3492
|
}
|
|
3378
3493
|
if (o.categories && o.categories.length > 0) {
|
|
3379
|
-
const c =
|
|
3494
|
+
const c = Ve(o.categories, r, e);
|
|
3380
3495
|
if (c)
|
|
3381
3496
|
return s = c, !0;
|
|
3382
3497
|
}
|
|
3383
3498
|
return !1;
|
|
3384
3499
|
}), s;
|
|
3385
3500
|
}
|
|
3386
|
-
function
|
|
3501
|
+
function Ke(n) {
|
|
3387
3502
|
const r = [];
|
|
3388
3503
|
return n.forEach((e) => {
|
|
3389
3504
|
if (r.push(e), e.type === "category") {
|
|
3390
3505
|
const s = e;
|
|
3391
|
-
s.products && s.products.length > 0 && r.push(...
|
|
3506
|
+
s.products && s.products.length > 0 && r.push(...Ke(s.products)), s.categories && s.categories.length > 0 && r.push(...Ke(s.categories));
|
|
3392
3507
|
}
|
|
3393
3508
|
}), r;
|
|
3394
3509
|
}
|
|
3395
|
-
var
|
|
3396
|
-
class
|
|
3510
|
+
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 || {});
|
|
3511
|
+
class nt extends v {
|
|
3397
3512
|
}
|
|
3398
|
-
class
|
|
3513
|
+
class gr extends v {
|
|
3399
3514
|
}
|
|
3400
|
-
class Vt extends
|
|
3515
|
+
class Vt extends v {
|
|
3401
3516
|
}
|
|
3402
|
-
class
|
|
3517
|
+
class ot extends v {
|
|
3403
3518
|
}
|
|
3404
|
-
class
|
|
3519
|
+
class ae extends b {
|
|
3405
3520
|
/**
|
|
3406
3521
|
* Инициализирует экземпляр класса {@link Currency}.
|
|
3407
3522
|
*
|
|
@@ -3420,34 +3535,34 @@ class ye extends T {
|
|
|
3420
3535
|
e && (this.signature = e.signature ?? "", this.symbol = e.symbol ?? "");
|
|
3421
3536
|
}
|
|
3422
3537
|
}
|
|
3423
|
-
class
|
|
3538
|
+
class j extends v {
|
|
3424
3539
|
/**
|
|
3425
3540
|
* Возвращает сгенерированную запись-описание физического лица.
|
|
3426
3541
|
*/
|
|
3427
3542
|
static generatePersonItem() {
|
|
3428
|
-
return new
|
|
3543
|
+
return new j({
|
|
3429
3544
|
id: 1,
|
|
3430
3545
|
guid: "",
|
|
3431
|
-
slug:
|
|
3546
|
+
slug: k.Person,
|
|
3432
3547
|
name: ""
|
|
3433
3548
|
});
|
|
3434
3549
|
}
|
|
3435
3550
|
}
|
|
3436
|
-
class
|
|
3551
|
+
class ct extends v {
|
|
3437
3552
|
}
|
|
3438
|
-
class
|
|
3553
|
+
class lt extends v {
|
|
3439
3554
|
}
|
|
3440
|
-
class
|
|
3555
|
+
class re extends v {
|
|
3441
3556
|
}
|
|
3442
|
-
class
|
|
3557
|
+
class pt extends v {
|
|
3443
3558
|
}
|
|
3444
|
-
class
|
|
3559
|
+
class ut extends v {
|
|
3445
3560
|
}
|
|
3446
|
-
class
|
|
3561
|
+
class mr extends v {
|
|
3447
3562
|
}
|
|
3448
|
-
class
|
|
3563
|
+
class fr extends v {
|
|
3449
3564
|
}
|
|
3450
|
-
class
|
|
3565
|
+
class xe extends H {
|
|
3451
3566
|
/**
|
|
3452
3567
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
3453
3568
|
*
|
|
@@ -3474,11 +3589,11 @@ class Le extends M {
|
|
|
3474
3589
|
/**
|
|
3475
3590
|
* Данные о валюте.
|
|
3476
3591
|
*/
|
|
3477
|
-
t(this, "currency", new
|
|
3478
|
-
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new
|
|
3592
|
+
t(this, "currency", new ae());
|
|
3593
|
+
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new ae(e.currency));
|
|
3479
3594
|
}
|
|
3480
3595
|
}
|
|
3481
|
-
class
|
|
3596
|
+
class Ne extends b {
|
|
3482
3597
|
/**
|
|
3483
3598
|
* Инициализирует экземпляр класса {@link Contact}.
|
|
3484
3599
|
*
|
|
@@ -3497,7 +3612,7 @@ class ke extends T {
|
|
|
3497
3612
|
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;
|
|
3498
3613
|
}
|
|
3499
3614
|
}
|
|
3500
|
-
class
|
|
3615
|
+
class M extends Ne {
|
|
3501
3616
|
/**
|
|
3502
3617
|
* Инициализирует экземпляр класса {@link ContactPerson}.
|
|
3503
3618
|
*
|
|
@@ -3529,10 +3644,10 @@ class j extends ke {
|
|
|
3529
3644
|
* Дата и время последнего удаления.
|
|
3530
3645
|
*/
|
|
3531
3646
|
t(this, "deletedAt");
|
|
3532
|
-
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 =
|
|
3647
|
+
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 = w(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
3533
3648
|
}
|
|
3534
3649
|
}
|
|
3535
|
-
class
|
|
3650
|
+
class yr extends b {
|
|
3536
3651
|
/**
|
|
3537
3652
|
* Инициализирует экземпляр класса {@link ContragentBase}.
|
|
3538
3653
|
*
|
|
@@ -3544,19 +3659,19 @@ class hr extends T {
|
|
|
3544
3659
|
/**
|
|
3545
3660
|
* Данные о менеджере.
|
|
3546
3661
|
*/
|
|
3547
|
-
t(this, "manager", new
|
|
3662
|
+
t(this, "manager", new ce());
|
|
3548
3663
|
/**
|
|
3549
3664
|
* Данные об организационно-правовой форме.
|
|
3550
3665
|
*/
|
|
3551
|
-
t(this, "opf",
|
|
3666
|
+
t(this, "opf", j.generatePersonItem());
|
|
3552
3667
|
/**
|
|
3553
3668
|
* Направление продаж.
|
|
3554
3669
|
*/
|
|
3555
|
-
t(this, "salesDirection", new
|
|
3670
|
+
t(this, "salesDirection", new N());
|
|
3556
3671
|
/**
|
|
3557
3672
|
* Группа партнеров (направление деятельности).
|
|
3558
3673
|
*/
|
|
3559
|
-
t(this, "partnerGroup", new
|
|
3674
|
+
t(this, "partnerGroup", new re());
|
|
3560
3675
|
/**
|
|
3561
3676
|
* Список контактных лиц контрагента.
|
|
3562
3677
|
*/
|
|
@@ -3590,22 +3705,22 @@ class hr extends T {
|
|
|
3590
3705
|
*/
|
|
3591
3706
|
t(this, "updater");
|
|
3592
3707
|
if (e) {
|
|
3593
|
-
if (this.opf = new
|
|
3708
|
+
if (this.opf = new j(e.opf), this.salesDirection = new N(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = w(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : e.createdAt, this.creator = e.creator ? new F(e.creator) : void 0, this.updatedAt = w(e == null ? void 0 : e.updatedAt) ? a(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) {
|
|
3594
3709
|
const s = [];
|
|
3595
3710
|
e.contacts.forEach((i) => {
|
|
3596
|
-
s.push(new
|
|
3711
|
+
s.push(new M(i));
|
|
3597
3712
|
}), this.contacts = s;
|
|
3598
3713
|
}
|
|
3599
3714
|
if (e.bankAccounts) {
|
|
3600
3715
|
const s = [];
|
|
3601
3716
|
e.bankAccounts.forEach((i) => {
|
|
3602
|
-
s.push(new
|
|
3717
|
+
s.push(new xe(i));
|
|
3603
3718
|
}), this.bankAccounts = s;
|
|
3604
3719
|
}
|
|
3605
3720
|
}
|
|
3606
3721
|
}
|
|
3607
3722
|
}
|
|
3608
|
-
class
|
|
3723
|
+
class ht extends yr {
|
|
3609
3724
|
/**
|
|
3610
3725
|
* Инициализирует экземпляр класса {@link ContragentPerson}.
|
|
3611
3726
|
*
|
|
@@ -3615,7 +3730,7 @@ class pt extends hr {
|
|
|
3615
3730
|
super(r);
|
|
3616
3731
|
}
|
|
3617
3732
|
}
|
|
3618
|
-
class
|
|
3733
|
+
class wr extends yr {
|
|
3619
3734
|
/**
|
|
3620
3735
|
* Инициализирует экземпляр класса {@link ContragentIc}.
|
|
3621
3736
|
*
|
|
@@ -3658,7 +3773,7 @@ class gr extends hr {
|
|
|
3658
3773
|
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 ?? "");
|
|
3659
3774
|
}
|
|
3660
3775
|
}
|
|
3661
|
-
class
|
|
3776
|
+
class ar extends wr {
|
|
3662
3777
|
/**
|
|
3663
3778
|
* Инициализирует экземпляр класса {@link ContragentUlR}.
|
|
3664
3779
|
*
|
|
@@ -3673,7 +3788,7 @@ class mr extends gr {
|
|
|
3673
3788
|
e && (this.kpp = e.kpp ?? "");
|
|
3674
3789
|
}
|
|
3675
3790
|
}
|
|
3676
|
-
class
|
|
3791
|
+
class gt extends ar {
|
|
3677
3792
|
/**
|
|
3678
3793
|
* Инициализирует экземпляр класса {@link ContragentUlNr}.
|
|
3679
3794
|
*
|
|
@@ -3684,7 +3799,7 @@ class ut extends mr {
|
|
|
3684
3799
|
/**
|
|
3685
3800
|
* Страна регистрации юридического лица нерезидента.
|
|
3686
3801
|
*/
|
|
3687
|
-
t(this, "registrationCountry", new
|
|
3802
|
+
t(this, "registrationCountry", new ee());
|
|
3688
3803
|
/**
|
|
3689
3804
|
* Регистрационный номер юридического лица нерезидента.
|
|
3690
3805
|
*/
|
|
@@ -3693,10 +3808,10 @@ class ut extends mr {
|
|
|
3693
3808
|
* Налоговый номер юридического лица нерезидента.
|
|
3694
3809
|
*/
|
|
3695
3810
|
t(this, "taxNumber", "");
|
|
3696
|
-
e && (this.registrationCountry = new
|
|
3811
|
+
e && (this.registrationCountry = new ee(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
|
|
3697
3812
|
}
|
|
3698
3813
|
}
|
|
3699
|
-
class
|
|
3814
|
+
class Ce {
|
|
3700
3815
|
/**
|
|
3701
3816
|
* Инициализирует и возвращает экземпляр класса с данными о контрагенте.
|
|
3702
3817
|
*
|
|
@@ -3704,18 +3819,18 @@ class we {
|
|
|
3704
3819
|
*/
|
|
3705
3820
|
static createInstance(r) {
|
|
3706
3821
|
switch (r.opf.slug) {
|
|
3707
|
-
case
|
|
3708
|
-
return new
|
|
3709
|
-
case
|
|
3710
|
-
return new
|
|
3711
|
-
case
|
|
3712
|
-
return new
|
|
3822
|
+
case k.Ic:
|
|
3823
|
+
return new wr(r);
|
|
3824
|
+
case k.UlR:
|
|
3825
|
+
return new ar(r);
|
|
3826
|
+
case k.UlNr:
|
|
3827
|
+
return new gt(r);
|
|
3713
3828
|
default:
|
|
3714
|
-
return new
|
|
3829
|
+
return new ht(r);
|
|
3715
3830
|
}
|
|
3716
3831
|
}
|
|
3717
3832
|
}
|
|
3718
|
-
class
|
|
3833
|
+
class Se extends H {
|
|
3719
3834
|
/**
|
|
3720
3835
|
* Инициализирует экземпляр класса {@link ContactRelation}.
|
|
3721
3836
|
*
|
|
@@ -3730,7 +3845,7 @@ class be extends M {
|
|
|
3730
3845
|
this.isPrimary = e.isPrimary;
|
|
3731
3846
|
}
|
|
3732
3847
|
}
|
|
3733
|
-
class
|
|
3848
|
+
class mt extends M {
|
|
3734
3849
|
/**
|
|
3735
3850
|
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
3736
3851
|
*
|
|
@@ -3755,10 +3870,10 @@ class ht extends j {
|
|
|
3755
3870
|
*/
|
|
3756
3871
|
addresses: []
|
|
3757
3872
|
});
|
|
3758
|
-
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new
|
|
3873
|
+
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new Se(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new Se(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new Se(s))));
|
|
3759
3874
|
}
|
|
3760
3875
|
}
|
|
3761
|
-
class
|
|
3876
|
+
class ve extends Vr {
|
|
3762
3877
|
/**
|
|
3763
3878
|
* Инициализирует экземпляр класса {@link DeliveryAddress}.
|
|
3764
3879
|
*
|
|
@@ -3795,10 +3910,10 @@ class Ce extends Er {
|
|
|
3795
3910
|
* Признак того, что указанный адрес является адресом транспортной компании.
|
|
3796
3911
|
*/
|
|
3797
3912
|
t(this, "isTransportCompanyAddress");
|
|
3798
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new
|
|
3913
|
+
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;
|
|
3799
3914
|
}
|
|
3800
3915
|
}
|
|
3801
|
-
class
|
|
3916
|
+
class Qe extends me {
|
|
3802
3917
|
/**
|
|
3803
3918
|
* Инициализирует экземпляр класса {@link Client}.
|
|
3804
3919
|
*
|
|
@@ -3852,10 +3967,10 @@ class Ee extends ge {
|
|
|
3852
3967
|
* Дополнительные данные о клиенте.
|
|
3853
3968
|
*/
|
|
3854
3969
|
t(this, "extraData");
|
|
3855
|
-
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((p) =>
|
|
3970
|
+
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((p) => Ce.createInstance(p))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((p) => new re(p))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((p) => new M(p))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((p) => new ve(p))) ?? [], 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 Re(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
|
|
3856
3971
|
}
|
|
3857
3972
|
}
|
|
3858
|
-
class
|
|
3973
|
+
class Kt {
|
|
3859
3974
|
/**
|
|
3860
3975
|
* Инициализирует экземпляр класса {@link ClientsListFilters}.
|
|
3861
3976
|
*
|
|
@@ -3951,7 +4066,7 @@ class Jt {
|
|
|
3951
4066
|
*/
|
|
3952
4067
|
t(this, "lastOrder");
|
|
3953
4068
|
var e, s, i, o, c, p;
|
|
3954
|
-
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.cities = (e = r == null ? void 0 : r.cities) == null ? void 0 : e.map((u) => new
|
|
4069
|
+
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.cities = (e = r == null ? void 0 : r.cities) == null ? void 0 : e.map((u) => new Me(u)), 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((u) => new Ae(u)) : [], this.salesDirections = (s = r == null ? void 0 : r.salesDirections) == null ? void 0 : s.map((u) => new N(u)), 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((u) => new re(u)), this.contact = new Ne(r == null ? void 0 : r.contact), this.lastOrder = {
|
|
3955
4070
|
createdAt: new O((o = r == null ? void 0 : r.lastOrder) == null ? void 0 : o.createdAt),
|
|
3956
4071
|
creator: (c = r == null ? void 0 : r.lastOrder) == null ? void 0 : c.creator,
|
|
3957
4072
|
isApproved: (p = r == null ? void 0 : r.lastOrder) == null ? void 0 : p.isApproved
|
|
@@ -3977,7 +4092,7 @@ class Jt {
|
|
|
3977
4092
|
this.cities = [];
|
|
3978
4093
|
break;
|
|
3979
4094
|
case "region":
|
|
3980
|
-
this.region = new
|
|
4095
|
+
this.region = new le();
|
|
3981
4096
|
break;
|
|
3982
4097
|
case "isActive":
|
|
3983
4098
|
this.isActive = !0;
|
|
@@ -4001,16 +4116,16 @@ class Jt {
|
|
|
4001
4116
|
this.salesDirections = [];
|
|
4002
4117
|
break;
|
|
4003
4118
|
case "contragentType":
|
|
4004
|
-
this.contragentType = new
|
|
4119
|
+
this.contragentType = new j();
|
|
4005
4120
|
break;
|
|
4006
4121
|
case "preferredDeliveryType":
|
|
4007
|
-
this.preferredDeliveryType = new
|
|
4122
|
+
this.preferredDeliveryType = new X();
|
|
4008
4123
|
break;
|
|
4009
4124
|
case "partnerGroups":
|
|
4010
4125
|
this.partnerGroups = [];
|
|
4011
4126
|
break;
|
|
4012
4127
|
case "contact":
|
|
4013
|
-
this.contact = new
|
|
4128
|
+
this.contact = new Ne();
|
|
4014
4129
|
break;
|
|
4015
4130
|
}
|
|
4016
4131
|
return this;
|
|
@@ -4025,11 +4140,11 @@ class Jt {
|
|
|
4025
4140
|
return Object.keys(this).forEach((c) => {
|
|
4026
4141
|
const p = this[c];
|
|
4027
4142
|
// eslint-disable-next-line prettier/prettier
|
|
4028
|
-
|
|
4143
|
+
A(p) || w(p) && p.trim().length === 0 || Ue(p.isNewRec) && p.isNewRec() || (r[c] = p);
|
|
4029
4144
|
}), !((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;
|
|
4030
4145
|
}
|
|
4031
4146
|
}
|
|
4032
|
-
class
|
|
4147
|
+
class Cr extends H {
|
|
4033
4148
|
/**
|
|
4034
4149
|
* Инициализирует экземпляр класса {@link OrderShortInfo}.
|
|
4035
4150
|
*
|
|
@@ -4049,10 +4164,10 @@ class fr extends M {
|
|
|
4049
4164
|
* Признак того, что заказ подтвержден в 1С.
|
|
4050
4165
|
*/
|
|
4051
4166
|
t(this, "isApproved1c");
|
|
4052
|
-
this.createdAt =
|
|
4167
|
+
this.createdAt = w(e == null ? void 0 : e.createdAt) ? a(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;
|
|
4053
4168
|
}
|
|
4054
4169
|
}
|
|
4055
|
-
class
|
|
4170
|
+
class ft extends b {
|
|
4056
4171
|
/**
|
|
4057
4172
|
* Инициализирует экземпляр класса {@link ClientAdditionalData}.
|
|
4058
4173
|
*
|
|
@@ -4085,10 +4200,10 @@ class gt extends T {
|
|
|
4085
4200
|
* Список менеджеров.
|
|
4086
4201
|
*/
|
|
4087
4202
|
t(this, "managers");
|
|
4088
|
-
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new
|
|
4203
|
+
(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)));
|
|
4089
4204
|
}
|
|
4090
4205
|
}
|
|
4091
|
-
class
|
|
4206
|
+
class yt {
|
|
4092
4207
|
/**
|
|
4093
4208
|
* Инициализирует экземпляр класса {@link DataTablePaginationRequestParams}.
|
|
4094
4209
|
*
|
|
@@ -4106,7 +4221,7 @@ class mt {
|
|
|
4106
4221
|
this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
|
|
4107
4222
|
}
|
|
4108
4223
|
}
|
|
4109
|
-
class
|
|
4224
|
+
class Qt extends yt {
|
|
4110
4225
|
/**
|
|
4111
4226
|
* Инициализирует экземпляр класса {@link DataTablePagination}.
|
|
4112
4227
|
*
|
|
@@ -4137,7 +4252,7 @@ class Kt extends mt {
|
|
|
4137
4252
|
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;
|
|
4138
4253
|
}
|
|
4139
4254
|
}
|
|
4140
|
-
class
|
|
4255
|
+
class Yt {
|
|
4141
4256
|
/**
|
|
4142
4257
|
* Инициализирует экземпляр класса {@link ISortRequestParams}.
|
|
4143
4258
|
*
|
|
@@ -4155,7 +4270,7 @@ class Qt {
|
|
|
4155
4270
|
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
4156
4271
|
}
|
|
4157
4272
|
}
|
|
4158
|
-
class
|
|
4273
|
+
class Xt extends De {
|
|
4159
4274
|
/**
|
|
4160
4275
|
* Возвращает данные об указанном клиенте.
|
|
4161
4276
|
*
|
|
@@ -4163,7 +4278,7 @@ class Yt extends ae {
|
|
|
4163
4278
|
* @see /doc/api/internal#/Клиенты/api_internal_client_get_full_info
|
|
4164
4279
|
*/
|
|
4165
4280
|
getClient(r) {
|
|
4166
|
-
return this.get(`/internal/clients/${r}`, {}, (e) => new
|
|
4281
|
+
return this.get(`/internal/clients/${r}`, {}, (e) => new Qe(e.data));
|
|
4167
4282
|
}
|
|
4168
4283
|
/**
|
|
4169
4284
|
* Возвращает данные о клиентах, удовлетворяющих указанным параметрам поиска.
|
|
@@ -4178,7 +4293,7 @@ class Yt extends ae {
|
|
|
4178
4293
|
getClientsList(r, e, s, i) {
|
|
4179
4294
|
return this.getPaginated("/internal/clients", r, e, s, i, (o) => {
|
|
4180
4295
|
const c = { ...o.data };
|
|
4181
|
-
return c.data = c.data.map((p) => new
|
|
4296
|
+
return c.data = c.data.map((p) => new me(p)), c;
|
|
4182
4297
|
});
|
|
4183
4298
|
}
|
|
4184
4299
|
/**
|
|
@@ -4191,7 +4306,7 @@ class Yt extends ae {
|
|
|
4191
4306
|
return this.getClientsList({
|
|
4192
4307
|
groupOp: "and",
|
|
4193
4308
|
groups: [],
|
|
4194
|
-
filters: [{ field: "phone", op:
|
|
4309
|
+
filters: [{ field: "phone", op: He.Contains, value: r }]
|
|
4195
4310
|
});
|
|
4196
4311
|
}
|
|
4197
4312
|
/**
|
|
@@ -4205,7 +4320,7 @@ class Yt extends ae {
|
|
|
4205
4320
|
const s = r.map((i) => i.id);
|
|
4206
4321
|
return this.post("/internal/clients/additional-data", { clients: s, requested_data_types: e }, (i) => {
|
|
4207
4322
|
let o = [];
|
|
4208
|
-
return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new
|
|
4323
|
+
return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new ft(c))), o;
|
|
4209
4324
|
});
|
|
4210
4325
|
}
|
|
4211
4326
|
/**
|
|
@@ -4217,7 +4332,7 @@ class Yt extends ae {
|
|
|
4217
4332
|
getAllClientContacts(r) {
|
|
4218
4333
|
return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
|
|
4219
4334
|
let s = [];
|
|
4220
|
-
return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new
|
|
4335
|
+
return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new mt(i))), s;
|
|
4221
4336
|
});
|
|
4222
4337
|
}
|
|
4223
4338
|
/**
|
|
@@ -4247,7 +4362,7 @@ class Yt extends ae {
|
|
|
4247
4362
|
is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients,
|
|
4248
4363
|
preferred_warehouse_id: (s = r.preferredWarehouse) == null ? void 0 : s.id
|
|
4249
4364
|
},
|
|
4250
|
-
(i) => new
|
|
4365
|
+
(i) => new Qe(i.data),
|
|
4251
4366
|
e
|
|
4252
4367
|
);
|
|
4253
4368
|
}
|
|
@@ -4357,11 +4472,11 @@ class Yt extends ae {
|
|
|
4357
4472
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
|
|
4358
4473
|
*/
|
|
4359
4474
|
createContragentClientData(r, e, s = {}) {
|
|
4360
|
-
var u, m,
|
|
4475
|
+
var u, m, C, $, d, I, S, _;
|
|
4361
4476
|
let i;
|
|
4362
4477
|
const o = e, c = e, p = e;
|
|
4363
4478
|
switch (e.opf.slug) {
|
|
4364
|
-
case
|
|
4479
|
+
case k.Ic:
|
|
4365
4480
|
i = {
|
|
4366
4481
|
opf: o.opf.slug,
|
|
4367
4482
|
name: o.name,
|
|
@@ -4379,13 +4494,13 @@ class Yt extends ae {
|
|
|
4379
4494
|
actual_address: o.actualAddress
|
|
4380
4495
|
};
|
|
4381
4496
|
break;
|
|
4382
|
-
case
|
|
4497
|
+
case k.UlR:
|
|
4383
4498
|
i = {
|
|
4384
4499
|
opf: c.opf.slug,
|
|
4385
4500
|
name: c.name,
|
|
4386
4501
|
alternative_name: c.alternativeName,
|
|
4387
|
-
partner_group_id: (
|
|
4388
|
-
manager_id: (
|
|
4502
|
+
partner_group_id: (C = c.partnerGroup) == null ? void 0 : C.id,
|
|
4503
|
+
manager_id: ($ = c.manager) == null ? void 0 : $.id,
|
|
4389
4504
|
comment: c.comment,
|
|
4390
4505
|
inn: c.inn,
|
|
4391
4506
|
kpp: c.kpp,
|
|
@@ -4398,13 +4513,13 @@ class Yt extends ae {
|
|
|
4398
4513
|
actual_address: c.actualAddress
|
|
4399
4514
|
};
|
|
4400
4515
|
break;
|
|
4401
|
-
case
|
|
4516
|
+
case k.UlNr:
|
|
4402
4517
|
i = {
|
|
4403
4518
|
opf: p.opf.slug,
|
|
4404
4519
|
name: p.name,
|
|
4405
4520
|
alternative_name: p.alternativeName,
|
|
4406
|
-
partner_group_id: (
|
|
4407
|
-
manager_id: (
|
|
4521
|
+
partner_group_id: (d = p.partnerGroup) == null ? void 0 : d.id,
|
|
4522
|
+
manager_id: (I = p.manager) == null ? void 0 : I.id,
|
|
4408
4523
|
comment: p.comment,
|
|
4409
4524
|
director_name: p.directorName,
|
|
4410
4525
|
director_position: p.directorPosition,
|
|
@@ -4422,8 +4537,8 @@ class Yt extends ae {
|
|
|
4422
4537
|
opf: e.opf.slug,
|
|
4423
4538
|
name: e.name,
|
|
4424
4539
|
alternative_name: e.alternativeName,
|
|
4425
|
-
partner_group_id: (
|
|
4426
|
-
manager_id: (
|
|
4540
|
+
partner_group_id: (S = e.partnerGroup) == null ? void 0 : S.id,
|
|
4541
|
+
manager_id: (_ = e.manager) == null ? void 0 : _.id,
|
|
4427
4542
|
comment: e.comment
|
|
4428
4543
|
};
|
|
4429
4544
|
break;
|
|
@@ -4431,7 +4546,7 @@ class Yt extends ae {
|
|
|
4431
4546
|
return this.post(
|
|
4432
4547
|
`/internal/clients/${r}/contragents`,
|
|
4433
4548
|
i,
|
|
4434
|
-
(
|
|
4549
|
+
(q) => Ce.createInstance(q.data),
|
|
4435
4550
|
s
|
|
4436
4551
|
);
|
|
4437
4552
|
}
|
|
@@ -4446,11 +4561,11 @@ class Yt extends ae {
|
|
|
4446
4561
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
|
|
4447
4562
|
*/
|
|
4448
4563
|
updateContragentClientData(r, e, s = {}) {
|
|
4449
|
-
var u, m,
|
|
4564
|
+
var u, m, C, $, d, I, S, _;
|
|
4450
4565
|
let i;
|
|
4451
4566
|
const o = e, c = e, p = e;
|
|
4452
4567
|
switch (e.opf.slug) {
|
|
4453
|
-
case
|
|
4568
|
+
case k.Ic:
|
|
4454
4569
|
i = {
|
|
4455
4570
|
opf: o.opf.slug,
|
|
4456
4571
|
name: o.name,
|
|
@@ -4468,13 +4583,13 @@ class Yt extends ae {
|
|
|
4468
4583
|
actual_address: o.actualAddress
|
|
4469
4584
|
};
|
|
4470
4585
|
break;
|
|
4471
|
-
case
|
|
4586
|
+
case k.UlR:
|
|
4472
4587
|
i = {
|
|
4473
4588
|
opf: c.opf.slug,
|
|
4474
4589
|
name: c.name,
|
|
4475
4590
|
alternative_name: c.alternativeName,
|
|
4476
|
-
partner_group_id: (
|
|
4477
|
-
manager_id: (
|
|
4591
|
+
partner_group_id: (C = c.partnerGroup) == null ? void 0 : C.id,
|
|
4592
|
+
manager_id: ($ = c.manager) == null ? void 0 : $.id,
|
|
4478
4593
|
comment: c.comment,
|
|
4479
4594
|
inn: c.inn,
|
|
4480
4595
|
kpp: c.kpp,
|
|
@@ -4487,13 +4602,13 @@ class Yt extends ae {
|
|
|
4487
4602
|
actual_address: c.actualAddress
|
|
4488
4603
|
};
|
|
4489
4604
|
break;
|
|
4490
|
-
case
|
|
4605
|
+
case k.UlNr:
|
|
4491
4606
|
i = {
|
|
4492
4607
|
opf: p.opf.slug,
|
|
4493
4608
|
name: p.name,
|
|
4494
4609
|
alternative_name: p.alternativeName,
|
|
4495
|
-
partner_group_id: (
|
|
4496
|
-
manager_id: (
|
|
4610
|
+
partner_group_id: (d = p.partnerGroup) == null ? void 0 : d.id,
|
|
4611
|
+
manager_id: (I = p.manager) == null ? void 0 : I.id,
|
|
4497
4612
|
comment: p.comment,
|
|
4498
4613
|
director_name: p.directorName,
|
|
4499
4614
|
director_position: p.directorPosition,
|
|
@@ -4511,8 +4626,8 @@ class Yt extends ae {
|
|
|
4511
4626
|
opf: e.opf.slug,
|
|
4512
4627
|
name: e.name,
|
|
4513
4628
|
alternative_name: e.alternativeName,
|
|
4514
|
-
partner_group_id: (
|
|
4515
|
-
manager_id: (
|
|
4629
|
+
partner_group_id: (S = e.partnerGroup) == null ? void 0 : S.id,
|
|
4630
|
+
manager_id: (_ = e.manager) == null ? void 0 : _.id,
|
|
4516
4631
|
comment: e.comment
|
|
4517
4632
|
};
|
|
4518
4633
|
break;
|
|
@@ -4520,7 +4635,7 @@ class Yt extends ae {
|
|
|
4520
4635
|
return this.patch(
|
|
4521
4636
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
4522
4637
|
i,
|
|
4523
|
-
(
|
|
4638
|
+
(q) => Ce.createInstance(q.data),
|
|
4524
4639
|
s
|
|
4525
4640
|
);
|
|
4526
4641
|
}
|
|
@@ -4558,7 +4673,7 @@ class Yt extends ae {
|
|
|
4558
4673
|
}), e.operatingHours && (i.operating_hours = {
|
|
4559
4674
|
from: e.operatingHours.from,
|
|
4560
4675
|
to: e.operatingHours.to
|
|
4561
|
-
}), this.post(`/internal/clients/${r}/delivery-addresses`, i, (p) => new
|
|
4676
|
+
}), this.post(`/internal/clients/${r}/delivery-addresses`, i, (p) => new ve(p.data), s);
|
|
4562
4677
|
}
|
|
4563
4678
|
/**
|
|
4564
4679
|
* Обновляет данные об адресе доставки клиента.
|
|
@@ -4587,7 +4702,7 @@ class Yt extends ae {
|
|
|
4587
4702
|
}), this.patch(
|
|
4588
4703
|
`/internal/clients/${r}/delivery-addresses/${e.id}`,
|
|
4589
4704
|
i,
|
|
4590
|
-
(p) => new
|
|
4705
|
+
(p) => new ve(p.data),
|
|
4591
4706
|
s
|
|
4592
4707
|
);
|
|
4593
4708
|
}
|
|
@@ -4623,7 +4738,7 @@ class Yt extends ae {
|
|
|
4623
4738
|
correspondent_account: s.correspondentAccount,
|
|
4624
4739
|
currency_id: s.currency.id
|
|
4625
4740
|
},
|
|
4626
|
-
(o) => new
|
|
4741
|
+
(o) => new xe(o.data),
|
|
4627
4742
|
i
|
|
4628
4743
|
);
|
|
4629
4744
|
}
|
|
@@ -4649,7 +4764,7 @@ class Yt extends ae {
|
|
|
4649
4764
|
correspondent_account: s.correspondentAccount,
|
|
4650
4765
|
currency_id: s.currency.id
|
|
4651
4766
|
},
|
|
4652
|
-
(o) => new
|
|
4767
|
+
(o) => new xe(o.data),
|
|
4653
4768
|
i
|
|
4654
4769
|
);
|
|
4655
4770
|
}
|
|
@@ -4710,7 +4825,7 @@ class Yt extends ae {
|
|
|
4710
4825
|
comment: e.comment,
|
|
4711
4826
|
not_disturb: e.notDisturb
|
|
4712
4827
|
},
|
|
4713
|
-
(i) => new
|
|
4828
|
+
(i) => new M(i.data),
|
|
4714
4829
|
s
|
|
4715
4830
|
);
|
|
4716
4831
|
}
|
|
@@ -4853,7 +4968,7 @@ class Yt extends ae {
|
|
|
4853
4968
|
comment: e.comment,
|
|
4854
4969
|
...s
|
|
4855
4970
|
};
|
|
4856
|
-
return (c = e.phone) != null && c.length && (o.phone = e.phone), (p = e.email) != null && p.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (u) => new
|
|
4971
|
+
return (c = e.phone) != null && c.length && (o.phone = e.phone), (p = e.email) != null && p.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (u) => new M(u.data), i);
|
|
4857
4972
|
}
|
|
4858
4973
|
/**
|
|
4859
4974
|
* Устанавливает признак основного контактного лица.
|
|
@@ -4882,7 +4997,7 @@ class Yt extends ae {
|
|
|
4882
4997
|
return this.get(`/internal/clients/${r.id}/verification/email?email=${r.email}`);
|
|
4883
4998
|
}
|
|
4884
4999
|
}
|
|
4885
|
-
const
|
|
5000
|
+
const V = class V extends h {
|
|
4886
5001
|
/**
|
|
4887
5002
|
* Инициализирует экземпляр класса {@link HttpCachedRequester}.
|
|
4888
5003
|
*/
|
|
@@ -4892,7 +5007,7 @@ const E = class E extends h {
|
|
|
4892
5007
|
* Время кэширования данных ответов на запросы (секунд).
|
|
4893
5008
|
*/
|
|
4894
5009
|
t(this, "responseDataCacheTimeout");
|
|
4895
|
-
this.responseDataCacheTimeout =
|
|
5010
|
+
this.responseDataCacheTimeout = D.getConfig().http.responseDataCacheTimeout;
|
|
4896
5011
|
}
|
|
4897
5012
|
/**
|
|
4898
5013
|
* Возвращает кэшированные данные.
|
|
@@ -4902,7 +5017,7 @@ const E = class E extends h {
|
|
|
4902
5017
|
*/
|
|
4903
5018
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
4904
5019
|
static getCachedResponse(e) {
|
|
4905
|
-
const s =
|
|
5020
|
+
const s = V.responseDataCache.get(e);
|
|
4906
5021
|
if (s && s.validTo > /* @__PURE__ */ new Date())
|
|
4907
5022
|
return s.val;
|
|
4908
5023
|
}
|
|
@@ -4913,7 +5028,7 @@ const E = class E extends h {
|
|
|
4913
5028
|
* @param data Данные для кэширования.
|
|
4914
5029
|
*/
|
|
4915
5030
|
cacheResponse(e, s) {
|
|
4916
|
-
|
|
5031
|
+
V.responseDataCache.set(e, {
|
|
4917
5032
|
validTo: Ir(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
|
|
4918
5033
|
val: s
|
|
4919
5034
|
});
|
|
@@ -4929,9 +5044,9 @@ const E = class E extends h {
|
|
|
4929
5044
|
*/
|
|
4930
5045
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
4931
5046
|
getTypedDataArrayRequester(e, s, i = !1, o = {}) {
|
|
4932
|
-
const c = s + (
|
|
5047
|
+
const c = s + (Y(o) ? "" : ` >>> ${JSON.stringify(o)}`), p = i ? V.getCachedResponse(c) : void 0;
|
|
4933
5048
|
return p ? Promise.resolve(p) : this.get(s, o).then((u) => {
|
|
4934
|
-
const m = u.map((
|
|
5049
|
+
const m = u.map((C) => Fe.instanceInitializer(e, C));
|
|
4935
5050
|
return i && m && this.cacheResponse(s, m), m;
|
|
4936
5051
|
});
|
|
4937
5052
|
}
|
|
@@ -4939,9 +5054,9 @@ const E = class E extends h {
|
|
|
4939
5054
|
/**
|
|
4940
5055
|
* Кэш результатов запросов.
|
|
4941
5056
|
*/
|
|
4942
|
-
t(
|
|
4943
|
-
let
|
|
4944
|
-
class
|
|
5057
|
+
t(V, "responseDataCache", /* @__PURE__ */ new Map());
|
|
5058
|
+
let ue = V;
|
|
5059
|
+
class Zt extends h {
|
|
4945
5060
|
/**
|
|
4946
5061
|
* Выполняет проверку занят ли указанный номер телефона.
|
|
4947
5062
|
*
|
|
@@ -4955,7 +5070,7 @@ class Xt extends h {
|
|
|
4955
5070
|
});
|
|
4956
5071
|
}
|
|
4957
5072
|
}
|
|
4958
|
-
class
|
|
5073
|
+
class es extends h {
|
|
4959
5074
|
/**
|
|
4960
5075
|
* Возвращает настройки указанного конфигуратора для указанной категории.
|
|
4961
5076
|
*
|
|
@@ -4983,7 +5098,7 @@ class Zt extends h {
|
|
|
4983
5098
|
const i = this.get(
|
|
4984
5099
|
`internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.configurator}/product`,
|
|
4985
5100
|
{ params: e },
|
|
4986
|
-
(c) => new
|
|
5101
|
+
(c) => new x(c.data)
|
|
4987
5102
|
);
|
|
4988
5103
|
return i.catch((c) => {
|
|
4989
5104
|
this.errorResponseHandler(c, s);
|
|
@@ -5026,29 +5141,29 @@ class Zt extends h {
|
|
|
5026
5141
|
return this.delete(`internal/catalog/categories/${r.id}/configurators/${(s = r.properties) == null ? void 0 : s.configurator}/template/${e}`);
|
|
5027
5142
|
}
|
|
5028
5143
|
}
|
|
5029
|
-
class
|
|
5144
|
+
class rs {
|
|
5030
5145
|
/**
|
|
5031
5146
|
* Возвращает диапазон дат по умолчанию.
|
|
5032
5147
|
*/
|
|
5033
5148
|
static defaultDateRanges() {
|
|
5034
|
-
const r =
|
|
5149
|
+
const r = kr(/* @__PURE__ */ new Date(), 1);
|
|
5035
5150
|
return {
|
|
5036
5151
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
5037
|
-
nextWorkingDay: { label: "Следующий рабочий день", from:
|
|
5038
|
-
today: { label: "Сегодня", from:
|
|
5039
|
-
yesterday: { label: "Вчера", from:
|
|
5040
|
-
tomorrow: { label: "Завтра", from:
|
|
5152
|
+
nextWorkingDay: { label: "Следующий рабочий день", from: Gr(r), to: qr(r) },
|
|
5153
|
+
today: { label: "Сегодня", from: ke(), to: Ur() },
|
|
5154
|
+
yesterday: { label: "Вчера", from: Or(), to: Nr() },
|
|
5155
|
+
tomorrow: { label: "Завтра", from: xr(), to: Lr() }
|
|
5041
5156
|
};
|
|
5042
5157
|
}
|
|
5043
5158
|
}
|
|
5044
|
-
const
|
|
5159
|
+
const K = class K {
|
|
5045
5160
|
/**
|
|
5046
5161
|
* Устанавливает список единиц измерения линейной величины.
|
|
5047
5162
|
*
|
|
5048
5163
|
* @param linearValues Список единиц измерения линейной величины.
|
|
5049
5164
|
*/
|
|
5050
5165
|
static setLinearValues(r) {
|
|
5051
|
-
|
|
5166
|
+
K.linearValues = r;
|
|
5052
5167
|
}
|
|
5053
5168
|
/**
|
|
5054
5169
|
* Возвращает признак, что указанный товар имеет линейную единицу измерения.
|
|
@@ -5056,7 +5171,7 @@ const V = class V {
|
|
|
5056
5171
|
* @param product Данные о товаре для которого нужно проверить линейность его единицы измерения.
|
|
5057
5172
|
*/
|
|
5058
5173
|
static productIsMeasurable(r) {
|
|
5059
|
-
return
|
|
5174
|
+
return K.linearValues.includes(r.unit);
|
|
5060
5175
|
}
|
|
5061
5176
|
/**
|
|
5062
5177
|
* Возвращает кратность количества для указанного товара.
|
|
@@ -5065,7 +5180,7 @@ const V = class V {
|
|
|
5065
5180
|
*/
|
|
5066
5181
|
static getProductMultiplicity(r) {
|
|
5067
5182
|
var e, s;
|
|
5068
|
-
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((s = r.properties) != null && s.minCount) && !
|
|
5183
|
+
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((s = r.properties) != null && s.minCount) && !K.productIsMeasurable(r) ? r.properties.minCount : 1;
|
|
5069
5184
|
}
|
|
5070
5185
|
/**
|
|
5071
5186
|
* Возвращает кратность длины для указанного товара.
|
|
@@ -5080,9 +5195,9 @@ const V = class V {
|
|
|
5080
5195
|
/**
|
|
5081
5196
|
* Список единиц измерения линейной величины.
|
|
5082
5197
|
*/
|
|
5083
|
-
t(
|
|
5084
|
-
let
|
|
5085
|
-
class
|
|
5198
|
+
t(K, "linearValues", ["пог.м.", "м.", "м2"]);
|
|
5199
|
+
let Ye = K;
|
|
5200
|
+
class ts {
|
|
5086
5201
|
/**
|
|
5087
5202
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
5088
5203
|
*/
|
|
@@ -5098,26 +5213,26 @@ class rs {
|
|
|
5098
5213
|
return r.id === 0 && r.guid === "-undefined-";
|
|
5099
5214
|
}
|
|
5100
5215
|
}
|
|
5101
|
-
class
|
|
5216
|
+
class wt extends ue {
|
|
5102
5217
|
/**
|
|
5103
5218
|
* Возвращает {@link Promise} для получения справочника списка менеджеров.
|
|
5104
5219
|
*/
|
|
5105
5220
|
async getManagers() {
|
|
5106
|
-
const r = "/internal/managers", e =
|
|
5221
|
+
const r = "/internal/managers", e = ue.getCachedResponse(r);
|
|
5107
5222
|
if (e)
|
|
5108
5223
|
return e;
|
|
5109
|
-
const i = (await this.get(r)).data.map((o) =>
|
|
5224
|
+
const i = (await this.get(r)).data.map((o) => Fe.instanceInitializer(Ae, o));
|
|
5110
5225
|
return this.cacheResponse(r, i), i;
|
|
5111
5226
|
}
|
|
5112
5227
|
}
|
|
5113
|
-
class
|
|
5228
|
+
class vr extends Cr {
|
|
5114
5229
|
/**
|
|
5115
5230
|
* Инициализирует экземпляр класса {@link OrderInfo}.
|
|
5116
5231
|
*
|
|
5117
5232
|
* @param data Данные для первоначальной инициализации.
|
|
5118
5233
|
*/
|
|
5119
5234
|
constructor(e) {
|
|
5120
|
-
var s, i, o, c, p, u, m,
|
|
5235
|
+
var s, i, o, c, p, u, m, C;
|
|
5121
5236
|
super(e);
|
|
5122
5237
|
/**
|
|
5123
5238
|
* Краткие данные о клиенте.
|
|
@@ -5159,19 +5274,19 @@ class yr extends fr {
|
|
|
5159
5274
|
* Признак того, что заказ создан из товаров, которые имеют признак "Нет в наличии".
|
|
5160
5275
|
*/
|
|
5161
5276
|
t(this, "isNotInStock");
|
|
5162
|
-
this.client = new
|
|
5277
|
+
this.client = new me(e == null ? void 0 : e.client), this.payment = {
|
|
5163
5278
|
type: ((s = e == null ? void 0 : e.payment) == null ? void 0 : s.type) ?? -1,
|
|
5164
5279
|
status: ((i = e == null ? void 0 : e.payment) == null ? void 0 : i.status) ?? -1,
|
|
5165
5280
|
onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
|
|
5166
5281
|
}, this.delivery = {
|
|
5167
5282
|
type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
|
|
5168
|
-
date:
|
|
5169
|
-
address: (m = e == null ? void 0 : e.delivery) != null && m.address ? new
|
|
5170
|
-
warehouse: (
|
|
5171
|
-
}, this.attachedUser = new
|
|
5283
|
+
date: w((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ? a(e.delivery.date) : ((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ?? /* @__PURE__ */ new Date(),
|
|
5284
|
+
address: (m = e == null ? void 0 : e.delivery) != null && m.address ? new ve(e.delivery.address) : void 0,
|
|
5285
|
+
warehouse: (C = e == null ? void 0 : e.delivery) != null && C.warehouse ? new Re(e.delivery.warehouse) : void 0
|
|
5286
|
+
}, 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 = w(e == null ? void 0 : e.pendingAt) ? a(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = w(e == null ? void 0 : e.processedAt) ? a(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;
|
|
5172
5287
|
}
|
|
5173
5288
|
}
|
|
5174
|
-
class
|
|
5289
|
+
class at extends H {
|
|
5175
5290
|
/**
|
|
5176
5291
|
* Инициализирует экземпляр класса {@link OrderProduct}.
|
|
5177
5292
|
*
|
|
@@ -5251,10 +5366,10 @@ class yt extends M {
|
|
|
5251
5366
|
* который соответствует указанной ширине. Количество не ограничено.
|
|
5252
5367
|
*/
|
|
5253
5368
|
t(this, "sawing");
|
|
5254
|
-
this.product = new
|
|
5369
|
+
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;
|
|
5255
5370
|
}
|
|
5256
5371
|
}
|
|
5257
|
-
class
|
|
5372
|
+
class Ct extends vr {
|
|
5258
5373
|
/**
|
|
5259
5374
|
* Инициализирует экземпляр класса {@link Order}.
|
|
5260
5375
|
*
|
|
@@ -5294,10 +5409,10 @@ class wt extends yr {
|
|
|
5294
5409
|
* Признак, что разрешена передача заказа в работу без оплаты.
|
|
5295
5410
|
*/
|
|
5296
5411
|
t(this, "isAllowProcessingWithoutPayment");
|
|
5297
|
-
this.products = (e.products ?? []).map((s) => new
|
|
5412
|
+
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;
|
|
5298
5413
|
}
|
|
5299
5414
|
}
|
|
5300
|
-
class
|
|
5415
|
+
class ss extends De {
|
|
5301
5416
|
/**
|
|
5302
5417
|
* Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
|
|
5303
5418
|
*
|
|
@@ -5310,7 +5425,7 @@ class ts extends ae {
|
|
|
5310
5425
|
getOrders(r, e, s) {
|
|
5311
5426
|
return this.getPaginated("/internal/orders", r, e ? [e] : void 0, s, {}, (i) => {
|
|
5312
5427
|
const o = { ...i.data };
|
|
5313
|
-
return o.data = o.data.map((c) => new
|
|
5428
|
+
return o.data = o.data.map((c) => new vr(c)), o;
|
|
5314
5429
|
});
|
|
5315
5430
|
}
|
|
5316
5431
|
/**
|
|
@@ -5328,7 +5443,7 @@ class ts extends ae {
|
|
|
5328
5443
|
* @param orderId Идентификатор заказа для которого необходимо вернуть данные.
|
|
5329
5444
|
*/
|
|
5330
5445
|
getOrder(r) {
|
|
5331
|
-
return this.get(`/internal/orders/${r}`, {}, (e) => new
|
|
5446
|
+
return this.get(`/internal/orders/${r}`, {}, (e) => new Ct(e.data));
|
|
5332
5447
|
}
|
|
5333
5448
|
}
|
|
5334
5449
|
class _e {
|
|
@@ -5358,12 +5473,12 @@ class _e {
|
|
|
5358
5473
|
* Источник клиентской цены.
|
|
5359
5474
|
*/
|
|
5360
5475
|
t(this, "source");
|
|
5361
|
-
this.client = new
|
|
5476
|
+
this.client = new me(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;
|
|
5362
5477
|
}
|
|
5363
5478
|
}
|
|
5364
|
-
const
|
|
5479
|
+
const de = (n) => {
|
|
5365
5480
|
var r, e, s, i, o;
|
|
5366
|
-
return n ?
|
|
5481
|
+
return n ? sr(
|
|
5367
5482
|
{
|
|
5368
5483
|
cities: (r = n.cities) == null ? void 0 : r.map((c) => c.id),
|
|
5369
5484
|
clients: (e = n.clients) == null ? void 0 : e.map((c) => c.id),
|
|
@@ -5372,13 +5487,13 @@ const Se = (n) => {
|
|
|
5372
5487
|
salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
|
|
5373
5488
|
hideNotActive: n.hideNotActive
|
|
5374
5489
|
},
|
|
5375
|
-
(c) =>
|
|
5490
|
+
(c) => A(c) || (Q(c) || ir(c)) && Y(c)
|
|
5376
5491
|
) : {};
|
|
5377
|
-
},
|
|
5492
|
+
}, Xe = (n) => {
|
|
5378
5493
|
const r = {};
|
|
5379
5494
|
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;
|
|
5380
5495
|
};
|
|
5381
|
-
class
|
|
5496
|
+
class is extends h {
|
|
5382
5497
|
/**
|
|
5383
5498
|
* Возвращает список клиентских цен на продукты в указанном диапазоне цены.
|
|
5384
5499
|
*
|
|
@@ -5392,8 +5507,8 @@ class ss extends h {
|
|
|
5392
5507
|
return this.get(
|
|
5393
5508
|
`/internal/price/products/${r}/analyze`,
|
|
5394
5509
|
{
|
|
5395
|
-
...
|
|
5396
|
-
filters:
|
|
5510
|
+
...Xe(e),
|
|
5511
|
+
filters: de(s)
|
|
5397
5512
|
},
|
|
5398
5513
|
(i) => i.data.map((o) => new _e(o))
|
|
5399
5514
|
);
|
|
@@ -5411,8 +5526,8 @@ class ss extends h {
|
|
|
5411
5526
|
return this.get(
|
|
5412
5527
|
`/internal/price/categories/${r}/analyze`,
|
|
5413
5528
|
{
|
|
5414
|
-
...
|
|
5415
|
-
filters:
|
|
5529
|
+
...Xe(e),
|
|
5530
|
+
filters: de(s)
|
|
5416
5531
|
},
|
|
5417
5532
|
(i) => i.data.map((o) => new _e(o))
|
|
5418
5533
|
);
|
|
@@ -5433,13 +5548,13 @@ class ss extends h {
|
|
|
5433
5548
|
`/internal/price/categories/${r}/analyze/square`,
|
|
5434
5549
|
{
|
|
5435
5550
|
...e,
|
|
5436
|
-
filters:
|
|
5551
|
+
filters: de(s)
|
|
5437
5552
|
},
|
|
5438
5553
|
(i) => i.data.map((o) => new _e(o))
|
|
5439
5554
|
);
|
|
5440
5555
|
}
|
|
5441
5556
|
}
|
|
5442
|
-
class
|
|
5557
|
+
class vt {
|
|
5443
5558
|
/**
|
|
5444
5559
|
* Инициализирует экземпляр класса {@link PriceHistoryItem}.
|
|
5445
5560
|
*
|
|
@@ -5486,10 +5601,10 @@ class Ct {
|
|
|
5486
5601
|
* @inheritDoc
|
|
5487
5602
|
*/
|
|
5488
5603
|
t(this, "currency");
|
|
5489
|
-
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate =
|
|
5604
|
+
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = w(r.costDate) ? a(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;
|
|
5490
5605
|
}
|
|
5491
5606
|
}
|
|
5492
|
-
class
|
|
5607
|
+
class Pt extends oe {
|
|
5493
5608
|
/**
|
|
5494
5609
|
* Инициализирует экземпляр класса {@link ProductPriceHistory}.
|
|
5495
5610
|
*
|
|
@@ -5501,15 +5616,15 @@ class vt extends ne {
|
|
|
5501
5616
|
* @inheritDoc
|
|
5502
5617
|
*/
|
|
5503
5618
|
t(this, "history");
|
|
5504
|
-
this.history =
|
|
5619
|
+
this.history = he(e.history, (s) => new vt(s));
|
|
5505
5620
|
}
|
|
5506
5621
|
}
|
|
5507
|
-
class
|
|
5622
|
+
class ns extends h {
|
|
5508
5623
|
/**
|
|
5509
5624
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
5510
5625
|
*/
|
|
5511
5626
|
constructor() {
|
|
5512
|
-
super(), this.baseUrl = `${
|
|
5627
|
+
super(), this.baseUrl = `${D.getConfig().http.priceHistoryApiUrl ?? ""}/api`;
|
|
5513
5628
|
}
|
|
5514
5629
|
/**
|
|
5515
5630
|
* Возвращает данные об истории изменения цен.
|
|
@@ -5520,19 +5635,19 @@ class is extends h {
|
|
|
5520
5635
|
*/
|
|
5521
5636
|
getProductPriceHistory(r) {
|
|
5522
5637
|
var i, o, c, p;
|
|
5523
|
-
const e =
|
|
5524
|
-
|
|
5638
|
+
const e = D.getConfig().dateFormats.api, s = sr(
|
|
5639
|
+
Oe(r, {
|
|
5525
5640
|
costDate: {
|
|
5526
|
-
from: Ie((i = r.costDate) == null ? void 0 : i.from) ?
|
|
5527
|
-
to: Ie((c = r.costDate) == null ? void 0 : c.to) ?
|
|
5641
|
+
from: Ie((i = r.costDate) == null ? void 0 : i.from) ? U(r.costDate.from, e) : (o = r.costDate) == null ? void 0 : o.from,
|
|
5642
|
+
to: Ie((c = r.costDate) == null ? void 0 : c.to) ? U(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
|
|
5528
5643
|
}
|
|
5529
5644
|
}),
|
|
5530
|
-
(u) =>
|
|
5645
|
+
(u) => A(u) || (Q(u) || ir(u)) && Y(u)
|
|
5531
5646
|
);
|
|
5532
|
-
return this.get("/internal/history", s, (u) =>
|
|
5647
|
+
return this.get("/internal/history", s, (u) => he(u.data, (m) => new Pt(m)));
|
|
5533
5648
|
}
|
|
5534
5649
|
}
|
|
5535
|
-
class
|
|
5650
|
+
class Ze {
|
|
5536
5651
|
/**
|
|
5537
5652
|
* Инициализирует экземпляр класса {@link RecommendationsList}.
|
|
5538
5653
|
*
|
|
@@ -5547,15 +5662,15 @@ class Ke {
|
|
|
5547
5662
|
* Список рекомендованных категорий продуктов.
|
|
5548
5663
|
*/
|
|
5549
5664
|
t(this, "productCategories", []);
|
|
5550
|
-
r != null && r.products && (this.products = r.products.map((e) => new
|
|
5665
|
+
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)));
|
|
5551
5666
|
}
|
|
5552
5667
|
}
|
|
5553
|
-
class
|
|
5668
|
+
class os extends h {
|
|
5554
5669
|
/**
|
|
5555
5670
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
5556
5671
|
*/
|
|
5557
5672
|
constructor() {
|
|
5558
|
-
super(), this.baseUrl = `${
|
|
5673
|
+
super(), this.baseUrl = `${D.getConfig().http.recommendationsApiUrl ?? ""}/api`;
|
|
5559
5674
|
}
|
|
5560
5675
|
/**
|
|
5561
5676
|
* Возвращает данные о рекомендациях указанной категории продуктов.
|
|
@@ -5564,7 +5679,7 @@ class ns extends h {
|
|
|
5564
5679
|
* @see /docs/api#/operations/api_internal_recommendations_product_category_get
|
|
5565
5680
|
*/
|
|
5566
5681
|
getProductCategoryRecommendations(r) {
|
|
5567
|
-
return this.get(`/internal/recommendations/categories/${r.id}`, {}, (e) => new
|
|
5682
|
+
return this.get(`/internal/recommendations/categories/${r.id}`, {}, (e) => new Ze(e.data));
|
|
5568
5683
|
}
|
|
5569
5684
|
/**
|
|
5570
5685
|
* Возвращает данные о рекомендациях указанного продукта.
|
|
@@ -5573,7 +5688,7 @@ class ns extends h {
|
|
|
5573
5688
|
* @see /docs/api#/operations/api_internal_recommendations_product_get
|
|
5574
5689
|
*/
|
|
5575
5690
|
getProductRecommendations(r) {
|
|
5576
|
-
return this.get(`/internal/recommendations/products/${r.id}`, {}, (e) => new
|
|
5691
|
+
return this.get(`/internal/recommendations/products/${r.id}`, {}, (e) => new Ze(e.data));
|
|
5577
5692
|
}
|
|
5578
5693
|
/**
|
|
5579
5694
|
* Выполняет сохранение данных о рекомендуемых категориях продуктов.
|
|
@@ -5602,7 +5717,7 @@ class ns extends h {
|
|
|
5602
5717
|
});
|
|
5603
5718
|
}
|
|
5604
5719
|
}
|
|
5605
|
-
class
|
|
5720
|
+
class T extends ue {
|
|
5606
5721
|
/**
|
|
5607
5722
|
* Возвращает {@link Promise} для получения данных указанного справочника.
|
|
5608
5723
|
*
|
|
@@ -5611,75 +5726,75 @@ class D extends pe {
|
|
|
5611
5726
|
* и использовать в случае аналогичных запросов.
|
|
5612
5727
|
*/
|
|
5613
5728
|
getReference(r, e = !1) {
|
|
5614
|
-
return this.getTypedDataArrayRequester(
|
|
5729
|
+
return this.getTypedDataArrayRequester(nt, `/internal/references/${r}`, e);
|
|
5615
5730
|
}
|
|
5616
5731
|
/**
|
|
5617
5732
|
* Возвращает {@link Promise} для получения справочника данных о канале
|
|
5618
5733
|
* первичного интереса.
|
|
5619
5734
|
*/
|
|
5620
5735
|
getChannelPrimaryInterest() {
|
|
5621
|
-
return this.getTypedDataArrayRequester(
|
|
5736
|
+
return this.getTypedDataArrayRequester(gr, "/internal/references/channel-primary-interest", !0);
|
|
5622
5737
|
}
|
|
5623
5738
|
/**
|
|
5624
5739
|
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
5625
5740
|
*/
|
|
5626
5741
|
getContactPositions() {
|
|
5627
|
-
return this.getTypedDataArrayRequester(
|
|
5742
|
+
return this.getTypedDataArrayRequester(ot, "/internal/references/contact-position", !0);
|
|
5628
5743
|
}
|
|
5629
5744
|
/**
|
|
5630
5745
|
* Возвращает {@link Promise} для получения справочника списка валют.
|
|
5631
5746
|
*/
|
|
5632
5747
|
getCurrency() {
|
|
5633
|
-
return this.getTypedDataArrayRequester(
|
|
5748
|
+
return this.getTypedDataArrayRequester(ae, "/public/references/currency", !0);
|
|
5634
5749
|
}
|
|
5635
5750
|
/**
|
|
5636
5751
|
* Возвращает {@link Promise} для получения справочника данных
|
|
5637
5752
|
* групп партнеров (направлений деятельности).
|
|
5638
5753
|
*/
|
|
5639
5754
|
getPartnerGroup() {
|
|
5640
|
-
return this.getTypedDataArrayRequester(
|
|
5755
|
+
return this.getTypedDataArrayRequester(re, "/internal/references/partner-group", !0);
|
|
5641
5756
|
}
|
|
5642
5757
|
/**
|
|
5643
5758
|
* Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
|
|
5644
5759
|
*/
|
|
5645
5760
|
getOpf() {
|
|
5646
|
-
return this.getTypedDataArrayRequester(
|
|
5761
|
+
return this.getTypedDataArrayRequester(j, "/public/references/opf", !0);
|
|
5647
5762
|
}
|
|
5648
5763
|
/**
|
|
5649
5764
|
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
5650
5765
|
*/
|
|
5651
5766
|
getOrderPaymentStatuses() {
|
|
5652
|
-
return this.getTypedDataArrayRequester(
|
|
5767
|
+
return this.getTypedDataArrayRequester(ct, "/public/references/order-payment-status", !0);
|
|
5653
5768
|
}
|
|
5654
5769
|
/**
|
|
5655
5770
|
* Возвращает {@link Promise} для получения справочника данных статусов заказов.
|
|
5656
5771
|
*/
|
|
5657
5772
|
getOrderStatuses() {
|
|
5658
|
-
return this.getTypedDataArrayRequester(
|
|
5773
|
+
return this.getTypedDataArrayRequester(lt, "/public/references/order-status", !0);
|
|
5659
5774
|
}
|
|
5660
5775
|
/**
|
|
5661
5776
|
* Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
|
|
5662
5777
|
*/
|
|
5663
5778
|
getPaymentTypes() {
|
|
5664
|
-
return this.getTypedDataArrayRequester(
|
|
5779
|
+
return this.getTypedDataArrayRequester(pt, "/public/references/payment-type", !0);
|
|
5665
5780
|
}
|
|
5666
5781
|
/**
|
|
5667
5782
|
* Возвращает {@link Promise} для получения справочника типов ресурсов.
|
|
5668
5783
|
*/
|
|
5669
5784
|
getResourceTypes() {
|
|
5670
|
-
return this.getTypedDataArrayRequester(
|
|
5785
|
+
return this.getTypedDataArrayRequester(mr, "/internal/references/resource-type", !0);
|
|
5671
5786
|
}
|
|
5672
5787
|
/**
|
|
5673
5788
|
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
5674
5789
|
*/
|
|
5675
5790
|
getSalesDirections() {
|
|
5676
|
-
return this.getTypedDataArrayRequester(
|
|
5791
|
+
return this.getTypedDataArrayRequester(N, "/public/references/sales-direction", !0);
|
|
5677
5792
|
}
|
|
5678
5793
|
/**
|
|
5679
5794
|
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
5680
5795
|
*/
|
|
5681
5796
|
getSourcePrimaryInterest() {
|
|
5682
|
-
return this.getTypedDataArrayRequester(
|
|
5797
|
+
return this.getTypedDataArrayRequester(fr, "/internal/references/source-primary-interest", !0);
|
|
5683
5798
|
}
|
|
5684
5799
|
/**
|
|
5685
5800
|
* Выполняет поиск данных о городах по терму в названии.
|
|
@@ -5687,7 +5802,7 @@ class D extends pe {
|
|
|
5687
5802
|
* @param term Терм поиска.
|
|
5688
5803
|
*/
|
|
5689
5804
|
searchCity(r) {
|
|
5690
|
-
return this.getTypedDataArrayRequester(
|
|
5805
|
+
return this.getTypedDataArrayRequester(Me, `/internal/references/city-with-region-and-country/search?term=${r}`);
|
|
5691
5806
|
}
|
|
5692
5807
|
/**
|
|
5693
5808
|
* Выполняет поиск данных о регионах по терму в названии.
|
|
@@ -5695,7 +5810,7 @@ class D extends pe {
|
|
|
5695
5810
|
* @param term Терм поиска.
|
|
5696
5811
|
*/
|
|
5697
5812
|
searchRegion(r) {
|
|
5698
|
-
return this.getTypedDataArrayRequester(
|
|
5813
|
+
return this.getTypedDataArrayRequester(le, `/internal/references/region-with-country/search?term=${r}`);
|
|
5699
5814
|
}
|
|
5700
5815
|
/**
|
|
5701
5816
|
* Выполняет поиск данных о странах по терму в названии.
|
|
@@ -5703,13 +5818,13 @@ class D extends pe {
|
|
|
5703
5818
|
* @param term Терм поиска.
|
|
5704
5819
|
*/
|
|
5705
5820
|
searchCountry(r) {
|
|
5706
|
-
return this.getTypedDataArrayRequester(
|
|
5821
|
+
return this.getTypedDataArrayRequester(ee, `/internal/references/country/search?term=${r}`);
|
|
5707
5822
|
}
|
|
5708
5823
|
/**
|
|
5709
5824
|
* Возвращает {@link Promise} для получения справочника типов доставки.
|
|
5710
5825
|
*/
|
|
5711
5826
|
getDeliveryTypes() {
|
|
5712
|
-
return this.getTypedDataArrayRequester(
|
|
5827
|
+
return this.getTypedDataArrayRequester(X, "/internal/references/delivery-type", !0);
|
|
5713
5828
|
}
|
|
5714
5829
|
/**
|
|
5715
5830
|
* Возвращает {@link Promise} для получения справочника складов.
|
|
@@ -5721,7 +5836,7 @@ class D extends pe {
|
|
|
5721
5836
|
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
5722
5837
|
*/
|
|
5723
5838
|
getPropertyTypes() {
|
|
5724
|
-
return this.getTypedDataArrayRequester(
|
|
5839
|
+
return this.getTypedDataArrayRequester(hr, "/internal/references/property-type", !0);
|
|
5725
5840
|
}
|
|
5726
5841
|
/**
|
|
5727
5842
|
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
@@ -5733,11 +5848,11 @@ class D extends pe {
|
|
|
5733
5848
|
* Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
|
|
5734
5849
|
*/
|
|
5735
5850
|
getProductFileType() {
|
|
5736
|
-
return this.getTypedDataArrayRequester(
|
|
5851
|
+
return this.getTypedDataArrayRequester(ut, "/public/references/product-file-type", !0);
|
|
5737
5852
|
}
|
|
5738
5853
|
}
|
|
5739
|
-
const
|
|
5740
|
-
const n = f({}), r = f(void 0), e = f(void 0), s = f(void 0), i = f(void 0), o = f(void 0), c = f(void 0), p = f(void 0), u = f(void 0), m = f(void 0),
|
|
5854
|
+
const R = te("__references_private", () => {
|
|
5855
|
+
const n = f({}), r = f(void 0), e = f(void 0), s = f(void 0), i = f(void 0), o = f(void 0), c = f(void 0), p = f(void 0), u = f(void 0), m = f(void 0), C = f(void 0), $ = f(void 0), d = f(void 0), I = f(void 0), S = f(void 0), _ = f(void 0), q = f(void 0), l = f(void 0);
|
|
5741
5856
|
return {
|
|
5742
5857
|
/**
|
|
5743
5858
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -5782,122 +5897,122 @@ const A = Z("__references_private", () => {
|
|
|
5782
5897
|
/**
|
|
5783
5898
|
* Справочник групп партнеров.
|
|
5784
5899
|
*/
|
|
5785
|
-
partnerGroupReference:
|
|
5900
|
+
partnerGroupReference: C,
|
|
5786
5901
|
/**
|
|
5787
5902
|
* Справочник типов файлов продукктов/категорий.
|
|
5788
5903
|
*/
|
|
5789
|
-
productFileTypeReference:
|
|
5904
|
+
productFileTypeReference: $,
|
|
5790
5905
|
/**
|
|
5791
5906
|
* Справочник типов ресурсов.
|
|
5792
5907
|
*/
|
|
5793
|
-
resourceTypesReference:
|
|
5908
|
+
resourceTypesReference: d,
|
|
5794
5909
|
/**
|
|
5795
5910
|
* Справочник направлений продаж.
|
|
5796
5911
|
*/
|
|
5797
|
-
salesDirectionsReference:
|
|
5912
|
+
salesDirectionsReference: I,
|
|
5798
5913
|
/**
|
|
5799
5914
|
* Справочник источников первичного интереса.
|
|
5800
5915
|
*/
|
|
5801
|
-
sourcePrimaryInterestReference:
|
|
5916
|
+
sourcePrimaryInterestReference: S,
|
|
5802
5917
|
/**
|
|
5803
5918
|
* Справочник складов.
|
|
5804
5919
|
*/
|
|
5805
|
-
warehousesReference:
|
|
5920
|
+
warehousesReference: _,
|
|
5806
5921
|
/**
|
|
5807
5922
|
* Справочник типов свойств.
|
|
5808
5923
|
*/
|
|
5809
|
-
propertyTypesReference:
|
|
5924
|
+
propertyTypesReference: q,
|
|
5810
5925
|
/**
|
|
5811
5926
|
* Справочник коэффициентов цен.
|
|
5812
5927
|
*/
|
|
5813
5928
|
priceCoefficientsReference: l
|
|
5814
5929
|
};
|
|
5815
|
-
}),
|
|
5816
|
-
const n =
|
|
5817
|
-
const l =
|
|
5818
|
-
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(
|
|
5930
|
+
}), cs = te("references", () => {
|
|
5931
|
+
const n = P(() => {
|
|
5932
|
+
const l = R();
|
|
5933
|
+
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(T).getChannelPrimaryInterest().then((g) => {
|
|
5819
5934
|
l.channelPrimaryInterestReference = g;
|
|
5820
|
-
}).catch(
|
|
5821
|
-
}), r =
|
|
5822
|
-
const l =
|
|
5823
|
-
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(
|
|
5935
|
+
}).catch(y)), l.channelPrimaryInterestReference;
|
|
5936
|
+
}), r = P(() => {
|
|
5937
|
+
const l = R();
|
|
5938
|
+
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(T).getContactPositions().then((g) => {
|
|
5824
5939
|
l.contactPositionsReference = g;
|
|
5825
|
-
}).catch(
|
|
5826
|
-
}), e =
|
|
5827
|
-
const l =
|
|
5828
|
-
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(
|
|
5940
|
+
}).catch(y)), l.contactPositionsReference;
|
|
5941
|
+
}), e = P(() => {
|
|
5942
|
+
const l = R();
|
|
5943
|
+
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(T).getCurrency().then((g) => {
|
|
5829
5944
|
l.currencyReference = g;
|
|
5830
|
-
}).catch(
|
|
5831
|
-
}), s =
|
|
5832
|
-
const l =
|
|
5833
|
-
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(
|
|
5945
|
+
}).catch(y)), l.currencyReference;
|
|
5946
|
+
}), s = P(() => {
|
|
5947
|
+
const l = R();
|
|
5948
|
+
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(T).getOpf().then((g) => {
|
|
5834
5949
|
l.opfReference = g;
|
|
5835
|
-
}).catch(
|
|
5836
|
-
}), i =
|
|
5837
|
-
const l =
|
|
5838
|
-
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(
|
|
5950
|
+
}).catch(y)), l.opfReference;
|
|
5951
|
+
}), i = P(() => {
|
|
5952
|
+
const l = R();
|
|
5953
|
+
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(T).getOrderPaymentStatuses().then((g) => {
|
|
5839
5954
|
l.orderPaymentStatusReference = g;
|
|
5840
|
-
}).catch(
|
|
5841
|
-
}), o =
|
|
5842
|
-
const l =
|
|
5843
|
-
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(
|
|
5955
|
+
}).catch(y)), l.orderPaymentStatusReference;
|
|
5956
|
+
}), o = P(() => {
|
|
5957
|
+
const l = R();
|
|
5958
|
+
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(T).getOrderStatuses().then((g) => {
|
|
5844
5959
|
l.orderStatusReference = g;
|
|
5845
|
-
}).catch(
|
|
5846
|
-
}), c =
|
|
5847
|
-
const l =
|
|
5848
|
-
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(
|
|
5960
|
+
}).catch(y)), l.orderStatusReference;
|
|
5961
|
+
}), c = P(() => {
|
|
5962
|
+
const l = R();
|
|
5963
|
+
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(T).getPaymentTypes().then((g) => {
|
|
5849
5964
|
l.paymentTypeReference = g;
|
|
5850
|
-
}).catch(
|
|
5851
|
-
}), p =
|
|
5852
|
-
const l =
|
|
5853
|
-
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(
|
|
5965
|
+
}).catch(y)), l.paymentTypeReference;
|
|
5966
|
+
}), p = P(() => {
|
|
5967
|
+
const l = R();
|
|
5968
|
+
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(T).getPartnerGroup().then((g) => {
|
|
5854
5969
|
l.partnerGroupReference = g;
|
|
5855
|
-
}).catch(
|
|
5856
|
-
}), u =
|
|
5857
|
-
const l =
|
|
5858
|
-
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(
|
|
5970
|
+
}).catch(y)), l.partnerGroupReference;
|
|
5971
|
+
}), u = P(() => {
|
|
5972
|
+
const l = R();
|
|
5973
|
+
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(T).getProductFileType().then((g) => {
|
|
5859
5974
|
l.productFileTypeReference = g;
|
|
5860
|
-
}).catch(
|
|
5861
|
-
}), m =
|
|
5862
|
-
const l =
|
|
5863
|
-
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(
|
|
5975
|
+
}).catch(y)), l.productFileTypeReference;
|
|
5976
|
+
}), m = P(() => {
|
|
5977
|
+
const l = R();
|
|
5978
|
+
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(T).getResourceTypes().then((g) => {
|
|
5864
5979
|
l.resourceTypesReference = g;
|
|
5865
|
-
}).catch(
|
|
5866
|
-
}),
|
|
5867
|
-
const l =
|
|
5868
|
-
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(
|
|
5980
|
+
}).catch(y)), l.resourceTypesReference;
|
|
5981
|
+
}), C = P(() => {
|
|
5982
|
+
const l = R();
|
|
5983
|
+
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(T).getSalesDirections().then((g) => {
|
|
5869
5984
|
l.salesDirectionsReference = g;
|
|
5870
|
-
}).catch(
|
|
5871
|
-
}),
|
|
5872
|
-
const l =
|
|
5873
|
-
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(
|
|
5985
|
+
}).catch(y)), l.salesDirectionsReference;
|
|
5986
|
+
}), $ = P(() => {
|
|
5987
|
+
const l = R();
|
|
5988
|
+
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(T).getSourcePrimaryInterest().then((g) => {
|
|
5874
5989
|
l.sourcePrimaryInterestReference = g;
|
|
5875
|
-
}).catch(
|
|
5876
|
-
}),
|
|
5877
|
-
const l =
|
|
5878
|
-
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(
|
|
5990
|
+
}).catch(y)), l.sourcePrimaryInterestReference;
|
|
5991
|
+
}), d = P(() => {
|
|
5992
|
+
const l = R();
|
|
5993
|
+
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(T).getDeliveryTypes().then((g) => {
|
|
5879
5994
|
l.deliveryTypeReference = g;
|
|
5880
|
-
}).catch(
|
|
5881
|
-
}),
|
|
5882
|
-
const l =
|
|
5883
|
-
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(
|
|
5995
|
+
}).catch(y)), l.deliveryTypeReference;
|
|
5996
|
+
}), I = P(() => {
|
|
5997
|
+
const l = R();
|
|
5998
|
+
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(wt).getManagers().then((g) => {
|
|
5884
5999
|
l.managersList = g;
|
|
5885
|
-
}).catch(
|
|
5886
|
-
}),
|
|
5887
|
-
const l =
|
|
5888
|
-
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(
|
|
6000
|
+
}).catch(y)), l.managersList;
|
|
6001
|
+
}), S = P(() => {
|
|
6002
|
+
const l = R();
|
|
6003
|
+
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(T).getWarehouses().then((g) => {
|
|
5889
6004
|
l.warehousesReference = g;
|
|
5890
|
-
}).catch(
|
|
5891
|
-
}),
|
|
5892
|
-
const l =
|
|
5893
|
-
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(
|
|
6005
|
+
}).catch(y)), l.warehousesReference;
|
|
6006
|
+
}), _ = P(() => {
|
|
6007
|
+
const l = R();
|
|
6008
|
+
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(T).getPropertyTypes().then((g) => {
|
|
5894
6009
|
l.propertyTypesReference = g;
|
|
5895
|
-
}).catch(
|
|
5896
|
-
}),
|
|
5897
|
-
const l =
|
|
5898
|
-
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(
|
|
6010
|
+
}).catch(y)), l.propertyTypesReference;
|
|
6011
|
+
}), q = P(() => {
|
|
6012
|
+
const l = R();
|
|
6013
|
+
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(T).getPriceCoefficients().then((g) => {
|
|
5899
6014
|
l.priceCoefficientsReference = g;
|
|
5900
|
-
}).catch(
|
|
6015
|
+
}).catch(y)), l.priceCoefficientsReference;
|
|
5901
6016
|
});
|
|
5902
6017
|
return {
|
|
5903
6018
|
/**
|
|
@@ -5943,34 +6058,34 @@ const A = Z("__references_private", () => {
|
|
|
5943
6058
|
/**
|
|
5944
6059
|
* Справочник направлений продаж.
|
|
5945
6060
|
*/
|
|
5946
|
-
salesDirectionsReference:
|
|
6061
|
+
salesDirectionsReference: C,
|
|
5947
6062
|
/**
|
|
5948
6063
|
* Справочник каналов первичного интереса.
|
|
5949
6064
|
*/
|
|
5950
|
-
sourcePrimaryInterestsReference:
|
|
6065
|
+
sourcePrimaryInterestsReference: $,
|
|
5951
6066
|
/**
|
|
5952
6067
|
* Справочник типов доставки.
|
|
5953
6068
|
*/
|
|
5954
|
-
deliveryTypeReference:
|
|
6069
|
+
deliveryTypeReference: d,
|
|
5955
6070
|
/**
|
|
5956
6071
|
* Список менеджеров.
|
|
5957
6072
|
*/
|
|
5958
|
-
managersList:
|
|
6073
|
+
managersList: I,
|
|
5959
6074
|
/**
|
|
5960
6075
|
* Справочник складов.
|
|
5961
6076
|
*/
|
|
5962
|
-
warehousesReference:
|
|
6077
|
+
warehousesReference: S,
|
|
5963
6078
|
/**
|
|
5964
6079
|
* Справочник типов свойств.
|
|
5965
6080
|
*/
|
|
5966
|
-
propertyTypesReference:
|
|
6081
|
+
propertyTypesReference: _,
|
|
5967
6082
|
/**
|
|
5968
6083
|
* Справочник коэффициентов цен.
|
|
5969
6084
|
*/
|
|
5970
|
-
priceCoefficientsReference:
|
|
6085
|
+
priceCoefficientsReference: q
|
|
5971
6086
|
};
|
|
5972
6087
|
});
|
|
5973
|
-
class
|
|
6088
|
+
class Rt {
|
|
5974
6089
|
/**
|
|
5975
6090
|
* Инициализирует экземпляр класса {@link MetaTagItem}.
|
|
5976
6091
|
*
|
|
@@ -5988,7 +6103,7 @@ class Pt {
|
|
|
5988
6103
|
this.name = r.name, this.content = r.content;
|
|
5989
6104
|
}
|
|
5990
6105
|
}
|
|
5991
|
-
class
|
|
6106
|
+
class er {
|
|
5992
6107
|
/**
|
|
5993
6108
|
* Инициализирует экземпляр класса {@link Seo}.
|
|
5994
6109
|
*
|
|
@@ -6024,10 +6139,10 @@ class Qe {
|
|
|
6024
6139
|
*/
|
|
6025
6140
|
t(this, "meta");
|
|
6026
6141
|
var e;
|
|
6027
|
-
this.resourceType = new
|
|
6142
|
+
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))) ?? [];
|
|
6028
6143
|
}
|
|
6029
6144
|
}
|
|
6030
|
-
class
|
|
6145
|
+
class ls extends h {
|
|
6031
6146
|
/**
|
|
6032
6147
|
* Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
|
|
6033
6148
|
*
|
|
@@ -6035,7 +6150,7 @@ class cs extends h {
|
|
|
6035
6150
|
* @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
|
|
6036
6151
|
*/
|
|
6037
6152
|
getResourceSeoData(r, e) {
|
|
6038
|
-
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new
|
|
6153
|
+
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new er(s.data));
|
|
6039
6154
|
}
|
|
6040
6155
|
/**
|
|
6041
6156
|
* Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
|
|
@@ -6046,7 +6161,7 @@ class cs extends h {
|
|
|
6046
6161
|
* в случае ошибок в запросах.
|
|
6047
6162
|
*/
|
|
6048
6163
|
saveResourceSeoData(r, e = {}) {
|
|
6049
|
-
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new
|
|
6164
|
+
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new er(s.data), e);
|
|
6050
6165
|
}
|
|
6051
6166
|
/**
|
|
6052
6167
|
* Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
|
|
@@ -6058,7 +6173,7 @@ class cs extends h {
|
|
|
6058
6173
|
return this.delete(`/internal/seo/${r.slug}/${e}`);
|
|
6059
6174
|
}
|
|
6060
6175
|
}
|
|
6061
|
-
class
|
|
6176
|
+
class ps extends h {
|
|
6062
6177
|
/**
|
|
6063
6178
|
* Возвращает подсказки по адресам.
|
|
6064
6179
|
*
|
|
@@ -6105,8 +6220,8 @@ class ls extends h {
|
|
|
6105
6220
|
});
|
|
6106
6221
|
}
|
|
6107
6222
|
}
|
|
6108
|
-
var
|
|
6109
|
-
class
|
|
6223
|
+
var At = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(At || {});
|
|
6224
|
+
class Dt extends ur {
|
|
6110
6225
|
/**
|
|
6111
6226
|
* Инициализирует экземпляр класса {@link User}.
|
|
6112
6227
|
*
|
|
@@ -6129,12 +6244,12 @@ class At extends or {
|
|
|
6129
6244
|
this.type = e == null ? void 0 : e.type, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.photo = e == null ? void 0 : e.photo;
|
|
6130
6245
|
}
|
|
6131
6246
|
}
|
|
6132
|
-
class
|
|
6247
|
+
class us extends h {
|
|
6133
6248
|
/**
|
|
6134
6249
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
6135
6250
|
*/
|
|
6136
6251
|
constructor() {
|
|
6137
|
-
super(), this.baseUrl = `${
|
|
6252
|
+
super(), this.baseUrl = `${D.getConfig().http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
|
|
6138
6253
|
}
|
|
6139
6254
|
/**
|
|
6140
6255
|
* Функция для получения обновленных токенов доступа.
|
|
@@ -6145,16 +6260,16 @@ class ps extends h {
|
|
|
6145
6260
|
return this.get("internal/users/current-tokens").then((r) => r.accessToken);
|
|
6146
6261
|
}
|
|
6147
6262
|
}
|
|
6148
|
-
class
|
|
6263
|
+
class $t extends h {
|
|
6149
6264
|
/**
|
|
6150
6265
|
* Возвращает данные о текущем пользователе.
|
|
6151
6266
|
*/
|
|
6152
6267
|
// eslint-disable-next-line class-methods-use-this
|
|
6153
6268
|
getCurrentUser() {
|
|
6154
|
-
return this.get("/internal/users/info", {}, (r) => new
|
|
6269
|
+
return this.get("/internal/users/info", {}, (r) => new Dt(r.data));
|
|
6155
6270
|
}
|
|
6156
6271
|
}
|
|
6157
|
-
const
|
|
6272
|
+
const Tt = te("__user_state_private", () => {
|
|
6158
6273
|
const n = f({}), r = f(void 0);
|
|
6159
6274
|
return {
|
|
6160
6275
|
/**
|
|
@@ -6166,20 +6281,20 @@ const Dt = Z("__user_state_private", () => {
|
|
|
6166
6281
|
*/
|
|
6167
6282
|
currentUser: r
|
|
6168
6283
|
};
|
|
6169
|
-
}),
|
|
6284
|
+
}), hs = te("user_state", () => ({
|
|
6170
6285
|
/**
|
|
6171
6286
|
* Данные о текущем пользователе.
|
|
6172
6287
|
*/
|
|
6173
|
-
currentUser:
|
|
6174
|
-
const r =
|
|
6175
|
-
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(
|
|
6288
|
+
currentUser: P(() => {
|
|
6289
|
+
const r = Tt();
|
|
6290
|
+
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance($t).getCurrentUser().then((e) => {
|
|
6176
6291
|
r.currentUser = e;
|
|
6177
|
-
}).catch(
|
|
6292
|
+
}).catch(y).finally(() => {
|
|
6178
6293
|
r.dataLoaderList.currentUser = !1;
|
|
6179
6294
|
})), r.currentUser;
|
|
6180
6295
|
})
|
|
6181
6296
|
}));
|
|
6182
|
-
class
|
|
6297
|
+
class gs {
|
|
6183
6298
|
/**
|
|
6184
6299
|
* Инициализирует экземпляр класса {@link FieldValidationResultData}.
|
|
6185
6300
|
*
|
|
@@ -6203,150 +6318,150 @@ class hs {
|
|
|
6203
6318
|
}
|
|
6204
6319
|
}
|
|
6205
6320
|
export {
|
|
6206
|
-
|
|
6321
|
+
nt as AnyReference,
|
|
6207
6322
|
qt as AppBaseConfig,
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6323
|
+
D as AppConfigProvider,
|
|
6324
|
+
xe as BankAccount,
|
|
6325
|
+
De as BasePaginationProvider,
|
|
6326
|
+
Wr as CalculationTypeEnum,
|
|
6327
|
+
fe as Cart,
|
|
6328
|
+
Er as CartItem,
|
|
6329
|
+
zr as CartItemBase,
|
|
6330
|
+
Ot as CartProvider,
|
|
6331
|
+
Gt as CatalogProvider,
|
|
6332
|
+
nr as CatalogableItem,
|
|
6333
|
+
E as Category,
|
|
6334
|
+
We as CategoryPricingRule,
|
|
6335
|
+
gr as ChannelPrimaryInterest,
|
|
6221
6336
|
Vt as City,
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
|
|
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
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6257
|
-
|
|
6258
|
-
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6262
|
-
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6337
|
+
Me as CityWithRegionAndCountry,
|
|
6338
|
+
Qe as Client,
|
|
6339
|
+
ft as ClientAdditionalData,
|
|
6340
|
+
we as ClientCategory,
|
|
6341
|
+
Xt as ClientDataProvider,
|
|
6342
|
+
Ft as ClientPriceProvider,
|
|
6343
|
+
jt as ClientPriceTemplateProvider,
|
|
6344
|
+
Z as ClientProduct,
|
|
6345
|
+
Bt as ClientProductCategoryDataProvider,
|
|
6346
|
+
zt as ClientProductDataProvider,
|
|
6347
|
+
me as ClientShortInfo,
|
|
6348
|
+
it as ClientsAdditionalDataRequestTypeEnum,
|
|
6349
|
+
Kt as ClientsListFilters,
|
|
6350
|
+
oe as CodedIdentity,
|
|
6351
|
+
es as ConfiguratorProvider,
|
|
6352
|
+
Ne as Contact,
|
|
6353
|
+
Qr as ContactLinks,
|
|
6354
|
+
M as ContactPerson,
|
|
6355
|
+
mt as ContactPersonRelated,
|
|
6356
|
+
ot as ContactPosition,
|
|
6357
|
+
Se as ContactRelation,
|
|
6358
|
+
yr as ContragentBase,
|
|
6359
|
+
Ce as ContragentFactory,
|
|
6360
|
+
wr as ContragentIc,
|
|
6361
|
+
ht as ContragentPerson,
|
|
6362
|
+
gt as ContragentUlNr,
|
|
6363
|
+
ar as ContragentUlR,
|
|
6364
|
+
je as CostSourceEnum,
|
|
6365
|
+
ee as Country,
|
|
6366
|
+
ae as Currency,
|
|
6367
|
+
ps as DataSuggestionProvider,
|
|
6368
|
+
Qt as DataTablePagination,
|
|
6369
|
+
yt as DataTablePaginationRequestParams,
|
|
6370
|
+
Yt as DataTableSortRequestParams,
|
|
6371
|
+
rs as DateTimeProvider,
|
|
6372
|
+
Vr as DeletableNamedIdentity,
|
|
6373
|
+
ve as DeliveryAddress,
|
|
6374
|
+
X as DeliveryType,
|
|
6375
|
+
Nt as DetailedJwtPayload,
|
|
6376
|
+
Zr as DeviceTypeResolutionConfig,
|
|
6377
|
+
Kr as DiscountShortInfo,
|
|
6378
|
+
gs as FieldValidationResultData,
|
|
6379
|
+
pe as FilterGroup,
|
|
6380
|
+
Je as FilterItem,
|
|
6381
|
+
He as FilterOpEnum,
|
|
6382
|
+
cr as GeoCoordinates,
|
|
6383
|
+
Hr as HiddenCatalogableItem,
|
|
6384
|
+
ue as HttpCachedRequester,
|
|
6385
|
+
et as HttpParamsConfig,
|
|
6271
6386
|
h as HttpRequester,
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6387
|
+
H as Identity,
|
|
6388
|
+
Br as Image,
|
|
6389
|
+
G as JwtPayload,
|
|
6275
6390
|
Ae as Manager,
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6391
|
+
ce as ManagerCommon,
|
|
6392
|
+
ts as ManagerDataFactory,
|
|
6393
|
+
wt as ManagerDataProvider,
|
|
6394
|
+
Rt as MetaTagItem,
|
|
6395
|
+
b as NamedIdentity,
|
|
6396
|
+
j as Opf,
|
|
6397
|
+
k as OpfEnum,
|
|
6398
|
+
Ct as Order,
|
|
6399
|
+
vr as OrderInfo,
|
|
6400
|
+
ct as OrderPaymentStatus,
|
|
6401
|
+
at as OrderProduct,
|
|
6402
|
+
Cr as OrderShortInfo,
|
|
6403
|
+
lt as OrderStatus,
|
|
6404
|
+
ss as OrdersDataProvider,
|
|
6405
|
+
re as PartnerGroup,
|
|
6406
|
+
pt as PaymentType,
|
|
6407
|
+
ye as PreferencesStorageProvider,
|
|
6293
6408
|
_e as PriceAnalyze,
|
|
6294
|
-
|
|
6409
|
+
is as PriceAnalyzeProvider,
|
|
6295
6410
|
Pe as PriceCoefficient,
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
|
|
6411
|
+
or as PriceCoefficientEnum,
|
|
6412
|
+
ns as PriceHistoryDataProvider,
|
|
6413
|
+
vt as PriceHistoryItem,
|
|
6414
|
+
W as PriceTemplate,
|
|
6415
|
+
Te as PriceTemplateCategory,
|
|
6416
|
+
se as PriceTemplateClient,
|
|
6417
|
+
pr as PriceTemplateICatalogableItem,
|
|
6418
|
+
be as PriceTemplateProduct,
|
|
6419
|
+
Et as PriceTemplateProvider,
|
|
6420
|
+
ne as PricingRole,
|
|
6306
6421
|
Wt as PricingRoleProvider,
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6340
|
-
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6422
|
+
Le as PrimaryCatalogableItem,
|
|
6423
|
+
x as Product,
|
|
6424
|
+
Mt as ProductCategoryDataProvider,
|
|
6425
|
+
Ht as ProductDataProvider,
|
|
6426
|
+
ut as ProductFileType,
|
|
6427
|
+
Ge as ProductPriceCoefficient,
|
|
6428
|
+
Pt as ProductPriceHistory,
|
|
6429
|
+
Jt as PropertiesProvider,
|
|
6430
|
+
ie as Property,
|
|
6431
|
+
hr as PropertyType,
|
|
6432
|
+
Jr as PropertyTypeEnum,
|
|
6433
|
+
z as PropertyValue,
|
|
6434
|
+
os as RecommendationsDataProvider,
|
|
6435
|
+
Ze as RecommendationsList,
|
|
6436
|
+
v as Reference,
|
|
6437
|
+
T as ReferenceDataProvider,
|
|
6438
|
+
le as Region,
|
|
6439
|
+
mr as ResourceType,
|
|
6440
|
+
N as SalesDirection,
|
|
6441
|
+
rt as SentryConfig,
|
|
6442
|
+
er as Seo,
|
|
6443
|
+
ls as SeoDataProvider,
|
|
6444
|
+
fr as SourcePrimaryInterest,
|
|
6445
|
+
Mr as StockCount,
|
|
6446
|
+
Ut as TemplatesListFilters,
|
|
6447
|
+
Fe as TypedInstanceFactory,
|
|
6448
|
+
Ye as UnitsHelper,
|
|
6449
|
+
Zt as UnknownClientDataProvider,
|
|
6450
|
+
lr as UpdatableNamedIdentity,
|
|
6451
|
+
Dt as User,
|
|
6452
|
+
us as UserAuthDataProvider,
|
|
6453
|
+
ur as UserCommonInfo,
|
|
6454
|
+
$t as UserDataProvider,
|
|
6455
|
+
Yr as UserPricingRole,
|
|
6456
|
+
F as UserShortInfo,
|
|
6457
|
+
At as UserTypeEnum,
|
|
6458
|
+
tt as VersionConfig,
|
|
6344
6459
|
Re as Warehouse,
|
|
6345
|
-
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6460
|
+
st as WebSocketConfig,
|
|
6461
|
+
Ve as findCatalogItemByIdRecursive,
|
|
6462
|
+
Ke as flattenCatalogItems,
|
|
6463
|
+
$e as useAuthStateStore,
|
|
6464
|
+
cs as useReferencesStore,
|
|
6465
|
+
hs as useUserStateStore
|
|
6351
6466
|
};
|
|
6352
6467
|
//# sourceMappingURL=sc-common-lib.js.map
|