@viu/emporix-sdk 4.3.1 → 4.5.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 (55) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +2 -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.cjs +3 -0
  8. package/dist/category.cjs.map +1 -1
  9. package/dist/category.d.cts +17 -11
  10. package/dist/category.d.ts +17 -11
  11. package/dist/category.js +1 -1
  12. package/dist/checkout.d.cts +1 -1
  13. package/dist/checkout.d.ts +1 -1
  14. package/dist/{chunk-2SHTDVOC.js → chunk-J2AN2FMK.js} +7 -2
  15. package/dist/chunk-J2AN2FMK.js.map +1 -0
  16. package/dist/{chunk-MSQ3GEIW.js → chunk-KJEBG7MP.js} +5 -2
  17. package/dist/chunk-KJEBG7MP.js.map +1 -0
  18. package/dist/companies.d.cts +1 -1
  19. package/dist/companies.d.ts +1 -1
  20. package/dist/contacts.d.cts +1 -1
  21. package/dist/contacts.d.ts +1 -1
  22. package/dist/{context-5lt8Q0MT.d.ts → context-BJeomwxV.d.cts} +24 -1
  23. package/dist/{context-5lt8Q0MT.d.cts → context-BJeomwxV.d.ts} +24 -1
  24. package/dist/{customer-groups-8cgS8S5d.d.cts → customer-groups-ByNcTPoL.d.cts} +1 -1
  25. package/dist/{customer-groups-DizW_a-w.d.ts → customer-groups-D7a8BvT2.d.ts} +1 -1
  26. package/dist/customer-groups.d.cts +2 -2
  27. package/dist/customer-groups.d.ts +2 -2
  28. package/dist/customer.d.cts +1 -1
  29. package/dist/customer.d.ts +1 -1
  30. package/dist/index.cjs +282 -90
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.d.cts +498 -5
  33. package/dist/index.d.ts +498 -5
  34. package/dist/index.js +278 -95
  35. package/dist/index.js.map +1 -1
  36. package/dist/locations.d.cts +1 -1
  37. package/dist/locations.d.ts +1 -1
  38. package/dist/media.d.cts +1 -1
  39. package/dist/media.d.ts +1 -1
  40. package/dist/orders.d.cts +1 -1
  41. package/dist/orders.d.ts +1 -1
  42. package/dist/payment.d.cts +1 -1
  43. package/dist/payment.d.ts +1 -1
  44. package/dist/price.d.cts +1 -1
  45. package/dist/price.d.ts +1 -1
  46. package/dist/product.cjs +5 -0
  47. package/dist/product.cjs.map +1 -1
  48. package/dist/product.d.cts +8 -2
  49. package/dist/product.d.ts +8 -2
  50. package/dist/product.js +1 -1
  51. package/dist/segment.d.cts +1 -1
  52. package/dist/segment.d.ts +1 -1
  53. package/package.json +1 -1
  54. package/dist/chunk-2SHTDVOC.js.map +0 -1
  55. package/dist/chunk-MSQ3GEIW.js.map +0 -1
package/dist/index.js CHANGED
@@ -8,16 +8,16 @@ import { auth, resolveToken, DefaultTokenProvider, CustomerRefreshRegistry, Paym
8
8
  export { CustomerRefreshRegistry, DefaultTokenProvider, PaymentGatewayService, auth, resolveToken } from './chunk-4VRUMCS2.js';
9
9
  import { PriceService } from './chunk-K4KXT6NX.js';
10
10
  export { PriceService } from './chunk-K4KXT6NX.js';
11
- import { ProductService } from './chunk-2SHTDVOC.js';
12
- export { ProductService } from './chunk-2SHTDVOC.js';
11
+ import { ProductService } from './chunk-J2AN2FMK.js';
12
+ export { ProductService } from './chunk-J2AN2FMK.js';
13
13
  import { SegmentService } from './chunk-N2CE3J4M.js';
14
14
  export { SegmentService } from './chunk-N2CE3J4M.js';
15
15
  import { AvailabilityService } from './chunk-XQAOHHXL.js';
16
16
  export { AvailabilityService } from './chunk-XQAOHHXL.js';
17
17
  import { CartService } from './chunk-S2ERKGYL.js';
18
18
  export { CartService } from './chunk-S2ERKGYL.js';
19
- import { CategoryService } from './chunk-MSQ3GEIW.js';
20
- export { CategoryService } from './chunk-MSQ3GEIW.js';
19
+ import { CategoryService } from './chunk-KJEBG7MP.js';
20
+ export { CategoryService } from './chunk-KJEBG7MP.js';
21
21
  export { iterateAll } from './chunk-W6SLZNRX.js';
22
22
  import { resolveQuery } from './chunk-S5HEIQDK.js';
23
23
  export { resolveQuery } from './chunk-S5HEIQDK.js';
@@ -76,7 +76,8 @@ function validateConfig(input) {
76
76
  maxLifetimeSeconds: input.cache?.maxLifetimeSeconds ?? 3600
77
77
  },
78
78
  logger: input.logger,
79
- fetch: input.fetch
79
+ fetch: input.fetch,
80
+ contentLanguage: input.contentLanguage
80
81
  };
81
82
  }
82
83
 
@@ -689,10 +690,11 @@ var HttpClient = class {
689
690
  buildHeaders(o, token, isFormData) {
690
691
  return {
691
692
  // Before `o.headers` on purpose: a caller may override the tenant for a
692
- // single request, the way `Accept-Language` can be overridden. Only
693
- // `Authorization` is non-negotiable.
693
+ // single request, the way `Accept-Language` and `Content-Language` can be
694
+ // overridden. Only `Authorization` is non-negotiable.
694
695
  ...this.opts.tenant !== void 0 ? { "Emporix-Tenant": this.opts.tenant } : {},
695
696
  ...this.opts.requestContext?.language ? { "Accept-Language": this.opts.requestContext.language } : {},
697
+ ...this.opts.contentLanguage && o.body !== void 0 ? { "Content-Language": this.opts.contentLanguage } : {},
696
698
  ...o.headers ?? {},
697
699
  Authorization: `Bearer ${token}`,
698
700
  // JSON bodies: set Content-Type. FormData bodies: let `fetch`
@@ -946,7 +948,7 @@ var HttpClient = class {
946
948
  };
947
949
 
948
950
  // package.json
949
- var version = "4.3.1";
951
+ var version = "4.5.0";
950
952
 
951
953
  // src/version.ts
952
954
  var SDK_VERSION = version;
@@ -989,7 +991,8 @@ function createCore(config) {
989
991
  requestContext,
990
992
  // exactOptionalPropertyTypes: `{ fetch: undefined }` is a type error
991
993
  // against `fetch?: typeof globalThis.fetch`, so spread conditionally.
992
- ...cfg.fetch !== void 0 ? { fetch: cfg.fetch } : {}
994
+ ...cfg.fetch !== void 0 ? { fetch: cfg.fetch } : {},
995
+ ...cfg.contentLanguage !== void 0 ? { contentLanguage: cfg.contentLanguage } : {}
993
996
  })
994
997
  });
