@boarteam/boar-pack-common-backend 2.1.3 → 2.3.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boarteam/boar-pack-common-backend",
3
- "version": "2.1.3",
3
+ "version": "2.3.0",
4
4
  "description": "NestJS Users module including permissions system, authentication strategies etc",
5
5
  "repository": "git@github.com:boarteam/boar-pack.git",
6
6
  "author": "Andrew Balakirev <balakirev.andrey@gmail.com>",
@@ -21,8 +21,9 @@
21
21
  "scripts": {
22
22
  "yalc:push": "yalc push"
23
23
  },
24
- "gitHead": "392553082a2f9f0124d05eaa11d0cdb6079766e1",
24
+ "gitHead": "bff974a7a00f6c4d66ffbb035f36ce9e5a7496f9",
25
25
  "dependencies": {
26
- "@nestjs/websockets": "^10.3.9"
26
+ "@nestjs/websockets": "^10.3.9",
27
+ "lossless-json": "^4.0.2"
27
28
  }
28
29
  }
@@ -0,0 +1,18 @@
1
+ // Should be synced with common-frontend/src/tools/ApiError.ts
2
+ export type TApiErrorBodyType = {
3
+ statusCode: number
4
+ message: string
5
+ errors: {
6
+ field: string,
7
+ message: string
8
+ }[]
9
+ }
10
+
11
+ // Copied from api-client/generated/core/ApiError.ts
12
+ class ApiError extends Error {
13
+ public readonly url: string;
14
+ public readonly status: number;
15
+ public readonly statusText: string;
16
+ public readonly body: TApiErrorBodyType;
17
+ public readonly request: any;
18
+ }
@@ -2,3 +2,4 @@ export * from './named-logger';
2
2
  export * from './select-query-builder.extension';
3
3
  export * from './typeorm.execption-filter';
4
4
  export * from './virtual-column.decorator';
5
+ export * from './ApiError'