@purpleschool/gptbot 0.5.3 → 0.5.5

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.
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CATEGORY_CONTENT_TYPE = void 0;
4
+ exports.CATEGORY_CONTENT_TYPE = {
5
+ TEXT: 'TEXT',
6
+ IMAGE: 'IMAGE',
7
+ };
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./category-type.enum"), exports);
18
+ __exportStar(require("./category-content-type.enum"), exports);
@@ -2,15 +2,17 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CategorySchema = void 0;
4
4
  const zod_1 = require("zod");
5
+ const constants_1 = require("../constants");
5
6
  exports.CategorySchema = zod_1.z.object({
6
7
  uuid: zod_1.z.string().uuid(),
7
8
  mainCategoryId: zod_1.z.nullable(zod_1.z.string().uuid()),
8
9
  name: zod_1.z.string().min(3).max(16384),
9
10
  type: zod_1.z.string(),
10
11
  order: zod_1.z.number().min(0),
11
- prompt: zod_1.z.string().min(3).max(16384),
12
+ prompt: zod_1.z.nullable(zod_1.z.string().min(3).max(16384)),
12
13
  placeholder: zod_1.z.nullable(zod_1.z.string()),
13
14
  seoName: zod_1.z.string().min(3).max(16384),
15
+ contentType: zod_1.z.enum(Object.values(constants_1.CATEGORY_CONTENT_TYPE)),
14
16
  createdAt: zod_1.z.date(),
15
17
  updatedAt: zod_1.z.date(),
16
18
  });
@@ -0,0 +1,7 @@
1
+ export const CATEGORY_CONTENT_TYPE = {
2
+ TEXT: 'TEXT',
3
+ IMAGE: 'IMAGE',
4
+ } as const;
5
+
6
+ export type TCategoryContentTypeEnum =
7
+ (typeof CATEGORY_CONTENT_TYPE)[keyof typeof CATEGORY_CONTENT_TYPE];
@@ -1 +1,2 @@
1
1
  export * from './category-type.enum';
2
+ export * from './category-content-type.enum';
@@ -1,4 +1,5 @@
1
1
  import { z } from 'zod';
2
+ import { CATEGORY_CONTENT_TYPE, TCategoryContentTypeEnum } from '../constants';
2
3
 
3
4
  export const CategorySchema = z.object({
4
5
  uuid: z.string().uuid(),
@@ -6,9 +7,10 @@ export const CategorySchema = z.object({
6
7
  name: z.string().min(3).max(16384),
7
8
  type: z.string(),
8
9
  order: z.number().min(0),
9
- prompt: z.string().min(3).max(16384),
10
+ prompt: z.nullable(z.string().min(3).max(16384)),
10
11
  placeholder: z.nullable(z.string()),
11
12
  seoName: z.string().min(3).max(16384),
13
+ contentType: z.enum(Object.values(CATEGORY_CONTENT_TYPE) as [TCategoryContentTypeEnum]),
12
14
 
13
15
  createdAt: z.date(),
14
16
  updatedAt: z.date(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {