@integraciones_doc24/sdk 1.16.1 → 1.16.3

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,7 +42,9 @@ const getBaseSdk = async (url, credentials) => {
42
42
  link: raw.resume_link,
43
43
  brief: raw.resume_brief,
44
44
  },
45
- consultation_value: raw.consultation_value
45
+ consultation_value: raw.consultation_value,
46
+ hasAvailability: raw.hasAvailability,
47
+ status: raw.status,
46
48
  };
47
49
  }),
48
50
  getAvailableScheduleClinics: validation_1.validateFunction(zod_1.tuple([]), schemas_1.doc24Schemas.availableScheduleClinics, async () => {
package/lib/index.d.ts CHANGED
@@ -55,7 +55,9 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
55
55
  }) => Promise<Doc24.UserSdk>;
56
56
  getProfessional: (professionalId: number) => Promise<{
57
57
  gender?: "m" | "f" | "o" | undefined;
58
+ status?: "active" | "deactivated" | undefined;
58
59
  consultation_value?: string | null | undefined;
60
+ hasAvailability?: boolean | undefined;
59
61
  firstName: string;
60
62
  lastName: string;
61
63
  birthdate: Date;
package/lib/schemas.d.ts CHANGED
@@ -106,14 +106,17 @@ export declare const doc24Schemas: {
106
106
  specialtyId: import("zod").ZodOptional<import("zod").ZodNumber>;
107
107
  professionalId: import("zod").ZodOptional<import("zod").ZodNumber>;
108
108
  language: import("zod").ZodOptional<import("zod").ZodString>;
109
+ userTimeZone: import("zod").ZodOptional<import("zod").ZodString>;
109
110
  }, "strip", import("zod").ZodTypeAny, {
110
111
  specialtyId?: number | undefined;
111
112
  language?: string | undefined;
112
113
  professionalId?: number | undefined;
114
+ userTimeZone?: string | undefined;
113
115
  }, {
114
116
  specialtyId?: number | undefined;
115
117
  language?: string | undefined;
116
118
  professionalId?: number | undefined;
119
+ userTimeZone?: string | undefined;
117
120
  }>;
118
121
  availableAppointment: import("zod").ZodObject<{
119
122
  id: import("zod").ZodUnion<[import("zod").ZodNumber, import("zod").ZodString]>;
@@ -285,10 +288,12 @@ export declare const doc24Schemas: {
285
288
  startHour: import("zod").ZodOptional<import("zod").ZodString>;
286
289
  finishHour: import("zod").ZodOptional<import("zod").ZodString>;
287
290
  language: import("zod").ZodOptional<import("zod").ZodString>;
291
+ userTimeZone: import("zod").ZodOptional<import("zod").ZodString>;
288
292
  }, "strip", import("zod").ZodTypeAny, {
289
293
  date?: Date | undefined;
290
294
  language?: string | undefined;
291
295
  professionalId?: number | undefined;
296
+ userTimeZone?: string | undefined;
292
297
  offset?: number | undefined;
293
298
  limit?: number | undefined;
294
299
  weekDay?: number | undefined;
@@ -298,12 +303,32 @@ export declare const doc24Schemas: {
298
303
  date?: Date | undefined;
299
304
  language?: string | undefined;
300
305
  professionalId?: number | undefined;
306
+ userTimeZone?: string | undefined;
301
307
  offset?: number | undefined;
302
308
  limit?: number | undefined;
303
309
  weekDay?: number | undefined;
304
310
  startHour?: string | undefined;
305
311
  finishHour?: string | undefined;
306
312
  }>;
313
+ professionalsBySpecialtyFilter: import("zod").ZodObject<{
314
+ professionalId: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>;
315
+ specialtyId: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>;
316
+ offset: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>;
317
+ limit: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>;
318
+ language: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
319
+ }, "strip", import("zod").ZodTypeAny, {
320
+ specialtyId?: number | null | undefined;
321
+ language?: string | null | undefined;
322
+ professionalId?: number | null | undefined;
323
+ offset?: number | null | undefined;
324
+ limit?: number | null | undefined;
325
+ }, {
326
+ specialtyId?: number | null | undefined;
327
+ language?: string | null | undefined;
328
+ professionalId?: number | null | undefined;
329
+ offset?: number | null | undefined;
330
+ limit?: number | null | undefined;
331
+ }>;
307
332
  scheduleParameters: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").extendShape<{
308
333
  patientId: import("zod").ZodNumber;
309
334
  specialtyId: import("zod").ZodNumber;
@@ -392,6 +417,7 @@ export declare const doc24Schemas: {
392
417
  }>>;
393
418
  paymentStatus: import("zod").ZodOptional<import("zod").ZodString>;
394
419
  atentionId: import("zod").ZodOptional<import("zod").ZodNumber>;
420
+ waitingTime: import("zod").ZodOptional<import("zod").ZodString>;
395
421
  }, "strip", import("zod").ZodTypeAny, {
396
422
  appointment?: {
397
423
  date: Date;
@@ -403,6 +429,7 @@ export declare const doc24Schemas: {
403
429
  } | undefined;
404
430
  paymentStatus?: string | undefined;
405
431
  atentionId?: number | undefined;
432
+ waitingTime?: string | undefined;
406
433
  id: number | null;
407
434
  patientId: number;
408
435
  creationDate: Date;
@@ -423,6 +450,7 @@ export declare const doc24Schemas: {
423
450
  } | undefined;
424
451
  paymentStatus?: string | undefined;
425
452
  atentionId?: number | undefined;
453
+ waitingTime?: string | undefined;
426
454
  id: number | null;
427
455
  patientId: number;
428
456
  creationDate: Date;
@@ -473,6 +501,7 @@ export declare const doc24Schemas: {
473
501
  }>>;
474
502
  paymentStatus: import("zod").ZodOptional<import("zod").ZodString>;
475
503
  atentionId: import("zod").ZodOptional<import("zod").ZodNumber>;
504
+ waitingTime: import("zod").ZodOptional<import("zod").ZodString>;
476
505
  }, {
477
506
  specialty: import("zod").ZodString;
478
507
  professional: import("zod").ZodString;
@@ -487,6 +516,7 @@ export declare const doc24Schemas: {
487
516
  } | undefined;
488
517
  paymentStatus?: string | undefined;
489
518
  atentionId?: number | undefined;
519
+ waitingTime?: string | undefined;
490
520
  id: number | null;
491
521
  patientId: number;
492
522
  professional: string;
@@ -509,6 +539,7 @@ export declare const doc24Schemas: {
509
539
  } | undefined;
510
540
  paymentStatus?: string | undefined;
511
541
  atentionId?: number | undefined;
542
+ waitingTime?: string | undefined;
512
543
  id: number | null;
513
544
  patientId: number;
514
545
  professional: string;
@@ -767,9 +798,13 @@ export declare const doc24Schemas: {
767
798
  brief: string;
768
799
  }>;
769
800
  consultation_value: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>>;
801
+ hasAvailability: import("zod").ZodOptional<import("zod").ZodBoolean>;
802
+ status: import("zod").ZodOptional<import("zod").ZodEnum<["active", "deactivated"]>>;
770
803
  }, "strip", import("zod").ZodTypeAny, {
771
804
  gender?: "m" | "f" | "o" | undefined;
805
+ status?: "active" | "deactivated" | undefined;
772
806
  consultation_value?: string | null | undefined;
807
+ hasAvailability?: boolean | undefined;
773
808
  firstName: string;
774
809
  lastName: string;
775
810
  birthdate: Date;
@@ -793,7 +828,9 @@ export declare const doc24Schemas: {
793
828
  };
794
829
  }, {
795
830
  gender?: "m" | "f" | "o" | undefined;
831
+ status?: "active" | "deactivated" | undefined;
796
832
  consultation_value?: string | null | undefined;
833
+ hasAvailability?: boolean | undefined;
797
834
  firstName: string;
798
835
  lastName: string;
799
836
  birthdate: Date;
@@ -816,6 +853,31 @@ export declare const doc24Schemas: {
816
853
  brief: string;
817
854
  };
818
855
  }>;
856
+ professionalsListItem: import("zod").ZodObject<{
857
+ id: import("zod").ZodNumber;
858
+ fullName: import("zod").ZodString;
859
+ consultation_value: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodNumber, import("zod").ZodString]>>>>;
860
+ logoUrl: import("zod").ZodOptional<import("zod").ZodString>;
861
+ primer_turno: import("zod").ZodOptional<import("zod").ZodString>;
862
+ degree: import("zod").ZodOptional<import("zod").ZodString>;
863
+ brief: import("zod").ZodOptional<import("zod").ZodString>;
864
+ }, "strip", import("zod").ZodTypeAny, {
865
+ logoUrl?: string | undefined;
866
+ brief?: string | undefined;
867
+ consultation_value?: string | number | null | undefined;
868
+ degree?: string | undefined;
869
+ primer_turno?: string | undefined;
870
+ id: number;
871
+ fullName: string;
872
+ }, {
873
+ logoUrl?: string | undefined;
874
+ brief?: string | undefined;
875
+ consultation_value?: string | number | null | undefined;
876
+ degree?: string | undefined;
877
+ primer_turno?: string | undefined;
878
+ id: number;
879
+ fullName: string;
880
+ }>;
819
881
  appointment: import("zod").ZodObject<{
820
882
  id: import("zod").ZodNumber;
821
883
  professionalId: import("zod").ZodNumber;
@@ -1739,6 +1801,45 @@ export declare const doc24Schemas: {
1739
1801
  professionalName: string;
1740
1802
  modality: string;
1741
1803
  }>;
1804
+ binahWellnessResponse: import("zod").ZodObject<{
1805
+ data: import("zod").ZodObject<{
1806
+ info: import("zod").ZodObject<{
1807
+ link: import("zod").ZodString;
1808
+ }, "strip", import("zod").ZodTypeAny, {
1809
+ link: string;
1810
+ }, {
1811
+ link: string;
1812
+ }>;
1813
+ timestamp: import("zod").ZodString;
1814
+ }, "strip", import("zod").ZodTypeAny, {
1815
+ info: {
1816
+ link: string;
1817
+ };
1818
+ timestamp: string;
1819
+ }, {
1820
+ info: {
1821
+ link: string;
1822
+ };
1823
+ timestamp: string;
1824
+ }>;
1825
+ signature: import("zod").ZodString;
1826
+ }, "strip", import("zod").ZodTypeAny, {
1827
+ data: {
1828
+ info: {
1829
+ link: string;
1830
+ };
1831
+ timestamp: string;
1832
+ };
1833
+ signature: string;
1834
+ }, {
1835
+ data: {
1836
+ info: {
1837
+ link: string;
1838
+ };
1839
+ timestamp: string;
1840
+ };
1841
+ signature: string;
1842
+ }>;
1742
1843
  emailOrPhone: import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodObject<{
1743
1844
  email: import("zod").ZodString;
1744
1845
  phone: import("zod").ZodString;
package/lib/schemas.js CHANGED
@@ -15,7 +15,10 @@ const basePersonData = zod_1.object({
15
15
  gender,
16
16
  });
17
17
  const patient = basePersonData;
18
- const user = basePersonData.extend({ phone: zod_1.string().optional(), email: zod_1.string() });
18
+ const user = basePersonData.extend({
19
+ phone: zod_1.string().optional(),
20
+ email: zod_1.string(),
21
+ });
19
22
  const specialtyMode = zod_1.enum(['appointment', 'chat', 'instant']);
20
23
  const specialty = zod_1.object({
21
24
  id: zod_1.number(),
@@ -25,6 +28,7 @@ const scheduleAvailabilityFilter = zod_1.object({
25
28
  specialtyId: zod_1.number().optional(),
26
29
  professionalId: zod_1.number().optional(),
27
30
  language: zod_1.string().optional(),
31
+ userTimeZone: zod_1.string().optional(),
28
32
  });
29
33
  const availableAppointment = zod_1.object({
30
34
  id: zod_1.number().or(zod_1.string()),
@@ -41,7 +45,7 @@ const availableAppointment = zod_1.object({
41
45
  atentions: zod_1.number(),
42
46
  ranking: zod_1.unknown(),
43
47
  length: zod_1.number().nullish(),
44
- consultation_value: zod_1.string().optional().nullish()
48
+ consultation_value: zod_1.string().optional().nullish(),
45
49
  });
46
50
  const appointment = zod_1.object({
47
51
  id: zod_1.number(),
@@ -172,6 +176,7 @@ const videoVisit = zod_1.object({
172
176
  }).optional(),
173
177
  paymentStatus: zod_1.string().optional(),
174
178
  atentionId: zod_1.number().optional(),
179
+ waitingTime: zod_1.string().optional(),
175
180
  });
176
181
  const historicalVideoVisit = videoVisit.extend({
177
182
  specialty: zod_1.string(),
@@ -299,6 +304,15 @@ const externalAppointment = zod_1.object({
299
304
  specialty: zod_1.string(),
300
305
  modality: zod_1.string(),
301
306
  });
307
+ const binahWellnessResponse = zod_1.object({
308
+ data: zod_1.object({
309
+ info: zod_1.object({
310
+ link: zod_1.string().url(),
311
+ }),
312
+ timestamp: zod_1.string(),
313
+ }),
314
+ signature: zod_1.string(),
315
+ });
302
316
  exports.doc24Schemas = {
303
317
  sdkCredentials,
304
318
  sdkParams: zod_1.object({ url: zod_1.string(), credentials: sdkCredentials }),
@@ -318,6 +332,14 @@ exports.doc24Schemas = {
318
332
  startHour: zod_1.string().optional(),
319
333
  finishHour: zod_1.string().optional(),
320
334
  language: zod_1.string().optional(),
335
+ userTimeZone: zod_1.string().optional(),
336
+ }),
337
+ professionalsBySpecialtyFilter: zod_1.object({
338
+ professionalId: zod_1.number().optional().nullable(),
339
+ specialtyId: zod_1.number().optional().nullable(),
340
+ offset: zod_1.number().optional().nullable(),
341
+ limit: zod_1.number().optional().nullable(),
342
+ language: zod_1.string().optional().nullable(),
321
343
  }),
322
344
  scheduleParameters: zod_1.union([
323
345
  appointmentScheduleParameters,
@@ -381,7 +403,18 @@ exports.doc24Schemas = {
381
403
  link: zod_1.string(),
382
404
  brief: zod_1.string(),
383
405
  }),
384
- consultation_value: zod_1.string().optional().nullish()
406
+ consultation_value: zod_1.string().optional().nullish(),
407
+ hasAvailability: zod_1.boolean().optional(),
408
+ status: zod_1.enum(['active', 'deactivated']).optional(),
409
+ }),
410
+ professionalsListItem: zod_1.object({
411
+ id: zod_1.number(),
412
+ fullName: zod_1.string(),
413
+ consultation_value: zod_1.number().or(zod_1.string()).optional().nullish(),
414
+ logoUrl: zod_1.string().optional(),
415
+ primer_turno: zod_1.string().optional(),
416
+ degree: zod_1.string().optional(),
417
+ brief: zod_1.string().optional(),
385
418
  }),
386
419
  appointment,
387
420
  chatroomAvailabilityFilter,
@@ -415,6 +448,7 @@ exports.doc24Schemas = {
415
448
  externalResetPasswordParams,
416
449
  externalPatient,
417
450
  externalAppointment,
451
+ binahWellnessResponse,
418
452
  emailOrPhone,
419
453
  emailOrPhoneCode,
420
454
  };
package/lib/types.d.ts CHANGED
@@ -17,6 +17,7 @@ export declare namespace Doc24 {
17
17
  type ActiveVideoVisitData = TypeOf<typeof doc24Schemas.activeVideoVisitData>;
18
18
  type SpecialtyMode = TypeOf<typeof doc24Schemas.specialtyMode>;
19
19
  type Professional = TypeOf<typeof doc24Schemas.professional>;
20
+ type ProfessionalsListItem = TypeOf<typeof doc24Schemas.professionalsListItem>;
20
21
  type Appointment = TypeOf<typeof doc24Schemas.appointment>;
21
22
  type ChatroomAvailabilityFilter = TypeOf<typeof doc24Schemas.chatroomAvailabilityFilter>;
22
23
  type AvailableChatroom = TypeOf<typeof doc24Schemas.availableChatroom>;
@@ -45,6 +46,8 @@ export declare namespace Doc24 {
45
46
  type ExternalResetPasswordParams = TypeOf<typeof doc24Schemas.externalResetPasswordParams>;
46
47
  type ExternalPatient = TypeOf<typeof doc24Schemas.externalPatient>;
47
48
  type ExternalAppointment = TypeOf<typeof doc24Schemas.externalAppointment>;
49
+ type BinahWellnessResponse = TypeOf<typeof doc24Schemas.binahWellnessResponse>;
50
+ type ProfessionalsBySpecialtyFilter = TypeOf<typeof doc24Schemas.professionalsBySpecialtyFilter>;
48
51
  type BaseSdk = {
49
52
  declareUser: (params: DeclareUserParams) => Promise<DeclareUserResponse>;
50
53
  getUserId: (user: User) => Promise<number>;
@@ -69,6 +72,7 @@ export declare namespace Doc24 {
69
72
  getPatientId: (patient: Patient) => Promise<number>;
70
73
  deletePatient: (patientId: number) => Promise<void>;
71
74
  getSpecialties: (mode: SpecialtyMode, language: string) => Promise<Specialty[]>;
75
+ getProfessionalsBySpecialty: (body: ProfessionalsBySpecialtyFilter) => Promise<ProfessionalsListItem[]>;
72
76
  getScheduleDates: (patientId: number, filter?: ScheduleAvailabilityFilter) => Promise<Date[]>;
73
77
  getSchedule: (patientId: number, specialtyId: number, filter?: ScheduleFilter) => Promise<AvailableAppointment[]>;
74
78
  getAppointment: (appointmentId: number) => Promise<Appointment>;
@@ -90,7 +94,9 @@ export declare namespace Doc24 {
90
94
  getExternalAppointmentsLink: (identificationValue: string, birthdate: Date) => Promise<string | null>;
91
95
  getExternalAppointments: () => Promise<ExternalAppointment[]>;
92
96
  cancelExternalAppointment: (appointmentId: ExternalAppointment) => Promise<void>;
97
+ getPatientPHR: (patientId: number) => Promise<string>;
93
98
  userId: number;
99
+ getBinahWellnessLink: (patientId: number) => Promise<BinahWellnessResponse>;
94
100
  };
95
101
  namespace Webhook {
96
102
  type StatusChangeEventStatus = 'S' | 'C' | 'F' | 'A' | 'D' | 'L';
@@ -0,0 +1,12 @@
1
+ import { RequestMaker } from '../request';
2
+ export declare const getBinahWellnessMethods: (makeRequest: RequestMaker) => {
3
+ getBinahWellnessLink: (patientId: number) => Promise<{
4
+ data: {
5
+ info: {
6
+ link: string;
7
+ };
8
+ timestamp: string;
9
+ };
10
+ signature: string;
11
+ }>;
12
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getBinahWellnessMethods = void 0;
4
+ const zod_1 = require("zod");
5
+ const validation_1 = require("../request/validation");
6
+ const schemas_1 = require("../schemas");
7
+ const getBinahWellnessMethods = (makeRequest) => {
8
+ const getBinahWellnessLink = async (patientId) => {
9
+ const path = `/wellness-test`;
10
+ const response = await makeRequest('POST', path, { patient_id: patientId });
11
+ return response;
12
+ };
13
+ return {
14
+ getBinahWellnessLink: validation_1.validateFunction(zod_1.tuple([zod_1.number()]), schemas_1.doc24Schemas.binahWellnessResponse, getBinahWellnessLink),
15
+ };
16
+ };
17
+ exports.getBinahWellnessMethods = getBinahWellnessMethods;
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.userSdk = void 0;
4
4
  const request_1 = require("../request");
5
+ const binah_1 = require("./binah");
5
6
  const chat_1 = require("./chat");
6
7
  const external_1 = require("./external");
7
8
  const patients_1 = require("./patients");
@@ -16,6 +17,7 @@ const userSdk = async (url, credentials, userId) => {
16
17
  const videoVisitMethods = videoVisit_1.getVideoVisitMethods(makeRequest);
17
18
  const chatMethods = chat_1.getChatMethods(makeRequest);
18
19
  const externalMethods = external_1.getExternalMethods(makeRequest);
20
+ const binahWellnessMethods = binah_1.getBinahWellnessMethods(makeRequest);
19
21
  const sdk = {
20
22
  ...patientMethods,
21
23
  ...specialtyMethods,
@@ -23,6 +25,7 @@ const userSdk = async (url, credentials, userId) => {
23
25
  ...videoVisitMethods,
24
26
  ...chatMethods,
25
27
  ...externalMethods,
28
+ ...binahWellnessMethods,
26
29
  userId,
27
30
  };
28
31
  return sdk;
@@ -35,4 +35,5 @@ export declare const getPatientMethods: (makeRequest: RequestMaker) => {
35
35
  birthdate: Date;
36
36
  }) => Promise<number>;
37
37
  deletePatient: (patientId: number) => Promise<void>;
38
+ getPatientPHR: (patientId: number) => Promise<string>;
38
39
  };
@@ -58,10 +58,16 @@ const getPatientMethods = (makeRequest) => {
58
58
  const path = `/patient/${patientId}`;
59
59
  await makeRequest('DELETE', path);
60
60
  };
61
+ const getPatientPHR = async (patientId) => {
62
+ const path = `/view-phr/${patientId}`;
63
+ const response = await makeRequest('GET', path);
64
+ return response.data.url_acceso_paciente;
65
+ };
61
66
  return {
62
67
  declarePatient: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.declarePatientParams]), schemas_1.doc24Schemas.declarePatientResponse, declarePatient),
63
68
  getPatientId: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.patient]), zod_1.number(), getPatientId),
64
69
  deletePatient: validation_1.validateFunction(zod_1.tuple([zod_1.number()]), zod_1.void(), deletePatient),
70
+ getPatientPHR: validation_1.validateFunction(zod_1.tuple([zod_1.number()]), zod_1.string(), getPatientPHR),
65
71
  };
66
72
  };
67
73
  exports.getPatientMethods = getPatientMethods;
@@ -4,6 +4,7 @@ export declare const getScheduleMethods: (makeRequest: RequestMaker) => {
4
4
  date?: Date | undefined;
5
5
  language?: string | undefined;
6
6
  professionalId?: number | undefined;
7
+ userTimeZone?: string | undefined;
7
8
  offset?: number | undefined;
8
9
  limit?: number | undefined;
9
10
  weekDay?: number | undefined;
@@ -33,6 +34,7 @@ export declare const getScheduleMethods: (makeRequest: RequestMaker) => {
33
34
  specialtyId?: number | undefined;
34
35
  language?: string | undefined;
35
36
  professionalId?: number | undefined;
37
+ userTimeZone?: string | undefined;
36
38
  } | undefined) => Promise<Date[]>;
37
39
  getAppointment: (appointmentId: number) => Promise<{
38
40
  date: Date;
@@ -13,6 +13,7 @@ const getScheduleMethods = (makeRequest) => {
13
13
  specialty_id: filter.specialtyId,
14
14
  professional_id: filter.professionalId,
15
15
  language: (_a = filter.language) !== null && _a !== void 0 ? _a : 'ES',
16
+ user_time_zone: filter.userTimeZone,
16
17
  };
17
18
  const path = `/schedule/dates/${patientId}/${JSON.stringify(mappedFilter)}`;
18
19
  const response = await makeRequest('GET', path);
@@ -29,6 +30,7 @@ const getScheduleMethods = (makeRequest) => {
29
30
  start_hour: filter.startHour,
30
31
  finish_hour: filter.finishHour,
31
32
  language: (_a = filter.language) !== null && _a !== void 0 ? _a : 'ES',
33
+ user_time_zone: filter.userTimeZone,
32
34
  };
33
35
  const path = `/schedule/availability/${patientId}/${specialtyId}/${JSON.stringify(mappedFilter)}`;
34
36
  const response = await makeRequest('GET', path);
@@ -4,4 +4,13 @@ export declare const getSpecialtiesMethods: (makeRequest: RequestMaker) => {
4
4
  id: number;
5
5
  description: string;
6
6
  }[]>;
7
+ getProfessionalsBySpecialty: (...params: any) => Promise<{
8
+ logoUrl?: string | undefined;
9
+ brief?: string | undefined;
10
+ consultation_value?: string | number | null | undefined;
11
+ degree?: string | undefined;
12
+ primer_turno?: string | undefined;
13
+ id: number;
14
+ fullName: string;
15
+ }[]>;
7
16
  };
@@ -14,6 +14,32 @@ const getSpecialtiesMethods = (makeRequest) => {
14
14
  description: s.specialty,
15
15
  }));
16
16
  });
17
- return { getSpecialties };
17
+ return {
18
+ getSpecialties,
19
+ getProfessionalsBySpecialty: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.professionalsBySpecialtyFilter]), zod_1.array(schemas_1.doc24Schemas.professionalsListItem), async (body = {}) => {
20
+ var _a;
21
+ const mappedBody = {
22
+ specialty_id: body.specialtyId,
23
+ professional_id: body.professionalId,
24
+ offset: body.offset,
25
+ limit: body.limit,
26
+ language: (_a = body.language) !== null && _a !== void 0 ? _a : 'ES',
27
+ };
28
+ const path = `/professionals-by-specialty`;
29
+ const response = await makeRequest('POST', path, mappedBody);
30
+ const mapProfessionalResponse = (rawItem) => {
31
+ return {
32
+ id: rawItem.id_profesional,
33
+ fullName: rawItem.denominacion,
34
+ consultation_value: rawItem.consultation_value,
35
+ logoUrl: rawItem.logo,
36
+ primer_turno: rawItem.primer_turno,
37
+ brief: rawItem.mini_cv,
38
+ degree: rawItem.degree,
39
+ };
40
+ };
41
+ return response.data.profesionales.map((o) => mapProfessionalResponse(o));
42
+ }),
43
+ };
18
44
  };
