@integraciones_doc24/sdk 1.15.7 → 1.15.8

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/lib/types.d.ts CHANGED
@@ -69,7 +69,10 @@ export declare namespace Doc24 {
69
69
  getPatientId: (patient: Patient) => Promise<number>;
70
70
  deletePatient: (patientId: number) => Promise<void>;
71
71
  getSpecialties: (mode: SpecialtyMode, language: string) => Promise<Specialty[]>;
72
- getScheduleDates: (patientId: number, filter?: ScheduleAvailabilityFilter) => Promise<Date[]>;
72
+ getScheduleDates: (patientId: number, filter?: ScheduleAvailabilityFilter) => Promise<{
73
+ appointmentDate: Date;
74
+ consultation_value?: number | null;
75
+ }[]>;
73
76
  getSchedule: (patientId: number, specialtyId: number, filter?: ScheduleFilter) => Promise<AvailableAppointment[]>;
74
77
  getAppointment: (appointmentId: number) => Promise<Appointment>;
75
78
  getAppointmentByVcToken: (vcToken: string) => Promise<Appointment>;
@@ -32,7 +32,10 @@ export declare const getScheduleMethods: (makeRequest: RequestMaker) => {
32
32
  specialtyId?: number | undefined;
33
33
  language?: string | undefined;
34
34
  professionalId?: number | undefined;
35
- } | undefined) => Promise<Date[]>;
35
+ } | undefined) => Promise<{
36
+ appointmentDate: Date;
37
+ consultation_value?: number | null | undefined;
38
+ }[]>;
36
39
  getAppointment: (appointmentId: number) => Promise<{
37
40
  date: Date;
38
41
  id: number;
@@ -16,7 +16,12 @@ const getScheduleMethods = (makeRequest) => {
16
16
  };
17
17
  const path = `/schedule/dates/${patientId}/${JSON.stringify(mappedFilter)}`;
18
18
  const response = await makeRequest('GET', path);
19
- return response.data.available_dates.map((o) => utils_1.parseDate(o.date, o.time_zone));
19
+ return response.data.available_dates.map((o) => {
20
+ return {
21
+ appointmentDate: utils_1.parseDate(o.date, o.time_zone),
22
+ consultation_value: o.consultation_value
23
+ };
24
+ });
20
25
  };
21
26
  const getSchedule = async (patientId, specialtyId, filter = {}) => {
22
27
  var _a;
@@ -72,7 +77,7 @@ const getScheduleMethods = (makeRequest) => {
72
77
  };
73
78
  return {
74
79
  getSchedule: validation_1.validateFunction(zod_1.tuple([zod_1.number(), zod_1.number(), schemas_1.doc24Schemas.scheduleFilter.optional()]), zod_1.array(schemas_1.doc24Schemas.availableAppointment), getSchedule),
75
- getScheduleDates: validation_1.validateFunction(zod_1.tuple([zod_1.number(), schemas_1.doc24Schemas.scheduleAvailabilityFilter]), zod_1.array(zod_1.date()), getScheduleDates),
80
+ getScheduleDates: validation_1.validateFunction(zod_1.tuple([zod_1.number(), schemas_1.doc24Schemas.scheduleAvailabilityFilter]), zod_1.array(zod_1.object({ appointmentDate: zod_1.date(), consultation_value: zod_1.number().optional().nullish() })), getScheduleDates),
76
81
  getAppointment: validation_1.validateFunction(zod_1.tuple([zod_1.number()]), schemas_1.doc24Schemas.appointment, getAppointment),
77
82
  getAppointmentByVcToken: validation_1.validateFunction(zod_1.tuple([zod_1.string()]), schemas_1.doc24Schemas.appointment, getAppointmentByVcToken),
78
83
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integraciones_doc24/sdk",
3
- "version": "1.15.7",
3
+ "version": "1.15.8",
4
4
  "publishConfig": {
5
5
  "tag": "latest"
6
6
  },