@purpleschool/gptbot 0.5.47 → 0.5.48

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.
@@ -13,4 +13,5 @@ export const SUBSCRIPTION_ROUTES = {
13
13
  GET_AVAILABLE_UPGRADES: 'available-upgrades',
14
14
  UPGRADE: 'upgrade',
15
15
  CREATE_CUSTOM: 'custom',
16
+ FREE: 'free',
16
17
  } as const;
@@ -14,4 +14,5 @@ exports.SUBSCRIPTION_ROUTES = {
14
14
  GET_AVAILABLE_UPGRADES: 'available-upgrades',
15
15
  UPGRADE: 'upgrade',
16
16
  CREATE_CUSTOM: 'custom',
17
+ FREE: 'free',
17
18
  };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetFreeSubscriptionCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ var GetFreeSubscriptionCommand;
7
+ (function (GetFreeSubscriptionCommand) {
8
+ GetFreeSubscriptionCommand.ResponseSchema = zod_1.z.object({
9
+ data: models_1.SubscriptionSchema,
10
+ });
11
+ })(GetFreeSubscriptionCommand || (exports.GetFreeSubscriptionCommand = GetFreeSubscriptionCommand = {}));
@@ -21,6 +21,7 @@ __exportStar(require("./create-subscription.command"), exports);
21
21
  __exportStar(require("./delete-subscription.command"), exports);
22
22
  __exportStar(require("./find-subscription.command"), exports);
23
23
  __exportStar(require("./get-available-upgrades.command"), exports);
24
+ __exportStar(require("./get-free-subscription.command"), exports);
24
25
  __exportStar(require("./recover-subscription.command"), exports);
25
26
  __exportStar(require("./update-subscription.command"), exports);
26
27
  __exportStar(require("./upgrade-subscription.command"), exports);
@@ -955,4 +955,9 @@ exports.ERRORS = {
955
955
  message: 'Произошла ошибка при поиске доступных ИИ моделей',
956
956
  httpCode: 500,
957
957
  },
958
+ CHAT_INPUT_LIMITS_CHECK_ERROR: {
959
+ code: 'A217',
960
+ message: 'Произошла ошибка при проверке ограничений на длину запроса для чата',
961
+ httpCode: 500,
962
+ },
958
963
  };
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FREE_SUBSCRIPTION_DATA = void 0;
4
+ const enums_1 = require("./enums");
5
+ exports.FREE_SUBSCRIPTION_DATA = {
6
+ uuid: '00000000-0000-0000-0000-000000000000',
7
+ mainSubscriptionId: null,
8
+ name: 'Бесплатный',
9
+ requests: 0,
10
+ price: 0,
11
+ tokens: 0,
12
+ type: enums_1.SUBSCRIPTION_TYPE.main,
13
+ discount: 0,
14
+ maxDiscountPercent: 0,
15
+ period: 0,
16
+ plan: enums_1.SUBSCRIPTION_PLAN.system,
17
+ icon: 'https://rugpt.hb.bizmrg.com/images/images/ac095d48-a66b-4862-82c7-eb120b5bd467.svg',
18
+ interval: '',
19
+ createdAt: new Date(),
20
+ updatedAt: new Date(),
21
+ };
@@ -14,6 +14,8 @@ exports.ProductSchema = zod_1.z.object({
14
14
  price: zod_1.z.number(),
15
15
  icon: zod_1.z.string(),
16
16
  features: zod_1.z.array(subscription_feature_schema_1.SubscriptionFeatureSchema),
17
+ maxInputLength: zod_1.z.number(),
18
+ maxInputTokens: zod_1.z.number(),
17
19
  createdAt: zod_1.z.date(),
18
20
  updatedAt: zod_1.z.date(),
19
21
  });
@@ -18,6 +18,8 @@ exports.SubscriptionSchema = zod_1.z.object({
18
18
  icon: zod_1.z.string(),
19
19
  action: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_ACTION).optional().nullable(),
20
20
  features: zod_1.z.array(subscription_feature_schema_1.SubscriptionFeatureSchema),
21
+ maxInputLength: zod_1.z.number(),
22
+ maxInputTokens: zod_1.z.number(),
21
23
  createdAt: zod_1.z.date(),
22
24
  updatedAt: zod_1.z.date(),
23
25
  });
@@ -0,0 +1,10 @@
1
+ import { z } from 'zod';
2
+ import { SubscriptionSchema } from '../../models';
3
+
4
+ export namespace GetFreeSubscriptionCommand {
5
+ export const ResponseSchema = z.object({
6
+ data: SubscriptionSchema,
7
+ });
8
+
9
+ export type Response = z.infer<typeof ResponseSchema>;
10
+ }
@@ -5,6 +5,7 @@ export * from './create-subscription.command';
5
5
  export * from './delete-subscription.command';
6
6
  export * from './find-subscription.command';
7
7
  export * from './get-available-upgrades.command';
8
+ export * from './get-free-subscription.command';
8
9
  export * from './recover-subscription.command';
9
10
  export * from './update-subscription.command';
10
11
  export * from './upgrade-subscription.command';
@@ -958,4 +958,9 @@ export const ERRORS = {
958
958
  message: 'Произошла ошибка при поиске доступных ИИ моделей',
959
959
  httpCode: 500,
960
960
  },
961
+ CHAT_INPUT_LIMITS_CHECK_ERROR: {
962
+ code: 'A217',
963
+ message: 'Произошла ошибка при проверке ограничений на длину запроса для чата',
964
+ httpCode: 500,
965
+ },
961
966
  };
@@ -0,0 +1,19 @@
1
+ import { SUBSCRIPTION_PLAN, SUBSCRIPTION_TYPE } from './enums';
2
+
3
+ export const FREE_SUBSCRIPTION_DATA = {
4
+ uuid: '00000000-0000-0000-0000-000000000000',
5
+ mainSubscriptionId: null,
6
+ name: 'Бесплатный',
7
+ requests: 0,
8
+ price: 0,
9
+ tokens: 0,
10
+ type: SUBSCRIPTION_TYPE.main,
11
+ discount: 0,
12
+ maxDiscountPercent: 0,
13
+ period: 0,
14
+ plan: SUBSCRIPTION_PLAN.system,
15
+ icon: 'https://rugpt.hb.bizmrg.com/images/images/ac095d48-a66b-4862-82c7-eb120b5bd467.svg',
16
+ interval: '',
17
+ createdAt: new Date(),
18
+ updatedAt: new Date(),
19
+ };
@@ -13,6 +13,8 @@ export const ProductSchema = z.object({
13
13
  price: z.number(),
14
14
  icon: z.string(),
15
15
  features: z.array(SubscriptionFeatureSchema),
16
+ maxInputLength: z.number(),
17
+ maxInputTokens: z.number(),
16
18
  createdAt: z.date(),
17
19
  updatedAt: z.date(),
18
20
  });
@@ -16,6 +16,8 @@ export const SubscriptionSchema = z.object({
16
16
  icon: z.string(),
17
17
  action: z.nativeEnum(SUBSCRIPTION_ACTION).optional().nullable(),
18
18
  features: z.array(SubscriptionFeatureSchema),
19
+ maxInputLength: z.number(),
20
+ maxInputTokens: z.number(),
19
21
  createdAt: z.date(),
20
22
  updatedAt: z.date(),
21
23
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.5.47",
3
+ "version": "0.5.48",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",