@integraciones_doc24/sdk 0.29.1 → 0.31.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/schemas.d.ts +3 -3
- package/lib/schemas.js +1 -1
- package/lib/types.d.ts +1 -0
- package/lib/userSdk/schedule.d.ts +1 -1
- package/lib/userSdk/videoVisit.d.ts +1 -0
- package/lib/userSdk/videoVisit.js +8 -1
- package/package.json +3 -1
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: {
|
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().
|
|
40
|
+
length: zod_1.number().nullish(),
|
|
41
41
|
});
|
|
42
42
|
const appointment = zod_1.object({
|
|
43
43
|
id: zod_1.number(),
|
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 &&
|
|
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.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -12,10 +12,12 @@
|
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"axios": "^0.21.0",
|
|
14
14
|
"date-fns": "^2.16.1",
|
|
15
|
+
"debug": "^4.3.4",
|
|
15
16
|
"jsonwebtoken": "^8.5.1",
|
|
16
17
|
"zod": "^3.8.1"
|
|
17
18
|
},
|
|
18
19
|
"devDependencies": {
|
|
20
|
+
"@types/debug": "^4.1.7",
|
|
19
21
|
"@types/jsonwebtoken": "^8.5.0",
|
|
20
22
|
"typescript": "^4.1.3"
|
|
21
23
|
},
|