@veruna/api-contracts 1.0.76 → 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/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 +1 -1
- package/build/v1/message/schemas/index.js +2 -1
- package/build/v1/message/schemas/index.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
|
@@ -13,5 +13,20 @@ exports.ToolRequestSchema = zod_1.z.object({
|
|
|
13
13
|
.uuid({ message: 'ToolRequest.modelId.invalid' }),
|
|
14
14
|
settings: zod_1.z.array(model_settings_schema_1.SettingSelectionSchema).optional(),
|
|
15
15
|
});
|
|
16
|
-
exports.ToolRequestArraySchema = zod_1.z.array(exports.ToolRequestSchema)
|
|
16
|
+
exports.ToolRequestArraySchema = zod_1.z.array(exports.ToolRequestSchema).superRefine((tools, context) => {
|
|
17
|
+
const seen = new Map();
|
|
18
|
+
for (let index = 0; index < tools.length; index++) {
|
|
19
|
+
const tool = tools[index];
|
|
20
|
+
const existingIndex = seen.get(tool.toolId);
|
|
21
|
+
if (existingIndex !== undefined) {
|
|
22
|
+
context.addIssue({
|
|
23
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
24
|
+
path: [index, 'toolId'],
|
|
25
|
+
message: 'ToolRequestArray.toolId.duplicate',
|
|
26
|
+
});
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
seen.set(tool.toolId, index);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
17
32
|
//# sourceMappingURL=tool.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.types.js","sourceRoot":"","sources":["../../../v1/ai/tool.types.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,qFAAmF;AACnF,iDAAwC;AAGxC,+CAAwC;AAA/B,sGAAA,MAAM,OAAA;AAKF,QAAA,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACtC,MAAM,EAAE,OAAC,CAAC,UAAU,CAAC,qBAAM,EAAE,EAAE,KAAK,EAAE,6BAA6B,EAAE,CAAC;IACtE,OAAO,EAAE,OAAC;SACL,MAAM,CAAC,EAAE,KAAK,EAAE,8BAA8B,EAAE,CAAC;SACjD,IAAI,CAAC,EAAE,OAAO,EAAE,6BAA6B,EAAE,CAAC;IAErD,QAAQ,EAAE,OAAC,CAAC,KAAK,CAAC,8CAAsB,CAAC,CAAC,QAAQ,EAAE;CACvD,CAAC,CAAC;AAIU,QAAA,sBAAsB,GAAG,OAAC,CAAC,KAAK,CAAC,yBAAiB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"tool.types.js","sourceRoot":"","sources":["../../../v1/ai/tool.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C,CAAC"}
|
|
@@ -47,6 +47,7 @@ export declare namespace AdminAiModelCreateCommand {
|
|
|
47
47
|
title: z.ZodString;
|
|
48
48
|
icon: z.ZodOptional<z.ZodString>;
|
|
49
49
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
50
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
50
51
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
51
52
|
}, z.core.$strip>>;
|
|
52
53
|
defaultOptionId: z.ZodString;
|
|
@@ -108,6 +109,7 @@ export declare namespace AdminAiModelCreateCommand {
|
|
|
108
109
|
title: z.ZodString;
|
|
109
110
|
icon: z.ZodOptional<z.ZodString>;
|
|
110
111
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
112
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
111
113
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
112
114
|
}, z.core.$strip>>;
|
|
113
115
|
defaultOptionId: z.ZodString;
|
|
@@ -47,6 +47,7 @@ export declare namespace AdminAiModelUpdateCommand {
|
|
|
47
47
|
title: z.ZodString;
|
|
48
48
|
icon: z.ZodOptional<z.ZodString>;
|
|
49
49
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
50
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
50
51
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
51
52
|
}, z.core.$strip>>;
|
|
52
53
|
defaultOptionId: z.ZodString;
|
|
@@ -108,6 +109,7 @@ export declare namespace AdminAiModelUpdateCommand {
|
|
|
108
109
|
title: z.ZodString;
|
|
109
110
|
icon: z.ZodOptional<z.ZodString>;
|
|
110
111
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
112
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
111
113
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
112
114
|
}, z.core.$strip>>;
|
|
113
115
|
defaultOptionId: z.ZodString;
|
|
@@ -49,6 +49,7 @@ export declare namespace AdminAiModelGetModelQuery {
|
|
|
49
49
|
title: z.ZodString;
|
|
50
50
|
icon: z.ZodOptional<z.ZodString>;
|
|
51
51
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
52
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
52
53
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
53
54
|
}, z.core.$strip>>;
|
|
54
55
|
defaultOptionId: z.ZodString;
|
|
@@ -56,6 +56,7 @@ export declare namespace AdminAiModelGetModelsQuery {
|
|
|
56
56
|
title: z.ZodString;
|
|
57
57
|
icon: z.ZodOptional<z.ZodString>;
|
|
58
58
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
59
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
59
60
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
60
61
|
}, z.core.$strip>>;
|
|
61
62
|
defaultOptionId: z.ZodString;
|
|
@@ -52,6 +52,7 @@ export declare const CreateModelRequestSchema: z.ZodObject<{
|
|
|
52
52
|
title: z.ZodString;
|
|
53
53
|
icon: z.ZodOptional<z.ZodString>;
|
|
54
54
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
55
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
55
56
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
56
57
|
}, z.core.$strip>>;
|
|
57
58
|
defaultOptionId: z.ZodString;
|
|
@@ -53,6 +53,7 @@ export declare const ModelResponseSchema: z.ZodObject<{
|
|
|
53
53
|
title: z.ZodString;
|
|
54
54
|
icon: z.ZodOptional<z.ZodString>;
|
|
55
55
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
56
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
56
57
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
57
58
|
}, z.core.$strip>>;
|
|
58
59
|
defaultOptionId: z.ZodString;
|
|
@@ -15,6 +15,7 @@ export declare const SettingOptionSchema: z.ZodObject<{
|
|
|
15
15
|
title: z.ZodString;
|
|
16
16
|
icon: z.ZodOptional<z.ZodString>;
|
|
17
17
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
18
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
18
19
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
19
20
|
}, z.core.$strip>;
|
|
20
21
|
export type SettingOption = z.infer<typeof SettingOptionSchema>;
|
|
@@ -35,6 +36,7 @@ export declare const SettingDefinitionSchema: z.ZodObject<{
|
|
|
35
36
|
title: z.ZodString;
|
|
36
37
|
icon: z.ZodOptional<z.ZodString>;
|
|
37
38
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
39
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
38
40
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
39
41
|
}, z.core.$strip>>;
|
|
40
42
|
defaultOptionId: z.ZodString;
|
|
@@ -68,6 +70,7 @@ export declare const ToolSettingsConfigSchema: z.ZodObject<{
|
|
|
68
70
|
title: z.ZodString;
|
|
69
71
|
icon: z.ZodOptional<z.ZodString>;
|
|
70
72
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
73
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
71
74
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
72
75
|
}, z.core.$strip>>;
|
|
73
76
|
defaultOptionId: z.ZodString;
|
|
@@ -113,6 +116,7 @@ export declare const ModelSettingsSchema: z.ZodObject<{
|
|
|
113
116
|
title: z.ZodString;
|
|
114
117
|
icon: z.ZodOptional<z.ZodString>;
|
|
115
118
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
119
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
116
120
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
117
121
|
}, z.core.$strip>>;
|
|
118
122
|
defaultOptionId: z.ZodString;
|
|
@@ -20,9 +20,13 @@ exports.SettingOptionSchema = zod_1.z.object({
|
|
|
20
20
|
title: zod_1.z.string().min(1),
|
|
21
21
|
icon: zod_1.z.string().optional(),
|
|
22
22
|
priceModifier: zod_1.z.number().int().min(0).default(0),
|
|
23
|
+
providerValue: zod_1.z.string().optional(),
|
|
23
24
|
promptSuffix: zod_1.z.string().optional(),
|
|
24
25
|
});
|
|
25
|
-
exports.SettingOptionClientSchema = exports.SettingOptionSchema.omit({
|
|
26
|
+
exports.SettingOptionClientSchema = exports.SettingOptionSchema.omit({
|
|
27
|
+
promptSuffix: true,
|
|
28
|
+
providerValue: true,
|
|
29
|
+
});
|
|
26
30
|
exports.SettingDefinitionSchema = zod_1.z.object({
|
|
27
31
|
key: zod_1.z.nativeEnum(SettingKey),
|
|
28
32
|
title: zod_1.z.string().min(1),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-settings.schema.js","sourceRoot":"","sources":["../../../../v1/ai-model/schemas/model-settings.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,wDAA+C;AAM/C,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IACxB,kDAA8B,CAAA;IAC9B,gDAA4B,CAAA;AAChC,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAMD,IAAY,UAOX;AAPD,WAAY,UAAU;IAElB,6BAAe,CAAA;IACf,0CAA4B,CAAA;IAC5B,uCAAyB,CAAA;IAEzB,wCAA0B,CAAA;AAC9B,CAAC,EAPW,UAAU,0BAAV,UAAU,QAOrB;AASY,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IACxC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACrB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACxB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAE3B,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,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AG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAEnC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAElC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAElC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACpC,CAAC,CAAC;AAOU,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IAExC,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,gCAAwB,CAAC,CAAC,QAAQ,EAAE;IAEnD,WAAW,EAAE,sCAA8B,CAAC,QAAQ,EAAE;CAEzD,CAAC,CAAC;AAOU,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC9C,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,sCAA8B,CAAC,CAAC,QAAQ,EAAE;IACzD,WAAW,EAAE,sCAA8B,CAAC,QAAQ,EAAE;CACzD,CAAC,CAAC;AAQU,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,GAAG,EAAE,OAAC,CAAC,UAAU,CAAC,UAAU,CAAC;IAE7B,SAAS,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;CACxD,CAAC,CAAC"}
|
|
@@ -52,6 +52,7 @@ export declare const UpdateModelRequestSchema: z.ZodObject<{
|
|
|
52
52
|
title: z.ZodString;
|
|
53
53
|
icon: z.ZodOptional<z.ZodString>;
|
|
54
54
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
55
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
55
56
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
56
57
|
}, z.core.$strip>>;
|
|
57
58
|
defaultOptionId: z.ZodString;
|
|
@@ -41,6 +41,16 @@ export declare namespace CreateMessageCommand {
|
|
|
41
41
|
stepType: z.ZodEnum<typeof import("../schemas").GenerationStepType>;
|
|
42
42
|
stepId: z.ZodString;
|
|
43
43
|
chunk: z.ZodString;
|
|
44
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
45
|
+
id: z.ZodNumber;
|
|
46
|
+
chatId: z.ZodString;
|
|
47
|
+
messageId: z.ZodString;
|
|
48
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.STEP_ERROR>;
|
|
49
|
+
stepType: z.ZodEnum<typeof import("../schemas").GenerationStepType>;
|
|
50
|
+
stepId: z.ZodString;
|
|
51
|
+
stepIndex: z.ZodNumber;
|
|
52
|
+
errorCode: z.ZodString;
|
|
53
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
44
54
|
}, z.core.$strip>, z.ZodObject<{
|
|
45
55
|
id: z.ZodNumber;
|
|
46
56
|
chatId: z.ZodString;
|
|
@@ -114,6 +124,17 @@ export declare namespace CreateMessageCommand {
|
|
|
114
124
|
stepId: z.ZodString;
|
|
115
125
|
chunk: z.ZodString;
|
|
116
126
|
}, z.core.$strip>;
|
|
127
|
+
const StepErrorEvent: z.ZodObject<{
|
|
128
|
+
id: z.ZodNumber;
|
|
129
|
+
chatId: z.ZodString;
|
|
130
|
+
messageId: z.ZodString;
|
|
131
|
+
type: z.ZodLiteral<import("../schemas").StreamEventType.STEP_ERROR>;
|
|
132
|
+
stepType: z.ZodEnum<typeof import("../schemas").GenerationStepType>;
|
|
133
|
+
stepId: z.ZodString;
|
|
134
|
+
stepIndex: z.ZodNumber;
|
|
135
|
+
errorCode: z.ZodString;
|
|
136
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
137
|
+
}, z.core.$strip>;
|
|
117
138
|
const StepDoneEvent: z.ZodObject<{
|
|
118
139
|
id: z.ZodNumber;
|
|
119
140
|
chatId: z.ZodString;
|
|
@@ -145,6 +166,7 @@ export declare namespace CreateMessageCommand {
|
|
|
145
166
|
type StreamEventType = z.infer<typeof StreamEvent>;
|
|
146
167
|
type StepStartEventType = z.infer<typeof StepStartEvent>;
|
|
147
168
|
type StepChunkEventType = z.infer<typeof StepChunkEvent>;
|
|
169
|
+
type StepErrorEventType = z.infer<typeof StepErrorEvent>;
|
|
148
170
|
type StepDoneEventType = z.infer<typeof StepDoneEvent>;
|
|
149
171
|
type DoneEventType = z.infer<typeof DoneEvent>;
|
|
150
172
|
type ErrorEventType = z.infer<typeof ErrorEvent>;
|
|
@@ -11,6 +11,7 @@ var CreateMessageCommand;
|
|
|
11
11
|
CreateMessageCommand.StreamEvent = schemas_1.StreamEventSchema;
|
|
12
12
|
CreateMessageCommand.StepStartEvent = schemas_1.StreamStepStartEventSchema;
|
|
13
13
|
CreateMessageCommand.StepChunkEvent = schemas_1.StreamStepChunkEventSchema;
|
|
14
|
+
CreateMessageCommand.StepErrorEvent = schemas_1.StreamStepErrorEventSchema;
|
|
14
15
|
CreateMessageCommand.StepDoneEvent = schemas_1.StreamStepDoneEventSchema;
|
|
15
16
|
CreateMessageCommand.DoneEvent = schemas_1.StreamDoneEventSchema;
|
|
16
17
|
CreateMessageCommand.ErrorEvent = schemas_1.StreamErrorEventSchema;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-message.command.js","sourceRoot":"","sources":["../../../../v1/message/commands/create-message.command.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"create-message.command.js","sourceRoot":"","sources":["../../../../v1/message/commands/create-message.command.ts"],"names":[],"mappings":";;;AACA,wCAUoB;AACpB,gDAA6C;AAC7C,6DAAyD;AAsCzD,IAAiB,oBAAoB,CA+BpC;AA/BD,WAAiB,oBAAoB;IACpB,4BAAO,GAAG,oCAA0B,CAAC;IACrC,6BAAQ,GAAG,qCAA2B,CAAC;IAGvC,gCAAW,GAAG,2BAAiB,CAAC;IAChC,mCAAc,GAAG,oCAA0B,CAAC;IAC5C,mCAAc,GAAG,oCAA0B,CAAC;IAC5C,mCAAc,GAAG,oCAA0B,CAAC;IAC5C,kCAAa,GAAG,mCAAyB,CAAC;IAC1C,8BAAS,GAAG,+BAAqB,CAAC;IAClC,+BAAU,GAAG,gCAAsB,CAAC;IAEpC,wBAAG,GAAG,CAAC,MAAc,EAAE,MAAc,EAAE,EAAE,CAClD,mBAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,2BAAM,GAAG,wBAAU,CAAC,IAAI,CAAC;IAGzB,iCAAY,GAAG,sBAA+B,CAAC;IAG/C,8BAAS,GAAG,IAAa,CAAC;AAU3C,CAAC,EA/BgB,oBAAoB,oCAApB,oBAAoB,QA+BpC"}
|
|
@@ -7,6 +7,7 @@ var MessageStepStatus;
|
|
|
7
7
|
MessageStepStatus["PENDING"] = "pending";
|
|
8
8
|
MessageStepStatus["RUNNING"] = "running";
|
|
9
9
|
MessageStepStatus["COMPLETED"] = "completed";
|
|
10
|
+
MessageStepStatus["PARTIAL"] = "partial";
|
|
10
11
|
MessageStepStatus["FAILED"] = "failed";
|
|
11
12
|
MessageStepStatus["CANCELLED"] = "cancelled";
|
|
12
13
|
})(MessageStepStatus || (exports.MessageStepStatus = MessageStepStatus = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generation-step.schema.js","sourceRoot":"","sources":["../../../../v1/message/schemas/generation-step.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAKxB,IAAY,
|
|
1
|
+
{"version":3,"file":"generation-step.schema.js","sourceRoot":"","sources":["../../../../v1/message/schemas/generation-step.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAKxB,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IACzB,wCAAmB,CAAA;IACnB,wCAAmB,CAAA;IACnB,4CAAuB,CAAA;IACvB,wCAAmB,CAAA;IACnB,sCAAiB,CAAA;IACjB,4CAAuB,CAAA;AAC3B,CAAC,EAPW,iBAAiB,iCAAjB,iBAAiB,QAO5B;AAKD,IAAY,kBAaX;AAbD,WAAY,kBAAkB;IAE1B,6CAAuB,CAAA;IAEvB,6DAAuC,CAAA;IAEvC,yDAAmC,CAAA;IAEnC,2DAAqC,CAAA;IAErC,uCAAiB,CAAA;IAEjB,+CAAyB,CAAA;AAC7B,CAAC,EAbW,kBAAkB,kCAAlB,kBAAkB,QAa7B;AAKY,QAAA,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IAEzC,IAAI,EAAE,OAAC,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAEtC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IAEnB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAErC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAEjC,gBAAgB,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAE5C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAEhC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC"}
|
|
@@ -10,7 +10,7 @@ export { MessageAttachmentResponseSchema, MessageAttachmentsResponseSchema, Atta
|
|
|
10
10
|
export type { MessageAttachmentResponse, MessageAttachmentsResponse, AttachmentMetaResponse, } from './message-attachment-response.schema';
|
|
11
11
|
export { MessageCitationResponseSchema, MessageCitationsResponseSchema, } from './message-citation-response.schema';
|
|
12
12
|
export type { MessageCitationResponse, MessageCitationsResponse, } from './message-citation-response.schema';
|
|
13
|
-
export { StreamEventType, StreamEventSchema, StreamStepStartEventSchema, StreamStepChunkEventSchema, StreamStepDoneEventSchema, StreamImageEventSchema, StreamImageGenerationErrorEventSchema, StreamCitationsEventSchema, StreamHeartbeatEventSchema, StreamDoneEventSchema, StreamCancelledEventSchema, StreamErrorEventSchema, } from './stream-events.schema';
|
|
13
|
+
export { StreamEventType, StreamEventSchema, StreamStepStartEventSchema, StreamStepChunkEventSchema, StreamStepErrorEventSchema, StreamStepDoneEventSchema, StreamImageEventSchema, StreamImageGenerationErrorEventSchema, StreamCitationsEventSchema, StreamHeartbeatEventSchema, StreamDoneEventSchema, StreamCancelledEventSchema, StreamErrorEventSchema, } from './stream-events.schema';
|
|
14
14
|
export { CitationSchema, CitationStatus, type Citation } from './citation.schema';
|
|
15
15
|
export { AttachmentSource, AttachmentType, AttachmentStatus, AttachmentSchema, AttachmentsSchema, } from './message-attachment.schema';
|
|
16
16
|
export type { Attachment, Attachments } from './message-attachment.schema';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CancelStreamResponseSchema = exports.DeleteMessageResponseSchema = exports.DeleteMessageParamsSchema = exports.RateMessageParamsSchema = exports.RateMessageResponseSchema = exports.RateMessageRequestSchema = exports.MessageStepStatus = exports.GenerationStepType = exports.GenerationStepSchema = exports.AttachmentsSchema = exports.AttachmentSchema = exports.AttachmentStatus = exports.AttachmentType = exports.AttachmentSource = exports.CitationStatus = exports.CitationSchema = exports.StreamErrorEventSchema = exports.StreamCancelledEventSchema = exports.StreamDoneEventSchema = exports.StreamHeartbeatEventSchema = exports.StreamCitationsEventSchema = exports.StreamImageGenerationErrorEventSchema = exports.StreamImageEventSchema = exports.StreamStepDoneEventSchema = exports.StreamStepChunkEventSchema = exports.StreamStepStartEventSchema = exports.StreamEventSchema = exports.StreamEventType = exports.MessageCitationsResponseSchema = exports.MessageCitationResponseSchema = exports.AttachmentMetaResponseSchema = exports.MessageAttachmentsResponseSchema = exports.MessageAttachmentResponseSchema = exports.UploadStepContentSchema = exports.ImageGenStepContentSchema = exports.WebSearchStepContentSchema = exports.WebSearchCitationSchema = exports.TextStepContentSchema = exports.StepContentResponseSchema = exports.MessageStepsResponseSchema = exports.MessageStepResponseSchema = exports.MessageResponseSchema = exports.CreateMessageResponseSchema = exports.CreateMessageRequestSchema = exports.UserRating = exports.MessageStatus = exports.MessageRole = void 0;
|
|
3
|
+
exports.CancelStreamResponseSchema = exports.DeleteMessageResponseSchema = exports.DeleteMessageParamsSchema = exports.RateMessageParamsSchema = exports.RateMessageResponseSchema = exports.RateMessageRequestSchema = exports.MessageStepStatus = exports.GenerationStepType = exports.GenerationStepSchema = exports.AttachmentsSchema = exports.AttachmentSchema = exports.AttachmentStatus = exports.AttachmentType = exports.AttachmentSource = exports.CitationStatus = exports.CitationSchema = exports.StreamErrorEventSchema = exports.StreamCancelledEventSchema = exports.StreamDoneEventSchema = exports.StreamHeartbeatEventSchema = exports.StreamCitationsEventSchema = exports.StreamImageGenerationErrorEventSchema = exports.StreamImageEventSchema = exports.StreamStepDoneEventSchema = exports.StreamStepErrorEventSchema = exports.StreamStepChunkEventSchema = exports.StreamStepStartEventSchema = exports.StreamEventSchema = exports.StreamEventType = exports.MessageCitationsResponseSchema = exports.MessageCitationResponseSchema = exports.AttachmentMetaResponseSchema = exports.MessageAttachmentsResponseSchema = exports.MessageAttachmentResponseSchema = exports.UploadStepContentSchema = exports.ImageGenStepContentSchema = exports.WebSearchStepContentSchema = exports.WebSearchCitationSchema = exports.TextStepContentSchema = exports.StepContentResponseSchema = exports.MessageStepsResponseSchema = exports.MessageStepResponseSchema = exports.MessageResponseSchema = exports.CreateMessageResponseSchema = exports.CreateMessageRequestSchema = exports.UserRating = exports.MessageStatus = exports.MessageRole = void 0;
|
|
4
4
|
var message_role_enum_1 = require("./message-role.enum");
|
|
5
5
|
Object.defineProperty(exports, "MessageRole", { enumerable: true, get: function () { return message_role_enum_1.MessageRole; } });
|
|
6
6
|
var message_status_enum_1 = require("./message-status.enum");
|
|
@@ -34,6 +34,7 @@ Object.defineProperty(exports, "StreamEventType", { enumerable: true, get: funct
|
|
|
34
34
|
Object.defineProperty(exports, "StreamEventSchema", { enumerable: true, get: function () { return stream_events_schema_1.StreamEventSchema; } });
|
|
35
35
|
Object.defineProperty(exports, "StreamStepStartEventSchema", { enumerable: true, get: function () { return stream_events_schema_1.StreamStepStartEventSchema; } });
|
|
36
36
|
Object.defineProperty(exports, "StreamStepChunkEventSchema", { enumerable: true, get: function () { return stream_events_schema_1.StreamStepChunkEventSchema; } });
|
|
37
|
+
Object.defineProperty(exports, "StreamStepErrorEventSchema", { enumerable: true, get: function () { return stream_events_schema_1.StreamStepErrorEventSchema; } });
|
|
37
38
|
Object.defineProperty(exports, "StreamStepDoneEventSchema", { enumerable: true, get: function () { return stream_events_schema_1.StreamStepDoneEventSchema; } });
|
|
38
39
|
Object.defineProperty(exports, "StreamImageEventSchema", { enumerable: true, get: function () { return stream_events_schema_1.StreamImageEventSchema; } });
|
|
39
40
|
Object.defineProperty(exports, "StreamImageGenerationErrorEventSchema", { enumerable: true, get: function () { return stream_events_schema_1.StreamImageGenerationErrorEventSchema; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../v1/message/schemas/index.ts"],"names":[],"mappings":";;;AAAA,yDAAkD;AAAzC,gHAAA,WAAW,OAAA;AACpB,6DAAsD;AAA7C,oHAAA,aAAa,OAAA;AACtB,uDAAgD;AAAvC,8GAAA,UAAU,OAAA;AACnB,iFAA6E;AAApE,2IAAA,0BAA0B,OAAA;AACnC,mFAA+E;AAAtE,6IAAA,2BAA2B,OAAA;AACpC,qEAAkE;AAAzD,gIAAA,qBAAqB,OAAA;AAC9B,+EASwC;AARpC,yIAAA,yBAAyB,OAAA;AACzB,0IAAA,0BAA0B,OAAA;AAC1B,yIAAA,yBAAyB,OAAA;AACzB,qIAAA,qBAAqB,OAAA;AACrB,uIAAA,uBAAuB,OAAA;AACvB,0IAAA,0BAA0B,OAAA;AAC1B,yIAAA,yBAAyB,OAAA;AACzB,uIAAA,uBA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AAA;AAC1B,6HAAA,qBAAqB,OAAA;AACrB,kIAAA,0BAA0B,OAAA;AAC1B,8HAAA,sBAAsB,OAAA;AAE1B,qDAAkF;AAAzE,iHAAA,cAAc,OAAA;AAAE,iHAAA,cAAc,OAAA;AACvC,yEAMqC;AALjC,6HAAA,gBAAgB,OAAA;AAChB,2HAAA,cAAc,OAAA;AACd,6HAAA,gBAAgB,OAAA;AAChB,6HAAA,gBAAgB,OAAA;AAChB,8HAAA,iBAAiB,OAAA;AAGrB,mEAIkC;AAH9B,8HAAA,oBAAoB,OAAA;AACpB,4HAAA,kBAAkB,OAAA;AAClB,2HAAA,iBAAiB,OAAA;AAGrB,6DAI+B;AAH3B,+HAAA,wBAAwB,OAAA;AACxB,gIAAA,yBAAyB,OAAA;AACzB,8HAAA,uBAAuB,OAAA;AAO3B,iEAAiG;AAAxF,kIAAA,yBAAyB,OAAA;AAAE,oIAAA,2BAA2B,OAAA;AAE/D,iFAA6E;AAApE,2IAAA,0BAA0B,OAAA"}
|
|
@@ -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,MAAM,EAAE,CAAC,IAAI,EAAE;IAEzB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE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