evo360-types 1.1.72 → 1.1.74
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/dist/apps/evo-people/zod-schemas.d.ts +3 -3
- package/dist/apps/evo-people/zod-schemas.js +1 -1
- package/dist/apps/evo-people/zod-schemas.ts +1 -1
- package/dist/apps/evo-survey/zod-schemas.d.ts +156 -66
- package/dist/apps/evo-survey/zod-schemas.js +10 -4
- package/dist/apps/evo-survey/zod-schemas.ts +10 -4
- package/dist/types/evo-people/index.d.ts +1 -1
- package/dist/types/evo-people/index.ts +1 -1
- package/dist/types/evo-survey/index.d.ts +6 -2
- package/dist/types/evo-survey/index.ts +7 -2
- package/package.json +1 -1
|
@@ -67,7 +67,7 @@ export declare const zEmployeeSchema: z.ZodObject<z.objectUtil.extendShape<z.obj
|
|
|
67
67
|
photo_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
68
68
|
photo_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
69
69
|
}>, {
|
|
70
|
-
|
|
70
|
+
employeeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
71
71
|
type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
72
72
|
job_title: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
73
73
|
status: z.ZodDefault<z.ZodEnum<["active", "inactive", "draft"]>>;
|
|
@@ -114,7 +114,7 @@ export declare const zEmployeeSchema: z.ZodObject<z.objectUtil.extendShape<z.obj
|
|
|
114
114
|
photo_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
115
115
|
photo_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
116
116
|
}>, {
|
|
117
|
-
|
|
117
|
+
employeeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
118
118
|
type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
119
119
|
job_title: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
120
120
|
status: z.ZodDefault<z.ZodEnum<["active", "inactive", "draft"]>>;
|
|
@@ -161,7 +161,7 @@ export declare const zEmployeeSchema: z.ZodObject<z.objectUtil.extendShape<z.obj
|
|
|
161
161
|
photo_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
162
162
|
photo_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
163
163
|
}>, {
|
|
164
|
-
|
|
164
|
+
employeeId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
165
165
|
type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
166
166
|
job_title: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
167
167
|
status: z.ZodDefault<z.ZodEnum<["active", "inactive", "draft"]>>;
|
|
@@ -51,7 +51,7 @@ exports.zProfileSchema = zod_schemas_1.zFireDocSchema
|
|
|
51
51
|
exports.zEmployeeStatusSchema = zod_1.z.enum(["active", "inactive", "draft"]);
|
|
52
52
|
exports.zEmployeeSchema = exports.zProfileSchema // Extend from ProfileSchema
|
|
53
53
|
.extend({
|
|
54
|
-
|
|
54
|
+
employeeId: zod_1.z.string().nullable().optional(),
|
|
55
55
|
type: zod_1.z.string().nullable().optional(),
|
|
56
56
|
job_title: zod_1.z.string().max(255).nullable().optional().default(""),
|
|
57
57
|
status: exports.zEmployeeStatusSchema.default("draft"),
|
|
@@ -52,7 +52,7 @@ export const zEmployeeStatusSchema = z.enum(["active", "inactive", "draft"]);
|
|
|
52
52
|
|
|
53
53
|
export const zEmployeeSchema = zProfileSchema // Extend from ProfileSchema
|
|
54
54
|
.extend({
|
|
55
|
-
|
|
55
|
+
employeeId: z.string().nullable().optional(),
|
|
56
56
|
type: z.string().nullable().optional(),
|
|
57
57
|
job_title: z.string().max(255).nullable().optional().default(""),
|
|
58
58
|
status: zEmployeeStatusSchema.default("draft"),
|
|
@@ -826,6 +826,19 @@ export declare const zSurveySchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
826
826
|
color?: string | undefined;
|
|
827
827
|
}>, "many">>;
|
|
828
828
|
}>, z.ZodTypeAny, "passthrough">>;
|
|
829
|
+
export declare const zQuestionResponseSchema: z.ZodObject<{
|
|
830
|
+
questionId: z.ZodString;
|
|
831
|
+
answer: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
832
|
+
date: z.ZodDate;
|
|
833
|
+
}, "strip", z.ZodTypeAny, {
|
|
834
|
+
date: Date;
|
|
835
|
+
questionId: string;
|
|
836
|
+
answer: string | string[];
|
|
837
|
+
}, {
|
|
838
|
+
date: Date;
|
|
839
|
+
questionId: string;
|
|
840
|
+
answer: string | string[];
|
|
841
|
+
}>;
|
|
829
842
|
export declare const zSurveyResponseSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
830
843
|
id: z.ZodString;
|
|
831
844
|
ref: z.ZodAny;
|
|
@@ -835,31 +848,48 @@ export declare const zSurveyResponseSchema: z.ZodObject<z.objectUtil.extendShape
|
|
|
835
848
|
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
836
849
|
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
837
850
|
}, {
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
851
|
+
surveyId: z.ZodString;
|
|
852
|
+
responses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
853
|
+
questionId: z.ZodString;
|
|
854
|
+
answer: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
855
|
+
date: z.ZodDate;
|
|
856
|
+
}, "strip", z.ZodTypeAny, {
|
|
857
|
+
date: Date;
|
|
858
|
+
questionId: string;
|
|
859
|
+
answer: string | string[];
|
|
860
|
+
}, {
|
|
861
|
+
date: Date;
|
|
862
|
+
questionId: string;
|
|
863
|
+
answer: string | string[];
|
|
864
|
+
}>, "many">>;
|
|
841
865
|
}>, "strip", z.ZodTypeAny, {
|
|
842
866
|
id: string;
|
|
843
867
|
tenant: string;
|
|
844
|
-
|
|
845
|
-
question_id: string;
|
|
846
|
-
answer: string | string[];
|
|
868
|
+
surveyId: string;
|
|
847
869
|
ref?: any;
|
|
848
870
|
model_ver?: number | undefined;
|
|
849
871
|
created_at?: Date | null | undefined;
|
|
850
872
|
updated_at?: Date | null | undefined;
|
|
851
873
|
deleted_at?: Date | null | undefined;
|
|
874
|
+
responses?: {
|
|
875
|
+
date: Date;
|
|
876
|
+
questionId: string;
|
|
877
|
+
answer: string | string[];
|
|
878
|
+
}[] | undefined;
|
|
852
879
|
}, {
|
|
853
880
|
id: string;
|
|
854
881
|
tenant: string;
|
|
855
|
-
|
|
856
|
-
question_id: string;
|
|
857
|
-
answer: string | string[];
|
|
882
|
+
surveyId: string;
|
|
858
883
|
ref?: any;
|
|
859
884
|
model_ver?: number | undefined;
|
|
860
885
|
created_at?: Date | null | undefined;
|
|
861
886
|
updated_at?: Date | null | undefined;
|
|
862
887
|
deleted_at?: Date | null | undefined;
|
|
888
|
+
responses?: {
|
|
889
|
+
date: Date;
|
|
890
|
+
questionId: string;
|
|
891
|
+
answer: string | string[];
|
|
892
|
+
}[] | undefined;
|
|
863
893
|
}>;
|
|
864
894
|
export declare const zSurveySubmissionSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
865
895
|
id: z.ZodString;
|
|
@@ -885,31 +915,48 @@ export declare const zSurveySubmissionSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
885
915
|
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
886
916
|
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
887
917
|
}, {
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
918
|
+
surveyId: z.ZodString;
|
|
919
|
+
responses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
920
|
+
questionId: z.ZodString;
|
|
921
|
+
answer: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
922
|
+
date: z.ZodDate;
|
|
923
|
+
}, "strip", z.ZodTypeAny, {
|
|
924
|
+
date: Date;
|
|
925
|
+
questionId: string;
|
|
926
|
+
answer: string | string[];
|
|
927
|
+
}, {
|
|
928
|
+
date: Date;
|
|
929
|
+
questionId: string;
|
|
930
|
+
answer: string | string[];
|
|
931
|
+
}>, "many">>;
|
|
891
932
|
}>, "strip", z.ZodTypeAny, {
|
|
892
933
|
id: string;
|
|
893
934
|
tenant: string;
|
|
894
|
-
|
|
895
|
-
question_id: string;
|
|
896
|
-
answer: string | string[];
|
|
935
|
+
surveyId: string;
|
|
897
936
|
ref?: any;
|
|
898
937
|
model_ver?: number | undefined;
|
|
899
938
|
created_at?: Date | null | undefined;
|
|
900
939
|
updated_at?: Date | null | undefined;
|
|
901
940
|
deleted_at?: Date | null | undefined;
|
|
941
|
+
responses?: {
|
|
942
|
+
date: Date;
|
|
943
|
+
questionId: string;
|
|
944
|
+
answer: string | string[];
|
|
945
|
+
}[] | undefined;
|
|
902
946
|
}, {
|
|
903
947
|
id: string;
|
|
904
948
|
tenant: string;
|
|
905
|
-
|
|
906
|
-
question_id: string;
|
|
907
|
-
answer: string | string[];
|
|
949
|
+
surveyId: string;
|
|
908
950
|
ref?: any;
|
|
909
951
|
model_ver?: number | undefined;
|
|
910
952
|
created_at?: Date | null | undefined;
|
|
911
953
|
updated_at?: Date | null | undefined;
|
|
912
954
|
deleted_at?: Date | null | undefined;
|
|
955
|
+
responses?: {
|
|
956
|
+
date: Date;
|
|
957
|
+
questionId: string;
|
|
958
|
+
answer: string | string[];
|
|
959
|
+
}[] | undefined;
|
|
913
960
|
}>, "many">>;
|
|
914
961
|
}>, "strip", z.ZodTypeAny, {
|
|
915
962
|
id: string;
|
|
@@ -922,21 +969,24 @@ export declare const zSurveySubmissionSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
922
969
|
created_at?: Date | null | undefined;
|
|
923
970
|
updated_at?: Date | null | undefined;
|
|
924
971
|
deleted_at?: Date | null | undefined;
|
|
925
|
-
deploymentId?: string | undefined;
|
|
926
|
-
submission_date?: Date | undefined;
|
|
927
|
-
inviteeId?: string | undefined;
|
|
928
972
|
responses?: {
|
|
929
973
|
id: string;
|
|
930
974
|
tenant: string;
|
|
931
|
-
|
|
932
|
-
question_id: string;
|
|
933
|
-
answer: string | string[];
|
|
975
|
+
surveyId: string;
|
|
934
976
|
ref?: any;
|
|
935
977
|
model_ver?: number | undefined;
|
|
936
978
|
created_at?: Date | null | undefined;
|
|
937
979
|
updated_at?: Date | null | undefined;
|
|
938
980
|
deleted_at?: Date | null | undefined;
|
|
981
|
+
responses?: {
|
|
982
|
+
date: Date;
|
|
983
|
+
questionId: string;
|
|
984
|
+
answer: string | string[];
|
|
985
|
+
}[] | undefined;
|
|
939
986
|
}[] | undefined;
|
|
987
|
+
deploymentId?: string | undefined;
|
|
988
|
+
submission_date?: Date | undefined;
|
|
989
|
+
inviteeId?: string | undefined;
|
|
940
990
|
}, {
|
|
941
991
|
id: string;
|
|
942
992
|
tenant: string;
|
|
@@ -947,22 +997,25 @@ export declare const zSurveySubmissionSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
947
997
|
created_at?: Date | null | undefined;
|
|
948
998
|
updated_at?: Date | null | undefined;
|
|
949
999
|
deleted_at?: Date | null | undefined;
|
|
950
|
-
deploymentId?: string | undefined;
|
|
951
|
-
submission_date?: Date | undefined;
|
|
952
|
-
inviteeId?: string | undefined;
|
|
953
|
-
user_name?: string | undefined;
|
|
954
1000
|
responses?: {
|
|
955
1001
|
id: string;
|
|
956
1002
|
tenant: string;
|
|
957
|
-
|
|
958
|
-
question_id: string;
|
|
959
|
-
answer: string | string[];
|
|
1003
|
+
surveyId: string;
|
|
960
1004
|
ref?: any;
|
|
961
1005
|
model_ver?: number | undefined;
|
|
962
1006
|
created_at?: Date | null | undefined;
|
|
963
1007
|
updated_at?: Date | null | undefined;
|
|
964
1008
|
deleted_at?: Date | null | undefined;
|
|
1009
|
+
responses?: {
|
|
1010
|
+
date: Date;
|
|
1011
|
+
questionId: string;
|
|
1012
|
+
answer: string | string[];
|
|
1013
|
+
}[] | undefined;
|
|
965
1014
|
}[] | undefined;
|
|
1015
|
+
deploymentId?: string | undefined;
|
|
1016
|
+
submission_date?: Date | undefined;
|
|
1017
|
+
inviteeId?: string | undefined;
|
|
1018
|
+
user_name?: string | undefined;
|
|
966
1019
|
}>;
|
|
967
1020
|
export declare const zSurveyInviteeSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
968
1021
|
id: z.ZodString;
|
|
@@ -973,6 +1026,7 @@ export declare const zSurveyInviteeSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
973
1026
|
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
974
1027
|
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
975
1028
|
}, {
|
|
1029
|
+
invitedUserId: z.ZodOptional<z.ZodString>;
|
|
976
1030
|
name: z.ZodString;
|
|
977
1031
|
email: z.ZodOptional<z.ZodString>;
|
|
978
1032
|
phone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -996,6 +1050,7 @@ export declare const zSurveyInviteeSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
996
1050
|
email?: string | undefined;
|
|
997
1051
|
description?: string | undefined;
|
|
998
1052
|
photo_url?: string | null | undefined;
|
|
1053
|
+
invitedUserId?: string | undefined;
|
|
999
1054
|
submissionId?: string | undefined;
|
|
1000
1055
|
}, {
|
|
1001
1056
|
id: string;
|
|
@@ -1010,6 +1065,7 @@ export declare const zSurveyInviteeSchema: z.ZodObject<z.objectUtil.extendShape<
|
|
|
1010
1065
|
description?: string | undefined;
|
|
1011
1066
|
photo_url?: string | null | undefined;
|
|
1012
1067
|
phone?: string | undefined;
|
|
1068
|
+
invitedUserId?: string | undefined;
|
|
1013
1069
|
isAnonymous?: boolean | undefined;
|
|
1014
1070
|
submissionId?: string | undefined;
|
|
1015
1071
|
submission_status?: "not_started" | "in_progress" | "completed" | undefined;
|
|
@@ -1129,6 +1185,7 @@ export declare const zSurveyDeploymentSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
1129
1185
|
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
1130
1186
|
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
1131
1187
|
}, {
|
|
1188
|
+
invitedUserId: z.ZodOptional<z.ZodString>;
|
|
1132
1189
|
name: z.ZodString;
|
|
1133
1190
|
email: z.ZodOptional<z.ZodString>;
|
|
1134
1191
|
phone: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -1152,6 +1209,7 @@ export declare const zSurveyDeploymentSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
1152
1209
|
email?: string | undefined;
|
|
1153
1210
|
description?: string | undefined;
|
|
1154
1211
|
photo_url?: string | null | undefined;
|
|
1212
|
+
invitedUserId?: string | undefined;
|
|
1155
1213
|
submissionId?: string | undefined;
|
|
1156
1214
|
}, {
|
|
1157
1215
|
id: string;
|
|
@@ -1166,6 +1224,7 @@ export declare const zSurveyDeploymentSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
1166
1224
|
description?: string | undefined;
|
|
1167
1225
|
photo_url?: string | null | undefined;
|
|
1168
1226
|
phone?: string | undefined;
|
|
1227
|
+
invitedUserId?: string | undefined;
|
|
1169
1228
|
isAnonymous?: boolean | undefined;
|
|
1170
1229
|
submissionId?: string | undefined;
|
|
1171
1230
|
submission_status?: "not_started" | "in_progress" | "completed" | undefined;
|
|
@@ -1195,31 +1254,48 @@ export declare const zSurveyDeploymentSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
1195
1254
|
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
1196
1255
|
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
1197
1256
|
}, {
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1257
|
+
surveyId: z.ZodString;
|
|
1258
|
+
responses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1259
|
+
questionId: z.ZodString;
|
|
1260
|
+
answer: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
1261
|
+
date: z.ZodDate;
|
|
1262
|
+
}, "strip", z.ZodTypeAny, {
|
|
1263
|
+
date: Date;
|
|
1264
|
+
questionId: string;
|
|
1265
|
+
answer: string | string[];
|
|
1266
|
+
}, {
|
|
1267
|
+
date: Date;
|
|
1268
|
+
questionId: string;
|
|
1269
|
+
answer: string | string[];
|
|
1270
|
+
}>, "many">>;
|
|
1201
1271
|
}>, "strip", z.ZodTypeAny, {
|
|
1202
1272
|
id: string;
|
|
1203
1273
|
tenant: string;
|
|
1204
|
-
|
|
1205
|
-
question_id: string;
|
|
1206
|
-
answer: string | string[];
|
|
1274
|
+
surveyId: string;
|
|
1207
1275
|
ref?: any;
|
|
1208
1276
|
model_ver?: number | undefined;
|
|
1209
1277
|
created_at?: Date | null | undefined;
|
|
1210
1278
|
updated_at?: Date | null | undefined;
|
|
1211
1279
|
deleted_at?: Date | null | undefined;
|
|
1280
|
+
responses?: {
|
|
1281
|
+
date: Date;
|
|
1282
|
+
questionId: string;
|
|
1283
|
+
answer: string | string[];
|
|
1284
|
+
}[] | undefined;
|
|
1212
1285
|
}, {
|
|
1213
1286
|
id: string;
|
|
1214
1287
|
tenant: string;
|
|
1215
|
-
|
|
1216
|
-
question_id: string;
|
|
1217
|
-
answer: string | string[];
|
|
1288
|
+
surveyId: string;
|
|
1218
1289
|
ref?: any;
|
|
1219
1290
|
model_ver?: number | undefined;
|
|
1220
1291
|
created_at?: Date | null | undefined;
|
|
1221
1292
|
updated_at?: Date | null | undefined;
|
|
1222
1293
|
deleted_at?: Date | null | undefined;
|
|
1294
|
+
responses?: {
|
|
1295
|
+
date: Date;
|
|
1296
|
+
questionId: string;
|
|
1297
|
+
answer: string | string[];
|
|
1298
|
+
}[] | undefined;
|
|
1223
1299
|
}>, "many">>;
|
|
1224
1300
|
}>, "strip", z.ZodTypeAny, {
|
|
1225
1301
|
id: string;
|
|
@@ -1232,21 +1308,24 @@ export declare const zSurveyDeploymentSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
1232
1308
|
created_at?: Date | null | undefined;
|
|
1233
1309
|
updated_at?: Date | null | undefined;
|
|
1234
1310
|
deleted_at?: Date | null | undefined;
|
|
1235
|
-
deploymentId?: string | undefined;
|
|
1236
|
-
submission_date?: Date | undefined;
|
|
1237
|
-
inviteeId?: string | undefined;
|
|
1238
1311
|
responses?: {
|
|
1239
1312
|
id: string;
|
|
1240
1313
|
tenant: string;
|
|
1241
|
-
|
|
1242
|
-
question_id: string;
|
|
1243
|
-
answer: string | string[];
|
|
1314
|
+
surveyId: string;
|
|
1244
1315
|
ref?: any;
|
|
1245
1316
|
model_ver?: number | undefined;
|
|
1246
1317
|
created_at?: Date | null | undefined;
|
|
1247
1318
|
updated_at?: Date | null | undefined;
|
|
1248
1319
|
deleted_at?: Date | null | undefined;
|
|
1320
|
+
responses?: {
|
|
1321
|
+
date: Date;
|
|
1322
|
+
questionId: string;
|
|
1323
|
+
answer: string | string[];
|
|
1324
|
+
}[] | undefined;
|
|
1249
1325
|
}[] | undefined;
|
|
1326
|
+
deploymentId?: string | undefined;
|
|
1327
|
+
submission_date?: Date | undefined;
|
|
1328
|
+
inviteeId?: string | undefined;
|
|
1250
1329
|
}, {
|
|
1251
1330
|
id: string;
|
|
1252
1331
|
tenant: string;
|
|
@@ -1257,22 +1336,25 @@ export declare const zSurveyDeploymentSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
1257
1336
|
created_at?: Date | null | undefined;
|
|
1258
1337
|
updated_at?: Date | null | undefined;
|
|
1259
1338
|
deleted_at?: Date | null | undefined;
|
|
1260
|
-
deploymentId?: string | undefined;
|
|
1261
|
-
submission_date?: Date | undefined;
|
|
1262
|
-
inviteeId?: string | undefined;
|
|
1263
|
-
user_name?: string | undefined;
|
|
1264
1339
|
responses?: {
|
|
1265
1340
|
id: string;
|
|
1266
1341
|
tenant: string;
|
|
1267
|
-
|
|
1268
|
-
question_id: string;
|
|
1269
|
-
answer: string | string[];
|
|
1342
|
+
surveyId: string;
|
|
1270
1343
|
ref?: any;
|
|
1271
1344
|
model_ver?: number | undefined;
|
|
1272
1345
|
created_at?: Date | null | undefined;
|
|
1273
1346
|
updated_at?: Date | null | undefined;
|
|
1274
1347
|
deleted_at?: Date | null | undefined;
|
|
1348
|
+
responses?: {
|
|
1349
|
+
date: Date;
|
|
1350
|
+
questionId: string;
|
|
1351
|
+
answer: string | string[];
|
|
1352
|
+
}[] | undefined;
|
|
1275
1353
|
}[] | undefined;
|
|
1354
|
+
deploymentId?: string | undefined;
|
|
1355
|
+
submission_date?: Date | undefined;
|
|
1356
|
+
inviteeId?: string | undefined;
|
|
1357
|
+
user_name?: string | undefined;
|
|
1276
1358
|
}>, "many">>>;
|
|
1277
1359
|
submission_count: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1278
1360
|
submission_not_started_count: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -1341,21 +1423,24 @@ export declare const zSurveyDeploymentSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
1341
1423
|
created_at?: Date | null | undefined;
|
|
1342
1424
|
updated_at?: Date | null | undefined;
|
|
1343
1425
|
deleted_at?: Date | null | undefined;
|
|
1344
|
-
deploymentId?: string | undefined;
|
|
1345
|
-
submission_date?: Date | undefined;
|
|
1346
|
-
inviteeId?: string | undefined;
|
|
1347
1426
|
responses?: {
|
|
1348
1427
|
id: string;
|
|
1349
1428
|
tenant: string;
|
|
1350
|
-
|
|
1351
|
-
question_id: string;
|
|
1352
|
-
answer: string | string[];
|
|
1429
|
+
surveyId: string;
|
|
1353
1430
|
ref?: any;
|
|
1354
1431
|
model_ver?: number | undefined;
|
|
1355
1432
|
created_at?: Date | null | undefined;
|
|
1356
1433
|
updated_at?: Date | null | undefined;
|
|
1357
1434
|
deleted_at?: Date | null | undefined;
|
|
1435
|
+
responses?: {
|
|
1436
|
+
date: Date;
|
|
1437
|
+
questionId: string;
|
|
1438
|
+
answer: string | string[];
|
|
1439
|
+
}[] | undefined;
|
|
1358
1440
|
}[] | undefined;
|
|
1441
|
+
deploymentId?: string | undefined;
|
|
1442
|
+
submission_date?: Date | undefined;
|
|
1443
|
+
inviteeId?: string | undefined;
|
|
1359
1444
|
}[] | null | undefined;
|
|
1360
1445
|
invitees?: {
|
|
1361
1446
|
id: string;
|
|
@@ -1372,6 +1457,7 @@ export declare const zSurveyDeploymentSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
1372
1457
|
email?: string | undefined;
|
|
1373
1458
|
description?: string | undefined;
|
|
1374
1459
|
photo_url?: string | null | undefined;
|
|
1460
|
+
invitedUserId?: string | undefined;
|
|
1375
1461
|
submissionId?: string | undefined;
|
|
1376
1462
|
}[] | null | undefined;
|
|
1377
1463
|
}, {
|
|
@@ -1429,22 +1515,25 @@ export declare const zSurveyDeploymentSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
1429
1515
|
created_at?: Date | null | undefined;
|
|
1430
1516
|
updated_at?: Date | null | undefined;
|
|
1431
1517
|
deleted_at?: Date | null | undefined;
|
|
1432
|
-
deploymentId?: string | undefined;
|
|
1433
|
-
submission_date?: Date | undefined;
|
|
1434
|
-
inviteeId?: string | undefined;
|
|
1435
|
-
user_name?: string | undefined;
|
|
1436
1518
|
responses?: {
|
|
1437
1519
|
id: string;
|
|
1438
1520
|
tenant: string;
|
|
1439
|
-
|
|
1440
|
-
question_id: string;
|
|
1441
|
-
answer: string | string[];
|
|
1521
|
+
surveyId: string;
|
|
1442
1522
|
ref?: any;
|
|
1443
1523
|
model_ver?: number | undefined;
|
|
1444
1524
|
created_at?: Date | null | undefined;
|
|
1445
1525
|
updated_at?: Date | null | undefined;
|
|
1446
1526
|
deleted_at?: Date | null | undefined;
|
|
1527
|
+
responses?: {
|
|
1528
|
+
date: Date;
|
|
1529
|
+
questionId: string;
|
|
1530
|
+
answer: string | string[];
|
|
1531
|
+
}[] | undefined;
|
|
1447
1532
|
}[] | undefined;
|
|
1533
|
+
deploymentId?: string | undefined;
|
|
1534
|
+
submission_date?: Date | undefined;
|
|
1535
|
+
inviteeId?: string | undefined;
|
|
1536
|
+
user_name?: string | undefined;
|
|
1448
1537
|
}[] | null | undefined;
|
|
1449
1538
|
submission_count?: number | undefined;
|
|
1450
1539
|
section_count?: number | undefined;
|
|
@@ -1462,6 +1551,7 @@ export declare const zSurveyDeploymentSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
1462
1551
|
description?: string | undefined;
|
|
1463
1552
|
photo_url?: string | null | undefined;
|
|
1464
1553
|
phone?: string | undefined;
|
|
1554
|
+
invitedUserId?: string | undefined;
|
|
1465
1555
|
isAnonymous?: boolean | undefined;
|
|
1466
1556
|
submissionId?: string | undefined;
|
|
1467
1557
|
submission_status?: "not_started" | "in_progress" | "completed" | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.zSurveyDeploymentSchema = exports.zSurveyInviteeSchema = exports.zSurveySubmissionSchema = exports.zSurveyResponseSchema = exports.zSurveySchema = exports.zSurveySectionSchema = exports.zSurveyQuestionMaskSchema = exports.zSurveyQuestionPhoneSchema = exports.zSurveyQuestionDateSchema = exports.zSurveyQuestionMultipleChoiceSchema = exports.zSurveyQuestionEssaySchema = exports.zSurveyQuestionScaleSchema = exports.zSurveyQuestionSchema = exports.zSurveySubmissionStatusSchema = exports.zSurveyDeploymentStatusSchema = exports.zSurveyQuestionTypeSchema = exports.zSurveyStatusSchema = exports.zSurveyTypeSchema = exports.zSurveyPermissionSchema = exports.zSurveyDeploymentActionSchema = exports.zSurveyActionSchema = void 0;
|
|
3
|
+
exports.zSurveyDeploymentSchema = exports.zSurveyInviteeSchema = exports.zSurveySubmissionSchema = exports.zSurveyResponseSchema = exports.zQuestionResponseSchema = exports.zSurveySchema = exports.zSurveySectionSchema = exports.zSurveyQuestionMaskSchema = exports.zSurveyQuestionPhoneSchema = exports.zSurveyQuestionDateSchema = exports.zSurveyQuestionMultipleChoiceSchema = exports.zSurveyQuestionEssaySchema = exports.zSurveyQuestionScaleSchema = exports.zSurveyQuestionSchema = exports.zSurveySubmissionStatusSchema = exports.zSurveyDeploymentStatusSchema = exports.zSurveyQuestionTypeSchema = exports.zSurveyStatusSchema = exports.zSurveyTypeSchema = exports.zSurveyPermissionSchema = exports.zSurveyDeploymentActionSchema = exports.zSurveyActionSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const zod_schemas_1 = require("../shared/zod-schemas");
|
|
6
6
|
exports.zSurveyActionSchema = zod_1.z.enum([
|
|
@@ -128,12 +128,17 @@ exports.zSurveySchema = zod_schemas_1.zFireDocSchema // Extend from FireDocSchem
|
|
|
128
128
|
tags: zod_1.z.array(zod_schemas_1.zTagSchema).optional(),
|
|
129
129
|
})
|
|
130
130
|
.passthrough();
|
|
131
|
+
// Question Response
|
|
132
|
+
exports.zQuestionResponseSchema = zod_1.z.object({
|
|
133
|
+
questionId: zod_1.z.string(),
|
|
134
|
+
answer: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]),
|
|
135
|
+
date: zod_1.z.coerce.date(),
|
|
136
|
+
});
|
|
131
137
|
// Survey Response
|
|
132
138
|
exports.zSurveyResponseSchema = zod_schemas_1.zFireDocSchema // Extend from FireDocSchema
|
|
133
139
|
.extend({
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
date: zod_1.z.coerce.date(),
|
|
140
|
+
surveyId: zod_1.z.string(),
|
|
141
|
+
responses: zod_1.z.array(exports.zQuestionResponseSchema).optional(),
|
|
137
142
|
});
|
|
138
143
|
// Survey Submission
|
|
139
144
|
exports.zSurveySubmissionSchema = zod_schemas_1.zFireDocSchema // Extend from FireDocSchema
|
|
@@ -149,6 +154,7 @@ exports.zSurveySubmissionSchema = zod_schemas_1.zFireDocSchema // Extend from Fi
|
|
|
149
154
|
// Survey Invitee
|
|
150
155
|
exports.zSurveyInviteeSchema = zod_schemas_1.zFireDocSchema // Extend from FireDocSchema
|
|
151
156
|
.extend({
|
|
157
|
+
invitedUserId: zod_1.z.string().optional(),
|
|
152
158
|
name: zod_1.z.string().max(255),
|
|
153
159
|
email: zod_1.z.string().max(255).email().optional(),
|
|
154
160
|
phone: zod_1.z.string().max(60).optional().default(""),
|
|
@@ -143,14 +143,19 @@ export const zSurveySchema = zFireDocSchema // Extend from FireDocSchema
|
|
|
143
143
|
})
|
|
144
144
|
.passthrough();
|
|
145
145
|
|
|
146
|
+
// Question Response
|
|
147
|
+
export const zQuestionResponseSchema = z.object({
|
|
148
|
+
questionId: z.string(),
|
|
149
|
+
answer: z.union([z.string(), z.array(z.string())]),
|
|
150
|
+
date: z.coerce.date(),
|
|
151
|
+
});
|
|
152
|
+
|
|
146
153
|
// Survey Response
|
|
147
154
|
export const zSurveyResponseSchema = zFireDocSchema // Extend from FireDocSchema
|
|
148
155
|
.extend({
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
date: z.coerce.date(),
|
|
156
|
+
surveyId: z.string(),
|
|
157
|
+
responses: z.array(zQuestionResponseSchema).optional(),
|
|
152
158
|
});
|
|
153
|
-
|
|
154
159
|
// Survey Submission
|
|
155
160
|
export const zSurveySubmissionSchema = zFireDocSchema // Extend from FireDocSchema
|
|
156
161
|
.extend({
|
|
@@ -166,6 +171,7 @@ export const zSurveySubmissionSchema = zFireDocSchema // Extend from FireDocSche
|
|
|
166
171
|
// Survey Invitee
|
|
167
172
|
export const zSurveyInviteeSchema = zFireDocSchema // Extend from FireDocSchema
|
|
168
173
|
.extend({
|
|
174
|
+
invitedUserId: z.string().optional(),
|
|
169
175
|
name: z.string().max(255),
|
|
170
176
|
email: z.string().max(255).email().optional(),
|
|
171
177
|
phone: z.string().max(60).optional().default(""),
|
|
@@ -58,7 +58,7 @@ export interface IProfile extends IFireDoc {
|
|
|
58
58
|
photo_url?: string | null;
|
|
59
59
|
}
|
|
60
60
|
export interface IEmployee extends IProfile {
|
|
61
|
-
|
|
61
|
+
employeeId?: string | null;
|
|
62
62
|
type?: string | null;
|
|
63
63
|
job_title?: string | null;
|
|
64
64
|
status?: EmployeeStatus;
|
|
@@ -105,7 +105,7 @@ export interface IProfile extends IFireDoc {
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
export interface IEmployee extends IProfile {
|
|
108
|
-
|
|
108
|
+
employeeId?: string | null;
|
|
109
109
|
type?: string | null;
|
|
110
110
|
job_title?: string | null;
|
|
111
111
|
status?: EmployeeStatus;
|
|
@@ -121,7 +121,11 @@ export declare enum ISurveySubmissionStatus {
|
|
|
121
121
|
Completed = "completed"
|
|
122
122
|
}
|
|
123
123
|
export interface ISurveyResponse extends IFireDoc {
|
|
124
|
-
|
|
124
|
+
surveyId: string;
|
|
125
|
+
responses?: IQuestionResponse[];
|
|
126
|
+
}
|
|
127
|
+
export interface IQuestionResponse {
|
|
128
|
+
questionId: string;
|
|
125
129
|
answer: string | string[];
|
|
126
130
|
date: Date;
|
|
127
131
|
}
|
|
@@ -132,7 +136,7 @@ export interface ISurveySubmission extends IFireDoc {
|
|
|
132
136
|
modified_after_completion: boolean;
|
|
133
137
|
inviteeId?: string;
|
|
134
138
|
user_name?: string;
|
|
135
|
-
|
|
139
|
+
survey_responses?: ISurveyResponse[];
|
|
136
140
|
readonly answer_count?: number;
|
|
137
141
|
readonly submission_count?: number;
|
|
138
142
|
}
|
|
@@ -169,7 +169,12 @@ export enum ISurveySubmissionStatus {
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
export interface ISurveyResponse extends IFireDoc {
|
|
172
|
-
|
|
172
|
+
surveyId: string;
|
|
173
|
+
responses?: IQuestionResponse[];
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export interface IQuestionResponse {
|
|
177
|
+
questionId: string;
|
|
173
178
|
answer: string | string[]; // String para resposta única, array de strings para múltipla escolha
|
|
174
179
|
date: Date;
|
|
175
180
|
}
|
|
@@ -181,7 +186,7 @@ export interface ISurveySubmission extends IFireDoc {
|
|
|
181
186
|
modified_after_completion: boolean;
|
|
182
187
|
inviteeId?: string;
|
|
183
188
|
user_name?: string;
|
|
184
|
-
|
|
189
|
+
survey_responses?: ISurveyResponse[];
|
|
185
190
|
readonly answer_count?: number;
|
|
186
191
|
readonly submission_count?: number;
|
|
187
192
|
}
|