@autologix-engineering/shared 1.2.367 → 1.2.369

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 (75) hide show
  1. package/package.json +1 -1
  2. package/src/lib/commands/src/generate.ba.reimbursement.zip.handler.d.ts +5 -0
  3. package/src/lib/commands/src/generate.ba.reimbursement.zip.handler.js.map +1 -1
  4. package/src/lib/contract-state/src/contract.date.change.display.d.ts +27 -0
  5. package/src/lib/contract-state/src/contract.date.change.display.js +47 -0
  6. package/src/lib/contract-state/src/contract.date.change.display.js.map +1 -0
  7. package/src/lib/contract-state/src/contract.date.change.window.d.ts +63 -0
  8. package/src/lib/contract-state/src/contract.date.change.window.js +85 -0
  9. package/src/lib/contract-state/src/contract.date.change.window.js.map +1 -0
  10. package/src/lib/contract-state/src/index.d.ts +2 -0
  11. package/src/lib/contract-state/src/index.js +2 -0
  12. package/src/lib/contract-state/src/index.js.map +1 -1
  13. package/src/lib/data-transfer-objects/src/command/update.client.persona.contract.file.dto.d.ts +6 -0
  14. package/src/lib/data-transfer-objects/src/command/update.client.persona.contract.file.dto.js +6 -1
  15. package/src/lib/data-transfer-objects/src/command/update.client.persona.contract.file.dto.js.map +1 -1
  16. package/src/lib/data-transfer-objects/src/command/update.contract.terms.dto.d.ts +8 -0
  17. package/src/lib/data-transfer-objects/src/command/update.contract.terms.dto.js +6 -1
  18. package/src/lib/data-transfer-objects/src/command/update.contract.terms.dto.js.map +1 -1
  19. package/src/lib/data-transfer-objects/src/get.ba.reimbursement.zip.dto.d.ts +5 -0
  20. package/src/lib/data-transfer-objects/src/get.ba.reimbursement.zip.dto.js +8 -1
  21. package/src/lib/data-transfer-objects/src/get.ba.reimbursement.zip.dto.js.map +1 -1
  22. package/src/lib/data-transfer-objects/src/get.contract.date.changes.dto.d.ts +47 -0
  23. package/src/lib/data-transfer-objects/src/get.contract.date.changes.dto.js +96 -0
  24. package/src/lib/data-transfer-objects/src/get.contract.date.changes.dto.js.map +1 -0
  25. package/src/lib/data-transfer-objects/src/get.ltr.driver.monthly.sign.off.preview.dto.d.ts +13 -22
  26. package/src/lib/data-transfer-objects/src/get.ltr.driver.monthly.sign.off.preview.dto.js +10 -13
  27. package/src/lib/data-transfer-objects/src/get.ltr.driver.monthly.sign.off.preview.dto.js.map +1 -1
  28. package/src/lib/data-transfer-objects/src/index.d.ts +2 -0
  29. package/src/lib/data-transfer-objects/src/index.js +2 -0
  30. package/src/lib/data-transfer-objects/src/index.js.map +1 -1
  31. package/src/lib/data-transfer-objects/src/sign.off.ltr.payout.month.dto.d.ts +16 -12
  32. package/src/lib/data-transfer-objects/src/sign.off.ltr.payout.month.dto.js +10 -10
  33. package/src/lib/data-transfer-objects/src/sign.off.ltr.payout.month.dto.js.map +1 -1
  34. package/src/lib/data-transfer-objects/src/update.communication.config.dto.d.ts +6 -0
  35. package/src/lib/data-transfer-objects/src/update.communication.config.dto.js +20 -0
  36. package/src/lib/data-transfer-objects/src/update.communication.config.dto.js.map +1 -0
  37. package/src/lib/data-transfer-objects/src/update.global.config.dto.d.ts +3 -1
  38. package/src/lib/data-transfer-objects/src/update.global.config.dto.js +11 -1
  39. package/src/lib/data-transfer-objects/src/update.global.config.dto.js.map +1 -1
  40. package/src/lib/enums/src/command.type.enum.d.ts +1 -0
  41. package/src/lib/enums/src/command.type.enum.js +1 -0
  42. package/src/lib/enums/src/command.type.enum.js.map +1 -1
  43. package/src/lib/enums/src/model.enum.d.ts +3 -1
  44. package/src/lib/enums/src/model.enum.js +2 -0
  45. package/src/lib/enums/src/model.enum.js.map +1 -1
  46. package/src/lib/enums/src/query.type.enum.d.ts +3 -1
  47. package/src/lib/enums/src/query.type.enum.js +3 -0
  48. package/src/lib/enums/src/query.type.enum.js.map +1 -1
  49. package/src/lib/models/src/client.configuration.model.d.ts +5 -1
  50. package/src/lib/models/src/client.configuration.model.js +2 -0
  51. package/src/lib/models/src/client.configuration.model.js.map +1 -1
  52. package/src/lib/models/src/client.contract.date.change.model.d.ts +69 -0
  53. package/src/lib/models/src/client.contract.date.change.model.js +25 -0
  54. package/src/lib/models/src/client.contract.date.change.model.js.map +1 -0
  55. package/src/lib/models/src/configurations.activity.log.model.d.ts +42 -0
  56. package/src/lib/models/src/configurations.activity.log.model.js +15 -0
  57. package/src/lib/models/src/configurations.activity.log.model.js.map +1 -0
  58. package/src/lib/models/src/configurations.model.d.ts +6 -2
  59. package/src/lib/models/src/configurations.model.js +2 -0
  60. package/src/lib/models/src/configurations.model.js.map +1 -1
  61. package/src/lib/models/src/index.d.ts +2 -0
  62. package/src/lib/models/src/index.js +2 -0
  63. package/src/lib/models/src/index.js.map +1 -1
  64. package/src/lib/routes/src/command.registry.routes.d.ts +1 -0
  65. package/src/lib/routes/src/command.registry.routes.js +1 -0
  66. package/src/lib/routes/src/command.registry.routes.js.map +1 -1
  67. package/src/lib/routes/src/query.service.routes.d.ts +2 -0
  68. package/src/lib/routes/src/query.service.routes.js +3 -0
  69. package/src/lib/routes/src/query.service.routes.js.map +1 -1
  70. package/src/lib/utilities/src/index.d.ts +1 -0
  71. package/src/lib/utilities/src/index.js +1 -0
  72. package/src/lib/utilities/src/index.js.map +1 -1
  73. package/src/lib/utilities/src/normalize.phone.number.d.ts +17 -0
  74. package/src/lib/utilities/src/normalize.phone.number.js +45 -0
  75. package/src/lib/utilities/src/normalize.phone.number.js.map +1 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autologix-engineering/shared",
