@purpleschool/gptbot-tools 0.0.30 → 0.0.32

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.
@@ -338,6 +338,11 @@ exports.ERRORS = {
338
338
  message: 'Произошла ошибка при генерации изображений для слайдов',
339
339
  httpCode: 500,
340
340
  },
341
+ INSUFFICIENT_BALANCE: {
342
+ code: 'PRESENTATION.INSUFFICIENT_BALANCE',
343
+ message: 'У пользователя недостаточно средств для генерации слайдов',
344
+ httpCode: 400,
345
+ },
341
346
  },
342
347
  SLIDE_OUTLINE: {
343
348
  DELETE_ERROR: {
@@ -10,6 +10,7 @@ var GenerateSlidesCommand;
10
10
  uuid: zod_1.z.string().uuid(),
11
11
  userId: zod_1.z.string().uuid().nullable().optional(),
12
12
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
+ userBalance: zod_1.z.number(),
13
14
  });
14
15
  GenerateSlidesCommand.ResponseSchema = (0, common_1.ICommandResponseSchema)(models_1.PresentationSchema);
15
16
  })(GenerateSlidesCommand || (exports.GenerateSlidesCommand = GenerateSlidesCommand = {}));
@@ -12,6 +12,7 @@ exports.PresentationConfigSchema = zod_1.z.object({
12
12
  slideGenerationPrice: zod_1.z.number(),
13
13
  maxSlides: zod_1.z.number(),
14
14
  minSlides: zod_1.z.number(),
15
+ maxSlideTitleLength: zod_1.z.number(),
15
16
  maxSlideOutlineLength: zod_1.z.number(),
16
17
  maxPromptLength: zod_1.z.number(),
17
18
  });
@@ -337,6 +337,11 @@ export const ERRORS = {
337
337
  message: 'Произошла ошибка при генерации изображений для слайдов',
338
338
  httpCode: 500,
339
339
  },
340
+ INSUFFICIENT_BALANCE: {
341
+ code: 'PRESENTATION.INSUFFICIENT_BALANCE',
342
+ message: 'У пользователя недостаточно средств для генерации слайдов',
343
+ httpCode: 400,
344
+ },
340
345
  },
341
346
  SLIDE_OUTLINE: {
342
347
  DELETE_ERROR: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot-tools",
3
- "version": "0.0.30",
3
+ "version": "0.0.32",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "scripts": {
@@ -7,6 +7,7 @@ export namespace GenerateSlidesCommand {
7
7
  uuid: z.string().uuid(),
8
8
  userId: z.string().uuid().nullable().optional(),
9
9
  unregisteredUserId: z.string().uuid().nullable().optional(),
10
+ userBalance: z.number(),
10
11
  });
11
12
  export type Request = z.infer<typeof RequestSchema>;
12
13
 
@@ -10,6 +10,7 @@ export const PresentationConfigSchema = z.object({
10
10
  slideGenerationPrice: z.number(),
11
11
  maxSlides: z.number(),
12
12
  minSlides: z.number(),
13
+ maxSlideTitleLength: z.number(),
13
14
  maxSlideOutlineLength: z.number(),
14
15
  maxPromptLength: z.number(),
15
16
  });