@purpleschool/gptbot 0.15.62-se → 0.15.63
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/commands/ai-studio/canvas-node/find-canvas-node-definitions-with-configs.query.d.ts +1 -0
- package/build/commands/b2b/get-b2b-documentation.command.d.ts +2 -0
- package/build/commands/model-page/base/find-model-page-admin.command.d.ts +1 -0
- package/build/commands/model-page/public/find-model-page-answer-detail.command.d.ts +1 -0
- package/build/commands/model-page/public/find-model-page-detail.command.d.ts +1 -0
- package/build/commands/model-page/public/find-model-page-hub.command.d.ts +1 -0
- package/build/commands/photo-studio/get-photo-studio-config.query.d.ts +2 -0
- package/build/commands/tools/diagrams/diagrams.command.d.ts +17 -5
- package/build/commands/tools/diagrams/diagrams.command.js +2 -4
- package/build/commands/tools/diagrams/edit-diagrams-job.command.d.ts +18 -4
- package/build/commands/tools/diagrams/edit-diagrams-job.command.js +1 -2
- package/build/commands/tools/diagrams/find-diagrams-job-by-uuid.command.d.ts +9 -2
- package/build/commands/tools/diagrams/find-diagrams-jobs.command.d.ts +9 -2
- package/build/commands/tools/diagrams/get-diagrams-price.command.d.ts +9 -2
- package/build/commands/tools/diagrams/get-diagrams-price.command.js +2 -2
- package/build/commands/tools/diagrams/get-diagrams-tool-config.command.d.ts +4 -0
- package/build/commands/tools/diagrams/retry-diagrams-job.command.d.ts +15 -3
- package/build/commands/tools/diagrams/retry-diagrams-job.command.js +1 -1
- package/build/commands/tools/diagrams/set-reaction-to-diagrams-job.command.d.ts +9 -2
- package/build/commands/tools/diagrams/update-diagrams-job-favorite.command.d.ts +9 -2
- package/build/commands/tools/diagrams/update-diagrams-job-title.command.d.ts +9 -2
- package/build/commands/tools/image-generation/get-image-generation-config.command.d.ts +1 -0
- package/build/helpers/image-generation/calculate-image-generation-price.helper.d.ts +1 -1
- package/build/helpers/image-generation/calculate-image-generation-price.helper.js +5 -0
- package/build/models/canvas-node-definition.schema.d.ts +3 -0
- package/build/models/model-page/model-page-public.schema.d.ts +3 -0
- package/build/models/model-page/model-page-technical-model.schema.d.ts +3 -0
- package/build/models/tools/diagrams/diagrams-config.schema.d.ts +4 -0
- package/build/models/tools/diagrams/diagrams-config.schema.js +2 -0
- package/build/models/tools/diagrams/diagrams-job.schema.d.ts +104 -10
- package/build/models/tools/diagrams/diagrams-job.schema.js +71 -17
- package/build/models/tools/image-generation/image-generation-config.schema.d.ts +2 -0
- package/build/models/tools/image-generation/image-generation-model.schema.d.ts +3 -0
- package/build/models/tools/image-generation/image-generation-model.schema.js +1 -0
- package/package.json +1 -1
package/build/commands/ai-studio/canvas-node/find-canvas-node-definitions-with-configs.query.d.ts
CHANGED
|
@@ -175,6 +175,7 @@ export declare namespace FindCanvasNodeDefinitionsWithConfigsQuery {
|
|
|
175
175
|
condition: z.ZodObject<{
|
|
176
176
|
resolution: z.ZodOptional<z.ZodString>;
|
|
177
177
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
178
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
178
179
|
}, z.core.$strip>;
|
|
179
180
|
value: z.ZodNumber;
|
|
180
181
|
}, z.core.$strip>>;
|
|
@@ -198,6 +198,7 @@ export declare namespace GetB2bDocumentationCommand {
|
|
|
198
198
|
condition: z.ZodObject<{
|
|
199
199
|
resolution: z.ZodOptional<z.ZodString>;
|
|
200
200
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
201
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
201
202
|
}, z.core.$strip>;
|
|
202
203
|
value: z.ZodNumber;
|
|
203
204
|
}, z.core.$strip>>;
|
|
@@ -382,6 +383,7 @@ export declare namespace GetB2bDocumentationCommand {
|
|
|
382
383
|
condition: z.ZodObject<{
|
|
383
384
|
resolution: z.ZodOptional<z.ZodString>;
|
|
384
385
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
386
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
385
387
|
}, z.core.$strip>;
|
|
386
388
|
value: z.ZodNumber;
|
|
387
389
|
}, z.core.$strip>>;
|
|
@@ -87,6 +87,7 @@ export declare namespace FindModelPageAdminCommand {
|
|
|
87
87
|
condition: z.ZodObject<{
|
|
88
88
|
resolution: z.ZodOptional<z.ZodString>;
|
|
89
89
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
90
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
90
91
|
}, z.core.$strip>;
|
|
91
92
|
value: z.ZodNumber;
|
|
92
93
|
}, z.core.$strip>>;
|
|
@@ -88,6 +88,7 @@ export declare namespace FindModelPageAnswerDetailCommand {
|
|
|
88
88
|
condition: z.ZodObject<{
|
|
89
89
|
resolution: z.ZodOptional<z.ZodString>;
|
|
90
90
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
91
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
91
92
|
}, z.core.$strip>;
|
|
92
93
|
value: z.ZodNumber;
|
|
93
94
|
}, z.core.$strip>>;
|
|
@@ -87,6 +87,7 @@ export declare namespace FindModelPageDetailCommand {
|
|
|
87
87
|
condition: z.ZodObject<{
|
|
88
88
|
resolution: z.ZodOptional<z.ZodString>;
|
|
89
89
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
90
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
90
91
|
}, z.core.$strip>;
|
|
91
92
|
value: z.ZodNumber;
|
|
92
93
|
}, z.core.$strip>>;
|
|
@@ -82,6 +82,7 @@ export declare namespace FindModelPageHubCommand {
|
|
|
82
82
|
condition: z.ZodObject<{
|
|
83
83
|
resolution: z.ZodOptional<z.ZodString>;
|
|
84
84
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
85
86
|
}, z.core.$strip>;
|
|
86
87
|
value: z.ZodNumber;
|
|
87
88
|
}, z.core.$strip>>;
|
|
@@ -44,6 +44,7 @@ export declare namespace GetPhotoStudioConfigQuery {
|
|
|
44
44
|
condition: z.ZodObject<{
|
|
45
45
|
resolution: z.ZodOptional<z.ZodString>;
|
|
46
46
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
47
48
|
}, z.core.$strip>;
|
|
48
49
|
value: z.ZodNumber;
|
|
49
50
|
}, z.core.$strip>>;
|
|
@@ -192,6 +193,7 @@ export declare namespace GetPhotoStudioConfigQuery {
|
|
|
192
193
|
condition: z.ZodObject<{
|
|
193
194
|
resolution: z.ZodOptional<z.ZodString>;
|
|
194
195
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
196
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
195
197
|
}, z.core.$strip>;
|
|
196
198
|
value: z.ZodNumber;
|
|
197
199
|
}, z.core.$strip>>;
|
|
@@ -3,10 +3,15 @@ export declare namespace DiagramsCommand {
|
|
|
3
3
|
const RequestSchema: z.ZodObject<{
|
|
4
4
|
prompt: z.ZodString;
|
|
5
5
|
modelId: z.ZodString;
|
|
6
|
-
params: z.ZodObject<{
|
|
6
|
+
params: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7
|
+
mode: z.ZodLiteral<"chart">;
|
|
7
8
|
chartTypeUuid: z.ZodString;
|
|
8
|
-
fileIds: z.
|
|
9
|
-
}, z.core.$strip
|
|
9
|
+
fileIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
11
|
+
mode: z.ZodLiteral<"report">;
|
|
12
|
+
accentColor: z.ZodString;
|
|
13
|
+
fileIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14
|
+
}, z.core.$strip>], "mode">;
|
|
10
15
|
}, z.core.$strip>;
|
|
11
16
|
type Request = z.infer<typeof RequestSchema>;
|
|
12
17
|
const ResponseSchema: z.ZodObject<{
|
|
@@ -34,12 +39,19 @@ export declare namespace DiagramsCommand {
|
|
|
34
39
|
createdAt: z.ZodDate;
|
|
35
40
|
completedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
36
41
|
updatedAt: z.ZodDate;
|
|
37
|
-
params: z.ZodObject<{
|
|
42
|
+
params: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
43
|
+
mode: z.ZodLiteral<"chart">;
|
|
38
44
|
chartTypeUuid: z.ZodString;
|
|
39
45
|
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
40
46
|
fileId: z.ZodString;
|
|
41
47
|
}, z.core.$strip>>>;
|
|
42
|
-
}, z.core.$strip
|
|
48
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
49
|
+
mode: z.ZodLiteral<"report">;
|
|
50
|
+
accentColor: z.ZodString;
|
|
51
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
52
|
+
fileId: z.ZodString;
|
|
53
|
+
}, z.core.$strip>>>;
|
|
54
|
+
}, z.core.$strip>], "mode">;
|
|
43
55
|
}, z.core.$strip>;
|
|
44
56
|
}, z.core.$strip>;
|
|
45
57
|
type Response = z.infer<typeof ResponseSchema>;
|
|
@@ -3,15 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.DiagramsCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const models_1 = require("../../../models");
|
|
6
|
+
const models_2 = require("../../../models");
|
|
6
7
|
var DiagramsCommand;
|
|
7
8
|
(function (DiagramsCommand) {
|
|
8
9
|
DiagramsCommand.RequestSchema = zod_1.z.object({
|
|
9
10
|
prompt: zod_1.z.string().min(1).max(100000),
|
|
10
11
|
modelId: zod_1.z.string().uuid(),
|
|
11
|
-
params:
|
|
12
|
-
chartTypeUuid: zod_1.z.string().uuid(),
|
|
13
|
-
fileIds: zod_1.z.array(zod_1.z.string().uuid()).optional().default([]),
|
|
14
|
-
}),
|
|
12
|
+
params: models_2.DiagramsJobRequestParamsSchema,
|
|
15
13
|
});
|
|
16
14
|
DiagramsCommand.ResponseSchema = zod_1.z.object({
|
|
17
15
|
data: models_1.DiagramsJobSchemaResponse,
|
|
@@ -8,8 +8,15 @@ export declare namespace EditDiagramsJobCommand {
|
|
|
8
8
|
prompt: z.ZodString;
|
|
9
9
|
versionId: z.ZodString;
|
|
10
10
|
modelId: z.ZodOptional<z.ZodString>;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
params: z.ZodOptional<z.ZodObject<{
|
|
12
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
13
|
+
chart: "chart";
|
|
14
|
+
report: "report";
|
|
15
|
+
}>>;
|
|
16
|
+
chartTypeUuid: z.ZodOptional<z.ZodString>;
|
|
17
|
+
accentColor: z.ZodOptional<z.ZodString>;
|
|
18
|
+
fileIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
19
|
+
}, z.core.$strip>>;
|
|
13
20
|
}, z.core.$strip>;
|
|
14
21
|
type Request = z.infer<typeof RequestSchema>;
|
|
15
22
|
const ResponseSchema: z.ZodObject<{
|
|
@@ -37,12 +44,19 @@ export declare namespace EditDiagramsJobCommand {
|
|
|
37
44
|
createdAt: z.ZodDate;
|
|
38
45
|
completedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
39
46
|
updatedAt: z.ZodDate;
|
|
40
|
-
params: z.ZodObject<{
|
|
47
|
+
params: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
48
|
+
mode: z.ZodLiteral<"chart">;
|
|
41
49
|
chartTypeUuid: z.ZodString;
|
|
42
50
|
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
43
51
|
fileId: z.ZodString;
|
|
44
52
|
}, z.core.$strip>>>;
|
|
45
|
-
}, z.core.$strip
|
|
53
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
54
|
+
mode: z.ZodLiteral<"report">;
|
|
55
|
+
accentColor: z.ZodString;
|
|
56
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
57
|
+
fileId: z.ZodString;
|
|
58
|
+
}, z.core.$strip>>>;
|
|
59
|
+
}, z.core.$strip>], "mode">;
|
|
46
60
|
}, z.core.$strip>;
|
|
47
61
|
}, z.core.$strip>;
|
|
48
62
|
type Response = z.infer<typeof ResponseSchema>;
|
|
@@ -12,8 +12,7 @@ var EditDiagramsJobCommand;
|
|
|
12
12
|
prompt: zod_1.z.string().min(1).max(100000),
|
|
13
13
|
versionId: zod_1.z.string().uuid(),
|
|
14
14
|
modelId: zod_1.z.string().uuid().optional(),
|
|
15
|
-
|
|
16
|
-
fileIds: zod_1.z.array(zod_1.z.string().uuid()).optional().default([]),
|
|
15
|
+
params: models_1.DiagramsJobRequestParamsUpdateSchema.optional(),
|
|
17
16
|
});
|
|
18
17
|
EditDiagramsJobCommand.ResponseSchema = zod_1.z.object({
|
|
19
18
|
data: models_1.DiagramsJobSchemaResponse,
|
|
@@ -29,12 +29,19 @@ export declare namespace FindDiagramsJobByUUIDCommand {
|
|
|
29
29
|
createdAt: z.ZodDate;
|
|
30
30
|
completedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
31
31
|
updatedAt: z.ZodDate;
|
|
32
|
-
params: z.ZodObject<{
|
|
32
|
+
params: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
33
|
+
mode: z.ZodLiteral<"chart">;
|
|
33
34
|
chartTypeUuid: z.ZodString;
|
|
34
35
|
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
35
36
|
fileId: z.ZodString;
|
|
36
37
|
}, z.core.$strip>>>;
|
|
37
|
-
}, z.core.$strip
|
|
38
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
39
|
+
mode: z.ZodLiteral<"report">;
|
|
40
|
+
accentColor: z.ZodString;
|
|
41
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
42
|
+
fileId: z.ZodString;
|
|
43
|
+
}, z.core.$strip>>>;
|
|
44
|
+
}, z.core.$strip>], "mode">;
|
|
38
45
|
}, z.core.$strip>;
|
|
39
46
|
}, z.core.$strip>;
|
|
40
47
|
type Response = z.infer<typeof ResponseSchema>;
|
|
@@ -35,12 +35,19 @@ export declare namespace FindDiagramsJobsCommand {
|
|
|
35
35
|
createdAt: z.ZodDate;
|
|
36
36
|
completedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
37
37
|
updatedAt: z.ZodDate;
|
|
38
|
-
params: z.ZodObject<{
|
|
38
|
+
params: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
39
|
+
mode: z.ZodLiteral<"chart">;
|
|
39
40
|
chartTypeUuid: z.ZodString;
|
|
40
41
|
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
41
42
|
fileId: z.ZodString;
|
|
42
43
|
}, z.core.$strip>>>;
|
|
43
|
-
}, z.core.$strip
|
|
44
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
45
|
+
mode: z.ZodLiteral<"report">;
|
|
46
|
+
accentColor: z.ZodString;
|
|
47
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
48
|
+
fileId: z.ZodString;
|
|
49
|
+
}, z.core.$strip>>>;
|
|
50
|
+
}, z.core.$strip>], "mode">;
|
|
44
51
|
}, z.core.$strip>>;
|
|
45
52
|
totalPages: z.ZodNumber;
|
|
46
53
|
total: z.ZodNumber;
|
|
@@ -3,8 +3,15 @@ export declare namespace GetDiagramsPriceCommand {
|
|
|
3
3
|
const RequestSchema: z.ZodObject<{
|
|
4
4
|
modelId: z.ZodString;
|
|
5
5
|
promptLenght: z.ZodNumber;
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
params: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7
|
+
mode: z.ZodLiteral<"chart">;
|
|
8
|
+
chartTypeUuid: z.ZodString;
|
|
9
|
+
fileIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
11
|
+
mode: z.ZodLiteral<"report">;
|
|
12
|
+
accentColor: z.ZodString;
|
|
13
|
+
fileIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14
|
+
}, z.core.$strip>], "mode">;
|
|
8
15
|
jobId: z.ZodOptional<z.ZodString>;
|
|
9
16
|
parentVersionUuid: z.ZodOptional<z.ZodString>;
|
|
10
17
|
}, z.core.$strip>;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetDiagramsPriceCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../../models");
|
|
5
6
|
var GetDiagramsPriceCommand;
|
|
6
7
|
(function (GetDiagramsPriceCommand) {
|
|
7
8
|
GetDiagramsPriceCommand.RequestSchema = zod_1.z.object({
|
|
8
9
|
modelId: zod_1.z.string().uuid(),
|
|
9
10
|
promptLenght: zod_1.z.number().max(100000),
|
|
10
|
-
|
|
11
|
-
fileIds: zod_1.z.array(zod_1.z.string().uuid()).optional().default([]),
|
|
11
|
+
params: models_1.DiagramsJobRequestParamsSchema,
|
|
12
12
|
jobId: zod_1.z.string().uuid().optional(),
|
|
13
13
|
parentVersionUuid: zod_1.z.string().uuid().optional(),
|
|
14
14
|
});
|
|
@@ -53,6 +53,10 @@ export declare namespace GetDiagramsToolConfigCommand {
|
|
|
53
53
|
createdAt: z.ZodDate;
|
|
54
54
|
updatedAt: z.ZodDate;
|
|
55
55
|
}, z.core.$strip>>;
|
|
56
|
+
modes: z.ZodArray<z.ZodEnum<{
|
|
57
|
+
chart: "chart";
|
|
58
|
+
report: "report";
|
|
59
|
+
}>>;
|
|
56
60
|
}, z.core.$strip>;
|
|
57
61
|
}, z.core.$strip>;
|
|
58
62
|
type Response = z.infer<typeof ResponseSchema>;
|
|
@@ -8,7 +8,12 @@ export declare namespace RetryDiagramsJobCommand {
|
|
|
8
8
|
prompt: z.ZodOptional<z.ZodString>;
|
|
9
9
|
modelId: z.ZodOptional<z.ZodString>;
|
|
10
10
|
params: z.ZodOptional<z.ZodObject<{
|
|
11
|
-
|
|
11
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
12
|
+
chart: "chart";
|
|
13
|
+
report: "report";
|
|
14
|
+
}>>;
|
|
15
|
+
chartTypeUuid: z.ZodOptional<z.ZodString>;
|
|
16
|
+
accentColor: z.ZodOptional<z.ZodString>;
|
|
12
17
|
fileIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
13
18
|
}, z.core.$strip>>;
|
|
14
19
|
}, z.core.$strip>;
|
|
@@ -38,12 +43,19 @@ export declare namespace RetryDiagramsJobCommand {
|
|
|
38
43
|
createdAt: z.ZodDate;
|
|
39
44
|
completedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
40
45
|
updatedAt: z.ZodDate;
|
|
41
|
-
params: z.ZodObject<{
|
|
46
|
+
params: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
47
|
+
mode: z.ZodLiteral<"chart">;
|
|
42
48
|
chartTypeUuid: z.ZodString;
|
|
43
49
|
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
44
50
|
fileId: z.ZodString;
|
|
45
51
|
}, z.core.$strip>>>;
|
|
46
|
-
}, z.core.$strip
|
|
52
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
53
|
+
mode: z.ZodLiteral<"report">;
|
|
54
|
+
accentColor: z.ZodString;
|
|
55
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
56
|
+
fileId: z.ZodString;
|
|
57
|
+
}, z.core.$strip>>>;
|
|
58
|
+
}, z.core.$strip>], "mode">;
|
|
47
59
|
}, z.core.$strip>;
|
|
48
60
|
}, z.core.$strip>;
|
|
49
61
|
type Response = z.infer<typeof ResponseSchema>;
|
|
@@ -11,7 +11,7 @@ var RetryDiagramsJobCommand;
|
|
|
11
11
|
RetryDiagramsJobCommand.RequestSchema = zod_1.z.object({
|
|
12
12
|
prompt: zod_1.z.string().optional(),
|
|
13
13
|
modelId: zod_1.z.string().uuid().optional(),
|
|
14
|
-
params: models_1.
|
|
14
|
+
params: models_1.DiagramsJobRequestParamsUpdateSchema.optional(),
|
|
15
15
|
});
|
|
16
16
|
RetryDiagramsJobCommand.ResponseSchema = zod_1.z.object({
|
|
17
17
|
data: models_1.DiagramsJobSchemaResponse,
|
|
@@ -35,12 +35,19 @@ export declare namespace SetReactionToDiagramsJobCommand {
|
|
|
35
35
|
createdAt: z.ZodDate;
|
|
36
36
|
completedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
37
37
|
updatedAt: z.ZodDate;
|
|
38
|
-
params: z.ZodObject<{
|
|
38
|
+
params: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
39
|
+
mode: z.ZodLiteral<"chart">;
|
|
39
40
|
chartTypeUuid: z.ZodString;
|
|
40
41
|
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
41
42
|
fileId: z.ZodString;
|
|
42
43
|
}, z.core.$strip>>>;
|
|
43
|
-
}, z.core.$strip
|
|
44
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
45
|
+
mode: z.ZodLiteral<"report">;
|
|
46
|
+
accentColor: z.ZodString;
|
|
47
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
48
|
+
fileId: z.ZodString;
|
|
49
|
+
}, z.core.$strip>>>;
|
|
50
|
+
}, z.core.$strip>], "mode">;
|
|
44
51
|
}, z.core.$strip>;
|
|
45
52
|
}, z.core.$strip>;
|
|
46
53
|
type Response = z.infer<typeof ResponseSchema>;
|
|
@@ -33,12 +33,19 @@ export declare namespace UpdateDiagramsJobFavoriteCommand {
|
|
|
33
33
|
createdAt: z.ZodDate;
|
|
34
34
|
completedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
35
35
|
updatedAt: z.ZodDate;
|
|
36
|
-
params: z.ZodObject<{
|
|
36
|
+
params: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
37
|
+
mode: z.ZodLiteral<"chart">;
|
|
37
38
|
chartTypeUuid: z.ZodString;
|
|
38
39
|
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
39
40
|
fileId: z.ZodString;
|
|
40
41
|
}, z.core.$strip>>>;
|
|
41
|
-
}, z.core.$strip
|
|
42
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
43
|
+
mode: z.ZodLiteral<"report">;
|
|
44
|
+
accentColor: z.ZodString;
|
|
45
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
46
|
+
fileId: z.ZodString;
|
|
47
|
+
}, z.core.$strip>>>;
|
|
48
|
+
}, z.core.$strip>], "mode">;
|
|
42
49
|
}, z.core.$strip>;
|
|
43
50
|
}, z.core.$strip>;
|
|
44
51
|
type Response = z.infer<typeof ResponseSchema>;
|
|
@@ -33,12 +33,19 @@ export declare namespace UpdateDiagramsJobTitleCommand {
|
|
|
33
33
|
createdAt: z.ZodDate;
|
|
34
34
|
completedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
35
35
|
updatedAt: z.ZodDate;
|
|
36
|
-
params: z.ZodObject<{
|
|
36
|
+
params: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
37
|
+
mode: z.ZodLiteral<"chart">;
|
|
37
38
|
chartTypeUuid: z.ZodString;
|
|
38
39
|
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
39
40
|
fileId: z.ZodString;
|
|
40
41
|
}, z.core.$strip>>>;
|
|
41
|
-
}, z.core.$strip
|
|
42
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
43
|
+
mode: z.ZodLiteral<"report">;
|
|
44
|
+
accentColor: z.ZodString;
|
|
45
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
46
|
+
fileId: z.ZodString;
|
|
47
|
+
}, z.core.$strip>>>;
|
|
48
|
+
}, z.core.$strip>], "mode">;
|
|
42
49
|
}, z.core.$strip>;
|
|
43
50
|
}, z.core.$strip>;
|
|
44
51
|
type Response = z.infer<typeof ResponseSchema>;
|
|
@@ -43,6 +43,7 @@ export declare namespace GetImageGenerationConfigCommand {
|
|
|
43
43
|
condition: z.ZodObject<{
|
|
44
44
|
resolution: z.ZodOptional<z.ZodString>;
|
|
45
45
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
46
47
|
}, z.core.$strip>;
|
|
47
48
|
value: z.ZodNumber;
|
|
48
49
|
}, z.core.$strip>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ImageGenerationJobParams, ImageModelPricingRules } from '../../models';
|
|
2
2
|
export declare function calculateImageGenerationPrice({ basePrice, params, userHasActiveSubscriptionOrProduct, rules, }: {
|
|
3
3
|
basePrice: number;
|
|
4
|
-
params: Pick<ImageGenerationJobParams, 'resolution'>;
|
|
4
|
+
params: Pick<ImageGenerationJobParams, 'resolution' | 'attachedFiles'>;
|
|
5
5
|
userHasActiveSubscriptionOrProduct: boolean;
|
|
6
6
|
rules: ImageModelPricingRules;
|
|
7
7
|
}): number;
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.calculateImageGenerationPrice = calculateImageGenerationPrice;
|
|
4
4
|
function calculateImageGenerationPrice({ basePrice, params, userHasActiveSubscriptionOrProduct, rules, }) {
|
|
5
|
+
var _a;
|
|
6
|
+
var _b;
|
|
5
7
|
let price = basePrice;
|
|
6
8
|
for (const rule of rules !== null && rules !== void 0 ? rules : []) {
|
|
7
9
|
const condition = rule.condition;
|
|
@@ -11,6 +13,9 @@ function calculateImageGenerationPrice({ basePrice, params, userHasActiveSubscri
|
|
|
11
13
|
if (condition.withoutSub && userHasActiveSubscriptionOrProduct === false) {
|
|
12
14
|
price += rule.value;
|
|
13
15
|
}
|
|
16
|
+
if (condition.perAttachedImage) {
|
|
17
|
+
price += rule.value * ((_b = (_a = params.attachedFiles) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);
|
|
18
|
+
}
|
|
14
19
|
}
|
|
15
20
|
return price;
|
|
16
21
|
}
|
|
@@ -225,6 +225,7 @@ export declare const CanvasNodeDefinitionToolConfigSchema: z.ZodDiscriminatedUni
|
|
|
225
225
|
condition: z.ZodObject<{
|
|
226
226
|
resolution: z.ZodOptional<z.ZodString>;
|
|
227
227
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
228
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
228
229
|
}, z.core.$strip>;
|
|
229
230
|
value: z.ZodNumber;
|
|
230
231
|
}, z.core.$strip>>;
|
|
@@ -956,6 +957,7 @@ export declare const CanvasNodeDefinitionWithConfigSchema: z.ZodObject<{
|
|
|
956
957
|
condition: z.ZodObject<{
|
|
957
958
|
resolution: z.ZodOptional<z.ZodString>;
|
|
958
959
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
960
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
959
961
|
}, z.core.$strip>;
|
|
960
962
|
value: z.ZodNumber;
|
|
961
963
|
}, z.core.$strip>>;
|
|
@@ -1645,6 +1647,7 @@ export declare const CanvasNodeDefinitionsWithConfigsSchema: z.ZodRecord<z.ZodEn
|
|
|
1645
1647
|
condition: z.ZodObject<{
|
|
1646
1648
|
resolution: z.ZodOptional<z.ZodString>;
|
|
1647
1649
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
1650
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
1648
1651
|
}, z.core.$strip>;
|
|
1649
1652
|
value: z.ZodNumber;
|
|
1650
1653
|
}, z.core.$strip>>;
|
|
@@ -122,6 +122,7 @@ export declare const ModelPageHubSchema: z.ZodObject<{
|
|
|
122
122
|
condition: z.ZodObject<{
|
|
123
123
|
resolution: z.ZodOptional<z.ZodString>;
|
|
124
124
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
125
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
125
126
|
}, z.core.$strip>;
|
|
126
127
|
value: z.ZodNumber;
|
|
127
128
|
}, z.core.$strip>>;
|
|
@@ -481,6 +482,7 @@ export declare const ModelPageDetailSchema: z.ZodObject<{
|
|
|
481
482
|
condition: z.ZodObject<{
|
|
482
483
|
resolution: z.ZodOptional<z.ZodString>;
|
|
483
484
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
485
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
484
486
|
}, z.core.$strip>;
|
|
485
487
|
value: z.ZodNumber;
|
|
486
488
|
}, z.core.$strip>>;
|
|
@@ -851,6 +853,7 @@ export declare const ModelPageAnswerDetailSchema: z.ZodObject<{
|
|
|
851
853
|
condition: z.ZodObject<{
|
|
852
854
|
resolution: z.ZodOptional<z.ZodString>;
|
|
853
855
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
856
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
854
857
|
}, z.core.$strip>;
|
|
855
858
|
value: z.ZodNumber;
|
|
856
859
|
}, z.core.$strip>>;
|
|
@@ -74,6 +74,7 @@ export declare const ModelPageImageGenerationTechnicalModelSchema: z.ZodObject<{
|
|
|
74
74
|
condition: z.ZodObject<{
|
|
75
75
|
resolution: z.ZodOptional<z.ZodString>;
|
|
76
76
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
77
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
77
78
|
}, z.core.$strip>;
|
|
78
79
|
value: z.ZodNumber;
|
|
79
80
|
}, z.core.$strip>>;
|
|
@@ -406,6 +407,7 @@ export declare const ModelPageTechnicalModelSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
406
407
|
condition: z.ZodObject<{
|
|
407
408
|
resolution: z.ZodOptional<z.ZodString>;
|
|
408
409
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
410
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
409
411
|
}, z.core.$strip>;
|
|
410
412
|
value: z.ZodNumber;
|
|
411
413
|
}, z.core.$strip>>;
|
|
@@ -735,6 +737,7 @@ export declare const ModelPageCardSchema: z.ZodIntersection<z.ZodDiscriminatedUn
|
|
|
735
737
|
condition: z.ZodObject<{
|
|
736
738
|
resolution: z.ZodOptional<z.ZodString>;
|
|
737
739
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
740
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
738
741
|
}, z.core.$strip>;
|
|
739
742
|
value: z.ZodNumber;
|
|
740
743
|
}, z.core.$strip>>;
|
|
@@ -51,5 +51,9 @@ export declare const DiagramsConfigSchema: z.ZodObject<{
|
|
|
51
51
|
createdAt: z.ZodDate;
|
|
52
52
|
updatedAt: z.ZodDate;
|
|
53
53
|
}, z.core.$strip>>;
|
|
54
|
+
modes: z.ZodArray<z.ZodEnum<{
|
|
55
|
+
chart: "chart";
|
|
56
|
+
report: "report";
|
|
57
|
+
}>>;
|
|
54
58
|
}, z.core.$strip>;
|
|
55
59
|
export type DiagramsConfig = z.infer<typeof DiagramsConfigSchema>;
|
|
@@ -4,7 +4,9 @@ exports.DiagramsConfigSchema = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const diagrams_model_schema_1 = require("./diagrams-model.schema");
|
|
6
6
|
const diagrams_chart_type_schema_1 = require("./diagrams-chart-type.schema");
|
|
7
|
+
const diagrams_job_schema_1 = require("./diagrams-job.schema");
|
|
7
8
|
exports.DiagramsConfigSchema = zod_1.z.object({
|
|
8
9
|
models: zod_1.z.array(diagrams_model_schema_1.DiagramsModelSchemaResponse),
|
|
9
10
|
chartTypes: zod_1.z.array(diagrams_chart_type_schema_1.DiagramsChartTypeSchemaResponse),
|
|
11
|
+
modes: zod_1.z.array(diagrams_job_schema_1.DiagramsModeSchema),
|
|
10
12
|
});
|
|
@@ -1,25 +1,90 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { TOOL_JOB_STATUS, USER_REACTION } from '../../../constants';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const DIAGRAMS_MODES: readonly ['chart', 'report'];
|
|
4
|
+
export declare const DiagramsModeSchema: z.ZodEnum<{
|
|
5
|
+
chart: "chart";
|
|
6
|
+
report: "report";
|
|
7
|
+
}>;
|
|
8
|
+
export declare const DiagramsReportAccentColorSchema: z.ZodString;
|
|
9
|
+
export declare const DiagramsJobRequestParamsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
10
|
+
mode: z.ZodLiteral<"chart">;
|
|
4
11
|
chartTypeUuid: z.ZodString;
|
|
5
12
|
fileIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
6
|
-
}, z.core.$strip
|
|
13
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
14
|
+
mode: z.ZodLiteral<"report">;
|
|
15
|
+
accentColor: z.ZodString;
|
|
16
|
+
fileIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
17
|
+
}, z.core.$strip>], "mode">;
|
|
7
18
|
export type DiagramsJobRequestParams = z.infer<typeof DiagramsJobRequestParamsSchema>;
|
|
8
|
-
export declare const
|
|
19
|
+
export declare const DiagramsJobRequestParamsUpdateSchema: z.ZodObject<{
|
|
20
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
21
|
+
chart: "chart";
|
|
22
|
+
report: "report";
|
|
23
|
+
}>>;
|
|
24
|
+
chartTypeUuid: z.ZodOptional<z.ZodString>;
|
|
25
|
+
accentColor: z.ZodOptional<z.ZodString>;
|
|
26
|
+
fileIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export type DiagramsJobRequestParamsUpdate = z.infer<typeof DiagramsJobRequestParamsUpdateSchema>;
|
|
29
|
+
export declare const DiagramsChartParamsSchema: z.ZodObject<{
|
|
30
|
+
mode: z.ZodDefault<z.ZodLiteral<"chart">>;
|
|
9
31
|
chartTypeUuid: z.ZodString;
|
|
10
32
|
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
11
33
|
fileId: z.ZodString;
|
|
12
34
|
url: z.ZodString;
|
|
13
35
|
}, z.core.$strip>>>;
|
|
14
36
|
}, z.core.$strip>;
|
|
15
|
-
export
|
|
16
|
-
|
|
37
|
+
export declare const DiagramsReportParamsSchema: z.ZodObject<{
|
|
38
|
+
mode: z.ZodLiteral<"report">;
|
|
39
|
+
accentColor: z.ZodString;
|
|
40
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
41
|
+
fileId: z.ZodString;
|
|
42
|
+
url: z.ZodString;
|
|
43
|
+
}, z.core.$strip>>>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
export declare const DiagramsNewJobParamsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
46
|
+
chartTypeUuid: z.ZodString;
|
|
47
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
48
|
+
fileId: z.ZodString;
|
|
49
|
+
url: z.ZodString;
|
|
50
|
+
}, z.core.$strip>>>;
|
|
51
|
+
mode: z.ZodLiteral<"chart">;
|
|
52
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
53
|
+
mode: z.ZodLiteral<"report">;
|
|
54
|
+
accentColor: z.ZodString;
|
|
55
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
56
|
+
fileId: z.ZodString;
|
|
57
|
+
url: z.ZodString;
|
|
58
|
+
}, z.core.$strip>>>;
|
|
59
|
+
}, z.core.$strip>], "mode">;
|
|
60
|
+
export declare const DiagramsJobParamsSchema: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
61
|
+
mode: z.ZodDefault<z.ZodLiteral<"chart">>;
|
|
17
62
|
chartTypeUuid: z.ZodString;
|
|
18
63
|
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
19
64
|
fileId: z.ZodString;
|
|
65
|
+
url: z.ZodString;
|
|
66
|
+
}, z.core.$strip>>>;
|
|
67
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
68
|
+
mode: z.ZodLiteral<"report">;
|
|
69
|
+
accentColor: z.ZodString;
|
|
70
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
71
|
+
fileId: z.ZodString;
|
|
72
|
+
url: z.ZodString;
|
|
73
|
+
}, z.core.$strip>>>;
|
|
74
|
+
}, z.core.$strip>], "mode">>;
|
|
75
|
+
export type DiagramsJobParams = z.infer<typeof DiagramsJobParamsSchema>;
|
|
76
|
+
export declare const DiagramsJobParamsUpdateSchema: z.ZodObject<{
|
|
77
|
+
mode: z.ZodOptional<z.ZodEnum<{
|
|
78
|
+
chart: "chart";
|
|
79
|
+
report: "report";
|
|
80
|
+
}>>;
|
|
81
|
+
chartTypeUuid: z.ZodOptional<z.ZodString>;
|
|
82
|
+
accentColor: z.ZodOptional<z.ZodString>;
|
|
83
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
84
|
+
fileId: z.ZodString;
|
|
85
|
+
url: z.ZodString;
|
|
20
86
|
}, z.core.$strip>>>;
|
|
21
87
|
}, z.core.$strip>;
|
|
22
|
-
export type DiagramsJobParamsResponse = z.infer<typeof DiagramsJobParamsSchemaResponse>;
|
|
23
88
|
export declare const DiagramsJobOutputSchema: z.ZodObject<{
|
|
24
89
|
versions: z.ZodArray<z.ZodObject<{
|
|
25
90
|
uuid: z.ZodString;
|
|
@@ -29,6 +94,20 @@ export declare const DiagramsJobOutputSchema: z.ZodObject<{
|
|
|
29
94
|
}, z.core.$strip>>;
|
|
30
95
|
}, z.core.$strip>;
|
|
31
96
|
export type DiagramsJobOutput = z.infer<typeof DiagramsJobOutputSchema>;
|
|
97
|
+
export declare const DiagramsJobParamsSchemaResponse: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
98
|
+
mode: z.ZodLiteral<"chart">;
|
|
99
|
+
chartTypeUuid: z.ZodString;
|
|
100
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
101
|
+
fileId: z.ZodString;
|
|
102
|
+
}, z.core.$strip>>>;
|
|
103
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
104
|
+
mode: z.ZodLiteral<"report">;
|
|
105
|
+
accentColor: z.ZodString;
|
|
106
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
107
|
+
fileId: z.ZodString;
|
|
108
|
+
}, z.core.$strip>>>;
|
|
109
|
+
}, z.core.$strip>], "mode">;
|
|
110
|
+
export type DiagramsJobParamsResponse = z.infer<typeof DiagramsJobParamsSchemaResponse>;
|
|
32
111
|
export declare const DiagramsJobSchema: z.ZodObject<{
|
|
33
112
|
uuid: z.ZodString;
|
|
34
113
|
prompt: z.ZodString;
|
|
@@ -38,13 +117,21 @@ export declare const DiagramsJobSchema: z.ZodObject<{
|
|
|
38
117
|
internalError: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
39
118
|
modelId: z.ZodString;
|
|
40
119
|
price: z.ZodNumber;
|
|
41
|
-
params: z.ZodObject<{
|
|
120
|
+
params: z.ZodPreprocess<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
121
|
+
mode: z.ZodDefault<z.ZodLiteral<"chart">>;
|
|
42
122
|
chartTypeUuid: z.ZodString;
|
|
43
123
|
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
44
124
|
fileId: z.ZodString;
|
|
45
125
|
url: z.ZodString;
|
|
46
126
|
}, z.core.$strip>>>;
|
|
47
|
-
}, z.core.$strip
|
|
127
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
128
|
+
mode: z.ZodLiteral<"report">;
|
|
129
|
+
accentColor: z.ZodString;
|
|
130
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
131
|
+
fileId: z.ZodString;
|
|
132
|
+
url: z.ZodString;
|
|
133
|
+
}, z.core.$strip>>>;
|
|
134
|
+
}, z.core.$strip>], "mode">>;
|
|
48
135
|
output: z.ZodObject<{
|
|
49
136
|
versions: z.ZodArray<z.ZodObject<{
|
|
50
137
|
uuid: z.ZodString;
|
|
@@ -90,11 +177,18 @@ export declare const DiagramsJobSchemaResponse: z.ZodObject<{
|
|
|
90
177
|
createdAt: z.ZodDate;
|
|
91
178
|
completedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
92
179
|
updatedAt: z.ZodDate;
|
|
93
|
-
params: z.ZodObject<{
|
|
180
|
+
params: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
181
|
+
mode: z.ZodLiteral<"chart">;
|
|
94
182
|
chartTypeUuid: z.ZodString;
|
|
95
183
|
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
96
184
|
fileId: z.ZodString;
|
|
97
185
|
}, z.core.$strip>>>;
|
|
98
|
-
}, z.core.$strip
|
|
186
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
187
|
+
mode: z.ZodLiteral<"report">;
|
|
188
|
+
accentColor: z.ZodString;
|
|
189
|
+
data: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
190
|
+
fileId: z.ZodString;
|
|
191
|
+
}, z.core.$strip>>>;
|
|
192
|
+
}, z.core.$strip>], "mode">;
|
|
99
193
|
}, z.core.$strip>;
|
|
100
194
|
export type DiagramsJobResponse = z.infer<typeof DiagramsJobSchemaResponse>;
|
|
@@ -1,28 +1,65 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DiagramsJobSchemaResponse = exports.DiagramsJobSchema = exports.DiagramsJobOutputSchema = exports.
|
|
3
|
+
exports.DiagramsJobSchemaResponse = exports.DiagramsJobSchema = exports.DiagramsJobParamsSchemaResponse = exports.DiagramsJobOutputSchema = exports.DiagramsJobParamsUpdateSchema = exports.DiagramsJobParamsSchema = exports.DiagramsNewJobParamsSchema = exports.DiagramsReportParamsSchema = exports.DiagramsChartParamsSchema = exports.DiagramsJobRequestParamsUpdateSchema = exports.DiagramsJobRequestParamsSchema = exports.DiagramsReportAccentColorSchema = exports.DiagramsModeSchema = exports.DIAGRAMS_MODES = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const constants_1 = require("../../../constants");
|
|
6
|
-
exports.
|
|
7
|
-
|
|
6
|
+
exports.DIAGRAMS_MODES = ['chart', 'report'];
|
|
7
|
+
exports.DiagramsModeSchema = zod_1.z.enum(exports.DIAGRAMS_MODES);
|
|
8
|
+
exports.DiagramsReportAccentColorSchema = zod_1.z
|
|
9
|
+
.string()
|
|
10
|
+
.regex(/^#[0-9a-fA-F]{6}$/, 'Укажите цвет в формате #RRGGBB');
|
|
11
|
+
exports.DiagramsJobRequestParamsSchema = zod_1.z.discriminatedUnion('mode', [
|
|
12
|
+
zod_1.z.object({
|
|
13
|
+
mode: zod_1.z.literal('chart'),
|
|
14
|
+
chartTypeUuid: zod_1.z.string().uuid(),
|
|
15
|
+
fileIds: zod_1.z.array(zod_1.z.string().uuid()).optional(),
|
|
16
|
+
}),
|
|
17
|
+
zod_1.z.object({
|
|
18
|
+
mode: zod_1.z.literal('report'),
|
|
19
|
+
accentColor: exports.DiagramsReportAccentColorSchema,
|
|
20
|
+
fileIds: zod_1.z.array(zod_1.z.string().uuid()).optional(),
|
|
21
|
+
}),
|
|
22
|
+
]);
|
|
23
|
+
exports.DiagramsJobRequestParamsUpdateSchema = zod_1.z.object({
|
|
24
|
+
mode: exports.DiagramsModeSchema.optional(),
|
|
25
|
+
chartTypeUuid: zod_1.z.string().uuid().optional(),
|
|
26
|
+
accentColor: exports.DiagramsReportAccentColorSchema.optional(),
|
|
8
27
|
fileIds: zod_1.z.array(zod_1.z.string().uuid()).optional(),
|
|
9
28
|
});
|
|
10
|
-
|
|
29
|
+
const DiagramsJobDataSchema = zod_1.z
|
|
30
|
+
.array(zod_1.z.object({
|
|
31
|
+
fileId: zod_1.z.string().uuid(),
|
|
32
|
+
url: zod_1.z.string(),
|
|
33
|
+
}))
|
|
34
|
+
.optional();
|
|
35
|
+
exports.DiagramsChartParamsSchema = zod_1.z.object({
|
|
36
|
+
mode: zod_1.z.literal('chart').default('chart'),
|
|
11
37
|
chartTypeUuid: zod_1.z.string().uuid(),
|
|
12
|
-
data:
|
|
13
|
-
.array(zod_1.z.object({
|
|
14
|
-
fileId: zod_1.z.string().uuid(),
|
|
15
|
-
url: zod_1.z.string(),
|
|
16
|
-
}))
|
|
17
|
-
.optional(),
|
|
38
|
+
data: DiagramsJobDataSchema,
|
|
18
39
|
});
|
|
19
|
-
exports.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
40
|
+
exports.DiagramsReportParamsSchema = zod_1.z.object({
|
|
41
|
+
mode: zod_1.z.literal('report'),
|
|
42
|
+
accentColor: exports.DiagramsReportAccentColorSchema,
|
|
43
|
+
data: DiagramsJobDataSchema,
|
|
44
|
+
});
|
|
45
|
+
exports.DiagramsNewJobParamsSchema = zod_1.z.discriminatedUnion('mode', [
|
|
46
|
+
exports.DiagramsChartParamsSchema.extend({ mode: zod_1.z.literal('chart') }),
|
|
47
|
+
exports.DiagramsReportParamsSchema,
|
|
48
|
+
]);
|
|
49
|
+
exports.DiagramsJobParamsSchema = zod_1.z.preprocess((params) => {
|
|
50
|
+
if (params &&
|
|
51
|
+
typeof params === 'object' &&
|
|
52
|
+
!('mode' in params) &&
|
|
53
|
+
'chartTypeUuid' in params) {
|
|
54
|
+
return Object.assign(Object.assign({}, params), { mode: 'chart' });
|
|
55
|
+
}
|
|
56
|
+
return params;
|
|
57
|
+
}, zod_1.z.discriminatedUnion('mode', [exports.DiagramsChartParamsSchema, exports.DiagramsReportParamsSchema]));
|
|
58
|
+
exports.DiagramsJobParamsUpdateSchema = zod_1.z.object({
|
|
59
|
+
mode: exports.DiagramsModeSchema.optional(),
|
|
60
|
+
chartTypeUuid: zod_1.z.string().uuid().optional(),
|
|
61
|
+
accentColor: exports.DiagramsReportAccentColorSchema.optional(),
|
|
62
|
+
data: DiagramsJobDataSchema,
|
|
26
63
|
});
|
|
27
64
|
exports.DiagramsJobOutputSchema = zod_1.z.object({
|
|
28
65
|
versions: zod_1.z.array(zod_1.z.object({
|
|
@@ -32,6 +69,23 @@ exports.DiagramsJobOutputSchema = zod_1.z.object({
|
|
|
32
69
|
parentUuid: zod_1.z.string().uuid().optional(),
|
|
33
70
|
})),
|
|
34
71
|
});
|
|
72
|
+
const DiagramsJobDataResponseSchema = zod_1.z
|
|
73
|
+
.array(zod_1.z.object({
|
|
74
|
+
fileId: zod_1.z.string().uuid(),
|
|
75
|
+
}))
|
|
76
|
+
.optional();
|
|
77
|
+
exports.DiagramsJobParamsSchemaResponse = zod_1.z.discriminatedUnion('mode', [
|
|
78
|
+
zod_1.z.object({
|
|
79
|
+
mode: zod_1.z.literal('chart'),
|
|
80
|
+
chartTypeUuid: zod_1.z.string().uuid(),
|
|
81
|
+
data: DiagramsJobDataResponseSchema,
|
|
82
|
+
}),
|
|
83
|
+
zod_1.z.object({
|
|
84
|
+
mode: zod_1.z.literal('report'),
|
|
85
|
+
accentColor: exports.DiagramsReportAccentColorSchema,
|
|
86
|
+
data: DiagramsJobDataResponseSchema,
|
|
87
|
+
}),
|
|
88
|
+
]);
|
|
35
89
|
exports.DiagramsJobSchema = zod_1.z.object({
|
|
36
90
|
uuid: zod_1.z.string().uuid(),
|
|
37
91
|
prompt: zod_1.z.string(),
|
|
@@ -40,6 +40,7 @@ export declare const ImageGenerationVendorSchema: z.ZodObject<{
|
|
|
40
40
|
condition: z.ZodObject<{
|
|
41
41
|
resolution: z.ZodOptional<z.ZodString>;
|
|
42
42
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
43
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
43
44
|
}, z.core.$strip>;
|
|
44
45
|
value: z.ZodNumber;
|
|
45
46
|
}, z.core.$strip>>;
|
|
@@ -100,6 +101,7 @@ export declare const ImageGenerationConfigSchema: z.ZodObject<{
|
|
|
100
101
|
condition: z.ZodObject<{
|
|
101
102
|
resolution: z.ZodOptional<z.ZodString>;
|
|
102
103
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
104
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
103
105
|
}, z.core.$strip>;
|
|
104
106
|
value: z.ZodNumber;
|
|
105
107
|
}, z.core.$strip>>;
|
|
@@ -14,12 +14,14 @@ export type ImageGenerationModelParams = z.infer<typeof ImageGenerationModelPara
|
|
|
14
14
|
export declare const ImageModelPricingRuleConditionSchema: z.ZodObject<{
|
|
15
15
|
resolution: z.ZodOptional<z.ZodString>;
|
|
16
16
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
17
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
17
18
|
}, z.core.$strip>;
|
|
18
19
|
export type ImageModelPricingRuleCondition = z.infer<typeof ImageModelPricingRuleConditionSchema>;
|
|
19
20
|
export declare const ImageModelPricingRulesSchema: z.ZodArray<z.ZodObject<{
|
|
20
21
|
condition: z.ZodObject<{
|
|
21
22
|
resolution: z.ZodOptional<z.ZodString>;
|
|
22
23
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
23
25
|
}, z.core.$strip>;
|
|
24
26
|
value: z.ZodNumber;
|
|
25
27
|
}, z.core.$strip>>;
|
|
@@ -51,6 +53,7 @@ export declare const ImageGenerationModelSchema: z.ZodObject<{
|
|
|
51
53
|
condition: z.ZodObject<{
|
|
52
54
|
resolution: z.ZodOptional<z.ZodString>;
|
|
53
55
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
56
|
+
perAttachedImage: z.ZodOptional<z.ZodBoolean>;
|
|
54
57
|
}, z.core.$strip>;
|
|
55
58
|
value: z.ZodNumber;
|
|
56
59
|
}, z.core.$strip>>;
|
|
@@ -22,6 +22,7 @@ exports.ImageGenerationModelParamsSchema = zod_1.z.object({
|
|
|
22
22
|
exports.ImageModelPricingRuleConditionSchema = zod_1.z.object({
|
|
23
23
|
resolution: zod_1.z.string().optional(),
|
|
24
24
|
withoutSub: zod_1.z.boolean().optional(),
|
|
25
|
+
perAttachedImage: zod_1.z.boolean().optional(),
|
|
25
26
|
});
|
|
26
27
|
exports.ImageModelPricingRulesSchema = zod_1.z.array(zod_1.z.object({
|
|
27
28
|
condition: exports.ImageModelPricingRuleConditionSchema,
|