@integraciones_doc24/sdk 1.16.25 → 1.16.27
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/schemas.d.ts +36 -2
- package/lib/schemas.js +12 -0
- package/lib/types.d.ts +2 -0
- package/lib/userSdk/external.d.ts +2 -2
- package/lib/userSdk/patients.d.ts +5 -0
- package/lib/userSdk/patients.js +9 -0
- package/lib/userSdk/schedule.d.ts +6 -0
- package/lib/userSdk/schedule.js +6 -0
- package/lib/userSdk/videoVisit.d.ts +1 -0
- package/lib/userSdk/videoVisit.js +1 -0
- package/package.json +1 -1
package/lib/schemas.d.ts
CHANGED
|
@@ -211,10 +211,20 @@ export declare const doc24Schemas: {
|
|
|
211
211
|
ranking: import("zod").ZodUnknown;
|
|
212
212
|
length: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
213
213
|
consultation_value: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>>;
|
|
214
|
+
inPerson: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodBoolean>>;
|
|
215
|
+
virtual: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodBoolean>>;
|
|
216
|
+
province: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
217
|
+
city: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
218
|
+
address: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
214
219
|
}, "strip", import("zod").ZodTypeAny, {
|
|
215
220
|
length?: number | null | undefined;
|
|
216
221
|
ranking?: unknown;
|
|
217
222
|
consultation_value?: string | null | undefined;
|
|
223
|
+
inPerson?: boolean | null | undefined;
|
|
224
|
+
virtual?: boolean | null | undefined;
|
|
225
|
+
province?: string | null | undefined;
|
|
226
|
+
city?: string | null | undefined;
|
|
227
|
+
address?: string | null | undefined;
|
|
218
228
|
date: Date;
|
|
219
229
|
type: "appointment" | "chat" | "instant";
|
|
220
230
|
id: string | number;
|
|
@@ -237,6 +247,11 @@ export declare const doc24Schemas: {
|
|
|
237
247
|
length?: number | null | undefined;
|
|
238
248
|
ranking?: unknown;
|
|
239
249
|
consultation_value?: string | null | undefined;
|
|
250
|
+
inPerson?: boolean | null | undefined;
|
|
251
|
+
virtual?: boolean | null | undefined;
|
|
252
|
+
province?: string | null | undefined;
|
|
253
|
+
city?: string | null | undefined;
|
|
254
|
+
address?: string | null | undefined;
|
|
240
255
|
date: Date;
|
|
241
256
|
type: "appointment" | "chat" | "instant";
|
|
242
257
|
id: string | number;
|
|
@@ -406,6 +421,7 @@ export declare const doc24Schemas: {
|
|
|
406
421
|
finishHour: import("zod").ZodOptional<import("zod").ZodString>;
|
|
407
422
|
language: import("zod").ZodOptional<import("zod").ZodString>;
|
|
408
423
|
userTimeZone: import("zod").ZodOptional<import("zod").ZodString>;
|
|
424
|
+
showAppointmentConfiguration: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
409
425
|
}, "strip", import("zod").ZodTypeAny, {
|
|
410
426
|
date?: Date | undefined;
|
|
411
427
|
language?: string | undefined;
|
|
@@ -416,6 +432,7 @@ export declare const doc24Schemas: {
|
|
|
416
432
|
weekDay?: number | undefined;
|
|
417
433
|
startHour?: string | undefined;
|
|
418
434
|
finishHour?: string | undefined;
|
|
435
|
+
showAppointmentConfiguration?: boolean | undefined;
|
|
419
436
|
}, {
|
|
420
437
|
date?: Date | undefined;
|
|
421
438
|
language?: string | undefined;
|
|
@@ -426,6 +443,7 @@ export declare const doc24Schemas: {
|
|
|
426
443
|
weekDay?: number | undefined;
|
|
427
444
|
startHour?: string | undefined;
|
|
428
445
|
finishHour?: string | undefined;
|
|
446
|
+
showAppointmentConfiguration?: boolean | undefined;
|
|
429
447
|
}>;
|
|
430
448
|
professionalsBySpecialtyFilter: import("zod").ZodObject<{
|
|
431
449
|
professionalId: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
@@ -455,8 +473,10 @@ export declare const doc24Schemas: {
|
|
|
455
473
|
}, {
|
|
456
474
|
type: import("zod").ZodLiteral<"appointment">;
|
|
457
475
|
appointmentId: import("zod").ZodUnion<[import("zod").ZodNumber, import("zod").ZodString]>;
|
|
476
|
+
modality: import("zod").ZodOptional<import("zod").ZodEnum<["P", "V"]>>;
|
|
458
477
|
}>, "strip", import("zod").ZodTypeAny, {
|
|
459
478
|
extraInfo?: any;
|
|
479
|
+
modality?: "P" | "V" | undefined;
|
|
460
480
|
type: "appointment";
|
|
461
481
|
patientId: number;
|
|
462
482
|
specialtyId: number;
|
|
@@ -465,6 +485,7 @@ export declare const doc24Schemas: {
|
|
|
465
485
|
appointmentId: string | number;
|
|
466
486
|
}, {
|
|
467
487
|
extraInfo?: any;
|
|
488
|
+
modality?: "P" | "V" | undefined;
|
|
468
489
|
type: "appointment";
|
|
469
490
|
patientId: number;
|
|
470
491
|
specialtyId: number;
|
|
@@ -2262,22 +2283,22 @@ export declare const doc24Schemas: {
|
|
|
2262
2283
|
birthdate: Date;
|
|
2263
2284
|
appointment: string;
|
|
2264
2285
|
id: number;
|
|
2286
|
+
modality: string;
|
|
2265
2287
|
specialty: string;
|
|
2266
2288
|
patientName: string;
|
|
2267
2289
|
clinic: string;
|
|
2268
2290
|
professionalName: string;
|
|
2269
|
-
modality: string;
|
|
2270
2291
|
}, {
|
|
2271
2292
|
patientIdentification?: string | undefined;
|
|
2272
2293
|
date: Date;
|
|
2273
2294
|
birthdate: Date;
|
|
2274
2295
|
appointment: string;
|
|
2275
2296
|
id: number;
|
|
2297
|
+
modality: string;
|
|
2276
2298
|
specialty: string;
|
|
2277
2299
|
patientName: string;
|
|
2278
2300
|
clinic: string;
|
|
2279
2301
|
professionalName: string;
|
|
2280
|
-
modality: string;
|
|
2281
2302
|
}>;
|
|
2282
2303
|
binahWellnessResponse: import("zod").ZodObject<{
|
|
2283
2304
|
data: import("zod").ZodObject<{
|
|
@@ -2445,4 +2466,17 @@ export declare const doc24Schemas: {
|
|
|
2445
2466
|
vcToken: string;
|
|
2446
2467
|
attachedFile: string;
|
|
2447
2468
|
}>;
|
|
2469
|
+
healthQuizParams: import("zod").ZodObject<{
|
|
2470
|
+
patientId: import("zod").ZodNumber;
|
|
2471
|
+
quiz: import("zod").ZodRecord<import("zod").ZodAny>;
|
|
2472
|
+
origen: import("zod").ZodString;
|
|
2473
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
2474
|
+
patientId: number;
|
|
2475
|
+
quiz: Record<string, any>;
|
|
2476
|
+
origen: string;
|
|
2477
|
+
}, {
|
|
2478
|
+
patientId: number;
|
|
2479
|
+
quiz: Record<string, any>;
|
|
2480
|
+
origen: string;
|
|
2481
|
+
}>;
|
|
2448
2482
|
};
|
package/lib/schemas.js
CHANGED
|
@@ -56,6 +56,11 @@ const availableAppointment = zod_1.object({
|
|
|
56
56
|
ranking: zod_1.unknown(),
|
|
57
57
|
length: zod_1.number().nullish(),
|
|
58
58
|
consultation_value: zod_1.string().optional().nullish(),
|
|
59
|
+
inPerson: zod_1.boolean().nullish(),
|
|
60
|
+
virtual: zod_1.boolean().nullish(),
|
|
61
|
+
province: zod_1.string().nullish(),
|
|
62
|
+
city: zod_1.string().nullish(),
|
|
63
|
+
address: zod_1.string().nullish(),
|
|
59
64
|
});
|
|
60
65
|
const appointment = zod_1.object({
|
|
61
66
|
id: zod_1.number(),
|
|
@@ -82,6 +87,7 @@ const baseScheduleParameters = zod_1.object({
|
|
|
82
87
|
const appointmentScheduleParameters = baseScheduleParameters.extend({
|
|
83
88
|
type: zod_1.literal('appointment'),
|
|
84
89
|
appointmentId: zod_1.number().or(zod_1.string()),
|
|
90
|
+
modality: zod_1.enum(['P', 'V']).optional(),
|
|
85
91
|
});
|
|
86
92
|
const instantScheduleParameters = baseScheduleParameters.extend({
|
|
87
93
|
type: zod_1.literal('instant'),
|
|
@@ -353,6 +359,7 @@ exports.doc24Schemas = {
|
|
|
353
359
|
finishHour: zod_1.string().optional(),
|
|
354
360
|
language: zod_1.string().optional(),
|
|
355
361
|
userTimeZone: zod_1.string().optional(),
|
|
362
|
+
showAppointmentConfiguration: zod_1.boolean().optional(),
|
|
356
363
|
}),
|
|
357
364
|
professionalsBySpecialtyFilter: zod_1.object({
|
|
358
365
|
professionalId: zod_1.number().optional().nullable(),
|
|
@@ -525,4 +532,9 @@ exports.doc24Schemas = {
|
|
|
525
532
|
attachedFile: zod_1.string(),
|
|
526
533
|
fileName: zod_1.string().optional(),
|
|
527
534
|
}),
|
|
535
|
+
healthQuizParams: zod_1.object({
|
|
536
|
+
patientId: zod_1.number(),
|
|
537
|
+
quiz: zod_1.record(zod_1.any()),
|
|
538
|
+
origen: zod_1.string(),
|
|
539
|
+
}),
|
|
528
540
|
};
|
package/lib/types.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export declare namespace Doc24 {
|
|
|
51
51
|
type BinahWellnessResponse = TypeOf<typeof doc24Schemas.binahWellnessResponse>;
|
|
52
52
|
type ProfessionalsBySpecialtyFilter = TypeOf<typeof doc24Schemas.professionalsBySpecialtyFilter>;
|
|
53
53
|
type UploadFileConsultationParams = TypeOf<typeof doc24Schemas.uploadFileConsultationParams>;
|
|
54
|
+
type HealthQuizParams = TypeOf<typeof doc24Schemas.healthQuizParams>;
|
|
54
55
|
type BaseSdk = {
|
|
55
56
|
declareUser: (params: DeclareUserParams) => Promise<DeclareUserResponse>;
|
|
56
57
|
getUserId: (user: User) => Promise<number>;
|
|
@@ -99,6 +100,7 @@ export declare namespace Doc24 {
|
|
|
99
100
|
getExternalAppointments: () => Promise<ExternalAppointment[]>;
|
|
100
101
|
cancelExternalAppointment: (appointmentId: ExternalAppointment) => Promise<void>;
|
|
101
102
|
getPatientPHR: (patientId: number) => Promise<string>;
|
|
103
|
+
submitHealthQuiz: (params: HealthQuizParams) => Promise<void>;
|
|
102
104
|
userId: number;
|
|
103
105
|
getBinahWellnessLink: (body: BinahWellnessGetLinkParams) => Promise<BinahWellnessResponse>;
|
|
104
106
|
uploadFileConsultation: (params: UploadFileConsultationParams) => Promise<unknown>;
|
|
@@ -13,11 +13,11 @@ export declare const getExternalMethods: (makeRequest: RequestMaker) => {
|
|
|
13
13
|
birthdate: Date;
|
|
14
14
|
appointment: string;
|
|
15
15
|
id: number;
|
|
16
|
+
modality: string;
|
|
16
17
|
specialty: string;
|
|
17
18
|
patientName: string;
|
|
18
19
|
clinic: string;
|
|
19
20
|
professionalName: string;
|
|
20
|
-
modality: string;
|
|
21
21
|
}[]>;
|
|
22
22
|
cancelExternalAppointment: (appointmentId: {
|
|
23
23
|
patientIdentification?: string | undefined;
|
|
@@ -25,10 +25,10 @@ export declare const getExternalMethods: (makeRequest: RequestMaker) => {
|
|
|
25
25
|
birthdate: Date;
|
|
26
26
|
appointment: string;
|
|
27
27
|
id: number;
|
|
28
|
+
modality: string;
|
|
28
29
|
specialty: string;
|
|
29
30
|
patientName: string;
|
|
30
31
|
clinic: string;
|
|
31
32
|
professionalName: string;
|
|
32
|
-
modality: string;
|
|
33
33
|
}) => Promise<void>;
|
|
34
34
|
};
|
|
@@ -50,4 +50,9 @@ export declare const getPatientMethods: (makeRequest: RequestMaker) => {
|
|
|
50
50
|
}) => Promise<number>;
|
|
51
51
|
deletePatient: (patientId: number) => Promise<void>;
|
|
52
52
|
getPatientPHR: (patientId: number) => Promise<string>;
|
|
53
|
+
submitHealthQuiz: (params: {
|
|
54
|
+
patientId: number;
|
|
55
|
+
quiz: Record<string, any>;
|
|
56
|
+
origen: string;
|
|
57
|
+
}) => Promise<void>;
|
|
53
58
|
};
|
package/lib/userSdk/patients.js
CHANGED
|
@@ -70,11 +70,20 @@ const getPatientMethods = (makeRequest) => {
|
|
|
70
70
|
const response = await makeRequest('GET', path);
|
|
71
71
|
return response.data.url_acceso_paciente;
|
|
72
72
|
};
|
|
73
|
+
const submitHealthQuiz = async ({ patientId, quiz, origen, }) => {
|
|
74
|
+
const path = '/health-quiz-external';
|
|
75
|
+
await makeRequest('POST', path, {
|
|
76
|
+
id_persona: patientId,
|
|
77
|
+
quiz,
|
|
78
|
+
origen,
|
|
79
|
+
});
|
|
80
|
+
};
|
|
73
81
|
return {
|
|
74
82
|
declarePatient: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.declarePatientParams]), schemas_1.doc24Schemas.declarePatientResponse, declarePatient),
|
|
75
83
|
getPatientId: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.patient]), zod_1.number(), getPatientId),
|
|
76
84
|
deletePatient: validation_1.validateFunction(zod_1.tuple([zod_1.number()]), zod_1.void(), deletePatient),
|
|
77
85
|
getPatientPHR: validation_1.validateFunction(zod_1.tuple([zod_1.number()]), zod_1.string(), getPatientPHR),
|
|
86
|
+
submitHealthQuiz: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.healthQuizParams]), zod_1.void(), submitHealthQuiz),
|
|
78
87
|
};
|
|
79
88
|
};
|
|
80
89
|
exports.getPatientMethods = getPatientMethods;
|
|
@@ -10,10 +10,16 @@ export declare const getScheduleMethods: (makeRequest: RequestMaker) => {
|
|
|
10
10
|
weekDay?: number | undefined;
|
|
11
11
|
startHour?: string | undefined;
|
|
12
12
|
finishHour?: string | undefined;
|
|
13
|
+
showAppointmentConfiguration?: boolean | undefined;
|
|
13
14
|
} | undefined) => Promise<{
|
|
14
15
|
length?: number | null | undefined;
|
|
15
16
|
ranking?: unknown;
|
|
16
17
|
consultation_value?: string | null | undefined;
|
|
18
|
+
inPerson?: boolean | null | undefined;
|
|
19
|
+
virtual?: boolean | null | undefined;
|
|
20
|
+
province?: string | null | undefined;
|
|
21
|
+
city?: string | null | undefined;
|
|
22
|
+
address?: string | null | undefined;
|
|
17
23
|
date: Date;
|
|
18
24
|
type: "appointment" | "chat" | "instant";
|
|
19
25
|
id: string | number;
|
package/lib/userSdk/schedule.js
CHANGED
|
@@ -31,6 +31,7 @@ const getScheduleMethods = (makeRequest) => {
|
|
|
31
31
|
finish_hour: filter.finishHour,
|
|
32
32
|
language: (_a = filter.language) !== null && _a !== void 0 ? _a : 'ES',
|
|
33
33
|
user_time_zone: filter.userTimeZone,
|
|
34
|
+
show_appointment_configuration: filter.showAppointmentConfiguration ? 1 : null,
|
|
34
35
|
};
|
|
35
36
|
const path = `/schedule/availability/${patientId}/${specialtyId}/${JSON.stringify(mappedFilter)}`;
|
|
36
37
|
const response = await makeRequest('GET', path);
|
|
@@ -53,6 +54,11 @@ const getScheduleMethods = (makeRequest) => {
|
|
|
53
54
|
ranking: a.ranking,
|
|
54
55
|
length: a.length,
|
|
55
56
|
consultation_value: a.consultation_value,
|
|
57
|
+
inPerson: a.in_person,
|
|
58
|
+
virtual: a.virtual,
|
|
59
|
+
province: a.province,
|
|
60
|
+
city: a.city,
|
|
61
|
+
address: a.address,
|
|
56
62
|
}));
|
|
57
63
|
};
|
|
58
64
|
const getAppointment = async (appointmentId) => {
|
|
@@ -2,6 +2,7 @@ import { RequestMaker } from '../request';
|
|
|
2
2
|
export declare const getVideoVisitMethods: (makeRequest: RequestMaker) => {
|
|
3
3
|
scheduleVideoVisit: (params: {
|
|
4
4
|
extraInfo?: any;
|
|
5
|
+
modality?: "P" | "V" | undefined;
|
|
5
6
|
type: "appointment";
|
|
6
7
|
patientId: number;
|
|
7
8
|
specialtyId: number;
|