@purpleschool/gptbot-tools 0.4.1-stage-2 → 0.4.1-stage-2-no-html
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/html-page-builder/commands/create-html-page-builder-session.command.d.ts +118 -0
- package/build/html-page-builder/commands/create-html-page-builder-session.command.js +28 -0
- package/build/html-page-builder/commands/get-html-page-builder-price-calculation-data.command.d.ts +7 -31
- package/build/html-page-builder/commands/get-html-page-builder-price-calculation-data.command.js +3 -30
- package/build/html-page-builder/commands/html-page-builder-execute.command.d.ts +8 -138
- package/build/html-page-builder/commands/html-page-builder-execute.command.js +0 -18
- package/build/html-page-builder/commands/index.d.ts +1 -2
- package/build/html-page-builder/commands/index.js +1 -2
- package/build/html-page-builder/commands/update-html-page-builder-session-favorite.command.d.ts +8 -128
- package/build/html-page-builder/commands/update-html-page-builder-session-title.command.d.ts +8 -128
- package/build/html-page-builder/enums/html-page-builder-session-stage.enum.d.ts +4 -0
- package/build/html-page-builder/enums/html-page-builder-session-stage.enum.js +8 -0
- package/build/html-page-builder/enums/index.d.ts +1 -6
- package/build/html-page-builder/enums/index.js +1 -6
- package/build/html-page-builder/models/html-page-builder-config.schema.d.ts +0 -109
- package/build/html-page-builder/models/html-page-builder-config.schema.js +1 -19
- package/build/html-page-builder/models/html-page-builder-job.schema.d.ts +3 -78
- package/build/html-page-builder/models/html-page-builder-job.schema.js +3 -50
- package/build/html-page-builder/models/html-page-builder-session.schema.d.ts +7 -67
- package/build/html-page-builder/models/html-page-builder-session.schema.js +3 -15
- package/build/html-page-builder/models/index.d.ts +0 -8
- package/build/html-page-builder/models/index.js +0 -8
- package/build/html-page-builder/queries/find-html-page-builder-session-by-id.query.d.ts +8 -128
- package/build/html-page-builder/queries/find-html-page-builder-sessions.query.d.ts +12 -133
- package/build/html-page-builder/queries/find-html-page-builder-sessions.query.js +1 -2
- package/build/html-page-builder/queries/get-html-page-builder-config.query.d.ts +0 -196
- package/build/html-page-builder/queries/index.d.ts +0 -6
- package/build/html-page-builder/queries/index.js +0 -6
- package/build/html-page-builder/routes/html-page-builder.amqp.routes.d.ts +1 -8
- package/build/html-page-builder/routes/html-page-builder.amqp.routes.js +1 -11
- package/build/tools/models/global-tools-config.schema.d.ts +0 -98
- package/build/tools/models/tools-with-configs.schema.d.ts +0 -196
- package/build/tools/queries/get-global-tools-config.query.d.ts +0 -196
- package/build/tools/queries/get-tools-with-configs.query.d.ts +0 -196
- package/package.json +1 -1
- package/build/html-page-builder/commands/html-page-builder-answer-questions.command.d.ts +0 -244
- package/build/html-page-builder/commands/html-page-builder-answer-questions.command.js +0 -23
- package/build/html-page-builder/commands/update-html-page-builder-session-reaction.command.d.ts +0 -242
- package/build/html-page-builder/commands/update-html-page-builder-session-reaction.command.js +0 -22
- package/build/html-page-builder/enums/html-page-builder-catalog-sort.enum.d.ts +0 -4
- package/build/html-page-builder/enums/html-page-builder-catalog-sort.enum.js +0 -9
- package/build/html-page-builder/enums/html-page-builder-font-tag.enum.d.ts +0 -5
- package/build/html-page-builder/enums/html-page-builder-font-tag.enum.js +0 -10
- package/build/html-page-builder/enums/html-page-builder-generation-step.enum.d.ts +0 -15
- package/build/html-page-builder/enums/html-page-builder-generation-step.enum.js +0 -17
- package/build/html-page-builder/enums/html-page-builder-question-type.enum.d.ts +0 -12
- package/build/html-page-builder/enums/html-page-builder-question-type.enum.js +0 -16
- package/build/html-page-builder/enums/html-page-builder-session-status.enum.d.ts +0 -19
- package/build/html-page-builder/enums/html-page-builder-session-status.enum.js +0 -23
- package/build/html-page-builder/enums/html-page-builder-style-tag.enum.d.ts +0 -8
- package/build/html-page-builder/enums/html-page-builder-style-tag.enum.js +0 -12
- package/build/html-page-builder/models/html-page-builder-clarification.schema.d.ts +0 -40
- package/build/html-page-builder/models/html-page-builder-clarification.schema.js +0 -32
- package/build/html-page-builder/models/html-page-builder-font.schema.d.ts +0 -24
- package/build/html-page-builder/models/html-page-builder-font.schema.js +0 -19
- package/build/html-page-builder/models/html-page-builder-page.schema.d.ts +0 -25
- package/build/html-page-builder/models/html-page-builder-page.schema.js +0 -13
- package/build/html-page-builder/models/html-page-builder-preset.schema.d.ts +0 -58
- package/build/html-page-builder/models/html-page-builder-preset.schema.js +0 -23
- package/build/html-page-builder/models/html-page-builder-shared-site.schema.d.ts +0 -12
- package/build/html-page-builder/models/html-page-builder-shared-site.schema.js +0 -16
- package/build/html-page-builder/models/html-page-builder-sitemap.schema.d.ts +0 -31
- package/build/html-page-builder/models/html-page-builder-sitemap.schema.js +0 -17
- package/build/html-page-builder/models/html-page-builder-style.schema.d.ts +0 -16
- package/build/html-page-builder/models/html-page-builder-style.schema.js +0 -19
- package/build/html-page-builder/models/html-page-builder-token-usage.schema.d.ts +0 -35
- package/build/html-page-builder/models/html-page-builder-token-usage.schema.js +0 -21
- package/build/html-page-builder/queries/find-html-page-builder-font-by-id.query.d.ts +0 -55
- package/build/html-page-builder/queries/find-html-page-builder-font-by-id.query.js +0 -15
- package/build/html-page-builder/queries/find-html-page-builder-fonts.query.d.ts +0 -69
- package/build/html-page-builder/queries/find-html-page-builder-fonts.query.js +0 -28
- package/build/html-page-builder/queries/find-html-page-builder-presets.query.d.ts +0 -136
- package/build/html-page-builder/queries/find-html-page-builder-presets.query.js +0 -21
- package/build/html-page-builder/queries/find-html-page-builder-style-by-id.query.d.ts +0 -39
- package/build/html-page-builder/queries/find-html-page-builder-style-by-id.query.js +0 -15
- package/build/html-page-builder/queries/find-html-page-builder-styles.query.d.ts +0 -53
- package/build/html-page-builder/queries/find-html-page-builder-styles.query.js +0 -28
- package/build/html-page-builder/queries/get-shared-html-page-builder-site.query.d.ts +0 -20
- package/build/html-page-builder/queries/get-shared-html-page-builder-site.query.js +0 -15
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { JOB_SCOPE } from '../../common';
|
|
3
|
+
export declare namespace CreateHtmlPageBuilderSessionCommand {
|
|
4
|
+
const RequestSchema: z.ZodObject<{
|
|
5
|
+
userId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
6
|
+
unregisteredUserId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
7
|
+
scope: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SCOPE>>>;
|
|
8
|
+
title: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
type Request = z.infer<typeof RequestSchema>;
|
|
11
|
+
const ResponseSchema: z.ZodObject<{
|
|
12
|
+
isSuccess: z.ZodBoolean;
|
|
13
|
+
data: z.ZodOptional<z.ZodType<{
|
|
14
|
+
uuid: string;
|
|
15
|
+
title: string;
|
|
16
|
+
status: import("../..").JOB_STATUS;
|
|
17
|
+
stage: import("..").HTML_PAGE_BUILDER_SESSION_STAGE;
|
|
18
|
+
currentHtml?: string | null | undefined;
|
|
19
|
+
lastUsedModelId?: string | null | undefined;
|
|
20
|
+
userId?: string | null | undefined;
|
|
21
|
+
unregisteredUserId?: string | null | undefined;
|
|
22
|
+
isDeleted: boolean;
|
|
23
|
+
isFavorite: boolean;
|
|
24
|
+
jobs?: {
|
|
25
|
+
uuid: string;
|
|
26
|
+
sessionId: string;
|
|
27
|
+
modelId: string;
|
|
28
|
+
userPrompt: string;
|
|
29
|
+
title: string;
|
|
30
|
+
generatedHtml?: string | null | undefined;
|
|
31
|
+
status: import("../..").JOB_STATUS;
|
|
32
|
+
error: string | null;
|
|
33
|
+
internalError?: string | null | undefined;
|
|
34
|
+
price: number;
|
|
35
|
+
reaction: import("../..").USER_REACTION | null;
|
|
36
|
+
dislikeReason: string | null;
|
|
37
|
+
inputTokens?: number | null | undefined;
|
|
38
|
+
outputTokens?: number | null | undefined;
|
|
39
|
+
totalTokens?: number | null | undefined;
|
|
40
|
+
tokenReservationId?: string | null | undefined;
|
|
41
|
+
userId?: string | null | undefined;
|
|
42
|
+
unregisteredUserId?: string | null | undefined;
|
|
43
|
+
params: {
|
|
44
|
+
attachedFiles: {
|
|
45
|
+
uuid: string;
|
|
46
|
+
url: string;
|
|
47
|
+
name: string;
|
|
48
|
+
mimeType: string;
|
|
49
|
+
type: string;
|
|
50
|
+
size: number;
|
|
51
|
+
duration?: number | null | undefined;
|
|
52
|
+
content?: string | null | undefined;
|
|
53
|
+
contentLength?: number | null | undefined;
|
|
54
|
+
}[];
|
|
55
|
+
};
|
|
56
|
+
isDeleted: boolean;
|
|
57
|
+
createdAt: Date;
|
|
58
|
+
completedAt?: Date | null | undefined;
|
|
59
|
+
updatedAt: Date;
|
|
60
|
+
}[] | undefined;
|
|
61
|
+
createdAt: Date;
|
|
62
|
+
updatedAt: Date;
|
|
63
|
+
}, unknown, z.core.$ZodTypeInternals<{
|
|
64
|
+
uuid: string;
|
|
65
|
+
title: string;
|
|
66
|
+
status: import("../..").JOB_STATUS;
|
|
67
|
+
stage: import("..").HTML_PAGE_BUILDER_SESSION_STAGE;
|
|
68
|
+
currentHtml?: string | null | undefined;
|
|
69
|
+
lastUsedModelId?: string | null | undefined;
|
|
70
|
+
userId?: string | null | undefined;
|
|
71
|
+
unregisteredUserId?: string | null | undefined;
|
|
72
|
+
isDeleted: boolean;
|
|
73
|
+
isFavorite: boolean;
|
|
74
|
+
jobs?: {
|
|
75
|
+
uuid: string;
|
|
76
|
+
sessionId: string;
|
|
77
|
+
modelId: string;
|
|
78
|
+
userPrompt: string;
|
|
79
|
+
title: string;
|
|
80
|
+
generatedHtml?: string | null | undefined;
|
|
81
|
+
status: import("../..").JOB_STATUS;
|
|
82
|
+
error: string | null;
|
|
83
|
+
internalError?: string | null | undefined;
|
|
84
|
+
price: number;
|
|
85
|
+
reaction: import("../..").USER_REACTION | null;
|
|
86
|
+
dislikeReason: string | null;
|
|
87
|
+
inputTokens?: number | null | undefined;
|
|
88
|
+
outputTokens?: number | null | undefined;
|
|
89
|
+
totalTokens?: number | null | undefined;
|
|
90
|
+
tokenReservationId?: string | null | undefined;
|
|
91
|
+
userId?: string | null | undefined;
|
|
92
|
+
unregisteredUserId?: string | null | undefined;
|
|
93
|
+
params: {
|
|
94
|
+
attachedFiles: {
|
|
95
|
+
uuid: string;
|
|
96
|
+
url: string;
|
|
97
|
+
name: string;
|
|
98
|
+
mimeType: string;
|
|
99
|
+
type: string;
|
|
100
|
+
size: number;
|
|
101
|
+
duration?: number | null | undefined;
|
|
102
|
+
content?: string | null | undefined;
|
|
103
|
+
contentLength?: number | null | undefined;
|
|
104
|
+
}[];
|
|
105
|
+
};
|
|
106
|
+
isDeleted: boolean;
|
|
107
|
+
createdAt: Date;
|
|
108
|
+
completedAt?: Date | null | undefined;
|
|
109
|
+
updatedAt: Date;
|
|
110
|
+
}[] | undefined;
|
|
111
|
+
createdAt: Date;
|
|
112
|
+
updatedAt: Date;
|
|
113
|
+
}, unknown>>>;
|
|
114
|
+
code: z.ZodOptional<z.ZodString>;
|
|
115
|
+
message: z.ZodOptional<z.ZodString>;
|
|
116
|
+
}, z.core.$strip>;
|
|
117
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
118
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateHtmlPageBuilderSessionCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const common_1 = require("../../common");
|
|
6
|
+
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
7
|
+
const models_1 = require("../models");
|
|
8
|
+
var CreateHtmlPageBuilderSessionCommand;
|
|
9
|
+
(function (CreateHtmlPageBuilderSessionCommand) {
|
|
10
|
+
CreateHtmlPageBuilderSessionCommand.RequestSchema = zod_1.z
|
|
11
|
+
.object({
|
|
12
|
+
userId: zod_1.z.uuid().nullable().optional(),
|
|
13
|
+
unregisteredUserId: zod_1.z.uuid().nullable().optional(),
|
|
14
|
+
scope: zod_1.z.enum(common_1.JOB_SCOPE).optional().default(common_1.JOB_SCOPE.TOOL),
|
|
15
|
+
title: zod_1.z.string().optional(),
|
|
16
|
+
})
|
|
17
|
+
.refine((data) => {
|
|
18
|
+
return !(data.userId && data.unregisteredUserId);
|
|
19
|
+
}, {
|
|
20
|
+
message: 'userId and unregisteredUserId cannot be used together',
|
|
21
|
+
path: ['userId', 'unregisteredUserId'],
|
|
22
|
+
})
|
|
23
|
+
.refine((data) => { var _a; return Boolean((_a = data.userId) !== null && _a !== void 0 ? _a : data.unregisteredUserId); }, {
|
|
24
|
+
message: 'userId or unregisteredUserId is required',
|
|
25
|
+
path: ['userId', 'unregisteredUserId'],
|
|
26
|
+
});
|
|
27
|
+
CreateHtmlPageBuilderSessionCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.HtmlPageBuilderSessionSchema);
|
|
28
|
+
})(CreateHtmlPageBuilderSessionCommand || (exports.CreateHtmlPageBuilderSessionCommand = CreateHtmlPageBuilderSessionCommand = {}));
|
package/build/html-page-builder/commands/get-html-page-builder-price-calculation-data.command.d.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { HTML_PAGE_BUILDER_SESSION_STAGE } from '../enums';
|
|
2
3
|
export declare namespace GetHtmlPageBuilderPriceCalculationDataCommand {
|
|
3
4
|
const RequestSchema: z.ZodObject<{
|
|
4
5
|
modelId: z.ZodUUID;
|
|
5
6
|
inputLength: z.ZodNumber;
|
|
6
7
|
sessionId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
7
|
-
pagesCount: z.ZodNumber;
|
|
8
|
-
styleId: z.ZodUUID;
|
|
9
|
-
fontId: z.ZodUUID;
|
|
10
|
-
clarificationsLength: z.ZodOptional<z.ZodNumber>;
|
|
11
8
|
}, z.core.$strip>;
|
|
12
9
|
type Request = z.infer<typeof RequestSchema>;
|
|
13
10
|
const ResponseDataSchema: z.ZodObject<{
|
|
@@ -15,25 +12,18 @@ export declare namespace GetHtmlPageBuilderPriceCalculationDataCommand {
|
|
|
15
12
|
inputPrice: z.ZodNumber;
|
|
16
13
|
outputPrice: z.ZodNumber;
|
|
17
14
|
}, z.core.$strip>;
|
|
18
|
-
clarificationsModelPricing: z.ZodOptional<z.ZodObject<{
|
|
19
|
-
inputPrice: z.ZodNumber;
|
|
20
|
-
outputPrice: z.ZodNumber;
|
|
21
|
-
}, z.core.$strip>>;
|
|
22
15
|
effectivePromptLength: z.ZodNumber;
|
|
23
16
|
breakdown: z.ZodObject<{
|
|
24
17
|
systemPromptLength: z.ZodNumber;
|
|
25
18
|
inputLength: z.ZodNumber;
|
|
19
|
+
currentHtmlLength: z.ZodNumber;
|
|
26
20
|
userPromptTemplateOverheadLength: z.ZodNumber;
|
|
27
21
|
modeHintLength: z.ZodNumber;
|
|
28
22
|
userMessageLength: z.ZodNumber;
|
|
29
23
|
attachmentsTextLength: z.ZodNumber;
|
|
30
|
-
pagesCount: z.ZodOptional<z.ZodNumber>;
|
|
31
|
-
clarificationsLength: z.ZodOptional<z.ZodNumber>;
|
|
32
|
-
sitemapPromptLength: z.ZodOptional<z.ZodNumber>;
|
|
33
|
-
subPagesPromptLength: z.ZodOptional<z.ZodNumber>;
|
|
34
|
-
clarificationsStepPromptLength: z.ZodOptional<z.ZodNumber>;
|
|
35
24
|
}, z.core.$strip>;
|
|
36
25
|
metadata: z.ZodObject<{
|
|
26
|
+
mode: z.ZodEnum<typeof HTML_PAGE_BUILDER_SESSION_STAGE>;
|
|
37
27
|
modelId: z.ZodUUID;
|
|
38
28
|
sessionId: z.ZodNullable<z.ZodUUID>;
|
|
39
29
|
}, z.core.$strip>;
|
|
@@ -46,25 +36,18 @@ export declare namespace GetHtmlPageBuilderPriceCalculationDataCommand {
|
|
|
46
36
|
inputPrice: number;
|
|
47
37
|
outputPrice: number;
|
|
48
38
|
};
|
|
49
|
-
clarificationsModelPricing?: {
|
|
50
|
-
inputPrice: number;
|
|
51
|
-
outputPrice: number;
|
|
52
|
-
} | undefined;
|
|
53
39
|
effectivePromptLength: number;
|
|
54
40
|
breakdown: {
|
|
55
41
|
systemPromptLength: number;
|
|
56
42
|
inputLength: number;
|
|
43
|
+
currentHtmlLength: number;
|
|
57
44
|
userPromptTemplateOverheadLength: number;
|
|
58
45
|
modeHintLength: number;
|
|
59
46
|
userMessageLength: number;
|
|
60
47
|
attachmentsTextLength: number;
|
|
61
|
-
pagesCount?: number | undefined;
|
|
62
|
-
clarificationsLength?: number | undefined;
|
|
63
|
-
sitemapPromptLength?: number | undefined;
|
|
64
|
-
subPagesPromptLength?: number | undefined;
|
|
65
|
-
clarificationsStepPromptLength?: number | undefined;
|
|
66
48
|
};
|
|
67
49
|
metadata: {
|
|
50
|
+
mode: HTML_PAGE_BUILDER_SESSION_STAGE;
|
|
68
51
|
modelId: string;
|
|
69
52
|
sessionId: string | null;
|
|
70
53
|
};
|
|
@@ -73,25 +56,18 @@ export declare namespace GetHtmlPageBuilderPriceCalculationDataCommand {
|
|
|
73
56
|
inputPrice: number;
|
|
74
57
|
outputPrice: number;
|
|
75
58
|
};
|
|
76
|
-
clarificationsModelPricing?: {
|
|
77
|
-
inputPrice: number;
|
|
78
|
-
outputPrice: number;
|
|
79
|
-
} | undefined;
|
|
80
59
|
effectivePromptLength: number;
|
|
81
60
|
breakdown: {
|
|
82
61
|
systemPromptLength: number;
|
|
83
62
|
inputLength: number;
|
|
63
|
+
currentHtmlLength: number;
|
|
84
64
|
userPromptTemplateOverheadLength: number;
|
|
85
65
|
modeHintLength: number;
|
|
86
66
|
userMessageLength: number;
|
|
87
67
|
attachmentsTextLength: number;
|
|
88
|
-
pagesCount?: number | undefined;
|
|
89
|
-
clarificationsLength?: number | undefined;
|
|
90
|
-
sitemapPromptLength?: number | undefined;
|
|
91
|
-
subPagesPromptLength?: number | undefined;
|
|
92
|
-
clarificationsStepPromptLength?: number | undefined;
|
|
93
68
|
};
|
|
94
69
|
metadata: {
|
|
70
|
+
mode: HTML_PAGE_BUILDER_SESSION_STAGE;
|
|
95
71
|
modelId: string;
|
|
96
72
|
sessionId: string | null;
|
|
97
73
|
};
|
package/build/html-page-builder/commands/get-html-page-builder-price-calculation-data.command.js
CHANGED
|
@@ -3,58 +3,31 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.GetHtmlPageBuilderPriceCalculationDataCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const command_response_schema_1 = require("../../common/models/command-response.schema");
|
|
6
|
+
const enums_1 = require("../enums");
|
|
6
7
|
var GetHtmlPageBuilderPriceCalculationDataCommand;
|
|
7
8
|
(function (GetHtmlPageBuilderPriceCalculationDataCommand) {
|
|
8
9
|
GetHtmlPageBuilderPriceCalculationDataCommand.RequestSchema = zod_1.z.object({
|
|
9
10
|
modelId: zod_1.z.uuid(),
|
|
10
|
-
// Bounded by the model's own `maxPromptLength`, checked in the service: a quote for a
|
|
11
|
-
// prompt `execute` would refuse is meaningless, and the estimate builds placeholder
|
|
12
|
-
// strings of this length.
|
|
13
11
|
inputLength: zod_1.z.number().int().nonnegative(),
|
|
14
12
|
sessionId: zod_1.z.uuid().nullable().optional(),
|
|
15
|
-
// Required, exactly as in `execute`: the volume is what the run is priced by
|
|
16
|
-
pagesCount: zod_1.z.number().int().positive(),
|
|
17
|
-
/**
|
|
18
|
-
* Design of the planned site. The style and font directives are part of the prompt of the
|
|
19
|
-
* clarifying step, so they are part of what is quoted — a quote without them would
|
|
20
|
-
* under-reserve by their own length. Required for the same reason `execute` requires them.
|
|
21
|
-
*/
|
|
22
|
-
styleId: zod_1.z.uuid(),
|
|
23
|
-
fontId: zod_1.z.uuid(),
|
|
24
|
-
// Length of the rendered clarifications block; it is part of the paid prompt
|
|
25
|
-
clarificationsLength: zod_1.z.number().int().nonnegative().optional(),
|
|
26
13
|
});
|
|
27
14
|
GetHtmlPageBuilderPriceCalculationDataCommand.ResponseDataSchema = zod_1.z.object({
|
|
28
15
|
modelPricing: zod_1.z.object({
|
|
29
16
|
inputPrice: zod_1.z.number(),
|
|
30
17
|
outputPrice: zod_1.z.number(),
|
|
31
18
|
}),
|
|
32
|
-
/**
|
|
33
|
-
* The clarifying step runs on a model of its own, fixed inside the service, so its price
|
|
34
|
-
* cannot be derived from `modelPricing`.
|
|
35
|
-
*/
|
|
36
|
-
clarificationsModelPricing: zod_1.z
|
|
37
|
-
.object({
|
|
38
|
-
inputPrice: zod_1.z.number(),
|
|
39
|
-
outputPrice: zod_1.z.number(),
|
|
40
|
-
})
|
|
41
|
-
.optional(),
|
|
42
19
|
effectivePromptLength: zod_1.z.number(),
|
|
43
20
|
breakdown: zod_1.z.object({
|
|
44
21
|
systemPromptLength: zod_1.z.number(),
|
|
45
22
|
inputLength: zod_1.z.number(),
|
|
23
|
+
currentHtmlLength: zod_1.z.number(),
|
|
46
24
|
userPromptTemplateOverheadLength: zod_1.z.number(),
|
|
47
25
|
modeHintLength: zod_1.z.number(),
|
|
48
26
|
userMessageLength: zod_1.z.number(),
|
|
49
27
|
attachmentsTextLength: zod_1.z.number(),
|
|
50
|
-
pagesCount: zod_1.z.number().optional(),
|
|
51
|
-
clarificationsLength: zod_1.z.number().optional(),
|
|
52
|
-
sitemapPromptLength: zod_1.z.number().optional(),
|
|
53
|
-
subPagesPromptLength: zod_1.z.number().optional(),
|
|
54
|
-
// Prompt length of the clarifying step, priced by `clarificationsModelPricing`
|
|
55
|
-
clarificationsStepPromptLength: zod_1.z.number().optional(),
|
|
56
28
|
}),
|
|
57
29
|
metadata: zod_1.z.object({
|
|
30
|
+
mode: zod_1.z.enum(enums_1.HTML_PAGE_BUILDER_SESSION_STAGE),
|
|
58
31
|
modelId: zod_1.z.uuid(),
|
|
59
32
|
sessionId: zod_1.z.uuid().nullable(),
|
|
60
33
|
}),
|
|
@@ -20,17 +20,7 @@ export declare namespace HtmlPageBuilderExecuteCommand {
|
|
|
20
20
|
content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
21
21
|
contentLength: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
22
22
|
}, z.core.$strip>>;
|
|
23
|
-
pagesCount: z.ZodOptional<z.ZodNumber>;
|
|
24
|
-
clarifications: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
25
|
-
question: z.ZodString;
|
|
26
|
-
answer: z.ZodString;
|
|
27
|
-
}, z.core.$strip>>>;
|
|
28
|
-
mock: z.ZodOptional<z.ZodBoolean>;
|
|
29
23
|
}, z.core.$strip>;
|
|
30
|
-
pagesCount: z.ZodNumber;
|
|
31
|
-
styleId: z.ZodUUID;
|
|
32
|
-
fontId: z.ZodUUID;
|
|
33
|
-
accentColor: z.ZodOptional<z.ZodString>;
|
|
34
24
|
tokenReservationId: z.ZodOptional<z.ZodUUID>;
|
|
35
25
|
precalculatedPrice: z.ZodOptional<z.ZodNumber>;
|
|
36
26
|
mock: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -41,28 +31,10 @@ export declare namespace HtmlPageBuilderExecuteCommand {
|
|
|
41
31
|
data: z.ZodOptional<z.ZodType<{
|
|
42
32
|
uuid: string;
|
|
43
33
|
title: string;
|
|
44
|
-
status: import("
|
|
34
|
+
status: import("../..").JOB_STATUS;
|
|
35
|
+
stage: import("..").HTML_PAGE_BUILDER_SESSION_STAGE;
|
|
45
36
|
currentHtml?: string | null | undefined;
|
|
46
|
-
currentJobId?: string | null | undefined;
|
|
47
|
-
currentJob?: {
|
|
48
|
-
uuid: string;
|
|
49
|
-
status: import("../..").JOB_STATUS;
|
|
50
|
-
previewUrl?: string | undefined;
|
|
51
|
-
files?: {
|
|
52
|
-
stylesheet: string;
|
|
53
|
-
script: string;
|
|
54
|
-
pages: {
|
|
55
|
-
slug: string;
|
|
56
|
-
url: string;
|
|
57
|
-
}[];
|
|
58
|
-
} | undefined;
|
|
59
|
-
error: string | null;
|
|
60
|
-
createdAt: Date;
|
|
61
|
-
completedAt?: Date | null | undefined;
|
|
62
|
-
} | null | undefined;
|
|
63
37
|
lastUsedModelId?: string | null | undefined;
|
|
64
|
-
reaction: import("../..").USER_REACTION | null;
|
|
65
|
-
dislikeReason: string | null;
|
|
66
38
|
userId?: string | null | undefined;
|
|
67
39
|
unregisteredUserId?: string | null | undefined;
|
|
68
40
|
isDeleted: boolean;
|
|
@@ -74,45 +46,16 @@ export declare namespace HtmlPageBuilderExecuteCommand {
|
|
|
74
46
|
userPrompt: string;
|
|
75
47
|
title: string;
|
|
76
48
|
generatedHtml?: string | null | undefined;
|
|
77
|
-
generatedPages?: {
|
|
78
|
-
slug: string;
|
|
79
|
-
title: string;
|
|
80
|
-
html: string;
|
|
81
|
-
order: number;
|
|
82
|
-
isHome: boolean;
|
|
83
|
-
}[] | null | undefined;
|
|
84
|
-
previewUrl?: string | undefined;
|
|
85
|
-
files?: {
|
|
86
|
-
stylesheet: string;
|
|
87
|
-
script: string;
|
|
88
|
-
pages: {
|
|
89
|
-
slug: string;
|
|
90
|
-
url: string;
|
|
91
|
-
}[];
|
|
92
|
-
} | undefined;
|
|
93
49
|
status: import("../..").JOB_STATUS;
|
|
94
50
|
error: string | null;
|
|
95
51
|
internalError?: string | null | undefined;
|
|
96
52
|
price: number;
|
|
53
|
+
reaction: import("../..").USER_REACTION | null;
|
|
54
|
+
dislikeReason: string | null;
|
|
97
55
|
inputTokens?: number | null | undefined;
|
|
98
56
|
outputTokens?: number | null | undefined;
|
|
99
57
|
totalTokens?: number | null | undefined;
|
|
100
58
|
tokenReservationId?: string | null | undefined;
|
|
101
|
-
questions: {
|
|
102
|
-
id: string;
|
|
103
|
-
question: string;
|
|
104
|
-
type: import("..").HTML_PAGE_BUILDER_QUESTION_TYPE;
|
|
105
|
-
options: string[];
|
|
106
|
-
recommendedAnswer: string;
|
|
107
|
-
allowCustomAnswer: boolean;
|
|
108
|
-
}[];
|
|
109
|
-
answers: {
|
|
110
|
-
questionId: string;
|
|
111
|
-
answers: string[];
|
|
112
|
-
}[];
|
|
113
|
-
styleId?: string | null | undefined;
|
|
114
|
-
fontId?: string | null | undefined;
|
|
115
|
-
accentColor: string;
|
|
116
59
|
userId?: string | null | undefined;
|
|
117
60
|
unregisteredUserId?: string | null | undefined;
|
|
118
61
|
params: {
|
|
@@ -127,52 +70,21 @@ export declare namespace HtmlPageBuilderExecuteCommand {
|
|
|
127
70
|
content?: string | null | undefined;
|
|
128
71
|
contentLength?: number | null | undefined;
|
|
129
72
|
}[];
|
|
130
|
-
pagesCount?: number | undefined;
|
|
131
|
-
clarifications: {
|
|
132
|
-
question: string;
|
|
133
|
-
answer: string;
|
|
134
|
-
}[];
|
|
135
|
-
mock?: boolean | undefined;
|
|
136
73
|
};
|
|
137
74
|
isDeleted: boolean;
|
|
138
75
|
createdAt: Date;
|
|
139
76
|
completedAt?: Date | null | undefined;
|
|
140
77
|
updatedAt: Date;
|
|
141
78
|
}[] | undefined;
|
|
142
|
-
pages?: {
|
|
143
|
-
slug: string;
|
|
144
|
-
title: string;
|
|
145
|
-
html: string;
|
|
146
|
-
order: number;
|
|
147
|
-
isHome: boolean;
|
|
148
|
-
}[] | undefined;
|
|
149
79
|
createdAt: Date;
|
|
150
80
|
updatedAt: Date;
|
|
151
81
|
}, unknown, z.core.$ZodTypeInternals<{
|
|
152
82
|
uuid: string;
|
|
153
83
|
title: string;
|
|
154
|
-
status: import("
|
|
84
|
+
status: import("../..").JOB_STATUS;
|
|
85
|
+
stage: import("..").HTML_PAGE_BUILDER_SESSION_STAGE;
|
|
155
86
|
currentHtml?: string | null | undefined;
|
|
156
|
-
currentJobId?: string | null | undefined;
|
|
157
|
-
currentJob?: {
|
|
158
|
-
uuid: string;
|
|
159
|
-
status: import("../..").JOB_STATUS;
|
|
160
|
-
previewUrl?: string | undefined;
|
|
161
|
-
files?: {
|
|
162
|
-
stylesheet: string;
|
|
163
|
-
script: string;
|
|
164
|
-
pages: {
|
|
165
|
-
slug: string;
|
|
166
|
-
url: string;
|
|
167
|
-
}[];
|
|
168
|
-
} | undefined;
|
|
169
|
-
error: string | null;
|
|
170
|
-
createdAt: Date;
|
|
171
|
-
completedAt?: Date | null | undefined;
|
|
172
|
-
} | null | undefined;
|
|
173
87
|
lastUsedModelId?: string | null | undefined;
|
|
174
|
-
reaction: import("../..").USER_REACTION | null;
|
|
175
|
-
dislikeReason: string | null;
|
|
176
88
|
userId?: string | null | undefined;
|
|
177
89
|
unregisteredUserId?: string | null | undefined;
|
|
178
90
|
isDeleted: boolean;
|
|
@@ -184,45 +96,16 @@ export declare namespace HtmlPageBuilderExecuteCommand {
|
|
|
184
96
|
userPrompt: string;
|
|
185
97
|
title: string;
|
|
186
98
|
generatedHtml?: string | null | undefined;
|
|
187
|
-
generatedPages?: {
|
|
188
|
-
slug: string;
|
|
189
|
-
title: string;
|
|
190
|
-
html: string;
|
|
191
|
-
order: number;
|
|
192
|
-
isHome: boolean;
|
|
193
|
-
}[] | null | undefined;
|
|
194
|
-
previewUrl?: string | undefined;
|
|
195
|
-
files?: {
|
|
196
|
-
stylesheet: string;
|
|
197
|
-
script: string;
|
|
198
|
-
pages: {
|
|
199
|
-
slug: string;
|
|
200
|
-
url: string;
|
|
201
|
-
}[];
|
|
202
|
-
} | undefined;
|
|
203
99
|
status: import("../..").JOB_STATUS;
|
|
204
100
|
error: string | null;
|
|
205
101
|
internalError?: string | null | undefined;
|
|
206
102
|
price: number;
|
|
103
|
+
reaction: import("../..").USER_REACTION | null;
|
|
104
|
+
dislikeReason: string | null;
|
|
207
105
|
inputTokens?: number | null | undefined;
|
|
208
106
|
outputTokens?: number | null | undefined;
|
|
209
107
|
totalTokens?: number | null | undefined;
|
|
210
108
|
tokenReservationId?: string | null | undefined;
|
|
211
|
-
questions: {
|
|
212
|
-
id: string;
|
|
213
|
-
question: string;
|
|
214
|
-
type: import("..").HTML_PAGE_BUILDER_QUESTION_TYPE;
|
|
215
|
-
options: string[];
|
|
216
|
-
recommendedAnswer: string;
|
|
217
|
-
allowCustomAnswer: boolean;
|
|
218
|
-
}[];
|
|
219
|
-
answers: {
|
|
220
|
-
questionId: string;
|
|
221
|
-
answers: string[];
|
|
222
|
-
}[];
|
|
223
|
-
styleId?: string | null | undefined;
|
|
224
|
-
fontId?: string | null | undefined;
|
|
225
|
-
accentColor: string;
|
|
226
109
|
userId?: string | null | undefined;
|
|
227
110
|
unregisteredUserId?: string | null | undefined;
|
|
228
111
|
params: {
|
|
@@ -237,25 +120,12 @@ export declare namespace HtmlPageBuilderExecuteCommand {
|
|
|
237
120
|
content?: string | null | undefined;
|
|
238
121
|
contentLength?: number | null | undefined;
|
|
239
122
|
}[];
|
|
240
|
-
pagesCount?: number | undefined;
|
|
241
|
-
clarifications: {
|
|
242
|
-
question: string;
|
|
243
|
-
answer: string;
|
|
244
|
-
}[];
|
|
245
|
-
mock?: boolean | undefined;
|
|
246
123
|
};
|
|
247
124
|
isDeleted: boolean;
|
|
248
125
|
createdAt: Date;
|
|
249
126
|
completedAt?: Date | null | undefined;
|
|
250
127
|
updatedAt: Date;
|
|
251
128
|
}[] | undefined;
|
|
252
|
-
pages?: {
|
|
253
|
-
slug: string;
|
|
254
|
-
title: string;
|
|
255
|
-
html: string;
|
|
256
|
-
order: number;
|
|
257
|
-
isHome: boolean;
|
|
258
|
-
}[] | undefined;
|
|
259
129
|
createdAt: Date;
|
|
260
130
|
updatedAt: Date;
|
|
261
131
|
}, unknown>>>;
|
|
@@ -11,28 +11,10 @@ var HtmlPageBuilderExecuteCommand;
|
|
|
11
11
|
userId: zod_1.z.uuid().nullable().optional(),
|
|
12
12
|
unregisteredUserId: zod_1.z.uuid().nullable().optional(),
|
|
13
13
|
scope: zod_1.z.enum(common_1.JOB_SCOPE).optional().default(common_1.JOB_SCOPE.TOOL),
|
|
14
|
-
// A repeated execute builds another site in the same session: its own questions, its own
|
|
15
|
-
// payment, its own job. The previous variants stay in the history.
|
|
16
14
|
sessionId: zod_1.z.uuid().optional(),
|
|
17
15
|
userPrompt: zod_1.z.string(),
|
|
18
16
|
modelId: zod_1.z.uuid(),
|
|
19
17
|
params: models_1.HtmlPageBuilderJobParamsSchema,
|
|
20
|
-
// Clamped to [1, 3, 5] on the server. Required: the volume is what the run is priced by,
|
|
21
|
-
// so a request that does not name it would be paid for as something else.
|
|
22
|
-
pagesCount: zod_1.z.number().int().positive(),
|
|
23
|
-
/**
|
|
24
|
-
* Design of the site. Required: every run builds a site from scratch, and a generation
|
|
25
|
-
* without a style is not a cheaper site, it is a different one. The prompts behind
|
|
26
|
-
* `styleId` / `fontId` are resolved on the server and never leave it.
|
|
27
|
-
*/
|
|
28
|
-
styleId: zod_1.z.uuid(),
|
|
29
|
-
fontId: zod_1.z.uuid(),
|
|
30
|
-
/**
|
|
31
|
-
* The one optional part of the design: a palette the model is free to choose itself.
|
|
32
|
-
* Bounded on purpose — it lands in the prompt, so it must not become a way to smuggle
|
|
33
|
-
* unlimited text past the model's maxPromptLength check.
|
|
34
|
-
*/
|
|
35
|
-
accentColor: zod_1.z.string().max(64).optional(),
|
|
36
18
|
tokenReservationId: zod_1.z.uuid().optional(),
|
|
37
19
|
precalculatedPrice: zod_1.z.number().optional(),
|
|
38
20
|
mock: zod_1.z.boolean().optional(),
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export * from './html-page-builder-
|
|
1
|
+
export * from './create-html-page-builder-session.command';
|
|
2
2
|
export * from './get-html-page-builder-price-calculation-data.command';
|
|
3
3
|
export * from './html-page-builder-execute.command';
|
|
4
4
|
export * from './soft-delete-all-html-page-builder-sessions.command';
|
|
5
5
|
export * from './soft-delete-html-page-builder-session-by-uuid.command';
|
|
6
6
|
export * from './update-html-page-builder-session-title.command';
|
|
7
7
|
export * from './update-html-page-builder-session-favorite.command';
|
|
8
|
-
export * from './update-html-page-builder-session-reaction.command';
|
|
@@ -14,11 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./html-page-builder-
|
|
17
|
+
__exportStar(require("./create-html-page-builder-session.command"), exports);
|
|
18
18
|
__exportStar(require("./get-html-page-builder-price-calculation-data.command"), exports);
|
|
19
19
|
__exportStar(require("./html-page-builder-execute.command"), exports);
|
|
20
20
|
__exportStar(require("./soft-delete-all-html-page-builder-sessions.command"), exports);
|
|
21
21
|
__exportStar(require("./soft-delete-html-page-builder-session-by-uuid.command"), exports);
|
|
22
22
|
__exportStar(require("./update-html-page-builder-session-title.command"), exports);
|
|
23
23
|
__exportStar(require("./update-html-page-builder-session-favorite.command"), exports);
|
|
24
|
-
__exportStar(require("./update-html-page-builder-session-reaction.command"), exports);
|