@purpleschool/gptbot 0.5.35 → 0.5.37

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,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AI_MODEL_STATUS = void 0;
4
+ var AI_MODEL_STATUS;
5
+ (function (AI_MODEL_STATUS) {
6
+ AI_MODEL_STATUS["ACTIVE"] = "active";
7
+ AI_MODEL_STATUS["INACTIVE"] = "inactive";
8
+ })(AI_MODEL_STATUS || (exports.AI_MODEL_STATUS = AI_MODEL_STATUS = {}));
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./ai-model-content-type.enum"), exports);
18
18
  __exportStar(require("./ai-model-feature.enum"), exports);
19
+ __exportStar(require("./ai-model-status.enum"), exports);
19
20
  __exportStar(require("./ai-model-strategy.enum"), exports);
@@ -870,4 +870,9 @@ exports.ERRORS = {
870
870
  message: 'Превышено максимальное количество прикрепленных файлов',
871
871
  httpCode: 400,
872
872
  },
873
+ CHAT_NO_ACCESS_TO_PREMIUM_MODELS: {
874
+ code: 'A199',
875
+ message: 'У пользователя нет доступа к премиум моделям',
876
+ httpCode: 400,
877
+ },
873
878
  };
@@ -13,6 +13,7 @@ exports.AiModelSchema = zod_1.z.object({
13
13
  order: zod_1.z.number(),
14
14
  canUse: zod_1.z.optional(zod_1.z.boolean()),
15
15
  icon: zod_1.z.nullable(zod_1.z.string()),
16
+ status: zod_1.z.nativeEnum(constants_1.AI_MODEL_STATUS),
16
17
  contentType: zod_1.z.enum(Object.values(constants_1.AI_MODEL_CONTENT_TYPE)),
17
18
  features: zod_1.z.array(zod_1.z.nativeEnum(constants_1.AI_MODEL_FEATURE)),
18
19
  createdAt: zod_1.z.date(),
@@ -0,0 +1,4 @@
1
+ export enum AI_MODEL_STATUS {
2
+ ACTIVE = 'active',
3
+ INACTIVE = 'inactive',
4
+ }
@@ -1,3 +1,4 @@
1
1
  export * from './ai-model-content-type.enum';
2
2
  export * from './ai-model-feature.enum';
3
+ export * from './ai-model-status.enum';
3
4
  export * from './ai-model-strategy.enum';
@@ -872,4 +872,9 @@ export const ERRORS = {
872
872
  message: 'Превышено максимальное количество прикрепленных файлов',
873
873
  httpCode: 400,
874
874
  },
875
+ CHAT_NO_ACCESS_TO_PREMIUM_MODELS: {
876
+ code: 'A199',
877
+ message: 'У пользователя нет доступа к премиум моделям',
878
+ httpCode: 400,
879
+ },
875
880
  };
@@ -1,5 +1,10 @@
1
1
  import { z } from 'zod';
2
- import { AI_MODEL_CONTENT_TYPE, AI_MODEL_FEATURE, TAIModelContentTypeEnum } from '../constants';
2
+ import {
3
+ AI_MODEL_CONTENT_TYPE,
4
+ AI_MODEL_FEATURE,
5
+ AI_MODEL_STATUS,
6
+ TAIModelContentTypeEnum,
7
+ } from '../constants';
3
8
 
4
9
  export const AiModelSchema = z.object({
5
10
  uuid: z.string().uuid(),
@@ -11,6 +16,7 @@ export const AiModelSchema = z.object({
11
16
  order: z.number(),
12
17
  canUse: z.optional(z.boolean()),
13
18
  icon: z.nullable(z.string()),
19
+ status: z.nativeEnum(AI_MODEL_STATUS),
14
20
  contentType: z.enum(Object.values(AI_MODEL_CONTENT_TYPE) as [TAIModelContentTypeEnum]),
15
21
  features: z.array(z.nativeEnum(AI_MODEL_FEATURE)),
16
22
  createdAt: z.date(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.5.35",
3
+ "version": "0.5.37",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {