law-common 13.0.1-beta.2 → 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.
- package/dist/src/api/interface/office_location.create.dto.interface.d.ts +3 -1
- package/dist/src/api/interface/office_location.update.dto.interface.d.ts +2 -1
- package/dist/src/entities/enums/expense_type_status_enum.d.ts +5 -0
- package/dist/src/entities/enums/expense_type_status_enum.js +9 -0
- package/dist/src/entities/enums/office_location_status_enum.d.ts +5 -0
- package/dist/src/entities/enums/office_location_status_enum.js +9 -0
- package/dist/src/entities/index.d.ts +2 -0
- package/dist/src/entities/index.js +2 -0
- package/dist/src/entities/interface/expense_type.entity.interface.d.ts +2 -0
- package/dist/src/entities/interface/field-constraint/expense_type_field_constraints.interface.d.ts +2 -2
- package/dist/src/entities/interface/field-constraint/office_location_field_constraints.interface.d.ts +3 -1
- package/dist/src/entities/interface/office_location.entity.interface.d.ts +2 -0
- package/dist/src/entities/model/expense_type.entity.model.d.ts +2 -0
- package/dist/src/entities/model/expense_type.entity.model.js +2 -0
- package/dist/src/entities/model/office_location.entity.model.d.ts +2 -0
- package/dist/src/entities/model/office_location.entity.model.js +2 -0
- package/package.json +1 -1
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { IEntityCreateDto, IOfficeLocationEntity } from "../../entities";
|
|
2
|
-
|
|
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
|
-
|
|
2
|
+
import { IOfficeLocationExclude } from "./office_location.create.dto.interface";
|
|
3
|
+
export interface IOfficeLocationUpdateDto extends Omit<IEntityUpdateDto<IOfficeLocationEntity>, IOfficeLocationExclude> {
|
|
3
4
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExpenseTypeStatusEnum = void 0;
|
|
4
|
+
var ExpenseTypeStatusEnum;
|
|
5
|
+
(function (ExpenseTypeStatusEnum) {
|
|
6
|
+
ExpenseTypeStatusEnum["APPROVED"] = "APPROVED";
|
|
7
|
+
ExpenseTypeStatusEnum["DEACTIVATED"] = "DEACTIVATED";
|
|
8
|
+
ExpenseTypeStatusEnum["DELETED"] = "DELETED";
|
|
9
|
+
})(ExpenseTypeStatusEnum || (exports.ExpenseTypeStatusEnum = ExpenseTypeStatusEnum = {}));
|
|
@@ -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 = {}));
|
|
@@ -41,6 +41,7 @@ export * from "./enums/reimbursement_status_enum";
|
|
|
41
41
|
export * from "./interface/reimbursement.entity.interface";
|
|
42
42
|
export * from "./interface/field-constraint/reimbursement_field_constraints.interface";
|
|
43
43
|
export * from "./enums/expense_type_entity_enum";
|
|
44
|
+
export * from "./enums/expense_type_status_enum";
|
|
44
45
|
export * from "./interface/expense_type.entity.interface";
|
|
45
46
|
export * from "./interface/field-constraint/expense_type_field_constraints.interface";
|
|
46
47
|
export * from "./enums/billing_impact_enum";
|
|
@@ -49,6 +50,7 @@ export * from "./interface/billing.entity.interface";
|
|
|
49
50
|
export * from "./interface/field-constraint/billing_field_constraints.interface";
|
|
50
51
|
export * from "./enums/billing_status_enum";
|
|
51
52
|
export * from "./enums/billing_timesheet_change_status_enum";
|
|
53
|
+
export * from "./enums/office_location_status_enum";
|
|
52
54
|
export * from "./interface/office_location.entity.interface";
|
|
53
55
|
export * from "./interface/field-constraint/office_location_field_constraints.interface";
|
|
54
56
|
export * from "./interface/bank.entity.interface";
|
|
@@ -57,6 +57,7 @@ __exportStar(require("./enums/reimbursement_status_enum"), exports);
|
|
|
57
57
|
__exportStar(require("./interface/reimbursement.entity.interface"), exports);
|
|
58
58
|
__exportStar(require("./interface/field-constraint/reimbursement_field_constraints.interface"), exports);
|
|
59
59
|
__exportStar(require("./enums/expense_type_entity_enum"), exports);
|
|
60
|
+
__exportStar(require("./enums/expense_type_status_enum"), exports);
|
|
60
61
|
__exportStar(require("./interface/expense_type.entity.interface"), exports);
|
|
61
62
|
__exportStar(require("./interface/field-constraint/expense_type_field_constraints.interface"), exports);
|
|
62
63
|
__exportStar(require("./enums/billing_impact_enum"), exports);
|
|
@@ -65,6 +66,7 @@ __exportStar(require("./interface/billing.entity.interface"), exports);
|
|
|
65
66
|
__exportStar(require("./interface/field-constraint/billing_field_constraints.interface"), exports);
|
|
66
67
|
__exportStar(require("./enums/billing_status_enum"), exports);
|
|
67
68
|
__exportStar(require("./enums/billing_timesheet_change_status_enum"), exports);
|
|
69
|
+
__exportStar(require("./enums/office_location_status_enum"), exports);
|
|
68
70
|
__exportStar(require("./interface/office_location.entity.interface"), exports);
|
|
69
71
|
__exportStar(require("./interface/field-constraint/office_location_field_constraints.interface"), exports);
|
|
70
72
|
__exportStar(require("./interface/bank.entity.interface"), exports);
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { ExpenseTypeEnum } from "../enums/expense_type_entity_enum";
|
|
2
|
+
import { ExpenseTypeStatusEnum } from "../enums/expense_type_status_enum";
|
|
2
3
|
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
3
4
|
export interface IExpenseTypeEntity extends IEntityAuditColumn {
|
|
4
5
|
id: number;
|
|
5
6
|
name: string;
|
|
6
7
|
description?: string;
|
|
7
8
|
type: ExpenseTypeEnum;
|
|
9
|
+
status: ExpenseTypeStatusEnum;
|
|
8
10
|
}
|
package/dist/src/entities/interface/field-constraint/expense_type_field_constraints.interface.d.ts
CHANGED
|
@@ -3,13 +3,13 @@ import { IExpenseTypeEntity } from "../expense_type.entity.interface";
|
|
|
3
3
|
import { IFieldMinMaxConstraint } from "./utils";
|
|
4
4
|
/**
|
|
5
5
|
* excluded, and why:
|
|
6
|
-
* - "type"
|
|
6
|
+
* - "type", "status" enum columns, enums carry no min/max
|
|
7
7
|
* - "id", keyof IEntityAuditColumn generated columns
|
|
8
8
|
*
|
|
9
9
|
* this entity has a create DTO only — there is no ExpenseTypeUpdateDto, so no
|
|
10
10
|
* create/update disagreement is possible
|
|
11
11
|
*/
|
|
12
|
-
export type IExpenseTypeFieldLengthConstraintsExclude = "type" | "id" | keyof IEntityAuditColumn;
|
|
12
|
+
export type IExpenseTypeFieldLengthConstraintsExclude = "status" | "type" | "id" | keyof IEntityAuditColumn;
|
|
13
13
|
/**
|
|
14
14
|
* since some fields are optional, but we still need their
|
|
15
15
|
* min & max length constraints, we need to make them required in this type
|
|
@@ -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,4 +1,5 @@
|
|
|
1
1
|
import { ExpenseTypeEnum } from "../enums/expense_type_entity_enum";
|
|
2
|
+
import { ExpenseTypeStatusEnum } from "../enums/expense_type_status_enum";
|
|
2
3
|
import { EntityEnum } from "../interface/entity.utils.interface";
|
|
3
4
|
import { IExpenseTypeEntity } from "../interface/expense_type.entity.interface";
|
|
4
5
|
import { RelationConfigs } from "../interface/relation-config.interface";
|
|
@@ -8,6 +9,7 @@ export declare class ExpenseTypeEntityModel extends BaseEntityModel<EntityEnum.E
|
|
|
8
9
|
name: string;
|
|
9
10
|
description?: string;
|
|
10
11
|
type: ExpenseTypeEnum;
|
|
12
|
+
status: ExpenseTypeStatusEnum;
|
|
11
13
|
createdOn: number;
|
|
12
14
|
updatedOn: number;
|
|
13
15
|
createdBy: number;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ExpenseTypeEntityModel = void 0;
|
|
4
4
|
const expense_type_entity_enum_1 = require("../enums/expense_type_entity_enum");
|
|
5
|
+
const expense_type_status_enum_1 = require("../enums/expense_type_status_enum");
|
|
5
6
|
const entity_utils_interface_1 = require("../interface/entity.utils.interface");
|
|
6
7
|
const base_entity_model_1 = require("./base.entity.model");
|
|
7
8
|
class ExpenseTypeEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
@@ -10,6 +11,7 @@ class ExpenseTypeEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
10
11
|
this.id = 0;
|
|
11
12
|
this.name = "";
|
|
12
13
|
this.type = expense_type_entity_enum_1.ExpenseTypeEnum.BILLABLE;
|
|
14
|
+
this.status = expense_type_status_enum_1.ExpenseTypeStatusEnum.APPROVED;
|
|
13
15
|
this.createdOn = 0;
|
|
14
16
|
this.updatedOn = 0;
|
|
15
17
|
this.createdBy = 0;
|
|
@@ -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;
|