evo360-types 1.3.363 → 1.3.365

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/apps/evo-activity/zod-schemas.d.ts +6 -6
  2. package/dist/apps/evo-chat/contact/zod-schemas.d.ts +6 -6
  3. package/dist/apps/evo-chat/dic/ticket-close/zod-schemas.d.ts +12 -12
  4. package/dist/apps/evo-chat/message/zod-schemas.d.ts +6 -6
  5. package/dist/apps/evo-crm/dic/zod-schemas.d.ts +18 -18
  6. package/dist/apps/evo-crm/lead/zod-schemas.d.ts +6 -6
  7. package/dist/apps/evo-med/appointment/zod-schemas.d.ts +6 -6
  8. package/dist/apps/evo-med/calendar/zod-schemas.d.ts +6 -6
  9. package/dist/apps/evo-med/dic/zod-schemas.d.ts +50 -6
  10. package/dist/apps/evo-med/dic/zod-schemas.js +40 -1
  11. package/dist/apps/evo-med/dic/zod-schemas.ts +41 -0
  12. package/dist/apps/evo-med/insurance/zod-schemas.d.ts +6 -6
  13. package/dist/apps/evo-med/people/zod-schemas.d.ts +497 -12
  14. package/dist/apps/evo-med/people/zod-schemas.js +34 -4
  15. package/dist/apps/evo-med/people/zod-schemas.ts +33 -0
  16. package/dist/apps/evo-med/procedure/zod-schemas.d.ts +12 -12
  17. package/dist/apps/evo-people/zod-schemas.d.ts +24 -24
  18. package/dist/apps/evo-survey/zod-schemas.d.ts +58 -58
  19. package/dist/apps/evo-task/zod-schemas.d.ts +54 -54
  20. package/dist/apps/shared/zod-schemas.d.ts +2 -2
  21. package/dist/types/evo-integrations/index.d.ts +1 -1
  22. package/dist/types/evo-integrations/index.ts +1 -0
  23. package/dist/types/evo-med/dic/index.d.ts +40 -2
  24. package/dist/types/evo-med/dic/index.js +34 -1
  25. package/dist/types/evo-med/dic/index.ts +49 -1
  26. package/dist/types/evo-med/fb_collections.d.ts +2 -0
  27. package/dist/types/evo-med/fb_collections.js +3 -1
  28. package/dist/types/evo-med/fb_collections.ts +3 -0
  29. package/dist/types/evo-med/people/index.d.ts +23 -2
  30. package/dist/types/evo-med/people/index.ts +21 -1
  31. package/package.json +1 -1
@@ -31,7 +31,10 @@ export type MedDicAction =
31
31
  | "UPDATE_APPOINTMENT_REQUEST_TYPE"
32
32
  | "CREATE_APPOINTMENT_STATUS"
33
33
  | "DELETE_APPOINTMENT_STATUS"
34
- | "UPDATE_APPOINTMENT_STATUS";
34
+ | "UPDATE_APPOINTMENT_STATUS"
35
+ | "CREATE_ATTACHMENT_CATEGORY"
36
+ | "DELETE_ATTACHMENT_CATEGORY"
37
+ | "UPDATE_ATTACHMENT_CATEGORY";
35
38
 
