@viu/emporix-sdk 4.4.0 → 4.6.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 +16 -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-C-A10NL3.d.cts → context-BJeomwxV.d.cts} +1 -1
  16. package/dist/{context-C-A10NL3.d.ts → context-BJeomwxV.d.ts} +1 -1
  17. package/dist/{customer-groups-C6jPLdvd.d.cts → customer-groups-ByNcTPoL.d.cts} +1 -1
  18. package/dist/{customer-groups-E1fY1FR2.d.ts → customer-groups-D7a8BvT2.d.ts} +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 +303 -86
  24. package/dist/index.cjs.map +1 -1
  25. package/dist/index.d.cts +579 -4
  26. package/dist/index.d.ts +579 -4
  27. package/dist/index.js +303 -87
  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.js CHANGED
@@ -948,7 +948,7 @@ var HttpClient = class {
948
948
  };
949
949
 
950
950
  // package.json
951
- var version = "4.4.0";
951
+ var version = "4.6.0";
952
952
 
953
953
  // src/version.ts
954
954
  var SDK_VERSION = version;
@@ -4324,8 +4324,222 @@ var IndexingService = class {
4324
4324
  }
4325
4325
  };
4326
4326
 
4327
- // src/services/imports.ts
4327
+ // src/services/search.ts
4328
4328
  var SERVICE22 = { kind: "service" };
4329
+ function pageQuery(opts) {
4330
+ const pageNumber = opts.pageNumber ?? 1;
4331
+ const pageSize = opts.pageSize ?? 60;
4332
+ const query = { pageNumber, pageSize };
4333
+ if (opts.sort !== void 0) query.sort = opts.sort;
4334
+ if (opts.q !== void 0) query.q = opts.q;
4335
+ if (opts.fields !== void 0) query.fields = opts.fields;
4336
+ const page = {
4337
+ pageNumber,
4338
+ pageSize,
4339
+ ...opts.totalCount === void 0 ? {} : { totalCount: opts.totalCount }
4340
+ };
4341
+ return { query, page };
4342
+ }
4343
+ var SearchService = class {
4344
+ constructor(ctx) {
4345
+ this.ctx = ctx;
4346
+ }
4347
+ ctx;
4348
+ static channel = "search";
4349
+ base() {
4350
+ return `/search/${this.ctx.tenant}`;
4351
+ }
4352
+ /**
4353
+ * Search the documents of one custom schema type. Paging, `sort` and
4354
+ * `fields` travel as query parameters, not in the body.
4355
+ *
4356
+ * Filter and sort fields must be indexed on the index the search uses, or the
4357
+ * call answers `400`. A saved-search call (`{ searchQueryId, query }`) answers
4358
+ * `404` when no saved search has that id for `type`, and `502` means the
4359
+ * Schema Service could not confirm that `type` is a custom entity.
4360
+ *
4361
+ * @example
4362
+ * const hits = await client.search.search("vehicle", {
4363
+ * index: "vehicles",
4364
+ * queries: [{ type: "TEXT", query: "diesel", field: "name.en" }],
4365
+ * filters: { field: "status", operator: "EQ", value: "ACTIVE" },
4366
+ * });
4367
+ */
4368
+ async search(type, input, opts = {}, auth2 = SERVICE22) {
4369
+ const { query, page } = pageQuery(opts);
4370
+ return requestPage(
4371
+ this.ctx.http,
4372
+ {
4373
+ method: "POST",
4374
+ path: `${this.base()}/search/${encodeURIComponent(type)}`,
4375
+ auth: auth2,
4376
+ query,
4377
+ body: input,
4378
+ idempotent: true
4379
+ // pure read over POST — safe to replay on 5xx/429
4380
+ },
4381
+ page
4382
+ );
4383
+ }
4384
+ /** List saved searches of one custom schema type (`opts.type`), or of every type. */
4385
+ async listSavedSearches(opts = {}, auth2 = SERVICE22) {
4386
+ const { query, page } = pageQuery(opts);
4387
+ const t = opts.type;
4388
+ return requestPage(
4389
+ this.ctx.http,
4390
+ {
4391
+ method: "GET",
4392
+ path: t === void 0 ? `${this.base()}/search/queries` : `${this.base()}/search/${encodeURIComponent(t)}/queries`,
4393
+ auth: auth2,
4394
+ query
4395
+ },
4396
+ page
4397
+ );
4398
+ }
4399
+ /** Fetch one saved search. */
4400
+ async getSavedSearch(type, id, opts = {}, auth2 = SERVICE22) {
4401
+ return this.ctx.http.request({
4402
+ method: "GET",
4403
+ path: `${this.base()}/search/${encodeURIComponent(type)}/queries/${encodeURIComponent(id)}`,
4404
+ auth: auth2,
4405
+ ...opts.fields === void 0 ? {} : { query: { fields: opts.fields } }
4406
+ });
4407
+ }
4408
+ /**
4409
+ * Create or replace a saved search. Resolves to `{ id }` when it was created
4410
+ * (`201`) and to `undefined` when it replaced an existing one (`204`).
4411
+ *
4412
+ * A replace needs the stored `metadata.version` — `400` without it, `409`
4413
+ * when it is stale. `index` must already exist for `type` (`404`
4414
+ * otherwise). Saving does not start an index build.
4415
+ */
4416
+ async upsertSavedSearch(type, id, input, auth2 = SERVICE22) {
4417
+ return this.ctx.http.request({
4418
+ method: "PUT",
4419
+ path: `${this.base()}/search/${encodeURIComponent(type)}/queries/${encodeURIComponent(id)}`,
4420
+ auth: auth2,
4421
+ body: input
4422
+ });
4423
+ }
4424
+ /** Delete a saved search. Does not start an index build. */
4425
+ async deleteSavedSearch(type, id, auth2 = SERVICE22) {
4426
+ await this.ctx.http.request({
4427
+ method: "DELETE",
4428
+ path: `${this.base()}/search/${encodeURIComponent(type)}/queries/${encodeURIComponent(id)}`,
4429
+ auth: auth2
4430
+ });
4431
+ }
4432
+ /** List search indexes of one custom schema type (`opts.type`), or of every type. */
4433
+ async listIndexes(opts = {}, auth2 = SERVICE22) {
4434
+ const { query, page } = pageQuery(opts);
4435
+ const t = opts.type;
4436
+ return requestPage(
4437
+ this.ctx.http,
4438
+ {
4439
+ method: "GET",
4440
+ path: t === void 0 ? `${this.base()}/search/indexes` : `${this.base()}/search/${encodeURIComponent(t)}/indexes`,
4441
+ auth: auth2,
4442
+ query
4443
+ },
4444
+ page
4445
+ );
4446
+ }
4447
+ /** Fetch one search index. */
4448
+ async getIndex(type, id, opts = {}, auth2 = SERVICE22) {
4449
+ return this.ctx.http.request({
4450
+ method: "GET",
4451
+ path: `${this.base()}/search/${encodeURIComponent(type)}/indexes/${encodeURIComponent(id)}`,
4452
+ auth: auth2,
4453
+ ...opts.fields === void 0 ? {} : { query: { fields: opts.fields } }
4454
+ });
4455
+ }
4456
+ /**
4457
+ * Create or update a search index. Resolves to the id of the job that builds
4458
+ * it (`202`) — for a new index, a changed field list, or an index whose
4459
+ * status is `building` or `failed` — and to `undefined` (`204`) when the
4460
+ * index is `ready` and its fields are unchanged; `name` and `description`
4461
+ * still change then. Track the job with {@link getJob}.
4462
+ *
4463
+ * `metadata.version` is optional on an update too. When sent, it is an
4464
+ * optimistic lock: a stale one answers `409`, as does a job that is already
4465
+ * running for this index.
4466
+ */
4467
+ async upsertIndex(type, id, input, auth2 = SERVICE22) {
4468
+ return this.ctx.http.request({
4469
+ method: "PUT",
4470
+ path: `${this.base()}/search/${encodeURIComponent(type)}/indexes/${encodeURIComponent(id)}`,
4471
+ auth: auth2,
4472
+ body: input
4473
+ });
4474
+ }
4475
+ /**
4476
+ * Start deleting a search index. Resolves to the id of the job that removes
4477
+ * it (`202`); `409` means a job for this index is already running.
4478
+ */
4479
+ async deleteIndex(type, id, auth2 = SERVICE22) {
4480
+ return this.ctx.http.request({
4481
+ method: "DELETE",
4482
+ path: `${this.base()}/search/${encodeURIComponent(type)}/indexes/${encodeURIComponent(id)}`,
4483
+ auth: auth2
4484
+ });
4485
+ }
4486
+ /**
4487
+ * Export the configuration of the selected indexes as one package, to be
4488
+ * imported on another tenant with {@link importIndexes}. The decoded `data`
4489
+ * holds `id`, `type`, `fields` and the optional `name` and `description` of
4490
+ * each index, not its `status` or `metadata`. `404` when a selected index does
4491
+ * not exist, `400` for an empty selection.
4492
+ */
4493
+ async exportIndexes(selections, auth2 = SERVICE22) {
4494
+ return this.ctx.http.request({
4495
+ method: "POST",
4496
+ path: `${this.base()}/search/indexes/export`,
4497
+ auth: auth2,
4498
+ body: selections,
4499
+ idempotent: true
4500
+ // pure read over POST — safe to replay on 5xx/429
4501
+ });
4502
+ }
4503
+ /**
4504
+ * Create or update every index in a package from {@link exportIndexes}, with
4505
+ * the same checks as {@link upsertIndex}. Resolves to one result per index,
4506
+ * in package order; `jobId` and `jobType` are absent for a ready index whose
4507
+ * fields did not change.
4508
+ *
4509
+ * Not atomic: when an index fails, the ones before it stay created or updated
4510
+ * and the call throws that index's error — `400` for an unreadable package or
4511
+ * an invalid field, `409` for a running job or a stale `metadata.version`.
4512
+ */
4513
+ async importIndexes(pkg, auth2 = SERVICE22) {
4514
+ return this.ctx.http.request({
4515
+ method: "POST",
4516
+ path: `${this.base()}/search/indexes/import`,
4517
+ auth: auth2,
4518
+ body: pkg
4519
+ });
4520
+ }
4521
+ /** List index jobs of the tenant. */
4522
+ async listJobs(opts = {}, auth2 = SERVICE22) {
4523
+ const { query, page } = pageQuery(opts);
4524
+ return requestPage(
4525
+ this.ctx.http,
4526
+ { method: "GET", path: `${this.base()}/jobs`, auth: auth2, query },
4527
+ page
4528
+ );
4529
+ }
4530
+ /** Fetch one index job. */
4531
+ async getJob(id, opts = {}, auth2 = SERVICE22) {
4532
+ return this.ctx.http.request({
4533
+ method: "GET",
4534
+ path: `${this.base()}/jobs/${encodeURIComponent(id)}`,
4535
+ auth: auth2,
4536
+ ...opts.fields === void 0 ? {} : { query: { fields: opts.fields } }
4537
+ });
4538
+ }
4539
+ };
4540
+
4541
+ // src/services/imports.ts
4542
+ var SERVICE23 = { kind: "service" };
4329
4543
  var DEFAULT_PAGE_SIZE = 50;
