hh-contracts 0.0.63 → 0.0.65

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,45 +1,44 @@
1
1
  "use strict";
2
- // import { HttpStatus } from '@nestjs/common';
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  exports.APP_ERRORS = void 0;
5
4
  exports.APP_ERRORS = {
6
- system: {
7
- network: {
8
- statusCode: 0,
9
- code: 'SYSTEM-NETWORK',
10
- messageKey: 'errors.system.network',
11
- },
12
- timeout: {
13
- statusCode: 0,
14
- code: 'SYSTEM-TIMEOUT',
15
- messageKey: 'errors.system.timeout',
16
- },
17
- canceled: {
18
- statusCode: 0,
19
- code: 'SYSTEM-CANCELED',
20
- messageKey: 'errors.system.canceled',
21
- },
22
- badResponse: {
23
- statusCode: 0,
24
- code: 'SYSTEM-BAD_RESPONSE',
25
- messageKey: 'errors.system.badResponse',
26
- },
27
- invalidUrl: {
28
- statusCode: 0,
29
- code: 'SYSTEM-INVALID_URL',
30
- messageKey: 'errors.system.invalidUrl',
31
- },
32
- tooManyRedirects: {
33
- statusCode: 0,
34
- code: 'SYSTEM-TOO_MANY_REDIRECTS',
35
- messageKey: 'errors.system.tooManyRedirects',
36
- },
37
- unknown: {
38
- statusCode: 0,
39
- code: 'SYSTEM-UNKNOWN',
40
- messageKey: 'errors.system.unknown',
41
- },
42
- },
5
+ // system: {
6
+ // network: {
7
+ // statusCode: 0,
8
+ // code: 'SYSTEM-NETWORK',
9
+ // messageKey: 'errors.system.network',
10
+ // },
11
+ // timeout: {
12
+ // statusCode: 0,
13
+ // code: 'SYSTEM-TIMEOUT',
14
+ // messageKey: 'errors.system.timeout',
15
+ // },
16
+ // canceled: {
17
+ // statusCode: 0,
18
+ // code: 'SYSTEM-CANCELED',
19
+ // messageKey: 'errors.system.canceled',
20
+ // },
21
+ // badResponse: {
22
+ // statusCode: 0,
23
+ // code: 'SYSTEM-BAD_RESPONSE',
24
+ // messageKey: 'errors.system.badResponse',
25
+ // },
26
+ // invalidUrl: {
27
+ // statusCode: 0,
28
+ // code: 'SYSTEM-INVALID_URL',
29
+ // messageKey: 'errors.system.invalidUrl',
30
+ // },
31
+ // tooManyRedirects: {
32
+ // statusCode: 0,
33
+ // code: 'SYSTEM-TOO_MANY_REDIRECTS',
34
+ // messageKey: 'errors.system.tooManyRedirects',
35
+ // },
36
+ // unknown: {
37
+ // statusCode: 0,
38
+ // code: 'SYSTEM-UNKNOWN',
39
+ // messageKey: 'errors.system.unknown',
40
+ // },
41
+ // },
43
42
  common: {
44
43
  validation: {
45
44
  statusCode: 400, // HttpStatus.BAD_REQUEST,
@@ -131,7 +130,7 @@ exports.APP_ERRORS = {
131
130
  failed: {
132
131
  statusCode: 500, // HttpStatus.INTERNAL_SERVER_ERROR,
133
132
  code: 'TRANSLATE-01',
134
- messageKey: 'errors.translation.failed',
133
+ messageKey: 'errors.translate.failed',
135
134
  },
136
135
  },
137
136
  user: {
@@ -22,6 +22,7 @@ exports.ICON_KEYS = {
22
22
  delete: 'delete',
23
23
  search: 'search',
24
24
  language: 'language',
25
+ magic: 'magic',
25
26
  // close: 'close',
26
27
  // check: 'check',
27
28
  // closeFilled: 'closeFilled',
@@ -1,45 +1,43 @@
1
- // import { HttpStatus } from '@nestjs/common';
2
-
3
1
  import { TZodErorrKey } from './zod-error-mapping.constant';
4
2
 
5
3
  export const APP_ERRORS = {
6
- system: {
7
- network: {
8
- statusCode: 0,
9
- code: 'SYSTEM-NETWORK',
10
- messageKey: 'errors.system.network',
11
- },
12
- timeout: {
13
- statusCode: 0,
14
- code: 'SYSTEM-TIMEOUT',
15
- messageKey: 'errors.system.timeout',
16
- },
17
- canceled: {
18
- statusCode: 0,
19
- code: 'SYSTEM-CANCELED',
20
- messageKey: 'errors.system.canceled',
21
- },
22
- badResponse: {
23
- statusCode: 0,
24
- code: 'SYSTEM-BAD_RESPONSE',
25
- messageKey: 'errors.system.badResponse',
26
- },
27
- invalidUrl: {
28
- statusCode: 0,
29
- code: 'SYSTEM-INVALID_URL',
30
- messageKey: 'errors.system.invalidUrl',
31
- },
32
- tooManyRedirects: {
33
- statusCode: 0,
34
- code: 'SYSTEM-TOO_MANY_REDIRECTS',
35
- messageKey: 'errors.system.tooManyRedirects',
36
- },
37
- unknown: {
38
- statusCode: 0,
39
- code: 'SYSTEM-UNKNOWN',
40
- messageKey: 'errors.system.unknown',
41
- },
42
- },
4
+ // system: {
5
+ // network: {
6
+ // statusCode: 0,
7
+ // code: 'SYSTEM-NETWORK',
8
+ // messageKey: 'errors.system.network',
9
+ // },
10
+ // timeout: {
11
+ // statusCode: 0,
12
+ // code: 'SYSTEM-TIMEOUT',
13
+ // messageKey: 'errors.system.timeout',
14
+ // },
15
+ // canceled: {
16
+ // statusCode: 0,
17
+ // code: 'SYSTEM-CANCELED',
18
+ // messageKey: 'errors.system.canceled',
19
+ // },
20
+ // badResponse: {
21
+ // statusCode: 0,
22
+ // code: 'SYSTEM-BAD_RESPONSE',
23
+ // messageKey: 'errors.system.badResponse',
24
+ // },
25
+ // invalidUrl: {
26
+ // statusCode: 0,
27
+ // code: 'SYSTEM-INVALID_URL',
28
+ // messageKey: 'errors.system.invalidUrl',
29
+ // },
30
+ // tooManyRedirects: {
31
+ // statusCode: 0,
32
+ // code: 'SYSTEM-TOO_MANY_REDIRECTS',
33
+ // messageKey: 'errors.system.tooManyRedirects',
34
+ // },
35
+ // unknown: {
36
+ // statusCode: 0,
37
+ // code: 'SYSTEM-UNKNOWN',
38
+ // messageKey: 'errors.system.unknown',
39
+ // },
40
+ // },
43
41
  common: {
44
42
  validation: {
45
43
  statusCode: 400, // HttpStatus.BAD_REQUEST,
@@ -131,7 +129,7 @@ export const APP_ERRORS = {
131
129
  failed: {
132
130
  statusCode: 500, // HttpStatus.INTERNAL_SERVER_ERROR,
133
131
  code: 'TRANSLATE-01',
134
- messageKey: 'errors.translation.failed',
132
+ messageKey: 'errors.translate.failed',
135
133
  },
136
134
  },
137
135
  user: {
@@ -209,7 +207,7 @@ interface IError {
209
207
  messageKey: string;
210
208
  }
211
209
 
212
- type TMappedErrors<T extends Record<string, unknown>> = {
210
+ export type TMappedErrors<T extends Record<string, unknown>> = {
213
211
  [k in keyof T]: T[k] extends Record<string, unknown>
214
212
  ? T[k] extends IError
215
213
  ? T[k]
@@ -19,6 +19,7 @@ export const ICON_KEYS = {
19
19
  delete: 'delete',
20
20
  search: 'search',
21
21
  language: 'language',
22
+ magic: 'magic',
22
23
  // close: 'close',
23
24
  // check: 'check',
24
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hh-contracts",
3
- "version": "0.0.63",
3
+ "version": "0.0.65",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {