@integraciones_doc24/sdk 1.15.12 → 1.15.14

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 () => {
@@ -68,6 +70,32 @@ const getBaseSdk = async (url, credentials) => {
68
70
  };
69
71
  return mapped;
70
72
  }),
73
+ getProfessionalsBySpecialty: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.professionalsBySpecialtyFilter.optional()]), schemas_1.doc24Schemas.professionalsListItem, async (body = {}) => {
74
+ var _a;
75
+ const mappedBody = {
76
+ specialty_id: body.specialtyId,
77
+ professional_id: body.professionalId,
78
+ offset: body.offset,
79
+ limit: body.limit,
80
+ language: (_a = body.language) !== null && _a !== void 0 ? _a : 'ES',
81
+ };
82
+ const path = `/professionals-by-specialty`;
83
+ const response = await makeRequest('POST', path, mappedBody);
84
+ const raw = response.data;
85
+ return {
86
+ id: raw.professional_id,
87
+ fullName: raw.denominacion,
88
+ consultation_value: raw.consultation_value,
89
+ logoUrl: raw.logo,
90
+ primer_turno: raw.primer_turno,
91
+ resume: {
92
+ link: raw.resume_link,
93
+ brief: raw.resume_brief,
94
+ },
95
+ brief: raw.mini_cv,
96
+ degree: raw.degree,
97
+ };
98
+ }),
71
99
  };
72
100
  return baseSdk;
73
101
  };
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;
@@ -78,6 +80,19 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
78
80
  brief: string;
79
81
  };
80
82
  }>;
