law-common 14.1.4-beta.4 → 14.1.4-beta.5

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 (37) hide show
  1. package/dist/src/api/index.d.ts +0 -4
  2. package/dist/src/api/index.js +0 -4
  3. package/dist/src/api/interface/bank.entity.response.d.ts +4 -4
  4. package/dist/src/api/v1/index.d.ts +4 -0
  5. package/dist/src/api/v1/index.js +4 -0
  6. package/dist/src/api/{interface → v1/interface}/bank.create.dto.interface.d.ts +1 -1
  7. package/dist/src/api/{interface → v1/interface}/bank.update.dto.interface.d.ts +1 -1
  8. package/dist/src/api/{interface → v1/interface}/intermediary_bank.create.dto.interface.d.ts +1 -1
  9. package/dist/src/api/{interface → v1/interface}/intermediary_bank.update.dto.interface.d.ts +1 -1
  10. package/dist/src/api/v2/index.d.ts +4 -0
  11. package/dist/src/api/v2/index.js +4 -0
  12. package/dist/src/api/v2/interface/bank.create.dto.interface.d.ts +7 -0
  13. package/dist/src/api/v2/interface/bank.create.dto.interface.js +2 -0
  14. package/dist/src/api/v2/interface/bank.update.dto.interface.d.ts +12 -0
  15. package/dist/src/api/v2/interface/bank.update.dto.interface.js +2 -0
  16. package/dist/src/api/v2/interface/intermediary_bank.create.dto.interface.d.ts +5 -0
  17. package/dist/src/api/v2/interface/intermediary_bank.create.dto.interface.js +2 -0
  18. package/dist/src/api/v2/interface/intermediary_bank.update.dto.interface.d.ts +12 -0
  19. package/dist/src/api/v2/interface/intermediary_bank.update.dto.interface.js +2 -0
  20. package/dist/src/entities/enums/bank_action_enum.d.ts +6 -2
  21. package/dist/src/entities/enums/bank_action_enum.js +10 -2
  22. package/dist/src/entities/enums/bank_status_enum.d.ts +3 -1
  23. package/dist/src/entities/enums/bank_status_enum.js +2 -0
  24. package/dist/src/entities/flow-configs/bank_flow.config.d.ts +3 -1
  25. package/dist/src/entities/flow-configs/bank_flow.config.js +24 -13
  26. package/dist/src/entities/interface/bank.entity.interface.d.ts +5 -4
  27. package/dist/src/entities/interface/field-constraint/bank_field_constraints.interface.d.ts +1 -1
  28. package/dist/src/entities/interface/field-constraint/bank_field_constraints.interface.js +7 -1
  29. package/dist/src/entities/model/bank.entity.model.d.ts +86 -7
  30. package/dist/src/entities/model/bank.entity.model.js +449 -8
  31. package/dist/src/entities/model/intermediary_bank.entity.model.d.ts +62 -6
  32. package/dist/src/entities/model/intermediary_bank.entity.model.js +370 -10
  33. package/package.json +1 -1
  34. /package/dist/src/api/{interface → v1/interface}/bank.create.dto.interface.js +0 -0
  35. /package/dist/src/api/{interface → v1/interface}/bank.update.dto.interface.js +0 -0
  36. /package/dist/src/api/{interface → v1/interface}/intermediary_bank.create.dto.interface.js +0 -0
  37. /package/dist/src/api/{interface → v1/interface}/intermediary_bank.update.dto.interface.js +0 -0
@@ -45,9 +45,7 @@ export * from "./interface/moving_timesheet.update.dto.interface";
45
45
  export * from "./interface/timesheet.create.dto.interface";
46
46
  export * from "./interface/timesheet.filter.dto.interface";
47
47
  export * from "./interface/timesheet.update.dto.interface";
48
- export * from "./interface/bank.create.dto.interface";
49
48
  export * from "./interface/bank.entity.response";
50
- export * from "./interface/bank.update.dto.interface";
51
49
  export * from "./interface/client.filter.dto.interface";
52
50
  export * from "./interface/client_affiliate.create.dto.interface";
53
51
  export * from "./interface/client_affiliate.filter.dto.interface";
@@ -168,8 +166,6 @@ export * from "./interface/configuration.filter.dto.interface";
168
166
  export * from "./interface/configuration.update.dto.interface";
