@ampsec/platform-client 79.1.0 → 79.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.
|
@@ -35,7 +35,8 @@ export declare enum ContentStrategyKind {
|
|
|
35
35
|
}
|
|
36
36
|
export declare enum DeliveryStrategyKind {
|
|
37
37
|
EMAIL = "EMAIL",
|
|
38
|
-
SLACK = "SLACK"
|
|
38
|
+
SLACK = "SLACK",
|
|
39
|
+
TEAMS = "TEAMS"
|
|
39
40
|
}
|
|
40
41
|
export declare enum DeliveryModeKind {
|
|
41
42
|
ACTIVE = "ACTIVE",
|
|
@@ -169,6 +170,33 @@ export declare const _SlackDeliveryStrategy: z.ZodObject<z.objectUtil.extendShap
|
|
|
169
170
|
copySecOpsTeam?: boolean | undefined;
|
|
170
171
|
}>;
|
|
171
172
|
export type SlackDeliveryStrategy = z.infer<typeof _SlackDeliveryStrategy>;
|
|
173
|
+
export declare const _TeamsDeliveryStrategy: z.ZodObject<z.objectUtil.extendShape<{
|
|
174
|
+
copySecOpsTeam: z.ZodOptional<z.ZodBoolean>;
|
|
175
|
+
}, {
|
|
176
|
+
to: z.ZodObject<{
|
|
177
|
+
cid: z.ZodOptional<z.ZodString>;
|
|
178
|
+
users: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
179
|
+
}, "strip", z.ZodTypeAny, {
|
|
180
|
+
cid?: string | undefined;
|
|
181
|
+
users?: string[] | undefined;
|
|
182
|
+
}, {
|
|
183
|
+
cid?: string | undefined;
|
|
184
|
+
users?: string[] | undefined;
|
|
185
|
+
}>;
|
|
186
|
+
}>, "strip", z.ZodTypeAny, {
|
|
187
|
+
to: {
|
|
188
|
+
cid?: string | undefined;
|
|
189
|
+
users?: string[] | undefined;
|
|
190
|
+
};
|
|
191
|
+
copySecOpsTeam?: boolean | undefined;
|
|
192
|
+
}, {
|
|
193
|
+
to: {
|
|
194
|
+
cid?: string | undefined;
|
|
195
|
+
users?: string[] | undefined;
|
|
196
|
+
};
|
|
197
|
+
copySecOpsTeam?: boolean | undefined;
|
|
198
|
+
}>;
|
|
199
|
+
export type TeamsDeliveryStrategy = z.infer<typeof _TeamsDeliveryStrategy>;
|
|
172
200
|
export declare const _EmailDeliveryStrategy: z.ZodObject<z.objectUtil.extendShape<{
|
|
173
201
|
copySecOpsTeam: z.ZodOptional<z.ZodBoolean>;
|
|
174
202
|
}, {
|
|
@@ -748,7 +776,7 @@ export declare const _EmailNotificationUpsertDto: z.ZodObject<z.objectUtil.exten
|
|
|
748
776
|
deliveryMode?: DeliveryModeKind | undefined;
|
|
749
777
|
}>;
|
|
750
778
|
export type EmailNotificationUpsertDto = z.infer<typeof _EmailNotificationUpsertDto>;
|
|
751
|
-
export declare const
|
|
779
|
+
export declare const _TeamsNotificationUpsertDto: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
752
780
|
id: z.ZodOptional<z.ZodString>;
|
|
753
781
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
754
782
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -827,44 +855,31 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
|
|
|
827
855
|
deliveryMode: z.ZodOptional<z.ZodNativeEnum<typeof DeliveryModeKind>>;
|
|
828
856
|
actions: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof NotificationActionKind>, "many">>;
|
|
829
857
|
}>, {
|
|
830
|
-
deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.
|
|
858
|
+
deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.TEAMS>;
|
|
831
859
|
deliveryStrategy: z.ZodObject<z.objectUtil.extendShape<{
|
|
832
860
|
copySecOpsTeam: z.ZodOptional<z.ZodBoolean>;
|
|
833
861
|
}, {
|
|
834
862
|
to: z.ZodObject<{
|
|
835
863
|
cid: z.ZodOptional<z.ZodString>;
|
|
836
|
-
groups: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
837
864
|
users: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
838
|
-
webhooks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
839
865
|
}, "strip", z.ZodTypeAny, {
|
|
840
|
-
groups?: string[] | undefined;
|
|
841
866
|
cid?: string | undefined;
|
|
842
867
|
users?: string[] | undefined;
|
|
843
|
-
webhooks?: string[] | undefined;
|
|
844
868
|
}, {
|
|
845
|
-
groups?: string[] | undefined;
|
|
846
869
|
cid?: string | undefined;
|
|
847
870
|
users?: string[] | undefined;
|
|
848
|
-
webhooks?: string[] | undefined;
|
|
849
871
|
}>;
|
|
850
|
-
teamId: z.ZodString;
|
|
851
872
|
}>, "strip", z.ZodTypeAny, {
|
|
852
873
|
to: {
|
|
853
|
-
groups?: string[] | undefined;
|
|
854
874
|
cid?: string | undefined;
|
|
855
875
|
users?: string[] | undefined;
|
|
856
|
-
webhooks?: string[] | undefined;
|
|
857
876
|
};
|
|
858
|
-
teamId: string;
|
|
859
877
|
copySecOpsTeam?: boolean | undefined;
|
|
860
878
|
}, {
|
|
861
879
|
to: {
|
|
862
|
-
groups?: string[] | undefined;
|
|
863
880
|
cid?: string | undefined;
|
|
864
881
|
users?: string[] | undefined;
|
|
865
|
-
webhooks?: string[] | undefined;
|
|
866
882
|
};
|
|
867
|
-
teamId: string;
|
|
868
883
|
copySecOpsTeam?: boolean | undefined;
|
|
869
884
|
}>;
|
|
870
885
|
}>, "strip", z.ZodTypeAny, {
|
|
@@ -891,15 +906,12 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
|
|
|
891
906
|
fid?: string | undefined;
|
|
892
907
|
flowContext?: Record<string, any> | undefined;
|
|
893
908
|
};
|
|
894
|
-
deliveryChannel: DeliveryStrategyKind.
|
|
909
|
+
deliveryChannel: DeliveryStrategyKind.TEAMS;
|
|
895
910
|
deliveryStrategy: {
|
|
896
911
|
to: {
|
|
897
|
-
groups?: string[] | undefined;
|
|
898
912
|
cid?: string | undefined;
|
|
899
913
|
users?: string[] | undefined;
|
|
900
|
-
webhooks?: string[] | undefined;
|
|
901
914
|
};
|
|
902
|
-
teamId: string;
|
|
903
915
|
copySecOpsTeam?: boolean | undefined;
|
|
904
916
|
};
|
|
905
917
|
id?: string | undefined;
|
|
@@ -937,15 +949,12 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
|
|
|
937
949
|
fid?: string | undefined;
|
|
938
950
|
flowContext?: Record<string, any> | undefined;
|
|
939
951
|
};
|
|
940
|
-
deliveryChannel: DeliveryStrategyKind.
|
|
952
|
+
deliveryChannel: DeliveryStrategyKind.TEAMS;
|
|
941
953
|
deliveryStrategy: {
|
|
942
954
|
to: {
|
|
943
|
-
groups?: string[] | undefined;
|
|
944
955
|
cid?: string | undefined;
|
|
945
956
|
users?: string[] | undefined;
|
|
946
|
-
webhooks?: string[] | undefined;
|
|
947
957
|
};
|
|
948
|
-
teamId: string;
|
|
949
958
|
copySecOpsTeam?: boolean | undefined;
|
|
950
959
|
};
|
|
951
960
|
id?: string | undefined;
|
|
@@ -959,7 +968,9 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
|
|
|
959
968
|
actions?: NotificationActionKind[] | undefined;
|
|
960
969
|
agentId?: string | undefined;
|
|
961
970
|
deliveryMode?: DeliveryModeKind | undefined;
|
|
962
|
-
}
|
|
971
|
+
}>;
|
|
972
|
+
export type TeamsNotificationUpsertDto = z.infer<typeof _TeamsNotificationUpsertDto>;
|
|
973
|
+
export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryChannel", [z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
963
974
|
id: z.ZodOptional<z.ZodString>;
|
|
964
975
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
965
976
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -1038,29 +1049,44 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
|
|
|
1038
1049
|
deliveryMode: z.ZodOptional<z.ZodNativeEnum<typeof DeliveryModeKind>>;
|
|
1039
1050
|
actions: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof NotificationActionKind>, "many">>;
|
|
1040
1051
|
}>, {
|
|
1041
|
-
deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.
|
|
1052
|
+
deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.SLACK>;
|
|
1042
1053
|
deliveryStrategy: z.ZodObject<z.objectUtil.extendShape<{
|
|
1043
1054
|
copySecOpsTeam: z.ZodOptional<z.ZodBoolean>;
|
|
1044
1055
|
}, {
|
|
1045
1056
|
to: z.ZodObject<{
|
|
1046
|
-
|
|
1057
|
+
cid: z.ZodOptional<z.ZodString>;
|
|
1058
|
+
groups: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1059
|
+
users: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1060
|
+
webhooks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1047
1061
|
}, "strip", z.ZodTypeAny, {
|
|
1048
|
-
|
|
1062
|
+
groups?: string[] | undefined;
|
|
1063
|
+
cid?: string | undefined;
|
|
1064
|
+
users?: string[] | undefined;
|
|
1065
|
+
webhooks?: string[] | undefined;
|
|
1049
1066
|
}, {
|
|
1050
|
-
|
|
1067
|
+
groups?: string[] | undefined;
|
|
1068
|
+
cid?: string | undefined;
|
|
1069
|
+
users?: string[] | undefined;
|
|
1070
|
+
webhooks?: string[] | undefined;
|
|
1051
1071
|
}>;
|
|
1052
|
-
|
|
1072
|
+
teamId: z.ZodString;
|
|
1053
1073
|
}>, "strip", z.ZodTypeAny, {
|
|
1054
|
-
subject: string;
|
|
1055
1074
|
to: {
|
|
1056
|
-
|
|
1075
|
+
groups?: string[] | undefined;
|
|
1076
|
+
cid?: string | undefined;
|
|
1077
|
+
users?: string[] | undefined;
|
|
1078
|
+
webhooks?: string[] | undefined;
|
|
1057
1079
|
};
|
|
1080
|
+
teamId: string;
|
|
1058
1081
|
copySecOpsTeam?: boolean | undefined;
|
|
1059
1082
|
}, {
|
|
1060
|
-
subject: string;
|
|
1061
1083
|
to: {
|
|
1062
|
-
|
|
1084
|
+
groups?: string[] | undefined;
|
|
1085
|
+
cid?: string | undefined;
|
|
1086
|
+
users?: string[] | undefined;
|
|
1087
|
+
webhooks?: string[] | undefined;
|
|
1063
1088
|
};
|
|
1089
|
+
teamId: string;
|
|
1064
1090
|
copySecOpsTeam?: boolean | undefined;
|
|
1065
1091
|
}>;
|
|
1066
1092
|
}>, "strip", z.ZodTypeAny, {
|
|
@@ -1087,12 +1113,15 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
|
|
|
1087
1113
|
fid?: string | undefined;
|
|
1088
1114
|
flowContext?: Record<string, any> | undefined;
|
|
1089
1115
|
};
|
|
1090
|
-
deliveryChannel: DeliveryStrategyKind.
|
|
1116
|
+
deliveryChannel: DeliveryStrategyKind.SLACK;
|
|
1091
1117
|
deliveryStrategy: {
|
|
1092
|
-
subject: string;
|
|
1093
1118
|
to: {
|
|
1094
|
-
|
|
1119
|
+
groups?: string[] | undefined;
|
|
1120
|
+
cid?: string | undefined;
|
|
1121
|
+
users?: string[] | undefined;
|
|
1122
|
+
webhooks?: string[] | undefined;
|
|
1095
1123
|
};
|
|
1124
|
+
teamId: string;
|
|
1096
1125
|
copySecOpsTeam?: boolean | undefined;
|
|
1097
1126
|
};
|
|
1098
1127
|
id?: string | undefined;
|
|
@@ -1130,12 +1159,15 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
|
|
|
1130
1159
|
fid?: string | undefined;
|
|
1131
1160
|
flowContext?: Record<string, any> | undefined;
|
|
1132
1161
|
};
|
|
1133
|
-
deliveryChannel: DeliveryStrategyKind.
|
|
1162
|
+
deliveryChannel: DeliveryStrategyKind.SLACK;
|
|
1134
1163
|
deliveryStrategy: {
|
|
1135
|
-
subject: string;
|
|
1136
1164
|
to: {
|
|
1137
|
-
|
|
1165
|
+
groups?: string[] | undefined;
|
|
1166
|
+
cid?: string | undefined;
|
|
1167
|
+
users?: string[] | undefined;
|
|
1168
|
+
webhooks?: string[] | undefined;
|
|
1138
1169
|
};
|
|
1170
|
+
teamId: string;
|
|
1139
1171
|
copySecOpsTeam?: boolean | undefined;
|
|
1140
1172
|
};
|
|
1141
1173
|
id?: string | undefined;
|
|
@@ -1149,9 +1181,7 @@ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryCh
|
|
|
1149
1181
|
actions?: NotificationActionKind[] | undefined;
|
|
1150
1182
|
agentId?: string | undefined;
|
|
1151
1183
|
deliveryMode?: DeliveryModeKind | undefined;
|
|
1152
|
-
}
|
|
1153
|
-
export type NotificationUpsertDto = z.infer<typeof _NotificationUpsertDto>;
|
|
1154
|
-
export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion<"deliveryChannel", [z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
1184
|
+
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
1155
1185
|
id: z.ZodOptional<z.ZodString>;
|
|
1156
1186
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
1157
1187
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
@@ -1230,44 +1260,29 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
|
|
|
1230
1260
|
deliveryMode: z.ZodOptional<z.ZodNativeEnum<typeof DeliveryModeKind>>;
|
|
1231
1261
|
actions: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof NotificationActionKind>, "many">>;
|
|
1232
1262
|
}>, {
|
|
1233
|
-
deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.
|
|
1263
|
+
deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.EMAIL>;
|
|
1234
1264
|
deliveryStrategy: z.ZodObject<z.objectUtil.extendShape<{
|
|
1235
1265
|
copySecOpsTeam: z.ZodOptional<z.ZodBoolean>;
|
|
1236
1266
|
}, {
|
|
1237
1267
|
to: z.ZodObject<{
|
|
1238
|
-
|
|
1239
|
-
groups: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1240
|
-
users: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1241
|
-
webhooks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1268
|
+
users: z.ZodArray<z.ZodString, "many">;
|
|
1242
1269
|
}, "strip", z.ZodTypeAny, {
|
|
1243
|
-
|
|
1244
|
-
cid?: string | undefined;
|
|
1245
|
-
users?: string[] | undefined;
|
|
1246
|
-
webhooks?: string[] | undefined;
|
|
1270
|
+
users: string[];
|
|
1247
1271
|
}, {
|
|
1248
|
-
|
|
1249
|
-
cid?: string | undefined;
|
|
1250
|
-
users?: string[] | undefined;
|
|
1251
|
-
webhooks?: string[] | undefined;
|
|
1272
|
+
users: string[];
|
|
1252
1273
|
}>;
|
|
1253
|
-
|
|
1274
|
+
subject: z.ZodString;
|
|
1254
1275
|
}>, "strip", z.ZodTypeAny, {
|
|
1276
|
+
subject: string;
|
|
1255
1277
|
to: {
|
|
1256
|
-
|
|
1257
|
-
cid?: string | undefined;
|
|
1258
|
-
users?: string[] | undefined;
|
|
1259
|
-
webhooks?: string[] | undefined;
|
|
1278
|
+
users: string[];
|
|
1260
1279
|
};
|
|
1261
|
-
teamId: string;
|
|
1262
1280
|
copySecOpsTeam?: boolean | undefined;
|
|
1263
1281
|
}, {
|
|
1282
|
+
subject: string;
|
|
1264
1283
|
to: {
|
|
1265
|
-
|
|
1266
|
-
cid?: string | undefined;
|
|
1267
|
-
users?: string[] | undefined;
|
|
1268
|
-
webhooks?: string[] | undefined;
|
|
1284
|
+
users: string[];
|
|
1269
1285
|
};
|
|
1270
|
-
teamId: string;
|
|
1271
1286
|
copySecOpsTeam?: boolean | undefined;
|
|
1272
1287
|
}>;
|
|
1273
1288
|
}>, "strip", z.ZodTypeAny, {
|
|
@@ -1294,15 +1309,12 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
|
|
|
1294
1309
|
fid?: string | undefined;
|
|
1295
1310
|
flowContext?: Record<string, any> | undefined;
|
|
1296
1311
|
};
|
|
1297
|
-
deliveryChannel: DeliveryStrategyKind.
|
|
1312
|
+
deliveryChannel: DeliveryStrategyKind.EMAIL;
|
|
1298
1313
|
deliveryStrategy: {
|
|
1314
|
+
subject: string;
|
|
1299
1315
|
to: {
|
|
1300
|
-
|
|
1301
|
-
cid?: string | undefined;
|
|
1302
|
-
users?: string[] | undefined;
|
|
1303
|
-
webhooks?: string[] | undefined;
|
|
1316
|
+
users: string[];
|
|
1304
1317
|
};
|
|
1305
|
-
teamId: string;
|
|
1306
1318
|
copySecOpsTeam?: boolean | undefined;
|
|
1307
1319
|
};
|
|
1308
1320
|
id?: string | undefined;
|
|
@@ -1340,15 +1352,12 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
|
|
|
1340
1352
|
fid?: string | undefined;
|
|
1341
1353
|
flowContext?: Record<string, any> | undefined;
|
|
1342
1354
|
};
|
|
1343
|
-
deliveryChannel: DeliveryStrategyKind.
|
|
1355
|
+
deliveryChannel: DeliveryStrategyKind.EMAIL;
|
|
1344
1356
|
deliveryStrategy: {
|
|
1357
|
+
subject: string;
|
|
1345
1358
|
to: {
|
|
1346
|
-
|
|
1347
|
-
cid?: string | undefined;
|
|
1348
|
-
users?: string[] | undefined;
|
|
1349
|
-
webhooks?: string[] | undefined;
|
|
1359
|
+
users: string[];
|
|
1350
1360
|
};
|
|
1351
|
-
teamId: string;
|
|
1352
1361
|
copySecOpsTeam?: boolean | undefined;
|
|
1353
1362
|
};
|
|
1354
1363
|
id?: string | undefined;
|
|
@@ -1441,28 +1450,30 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
|
|
|
1441
1450
|
deliveryMode: z.ZodOptional<z.ZodNativeEnum<typeof DeliveryModeKind>>;
|
|
1442
1451
|
actions: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof NotificationActionKind>, "many">>;
|
|
1443
1452
|
}>, {
|
|
1444
|
-
deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.
|
|
1453
|
+
deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.TEAMS>;
|
|
1445
1454
|
deliveryStrategy: z.ZodObject<z.objectUtil.extendShape<{
|
|
1446
1455
|
copySecOpsTeam: z.ZodOptional<z.ZodBoolean>;
|
|
1447
1456
|
}, {
|
|
1448
1457
|
to: z.ZodObject<{
|
|
1449
|
-
|
|
1458
|
+
cid: z.ZodOptional<z.ZodString>;
|
|
1459
|
+
users: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1450
1460
|
}, "strip", z.ZodTypeAny, {
|
|
1451
|
-
|
|
1461
|
+
cid?: string | undefined;
|
|
1462
|
+
users?: string[] | undefined;
|
|
1452
1463
|
}, {
|
|
1453
|
-
|
|
1464
|
+
cid?: string | undefined;
|
|
1465
|
+
users?: string[] | undefined;
|
|
1454
1466
|
}>;
|
|
1455
|
-
subject: z.ZodString;
|
|
1456
1467
|
}>, "strip", z.ZodTypeAny, {
|
|
1457
|
-
subject: string;
|
|
1458
1468
|
to: {
|
|
1459
|
-
|
|
1469
|
+
cid?: string | undefined;
|
|
1470
|
+
users?: string[] | undefined;
|
|
1460
1471
|
};
|
|
1461
1472
|
copySecOpsTeam?: boolean | undefined;
|
|
1462
1473
|
}, {
|
|
1463
|
-
subject: string;
|
|
1464
1474
|
to: {
|
|
1465
|
-
|
|
1475
|
+
cid?: string | undefined;
|
|
1476
|
+
users?: string[] | undefined;
|
|
1466
1477
|
};
|
|
1467
1478
|
copySecOpsTeam?: boolean | undefined;
|
|
1468
1479
|
}>;
|
|
@@ -1490,11 +1501,11 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
|
|
|
1490
1501
|
fid?: string | undefined;
|
|
1491
1502
|
flowContext?: Record<string, any> | undefined;
|
|
1492
1503
|
};
|
|
1493
|
-
deliveryChannel: DeliveryStrategyKind.
|
|
1504
|
+
deliveryChannel: DeliveryStrategyKind.TEAMS;
|
|
1494
1505
|
deliveryStrategy: {
|
|
1495
|
-
subject: string;
|
|
1496
1506
|
to: {
|
|
1497
|
-
|
|
1507
|
+
cid?: string | undefined;
|
|
1508
|
+
users?: string[] | undefined;
|
|
1498
1509
|
};
|
|
1499
1510
|
copySecOpsTeam?: boolean | undefined;
|
|
1500
1511
|
};
|
|
@@ -1533,11 +1544,606 @@ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion
|
|
|
1533
1544
|
fid?: string | undefined;
|
|
1534
1545
|
flowContext?: Record<string, any> | undefined;
|
|
1535
1546
|
};
|
|
1536
|
-
deliveryChannel: DeliveryStrategyKind.
|
|
1547
|
+
deliveryChannel: DeliveryStrategyKind.TEAMS;
|
|
1537
1548
|
deliveryStrategy: {
|
|
1538
|
-
subject: string;
|
|
1539
1549
|
to: {
|
|
1540
|
-
|
|
1550
|
+
cid?: string | undefined;
|
|
1551
|
+
users?: string[] | undefined;
|
|
1552
|
+
};
|
|
1553
|
+
copySecOpsTeam?: boolean | undefined;
|
|
1554
|
+
};
|
|
1555
|
+
id?: string | undefined;
|
|
1556
|
+
uid?: string | undefined;
|
|
1557
|
+
createdAt?: string | undefined;
|
|
1558
|
+
updatedAt?: string | undefined;
|
|
1559
|
+
deletedAt?: string | null | undefined;
|
|
1560
|
+
context?: NotificationContextKind | undefined;
|
|
1561
|
+
flowStateId?: string | undefined;
|
|
1562
|
+
fid?: string | undefined;
|
|
1563
|
+
actions?: NotificationActionKind[] | undefined;
|
|
1564
|
+
agentId?: string | undefined;
|
|
1565
|
+
deliveryMode?: DeliveryModeKind | undefined;
|
|
1566
|
+
}>]>;
|
|
1567
|
+
export type NotificationUpsertDto = z.infer<typeof _NotificationUpsertDto>;
|
|
1568
|
+
export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion<"deliveryChannel", [z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
1569
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1570
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
1571
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
1572
|
+
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1573
|
+
}, {
|
|
1574
|
+
status: z.ZodNativeEnum<typeof NotificationStatus>;
|
|
1575
|
+
contentStrategy: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
1576
|
+
kind: z.ZodLiteral<ContentStrategyKind.RAW>;
|
|
1577
|
+
content: z.ZodString;
|
|
1578
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
1579
|
+
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1580
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1581
|
+
}, "strip", z.ZodTypeAny, {
|
|
1582
|
+
kind: ContentStrategyKind.RAW;
|
|
1583
|
+
content: string;
|
|
1584
|
+
context?: Record<string, string> | undefined;
|
|
1585
|
+
subject?: string | undefined;
|
|
1586
|
+
flowContext?: Record<string, any> | undefined;
|
|
1587
|
+
}, {
|
|
1588
|
+
kind: ContentStrategyKind.RAW;
|
|
1589
|
+
content: string;
|
|
1590
|
+
context?: Record<string, string> | undefined;
|
|
1591
|
+
subject?: string | undefined;
|
|
1592
|
+
flowContext?: Record<string, any> | undefined;
|
|
1593
|
+
}>, z.ZodObject<{
|
|
1594
|
+
kind: z.ZodLiteral<ContentStrategyKind.FINDING>;
|
|
1595
|
+
fid: z.ZodString;
|
|
1596
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1597
|
+
}, "strip", z.ZodTypeAny, {
|
|
1598
|
+
kind: ContentStrategyKind.FINDING;
|
|
1599
|
+
fid: string;
|
|
1600
|
+
flowContext?: Record<string, any> | undefined;
|
|
1601
|
+
}, {
|
|
1602
|
+
kind: ContentStrategyKind.FINDING;
|
|
1603
|
+
fid: string;
|
|
1604
|
+
flowContext?: Record<string, any> | undefined;
|
|
1605
|
+
}>, z.ZodObject<{
|
|
1606
|
+
kind: z.ZodLiteral<ContentStrategyKind.TEMPLATE>;
|
|
1607
|
+
templateType: z.ZodOptional<z.ZodString>;
|
|
1608
|
+
templateId: z.ZodString;
|
|
1609
|
+
context: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1610
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1611
|
+
}, "strip", z.ZodTypeAny, {
|
|
1612
|
+
kind: ContentStrategyKind.TEMPLATE;
|
|
1613
|
+
context: Record<string, string>;
|
|
1614
|
+
templateId: string;
|
|
1615
|
+
flowContext?: Record<string, any> | undefined;
|
|
1616
|
+
templateType?: string | undefined;
|
|
1617
|
+
}, {
|
|
1618
|
+
kind: ContentStrategyKind.TEMPLATE;
|
|
1619
|
+
context: Record<string, string>;
|
|
1620
|
+
templateId: string;
|
|
1621
|
+
flowContext?: Record<string, any> | undefined;
|
|
1622
|
+
templateType?: string | undefined;
|
|
1623
|
+
}>, z.ZodObject<{
|
|
1624
|
+
kind: z.ZodLiteral<ContentStrategyKind.CUSTOM_CONTENT>;
|
|
1625
|
+
content: z.ZodString;
|
|
1626
|
+
fid: z.ZodOptional<z.ZodString>;
|
|
1627
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1628
|
+
}, "strip", z.ZodTypeAny, {
|
|
1629
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
1630
|
+
content: string;
|
|
1631
|
+
fid?: string | undefined;
|
|
1632
|
+
flowContext?: Record<string, any> | undefined;
|
|
1633
|
+
}, {
|
|
1634
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
1635
|
+
content: string;
|
|
1636
|
+
fid?: string | undefined;
|
|
1637
|
+
flowContext?: Record<string, any> | undefined;
|
|
1638
|
+
}>]>;
|
|
1639
|
+
fid: z.ZodOptional<z.ZodString>;
|
|
1640
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1641
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
1642
|
+
flowStateId: z.ZodOptional<z.ZodString>;
|
|
1643
|
+
context: z.ZodOptional<z.ZodNativeEnum<typeof NotificationContextKind>>;
|
|
1644
|
+
deliveryMode: z.ZodOptional<z.ZodNativeEnum<typeof DeliveryModeKind>>;
|
|
1645
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof NotificationActionKind>, "many">>;
|
|
1646
|
+
}>, {
|
|
1647
|
+
deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.SLACK>;
|
|
1648
|
+
deliveryStrategy: z.ZodObject<z.objectUtil.extendShape<{
|
|
1649
|
+
copySecOpsTeam: z.ZodOptional<z.ZodBoolean>;
|
|
1650
|
+
}, {
|
|
1651
|
+
to: z.ZodObject<{
|
|
1652
|
+
cid: z.ZodOptional<z.ZodString>;
|
|
1653
|
+
groups: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1654
|
+
users: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1655
|
+
webhooks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1656
|
+
}, "strip", z.ZodTypeAny, {
|
|
1657
|
+
groups?: string[] | undefined;
|
|
1658
|
+
cid?: string | undefined;
|
|
1659
|
+
users?: string[] | undefined;
|
|
1660
|
+
webhooks?: string[] | undefined;
|
|
1661
|
+
}, {
|
|
1662
|
+
groups?: string[] | undefined;
|
|
1663
|
+
cid?: string | undefined;
|
|
1664
|
+
users?: string[] | undefined;
|
|
1665
|
+
webhooks?: string[] | undefined;
|
|
1666
|
+
}>;
|
|
1667
|
+
teamId: z.ZodString;
|
|
1668
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1669
|
+
to: {
|
|
1670
|
+
groups?: string[] | undefined;
|
|
1671
|
+
cid?: string | undefined;
|
|
1672
|
+
users?: string[] | undefined;
|
|
1673
|
+
webhooks?: string[] | undefined;
|
|
1674
|
+
};
|
|
1675
|
+
teamId: string;
|
|
1676
|
+
copySecOpsTeam?: boolean | undefined;
|
|
1677
|
+
}, {
|
|
1678
|
+
to: {
|
|
1679
|
+
groups?: string[] | undefined;
|
|
1680
|
+
cid?: string | undefined;
|
|
1681
|
+
users?: string[] | undefined;
|
|
1682
|
+
webhooks?: string[] | undefined;
|
|
1683
|
+
};
|
|
1684
|
+
teamId: string;
|
|
1685
|
+
copySecOpsTeam?: boolean | undefined;
|
|
1686
|
+
}>;
|
|
1687
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1688
|
+
status: NotificationStatus;
|
|
1689
|
+
contentStrategy: {
|
|
1690
|
+
kind: ContentStrategyKind.RAW;
|
|
1691
|
+
content: string;
|
|
1692
|
+
context?: Record<string, string> | undefined;
|
|
1693
|
+
subject?: string | undefined;
|
|
1694
|
+
flowContext?: Record<string, any> | undefined;
|
|
1695
|
+
} | {
|
|
1696
|
+
kind: ContentStrategyKind.TEMPLATE;
|
|
1697
|
+
context: Record<string, string>;
|
|
1698
|
+
templateId: string;
|
|
1699
|
+
flowContext?: Record<string, any> | undefined;
|
|
1700
|
+
templateType?: string | undefined;
|
|
1701
|
+
} | {
|
|
1702
|
+
kind: ContentStrategyKind.FINDING;
|
|
1703
|
+
fid: string;
|
|
1704
|
+
flowContext?: Record<string, any> | undefined;
|
|
1705
|
+
} | {
|
|
1706
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
1707
|
+
content: string;
|
|
1708
|
+
fid?: string | undefined;
|
|
1709
|
+
flowContext?: Record<string, any> | undefined;
|
|
1710
|
+
};
|
|
1711
|
+
deliveryChannel: DeliveryStrategyKind.SLACK;
|
|
1712
|
+
deliveryStrategy: {
|
|
1713
|
+
to: {
|
|
1714
|
+
groups?: string[] | undefined;
|
|
1715
|
+
cid?: string | undefined;
|
|
1716
|
+
users?: string[] | undefined;
|
|
1717
|
+
webhooks?: string[] | undefined;
|
|
1718
|
+
};
|
|
1719
|
+
teamId: string;
|
|
1720
|
+
copySecOpsTeam?: boolean | undefined;
|
|
1721
|
+
};
|
|
1722
|
+
id?: string | undefined;
|
|
1723
|
+
uid?: string | undefined;
|
|
1724
|
+
createdAt?: string | undefined;
|
|
1725
|
+
updatedAt?: string | undefined;
|
|
1726
|
+
deletedAt?: string | null | undefined;
|
|
1727
|
+
context?: NotificationContextKind | undefined;
|
|
1728
|
+
flowStateId?: string | undefined;
|
|
1729
|
+
fid?: string | undefined;
|
|
1730
|
+
actions?: NotificationActionKind[] | undefined;
|
|
1731
|
+
agentId?: string | undefined;
|
|
1732
|
+
deliveryMode?: DeliveryModeKind | undefined;
|
|
1733
|
+
}, {
|
|
1734
|
+
status: NotificationStatus;
|
|
1735
|
+
contentStrategy: {
|
|
1736
|
+
kind: ContentStrategyKind.RAW;
|
|
1737
|
+
content: string;
|
|
1738
|
+
context?: Record<string, string> | undefined;
|
|
1739
|
+
subject?: string | undefined;
|
|
1740
|
+
flowContext?: Record<string, any> | undefined;
|
|
1741
|
+
} | {
|
|
1742
|
+
kind: ContentStrategyKind.TEMPLATE;
|
|
1743
|
+
context: Record<string, string>;
|
|
1744
|
+
templateId: string;
|
|
1745
|
+
flowContext?: Record<string, any> | undefined;
|
|
1746
|
+
templateType?: string | undefined;
|
|
1747
|
+
} | {
|
|
1748
|
+
kind: ContentStrategyKind.FINDING;
|
|
1749
|
+
fid: string;
|
|
1750
|
+
flowContext?: Record<string, any> | undefined;
|
|
1751
|
+
} | {
|
|
1752
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
1753
|
+
content: string;
|
|
1754
|
+
fid?: string | undefined;
|
|
1755
|
+
flowContext?: Record<string, any> | undefined;
|
|
1756
|
+
};
|
|
1757
|
+
deliveryChannel: DeliveryStrategyKind.SLACK;
|
|
1758
|
+
deliveryStrategy: {
|
|
1759
|
+
to: {
|
|
1760
|
+
groups?: string[] | undefined;
|
|
1761
|
+
cid?: string | undefined;
|
|
1762
|
+
users?: string[] | undefined;
|
|
1763
|
+
webhooks?: string[] | undefined;
|
|
1764
|
+
};
|
|
1765
|
+
teamId: string;
|
|
1766
|
+
copySecOpsTeam?: boolean | undefined;
|
|
1767
|
+
};
|
|
1768
|
+
id?: string | undefined;
|
|
1769
|
+
uid?: string | undefined;
|
|
1770
|
+
createdAt?: string | undefined;
|
|
1771
|
+
updatedAt?: string | undefined;
|
|
1772
|
+
deletedAt?: string | null | undefined;
|
|
1773
|
+
context?: NotificationContextKind | undefined;
|
|
1774
|
+
flowStateId?: string | undefined;
|
|
1775
|
+
fid?: string | undefined;
|
|
1776
|
+
actions?: NotificationActionKind[] | undefined;
|
|
1777
|
+
agentId?: string | undefined;
|
|
1778
|
+
deliveryMode?: DeliveryModeKind | undefined;
|
|
1779
|
+
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
1780
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1781
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
1782
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
1783
|
+
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1784
|
+
}, {
|
|
1785
|
+
status: z.ZodNativeEnum<typeof NotificationStatus>;
|
|
1786
|
+
contentStrategy: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
1787
|
+
kind: z.ZodLiteral<ContentStrategyKind.RAW>;
|
|
1788
|
+
content: z.ZodString;
|
|
1789
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
1790
|
+
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1791
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1792
|
+
}, "strip", z.ZodTypeAny, {
|
|
1793
|
+
kind: ContentStrategyKind.RAW;
|
|
1794
|
+
content: string;
|
|
1795
|
+
context?: Record<string, string> | undefined;
|
|
1796
|
+
subject?: string | undefined;
|
|
1797
|
+
flowContext?: Record<string, any> | undefined;
|
|
1798
|
+
}, {
|
|
1799
|
+
kind: ContentStrategyKind.RAW;
|
|
1800
|
+
content: string;
|
|
1801
|
+
context?: Record<string, string> | undefined;
|
|
1802
|
+
subject?: string | undefined;
|
|
1803
|
+
flowContext?: Record<string, any> | undefined;
|
|
1804
|
+
}>, z.ZodObject<{
|
|
1805
|
+
kind: z.ZodLiteral<ContentStrategyKind.FINDING>;
|
|
1806
|
+
fid: z.ZodString;
|
|
1807
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1808
|
+
}, "strip", z.ZodTypeAny, {
|
|
1809
|
+
kind: ContentStrategyKind.FINDING;
|
|
1810
|
+
fid: string;
|
|
1811
|
+
flowContext?: Record<string, any> | undefined;
|
|
1812
|
+
}, {
|
|
1813
|
+
kind: ContentStrategyKind.FINDING;
|
|
1814
|
+
fid: string;
|
|
1815
|
+
flowContext?: Record<string, any> | undefined;
|
|
1816
|
+
}>, z.ZodObject<{
|
|
1817
|
+
kind: z.ZodLiteral<ContentStrategyKind.TEMPLATE>;
|
|
1818
|
+
templateType: z.ZodOptional<z.ZodString>;
|
|
1819
|
+
templateId: z.ZodString;
|
|
1820
|
+
context: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
1821
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1822
|
+
}, "strip", z.ZodTypeAny, {
|
|
1823
|
+
kind: ContentStrategyKind.TEMPLATE;
|
|
1824
|
+
context: Record<string, string>;
|
|
1825
|
+
templateId: string;
|
|
1826
|
+
flowContext?: Record<string, any> | undefined;
|
|
1827
|
+
templateType?: string | undefined;
|
|
1828
|
+
}, {
|
|
1829
|
+
kind: ContentStrategyKind.TEMPLATE;
|
|
1830
|
+
context: Record<string, string>;
|
|
1831
|
+
templateId: string;
|
|
1832
|
+
flowContext?: Record<string, any> | undefined;
|
|
1833
|
+
templateType?: string | undefined;
|
|
1834
|
+
}>, z.ZodObject<{
|
|
1835
|
+
kind: z.ZodLiteral<ContentStrategyKind.CUSTOM_CONTENT>;
|
|
1836
|
+
content: z.ZodString;
|
|
1837
|
+
fid: z.ZodOptional<z.ZodString>;
|
|
1838
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1839
|
+
}, "strip", z.ZodTypeAny, {
|
|
1840
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
1841
|
+
content: string;
|
|
1842
|
+
fid?: string | undefined;
|
|
1843
|
+
flowContext?: Record<string, any> | undefined;
|
|
1844
|
+
}, {
|
|
1845
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
1846
|
+
content: string;
|
|
1847
|
+
fid?: string | undefined;
|
|
1848
|
+
flowContext?: Record<string, any> | undefined;
|
|
1849
|
+
}>]>;
|
|
1850
|
+
fid: z.ZodOptional<z.ZodString>;
|
|
1851
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
1852
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
1853
|
+
flowStateId: z.ZodOptional<z.ZodString>;
|
|
1854
|
+
context: z.ZodOptional<z.ZodNativeEnum<typeof NotificationContextKind>>;
|
|
1855
|
+
deliveryMode: z.ZodOptional<z.ZodNativeEnum<typeof DeliveryModeKind>>;
|
|
1856
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof NotificationActionKind>, "many">>;
|
|
1857
|
+
}>, {
|
|
1858
|
+
deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.EMAIL>;
|
|
1859
|
+
deliveryStrategy: z.ZodObject<z.objectUtil.extendShape<{
|
|
1860
|
+
copySecOpsTeam: z.ZodOptional<z.ZodBoolean>;
|
|
1861
|
+
}, {
|
|
1862
|
+
to: z.ZodObject<{
|
|
1863
|
+
users: z.ZodArray<z.ZodString, "many">;
|
|
1864
|
+
}, "strip", z.ZodTypeAny, {
|
|
1865
|
+
users: string[];
|
|
1866
|
+
}, {
|
|
1867
|
+
users: string[];
|
|
1868
|
+
}>;
|
|
1869
|
+
subject: z.ZodString;
|
|
1870
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1871
|
+
subject: string;
|
|
1872
|
+
to: {
|
|
1873
|
+
users: string[];
|
|
1874
|
+
};
|
|
1875
|
+
copySecOpsTeam?: boolean | undefined;
|
|
1876
|
+
}, {
|
|
1877
|
+
subject: string;
|
|
1878
|
+
to: {
|
|
1879
|
+
users: string[];
|
|
1880
|
+
};
|
|
1881
|
+
copySecOpsTeam?: boolean | undefined;
|
|
1882
|
+
}>;
|
|
1883
|
+
}>, "strip", z.ZodTypeAny, {
|
|
1884
|
+
status: NotificationStatus;
|
|
1885
|
+
contentStrategy: {
|
|
1886
|
+
kind: ContentStrategyKind.RAW;
|
|
1887
|
+
content: string;
|
|
1888
|
+
context?: Record<string, string> | undefined;
|
|
1889
|
+
subject?: string | undefined;
|
|
1890
|
+
flowContext?: Record<string, any> | undefined;
|
|
1891
|
+
} | {
|
|
1892
|
+
kind: ContentStrategyKind.TEMPLATE;
|
|
1893
|
+
context: Record<string, string>;
|
|
1894
|
+
templateId: string;
|
|
1895
|
+
flowContext?: Record<string, any> | undefined;
|
|
1896
|
+
templateType?: string | undefined;
|
|
1897
|
+
} | {
|
|
1898
|
+
kind: ContentStrategyKind.FINDING;
|
|
1899
|
+
fid: string;
|
|
1900
|
+
flowContext?: Record<string, any> | undefined;
|
|
1901
|
+
} | {
|
|
1902
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
1903
|
+
content: string;
|
|
1904
|
+
fid?: string | undefined;
|
|
1905
|
+
flowContext?: Record<string, any> | undefined;
|
|
1906
|
+
};
|
|
1907
|
+
deliveryChannel: DeliveryStrategyKind.EMAIL;
|
|
1908
|
+
deliveryStrategy: {
|
|
1909
|
+
subject: string;
|
|
1910
|
+
to: {
|
|
1911
|
+
users: string[];
|
|
1912
|
+
};
|
|
1913
|
+
copySecOpsTeam?: boolean | undefined;
|
|
1914
|
+
};
|
|
1915
|
+
id?: string | undefined;
|
|
1916
|
+
uid?: string | undefined;
|
|
1917
|
+
createdAt?: string | undefined;
|
|
1918
|
+
updatedAt?: string | undefined;
|
|
1919
|
+
deletedAt?: string | null | undefined;
|
|
1920
|
+
context?: NotificationContextKind | undefined;
|
|
1921
|
+
flowStateId?: string | undefined;
|
|
1922
|
+
fid?: string | undefined;
|
|
1923
|
+
actions?: NotificationActionKind[] | undefined;
|
|
1924
|
+
agentId?: string | undefined;
|
|
1925
|
+
deliveryMode?: DeliveryModeKind | undefined;
|
|
1926
|
+
}, {
|
|
1927
|
+
status: NotificationStatus;
|
|
1928
|
+
contentStrategy: {
|
|
1929
|
+
kind: ContentStrategyKind.RAW;
|
|
1930
|
+
content: string;
|
|
1931
|
+
context?: Record<string, string> | undefined;
|
|
1932
|
+
subject?: string | undefined;
|
|
1933
|
+
flowContext?: Record<string, any> | undefined;
|
|
1934
|
+
} | {
|
|
1935
|
+
kind: ContentStrategyKind.TEMPLATE;
|
|
1936
|
+
context: Record<string, string>;
|
|
1937
|
+
templateId: string;
|
|
1938
|
+
flowContext?: Record<string, any> | undefined;
|
|
1939
|
+
templateType?: string | undefined;
|
|
1940
|
+
} | {
|
|
1941
|
+
kind: ContentStrategyKind.FINDING;
|
|
1942
|
+
fid: string;
|
|
1943
|
+
flowContext?: Record<string, any> | undefined;
|
|
1944
|
+
} | {
|
|
1945
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
1946
|
+
content: string;
|
|
1947
|
+
fid?: string | undefined;
|
|
1948
|
+
flowContext?: Record<string, any> | undefined;
|
|
1949
|
+
};
|
|
1950
|
+
deliveryChannel: DeliveryStrategyKind.EMAIL;
|
|
1951
|
+
deliveryStrategy: {
|
|
1952
|
+
subject: string;
|
|
1953
|
+
to: {
|
|
1954
|
+
users: string[];
|
|
1955
|
+
};
|
|
1956
|
+
copySecOpsTeam?: boolean | undefined;
|
|
1957
|
+
};
|
|
1958
|
+
id?: string | undefined;
|
|
1959
|
+
uid?: string | undefined;
|
|
1960
|
+
createdAt?: string | undefined;
|
|
1961
|
+
updatedAt?: string | undefined;
|
|
1962
|
+
deletedAt?: string | null | undefined;
|
|
1963
|
+
context?: NotificationContextKind | undefined;
|
|
1964
|
+
flowStateId?: string | undefined;
|
|
1965
|
+
fid?: string | undefined;
|
|
1966
|
+
actions?: NotificationActionKind[] | undefined;
|
|
1967
|
+
agentId?: string | undefined;
|
|
1968
|
+
deliveryMode?: DeliveryModeKind | undefined;
|
|
1969
|
+
}>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
1970
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1971
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
1972
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
1973
|
+
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1974
|
+
}, {
|
|
1975
|
+
status: z.ZodNativeEnum<typeof NotificationStatus>;
|
|
1976
|
+
contentStrategy: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
1977
|
+
kind: z.ZodLiteral<ContentStrategyKind.RAW>;
|
|
1978
|
+
content: z.ZodString;
|
|
1979
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
1980
|
+
context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1981
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1982
|
+
}, "strip", z.ZodTypeAny, {
|
|
1983
|
+
kind: ContentStrategyKind.RAW;
|
|
1984
|
+
content: string;
|
|
1985
|
+
context?: Record<string, string> | undefined;
|
|
1986
|
+
subject?: string | undefined;
|
|
1987
|
+
flowContext?: Record<string, any> | undefined;
|
|
1988
|
+
}, {
|
|
1989
|
+
kind: ContentStrategyKind.RAW;
|
|
1990
|
+
content: string;
|
|
1991
|
+
context?: Record<string, string> | undefined;
|
|
1992
|
+
subject?: string | undefined;
|
|
1993
|
+
flowContext?: Record<string, any> | undefined;
|
|
1994
|
+
}>, z.ZodObject<{
|
|
1995
|
+
kind: z.ZodLiteral<ContentStrategyKind.FINDING>;
|
|
1996
|
+
fid: z.ZodString;
|
|
1997
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1998
|
+
}, "strip", z.ZodTypeAny, {
|
|
1999
|
+
kind: ContentStrategyKind.FINDING;
|
|
2000
|
+
fid: string;
|
|
2001
|
+
flowContext?: Record<string, any> | undefined;
|
|
2002
|
+
}, {
|
|
2003
|
+
kind: ContentStrategyKind.FINDING;
|
|
2004
|
+
fid: string;
|
|
2005
|
+
flowContext?: Record<string, any> | undefined;
|
|
2006
|
+
}>, z.ZodObject<{
|
|
2007
|
+
kind: z.ZodLiteral<ContentStrategyKind.TEMPLATE>;
|
|
2008
|
+
templateType: z.ZodOptional<z.ZodString>;
|
|
2009
|
+
templateId: z.ZodString;
|
|
2010
|
+
context: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
2011
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
2012
|
+
}, "strip", z.ZodTypeAny, {
|
|
2013
|
+
kind: ContentStrategyKind.TEMPLATE;
|
|
2014
|
+
context: Record<string, string>;
|
|
2015
|
+
templateId: string;
|
|
2016
|
+
flowContext?: Record<string, any> | undefined;
|
|
2017
|
+
templateType?: string | undefined;
|
|
2018
|
+
}, {
|
|
2019
|
+
kind: ContentStrategyKind.TEMPLATE;
|
|
2020
|
+
context: Record<string, string>;
|
|
2021
|
+
templateId: string;
|
|
2022
|
+
flowContext?: Record<string, any> | undefined;
|
|
2023
|
+
templateType?: string | undefined;
|
|
2024
|
+
}>, z.ZodObject<{
|
|
2025
|
+
kind: z.ZodLiteral<ContentStrategyKind.CUSTOM_CONTENT>;
|
|
2026
|
+
content: z.ZodString;
|
|
2027
|
+
fid: z.ZodOptional<z.ZodString>;
|
|
2028
|
+
flowContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
2029
|
+
}, "strip", z.ZodTypeAny, {
|
|
2030
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
2031
|
+
content: string;
|
|
2032
|
+
fid?: string | undefined;
|
|
2033
|
+
flowContext?: Record<string, any> | undefined;
|
|
2034
|
+
}, {
|
|
2035
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
2036
|
+
content: string;
|
|
2037
|
+
fid?: string | undefined;
|
|
2038
|
+
flowContext?: Record<string, any> | undefined;
|
|
2039
|
+
}>]>;
|
|
2040
|
+
fid: z.ZodOptional<z.ZodString>;
|
|
2041
|
+
uid: z.ZodOptional<z.ZodString>;
|
|
2042
|
+
agentId: z.ZodOptional<z.ZodString>;
|
|
2043
|
+
flowStateId: z.ZodOptional<z.ZodString>;
|
|
2044
|
+
context: z.ZodOptional<z.ZodNativeEnum<typeof NotificationContextKind>>;
|
|
2045
|
+
deliveryMode: z.ZodOptional<z.ZodNativeEnum<typeof DeliveryModeKind>>;
|
|
2046
|
+
actions: z.ZodOptional<z.ZodArray<z.ZodNativeEnum<typeof NotificationActionKind>, "many">>;
|
|
2047
|
+
}>, {
|
|
2048
|
+
deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.TEAMS>;
|
|
2049
|
+
deliveryStrategy: z.ZodObject<z.objectUtil.extendShape<{
|
|
2050
|
+
copySecOpsTeam: z.ZodOptional<z.ZodBoolean>;
|
|
2051
|
+
}, {
|
|
2052
|
+
to: z.ZodObject<{
|
|
2053
|
+
cid: z.ZodOptional<z.ZodString>;
|
|
2054
|
+
users: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
2055
|
+
}, "strip", z.ZodTypeAny, {
|
|
2056
|
+
cid?: string | undefined;
|
|
2057
|
+
users?: string[] | undefined;
|
|
2058
|
+
}, {
|
|
2059
|
+
cid?: string | undefined;
|
|
2060
|
+
users?: string[] | undefined;
|
|
2061
|
+
}>;
|
|
2062
|
+
}>, "strip", z.ZodTypeAny, {
|
|
2063
|
+
to: {
|
|
2064
|
+
cid?: string | undefined;
|
|
2065
|
+
users?: string[] | undefined;
|
|
2066
|
+
};
|
|
2067
|
+
copySecOpsTeam?: boolean | undefined;
|
|
2068
|
+
}, {
|
|
2069
|
+
to: {
|
|
2070
|
+
cid?: string | undefined;
|
|
2071
|
+
users?: string[] | undefined;
|
|
2072
|
+
};
|
|
2073
|
+
copySecOpsTeam?: boolean | undefined;
|
|
2074
|
+
}>;
|
|
2075
|
+
}>, "strip", z.ZodTypeAny, {
|
|
2076
|
+
status: NotificationStatus;
|
|
2077
|
+
contentStrategy: {
|
|
2078
|
+
kind: ContentStrategyKind.RAW;
|
|
2079
|
+
content: string;
|
|
2080
|
+
context?: Record<string, string> | undefined;
|
|
2081
|
+
subject?: string | undefined;
|
|
2082
|
+
flowContext?: Record<string, any> | undefined;
|
|
2083
|
+
} | {
|
|
2084
|
+
kind: ContentStrategyKind.TEMPLATE;
|
|
2085
|
+
context: Record<string, string>;
|
|
2086
|
+
templateId: string;
|
|
2087
|
+
flowContext?: Record<string, any> | undefined;
|
|
2088
|
+
templateType?: string | undefined;
|
|
2089
|
+
} | {
|
|
2090
|
+
kind: ContentStrategyKind.FINDING;
|
|
2091
|
+
fid: string;
|
|
2092
|
+
flowContext?: Record<string, any> | undefined;
|
|
2093
|
+
} | {
|
|
2094
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
2095
|
+
content: string;
|
|
2096
|
+
fid?: string | undefined;
|
|
2097
|
+
flowContext?: Record<string, any> | undefined;
|
|
2098
|
+
};
|
|
2099
|
+
deliveryChannel: DeliveryStrategyKind.TEAMS;
|
|
2100
|
+
deliveryStrategy: {
|
|
2101
|
+
to: {
|
|
2102
|
+
cid?: string | undefined;
|
|
2103
|
+
users?: string[] | undefined;
|
|
2104
|
+
};
|
|
2105
|
+
copySecOpsTeam?: boolean | undefined;
|
|
2106
|
+
};
|
|
2107
|
+
id?: string | undefined;
|
|
2108
|
+
uid?: string | undefined;
|
|
2109
|
+
createdAt?: string | undefined;
|
|
2110
|
+
updatedAt?: string | undefined;
|
|
2111
|
+
deletedAt?: string | null | undefined;
|
|
2112
|
+
context?: NotificationContextKind | undefined;
|
|
2113
|
+
flowStateId?: string | undefined;
|
|
2114
|
+
fid?: string | undefined;
|
|
2115
|
+
actions?: NotificationActionKind[] | undefined;
|
|
2116
|
+
agentId?: string | undefined;
|
|
2117
|
+
deliveryMode?: DeliveryModeKind | undefined;
|
|
2118
|
+
}, {
|
|
2119
|
+
status: NotificationStatus;
|
|
2120
|
+
contentStrategy: {
|
|
2121
|
+
kind: ContentStrategyKind.RAW;
|
|
2122
|
+
content: string;
|
|
2123
|
+
context?: Record<string, string> | undefined;
|
|
2124
|
+
subject?: string | undefined;
|
|
2125
|
+
flowContext?: Record<string, any> | undefined;
|
|
2126
|
+
} | {
|
|
2127
|
+
kind: ContentStrategyKind.TEMPLATE;
|
|
2128
|
+
context: Record<string, string>;
|
|
2129
|
+
templateId: string;
|
|
2130
|
+
flowContext?: Record<string, any> | undefined;
|
|
2131
|
+
templateType?: string | undefined;
|
|
2132
|
+
} | {
|
|
2133
|
+
kind: ContentStrategyKind.FINDING;
|
|
2134
|
+
fid: string;
|
|
2135
|
+
flowContext?: Record<string, any> | undefined;
|
|
2136
|
+
} | {
|
|
2137
|
+
kind: ContentStrategyKind.CUSTOM_CONTENT;
|
|
2138
|
+
content: string;
|
|
2139
|
+
fid?: string | undefined;
|
|
2140
|
+
flowContext?: Record<string, any> | undefined;
|
|
2141
|
+
};
|
|
2142
|
+
deliveryChannel: DeliveryStrategyKind.TEAMS;
|
|
2143
|
+
deliveryStrategy: {
|
|
2144
|
+
to: {
|
|
2145
|
+
cid?: string | undefined;
|
|
2146
|
+
users?: string[] | undefined;
|
|
1541
2147
|
};
|
|
1542
2148
|
copySecOpsTeam?: boolean | undefined;
|
|
1543
2149
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._CreateNotificationDto = exports._NotificationDto = exports._NotificationUpsertDto = exports._EmailNotificationUpsertDto = exports._SlackNotificationUpsertDto = exports._BaseNotificationUpsertDto = exports._EmailDeliveryStrategy = exports._SlackDeliveryStrategy = exports._CustomContentStrategy = exports._FindingContentStrategy = exports._TemplateContentStrategy = exports._RawContentStrategy = exports._FlowContext = exports._NotificationAddress = exports.DeliveryModeKind = exports.DeliveryStrategyKind = exports.ContentStrategyKind = exports.NotificationActionKind = exports.NotificationContextKind = exports.NotificationStatus = void 0;
|
|
3
|
+
exports._CreateNotificationDto = exports._NotificationDto = exports._NotificationUpsertDto = exports._TeamsNotificationUpsertDto = exports._EmailNotificationUpsertDto = exports._SlackNotificationUpsertDto = exports._BaseNotificationUpsertDto = exports._EmailDeliveryStrategy = exports._TeamsDeliveryStrategy = exports._SlackDeliveryStrategy = exports._CustomContentStrategy = exports._FindingContentStrategy = exports._TemplateContentStrategy = exports._RawContentStrategy = exports._FlowContext = exports._NotificationAddress = exports.DeliveryModeKind = exports.DeliveryStrategyKind = exports.ContentStrategyKind = exports.NotificationActionKind = exports.NotificationContextKind = exports.NotificationStatus = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const base_dto_1 = require("./base.dto");
|
|
6
6
|
var NotificationStatus;
|
|
@@ -46,6 +46,7 @@ var DeliveryStrategyKind;
|
|
|
46
46
|
(function (DeliveryStrategyKind) {
|
|
47
47
|
DeliveryStrategyKind["EMAIL"] = "EMAIL";
|
|
48
48
|
DeliveryStrategyKind["SLACK"] = "SLACK";
|
|
49
|
+
DeliveryStrategyKind["TEAMS"] = "TEAMS";
|
|
49
50
|
})(DeliveryStrategyKind || (exports.DeliveryStrategyKind = DeliveryStrategyKind = {}));
|
|
50
51
|
var DeliveryModeKind;
|
|
51
52
|
(function (DeliveryModeKind) {
|
|
@@ -101,6 +102,12 @@ exports._SlackDeliveryStrategy = _BaseDeliveryStrategy.merge(zod_1.z.object({
|
|
|
101
102
|
}),
|
|
102
103
|
teamId: zod_1.z.string(),
|
|
103
104
|
}));
|
|
105
|
+
exports._TeamsDeliveryStrategy = _BaseDeliveryStrategy.merge(zod_1.z.object({
|
|
106
|
+
to: zod_1.z.object({
|
|
107
|
+
cid: zod_1.z.string().optional(),
|
|
108
|
+
users: zod_1.z.array(zod_1.z.string()).optional(),
|
|
109
|
+
}),
|
|
110
|
+
}));
|
|
104
111
|
exports._EmailDeliveryStrategy = _BaseDeliveryStrategy.merge(zod_1.z.object({
|
|
105
112
|
to: zod_1.z.object({
|
|
106
113
|
users: zod_1.z.array(zod_1.z.string()),
|
|
@@ -127,8 +134,12 @@ exports._EmailNotificationUpsertDto = exports._BaseNotificationUpsertDto.merge(z
|
|
|
127
134
|
deliveryChannel: zod_1.z.literal(DeliveryStrategyKind.EMAIL),
|
|
128
135
|
deliveryStrategy: exports._EmailDeliveryStrategy,
|
|
129
136
|
}));
|
|
137
|
+
exports._TeamsNotificationUpsertDto = exports._BaseNotificationUpsertDto.merge(zod_1.z.object({
|
|
138
|
+
deliveryChannel: zod_1.z.literal(DeliveryStrategyKind.TEAMS),
|
|
139
|
+
deliveryStrategy: exports._TeamsDeliveryStrategy,
|
|
140
|
+
}));
|
|
130
141
|
// TODO when will this happen? or will it happen at all? https://github.com/colinhacks/zod/issues/2106 🤷♂️
|
|
131
|
-
exports._NotificationUpsertDto = zod_1.z.discriminatedUnion('deliveryChannel', [exports._SlackNotificationUpsertDto, exports._EmailNotificationUpsertDto]);
|
|
142
|
+
exports._NotificationUpsertDto = zod_1.z.discriminatedUnion('deliveryChannel', [exports._SlackNotificationUpsertDto, exports._EmailNotificationUpsertDto, exports._TeamsNotificationUpsertDto]);
|
|
132
143
|
exports._NotificationDto = exports._NotificationUpsertDto.and(base_dto_1._BaseDto);
|
|
133
144
|
exports._CreateNotificationDto = base_dto_1._BaseUpsertDto.merge(zod_1.z.object({
|
|
134
145
|
test: zod_1.z.boolean().optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification.dto.js","sourceRoot":"","sources":["../../../src/dto/notification.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,yCAA6D;AAE7D,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;IACf,yCAAmB,CAAA;IACnB,yCAAmB,CAAA;IACnB,mCAAa,CAAA;IACb,mCAAa,CAAA;AACf,CAAC,EANW,kBAAkB,kCAAlB,kBAAkB,QAM7B;AAED,IAAY,uBAaX;AAbD,WAAY,uBAAuB;IACjC,8CAAmB,CAAA;IACnB,wEAAwE;IACxE,wCAAa,CAAA;IACb,sEAA2C,CAAA;IAC3C,4DAAiC,CAAA;IACjC,4CAAiB,CAAA;IACjB,2EAA2E;IAC3E,gDAAqB,CAAA;IACrB,kEAAuC,CAAA;IACvC,wFAA6D,CAAA;IAC7D,gFAAqD,CAAA;IACrD,wDAA6B,CAAA;AAC/B,CAAC,EAbW,uBAAuB,uCAAvB,uBAAuB,QAalC;AAED,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,uDAA6B,CAAA;IAC7B,+DAAqC,CAAA;IACrC,yDAA+B,CAAA;IAC/B,qDAA2B,CAAA;IAC3B,2CAAiB,CAAA;IACjB,qEAA2C,CAAA;AAC7C,CAAC,EAPW,sBAAsB,sCAAtB,sBAAsB,QAOjC;AAED,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,kCAAW,CAAA;IACX,4CAAqB,CAAA;IACrB,0CAAmB,CAAA;IACnB,wDAAiC,CAAA;AACnC,CAAC,EALW,mBAAmB,mCAAnB,mBAAmB,QAK9B;AAED,IAAY,
|
|
1
|
+
{"version":3,"file":"notification.dto.js","sourceRoot":"","sources":["../../../src/dto/notification.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AAC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AE;IAC5B,OAAO,EAAE,OAAC,CAAC,UAAU,CAAC,oBAAoB,CAAC;IAC3C,OAAO,EAAE,2BAAmB;IAC5B,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC;QAChB,cAAc,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;KACvC,CAAC;IACF,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC1B,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,OAAO,EAAE,OAAC,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC,QAAQ,EAAE;IACzD,YAAY,EAAE,OAAC,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,QAAQ,EAAE;IACvD,uEAAuE;IACvE,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,cAAc,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACtC,OAAO,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,UAAU,CAAC,sBAAsB,CAAC,CAAC,CAAC,QAAQ,EAAE;CAClE,CAAC,CACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -43,6 +43,7 @@ export enum ContentStrategyKind {
|
|
|
43
43
|
export enum DeliveryStrategyKind {
|
|
44
44
|
EMAIL = 'EMAIL',
|
|
45
45
|
SLACK = 'SLACK',
|
|
46
|
+
TEAMS = 'TEAMS',
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
export enum DeliveryModeKind {
|
|
@@ -114,6 +115,16 @@ export const _SlackDeliveryStrategy = _BaseDeliveryStrategy.merge(
|
|
|
114
115
|
);
|
|
115
116
|
export type SlackDeliveryStrategy = z.infer<typeof _SlackDeliveryStrategy>;
|
|
116
117
|
|
|
118
|
+
export const _TeamsDeliveryStrategy = _BaseDeliveryStrategy.merge(
|
|
119
|
+
z.object({
|
|
120
|
+
to: z.object({
|
|
121
|
+
cid: z.string().optional(),
|
|
122
|
+
users: z.array(z.string()).optional(),
|
|
123
|
+
}),
|
|
124
|
+
})
|
|
125
|
+
);
|
|
126
|
+
export type TeamsDeliveryStrategy = z.infer<typeof _TeamsDeliveryStrategy>;
|
|
127
|
+
|
|
117
128
|
export const _EmailDeliveryStrategy = _BaseDeliveryStrategy.merge(
|
|
118
129
|
z.object({
|
|
119
130
|
to: z.object({
|
|
@@ -155,8 +166,16 @@ export const _EmailNotificationUpsertDto = _BaseNotificationUpsertDto.merge(
|
|
|
155
166
|
);
|
|
156
167
|
export type EmailNotificationUpsertDto = z.infer<typeof _EmailNotificationUpsertDto>;
|
|
157
168
|
|
|
169
|
+
export const _TeamsNotificationUpsertDto = _BaseNotificationUpsertDto.merge(
|
|
170
|
+
z.object({
|
|
171
|
+
deliveryChannel: z.literal(DeliveryStrategyKind.TEAMS),
|
|
172
|
+
deliveryStrategy: _TeamsDeliveryStrategy,
|
|
173
|
+
})
|
|
174
|
+
);
|
|
175
|
+
export type TeamsNotificationUpsertDto = z.infer<typeof _TeamsNotificationUpsertDto>;
|
|
176
|
+
|
|
158
177
|
// TODO when will this happen? or will it happen at all? https://github.com/colinhacks/zod/issues/2106 🤷♂️
|
|
159
|
-
export const _NotificationUpsertDto = z.discriminatedUnion('deliveryChannel', [_SlackNotificationUpsertDto, _EmailNotificationUpsertDto]);
|
|
178
|
+
export const _NotificationUpsertDto = z.discriminatedUnion('deliveryChannel', [_SlackNotificationUpsertDto, _EmailNotificationUpsertDto, _TeamsNotificationUpsertDto]);
|
|
160
179
|
export type NotificationUpsertDto = z.infer<typeof _NotificationUpsertDto>;
|
|
161
180
|
|
|
162
181
|
export const _NotificationDto = _NotificationUpsertDto.and(_BaseDto);
|