law-common 14.1.4-beta.8 → 14.2.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.
Files changed (35) hide show
  1. package/dist/src/api/index.d.ts +0 -2
  2. package/dist/src/api/index.js +0 -2
  3. package/dist/src/api/v1/index.d.ts +2 -0
  4. package/dist/src/api/v1/index.js +2 -0
  5. package/dist/src/api/{interface → v1/interface}/office_location.create.dto.interface.d.ts +1 -1
  6. package/dist/src/api/{interface → v1/interface}/office_location.update.dto.interface.d.ts +1 -1
  7. package/dist/src/api/v2/index.d.ts +2 -0
  8. package/dist/src/api/v2/index.js +2 -0
  9. package/dist/src/api/v2/interface/office_location.create.dto.interface.d.ts +15 -0
  10. package/dist/src/api/v2/interface/office_location.create.dto.interface.js +2 -0
  11. package/dist/src/api/v2/interface/office_location.update.dto.interface.d.ts +13 -0
  12. package/dist/src/api/v2/interface/office_location.update.dto.interface.js +2 -0
  13. package/dist/src/entities/flow-configs/country_flow.config.js +0 -6
  14. package/dist/src/entities/flow-configs/designation_flow.config.js +0 -6
  15. package/dist/src/entities/flow-configs/expense_type_flow.config.d.ts +1 -1
  16. package/dist/src/entities/flow-configs/expense_type_flow.config.js +15 -21
  17. package/dist/src/entities/flow-configs/industry_flow.config.js +0 -6
  18. package/dist/src/entities/flow-configs/office_location_flow.config.d.ts +33 -0
  19. package/dist/src/entities/flow-configs/office_location_flow.config.js +13 -9
  20. package/dist/src/entities/flow-configs/rate_flow.config.js +0 -6
  21. package/dist/src/entities/flow-configs/task_flow.config.js +0 -9
  22. package/dist/src/entities/flow-configs/to_do_list_flow.config.js +0 -6
  23. package/dist/src/entities/flow-configs/utils/flow-config.utils.d.ts +32 -0
  24. package/dist/src/entities/flow-configs/utils/flow-config.utils.js +2 -0
  25. package/dist/src/entities/index.d.ts +3 -2
  26. package/dist/src/entities/index.js +8 -3
  27. package/dist/src/entities/interface/field-constraint/office_location_address_field_constraints.interface.d.ts +13 -0
  28. package/dist/src/entities/interface/field-constraint/office_location_address_field_constraints.interface.js +17 -0
  29. package/dist/src/entities/interface/field-constraint/office_location_field_constraints.interface.d.ts +0 -9
  30. package/dist/src/entities/interface/field-constraint/office_location_field_constraints.interface.js +4 -13
  31. package/dist/src/entities/model/office_location.entity.model.d.ts +66 -8
  32. package/dist/src/entities/model/office_location.entity.model.js +405 -6
  33. package/package.json +1 -1
  34. /package/dist/src/api/{interface → v1/interface}/office_location.create.dto.interface.js +0 -0
  35. /package/dist/src/api/{interface → v1/interface}/office_location.update.dto.interface.js +0 -0
@@ -50,7 +50,7 @@ export * from "./interface/field-constraint/reimbursement_field_constraints.inte
50
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
- export * from "./flow-configs/expense_type_flow.config";
53
+ export { IExpenseTypeFlowConfigContextData, ACTION_MAP as EXPENSE_TYPE_ACTION_MAP, expenseTypeFlowConfig } from "./flow-configs/expense_type_flow.config";
54
54
  export * from "./model/expense_type.entity.model";
55
55
  export * from "./interface/expense_type.entity.interface";
56
56
  export * from "./interface/field-constraint/expense_type_field_constraints.interface";
@@ -62,7 +62,7 @@ export * from "./enums/billing_status_enum";
62
62
  export * from "./enums/billing_timesheet_change_status_enum";
63
63
  export * from "./enums/office_location_action_enum";
64
64
  export * from "./enums/office_location_status_enum";
65
- export * from "./flow-configs/office_location_flow.config";
65
+ export { IOfficeLocationFlowConfigContextData, ACTION_MAP as OFFICE_LOCATION_ACTION_MAP, officeLocationFlowConfig, } from "./flow-configs/office_location_flow.config";
66
66
  export * from "./interface/office_location.entity.interface";