83
+ getProfessionalsBySpecialty: () => Promise<{
84
+ logoUrl?: string | undefined;
85
+ brief?: string | undefined;
86
+ consultation_value?: string | null | undefined;
87
+ degree?: string | undefined;
88
+ resume?: {
89
+ link: string;
90
+ brief: string;
91
+ } | undefined;
92
+ primer_turno?: string | undefined;
93
+ id: number;
94
+ fullName: string;
95
+ }>;
81
96
  getAvailableScheduleClinics: () => Promise<{
82
97
  specialties: {
83
98
  id: number;
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").ZodOptional<import("zod").ZodNumber>;
317
+ limit: import("zod").ZodOptional<import("zod").ZodNumber>;
318
+ language: import("zod").ZodOptional<import("zod").ZodString>;
319
+ }, "strip", import("zod").ZodTypeAny, {
320
+ specialtyId?: number | null | undefined;
321
+ language?: string | undefined;
322
+ professionalId?: number | null | undefined;
323
+ offset?: number | undefined;
324
+ limit?: number | undefined;
325
+ }, {
326
+ specialtyId?: number | null | undefined;
327
+ language?: string | undefined;
328
+ professionalId?: number | null | undefined;
329
+ offset?: number | undefined;
330
+ limit?: number | 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;
@@ -773,9 +798,13 @@ export declare const doc24Schemas: {
773
798
  brief: string;
774
799
  }>;
775
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"]>>;
776
803
  }, "strip", import("zod").ZodTypeAny, {
777
804
  gender?: "m" | "f" | "o" | undefined;
805
+ status?: "active" | "deactivated" | undefined;
778
806
  consultation_value?: string | null | undefined;
807
+ hasAvailability?: boolean | undefined;
779
808
  firstName: string;
780
809
  lastName: string;
781
810
  birthdate: Date;
@@ -799,7 +828,9 @@ export declare const doc24Schemas: {
799
828
  };
800
829
  }, {
801
830
  gender?: "m" | "f" | "o" | undefined;
831
+ status?: "active" | "deactivated" | undefined;
802
832
  consultation_value?: string | null | undefined;
833
+ hasAvailability?: boolean | undefined;
803
834
  firstName: string;
804
835
  lastName: string;
805
836
  birthdate: Date;
@@ -822,6 +853,49 @@ export declare const doc24Schemas: {
822
853
  brief: string;
823
854
  };
824
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").ZodString>>>;
860
+ logoUrl: import("zod").ZodOptional<import("zod").ZodString>;
861
+ primer_turno: import("zod").ZodOptional<import("zod").ZodString>;
862
+ resume: import("zod").ZodOptional<import("zod").ZodObject<{
863
+ link: import("zod").ZodString;
864
+ brief: import("zod").ZodString;
865
+ }, "strip", import("zod").ZodTypeAny, {
866
+ link: string;
867
+ brief: string;
868
+ }, {
869
+ link: string;
870
+ brief: string;
871
+ }>>;
872
+ degree: import("zod").ZodOptional<import("zod").ZodString>;
873
+ brief: import("zod").ZodOptional<import("zod").ZodString>;
874
+ }, "strip", import("zod").ZodTypeAny, {
875
+ logoUrl?: string | undefined;
876
+ brief?: string | undefined;
877
+ consultation_value?: string | null | undefined;
878
+ degree?: string | undefined;
879
+ resume?: {
880
+ link: string;
881
+ brief: string;
882
+ } | undefined;
883
+ primer_turno?: string | undefined;
884
+ id: number;
885
+ fullName: string;
886
+ }, {
887
+ logoUrl?: string | undefined;
888
+ brief?: string | undefined;
889
+ consultation_value?: string | null | undefined;
890
+ degree?: string | undefined;
891
+ resume?: {
892
+ link: string;
893
+ brief: string;
894
+ } | undefined;
895
+ primer_turno?: string | undefined;
896
+ id: number;
897
+ fullName: string;
898
+ }>;
825
899
  appointment: import("zod").ZodObject<{
826
900
  id: import("zod").ZodNumber;
827
901
  professionalId: import("zod").ZodNumber;
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(),
@@ -319,6 +323,14 @@ exports.doc24Schemas = {
319
323
  startHour: zod_1.string().optional(),
320
324
  finishHour: zod_1.string().optional(),
321
325
  language: zod_1.string().optional(),
326
+ userTimeZone: zod_1.string().optional(),
327
+ }),
328
+ professionalsBySpecialtyFilter: zod_1.object({
329
+ professionalId: zod_1.number().optional().nullable(),
330
+ specialtyId: zod_1.number().optional().nullable(),
331
+ offset: zod_1.number().optional(),
332
+ limit: zod_1.number().optional(),
333
+ language: zod_1.string().optional(),
322
334
  }),
323
335
  scheduleParameters: zod_1.union([
324
336
  appointmentScheduleParameters,
@@ -382,7 +394,22 @@ exports.doc24Schemas = {
382
394
  link: zod_1.string(),
383
395
  brief: zod_1.string(),
384
396
  }),
385
- consultation_value: zod_1.string().optional().nullish()
397
+ consultation_value: zod_1.string().optional().nullish(),
398
+ hasAvailability: zod_1.boolean().optional(),
399
+ status: zod_1.enum(['active', 'deactivated']).optional(),
400
+ }),
401
+ professionalsListItem: zod_1.object({
402
+ id: zod_1.number(),
403
+ fullName: zod_1.string(),
404
+ consultation_value: zod_1.string().optional().nullish(),
405
+ logoUrl: zod_1.string().optional(),
406
+ primer_turno: zod_1.string().optional(),
407
+ resume: zod_1.object({
408
+ link: zod_1.string(),
409
+ brief: zod_1.string(),
410
+ }).optional(),
411
+ degree: zod_1.string().optional(),
412
+ brief: zod_1.string().optional(),
386
413
  }),
387
414
  appointment,
388
415
  chatroomAvailabilityFilter,
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>;
@@ -50,6 +51,7 @@ export declare namespace Doc24 {
50
51
  getUserId: (user: User) => Promise<number>;
51
52
  getUserInstance: (user: User | number) => Promise<UserSdk>;
52
53
  getProfessional: (professionalId: number) => Promise<Professional>;
54
+ getProfessionalsBySpecialty: () => Promise<ProfessionalsListItem>;
53
55
  getAvailableScheduleClinics: () => Promise<AvailableScheduleClinics>;
54
56
  enroll: (params: EnrollmentParams) => Promise<void>;
55
57
  getCoverageInfo: (identificationValue: string) => Promise<CoverageInfo>;
@@ -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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integraciones_doc24/sdk",
3
- "version": "1.15.12",
3
+ "version": "1.15.14",
4
4
  "publishConfig": {
5
5
  "tag": "latest"
6
6
  },