@integraciones_doc24/sdk 1.15.11 → 1.15.12

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.
Files changed (44) hide show
  1. package/README.md +202 -202
  2. package/lib/baseSdk/diagnostica.d.ts +54 -54
  3. package/lib/baseSdk/diagnostica.js +82 -82
  4. package/lib/baseSdk/external.d.ts +177 -177
  5. package/lib/baseSdk/external.js +96 -96
  6. package/lib/baseSdk/index.d.ts +2 -2
  7. package/lib/baseSdk/index.js +74 -74
  8. package/lib/baseSdk/user.d.ts +91 -91
  9. package/lib/baseSdk/user.js +136 -136
  10. package/lib/index.d.ts +365 -365
  11. package/lib/index.js +22 -22
  12. package/lib/request/index.d.ts +3 -3
  13. package/lib/request/index.js +26 -26
  14. package/lib/request/token.d.ts +2 -2
  15. package/lib/request/token.js +34 -34
  16. package/lib/request/validation.d.ts +10 -10
  17. package/lib/request/validation.js +28 -28
  18. package/lib/schemas.d.ts +1822 -1816
  19. package/lib/schemas.js +421 -420
  20. package/lib/types.d.ts +146 -146
  21. package/lib/types.js +2 -2
  22. package/lib/userSdk/chat.d.ts +57 -57
  23. package/lib/userSdk/chat.js +98 -98
  24. package/lib/userSdk/external.d.ts +34 -34
  25. package/lib/userSdk/external.js +72 -72
  26. package/lib/userSdk/index.d.ts +2 -2
  27. package/lib/userSdk/index.js +30 -30
  28. package/lib/userSdk/patients.d.ts +38 -38
  29. package/lib/userSdk/patients.js +67 -67
  30. package/lib/userSdk/schedule.d.ts +47 -47
  31. package/lib/userSdk/schedule.js +81 -81
  32. package/lib/userSdk/specialties.d.ts +7 -7
  33. package/lib/userSdk/specialties.js +19 -19
  34. package/lib/userSdk/videoVisit.d.ts +115 -113
  35. package/lib/userSdk/videoVisit.js +155 -154
  36. package/lib/utils.d.ts +2 -2
  37. package/lib/utils.js +16 -16
  38. package/lib/webhook/index.d.ts +2 -2
  39. package/lib/webhook/index.js +56 -56
  40. package/lib/webhook/responses.d.ts +35 -35
  41. package/lib/webhook/responses.js +42 -42
  42. package/lib/webhook/token.d.ts +2 -2
  43. package/lib/webhook/token.js +23 -23
  44. package/package.json +36 -36
