@integraciones_doc24/sdk 1.15.16 → 1.15.18

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.
@@ -70,30 +70,6 @@ const getBaseSdk = async (url, credentials) => {
70
70
  };
71
71
  return mapped;
72
72
  }),
73
- getProfessionalsBySpecialty: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.professionalsBySpecialtyFilter]), zod_1.array(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 mapProfessionalResponse = (rawItem) => {
85
- return {
86
- id: rawItem.id_profesional,
87
- fullName: rawItem.denominacion,
88
- consultation_value: rawItem.consultation_value,
89
- logoUrl: rawItem.logo,
90
- primer_turno: rawItem.primer_turno,
91
- brief: rawItem.mini_cv,
92
- degree: rawItem.degree,
93
- };
94
- };
95
- return response.data.profesionales.map((o) => mapProfessionalResponse(o));
96
- }),
97
73
  };
98
74
  return baseSdk;
99
75
  };
package/lib/index.d.ts CHANGED
@@ -80,21 +80,6 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
80
80
  brief: string;
81
81
  };
82
82
  }>;
83
- getProfessionalsBySpecialty: (body: {
84
- specialtyId?: number | null | undefined;
85
- language?: string | undefined;
86
- professionalId?: number | null | undefined;
87
- offset?: number | undefined;
88
- limit?: number | undefined;
89
- }) => Promise<{
90
- logoUrl?: string | undefined;
91
- brief?: string | undefined;
92
- consultation_value?: string | null | undefined;
93
- degree?: string | undefined;
94
- primer_turno?: string | undefined;
95
- id: number;
96
- fullName: string;
97
- }[]>;
98
83
  getAvailableScheduleClinics: () => Promise<{
99
84
  specialties: {
100
85
  id: number;
package/lib/schemas.d.ts CHANGED
@@ -313,21 +313,21 @@ export declare const doc24Schemas: {
313
313
  professionalsBySpecialtyFilter: import("zod").ZodObject<{
314
314
  professionalId: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>;
315
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>;
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
319
  }, "strip", import("zod").ZodTypeAny, {
320
320
  specialtyId?: number | null | undefined;
321
- language?: string | undefined;
321
+ language?: string | null | undefined;
322
322
  professionalId?: number | null | undefined;
323
- offset?: number | undefined;
324
- limit?: number | undefined;
323
+ offset?: number | null | undefined;
324
+ limit?: number | null | undefined;
325
325
  }, {
326
326
  specialtyId?: number | null | undefined;
327
- language?: string | undefined;
327
+ language?: string | null | undefined;
328
328
  professionalId?: number | null | undefined;
329
- offset?: number | undefined;
330
- limit?: number | undefined;
329
+ offset?: number | null | undefined;
330
+ limit?: number | null | undefined;
331
331
  }>;
332
332
  scheduleParameters: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").extendShape<{
333
333
  patientId: import("zod").ZodNumber;
package/lib/schemas.js CHANGED
@@ -328,9 +328,9 @@ exports.doc24Schemas = {
328
328
  professionalsBySpecialtyFilter: zod_1.object({
329
329
  professionalId: zod_1.number().optional().nullable(),
330
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(),
331
+ offset: zod_1.number().optional().nullable(),
332
+ limit: zod_1.number().optional().nullable(),
333
+ language: zod_1.string().optional().nullable(),
334
334
  }),
335
335
  scheduleParameters: zod_1.union([
336
336
  appointmentScheduleParameters,
package/lib/types.d.ts CHANGED
@@ -52,7 +52,6 @@ export declare namespace Doc24 {
52
52
  getUserId: (user: User) => Promise<number>;
53
53
  getUserInstance: (user: User | number) => Promise<UserSdk>;
54
54
  getProfessional: (professionalId: number) => Promise<Professional>;
55
- getProfessionalsBySpecialty: (body: ProfessionalsBySpecialtyFilter) => Promise<ProfessionalsListItem[]>;
56
55
  getAvailableScheduleClinics: () => Promise<AvailableScheduleClinics>;
57
56
  enroll: (params: EnrollmentParams) => Promise<void>;
58
57
  getCoverageInfo: (identificationValue: string) => Promise<CoverageInfo>;
@@ -72,6 +71,7 @@ export declare namespace Doc24 {
72
71
  getPatientId: (patient: Patient) => Promise<number>;
73
72
  deletePatient: (patientId: number) => Promise<void>;
74
73
  getSpecialties: (mode: SpecialtyMode, language: string) => Promise<Specialty[]>;
74
+ getProfessionalsBySpecialty: (body: ProfessionalsBySpecialtyFilter) => Promise<ProfessionalsListItem[]>;
75
75
  getScheduleDates: (patientId: number, filter?: ScheduleAvailabilityFilter) => Promise<Date[]>;
76
76
  getSchedule: (patientId: number, specialtyId: number, filter?: ScheduleFilter) => Promise<AvailableAppointment[]>;
77
77
  getAppointment: (appointmentId: number) => Promise<Appointment>;
@@ -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 | 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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integraciones_doc24/sdk",
3
- "version": "1.15.16",
3
+ "version": "1.15.18",
4
4
  "publishConfig": {
5
5
  "tag": "latest"
6
6
  },