67
67
  export * from "./interface/field-constraint/office_location_field_constraints.interface";
68
68
  export * from "./interface/bank.entity.interface";
@@ -411,3 +411,4 @@ export * from "./enums/user_gender_enum";
411
411
  export * from "./enums/user_role_enum";
412
412
  export * from "./enums/user_status_enum";
413
413
  export * from "./flow-configs/utils/flow-config.utils";
414
+ export * from "./interface/field-constraint/office_location_address_field_constraints.interface";
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.workFromHomeFlowConfig = exports.WORK_FROM_HOME_ACTION_MAP = exports.rateFlowConfig = exports.RATE_ACTION_MAP = exports.designationFlowConfig = exports.DESIGNATION_ACTION_MAP = exports.taskFlowConfig = exports.TASK_ACTION_MAP = exports.industryFlowConfig = exports.INDUSTRY_ACTION_MAP = exports.toDoListFlowConfig = exports.TO_DO_LIST_ACTION_MAP = exports.countryFlowConfig = exports.COUNTRY_ACTION_MAP = void 0;
17
+ exports.workFromHomeFlowConfig = exports.WORK_FROM_HOME_ACTION_MAP = exports.rateFlowConfig = exports.RATE_ACTION_MAP = exports.designationFlowConfig = exports.DESIGNATION_ACTION_MAP = exports.taskFlowConfig = exports.TASK_ACTION_MAP = exports.industryFlowConfig = exports.INDUSTRY_ACTION_MAP = exports.toDoListFlowConfig = exports.TO_DO_LIST_ACTION_MAP = exports.countryFlowConfig = exports.COUNTRY_ACTION_MAP = exports.officeLocationFlowConfig = exports.OFFICE_LOCATION_ACTION_MAP = exports.expenseTypeFlowConfig = exports.EXPENSE_TYPE_ACTION_MAP = void 0;
18
18
  __exportStar(require("./enums/organization_action_enum"), exports);
19
19
  __exportStar(require("./enums/organization_status_enum"), exports);
20
20
  __exportStar(require("./flow-configs/organization_flow.config"), exports);
