evo360-types 1.3.132 → 1.3.133

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.
@@ -42,6 +42,22 @@ export declare const zMedCalendarSchema: z.ZodObject<z.objectUtil.extendShape<{
42
42
  category?: string | null | undefined;
43
43
  }>, "many">>>;
44
44
  userRef: z.ZodAny;
45
+ appointmentCounters: z.ZodOptional<z.ZodNullable<z.ZodObject<{
46
+ statusBase: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
47
+ appointmentBaseType: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
48
+ total: z.ZodOptional<z.ZodNumber>;
49
+ deleted: z.ZodOptional<z.ZodNumber>;
50
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
51
+ statusBase: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
52
+ appointmentBaseType: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
53
+ total: z.ZodOptional<z.ZodNumber>;
54
+ deleted: z.ZodOptional<z.ZodNumber>;
55
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
56
+ statusBase: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
57
+ appointmentBaseType: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
58
+ total: z.ZodOptional<z.ZodNumber>;
59
+ deleted: z.ZodOptional<z.ZodNumber>;
60
+ }, z.ZodTypeAny, "passthrough">>>>;
45
61
  }>, "passthrough", z.ZodTypeAny, z.objectOutputType<z.objectUtil.extendShape<{
46
62
  id: z.ZodString;
47
63
  ref: z.ZodAny;
@@ -85,6 +101,22 @@ export declare const zMedCalendarSchema: z.ZodObject<z.objectUtil.extendShape<{
85
101
  category?: string | null | undefined;
86
102
  }>, "many">>>;
87
103
  userRef: z.ZodAny;
104
+ appointmentCounters: z.ZodOptional<z.ZodNullable<z.ZodObject<{
105
+ statusBase: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
106
+ appointmentBaseType: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
107
+ total: z.ZodOptional<z.ZodNumber>;
108
+ deleted: z.ZodOptional<z.ZodNumber>;
109
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
110
+ statusBase: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
111
+ appointmentBaseType: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
112
+ total: z.ZodOptional<z.ZodNumber>;
113
+ deleted: z.ZodOptional<z.ZodNumber>;
114
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
115
+ statusBase: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
116
+ appointmentBaseType: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
117
+ total: z.ZodOptional<z.ZodNumber>;
118
+ deleted: z.ZodOptional<z.ZodNumber>;
119
+ }, z.ZodTypeAny, "passthrough">>>>;
88
120
  }>, z.ZodTypeAny, "passthrough">, z.objectInputType<z.objectUtil.extendShape<{
89
121
  id: z.ZodString;
90
122
  ref: z.ZodAny;
@@ -128,4 +160,20 @@ export declare const zMedCalendarSchema: z.ZodObject<z.objectUtil.extendShape<{
128
160
  category?: string | null | undefined;
129
161
  }>, "many">>>;
130
162
  userRef: z.ZodAny;
163
+ appointmentCounters: z.ZodOptional<z.ZodNullable<z.ZodObject<{
164
+ statusBase: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
165
+ appointmentBaseType: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
166
+ total: z.ZodOptional<z.ZodNumber>;
167
+ deleted: z.ZodOptional<z.ZodNumber>;
168
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
169
+ statusBase: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
170
+ appointmentBaseType: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
171
+ total: z.ZodOptional<z.ZodNumber>;
172
+ deleted: z.ZodOptional<z.ZodNumber>;
173
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
174
+ statusBase: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
175
+ appointmentBaseType: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
176
+ total: z.ZodOptional<z.ZodNumber>;
177
+ deleted: z.ZodOptional<z.ZodNumber>;
178
+ }, z.ZodTypeAny, "passthrough">>>>;
131
179
  }>, z.ZodTypeAny, "passthrough">>;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.zMedCalendarSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const zod_schemas_1 = require("../../shared/zod-schemas");
6
+ const zod_schemas_2 = require("../people/zod-schemas");
6
7
  exports.zMedCalendarSchema = zod_schemas_1.zFireDocSchema
7
8
  .extend({
8
9
  calendarId: zod_1.z.string().min(1).max(30),
@@ -24,5 +25,6 @@ exports.zMedCalendarSchema = zod_schemas_1.zFireDocSchema
24
25
  external: zod_1.z.boolean().default(true).optional(),
25
26
  tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
26
27
  userRef: zod_1.z.any(),
28
+ appointmentCounters: zod_schemas_2.zAppointmentCountersSchema.nullable().optional(),
27
29
  })