4330
4544
  function pageArgs(opts) {
4331
4545
  return { pageNumber: opts.pageNumber ?? 1, pageSize: opts.pageSize ?? DEFAULT_PAGE_SIZE };
@@ -4375,7 +4589,7 @@ var ImportService = class {
4375
4589
  return `/importtool/${this.ctx.tenant}`;
4376
4590
  }
4377
4591
  /** List every import configuration of the tenant. */
4378
- async listConfigs(auth2 = SERVICE22) {
4592
+ async listConfigs(auth2 = SERVICE23) {
4379
4593
  return this.ctx.http.request({
4380
4594
  method: "GET",
4381
4595
  path: `${this.base()}/configs`,
@@ -4383,7 +4597,7 @@ var ImportService = class {
4383
4597
  });
4384
4598
  }
4385
4599
  /** Fetch one configuration by id. */
4386
- async getConfig(id, auth2 = SERVICE22) {
4600
+ async getConfig(id, auth2 = SERVICE23) {
4387
4601
  return this.ctx.http.request({
4388
4602
  method: "GET",
4389
4603
  path: `${this.base()}/configs/${encodeURIComponent(id)}`,
@@ -4391,7 +4605,7 @@ var ImportService = class {
4391
4605
  });
4392
4606
  }
4393
4607
  /** List the streams of one configuration. */
4394
- async listStreams(configId, auth2 = SERVICE22) {
4608
+ async listStreams(configId, auth2 = SERVICE23) {
4395
4609
  return this.ctx.http.request({
4396
4610
  method: "GET",
4397
4611
  path: `${this.base()}/configs/${encodeURIComponent(configId)}/streams`,
@@ -4399,7 +4613,7 @@ var ImportService = class {
4399
4613
  });
4400
4614
  }
4401
4615
  /** Fetch one stream by id. */
4402
- async getStream(id, auth2 = SERVICE22) {
4616
+ async getStream(id, auth2 = SERVICE23) {
4403
4617
  return this.ctx.http.request({
4404
4618
  method: "GET",
4405
4619
  path: `${this.base()}/streams/${encodeURIComponent(id)}`,
@@ -4416,7 +4630,7 @@ var ImportService = class {
4416
4630
  * takes stream **ids** — map through {@link listStreams} before passing a
4417
4631
  * subset back.
4418
4632
  */
4419
- async getStreamOrder(configId, auth2 = SERVICE22) {
4633
+ async getStreamOrder(configId, auth2 = SERVICE23) {
4420
4634
  return this.ctx.http.request({
4421
4635
  method: "GET",
4422
4636
  path: `${this.base()}/configs/${encodeURIComponent(configId)}/stream-order`,
@@ -4428,7 +4642,7 @@ var ImportService = class {
4428
4642
  * configured — the service answers `204`, not `404`, so an absent schedule is
4429
4643
  * a normal result rather than an error.
4430
4644
  */
4431
- async getSchedule(configId, auth2 = SERVICE22) {
4645
+ async getSchedule(configId, auth2 = SERVICE23) {
4432
4646
  const res = await this.ctx.http.request({
4433
4647
  method: "GET",
4434
4648
  path: `${this.base()}/configs/${encodeURIComponent(configId)}/schedule`,
@@ -4449,7 +4663,7 @@ var ImportService = class {
4449
4663
  * schedule. Use {@link deleteSchedule} to clear a schedule that outlived its
4450
4664
  * configuration.
4451
4665
  */
4452
- async setSchedule(configId, input, auth2 = SERVICE22) {
4666
+ async setSchedule(configId, input, auth2 = SERVICE23) {
4453
4667
  return this.ctx.http.request({
4454
4668
  method: "PUT",
4455
4669
  path: `${this.base()}/configs/${encodeURIComponent(configId)}/schedule`,
@@ -4469,7 +4683,7 @@ var ImportService = class {
4469
4683
  * The service answers `204`, so this resolves to `void` rather than to the
4470
4684
  * removed schedule.
4471
4685
  */
4472
- async deleteSchedule(configId, auth2 = SERVICE22) {
4686
+ async deleteSchedule(configId, auth2 = SERVICE23) {
4473
4687
  await this.ctx.http.request({
4474
4688
  method: "DELETE",
4475
4689
  path: `${this.base()}/configs/${encodeURIComponent(configId)}/schedule`,
@@ -4518,7 +4732,7 @@ var ImportService = class {
4518
4732
  * }
4519
4733
  * ```
4520
4734
  */
4521
- async triggerRun(configId, input = {}, auth2 = SERVICE22) {
4735
+ async triggerRun(configId, input = {}, auth2 = SERVICE23) {
4522
4736
  return this.ctx.http.request({
4523
4737
  method: "POST",
4524
4738
  path: `${this.base()}/configs/${encodeURIComponent(configId)}/runs`,
@@ -4527,7 +4741,7 @@ var ImportService = class {
4527
4741
  });
4528
4742
  }
4529
4743
  /** List a configuration's runs, newest first. */
4530
- async listRuns(configId, opts = {}, auth2 = SERVICE22) {
4744
+ async listRuns(configId, opts = {}, auth2 = SERVICE23) {
4531
4745
  const args = pageArgs(opts);
4532
4746
  const wire = await this.ctx.http.request({
4533
4747
  method: "GET",
@@ -4538,7 +4752,7 @@ var ImportService = class {
4538
4752
  return toPage(wire, args);
4539
4753
  }
4540
4754
  /** Fetch one run with its per-stream progress. */
4541
- async getRun(runId, auth2 = SERVICE22) {
4755
+ async getRun(runId, auth2 = SERVICE23) {
4542
4756
  return this.ctx.http.request({
4543
4757
  method: "GET",
4544
4758
  path: `${this.base()}/runs/${encodeURIComponent(runId)}`,
@@ -4558,7 +4772,7 @@ var ImportService = class {
4558
4772
  * arrive as `{ type: "unknown" }` rather than throwing — see
4559
4773
  * {@link ImportRunEvent}.
4560
4774
  */
4561
- async *streamRun(runId, auth2 = SERVICE22) {
4775
+ async *streamRun(runId, auth2 = SERVICE23) {
4562
4776
  const frames = this.ctx.http.requestStream({
4563
4777
  method: "GET",
4564
4778
  path: `${this.base()}/runs/${encodeURIComponent(runId)}/events`,
@@ -4573,7 +4787,7 @@ var ImportService = class {
4573
4787
  * a result, not an error. A state conflict may instead come back as a `409`,
4574
4788
  * which does throw.
4575
4789
  */
4576
- async cancelRun(runId, opts = {}, auth2 = SERVICE22) {
4790
+ async cancelRun(runId, opts = {}, auth2 = SERVICE23) {
4577
4791
  const query = {};
4578
4792
  if (opts.force) query.force = "true";
4579
4793
  return this.ctx.http.request({
@@ -4584,7 +4798,7 @@ var ImportService = class {
4584
4798
  });
4585
4799
  }
4586
4800
  /** List the errors recorded during a run. */
4587
- async listRunErrors(runId, opts = {}, auth2 = SERVICE22) {
4801
+ async listRunErrors(runId, opts = {}, auth2 = SERVICE23) {
4588
4802
  const args = pageArgs(opts);
4589
4803
  const wire = await this.ctx.http.request({
4590
4804
  method: "GET",
@@ -4605,7 +4819,7 @@ var ImportService = class {
4605
4819
  * `rows.length` as the size of the problem. `limit` defaults to 500 here
4606
4820
  * (1–50 000); {@link downloadRunDiagnosticsCsv} defaults to 50 000.
4607
4821
  */
4608
- async listRunDiagnostics(runId, query = {}, auth2 = SERVICE22) {
4822
+ async listRunDiagnostics(runId, query = {}, auth2 = SERVICE23) {
4609
4823
  return this.ctx.http.request({
4610
4824
  method: "GET",
4611
4825
  path: `${this.base()}/runs/${encodeURIComponent(runId)}/diagnostics`,
@@ -4623,7 +4837,7 @@ var ImportService = class {
4623
4837
  * prefixed with an apostrophe so spreadsheet software does not evaluate source
4624
4838
  * data as a formula. Strip it if you parse the file instead of opening it.
4625
4839
  */
4626
- async downloadRunDiagnosticsCsv(runId, query = {}, auth2 = SERVICE22) {
4840
+ async downloadRunDiagnosticsCsv(runId, query = {}, auth2 = SERVICE23) {
4627
4841
  return this.ctx.http.request({
4628
4842
  method: "GET",
4629
4843
  path: `${this.base()}/runs/${encodeURIComponent(runId)}/diagnostics/csv`,
@@ -4632,7 +4846,7 @@ var ImportService = class {
4632
4846
  });
4633
4847
  }
4634
4848
  /** List the target types that hold imported records — the valid `type` values for {@link searchRecords}. */
4635
- async listDataTypes(auth2 = SERVICE22) {
4849
+ async listDataTypes(auth2 = SERVICE23) {
4636
4850
  return this.ctx.http.request({
4637
4851
  method: "GET",
4638
4852
  path: `${this.base()}/data/types`,
@@ -4640,7 +4854,7 @@ var ImportService = class {
4640
4854
  });
4641
4855
  }
4642
4856
  /** Search imported records of one target type. */
4643
- async searchRecords(opts, auth2 = SERVICE22) {
4857
+ async searchRecords(opts, auth2 = SERVICE23) {
4644
4858
  const args = pageArgs(opts);
4645
4859
  const query = {
4646
4860
  type: opts.type,
@@ -4658,7 +4872,7 @@ var ImportService = class {
4658
4872
  return toPage(wire, args);
4659
4873
  }
4660
4874
  /** Search the imported records produced by one stream. */
4661
- async searchStreamRecords(streamId, opts = {}, auth2 = SERVICE22) {
4875
+ async searchStreamRecords(streamId, opts = {}, auth2 = SERVICE23) {
4662
4876
  const args = pageArgs(opts);
4663
4877
  const query = {
4664
4878
  page: args.pageNumber - 1,
@@ -4687,7 +4901,7 @@ var ImportService = class {
4687
4901
  *
4688
4902
  * **Preview upstream**: the contract may change without a major bump.
4689
4903
  */
4690
- async stats(query = {}, auth2 = SERVICE22) {
4904
+ async stats(query = {}, auth2 = SERVICE23) {
4691
4905
  return this.ctx.http.request({
4692
4906
  method: "GET",
4693
4907
  path: `${this.base()}/stats`,
@@ -4705,7 +4919,7 @@ var ImportService = class {
4705
4919
  *
4706
4920
  * **Preview upstream**: the contract may change without a major bump.
4707
4921
  */
4708
- async listJobGroups(auth2 = SERVICE22) {
4922
+ async listJobGroups(auth2 = SERVICE23) {
4709
4923
  return this.ctx.http.request({
4710
4924
  method: "GET",
4711
4925
  path: `${this.base()}/dashboard/job-groups`,
@@ -4721,7 +4935,7 @@ var ImportService = class {
4721
4935
  *
4722
4936
  * **Preview upstream**: the contract may change without a major bump.
4723
4937
  */
4724
- async getHealthThresholds(auth2 = SERVICE22) {
4938
+ async getHealthThresholds(auth2 = SERVICE23) {
4725
4939
  return this.ctx.http.request({
4726
4940
  method: "GET",
4727
4941
  path: `${this.base()}/settings/health-thresholds`,
@@ -4733,7 +4947,7 @@ var ImportService = class {
4733
4947
  *
4734
4948
  * **Preview upstream**: the contract may change without a major bump.
4735
4949
  */
4736
- async getLicense(auth2 = SERVICE22) {
4950
+ async getLicense(auth2 = SERVICE23) {
4737
4951
  return this.ctx.http.request({
4738
4952
  method: "GET",
4739
4953
  path: `${this.base()}/license`,
@@ -4753,7 +4967,7 @@ var ImportService = class {
4753
4967
  *
4754
4968
  * **Preview upstream**: the contract may change without a major bump.
4755
4969
  */
4756
- async retryRun(runId, auth2 = SERVICE22) {
4970
+ async retryRun(runId, auth2 = SERVICE23) {
4757
4971
  return this.ctx.http.request({
4758
4972
  method: "POST",
4759
4973
  path: `${this.base()}/runs/${encodeURIComponent(runId)}/retry`,
@@ -4763,7 +4977,7 @@ var ImportService = class {
4763
4977
  };
4764
4978
 
4765
4979
  // src/services/audit-log.ts
4766
- var SERVICE23 = { kind: "service" };
4980
+ var SERVICE24 = { kind: "service" };
4767
4981
  function toPage2(wire) {
4768
4982
  const pageNumber = wire.page ?? 1;
4769
4983
  const totalPages = wire.totalPages ?? 0;
@@ -4815,7 +5029,7 @@ var AuditLogService = class {
4815
5029
  * });
4816
5030
  * ```
4817
5031
  */
4818
- async list(opts = {}, auth2 = SERVICE23) {
5032
+ async list(opts = {}, auth2 = SERVICE24) {
4819
5033
  const wire = await this.ctx.http.request({
4820
5034
  method: "GET",
4821
5035
  path: `${this.base()}/changelogs`,
@@ -4829,7 +5043,7 @@ var AuditLogService = class {
4829
5043
  };
4830
5044
 
4831
5045
  // src/services/unit-handling.ts
4832
- var SERVICE24 = { kind: "service" };
5046
+ var SERVICE25 = { kind: "service" };
4833
5047
  var UnitHandlingService = class {
4834
5048
  constructor(ctx) {
4835
5049
  this.ctx = ctx;
@@ -4840,7 +5054,7 @@ var UnitHandlingService = class {
4840
5054
  return `/unit-handling/${this.ctx.tenant}`;
4841
5055
  }
4842
5056
  /** Find units (filter/sort/page). */
4843
- async listUnits(query = {}, auth2 = SERVICE24) {
5057
+ async listUnits(query = {}, auth2 = SERVICE25) {
4844
5058
  return this.ctx.http.request({
4845
5059
  method: "GET",
4846
5060
  path: `${this.base()}/units`,
@@ -4849,7 +5063,7 @@ var UnitHandlingService = class {
4849
5063
  });
4850
5064
  }
4851
5065
  /** Retrieve a unit by code. */
4852
- async getUnit(unitCode, auth2 = SERVICE24) {
5066
+ async getUnit(unitCode, auth2 = SERVICE25) {
4853
5067
  return this.ctx.http.request({
4854
5068
  method: "GET",
4855
5069
  path: `${this.base()}/units/${encodeURIComponent(unitCode)}`,
@@ -4857,11 +5071,11 @@ var UnitHandlingService = class {
4857
5071
  });
4858
5072
  }
4859
5073
  /** Add a new unit. */
4860
- async createUnit(input, auth2 = SERVICE24) {
5074
+ async createUnit(input, auth2 = SERVICE25) {
4861
5075
  return this.ctx.http.request({ method: "POST", path: `${this.base()}/units`, auth: auth2, body: input });
4862
5076
  }
4863
5077
  /** Update a unit by code. */
4864
- async updateUnit(unitCode, input, auth2 = SERVICE24) {
5078
+ async updateUnit(unitCode, input, auth2 = SERVICE25) {
4865
5079
  await this.ctx.http.request({
4866
5080
  method: "PUT",
4867
5081
  path: `${this.base()}/units/${encodeURIComponent(unitCode)}`,
@@ -4870,7 +5084,7 @@ var UnitHandlingService = class {
4870
5084
  });
4871
5085
  }
4872
5086
  /** Delete a unit by code. */
4873
- async deleteUnit(unitCode, auth2 = SERVICE24) {
5087
+ async deleteUnit(unitCode, auth2 = SERVICE25) {
4874
5088
  await this.ctx.http.request({
4875
5089
  method: "DELETE",
4876
5090
  path: `${this.base()}/units/${encodeURIComponent(unitCode)}`,
@@ -4878,7 +5092,7 @@ var UnitHandlingService = class {
4878
5092
  });
4879
5093
  }
4880
5094
  /** Delete multiple units by code (bulk). The codes are sent as the request body. */
4881
- async deleteUnits(codes, auth2 = SERVICE24) {
5095
+ async deleteUnits(codes, auth2 = SERVICE25) {
4882
5096
  await this.ctx.http.request({
4883
5097
  method: "DELETE",
4884
5098
  path: `${this.base()}/units`,
@@ -4887,7 +5101,7 @@ var UnitHandlingService = class {
4887
5101
  });
4888
5102
  }
4889
5103
  /** Fetch a conversion factor (`PUT /units/conversion-factor-commands`). */
4890
- async getConversionFactor(input, auth2 = SERVICE24) {
5104
+ async getConversionFactor(input, auth2 = SERVICE25) {
4891
5105
  return this.ctx.http.request({
4892
5106
  method: "PUT",
4893
5107
  path: `${this.base()}/units/conversion-factor-commands`,
@@ -4896,7 +5110,7 @@ var UnitHandlingService = class {
4896
5110
  });
4897
5111
  }
4898
5112
  /** Convert a value between units (`PUT /units/convert-unit-commands`). */
4899
- async convertUnit(input, auth2 = SERVICE24) {
5113
+ async convertUnit(input, auth2 = SERVICE25) {
4900
5114
  return this.ctx.http.request({
4901
5115
  method: "PUT",
4902
5116
  path: `${this.base()}/units/convert-unit-commands`,
@@ -4905,13 +5119,13 @@ var UnitHandlingService = class {
4905
5119
  });
4906
5120
  }
4907
5121
  /** List all unit types. */
4908
- async listUnitTypes(auth2 = SERVICE24) {
5122
+ async listUnitTypes(auth2 = SERVICE25) {
4909
5123
  return this.ctx.http.request({ method: "GET", path: `${this.base()}/types`, auth: auth2 });
4910
5124
  }
4911
5125
  };
4912
5126
 
4913
5127
  // src/services/catalog.ts
4914
- var SERVICE25 = { kind: "service" };
5128
+ var SERVICE26 = { kind: "service" };
4915
5129
  var CatalogService = class {
4916
5130
  constructor(ctx) {
4917
5131
  this.ctx = ctx;
@@ -4922,7 +5136,7 @@ var CatalogService = class {
4922
5136
  return `/catalog/${this.ctx.tenant}/catalogs`;
4923
5137
  }
4924
5138
  /** List catalogs (filtered/sorted). */
4925
- async listCatalogs(query = {}, auth2 = SERVICE25) {
5139
+ async listCatalogs(query = {}, auth2 = SERVICE26) {
4926
5140
  return this.ctx.http.request({
4927
5141
  method: "GET",
4928
5142
  path: this.base(),
@@ -4931,7 +5145,7 @@ var CatalogService = class {
4931
5145
  });
4932
5146
  }
4933
5147
  /** Retrieve a catalog by id. */
4934
- async getCatalog(catalogId, auth2 = SERVICE25) {
5148
+ async getCatalog(catalogId, auth2 = SERVICE26) {
4935
5149
  return this.ctx.http.request({
4936
5150
  method: "GET",
4937
5151
  path: `${this.base()}/${encodeURIComponent(catalogId)}`,
@@ -4939,7 +5153,7 @@ var CatalogService = class {
4939
5153
  });
4940
5154
  }
4941
5155
  /** Retrieve all catalogs that contain a category. */
4942
- async getCatalogsForCategory(categoryId, auth2 = SERVICE25) {
5156
+ async getCatalogsForCategory(categoryId, auth2 = SERVICE26) {
4943
5157
  return this.ctx.http.request({
4944
5158
  method: "GET",
4945
5159
  path: `${this.base()}/categories/${encodeURIComponent(categoryId)}`,
@@ -4947,11 +5161,11 @@ var CatalogService = class {
4947
5161
  });
4948
5162
  }
4949
5163
  /** Create a catalog. */
4950
- async createCatalog(input, auth2 = SERVICE25) {
5164
+ async createCatalog(input, auth2 = SERVICE26) {
4951
5165
  return this.ctx.http.request({ method: "POST", path: this.base(), auth: auth2, body: input });
4952
5166
  }
4953
5167
  /** Upsert a catalog by id (`PUT`). */
4954
- async updateCatalog(catalogId, input, auth2 = SERVICE25) {
5168
+ async updateCatalog(catalogId, input, auth2 = SERVICE26) {
4955
5169
  return this.ctx.http.request({
4956
5170
  method: "PUT",
4957
5171
  path: `${this.base()}/${encodeURIComponent(catalogId)}`,
@@ -4960,7 +5174,7 @@ var CatalogService = class {
4960
5174
  });
4961
5175
  }
4962
5176
  /** Partially update a catalog by id (`PATCH`). */
4963
- async patchCatalog(catalogId, patch, auth2 = SERVICE25) {
5177
+ async patchCatalog(catalogId, patch, auth2 = SERVICE26) {
4964
5178
  await this.ctx.http.request({
4965
5179
  method: "PATCH",
4966
5180
  path: `${this.base()}/${encodeURIComponent(catalogId)}`,
@@ -4969,7 +5183,7 @@ var CatalogService = class {
4969
5183
  });
4970
5184
  }
4971
5185
  /** Remove a catalog by id. */
4972
- async deleteCatalog(catalogId, auth2 = SERVICE25) {
5186
+ async deleteCatalog(catalogId, auth2 = SERVICE26) {
4973
5187
  await this.ctx.http.request({
4974
5188
  method: "DELETE",
4975
5189
  path: `${this.base()}/${encodeURIComponent(catalogId)}`,
@@ -4979,7 +5193,7 @@ var CatalogService = class {
4979
5193
  };
4980
5194
 
4981
5195
  // src/services/vendor.ts
4982
- var SERVICE26 = { kind: "service" };
5196
+ var SERVICE27 = { kind: "service" };
4983
5197
  var VendorService = class {
4984
5198
  constructor(ctx) {
4985
5199
  this.ctx = ctx;
@@ -4991,7 +5205,7 @@ var VendorService = class {
4991
5205
  }
4992
5206
  // --- Vendors ---
4993
5207
  /** List all vendors. */
4994
- async listVendors(query = {}, auth2 = SERVICE26) {
5208
+ async listVendors(query = {}, auth2 = SERVICE27) {
4995
5209
  return this.ctx.http.request({
4996
5210
  method: "GET",
4997
5211
  path: `${this.base()}/vendors`,
@@ -5000,7 +5214,7 @@ var VendorService = class {
5000
5214
  });
5001
5215
  }
5002
5216
  /** Retrieve a vendor by id. */
5003
- async getVendor(vendorId, auth2 = SERVICE26) {
5217
+ async getVendor(vendorId, auth2 = SERVICE27) {
5004
5218
  return this.ctx.http.request({
5005
5219
  method: "GET",
5006
5220
  path: `${this.base()}/vendors/${encodeURIComponent(vendorId)}`,
@@ -5011,7 +5225,7 @@ var VendorService = class {
5011
5225
  * Search vendors (`POST /vendors/search`). A built filter in `q` is resolved to
5012
5226
  * a string; paging, sort and fields go in the query string.
5013
5227
  */
5014
- async searchVendors(query, auth2 = SERVICE26) {
5228
+ async searchVendors(query, auth2 = SERVICE27) {
5015
5229
  const input = query.q !== void 0 ? { ...query, q: resolveQuery(query.q, { compoundLogicalQuery: false }) } : query;
5016
5230
  return this.ctx.http.request({
5017
5231
  method: "POST",
@@ -5021,11 +5235,11 @@ var VendorService = class {
5021
5235
  });
5022
5236
  }
5023
5237
  /** Create a vendor. */
5024
- async createVendor(input, auth2 = SERVICE26) {
5238
+ async createVendor(input, auth2 = SERVICE27) {
5025
5239
  return this.ctx.http.request({ method: "POST", path: `${this.base()}/vendors`, auth: auth2, body: input });
5026
5240
  }
5027
5241
  /** Upsert a vendor by id (`PUT`). */
5028
- async updateVendor(vendorId, input, auth2 = SERVICE26) {
5242
+ async updateVendor(vendorId, input, auth2 = SERVICE27) {
5029
5243
  await this.ctx.http.request({
5030
5244
  method: "PUT",
5031
5245
  path: `${this.base()}/vendors/${encodeURIComponent(vendorId)}`,
@@ -5034,7 +5248,7 @@ var VendorService = class {
5034
5248
  });
5035
5249
  }
5036
5250
  /** Delete a vendor by id. */
5037
- async deleteVendor(vendorId, auth2 = SERVICE26) {
5251
+ async deleteVendor(vendorId, auth2 = SERVICE27) {
5038
5252
  await this.ctx.http.request({
5039
5253
  method: "DELETE",
5040
5254
  path: `${this.base()}/vendors/${encodeURIComponent(vendorId)}`,
@@ -5043,7 +5257,7 @@ var VendorService = class {
5043
5257
  }
5044
5258
  // --- Vendor locations ---
5045
5259
  /** List all vendor locations. */
5046
- async listVendorLocations(query = {}, auth2 = SERVICE26) {
5260
+ async listVendorLocations(query = {}, auth2 = SERVICE27) {
5047
5261
  return this.ctx.http.request({
5048
5262
  method: "GET",
5049
5263
  path: `${this.base()}/locations`,
@@ -5052,7 +5266,7 @@ var VendorService = class {
5052
5266
  });
5053
5267
  }
5054
5268
  /** Retrieve a vendor location by id. */
5055
- async getVendorLocation(locationId, auth2 = SERVICE26) {
5269
+ async getVendorLocation(locationId, auth2 = SERVICE27) {
5056
5270
  return this.ctx.http.request({
5057
5271
  method: "GET",
5058
5272
  path: `${this.base()}/locations/${encodeURIComponent(locationId)}`,
@@ -5060,11 +5274,11 @@ var VendorService = class {
5060
5274
  });
5061
5275
  }
5062
5276
  /** Create a vendor location. */
5063
- async createVendorLocation(input, auth2 = SERVICE26) {
5277
+ async createVendorLocation(input, auth2 = SERVICE27) {
5064
5278
  return this.ctx.http.request({ method: "POST", path: `${this.base()}/locations`, auth: auth2, body: input });
5065
5279
  }
5066
5280
  /** Upsert a vendor location by id (`PUT`). */
5067
- async updateVendorLocation(locationId, input, auth2 = SERVICE26) {
5281
+ async updateVendorLocation(locationId, input, auth2 = SERVICE27) {
5068
5282
  await this.ctx.http.request({
5069
5283
  method: "PUT",
5070
5284
  path: `${this.base()}/locations/${encodeURIComponent(locationId)}`,
@@ -5073,7 +5287,7 @@ var VendorService = class {
5073
5287
  });
5074
5288
  }
5075
5289
  /** Delete a vendor location by id. */
5076
- async deleteVendorLocation(locationId, auth2 = SERVICE26) {
5290
+ async deleteVendorLocation(locationId, auth2 = SERVICE27) {
5077
5291
  await this.ctx.http.request({
5078
5292
  method: "DELETE",
5079
5293
  path: `${this.base()}/locations/${encodeURIComponent(locationId)}`,
@@ -5083,7 +5297,7 @@ var VendorService = class {
5083
5297
  };
5084
5298
 
5085
5299
  // src/services/customer-admin.ts
5086
- var SERVICE27 = { kind: "service" };
5300
+ var SERVICE28 = { kind: "service" };
5087
5301
  var CustomerAdminService = class {
5088
5302
  constructor(ctx) {
5089
5303
  this.ctx = ctx;
@@ -5104,7 +5318,7 @@ var CustomerAdminService = class {
5104
5318
  }
5105
5319
  // --- Customers ---
5106
5320
  /** List customers. */
5107
- async listCustomers(query = {}, auth2 = SERVICE27) {
5321
+ async listCustomers(query = {}, auth2 = SERVICE28) {
5108
5322
  return this.ctx.http.request({
5109
5323
  method: "GET",
5110
5324
  path: this.base(),
@@ -5116,7 +5330,7 @@ var CustomerAdminService = class {
5116
5330
  * Search customers (`POST /customers/search`). A built filter in `q` is resolved
5117
5331
  * to a string; `pageNumber`, `pageSize`, `sort` and `expand` go in the query string.
5118
5332
  */
5119
- async searchCustomers(query, auth2 = SERVICE27) {
5333
+ async searchCustomers(query, auth2 = SERVICE28) {
5120
5334
  const input = query.q !== void 0 ? { ...query, q: resolveQuery(query.q, { compoundLogicalQuery: false }) } : query;
5121
5335
  return this.ctx.http.request({
5122
5336
  method: "POST",
@@ -5126,28 +5340,28 @@ var CustomerAdminService = class {
5126
5340
  });
5127
5341
  }
5128
5342
  /** Retrieve a customer profile by number. */
5129
- async getCustomer(customerNumber, auth2 = SERVICE27) {
5343
+ async getCustomer(customerNumber, auth2 = SERVICE28) {
5130
5344
  return this.ctx.http.request({ method: "GET", path: this.customerPath(customerNumber), auth: auth2 });
5131
5345
  }
5132
5346
  /** Create a customer. */
5133
- async createCustomer(input, auth2 = SERVICE27) {
5347
+ async createCustomer(input, auth2 = SERVICE28) {
5134
5348
  return this.ctx.http.request({ method: "POST", path: this.base(), auth: auth2, body: input });
5135
5349
  }
5136
5350
  /** Upsert a customer profile by number (`PUT`). */
5137
- async upsertCustomer(customerNumber, input, auth2 = SERVICE27) {
5351
+ async upsertCustomer(customerNumber, input, auth2 = SERVICE28) {
5138
5352
  return this.ctx.http.request({ method: "PUT", path: this.customerPath(customerNumber), auth: auth2, body: input });
5139
5353
  }
5140
5354
  /** Partially update a customer profile (`PATCH`). */
5141
- async patchCustomer(customerNumber, patch, auth2 = SERVICE27) {
5355
+ async patchCustomer(customerNumber, patch, auth2 = SERVICE28) {
5142
5356
  await this.ctx.http.request({ method: "PATCH", path: this.customerPath(customerNumber), auth: auth2, body: patch });
5143
5357
  }
5144
5358
  /** Delete a customer profile. */
5145
- async deleteCustomer(customerNumber, auth2 = SERVICE27) {
5359
+ async deleteCustomer(customerNumber, auth2 = SERVICE28) {
5146
5360
  await this.ctx.http.request({ method: "DELETE", path: this.customerPath(customerNumber), auth: auth2 });
5147
5361
  }
5148
5362
  // --- Addresses ---
5149
5363
  /** List a customer's addresses. */
5150
- async listAddresses(customerNumber, auth2 = SERVICE27) {
5364
+ async listAddresses(customerNumber, auth2 = SERVICE28) {
5151
5365
  return this.ctx.http.request({
5152
5366
  method: "GET",
5153
5367
  path: `${this.customerPath(customerNumber)}/addresses`,
@@ -5155,11 +5369,11 @@ var CustomerAdminService = class {
5155
5369
  });
5156
5370
  }
5157
5371
  /** Retrieve one address. */
5158
- async getAddress(customerNumber, addressId, auth2 = SERVICE27) {
5372
+ async getAddress(customerNumber, addressId, auth2 = SERVICE28) {
5159
5373
  return this.ctx.http.request({ method: "GET", path: this.addressPath(customerNumber, addressId), auth: auth2 });
5160
5374
  }
5161
5375
  /** Add an address. */
5162
- async addAddress(customerNumber, input, auth2 = SERVICE27) {
5376
+ async addAddress(customerNumber, input, auth2 = SERVICE28) {
5163
5377
  return this.ctx.http.request({
5164
5378
  method: "POST",
5165
5379
  path: `${this.customerPath(customerNumber)}/addresses`,
@@ -5168,19 +5382,19 @@ var CustomerAdminService = class {
5168
5382
  });
5169
5383
  }
5170
5384
  /** Upsert an address by id (`PUT`). */
5171
- async upsertAddress(customerNumber, addressId, input, auth2 = SERVICE27) {
5385
+ async upsertAddress(customerNumber, addressId, input, auth2 = SERVICE28) {
5172
5386
  return this.ctx.http.request({ method: "PUT", path: this.addressPath(customerNumber, addressId), auth: auth2, body: input });
5173
5387
  }
5174
5388
  /** Partially update an address by id (`PATCH`). */
5175
- async patchAddress(customerNumber, addressId, patch, auth2 = SERVICE27) {
5389
+ async patchAddress(customerNumber, addressId, patch, auth2 = SERVICE28) {
5176
5390
  await this.ctx.http.request({ method: "PATCH", path: this.addressPath(customerNumber, addressId), auth: auth2, body: patch });
5177
5391
  }
5178
5392
  /** Delete an address by id. */
5179
- async deleteAddress(customerNumber, addressId, auth2 = SERVICE27) {
5393
+ async deleteAddress(customerNumber, addressId, auth2 = SERVICE28) {
5180
5394
  await this.ctx.http.request({ method: "DELETE", path: this.addressPath(customerNumber, addressId), auth: auth2 });
5181
5395
  }
5182
5396
  /** Add tags to an address (`?tags=` query). */
5183
- async addAddressTags(customerNumber, addressId, tags, auth2 = SERVICE27) {
5397
+ async addAddressTags(customerNumber, addressId, tags, auth2 = SERVICE28) {
5184
5398
  await this.ctx.http.request({
5185
5399
  method: "POST",
5186
5400
  path: `${this.addressPath(customerNumber, addressId)}/tags`,
@@ -5189,7 +5403,7 @@ var CustomerAdminService = class {
5189
5403
  });
5190
5404
  }
5191
5405
  /** Remove tags from an address (`?tags=` query). */
5192
- async removeAddressTags(customerNumber, addressId, tags, auth2 = SERVICE27) {
5406
+ async removeAddressTags(customerNumber, addressId, tags, auth2 = SERVICE28) {
5193
5407
  await this.ctx.http.request({
5194
5408
  method: "DELETE",
5195
5409
  path: `${this.addressPath(customerNumber, addressId)}/tags`,
@@ -5203,7 +5417,7 @@ var CustomerAdminService = class {
5203
5417
  * `customer.import_read` scope. An unconfigured tenant answers with an empty
5204
5418
  * object rather than a 404.
5205
5419
  */
5206
- async getPasswordMigrationRetention(auth2 = SERVICE27) {
5420
+ async getPasswordMigrationRetention(auth2 = SERVICE28) {
5207
5421
  return this.ctx.http.request({
5208
5422
  method: "GET",
5209
5423
  path: this.configPath(),
@@ -5216,7 +5430,7 @@ var CustomerAdminService = class {
5216
5430
  * `legacyAuth`** — that import is rejected without an active config. Re-POST with
5217
5431
  * an earlier `retentionEndDate` to shorten a running window.
5218
5432
  */
5219
- async configurePasswordMigrationRetention(input, auth2 = SERVICE27) {
5433
+ async configurePasswordMigrationRetention(input, auth2 = SERVICE28) {
5220
5434
  return this.ctx.http.request({
5221
5435
  method: "POST",
5222
5436
  path: this.configPath(),
@@ -5229,7 +5443,7 @@ var CustomerAdminService = class {
5229
5443
  * Intended for after the migration window: when the window ends, unmigrated
5230
5444
  * accounts need a password reset and their legacy credentials are cleared.
5231
5445
  */
5232
- async deletePasswordMigrationRetention(auth2 = SERVICE27) {
5446
+ async deletePasswordMigrationRetention(auth2 = SERVICE28) {
5233
5447
  await this.ctx.http.request({ method: "DELETE", path: this.configPath(), auth: auth2 });
5234
5448
  }
5235
5449
  // --- Bulk import ---
@@ -5242,7 +5456,7 @@ var CustomerAdminService = class {
5242
5456
  * `account.legacyAuth`, and importing `legacyAuth` requires an active retention
5243
5457
  * config (see `configurePasswordMigrationRetention`).
5244
5458
  */
5245
- async importCustomers(input, auth2 = SERVICE27) {
5459
+ async importCustomers(input, auth2 = SERVICE28) {
5246
5460
  return this.ctx.http.request({
5247
5461
  method: "POST",
5248
5462
  path: `${this.base()}/import`,
@@ -5253,7 +5467,7 @@ var CustomerAdminService = class {
5253
5467
  };
5254
5468
 
5255
5469
  // src/services/approval.ts
5256
- var SERVICE28 = { kind: "service" };
5470
+ var SERVICE29 = { kind: "service" };
5257
5471
  var ApprovalService = class {
5258
5472
  constructor(ctx) {
5259
5473
  this.ctx = ctx;
@@ -5264,7 +5478,7 @@ var ApprovalService = class {
5264
5478
  return `/approval/${this.ctx.tenant}`;
5265
5479
  }
5266
5480
  /** List approvals (paged via `pageNumber`/`pageSize`/`sort`/`q`). Returns an array. */
5267
- async listApprovals(query = {}, auth2 = SERVICE28) {
5481
+ async listApprovals(query = {}, auth2 = SERVICE29) {
5268
5482
  return this.ctx.http.request({
5269
5483
  method: "GET",
5270
5484
  path: `${this.base()}/approvals`,
@@ -5273,7 +5487,7 @@ var ApprovalService = class {
5273
5487
  });
5274
5488
  }
5275
5489
  /** Retrieve a single approval by id. */
5276
- async getApproval(approvalId, auth2 = SERVICE28) {
5490
+ async getApproval(approvalId, auth2 = SERVICE29) {
5277
5491
  return this.ctx.http.request({
5278
5492
  method: "GET",
5279
5493
  path: `${this.base()}/approvals/${encodeURIComponent(approvalId)}`,
@@ -5281,7 +5495,7 @@ var ApprovalService = class {
5281
5495
  });
5282
5496
  }
5283
5497
  /** Create an approval request (cart or quote). Returns the created `{ id }`. */
5284
- async createApproval(input, auth2 = SERVICE28) {
5498
+ async createApproval(input, auth2 = SERVICE29) {
5285
5499
  return this.ctx.http.request({
5286
5500
  method: "POST",
5287
5501
  path: `${this.base()}/approvals`,
@@ -5290,7 +5504,7 @@ var ApprovalService = class {
5290
5504
  });
5291
5505
  }
5292
5506
  /** Approve/reject/amend an approval via a JSON-Patch op-array (`PATCH`). */
5293
- async updateApproval(approvalId, ops, auth2 = SERVICE28) {
5507
+ async updateApproval(approvalId, ops, auth2 = SERVICE29) {
5294
5508
  await this.ctx.http.request({
5295
5509
  method: "PATCH",
5296
5510
  path: `${this.base()}/approvals/${encodeURIComponent(approvalId)}`,
@@ -5299,7 +5513,7 @@ var ApprovalService = class {
5299
5513
  });
5300
5514
  }
5301
5515
  /** Delete an approval by id. */
5302
- async deleteApproval(approvalId, auth2 = SERVICE28) {
5516
+ async deleteApproval(approvalId, auth2 = SERVICE29) {
5303
5517
  await this.ctx.http.request({
5304
5518
  method: "DELETE",
5305
5519
  path: `${this.base()}/approvals/${encodeURIComponent(approvalId)}`,
@@ -5307,7 +5521,7 @@ var ApprovalService = class {
5307
5521
  });
5308
5522
  }
5309
5523
  /** Check whether an operation on a resource is permitted / needs approval. */
5310
- async checkPermitted(input, auth2 = SERVICE28) {
5524
+ async checkPermitted(input, auth2 = SERVICE29) {
5311
5525
  return this.ctx.http.request({
5312
5526
  method: "POST",
5313
5527
  path: `${this.base()}/approval/permitted`,
@@ -5316,7 +5530,7 @@ var ApprovalService = class {
5316
5530
  });
5317
5531
  }
5318
5532
  /** Search for users eligible to approve a resource. Returns an array. */
5319
- async searchApprovers(input, auth2 = SERVICE28) {
5533
+ async searchApprovers(input, auth2 = SERVICE29) {
5320
5534
  return this.ctx.http.request({
5321
5535
  method: "POST",
5322
5536
  path: `${this.base()}/search/users`,
@@ -5378,6 +5592,7 @@ var EmporixClient = class {
5378
5592
  quotes;
5379
5593
  returns;
5380
5594
  indexing;
5595
+ search;
5381
5596
  imports;
5382
5597
  auditLogs;
5383
5598
  units;
@@ -5452,6 +5667,7 @@ var EmporixClient = class {
5452
5667
  this.quotes = new QuoteService(mk(QuoteService.channel));
5453
5668
  this.returns = new ReturnsService(mk(ReturnsService.channel));
5454
5669
  this.indexing = new IndexingService(mk(IndexingService.channel));
5670
+ this.search = new SearchService(mk(SearchService.channel));
5455
5671
  this.imports = new ImportService(mk(ImportService.channel));
5456
5672
  this.auditLogs = new AuditLogService(mk(AuditLogService.channel));
5457
5673
  this.units = new UnitHandlingService(mk(UnitHandlingService.channel));
@@ -5526,6 +5742,6 @@ function productYrn(tenant, productId) {
5526
5742
  return `urn:yaas:hybris:product:product:${tenant};${productId}`;
5527
5743
  }
5528
5744
 
5529
- export { AiService, ApprovalService, AuditLogService, BrandService, CatalogService, ClientConfigService, CloudFunctionsService, CountryService, CouponService, CurrencyService, CustomerAdminService, DEFAULT_HOST, EmporixClient, FeeService, HttpClient, ImportService, IndexingService, InvoiceService, LEVEL, LabelService, LevelResolver, 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 };
5745
+ export { AiService, ApprovalService, AuditLogService, BrandService, CatalogService, ClientConfigService, CloudFunctionsService, CountryService, CouponService, CurrencyService, CustomerAdminService, DEFAULT_HOST, EmporixClient, FeeService, HttpClient, ImportService, IndexingService, InvoiceService, LEVEL, LabelService, LevelResolver, QuoteService, RagIndexerService, ReturnsService, RewardPointsService, STORAGE_KEYS, SchemaService, SearchService, 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 };
5530
5746
  //# sourceMappingURL=index.js.map
5531
5747
  //# sourceMappingURL=index.js.map