law-common 14.0.9 → 14.0.10-beta.2
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/index.d.ts +2 -6
- package/dist/src/api/index.js +18 -6
- package/dist/src/api/v1/index.d.ts +13 -0
- package/dist/src/api/v1/index.js +29 -0
- package/dist/src/api/{interface → v1/interface}/expense_type.create.dto.interface.d.ts +1 -1
- package/dist/src/api/{interface → v1/interface}/expense_type.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{interface → v1/interface}/office_location.create.dto.interface.d.ts +1 -1
- package/dist/src/api/{interface → v1/interface}/office_location.update.dto.interface.d.ts +1 -1
- package/dist/src/api/{interface → v1/interface}/to_do_list.create.dto.interface.d.ts +1 -1
- package/dist/src/api/{interface → v1/interface}/to_do_list.update.dto.interface.d.ts +1 -1
- package/dist/src/api/v2/index.d.ts +15 -0
- package/dist/src/api/v2/index.js +33 -0
- package/dist/src/api/v2/interface/expense_type.create.dto.interface.d.ts +5 -0
- package/dist/src/api/v2/interface/expense_type.create.dto.interface.js +2 -0
- package/dist/src/api/v2/interface/expense_type.update.dto.interface.d.ts +12 -0
- package/dist/src/api/v2/interface/expense_type.update.dto.interface.js +2 -0
- package/dist/src/api/v2/interface/office_location.create.dto.interface.d.ts +15 -0
- package/dist/src/api/v2/interface/office_location.create.dto.interface.js +2 -0
- package/dist/src/api/v2/interface/office_location.update.dto.interface.d.ts +13 -0
- package/dist/src/api/v2/interface/office_location.update.dto.interface.js +2 -0
- package/dist/src/api/v2/interface/to_do_list.create.dto.interface.d.ts +5 -0
- package/dist/src/api/v2/interface/to_do_list.create.dto.interface.js +2 -0
- package/dist/src/api/v2/interface/to_do_list.update.dto.interface.d.ts +12 -0
- package/dist/src/api/v2/interface/to_do_list.update.dto.interface.js +2 -0
- package/dist/src/entities/flow-configs/expense_type_flow.config.d.ts +1 -1
- package/dist/src/entities/flow-configs/expense_type_flow.config.js +21 -21
- package/dist/src/entities/flow-configs/to_do_list_flow.config.js +5 -5
- package/dist/src/entities/index.d.ts +2 -1
- package/dist/src/entities/index.js +2 -1
- package/dist/src/entities/interface/expense_type.entity.interface.d.ts +3 -2
- package/dist/src/entities/interface/field-constraint/expense_type_field_constraints.interface.d.ts +0 -8
- package/dist/src/entities/interface/field-constraint/office_location_address_field_constraints.interface.d.ts +13 -0
- package/dist/src/entities/interface/field-constraint/office_location_address_field_constraints.interface.js +17 -0
- package/dist/src/entities/interface/field-constraint/office_location_field_constraints.interface.d.ts +0 -9
- package/dist/src/entities/interface/field-constraint/office_location_field_constraints.interface.js +4 -13
- package/dist/src/entities/interface/field-constraint/to_do_list_field_constraints.interface.d.ts +0 -7
- package/dist/src/entities/interface/field-constraint/to_do_list_field_constraints.interface.js +10 -16
- package/dist/src/entities/interface/to_do_list.entity.interface.d.ts +2 -2
- package/dist/src/entities/model/base.entity.model.js +7 -17
- package/dist/src/entities/model/expense_type.entity.model.d.ts +7 -7
- package/dist/src/entities/model/expense_type.entity.model.js +6 -6
- package/dist/src/entities/model/office_location.entity.model.d.ts +64 -8
- package/dist/src/entities/model/office_location.entity.model.js +393 -6
- package/dist/src/entities/model/to_do_list.entity.model.d.ts +65 -11
- package/dist/src/entities/model/to_do_list.entity.model.js +385 -15
- package/dist/src/entities/model/user.entity.model.d.ts +4 -0
- package/dist/src/entities/model/user.entity.model.js +17 -0
- package/dist/src/index.js +7 -17
- package/dist/src/utils/helper.fn.util.d.ts +2 -2
- package/package.json +1 -1
- /package/dist/src/api/{interface → v1/interface}/expense_type.create.dto.interface.js +0 -0
- /package/dist/src/api/{interface → v1/interface}/expense_type.update.dto.interface.js +0 -0
- /package/dist/src/api/{interface → v1/interface}/office_location.create.dto.interface.js +0 -0
- /package/dist/src/api/{interface → v1/interface}/office_location.update.dto.interface.js +0 -0
- /package/dist/src/api/{interface → v1/interface}/to_do_list.create.dto.interface.js +0 -0
- /package/dist/src/api/{interface → v1/interface}/to_do_list.update.dto.interface.js +0 -0
- /package/dist/src/entities/enums/{expense_type_entity_enum.d.ts → expense_type_enum.d.ts} +0 -0
- /package/dist/src/entities/enums/{expense_type_entity_enum.js → expense_type_enum.js} +0 -0
package/dist/src/api/index.d.ts
CHANGED
|
@@ -20,8 +20,6 @@ export * from "./interface/reimbursement_expense.update.dto.interface";
|
|
|
20
20
|
export * from "./interface/billing_reimbursement_expense.create.dto.interface";
|
|
21
21
|
export * from "./interface/billing_reimbursement_expense.filter.dto.interface";
|
|
22
22
|
export * from "./interface/billing_reimbursement_expense.update.dto.interface";
|
|
23
|
-
export * from "./interface/expense_type.create.dto.interface";
|
|
24
|
-
export * from "./interface/expense_type.update.dto.interface";
|
|
25
23
|
export * from "./interface/expense_type.entity.response";
|
|
26
24
|
export * from "./interface/billing.create.dto.interface";
|
|
27
25
|
export * from "./interface/billing_particular_line_item.create.dto.interface";
|
|
@@ -37,10 +35,8 @@ export * from "./interface/billing_timesheet.details.dto.interface";
|
|
|
37
35
|
export * from "./interface/billing_timesheet.filter.dto.interface";
|
|
38
36
|
export * from "./interface/billing_timesheet.update.dto.interface";
|
|
39
37
|
export * from "./interface/billing.entity.response";
|
|
40
|
-
export * from "./interface/office_location.create.dto.interface";
|
|
41
38
|
export * from "./interface/office_location.entity.response";
|
|
42
39
|
export * from "./interface/office_location.filter.dto.interface";
|
|
43
|
-
export * from "./interface/office_location.update.dto.interface";
|
|
44
40
|
export * from "./interface/organization.filter.dto.interface";
|
|
45
41
|
export * from "./interface/billing.update.dto.interface";
|
|
46
42
|
export * from "./interface/moving_timesheet.create.dto.interface";
|
|
@@ -80,9 +76,7 @@ export * from "./interface/leave.create.dto.interface";
|
|
|
80
76
|
export * from "./interface/leave.update.dto.interface";
|
|
81
77
|
export * from "./interface/cron_jobs.entity.response";
|
|
82
78
|
export * from "./interface/cron_jobs_manual_trigger.dto.interface";
|
|
83
|
-
export * from "./interface/to_do_list.create.dto.interface";
|
|
84
79
|
export * from "./interface/to_do_list.filter.dto.interface";
|
|
85
|
-
export * from "./interface/to_do_list.update.dto.interface";
|
|
86
80
|
export * from "./interface/project_user_mapping.create.dto.interface";
|
|
87
81
|
export * from "./interface/project_user_mapping.filter.dto.interface";
|
|
88
82
|
export * from "./interface/project_user_mapping.update.dto.interface";
|
|
@@ -177,3 +171,5 @@ export * from "./interface/bank.filter.dto.interface";
|
|
|
177
171
|
export * from "./interface/intermediary_bank.create.dto.interface";
|
|
178
172
|
export * from "./interface/intermediary_bank.filter.dto.interface";
|
|
179
173
|
export * from "./interface/intermediary_bank.update.dto.interface";
|
|
174
|
+
export * as v1 from "./v1";
|
|
175
|
+
export * as v2 from "./v2";
|
package/dist/src/api/index.js
CHANGED
|
@@ -10,10 +10,23 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
11
|
o[k2] = m[k];
|
|
12
12
|
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
13
18
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
19
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
20
|
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
16
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.v2 = exports.v1 = void 0;
|
|
17
30
|
__exportStar(require("./interface/base.response.interface"), exports);
|
|
18
31
|
__exportStar(require("./interface/jwt.payload.interface"), exports);
|
|
19
32
|
__exportStar(require("./interface/login.response.interface"), exports);
|
|
@@ -36,8 +49,6 @@ __exportStar(require("./interface/reimbursement_expense.update.dto.interface"),
|
|
|
36
49
|
__exportStar(require("./interface/billing_reimbursement_expense.create.dto.interface"), exports);
|
|
37
50
|
__exportStar(require("./interface/billing_reimbursement_expense.filter.dto.interface"), exports);
|
|
38
51
|
__exportStar(require("./interface/billing_reimbursement_expense.update.dto.interface"), exports);
|
|
39
|
-
__exportStar(require("./interface/expense_type.create.dto.interface"), exports);
|
|
40
|
-
__exportStar(require("./interface/expense_type.update.dto.interface"), exports);
|
|
41
52
|
__exportStar(require("./interface/expense_type.entity.response"), exports);
|
|
42
53
|
__exportStar(require("./interface/billing.create.dto.interface"), exports);
|
|
43
54
|
__exportStar(require("./interface/billing_particular_line_item.create.dto.interface"), exports);
|
|
@@ -53,10 +64,8 @@ __exportStar(require("./interface/billing_timesheet.details.dto.interface"), exp
|
|
|
53
64
|
__exportStar(require("./interface/billing_timesheet.filter.dto.interface"), exports);
|
|
54
65
|
__exportStar(require("./interface/billing_timesheet.update.dto.interface"), exports);
|
|
55
66
|
__exportStar(require("./interface/billing.entity.response"), exports);
|
|
56
|
-
__exportStar(require("./interface/office_location.create.dto.interface"), exports);
|
|
57
67
|
__exportStar(require("./interface/office_location.entity.response"), exports);
|
|
58
68
|
__exportStar(require("./interface/office_location.filter.dto.interface"), exports);
|
|
59
|
-
__exportStar(require("./interface/office_location.update.dto.interface"), exports);
|
|
60
69
|
__exportStar(require("./interface/organization.filter.dto.interface"), exports);
|
|
61
70
|
__exportStar(require("./interface/billing.update.dto.interface"), exports);
|
|
62
71
|
__exportStar(require("./interface/moving_timesheet.create.dto.interface"), exports);
|
|
@@ -96,9 +105,7 @@ __exportStar(require("./interface/leave.create.dto.interface"), exports);
|
|
|
96
105
|
__exportStar(require("./interface/leave.update.dto.interface"), exports);
|
|
97
106
|
__exportStar(require("./interface/cron_jobs.entity.response"), exports);
|
|
98
107
|
__exportStar(require("./interface/cron_jobs_manual_trigger.dto.interface"), exports);
|
|
99
|
-
__exportStar(require("./interface/to_do_list.create.dto.interface"), exports);
|
|
100
108
|
__exportStar(require("./interface/to_do_list.filter.dto.interface"), exports);
|
|
101
|
-
__exportStar(require("./interface/to_do_list.update.dto.interface"), exports);
|
|
102
109
|
// export * from "./interface/billing-reimbursement-expense.api";
|
|
103
110
|
// export * from "./interface/billing-reimbursement-expense-history.api";
|
|
104
111
|
__exportStar(require("./interface/project_user_mapping.create.dto.interface"), exports);
|
|
@@ -195,3 +202,8 @@ __exportStar(require("./interface/bank.filter.dto.interface"), exports);
|
|
|
195
202
|
__exportStar(require("./interface/intermediary_bank.create.dto.interface"), exports);
|
|
196
203
|
__exportStar(require("./interface/intermediary_bank.filter.dto.interface"), exports);
|
|
197
204
|
__exportStar(require("./interface/intermediary_bank.update.dto.interface"), exports);
|
|
205
|
+
// Versioned contracts (checklist 12.4). Namespace re-exports only - never `export *` flat from
|
|
206
|
+
// v1 or v2: flat-exporting both is a duplicate-export error, and flat-exporting one reintroduces
|
|
207
|
+
// the ambiguity the fork exists to remove.
|
|
208
|
+
exports.v1 = __importStar(require("./v1"));
|
|
209
|
+
exports.v2 = __importStar(require("./v2"));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* api/v1 - FROZEN legacy contracts.
|
|
3
|
+
*
|
|
4
|
+
* Interfaces here serve routes that outlive the flow migration. They are hand-written and the
|
|
5
|
+
* generator never writes to this directory (checklist 12.4). An entity appears either in
|
|
6
|
+
* api/interface/ or in v1 + v2 - never both.
|
|
7
|
+
*/
|
|
8
|
+
export * from "./interface/expense_type.create.dto.interface";
|
|
9
|
+
export * from "./interface/expense_type.update.dto.interface";
|
|
10
|
+
export * from "./interface/office_location.create.dto.interface";
|
|
11
|
+
export * from "./interface/office_location.update.dto.interface";
|
|
12
|
+
export * from "./interface/to_do_list.create.dto.interface";
|
|
13
|
+
export * from "./interface/to_do_list.update.dto.interface";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/**
|
|
18
|
+
* api/v1 - FROZEN legacy contracts.
|
|
19
|
+
*
|
|
20
|
+
* Interfaces here serve routes that outlive the flow migration. They are hand-written and the
|
|
21
|
+
* generator never writes to this directory (checklist 12.4). An entity appears either in
|
|
22
|
+
* api/interface/ or in v1 + v2 - never both.
|
|
23
|
+
*/
|
|
24
|
+
__exportStar(require("./interface/expense_type.create.dto.interface"), exports);
|
|
25
|
+
__exportStar(require("./interface/expense_type.update.dto.interface"), exports);
|
|
26
|
+
__exportStar(require("./interface/office_location.create.dto.interface"), exports);
|
|
27
|
+
__exportStar(require("./interface/office_location.update.dto.interface"), exports);
|
|
28
|
+
__exportStar(require("./interface/to_do_list.create.dto.interface"), exports);
|
|
29
|
+
__exportStar(require("./interface/to_do_list.update.dto.interface"), exports);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IEntityCreateDto, IOfficeLocationEntity } from "
|
|
1
|
+
import { IEntityCreateDto, IOfficeLocationEntity } from "../../../entities";
|
|
2
2
|
/** status is set by the entity flow, never by the client */
|
|
3
3
|
export type IOfficeLocationCreateExclude = "status";
|
|
4
4
|
export interface IOfficeLocationCreateDto extends Omit<IEntityCreateDto<IOfficeLocationEntity>, IOfficeLocationCreateExclude> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IEntityUpdateDto, IOfficeLocationEntity } from "
|
|
1
|
+
import { IEntityUpdateDto, IOfficeLocationEntity } from "../../../entities";
|
|
2
2
|
import { IOfficeLocationCreateExclude } from "./office_location.create.dto.interface";
|
|
3
3
|
export interface IOfficeLocationUpdateDto extends Omit<IEntityUpdateDto<IOfficeLocationEntity>, IOfficeLocationCreateExclude> {
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IEntityCreateDto, IToDoListEntity } from "
|
|
1
|
+
import { IEntityCreateDto, IToDoListEntity } from "../../../entities";
|
|
2
2
|
/** status is set by the entity flow, never by the client */
|
|
3
3
|
export type IToDoListCreateExclude = "status";
|
|
4
4
|
export interface IToDoListCreateDto extends Omit<IEntityCreateDto<IToDoListEntity>, IToDoListCreateExclude> {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IEntityUpdateDto, IToDoListEntity } from "
|
|
1
|
+
import { IEntityUpdateDto, IToDoListEntity } from "../../../entities";
|
|
2
2
|
import { IToDoListCreateExclude } from "./to_do_list.create.dto.interface";
|
|
3
3
|
export interface IToDoListUpdateDto extends Omit<IEntityUpdateDto<IToDoListEntity>, IToDoListCreateExclude> {
|
|
4
4
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* api/v2 - the new flow contracts.
|
|
3
|
+
*
|
|
4
|
+
* Intentionally empty: to_do_list's v2 create/update DTO interfaces are generated, not hand-written,
|
|
5
|
+
* and have not been generated yet. The generator writes them to api/v2/interface/ (checklist 12.4,
|
|
6
|
+
* and 9.1 rows 4 and 7).
|
|
7
|
+
*
|
|
8
|
+
* The empty export keeps this a module so `export * as v2` in api/index.ts resolves.
|
|
9
|
+
*/
|
|
10
|
+
export * from "./interface/to_do_list.create.dto.interface";
|
|
11
|
+
export * from "./interface/to_do_list.update.dto.interface";
|
|
12
|
+
export * from "./interface/expense_type.create.dto.interface";
|
|
13
|
+
export * from "./interface/expense_type.update.dto.interface";
|
|
14
|
+
export * from "./interface/office_location.create.dto.interface";
|
|
15
|
+
export * from "./interface/office_location.update.dto.interface";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* api/v2 - the new flow contracts.
|
|
4
|
+
*
|
|
5
|
+
* Intentionally empty: to_do_list's v2 create/update DTO interfaces are generated, not hand-written,
|
|
6
|
+
* and have not been generated yet. The generator writes them to api/v2/interface/ (checklist 12.4,
|
|
7
|
+
* and 9.1 rows 4 and 7).
|
|
8
|
+
*
|
|
9
|
+
* The empty export keeps this a module so `export * as v2` in api/index.ts resolves.
|
|
10
|
+
*/
|
|
11
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
12
|
+
if (k2 === undefined) k2 = k;
|
|
13
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
14
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
15
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
16
|
+
}
|
|
17
|
+
Object.defineProperty(o, k2, desc);
|
|
18
|
+
}) : (function(o, m, k, k2) {
|
|
19
|
+
if (k2 === undefined) k2 = k;
|
|
20
|
+
o[k2] = m[k];
|
|
21
|
+
}));
|
|
22
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
23
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
// export {
|
|
27
|
+
// };
|
|
28
|
+
__exportStar(require("./interface/to_do_list.create.dto.interface"), exports);
|
|
29
|
+
__exportStar(require("./interface/to_do_list.update.dto.interface"), exports);
|
|
30
|
+
__exportStar(require("./interface/expense_type.create.dto.interface"), exports);
|
|
31
|
+
__exportStar(require("./interface/expense_type.update.dto.interface"), exports);
|
|
32
|
+
__exportStar(require("./interface/office_location.create.dto.interface"), exports);
|
|
33
|
+
__exportStar(require("./interface/office_location.update.dto.interface"), exports);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IEntityCreateDto } from "../../../entities";
|
|
2
|
+
import { IExpenseTypeEntity } from "../../../entities/interface/expense_type.entity.interface";
|
|
3
|
+
export type IExpenseTypeCreateExclude = "status";
|
|
4
|
+
export interface IExpenseTypeCreateDto extends Omit<IEntityCreateDto<IExpenseTypeEntity>, IExpenseTypeCreateExclude> {
|
|
5
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DeepPartialButRequired } from "../../interface/api.utils.interface";
|
|
2
|
+
import { ExpenseTypeActionEnum } from "../../../entities";
|
|
3
|
+
import { IExpenseTypeCreateDto } from "./expense_type.create.dto.interface";
|
|
4
|
+
export type IExpenseTypeUpdateDto = DeepPartialButRequired<IExpenseTypeCreateDto, never> & {
|
|
5
|
+
actionData: IExpenseTypeActionDataDto;
|
|
6
|
+
} & {
|
|
7
|
+
id?: number;
|
|
8
|
+
};
|
|
9
|
+
export interface IExpenseTypeActionDataDto {
|
|
10
|
+
action: ExpenseTypeActionEnum;
|
|
11
|
+
remark?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IEntityCreateDto, Nullable } from "../../../entities";
|
|
2
|
+
import { IOfficeLocationEntity } from "../../../entities/interface/office_location.entity.interface";
|
|
3
|
+
export interface IOfficeLocationAddress {
|
|
4
|
+
addressLine1: string;
|
|
5
|
+
addressLine2?: Nullable<string>;
|
|
6
|
+
city: string;
|
|
7
|
+
state: string;
|
|
8
|
+
}
|
|
9
|
+
export type IOfficeLocationAddressCreateExclude = never;
|
|
10
|
+
export interface IOfficeLocationAddressCreateDto extends Omit<IEntityCreateDto<IOfficeLocationAddress>, IOfficeLocationAddressCreateExclude> {
|
|
11
|
+
}
|
|
12
|
+
export type IOfficeLocationCreateExclude = "address" | "organizationId" | "status";
|
|
13
|
+
export interface IOfficeLocationCreateDto extends Omit<IEntityCreateDto<IOfficeLocationEntity>, IOfficeLocationCreateExclude> {
|
|
14
|
+
address: IOfficeLocationAddressCreateDto;
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DeepPartialButRequired } from "../../interface/api.utils.interface";
|
|
2
|
+
import { OfficeLocationActionEnum } from "../../../entities";
|
|
3
|
+
import { IOfficeLocationAddressCreateDto, IOfficeLocationCreateDto } from "./office_location.create.dto.interface";
|
|
4
|
+
export type IOfficeLocationAddressUpdateDto = DeepPartialButRequired<IOfficeLocationAddressCreateDto, never>;
|
|
5
|
+
export type IOfficeLocationUpdateDto = DeepPartialButRequired<IOfficeLocationCreateDto, never> & {
|
|
6
|
+
actionData: IOfficeLocationActionDataDto;
|
|
7
|
+
} & {
|
|
8
|
+
id?: number;
|
|
9
|
+
};
|
|
10
|
+
export interface IOfficeLocationActionDataDto {
|
|
11
|
+
action: OfficeLocationActionEnum;
|
|
12
|
+
remark?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IEntityCreateDto } from "../../../entities";
|
|
2
|
+
import { IToDoListEntity } from "../../../entities/interface/to_do_list.entity.interface";
|
|
3
|
+
export type IToDoListCreateExclude = "status";
|
|
4
|
+
export interface IToDoListCreateDto extends Omit<IEntityCreateDto<IToDoListEntity>, IToDoListCreateExclude> {
|
|
5
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DeepPartialButRequired } from "../../interface/api.utils.interface";
|
|
2
|
+
import { ToDoListActionEnum } from "../../../entities";
|
|
3
|
+
import { IToDoListCreateDto } from "./to_do_list.create.dto.interface";
|
|
4
|
+
export type IToDoListUpdateDto = DeepPartialButRequired<IToDoListCreateDto, never> & {
|
|
5
|
+
actionData: IToDoListActionDataDto;
|
|
6
|
+
} & {
|
|
7
|
+
id?: number;
|
|
8
|
+
};
|
|
9
|
+
export interface IToDoListActionDataDto {
|
|
10
|
+
action: ToDoListActionEnum;
|
|
11
|
+
remark?: string;
|
|
12
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FlowConfig } from "./flow-config.type";
|
|
2
|
-
import { ExpenseTypeActionEnum } from "
|
|
2
|
+
import { ExpenseTypeActionEnum } from "../../entities";
|
|
3
3
|
import { ExpenseTypeStatusEnum } from "../enums/expense_type_status_enum";
|
|
4
4
|
export interface IExpenseTypeFlowConfigContextData {
|
|
5
5
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.expenseTypeFlowConfig = void 0;
|
|
4
4
|
const base_flow_config_factory_1 = require("./base-flow-config.factory");
|
|
5
|
-
const
|
|
5
|
+
const entities_1 = require("../../entities");
|
|
6
6
|
const expense_type_status_enum_1 = require("../enums/expense_type_status_enum");
|
|
7
7
|
const EXPENSE_TYPE_CREATE_PERMISSION = ["EXPENSE_TYPE_CREATE"];
|
|
8
8
|
const EXPENSE_TYPE_UPDATE_PERMISSION = ["EXPENSE_TYPE_UPDATE"];
|
|
@@ -11,60 +11,60 @@ const EXPENSE_TYPE_DEACTIVATE_PERMISSION = ["EXPENSE_TYPE_DEACTIVATE"];
|
|
|
11
11
|
const EXPENSE_TYPE_ACTIVATE_PERMISSION = ["EXPENSE_TYPE_ACTIVATE"];
|
|
12
12
|
const EXPENSE_TYPE_RESTORE_PERMISSION = ["EXPENSE_TYPE_RESTORE"];
|
|
13
13
|
const ACTION_MAP = {
|
|
14
|
-
[
|
|
14
|
+
[entities_1.ExpenseTypeActionEnum.CREATE]: {
|
|
15
15
|
reachableStatues: [expense_type_status_enum_1.ExpenseTypeStatusEnum.APPROVED],
|
|
16
16
|
permissions: EXPENSE_TYPE_CREATE_PERMISSION,
|
|
17
17
|
},
|
|
18
|
-
[
|
|
18
|
+
[entities_1.ExpenseTypeActionEnum.UPDATE]: {
|
|
19
19
|
reachableStatues: [expense_type_status_enum_1.ExpenseTypeStatusEnum.APPROVED],
|
|
20
20
|
permissions: EXPENSE_TYPE_UPDATE_PERMISSION,
|
|
21
21
|
},
|
|
22
|
-
[
|
|
22
|
+
[entities_1.ExpenseTypeActionEnum.DELETE]: {
|
|
23
23
|
reachableStatues: [expense_type_status_enum_1.ExpenseTypeStatusEnum.DELETED],
|
|
24
24
|
permissions: EXPENSE_TYPE_DELETE_PERMISSION,
|
|
25
25
|
},
|
|
26
|
-
[
|
|
26
|
+
[entities_1.ExpenseTypeActionEnum.DEACTIVATE]: {
|
|
27
27
|
reachableStatues: [expense_type_status_enum_1.ExpenseTypeStatusEnum.DEACTIVATED],
|
|
28
28
|
permissions: EXPENSE_TYPE_DEACTIVATE_PERMISSION,
|
|
29
29
|
},
|
|
30
|
-
[
|
|
30
|
+
[entities_1.ExpenseTypeActionEnum.ACTIVATE]: {
|
|
31
31
|
reachableStatues: [expense_type_status_enum_1.ExpenseTypeStatusEnum.APPROVED],
|
|
32
32
|
permissions: EXPENSE_TYPE_ACTIVATE_PERMISSION,
|
|
33
33
|
},
|
|
34
|
-
[
|
|
34
|
+
[entities_1.ExpenseTypeActionEnum.RESTORE]: {
|
|
35
35
|
reachableStatues: [expense_type_status_enum_1.ExpenseTypeStatusEnum.APPROVED],
|
|
36
36
|
permissions: EXPENSE_TYPE_RESTORE_PERMISSION,
|
|
37
37
|
},
|
|
38
38
|
};
|
|
39
39
|
const { createActionConfig } = (0, base_flow_config_factory_1.createFlowConfigFactory)()(ACTION_MAP);
|
|
40
40
|
// APPROVED status transitions
|
|
41
|
-
const transitionApprovedStatusUpdateAction = createActionConfig(
|
|
42
|
-
const transitionApprovedStatusDeleteAction = createActionConfig(
|
|
43
|
-
const transitionApprovedStatusDeactivateAction = createActionConfig(
|
|
41
|
+
const transitionApprovedStatusUpdateAction = createActionConfig(entities_1.ExpenseTypeActionEnum.UPDATE, expense_type_status_enum_1.ExpenseTypeStatusEnum.APPROVED);
|
|
42
|
+
const transitionApprovedStatusDeleteAction = createActionConfig(entities_1.ExpenseTypeActionEnum.DELETE, expense_type_status_enum_1.ExpenseTypeStatusEnum.DELETED);
|
|
43
|
+
const transitionApprovedStatusDeactivateAction = createActionConfig(entities_1.ExpenseTypeActionEnum.DEACTIVATE, expense_type_status_enum_1.ExpenseTypeStatusEnum.DEACTIVATED);
|
|
44
44
|
// DEACTIVATED status transitions
|
|
45
|
-
const transitionDeactivatedStatusDeleteAction = createActionConfig(
|
|
46
|
-
const transitionDeactivatedStatusActivateAction = createActionConfig(
|
|
45
|
+
const transitionDeactivatedStatusDeleteAction = createActionConfig(entities_1.ExpenseTypeActionEnum.DELETE, expense_type_status_enum_1.ExpenseTypeStatusEnum.DELETED);
|
|
46
|
+
const transitionDeactivatedStatusActivateAction = createActionConfig(entities_1.ExpenseTypeActionEnum.ACTIVATE, expense_type_status_enum_1.ExpenseTypeStatusEnum.APPROVED);
|
|
47
47
|
// DELETED status transitions
|
|
48
|
-
const transitionDeletedStatusUpdateAction = createActionConfig(
|
|
49
|
-
const transitionDeletedStatusRestoreAction = createActionConfig(
|
|
48
|
+
const transitionDeletedStatusUpdateAction = createActionConfig(entities_1.ExpenseTypeActionEnum.UPDATE, expense_type_status_enum_1.ExpenseTypeStatusEnum.APPROVED);
|
|
49
|
+
const transitionDeletedStatusRestoreAction = createActionConfig(entities_1.ExpenseTypeActionEnum.RESTORE, expense_type_status_enum_1.ExpenseTypeStatusEnum.APPROVED);
|
|
50
50
|
exports.expenseTypeFlowConfig = {
|
|
51
51
|
[expense_type_status_enum_1.ExpenseTypeStatusEnum.APPROVED]: {
|
|
52
52
|
actions: {
|
|
53
|
-
[
|
|
54
|
-
[
|
|
55
|
-
[
|
|
53
|
+
[entities_1.ExpenseTypeActionEnum.UPDATE]: transitionApprovedStatusUpdateAction,
|
|
54
|
+
[entities_1.ExpenseTypeActionEnum.DELETE]: transitionApprovedStatusDeleteAction,
|
|
55
|
+
[entities_1.ExpenseTypeActionEnum.DEACTIVATE]: transitionApprovedStatusDeactivateAction,
|
|
56
56
|
},
|
|
57
57
|
},
|
|
58
58
|
[expense_type_status_enum_1.ExpenseTypeStatusEnum.DEACTIVATED]: {
|
|
59
59
|
actions: {
|
|
60
|
-
[
|
|
61
|
-
[
|
|
60
|
+
[entities_1.ExpenseTypeActionEnum.DELETE]: transitionDeactivatedStatusDeleteAction,
|
|
61
|
+
[entities_1.ExpenseTypeActionEnum.ACTIVATE]: transitionDeactivatedStatusActivateAction,
|
|
62
62
|
},
|
|
63
63
|
},
|
|
64
64
|
[expense_type_status_enum_1.ExpenseTypeStatusEnum.DELETED]: {
|
|
65
65
|
actions: {
|
|
66
|
-
[
|
|
67
|
-
[
|
|
66
|
+
[entities_1.ExpenseTypeActionEnum.UPDATE]: transitionDeletedStatusUpdateAction,
|
|
67
|
+
[entities_1.ExpenseTypeActionEnum.RESTORE]: transitionDeletedStatusRestoreAction,
|
|
68
68
|
},
|
|
69
69
|
},
|
|
70
70
|
};
|
|
@@ -11,11 +11,11 @@ const to_do_list_status_enum_1 = require("../enums/to_do_list_status_enum");
|
|
|
11
11
|
*
|
|
12
12
|
* @Post() TO_DO_LIST_CREATE_ORG, _CREATE_PROJECT, _CREATE_SELF
|
|
13
13
|
* @Patch(":id") TO_DO_LIST_UPDATE_ORG, _UPDATE_PROJECT, _UPDATE_SELF
|
|
14
|
-
* @Delete(":id") TO_DO_LIST_DELETE_ORG, _DELETE_PROJECT
|
|
14
|
+
* @Delete(":id") TO_DO_LIST_DELETE_ORG, _DELETE_PROJECT, _DELETE_SELF
|
|
15
15
|
*
|
|
16
|
-
* DELETE carries
|
|
17
|
-
*
|
|
18
|
-
*
|
|
16
|
+
* DELETE now carries all three. TO_DO_LIST_DELETE_SELF is seeded in higher environments (not in the
|
|
17
|
+
* original 1752573777447-ToDoListEntityPermissions migration) and scopes deletes to the acting
|
|
18
|
+
* user's own rows via the V2 getDeletePermissionFilterFunction.
|
|
19
19
|
*
|
|
20
20
|
* DEACTIVATE / ACTIVATE / RESTORE are unscoped - LW-826 seeded them flat - so those keep single-name
|
|
21
21
|
* arrays. Mixing the two shapes in one config is deliberate: each action names the rows that exist.
|
|
@@ -28,7 +28,7 @@ const to_do_list_status_enum_1 = require("../enums/to_do_list_status_enum");
|
|
|
28
28
|
*/
|
|
29
29
|
const TO_DO_LIST_CREATE_PERMISSION = ["TO_DO_LIST_CREATE_ORG", "TO_DO_LIST_CREATE_PROJECT", "TO_DO_LIST_CREATE_SELF"];
|
|
30
30
|
const TO_DO_LIST_UPDATE_PERMISSION = ["TO_DO_LIST_UPDATE_ORG", "TO_DO_LIST_UPDATE_PROJECT", "TO_DO_LIST_UPDATE_SELF"];
|
|
31
|
-
const TO_DO_LIST_DELETE_PERMISSION = ["TO_DO_LIST_DELETE_ORG", "TO_DO_LIST_DELETE_PROJECT"];
|
|
31
|
+
const TO_DO_LIST_DELETE_PERMISSION = ["TO_DO_LIST_DELETE_ORG", "TO_DO_LIST_DELETE_PROJECT", "TO_DO_LIST_DELETE_SELF"];
|
|
32
32
|
const TO_DO_LIST_DEACTIVATE_PERMISSION = ["TO_DO_LIST_DEACTIVATE"];
|
|
33
33
|
const TO_DO_LIST_ACTIVATE_PERMISSION = ["TO_DO_LIST_ACTIVATE"];
|
|
34
34
|
const TO_DO_LIST_RESTORE_PERMISSION = ["TO_DO_LIST_RESTORE"];
|
|
@@ -47,7 +47,7 @@ export * from "./flow-configs/reimbursement_flow.config";
|
|
|
47
47
|
export * from "./flow-configs/reimbursement_expense_flow.config";
|
|
48
48
|
export * from "./interface/reimbursement.entity.interface";
|
|
49
49
|
export * from "./interface/field-constraint/reimbursement_field_constraints.interface";
|
|
50
|
-
export * from "./enums/
|
|
50
|
+
export * from "./enums/expense_type_enum";
|
|
51
51
|
export * from "./enums/expense_type_action_enum";
|
|
52
52
|
export * from "./enums/expense_type_status_enum";
|
|
53
53
|
export * from "./flow-configs/expense_type_flow.config";
|
|
@@ -409,3 +409,4 @@ export * from "./model/work_from_home.entity.model";
|
|
|
409
409
|
export * from "./enums/user_gender_enum";
|
|
410
410
|
export * from "./enums/user_role_enum";
|
|
411
411
|
export * from "./enums/user_status_enum";
|
|
412
|
+
export * from "./interface/field-constraint/office_location_address_field_constraints.interface";
|
|
@@ -63,7 +63,7 @@ __exportStar(require("./flow-configs/reimbursement_flow.config"), exports);
|
|
|
63
63
|
__exportStar(require("./flow-configs/reimbursement_expense_flow.config"), exports);
|
|
64
64
|
__exportStar(require("./interface/reimbursement.entity.interface"), exports);
|
|
65
65
|
__exportStar(require("./interface/field-constraint/reimbursement_field_constraints.interface"), exports);
|
|
66
|
-
__exportStar(require("./enums/
|
|
66
|
+
__exportStar(require("./enums/expense_type_enum"), exports);
|
|
67
67
|
__exportStar(require("./enums/expense_type_action_enum"), exports);
|
|
68
68
|
__exportStar(require("./enums/expense_type_status_enum"), exports);
|
|
69
69
|
__exportStar(require("./flow-configs/expense_type_flow.config"), exports);
|
|
@@ -426,3 +426,4 @@ __exportStar(require("./model/work_from_home.entity.model"), exports);
|
|
|
426
426
|
__exportStar(require("./enums/user_gender_enum"), exports);
|
|
427
427
|
__exportStar(require("./enums/user_role_enum"), exports);
|
|
428
428
|
__exportStar(require("./enums/user_status_enum"), exports);
|
|
429
|
+
__exportStar(require("./interface/field-constraint/office_location_address_field_constraints.interface"), exports);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { ExpenseTypeEnum } from "../enums/
|
|
1
|
+
import { ExpenseTypeEnum } from "../enums/expense_type_enum";
|
|
2
2
|
import { ExpenseTypeStatusEnum } from "../enums/expense_type_status_enum";
|
|
3
3
|
import { IEntityAuditColumn } from "./entity-audit-columns.interface";
|
|
4
|
+
import { Nullable } from "./entity.utils.interface";
|
|
4
5
|
export interface IExpenseTypeEntity extends IEntityAuditColumn {
|
|
5
6
|
id: number;
|
|
6
7
|
name: string;
|
|
7
|
-
description?: string
|
|
8
|
+
description?: Nullable<string>;
|
|
8
9
|
type: ExpenseTypeEnum;
|
|
9
10
|
status: ExpenseTypeStatusEnum;
|
|
10
11
|
}
|
package/dist/src/entities/interface/field-constraint/expense_type_field_constraints.interface.d.ts
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import { IEntityAuditColumn } from "../entity-audit-columns.interface";
|
|
2
2
|
import { IExpenseTypeEntity } from "../expense_type.entity.interface";
|
|
3
3
|
import { IFieldMinMaxConstraint } from "./utils";
|
|
4
|
-
/**
|
|
5
|
-
* excluded, and why:
|
|
6
|
-
* - "type", "status" enum columns, enums carry no min/max
|
|
7
|
-
* - "id", keyof IEntityAuditColumn generated columns
|
|
8
|
-
*
|
|
9
|
-
* this entity has a create DTO only — there is no ExpenseTypeUpdateDto, so no
|
|
10
|
-
* create/update disagreement is possible
|
|
11
|
-
*/
|
|
12
4
|
export type IExpenseTypeFieldLengthConstraintsExclude = "status" | "type" | "id" | keyof IEntityAuditColumn;
|
|
13
5
|
/**
|
|
14
6
|
* since some fields are optional, but we still need their
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IOfficeLocationAddress } from "../../../api/v2";
|
|
2
|
+
import { IEntityAuditColumn } from "../entity-audit-columns.interface";
|
|
3
|
+
import { IFieldMinMaxConstraint } from "./utils";
|
|
4
|
+
export type IOfficeLocationAddressFieldLengthConstraintsExclude = keyof IEntityAuditColumn;
|
|
5
|
+
/**
|
|
6
|
+
* since some fields are optional, but we still need their
|
|
7
|
+
* min & max length constraints, we need to make them required in this type
|
|
8
|
+
* hence we are using -? to make all properties required in this type
|
|
9
|
+
*/
|
|
10
|
+
export type IOfficeLocationAddressFieldMinMaxConstraints = {
|
|
11
|
+
[K in keyof Omit<IOfficeLocationAddress, IOfficeLocationAddressFieldLengthConstraintsExclude>]-?: IFieldMinMaxConstraint;
|
|
12
|
+
};
|
|
13
|
+
export declare const officeLocationAddressFieldMinMaxConstraints: IOfficeLocationAddressFieldMinMaxConstraints;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.officeLocationAddressFieldMinMaxConstraints = void 0;
|
|
4
|
+
exports.officeLocationAddressFieldMinMaxConstraints = {
|
|
5
|
+
addressLine1: {
|
|
6
|
+
max: 64,
|
|
7
|
+
},
|
|
8
|
+
addressLine2: {
|
|
9
|
+
max: 64,
|
|
10
|
+
},
|
|
11
|
+
city: {
|
|
12
|
+
max: 32,
|
|
13
|
+
},
|
|
14
|
+
state: {
|
|
15
|
+
max: 64,
|
|
16
|
+
},
|
|
17
|
+
};
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import { IEntityAuditColumn } from "../entity-audit-columns.interface";
|
|
2
2
|
import { IOfficeLocationEntity } from "../office_location.entity.interface";
|
|
3
3
|
import { IFieldMinMaxConstraint } from "./utils";
|
|
4
|
-
/**
|
|
5
|
-
* excluded, and why:
|
|
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
|
|
9
|
-
*
|
|
10
|
-
* OfficeLocationUpdateDto is a standalone class rather than a PartialType of the create DTO, so the
|
|
11
|
-
* two can and do disagree — see the note on `address` below
|
|
12
|
-
*/
|
|
13
4
|
export type IOfficeLocationFieldLengthConstraintsExclude = "status" | "id" | keyof IEntityAuditColumn;
|
|
14
5
|
/**
|
|
15
6
|
* since some fields are optional, but we still need their
|
package/dist/src/entities/interface/field-constraint/office_location_field_constraints.interface.js
CHANGED
|
@@ -6,23 +6,14 @@ exports.officeLocationFieldMinMaxConstraints = {
|
|
|
6
6
|
min: 3,
|
|
7
7
|
max: 128,
|
|
8
8
|
},
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*/
|
|
9
|
+
country: {
|
|
10
|
+
max: 128,
|
|
11
|
+
},
|
|
13
12
|
address: {
|
|
14
13
|
max: 1024,
|
|
15
14
|
},
|
|
16
|
-
/**
|
|
17
|
-
* NOT a numeric bound: the property is typed `number` but the column is varchar(64), so 64 is the
|
|
18
|
-
* stored string length. Neither DTO bounds it, and it is deliberately left unwired there —
|
|
19
|
-
* the number/varchar mismatch is step-4 material
|
|
20
|
-
*/
|
|
21
15
|
zipCode: {
|
|
22
|
-
max:
|
|
23
|
-
},
|
|
24
|
-
country: {
|
|
25
|
-
max: 128,
|
|
16
|
+
max: 9999999,
|
|
26
17
|
},
|
|
27
18
|
organizationId: {
|
|
28
19
|
max: 9999999,
|
package/dist/src/entities/interface/field-constraint/to_do_list_field_constraints.interface.d.ts
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { IEntityAuditColumn } from "../entity-audit-columns.interface";
|
|
2
2
|
import { IToDoListEntity } from "../to_do_list.entity.interface";
|
|
3
3
|
import { IFieldMinMaxConstraint } from "./utils";
|
|
4
|
-
/**
|
|
5
|
-
* excluded, and why:
|
|
6
|
-
* - "id", keyof IEntityAuditColumn generated columns
|
|
7
|
-
*
|
|
8
|
-
* ToDoListUpdateDto extends PartialType(OmitType(ToDoListCreateDto, ...)), so it inherits every
|
|
9
|
-
* create bound — create and update cannot disagree for this entity
|
|
10
|
-
*/
|
|
11
4
|
export type IToDoListFieldLengthConstraintsExclude = "status" | "id" | keyof IEntityAuditColumn;
|
|
12
5
|
/**
|
|
13
6
|
* since some fields are optional, but we still need their
|