@purpleschool/gptbot 0.12.83 → 0.12.84
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,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PriceCanvasQuery = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
5
6
|
const models_1 = require("../../../models");
|
|
6
7
|
var PriceCanvasQuery;
|
|
7
8
|
(function (PriceCanvasQuery) {
|
|
@@ -11,7 +12,16 @@ var PriceCanvasQuery;
|
|
|
11
12
|
PriceCanvasQuery.QueryParamsSchema = zod_1.z.object({
|
|
12
13
|
executableNodeId: zod_1.z.string().uuid().optional(),
|
|
13
14
|
});
|
|
15
|
+
PriceCanvasQuery.NodePriceSchema = zod_1.z.object({
|
|
16
|
+
nodeId: zod_1.z.string().uuid(),
|
|
17
|
+
nodeType: zod_1.z.nativeEnum(constants_1.CANVAS_NODE_TYPE),
|
|
18
|
+
toolType: zod_1.z.nativeEnum(constants_1.TOOL_CONTENT_TYPE).nullable(),
|
|
19
|
+
price: zod_1.z.number(),
|
|
20
|
+
forecasted: zod_1.z.boolean(),
|
|
21
|
+
static: zod_1.z.boolean(),
|
|
22
|
+
});
|
|
14
23
|
PriceCanvasQuery.ResponseSchema = zod_1.z.object({
|
|
15
24
|
price: zod_1.z.number(),
|
|
25
|
+
nodes: zod_1.z.array(PriceCanvasQuery.NodePriceSchema),
|
|
16
26
|
});
|
|
17
27
|
})(PriceCanvasQuery || (exports.PriceCanvasQuery = PriceCanvasQuery = {}));
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { CANVAS_NODE_TYPE, TOOL_CONTENT_TYPE } from '../../../constants';
|
|
2
3
|
import { CanvasSchema } from '../../../models';
|
|
3
4
|
|
|
4
5
|
export namespace PriceCanvasQuery {
|
|
@@ -14,8 +15,20 @@ export namespace PriceCanvasQuery {
|
|
|
14
15
|
|
|
15
16
|
export type QueryParams = z.infer<typeof QueryParamsSchema>;
|
|
16
17
|
|
|
18
|
+
export const NodePriceSchema = z.object({
|
|
19
|
+
nodeId: z.string().uuid(),
|
|
20
|
+
nodeType: z.nativeEnum(CANVAS_NODE_TYPE),
|
|
21
|
+
toolType: z.nativeEnum(TOOL_CONTENT_TYPE).nullable(),
|
|
22
|
+
price: z.number(),
|
|
23
|
+
forecasted: z.boolean(),
|
|
24
|
+
static: z.boolean(),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export type NodePrice = z.infer<typeof NodePriceSchema>;
|
|
28
|
+
|
|
17
29
|
export const ResponseSchema = z.object({
|
|
18
30
|
price: z.number(),
|
|
31
|
+
nodes: z.array(NodePriceSchema),
|
|
19
32
|
});
|
|
20
33
|
|
|
21
34
|
export type Response = z.infer<typeof ResponseSchema>;
|