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