@purpleschool/gptbot 0.9.15 → 0.9.17

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.
@@ -25,6 +25,13 @@ var GetB2bDocumentationCommand;
25
25
  GetB2bDocumentationCommand.EndpointExampleSchema = zod_1.z.object({
26
26
  title: zod_1.z.string(),
27
27
  curl: zod_1.z.string().optional(),
28
+ curlTemplate: zod_1.z.string().optional(),
29
+ variables: zod_1.z
30
+ .array(zod_1.z.object({
31
+ name: zod_1.z.string(),
32
+ description: zod_1.z.string().optional(),
33
+ }))
34
+ .optional(),
28
35
  request: models_1.JsonValueSchema.optional(),
29
36
  response: models_1.JsonValueSchema.optional(),
30
37
  });
@@ -59,10 +66,21 @@ var GetB2bDocumentationCommand;
59
66
  title: zod_1.z.string(),
60
67
  body: zod_1.z.string(),
61
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
+ });
62
80
  GetB2bDocumentationCommand.ReferencesSchema = zod_1.z
63
81
  .object({
64
- textModels: zod_1.z.array(models_1.AiModelSchema).optional(),
65
- imageModels: zod_1.z.array(models_1.ImageGenerationModelSchema).optional(),
82
+ textModels: zod_1.z.array(B2bDocTextModelSchema).optional(),
83
+ imageModels: zod_1.z.array(B2bDocImageModelSchema).optional(),
66
84
  features: zod_1.z.array(zod_1.z.nativeEnum(constants_1.AI_MODEL_FEATURE)).optional(),
67
85
  supportedFileMimeTypes: zod_1.z.array(zod_1.z.string()).optional(),
68
86
  })
@@ -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.object({
9
- width: zod_1.z.number(),
10
- height: zod_1.z.number(),
11
- })),
12
- quality: zod_1.z.string().optional(),
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)),
@@ -34,6 +34,15 @@ export namespace GetB2bDocumentationCommand {
34
34
  export const EndpointExampleSchema = z.object({
35
35
  title: z.string(),
36
36
  curl: z.string().optional(),
37
+ curlTemplate: z.string().optional(),
38
+ variables: z
39
+ .array(
40
+ z.object({
41
+ name: z.string(),
42
+ description: z.string().optional(),
43
+ }),
44
+ )
45
+ .optional(),
37
46
  request: JsonValueSchema.optional(),
38
47
  response: JsonValueSchema.optional(),
39
48
  });
@@ -73,10 +82,23 @@ export namespace GetB2bDocumentationCommand {
73
82
  body: z.string(),
74
83
  });
75
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
+
76
98
  export const ReferencesSchema = z
77
99
  .object({
78
- textModels: z.array(AiModelSchema).optional(),
79
- imageModels: z.array(ImageGenerationModelSchema).optional(),
100
+ textModels: z.array(B2bDocTextModelSchema).optional(),
101
+ imageModels: z.array(B2bDocImageModelSchema).optional(),
80
102
  features: z.array(z.nativeEnum(AI_MODEL_FEATURE)).optional(),
81
103
  supportedFileMimeTypes: z.array(z.string()).optional(),
82
104
  })
@@ -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.object({
9
- width: z.number(),
10
- height: z.number(),
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)),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.9.15",
3
+ "version": "0.9.17",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",