@integraciones_doc24/sdk 1.16.39 → 1.16.41
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/README.md +1 -1
- package/lib/baseSdk/diagnostica.d.ts +2 -2
- package/lib/baseSdk/external.d.ts +6 -6
- package/lib/baseSdk/user.d.ts +1 -1
- package/lib/index.d.ts +10 -10
- package/lib/schemas.d.ts +99 -31
- package/lib/schemas.js +10 -0
- package/lib/types.d.ts +2 -1
- package/lib/userSdk/patients.d.ts +3 -1
- package/lib/userSdk/patients.js +3 -1
- package/lib/userSdk/videoVisit.d.ts +6 -2
- package/lib/userSdk/videoVisit.js +13 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -177,7 +177,7 @@ export type UserSdk = {
|
|
|
177
177
|
declarePatient: (
|
|
178
178
|
params: DeclarePatientParams,
|
|
179
179
|
) => Promise<DeclarePatientResponse>;
|
|
180
|
-
getPatientId: (patient:
|
|
180
|
+
getPatientId: (patient: PatientSearch) => Promise<number>;
|
|
181
181
|
deletePatient: (patientId: number) => Promise<void>;
|
|
182
182
|
getSpecialties: (
|
|
183
183
|
mode: SpecialtyMode,
|
|
@@ -16,8 +16,8 @@ export declare const getDiagnosticaMethods: (makeRequest: RequestMaker) => {
|
|
|
16
16
|
lastName: string;
|
|
17
17
|
identificationType: "DNI";
|
|
18
18
|
identificationValue: string;
|
|
19
|
-
phone: string;
|
|
20
19
|
email: string;
|
|
20
|
+
phone: string;
|
|
21
21
|
language: string;
|
|
22
22
|
birthday: Date;
|
|
23
23
|
}, patient: {
|
|
@@ -39,8 +39,8 @@ export declare const getDiagnosticaMethods: (makeRequest: RequestMaker) => {
|
|
|
39
39
|
lastName: string;
|
|
40
40
|
identificationType: "DNI";
|
|
41
41
|
identificationValue: string;
|
|
42
|
-
phone: string;
|
|
43
42
|
email: string;
|
|
43
|
+
phone: string;
|
|
44
44
|
language: string;
|
|
45
45
|
birthday: Date;
|
|
46
46
|
}, patient: {
|
|
@@ -8,8 +8,8 @@ export declare const getExternalMethods: (makeRequest: RequestMaker) => {
|
|
|
8
8
|
firstName: string;
|
|
9
9
|
lastName: string;
|
|
10
10
|
countryId: string;
|
|
11
|
-
phone: string;
|
|
12
11
|
email: string;
|
|
12
|
+
phone: string;
|
|
13
13
|
birthday: Date;
|
|
14
14
|
identificationNumber: string;
|
|
15
15
|
}>;
|
|
@@ -17,8 +17,8 @@ export declare const getExternalMethods: (makeRequest: RequestMaker) => {
|
|
|
17
17
|
birthdate: Date;
|
|
18
18
|
identificationNumber: string;
|
|
19
19
|
} & {
|
|
20
|
-
phone: string;
|
|
21
20
|
email: string;
|
|
21
|
+
phone: string;
|
|
22
22
|
}) | ({
|
|
23
23
|
birthdate: Date;
|
|
24
24
|
identificationNumber: string;
|
|
@@ -36,8 +36,8 @@ export declare const getExternalMethods: (makeRequest: RequestMaker) => {
|
|
|
36
36
|
birthdate: Date;
|
|
37
37
|
identificationNumber: string;
|
|
38
38
|
} & {
|
|
39
|
-
phone: string;
|
|
40
39
|
email: string;
|
|
40
|
+
phone: string;
|
|
41
41
|
} & {
|
|
42
42
|
password: string;
|
|
43
43
|
} & {
|
|
@@ -47,8 +47,8 @@ export declare const getExternalMethods: (makeRequest: RequestMaker) => {
|
|
|
47
47
|
birthdate: Date;
|
|
48
48
|
identificationNumber: string;
|
|
49
49
|
} & {
|
|
50
|
-
phone: string;
|
|
51
50
|
email: string;
|
|
51
|
+
phone: string;
|
|
52
52
|
} & {
|
|
53
53
|
password: string;
|
|
54
54
|
} & {
|
|
@@ -58,8 +58,8 @@ export declare const getExternalMethods: (makeRequest: RequestMaker) => {
|
|
|
58
58
|
birthdate: Date;
|
|
59
59
|
identificationNumber: string;
|
|
60
60
|
} & {
|
|
61
|
-
phone: string;
|
|
62
61
|
email: string;
|
|
62
|
+
phone: string;
|
|
63
63
|
} & {
|
|
64
64
|
password: string;
|
|
65
65
|
} & {
|
|
@@ -136,8 +136,8 @@ export declare const getExternalMethods: (makeRequest: RequestMaker) => {
|
|
|
136
136
|
firstName: string;
|
|
137
137
|
lastName: string;
|
|
138
138
|
countryId: string;
|
|
139
|
-
phone: string;
|
|
140
139
|
email: string;
|
|
140
|
+
phone: string;
|
|
141
141
|
birthday: Date;
|
|
142
142
|
identificationNumber: string;
|
|
143
143
|
}>;
|
package/lib/baseSdk/user.d.ts
CHANGED
package/lib/index.d.ts
CHANGED
|
@@ -31,8 +31,8 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
31
31
|
}) => Promise<{
|
|
32
32
|
askCode: true;
|
|
33
33
|
userInfo: {
|
|
34
|
-
phone: string;
|
|
35
34
|
email: string;
|
|
35
|
+
phone: string;
|
|
36
36
|
};
|
|
37
37
|
} | {
|
|
38
38
|
patientId: number | null;
|
|
@@ -86,8 +86,8 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
86
86
|
firstName: string;
|
|
87
87
|
lastName: string;
|
|
88
88
|
birthdate: Date;
|
|
89
|
-
phone: string | null;
|
|
90
89
|
email: string;
|
|
90
|
+
phone: string | null;
|
|
91
91
|
id: number;
|
|
92
92
|
specialties: {
|
|
93
93
|
start_age?: string | number | null | undefined;
|
|
@@ -190,8 +190,8 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
190
190
|
lastName: string;
|
|
191
191
|
identificationType: "DNI";
|
|
192
192
|
identificationValue: string;
|
|
193
|
-
phone: string;
|
|
194
193
|
email: string;
|
|
194
|
+
phone: string;
|
|
195
195
|
language: string;
|
|
196
196
|
birthday: Date;
|
|
197
197
|
}, patient: {
|
|
@@ -213,8 +213,8 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
213
213
|
lastName: string;
|
|
214
214
|
identificationType: "DNI";
|
|
215
215
|
identificationValue: string;
|
|
216
|
-
phone: string;
|
|
217
216
|
email: string;
|
|
217
|
+
phone: string;
|
|
218
218
|
language: string;
|
|
219
219
|
birthday: Date;
|
|
220
220
|
}, patient: {
|
|
@@ -233,8 +233,8 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
233
233
|
firstName: string;
|
|
234
234
|
lastName: string;
|
|
235
235
|
countryId: string;
|
|
236
|
-
phone: string;
|
|
237
236
|
email: string;
|
|
237
|
+
phone: string;
|
|
238
238
|
birthday: Date;
|
|
239
239
|
identificationNumber: string;
|
|
240
240
|
}>;
|
|
@@ -242,8 +242,8 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
242
242
|
birthdate: Date;
|
|
243
243
|
identificationNumber: string;
|
|
244
244
|
} & {
|
|
245
|
-
phone: string;
|
|
246
245
|
email: string;
|
|
246
|
+
phone: string;
|
|
247
247
|
}) | ({
|
|
248
248
|
birthdate: Date;
|
|
249
249
|
identificationNumber: string;
|
|
@@ -261,8 +261,8 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
261
261
|
birthdate: Date;
|
|
262
262
|
identificationNumber: string;
|
|
263
263
|
} & {
|
|
264
|
-
phone: string;
|
|
265
264
|
email: string;
|
|
265
|
+
phone: string;
|
|
266
266
|
} & {
|
|
267
267
|
password: string;
|
|
268
268
|
} & {
|
|
@@ -272,8 +272,8 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
272
272
|
birthdate: Date;
|
|
273
273
|
identificationNumber: string;
|
|
274
274
|
} & {
|
|
275
|
-
phone: string;
|
|
276
275
|
email: string;
|
|
276
|
+
phone: string;
|
|
277
277
|
} & {
|
|
278
278
|
password: string;
|
|
279
279
|
} & {
|
|
@@ -283,8 +283,8 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
283
283
|
birthdate: Date;
|
|
284
284
|
identificationNumber: string;
|
|
285
285
|
} & {
|
|
286
|
-
phone: string;
|
|
287
286
|
email: string;
|
|
287
|
+
phone: string;
|
|
288
288
|
} & {
|
|
289
289
|
password: string;
|
|
290
290
|
} & {
|
|
@@ -361,8 +361,8 @@ export declare const doc24Sdk: (params: Doc24.SdkParams) => Promise<{
|
|
|
361
361
|
firstName: string;
|
|
362
362
|
lastName: string;
|
|
363
363
|
countryId: string;
|
|
364
|
-
phone: string;
|
|
365
364
|
email: string;
|
|
365
|
+
phone: string;
|
|
366
366
|
birthday: Date;
|
|
367
367
|
identificationNumber: string;
|
|
368
368
|
}>;
|
package/lib/schemas.d.ts
CHANGED
|
@@ -177,6 +177,62 @@ export declare const doc24Schemas: {
|
|
|
177
177
|
countryId: string;
|
|
178
178
|
birthdate: Date;
|
|
179
179
|
}>;
|
|
180
|
+
patientSearch: import("zod").ZodObject<import("zod").extendShape<{
|
|
181
|
+
firstName: import("zod").ZodString;
|
|
182
|
+
lastName: import("zod").ZodString;
|
|
183
|
+
identificationType: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
184
|
+
identificationValue: import("zod").ZodOptional<import("zod").ZodString>;
|
|
185
|
+
countryId: import("zod").ZodString;
|
|
186
|
+
birthdate: import("zod").ZodDate;
|
|
187
|
+
gender: import("zod").ZodOptional<import("zod").ZodEnum<["m", "f", "o"]>>;
|
|
188
|
+
emergencyContact: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
189
|
+
emergencyContactPhone: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodNumber, import("zod").ZodString]>>>;
|
|
190
|
+
credential: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
191
|
+
plan: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
192
|
+
affiliationStatus: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
193
|
+
localidad: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
194
|
+
codPostal: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
195
|
+
provincia: import("zod").ZodNullable<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
196
|
+
}, {
|
|
197
|
+
idPatient: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
198
|
+
email: import("zod").ZodOptional<import("zod").ZodString>;
|
|
199
|
+
}>, "strip", import("zod").ZodTypeAny, {
|
|
200
|
+
identificationType?: number | undefined;
|
|
201
|
+
identificationValue?: string | undefined;
|
|
202
|
+
gender?: "m" | "f" | "o" | undefined;
|
|
203
|
+
emergencyContact?: string | null | undefined;
|
|
204
|
+
emergencyContactPhone?: string | number | null | undefined;
|
|
205
|
+
credential?: string | null | undefined;
|
|
206
|
+
plan?: string | null | undefined;
|
|
207
|
+
affiliationStatus?: string | null | undefined;
|
|
208
|
+
localidad?: string | null | undefined;
|
|
209
|
+
codPostal?: string | null | undefined;
|
|
210
|
+
provincia?: string | null | undefined;
|
|
211
|
+
idPatient?: number | undefined;
|
|
212
|
+
email?: string | undefined;
|
|
213
|
+
firstName: string;
|
|
214
|
+
lastName: string;
|
|
215
|
+
countryId: string;
|
|
216
|
+
birthdate: Date;
|
|
217
|
+
}, {
|
|
218
|
+
identificationType?: number | undefined;
|
|
219
|
+
identificationValue?: string | undefined;
|
|
220
|
+
gender?: "m" | "f" | "o" | undefined;
|
|
221
|
+
emergencyContact?: string | null | undefined;
|
|
222
|
+
emergencyContactPhone?: string | number | null | undefined;
|
|
223
|
+
credential?: string | null | undefined;
|
|
224
|
+
plan?: string | null | undefined;
|
|
225
|
+
affiliationStatus?: string | null | undefined;
|
|
226
|
+
localidad?: string | null | undefined;
|
|
227
|
+
codPostal?: string | null | undefined;
|
|
228
|
+
provincia?: string | null | undefined;
|
|
229
|
+
idPatient?: number | undefined;
|
|
230
|
+
email?: string | undefined;
|
|
231
|
+
firstName: string;
|
|
232
|
+
lastName: string;
|
|
233
|
+
countryId: string;
|
|
234
|
+
birthdate: Date;
|
|
235
|
+
}>;
|
|
180
236
|
specialtyMode: import("zod").ZodEnum<["appointment", "chat", "instant"]>;
|
|
181
237
|
specialty: import("zod").ZodObject<{
|
|
182
238
|
id: import("zod").ZodNumber;
|
|
@@ -590,12 +646,12 @@ export declare const doc24Schemas: {
|
|
|
590
646
|
email: import("zod").ZodNullable<import("zod").ZodString>;
|
|
591
647
|
phone: import("zod").ZodNullable<import("zod").ZodString>;
|
|
592
648
|
}, "strip", import("zod").ZodTypeAny, {
|
|
593
|
-
phone: string | null;
|
|
594
649
|
email: string | null;
|
|
650
|
+
phone: string | null;
|
|
595
651
|
id: number;
|
|
596
652
|
}, {
|
|
597
|
-
phone: string | null;
|
|
598
653
|
email: string | null;
|
|
654
|
+
phone: string | null;
|
|
599
655
|
id: number;
|
|
600
656
|
}>;
|
|
601
657
|
vcToken: import("zod").ZodString;
|
|
@@ -619,6 +675,8 @@ export declare const doc24Schemas: {
|
|
|
619
675
|
id: number;
|
|
620
676
|
status: string;
|
|
621
677
|
}>>;
|
|
678
|
+
voidDate: import("zod").ZodOptional<import("zod").ZodDate>;
|
|
679
|
+
voidDetails: import("zod").ZodOptional<import("zod").ZodString>;
|
|
622
680
|
paymentStatus: import("zod").ZodOptional<import("zod").ZodString>;
|
|
623
681
|
atentionId: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
624
682
|
waitingTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -655,6 +713,8 @@ export declare const doc24Schemas: {
|
|
|
655
713
|
id: number;
|
|
656
714
|
status: string;
|
|
657
715
|
} | undefined;
|
|
716
|
+
voidDate?: Date | undefined;
|
|
717
|
+
voidDetails?: string | undefined;
|
|
658
718
|
paymentStatus?: string | undefined;
|
|
659
719
|
atentionId?: number | undefined;
|
|
660
720
|
waitingTime?: string | undefined;
|
|
@@ -665,8 +725,8 @@ export declare const doc24Schemas: {
|
|
|
665
725
|
patientId: number;
|
|
666
726
|
creationDate: Date;
|
|
667
727
|
user: {
|
|
668
|
-
phone: string | null;
|
|
669
728
|
email: string | null;
|
|
729
|
+
phone: string | null;
|
|
670
730
|
id: number;
|
|
671
731
|
};
|
|
672
732
|
vcToken: string;
|
|
@@ -687,6 +747,8 @@ export declare const doc24Schemas: {
|
|
|
687
747
|
id: number;
|
|
688
748
|
status: string;
|
|
689
749
|
} | undefined;
|
|
750
|
+
voidDate?: Date | undefined;
|
|
751
|
+
voidDetails?: string | undefined;
|
|
690
752
|
paymentStatus?: string | undefined;
|
|
691
753
|
atentionId?: number | undefined;
|
|
692
754
|
waitingTime?: string | undefined;
|
|
@@ -697,8 +759,8 @@ export declare const doc24Schemas: {
|
|
|
697
759
|
patientId: number;
|
|
698
760
|
creationDate: Date;
|
|
699
761
|
user: {
|
|
700
|
-
phone: string | null;
|
|
701
762
|
email: string | null;
|
|
763
|
+
phone: string | null;
|
|
702
764
|
id: number;
|
|
703
765
|
};
|
|
704
766
|
vcToken: string;
|
|
@@ -719,12 +781,12 @@ export declare const doc24Schemas: {
|
|
|
719
781
|
email: import("zod").ZodNullable<import("zod").ZodString>;
|
|
720
782
|
phone: import("zod").ZodNullable<import("zod").ZodString>;
|
|
721
783
|
}, "strip", import("zod").ZodTypeAny, {
|
|
722
|
-
phone: string | null;
|
|
723
784
|
email: string | null;
|
|
785
|
+
phone: string | null;
|
|
724
786
|
id: number;
|
|
725
787
|
}, {
|
|
726
|
-
phone: string | null;
|
|
727
788
|
email: string | null;
|
|
789
|
+
phone: string | null;
|
|
728
790
|
id: number;
|
|
729
791
|
}>;
|
|
730
792
|
vcToken: import("zod").ZodString;
|
|
@@ -748,6 +810,8 @@ export declare const doc24Schemas: {
|
|
|
748
810
|
id: number;
|
|
749
811
|
status: string;
|
|
750
812
|
}>>;
|
|
813
|
+
voidDate: import("zod").ZodOptional<import("zod").ZodDate>;
|
|
814
|
+
voidDetails: import("zod").ZodOptional<import("zod").ZodString>;
|
|
751
815
|
paymentStatus: import("zod").ZodOptional<import("zod").ZodString>;
|
|
752
816
|
atentionId: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
753
817
|
waitingTime: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -789,6 +853,8 @@ export declare const doc24Schemas: {
|
|
|
789
853
|
id: number;
|
|
790
854
|
status: string;
|
|
791
855
|
} | undefined;
|
|
856
|
+
voidDate?: Date | undefined;
|
|
857
|
+
voidDetails?: string | undefined;
|
|
792
858
|
paymentStatus?: string | undefined;
|
|
793
859
|
atentionId?: number | undefined;
|
|
794
860
|
waitingTime?: string | undefined;
|
|
@@ -802,8 +868,8 @@ export declare const doc24Schemas: {
|
|
|
802
868
|
professional: string;
|
|
803
869
|
creationDate: Date;
|
|
804
870
|
user: {
|
|
805
|
-
phone: string | null;
|
|
806
871
|
email: string | null;
|
|
872
|
+
phone: string | null;
|
|
807
873
|
id: number;
|
|
808
874
|
};
|
|
809
875
|
vcToken: string;
|
|
@@ -825,6 +891,8 @@ export declare const doc24Schemas: {
|
|
|
825
891
|
id: number;
|
|
826
892
|
status: string;
|
|
827
893
|
} | undefined;
|
|
894
|
+
voidDate?: Date | undefined;
|
|
895
|
+
voidDetails?: string | undefined;
|
|
828
896
|
paymentStatus?: string | undefined;
|
|
829
897
|
atentionId?: number | undefined;
|
|
830
898
|
waitingTime?: string | undefined;
|
|
@@ -838,8 +906,8 @@ export declare const doc24Schemas: {
|
|
|
838
906
|
professional: string;
|
|
839
907
|
creationDate: Date;
|
|
840
908
|
user: {
|
|
841
|
-
phone: string | null;
|
|
842
909
|
email: string | null;
|
|
910
|
+
phone: string | null;
|
|
843
911
|
id: number;
|
|
844
912
|
};
|
|
845
913
|
vcToken: string;
|
|
@@ -1480,8 +1548,8 @@ export declare const doc24Schemas: {
|
|
|
1480
1548
|
firstName: string;
|
|
1481
1549
|
lastName: string;
|
|
1482
1550
|
birthdate: Date;
|
|
1483
|
-
phone: string | null;
|
|
1484
1551
|
email: string;
|
|
1552
|
+
phone: string | null;
|
|
1485
1553
|
id: number;
|
|
1486
1554
|
specialties: {
|
|
1487
1555
|
start_age?: string | number | null | undefined;
|
|
@@ -1509,8 +1577,8 @@ export declare const doc24Schemas: {
|
|
|
1509
1577
|
firstName: string;
|
|
1510
1578
|
lastName: string;
|
|
1511
1579
|
birthdate: Date;
|
|
1512
|
-
phone: string | null;
|
|
1513
1580
|
email: string;
|
|
1581
|
+
phone: string | null;
|
|
1514
1582
|
id: number;
|
|
1515
1583
|
specialties: {
|
|
1516
1584
|
start_age?: string | number | null | undefined;
|
|
@@ -1827,8 +1895,8 @@ export declare const doc24Schemas: {
|
|
|
1827
1895
|
lastName: string;
|
|
1828
1896
|
identificationType: "DNI";
|
|
1829
1897
|
identificationValue: string;
|
|
1830
|
-
phone: string;
|
|
1831
1898
|
email: string;
|
|
1899
|
+
phone: string;
|
|
1832
1900
|
language: string;
|
|
1833
1901
|
birthday: Date;
|
|
1834
1902
|
}, {
|
|
@@ -1837,8 +1905,8 @@ export declare const doc24Schemas: {
|
|
|
1837
1905
|
lastName: string;
|
|
1838
1906
|
identificationType: "DNI";
|
|
1839
1907
|
identificationValue: string;
|
|
1840
|
-
phone: string;
|
|
1841
1908
|
email: string;
|
|
1909
|
+
phone: string;
|
|
1842
1910
|
language: string;
|
|
1843
1911
|
birthday: Date;
|
|
1844
1912
|
}>;
|
|
@@ -2075,24 +2143,24 @@ export declare const doc24Schemas: {
|
|
|
2075
2143
|
email: import("zod").ZodString;
|
|
2076
2144
|
phone: import("zod").ZodString;
|
|
2077
2145
|
}, "strip", import("zod").ZodTypeAny, {
|
|
2078
|
-
phone: string;
|
|
2079
2146
|
email: string;
|
|
2080
|
-
}, {
|
|
2081
2147
|
phone: string;
|
|
2148
|
+
}, {
|
|
2082
2149
|
email: string;
|
|
2150
|
+
phone: string;
|
|
2083
2151
|
}>;
|
|
2084
2152
|
askCode: import("zod").ZodLiteral<true>;
|
|
2085
2153
|
}, "strip", import("zod").ZodTypeAny, {
|
|
2086
2154
|
askCode: true;
|
|
2087
2155
|
userInfo: {
|
|
2088
|
-
phone: string;
|
|
2089
2156
|
email: string;
|
|
2157
|
+
phone: string;
|
|
2090
2158
|
};
|
|
2091
2159
|
}, {
|
|
2092
2160
|
askCode: true;
|
|
2093
2161
|
userInfo: {
|
|
2094
|
-
phone: string;
|
|
2095
2162
|
email: string;
|
|
2163
|
+
phone: string;
|
|
2096
2164
|
};
|
|
2097
2165
|
}>, import("zod").ZodObject<{
|
|
2098
2166
|
askCode: import("zod").ZodLiteral<false>;
|
|
@@ -2212,13 +2280,13 @@ export declare const doc24Schemas: {
|
|
|
2212
2280
|
}, "strip", import("zod").ZodTypeAny, {
|
|
2213
2281
|
firstName: string;
|
|
2214
2282
|
lastName: string;
|
|
2215
|
-
phone: string;
|
|
2216
2283
|
email: string;
|
|
2284
|
+
phone: string;
|
|
2217
2285
|
}, {
|
|
2218
2286
|
firstName: string;
|
|
2219
2287
|
lastName: string;
|
|
2220
|
-
phone: string;
|
|
2221
2288
|
email: string;
|
|
2289
|
+
phone: string;
|
|
2222
2290
|
}>;
|
|
2223
2291
|
askCode: import("zod").ZodLiteral<true>;
|
|
2224
2292
|
}, "strip", import("zod").ZodTypeAny, {
|
|
@@ -2226,16 +2294,16 @@ export declare const doc24Schemas: {
|
|
|
2226
2294
|
userInfo: {
|
|
2227
2295
|
firstName: string;
|
|
2228
2296
|
lastName: string;
|
|
2229
|
-
phone: string;
|
|
2230
2297
|
email: string;
|
|
2298
|
+
phone: string;
|
|
2231
2299
|
};
|
|
2232
2300
|
}, {
|
|
2233
2301
|
askCode: true;
|
|
2234
2302
|
userInfo: {
|
|
2235
2303
|
firstName: string;
|
|
2236
2304
|
lastName: string;
|
|
2237
|
-
phone: string;
|
|
2238
2305
|
email: string;
|
|
2306
|
+
phone: string;
|
|
2239
2307
|
};
|
|
2240
2308
|
}>, import("zod").ZodObject<{
|
|
2241
2309
|
askCode: import("zod").ZodLiteral<false>;
|
|
@@ -2281,8 +2349,8 @@ export declare const doc24Schemas: {
|
|
|
2281
2349
|
firstName: string;
|
|
2282
2350
|
lastName: string;
|
|
2283
2351
|
countryId: string;
|
|
2284
|
-
phone: string;
|
|
2285
2352
|
email: string;
|
|
2353
|
+
phone: string;
|
|
2286
2354
|
birthday: Date;
|
|
2287
2355
|
identificationNumber: string;
|
|
2288
2356
|
}, {
|
|
@@ -2290,8 +2358,8 @@ export declare const doc24Schemas: {
|
|
|
2290
2358
|
firstName: string;
|
|
2291
2359
|
lastName: string;
|
|
2292
2360
|
countryId: string;
|
|
2293
|
-
phone: string;
|
|
2294
2361
|
email: string;
|
|
2362
|
+
phone: string;
|
|
2295
2363
|
birthday: Date;
|
|
2296
2364
|
identificationNumber: string;
|
|
2297
2365
|
}>;
|
|
@@ -2308,11 +2376,11 @@ export declare const doc24Schemas: {
|
|
|
2308
2376
|
email: import("zod").ZodString;
|
|
2309
2377
|
phone: import("zod").ZodString;
|
|
2310
2378
|
}, "strip", import("zod").ZodTypeAny, {
|
|
2311
|
-
phone: string;
|
|
2312
2379
|
email: string;
|
|
2313
|
-
}, {
|
|
2314
2380
|
phone: string;
|
|
2381
|
+
}, {
|
|
2315
2382
|
email: string;
|
|
2383
|
+
phone: string;
|
|
2316
2384
|
}>, import("zod").ZodObject<{
|
|
2317
2385
|
email: import("zod").ZodString;
|
|
2318
2386
|
phone: import("zod").ZodUndefined;
|
|
@@ -2332,8 +2400,8 @@ export declare const doc24Schemas: {
|
|
|
2332
2400
|
email?: undefined;
|
|
2333
2401
|
phone: string;
|
|
2334
2402
|
}>]>, {
|
|
2335
|
-
phone: string;
|
|
2336
2403
|
email: string;
|
|
2404
|
+
phone: string;
|
|
2337
2405
|
} | {
|
|
2338
2406
|
phone?: undefined;
|
|
2339
2407
|
email: string;
|
|
@@ -2354,11 +2422,11 @@ export declare const doc24Schemas: {
|
|
|
2354
2422
|
email: import("zod").ZodString;
|
|
2355
2423
|
phone: import("zod").ZodString;
|
|
2356
2424
|
}, "strip", import("zod").ZodTypeAny, {
|
|
2357
|
-
phone: string;
|
|
2358
2425
|
email: string;
|
|
2359
|
-
}, {
|
|
2360
2426
|
phone: string;
|
|
2427
|
+
}, {
|
|
2361
2428
|
email: string;
|
|
2429
|
+
phone: string;
|
|
2362
2430
|
}>, import("zod").ZodObject<{
|
|
2363
2431
|
email: import("zod").ZodString;
|
|
2364
2432
|
phone: import("zod").ZodUndefined;
|
|
@@ -2378,8 +2446,8 @@ export declare const doc24Schemas: {
|
|
|
2378
2446
|
email?: undefined;
|
|
2379
2447
|
phone: string;
|
|
2380
2448
|
}>]>, {
|
|
2381
|
-
phone: string;
|
|
2382
2449
|
email: string;
|
|
2450
|
+
phone: string;
|
|
2383
2451
|
} | {
|
|
2384
2452
|
phone?: undefined;
|
|
2385
2453
|
email: string;
|
|
@@ -2641,11 +2709,11 @@ export declare const doc24Schemas: {
|
|
|
2641
2709
|
email: import("zod").ZodString;
|
|
2642
2710
|
phone: import("zod").ZodString;
|
|
2643
2711
|
}, "strip", import("zod").ZodTypeAny, {
|
|
2644
|
-
phone: string;
|
|
2645
2712
|
email: string;
|
|
2646
|
-
}, {
|
|
2647
2713
|
phone: string;
|
|
2714
|
+
}, {
|
|
2648
2715
|
email: string;
|
|
2716
|
+
phone: string;
|
|
2649
2717
|
}>, import("zod").ZodObject<{
|
|
2650
2718
|
email: import("zod").ZodString;
|
|
2651
2719
|
phone: import("zod").ZodUndefined;
|
|
@@ -2665,8 +2733,8 @@ export declare const doc24Schemas: {
|
|
|
2665
2733
|
email?: undefined;
|
|
2666
2734
|
phone: string;
|
|
2667
2735
|
}>]>, {
|
|
2668
|
-
phone: string;
|
|
2669
2736
|
email: string;
|
|
2737
|
+
phone: string;
|
|
2670
2738
|
} | {
|
|
2671
2739
|
phone?: undefined;
|
|
2672
2740
|
email: string;
|
package/lib/schemas.js
CHANGED
|
@@ -23,6 +23,12 @@ const basePersonData = zod_1.object({
|
|
|
23
23
|
provincia: zod_1.string().nullish(),
|
|
24
24
|
});
|
|
25
25
|
const patient = basePersonData;
|
|
26
|
+
// search-patient: when idPatient is sent, doc24 identifies the person by id
|
|
27
|
+
// (instead of document + gender) and overwrites its data with this payload.
|
|
28
|
+
const patientSearch = patient.extend({
|
|
29
|
+
idPatient: zod_1.number().optional(),
|
|
30
|
+
email: zod_1.string().optional(),
|
|
31
|
+
});
|
|
26
32
|
const user = basePersonData.extend({
|
|
27
33
|
phone: zod_1.string().optional(),
|
|
28
34
|
email: zod_1.string(),
|
|
@@ -201,6 +207,9 @@ const videoVisit = zod_1.object({
|
|
|
201
207
|
id: zod_1.number(),
|
|
202
208
|
status: zod_1.string(),
|
|
203
209
|
}).optional(),
|
|
210
|
+
// Set by Doc24's nightly process (~01:00 -03), e.g. `NOSHOW`.
|
|
211
|
+
voidDate: zod_1.date().optional(),
|
|
212
|
+
voidDetails: zod_1.string().optional(),
|
|
204
213
|
paymentStatus: zod_1.string().optional(),
|
|
205
214
|
atentionId: zod_1.number().optional(),
|
|
206
215
|
waitingTime: zod_1.string().optional(),
|
|
@@ -382,6 +391,7 @@ exports.doc24Schemas = {
|
|
|
382
391
|
sdkParams: zod_1.object({ url: zod_1.string(), credentials: sdkCredentials }),
|
|
383
392
|
user,
|
|
384
393
|
patient,
|
|
394
|
+
patientSearch,
|
|
385
395
|
specialtyMode,
|
|
386
396
|
specialty,
|
|
387
397
|
scheduleAvailabilityFilter,
|
package/lib/types.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export declare namespace Doc24 {
|
|
|
5
5
|
type SdkParams = TypeOf<typeof doc24Schemas.sdkParams>;
|
|
6
6
|
type User = TypeOf<typeof doc24Schemas.user>;
|
|
7
7
|
type Patient = TypeOf<typeof doc24Schemas.patient>;
|
|
8
|
+
type PatientSearch = TypeOf<typeof doc24Schemas.patientSearch>;
|
|
8
9
|
type Specialty = TypeOf<typeof doc24Schemas.specialty>;
|
|
9
10
|
type ScheduleAvailabilityFilter = TypeOf<typeof doc24Schemas.scheduleAvailabilityFilter>;
|
|
10
11
|
type AvailableAppointment = TypeOf<typeof doc24Schemas.availableAppointment>;
|
|
@@ -79,7 +80,7 @@ export declare namespace Doc24 {
|
|
|
79
80
|
};
|
|
80
81
|
type UserSdk = {
|
|
81
82
|
declarePatient: (params: DeclarePatientParams) => Promise<DeclarePatientResponse>;
|
|
82
|
-
getPatientId: (patient:
|
|
83
|
+
getPatientId: (patient: PatientSearch) => Promise<number>;
|
|
83
84
|
deletePatient: (patientId: number) => Promise<void>;
|
|
84
85
|
getSpecialties: (mode: SpecialtyMode, language: string) => Promise<Specialty[]>;
|
|
85
86
|
getProfessionalsBySpecialty: (body: ProfessionalsBySpecialtyFilter) => Promise<ProfessionalsListItem[]>;
|
|
@@ -26,8 +26,8 @@ export declare const getPatientMethods: (makeRequest: RequestMaker) => {
|
|
|
26
26
|
userInfo: {
|
|
27
27
|
firstName: string;
|
|
28
28
|
lastName: string;
|
|
29
|
-
phone: string;
|
|
30
29
|
email: string;
|
|
30
|
+
phone: string;
|
|
31
31
|
};
|
|
32
32
|
} | {
|
|
33
33
|
patientId: number | null;
|
|
@@ -45,6 +45,8 @@ export declare const getPatientMethods: (makeRequest: RequestMaker) => {
|
|
|
45
45
|
localidad?: string | null | undefined;
|
|
46
46
|
codPostal?: string | null | undefined;
|
|
47
47
|
provincia?: string | null | undefined;
|
|
48
|
+
idPatient?: number | undefined;
|
|
49
|
+
email?: string | undefined;
|
|
48
50
|
firstName: string;
|
|
49
51
|
lastName: string;
|
|
50
52
|
countryId: string;
|
package/lib/userSdk/patients.js
CHANGED
|
@@ -50,12 +50,14 @@ const getPatientMethods = (makeRequest) => {
|
|
|
50
50
|
var _a;
|
|
51
51
|
const path = '/search-patient';
|
|
52
52
|
const mappedPatient = {
|
|
53
|
+
id_patient: patient.idPatient,
|
|
53
54
|
lastname: patient.lastName,
|
|
54
55
|
firstname: patient.firstName,
|
|
55
56
|
identification_type: patient.identificationType,
|
|
56
57
|
identification_value: patient.identificationValue,
|
|
57
58
|
birthdate: date_fns_1.format(patient.birthdate, 'yyyy-MM-dd'),
|
|
58
59
|
gender: (_a = patient.gender) === null || _a === void 0 ? void 0 : _a.toUpperCase(),
|
|
60
|
+
email: patient.email,
|
|
59
61
|
country_id: patient.countryId,
|
|
60
62
|
};
|
|
61
63
|
const response = await makeRequest('POST', path, {
|
|
@@ -82,7 +84,7 @@ const getPatientMethods = (makeRequest) => {
|
|
|
82
84
|
};
|
|
83
85
|
return {
|
|
84
86
|
declarePatient: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.declarePatientParams]), schemas_1.doc24Schemas.declarePatientResponse, declarePatient),
|
|
85
|
-
getPatientId: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.
|
|
87
|
+
getPatientId: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.patientSearch]), zod_1.number(), getPatientId),
|
|
86
88
|
deletePatient: validation_1.validateFunction(zod_1.tuple([zod_1.number()]), zod_1.void(), deletePatient),
|
|
87
89
|
getPatientPHR: validation_1.validateFunction(zod_1.tuple([zod_1.number()]), zod_1.string(), getPatientPHR),
|
|
88
90
|
submitHealthQuiz: validation_1.validateFunction(zod_1.tuple([schemas_1.doc24Schemas.healthQuizParams]), zod_1.void(), submitHealthQuiz),
|
|
@@ -28,6 +28,8 @@ export declare const getVideoVisitMethods: (makeRequest: RequestMaker) => {
|
|
|
28
28
|
id: number;
|
|
29
29
|
status: string;
|
|
30
30
|
} | undefined;
|
|
31
|
+
voidDate?: Date | undefined;
|
|
32
|
+
voidDetails?: string | undefined;
|
|
31
33
|
paymentStatus?: string | undefined;
|
|
32
34
|
atentionId?: number | undefined;
|
|
33
35
|
waitingTime?: string | undefined;
|
|
@@ -38,8 +40,8 @@ export declare const getVideoVisitMethods: (makeRequest: RequestMaker) => {
|
|
|
38
40
|
patientId: number;
|
|
39
41
|
creationDate: Date;
|
|
40
42
|
user: {
|
|
41
|
-
phone: string | null;
|
|
42
43
|
email: string | null;
|
|
44
|
+
phone: string | null;
|
|
43
45
|
id: number;
|
|
44
46
|
};
|
|
45
47
|
vcToken: string;
|
|
@@ -61,6 +63,8 @@ export declare const getVideoVisitMethods: (makeRequest: RequestMaker) => {
|
|
|
61
63
|
id: number;
|
|
62
64
|
status: string;
|
|
63
65
|
} | undefined;
|
|
66
|
+
voidDate?: Date | undefined;
|
|
67
|
+
voidDetails?: string | undefined;
|
|
64
68
|
paymentStatus?: string | undefined;
|
|
65
69
|
atentionId?: number | undefined;
|
|
66
70
|
waitingTime?: string | undefined;
|
|
@@ -74,8 +78,8 @@ export declare const getVideoVisitMethods: (makeRequest: RequestMaker) => {
|
|
|
74
78
|
professional: string;
|
|
75
79
|
creationDate: Date;
|
|
76
80
|
user: {
|
|
77
|
-
phone: string | null;
|
|
78
81
|
email: string | null;
|
|
82
|
+
phone: string | null;
|
|
79
83
|
id: number;
|
|
80
84
|
};
|
|
81
85
|
vcToken: string;
|
|
@@ -234,7 +234,7 @@ const getVideoVisitMethods = (makeRequest) => {
|
|
|
234
234
|
};
|
|
235
235
|
exports.getVideoVisitMethods = getVideoVisitMethods;
|
|
236
236
|
const mapVideoVisit = (raw) => {
|
|
237
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
237
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
238
238
|
return {
|
|
239
239
|
id: raw.vc_id,
|
|
240
240
|
creationDate: utils_1.parseDateTime(raw.creation_date),
|
|
@@ -250,13 +250,18 @@ const mapVideoVisit = (raw) => {
|
|
|
250
250
|
videoVisit: raw.video_visit_id
|
|
251
251
|
? { id: raw.video_visit_id, status: raw.video_visit_status }
|
|
252
252
|
: undefined,
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
253
|
+
// `void_date` carries microseconds (`2026-11-04 01:00:01.380926`).
|
|
254
|
+
voidDate: raw.void_date
|
|
255
|
+
? utils_1.parseDateTime(String(raw.void_date).split('.')[0])
|
|
256
|
+
: undefined,
|
|
257
|
+
voidDetails: (_a = raw.void_details) !== null && _a !== void 0 ? _a : undefined,
|
|
258
|
+
paymentStatus: (_b = raw.payment_status) !== null && _b !== void 0 ? _b : undefined,
|
|
259
|
+
atentionId: (_c = raw.atentionId) !== null && _c !== void 0 ? _c : undefined,
|
|
260
|
+
waitingTime: (_d = raw.waiting_time) !== null && _d !== void 0 ? _d : undefined,
|
|
261
|
+
address: (_e = raw.direccion) !== null && _e !== void 0 ? _e : undefined,
|
|
262
|
+
city: (_f = raw.localidad) !== null && _f !== void 0 ? _f : undefined,
|
|
263
|
+
province: (_g = raw.provincia) !== null && _g !== void 0 ? _g : undefined,
|
|
264
|
+
modality: (_h = raw.modalidad) !== null && _h !== void 0 ? _h : undefined,
|
|
260
265
|
attachedFiles: mapAttachedFiles(raw.attached_files),
|
|
261
266
|
};
|
|
262
267
|
};
|