@agentica/core 0.24.0 → 0.26.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/README.md +56 -17
- package/lib/Agentica.d.ts +2 -2
- package/lib/Agentica.js +4 -4
- package/lib/Agentica.js.map +1 -1
- package/lib/MicroAgentica.d.ts +2 -2
- package/lib/MicroAgentica.js +4 -4
- package/lib/MicroAgentica.js.map +1 -1
- package/lib/context/AgenticaContext.d.ts +2 -2
- package/lib/context/MicroAgenticaContext.d.ts +2 -2
- package/lib/context/index.d.ts +5 -0
- package/lib/{structures/mcp → context}/index.js +5 -1
- package/lib/context/index.js.map +1 -0
- package/lib/context/internal/AgenticaOperationComposer.spec.js +13 -5
- package/lib/context/internal/AgenticaOperationComposer.spec.js.map +1 -1
- package/lib/events/AgenticaAssistantMessageEvent.d.ts +9 -0
- package/lib/events/AgenticaAssistantMessageEvent.js +3 -0
- package/lib/events/AgenticaAssistantMessageEvent.js.map +1 -0
- package/lib/events/AgenticaEvent.d.ts +9 -9
- package/lib/events/AgenticaEvent.type.d.ts +1 -0
- package/lib/events/AgenticaEvent.type.js +8 -0
- package/lib/events/AgenticaEvent.type.js.map +1 -0
- package/lib/events/AgenticaUserMessageEvent.d.ts +9 -0
- package/lib/events/{AgenticaUserInputEvent.js → AgenticaUserMessageEvent.js} +1 -1
- package/lib/events/AgenticaUserMessageEvent.js.map +1 -0
- package/lib/events/MicroAgenticaEvent.d.ts +6 -6
- package/lib/events/index.d.ts +14 -0
- package/lib/events/index.js +31 -0
- package/lib/events/index.js.map +1 -0
- package/lib/factory/events.d.ts +8 -8
- package/lib/factory/events.js +23 -38
- package/lib/factory/events.js.map +1 -1
- package/lib/factory/histories.d.ts +1 -36
- package/lib/factory/histories.js +103 -22
- package/lib/factory/histories.js.map +1 -1
- package/lib/functional/assertHttpController.js +6 -6
- package/lib/functional/assertHttpLlmApplication.js +6 -6
- package/lib/functional/assertMcpController.d.ts +1 -2
- package/lib/functional/assertMcpController.js +6 -6
- package/lib/functional/assertMcpController.js.map +1 -1
- package/lib/functional/index.d.ts +6 -0
- package/lib/functional/index.js +23 -0
- package/lib/functional/index.js.map +1 -0
- package/lib/functional/validateHttpController.js +5 -5
- package/lib/functional/validateHttpLlmApplication.js +5 -5
- package/lib/functional/validateMcpController.d.ts +1 -2
- package/lib/functional/validateMcpController.js +11 -11
- package/lib/functional/validateMcpController.js.map +1 -1
- package/lib/histories/AgenticaAssistantMessageHistory.d.ts +5 -0
- package/lib/histories/AgenticaAssistantMessageHistory.js +3 -0
- package/lib/histories/AgenticaAssistantMessageHistory.js.map +1 -0
- package/lib/histories/AgenticaHistory.d.ts +9 -7
- package/lib/histories/{AgenticaTextHistory.d.ts → AgenticaSystemMessageHistory.d.ts} +1 -2
- package/lib/histories/{AgenticaUserInputHistory.js → AgenticaSystemMessageHistory.js} +1 -1
- package/lib/histories/AgenticaSystemMessageHistory.js.map +1 -0
- package/lib/histories/AgenticaUserMessageHistory.d.ts +6 -0
- package/lib/{events/AgenticaTextEvent.js → histories/AgenticaUserMessageHistory.js} +1 -1
- package/lib/histories/AgenticaUserMessageHistory.js.map +1 -0
- package/lib/histories/MicroAgenticaHistory.d.ts +5 -4
- package/lib/histories/contents/AgenticaUserMessageAudioContent.d.ts +19 -0
- package/lib/histories/contents/AgenticaUserMessageAudioContent.js +3 -0
- package/lib/histories/contents/AgenticaUserMessageAudioContent.js.map +1 -0
- package/lib/histories/contents/AgenticaUserMessageContent.d.ts +14 -0
- package/lib/histories/{AgenticaTextHistory.js → contents/AgenticaUserMessageContent.js} +1 -1
- package/lib/histories/contents/AgenticaUserMessageContent.js.map +1 -0
- package/lib/histories/contents/AgenticaUserMessageContentBase.d.ts +6 -0
- package/lib/histories/contents/AgenticaUserMessageContentBase.js +3 -0
- package/lib/histories/contents/AgenticaUserMessageContentBase.js.map +1 -0
- package/lib/histories/contents/AgenticaUserMessageFileContent.d.ts +26 -0
- package/lib/histories/contents/AgenticaUserMessageFileContent.js +3 -0
- package/lib/histories/contents/AgenticaUserMessageFileContent.js.map +1 -0
- package/lib/histories/contents/AgenticaUserMessageImageContent.d.ts +20 -0
- package/lib/histories/contents/AgenticaUserMessageImageContent.js +3 -0
- package/lib/histories/contents/AgenticaUserMessageImageContent.js.map +1 -0
- package/lib/histories/contents/AgenticaUserMessageTextContent.d.ts +14 -0
- package/lib/histories/contents/AgenticaUserMessageTextContent.js +3 -0
- package/lib/histories/contents/AgenticaUserMessageTextContent.js.map +1 -0
- package/lib/histories/contents/index.d.ts +5 -0
- package/lib/histories/contents/index.js +22 -0
- package/lib/histories/contents/index.js.map +1 -0
- package/lib/histories/index.d.ts +10 -0
- package/lib/histories/index.js +27 -0
- package/lib/histories/index.js.map +1 -0
- package/lib/index.d.ts +6 -45
- package/lib/index.js +6 -46
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +182 -131
- package/lib/index.mjs.map +1 -1
- package/lib/json/IAgenticaEventJson.d.ts +44 -19
- package/lib/json/IAgenticaEventJson.type.d.ts +1 -0
- package/lib/json/IAgenticaEventJson.type.js +8 -0
- package/lib/json/IAgenticaEventJson.type.js.map +1 -0
- package/lib/json/IAgenticaHistoryJson.d.ts +34 -19
- package/lib/json/IAgenticaHistoryJson.type.d.ts +1 -0
- package/lib/json/IAgenticaHistoryJson.type.js +8 -0
- package/lib/json/IAgenticaHistoryJson.type.js.map +1 -0
- package/lib/json/IMicroAgenticaEventJson.d.ts +1 -1
- package/lib/json/IMicroAgenticaHistoryJson.d.ts +1 -1
- package/lib/json/index.d.ts +7 -0
- package/lib/json/index.js +24 -0
- package/lib/json/index.js.map +1 -0
- package/lib/orchestrate/call.js +4 -4
- package/lib/orchestrate/call.js.map +1 -1
- package/lib/orchestrate/cancel.js +1 -1
- package/lib/orchestrate/cancel.js.map +1 -1
- package/lib/orchestrate/initialize.js +4 -4
- package/lib/orchestrate/initialize.js.map +1 -1
- package/lib/orchestrate/select.js +3 -3
- package/lib/orchestrate/select.js.map +1 -1
- package/lib/structures/IAgenticaController.d.ts +1 -2
- package/lib/structures/index.d.ts +10 -0
- package/lib/structures/index.js +27 -0
- package/lib/structures/index.js.map +1 -0
- package/lib/transformers/transformHistory.d.ts +1 -0
- package/lib/transformers/{AgenticaHistoryTransformer.js → transformHistory.js} +33 -23
- package/lib/transformers/transformHistory.js.map +1 -0
- package/lib/utils/ChatGptCompletionMessageUtil.js +2 -2
- package/lib/utils/types.d.ts +33 -0
- package/lib/utils/types.js +29 -0
- package/lib/utils/types.js.map +1 -0
- package/package.json +7 -7
- package/src/Agentica.ts +10 -9
- package/src/MicroAgentica.ts +12 -9
- package/src/context/AgenticaContext.ts +2 -2
- package/src/context/MicroAgenticaContext.ts +2 -2
- package/src/context/index.ts +5 -0
- package/src/context/internal/AgenticaOperationComposer.spec.ts +15 -5
- package/src/events/AgenticaAssistantMessageEvent.ts +12 -0
- package/src/events/AgenticaEvent.ts +15 -15
- package/src/events/AgenticaEvent.type.ts +19 -0
- package/src/events/AgenticaUserMessageEvent.ts +12 -0
- package/src/events/MicroAgenticaEvent.ts +9 -9
- package/src/events/index.ts +14 -0
- package/src/factory/events.ts +29 -34
- package/src/factory/histories.ts +120 -29
- package/src/functional/assertMcpController.ts +4 -2
- package/src/functional/index.ts +7 -0
- package/src/functional/validateMcpController.ts +4 -2
- package/src/histories/AgenticaAssistantMessageHistory.ts +10 -0
- package/src/histories/AgenticaHistory.ts +11 -8
- package/src/histories/{AgenticaTextHistory.ts → AgenticaSystemMessageHistory.ts} +4 -2
- package/src/histories/AgenticaUserMessageHistory.ts +11 -0
- package/src/histories/MicroAgenticaHistory.ts +6 -5
- package/src/histories/contents/AgenticaUserMessageAudioContent.ts +21 -0
- package/src/histories/contents/AgenticaUserMessageContent.ts +19 -0
- package/src/histories/contents/AgenticaUserMessageContentBase.ts +6 -0
- package/src/histories/contents/AgenticaUserMessageFileContent.ts +27 -0
- package/src/histories/contents/AgenticaUserMessageImageContent.ts +23 -0
- package/src/histories/contents/AgenticaUserMessageTextContent.ts +15 -0
- package/src/histories/contents/index.ts +5 -0
- package/src/histories/index.ts +10 -0
- package/src/index.ts +6 -54
- package/src/json/IAgenticaEventJson.ts +53 -21
- package/src/json/IAgenticaEventJson.type.ts +19 -0
- package/src/json/IAgenticaHistoryJson.ts +41 -23
- package/src/json/IAgenticaHistoryJson.type.ts +19 -0
- package/src/json/IMicroAgenticaEventJson.ts +2 -1
- package/src/json/IMicroAgenticaHistoryJson.ts +2 -1
- package/src/json/index.ts +7 -0
- package/src/orchestrate/call.ts +8 -8
- package/src/orchestrate/cancel.ts +2 -2
- package/src/orchestrate/initialize.ts +5 -5
- package/src/orchestrate/select.ts +5 -5
- package/src/structures/IAgenticaController.ts +4 -2
- package/src/structures/index.ts +10 -0
- package/src/transformers/{AgenticaHistoryTransformer.ts → transformHistory.ts} +43 -26
- package/src/utils/types.ts +50 -0
- package/lib/events/AgenticaTextEvent.d.ts +0 -10
- package/lib/events/AgenticaTextEvent.js.map +0 -1
- package/lib/events/AgenticaUserInputEvent.d.ts +0 -10
- package/lib/events/AgenticaUserInputEvent.js.map +0 -1
- package/lib/histories/AgenticaTextHistory.js.map +0 -1
- package/lib/histories/AgenticaUserInputHistory.d.ts +0 -86
- package/lib/histories/AgenticaUserInputHistory.js.map +0 -1
- package/lib/structures/mcp/IMcpLlmTransportProps.d.ts +0 -11
- package/lib/structures/mcp/IMcpLlmTransportProps.js +0 -3
- package/lib/structures/mcp/IMcpLlmTransportProps.js.map +0 -1
- package/lib/structures/mcp/index.d.ts +0 -1
- package/lib/structures/mcp/index.js.map +0 -1
- package/lib/transformers/AgenticaEventTransformer.d.ts +0 -63
- package/lib/transformers/AgenticaEventTransformer.js +0 -155
- package/lib/transformers/AgenticaEventTransformer.js.map +0 -1
- package/lib/transformers/AgenticaHistoryTransformer.d.ts +0 -41
- package/lib/transformers/AgenticaHistoryTransformer.js.map +0 -1
- package/src/events/AgenticaTextEvent.ts +0 -12
- package/src/events/AgenticaUserInputEvent.ts +0 -12
- package/src/histories/AgenticaUserInputHistory.ts +0 -94
- package/src/structures/mcp/IMcpLlmTransportProps.ts +0 -13
- package/src/structures/mcp/index.ts +0 -1
- package/src/transformers/AgenticaEventTransformer.ts +0 -196
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./AgenticaAssistantMessageEvent"), exports);
|
|
18
|
+
__exportStar(require("./AgenticaCallEvent"), exports);
|
|
19
|
+
__exportStar(require("./AgenticaCancelEvent"), exports);
|
|
20
|
+
__exportStar(require("./AgenticaDescribeEvent"), exports);
|
|
21
|
+
__exportStar(require("./AgenticaEvent"), exports);
|
|
22
|
+
__exportStar(require("./AgenticaEventSource"), exports);
|
|
23
|
+
__exportStar(require("./AgenticaExecuteEvent"), exports);
|
|
24
|
+
__exportStar(require("./AgenticaInitializeEvent"), exports);
|
|
25
|
+
__exportStar(require("./AgenticaRequestEvent"), exports);
|
|
26
|
+
__exportStar(require("./AgenticaResponseEvent"), exports);
|
|
27
|
+
__exportStar(require("./AgenticaSelectEvent"), exports);
|
|
28
|
+
__exportStar(require("./AgenticaUserMessageEvent"), exports);
|
|
29
|
+
__exportStar(require("./AgenticaValidateEvent"), exports);
|
|
30
|
+
__exportStar(require("./MicroAgenticaEvent"), exports);
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/events/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kEAAgD;AAChD,sDAAoC;AACpC,wDAAsC;AACtC,0DAAwC;AACxC,kDAAgC;AAChC,wDAAsC;AACtC,yDAAuC;AACvC,4DAA0C;AAC1C,yDAAuC;AACvC,0DAAwC;AACxC,wDAAsC;AACtC,6DAA2C;AAC3C,0DAAwC;AACxC,uDAAqC"}
|
package/lib/factory/events.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { ILlmSchema, IValidation } from "@samchon/openapi";
|
|
|
2
2
|
import type OpenAI from "openai";
|
|
3
3
|
import type { AgenticaOperation } from "../context/AgenticaOperation";
|
|
4
4
|
import type { AgenticaOperationSelection } from "../context/AgenticaOperationSelection";
|
|
5
|
+
import type { AgenticaAssistantMessageEvent } from "../events/AgenticaAssistantMessageEvent";
|
|
5
6
|
import type { AgenticaCallEvent } from "../events/AgenticaCallEvent";
|
|
6
7
|
import type { AgenticaCancelEvent } from "../events/AgenticaCancelEvent";
|
|
7
8
|
import type { AgenticaDescribeEvent } from "../events/AgenticaDescribeEvent";
|
|
@@ -11,15 +12,11 @@ import type { AgenticaInitializeEvent } from "../events/AgenticaInitializeEvent"
|
|
|
11
12
|
import type { AgenticaRequestEvent } from "../events/AgenticaRequestEvent";
|
|
12
13
|
import type { AgenticaResponseEvent } from "../events/AgenticaResponseEvent";
|
|
13
14
|
import type { AgenticaSelectEvent } from "../events/AgenticaSelectEvent";
|
|
14
|
-
import type {
|
|
15
|
-
import type { AgenticaUserInputEvent } from "../events/AgenticaUserInputEvent";
|
|
15
|
+
import type { AgenticaUserMessageEvent } from "../events/AgenticaUserMessageEvent";
|
|
16
16
|
import type { AgenticaValidateEvent } from "../events/AgenticaValidateEvent";
|
|
17
|
+
import type { AgenticaUserMessageContent } from "../histories";
|
|
17
18
|
import type { AgenticaExecuteHistory } from "../histories/AgenticaExecuteHistory";
|
|
18
|
-
import type { AgenticaUserInputHistory } from "../histories/AgenticaUserInputHistory";
|
|
19
19
|
export declare function createInitializeEvent(): AgenticaInitializeEvent;
|
|
20
|
-
export declare function createUserInputEvent(props: {
|
|
21
|
-
contents: Array<AgenticaUserInputHistory.Contents>;
|
|
22
|
-
}): AgenticaUserInputEvent;
|
|
23
20
|
export declare function createSelectEvent<Model extends ILlmSchema.Model>(props: {
|
|
24
21
|
selection: AgenticaOperationSelection<Model>;
|
|
25
22
|
}): AgenticaSelectEvent<Model>;
|
|
@@ -42,12 +39,15 @@ export declare function createExecuteEvent<Model extends ILlmSchema.Model>(props
|
|
|
42
39
|
arguments: Record<string, unknown>;
|
|
43
40
|
value: unknown;
|
|
44
41
|
}): AgenticaExecuteEvent<Model>;
|
|
45
|
-
export declare function
|
|
42
|
+
export declare function createUserMessageEvent(props: {
|
|
43
|
+
contents: Array<AgenticaUserMessageContent>;
|
|
44
|
+
}): AgenticaUserMessageEvent;
|
|
45
|
+
export declare function creatAssistantEvent(props: {
|
|
46
46
|
stream: AsyncGenerator<string, undefined, undefined>;
|
|
47
47
|
done: () => boolean;
|
|
48
48
|
get: () => string;
|
|
49
49
|
join: () => Promise<string>;
|
|
50
|
-
}):
|
|
50
|
+
}): AgenticaAssistantMessageEvent;
|
|
51
51
|
export declare function createDescribeEvent<Model extends ILlmSchema.Model>(props: {
|
|
52
52
|
executes: AgenticaExecuteHistory<Model>[];
|
|
53
53
|
stream: AsyncGenerator<string, undefined, undefined>;
|
package/lib/factory/events.js
CHANGED
|
@@ -1,22 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.createInitializeEvent = createInitializeEvent;
|
|
13
|
-
exports.createUserInputEvent = createUserInputEvent;
|
|
14
4
|
exports.createSelectEvent = createSelectEvent;
|
|
15
5
|
exports.createCancelEvent = createCancelEvent;
|
|
16
6
|
exports.createCallEvent = createCallEvent;
|
|
17
7
|
exports.createValidateEvent = createValidateEvent;
|
|
18
8
|
exports.createExecuteEvent = createExecuteEvent;
|
|
19
|
-
exports.
|
|
9
|
+
exports.createUserMessageEvent = createUserMessageEvent;
|
|
10
|
+
exports.creatAssistantEvent = creatAssistantEvent;
|
|
20
11
|
exports.createDescribeEvent = createDescribeEvent;
|
|
21
12
|
exports.createRequestEvent = createRequestEvent;
|
|
22
13
|
exports.createResponseEvent = createResponseEvent;
|
|
@@ -34,21 +25,6 @@ function createInitializeEvent() {
|
|
|
34
25
|
toJSON: () => event,
|
|
35
26
|
};
|
|
36
27
|
}
|
|
37
|
-
function createUserInputEvent(props) {
|
|
38
|
-
return {
|
|
39
|
-
type: "user_input",
|
|
40
|
-
role: "user",
|
|
41
|
-
contents: props.contents,
|
|
42
|
-
join: () => __awaiter(this, void 0, void 0, function* () { return props.contents; }),
|
|
43
|
-
toJSON: () => ({
|
|
44
|
-
type: "user_input",
|
|
45
|
-
contents: props.contents,
|
|
46
|
-
}),
|
|
47
|
-
toHistory: () => (0, histories_1.createUserInputHistory)({
|
|
48
|
-
contents: props.contents,
|
|
49
|
-
}),
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
28
|
function createSelectEvent(props) {
|
|
53
29
|
return {
|
|
54
30
|
type: "select",
|
|
@@ -124,27 +100,36 @@ function createExecuteEvent(props) {
|
|
|
124
100
|
};
|
|
125
101
|
}
|
|
126
102
|
/* -----------------------------------------------------------
|
|
127
|
-
|
|
103
|
+
CONTENTS
|
|
128
104
|
----------------------------------------------------------- */
|
|
129
|
-
function
|
|
105
|
+
function createUserMessageEvent(props) {
|
|
130
106
|
return {
|
|
131
|
-
type: "
|
|
132
|
-
|
|
107
|
+
type: "userMessage",
|
|
108
|
+
contents: props.contents,
|
|
109
|
+
toJSON: () => ({
|
|
110
|
+
type: "userMessage",
|
|
111
|
+
contents: props.contents,
|
|
112
|
+
}),
|
|
113
|
+
toHistory: () => (0, histories_1.createUserMessageHistory)({
|
|
114
|
+
contents: props.contents,
|
|
115
|
+
}),
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
function creatAssistantEvent(props) {
|
|
119
|
+
return {
|
|
120
|
+
type: "assistantMessage",
|
|
133
121
|
stream: props.stream,
|
|
134
122
|
join: props.join,
|
|
135
123
|
toJSON: () => ({
|
|
136
|
-
type: "
|
|
137
|
-
role: "assistant",
|
|
124
|
+
type: "assistantMessage",
|
|
138
125
|
done: props.done(),
|
|
139
126
|
text: props.get(),
|
|
140
127
|
}),
|
|
141
128
|
toHistory: () => ({
|
|
142
|
-
type: "
|
|
143
|
-
role: "assistant",
|
|
129
|
+
type: "assistantMessage",
|
|
144
130
|
text: props.get(),
|
|
145
131
|
toJSON: () => ({
|
|
146
|
-
type: "
|
|
147
|
-
role: "assistant",
|
|
132
|
+
type: "assistantMessage",
|
|
148
133
|
text: props.get(),
|
|
149
134
|
}),
|
|
150
135
|
}),
|
|
@@ -175,8 +160,8 @@ function createDescribeEvent(props) {
|
|
|
175
160
|
};
|
|
176
161
|
}
|
|
177
162
|
/* -----------------------------------------------------------
|
|
178
|
-
|
|
179
|
-
|
|
163
|
+
API REQUESTS
|
|
164
|
+
----------------------------------------------------------- */
|
|
180
165
|
function createRequestEvent(props) {
|
|
181
166
|
return {
|
|
182
167
|
type: "request",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/factory/events.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/factory/events.ts"],"names":[],"mappings":";;AA4BA,sDAQC;AAED,8CAeC;AAED,8CAWC;AAKD,0CAiBC;AAED,kDAiBC;AAED,gDAwBC;AAKD,wDAcC;AAED,kDAwBC;AAED,kDA6BC;AAKD,gDAWC;AAED,kDAeC;AA/OD,+BAA0B;AAoB1B,2CAAkG;AAElG;;8DAE8D;AAC9D,SAAgB,qBAAqB;IACnC,MAAM,KAAK,GAAmC;QAC5C,IAAI,EAAE,YAAY;KACnB,CAAC;IACF,OAAO;QACL,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK;KACpB,CAAC;AACJ,CAAC;AAED,SAAgB,iBAAiB,CAAiC,KAEjE;IACC,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;YACb,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE;SACpC,CAAC;QACF,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,+BAAmB,EAAC;YACnC,EAAE,EAAE,IAAA,SAAE,GAAE;YACR,UAAU,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC;SAC9B,CAAC;KACH,CAAC;AACJ,CAAC;AAED,SAAgB,iBAAiB,CAAiC,KAEjE;IACC,OAAO;QACL,IAAI,EAAE,QAAQ;QACd,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,MAAM,EAA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U;QAChB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,IAAI,EAAE,KAAK,CAAC,IAAI;KACjB,CAAC;AACJ,CAAC"}
|
|
@@ -1,36 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import type OpenAI from "openai";
|
|
3
|
-
import type { AgenticaOperation } from "../context/AgenticaOperation";
|
|
4
|
-
import type { AgenticaOperationSelection } from "../context/AgenticaOperationSelection";
|
|
5
|
-
import type { AgenticaCancelHistory } from "../histories/AgenticaCancelHistory";
|
|
6
|
-
import type { AgenticaDescribeHistory } from "../histories/AgenticaDescribeHistory";
|
|
7
|
-
import type { AgenticaExecuteHistory } from "../histories/AgenticaExecuteHistory";
|
|
8
|
-
import type { AgenticaHistory } from "../histories/AgenticaHistory";
|
|
9
|
-
import type { AgenticaSelectHistory } from "../histories/AgenticaSelectHistory";
|
|
10
|
-
import type { AgenticaTextHistory } from "../histories/AgenticaTextHistory";
|
|
11
|
-
import type { AgenticaUserInputHistory } from "../histories/AgenticaUserInputHistory";
|
|
12
|
-
export declare function decodeHistory<Model extends ILlmSchema.Model>(history: AgenticaHistory<Model>): OpenAI.ChatCompletionMessageParam[];
|
|
13
|
-
export declare function createUserInputHistory(props: {
|
|
14
|
-
contents: Array<AgenticaUserInputHistory.Contents>;
|
|
15
|
-
}): AgenticaUserInputHistory;
|
|
16
|
-
export declare function createTextHistory(props: {
|
|
17
|
-
text: string;
|
|
18
|
-
}): AgenticaTextHistory;
|
|
19
|
-
export declare function createDescribeHistory<Model extends ILlmSchema.Model>(props: {
|
|
20
|
-
executes: AgenticaExecuteHistory<Model>[];
|
|
21
|
-
text: string;
|
|
22
|
-
}): AgenticaDescribeHistory<Model>;
|
|
23
|
-
export declare function createSelectHistory<Model extends ILlmSchema.Model>(props: {
|
|
24
|
-
id: string;
|
|
25
|
-
selections: AgenticaOperationSelection<Model>[];
|
|
26
|
-
}): AgenticaSelectHistory<Model>;
|
|
27
|
-
export declare function createCancelHistory<Model extends ILlmSchema.Model>(props: {
|
|
28
|
-
id: string;
|
|
29
|
-
selections: AgenticaOperationSelection<Model>[];
|
|
30
|
-
}): AgenticaCancelHistory<Model>;
|
|
31
|
-
export declare function createExecuteHistory<Model extends ILlmSchema.Model>(props: {
|
|
32
|
-
id: string;
|
|
33
|
-
operation: AgenticaOperation<Model>;
|
|
34
|
-
arguments: Record<string, any>;
|
|
35
|
-
value: unknown;
|
|
36
|
-
}): AgenticaExecuteHistory<Model>;
|
|
1
|
+
export {};
|
package/lib/factory/histories.js
CHANGED
|
@@ -1,26 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.decodeHistory = decodeHistory;
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
4
|
+
exports.decodeUserMessageContent = decodeUserMessageContent;
|
|
5
|
+
exports.createUserMessageHistory = createUserMessageHistory;
|
|
6
|
+
exports.createAssistantMessageHistory = createAssistantMessageHistory;
|
|
7
|
+
exports.createSystemMessageHistory = createSystemMessageHistory;
|
|
6
8
|
exports.createDescribeHistory = createDescribeHistory;
|
|
7
9
|
exports.createSelectHistory = createSelectHistory;
|
|
8
10
|
exports.createCancelHistory = createCancelHistory;
|
|
9
11
|
exports.createExecuteHistory = createExecuteHistory;
|
|
12
|
+
/**
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
10
15
|
function decodeHistory(history) {
|
|
11
16
|
// NO NEED TO DECODE DESCRIBE
|
|
12
17
|
if (history.type === "describe") {
|
|
13
18
|
return [];
|
|
14
19
|
}
|
|
15
|
-
if (history.type === "
|
|
16
|
-
return [
|
|
17
|
-
{
|
|
18
|
-
role: history.role,
|
|
19
|
-
content: history.text,
|
|
20
|
-
},
|
|
21
|
-
];
|
|
22
|
-
}
|
|
23
|
-
if (history.type === "select" || history.type === "cancel") {
|
|
20
|
+
else if (history.type === "select" || history.type === "cancel") {
|
|
24
21
|
return [
|
|
25
22
|
{
|
|
26
23
|
role: "assistant",
|
|
@@ -47,7 +44,7 @@ function decodeHistory(history) {
|
|
|
47
44
|
},
|
|
48
45
|
];
|
|
49
46
|
}
|
|
50
|
-
if (history.type === "execute") {
|
|
47
|
+
else if (history.type === "execute") {
|
|
51
48
|
return [
|
|
52
49
|
{
|
|
53
50
|
role: "assistant",
|
|
@@ -81,27 +78,87 @@ function decodeHistory(history) {
|
|
|
81
78
|
},
|
|
82
79
|
];
|
|
83
80
|
}
|
|
84
|
-
if (history.type === "
|
|
81
|
+
if (history.type === "assistantMessage") {
|
|
82
|
+
return [
|
|
83
|
+
{
|
|
84
|
+
role: "assistant",
|
|
85
|
+
content: history.text,
|
|
86
|
+
},
|
|
87
|
+
];
|
|
88
|
+
}
|
|
89
|
+
if (history.type === "systemMessage") {
|
|
90
|
+
return [
|
|
91
|
+
{
|
|
92
|
+
role: "system",
|
|
93
|
+
content: history.text,
|
|
94
|
+
},
|
|
95
|
+
];
|
|
96
|
+
}
|
|
97
|
+
if (history.type === "userMessage") {
|
|
98
|
+
const contents = history.contents;
|
|
85
99
|
return [
|
|
86
100
|
{
|
|
87
101
|
role: "user",
|
|
88
|
-
content:
|
|
102
|
+
content: contents.map(decodeUserMessageContent),
|
|
89
103
|
},
|
|
90
104
|
];
|
|
91
105
|
}
|
|
92
106
|
history;
|
|
93
|
-
throw new Error(
|
|
107
|
+
throw new Error(`Unsupported history type, value: ${JSON.stringify(history)}`);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* @internal
|
|
111
|
+
*/
|
|
112
|
+
function decodeUserMessageContent(content) {
|
|
113
|
+
if (content.type === "text") {
|
|
114
|
+
return content;
|
|
115
|
+
}
|
|
116
|
+
if (content.type === "audio") {
|
|
117
|
+
return {
|
|
118
|
+
type: "input_audio",
|
|
119
|
+
input_audio: {
|
|
120
|
+
data: content.data,
|
|
121
|
+
format: content.format,
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
if (content.type === "file") {
|
|
126
|
+
return {
|
|
127
|
+
type: "file",
|
|
128
|
+
file: content.file.type === "data"
|
|
129
|
+
? {
|
|
130
|
+
file_data: content.file.data,
|
|
131
|
+
filename: content.file.name,
|
|
132
|
+
}
|
|
133
|
+
: {
|
|
134
|
+
file_id: content.file.id,
|
|
135
|
+
},
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
if (content.type === "image") {
|
|
139
|
+
return {
|
|
140
|
+
type: "image_url",
|
|
141
|
+
image_url: {
|
|
142
|
+
url: content.url,
|
|
143
|
+
detail: content.detail,
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
content;
|
|
148
|
+
throw new Error(`Unsupported user message content type, value: ${JSON.stringify(content)}`);
|
|
94
149
|
}
|
|
95
150
|
/* -----------------------------------------------------------
|
|
96
151
|
USER INPUT PROMPTS
|
|
97
152
|
----------------------------------------------------------- */
|
|
98
|
-
|
|
153
|
+
/**
|
|
154
|
+
* @internal
|
|
155
|
+
*/
|
|
156
|
+
function createUserMessageHistory(props) {
|
|
99
157
|
return {
|
|
100
|
-
type: "
|
|
101
|
-
role: "user",
|
|
158
|
+
type: "userMessage",
|
|
102
159
|
contents: props.contents,
|
|
103
160
|
toJSON: () => ({
|
|
104
|
-
type: "
|
|
161
|
+
type: "userMessage",
|
|
105
162
|
contents: props.contents,
|
|
106
163
|
}),
|
|
107
164
|
};
|
|
@@ -109,14 +166,29 @@ function createUserInputHistory(props) {
|
|
|
109
166
|
/* -----------------------------------------------------------
|
|
110
167
|
TEXT PROMPTS
|
|
111
168
|
----------------------------------------------------------- */
|
|
112
|
-
|
|
169
|
+
/**
|
|
170
|
+
* @internal
|
|
171
|
+
*/
|
|
172
|
+
function createAssistantMessageHistory(props) {
|
|
173
|
+
const prompt = {
|
|
174
|
+
type: "assistantMessage",
|
|
175
|
+
text: props.text,
|
|
176
|
+
};
|
|
177
|
+
return Object.assign(Object.assign({}, prompt), { toJSON: () => prompt });
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* @internal
|
|
181
|
+
*/
|
|
182
|
+
function createSystemMessageHistory(props) {
|
|
113
183
|
const prompt = {
|
|
114
|
-
type: "
|
|
115
|
-
role: "assistant",
|
|
184
|
+
type: "systemMessage",
|
|
116
185
|
text: props.text,
|
|
117
186
|
};
|
|
118
187
|
return Object.assign(Object.assign({}, prompt), { toJSON: () => prompt });
|
|
119
188
|
}
|
|
189
|
+
/**
|
|
190
|
+
* @internal
|
|
191
|
+
*/
|
|
120
192
|
function createDescribeHistory(props) {
|
|
121
193
|
return {
|
|
122
194
|
type: "describe",
|
|
@@ -132,6 +204,9 @@ function createDescribeHistory(props) {
|
|
|
132
204
|
/* -----------------------------------------------------------
|
|
133
205
|
FUNCTION CALLING PROMPTS
|
|
134
206
|
----------------------------------------------------------- */
|
|
207
|
+
/**
|
|
208
|
+
* @internal
|
|
209
|
+
*/
|
|
135
210
|
function createSelectHistory(props) {
|
|
136
211
|
return {
|
|
137
212
|
type: "select",
|
|
@@ -144,6 +219,9 @@ function createSelectHistory(props) {
|
|
|
144
219
|
}),
|
|
145
220
|
};
|
|
146
221
|
}
|
|
222
|
+
/**
|
|
223
|
+
* @internal
|
|
224
|
+
*/
|
|
147
225
|
function createCancelHistory(props) {
|
|
148
226
|
return {
|
|
149
227
|
type: "cancel",
|
|
@@ -156,6 +234,9 @@ function createCancelHistory(props) {
|
|
|
156
234
|
}),
|
|
157
235
|
};
|
|
158
236
|
}
|
|
237
|
+
/**
|
|
238
|
+
* @internal
|
|
239
|
+
*/
|
|
159
240
|
function createExecuteHistory(props) {
|
|
160
241
|
return {
|
|
161
242
|
type: "execute",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"histories.js","sourceRoot":"","sources":["../../src/factory/histories.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3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1B,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;YACb,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,QAAQ;YAClC,EAAE,EAAE,KAAK,CAAC,EAAE;YACZ,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,EAAE;YACnC,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB,CAAC;KACH,CAAC;AACJ,CAAC"}
|
|
@@ -179,7 +179,7 @@ function assertHttpController(props) {
|
|
|
179
179
|
if (undefined === value)
|
|
180
180
|
return true;
|
|
181
181
|
return "object" === typeof value && null !== value && false === Array.isArray(value) && _iu5(value);
|
|
182
|
-
}); const _io114 = input => (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && _io113(input.properties)) && (undefined === input.required || Array.isArray(input.required) && input.required.every(elem => "string" === typeof elem)) && (null !== input.additionalProperties && (undefined === input.additionalProperties || "boolean" === typeof input.additionalProperties || "object" === typeof input.additionalProperties && null !== input.additionalProperties && false === Array.isArray(input.additionalProperties) && _iu5(input.additionalProperties))) && (undefined === input.maxProperties || "number" === typeof input.maxProperties) && (undefined === input.minProperties || "number" === typeof input.minProperties) && "object" === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))); const _io115 = input => Array.isArray(input.type) && input.type.every(elem => "string" === elem || "number" === elem || "boolean" === elem || "object" === elem || "integer" === elem || "array" === elem || "null" === elem) && (null === input["default"] || undefined === input["default"] || Array.isArray(input["default"])) && (undefined === input["enum"] || Array.isArray(input["enum"])) && ("string" === typeof input["const"] || "number" === typeof input["const"] || "boolean" === typeof input["const"]) && (undefined === input.nullable || "boolean" === typeof input.nullable) && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (null !== input.items && (undefined === input.items || (Array.isArray(input.items) && input.items.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)) || "object" === typeof input.items && null !== input.items && false === Array.isArray(input.items) && _iu5(input.items)))) && (undefined === input.prefixItems || Array.isArray(input.prefixItems) && input.prefixItems.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem))) && (undefined === input.uniqueItems || "boolean" === typeof input.uniqueItems) && (null !== input.additionalItems && (undefined === input.additionalItems || "boolean" === typeof input.additionalItems || "object" === typeof input.additionalItems && null !== input.additionalItems && false === Array.isArray(input.additionalItems) && _iu5(input.additionalItems))) && (undefined === input.minItems || "number" === typeof input.minItems && (Math.floor(input.minItems) === input.minItems && 0 <= input.minItems && input.minItems <= 18446744073709552000)) && (undefined === input.maxItems || "number" === typeof input.maxItems && (Math.floor(input.maxItems) === input.maxItems && 0 <= input.maxItems && input.maxItems <= 18446744073709552000)) && (null !== input.additionalProperties && (undefined === input.additionalProperties || "boolean" === typeof input.additionalProperties || "object" === typeof input.additionalProperties && null !== input.additionalProperties && false === Array.isArray(input.additionalProperties) && _iu5(input.additionalProperties))) && (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && _io113(input.properties)) && (undefined === input.required || Array.isArray(input.required) && input.required.every(elem => "string" === typeof elem)) && (undefined === input.maxProperties || "number" === typeof input.maxProperties) && (undefined === input.minProperties || "number" === typeof input.minProperties) && (Array.isArray(input.oneOf) && input.oneOf.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem))) && (undefined === input.discriminator || "object" === typeof input.discriminator && null !== input.discriminator && _io127(input.discriminator)) && (Array.isArray(input.anyOf) && input.anyOf.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem))) && (Array.isArray(input.allOf) && input.allOf.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem))) && "string" === typeof input.$ref; const _io116 = input => ("string" === typeof input["const"] || "number" === typeof input["const"] || "boolean" === typeof input["const"]) && (undefined === input.nullable || "boolean" === typeof input.nullable) && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true; const _io117 = input => (undefined === input.nullable || "boolean" === typeof input.nullable) && (null === input["default"] || undefined === input["default"] || "boolean" === typeof input["default"]) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => null === elem || "boolean" === typeof elem)) && "boolean" === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))); const _io118 = input => (undefined === input.nullable || "boolean" === typeof input.nullable) && (null === input["default"] || undefined === input["default"] || "number" === typeof input["default"] && (Math.floor(input["default"]) === input["default"] && -9223372036854776000 <= input["default"] && input["default"] <= 9223372036854776000)) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => null === elem || "number" === typeof elem)) && (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum && (Math.floor(input.exclusiveMinimum) === input.exclusiveMinimum && -9223372036854776000 <= input.exclusiveMinimum && input.exclusiveMinimum <= 9223372036854776000) || "boolean" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum && (Math.floor(input.exclusiveMaximum) === input.exclusiveMaximum && -9223372036854776000 <= input.exclusiveMaximum && input.exclusiveMaximum <= 9223372036854776000) || "boolean" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))); const _io119 = input => (undefined === input.nullable || "boolean" === typeof input.nullable) && (null === input["default"] || undefined === input["default"] || "number" === typeof input["default"]) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => null === elem || "number" === typeof elem)) && (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))); const _io120 = input => (undefined === input.nullable || "boolean" === typeof input.nullable) && (null === input["default"] || undefined === input["default"] || "string" === typeof input["default"]) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => null === elem || "string" === typeof elem)) && (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))); const _io121 = input => (undefined === input.nullable || "boolean" === typeof input.nullable) && (null !== input.items && (undefined === input.items || (Array.isArray(input.items) && input.items.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)) || "object" === typeof input.items && null !== input.items && false === Array.isArray(input.items) && _iu5(input.items)))) && (undefined === input.prefixItems || Array.isArray(input.prefixItems) && input.prefixItems.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem))) && (undefined === input.uniqueItems || "boolean" === typeof input.uniqueItems) && (null !== input.additionalItems && (undefined === input.additionalItems || "boolean" === typeof input.additionalItems || "object" === typeof input.additionalItems && null !== input.additionalItems && false === Array.isArray(input.additionalItems) && _iu5(input.additionalItems))) && (undefined === input.minItems || "number" === typeof input.minItems && (Math.floor(input.minItems) === input.minItems && 0 <= input.minItems && input.minItems <= 18446744073709552000)) && (undefined === input.maxItems || "number" === typeof input.maxItems && (Math.floor(input.maxItems) === input.maxItems && 0 <= input.maxItems && input.maxItems <= 18446744073709552000)) && "array" === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))); const _io122 = input => "string" === typeof input.$ref && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true; const _io123 = input => "string" === typeof input.$recursiveRef && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true; const _io124 = input => Array.isArray(input.allOf) && input.allOf.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)) && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true; const _io125 = input => Array.isArray(input.anyOf) && input.anyOf.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)) && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true; const _io126 = input => Array.isArray(input.oneOf) && input.oneOf.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)) && (undefined === input.discriminator || "object" === typeof input.discriminator && null !== input.discriminator && _io127(input.discriminator)) && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true; const _io127 = input => "string" === typeof input.propertyName && (undefined === input.mapping || "object" === typeof input.mapping && null !== input.mapping && false === Array.isArray(input.mapping) && _io35(input.mapping)); const _io128 = input => (null === input["default"] || undefined === input["default"]) && "null" === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))); const _io129 = input => null !== input.type && undefined === input.type && true && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))); const _io130 = input => Object.keys(input).every(key => {
|
|
182
|
+
}); const _io114 = input => (undefined === input.nullable || "boolean" === typeof input.nullable) && (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && _io113(input.properties)) && (undefined === input.required || Array.isArray(input.required) && input.required.every(elem => "string" === typeof elem)) && (null !== input.additionalProperties && (undefined === input.additionalProperties || "boolean" === typeof input.additionalProperties || "object" === typeof input.additionalProperties && null !== input.additionalProperties && false === Array.isArray(input.additionalProperties) && _iu5(input.additionalProperties))) && (undefined === input.maxProperties || "number" === typeof input.maxProperties) && (undefined === input.minProperties || "number" === typeof input.minProperties) && "object" === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))); const _io115 = input => Array.isArray(input.type) && input.type.every(elem => "string" === elem || "number" === elem || "boolean" === elem || "object" === elem || "integer" === elem || "array" === elem || "null" === elem) && (null === input["default"] || undefined === input["default"] || Array.isArray(input["default"])) && (undefined === input["enum"] || Array.isArray(input["enum"])) && ("string" === typeof input["const"] || "number" === typeof input["const"] || "boolean" === typeof input["const"]) && (undefined === input.nullable || "boolean" === typeof input.nullable) && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum) && (undefined === input.format || "string" === typeof input.format) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (null !== input.items && (undefined === input.items || (Array.isArray(input.items) && input.items.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)) || "object" === typeof input.items && null !== input.items && false === Array.isArray(input.items) && _iu5(input.items)))) && (undefined === input.prefixItems || Array.isArray(input.prefixItems) && input.prefixItems.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem))) && (undefined === input.uniqueItems || "boolean" === typeof input.uniqueItems) && (null !== input.additionalItems && (undefined === input.additionalItems || "boolean" === typeof input.additionalItems || "object" === typeof input.additionalItems && null !== input.additionalItems && false === Array.isArray(input.additionalItems) && _iu5(input.additionalItems))) && (undefined === input.minItems || "number" === typeof input.minItems && (Math.floor(input.minItems) === input.minItems && 0 <= input.minItems && input.minItems <= 18446744073709552000)) && (undefined === input.maxItems || "number" === typeof input.maxItems && (Math.floor(input.maxItems) === input.maxItems && 0 <= input.maxItems && input.maxItems <= 18446744073709552000)) && (null !== input.additionalProperties && (undefined === input.additionalProperties || "boolean" === typeof input.additionalProperties || "object" === typeof input.additionalProperties && null !== input.additionalProperties && false === Array.isArray(input.additionalProperties) && _iu5(input.additionalProperties))) && (undefined === input.properties || "object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) && _io113(input.properties)) && (undefined === input.required || Array.isArray(input.required) && input.required.every(elem => "string" === typeof elem)) && (undefined === input.maxProperties || "number" === typeof input.maxProperties) && (undefined === input.minProperties || "number" === typeof input.minProperties) && (Array.isArray(input.oneOf) && input.oneOf.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem))) && (undefined === input.discriminator || "object" === typeof input.discriminator && null !== input.discriminator && _io127(input.discriminator)) && (Array.isArray(input.anyOf) && input.anyOf.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem))) && (Array.isArray(input.allOf) && input.allOf.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem))) && "string" === typeof input.$ref; const _io116 = input => ("string" === typeof input["const"] || "number" === typeof input["const"] || "boolean" === typeof input["const"]) && (undefined === input.nullable || "boolean" === typeof input.nullable) && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true; const _io117 = input => (undefined === input.nullable || "boolean" === typeof input.nullable) && (null === input["default"] || undefined === input["default"] || "boolean" === typeof input["default"]) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => null === elem || "boolean" === typeof elem)) && "boolean" === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))); const _io118 = input => (undefined === input.nullable || "boolean" === typeof input.nullable) && (null === input["default"] || undefined === input["default"] || "number" === typeof input["default"] && (Math.floor(input["default"]) === input["default"] && -9223372036854776000 <= input["default"] && input["default"] <= 9223372036854776000)) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => null === elem || "number" === typeof elem)) && (undefined === input.minimum || "number" === typeof input.minimum && (Math.floor(input.minimum) === input.minimum && -9223372036854776000 <= input.minimum && input.minimum <= 9223372036854776000)) && (undefined === input.maximum || "number" === typeof input.maximum && (Math.floor(input.maximum) === input.maximum && -9223372036854776000 <= input.maximum && input.maximum <= 9223372036854776000)) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum && (Math.floor(input.exclusiveMinimum) === input.exclusiveMinimum && -9223372036854776000 <= input.exclusiveMinimum && input.exclusiveMinimum <= 9223372036854776000) || "boolean" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum && (Math.floor(input.exclusiveMaximum) === input.exclusiveMaximum && -9223372036854776000 <= input.exclusiveMaximum && input.exclusiveMaximum <= 9223372036854776000) || "boolean" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && (Math.floor(input.multipleOf) === input.multipleOf && 0 <= input.multipleOf && input.multipleOf <= 18446744073709552000 && 0 < input.multipleOf)) && "integer" === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))); const _io119 = input => (undefined === input.nullable || "boolean" === typeof input.nullable) && (null === input["default"] || undefined === input["default"] || "number" === typeof input["default"]) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => null === elem || "number" === typeof elem)) && (undefined === input.minimum || "number" === typeof input.minimum) && (undefined === input.maximum || "number" === typeof input.maximum) && (undefined === input.exclusiveMinimum || "number" === typeof input.exclusiveMinimum || "boolean" === typeof input.exclusiveMinimum) && (undefined === input.exclusiveMaximum || "number" === typeof input.exclusiveMaximum || "boolean" === typeof input.exclusiveMaximum) && (undefined === input.multipleOf || "number" === typeof input.multipleOf && 0 < input.multipleOf) && "number" === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))); const _io120 = input => (undefined === input.nullable || "boolean" === typeof input.nullable) && (null === input["default"] || undefined === input["default"] || "string" === typeof input["default"]) && (undefined === input["enum"] || Array.isArray(input["enum"]) && input["enum"].every(elem => null === elem || "string" === typeof elem)) && (undefined === input.format || "string" === typeof input.format) && (undefined === input.pattern || "string" === typeof input.pattern) && (undefined === input.contentMediaType || "string" === typeof input.contentMediaType) && (undefined === input.minLength || "number" === typeof input.minLength && (Math.floor(input.minLength) === input.minLength && 0 <= input.minLength && input.minLength <= 18446744073709552000)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000)) && "string" === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))); const _io121 = input => (undefined === input.nullable || "boolean" === typeof input.nullable) && (null !== input.items && (undefined === input.items || (Array.isArray(input.items) && input.items.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)) || "object" === typeof input.items && null !== input.items && false === Array.isArray(input.items) && _iu5(input.items)))) && (undefined === input.prefixItems || Array.isArray(input.prefixItems) && input.prefixItems.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem))) && (undefined === input.uniqueItems || "boolean" === typeof input.uniqueItems) && (null !== input.additionalItems && (undefined === input.additionalItems || "boolean" === typeof input.additionalItems || "object" === typeof input.additionalItems && null !== input.additionalItems && false === Array.isArray(input.additionalItems) && _iu5(input.additionalItems))) && (undefined === input.minItems || "number" === typeof input.minItems && (Math.floor(input.minItems) === input.minItems && 0 <= input.minItems && input.minItems <= 18446744073709552000)) && (undefined === input.maxItems || "number" === typeof input.maxItems && (Math.floor(input.maxItems) === input.maxItems && 0 <= input.maxItems && input.maxItems <= 18446744073709552000)) && "array" === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))); const _io122 = input => "string" === typeof input.$ref && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true; const _io123 = input => "string" === typeof input.$recursiveRef && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true; const _io124 = input => Array.isArray(input.allOf) && input.allOf.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)) && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true; const _io125 = input => Array.isArray(input.anyOf) && input.anyOf.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)) && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true; const _io126 = input => Array.isArray(input.oneOf) && input.oneOf.every(elem => "object" === typeof elem && null !== elem && false === Array.isArray(elem) && _iu5(elem)) && (undefined === input.discriminator || "object" === typeof input.discriminator && null !== input.discriminator && _io127(input.discriminator)) && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))) && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true; const _io127 = input => "string" === typeof input.propertyName && (undefined === input.mapping || "object" === typeof input.mapping && null !== input.mapping && false === Array.isArray(input.mapping) && _io35(input.mapping)); const _io128 = input => (null === input["default"] || undefined === input["default"]) && "null" === input.type && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))); const _io129 = input => null !== input.type && undefined === input.type && true && (undefined === input.title || "string" === typeof input.title) && (undefined === input.description || "string" === typeof input.description) && (undefined === input.deprecated || "boolean" === typeof input.deprecated) && true && (null !== input.examples && (undefined === input.examples || (Array.isArray(input.examples) || "object" === typeof input.examples && null !== input.examples && false === Array.isArray(input.examples) && _io58(input.examples)))); const _io130 = input => Object.keys(input).every(key => {
|
|
183
183
|
const value = input[key];
|
|
184
184
|
if (undefined === value)
|
|
185
185
|
return true;
|
|
@@ -5405,6 +5405,11 @@ function assertHttpController(props) {
|
|
|
5405
5405
|
path: _path + ".exclusiveMaximum",
|
|
5406
5406
|
expected: "(boolean | number | undefined)",
|
|
5407
5407
|
value: input.exclusiveMaximum
|
|
5408
|
+
}, _errorFactory)) && (undefined === input.format || "string" === typeof input.format || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
5409
|
+
method: "typia.assert",
|
|
5410
|
+
path: _path + ".format",
|
|
5411
|
+
expected: "(string | undefined)",
|
|
5412
|
+
value: input.format
|
|
5408
5413
|
}, _errorFactory)) && (undefined === input.maxLength || "number" === typeof input.maxLength && (Math.floor(input.maxLength) === input.maxLength && 0 <= input.maxLength && input.maxLength <= 18446744073709552000 || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
5409
5414
|
method: "typia.assert",
|
|
5410
5415
|
path: _path + ".maxLength",
|
|
@@ -5415,11 +5420,6 @@ function assertHttpController(props) {
|
|
|
5415
5420
|
path: _path + ".maxLength",
|
|
5416
5421
|
expected: "((number & Type<\"uint64\">) | undefined)",
|
|
5417
5422
|
value: input.maxLength
|
|
5418
|
-
}, _errorFactory)) && (undefined === input.format || "string" === typeof input.format || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
5419
|
-
method: "typia.assert",
|
|
5420
|
-
path: _path + ".format",
|
|
5421
|
-
expected: "(string | undefined)",
|
|
5422
|
-
value: input.format
|
|
5423
5423
|
}, _errorFactory)) && (undefined === input.pattern || "string" === typeof input.pattern || __typia_transform__assertGuard._assertGuard(_exceptionable, {
|
|
5424
5424
|
method: "typia.assert",
|
|
5425
5425
|
path: _path + ".pattern",
|