@viu/emporix-sdk 3.6.0 → 4.0.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 (49) hide show
  1. package/CHANGELOG.md +108 -0
  2. package/README.md +2 -2
  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/{chunk-3G5KROEC.js → chunk-XJJDCK2Z.js} +80 -3
  12. package/dist/chunk-XJJDCK2Z.js.map +1 -0
  13. package/dist/companies.d.cts +1 -1
  14. package/dist/companies.d.ts +1 -1
  15. package/dist/contacts.d.cts +1 -1
  16. package/dist/contacts.d.ts +1 -1
  17. package/dist/{context-CZdtWgQO.d.cts → context-5lt8Q0MT.d.cts} +1 -1
  18. package/dist/{context-CZdtWgQO.d.ts → context-5lt8Q0MT.d.ts} +1 -1
  19. package/dist/{customer-groups-OEnqHFsX.d.cts → customer-groups-8cgS8S5d.d.cts} +1 -1
  20. package/dist/{customer-groups-DhrOoC8M.d.ts → customer-groups-DizW_a-w.d.ts} +1 -1
  21. package/dist/customer-groups.d.cts +2 -2
  22. package/dist/customer-groups.d.ts +2 -2
  23. package/dist/customer.d.cts +1 -1
  24. package/dist/customer.d.ts +1 -1
  25. package/dist/index.cjs +201 -139
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.cts +315 -601
  28. package/dist/index.d.ts +315 -601
  29. package/dist/index.js +126 -140
  30. package/dist/index.js.map +1 -1
  31. package/dist/locations.d.cts +1 -1
  32. package/dist/locations.d.ts +1 -1
  33. package/dist/media.d.cts +1 -1
  34. package/dist/media.d.ts +1 -1
  35. package/dist/orders.d.cts +1 -1
  36. package/dist/orders.d.ts +1 -1
  37. package/dist/payment.d.cts +1 -1
  38. package/dist/payment.d.ts +1 -1
  39. package/dist/price.d.cts +1 -1
  40. package/dist/price.d.ts +1 -1
  41. package/dist/product.d.cts +1 -1
  42. package/dist/product.d.ts +1 -1
  43. package/dist/segment.cjs +78 -1
  44. package/dist/segment.cjs.map +1 -1
  45. package/dist/segment.d.cts +90 -3
  46. package/dist/segment.d.ts +90 -3
  47. package/dist/segment.js +1 -1
  48. package/package.json +1 -1
  49. package/dist/chunk-3G5KROEC.js.map +0 -1
package/dist/index.cjs CHANGED
@@ -1242,7 +1242,7 @@ var HttpClient = class {
1242
1242
  };
1243
1243
 
1244
1244
  // package.json
1245
- var version = "3.6.0";
1245
+ var version = "4.0.0";
1246
1246
 
1247
1247
  // src/version.ts
1248
1248
  var SDK_VERSION = version;
@@ -3665,7 +3665,12 @@ var SegmentService = class {
3665
3665
  base() {
3666
3666
  return `/customer-segment/${this.ctx.tenant}/segments`;
3667
3667
  }
3668
- /** Lists segments the caller belongs to (with `segment_read_own`). */
3668
+ /**
3669
+ * Lists segments via the generic `GET /segments` (with `segment_read_own`).
3670
+ * Its documentation does not say whether segments inherited through IAM
3671
+ * groups are included — for "which segments is this customer in", use
3672
+ * {@link listMine}, which is documented to include them.
3673
+ */
3669
3674
  async list(query = {}, auth2) {
3670
3675
  const q = {};
3671
3676
  setIfDefined(q, "q", query.q);
@@ -3678,6 +3683,26 @@ var SegmentService = class {
3678
3683
  ...Object.keys(q).length ? { query: q } : {}
3679
3684
  });
3680
3685
  }
3686
+ /**
3687
+ * The authenticated customer's **active** segments (`GET /segments/me`,
3688
+ * `segment_read_own`): assigned directly, and inherited through the
3689
+ * customer's IAM groups — groups not bound to a legal entity, plus groups
3690
+ * bound to the customer's *current* legal entity. Switching the active company
3691
+ * can therefore change the result.
3692
+ */
3693
+ async listMine(query = {}, auth2) {
3694
+ const q = {};
3695
+ setIfDefined(q, "q", query.q);
3696
+ setIfDefined(q, "pageNumber", query.pageNumber);
3697
+ setIfDefined(q, "pageSize", query.pageSize);
3698
+ setIfDefined(q, "sort", query.sort);
3699
+ return this.ctx.http.request({
3700
+ method: "GET",
3701
+ path: `${this.base()}/me`,
3702
+ auth: requireCustomer(auth2),
3703
+ ...Object.keys(q).length ? { query: q } : {}
3704
+ });
3705
+ }
3681
3706
  /** Fetches a single segment by id. */
