@integraciones_doc24/sdk 1.16.6 → 1.16.7
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 +16 -0
- package/lib/schemas.js +7 -0
- package/lib/types.d.ts +2 -1
- package/lib/userSdk/binah.d.ts +6 -1
- package/lib/userSdk/binah.js +11 -4
- package/package.json +1 -1
package/lib/schemas.d.ts
CHANGED
|
@@ -1840,6 +1840,22 @@ export declare const doc24Schemas: {
|
|
|
1840
1840
|
};
|
|
1841
1841
|
signature: string;
|
|
1842
1842
|
}>;
|
|
1843
|
+
binahWellnessGetLinkParams: import("zod").ZodObject<{
|
|
1844
|
+
provider: import("zod").ZodString;
|
|
1845
|
+
patientId: import("zod").ZodNumber;
|
|
1846
|
+
socketUrl: import("zod").ZodString;
|
|
1847
|
+
socketAuthToken: import("zod").ZodString;
|
|
1848
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
1849
|
+
patientId: number;
|
|
1850
|
+
provider: string;
|
|
1851
|
+
socketUrl: string;
|
|
1852
|
+
socketAuthToken: string;
|
|
1853
|
+
}, {
|
|
1854
|
+
patientId: number;
|
|
1855
|
+
provider: string;
|
|
1856
|
+
socketUrl: string;
|
|
1857
|
+
socketAuthToken: string;
|
|
1858
|
+
}>;
|
|
1843
1859
|
emailOrPhone: import("zod").ZodEffects<import("zod").ZodUnion<[import("zod").ZodObject<{
|
|
1844
1860
|
email: import("zod").ZodString;
|
|
1845
1861
|
phone: import("zod").ZodString;
|
package/lib/schemas.js
CHANGED
|
@@ -304,6 +304,12 @@ const externalAppointment = zod_1.object({
|
|
|
304
304
|
specialty: zod_1.string(),
|
|
305
305
|
modality: zod_1.string(),
|
|
306
306
|
});
|
|
307
|
+
const binahWellnessGetLinkParams = zod_1.object({
|
|
308
|
+
provider: zod_1.string(),
|
|
309
|
+
patientId: zod_1.number(),
|
|
310
|
+
socketUrl: zod_1.string(),
|
|
311
|
+
socketAuthToken: zod_1.string(),
|
|
312
|
+
});
|
|
307
313
|
const binahWellnessResponse = zod_1.object({
|
|
308
314
|
data: zod_1.object({
|
|
309
315
|
info: zod_1.object({
|
|
@@ -449,6 +455,7 @@ exports.doc24Schemas = {
|
|
|
449
455
|
externalPatient,
|
|
450
456
|
externalAppointment,
|
|
451
457
|
binahWellnessResponse,
|
|
458
|
+
binahWellnessGetLinkParams,
|
|
452
459
|
emailOrPhone,
|
|
453
460
|
emailOrPhoneCode,
|
|
454
461
|
};
|
package/lib/types.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export declare namespace Doc24 {
|
|
|
46
46
|
type ExternalResetPasswordParams = TypeOf<typeof doc24Schemas.externalResetPasswordParams>;
|
|
47
47
|
type ExternalPatient = TypeOf<typeof doc24Schemas.externalPatient>;
|
|
48
48
|
type ExternalAppointment = TypeOf<typeof doc24Schemas.externalAppointment>;
|
|
49
|
+
type BinahWellnessGetLinkParams = TypeOf<typeof doc24Schemas.binahWellnessGetLinkParams>;
|
|
49
50
|
type BinahWellnessResponse = TypeOf<typeof doc24Schemas.binahWellnessResponse>;
|
|
50
51
|
type ProfessionalsBySpecialtyFilter = TypeOf<typeof doc24Schemas.professionalsBySpecialtyFilter>;
|
|
51
52
|
type BaseSdk = {
|
|
@@ -96,7 +97,7 @@ export declare namespace Doc24 {
|
|
|
96
97
|
cancelExternalAppointment: (appointmentId: ExternalAppointment) => Promise<void>;
|
|
97
98
|
getPatientPHR: (patientId: number) => Promise<string>;
|
|
98
99
|
userId: number;
|
|
99
|
-
getBinahWellnessLink: (
|
|
100
|
+
getBinahWellnessLink: (body: BinahWellnessGetLinkParams) => Promise<BinahWellnessResponse>;
|
|
100
101
|
};
|
|
101
102
|
namespace Webhook {
|
|
102
103
|
type StatusChangeEventStatus = 'S' | 'C' | 'F' | 'A' | 'D' | 'L';
|
package/lib/userSdk/binah.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { RequestMaker } from '../request';
|
|
2
2
|
export declare const getBinahWellnessMethods: (makeRequest: RequestMaker) => {
|
|
3
|
-
getBinahWellnessLink: (
|
|
3
|
+
getBinahWellnessLink: (body: {
|
|
4
|
+
patientId: number;
|
|
5
|
+
provider: string;
|
|
6
|
+
socketUrl: string;
|
|
7
|
+
socketAuthToken: string;
|
|
8
|
+
}) => Promise<{
|
|
4
9
|
data: {
|
|
5
10
|
info: {
|
|
6
11
|
link: string;
|
package/lib/userSdk/binah.js
CHANGED
|
@@ -2,16 +2,23 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getBinahWellnessMethods = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const validation_1 = require("../request/validation");
|
|
6
5
|
const schemas_1 = require("../schemas");
|
|
6
|
+
const validation_1 = require("../request/validation");
|
|
7
7
|
const getBinahWellnessMethods = (makeRequest) => {
|
|
8
|
-
const getBinahWellnessLink = async (
|
|
8
|
+
const getBinahWellnessLink = async (body) => {
|
|
9
9
|
const path = `/wellness-test`;
|
|
10
|
-
const response = await makeRequest('POST', path, {
|
|
10
|
+
const response = await makeRequest('POST', path, {
|
|
11
|
+
patient_id: body.patientId,
|
|
12
|
+
socket: {
|
|
13
|
+
provider: body.provider,
|
|
14
|
+
socketUrl: body.socketUrl,
|
|
15
|
+
socketAuthToken: body.socketAuthToken,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
11
18
|
return response;
|
|
12
19
|
};
|
|
13
20
|
return {
|
|
14
|
-
getBinahWellnessLink: validation_1.validateFunction(zod_1.tuple([zod_1.
|
|
21
|
+
getBinahWellnessLink: validation_1.validateFunction(zod_1.tuple([zod_1.any()]), schemas_1.doc24Schemas.binahWellnessResponse, getBinahWellnessLink),
|
|
15
22
|
};
|
|
16
23
|
};
|
|
17
24
|
exports.getBinahWellnessMethods = getBinahWellnessMethods;
|