@alanszp/access-list 19.0.0 → 20.0.1

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,11 +1,14 @@
1
+ import { EntityManager } from "typeorm";
1
2
  import { JWTUser } from "@alanszp/jwt";
2
3
  import { EnsureNull, Ensure } from "@alanszp/core";
3
4
  export declare class AccessListClient {
5
+ protected manager: EntityManager;
4
6
  organizationReference: string;
5
7
  segmentReference: string | null;
6
8
  addFormerEmployees: boolean;
7
9
  protected roles: string[];
8
- constructor({ roles, segmentReference, organizationReference, }: Pick<JWTUser, "roles" | "segmentReference" | "organizationReference">, addFormerEmployees?: boolean);
10
+ constructor(manager: EntityManager, { roles, segmentReference, organizationReference, }: Pick<JWTUser, "roles" | "segmentReference" | "organizationReference">, addFormerEmployees?: boolean);
11
+ setEntityMananger(manager: EntityManager): void;
9
12
  /**
10
13
  * If the user has no segment, it means that it has access to all employees.
11
14
  */
@@ -15,12 +15,16 @@ const accessListRepository_1 = require("../repositories/accessListRepository");
15
15
  const validations_1 = require("@alanszp/validations");
16
16
  const lodash_1 = require("lodash");
17
17
  class AccessListClient {
18
- constructor({ roles, segmentReference, organizationReference, }, addFormerEmployees) {
18
+ constructor(manager, { roles, segmentReference, organizationReference, }, addFormerEmployees) {
19
+ this.manager = manager;
19
20
  this.organizationReference = organizationReference;
20
21
  this.roles = roles;
21
22
  this.segmentReference = segmentReference;
22
23
  this.addFormerEmployees = addFormerEmployees !== null && addFormerEmployees !== void 0 ? addFormerEmployees : false;
23
24
  }
25
+ setEntityMananger(manager) {
26
+ this.manager = manager;
27
+ }
24
28
  /**
25
29
  * If the user has no segment, it means that it has access to all employees.
26
30
  */
@@ -41,7 +45,7 @@ class AccessListClient {
41
45
  hasAccessToSomeEmployees(employeeReference) {
42
46
  return __awaiter(this, void 0, void 0, function* () {
43
47
  if (this.needsToValidateAccess()) {
44
- return (0, accessListRepository_1.hasAccessToSomeEmployees)(this.segmentReference, (0, lodash_1.castArray)(employeeReference), this.shouldAddFormerEmployees());
48
+ return (0, accessListRepository_1.hasAccessToSomeEmployees)(this.manager, this.segmentReference, (0, lodash_1.castArray)(employeeReference), this.shouldAddFormerEmployees());
45
49
  }
46
50
  return true;
47
51
  });
@@ -54,7 +58,7 @@ class AccessListClient {
54
58
  whichEmployeesHasAccess(employeeReference) {
55
59
  return __awaiter(this, void 0, void 0, function* () {
56
60
  if (this.needsToValidateAccess()) {
57
- return (0, accessListRepository_1.whichEmployeesHasAccessTo)(this.segmentReference, (0, lodash_1.castArray)(employeeReference), this.shouldAddFormerEmployees());
61
+ return (0, accessListRepository_1.whichEmployeesHasAccessTo)(this.manager, this.segmentReference, (0, lodash_1.castArray)(employeeReference), this.shouldAddFormerEmployees());
58
62
  }
59
63
  return employeeReference;
60
64
  });
@@ -67,7 +71,7 @@ class AccessListClient {
67
71
  getFullAccessList() {
68
72
  return __awaiter(this, void 0, void 0, function* () {
69
73
  if (this.needsToValidateAccess()) {
70
- return (0, accessListRepository_1.getFullAccessList)(this.segmentReference, this.shouldAddFormerEmployees());
74
+ return (0, accessListRepository_1.getFullAccessList)(this.manager, this.segmentReference, this.shouldAddFormerEmployees());
71
75
  }
72
76
  return true;
73
77
  });
@@ -1 +1 @@
1
- {"version":3,"file":"AccessListClient.js","sourceRoot":"","sources":["../../src/clients/AccessListClient.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mEAAgE;AAChE,+EAI8C;AAG9C,sDAA4D;AAC5D,mCAAmC;AAEnC,MAAa,gBAAgB;IAS3B,YACE,EACE,KAAK,EACL,gBAAgB,EAChB,qBAAqB,GACiD,EACxE,kBAA4B;QAE5B,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;QACnD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,aAAlB,kBAAkB,cAAlB,kBAAk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,IAAI,CAAC,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC,EAAE;gBAChD,MAAM,IAAI,qCAAiB,EAAE,CAAC;aAC/B;QACH,CAAC;KAAA;IAED;;;OAGG;IACI,yBAAyB;QAC9B,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE;YAC1B,MAAM,kCAAoB,CAAC,IAAI,CAAC;gBAC9B,QAAQ,EAAE,kBAAkB;gBAC5B,WAAW,EAAE;oBACX,gBAAgB,EAAE,qCAAqC;iBACxD;aACF,CAAC,CAAC;SACJ;QAED,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;CACF;AAlID,4CAkIC"}
1
+ {"version":3,"file":"AccessListClient.js","sourceRoot":"","sources":["../../src/clients/AccessListClient.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,mEAAgE;AAChE,+EAI8C;AAG9C,sDAA4D;AAC5D,mCAAmC;AAEnC,MAAa,gBAAgB;IAS3B,YACY,OAAsB,EAChC,EACE,KAAK,EACL,gBAAgB,EAChB,qBAAqB,GACiD,EACxE,kBAA4B;QANlB,YAAO,GAAP,OAAO,CAAe;QAQhC,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;QACnD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;QACzC,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,aAAlB,kBAAkB,cAAlB,kBAAkB,GAAI,KAAK,CAAC;IACxD,CAAC;IAEM,iBAAiB,CAAC,OAAsB;QAC7C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED;;OAEG;IACI,cAAc;QACnB,OAAO,IAAI,CAAC,gBAAgB,KAAK,IAAI,CAAC;IACxC,CAAC;IAED;;OAEG;IACI,qBAAqB;QAC1B,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACU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G;IACI,yBAAyB;QAC9B,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE;YAC1B,MAAM,kCAAoB,CAAC,IAAI,CAAC;gBAC9B,QAAQ,EAAE,kBAAkB;gBAC5B,WAAW,EAAE;oBACX,gBAAgB,EAAE,qCAAqC;iBACxD;aACF,CAAC,CAAC;SACJ;QAED,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;CACF;AA1ID,4CA0IC"}
@@ -1,8 +1,9 @@
1
1
  import { AccessListClient } from "../clients/AccessListClient";
2
2
  import { JWTUser } from "@alanszp/jwt";
3
3
  import { BaseModel } from "@alanszp/validations";
4
+ import { EntityManager } from "typeorm";
4
5
  export declare class AccessListInput extends BaseModel {
5
6
  user: JWTUser;
6
7
  constructor(user: JWTUser);
7
- getAccessList(shouldAddFormerEmployees?: boolean): AccessListClient;
8
+ getAccessList(manager: EntityManager, shouldAddFormerEmployees?: boolean): AccessListClient;
8
9
  }
@@ -15,8 +15,8 @@ class AccessListInput extends validations_1.BaseModel {
15
15
  super();
16
16
  this.user = user;
17
17
  }
18
- getAccessList(shouldAddFormerEmployees) {
19
- return new AccessListClient_1.AccessListClient(this.user, shouldAddFormerEmployees);
18
+ getAccessList(manager, shouldAddFormerEmployees) {
19
+ return new AccessListClient_1.AccessListClient(manager, this.user, shouldAddFormerEmployees);
20
20
  }
21
21
  }
22
22
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"AccessListInput.js","sourceRoot":"","sources":["../../src/inputs/AccessListInput.ts"],"names":[],"mappings":";;;;;;;;;AAAA,kEAA+D;AAE/D,sDAAiD;AACjD,qDAA4C;AAE5C,MAAa,eAAgB,SAAQ,uBAAS;IAI5C,YAAY,IAAa;QACvB,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAEM,aAAa,CAAC,wBAAkC;QACrD,OAAO,IAAI,mCAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,wBAAwB,CAAC,CAAC;IACnE,CAAC;CACF;AAVC;IADC,IAAA,2BAAS,GAAE;6CACS;AAFvB,0CAYC"}
1
+ {"version":3,"file":"AccessListInput.js","sourceRoot":"","sources":["../../src/inputs/AccessListInput.ts"],"names":[],"mappings":";;;;;;;;;AAAA,kEAA+D;AAE/D,sDAAiD;AACjD,qDAA4C;AAG5C,MAAa,eAAgB,SAAQ,uBAAS;IAI5C,YAAY,IAAa;QACvB,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAEM,aAAa,CAClB,OAAsB,EACtB,wBAAkC;QAElC,OAAO,IAAI,mCAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,wBAAwB,CAAC,CAAC;IAC5E,CAAC;CACF;AAbC;IADC,IAAA,2BAAS,GAAE;6CACS;AAFvB,0CAeC"}
@@ -1,4 +1,4 @@
1
- import { SelectQueryBuilder } from "typeorm";
1
+ import { EntityManager, ObjectLiteral, SelectQueryBuilder } from "typeorm";
2
2
  import { AccessListClient } from "..";
3
3
  /**
4
4
  * Check access to list of employees
@@ -7,7 +7,7 @@ import { AccessListClient } from "..";
7
7
  * @param addFormerEmployees consider left employees
8
8
  * @returns true if segment reference can access to any of the employees on the list
9
9
  */
10
- export declare function hasAccessToSomeEmployees(segmentReference: string, employeeReference: string[], addFormerEmployees: boolean): Promise<boolean>;
10
+ export declare function hasAccessToSomeEmployees(manager: EntityManager, segmentReference: string, employeeReference: string[], addFormerEmployees: boolean): Promise<boolean>;
11
11
  /**
12
12
  * Check which employees the segment has access from a given list
13
13
  * @param segmentReference the segment which wants to know if it has access to the employee
@@ -15,7 +15,7 @@ export declare function hasAccessToSomeEmployees(segmentReference: string, emplo
15
15
  * @param addFormerEmployees consider left employees
16
16
  * @returns true if segment reference can access to any of the employees on the list
17
17
  */
18
- export declare function whichEmployeesHasAccessTo(segmentReference: string, employeeReference: string[], addFormerEmployees: boolean): Promise<string[]>;
18
+ export declare function whichEmployeesHasAccessTo(manager: EntityManager, segmentReference: string, employeeReference: string[], addFormerEmployees: boolean): Promise<string[]>;
19
19
  /**
20
20
  * Get the full access list of employees from a segment
21
21
  * @param segmentReference the segment which wants to know if it has access to the employee
@@ -23,7 +23,7 @@ export declare function whichEmployeesHasAccessTo(segmentReference: string, empl
23
23
  * @param addFormerEmployees consider left employees
24
24
  * @returns true if segment reference can access to any of the employees on the list
25
25
  */
26
- export declare function getFullAccessList(segmentReference: string, addFormerEmployees: boolean): Promise<string[]>;
26
+ export declare function getFullAccessList(manager: EntityManager, segmentReference: string, addFormerEmployees: boolean): Promise<string[]>;
27
27
  /**
28
28
  * Adds accessList filters to a given queryBuilder. Should be called at the end, or at least
29
29
  * after the first where is set to the queryBuilder.
@@ -32,5 +32,5 @@ export declare function getFullAccessList(segmentReference: string, addFormerEmp
32
32
  * @param fullEmployeeReferenceFieldName The alias and name of the field that has the employee reference
33
33
  * @returns a query builder with accessList filters
34
34
  */
35
- export declare function addFiltersToSelectQuery<T>(queryBuilder: SelectQueryBuilder<T>, accessList: AccessListClient, fullEmployeeReferenceFieldName: string, segmentParamAlias?: string, subTableAlias?: string, segmentReference?: string): SelectQueryBuilder<T>;
35
+ export declare function addFiltersToSelectQuery<T extends ObjectLiteral>(queryBuilder: SelectQueryBuilder<T>, accessList: AccessListClient, fullEmployeeReferenceFieldName: string, segmentParamAlias?: string, subTableAlias?: string, segmentReference?: string): SelectQueryBuilder<T>;
36
36
  export declare function getSQLJoinFilters(accessList: AccessListClient, fullEmployeeReferenceFieldName: string, segmentReferenceIndex: string, subTableAlias?: string): string;
@@ -10,7 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.getSQLJoinFilters = exports.addFiltersToSelectQuery = exports.getFullAccessList = exports.whichEmployeesHasAccessTo = exports.hasAccessToSomeEmployees = void 0;
13
- const typeorm_1 = require("typeorm");
14
13
  /**
15
14
  * Check access to list of employees
16
15
  * @param segmentReference the segment which wants to know if it has access to the employee
@@ -18,14 +17,14 @@ const typeorm_1 = require("typeorm");
18
17
  * @param addFormerEmployees consider left employees
19
18
  * @returns true if segment reference can access to any of the employees on the list
20
19
  */
21
- function hasAccessToSomeEmployees(segmentReference, employeeReference, addFormerEmployees) {
20
+ function hasAccessToSomeEmployees(manager, segmentReference, employeeReference, addFormerEmployees) {
22
21
  var _a, _b;
23
22
  return __awaiter(this, void 0, void 0, function* () {
24
23
  const query = `SELECT bool_or(true) as granted
25
24
  FROM segments_employee_relation_with_attrition ser
26
25
  WHERE ser.segment_id = $2 AND ser.employee_id::text = ANY($1)
27
26
  ${addFormerEmployees ? "" : " AND left_organization_at IS NULL"};`;
28
- const response = (yield (0, typeorm_1.getManager)().query(query, [
27
+ const response = (yield manager.query(query, [
29
28
  employeeReference,
30
29
  segmentReference,
31
30
  ]));
@@ -40,13 +39,13 @@ exports.hasAccessToSomeEmployees = hasAccessToSomeEmployees;
40
39
  * @param addFormerEmployees consider left employees
41
40
  * @returns true if segment reference can access to any of the employees on the list
42
41
  */
43
- function whichEmployeesHasAccessTo(segmentReference, employeeReference, addFormerEmployees) {
42
+ function whichEmployeesHasAccessTo(manager, segmentReference, employeeReference, addFormerEmployees) {
44
43
  return __awaiter(this, void 0, void 0, function* () {
45
44
  const query = `SELECT ser.employee_id as employee_id
46
45
  FROM segments_employee_relation_with_attrition ser
47
46
  WHERE ser.segment_id = $2 AND ser.employee_id::text = ANY($1)
48
47
  ${addFormerEmployees ? "" : " AND left_organization_at IS NULL"};`;
49
- const response = (yield (0, typeorm_1.getManager)().query(query, [
48
+ const response = (yield manager.query(query, [
50
49
  employeeReference,
51
50
  segmentReference,
52
51
  ]));
@@ -61,13 +60,13 @@ exports.whichEmployeesHasAccessTo = whichEmployeesHasAccessTo;
61
60
  * @param addFormerEmployees consider left employees
62
61
  * @returns true if segment reference can access to any of the employees on the list
63
62
  */
64
- function getFullAccessList(segmentReference, addFormerEmployees) {
63
+ function getFullAccessList(manager, segmentReference, addFormerEmployees) {
65
64
  return __awaiter(this, void 0, void 0, function* () {
66
65
  const query = `SELECT ser.employee_id as employee_id
67
66
  FROM segments_employee_relation_with_attrition ser
68
67
  WHERE ser.segment_id = $1
69
68
  ${addFormerEmployees ? "" : " AND left_organization_at IS NULL"};`;
70
- const response = (yield (0, typeorm_1.getManager)().query(query, [segmentReference]));
69
+ const response = (yield manager.query(query, [segmentReference]));
71
70
  return response.map((e) => e.employee_id);
72
71
  });
73
72
  }
@@ -1 +1 @@
1
- {"version":3,"file":"accessListRepository.js","sourceRoot":"","sources":["../../src/repositories/accessListRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAyD;AAGzD;;;;;;GAMG;AACH,SAAsB,wBAAwB,CAC5C,gBAAwB,EACxB,iBAA2B,EAC3B,kBAA2B;;;QAE3B,MAAM,KAAK,GAAG;;;MAGV,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,mCAAmC,GAAG,CAAC;QAErE,MAAM,QAAQ,GAAG,CAAC,MAAM,IAAA,oBAAU,GAAE,CAAC,KAAK,CAAC,KAAK,EAAE;YAChD,iBAAiB;YACjB,gBAAgB;SACjB,CAAC,CAA4B,CAAC;QAE/B,OAAO,MAAA,MAAA,QAAQ,CAAC,CAAC,CAAC,0CAAE,OAAO,mCAAI,KAAK,CAAC;;CACtC;AAhBD,4DAgBC;AAED;;;;;;GAMG;AACH,SAAsB,yBAAyB,CAC7C,gBAAwB,EACxB,iBAA2B,EAC3B,kBAA2B;;QAE3B,MAAM,KAAK,GAAG;;;MAGV,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,mCAAmC,GAAG,CAAC;QAErE,MAAM,QAAQ,GAAG,CAAC,MAAM,IAAA,oBAAU,GAAE,CAAC,KAAK,CAAC,KAAK,EAAE;YAChD,iBAAiB;YACjB,gBAAgB;SACjB,CAAC,CAA8B,CAAC;QA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iBAAiB,CAAC,EAAE,qBAAqB;KAC3C,CACF,CAAC;AACJ,CAAC;AAlCD,0DAkCC;AAED,SAAgB,iBAAiB,CAC/B,UAA4B,EAC5B,8BAAsC,EACtC,qBAA6B,EAC7B,aAAsB;IAEtB,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACxC,MAAM,IAAI,KAAK,CACb,kEAAkE,CACnE,CAAC;KACH;IACD,MAAM,QAAQ,GAAG,aAAa,aAAb,aAAa,cAAb,aAAa,GAAI,KAAK,CAAC;IAExC,OAAO;;yBAEgB,qBAAqB;MAExC,UAAU,CAAC,wBAAwB,EAAE;QACnC,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,kCACN,KAAK,QAAQ,OAAO,QAAQ,kBAAkB,8BAA8B,EAAE,CAAC;AACnF,CAAC;AArBD,8CAqBC"}
1
+ {"version":3,"file":"accessListRepository.js","sourceRoot":"","sources":["../../src/repositories/accessListRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA;;;;;;GAMG;AACH,SAAsB,wBAAwB,CAC5C,OAAsB,EACtB,gBAAwB,EACxB,iBAA2B,EAC3B,kBAA2B;;;QAE3B,MAAM,KAAK,GAAG;;;MAGV,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,mCAAmC,GAAG,CAAC;QAErE,MAAM,QAAQ,GAAG,CAAC,MAAM,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE;YAC3C,iBAAiB;YACjB,gBAAgB;SACjB,CAAC,CAA4B,CAAC;QAE/B,OAAO,MAAA,MAAA,QAAQ,CAAC,CAAC,CAAC,0CAAE,OAAO,mCAAI,KAAK,CAAC;;CACtC;AAjBD,4DAiBC;AAED;;;;;;GAMG;AACH,SAAsB,yBAAyB,CAC7C,OAAsB,EACtB,gBAAwB,EACxB,iBAA2B,EAC3B,kBAA2B;;QAE3B,MAAM,KAAK,GAAG;;;MAGV,kBAAkB,CAAC,CAAC,CAAC,EA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;QACnC,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,kCACN,GAAG,CAAC;IAEN,OAAO,YAAY,CAAC,SAAS,CAC3B,KAAK,EACL,QAAQ,EACR,GAAG,QAAQ,wBAAwB,8BAA8B,EAAE,EACnE;QACE,CAAC,iBAAiB,CAAC,EAAE,qBAAqB;KAC3C,CACF,CAAC;AACJ,CAAC;AAlCD,0DAkCC;AAED,SAAgB,iBAAiB,CAC/B,UAA4B,EAC5B,8BAAsC,EACtC,qBAA6B,EAC7B,aAAsB;IAEtB,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACxC,MAAM,IAAI,KAAK,CACb,kEAAkE,CACnE,CAAC;KACH;IACD,MAAM,QAAQ,GAAG,aAAa,aAAb,aAAa,cAAb,aAAa,GAAI,KAAK,CAAC;IAExC,OAAO;;yBAEgB,qBAAqB;MAExC,UAAU,CAAC,wBAAwB,EAAE;QACnC,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,kCACN,KAAK,QAAQ,OAAO,QAAQ,kBAAkB,8BAA8B,EAAE,CAAC;AACnF,CAAC;AArBD,8CAqBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alanszp/access-list",
3
- "version": "19.0.0",
3
+ "version": "20.0.1",
4
4
  "description": "Alan's validation utils.",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -20,15 +20,17 @@
20
20
  "class-validator": "^0.14.0",
21
21
  "ts-node": "^10.0.0",
22
22
  "tslint": "^6.1.3",
23
+ "typeorm": "^0.3.28",
23
24
  "typescript": "^4.3.4"
24
25
  },
25
26
  "peerDependencies": {
26
- "class-validator": "^0.14.0"
27
+ "class-validator": "^0.14.0",
28
+ "typeorm": "^0.3.28"
27
29
  },
28
30
  "dependencies": {
29
- "@alanszp/core": "^19.0.0",
30
- "@alanszp/jwt": "^19.0.0",
31
- "@alanszp/validations": "^19.0.0"
31
+ "@alanszp/core": "^20.0.1",
32
+ "@alanszp/jwt": "^20.0.1",
33
+ "@alanszp/validations": "^20.0.1"
32
34
  },
33
- "gitHead": "79498f2aade888f22fb1fb5768bdf1229762e877"
35
+ "gitHead": "76238dec1f4644fb5170f19e7ea399371bf8eeee"
34
36
  }