28
30
  .passthrough();
@@ -1,5 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import { zFireDocSchema, zTagSchema } from "../../shared/zod-schemas";
3
+ import { zAppointmentCountersSchema } from "../people/zod-schemas";
3
4
 
4
5
  export const zMedCalendarSchema = zFireDocSchema
5
6
  .extend({
@@ -22,5 +23,6 @@ export const zMedCalendarSchema = zFireDocSchema
22
23
  external: z.boolean().default(true).optional(),
23
24
  tags: z.array(zTagSchema).nullable().optional(),
24
25
  userRef: z.any(),
26
+ appointmentCounters: zAppointmentCountersSchema.nullable().optional(),
25
27
  })
26
28
  .passthrough();
@@ -541,6 +541,22 @@ export declare const zPatientChronicConditionSchema: z.ZodObject<{
541
541
  }[] | null | undefined;
542
542
  notes?: string | undefined;
543
543
  }>;
544
+ export declare const zAppointmentCountersSchema: z.ZodObject<{
545
+ statusBase: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
546
+ appointmentBaseType: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
547
+ total: z.ZodOptional<z.ZodNumber>;
548
+ deleted: z.ZodOptional<z.ZodNumber>;
549
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
550
+ statusBase: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
551
+ appointmentBaseType: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
552
+ total: z.ZodOptional<z.ZodNumber>;
553
+ deleted: z.ZodOptional<z.ZodNumber>;
554
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
555
+ statusBase: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
556
+ appointmentBaseType: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
557
+ total: z.ZodOptional<z.ZodNumber>;
558
+ deleted: z.ZodOptional<z.ZodNumber>;
559
+ }, z.ZodTypeAny, "passthrough">>;
544
560
  export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
545
561
  id: z.ZodString;
546
562
  ref: z.ZodAny;
@@ -682,7 +698,22 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
682
698
  notes?: string | undefined;
683
699
  }>, "many">>>;
684
700
  notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
685
- appointmentCounters: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>>;
701
+ appointmentCounters: z.ZodOptional<z.ZodNullable<z.ZodObject<{
702
+ statusBase: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
703
+ appointmentBaseType: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
704
+ total: z.ZodOptional<z.ZodNumber>;
705
+ deleted: z.ZodOptional<z.ZodNumber>;
706
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
707
+ statusBase: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
708
+ appointmentBaseType: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
709
+ total: z.ZodOptional<z.ZodNumber>;
710
+ deleted: z.ZodOptional<z.ZodNumber>;
711
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
712
+ statusBase: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
713
+ appointmentBaseType: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
714
+ total: z.ZodOptional<z.ZodNumber>;
715
+ deleted: z.ZodOptional<z.ZodNumber>;
716
+ }, z.ZodTypeAny, "passthrough">>>>;
686
717
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
687
718
  name: z.ZodString;
688
719
  color: z.ZodOptional<z.ZodString>;
@@ -844,7 +875,22 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
844
875
  notes?: string | undefined;
845
876
  }>, "many">>>;
846
877
  notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
847
- appointmentCounters: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>>;
878
+ appointmentCounters: z.ZodOptional<z.ZodNullable<z.ZodObject<{
879
+ statusBase: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
880
+ appointmentBaseType: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
881
+ total: z.ZodOptional<z.ZodNumber>;
882
+ deleted: z.ZodOptional<z.ZodNumber>;
883
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
884
+ statusBase: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
885
+ appointmentBaseType: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
886
+ total: z.ZodOptional<z.ZodNumber>;
887
+ deleted: z.ZodOptional<z.ZodNumber>;
888
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
889
+ statusBase: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
890
+ appointmentBaseType: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
891
+ total: z.ZodOptional<z.ZodNumber>;
892
+ deleted: z.ZodOptional<z.ZodNumber>;
893
+ }, z.ZodTypeAny, "passthrough">>>>;
848
894
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
849
895
  name: z.ZodString;
850
896
  color: z.ZodOptional<z.ZodString>;
@@ -1006,7 +1052,22 @@ export declare const zPatientSchema: z.ZodObject<z.objectUtil.extendShape<z.obje
1006
1052
  notes?: string | undefined;
1007
1053
  }>, "many">>>;
1008
1054
  notes: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1009
