@integraciones_doc24/sdk 1.15.13 → 1.15.15
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/baseSdk/index.js +26 -0
- package/lib/index.d.ts +19 -0
- package/lib/schemas.d.ts +68 -0
- package/lib/schemas.js +22 -0
- package/lib/types.d.ts +3 -0
- package/lib/userSdk/schedule.d.ts +2 -0
- package/lib/userSdk/schedule.js +2 -0
- package/package.json +1 -1
package/lib/baseSdk/index.js
CHANGED
|
@@ -70,6 +70,32 @@ 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.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
|
+
}),
|
|
73
99
|
};
|
|
74
100
|
return baseSdk;
|
|
75
101
|
};
|
package/lib/index.d.ts
CHANGED
|
@@ -80,6 +80,25 @@ 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
|
+
resume?: {
|
|
95
|
+
link: string;
|
|
96
|
+
brief: string;
|
|
97
|
+
} | undefined;
|
|
98
|
+
primer_turno?: string | undefined;
|
|
99
|
+
id: number;
|
|
100
|
+
fullName: string;
|
|
101
|
+
}>;
|
|
83
102
|
getAvailableScheduleClinics: () => Promise<{
|
|
84
103
|
specialties: {
|
|
85
104
|
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;
|
|
@@ -828,6 +853,49 @@ export declare const doc24Schemas: {
|
|
|
828
853
|
brief: string;
|
|
829
854
|
};
|
|
830
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
|
+
}>;
|
|
831
899
|
appointment: import("zod").ZodObject<{
|
|
832
900
|
id: import("zod").ZodNumber;
|
|
833
901
|
professionalId: import("zod").ZodNumber;
|
package/lib/schemas.js
CHANGED
|
@@ -28,6 +28,7 @@ const scheduleAvailabilityFilter = zod_1.object({
|
|
|
28
28
|
specialtyId: zod_1.number().optional(),
|
|
29
29
|
professionalId: zod_1.number().optional(),
|
|
30
30
|
language: zod_1.string().optional(),
|
|
31
|
+
userTimeZone: zod_1.string().optional(),
|
|
31
32
|
});
|
|
32
33
|
const availableAppointment = zod_1.object({
|
|
33
34
|
id: zod_1.number().or(zod_1.string()),
|
|
@@ -322,6 +323,14 @@ exports.doc24Schemas = {
|
|
|
322
323
|
startHour: zod_1.string().optional(),
|
|
323
324
|
finishHour: zod_1.string().optional(),
|
|
324
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(),
|
|
325
334
|
}),
|
|
326
335
|
scheduleParameters: zod_1.union([
|
|
327
336
|
appointmentScheduleParameters,
|
|
@@ -389,6 +398,19 @@ exports.doc24Schemas = {
|
|
|
389
398
|
hasAvailability: zod_1.boolean().optional(),
|
|
390
399
|
status: zod_1.enum(['active', 'deactivated']).optional(),
|
|
391
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(),
|
|
413
|
+
}),
|
|
392
414
|
appointment,
|
|
393
415
|
chatroomAvailabilityFilter,
|
|
394
416
|
chatParameters,
|
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,11 +46,13 @@ 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 ProfessionalsBySpecialtyFilter = TypeOf<typeof doc24Schemas.professionalsBySpecialtyFilter>;
|
|
48
50
|
type BaseSdk = {
|
|
49
51
|
declareUser: (params: DeclareUserParams) => Promise<DeclareUserResponse>;
|
|
50
52
|
getUserId: (user: User) => Promise<number>;
|
|
51
53
|
getUserInstance: (user: User | number) => Promise<UserSdk>;
|
|
52
54
|
getProfessional: (professionalId: number) => Promise<Professional>;
|
|
55
|
+
getProfessionalsBySpecialty: (body: ProfessionalsBySpecialtyFilter) => Promise<ProfessionalsListItem>;
|
|
53
56
|
getAvailableScheduleClinics: () => Promise<AvailableScheduleClinics>;
|
|
54
57
|
enroll: (params: EnrollmentParams) => Promise<void>;
|
|
55
58
|
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;
|
package/lib/userSdk/schedule.js
CHANGED
|
@@ -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);
|