169
167
  export * from "./interface/leave.filter.dto.interface";
170
168
  export * from "./interface/bank.filter.dto.interface";
171
- export * from "./interface/intermediary_bank.create.dto.interface";
172
169
  export * from "./interface/intermediary_bank.filter.dto.interface";
173
- export * from "./interface/intermediary_bank.update.dto.interface";
174
170
  export * as v1 from "./v1";
175
171
  export * as v2 from "./v2";
@@ -84,9 +84,7 @@ __exportStar(require("./interface/moving_timesheet.update.dto.interface"), expor
84
84
  __exportStar(require("./interface/timesheet.create.dto.interface"), exports);
85
85
  __exportStar(require("./interface/timesheet.filter.dto.interface"), exports);
86
86
  __exportStar(require("./interface/timesheet.update.dto.interface"), exports);
87
- __exportStar(require("./interface/bank.create.dto.interface"), exports);
88
87
  __exportStar(require("./interface/bank.entity.response"), exports);
89
- __exportStar(require("./interface/bank.update.dto.interface"), exports);
90
88
  __exportStar(require("./interface/client.filter.dto.interface"), exports);
91
89
  __exportStar(require("./interface/client_affiliate.create.dto.interface"), exports);
92
90
  __exportStar(require("./interface/client_affiliate.filter.dto.interface"), exports);
@@ -209,9 +207,7 @@ __exportStar(require("./interface/configuration.filter.dto.interface"), exports)
209
207
  __exportStar(require("./interface/configuration.update.dto.interface"), exports);
210
208
  __exportStar(require("./interface/leave.filter.dto.interface"), exports);
211
209
  __exportStar(require("./interface/bank.filter.dto.interface"), exports);
212
- __exportStar(require("./interface/intermediary_bank.create.dto.interface"), exports);
213
210
  __exportStar(require("./interface/intermediary_bank.filter.dto.interface"), exports);
214
- __exportStar(require("./interface/intermediary_bank.update.dto.interface"), exports);
215
211
  // Versioned contracts (checklist 12.4). Namespace re-exports only - never `export *` flat from
216
212
  // v1 or v2: flat-exporting both is a duplicate-export error, and flat-exporting one reintroduces
217
213
  // the ambiguity the fork exists to remove.
@@ -1,11 +1,11 @@
1
- import { BankActionEnum, BankStatusEnum, FlowConfig, IBankEntity, IIntermediaryBankEntity } from "../../entities";
1
+ import { BankActionEnum, BankStatusEnum, FlowConfig, IBankEntity, IBankFlowConfigContextData, IIntermediaryBankEntity } from "../../entities";
2
2
  /**
3
3
  * LW-828: this used to re-declare the flow-config shape by hand. It is now an alias of the shared
4
- * `FlowConfig`, instantiated with `void` as the context type because `next` here is called with no
5
- * arguments (`BankService.getBankNextStatus`). Kept as a named type so every consumer — including
4
+ * `FlowConfig`, instantiated with `IBankFlowConfigContextData` (empty, as generated) as the context type;
5
+ * `BankService.getBankNextStatus` calls `next({})`. Kept as a named type so every consumer — including
6
6
  * law-admin-web, which receives this config over `GET /bank/flow-config` — keeps compiling unchanged.
7
7
  */
8
- export type IBankFlowConfig = FlowConfig<BankStatusEnum, BankActionEnum, void>;
8
+ export type IBankFlowConfig = FlowConfig<BankStatusEnum, BankActionEnum, IBankFlowConfigContextData>;
9
9
  export interface IBankEntityGet extends IBankEntity {
10
10
  intermediaryBankDetails?: IIntermediaryBankEntity[];
11
11
  }
@@ -5,9 +5,13 @@
5
5
  * generator never writes to this directory (checklist 12.4). An entity appears either in
6
6
  * api/interface/ or in v1 + v2 - never both.
7
7
  */
8
+ export * from "./interface/bank.create.dto.interface";
9
+ export * from "./interface/bank.update.dto.interface";
8
10
  export * from "./interface/expense_type.create.dto.interface";
9
11
  export * from "./interface/expense_type.update.dto.interface";
10
12
  export * from "./interface/office_location.create.dto.interface";
11
13
  export * from "./interface/office_location.update.dto.interface";
14
+ export * from "./interface/intermediary_bank.create.dto.interface";
15
+ export * from "./interface/intermediary_bank.update.dto.interface";
12
16
  export * from "./interface/to_do_list.create.dto.interface";
13
17
  export * from "./interface/to_do_list.update.dto.interface";
@@ -21,9 +21,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
21
21
  * generator never writes to this directory (checklist 12.4). An entity appears either in
22
22
  * api/interface/ or in v1 + v2 - never both.
23
23
  */
24
+ __exportStar(require("./interface/bank.create.dto.interface"), exports);
25
+ __exportStar(require("./interface/bank.update.dto.interface"), exports);
24
26
  __exportStar(require("./interface/expense_type.create.dto.interface"), exports);
25
27
  __exportStar(require("./interface/expense_type.update.dto.interface"), exports);
26
28
  __exportStar(require("./interface/office_location.create.dto.interface"), exports);
27
29
  __exportStar(require("./interface/office_location.update.dto.interface"), exports);
30
+ __exportStar(require("./interface/intermediary_bank.create.dto.interface"), exports);
31
+ __exportStar(require("./interface/intermediary_bank.update.dto.interface"), exports);
28
32
  __exportStar(require("./interface/to_do_list.create.dto.interface"), exports);
29
33
  __exportStar(require("./interface/to_do_list.update.dto.interface"), exports);
@@ -1,4 +1,4 @@
1
- import { BankStatusEnum, IBankEntity, IEntityCreateDto } from "../../entities";
1
+ import { BankStatusEnum, IBankEntity, IEntityCreateDto } from "../../../entities";
2
2
  import { IIntermediaryBankCreateDto } from "./intermediary_bank.create.dto.interface";
3
3
  export interface IBankCreateDto extends Omit<IEntityCreateDto<IBankEntity>, IBankCreateExclude> {
4
4
  status?: BankStatusEnum;
@@ -1,4 +1,4 @@
1
- import { BankActionEnum, IBankEntity, IEntityUpdateDto } from "../../entities";
1
+ import { BankActionEnum, IBankEntity, IEntityUpdateDto } from "../../../entities";
2
2
  import { IIntermediaryBankUpdateDto } from "./intermediary_bank.update.dto.interface";
3
3
  export interface IBankActionDataDto {
4
4
  action: BankActionEnum;
@@ -1,4 +1,4 @@
1
- import { IEntityCreateDto, IIntermediaryBankEntity } from "../../entities";
1
+ import { IEntityCreateDto, IIntermediaryBankEntity } from "../../../entities";
2
2
  /** status is set by the entity flow, never by the client */
3
3
  export type IIntermediaryBankCreateExclude = "bankId" | "status";
4
4
  export interface IIntermediaryBankCreateDto extends Omit<IEntityCreateDto<IIntermediaryBankEntity>, IIntermediaryBankCreateExclude> {
@@ -1,4 +1,4 @@
1
- import { IEntityUpdateDto, IIntermediaryBankEntity } from "../../entities";
1
+ import { IEntityUpdateDto, IIntermediaryBankEntity } from "../../../entities";
2
2
  export interface IIntermediaryBankUpdateDto extends Omit<IEntityUpdateDto<IIntermediaryBankEntity>, "status"> {
3
3
  id?: number;
4
4
  }
@@ -13,3 +13,7 @@ export * from "./interface/expense_type.create.dto.interface";
13
13
  export * from "./interface/expense_type.update.dto.interface";
14
14
  export * from "./interface/office_location.create.dto.interface";
15
15
  export * from "./interface/office_location.update.dto.interface";
16
+ export * from "./interface/intermediary_bank.create.dto.interface";
17
+ export * from "./interface/intermediary_bank.update.dto.interface";
18
+ export * from "./interface/bank.create.dto.interface";
19
+ export * from "./interface/bank.update.dto.interface";
@@ -31,3 +31,7 @@ __exportStar(require("./interface/expense_type.create.dto.interface"), exports);
31
31
  __exportStar(require("./interface/expense_type.update.dto.interface"), exports);
32
32
  __exportStar(require("./interface/office_location.create.dto.interface"), exports);
33
33
  __exportStar(require("./interface/office_location.update.dto.interface"), exports);
34
+ __exportStar(require("./interface/intermediary_bank.create.dto.interface"), exports);
35
+ __exportStar(require("./interface/intermediary_bank.update.dto.interface"), exports);
36
+ __exportStar(require("./interface/bank.create.dto.interface"), exports);
37
+ __exportStar(require("./interface/bank.update.dto.interface"), exports);
@@ -0,0 +1,7 @@
1
+ import { IEntityCreateDto } from "../../../entities";
2
+ import { IBankEntity } from "../../../entities/interface/bank.entity.interface";
3
+ import { IIntermediaryBankCreateDto } from "./intermediary_bank.create.dto.interface";
4
+ export type IBankCreateExclude = "organizationId" | "remark" | "status";
5
+ export interface IBankCreateDto extends Omit<IEntityCreateDto<IBankEntity>, IBankCreateExclude> {
6
+ intermediaryBanks: IIntermediaryBankCreateDto[];
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import { DeepPartialButRequired } from "../../interface/api.utils.interface";
2
+ import { BankActionEnum } from "../../../entities";
3
+ import { IBankCreateDto } from "./bank.create.dto.interface";
4
+ export type IBankUpdateDto = DeepPartialButRequired<IBankCreateDto, never> & {
5
+ actionData: IBankActionDataDto;
6
+ } & {
7
+ id?: number;
8
+ };
9
+ export interface IBankActionDataDto {
10
+ action: BankActionEnum;
11
+ remark?: string;
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { IEntityCreateDto } from "../../../entities";
2
+ import { IIntermediaryBankEntity } from "../../../entities/interface/intermediary_bank.entity.interface";
3
+ export type IIntermediaryBankCreateExclude = "status";
4
+ export interface IIntermediaryBankCreateDto extends Omit<IEntityCreateDto<IIntermediaryBankEntity>, IIntermediaryBankCreateExclude> {
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import { DeepPartialButRequired } from "../../interface/api.utils.interface";
2
+ import { IntermediaryBankActionEnum } from "../../../entities";
3
+ import { IIntermediaryBankCreateDto } from "./intermediary_bank.create.dto.interface";
4
+ export type IIntermediaryBankUpdateDto = DeepPartialButRequired<IIntermediaryBankCreateDto, never> & {
5
+ actionData: IIntermediaryBankActionDataDto;
6
+ } & {
7
+ id?: number;
8
+ };
9
+ export interface IIntermediaryBankActionDataDto {
10
+ action: IntermediaryBankActionEnum;
11
+ remark?: string;
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,11 +1,15 @@
1
1
  export declare enum BankActionEnum {
2
- VIEW = "VIEW",
3
2
  UPDATE = "UPDATE",
4
3
  DELETE = "DELETE",
5
4
  CREATE = "CREATE",
6
5
  APPROVE = "APPROVE",
7
6
  REJECT = "REJECT",
8
- RECALL = "RECALL"
7
+ RECALL = "RECALL",
8
+ DEACTIVATE = "DEACTIVATE",
9
+ ACTIVATE = "ACTIVATE",
10
+ RESTORE = "RESTORE",
11
+ REQUEST_CHANGES = "REQUEST_CHANGES",
12
+ CHANGES_DONE = "CHANGES_DONE"
9
13
  }
10
14
  export declare namespace BankActionEnum {
11
15
  function getLabel(action: BankActionEnum): string;
@@ -5,23 +5,31 @@ const enums_1 = require("../../enums");
5
5
  const exceptions_1 = require("../../exceptions");
6
6
  var BankActionEnum;
7
7
  (function (BankActionEnum) {
8
- BankActionEnum["VIEW"] = "VIEW";
9
8
  BankActionEnum["UPDATE"] = "UPDATE";
10
9
  BankActionEnum["DELETE"] = "DELETE";
11
10
  BankActionEnum["CREATE"] = "CREATE";
12
11
  BankActionEnum["APPROVE"] = "APPROVE";
13
12
  BankActionEnum["REJECT"] = "REJECT";
14
13
  BankActionEnum["RECALL"] = "RECALL";
14
+ BankActionEnum["DEACTIVATE"] = "DEACTIVATE";
15
+ BankActionEnum["ACTIVATE"] = "ACTIVATE";
16
+ BankActionEnum["RESTORE"] = "RESTORE";
17
+ BankActionEnum["REQUEST_CHANGES"] = "REQUEST_CHANGES";
18
+ BankActionEnum["CHANGES_DONE"] = "CHANGES_DONE";
15
19
  })(BankActionEnum || (exports.BankActionEnum = BankActionEnum = {}));
16
20
  (function (BankActionEnum) {
17
21
  const actionLabelMap = {
18
22
  [BankActionEnum.APPROVE]: "Approve",
19
- [BankActionEnum.VIEW]: "View",
20
23
  [BankActionEnum.UPDATE]: "Edit",
21
24
  [BankActionEnum.DELETE]: "Delete",
22
25
  [BankActionEnum.CREATE]: "Create",
23
26
  [BankActionEnum.REJECT]: "Reject",
24
27
  [BankActionEnum.RECALL]: "Recall",
28
+ [BankActionEnum.DEACTIVATE]: "Deactivate",
29
+ [BankActionEnum.ACTIVATE]: "Activate",
30
+ [BankActionEnum.RESTORE]: "Restore",
31
+ [BankActionEnum.REQUEST_CHANGES]: "Request Changes",
32
+ [BankActionEnum.CHANGES_DONE]: "Changes Done",
25
33
  };
26
34
  function getLabel(action) {
27
35
  if (!Object.values(BankActionEnum).includes(action)) {
@@ -5,7 +5,9 @@ export declare enum BankStatusEnum {
5
5
  REJECTED = "REJECTED",
6
6
  APPROVED = "APPROVED",
7
7
  DELETED = "DELETED",
8
- RESOLVED_REJECTED = "RESOLVED_REJECTED"
8
+ RESOLVED_REJECTED = "RESOLVED_REJECTED",
9
+ DEACTIVATED = "DEACTIVATED",
10
+ CHANGE_REQUESTED = "CHANGE_REQUESTED"
9
11
  }
10
12
  export declare namespace BankStatusEnum {
11
13
  function getNames(): string[];
@@ -12,6 +12,8 @@ var BankStatusEnum;
12
12
  BankStatusEnum["APPROVED"] = "APPROVED";
13
13
  BankStatusEnum["DELETED"] = "DELETED";
14
14
  BankStatusEnum["RESOLVED_REJECTED"] = "RESOLVED_REJECTED";
15
+ BankStatusEnum["DEACTIVATED"] = "DEACTIVATED";
16
+ BankStatusEnum["CHANGE_REQUESTED"] = "CHANGE_REQUESTED";
15
17
  })(BankStatusEnum || (exports.BankStatusEnum = BankStatusEnum = {}));
16
18
  (function (BankStatusEnum) {
17
19
  function getNames() {
@@ -1,9 +1,11 @@
1
1
  import { BankActionEnum } from "../enums/bank_action_enum";
2
2
  import { BankStatusEnum } from "../enums/bank_status_enum";
3
3
  import { FlowConfig } from "./flow-config.type";
4
+ export interface IBankFlowConfigContextData {
5
+ }
4
6
  /**
5
7
  * Typed with `FlowConfig` directly rather than importing `IBankFlowConfig` from `src/api`, so that
6
8
  * `entities` does not reach into `api` for a type it can express itself. `IBankFlowConfig` is now an
7
9
  * alias of this same instantiation, so the two cannot drift.
8
10
  */
9
- export declare const bankFlowConfig: FlowConfig<BankStatusEnum, BankActionEnum, void>;
11
+ export declare const bankFlowConfig: FlowConfig<BankStatusEnum, BankActionEnum, IBankFlowConfigContextData>;
@@ -7,13 +7,10 @@ const base_flow_config_factory_1 = require("./base-flow-config.factory");
7
7
  const BANK_APPROVER_PERMISSION = ["BANK_APPROVER_ORG"];
8
8
  const BANK_UPDATE_PERMISSION = ["BANK_UPDATE_ORG"];
9
9
  const ACTION_MAP = {
10
- // VIEW and CREATE are declared on BankActionEnum but carry no transition in this flow. They are
11
- // listed so the map covers every enum member; the empty reachable set makes createActionConfig
12
- // uncallable for them.
13
- [bank_action_enum_1.BankActionEnum.VIEW]: {
14
- reachableStatues: [],
15
- permissions: [],
16
- },
10
+ // CREATE, DEACTIVATE, ACTIVATE, RESTORE, REQUEST_CHANGES and CHANGES_DONE are declared on
11
+ // BankActionEnum but carry no transition in this flow yet. They are listed so the map covers every
12
+ // enum member; the empty reachable set makes createActionConfig uncallable for them. Permissions
13
+ // and transitions for the last five will be added when the flow needs them.
17
14
  [bank_action_enum_1.BankActionEnum.CREATE]: {
18
15
  reachableStatues: [],
19
16
  permissions: [],
@@ -38,13 +35,27 @@ const ACTION_MAP = {
38
35
  reachableStatues: [bank_status_enum_1.BankStatusEnum.DELETED],
39
36
  permissions: BANK_UPDATE_PERMISSION,
40
37
  },
38
+ [bank_action_enum_1.BankActionEnum.DEACTIVATE]: {
39
+ reachableStatues: [],
40
+ permissions: [],
41
+ },
42
+ [bank_action_enum_1.BankActionEnum.ACTIVATE]: {
43
+ reachableStatues: [],
44
+ permissions: [],
45
+ },
46
+ [bank_action_enum_1.BankActionEnum.RESTORE]: {
47
+ reachableStatues: [],
48
+ permissions: [],
49
+ },
50
+ [bank_action_enum_1.BankActionEnum.REQUEST_CHANGES]: {
51
+ reachableStatues: [],
52
+ permissions: [],
53
+ },
54
+ [bank_action_enum_1.BankActionEnum.CHANGES_DONE]: {
55
+ reachableStatues: [],
56
+ permissions: [],
57
+ },
41
58
  };
42
- /**
43
- * The context type is `void` rather than `never` or an empty interface, because `IBankFlowConfig`
44
- * declares `next: () => BankStatusEnum` and `BankService.getBankNextStatus` calls
45
- * `matchingPermissionConfig.next()` with no arguments. A `void` parameter may be omitted at the call
46
- * site, so that call keeps compiling; `never` would have required an argument nobody can produce.
47
- */
48
59
  const { createActionConfig } = (0, base_flow_config_factory_1.createFlowConfigFactory)()(ACTION_MAP);
49
60
  // CREATE_APPROVAL_PENDING status transitions
50
61
  const transitionCreateApprovalPendingStatusApproveAction = createActionConfig(bank_action_enum_1.BankActionEnum.APPROVE, bank_status_enum_1.BankStatusEnum.APPROVED);
@@ -1,15 +1,16 @@
1
- import { BankStatusEnum } from "../../entities";
1
+ import { BankStatusEnum } from "../enums/bank_status_enum";
2
2
  import { IEntityAuditColumn } from "./entity-audit-columns.interface";
3
+ import { Nullable } from "./entity.utils.interface";
3
4
  export interface IBankEntity extends IEntityAuditColumn {
4
5
  id: number;
5
6
  accountName: string;
6
- organizationId: number;
7
+ organizationId?: Nullable<number>;
7
8
  name: string;
8
9
  accountNo: string;
9
10
  branchAddress: string;
10
11
  ifscCode: string;
11
12
  emailForPaymentInfoCsv: string;
13
+ remark?: Nullable<string>;
12
14
  status: BankStatusEnum;
13
- remark?: string;
14
- swiftAddress?: string;
15
+ swiftAddress?: Nullable<string>;
15
16
  }
@@ -1,5 +1,5 @@
1
- import { IBankEntity } from "../bank.entity.interface";
2
1
  import { IEntityAuditColumn } from "../entity-audit-columns.interface";
2
+ import { IBankEntity } from "../bank.entity.interface";
3
3
  import { IFieldMinMaxConstraint } from "./utils";
4
4
  export type IBankFieldLengthConstraintsExclude = "status" | "id" | keyof IEntityAuditColumn;
5
5
  /**
@@ -3,21 +3,27 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.bankFieldMinMaxConstraints = void 0;
4
4
  exports.bankFieldMinMaxConstraints = {
5
5
  accountName: {
6
+ min: 3,
6
7
  max: 128,
7
8
  },
8
9
  organizationId: {
9
- max: 9999999,
10
+ min: 1,
11
+ max: 99999999,
10
12
  },
11
13
  name: {
14
+ min: 3,
12
15
  max: 128,
13
16
  },
14
17
  accountNo: {
18
+ min: 3,
15
19
  max: 64,
16
20
  },
17
21
  branchAddress: {
22
+ min: 3,
18
23
  max: 1024,
19
24
  },
20
25
  ifscCode: {
26
+ min: 3,
21
27
  max: 64,
22
28
  },
23
29
  emailForPaymentInfoCsv: {
@@ -1,26 +1,105 @@
1
- import { BankStatusEnum, EntityEnum, IBankEntity, RelationConfigs } from "../../entities";
1
+ import { EntityEnum } from "../interface/entity.utils.interface";
2
+ import { RelationConfigs } from "../interface/relation-config.interface";
3
+ import { IUserEntity } from "../interface/user.entity.interface";
2
4
  import { BaseEntityModel } from "./base.entity.model";
5
+ import { IRowActions } from "./interface/row-actions.interface";
6
+ import { UserEntityModel } from "./user.entity.model";
7
+ import { BankActionEnum } from "../../entities";
8
+ import { BankStatusEnum } from "../enums/bank_status_enum";
9
+ import { IBankFlowConfigContextData } from "../flow-configs/bank_flow.config";
10
+ import { IBankEntity } from "../interface/bank.entity.interface";
11
+ import { BillingEntityModel } from "./billing.entity.model";
12
+ import { ClientEntityModel } from "./client.entity.model";
13
+ import { ClientAffiliateEntityModel } from "./client_affiliate.entity.model";
14
+ import { ClientDebitNoteEntityModel } from "./client_debit_note.entity.model";
15
+ import { ClientDebitNoteParticularsEntityModel } from "./client_debit_note_particulars.entity.model";
16
+ import { CountryEntityModel } from "./country.entity.model";
17
+ import { ExpenseHeadEntityModel } from "./expense_head.entity.model";
18
+ import { GstRateEntityModel } from "./gst_rate.entity.model";
3
19
  import { IntermediaryBankEntityModel } from "./intermediary_bank.entity.model";
20
+ import { LeaveEntityModel } from "./leave.entity.model";
21
+ import { LeaveApprovalEntityModel } from "./leave_approval.entity.model";
22
+ import { OfficeLocationEntityModel } from "./office_location.entity.model";
23
+ import { OrganizationEntityModel } from "./organization.entity.model";
24
+ import { OrganizationTypeEntityModel } from "./organization_type.entity.model";
25
+ import { ProjectEntityModel } from "./project.entity.model";
26
+ import { StateEntityModel } from "./state.entity.model";
27
+ import { TdsRateEntityModel } from "./tds_rate.entity.model";
28
+ import { ToDoListEntityModel } from "./to_do_list.entity.model";
29
+ import { VendorEntityModel } from "./vendor.entity.model";
30
+ import { VendorAdvanceEntityModel } from "./vendor_advance.entity.model";
31
+ import { VendorInvoiceEntityModel } from "./vendor_invoice.entity.model";
32
+ import { VendorInvoiceAdvanceEntityModel } from "./vendor_invoice_advance.entity.model";
33
+ import { VendorInvoiceItemEntityModel } from "./vendor_invoice_item.entity.model";
34
+ import { VendorInvoicePaymentEntityModel } from "./vendor_invoice_payment.entity.model";
35
+ import { VendorTdsChallanEntityModel } from "./vendor_tds_challan.entity.model";
36
+ import { VendorTdsLiabilityEntityModel } from "./vendor_tds_liability.entity.model";
37
+ import { VoucherTypeEntityModel } from "./voucher_type.entity.model";
38
+ import { WorkFromHomeEntityModel } from "./work_from_home.entity.model";
4
39
  export declare class BankEntityModel extends BaseEntityModel<EntityEnum.BANK> implements IBankEntity {
5
40
  id: number;
6
41
  accountName: string;
7
- organizationId: number;
8
42
  name: string;
9
43
  accountNo: string;
10
44
  branchAddress: string;
11
45
  ifscCode: string;
12
46
  emailForPaymentInfoCsv: string;
13
- status: BankStatusEnum;
14
- remark?: string;
15
47
  swiftAddress?: string;
16
- createdBy: number;
17
- updatedBy: number;
48
+ organizationId?: number;
49
+ remark?: string;
50
+ status: BankStatusEnum;
18
51
  createdOn: number;
19
52
  updatedOn: number;
53
+ createdBy: number;
54
+ updatedBy: number;
55
+ vendorTdsChallans?: VendorTdsChallanEntityModel[];
56
+ clientDebitNotes?: ClientDebitNoteEntityModel[];
20
57
  intermediaryBanks?: IntermediaryBankEntityModel[];
58
+ billings?: BillingEntityModel[];
59
+ static relationConfigs: RelationConfigs<[
60
+ EntityEnum.VENDOR_TDS_CHALLAN,
61
+ EntityEnum.CLIENT_DEBIT_NOTE,
62
+ EntityEnum.INTERMEDIARY_BANK,
63
+ EntityEnum.BILLING
64
+ ], EntityEnum.BANK>;
21
65
  static fromEntity(entity: IBankEntity): BankEntityModel;
22
66
  getRelationConfigs(): any[];
23
- static relationConfigs: RelationConfigs<[EntityEnum.INTERMEDIARY_BANK], EntityEnum.BANK>;
67
+ get tdsRates(): TdsRateEntityModel[] | undefined;
68
+ get organizationTypes(): OrganizationTypeEntityModel[] | undefined;
69
+ get vendors(): VendorEntityModel[] | undefined;
70
+ get states(): StateEntityModel[] | undefined;
71
+ get countrys(): CountryEntityModel[] | undefined;
72
+ get officeLocations(): OfficeLocationEntityModel[] | undefined;
73
+ get vendorInvoices(): VendorInvoiceEntityModel[] | undefined;
74
+ get vendorInvoiceItems(): VendorInvoiceItemEntityModel[] | undefined;
75
+ get voucherTypes(): VoucherTypeEntityModel[] | undefined;
76
+ get expenseHeads(): ExpenseHeadEntityModel[] | undefined;
77
+ get gstRates(): GstRateEntityModel[] | undefined;
78
+ get vendorAdvances(): VendorAdvanceEntityModel[] | undefined;
79
+ get vendorInvoiceAdvances(): VendorInvoiceAdvanceEntityModel[] | undefined;
80
+ get vendorInvoicePayments(): VendorInvoicePaymentEntityModel[] | undefined;
81
+ get organizations(): OrganizationEntityModel[] | undefined;
82
+ get vendorTdsLiabilitys(): VendorTdsLiabilityEntityModel[] | undefined;
83
+ get clients(): ClientEntityModel[] | undefined;
84
+ get users(): UserEntityModel[] | undefined;
85
+ get leaveApprovals(): LeaveApprovalEntityModel[] | undefined;
86
+ get leaves(): LeaveEntityModel[] | undefined;
87
+ get workFromHomes(): WorkFromHomeEntityModel[] | undefined;
88
+ get toDoLists(): ToDoListEntityModel[] | undefined;
89
+ get projects(): ProjectEntityModel[] | undefined;
90
+ get clientAffiliates(): ClientAffiliateEntityModel[] | undefined;
91
+ get clientDebitNoteParticularss(): ClientDebitNoteParticularsEntityModel[] | undefined;
92
+ getNextStatus(currentUser: IUserEntity, action: BankActionEnum, bankFlowConfigContextData: IBankFlowConfigContextData): BankStatusEnum;
93
+ getAvailableActions(currentUser: UserEntityModel, config?: {
94
+ combinedActions?: Record<string, {
95
+ combineActions: BankActionEnum[];
96
+ label: string;
97
+ }>;
98
+ customLabels?: Partial<Record<BankActionEnum, string>>;
99
+ }): IRowActions<EntityEnum.BANK>[];
100
+ getUpdateActionVisibility(currentUser: UserEntityModel): {
101
+ [key: string]: () => boolean;
102
+ };
24
103
  get intermediaryBankModel(): IntermediaryBankEntityModel[];
25
104
  getPaymentContactEmails(): string[];
26
105
  }