- appointmentCounters: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>>;
1055
+ appointmentCounters: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1056
+ statusBase: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1057
+ appointmentBaseType: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1058
+ total: z.ZodOptional<z.ZodNumber>;
1059
+ deleted: z.ZodOptional<z.ZodNumber>;
1060
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
1061
+ statusBase: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1062
+ appointmentBaseType: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1063
+ total: z.ZodOptional<z.ZodNumber>;
1064
+ deleted: z.ZodOptional<z.ZodNumber>;
1065
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
1066
+ statusBase: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1067
+ appointmentBaseType: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1068
+ total: z.ZodOptional<z.ZodNumber>;
1069
+ deleted: z.ZodOptional<z.ZodNumber>;
1070
+ }, z.ZodTypeAny, "passthrough">>>>;
1010
1071
  tags: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
1011
1072
  name: z.ZodString;
1012
1073
  color: z.ZodOptional<z.ZodString>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zPatientSchema = exports.zPatientChronicConditionSchema = exports.zPatientAllergySchema = exports.zBloodTypeSchema = exports.zPatientStatusSchema = exports.zProfessionalSchema = exports.zProfessionalOfficeSchema = exports.zProfessionalSpecialtySchema = exports.zProfessionalCouncilSchema = exports.zProfessionalStatusSchema = void 0;
3
+ exports.zPatientSchema = exports.zAppointmentCountersSchema = exports.zPatientChronicConditionSchema = exports.zPatientAllergySchema = exports.zBloodTypeSchema = exports.zPatientStatusSchema = exports.zProfessionalSchema = exports.zProfessionalOfficeSchema = exports.zProfessionalSpecialtySchema = exports.zProfessionalCouncilSchema = exports.zProfessionalStatusSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const zod_schemas_1 = require("../dic/zod-schemas");
6
6
  const zod_schemas_2 = require("../../shared/zod-schemas");
@@ -78,6 +78,15 @@ exports.zPatientChronicConditionSchema = zod_1.z.object({
78
78
  medications: zod_1.z.array(zod_schemas_1.zMedicationSchema).nullable().optional(),
79
79
  notes: zod_1.z.string().max(2048).optional().default(""),
80
80
  });
81
+ // Schema para contadores de appointments (usado em Patient e Calendar)
82
+ exports.zAppointmentCountersSchema = zod_1.z
83
+ .object({
84
+ statusBase: zod_1.z.record(zod_1.z.string(), zod_1.z.number()).optional(),
85
+ appointmentBaseType: zod_1.z.record(zod_1.z.string(), zod_1.z.number()).optional(),
86
+ total: zod_1.z.number().optional(),
87
+ deleted: zod_1.z.number().optional(),
88
+ })
89
+ .passthrough();
81
90
  exports.zPatientSchema = zod_schemas_3.zProfileSchema // Extend from ProfileSchema
82
91
  .extend({
83
92
  external_id: zod_1.z.string().nullable().optional(),
@@ -97,7 +106,7 @@ exports.zPatientSchema = zod_schemas_3.zProfileSchema // Extend from ProfileSche
97
106
  .nullable()
98
107
  .optional(),
99
108
  notes: zod_1.z.string().nullable().optional(),
100
- appointmentCounters: zod_1.z.record(zod_1.z.string(), zod_1.z.number()).nullable().optional(),
109
+ appointmentCounters: exports.zAppointmentCountersSchema.nullable().optional(),
101
110
  tags: zod_1.z.array(zod_schemas_2.zTagSchema).nullable().optional(),
102
111
  userRef: zod_1.z.any(),
103
112
  })
@@ -95,6 +95,16 @@ export const zPatientChronicConditionSchema = z.object({
95
95
  notes: z.string().max(2048).optional().default(""),
96
96
  });
97
97
 
98
+ // Schema para contadores de appointments (usado em Patient e Calendar)
99
+ export const zAppointmentCountersSchema = z
100
+ .object({
101
+ statusBase: z.record(z.string(), z.number()).optional(),
102
+ appointmentBaseType: z.record(z.string(), z.number()).optional(),
103
+ total: z.number().optional(),
104
+ deleted: z.number().optional(),
105
+ })
106
+ .passthrough();
107
+
98
108
  export const zPatientSchema = zProfileSchema // Extend from ProfileSchema
99
109
  .extend({
100
110
  external_id: z.string().nullable().optional(),
@@ -114,7 +124,7 @@ export const zPatientSchema = zProfileSchema // Extend from ProfileSchema
114
124
  .nullable()
115
125
  .optional(),
116
126
  notes: z.string().nullable().optional(),
117
- appointmentCounters: z.record(z.string(), z.number()).nullable().optional(),
127
+ appointmentCounters: zAppointmentCountersSchema.nullable().optional(),
118
128
  tags: z.array(zTagSchema).nullable().optional(),
119
129
  userRef: z.any(),
120
130
  })