@@ -1,34 +1,34 @@
1
- import { RequestMaker } from '../request';
2
- export declare const getExternalMethods: (makeRequest: RequestMaker) => {
3
- getExternalStudiesHistoryLink: (patient: {
4
- gender?: "m" | "f" | "o" | undefined;
5
- identificationType: "DNI";
6
- identificationValue: string;
7
- birthdate: Date;
8
- }) => Promise<string | null>;
9
- getExternalAppointmentsLink: (identificationValue: string, birthdate: Date) => Promise<string | null>;
10
- getExternalAppointments: () => Promise<{
11
- patientIdentification?: string | undefined;
12
- date: Date;
13
- birthdate: Date;
14
- appointment: string;
15
- id: number;
16
- specialty: string;
17
- patientName: string;
18
- clinic: string;
19
- professionalName: string;
20
- modality: string;
21
- }[]>;
22
- cancelExternalAppointment: (appointmentId: {
23
- patientIdentification?: string | undefined;
24
- date: Date;
25
- birthdate: Date;
26
- appointment: string;
27
- id: number;
28
- specialty: string;
29
- patientName: string;
30
- clinic: string;
31
- professionalName: string;
32
- modality: string;
33
- }) => Promise<void>;
34
- };
1
+ import { RequestMaker } from '../request';
2
+ export declare const getExternalMethods: (makeRequest: RequestMaker) => {
3
+ getExternalStudiesHistoryLink: (patient: {
4
+ gender?: "m" | "f" | "o" | undefined;
5
+ identificationType: "DNI";
6
+ identificationValue: string;
7
+ birthdate: Date;
8
+ }) => Promise<string | null>;
9
+ getExternalAppointmentsLink: (identificationValue: string, birthdate: Date) => Promise<string | null>;
10
+ getExternalAppointments: () => Promise<{
11
+ patientIdentification?: string | undefined;
12
+ date: Date;
13
+ birthdate: Date;
14
+ appointment: string;
15
+ id: number;
16
+ specialty: string;
17
+ patientName: string;
18
+ clinic: string;
19
+ professionalName: string;
20
+ modality: string;
21
+ }[]>;
22
+ cancelExternalAppointment: (appointmentId: {
23
+ patientIdentification?: string | undefined;
24
+ date: Date;
25
+ birthdate: Date;
26
+ appointment: string;
27
+ id: number;
28
+ specialty: string;
29
+ patientName: string;
30
+ clinic: string;
31
+ professionalName: string;
32
+ modality: string;
33
+ }) => Promise<void>;
34
+ };
@@ -1,72 +1,72 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getExternalMethods = void 0;
4
- const date_fns_1 = require("date-fns");
5
- const zod_1 = require("zod");
6
- const validation_1 = require("../request/validation");
7
- const schemas_1 = require("../schemas");
8
- const utils_1 = require("../utils");
9
- const getExternalMethods = (makeRequest) => {
10
- const getExternalStudiesHistoryLink = async (patient) => {
11
- var _a, _b;
12
- const path = '/history-external-studies';
13
- const response = await makeRequest('POST', path, {
14
- patient: mapPatientData(patient),
15
- });
16
- return (_b = (_a = response.data.info) === null || _a === void 0 ? void 0 : _a.link) !== null && _b !== void 0 ? _b : null;
17
- };
18
- const getExternalAppointmentsLink = async (identificationValue, birthdate) => {
19
- const path = `/external-appointments-link/${identificationValue}/${date_fns_1.format(birthdate, 'yyyy-MM-dd')}`;
20
- const response = await makeRequest('GET', path);
21
- return response.data.link;
22
- };
23
- const getExternalAppointments = async () => {
24
- const path = '/external-appointments';
25
- const response = await makeRequest('GET', path);
26
- return response.data.appointments.map((a) => ({
27
- id: a.appointment_id,
28
- patientIdentification: a.patient_id,
29
- patientName: a.patient_name,
30
- birthdate: utils_1.parseDate(a.birthdate),
31
- appointment: a.appointment,
32
- clinic: a.clinic,
33
- professionalName: a.professional,
34
- date: utils_1.parseDateTime(`${a.day} ${a.hour}:00`),
35
- specialty: a.specialty,
36
- modality: a.modality,
37
- }));
38
- };
39
- const cancelExternalAppointment = async (appointment) => {
40
- const path = `/cancel-external-appointment`;
41
- await makeRequest('POST', path, {
42
- appointment_id: appointment.id,
43
- patient_id: appointment.patientIdentification,
44
- patient_name: appointment.patientName,
45
- birthdate: date_fns_1.format(appointment.birthdate, 'yyyy-MM-dd'),
46
- appointment: appointment.appointment,
47
- clinic: appointment.clinic,
48
- professional: appointment.professionalName,
49
- day: date_fns_1.format(appointment.date, 'yyyy-MM-dd'),
50
- hour: date_fns_1.format(appointment.date, 'HH:mm'),
51
- specialty: appointment.specialty,
52
- modality: appointment.modality,
53
- });
54
- return;
55
- };
56
- return {
57
- getExternalStudiesHistoryLink: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.externalPatient]), zod_1.string().nullable(), getExternalStudiesHistoryLink),
58
- getExternalAppointmentsLink: validation_1.validateFunction(zod_1.tuple([zod_1.string(), zod_1.date()]), zod_1.string().nullable(), getExternalAppointmentsLink),
59
- getExternalAppointments: validation_1.validateFunction(zod_1.tuple([]), zod_1.array(schemas_1.doc24Schemas.externalAppointment), getExternalAppointments),
60
- cancelExternalAppointment: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.externalAppointment]), zod_1.void(), cancelExternalAppointment),
61
- };
62
- };
63
- exports.getExternalMethods = getExternalMethods;
64
- const mapPatientData = (patient) => {
65
- var _a;
66
- return {
67
- birthdate: date_fns_1.format(patient.birthdate, 'yyyy-MM-dd'),
68
- id_type: 'dni',
69
- id_value: patient.identificationValue,
70
- gender: (_a = patient.gender) === null || _a === void 0 ? void 0 : _a.toLocaleUpperCase(),
71
- };
72
- };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getExternalMethods = void 0;
4
+ const date_fns_1 = require("date-fns");
5
+ const zod_1 = require("zod");
6
+ const validation_1 = require("../request/validation");
7
+ const schemas_1 = require("../schemas");
8
+ const utils_1 = require("../utils");
9
+ const getExternalMethods = (makeRequest) => {
10
+ const getExternalStudiesHistoryLink = async (patient) => {
11
+ var _a, _b;
12
+ const path = '/history-external-studies';
13
+ const response = await makeRequest('POST', path, {
14
+ patient: mapPatientData(patient),
15
+ });
16
+ return (_b = (_a = response.data.info) === null || _a === void 0 ? void 0 : _a.link) !== null && _b !== void 0 ? _b : null;
17
+ };
18
+ const getExternalAppointmentsLink = async (identificationValue, birthdate) => {
19
+ const path = `/external-appointments-link/${identificationValue}/${date_fns_1.format(birthdate, 'yyyy-MM-dd')}`;
20
+ const response = await makeRequest('GET', path);
21
+ return response.data.link;
22
+ };
23
+ const getExternalAppointments = async () => {
24
+ const path = '/external-appointments';
25
+ const response = await makeRequest('GET', path);
26
+ return response.data.appointments.map((a) => ({
27
+ id: a.appointment_id,
28
+ patientIdentification: a.patient_id,
29
+ patientName: a.patient_name,
30
+ birthdate: utils_1.parseDate(a.birthdate),
31
+ appointment: a.appointment,
32
+ clinic: a.clinic,
33
+ professionalName: a.professional,
34
+ date: utils_1.parseDateTime(`${a.day} ${a.hour}:00`),
35
+ specialty: a.specialty,
36
+ modality: a.modality,
37
+ }));
38
+ };
39
+ const cancelExternalAppointment = async (appointment) => {
40
+ const path = `/cancel-external-appointment`;
41
+ await makeRequest('POST', path, {
42
+ appointment_id: appointment.id,
43
+ patient_id: appointment.patientIdentification,
44
+ patient_name: appointment.patientName,
45
+ birthdate: date_fns_1.format(appointment.birthdate, 'yyyy-MM-dd'),
46
+ appointment: appointment.appointment,
47
+ clinic: appointment.clinic,
48
+ professional: appointment.professionalName,
49
+ day: date_fns_1.format(appointment.date, 'yyyy-MM-dd'),
50
+ hour: date_fns_1.format(appointment.date, 'HH:mm'),
51
+ specialty: appointment.specialty,
52
+ modality: appointment.modality,
53
+ });
54
+ return;
55
+ };
56
+ return {
57
+ getExternalStudiesHistoryLink: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.externalPatient]), zod_1.string().nullable(), getExternalStudiesHistoryLink),
58
+ getExternalAppointmentsLink: validation_1.validateFunction(zod_1.tuple([zod_1.string(), zod_1.date()]), zod_1.string().nullable(), getExternalAppointmentsLink),
59
+ getExternalAppointments: validation_1.validateFunction(zod_1.tuple([]), zod_1.array(schemas_1.doc24Schemas.externalAppointment), getExternalAppointments),
60
+ cancelExternalAppointment: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.externalAppointment]), zod_1.void(), cancelExternalAppointment),
61
+ };
62
+ };
63
+ exports.getExternalMethods = getExternalMethods;
64
+ const mapPatientData = (patient) => {
65
+ var _a;
66
+ return {
67
+ birthdate: date_fns_1.format(patient.birthdate, 'yyyy-MM-dd'),
68
+ id_type: 'dni',
69
+ id_value: patient.identificationValue,
70
+ gender: (_a = patient.gender) === null || _a === void 0 ? void 0 : _a.toLocaleUpperCase(),
71
+ };
72
+ };
@@ -1,2 +1,2 @@
1
- import { Doc24 } from '../types';
2
- export declare const userSdk: (url: string, credentials: Doc24.SdkCredentials, userId: number) => Promise<Doc24.UserSdk>;
1
+ import { Doc24 } from '../types';
2
+ export declare const userSdk: (url: string, credentials: Doc24.SdkCredentials, userId: number) => Promise<Doc24.UserSdk>;
@@ -1,30 +1,30 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.userSdk = void 0;
4
- const request_1 = require("../request");
5
- const chat_1 = require("./chat");
6
- const external_1 = require("./external");
7
- const patients_1 = require("./patients");
8
- const schedule_1 = require("./schedule");
9
- const specialties_1 = require("./specialties");
10
- const videoVisit_1 = require("./videoVisit");
11
- const userSdk = async (url, credentials, userId) => {
12
- const makeRequest = await request_1.getRequestFactory(url, credentials, userId);
13
- const patientMethods = patients_1.getPatientMethods(makeRequest);
14
- const specialtyMethods = specialties_1.getSpecialtiesMethods(makeRequest);
15
- const scheduleMethods = schedule_1.getScheduleMethods(makeRequest);
16
- const videoVisitMethods = videoVisit_1.getVideoVisitMethods(makeRequest);
17
- const chatMethods = chat_1.getChatMethods(makeRequest);
18
- const externalMethods = external_1.getExternalMethods(makeRequest);
19
- const sdk = {
20
- ...patientMethods,
21
- ...specialtyMethods,
22
- ...scheduleMethods,
23
- ...videoVisitMethods,
24
- ...chatMethods,
25
- ...externalMethods,
26
- userId,
27
- };
28
- return sdk;
29
- };
30
- exports.userSdk = userSdk;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.userSdk = void 0;
4
+ const request_1 = require("../request");
5
+ const chat_1 = require("./chat");
6
+ const external_1 = require("./external");
7
+ const patients_1 = require("./patients");
8
+ const schedule_1 = require("./schedule");
9
+ const specialties_1 = require("./specialties");
10
+ const videoVisit_1 = require("./videoVisit");
11
+ const userSdk = async (url, credentials, userId) => {
12
+ const makeRequest = await request_1.getRequestFactory(url, credentials, userId);
13
+ const patientMethods = patients_1.getPatientMethods(makeRequest);
14
+ const specialtyMethods = specialties_1.getSpecialtiesMethods(makeRequest);
15
+ const scheduleMethods = schedule_1.getScheduleMethods(makeRequest);
16
+ const videoVisitMethods = videoVisit_1.getVideoVisitMethods(makeRequest);
17
+ const chatMethods = chat_1.getChatMethods(makeRequest);
18
+ const externalMethods = external_1.getExternalMethods(makeRequest);
19
+ const sdk = {
20
+ ...patientMethods,
21
+ ...specialtyMethods,
22
+ ...scheduleMethods,
23
+ ...videoVisitMethods,
24
+ ...chatMethods,
25
+ ...externalMethods,
26
+ userId,
27
+ };
28
+ return sdk;
29
+ };
30
+ exports.userSdk = userSdk;
@@ -1,38 +1,38 @@
1
- import { RequestMaker } from '../request';
2
- export declare const getPatientMethods: (makeRequest: RequestMaker) => {
3
- declarePatient: (params: {
4
- patient: {
5
- identificationType?: number | undefined;
6
- identificationValue?: string | undefined;
7
- gender?: "m" | "f" | "o" | undefined;
8
- firstName: string;
9
- lastName: string;
10
- countryId: string;
11
- birthdate: Date;
12
- };
13
- } & {
14
- code?: string | undefined;
15
- channel?: "1" | "2" | undefined;
16
- }) => Promise<{
17
- askCode: true;
18
- userInfo: {
19
- firstName: string;
20
- lastName: string;
21
- phone: string;
22
- email: string;
23
- };
24
- } | {
25
- patientId: number | null;
26
- askCode: false;
27
- }>;
28
- getPatientId: (patient: {
29
- identificationType?: number | undefined;
30
- identificationValue?: string | undefined;
31
- gender?: "m" | "f" | "o" | undefined;
32
- firstName: string;
33
- lastName: string;
34
- countryId: string;
35
- birthdate: Date;
36
- }) => Promise<number>;
37
- deletePatient: (patientId: number) => Promise<void>;
38
- };
1
+ import { RequestMaker } from '../request';
2
+ export declare const getPatientMethods: (makeRequest: RequestMaker) => {
3
+ declarePatient: (params: {
4
+ patient: {
5
+ identificationType?: number | undefined;
6
+ identificationValue?: string | undefined;
7
+ gender?: "m" | "f" | "o" | undefined;
8
+ firstName: string;
9
+ lastName: string;
10
+ countryId: string;
11
+ birthdate: Date;
12
+ };
13
+ } & {
14
+ code?: string | undefined;
15
+ channel?: "1" | "2" | undefined;
16
+ }) => Promise<{
17
+ askCode: true;
18
+ userInfo: {
19
+ firstName: string;
20
+ lastName: string;
21
+ phone: string;
22
+ email: string;
23
+ };
24
+ } | {
25
+ patientId: number | null;
26
+ askCode: false;
27
+ }>;
28
+ getPatientId: (patient: {
29
+ identificationType?: number | undefined;
30
+ identificationValue?: string | undefined;
31
+ gender?: "m" | "f" | "o" | undefined;
32
+ firstName: string;
33
+ lastName: string;
34
+ countryId: string;
35
+ birthdate: Date;
36
+ }) => Promise<number>;
37
+ deletePatient: (patientId: number) => Promise<void>;
38
+ };
@@ -1,67 +1,67 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getPatientMethods = void 0;
4
- const date_fns_1 = require("date-fns");
5
- const zod_1 = require("zod");
6
- const validation_1 = require("../request/validation");
7
- const schemas_1 = require("../schemas");
8
- const getPatientMethods = (makeRequest) => {
9
- const declarePatient = async ({ patient, channel, code, }) => {
10
- var _a;
11
- const path = '/patient';
12
- const mappedPatient = {
13
- lastname: patient.lastName,
14
- firstname: patient.firstName,
15
- identification_type: patient.identificationType,
16
- identification_value: patient.identificationValue,
17
- birthdate: date_fns_1.format(patient.birthdate, 'yyyy-MM-dd'),
18
- gender: (_a = patient.gender) === null || _a === void 0 ? void 0 : _a.toUpperCase(),
19
- country_id: patient.countryId,
20
- };
21
- const parsedChannel = channel ? parseInt(channel) : channel;
22
- const response = await makeRequest('POST', path, {
23
- user_data: mappedPatient,
24
- channel: parsedChannel,
25
- code,
26
- });
27
- const data = response.data;
28
- if (data.ask_code)
29
- return {
30
- userInfo: {
31
- firstName: data.user_info.firstname,
32
- lastName: data.user_info.lastname,
33
- phone: data.user_info.phone,
34
- email: data.user_info.email,
35
- },
36
- askCode: true,
37
- };
38
- return { askCode: false, patientId: data.patient_id };
39
- };
40
- const getPatientId = async (patient) => {
41
- var _a;
42
- const path = '/search-patient';
43
- const mappedPatient = {
44
- lastname: patient.lastName,
45
- firstname: patient.firstName,
46
- identification_type: patient.identificationType,
47
- identification_value: patient.identificationValue,
48
- birthdate: date_fns_1.format(patient.birthdate, 'yyyy-MM-dd'),
49
- gender: (_a = patient.gender) === null || _a === void 0 ? void 0 : _a.toUpperCase(),
50
- country_id: patient.countryId,
51
- };
52
- const response = await makeRequest('POST', path, {
53
- user_data: mappedPatient,
54
- });
55
- return response.data.patient_id;
56
- };
57
- const deletePatient = async (patientId) => {
58
- const path = `/patient/${patientId}`;
59
- await makeRequest('DELETE', path);
60
- };
61
- return {
62
- declarePatient: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.declarePatientParams]), schemas_1.doc24Schemas.declarePatientResponse, declarePatient),
63
- getPatientId: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.patient]), zod_1.number(), getPatientId),
64
- deletePatient: validation_1.validateFunction(zod_1.tuple([zod_1.number()]), zod_1.void(), deletePatient),
65
- };
66
- };
67
- exports.getPatientMethods = getPatientMethods;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getPatientMethods = void 0;
4
+ const date_fns_1 = require("date-fns");
5
+ const zod_1 = require("zod");
6
+ const validation_1 = require("../request/validation");
7
+ const schemas_1 = require("../schemas");
8
+ const getPatientMethods = (makeRequest) => {
9
+ const declarePatient = async ({ patient, channel, code, }) => {
10
+ var _a;
11
+ const path = '/patient';
12
+ const mappedPatient = {
13
+ lastname: patient.lastName,
14
+ firstname: patient.firstName,
15
+ identification_type: patient.identificationType,
16
+ identification_value: patient.identificationValue,
17
+ birthdate: date_fns_1.format(patient.birthdate, 'yyyy-MM-dd'),
18
+ gender: (_a = patient.gender) === null || _a === void 0 ? void 0 : _a.toUpperCase(),
19
+ country_id: patient.countryId,
20
+ };
21
+ const parsedChannel = channel ? parseInt(channel) : channel;
22
+ const response = await makeRequest('POST', path, {
23
+ user_data: mappedPatient,
24
+ channel: parsedChannel,
25
+ code,
26
+ });
27
+ const data = response.data;
28
+ if (data.ask_code)
29
+ return {
30
+ userInfo: {
31
+ firstName: data.user_info.firstname,
32
+ lastName: data.user_info.lastname,
33
+ phone: data.user_info.phone,
34
+ email: data.user_info.email,
35
+ },
36
+ askCode: true,
37
+ };
38
+ return { askCode: false, patientId: data.patient_id };
39
+ };
40
+ const getPatientId = async (patient) => {
41
+ var _a;
42
+ const path = '/search-patient';
43
+ const mappedPatient = {
44
+ lastname: patient.lastName,
45
+ firstname: patient.firstName,
46
+ identification_type: patient.identificationType,
47
+ identification_value: patient.identificationValue,
48
+ birthdate: date_fns_1.format(patient.birthdate, 'yyyy-MM-dd'),
49
+ gender: (_a = patient.gender) === null || _a === void 0 ? void 0 : _a.toUpperCase(),
50
+ country_id: patient.countryId,
51
+ };
52
+ const response = await makeRequest('POST', path, {
53
+ user_data: mappedPatient,
54
+ });
55
+ return response.data.patient_id;
56
+ };
57
+ const deletePatient = async (patientId) => {
58
+ const path = `/patient/${patientId}`;
59
+ await makeRequest('DELETE', path);
60
+ };
61
+ return {
62
+ declarePatient: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.declarePatientParams]), schemas_1.doc24Schemas.declarePatientResponse, declarePatient),
63
+ getPatientId: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.patient]), zod_1.number(), getPatientId),
64
+ deletePatient: validation_1.validateFunction(zod_1.tuple([zod_1.number()]), zod_1.void(), deletePatient),
65
+ };
66
+ };
67
+ exports.getPatientMethods = getPatientMethods;
@@ -1,47 +1,47 @@
1
- import { RequestMaker } from '../request';
2
- export declare const getScheduleMethods: (makeRequest: RequestMaker) => {
3
- getSchedule: (patientId: number, specialtyId: number, filter?: {
4
- date?: Date | undefined;
5
- language?: string | undefined;
6
- professionalId?: number | undefined;
7
- offset?: number | undefined;
8
- limit?: number | undefined;
9
- weekDay?: number | undefined;
10
- startHour?: string | undefined;
11
- finishHour?: string | undefined;
12
- } | undefined) => Promise<{
13
- length?: number | null | undefined;
14
- ranking?: unknown;
15
- consultation_value?: string | null | undefined;
16
- date: Date;
17
- type: "appointment" | "chat" | "instant";
18
- id: string | number;
19
- professional: {
20
- id: number;
21
- fullName: string;
22
- logoUrl: string;
23
- };
24
- specialty: {
25
- id: number;
26
- description: string;
27
- };
28
- clinicId: number;
29
- cost: string;
30
- atentions: number;
31
- }[]>;
32
- getScheduleDates: (patientId: number, filter?: {
33
- specialtyId?: number | undefined;
34
- language?: string | undefined;
35
- professionalId?: number | undefined;
36
- } | undefined) => Promise<Date[]>;
37
- getAppointment: (appointmentId: number) => Promise<{
38
- date: Date;
39
- id: number;
40
- professionalId: number;
41
- }>;
42
- getAppointmentByVcToken: (vcToken: string) => Promise<{
43
- date: Date;
44
- id: number;
45
- professionalId: number;
46
- }>;
47
- };
1
+ import { RequestMaker } from '../request';
2
+ export declare const getScheduleMethods: (makeRequest: RequestMaker) => {
3
+ getSchedule: (patientId: number, specialtyId: number, filter?: {
4
+ date?: Date | undefined;
5
+ language?: string | undefined;
6
+ professionalId?: number | undefined;
7
+ offset?: number | undefined;
8
+ limit?: number | undefined;
9
+ weekDay?: number | undefined;
10
+ startHour?: string | undefined;
11
+ finishHour?: string | undefined;
12
+ } | undefined) => Promise<{
13
+ length?: number | null | undefined;
14
+ ranking?: unknown;
15
+ consultation_value?: string | null | undefined;
16
+ date: Date;
17
+ type: "appointment" | "chat" | "instant";
18
+ id: string | number;
19
+ professional: {
20
+ id: number;
21
+ fullName: string;
22
+ logoUrl: string;
23
+ };
24
+ specialty: {
25
+ id: number;
26
+ description: string;
27
+ };
28
+ clinicId: number;
29
+ cost: string;
30
+ atentions: number;
31
+ }[]>;
32
+ getScheduleDates: (patientId: number, filter?: {
33
+ specialtyId?: number | undefined;
34
+ language?: string | undefined;
35
+ professionalId?: number | undefined;
36
+ } | undefined) => Promise<Date[]>;
37
+ getAppointment: (appointmentId: number) => Promise<{
38
+ date: Date;
39
+ id: number;
40
+ professionalId: number;
41
+ }>;
42
+ getAppointmentByVcToken: (vcToken: string) => Promise<{
43
+ date: Date;
44
+ id: number;
45
+ professionalId: number;
46
+ }>;
47
+ };