hvp-shared 13.14.0 → 13.16.0

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.
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Administration Route (Vía de administración) Enums
3
+ *
4
+ * Single source of truth for the route of administration used in controlled
5
+ * (Grupo I) prescription metadata and the SITPV portal "Tratamiento" field.
6
+ * Stored value is language-independent; the label is the Spanish display text
7
+ * (also what gets copied into the portal). See GH#425.
8
+ */
9
+ export declare enum AdministrationRoute {
10
+ oral = "oral",
11
+ intravenous = "intravenous",
12
+ intramuscular = "intramuscular",
13
+ subcutaneous = "subcutaneous",
14
+ ophthalmic = "ophthalmic",
15
+ otic = "otic",
16
+ inhaled = "inhaled",
17
+ topical = "topical"
18
+ }
19
+ /** Spanish display labels for AdministrationRoute */
20
+ export declare const ADMINISTRATION_ROUTE_LABELS: Record<AdministrationRoute, string>;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ /**
3
+ * Administration Route (Vía de administración) Enums
4
+ *
5
+ * Single source of truth for the route of administration used in controlled
6
+ * (Grupo I) prescription metadata and the SITPV portal "Tratamiento" field.
7
+ * Stored value is language-independent; the label is the Spanish display text
8
+ * (also what gets copied into the portal). See GH#425.
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.ADMINISTRATION_ROUTE_LABELS = exports.AdministrationRoute = void 0;
12
+ var AdministrationRoute;
13
+ (function (AdministrationRoute) {
14
+ AdministrationRoute["oral"] = "oral";
15
+ AdministrationRoute["intravenous"] = "intravenous";
16
+ AdministrationRoute["intramuscular"] = "intramuscular";
17
+ AdministrationRoute["subcutaneous"] = "subcutaneous";
18
+ AdministrationRoute["ophthalmic"] = "ophthalmic";
19
+ AdministrationRoute["otic"] = "otic";
20
+ AdministrationRoute["inhaled"] = "inhaled";
21
+ AdministrationRoute["topical"] = "topical";
22
+ })(AdministrationRoute || (exports.AdministrationRoute = AdministrationRoute = {}));
23
+ /** Spanish display labels for AdministrationRoute */
24
+ exports.ADMINISTRATION_ROUTE_LABELS = {
25
+ [AdministrationRoute.oral]: 'Oral',
26
+ [AdministrationRoute.intravenous]: 'Intravenosa (IV)',
27
+ [AdministrationRoute.intramuscular]: 'Intramuscular (IM)',
28
+ [AdministrationRoute.subcutaneous]: 'Subcutánea (SC)',
29
+ [AdministrationRoute.ophthalmic]: 'Oftálmica',
30
+ [AdministrationRoute.otic]: 'Ótica',
31
+ [AdministrationRoute.inhaled]: 'Inhalada',
32
+ [AdministrationRoute.topical]: 'Tópica / Local',
33
+ };
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Force Majeure (Fuerza mayor) Enums
3
+ *
4
+ * Single source of truth for force-majeure declaration scope.
5
+ * A declaration marks a day (or range) as "fuerza mayor" for everyone or for a
6
+ * single branch. Affected collaborators are paid full salary with their actual
7
+ * scheduled hours computed. See GH#423.
8
+ */
9
+ export declare enum ForceMajeureScope {
10
+ all = "all",
11
+ branch = "branch"
12
+ }
13
+ /** Spanish display labels for ForceMajeureScope */
14
+ export declare const FORCE_MAJEURE_SCOPE_LABELS: Record<ForceMajeureScope, string>;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ /**
3
+ * Force Majeure (Fuerza mayor) Enums
4
+ *
5
+ * Single source of truth for force-majeure declaration scope.
6
+ * A declaration marks a day (or range) as "fuerza mayor" for everyone or for a
7
+ * single branch. Affected collaborators are paid full salary with their actual
8
+ * scheduled hours computed. See GH#423.
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.FORCE_MAJEURE_SCOPE_LABELS = exports.ForceMajeureScope = void 0;
12
+ var ForceMajeureScope;
13
+ (function (ForceMajeureScope) {
14
+ ForceMajeureScope["all"] = "all";
15
+ ForceMajeureScope["branch"] = "branch";
16
+ })(ForceMajeureScope || (exports.ForceMajeureScope = ForceMajeureScope = {}));
17
+ /** Spanish display labels for ForceMajeureScope */
18
+ exports.FORCE_MAJEURE_SCOPE_LABELS = {
19
+ [ForceMajeureScope.all]: 'Todas las sucursales',
20
+ [ForceMajeureScope.branch]: 'Sucursal específica',
21
+ };
@@ -19,6 +19,7 @@ export * from './employment.enums';
19
19
  export * from './qvet-cash-flow.enums';
20
20
  export * from './time-off.enums';
21
21
  export * from './time-off.constants';
22
+ export * from './force-majeure.enums';
22
23
  export * from './hris.constants';
23
24
  export * from './payroll-features.constants';
24
25
  export * from './inventory-session.enums';
@@ -30,3 +31,4 @@ export * from './sat-income-invoice';
30
31
  export * from './global-invoice.enums';
31
32
  export * from './google-calendar.constants';
32
33
  export * from './performance-metrics.constants';
34
+ export * from './administration-route.enums';
@@ -35,6 +35,7 @@ __exportStar(require("./employment.enums"), exports);
35
35
  __exportStar(require("./qvet-cash-flow.enums"), exports);
36
36
  __exportStar(require("./time-off.enums"), exports);
37
37
  __exportStar(require("./time-off.constants"), exports);
