@purpleschool/gptbot 0.20.14-stage-2 → 0.20.15-stage-2
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.
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetSupportWidgetIdentityCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
// externalId
|
|
6
|
-
// hex(HMAC-SHA256(secret, "<agentId>:<externalId>")). Подпись null, если ключ не настроен.
|
|
5
|
+
// hex(HMAC-SHA256(secret, "<agentId>:<externalId>")); null when signing is not configured.
|
|
7
6
|
var GetSupportWidgetIdentityCommand;
|
|
8
7
|
(function (GetSupportWidgetIdentityCommand) {
|
|
9
8
|
GetSupportWidgetIdentityCommand.ResponseSchema = zod_1.z.object({
|
|
@@ -10,6 +10,7 @@ export declare namespace GetHtmlPageBuilderPriceCommand {
|
|
|
10
10
|
modelId: z.ZodUUID;
|
|
11
11
|
inputLength: z.ZodNumber;
|
|
12
12
|
sessionId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
|
|
13
|
+
baseJobId: z.ZodOptional<z.ZodUUID>;
|
|
13
14
|
pagesCount: z.ZodNumber;
|
|
14
15
|
styleId: z.ZodUUID;
|
|
15
16
|
fontId: z.ZodUUID;
|
|
@@ -10,10 +10,13 @@ var GetHtmlPageBuilderPriceCommand;
|
|
|
10
10
|
* `MAX_PROMPT_LENGTH_EXCEEDED`. This only keeps an absurd number from costing an RPC round-trip.
|
|
11
11
|
*/
|
|
12
12
|
GetHtmlPageBuilderPriceCommand.MAX_INPUT_LENGTH = 1000000;
|
|
13
|
-
GetHtmlPageBuilderPriceCommand.RequestSchema = zod_1.z
|
|
13
|
+
GetHtmlPageBuilderPriceCommand.RequestSchema = zod_1.z
|
|
14
|
+
.object({
|
|
14
15
|
modelId: zod_1.z.uuid(),
|
|
15
16
|
inputLength: zod_1.z.number().int().nonnegative().max(GetHtmlPageBuilderPriceCommand.MAX_INPUT_LENGTH),
|
|
16
17
|
sessionId: zod_1.z.uuid().nullable().optional(),
|
|
18
|
+
// Present only for refinement: price the immutable saved bundle, not a new build.
|
|
19
|
+
baseJobId: zod_1.z.uuid().optional(),
|
|
17
20
|
// Required, exactly as in `execute`: the quote must describe the same site the run builds
|
|
18
21
|
pagesCount: zod_1.z.number().int().positive(),
|
|
19
22
|
/**
|
|
@@ -24,6 +27,10 @@ var GetHtmlPageBuilderPriceCommand;
|
|
|
24
27
|
fontId: zod_1.z.uuid(),
|
|
25
28
|
// Length of the rendered clarifications block; it is part of the paid prompt
|
|
26
29
|
clarificationsLength: zod_1.z.number().int().nonnegative().max(GetHtmlPageBuilderPriceCommand.MAX_INPUT_LENGTH).optional(),
|
|
30
|
+
})
|
|
31
|
+
.refine((value) => !value.baseJobId || Boolean(value.sessionId), {
|
|
32
|
+
message: 'Refinement price requires its owning session',
|
|
33
|
+
path: ['sessionId'],
|
|
27
34
|
});
|
|
28
35
|
GetHtmlPageBuilderPriceCommand.ResponseSchema = zod_1.z.object({
|
|
29
36
|
data: zod_1.z.object({
|