@purpleschool/gptbot 0.5.94 → 0.5.96

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.
@@ -1,4 +1,5 @@
1
1
  export const FILE_CONTROLLER = 'file' as const;
2
+ export const FILE_PUBLIC_CONTROLLER = 'public/file' as const;
2
3
 
3
4
  export const FILE_ROUTES = {
4
5
  DELETE: (uuid: string) => `${uuid}`,
@@ -10,4 +10,5 @@ export const STT_ROUTES = {
10
10
  UPDATE: (uuid: string) => `jobs/${uuid}`,
11
11
  DELETE: (uuid: string) => `jobs/${uuid}`,
12
12
  DELETE_ALL: 'jobs',
13
+ RETRY: (uuid: string) => `jobs/${uuid}/retry`,
13
14
  } as const;
@@ -10,4 +10,5 @@ export const TTS_ROUTES = {
10
10
  SET_REACTION: (uuid: string) => `jobs/${uuid}/reaction`,
11
11
  DELETE: (uuid: string) => `jobs/${uuid}`,
12
12
  DELETE_ALL: 'jobs',
13
+ RETRY: (uuid: string) => `jobs/${uuid}/retry`,
13
14
  } as const;
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FILE_ROUTES = exports.FILE_CONTROLLER = void 0;
3
+ exports.FILE_ROUTES = exports.FILE_PUBLIC_CONTROLLER = exports.FILE_CONTROLLER = void 0;
4
4
  exports.FILE_CONTROLLER = 'file';
5
+ exports.FILE_PUBLIC_CONTROLLER = 'public/file';
5
6
  exports.FILE_ROUTES = {
6
7
  DELETE: (uuid) => `${uuid}`,
7
8
  UPLOAD: 'upload',
@@ -12,4 +12,5 @@ exports.STT_ROUTES = {
12
12
  UPDATE: (uuid) => `jobs/${uuid}`,
13
13
  DELETE: (uuid) => `jobs/${uuid}`,
14
14
  DELETE_ALL: 'jobs',
15
+ RETRY: (uuid) => `jobs/${uuid}/retry`,
15
16
  };
@@ -12,4 +12,5 @@ exports.TTS_ROUTES = {
12
12
  SET_REACTION: (uuid) => `jobs/${uuid}/reaction`,
13
13
  DELETE: (uuid) => `jobs/${uuid}`,
14
14
  DELETE_ALL: 'jobs',
15
+ RETRY: (uuid) => `jobs/${uuid}/retry`,
15
16
  };
@@ -19,6 +19,7 @@ __exportStar(require("./delete-stt-job-by-uuid.command"), exports);
19
19
  __exportStar(require("./find-stt-job-by-uuid.command"), exports);
20
20
  __exportStar(require("./find-stt-jobs.command"), exports);
21
21
  __exportStar(require("./get-stt-tool-config.command"), exports);
22
+ __exportStar(require("./retry-stt-job.command"), exports);
22
23
  __exportStar(require("./set-reaction-to-stt-job.command"), exports);
23
24
  __exportStar(require("./stt.command"), exports);
24
25
  __exportStar(require("./update-stt-job-title.command"), exports);
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RetrySTTJobCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ var RetrySTTJobCommand;
7
+ (function (RetrySTTJobCommand) {
8
+ RetrySTTJobCommand.RequestParamsSchema = zod_1.z.object({
9
+ uuid: zod_1.z.string().uuid(),
10
+ });
11
+ RetrySTTJobCommand.ResponseSchema = zod_1.z.object({
12
+ data: models_1.STTJobSchema,
13
+ });
14
+ })(RetrySTTJobCommand || (exports.RetrySTTJobCommand = RetrySTTJobCommand = {}));
@@ -19,6 +19,7 @@ __exportStar(require("./delete-tts-job-by-uuid.command"), exports);
19
19
  __exportStar(require("./find-tts-job-by-uuid.command"), exports);
20
20
  __exportStar(require("./find-tts-jobs.command"), exports);
21
21
  __exportStar(require("./get-tts-tool-config.command"), exports);
22
+ __exportStar(require("./retry-tts-job.command"), exports);
22
23
  __exportStar(require("./set-reaction-to-tts-job.command"), exports);
23
24
  __exportStar(require("./tts.command"), exports);
24
25
  __exportStar(require("./update-tts-job-title.command"), exports);
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RetryTTSJobCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../../models");
6
+ var RetryTTSJobCommand;
7
+ (function (RetryTTSJobCommand) {
8
+ RetryTTSJobCommand.RequestParamsSchema = zod_1.z.object({
9
+ uuid: zod_1.z.string().uuid(),
10
+ });
11
+ RetryTTSJobCommand.ResponseSchema = zod_1.z.object({
12
+ data: models_1.TTSJobSchema,
13
+ });
14
+ })(RetryTTSJobCommand || (exports.RetryTTSJobCommand = RetryTTSJobCommand = {}));
@@ -4,4 +4,5 @@ exports.CATEGORY_MARK = void 0;
4
4
  var CATEGORY_MARK;
5
5
  (function (CATEGORY_MARK) {
6
6
  CATEGORY_MARK["HIDDEN"] = "hidden";
7
+ CATEGORY_MARK["REVEAL_ON_CLICK"] = "reveal_on_click";
7
8
  })(CATEGORY_MARK || (exports.CATEGORY_MARK = CATEGORY_MARK = {}));
@@ -1308,4 +1308,14 @@ exports.ERRORS = {
1308
1308
  message: 'Произошла ошибка при поиске формы',
1309
1309
  httpCode: 500,
1310
1310
  },
1311
+ TTS_RETRY_REQUEST_ERROR: {
1312
+ code: 'TTS001',
1313
+ message: 'Произошла ошибка при повторном запросе TTS',
1314
+ httpCode: 500,
1315
+ },
1316
+ STT_RETRY_REQUEST_ERROR: {
1317
+ code: 'STT001',
1318
+ message: 'Произошла ошибка при повторном запросе STT',
1319
+ httpCode: 500,
1320
+ },
1311
1321
  };
@@ -3,6 +3,7 @@ export * from './delete-stt-job-by-uuid.command';
3
3
  export * from './find-stt-job-by-uuid.command';
4
4
  export * from './find-stt-jobs.command';
5
5
  export * from './get-stt-tool-config.command';
6
+ export * from './retry-stt-job.command';
6
7
  export * from './set-reaction-to-stt-job.command';
7
8
  export * from './stt.command';
8
9
  export * from './update-stt-job-title.command';
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ import { STTJobSchema } from '../../../models';
3
+
4
+ export namespace RetrySTTJobCommand {
5
+ export const RequestParamsSchema = z.object({
6
+ uuid: z.string().uuid(),
7
+ });
8
+ export type RequestParams = z.infer<typeof RequestParamsSchema>;
9
+
10
+ export const ResponseSchema = z.object({
11
+ data: STTJobSchema,
12
+ });
13
+ export type Response = z.infer<typeof ResponseSchema>;
14
+ }
@@ -3,6 +3,7 @@ export * from './delete-tts-job-by-uuid.command';
3
3
  export * from './find-tts-job-by-uuid.command';
4
4
  export * from './find-tts-jobs.command';
5
5
  export * from './get-tts-tool-config.command';
6
+ export * from './retry-tts-job.command';
6
7
  export * from './set-reaction-to-tts-job.command';
7
8
  export * from './tts.command';
8
9
  export * from './update-tts-job-title.command';
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ import { TTSJobSchema } from '../../../models';
3
+
4
+ export namespace RetryTTSJobCommand {
5
+ export const RequestParamsSchema = z.object({
6
+ uuid: z.string().uuid(),
7
+ });
8
+ export type RequestParams = z.infer<typeof RequestParamsSchema>;
9
+
10
+ export const ResponseSchema = z.object({
11
+ data: TTSJobSchema,
12
+ });
13
+ export type Response = z.infer<typeof ResponseSchema>;
14
+ }
@@ -1,3 +1,4 @@
1
1
  export enum CATEGORY_MARK {
2
2
  HIDDEN = 'hidden',
3
+ REVEAL_ON_CLICK = 'reveal_on_click',
3
4
  }
@@ -1314,4 +1314,14 @@ export const ERRORS = {
1314
1314
  message: 'Произошла ошибка при поиске формы',
1315
1315
  httpCode: 500,
1316
1316
  },
1317
+ TTS_RETRY_REQUEST_ERROR: {
1318
+ code: 'TTS001',
1319
+ message: 'Произошла ошибка при повторном запросе TTS',
1320
+ httpCode: 500,
1321
+ },
1322
+ STT_RETRY_REQUEST_ERROR: {
1323
+ code: 'STT001',
1324
+ message: 'Произошла ошибка при повторном запросе STT',
1325
+ httpCode: 500,
1326
+ },
1317
1327
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.5.94",
3
+ "version": "0.5.96",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",