@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.js
CHANGED
|
@@ -4,8 +4,8 @@ import { MediaService } from './chunk-OTG2S2L4.js';
|
|
|
4
4
|
export { MediaService } from './chunk-OTG2S2L4.js';
|
|
5
5
|
import { OrdersService, SalesOrdersService } from './chunk-P7G4LOOV.js';
|
|
6
6
|
export { OrdersService, SalesOrdersService } from './chunk-P7G4LOOV.js';
|
|
7
|
-
import { auth, resolveToken, DefaultTokenProvider, CustomerRefreshRegistry, PaymentGatewayService } from './chunk-
|
|
8
|
-
export { CustomerRefreshRegistry, DefaultTokenProvider, PaymentGatewayService, auth, resolveToken } from './chunk-
|
|
7
|
+
import { auth, resolveToken, DefaultTokenProvider, CustomerRefreshRegistry, PaymentGatewayService } from './chunk-4VRUMCS2.js';
|
|
8
|
+
export { CustomerRefreshRegistry, DefaultTokenProvider, PaymentGatewayService, auth, resolveToken } from './chunk-4VRUMCS2.js';
|
|
9
9
|
import { PriceService } from './chunk-ZOFGDNSX.js';
|
|
10
10
|
export { PriceService } from './chunk-ZOFGDNSX.js';
|
|
11
11
|
import { ProductService } from './chunk-7W22KLUL.js';
|
|
@@ -595,7 +595,7 @@ var HttpClient = class {
|
|
|
595
595
|
};
|
|
596
596
|
|
|
597
597
|
// package.json
|
|
598
|
-
var version = "2.
|
|
598
|
+
var version = "2.30.0";
|
|
599
599
|
|
|
600
600
|
// src/version.ts
|
|
601
601
|
var SDK_VERSION = version;
|
|
@@ -3847,8 +3847,239 @@ var IndexingService = class {
|
|
|
3847
3847
|
}
|
|
3848
3848
|
};
|
|
3849
3849
|
|
|
3850
|
-
// src/services/
|
|
3850
|
+
// src/services/imports.ts
|
|
3851
3851
|
var SERVICE23 = { kind: "service" };
|
|
3852
|
+
var DEFAULT_PAGE_SIZE = 50;
|
|
3853
|
+
function pageArgs(opts) {
|
|
3854
|
+
return { pageNumber: opts.pageNumber ?? 1, pageSize: opts.pageSize ?? DEFAULT_PAGE_SIZE };
|
|
3855
|
+
}
|
|
3856
|
+
function toPage(wire, requested) {
|
|
3857
|
+
const totalPages = wire.totalPages ?? 0;
|
|
3858
|
+
const pageNumber = (wire.number ?? requested.pageNumber - 1) + 1;
|
|
3859
|
+
return {
|
|
3860
|
+
items: wire.content ?? [],
|
|
3861
|
+
pageNumber,
|
|
3862
|
+
pageSize: wire.size ?? requested.pageSize,
|
|
3863
|
+
hasNextPage: pageNumber < totalPages,
|
|
3864
|
+
totalElements: wire.totalElements ?? 0,
|
|
3865
|
+
totalPages
|
|
3866
|
+
};
|
|
3867
|
+
}
|
|
3868
|
+
function toRunEvent(ev) {
|
|
3869
|
+
let payload;
|
|
3870
|
+
try {
|
|
3871
|
+
payload = JSON.parse(ev.data);
|
|
3872
|
+
} catch {
|
|
3873
|
+
return { type: "unknown", event: ev.event, data: ev.data };
|
|
3874
|
+
}
|
|
3875
|
+
if (typeof payload !== "object" || payload === null) {
|
|
3876
|
+
return { type: "unknown", event: ev.event, data: ev.data };
|
|
3877
|
+
}
|
|
3878
|
+
switch (ev.event) {
|
|
3879
|
+
case "snapshot": {
|
|
3880
|
+
const detail = payload;
|
|
3881
|
+
return { type: "snapshot", run: detail.run, streams: detail.streams ?? [] };
|
|
3882
|
+
}
|
|
3883
|
+
case "stream":
|
|
3884
|
+
return { type: "stream", stream: payload };
|
|
3885
|
+
case "run":
|
|
3886
|
+
return { type: "run", run: payload };
|
|
3887
|
+
default:
|
|
3888
|
+
return { type: "unknown", event: ev.event, data: ev.data };
|
|
3889
|
+
}
|
|
3890
|
+
}
|
|
3891
|
+
var ImportService = class {
|
|
3892
|
+
constructor(ctx) {
|
|
3893
|
+
this.ctx = ctx;
|
|
3894
|
+
}
|
|
3895
|
+
ctx;
|
|
3896
|
+
static channel = "import";
|
|
3897
|
+
base() {
|
|
3898
|
+
return `/importtool/${this.ctx.tenant}`;
|
|
3899
|
+
}
|
|
3900
|
+
/** List every import configuration of the tenant. */
|
|
3901
|
+
async listConfigs(auth2 = SERVICE23) {
|
|
3902
|
+
return this.ctx.http.request({
|
|
3903
|
+
method: "GET",
|
|
3904
|
+
path: `${this.base()}/configs`,
|
|
3905
|
+
auth: auth2
|
|
3906
|
+
});
|
|
3907
|
+
}
|
|
3908
|
+
/** Fetch one configuration by id. */
|
|
3909
|
+
async getConfig(id, auth2 = SERVICE23) {
|
|
3910
|
+
return this.ctx.http.request({
|
|
3911
|
+
method: "GET",
|
|
3912
|
+
path: `${this.base()}/configs/${encodeURIComponent(id)}`,
|
|
3913
|
+
auth: auth2
|
|
3914
|
+
});
|
|
3915
|
+
}
|
|
3916
|
+
/** List the streams of one configuration. */
|
|
3917
|
+
async listStreams(configId, auth2 = SERVICE23) {
|
|
3918
|
+
return this.ctx.http.request({
|
|
3919
|
+
method: "GET",
|
|
3920
|
+
path: `${this.base()}/configs/${encodeURIComponent(configId)}/streams`,
|
|
3921
|
+
auth: auth2
|
|
3922
|
+
});
|
|
3923
|
+
}
|
|
3924
|
+
/** Fetch one stream by id. */
|
|
3925
|
+
async getStream(id, auth2 = SERVICE23) {
|
|
3926
|
+
return this.ctx.http.request({
|
|
3927
|
+
method: "GET",
|
|
3928
|
+
path: `${this.base()}/streams/${encodeURIComponent(id)}`,
|
|
3929
|
+
auth: auth2
|
|
3930
|
+
});
|
|
3931
|
+
}
|
|
3932
|
+
/**
|
|
3933
|
+
* Fetch a configuration's schedule. Resolves to `null` when none is
|
|
3934
|
+
* configured — the service answers `204`, not `404`, so an absent schedule is
|
|
3935
|
+
* a normal result rather than an error.
|
|
3936
|
+
*/
|
|
3937
|
+
async getSchedule(configId, auth2 = SERVICE23) {
|
|
3938
|
+
const res = await this.ctx.http.request({
|
|
3939
|
+
method: "GET",
|
|
3940
|
+
path: `${this.base()}/configs/${encodeURIComponent(configId)}/schedule`,
|
|
3941
|
+
auth: auth2
|
|
3942
|
+
});
|
|
3943
|
+
return res ?? null;
|
|
3944
|
+
}
|
|
3945
|
+
/** Create or replace a configuration's schedule. */
|
|
3946
|
+
async setSchedule(configId, input, auth2 = SERVICE23) {
|
|
3947
|
+
return this.ctx.http.request({
|
|
3948
|
+
method: "PUT",
|
|
3949
|
+
path: `${this.base()}/configs/${encodeURIComponent(configId)}/schedule`,
|
|
3950
|
+
body: input,
|
|
3951
|
+
auth: auth2
|
|
3952
|
+
});
|
|
3953
|
+
}
|
|
3954
|
+
/**
|
|
3955
|
+
* Trigger a run. `mode` defaults to `DELTA` server-side; `dryRun: true` maps
|
|
3956
|
+
* and validates without writing to the target.
|
|
3957
|
+
*
|
|
3958
|
+
* Not retried on a 5xx: a POST that timed out may already have queued a run.
|
|
3959
|
+
*/
|
|
3960
|
+
async triggerRun(configId, input = {}, auth2 = SERVICE23) {
|
|
3961
|
+
return this.ctx.http.request({
|
|
3962
|
+
method: "POST",
|
|
3963
|
+
path: `${this.base()}/configs/${encodeURIComponent(configId)}/runs`,
|
|
3964
|
+
body: input,
|
|
3965
|
+
auth: auth2
|
|
3966
|
+
});
|
|
3967
|
+
}
|
|
3968
|
+
/** List a configuration's runs, newest first. */
|
|
3969
|
+
async listRuns(configId, opts = {}, auth2 = SERVICE23) {
|
|
3970
|
+
const args = pageArgs(opts);
|
|
3971
|
+
const wire = await this.ctx.http.request({
|
|
3972
|
+
method: "GET",
|
|
3973
|
+
path: `${this.base()}/configs/${encodeURIComponent(configId)}/runs`,
|
|
3974
|
+
query: { page: args.pageNumber - 1, size: args.pageSize },
|
|
3975
|
+
auth: auth2
|
|
3976
|
+
});
|
|
3977
|
+
return toPage(wire, args);
|
|
3978
|
+
}
|
|
3979
|
+
/** Fetch one run with its per-stream progress. */
|
|
3980
|
+
async getRun(runId, auth2 = SERVICE23) {
|
|
3981
|
+
return this.ctx.http.request({
|
|
3982
|
+
method: "GET",
|
|
3983
|
+
path: `${this.base()}/runs/${encodeURIComponent(runId)}`,
|
|
3984
|
+
auth: auth2
|
|
3985
|
+
});
|
|
3986
|
+
}
|
|
3987
|
+
/**
|
|
3988
|
+
* Stream a run's progress as Server-Sent Events: an initial `snapshot`, then a
|
|
3989
|
+
* `stream` event per processed batch, then a final `run` event when the run
|
|
3990
|
+
* finishes. The iterator ends when the service closes the stream; breaking out
|
|
3991
|
+
* of the `for await` aborts the request.
|
|
3992
|
+
*
|
|
3993
|
+
* Two ways this differs from every other method here. It does not re-auth: a
|
|
3994
|
+
* `401` while opening the stream throws instead of minting a fresh token and
|
|
3995
|
+
* retrying once, so a long-lived consumer should be ready to re-open (or fall
|
|
3996
|
+
* back to polling {@link getRun}). And frames this SDK version cannot read
|
|
3997
|
+
* arrive as `{ type: "unknown" }` rather than throwing — see
|
|
3998
|
+
* {@link ImportRunEvent}.
|
|
3999
|
+
*/
|
|
4000
|
+
async *streamRun(runId, auth2 = SERVICE23) {
|
|
4001
|
+
const frames = this.ctx.http.requestStream({
|
|
4002
|
+
method: "GET",
|
|
4003
|
+
path: `${this.base()}/runs/${encodeURIComponent(runId)}/events`,
|
|
4004
|
+
auth: auth2
|
|
4005
|
+
});
|
|
4006
|
+
for await (const frame of frames) yield toRunEvent(frame);
|
|
4007
|
+
}
|
|
4008
|
+
/**
|
|
4009
|
+
* Request cancellation of a run. `force: true` hard-stops it immediately;
|
|
4010
|
+
* without it the run stops at the next safe point. The service answers `202`
|
|
4011
|
+
* with `accepted: false` when the run is unknown or already finished — that is
|
|
4012
|
+
* a result, not an error. A state conflict may instead come back as a `409`,
|
|
4013
|
+
* which does throw.
|
|
4014
|
+
*/
|
|
4015
|
+
async cancelRun(runId, opts = {}, auth2 = SERVICE23) {
|
|
4016
|
+
const query = {};
|
|
4017
|
+
if (opts.force) query.force = "true";
|
|
4018
|
+
return this.ctx.http.request({
|
|
4019
|
+
method: "POST",
|
|
4020
|
+
path: `${this.base()}/runs/${encodeURIComponent(runId)}/cancel`,
|
|
4021
|
+
query,
|
|
4022
|
+
auth: auth2
|
|
4023
|
+
});
|
|
4024
|
+
}
|
|
4025
|
+
/** List the errors recorded during a run. */
|
|
4026
|
+
async listRunErrors(runId, opts = {}, auth2 = SERVICE23) {
|
|
4027
|
+
const args = pageArgs(opts);
|
|
4028
|
+
const wire = await this.ctx.http.request({
|
|
4029
|
+
method: "GET",
|
|
4030
|
+
path: `${this.base()}/runs/${encodeURIComponent(runId)}/errors`,
|
|
4031
|
+
query: { page: args.pageNumber - 1, size: args.pageSize },
|
|
4032
|
+
auth: auth2
|
|
4033
|
+
});
|
|
4034
|
+
return toPage(wire, args);
|
|
4035
|
+
}
|
|
4036
|
+
/** List the target types that hold imported records — the valid `type` values for {@link searchRecords}. */
|
|
4037
|
+
async listDataTypes(auth2 = SERVICE23) {
|
|
4038
|
+
return this.ctx.http.request({
|
|
4039
|
+
method: "GET",
|
|
4040
|
+
path: `${this.base()}/data/types`,
|
|
4041
|
+
auth: auth2
|
|
4042
|
+
});
|
|
4043
|
+
}
|
|
4044
|
+
/** Search imported records of one target type. */
|
|
4045
|
+
async searchRecords(opts, auth2 = SERVICE23) {
|
|
4046
|
+
const args = pageArgs(opts);
|
|
4047
|
+
const query = {
|
|
4048
|
+
type: opts.type,
|
|
4049
|
+
page: args.pageNumber - 1,
|
|
4050
|
+
size: args.pageSize
|
|
4051
|
+
};
|
|
4052
|
+
if (opts.search !== void 0) query.search = opts.search;
|
|
4053
|
+
if (opts.outcome !== void 0) query.outcome = opts.outcome;
|
|
4054
|
+
const wire = await this.ctx.http.request({
|
|
4055
|
+
method: "GET",
|
|
4056
|
+
path: `${this.base()}/data/records`,
|
|
4057
|
+
query,
|
|
4058
|
+
auth: auth2
|
|
4059
|
+
});
|
|
4060
|
+
return toPage(wire, args);
|
|
4061
|
+
}
|
|
4062
|
+
/** Search the imported records produced by one stream. */
|
|
4063
|
+
async searchStreamRecords(streamId, opts = {}, auth2 = SERVICE23) {
|
|
4064
|
+
const args = pageArgs(opts);
|
|
4065
|
+
const query = {
|
|
4066
|
+
page: args.pageNumber - 1,
|
|
4067
|
+
size: args.pageSize
|
|
4068
|
+
};
|
|
4069
|
+
if (opts.search !== void 0) query.search = opts.search;
|
|
4070
|
+
if (opts.outcome !== void 0) query.outcome = opts.outcome;
|
|
4071
|
+
const wire = await this.ctx.http.request({
|
|
4072
|
+
method: "GET",
|
|
4073
|
+
path: `${this.base()}/data/streams/${encodeURIComponent(streamId)}/records`,
|
|
4074
|
+
query,
|
|
4075
|
+
auth: auth2
|
|
4076
|
+
});
|
|
4077
|
+
return toPage(wire, args);
|
|
4078
|
+
}
|
|
4079
|
+
};
|
|
4080
|
+
|
|
4081
|
+
// src/services/unit-handling.ts
|
|
4082
|
+
var SERVICE24 = { kind: "service" };
|
|
3852
4083
|
var UnitHandlingService = class {
|
|
3853
4084
|
constructor(ctx) {
|
|
3854
4085
|
this.ctx = ctx;
|
|
@@ -3859,7 +4090,7 @@ var UnitHandlingService = class {
|
|
|
3859
4090
|
return `/unit-handling/${this.ctx.tenant}`;
|
|
3860
4091
|
}
|
|
3861
4092
|
/** Find units (filter/sort/page). */
|
|
3862
|
-
async listUnits(query = {}, auth2 =
|
|
4093
|
+
async listUnits(query = {}, auth2 = SERVICE24) {
|
|
3863
4094
|
return this.ctx.http.request({
|
|
3864
4095
|
method: "GET",
|
|
3865
4096
|
path: `${this.base()}/units`,
|
|
@@ -3868,7 +4099,7 @@ var UnitHandlingService = class {
|
|
|
3868
4099
|
});
|
|
3869
4100
|
}
|
|
3870
4101
|
/** Retrieve a unit by code. */
|
|
3871
|
-
async getUnit(unitCode, auth2 =
|
|
4102
|
+
async getUnit(unitCode, auth2 = SERVICE24) {
|
|
3872
4103
|
return this.ctx.http.request({
|
|
3873
4104
|
method: "GET",
|
|
3874
4105
|
path: `${this.base()}/units/${encodeURIComponent(unitCode)}`,
|
|
@@ -3876,11 +4107,11 @@ var UnitHandlingService = class {
|
|
|
3876
4107
|
});
|
|
3877
4108
|
}
|
|
3878
4109
|
/** Add a new unit. */
|
|
3879
|
-
async createUnit(input, auth2 =
|
|
4110
|
+
async createUnit(input, auth2 = SERVICE24) {
|
|
3880
4111
|
return this.ctx.http.request({ method: "POST", path: `${this.base()}/units`, auth: auth2, body: input });
|
|
3881
4112
|
}
|
|
3882
4113
|
/** Update a unit by code. */
|
|
3883
|
-
async updateUnit(unitCode, input, auth2 =
|
|
4114
|
+
async updateUnit(unitCode, input, auth2 = SERVICE24) {
|
|
3884
4115
|
await this.ctx.http.request({
|
|
3885
4116
|
method: "PUT",
|
|
3886
4117
|
path: `${this.base()}/units/${encodeURIComponent(unitCode)}`,
|
|
@@ -3889,7 +4120,7 @@ var UnitHandlingService = class {
|
|
|
3889
4120
|
});
|
|
3890
4121
|
}
|
|
3891
4122
|
/** Delete a unit by code. */
|
|
3892
|
-
async deleteUnit(unitCode, auth2 =
|
|
4123
|
+
async deleteUnit(unitCode, auth2 = SERVICE24) {
|
|
3893
4124
|
await this.ctx.http.request({
|
|
3894
4125
|
method: "DELETE",
|
|
3895
4126
|
path: `${this.base()}/units/${encodeURIComponent(unitCode)}`,
|
|
@@ -3897,7 +4128,7 @@ var UnitHandlingService = class {
|
|
|
3897
4128
|
});
|
|
3898
4129
|
}
|
|
3899
4130
|
/** Delete multiple units by code (bulk). The codes are sent as the request body. */
|
|
3900
|
-
async deleteUnits(codes, auth2 =
|
|
4131
|
+
async deleteUnits(codes, auth2 = SERVICE24) {
|
|
3901
4132
|
await this.ctx.http.request({
|
|
3902
4133
|
method: "DELETE",
|
|
3903
4134
|
path: `${this.base()}/units`,
|
|
@@ -3906,7 +4137,7 @@ var UnitHandlingService = class {
|
|
|
3906
4137
|
});
|
|
3907
4138
|
}
|
|
3908
4139
|
/** Fetch a conversion factor (`PUT /units/conversion-factor-commands`). */
|
|
3909
|
-
async getConversionFactor(input, auth2 =
|
|
4140
|
+
async getConversionFactor(input, auth2 = SERVICE24) {
|
|
3910
4141
|
return this.ctx.http.request({
|
|
3911
4142
|
method: "PUT",
|
|
3912
4143
|
path: `${this.base()}/units/conversion-factor-commands`,
|
|
@@ -3915,7 +4146,7 @@ var UnitHandlingService = class {
|
|
|
3915
4146
|
});
|
|
3916
4147
|
}
|
|
3917
4148
|
/** Convert a value between units (`PUT /units/convert-unit-commands`). */
|
|
3918
|
-
async convertUnit(input, auth2 =
|
|
4149
|
+
async convertUnit(input, auth2 = SERVICE24) {
|
|
3919
4150
|
return this.ctx.http.request({
|
|
3920
4151
|
method: "PUT",
|
|
3921
4152
|
path: `${this.base()}/units/convert-unit-commands`,
|
|
@@ -3924,13 +4155,13 @@ var UnitHandlingService = class {
|
|
|
3924
4155
|
});
|
|
3925
4156
|
}
|
|
3926
4157
|
/** List all unit types. */
|
|
3927
|
-
async listUnitTypes(auth2 =
|
|
4158
|
+
async listUnitTypes(auth2 = SERVICE24) {
|
|
3928
4159
|
return this.ctx.http.request({ method: "GET", path: `${this.base()}/types`, auth: auth2 });
|
|
3929
4160
|
}
|
|
3930
4161
|
};
|
|
3931
4162
|
|
|
3932
4163
|
// src/services/catalog.ts
|
|
3933
|
-
var
|
|
4164
|
+
var SERVICE25 = { kind: "service" };
|
|
3934
4165
|
var CatalogService = class {
|
|
3935
4166
|
constructor(ctx) {
|
|
3936
4167
|
this.ctx = ctx;
|
|
@@ -3941,7 +4172,7 @@ var CatalogService = class {
|
|
|
3941
4172
|
return `/catalog/${this.ctx.tenant}/catalogs`;
|
|
3942
4173
|
}
|
|
3943
4174
|
/** List catalogs (filtered/sorted). */
|
|
3944
|
-
async listCatalogs(query = {}, auth2 =
|
|
4175
|
+
async listCatalogs(query = {}, auth2 = SERVICE25) {
|
|
3945
4176
|
return this.ctx.http.request({
|
|
3946
4177
|
method: "GET",
|
|
3947
4178
|
path: this.base(),
|
|
@@ -3950,7 +4181,7 @@ var CatalogService = class {
|
|
|
3950
4181
|
});
|
|
3951
4182
|
}
|
|
3952
4183
|
/** Retrieve a catalog by id. */
|
|
3953
|
-
async getCatalog(catalogId, auth2 =
|
|
4184
|
+
async getCatalog(catalogId, auth2 = SERVICE25) {
|
|
3954
4185
|
return this.ctx.http.request({
|
|
3955
4186
|
method: "GET",
|
|
3956
4187
|
path: `${this.base()}/${encodeURIComponent(catalogId)}`,
|
|
@@ -3958,7 +4189,7 @@ var CatalogService = class {
|
|
|
3958
4189
|
});
|
|
3959
4190
|
}
|
|
3960
4191
|
/** Retrieve all catalogs that contain a category. */
|
|
3961
|
-
async getCatalogsForCategory(categoryId, auth2 =
|
|
4192
|
+
async getCatalogsForCategory(categoryId, auth2 = SERVICE25) {
|
|
3962
4193
|
return this.ctx.http.request({
|
|
3963
4194
|
method: "GET",
|
|
3964
4195
|
path: `${this.base()}/categories/${encodeURIComponent(categoryId)}`,
|
|
@@ -3966,11 +4197,11 @@ var CatalogService = class {
|
|
|
3966
4197
|
});
|
|
3967
4198
|
}
|
|
3968
4199
|
/** Create a catalog. */
|
|
3969
|
-
async createCatalog(input, auth2 =
|
|
4200
|
+
async createCatalog(input, auth2 = SERVICE25) {
|
|
3970
4201
|
return this.ctx.http.request({ method: "POST", path: this.base(), auth: auth2, body: input });
|
|
3971
4202
|
}
|
|
3972
4203
|
/** Upsert a catalog by id (`PUT`). */
|
|
3973
|
-
async updateCatalog(catalogId, input, auth2 =
|
|
4204
|
+
async updateCatalog(catalogId, input, auth2 = SERVICE25) {
|
|
3974
4205
|
return this.ctx.http.request({
|
|
3975
4206
|
method: "PUT",
|
|
3976
4207
|
path: `${this.base()}/${encodeURIComponent(catalogId)}`,
|
|
@@ -3979,7 +4210,7 @@ var CatalogService = class {
|
|
|
3979
4210
|
});
|
|
3980
4211
|
}
|
|
3981
4212
|
/** Partially update a catalog by id (`PATCH`). */
|
|
3982
|
-
async patchCatalog(catalogId, patch, auth2 =
|
|
4213
|
+
async patchCatalog(catalogId, patch, auth2 = SERVICE25) {
|
|
3983
4214
|
await this.ctx.http.request({
|
|
3984
4215
|
method: "PATCH",
|
|
3985
4216
|
path: `${this.base()}/${encodeURIComponent(catalogId)}`,
|
|
@@ -3988,7 +4219,7 @@ var CatalogService = class {
|
|
|
3988
4219
|
});
|
|
3989
4220
|
}
|
|
3990
4221
|
/** Remove a catalog by id. */
|
|
3991
|
-
async deleteCatalog(catalogId, auth2 =
|
|
4222
|
+
async deleteCatalog(catalogId, auth2 = SERVICE25) {
|
|
3992
4223
|
await this.ctx.http.request({
|
|
3993
4224
|
method: "DELETE",
|
|
3994
4225
|
path: `${this.base()}/${encodeURIComponent(catalogId)}`,
|
|
@@ -3998,7 +4229,7 @@ var CatalogService = class {
|
|
|
3998
4229
|
};
|
|
3999
4230
|
|
|
4000
4231
|
// src/services/vendor.ts
|
|
4001
|
-
var
|
|
4232
|
+
var SERVICE26 = { kind: "service" };
|
|
4002
4233
|
var VendorService = class {
|
|
4003
4234
|
constructor(ctx) {
|
|
4004
4235
|
this.ctx = ctx;
|
|
@@ -4010,7 +4241,7 @@ var VendorService = class {
|
|
|
4010
4241
|
}
|
|
4011
4242
|
// --- Vendors ---
|
|
4012
4243
|
/** List all vendors. */
|
|
4013
|
-
async listVendors(query = {}, auth2 =
|
|
4244
|
+
async listVendors(query = {}, auth2 = SERVICE26) {
|
|
4014
4245
|
return this.ctx.http.request({
|
|
4015
4246
|
method: "GET",
|
|
4016
4247
|
path: `${this.base()}/vendors`,
|
|
@@ -4019,7 +4250,7 @@ var VendorService = class {
|
|
|
4019
4250
|
});
|
|
4020
4251
|
}
|
|
4021
4252
|
/** Retrieve a vendor by id. */
|
|
4022
|
-
async getVendor(vendorId, auth2 =
|
|
4253
|
+
async getVendor(vendorId, auth2 = SERVICE26) {
|
|
4023
4254
|
return this.ctx.http.request({
|
|
4024
4255
|
method: "GET",
|
|
4025
4256
|
path: `${this.base()}/vendors/${encodeURIComponent(vendorId)}`,
|
|
@@ -4027,7 +4258,7 @@ var VendorService = class {
|
|
|
4027
4258
|
});
|
|
4028
4259
|
}
|
|
4029
4260
|
/** Search vendors (`POST /vendors/search`). A built filter in `q` is resolved to a string. */
|
|
4030
|
-
async searchVendors(query, auth2 =
|
|
4261
|
+
async searchVendors(query, auth2 = SERVICE26) {
|
|
4031
4262
|
const body = query.q !== void 0 ? { ...query, q: resolveQuery(query.q, { compoundLogicalQuery: false }) } : query;
|
|
4032
4263
|
return this.ctx.http.request({
|
|
4033
4264
|
method: "POST",
|
|
@@ -4037,11 +4268,11 @@ var VendorService = class {
|
|
|
4037
4268
|
});
|
|
4038
4269
|
}
|
|
4039
4270
|
/** Create a vendor. */
|
|
4040
|
-
async createVendor(input, auth2 =
|
|
4271
|
+
async createVendor(input, auth2 = SERVICE26) {
|
|
4041
4272
|
return this.ctx.http.request({ method: "POST", path: `${this.base()}/vendors`, auth: auth2, body: input });
|
|
4042
4273
|
}
|
|
4043
4274
|
/** Upsert a vendor by id (`PUT`). */
|
|
4044
|
-
async updateVendor(vendorId, input, auth2 =
|
|
4275
|
+
async updateVendor(vendorId, input, auth2 = SERVICE26) {
|
|
4045
4276
|
await this.ctx.http.request({
|
|
4046
4277
|
method: "PUT",
|
|
4047
4278
|
path: `${this.base()}/vendors/${encodeURIComponent(vendorId)}`,
|
|
@@ -4050,7 +4281,7 @@ var VendorService = class {
|
|
|
4050
4281
|
});
|
|
4051
4282
|
}
|
|
4052
4283
|
/** Delete a vendor by id. */
|
|
4053
|
-
async deleteVendor(vendorId, auth2 =
|
|
4284
|
+
async deleteVendor(vendorId, auth2 = SERVICE26) {
|
|
4054
4285
|
await this.ctx.http.request({
|
|
4055
4286
|
method: "DELETE",
|
|
4056
4287
|
path: `${this.base()}/vendors/${encodeURIComponent(vendorId)}`,
|
|
@@ -4059,7 +4290,7 @@ var VendorService = class {
|
|
|
4059
4290
|
}
|
|
4060
4291
|
// --- Vendor locations ---
|
|
4061
4292
|
/** List all vendor locations. */
|
|
4062
|
-
async listVendorLocations(query = {}, auth2 =
|
|
4293
|
+
async listVendorLocations(query = {}, auth2 = SERVICE26) {
|
|
4063
4294
|
return this.ctx.http.request({
|
|
4064
4295
|
method: "GET",
|
|
4065
4296
|
path: `${this.base()}/locations`,
|
|
@@ -4068,7 +4299,7 @@ var VendorService = class {
|
|
|
4068
4299
|
});
|
|
4069
4300
|
}
|
|
4070
4301
|
/** Retrieve a vendor location by id. */
|
|
4071
|
-
async getVendorLocation(locationId, auth2 =
|
|
4302
|
+
async getVendorLocation(locationId, auth2 = SERVICE26) {
|
|
4072
4303
|
return this.ctx.http.request({
|
|
4073
4304
|
method: "GET",
|
|
4074
4305
|
path: `${this.base()}/locations/${encodeURIComponent(locationId)}`,
|
|
@@ -4076,11 +4307,11 @@ var VendorService = class {
|
|
|
4076
4307
|
});
|
|
4077
4308
|
}
|
|
4078
4309
|
/** Create a vendor location. */
|
|
4079
|
-
async createVendorLocation(input, auth2 =
|
|
4310
|
+
async createVendorLocation(input, auth2 = SERVICE26) {
|
|
4080
4311
|
return this.ctx.http.request({ method: "POST", path: `${this.base()}/locations`, auth: auth2, body: input });
|
|
4081
4312
|
}
|
|
4082
4313
|
/** Upsert a vendor location by id (`PUT`). */
|
|
4083
|
-
async updateVendorLocation(locationId, input, auth2 =
|
|
4314
|
+
async updateVendorLocation(locationId, input, auth2 = SERVICE26) {
|
|
4084
4315
|
await this.ctx.http.request({
|
|
4085
4316
|
method: "PUT",
|
|
4086
4317
|
path: `${this.base()}/locations/${encodeURIComponent(locationId)}`,
|
|
@@ -4089,7 +4320,7 @@ var VendorService = class {
|
|
|
4089
4320
|
});
|
|
4090
4321
|
}
|
|
4091
4322
|
/** Delete a vendor location by id. */
|
|
4092
|
-
async deleteVendorLocation(locationId, auth2 =
|
|
4323
|
+
async deleteVendorLocation(locationId, auth2 = SERVICE26) {
|
|
4093
4324
|
await this.ctx.http.request({
|
|
4094
4325
|
method: "DELETE",
|
|
4095
4326
|
path: `${this.base()}/locations/${encodeURIComponent(locationId)}`,
|
|
@@ -4099,7 +4330,7 @@ var VendorService = class {
|
|
|
4099
4330
|
};
|
|
4100
4331
|
|
|
4101
4332
|
// src/services/pick-pack.ts
|
|
4102
|
-
var
|
|
4333
|
+
var SERVICE27 = { kind: "service" };
|
|
4103
4334
|
var PickPackService = class {
|
|
4104
4335
|
constructor(ctx) {
|
|
4105
4336
|
this.ctx = ctx;
|
|
@@ -4113,7 +4344,7 @@ var PickPackService = class {
|
|
|
4113
4344
|
return `${this.base()}/orders/${encodeURIComponent(orderId)}`;
|
|
4114
4345
|
}
|
|
4115
4346
|
/** List packlist orders. */
|
|
4116
|
-
async listOrders(query = {}, auth2 =
|
|
4347
|
+
async listOrders(query = {}, auth2 = SERVICE27) {
|
|
4117
4348
|
return this.ctx.http.request({
|
|
4118
4349
|
method: "GET",
|
|
4119
4350
|
path: `${this.base()}/orders`,
|
|
@@ -4122,19 +4353,19 @@ var PickPackService = class {
|
|
|
4122
4353
|
});
|
|
4123
4354
|
}
|
|
4124
4355
|
/** Retrieve a packlist order by id. */
|
|
4125
|
-
async getOrder(orderId, auth2 =
|
|
4356
|
+
async getOrder(orderId, auth2 = SERVICE27) {
|
|
4126
4357
|
return this.ctx.http.request({ method: "GET", path: this.orderPath(orderId), auth: auth2 });
|
|
4127
4358
|
}
|
|
4128
4359
|
/** Update an order's status (`PATCH`). Returns an acknowledgement. */
|
|
4129
|
-
async updateOrder(orderId, change, auth2 =
|
|
4360
|
+
async updateOrder(orderId, change, auth2 = SERVICE27) {
|
|
4130
4361
|
return this.ctx.http.request({ method: "PATCH", path: this.orderPath(orderId), auth: auth2, body: change });
|
|
4131
4362
|
}
|
|
4132
4363
|
/** Finish an order. Returns an acknowledgement. */
|
|
4133
|
-
async finishOrder(orderId, auth2 =
|
|
4364
|
+
async finishOrder(orderId, auth2 = SERVICE27) {
|
|
4134
4365
|
return this.ctx.http.request({ method: "POST", path: `${this.orderPath(orderId)}/finish`, auth: auth2 });
|
|
4135
4366
|
}
|
|
4136
4367
|
/** List order cycles (ids). */
|
|
4137
|
-
async listOrderCycles(query = {}, auth2 =
|
|
4368
|
+
async listOrderCycles(query = {}, auth2 = SERVICE27) {
|
|
4138
4369
|
return this.ctx.http.request({
|
|
4139
4370
|
method: "GET",
|
|
4140
4371
|
path: `${this.base()}/orderCycles`,
|
|
@@ -4143,11 +4374,11 @@ var PickPackService = class {
|
|
|
4143
4374
|
});
|
|
4144
4375
|
}
|
|
4145
4376
|
/** Add an assignee to an order. Returns an acknowledgement. */
|
|
4146
|
-
async addAssignee(orderId, assignee, auth2 =
|
|
4377
|
+
async addAssignee(orderId, assignee, auth2 = SERVICE27) {
|
|
4147
4378
|
return this.ctx.http.request({ method: "POST", path: `${this.orderPath(orderId)}/assignees`, auth: auth2, body: assignee });
|
|
4148
4379
|
}
|
|
4149
4380
|
/** Remove an assignee from an order. */
|
|
4150
|
-
async removeAssignee(orderId, assigneeId, auth2 =
|
|
4381
|
+
async removeAssignee(orderId, assigneeId, auth2 = SERVICE27) {
|
|
4151
4382
|
await this.ctx.http.request({
|
|
4152
4383
|
method: "DELETE",
|
|
4153
4384
|
path: `${this.orderPath(orderId)}/assignees/${encodeURIComponent(assigneeId)}`,
|
|
@@ -4155,15 +4386,15 @@ var PickPackService = class {
|
|
|
4155
4386
|
});
|
|
4156
4387
|
}
|
|
4157
4388
|
/** Update packaging products for an order (`PUT`). Returns an acknowledgement. */
|
|
4158
|
-
async updatePackaging(orderId, change, auth2 =
|
|
4389
|
+
async updatePackaging(orderId, change, auth2 = SERVICE27) {
|
|
4159
4390
|
return this.ctx.http.request({ method: "PUT", path: `${this.orderPath(orderId)}/packaging`, auth: auth2, body: change });
|
|
4160
4391
|
}
|
|
4161
4392
|
/** Create a packing event. Returns an acknowledgement. */
|
|
4162
|
-
async createEvent(event, auth2 =
|
|
4393
|
+
async createEvent(event, auth2 = SERVICE27) {
|
|
4163
4394
|
return this.ctx.http.request({ method: "POST", path: `${this.base()}/events`, auth: auth2, body: event });
|
|
4164
4395
|
}
|
|
4165
4396
|
/** List packing events. */
|
|
4166
|
-
async listEvents(query = {}, auth2 =
|
|
4397
|
+
async listEvents(query = {}, auth2 = SERVICE27) {
|
|
4167
4398
|
return this.ctx.http.request({
|
|
4168
4399
|
method: "GET",
|
|
4169
4400
|
path: `${this.base()}/events`,
|
|
@@ -4172,7 +4403,7 @@ var PickPackService = class {
|
|
|
4172
4403
|
});
|
|
4173
4404
|
}
|
|
4174
4405
|
/** Trigger an order recalculation. Returns the created job's id. */
|
|
4175
|
-
async triggerRecalculation(input, auth2 =
|
|
4406
|
+
async triggerRecalculation(input, auth2 = SERVICE27) {
|
|
4176
4407
|
return this.ctx.http.request({
|
|
4177
4408
|
method: "POST",
|
|
4178
4409
|
path: `${this.base()}/jobs/recalculations`,
|
|
@@ -4181,7 +4412,7 @@ var PickPackService = class {
|
|
|
4181
4412
|
});
|
|
4182
4413
|
}
|
|
4183
4414
|
/** Retrieve a recalculation job by id. */
|
|
4184
|
-
async getRecalculationJob(jobId, auth2 =
|
|
4415
|
+
async getRecalculationJob(jobId, auth2 = SERVICE27) {
|
|
4185
4416
|
return this.ctx.http.request({
|
|
4186
4417
|
method: "GET",
|
|
4187
4418
|
path: `${this.base()}/jobs/recalculations/${encodeURIComponent(jobId)}`,
|
|
@@ -4191,7 +4422,7 @@ var PickPackService = class {
|
|
|
4191
4422
|
};
|
|
4192
4423
|
|
|
4193
4424
|
// src/services/customer-admin.ts
|
|
4194
|
-
var
|
|
4425
|
+
var SERVICE28 = { kind: "service" };
|
|
4195
4426
|
var CustomerAdminService = class {
|
|
4196
4427
|
constructor(ctx) {
|
|
4197
4428
|
this.ctx = ctx;
|
|
@@ -4209,7 +4440,7 @@ var CustomerAdminService = class {
|
|
|
4209
4440
|
}
|
|
4210
4441
|
// --- Customers ---
|
|
4211
4442
|
/** List customers. */
|
|
4212
|
-
async listCustomers(query = {}, auth2 =
|
|
4443
|
+
async listCustomers(query = {}, auth2 = SERVICE28) {
|
|
4213
4444
|
return this.ctx.http.request({
|
|
4214
4445
|
method: "GET",
|
|
4215
4446
|
path: this.base(),
|
|
@@ -4218,33 +4449,33 @@ var CustomerAdminService = class {
|
|
|
4218
4449
|
});
|
|
4219
4450
|
}
|
|
4220
4451
|
/** Search customers (`POST /customers/search`). A built filter in `q` is resolved to a string. */
|
|
4221
|
-
async searchCustomers(query, auth2 =
|
|
4452
|
+
async searchCustomers(query, auth2 = SERVICE28) {
|
|
4222
4453
|
const body = query.q !== void 0 ? { ...query, q: resolveQuery(query.q, { compoundLogicalQuery: false }) } : query;
|
|
4223
4454
|
return this.ctx.http.request({ method: "POST", path: `${this.base()}/search`, auth: auth2, body });
|
|
4224
4455
|
}
|
|
4225
4456
|
/** Retrieve a customer profile by number. */
|
|
4226
|
-
async getCustomer(customerNumber, auth2 =
|
|
4457
|
+
async getCustomer(customerNumber, auth2 = SERVICE28) {
|
|
4227
4458
|
return this.ctx.http.request({ method: "GET", path: this.customerPath(customerNumber), auth: auth2 });
|
|
4228
4459
|
}
|
|
4229
4460
|
/** Create a customer. */
|
|
4230
|
-
async createCustomer(input, auth2 =
|
|
4461
|
+
async createCustomer(input, auth2 = SERVICE28) {
|
|
4231
4462
|
return this.ctx.http.request({ method: "POST", path: this.base(), auth: auth2, body: input });
|
|
4232
4463
|
}
|
|
4233
4464
|
/** Upsert a customer profile by number (`PUT`). */
|
|
4234
|
-
async upsertCustomer(customerNumber, input, auth2 =
|
|
4465
|
+
async upsertCustomer(customerNumber, input, auth2 = SERVICE28) {
|
|
4235
4466
|
return this.ctx.http.request({ method: "PUT", path: this.customerPath(customerNumber), auth: auth2, body: input });
|
|
4236
4467
|
}
|
|
4237
4468
|
/** Partially update a customer profile (`PATCH`). */
|
|
4238
|
-
async patchCustomer(customerNumber, patch, auth2 =
|
|
4469
|
+
async patchCustomer(customerNumber, patch, auth2 = SERVICE28) {
|
|
4239
4470
|
await this.ctx.http.request({ method: "PATCH", path: this.customerPath(customerNumber), auth: auth2, body: patch });
|
|
4240
4471
|
}
|
|
4241
4472
|
/** Delete a customer profile. */
|
|
4242
|
-
async deleteCustomer(customerNumber, auth2 =
|
|
4473
|
+
async deleteCustomer(customerNumber, auth2 = SERVICE28) {
|
|
4243
4474
|
await this.ctx.http.request({ method: "DELETE", path: this.customerPath(customerNumber), auth: auth2 });
|
|
4244
4475
|
}
|
|
4245
4476
|
// --- Addresses ---
|
|
4246
4477
|
/** List a customer's addresses. */
|
|
4247
|
-
async listAddresses(customerNumber, auth2 =
|
|
4478
|
+
async listAddresses(customerNumber, auth2 = SERVICE28) {
|
|
4248
4479
|
return this.ctx.http.request({
|
|
4249
4480
|
method: "GET",
|
|
4250
4481
|
path: `${this.customerPath(customerNumber)}/addresses`,
|
|
@@ -4252,11 +4483,11 @@ var CustomerAdminService = class {
|
|
|
4252
4483
|
});
|
|
4253
4484
|
}
|
|
4254
4485
|
/** Retrieve one address. */
|
|
4255
|
-
async getAddress(customerNumber, addressId, auth2 =
|
|
4486
|
+
async getAddress(customerNumber, addressId, auth2 = SERVICE28) {
|
|
4256
4487
|
return this.ctx.http.request({ method: "GET", path: this.addressPath(customerNumber, addressId), auth: auth2 });
|
|
4257
4488
|
}
|
|
4258
4489
|
/** Add an address. */
|
|
4259
|
-
async addAddress(customerNumber, input, auth2 =
|
|
4490
|
+
async addAddress(customerNumber, input, auth2 = SERVICE28) {
|
|
4260
4491
|
return this.ctx.http.request({
|
|
4261
4492
|
method: "POST",
|
|
4262
4493
|
path: `${this.customerPath(customerNumber)}/addresses`,
|
|
@@ -4265,19 +4496,19 @@ var CustomerAdminService = class {
|
|
|
4265
4496
|
});
|
|
4266
4497
|
}
|
|
4267
4498
|
/** Upsert an address by id (`PUT`). */
|
|
4268
|
-
async upsertAddress(customerNumber, addressId, input, auth2 =
|
|
4499
|
+
async upsertAddress(customerNumber, addressId, input, auth2 = SERVICE28) {
|
|
4269
4500
|
return this.ctx.http.request({ method: "PUT", path: this.addressPath(customerNumber, addressId), auth: auth2, body: input });
|
|
4270
4501
|
}
|
|
4271
4502
|
/** Partially update an address by id (`PATCH`). */
|
|
4272
|
-
async patchAddress(customerNumber, addressId, patch, auth2 =
|
|
4503
|
+
async patchAddress(customerNumber, addressId, patch, auth2 = SERVICE28) {
|
|
4273
4504
|
await this.ctx.http.request({ method: "PATCH", path: this.addressPath(customerNumber, addressId), auth: auth2, body: patch });
|
|
4274
4505
|
}
|
|
4275
4506
|
/** Delete an address by id. */
|
|
4276
|
-
async deleteAddress(customerNumber, addressId, auth2 =
|
|
4507
|
+
async deleteAddress(customerNumber, addressId, auth2 = SERVICE28) {
|
|
4277
4508
|
await this.ctx.http.request({ method: "DELETE", path: this.addressPath(customerNumber, addressId), auth: auth2 });
|
|
4278
4509
|
}
|
|
4279
4510
|
/** Add tags to an address (`?tags=` query). */
|
|
4280
|
-
async addAddressTags(customerNumber, addressId, tags, auth2 =
|
|
4511
|
+
async addAddressTags(customerNumber, addressId, tags, auth2 = SERVICE28) {
|
|
4281
4512
|
await this.ctx.http.request({
|
|
4282
4513
|
method: "POST",
|
|
4283
4514
|
path: `${this.addressPath(customerNumber, addressId)}/tags`,
|
|
@@ -4286,7 +4517,7 @@ var CustomerAdminService = class {
|
|
|
4286
4517
|
});
|
|
4287
4518
|
}
|
|
4288
4519
|
/** Remove tags from an address (`?tags=` query). */
|
|
4289
|
-
async removeAddressTags(customerNumber, addressId, tags, auth2 =
|
|
4520
|
+
async removeAddressTags(customerNumber, addressId, tags, auth2 = SERVICE28) {
|
|
4290
4521
|
await this.ctx.http.request({
|
|
4291
4522
|
method: "DELETE",
|
|
4292
4523
|
path: `${this.addressPath(customerNumber, addressId)}/tags`,
|
|
@@ -4297,7 +4528,7 @@ var CustomerAdminService = class {
|
|
|
4297
4528
|
};
|
|
4298
4529
|
|
|
4299
4530
|
// src/services/approval.ts
|
|
4300
|
-
var
|
|
4531
|
+
var SERVICE29 = { kind: "service" };
|
|
4301
4532
|
var ApprovalService = class {
|
|
4302
4533
|
constructor(ctx) {
|
|
4303
4534
|
this.ctx = ctx;
|
|
@@ -4308,7 +4539,7 @@ var ApprovalService = class {
|
|
|
4308
4539
|
return `/approval/${this.ctx.tenant}`;
|
|
4309
4540
|
}
|
|
4310
4541
|
/** List approvals (paged via `pageNumber`/`pageSize`/`sort`/`q`). Returns an array. */
|
|
4311
|
-
async listApprovals(query = {}, auth2 =
|
|
4542
|
+
async listApprovals(query = {}, auth2 = SERVICE29) {
|
|
4312
4543
|
return this.ctx.http.request({
|
|
4313
4544
|
method: "GET",
|
|
4314
4545
|
path: `${this.base()}/approvals`,
|
|
@@ -4317,7 +4548,7 @@ var ApprovalService = class {
|
|
|
4317
4548
|
});
|
|
4318
4549
|
}
|
|
4319
4550
|
/** Retrieve a single approval by id. */
|
|
4320
|
-
async getApproval(approvalId, auth2 =
|
|
4551
|
+
async getApproval(approvalId, auth2 = SERVICE29) {
|
|
4321
4552
|
return this.ctx.http.request({
|
|
4322
4553
|
method: "GET",
|
|
4323
4554
|
path: `${this.base()}/approvals/${encodeURIComponent(approvalId)}`,
|
|
@@ -4325,7 +4556,7 @@ var ApprovalService = class {
|
|
|
4325
4556
|
});
|
|
4326
4557
|
}
|
|
4327
4558
|
/** Create an approval request (cart or quote). Returns the created `{ id }`. */
|
|
4328
|
-
async createApproval(input, auth2 =
|
|
4559
|
+
async createApproval(input, auth2 = SERVICE29) {
|
|
4329
4560
|
return this.ctx.http.request({
|
|
4330
4561
|
method: "POST",
|
|
4331
4562
|
path: `${this.base()}/approvals`,
|
|
@@ -4334,7 +4565,7 @@ var ApprovalService = class {
|
|
|
4334
4565
|
});
|
|
4335
4566
|
}
|
|
4336
4567
|
/** Approve/reject/amend an approval via a JSON-Patch op-array (`PATCH`). */
|
|
4337
|
-
async updateApproval(approvalId, ops, auth2 =
|
|
4568
|
+
async updateApproval(approvalId, ops, auth2 = SERVICE29) {
|
|
4338
4569
|
await this.ctx.http.request({
|
|
4339
4570
|
method: "PATCH",
|
|
4340
4571
|
path: `${this.base()}/approvals/${encodeURIComponent(approvalId)}`,
|
|
@@ -4343,7 +4574,7 @@ var ApprovalService = class {
|
|
|
4343
4574
|
});
|
|
4344
4575
|
}
|
|
4345
4576
|
/** Delete an approval by id. */
|
|
4346
|
-
async deleteApproval(approvalId, auth2 =
|
|
4577
|
+
async deleteApproval(approvalId, auth2 = SERVICE29) {
|
|
4347
4578
|
await this.ctx.http.request({
|
|
4348
4579
|
method: "DELETE",
|
|
4349
4580
|
path: `${this.base()}/approvals/${encodeURIComponent(approvalId)}`,
|
|
@@ -4351,7 +4582,7 @@ var ApprovalService = class {
|
|
|
4351
4582
|
});
|
|
4352
4583
|
}
|
|
4353
4584
|
/** Check whether an operation on a resource is permitted / needs approval. */
|
|
4354
|
-
async checkPermitted(input, auth2 =
|
|
4585
|
+
async checkPermitted(input, auth2 = SERVICE29) {
|
|
4355
4586
|
return this.ctx.http.request({
|
|
4356
4587
|
method: "POST",
|
|
4357
4588
|
path: `${this.base()}/approval/permitted`,
|
|
@@ -4360,7 +4591,7 @@ var ApprovalService = class {
|
|
|
4360
4591
|
});
|
|
4361
4592
|
}
|
|
4362
4593
|
/** Search for users eligible to approve a resource. Returns an array. */
|
|
4363
|
-
async searchApprovers(input, auth2 =
|
|
4594
|
+
async searchApprovers(input, auth2 = SERVICE29) {
|
|
4364
4595
|
return this.ctx.http.request({
|
|
4365
4596
|
method: "POST",
|
|
4366
4597
|
path: `${this.base()}/search/users`,
|
|
@@ -4414,6 +4645,7 @@ var EmporixClient = class {
|
|
|
4414
4645
|
returns;
|
|
4415
4646
|
sepaExport;
|
|
4416
4647
|
indexing;
|
|
4648
|
+
imports;
|
|
4417
4649
|
units;
|
|
4418
4650
|
catalogs;
|
|
4419
4651
|
vendors;
|
|
@@ -4488,6 +4720,7 @@ var EmporixClient = class {
|
|
|
4488
4720
|
this.returns = new ReturnsService(mk(ReturnsService.channel));
|
|
4489
4721
|
this.sepaExport = new SepaExportService(mk(SepaExportService.channel));
|
|
4490
4722
|
this.indexing = new IndexingService(mk(IndexingService.channel));
|
|
4723
|
+
this.imports = new ImportService(mk(ImportService.channel));
|
|
4491
4724
|
this.units = new UnitHandlingService(mk(UnitHandlingService.channel));
|
|
4492
4725
|
this.catalogs = new CatalogService(mk(CatalogService.channel));
|
|
4493
4726
|
this.vendors = new VendorService(mk(VendorService.channel));
|
|
@@ -4558,6 +4791,6 @@ function productIdFromYrn(yrn) {
|
|
|
4558
4791
|
return semi >= 0 ? yrn.slice(semi + 1) : "";
|
|
4559
4792
|
}
|
|
4560
4793
|
|
|
4561
|
-
export { AiService, ApprovalService, BrandService, CatalogService, ClientConfigService, CloudFunctionsService, CountryService, CouponService, CurrencyService, CustomerAdminService, DEFAULT_HOST, EmporixClient, FeeService, HttpClient, IndexingService, InvoiceService, LEVEL, LabelService, LevelResolver, PickPackService, QuoteService, RagIndexerService, ReturnsService, RewardPointsService, SchemaService, SepaExportService, SequentialIdService, SessionContextService, ShippingService, ShoppingListService, SiteService, TaxService, TenantConfigService, UnitHandlingService, VendorService, WebhookService, createConsoleLogger, createCore, createEmporixClient, createNoopLogger, pickFee, productIdFromYrn, redact, resolveZone, validateConfig };
|
|
4794
|
+
export { AiService, ApprovalService, BrandService, CatalogService, ClientConfigService, CloudFunctionsService, CountryService, CouponService, CurrencyService, CustomerAdminService, DEFAULT_HOST, EmporixClient, FeeService, HttpClient, ImportService, IndexingService, InvoiceService, LEVEL, LabelService, LevelResolver, PickPackService, QuoteService, RagIndexerService, ReturnsService, RewardPointsService, SchemaService, SepaExportService, SequentialIdService, SessionContextService, ShippingService, ShoppingListService, SiteService, TaxService, TenantConfigService, UnitHandlingService, VendorService, WebhookService, createConsoleLogger, createCore, createEmporixClient, createNoopLogger, pickFee, productIdFromYrn, redact, resolveZone, validateConfig };
|
|
4562
4795
|
//# sourceMappingURL=index.js.map
|
|
4563
4796
|
//# sourceMappingURL=index.js.map
|