@autologix-engineering/shared 1.2.381 → 1.2.383

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 (51) hide show
  1. package/package.json +1 -1
  2. package/src/lib/data-transfer-objects/src/add.ltr.payout.rows.dto.d.ts +15 -1
  3. package/src/lib/data-transfer-objects/src/add.ltr.payout.rows.dto.js +1 -0
  4. package/src/lib/data-transfer-objects/src/add.ltr.payout.rows.dto.js.map +1 -1
  5. package/src/lib/data-transfer-objects/src/calculate.ltr.payout.rows.dto.d.ts +14 -1
  6. package/src/lib/data-transfer-objects/src/calculate.ltr.payout.rows.dto.js +1 -0
  7. package/src/lib/data-transfer-objects/src/calculate.ltr.payout.rows.dto.js.map +1 -1
  8. package/src/lib/data-transfer-objects/src/check.vehicle.allocation.conflicts.dto.d.ts +6 -3
  9. package/src/lib/data-transfer-objects/src/check.vehicle.allocation.conflicts.dto.js +6 -3
  10. package/src/lib/data-transfer-objects/src/check.vehicle.allocation.conflicts.dto.js.map +1 -1
  11. package/src/lib/data-transfer-objects/src/create.update.ba.contract.dto.d.ts +16 -0
  12. package/src/lib/data-transfer-objects/src/create.update.ba.contract.dto.js +7 -3
  13. package/src/lib/data-transfer-objects/src/create.update.ba.contract.dto.js.map +1 -1
  14. package/src/lib/data-transfer-objects/src/create.work.order.dispatch.dto.d.ts +31 -1
  15. package/src/lib/data-transfer-objects/src/create.work.order.dispatch.dto.js +46 -1
  16. package/src/lib/data-transfer-objects/src/create.work.order.dispatch.dto.js.map +1 -1
  17. package/src/lib/data-transfer-objects/src/get.contract.date.changes.dto.js +3 -1
  18. package/src/lib/data-transfer-objects/src/get.contract.date.changes.dto.js.map +1 -1
  19. package/src/lib/data-transfer-objects/src/update.dispatch.dto.d.ts +2 -0
  20. package/src/lib/data-transfer-objects/src/update.dispatch.dto.js +13 -1
  21. package/src/lib/data-transfer-objects/src/update.dispatch.dto.js.map +1 -1
  22. package/src/lib/data-transfer-objects/src/update.global.config.billing.dto.d.ts +2 -2
  23. package/src/lib/data-transfer-objects/src/update.global.config.billing.dto.js +4 -3
  24. package/src/lib/data-transfer-objects/src/update.global.config.billing.dto.js.map +1 -1
  25. package/src/lib/data-transfer-objects/src/update.safety.and.compliance.config.dto.d.ts +9 -1
  26. package/src/lib/data-transfer-objects/src/update.safety.and.compliance.config.dto.js +1 -0
  27. package/src/lib/data-transfer-objects/src/update.safety.and.compliance.config.dto.js.map +1 -1
  28. package/src/lib/data-transfer-objects/src/update.work.order.dispatch.status.dto.d.ts +2 -0
  29. package/src/lib/data-transfer-objects/src/update.work.order.dispatch.status.dto.js +13 -1
  30. package/src/lib/data-transfer-objects/src/update.work.order.dispatch.status.dto.js.map +1 -1
  31. package/src/lib/enums/src/retry.task.enum.d.ts +7 -1
  32. package/src/lib/enums/src/retry.task.enum.js +6 -0
  33. package/src/lib/enums/src/retry.task.enum.js.map +1 -1
  34. package/src/lib/enums/src/vehicle.allocation.conflict.enum.d.ts +9 -5
  35. package/src/lib/enums/src/vehicle.allocation.conflict.enum.js +9 -5
  36. package/src/lib/enums/src/vehicle.allocation.conflict.enum.js.map +1 -1
  37. package/src/lib/models/src/bill.matrix.model.d.ts +2 -2
  38. package/src/lib/models/src/configurations.model.d.ts +3 -2
  39. package/src/lib/models/src/configurations.model.js +3 -2
  40. package/src/lib/models/src/configurations.model.js.map +1 -1
  41. package/src/lib/models/src/payment.model.d.ts +3 -1
  42. package/src/lib/models/src/payment.model.js +1 -0
  43. package/src/lib/models/src/payment.model.js.map +1 -1
  44. package/src/lib/utilities/src/booking.selected.package.gate.d.ts +29 -0
  45. package/src/lib/utilities/src/booking.selected.package.gate.js +47 -0
  46. package/src/lib/utilities/src/booking.selected.package.gate.js.map +1 -0
  47. package/src/lib/utilities/src/index.d.ts +1 -0
  48. package/src/lib/utilities/src/index.js +1 -0
  49. package/src/lib/utilities/src/index.js.map +1 -1
  50. package/src/lib/view-models/src/ext.rate.card.d.ts +10 -0
  51. package/src/lib/view-models/src/vehicle.allocation.conflict.d.ts +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autologix-engineering/shared",
3
- "version": "1.2.381",
3
+ "version": "1.2.383",
4
4
  "dependencies": {
5
5
  "tslib": "^2.3.0"
6
6
  },
