@snabcentr/common-lib 2.3.0-dev → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/manifest.json +1 -1
- package/dist/release_notes.tmp +1 -1
- package/dist/sc-common-lib.js +54 -40
- 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/orders/interfaces/i-client-order-create-data.d.ts +63 -0
- package/dist/src/orders/interfaces/i-client-order-create-data.d.ts.map +1 -0
- package/dist/src/orders/interfaces/index.d.ts +1 -0
- package/dist/src/orders/interfaces/index.d.ts.map +1 -1
- package/dist/src/orders/providers/orders-data-provider.d.ts +13 -0
- package/dist/src/orders/providers/orders-data-provider.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/manifest.json
CHANGED
package/dist/release_notes.tmp
CHANGED
package/dist/sc-common-lib.js
CHANGED
|
@@ -968,7 +968,7 @@ class ot {
|
|
|
968
968
|
this.warehouse = new me(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
969
969
|
}
|
|
970
970
|
}
|
|
971
|
-
class
|
|
971
|
+
class O extends b {
|
|
972
972
|
/**
|
|
973
973
|
* Инициализирует экземпляр класса {@link Currency}.
|
|
974
974
|
*
|
|
@@ -1099,7 +1099,7 @@ class k extends it {
|
|
|
1099
1099
|
* Список коэффициентов цен на продукт.
|
|
1100
1100
|
*/
|
|
1101
1101
|
t(this, "priceCoefficients");
|
|
1102
|
-
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new Qe(e.unit) : new Qe(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new
|
|
1102
|
+
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new Qe(e.unit) : new Qe(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new O(e.currency) : new O(), this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = C(e == null ? void 0 : e.costDate) ? R(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((h) => new ot(h))) ?? [], this.type = "product";
|
|
1103
1103
|
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((h) => h.isPrimary));
|
|
1104
1104
|
s && (this.category = new qe({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((h) => new qe(h))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((h) => new st(h, I().config.http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((h) => new Ge(h))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
1105
1105
|
}
|
|
@@ -1261,7 +1261,7 @@ class mr extends re {
|
|
|
1261
1261
|
* @inheritDoc
|
|
1262
1262
|
*/
|
|
1263
1263
|
t(this, "originalId");
|
|
1264
|
-
this.product = new G(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new fe(), this.currency = e.currency ? new
|
|
1264
|
+
this.product = new G(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new fe(), this.currency = e.currency ? new O(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Nr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new L(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId;
|
|
1265
1265
|
}
|
|
1266
1266
|
}
|
|
1267
1267
|
let ct = class extends mr {
|
|
@@ -1308,7 +1308,7 @@ let ct = class extends mr {
|
|
|
1308
1308
|
* @inheritDoc
|
|
1309
1309
|
*/
|
|
1310
1310
|
t(this, "currency");
|
|
1311
|
-
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 = F(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new
|
|
1311
|
+
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 = F(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new O(e.currency);
|
|
1312
1312
|
}
|
|
1313
1313
|
};
|
|
1314
1314
|
class ye {
|
|
@@ -1755,7 +1755,7 @@ class fr {
|
|
|
1755
1755
|
this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
|
|
1756
1756
|
}
|
|
1757
1757
|
}
|
|
1758
|
-
class
|
|
1758
|
+
class _ extends w {
|
|
1759
1759
|
}
|
|
1760
1760
|
class Be extends b {
|
|
1761
1761
|
/**
|
|
@@ -1785,7 +1785,7 @@ class Be extends b {
|
|
|
1785
1785
|
* @inheritDoc
|
|
1786
1786
|
*/
|
|
1787
1787
|
t(this, "isRegionalDirector");
|
|
1788
|
-
this.salesDirection = e != null && e.salesDirection ? new
|
|
1788
|
+
this.salesDirection = e != null && e.salesDirection ? new _(e.salesDirection) : new _(), this.photo = e == null ? void 0 : e.photo, this.contacts = e != null && e.contacts ? new fr(e.contacts) : void 0, this.isDefault = (e == null ? void 0 : e.isDefault) ?? !1, this.isRegionalDirector = (e == null ? void 0 : e.isRegionalDirector) ?? !1;
|
|
1789
1789
|
}
|
|
1790
1790
|
}
|
|
1791
1791
|
class ze extends w {
|
|
@@ -2028,7 +2028,7 @@ class wr extends b {
|
|
|
2028
2028
|
* Признак активности учетной записи пользователя.
|
|
2029
2029
|
*/
|
|
2030
2030
|
t(this, "isActive");
|
|
2031
|
-
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
|
|
2031
|
+
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 _(e.salesDirection) : void 0, this.createdAt = C(e == null ? void 0 : e.createdAt) ? R(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = C(e == null ? void 0 : e.lastLoginAt) ? R(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
2032
2032
|
}
|
|
2033
2033
|
}
|
|
2034
2034
|
class te extends wr {
|
|
@@ -2077,7 +2077,7 @@ class te extends wr {
|
|
|
2077
2077
|
* @inheritDoc
|
|
2078
2078
|
*/
|
|
2079
2079
|
t(this, "curators");
|
|
2080
|
-
this.salesDirection = new
|
|
2080
|
+
this.salesDirection = new _(e == null ? void 0 : e.salesDirection), this.debt = (e == null ? void 0 : e.debt) ?? 0, this.alternativeName = (e == null ? void 0 : e.alternativeName) ?? "", this.city = new Ae(e == null ? void 0 : e.city), this.comment = e == null ? void 0 : e.comment, this.isPhoneApproved = (e == null ? void 0 : e.isPhoneApproved) ?? !1, this.isEmailApproved = (e == null ? void 0 : e.isEmailApproved) ?? !1, this.managers = ((s = e == null ? void 0 : e.managers) == null ? void 0 : s.map((o) => new Be(o))) ?? [], this.curators = ((i = e == null ? void 0 : e.curators) == null ? void 0 : i.map((o) => new We(o))) ?? void 0;
|
|
2081
2081
|
}
|
|
2082
2082
|
}
|
|
2083
2083
|
class ne extends re {
|
|
@@ -3775,8 +3775,8 @@ class Ne extends re {
|
|
|
3775
3775
|
/**
|
|
3776
3776
|
* Данные о валюте.
|
|
3777
3777
|
*/
|
|
3778
|
-
t(this, "currency", new
|
|
3779
|
-
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new
|
|
3778
|
+
t(this, "currency", new O());
|
|
3779
|
+
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new O(e.currency));
|
|
3780
3780
|
}
|
|
3781
3781
|
}
|
|
3782
3782
|
class Ue extends b {
|
|
@@ -4259,7 +4259,7 @@ class ns extends br {
|
|
|
4259
4259
|
* @inheritDoc
|
|
4260
4260
|
*/
|
|
4261
4261
|
t(this, "lastOrder");
|
|
4262
|
-
this.id = e == null ? void 0 : e.id, this.name = e == null ? void 0 : e.name, this.alternativeName = e == null ? void 0 : e.alternativeName, this.searchTerm = e == null ? void 0 : e.searchTerm, this.cities = (s = e == null ? void 0 : e.cities) == null ? void 0 : s.map((A) => new Ae(A)), this.region = new pe(e == null ? void 0 : e.region), this.country = new Z(e == null ? void 0 : e.country), this.phone = e == null ? void 0 : e.phone, this.email = e == null ? void 0 : e.email, this.isActive = e && Object.prototype.hasOwnProperty.call(e, "isActive") ? e == null ? void 0 : e.isActive : !0, this.createdAt = new S(e == null ? void 0 : e.createdAt), this.lastLoginDate = new S(e == null ? void 0 : e.lastLoginDate), this.lastLoginDateHasOrder = (e == null ? void 0 : e.lastLoginDateHasOrder) ?? void 0, this.managers = ((i = e == null ? void 0 : e.managers) == null ? void 0 : i.map((A) => new De(A))) ?? [], this.curators = ((o = e == null ? void 0 : e.curators) == null ? void 0 : o.map((A) => new We(A))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((A) => new
|
|
4262
|
+
this.id = e == null ? void 0 : e.id, this.name = e == null ? void 0 : e.name, this.alternativeName = e == null ? void 0 : e.alternativeName, this.searchTerm = e == null ? void 0 : e.searchTerm, this.cities = (s = e == null ? void 0 : e.cities) == null ? void 0 : s.map((A) => new Ae(A)), this.region = new pe(e == null ? void 0 : e.region), this.country = new Z(e == null ? void 0 : e.country), this.phone = e == null ? void 0 : e.phone, this.email = e == null ? void 0 : e.email, this.isActive = e && Object.prototype.hasOwnProperty.call(e, "isActive") ? e == null ? void 0 : e.isActive : !0, this.createdAt = new S(e == null ? void 0 : e.createdAt), this.lastLoginDate = new S(e == null ? void 0 : e.lastLoginDate), this.lastLoginDateHasOrder = (e == null ? void 0 : e.lastLoginDateHasOrder) ?? void 0, this.managers = ((i = e == null ? void 0 : e.managers) == null ? void 0 : i.map((A) => new De(A))) ?? [], this.curators = ((o = e == null ? void 0 : e.curators) == null ? void 0 : o.map((A) => new We(A))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((A) => new _(A)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new B(e == null ? void 0 : e.contragentType), this.preferredDeliveryType = e != null && e.preferredDeliveryType ? new U(e == null ? void 0 : e.preferredDeliveryType) : void 0, this.partnerGroups = (u = e == null ? void 0 : e.partnerGroups) == null ? void 0 : u.map((A) => new ee(A)), this.contact = new Ue(e == null ? void 0 : e.contact), this.lastOrder = {
|
|
4263
4263
|
createdAt: new S((h = e == null ? void 0 : e.lastOrder) == null ? void 0 : h.createdAt),
|
|
4264
4264
|
creator: (m = e == null ? void 0 : e.lastOrder) == null ? void 0 : m.creator,
|
|
4265
4265
|
isApproved: (f = e == null ? void 0 : e.lastOrder) == null ? void 0 : f.isApproved
|
|
@@ -4380,7 +4380,7 @@ class Pt extends b {
|
|
|
4380
4380
|
* @inheritDoc
|
|
4381
4381
|
*/
|
|
4382
4382
|
t(this, "curators");
|
|
4383
|
-
this.contacts = ((s = e.contacts) == null ? void 0 : s.map((u) => new z(u))) ?? void 0, this.lastOrder = e.lastOrder ? new Sr(e.lastOrder) : void 0, this.partnerGroups = ((i = e.partnerGroups) == null ? void 0 : i.map((u) => new ee(u))) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new U(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new
|
|
4383
|
+
this.contacts = ((s = e.contacts) == null ? void 0 : s.map((u) => new z(u))) ?? void 0, this.lastOrder = e.lastOrder ? new Sr(e.lastOrder) : void 0, this.partnerGroups = ((i = e.partnerGroups) == null ? void 0 : i.map((u) => new ee(u))) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new U(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new _(e.salesDirection) : void 0, this.managers = ((o = e.managers) == null ? void 0 : o.map((u) => new Be(u))) ?? void 0, this.curators = ((c = e.curators) == null ? void 0 : c.map((u) => new We(u))) ?? void 0;
|
|
4384
4384
|
}
|
|
4385
4385
|
}
|
|
4386
4386
|
class Dt {
|
|
@@ -4450,7 +4450,7 @@ class cs {
|
|
|
4450
4450
|
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
4451
4451
|
}
|
|
4452
4452
|
}
|
|
4453
|
-
class
|
|
4453
|
+
class x extends $e {
|
|
4454
4454
|
/**
|
|
4455
4455
|
* Преобразует данные о клиенте в данные требуемые для запроса.
|
|
4456
4456
|
*
|
|
@@ -4674,7 +4674,7 @@ class d extends $e {
|
|
|
4674
4674
|
* @see /doc/api/internal#/Клиенты/api_internal_client_create
|
|
4675
4675
|
*/
|
|
4676
4676
|
createClientCommonData(r, e = {}) {
|
|
4677
|
-
return this.post("/internal/clients",
|
|
4677
|
+
return this.post("/internal/clients", x.transformClientDataToRequest(r), (s) => new rr(s.data), e);
|
|
4678
4678
|
}
|
|
4679
4679
|
/**
|
|
4680
4680
|
* Обновляет данные указанного клиента.
|
|
@@ -4684,7 +4684,7 @@ class d extends $e {
|
|
|
4684
4684
|
* @see /doc/api/internal#/Клиенты/api_internal_client_change
|
|
4685
4685
|
*/
|
|
4686
4686
|
updateClientCommonData(r, e = {}) {
|
|
4687
|
-
return this.patch(`/internal/clients/${r.id}`,
|
|
4687
|
+
return this.patch(`/internal/clients/${r.id}`, x.transformClientDataToRequest(r), void 0, e);
|
|
4688
4688
|
}
|
|
4689
4689
|
/**
|
|
4690
4690
|
* Обновляет данные "Не беспокоить" указанного клиента.
|
|
@@ -4813,7 +4813,7 @@ class d extends $e {
|
|
|
4813
4813
|
createContragentClientData(r, e, s = {}) {
|
|
4814
4814
|
return this.post(
|
|
4815
4815
|
`/internal/clients/${r}/contragents`,
|
|
4816
|
-
|
|
4816
|
+
x.transformContragentClientDataToRequest(e),
|
|
4817
4817
|
(i) => Ce.createInstance(i.data),
|
|
4818
4818
|
s
|
|
4819
4819
|
);
|
|
@@ -4829,7 +4829,7 @@ class d extends $e {
|
|
|
4829
4829
|
updateContragentClientData(r, e, s = {}) {
|
|
4830
4830
|
return this.patch(
|
|
4831
4831
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
4832
|
-
|
|
4832
|
+
x.transformContragentClientDataToRequest(e),
|
|
4833
4833
|
(i) => Ce.createInstance(i.data),
|
|
4834
4834
|
s
|
|
4835
4835
|
);
|
|
@@ -4855,7 +4855,7 @@ class d extends $e {
|
|
|
4855
4855
|
createClientDeliveryAddress(r, e, s = {}) {
|
|
4856
4856
|
return this.post(
|
|
4857
4857
|
`/internal/clients/${r}/delivery-addresses`,
|
|
4858
|
-
|
|
4858
|
+
x.transformClientDeliveryAddressToRequest(e),
|
|
4859
4859
|
(i) => new Re(i.data),
|
|
4860
4860
|
s
|
|
4861
4861
|
);
|
|
@@ -4871,7 +4871,7 @@ class d extends $e {
|
|
|
4871
4871
|
updateClientDeliveryAddress(r, e, s = {}) {
|
|
4872
4872
|
return this.patch(
|
|
4873
4873
|
`/internal/clients/${r}/delivery-addresses/${e.id}`,
|
|
4874
|
-
|
|
4874
|
+
x.transformClientDeliveryAddressToRequest(e),
|
|
4875
4875
|
(i) => new Re(i.data),
|
|
4876
4876
|
s
|
|
4877
4877
|
);
|
|
@@ -4898,7 +4898,7 @@ class d extends $e {
|
|
|
4898
4898
|
createContragentBankAccount(r, e, s, i = {}) {
|
|
4899
4899
|
return this.post(
|
|
4900
4900
|
`/internal/clients/${r}/contragents/${e}/bank-accounts`,
|
|
4901
|
-
|
|
4901
|
+
x.transformClientContragentBankAccountToRequest(s),
|
|
4902
4902
|
(o) => new Ne(o.data),
|
|
4903
4903
|
i
|
|
4904
4904
|
);
|
|
@@ -4915,7 +4915,7 @@ class d extends $e {
|
|
|
4915
4915
|
updateContragentBankAccount(r, e, s, i = {}) {
|
|
4916
4916
|
return this.patch(
|
|
4917
4917
|
`/internal/clients/${r}/contragents/${e}/bank-accounts/${s.id}`,
|
|
4918
|
-
|
|
4918
|
+
x.transformClientContragentBankAccountToRequest(s),
|
|
4919
4919
|
(o) => new Ne(o.data),
|
|
4920
4920
|
i
|
|
4921
4921
|
);
|
|
@@ -5466,7 +5466,7 @@ class Ir extends Sr {
|
|
|
5466
5466
|
date: C((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? R(e.delivery.date) : ((h = e == null ? void 0 : e.delivery) == null ? void 0 : h.date) ?? /* @__PURE__ */ new Date(),
|
|
5467
5467
|
address: (m = e == null ? void 0 : e.delivery) != null && m.address ? new Re(e.delivery.address) : void 0,
|
|
5468
5468
|
warehouse: (f = e == null ? void 0 : e.delivery) != null && f.warehouse ? new me(e.delivery.warehouse) : void 0
|
|
5469
|
-
}, this.attachedUser = e != null && e.attachedUser ? new L(e == null ? void 0 : e.attachedUser) : void 0, this.status = new Te(e == null ? void 0 : e.status), this.statusDetail = e != null && e.statusDetail ? new w(e.statusDetail) : void 0, this.salesDirection = new
|
|
5469
|
+
}, this.attachedUser = e != null && e.attachedUser ? new L(e == null ? void 0 : e.attachedUser) : void 0, this.status = new Te(e == null ? void 0 : e.status), this.statusDetail = e != null && e.statusDetail ? new w(e.statusDetail) : void 0, this.salesDirection = new _(e == null ? void 0 : e.salesDirection), this.attachedAt = C(e == null ? void 0 : e.attachedAt) ? R(e.attachedAt) : e == null ? void 0 : e.attachedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1, this.sum = (e == null ? void 0 : e.sum) ?? 0, this.isLargeOrder = (e == null ? void 0 : e.isLargeOrder) ?? !1;
|
|
5470
5470
|
}
|
|
5471
5471
|
}
|
|
5472
5472
|
var Tt = /* @__PURE__ */ ((n) => (n.New = "new", n.Processing = "processing", n.AwaitingSupplyProducts = "awaiting_supply_products", n.InvoiceIssued = "invoice_issued", n.ProcessingOnStock = "processing_on_stock", n.Finished = "finished", n.OrderUpdated = "order_updated", n.Canceled = "canceled", n.Error = "error", n))(Tt || {});
|
|
@@ -5504,7 +5504,7 @@ class a extends he {
|
|
|
5504
5504
|
* Возвращает {@link Promise} для получения справочника списка валют.
|
|
5505
5505
|
*/
|
|
5506
5506
|
getCurrency() {
|
|
5507
|
-
return this.getTypedDataArrayRequester(
|
|
5507
|
+
return this.getTypedDataArrayRequester(O, "/public/references/currency", !0);
|
|
5508
5508
|
}
|
|
5509
5509
|
/**
|
|
5510
5510
|
* Возвращает {@link Promise} для получения справочника данных
|
|
@@ -5553,7 +5553,7 @@ class a extends he {
|
|
|
5553
5553
|
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
5554
5554
|
*/
|
|
5555
5555
|
getSalesDirections() {
|
|
5556
|
-
return this.getTypedDataArrayRequester(
|
|
5556
|
+
return this.getTypedDataArrayRequester(_, "/public/references/sales-direction", !0);
|
|
5557
5557
|
}
|
|
5558
5558
|
/**
|
|
5559
5559
|
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
@@ -5964,7 +5964,7 @@ class ys extends br {
|
|
|
5964
5964
|
* @inheritDoc
|
|
5965
5965
|
*/
|
|
5966
5966
|
t(this, "onlyMyRegions");
|
|
5967
|
-
this.attachedOperators = (s = e == null ? void 0 : e.attachedOperators) == null ? void 0 : s.map((u) => new Rr(u)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new te(e.client) : void 0, this.contragent = e == null ? void 0 : e.contragent, this.createdAt = new S(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new L(e.creator) : void 0, this.deliveryDate = new S(e == null ? void 0 : e.deliveryDate), this.deliveryAddressSearch = e == null ? void 0 : e.deliveryAddressSearch, this.clientCities = (i = e == null ? void 0 : e.clientCities) == null ? void 0 : i.map((u) => new Ae(u)), this.id = e == null ? void 0 : e.id, this.isApproved = e == null ? void 0 : e.isApproved, this.isNotInStock = e == null ? void 0 : e.isNotInStock, this.isOnOrder = e == null ? void 0 : e.isOnOrder, this.isLargeOrder = e == null ? void 0 : e.isLargeOrder, this.attachedAt = new S(e == null ? void 0 : e.attachedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new
|
|
5967
|
+
this.attachedOperators = (s = e == null ? void 0 : e.attachedOperators) == null ? void 0 : s.map((u) => new Rr(u)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new te(e.client) : void 0, this.contragent = e == null ? void 0 : e.contragent, this.createdAt = new S(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new L(e.creator) : void 0, this.deliveryDate = new S(e == null ? void 0 : e.deliveryDate), this.deliveryAddressSearch = e == null ? void 0 : e.deliveryAddressSearch, this.clientCities = (i = e == null ? void 0 : e.clientCities) == null ? void 0 : i.map((u) => new Ae(u)), this.id = e == null ? void 0 : e.id, this.isApproved = e == null ? void 0 : e.isApproved, this.isNotInStock = e == null ? void 0 : e.isNotInStock, this.isOnOrder = e == null ? void 0 : e.isOnOrder, this.isLargeOrder = e == null ? void 0 : e.isLargeOrder, this.attachedAt = new S(e == null ? void 0 : e.attachedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new _(u)), this.status = e == null ? void 0 : e.status, this.statusDetail = e == null ? void 0 : e.statusDetail, this.deliveryType = e != null && e.deliveryType ? new U(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new Pr(e.paymentType) : void 0, this.warehouses = (c = e == null ? void 0 : e.warehouses) == null ? void 0 : c.map((u) => new me(u)), this.isToProcess = e == null ? void 0 : e.isToProcess;
|
|
5968
5968
|
}
|
|
5969
5969
|
/**
|
|
5970
5970
|
* @inheritDoc
|
|
@@ -6061,10 +6061,10 @@ class at extends mr {
|
|
|
6061
6061
|
* @inheritDoc
|
|
6062
6062
|
*/
|
|
6063
6063
|
t(this, "currency");
|
|
6064
|
-
this.product = new G(e.product), this.currency = new
|
|
6064
|
+
this.product = new G(e.product), this.currency = new O(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;
|
|
6065
6065
|
}
|
|
6066
6066
|
}
|
|
6067
|
-
class
|
|
6067
|
+
class d extends Ir {
|
|
6068
6068
|
/**
|
|
6069
6069
|
* Инициализирует экземпляр класса {@link Order}.
|
|
6070
6070
|
*
|
|
@@ -6206,7 +6206,21 @@ class ws extends $e {
|
|
|
6206
6206
|
* @see /doc/api/internal#/Заказы/api_internal_orders_get
|
|
6207
6207
|
*/
|
|
6208
6208
|
getOrder(r) {
|
|
6209
|
-
return this.get(`/internal/orders/${r}`, {}, (e) => new
|
|
6209
|
+
return this.get(`/internal/orders/${r}`, {}, (e) => new d(e.data));
|
|
6210
|
+
}
|
|
6211
|
+
/**
|
|
6212
|
+
* Создаёт новый заказ клиента из содержимого корзины текущего пользователя.
|
|
6213
|
+
*
|
|
6214
|
+
* @param clientId Идентификатор клиента.
|
|
6215
|
+
* @param salesDirectionId Идентификатор направления продаж.
|
|
6216
|
+
* @param data Данные для создания заказа.
|
|
6217
|
+
* @param validationFieldResultData Список полей, для которых необходимо
|
|
6218
|
+
* установить данные об ошибках валидации
|
|
6219
|
+
* в случае ошибок в запросах.
|
|
6220
|
+
* @see /doc/api/internal#/operations/api_internal_client_orders_create
|
|
6221
|
+
*/
|
|
6222
|
+
createClientOrder(r, e, s, i = {}) {
|
|
6223
|
+
return this.post(`/internal/clients/${r}/orders/${e}`, s, (o) => new d(o.data), i);
|
|
6210
6224
|
}
|
|
6211
6225
|
/**
|
|
6212
6226
|
* Закрепляет указанный заказ за текущим оператором и возвращает полные данные заказа.
|
|
@@ -6216,7 +6230,7 @@ class ws extends $e {
|
|
|
6216
6230
|
* @see /doc/api/internal#/Заказы/api_internal_orders_attach
|
|
6217
6231
|
*/
|
|
6218
6232
|
attachOrder(r) {
|
|
6219
|
-
return this.patch(`/internal/orders/${r}/attach`, {}, (e) => new
|
|
6233
|
+
return this.patch(`/internal/orders/${r}/attach`, {}, (e) => new d(e.data));
|
|
6220
6234
|
}
|
|
6221
6235
|
/**
|
|
6222
6236
|
* Открепляет указанный заказ от оператора и возвращает полные данные заказа.
|
|
@@ -6226,7 +6240,7 @@ class ws extends $e {
|
|
|
6226
6240
|
* @see /doc/api/internal#/Заказы/api_internal_orders_detach
|
|
6227
6241
|
*/
|
|
6228
6242
|
detachOrder(r) {
|
|
6229
|
-
return this.patch(`/internal/orders/${r}/detach`, {}, (e) => new
|
|
6243
|
+
return this.patch(`/internal/orders/${r}/detach`, {}, (e) => new d(e.data));
|
|
6230
6244
|
}
|
|
6231
6245
|
/**
|
|
6232
6246
|
* Обновляет данные заказа без изменения состава товаров и возвращает обновлённые данные заказа.
|
|
@@ -6240,7 +6254,7 @@ class ws extends $e {
|
|
|
6240
6254
|
* @see /doc/api/internal#/Заказы/api_internal_orders_update
|
|
6241
6255
|
*/
|
|
6242
6256
|
updateOrder(r, e, s = {}) {
|
|
6243
|
-
return this.patch(`/internal/orders/${r}`, e, (i) => new
|
|
6257
|
+
return this.patch(`/internal/orders/${r}`, e, (i) => new d(i.data), s);
|
|
6244
6258
|
}
|
|
6245
6259
|
/**
|
|
6246
6260
|
* Добавляет продукт в заказ и возвращает обновлённые данные заказа.
|
|
@@ -6268,7 +6282,7 @@ class ws extends $e {
|
|
|
6268
6282
|
is_additional_sale: e.isAdditionalSale,
|
|
6269
6283
|
...e.configuratorParams
|
|
6270
6284
|
},
|
|
6271
|
-
(i) => new
|
|
6285
|
+
(i) => new d(i.data),
|
|
6272
6286
|
s
|
|
6273
6287
|
);
|
|
6274
6288
|
}
|
|
@@ -6291,7 +6305,7 @@ class ws extends $e {
|
|
|
6291
6305
|
status: e,
|
|
6292
6306
|
statusDetail: s
|
|
6293
6307
|
},
|
|
6294
|
-
(o) => new
|
|
6308
|
+
(o) => new d(o.data),
|
|
6295
6309
|
i
|
|
6296
6310
|
);
|
|
6297
6311
|
}
|
|
@@ -6317,7 +6331,7 @@ class ws extends $e {
|
|
|
6317
6331
|
* @see /doc/api/internal#/Заказы/api_internal_orders_attached_file_delete
|
|
6318
6332
|
*/
|
|
6319
6333
|
deleteOrderAttachedFile(r) {
|
|
6320
|
-
return this.delete(`/internal/orders/${r}/file/attached`, (e) => new
|
|
6334
|
+
return this.delete(`/internal/orders/${r}/file/attached`, (e) => new d(e.data));
|
|
6321
6335
|
}
|
|
6322
6336
|
/**
|
|
6323
6337
|
* Изменяет продукт заказа и возвращает обновлённые данные заказа.
|
|
@@ -6345,7 +6359,7 @@ class ws extends $e {
|
|
|
6345
6359
|
marker: s.marker,
|
|
6346
6360
|
...s.configuratorParams
|
|
6347
6361
|
},
|
|
6348
|
-
(o) => new
|
|
6362
|
+
(o) => new d(o.data),
|
|
6349
6363
|
i
|
|
6350
6364
|
);
|
|
6351
6365
|
}
|
|
@@ -6505,7 +6519,7 @@ class St {
|
|
|
6505
6519
|
* @inheritDoc
|
|
6506
6520
|
*/
|
|
6507
6521
|
t(this, "currency");
|
|
6508
|
-
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = C(r.costDate) ? R(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new ue(r.product) : void 0, this.client = r.client ? new L(r.client) : void 0, this.executor = r.executor ? new L(r.executor) : void 0, this.currency = r.currency ? new
|
|
6522
|
+
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = C(r.costDate) ? R(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new ue(r.product) : void 0, this.client = r.client ? new L(r.client) : void 0, this.executor = r.executor ? new L(r.executor) : void 0, this.currency = r.currency ? new O(r.currency) : void 0;
|
|
6509
6523
|
}
|
|
6510
6524
|
}
|
|
6511
6525
|
class kt extends ue {
|
|
@@ -6865,7 +6879,7 @@ export {
|
|
|
6865
6879
|
rr as Client,
|
|
6866
6880
|
Pt as ClientAdditionalData,
|
|
6867
6881
|
ve as ClientCategory,
|
|
6868
|
-
|
|
6882
|
+
x as ClientDataProvider,
|
|
6869
6883
|
Et as ClientPriceProvider,
|
|
6870
6884
|
Vt as ClientPriceTemplateProvider,
|
|
6871
6885
|
G as ClientProduct,
|
|
@@ -6893,7 +6907,7 @@ export {
|
|
|
6893
6907
|
Z as Country,
|
|
6894
6908
|
ze as CuratedDirection,
|
|
6895
6909
|
We as Curator,
|
|
6896
|
-
|
|
6910
|
+
O as Currency,
|
|
6897
6911
|
Ds as DataSuggestionProvider,
|
|
6898
6912
|
os as DataTablePagination,
|
|
6899
6913
|
Dt as DataTablePaginationRequestParams,
|
|
@@ -6926,7 +6940,7 @@ export {
|
|
|
6926
6940
|
Rr as Operator,
|
|
6927
6941
|
B as Opf,
|
|
6928
6942
|
N as OpfEnum,
|
|
6929
|
-
|
|
6943
|
+
d as Order,
|
|
6930
6944
|
Ir as OrderInfo,
|
|
6931
6945
|
at as OrderItem,
|
|
6932
6946
|
mr as OrderItemBase,
|
|
@@ -6975,7 +6989,7 @@ export {
|
|
|
6975
6989
|
a as ReferenceDataProvider,
|
|
6976
6990
|
pe as Region,
|
|
6977
6991
|
Dr as ResourceType,
|
|
6978
|
-
|
|
6992
|
+
_ as SalesDirection,
|
|
6979
6993
|
Zr as SentryConfig,
|
|
6980
6994
|
ir as Seo,
|
|
6981
6995
|
Ps as SeoDataProvider,
|