@viu/emporix-sdk 2.28.2 → 2.29.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +1 -1
  3. package/dist/availability.d.cts +1 -1
  4. package/dist/availability.d.ts +1 -1
  5. package/dist/cart.d.cts +1 -1
  6. package/dist/cart.d.ts +1 -1
  7. package/dist/category.d.cts +1 -1
  8. package/dist/category.d.ts +1 -1
  9. package/dist/checkout.d.cts +1 -1
  10. package/dist/checkout.d.ts +1 -1
  11. package/dist/companies.d.cts +1 -1
  12. package/dist/companies.d.ts +1 -1
  13. package/dist/contacts.d.cts +1 -1
  14. package/dist/contacts.d.ts +1 -1
  15. package/dist/{context-DC5gSgKK.d.cts → context-B5rWL6QD.d.cts} +1 -1
  16. package/dist/{context-DC5gSgKK.d.ts → context-B5rWL6QD.d.ts} +1 -1
  17. package/dist/{customer-groups-CLm6Gu9U.d.ts → customer-groups-BRN6I23C.d.ts} +1 -1
  18. package/dist/{customer-groups-BqYsPCA6.d.cts → customer-groups-_czUdHab.d.cts} +1 -1
  19. package/dist/customer-groups.d.cts +2 -2
  20. package/dist/customer-groups.d.ts +2 -2
  21. package/dist/customer.d.cts +1 -1
  22. package/dist/customer.d.ts +1 -1
  23. package/dist/index.cjs +302 -68
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.cts +601 -4
  26. package/dist/index.d.ts +601 -4
  27. package/dist/index.js +302 -69
  28. package/dist/index.js.map +1 -1
  29. package/dist/locations.d.cts +1 -1
  30. package/dist/locations.d.ts +1 -1
  31. package/dist/media.d.cts +1 -1
  32. package/dist/media.d.ts +1 -1
  33. package/dist/orders.d.cts +1 -1
  34. package/dist/orders.d.ts +1 -1
  35. package/dist/payment.d.cts +1 -1
  36. package/dist/payment.d.ts +1 -1
  37. package/dist/price.d.cts +1 -1
  38. package/dist/price.d.ts +1 -1
  39. package/dist/product.d.cts +1 -1
  40. package/dist/product.d.ts +1 -1
  41. package/dist/segment.d.cts +1 -1
  42. package/dist/segment.d.ts +1 -1
  43. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -890,7 +890,7 @@ var HttpClient = class {
890
890
  };
891
891
 
892
892
  // package.json
893
- var version = "2.28.2";
893
+ var version = "2.29.0";
894
894
 
895
895
  // src/version.ts
896
896
  var SDK_VERSION = version;
@@ -7518,8 +7518,239 @@ var IndexingService = class {
7518
7518
  }
7519
7519
  };
7520
7520
 
7521
- // src/services/unit-handling.ts
7521
+ // src/services/imports.ts
7522
7522
  var SERVICE30 = { kind: "service" };
