easywork-common-lib 1.0.1110 → 1.0.1112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,7 @@
1
- export * from './authentication.interface';
2
- export * from './crm.interface';
3
- export * from './file.interface';
4
- export * from './mail.interface';
5
- export * from './validator.interface';
6
- export * from './lsm.interface';
1
+ export * from "./authentication.interface";
2
+ export * from "./crm.interface";
3
+ export * from "./file.interface";
4
+ export * from "./mail.interface";
5
+ export * from "./validator.interface";
6
+ export * from "./lsm.interface";
7
+ export * from "./lead-validation-rules.interface";
@@ -20,4 +20,5 @@ __exportStar(require("./file.interface"), exports);
20
20
  __exportStar(require("./mail.interface"), exports);
21
21
  __exportStar(require("./validator.interface"), exports);
22
22
  __exportStar(require("./lsm.interface"), exports);
23
+ __exportStar(require("./lead-validation-rules.interface"), exports);
23
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/@types/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA2C;AAC3C,kDAAgC;AAChC,mDAAiC;AACjC,mDAAiC;AACjC,wDAAsC;AACtC,kDAAgC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/@types/interfaces/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA2C;AAC3C,kDAAgC;AAChC,mDAAiC;AACjC,mDAAiC;AACjC,wDAAsC;AACtC,kDAAgC;AAChC,oEAAkD"}
@@ -0,0 +1,29 @@
1
+ export declare enum FieldValidator {
2
+ IS_NOT_UNDEFINED = "isNotUndefined",
3
+ NOT_EMPTY = "notEmpty",
4
+ TRUTHY = "truthy"
5
+ }
6
+ export interface FieldValidation {
7
+ field: string;
8
+ required: boolean;
9
+ message: string;
10
+ validator?: FieldValidator | string;
11
+ appliesTo?: string[];
12
+ }
13
+ export interface RequiredDocument {
14
+ document: string;
15
+ required: boolean;
16
+ message: string;
17
+ appliesTo?: string[];
18
+ }
19
+ export interface LeadValidationRules {
20
+ fieldValidations?: FieldValidation[];
21
+ requiredDocuments?: RequiredDocument[];
22
+ metadata?: {
23
+ description?: string;
24
+ version?: string;
25
+ lastModified?: Date;
26
+ lastModifiedBy?: string;
27
+ enabled?: boolean;
28
+ };
29
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FieldValidator = void 0;
4
+ var FieldValidator;
5
+ (function (FieldValidator) {
6
+ FieldValidator["IS_NOT_UNDEFINED"] = "isNotUndefined";
7
+ FieldValidator["NOT_EMPTY"] = "notEmpty";
8
+ FieldValidator["TRUTHY"] = "truthy";
9
+ })(FieldValidator || (exports.FieldValidator = FieldValidator = {}));
10
+ //# sourceMappingURL=lead-validation-rules.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lead-validation-rules.interface.js","sourceRoot":"","sources":["../../../../src/common/@types/interfaces/lead-validation-rules.interface.ts"],"names":[],"mappings":";;;AAGA,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,qDAAmC,CAAA;IACnC,wCAAsB,CAAA;IACtB,mCAAiB,CAAA;AACnB,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB"}
@@ -14,3 +14,4 @@ export * from "./poliza";
14
14
  export * from "./poliza_pdf.entity";
15
15
  export * from "./import-session.entity";
16
16
  export * from "./policy-comment.entity";
17
+ export * from "./lead-validation-rule.entity";
@@ -30,4 +30,5 @@ __exportStar(require("./poliza"), exports);
30
30
  __exportStar(require("./poliza_pdf.entity"), exports);
31
31
  __exportStar(require("./import-session.entity"), exports);
32
32
  __exportStar(require("./policy-comment.entity"), exports);
33
+ __exportStar(require("./lead-validation-rule.entity"), exports);
33
34
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/sales/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,0DAAwC;AACxC,mDAAiC;AACjC,gEAA8C;AAC9C,wDAAsC;AACtC,mDAAiC;AACjC,gDAA8B;AAC9B,2DAAyC;AACzC,kDAAgC;AAChC,2DAAyC;AACzC,kDAAgC;AAChC,iDAA+B;AAC/B,2CAAyB;AACzB,sDAAoC;AACpC,0DAAwC;AACxC,0DAAwC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/sales/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,0DAAwC;AACxC,mDAAiC;AACjC,gEAA8C;AAC9C,wDAAsC;AACtC,mDAAiC;AACjC,gDAA8B;AAC9B,2DAAyC;AACzC,kDAAgC;AAChC,2DAAyC;AACzC,kDAAgC;AAChC,iDAA+B;AAC/B,2CAAyB;AACzB,sDAAoC;AACpC,0DAAwC;AACxC,0DAAwC;AACxC,gEAA8C"}
@@ -1,20 +1,7 @@
1
1
  import { BaseEntitySimple } from "../../common/database/base.entity";
2
2
  import { Group } from "../group.entity";
3
+ import { LeadValidationRules } from "../../common/@types/interfaces";
3
4
  export declare class LeadValidationRule extends BaseEntitySimple {
4
5
  group: Group | null;
5
- rules: {
6
- fieldValidations?: Array<{
7
- field: string;
8
- required: boolean;
9
- message: string;
10
- validator?: string;
11
- appliesTo?: string[];
12
- }>;
13
- requiredDocuments?: Array<{
14
- document: string;
15
- required: boolean;
16
- message: string;
17
- appliesTo?: string[];
18
- }>;
19
- };
6
+ rules: LeadValidationRules;
20
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"lead-validation-rule.entity.js","sourceRoot":"","sources":["../../../src/entities/sales/lead-validation-rule.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mEAAqE;AACrE,qCAAgE;AAChE,kDAAwC;AAGjC,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,8BAAgB;IAGtD,KAAK,CAAe;IAGpB,KAAK,CAcH;CACH,CAAA;AArBY,gDAAkB;AAG7B;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC/D,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;8BAC1B,oBAAK;iDAAQ;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;iDAexB;6BApBS,kBAAkB;IAD9B,IAAA,gBAAM,EAAC,uBAAuB,CAAC;GACnB,kBAAkB,CAqB9B"}
1
+ {"version":3,"file":"lead-validation-rule.entity.js","sourceRoot":"","sources":["../../../src/entities/sales/lead-validation-rule.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mEAAqE;AACrE,qCAAgE;AAChE,kDAAwC;AAIjC,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,8BAAgB;IAGtD,KAAK,CAAe;IAGpB,KAAK,CAAsB;CAC5B,CAAA;AAPY,gDAAkB;AAG7B;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC/D,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;8BAC1B,oBAAK;iDAAQ;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;iDACC;6BANhB,kBAAkB;IAD9B,IAAA,gBAAM,EAAC,uBAAuB,CAAC;GACnB,kBAAkB,CAO9B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easywork-common-lib",
3
- "version": "1.0.1110",
3
+ "version": "1.0.1112",
4
4
  "description": "Librería común de Easywork",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",