evo360-types 1.2.18 → 1.2.19
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.
- package/dist/apps/evo-med/people/zod-schemas.d.ts +52 -6
- package/dist/apps/evo-med/people/zod-schemas.js +7 -3
- package/dist/apps/evo-med/people/zod-schemas.ts +7 -2
- package/dist/apps/evo-people/zod-schemas.js +1 -1
- package/dist/apps/evo-people/zod-schemas.ts +1 -1
- package/dist/types/evo-med/people/index.d.ts +15 -11
- package/dist/types/evo-med/people/index.ts +16 -11
- package/package.json +1 -1
|
@@ -32,6 +32,19 @@ export declare const zProfessionalSpecialtySchema: z.ZodObject<{
|
|
|
32
32
|
name: string;
|
|
33
33
|
ref?: any;
|
|
34
34
|
}>;
|
|
35
|
+
export declare const zProfessionalOfficeSchema: z.ZodObject<{
|
|
36
|
+
code: z.ZodString;
|
|
37
|
+
name: z.ZodString;
|
|
38
|
+
ref: z.ZodAny;
|
|
39
|
+
}, "strip", z.ZodTypeAny, {
|
|
40
|
+
code: string;
|
|
41
|
+
name: string;
|
|
42
|
+
ref?: any;
|
|
43
|
+
}, {
|
|
44
|
+
code: string;
|
|
45
|
+
name: string;
|
|
46
|
+
ref?: any;
|
|
47
|
+
}>;
|
|
35
48
|
export declare const zProfessionalSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
36
49
|
id: z.ZodString;
|
|
37
50
|
ref: z.ZodAny;
|
|
@@ -86,11 +99,22 @@ export declare const zProfessionalSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
86
99
|
name: string;
|
|
87
100
|
ref?: any;
|
|
88
101
|
}>, "many">>>;
|
|
102
|
+
offices: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
103
|
+
code: z.ZodString;
|
|
104
|
+
name: z.ZodString;
|
|
105
|
+
ref: z.ZodAny;
|
|
106
|
+
}, "strip", z.ZodTypeAny, {
|
|
107
|
+
code: string;
|
|
108
|
+
name: string;
|
|
109
|
+
ref?: any;
|
|
110
|
+
}, {
|
|
111
|
+
code: string;
|
|
112
|
+
name: string;
|
|
113
|
+
ref?: any;
|
|
114
|
+
}>, "many">>>;
|
|
89
115
|
date_joining: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
90
116
|
department_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
91
117
|
departmentRef: z.ZodAny;
|
|
92
|
-
office_name: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
93
|
-
officeRef: z.ZodAny;
|
|
94
118
|
address: z.ZodOptional<z.ZodObject<{
|
|
95
119
|
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
96
120
|
kind: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -203,11 +227,22 @@ export declare const zProfessionalSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
203
227
|
name: string;
|
|
204
228
|
ref?: any;
|
|
205
229
|
}>, "many">>>;
|
|
230
|
+
offices: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
231
|
+
code: z.ZodString;
|
|
232
|
+
name: z.ZodString;
|
|
233
|
+
ref: z.ZodAny;
|
|
234
|
+
}, "strip", z.ZodTypeAny, {
|
|
235
|
+
code: string;
|
|
236
|
+
name: string;
|
|
237
|
+
ref?: any;
|
|
238
|
+
}, {
|
|
239
|
+
code: string;
|
|
240
|
+
name: string;
|
|
241
|
+
ref?: any;
|
|
242
|
+
}>, "many">>>;
|
|
206
243
|
date_joining: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
207
244
|
department_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
208
245
|
departmentRef: z.ZodAny;
|
|
209
|
-
office_name: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
210
|
-
officeRef: z.ZodAny;
|
|
211
246
|
address: z.ZodOptional<z.ZodObject<{
|
|
212
247
|
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
213
248
|
kind: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -320,11 +355,22 @@ export declare const zProfessionalSchema: z.ZodObject<z.objectUtil.extendShape<z
|
|
|
320
355
|
name: string;
|
|
321
356
|
ref?: any;
|
|
322
357
|
}>, "many">>>;
|
|
358
|
+
offices: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
359
|
+
code: z.ZodString;
|
|
360
|
+
name: z.ZodString;
|
|
361
|
+
ref: z.ZodAny;
|
|
362
|
+
}, "strip", z.ZodTypeAny, {
|
|
363
|
+
code: string;
|
|
364
|
+
name: string;
|
|
365
|
+
ref?: any;
|
|
366
|
+
}, {
|
|
367
|
+
code: string;
|
|
368
|
+
name: string;
|
|
369
|
+
ref?: any;
|
|
370
|
+
}>, "many">>>;
|
|
323
371
|
date_joining: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
324
372
|
department_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
325
373
|
departmentRef: z.ZodAny;
|
|
326
|
-
office_name: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
327
|
-
officeRef: z.ZodAny;
|
|
328
374
|
address: z.ZodOptional<z.ZodObject<{
|
|
329
375
|
name: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
330
376
|
kind: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zPatientSchema = exports.zPatientStatusSchema = exports.zProfessionalSchema = exports.zProfessionalSpecialtySchema = exports.zProfessionalCouncilSchema = exports.zProfessionalStatusSchema = void 0;
|
|
3
|
+
exports.zPatientSchema = 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");
|
|
@@ -23,6 +23,11 @@ exports.zProfessionalSpecialtySchema = zod_1.z.object({
|
|
|
23
23
|
name: zod_1.z.string().min(1).max(255),
|
|
24
24
|
ref: zod_1.z.any(),
|
|
25
25
|
});
|
|
26
|
+
exports.zProfessionalOfficeSchema = zod_1.z.object({
|
|
27
|
+
code: zod_1.z.string().min(1).max(10),
|
|
28
|
+
name: zod_1.z.string().min(1).max(255),
|
|
29
|
+
ref: zod_1.z.any(),
|
|
30
|
+
});
|
|
26
31
|
exports.zProfessionalSchema = zod_schemas_3.zProfileSchema // Extend from ProfileSchema
|
|
27
32
|
.extend({
|
|
28
33
|
status: exports.zProfessionalStatusSchema.default("draft"),
|
|
@@ -32,11 +37,10 @@ exports.zProfessionalSchema = zod_schemas_3.zProfileSchema // Extend from Profil
|
|
|
32
37
|
job_title: zod_1.z.string().nullable().optional(),
|
|
33
38
|
councils: zod_1.z.array(exports.zProfessionalCouncilSchema).nullable().optional(),
|
|
34
39
|
specialties: zod_1.z.array(exports.zProfessionalSpecialtySchema).nullable().optional(),
|
|
40
|
+
offices: zod_1.z.array(exports.zProfessionalOfficeSchema).nullable().optional(),
|
|
35
41
|
date_joining: zod_1.z.date().nullable().optional(),
|
|
36
42
|
department_name: zod_1.z.string().max(255).nullable().optional(),
|
|
37
43
|
departmentRef: zod_1.z.any(),
|
|
38
|
-
office_name: zod_1.z.string().max(255).nullable().optional().default(""),
|
|
39
|
-
officeRef: zod_1.z.any(),
|
|
40
44
|
address: zod_schemas_2.zAddressSchema.optional(),
|
|
41
45
|
contact: zod_schemas_2.zContactSchema.optional(),
|
|
42
46
|
tags: zod_1.z.array(zod_schemas_2.zTagSchema).nullable().optional(),
|
|
@@ -29,6 +29,12 @@ export const zProfessionalSpecialtySchema = z.object({
|
|
|
29
29
|
ref: z.any(),
|
|
30
30
|
});
|
|
31
31
|
|
|
32
|
+
export const zProfessionalOfficeSchema = z.object({
|
|
33
|
+
code: z.string().min(1).max(10),
|
|
34
|
+
name: z.string().min(1).max(255),
|
|
35
|
+
ref: z.any(),
|
|
36
|
+
});
|
|
37
|
+
|
|
32
38
|
export const zProfessionalSchema = zProfileSchema // Extend from ProfileSchema
|
|
33
39
|
.extend({
|
|
34
40
|
status: zProfessionalStatusSchema.default("draft"),
|
|
@@ -38,11 +44,10 @@ export const zProfessionalSchema = zProfileSchema // Extend from ProfileSchema
|
|
|
38
44
|
job_title: z.string().nullable().optional(),
|
|
39
45
|
councils: z.array(zProfessionalCouncilSchema).nullable().optional(),
|
|
40
46
|
specialties: z.array(zProfessionalSpecialtySchema).nullable().optional(),
|
|
47
|
+
offices: z.array(zProfessionalOfficeSchema).nullable().optional(),
|
|
41
48
|
date_joining: z.date().nullable().optional(),
|
|
42
49
|
department_name: z.string().max(255).nullable().optional(),
|
|
43
50
|
departmentRef: z.any(),
|
|
44
|
-
office_name: z.string().max(255).nullable().optional().default(""),
|
|
45
|
-
officeRef: z.any(),
|
|
46
51
|
address: zAddressSchema.optional(),
|
|
47
52
|
contact: zContactSchema.optional(),
|
|
48
53
|
tags: z.array(zTagSchema).nullable().optional(),
|
|
@@ -90,7 +90,7 @@ exports.zDepartmentSchema = zod_schemas_1.zFireDocSchema // Extend from FireDocS
|
|
|
90
90
|
.passthrough();
|
|
91
91
|
exports.zOfficeSchema = zod_schemas_1.zFireDocSchema // Extend from FireDocSchema
|
|
92
92
|
.extend({
|
|
93
|
-
code: zod_1.z.string().min(1).max(
|
|
93
|
+
code: zod_1.z.string().min(1).max(10),
|
|
94
94
|
name: zod_1.z.string().min(1).max(255),
|
|
95
95
|
timezone: zod_1.z.string().nullable().optional(),
|
|
96
96
|
company_name: zod_1.z.string().nullable().optional().default(""),
|
|
@@ -93,7 +93,7 @@ export const zDepartmentSchema = zFireDocSchema // Extend from FireDocSchema
|
|
|
93
93
|
|
|
94
94
|
export const zOfficeSchema = zFireDocSchema // Extend from FireDocSchema
|
|
95
95
|
.extend({
|
|
96
|
-
code: z.string().min(1).max(
|
|
96
|
+
code: z.string().min(1).max(10),
|
|
97
97
|
name: z.string().min(1).max(255),
|
|
98
98
|
timezone: z.string().nullable().optional(),
|
|
99
99
|
company_name: z.string().nullable().optional().default(""),
|
|
@@ -36,21 +36,25 @@ export interface IProfessionalSpecialty {
|
|
|
36
36
|
name: string;
|
|
37
37
|
ref?: FirestoreDocumentReference;
|
|
38
38
|
}
|
|
39
|
+
export interface IProfessionalOffice {
|
|
40
|
+
code: string;
|
|
41
|
+
name: string;
|
|
42
|
+
ref?: FirestoreDocumentReference;
|
|
43
|
+
}
|
|
39
44
|
export interface IProfessional extends IProfile {
|
|
40
|
-
status
|
|
45
|
+
status?: ProfessionalStatus;
|
|
41
46
|
professionalId?: string | null;
|
|
42
47
|
title: string;
|
|
43
48
|
type: string | null;
|
|
44
49
|
job_title?: string | null;
|
|
45
50
|
councils?: IProfessionalCouncil[] | null;
|
|
46
51
|
specialties?: IProfessionalSpecialty[] | null;
|
|
52
|
+
offices?: IProfessionalOffice[] | null;
|
|
47
53
|
date_joining?: Date | null;
|
|
48
54
|
department_name?: string | null;
|
|
49
55
|
departmentRef?: FirestoreDocumentReference;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
address?: IAddress;
|
|
53
|
-
contact?: IContact;
|
|
56
|
+
address?: IAddress | null;
|
|
57
|
+
contact?: IContact | null;
|
|
54
58
|
tags?: ITag[] | null;
|
|
55
59
|
userRef?: FirestoreDocumentReference;
|
|
56
60
|
[key: string]: unknown;
|
|
@@ -76,15 +80,15 @@ export declare enum IBloodType {
|
|
|
76
80
|
}
|
|
77
81
|
export interface IPatient extends IProfile {
|
|
78
82
|
social_id?: string | null;
|
|
79
|
-
status
|
|
83
|
+
status?: PatientStatus;
|
|
80
84
|
source_code?: string | null;
|
|
81
85
|
source_name?: string | null;
|
|
82
86
|
sourceRef?: FirestoreDocumentReference;
|
|
83
|
-
address
|
|
84
|
-
contact
|
|
85
|
-
height_cm
|
|
86
|
-
weight_kg
|
|
87
|
-
blood_type
|
|
87
|
+
address?: IAddress | null;
|
|
88
|
+
contact?: IContact | null;
|
|
89
|
+
height_cm?: number;
|
|
90
|
+
weight_kg?: number;
|
|
91
|
+
blood_type?: BloodType;
|
|
88
92
|
allergies?: IAllergy[] | null;
|
|
89
93
|
chronic_conditions?: IChronicCondition[] | null;
|
|
90
94
|
tags?: ITag[] | null;
|
|
@@ -72,21 +72,26 @@ export interface IProfessionalSpecialty {
|
|
|
72
72
|
ref?: FirestoreDocumentReference;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
+
export interface IProfessionalOffice {
|
|
76
|
+
code: string;
|
|
77
|
+
name: string;
|
|
78
|
+
ref?: FirestoreDocumentReference;
|
|
79
|
+
}
|
|
80
|
+
|
|
75
81
|
export interface IProfessional extends IProfile {
|
|
76
|
-
status
|
|
82
|
+
status?: ProfessionalStatus;
|
|
77
83
|
professionalId?: string | null;
|
|
78
84
|
title: string;
|
|
79
85
|
type: string | null;
|
|
80
86
|
job_title?: string | null;
|
|
81
87
|
councils?: IProfessionalCouncil[] | null;
|
|
82
88
|
specialties?: IProfessionalSpecialty[] | null;
|
|
89
|
+
offices?: IProfessionalOffice[] | null;
|
|
83
90
|
date_joining?: Date | null;
|
|
84
91
|
department_name?: string | null;
|
|
85
92
|
departmentRef?: FirestoreDocumentReference;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
address?: IAddress;
|
|
89
|
-
contact?: IContact;
|
|
93
|
+
address?: IAddress | null;
|
|
94
|
+
contact?: IContact | null;
|
|
90
95
|
tags?: ITag[] | null;
|
|
91
96
|
userRef?: FirestoreDocumentReference;
|
|
92
97
|
[key: string]: unknown; // index signature
|
|
@@ -134,16 +139,16 @@ export enum IBloodType {
|
|
|
134
139
|
|
|
135
140
|
export interface IPatient extends IProfile {
|
|
136
141
|
social_id?: string | null; //CPF
|
|
137
|
-
status
|
|
142
|
+
status?: PatientStatus;
|
|
138
143
|
source_code?: string | null;
|
|
139
144
|
source_name?: string | null;
|
|
140
145
|
sourceRef?: FirestoreDocumentReference;
|
|
141
|
-
address
|
|
142
|
-
contact
|
|
146
|
+
address?: IAddress | null;
|
|
147
|
+
contact?: IContact | null;
|
|
143
148
|
//informações médicas
|
|
144
|
-
height_cm
|
|
145
|
-
weight_kg
|
|
146
|
-
blood_type
|
|
149
|
+
height_cm?: number; // Altura em centímetros
|
|
150
|
+
weight_kg?: number; // Peso em kg
|
|
151
|
+
blood_type?: BloodType; // Tipo sanguíneo
|
|
147
152
|
allergies?: IAllergy[] | null; // Lista de alergias conhecidas
|
|
148
153
|
chronic_conditions?: IChronicCondition[] | null; // Lista de doenças crônicas do paciente
|
|
149
154
|
tags?: ITag[] | null;
|