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