@integraciones_doc24/sdk 0.29.0 → 0.30.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/lib/index.d.ts CHANGED
@@ -34,7 +34,7 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
34
34
  lastName: string;
35
35
  birthdate: Date;
36
36
  gender: "m" | "f";
37
- phone: string;
37
+ phone: string | null;
38
38
  email: string;
39
39
  specialties: {
40
40
  id: number;
package/lib/schemas.d.ts CHANGED
@@ -144,11 +144,11 @@ export declare const doc24Schemas: {
144
144
  type: import("zod").ZodEnum<["appointment", "chat", "instant"]>;
145
145
  atentions: import("zod").ZodNumber;
146
146
  ranking: import("zod").ZodUnknown;
147
- length: import("zod").ZodNullable<import("zod").ZodNumber>;
147
+ length: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>;
148
148
  }, "strip", import("zod").ZodTypeAny, {
149
+ length?: number | null | undefined;
149
150
  ranking?: unknown;
150
151
  date: Date;
151
- length: number | null;
152
152
  type: "appointment" | "chat" | "instant";
153
153
  id: string | number;
154
154
  professional: {
@@ -164,9 +164,9 @@ export declare const doc24Schemas: {
164
164
  };
165
165
  atentions: number;
166
166
  }, {
167
+ length?: number | null | undefined;
167
168
  ranking?: unknown;
168
169
  date: Date;
169
- length: number | null;
170
170
  type: "appointment" | "chat" | "instant";
171
171
  id: string | number;
172
172
  professional: {
@@ -618,7 +618,7 @@ export declare const doc24Schemas: {
618
618
  birthdate: import("zod").ZodDate;
619
619
  gender: import("zod").ZodEnum<["m", "f"]>;
620
620
  email: import("zod").ZodString;
621
- phone: import("zod").ZodString;
621
+ phone: import("zod").ZodNullable<import("zod").ZodString>;
622
622
  logoUrl: import("zod").ZodString;
623
623
  matriculation: import("zod").ZodArray<import("zod").ZodObject<{
624
624
  number: import("zod").ZodString;
@@ -659,7 +659,7 @@ export declare const doc24Schemas: {
659
659
  lastName: string;
660
660
  birthdate: Date;
661
661
  gender: "m" | "f";
662
- phone: string;
662
+ phone: string | null;
663
663
  email: string;
664
664
  specialties: {
665
665
  id: number;
@@ -682,7 +682,7 @@ export declare const doc24Schemas: {
682
682
  lastName: string;
683
683
  birthdate: Date;
684
684
  gender: "m" | "f";
685
- phone: string;
685
+ phone: string | null;
686
686
  email: string;
687
687
  specialties: {
688
688
  id: number;
package/lib/schemas.js CHANGED
@@ -37,7 +37,7 @@ const availableAppointment = zod_1.object({
37
37
  type: specialtyMode,
38
38
  atentions: zod_1.number(),
39
39
  ranking: zod_1.unknown(),
40
- length: zod_1.number().nullable(),
40
+ length: zod_1.number().nullish(),
41
41
  });
42
42
  const appointment = zod_1.object({
43
43
  id: zod_1.number(),
@@ -215,7 +215,7 @@ exports.doc24Schemas = {
215
215
  birthdate: zod_1.date(),
216
216
  gender,
217
217
  email: zod_1.string(),
218
- phone: zod_1.string(),
218
+ phone: zod_1.string().nullable(),
219
219
  logoUrl: zod_1.string(),
220
220
  matriculation: zod_1.array(zod_1.object({ number: zod_1.string(), type: zod_1.string() })),
221
221
  specialties: zod_1.array(specialty),
package/lib/types.d.ts CHANGED
@@ -42,6 +42,7 @@ export declare namespace Doc24 {
42
42
  cancelVideoVisit: (vcToken: string) => Promise<void>;
43
43
  getVideoVisit: (vcToken: string, patientId: number) => Promise<VideoVisit>;
44
44
  getVideoVisitDetails: (vcId: number) => Promise<VideoVisitDetails>;
45
+ getVideoVisitLink: (vcToken: string, patientId: number) => Promise<string | null>;
45
46
  getPatientVideoVisitHistory: (patientId: number) => Promise<VideoVisit[]>;
46
47
  getActiveVideoVisits: () => Promise<ActiveVideoVisitData[]>;
47
48
  getAvailableChatrooms: (patientId: number, specialtyId: number, filter: ChatroomAvailabilityFilter) => Promise<AvailableChatroom[]>;
@@ -9,9 +9,9 @@ export declare const getScheduleMethods: (makeRequest: RequestMaker) => {
9
9
  startHour?: string | undefined;
10
10
  finishHour?: string | undefined;
11
11
  } | undefined) => Promise<{
12
+ length?: number | null | undefined;
12
13
  ranking?: unknown;
13
14
  date: Date;
14
- length: number | null;
15
15
  type: "appointment" | "chat" | "instant";
16
16
  id: string | number;
17
17
  professional: {
@@ -102,6 +102,7 @@ export declare const getVideoVisitMethods: (makeRequest: RequestMaker) => {
102
102
  url: string;
103
103
  }[];
104
104
  }>;
105
+ getVideoVisitLink: (vcToken: string, patientId: number) => Promise<string | null>;
105
106
  getActiveVideoVisits: () => Promise<{
106
107
  patientId: number;
107
108
  vcToken: string;
@@ -58,7 +58,8 @@ const getVideoVisitMethods = (makeRequest) => {
58
58
  lastAccessDate: response.data.patient_last_access_date &&
59
59
  utils_1.parseDateTime(response.data.patient_last_access_date),
60
60
  },
61
- finishDate: response.data.finish_date && utils_1.parseDateTime(response.data.finish_date),
61
+ finishDate: response.data.finish_date &&
62
+ utils_1.parseDateTime(response.data.finish_date),
62
63
  retries: response.data.retries,
63
64
  language: response.data.language,
64
65
  appointment: response.data.appointment_id
@@ -107,12 +108,18 @@ const getVideoVisitMethods = (makeRequest) => {
107
108
  vcToken: s.vc_token,
108
109
  }));
109
110
  });
111
+ const getVideoVisitLink = validation_1.validateFunction(zod_1.tuple([zod_1.string(), zod_1.number()]), zod_1.string().nullable(), async (vcToken, patientId) => {
112
+ const path = `/video-visit-link/${vcToken}/${patientId}`;
113
+ const response = await makeRequest('GET', path);
114
+ return response.data.link;
115
+ });
110
116
  return {
111
117
  scheduleVideoVisit,
112
118
  cancelVideoVisit,
113
119
  getVideoVisit,
114
120
  getPatientVideoVisitHistory,
115
121
  getVideoVisitDetails,
122
+ getVideoVisitLink,
116
123
  getActiveVideoVisits,
117
124
  };
118
125
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@integraciones_doc24/sdk",
3
- "version": "0.29.0",
3
+ "version": "0.30.0",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {