@integraciones_doc24/sdk 1.16.35 → 1.16.36

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 (46) hide show
  1. package/README.md +206 -206
  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 +77 -77
  8. package/lib/baseSdk/user.d.ts +112 -112
  9. package/lib/baseSdk/user.js +136 -136
  10. package/lib/index.d.ts +400 -400
  11. package/lib/index.js +22 -22
  12. package/lib/request/index.d.ts +4 -4
  13. package/lib/request/index.js +32 -32
  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 +2549 -2543
  19. package/lib/schemas.js +559 -557
  20. package/lib/types.d.ts +173 -173
  21. package/lib/types.js +2 -2
  22. package/lib/userSdk/binah.d.ts +21 -21
  23. package/lib/userSdk/binah.js +20 -20
  24. package/lib/userSdk/chat.d.ts +57 -57
  25. package/lib/userSdk/chat.js +98 -98
  26. package/lib/userSdk/external.d.ts +34 -34
  27. package/lib/userSdk/external.js +72 -72
  28. package/lib/userSdk/index.d.ts +2 -2
  29. package/lib/userSdk/index.js +33 -33
  30. package/lib/userSdk/patients.d.ts +58 -58
  31. package/lib/userSdk/patients.js +89 -89
  32. package/lib/userSdk/schedule.d.ts +59 -59
  33. package/lib/userSdk/schedule.js +90 -90
  34. package/lib/userSdk/specialties.d.ts +19 -19
  35. package/lib/userSdk/specialties.js +48 -48
  36. package/lib/userSdk/videoVisit.d.ts +196 -194
  37. package/lib/userSdk/videoVisit.js +266 -264
  38. package/lib/utils.d.ts +4 -4
  39. package/lib/utils.js +68 -68
  40. package/lib/webhook/index.d.ts +2 -2
  41. package/lib/webhook/index.js +67 -67
  42. package/lib/webhook/responses.d.ts +35 -35
  43. package/lib/webhook/responses.js +42 -42
  44. package/lib/webhook/token.d.ts +2 -2
  45. package/lib/webhook/token.js +23 -23
  46. package/package.json +37 -37
