@integraciones_doc24/sdk 1.14.3 → 1.14.5

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/README.md CHANGED
@@ -110,11 +110,13 @@ export type BaseSdk = {
110
110
  params: VerifyExternalVerificationCodeParams,
111
111
  ) => Promise<any>;
112
112
  externalResetPassword: (params: ExternalResetPasswordParams) => Promise<any>;
113
- getExternalStudiesHistoryLink: (patient: ExternalPatient) => Promise<string>;
113
+ getExternalStudiesHistoryLink: (
114
+ patient: ExternalPatient,
115
+ ) => Promise<string | null>;
114
116
  getExternalAppointmentsLink: (
115
117
  identificationValue: string,
116
118
  birthdate: Date,
117
- ) => Promise<string>;
119
+ ) => Promise<string | null>;
118
120
  getExternalAppointments: () => Promise<ExternalAppointment[]>;
119
121
  cancelExternalAppointment: (
120
122
  appointmentId: ExternalAppointment,
@@ -181,7 +183,9 @@ export type UserSdk = {
181
183
  vcToken: string,
182
184
  patientId: number,
183
185
  ) => Promise<string | null>;
184
- getPatientVideoVisitHistory: (patientId: number) => Promise<VideoVisit[]>;
186
+ getPatientVideoVisitHistory: (
187
+ patientId: number,
188
+ ) => Promise<HistoricalVideoVisit[]>;
185
189
  getActiveVideoVisits: () => Promise<ActiveVideoVisitData[]>;
186
190
  getAvailableChatrooms: (
187
191
  patientId: number,
package/lib/test.js CHANGED
@@ -6,23 +6,15 @@ const test = async () => {
6
6
  const baseSdk = await _1.doc24Sdk({
7
7
  url: 'https://tapi.doc24.com.ar/ws/sdk',
8
8
  credentials: {
9
- iss: 'Diagnostica',
10
- key: 'gS2J78V0Zw8XiZJPGC9RS8TlECgqM2TmVtOzNAZbqputgmtc',
9
+ // iss: 'Diagnostica',
10
+ // key: 'gS2J78V0Zw8XiZJPGC9RS8TlECgqM2TmVtOzNAZbqputgmtc',
11
+ iss: 'wehealthy',
12
+ key: '33Ypv5jQ1VTr1KcOImdBhPnoRDqmPlYR3JWbrlUim9U=',
11
13
  },
12
14
  });
13
- const userId = await baseSdk.getUserInstance({
14
- firstName: '-',
15
- lastName: '-',
16
- identificationType: 'nn',
17
- identificationValue: 'jhYuPe9wu8WmSUroB4tLq8',
18
- // identificationValue: '6511a9d659bbdfce7385dfda',
19
- countryId: 'AR',
20
- birthdate: new Date('2023-09-25'),
21
- gender: 'm',
22
- phone: '',
23
- email: 'nomail@diagnostica.com.ar',
24
- });
25
- console.log(userId.userId);
15
+ const userSdk = await baseSdk.getUserInstance(14735);
16
+ const spe = await userSdk.getSpecialties('instant', 'ES');
17
+ console.log(spe);
26
18
  // const userSdk = await baseSdk.getUserInstance(20892);
27
19
  // const res = await userSdk.updatePatient(
28
20
  // {
@@ -58,7 +58,7 @@ const getScheduleMethods = (makeRequest) => {
58
58
  return {
59
59
  id: response.data.id,
60
60
  professionalId: response.data.professional_id,
61
- date: utils_1.parseDateTime(`${response.data.date} ${response.data.hour}`),
61
+ date: utils_1.parseDateTime(`${response.data.date} ${response.data.hour}`, response.data.time_zone),
62
62
  };
63
63
  };
64
64
  const getAppointmentByVcToken = async (vcToken) => {
@@ -67,7 +67,7 @@ const getScheduleMethods = (makeRequest) => {
67
67
  return {
68
68
  id: response.data.id,
69
69
  professionalId: response.data.professional_id,
70
- date: utils_1.parseDateTime(`${response.data.date} ${response.data.hour}`),
70
+ date: utils_1.parseDateTime(`${response.data.date} ${response.data.hour}`, response.data.time_zone),
71
71
  };
72
72
  };
73
73
  return {
@@ -65,7 +65,7 @@ const getVideoVisitMethods = (makeRequest) => {
65
65
  appointment: response.data.appointment_id
66
66
  ? {
67
67
  id: response.data.appointment_id,
68
- date: utils_1.parseDateTime(`${response.data.appointment_date} ${response.data.appointment_time}`),
68
+ date: utils_1.parseDateTime(`${response.data.appointment_date} ${response.data.appointment_time}`, response.data.time_zone),
69
69
  }
70
70
  : null,
71
71
  report: {
@@ -135,7 +135,7 @@ const mapVideoVisit = (raw) => {
135
135
  appointment: raw.appointment_id
136
136
  ? {
137
137
  id: raw.appointment_id,
138
- date: utils_1.parseDateTime(`${raw.appointment_date} ${raw.appointment_time}`),
138
+ date: utils_1.parseDateTime(`${raw.appointment_date} ${raw.appointment_time}`, raw.time_zone),
139
139
  }
140
140
  : undefined,
141
141
  videoVisit: raw.video_visit_id
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integraciones_doc24/sdk",
3
- "version": "1.14.3",
3
+ "version": "1.14.5",
4
4
  "publishConfig": {
5
5
  "tag": "latest"
6
6
  },