@integraciones_doc24/sdk 1.15.16 → 1.15.17
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/index.js +15 -2
- package/lib/index.d.ts +4 -12
- package/lib/schemas.d.ts +9 -9
- package/lib/schemas.js +3 -3
- package/lib/types.d.ts +1 -1
- package/package.json +1 -1
package/lib/baseSdk/index.js
CHANGED
|
@@ -9,6 +9,7 @@ const utils_1 = require("../utils");
|
|
|
9
9
|
const diagnostica_1 = require("./diagnostica");
|
|
10
10
|
const user_1 = require("./user");
|
|
11
11
|
const external_1 = require("./external");
|
|
12
|
+
const token_1 = require("../request/token");
|
|
12
13
|
const getBaseSdk = async (url, credentials) => {
|
|
13
14
|
const makeRequest = await request_1.getRequestFactory(url, credentials);
|
|
14
15
|
const diagnosticaMethods = diagnostica_1.getDiagnosticaMethods(makeRequest);
|
|
@@ -70,7 +71,7 @@ const getBaseSdk = async (url, credentials) => {
|
|
|
70
71
|
};
|
|
71
72
|
return mapped;
|
|
72
73
|
}),
|
|
73
|
-
getProfessionalsBySpecialty: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.professionalsBySpecialtyFilter]), zod_1.
|
|
74
|
+
getProfessionalsBySpecialty: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.professionalsBySpecialtyFilter]), zod_1.any(), async (body = {}) => {
|
|
74
75
|
var _a;
|
|
75
76
|
const mappedBody = {
|
|
76
77
|
specialty_id: body.specialtyId,
|
|
@@ -92,7 +93,19 @@ const getBaseSdk = async (url, credentials) => {
|
|
|
92
93
|
degree: rawItem.degree,
|
|
93
94
|
};
|
|
94
95
|
};
|
|
95
|
-
|
|
96
|
+
const token = await token_1.getToken(credentials, JSON.stringify(mappedBody));
|
|
97
|
+
const token2 = await token_1.getToken(credentials, undefined);
|
|
98
|
+
/*return (response.data.profesionales as any[]).map((o) =>
|
|
99
|
+
mapProfessionalResponse(o),
|
|
100
|
+
);*/
|
|
101
|
+
const professionals = response.data.profesionales.map((o) => mapProfessionalResponse(o));
|
|
102
|
+
return {
|
|
103
|
+
response,
|
|
104
|
+
mappedBody,
|
|
105
|
+
token,
|
|
106
|
+
token2,
|
|
107
|
+
professionals,
|
|
108
|
+
};
|
|
96
109
|
}),
|
|
97
110
|
};
|
|
98
111
|
return baseSdk;
|
package/lib/index.d.ts
CHANGED
|
@@ -82,19 +82,11 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
82
82
|
}>;
|
|
83
83
|
getProfessionalsBySpecialty: (body: {
|
|
84
84
|
specialtyId?: number | null | undefined;
|
|
85
|
-
language?: string | undefined;
|
|
85
|
+
language?: string | null | undefined;
|
|
86
86
|
professionalId?: number | null | undefined;
|
|
87
|
-
offset?: number | undefined;
|
|
88
|
-
limit?: number | undefined;
|
|
89
|
-
}) => Promise<
|
|
90
|
-
logoUrl?: string | undefined;
|
|
91
|
-
brief?: string | undefined;
|
|
92
|
-
consultation_value?: string | null | undefined;
|
|
93
|
-
degree?: string | undefined;
|
|
94
|
-
primer_turno?: string | undefined;
|
|
95
|
-
id: number;
|
|
96
|
-
fullName: string;
|
|
97
|
-
}[]>;
|
|
87
|
+
offset?: number | null | undefined;
|
|
88
|
+
limit?: number | null | undefined;
|
|
89
|
+
}) => Promise<any>;
|
|
98
90
|
getAvailableScheduleClinics: () => Promise<{
|
|
99
91
|
specialties: {
|
|
100
92
|
id: number;
|
package/lib/schemas.d.ts
CHANGED
|
@@ -313,21 +313,21 @@ export declare const doc24Schemas: {
|
|
|
313
313
|
professionalsBySpecialtyFilter: import("zod").ZodObject<{
|
|
314
314
|
professionalId: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
315
315
|
specialtyId: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
316
|
-
offset: import("zod").ZodOptional<import("zod").ZodNumber
|
|
317
|
-
limit: import("zod").ZodOptional<import("zod").ZodNumber
|
|
318
|
-
language: import("zod").ZodOptional<import("zod").ZodString
|
|
316
|
+
offset: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
317
|
+
limit: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodNumber>>;
|
|
318
|
+
language: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
319
319
|
}, "strip", import("zod").ZodTypeAny, {
|
|
320
320
|
specialtyId?: number | null | undefined;
|
|
321
|
-
language?: string | undefined;
|
|
321
|
+
language?: string | null | undefined;
|
|
322
322
|
professionalId?: number | null | undefined;
|
|
323
|
-
offset?: number | undefined;
|
|
324
|
-
limit?: number | undefined;
|
|
323
|
+
offset?: number | null | undefined;
|
|
324
|
+
limit?: number | null | undefined;
|
|
325
325
|
}, {
|
|
326
326
|
specialtyId?: number | null | undefined;
|
|
327
|
-
language?: string | undefined;
|
|
327
|
+
language?: string | null | undefined;
|
|
328
328
|
professionalId?: number | null | undefined;
|
|
329
|
-
offset?: number | undefined;
|
|
330
|
-
limit?: number | undefined;
|
|
329
|
+
offset?: number | null | undefined;
|
|
330
|
+
limit?: number | null | undefined;
|
|
331
331
|
}>;
|
|
332
332
|
scheduleParameters: import("zod").ZodUnion<[import("zod").ZodObject<import("zod").extendShape<{
|
|
333
333
|
patientId: import("zod").ZodNumber;
|
package/lib/schemas.js
CHANGED
|
@@ -328,9 +328,9 @@ exports.doc24Schemas = {
|
|
|
328
328
|
professionalsBySpecialtyFilter: zod_1.object({
|
|
329
329
|
professionalId: zod_1.number().optional().nullable(),
|
|
330
330
|
specialtyId: zod_1.number().optional().nullable(),
|
|
331
|
-
offset: zod_1.number().optional(),
|
|
332
|
-
limit: zod_1.number().optional(),
|
|
333
|
-
language: zod_1.string().optional(),
|
|
331
|
+
offset: zod_1.number().optional().nullable(),
|
|
332
|
+
limit: zod_1.number().optional().nullable(),
|
|
333
|
+
language: zod_1.string().optional().nullable(),
|
|
334
334
|
}),
|
|
335
335
|
scheduleParameters: zod_1.union([
|
|
336
336
|
appointmentScheduleParameters,
|
package/lib/types.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export declare namespace Doc24 {
|
|
|
52
52
|
getUserId: (user: User) => Promise<number>;
|
|
53
53
|
getUserInstance: (user: User | number) => Promise<UserSdk>;
|
|
54
54
|
getProfessional: (professionalId: number) => Promise<Professional>;
|
|
55
|
-
getProfessionalsBySpecialty: (body: ProfessionalsBySpecialtyFilter) => Promise<
|
|
55
|
+
getProfessionalsBySpecialty: (body: ProfessionalsBySpecialtyFilter) => Promise<any>;
|
|
56
56
|
getAvailableScheduleClinics: () => Promise<AvailableScheduleClinics>;
|
|
57
57
|
enroll: (params: EnrollmentParams) => Promise<void>;
|
|
58
58
|
getCoverageInfo: (identificationValue: string) => Promise<CoverageInfo>;
|