@purpleschool/gptbot 0.18.9-stage-2 → 0.18.10-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.
@@ -50,7 +50,6 @@ export declare namespace GetInteriorDesignToolConfigCommand {
50
50
  order: z.ZodNumber;
51
51
  }, z.core.$strip>>;
52
52
  generationCatalog: z.ZodObject<{
53
- version: z.ZodString;
54
53
  modes: z.ZodArray<z.ZodObject<{
55
54
  id: z.ZodEnum<{
56
55
  facade: "facade";
@@ -69,7 +68,7 @@ export declare namespace GetInteriorDesignToolConfigCommand {
69
68
  styles: z.ZodArray<z.ZodObject<{
70
69
  id: z.ZodString;
71
70
  title: z.ZodString;
72
- sample: z.ZodString;
71
+ sample: z.ZodOptional<z.ZodString>;
73
72
  applicability: z.ZodArray<z.ZodObject<{
74
73
  modeId: z.ZodEnum<{
75
74
  facade: "facade";
@@ -2,11 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.InteriorDesignCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
5
6
  const constants_1 = require("../../../constants");
6
7
  const models_1 = require("../../../models");
7
8
  var InteriorDesignCommand;
8
9
  (function (InteriorDesignCommand) {
9
- InteriorDesignCommand.RequestSchema = zod_1.z.object({
10
+ InteriorDesignCommand.RequestSchema = zod_1.z
11
+ .object({
10
12
  modelId: zod_1.z.uuid(),
11
13
  prompt: zod_1.z.string(),
12
14
  params: zod_1.z.object({
@@ -20,6 +22,17 @@ var InteriorDesignCommand;
20
22
  batching: zod_1.z.coerce.number().int().min(1).max(4).default(1),
21
23
  }),
22
24
  jobSource: zod_1.z.enum(constants_1.INTERIOR_DESIGN_JOB_SOURCE),
25
+ })
26
+ .superRefine((request, context) => {
27
+ if (request.params.generationType === 'create' &&
28
+ request.params.styleId === 'custom' &&
29
+ !request.prompt.trim()) {
30
+ context.addIssue({
31
+ code: 'custom',
32
+ path: ['prompt'],
33
+ message: rugpt_lib_common_1.ERRORS.INTERIOR_DESIGN.CUSTOM_STYLE_DESCRIPTION_REQUIRED.message,
34
+ });
35
+ }
23
36
  });
24
37
  InteriorDesignCommand.ResponseSchema = zod_1.z.object({
25
38
  data: models_1.InteriorDesignGenerationGroupSchema,
@@ -30,7 +30,7 @@ export declare const InteriorDesignGenerationCatalogStyleApplicabilitySchema: z.
30
30
  export declare const InteriorDesignGenerationCatalogStyleSchema: z.ZodObject<{
31
31
  id: z.ZodString;
32
32
  title: z.ZodString;
33
- sample: z.ZodString;
33
+ sample: z.ZodOptional<z.ZodString>;
34
34
  applicability: z.ZodArray<z.ZodObject<{
35
35
  modeId: z.ZodEnum<{
36
36
  facade: "facade";
@@ -67,7 +67,7 @@ export declare const InteriorDesignGenerationCatalogModeSchema: z.ZodObject<{
67
67
  styles: z.ZodArray<z.ZodObject<{
68
68
  id: z.ZodString;
69
69
  title: z.ZodString;
70
- sample: z.ZodString;
70
+ sample: z.ZodOptional<z.ZodString>;
71
71
  applicability: z.ZodArray<z.ZodObject<{
72
72
  modeId: z.ZodEnum<{
73
73
  facade: "facade";
@@ -80,7 +80,6 @@ export declare const InteriorDesignGenerationCatalogModeSchema: z.ZodObject<{
80
80
  }, z.core.$strip>>;
81
81
  }, z.core.$strip>;
82
82
  export declare const InteriorDesignGenerationCatalogSchema: z.ZodObject<{
83
- version: z.ZodString;
84
83
  modes: z.ZodArray<z.ZodObject<{
85
84
  id: z.ZodEnum<{
86
85
  facade: "facade";
@@ -99,7 +98,7 @@ export declare const InteriorDesignGenerationCatalogSchema: z.ZodObject<{
99
98
  styles: z.ZodArray<z.ZodObject<{
100
99
  id: z.ZodString;
101
100
  title: z.ZodString;
102
- sample: z.ZodString;
101
+ sample: z.ZodOptional<z.ZodString>;
103
102
  applicability: z.ZodArray<z.ZodObject<{
104
103
  modeId: z.ZodEnum<{
105
104
  facade: "facade";
@@ -162,7 +161,6 @@ export declare const InteriorDesignConfigSchema: z.ZodObject<{
162
161
  order: z.ZodNumber;
163
162
  }, z.core.$strip>>;
164
163
  generationCatalog: z.ZodObject<{
165
- version: z.ZodString;
166
164
  modes: z.ZodArray<z.ZodObject<{
167
165
  id: z.ZodEnum<{
168
166
  facade: "facade";
@@ -181,7 +179,7 @@ export declare const InteriorDesignConfigSchema: z.ZodObject<{
181
179
  styles: z.ZodArray<z.ZodObject<{
182
180
  id: z.ZodString;
183
181
  title: z.ZodString;
184
- sample: z.ZodString;
182
+ sample: z.ZodOptional<z.ZodString>;
185
183
  applicability: z.ZodArray<z.ZodObject<{
186
184
  modeId: z.ZodEnum<{
187
185
  facade: "facade";
@@ -26,7 +26,7 @@ exports.InteriorDesignGenerationCatalogStyleApplicabilitySchema = zod_1.z.object
26
26
  objectSubtypeId: zod_1.z.string(),
27
27
  });
28
28
  exports.InteriorDesignGenerationCatalogStyleSchema = exports.InteriorDesignGenerationCatalogItemSchema.extend({
29
- sample: zod_1.z.string().url(),
29
+ sample: zod_1.z.string().url().optional(),
30
30
  applicability: zod_1.z.array(exports.InteriorDesignGenerationCatalogStyleApplicabilitySchema).min(1),
31
31
  });
32
32
  exports.InteriorDesignGenerationCatalogObjectTypeSchema = exports.InteriorDesignGenerationCatalogItemSchema.extend({
@@ -39,7 +39,6 @@ exports.InteriorDesignGenerationCatalogModeSchema = zod_1.z.object({
39
39
  styles: zod_1.z.array(exports.InteriorDesignGenerationCatalogStyleSchema),
40
40
  });
41
41
  exports.InteriorDesignGenerationCatalogSchema = zod_1.z.object({
42
- version: zod_1.z.string(),
43
42
  modes: zod_1.z.array(exports.InteriorDesignGenerationCatalogModeSchema),
44
43
  });
45
44
  exports.InteriorDesignConfigSchema = zod_1.z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.18.9-stage-2",
3
+ "version": "0.18.10-stage-2",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -15,7 +15,7 @@
15
15
  "author": "",
16
16
  "license": "ISC",
17
17
  "dependencies": {
18
- "@purpleschool/rugpt-lib-common": "^0.0.96",
18
+ "@purpleschool/rugpt-lib-common": "^0.0.97",
19
19
  "zod": "^4.4.3"
20
20
  }
21
21
  }