@veruna/api-contracts 1.0.75 → 1.0.77
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/build/tsconfig.tsbuildinfo +1 -1
- package/build/v1/ai/tool.types.js +16 -1
- package/build/v1/ai/tool.types.js.map +1 -1
- package/build/v1/ai-model/admin/commands/create-model.command.d.ts +2 -0
- package/build/v1/ai-model/admin/commands/update-model.command.d.ts +2 -0
- package/build/v1/ai-model/admin/queries/get-model.query.d.ts +1 -0
- package/build/v1/ai-model/admin/queries/get-models.query.d.ts +1 -0
- package/build/v1/ai-model/schemas/create-model-request.schema.d.ts +1 -0
- package/build/v1/ai-model/schemas/model-response.schema.d.ts +1 -0
- package/build/v1/ai-model/schemas/model-settings.schema.d.ts +4 -0
- package/build/v1/ai-model/schemas/model-settings.schema.js +5 -1
- package/build/v1/ai-model/schemas/model-settings.schema.js.map +1 -1
- package/build/v1/ai-model/schemas/update-model-request.schema.d.ts +1 -0
- package/build/v1/chat/commands/create-reg-chat.command.d.ts +12 -3
- package/build/v1/chat/commands/create-unreg-chat.command.d.ts +12 -3
- package/build/v1/chat/commands/update-chat-title.command.d.ts +12 -3
- package/build/v1/chat/commands/update-chat.command.d.ts +12 -3
- package/build/v1/chat/queries/get-last-active-chat.query.d.ts +12 -3
- package/build/v1/chat/queries/get-reg-chat.query.d.ts +12 -3
- package/build/v1/chat/queries/get-unreg-chat.query.d.ts +12 -3
- package/build/v1/chat/schemas/chat-with-messages-response.schema.d.ts +12 -3
- package/build/v1/message/commands/create-message.command.d.ts +22 -0
- package/build/v1/message/commands/create-message.command.js +1 -0
- package/build/v1/message/commands/create-message.command.js.map +1 -1
- package/build/v1/message/schemas/generation-step.schema.d.ts +1 -0
- package/build/v1/message/schemas/generation-step.schema.js +1 -0
- package/build/v1/message/schemas/generation-step.schema.js.map +1 -1
- package/build/v1/message/schemas/index.d.ts +3 -3
- package/build/v1/message/schemas/index.js +7 -1
- package/build/v1/message/schemas/index.js.map +1 -1
- package/build/v1/message/schemas/message-response.schema.d.ts +12 -3
- package/build/v1/message/schemas/message-step-response.schema.d.ts +61 -8
- package/build/v1/message/schemas/message-step-response.schema.js +22 -3
- package/build/v1/message/schemas/message-step-response.schema.js.map +1 -1
- package/build/v1/message/schemas/stream-events.schema.d.ts +22 -0
- package/build/v1/message/schemas/stream-events.schema.js +11 -1
- package/build/v1/message/schemas/stream-events.schema.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MessageStepsResponseSchema = exports.MessageStepResponseSchema = exports.StepContentResponseSchema = void 0;
|
|
3
|
+
exports.MessageStepsResponseSchema = exports.MessageStepResponseSchema = exports.StepContentResponseSchema = exports.UploadStepContentSchema = exports.ImageGenStepContentSchema = exports.WebSearchStepContentSchema = exports.WebSearchCitationSchema = exports.TextStepContentSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const generation_step_schema_1 = require("./generation-step.schema");
|
|
6
|
-
exports.
|
|
7
|
-
|
|
6
|
+
exports.TextStepContentSchema = zod_1.z.object({
|
|
7
|
+
content: zod_1.z.string(),
|
|
8
8
|
});
|
|
9
|
+
exports.WebSearchCitationSchema = zod_1.z.object({
|
|
10
|
+
url: zod_1.z.string(),
|
|
11
|
+
title: zod_1.z.string(),
|
|
12
|
+
content: zod_1.z.string(),
|
|
13
|
+
});
|
|
14
|
+
exports.WebSearchStepContentSchema = zod_1.z.object({
|
|
15
|
+
queries: zod_1.z.array(zod_1.z.string()),
|
|
16
|
+
citations: zod_1.z.array(exports.WebSearchCitationSchema),
|
|
17
|
+
});
|
|
18
|
+
exports.ImageGenStepContentSchema = zod_1.z.null();
|
|
19
|
+
exports.UploadStepContentSchema = zod_1.z.object({
|
|
20
|
+
urls: zod_1.z.array(zod_1.z.string()),
|
|
21
|
+
});
|
|
22
|
+
exports.StepContentResponseSchema = zod_1.z.union([
|
|
23
|
+
exports.TextStepContentSchema,
|
|
24
|
+
exports.WebSearchStepContentSchema,
|
|
25
|
+
exports.ImageGenStepContentSchema,
|
|
26
|
+
exports.UploadStepContentSchema,
|
|
27
|
+
]);
|
|
9
28
|
exports.MessageStepResponseSchema = zod_1.z.object({
|
|
10
29
|
uuid: zod_1.z.string().uuid(),
|
|
11
30
|
type: zod_1.z.nativeEnum(generation_step_schema_1.GenerationStepType),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-step-response.schema.js","sourceRoot":"","sources":["../../../../v1/message/schemas/message-step-response.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,qEAAiF;
|
|
1
|
+
{"version":3,"file":"message-step-response.schema.js","sourceRoot":"","sources":["../../../../v1/message/schemas/message-step-response.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,qEAAiF;AAKpE,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC;AAKU,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC;AAKU,QAAA,0BAA0B,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;IAC5B,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,+BAAuB,CAAC;CAC9C,CAAC,CAAC;AAKU,QAAA,yBAAyB,GAAG,OAAC,CAAC,IAAI,EAAE,CAAC;AAKrC,QAAA,uBAAuB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;CAC5B,CAAC,CAAC;AAKU,QAAA,yBAAyB,GAAG,OAAC,CAAC,KAAK,CAAC;IAC7C,6BAAqB;IACrB,kCAA0B;IAC1B,iCAAyB;IACzB,+BAAuB;CAC1B,CAAC,CAAC;AAMU,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAE9C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAEvB,IAAI,EAAE,OAAC,CAAC,UAAU,CAAC,2CAAkB,CAAC;IAEtC,MAAM,EAAE,OAAC,CAAC,UAAU,CAAC,0CAAiB,CAAC;IAEvC,OAAO,EAAE,iCAAyB,CAAC,QAAQ,EAAE;IAE7C,QAAQ,EAAE,OAAC,CAAC,OAAO,EAAE;IAErB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAEhC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC;AAaU,QAAA,0BAA0B,GAAG,OAAC,CAAC,KAAK,CAAC,iCAAyB,CAAC,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { GenerationStepType } from './generation-step.schema';
|
|
|
3
3
|
export declare enum StreamEventType {
|
|
4
4
|
STEP_START = "step_start",
|
|
5
5
|
STEP_CHUNK = "step_chunk",
|
|
6
|
+
STEP_ERROR = "step_error",
|
|
6
7
|
STEP_DONE = "step_done",
|
|
7
8
|
IMAGE = "image",
|
|
8
9
|
IMAGE_GENERATION_ERROR = "image_generation_error",
|
|
@@ -31,6 +32,17 @@ export declare const StreamStepChunkEventSchema: z.ZodObject<{
|
|
|
31
32
|
stepId: z.ZodString;
|
|
32
33
|
chunk: z.ZodString;
|
|
33
34
|
}, z.core.$strip>;
|
|
35
|
+
export declare const StreamStepErrorEventSchema: z.ZodObject<{
|
|
36
|
+
id: z.ZodNumber;
|
|
37
|
+
chatId: z.ZodString;
|
|
38
|
+
messageId: z.ZodString;
|
|
39
|
+
type: z.ZodLiteral<StreamEventType.STEP_ERROR>;
|
|
40
|
+
stepType: z.ZodEnum<typeof GenerationStepType>;
|
|
41
|
+
stepId: z.ZodString;
|
|
42
|
+
stepIndex: z.ZodNumber;
|
|
43
|
+
errorCode: z.ZodString;
|
|
44
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
45
|
+
}, z.core.$strip>;
|
|
34
46
|
export declare const StreamStepDoneEventSchema: z.ZodObject<{
|
|
35
47
|
id: z.ZodNumber;
|
|
36
48
|
chatId: z.ZodString;
|
|
@@ -109,6 +121,16 @@ export declare const StreamEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
109
121
|
stepType: z.ZodEnum<typeof GenerationStepType>;
|
|
110
122
|
stepId: z.ZodString;
|
|
111
123
|
chunk: z.ZodString;
|
|
124
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
125
|
+
id: z.ZodNumber;
|
|
126
|
+
chatId: z.ZodString;
|
|
127
|
+
messageId: z.ZodString;
|
|
128
|
+
type: z.ZodLiteral<StreamEventType.STEP_ERROR>;
|
|
129
|
+
stepType: z.ZodEnum<typeof GenerationStepType>;
|
|
130
|
+
stepId: z.ZodString;
|
|
131
|
+
stepIndex: z.ZodNumber;
|
|
132
|
+
errorCode: z.ZodString;
|
|
133
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
112
134
|
}, z.core.$strip>, z.ZodObject<{
|
|
113
135
|
id: z.ZodNumber;
|
|
114
136
|
chatId: z.ZodString;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StreamEventSchema = exports.StreamHeartbeatEventSchema = exports.StreamCitationsEventSchema = exports.StreamImageGenerationErrorEventSchema = exports.StreamImageEventSchema = exports.StreamErrorEventSchema = exports.StreamCancelledEventSchema = exports.StreamDoneEventSchema = exports.StreamStepDoneEventSchema = exports.StreamStepChunkEventSchema = exports.StreamStepStartEventSchema = exports.StreamEventType = void 0;
|
|
3
|
+
exports.StreamEventSchema = exports.StreamHeartbeatEventSchema = exports.StreamCitationsEventSchema = exports.StreamImageGenerationErrorEventSchema = exports.StreamImageEventSchema = exports.StreamErrorEventSchema = exports.StreamCancelledEventSchema = exports.StreamDoneEventSchema = exports.StreamStepDoneEventSchema = exports.StreamStepErrorEventSchema = exports.StreamStepChunkEventSchema = exports.StreamStepStartEventSchema = exports.StreamEventType = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const generation_step_schema_1 = require("./generation-step.schema");
|
|
6
6
|
const citation_schema_1 = require("./citation.schema");
|
|
@@ -8,6 +8,7 @@ var StreamEventType;
|
|
|
8
8
|
(function (StreamEventType) {
|
|
9
9
|
StreamEventType["STEP_START"] = "step_start";
|
|
10
10
|
StreamEventType["STEP_CHUNK"] = "step_chunk";
|
|
11
|
+
StreamEventType["STEP_ERROR"] = "step_error";
|
|
11
12
|
StreamEventType["STEP_DONE"] = "step_done";
|
|
12
13
|
StreamEventType["IMAGE"] = "image";
|
|
13
14
|
StreamEventType["IMAGE_GENERATION_ERROR"] = "image_generation_error";
|
|
@@ -35,6 +36,14 @@ exports.StreamStepChunkEventSchema = BaseStreamEventSchema.extend({
|
|
|
35
36
|
stepId: zod_1.z.string().uuid(),
|
|
36
37
|
chunk: zod_1.z.string(),
|
|
37
38
|
});
|
|
39
|
+
exports.StreamStepErrorEventSchema = BaseStreamEventSchema.extend({
|
|
40
|
+
type: zod_1.z.literal(StreamEventType.STEP_ERROR),
|
|
41
|
+
stepType: zod_1.z.nativeEnum(generation_step_schema_1.GenerationStepType),
|
|
42
|
+
stepId: zod_1.z.string().uuid(),
|
|
43
|
+
stepIndex: zod_1.z.number().int().nonnegative(),
|
|
44
|
+
errorCode: zod_1.z.string().min(1),
|
|
45
|
+
errorMessage: zod_1.z.string().optional(),
|
|
46
|
+
});
|
|
38
47
|
exports.StreamStepDoneEventSchema = BaseStreamEventSchema.extend({
|
|
39
48
|
type: zod_1.z.literal(StreamEventType.STEP_DONE),
|
|
40
49
|
stepType: zod_1.z.nativeEnum(generation_step_schema_1.GenerationStepType),
|
|
@@ -72,6 +81,7 @@ exports.StreamHeartbeatEventSchema = zod_1.z.object({
|
|
|
72
81
|
exports.StreamEventSchema = zod_1.z.discriminatedUnion('type', [
|
|
73
82
|
exports.StreamStepStartEventSchema,
|
|
74
83
|
exports.StreamStepChunkEventSchema,
|
|
84
|
+
exports.StreamStepErrorEventSchema,
|
|
75
85
|
exports.StreamStepDoneEventSchema,
|
|
76
86
|
exports.StreamImageEventSchema,
|
|
77
87
|
exports.StreamImageGenerationErrorEventSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stream-events.schema.js","sourceRoot":"","sources":["../../../../v1/message/schemas/stream-events.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,qEAA8D;AAC9D,uDAAmD;AAKnD,IAAY,
|
|
1
|
+
{"version":3,"file":"stream-events.schema.js","sourceRoot":"","sources":["../../../../v1/message/schemas/stream-events.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,qEAA8D;AAC9D,uDAAmD;AAKnD,IAAY,eAuBX;AAvBD,WAAY,eAAe;IAEvB,4CAAyB,CAAA;IAEzB,4CAAyB,CAAA;IAEzB,4CAAyB,CAAA;IAEzB,0CAAuB,CAAA;IAEvB,kCAAe,CAAA;IAEf,oEAAiD,CAAA;IAEjD,0CAAuB,CAAA;IAEvB,0CAAuB,CAAA;IAEvB,gCAAa,CAAA;IAEb,0CAAuB,CAAA;IAEvB,kCAAe,CAAA;AACnB,CAAC,EAvBW,eAAe,+BAAf,eAAe,QAuB1B;AAMD,MAAM,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IAEnC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAE/B,MAAM,EAAE,OAAC,CAAC,M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