3682
3707
  async get(segmentId, auth2) {
3683
3708
  return this.ctx.http.request({
@@ -3929,6 +3954,58 @@ var SegmentService = class {
3929
3954
  body
3930
3955
  })
3931
3956
  };
3957
+ /**
3958
+ * IAM group→segment assignments (`segment_read` / `segment_manage`). Customers
3959
+ * inherit a segment through their groups, on top of direct assignment — see
3960
+ * {@link listMine}. Only groups with `userType: "CUSTOMER"` can be assigned;
3961
+ * anything else is a `400`. Default auth: service.
3962
+ */
3963
+ groups = {
3964
+ list: async (segmentId, query = {}, authCtx = SERVICE6) => {
3965
+ const q = {};
3966
+ setIfDefined(q, "q", query.q);
3967
+ setIfDefined(q, "pageNumber", query.pageNumber);
3968
+ setIfDefined(q, "pageSize", query.pageSize);
3969
+ setIfDefined(q, "sort", query.sort);
3970
+ return this.ctx.http.request({
3971
+ method: "GET",
3972
+ path: `${this.base()}/${encodeURIComponent(segmentId)}/groups`,
3973
+ auth: authCtx,
3974
+ ...Object.keys(q).length ? { query: q } : {}
3975
+ });
3976
+ },
3977
+ search: async (segmentId, query, authCtx = SERVICE6) => this.ctx.http.request({
3978
+ method: "POST",
3979
+ path: `${this.base()}/${encodeURIComponent(segmentId)}/groups/search`,
3980
+ auth: authCtx,
3981
+ body: query
3982
+ }),
3983
+ get: async (segmentId, groupId, authCtx = SERVICE6) => this.ctx.http.request({
3984
+ method: "GET",
3985
+ path: `${this.base()}/${encodeURIComponent(segmentId)}/groups/${encodeURIComponent(groupId)}`,
3986
+ auth: authCtx
3987
+ }),
3988
+ /**
3989
+ * Upsert: `201` when the assignment is created, `204` when it is updated —
3990
+ * **neither returns a body**, so this resolves to nothing. Fetch it with
3991
+ * {@link get} if you need the stored assignment.
3992
+ */
3993
+ assign: async (segmentId, groupId, input = {}, authCtx = SERVICE6) => {
3994
+ await this.ctx.http.request({
3995
+ method: "PUT",
3996
+ path: `${this.base()}/${encodeURIComponent(segmentId)}/groups/${encodeURIComponent(groupId)}`,
3997
+ auth: authCtx,
3998
+ body: input
3999
+ });
4000
+ },
4001
+ remove: async (segmentId, groupId, authCtx = SERVICE6) => {
4002
+ await this.ctx.http.request({
4003
+ method: "DELETE",
4004
+ path: `${this.base()}/${encodeURIComponent(segmentId)}/groups/${encodeURIComponent(groupId)}`,
4005
+ auth: authCtx
4006
+ });
4007
+ }
4008
+ };
3932
4009
  /** Item→segment assignments (`type` = PRODUCT | CATEGORY). Default auth: service. */
3933
4010
  items = {
3934
4011
  search: async (segmentId, query, authCtx = SERVICE6) => this.ctx.http.request({
@@ -6416,6 +6493,16 @@ var AnalyticsResource = class {
6416
6493
 
6417
6494
  // src/services/ai.ts
6418
6495
  var SERVICE17 = { kind: "service" };
6496
+ function assertChatOptions(opts, method) {
6497
+ if (typeof opts === "object" && opts !== null && "kind" in opts) {
6498
+ throw new Error(
6499
+ `ai.${method}: the second argument is { sessionId? } since 4.0.0 \u2014 pass the auth context third`
6500
+ );
6501
+ }
6502
+ }
6503
+ function sessionHeader(opts) {
6504
+ return opts.sessionId ? { headers: { "session-id": opts.sessionId } } : {};
6505
+ }
6419
6506
  var AiService = class {
6420
6507
  constructor(ctx) {
6421
6508
  this.ctx = ctx;
@@ -6546,40 +6633,50 @@ var AiService = class {
6546
6633
  /**
6547
6634
  * Synchronous agent chat (`POST /agentic/chat`). Returns the response
6548
6635
  * ARRAY verbatim (the upstream contract is an array, not a single object).
6636
+ *
6637
+ * `opts.sessionId` is sent as the `session-id` header. It carries the
6638
+ * conversation — continuity needs it plus `enabledMemory` on the agent — and
6639
+ * it is how a chat reaches an attachment: pass the `sessionId` the upload or
6640
+ * reuse returned, and list the file under `input.attachments`.
6549
6641
  */
6550
- async chat(input, auth2 = SERVICE17) {
6642
+ async chat(input, opts = {}, auth2 = SERVICE17) {
6643
+ assertChatOptions(opts, "chat");
6551
6644
  return this.ctx.http.request({
6552
6645
  method: "POST",
6553
6646
  path: `${this.base()}/agentic/chat`,
6554
6647
  auth: auth2,
6555
- body: input
6648
+ body: input,
6649
+ ...sessionHeader(opts)
6556
6650
  });
6557
6651
  }
6558
6652
  /**
6559
6653
  * Fire-and-forget agent chat (`POST /agentic/chat-async`, HTTP 201).
6560
- * Returns the job-id ARRAY verbatim.
6654
+ * Returns the job-id ARRAY verbatim. `opts` as for {@link chat}.
6561
6655
  */
6562
- async chatAsync(input, auth2 = SERVICE17) {
6656
+ async chatAsync(input, opts = {}, auth2 = SERVICE17) {
6657
+ assertChatOptions(opts, "chatAsync");
6563
6658
  return this.ctx.http.request({
6564
6659
  method: "POST",
6565
6660
  path: `${this.base()}/agentic/chat-async`,
6566
6661
  auth: auth2,
6567
- body: input
6662
+ body: input,
6663
+ ...sessionHeader(opts)
6568
6664
  });
6569
6665
  }
6570
6666
  /**
6571
6667
  * Streaming agent chat (`POST /agentic/chat-stream`, `text/event-stream`).
6572
6668
  * Yields each SSE `data` payload verbatim — the upstream contract types the
6573
6669
  * stream body as an opaque string, so chunks are raw strings, not parsed
6574
- * objects. Consume with `for await`.
6670
+ * objects. Consume with `for await`. `opts` as for {@link chat}.
6575
6671
  */
6576
6672
  async *chatStream(input, opts = {}, auth2 = SERVICE17) {
6673
+ assertChatOptions(opts, "chatStream");
6577
6674
  const events = this.ctx.http.requestStream({
6578
6675
  method: "POST",
6579
6676
  path: `${this.base()}/agentic/chat-stream`,
6580
6677
  auth: auth2,
6581
6678
  body: input,
6582
- ...opts.sessionId ? { headers: { "session-id": opts.sessionId } } : {}
6679
+ ...sessionHeader(opts)
6583
6680
  });
6584
6681
  for await (const ev of events) yield ev.data;
6585
6682
  }
@@ -6639,28 +6736,31 @@ var AiService = class {
6639
6736
  });
6640
6737
  }
6641
6738
  /**
6642
- * Assign an attachment that already exists in a session to another agent
6739
+ * Assign an existing media asset to an agent as a chat attachment
6643
6740
  * (`POST /agentic/{agentId}/attachments` with the `attachmentId` form field,
6644
- * HTTP 204 — nothing is returned, unlike {@link uploadAttachment}'s 201).
6741
+ * HTTP 200). Resolves to the attachment `id` and the `sessionId` to send on
6742
+ * the following chat calls.
6645
6743
  *
6646
6744
  * Use it to hand a second agent the same file instead of uploading it twice.
6647
- * The attachment is resolved inside `opts.sessionId`, which is why that is
6648
- * required rather than optional — the id alone does not identify a file.
6745
+ * Pass `opts.sessionId` to attach to an existing chat session; without it the
6746
+ * service opens a new one and returns its id — thread that into the chat, or
6747
+ * the agent never sees the file. With `ai.agentexecution_manage` the asset may
6748
+ * be any media asset, not only one uploaded to this session.
6649
6749
  *
6650
6750
  * ```ts
6651
6751
  * const { id, sessionId } = await client.ai.uploadAttachment("agent-a", file);
6652
6752
  * await client.ai.reuseAttachment("agent-b", id!, { sessionId: sessionId! });
6653
6753
  * ```
6654
6754
  */
6655
- async reuseAttachment(agentId, attachmentId, opts, auth2 = SERVICE17) {
6755
+ async reuseAttachment(agentId, attachmentId, opts = {}, auth2 = SERVICE17) {
6656
6756
  const form = new FormData();
6657
6757
  form.append("attachmentId", attachmentId);
6658
- await this.ctx.http.request({
6758
+ return this.ctx.http.request({
6659
6759
  method: "POST",
6660
6760
  path: `${this.base()}/agentic/${encodeURIComponent(agentId)}/attachments`,
6661
6761
  auth: auth2,
6662
6762
  body: form,
6663
- headers: { "session-id": opts.sessionId }
6763
+ ...opts.sessionId ? { headers: { "session-id": opts.sessionId } } : {}
6664
6764
  });
6665
6765
  }
6666
6766
  /** Export agents + components as a base64/checksum blob (`POST /agentic/agents/export`). */
@@ -8203,6 +8303,23 @@ var ImportService = class {
8203
8303
  auth: auth2
8204
8304
  });
8205
8305
  }
8306
+ /**
8307
+ * The order in which a configuration's streams run, and the dependencies
8308
+ * behind it. Read it here instead of deriving it from the stream definitions:
8309
+ * mapping transformations add dependencies that no single stream shows, so a
8310
+ * self-computed order can differ from the one used at run time.
8311
+ *
8312
+ * The result lists stream **names**, while {@link triggerRun}'s `streamIds`
8313
+ * takes stream **ids** — map through {@link listStreams} before passing a
8314
+ * subset back.
8315
+ */
8316
+ async getStreamOrder(configId, auth2 = SERVICE29) {
8317
+ return this.ctx.http.request({
8318
+ method: "GET",
8319
+ path: `${this.base()}/configs/${encodeURIComponent(configId)}/stream-order`,
8320
+ auth: auth2
8321
+ });
8322
+ }
8206
8323
  /**
8207
8324
  * Fetch a configuration's schedule. Resolves to `null` when none is
8208
8325
  * configured — the service answers `204`, not `404`, so an absent schedule is
@@ -8267,6 +8384,9 @@ var ImportService = class {
8267
8384
  * integration scenario are indistinguishable in the history. Note the service
8268
8385
  * **rejects** an `origin` over 40 characters instead of shortening it.
8269
8386
  *
8387
+ * `streamIds` runs a subset — see {@link ImportRunInput} for what is rejected,
8388
+ * and note it takes ids where {@link getStreamOrder} reports names.
8389
+ *
8270
8390
  * Not retried on a 5xx: a POST that timed out may already have queued a run.
8271
8391
  *
8272
8392
  * @example
@@ -8358,6 +8478,43 @@ var ImportService = class {
8358
8478
  });
8359
8479
  return toPage(wire, args);
8360
8480
  }
8481
+ /**
8482
+ * The rows behind a run's feed-quality counters: source rows that repeated a
8483
+ * natural key (`kind: "REPEATED_KEY"`, counted as `duplicateKeys`) and child
8484
+ * lines with no parent to attach to (`"UNRESOLVED_PARENT"`, counted as
8485
+ * `unresolvedParents`). Neither is a failure, which is why these rows are not
8486
+ * in {@link listRunErrors}.
8487
+ *
8488
+ * **A capped sample** — see {@link ImportRunDiagnostics} before reading
8489
+ * `rows.length` as the size of the problem. `limit` defaults to 500 here
8490
+ * (1–50 000); {@link downloadRunDiagnosticsCsv} defaults to 50 000.
8491
+ */
8492
+ async listRunDiagnostics(runId, query = {}, auth2 = SERVICE29) {
8493
+ return this.ctx.http.request({
8494
+ method: "GET",
8495
+ path: `${this.base()}/runs/${encodeURIComponent(runId)}/diagnostics`,
8496
+ query: { ...query },
8497
+ auth: auth2
8498
+ });
8499
+ }
8500
+ /**
8501
+ * The same rows as {@link listRunDiagnostics}, as CSV text for a spreadsheet
8502
+ * or a ticket. Comment lines above the header record whether `limit` or the
8503
+ * recording cap cut rows off, so the file keeps that context when shared on
8504
+ * its own. `limit` defaults to 50 000 here, not 500.
8505
+ *
8506
+ * Every value is quoted, and a value starting with `=`, `+`, `-` or `@` is
8507
+ * prefixed with an apostrophe so spreadsheet software does not evaluate source
8508
+ * data as a formula. Strip it if you parse the file instead of opening it.
8509
+ */
8510
+ async downloadRunDiagnosticsCsv(runId, query = {}, auth2 = SERVICE29) {
8511
+ return this.ctx.http.request({
8512
+ method: "GET",
8513
+ path: `${this.base()}/runs/${encodeURIComponent(runId)}/diagnostics/csv`,
8514
+ query: { ...query },
8515
+ auth: auth2
8516
+ });
8517
+ }
8361
8518
  /** List the target types that hold imported records — the valid `type` values for {@link searchRecords}. */
8362
8519
  async listDataTypes(auth2 = SERVICE29) {
8363
8520
  return this.ctx.http.request({
@@ -8805,100 +8962,8 @@ var VendorService = class {
8805
8962
  }
8806
8963
  };
8807
8964
 
8808
- // src/services/pick-pack.ts
8809
- var SERVICE34 = { kind: "service" };
8810
- var PickPackService = class {
8811
- constructor(ctx) {
8812
- this.ctx = ctx;
8813
- }
8814
- ctx;
8815
- static channel = "pick-pack";
8816
- base() {
8817
- return `/pick-pack/${this.ctx.tenant}`;
8818
- }
8819
- orderPath(orderId) {
8820
- return `${this.base()}/orders/${encodeURIComponent(orderId)}`;
8821
- }
8822
- /** List packlist orders. */
8823
- async listOrders(query = {}, auth2 = SERVICE34) {
8824
- return this.ctx.http.request({
8825
- method: "GET",
8826
- path: `${this.base()}/orders`,
8827
- auth: auth2,
8828
- ...Object.keys(query).length ? { query } : {}
8829
- });
8830
- }
8831
- /** Retrieve a packlist order by id. */
8832
- async getOrder(orderId, auth2 = SERVICE34) {
8833
- return this.ctx.http.request({ method: "GET", path: this.orderPath(orderId), auth: auth2 });
8834
- }
8835
- /** Update an order's status (`PATCH`). Returns an acknowledgement. */
8836
- async updateOrder(orderId, change, auth2 = SERVICE34) {
8837
- return this.ctx.http.request({ method: "PATCH", path: this.orderPath(orderId), auth: auth2, body: change });
8838
- }
8839
- /** Finish an order. Returns an acknowledgement. */
8840
- async finishOrder(orderId, auth2 = SERVICE34) {
8841
- return this.ctx.http.request({ method: "POST", path: `${this.orderPath(orderId)}/finish`, auth: auth2 });
8842
- }
8843
- /** List order cycles (ids). */
8844
- async listOrderCycles(query = {}, auth2 = SERVICE34) {
8845
- return this.ctx.http.request({
8846
- method: "GET",
8847
- path: `${this.base()}/orderCycles`,
8848
- auth: auth2,
8849
- ...Object.keys(query).length ? { query } : {}
8850
- });
8851
- }
8852
- /** Add an assignee to an order. Returns an acknowledgement. */
8853
- async addAssignee(orderId, assignee, auth2 = SERVICE34) {
8854
- return this.ctx.http.request({ method: "POST", path: `${this.orderPath(orderId)}/assignees`, auth: auth2, body: assignee });
8855
- }
8856
- /** Remove an assignee from an order. */
8857
- async removeAssignee(orderId, assigneeId, auth2 = SERVICE34) {
8858
- await this.ctx.http.request({
8859
- method: "DELETE",
8860
- path: `${this.orderPath(orderId)}/assignees/${encodeURIComponent(assigneeId)}`,
8861
- auth: auth2
8862
- });
8863
- }
8864
- /** Update packaging products for an order (`PUT`). Returns an acknowledgement. */
8865
- async updatePackaging(orderId, change, auth2 = SERVICE34) {
8866
- return this.ctx.http.request({ method: "PUT", path: `${this.orderPath(orderId)}/packaging`, auth: auth2, body: change });
8867
- }
8868
- /** Create a packing event. Returns an acknowledgement. */
8869
- async createEvent(event, auth2 = SERVICE34) {
8870
- return this.ctx.http.request({ method: "POST", path: `${this.base()}/events`, auth: auth2, body: event });
8871
- }
8872
- /** List packing events. */
8873
- async listEvents(query = {}, auth2 = SERVICE34) {
8874
- return this.ctx.http.request({
8875
- method: "GET",
8876
- path: `${this.base()}/events`,
8877
- auth: auth2,
8878
- ...Object.keys(query).length ? { query } : {}
8879
- });
8880
- }
8881
- /** Trigger an order recalculation. Returns the created job's id. */
8882
- async triggerRecalculation(input, auth2 = SERVICE34) {
8883
- return this.ctx.http.request({
8884
- method: "POST",
8885
- path: `${this.base()}/jobs/recalculations`,
8886
- auth: auth2,
8887
- body: input
8888
- });
8889
- }
8890
- /** Retrieve a recalculation job by id. */
8891
- async getRecalculationJob(jobId, auth2 = SERVICE34) {
8892
- return this.ctx.http.request({
8893
- method: "GET",
8894
- path: `${this.base()}/jobs/recalculations/${encodeURIComponent(jobId)}`,
8895
- auth: auth2
8896
- });
8897
- }
8898
- };
8899
-
8900
8965
  // src/services/customer-admin.ts
8901
- var SERVICE35 = { kind: "service" };
8966
+ var SERVICE34 = { kind: "service" };
8902
8967
  var CustomerAdminService = class {
8903
8968
  constructor(ctx) {
8904
8969
  this.ctx = ctx;
@@ -8919,7 +8984,7 @@ var CustomerAdminService = class {
8919
8984
  }
8920
8985
  // --- Customers ---
8921
8986
  /** List customers. */
8922
- async listCustomers(query = {}, auth2 = SERVICE35) {
8987
+ async listCustomers(query = {}, auth2 = SERVICE34) {
8923
8988
  return this.ctx.http.request({
8924
8989
  method: "GET",
8925
8990
  path: this.base(),
@@ -8928,33 +8993,33 @@ var CustomerAdminService = class {
8928
8993
  });
8929
8994
  }
8930
8995
  /** Search customers (`POST /customers/search`). A built filter in `q` is resolved to a string. */
8931
- async searchCustomers(query, auth2 = SERVICE35) {
8996
+ async searchCustomers(query, auth2 = SERVICE34) {
8932
8997
  const body = query.q !== void 0 ? { ...query, q: resolveQuery(query.q, { compoundLogicalQuery: false }) } : query;
8933
8998
  return this.ctx.http.request({ method: "POST", path: `${this.base()}/search`, auth: auth2, body });
8934
8999
  }
8935
9000
  /** Retrieve a customer profile by number. */
8936
- async getCustomer(customerNumber, auth2 = SERVICE35) {
9001
+ async getCustomer(customerNumber, auth2 = SERVICE34) {
8937
9002
  return this.ctx.http.request({ method: "GET", path: this.customerPath(customerNumber), auth: auth2 });
8938
9003
  }
8939
9004
  /** Create a customer. */
8940
- async createCustomer(input, auth2 = SERVICE35) {
9005
+ async createCustomer(input, auth2 = SERVICE34) {
8941
9006
  return this.ctx.http.request({ method: "POST", path: this.base(), auth: auth2, body: input });
8942
9007
  }
8943
9008
  /** Upsert a customer profile by number (`PUT`). */
8944
- async upsertCustomer(customerNumber, input, auth2 = SERVICE35) {
9009
+ async upsertCustomer(customerNumber, input, auth2 = SERVICE34) {
8945
9010
  return this.ctx.http.request({ method: "PUT", path: this.customerPath(customerNumber), auth: auth2, body: input });
8946
9011
  }
8947
9012
  /** Partially update a customer profile (`PATCH`). */
8948
- async patchCustomer(customerNumber, patch, auth2 = SERVICE35) {
9013
+ async patchCustomer(customerNumber, patch, auth2 = SERVICE34) {
8949
9014
  await this.ctx.http.request({ method: "PATCH", path: this.customerPath(customerNumber), auth: auth2, body: patch });
8950
9015
  }
8951
9016
  /** Delete a customer profile. */
8952
- async deleteCustomer(customerNumber, auth2 = SERVICE35) {
9017
+ async deleteCustomer(customerNumber, auth2 = SERVICE34) {
8953
9018
  await this.ctx.http.request({ method: "DELETE", path: this.customerPath(customerNumber), auth: auth2 });
8954
9019
  }
8955
9020
  // --- Addresses ---
8956
9021
  /** List a customer's addresses. */
8957
- async listAddresses(customerNumber, auth2 = SERVICE35) {
9022
+ async listAddresses(customerNumber, auth2 = SERVICE34) {
8958
9023
  return this.ctx.http.request({
8959
9024
  method: "GET",
8960
9025
  path: `${this.customerPath(customerNumber)}/addresses`,
@@ -8962,11 +9027,11 @@ var CustomerAdminService = class {
8962
9027
  });
8963
9028
  }
8964
9029
  /** Retrieve one address. */
8965
- async getAddress(customerNumber, addressId, auth2 = SERVICE35) {
9030
+ async getAddress(customerNumber, addressId, auth2 = SERVICE34) {
8966
9031
  return this.ctx.http.request({ method: "GET", path: this.addressPath(customerNumber, addressId), auth: auth2 });
8967
9032
  }
8968
9033
  /** Add an address. */
8969
- async addAddress(customerNumber, input, auth2 = SERVICE35) {
9034
+ async addAddress(customerNumber, input, auth2 = SERVICE34) {
8970
9035
  return this.ctx.http.request({
8971
9036
  method: "POST",
8972
9037
  path: `${this.customerPath(customerNumber)}/addresses`,
@@ -8975,19 +9040,19 @@ var CustomerAdminService = class {
8975
9040
  });
8976
9041
  }
8977
9042
  /** Upsert an address by id (`PUT`). */
8978
- async upsertAddress(customerNumber, addressId, input, auth2 = SERVICE35) {
9043
+ async upsertAddress(customerNumber, addressId, input, auth2 = SERVICE34) {
8979
9044
  return this.ctx.http.request({ method: "PUT", path: this.addressPath(customerNumber, addressId), auth: auth2, body: input });
8980
9045
  }
8981
9046
  /** Partially update an address by id (`PATCH`). */
8982
- async patchAddress(customerNumber, addressId, patch, auth2 = SERVICE35) {
9047
+ async patchAddress(customerNumber, addressId, patch, auth2 = SERVICE34) {
8983
9048
  await this.ctx.http.request({ method: "PATCH", path: this.addressPath(customerNumber, addressId), auth: auth2, body: patch });
8984
9049
  }
8985
9050
  /** Delete an address by id. */
8986
- async deleteAddress(customerNumber, addressId, auth2 = SERVICE35) {
9051
+ async deleteAddress(customerNumber, addressId, auth2 = SERVICE34) {
8987
9052
  await this.ctx.http.request({ method: "DELETE", path: this.addressPath(customerNumber, addressId), auth: auth2 });
8988
9053
  }
8989
9054
  /** Add tags to an address (`?tags=` query). */
8990
- async addAddressTags(customerNumber, addressId, tags, auth2 = SERVICE35) {
9055
+ async addAddressTags(customerNumber, addressId, tags, auth2 = SERVICE34) {
8991
9056
  await this.ctx.http.request({
8992
9057
  method: "POST",
8993
9058
  path: `${this.addressPath(customerNumber, addressId)}/tags`,
@@ -8996,7 +9061,7 @@ var CustomerAdminService = class {
8996
9061
  });
8997
9062
  }
8998
9063
  /** Remove tags from an address (`?tags=` query). */
8999
- async removeAddressTags(customerNumber, addressId, tags, auth2 = SERVICE35) {
9064
+ async removeAddressTags(customerNumber, addressId, tags, auth2 = SERVICE34) {
9000
9065
  await this.ctx.http.request({
9001
9066
  method: "DELETE",
9002
9067
  path: `${this.addressPath(customerNumber, addressId)}/tags`,
@@ -9010,7 +9075,7 @@ var CustomerAdminService = class {
9010
9075
  * `customer.import_read` scope. An unconfigured tenant answers with an empty
9011
9076
  * object rather than a 404.
9012
9077
  */
9013
- async getPasswordMigrationRetention(auth2 = SERVICE35) {
9078
+ async getPasswordMigrationRetention(auth2 = SERVICE34) {
9014
9079
  return this.ctx.http.request({
9015
9080
  method: "GET",
9016
9081
  path: this.configPath(),
@@ -9023,7 +9088,7 @@ var CustomerAdminService = class {
9023
9088
  * `legacyAuth`** — that import is rejected without an active config. Re-POST with
9024
9089
  * an earlier `retentionEndDate` to shorten a running window.
9025
9090
  */
9026
- async configurePasswordMigrationRetention(input, auth2 = SERVICE35) {
9091
+ async configurePasswordMigrationRetention(input, auth2 = SERVICE34) {
9027
9092
  return this.ctx.http.request({
9028
9093
  method: "POST",
9029
9094
  path: this.configPath(),
@@ -9036,7 +9101,7 @@ var CustomerAdminService = class {
9036
9101
  * Intended for after the migration window: when the window ends, unmigrated
9037
9102
  * accounts need a password reset and their legacy credentials are cleared.
9038
9103
  */
9039
- async deletePasswordMigrationRetention(auth2 = SERVICE35) {
9104
+ async deletePasswordMigrationRetention(auth2 = SERVICE34) {
9040
9105
  await this.ctx.http.request({ method: "DELETE", path: this.configPath(), auth: auth2 });
9041
9106
  }
9042
9107
  // --- Bulk import ---
@@ -9049,7 +9114,7 @@ var CustomerAdminService = class {
9049
9114
  * `account.legacyAuth`, and importing `legacyAuth` requires an active retention
9050
9115
  * config (see `configurePasswordMigrationRetention`).
9051
9116
  */
9052
- async importCustomers(input, auth2 = SERVICE35) {
9117
+ async importCustomers(input, auth2 = SERVICE34) {
9053
9118
  return this.ctx.http.request({
9054
9119
  method: "POST",
9055
9120
  path: `${this.base()}/import`,
@@ -9060,7 +9125,7 @@ var CustomerAdminService = class {
9060
9125
  };
9061
9126
 
9062
9127
  // src/services/approval.ts
9063
- var SERVICE36 = { kind: "service" };
9128
+ var SERVICE35 = { kind: "service" };
9064
9129
  var ApprovalService = class {
9065
9130
  constructor(ctx) {
9066
9131
  this.ctx = ctx;
@@ -9071,7 +9136,7 @@ var ApprovalService = class {
9071
9136
  return `/approval/${this.ctx.tenant}`;
9072
9137
  }
9073
9138
  /** List approvals (paged via `pageNumber`/`pageSize`/`sort`/`q`). Returns an array. */
9074
- async listApprovals(query = {}, auth2 = SERVICE36) {
9139
+ async listApprovals(query = {}, auth2 = SERVICE35) {
9075
9140
  return this.ctx.http.request({
9076
9141
  method: "GET",
9077
9142
  path: `${this.base()}/approvals`,
@@ -9080,7 +9145,7 @@ var ApprovalService = class {
9080
9145
  });
9081
9146
  }
9082
9147
  /** Retrieve a single approval by id. */
9083
- async getApproval(approvalId, auth2 = SERVICE36) {
9148
+ async getApproval(approvalId, auth2 = SERVICE35) {
9084
9149
  return this.ctx.http.request({
9085
9150
  method: "GET",
9086
9151
  path: `${this.base()}/approvals/${encodeURIComponent(approvalId)}`,
@@ -9088,7 +9153,7 @@ var ApprovalService = class {
9088
9153
  });
9089
9154
  }
9090
9155
  /** Create an approval request (cart or quote). Returns the created `{ id }`. */
9091
- async createApproval(input, auth2 = SERVICE36) {
9156
+ async createApproval(input, auth2 = SERVICE35) {
9092
9157
  return this.ctx.http.request({
9093
9158
  method: "POST",
9094
9159
  path: `${this.base()}/approvals`,
@@ -9097,7 +9162,7 @@ var ApprovalService = class {
9097
9162
  });
9098
9163
  }
9099
9164
  /** Approve/reject/amend an approval via a JSON-Patch op-array (`PATCH`). */
9100
- async updateApproval(approvalId, ops, auth2 = SERVICE36) {
9165
+ async updateApproval(approvalId, ops, auth2 = SERVICE35) {
9101
9166
  await this.ctx.http.request({
9102
9167
  method: "PATCH",
9103
9168
  path: `${this.base()}/approvals/${encodeURIComponent(approvalId)}`,
@@ -9106,7 +9171,7 @@ var ApprovalService = class {
9106
9171
  });
9107
9172
  }
9108
9173
  /** Delete an approval by id. */
9109
- async deleteApproval(approvalId, auth2 = SERVICE36) {
9174
+ async deleteApproval(approvalId, auth2 = SERVICE35) {
9110
9175
  await this.ctx.http.request({
9111
9176
  method: "DELETE",
9112
9177
  path: `${this.base()}/approvals/${encodeURIComponent(approvalId)}`,
@@ -9114,7 +9179,7 @@ var ApprovalService = class {
9114
9179
  });
9115
9180
  }
9116
9181
  /** Check whether an operation on a resource is permitted / needs approval. */
9117
- async checkPermitted(input, auth2 = SERVICE36) {
9182
+ async checkPermitted(input, auth2 = SERVICE35) {
9118
9183
  return this.ctx.http.request({
9119
9184
  method: "POST",
9120
9185
  path: `${this.base()}/approval/permitted`,
@@ -9123,7 +9188,7 @@ var ApprovalService = class {
9123
9188
  });
9124
9189
  }
9125
9190
  /** Search for users eligible to approve a resource. Returns an array. */
9126
- async searchApprovers(input, auth2 = SERVICE36) {
9191
+ async searchApprovers(input, auth2 = SERVICE35) {
9127
9192
  return this.ctx.http.request({
9128
9193
  method: "POST",
9129
9194
  path: `${this.base()}/search/users`,
@@ -9190,7 +9255,6 @@ var EmporixClient = class {
9190
9255
  units;
9191
9256
  catalogs;
9192
9257
  vendors;
9193
- pickPack;
9194
9258
  customerAdmin;
9195
9259
  approvals;
9196
9260
  /** The validated tenant this client is bound to. */
@@ -9265,7 +9329,6 @@ var EmporixClient = class {
9265
9329
  this.units = new UnitHandlingService(mk(UnitHandlingService.channel));
9266
9330
  this.catalogs = new CatalogService(mk(CatalogService.channel));
9267
9331
  this.vendors = new VendorService(mk(VendorService.channel));
9268
- this.pickPack = new PickPackService(mk(PickPackService.channel));
9269
9332
  this.customerAdmin = new CustomerAdminService(mk(CustomerAdminService.channel));
9270
9333
  this.approvals = new ApprovalService(mk(ApprovalService.channel));
9271
9334
  }
@@ -9380,7 +9443,6 @@ exports.LocationsService = LocationsService;
9380
9443
  exports.MediaService = MediaService;
9381
9444
  exports.OrdersService = OrdersService;
9382
9445
  exports.PaymentGatewayService = PaymentGatewayService;
9383
- exports.PickPackService = PickPackService;
9384
9446
  exports.PriceService = PriceService;
9385
9447
  exports.ProductService = ProductService;
9386
9448
  exports.QuoteService = QuoteService;