@@ -67,7 +67,9 @@ __exportStar(require("./interface/field-constraint/reimbursement_field_constrain
67
67
  __exportStar(require("./enums/expense_type_enum"), exports);
68
68
  __exportStar(require("./enums/expense_type_action_enum"), exports);
69
69
  __exportStar(require("./enums/expense_type_status_enum"), exports);
70
- __exportStar(require("./flow-configs/expense_type_flow.config"), exports);
70
+ var expense_type_flow_config_1 = require("./flow-configs/expense_type_flow.config");
71
+ Object.defineProperty(exports, "EXPENSE_TYPE_ACTION_MAP", { enumerable: true, get: function () { return expense_type_flow_config_1.ACTION_MAP; } });
72
+ Object.defineProperty(exports, "expenseTypeFlowConfig", { enumerable: true, get: function () { return expense_type_flow_config_1.expenseTypeFlowConfig; } });
71
73
  __exportStar(require("./model/expense_type.entity.model"), exports);
72
74
  __exportStar(require("./interface/expense_type.entity.interface"), exports);
73
75
  __exportStar(require("./interface/field-constraint/expense_type_field_constraints.interface"), exports);
@@ -79,7 +81,9 @@ __exportStar(require("./enums/billing_status_enum"), exports);
79
81
  __exportStar(require("./enums/billing_timesheet_change_status_enum"), exports);
80
82
  __exportStar(require("./enums/office_location_action_enum"), exports);
81
83
  __exportStar(require("./enums/office_location_status_enum"), exports);
82
- __exportStar(require("./flow-configs/office_location_flow.config"), exports);
84
+ var office_location_flow_config_1 = require("./flow-configs/office_location_flow.config");
85
+ Object.defineProperty(exports, "OFFICE_LOCATION_ACTION_MAP", { enumerable: true, get: function () { return office_location_flow_config_1.ACTION_MAP; } });
86
+ Object.defineProperty(exports, "officeLocationFlowConfig", { enumerable: true, get: function () { return office_location_flow_config_1.officeLocationFlowConfig; } });
83
87
  __exportStar(require("./interface/office_location.entity.interface"), exports);
84
88
  __exportStar(require("./interface/field-constraint/office_location_field_constraints.interface"), exports);
85
89
  __exportStar(require("./interface/bank.entity.interface"), exports);
@@ -443,3 +447,4 @@ __exportStar(require("./enums/user_gender_enum"), exports);
443
447
  __exportStar(require("./enums/user_role_enum"), exports);
444
448
  __exportStar(require("./enums/user_status_enum"), exports);
445
449
  __exportStar(require("./flow-configs/utils/flow-config.utils"), exports);
450
+ __exportStar(require("./interface/field-constraint/office_location_address_field_constraints.interface"), exports);
@@ -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
@@ -6,23 +6,14 @@ exports.officeLocationFieldMinMaxConstraints = {
6
6
  min: 3,
7
7
  max: 128,
8
8
  },
9
- /**
10
- * the column is varchar(1024) and the update DTO agrees, but the create DTO caps it at
11
- * @MaxLength(255) — the create bound stays as a literal, reconciling the two is step-4 material
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: 64,
23
- },
24
- country: {
25
- max: 128,
16
+ max: 9999999,
26
17
  },
27
18
  organizationId: {
28
19
  max: 9999999,
@@ -1,29 +1,87 @@
1
- import { OfficeLocationActionEnum } from "../enums/office_location_action_enum";
2
- import { IOfficeLocationFlowConfigContextData } from "../flow-configs/office_location_flow.config";
1
+ import type { IOfficeLocationAddress } from "../../api/v2";
2
+ import { EntityEnum } from "../interface/entity.utils.interface";
3
+ import { RelationConfigs } from "../interface/relation-config.interface";
3
4
  import { IUserEntity } from "../interface/user.entity.interface";
5
+ import { BaseEntityModel } from "./base.entity.model";
4
6
  import { IRowActions } from "./interface/row-actions.interface";
5
7
  import { UserEntityModel } from "./user.entity.model";
8
+ import { OfficeLocationActionEnum } from "../../entities";
6
9
  import { OfficeLocationStatusEnum } from "../enums/office_location_status_enum";
7
- import { EntityEnum } from "../interface/entity.utils.interface";
10
+ import { IOfficeLocationFlowConfigContextData } from "../flow-configs/office_location_flow.config";
8
11
  import { IOfficeLocationEntity } from "../interface/office_location.entity.interface";
9
- import { RelationConfigs } from "../interface/relation-config.interface";
10
- import { BaseEntityModel } from "./base.entity.model";
12
+ import { BankEntityModel } from "./bank.entity.model";
13
+ import { BillingEntityModel } from "./billing.entity.model";
14
+ import { ClientEntityModel } from "./client.entity.model";
15
+ import { ClientAffiliateEntityModel } from "./client_affiliate.entity.model";
16
+ import { ClientDebitNoteEntityModel } from "./client_debit_note.entity.model";
17
+ import { ClientDebitNoteParticularsEntityModel } from "./client_debit_note_particulars.entity.model";
18
+ import { CountryEntityModel } from "./country.entity.model";
19
+ import { ExpenseHeadEntityModel } from "./expense_head.entity.model";
20
+ import { GstRateEntityModel } from "./gst_rate.entity.model";
21
+ import { IntermediaryBankEntityModel } from "./intermediary_bank.entity.model";
22
+ import { LeaveEntityModel } from "./leave.entity.model";
23
+ import { LeaveApprovalEntityModel } from "./leave_approval.entity.model";
24
+ import { OrganizationEntityModel } from "./organization.entity.model";
25
+ import { OrganizationTypeEntityModel } from "./organization_type.entity.model";
26
+ import { ProjectEntityModel } from "./project.entity.model";
27
+ import { StateEntityModel } from "./state.entity.model";
28
+ import { TdsRateEntityModel } from "./tds_rate.entity.model";
29
+ import { ToDoListEntityModel } from "./to_do_list.entity.model";
30
+ import { VendorEntityModel } from "./vendor.entity.model";
31
+ import { VendorAdvanceEntityModel } from "./vendor_advance.entity.model";
32
+ import { VendorInvoiceEntityModel } from "./vendor_invoice.entity.model";
33
+ import { VendorInvoiceAdvanceEntityModel } from "./vendor_invoice_advance.entity.model";
34
+ import { VendorInvoiceItemEntityModel } from "./vendor_invoice_item.entity.model";
35
+ import { VendorInvoicePaymentEntityModel } from "./vendor_invoice_payment.entity.model";
36
+ import { VendorTdsChallanEntityModel } from "./vendor_tds_challan.entity.model";
37
+ import { VendorTdsLiabilityEntityModel } from "./vendor_tds_liability.entity.model";
38
+ import { VoucherTypeEntityModel } from "./voucher_type.entity.model";
39
+ import { WorkFromHomeEntityModel } from "./work_from_home.entity.model";
11
40
  export declare class OfficeLocationEntityModel extends BaseEntityModel<EntityEnum.OFFICE_LOCATION> implements IOfficeLocationEntity {
12
41
  id: number;
13
42
  name: string;
14
43
  country: string;
15
- state: string;
16
- address: string;
17
44
  zipCode: number;
45
+ address: string;
18
46
  organizationId: number;
19
47
  status: OfficeLocationStatusEnum;
20
48
  createdOn: number;
21
49
  updatedOn: number;
22
50
  createdBy: number;
23
51
  updatedBy: number;
24
- static relationConfigs: RelationConfigs<[], EntityEnum.OFFICE_LOCATION>;
52
+ organization?: OrganizationEntityModel;
53
+ countryModel?: CountryEntityModel;
54
+ vendorInvoices?: VendorInvoiceEntityModel[];
55
+ static relationConfigs: RelationConfigs<[EntityEnum.ORGANIZATION, EntityEnum.COUNTRY, EntityEnum.VENDOR_INVOICE], EntityEnum.OFFICE_LOCATION>;
25
56
  static fromEntity(entity: IOfficeLocationEntity): OfficeLocationEntityModel;
57
+ static parseAddress(value: string): IOfficeLocationAddress;
26
58
  getRelationConfigs(): any[];
59
+ get vendors(): VendorEntityModel[] | undefined;
60
+ get states(): StateEntityModel[] | undefined;
61
+ get organizationTypes(): OrganizationTypeEntityModel[] | undefined;
62
+ get tdsRates(): TdsRateEntityModel[] | undefined;
63
+ get voucherTypes(): VoucherTypeEntityModel[] | undefined;
64
+ get expenseHeads(): ExpenseHeadEntityModel[] | undefined;
65
+ get vendorInvoiceItems(): VendorInvoiceItemEntityModel[] | undefined;
66
+ get gstRates(): GstRateEntityModel[] | undefined;
67
+ get vendorAdvances(): VendorAdvanceEntityModel[] | undefined;
68
+ get vendorInvoiceAdvances(): VendorInvoiceAdvanceEntityModel[] | undefined;
69
+ get vendorTdsLiabilitys(): VendorTdsLiabilityEntityModel[] | undefined;
70
+ get vendorTdsChallans(): VendorTdsChallanEntityModel[] | undefined;
71
+ get banks(): BankEntityModel[] | undefined;
72
+ get clientDebitNotes(): ClientDebitNoteEntityModel[] | undefined;
73
+ get clients(): ClientEntityModel[] | undefined;
74
+ get users(): UserEntityModel[] | undefined;
75
+ get leaveApprovals(): LeaveApprovalEntityModel[] | undefined;
76
+ get leaves(): LeaveEntityModel[] | undefined;
77
+ get workFromHomes(): WorkFromHomeEntityModel[] | undefined;
78
+ get toDoLists(): ToDoListEntityModel[] | undefined;
79
+ get projects(): ProjectEntityModel[] | undefined;
80
+ get clientAffiliates(): ClientAffiliateEntityModel[] | undefined;
81
+ get clientDebitNoteParticularss(): ClientDebitNoteParticularsEntityModel[] | undefined;
82
+ get intermediaryBanks(): IntermediaryBankEntityModel[] | undefined;
83
+ get billings(): BillingEntityModel[] | undefined;
84
+ get vendorInvoicePayments(): VendorInvoicePaymentEntityModel[] | undefined;
27
85
  getNextStatus(currentUser: IUserEntity, action: OfficeLocationActionEnum, officeLocationFlowConfigContextData: IOfficeLocationFlowConfigContextData): OfficeLocationStatusEnum;
28
86
  getAvailableActions(currentUser: UserEntityModel, config?: {
29
87
  combinedActions?: Record<string, {