@viu/emporix-sdk 3.2.0 → 3.3.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/CHANGELOG.md +58 -0
- package/README.md +1 -1
- package/dist/availability.d.cts +1 -1
- package/dist/availability.d.ts +1 -1
- package/dist/cart.d.cts +1 -1
- package/dist/cart.d.ts +1 -1
- package/dist/category.d.cts +1 -1
- package/dist/category.d.ts +1 -1
- package/dist/checkout.d.cts +1 -1
- package/dist/checkout.d.ts +1 -1
- package/dist/companies.d.cts +1 -1
- package/dist/companies.d.ts +1 -1
- package/dist/contacts.d.cts +1 -1
- package/dist/contacts.d.ts +1 -1
- package/dist/{context-CcU93eAL.d.cts → context-CZdtWgQO.d.cts} +1 -1
- package/dist/{context-CcU93eAL.d.ts → context-CZdtWgQO.d.ts} +1 -1
- package/dist/{customer-groups-wmO0f-vj.d.ts → customer-groups-DhrOoC8M.d.ts} +1 -1
- package/dist/{customer-groups-Tt9VIA-m.d.cts → customer-groups-OEnqHFsX.d.cts} +1 -1
- package/dist/customer-groups.d.cts +2 -2
- package/dist/customer-groups.d.ts +2 -2
- package/dist/customer.d.cts +1 -1
- package/dist/customer.d.ts +1 -1
- package/dist/index.cjs +141 -72
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +281 -4
- package/dist/index.d.ts +281 -4
- package/dist/index.js +141 -73
- package/dist/index.js.map +1 -1
- package/dist/locations.d.cts +1 -1
- package/dist/locations.d.ts +1 -1
- package/dist/media.d.cts +1 -1
- package/dist/media.d.ts +1 -1
- package/dist/orders.d.cts +1 -1
- package/dist/orders.d.ts +1 -1
- package/dist/payment.d.cts +1 -1
- package/dist/payment.d.ts +1 -1
- package/dist/price.d.cts +1 -1
- package/dist/price.d.ts +1 -1
- package/dist/product.d.cts +1 -1
- package/dist/product.d.ts +1 -1
- package/dist/segment.d.cts +1 -1
- package/dist/segment.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -945,7 +945,7 @@ var HttpClient = class {
|
|
|
945
945
|
};
|
|
946
946
|
|
|
947
947
|
// package.json
|
|
948
|
-
var version = "3.
|
|
948
|
+
var version = "3.3.0";
|
|
949
949
|
|
|
950
950
|
// src/version.ts
|
|
951
951
|
var SDK_VERSION = version;
|
|
@@ -4551,8 +4551,74 @@ var ImportService = class {
|
|
|
4551
4551
|
}
|
|
4552
4552
|
};
|
|
4553
4553
|
|
|
4554
|
-
// src/services/
|
|
4554
|
+
// src/services/audit-log.ts
|
|
4555
4555
|
var SERVICE23 = { kind: "service" };
|
|
4556
|
+
function toPage2(wire) {
|
|
4557
|
+
const pageNumber = wire.page ?? 1;
|
|
4558
|
+
const totalPages = wire.totalPages ?? 0;
|
|
4559
|
+
return {
|
|
4560
|
+
items: wire.items ?? [],
|
|
4561
|
+
pageNumber,
|
|
4562
|
+
pageSize: wire.size ?? 0,
|
|
4563
|
+
hasNextPage: pageNumber < totalPages,
|
|
4564
|
+
totalElements: wire.totalElements ?? 0,
|
|
4565
|
+
totalPages
|
|
4566
|
+
};
|
|
4567
|
+
}
|
|
4568
|
+
var AuditLogService = class {
|
|
4569
|
+
constructor(ctx) {
|
|
4570
|
+
this.ctx = ctx;
|
|
4571
|
+
}
|
|
4572
|
+
ctx;
|
|
4573
|
+
static channel = "audit-log";
|
|
4574
|
+
base() {
|
|
4575
|
+
return `/changelog/${this.ctx.tenant}`;
|
|
4576
|
+
}
|
|
4577
|
+
/**
|
|
4578
|
+
* List changes across the tenant, newest occurrence first.
|
|
4579
|
+
*
|
|
4580
|
+
* **The window defaults to the last 30 days.** When `q` carries no
|
|
4581
|
+
* conjunctive `occurredAt` lower bound, the service silently applies a
|
|
4582
|
+
* trailing 30-day window — an unfiltered call is *not* «everything ever». Pass
|
|
4583
|
+
* an explicit top-level or `AND`-ed `occurredAt` range to widen it; an
|
|
4584
|
+
* `occurredAt` that appears only inside an `OR` arm does not lift the default.
|
|
4585
|
+
*
|
|
4586
|
+
* **`entityId` needs `entity`.** Filtering by id alone is a `400`, not an
|
|
4587
|
+
* empty page. There is no path-based history endpoint either — scoping to one
|
|
4588
|
+
* document means naming both in `q`:
|
|
4589
|
+
*
|
|
4590
|
+
* @example
|
|
4591
|
+
* ```ts
|
|
4592
|
+
* // The history of one order.
|
|
4593
|
+
* const page = await client.auditLogs.list({
|
|
4594
|
+
* q: `entity:order entityId:${orderId}`,
|
|
4595
|
+
* });
|
|
4596
|
+
* for (const entry of page.items) {
|
|
4597
|
+
* console.log(entry.at, entry.actor, entry.paths);
|
|
4598
|
+
* }
|
|
4599
|
+
*
|
|
4600
|
+
* // Everything a given person changed in June, across all entities.
|
|
4601
|
+
* await client.auditLogs.list({
|
|
4602
|
+
* q: 'actor:"Jane Doe" occurredAt:(>"2026-06-01T00:00:00.000Z" AND <"2026-07-01T00:00:00.000Z")',
|
|
4603
|
+
* pageSize: 100,
|
|
4604
|
+
* });
|
|
4605
|
+
* ```
|
|
4606
|
+
*/
|
|
4607
|
+
async list(opts = {}, auth2 = SERVICE23) {
|
|
4608
|
+
const wire = await this.ctx.http.request({
|
|
4609
|
+
method: "GET",
|
|
4610
|
+
path: `${this.base()}/changelogs`,
|
|
4611
|
+
// Absent options are left off the wire entirely; the service applies its
|
|
4612
|
+
// own defaults (page 1, size 20) and sends back what it used.
|
|
4613
|
+
query: { q: opts.q, page: opts.pageNumber, size: opts.pageSize },
|
|
4614
|
+
auth: auth2
|
|
4615
|
+
});
|
|
4616
|
+
return toPage2(wire);
|
|
4617
|
+
}
|
|
4618
|
+
};
|
|
4619
|
+
|
|
4620
|
+
// src/services/unit-handling.ts
|
|
4621
|
+
var SERVICE24 = { kind: "service" };
|
|
4556
4622
|
var UnitHandlingService = class {
|
|
4557
4623
|
constructor(ctx) {
|
|
4558
4624
|
this.ctx = ctx;
|
|
@@ -4563,7 +4629,7 @@ var UnitHandlingService = class {
|
|
|
4563
4629
|
return `/unit-handling/${this.ctx.tenant}`;
|
|
4564
4630
|
}
|
|
4565
4631
|
/** Find units (filter/sort/page). */
|
|
4566
|
-
async listUnits(query = {}, auth2 =
|
|
4632
|
+
async listUnits(query = {}, auth2 = SERVICE24) {
|
|
4567
4633
|
return this.ctx.http.request({
|
|
4568
4634
|
method: "GET",
|
|
4569
4635
|
path: `${this.base()}/units`,
|
|
@@ -4572,7 +4638,7 @@ var UnitHandlingService = class {
|
|
|
4572
4638
|
});
|
|
4573
4639
|
}
|
|
4574
4640
|
/** Retrieve a unit by code. */
|
|
4575
|
-
async getUnit(unitCode, auth2 =
|
|
4641
|
+
async getUnit(unitCode, auth2 = SERVICE24) {
|
|
4576
4642
|
return this.ctx.http.request({
|
|
4577
4643
|
method: "GET",
|
|
4578
4644
|
path: `${this.base()}/units/${encodeURIComponent(unitCode)}`,
|
|
@@ -4580,11 +4646,11 @@ var UnitHandlingService = class {
|
|
|
4580
4646
|
});
|
|
4581
4647
|
}
|
|
4582
4648
|
/** Add a new unit. */
|
|
4583
|
-
async createUnit(input, auth2 =
|
|
4649
|
+
async createUnit(input, auth2 = SERVICE24) {
|
|
4584
4650
|
return this.ctx.http.request({ method: "POST", path: `${this.base()}/units`, auth: auth2, body: input });
|
|
4585
4651
|
}
|
|
4586
4652
|
/** Update a unit by code. */
|
|
4587
|
-
async updateUnit(unitCode, input, auth2 =
|
|
4653
|
+
async updateUnit(unitCode, input, auth2 = SERVICE24) {
|
|
4588
4654
|
await this.ctx.http.request({
|
|
4589
4655
|
method: "PUT",
|
|
4590
4656
|
path: `${this.base()}/units/${encodeURIComponent(unitCode)}`,
|
|
@@ -4593,7 +4659,7 @@ var UnitHandlingService = class {
|
|
|
4593
4659
|
});
|
|
4594
4660
|
}
|
|
4595
4661
|
/** Delete a unit by code. */
|
|
4596
|
-
async deleteUnit(unitCode, auth2 =
|
|
4662
|
+
async deleteUnit(unitCode, auth2 = SERVICE24) {
|
|
4597
4663
|
await this.ctx.http.request({
|
|
4598
4664
|
method: "DELETE",
|
|
4599
4665
|
path: `${this.base()}/units/${encodeURIComponent(unitCode)}`,
|
|
@@ -4601,7 +4667,7 @@ var UnitHandlingService = class {
|
|
|
4601
4667
|
});
|
|
4602
4668
|
}
|
|
4603
4669
|
/** Delete multiple units by code (bulk). The codes are sent as the request body. */
|
|
4604
|
-
async deleteUnits(codes, auth2 =
|
|
4670
|
+
async deleteUnits(codes, auth2 = SERVICE24) {
|
|
4605
4671
|
await this.ctx.http.request({
|
|
4606
4672
|
method: "DELETE",
|
|
4607
4673
|
path: `${this.base()}/units`,
|
|
@@ -4610,7 +4676,7 @@ var UnitHandlingService = class {
|
|
|
4610
4676
|
});
|
|
4611
4677
|
}
|
|
4612
4678
|
/** Fetch a conversion factor (`PUT /units/conversion-factor-commands`). */
|
|
4613
|
-
async getConversionFactor(input, auth2 =
|
|
4679
|
+
async getConversionFactor(input, auth2 = SERVICE24) {
|
|
4614
4680
|
return this.ctx.http.request({
|
|
4615
4681
|
method: "PUT",
|
|
4616
4682
|
path: `${this.base()}/units/conversion-factor-commands`,
|
|
@@ -4619,7 +4685,7 @@ var UnitHandlingService = class {
|
|
|
4619
4685
|
});
|
|
4620
4686
|
}
|
|
4621
4687
|
/** Convert a value between units (`PUT /units/convert-unit-commands`). */
|
|
4622
|
-
async convertUnit(input, auth2 =
|
|
4688
|
+
async convertUnit(input, auth2 = SERVICE24) {
|
|
4623
4689
|
return this.ctx.http.request({
|
|
4624
4690
|
method: "PUT",
|
|
4625
4691
|
path: `${this.base()}/units/convert-unit-commands`,
|
|
@@ -4628,13 +4694,13 @@ var UnitHandlingService = class {
|
|
|
4628
4694
|
});
|
|
4629
4695
|
}
|
|
4630
4696
|
/** List all unit types. */
|
|
4631
|
-
async listUnitTypes(auth2 =
|
|
4697
|
+
async listUnitTypes(auth2 = SERVICE24) {
|
|
4632
4698
|
return this.ctx.http.request({ method: "GET", path: `${this.base()}/types`, auth: auth2 });
|
|
4633
4699
|
}
|
|
4634
4700
|
};
|
|
4635
4701
|
|
|
4636
4702
|
// src/services/catalog.ts
|
|
4637
|
-
var
|
|
4703
|
+
var SERVICE25 = { kind: "service" };
|
|
4638
4704
|
var CatalogService = class {
|
|
4639
4705
|
constructor(ctx) {
|
|
4640
4706
|
this.ctx = ctx;
|
|
@@ -4645,7 +4711,7 @@ var CatalogService = class {
|
|
|
4645
4711
|
return `/catalog/${this.ctx.tenant}/catalogs`;
|
|
4646
4712
|
}
|
|
4647
4713
|
/** List catalogs (filtered/sorted). */
|
|
4648
|
-
async listCatalogs(query = {}, auth2 =
|
|
4714
|
+
async listCatalogs(query = {}, auth2 = SERVICE25) {
|
|
4649
4715
|
return this.ctx.http.request({
|
|
4650
4716
|
method: "GET",
|
|
4651
4717
|
path: this.base(),
|
|
@@ -4654,7 +4720,7 @@ var CatalogService = class {
|
|
|
4654
4720
|
});
|
|
4655
4721
|
}
|
|
4656
4722
|
/** Retrieve a catalog by id. */
|
|
4657
|
-
async getCatalog(catalogId, auth2 =
|
|
4723
|
+
async getCatalog(catalogId, auth2 = SERVICE25) {
|
|
4658
4724
|
return this.ctx.http.request({
|
|
4659
4725
|
method: "GET",
|
|
4660
4726
|
path: `${this.base()}/${encodeURIComponent(catalogId)}`,
|
|
@@ -4662,7 +4728,7 @@ var CatalogService = class {
|
|
|
4662
4728
|
});
|
|
4663
4729
|
}
|
|
4664
4730
|
/** Retrieve all catalogs that contain a category. */
|
|
4665
|
-
async getCatalogsForCategory(categoryId, auth2 =
|
|
4731
|
+
async getCatalogsForCategory(categoryId, auth2 = SERVICE25) {
|
|
4666
4732
|
return this.ctx.http.request({
|
|
4667
4733
|
method: "GET",
|
|
4668
4734
|
path: `${this.base()}/categories/${encodeURIComponent(categoryId)}`,
|
|
@@ -4670,11 +4736,11 @@ var CatalogService = class {
|
|
|
4670
4736
|
});
|
|
4671
4737
|
}
|
|
4672
4738
|
/** Create a catalog. */
|
|
4673
|
-
async createCatalog(input, auth2 =
|
|
4739
|
+
async createCatalog(input, auth2 = SERVICE25) {
|
|
4674
4740
|
return this.ctx.http.request({ method: "POST", path: this.base(), auth: auth2, body: input });
|
|
4675
4741
|
}
|
|
4676
4742
|
/** Upsert a catalog by id (`PUT`). */
|
|
4677
|
-
async updateCatalog(catalogId, input, auth2 =
|
|
4743
|
+
async updateCatalog(catalogId, input, auth2 = SERVICE25) {
|
|
4678
4744
|
return this.ctx.http.request({
|
|
4679
4745
|
method: "PUT",
|
|
4680
4746
|
path: `${this.base()}/${encodeURIComponent(catalogId)}`,
|
|
@@ -4683,7 +4749,7 @@ var CatalogService = class {
|
|
|
4683
4749
|
});
|
|
4684
4750
|
}
|
|
4685
4751
|
/** Partially update a catalog by id (`PATCH`). */
|
|
4686
|
-
async patchCatalog(catalogId, patch, auth2 =
|
|
4752
|
+
async patchCatalog(catalogId, patch, auth2 = SERVICE25) {
|
|
4687
4753
|
await this.ctx.http.request({
|
|
4688
4754
|
method: "PATCH",
|
|
4689
4755
|
path: `${this.base()}/${encodeURIComponent(catalogId)}`,
|
|
@@ -4692,7 +4758,7 @@ var CatalogService = class {
|
|
|
4692
4758
|
});
|
|
4693
4759
|
}
|
|
4694
4760
|
/** Remove a catalog by id. */
|
|
4695
|
-
async deleteCatalog(catalogId, auth2 =
|
|
4761
|
+
async deleteCatalog(catalogId, auth2 = SERVICE25) {
|
|
4696
4762
|
await this.ctx.http.request({
|
|
4697
4763
|
method: "DELETE",
|
|
4698
4764
|
path: `${this.base()}/${encodeURIComponent(catalogId)}`,
|
|
@@ -4702,7 +4768,7 @@ var CatalogService = class {
|
|
|
4702
4768
|
};
|
|
4703
4769
|
|
|
4704
4770
|
// src/services/vendor.ts
|
|
4705
|
-
var
|
|
4771
|
+
var SERVICE26 = { kind: "service" };
|
|
4706
4772
|
var VendorService = class {
|
|
4707
4773
|
constructor(ctx) {
|
|
4708
4774
|
this.ctx = ctx;
|
|
@@ -4714,7 +4780,7 @@ var VendorService = class {
|
|
|
4714
4780
|
}
|
|
4715
4781
|
// --- Vendors ---
|
|
4716
4782
|
/** List all vendors. */
|
|
4717
|
-
async listVendors(query = {}, auth2 =
|
|
4783
|
+
async listVendors(query = {}, auth2 = SERVICE26) {
|
|
4718
4784
|
return this.ctx.http.request({
|
|
4719
4785
|
method: "GET",
|
|
4720
4786
|
path: `${this.base()}/vendors`,
|
|
@@ -4723,7 +4789,7 @@ var VendorService = class {
|
|
|
4723
4789
|
});
|
|
4724
4790
|
}
|
|
4725
4791
|
/** Retrieve a vendor by id. */
|
|
4726
|
-
async getVendor(vendorId, auth2 =
|
|
4792
|
+
async getVendor(vendorId, auth2 = SERVICE26) {
|
|
4727
4793
|
return this.ctx.http.request({
|
|
4728
4794
|
method: "GET",
|
|
4729
4795
|
path: `${this.base()}/vendors/${encodeURIComponent(vendorId)}`,
|
|
@@ -4731,7 +4797,7 @@ var VendorService = class {
|
|
|
4731
4797
|
});
|
|
4732
4798
|
}
|
|
4733
4799
|
/** Search vendors (`POST /vendors/search`). A built filter in `q` is resolved to a string. */
|
|
4734
|
-
async searchVendors(query, auth2 =
|
|
4800
|
+
async searchVendors(query, auth2 = SERVICE26) {
|
|
4735
4801
|
const body = query.q !== void 0 ? { ...query, q: resolveQuery(query.q, { compoundLogicalQuery: false }) } : query;
|
|
4736
4802
|
return this.ctx.http.request({
|
|
4737
4803
|
method: "POST",
|
|
@@ -4741,11 +4807,11 @@ var VendorService = class {
|
|
|
4741
4807
|
});
|
|
4742
4808
|
}
|
|
4743
4809
|
/** Create a vendor. */
|
|
4744
|
-
async createVendor(input, auth2 =
|
|
4810
|
+
async createVendor(input, auth2 = SERVICE26) {
|
|
4745
4811
|
return this.ctx.http.request({ method: "POST", path: `${this.base()}/vendors`, auth: auth2, body: input });
|
|
4746
4812
|
}
|
|
4747
4813
|
/** Upsert a vendor by id (`PUT`). */
|
|
4748
|
-
async updateVendor(vendorId, input, auth2 =
|
|
4814
|
+
async updateVendor(vendorId, input, auth2 = SERVICE26) {
|
|
4749
4815
|
await this.ctx.http.request({
|
|
4750
4816
|
method: "PUT",
|
|
4751
4817
|
path: `${this.base()}/vendors/${encodeURIComponent(vendorId)}`,
|
|
@@ -4754,7 +4820,7 @@ var VendorService = class {
|
|
|
4754
4820
|
});
|
|
4755
4821
|
}
|
|
4756
4822
|
/** Delete a vendor by id. */
|
|
4757
|
-
async deleteVendor(vendorId, auth2 =
|
|
4823
|
+
async deleteVendor(vendorId, auth2 = SERVICE26) {
|
|
4758
4824
|
await this.ctx.http.request({
|
|
4759
4825
|
method: "DELETE",
|
|
4760
4826
|
path: `${this.base()}/vendors/${encodeURIComponent(vendorId)}`,
|
|
@@ -4763,7 +4829,7 @@ var VendorService = class {
|
|
|
4763
4829
|
}
|
|
4764
4830
|
// --- Vendor locations ---
|
|
4765
4831
|
/** List all vendor locations. */
|
|
4766
|
-
async listVendorLocations(query = {}, auth2 =
|
|
4832
|
+
async listVendorLocations(query = {}, auth2 = SERVICE26) {
|
|
4767
4833
|
return this.ctx.http.request({
|
|
4768
4834
|
method: "GET",
|
|
4769
4835
|
path: `${this.base()}/locations`,
|
|
@@ -4772,7 +4838,7 @@ var VendorService = class {
|
|
|
4772
4838
|
});
|
|
4773
4839
|
}
|
|
4774
4840
|
/** Retrieve a vendor location by id. */
|
|
4775
|
-
async getVendorLocation(locationId, auth2 =
|
|
4841
|
+
async getVendorLocation(locationId, auth2 = SERVICE26) {
|
|
4776
4842
|
return this.ctx.http.request({
|
|
4777
4843
|
method: "GET",
|
|
4778
4844
|
path: `${this.base()}/locations/${encodeURIComponent(locationId)}`,
|
|
@@ -4780,11 +4846,11 @@ var VendorService = class {
|
|
|
4780
4846
|
});
|
|
4781
4847
|
}
|
|
4782
4848
|
/** Create a vendor location. */
|
|
4783
|
-
async createVendorLocation(input, auth2 =
|
|
4849
|
+
async createVendorLocation(input, auth2 = SERVICE26) {
|
|
4784
4850
|
return this.ctx.http.request({ method: "POST", path: `${this.base()}/locations`, auth: auth2, body: input });
|
|
4785
4851
|
}
|
|
4786
4852
|
/** Upsert a vendor location by id (`PUT`). */
|
|
4787
|
-
async updateVendorLocation(locationId, input, auth2 =
|
|
4853
|
+
async updateVendorLocation(locationId, input, auth2 = SERVICE26) {
|
|
4788
4854
|
await this.ctx.http.request({
|
|
4789
4855
|
method: "PUT",
|
|
4790
4856
|
path: `${this.base()}/locations/${encodeURIComponent(locationId)}`,
|
|
@@ -4793,7 +4859,7 @@ var VendorService = class {
|
|
|
4793
4859
|
});
|
|
4794
4860
|
}
|
|
4795
4861
|
/** Delete a vendor location by id. */
|
|
4796
|
-
async deleteVendorLocation(locationId, auth2 =
|
|
4862
|
+
async deleteVendorLocation(locationId, auth2 = SERVICE26) {
|
|
4797
4863
|
await this.ctx.http.request({
|
|
4798
4864
|
method: "DELETE",
|
|
4799
4865
|
path: `${this.base()}/locations/${encodeURIComponent(locationId)}`,
|
|
@@ -4803,7 +4869,7 @@ var VendorService = class {
|
|
|
4803
4869
|
};
|
|
4804
4870
|
|
|
4805
4871
|
// src/services/pick-pack.ts
|
|
4806
|
-
var
|
|
4872
|
+
var SERVICE27 = { kind: "service" };
|
|
4807
4873
|
var PickPackService = class {
|
|
4808
4874
|
constructor(ctx) {
|
|
4809
4875
|
this.ctx = ctx;
|
|
@@ -4817,7 +4883,7 @@ var PickPackService = class {
|
|
|
4817
4883
|
return `${this.base()}/orders/${encodeURIComponent(orderId)}`;
|
|
4818
4884
|
}
|
|
4819
4885
|
/** List packlist orders. */
|
|
4820
|
-
async listOrders(query = {}, auth2 =
|
|
4886
|
+
async listOrders(query = {}, auth2 = SERVICE27) {
|
|
4821
4887
|
return this.ctx.http.request({
|
|
4822
4888
|
method: "GET",
|
|
4823
4889
|
path: `${this.base()}/orders`,
|
|
@@ -4826,19 +4892,19 @@ var PickPackService = class {
|
|
|
4826
4892
|
});
|
|
4827
4893
|
}
|
|
4828
4894
|
/** Retrieve a packlist order by id. */
|
|
4829
|
-
async getOrder(orderId, auth2 =
|
|
4895
|
+
async getOrder(orderId, auth2 = SERVICE27) {
|
|
4830
4896
|
return this.ctx.http.request({ method: "GET", path: this.orderPath(orderId), auth: auth2 });
|
|
4831
4897
|
}
|
|
4832
4898
|
/** Update an order's status (`PATCH`). Returns an acknowledgement. */
|
|
4833
|
-
async updateOrder(orderId, change, auth2 =
|
|
4899
|
+
async updateOrder(orderId, change, auth2 = SERVICE27) {
|
|
4834
4900
|
return this.ctx.http.request({ method: "PATCH", path: this.orderPath(orderId), auth: auth2, body: change });
|
|
4835
4901
|
}
|
|
4836
4902
|
/** Finish an order. Returns an acknowledgement. */
|
|
4837
|
-
async finishOrder(orderId, auth2 =
|
|
4903
|
+
async finishOrder(orderId, auth2 = SERVICE27) {
|
|
4838
4904
|
return this.ctx.http.request({ method: "POST", path: `${this.orderPath(orderId)}/finish`, auth: auth2 });
|
|
4839
4905
|
}
|
|
4840
4906
|
/** List order cycles (ids). */
|
|
4841
|
-
async listOrderCycles(query = {}, auth2 =
|
|
4907
|
+
async listOrderCycles(query = {}, auth2 = SERVICE27) {
|
|
4842
4908
|
return this.ctx.http.request({
|
|
4843
4909
|
method: "GET",
|
|
4844
4910
|
path: `${this.base()}/orderCycles`,
|
|
@@ -4847,11 +4913,11 @@ var PickPackService = class {
|
|
|
4847
4913
|
});
|
|
4848
4914
|
}
|
|
4849
4915
|
/** Add an assignee to an order. Returns an acknowledgement. */
|
|
4850
|
-
async addAssignee(orderId, assignee, auth2 =
|
|
4916
|
+
async addAssignee(orderId, assignee, auth2 = SERVICE27) {
|
|
4851
4917
|
return this.ctx.http.request({ method: "POST", path: `${this.orderPath(orderId)}/assignees`, auth: auth2, body: assignee });
|
|
4852
4918
|
}
|
|
4853
4919
|
/** Remove an assignee from an order. */
|
|
4854
|
-
async removeAssignee(orderId, assigneeId, auth2 =
|
|
4920
|
+
async removeAssignee(orderId, assigneeId, auth2 = SERVICE27) {
|
|
4855
4921
|
await this.ctx.http.request({
|
|
4856
4922
|
method: "DELETE",
|
|
4857
4923
|
path: `${this.orderPath(orderId)}/assignees/${encodeURIComponent(assigneeId)}`,
|
|
@@ -4859,15 +4925,15 @@ var PickPackService = class {
|
|
|
4859
4925
|
});
|
|
4860
4926
|
}
|
|
4861
4927
|
/** Update packaging products for an order (`PUT`). Returns an acknowledgement. */
|
|
4862
|
-
async updatePackaging(orderId, change, auth2 =
|
|
4928
|
+
async updatePackaging(orderId, change, auth2 = SERVICE27) {
|
|
4863
4929
|
return this.ctx.http.request({ method: "PUT", path: `${this.orderPath(orderId)}/packaging`, auth: auth2, body: change });
|
|
4864
4930
|
}
|
|
4865
4931
|
/** Create a packing event. Returns an acknowledgement. */
|
|
4866
|
-
async createEvent(event, auth2 =
|
|
4932
|
+
async createEvent(event, auth2 = SERVICE27) {
|
|
4867
4933
|
return this.ctx.http.request({ method: "POST", path: `${this.base()}/events`, auth: auth2, body: event });
|
|
4868
4934
|
}
|
|
4869
4935
|
/** List packing events. */
|
|
4870
|
-
async listEvents(query = {}, auth2 =
|
|
4936
|
+
async listEvents(query = {}, auth2 = SERVICE27) {
|
|
4871
4937
|
return this.ctx.http.request({
|
|
4872
4938
|
method: "GET",
|
|
4873
4939
|
path: `${this.base()}/events`,
|
|
@@ -4876,7 +4942,7 @@ var PickPackService = class {
|
|
|
4876
4942
|
});
|
|
4877
4943
|
}
|
|
4878
4944
|
/** Trigger an order recalculation. Returns the created job's id. */
|
|
4879
|
-
async triggerRecalculation(input, auth2 =
|
|
4945
|
+
async triggerRecalculation(input, auth2 = SERVICE27) {
|
|
4880
4946
|
return this.ctx.http.request({
|
|
4881
4947
|
method: "POST",
|
|
4882
4948
|
path: `${this.base()}/jobs/recalculations`,
|
|
@@ -4885,7 +4951,7 @@ var PickPackService = class {
|
|
|
4885
4951
|
});
|
|
4886
4952
|
}
|
|
4887
4953
|
/** Retrieve a recalculation job by id. */
|
|
4888
|
-
async getRecalculationJob(jobId, auth2 =
|
|
4954
|
+
async getRecalculationJob(jobId, auth2 = SERVICE27) {
|
|
4889
4955
|
return this.ctx.http.request({
|
|
4890
4956
|
method: "GET",
|
|
4891
4957
|
path: `${this.base()}/jobs/recalculations/${encodeURIComponent(jobId)}`,
|
|
@@ -4895,7 +4961,7 @@ var PickPackService = class {
|
|
|
4895
4961
|
};
|
|
4896
4962
|
|
|
4897
4963
|
// src/services/customer-admin.ts
|
|
4898
|
-
var
|
|
4964
|
+
var SERVICE28 = { kind: "service" };
|
|
4899
4965
|
var CustomerAdminService = class {
|
|
4900
4966
|
constructor(ctx) {
|
|
4901
4967
|
this.ctx = ctx;
|
|
@@ -4916,7 +4982,7 @@ var CustomerAdminService = class {
|
|
|
4916
4982
|
}
|
|
4917
4983
|
// --- Customers ---
|
|
4918
4984
|
/** List customers. */
|
|
4919
|
-
async listCustomers(query = {}, auth2 =
|
|
4985
|
+
async listCustomers(query = {}, auth2 = SERVICE28) {
|
|
4920
4986
|
return this.ctx.http.request({
|
|
4921
4987
|
method: "GET",
|
|
4922
4988
|
path: this.base(),
|
|
@@ -4925,33 +4991,33 @@ var CustomerAdminService = class {
|
|
|
4925
4991
|
});
|
|
4926
4992
|
}
|
|
4927
4993
|
/** Search customers (`POST /customers/search`). A built filter in `q` is resolved to a string. */
|
|
4928
|
-
async searchCustomers(query, auth2 =
|
|
4994
|
+
async searchCustomers(query, auth2 = SERVICE28) {
|
|
4929
4995
|
const body = query.q !== void 0 ? { ...query, q: resolveQuery(query.q, { compoundLogicalQuery: false }) } : query;
|
|
4930
4996
|
return this.ctx.http.request({ method: "POST", path: `${this.base()}/search`, auth: auth2, body });
|
|
4931
4997
|
}
|
|
4932
4998
|
/** Retrieve a customer profile by number. */
|
|
4933
|
-
async getCustomer(customerNumber, auth2 =
|
|
4999
|
+
async getCustomer(customerNumber, auth2 = SERVICE28) {
|
|
4934
5000
|
return this.ctx.http.request({ method: "GET", path: this.customerPath(customerNumber), auth: auth2 });
|
|
4935
5001
|
}
|
|
4936
5002
|
/** Create a customer. */
|
|
4937
|
-
async createCustomer(input, auth2 =
|
|
5003
|
+
async createCustomer(input, auth2 = SERVICE28) {
|
|
4938
5004
|
return this.ctx.http.request({ method: "POST", path: this.base(), auth: auth2, body: input });
|
|
4939
5005
|
}
|
|
4940
5006
|
/** Upsert a customer profile by number (`PUT`). */
|
|
4941
|
-
async upsertCustomer(customerNumber, input, auth2 =
|
|
5007
|
+
async upsertCustomer(customerNumber, input, auth2 = SERVICE28) {
|
|
4942
5008
|
return this.ctx.http.request({ method: "PUT", path: this.customerPath(customerNumber), auth: auth2, body: input });
|
|
4943
5009
|
}
|
|
4944
5010
|
/** Partially update a customer profile (`PATCH`). */
|
|
4945
|
-
async patchCustomer(customerNumber, patch, auth2 =
|
|
5011
|
+
async patchCustomer(customerNumber, patch, auth2 = SERVICE28) {
|
|
4946
5012
|
await this.ctx.http.request({ method: "PATCH", path: this.customerPath(customerNumber), auth: auth2, body: patch });
|
|
4947
5013
|
}
|
|
4948
5014
|
/** Delete a customer profile. */
|
|
4949
|
-
async deleteCustomer(customerNumber, auth2 =
|
|
5015
|
+
async deleteCustomer(customerNumber, auth2 = SERVICE28) {
|
|
4950
5016
|
await this.ctx.http.request({ method: "DELETE", path: this.customerPath(customerNumber), auth: auth2 });
|
|
4951
5017
|
}
|
|
4952
5018
|
// --- Addresses ---
|
|
4953
5019
|
/** List a customer's addresses. */
|
|
4954
|
-
async listAddresses(customerNumber, auth2 =
|
|
5020
|
+
async listAddresses(customerNumber, auth2 = SERVICE28) {
|
|
4955
5021
|
return this.ctx.http.request({
|
|
4956
5022
|
method: "GET",
|
|
4957
5023
|
path: `${this.customerPath(customerNumber)}/addresses`,
|
|
@@ -4959,11 +5025,11 @@ var CustomerAdminService = class {
|
|
|
4959
5025
|
});
|
|
4960
5026
|
}
|
|
4961
5027
|
/** Retrieve one address. */
|
|
4962
|
-
async getAddress(customerNumber, addressId, auth2 =
|
|
5028
|
+
async getAddress(customerNumber, addressId, auth2 = SERVICE28) {
|
|
4963
5029
|
return this.ctx.http.request({ method: "GET", path: this.addressPath(customerNumber, addressId), auth: auth2 });
|
|
4964
5030
|
}
|
|
4965
5031
|
/** Add an address. */
|
|
4966
|
-
async addAddress(customerNumber, input, auth2 =
|
|
5032
|
+
async addAddress(customerNumber, input, auth2 = SERVICE28) {
|
|
4967
5033
|
return this.ctx.http.request({
|
|
4968
5034
|
method: "POST",
|
|
4969
5035
|
path: `${this.customerPath(customerNumber)}/addresses`,
|
|
@@ -4972,19 +5038,19 @@ var CustomerAdminService = class {
|
|
|
4972
5038
|
});
|
|
4973
5039
|
}
|
|
4974
5040
|
/** Upsert an address by id (`PUT`). */
|
|
4975
|
-
async upsertAddress(customerNumber, addressId, input, auth2 =
|
|
5041
|
+
async upsertAddress(customerNumber, addressId, input, auth2 = SERVICE28) {
|
|
4976
5042
|
return this.ctx.http.request({ method: "PUT", path: this.addressPath(customerNumber, addressId), auth: auth2, body: input });
|
|
4977
5043
|
}
|
|
4978
5044
|
/** Partially update an address by id (`PATCH`). */
|
|
4979
|
-
async patchAddress(customerNumber, addressId, patch, auth2 =
|
|
5045
|
+
async patchAddress(customerNumber, addressId, patch, auth2 = SERVICE28) {
|
|
4980
5046
|
await this.ctx.http.request({ method: "PATCH", path: this.addressPath(customerNumber, addressId), auth: auth2, body: patch });
|
|
4981
5047
|
}
|
|
4982
5048
|
/** Delete an address by id. */
|
|
4983
|
-
async deleteAddress(customerNumber, addressId, auth2 =
|
|
5049
|
+
async deleteAddress(customerNumber, addressId, auth2 = SERVICE28) {
|
|
4984
5050
|
await this.ctx.http.request({ method: "DELETE", path: this.addressPath(customerNumber, addressId), auth: auth2 });
|
|
4985
5051
|
}
|
|
4986
5052
|
/** Add tags to an address (`?tags=` query). */
|
|
4987
|
-
async addAddressTags(customerNumber, addressId, tags, auth2 =
|
|
5053
|
+
async addAddressTags(customerNumber, addressId, tags, auth2 = SERVICE28) {
|
|
4988
5054
|
await this.ctx.http.request({
|
|
4989
5055
|
method: "POST",
|
|
4990
5056
|
path: `${this.addressPath(customerNumber, addressId)}/tags`,
|
|
@@ -4993,7 +5059,7 @@ var CustomerAdminService = class {
|
|
|
4993
5059
|
});
|
|
4994
5060
|
}
|
|
4995
5061
|
/** Remove tags from an address (`?tags=` query). */
|
|
4996
|
-
async removeAddressTags(customerNumber, addressId, tags, auth2 =
|
|
5062
|
+
async removeAddressTags(customerNumber, addressId, tags, auth2 = SERVICE28) {
|
|
4997
5063
|
await this.ctx.http.request({
|
|
4998
5064
|
method: "DELETE",
|
|
4999
5065
|
path: `${this.addressPath(customerNumber, addressId)}/tags`,
|
|
@@ -5007,7 +5073,7 @@ var CustomerAdminService = class {
|
|
|
5007
5073
|
* `customer.import_read` scope. An unconfigured tenant answers with an empty
|
|
5008
5074
|
* object rather than a 404.
|
|
5009
5075
|
*/
|
|
5010
|
-
async getPasswordMigrationRetention(auth2 =
|
|
5076
|
+
async getPasswordMigrationRetention(auth2 = SERVICE28) {
|
|
5011
5077
|
return this.ctx.http.request({
|
|
5012
5078
|
method: "GET",
|
|
5013
5079
|
path: this.configPath(),
|
|
@@ -5020,7 +5086,7 @@ var CustomerAdminService = class {
|
|
|
5020
5086
|
* `legacyAuth`** — that import is rejected without an active config. Re-POST with
|
|
5021
5087
|
* an earlier `retentionEndDate` to shorten a running window.
|
|
5022
5088
|
*/
|
|
5023
|
-
async configurePasswordMigrationRetention(input, auth2 =
|
|
5089
|
+
async configurePasswordMigrationRetention(input, auth2 = SERVICE28) {
|
|
5024
5090
|
return this.ctx.http.request({
|
|
5025
5091
|
method: "POST",
|
|
5026
5092
|
path: this.configPath(),
|
|
@@ -5033,7 +5099,7 @@ var CustomerAdminService = class {
|
|
|
5033
5099
|
* Intended for after the migration window: when the window ends, unmigrated
|
|
5034
5100
|
* accounts need a password reset and their legacy credentials are cleared.
|
|
5035
5101
|
*/
|
|
5036
|
-
async deletePasswordMigrationRetention(auth2 =
|
|
5102
|
+
async deletePasswordMigrationRetention(auth2 = SERVICE28) {
|
|
5037
5103
|
await this.ctx.http.request({ method: "DELETE", path: this.configPath(), auth: auth2 });
|
|
5038
5104
|
}
|
|
5039
5105
|
// --- Bulk import ---
|
|
@@ -5046,7 +5112,7 @@ var CustomerAdminService = class {
|
|
|
5046
5112
|
* `account.legacyAuth`, and importing `legacyAuth` requires an active retention
|
|
5047
5113
|
* config (see `configurePasswordMigrationRetention`).
|
|
5048
5114
|
*/
|
|
5049
|
-
async importCustomers(input, auth2 =
|
|
5115
|
+
async importCustomers(input, auth2 = SERVICE28) {
|
|
5050
5116
|
return this.ctx.http.request({
|
|
5051
5117
|
method: "POST",
|
|
5052
5118
|
path: `${this.base()}/import`,
|
|
@@ -5057,7 +5123,7 @@ var CustomerAdminService = class {
|
|
|
5057
5123
|
};
|
|
5058
5124
|
|
|
5059
5125
|
// src/services/approval.ts
|
|
5060
|
-
var
|
|
5126
|
+
var SERVICE29 = { kind: "service" };
|
|
5061
5127
|
var ApprovalService = class {
|
|
5062
5128
|
constructor(ctx) {
|
|
5063
5129
|
this.ctx = ctx;
|
|
@@ -5068,7 +5134,7 @@ var ApprovalService = class {
|
|
|
5068
5134
|
return `/approval/${this.ctx.tenant}`;
|
|
5069
5135
|
}
|
|
5070
5136
|
/** List approvals (paged via `pageNumber`/`pageSize`/`sort`/`q`). Returns an array. */
|
|
5071
|
-
async listApprovals(query = {}, auth2 =
|
|
5137
|
+
async listApprovals(query = {}, auth2 = SERVICE29) {
|
|
5072
5138
|
return this.ctx.http.request({
|
|
5073
5139
|
method: "GET",
|
|
5074
5140
|
path: `${this.base()}/approvals`,
|
|
@@ -5077,7 +5143,7 @@ var ApprovalService = class {
|
|
|
5077
5143
|
});
|
|
5078
5144
|
}
|
|
5079
5145
|
/** Retrieve a single approval by id. */
|
|
5080
|
-
async getApproval(approvalId, auth2 =
|
|
5146
|
+
async getApproval(approvalId, auth2 = SERVICE29) {
|
|
5081
5147
|
return this.ctx.http.request({
|
|
5082
5148
|
method: "GET",
|
|
5083
5149
|
path: `${this.base()}/approvals/${encodeURIComponent(approvalId)}`,
|
|
@@ -5085,7 +5151,7 @@ var ApprovalService = class {
|
|
|
5085
5151
|
});
|
|
5086
5152
|
}
|
|
5087
5153
|
/** Create an approval request (cart or quote). Returns the created `{ id }`. */
|
|
5088
|
-
async createApproval(input, auth2 =
|
|
5154
|
+
async createApproval(input, auth2 = SERVICE29) {
|
|
5089
5155
|
return this.ctx.http.request({
|
|
5090
5156
|
method: "POST",
|
|
5091
5157
|
path: `${this.base()}/approvals`,
|
|
@@ -5094,7 +5160,7 @@ var ApprovalService = class {
|
|
|
5094
5160
|
});
|
|
5095
5161
|
}
|
|
5096
5162
|
/** Approve/reject/amend an approval via a JSON-Patch op-array (`PATCH`). */
|
|
5097
|
-
async updateApproval(approvalId, ops, auth2 =
|
|
5163
|
+
async updateApproval(approvalId, ops, auth2 = SERVICE29) {
|
|
5098
5164
|
await this.ctx.http.request({
|
|
5099
5165
|
method: "PATCH",
|
|
5100
5166
|
path: `${this.base()}/approvals/${encodeURIComponent(approvalId)}`,
|
|
@@ -5103,7 +5169,7 @@ var ApprovalService = class {
|
|
|
5103
5169
|
});
|
|
5104
5170
|
}
|
|
5105
5171
|
/** Delete an approval by id. */
|
|
5106
|
-
async deleteApproval(approvalId, auth2 =
|
|
5172
|
+
async deleteApproval(approvalId, auth2 = SERVICE29) {
|
|
5107
5173
|
await this.ctx.http.request({
|
|
5108
5174
|
method: "DELETE",
|
|
5109
5175
|
path: `${this.base()}/approvals/${encodeURIComponent(approvalId)}`,
|
|
@@ -5111,7 +5177,7 @@ var ApprovalService = class {
|
|
|
5111
5177
|
});
|
|
5112
5178
|
}
|
|
5113
5179
|
/** Check whether an operation on a resource is permitted / needs approval. */
|
|
5114
|
-
async checkPermitted(input, auth2 =
|
|
5180
|
+
async checkPermitted(input, auth2 = SERVICE29) {
|
|
5115
5181
|
return this.ctx.http.request({
|
|
5116
5182
|
method: "POST",
|
|
5117
5183
|
path: `${this.base()}/approval/permitted`,
|
|
@@ -5120,7 +5186,7 @@ var ApprovalService = class {
|
|
|
5120
5186
|
});
|
|
5121
5187
|
}
|
|
5122
5188
|
/** Search for users eligible to approve a resource. Returns an array. */
|
|
5123
|
-
async searchApprovers(input, auth2 =
|
|
5189
|
+
async searchApprovers(input, auth2 = SERVICE29) {
|
|
5124
5190
|
return this.ctx.http.request({
|
|
5125
5191
|
method: "POST",
|
|
5126
5192
|
path: `${this.base()}/search/users`,
|
|
@@ -5183,6 +5249,7 @@ var EmporixClient = class {
|
|
|
5183
5249
|
returns;
|
|
5184
5250
|
indexing;
|
|
5185
5251
|
imports;
|
|
5252
|
+
auditLogs;
|
|
5186
5253
|
units;
|
|
5187
5254
|
catalogs;
|
|
5188
5255
|
vendors;
|
|
@@ -5257,6 +5324,7 @@ var EmporixClient = class {
|
|
|
5257
5324
|
this.returns = new ReturnsService(mk(ReturnsService.channel));
|
|
5258
5325
|
this.indexing = new IndexingService(mk(IndexingService.channel));
|
|
5259
5326
|
this.imports = new ImportService(mk(ImportService.channel));
|
|
5327
|
+
this.auditLogs = new AuditLogService(mk(AuditLogService.channel));
|
|
5260
5328
|
this.units = new UnitHandlingService(mk(UnitHandlingService.channel));
|
|
5261
5329
|
this.catalogs = new CatalogService(mk(CatalogService.channel));
|
|
5262
5330
|
this.vendors = new VendorService(mk(VendorService.channel));
|
|
@@ -5330,6 +5398,6 @@ function productYrn(tenant, productId) {
|
|
|
5330
5398
|
return `urn:yaas:hybris:product:product:${tenant};${productId}`;
|
|
5331
5399
|
}
|
|
5332
5400
|
|
|
5333
|
-
export { AiService, ApprovalService, BrandService, CatalogService, ClientConfigService, CloudFunctionsService, CountryService, CouponService, CurrencyService, CustomerAdminService, DEFAULT_HOST, EmporixClient, FeeService, HttpClient, ImportService, IndexingService, InvoiceService, LEVEL, LabelService, LevelResolver, PickPackService, QuoteService, RagIndexerService, ReturnsService, RewardPointsService, STORAGE_KEYS, SchemaService, SequentialIdService, SessionContextService, ShippingService, ShoppingListService, SiteService, TaxService, TenantConfigService, UnitHandlingService, VendorService, WebhookService, approvalStatusPatch, createConsoleLogger, createCookieBackedStorage, createCookieStorage, createCore, createEmporixClient, createListenerSet, createLocalStorage, createLocalStorageStorage, createMemoryStorage, createNoopLogger, createServerStorage, createSessionStorage, emporixKey, fromWebStorage, getCustomerSessionStore, parseAnonymousSession, pickFee, productIdFromYrn, productYrn, redact, resolveZone, serverAuth, siteMeta, validateConfig };
|
|
5401
|
+
export { AiService, ApprovalService, AuditLogService, BrandService, CatalogService, ClientConfigService, CloudFunctionsService, CountryService, CouponService, CurrencyService, CustomerAdminService, DEFAULT_HOST, EmporixClient, FeeService, HttpClient, ImportService, IndexingService, InvoiceService, LEVEL, LabelService, LevelResolver, PickPackService, QuoteService, RagIndexerService, ReturnsService, RewardPointsService, STORAGE_KEYS, SchemaService, SequentialIdService, SessionContextService, ShippingService, ShoppingListService, SiteService, TaxService, TenantConfigService, UnitHandlingService, VendorService, WebhookService, approvalStatusPatch, createConsoleLogger, createCookieBackedStorage, createCookieStorage, createCore, createEmporixClient, createListenerSet, createLocalStorage, createLocalStorageStorage, createMemoryStorage, createNoopLogger, createServerStorage, createSessionStorage, emporixKey, fromWebStorage, getCustomerSessionStore, parseAnonymousSession, pickFee, productIdFromYrn, productYrn, redact, resolveZone, serverAuth, siteMeta, validateConfig };
|
|
5334
5402
|
//# sourceMappingURL=index.js.map
|
|
5335
5403
|
//# sourceMappingURL=index.js.map
|