@@ -17,7 +17,21 @@ export declare class AddLTRPayoutRowImageDTO {
17
17
  * land on the last row so nothing is counted three times.
18
18
  */
19
19
  export declare class AddLTRPayoutRowsDTO {
20
- contextId: string;
20
+ /**
21
+ * Optional, and only ever used for logging.
22
+ *
23
+ * The booking is the authority on which context an entry belongs to, and
24
+ * `requestId` already names it: the controller falls back to the vehicle
25
+ * master's own context, and the charge calculation reads the fuel-price
26
+ * context off the booking (`Request.vendorContextId`), never from here.
27
+ * The only value this field carries reaches a log line and nothing else.
28
+ *
29
+ * Required, it could reject an otherwise valid entry before the controller
30
+ * ran — a 400 from the validation pipe, which logs nothing — for a field
31
+ * that changes no behaviour. It is also the one context in the payload the
32
+ * server has no reason to take on the caller's word.
33
+ */
34
+ contextId?: string;
21
35
  requestId: string;
22
36
  /**
23
37
  * The driver making the entry. Recorded as the entry's author on the row
@@ -29,6 +29,7 @@ export class AddLTRPayoutRowsDTO {
29
29
  }
30
30
  }
31
31
  __decorate([
32
+ IsOptional(),
32
33
  IsUUID(),
33
34
  __metadata("design:type", String)
34
35
  ], AddLTRPayoutRowsDTO.prototype, "contextId", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"add.ltr.payout.rows.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/add.ltr.payout.rows.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EACN,OAAO,EACP,SAAS,EACT,KAAK,EACL,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,MAAM,EACN,OAAO,EACP,GAAG,EACH,UAAU,EACV,cAAc,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,mBAAm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AE;;0DACY;AAIvB;IAFC,UAAU,CAAC,CAAC,CAAsB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;IACtD,QAAQ,EAAE;;2DACa;AAIxB;IAFC,UAAU,CAAC,CAAC,CAAsB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;IACtD,QAAQ,EAAE;;oDACM;AAIjB;IAFC,UAAU,CAAC,CAAC,CAAsB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;IACtD,QAAQ,EAAE;;kDACI;AAsBf;IANC,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,OAAO,CAAC,uBAAuB,EAAE;QACjC,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,2CAA2C;KACpD,CAAC;;2DACwB;AAW1B;IAHC,UAAU,EAAE;IACZ,cAAc,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAI,CAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC;;mDACD;AAKnC;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;iDACG;AAId;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;oDACM;AAIjB;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;mDACK;AAIhB;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;uDACS;AAIpB;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;wDACU;AAWrB;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;uDACS;AAIpB;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;oDACM"}
1
+ {"version":3,"file":"add.ltr.payout.rows.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/add.ltr.payout.rows.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EACN,OAAO,EACP,SAAS,EACT,KAAK,EACL,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,MAAM,EACN,OAAO,EACP,GAAG,EAC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C,CAAC;;kDACQ;AAYf;IAFC,UAAU,CAAC,CAAC,CAAsB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;IACtD,QAAQ,EAAE;;0DACY;AAIvB;IAFC,UAAU,CAAC,CAAC,CAAsB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;IACtD,QAAQ,EAAE;;2DACa;AAIxB;IAFC,UAAU,CAAC,CAAC,CAAsB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;IACtD,QAAQ,EAAE;;oDACM;AAIjB;IAFC,UAAU,CAAC,CAAC,CAAsB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;IACtD,QAAQ,EAAE;;kDACI;AAsBf;IANC,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,OAAO,CAAC,uBAAuB,EAAE;QACjC,IAAI,EAAE,IAAI;QACV,OAAO,EAAE,2CAA2C;KACpD,CAAC;;2DACwB;AAW1B;IAHC,UAAU,EAAE;IACZ,cAAc,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAI,CAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC;;mDACD;AAKnC;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;iDACG;AAId;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;oDACM;AAIjB;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;mDACK;AAIhB;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;uDACS;AAIpB;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;wDACU;AAWrB;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;uDACS;AAIpB;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;oDACM"}
@@ -1,5 +1,18 @@
1
1
  export declare class CalculateLTRPayoutRowsDTO {
2
- contextId: string;
2
+ /**
3
+ * Optional, and only ever used for logging.
4
+ *
5
+ * The controller destructures this for its opening `_logger.log` and
6
+ * nothing else — the context that drives the fuel-price lookups is read
7
+ * off the booking (`Request.vendorContextId`), never from here.
8
+ *
9
+ * Optional so the declared type matches how it is actually called:
10
+ * AddLTRPayoutRows invokes this controller as a direct method call, where
11
+ * no validation pipe runs, and passes its own `contextId` straight
12
+ * through. Once that field is optional too (#3850) the value is genuinely
13
+ * `string | undefined`, which is what this declaration now admits.
14
+ */
15
+ contextId?: string;
3
16
  validRows: any[];
4
17
  pickupTime?: string;
5
18
  dropTime?: string;
@@ -6,6 +6,7 @@ export class CalculateLTRPayoutRowsDTO {
6
6
  }
7
7
  }
8
8
  __decorate([
9
+ IsOptional(),
9
10
  IsUUID(),
10
11
  IsNotEmpty(),
11
12
  __metadata("design:type", String)
@@ -1 +1 @@
1
- {"version":3,"file":"calculate.ltr.payout.rows.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/calculate.ltr.payout.rows.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EACN,OAAO,EACP,SAAS,EACT,MAAM,EACN,UAAU,EACV,UAAU,EACV,QAAQ,GACR,MAAM,iBAAiB,CAAC;AAEzB,MAAM,OAAO,yBAAyB;IAyBrC,YAAY,GAAwC;QACnD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AAzBA;IAFC,MAAM,EAAE;IACR,UAAU,EAAE;;4DACK;AAIlB;IAFC,OAAO,EAAE;IACT,UAAU,EAAE;;4DACI;AAIjB;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;6DACO;AAIpB;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;2DACK;AAGlB;IADC,MAAM,EAAE;;4DACS;AAKlB;IAFC,SAAS,EAAE;IACX,UAAU,EAAE;;oEACe"}
1
+ {"version":3,"file":"calculate.ltr.payout.rows.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/calculate.ltr.payout.rows.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EACN,OAAO,EACP,SAAS,EACT,MAAM,EACN,UAAU,EACV,UAAU,EACV,QAAQ,GACR,MAAM,iBAAiB,CAAC;AAEzB,MAAM,OAAO,yBAAyB;IAuCrC,YAAY,GAAwC;QACnD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AAzBA;IAHC,UAAU,EAAE;IACZ,MAAM,EAAE;IACR,UAAU,EAAE;;4DACM;AAInB;IAFC,OAAO,EAAE;IACT,UAAU,EAAE;;4DACI;AAIjB;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;6DACO;AAIpB;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;2DACK;AAGlB;IADC,MAAM,EAAE;;4DACS;AAKlB;IAFC,SAAS,EAAE;IACX,UAAU,EAAE;;oEACe"}
@@ -6,9 +6,12 @@
6
6
  * useful before a duty exists (a vehicle picker on a draft), in which case
7
7
  * nothing is excluded.
8
8
  *
9
- * `pickupTime` is the pickup of the duty being allocated, used for the
10
- * same-slot rule. Sent as an ISO-8601 instant (UTC) — never a wall-clock
11
- * string — so the server is not left guessing which timezone the browser meant.
9
+ * `pickupTime` is the pickup of the duty being allocated. Both time-based
10
+ * rules are anchored on it: the configured window brackets it either side, and
11
+ * the +/-30 minute same-slot rule sits inside that. Sent as an ISO-8601 instant
12
+ * (UTC) — never a wall-clock string — so the server is not left guessing which
13
+ * timezone the browser meant. Optional, and when it is absent or unparseable
14
+ * both of those rules are skipped; only the ongoing-trip check still applies.
12
15
  */
13
16
  export declare class CheckVehicleAllocationConflictsDTO {
14
17
  contextId: string;
@@ -8,9 +8,12 @@ import { IsISO8601, IsOptional, IsUUID } from 'class-validator';
8
8
  * useful before a duty exists (a vehicle picker on a draft), in which case
9
9
  * nothing is excluded.
10
10
  *
11
- * `pickupTime` is the pickup of the duty being allocated, used for the
12
- * same-slot rule. Sent as an ISO-8601 instant (UTC) — never a wall-clock
13
- * string — so the server is not left guessing which timezone the browser meant.
11
+ * `pickupTime` is the pickup of the duty being allocated. Both time-based
12
+ * rules are anchored on it: the configured window brackets it either side, and
13
+ * the +/-30 minute same-slot rule sits inside that. Sent as an ISO-8601 instant
14
+ * (UTC) — never a wall-clock string — so the server is not left guessing which
15
+ * timezone the browser meant. Optional, and when it is absent or unparseable
16
+ * both of those rules are skipped; only the ongoing-trip check still applies.
14
17
  */
15
18
  export class CheckVehicleAllocationConflictsDTO {
16
19
  constructor(obj) {
@@ -1 +1 @@
1
- {"version":3,"file":"check.vehicle.allocation.conflicts.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/check.vehicle.allocation.conflicts.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEhE;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,kCAAkC;IAe9C,YAAY,GAAiD;QAC5D,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AAhBA;IADC,MAAM,EAAE;;qEACS;AAGlB;IADC,MAAM,EAAE;;gFACoB;AAI7B;IAFC,UAAU,EAAE;IACZ,MAAM,EAAE;;qEACU;AAInB;IAFC,UAAU,EAAE;IACZ,SAAS,EAAE;;sEACQ"}
1
+ {"version":3,"file":"check.vehicle.allocation.conflicts.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/check.vehicle.allocation.conflicts.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEhE;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,kCAAkC;IAe9C,YAAY,GAAiD;QAC5D,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AAhBA;IADC,MAAM,EAAE;;qEACS;AAGlB;IADC,MAAM,EAAE;;gFACoB;AAI7B;IAFC,UAAU,EAAE;IACZ,MAAM,EAAE;;qEACU;AAInB;IAFC,UAAU,EAAE;IACZ,SAAS,EAAE;;sEACQ"}
@@ -25,6 +25,22 @@ export declare class CreateBAContractDTO {
25
25
  yourShare?: number;
26
26
  depositAmount?: number;
27
27
  sdStatus?: string;
28
+ /**
29
+ * The Cheque/UTR date. REQUIRED whenever a deposit amount is present, because
30
+ * it is the only thing that places the deposit in a financial year — the SD
31
+ * schedule (AD-3097) counts an addition in the year of this date and has no
32
+ * fallback, so an undated deposit is counted in no year at all while its
33
+ * refund still is, producing a negative closing balance.
34
+ *
35
+ * The contract form already enforces this (Yup, add.ba.contract.tsx), and the
36
+ * same form serves add, copy, update and extend. This is the server-side half:
37
+ * without it the rule holds for the browser and not for any other caller.
38
+ *
39
+ * `@ValidateIf` rather than `@IsOptional`: IsOptional skips validation whenever
40
+ * the value is null/undefined, which is exactly the case that must fail here.
41
+ * When there is no deposit, ValidateIf short-circuits and the field stays
42
+ * genuinely optional.
43
+ */
28
44
  transactionDate?: string;
29
45
  bankName?: string;
30
46
  transactionType?: string;
@@ -1,5 +1,5 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
- import { IsUUID, IsEnum, IsDateString, IsNumber, IsString, IsOptional, Min, Max, IsArray, ValidateNested, } from 'class-validator';
2
+ import { IsUUID, IsEnum, IsDateString, IsNumber, IsString, IsOptional, Min, Max, IsArray, ValidateNested, ValidateIf, } from 'class-validator';
3
3
  import { Transform, Type } from 'class-transformer';
4
4
  import { BAContractType, FixedCostType, BAContractStatus, } from '../../enums/src';
5
5
  /**
@@ -159,8 +159,12 @@ __decorate([
159
159
  __metadata("design:type", String)
160
160
  ], CreateBAContractDTO.prototype, "sdStatus", void 0);
161
161
  __decorate([
162
- IsOptional(),
163
- IsDateString(),
162
+ ValidateIf((o) => o.depositAmount !== null &&
163
+ o.depositAmount !== undefined &&
164
+ Number(o.depositAmount) > 0),
165
+ IsDateString({}, {
166
+ message: 'transactionDate (Cheque/UTR date) is required when a deposit amount is entered.',
167
+ }),
164
168
  __metadata("design:type", String)
165
169
  ], CreateBAContractDTO.prototype, "transactionDate", void 0);
166
170
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"create.update.ba.contract.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/create.update.ba.contract.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EACN,MAAM,EACN,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,GAAG,EACH,GAAG,EAEH,OAAO,EACP,cAAc,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EACN,cAAc,EACd,aAAa,EACb,gBAAgB,GAChB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;GASG;AACH,MAAM,gBAAgB,GAAG,CAAC,KAAc,EAAiB,EAAE,CAC1D,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAE9E,uDAAuD;AACvD,MAAM,OAAO,mBAAmB;IAgN/B,YAAY,GAAkC;QAC7C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AAjNA;IADC,MAAM,EAAE;;gEACmB;AAG5B;IADC,MAAM,EAAE;;sDACS;AAIlB;IADC,MAAM,CAAC,cAAc,CAAC;;yDACM;AAG7B;IADC,MAAM,EAAE;;iEACoB;AAG7B;IADC,YAAY,EAAE;;8DACW;AAK1B;IAHC,QAAQ,EAAE;IACV,SAAS,CAAC,MAAM,CAAC;IACjB,GAAG,CAAC,CAAC,CAAC;;yDACc;AAMrB;IAJC,UAAU,EAAE;IACZ,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C1B,CAAC;CACD;AALA;IADC,MAAM,EAAE;;uDACY;AAOtB,MAAM,OAAO,mBAAmB;CAW/B;AATA;IADC,MAAM,CAAC,aAAa,CAAC;;sDACG;AAKzB;IAHC,UAAU,EAAE;IACZ,QAAQ,CAAC,EAAE,gBAAgB,EAAE,CAAC,EAAE,CAAC;IACjC,SAAS,CAAC,MAAM,CAAC;;kDACJ;AAGd;IADC,QAAQ,EAAE;;qDACM"}
1
+ {"version":3,"file":"create.update.ba.contract.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/create.update.ba.contract.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EACN,MAAM,EACN,MAAM,EACN,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,GAAG,EACH,GAAG,EAEH,OAAO,EACP,cAAc,EACd,UAAU,GACV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EACN,cAAc,EACd,aAAa,EACb,gBAAgB,GAChB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;GASG;AACH,MAAM,gBAAgB,GAAG,CAAC,KAAc,EAAiB,EAAE,CAC1D,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAE9E,uDAAuD;AACvD,MAAM,OAAO,mBAAmB;IA2O/B,YAAY,GAAkC;QAC7C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AA5OA;IADC,MAAM,EAAE;;gEACmB;AAG5B;IADC,MAAM,EAAE;;sDACS;AAIlB;IADC,MAAM,CAAC,cAAc,CAAC;;yDACM;AAG7B;IADC,MAAM,EAAE;;iEACoB;AAG7B;IADC,YAAY,EAAE;;8DACW;AAK1B;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CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AAfA;IADC,MAAM,EAAE;;0DACY;AAGrB;IADC,QAAQ,EAAE;;6DACa;AAGxB;IADC,YAAY,EAAE;;oEACgB;AAI/B;IAFC,UAAU,EAAE;IACZ,MAAM,EAAE;;uDACU;AAOpB,MAAM,OAAO,iBAAiB;IAI7B,YAAY,GAAgC;QAC3C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AALA;IADC,MAAM,EAAE;;uDACY;AAOtB,MAAM,OAAO,mBAAmB;CAW/B;AATA;IADC,MAAM,CAAC,aAAa,CAAC;;sDACG;AAKzB;IAHC,UAAU,EAAE;IACZ,QAAQ,CAAC,EAAE,gBAAgB,EAAE,CAAC,EAAE,CAAC;IACjC,SAAS,CAAC,MAAM,CAAC;;kDACJ;AAGd;IADC,QAAQ,EAAE;;qDACM"}
@@ -1,4 +1,34 @@
1
+ import { GetWorkOrdersToDispatchDTO } from './get.work.orders.to.dispatch.dto';
2
+ /**
3
+ * The list filters "select all" resolves against, as they arrive nested in a
4
+ * dispatch request.
5
+ *
6
+ * Identical to `GetWorkOrdersToDispatchDTO` but for `contextId`, which is
7
+ * optional here: the controller always overwrites it with the request's
8
+ * top-level `contextId` before resolving ids, so the value sent in `filters`
9
+ * is never read. Left required, `@ValidateNested()` still enforced it, and a
10
+ * caller that sensibly omitted a field the backend ignores got the whole
11
+ * request rejected with "contextId must be a UUID" — pointing at the nested
12
+ * copy while the real one was supplied and valid.
13
+ *
14
+ * A subclass rather than a TypeScript `Omit<>`: `@Type()` resolves the class
15
+ * at runtime and class-validator validates against it, so a type-only omission
16
+ * would change nothing about the error. Declared here rather than by relaxing
17
+ * the shared query DTO, which would drop the guarantee for the GET endpoint
18
+ * that genuinely requires the field.
19
+ */
20
+ export declare class WorkOrderDispatchFiltersDTO extends GetWorkOrdersToDispatchDTO {
21
+ contextId: string;
22
+ }
1
23
  export declare class CreateWorkOrderDispatchDTO {
2
24
  contextId: string;
3
- workOrderIds: string[];
25
+ /**
26
+ * Optional because `selectAll` mode resolves the ids server-side and
27
+ * legitimately sends none — `@ValidateIf` already only demands them when
28
+ * `selectAll` is falsy, so the required typing was contradicted at runtime.
29
+ */
30
+ workOrderIds?: string[];
31
+ selectAll?: boolean;
32
+ excludedIds?: string[];
33
+ filters?: WorkOrderDispatchFiltersDTO;
4
34
  }
@@ -1,5 +1,32 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
- import { IsArray, IsNotEmpty, IsString, IsUUID } from 'class-validator';
2
+ import { IsArray, IsBoolean, IsNotEmpty, IsOptional, IsString, IsUUID, ValidateIf, ValidateNested, } from 'class-validator';
3
+ import { Type } from 'class-transformer';
4
+ import { GetWorkOrdersToDispatchDTO } from './get.work.orders.to.dispatch.dto';
5
+ /**
6
+ * The list filters "select all" resolves against, as they arrive nested in a
7
+ * dispatch request.
8
+ *
9
+ * Identical to `GetWorkOrdersToDispatchDTO` but for `contextId`, which is
10
+ * optional here: the controller always overwrites it with the request's
11
+ * top-level `contextId` before resolving ids, so the value sent in `filters`
12
+ * is never read. Left required, `@ValidateNested()` still enforced it, and a
13
+ * caller that sensibly omitted a field the backend ignores got the whole
14
+ * request rejected with "contextId must be a UUID" — pointing at the nested
15
+ * copy while the real one was supplied and valid.
16
+ *
17
+ * A subclass rather than a TypeScript `Omit<>`: `@Type()` resolves the class
18
+ * at runtime and class-validator validates against it, so a type-only omission
19
+ * would change nothing about the error. Declared here rather than by relaxing
20
+ * the shared query DTO, which would drop the guarantee for the GET endpoint
21
+ * that genuinely requires the field.
22
+ */
23
+ export class WorkOrderDispatchFiltersDTO extends GetWorkOrdersToDispatchDTO {
24
+ }
25
+ __decorate([
26
+ IsOptional(),
27
+ IsUUID(),
28
+ __metadata("design:type", String)
29
+ ], WorkOrderDispatchFiltersDTO.prototype, "contextId", void 0);
3
30
  export class CreateWorkOrderDispatchDTO {
4
31
  }
5
32
  __decorate([
@@ -8,9 +35,27 @@ __decorate([
8
35
  __metadata("design:type", String)
9
36
  ], CreateWorkOrderDispatchDTO.prototype, "contextId", void 0);
10
37
  __decorate([
38
+ ValidateIf((o) => !o.selectAll),
11
39
  IsArray(),
12
40
  IsString({ each: true }),
13
41
  IsNotEmpty(),
14
42
  __metadata("design:type", Array)
15
43
  ], CreateWorkOrderDispatchDTO.prototype, "workOrderIds", void 0);
44
+ __decorate([
45
+ IsOptional(),
46
+ IsBoolean(),
47
+ __metadata("design:type", Boolean)
48
+ ], CreateWorkOrderDispatchDTO.prototype, "selectAll", void 0);
49
+ __decorate([
50
+ IsOptional(),
51
+ IsArray(),
52
+ IsString({ each: true }),
53
+ __metadata("design:type", Array)
54
+ ], CreateWorkOrderDispatchDTO.prototype, "excludedIds", void 0);
55
+ __decorate([
56
+ ValidateIf((o) => !!o.selectAll),
57
+ ValidateNested(),
58
+ Type(() => WorkOrderDispatchFiltersDTO),
59
+ __metadata("design:type", WorkOrderDispatchFiltersDTO)
60
+ ], CreateWorkOrderDispatchDTO.prototype, "filters", void 0);
16
61
  //# sourceMappingURL=create.work.order.dispatch.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create.work.order.dispatch.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/create.work.order.dispatch.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAExE,MAAM,OAAO,0BAA0B;CAStC;AANA;IAFC,UAAU,EAAE;IACZ,MAAM,EAAE;;6DACS;AAKlB;IAHC,OAAO,EAAE;IACT,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACxB,UAAU,EAAE;;gEACU"}
1
+ {"version":3,"file":"create.work.order.dispatch.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/create.work.order.dispatch.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EACN,OAAO,EACP,SAAS,EACT,UAAU,EACV,UAAU,EACV,QAAQ,EACR,MAAM,EACN,UAAU,EACV,cAAc,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAE/E;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,2BAA4B,SAAQ,0BAA0B;CAI1E;AADQ;IAFP,UAAU,EAAE;IACZ,MAAM,EAAE;;8DACiB;AAG3B,MAAM,OAAO,0BAA0B;CA6BtC;AA1BA;IAFC,UAAU,EAAE;IACZ,MAAM,EAAE;;6DACS;AAWlB;IAJC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC/B,OAAO,EAAE;IACT,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IACxB,UAAU,EAAE;;gEACW;AAIxB;IAFC,UAAU,EAAE;IACZ,SAAS,EAAE;;6DACQ;AAKpB;IAHC,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;+DACF;AAKvB;IAHC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAChC,cAAc,EAAE;IAChB,IAAI,CAAC,GAAG,EAAE,CAAC,2BAA2B,CAAC;8BAC9B,2BAA2B;2DAAC"}
@@ -1,6 +1,6 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import { Transform } from 'class-transformer';
3
- import { IsBoolean, IsDateString, IsEnum, IsNumber, IsOptional, IsString, IsUUID, Max, } from 'class-validator';
3
+ import { IsBoolean, IsDateString, IsEnum, IsNumber, IsOptional, IsString, IsUUID, Max, Min, } from 'class-validator';
4
4
  import { TermRentalType } from '../../enums/src/index';
5
5
  /**
6
6
  * Current date-change budget for one (client, rental type) bucket.
@@ -51,6 +51,8 @@ __decorate([
51
51
  ], GetContractDateChangesDTO.prototype, "clientPersonaId", void 0);
52
52
  __decorate([
53
53
  IsOptional(),
54
+ IsNumber(),
55
+ Min(0),
54
56
  Transform(Number),
55
57
  __metadata("design:type", Number)
56
58
  ], GetContractDateChangesDTO.prototype, "skip", 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;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"}
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,EACH,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,M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{ DispatchStatus } from '../../enums/src';
2
2
  export declare class UpdateDispatchDto {
3
3
  dispatchId: string;
4
4
  requestIds?: string[];
5
+ selectAll?: boolean;
6
+ excludedIds?: string[];
5
7
  dispatchStatus: DispatchStatus;
6
8
  dispatchDate?: string;
7
9
  constructor(obj?: Partial<UpdateDispatchDto>);
@@ -1,6 +1,6 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import { DispatchStatus } from '../../enums/src';
3
- import { ArrayMinSize, IsArray, IsDateString, IsEnum, IsOptional, IsString, IsUUID, } from 'class-validator';
3
+ import { ArrayMinSize, IsArray, IsBoolean, IsDateString, IsEnum, IsOptional, IsString, IsUUID, ValidateIf, } from 'class-validator';
4
4
  export class UpdateDispatchDto {
5
5
  constructor(obj) {
6
6
  Object.assign(this, obj);
@@ -11,12 +11,24 @@ __decorate([
11
11
  __metadata("design:type", String)
12
12
  ], UpdateDispatchDto.prototype, "dispatchId", void 0);
13
13
  __decorate([
14
+ ValidateIf((o) => !o.selectAll),
14
15
  IsOptional(),
15
16
  IsArray(),
16
17
  ArrayMinSize(1),
17
18
  IsUUID('4', { each: true }),
18
19
  __metadata("design:type", Array)
19
20
  ], UpdateDispatchDto.prototype, "requestIds", void 0);
21
+ __decorate([
22
+ IsOptional(),
23
+ IsBoolean(),
24
+ __metadata("design:type", Boolean)
25
+ ], UpdateDispatchDto.prototype, "selectAll", void 0);
26
+ __decorate([
27
+ IsOptional(),
28
+ IsArray(),
29
+ IsString({ each: true }),
30
+ __metadata("design:type", Array)
31
+ ], UpdateDispatchDto.prototype, "excludedIds", void 0);
20
32
  __decorate([
21
33
  IsEnum(DispatchStatus),
22
34
  __metadata("design:type", String)
@@ -1 +1 @@
1
- {"version":3,"file":"update.dispatch.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/update.dispatch.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EACN,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,MAAM,EACN,UAAU,EACV,QAAQ,EACR,MAAM,GACN,MAAM,iBAAiB,CAAC;AAEzB,MAAM,OAAO,iBAAiB;IAiB7B,YAAY,GAAgC;QAC3C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AAlBA;IADC,MAAM,CAAC,GAAG,CAAC;;qDACO;AAMnB;IAJC,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,YAAY,CAAC,CAAC,CAAC;IACf,MAAM,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;qDACN;AAGtB;IADC,MAAM,CAAC,cAAc,CAAC;;yDACQ;AAI/B;IAFC,UAAU,EAAE;IACZ,YAAY,EAAE;;uDACO;AAOvB,MAAM,OAAO,wBAAwB;IAOpC,YAAY,GAAuC;QAClD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AARA;IADC,MAAM,CAAC,GAAG,CAAC;;2DACM;AAGlB;IADC,QAAQ,EAAE;;wDACI"}
1
+ {"version":3,"file":"update.dispatch.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/update.dispatch.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EACN,YAAY,EACZ,OAAO,EACP,SAAS,EACT,YAAY,EACZ,MAAM,EACN,UAAU,EACV,QAAQ,EACR,MAAM,EACN,UAAU,GACV,MAAM,iBAAiB,CAAC;AAEzB,MAAM,OAAO,iBAAiB;IA2B7B,YAAY,GAAgC;QAC3C,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AA5BA;IADC,MAAM,CAAC,GAAG,CAAC;;qDACO;AAOnB;IALC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC/B,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,YAAY,CAAC,CAAC,CAAC;IACf,MAAM,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;qDACN;AAItB;IAFC,UAAU,EAAE;IACZ,SAAS,EAAE;;oDACQ;AAKpB;IAHC,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;sDACF;AAGvB;IADC,MAAM,CAAC,cAAc,CAAC;;yDACQ;AAI/B;IAFC,UAAU,EAAE;IACZ,YAAY,EAAE;;uDACO;AAOvB,MAAM,OAAO,wBAAwB;IAOpC,YAAY,GAAuC;QAClD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AARA;IADC,MAAM,CAAC,GAAG,CAAC;;2DACM;AAGlB;IADC,QAAQ,EAAE;;wDACI"}
@@ -1,4 +1,4 @@
1
- import { BillingToType, RequestType } from '../../enums/src';
1
+ import { RequestType } from '../../enums/src';
2
2
  import { BillingAdjustmentStorage } from '../../models/src/configurations.model';
3
3
  export declare class UpdateGlobalConfigBillingDTO {
4
4
  contextId: string;
@@ -9,7 +9,7 @@ export declare class UpdateGlobalConfigBillingDTO {
9
9
  }
10
10
  export declare class BillMatrixDTO {
11
11
  reqType: RequestType;
12
- billToType: BillingToType;
12
+ billToType: string;
13
13
  autoCloseBooking: boolean;
14
14
  autoGenerateInvoice: boolean;
15
15
  }
@@ -1,7 +1,7 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
- import { BillingToType, RequestType } from '../../enums/src';
2
+ import { RequestType } from '../../enums/src';
3
3
  import { BillingAdjustmentStorage } from '../../models/src/configurations.model';
4
- import { ArrayMinSize, IsArray, IsBoolean, IsEnum, IsNumber, IsOptional, IsUUID, ValidateNested, } from 'class-validator';
4
+ import { ArrayMinSize, IsArray, IsBoolean, IsEnum, IsNotEmpty, IsNumber, IsOptional, IsString, IsUUID, ValidateNested, } from 'class-validator';
5
5
  import { Type } from 'class-transformer';
6
6
  export class UpdateGlobalConfigBillingDTO {
7
7
  }
@@ -39,7 +39,8 @@ __decorate([
39
39
  __metadata("design:type", String)
40
40
  ], BillMatrixDTO.prototype, "reqType", void 0);
41
41
  __decorate([
42
- IsEnum(BillingToType),
42
+ IsString(),
43
+ IsNotEmpty(),
43
44
  __metadata("design:type", String)
44
45
  ], BillMatrixDTO.prototype, "billToType", void 0);
45
46
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"update.global.config.billing.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/update.global.config.billing.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EACN,YAAY,EACZ,OAAO,EACP,SAAS,EACT,MAAM,EACN,QAAQ,EACR,UAAU,EACV,MAAM,EACN,cAAc,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,MAAM,OAAO,4BAA4B;CAsBxC;AApBA;IADC,MAAM,EAAE;;+DACS;AAIlB;IAFC,UAAU,EAAE;IACZ,SAAS,EAAE;;uEACgB;AAI5B;IAFC,MAAM,CAAC,wBAAwB,CAAC;IAChC,UAAU,EAAE;;8EACuC;AAIpD;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;+EACsB;AAOnC;IALC,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,YAAY,CAAC,CAAC,CAAC;IACf,IAAI,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC;IACzB,cAAc,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;mEACC;AAGjC,MAAM,OAAO,aAAa;CAYzB;AAVA;IADC,MAAM,CAAC,WAAW,CAAC;;8CACC;AAGrB;IADC,MAAM,CAAC,aAAa,CAAC;;iDACI;AAG1B;IADC,SAAS,EAAE;;uDACc;AAG1B;IADC,SAAS,EAAE;;0DACiB"}
1
+ {"version":3,"file":"update.global.config.billing.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/update.global.config.billing.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EACN,YAAY,EACZ,OAAO,EACP,SAAS,EACT,MAAM,EACN,UAAU,EACV,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,MAAM,EACN,cAAc,GACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,MAAM,OAAO,4BAA4B;CAsBxC;AApBA;IADC,MAAM,EAAE;;+DACS;AAIlB;IAFC,UAAU,EAAE;IACZ,SAAS,EAAE;;uEACgB;AAI5B;IAFC,MAAM,CAAC,wBAAwB,CAAC;IAChC,UAAU,EAAE;;8EACuC;AAIpD;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;+EACsB;AAOnC;IALC,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,YAAY,CAAC,CAAC,CAAC;IACf,IAAI,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC;IACzB,cAAc,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;mEACC;AAGjC,MAAM,OAAO,aAAa;CAezB;AAbA;IADC,MAAM,CAAC,WAAW,CAAC;;8CACC;AAMrB;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;iDACM;AAGnB;IADC,SAAS,EAAE;;uDACc;AAG1B;IADC,SAAS,EAAE;;0DACiB"}
@@ -12,7 +12,15 @@ export declare class ComplianceDetails {
12
12
  }
13
13
  export declare class UpdateSafetyAndComplianceConfigDTO {
14
14
  contextId: string;
15
- complianceGroups: Record<OwnershipType, ComplianceDetails>;
15
+ /**
16
+ * Optional so the matrix and the day-count windows can be submitted
17
+ * independently. They were always sent together from one screen, which is
18
+ * the only reason a required matrix worked — the windows move to Global
19
+ * Configurations, so a payload now legitimately carries one without the
20
+ * other. Omitted means "leave the stored matrix alone"; the controller
21
+ * spreads it conditionally, exactly as it already does for the windows.
22
+ */
23
+ complianceGroups?: Record<OwnershipType, ComplianceDetails>;
16
24
  /**
17
25
  * AD-3140 §3.2. Bounded at 365 — the window is a "renewal is approaching"
18
26
  * signal, and a multi-year value would put every vehicle in permanent
@@ -45,6 +45,7 @@ __decorate([
45
45
  __metadata("design:type", String)
46
46
  ], UpdateSafetyAndComplianceConfigDTO.prototype, "contextId", void 0);
47
47
  __decorate([
48
+ IsOptional(),
48
49
  IsObject(),
49
50
  __metadata("design:type", Object)
50
51
  ], UpdateSafetyAndComplianceConfigDTO.prototype, "complianceGroups", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"update.safety.and.compliance.config.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/update.safety.and.compliance.config.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EACN,MAAM,EACN,MAAM,EACN,QAAQ,EACR,UAAU,EACV,KAAK,EACL,GAAG,EACH,GAAG,GACH,MAAM,iBAAiB,CAAC;AAGzB,MAAM,OAAO,iBAAiB;CAwB7B;AAtBA;IADC,MAAM,CAAC,iBAAiB,CAAC;;kEACiB;AAG3C;IADC,MAAM,CAAC,iBAAiB,CAAC;;8CACH;AAGvB;IADC,MAAM,CAAC,iBAAiB,CAAC;;sDACK;AAG/B;IADC,MAAM,CAAC,iBAAiB,CAAC;;yDACQ;AAGlC;IADC,MAAM,CAAC,iBAAiB,CAAC;;kDACC;AAG3B;IADC,MAAM,CAAC,iBAAiB,CAAC;;kDACC;AAG3B;IADC,MAAM,CAAC,iBAAiB,CAAC;;+DACc;AAGxC;IADC,MAAM,CAAC,iBAAiB,CAAC;;iDACA;AAG3B,MAAM,OAAO,kCAAkC;IA6C9C,YAAY,GAAiD;QAC5D,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AA9CA;IADC,MAAM,EAAE;;qEACS;AAGlB;IADC,QAAQ,EAAE;;4EACgD;AAW3D;IAJC,UAAU,EAAE;IACZ,KAAK,EAAE;IACP,GAAG,CAAC,CAAC,CAAC;IACN,GAAG,CAAC,GAAG,CAAC;;uFAC4B;AAWrC;IAJC,UAAU,EAAE;IACZ,KAAK,EAAE;IACP,GAAG,CAAC,CAAC,CAAC;IACN,GAAG,CAAC,EAAE,CAAC;;kFACwB;AAgBhC;IAJC,UAAU,EAAE;IACZ,KAAK,EAAE;IACP,GAAG,CAAC,CAAC,CAAC;IACN,GAAG,CAAC,GAAG,CAAC;;2FACgC"}
1
+ {"version":3,"file":"update.safety.and.compliance.config.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/update.safety.and.compliance.config.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EACN,MAAM,EACN,MAAM,EACN,QAAQ,EACR,UAAU,EACV,KAAK,EACL,GAAG,EACH,GAAG,GACH,MAAM,iBAAiB,CAAC;AAGzB,MAAM,OAAO,iBAAiB;CAwB7B;AAtBA;IADC,MAAM,CAAC,iBAAiB,CAAC;;kEACiB;AAG3C;IADC,MAAM,CAAC,iBAAiB,CAAC;;8CACH;AAGvB;IADC,MAAM,CAAC,iBAAiB,CAAC;;sDACK;AAG/B;IADC,MAAM,CAAC,iBAAiB,CAAC;;yDACQ;AAGlC;IADC,MAAM,CAAC,iBAAiB,CAAC;;kDACC;AAG3B;IADC,MAAM,CAAC,iBAAiB,CAAC;;kDACC;AAG3B;IADC,MAAM,CAAC,iBAAiB,CAAC;;+DACc;AAGxC;IADC,MAAM,CAAC,iBAAiB,CAAC;;iDACA;AAG3B,MAAM,OAAO,kCAAkC;IAsD9C,YAAY,GAAiD;QAC5D,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AAvDA;IADC,MAAM,EAAE;;qEACS;AAYlB;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;4EACiD;AAW5D;IAJC,UAAU,EAAE;IACZ,KAAK,EAAE;IACP,GAAG,CAAC,CAAC,CAAC;IACN,GAAG,CAAC,GAAG,CAAC;;uFAC4B;AAWrC;IAJC,UAAU,EAAE;IACZ,KAAK,EAAE;IACP,GAAG,CAAC,CAAC,CAAC;IACN,GAAG,CAAC,EAAE,CAAC;;kFACwB;AAgBhC;IAJC,UAAU,EAAE;IACZ,KAAK,EAAE;IACP,GAAG,CAAC,CAAC,CAAC;IACN,GAAG,CAAC,GAAG,CAAC;;2FACgC"}
@@ -1,5 +1,7 @@
1
1
  export declare class UpdateWorkOrderDispatchStatusDTO {
2
2
  workOrderDispatchId: string;
3
3
  workOrderIds?: string[];
4
+ selectAll?: boolean;
5
+ excludedIds?: string[];
4
6
  isConfirmed: boolean;
5
7
  }
@@ -1,5 +1,5 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
- import { ArrayMinSize, IsArray, IsBoolean, IsNotEmpty, IsOptional, IsUUID, } from 'class-validator';
2
+ import { ArrayMinSize, IsArray, IsBoolean, IsNotEmpty, IsOptional, IsString, IsUUID, ValidateIf, } from 'class-validator';
3
3
  export class UpdateWorkOrderDispatchStatusDTO {
4
4
  }
5
5
  __decorate([
@@ -8,12 +8,24 @@ __decorate([
8
8
  __metadata("design:type", String)
9
9
  ], UpdateWorkOrderDispatchStatusDTO.prototype, "workOrderDispatchId", void 0);
10
10
  __decorate([
11
+ ValidateIf((o) => !o.selectAll),
11
12
  IsOptional(),
12
13
  IsArray(),
13
14
  ArrayMinSize(1),
14
15
  IsUUID('4', { each: true }),
15
16
  __metadata("design:type", Array)
16
17
  ], UpdateWorkOrderDispatchStatusDTO.prototype, "workOrderIds", void 0);
18
+ __decorate([
19
+ IsOptional(),
20
+ IsBoolean(),
21
+ __metadata("design:type", Boolean)
22
+ ], UpdateWorkOrderDispatchStatusDTO.prototype, "selectAll", void 0);
23
+ __decorate([
24
+ IsOptional(),
25
+ IsArray(),
26
+ IsString({ each: true }),
27
+ __metadata("design:type", Array)
28
+ ], UpdateWorkOrderDispatchStatusDTO.prototype, "excludedIds", void 0);
17
29
  __decorate([
18
30
  IsBoolean(),
19
31
  IsNotEmpty(),
@@ -1 +1 @@
1
- {"version":3,"file":"update.work.order.dispatch.status.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/update.work.order.dispatch.status.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EACN,YAAY,EACZ,OAAO,EACP,SAAS,EACT,UAAU,EACV,UAAU,EACV,MAAM,GACN,MAAM,iBAAiB,CAAC;AAEzB,MAAM,OAAO,gCAAgC;CAc5C;AAXA;IAFC,UAAU,EAAE;IACZ,MAAM,EAAE;;6EACmB;AAM5B;IAJC,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,YAAY,CAAC,CAAC,CAAC;IACf,MAAM,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;sEACJ;AAIxB;IAFC,SAAS,EAAE;IACX,UAAU,EAAE;;qEACQ"}
1
+ {"version":3,"file":"update.work.order.dispatch.status.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/update.work.order.dispatch.status.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EACN,YAAY,EACZ,OAAO,EACP,SAAS,EACT,UAAU,EACV,UAAU,EACV,QAAQ,EACR,MAAM,EACN,UAAU,GACV,MAAM,iBAAiB,CAAC;AAEzB,MAAM,OAAO,gCAAgC;CAwB5C;AArBA;IAFC,UAAU,EAAE;IACZ,MAAM,EAAE;;6EACmB;AAO5B;IALC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC/B,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,YAAY,CAAC,CAAC,CAAC;IACf,MAAM,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;sEACJ;AAIxB;IAFC,UAAU,EAAE;IACZ,SAAS,EAAE;;mEACQ;AAKpB;IAHC,UAAU,EAAE;IACZ,OAAO,EAAE;IACT,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;;qEACF;AAIvB;IAFC,SAAS,EAAE;IACX,UAAU,EAAE;;qEACQ"}
@@ -7,7 +7,13 @@ export declare enum RetryTaskType {
7
7
  /** Re-push an allocation to MMI after the original push failed. */
8
8
  MMIPush = "MMIPush",
9
9
  /** Re-attach an external duty slip that failed to upload on duty close. */
10
- ExtDutySlipUpload = "ExtDutySlipUpload"
10
+ ExtDutySlipUpload = "ExtDutySlipUpload",
11
+ /**
12
+ * Re-run bill calculation for a closed STR booking that ended up without a
13
+ * numbered invoice — e.g. the invoice lock was held when the duty closed, so
14
+ * billing was skipped while the booking still moved to Completed.
15
+ */
16
+ InvoiceGeneration = "InvoiceGeneration"
11
17
  }
12
18
  export declare enum RetryTaskStatus {
13
19
  /** Waiting for its next attempt (see nextAttemptAt). */
@@ -9,6 +9,12 @@ export var RetryTaskType;
9
9
  RetryTaskType["MMIPush"] = "MMIPush";
10
10
  /** Re-attach an external duty slip that failed to upload on duty close. */
11
11
  RetryTaskType["ExtDutySlipUpload"] = "ExtDutySlipUpload";
12
+ /**
13
+ * Re-run bill calculation for a closed STR booking that ended up without a
14
+ * numbered invoice — e.g. the invoice lock was held when the duty closed, so
15
+ * billing was skipped while the booking still moved to Completed.
16
+ */
17
+ RetryTaskType["InvoiceGeneration"] = "InvoiceGeneration";
12
18
  })(RetryTaskType || (RetryTaskType = {}));
13
19
  export var RetryTaskStatus;
14
20
  (function (RetryTaskStatus) {
@@ -1 +1 @@
1
- {"version":3,"file":"retry.task.enum.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/enums/src/retry.task.enum.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACxB,mEAAmE;IACnE,oCAAmB,CAAA;IACnB,2EAA2E;IAC3E,wDAAuC,CAAA;AACxC,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAED,MAAM,CAAN,IAAY,eAgBX;AAhBD,WAAY,eAAe;IAC1B,wDAAwD;IACxD,sCAAmB,CAAA;IACnB,oEAAoE;IACpE,4CAAyB,CAAA;IACzB,yCAAyC;IACzC,0CAAuB,CAAA;IACvB,uEAAuE;IACvE,0CAAuB,CAAA;IACvB;;;;;OAKG;IACH,8CAA2B,CAAA;AAC5B,CAAC,EAhBW,eAAe,KAAf,eAAe,QAgB1B"}
1
+ {"version":3,"file":"retry.task.enum.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/enums/src/retry.task.enum.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAN,IAAY,aAWX;AAXD,WAAY,aAAa;IACxB,mEAAmE;IACnE,oCAAmB,CAAA;IACnB,2EAA2E;IAC3E,wDAAuC,CAAA;IACvC;;;;OAIG;IACH,wDAAuC,CAAA;AACxC,CAAC,EAXW,aAAa,KAAb,aAAa,QAWxB;AAED,MAAM,CAAN,IAAY,eAgBX;AAhBD,WAAY,eAAe;IAC1B,wDAAwD;IACxD,sCAAmB,CAAA;IACnB,oEAAoE;IACpE,4CAAyB,CAAA;IACzB,yCAAyC;IACzC,0CAAuB,CAAA;IACvB,uEAAuE;IACvE,0CAAuB,CAAA;IACvB;;;;;OAKG;IACH,8CAA2B,CAAA;AAC5B,CAAC,EAhBW,eAAe,KAAf,eAAe,QAgB1B"}
@@ -12,14 +12,18 @@ export declare enum VehicleAllocationConflictReason {
12
12
  /** The vehicle is on a duty whose trip is running at this moment. */
13
13
  Ongoing = "Ongoing",
14
14
  /**
15
- * The vehicle is allocated to a duty whose pickup falls inside the
16
- * configured window measured from now (default 2 hours).
15
+ * The vehicle is allocated to a duty whose pickup falls within the
16
+ * configured window EITHER SIDE of the pickup of the duty being allocated
17
+ * (default 2 hours). Anchored on that pickup and not on `now` — AD-3373,
18
+ * requester's decision on 18 Sep — so allocating a duty for next Tuesday
19
+ * asks about next Tuesday.
17
20
  */
18
21
  UpcomingWithinWindow = "UpcomingWithinWindow",
19
22
  /**
20
- * The vehicle is allocated to a duty whose pickup is close to the pickup of
21
- * the duty being allocated. Anchored on the booking rather than on `now`,
22
- * so allocating next Tuesday's duty still catches next Tuesday's clash.
23
+ * The vehicle is allocated to a duty whose pickup is within 30 minutes of
24
+ * the pickup of the duty being allocated. Subsumed by the rule above
25
+ * whenever the configured window is >= 30 minutes; it survives because it
26
+ * is the only look-ahead left when the window is set lower, or to 0.
23
27
  */
24
28
  SamePickupSlot = "SamePickupSlot"
25
29
  }
@@ -13,14 +13,18 @@ export var VehicleAllocationConflictReason;
13
13
  /** The vehicle is on a duty whose trip is running at this moment. */
14
14
  VehicleAllocationConflictReason["Ongoing"] = "Ongoing";
15
15
  /**
16
- * The vehicle is allocated to a duty whose pickup falls inside the
17
- * configured window measured from now (default 2 hours).
16
+ * The vehicle is allocated to a duty whose pickup falls within the
17
+ * configured window EITHER SIDE of the pickup of the duty being allocated
18
+ * (default 2 hours). Anchored on that pickup and not on `now` — AD-3373,
19
+ * requester's decision on 18 Sep — so allocating a duty for next Tuesday
20
+ * asks about next Tuesday.
18
21
  */
19
22
  VehicleAllocationConflictReason["UpcomingWithinWindow"] = "UpcomingWithinWindow";
20
23
  /**
21
- * The vehicle is allocated to a duty whose pickup is close to the pickup of
22
- * the duty being allocated. Anchored on the booking rather than on `now`,
23
- * so allocating next Tuesday's duty still catches next Tuesday's clash.
24
+ * The vehicle is allocated to a duty whose pickup is within 30 minutes of
25
+ * the pickup of the duty being allocated. Subsumed by the rule above
26
+ * whenever the configured window is >= 30 minutes; it survives because it
27
+ * is the only look-ahead left when the window is set lower, or to 0.
24
28
  */
25
29
  VehicleAllocationConflictReason["SamePickupSlot"] = "SamePickupSlot";
26
30
  })(VehicleAllocationConflictReason || (VehicleAllocationConflictReason = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"vehicle.allocation.conflict.enum.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/enums/src/vehicle.allocation.conflict.enum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,+BAcX;AAdD,WAAY,+BAA+B;IAC1C,qEAAqE;IACrE,sDAAmB,CAAA;IACnB;;;OAGG;IACH,gFAA6C,CAAA;IAC7C;;;;OAIG;IACH,oEAAiC,CAAA;AAClC,CAAC,EAdW,+BAA+B,KAA/B,+BAA+B,QAc1C;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,kDAAkD,GAAG,GAAG,CAAC;AAEtE;;;;GAIG;AACH,MAAM,CAAC,MAAM,8CAA8C,GAAG,KAAK,CAAC;AAEpE;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,8CAA8C,GAAG,EAAE,CAAC;AAEjE;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,+CAA+C,GAC3D,CAAC,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;AAE1E;;;;GAIG;AACH,MAAM,CAAC,MAAM,wCAAwC,GAAiB;IACrE,UAAU,CAAC,cAAc;IACzB,UAAU,CAAC,aAAa;IACxB,UAAU,CAAC,WAAW;CACtB,CAAC"}
1
+ {"version":3,"file":"vehicle.allocation.conflict.enum.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/enums/src/vehicle.allocation.conflict.enum.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,+BAkBX;AAlBD,WAAY,+BAA+B;IAC1C,qEAAqE;IACrE,sDAAmB,CAAA;IACnB;;;;;;OAMG;IACH,gFAA6C,CAAA;IAC7C;;;;;OAKG;IACH,oEAAiC,CAAA;AAClC,CAAC,EAlBW,+BAA+B,KAA/B,+BAA+B,QAkB1C;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,kDAAkD,GAAG,GAAG,CAAC;AAEtE;;;;GAIG;AACH,MAAM,CAAC,MAAM,8CAA8C,GAAG,KAAK,CAAC;AAEpE;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,8CAA8C,GAAG,EAAE,CAAC;AAEjE;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,+CAA+C,GAC3D,CAAC,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;AAE1E;;;;GAIG;AACH,MAAM,CAAC,MAAM,wCAAwC,GAAiB;IACrE,UAAU,CAAC,cAAc;IACzB,UAAU,CAAC,aAAa;IACxB,UAAU,CAAC,WAAW;CACtB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { BillingToType, RequestType } from '@autologix/shared/enums';
1
+ import { RequestType } from '@autologix/shared/enums';
2
2
  export declare enum BillMatrixField {
3
3
  RequestType = "reqType",
4
4
  BillToType = "billToType",
@@ -7,7 +7,7 @@ export declare enum BillMatrixField {
7
7
  }
8
8
  export interface IBillMatrix {
9
9
  [BillMatrixField.RequestType]: RequestType;
10
- [BillMatrixField.BillToType]: BillingToType;
10
+ [BillMatrixField.BillToType]: string;
11
11
  [BillMatrixField.AutoCloseBooking]: boolean;
12
12
  [BillMatrixField.AutoGenerateInvoice]: boolean;
13
13
  }
@@ -76,8 +76,9 @@ export declare enum ConfigurationField {
76
76
  */
77
77
  ComplianceUtilisationWindowDays = "cmplUtilDays",
78
78
  /**
79
- * AD-3373 — how far ahead of NOW another duty on the same vehicle still
80
- * counts as a clash worth warning about, in minutes.
79
+ * AD-3373 — how far EITHER SIDE of the pickup of the duty being allocated
80
+ * another duty on the same vehicle still counts as a clash worth warning
81
+ * about, in minutes.
81
82
  *
82
83
  * Null falls back to DEFAULT_VEHICLE_ALLOCATION_CONFLICT_WINDOW_MINUTES
83
84
  * (120 = the ticket's 2 hours). Zero is meaningful and switches off only
@@ -67,8 +67,9 @@ export var ConfigurationField;
67
67
  */
68
68
  ConfigurationField["ComplianceUtilisationWindowDays"] = "cmplUtilDays";
69
69
  /**
70
- * AD-3373 — how far ahead of NOW another duty on the same vehicle still
71
- * counts as a clash worth warning about, in minutes.
70
+ * AD-3373 — how far EITHER SIDE of the pickup of the duty being allocated
71
+ * another duty on the same vehicle still counts as a clash worth warning
72
+ * about, in minutes.
72
73
  *
73
74
  * Null falls back to DEFAULT_VEHICLE_ALLOCATION_CONFLICT_WINDOW_MINUTES
74
75
  * (120 = the ticket's 2 hours). Zero is meaningful and switches off only
@@ -1 +1 @@
1
- {"version":3,"file":"configurations.model.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/models/src/configurations.model.ts"],"names":[],"mappings":"AAsBA,MAAM,CAAN,IAAY,kBA4JX;AA5JD,WAAY,kBAAkB;IAC7B,yDAAmC,CAAA;IACnC,0DAAoC,CAAA;IACpC,8DAAwC,CAAA;IACxC,6DAAuC,CAAA;IACvC,8DAAwC,CAAA;IACxC,6CAAuB,CAAA;IACvB,+CAAyB,CAAA;IACzB,wCAAkB,CAAA;IAClB,yCAAmB,CAAA;IACnB,kDAA4B,CAAA;IAC5B,yDAAmC,CAAA;IACnC,qDAA+B,CAAA;IAC/B,+CAAyB,CAAA;IACzB,mEAA6C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,CAAA;IACrB,6CAAuB,CAAA;AACxB,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B;AAED,MAAM,CAAN,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC9B,gDAAyB,CAAA;IACzB,8CAAuB,CAAA;AACxB,CAAC,EAHW,mBAAmB,KAAnB,mBAAmB,QAG9B;AAED,MAAM,CAAN,IAAY,wBASX;AATD,WAAY,wBAAwB;IACnC,gFAAoD,CAAA;IACpD,gEAAoC,CAAA;IACpC,wDAA4B,CAAA;IAC5B,8DAAkC,CAAA;IAClC,gDAAoB,CAAA;IACpB,+CAAmB,CAAA;IACnB,0EAA8C,CAAA;IAC9C,8CAAkB,CAAA;AACnB,CAAC,EATW,wBAAwB,KAAxB,wBAAwB,QASnC;AAED,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC5B,4CAAuB,CAAA;IACvB,0CAAqB,CAAA;AACtB,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAED,MAAM,CAAN,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IACnC,0DAA8B,CAAA;IAC9B,sDAA0B,CAAA;AAC3B,CAAC,EAHW,wBAAwB,KAAxB,wBAAwB,QAGnC"}
1
+ {"version":3,"file":"configurations.model.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/models/src/configurations.model.ts"],"names":[],"mappings":"AAsBA,MAAM,CAAN,IAAY,kBA6JX;AA7JD,WAAY,kBAAkB;IAC7B,yDAAmC,CAAA;IACnC,0DAAoC,CAAA;IACpC,8DAAwC,CAAA;IACxC,6DAAuC,CAAA;IACvC,8DAAwC,CAAA;IACxC,6CAAuB,CAAA;IACvB,+CAAyB,CAAA;IACzB,wCAAkB,CAAA;IAClB,yCAAmB,CAAA;IACnB,kDAA4B,CAAA;IAC5B,yDAAmC,CAAA;IACnC,qDAA+B,CAAA;IAC/B,+CAAyB,CAAA;IACzB,mEAA6C,CAAA;IAC7C,8CAAwB,CAAA;IACx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xB,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B;AAED,MAAM,CAAN,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC9B,gDAAyB,CAAA;IACzB,8CAAuB,CAAA;AACxB,CAAC,EAHW,mBAAmB,KAAnB,mBAAmB,QAG9B;AAED,MAAM,CAAN,IAAY,wBASX;AATD,WAAY,wBAAwB;IACnC,gFAAoD,CAAA;IACpD,gEAAoC,CAAA;IACpC,wDAA4B,CAAA;IAC5B,8DAAkC,CAAA;IAClC,gDAAoB,CAAA;IACpB,+CAAmB,CAAA;IACnB,0EAA8C,CAAA;IAC9C,8CAAkB,CAAA;AACnB,CAAC,EATW,wBAAwB,KAAxB,wBAAwB,QASnC;AAED,MAAM,CAAN,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC5B,4CAAuB,CAAA;IACvB,0CAAqB,CAAA;AACtB,CAAC,EAHW,iBAAiB,KAAjB,iBAAiB,QAG5B;AAED,MAAM,CAAN,IAAY,wBAGX;AAHD,WAAY,wBAAwB;IACnC,0DAA8B,CAAA;IAC9B,sDAA0B,CAAA;AAC3B,CAAC,EAHW,wBAAwB,KAAxB,wBAAwB,QAGnC"}
@@ -22,7 +22,8 @@ export declare enum PaymentField {
22
22
  UpdatedAt = "updAt",
23
23
  Active = "status",
24
24
  NotificationId = "notificationId",
25
- NotificationDate = "notificationDate"
25
+ NotificationDate = "notificationDate",
26
+ ChargeAttempts = "chargeAttempts"
26
27
  }
27
28
  export interface IPayment extends TypedModel {
28
29
  [PaymentField.PaymentId]: string;
@@ -44,4 +45,5 @@ export interface IPayment extends TypedModel {
44
45
  [PaymentField.Active]: boolean;
45
46
  [PaymentField.NotificationId]: string;
46
47
  [PaymentField.NotificationDate]: Date;
48
+ [PaymentField.ChargeAttempts]: number;
47
49
  }
@@ -19,5 +19,6 @@ export var PaymentField;
19
19
  PaymentField["Active"] = "status";
20
20
  PaymentField["NotificationId"] = "notificationId";
21
21
  PaymentField["NotificationDate"] = "notificationDate";
22
+ PaymentField["ChargeAttempts"] = "chargeAttempts";
22
23
  })(PaymentField || (PaymentField = {}));
23
24
  //# sourceMappingURL=payment.model.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"payment.model.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/models/src/payment.model.ts"],"names":[],"mappings":"AAMA,MAAM,CAAN,IAAY,YAoBX;AApBD,WAAY,YAAY;IACvB,uCAAuB,CAAA;IACvB,qCAAqB,CAAA;IACrB,qCAAqB,CAAA;IACrB,2CAA2B,CAAA;IAC3B,+CAA+B,CAAA;IAC/B,+CAA+B,CAAA;IAC/B,8CAA8B,CAAA;IAC9B,kDAAkC,CAAA;IAClC,+CAA+B,CAAA;IAC/B,yCAAyB,CAAA;IACzB,yCAAyB,CAAA;IACzB,yCAAyB,CAAA;IACzB,mCAAmB,CAAA;IACnB,iCAAiB,CAAA;IACjB,mCAAmB,CAAA;IACnB,mCAAmB,CAAA;IACnB,iCAAiB,CAAA;IACjB,iDAAiC,CAAA;IACjC,qDAAqC,CAAA;AACtC,CAAC,EApBW,YAAY,KAAZ,YAAY,QAoBvB"}
1
+ {"version":3,"file":"payment.model.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/models/src/payment.model.ts"],"names":[],"mappings":"AAMA,MAAM,CAAN,IAAY,YAqBX;AArBD,WAAY,YAAY;IACvB,uCAAuB,CAAA;IACvB,qCAAqB,CAAA;IACrB,qCAAqB,CAAA;IACrB,2CAA2B,CAAA;IAC3B,+CAA+B,CAAA;IAC/B,+CAA+B,CAAA;IAC/B,8CAA8B,CAAA;IAC9B,kDAAkC,CAAA;IAClC,+CAA+B,CAAA;IAC/B,yCAAyB,CAAA;IACzB,yCAAyB,CAAA;IACzB,yCAAyB,CAAA;IACzB,mCAAmB,CAAA;IACnB,iCAAiB,CAAA;IACjB,mCAAmB,CAAA;IACnB,mCAAmB,CAAA;IACnB,iCAAiB,CAAA;IACjB,iDAAiC,CAAA;IACjC,qDAAqC,CAAA;IACrC,iDAAiC,CAAA;AAClC,CAAC,EArBW,YAAY,KAAZ,YAAY,QAqBvB"}
@@ -0,0 +1,29 @@
1
+ import { RequestType } from '@autologix/shared/enums';
2
+ import { ConfigurationField, IConfigurations } from '@autologix/shared/models';
3
+ /**
4
+ * Whether billing should use the package chosen at booking time rather than
5
+ * re-deriving one from actual usage.
6
+ *
7
+ * This answers the *whole* branch condition, not just the config lookup, and it
8
+ * is deliberately the single predicate behind every site that used to spell the
9
+ * rule out by hand:
10
+ *
11
+ * - `bill.calculation.controller.ts` — the `_preferredPackage` prefetch and
12
+ * the `if (…) { use selected package } else { derive from contract terms }`
13
+ * that consumes it. Those two must agree: taking the `if` arm with a null
14
+ * package skips the `else` arm's contract-terms derivation of
15
+ * `distanceType` / `garageTime` / `garage` / `confGarageKm` / `fixedCost` /
16
+ * `roundMins` and silently bills on client-persona defaults.
17
+ * - `generate.bill.handler.new.ts` — the `_package` load and the
18
+ * `sourcePackage = null` before `getApplicablePackage`. That handler is
19
+ * what actually writes the invoice, so a disagreement there shows up as a
20
+ * preview and a bill that differ.
21
+ *
22
+ * `PickupAndDrop` and `OutstationRide` were the only types that ever re-derived
23
+ * from usage, and they did so unconditionally — while the operator-facing
24
+ * setting meant to govern it (`Configurations.cityLocalPref` / `outstatnPref`)
25
+ * was written by the global-config controller and read by nothing on the
26
+ * server. This is the read side. Every other request type always billed against
27
+ * the selected package and keeps doing so.
28
+ */
29
+ export declare function billsAgainstBookingSelectedPackage(requestType: RequestType | undefined | null, config: Pick<IConfigurations, ConfigurationField.CityLocalPreference | ConfigurationField.OutstationPreference> | null | undefined, hasBookingSelectedPackage: boolean): boolean;
@@ -0,0 +1,47 @@
1
+ import { RequestType, TripConfigPreferences } from '@autologix/shared/enums';
2
+ import { ConfigurationField } from '@autologix/shared/models';
3
+ /**
4
+ * Whether billing should use the package chosen at booking time rather than
5
+ * re-deriving one from actual usage.
6
+ *
7
+ * This answers the *whole* branch condition, not just the config lookup, and it
8
+ * is deliberately the single predicate behind every site that used to spell the
9
+ * rule out by hand:
10
+ *
11
+ * - `bill.calculation.controller.ts` — the `_preferredPackage` prefetch and
12
+ * the `if (…) { use selected package } else { derive from contract terms }`
13
+ * that consumes it. Those two must agree: taking the `if` arm with a null
14
+ * package skips the `else` arm's contract-terms derivation of
15
+ * `distanceType` / `garageTime` / `garage` / `confGarageKm` / `fixedCost` /
16
+ * `roundMins` and silently bills on client-persona defaults.
17
+ * - `generate.bill.handler.new.ts` — the `_package` load and the
18
+ * `sourcePackage = null` before `getApplicablePackage`. That handler is
19
+ * what actually writes the invoice, so a disagreement there shows up as a
20
+ * preview and a bill that differ.
21
+ *
22
+ * `PickupAndDrop` and `OutstationRide` were the only types that ever re-derived
23
+ * from usage, and they did so unconditionally — while the operator-facing
24
+ * setting meant to govern it (`Configurations.cityLocalPref` / `outstatnPref`)
25
+ * was written by the global-config controller and read by nothing on the
26
+ * server. This is the read side. Every other request type always billed against
27
+ * the selected package and keeps doing so.
28
+ */
29
+ export function billsAgainstBookingSelectedPackage(requestType, config, hasBookingSelectedPackage) {
30
+ // No package was chosen at booking, so there is nothing to bill against.
31
+ if (!hasBookingSelectedPackage)
32
+ return false;
33
+ // The column is nullable and defaults to BasedOnUsage, so an absent config
34
+ // row, a null value or a failed read all keep usage-based selection rather
35
+ // than silently switching a vendor's billing basis.
36
+ if (requestType === RequestType.PickupAndDrop) {
37
+ return (config?.[ConfigurationField.CityLocalPreference] ===
38
+ TripConfigPreferences.PackageDuringBooking);
39
+ }
40
+ if (requestType === RequestType.OutstationRide) {
41
+ return (config?.[ConfigurationField.OutstationPreference] ===
42
+ TripConfigPreferences.PackageDuringBooking);
43
+ }
44
+ // Every other request type never took the usage-based path.
45
+ return true;
46
+ }
47
+ //# sourceMappingURL=booking.selected.package.gate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"booking.selected.package.gate.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/utilities/src/booking.selected.package.gate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAmB,MAAM,0BAA0B,CAAC;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,kCAAkC,CACjD,WAA2C,EAC3C,MAOY,EACZ,yBAAkC;IAElC,yEAAyE;IACzE,IAAI,CAAC,yBAAyB;QAAE,OAAO,KAAK,CAAC;IAE7C,2EAA2E;IAC3E,2EAA2E;IAC3E,oDAAoD;IACpD,IAAI,WAAW,KAAK,WAAW,CAAC,aAAa,EAAE,CAAC;QAC/C,OAAO,CACN,MAAM,EAAE,CAAC,kBAAkB,CAAC,mBAAmB,CAAC;YAChD,qBAAqB,CAAC,oBAAoB,CAC1C,CAAC;IACH,CAAC;IACD,IAAI,WAAW,KAAK,WAAW,CAAC,cAAc,EAAE,CAAC;QAChD,OAAO,CACN,MAAM,EAAE,CAAC,kBAAkB,CAAC,oBAAoB,CAAC;YACjD,qBAAqB,CAAC,oBAAoB,CAC1C,CAAC;IACH,CAAC;IAED,4DAA4D;IAC5D,OAAO,IAAI,CAAC;AACb,CAAC"}
@@ -48,3 +48,4 @@ export * from './insurer.match';
48
48
  export * from './ba.payout.workshop.days';
49
49
  export * from './financial.year';
50
50
  export * from './vendor.operations.log';
51
+ export * from './booking.selected.package.gate';
@@ -48,4 +48,5 @@ export * from './insurer.match';
48
48
  export * from './ba.payout.workshop.days';
49
49
  export * from './financial.year';
50
50
  export * from './vendor.operations.log';
51
+ export * from './booking.selected.package.gate';
51
52
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/utilities/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc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"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/utilities/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,YAAY,CAAC;AAC3B,cAAc,oCAAoC,CAAC;AACnD,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wCAAwC,CAAC;AACvD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,OAAO,CAAC;AACtB,cAAc,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AACjD,cAAc,sBAAsB,CAAC;AACrC,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uCAAuC,CAAC;AACtD,cAAc,mBAAmB,CAAC;AAClC,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC"}
@@ -53,6 +53,16 @@ export interface IExtRateCardRow {
53
53
  included_kms_middle_day: number | null;
54
54
  /** `Hourly` only — the KM allowance that accrues per billed hour. */
55
55
  max_km_per_hour: number | null;
56
+ /**
57
+ * The hourly rate the card is priced at — the portal's "Rate per HR".
58
+ *
59
+ * Required to bill an `Hourly` row at all: those carry no `base_amount` and
60
+ * no `included_kms`, so hours x this rate plus `per_km_rate` for the
61
+ * distance is the whole fare. Passed through unfiltered, like the other
62
+ * rate fields, so a non-hourly package that happens to carry one still
63
+ * reports it rather than silently returning null.
64
+ */
65
+ rate_per_hour: number | null;
56
66
  extra_hour_rate: number | null;
57
67
  extra_km_rate: number | null;
58
68
  per_km_rate: number | null;
@@ -22,7 +22,11 @@ export interface IVehicleAllocationConflict {
22
22
  */
23
23
  export interface IVehicleAllocationConflictResult {
24
24
  windowMinutes: number;
25
- /** Server clock at evaluation, UTC. The window is measured from here. */
25
+ /**
26
+ * Server clock at evaluation, UTC. Diagnostic only — since AD-3373's
27
+ * re-anchor the window is measured around the pickup of the duty being
28
+ * allocated, not from here.
29
+ */
26
30
  evaluatedAt: string;
27
31
  conflicts: IVehicleAllocationConflict[];
28
32
  }