@integraciones_doc24/sdk 0.35.1 → 1.2.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/README.md +131 -83
- package/lib/baseSdk/diagnostica.d.ts +6 -6
- package/lib/baseSdk/index.js +1 -5
- package/lib/baseSdk/user.d.ts +52 -4
- package/lib/baseSdk/user.js +67 -25
- package/lib/index.d.ts +45 -16
- package/lib/schemas.d.ts +236 -30
- package/lib/schemas.js +34 -2
- package/lib/test.js +36 -1
- package/lib/types.d.ts +11 -2
- package/lib/userSdk/chat.d.ts +1 -1
- package/lib/userSdk/patients.d.ts +23 -2
- package/lib/userSdk/patients.js +34 -6
- package/lib/userSdk/videoVisit.d.ts +2 -2
- package/lib/utils.d.ts +1 -1
- package/lib/utils.js +3 -3
- package/package.json +2 -2
- package/lib/lib/lib/lib/baseSdk/diagnostica.d.ts +0 -6
- package/lib/lib/lib/lib/baseSdk/diagnostica.js +0 -79
- package/lib/lib/lib/lib/baseSdk/index.d.ts +0 -14
- package/lib/lib/lib/lib/baseSdk/index.js +0 -66
- package/lib/lib/lib/lib/baseSdk/user.d.ts +0 -9
- package/lib/lib/lib/lib/baseSdk/user.js +0 -130
- package/lib/lib/lib/lib/index.d.ts +0 -58
- package/lib/lib/lib/lib/index.js +0 -22
- package/lib/lib/lib/lib/request/index.d.ts +0 -2
- package/lib/lib/lib/lib/request/index.js +0 -26
- package/lib/lib/lib/lib/request/token.d.ts +0 -2
- package/lib/lib/lib/lib/request/token.js +0 -34
- package/lib/lib/lib/lib/request/validation.d.ts +0 -10
- package/lib/lib/lib/lib/request/validation.js +0 -28
- package/lib/lib/lib/lib/schemas.d.ts +0 -1334
- package/lib/lib/lib/lib/schemas.js +0 -325
- package/lib/lib/lib/lib/test.d.ts +0 -1
- package/lib/lib/lib/lib/test.js +0 -55
- package/lib/lib/lib/lib/types.d.ts +0 -1
- package/lib/lib/lib/lib/types.js +0 -2
- package/lib/lib/lib/lib/userSdk/chat.d.ts +0 -9
- package/lib/lib/lib/lib/userSdk/chat.js +0 -98
- package/lib/lib/lib/lib/userSdk/index.d.ts +0 -24
- package/lib/lib/lib/lib/userSdk/index.js +0 -27
- package/lib/lib/lib/lib/userSdk/patients.d.ts +0 -5
- package/lib/lib/lib/lib/userSdk/patients.js +0 -55
- package/lib/lib/lib/lib/userSdk/schedule.d.ts +0 -7
- package/lib/lib/lib/lib/userSdk/schedule.js +0 -76
- package/lib/lib/lib/lib/userSdk/specialties.d.ts +0 -4
- package/lib/lib/lib/lib/userSdk/specialties.js +0 -19
- package/lib/lib/lib/lib/userSdk/videoVisit.d.ts +0 -10
- package/lib/lib/lib/lib/userSdk/videoVisit.js +0 -147
- package/lib/lib/lib/lib/utils.d.ts +0 -4
- package/lib/lib/lib/lib/utils.js +0 -19
- package/lib/lib/lib/lib/webhook/index.d.ts +0 -8
- package/lib/lib/lib/lib/webhook/index.js +0 -55
- package/lib/lib/lib/lib/webhook/responses.d.ts +0 -36
- package/lib/lib/lib/lib/webhook/responses.js +0 -42
- package/lib/lib/lib/lib/webhook/token.d.ts +0 -2
- package/lib/lib/lib/lib/webhook/token.js +0 -23
- package/lib/lib/lib/src/baseSdk/diagnostica.d.ts +0 -6
- package/lib/lib/lib/src/baseSdk/diagnostica.js +0 -79
- package/lib/lib/lib/src/baseSdk/index.d.ts +0 -51
- package/lib/lib/lib/src/baseSdk/index.js +0 -66
- package/lib/lib/lib/src/baseSdk/user.d.ts +0 -9
- package/lib/lib/lib/src/baseSdk/user.js +0 -130
- package/lib/lib/lib/src/index.d.ts +0 -169
- package/lib/lib/lib/src/index.js +0 -22
- package/lib/lib/lib/src/request/index.d.ts +0 -2
- package/lib/lib/lib/src/request/index.js +0 -26
- package/lib/lib/lib/src/request/token.d.ts +0 -2
- package/lib/lib/lib/src/request/token.js +0 -34
- package/lib/lib/lib/src/request/validation.d.ts +0 -10
- package/lib/lib/lib/src/request/validation.js +0 -28
- package/lib/lib/lib/src/schemas.d.ts +0 -1340
- package/lib/lib/lib/src/schemas.js +0 -325
- package/lib/lib/lib/src/types.d.ts +0 -1
- package/lib/lib/lib/src/types.js +0 -2
- package/lib/lib/lib/src/userSdk/chat.d.ts +0 -9
- package/lib/lib/lib/src/userSdk/chat.js +0 -98
- package/lib/lib/lib/src/userSdk/index.d.ts +0 -102
- package/lib/lib/lib/src/userSdk/index.js +0 -27
- package/lib/lib/lib/src/userSdk/patients.d.ts +0 -5
- package/lib/lib/lib/src/userSdk/patients.js +0 -55
- package/lib/lib/lib/src/userSdk/schedule.d.ts +0 -7
- package/lib/lib/lib/src/userSdk/schedule.js +0 -76
- package/lib/lib/lib/src/userSdk/specialties.d.ts +0 -4
- package/lib/lib/lib/src/userSdk/specialties.js +0 -19
- package/lib/lib/lib/src/userSdk/videoVisit.d.ts +0 -10
- package/lib/lib/lib/src/userSdk/videoVisit.js +0 -147
- package/lib/lib/lib/src/utils.d.ts +0 -4
- package/lib/lib/lib/src/utils.js +0 -19
- package/lib/lib/lib/src/webhook/index.d.ts +0 -8
- package/lib/lib/lib/src/webhook/index.js +0 -55
- package/lib/lib/lib/src/webhook/responses.d.ts +0 -36
- package/lib/lib/lib/src/webhook/responses.js +0 -42
- package/lib/lib/lib/src/webhook/token.d.ts +0 -2
- package/lib/lib/lib/src/webhook/token.js +0 -23
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;
|
|
54
56
|
gender: "m" | "f";
|
|
55
57
|
phone: string;
|
|
56
58
|
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;
|
|
64
66
|
gender: "m" | "f";
|
|
65
67
|
phone: string;
|
|
66
68
|
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";
|
|
84
83
|
countryId: string;
|
|
85
84
|
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";
|
|
92
91
|
countryId: string;
|
|
93
92
|
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;
|
|
357
356
|
phone: string | null;
|
|
358
357
|
email: string | null;
|
|
359
|
-
}, {
|
|
360
358
|
id: number;
|
|
359
|
+
}, {
|
|
361
360
|
phone: string | null;
|
|
362
361
|
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;
|
|
403
402
|
phone: string | null;
|
|
404
403
|
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;
|
|
423
422
|
phone: string | null;
|
|
424
423
|
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;
|
|
676
674
|
firstName: string;
|
|
677
675
|
lastName: string;
|
|
676
|
+
birthdate: Date;
|
|
678
677
|
gender: "m" | "f";
|
|
679
678
|
phone: string | null;
|
|
680
679
|
email: string;
|
|
681
|
-
|
|
680
|
+
id: number;
|
|
681
|
+
logoUrl: string;
|
|
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;
|
|
699
697
|
firstName: string;
|
|
700
698
|
lastName: string;
|
|
699
|
+
birthdate: Date;
|
|
701
700
|
gender: "m" | "f";
|
|
702
701
|
phone: string | null;
|
|
703
702
|
email: string;
|
|
704
|
-
|
|
703
|
+
id: number;
|
|
704
|
+
logoUrl: string;
|
|
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;
|
|
819
818
|
firstName: string;
|
|
820
819
|
lastName: string;
|
|
821
|
-
}, {
|
|
822
820
|
id: number;
|
|
821
|
+
}, {
|
|
823
822
|
firstName: string;
|
|
824
823
|
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;
|
|
857
856
|
firstName: string;
|
|
858
857
|
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;
|
|
881
880
|
firstName: string;
|
|
882
881
|
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;
|
|
930
931
|
gender: "m" | "f";
|
|
931
932
|
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;
|
|
939
940
|
gender: "m" | "f";
|
|
940
941
|
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;
|
|
988
987
|
firstName: string;
|
|
989
988
|
lastName: string;
|
|
990
|
-
birthday: Date;
|
|
991
989
|
identificationType: "dni";
|
|
992
990
|
identificationValue: string;
|
|
993
991
|
gender: "m" | "f";
|
|
994
992
|
phone: string;
|
|
995
993
|
email: string;
|
|
996
|
-
}, {
|
|
997
994
|
language: string;
|
|
995
|
+
birthday: Date;
|
|
996
|
+
}, {
|
|
998
997
|
firstName: string;
|
|
999
998
|
lastName: string;
|
|
1000
|
-
birthday: Date;
|
|
1001
999
|
identificationType: "dni";
|
|
1002
1000
|
identificationValue: string;
|
|
1003
1001
|
gender: "m" | "f";
|
|
1004
1002
|
phone: string;
|
|
1005
1003
|
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;
|
|
1018
1017
|
identificationType: "dni";
|
|
1019
1018
|
identificationValue: string;
|
|
1020
1019
|
gender: "m" | "f";
|
|
1020
|
+
birthday: Date;
|
|
1021
1021
|
}, {
|
|
1022
1022
|
firstName: string;
|
|
1023
1023
|
lastName: string;
|
|
1024
|
-
birthday: Date;
|
|
1025
1024
|
identificationType: "dni";
|
|
1026
1025
|
identificationValue: string;
|
|
1027
1026
|
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;
|
|
1071
1072
|
gender: "m" | "f";
|
|
1072
1073
|
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;
|
|
1094
1095
|
gender: "m" | "f";
|
|
1095
1096
|
email: string | null;
|
|
1096
|
-
birthdate: Date;
|
|
1097
1097
|
identificationNumber: string;
|
|
1098
1098
|
plan: string | null;
|
|
1099
1099
|
financerId: number | null;
|
|
@@ -1112,4 +1112,210 @@ 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
|
+
}>;
|
|
1115
1321
|
};
|
package/lib/schemas.js
CHANGED
|
@@ -14,6 +14,8 @@ 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() });
|
|
17
19
|
const specialtyMode = zod_1.enum(['appointment', 'chat', 'instant']);
|
|
18
20
|
const specialty = zod_1.object({
|
|
19
21
|
id: zod_1.number(),
|
|
@@ -172,12 +174,36 @@ const coverageInfo = zod_1.object({
|
|
|
172
174
|
authorizationCode: zod_1.string().nullable(),
|
|
173
175
|
authorizationCodeExpiration: zod_1.date().nullable(),
|
|
174
176
|
}).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() });
|
|
175
201
|
exports.doc24Schemas = {
|
|
176
202
|
identificationType,
|
|
177
203
|
sdkCredentials,
|
|
178
204
|
sdkParams: zod_1.object({ url: zod_1.string(), credentials: sdkCredentials }),
|
|
179
|
-
user
|
|
180
|
-
patient
|
|
205
|
+
user,
|
|
206
|
+
patient,
|
|
181
207
|
specialtyMode,
|
|
182
208
|
specialty,
|
|
183
209
|
scheduleAvailabilityFilter,
|
|
@@ -291,4 +317,10 @@ exports.doc24Schemas = {
|
|
|
291
317
|
diagnosticaPatient,
|
|
292
318
|
diagnosticaDeepLinkResponse,
|
|
293
319
|
coverageInfo,
|
|
320
|
+
sendVerificationCodeParams,
|
|
321
|
+
declareUserParams,
|
|
322
|
+
declareUserResponse,
|
|
323
|
+
declarePatientParams,
|
|
324
|
+
declarePatientResponse,
|
|
325
|
+
verificationParams,
|
|
294
326
|
};
|
package/lib/test.js
CHANGED
|
@@ -10,8 +10,43 @@ const test = async () => {
|
|
|
10
10
|
key: '33Ypv5jQ1VTr1KcOImdBhPnoRDqmPlYR3JWbrlUim9U=',
|
|
11
11
|
},
|
|
12
12
|
});
|
|
13
|
-
const
|
|
13
|
+
const userSdk = await baseSdk.getUserInstance(15135);
|
|
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
|
+
// });
|
|
14
40
|
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;
|
|
15
50
|
}
|
|
16
51
|
catch (e) {
|
|
17
52
|
console.log(e);
|
package/lib/types.d.ts
CHANGED
|
@@ -30,19 +30,28 @@ 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>;
|
|
33
39
|
type BaseSdk = {
|
|
34
|
-
declareUser: (
|
|
40
|
+
declareUser: (params: DeclareUserParams) => Promise<DeclareUserResponse>;
|
|
41
|
+
getUserId: (user: User) => Promise<number>;
|
|
35
42
|
getUserInstance: (user: User | number) => Promise<UserSdk>;
|
|
36
43
|
getProfessional: (professionalId: number) => Promise<Professional>;
|
|
37
44
|
getAvailableScheduleClinics: () => Promise<AvailableScheduleClinics>;
|
|
38
45
|
enroll: (params: EnrollmentParams) => Promise<void>;
|
|
39
46
|
getConverageInfo: (identificationValue: string) => Promise<CoverageInfo>;
|
|
47
|
+
sendVerificationCode: (params: SendVerificationCodeParams) => Promise<any>;
|
|
40
48
|
getDiagnosticaHistory: (patient: DiagnosticaPatientFilter, from: Date, to: Date) => Promise<DiagnosticaHistoryAppointment[]>;
|
|
41
49
|
getDiagnosticaDeepLink: (kiosk: string, user: DiagnosticaUser, patient: DiagnosticaPatient) => Promise<DiagnosticaDeepLinkResponse>;
|
|
42
50
|
getDiagnosticaAccess: (kiosk: string, user: DiagnosticaUser, patient: DiagnosticaPatient) => Promise<void>;
|
|
43
51
|
};
|
|
44
52
|
type UserSdk = {
|
|
45
|
-
declarePatient: (
|
|
53
|
+
declarePatient: (params: DeclarePatientParams) => Promise<DeclarePatientResponse>;
|
|
54
|
+
getPatientId: (patient: Patient) => Promise<number>;
|
|
46
55
|
getSpecialties: (mode: SpecialtyMode, language: string) => Promise<Specialty[]>;
|
|
47
56
|
getScheduleDates: (patientId: number, filter?: ScheduleAvailabilityFilter) => Promise<Date[]>;
|
|
48
57
|
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;
|
|
28
27
|
firstName: string;
|
|
29
28
|
lastName: string;
|
|
29
|
+
id: number;
|
|
30
30
|
};
|
|
31
31
|
professional: {
|
|
32
32
|
id: number;
|
|
@@ -1,12 +1,33 @@
|
|
|
1
1
|
import { RequestMaker } from '../request';
|
|
2
2
|
export declare const getPatientMethods: (makeRequest: RequestMaker) => {
|
|
3
|
-
declarePatient: (
|
|
3
|
+
declarePatient: (params: {
|
|
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: {
|
|
4
25
|
firstName: string;
|
|
5
26
|
lastName: string;
|
|
6
27
|
identificationType: "ndi" | "passport" | "credential";
|
|
7
28
|
identificationValue: string;
|
|
8
|
-
gender: "m" | "f";
|
|
9
29
|
countryId: string;
|
|
10
30
|
birthdate: Date;
|
|
31
|
+
gender: "m" | "f";
|
|
11
32
|
}) => Promise<number>;
|
|
12
33
|
};
|