@purpleschool/rugpt-lib-common 0.0.97 → 0.0.99

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,76 @@
1
1
  export declare const ERRORS: {
2
+ PARTNER_CODES: {
3
+ readonly COMPANY_DISABLED: {
4
+ readonly code: "company_disabled";
5
+ readonly message: "Компания-партнёр отключена";
6
+ readonly httpCode: 403;
7
+ };
8
+ readonly OFFER_INACTIVE: {
9
+ readonly code: "offer_inactive";
10
+ readonly message: "Предложение партнёра неактивно";
11
+ readonly httpCode: 403;
12
+ };
13
+ readonly OUTSTANDING_LIMIT: {
14
+ readonly code: "outstanding_limit";
15
+ readonly message: "Превышен лимит непогашенных кодов предложения";
16
+ readonly httpCode: 409;
17
+ };
18
+ readonly INVALID_OFFER: {
19
+ readonly code: "invalid_offer";
20
+ readonly message: "Некорректные условия предложения партнёра";
21
+ readonly httpCode: 400;
22
+ };
23
+ readonly NOT_FOUND: {
24
+ readonly code: "not_found";
25
+ readonly message: "Партнёрский ресурс не найден";
26
+ readonly httpCode: 404;
27
+ };
28
+ readonly ALREADY_ACTIVATED: {
29
+ readonly code: "already_activated";
30
+ readonly message: "Код уже активирован";
31
+ readonly httpCode: 409;
32
+ };
33
+ readonly REVOKED: {
34
+ readonly code: "revoked";
35
+ readonly message: "Код или партия отозваны";
36
+ readonly httpCode: 400;
37
+ };
38
+ readonly EXPIRED: {
39
+ readonly code: "expired";
40
+ readonly message: "Срок действия кода истёк";
41
+ readonly httpCode: 400;
42
+ };
43
+ readonly EXPORT_NOT_AUTHORIZED: {
44
+ readonly code: "export_not_authorized";
45
+ readonly message: "Выгрузка кодов не разрешена";
46
+ readonly httpCode: 403;
47
+ };
48
+ readonly FORBIDDEN: {
49
+ readonly code: "forbidden";
50
+ readonly message: "Операция с партнёрским ресурсом запрещена";
51
+ readonly httpCode: 403;
52
+ };
53
+ readonly INVALID_SNAPSHOT: {
54
+ readonly code: "invalid_snapshot";
55
+ readonly message: "Сохранённый отчёт партнёра некорректен";
56
+ readonly httpCode: 500;
57
+ };
58
+ readonly CRYPTO_NOT_CONFIGURED: {
59
+ readonly code: "crypto_not_configured";
60
+ readonly message: "Криптографические ключи партнёрских кодов не настроены";
61
+ readonly httpCode: 503;
62
+ };
63
+ readonly GENERATION_FAILED: {
64
+ readonly code: "generation_failed";
65
+ readonly message: "Не удалось сгенерировать уникальные партнёрские коды";
66
+ readonly httpCode: 500;
67
+ };
68
+ readonly OPERATION_FAILED: {
69
+ readonly code: "operation_failed";
70
+ readonly message: "Не удалось выполнить операцию с партнёрскими кодами";
71
+ readonly httpCode: 500;
72
+ };
73
+ };
2
74
  APP_LOGIN: {
3
75
  ISSUE_RATE_LIMIT: {
4
76
  code: string;
@@ -2598,6 +2670,11 @@ export declare const ERRORS: {
2598
2670
  };
2599
2671
  };
2600
2672
  PAGE: {
2673
+ TOOL_SETTINGS_INVALID: {
2674
+ code: string;
2675
+ message: string;
2676
+ httpCode: number;
2677
+ };
2601
2678
  ALIAS_CONFLICT: {
2602
2679
  code: string;
2603
2680
  httpCode: number;
@@ -2,6 +2,78 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ERRORS = void 0;
4
4
  exports.ERRORS = {
5
+ PARTNER_CODES: {
6
+ COMPANY_DISABLED: {
7
+ code: "company_disabled",
8
+ message: "Компания-партнёр отключена",
9
+ httpCode: 403,
10
+ },
11
+ OFFER_INACTIVE: {
12
+ code: "offer_inactive",
13
+ message: "Предложение партнёра неактивно",
14
+ httpCode: 403,
15
+ },
16
+ OUTSTANDING_LIMIT: {
17
+ code: "outstanding_limit",
18
+ message: "Превышен лимит непогашенных кодов предложения",
19
+ httpCode: 409,
20
+ },
21
+ INVALID_OFFER: {
22
+ code: "invalid_offer",
23
+ message: "Некорректные условия предложения партнёра",
24
+ httpCode: 400,
25
+ },
26
+ NOT_FOUND: {
27
+ code: "not_found",
28
+ message: "Партнёрский ресурс не найден",
29
+ httpCode: 404,
30
+ },
31
+ ALREADY_ACTIVATED: {
32
+ code: "already_activated",
33
+ message: "Код уже активирован",
34
+ httpCode: 409,
35
+ },
36
+ REVOKED: {
37
+ code: "revoked",
38
+ message: "Код или партия отозваны",
39
+ httpCode: 400,
40
+ },
41
+ EXPIRED: {
42
+ code: "expired",
43
+ message: "Срок действия кода истёк",
44
+ httpCode: 400,
45
+ },
46
+ EXPORT_NOT_AUTHORIZED: {
47
+ code: "export_not_authorized",
48
+ message: "Выгрузка кодов не разрешена",
49
+ httpCode: 403,
50
+ },
51
+ FORBIDDEN: {
52
+ code: "forbidden",
53
+ message: "Операция с партнёрским ресурсом запрещена",
54
+ httpCode: 403,
55
+ },
56
+ INVALID_SNAPSHOT: {
57
+ code: "invalid_snapshot",
58
+ message: "Сохранённый отчёт партнёра некорректен",
59
+ httpCode: 500,
60
+ },
61
+ CRYPTO_NOT_CONFIGURED: {
62
+ code: "crypto_not_configured",
63
+ message: "Криптографические ключи партнёрских кодов не настроены",
64
+ httpCode: 503,
65
+ },
66
+ GENERATION_FAILED: {
67
+ code: "generation_failed",
68
+ message: "Не удалось сгенерировать уникальные партнёрские коды",
69
+ httpCode: 500,
70
+ },
71
+ OPERATION_FAILED: {
72
+ code: "operation_failed",
73
+ message: "Не удалось выполнить операцию с партнёрскими кодами",
74
+ httpCode: 500,
75
+ },
76
+ },
5
77
  APP_LOGIN: {
6
78
  ISSUE_RATE_LIMIT: {
7
79
  code: "APP_LOGIN_ISSUE_RATE_LIMIT",
@@ -2601,6 +2673,11 @@ exports.ERRORS = {
2601
2673
  },
2602
2674
  },
2603
2675
  PAGE: {
2676
+ TOOL_SETTINGS_INVALID: {
2677
+ code: "PAGE.TOOL_SETTINGS_INVALID",
2678
+ message: "Некорректные настройки инструмента страницы",
2679
+ httpCode: 400,
2680
+ },
2604
2681
  ALIAS_CONFLICT: {
2605
2682
  code: "PAGE.ALIAS_CONFLICT",
2606
2683
  httpCode: 409,
@@ -1 +1,2 @@
1
1
  export * from './errors';
2
+ export * from './partner-code-error.types';
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./errors"), exports);
18
+ __exportStar(require("./partner-code-error.types"), exports);
@@ -0,0 +1,3 @@
1
+ import { ERRORS } from './errors';
2
+ export type PartnerCodeErrorDefinition = (typeof ERRORS.PARTNER_CODES)[keyof typeof ERRORS.PARTNER_CODES];
3
+ export type PartnerCodeErrorCode = PartnerCodeErrorDefinition['code'];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/rugpt-lib-common",
3
- "version": "0.0.97",
3
+ "version": "0.0.99",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",