@purpleschool/gptbot 0.1.0 → 0.1.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.
@@ -260,4 +260,9 @@ exports.ERRORS = {
260
260
  message: 'Платеж не был обновлен',
261
261
  httpCode: 500,
262
262
  },
263
+ AI_ERROR: {
264
+ code: 'A068',
265
+ message: 'Произошла ошибка при обработке запроса',
266
+ httpCode: 500,
267
+ },
263
268
  };
@@ -7,6 +7,7 @@ exports.CategorySchema = zod_1.z.object({
7
7
  mainCategoryId: zod_1.z.nullable(zod_1.z.string().uuid()),
8
8
  name: zod_1.z.string().min(3).max(16384),
9
9
  prompt: zod_1.z.string().min(3).max(16384),
10
+ placeholder: zod_1.z.nullable(zod_1.z.string()),
10
11
  createdAt: zod_1.z.date(),
11
12
  updatedAt: zod_1.z.date(),
12
13
  });
@@ -1,13 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProductSchema = void 0;
3
+ exports.ProductSchema = exports.FeaturesSchema = void 0;
4
4
  const zod_1 = require("zod");
5
+ exports.FeaturesSchema = zod_1.z.object({
6
+ icon: zod_1.z.string(),
7
+ title: zod_1.z.string(),
8
+ });
5
9
  exports.ProductSchema = zod_1.z.object({
6
10
  uuid: zod_1.z.string().uuid(),
7
11
  name: zod_1.z.string().min(3).max(16384),
8
12
  requests: zod_1.z.number(),
9
13
  price: zod_1.z.number(),
10
- features: zod_1.z.array(zod_1.z.string()),
14
+ features: zod_1.z.array(exports.FeaturesSchema),
11
15
  createdAt: zod_1.z.date(),
12
16
  updatedAt: zod_1.z.date(),
13
17
  });
@@ -2,12 +2,13 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SubscriptionSchema = void 0;
4
4
  const zod_1 = require("zod");
5
+ const product_schema_1 = require("./product.schema");
5
6
  exports.SubscriptionSchema = zod_1.z.object({
6
7
  uuid: zod_1.z.string().uuid(),
7
8
  name: zod_1.z.string().min(3).max(16384),
8
9
  requests: zod_1.z.number(),
9
10
  price: zod_1.z.number(),
10
- features: zod_1.z.array(zod_1.z.string()),
11
+ features: zod_1.z.array(product_schema_1.FeaturesSchema),
11
12
  createdAt: zod_1.z.date(),
12
13
  updatedAt: zod_1.z.date(),
13
14
  });
@@ -259,4 +259,9 @@ export const ERRORS = {
259
259
  message: 'Платеж не был обновлен',
260
260
  httpCode: 500,
261
261
  },
262
+ AI_ERROR: {
263
+ code: 'A068',
264
+ message: 'Произошла ошибка при обработке запроса',
265
+ httpCode: 500,
266
+ },
262
267
  };
@@ -5,6 +5,7 @@ export const CategorySchema = z.object({
5
5
  mainCategoryId: z.nullable(z.string().uuid()),
6
6
  name: z.string().min(3).max(16384),
7
7
  prompt: z.string().min(3).max(16384),
8
+ placeholder: z.nullable(z.string()),
8
9
 
9
10
  createdAt: z.date(),
10
11
  updatedAt: z.date(),
@@ -1,12 +1,16 @@
1
1
  import { z } from 'zod';
2
2
 
3
+ export const FeaturesSchema = z.object({
4
+ icon: z.string(),
5
+ title: z.string(),
6
+ });
7
+
3
8
  export const ProductSchema = z.object({
4
9
  uuid: z.string().uuid(),
5
10
  name: z.string().min(3).max(16384),
6
11
  requests: z.number(),
7
12
  price: z.number(),
8
- features: z.array(z.string()),
9
-
13
+ features: z.array(FeaturesSchema),
10
14
  createdAt: z.date(),
11
15
  updatedAt: z.date(),
12
16
  });
@@ -1,12 +1,12 @@
1
1
  import { z } from 'zod';
2
+ import { FeaturesSchema } from './product.schema';
2
3
 
3
4
  export const SubscriptionSchema = z.object({
4
5
  uuid: z.string().uuid(),
5
6
  name: z.string().min(3).max(16384),
6
7
  requests: z.number(),
7
8
  price: z.number(),
8
- features: z.array(z.string()),
9
-
9
+ features: z.array(FeaturesSchema),
10
10
  createdAt: z.date(),
11
11
  updatedAt: z.date(),
12
12
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {