@veruna/api-contracts 1.0.76 → 1.0.78
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 +50 -3
- package/build/v1/ai-model/admin/commands/update-model.command.d.ts +50 -3
- 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 +49 -3
- package/build/v1/ai-model/schemas/create-model-request.schema.js +1 -1
- package/build/v1/ai-model/schemas/create-model-request.schema.js.map +1 -1
- package/build/v1/ai-model/schemas/model-response.schema.d.ts +1 -0
- package/build/v1/ai-model/schemas/model-settings.schema.d.ts +213 -0
- package/build/v1/ai-model/schemas/model-settings.schema.js +46 -2
- 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 +49 -3
- package/build/v1/ai-model/schemas/update-model-request.schema.js +1 -1
- package/build/v1/ai-model/schemas/update-model-request.schema.js.map +1 -1
- 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.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,WAAW,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;IAC5F,MAAM,IAAI,GAAG,IAAI,GAAG,EAAkB,CAAC;IAEvC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC;QAChD,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QAC1B,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5C,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;YAC9B,OAAO,CAAC,QAAQ,CAAC;gBACb,IAAI,EAAE,OAAC,CAAC,YAAY,CAAC,MAAM;gBAC3B,IAAI,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC;gBACvB,OAAO,EAAE,mCAAmC;aAC/C,CAAC,CAAC;YACH,SAAS;QACb,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACjC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -37,21 +37,67 @@ export declare namespace AdminAiModelCreateCommand {
|
|
|
37
37
|
settings: z.ZodOptional<z.ZodObject<{
|
|
38
38
|
tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
39
39
|
toolId: z.ZodEnum<typeof import("../../..").ToolId>;
|
|
40
|
-
settings: z.ZodArray<z.ZodObject<{
|
|
41
|
-
key: z.ZodEnum<typeof import("../../schemas").SettingKey>;
|
|
40
|
+
settings: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
42
41
|
title: z.ZodString;
|
|
43
42
|
icon: z.ZodOptional<z.ZodString>;
|
|
44
43
|
inputType: z.ZodEnum<typeof import("../../schemas").SettingInputType>;
|
|
44
|
+
defaultOptionId: z.ZodString;
|
|
45
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
key: z.ZodLiteral<import("../../schemas").SettingKey.STYLE>;
|
|
45
47
|
options: z.ZodArray<z.ZodObject<{
|
|
46
48
|
id: z.ZodString;
|
|
47
49
|
title: z.ZodString;
|
|
48
50
|
icon: z.ZodOptional<z.ZodString>;
|
|
49
51
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
52
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
50
53
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
51
54
|
}, z.core.$strip>>;
|
|
55
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
56
|
+
title: z.ZodString;
|
|
57
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
58
|
+
inputType: z.ZodEnum<typeof import("../../schemas").SettingInputType>;
|
|
52
59
|
defaultOptionId: z.ZodString;
|
|
53
60
|
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
54
|
-
|
|
61
|
+
key: z.ZodLiteral<import("../../schemas").SettingKey.MAX_RESULTS>;
|
|
62
|
+
options: z.ZodArray<z.ZodObject<{
|
|
63
|
+
id: z.ZodString;
|
|
64
|
+
title: z.ZodString;
|
|
65
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
66
|
+
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
67
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
68
|
+
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
69
|
+
}, z.core.$strip>>;
|
|
70
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
71
|
+
title: z.ZodString;
|
|
72
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
73
|
+
inputType: z.ZodEnum<typeof import("../../schemas").SettingInputType>;
|
|
74
|
+
defaultOptionId: z.ZodString;
|
|
75
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
key: z.ZodLiteral<import("../../schemas").SettingKey.ASPECT_RATIO>;
|
|
77
|
+
options: z.ZodArray<z.ZodObject<{
|
|
78
|
+
id: z.ZodString;
|
|
79
|
+
title: z.ZodString;
|
|
80
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
81
|
+
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
82
|
+
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
83
|
+
providerValue: z.ZodString;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
86
|
+
title: z.ZodString;
|
|
87
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
88
|
+
inputType: z.ZodEnum<typeof import("../../schemas").SettingInputType>;
|
|
89
|
+
defaultOptionId: z.ZodString;
|
|
90
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
key: z.ZodLiteral<import("../../schemas").SettingKey.RESOLUTION>;
|
|
92
|
+
options: z.ZodArray<z.ZodObject<{
|
|
93
|
+
id: z.ZodString;
|
|
94
|
+
title: z.ZodString;
|
|
95
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
96
|
+
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
97
|
+
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
98
|
+
providerValue: z.ZodString;
|
|
99
|
+
}, z.core.$strip>>;
|
|
100
|
+
}, z.core.$strip>], "key">>;
|
|
55
101
|
}, z.core.$strip>>>;
|
|
56
102
|
attachments: z.ZodOptional<z.ZodObject<{
|
|
57
103
|
imagePrice: z.ZodNumber;
|
|
@@ -108,6 +154,7 @@ export declare namespace AdminAiModelCreateCommand {
|
|
|
108
154
|
title: z.ZodString;
|
|
109
155
|
icon: z.ZodOptional<z.ZodString>;
|
|
110
156
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
157
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
111
158
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
112
159
|
}, z.core.$strip>>;
|
|
113
160
|
defaultOptionId: z.ZodString;
|
|
@@ -37,21 +37,67 @@ export declare namespace AdminAiModelUpdateCommand {
|
|
|
37
37
|
settings: z.ZodOptional<z.ZodObject<{
|
|
38
38
|
tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
39
39
|
toolId: z.ZodEnum<typeof import("../../..").ToolId>;
|
|
40
|
-
settings: z.ZodArray<z.ZodObject<{
|
|
41
|
-
key: z.ZodEnum<typeof import("../../schemas").SettingKey>;
|
|
40
|
+
settings: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
42
41
|
title: z.ZodString;
|
|
43
42
|
icon: z.ZodOptional<z.ZodString>;
|
|
44
43
|
inputType: z.ZodEnum<typeof import("../../schemas").SettingInputType>;
|
|
44
|
+
defaultOptionId: z.ZodString;
|
|
45
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
46
|
+
key: z.ZodLiteral<import("../../schemas").SettingKey.STYLE>;
|
|
45
47
|
options: z.ZodArray<z.ZodObject<{
|
|
46
48
|
id: z.ZodString;
|
|
47
49
|
title: z.ZodString;
|
|
48
50
|
icon: z.ZodOptional<z.ZodString>;
|
|
49
51
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
52
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
50
53
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
51
54
|
}, z.core.$strip>>;
|
|
55
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
56
|
+
title: z.ZodString;
|
|
57
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
58
|
+
inputType: z.ZodEnum<typeof import("../../schemas").SettingInputType>;
|
|
52
59
|
defaultOptionId: z.ZodString;
|
|
53
60
|
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
54
|
-
|
|
61
|
+
key: z.ZodLiteral<import("../../schemas").SettingKey.MAX_RESULTS>;
|
|
62
|
+
options: z.ZodArray<z.ZodObject<{
|
|
63
|
+
id: z.ZodString;
|
|
64
|
+
title: z.ZodString;
|
|
65
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
66
|
+
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
67
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
68
|
+
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
69
|
+
}, z.core.$strip>>;
|
|
70
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
71
|
+
title: z.ZodString;
|
|
72
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
73
|
+
inputType: z.ZodEnum<typeof import("../../schemas").SettingInputType>;
|
|
74
|
+
defaultOptionId: z.ZodString;
|
|
75
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
key: z.ZodLiteral<import("../../schemas").SettingKey.ASPECT_RATIO>;
|
|
77
|
+
options: z.ZodArray<z.ZodObject<{
|
|
78
|
+
id: z.ZodString;
|
|
79
|
+
title: z.ZodString;
|
|
80
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
81
|
+
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
82
|
+
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
83
|
+
providerValue: z.ZodString;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
86
|
+
title: z.ZodString;
|
|
87
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
88
|
+
inputType: z.ZodEnum<typeof import("../../schemas").SettingInputType>;
|
|
89
|
+
defaultOptionId: z.ZodString;
|
|
90
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
key: z.ZodLiteral<import("../../schemas").SettingKey.RESOLUTION>;
|
|
92
|
+
options: z.ZodArray<z.ZodObject<{
|
|
93
|
+
id: z.ZodString;
|
|
94
|
+
title: z.ZodString;
|
|
95
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
96
|
+
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
97
|
+
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
98
|
+
providerValue: z.ZodString;
|
|
99
|
+
}, z.core.$strip>>;
|
|
100
|
+
}, z.core.$strip>], "key">>;
|
|
55
101
|
}, z.core.$strip>>>;
|
|
56
102
|
attachments: z.ZodOptional<z.ZodObject<{
|
|
57
103
|
imagePrice: z.ZodNumber;
|
|
@@ -108,6 +154,7 @@ export declare namespace AdminAiModelUpdateCommand {
|
|
|
108
154
|
title: z.ZodString;
|
|
109
155
|
icon: z.ZodOptional<z.ZodString>;
|
|
110
156
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
157
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
111
158
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
112
159
|
}, z.core.$strip>>;
|
|
113
160
|
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;
|
|
@@ -42,21 +42,67 @@ export declare const CreateModelRequestSchema: z.ZodObject<{
|
|
|
42
42
|
settings: z.ZodOptional<z.ZodObject<{
|
|
43
43
|
tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
44
44
|
toolId: z.ZodEnum<typeof ToolId>;
|
|
45
|
-
settings: z.ZodArray<z.ZodObject<{
|
|
46
|
-
key: z.ZodEnum<typeof import("./model-settings.schema").SettingKey>;
|
|
45
|
+
settings: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
47
46
|
title: z.ZodString;
|
|
48
47
|
icon: z.ZodOptional<z.ZodString>;
|
|
49
48
|
inputType: z.ZodEnum<typeof import("./model-settings.schema").SettingInputType>;
|
|
49
|
+
defaultOptionId: z.ZodString;
|
|
50
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
key: z.ZodLiteral<import("./model-settings.schema").SettingKey.STYLE>;
|
|
52
|
+
options: z.ZodArray<z.ZodObject<{
|
|
53
|
+
id: z.ZodString;
|
|
54
|
+
title: z.ZodString;
|
|
55
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
56
|
+
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
57
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
58
|
+
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
59
|
+
}, z.core.$strip>>;
|
|
60
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
61
|
+
title: z.ZodString;
|
|
62
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
63
|
+
inputType: z.ZodEnum<typeof import("./model-settings.schema").SettingInputType>;
|
|
64
|
+
defaultOptionId: z.ZodString;
|
|
65
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
66
|
+
key: z.ZodLiteral<import("./model-settings.schema").SettingKey.MAX_RESULTS>;
|
|
67
|
+
options: z.ZodArray<z.ZodObject<{
|
|
68
|
+
id: z.ZodString;
|
|
69
|
+
title: z.ZodString;
|
|
70
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
71
|
+
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
72
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
73
|
+
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
74
|
+
}, z.core.$strip>>;
|
|
75
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
76
|
+
title: z.ZodString;
|
|
77
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
78
|
+
inputType: z.ZodEnum<typeof import("./model-settings.schema").SettingInputType>;
|
|
79
|
+
defaultOptionId: z.ZodString;
|
|
80
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
81
|
+
key: z.ZodLiteral<import("./model-settings.schema").SettingKey.ASPECT_RATIO>;
|
|
50
82
|
options: z.ZodArray<z.ZodObject<{
|
|
51
83
|
id: z.ZodString;
|
|
52
84
|
title: z.ZodString;
|
|
53
85
|
icon: z.ZodOptional<z.ZodString>;
|
|
54
86
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
55
87
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
88
|
+
providerValue: z.ZodString;
|
|
56
89
|
}, z.core.$strip>>;
|
|
90
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
91
|
+
title: z.ZodString;
|
|
92
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
93
|
+
inputType: z.ZodEnum<typeof import("./model-settings.schema").SettingInputType>;
|
|
57
94
|
defaultOptionId: z.ZodString;
|
|
58
95
|
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
59
|
-
|
|
96
|
+
key: z.ZodLiteral<import("./model-settings.schema").SettingKey.RESOLUTION>;
|
|
97
|
+
options: z.ZodArray<z.ZodObject<{
|
|
98
|
+
id: z.ZodString;
|
|
99
|
+
title: z.ZodString;
|
|
100
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
101
|
+
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
102
|
+
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
103
|
+
providerValue: z.ZodString;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
}, z.core.$strip>], "key">>;
|
|
60
106
|
}, z.core.$strip>>>;
|
|
61
107
|
attachments: z.ZodOptional<z.ZodObject<{
|
|
62
108
|
imagePrice: z.ZodNumber;
|
|
@@ -65,6 +65,6 @@ exports.CreateModelRequestSchema = zod_1.z.object({
|
|
|
65
65
|
systemPrompt: zod_1.z.string().nullable().optional(),
|
|
66
66
|
isAvailableForUnreg: zod_1.z.boolean().default(false),
|
|
67
67
|
plugins: plugins_types_1.PluginsConfigArraySchema.default([]),
|
|
68
|
-
settings: model_settings_schema_1.
|
|
68
|
+
settings: model_settings_schema_1.ModelSettingsWriteSchema.optional(),
|
|
69
69
|
});
|
|
70
70
|
//# sourceMappingURL=create-model-request.schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-model-request.schema.js","sourceRoot":"","sources":["../../../../v1/ai-model/schemas/create-model-request.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iEAAuD;AACvD,uDAA8C;AAC9C,uDAA8C;AAC9C,uDAA8C;AAC9C,2DAAkD;AAClD,mDAA2C;AAC3C,0DAAkE;AAClE,oDAA6C;AAC7C,
|
|
1
|
+
{"version":3,"file":"create-model-request.schema.js","sourceRoot":"","sources":["../../../../v1/ai-model/schemas/create-model-request.schema.ts"],"names":[],"mappings":"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"}
|
|
@@ -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,9 +15,19 @@ 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>;
|
|
22
|
+
export declare const SettingOptionWithProviderValueSchema: z.ZodObject<{
|
|
23
|
+
id: z.ZodString;
|
|
24
|
+
title: z.ZodString;
|
|
25
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
26
|
+
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
27
|
+
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
28
|
+
providerValue: z.ZodString;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
export type SettingOptionWithProviderValue = z.infer<typeof SettingOptionWithProviderValueSchema>;
|
|
21
31
|
export declare const SettingOptionClientSchema: z.ZodObject<{
|
|
22
32
|
title: z.ZodString;
|
|
23
33
|
icon: z.ZodOptional<z.ZodString>;
|
|
@@ -35,12 +45,75 @@ export declare const SettingDefinitionSchema: z.ZodObject<{
|
|
|
35
45
|
title: z.ZodString;
|
|
36
46
|
icon: z.ZodOptional<z.ZodString>;
|
|
37
47
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
48
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
38
49
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
39
50
|
}, z.core.$strip>>;
|
|
40
51
|
defaultOptionId: z.ZodString;
|
|
41
52
|
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
42
53
|
}, z.core.$strip>;
|
|
43
54
|
export type SettingDefinition = z.infer<typeof SettingDefinitionSchema>;
|
|
55
|
+
export declare const SettingDefinitionWriteSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
56
|
+
title: z.ZodString;
|
|
57
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
58
|
+
inputType: z.ZodEnum<typeof SettingInputType>;
|
|
59
|
+
defaultOptionId: z.ZodString;
|
|
60
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
61
|
+
key: z.ZodLiteral<SettingKey.STYLE>;
|
|
62
|
+
options: z.ZodArray<z.ZodObject<{
|
|
63
|
+
id: z.ZodString;
|
|
64
|
+
title: z.ZodString;
|
|
65
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
66
|
+
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
67
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
68
|
+
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
69
|
+
}, z.core.$strip>>;
|
|
70
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
71
|
+
title: z.ZodString;
|
|
72
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
73
|
+
inputType: z.ZodEnum<typeof SettingInputType>;
|
|
74
|
+
defaultOptionId: z.ZodString;
|
|
75
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
76
|
+
key: z.ZodLiteral<SettingKey.MAX_RESULTS>;
|
|
77
|
+
options: z.ZodArray<z.ZodObject<{
|
|
78
|
+
id: z.ZodString;
|
|
79
|
+
title: z.ZodString;
|
|
80
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
81
|
+
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
82
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
83
|
+
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
86
|
+
title: z.ZodString;
|
|
87
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
88
|
+
inputType: z.ZodEnum<typeof SettingInputType>;
|
|
89
|
+
defaultOptionId: z.ZodString;
|
|
90
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
key: z.ZodLiteral<SettingKey.ASPECT_RATIO>;
|
|
92
|
+
options: z.ZodArray<z.ZodObject<{
|
|
93
|
+
id: z.ZodString;
|
|
94
|
+
title: z.ZodString;
|
|
95
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
96
|
+
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
97
|
+
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
98
|
+
providerValue: z.ZodString;
|
|
99
|
+
}, z.core.$strip>>;
|
|
100
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
101
|
+
title: z.ZodString;
|
|
102
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
103
|
+
inputType: z.ZodEnum<typeof SettingInputType>;
|
|
104
|
+
defaultOptionId: z.ZodString;
|
|
105
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
106
|
+
key: z.ZodLiteral<SettingKey.RESOLUTION>;
|
|
107
|
+
options: z.ZodArray<z.ZodObject<{
|
|
108
|
+
id: z.ZodString;
|
|
109
|
+
title: z.ZodString;
|
|
110
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
111
|
+
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
112
|
+
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
113
|
+
providerValue: z.ZodString;
|
|
114
|
+
}, z.core.$strip>>;
|
|
115
|
+
}, z.core.$strip>], "key">;
|
|
116
|
+
export type SettingDefinitionWrite = z.infer<typeof SettingDefinitionWriteSchema>;
|
|
44
117
|
export declare const SettingDefinitionClientSchema: z.ZodObject<{
|
|
45
118
|
key: z.ZodEnum<typeof SettingKey>;
|
|
46
119
|
title: z.ZodString;
|
|
@@ -68,6 +141,7 @@ export declare const ToolSettingsConfigSchema: z.ZodObject<{
|
|
|
68
141
|
title: z.ZodString;
|
|
69
142
|
icon: z.ZodOptional<z.ZodString>;
|
|
70
143
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
144
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
71
145
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
72
146
|
}, z.core.$strip>>;
|
|
73
147
|
defaultOptionId: z.ZodString;
|
|
@@ -75,6 +149,71 @@ export declare const ToolSettingsConfigSchema: z.ZodObject<{
|
|
|
75
149
|
}, z.core.$strip>>;
|
|
76
150
|
}, z.core.$strip>;
|
|
77
151
|
export type ToolSettingsConfig = z.infer<typeof ToolSettingsConfigSchema>;
|
|
152
|
+
export declare const ToolSettingsConfigWriteSchema: z.ZodObject<{
|
|
153
|
+
toolId: z.ZodEnum<typeof ToolId>;
|
|
154
|
+
settings: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
155
|
+
title: z.ZodString;
|
|
156
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
157
|
+
inputType: z.ZodEnum<typeof SettingInputType>;
|
|
158
|
+
defaultOptionId: z.ZodString;
|
|
159
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
160
|
+
key: z.ZodLiteral<SettingKey.STYLE>;
|
|
161
|
+
options: z.ZodArray<z.ZodObject<{
|
|
162
|
+
id: z.ZodString;
|
|
163
|
+
title: z.ZodString;
|
|
164
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
165
|
+
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
166
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
167
|
+
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
168
|
+
}, z.core.$strip>>;
|
|
169
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
170
|
+
title: z.ZodString;
|
|
171
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
172
|
+
inputType: z.ZodEnum<typeof SettingInputType>;
|
|
173
|
+
defaultOptionId: z.ZodString;
|
|
174
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
175
|
+
key: z.ZodLiteral<SettingKey.MAX_RESULTS>;
|
|
176
|
+
options: z.ZodArray<z.ZodObject<{
|
|
177
|
+
id: z.ZodString;
|
|
178
|
+
title: z.ZodString;
|
|
179
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
180
|
+
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
181
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
182
|
+
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
183
|
+
}, z.core.$strip>>;
|
|
184
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
185
|
+
title: z.ZodString;
|
|
186
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
187
|
+
inputType: z.ZodEnum<typeof SettingInputType>;
|
|
188
|
+
defaultOptionId: z.ZodString;
|
|
189
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
190
|
+
key: z.ZodLiteral<SettingKey.ASPECT_RATIO>;
|
|
191
|
+
options: z.ZodArray<z.ZodObject<{
|
|
192
|
+
id: z.ZodString;
|
|
193
|
+
title: z.ZodString;
|
|
194
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
195
|
+
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
196
|
+
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
197
|
+
providerValue: z.ZodString;
|
|
198
|
+
}, z.core.$strip>>;
|
|
199
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
200
|
+
title: z.ZodString;
|
|
201
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
202
|
+
inputType: z.ZodEnum<typeof SettingInputType>;
|
|
203
|
+
defaultOptionId: z.ZodString;
|
|
204
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
205
|
+
key: z.ZodLiteral<SettingKey.RESOLUTION>;
|
|
206
|
+
options: z.ZodArray<z.ZodObject<{
|
|
207
|
+
id: z.ZodString;
|
|
208
|
+
title: z.ZodString;
|
|
209
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
210
|
+
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
211
|
+
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
212
|
+
providerValue: z.ZodString;
|
|
213
|
+
}, z.core.$strip>>;
|
|
214
|
+
}, z.core.$strip>], "key">>;
|
|
215
|
+
}, z.core.$strip>;
|
|
216
|
+
export type ToolSettingsConfigWrite = z.infer<typeof ToolSettingsConfigWriteSchema>;
|
|
78
217
|
export declare const ToolSettingsConfigClientSchema: z.ZodObject<{
|
|
79
218
|
toolId: z.ZodEnum<typeof ToolId>;
|
|
80
219
|
settings: z.ZodArray<z.ZodObject<{
|
|
@@ -113,6 +252,7 @@ export declare const ModelSettingsSchema: z.ZodObject<{
|
|
|
113
252
|
title: z.ZodString;
|
|
114
253
|
icon: z.ZodOptional<z.ZodString>;
|
|
115
254
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
255
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
116
256
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
117
257
|
}, z.core.$strip>>;
|
|
118
258
|
defaultOptionId: z.ZodString;
|
|
@@ -127,6 +267,79 @@ export declare const ModelSettingsSchema: z.ZodObject<{
|
|
|
127
267
|
}, z.core.$strip>>;
|
|
128
268
|
}, z.core.$strip>;
|
|
129
269
|
export type ModelSettings = z.infer<typeof ModelSettingsSchema>;
|
|
270
|
+
export declare const ModelSettingsWriteSchema: z.ZodObject<{
|
|
271
|
+
tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
272
|
+
toolId: z.ZodEnum<typeof ToolId>;
|
|
273
|
+
settings: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
274
|
+
title: z.ZodString;
|
|
275
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
276
|
+
inputType: z.ZodEnum<typeof SettingInputType>;
|
|
277
|
+
defaultOptionId: z.ZodString;
|
|
278
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
279
|
+
key: z.ZodLiteral<SettingKey.STYLE>;
|
|
280
|
+
options: z.ZodArray<z.ZodObject<{
|
|
281
|
+
id: z.ZodString;
|
|
282
|
+
title: z.ZodString;
|
|
283
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
284
|
+
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
285
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
286
|
+
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
287
|
+
}, z.core.$strip>>;
|
|
288
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
289
|
+
title: z.ZodString;
|
|
290
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
291
|
+
inputType: z.ZodEnum<typeof SettingInputType>;
|
|
292
|
+
defaultOptionId: z.ZodString;
|
|
293
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
294
|
+
key: z.ZodLiteral<SettingKey.MAX_RESULTS>;
|
|
295
|
+
options: z.ZodArray<z.ZodObject<{
|
|
296
|
+
id: z.ZodString;
|
|
297
|
+
title: z.ZodString;
|
|
298
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
299
|
+
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
300
|
+
providerValue: z.ZodOptional<z.ZodString>;
|
|
301
|
+
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
302
|
+
}, z.core.$strip>>;
|
|
303
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
304
|
+
title: z.ZodString;
|
|
305
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
306
|
+
inputType: z.ZodEnum<typeof SettingInputType>;
|
|
307
|
+
defaultOptionId: z.ZodString;
|
|
308
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
309
|
+
key: z.ZodLiteral<SettingKey.ASPECT_RATIO>;
|
|
310
|
+
options: z.ZodArray<z.ZodObject<{
|
|
311
|
+
id: z.ZodString;
|
|
312
|
+
title: z.ZodString;
|
|
313
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
314
|
+
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
315
|
+
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
316
|
+
providerValue: z.ZodString;
|
|
317
|
+
}, z.core.$strip>>;
|
|
318
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
319
|
+
title: z.ZodString;
|
|
320
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
321
|
+
inputType: z.ZodEnum<typeof SettingInputType>;
|
|
322
|
+
defaultOptionId: z.ZodString;
|
|
323
|
+
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
324
|
+
key: z.ZodLiteral<SettingKey.RESOLUTION>;
|
|
325
|
+
options: z.ZodArray<z.ZodObject<{
|
|
326
|
+
id: z.ZodString;
|
|
327
|
+
title: z.ZodString;
|
|
328
|
+
icon: z.ZodOptional<z.ZodString>;
|
|
329
|
+
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
330
|
+
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
331
|
+
providerValue: z.ZodString;
|
|
332
|
+
}, z.core.$strip>>;
|
|
333
|
+
}, z.core.$strip>], "key">>;
|
|
334
|
+
}, z.core.$strip>>>;
|
|
335
|
+
attachments: z.ZodOptional<z.ZodObject<{
|
|
336
|
+
imagePrice: z.ZodNumber;
|
|
337
|
+
filePrice: z.ZodNumber;
|
|
338
|
+
maxImages: z.ZodNumber;
|
|
339
|
+
maxFiles: z.ZodNumber;
|
|
340
|
+
}, z.core.$strip>>;
|
|
341
|
+
}, z.core.$strip>;
|
|
342
|
+
export type ModelSettingsWrite = z.infer<typeof ModelSettingsWriteSchema>;
|
|
130
343
|
export declare const ModelSettingsClientSchema: z.ZodObject<{
|
|
131
344
|
tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
132
345
|
toolId: z.ZodEnum<typeof ToolId>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SettingSelectionSchema = exports.ModelSettingsClientSchema = exports.ModelSettingsSchema = exports.ModelAttachmentsSettingsSchema = exports.ToolSettingsConfigClientSchema = exports.ToolSettingsConfigSchema = exports.SettingDefinitionClientSchema = exports.SettingDefinitionSchema = exports.SettingOptionClientSchema = exports.SettingOptionSchema = exports.SettingKey = exports.SettingInputType = void 0;
|
|
3
|
+
exports.SettingSelectionSchema = exports.ModelSettingsClientSchema = exports.ModelSettingsWriteSchema = exports.ModelSettingsSchema = exports.ModelAttachmentsSettingsSchema = exports.ToolSettingsConfigClientSchema = exports.ToolSettingsConfigWriteSchema = exports.ToolSettingsConfigSchema = exports.SettingDefinitionClientSchema = exports.SettingDefinitionWriteSchema = exports.SettingDefinitionSchema = exports.SettingOptionClientSchema = exports.SettingOptionWithProviderValueSchema = exports.SettingOptionSchema = exports.SettingKey = exports.SettingInputType = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const tool_id_enum_1 = require("../../ai/tool-id.enum");
|
|
6
6
|
var SettingInputType;
|
|
@@ -20,9 +20,16 @@ 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.
|
|
26
|
+
exports.SettingOptionWithProviderValueSchema = exports.SettingOptionSchema.extend({
|
|
27
|
+
providerValue: zod_1.z.string().trim().min(1),
|
|
28
|
+
});
|
|
29
|
+
exports.SettingOptionClientSchema = exports.SettingOptionSchema.omit({
|
|
30
|
+
promptSuffix: true,
|
|
31
|
+
providerValue: true,
|
|
32
|
+
});
|
|
26
33
|
exports.SettingDefinitionSchema = zod_1.z.object({
|
|
27
34
|
key: zod_1.z.nativeEnum(SettingKey),
|
|
28
35
|
title: zod_1.z.string().min(1),
|
|
@@ -32,6 +39,35 @@ exports.SettingDefinitionSchema = zod_1.z.object({
|
|
|
32
39
|
defaultOptionId: zod_1.z.string().min(1),
|
|
33
40
|
maxSelections: zod_1.z.number().int().min(1).optional(),
|
|
34
41
|
});
|
|
42
|
+
const SettingDefinitionWriteBaseSchema = zod_1.z.object({
|
|
43
|
+
title: zod_1.z.string().min(1),
|
|
44
|
+
icon: zod_1.z.string().optional(),
|
|
45
|
+
inputType: zod_1.z.nativeEnum(SettingInputType),
|
|
46
|
+
defaultOptionId: zod_1.z.string().min(1),
|
|
47
|
+
maxSelections: zod_1.z.number().int().min(1).optional(),
|
|
48
|
+
});
|
|
49
|
+
const StyleSettingDefinitionWriteSchema = SettingDefinitionWriteBaseSchema.extend({
|
|
50
|
+
key: zod_1.z.literal(SettingKey.STYLE),
|
|
51
|
+
options: zod_1.z.array(exports.SettingOptionSchema).min(1),
|
|
52
|
+
});
|
|
53
|
+
const MaxResultsSettingDefinitionWriteSchema = SettingDefinitionWriteBaseSchema.extend({
|
|
54
|
+
key: zod_1.z.literal(SettingKey.MAX_RESULTS),
|
|
55
|
+
options: zod_1.z.array(exports.SettingOptionSchema).min(1),
|
|
56
|
+
});
|
|
57
|
+
const AspectRatioSettingDefinitionWriteSchema = SettingDefinitionWriteBaseSchema.extend({
|
|
58
|
+
key: zod_1.z.literal(SettingKey.ASPECT_RATIO),
|
|
59
|
+
options: zod_1.z.array(exports.SettingOptionWithProviderValueSchema).min(1),
|
|
60
|
+
});
|
|
61
|
+
const ResolutionSettingDefinitionWriteSchema = SettingDefinitionWriteBaseSchema.extend({
|
|
62
|
+
key: zod_1.z.literal(SettingKey.RESOLUTION),
|
|
63
|
+
options: zod_1.z.array(exports.SettingOptionWithProviderValueSchema).min(1),
|
|
64
|
+
});
|
|
65
|
+
exports.SettingDefinitionWriteSchema = zod_1.z.discriminatedUnion('key', [
|
|
66
|
+
StyleSettingDefinitionWriteSchema,
|
|
67
|
+
MaxResultsSettingDefinitionWriteSchema,
|
|
68
|
+
AspectRatioSettingDefinitionWriteSchema,
|
|
69
|
+
ResolutionSettingDefinitionWriteSchema,
|
|
70
|
+
]);
|
|
35
71
|
exports.SettingDefinitionClientSchema = exports.SettingDefinitionSchema.extend({
|
|
36
72
|
options: zod_1.z.array(exports.SettingOptionClientSchema).min(1),
|
|
37
73
|
});
|
|
@@ -39,6 +75,10 @@ exports.ToolSettingsConfigSchema = zod_1.z.object({
|
|
|
39
75
|
toolId: zod_1.z.nativeEnum(tool_id_enum_1.ToolId),
|
|
40
76
|
settings: zod_1.z.array(exports.SettingDefinitionSchema),
|
|
41
77
|
});
|
|
78
|
+
exports.ToolSettingsConfigWriteSchema = zod_1.z.object({
|
|
79
|
+
toolId: zod_1.z.nativeEnum(tool_id_enum_1.ToolId),
|
|
80
|
+
settings: zod_1.z.array(exports.SettingDefinitionWriteSchema),
|
|
81
|
+
});
|
|
42
82
|
exports.ToolSettingsConfigClientSchema = zod_1.z.object({
|
|
43
83
|
toolId: zod_1.z.nativeEnum(tool_id_enum_1.ToolId),
|
|
44
84
|
settings: zod_1.z.array(exports.SettingDefinitionClientSchema),
|
|
@@ -53,6 +93,10 @@ exports.ModelSettingsSchema = zod_1.z.object({
|
|
|
53
93
|
tools: zod_1.z.array(exports.ToolSettingsConfigSchema).optional(),
|
|
54
94
|
attachments: exports.ModelAttachmentsSettingsSchema.optional(),
|
|
55
95
|
});
|
|
96
|
+
exports.ModelSettingsWriteSchema = zod_1.z.object({
|
|
97
|
+
tools: zod_1.z.array(exports.ToolSettingsConfigWriteSchema).optional(),
|
|
98
|
+
attachments: exports.ModelAttachmentsSettingsSchema.optional(),
|
|
99
|
+
});
|
|
56
100
|
exports.ModelSettingsClientSchema = zod_1.z.object({
|
|
57
101
|
tools: zod_1.z.array(exports.ToolSettingsConfigClientSchema).optional(),
|
|
58
102
|
attachments: exports.ModelAttachmentsSettingsSchema.optional(),
|