38
+ __exportStar(require("./force-majeure.enums"), exports);
38
39
  __exportStar(require("./hris.constants"), exports);
39
40
  __exportStar(require("./payroll-features.constants"), exports);
40
41
  __exportStar(require("./inventory-session.enums"), exports);
@@ -46,3 +47,4 @@ __exportStar(require("./sat-income-invoice"), exports);
46
47
  __exportStar(require("./global-invoice.enums"), exports);
47
48
  __exportStar(require("./google-calendar.constants"), exports);
48
49
  __exportStar(require("./performance-metrics.constants"), exports);
50
+ __exportStar(require("./administration-route.enums"), exports);
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Force Majeure Declaration API Contracts
3
+ * Request and Response types for force-majeure declaration endpoints.
4
+ */
5
+ export * from './responses';
6
+ export * from './requests';
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /**
3
+ * Force Majeure Declaration API Contracts
4
+ * Request and Response types for force-majeure declaration endpoints.
5
+ */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
18
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
19
+ };
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ __exportStar(require("./responses"), exports);
22
+ __exportStar(require("./requests"), exports);
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Force Majeure Declaration Request Types
3
+ *
4
+ * API request contracts for force-majeure declaration endpoints. A single
5
+ * declaration covers everyone (or a branch) for the given day(s); affected
6
+ * collaborators are resolved at attendance-read time (individual time-off wins).
7
+ *
8
+ * @example POST /api/force-majeure
9
+ * @example PATCH /api/force-majeure/:id
10
+ */
11
+ import { ForceMajeureScope } from '../../constants/force-majeure.enums';
12
+ /**
13
+ * Create Force Majeure Declaration
14
+ *
15
+ * @example POST /api/force-majeure
16
+ */
17
+ export interface CreateForceMajeureDeclarationRequest {
18
+ /** Affected day(s), ISO 8601 at Mexico start-of-day. */
19
+ dates: string[];
20
+ scope: ForceMajeureScope;
21
+ /** Required when scope is `branch`. */
22
+ branchId?: string;
23
+ reason: string;
24
+ }
25
+ /**
26
+ * Update Force Majeure Declaration (partial).
27
+ *
28
+ * @example PATCH /api/force-majeure/:id
29
+ */
30
+ export interface UpdateForceMajeureDeclarationRequest {
31
+ dates?: string[];
32
+ scope?: ForceMajeureScope;
33
+ branchId?: string;
34
+ reason?: string;
35
+ }
36
+ /**
37
+ * Query filters for listing declarations.
38
+ *
39
+ * @example GET /api/force-majeure?fromDate=...&toDate=...
40
+ */
41
+ export interface ForceMajeureDeclarationQuery {
42
+ /** Return declarations overlapping this date range (ISO 8601). */
43
+ fromDate?: string;
44
+ toDate?: string;
45
+ branchId?: string;
46
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ /**
3
+ * Force Majeure Declaration Request Types
4
+ *
5
+ * API request contracts for force-majeure declaration endpoints. A single
6
+ * declaration covers everyone (or a branch) for the given day(s); affected
7
+ * collaborators are resolved at attendance-read time (individual time-off wins).
8
+ *
9
+ * @example POST /api/force-majeure
10
+ * @example PATCH /api/force-majeure/:id
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Force Majeure Declaration Response Types
3
+ *
4
+ * API response contracts for force-majeure declaration endpoints.
5
+ *
6
+ * @example GET /api/force-majeure
7
+ * @example GET /api/force-majeure/:id
8
+ */
9
+ import { ForceMajeureScope } from '../../constants/force-majeure.enums';
10
+ /**
11
+ * Force Majeure Declaration
12
+ *
13
+ * A declared closure for a day (or range), affecting everyone or a single
14
+ * branch. Collaborators with a scheduled shift and no full-day individual
15
+ * time-off on those days are paid full salary with their scheduled hours.
16
+ */
17
+ export interface ForceMajeureDeclarationResponse {
18
+ id: string;
19
+ /** Affected day(s), ISO 8601 at Mexico start-of-day. */
20
+ dates: string[];
21
+ scope: ForceMajeureScope;
22
+ /** Present when scope is `branch`. */
23
+ branchId?: string;
24
+ reason: string;
25
+ createdAt?: string;
26
+ updatedAt?: string;
27
+ createdBy?: string;
28
+ updatedBy?: string;
29
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * Force Majeure Declaration Response Types
4
+ *
5
+ * API response contracts for force-majeure declaration endpoints.
6
+ *
7
+ * @example GET /api/force-majeure
8
+ * @example GET /api/force-majeure/:id
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -10,6 +10,7 @@ export * from './qvet';
10
10
  export * from './stock-calculation';
11
11
  export * from './cash-reconciliation';
12
12
  export * from './time-off-request';
13
+ export * from './force-majeure';
13
14
  export * from './job';
14
15
  export * from './inventory-session';
15
16
  export * from './client-billing';
@@ -26,6 +26,7 @@ __exportStar(require("./qvet"), exports);
26
26
  __exportStar(require("./stock-calculation"), exports);
27
27
  __exportStar(require("./cash-reconciliation"), exports);
28
28
  __exportStar(require("./time-off-request"), exports);
29
+ __exportStar(require("./force-majeure"), exports);
29
30
  __exportStar(require("./job"), exports);
30
31
  __exportStar(require("./inventory-session"), exports);
31
32
  __exportStar(require("./client-billing"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hvp-shared",
3
- "version": "13.14.0",
3
+ "version": "13.16.0",
4
4
  "description": "Shared types and utilities for HVP backend and frontend",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",