evo360-types 1.3.63 → 1.3.65

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.
@@ -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(),
@@ -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.65",
4
4
  "description": "HREVO360 Shared Types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",