hvp-shared 7.4.0 → 7.5.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.
Files changed (31) hide show
  1. package/dist/contracts/external-study/index.d.ts +6 -0
  2. package/dist/contracts/external-study/index.js +22 -0
  3. package/dist/contracts/external-study/requests.d.ts +82 -0
  4. package/dist/contracts/external-study/requests.js +5 -0
  5. package/dist/contracts/external-study/responses.d.ts +57 -0
  6. package/dist/contracts/external-study/responses.js +5 -0
  7. package/dist/contracts/external-study/types.d.ts +39 -0
  8. package/dist/contracts/external-study/types.js +53 -0
  9. package/dist/contracts/index.d.ts +4 -0
  10. package/dist/contracts/index.js +4 -0
  11. package/dist/contracts/pending-dashboard/index.d.ts +4 -0
  12. package/dist/contracts/pending-dashboard/index.js +20 -0
  13. package/dist/contracts/pending-dashboard/responses.d.ts +34 -0
  14. package/dist/contracts/pending-dashboard/responses.js +8 -0
  15. package/dist/contracts/study-type-catalog/index.d.ts +6 -0
  16. package/dist/contracts/study-type-catalog/index.js +22 -0
  17. package/dist/contracts/study-type-catalog/requests.d.ts +36 -0
  18. package/dist/contracts/study-type-catalog/requests.js +5 -0
  19. package/dist/contracts/study-type-catalog/responses.d.ts +22 -0
  20. package/dist/contracts/study-type-catalog/responses.js +5 -0
  21. package/dist/contracts/study-type-catalog/types.d.ts +18 -0
  22. package/dist/contracts/study-type-catalog/types.js +25 -0
  23. package/dist/contracts/supplier-overlay/index.d.ts +6 -0
  24. package/dist/contracts/supplier-overlay/index.js +22 -0
  25. package/dist/contracts/supplier-overlay/requests.d.ts +22 -0
  26. package/dist/contracts/supplier-overlay/requests.js +5 -0
  27. package/dist/contracts/supplier-overlay/responses.d.ts +34 -0
  28. package/dist/contracts/supplier-overlay/responses.js +5 -0
  29. package/dist/contracts/supplier-overlay/types.d.ts +11 -0
  30. package/dist/contracts/supplier-overlay/types.js +12 -0
  31. package/package.json +1 -1
