@integraciones_doc24/sdk 1.12.5 → 1.13.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/baseSdk/user.js +2 -0
- package/lib/schemas.d.ts +6 -0
- package/lib/schemas.js +1 -0
- package/lib/userSdk/sarasas.d.ts +6 -0
- package/lib/userSdk/sarasas.js +13 -0
- package/lib/userSdk/videoVisit.d.ts +2 -0
- package/lib/userSdk/videoVisit.js +1 -0
- package/package.json +1 -1
package/lib/baseSdk/user.js
CHANGED
|
@@ -87,6 +87,8 @@ const getUserMethods = (makeRequest, url, credentials) => {
|
|
|
87
87
|
const path = `/info-coverage/${identificationValue}`;
|
|
88
88
|
const response = await makeRequest('GET', path);
|
|
89
89
|
const raw = response.data.info;
|
|
90
|
+
if (!raw)
|
|
91
|
+
return null;
|
|
90
92
|
const mappedCoverageInfo = {
|
|
91
93
|
financerId: raw.id_financiador,
|
|
92
94
|
defaultAffiliationId: raw.id_afiliacion_default,
|
package/lib/schemas.d.ts
CHANGED
|
@@ -307,11 +307,13 @@ export declare const doc24Schemas: {
|
|
|
307
307
|
language: import("zod").ZodString;
|
|
308
308
|
details: import("zod").ZodString;
|
|
309
309
|
extraInfo: import("zod").ZodAny;
|
|
310
|
+
origin: import("zod").ZodOptional<import("zod").ZodString>;
|
|
310
311
|
}, {
|
|
311
312
|
type: import("zod").ZodLiteral<"appointment">;
|
|
312
313
|
appointmentId: import("zod").ZodUnion<[import("zod").ZodNumber, import("zod").ZodString]>;
|
|
313
314
|
}>, "strip", import("zod").ZodTypeAny, {
|
|
314
315
|
extraInfo?: any;
|
|
316
|
+
origin?: string | undefined;
|
|
315
317
|
type: "appointment";
|
|
316
318
|
patientId: number;
|
|
317
319
|
specialtyId: number;
|
|
@@ -320,6 +322,7 @@ export declare const doc24Schemas: {
|
|
|
320
322
|
appointmentId: string | number;
|
|
321
323
|
}, {
|
|
322
324
|
extraInfo?: any;
|
|
325
|
+
origin?: string | undefined;
|
|
323
326
|
type: "appointment";
|
|
324
327
|
patientId: number;
|
|
325
328
|
specialtyId: number;
|
|
@@ -332,10 +335,12 @@ export declare const doc24Schemas: {
|
|
|
332
335
|
language: import("zod").ZodString;
|
|
333
336
|
details: import("zod").ZodString;
|
|
334
337
|
extraInfo: import("zod").ZodAny;
|
|
338
|
+
origin: import("zod").ZodOptional<import("zod").ZodString>;
|
|
335
339
|
}, {
|
|
336
340
|
type: import("zod").ZodLiteral<"instant">;
|
|
337
341
|
}>, "strip", import("zod").ZodTypeAny, {
|
|
338
342
|
extraInfo?: any;
|
|
343
|
+
origin?: string | undefined;
|
|
339
344
|
type: "instant";
|
|
340
345
|
patientId: number;
|
|
341
346
|
specialtyId: number;
|
|
@@ -343,6 +348,7 @@ export declare const doc24Schemas: {
|
|
|
343
348
|
details: string;
|
|
344
349
|
}, {
|
|
345
350
|
extraInfo?: any;
|
|
351
|
+
origin?: string | undefined;
|
|
346
352
|
type: "instant";
|
|
347
353
|
patientId: number;
|
|
348
354
|
specialtyId: number;
|
package/lib/schemas.js
CHANGED
|
@@ -63,6 +63,7 @@ const baseScheduleParameters = zod_1.object({
|
|
|
63
63
|
language: zod_1.string(),
|
|
64
64
|
details: zod_1.string(),
|
|
65
65
|
extraInfo: zod_1.any(),
|
|
66
|
+
origin: zod_1.string().optional(),
|
|
66
67
|
});
|
|
67
68
|
const appointmentScheduleParameters = baseScheduleParameters.extend({
|
|
68
69
|
type: zod_1.literal('appointment'),
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getSarasaMethods = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const validation_1 = require("../request/validation");
|
|
6
|
+
const schemas_1 = require("../schemas");
|
|
7
|
+
const getSarasaMethods = (_makeRequest) => {
|
|
8
|
+
const getSarasa = validation_1.validateFunction(zod_1.tuple([zod_1.string()]), schemas_1.doc24Schemas.sarasa, async (userId) => {
|
|
9
|
+
return { id: userId };
|
|
10
|
+
});
|
|
11
|
+
return { getSarasa };
|
|
12
|
+
};
|
|
13
|
+
exports.getSarasaMethods = getSarasaMethods;
|
|
@@ -2,6 +2,7 @@ import { RequestMaker } from '../request';
|
|
|
2
2
|
export declare const getVideoVisitMethods: (makeRequest: RequestMaker) => {
|
|
3
3
|
scheduleVideoVisit: (params: {
|
|
4
4
|
extraInfo?: any;
|
|
5
|
+
origin?: string | undefined;
|
|
5
6
|
type: "appointment";
|
|
6
7
|
patientId: number;
|
|
7
8
|
specialtyId: number;
|
|
@@ -10,6 +11,7 @@ export declare const getVideoVisitMethods: (makeRequest: RequestMaker) => {
|
|
|
10
11
|
appointmentId: string | number;
|
|
11
12
|
} | {
|
|
12
13
|
extraInfo?: any;
|
|
14
|
+
origin?: string | undefined;
|
|
13
15
|
type: "instant";
|
|
14
16
|
patientId: number;
|
|
15
17
|
specialtyId: number;
|
|
@@ -20,6 +20,7 @@ const getVideoVisitMethods = (makeRequest) => {
|
|
|
20
20
|
language: params.language.toUpperCase(),
|
|
21
21
|
details: params.details,
|
|
22
22
|
extra_info: params.extraInfo,
|
|
23
|
+
origin: params.origin,
|
|
23
24
|
};
|
|
24
25
|
const response = await makeRequest('POST', '/video-visit', mappedParams);
|
|
25
26
|
return response.data.vc_token;
|