@purpleschool/gptbot 0.9.16 → 0.9.18
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/b2b/get-b2b-documentation.command.js +13 -2
- package/build/commands/cabinet/get-user-statistics-by-month.command.js +1 -0
- package/build/constants/cabinet/enums/index.js +1 -0
- package/build/constants/cabinet/enums/statistics-metric-type.enum.js +8 -0
- package/build/models/tools/image-generation/image-generation-model.schema.js +8 -5
- package/commands/b2b/get-b2b-documentation.command.ts +15 -2
- package/commands/cabinet/get-user-statistics-by-month.command.ts +3 -1
- package/constants/cabinet/enums/index.ts +1 -0
- package/constants/cabinet/enums/statistics-metric-type.enum.ts +4 -0
- package/models/tools/image-generation/image-generation-model.schema.ts +8 -5
- package/package.json +1 -1
|
@@ -66,10 +66,21 @@ var GetB2bDocumentationCommand;
|
|
|
66
66
|
title: zod_1.z.string(),
|
|
67
67
|
body: zod_1.z.string(),
|
|
68
68
|
});
|
|
69
|
+
const B2bDocTextModelSchema = models_1.AiModelSchema.omit({
|
|
70
|
+
createdAt: true,
|
|
71
|
+
updatedAt: true,
|
|
72
|
+
}).extend({
|
|
73
|
+
createdAt: zod_1.z.string(),
|
|
74
|
+
updatedAt: zod_1.z.string(),
|
|
75
|
+
aiModel: zod_1.z.string(),
|
|
76
|
+
});
|
|
77
|
+
const B2bDocImageModelSchema = models_1.ImageGenerationModelSchema.extend({
|
|
78
|
+
aiModel: zod_1.z.string(),
|
|
79
|
+
});
|
|
69
80
|
GetB2bDocumentationCommand.ReferencesSchema = zod_1.z
|
|
70
81
|
.object({
|
|
71
|
-
textModels: zod_1.z.array(
|
|
72
|
-
imageModels: zod_1.z.array(
|
|
82
|
+
textModels: zod_1.z.array(B2bDocTextModelSchema).optional(),
|
|
83
|
+
imageModels: zod_1.z.array(B2bDocImageModelSchema).optional(),
|
|
73
84
|
features: zod_1.z.array(zod_1.z.nativeEnum(constants_1.AI_MODEL_FEATURE)).optional(),
|
|
74
85
|
supportedFileMimeTypes: zod_1.z.array(zod_1.z.string()).optional(),
|
|
75
86
|
})
|
|
@@ -7,6 +7,7 @@ var GetUserStatisticsByMonthCommand;
|
|
|
7
7
|
(function (GetUserStatisticsByMonthCommand) {
|
|
8
8
|
GetUserStatisticsByMonthCommand.RequestSchema = zod_1.z.object({
|
|
9
9
|
origin: zod_1.z.nativeEnum(constants_1.JOB_REQUEST_ORIGIN).default(constants_1.JOB_REQUEST_ORIGIN.API).optional(),
|
|
10
|
+
metric: zod_1.z.nativeEnum(constants_1.STATISTICS_METRIC_TYPE).default(constants_1.STATISTICS_METRIC_TYPE.REQUESTS).optional(),
|
|
10
11
|
});
|
|
11
12
|
GetUserStatisticsByMonthCommand.UserStatisticsByMonthResponseSchema = zod_1.z.object({
|
|
12
13
|
month: zod_1.z.string(),
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.STATISTICS_METRIC_TYPE = void 0;
|
|
4
|
+
var STATISTICS_METRIC_TYPE;
|
|
5
|
+
(function (STATISTICS_METRIC_TYPE) {
|
|
6
|
+
STATISTICS_METRIC_TYPE["REQUESTS"] = "requests";
|
|
7
|
+
STATISTICS_METRIC_TYPE["TOKENS"] = "tokens";
|
|
8
|
+
})(STATISTICS_METRIC_TYPE || (exports.STATISTICS_METRIC_TYPE = STATISTICS_METRIC_TYPE = {}));
|
|
@@ -5,11 +5,14 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const constants_1 = require("../../../constants");
|
|
6
6
|
const unlocked_by_subscription_schema_1 = require("../../unlocked-by-subscription.schema");
|
|
7
7
|
exports.ImageGenerationModelParamsSchema = zod_1.z.object({
|
|
8
|
-
aspectRatio: zod_1.z.record(zod_1.z.string(), zod_1.z.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
aspectRatio: zod_1.z.record(zod_1.z.string(), zod_1.z.union([
|
|
9
|
+
zod_1.z.object({
|
|
10
|
+
width: zod_1.z.number(),
|
|
11
|
+
height: zod_1.z.number(),
|
|
12
|
+
}),
|
|
13
|
+
zod_1.z.string(),
|
|
14
|
+
])),
|
|
15
|
+
quality: zod_1.z.union([zod_1.z.string(), zod_1.z.record(zod_1.z.string())]).optional(),
|
|
13
16
|
resolution: zod_1.z
|
|
14
17
|
.object({
|
|
15
18
|
options: zod_1.z.array(zod_1.z.nativeEnum(constants_1.IMAGE_GENERATION_RESOLUTION)),
|
|
@@ -82,10 +82,23 @@ export namespace GetB2bDocumentationCommand {
|
|
|
82
82
|
body: z.string(),
|
|
83
83
|
});
|
|
84
84
|
|
|
85
|
+
const B2bDocTextModelSchema = AiModelSchema.omit({
|
|
86
|
+
createdAt: true,
|
|
87
|
+
updatedAt: true,
|
|
88
|
+
}).extend({
|
|
89
|
+
createdAt: z.string(),
|
|
90
|
+
updatedAt: z.string(),
|
|
91
|
+
aiModel: z.string(),
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
const B2bDocImageModelSchema = ImageGenerationModelSchema.extend({
|
|
95
|
+
aiModel: z.string(),
|
|
96
|
+
});
|
|
97
|
+
|
|
85
98
|
export const ReferencesSchema = z
|
|
86
99
|
.object({
|
|
87
|
-
textModels: z.array(
|
|
88
|
-
imageModels: z.array(
|
|
100
|
+
textModels: z.array(B2bDocTextModelSchema).optional(),
|
|
101
|
+
imageModels: z.array(B2bDocImageModelSchema).optional(),
|
|
89
102
|
features: z.array(z.nativeEnum(AI_MODEL_FEATURE)).optional(),
|
|
90
103
|
supportedFileMimeTypes: z.array(z.string()).optional(),
|
|
91
104
|
})
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { JOB_REQUEST_ORIGIN } from '../../constants';
|
|
2
|
+
import { JOB_REQUEST_ORIGIN, STATISTICS_METRIC_TYPE } from '../../constants';
|
|
3
3
|
|
|
4
4
|
export namespace GetUserStatisticsByMonthCommand {
|
|
5
|
+
|
|
5
6
|
export const RequestSchema = z.object({
|
|
6
7
|
origin: z.nativeEnum(JOB_REQUEST_ORIGIN).default(JOB_REQUEST_ORIGIN.API).optional(),
|
|
8
|
+
metric: z.nativeEnum(STATISTICS_METRIC_TYPE).default(STATISTICS_METRIC_TYPE.REQUESTS).optional(),
|
|
7
9
|
});
|
|
8
10
|
|
|
9
11
|
export type Request = z.infer<typeof RequestSchema>;
|
|
@@ -5,12 +5,15 @@ import { UnlockedBySchema } from '../../unlocked-by-subscription.schema';
|
|
|
5
5
|
export const ImageGenerationModelParamsSchema = z.object({
|
|
6
6
|
aspectRatio: z.record(
|
|
7
7
|
z.string(),
|
|
8
|
-
z.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
z.union([
|
|
9
|
+
z.object({
|
|
10
|
+
width: z.number(),
|
|
11
|
+
height: z.number(),
|
|
12
|
+
}),
|
|
13
|
+
z.string(),
|
|
14
|
+
]),
|
|
12
15
|
),
|
|
13
|
-
quality: z.string().optional(),
|
|
16
|
+
quality: z.union([z.string(), z.record(z.string())]).optional(),
|
|
14
17
|
resolution: z
|
|
15
18
|
.object({
|
|
16
19
|
options: z.array(z.nativeEnum(IMAGE_GENERATION_RESOLUTION)),
|