7523
+ var DEFAULT_PAGE_SIZE = 50;
7524
+ function pageArgs(opts) {
7525
+ return { pageNumber: opts.pageNumber ?? 1, pageSize: opts.pageSize ?? DEFAULT_PAGE_SIZE };
7526
+ }
7527
+ function toPage(wire, requested) {
7528
+ const totalPages = wire.totalPages ?? 0;
7529
+ const pageNumber = (wire.number ?? requested.pageNumber - 1) + 1;
7530
+ return {
7531
+ items: wire.content ?? [],
7532
+ pageNumber,
7533
+ pageSize: wire.size ?? requested.pageSize,
7534
+ hasNextPage: pageNumber < totalPages,
7535
+ totalElements: wire.totalElements ?? 0,
7536
+ totalPages
7537
+ };
7538
+ }
7539
+ function toRunEvent(ev) {
7540
+ let payload;
7541
+ try {
7542
+ payload = JSON.parse(ev.data);
7543
+ } catch {
7544
+ return { type: "unknown", event: ev.event, data: ev.data };
7545
+ }
7546
+ if (typeof payload !== "object" || payload === null) {
7547
+ return { type: "unknown", event: ev.event, data: ev.data };
7548
+ }
7549
+ switch (ev.event) {
7550
+ case "snapshot": {
7551
+ const detail = payload;
7552
+ return { type: "snapshot", run: detail.run, streams: detail.streams ?? [] };
7553
+ }
7554
+ case "stream":
7555
+ return { type: "stream", stream: payload };
7556
+ case "run":
7557
+ return { type: "run", run: payload };
7558
+ default:
7559
+ return { type: "unknown", event: ev.event, data: ev.data };
7560
+ }
7561
+ }
7562
+ var ImportService = class {
7563
+ constructor(ctx) {
7564
+ this.ctx = ctx;
7565
+ }
7566
+ ctx;
7567
+ static channel = "import";
7568
+ base() {
7569
+ return `/importtool/${this.ctx.tenant}`;
7570
+ }
7571
+ /** List every import configuration of the tenant. */
7572
+ async listConfigs(auth2 = SERVICE30) {
7573
+ return this.ctx.http.request({
7574
+ method: "GET",
7575
+ path: `${this.base()}/configs`,
7576
+ auth: auth2
7577
+ });
7578
+ }
7579
+ /** Fetch one configuration by id. */
7580
+ async getConfig(id, auth2 = SERVICE30) {
7581
+ return this.ctx.http.request({
7582
+ method: "GET",
7583
+ path: `${this.base()}/configs/${encodeURIComponent(id)}`,
7584
+ auth: auth2
7585
+ });
7586
+ }
7587
+ /** List the streams of one configuration. */
7588
+ async listStreams(configId, auth2 = SERVICE30) {
7589
+ return this.ctx.http.request({
7590
+ method: "GET",
7591
+ path: `${this.base()}/configs/${encodeURIComponent(configId)}/streams`,
7592
+ auth: auth2
7593
+ });
7594
+ }
7595
+ /** Fetch one stream by id. */
7596
+ async getStream(id, auth2 = SERVICE30) {
7597
+ return this.ctx.http.request({
7598
+ method: "GET",
7599
+ path: `${this.base()}/streams/${encodeURIComponent(id)}`,
7600
+ auth: auth2
7601
+ });
7602
+ }
7603
+ /**
7604
+ * Fetch a configuration's schedule. Resolves to `null` when none is
7605
+ * configured — the service answers `204`, not `404`, so an absent schedule is
7606
+ * a normal result rather than an error.
7607
+ */
7608
+ async getSchedule(configId, auth2 = SERVICE30) {
7609
+ const res = await this.ctx.http.request({
7610
+ method: "GET",
7611
+ path: `${this.base()}/configs/${encodeURIComponent(configId)}/schedule`,
7612
+ auth: auth2
7613
+ });
7614
+ return res ?? null;
7615
+ }
7616
+ /** Create or replace a configuration's schedule. */
7617
+ async setSchedule(configId, input, auth2 = SERVICE30) {
7618
+ return this.ctx.http.request({
7619
+ method: "PUT",
7620
+ path: `${this.base()}/configs/${encodeURIComponent(configId)}/schedule`,
7621
+ body: input,
7622
+ auth: auth2
7623
+ });
7624
+ }
7625
+ /**
7626
+ * Trigger a run. `mode` defaults to `DELTA` server-side; `dryRun: true` maps
7627
+ * and validates without writing to the target.
7628
+ *
7629
+ * Not retried on a 5xx: a POST that timed out may already have queued a run.
7630
+ */
7631
+ async triggerRun(configId, input = {}, auth2 = SERVICE30) {
7632
+ return this.ctx.http.request({
7633
+ method: "POST",
7634
+ path: `${this.base()}/configs/${encodeURIComponent(configId)}/runs`,
7635
+ body: input,
7636
+ auth: auth2
7637
+ });
7638
+ }
7639
+ /** List a configuration's runs, newest first. */
7640
+ async listRuns(configId, opts = {}, auth2 = SERVICE30) {
7641
+ const args = pageArgs(opts);
7642
+ const wire = await this.ctx.http.request({
7643
+ method: "GET",
7644
+ path: `${this.base()}/configs/${encodeURIComponent(configId)}/runs`,
7645
+ query: { page: args.pageNumber - 1, size: args.pageSize },
7646
+ auth: auth2
7647
+ });
7648
+ return toPage(wire, args);
7649
+ }
7650
+ /** Fetch one run with its per-stream progress. */
7651
+ async getRun(runId, auth2 = SERVICE30) {
7652
+ return this.ctx.http.request({
7653
+ method: "GET",
7654
+ path: `${this.base()}/runs/${encodeURIComponent(runId)}`,
7655
+ auth: auth2
7656
+ });
7657
+ }
7658
+ /**
7659
+ * Stream a run's progress as Server-Sent Events: an initial `snapshot`, then a
7660
+ * `stream` event per processed batch, then a final `run` event when the run
7661
+ * finishes. The iterator ends when the service closes the stream; breaking out
7662
+ * of the `for await` aborts the request.
7663
+ *
7664
+ * Two ways this differs from every other method here. It does not re-auth: a
7665
+ * `401` while opening the stream throws instead of minting a fresh token and
7666
+ * retrying once, so a long-lived consumer should be ready to re-open (or fall
7667
+ * back to polling {@link getRun}). And frames this SDK version cannot read
7668
+ * arrive as `{ type: "unknown" }` rather than throwing — see
7669
+ * {@link ImportRunEvent}.
7670
+ */
7671
+ async *streamRun(runId, auth2 = SERVICE30) {
7672
+ const frames = this.ctx.http.requestStream({
7673
+ method: "GET",
7674
+ path: `${this.base()}/runs/${encodeURIComponent(runId)}/events`,
7675
+ auth: auth2
7676
+ });
7677
+ for await (const frame of frames) yield toRunEvent(frame);
7678
+ }
7679
+ /**
7680
+ * Request cancellation of a run. `force: true` hard-stops it immediately;
7681
+ * without it the run stops at the next safe point. The service answers `202`
7682
+ * with `accepted: false` when the run is unknown or already finished — that is
7683
+ * a result, not an error. A state conflict may instead come back as a `409`,
7684
+ * which does throw.
7685
+ */
7686
+ async cancelRun(runId, opts = {}, auth2 = SERVICE30) {
7687
+ const query = {};
7688
+ if (opts.force) query.force = "true";
7689
+ return this.ctx.http.request({
7690
+ method: "POST",
7691
+ path: `${this.base()}/runs/${encodeURIComponent(runId)}/cancel`,
7692
+ query,
7693
+ auth: auth2
7694
+ });
7695
+ }
7696
+ /** List the errors recorded during a run. */
7697
+ async listRunErrors(runId, opts = {}, auth2 = SERVICE30) {
7698
+ const args = pageArgs(opts);
7699
+ const wire = await this.ctx.http.request({
7700
+ method: "GET",
7701
+ path: `${this.base()}/runs/${encodeURIComponent(runId)}/errors`,
7702
+ query: { page: args.pageNumber - 1, size: args.pageSize },
7703
+ auth: auth2
7704
+ });
7705
+ return toPage(wire, args);
7706
+ }
7707
+ /** List the target types that hold imported records — the valid `type` values for {@link searchRecords}. */
7708
+ async listDataTypes(auth2 = SERVICE30) {
7709
+ return this.ctx.http.request({
7710
+ method: "GET",
7711
+ path: `${this.base()}/data/types`,
7712
+ auth: auth2
7713
+ });
7714
+ }
7715
+ /** Search imported records of one target type. */
7716
+ async searchRecords(opts, auth2 = SERVICE30) {
7717
+ const args = pageArgs(opts);
7718
+ const query = {
7719
+ type: opts.type,
7720
+ page: args.pageNumber - 1,
7721
+ size: args.pageSize
7722
+ };
7723
+ if (opts.search !== void 0) query.search = opts.search;
7724
+ if (opts.outcome !== void 0) query.outcome = opts.outcome;
7725
+ const wire = await this.ctx.http.request({
7726
+ method: "GET",
7727
+ path: `${this.base()}/data/records`,
7728
+ query,
7729
+ auth: auth2
7730
+ });
7731
+ return toPage(wire, args);
7732
+ }
7733
+ /** Search the imported records produced by one stream. */
7734
+ async searchStreamRecords(streamId, opts = {}, auth2 = SERVICE30) {
7735
+ const args = pageArgs(opts);
7736
+ const query = {
7737
+ page: args.pageNumber - 1,
7738
+ size: args.pageSize
7739
+ };
7740
+ if (opts.search !== void 0) query.search = opts.search;
7741
+ if (opts.outcome !== void 0) query.outcome = opts.outcome;
7742
+ const wire = await this.ctx.http.request({
7743
+ method: "GET",
7744
+ path: `${this.base()}/data/streams/${encodeURIComponent(streamId)}/records`,
7745
+ query,
7746
+ auth: auth2
7747
+ });
7748
+ return toPage(wire, args);
7749
+ }
7750
+ };
7751
+
7752
+ // src/services/unit-handling.ts
7753
+ var SERVICE31 = { kind: "service" };
7523
7754
  var UnitHandlingService = class {
7524
7755
  constructor(ctx) {
7525
7756
  this.ctx = ctx;
@@ -7530,7 +7761,7 @@ var UnitHandlingService = class {
7530
7761
  return `/unit-handling/${this.ctx.tenant}`;
7531
7762
  }
7532
7763
  /** Find units (filter/sort/page). */
7533
- async listUnits(query = {}, auth2 = SERVICE30) {
7764
+ async listUnits(query = {}, auth2 = SERVICE31) {
7534
7765
  return this.ctx.http.request({
7535
7766
  method: "GET",
7536
7767
  path: `${this.base()}/units`,
@@ -7539,7 +7770,7 @@ var UnitHandlingService = class {
7539
7770
  });
7540
7771
  }
7541
7772
  /** Retrieve a unit by code. */
7542
- async getUnit(unitCode, auth2 = SERVICE30) {
7773
+ async getUnit(unitCode, auth2 = SERVICE31) {
7543
7774
  return this.ctx.http.request({
7544
7775
  method: "GET",
7545
7776
  path: `${this.base()}/units/${encodeURIComponent(unitCode)}`,
@@ -7547,11 +7778,11 @@ var UnitHandlingService = class {
7547
7778
  });
7548
7779
  }
7549
7780
  /** Add a new unit. */
7550
- async createUnit(input, auth2 = SERVICE30) {
7781
+ async createUnit(input, auth2 = SERVICE31) {
7551
7782
  return this.ctx.http.request({ method: "POST", path: `${this.base()}/units`, auth: auth2, body: input });
7552
7783
  }
7553
7784
  /** Update a unit by code. */
7554
- async updateUnit(unitCode, input, auth2 = SERVICE30) {
7785
+ async updateUnit(unitCode, input, auth2 = SERVICE31) {
7555
7786
  await this.ctx.http.request({
7556
7787
  method: "PUT",
7557
7788
  path: `${this.base()}/units/${encodeURIComponent(unitCode)}`,
@@ -7560,7 +7791,7 @@ var UnitHandlingService = class {
7560
7791
  });
7561
7792
  }
7562
7793
  /** Delete a unit by code. */
7563
- async deleteUnit(unitCode, auth2 = SERVICE30) {
7794
+ async deleteUnit(unitCode, auth2 = SERVICE31) {
7564
7795
  await this.ctx.http.request({
7565
7796
  method: "DELETE",
7566
7797
  path: `${this.base()}/units/${encodeURIComponent(unitCode)}`,
@@ -7568,7 +7799,7 @@ var UnitHandlingService = class {
7568
7799
  });
7569
7800
  }
7570
7801
  /** Delete multiple units by code (bulk). The codes are sent as the request body. */
7571
- async deleteUnits(codes, auth2 = SERVICE30) {
7802
+ async deleteUnits(codes, auth2 = SERVICE31) {
7572
7803
  await this.ctx.http.request({
7573
7804
  method: "DELETE",
7574
7805
  path: `${this.base()}/units`,
@@ -7577,7 +7808,7 @@ var UnitHandlingService = class {
7577
7808
  });
7578
7809
  }
7579
7810
  /** Fetch a conversion factor (`PUT /units/conversion-factor-commands`). */
7580
- async getConversionFactor(input, auth2 = SERVICE30) {
7811
+ async getConversionFactor(input, auth2 = SERVICE31) {
7581
7812
  return this.ctx.http.request({
7582
7813
  method: "PUT",
7583
7814
  path: `${this.base()}/units/conversion-factor-commands`,
@@ -7586,7 +7817,7 @@ var UnitHandlingService = class {
7586
7817
  });
7587
7818
  }
7588
7819
  /** Convert a value between units (`PUT /units/convert-unit-commands`). */
7589
- async convertUnit(input, auth2 = SERVICE30) {
7820
+ async convertUnit(input, auth2 = SERVICE31) {
7590
7821
  return this.ctx.http.request({
7591
7822
  method: "PUT",
7592
7823
  path: `${this.base()}/units/convert-unit-commands`,
@@ -7595,13 +7826,13 @@ var UnitHandlingService = class {
7595
7826
  });
7596
7827
  }
7597
7828
  /** List all unit types. */
7598
- async listUnitTypes(auth2 = SERVICE30) {
7829
+ async listUnitTypes(auth2 = SERVICE31) {
7599
7830
  return this.ctx.http.request({ method: "GET", path: `${this.base()}/types`, auth: auth2 });
7600
7831
  }
7601
7832
  };
7602
7833
 
7603
7834
  // src/services/catalog.ts
7604
- var SERVICE31 = { kind: "service" };
7835
+ var SERVICE32 = { kind: "service" };
7605
7836
  var CatalogService = class {
7606
7837
  constructor(ctx) {
7607
7838
  this.ctx = ctx;
@@ -7612,7 +7843,7 @@ var CatalogService = class {
7612
7843
  return `/catalog/${this.ctx.tenant}/catalogs`;
7613
7844
  }
7614
7845
  /** List catalogs (filtered/sorted). */
7615
- async listCatalogs(query = {}, auth2 = SERVICE31) {
7846
+ async listCatalogs(query = {}, auth2 = SERVICE32) {
7616
7847
  return this.ctx.http.request({
7617
7848
  method: "GET",
7618
7849
  path: this.base(),
@@ -7621,7 +7852,7 @@ var CatalogService = class {
7621
7852
  });
7622
7853
  }
7623
7854
  /** Retrieve a catalog by id. */
7624
- async getCatalog(catalogId, auth2 = SERVICE31) {
7855
+ async getCatalog(catalogId, auth2 = SERVICE32) {
7625
7856
  return this.ctx.http.request({
7626
7857
  method: "GET",
7627
7858
  path: `${this.base()}/${encodeURIComponent(catalogId)}`,
@@ -7629,7 +7860,7 @@ var CatalogService = class {
7629
7860
  });
7630
7861
  }
7631
7862
  /** Retrieve all catalogs that contain a category. */
7632
- async getCatalogsForCategory(categoryId, auth2 = SERVICE31) {
7863
+ async getCatalogsForCategory(categoryId, auth2 = SERVICE32) {
7633
7864
  return this.ctx.http.request({
7634
7865
  method: "GET",
7635
7866
  path: `${this.base()}/categories/${encodeURIComponent(categoryId)}`,
@@ -7637,11 +7868,11 @@ var CatalogService = class {
7637
7868
  });
7638
7869
  }
7639
7870
  /** Create a catalog. */
7640
- async createCatalog(input, auth2 = SERVICE31) {
7871
+ async createCatalog(input, auth2 = SERVICE32) {
7641
7872
  return this.ctx.http.request({ method: "POST", path: this.base(), auth: auth2, body: input });
7642
7873
  }
7643
7874
  /** Upsert a catalog by id (`PUT`). */
7644
- async updateCatalog(catalogId, input, auth2 = SERVICE31) {
7875
+ async updateCatalog(catalogId, input, auth2 = SERVICE32) {
7645
7876
  return this.ctx.http.request({
7646
7877
  method: "PUT",
7647
7878
  path: `${this.base()}/${encodeURIComponent(catalogId)}`,
@@ -7650,7 +7881,7 @@ var CatalogService = class {
7650
7881
  });
7651
7882
  }
7652
7883
  /** Partially update a catalog by id (`PATCH`). */
7653
- async patchCatalog(catalogId, patch, auth2 = SERVICE31) {
7884
+ async patchCatalog(catalogId, patch, auth2 = SERVICE32) {
7654
7885
  await this.ctx.http.request({
7655
7886
  method: "PATCH",
7656
7887
  path: `${this.base()}/${encodeURIComponent(catalogId)}`,
@@ -7659,7 +7890,7 @@ var CatalogService = class {
7659
7890
  });
7660
7891
  }
7661
7892
  /** Remove a catalog by id. */
7662
- async deleteCatalog(catalogId, auth2 = SERVICE31) {
7893
+ async deleteCatalog(catalogId, auth2 = SERVICE32) {
7663
7894
  await this.ctx.http.request({
7664
7895
  method: "DELETE",
7665
7896
  path: `${this.base()}/${encodeURIComponent(catalogId)}`,
@@ -7669,7 +7900,7 @@ var CatalogService = class {
7669
7900
  };
7670
7901
 
7671
7902
  // src/services/vendor.ts
7672
- var SERVICE32 = { kind: "service" };
7903
+ var SERVICE33 = { kind: "service" };
7673
7904
  var VendorService = class {
7674
7905
  constructor(ctx) {
7675
7906
  this.ctx = ctx;
@@ -7681,7 +7912,7 @@ var VendorService = class {
7681
7912
  }
7682
7913
  // --- Vendors ---
7683
7914
  /** List all vendors. */
7684
- async listVendors(query = {}, auth2 = SERVICE32) {
7915
+ async listVendors(query = {}, auth2 = SERVICE33) {
7685
7916
  return this.ctx.http.request({
7686
7917
  method: "GET",
7687
7918
  path: `${this.base()}/vendors`,
@@ -7690,7 +7921,7 @@ var VendorService = class {
7690
7921
  });
7691
7922
  }
7692
7923
  /** Retrieve a vendor by id. */
7693
- async getVendor(vendorId, auth2 = SERVICE32) {
7924
+ async getVendor(vendorId, auth2 = SERVICE33) {
7694
7925
  return this.ctx.http.request({
7695
7926
  method: "GET",
7696
7927
  path: `${this.base()}/vendors/${encodeURIComponent(vendorId)}`,
@@ -7698,7 +7929,7 @@ var VendorService = class {
7698
7929
  });
7699
7930
  }
7700
7931
  /** Search vendors (`POST /vendors/search`). A built filter in `q` is resolved to a string. */
7701
- async searchVendors(query, auth2 = SERVICE32) {
7932
+ async searchVendors(query, auth2 = SERVICE33) {
7702
7933
  const body = query.q !== void 0 ? { ...query, q: resolveQuery(query.q, { compoundLogicalQuery: false }) } : query;
7703
7934
  return this.ctx.http.request({
7704
7935
  method: "POST",
@@ -7708,11 +7939,11 @@ var VendorService = class {
7708
7939
  });
7709
7940
  }
7710
7941
  /** Create a vendor. */
7711
- async createVendor(input, auth2 = SERVICE32) {
7942
+ async createVendor(input, auth2 = SERVICE33) {
7712
7943
  return this.ctx.http.request({ method: "POST", path: `${this.base()}/vendors`, auth: auth2, body: input });
7713
7944
  }
7714
7945
  /** Upsert a vendor by id (`PUT`). */
7715
- async updateVendor(vendorId, input, auth2 = SERVICE32) {
7946
+ async updateVendor(vendorId, input, auth2 = SERVICE33) {
7716
7947
  await this.ctx.http.request({
7717
7948
  method: "PUT",
7718
7949
  path: `${this.base()}/vendors/${encodeURIComponent(vendorId)}`,
@@ -7721,7 +7952,7 @@ var VendorService = class {
7721
7952
  });
7722
7953
  }
7723
7954
  /** Delete a vendor by id. */
7724
- async deleteVendor(vendorId, auth2 = SERVICE32) {
7955
+ async deleteVendor(vendorId, auth2 = SERVICE33) {
7725
7956
  await this.ctx.http.request({
7726
7957
  method: "DELETE",
7727
7958
  path: `${this.base()}/vendors/${encodeURIComponent(vendorId)}`,
@@ -7730,7 +7961,7 @@ var VendorService = class {
7730
7961
  }
7731
7962
  // --- Vendor locations ---
7732
7963
  /** List all vendor locations. */
7733
- async listVendorLocations(query = {}, auth2 = SERVICE32) {
7964
+ async listVendorLocations(query = {}, auth2 = SERVICE33) {
7734
7965
  return this.ctx.http.request({
7735
7966
  method: "GET",
7736
7967
  path: `${this.base()}/locations`,
@@ -7739,7 +7970,7 @@ var VendorService = class {
7739
7970
  });
7740
7971
  }
7741
7972
  /** Retrieve a vendor location by id. */
7742
- async getVendorLocation(locationId, auth2 = SERVICE32) {
7973
+ async getVendorLocation(locationId, auth2 = SERVICE33) {
7743
7974
  return this.ctx.http.request({
7744
7975
  method: "GET",
7745
7976
  path: `${this.base()}/locations/${encodeURIComponent(locationId)}`,
@@ -7747,11 +7978,11 @@ var VendorService = class {
7747
7978
  });
7748
7979
  }
7749
7980
  /** Create a vendor location. */
7750
- async createVendorLocation(input, auth2 = SERVICE32) {
7981
+ async createVendorLocation(input, auth2 = SERVICE33) {
7751
7982
  return this.ctx.http.request({ method: "POST", path: `${this.base()}/locations`, auth: auth2, body: input });
7752
7983
  }
7753
7984
  /** Upsert a vendor location by id (`PUT`). */
7754
- async updateVendorLocation(locationId, input, auth2 = SERVICE32) {
7985
+ async updateVendorLocation(locationId, input, auth2 = SERVICE33) {
7755
7986
  await this.ctx.http.request({
7756
7987
  method: "PUT",
7757
7988
  path: `${this.base()}/locations/${encodeURIComponent(locationId)}`,
@@ -7760,7 +7991,7 @@ var VendorService = class {
7760
7991
  });
7761
7992
  }
7762
7993
  /** Delete a vendor location by id. */
7763
- async deleteVendorLocation(locationId, auth2 = SERVICE32) {
7994
+ async deleteVendorLocation(locationId, auth2 = SERVICE33) {
7764
7995
  await this.ctx.http.request({
7765
7996
  method: "DELETE",
7766
7997
  path: `${this.base()}/locations/${encodeURIComponent(locationId)}`,
@@ -7770,7 +8001,7 @@ var VendorService = class {
7770
8001
  };
7771
8002
 
7772
8003
  // src/services/pick-pack.ts
7773
- var SERVICE33 = { kind: "service" };
8004
+ var SERVICE34 = { kind: "service" };
7774
8005
  var PickPackService = class {
7775
8006
  constructor(ctx) {
7776
8007
  this.ctx = ctx;
@@ -7784,7 +8015,7 @@ var PickPackService = class {
7784
8015
  return `${this.base()}/orders/${encodeURIComponent(orderId)}`;
7785
8016
  }
7786
8017
  /** List packlist orders. */
7787
- async listOrders(query = {}, auth2 = SERVICE33) {
8018
+ async listOrders(query = {}, auth2 = SERVICE34) {
7788
8019
  return this.ctx.http.request({
7789
8020
  method: "GET",
7790
8021
  path: `${this.base()}/orders`,
@@ -7793,19 +8024,19 @@ var PickPackService = class {
7793
8024
  });
7794
8025
  }
7795
8026
  /** Retrieve a packlist order by id. */
7796
- async getOrder(orderId, auth2 = SERVICE33) {
8027
+ async getOrder(orderId, auth2 = SERVICE34) {
7797
8028
  return this.ctx.http.request({ method: "GET", path: this.orderPath(orderId), auth: auth2 });
7798
8029
  }
7799
8030
  /** Update an order's status (`PATCH`). Returns an acknowledgement. */
7800
- async updateOrder(orderId, change, auth2 = SERVICE33) {
8031
+ async updateOrder(orderId, change, auth2 = SERVICE34) {
7801
8032
  return this.ctx.http.request({ method: "PATCH", path: this.orderPath(orderId), auth: auth2, body: change });
7802
8033
  }
7803
8034
  /** Finish an order. Returns an acknowledgement. */
7804
- async finishOrder(orderId, auth2 = SERVICE33) {
8035
+ async finishOrder(orderId, auth2 = SERVICE34) {
7805
8036
  return this.ctx.http.request({ method: "POST", path: `${this.orderPath(orderId)}/finish`, auth: auth2 });
7806
8037
  }
7807
8038
  /** List order cycles (ids). */
7808
- async listOrderCycles(query = {}, auth2 = SERVICE33) {
8039
+ async listOrderCycles(query = {}, auth2 = SERVICE34) {
7809
8040
  return this.ctx.http.request({
7810
8041
  method: "GET",
7811
8042
  path: `${this.base()}/orderCycles`,
@@ -7814,11 +8045,11 @@ var PickPackService = class {
7814
8045
  });
7815
8046
  }
7816
8047
  /** Add an assignee to an order. Returns an acknowledgement. */
7817
- async addAssignee(orderId, assignee, auth2 = SERVICE33) {
8048
+ async addAssignee(orderId, assignee, auth2 = SERVICE34) {
7818
8049
  return this.ctx.http.request({ method: "POST", path: `${this.orderPath(orderId)}/assignees`, auth: auth2, body: assignee });
7819
8050
  }
7820
8051
  /** Remove an assignee from an order. */
7821
- async removeAssignee(orderId, assigneeId, auth2 = SERVICE33) {
8052
+ async removeAssignee(orderId, assigneeId, auth2 = SERVICE34) {
7822
8053
  await this.ctx.http.request({
7823
8054
  method: "DELETE",
7824
8055
  path: `${this.orderPath(orderId)}/assignees/${encodeURIComponent(assigneeId)}`,
@@ -7826,15 +8057,15 @@ var PickPackService = class {
7826
8057
  });
7827
8058
  }
7828
8059
  /** Update packaging products for an order (`PUT`). Returns an acknowledgement. */
7829
- async updatePackaging(orderId, change, auth2 = SERVICE33) {
8060
+ async updatePackaging(orderId, change, auth2 = SERVICE34) {
7830
8061
  return this.ctx.http.request({ method: "PUT", path: `${this.orderPath(orderId)}/packaging`, auth: auth2, body: change });
7831
8062
  }
7832
8063
  /** Create a packing event. Returns an acknowledgement. */
7833
- async createEvent(event, auth2 = SERVICE33) {
8064
+ async createEvent(event, auth2 = SERVICE34) {
7834
8065
  return this.ctx.http.request({ method: "POST", path: `${this.base()}/events`, auth: auth2, body: event });
7835
8066
  }
7836
8067
  /** List packing events. */
7837
- async listEvents(query = {}, auth2 = SERVICE33) {
8068
+ async listEvents(query = {}, auth2 = SERVICE34) {
7838
8069
  return this.ctx.http.request({
7839
8070
  method: "GET",
7840
8071
  path: `${this.base()}/events`,
@@ -7843,7 +8074,7 @@ var PickPackService = class {
7843
8074
  });
7844
8075
  }
7845
8076
  /** Trigger an order recalculation. Returns the created job's id. */
7846
- async triggerRecalculation(input, auth2 = SERVICE33) {
8077
+ async triggerRecalculation(input, auth2 = SERVICE34) {
7847
8078
  return this.ctx.http.request({
7848
8079
  method: "POST",
7849
8080
  path: `${this.base()}/jobs/recalculations`,
@@ -7852,7 +8083,7 @@ var PickPackService = class {
7852
8083
  });
7853
8084
  }
7854
8085
  /** Retrieve a recalculation job by id. */
7855
- async getRecalculationJob(jobId, auth2 = SERVICE33) {
8086
+ async getRecalculationJob(jobId, auth2 = SERVICE34) {
7856
8087
  return this.ctx.http.request({
7857
8088
  method: "GET",
7858
8089
  path: `${this.base()}/jobs/recalculations/${encodeURIComponent(jobId)}`,
@@ -7862,7 +8093,7 @@ var PickPackService = class {
7862
8093
  };
7863
8094
 
7864
8095
  // src/services/customer-admin.ts
7865
- var SERVICE34 = { kind: "service" };
8096
+ var SERVICE35 = { kind: "service" };
7866
8097
  var CustomerAdminService = class {
7867
8098
  constructor(ctx) {
7868
8099
  this.ctx = ctx;
@@ -7880,7 +8111,7 @@ var CustomerAdminService = class {
7880
8111
  }
7881
8112
  // --- Customers ---
7882
8113
  /** List customers. */
7883
- async listCustomers(query = {}, auth2 = SERVICE34) {
8114
+ async listCustomers(query = {}, auth2 = SERVICE35) {
7884
8115
  return this.ctx.http.request({
7885
8116
  method: "GET",
7886
8117
  path: this.base(),
@@ -7889,33 +8120,33 @@ var CustomerAdminService = class {
7889
8120
  });
7890
8121
  }
7891
8122
  /** Search customers (`POST /customers/search`). A built filter in `q` is resolved to a string. */
7892
- async searchCustomers(query, auth2 = SERVICE34) {
8123
+ async searchCustomers(query, auth2 = SERVICE35) {
7893
8124
  const body = query.q !== void 0 ? { ...query, q: resolveQuery(query.q, { compoundLogicalQuery: false }) } : query;
7894
8125
  return this.ctx.http.request({ method: "POST", path: `${this.base()}/search`, auth: auth2, body });
7895
8126
  }
7896
8127
  /** Retrieve a customer profile by number. */
7897
- async getCustomer(customerNumber, auth2 = SERVICE34) {
8128
+ async getCustomer(customerNumber, auth2 = SERVICE35) {
7898
8129
  return this.ctx.http.request({ method: "GET", path: this.customerPath(customerNumber), auth: auth2 });
7899
8130
  }
7900
8131
  /** Create a customer. */
7901
- async createCustomer(input, auth2 = SERVICE34) {
8132
+ async createCustomer(input, auth2 = SERVICE35) {
7902
8133
  return this.ctx.http.request({ method: "POST", path: this.base(), auth: auth2, body: input });
7903
8134
  }
7904
8135
  /** Upsert a customer profile by number (`PUT`). */
7905
- async upsertCustomer(customerNumber, input, auth2 = SERVICE34) {
8136
+ async upsertCustomer(customerNumber, input, auth2 = SERVICE35) {
7906
8137
  return this.ctx.http.request({ method: "PUT", path: this.customerPath(customerNumber), auth: auth2, body: input });
7907
8138
  }
7908
8139
  /** Partially update a customer profile (`PATCH`). */
7909
- async patchCustomer(customerNumber, patch, auth2 = SERVICE34) {
8140
+ async patchCustomer(customerNumber, patch, auth2 = SERVICE35) {
7910
8141
  await this.ctx.http.request({ method: "PATCH", path: this.customerPath(customerNumber), auth: auth2, body: patch });
7911
8142
  }
7912
8143
  /** Delete a customer profile. */
7913
- async deleteCustomer(customerNumber, auth2 = SERVICE34) {
8144
+ async deleteCustomer(customerNumber, auth2 = SERVICE35) {
7914
8145
  await this.ctx.http.request({ method: "DELETE", path: this.customerPath(customerNumber), auth: auth2 });
7915
8146
  }
7916
8147
  // --- Addresses ---
7917
8148
  /** List a customer's addresses. */
7918
- async listAddresses(customerNumber, auth2 = SERVICE34) {
8149
+ async listAddresses(customerNumber, auth2 = SERVICE35) {
7919
8150
  return this.ctx.http.request({
7920
8151
  method: "GET",
7921
8152
  path: `${this.customerPath(customerNumber)}/addresses`,
@@ -7923,11 +8154,11 @@ var CustomerAdminService = class {
7923
8154
  });
7924
8155
  }
7925
8156
  /** Retrieve one address. */
7926
- async getAddress(customerNumber, addressId, auth2 = SERVICE34) {
8157
+ async getAddress(customerNumber, addressId, auth2 = SERVICE35) {
7927
8158
  return this.ctx.http.request({ method: "GET", path: this.addressPath(customerNumber, addressId), auth: auth2 });
7928
8159
  }
7929
8160
  /** Add an address. */
7930
- async addAddress(customerNumber, input, auth2 = SERVICE34) {
8161
+ async addAddress(customerNumber, input, auth2 = SERVICE35) {
7931
8162
  return this.ctx.http.request({
7932
8163
  method: "POST",
7933
8164
  path: `${this.customerPath(customerNumber)}/addresses`,
@@ -7936,19 +8167,19 @@ var CustomerAdminService = class {
7936
8167
  });
7937
8168
  }
7938
8169
  /** Upsert an address by id (`PUT`). */
7939
- async upsertAddress(customerNumber, addressId, input, auth2 = SERVICE34) {
8170
+ async upsertAddress(customerNumber, addressId, input, auth2 = SERVICE35) {
7940
8171
  return this.ctx.http.request({ method: "PUT", path: this.addressPath(customerNumber, addressId), auth: auth2, body: input });
7941
8172
  }
7942
8173
  /** Partially update an address by id (`PATCH`). */
7943
- async patchAddress(customerNumber, addressId, patch, auth2 = SERVICE34) {
8174
+ async patchAddress(customerNumber, addressId, patch, auth2 = SERVICE35) {
7944
8175
  await this.ctx.http.request({ method: "PATCH", path: this.addressPath(customerNumber, addressId), auth: auth2, body: patch });
7945
8176
  }
7946
8177
  /** Delete an address by id. */
7947
- async deleteAddress(customerNumber, addressId, auth2 = SERVICE34) {
8178
+ async deleteAddress(customerNumber, addressId, auth2 = SERVICE35) {
7948
8179
  await this.ctx.http.request({ method: "DELETE", path: this.addressPath(customerNumber, addressId), auth: auth2 });
7949
8180
  }
7950
8181
  /** Add tags to an address (`?tags=` query). */
7951
- async addAddressTags(customerNumber, addressId, tags, auth2 = SERVICE34) {
8182
+ async addAddressTags(customerNumber, addressId, tags, auth2 = SERVICE35) {
7952
8183
  await this.ctx.http.request({
7953
8184
  method: "POST",
7954
8185
  path: `${this.addressPath(customerNumber, addressId)}/tags`,
@@ -7957,7 +8188,7 @@ var CustomerAdminService = class {
7957
8188
  });
7958
8189
  }
7959
8190
  /** Remove tags from an address (`?tags=` query). */
7960
- async removeAddressTags(customerNumber, addressId, tags, auth2 = SERVICE34) {
8191
+ async removeAddressTags(customerNumber, addressId, tags, auth2 = SERVICE35) {
7961
8192
  await this.ctx.http.request({
7962
8193
  method: "DELETE",
7963
8194
  path: `${this.addressPath(customerNumber, addressId)}/tags`,
@@ -7968,7 +8199,7 @@ var CustomerAdminService = class {
7968
8199
  };
7969
8200
 
7970
8201
  // src/services/approval.ts
7971
- var SERVICE35 = { kind: "service" };
8202
+ var SERVICE36 = { kind: "service" };
7972
8203
  var ApprovalService = class {
7973
8204
  constructor(ctx) {
7974
8205
  this.ctx = ctx;
@@ -7979,7 +8210,7 @@ var ApprovalService = class {
7979
8210
  return `/approval/${this.ctx.tenant}`;
7980
8211
  }
7981
8212
  /** List approvals (paged via `pageNumber`/`pageSize`/`sort`/`q`). Returns an array. */
7982
- async listApprovals(query = {}, auth2 = SERVICE35) {
8213
+ async listApprovals(query = {}, auth2 = SERVICE36) {
7983
8214
  return this.ctx.http.request({
7984
8215
  method: "GET",
7985
8216
  path: `${this.base()}/approvals`,
@@ -7988,7 +8219,7 @@ var ApprovalService = class {
7988
8219
  });
7989
8220
  }
7990
8221
  /** Retrieve a single approval by id. */
7991
- async getApproval(approvalId, auth2 = SERVICE35) {
8222
+ async getApproval(approvalId, auth2 = SERVICE36) {
7992
8223
  return this.ctx.http.request({
7993
8224
  method: "GET",
7994
8225
  path: `${this.base()}/approvals/${encodeURIComponent(approvalId)}`,
@@ -7996,7 +8227,7 @@ var ApprovalService = class {
7996
8227
  });
7997
8228
  }
7998
8229
  /** Create an approval request (cart or quote). Returns the created `{ id }`. */
7999
- async createApproval(input, auth2 = SERVICE35) {
8230
+ async createApproval(input, auth2 = SERVICE36) {
8000
8231
  return this.ctx.http.request({
8001
8232
  method: "POST",
8002
8233
  path: `${this.base()}/approvals`,
@@ -8005,7 +8236,7 @@ var ApprovalService = class {
8005
8236
  });
8006
8237
  }
8007
8238
  /** Approve/reject/amend an approval via a JSON-Patch op-array (`PATCH`). */
8008
- async updateApproval(approvalId, ops, auth2 = SERVICE35) {
8239
+ async updateApproval(approvalId, ops, auth2 = SERVICE36) {
8009
8240
  await this.ctx.http.request({
8010
8241
  method: "PATCH",
8011
8242
  path: `${this.base()}/approvals/${encodeURIComponent(approvalId)}`,
@@ -8014,7 +8245,7 @@ var ApprovalService = class {
8014
8245
  });
8015
8246
  }
8016
8247
  /** Delete an approval by id. */
8017
- async deleteApproval(approvalId, auth2 = SERVICE35) {
8248
+ async deleteApproval(approvalId, auth2 = SERVICE36) {
8018
8249
  await this.ctx.http.request({
8019
8250
  method: "DELETE",
8020
8251
  path: `${this.base()}/approvals/${encodeURIComponent(approvalId)}`,
@@ -8022,7 +8253,7 @@ var ApprovalService = class {
8022
8253
  });
8023
8254
  }
8024
8255
  /** Check whether an operation on a resource is permitted / needs approval. */
8025
- async checkPermitted(input, auth2 = SERVICE35) {
8256
+ async checkPermitted(input, auth2 = SERVICE36) {
8026
8257
  return this.ctx.http.request({
8027
8258
  method: "POST",
8028
8259
  path: `${this.base()}/approval/permitted`,
@@ -8031,7 +8262,7 @@ var ApprovalService = class {
8031
8262
  });
8032
8263
  }
8033
8264
  /** Search for users eligible to approve a resource. Returns an array. */
8034
- async searchApprovers(input, auth2 = SERVICE35) {
8265
+ async searchApprovers(input, auth2 = SERVICE36) {
8035
8266
  return this.ctx.http.request({
8036
8267
  method: "POST",
8037
8268
  path: `${this.base()}/search/users`,
@@ -8085,6 +8316,7 @@ var EmporixClient = class {
8085
8316
  returns;
8086
8317
  sepaExport;
8087
8318
  indexing;
8319
+ imports;
8088
8320
  units;
8089
8321
  catalogs;
8090
8322
  vendors;
@@ -8159,6 +8391,7 @@ var EmporixClient = class {
8159
8391
  this.returns = new ReturnsService(mk(ReturnsService.channel));
8160
8392
  this.sepaExport = new SepaExportService(mk(SepaExportService.channel));
8161
8393
  this.indexing = new IndexingService(mk(IndexingService.channel));
8394
+ this.imports = new ImportService(mk(ImportService.channel));
8162
8395
  this.units = new UnitHandlingService(mk(UnitHandlingService.channel));
8163
8396
  this.catalogs = new CatalogService(mk(CatalogService.channel));
8164
8397
  this.vendors = new VendorService(mk(VendorService.channel));
@@ -8263,6 +8496,7 @@ exports.EmporixValidationError = EmporixValidationError;
8263
8496
  exports.FeeService = FeeService;
8264
8497
  exports.HttpClient = HttpClient;
8265
8498
  exports.IamService = IamService;
8499
+ exports.ImportService = ImportService;
8266
8500
  exports.IndexingService = IndexingService;
8267
8501
  exports.InvoiceService = InvoiceService;
8268
8502
  exports.LEVEL = LEVEL;