law-common 13.0.1-beta.3 → 13.0.1-beta.4

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,3 +1,5 @@
1
1
  import { IEntityCreateDto, IOfficeLocationEntity } from "../../entities";
2
- export interface IOfficeLocationCreateDto extends IEntityCreateDto<IOfficeLocationEntity> {
2
+ /** status is set by the entity flow, never by the client */
3
+ export type IOfficeLocationExclude = "status";
4
+ export interface IOfficeLocationCreateDto extends Omit<IEntityCreateDto<IOfficeLocationEntity>, IOfficeLocationExclude> {
3
5
  }
@@ -1,3 +1,4 @@
1
1
  import { IEntityUpdateDto, IOfficeLocationEntity } from "../../entities";
2
- export interface IOfficeLocationUpdateDto extends IEntityUpdateDto<IOfficeLocationEntity> {
2
+ import { IOfficeLocationExclude } from "./office_location.create.dto.interface";
3
+ export interface IOfficeLocationUpdateDto extends Omit<IEntityUpdateDto<IOfficeLocationEntity>, IOfficeLocationExclude> {
3
4
  }
@@ -0,0 +1,5 @@
1
+ export declare enum OfficeLocationStatusEnum {
2
+ APPROVED = "APPROVED",
3
+ DEACTIVATED = "DEACTIVATED",
4
+ DELETED = "DELETED"
5
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OfficeLocationStatusEnum = void 0;
4
+ var OfficeLocationStatusEnum;
5
+ (function (OfficeLocationStatusEnum) {
6
+ OfficeLocationStatusEnum["APPROVED"] = "APPROVED";
7
+ OfficeLocationStatusEnum["DEACTIVATED"] = "DEACTIVATED";
8
+ OfficeLocationStatusEnum["DELETED"] = "DELETED";
9
+ })(OfficeLocationStatusEnum || (exports.OfficeLocationStatusEnum = OfficeLocationStatusEnum = {}));
@@ -50,6 +50,7 @@ export * from "./interface/billing.entity.interface";
50
50
  export * from "./interface/field-constraint/billing_field_constraints.interface";
51
51
  export * from "./enums/billing_status_enum";
52
52
  export * from "./enums/billing_timesheet_change_status_enum";
53
+ export * from "./enums/office_location_status_enum";
53
54
  export * from "./interface/office_location.entity.interface";
54
55
  export * from "./interface/field-constraint/office_location_field_constraints.interface";
55
56
  export * from "./interface/bank.entity.interface";
@@ -66,6 +66,7 @@ __exportStar(require("./interface/billing.entity.interface"), exports);
66
66
  __exportStar(require("./interface/field-constraint/billing_field_constraints.interface"), exports);
67
67
  __exportStar(require("./enums/billing_status_enum"), exports);
68
68
  __exportStar(require("./enums/billing_timesheet_change_status_enum"), exports);
69
+ __exportStar(require("./enums/office_location_status_enum"), exports);
69
70
  __exportStar(require("./interface/office_location.entity.interface"), exports);
70
71
  __exportStar(require("./interface/field-constraint/office_location_field_constraints.interface"), exports);
71
72
  __exportStar(require("./interface/bank.entity.interface"), exports);
@@ -4,11 +4,13 @@ import { IFieldMinMaxConstraint } from "./utils";
4
4
  /**
5
5
  * excluded, and why:
6
6
  * - "id", keyof IEntityAuditColumn generated columns
7
+ * - "status" enum column driven by the entity flow — bounded by its allowed
8
+ * values, not by a character length
7
9
  *
8
10
  * OfficeLocationUpdateDto is a standalone class rather than a PartialType of the create DTO, so the
9
11
  * two can and do disagree — see the note on `address` below
10
12
  */
11
- export type IOfficeLocationFieldLengthConstraintsExclude = "id" | keyof IEntityAuditColumn;
13
+ export type IOfficeLocationFieldLengthConstraintsExclude = "status" | "id" | keyof IEntityAuditColumn;
12
14
  /**
13
15
  * since some fields are optional, but we still need their
14
16
  * min & max length constraints, we need to make them required in this type
@@ -1,3 +1,4 @@
1
+ import { OfficeLocationStatusEnum } from "../enums/office_location_status_enum";
1
2
  import { IEntityAuditColumn } from "./entity-audit-columns.interface";
2
3
  export interface IOfficeLocationEntity extends IEntityAuditColumn {
3
4
  id: number;
@@ -6,4 +7,5 @@ export interface IOfficeLocationEntity extends IEntityAuditColumn {
6
7
  zipCode: number;
7
8
  country: string;
8
9
  organizationId: number;
10
+ status: OfficeLocationStatusEnum;
9
11
  }
@@ -1,3 +1,4 @@
1
+ import { OfficeLocationStatusEnum } from "../enums/office_location_status_enum";
1
2
  import { EntityEnum } from "../interface/entity.utils.interface";
2
3
  import { IOfficeLocationEntity } from "../interface/office_location.entity.interface";
3
4
  import { RelationConfigs } from "../interface/relation-config.interface";
@@ -10,6 +11,7 @@ export declare class OfficeLocationEntityModel extends BaseEntityModel<EntityEnu
10
11
  address: string;
11
12
  zipCode: number;
12
13
  organizationId: number;
14
+ status: OfficeLocationStatusEnum;
13
15
  createdOn: number;
14
16
  updatedOn: number;
15
17
  createdBy: number;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OfficeLocationEntityModel = void 0;
4
+ const office_location_status_enum_1 = require("../enums/office_location_status_enum");
4
5
  const entity_utils_interface_1 = require("../interface/entity.utils.interface");
5
6
  const base_entity_model_1 = require("./base.entity.model");
6
7
  class OfficeLocationEntityModel extends base_entity_model_1.BaseEntityModel {
@@ -13,6 +14,7 @@ class OfficeLocationEntityModel extends base_entity_model_1.BaseEntityModel {
13
14
  this.address = "";
14
15
  this.zipCode = 0;
15
16
  this.organizationId = 0;
17
+ this.status = office_location_status_enum_1.OfficeLocationStatusEnum.APPROVED;
16
18
  this.createdOn = 0;
17
19
  this.updatedOn = 0;
18
20
  this.createdBy = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "law-common",
3
- "version": "13.0.1-beta.3",
3
+ "version": "13.0.1-beta.4",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [