@veruna/api-contracts 1.1.39 → 1.1.40
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/controllers/index.d.ts +2 -0
- package/build/controllers/index.js +5 -1
- package/build/controllers/index.js.map +1 -1
- package/build/controllers/kie-integration.controllers.d.ts +1 -0
- package/build/controllers/kie-integration.controllers.js +5 -0
- package/build/controllers/kie-integration.controllers.js.map +1 -0
- package/build/controllers/model-route.controllers.d.ts +1 -0
- package/build/controllers/model-route.controllers.js +5 -0
- package/build/controllers/model-route.controllers.js.map +1 -0
- package/build/rest-api.d.ts +12 -0
- package/build/rest-api.js +12 -0
- package/build/rest-api.js.map +1 -1
- package/build/routes/index.d.ts +2 -0
- package/build/routes/index.js +5 -1
- package/build/routes/index.js.map +1 -1
- package/build/routes/kie-integration.routes.d.ts +3 -0
- package/build/routes/kie-integration.routes.js +7 -0
- package/build/routes/kie-integration.routes.js.map +1 -0
- package/build/routes/model-route-admin.routes.d.ts +7 -0
- package/build/routes/model-route-admin.routes.js +11 -0
- package/build/routes/model-route-admin.routes.js.map +1 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/v1/ai/index.d.ts +2 -0
- package/build/v1/ai/index.js +2 -0
- package/build/v1/ai/index.js.map +1 -1
- package/build/v1/ai/resolved-tool-settings.types.d.ts +32 -0
- package/build/v1/ai/resolved-tool-settings.types.js +12 -0
- package/build/v1/ai/resolved-tool-settings.types.js.map +1 -0
- package/build/v1/ai/retryable-ai-error-codes.d.ts +2 -0
- package/build/v1/ai/retryable-ai-error-codes.js +17 -0
- package/build/v1/ai/retryable-ai-error-codes.js.map +1 -0
- package/build/v1/ai/tool-id.enum.d.ts +2 -0
- package/build/v1/ai/tool-id.enum.js +2 -0
- package/build/v1/ai/tool-id.enum.js.map +1 -1
- package/build/v1/ai/tool.types.d.ts +0 -8
- package/build/v1/ai/tool.types.js +0 -2
- package/build/v1/ai/tool.types.js.map +1 -1
- package/build/v1/ai-model/admin/commands/create-model.command.d.ts +0 -22
- package/build/v1/ai-model/admin/commands/update-model.command.d.ts +0 -22
- package/build/v1/ai-model/admin/queries/get-model.query.d.ts +0 -11
- package/build/v1/ai-model/admin/queries/get-models.query.d.ts +0 -11
- package/build/v1/ai-model/public/queries/get-active-models.query.d.ts +0 -23
- package/build/v1/ai-model/public/queries/get-models-list.query.d.ts +0 -46
- package/build/v1/ai-model/schemas/api-provider.enum.d.ts +2 -1
- package/build/v1/ai-model/schemas/api-provider.enum.js +1 -0
- package/build/v1/ai-model/schemas/api-provider.enum.js.map +1 -1
- package/build/v1/ai-model/schemas/create-model-request.schema.d.ts +0 -13
- package/build/v1/ai-model/schemas/create-model-request.schema.js +0 -11
- 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 +0 -36
- package/build/v1/ai-model/schemas/model-response.schema.js +0 -12
- package/build/v1/ai-model/schemas/model-response.schema.js.map +1 -1
- package/build/v1/ai-model/schemas/model-settings.schema.d.ts +66 -208
- package/build/v1/ai-model/schemas/model-settings.schema.js +38 -74
- package/build/v1/ai-model/schemas/model-settings.schema.js.map +1 -1
- package/build/v1/ai-model/schemas/models-list-response.schema.d.ts +0 -115
- package/build/v1/ai-model/schemas/unreg-models-list-response.schema.d.ts +0 -46
- package/build/v1/ai-model/schemas/update-model-request.schema.d.ts +0 -13
- package/build/v1/ai-model/schemas/update-model-request.schema.js +0 -12
- package/build/v1/ai-model/schemas/update-model-request.schema.js.map +1 -1
- package/build/v1/ai-model/unreg/queries/get-models-list.query.d.ts +0 -46
- package/build/v1/ai-provider/admin/commands/create-provider.command.d.ts +0 -4
- package/build/v1/ai-provider/admin/commands/update-provider.command.d.ts +0 -4
- package/build/v1/ai-provider/admin/queries/get-provider.query.d.ts +0 -2
- package/build/v1/ai-provider/admin/queries/get-providers.query.d.ts +0 -2
- package/build/v1/ai-provider/public/queries/get-active-providers.query.d.ts +0 -2
- package/build/v1/ai-provider/schemas/create-provider-request.schema.d.ts +0 -2
- package/build/v1/ai-provider/schemas/create-provider-request.schema.js +0 -4
- package/build/v1/ai-provider/schemas/create-provider-request.schema.js.map +1 -1
- package/build/v1/ai-provider/schemas/provider-response.schema.d.ts +0 -2
- package/build/v1/ai-provider/schemas/provider-response.schema.js +0 -2
- package/build/v1/ai-provider/schemas/provider-response.schema.js.map +1 -1
- package/build/v1/ai-provider/schemas/update-provider-request.schema.d.ts +0 -2
- package/build/v1/ai-provider/schemas/update-provider-request.schema.js +0 -4
- package/build/v1/ai-provider/schemas/update-provider-request.schema.js.map +1 -1
- package/build/v1/index.d.ts +2 -0
- package/build/v1/index.js +2 -0
- package/build/v1/index.js.map +1 -1
- package/build/v1/kie-integration/index.d.ts +3 -0
- package/build/v1/kie-integration/index.js +23 -0
- package/build/v1/kie-integration/index.js.map +1 -0
- package/build/v1/kie-integration/kie-integration.errors.d.ts +23 -0
- package/build/v1/kie-integration/kie-integration.errors.js +104 -0
- package/build/v1/kie-integration/kie-integration.errors.js.map +1 -0
- package/build/v1/message/commands/create-message.command.d.ts +0 -4
- package/build/v1/message/schemas/create-message-request.schema.d.ts +0 -4
- package/build/v1/model-route/admin/commands/create-model-route.command.d.ts +87 -0
- package/build/v1/model-route/admin/commands/create-model-route.command.js +15 -0
- package/build/v1/model-route/admin/commands/create-model-route.command.js.map +1 -0
- package/build/v1/model-route/admin/commands/delete-model-route.command.d.ts +11 -0
- package/build/v1/model-route/admin/commands/delete-model-route.command.js +13 -0
- package/build/v1/model-route/admin/commands/delete-model-route.command.js.map +1 -0
- package/build/v1/model-route/admin/commands/index.d.ts +3 -0
- package/build/v1/model-route/admin/commands/index.js +20 -0
- package/build/v1/model-route/admin/commands/index.js.map +1 -0
- package/build/v1/model-route/admin/commands/update-model-route.command.d.ts +85 -0
- package/build/v1/model-route/admin/commands/update-model-route.command.js +13 -0
- package/build/v1/model-route/admin/commands/update-model-route.command.js.map +1 -0
- package/build/v1/model-route/admin/index.d.ts +2 -0
- package/build/v1/model-route/admin/index.js +19 -0
- package/build/v1/model-route/admin/index.js.map +1 -0
- package/build/v1/model-route/admin/queries/get-model-route.query.d.ts +49 -0
- package/build/v1/model-route/admin/queries/get-model-route.query.js +13 -0
- package/build/v1/model-route/admin/queries/get-model-route.query.js.map +1 -0
- package/build/v1/model-route/admin/queries/index.d.ts +2 -0
- package/build/v1/model-route/admin/queries/index.js +19 -0
- package/build/v1/model-route/admin/queries/index.js.map +1 -0
- package/build/v1/model-route/admin/queries/list-model-routes-by-model.query.d.ts +51 -0
- package/build/v1/model-route/admin/queries/list-model-routes-by-model.query.js +13 -0
- package/build/v1/model-route/admin/queries/list-model-routes-by-model.query.js.map +1 -0
- package/build/v1/model-route/index.d.ts +3 -0
- package/build/v1/model-route/index.js +20 -0
- package/build/v1/model-route/index.js.map +1 -0
- package/build/v1/model-route/model-route.errors.d.ts +7 -0
- package/build/v1/model-route/model-route.errors.js +24 -0
- package/build/v1/model-route/model-route.errors.js.map +1 -0
- package/build/v1/model-route/schemas/create-model-route-request.schema.d.ts +42 -0
- package/build/v1/model-route/schemas/create-model-route-request.schema.js +29 -0
- package/build/v1/model-route/schemas/create-model-route-request.schema.js.map +1 -0
- package/build/v1/model-route/schemas/index.d.ts +6 -0
- package/build/v1/model-route/schemas/index.js +23 -0
- package/build/v1/model-route/schemas/index.js.map +1 -0
- package/build/v1/model-route/schemas/list-model-routes-response.schema.d.ts +45 -0
- package/build/v1/model-route/schemas/list-model-routes-response.schema.js +9 -0
- package/build/v1/model-route/schemas/list-model-routes-response.schema.js.map +1 -0
- package/build/v1/model-route/schemas/model-route-response.schema.d.ts +45 -0
- package/build/v1/model-route/schemas/model-route-response.schema.js +20 -0
- package/build/v1/model-route/schemas/model-route-response.schema.js.map +1 -0
- package/build/v1/model-route/schemas/model-route-status.enum.d.ts +4 -0
- package/build/v1/model-route/schemas/model-route-status.enum.js +9 -0
- package/build/v1/model-route/schemas/model-route-status.enum.js.map +1 -0
- package/build/v1/model-route/schemas/provider-generation-config.schema.d.ts +84 -0
- package/build/v1/model-route/schemas/provider-generation-config.schema.js +56 -0
- package/build/v1/model-route/schemas/provider-generation-config.schema.js.map +1 -0
- package/build/v1/model-route/schemas/update-model-route-request.schema.d.ts +41 -0
- package/build/v1/model-route/schemas/update-model-route-request.schema.js +23 -0
- package/build/v1/model-route/schemas/update-model-route-request.schema.js.map +1 -0
- package/build/v1/tool/admin/commands/create-model-tool-binding.command.d.ts +136 -104
- package/build/v1/tool/admin/commands/update-model-tool-binding.command.d.ts +136 -104
- package/build/v1/tool/admin/queries/get-model-tool-bindings.query.d.ts +80 -22
- package/build/v1/tool/public/queries/get-tool-availability.query.d.ts +0 -23
- package/build/v1/tool/schemas/index.d.ts +2 -0
- package/build/v1/tool/schemas/index.js +2 -0
- package/build/v1/tool/schemas/index.js.map +1 -1
- package/build/v1/tool/schemas/kie-body-mode.enum.d.ts +5 -0
- package/build/v1/tool/schemas/kie-body-mode.enum.js +10 -0
- package/build/v1/tool/schemas/kie-body-mode.enum.js.map +1 -0
- package/build/v1/tool/schemas/kie-tool-runtime-overrides.schema.d.ts +11 -0
- package/build/v1/tool/schemas/kie-tool-runtime-overrides.schema.js +42 -0
- package/build/v1/tool/schemas/kie-tool-runtime-overrides.schema.js.map +1 -0
- package/build/v1/tool/schemas/tool.schema.d.ts +327 -445
- package/build/v1/tool/schemas/tool.schema.js +13 -8
- package/build/v1/tool/schemas/tool.schema.js.map +1 -1
- package/build/v1/tool/unreg/queries/get-tool-availability-unreg.query.d.ts +0 -23
- package/package.json +1 -1
|
@@ -3,15 +3,12 @@ import { WritableVisibility } from '../../shared/visibility.enum';
|
|
|
3
3
|
import { AccessReason } from '../../shared/access-reason.enum';
|
|
4
4
|
import { AiModelStatus } from './ai-model-status.enum';
|
|
5
5
|
import { ModelMark } from './model-mark.enum';
|
|
6
|
-
import { ModelType } from './model-type.enum';
|
|
7
6
|
import { ModelRole } from './model-role.enum';
|
|
8
|
-
import { ApiProvider } from './api-provider.enum';
|
|
9
7
|
import { Modality } from './modality.enum';
|
|
10
8
|
export declare const ModelResponseSchema: z.ZodObject<{
|
|
11
9
|
uuid: z.ZodString;
|
|
12
10
|
title: z.ZodString;
|
|
13
11
|
description: z.ZodString;
|
|
14
|
-
model: z.ZodString;
|
|
15
12
|
icon: z.ZodString;
|
|
16
13
|
status: z.ZodEnum<typeof AiModelStatus>;
|
|
17
14
|
order: z.ZodNumber;
|
|
@@ -22,10 +19,8 @@ export declare const ModelResponseSchema: z.ZodObject<{
|
|
|
22
19
|
bestFor: z.ZodArray<z.ZodString>;
|
|
23
20
|
usageExamples: z.ZodArray<z.ZodString>;
|
|
24
21
|
contextLength: z.ZodString;
|
|
25
|
-
apiProvider: z.ZodEnum<typeof ApiProvider>;
|
|
26
22
|
inputModalities: z.ZodArray<z.ZodEnum<typeof Modality>>;
|
|
27
23
|
outputModalities: z.ZodArray<z.ZodEnum<typeof Modality>>;
|
|
28
|
-
type: z.ZodEnum<typeof ModelType>;
|
|
29
24
|
modelRoles: z.ZodArray<z.ZodEnum<typeof ModelRole>>;
|
|
30
25
|
systemPrompt: z.ZodNullable<z.ZodString>;
|
|
31
26
|
visibility: z.ZodEnum<typeof WritableVisibility>;
|
|
@@ -40,19 +35,10 @@ export declare const ModelResponseSchema: z.ZodObject<{
|
|
|
40
35
|
price: z.ZodNumber;
|
|
41
36
|
}, z.core.$strip>>;
|
|
42
37
|
}, z.core.$strip>], "id">>;
|
|
43
|
-
settings: z.ZodObject<{
|
|
44
|
-
attachments: z.ZodOptional<z.ZodObject<{
|
|
45
|
-
imagePrice: z.ZodNumber;
|
|
46
|
-
filePrice: z.ZodNumber;
|
|
47
|
-
maxImages: z.ZodNumber;
|
|
48
|
-
maxFiles: z.ZodNumber;
|
|
49
|
-
}, z.core.$strip>>;
|
|
50
|
-
}, z.core.$strip>;
|
|
51
38
|
createdAt: z.ZodString;
|
|
52
39
|
updatedAt: z.ZodString;
|
|
53
40
|
}, z.core.$strip>;
|
|
54
41
|
export declare const PublicModelResponseSchema: z.ZodObject<{
|
|
55
|
-
type: z.ZodEnum<typeof ModelType>;
|
|
56
42
|
uuid: z.ZodString;
|
|
57
43
|
title: z.ZodString;
|
|
58
44
|
description: z.ZodString;
|
|
@@ -77,28 +63,6 @@ export declare const PublicModelResponseSchema: z.ZodObject<{
|
|
|
77
63
|
price: z.ZodNumber;
|
|
78
64
|
}, z.core.$strip>>;
|
|
79
65
|
}, z.core.$strip>], "id">>;
|
|
80
|
-
settings: z.ZodObject<{
|
|
81
|
-
attachments: z.ZodOptional<z.ZodObject<{
|
|
82
|
-
imagePrice: z.ZodNumber;
|
|
83
|
-
filePrice: z.ZodNumber;
|
|
84
|
-
maxImages: z.ZodNumber;
|
|
85
|
-
maxFiles: z.ZodNumber;
|
|
86
|
-
}, z.core.$strip>>;
|
|
87
|
-
}, z.core.$strip>;
|
|
88
|
-
toolSettings: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
89
|
-
key: z.ZodEnum<typeof import("./model-settings.schema").SettingKey>;
|
|
90
|
-
title: z.ZodString;
|
|
91
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
92
|
-
inputType: z.ZodEnum<typeof import("./model-settings.schema").SettingInputType>;
|
|
93
|
-
defaultOptionId: z.ZodString;
|
|
94
|
-
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
95
|
-
options: z.ZodArray<z.ZodObject<{
|
|
96
|
-
id: z.ZodString;
|
|
97
|
-
title: z.ZodString;
|
|
98
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
99
|
-
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
100
|
-
}, z.core.$strip>>;
|
|
101
|
-
}, z.core.$strip>>>;
|
|
102
66
|
access: z.ZodBoolean;
|
|
103
67
|
accessReason: z.ZodNullable<z.ZodEnum<typeof AccessReason>>;
|
|
104
68
|
}, z.core.$strip>;
|
|
@@ -7,17 +7,13 @@ const visibility_enum_1 = require("../../shared/visibility.enum");
|
|
|
7
7
|
const access_reason_enum_1 = require("../../shared/access-reason.enum");
|
|
8
8
|
const ai_model_status_enum_1 = require("./ai-model-status.enum");
|
|
9
9
|
const model_mark_enum_1 = require("./model-mark.enum");
|
|
10
|
-
const model_type_enum_1 = require("./model-type.enum");
|
|
11
10
|
const model_role_enum_1 = require("./model-role.enum");
|
|
12
|
-
const api_provider_enum_1 = require("./api-provider.enum");
|
|
13
11
|
const modality_enum_1 = require("./modality.enum");
|
|
14
|
-
const model_settings_schema_1 = require("./model-settings.schema");
|
|
15
12
|
const plugins_types_1 = require("../../ai/plugins.types");
|
|
16
13
|
exports.ModelResponseSchema = zod_1.z.object({
|
|
17
14
|
uuid: zod_1.z.string().regex(shared_1.UUID_REGEX),
|
|
18
15
|
title: zod_1.z.string(),
|
|
19
16
|
description: zod_1.z.string(),
|
|
20
|
-
model: zod_1.z.string(),
|
|
21
17
|
icon: zod_1.z.string(),
|
|
22
18
|
status: zod_1.z.nativeEnum(ai_model_status_enum_1.AiModelStatus),
|
|
23
19
|
order: zod_1.z.number().int().nonnegative(),
|
|
@@ -28,21 +24,16 @@ exports.ModelResponseSchema = zod_1.z.object({
|
|
|
28
24
|
bestFor: zod_1.z.array(zod_1.z.string()),
|
|
29
25
|
usageExamples: zod_1.z.array(zod_1.z.string()),
|
|
30
26
|
contextLength: zod_1.z.string(),
|
|
31
|
-
apiProvider: zod_1.z.nativeEnum(api_provider_enum_1.ApiProvider),
|
|
32
27
|
inputModalities: zod_1.z.array(zod_1.z.nativeEnum(modality_enum_1.Modality)),
|
|
33
28
|
outputModalities: zod_1.z.array(zod_1.z.nativeEnum(modality_enum_1.Modality)),
|
|
34
|
-
type: zod_1.z.nativeEnum(model_type_enum_1.ModelType),
|
|
35
29
|
modelRoles: zod_1.z.array(zod_1.z.nativeEnum(model_role_enum_1.ModelRole)),
|
|
36
30
|
systemPrompt: zod_1.z.string().nullable(),
|
|
37
31
|
visibility: zod_1.z.nativeEnum(visibility_enum_1.WritableVisibility),
|
|
38
32
|
plugins: zod_1.z.array(plugins_types_1.PluginConfigSchema),
|
|
39
|
-
settings: model_settings_schema_1.ModelSettingsSchema,
|
|
40
33
|
createdAt: zod_1.z.string().regex(shared_1.DATETIME_REGEX),
|
|
41
34
|
updatedAt: zod_1.z.string().regex(shared_1.DATETIME_REGEX),
|
|
42
35
|
});
|
|
43
36
|
exports.PublicModelResponseSchema = exports.ModelResponseSchema.omit({
|
|
44
|
-
model: true,
|
|
45
|
-
apiProvider: true,
|
|
46
37
|
contextLength: true,
|
|
47
38
|
systemPrompt: true,
|
|
48
39
|
status: true,
|
|
@@ -50,10 +41,7 @@ exports.PublicModelResponseSchema = exports.ModelResponseSchema.omit({
|
|
|
50
41
|
createdAt: true,
|
|
51
42
|
updatedAt: true,
|
|
52
43
|
visibility: true,
|
|
53
|
-
settings: true,
|
|
54
44
|
}).extend({
|
|
55
|
-
settings: model_settings_schema_1.ModelSettingsClientSchema,
|
|
56
|
-
toolSettings: zod_1.z.array(model_settings_schema_1.SettingDefinitionClientSchema).default([]),
|
|
57
45
|
access: zod_1.z.boolean(),
|
|
58
46
|
accessReason: zod_1.z.nativeEnum(access_reason_enum_1.AccessReason).nullable(),
|
|
59
47
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-response.schema.js","sourceRoot":"","sources":["../../../../v1/ai-model/schemas/model-response.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAA6D;AAC7D,kEAAkE;AAClE,wEAA+D;AAC/D,iEAAuD;AACvD,uDAA8C;AAC9C,uDAA8C;AAC9C,
|
|
1
|
+
{"version":3,"file":"model-response.schema.js","sourceRoot":"","sources":["../../../../v1/ai-model/schemas/model-response.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAA6D;AAC7D,kEAAkE;AAClE,wEAA+D;AAC/D,iEAAuD;AACvD,uDAA8C;AAC9C,uDAA8C;AAC9C,mDAA2C;AAC3C,0DAA4D;AAK/C,QAAA,mBAAmB,GAA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AC,QAAQ,EAAE;IACnC,UAAU,EAAE,OAAC,CAAC,UAAU,CAAC,oCAAkB,CAAC;IAC5C,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,kCAAkB,CAAC;IACpC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,uBAAc,CAAC;IAC3C,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,uBAAc,CAAC;CAC9C,CAAC,CAAC;AAKU,QAAA,yBAAyB,GAAG,2BAAmB,CAAC,IAAI,CAAC;IAC9D,aAAa,EAAE,IAAI;IACnB,YAAY,EAAE,IAAI;IAClB,MAAM,EAAE,IAAI;IACZ,YAAY,EAAE,IAAI;IAClB,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE,IAAI;CACnB,CAAC,CAAC,MAAM,CAAC;IACN,MAAM,EAAE,OAAC,CAAC,OAAO,EAAE;IACnB,YAAY,EAAE,OAAC,CAAC,UAAU,CAAC,iCAAY,CAAC,CAAC,QAAQ,EAAE;CACtD,CAAC,CAAC"}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const AUTO_OPTION_ID: "auto";
|
|
3
|
-
export declare enum SettingInputType {
|
|
4
|
-
SINGLE_SELECT = "singleSelect",
|
|
5
|
-
MULTI_SELECT = "multiSelect"
|
|
6
|
-
}
|
|
7
2
|
export declare enum SettingKey {
|
|
8
3
|
STYLE = "style",
|
|
9
4
|
ASPECT_RATIO = "aspectRatio",
|
|
@@ -12,255 +7,118 @@ export declare enum SettingKey {
|
|
|
12
7
|
}
|
|
13
8
|
export declare const SettingOptionSchema: z.ZodObject<{
|
|
14
9
|
id: z.ZodString;
|
|
15
|
-
title: z.ZodString;
|
|
16
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
17
10
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
18
11
|
providerValue: z.ZodOptional<z.ZodString>;
|
|
12
|
+
providerValues: z.ZodOptional<z.ZodObject<{
|
|
13
|
+
openrouter: z.ZodOptional<z.ZodString>;
|
|
14
|
+
kie: z.ZodOptional<z.ZodString>;
|
|
15
|
+
perplexity: z.ZodOptional<z.ZodString>;
|
|
16
|
+
yandex: z.ZodOptional<z.ZodString>;
|
|
17
|
+
}, z.core.$strict>>;
|
|
19
18
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
20
|
-
}, z.core.$
|
|
19
|
+
}, z.core.$strict>;
|
|
21
20
|
export type SettingOption = z.infer<typeof SettingOptionSchema>;
|
|
22
|
-
export declare const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
28
|
-
providerValue: z.ZodString;
|
|
29
|
-
}, z.core.$strip>;
|
|
30
|
-
export type SettingOptionWithProviderValue = z.infer<typeof SettingOptionWithProviderValueSchema>;
|
|
31
|
-
export declare const SettingOptionClientSchema: z.ZodObject<{
|
|
32
|
-
id: z.ZodString;
|
|
33
|
-
title: z.ZodString;
|
|
34
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
35
|
-
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
36
|
-
}, z.core.$strip>;
|
|
37
|
-
export type SettingOptionClient = z.infer<typeof SettingOptionClientSchema>;
|
|
21
|
+
export declare const AutoSchemaConfigSchema: z.ZodObject<{
|
|
22
|
+
paramName: z.ZodString;
|
|
23
|
+
paramDescription: z.ZodString;
|
|
24
|
+
}, z.core.$strict>;
|
|
25
|
+
export type AutoSchemaConfig = z.infer<typeof AutoSchemaConfigSchema>;
|
|
38
26
|
export declare const SettingDefinitionSchema: z.ZodObject<{
|
|
39
27
|
key: z.ZodEnum<typeof SettingKey>;
|
|
40
|
-
title: z.ZodString;
|
|
41
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
42
|
-
inputType: z.ZodEnum<typeof SettingInputType>;
|
|
43
28
|
options: z.ZodArray<z.ZodObject<{
|
|
44
29
|
id: z.ZodString;
|
|
45
|
-
title: z.ZodString;
|
|
46
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
47
30
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
48
31
|
providerValue: z.ZodOptional<z.ZodString>;
|
|
32
|
+
providerValues: z.ZodOptional<z.ZodObject<{
|
|
33
|
+
openrouter: z.ZodOptional<z.ZodString>;
|
|
34
|
+
kie: z.ZodOptional<z.ZodString>;
|
|
35
|
+
perplexity: z.ZodOptional<z.ZodString>;
|
|
36
|
+
yandex: z.ZodOptional<z.ZodString>;
|
|
37
|
+
}, z.core.$strict>>;
|
|
49
38
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
50
|
-
}, z.core.$
|
|
39
|
+
}, z.core.$strict>>;
|
|
51
40
|
defaultOptionId: z.ZodString;
|
|
52
|
-
|
|
53
|
-
|
|
41
|
+
autoSchemaConfig: z.ZodObject<{
|
|
42
|
+
paramName: z.ZodString;
|
|
43
|
+
paramDescription: z.ZodString;
|
|
44
|
+
}, z.core.$strict>;
|
|
45
|
+
}, z.core.$strict>;
|
|
54
46
|
export type SettingDefinition = z.infer<typeof SettingDefinitionSchema>;
|
|
55
|
-
export declare const
|
|
56
|
-
|
|
57
|
-
paramDescription: z.ZodString;
|
|
58
|
-
defaultOptionId: z.ZodString;
|
|
59
|
-
autoOption: z.ZodObject<{
|
|
47
|
+
export declare const SettingDefinitionWriteSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
48
|
+
options: z.ZodArray<z.ZodObject<{
|
|
60
49
|
id: z.ZodString;
|
|
61
|
-
title: z.ZodString;
|
|
62
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
63
50
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
64
51
|
providerValue: z.ZodOptional<z.ZodString>;
|
|
52
|
+
providerValues: z.ZodOptional<z.ZodObject<{
|
|
53
|
+
openrouter: z.ZodOptional<z.ZodString>;
|
|
54
|
+
kie: z.ZodOptional<z.ZodString>;
|
|
55
|
+
perplexity: z.ZodOptional<z.ZodString>;
|
|
56
|
+
yandex: z.ZodOptional<z.ZodString>;
|
|
57
|
+
}, z.core.$strict>>;
|
|
65
58
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
66
|
-
}, z.core.$
|
|
67
|
-
}, z.core.$strip>;
|
|
68
|
-
export type AutoSchemaConfig = z.infer<typeof AutoSchemaConfigSchema>;
|
|
69
|
-
export declare const SettingDefinitionWriteSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
70
|
-
title: z.ZodString;
|
|
71
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
72
|
-
inputType: z.ZodEnum<typeof SettingInputType>;
|
|
59
|
+
}, z.core.$strict>>;
|
|
73
60
|
defaultOptionId: z.ZodString;
|
|
74
|
-
|
|
75
|
-
autoSchemaConfig: z.ZodOptional<z.ZodObject<{
|
|
61
|
+
autoSchemaConfig: z.ZodObject<{
|
|
76
62
|
paramName: z.ZodString;
|
|
77
63
|
paramDescription: z.ZodString;
|
|
78
|
-
|
|
79
|
-
autoOption: z.ZodObject<{
|
|
80
|
-
id: z.ZodString;
|
|
81
|
-
title: z.ZodString;
|
|
82
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
83
|
-
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
84
|
-
providerValue: z.ZodOptional<z.ZodString>;
|
|
85
|
-
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
86
|
-
}, z.core.$strip>;
|
|
87
|
-
}, z.core.$strip>>;
|
|
64
|
+
}, z.core.$strict>;
|
|
88
65
|
key: z.ZodLiteral<SettingKey.STYLE>;
|
|
66
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
89
67
|
options: z.ZodArray<z.ZodObject<{
|
|
90
68
|
id: z.ZodString;
|
|
91
|
-
title: z.ZodString;
|
|
92
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
93
69
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
94
70
|
providerValue: z.ZodOptional<z.ZodString>;
|
|
71
|
+
providerValues: z.ZodOptional<z.ZodObject<{
|
|
72
|
+
openrouter: z.ZodOptional<z.ZodString>;
|
|
73
|
+
kie: z.ZodOptional<z.ZodString>;
|
|
74
|
+
perplexity: z.ZodOptional<z.ZodString>;
|
|
75
|
+
yandex: z.ZodOptional<z.ZodString>;
|
|
76
|
+
}, z.core.$strict>>;
|
|
95
77
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
96
|
-
}, z.core.$
|
|
97
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
98
|
-
title: z.ZodString;
|
|
99
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
100
|
-
inputType: z.ZodEnum<typeof SettingInputType>;
|
|
78
|
+
}, z.core.$strict>>;
|
|
101
79
|
defaultOptionId: z.ZodString;
|
|
102
|
-
|
|
103
|
-
autoSchemaConfig: z.ZodOptional<z.ZodObject<{
|
|
80
|
+
autoSchemaConfig: z.ZodObject<{
|
|
104
81
|
paramName: z.ZodString;
|
|
105
82
|
paramDescription: z.ZodString;
|
|
106
|
-
|
|
107
|
-
autoOption: z.ZodObject<{
|
|
108
|
-
id: z.ZodString;
|
|
109
|
-
title: z.ZodString;
|
|
110
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
111
|
-
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
112
|
-
providerValue: z.ZodOptional<z.ZodString>;
|
|
113
|
-
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
114
|
-
}, z.core.$strip>;
|
|
115
|
-
}, z.core.$strip>>;
|
|
83
|
+
}, z.core.$strict>;
|
|
116
84
|
key: z.ZodLiteral<SettingKey.MAX_RESULTS>;
|
|
117
|
-
|
|
118
|
-
id: z.ZodString;
|
|
119
|
-
title: z.ZodString;
|
|
120
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
121
|
-
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
122
|
-
providerValue: z.ZodOptional<z.ZodString>;
|
|
123
|
-
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
124
|
-
}, z.core.$strip>>;
|
|
125
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
126
|
-
title: z.ZodString;
|
|
127
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
128
|
-
inputType: z.ZodEnum<typeof SettingInputType>;
|
|
85
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
129
86
|
defaultOptionId: z.ZodString;
|
|
130
|
-
|
|
131
|
-
autoSchemaConfig: z.ZodOptional<z.ZodObject<{
|
|
87
|
+
autoSchemaConfig: z.ZodObject<{
|
|
132
88
|
paramName: z.ZodString;
|
|
133
89
|
paramDescription: z.ZodString;
|
|
134
|
-
|
|
135
|
-
autoOption: z.ZodObject<{
|
|
136
|
-
id: z.ZodString;
|
|
137
|
-
title: z.ZodString;
|
|
138
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
139
|
-
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
140
|
-
providerValue: z.ZodOptional<z.ZodString>;
|
|
141
|
-
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
142
|
-
}, z.core.$strip>;
|
|
143
|
-
}, z.core.$strip>>;
|
|
90
|
+
}, z.core.$strict>;
|
|
144
91
|
key: z.ZodLiteral<SettingKey.ASPECT_RATIO>;
|
|
145
92
|
options: z.ZodArray<z.ZodObject<{
|
|
146
93
|
id: z.ZodString;
|
|
147
|
-
title: z.ZodString;
|
|
148
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
149
94
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
95
|
+
providerValues: z.ZodOptional<z.ZodObject<{
|
|
96
|
+
openrouter: z.ZodOptional<z.ZodString>;
|
|
97
|
+
kie: z.ZodOptional<z.ZodString>;
|
|
98
|
+
perplexity: z.ZodOptional<z.ZodString>;
|
|
99
|
+
yandex: z.ZodOptional<z.ZodString>;
|
|
100
|
+
}, z.core.$strict>>;
|
|
150
101
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
151
102
|
providerValue: z.ZodString;
|
|
152
|
-
}, z.core.$
|
|
153
|
-
}, z.core.$
|
|
154
|
-
title: z.ZodString;
|
|
155
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
156
|
-
inputType: z.ZodEnum<typeof SettingInputType>;
|
|
103
|
+
}, z.core.$strict>>;
|
|
104
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
157
105
|
defaultOptionId: z.ZodString;
|
|
158
|
-
|
|
159
|
-
autoSchemaConfig: z.ZodOptional<z.ZodObject<{
|
|
106
|
+
autoSchemaConfig: z.ZodObject<{
|
|
160
107
|
paramName: z.ZodString;
|
|
161
108
|
paramDescription: z.ZodString;
|
|
162
|
-
|
|
163
|
-
autoOption: z.ZodObject<{
|
|
164
|
-
id: z.ZodString;
|
|
165
|
-
title: z.ZodString;
|
|
166
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
167
|
-
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
168
|
-
providerValue: z.ZodOptional<z.ZodString>;
|
|
169
|
-
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
170
|
-
}, z.core.$strip>;
|
|
171
|
-
}, z.core.$strip>>;
|
|
109
|
+
}, z.core.$strict>;
|
|
172
110
|
key: z.ZodLiteral<SettingKey.RESOLUTION>;
|
|
173
111
|
options: z.ZodArray<z.ZodObject<{
|
|
174
112
|
id: z.ZodString;
|
|
175
|
-
title: z.ZodString;
|
|
176
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
177
113
|
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
114
|
+
providerValues: z.ZodOptional<z.ZodObject<{
|
|
115
|
+
openrouter: z.ZodOptional<z.ZodString>;
|
|
116
|
+
kie: z.ZodOptional<z.ZodString>;
|
|
117
|
+
perplexity: z.ZodOptional<z.ZodString>;
|
|
118
|
+
yandex: z.ZodOptional<z.ZodString>;
|
|
119
|
+
}, z.core.$strict>>;
|
|
178
120
|
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
179
121
|
providerValue: z.ZodString;
|
|
180
|
-
}, z.core.$
|
|
181
|
-
}, z.core.$
|
|
122
|
+
}, z.core.$strict>>;
|
|
123
|
+
}, z.core.$strict>], "key">;
|
|
182
124
|
export type SettingDefinitionWrite = z.infer<typeof SettingDefinitionWriteSchema>;
|
|
183
|
-
export declare const SettingDefinitionClientSchema: z.ZodObject<{
|
|
184
|
-
key: z.ZodEnum<typeof SettingKey>;
|
|
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
|
-
options: z.ZodArray<z.ZodObject<{
|
|
191
|
-
id: z.ZodString;
|
|
192
|
-
title: z.ZodString;
|
|
193
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
194
|
-
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
195
|
-
}, z.core.$strip>>;
|
|
196
|
-
}, z.core.$strip>;
|
|
197
|
-
export type SettingDefinitionClient = z.infer<typeof SettingDefinitionClientSchema>;
|
|
198
|
-
export declare const SettingDefinitionAdminSchema: z.ZodObject<{
|
|
199
|
-
key: z.ZodEnum<typeof SettingKey>;
|
|
200
|
-
title: z.ZodString;
|
|
201
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
202
|
-
inputType: z.ZodEnum<typeof SettingInputType>;
|
|
203
|
-
options: z.ZodArray<z.ZodObject<{
|
|
204
|
-
id: z.ZodString;
|
|
205
|
-
title: z.ZodString;
|
|
206
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
207
|
-
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
208
|
-
providerValue: z.ZodOptional<z.ZodString>;
|
|
209
|
-
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
210
|
-
}, z.core.$strip>>;
|
|
211
|
-
defaultOptionId: z.ZodString;
|
|
212
|
-
maxSelections: z.ZodOptional<z.ZodNumber>;
|
|
213
|
-
autoSchemaConfig: z.ZodOptional<z.ZodObject<{
|
|
214
|
-
paramName: z.ZodString;
|
|
215
|
-
paramDescription: z.ZodString;
|
|
216
|
-
defaultOptionId: z.ZodString;
|
|
217
|
-
autoOption: z.ZodObject<{
|
|
218
|
-
id: z.ZodString;
|
|
219
|
-
title: z.ZodString;
|
|
220
|
-
icon: z.ZodOptional<z.ZodString>;
|
|
221
|
-
priceModifier: z.ZodDefault<z.ZodNumber>;
|
|
222
|
-
providerValue: z.ZodOptional<z.ZodString>;
|
|
223
|
-
promptSuffix: z.ZodOptional<z.ZodString>;
|
|
224
|
-
}, z.core.$strip>;
|
|
225
|
-
}, z.core.$strip>>;
|
|
226
|
-
}, z.core.$strip>;
|
|
227
|
-
export type SettingDefinitionAdmin = z.infer<typeof SettingDefinitionAdminSchema>;
|
|
228
|
-
export declare const ModelAttachmentsSettingsSchema: z.ZodObject<{
|
|
229
|
-
imagePrice: z.ZodNumber;
|
|
230
|
-
filePrice: z.ZodNumber;
|
|
231
|
-
maxImages: z.ZodNumber;
|
|
232
|
-
maxFiles: z.ZodNumber;
|
|
233
|
-
}, z.core.$strip>;
|
|
234
|
-
export type ModelAttachmentsSettings = z.infer<typeof ModelAttachmentsSettingsSchema>;
|
|
235
|
-
export declare const ModelSettingsSchema: z.ZodObject<{
|
|
236
|
-
attachments: z.ZodOptional<z.ZodObject<{
|
|
237
|
-
imagePrice: z.ZodNumber;
|
|
238
|
-
filePrice: z.ZodNumber;
|
|
239
|
-
maxImages: z.ZodNumber;
|
|
240
|
-
maxFiles: z.ZodNumber;
|
|
241
|
-
}, z.core.$strip>>;
|
|
242
|
-
}, z.core.$strip>;
|
|
243
|
-
export type ModelSettings = z.infer<typeof ModelSettingsSchema>;
|
|
244
|
-
export declare const ModelSettingsWriteSchema: z.ZodObject<{
|
|
245
|
-
attachments: z.ZodOptional<z.ZodObject<{
|
|
246
|
-
imagePrice: z.ZodNumber;
|
|
247
|
-
filePrice: z.ZodNumber;
|
|
248
|
-
maxImages: z.ZodNumber;
|
|
249
|
-
maxFiles: z.ZodNumber;
|
|
250
|
-
}, z.core.$strip>>;
|
|
251
|
-
}, z.core.$strip>;
|
|
252
|
-
export type ModelSettingsWrite = z.infer<typeof ModelSettingsWriteSchema>;
|
|
253
|
-
export declare const ModelSettingsClientSchema: z.ZodObject<{
|
|
254
|
-
attachments: z.ZodOptional<z.ZodObject<{
|
|
255
|
-
imagePrice: z.ZodNumber;
|
|
256
|
-
filePrice: z.ZodNumber;
|
|
257
|
-
maxImages: z.ZodNumber;
|
|
258
|
-
maxFiles: z.ZodNumber;
|
|
259
|
-
}, z.core.$strip>>;
|
|
260
|
-
}, z.core.$strip>;
|
|
261
|
-
export type ModelSettingsClient = z.infer<typeof ModelSettingsClientSchema>;
|
|
262
|
-
export declare const SettingSelectionSchema: z.ZodObject<{
|
|
263
|
-
key: z.ZodEnum<typeof SettingKey>;
|
|
264
|
-
optionIds: z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>;
|
|
265
|
-
}, z.core.$strip>;
|
|
266
|
-
export type SettingSelection = z.infer<typeof SettingSelectionSchema>;
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.SettingDefinitionWriteSchema = exports.SettingDefinitionSchema = exports.AutoSchemaConfigSchema = exports.SettingOptionSchema = exports.SettingKey = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
|
|
6
|
-
var SettingInputType;
|
|
7
|
-
(function (SettingInputType) {
|
|
8
|
-
SettingInputType["SINGLE_SELECT"] = "singleSelect";
|
|
9
|
-
SettingInputType["MULTI_SELECT"] = "multiSelect";
|
|
10
|
-
})(SettingInputType || (exports.SettingInputType = SettingInputType = {}));
|
|
5
|
+
const api_provider_enum_1 = require("./api-provider.enum");
|
|
11
6
|
var SettingKey;
|
|
12
7
|
(function (SettingKey) {
|
|
13
8
|
SettingKey["STYLE"] = "style";
|
|
@@ -15,89 +10,58 @@ var SettingKey;
|
|
|
15
10
|
SettingKey["RESOLUTION"] = "resolution";
|
|
16
11
|
SettingKey["MAX_RESULTS"] = "maxResults";
|
|
17
12
|
})(SettingKey || (exports.SettingKey = SettingKey = {}));
|
|
18
|
-
|
|
13
|
+
const ProviderValueRecordSchema = zod_1.z
|
|
14
|
+
.object({
|
|
15
|
+
[api_provider_enum_1.ApiProvider.OPENROUTER]: zod_1.z.string().min(1).max(1000).optional(),
|
|
16
|
+
[api_provider_enum_1.ApiProvider.KIE]: zod_1.z.string().min(1).max(1000).optional(),
|
|
17
|
+
[api_provider_enum_1.ApiProvider.PERPLEXITY]: zod_1.z.string().min(1).max(1000).optional(),
|
|
18
|
+
[api_provider_enum_1.ApiProvider.YANDEX]: zod_1.z.string().min(1).max(1000).optional(),
|
|
19
|
+
})
|
|
20
|
+
.strict();
|
|
21
|
+
exports.SettingOptionSchema = zod_1.z
|
|
22
|
+
.object({
|
|
19
23
|
id: zod_1.z.string().min(1).max(100),
|
|
20
|
-
title: zod_1.z.string().min(1).max(255),
|
|
21
|
-
icon: zod_1.z.string().max(2048).optional(),
|
|
22
24
|
priceModifier: zod_1.z.number().int().min(0).default(0),
|
|
23
25
|
providerValue: zod_1.z.string().max(1000).optional(),
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
providerValues: ProviderValueRecordSchema.optional(),
|
|
27
|
+
promptSuffix: zod_1.z.string().min(1).max(5000).optional(),
|
|
28
|
+
})
|
|
29
|
+
.strict();
|
|
30
|
+
const SettingOptionWithProviderValueSchema = exports.SettingOptionSchema.extend({
|
|
27
31
|
providerValue: zod_1.z.string().trim().min(1).max(1000),
|
|
28
32
|
});
|
|
29
|
-
exports.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
exports.AutoSchemaConfigSchema = zod_1.z
|
|
34
|
+
.object({
|
|
35
|
+
paramName: zod_1.z.string().regex(/^[a-zA-Z_][a-zA-Z0-9_]{0,99}$/, 'paramName must be a valid identifier'),
|
|
36
|
+
paramDescription: zod_1.z.string().min(1).max(500),
|
|
37
|
+
})
|
|
38
|
+
.strict();
|
|
39
|
+
exports.SettingDefinitionSchema = zod_1.z
|
|
40
|
+
.object({
|
|
34
41
|
key: zod_1.z.nativeEnum(SettingKey),
|
|
35
|
-
title: zod_1.z.string().min(1).max(255),
|
|
36
|
-
icon: zod_1.z.string().max(2048).optional(),
|
|
37
|
-
inputType: zod_1.z.nativeEnum(SettingInputType),
|
|
38
42
|
options: zod_1.z.array(exports.SettingOptionSchema).min(1).max(100),
|
|
39
43
|
defaultOptionId: zod_1.z.string().min(1).max(100),
|
|
40
|
-
|
|
41
|
-
})
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
paramDescription: zod_1.z.string().min(1).max(500),
|
|
45
|
-
defaultOptionId: zod_1.z.string().min(1).max(100),
|
|
46
|
-
autoOption: exports.SettingOptionSchema,
|
|
47
|
-
});
|
|
48
|
-
const SettingDefinitionWriteBaseSchema = zod_1.z.object({
|
|
49
|
-
title: zod_1.z.string().min(1).max(255),
|
|
50
|
-
icon: zod_1.z.string().max(2048).optional(),
|
|
51
|
-
inputType: zod_1.z.nativeEnum(SettingInputType),
|
|
52
|
-
defaultOptionId: zod_1.z.string().min(1).max(100),
|
|
53
|
-
maxSelections: zod_1.z.number().int().min(1).optional(),
|
|
54
|
-
autoSchemaConfig: exports.AutoSchemaConfigSchema.optional(),
|
|
55
|
-
});
|
|
56
|
-
const StyleSettingDefinitionWriteSchema = SettingDefinitionWriteBaseSchema.extend({
|
|
44
|
+
autoSchemaConfig: exports.AutoSchemaConfigSchema,
|
|
45
|
+
})
|
|
46
|
+
.strict();
|
|
47
|
+
const StyleWriteSchema = exports.SettingDefinitionSchema.extend({
|
|
57
48
|
key: zod_1.z.literal(SettingKey.STYLE),
|
|
58
|
-
options: zod_1.z.array(exports.SettingOptionSchema).min(1).max(100),
|
|
59
49
|
});
|
|
60
|
-
const
|
|
50
|
+
const MaxResultsWriteSchema = exports.SettingDefinitionSchema.extend({
|
|
61
51
|
key: zod_1.z.literal(SettingKey.MAX_RESULTS),
|
|
62
|
-
options: zod_1.z.array(exports.SettingOptionSchema).min(1).max(100),
|
|
63
52
|
});
|
|
64
|
-
const
|
|
53
|
+
const AspectRatioWriteSchema = exports.SettingDefinitionSchema.extend({
|
|
65
54
|
key: zod_1.z.literal(SettingKey.ASPECT_RATIO),
|
|
66
|
-
options: zod_1.z.array(
|
|
55
|
+
options: zod_1.z.array(SettingOptionWithProviderValueSchema).min(1).max(100),
|
|
67
56
|
});
|
|
68
|
-
const
|
|
57
|
+
const ResolutionWriteSchema = exports.SettingDefinitionSchema.extend({
|
|
69
58
|
key: zod_1.z.literal(SettingKey.RESOLUTION),
|
|
70
|
-
options: zod_1.z.array(
|
|
59
|
+
options: zod_1.z.array(SettingOptionWithProviderValueSchema).min(1).max(100),
|
|
71
60
|
});
|
|
72
61
|
exports.SettingDefinitionWriteSchema = zod_1.z.discriminatedUnion('key', [
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
62
|
+
StyleWriteSchema,
|
|
63
|
+
MaxResultsWriteSchema,
|
|
64
|
+
AspectRatioWriteSchema,
|
|
65
|
+
ResolutionWriteSchema,
|
|
77
66
|
]);
|
|
78
|
-
exports.SettingDefinitionClientSchema = exports.SettingDefinitionSchema.extend({
|
|
79
|
-
options: zod_1.z.array(exports.SettingOptionClientSchema).min(1).max(100),
|
|
80
|
-
});
|
|
81
|
-
exports.SettingDefinitionAdminSchema = exports.SettingDefinitionSchema.extend({
|
|
82
|
-
autoSchemaConfig: exports.AutoSchemaConfigSchema.optional(),
|
|
83
|
-
});
|
|
84
|
-
exports.ModelAttachmentsSettingsSchema = zod_1.z.object({
|
|
85
|
-
imagePrice: zod_1.z.number().int().min(0),
|
|
86
|
-
filePrice: zod_1.z.number().int().min(0),
|
|
87
|
-
maxImages: zod_1.z.number().int().min(0),
|
|
88
|
-
maxFiles: zod_1.z.number().int().min(0),
|
|
89
|
-
});
|
|
90
|
-
exports.ModelSettingsSchema = zod_1.z.object({
|
|
91
|
-
attachments: exports.ModelAttachmentsSettingsSchema.optional(),
|
|
92
|
-
});
|
|
93
|
-
exports.ModelSettingsWriteSchema = zod_1.z.object({
|
|
94
|
-
attachments: exports.ModelAttachmentsSettingsSchema.optional(),
|
|
95
|
-
});
|
|
96
|
-
exports.ModelSettingsClientSchema = zod_1.z.object({
|
|
97
|
-
attachments: exports.ModelAttachmentsSettingsSchema.optional(),
|
|
98
|
-
});
|
|
99
|
-
exports.SettingSelectionSchema = zod_1.z.object({
|
|
100
|
-
key: zod_1.z.nativeEnum(SettingKey),
|
|
101
|
-
optionIds: zod_1.z.union([zod_1.z.string().max(100), zod_1.z.array(zod_1.z.string().max(100)).max(50)]),
|
|
102
|
-
});
|
|
103
67
|
//# sourceMappingURL=model-settings.schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-settings.schema.js","sourceRoot":"","sources":["../../../../v1/ai-model/schemas/model-settings.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;
|
|
1
|
+
{"version":3,"file":"model-settings.schema.js","sourceRoot":"","sources":["../../../../v1/ai-model/schemas/model-settings.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,2DAAkD;AAElD,IAAY,UAKX;AALD,WAAY,UAAU;IAClB,6BAAe,CAAA;IACf,0CAA4B,CAAA;IAC5B,uCAAyB,CAAA;IACzB,wCAA0B,CAAA;AAC9B,CAAC,EALW,UAAU,0BAAV,UAAU,QAKrB;AAED,MAAM,yBAAyB,GAAG,OAAC;KAC9B,MAAM,CAAC;IACJ,CAAC,+BAAW,CAAC,UAAU,CAAC,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,C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