@integraciones_doc24/sdk 1.15.18 → 1.16.0

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
@@ -197,6 +197,7 @@ export type UserSdk = {
197
197
  getChatPosts: (chatId: number) => Promise<ChatPost[]>;
198
198
  cancelChat: (chatId: number) => Promise<void>;
199
199
  sendChatMessage: (chatId: number, message: string) => Promise<number>;
200
+ getPatientPHR: (patientId: number) => Promise<string>;
200
201
  userId: number;
201
202
  };
202
203
  ```
package/lib/schemas.d.ts CHANGED
@@ -856,7 +856,7 @@ export declare const doc24Schemas: {
856
856
  professionalsListItem: import("zod").ZodObject<{
857
857
  id: import("zod").ZodNumber;
858
858
  fullName: import("zod").ZodString;
859
- consultation_value: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodString>>>;
859
+ consultation_value: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodNumber, import("zod").ZodString]>>>>;
860
860
  logoUrl: import("zod").ZodOptional<import("zod").ZodString>;
861
861
  primer_turno: import("zod").ZodOptional<import("zod").ZodString>;
862
862
  degree: import("zod").ZodOptional<import("zod").ZodString>;
@@ -864,7 +864,7 @@ export declare const doc24Schemas: {
864
864
  }, "strip", import("zod").ZodTypeAny, {
865
865
  logoUrl?: string | undefined;
866
866
  brief?: string | undefined;
867
- consultation_value?: string | null | undefined;
867
+ consultation_value?: string | number | null | undefined;
868
868
  degree?: string | undefined;
869
869
  primer_turno?: string | undefined;
870
870
  id: number;
@@ -872,7 +872,7 @@ export declare const doc24Schemas: {
872
872
  }, {
873
873
  logoUrl?: string | undefined;
874
874
  brief?: string | undefined;
875
- consultation_value?: string | null | undefined;
875
+ consultation_value?: string | number | null | undefined;
876
876
  degree?: string | undefined;
877
877
  primer_turno?: string | undefined;
878
878
  id: number;
package/lib/schemas.js CHANGED
@@ -401,7 +401,7 @@ exports.doc24Schemas = {
401
401
  professionalsListItem: zod_1.object({
402
402
  id: zod_1.number(),
403
403
  fullName: zod_1.string(),
404
- consultation_value: zod_1.string().optional().nullish(),
404
+ consultation_value: zod_1.number().or(zod_1.string()).optional().nullish(),
405
405
  logoUrl: zod_1.string().optional(),
406
406
  primer_turno: zod_1.string().optional(),
407
407
  degree: zod_1.string().optional(),
package/lib/types.d.ts CHANGED
@@ -93,6 +93,7 @@ export declare namespace Doc24 {
93
93
  getExternalAppointmentsLink: (identificationValue: string, birthdate: Date) => Promise<string | null>;
94
94
  getExternalAppointments: () => Promise<ExternalAppointment[]>;
95
95
  cancelExternalAppointment: (appointmentId: ExternalAppointment) => Promise<void>;
96
+ getPatientPHR: (patientId: number) => Promise<string>;
96
97
  userId: number;
97
98
  };
98
99
  namespace Webhook {
@@ -35,4 +35,5 @@ export declare const getPatientMethods: (makeRequest: RequestMaker) => {
35
35
  birthdate: Date;
36
36
  }) => Promise<number>;
37
37
  deletePatient: (patientId: number) => Promise<void>;
38
+ getPatientPHR: (patientId: number) => Promise<string>;
38
39
  };
@@ -58,10 +58,16 @@ const getPatientMethods = (makeRequest) => {
58
58
  const path = `/patient/${patientId}`;
59
59
  await makeRequest('DELETE', path);
60
60
  };
61
+ const getPatientPHR = async (patientId) => {
62
+ const path = `/view-phr/${patientId}`;
63
+ const response = await makeRequest('GET', path);
64
+ return response.data.url_acceso_paciente;
65
+ };
61
66
  return {
62
67
  declarePatient: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.declarePatientParams]), schemas_1.doc24Schemas.declarePatientResponse, declarePatient),
63
68
  getPatientId: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.patient]), zod_1.number(), getPatientId),
64
69
  deletePatient: validation_1.validateFunction(zod_1.tuple([zod_1.number()]), zod_1.void(), deletePatient),
70
+ getPatientPHR: validation_1.validateFunction(zod_1.tuple([zod_1.number()]), zod_1.string(), getPatientPHR),
65
71
  };
66
72
  };
67
73
  exports.getPatientMethods = getPatientMethods;
@@ -7,7 +7,7 @@ export declare const getSpecialtiesMethods: (makeRequest: RequestMaker) => {
7
7
  getProfessionalsBySpecialty: (...params: any) => Promise<{
8
8
  logoUrl?: string | undefined;
9
9
  brief?: string | undefined;
10
- consultation_value?: string | null | undefined;
10
+ consultation_value?: string | number | null | undefined;
11
11
  degree?: string | undefined;
12
12
  primer_turno?: string | undefined;
13
13
  id: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integraciones_doc24/sdk",
3
- "version": "1.15.18",
3
+ "version": "1.16.0",
4
4
  "publishConfig": {
5
5
  "tag": "latest"
6
6
  },
@@ -33,4 +33,4 @@
33
33
  "files": [
34
34
  "lib"
35
35
  ]
36
- }
36
+ }