@autologix-engineering/shared 1.2.370 → 1.2.372

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autologix-engineering/shared",
3
- "version": "1.2.370",
3
+ "version": "1.2.372",
4
4
  "dependencies": {
5
5
  "tslib": "^2.3.0"
6
6
  },
@@ -11,6 +11,9 @@ export declare class CreateReportDTO {
11
11
  clientPersonaIds?: string[];
12
12
  clientGroup?: string[];
13
13
  bizTypes?: VehicleOwnershipType[];
14
+ vendorIds?: string[];
15
+ onlyExpired?: boolean;
16
+ onlyMandatory?: boolean;
14
17
  type?: ReportFileType;
15
18
  createdById?: string;
16
19
  constructor(obj?: Partial<CreateReportDTO>);
@@ -1,5 +1,5 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
- import { IsArray, IsDateString, IsEnum, IsOptional, IsString, IsUUID, } from 'class-validator';
2
+ import { IsArray, IsDateString, IsEnum, IsOptional, IsString, IsUUID, IsBoolean, } from 'class-validator';
3
3
  import { ReportDateType, ReportFileType, ReportModuleType, VehicleOwnershipType, } from '../../enums/src/index';
4
4
  export class CreateReportDTO {
5
5
  constructor(obj) {
@@ -61,6 +61,22 @@ __decorate([
61
61
  IsEnum(VehicleOwnershipType, { each: true }),
62
62
  __metadata("design:type", Array)
63
63
  ], CreateReportDTO.prototype, "bizTypes", void 0);
64
+ __decorate([
65
+ IsOptional(),
66
+ IsArray(),
67
+ IsUUID(undefined, { each: true }),
68
+ __metadata("design:type", Array)
69
+ ], CreateReportDTO.prototype, "vendorIds", void 0);
70
+ __decorate([
71
+ IsOptional(),
72
+ IsBoolean(),
73
+ __metadata("design:type", Boolean)
74
+ ], CreateReportDTO.prototype, "onlyExpired", void 0);
75
+ __decorate([
76
+ IsOptional(),
77
+ IsBoolean(),
78
+ __metadata("design:type", Boolean)
79
+ ], CreateReportDTO.prototype, "onlyMandatory", void 0);
64
80
  __decorate([
65
81
  IsOptional(),
66
82
  IsEnum(ReportFileType),
@@ -1 +1 @@
1
- {"version":3,"file":"create.report.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/create.report.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EACN,OAAO,EACP,YAAY,EACZ,MAAM,EACN,UAAU,EACV,QAAQ,EACR,MAAM,GACN,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,oBAAoB,GACpB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,OAAO,eAAe;IAqD3B,YAAY,GAA8B;QACzC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AAtDA;IADC,MAAM,EAAE;;kDACS;AAIlB;IAFC,UAAU,EAAE;IACZ,MAAM,CAAC,cAAc,CAAC;;iDACG;AAG1B;IADC,MAAM,CAAC,gBAAgB,CAAC;;mDACI;AAG7B;IADC,QAAQ,EAAE;;mDACQ;AAGnB;IADC,YAAY,EAAE;;iDACE;AAGjB;IADC,YAAY,EAAE;;+CACA;AAKf;IAHC,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;gDACf;AAKnB;IAHC,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;kDACb;AAKrB;IAHC,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;yDACN;AAK5B;IAHC,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;oDACF;AAKvB;IAHC,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,MAAM,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;iDACX;AAIlC;IAFC,UAAU,EAAE;IACZ,MAAM,CAAC,cAAc,CAAC;;6CACD;AAItB;IAFC,UAAU,EAAE;IACZ,MAAM,EAAE;;oDACY"}
1
+ {"version":3,"file":"create.report.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/create.report.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EACN,OAAO,EACP,YAAY,EACZ,MAAM,EACN,UAAU,EACV,QAAQ,EACR,MAAM,EACN,SAAS,GACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,oBAAoB,GACpB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,OAAO,eAAe;IAqE3B,YAAY,GAA8B;QACzC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AAtEA;IADC,MAAM,EAAE;;kDACS;AAIlB;IAFC,UAAU,EAAE;IACZ,MAAM,CAAC,cAAc,CAAC;;iDACG;AAG1B;IADC,MAAM,CAAC,gBAAgB,CAAC;;mDACI;AAG7B;IADC,QAAQ,EAAE;;mDACQ;AAGnB;IADC,YAAY,EAAE;;iDACE;AAGjB;IADC,YAAY,EAAE;;+CACA;AAKf;IAHC,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;gDACf;AAKnB;IAHC,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;kDACb;AAKrB;IAHC,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;yDACN;AAK5B;IAHC,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;oDACF;AAKvB;IAHC,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,MAAM,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;iDACX;AAQlC;IAHC,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;kDACb;AAIrB;IAFC,UAAU,EAAE;IACZ,SAAS,EAAE;;oDACU;AAItB;IAFC,UAAU,EAAE;IACZ,SAAS,EAAE;;sDACY;AAIxB;IAFC,UAAU,EAAE;IACZ,MAAM,CAAC,cAAc,CAAC;;6CACD;AAItB;IAFC,UAAU,EAAE;IACZ,MAAM,EAAE;;oDACY"}
@@ -35,7 +35,19 @@ export declare class GetContractDateChangesDTO {
35
35
  from?: string;
36
36
  to?: string;
37
37
  rentalType?: TermRentalType;
38
- /** Narrow to waived changes only — the ones worth a second look. */
38
+ /**
39
+ * Narrow by whether the change waived a hit cap.
40
+ *
41
+ * Three states, not two: `true` returns only overridden changes, `false`
42
+ * only the ordinary ones, and **omitting it returns both**. The transform
43
+ * therefore has to pass `undefined` straight through — coercing an absent
44
+ * parameter to `false` would silently turn "no filter" into "hide every
45
+ * override", which is the opposite of the default a report should have.
46
+ *
47
+ * The callback takes the raw value, not a `{ value }` params object: this
48
+ * repo pins class-transformer 0.3.1, where that destructuring form yields
49
+ * `undefined` and the flag reads `false` for every request.
50
+ */
39
51
  overriddenOnly?: boolean;
40
52
  /**
41
53
  * Whether to interleave `ConfigurationsActivityLog` entries for the two
@@ -83,13 +83,15 @@ __decorate([
83
83
  ], GetContractDateChangesDTO.prototype, "rentalType", void 0);
84
84
  __decorate([
85
85
  IsOptional(),
86
- Transform(({ value }) => value === true || value === 'true'),
86
+ Transform((value) => value === undefined || value === null || value === ''
87
+ ? undefined
88
+ : value === true || String(value) === 'true'),
87
89
  IsBoolean(),
88
90
  __metadata("design:type", Boolean)
89
91
  ], GetContractDateChangesDTO.prototype, "overriddenOnly", void 0);
90
92
  __decorate([
91
93
  IsOptional(),
92
- Transform(({ value }) => value === true || value === 'true'),
94
+ Transform((value) => value === true || String(value) === 'true'),
93
95
  IsBoolean(),
94
96
  __metadata("design:type", Boolean)
95
97
  ], GetContractDateChangesDTO.prototype, "includeConfigChanges", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"get.contract.date.changes.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/get.contract.date.changes.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EACN,SAAS,EACT,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,MAAM,EACN,GAAG,GACH,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;;GAMG;AACH,MAAM,OAAO,oCAAoC;IAgBhD,YAAY,GAAmD;QAC9D,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AAjBA;IADC,MAAM,EAAE;;6EACe;AAGxB;IADC,MAAM,EAAE;;uEACS;AASlB;IAFC,UAAU,EAAE;IACZ,MAAM,CAAC,cAAc,CAAC;;wEACK;AAO7B;;;;;;;GAOG;AACH,MAAM,OAAO,yBAAyB;IAqDrC,YAAY,GAAwC;QACnD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AAtDA;IADC,MAAM,EAAE;;4DACS;AAIlB;IAFC,UAAU,EAAE;IACZ,MAAM,EAAE;;kEACgB;AAIzB;IAFC,UAAU,EAAE;IACZ,SAAS,CAAC,MAAM,CAAC;;uDACJ;AAQd;IAJC,UAAU,EAAE;IACZ,QAAQ,EAAE;IACV,GAAG,CAAC,GAAG,CAAC;IACR,SAAS,CAAC,MAAM,CAAC;;uDACJ;AAKd;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;6DACS;AAIpB;IAFC,UAAU,EAAE;IACZ,YAAY,EAAE;;uDACD;AAId;IAFC,UAAU,EAAE;IACZ,YAAY,EAAE;;qDACH;AAIZ;IAFC,UAAU,EAAE;IACZ,MAAM,CAAC,cAAc,CAAC;;6DACK;AAM5B;IAHC,UAAU,EAAE;IACZ,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,MAAM,CAAC;IAC5D,SAAS,EAAE;;iEACa;AAUzB;IAHC,UAAU,EAAE;IACZ,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,MAAM,CAAC;IAC5D,SAAS,EAAE;;uEACmB"}
1
+ {"version":3,"file":"get.contract.date.changes.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/get.contract.date.changes.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EACN,SAAS,EACT,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,MAAM,EACN,GAAG,GACH,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;;GAMG;AACH,MAAM,OAAO,oCAAoC;IAgBhD,YAAY,GAAmD;QAC9D,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AAjBA;IADC,MAAM,EAAE;;6EACe;AAGxB;IADC,MAAM,EAAE;;uEACS;AASlB;IAFC,UAAU,EAAE;IACZ,MAAM,CAAC,cAAc,CAAC;;wEACK;AAO7B;;;;;;;GAOG;AACH,MAAM,OAAO,yBAAyB;IAqErC,YAAY,GAAwC;QACnD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AAtEA;IADC,MAAM,EAAE;;4DACS;AAIlB;IAFC,UAAU,EAAE;IACZ,MAAM,EAAE;;kEACgB;AAIzB;IAFC,UAAU,EAAE;IACZ,SAAS,CAAC,MAAM,CAAC;;uDACJ;AAQd;IAJC,UAAU,EAAE;IACZ,QAAQ,EAAE;IACV,GAAG,CAAC,GAAG,CAAC;IACR,SAAS,CAAC,MAAM,CAAC;;uDACJ;AAKd;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;6DACS;AAIpB;IAFC,UAAU,EAAE;IACZ,YAAY,EAAE;;uDACD;AAId;IAFC,UAAU,EAAE;IACZ,YAAY,EAAE;;qDACH;AAIZ;IAFC,UAAU,EAAE;IACZ,MAAM,CAAC,cAAc,CAAC;;6DACK;AAsB5B;IAPC,UAAU,EAAE;IACZ,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CACpB,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE;QACpD,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,KAAK,KAAK,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,MAAM,CAC7C;IACA,SAAS,EAAE;;iEACa;AAUzB;IAHC,UAAU,EAAE;IACZ,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC;IAChE,SAAS,EAAE;;uEACmB"}
@@ -2,7 +2,11 @@ export declare enum ReportModuleType {
2
2
  BusinessAssociateReimbursement = "BusinessAssociateReimbursement",
3
3
  OwnDriverReimbursement = "OwnDriverReimbursement",
4
4
  BAPayoutDeductions = "BAPayoutDeductions",
5
- BookingReport = "BookingReport"
5
+ BookingReport = "BookingReport",
6
+ /** AD-3177 — Report Center › Drivers › License Expiry. */
7
+ DriverLicenseExpiry = "DriverLicenseExpiry",
8
+ /** AD-3181 — Report Center › Vehicles › Compliance Validity. */
9
+ VehicleComplianceValidity = "VehicleComplianceValidity"
6
10
  }
7
11
  export declare enum ReportDateType {
8
12
  InvoiceDate = "InvoiceDate",
@@ -4,6 +4,10 @@ export var ReportModuleType;
4
4
  ReportModuleType["OwnDriverReimbursement"] = "OwnDriverReimbursement";
5
5
  ReportModuleType["BAPayoutDeductions"] = "BAPayoutDeductions";
6
6
  ReportModuleType["BookingReport"] = "BookingReport";
7
+ /** AD-3177 — Report Center › Drivers › License Expiry. */
8
+ ReportModuleType["DriverLicenseExpiry"] = "DriverLicenseExpiry";
9
+ /** AD-3181 — Report Center › Vehicles › Compliance Validity. */
10
+ ReportModuleType["VehicleComplianceValidity"] = "VehicleComplianceValidity";
7
11
  })(ReportModuleType || (ReportModuleType = {}));
8
12
  export var ReportDateType;
9
13
  (function (ReportDateType) {
@@ -1 +1 @@
1
- {"version":3,"file":"report.module.type.enum.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/enums/src/report.module.type.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC3B,qFAAiE,CAAA;IACjE,qEAAiD,CAAA;IACjD,6DAAyC,CAAA;IACzC,mDAA+B,CAAA;AAChC,CAAC,EALW,gBAAgB,KAAhB,gBAAgB,QAK3B;AAED,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACzB,6CAA2B,CAAA;IAC3B,2CAAyB,CAAA;IACzB,qDAAmC,CAAA;AACpC,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB"}
1
+ {"version":3,"file":"report.module.type.enum.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/enums/src/report.module.type.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC3B,qFAAiE,CAAA;IACjE,qEAAiD,CAAA;IACjD,6DAAyC,CAAA;IACzC,mDAA+B,CAAA;IAC/B,0DAA0D;IAC1D,+DAA2C,CAAA;IAC3C,gEAAgE;IAChE,2EAAuD,CAAA;AACxD,CAAC,EATW,gBAAgB,KAAhB,gBAAgB,QAS3B;AAED,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACzB,6CAA2B,CAAA;IAC3B,2CAAyB,CAAA;IACzB,qDAAmC,CAAA;AACpC,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB"}
@@ -27,16 +27,27 @@ export declare enum ClientContractDateChangeField {
27
27
  WindowLimit = "windowLimit"
28
28
  }
29
29
  /**
30
- * One row per counted contract date change, bucketed by client.
30
+ * One row per counted contract date change, bucketed by client and rental type.
31
31
  *
32
32
  * The rule this backs is a rolling budget: at most `windowLimit` date changes
33
- * per client within `windowDays` days, counted across every contract of that
34
- * client and across both STR and LTR. The window is anchored on the first
35
- * change; once it elapses the next change opens a fresh window.
33
+ * within `windowDays` days, counted across every contract of one client of one
34
+ * rental type. STR and LTR hold separate tallies under the same configured X
35
+ * and Y, so spending the STR budget never blocks an LTR change; the
36
+ * contract-file path, which has no rental type, counts in a third bucket of
37
+ * its own under NULL. The window is anchored on the first change; once it
38
+ * elapses the next change opens a fresh window.
36
39
  *
37
40
  * `windowStartedAt` is written at record time rather than derived on read, so
38
41
  * the current window is a single "newest row" lookup instead of a walk over
39
- * the whole history. Rows sharing a `windowStartedAt` are one window.
42
+ * the whole history. Rows sharing a bucket and a `windowStartedAt` are one
43
+ * window.
44
+ *
45
+ * A change made while the rule is switched off is still recorded, with
46
+ * `windowStartedAt` and `seqInWindow` NULL: it is history, but it was counted
47
+ * into nothing. That keeps this table a complete record of who moved contract
48
+ * dates rather than a side effect of enforcement being configured — and
49
+ * evaluation ignores those rows, so switching the rule on later does not
50
+ * retroactively spend a client's budget on changes no rule governed.
40
51
  *
41
52
  * `windowDays` / `windowLimit` capture X and Y **as configured at the time**.
42
53
  * They are audit only and never feed the decision — evaluation always reads
@@ -52,8 +63,8 @@ export interface IClientContractDateChange extends TypedModel {
52
63
  [ClientContractDateChangeField.ContractTermsId]?: string;
53
64
  [ClientContractDateChangeField.RentalType]?: TermRentalType;
54
65
  [ClientContractDateChangeField.ChangedAt]: Date;
55
- [ClientContractDateChangeField.WindowStartedAt]: Date;
56
- [ClientContractDateChangeField.SeqInWindow]: number;
66
+ [ClientContractDateChangeField.WindowStartedAt]?: Date;
67
+ [ClientContractDateChangeField.SeqInWindow]?: number;
57
68
  [ClientContractDateChangeField.OldStartDate]?: Date;
58
69
  [ClientContractDateChangeField.NewStartDate]?: Date;
59
70
  [ClientContractDateChangeField.OldEndDate]?: Date;