@kortexya/reasoninglayer 0.22.0 → 0.22.1
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/dist/index.cjs +19 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +63 -17
- package/dist/index.d.ts +63 -17
- package/dist/index.js +19 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7,7 +7,7 @@ var __export = (target, all) => {
|
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
// src/config.ts
|
|
10
|
-
var SDK_VERSION = "0.22.
|
|
10
|
+
var SDK_VERSION = "0.22.1";
|
|
11
11
|
function resolveConfig(config) {
|
|
12
12
|
if (!config.baseUrl) {
|
|
13
13
|
throw new Error("ClientConfig.baseUrl is required");
|
|
@@ -20698,12 +20698,29 @@ function SchedulingOptimizeResponseFromApiToFront(dto) {
|
|
|
20698
20698
|
};
|
|
20699
20699
|
}
|
|
20700
20700
|
function CreateSchedulingProblemRequestFromFrontToApi(request) {
|
|
20701
|
+
const hasInline = request.agents !== void 0;
|
|
20702
|
+
const hasRefs = request.agentIds !== void 0;
|
|
20703
|
+
if (hasInline && hasRefs) {
|
|
20704
|
+
throw new Error(
|
|
20705
|
+
"CreateSchedulingProblemRequest: supply exactly one of `agents` (inline) or `agentIds` (TermId refs), not both"
|
|
20706
|
+
);
|
|
20707
|
+
}
|
|
20708
|
+
if (!hasInline && !hasRefs) {
|
|
20709
|
+
throw new Error(
|
|
20710
|
+
"CreateSchedulingProblemRequest: must supply either `agents` (inline) or `agentIds` (TermId refs)"
|
|
20711
|
+
);
|
|
20712
|
+
}
|
|
20701
20713
|
const dto = {
|
|
20702
|
-
agents: request.agents.map(AgentSpecFromFrontToApi),
|
|
20703
20714
|
days: request.days,
|
|
20704
20715
|
shifts_per_day: request.shiftsPerDay,
|
|
20705
20716
|
demands: request.demands.map(ShiftDemandFromFrontToApi)
|
|
20706
20717
|
};
|
|
20718
|
+
if (request.agents !== void 0) {
|
|
20719
|
+
dto.agents = request.agents.map(AgentSpecFromFrontToApi);
|
|
20720
|
+
}
|
|
20721
|
+
if (request.agentIds !== void 0) {
|
|
20722
|
+
dto.agent_ids = request.agentIds;
|
|
20723
|
+
}
|
|
20707
20724
|
if (request.pins !== void 0) {
|
|
20708
20725
|
dto.pins = request.pins.map(PinFromFrontToApi);
|
|
20709
20726
|
}
|