3
- "version": "1.2.367",
3
+ "version": "1.2.369",
4
4
  "dependencies": {
5
5
  "tslib": "^2.3.0"
6
6
  },
@@ -3,4 +3,9 @@ import { BaseCommand } from './base.command';
3
3
  export declare class GenerateBAReimbursementSummaryZipCommand implements BaseCommand {
4
4
  type: CommandType;
5
5
  baReimbursementSummaryId: string;
6
+ /**
7
+ * Reuse a reimbursement's already-attached PDF instead of rendering it
8
+ * again. Off by default, so a plain re-run still refreshes every document.
9
+ */
10
+ reuseExistingPdfs?: boolean;
6
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"generate.ba.reimbursement.zip.handler.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/commands/src/generate.ba.reimbursement.zip.handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,MAAM,OAAO,wCAAwC;IAArD;QACI,SAAI,GAAG,WAAW,CAAC,wCAAwC,CAAC;IAEhE,CAAC;CAAA"}
1
+ {"version":3,"file":"generate.ba.reimbursement.zip.handler.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/commands/src/generate.ba.reimbursement.zip.handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGpD,MAAM,OAAO,wCAAwC;IAArD;QACI,SAAI,GAAG,WAAW,CAAC,wCAAwC,CAAC;IAOhE,CAAC;CAAA"}
@@ -0,0 +1,27 @@
1
+ import { DateChangeWindowState } from './contract.date.change.window';
2
+ /**
3
+ * Whether the remaining-budget message carries information worth showing.
4
+ *
5
+ * A block always shows, whatever the numbers — the user cannot proceed and is
6
+ * owed the reason.
7
+ */
8
+ export declare const shouldShowDateChangeBudget: (state: Pick<DateChangeWindowState, "enabled" | "blocked" | "remaining" | "windowLimit">) => boolean;
9
+ export type WindowResetTier =
10
+ /** Within ~3 months: say it in days, which is what a user plans around. */
11
+ 'relative'
12
+ /** Within ~2 years: an absolute date is still something to diary. */
13
+ | 'absolute'
14
+ /**
15
+ * Beyond that. Deliberately carries no date: "resets on 12 Mar 2054" reads
16
+ * as authoritative while being useless, whereas naming the configuration as
17
+ * the thing to question points at the only real next step.
18
+ */
19
+ | 'unreachable';
20
+ export interface WindowResetDescription {
21
+ tier: WindowResetTier;
22
+ /** Whole days until reset, rounded up. Only meaningful for 'relative'. */
23
+ days: number;
24
+ /** The reset instant. Only meaningful for 'absolute'. */
25
+ date: Date;
26
+ }
27
+ export declare const describeWindowReset: (windowEndsAt: Date, now?: Date) => WindowResetDescription;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Presentation decisions for the per-client date-change budget.
3
+ *
4
+ * X and Y are operator-configurable with no ceiling, so a tenant can set a
5
+ * 10,000-day window with a limit of 1,000. At that scale "3 of 1000 changes
6
+ * used, resets on 12 Mar 2054" is noise on every screen for 997 consecutive
7
+ * changes, and the date is 27 years of no help to anyone. These helpers decide
8
+ * *whether* and *in what terms* the budget is worth mentioning.
9
+ *
10
+ * They return decisions, not sentences: Orion composes English for its
11
+ * rejection message, Iris composes the same thing through i18n keys. Neither
12
+ * side may vary the rule — enforcement is unaffected by any of this, and the
13
+ * API always returns the exact numbers regardless of what is displayed.
14
+ */
15
+ const MS_PER_DAY = 24 * 60 * 60 * 1000;
16
+ /** A budget this small is meaningful from its very first change. */
17
+ const ALWAYS_SHOW_AT_OR_BELOW_LIMIT = 5;
18
+ /** Above that, stay silent until the cap is genuinely near. */
19
+ const SHOW_WHEN_REMAINING_AT_OR_BELOW = 3;
20
+ const NEAR_HORIZON_DAYS = 90;
21
+ const FAR_HORIZON_DAYS = 730;
22
+ /**
23
+ * Whether the remaining-budget message carries information worth showing.
24
+ *
25
+ * A block always shows, whatever the numbers — the user cannot proceed and is
26
+ * owed the reason.
27
+ */
28
+ export const shouldShowDateChangeBudget = (state) => {
29
+ if (!state.enabled)
30
+ return false;
31
+ if (state.blocked)
32
+ return true;
33
+ if ((state.windowLimit ?? 0) <= ALWAYS_SHOW_AT_OR_BELOW_LIMIT)
34
+ return true;
35
+ return state.remaining <= SHOW_WHEN_REMAINING_AT_OR_BELOW;
36
+ };
37
+ export const describeWindowReset = (windowEndsAt, now = new Date()) => {
38
+ const _msRemaining = windowEndsAt.getTime() - now.getTime();
39
+ const days = Math.max(0, Math.ceil(_msRemaining / MS_PER_DAY));
40
+ const tier = days <= NEAR_HORIZON_DAYS
41
+ ? 'relative'
42
+ : days <= FAR_HORIZON_DAYS
43
+ ? 'absolute'
44
+ : 'unreachable';
45
+ return { tier, days, date: new Date(windowEndsAt.getTime()) };
46
+ };
47
+ //# sourceMappingURL=contract.date.change.display.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract.date.change.display.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/contract-state/src/contract.date.change.display.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AAEH,MAAM,UAAU,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEvC,oEAAoE;AACpE,MAAM,6BAA6B,GAAG,CAAC,CAAC;AACxC,+DAA+D;AAC/D,MAAM,+BAA+B,GAAG,CAAC,CAAC;AAE1C,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B;;;;;GAKG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACzC,KAGC,EACS,EAAE;IACZ,IAAI,CAAC,KAAK,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IACjC,IAAI,KAAK,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IAC/B,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,CAAC,CAAC,IAAI,6BAA6B;QAAE,OAAO,IAAI,CAAC;IAC3E,OAAO,KAAK,CAAC,SAAS,IAAI,+BAA+B,CAAC;AAC3D,CAAC,CAAC;AAsBF,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAClC,YAAkB,EAClB,MAAY,IAAI,IAAI,EAAE,EACG,EAAE;IAC3B,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,EAAE,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;IAC5D,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,CAAC,CAAC;IAE/D,MAAM,IAAI,GACT,IAAI,IAAI,iBAAiB;QACxB,CAAC,CAAC,UAAU;QACZ,CAAC,CAAC,IAAI,IAAI,gBAAgB;YACzB,CAAC,CAAC,UAAU;YACZ,CAAC,CAAC,aAAa,CAAC;IAEnB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;AAC/D,CAAC,CAAC"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * The rolling budget for contract date changes.
3
+ *
4
+ * Dates may be changed at most `windowLimit` (Y) times within `windowDays` (X)
5
+ * days, counted across every contract in one bucket. The window is *anchored*
6
+ * on the first change rather than sliding: once X days have elapsed from that
7
+ * anchor the budget resets and the next change opens a fresh window at
8
+ * sequence 1.
9
+ *
10
+ * The bucket is (client, rental type) — see contract.date.change.throttle.ts,
11
+ * which owns that decision. Nothing here knows about it: this module is handed
12
+ * one bucket's anchor and count and answers for that bucket alone, which is
13
+ * exactly why splitting STR from LTR needed no change to the rule itself.
14
+ *
15
+ * Everything here is pure. Callers supply the two facts a database read
16
+ * provides — the anchor of the newest recorded change, and how many rows share
17
+ * that anchor — and get back the decision. That keeps the rule identical
18
+ * between the two write paths that enforce it and the query that reports it.
19
+ *
20
+ * X and Y are read live from `Configurations` on every evaluation, never from
21
+ * the values stamped on past rows. Raising Y therefore lifts a live block on
22
+ * the next request, and shrinking X can expire an in-flight window. That is
23
+ * deliberate: predictable behaviour beats a rule that appears not to respond to
24
+ * its own configuration. The bypass it opens is closed by *visibility* instead
25
+ * — changes to either field are written to `ConfigurationsActivityLog` and
26
+ * surface in the same report as the date changes they permitted.
27
+ */
28
+ export interface DateChangeWindowInput {
29
+ /** X, from `ConfigurationField.ContractCanBeExtendedBy`. Null/0 disables. */
30
+ windowDays?: number | null;
31
+ /** Y, from `ConfigurationField.NoOfTimesContractCanBeExtended`. Null/0 disables. */
32
+ windowLimit?: number | null;
33
+ /**
34
+ * `windowStartedAt` of the newest recorded change for this client, or null
35
+ * when the client has never had one.
36
+ */
37
+ latestWindowStartedAt?: Date | null;
38
+ /** How many recorded rows share that anchor. */
39
+ usedInLatestWindow?: number;
40
+ /** Evaluation instant; injectable so tests need no clock control. */
41
+ now?: Date;
42
+ }
43
+ export interface DateChangeWindowState {
44
+ /** False when either X or Y is unset — the rule never blocks. */
45
+ enabled: boolean;
46
+ windowDays: number | null;
47
+ windowLimit: number | null;
48
+ /**
49
+ * The anchor a change made *now* would be counted into: the existing anchor
50
+ * while it is still live, otherwise `now` — the anchor a fresh window opens
51
+ * at. Null when the rule is disabled.
52
+ */
53
+ windowStartedAt: Date | null;
54
+ /** `windowStartedAt + X days`. Null when the rule is disabled. */
55
+ windowEndsAt: Date | null;
56
+ /** Changes already counted into `windowStartedAt`. Zero for a fresh window. */
57
+ used: number;
58
+ remaining: number;
59
+ blocked: boolean;
60
+ /** The sequence a change made now would take: `used + 1`. */
61
+ nextSeqInWindow: number;
62
+ }
63
+ export declare const resolveDateChangeWindow: ({ windowDays, windowLimit, latestWindowStartedAt, usedInLatestWindow, now, }: DateChangeWindowInput) => DateChangeWindowState;
@@ -0,0 +1,85 @@
1
+ /**
2
+ * The rolling budget for contract date changes.
3
+ *
4
+ * Dates may be changed at most `windowLimit` (Y) times within `windowDays` (X)
5
+ * days, counted across every contract in one bucket. The window is *anchored*
6
+ * on the first change rather than sliding: once X days have elapsed from that
7
+ * anchor the budget resets and the next change opens a fresh window at
8
+ * sequence 1.
9
+ *
10
+ * The bucket is (client, rental type) — see contract.date.change.throttle.ts,
11
+ * which owns that decision. Nothing here knows about it: this module is handed
12
+ * one bucket's anchor and count and answers for that bucket alone, which is
13
+ * exactly why splitting STR from LTR needed no change to the rule itself.
14
+ *
15
+ * Everything here is pure. Callers supply the two facts a database read
16
+ * provides — the anchor of the newest recorded change, and how many rows share
17
+ * that anchor — and get back the decision. That keeps the rule identical
18
+ * between the two write paths that enforce it and the query that reports it.
19
+ *
20
+ * X and Y are read live from `Configurations` on every evaluation, never from
21
+ * the values stamped on past rows. Raising Y therefore lifts a live block on
22
+ * the next request, and shrinking X can expire an in-flight window. That is
23
+ * deliberate: predictable behaviour beats a rule that appears not to respond to
24
+ * its own configuration. The bypass it opens is closed by *visibility* instead
25
+ * — changes to either field are written to `ConfigurationsActivityLog` and
26
+ * surface in the same report as the date changes they permitted.
27
+ */
28
+ /** Milliseconds in a day. India has no DST, and a window is a duration from an
29
+ * instant rather than a calendar-day boundary, so exact arithmetic is both
30
+ * correct and free of the timezone questions `toISTStartOfDay` exists to
31
+ * answer. */
32
+ const MS_PER_DAY = 24 * 60 * 60 * 1000;
33
+ export const resolveDateChangeWindow = ({ windowDays, windowLimit, latestWindowStartedAt, usedInLatestWindow = 0, now = new Date(), }) => {
34
+ const _days = windowDays ?? 0;
35
+ const _limit = windowLimit ?? 0;
36
+ // Either half unset means the operator has not opted in. Both are nullable
37
+ // with no default, so this is the state every tenant starts in.
38
+ if (_days <= 0 || _limit <= 0) {
39
+ return {
40
+ enabled: false,
41
+ windowDays: null,
42
+ windowLimit: null,
43
+ windowStartedAt: null,
44
+ windowEndsAt: null,
45
+ used: 0,
46
+ remaining: Number.POSITIVE_INFINITY,
47
+ blocked: false,
48
+ nextSeqInWindow: 1,
49
+ };
50
+ }
51
+ const _existingAnchor = latestWindowStartedAt ?? null;
52
+ const _existingEnd = _existingAnchor
53
+ ? new Date(_existingAnchor.getTime() + _days * MS_PER_DAY)
54
+ : null;
55
+ // The anchor is live only while `now` is still inside it. Once it elapses —
56
+ // or if X was shrunk far enough to expire it retroactively — a change made
57
+ // now opens a fresh window anchored at `now`, with nothing counted against
58
+ // it yet.
59
+ //
60
+ // Narrowed on the anchor itself rather than on a `_windowIsLive` boolean:
61
+ // liveness implies a non-null anchor, but that implication travels through
62
+ // an intermediate boolean that the compiler cannot follow back, and under
63
+ // strict null checks the reuse below is then rejected.
64
+ const _liveAnchor = _existingAnchor && _existingEnd && now.getTime() < _existingEnd.getTime()
65
+ ? _existingAnchor
66
+ : null;
67
+ const windowStartedAt = _liveAnchor
68
+ ? new Date(_liveAnchor.getTime())
69
+ : new Date(now.getTime());
70
+ const used = _liveAnchor ? usedInLatestWindow : 0;
71
+ return {
72
+ enabled: true,
73
+ windowDays: _days,
74
+ windowLimit: _limit,
75
+ windowStartedAt,
76
+ windowEndsAt: new Date(windowStartedAt.getTime() + _days * MS_PER_DAY),
77
+ used,
78
+ // Clamped at zero: `used` can exceed the limit after an override, or
79
+ // after Y was lowered below what a window had already spent.
80
+ remaining: Math.max(0, _limit - used),
81
+ blocked: used >= _limit,
82
+ nextSeqInWindow: used + 1,
83
+ };
84
+ };
85
+ //# sourceMappingURL=contract.date.change.window.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contract.date.change.window.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/contract-state/src/contract.date.change.window.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;;;aAGa;AACb,MAAM,UAAU,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAuCvC,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EACvC,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,kBAAkB,GAAG,CAAC,EACtB,GAAG,GAAG,IAAI,IAAI,EAAE,GACO,EAAyB,EAAE;IAClD,MAAM,KAAK,GAAG,UAAU,IAAI,CAAC,CAAC;IAC9B,MAAM,MAAM,GAAG,WAAW,IAAI,CAAC,CAAC;IAEhC,2EAA2E;IAC3E,gEAAgE;IAChE,IAAI,KAAK,IAAI,CAAC,IAAI,MAAM,IAAI,CAAC,EAAE,CAAC;QAC/B,OAAO;YACN,OAAO,EAAE,KAAK;YACd,UAAU,EAAE,IAAI;YAChB,WAAW,EAAE,IAAI;YACjB,eAAe,EAAE,IAAI;YACrB,YAAY,EAAE,IAAI;YAClB,IAAI,EAAE,CAAC;YACP,SAAS,EAAE,MAAM,CAAC,iBAAiB;YACnC,OAAO,EAAE,KAAK;YACd,eAAe,EAAE,CAAC;SAClB,CAAC;IACH,CAAC;IAED,MAAM,eAAe,GAAG,qBAAqB,IAAI,IAAI,CAAC;IACtD,MAAM,YAAY,GAAG,eAAe;QACnC,CAAC,CAAC,IAAI,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,GAAG,KAAK,GAAG,UAAU,CAAC;QAC1D,CAAC,CAAC,IAAI,CAAC;IAER,4EAA4E;IAC5E,2EAA2E;IAC3E,2EAA2E;IAC3E,UAAU;IACV,EAAE;IACF,0EAA0E;IAC1E,2EAA2E;IAC3E,0EAA0E;IAC1E,uDAAuD;IACvD,MAAM,WAAW,GAChB,eAAe,IAAI,YAAY,IAAI,GAAG,CAAC,OAAO,EAAE,GAAG,YAAY,CAAC,OAAO,EAAE;QACxE,CAAC,CAAC,eAAe;QACjB,CAAC,CAAC,IAAI,CAAC;IAET,MAAM,eAAe,GAAG,WAAW;QAClC,CAAC,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;QACjC,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IAC3B,MAAM,IAAI,GAAG,WAAW,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;IAElD,OAAO;QACN,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,KAAK;QACjB,WAAW,EAAE,MAAM;QACnB,eAAe;QACf,YAAY,EAAE,IAAI,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,GAAG,KAAK,GAAG,UAAU,CAAC;QACtE,IAAI;QACJ,qEAAqE;QACrE,6DAA6D;QAC7D,SAAS,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACrC,OAAO,EAAE,IAAI,IAAI,MAAM;QACvB,eAAe,EAAE,IAAI,GAAG,CAAC;KACzB,CAAC;AACH,CAAC,CAAC"}
@@ -1,3 +1,5 @@
1
1
  export { ContractState } from '../../enums/src/contract.state.enum';