995
998
  return {
@@ -4321,8 +4324,186 @@ var IndexingService = class {
4321
4324
  }
4322
4325
  };
4323
4326
 
4324
- // src/services/imports.ts
4327
+ // src/services/search.ts
4325
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
+ * An update needs the stored `metadata.version` (`400` without it). `409`
4464
+ * means a job for this index is already running, or the version is stale.
4465
+ */
4466
+ async upsertIndex(type, id, input, auth2 = SERVICE22) {
4467
+ return this.ctx.http.request({
4468
+ method: "PUT",
4469
+ path: `${this.base()}/search/${encodeURIComponent(type)}/indexes/${encodeURIComponent(id)}`,
4470
+ auth: auth2,
4471
+ body: input
4472
+ });
4473
+ }
4474
+ /**
4475
+ * Start deleting a search index. Resolves to the id of the job that removes
4476
+ * it (`202`); `409` means a job for this index is already running.
4477
+ */
4478
+ async deleteIndex(type, id, auth2 = SERVICE22) {
4479
+ return this.ctx.http.request({
4480
+ method: "DELETE",
4481
+ path: `${this.base()}/search/${encodeURIComponent(type)}/indexes/${encodeURIComponent(id)}`,
4482
+ auth: auth2
4483
+ });
4484
+ }
4485
+ /** List index jobs of the tenant. */
4486
+ async listJobs(opts = {}, auth2 = SERVICE22) {
4487
+ const { query, page } = pageQuery(opts);
4488
+ return requestPage(
4489
+ this.ctx.http,
4490
+ { method: "GET", path: `${this.base()}/jobs`, auth: auth2, query },
4491
+ page
4492
+ );
4493
+ }
4494
+ /** Fetch one index job. */
4495
+ async getJob(id, opts = {}, auth2 = SERVICE22) {
4496
+ return this.ctx.http.request({
4497
+ method: "GET",
4498
+ path: `${this.base()}/jobs/${encodeURIComponent(id)}`,
4499
+ auth: auth2,
4500
+ ...opts.fields === void 0 ? {} : { query: { fields: opts.fields } }
4501
+ });
4502
+ }
4503
+ };
4504
+
4505
+ // src/services/imports.ts
4506
+ var SERVICE23 = { kind: "service" };
4326
4507
  var DEFAULT_PAGE_SIZE = 50;
