evo360-types 1.3.63 → 1.3.66

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.
@@ -14,7 +14,7 @@ exports.zDistChannelSchema = zod_schemas_1.zFireDocSchema
14
14
  .extend({
15
15
  code: zod_1.z.string().min(1).max(20),
16
16
  name: zod_1.z.string().min(1).max(255),
17
- type_code: zod_1.z.string().min(1).max(10),
17
+ type_code: zod_1.z.string().min(1).max(20),
18
18
  type_name: zod_1.z.string().min(1).max(255),
19
19
  typeRef: zod_1.z.any(),
20
20
  tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
@@ -13,7 +13,7 @@ export const zDistChannelSchema = zFireDocSchema
13
13
  .extend({
14
14
  code: z.string().min(1).max(20),
15
15
  name: z.string().min(1).max(255),
16
- type_code: z.string().min(1).max(10),
16
+ type_code: z.string().min(1).max(20),
17
17
  type_name: z.string().min(1).max(255),
18
18
  typeRef: z.any(),
19
19
  tags: z.array(zTagSchema).nullable().optional(),
@@ -7,13 +7,13 @@ const zod_schemas_2 = require("../../evo-people/zod-schemas");
7
7
  const zod_schemas_3 = require("../dic/zod-schemas");
8
8
  exports.zLeadStatusSchema = zod_1.z.enum(["active", "inactive", "draft"]);
9
9
  exports.zLeadQualificationSchema = zod_1.z.object({
10
- code: zod_1.z.string().min(1).max(10),
10
+ code: zod_1.z.string().min(1).max(20),
11
11
  name: zod_1.z.string().min(1).max(255),
12
12
  funnelLevel: zod_schemas_3.zQualificationFunnelLevelSchema,
13
13
  ref: zod_1.z.any(),
14
14
  });
15
15
  exports.zLeadDistChannelSchema = zod_1.z.object({
16
- code: zod_1.z.string().min(1).max(10),
16
+ code: zod_1.z.string().min(1).max(20),
17
17
  name: zod_1.z.string().min(1).max(255),
18
18
  ref: zod_1.z.any(),
19
19
  });
@@ -10,14 +10,14 @@ import { zQualificationFunnelLevelSchema } from "../dic/zod-schemas";
10
10
  export const zLeadStatusSchema = z.enum(["active", "inactive", "draft"]);
11
11
 
12
12
  export const zLeadQualificationSchema = z.object({
13
- code: z.string().min(1).max(10),
13
+ code: z.string().min(1).max(20),
14
14
  name: z.string().min(1).max(255),
15
15
  funnelLevel: zQualificationFunnelLevelSchema,
16
16
  ref: z.any(),
17
17
  });
18
18
 
19
19
  export const zLeadDistChannelSchema = z.object({
20
- code: z.string().min(1).max(10),
20
+ code: z.string().min(1).max(20),
21
21
  name: z.string().min(1).max(255),
22
22
  ref: z.any(),
23
23
  });
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- export declare const zPaymentStatusSchema: z.ZodEnum<["paid", "partial", "pending", "not_informed"]>;
2
+ export declare const zAppointmentPaymentStatusSchema: z.ZodEnum<["paid", "partial", "pending", "not_informed"]>;
3
3
  export declare const zAppointmentStatusTypeSchema: z.ZodEnum<["scheduled", "confirmed", "rescheduled", "pre_checkin", "waiting", "in_progress", "completed", "no_show", "cancelled", "cancelled_by_clinic", "cancelled_by_patient", "extra_slot", "awaiting_payment", "paid", "awaiting_documents", "blocked", "waiting_list", "expired"]>;
4
4
  export declare const zAppointmentModeSchema: z.ZodEnum<["telemedicine", "in_person"]>;
5
5
  export declare const zAppointmentTypeBaseSchema: z.ZodEnum<["blocked", "consultation", "follow_up", "procedure", "surgery", "exam", "evaluation", "emergency", "check_up", "vaccination", "fit_test", "therapy", "meeting"]>;
@@ -87,7 +87,7 @@ export declare const zAppointmentProfessionalSchema: z.ZodObject<{
87
87
  gender: z.ZodDefault<z.ZodOptional<z.ZodString>>;
88
88
  external_id: z.ZodOptional<z.ZodString>;
89
89
  }, z.ZodTypeAny, "passthrough">>;
90
- export declare const zInsuranceSchema: z.ZodObject<{
90
+ export declare const zAppointmentInsuranceSchema: z.ZodObject<{
91
91
  name: z.ZodString;
92
92
  external_id: z.ZodOptional<z.ZodString>;
93
93
  }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
@@ -97,7 +97,7 @@ export declare const zInsuranceSchema: z.ZodObject<{
97
97
  name: z.ZodString;
98
98
  external_id: z.ZodOptional<z.ZodString>;
99
99
  }, z.ZodTypeAny, "passthrough">>;
100
- export declare const zPaymentSchema: z.ZodObject<{
100
+ export declare const zAppointmentPaymentSchema: z.ZodObject<{
101
101
  total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
102
102
  paid: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
103
103
  due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
@@ -113,7 +113,7 @@ export declare const zPaymentSchema: z.ZodObject<{
113
113
  due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
114
114
  status: z.ZodOptional<z.ZodEnum<["paid", "partial", "pending", "not_informed"]>>;
115
115
  }, z.ZodTypeAny, "passthrough">>;
116
- export declare const zProcedureSchema: z.ZodObject<{
116
+ export declare const zAppointmentProcedureSchema: z.ZodObject<{
117
117
  id: z.ZodOptional<z.ZodNumber>;
118
118
  name: z.ZodString;
119
119
  description: z.ZodOptional<z.ZodString>;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.zAppointmentSchema = exports.zProcedureSchema = exports.zPaymentSchema = exports.zInsuranceSchema = exports.zAppointmentProfessionalSchema = exports.zAppointmentPatientSchema = exports.zAppointmentAddressSchema = exports.zAppointmentTypeBaseSchema = exports.zAppointmentModeSchema = exports.zAppointmentStatusTypeSchema = exports.zPaymentStatusSchema = void 0;
3
+ exports.zAppointmentSchema = exports.zAppointmentProcedureSchema = exports.zAppointmentPaymentSchema = exports.zAppointmentInsuranceSchema = exports.zAppointmentProfessionalSchema = exports.zAppointmentPatientSchema = exports.zAppointmentAddressSchema = exports.zAppointmentTypeBaseSchema = exports.zAppointmentModeSchema = exports.zAppointmentStatusTypeSchema = exports.zAppointmentPaymentStatusSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const zod_schemas_1 = require("../../shared/zod-schemas");
6
6
  // Enums para validação
7
- exports.zPaymentStatusSchema = zod_1.z.enum([
7
+ exports.zAppointmentPaymentStatusSchema = zod_1.z.enum([
8
8
  "paid",
9
9
  "partial",
10
10
  "pending",
@@ -86,23 +86,23 @@ exports.zAppointmentProfessionalSchema = zod_1.z
86
86
  })
87
87
  .passthrough();
88
88
  // Schema para seguro
89
- exports.zInsuranceSchema = zod_1.z
89
+ exports.zAppointmentInsuranceSchema = zod_1.z
90
90
  .object({
91
91
  name: zod_1.z.string(),
92
92
  external_id: zod_1.z.string().optional(),
93
93
  })
94
94
  .passthrough();
95
95
  // Schema para pagamento
96
- exports.zPaymentSchema = zod_1.z
96
+ exports.zAppointmentPaymentSchema = zod_1.z
97
97
  .object({
98
98
  total: zod_1.z.number().nullable().optional(),
99
99
  paid: zod_1.z.number().nullable().optional(),
100
100
  due: zod_1.z.number().nullable().optional(),
101
- status: exports.zPaymentStatusSchema.optional(),
101
+ status: exports.zAppointmentPaymentStatusSchema.optional(),
102
102
  })
103
103
  .passthrough();
104
104
  // Schema para procedimento
105
- exports.zProcedureSchema = zod_1.z.object({
105
+ exports.zAppointmentProcedureSchema = zod_1.z.object({
106
106
  id: zod_1.z.number().optional(),
107
107
  name: zod_1.z.string(),
108
108
  description: zod_1.z.string().optional(),
@@ -123,11 +123,11 @@ exports.zAppointmentSchema = zod_schemas_1.zFireDocSchema
123
123
  appointmentBaseType: exports.zAppointmentTypeBaseSchema, // Tipo base para lógica
124
124
  specialty: zod_1.z.string().optional(),
125
125
  address: exports.zAppointmentAddressSchema.optional(),
126
- procedures: zod_1.z.array(exports.zProcedureSchema).optional(),
126
+ procedures: zod_1.z.array(exports.zAppointmentProcedureSchema).optional(),
127
127
  patient: exports.zAppointmentPatientSchema,
128
128
  professional: exports.zAppointmentProfessionalSchema.optional(),
129
- insurance: exports.zInsuranceSchema.optional(),
130
- payment: exports.zPaymentSchema.optional(),
129
+ insurance: exports.zAppointmentInsuranceSchema.optional(),
130
+ payment: exports.zAppointmentPaymentSchema.optional(),
131
131
  // Propriedades para controle de rascunho
132
132
  isDraft: zod_1.z.boolean(),
133
133
  draftExpirationMinutes: zod_1.z.number().optional(), // tempo em minutos para expiração do rascunho
@@ -2,7 +2,7 @@ import { z } from "zod";
2
2
  import { zFireDocSchema, zTagSchema } from "../../shared/zod-schemas";
3
3
 
4
4
  // Enums para validação
5
- export const zPaymentStatusSchema = z.enum([
5
+ export const zAppointmentPaymentStatusSchema = z.enum([
6
6
  "paid",
7
7
  "partial",
8
8
  "pending",
@@ -91,7 +91,7 @@ export const zAppointmentProfessionalSchema = z
91
91
  .passthrough();
92
92
 
93
93
  // Schema para seguro
94
- export const zInsuranceSchema = z
94
+ export const zAppointmentInsuranceSchema = z
95
95
  .object({
96
96
  name: z.string(),
97
97
  external_id: z.string().optional(),
@@ -99,17 +99,17 @@ export const zInsuranceSchema = z
99
99
  .passthrough();
100
100
 
101
101
  // Schema para pagamento
102
- export const zPaymentSchema = z
102
+ export const zAppointmentPaymentSchema = z
103
103
  .object({
104
104
  total: z.number().nullable().optional(),
105
105
  paid: z.number().nullable().optional(),
106
106
  due: z.number().nullable().optional(),
107
- status: zPaymentStatusSchema.optional(),
107
+ status: zAppointmentPaymentStatusSchema.optional(),
108
108
  })
109
109
  .passthrough();
110
110
 
111
111
  // Schema para procedimento
112
- export const zProcedureSchema = z.object({
112
+ export const zAppointmentProcedureSchema = z.object({
113
113
  id: z.number().optional(),
114
114
  name: z.string(),
115
115
  description: z.string().optional(),
@@ -131,11 +131,11 @@ export const zAppointmentSchema = zFireDocSchema
131
131
  appointmentBaseType: zAppointmentTypeBaseSchema, // Tipo base para lógica
132
132
  specialty: z.string().optional(),
133
133
  address: zAppointmentAddressSchema.optional(),
134
- procedures: z.array(zProcedureSchema).optional(),
134
+ procedures: z.array(zAppointmentProcedureSchema).optional(),
135
135
  patient: zAppointmentPatientSchema,
136
136
  professional: zAppointmentProfessionalSchema.optional(),
137
- insurance: zInsuranceSchema.optional(),
138
- payment: zPaymentSchema.optional(),
137
+ insurance: zAppointmentInsuranceSchema.optional(),
138
+ payment: zAppointmentPaymentSchema.optional(),
139
139
 
140
140
  // Propriedades para controle de rascunho
141
141
  isDraft: z.boolean(),
@@ -5,16 +5,16 @@ const zod_1 = require("zod");
5
5
  const zod_schemas_1 = require("../../shared/zod-schemas");
6
6
  exports.zSpecialtyTypeSchema = zod_schemas_1.zFireDocSchema
7
7
  .extend({
8
- code: zod_1.z.string().min(1).max(10),
8
+ code: zod_1.z.string().min(1).max(20),
9
9
  name: zod_1.z.string().min(1).max(255),
10
10
  })
11
11
  .passthrough();
12
12
  exports.zSpecialtySchema = zod_schemas_1.zFireDocSchema
13
13
  .extend({
14
- code: zod_1.z.string().min(1).max(10),
14
+ code: zod_1.z.string().min(1).max(20),
15
15
  name: zod_1.z.string().min(1).max(255),
16
16
  tiss: zod_1.z.string().max(255).optional().default(""),
17
- type_code: zod_1.z.string().min(1).max(10),
17
+ type_code: zod_1.z.string().min(1).max(20),
18
18
  type_name: zod_1.z.string().min(1).max(255),
19
19
  typeRef: zod_1.z.any(),
20
20
  tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
@@ -22,21 +22,21 @@ exports.zSpecialtySchema = zod_schemas_1.zFireDocSchema
22
22
  .passthrough();
23
23
  exports.zPatientSourceSchema = zod_schemas_1.zFireDocSchema
24
24
  .extend({
25
- code: zod_1.z.string().min(1).max(10),
25
+ code: zod_1.z.string().min(1).max(20),
26
26
  name: zod_1.z.string().min(1).max(255),
27
27
  tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
28
28
  })
29
29
  .passthrough();
30
30
  exports.zAppointmentSourceSchema = zod_schemas_1.zFireDocSchema
31
31
  .extend({
32
- code: zod_1.z.string().min(1).max(10),
32
+ code: zod_1.z.string().min(1).max(20),
33
33
  name: zod_1.z.string().min(1).max(255),
34
34
  tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
35
35
  })
36
36
  .passthrough();
37
37
  exports.zAppointmentRequestTypeSchema = zod_schemas_1.zFireDocSchema
38
38
  .extend({
39
- code: zod_1.z.string().min(1).max(10),
39
+ code: zod_1.z.string().min(1).max(20),
40
40
  name: zod_1.z.string().min(1).max(255),
41
41
  tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
42
42
  })
@@ -102,12 +102,12 @@ exports.zSeveritySchema = zod_1.z.enum([
102
102
  "Unknown",
103
103
  ]);
104
104
  exports.zChronicConditionSchema = zod_schemas_1.zFireDocSchema.extend({
105
- code: zod_1.z.string().min(1).max(10),
105
+ code: zod_1.z.string().min(1).max(20),
106
106
  name: zod_1.z.string().min(1).max(255),
107
107
  });
108
108
  exports.zAllergyKindSchema = zod_1.z.enum(["Food", "Drug", "Insect", "Other"]);
109
109
  exports.zAllergySchema = zod_schemas_1.zFireDocSchema.extend({
110
- code: zod_1.z.string().min(1).max(10),
110
+ code: zod_1.z.string().min(1).max(20),
111
111
  name: zod_1.z.string().min(1).max(255),
112
112
  kind: exports.zAllergyKindSchema.nullable().optional().default("Other"),
113
113
  severity: exports.zSeveritySchema.nullable().optional().default("Unknown"),
@@ -3,17 +3,17 @@ import { zFireDocSchema, zTagSchema } from "../../shared/zod-schemas";
3
3
 
4
4
  export const zSpecialtyTypeSchema = zFireDocSchema
5
5
  .extend({
6
- code: z.string().min(1).max(10),
6
+ code: z.string().min(1).max(20),
7
7
  name: z.string().min(1).max(255),
8
8
  })
9
9
  .passthrough();
10
10
 
11
11
  export const zSpecialtySchema = zFireDocSchema
12
12
  .extend({
13
- code: z.string().min(1).max(10),
13
+ code: z.string().min(1).max(20),
14
14
  name: z.string().min(1).max(255),
15
15
  tiss: z.string().max(255).optional().default(""),
16
- type_code: z.string().min(1).max(10),
16
+ type_code: z.string().min(1).max(20),
17
17
  type_name: z.string().min(1).max(255),
18
18
  typeRef: z.any(),
19
19
  tags: z.array(zTagSchema).nullable().optional(),
@@ -22,7 +22,7 @@ export const zSpecialtySchema = zFireDocSchema
22
22
 
23
23
  export const zPatientSourceSchema = zFireDocSchema
24
24
  .extend({
25
- code: z.string().min(1).max(10),
25
+ code: z.string().min(1).max(20),
26
26
  name: z.string().min(1).max(255),
27
27
  tags: z.array(zTagSchema).nullable().optional(),
28
28
  })
@@ -30,7 +30,7 @@ export const zPatientSourceSchema = zFireDocSchema
30
30
 
31
31
  export const zAppointmentSourceSchema = zFireDocSchema
32
32
  .extend({
33
- code: z.string().min(1).max(10),
33
+ code: z.string().min(1).max(20),
34
34
  name: z.string().min(1).max(255),
35
35
  tags: z.array(zTagSchema).nullable().optional(),
36
36
  })
@@ -38,7 +38,7 @@ export const zAppointmentSourceSchema = zFireDocSchema
38
38
 
39
39
  export const zAppointmentRequestTypeSchema = zFireDocSchema
40
40
  .extend({
41
- code: z.string().min(1).max(10),
41
+ code: z.string().min(1).max(20),
42
42
  name: z.string().min(1).max(255),
43
43
  tags: z.array(zTagSchema).nullable().optional(),
44
44
  })
@@ -111,14 +111,14 @@ export const zSeveritySchema = z.enum([
111
111
  ]);
112
112
 
113
113
  export const zChronicConditionSchema = zFireDocSchema.extend({
114
- code: z.string().min(1).max(10),
114
+ code: z.string().min(1).max(20),
115
115
  name: z.string().min(1).max(255),
116
116
  });
117
117
 
118
118
  export const zAllergyKindSchema = z.enum(["Food", "Drug", "Insect", "Other"]);
119
119
 
120
120
  export const zAllergySchema = zFireDocSchema.extend({
121
- code: z.string().min(1).max(10),
121
+ code: z.string().min(1).max(20),
122
122
  name: z.string().min(1).max(255),
123
123
  kind: zAllergyKindSchema.nullable().optional().default("Other"),
124
124
  severity: zSeveritySchema.nullable().optional().default("Unknown"),
@@ -6,7 +6,7 @@ const zod_schemas_1 = require("../../shared/zod-schemas");
6
6
  // Define Zod schemas for each interface
7
7
  exports.zTissContractSchema = zod_1.z.object({
8
8
  type: zod_1.z.enum(["PJ", "PF"]),
9
- operatorcode: zod_1.z.string().min(1).max(10),
9
+ operatorcode: zod_1.z.string().min(1).max(20),
10
10
  taxId: zod_1.z.string().min(1).max(255),
11
11
  name: zod_1.z.string().min(1).max(255),
12
12
  cnes: zod_1.z.string().min(1).max(255),
@@ -19,7 +19,7 @@ exports.zTissConfigSchema = zod_1.z.object({
19
19
  });
20
20
  exports.zInsuranceCompanySchema = zod_schemas_1.zFireDocSchema
21
21
  .extend({
22
- code: zod_1.z.string().min(1).max(10),
22
+ code: zod_1.z.string().min(1).max(20),
23
23
  name: zod_1.z.string().min(1).max(255),
24
24
  corporate_name: zod_1.z.string().optional(),
25
25
  tax_id: zod_1.z.string().optional(),
@@ -10,7 +10,7 @@ import {
10
10
 
11
11
  export const zTissContractSchema = z.object({
12
12
  type: z.enum(["PJ", "PF"]),
13
- operatorcode: z.string().min(1).max(10),
13
+ operatorcode: z.string().min(1).max(20),
14
14
  taxId: z.string().min(1).max(255),
15
15
  name: z.string().min(1).max(255),
16
16
  cnes: z.string().min(1).max(255),
@@ -25,7 +25,7 @@ export const zTissConfigSchema = z.object({
25
25
 
26
26
  export const zInsuranceCompanySchema = zFireDocSchema
27
27
  .extend({
28
- code: z.string().min(1).max(10),
28
+ code: z.string().min(1).max(20),
29
29
  name: z.string().min(1).max(255),
30
30
  corporate_name: z.string().optional(),
31
31
  tax_id: z.string().optional(),
@@ -19,12 +19,12 @@ exports.zProfessionalCouncilSchema = zod_1.z.object({
19
19
  ref: zod_1.z.any(),
20
20
  });
21
21
  exports.zProfessionalSpecialtySchema = zod_1.z.object({
22
- code: zod_1.z.string().min(1).max(10),
22
+ code: zod_1.z.string().min(1).max(20),
23
23
  name: zod_1.z.string().min(1).max(255),
24
24
  ref: zod_1.z.any(),
25
25
  });
26
26
  exports.zProfessionalOfficeSchema = zod_1.z.object({
27
- code: zod_1.z.string().min(1).max(10),
27
+ code: zod_1.z.string().min(1).max(20),
28
28
  name: zod_1.z.string().min(1).max(255),
29
29
  ref: zod_1.z.any(),
30
30
  });
@@ -39,10 +39,10 @@ exports.zProfessionalSchema = zod_schemas_3.zProfileSchema // Extend from Profil
39
39
  specialties: zod_1.z.array(exports.zProfessionalSpecialtySchema).nullable().optional(),
40
40
  offices: zod_1.z.array(exports.zProfessionalOfficeSchema).nullable().optional(),
41
41
  date_joining: zod_1.z.date().nullable().optional(),
42
- company_code: zod_1.z.string().min(1).max(10),
42
+ company_code: zod_1.z.string().min(1).max(20),
43
43
  company_name: zod_1.z.string().max(255).nullable().optional().default(""),
44
44
  companyRef: zod_1.z.any(),
45
- department_code: zod_1.z.string().min(1).max(10),
45
+ department_code: zod_1.z.string().min(1).max(20),
46
46
  department_name: zod_1.z.string().max(255).nullable().optional(),
47
47
  departmentRef: zod_1.z.any(),
48
48
  address: zod_schemas_2.zAddressSchema.nullable().optional(),
@@ -64,14 +64,14 @@ exports.zBloodTypeSchema = zod_1.z.enum([
64
64
  "Unknown",
65
65
  ]);
66
66
  exports.zPatientAllergySchema = zod_1.z.object({
67
- code: zod_1.z.string().min(1).max(10),
67
+ code: zod_1.z.string().min(1).max(20),
68
68
  name: zod_1.z.string().min(1).max(255),
69
69
  ref: zod_1.z.any(),
70
70
  kind: zod_schemas_1.zAllergyKindSchema.nullable().optional().default("Other"),
71
71
  severity: zod_schemas_1.zSeveritySchema.nullable().optional().default("Unknown"),
72
72
  });
73
73
  exports.zPatientChronicConditionSchema = zod_1.z.object({
74
- code: zod_1.z.string().min(1).max(10),
74
+ code: zod_1.z.string().min(1).max(20),
75
75
  name: zod_1.z.string().min(1).max(255),
76
76
  ref: zod_1.z.any(),
77
77
  diagnosis_date: zod_1.z.date().nullable().optional(),
@@ -29,13 +29,13 @@ export const zProfessionalCouncilSchema = z.object({
29
29
  });
30
30
 
31
31
  export const zProfessionalSpecialtySchema = z.object({
32
- code: z.string().min(1).max(10),
32
+ code: z.string().min(1).max(20),
33
33
  name: z.string().min(1).max(255),
34
34
  ref: z.any(),
35
35
  });
36
36
 
37
37
  export const zProfessionalOfficeSchema = z.object({
38
- code: z.string().min(1).max(10),
38
+ code: z.string().min(1).max(20),
39
39
  name: z.string().min(1).max(255),
40
40
  ref: z.any(),
41
41
  });
@@ -51,10 +51,10 @@ export const zProfessionalSchema = zProfileSchema // Extend from ProfileSchema
51
51
  specialties: z.array(zProfessionalSpecialtySchema).nullable().optional(),
52
52
  offices: z.array(zProfessionalOfficeSchema).nullable().optional(),
53
53
  date_joining: z.date().nullable().optional(),
54
- company_code: z.string().min(1).max(10),
54
+ company_code: z.string().min(1).max(20),
55
55
  company_name: z.string().max(255).nullable().optional().default(""),
56
56
  companyRef: z.any(),
57
- department_code: z.string().min(1).max(10),
57
+ department_code: z.string().min(1).max(20),
58
58
  department_name: z.string().max(255).nullable().optional(),
59
59
  departmentRef: z.any(),
60
60
  address: zAddressSchema.nullable().optional(),
@@ -79,7 +79,7 @@ export const zBloodTypeSchema = z.enum([
79
79
  ]);
80
80
 
81
81
  export const zPatientAllergySchema = z.object({
82
- code: z.string().min(1).max(10),
82
+ code: z.string().min(1).max(20),
83
83
  name: z.string().min(1).max(255),
84
84
  ref: z.any(),
85
85
  kind: zAllergyKindSchema.nullable().optional().default("Other"),
@@ -87,7 +87,7 @@ export const zPatientAllergySchema = z.object({
87
87
  });
88
88
 
89
89
  export const zPatientChronicConditionSchema = z.object({
90
- code: z.string().min(1).max(10),
90
+ code: z.string().min(1).max(20),
91
91
  name: z.string().min(1).max(255),
92
92
  ref: z.any(),
93
93
  diagnosis_date: z.date().nullable().optional(),
@@ -5,16 +5,16 @@ const zod_1 = require("zod");
5
5
  const zod_schemas_1 = require("../../shared/zod-schemas");
6
6
  // Define Zod schemas for IProcedureType and IProcedure
7
7
  exports.ProcedureTypeSchema = zod_schemas_1.zFireDocSchema.extend({
8
- code: zod_1.z.string().min(1).max(10),
8
+ code: zod_1.z.string().min(1).max(20),
9
9
  name: zod_1.z.string().min(1).max(255),
10
10
  tags: zod_1.z.array(zod_schemas_1.zTagSchema).nullable().optional(),
11
11
  });
12
12
  exports.ProcedureSchema = zod_schemas_1.zFireDocSchema.extend({
13
- code: zod_1.z.string().min(1).max(10),
13
+ code: zod_1.z.string().min(1).max(20),
14
14
  name: zod_1.z.string().min(1).max(255),
15
15
  technical_name: zod_1.z.string(),
16
16
  status: zod_1.z.enum(["active", "inactive", "draft"]),
17
- type_code: zod_1.z.string().max(10).nullable().optional().default(""),
17
+ type_code: zod_1.z.string().max(20).nullable().optional().default(""),
18
18
  type_name: zod_1.z.string().max(255).nullable().optional().default(""),
19
19
  typeRef: zod_1.z.any(),
20
20
  duration: zod_1.z.number().nullable().optional().default(0),
@@ -4,17 +4,17 @@ import { zFireDocSchema, zTagSchema } from "../../shared/zod-schemas";
4
4
  // Define Zod schemas for IProcedureType and IProcedure
5
5
 
6
6
  export const ProcedureTypeSchema = zFireDocSchema.extend({
7
- code: z.string().min(1).max(10),
7
+ code: z.string().min(1).max(20),
8
8
  name: z.string().min(1).max(255),
9
9
  tags: z.array(zTagSchema).nullable().optional(),
10
10
  });
11
11
 
12
12
  export const ProcedureSchema = zFireDocSchema.extend({
13
- code: z.string().min(1).max(10),
13
+ code: z.string().min(1).max(20),
14
14
  name: z.string().min(1).max(255),
15
15
  technical_name: z.string(),
16
16
  status: z.enum(["active", "inactive", "draft"]),
17
- type_code: z.string().max(10).nullable().optional().default(""),
17
+ type_code: z.string().max(20).nullable().optional().default(""),
18
18
  type_name: z.string().max(255).nullable().optional().default(""),
19
19
  typeRef: z.any(),
20
20
  duration: z.number().nullable().optional().default(0),
@@ -73,7 +73,7 @@ exports.zEmployeeSchema = exports.zProfileSchema // Extend from ProfileSchema
73
73
  .passthrough();
74
74
  exports.zDepartmentSchema = zod_schemas_1.zFireDocSchema // Extend from FireDocSchema
75
75
  .extend({
76
- code: zod_1.z.string().min(1).max(10),
76
+ code: zod_1.z.string().min(1).max(20),
77
77
  name: zod_1.z.string().min(1).max(255),
78
78
  lead_name: zod_1.z.string().max(255).nullable().optional().default(""),
79
79
  leadRef: zod_1.z.any(),
@@ -113,7 +113,7 @@ exports.zOfficeSchema = zod_schemas_1.zFireDocSchema // Extend from FireDocSchem
113
113
  .passthrough();
114
114
  exports.zCompanySchema = zod_schemas_1.zFireDocSchema // Extend from FireDocSchema
115
115
  .extend({
116
- code: zod_1.z.string().min(1).max(10),
116
+ code: zod_1.z.string().min(1).max(20),
117
117
  name: zod_1.z.string().min(1).max(255),
118
118
  lead_name: zod_1.z.string().max(255).nullable().optional().default(""),
119
119
  leadRef: zod_1.z.any(),
@@ -75,7 +75,7 @@ export const zEmployeeSchema = zProfileSchema // Extend from ProfileSchema
75
75
 
76
76
  export const zDepartmentSchema = zFireDocSchema // Extend from FireDocSchema
77
77
  .extend({
78
- code: z.string().min(1).max(10),
78
+ code: z.string().min(1).max(20),
79
79
  name: z.string().min(1).max(255),
80
80
  lead_name: z.string().max(255).nullable().optional().default(""),
81
81
  leadRef: z.any(),
@@ -117,7 +117,7 @@ export const zOfficeSchema = zFireDocSchema // Extend from FireDocSchema
117
117
 
118
118
  export const zCompanySchema = zFireDocSchema // Extend from FireDocSchema
119
119
  .extend({
120
- code: z.string().min(1).max(10),
120
+ code: z.string().min(1).max(20),
121
121
  name: z.string().min(1).max(255),
122
122
  lead_name: z.string().max(255).nullable().optional().default(""),
123
123
  leadRef: z.any(),
@@ -1,18 +1,18 @@
1
1
  import type { IFireDoc, IGeoPoint, ITag } from "../../shared";
2
2
  import { AppointmentStatusType, AppointmentType } from "../dic";
3
- export declare const PaymentStatusEnum: {
3
+ export declare const AppointmentPaymentStatusEnum: {
4
4
  readonly Paid: "paid";
5
5
  readonly Partial: "partial";
6
6
  readonly Pending: "pending";
7
7
  readonly NotInformed: "not_informed";
8
8
  };
9
- export type PaymentStatus = (typeof PaymentStatusEnum)[keyof typeof PaymentStatusEnum];
9
+ export type AppointmentPaymentStatus = (typeof AppointmentPaymentStatusEnum)[keyof typeof AppointmentPaymentStatusEnum];
10
10
  export declare const AppointmentModeEnum: {
11
11
  readonly Telemedicine: "telemedicine";
12
12
  readonly InPerson: "in_person";
13
13
  };
14
14
  export type AppointmentMode = (typeof AppointmentModeEnum)[keyof typeof AppointmentModeEnum];
15
- export interface Address {
15
+ export interface IAppointmentAddress {
16
16
  address_name?: string;
17
17
  address_line1?: string;
18
18
  address_line2?: string;
@@ -25,7 +25,7 @@ export interface Address {
25
25
  address_notes?: string;
26
26
  address_geo?: IGeoPoint;
27
27
  }
28
- export interface Patient {
28
+ export interface IAppointmentPatient {
29
29
  id: number | null;
30
30
  name: string | null;
31
31
  email: string;
@@ -36,7 +36,7 @@ export interface Patient {
36
36
  external_id?: string;
37
37
  [key: string]: unknown;
38
38
  }
39
- export interface Professional {
39
+ export interface IAppointmentProfessional {
40
40
  id: number;
41
41
  name: string;
42
42
  email: string;
@@ -44,26 +44,26 @@ export interface Professional {
44
44
  external_id?: string;
45
45
  [key: string]: unknown;
46
46
  }
47
- export interface Insurance {
47
+ export interface IAppointmentInsurance {
48
48
  name: string;
49
49
  external_id?: string;
50
50
  [key: string]: unknown;
51
51
  }
52
- export interface Payment {
52
+ export interface IAppointmentPayment {
53
53
  total?: number | null;
54
54
  paid?: number | null;
55
55
  due?: number | null;
56
- status?: PaymentStatus;
56
+ status?: AppointmentPaymentStatus;
57
57
  [key: string]: unknown;
58
58
  }
59
- export interface Procedure {
59
+ export interface IAppointmentProcedure {
60
60
  id?: number;
61
61
  name: string;
62
62
  description?: string;
63
63
  duration?: number;
64
64
  price?: number;
65
65
  }
66
- export interface Appointment extends IFireDoc {
66
+ export interface IAppointment extends IFireDoc {
67
67
  calendarId: number;
68
68
  startDate: string;
69
69
  endDate: string;
@@ -74,12 +74,12 @@ export interface Appointment extends IFireDoc {
74
74
  appointmentType: string;
75
75
  appointmentBaseType: AppointmentType;
76
76
  specialty?: string;
77
- address?: Address;
78
- procedures?: Procedure[];
79
- patient: Patient;
80
- professional?: Professional;
81
- insurance?: Insurance;
82
- payment?: Payment;
77
+ address?: IAppointmentAddress;
78
+ procedures?: IAppointmentProcedure[];
79
+ patient: IAppointmentPatient;
80
+ professional?: IAppointmentProfessional;
81
+ insurance?: IAppointmentInsurance;
82
+ payment?: IAppointmentPayment;
83
83
  isDraft: boolean;
84
84
  draftExpirationMinutes?: number;
85
85
  rescheduleCount: number;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AppointmentModeEnum = exports.PaymentStatusEnum = void 0;
3
+ exports.AppointmentModeEnum = exports.AppointmentPaymentStatusEnum = void 0;
4
4
  // Enums para status de pagamento
5
- exports.PaymentStatusEnum = {
5
+ exports.AppointmentPaymentStatusEnum = {
6
6
  Paid: "paid",
7
7
  Partial: "partial",
8
8
  Pending: "pending",
@@ -1,15 +1,15 @@
1
1
  import type { IFireDoc, IGeoPoint, ITag } from "../../shared";
2
2
  import { AppointmentStatusType, AppointmentType } from "../dic";
3
3
  // Enums para status de pagamento
4
- export const PaymentStatusEnum = {
4
+ export const AppointmentPaymentStatusEnum = {
5
5
  Paid: "paid",
6
6
  Partial: "partial",
7
7
  Pending: "pending",
8
8
  NotInformed: "not_informed",
9
9
  } as const;
10
10
 
11
- export type PaymentStatus =
12
- (typeof PaymentStatusEnum)[keyof typeof PaymentStatusEnum];
11
+ export type AppointmentPaymentStatus =
12
+ (typeof AppointmentPaymentStatusEnum)[keyof typeof AppointmentPaymentStatusEnum];
13
13
 
14
14
  // Enums para modo do agendamento
15
15
  export const AppointmentModeEnum = {
@@ -21,7 +21,7 @@ export type AppointmentMode =
21
21
  (typeof AppointmentModeEnum)[keyof typeof AppointmentModeEnum];
22
22
 
23
23
  // Interface para endereço
24
- export interface Address {
24
+ export interface IAppointmentAddress {
25
25
  address_name?: string;
26
26
  address_line1?: string;
27
27
  address_line2?: string;
@@ -36,7 +36,7 @@ export interface Address {
36
36
  }
37
37
 
38
38
  // Interface para paciente
39
- export interface Patient {
39
+ export interface IAppointmentPatient {
40
40
  id: number | null;
41
41
  name: string | null;
42
42
  email: string;
@@ -49,7 +49,7 @@ export interface Patient {
49
49
  }
50
50
 
51
51
  // Interface para profissional
52
- export interface Professional {
52
+ export interface IAppointmentProfessional {
53
53
  id: number;
54
54
  name: string;
55
55
  email: string;
@@ -59,23 +59,23 @@ export interface Professional {
59
59
  }
60
60
 
61
61
  // Interface para seguro
62
- export interface Insurance {
62
+ export interface IAppointmentInsurance {
63
63
  name: string;
64
64
  external_id?: string;
65
65
  [key: string]: unknown; // index signature
66
66
  }
67
67
 
68
68
  // Interface para pagamento
69
- export interface Payment {
69
+ export interface IAppointmentPayment {
70
70
  total?: number | null;
71
71
  paid?: number | null;
72
72
  due?: number | null;
73
- status?: PaymentStatus;
73
+ status?: AppointmentPaymentStatus;
74
74
  [key: string]: unknown;
75
75
  }
76
76
 
77
77
  // Interface para procedimento
78
- export interface Procedure {
78
+ export interface IAppointmentProcedure {
79
79
  id?: number;
80
80
  name: string;
81
81
  description?: string;
@@ -84,7 +84,7 @@ export interface Procedure {
84
84
  }
85
85
 
86
86
  // Interface principal do Appointment
87
- export interface Appointment extends IFireDoc {
87
+ export interface IAppointment extends IFireDoc {
88
88
  calendarId: number;
89
89
  startDate: string; // ISO string
90
90
  endDate: string; // ISO string
@@ -95,12 +95,12 @@ export interface Appointment extends IFireDoc {
95
95
  appointmentType: string;
96
96
  appointmentBaseType: AppointmentType;
97
97
  specialty?: string;
98
- address?: Address;
99
- procedures?: Procedure[];
100
- patient: Patient;
101
- professional?: Professional;
102
- insurance?: Insurance;
103
- payment?: Payment;
98
+ address?: IAppointmentAddress;
99
+ procedures?: IAppointmentProcedure[];
100
+ patient: IAppointmentPatient;
101
+ professional?: IAppointmentProfessional;
102
+ insurance?: IAppointmentInsurance;
103
+ payment?: IAppointmentPayment;
104
104
 
105
105
  // Propriedades para controle de rascunho
106
106
  isDraft: boolean;
@@ -87,6 +87,16 @@ export declare const AppointmentTypeEnum: {
87
87
  readonly Meeting: "meeting";
88
88
  };
89
89
  export type AppointmentType = (typeof AppointmentTypeEnum)[keyof typeof AppointmentTypeEnum];
90
+ export interface IAppointmentStatus extends IFireDoc {
91
+ name: string;
92
+ order: number;
93
+ base_type: AppointmentStatusType;
94
+ }
95
+ export interface IAppointmentType extends IFireDoc {
96
+ name: string;
97
+ order: number;
98
+ base_type: AppointmentType;
99
+ }
90
100
  export interface IMedication {
91
101
  name: string;
92
102
  dosage?: string | null;
@@ -108,16 +118,6 @@ export declare enum IAllergyKind {
108
118
  Insect = "Insect",
109
119
  Other = "Other"
110
120
  }
111
- export interface IAppointmentStatus extends IFireDoc {
112
- name: string;
113
- order: number;
114
- base_type: AppointmentStatusType;
115
- }
116
- export interface IAppointmentType extends IFireDoc {
117
- name: string;
118
- order: number;
119
- base_type: AppointmentType;
120
- }
121
121
  export interface IAllergy extends IFireDoc {
122
122
  name: string;
123
123
  order: number;
@@ -130,6 +130,18 @@ export const AppointmentTypeEnum = {
130
130
  export type AppointmentType =
131
131
  (typeof AppointmentTypeEnum)[keyof typeof AppointmentTypeEnum];
132
132
 
133
+ export interface IAppointmentStatus extends IFireDoc {
134
+ name: string;
135
+ order: number;
136
+ base_type: AppointmentStatusType;
137
+ }
138
+
139
+ export interface IAppointmentType extends IFireDoc {
140
+ name: string;
141
+ order: number;
142
+ base_type: AppointmentType;
143
+ }
144
+
133
145
  export interface IMedication {
134
146
  name: string;
135
147
  dosage?: string | null;
@@ -154,18 +166,6 @@ export enum IAllergyKind {
154
166
  Other = "Other",
155
167
  }
156
168
 
157
- export interface IAppointmentStatus extends IFireDoc {
158
- name: string;
159
- order: number;
160
- base_type: AppointmentStatusType;
161
- }
162
-
163
- export interface IAppointmentType extends IFireDoc {
164
- name: string;
165
- order: number;
166
- base_type: AppointmentType;
167
- }
168
-
169
169
  export interface IAllergy extends IFireDoc {
170
170
  name: string;
171
171
  order: number;
@@ -15,6 +15,7 @@ export declare const PATIENT_SOURCES_COLLECTION = "patient_sources";
15
15
  export declare const APPOINTMENTS = "appointments";
16
16
  export declare const APPOINTMENT_SOURCES_COLLECTION = "appointment_sources";
17
17
  export declare const APPOINTMENT_STATUSES_COLLECTION = "appointment_statuses";
18
+ export declare const APPOINTMENT_TYPES_COLLECTION = "appointment_types";
18
19
  export declare const APPOINTMENT_REQUEST_TYPES_COLLECTION = "appointment_request_types";
19
20
  export declare const DISEASES = "diseases";
20
21
  export declare const ALLERGIES_COLLECTION = "allergies";
@@ -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.APPOINTMENT_REQUEST_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.SPECIALTIES_COLLECTION = exports.SPECIALTIES_TYPES_COLLECTION = exports.SPECIALTIES = exports.DICS_COLLECTION = exports.CALENDARS_COLLECTION = exports.PROCEDURES_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.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.SPECIALTIES_COLLECTION = exports.SPECIALTIES_TYPES_COLLECTION = exports.SPECIALTIES = exports.DICS_COLLECTION = exports.CALENDARS_COLLECTION = exports.PROCEDURES_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
@@ -24,6 +24,7 @@ exports.PATIENT_SOURCES_COLLECTION = "patient_sources";
24
24
  exports.APPOINTMENTS = "appointments";
25
25
  exports.APPOINTMENT_SOURCES_COLLECTION = "appointment_sources";
26
26
  exports.APPOINTMENT_STATUSES_COLLECTION = "appointment_statuses";
27
+ exports.APPOINTMENT_TYPES_COLLECTION = "appointment_types";
27
28
  exports.APPOINTMENT_REQUEST_TYPES_COLLECTION = "appointment_request_types";
28
29
  exports.DISEASES = "diseases";
29
30
  exports.ALLERGIES_COLLECTION = "allergies";
@@ -27,6 +27,7 @@ export const PATIENT_SOURCES_COLLECTION = "patient_sources";
27
27
  export const APPOINTMENTS = "appointments";
28
28
  export const APPOINTMENT_SOURCES_COLLECTION = "appointment_sources";
29
29
  export const APPOINTMENT_STATUSES_COLLECTION = "appointment_statuses";
30
+ export const APPOINTMENT_TYPES_COLLECTION = "appointment_types";
30
31
  export const APPOINTMENT_REQUEST_TYPES_COLLECTION = "appointment_request_types";
31
32
 
32
33
  export const DISEASES = "diseases";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "evo360-types",
3
- "version": "1.3.63",
3
+ "version": "1.3.66",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",