2
2
  export * from './derive.contract.state';
3
3
  export * from './contract.coverage.bound';
4
+ export * from './contract.date.change.window';
5
+ export * from './contract.date.change.display';
@@ -5,4 +5,6 @@
5
5
  export { ContractState } from '../../enums/src/contract.state.enum';
6
6
  export * from './derive.contract.state';
7
7
  export * from './contract.coverage.bound';
8
+ export * from './contract.date.change.window';
9
+ export * from './contract.date.change.display';
8
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/contract-state/src/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,yEAAyE;AACzE,gEAAgE;AAChE,4EAA4E;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/contract-state/src/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,yEAAyE;AACzE,gEAAgE;AAChE,4EAA4E;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC"}
@@ -4,5 +4,11 @@ export declare class UpdateClientPersonaContractFileDTO {
4
4
  fileId?: string;
5
5
  internalFileName?: string;
6
6
  byPersonaId: string;
7
+ /**
8
+ * Asks to push this change through a hit date-change cap. Re-checked
9
+ * against the caller's permission server side — see
10
+ * `UpdateContractTermsDTO.overrideDateChangeLimit`.
11
+ */
12
+ overrideDateChangeLimit?: boolean;
7
13
  constructor(_obj?: Partial<UpdateClientPersonaContractFileDTO>);
8
14
  }