@@ -0,0 +1,6 @@
1
+ /**
2
+ * External Study API Contracts
3
+ */
4
+ export * from './types';
5
+ export * from './requests';
6
+ export * from './responses';
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /**
3
+ * External Study API Contracts
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
17
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ __exportStar(require("./types"), exports);
21
+ __exportStar(require("./requests"), exports);
22
+ __exportStar(require("./responses"), exports);
@@ -0,0 +1,82 @@
1
+ /**
2
+ * External Study Requests
3
+ */
4
+ import { StudyStatus } from './types';
5
+ /**
6
+ * Create a new external study.
7
+ *
8
+ * @example POST /api/external-studies
9
+ */
10
+ export interface CreateExternalStudyRequest {
11
+ qvetPetId?: number;
12
+ qvetClientId?: number;
13
+ patientName: string;
14
+ clientName?: string;
15
+ studyTypeId: string;
16
+ studyTypeDetail?: string;
17
+ qvetSupplierId: number;
18
+ requestingDoctorId: string;
19
+ resultUrl?: string;
20
+ notes?: string;
21
+ }
22
+ /**
23
+ * Update a study's editable fields (patient, type, supplier, doctor, links, notes).
24
+ *
25
+ * For state transitions, use the dedicated transition endpoints.
26
+ *
27
+ * @example PATCH /api/external-studies/:id
28
+ */
29
+ export interface UpdateExternalStudyRequest {
30
+ qvetPetId?: number;
31
+ qvetClientId?: number;
32
+ patientName?: string;
33
+ clientName?: string;
34
+ studyTypeId?: string;
35
+ studyTypeDetail?: string;
36
+ qvetSupplierId?: number;
37
+ requestingDoctorId?: string;
38
+ resultUrl?: string;
39
+ notes?: string;
40
+ }
41
+ /**
42
+ * Transition a study to a new state.
43
+ *
44
+ * Backend validates the transition is legal:
45
+ * - solicitado → enviado, cancelado
46
+ * - enviado → resultado_recibido, cancelado
47
+ * - resultado_recibido → cerrado, cancelado
48
+ * - cerrado, cancelado → no transitions out
49
+ *
50
+ * @example POST /api/external-studies/:id/transition
51
+ */
52
+ export interface TransitionStudyRequest {
53
+ status: StudyStatus;
54
+ }
55
+ /**
56
+ * Toggle a post-received action timestamp.
57
+ *
58
+ * When `done=true` and the timestamp is unset, sets it to now.
59
+ * When `done=false`, clears the timestamp.
60
+ *
61
+ * Only valid when study status is resultado_recibido or cerrado.
62
+ *
63
+ * @example POST /api/external-studies/:id/post-action
64
+ */
65
+ export interface PostActionRequest {
66
+ action: 'sentToInternalWhatsapp' | 'uploadedToQvet' | 'informedClient';
67
+ done: boolean;
68
+ }
69
+ /**
70
+ * Filter params for listing external studies.
71
+ */
72
+ export interface ExternalStudyQueryFilters {
73
+ status?: StudyStatus | StudyStatus[];
74
+ requestingDoctorId?: string;
75
+ qvetSupplierId?: number;
76
+ studyTypeId?: string;
77
+ /** ISO date strings */
78
+ fromDate?: string;
79
+ toDate?: string;
80
+ /** When true, returns only overdue active studies. */
81
+ overdueOnly?: boolean;
82
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * External Study Requests
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,57 @@
1
+ /**
2
+ * External Study Responses
3
+ */
4
+ import { StudyCategory } from '../study-type-catalog/types';
5
+ import { StudyStatus } from './types';
6
+ /**
7
+ * Single external study record.
8
+ *
9
+ * @example GET /api/external-studies/:id
10
+ */
11
+ export interface ExternalStudyResponse {
12
+ id: string;
13
+ qvetPetId?: number;
14
+ qvetClientId?: number;
15
+ patientName: string;
16
+ clientName?: string;
17
+ studyTypeId: string;
18
+ studyTypeName: string;
19
+ studyTypeCategory: StudyCategory;
20
+ studyTypeDetail?: string;
21
+ qvetSupplierId: number;
22
+ supplierName: string;
23
+ requestingDoctorId: string;
24
+ requestingDoctorName: string;
25
+ status: StudyStatus;
26
+ requestedAt: string;
27
+ sentAt?: string;
28
+ resultReceivedAt?: string;
29
+ closedAt?: string;
30
+ cancelledAt?: string;
31
+ sentToInternalWhatsappAt?: string;
32
+ uploadedToQvetAt?: string;
33
+ informedClientAt?: string;
34
+ resultUrl?: string;
35
+ notes?: string;
36
+ daysSinceRequested: number;
37
+ isOverdue: boolean;
38
+ createdAt: string;
39
+ updatedAt: string;
40
+ createdBy?: string;
41
+ updatedBy?: string;
42
+ }
43
+ /**
44
+ * Pending dashboard summary for an external study (lighter payload for list views).
45
+ */
46
+ export interface ExternalStudyPendingItem {
47
+ id: string;
48
+ patientName: string;
49
+ studyTypeName: string;
50
+ studyTypeCategory: StudyCategory;
51
+ supplierName: string;
52
+ requestingDoctorName: string;
53
+ status: StudyStatus;
54
+ requestedAt: string;
55
+ daysSinceRequested: number;
56
+ isOverdue: boolean;
57
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * External Study Responses
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,39 @@
1
+ /**
2
+ * External Study Types
3
+ *
4
+ * Tracks studies sent to external labs (YiHealth, Annilab, Peninsular)
5
+ * or imaging providers (USG/RX/ECO). Provides visibility on what's pending,
6
+ * who requested it, and what post-result actions remain.
7
+ */
8
+ /**
9
+ * Workflow state of an external study.
10
+ *
11
+ * Transitions:
12
+ * solicitado → enviado → resultado_recibido → cerrado
13
+ * ↓
14
+ * cancelado (from any active state)
15
+ *
16
+ * Post-received actions (sentToInternalWhatsappAt, uploadedToQvetAt,
17
+ * informedClientAt) are independent timestamps — not states.
18
+ */
19
+ export declare enum StudyStatus {
20
+ solicitado = "solicitado",
21
+ enviado = "enviado",
22
+ resultado_recibido = "resultado_recibido",
23
+ cerrado = "cerrado",
24
+ cancelado = "cancelado"
25
+ }
26
+ export declare const STUDY_STATUS_LABELS: Record<StudyStatus, string>;
27
+ /**
28
+ * Active states (not cerrado/cancelado). Used to filter pending dashboards.
29
+ */
30
+ export declare const ACTIVE_STUDY_STATUSES: ReadonlyArray<StudyStatus>;
31
+ /**
32
+ * Overdue thresholds in days (per category). Hardcoded for now; can move to
33
+ * settings later. A study is "overdue" when (today - requestedAt) > threshold
34
+ * AND status is in ACTIVE_STUDY_STATUSES.
35
+ */
36
+ export declare const OVERDUE_THRESHOLD_DAYS: {
37
+ readonly LAB: 5;
38
+ readonly IMAGING: 3;
39
+ };
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ /**
3
+ * External Study Types
4
+ *
5
+ * Tracks studies sent to external labs (YiHealth, Annilab, Peninsular)
6
+ * or imaging providers (USG/RX/ECO). Provides visibility on what's pending,
7
+ * who requested it, and what post-result actions remain.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.OVERDUE_THRESHOLD_DAYS = exports.ACTIVE_STUDY_STATUSES = exports.STUDY_STATUS_LABELS = exports.StudyStatus = void 0;
11
+ /**
12
+ * Workflow state of an external study.
13
+ *
14
+ * Transitions:
15
+ * solicitado → enviado → resultado_recibido → cerrado
16
+ * ↓
17
+ * cancelado (from any active state)
18
+ *
19
+ * Post-received actions (sentToInternalWhatsappAt, uploadedToQvetAt,
20
+ * informedClientAt) are independent timestamps — not states.
21
+ */
22
+ var StudyStatus;
23
+ (function (StudyStatus) {
24
+ StudyStatus["solicitado"] = "solicitado";
25
+ StudyStatus["enviado"] = "enviado";
26
+ StudyStatus["resultado_recibido"] = "resultado_recibido";
27
+ StudyStatus["cerrado"] = "cerrado";
28
+ StudyStatus["cancelado"] = "cancelado";
29
+ })(StudyStatus || (exports.StudyStatus = StudyStatus = {}));
30
+ exports.STUDY_STATUS_LABELS = {
31
+ [StudyStatus.solicitado]: 'Solicitado',
32
+ [StudyStatus.enviado]: 'Enviado',
33
+ [StudyStatus.resultado_recibido]: 'Resultado recibido',
34
+ [StudyStatus.cerrado]: 'Cerrado',
35
+ [StudyStatus.cancelado]: 'Cancelado',
36
+ };
37
+ /**
38
+ * Active states (not cerrado/cancelado). Used to filter pending dashboards.
39
+ */
40
+ exports.ACTIVE_STUDY_STATUSES = [
41
+ StudyStatus.solicitado,
42
+ StudyStatus.enviado,
43
+ StudyStatus.resultado_recibido,
44
+ ];
45
+ /**
46
+ * Overdue thresholds in days (per category). Hardcoded for now; can move to
47
+ * settings later. A study is "overdue" when (today - requestedAt) > threshold
48
+ * AND status is in ACTIVE_STUDY_STATUSES.
49
+ */
50
+ exports.OVERDUE_THRESHOLD_DAYS = {
51
+ LAB: 5,
52
+ IMAGING: 3,
53
+ };
@@ -16,3 +16,7 @@ export * from './client-billing';
16
16
  export * from './global-invoice';
17
17
  export * from './inventory-report';
18
18
  export * from './google-contacts';
19
+ export * from './study-type-catalog';
20
+ export * from './supplier-overlay';
21
+ export * from './external-study';
22
+ export * from './pending-dashboard';
@@ -32,3 +32,7 @@ __exportStar(require("./client-billing"), exports);
32
32
  __exportStar(require("./global-invoice"), exports);
33
33
  __exportStar(require("./inventory-report"), exports);
34
34
  __exportStar(require("./google-contacts"), exports);
35
+ __exportStar(require("./study-type-catalog"), exports);
36
+ __exportStar(require("./supplier-overlay"), exports);
37
+ __exportStar(require("./external-study"), exports);
38
+ __exportStar(require("./pending-dashboard"), exports);
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Pending Dashboard API Contracts
3
+ */
4
+ export * from './responses';
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ /**
3
+ * Pending Dashboard API Contracts
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
17
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ __exportStar(require("./responses"), exports);
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Pending Dashboard Responses
3
+ *
4
+ * Aggregated view of pending items across the system. Visible to anyone.
5
+ * Designed to grow over time — each card represents one source.
6
+ */
7
+ import { ExternalStudyPendingItem } from '../external-study/responses';
8
+ /**
9
+ * Sales (tickets) with outstanding balance.
10
+ */
11
+ export interface PendingSaleSummary {
12
+ ticketNumber: number;
13
+ date: string;
14
+ qvetClientId?: number;
15
+ clientName?: string;
16
+ total: number;
17
+ paid: number;
18
+ outstanding: number;
19
+ }
20
+ /**
21
+ * @example GET /api/pending-dashboard
22
+ */
23
+ export interface PendingDashboardResponse {
24
+ studies: {
25
+ overdueCount: number;
26
+ activeCount: number;
27
+ overdueItems: ExternalStudyPendingItem[];
28
+ };
29
+ sales: {
30
+ pendingTicketsCount: number;
31
+ totalOutstanding: number;
32
+ topItems: PendingSaleSummary[];
33
+ };
34
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ /**
3
+ * Pending Dashboard Responses
4
+ *
5
+ * Aggregated view of pending items across the system. Visible to anyone.
6
+ * Designed to grow over time — each card represents one source.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Study Type Catalog API Contracts
3
+ */
4
+ export * from './types';
5
+ export * from './requests';
6
+ export * from './responses';
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /**
3
+ * Study Type Catalog API Contracts
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
17
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ __exportStar(require("./types"), exports);
21
+ __exportStar(require("./requests"), exports);
22
+ __exportStar(require("./responses"), exports);
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Study Type Catalog Requests
3
+ */
4
+ import { StudyCategory } from './types';
5
+ /**
6
+ * Create a new study type in the catalog.
7
+ *
8
+ * @example POST /api/study-type-catalog
9
+ */
10
+ export interface CreateStudyTypeRequest {
11
+ name: string;
12
+ qvetCode?: number;
13
+ category: StudyCategory;
14
+ isFlexible: boolean;
15
+ notes?: string;
16
+ }
17
+ /**
18
+ * Update an existing study type.
19
+ *
20
+ * @example PATCH /api/study-type-catalog/:id
21
+ */
22
+ export interface UpdateStudyTypeRequest {
23
+ name?: string;
24
+ qvetCode?: number;
25
+ category?: StudyCategory;
26
+ isFlexible?: boolean;
27
+ isActive?: boolean;
28
+ notes?: string;
29
+ }
30
+ /**
31
+ * Filter params for listing study types.
32
+ */
33
+ export interface StudyTypeQueryFilters {
34
+ category?: StudyCategory;
35
+ isActive?: boolean;
36
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * Study Type Catalog Requests
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Study Type Catalog Responses
3
+ */
4
+ import { StudyCategory } from './types';
5
+ /**
6
+ * Single study type catalog entry.
7
+ *
8
+ * @example GET /api/study-type-catalog/:id
9
+ */
10
+ export interface StudyTypeResponse {
11
+ id: string;
12
+ name: string;
13
+ qvetCode?: number;
14
+ category: StudyCategory;
15
+ isFlexible: boolean;
16
+ isActive: boolean;
17
+ notes?: string;
18
+ createdAt: string;
19
+ updatedAt: string;
20
+ createdBy?: string;
21
+ updatedBy?: string;
22
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * Study Type Catalog Responses
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Study Type Catalog Types
3
+ *
4
+ * Catalog of available study types (LAB or IMAGING) used when creating
5
+ * an ExternalStudy. Some entries are "flexible" — they require a free-text
6
+ * detail at use time (e.g. "USG dirigido" → user types "USG cardíaco").
7
+ *
8
+ * Seeded initially from QVET catalog (SERVICIOS EXTERNOS → LABORATORIO/GABINETE)
9
+ * cross-referenced with sales activity. Anyone can add new entries via UI.
10
+ */
11
+ /**
12
+ * Study category — determines the overdue threshold and groups studies.
13
+ */
14
+ export declare enum StudyCategory {
15
+ LAB = "LAB",
16
+ IMAGING = "IMAGING"
17
+ }
18
+ export declare const STUDY_CATEGORY_LABELS: Record<StudyCategory, string>;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /**
3
+ * Study Type Catalog Types
4
+ *
5
+ * Catalog of available study types (LAB or IMAGING) used when creating
6
+ * an ExternalStudy. Some entries are "flexible" — they require a free-text
7
+ * detail at use time (e.g. "USG dirigido" → user types "USG cardíaco").
8
+ *
9
+ * Seeded initially from QVET catalog (SERVICIOS EXTERNOS → LABORATORIO/GABINETE)
10
+ * cross-referenced with sales activity. Anyone can add new entries via UI.
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.STUDY_CATEGORY_LABELS = exports.StudyCategory = void 0;
14
+ /**
15
+ * Study category — determines the overdue threshold and groups studies.
16
+ */
17
+ var StudyCategory;
18
+ (function (StudyCategory) {
19
+ StudyCategory["LAB"] = "LAB";
20
+ StudyCategory["IMAGING"] = "IMAGING";
21
+ })(StudyCategory || (exports.StudyCategory = StudyCategory = {}));
22
+ exports.STUDY_CATEGORY_LABELS = {
23
+ [StudyCategory.LAB]: 'Laboratorio',
24
+ [StudyCategory.IMAGING]: 'Imagen',
25
+ };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Supplier Overlay API Contracts
3
+ */
4
+ export * from './types';
5
+ export * from './requests';
6
+ export * from './responses';
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /**
3
+ * Supplier Overlay API Contracts
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
17
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ __exportStar(require("./types"), exports);
21
+ __exportStar(require("./requests"), exports);
22
+ __exportStar(require("./responses"), exports);
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Supplier Overlay Requests
3
+ */
4
+ /**
5
+ * Upsert a supplier overlay.
6
+ *
7
+ * Used to tag a QVET supplier as a study provider (or not).
8
+ * Creates the overlay if it doesn't exist; updates it if it does.
9
+ *
10
+ * @example PATCH /api/supplier-overlays/:qvetSupplierId
11
+ */
12
+ export interface UpsertSupplierOverlayRequest {
13
+ isStudyProvider: boolean;
14
+ notes?: string;
15
+ }
16
+ /**
17
+ * Filter params for listing supplier overlays.
18
+ */
19
+ export interface SupplierOverlayQueryFilters {
20
+ /** When true, returns only overlays where isStudyProvider=true. */
21
+ isStudyProvider?: boolean;
22
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * Supplier Overlay Requests
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Supplier Overlay Responses
3
+ */
4
+ /**
5
+ * Supplier overlay record (HVP-specific tags on top of a QVET supplier).
6
+ */
7
+ export interface SupplierOverlayResponse {
8
+ id: string;
9
+ qvetSupplierId: number;
10
+ isStudyProvider: boolean;
11
+ notes?: string;
12
+ createdAt: string;
13
+ updatedAt: string;
14
+ createdBy?: string;
15
+ updatedBy?: string;
16
+ }
17
+ /**
18
+ * Combined response: a QVET supplier with its overlay attached (or null if no overlay yet).
19
+ *
20
+ * Used by the supplier overlay management UI to show the full QVET supplier list
21
+ * with an inline checkbox/toggle for `isStudyProvider`.
22
+ *
23
+ * @example GET /api/supplier-overlays
24
+ */
25
+ export interface QvetSupplierWithOverlayResponse {
26
+ qvetSupplierId: number;
27
+ name: string;
28
+ taxId?: string;
29
+ email?: string;
30
+ phone1?: string;
31
+ isActive: boolean;
32
+ /** The HVP overlay (null when not yet tagged). */
33
+ overlay: SupplierOverlayResponse | null;
34
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * Supplier Overlay Responses
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Supplier Overlay Types
3
+ *
4
+ * Parallel data layer for QVET suppliers. Stores HVP-specific tags
5
+ * without polluting `qvet_suppliers` (which is upsert-overwritten on every QVET sync).
6
+ *
7
+ * Currently used to flag which suppliers are study providers (so they show up
8
+ * in the ExternalStudy form). Category (LAB/IMAGING) lives in StudyTypeCatalog,
9
+ * not here — the supplier just needs a yes/no flag.
10
+ */
11
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ /**
3
+ * Supplier Overlay Types
4
+ *
5
+ * Parallel data layer for QVET suppliers. Stores HVP-specific tags
6
+ * without polluting `qvet_suppliers` (which is upsert-overwritten on every QVET sync).
7
+ *
8
+ * Currently used to flag which suppliers are study providers (so they show up
9
+ * in the ExternalStudy form). Category (LAB/IMAGING) lives in StudyTypeCatalog,
10
+ * not here — the supplier just needs a yes/no flag.
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hvp-shared",
3
- "version": "7.4.0",
3
+ "version": "7.5.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",