@purpleschool/rugpt-lib-common 0.0.20 → 0.0.22

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.
@@ -16,4 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./ai-model-status.enum"), exports);
18
18
  __exportStar(require("./locale.enum"), exports);
19
- __exportStar(require("./job-request-origin.enum"), exports);
19
+ __exportStar(require("./statistics"), exports);
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./statistics-billing-origin.enum"), exports);
18
+ __exportStar(require("./statistics-call-origin.enum"), exports);
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.STATISTICS_BILLING_ORIGIN = void 0;
4
+ var STATISTICS_BILLING_ORIGIN;
5
+ (function (STATISTICS_BILLING_ORIGIN) {
6
+ STATISTICS_BILLING_ORIGIN["PERSONAL"] = "personal";
7
+ STATISTICS_BILLING_ORIGIN["TEAM_ACCOUNT"] = "team_account";
8
+ })(STATISTICS_BILLING_ORIGIN || (exports.STATISTICS_BILLING_ORIGIN = STATISTICS_BILLING_ORIGIN = {}));
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.STATISTICS_CALL_ORIGIN = void 0;
4
+ var STATISTICS_CALL_ORIGIN;
5
+ (function (STATISTICS_CALL_ORIGIN) {
6
+ STATISTICS_CALL_ORIGIN["API"] = "api";
7
+ STATISTICS_CALL_ORIGIN["WEB"] = "web";
8
+ })(STATISTICS_CALL_ORIGIN || (exports.STATISTICS_CALL_ORIGIN = STATISTICS_CALL_ORIGIN = {}));
@@ -5057,4 +5057,31 @@ exports.ERRORS = {
5057
5057
  message: "Произошла ошибка при удалении источника",
5058
5058
  },
5059
5059
  },
5060
+ TOOL_WORKSPACE_ERRORS: {
5061
+ SAVE_ERROR: {
5062
+ code: 'TOOL_WORKSPACE_SAVE_ERROR',
5063
+ httpCode: 500,
5064
+ message: 'Не удалось сохранить рабочее пространство инструмента',
5065
+ },
5066
+ FIND_ERROR: {
5067
+ code: 'TOOL_WORKSPACE_FIND_ERROR',
5068
+ httpCode: 500,
5069
+ message: 'Не удалось найти рабочее пространство инструмента',
5070
+ },
5071
+ NOT_FOUND: {
5072
+ code: 'TOOL_WORKSPACE_NOT_FOUND',
5073
+ httpCode: 404,
5074
+ message: 'Рабочее пространство инструмента не найдено',
5075
+ },
5076
+ NOT_AN_OWNER: {
5077
+ code: 'TOOL_WORKSPACE_NOT_AN_OWNER',
5078
+ httpCode: 403,
5079
+ message: 'Пользователь не является владельцем рабочего пространства инструмента',
5080
+ },
5081
+ SOFT_DELETE_ERROR: {
5082
+ code: 'TOOL_WORKSPACE_SOFT_DELETE_ERROR',
5083
+ httpCode: 500,
5084
+ message: 'Не удалось выполнить мягкое удаление рабочего пространства инструмента',
5085
+ },
5086
+ },
5060
5087
  };
package/enums/index.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export * from './ai-model-status.enum';
2
2
  export * from './locale.enum';
3
- export * from './job-request-origin.enum';
3
+ export * from './statistics';
@@ -0,0 +1,2 @@
1
+ export * from './statistics-billing-origin.enum';
2
+ export * from './statistics-call-origin.enum';
@@ -0,0 +1,4 @@
1
+ export enum STATISTICS_BILLING_ORIGIN {
2
+ PERSONAL = 'personal',
3
+ TEAM_ACCOUNT = 'team_account',
4
+ }
@@ -0,0 +1,4 @@
1
+ export enum STATISTICS_CALL_ORIGIN {
2
+ API = 'api',
3
+ WEB = 'web',
4
+ }
package/errors/errors.ts CHANGED
@@ -5218,4 +5218,31 @@ export const ERRORS = {
5218
5218
  message: "Произошла ошибка при удалении источника",
5219
5219
  },
5220
5220
  },
5221
+ TOOL_WORKSPACE_ERRORS: {
5222
+ SAVE_ERROR: {
5223
+ code: 'TOOL_WORKSPACE_SAVE_ERROR',
5224
+ httpCode: 500,
5225
+ message: 'Не удалось сохранить рабочее пространство инструмента',
5226
+ },
5227
+ FIND_ERROR: {
5228
+ code: 'TOOL_WORKSPACE_FIND_ERROR',
5229
+ httpCode: 500,
5230
+ message: 'Не удалось найти рабочее пространство инструмента',
5231
+ },
5232
+ NOT_FOUND: {
5233
+ code: 'TOOL_WORKSPACE_NOT_FOUND',
5234
+ httpCode: 404,
5235
+ message: 'Рабочее пространство инструмента не найдено',
5236
+ },
5237
+ NOT_AN_OWNER: {
5238
+ code: 'TOOL_WORKSPACE_NOT_AN_OWNER',
5239
+ httpCode: 403,
5240
+ message: 'Пользователь не является владельцем рабочего пространства инструмента',
5241
+ },
5242
+ SOFT_DELETE_ERROR: {
5243
+ code: 'TOOL_WORKSPACE_SOFT_DELETE_ERROR',
5244
+ httpCode: 500,
5245
+ message: 'Не удалось выполнить мягкое удаление рабочего пространства инструмента',
5246
+ },
5247
+ },
5221
5248
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/rugpt-lib-common",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.JOB_REQUEST_ORIGIN = void 0;
4
- var JOB_REQUEST_ORIGIN;
5
- (function (JOB_REQUEST_ORIGIN) {
6
- JOB_REQUEST_ORIGIN["API"] = "api";
7
- JOB_REQUEST_ORIGIN["B2B"] = "b2b";
8
- JOB_REQUEST_ORIGIN["TEAM_ACCOUNT"] = "team_account";
9
- })(JOB_REQUEST_ORIGIN || (exports.JOB_REQUEST_ORIGIN = JOB_REQUEST_ORIGIN = {}));
@@ -1,5 +0,0 @@
1
- export enum JOB_REQUEST_ORIGIN {
2
- API = 'api',
3
- B2B = 'b2b',
4
- TEAM_ACCOUNT = 'team_account'
5
- }