@@ -1,98 +1,98 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getChatMethods = void 0;
4
- const zod_1 = require("zod");
5
- const validation_1 = require("../request/validation");
6
- const schemas_1 = require("../schemas");
7
- const utils_1 = require("../utils");
8
- const getChatMethods = (makeRequest) => {
9
- const getAvailableChatrooms = validation_1.validateFunction(zod_1.tuple([zod_1.number(), zod_1.number(), schemas_1.doc24Schemas.chatroomAvailabilityFilter]), zod_1.array(schemas_1.doc24Schemas.availableChatroom), async (patientId, specialtyId, filter) => {
10
- const path = `/chatroom/availability/${patientId}/${specialtyId}/${JSON.stringify(filter)}`;
11
- const response = await makeRequest('GET', path);
12
- return response.data.available_chatrooms.map((r) => ({
13
- id: r.chatroom_id,
14
- professional: {
15
- id: r.professional_id,
16
- fullName: r.professional,
17
- logoUrl: r.logo,
18
- },
19
- specialty: {
20
- id: r.specialty_id,
21
- description: r.specialty,
22
- },
23
- }));
24
- });
25
- const createNewChat = validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.chatParameters]), zod_1.number(), async (parameters) => {
26
- const path = `/chatroom/visit`;
27
- const response = await makeRequest('POST', path, {
28
- chatroom_data: {
29
- patient_id: parameters.patientId,
30
- chatroom_id: parameters.chatroomId,
31
- language: parameters.language.toLocaleUpperCase(),
32
- specialty_id: parameters.specialtyId,
33
- },
34
- });
35
- return response.data.chat_id;
36
- });
37
- const getPatientChats = validation_1.validateFunction(zod_1.tuple([zod_1.number()]), zod_1.array(schemas_1.doc24Schemas.chatDetails), async (patientId) => {
38
- const path = `/chatroom/visits/${patientId}`;
39
- const response = await makeRequest('GET', path);
40
- return response.data.chatroom_visits.map((c) => ({
41
- id: c.chat_id,
42
- chatRoomId: c.chatroom_id,
43
- status: c.status,
44
- paymentStatus: c.payment_status,
45
- startDate: utils_1.parseDateTime(c.start_date),
46
- lastEventDate: utils_1.parseDateTime(c.fecha_ultimo_evento),
47
- closureDate: c.closure_date && utils_1.parseDateTime(c.closure_date),
48
- patient: {
49
- id: c.patient_id,
50
- firstName: c.patient_name,
51
- lastName: c.patient_lastname,
52
- },
53
- patientLastPost: c.patient_last_post && utils_1.parseDateTime(c.patient_last_post),
54
- professional: {
55
- id: c.professional_id,
56
- fullName: c.professional,
57
- logoUrl: c.logo,
58
- },
59
- professionalLastPost: c.professional_last_post && utils_1.parseDateTime(c.professional_last_post),
60
- specialty: {
61
- id: c.specialty_id,
62
- description: c.specialty,
63
- },
64
- }));
65
- });
66
- const getChatPosts = validation_1.validateFunction(zod_1.tuple([zod_1.number()]), zod_1.array(schemas_1.doc24Schemas.chatPost), async (chatId) => {
67
- const path = `/chatroom/visit/${chatId}`;
68
- const response = await makeRequest('GET', path);
69
- return JSON.parse(response.data.posts).map((p) => ({
70
- id: p.post_id,
71
- message: p.post,
72
- date: utils_1.parseDateTime(p.post_date),
73
- userType: p.user_type === 'P' ? 'patient' : 'professional',
74
- }));
75
- });
76
- const cancelChat = validation_1.validateFunction(zod_1.tuple([zod_1.number()]), zod_1.void(), async (chatId) => {
77
- const path = `/chatroom/visit/${chatId}`;
78
- await makeRequest('DELETE', path);
79
- return;
80
- });
81
- const sendChatMessage = validation_1.validateFunction(zod_1.tuple([zod_1.number(), zod_1.string()]), zod_1.number(), async (chatId, message) => {
82
- const path = `/chatroom/post`;
83
- const response = await makeRequest('POST', path, {
84
- chat_id: chatId,
85
- message,
86
- });
87
- return response.data.post_id;
88
- });
89
- return {
90
- getAvailableChatrooms,
91
- createNewChat,
92
- getPatientChats,
93
- getChatPosts,
94
- cancelChat,
95
- sendChatMessage,
96
- };
97
- };
98
- exports.getChatMethods = getChatMethods;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getChatMethods = void 0;
4
+ const zod_1 = require("zod");
5
+ const validation_1 = require("../request/validation");
6
+ const schemas_1 = require("../schemas");
7
+ const utils_1 = require("../utils");
8
+ const getChatMethods = (makeRequest) => {
9
+ const getAvailableChatrooms = validation_1.validateFunction(zod_1.tuple([zod_1.number(), zod_1.number(), schemas_1.doc24Schemas.chatroomAvailabilityFilter]), zod_1.array(schemas_1.doc24Schemas.availableChatroom), async (patientId, specialtyId, filter) => {
10
+ const path = `/chatroom/availability/${patientId}/${specialtyId}/${JSON.stringify(filter)}`;
11
+ const response = await makeRequest('GET', path);
12
+ return response.data.available_chatrooms.map((r) => ({
13
+ id: r.chatroom_id,
14
+ professional: {
15
+ id: r.professional_id,
16
+ fullName: r.professional,
17
+ logoUrl: r.logo,
18
+ },
19
+ specialty: {
20
+ id: r.specialty_id,
21
+ description: r.specialty,
22
+ },
23
+ }));
24
+ });
25
+ const createNewChat = validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.chatParameters]), zod_1.number(), async (parameters) => {
26
+ const path = `/chatroom/visit`;
27
+ const response = await makeRequest('POST', path, {
28
+ chatroom_data: {
29
+ patient_id: parameters.patientId,
30
+ chatroom_id: parameters.chatroomId,
31
+ language: parameters.language.toLocaleUpperCase(),
32
+ specialty_id: parameters.specialtyId,
33
+ },
34
+ });
35
+ return response.data.chat_id;
36
+ });
37
+ const getPatientChats = validation_1.validateFunction(zod_1.tuple([zod_1.number()]), zod_1.array(schemas_1.doc24Schemas.chatDetails), async (patientId) => {
38
+ const path = `/chatroom/visits/${patientId}`;
39
+ const response = await makeRequest('GET', path);
40
+ return response.data.chatroom_visits.map((c) => ({
41
+ id: c.chat_id,
42
+ chatRoomId: c.chatroom_id,
43
+ status: c.status,
44
+ paymentStatus: c.payment_status,
45
+ startDate: utils_1.parseDateTime(c.start_date),
46
+ lastEventDate: utils_1.parseDateTime(c.fecha_ultimo_evento),
47
+ closureDate: c.closure_date && utils_1.parseDateTime(c.closure_date),
48
+ patient: {
49
+ id: c.patient_id,
50
+ firstName: c.patient_name,
51
+ lastName: c.patient_lastname,
52
+ },
53
+ patientLastPost: c.patient_last_post && utils_1.parseDateTime(c.patient_last_post),
54
+ professional: {
55
+ id: c.professional_id,
56
+ fullName: c.professional,
57
+ logoUrl: c.logo,
58
+ },
59
+ professionalLastPost: c.professional_last_post && utils_1.parseDateTime(c.professional_last_post),
60
+ specialty: {
61
+ id: c.specialty_id,
62
+ description: c.specialty,
63
+ },
64
+ }));
65
+ });
66
+ const getChatPosts = validation_1.validateFunction(zod_1.tuple([zod_1.number()]), zod_1.array(schemas_1.doc24Schemas.chatPost), async (chatId) => {
67
+ const path = `/chatroom/visit/${chatId}`;
68
+ const response = await makeRequest('GET', path);
69
+ return JSON.parse(response.data.posts).map((p) => ({
70
+ id: p.post_id,
71
+ message: p.post,
72
+ date: utils_1.parseDateTime(p.post_date),
73
+ userType: p.user_type === 'P' ? 'patient' : 'professional',
74
+ }));
75
+ });
76
+ const cancelChat = validation_1.validateFunction(zod_1.tuple([zod_1.number()]), zod_1.void(), async (chatId) => {
77
+ const path = `/chatroom/visit/${chatId}`;
78
+ await makeRequest('DELETE', path);
79
+ return;
80
+ });
81
+ const sendChatMessage = validation_1.validateFunction(zod_1.tuple([zod_1.number(), zod_1.string()]), zod_1.number(), async (chatId, message) => {
82
+ const path = `/chatroom/post`;
83
+ const response = await makeRequest('POST', path, {
84
+ chat_id: chatId,
85
+ message,
86
+ });
87
+ return response.data.post_id;
88
+ });
89
+ return {
90
+ getAvailableChatrooms,
91
+ createNewChat,
92
+ getPatientChats,
93
+ getChatPosts,
94
+ cancelChat,
95
+ sendChatMessage,
96
+ };
97
+ };
98
+ exports.getChatMethods = getChatMethods;
@@ -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
- modality: string;
17
- specialty: string;
18
- patientName: string;
19
- clinic: string;
20
- professionalName: string;
21
- }[]>;
22
- cancelExternalAppointment: (appointmentId: {
23
- patientIdentification?: string | undefined;
24
- date: Date;
25
- birthdate: Date;
26
- appointment: string;
27
- id: number;
28
- modality: string;
29
- specialty: string;
30
- patientName: string;
31
- clinic: string;
32
- professionalName: 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
+ modality: string;
17
+ specialty: string;
18
+ patientName: string;
19
+ clinic: string;
20
+ professionalName: string;
21
+ }[]>;
22
+ cancelExternalAppointment: (appointmentId: {
23
+ patientIdentification?: string | undefined;
24
+ date: Date;
25
+ birthdate: Date;
26
+ appointment: string;
27
+ id: number;
28
+ modality: string;
29
+ specialty: string;
30
+ patientName: string;
31
+ clinic: string;
32
+ professionalName: 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,33 +1,33 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.userSdk = void 0;
4
- const request_1 = require("../request");
5
- const binah_1 = require("./binah");
6
- const chat_1 = require("./chat");
7
- const external_1 = require("./external");
8
- const patients_1 = require("./patients");
9
- const schedule_1 = require("./schedule");
10
- const specialties_1 = require("./specialties");
11
- const videoVisit_1 = require("./videoVisit");
12
- const userSdk = async (url, credentials, userId) => {
13
- const makeRequest = await request_1.getRequestFactory(url, credentials, userId);
14
- const patientMethods = patients_1.getPatientMethods(makeRequest);
15
- const specialtyMethods = specialties_1.getSpecialtiesMethods(makeRequest);
16
- const scheduleMethods = schedule_1.getScheduleMethods(makeRequest);
17
- const videoVisitMethods = videoVisit_1.getVideoVisitMethods(makeRequest);
18
- const chatMethods = chat_1.getChatMethods(makeRequest);
19
- const externalMethods = external_1.getExternalMethods(makeRequest);
20
- const binahWellnessMethods = binah_1.getBinahWellnessMethods(makeRequest);
21
- const sdk = {
22
- ...patientMethods,
23
- ...specialtyMethods,
24
- ...scheduleMethods,
25
- ...videoVisitMethods,
26
- ...chatMethods,
27
- ...externalMethods,
28
- ...binahWellnessMethods,
29
- userId,
30
- };
31
- return sdk;
32
- };
33
- 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 binah_1 = require("./binah");
6
+ const chat_1 = require("./chat");
7
+ const external_1 = require("./external");
8
+ const patients_1 = require("./patients");
9
+ const schedule_1 = require("./schedule");
10
+ const specialties_1 = require("./specialties");
11
+ const videoVisit_1 = require("./videoVisit");
12
+ const userSdk = async (url, credentials, userId) => {
13
+ const makeRequest = await request_1.getRequestFactory(url, credentials, userId);
14
+ const patientMethods = patients_1.getPatientMethods(makeRequest);
15
+ const specialtyMethods = specialties_1.getSpecialtiesMethods(makeRequest);
16
+ const scheduleMethods = schedule_1.getScheduleMethods(makeRequest);
17
+ const videoVisitMethods = videoVisit_1.getVideoVisitMethods(makeRequest);
18
+ const chatMethods = chat_1.getChatMethods(makeRequest);
19
+ const externalMethods = external_1.getExternalMethods(makeRequest);
20
+ const binahWellnessMethods = binah_1.getBinahWellnessMethods(makeRequest);
21
+ const sdk = {
22
+ ...patientMethods,
23
+ ...specialtyMethods,
24
+ ...scheduleMethods,
25
+ ...videoVisitMethods,
26
+ ...chatMethods,
27
+ ...externalMethods,
28
+ ...binahWellnessMethods,
29
+ userId,
30
+ };
31
+ return sdk;
32
+ };
33
+ exports.userSdk = userSdk;
@@ -1,58 +1,58 @@
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
- emergencyContact?: string | null | undefined;
9
- emergencyContactPhone?: string | number | null | undefined;
10
- credential?: string | null | undefined;
11
- plan?: string | null | undefined;
12
- affiliationStatus?: string | null | undefined;
13
- localidad?: string | null | undefined;
14
- codPostal?: string | null | undefined;
15
- firstName: string;
16
- lastName: string;
17
- countryId: string;
18
- birthdate: Date;
19
- };
20
- } & {
21
- code?: string | undefined;
22
- channel?: "1" | "2" | undefined;
23
- }) => Promise<{
24
- askCode: true;
25
- userInfo: {
26
- firstName: string;
27
- lastName: string;
28
- phone: string;
29
- email: string;
30
- };
31
- } | {
32
- patientId: number | null;
33
- askCode: false;
34
- }>;
35
- getPatientId: (patient: {
36
- identificationType?: number | undefined;
37
- identificationValue?: string | undefined;
38
- gender?: "m" | "f" | "o" | undefined;
39
- emergencyContact?: string | null | undefined;
40
- emergencyContactPhone?: string | number | null | undefined;
41
- credential?: string | null | undefined;
42
- plan?: string | null | undefined;
43
- affiliationStatus?: string | null | undefined;
44
- localidad?: string | null | undefined;
45
- codPostal?: string | null | undefined;
46
- firstName: string;
47
- lastName: string;
48
- countryId: string;
49
- birthdate: Date;
50
- }) => Promise<number>;
51
- deletePatient: (patientId: number) => Promise<void>;
52
- getPatientPHR: (patientId: number) => Promise<string>;
53
- submitHealthQuiz: (params: {
54
- patientId: number;
55
- quiz: Record<string, any>;
56
- origen: string;
57
- }) => Promise<void>;
58
- };
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
+ emergencyContact?: string | null | undefined;
9
+ emergencyContactPhone?: string | number | null | undefined;
10
+ credential?: string | null | undefined;
11
+ plan?: string | null | undefined;
12
+ affiliationStatus?: string | null | undefined;
13
+ localidad?: string | null | undefined;
14
+ codPostal?: string | null | undefined;
15
+ firstName: string;
16
+ lastName: string;
17
+ countryId: string;
18
+ birthdate: Date;
19
+ };
20
+ } & {
21
+ code?: string | undefined;
22
+ channel?: "1" | "2" | undefined;
23
+ }) => Promise<{
24
+ askCode: true;
25
+ userInfo: {
26
+ firstName: string;
27
+ lastName: string;
28
+ phone: string;
29
+ email: string;
30
+ };
31
+ } | {
32
+ patientId: number | null;
33
+ askCode: false;
34
+ }>;
35
+ getPatientId: (patient: {
36
+ identificationType?: number | undefined;
37
+ identificationValue?: string | undefined;
38
+ gender?: "m" | "f" | "o" | undefined;
39
+ emergencyContact?: string | null | undefined;
40
+ emergencyContactPhone?: string | number | null | undefined;
41
+ credential?: string | null | undefined;
42
+ plan?: string | null | undefined;
43
+ affiliationStatus?: string | null | undefined;
44
+ localidad?: string | null | undefined;
45
+ codPostal?: string | null | undefined;
46
+ firstName: string;
47
+ lastName: string;
48
+ countryId: string;
49
+ birthdate: Date;
50
+ }) => Promise<number>;
51
+ deletePatient: (patientId: number) => Promise<void>;
52
+ getPatientPHR: (patientId: number) => Promise<string>;
53
+ submitHealthQuiz: (params: {
54
+ patientId: number;
55
+ quiz: Record<string, any>;
56
+ origen: string;
57
+ }) => Promise<void>;
58
+ };