19
45
  exports.getSpecialtiesMethods = getSpecialtiesMethods;
@@ -28,6 +28,7 @@ export declare const getVideoVisitMethods: (makeRequest: RequestMaker) => {
28
28
  } | undefined;
29
29
  paymentStatus?: string | undefined;
30
30
  atentionId?: number | undefined;
31
+ waitingTime?: string | undefined;
31
32
  id: number | null;
32
33
  patientId: number;
33
34
  creationDate: Date;
@@ -49,6 +50,7 @@ export declare const getVideoVisitMethods: (makeRequest: RequestMaker) => {
49
50
  } | undefined;
50
51
  paymentStatus?: string | undefined;
51
52
  atentionId?: number | undefined;
53
+ waitingTime?: string | undefined;
52
54
  id: number | null;
53
55
  patientId: number;
54
56
  professional: string;
@@ -125,7 +125,7 @@ const getVideoVisitMethods = (makeRequest) => {
125
125
  };
126
126
  exports.getVideoVisitMethods = getVideoVisitMethods;
127
127
  const mapVideoVisit = (raw) => {
128
- var _a, _b;
128
+ var _a, _b, _c;
129
129
  return {
130
130
  id: raw.vc_id,
131
131
  creationDate: utils_1.parseDateTime(raw.creation_date),
@@ -143,6 +143,7 @@ const mapVideoVisit = (raw) => {
143
143
  : undefined,
144
144
  paymentStatus: (_a = raw.payment_status) !== null && _a !== void 0 ? _a : undefined,
145
145
  atentionId: (_b = raw.atentionId) !== null && _b !== void 0 ? _b : undefined,
146
+ waitingTime: (_c = raw.waiting_time) !== null && _c !== void 0 ? _c : undefined,
146
147
  };
147
148
  };
148
149
  const mapHistoricalVideoVisit = (raw) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integraciones_doc24/sdk",
3
- "version": "1.16.1",
3
+ "version": "1.16.3",
4
4
  "publishConfig": {
5
5
  "tag": "latest"
6
6
  },