@@ -1,5 +1,6 @@
1
1
  export * from "../../evo-people/fb_collections";
2
2
  import type { FirestoreDocumentReference, IFireDoc, ITag } from "../../shared";
3
+ import type { IAppointmentCounters } from "../people";
3
4
  export interface IMedCalendar extends IFireDoc {
4
5
  calendarId: string;
5
6
  color?: string;
@@ -17,5 +18,6 @@ export interface IMedCalendar extends IFireDoc {
17
18
  external?: boolean;
18
19
  tags?: ITag[] | null;
19
20
  userRef?: FirestoreDocumentReference;
21
+ appointmentCounters?: IAppointmentCounters | null;
20
22
  [key: string]: unknown;
21
23
  }
@@ -1,5 +1,6 @@
1
1
  export * from "../../evo-people/fb_collections";
2
2
  import type { FirestoreDocumentReference, IFireDoc, ITag } from "../../shared";
3
+ import type { IAppointmentCounters } from "../people";
3
4
 
4
5
  // ----- MedCalendarTypes
5
6
 
@@ -20,5 +21,7 @@ export interface IMedCalendar extends IFireDoc {
20
21
  external?: boolean;
21
22
  tags?: ITag[] | null;
22
23
  userRef?: FirestoreDocumentReference;
24
+ // Contadores de appointments
25
+ appointmentCounters?: IAppointmentCounters | null;
23
26
  [key: string]: unknown; // index signature
24
27
  }
@@ -107,6 +107,12 @@ export interface IPatientAllergy {
107
107
  ref?: FirestoreDocumentReference;
108
108
  severity?: Severity | null;
109
109
  }
110
+ export interface IAppointmentCounters {
111
+ statusBase?: Record<string, number>;
112
+ appointmentBaseType?: Record<string, number>;
113
+ total?: number;
114
+ deleted?: number;
115
+ }
110
116
  export interface IPatient extends IProfile {
111
117
  external_id?: string | null;
112
118
  social_id?: string | null;
@@ -122,7 +128,7 @@ export interface IPatient extends IProfile {
122
128
  allergies?: IPatientAllergy[] | null;
123
129
  chronic_conditions?: IPatientChronicCondition[] | null;
124
130
  notes?: string | null;
125
- appointmentCounters?: Record<string, number> | null;
131
+ appointmentCounters?: IAppointmentCounters | null;
126
132
  tags?: ITag[] | null;
127
133
  userRef?: FirestoreDocumentReference;
128
134
  [key: string]: unknown;
@@ -161,6 +161,14 @@ export interface IPatientAllergy {
161
161
  severity?: Severity | null; // Nível de gravidade
162
162
  }
163
163
 
164
+ // Interface para contadores de appointments (usada em Patient e Calendar)
165
+ export interface IAppointmentCounters {
166
+ statusBase?: Record<string, number>; // Contadores por statusBase (ex: scheduled, in_progress, cancelled, etc.)
167
+ appointmentBaseType?: Record<string, number>; // Contadores por appointmentBaseType (ex: consultation, exam, procedure, etc.)
168
+ total?: number; // Total de appointments não deletados
169
+ deleted?: number; // Total de appointments deletados
170
+ }
171
+
164
172
  export interface IPatient extends IProfile {
165
173
  external_id?: string | null; // ID externo do paciente
166
174
  social_id?: string | null; //CPF
@@ -177,8 +185,8 @@ export interface IPatient extends IProfile {
177
185
  allergies?: IPatientAllergy[] | null; // Lista de alergias conhecidas
178
186
  chronic_conditions?: IPatientChronicCondition[] | null; // Lista de doenças crônicas do paciente
179
187
  notes?: string | null; // Anotações sobre o paciente
180
- // Contadores de appointments por status
181
- appointmentCounters?: Record<string, number> | null; // Map de status -> quantidade de appointments
188
+ // Contadores de appointments
189
+ appointmentCounters?: IAppointmentCounters | null;
182
190
  tags?: ITag[] | null;
183
191
  userRef?: FirestoreDocumentReference;
184
192
  [key: string]: unknown; // index signature
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo360-types",
3
- "version": "1.3.132",
3
+ "version": "1.3.133",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",