@@ -1,5 +1,5 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
- import { IsDateString, IsOptional, IsString, IsUUID } from 'class-validator';
2
+ import { IsBoolean, IsDateString, IsOptional, IsString, IsUUID, } from 'class-validator';
3
3
  export class UpdateClientPersonaContractFileDTO {
4
4
  constructor(_obj) {
5
5
  Object.assign(this, _obj);
@@ -27,4 +27,9 @@ __decorate([
27
27
  IsUUID(),
28
28
  __metadata("design:type", String)
29
29
  ], UpdateClientPersonaContractFileDTO.prototype, "byPersonaId", void 0);
30
+ __decorate([
31
+ IsOptional(),
32
+ IsBoolean(),
33
+ __metadata("design:type", Boolean)
34
+ ], UpdateClientPersonaContractFileDTO.prototype, "overrideDateChangeLimit", void 0);
30
35
  //# sourceMappingURL=update.client.persona.contract.file.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"update.client.persona.contract.file.dto.js","sourceRoot":"","sources":["../../../../../../../../libs/shared/src/lib/data-transfer-objects/src/command/update.client.persona.contract.file.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE7E,MAAM,OAAO,kCAAkC;IAkB9C,YAAY,IAAkD;QAC7D,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC;CACD;AAnBA;IADC,MAAM,EAAE;;+EACmB;AAG5B;IADC,YAAY,EAAE;;mEACC;AAIhB;IAFC,UAAU,EAAE;IACZ,MAAM,EAAE;;kEACO;AAIhB;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;4EACe;AAG1B;IADC,MAAM,EAAE;;uEACW"}
1
+ {"version":3,"file":"update.client.persona.contract.file.dto.js","sourceRoot":"","sources":["../../../../../../../../libs/shared/src/lib/data-transfer-objects/src/command/update.client.persona.contract.file.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EACN,SAAS,EACT,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,MAAM,GACN,MAAM,iBAAiB,CAAC;AAEzB,MAAM,OAAO,kCAAkC;IA2B9C,YAAY,IAAkD;QAC7D,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC;CACD;AA5BA;IADC,MAAM,EAAE;;+EACmB;AAG5B;IADC,YAAY,EAAE;;mEACC;AAIhB;IAFC,UAAU,EAAE;IACZ,MAAM,EAAE;;kEACO;AAIhB;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;4EACe;AAG1B;IADC,MAAM,EAAE;;uEACW;AASpB;IAFC,UAAU,EAAE;IACZ,SAAS,EAAE;;mFACsB"}
@@ -8,5 +8,13 @@ export declare class UpdateContractTermsDTO {
8
8
  fileId?: string;
9
9
  byPersonaId: string;
10
10
  contextId?: string;
11
+ /**
12
+ * Asks to push this change through a hit date-change cap.
13
+ *
14
+ * A request, not a grant — the server re-checks the caller's
15
+ * `Override contract date-change limit` permission before honouring it, so
16
+ * setting this flag alone buys nothing.
17
+ */
18
+ overrideDateChangeLimit?: boolean;
11
19
  constructor(_obj?: Partial<UpdateContractTermsDTO>);
12
20
  }
@@ -1,6 +1,6 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
2
  import { TermRentalType } from '../../../enums/src';
3
- import { IsDateString, IsNumber, IsOptional, IsUUID, IsEnum } from 'class-validator';
3
+ import { IsBoolean, IsDateString, IsNumber, IsOptional, IsUUID, IsEnum, } from 'class-validator';
4
4
  export class UpdateContractTermsDTO {
5
5
  constructor(_obj) {
6
6
  Object.assign(this, _obj);
@@ -43,4 +43,9 @@ __decorate([
43
43
  IsUUID(),
44
44
  __metadata("design:type", String)
45
45
  ], UpdateContractTermsDTO.prototype, "contextId", void 0);
46
+ __decorate([
47
+ IsOptional(),
48
+ IsBoolean(),
49
+ __metadata("design:type", Boolean)
50
+ ], UpdateContractTermsDTO.prototype, "overrideDateChangeLimit", void 0);
46
51
  //# sourceMappingURL=update.contract.terms.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"update.contract.terms.dto.js","sourceRoot":"","sources":["../../../../../../../../libs/shared/src/lib/data-transfer-objects/src/command/update.contract.terms.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAY,MAAM,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAE/F,MAAM,OAAO,sBAAsB;IA6BlC,YAAY,IAAsC;QACjD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC;CACD;AA9BA;IADC,MAAM,EAAE;;+DACe;AAGxB;IADC,YAAY,EAAE;;uDACC;AAIhB;IAFC,YAAY,EAAE;IACd,UAAU,EAAE;;yDACM;AAInB;IAFC,UAAU,EAAE;IACZ,MAAM,CAAC,cAAc,CAAC;;0DACK;AAI5B;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;6DACY;AAIvB;IAFC,UAAU,EAAE;IACZ,MAAM,EAAE;;sDACO;AAGhB;IADC,MAAM,EAAE;;2DACW;AAIpB;IAFC,UAAU,EAAE;IACZ,MAAM,EAAE;;yDACU"}
1
+ {"version":3,"file":"update.contract.terms.dto.js","sourceRoot":"","sources":["../../../../../../../../libs/shared/src/lib/data-transfer-objects/src/command/update.contract.terms.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EACN,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,UAAU,EAEV,MAAM,EACN,MAAM,GACN,MAAM,iBAAiB,CAAC;AAEzB,MAAM,OAAO,sBAAsB;IAyClC,YAAY,IAAsC;QACjD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC;CACD;AA1CA;IADC,MAAM,EAAE;;+DACe;AAGxB;IADC,YAAY,EAAE;;uDACC;AAIhB;IAFC,YAAY,EAAE;IACd,UAAU,EAAE;;yDACM;AAInB;IAFC,UAAU,EAAE;IACZ,MAAM,CAAC,cAAc,CAAC;;0DACK;AAI5B;IAFC,UAAU,EAAE;IACZ,QAAQ,EAAE;;6DACY;AAIvB;IAFC,UAAU,EAAE;IACZ,MAAM,EAAE;;sDACO;AAGhB;IADC,MAAM,EAAE;;2DACW;AAIpB;IAFC,UAAU,EAAE;IACZ,MAAM,EAAE;;yDACU;AAWnB;IAFC,UAAU,EAAE;IACZ,SAAS,EAAE;;uEACsB"}
@@ -1,4 +1,9 @@
1
1
  export declare class GetBaReimbursementSummaryZipDto {
2
2
  baReimbursementSummaryId: string;
3
+ /**
4
+ * Reuse already-attached PDFs rather than re-rendering them. Useful for
5
+ * repairing a short zip without reissuing documents that are already good.
6
+ */
7
+ reuseExistingPdfs?: boolean;
3
8
  constructor(obj?: Partial<GetBaReimbursementSummaryZipDto>);
4
9
  }
@@ -1,5 +1,6 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
- import { IsUUID } from "class-validator";
2
+ import { IsBoolean, IsOptional, IsUUID } from "class-validator";
3
+ import { Transform } from "class-transformer";
3
4
  export class GetBaReimbursementSummaryZipDto {
4
5
  constructor(obj) {
5
6
  Object.assign(this, obj);
@@ -9,4 +10,10 @@ __decorate([
9
10
  IsUUID(),
10
11
  __metadata("design:type", String)
11
12
  ], GetBaReimbursementSummaryZipDto.prototype, "baReimbursementSummaryId", void 0);
13
+ __decorate([
14
+ IsOptional(),
15
+ Transform(({ value }) => value === true || value === 'true'),
16
+ IsBoolean(),
17
+ __metadata("design:type", Boolean)
18
+ ], GetBaReimbursementSummaryZipDto.prototype, "reuseExistingPdfs", void 0);
12
19
  //# sourceMappingURL=get.ba.reimbursement.zip.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get.ba.reimbursement.zip.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/get.ba.reimbursement.zip.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,MAAM,OAAO,+BAA+B;IAIxC,YAAY,GAA8C;QACtD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC7B,CAAC;CACJ;AALG;IADC,MAAM,EAAE;;iFACwB"}
1
+ {"version":3,"file":"get.ba.reimbursement.zip.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/get.ba.reimbursement.zip.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,MAAM,OAAO,+BAA+B;IAaxC,YAAY,GAA8C;QACtD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC7B,CAAC;CACJ;AAdG;IADC,MAAM,EAAE;;iFACwB;AASjC;IAHC,UAAU,EAAE;IACZ,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,MAAM,CAAC;IAC5D,SAAS,EAAE;;0EACgB"}
@@ -0,0 +1,47 @@
1
+ import { TermRentalType } from '../../enums/src/index';
2
+ /**
3
+ * Current date-change budget for one (client, rental type) bucket.
4
+ *
5
+ * Drives the contract-terms banner and the pre-submit warning, so it is a
6
+ * point read rather than a listing — the last few changes it returns are
7
+ * context for the message, not a report.
8
+ */
9
+ export declare class GetClientContractDateChangeWindowDTO {
10
+ clientPersonaId: string;
11
+ contextId: string;
12
+ /**
13
+ * Part of the bucket key, not a filter. STR and LTR hold separate tallies,
14
+ * so a caller must say which one it is asking about; omitting it addresses
15
+ * the contract-file bucket (rental type NULL), never a client-wide total.
16
+ */
17
+ rentalType?: TermRentalType;
18
+ constructor(obj?: Partial<GetClientContractDateChangeWindowDTO>);
19
+ }
20
+ /**
21
+ * The management report: who has been moving contract dates, for which client,
22
+ * and whether they had to override a cap to do it.
23
+ *
24
+ * Configuration edits to the throttle's own two fields are interleaved into
25
+ * the same result, because "the limit was raised to 3 an hour before these
26
+ * three changes" is the shape the report exists to make visible.
27
+ */
28
+ export declare class GetContractDateChangesDTO {
29
+ contextId: string;
30
+ clientPersonaId?: string;
31
+ skip?: number;
32
+ take?: number;
33
+ /** Free text over the acting user's name and the client's name. */
34
+ searchText?: string;
35
+ from?: string;
36
+ to?: string;
37
+ rentalType?: TermRentalType;
38
+ /** Narrow to waived changes only — the ones worth a second look. */
39
+ overriddenOnly?: boolean;
40
+ /**
41
+ * Whether to interleave `ConfigurationsActivityLog` entries for the two
42
+ * throttle fields. Defaults to true at the controller; a caller that wants
43
+ * only the date changes themselves can turn it off.
44
+ */
45
+ includeConfigChanges?: boolean;
46
+ constructor(obj?: Partial<GetContractDateChangesDTO>);
47
+ }
@@ -0,0 +1,96 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import { Transform } from 'class-transformer';
3
+ import { IsBoolean, IsDateString, IsEnum, IsNumber, IsOptional, IsString, IsUUID, Max, } from 'class-validator';
4
+ import { TermRentalType } from '../../enums/src/index';
5
+ /**
6
+ * Current date-change budget for one (client, rental type) bucket.
7
+ *
8
+ * Drives the contract-terms banner and the pre-submit warning, so it is a
9
+ * point read rather than a listing — the last few changes it returns are
10
+ * context for the message, not a report.
11
+ */
12
+ export class GetClientContractDateChangeWindowDTO {
13
+ constructor(obj) {
14
+ Object.assign(this, obj);
15
+ }
16
+ }
17
+ __decorate([
18
+ IsUUID(),
19
+ __metadata("design:type", String)
20
+ ], GetClientContractDateChangeWindowDTO.prototype, "clientPersonaId", void 0);
21
+ __decorate([
22
+ IsUUID(),
23
+ __metadata("design:type", String)
24
+ ], GetClientContractDateChangeWindowDTO.prototype, "contextId", void 0);
25
+ __decorate([
26
+ IsOptional(),
27
+ IsEnum(TermRentalType),
28
+ __metadata("design:type", String)
29
+ ], GetClientContractDateChangeWindowDTO.prototype, "rentalType", void 0);
30
+ /**
31
+ * The management report: who has been moving contract dates, for which client,
32
+ * and whether they had to override a cap to do it.
33
+ *
34
+ * Configuration edits to the throttle's own two fields are interleaved into
35
+ * the same result, because "the limit was raised to 3 an hour before these
36
+ * three changes" is the shape the report exists to make visible.
37
+ */
38
+ export class GetContractDateChangesDTO {
39
+ constructor(obj) {
40
+ Object.assign(this, obj);
41
+ }
42
+ }
43
+ __decorate([
44
+ IsUUID(),
45
+ __metadata("design:type", String)
46
+ ], GetContractDateChangesDTO.prototype, "contextId", void 0);
47
+ __decorate([
48
+ IsOptional(),
49
+ IsUUID(),
50
+ __metadata("design:type", String)
51
+ ], GetContractDateChangesDTO.prototype, "clientPersonaId", void 0);
52
+ __decorate([
53
+ IsOptional(),
54
+ Transform(Number),
55
+ __metadata("design:type", Number)
56
+ ], GetContractDateChangesDTO.prototype, "skip", void 0);
57
+ __decorate([
58
+ IsOptional(),
59
+ IsNumber(),
60
+ Max(200),
61
+ Transform(Number),
62
+ __metadata("design:type", Number)
63
+ ], GetContractDateChangesDTO.prototype, "take", void 0);
64
+ __decorate([
65
+ IsOptional(),
66
+ IsString(),
67
+ __metadata("design:type", String)
68
+ ], GetContractDateChangesDTO.prototype, "searchText", void 0);
69
+ __decorate([
70
+ IsOptional(),
71
+ IsDateString(),
72
+ __metadata("design:type", String)
73
+ ], GetContractDateChangesDTO.prototype, "from", void 0);
74
+ __decorate([
75
+ IsOptional(),
76
+ IsDateString(),
77
+ __metadata("design:type", String)
78
+ ], GetContractDateChangesDTO.prototype, "to", void 0);
79
+ __decorate([
80
+ IsOptional(),
81
+ IsEnum(TermRentalType),
82
+ __metadata("design:type", String)
83
+ ], GetContractDateChangesDTO.prototype, "rentalType", void 0);
84
+ __decorate([
85
+ IsOptional(),
86
+ Transform(({ value }) => value === true || value === 'true'),
87
+ IsBoolean(),
88
+ __metadata("design:type", Boolean)
89
+ ], GetContractDateChangesDTO.prototype, "overriddenOnly", void 0);
90
+ __decorate([
91
+ IsOptional(),
92
+ Transform(({ value }) => value === true || value === 'true'),
93
+ IsBoolean(),
94
+ __metadata("design:type", Boolean)
95
+ ], GetContractDateChangesDTO.prototype, "includeConfigChanges", void 0);
96
+ //# sourceMappingURL=get.contract.date.changes.dto.js.map
@@ -0,0 +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,33 +1,24 @@
1
1
  /**
2
- * Monthly Sign Off — Preview Details screen. (AD-3206)
2
+ * Sign Off — Preview Details screen. (AD-3206)
3
3
  *
4
- * Everything the screen shows is computed by the backend from the daily logs
5
- * already on record, scoped to the signing driver and the given month. The app
6
- * sends nothing to compute.
4
+ * Everything the screen shows is computed by the backend from the driver's own
5
+ * open entries, scoped to the signing driver. The app sends nothing to compute.
6
+ *
7
+ * **No month.** The preview answers "what have I logged that is still waiting
8
+ * to be signed", which is a question about the booking rather than about a
9
+ * calendar month: an entry left unsigned in March is still the driver's to
10
+ * settle in April, and a month-scoped preview simply stopped showing it. The
11
+ * range is the whole booking period and the filter is the entry's status.
7
12
  */
8
13
  export declare class GetLTRDriverMonthlySignOffPreviewDTO {
9
- /** The booking whose month is being previewed. */
14
+ /** The booking being previewed. */
10
15
  requestId: string;
11
16
  /**
12
- * The signing driver. Totals, the day list and the incomplete days are all
13
- * computed for this driver alone — a booking can have more than one driver
14
- * in a month through replacement.
17
+ * The signing driver. Totals, the entry list and the day list are computed
18
+ * for this driver alone — a booking can have more than one driver through
19
+ * replacement, and he sees only the entries he recorded himself.
15
20
  */
16
21
  registeredUserId: string;
17
- /**
18
- * The month being previewed, as `YYYY-MM`.
19
- *
20
- * Optional. Omitted, the preview covers the **whole booking** rather than
21
- * one month: every day the driver logged across the booking period, with
22
- * the totals summed over all of them. `month` comes back null and
23
- * `monthStart`/`monthEnd` report the booking's own bounds.
24
- *
25
- * Signing still requires a month — a lock is written per (booking, driver,
26
- * month) — so the all-booking preview always returns `canSignOff: false`,
27
- * and `incompleteDays` empty: that list warns about what a sign-off would
28
- * lock away, and no sign-off is on offer.
29
- */
30
- month?: string;
31
22
  contextId?: string;
32
23
  constructor(obj?: Partial<GetLTRDriverMonthlySignOffPreviewDTO>);
33
24
  }
@@ -1,11 +1,16 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
- import { IsOptional, IsString, IsUUID, Matches } from 'class-validator';
2
+ import { IsOptional, IsUUID } from 'class-validator';
3
3
  /**
4
- * Monthly Sign Off — Preview Details screen. (AD-3206)
4
+ * Sign Off — Preview Details screen. (AD-3206)
5
5
  *
6
- * Everything the screen shows is computed by the backend from the daily logs
7
- * already on record, scoped to the signing driver and the given month. The app
8
- * sends nothing to compute.
6
+ * Everything the screen shows is computed by the backend from the driver's own
7
+ * open entries, scoped to the signing driver. The app sends nothing to compute.
8
+ *
9
+ * **No month.** The preview answers "what have I logged that is still waiting
10
+ * to be signed", which is a question about the booking rather than about a
11
+ * calendar month: an entry left unsigned in March is still the driver's to
12
+ * settle in April, and a month-scoped preview simply stopped showing it. The
13
+ * range is the whole booking period and the filter is the entry's status.
9
14
  */
10
15
  export class GetLTRDriverMonthlySignOffPreviewDTO {
11
16
  constructor(obj) {
@@ -20,14 +25,6 @@ __decorate([
20
25
  IsUUID(4),
21
26
  __metadata("design:type", String)
22
27
  ], GetLTRDriverMonthlySignOffPreviewDTO.prototype, "registeredUserId", void 0);
23
- __decorate([
24
- IsOptional(),
25
- Matches(/^\d{4}-(0[1-9]|1[0-2])$/, {
26
- message: 'month must be in YYYY-MM format',
27
- }),
28
- IsString(),
29
- __metadata("design:type", String)
30
- ], GetLTRDriverMonthlySignOffPreviewDTO.prototype, "month", void 0);
31
28
  __decorate([
32
29
  IsOptional(),
33
30
  IsUUID(),
@@ -1 +1 @@
1
- {"version":3,"file":"get.ltr.driver.monthly.sign.off.preview.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/get.ltr.driver.monthly.sign.off.preview.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAExE;;;;;;GAMG;AACH,MAAM,OAAO,oCAAoC;IAqChD,YAAY,GAAmD;QAC9D,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AArCA;IADC,MAAM,EAAE;;uEACS;AAQlB;IADC,MAAM,CAAC,CAAC,CAAC;;8EACe;AAoBzB;IALC,UAAU,EAAE;IACZ,OAAO,CAAC,yBAAyB,EAAE;QACnC,OAAO,EAAE,iCAAiC;KAC1C,CAAC;IACD,QAAQ,EAAE;;mEACI;AAIf;IAFC,UAAU,EAAE;IACZ,MAAM,EAAE;;uEACU"}
1
+ {"version":3,"file":"get.ltr.driver.monthly.sign.off.preview.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/get.ltr.driver.monthly.sign.off.preview.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAErD;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,oCAAoC;IAiBhD,YAAY,GAAmD;QAC9D,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AAjBA;IADC,MAAM,EAAE;;uEACS;AAQlB;IADC,MAAM,CAAC,CAAC,CAAC;;8EACe;AAIzB;IAFC,UAAU,EAAE;IACZ,MAAM,EAAE;;uEACU"}