evo360-types 1.1.72 → 1.1.73
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 +148 -66
- package/dist/apps/evo-survey/zod-schemas.js +9 -4
- package/dist/apps/evo-survey/zod-schemas.ts +9 -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;
|
|
@@ -1195,31 +1248,48 @@ export declare const zSurveyDeploymentSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
1195
1248
|
updated_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
1196
1249
|
deleted_at: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
1197
1250
|
}, {
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1251
|
+
surveyId: z.ZodString;
|
|
1252
|
+
responses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1253
|
+
questionId: z.ZodString;
|
|
1254
|
+
answer: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
|
|
1255
|
+
date: z.ZodDate;
|
|
1256
|
+
}, "strip", z.ZodTypeAny, {
|
|
1257
|
+
date: Date;
|
|
1258
|
+
questionId: string;
|
|
1259
|
+
answer: string | string[];
|
|
1260
|
+
}, {
|
|
1261
|
+
date: Date;
|
|
1262
|
+
questionId: string;
|
|
1263
|
+
answer: string | string[];
|
|
1264
|
+
}>, "many">>;
|
|
1201
1265
|
}>, "strip", z.ZodTypeAny, {
|
|
1202
1266
|
id: string;
|
|
1203
1267
|
tenant: string;
|
|
1204
|
-
|
|
1205
|
-
question_id: string;
|
|
1206
|
-
answer: string | string[];
|
|
1268
|
+
surveyId: string;
|
|
1207
1269
|
ref?: any;
|
|
1208
1270
|
model_ver?: number | undefined;
|
|
1209
1271
|
created_at?: Date | null | undefined;
|
|
1210
1272
|
updated_at?: Date | null | undefined;
|
|
1211
1273
|
deleted_at?: Date | null | undefined;
|
|
1274
|
+
responses?: {
|
|
1275
|
+
date: Date;
|
|
1276
|
+
questionId: string;
|
|
1277
|
+
answer: string | string[];
|
|
1278
|
+
}[] | undefined;
|
|
1212
1279
|
}, {
|
|
1213
1280
|
id: string;
|
|
1214
1281
|
tenant: string;
|
|
1215
|
-
|
|
1216
|
-
question_id: string;
|
|
1217
|
-
answer: string | string[];
|
|
1282
|
+
surveyId: string;
|
|
1218
1283
|
ref?: any;
|
|
1219
1284
|
model_ver?: number | undefined;
|
|
1220
1285
|
created_at?: Date | null | undefined;
|
|
1221
1286
|
updated_at?: Date | null | undefined;
|
|
1222
1287
|
deleted_at?: Date | null | undefined;
|
|
1288
|
+
responses?: {
|
|
1289
|
+
date: Date;
|
|
1290
|
+
questionId: string;
|
|
1291
|
+
answer: string | string[];
|
|
1292
|
+
}[] | undefined;
|
|
1223
1293
|
}>, "many">>;
|
|
1224
1294
|
}>, "strip", z.ZodTypeAny, {
|
|
1225
1295
|
id: string;
|
|
@@ -1232,21 +1302,24 @@ export declare const zSurveyDeploymentSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
1232
1302
|
created_at?: Date | null | undefined;
|
|
1233
1303
|
updated_at?: Date | null | undefined;
|
|
1234
1304
|
deleted_at?: Date | null | undefined;
|
|
1235
|
-
deploymentId?: string | undefined;
|
|
1236
|
-
submission_date?: Date | undefined;
|
|
1237
|
-
inviteeId?: string | undefined;
|
|
1238
1305
|
responses?: {
|
|
1239
1306
|
id: string;
|
|
1240
1307
|
tenant: string;
|
|
1241
|
-
|
|
1242
|
-
question_id: string;
|
|
1243
|
-
answer: string | string[];
|
|
1308
|
+
surveyId: string;
|
|
1244
1309
|
ref?: any;
|
|
1245
1310
|
model_ver?: number | undefined;
|
|
1246
1311
|
created_at?: Date | null | undefined;
|
|
1247
1312
|
updated_at?: Date | null | undefined;
|
|
1248
1313
|
deleted_at?: Date | null | undefined;
|
|
1314
|
+
responses?: {
|
|
1315
|
+
date: Date;
|
|
1316
|
+
questionId: string;
|
|
1317
|
+
answer: string | string[];
|
|
1318
|
+
}[] | undefined;
|
|
1249
1319
|
}[] | undefined;
|
|
1320
|
+
deploymentId?: string | undefined;
|
|
1321
|
+
submission_date?: Date | undefined;
|
|
1322
|
+
inviteeId?: string | undefined;
|
|
1250
1323
|
}, {
|
|
1251
1324
|
id: string;
|
|
1252
1325
|
tenant: string;
|
|
@@ -1257,22 +1330,25 @@ export declare const zSurveyDeploymentSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
1257
1330
|
created_at?: Date | null | undefined;
|
|
1258
1331
|
updated_at?: Date | null | undefined;
|
|
1259
1332
|
deleted_at?: Date | null | undefined;
|
|
1260
|
-
deploymentId?: string | undefined;
|
|
1261
|
-
submission_date?: Date | undefined;
|
|
1262
|
-
inviteeId?: string | undefined;
|
|
1263
|
-
user_name?: string | undefined;
|
|
1264
1333
|
responses?: {
|
|
1265
1334
|
id: string;
|
|
1266
1335
|
tenant: string;
|
|
1267
|
-
|
|
1268
|
-
question_id: string;
|
|
1269
|
-
answer: string | string[];
|
|
1336
|
+
surveyId: string;
|
|
1270
1337
|
ref?: any;
|
|
1271
1338
|
model_ver?: number | undefined;
|
|
1272
1339
|
created_at?: Date | null | undefined;
|
|
1273
1340
|
updated_at?: Date | null | undefined;
|
|
1274
1341
|
deleted_at?: Date | null | undefined;
|
|
1342
|
+
responses?: {
|
|
1343
|
+
date: Date;
|
|
1344
|
+
questionId: string;
|
|
1345
|
+
answer: string | string[];
|
|
1346
|
+
}[] | undefined;
|
|
1275
1347
|
}[] | undefined;
|
|
1348
|
+
deploymentId?: string | undefined;
|
|
1349
|
+
submission_date?: Date | undefined;
|
|
1350
|
+
inviteeId?: string | undefined;
|
|
1351
|
+
user_name?: string | undefined;
|
|
1276
1352
|
}>, "many">>>;
|
|
1277
1353
|
submission_count: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
1278
1354
|
submission_not_started_count: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
@@ -1341,21 +1417,24 @@ export declare const zSurveyDeploymentSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
1341
1417
|
created_at?: Date | null | undefined;
|
|
1342
1418
|
updated_at?: Date | null | undefined;
|
|
1343
1419
|
deleted_at?: Date | null | undefined;
|
|
1344
|
-
deploymentId?: string | undefined;
|
|
1345
|
-
submission_date?: Date | undefined;
|
|
1346
|
-
inviteeId?: string | undefined;
|
|
1347
1420
|
responses?: {
|
|
1348
1421
|
id: string;
|
|
1349
1422
|
tenant: string;
|
|
1350
|
-
|
|
1351
|
-
question_id: string;
|
|
1352
|
-
answer: string | string[];
|
|
1423
|
+
surveyId: string;
|
|
1353
1424
|
ref?: any;
|
|
1354
1425
|
model_ver?: number | undefined;
|
|
1355
1426
|
created_at?: Date | null | undefined;
|
|
1356
1427
|
updated_at?: Date | null | undefined;
|
|
1357
1428
|
deleted_at?: Date | null | undefined;
|
|
1429
|
+
responses?: {
|
|
1430
|
+
date: Date;
|
|
1431
|
+
questionId: string;
|
|
1432
|
+
answer: string | string[];
|
|
1433
|
+
}[] | undefined;
|
|
1358
1434
|
}[] | undefined;
|
|
1435
|
+
deploymentId?: string | undefined;
|
|
1436
|
+
submission_date?: Date | undefined;
|
|
1437
|
+
inviteeId?: string | undefined;
|
|
1359
1438
|
}[] | null | undefined;
|
|
1360
1439
|
invitees?: {
|
|
1361
1440
|
id: string;
|
|
@@ -1429,22 +1508,25 @@ export declare const zSurveyDeploymentSchema: z.ZodObject<z.objectUtil.extendSha
|
|
|
1429
1508
|
created_at?: Date | null | undefined;
|
|
1430
1509
|
updated_at?: Date | null | undefined;
|
|
1431
1510
|
deleted_at?: Date | null | undefined;
|
|
1432
|
-
deploymentId?: string | undefined;
|
|
1433
|
-
submission_date?: Date | undefined;
|
|
1434
|
-
inviteeId?: string | undefined;
|
|
1435
|
-
user_name?: string | undefined;
|
|
1436
1511
|
responses?: {
|
|
1437
1512
|
id: string;
|
|
1438
1513
|
tenant: string;
|
|
1439
|
-
|
|
1440
|
-
question_id: string;
|
|
1441
|
-
answer: string | string[];
|
|
1514
|
+
surveyId: string;
|
|
1442
1515
|
ref?: any;
|
|
1443
1516
|
model_ver?: number | undefined;
|
|
1444
1517
|
created_at?: Date | null | undefined;
|
|
1445
1518
|
updated_at?: Date | null | undefined;
|
|
1446
1519
|
deleted_at?: Date | null | undefined;
|
|
1520
|
+
responses?: {
|
|
1521
|
+
date: Date;
|
|
1522
|
+
questionId: string;
|
|
1523
|
+
answer: string | string[];
|
|
1524
|
+
}[] | undefined;
|
|
1447
1525
|
}[] | undefined;
|
|
1526
|
+
deploymentId?: string | undefined;
|
|
1527
|
+
submission_date?: Date | undefined;
|
|
1528
|
+
inviteeId?: string | undefined;
|
|
1529
|
+
user_name?: string | undefined;
|
|
1448
1530
|
}[] | null | undefined;
|
|
1449
1531
|
submission_count?: number | undefined;
|
|
1450
1532
|
section_count?: number | 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
|
|
@@ -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({
|
|
@@ -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
|
}
|