@integraciones_doc24/sdk 1.2.0 → 1.3.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/diagnostica.d.ts +6 -6
- package/lib/baseSdk/index.js +5 -1
- package/lib/baseSdk/user.d.ts +4 -52
- package/lib/baseSdk/user.js +25 -67
- package/lib/index.d.ts +16 -45
- package/lib/lib/lib/lib/baseSdk/diagnostica.d.ts +6 -0
- package/lib/lib/lib/lib/baseSdk/diagnostica.js +79 -0
- package/lib/lib/lib/lib/baseSdk/index.d.ts +14 -0
- package/lib/lib/lib/lib/baseSdk/index.js +66 -0
- package/lib/lib/lib/lib/baseSdk/user.d.ts +9 -0
- package/lib/lib/lib/lib/baseSdk/user.js +130 -0
- package/lib/lib/lib/lib/index.d.ts +58 -0
- package/lib/lib/lib/lib/index.js +22 -0
- package/lib/lib/lib/lib/request/index.d.ts +2 -0
- package/lib/lib/lib/lib/request/index.js +26 -0
- package/lib/lib/lib/lib/request/token.d.ts +2 -0
- package/lib/lib/lib/lib/request/token.js +34 -0
- package/lib/lib/lib/lib/request/validation.d.ts +10 -0
- package/lib/lib/lib/lib/request/validation.js +28 -0
- package/lib/lib/lib/lib/schemas.d.ts +1334 -0
- package/lib/lib/lib/lib/schemas.js +325 -0
- package/lib/lib/lib/lib/test.d.ts +1 -0
- package/lib/lib/lib/lib/test.js +55 -0
- package/lib/lib/lib/lib/types.d.ts +1 -0
- package/lib/lib/lib/lib/types.js +2 -0
- package/lib/lib/lib/lib/userSdk/chat.d.ts +9 -0
- package/lib/lib/lib/lib/userSdk/chat.js +98 -0
- package/lib/lib/lib/lib/userSdk/index.d.ts +24 -0
- package/lib/lib/lib/lib/userSdk/index.js +27 -0
- package/lib/lib/lib/lib/userSdk/patients.d.ts +5 -0
- package/lib/lib/lib/lib/userSdk/patients.js +55 -0
- package/lib/lib/lib/lib/userSdk/schedule.d.ts +7 -0
- package/lib/lib/lib/lib/userSdk/schedule.js +76 -0
- package/lib/lib/lib/lib/userSdk/specialties.d.ts +4 -0
- package/lib/lib/lib/lib/userSdk/specialties.js +19 -0
- package/lib/lib/lib/lib/userSdk/videoVisit.d.ts +10 -0
- package/lib/lib/lib/lib/userSdk/videoVisit.js +147 -0
- package/lib/lib/lib/lib/utils.d.ts +4 -0
- package/lib/lib/lib/lib/utils.js +19 -0
- package/lib/lib/lib/lib/webhook/index.d.ts +8 -0
- package/lib/lib/lib/lib/webhook/index.js +55 -0
- package/lib/lib/lib/lib/webhook/responses.d.ts +36 -0
- package/lib/lib/lib/lib/webhook/responses.js +42 -0
- package/lib/lib/lib/lib/webhook/token.d.ts +2 -0
- package/lib/lib/lib/lib/webhook/token.js +23 -0
- package/lib/lib/lib/src/baseSdk/diagnostica.d.ts +6 -0
- package/lib/lib/lib/src/baseSdk/diagnostica.js +79 -0
- package/lib/lib/lib/src/baseSdk/index.d.ts +51 -0
- package/lib/lib/lib/src/baseSdk/index.js +66 -0
- package/lib/lib/lib/src/baseSdk/user.d.ts +9 -0
- package/lib/lib/lib/src/baseSdk/user.js +130 -0
- package/lib/lib/lib/src/index.d.ts +169 -0
- package/lib/lib/lib/src/index.js +22 -0
- package/lib/lib/lib/src/request/index.d.ts +2 -0
- package/lib/lib/lib/src/request/index.js +26 -0
- package/lib/lib/lib/src/request/token.d.ts +2 -0
- package/lib/lib/lib/src/request/token.js +34 -0
- package/lib/lib/lib/src/request/validation.d.ts +10 -0
- package/lib/lib/lib/src/request/validation.js +28 -0
- package/lib/lib/lib/src/schemas.d.ts +1340 -0
- package/lib/lib/lib/src/schemas.js +325 -0
- package/lib/lib/lib/src/types.d.ts +1 -0
- package/lib/lib/lib/src/types.js +2 -0
- package/lib/lib/lib/src/userSdk/chat.d.ts +9 -0
- package/lib/lib/lib/src/userSdk/chat.js +98 -0
- package/lib/lib/lib/src/userSdk/index.d.ts +102 -0
- package/lib/lib/lib/src/userSdk/index.js +27 -0
- package/lib/lib/lib/src/userSdk/patients.d.ts +5 -0
- package/lib/lib/lib/src/userSdk/patients.js +55 -0
- package/lib/lib/lib/src/userSdk/schedule.d.ts +7 -0
- package/lib/lib/lib/src/userSdk/schedule.js +76 -0
- package/lib/lib/lib/src/userSdk/specialties.d.ts +4 -0
- package/lib/lib/lib/src/userSdk/specialties.js +19 -0
- package/lib/lib/lib/src/userSdk/videoVisit.d.ts +10 -0
- package/lib/lib/lib/src/userSdk/videoVisit.js +147 -0
- package/lib/lib/lib/src/utils.d.ts +4 -0
- package/lib/lib/lib/src/utils.js +19 -0
- package/lib/lib/lib/src/webhook/index.d.ts +8 -0
- package/lib/lib/lib/src/webhook/index.js +55 -0
- package/lib/lib/lib/src/webhook/responses.d.ts +36 -0
- package/lib/lib/lib/src/webhook/responses.js +42 -0
- package/lib/lib/lib/src/webhook/token.d.ts +2 -0
- package/lib/lib/lib/src/webhook/token.js +23 -0
- package/lib/schemas.d.ts +30 -236
- package/lib/schemas.js +2 -34
- package/lib/test.js +1 -36
- package/lib/types.d.ts +2 -11
- package/lib/userSdk/chat.d.ts +1 -1
- package/lib/userSdk/patients.d.ts +2 -23
- package/lib/userSdk/patients.js +6 -34
- package/lib/userSdk/videoVisit.d.ts +2 -2
- package/lib/utils.d.ts +1 -1
- package/lib/utils.js +3 -3
- package/package.json +1 -1
package/lib/schemas.d.ts
CHANGED
|
@@ -51,21 +51,21 @@ export declare const doc24Schemas: {
|
|
|
51
51
|
lastName: string;
|
|
52
52
|
identificationType: "ndi" | "passport" | "credential";
|
|
53
53
|
identificationValue: string;
|
|
54
|
-
countryId: string;
|
|
55
|
-
birthdate: Date;
|
|
56
54
|
gender: "m" | "f";
|
|
57
55
|
phone: string;
|
|
58
56
|
email: string;
|
|
57
|
+
countryId: string;
|
|
58
|
+
birthdate: Date;
|
|
59
59
|
}, {
|
|
60
60
|
firstName: string;
|
|
61
61
|
lastName: string;
|
|
62
62
|
identificationType: "ndi" | "passport" | "credential";
|
|
63
63
|
identificationValue: string;
|
|
64
|
-
countryId: string;
|
|
65
|
-
birthdate: Date;
|
|
66
64
|
gender: "m" | "f";
|
|
67
65
|
phone: string;
|
|
68
66
|
email: string;
|
|
67
|
+
countryId: string;
|
|
68
|
+
birthdate: Date;
|
|
69
69
|
}>;
|
|
70
70
|
patient: import("zod").ZodObject<{
|
|
71
71
|
firstName: import("zod").ZodString;
|
|
@@ -80,17 +80,17 @@ export declare const doc24Schemas: {
|
|
|
80
80
|
lastName: string;
|
|
81
81
|
identificationType: "ndi" | "passport" | "credential";
|
|
82
82
|
identificationValue: string;
|
|
83
|
+
gender: "m" | "f";
|
|
83
84
|
countryId: string;
|
|
84
85
|
birthdate: Date;
|
|
85
|
-
gender: "m" | "f";
|
|
86
86
|
}, {
|
|
87
87
|
firstName: string;
|
|
88
88
|
lastName: string;
|
|
89
89
|
identificationType: "ndi" | "passport" | "credential";
|
|
90
90
|
identificationValue: string;
|
|
91
|
+
gender: "m" | "f";
|
|
91
92
|
countryId: string;
|
|
92
93
|
birthdate: Date;
|
|
93
|
-
gender: "m" | "f";
|
|
94
94
|
}>;
|
|
95
95
|
specialtyMode: import("zod").ZodEnum<["appointment", "chat", "instant"]>;
|
|
96
96
|
specialty: import("zod").ZodObject<{
|
|
@@ -353,13 +353,13 @@ export declare const doc24Schemas: {
|
|
|
353
353
|
email: import("zod").ZodNullable<import("zod").ZodString>;
|
|
354
354
|
phone: import("zod").ZodNullable<import("zod").ZodString>;
|
|
355
355
|
}, "strip", import("zod").ZodTypeAny, {
|
|
356
|
+
id: number;
|
|
356
357
|
phone: string | null;
|
|
357
358
|
email: string | null;
|
|
358
|
-
id: number;
|
|
359
359
|
}, {
|
|
360
|
+
id: number;
|
|
360
361
|
phone: string | null;
|
|
361
362
|
email: string | null;
|
|
362
|
-
id: number;
|
|
363
363
|
}>;
|
|
364
364
|
vcToken: import("zod").ZodString;
|
|
365
365
|
appointment: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
@@ -399,9 +399,9 @@ export declare const doc24Schemas: {
|
|
|
399
399
|
patientId: number;
|
|
400
400
|
creationDate: Date;
|
|
401
401
|
user: {
|
|
402
|
+
id: number;
|
|
402
403
|
phone: string | null;
|
|
403
404
|
email: string | null;
|
|
404
|
-
id: number;
|
|
405
405
|
};
|
|
406
406
|
vcToken: string;
|
|
407
407
|
}, {
|
|
@@ -419,9 +419,9 @@ export declare const doc24Schemas: {
|
|
|
419
419
|
patientId: number;
|
|
420
420
|
creationDate: Date;
|
|
421
421
|
user: {
|
|
422
|
+
id: number;
|
|
422
423
|
phone: string | null;
|
|
423
424
|
email: string | null;
|
|
424
|
-
id: number;
|
|
425
425
|
};
|
|
426
426
|
vcToken: string;
|
|
427
427
|
}>;
|
|
@@ -671,14 +671,14 @@ export declare const doc24Schemas: {
|
|
|
671
671
|
brief: string;
|
|
672
672
|
}>;
|
|
673
673
|
}, "strip", import("zod").ZodTypeAny, {
|
|
674
|
+
id: number;
|
|
675
|
+
logoUrl: string;
|
|
674
676
|
firstName: string;
|
|
675
677
|
lastName: string;
|
|
676
|
-
birthdate: Date;
|
|
677
678
|
gender: "m" | "f";
|
|
678
679
|
phone: string | null;
|
|
679
680
|
email: string;
|
|
680
|
-
|
|
681
|
-
logoUrl: string;
|
|
681
|
+
birthdate: Date;
|
|
682
682
|
specialties: {
|
|
683
683
|
id: number;
|
|
684
684
|
description: string;
|
|
@@ -694,14 +694,14 @@ export declare const doc24Schemas: {
|
|
|
694
694
|
brief: string;
|
|
695
695
|
};
|
|
696
696
|
}, {
|
|
697
|
+
id: number;
|
|
698
|
+
logoUrl: string;
|
|
697
699
|
firstName: string;
|
|
698
700
|
lastName: string;
|
|
699
|
-
birthdate: Date;
|
|
700
701
|
gender: "m" | "f";
|
|
701
702
|
phone: string | null;
|
|
702
703
|
email: string;
|
|
703
|
-
|
|
704
|
-
logoUrl: string;
|
|
704
|
+
birthdate: Date;
|
|
705
705
|
specialties: {
|
|
706
706
|
id: number;
|
|
707
707
|
description: string;
|
|
@@ -815,13 +815,13 @@ export declare const doc24Schemas: {
|
|
|
815
815
|
firstName: import("zod").ZodString;
|
|
816
816
|
lastName: import("zod").ZodString;
|
|
817
817
|
}, "strip", import("zod").ZodTypeAny, {
|
|
818
|
+
id: number;
|
|
818
819
|
firstName: string;
|
|
819
820
|
lastName: string;
|
|
820
|
-
id: number;
|
|
821
821
|
}, {
|
|
822
|
+
id: number;
|
|
822
823
|
firstName: string;
|
|
823
824
|
lastName: string;
|
|
824
|
-
id: number;
|
|
825
825
|
}>;
|
|
826
826
|
patientLastPost: import("zod").ZodNullable<import("zod").ZodDate>;
|
|
827
827
|
professional: import("zod").ZodObject<{
|
|
@@ -853,9 +853,9 @@ export declare const doc24Schemas: {
|
|
|
853
853
|
}, "strip", import("zod").ZodTypeAny, {
|
|
854
854
|
id: number;
|
|
855
855
|
patient: {
|
|
856
|
+
id: number;
|
|
856
857
|
firstName: string;
|
|
857
858
|
lastName: string;
|
|
858
|
-
id: number;
|
|
859
859
|
};
|
|
860
860
|
professional: {
|
|
861
861
|
id: number;
|
|
@@ -877,9 +877,9 @@ export declare const doc24Schemas: {
|
|
|
877
877
|
}, {
|
|
878
878
|
id: number;
|
|
879
879
|
patient: {
|
|
880
|
+
id: number;
|
|
880
881
|
firstName: string;
|
|
881
882
|
lastName: string;
|
|
882
|
-
id: number;
|
|
883
883
|
};
|
|
884
884
|
professional: {
|
|
885
885
|
id: number;
|
|
@@ -927,18 +927,18 @@ export declare const doc24Schemas: {
|
|
|
927
927
|
}, "strip", import("zod").ZodTypeAny, {
|
|
928
928
|
firstName: string;
|
|
929
929
|
lastName: string;
|
|
930
|
-
birthdate: Date;
|
|
931
930
|
gender: "m" | "f";
|
|
932
931
|
email: string;
|
|
932
|
+
birthdate: Date;
|
|
933
933
|
startDate: Date;
|
|
934
934
|
identificationNumber: string;
|
|
935
935
|
plan: string;
|
|
936
936
|
}, {
|
|
937
937
|
firstName: string;
|
|
938
938
|
lastName: string;
|
|
939
|
-
birthdate: Date;
|
|
940
939
|
gender: "m" | "f";
|
|
941
940
|
email: string;
|
|
941
|
+
birthdate: Date;
|
|
942
942
|
startDate: Date;
|
|
943
943
|
identificationNumber: string;
|
|
944
944
|
plan: string;
|
|
@@ -984,25 +984,25 @@ export declare const doc24Schemas: {
|
|
|
984
984
|
email: import("zod").ZodString;
|
|
985
985
|
language: import("zod").ZodString;
|
|
986
986
|
}>, "strip", import("zod").ZodTypeAny, {
|
|
987
|
+
language: string;
|
|
987
988
|
firstName: string;
|
|
988
989
|
lastName: string;
|
|
990
|
+
birthday: Date;
|
|
989
991
|
identificationType: "dni";
|
|
990
992
|
identificationValue: string;
|
|
991
993
|
gender: "m" | "f";
|
|
992
994
|
phone: string;
|
|
993
995
|
email: string;
|
|
994
|
-
language: string;
|
|
995
|
-
birthday: Date;
|
|
996
996
|
}, {
|
|
997
|
+
language: string;
|
|
997
998
|
firstName: string;
|
|
998
999
|
lastName: string;
|
|
1000
|
+
birthday: Date;
|
|
999
1001
|
identificationType: "dni";
|
|
1000
1002
|
identificationValue: string;
|
|
1001
1003
|
gender: "m" | "f";
|
|
1002
1004
|
phone: string;
|
|
1003
1005
|
email: string;
|
|
1004
|
-
language: string;
|
|
1005
|
-
birthday: Date;
|
|
1006
1006
|
}>;
|
|
1007
1007
|
diagnosticaPatient: import("zod").ZodObject<{
|
|
1008
1008
|
firstName: import("zod").ZodString;
|
|
@@ -1014,17 +1014,17 @@ export declare const doc24Schemas: {
|
|
|
1014
1014
|
}, "strip", import("zod").ZodTypeAny, {
|
|
1015
1015
|
firstName: string;
|
|
1016
1016
|
lastName: string;
|
|
1017
|
+
birthday: Date;
|
|
1017
1018
|
identificationType: "dni";
|
|
1018
1019
|
identificationValue: string;
|
|
1019
1020
|
gender: "m" | "f";
|
|
1020
|
-
birthday: Date;
|
|
1021
1021
|
}, {
|
|
1022
1022
|
firstName: string;
|
|
1023
1023
|
lastName: string;
|
|
1024
|
+
birthday: Date;
|
|
1024
1025
|
identificationType: "dni";
|
|
1025
1026
|
identificationValue: string;
|
|
1026
1027
|
gender: "m" | "f";
|
|
1027
|
-
birthday: Date;
|
|
1028
1028
|
}>;
|
|
1029
1029
|
diagnosticaDeepLinkResponse: import("zod").ZodUnion<[import("zod").ZodObject<{
|
|
1030
1030
|
forwardingRequired: import("zod").ZodLiteral<true>;
|
|
@@ -1068,9 +1068,9 @@ export declare const doc24Schemas: {
|
|
|
1068
1068
|
}, "strip", import("zod").ZodTypeAny, {
|
|
1069
1069
|
firstName: string | null;
|
|
1070
1070
|
lastName: string | null;
|
|
1071
|
-
birthdate: Date;
|
|
1072
1071
|
gender: "m" | "f";
|
|
1073
1072
|
email: string | null;
|
|
1073
|
+
birthdate: Date;
|
|
1074
1074
|
identificationNumber: string;
|
|
1075
1075
|
plan: string | null;
|
|
1076
1076
|
financerId: number | null;
|
|
@@ -1091,9 +1091,9 @@ export declare const doc24Schemas: {
|
|
|
1091
1091
|
}, {
|
|
1092
1092
|
firstName: string | null;
|
|
1093
1093
|
lastName: string | null;
|
|
1094
|
-
birthdate: Date;
|
|
1095
1094
|
gender: "m" | "f";
|
|
1096
1095
|
email: string | null;
|
|
1096
|
+
birthdate: Date;
|
|
1097
1097
|
identificationNumber: string;
|
|
1098
1098
|
plan: string | null;
|
|
1099
1099
|
financerId: number | null;
|
|
@@ -1112,210 +1112,4 @@ export declare const doc24Schemas: {
|
|
|
1112
1112
|
authorizationCode: string | null;
|
|
1113
1113
|
authorizationCodeExpiration: Date | null;
|
|
1114
1114
|
}>>;
|
|
1115
|
-
sendVerificationCodeParams: import("zod").ZodObject<{
|
|
1116
|
-
identificationType: import("zod").ZodEnum<["ndi", "passport", "credential"]>;
|
|
1117
|
-
identificationValue: import("zod").ZodString;
|
|
1118
|
-
channel: import("zod").ZodEnum<["1", "2"]>;
|
|
1119
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
1120
|
-
identificationType: "ndi" | "passport" | "credential";
|
|
1121
|
-
identificationValue: string;
|
|
1122
|
-
channel: "1" | "2";
|
|
1123
|
-
}, {
|
|
1124
|
-
identificationType: "ndi" | "passport" | "credential";
|
|
1125
|
-
identificationValue: string;
|
|
1126
|
-
channel: "1" | "2";
|
|
1127
|
-
}>;
|
|
1128
|
-
declareUserParams: import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
1129
|
-
user: import("zod").ZodObject<import("zod").extendShape<{
|
|
1130
|
-
firstName: import("zod").ZodString;
|
|
1131
|
-
lastName: import("zod").ZodString;
|
|
1132
|
-
identificationType: import("zod").ZodEnum<["ndi", "passport", "credential"]>;
|
|
1133
|
-
identificationValue: import("zod").ZodString;
|
|
1134
|
-
countryId: import("zod").ZodString;
|
|
1135
|
-
birthdate: import("zod").ZodDate;
|
|
1136
|
-
gender: import("zod").ZodEnum<["m", "f"]>;
|
|
1137
|
-
}, {
|
|
1138
|
-
phone: import("zod").ZodString;
|
|
1139
|
-
email: import("zod").ZodString;
|
|
1140
|
-
}>, "strip", import("zod").ZodTypeAny, {
|
|
1141
|
-
firstName: string;
|
|
1142
|
-
lastName: string;
|
|
1143
|
-
identificationType: "ndi" | "passport" | "credential";
|
|
1144
|
-
identificationValue: string;
|
|
1145
|
-
countryId: string;
|
|
1146
|
-
birthdate: Date;
|
|
1147
|
-
gender: "m" | "f";
|
|
1148
|
-
phone: string;
|
|
1149
|
-
email: string;
|
|
1150
|
-
}, {
|
|
1151
|
-
firstName: string;
|
|
1152
|
-
lastName: string;
|
|
1153
|
-
identificationType: "ndi" | "passport" | "credential";
|
|
1154
|
-
identificationValue: string;
|
|
1155
|
-
countryId: string;
|
|
1156
|
-
birthdate: Date;
|
|
1157
|
-
gender: "m" | "f";
|
|
1158
|
-
phone: string;
|
|
1159
|
-
email: string;
|
|
1160
|
-
}>;
|
|
1161
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
1162
|
-
user: {
|
|
1163
|
-
firstName: string;
|
|
1164
|
-
lastName: string;
|
|
1165
|
-
identificationType: "ndi" | "passport" | "credential";
|
|
1166
|
-
identificationValue: string;
|
|
1167
|
-
countryId: string;
|
|
1168
|
-
birthdate: Date;
|
|
1169
|
-
gender: "m" | "f";
|
|
1170
|
-
phone: string;
|
|
1171
|
-
email: string;
|
|
1172
|
-
};
|
|
1173
|
-
}, {
|
|
1174
|
-
user: {
|
|
1175
|
-
firstName: string;
|
|
1176
|
-
lastName: string;
|
|
1177
|
-
identificationType: "ndi" | "passport" | "credential";
|
|
1178
|
-
identificationValue: string;
|
|
1179
|
-
countryId: string;
|
|
1180
|
-
birthdate: Date;
|
|
1181
|
-
gender: "m" | "f";
|
|
1182
|
-
phone: string;
|
|
1183
|
-
email: string;
|
|
1184
|
-
};
|
|
1185
|
-
}>, import("zod").ZodObject<{
|
|
1186
|
-
channel: import("zod").ZodOptional<import("zod").ZodEnum<["1", "2"]>>;
|
|
1187
|
-
code: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1188
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
1189
|
-
code?: string | undefined;
|
|
1190
|
-
channel?: "1" | "2" | undefined;
|
|
1191
|
-
}, {
|
|
1192
|
-
code?: string | undefined;
|
|
1193
|
-
channel?: "1" | "2" | undefined;
|
|
1194
|
-
}>>;
|
|
1195
|
-
declareUserResponse: import("zod").ZodObject<import("zod").extendShape<{
|
|
1196
|
-
patientId: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
1197
|
-
userInfo: import("zod").ZodObject<{
|
|
1198
|
-
email: import("zod").ZodString;
|
|
1199
|
-
phone: import("zod").ZodString;
|
|
1200
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
1201
|
-
phone: string;
|
|
1202
|
-
email: string;
|
|
1203
|
-
}, {
|
|
1204
|
-
phone: string;
|
|
1205
|
-
email: string;
|
|
1206
|
-
}>;
|
|
1207
|
-
askCode: import("zod").ZodBoolean;
|
|
1208
|
-
}, {
|
|
1209
|
-
userId: import("zod").ZodNumber;
|
|
1210
|
-
}>, "strip", import("zod").ZodTypeAny, {
|
|
1211
|
-
patientId: number | null;
|
|
1212
|
-
userInfo: {
|
|
1213
|
-
phone: string;
|
|
1214
|
-
email: string;
|
|
1215
|
-
};
|
|
1216
|
-
askCode: boolean;
|
|
1217
|
-
userId: number;
|
|
1218
|
-
}, {
|
|
1219
|
-
patientId: number | null;
|
|
1220
|
-
userInfo: {
|
|
1221
|
-
phone: string;
|
|
1222
|
-
email: string;
|
|
1223
|
-
};
|
|
1224
|
-
askCode: boolean;
|
|
1225
|
-
userId: number;
|
|
1226
|
-
}>;
|
|
1227
|
-
declarePatientParams: import("zod").ZodIntersection<import("zod").ZodObject<{
|
|
1228
|
-
patient: import("zod").ZodObject<{
|
|
1229
|
-
firstName: import("zod").ZodString;
|
|
1230
|
-
lastName: import("zod").ZodString;
|
|
1231
|
-
identificationType: import("zod").ZodEnum<["ndi", "passport", "credential"]>;
|
|
1232
|
-
identificationValue: import("zod").ZodString;
|
|
1233
|
-
countryId: import("zod").ZodString;
|
|
1234
|
-
birthdate: import("zod").ZodDate;
|
|
1235
|
-
gender: import("zod").ZodEnum<["m", "f"]>;
|
|
1236
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
1237
|
-
firstName: string;
|
|
1238
|
-
lastName: string;
|
|
1239
|
-
identificationType: "ndi" | "passport" | "credential";
|
|
1240
|
-
identificationValue: string;
|
|
1241
|
-
countryId: string;
|
|
1242
|
-
birthdate: Date;
|
|
1243
|
-
gender: "m" | "f";
|
|
1244
|
-
}, {
|
|
1245
|
-
firstName: string;
|
|
1246
|
-
lastName: string;
|
|
1247
|
-
identificationType: "ndi" | "passport" | "credential";
|
|
1248
|
-
identificationValue: string;
|
|
1249
|
-
countryId: string;
|
|
1250
|
-
birthdate: Date;
|
|
1251
|
-
gender: "m" | "f";
|
|
1252
|
-
}>;
|
|
1253
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
1254
|
-
patient: {
|
|
1255
|
-
firstName: string;
|
|
1256
|
-
lastName: string;
|
|
1257
|
-
identificationType: "ndi" | "passport" | "credential";
|
|
1258
|
-
identificationValue: string;
|
|
1259
|
-
countryId: string;
|
|
1260
|
-
birthdate: Date;
|
|
1261
|
-
gender: "m" | "f";
|
|
1262
|
-
};
|
|
1263
|
-
}, {
|
|
1264
|
-
patient: {
|
|
1265
|
-
firstName: string;
|
|
1266
|
-
lastName: string;
|
|
1267
|
-
identificationType: "ndi" | "passport" | "credential";
|
|
1268
|
-
identificationValue: string;
|
|
1269
|
-
countryId: string;
|
|
1270
|
-
birthdate: Date;
|
|
1271
|
-
gender: "m" | "f";
|
|
1272
|
-
};
|
|
1273
|
-
}>, import("zod").ZodObject<{
|
|
1274
|
-
channel: import("zod").ZodOptional<import("zod").ZodEnum<["1", "2"]>>;
|
|
1275
|
-
code: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1276
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
1277
|
-
code?: string | undefined;
|
|
1278
|
-
channel?: "1" | "2" | undefined;
|
|
1279
|
-
}, {
|
|
1280
|
-
code?: string | undefined;
|
|
1281
|
-
channel?: "1" | "2" | undefined;
|
|
1282
|
-
}>>;
|
|
1283
|
-
declarePatientResponse: import("zod").ZodObject<{
|
|
1284
|
-
patientId: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
1285
|
-
userInfo: import("zod").ZodObject<{
|
|
1286
|
-
email: import("zod").ZodString;
|
|
1287
|
-
phone: import("zod").ZodString;
|
|
1288
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
1289
|
-
phone: string;
|
|
1290
|
-
email: string;
|
|
1291
|
-
}, {
|
|
1292
|
-
phone: string;
|
|
1293
|
-
email: string;
|
|
1294
|
-
}>;
|
|
1295
|
-
askCode: import("zod").ZodBoolean;
|
|
1296
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
1297
|
-
patientId: number | null;
|
|
1298
|
-
userInfo: {
|
|
1299
|
-
phone: string;
|
|
1300
|
-
email: string;
|
|
1301
|
-
};
|
|
1302
|
-
askCode: boolean;
|
|
1303
|
-
}, {
|
|
1304
|
-
patientId: number | null;
|
|
1305
|
-
userInfo: {
|
|
1306
|
-
phone: string;
|
|
1307
|
-
email: string;
|
|
1308
|
-
};
|
|
1309
|
-
askCode: boolean;
|
|
1310
|
-
}>;
|
|
1311
|
-
verificationParams: import("zod").ZodObject<{
|
|
1312
|
-
channel: import("zod").ZodOptional<import("zod").ZodEnum<["1", "2"]>>;
|
|
1313
|
-
code: import("zod").ZodOptional<import("zod").ZodString>;
|
|
1314
|
-
}, "strip", import("zod").ZodTypeAny, {
|
|
1315
|
-
code?: string | undefined;
|
|
1316
|
-
channel?: "1" | "2" | undefined;
|
|
1317
|
-
}, {
|
|
1318
|
-
code?: string | undefined;
|
|
1319
|
-
channel?: "1" | "2" | undefined;
|
|
1320
|
-
}>;
|
|
1321
1115
|
};
|
package/lib/schemas.js
CHANGED
|
@@ -14,8 +14,6 @@ const basePersonData = zod_1.object({
|
|
|
14
14
|
birthdate: zod_1.date(),
|
|
15
15
|
gender,
|
|
16
16
|
});
|
|
17
|
-
const patient = basePersonData;
|
|
18
|
-
const user = basePersonData.extend({ phone: zod_1.string(), email: zod_1.string() });
|
|
19
17
|
const specialtyMode = zod_1.enum(['appointment', 'chat', 'instant']);
|
|
20
18
|
const specialty = zod_1.object({
|
|
21
19
|
id: zod_1.number(),
|
|
@@ -174,36 +172,12 @@ const coverageInfo = zod_1.object({
|
|
|
174
172
|
authorizationCode: zod_1.string().nullable(),
|
|
175
173
|
authorizationCodeExpiration: zod_1.date().nullable(),
|
|
176
174
|
}).nullable();
|
|
177
|
-
const sendVerificationCodeParams = zod_1.object({
|
|
178
|
-
identificationType,
|
|
179
|
-
identificationValue: zod_1.string(),
|
|
180
|
-
channel: zod_1.enum(['1', '2']),
|
|
181
|
-
});
|
|
182
|
-
const verificationParams = zod_1.object({
|
|
183
|
-
channel: zod_1.enum(['1', '2']).optional(),
|
|
184
|
-
code: zod_1.string().optional(),
|
|
185
|
-
});
|
|
186
|
-
const declareUserParams = zod_1.object({
|
|
187
|
-
user,
|
|
188
|
-
}).and(verificationParams);
|
|
189
|
-
const declarePatientParams = zod_1.object({
|
|
190
|
-
patient,
|
|
191
|
-
}).and(verificationParams);
|
|
192
|
-
const declarePatientResponse = zod_1.object({
|
|
193
|
-
patientId: zod_1.number().nullable(),
|
|
194
|
-
userInfo: zod_1.object({
|
|
195
|
-
email: zod_1.string(),
|
|
196
|
-
phone: zod_1.string(),
|
|
197
|
-
}),
|
|
198
|
-
askCode: zod_1.boolean(),
|
|
199
|
-
});
|
|
200
|
-
const declareUserResponse = declarePatientResponse.extend({ userId: zod_1.number() });
|
|
201
175
|
exports.doc24Schemas = {
|
|
202
176
|
identificationType,
|
|
203
177
|
sdkCredentials,
|
|
204
178
|
sdkParams: zod_1.object({ url: zod_1.string(), credentials: sdkCredentials }),
|
|
205
|
-
user,
|
|
206
|
-
patient,
|
|
179
|
+
user: basePersonData.extend({ phone: zod_1.string(), email: zod_1.string() }),
|
|
180
|
+
patient: basePersonData,
|
|
207
181
|
specialtyMode,
|
|
208
182
|
specialty,
|
|
209
183
|
scheduleAvailabilityFilter,
|
|
@@ -317,10 +291,4 @@ exports.doc24Schemas = {
|
|
|
317
291
|
diagnosticaPatient,
|
|
318
292
|
diagnosticaDeepLinkResponse,
|
|
319
293
|
coverageInfo,
|
|
320
|
-
sendVerificationCodeParams,
|
|
321
|
-
declareUserParams,
|
|
322
|
-
declareUserResponse,
|
|
323
|
-
declarePatientParams,
|
|
324
|
-
declarePatientResponse,
|
|
325
|
-
verificationParams,
|
|
326
294
|
};
|
package/lib/test.js
CHANGED
|
@@ -10,43 +10,8 @@ const test = async () => {
|
|
|
10
10
|
key: '33Ypv5jQ1VTr1KcOImdBhPnoRDqmPlYR3JWbrlUim9U=',
|
|
11
11
|
},
|
|
12
12
|
});
|
|
13
|
-
const
|
|
14
|
-
let res = await userSdk.declarePatient({
|
|
15
|
-
patient: {
|
|
16
|
-
firstName: 'Rafael Elias',
|
|
17
|
-
lastName: 'Mian',
|
|
18
|
-
identificationType: 'ndi',
|
|
19
|
-
identificationValue: '37970350',
|
|
20
|
-
countryId: 'AR',
|
|
21
|
-
birthdate: new Date('1996-07-03'),
|
|
22
|
-
gender: 'm',
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
// let res = await baseSdk.declareUser({
|
|
26
|
-
// user: {
|
|
27
|
-
// firstName: 'Rafael Elias',
|
|
28
|
-
// lastName: 'Mian',
|
|
29
|
-
// identificationType: 'ndi',
|
|
30
|
-
// identificationValue: '37970350',
|
|
31
|
-
// countryId: 'AR',
|
|
32
|
-
// birthdate: new Date('1996-07-03'),
|
|
33
|
-
// gender: 'm',
|
|
34
|
-
// email: 'rafaelmian35@gmail.com',
|
|
35
|
-
// phone: '+5493764203061',
|
|
36
|
-
// },
|
|
37
|
-
// // channel: '1',
|
|
38
|
-
// // code: '370356',
|
|
39
|
-
// });
|
|
13
|
+
const res = await baseSdk.getAvailableScheduleClinics();
|
|
40
14
|
console.log(res);
|
|
41
|
-
// await new Promise((resolve) => setTimeout(resolve, 2000));
|
|
42
|
-
// if (!res.ask_code) return res.userId;
|
|
43
|
-
// await baseSdk.sendVerificationCode({
|
|
44
|
-
// identificationType: 'ndi',
|
|
45
|
-
// identificationValue: '37970350',
|
|
46
|
-
// channel: '1',
|
|
47
|
-
// });
|
|
48
|
-
// console.log(res);
|
|
49
|
-
return;
|
|
50
15
|
}
|
|
51
16
|
catch (e) {
|
|
52
17
|
console.log(e);
|
package/lib/types.d.ts
CHANGED
|
@@ -30,28 +30,19 @@ export declare namespace Doc24 {
|
|
|
30
30
|
type DiagnosticaPatient = TypeOf<typeof doc24Schemas.diagnosticaPatient>;
|
|
31
31
|
type DiagnosticaHistoryAppointment = TypeOf<typeof doc24Schemas.diagnosticaHistoryAppointment>;
|
|
32
32
|
type DiagnosticaDeepLinkResponse = TypeOf<typeof doc24Schemas.diagnosticaDeepLinkResponse>;
|
|
33
|
-
type SendVerificationCodeParams = TypeOf<typeof doc24Schemas.sendVerificationCodeParams>;
|
|
34
|
-
type DeclareUserParams = TypeOf<typeof doc24Schemas.declareUserParams>;
|
|
35
|
-
type DeclareUserResponse = TypeOf<typeof doc24Schemas.declareUserResponse>;
|
|
36
|
-
type DeclarePatientParams = TypeOf<typeof doc24Schemas.declarePatientParams>;
|
|
37
|
-
type DeclarePatientResponse = TypeOf<typeof doc24Schemas.declarePatientResponse>;
|
|
38
|
-
type VerificationParams = TypeOf<typeof doc24Schemas.verificationParams>;
|
|
39
33
|
type BaseSdk = {
|
|
40
|
-
declareUser: (
|
|
41
|
-
getUserId: (user: User) => Promise<number>;
|
|
34
|
+
declareUser: (user: User) => Promise<number>;
|
|
42
35
|
getUserInstance: (user: User | number) => Promise<UserSdk>;
|
|
43
36
|
getProfessional: (professionalId: number) => Promise<Professional>;
|
|
44
37
|
getAvailableScheduleClinics: () => Promise<AvailableScheduleClinics>;
|
|
45
38
|
enroll: (params: EnrollmentParams) => Promise<void>;
|
|
46
39
|
getConverageInfo: (identificationValue: string) => Promise<CoverageInfo>;
|
|
47
|
-
sendVerificationCode: (params: SendVerificationCodeParams) => Promise<any>;
|
|
48
40
|
getDiagnosticaHistory: (patient: DiagnosticaPatientFilter, from: Date, to: Date) => Promise<DiagnosticaHistoryAppointment[]>;
|
|
49
41
|
getDiagnosticaDeepLink: (kiosk: string, user: DiagnosticaUser, patient: DiagnosticaPatient) => Promise<DiagnosticaDeepLinkResponse>;
|
|
50
42
|
getDiagnosticaAccess: (kiosk: string, user: DiagnosticaUser, patient: DiagnosticaPatient) => Promise<void>;
|
|
51
43
|
};
|
|
52
44
|
type UserSdk = {
|
|
53
|
-
declarePatient: (
|
|
54
|
-
getPatientId: (patient: Patient) => Promise<number>;
|
|
45
|
+
declarePatient: (patient: Patient) => Promise<number>;
|
|
55
46
|
getSpecialties: (mode: SpecialtyMode, language: string) => Promise<Specialty[]>;
|
|
56
47
|
getScheduleDates: (patientId: number, filter?: ScheduleAvailabilityFilter) => Promise<Date[]>;
|
|
57
48
|
getSchedule: (patientId: number, specialtyId: number, filter?: ScheduleFilter) => Promise<AvailableAppointment[]>;
|
package/lib/userSdk/chat.d.ts
CHANGED
|
@@ -24,9 +24,9 @@ export declare const getChatMethods: (makeRequest: RequestMaker) => {
|
|
|
24
24
|
getPatientChats: (patientId: number) => Promise<{
|
|
25
25
|
id: number;
|
|
26
26
|
patient: {
|
|
27
|
+
id: number;
|
|
27
28
|
firstName: string;
|
|
28
29
|
lastName: string;
|
|
29
|
-
id: number;
|
|
30
30
|
};
|
|
31
31
|
professional: {
|
|
32
32
|
id: number;
|
|
@@ -1,33 +1,12 @@
|
|
|
1
1
|
import { RequestMaker } from '../request';
|
|
2
2
|
export declare const getPatientMethods: (makeRequest: RequestMaker) => {
|
|
3
|
-
declarePatient: (
|
|
4
|
-
patient: {
|
|
5
|
-
firstName: string;
|
|
6
|
-
lastName: string;
|
|
7
|
-
identificationType: "ndi" | "passport" | "credential";
|
|
8
|
-
identificationValue: string;
|
|
9
|
-
countryId: string;
|
|
10
|
-
birthdate: Date;
|
|
11
|
-
gender: "m" | "f";
|
|
12
|
-
};
|
|
13
|
-
} & {
|
|
14
|
-
code?: string | undefined;
|
|
15
|
-
channel?: "1" | "2" | undefined;
|
|
16
|
-
}) => Promise<{
|
|
17
|
-
patientId: number | null;
|
|
18
|
-
userInfo: {
|
|
19
|
-
phone: string;
|
|
20
|
-
email: string;
|
|
21
|
-
};
|
|
22
|
-
askCode: boolean;
|
|
23
|
-
}>;
|
|
24
|
-
getPatientId: (patient: {
|
|
3
|
+
declarePatient: (patient: {
|
|
25
4
|
firstName: string;
|
|
26
5
|
lastName: string;
|
|
27
6
|
identificationType: "ndi" | "passport" | "credential";
|
|
28
7
|
identificationValue: string;
|
|
8
|
+
gender: "m" | "f";
|
|
29
9
|
countryId: string;
|
|
30
10
|
birthdate: Date;
|
|
31
|
-
gender: "m" | "f";
|
|
32
11
|
}) => Promise<number>;
|
|
33
12
|
};
|