4327
4508
  function pageArgs(opts) {
4328
4509
  return { pageNumber: opts.pageNumber ?? 1, pageSize: opts.pageSize ?? DEFAULT_PAGE_SIZE };
@@ -4372,7 +4553,7 @@ var ImportService = class {
4372
4553
  return `/importtool/${this.ctx.tenant}`;
4373
4554
  }
4374
4555
  /** List every import configuration of the tenant. */
4375
- async listConfigs(auth2 = SERVICE22) {
4556
+ async listConfigs(auth2 = SERVICE23) {
4376
4557
  return this.ctx.http.request({
4377
4558
  method: "GET",
4378
4559
  path: `${this.base()}/configs`,
@@ -4380,7 +4561,7 @@ var ImportService = class {
4380
4561
  });
4381
4562
  }
4382
4563
  /** Fetch one configuration by id. */
4383
- async getConfig(id, auth2 = SERVICE22) {
4564
+ async getConfig(id, auth2 = SERVICE23) {
4384
4565
  return this.ctx.http.request({
4385
4566
  method: "GET",
4386
4567
  path: `${this.base()}/configs/${encodeURIComponent(id)}`,
@@ -4388,7 +4569,7 @@ var ImportService = class {
4388
4569
  });
4389
4570
  }
4390
4571
  /** List the streams of one configuration. */
4391
- async listStreams(configId, auth2 = SERVICE22) {
4572
+ async listStreams(configId, auth2 = SERVICE23) {
4392
4573
  return this.ctx.http.request({
4393
4574
  method: "GET",
4394
4575
  path: `${this.base()}/configs/${encodeURIComponent(configId)}/streams`,
@@ -4396,7 +4577,7 @@ var ImportService = class {
4396
4577
  });
4397
4578
  }
4398
4579
  /** Fetch one stream by id. */
4399
- async getStream(id, auth2 = SERVICE22) {
4580
+ async getStream(id, auth2 = SERVICE23) {
4400
4581
  return this.ctx.http.request({
4401
4582
  method: "GET",
4402
4583
  path: `${this.base()}/streams/${encodeURIComponent(id)}`,
@@ -4413,7 +4594,7 @@ var ImportService = class {
4413
4594
  * takes stream **ids** — map through {@link listStreams} before passing a
4414
4595
  * subset back.
4415
4596
  */
4416
- async getStreamOrder(configId, auth2 = SERVICE22) {
4597
+ async getStreamOrder(configId, auth2 = SERVICE23) {
4417
4598
  return this.ctx.http.request({
4418
4599
  method: "GET",
4419
4600
  path: `${this.base()}/configs/${encodeURIComponent(configId)}/stream-order`,
@@ -4425,7 +4606,7 @@ var ImportService = class {
4425
4606
  * configured — the service answers `204`, not `404`, so an absent schedule is
4426
4607
  * a normal result rather than an error.
4427
4608
  */
4428
- async getSchedule(configId, auth2 = SERVICE22) {
4609
+ async getSchedule(configId, auth2 = SERVICE23) {
4429
4610
  const res = await this.ctx.http.request({
4430
4611
  method: "GET",
4431
4612
  path: `${this.base()}/configs/${encodeURIComponent(configId)}/schedule`,
@@ -4446,7 +4627,7 @@ var ImportService = class {
4446
4627
  * schedule. Use {@link deleteSchedule} to clear a schedule that outlived its
4447
4628
  * configuration.
4448
4629
  */
4449
- async setSchedule(configId, input, auth2 = SERVICE22) {
4630
+ async setSchedule(configId, input, auth2 = SERVICE23) {
4450
4631
  return this.ctx.http.request({
4451
4632
  method: "PUT",
4452
4633
  path: `${this.base()}/configs/${encodeURIComponent(configId)}/schedule`,
@@ -4466,7 +4647,7 @@ var ImportService = class {
4466
4647
  * The service answers `204`, so this resolves to `void` rather than to the
4467
4648
  * removed schedule.
4468
4649
  */
4469
- async deleteSchedule(configId, auth2 = SERVICE22) {
4650
+ async deleteSchedule(configId, auth2 = SERVICE23) {
4470
4651
  await this.ctx.http.request({
4471
4652
  method: "DELETE",
4472
4653
  path: `${this.base()}/configs/${encodeURIComponent(configId)}/schedule`,
@@ -4515,7 +4696,7 @@ var ImportService = class {
4515
4696
  * }
4516
4697
  * ```
4517
4698
  */
4518
- async triggerRun(configId, input = {}, auth2 = SERVICE22) {
4699
+ async triggerRun(configId, input = {}, auth2 = SERVICE23) {
4519
4700
  return this.ctx.http.request({
4520
4701
  method: "POST",
4521
4702
  path: `${this.base()}/configs/${encodeURIComponent(configId)}/runs`,
@@ -4524,7 +4705,7 @@ var ImportService = class {
4524
4705
  });
4525
4706
  }
4526
4707
  /** List a configuration's runs, newest first. */
4527
- async listRuns(configId, opts = {}, auth2 = SERVICE22) {
4708
+ async listRuns(configId, opts = {}, auth2 = SERVICE23) {
4528
4709
  const args = pageArgs(opts);
4529
4710
  const wire = await this.ctx.http.request({
4530
4711
  method: "GET",
@@ -4535,7 +4716,7 @@ var ImportService = class {
4535
4716
  return toPage(wire, args);
4536
4717
  }
4537
4718
  /** Fetch one run with its per-stream progress. */
4538
- async getRun(runId, auth2 = SERVICE22) {
4719
+ async getRun(runId, auth2 = SERVICE23) {
4539
4720
  return this.ctx.http.request({
4540
4721
  method: "GET",
4541
4722
  path: `${this.base()}/runs/${encodeURIComponent(runId)}`,
@@ -4555,7 +4736,7 @@ var ImportService = class {
4555
4736
  * arrive as `{ type: "unknown" }` rather than throwing — see
4556
4737
  * {@link ImportRunEvent}.
4557
4738
  */
4558
- async *streamRun(runId, auth2 = SERVICE22) {
4739
+ async *streamRun(runId, auth2 = SERVICE23) {
4559
4740
  const frames = this.ctx.http.requestStream({
4560
4741
  method: "GET",
4561
4742
  path: `${this.base()}/runs/${encodeURIComponent(runId)}/events`,
@@ -4570,7 +4751,7 @@ var ImportService = class {
4570
4751
  * a result, not an error. A state conflict may instead come back as a `409`,
4571
4752
  * which does throw.
4572
4753
  */
4573
- async cancelRun(runId, opts = {}, auth2 = SERVICE22) {
4754
+ async cancelRun(runId, opts = {}, auth2 = SERVICE23) {
4574
4755
  const query = {};
4575
4756
  if (opts.force) query.force = "true";
4576
4757
  return this.ctx.http.request({
@@ -4581,7 +4762,7 @@ var ImportService = class {
4581
4762
  });
4582
4763
  }
4583
4764
  /** List the errors recorded during a run. */
4584
- async listRunErrors(runId, opts = {}, auth2 = SERVICE22) {
4765
+ async listRunErrors(runId, opts = {}, auth2 = SERVICE23) {
4585
4766
  const args = pageArgs(opts);
4586
4767
  const wire = await this.ctx.http.request({
4587
4768
  method: "GET",
@@ -4602,7 +4783,7 @@ var ImportService = class {
4602
4783
  * `rows.length` as the size of the problem. `limit` defaults to 500 here
4603
4784
  * (1–50 000); {@link downloadRunDiagnosticsCsv} defaults to 50 000.
4604
4785
  */
4605
- async listRunDiagnostics(runId, query = {}, auth2 = SERVICE22) {
4786
+ async listRunDiagnostics(runId, query = {}, auth2 = SERVICE23) {
4606
4787
  return this.ctx.http.request({
4607
4788
  method: "GET",
4608
4789
  path: `${this.base()}/runs/${encodeURIComponent(runId)}/diagnostics`,
@@ -4620,7 +4801,7 @@ var ImportService = class {
4620
4801
  * prefixed with an apostrophe so spreadsheet software does not evaluate source
4621
4802
  * data as a formula. Strip it if you parse the file instead of opening it.
4622
4803
  */
4623
- async downloadRunDiagnosticsCsv(runId, query = {}, auth2 = SERVICE22) {
4804
+ async downloadRunDiagnosticsCsv(runId, query = {}, auth2 = SERVICE23) {
4624
4805
  return this.ctx.http.request({
4625
4806
  method: "GET",
4626
4807
  path: `${this.base()}/runs/${encodeURIComponent(runId)}/diagnostics/csv`,
@@ -4629,7 +4810,7 @@ var ImportService = class {
4629
4810
  });
4630
4811
  }
4631
4812
  /** List the target types that hold imported records — the valid `type` values for {@link searchRecords}. */
4632
- async listDataTypes(auth2 = SERVICE22) {
4813
+ async listDataTypes(auth2 = SERVICE23) {
4633
4814
  return this.ctx.http.request({
4634
4815
  method: "GET",
4635
4816
  path: `${this.base()}/data/types`,
@@ -4637,7 +4818,7 @@ var ImportService = class {
4637
4818
  });
4638
4819
  }
4639
4820
  /** Search imported records of one target type. */
4640
- async searchRecords(opts, auth2 = SERVICE22) {
4821
+ async searchRecords(opts, auth2 = SERVICE23) {
4641
4822
  const args = pageArgs(opts);
4642
4823
  const query = {
4643
4824
  type: opts.type,
@@ -4655,7 +4836,7 @@ var ImportService = class {
4655
4836
  return toPage(wire, args);
4656
4837
  }
4657
4838
  /** Search the imported records produced by one stream. */
4658
- async searchStreamRecords(streamId, opts = {}, auth2 = SERVICE22) {
4839
+ async searchStreamRecords(streamId, opts = {}, auth2 = SERVICE23) {
4659
4840
  const args = pageArgs(opts);
4660
4841
  const query = {
4661
4842
  page: args.pageNumber - 1,
@@ -4684,7 +4865,7 @@ var ImportService = class {
4684
4865
  *
4685
4866
  * **Preview upstream**: the contract may change without a major bump.
4686
4867
  */
4687
- async stats(query = {}, auth2 = SERVICE22) {
4868
+ async stats(query = {}, auth2 = SERVICE23) {
4688
4869
  return this.ctx.http.request({
4689
4870
  method: "GET",
4690
4871
  path: `${this.base()}/stats`,
@@ -4702,7 +4883,7 @@ var ImportService = class {
4702
4883
  *
4703
4884
  * **Preview upstream**: the contract may change without a major bump.
4704
4885
  */
4705
- async listJobGroups(auth2 = SERVICE22) {
4886
+ async listJobGroups(auth2 = SERVICE23) {
4706
4887
  return this.ctx.http.request({
4707
4888
  method: "GET",
4708
4889
  path: `${this.base()}/dashboard/job-groups`,
@@ -4718,7 +4899,7 @@ var ImportService = class {
4718
4899
  *
4719
4900
  * **Preview upstream**: the contract may change without a major bump.
4720
4901
  */
4721
- async getHealthThresholds(auth2 = SERVICE22) {
4902
+ async getHealthThresholds(auth2 = SERVICE23) {
4722
4903
  return this.ctx.http.request({
4723
4904
  method: "GET",
4724
4905
  path: `${this.base()}/settings/health-thresholds`,
@@ -4730,7 +4911,7 @@ var ImportService = class {
4730
4911
  *
4731
4912
  * **Preview upstream**: the contract may change without a major bump.
4732
4913
  */
4733
- async getLicense(auth2 = SERVICE22) {
4914
+ async getLicense(auth2 = SERVICE23) {
4734
4915
  return this.ctx.http.request({
4735
4916
  method: "GET",
4736
4917
  path: `${this.base()}/license`,
@@ -4750,7 +4931,7 @@ var ImportService = class {
4750
4931
  *
4751
4932
  * **Preview upstream**: the contract may change without a major bump.
4752
4933
  */
4753
- async retryRun(runId, auth2 = SERVICE22) {
4934
+ async retryRun(runId, auth2 = SERVICE23) {
4754
4935
  return this.ctx.http.request({
4755
4936
  method: "POST",
4756
4937
  path: `${this.base()}/runs/${encodeURIComponent(runId)}/retry`,
@@ -4760,7 +4941,7 @@ var ImportService = class {
4760
4941
  };
4761
4942
 
4762
4943
  // src/services/audit-log.ts
4763
- var SERVICE23 = { kind: "service" };
4944
+ var SERVICE24 = { kind: "service" };
4764
4945
  function toPage2(wire) {
4765
4946
  const pageNumber = wire.page ?? 1;
4766
4947
  const totalPages = wire.totalPages ?? 0;
@@ -4812,7 +4993,7 @@ var AuditLogService = class {
4812
4993
  * });
4813
4994
  * ```
4814
4995
  */
4815
- async list(opts = {}, auth2 = SERVICE23) {
4996
+ async list(opts = {}, auth2 = SERVICE24) {
4816
4997
  const wire = await this.ctx.http.request({
4817
4998
  method: "GET",
4818
4999
  path: `${this.base()}/changelogs`,
@@ -4826,7 +5007,7 @@ var AuditLogService = class {
4826
5007
  };
4827
5008
 
4828
5009
  // src/services/unit-handling.ts
4829
- var SERVICE24 = { kind: "service" };
5010
+ var SERVICE25 = { kind: "service" };
4830
5011
  var UnitHandlingService = class {
4831
5012
  constructor(ctx) {
4832
5013
  this.ctx = ctx;
@@ -4837,7 +5018,7 @@ var UnitHandlingService = class {
4837
5018
  return `/unit-handling/${this.ctx.tenant}`;
4838
5019
  }
4839
5020
  /** Find units (filter/sort/page). */
4840
- async listUnits(query = {}, auth2 = SERVICE24) {
5021
+ async listUnits(query = {}, auth2 = SERVICE25) {
4841
5022
  return this.ctx.http.request({
4842
5023
  method: "GET",
4843
5024
  path: `${this.base()}/units`,
@@ -4846,7 +5027,7 @@ var UnitHandlingService = class {
4846
5027
  });
4847
5028
  }
4848
5029
  /** Retrieve a unit by code. */
4849
- async getUnit(unitCode, auth2 = SERVICE24) {
5030
+ async getUnit(unitCode, auth2 = SERVICE25) {
4850
5031
  return this.ctx.http.request({
4851
5032
  method: "GET",
4852
5033
  path: `${this.base()}/units/${encodeURIComponent(unitCode)}`,
@@ -4854,11 +5035,11 @@ var UnitHandlingService = class {
4854
5035
  });
4855
5036
  }
4856
5037
  /** Add a new unit. */
4857
- async createUnit(input, auth2 = SERVICE24) {
5038
+ async createUnit(input, auth2 = SERVICE25) {
4858
5039
  return this.ctx.http.request({ method: "POST", path: `${this.base()}/units`, auth: auth2, body: input });
4859
5040
  }
4860
5041
  /** Update a unit by code. */
4861
- async updateUnit(unitCode, input, auth2 = SERVICE24) {
5042
+ async updateUnit(unitCode, input, auth2 = SERVICE25) {
4862
5043
  await this.ctx.http.request({
4863
5044
  method: "PUT",
4864
5045
  path: `${this.base()}/units/${encodeURIComponent(unitCode)}`,
@@ -4867,7 +5048,7 @@ var UnitHandlingService = class {
4867
5048
  });
4868
5049
  }
4869
5050
  /** Delete a unit by code. */
4870
- async deleteUnit(unitCode, auth2 = SERVICE24) {
5051
+ async deleteUnit(unitCode, auth2 = SERVICE25) {
4871
5052
  await this.ctx.http.request({
4872
5053
  method: "DELETE",
4873
5054
  path: `${this.base()}/units/${encodeURIComponent(unitCode)}`,
@@ -4875,7 +5056,7 @@ var UnitHandlingService = class {
4875
5056
  });
4876
5057
  }
4877
5058
  /** Delete multiple units by code (bulk). The codes are sent as the request body. */
4878
- async deleteUnits(codes, auth2 = SERVICE24) {
5059
+ async deleteUnits(codes, auth2 = SERVICE25) {
4879
5060
  await this.ctx.http.request({
4880
5061
  method: "DELETE",
4881
5062
  path: `${this.base()}/units`,
@@ -4884,7 +5065,7 @@ var UnitHandlingService = class {
4884
5065
  });
4885
5066
  }
4886
5067
  /** Fetch a conversion factor (`PUT /units/conversion-factor-commands`). */
4887
- async getConversionFactor(input, auth2 = SERVICE24) {
5068
+ async getConversionFactor(input, auth2 = SERVICE25) {
4888
5069
  return this.ctx.http.request({
4889
5070
  method: "PUT",
4890
5071
  path: `${this.base()}/units/conversion-factor-commands`,
@@ -4893,7 +5074,7 @@ var UnitHandlingService = class {
4893
5074
  });
4894
5075
  }
4895
5076
  /** Convert a value between units (`PUT /units/convert-unit-commands`). */
4896
- async convertUnit(input, auth2 = SERVICE24) {
5077
+ async convertUnit(input, auth2 = SERVICE25) {
4897
5078
  return this.ctx.http.request({
4898
5079
  method: "PUT",
4899
5080
  path: `${this.base()}/units/convert-unit-commands`,
@@ -4902,13 +5083,13 @@ var UnitHandlingService = class {
4902
5083
  });
4903
5084
  }
4904
5085
  /** List all unit types. */
4905
- async listUnitTypes(auth2 = SERVICE24) {
5086
+ async listUnitTypes(auth2 = SERVICE25) {
4906
5087
  return this.ctx.http.request({ method: "GET", path: `${this.base()}/types`, auth: auth2 });
4907
5088
  }
4908
5089
  };
4909
5090
 
4910
5091
  // src/services/catalog.ts
4911
- var SERVICE25 = { kind: "service" };
5092
+ var SERVICE26 = { kind: "service" };
4912
5093
  var CatalogService = class {
4913
5094
  constructor(ctx) {
4914
5095
  this.ctx = ctx;
@@ -4919,7 +5100,7 @@ var CatalogService = class {
4919
5100
  return `/catalog/${this.ctx.tenant}/catalogs`;
4920
5101
  }
4921
5102
  /** List catalogs (filtered/sorted). */
4922
- async listCatalogs(query = {}, auth2 = SERVICE25) {
5103
+ async listCatalogs(query = {}, auth2 = SERVICE26) {
4923
5104
  return this.ctx.http.request({
4924
5105
  method: "GET",
4925
5106
  path: this.base(),
@@ -4928,7 +5109,7 @@ var CatalogService = class {
4928
5109
  });
4929
5110
  }
4930
5111
  /** Retrieve a catalog by id. */
4931
- async getCatalog(catalogId, auth2 = SERVICE25) {
5112
+ async getCatalog(catalogId, auth2 = SERVICE26) {
4932
5113
  return this.ctx.http.request({
4933
5114
  method: "GET",
4934
5115
  path: `${this.base()}/${encodeURIComponent(catalogId)}`,
@@ -4936,7 +5117,7 @@ var CatalogService = class {
4936
5117
  });
4937
5118
  }
4938
5119
  /** Retrieve all catalogs that contain a category. */
4939
- async getCatalogsForCategory(categoryId, auth2 = SERVICE25) {
5120
+ async getCatalogsForCategory(categoryId, auth2 = SERVICE26) {
4940
5121
  return this.ctx.http.request({
4941
5122
  method: "GET",
4942
5123
  path: `${this.base()}/categories/${encodeURIComponent(categoryId)}`,
@@ -4944,11 +5125,11 @@ var CatalogService = class {
4944
5125
  });
4945
5126
  }
4946
5127
  /** Create a catalog. */
4947
- async createCatalog(input, auth2 = SERVICE25) {
5128
+ async createCatalog(input, auth2 = SERVICE26) {
4948
5129
  return this.ctx.http.request({ method: "POST", path: this.base(), auth: auth2, body: input });
4949
5130
  }
4950
5131
  /** Upsert a catalog by id (`PUT`). */
4951
- async updateCatalog(catalogId, input, auth2 = SERVICE25) {
5132
+ async updateCatalog(catalogId, input, auth2 = SERVICE26) {
4952
5133
  return this.ctx.http.request({
4953
5134
  method: "PUT",
4954
5135
  path: `${this.base()}/${encodeURIComponent(catalogId)}`,
@@ -4957,7 +5138,7 @@ var CatalogService = class {
4957
5138
  });
4958
5139
  }
4959
5140
  /** Partially update a catalog by id (`PATCH`). */
4960
- async patchCatalog(catalogId, patch, auth2 = SERVICE25) {
5141
+ async patchCatalog(catalogId, patch, auth2 = SERVICE26) {
4961
5142
  await this.ctx.http.request({
4962
5143
  method: "PATCH",
4963
5144
  path: `${this.base()}/${encodeURIComponent(catalogId)}`,
@@ -4966,7 +5147,7 @@ var CatalogService = class {
4966
5147
  });
4967
5148
  }
4968
5149
  /** Remove a catalog by id. */
4969
- async deleteCatalog(catalogId, auth2 = SERVICE25) {
5150
+ async deleteCatalog(catalogId, auth2 = SERVICE26) {
4970
5151
  await this.ctx.http.request({
4971
5152
  method: "DELETE",
4972
5153
  path: `${this.base()}/${encodeURIComponent(catalogId)}`,
@@ -4976,7 +5157,7 @@ var CatalogService = class {
4976
5157
  };
4977
5158
 
4978
5159
  // src/services/vendor.ts
4979
- var SERVICE26 = { kind: "service" };
5160
+ var SERVICE27 = { kind: "service" };
4980
5161
  var VendorService = class {
4981
5162
  constructor(ctx) {
4982
5163
  this.ctx = ctx;
@@ -4988,7 +5169,7 @@ var VendorService = class {
4988
5169
  }
4989
5170
  // --- Vendors ---
4990
5171
  /** List all vendors. */
4991
- async listVendors(query = {}, auth2 = SERVICE26) {
5172
+ async listVendors(query = {}, auth2 = SERVICE27) {
4992
5173
  return this.ctx.http.request({
4993
5174
  method: "GET",
4994
5175
  path: `${this.base()}/vendors`,
@@ -4997,7 +5178,7 @@ var VendorService = class {
4997
5178
  });
4998
5179
  }
4999
5180
  /** Retrieve a vendor by id. */
5000
- async getVendor(vendorId, auth2 = SERVICE26) {
5181
+ async getVendor(vendorId, auth2 = SERVICE27) {
5001
5182
  return this.ctx.http.request({
5002
5183
  method: "GET",
5003
5184
  path: `${this.base()}/vendors/${encodeURIComponent(vendorId)}`,
@@ -5008,7 +5189,7 @@ var VendorService = class {
5008
5189
  * Search vendors (`POST /vendors/search`). A built filter in `q` is resolved to
5009
5190
  * a string; paging, sort and fields go in the query string.
5010
5191
  */
5011
- async searchVendors(query, auth2 = SERVICE26) {
5192
+ async searchVendors(query, auth2 = SERVICE27) {
5012
5193
  const input = query.q !== void 0 ? { ...query, q: resolveQuery(query.q, { compoundLogicalQuery: false }) } : query;
5013
5194
  return this.ctx.http.request({
5014
5195
  method: "POST",
@@ -5018,11 +5199,11 @@ var VendorService = class {
5018
5199
  });
5019
5200
  }
5020
5201
  /** Create a vendor. */
5021
- async createVendor(input, auth2 = SERVICE26) {
5202
+ async createVendor(input, auth2 = SERVICE27) {
5022
5203
  return this.ctx.http.request({ method: "POST", path: `${this.base()}/vendors`, auth: auth2, body: input });
5023
5204
  }
5024
5205
  /** Upsert a vendor by id (`PUT`). */
5025
- async updateVendor(vendorId, input, auth2 = SERVICE26) {
5206
+ async updateVendor(vendorId, input, auth2 = SERVICE27) {
5026
5207
  await this.ctx.http.request({
5027
5208
  method: "PUT",
5028
5209
  path: `${this.base()}/vendors/${encodeURIComponent(vendorId)}`,
@@ -5031,7 +5212,7 @@ var VendorService = class {
5031
5212
  });
5032
5213
  }
5033
5214
  /** Delete a vendor by id. */
5034
- async deleteVendor(vendorId, auth2 = SERVICE26) {
5215
+ async deleteVendor(vendorId, auth2 = SERVICE27) {
5035
5216
  await this.ctx.http.request({
5036
5217
  method: "DELETE",
5037
5218
  path: `${this.base()}/vendors/${encodeURIComponent(vendorId)}`,
@@ -5040,7 +5221,7 @@ var VendorService = class {
5040
5221
  }
5041
5222
  // --- Vendor locations ---
5042
5223
  /** List all vendor locations. */
5043
- async listVendorLocations(query = {}, auth2 = SERVICE26) {
5224
+ async listVendorLocations(query = {}, auth2 = SERVICE27) {
5044
5225
  return this.ctx.http.request({
5045
5226
  method: "GET",
5046
5227
  path: `${this.base()}/locations`,
@@ -5049,7 +5230,7 @@ var VendorService = class {
5049
5230
  });
5050
5231
  }
5051
5232
  /** Retrieve a vendor location by id. */
5052
- async getVendorLocation(locationId, auth2 = SERVICE26) {
5233
+ async getVendorLocation(locationId, auth2 = SERVICE27) {
5053
5234
  return this.ctx.http.request({
5054
5235
  method: "GET",
5055
5236
  path: `${this.base()}/locations/${encodeURIComponent(locationId)}`,
@@ -5057,11 +5238,11 @@ var VendorService = class {
5057
5238
  });
5058
5239
  }
5059
5240
  /** Create a vendor location. */
5060
- async createVendorLocation(input, auth2 = SERVICE26) {
5241
+ async createVendorLocation(input, auth2 = SERVICE27) {
5061
5242
  return this.ctx.http.request({ method: "POST", path: `${this.base()}/locations`, auth: auth2, body: input });
5062
5243
  }
5063
5244
  /** Upsert a vendor location by id (`PUT`). */
5064
- async updateVendorLocation(locationId, input, auth2 = SERVICE26) {
5245
+ async updateVendorLocation(locationId, input, auth2 = SERVICE27) {
5065
5246
  await this.ctx.http.request({
5066
5247
  method: "PUT",
5067
5248
  path: `${this.base()}/locations/${encodeURIComponent(locationId)}`,
@@ -5070,7 +5251,7 @@ var VendorService = class {
5070
5251
  });
5071
5252
  }
5072
5253
  /** Delete a vendor location by id. */
5073
- async deleteVendorLocation(locationId, auth2 = SERVICE26) {
5254
+ async deleteVendorLocation(locationId, auth2 = SERVICE27) {
5074
5255
  await this.ctx.http.request({
5075
5256
  method: "DELETE",
5076
5257
  path: `${this.base()}/locations/${encodeURIComponent(locationId)}`,
@@ -5080,7 +5261,7 @@ var VendorService = class {
5080
5261
  };
5081
5262
 
5082
5263
  // src/services/customer-admin.ts
5083
- var SERVICE27 = { kind: "service" };
5264
+ var SERVICE28 = { kind: "service" };
5084
5265
  var CustomerAdminService = class {
5085
5266
  constructor(ctx) {
5086
5267
  this.ctx = ctx;
@@ -5101,7 +5282,7 @@ var CustomerAdminService = class {
5101
5282
  }
5102
5283
  // --- Customers ---
5103
5284
  /** List customers. */
5104
- async listCustomers(query = {}, auth2 = SERVICE27) {
5285
+ async listCustomers(query = {}, auth2 = SERVICE28) {
5105
5286
  return this.ctx.http.request({
5106
5287
  method: "GET",
5107
5288
  path: this.base(),
@@ -5113,7 +5294,7 @@ var CustomerAdminService = class {
5113
5294
  * Search customers (`POST /customers/search`). A built filter in `q` is resolved
5114
5295
  * to a string; `pageNumber`, `pageSize`, `sort` and `expand` go in the query string.
5115
5296
  */
5116
- async searchCustomers(query, auth2 = SERVICE27) {
5297
+ async searchCustomers(query, auth2 = SERVICE28) {
5117
5298
  const input = query.q !== void 0 ? { ...query, q: resolveQuery(query.q, { compoundLogicalQuery: false }) } : query;
5118
5299
  return this.ctx.http.request({
5119
5300
  method: "POST",
@@ -5123,28 +5304,28 @@ var CustomerAdminService = class {
5123
5304
  });
5124
5305
  }
5125
5306
  /** Retrieve a customer profile by number. */
5126
- async getCustomer(customerNumber, auth2 = SERVICE27) {
5307
+ async getCustomer(customerNumber, auth2 = SERVICE28) {
5127
5308
  return this.ctx.http.request({ method: "GET", path: this.customerPath(customerNumber), auth: auth2 });
5128
5309
  }
5129
5310
  /** Create a customer. */
5130
- async createCustomer(input, auth2 = SERVICE27) {
5311
+ async createCustomer(input, auth2 = SERVICE28) {
5131
5312
  return this.ctx.http.request({ method: "POST", path: this.base(), auth: auth2, body: input });
5132
5313
  }
5133
5314
  /** Upsert a customer profile by number (`PUT`). */
5134
- async upsertCustomer(customerNumber, input, auth2 = SERVICE27) {
5315
+ async upsertCustomer(customerNumber, input, auth2 = SERVICE28) {
5135
5316
  return this.ctx.http.request({ method: "PUT", path: this.customerPath(customerNumber), auth: auth2, body: input });
5136
5317
  }
5137
5318
  /** Partially update a customer profile (`PATCH`). */
5138
- async patchCustomer(customerNumber, patch, auth2 = SERVICE27) {
5319
+ async patchCustomer(customerNumber, patch, auth2 = SERVICE28) {
5139
5320
  await this.ctx.http.request({ method: "PATCH", path: this.customerPath(customerNumber), auth: auth2, body: patch });
5140
5321
  }
5141
5322
  /** Delete a customer profile. */
5142
- async deleteCustomer(customerNumber, auth2 = SERVICE27) {
5323
+ async deleteCustomer(customerNumber, auth2 = SERVICE28) {
5143
5324
  await this.ctx.http.request({ method: "DELETE", path: this.customerPath(customerNumber), auth: auth2 });
5144
5325
  }
5145
5326
  // --- Addresses ---
5146
5327
  /** List a customer's addresses. */
5147
- async listAddresses(customerNumber, auth2 = SERVICE27) {
5328
+ async listAddresses(customerNumber, auth2 = SERVICE28) {
5148
5329
  return this.ctx.http.request({
5149
5330
  method: "GET",
5150
5331
  path: `${this.customerPath(customerNumber)}/addresses`,
@@ -5152,11 +5333,11 @@ var CustomerAdminService = class {
5152
5333
  });
5153
5334
  }
5154
5335
  /** Retrieve one address. */
5155
- async getAddress(customerNumber, addressId, auth2 = SERVICE27) {
5336
+ async getAddress(customerNumber, addressId, auth2 = SERVICE28) {
5156
5337
  return this.ctx.http.request({ method: "GET", path: this.addressPath(customerNumber, addressId), auth: auth2 });
5157
5338
  }
5158
5339
  /** Add an address. */
5159
- async addAddress(customerNumber, input, auth2 = SERVICE27) {
5340
+ async addAddress(customerNumber, input, auth2 = SERVICE28) {
5160
5341
  return this.ctx.http.request({
5161
5342
  method: "POST",
5162
5343
  path: `${this.customerPath(customerNumber)}/addresses`,
@@ -5165,19 +5346,19 @@ var CustomerAdminService = class {
5165
5346
  });
5166
5347
  }
5167
5348
  /** Upsert an address by id (`PUT`). */
5168
- async upsertAddress(customerNumber, addressId, input, auth2 = SERVICE27) {
5349
+ async upsertAddress(customerNumber, addressId, input, auth2 = SERVICE28) {
5169
5350
  return this.ctx.http.request({ method: "PUT", path: this.addressPath(customerNumber, addressId), auth: auth2, body: input });
5170
5351
  }
5171
5352
  /** Partially update an address by id (`PATCH`). */
5172
- async patchAddress(customerNumber, addressId, patch, auth2 = SERVICE27) {
5353
+ async patchAddress(customerNumber, addressId, patch, auth2 = SERVICE28) {
5173
5354
  await this.ctx.http.request({ method: "PATCH", path: this.addressPath(customerNumber, addressId), auth: auth2, body: patch });
5174
5355
  }
5175
5356
  /** Delete an address by id. */
5176
- async deleteAddress(customerNumber, addressId, auth2 = SERVICE27) {
5357
+ async deleteAddress(customerNumber, addressId, auth2 = SERVICE28) {
5177
5358
  await this.ctx.http.request({ method: "DELETE", path: this.addressPath(customerNumber, addressId), auth: auth2 });
5178
5359
  }
5179
5360
  /** Add tags to an address (`?tags=` query). */
5180
- async addAddressTags(customerNumber, addressId, tags, auth2 = SERVICE27) {
5361
+ async addAddressTags(customerNumber, addressId, tags, auth2 = SERVICE28) {
5181
5362
  await this.ctx.http.request({
5182
5363
  method: "POST",
5183
5364
  path: `${this.addressPath(customerNumber, addressId)}/tags`,
@@ -5186,7 +5367,7 @@ var CustomerAdminService = class {
5186
5367
  });
5187
5368
  }
5188
5369
  /** Remove tags from an address (`?tags=` query). */
5189
- async removeAddressTags(customerNumber, addressId, tags, auth2 = SERVICE27) {
5370
+ async removeAddressTags(customerNumber, addressId, tags, auth2 = SERVICE28) {
5190
5371
  await this.ctx.http.request({
5191
5372
  method: "DELETE",
5192
5373
  path: `${this.addressPath(customerNumber, addressId)}/tags`,
@@ -5200,7 +5381,7 @@ var CustomerAdminService = class {
5200
5381
  * `customer.import_read` scope. An unconfigured tenant answers with an empty
5201
5382
  * object rather than a 404.
5202
5383
  */
5203
- async getPasswordMigrationRetention(auth2 = SERVICE27) {
5384
+ async getPasswordMigrationRetention(auth2 = SERVICE28) {
5204
5385
  return this.ctx.http.request({
5205
5386
  method: "GET",
5206
5387
  path: this.configPath(),
@@ -5213,7 +5394,7 @@ var CustomerAdminService = class {
5213
5394
  * `legacyAuth`** — that import is rejected without an active config. Re-POST with
5214
5395
  * an earlier `retentionEndDate` to shorten a running window.
5215
5396
  */
5216
- async configurePasswordMigrationRetention(input, auth2 = SERVICE27) {
5397
+ async configurePasswordMigrationRetention(input, auth2 = SERVICE28) {
5217
5398
  return this.ctx.http.request({
5218
5399
  method: "POST",
5219
5400
  path: this.configPath(),
@@ -5226,7 +5407,7 @@ var CustomerAdminService = class {
5226
5407
  * Intended for after the migration window: when the window ends, unmigrated
5227
5408
  * accounts need a password reset and their legacy credentials are cleared.
5228
5409
  */
5229
- async deletePasswordMigrationRetention(auth2 = SERVICE27) {
5410
+ async deletePasswordMigrationRetention(auth2 = SERVICE28) {
5230
5411
  await this.ctx.http.request({ method: "DELETE", path: this.configPath(), auth: auth2 });
5231
5412
  }
5232
5413
  // --- Bulk import ---
@@ -5239,7 +5420,7 @@ var CustomerAdminService = class {
5239
5420
  * `account.legacyAuth`, and importing `legacyAuth` requires an active retention
5240
5421
  * config (see `configurePasswordMigrationRetention`).
5241
5422
  */
5242
- async importCustomers(input, auth2 = SERVICE27) {
5423
+ async importCustomers(input, auth2 = SERVICE28) {
5243
5424
  return this.ctx.http.request({
5244
5425
  method: "POST",
5245
5426
  path: `${this.base()}/import`,
@@ -5250,7 +5431,7 @@ var CustomerAdminService = class {
5250
5431
  };
5251
5432
 
5252
5433
  // src/services/approval.ts
5253
- var SERVICE28 = { kind: "service" };
5434
+ var SERVICE29 = { kind: "service" };
5254
5435
  var ApprovalService = class {
5255
5436
  constructor(ctx) {
5256
5437
  this.ctx = ctx;
@@ -5261,7 +5442,7 @@ var ApprovalService = class {
5261
5442
  return `/approval/${this.ctx.tenant}`;
5262
5443
  }
5263
5444
  /** List approvals (paged via `pageNumber`/`pageSize`/`sort`/`q`). Returns an array. */
5264
- async listApprovals(query = {}, auth2 = SERVICE28) {
5445
+ async listApprovals(query = {}, auth2 = SERVICE29) {
5265
5446
  return this.ctx.http.request({
5266
5447
  method: "GET",
5267
5448
  path: `${this.base()}/approvals`,
@@ -5270,7 +5451,7 @@ var ApprovalService = class {
5270
5451
  });
5271
5452
  }
5272
5453
  /** Retrieve a single approval by id. */
5273
- async getApproval(approvalId, auth2 = SERVICE28) {
5454
+ async getApproval(approvalId, auth2 = SERVICE29) {
5274
5455
  return this.ctx.http.request({
5275
5456
  method: "GET",
5276
5457
  path: `${this.base()}/approvals/${encodeURIComponent(approvalId)}`,
@@ -5278,7 +5459,7 @@ var ApprovalService = class {
5278
5459
  });
5279
5460
  }
5280
5461
  /** Create an approval request (cart or quote). Returns the created `{ id }`. */
5281
- async createApproval(input, auth2 = SERVICE28) {
5462
+ async createApproval(input, auth2 = SERVICE29) {
5282
5463
  return this.ctx.http.request({
5283
5464
  method: "POST",
5284
5465
  path: `${this.base()}/approvals`,
@@ -5287,7 +5468,7 @@ var ApprovalService = class {
5287
5468
  });
5288
5469
  }
5289
5470
  /** Approve/reject/amend an approval via a JSON-Patch op-array (`PATCH`). */
5290
- async updateApproval(approvalId, ops, auth2 = SERVICE28) {
5471
+ async updateApproval(approvalId, ops, auth2 = SERVICE29) {
5291
5472
  await this.ctx.http.request({
5292
5473
  method: "PATCH",
5293
5474
  path: `${this.base()}/approvals/${encodeURIComponent(approvalId)}`,
@@ -5296,7 +5477,7 @@ var ApprovalService = class {
5296
5477
  });
5297
5478
  }
5298
5479
  /** Delete an approval by id. */
5299
- async deleteApproval(approvalId, auth2 = SERVICE28) {
5480
+ async deleteApproval(approvalId, auth2 = SERVICE29) {
5300
5481
  await this.ctx.http.request({
5301
5482
  method: "DELETE",
5302
5483
  path: `${this.base()}/approvals/${encodeURIComponent(approvalId)}`,
@@ -5304,7 +5485,7 @@ var ApprovalService = class {
5304
5485
  });
5305
5486
  }
5306
5487
  /** Check whether an operation on a resource is permitted / needs approval. */
5307
- async checkPermitted(input, auth2 = SERVICE28) {
5488
+ async checkPermitted(input, auth2 = SERVICE29) {
5308
5489
  return this.ctx.http.request({
5309
5490
  method: "POST",
5310
5491
  path: `${this.base()}/approval/permitted`,
@@ -5313,7 +5494,7 @@ var ApprovalService = class {
5313
5494
  });
5314
5495
  }
5315
5496
  /** Search for users eligible to approve a resource. Returns an array. */
5316
- async searchApprovers(input, auth2 = SERVICE28) {
5497
+ async searchApprovers(input, auth2 = SERVICE29) {
5317
5498
  return this.ctx.http.request({
5318
5499
  method: "POST",
5319
5500
  path: `${this.base()}/search/users`,
@@ -5375,6 +5556,7 @@ var EmporixClient = class {
5375
5556
  quotes;
5376
5557
  returns;
5377
5558
  indexing;
5559
+ search;
5378
5560
  imports;
5379
5561
  auditLogs;
5380
5562
  units;
@@ -5449,6 +5631,7 @@ var EmporixClient = class {
5449
5631
  this.quotes = new QuoteService(mk(QuoteService.channel));
5450
5632
  this.returns = new ReturnsService(mk(ReturnsService.channel));
5451
5633
  this.indexing = new IndexingService(mk(IndexingService.channel));
5634
+ this.search = new SearchService(mk(SearchService.channel));
5452
5635
  this.imports = new ImportService(mk(ImportService.channel));
5453
5636
  this.auditLogs = new AuditLogService(mk(AuditLogService.channel));
5454
5637
  this.units = new UnitHandlingService(mk(UnitHandlingService.channel));
@@ -5523,6 +5706,6 @@ function productYrn(tenant, productId) {
5523
5706
  return `urn:yaas:hybris:product:product:${tenant};${productId}`;
5524
5707
  }
5525
5708
 
5526
- 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 };
5709
+ 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 };
5527
5710
  //# sourceMappingURL=index.js.map
5528
5711
  //# sourceMappingURL=index.js.map