36
39
  export enum IMedDicAction {
37
40
  Create_specialty = "CREATE_SPECIALTY",
@@ -49,6 +52,9 @@ export enum IMedDicAction {
49
52
  Create_appointment_status = "CREATE_APPOINTMENT_STATUS",
50
53
  Delete_appointment_status = "DELETE_APPOINTMENT_STATUS",
51
54
  Update_appointment_status = "UPDATE_APPOINTMENT_STATUS",
55
+ Create_attachment_category = "CREATE_ATTACHMENT_CATEGORY",
56
+ Delete_attachment_category = "DELETE_ATTACHMENT_CATEGORY",
57
+ Update_attachment_category = "UPDATE_ATTACHMENT_CATEGORY",
52
58
  }
53
59
 
54
60
  export interface ISpecialtyType extends IFireDoc {
@@ -200,3 +206,45 @@ export interface IMedicalCouncil extends IFireDoc {
200
206
  country?: string | null; // País onde o conselho atua (ex: "Brasil")
201
207
  [key: string]: unknown; // index signature
202
208
  }
209
+
210
+ // Categorias base (nível de sistema) para anexos de paciente.
211
+ // Imutáveis em código. Cada entrada do dicionário `attachment_categories`
212
+ // referencia uma destas via `base_category` (snapshot no upload do anexo).
213
+ export const PatientAttachmentBaseCategoryEnum = {
214
+ IdentificationDocument: "identification_document",
215
+ InsuranceCard: "insurance_card",
216
+ MedicalExam: "medical_exam",
217
+ Prescription: "prescription",
218
+ MedicalReport: "medical_report",
219
+ PaymentReceipt: "payment_receipt",
220
+ Invoice: "invoice",
221
+ ReferralLetter: "referral_letter",
222
+ ConsentForm: "consent_form",
223
+ AuthorizationForm: "authorization_form",
224
+ SickLeaveCertificate: "sick_leave_certificate",
225
+ TreatmentPlan: "treatment_plan",
226
+ ClinicalImage: "clinical_image",
227
+ AnamnesisForm: "anamnesis_form",
228
+ PatientForm: "patient_form",
229
+ InsuranceAuthorization: "insurance_authorization",
230
+ LabResult: "lab_result",
231
+ ImagingExam: "imaging_exam",
232
+ SurgicalDocument: "surgical_document",
233
+ DischargeSummary: "discharge_summary",
234
+ MedicationList: "medication_list",
235
+ VaccinationRecord: "vaccination_record",
236
+ LegalDocument: "legal_document",
237
+ AdministrativeDocument: "administrative_document",
238
+ Other: "other",
239
+ } as const;
240
+
241
+ export type PatientAttachmentBaseCategory =
242
+ (typeof PatientAttachmentBaseCategoryEnum)[keyof typeof PatientAttachmentBaseCategoryEnum];
243
+
244
+ export interface IAttachmentCategory extends IFireDoc {
245
+ display_name: string;
246
+ base_category: PatientAttachmentBaseCategory;
247
+ color?: string;
248
+ order?: number;
249
+ external_id?: string | null;
250
+ }
@@ -12,6 +12,8 @@ export declare const PROCEDURES_TYPES_COLLECTION = "procedures-types";
12
12
  export declare const PROCEDURES_COLLECTION = "procedures";
13
13
  export declare const COUNCILS = "councils";
14
14
  export declare const MEDICAL_COUNCILS_COLLECTION = "medical-councils";
15
+ export declare const ATTACHMENT_CATEGORIES = "attachment_categories";
16
+ export declare const ATTACHMENT_CATEGORIES_COLLECTION = "attachment_categories";
15
17
  export declare const SOURCES = "sources";
16
18
  export declare const PATIENT_SOURCES_COLLECTION = "patient_sources";
17
19
  export declare const APPOINTMENTS = "appointments";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CHRONIC_CONDITIONS_COLLECTION = exports.ALLERGIES_COLLECTION = exports.DISEASES = exports.APPOINTMENTS_COLLECTION = exports.APPOINTMENT_REQUEST_TYPES_COLLECTION = exports.APPOINTMENT_TYPES_COLLECTION = exports.APPOINTMENT_STATUSES_COLLECTION = exports.APPOINTMENT_SOURCES_COLLECTION = exports.APPOINTMENTS = exports.PATIENT_SOURCES_COLLECTION = exports.SOURCES = exports.MEDICAL_COUNCILS_COLLECTION = exports.COUNCILS = exports.PROCEDURES_COLLECTION = exports.PROCEDURES_TYPES_COLLECTION = exports.PROCEDURES = exports.SPECIALTIES_COLLECTION = exports.SPECIALTIES_TYPES_COLLECTION = exports.SPECIALTIES = exports.DICS_COLLECTION = exports.CALENDARS_COLLECTION = exports.INSURANCES_COLLECTION = exports.PATIENTS_COLLECTION = exports.PROFESSIONALS_COLLECTION = exports.EVO_MED_APP = void 0;
3
+ exports.CHRONIC_CONDITIONS_COLLECTION = exports.ALLERGIES_COLLECTION = exports.DISEASES = exports.APPOINTMENTS_COLLECTION = exports.APPOINTMENT_REQUEST_TYPES_COLLECTION = exports.APPOINTMENT_TYPES_COLLECTION = exports.APPOINTMENT_STATUSES_COLLECTION = exports.APPOINTMENT_SOURCES_COLLECTION = exports.APPOINTMENTS = exports.PATIENT_SOURCES_COLLECTION = exports.SOURCES = exports.ATTACHMENT_CATEGORIES_COLLECTION = exports.ATTACHMENT_CATEGORIES = exports.MEDICAL_COUNCILS_COLLECTION = exports.COUNCILS = exports.PROCEDURES_COLLECTION = exports.PROCEDURES_TYPES_COLLECTION = exports.PROCEDURES = exports.SPECIALTIES_COLLECTION = exports.SPECIALTIES_TYPES_COLLECTION = exports.SPECIALTIES = exports.DICS_COLLECTION = exports.CALENDARS_COLLECTION = exports.INSURANCES_COLLECTION = exports.PATIENTS_COLLECTION = exports.PROFESSIONALS_COLLECTION = exports.EVO_MED_APP = void 0;
4
4
  //EVO Med Application Doc
5
5
  exports.EVO_MED_APP = "evo-med";
6
6
  //people
@@ -20,6 +20,8 @@ exports.PROCEDURES_TYPES_COLLECTION = "procedures-types";
20
20
  exports.PROCEDURES_COLLECTION = "procedures";
21
21
  exports.COUNCILS = "councils";
22
22
  exports.MEDICAL_COUNCILS_COLLECTION = "medical-councils";
23
+ exports.ATTACHMENT_CATEGORIES = "attachment_categories";
24
+ exports.ATTACHMENT_CATEGORIES_COLLECTION = "attachment_categories";
23
25
  exports.SOURCES = "sources";
24
26
  exports.PATIENT_SOURCES_COLLECTION = "patient_sources";
25
27
  exports.APPOINTMENTS = "appointments";
@@ -23,6 +23,9 @@ export const PROCEDURES_COLLECTION = "procedures";
23
23
  export const COUNCILS = "councils";
24
24
  export const MEDICAL_COUNCILS_COLLECTION = "medical-councils";
25
25
 
26
+ export const ATTACHMENT_CATEGORIES = "attachment_categories";
27
+ export const ATTACHMENT_CATEGORIES_COLLECTION = "attachment_categories";
28
+
26
29
  export const SOURCES = "sources";
27
30
  export const PATIENT_SOURCES_COLLECTION = "patient_sources";
28
31
 
@@ -1,7 +1,7 @@
1
1
  export * from "../fb_collections";
2
2
  import { IProfile } from "../../evo-people";
3
- import type { FirestoreDocumentReference, IAddress, IContact, ITag } from "../../shared";
4
- import { IMedication } from "../dic";
3
+ import type { FirestoreDocumentReference, IAddress, IContact, IExternalLink, ITag } from "../../shared";
4
+ import { IMedication, PatientAttachmentBaseCategory } from "../dic";
5
5
  export declare const EvoMedProfessionalPermissions: {
6
6
  readonly List: "evo_med_people_professional_read";
7
7
  readonly Get: "evo_med_people_professional_read";
@@ -123,6 +123,25 @@ export interface IPatientAllergy {
123
123
  ref?: FirestoreDocumentReference;
124
124
  severity?: Severity | null;
125
125
  }
126
+ export interface IPatientAttachment {
127
+ id: string;
128
+ filename: string;
129
+ originalFilename: string;
130
+ contentType: string;
131
+ size: number;
132
+ storagePath: string;
133
+ category: string;
134
+ baseCategory: PatientAttachmentBaseCategory;
135
+ categoryColor?: string;
136
+ externalLinks?: IExternalLink[];
137
+ externalLinkKeys?: string[];
138
+ uploadedBy?: {
139
+ userId: string;
140
+ displayName: string;
141
+ };
142
+ uploadedAt: Date;
143
+ updatedAt?: Date;
144
+ }
126
145
  export interface IAppointmentCounters {
127
146
  statusBase?: Record<string, number>;
128
147
  appointmentBaseType?: Record<string, number>;
@@ -147,6 +166,8 @@ export interface IPatient extends IProfile {
147
166
  chronic_conditions?: IPatientChronicCondition[] | null;
148
167
  notes?: string | null;
149
168
  appointmentCounters?: IAppointmentCounters | null;
169
+ attachments?: IPatientAttachment[] | null;
170
+ attachmentExternalLinkKeys?: string[] | null;
150
171
  tags?: ITag[] | null;
151
172
  userRef?: FirestoreDocumentReference;
152
173
  [key: string]: unknown;
@@ -4,9 +4,10 @@ import type {
4
4
  FirestoreDocumentReference,
5
5
  IAddress,
6
6
  IContact,
7
+ IExternalLink,
7
8
  ITag,
8
9
  } from "../../shared";
9
- import { IMedication } from "../dic";
10
+ import { IMedication, PatientAttachmentBaseCategory } from "../dic";
10
11
 
11
12
  // Permissões para o médico
12
13
  export const EvoMedProfessionalPermissions = {
@@ -185,6 +186,23 @@ export interface IPatientAllergy {
185
186
  severity?: Severity | null; // Nível de gravidade
186
187
  }
187
188
 
189
+ export interface IPatientAttachment {
190
+ id: string;
191
+ filename: string;
192
+ originalFilename: string;
193
+ contentType: string;
194
+ size: number;
195
+ storagePath: string;
196
+ category: string;
197
+ baseCategory: PatientAttachmentBaseCategory;
198
+ categoryColor?: string;
199
+ externalLinks?: IExternalLink[];
200
+ externalLinkKeys?: string[];
201
+ uploadedBy?: { userId: string; displayName: string };
202
+ uploadedAt: Date;
203
+ updatedAt?: Date;
204
+ }
205
+
188
206
  // Interface para contadores de appointments (usada em Patient e Calendar)
189
207
  export interface IAppointmentCounters {
190
208
  statusBase?: Record<string, number>; // Contadores por statusBase (ex: scheduled, in_progress, cancelled, etc.)
@@ -213,6 +231,8 @@ export interface IPatient extends IProfile {
213
231
  notes?: string | null; // Anotações sobre o paciente
214
232
  // Contadores de appointments
215
233
  appointmentCounters?: IAppointmentCounters | null;
234
+ attachments?: IPatientAttachment[] | null;
235
+ attachmentExternalLinkKeys?: string[] | null;
216
236
  tags?: ITag[] | null;
217
237
  userRef?: FirestoreDocumentReference;
218
238
  [key: string]: unknown; // index signature
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo360-types",
3
- "version": "1.3.363",
3
+ "version": "1.3.365",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",