@ampsec/platform-client 58.11.0 → 59.0.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.
Files changed (63) hide show
  1. package/build/src/dto/enums/index.d.ts +0 -6
  2. package/build/src/dto/enums/index.js +0 -6
  3. package/build/src/dto/enums/index.js.map +1 -1
  4. package/build/src/dto/index.d.ts +0 -1
  5. package/build/src/dto/index.js +0 -1
  6. package/build/src/dto/index.js.map +1 -1
  7. package/build/src/dto/notification.dto.d.ts +1168 -153
  8. package/build/src/dto/notification.dto.js +94 -0
  9. package/build/src/dto/notification.dto.js.map +1 -1
  10. package/build/src/dto/platform/index.d.ts +0 -1
  11. package/build/src/dto/platform/index.js +0 -1
  12. package/build/src/dto/platform/index.js.map +1 -1
  13. package/build/src/dto/platform/platform.notification.dto.d.ts +2 -2
  14. package/build/src/services/AmpSdk.d.ts +1 -2
  15. package/build/src/services/AmpSdk.js +0 -1
  16. package/build/src/services/AmpSdk.js.map +1 -1
  17. package/package.json +1 -1
  18. package/src/dto/enums/index.ts +0 -6
  19. package/src/dto/index.ts +0 -1
  20. package/src/dto/notification.dto.ts +127 -175
  21. package/src/dto/platform/index.ts +0 -1
  22. package/src/dto/platform/platform.notification.dto.ts +2 -2
  23. package/src/services/AmpSdk.ts +0 -4
  24. package/build/src/dto/enums/contentStrategy.kind.d.ts +0 -5
  25. package/build/src/dto/enums/contentStrategy.kind.js +0 -10
  26. package/build/src/dto/enums/contentStrategy.kind.js.map +0 -1
  27. package/build/src/dto/enums/deliveryStrategy.kind.d.ts +0 -4
  28. package/build/src/dto/enums/deliveryStrategy.kind.js +0 -9
  29. package/build/src/dto/enums/deliveryStrategy.kind.js.map +0 -1
  30. package/build/src/dto/enums/notification.status.d.ts +0 -6
  31. package/build/src/dto/enums/notification.status.js +0 -11
  32. package/build/src/dto/enums/notification.status.js.map +0 -1
  33. package/build/src/dto/enums/supportedMessageChannelKind.enum.d.ts +0 -5
  34. package/build/src/dto/enums/supportedMessageChannelKind.enum.js +0 -20
  35. package/build/src/dto/enums/supportedMessageChannelKind.enum.js.map +0 -1
  36. package/build/src/dto/enums/workflowStep.kind.d.ts +0 -4
  37. package/build/src/dto/enums/workflowStep.kind.js +0 -9
  38. package/build/src/dto/enums/workflowStep.kind.js.map +0 -1
  39. package/build/src/dto/enums/workflowTrigger.kind.d.ts +0 -5
  40. package/build/src/dto/enums/workflowTrigger.kind.js +0 -10
  41. package/build/src/dto/enums/workflowTrigger.kind.js.map +0 -1
  42. package/build/src/dto/platform/platform.workflow.dto.d.ts +0 -6
  43. package/build/src/dto/platform/platform.workflow.dto.js +0 -3
  44. package/build/src/dto/platform/platform.workflow.dto.js.map +0 -1
  45. package/build/src/dto/platform/platform.workflowAssignment.dto.d.ts +0 -4
  46. package/build/src/dto/platform/platform.workflowAssignment.dto.js +0 -3
  47. package/build/src/dto/platform/platform.workflowAssignment.dto.js.map +0 -1
  48. package/build/src/dto/workflow.dto.d.ts +0 -85
  49. package/build/src/dto/workflow.dto.js +0 -3
  50. package/build/src/dto/workflow.dto.js.map +0 -1
  51. package/build/src/dto/workflowAssignment.dto.d.ts +0 -8
  52. package/build/src/dto/workflowAssignment.dto.js +0 -3
  53. package/build/src/dto/workflowAssignment.dto.js.map +0 -1
  54. package/src/dto/enums/contentStrategy.kind.ts +0 -5
  55. package/src/dto/enums/deliveryStrategy.kind.ts +0 -4
  56. package/src/dto/enums/notification.status.ts +0 -6
  57. package/src/dto/enums/supportedMessageChannelKind.enum.ts +0 -16
  58. package/src/dto/enums/workflowStep.kind.ts +0 -4
  59. package/src/dto/enums/workflowTrigger.kind.ts +0 -5
  60. package/src/dto/platform/platform.workflow.dto.ts +0 -10
  61. package/src/dto/platform/platform.workflowAssignment.dto.ts +0 -6
  62. package/src/dto/workflow.dto.ts +0 -104
  63. package/src/dto/workflowAssignment.dto.ts +0 -10
@@ -1,158 +1,1173 @@
1
- import { BaseDto, BaseUpsertDto } from './base.dto';
2
- import { Category, DeliveryStrategyKind, FindingKind, FindingSeverity, NotificationStatus } from './enums';
3
- import { ContentStrategyKind } from './enums/contentStrategy.kind';
4
- import { FindingOutcome } from './enums/finding.outcome';
5
- import { SupportedMessageChannelKind } from './enums/supportedMessageChannelKind.enum';
6
- export type NotificationAddress = {
7
- /** Connector ID for the notification channel */
8
- cid?: string;
9
- /** Group IDs to which the notification is being sent */
10
- groups?: string[] | number[];
11
- /** User IDs to which the notification is being sent */
12
- users?: string[] | number[];
13
- /** Webhook URLs to which the notification is being sent */
14
- webhooks?: string[];
15
- };
16
- export type MessageNotificationAddress = NotificationAddress & {
17
- /** Channel kind for messaging applications */
18
- kind: SupportedMessageChannelKind;
19
- };
20
- export type SlackNotificationAddress = MessageNotificationAddress & {
21
- teamId: string;
22
- };
23
- export type AssetNotificationContext = {
24
- /** Name of the asset */
25
- deviceName: string;
26
- };
27
- export type CreateNotificationOptions = {
28
- /** Whether to CC the secops team of the notification, likely a tenant setting once implemented */
29
- copySecOpsTeam: boolean;
30
- };
31
- export type CreateNotificationContent = {
32
- /** Kind of the content strategy */
33
- kind: ContentStrategyKind;
34
- /** Content of the notification */
1
+ import { z } from 'zod';
2
+ import { BaseDto } from './base.dto';
3
+ export declare enum NotificationStatus {
4
+ INVALID = "INVALID",
5
+ PENDING = "PENDING",
6
+ READ = "READ",
7
+ SENT = "SENT"
8
+ }
9
+ export declare enum ContentStrategyKind {
10
+ RAW = "RAW",
11
+ TEMPLATE = "TEMPLATE",
12
+ FINDING = "FINDING"
13
+ }
14
+ export declare enum DeliveryStrategyKind {
15
+ EMAIL = "EMAIL",
16
+ /** @deprecated Use SLACK Instead */
17
+ MESSAGING = "MESSAGING",
18
+ SLACK = "SLACK"
19
+ }
20
+ export declare const _NotificationAddress: z.ZodObject<{
21
+ cid: z.ZodOptional<z.ZodString>;
22
+ groups: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">>;
23
+ users: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">>;
24
+ webhooks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
25
+ }, "strip", z.ZodTypeAny, {
26
+ cid?: string | undefined;
27
+ groups?: (string | number)[] | undefined;
28
+ users?: (string | number)[] | undefined;
29
+ webhooks?: string[] | undefined;
30
+ }, {
31
+ cid?: string | undefined;
32
+ groups?: (string | number)[] | undefined;
33
+ users?: (string | number)[] | undefined;
34
+ webhooks?: string[] | undefined;
35
+ }>;
36
+ export declare const _RawContentStrategy: z.ZodObject<{
37
+ kind: z.ZodLiteral<ContentStrategyKind.RAW>;
38
+ content: z.ZodString;
39
+ subject: z.ZodOptional<z.ZodString>;
40
+ context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
41
+ }, "strip", z.ZodTypeAny, {
42
+ kind: ContentStrategyKind.RAW;
35
43
  content: string;
36
- };
37
- export type CreateNotificationDto = BaseUpsertDto & {
38
- /** Channel type that should be used for sending the notificaiton */
39
- channel: DeliveryStrategyKind;
40
- /** Content settings of the notification */
41
- content: CreateNotificationContent;
42
- /** Additional options for the notification */
43
- options?: CreateNotificationOptions;
44
- /** The user id this notification will be sent to, optional as not all findings are associated to a user */
45
- uid?: string;
46
- /** The finding id this notification is in regards to */
47
- fid?: string;
48
- /** ID of the agent from which the notification was sent */
49
- faid?: string | null;
50
- };
51
- export type FindingNotificationContext = {
52
- /** Severity of the finding */
53
- severity: FindingSeverity;
54
- /** Category of the finding */
55
- category: Category;
56
- /** Kind of the finding */
57
- kind: FindingKind;
58
- /** Desired outcome of surfacing the finding */
59
- outcome: FindingOutcome;
60
- };
61
- export type VulnerabilityNotificationContext = {
62
- /** Summary of the vulnerability. */
63
- description: string;
64
- /** Summary of the remediation action. */
65
- solution?: string;
66
- /** CVSS score of the vulnerability. */
67
- cvss?: number;
68
- /** CVE of the vulnerability */
69
- cve?: string;
70
- };
71
- export type TrainingNotificationContext = {
72
- /** Title of the training */
73
- title: string;
74
- /** Date enrolled in the training */
75
- enrollDate: string | null | undefined;
76
- /** Date started the training */
77
- startDate: string | null | undefined;
78
- };
79
- export type UserNotificationContext = {
80
- /** First name of the user */
81
- firstName: string;
82
- /** Last name of the user */
83
- lastName: string;
84
- /** Title of the user */
85
- title: string;
86
- /** Department of the user */
87
- department: string;
88
- };
89
- export type ProviderNotificationContext = {
90
- /** Name of the provider */
91
- softwareName: string;
92
- };
93
- export type NotificationContext = {
94
- /** Estimated completion time for the remediation described by the notification */
95
- estimatedCompletionTime: number;
96
- /** Asset to which the notification refers */
97
- asset?: AssetNotificationContext;
98
- /** Finding that generated the notification */
99
- finding?: FindingNotificationContext;
100
- /** Provider to which the notification is associated */
101
- provider?: ProviderNotificationContext;
102
- /** Training to which the notification refers */
103
- training?: TrainingNotificationContext;
104
- /** User to which the notification is being sent */
105
- user?: UserNotificationContext;
106
- /** Vulnerability to which the notification refers */
107
- vulnerability?: VulnerabilityNotificationContext;
108
- };
109
- export type ContentStrategySpecification = {
110
- /** Kind of the content strategy */
111
- kind: ContentStrategyKind;
112
- };
113
- export type TemplateContentStrategySpec = ContentStrategySpecification & {
114
- /** ID of the template to be used for the notification */
115
- templateId: string;
116
- /** Context for the notification */
117
- context: NotificationContext;
118
- };
119
- export type RawContentStrategySpec = ContentStrategySpecification & {
120
- /** Content of the notification */
44
+ subject?: string | undefined;
45
+ context?: Record<string, string> | undefined;
46
+ }, {
47
+ kind: ContentStrategyKind.RAW;
121
48
  content: string;
122
- };
123
- export type LlmContentStrategySpec = ContentStrategySpecification & {
124
- /** Context for the notification */
125
- context: NotificationContext;
126
- history?: {
127
- role: 'user' | 'system' | 'assistant';
128
- content: string;
129
- }[];
130
- };
131
- export type DeliveryStrategySpec = {
132
- /** Channel type that should be used for sending the notificaiton */
133
- kind: DeliveryStrategyKind;
134
- /** Recipient address to which the notification is being sent */
135
- to: NotificationAddress | SlackNotificationAddress;
136
- };
137
- export type EmailDeliveryStrategySpec = DeliveryStrategySpec & {
49
+ subject?: string | undefined;
50
+ context?: Record<string, string> | undefined;
51
+ }>;
52
+ export type RawContentStrategy = z.infer<typeof _RawContentStrategy>;
53
+ export declare const _TemplateContentStrategy: z.ZodObject<{
54
+ kind: z.ZodLiteral<ContentStrategyKind.TEMPLATE>;
55
+ templateId: z.ZodString;
56
+ context: z.ZodRecord<z.ZodString, z.ZodString>;
57
+ }, "strip", z.ZodTypeAny, {
58
+ kind: ContentStrategyKind.TEMPLATE;
59
+ context: Record<string, string>;
60
+ templateId: string;
61
+ }, {
62
+ kind: ContentStrategyKind.TEMPLATE;
63
+ context: Record<string, string>;
64
+ templateId: string;
65
+ }>;
66
+ export type TemplateContentStrategy = z.infer<typeof _TemplateContentStrategy>;
67
+ export declare const _FindingContentStrategy: z.ZodObject<{
68
+ kind: z.ZodLiteral<ContentStrategyKind.FINDING>;
69
+ fid: z.ZodString;
70
+ }, "strip", z.ZodTypeAny, {
71
+ kind: ContentStrategyKind.FINDING;
72
+ fid: string;
73
+ }, {
74
+ kind: ContentStrategyKind.FINDING;
75
+ fid: string;
76
+ }>;
77
+ export type FindingContentStrategy = z.infer<typeof _FindingContentStrategy>;
78
+ export declare const _SlackDeliveryStrategy: z.ZodObject<{
79
+ copySecOpsTeam: z.ZodOptional<z.ZodBoolean>;
80
+ to: z.ZodObject<{
81
+ cid: z.ZodOptional<z.ZodString>;
82
+ groups: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
83
+ users: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
84
+ webhooks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
85
+ }, "strip", z.ZodTypeAny, {
86
+ cid?: string | undefined;
87
+ groups?: string[] | undefined;
88
+ users?: string[] | undefined;
89
+ webhooks?: string[] | undefined;
90
+ }, {
91
+ cid?: string | undefined;
92
+ groups?: string[] | undefined;
93
+ users?: string[] | undefined;
94
+ webhooks?: string[] | undefined;
95
+ }>;
96
+ teamId: z.ZodString;
97
+ }, "strip", z.ZodTypeAny, {
98
+ to: {
99
+ cid?: string | undefined;
100
+ groups?: string[] | undefined;
101
+ users?: string[] | undefined;
102
+ webhooks?: string[] | undefined;
103
+ };
104
+ teamId: string;
105
+ copySecOpsTeam?: boolean | undefined;
106
+ }, {
107
+ to: {
108
+ cid?: string | undefined;
109
+ groups?: string[] | undefined;
110
+ users?: string[] | undefined;
111
+ webhooks?: string[] | undefined;
112
+ };
113
+ teamId: string;
114
+ copySecOpsTeam?: boolean | undefined;
115
+ }>;
116
+ export type SlackDeliveryStrategy = z.infer<typeof _SlackDeliveryStrategy>;
117
+ export declare const _EmailDeliveryStrategy: z.ZodObject<{
118
+ copySecOpsTeam: z.ZodOptional<z.ZodBoolean>;
119
+ to: z.ZodObject<{
120
+ users: z.ZodArray<z.ZodString, "many">;
121
+ }, "strip", z.ZodTypeAny, {
122
+ users: string[];
123
+ }, {
124
+ users: string[];
125
+ }>;
126
+ subject: z.ZodString;
127
+ }, "strip", z.ZodTypeAny, {
138
128
  subject: string;
139
- };
140
- export type NotificationUpsertDto = BaseUpsertDto & {
141
- /** Workflow ID for which the notification is being created */
142
- wfid?: string | null;
143
- /** Step number in the workflow for which the notification is being created */
144
- stepNumber?: number | null;
145
- /** Status of the notification */
129
+ to: {
130
+ users: string[];
131
+ };
132
+ copySecOpsTeam?: boolean | undefined;
133
+ }, {
134
+ subject: string;
135
+ to: {
136
+ users: string[];
137
+ };
138
+ copySecOpsTeam?: boolean | undefined;
139
+ }>;
140
+ export type EmailDeliveryStrategy = z.infer<typeof _EmailDeliveryStrategy>;
141
+ export declare const _BaseNotificationUpsertDto: z.ZodObject<{
142
+ id: z.ZodOptional<z.ZodString>;
143
+ createdAt: z.ZodOptional<z.ZodString>;
144
+ updatedAt: z.ZodOptional<z.ZodString>;
145
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
146
+ status: z.ZodNativeEnum<typeof NotificationStatus>;
147
+ contentStrategy: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
148
+ kind: z.ZodLiteral<ContentStrategyKind.RAW>;
149
+ content: z.ZodString;
150
+ subject: z.ZodOptional<z.ZodString>;
151
+ context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
152
+ }, "strip", z.ZodTypeAny, {
153
+ kind: ContentStrategyKind.RAW;
154
+ content: string;
155
+ subject?: string | undefined;
156
+ context?: Record<string, string> | undefined;
157
+ }, {
158
+ kind: ContentStrategyKind.RAW;
159
+ content: string;
160
+ subject?: string | undefined;
161
+ context?: Record<string, string> | undefined;
162
+ }>, z.ZodObject<{
163
+ kind: z.ZodLiteral<ContentStrategyKind.FINDING>;
164
+ fid: z.ZodString;
165
+ }, "strip", z.ZodTypeAny, {
166
+ kind: ContentStrategyKind.FINDING;
167
+ fid: string;
168
+ }, {
169
+ kind: ContentStrategyKind.FINDING;
170
+ fid: string;
171
+ }>, z.ZodObject<{
172
+ kind: z.ZodLiteral<ContentStrategyKind.TEMPLATE>;
173
+ templateId: z.ZodString;
174
+ context: z.ZodRecord<z.ZodString, z.ZodString>;
175
+ }, "strip", z.ZodTypeAny, {
176
+ kind: ContentStrategyKind.TEMPLATE;
177
+ context: Record<string, string>;
178
+ templateId: string;
179
+ }, {
180
+ kind: ContentStrategyKind.TEMPLATE;
181
+ context: Record<string, string>;
182
+ templateId: string;
183
+ }>]>;
184
+ fid: z.ZodOptional<z.ZodString>;
185
+ uid: z.ZodOptional<z.ZodString>;
186
+ agentId: z.ZodOptional<z.ZodString>;
187
+ }, "strip", z.ZodTypeAny, {
188
+ status: NotificationStatus;
189
+ contentStrategy: {
190
+ kind: ContentStrategyKind.RAW;
191
+ content: string;
192
+ subject?: string | undefined;
193
+ context?: Record<string, string> | undefined;
194
+ } | {
195
+ kind: ContentStrategyKind.TEMPLATE;
196
+ context: Record<string, string>;
197
+ templateId: string;
198
+ } | {
199
+ kind: ContentStrategyKind.FINDING;
200
+ fid: string;
201
+ };
202
+ id?: string | undefined;
203
+ createdAt?: string | undefined;
204
+ updatedAt?: string | undefined;
205
+ deletedAt?: string | null | undefined;
206
+ fid?: string | undefined;
207
+ uid?: string | undefined;
208
+ agentId?: string | undefined;
209
+ }, {
210
+ status: NotificationStatus;
211
+ contentStrategy: {
212
+ kind: ContentStrategyKind.RAW;
213
+ content: string;
214
+ subject?: string | undefined;
215
+ context?: Record<string, string> | undefined;
216
+ } | {
217
+ kind: ContentStrategyKind.TEMPLATE;
218
+ context: Record<string, string>;
219
+ templateId: string;
220
+ } | {
221
+ kind: ContentStrategyKind.FINDING;
222
+ fid: string;
223
+ };
224
+ id?: string | undefined;
225
+ createdAt?: string | undefined;
226
+ updatedAt?: string | undefined;
227
+ deletedAt?: string | null | undefined;
228
+ fid?: string | undefined;
229
+ uid?: string | undefined;
230
+ agentId?: string | undefined;
231
+ }>;
232
+ export declare const _SlackNotificationUpsertDto: z.ZodObject<{
233
+ status: z.ZodNativeEnum<typeof NotificationStatus>;
234
+ id: z.ZodOptional<z.ZodString>;
235
+ uid: z.ZodOptional<z.ZodString>;
236
+ createdAt: z.ZodOptional<z.ZodString>;
237
+ updatedAt: z.ZodOptional<z.ZodString>;
238
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
239
+ fid: z.ZodOptional<z.ZodString>;
240
+ contentStrategy: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
241
+ kind: z.ZodLiteral<ContentStrategyKind.RAW>;
242
+ content: z.ZodString;
243
+ subject: z.ZodOptional<z.ZodString>;
244
+ context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
245
+ }, "strip", z.ZodTypeAny, {
246
+ kind: ContentStrategyKind.RAW;
247
+ content: string;
248
+ subject?: string | undefined;
249
+ context?: Record<string, string> | undefined;
250
+ }, {
251
+ kind: ContentStrategyKind.RAW;
252
+ content: string;
253
+ subject?: string | undefined;
254
+ context?: Record<string, string> | undefined;
255
+ }>, z.ZodObject<{
256
+ kind: z.ZodLiteral<ContentStrategyKind.FINDING>;
257
+ fid: z.ZodString;
258
+ }, "strip", z.ZodTypeAny, {
259
+ kind: ContentStrategyKind.FINDING;
260
+ fid: string;
261
+ }, {
262
+ kind: ContentStrategyKind.FINDING;
263
+ fid: string;
264
+ }>, z.ZodObject<{
265
+ kind: z.ZodLiteral<ContentStrategyKind.TEMPLATE>;
266
+ templateId: z.ZodString;
267
+ context: z.ZodRecord<z.ZodString, z.ZodString>;
268
+ }, "strip", z.ZodTypeAny, {
269
+ kind: ContentStrategyKind.TEMPLATE;
270
+ context: Record<string, string>;
271
+ templateId: string;
272
+ }, {
273
+ kind: ContentStrategyKind.TEMPLATE;
274
+ context: Record<string, string>;
275
+ templateId: string;
276
+ }>]>;
277
+ agentId: z.ZodOptional<z.ZodString>;
278
+ deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.SLACK>;
279
+ deliveryStrategy: z.ZodObject<{
280
+ copySecOpsTeam: z.ZodOptional<z.ZodBoolean>;
281
+ to: z.ZodObject<{
282
+ cid: z.ZodOptional<z.ZodString>;
283
+ groups: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
284
+ users: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
285
+ webhooks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
286
+ }, "strip", z.ZodTypeAny, {
287
+ cid?: string | undefined;
288
+ groups?: string[] | undefined;
289
+ users?: string[] | undefined;
290
+ webhooks?: string[] | undefined;
291
+ }, {
292
+ cid?: string | undefined;
293
+ groups?: string[] | undefined;
294
+ users?: string[] | undefined;
295
+ webhooks?: string[] | undefined;
296
+ }>;
297
+ teamId: z.ZodString;
298
+ }, "strip", z.ZodTypeAny, {
299
+ to: {
300
+ cid?: string | undefined;
301
+ groups?: string[] | undefined;
302
+ users?: string[] | undefined;
303
+ webhooks?: string[] | undefined;
304
+ };
305
+ teamId: string;
306
+ copySecOpsTeam?: boolean | undefined;
307
+ }, {
308
+ to: {
309
+ cid?: string | undefined;
310
+ groups?: string[] | undefined;
311
+ users?: string[] | undefined;
312
+ webhooks?: string[] | undefined;
313
+ };
314
+ teamId: string;
315
+ copySecOpsTeam?: boolean | undefined;
316
+ }>;
317
+ }, "strip", z.ZodTypeAny, {
318
+ status: NotificationStatus;
319
+ contentStrategy: {
320
+ kind: ContentStrategyKind.RAW;
321
+ content: string;
322
+ subject?: string | undefined;
323
+ context?: Record<string, string> | undefined;
324
+ } | {
325
+ kind: ContentStrategyKind.TEMPLATE;
326
+ context: Record<string, string>;
327
+ templateId: string;
328
+ } | {
329
+ kind: ContentStrategyKind.FINDING;
330
+ fid: string;
331
+ };
332
+ deliveryChannel: DeliveryStrategyKind.SLACK;
333
+ deliveryStrategy: {
334
+ to: {
335
+ cid?: string | undefined;
336
+ groups?: string[] | undefined;
337
+ users?: string[] | undefined;
338
+ webhooks?: string[] | undefined;
339
+ };
340
+ teamId: string;
341
+ copySecOpsTeam?: boolean | undefined;
342
+ };
343
+ id?: string | undefined;
344
+ uid?: string | undefined;
345
+ createdAt?: string | undefined;
346
+ updatedAt?: string | undefined;
347
+ deletedAt?: string | null | undefined;
348
+ fid?: string | undefined;
349
+ agentId?: string | undefined;
350
+ }, {
351
+ status: NotificationStatus;
352
+ contentStrategy: {
353
+ kind: ContentStrategyKind.RAW;
354
+ content: string;
355
+ subject?: string | undefined;
356
+ context?: Record<string, string> | undefined;
357
+ } | {
358
+ kind: ContentStrategyKind.TEMPLATE;
359
+ context: Record<string, string>;
360
+ templateId: string;
361
+ } | {
362
+ kind: ContentStrategyKind.FINDING;
363
+ fid: string;
364
+ };
365
+ deliveryChannel: DeliveryStrategyKind.SLACK;
366
+ deliveryStrategy: {
367
+ to: {
368
+ cid?: string | undefined;
369
+ groups?: string[] | undefined;
370
+ users?: string[] | undefined;
371
+ webhooks?: string[] | undefined;
372
+ };
373
+ teamId: string;
374
+ copySecOpsTeam?: boolean | undefined;
375
+ };
376
+ id?: string | undefined;
377
+ uid?: string | undefined;
378
+ createdAt?: string | undefined;
379
+ updatedAt?: string | undefined;
380
+ deletedAt?: string | null | undefined;
381
+ fid?: string | undefined;
382
+ agentId?: string | undefined;
383
+ }>;
384
+ export type SlackNotificationUpsertDto = z.infer<typeof _SlackNotificationUpsertDto>;
385
+ export declare const _EmailNotificationUpsertDto: z.ZodObject<{
386
+ status: z.ZodNativeEnum<typeof NotificationStatus>;
387
+ id: z.ZodOptional<z.ZodString>;
388
+ uid: z.ZodOptional<z.ZodString>;
389
+ createdAt: z.ZodOptional<z.ZodString>;
390
+ updatedAt: z.ZodOptional<z.ZodString>;
391
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
392
+ fid: z.ZodOptional<z.ZodString>;
393
+ contentStrategy: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
394
+ kind: z.ZodLiteral<ContentStrategyKind.RAW>;
395
+ content: z.ZodString;
396
+ subject: z.ZodOptional<z.ZodString>;
397
+ context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
398
+ }, "strip", z.ZodTypeAny, {
399
+ kind: ContentStrategyKind.RAW;
400
+ content: string;
401
+ subject?: string | undefined;
402
+ context?: Record<string, string> | undefined;
403
+ }, {
404
+ kind: ContentStrategyKind.RAW;
405
+ content: string;
406
+ subject?: string | undefined;
407
+ context?: Record<string, string> | undefined;
408
+ }>, z.ZodObject<{
409
+ kind: z.ZodLiteral<ContentStrategyKind.FINDING>;
410
+ fid: z.ZodString;
411
+ }, "strip", z.ZodTypeAny, {
412
+ kind: ContentStrategyKind.FINDING;
413
+ fid: string;
414
+ }, {
415
+ kind: ContentStrategyKind.FINDING;
416
+ fid: string;
417
+ }>, z.ZodObject<{
418
+ kind: z.ZodLiteral<ContentStrategyKind.TEMPLATE>;
419
+ templateId: z.ZodString;
420
+ context: z.ZodRecord<z.ZodString, z.ZodString>;
421
+ }, "strip", z.ZodTypeAny, {
422
+ kind: ContentStrategyKind.TEMPLATE;
423
+ context: Record<string, string>;
424
+ templateId: string;
425
+ }, {
426
+ kind: ContentStrategyKind.TEMPLATE;
427
+ context: Record<string, string>;
428
+ templateId: string;
429
+ }>]>;
430
+ agentId: z.ZodOptional<z.ZodString>;
431
+ deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.EMAIL>;
432
+ deliveryStrategy: z.ZodObject<{
433
+ copySecOpsTeam: z.ZodOptional<z.ZodBoolean>;
434
+ to: z.ZodObject<{
435
+ users: z.ZodArray<z.ZodString, "many">;
436
+ }, "strip", z.ZodTypeAny, {
437
+ users: string[];
438
+ }, {
439
+ users: string[];
440
+ }>;
441
+ subject: z.ZodString;
442
+ }, "strip", z.ZodTypeAny, {
443
+ subject: string;
444
+ to: {
445
+ users: string[];
446
+ };
447
+ copySecOpsTeam?: boolean | undefined;
448
+ }, {
449
+ subject: string;
450
+ to: {
451
+ users: string[];
452
+ };
453
+ copySecOpsTeam?: boolean | undefined;
454
+ }>;
455
+ }, "strip", z.ZodTypeAny, {
456
+ status: NotificationStatus;
457
+ contentStrategy: {
458
+ kind: ContentStrategyKind.RAW;
459
+ content: string;
460
+ subject?: string | undefined;
461
+ context?: Record<string, string> | undefined;
462
+ } | {
463
+ kind: ContentStrategyKind.TEMPLATE;
464
+ context: Record<string, string>;
465
+ templateId: string;
466
+ } | {
467
+ kind: ContentStrategyKind.FINDING;
468
+ fid: string;
469
+ };
470
+ deliveryChannel: DeliveryStrategyKind.EMAIL;
471
+ deliveryStrategy: {
472
+ subject: string;
473
+ to: {
474
+ users: string[];
475
+ };
476
+ copySecOpsTeam?: boolean | undefined;
477
+ };
478
+ id?: string | undefined;
479
+ uid?: string | undefined;
480
+ createdAt?: string | undefined;
481
+ updatedAt?: string | undefined;
482
+ deletedAt?: string | null | undefined;
483
+ fid?: string | undefined;
484
+ agentId?: string | undefined;
485
+ }, {
486
+ status: NotificationStatus;
487
+ contentStrategy: {
488
+ kind: ContentStrategyKind.RAW;
489
+ content: string;
490
+ subject?: string | undefined;
491
+ context?: Record<string, string> | undefined;
492
+ } | {
493
+ kind: ContentStrategyKind.TEMPLATE;
494
+ context: Record<string, string>;
495
+ templateId: string;
496
+ } | {
497
+ kind: ContentStrategyKind.FINDING;
498
+ fid: string;
499
+ };
500
+ deliveryChannel: DeliveryStrategyKind.EMAIL;
501
+ deliveryStrategy: {
502
+ subject: string;
503
+ to: {
504
+ users: string[];
505
+ };
506
+ copySecOpsTeam?: boolean | undefined;
507
+ };
508
+ id?: string | undefined;
509
+ uid?: string | undefined;
510
+ createdAt?: string | undefined;
511
+ updatedAt?: string | undefined;
512
+ deletedAt?: string | null | undefined;
513
+ fid?: string | undefined;
514
+ agentId?: string | undefined;
515
+ }>;
516
+ export type EmailNotificationUpsertDto = z.infer<typeof _EmailNotificationUpsertDto>;
517
+ export declare const _NotificationUpsertDto: z.ZodDiscriminatedUnion<"deliveryChannel", [z.ZodObject<{
518
+ status: z.ZodNativeEnum<typeof NotificationStatus>;
519
+ id: z.ZodOptional<z.ZodString>;
520
+ uid: z.ZodOptional<z.ZodString>;
521
+ createdAt: z.ZodOptional<z.ZodString>;
522
+ updatedAt: z.ZodOptional<z.ZodString>;
523
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
524
+ fid: z.ZodOptional<z.ZodString>;
525
+ contentStrategy: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
526
+ kind: z.ZodLiteral<ContentStrategyKind.RAW>;
527
+ content: z.ZodString;
528
+ subject: z.ZodOptional<z.ZodString>;
529
+ context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
530
+ }, "strip", z.ZodTypeAny, {
531
+ kind: ContentStrategyKind.RAW;
532
+ content: string;
533
+ subject?: string | undefined;
534
+ context?: Record<string, string> | undefined;
535
+ }, {
536
+ kind: ContentStrategyKind.RAW;
537
+ content: string;
538
+ subject?: string | undefined;
539
+ context?: Record<string, string> | undefined;
540
+ }>, z.ZodObject<{
541
+ kind: z.ZodLiteral<ContentStrategyKind.FINDING>;
542
+ fid: z.ZodString;
543
+ }, "strip", z.ZodTypeAny, {
544
+ kind: ContentStrategyKind.FINDING;
545
+ fid: string;
546
+ }, {
547
+ kind: ContentStrategyKind.FINDING;
548
+ fid: string;
549
+ }>, z.ZodObject<{
550
+ kind: z.ZodLiteral<ContentStrategyKind.TEMPLATE>;
551
+ templateId: z.ZodString;
552
+ context: z.ZodRecord<z.ZodString, z.ZodString>;
553
+ }, "strip", z.ZodTypeAny, {
554
+ kind: ContentStrategyKind.TEMPLATE;
555
+ context: Record<string, string>;
556
+ templateId: string;
557
+ }, {
558
+ kind: ContentStrategyKind.TEMPLATE;
559
+ context: Record<string, string>;
560
+ templateId: string;
561
+ }>]>;
562
+ agentId: z.ZodOptional<z.ZodString>;
563
+ deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.SLACK>;
564
+ deliveryStrategy: z.ZodObject<{
565
+ copySecOpsTeam: z.ZodOptional<z.ZodBoolean>;
566
+ to: z.ZodObject<{
567
+ cid: z.ZodOptional<z.ZodString>;
568
+ groups: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
569
+ users: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
570
+ webhooks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
571
+ }, "strip", z.ZodTypeAny, {
572
+ cid?: string | undefined;
573
+ groups?: string[] | undefined;
574
+ users?: string[] | undefined;
575
+ webhooks?: string[] | undefined;
576
+ }, {
577
+ cid?: string | undefined;
578
+ groups?: string[] | undefined;
579
+ users?: string[] | undefined;
580
+ webhooks?: string[] | undefined;
581
+ }>;
582
+ teamId: z.ZodString;
583
+ }, "strip", z.ZodTypeAny, {
584
+ to: {
585
+ cid?: string | undefined;
586
+ groups?: string[] | undefined;
587
+ users?: string[] | undefined;
588
+ webhooks?: string[] | undefined;
589
+ };
590
+ teamId: string;
591
+ copySecOpsTeam?: boolean | undefined;
592
+ }, {
593
+ to: {
594
+ cid?: string | undefined;
595
+ groups?: string[] | undefined;
596
+ users?: string[] | undefined;
597
+ webhooks?: string[] | undefined;
598
+ };
599
+ teamId: string;
600
+ copySecOpsTeam?: boolean | undefined;
601
+ }>;
602
+ }, "strip", z.ZodTypeAny, {
146
603
  status: NotificationStatus;
147
- /** Data to be used for the notification */
148
- contentStrategy: TemplateContentStrategySpec | RawContentStrategySpec | LlmContentStrategySpec;
149
- /** Method of delivery */
150
- deliveryStrategy: DeliveryStrategySpec;
151
- /** Finding ID for which the notification is being created */
152
- fid?: string | null;
153
- /** ID of the user to which the notification is being sent */
154
- uid?: string | null;
155
- /** ID of the agent from which the notification was sent */
156
- faid?: string | null;
157
- };
604
+ contentStrategy: {
605
+ kind: ContentStrategyKind.RAW;
606
+ content: string;
607
+ subject?: string | undefined;
608
+ context?: Record<string, string> | undefined;
609
+ } | {
610
+ kind: ContentStrategyKind.TEMPLATE;
611
+ context: Record<string, string>;
612
+ templateId: string;
613
+ } | {
614
+ kind: ContentStrategyKind.FINDING;
615
+ fid: string;
616
+ };
617
+ deliveryChannel: DeliveryStrategyKind.SLACK;
618
+ deliveryStrategy: {
619
+ to: {
620
+ cid?: string | undefined;
621
+ groups?: string[] | undefined;
622
+ users?: string[] | undefined;
623
+ webhooks?: string[] | undefined;
624
+ };
625
+ teamId: string;
626
+ copySecOpsTeam?: boolean | undefined;
627
+ };
628
+ id?: string | undefined;
629
+ uid?: string | undefined;
630
+ createdAt?: string | undefined;
631
+ updatedAt?: string | undefined;
632
+ deletedAt?: string | null | undefined;
633
+ fid?: string | undefined;
634
+ agentId?: string | undefined;
635
+ }, {
636
+ status: NotificationStatus;
637
+ contentStrategy: {
638
+ kind: ContentStrategyKind.RAW;
639
+ content: string;
640
+ subject?: string | undefined;
641
+ context?: Record<string, string> | undefined;
642
+ } | {
643
+ kind: ContentStrategyKind.TEMPLATE;
644
+ context: Record<string, string>;
645
+ templateId: string;
646
+ } | {
647
+ kind: ContentStrategyKind.FINDING;
648
+ fid: string;
649
+ };
650
+ deliveryChannel: DeliveryStrategyKind.SLACK;
651
+ deliveryStrategy: {
652
+ to: {
653
+ cid?: string | undefined;
654
+ groups?: string[] | undefined;
655
+ users?: string[] | undefined;
656
+ webhooks?: string[] | undefined;
657
+ };
658
+ teamId: string;
659
+ copySecOpsTeam?: boolean | undefined;
660
+ };
661
+ id?: string | undefined;
662
+ uid?: string | undefined;
663
+ createdAt?: string | undefined;
664
+ updatedAt?: string | undefined;
665
+ deletedAt?: string | null | undefined;
666
+ fid?: string | undefined;
667
+ agentId?: string | undefined;
668
+ }>, z.ZodObject<{
669
+ status: z.ZodNativeEnum<typeof NotificationStatus>;
670
+ id: z.ZodOptional<z.ZodString>;
671
+ uid: z.ZodOptional<z.ZodString>;
672
+ createdAt: z.ZodOptional<z.ZodString>;
673
+ updatedAt: z.ZodOptional<z.ZodString>;
674
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
675
+ fid: z.ZodOptional<z.ZodString>;
676
+ contentStrategy: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
677
+ kind: z.ZodLiteral<ContentStrategyKind.RAW>;
678
+ content: z.ZodString;
679
+ subject: z.ZodOptional<z.ZodString>;
680
+ context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
681
+ }, "strip", z.ZodTypeAny, {
682
+ kind: ContentStrategyKind.RAW;
683
+ content: string;
684
+ subject?: string | undefined;
685
+ context?: Record<string, string> | undefined;
686
+ }, {
687
+ kind: ContentStrategyKind.RAW;
688
+ content: string;
689
+ subject?: string | undefined;
690
+ context?: Record<string, string> | undefined;
691
+ }>, z.ZodObject<{
692
+ kind: z.ZodLiteral<ContentStrategyKind.FINDING>;
693
+ fid: z.ZodString;
694
+ }, "strip", z.ZodTypeAny, {
695
+ kind: ContentStrategyKind.FINDING;
696
+ fid: string;
697
+ }, {
698
+ kind: ContentStrategyKind.FINDING;
699
+ fid: string;
700
+ }>, z.ZodObject<{
701
+ kind: z.ZodLiteral<ContentStrategyKind.TEMPLATE>;
702
+ templateId: z.ZodString;
703
+ context: z.ZodRecord<z.ZodString, z.ZodString>;
704
+ }, "strip", z.ZodTypeAny, {
705
+ kind: ContentStrategyKind.TEMPLATE;
706
+ context: Record<string, string>;
707
+ templateId: string;
708
+ }, {
709
+ kind: ContentStrategyKind.TEMPLATE;
710
+ context: Record<string, string>;
711
+ templateId: string;
712
+ }>]>;
713
+ agentId: z.ZodOptional<z.ZodString>;
714
+ deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.EMAIL>;
715
+ deliveryStrategy: z.ZodObject<{
716
+ copySecOpsTeam: z.ZodOptional<z.ZodBoolean>;
717
+ to: z.ZodObject<{
718
+ users: z.ZodArray<z.ZodString, "many">;
719
+ }, "strip", z.ZodTypeAny, {
720
+ users: string[];
721
+ }, {
722
+ users: string[];
723
+ }>;
724
+ subject: z.ZodString;
725
+ }, "strip", z.ZodTypeAny, {
726
+ subject: string;
727
+ to: {
728
+ users: string[];
729
+ };
730
+ copySecOpsTeam?: boolean | undefined;
731
+ }, {
732
+ subject: string;
733
+ to: {
734
+ users: string[];
735
+ };
736
+ copySecOpsTeam?: boolean | undefined;
737
+ }>;
738
+ }, "strip", z.ZodTypeAny, {
739
+ status: NotificationStatus;
740
+ contentStrategy: {
741
+ kind: ContentStrategyKind.RAW;
742
+ content: string;
743
+ subject?: string | undefined;
744
+ context?: Record<string, string> | undefined;
745
+ } | {
746
+ kind: ContentStrategyKind.TEMPLATE;
747
+ context: Record<string, string>;
748
+ templateId: string;
749
+ } | {
750
+ kind: ContentStrategyKind.FINDING;
751
+ fid: string;
752
+ };
753
+ deliveryChannel: DeliveryStrategyKind.EMAIL;
754
+ deliveryStrategy: {
755
+ subject: string;
756
+ to: {
757
+ users: string[];
758
+ };
759
+ copySecOpsTeam?: boolean | undefined;
760
+ };
761
+ id?: string | undefined;
762
+ uid?: string | undefined;
763
+ createdAt?: string | undefined;
764
+ updatedAt?: string | undefined;
765
+ deletedAt?: string | null | undefined;
766
+ fid?: string | undefined;
767
+ agentId?: string | undefined;
768
+ }, {
769
+ status: NotificationStatus;
770
+ contentStrategy: {
771
+ kind: ContentStrategyKind.RAW;
772
+ content: string;
773
+ subject?: string | undefined;
774
+ context?: Record<string, string> | undefined;
775
+ } | {
776
+ kind: ContentStrategyKind.TEMPLATE;
777
+ context: Record<string, string>;
778
+ templateId: string;
779
+ } | {
780
+ kind: ContentStrategyKind.FINDING;
781
+ fid: string;
782
+ };
783
+ deliveryChannel: DeliveryStrategyKind.EMAIL;
784
+ deliveryStrategy: {
785
+ subject: string;
786
+ to: {
787
+ users: string[];
788
+ };
789
+ copySecOpsTeam?: boolean | undefined;
790
+ };
791
+ id?: string | undefined;
792
+ uid?: string | undefined;
793
+ createdAt?: string | undefined;
794
+ updatedAt?: string | undefined;
795
+ deletedAt?: string | null | undefined;
796
+ fid?: string | undefined;
797
+ agentId?: string | undefined;
798
+ }>]>;
799
+ export type NotificationUpsertDto = z.infer<typeof _NotificationUpsertDto>;
800
+ export declare const _NotificationDto: z.ZodIntersection<z.ZodDiscriminatedUnion<"deliveryChannel", [z.ZodObject<{
801
+ status: z.ZodNativeEnum<typeof NotificationStatus>;
802
+ id: z.ZodOptional<z.ZodString>;
803
+ uid: z.ZodOptional<z.ZodString>;
804
+ createdAt: z.ZodOptional<z.ZodString>;
805
+ updatedAt: z.ZodOptional<z.ZodString>;
806
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
807
+ fid: z.ZodOptional<z.ZodString>;
808
+ contentStrategy: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
809
+ kind: z.ZodLiteral<ContentStrategyKind.RAW>;
810
+ content: z.ZodString;
811
+ subject: z.ZodOptional<z.ZodString>;
812
+ context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
813
+ }, "strip", z.ZodTypeAny, {
814
+ kind: ContentStrategyKind.RAW;
815
+ content: string;
816
+ subject?: string | undefined;
817
+ context?: Record<string, string> | undefined;
818
+ }, {
819
+ kind: ContentStrategyKind.RAW;
820
+ content: string;
821
+ subject?: string | undefined;
822
+ context?: Record<string, string> | undefined;
823
+ }>, z.ZodObject<{
824
+ kind: z.ZodLiteral<ContentStrategyKind.FINDING>;
825
+ fid: z.ZodString;
826
+ }, "strip", z.ZodTypeAny, {
827
+ kind: ContentStrategyKind.FINDING;
828
+ fid: string;
829
+ }, {
830
+ kind: ContentStrategyKind.FINDING;
831
+ fid: string;
832
+ }>, z.ZodObject<{
833
+ kind: z.ZodLiteral<ContentStrategyKind.TEMPLATE>;
834
+ templateId: z.ZodString;
835
+ context: z.ZodRecord<z.ZodString, z.ZodString>;
836
+ }, "strip", z.ZodTypeAny, {
837
+ kind: ContentStrategyKind.TEMPLATE;
838
+ context: Record<string, string>;
839
+ templateId: string;
840
+ }, {
841
+ kind: ContentStrategyKind.TEMPLATE;
842
+ context: Record<string, string>;
843
+ templateId: string;
844
+ }>]>;
845
+ agentId: z.ZodOptional<z.ZodString>;
846
+ deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.SLACK>;
847
+ deliveryStrategy: z.ZodObject<{
848
+ copySecOpsTeam: z.ZodOptional<z.ZodBoolean>;
849
+ to: z.ZodObject<{
850
+ cid: z.ZodOptional<z.ZodString>;
851
+ groups: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
852
+ users: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
853
+ webhooks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
854
+ }, "strip", z.ZodTypeAny, {
855
+ cid?: string | undefined;
856
+ groups?: string[] | undefined;
857
+ users?: string[] | undefined;
858
+ webhooks?: string[] | undefined;
859
+ }, {
860
+ cid?: string | undefined;
861
+ groups?: string[] | undefined;
862
+ users?: string[] | undefined;
863
+ webhooks?: string[] | undefined;
864
+ }>;
865
+ teamId: z.ZodString;
866
+ }, "strip", z.ZodTypeAny, {
867
+ to: {
868
+ cid?: string | undefined;
869
+ groups?: string[] | undefined;
870
+ users?: string[] | undefined;
871
+ webhooks?: string[] | undefined;
872
+ };
873
+ teamId: string;
874
+ copySecOpsTeam?: boolean | undefined;
875
+ }, {
876
+ to: {
877
+ cid?: string | undefined;
878
+ groups?: string[] | undefined;
879
+ users?: string[] | undefined;
880
+ webhooks?: string[] | undefined;
881
+ };
882
+ teamId: string;
883
+ copySecOpsTeam?: boolean | undefined;
884
+ }>;
885
+ }, "strip", z.ZodTypeAny, {
886
+ status: NotificationStatus;
887
+ contentStrategy: {
888
+ kind: ContentStrategyKind.RAW;
889
+ content: string;
890
+ subject?: string | undefined;
891
+ context?: Record<string, string> | undefined;
892
+ } | {
893
+ kind: ContentStrategyKind.TEMPLATE;
894
+ context: Record<string, string>;
895
+ templateId: string;
896
+ } | {
897
+ kind: ContentStrategyKind.FINDING;
898
+ fid: string;
899
+ };
900
+ deliveryChannel: DeliveryStrategyKind.SLACK;
901
+ deliveryStrategy: {
902
+ to: {
903
+ cid?: string | undefined;
904
+ groups?: string[] | undefined;
905
+ users?: string[] | undefined;
906
+ webhooks?: string[] | undefined;
907
+ };
908
+ teamId: string;
909
+ copySecOpsTeam?: boolean | undefined;
910
+ };
911
+ id?: string | undefined;
912
+ uid?: string | undefined;
913
+ createdAt?: string | undefined;
914
+ updatedAt?: string | undefined;
915
+ deletedAt?: string | null | undefined;
916
+ fid?: string | undefined;
917
+ agentId?: string | undefined;
918
+ }, {
919
+ status: NotificationStatus;
920
+ contentStrategy: {
921
+ kind: ContentStrategyKind.RAW;
922
+ content: string;
923
+ subject?: string | undefined;
924
+ context?: Record<string, string> | undefined;
925
+ } | {
926
+ kind: ContentStrategyKind.TEMPLATE;
927
+ context: Record<string, string>;
928
+ templateId: string;
929
+ } | {
930
+ kind: ContentStrategyKind.FINDING;
931
+ fid: string;
932
+ };
933
+ deliveryChannel: DeliveryStrategyKind.SLACK;
934
+ deliveryStrategy: {
935
+ to: {
936
+ cid?: string | undefined;
937
+ groups?: string[] | undefined;
938
+ users?: string[] | undefined;
939
+ webhooks?: string[] | undefined;
940
+ };
941
+ teamId: string;
942
+ copySecOpsTeam?: boolean | undefined;
943
+ };
944
+ id?: string | undefined;
945
+ uid?: string | undefined;
946
+ createdAt?: string | undefined;
947
+ updatedAt?: string | undefined;
948
+ deletedAt?: string | null | undefined;
949
+ fid?: string | undefined;
950
+ agentId?: string | undefined;
951
+ }>, z.ZodObject<{
952
+ status: z.ZodNativeEnum<typeof NotificationStatus>;
953
+ id: z.ZodOptional<z.ZodString>;
954
+ uid: z.ZodOptional<z.ZodString>;
955
+ createdAt: z.ZodOptional<z.ZodString>;
956
+ updatedAt: z.ZodOptional<z.ZodString>;
957
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
958
+ fid: z.ZodOptional<z.ZodString>;
959
+ contentStrategy: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
960
+ kind: z.ZodLiteral<ContentStrategyKind.RAW>;
961
+ content: z.ZodString;
962
+ subject: z.ZodOptional<z.ZodString>;
963
+ context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
964
+ }, "strip", z.ZodTypeAny, {
965
+ kind: ContentStrategyKind.RAW;
966
+ content: string;
967
+ subject?: string | undefined;
968
+ context?: Record<string, string> | undefined;
969
+ }, {
970
+ kind: ContentStrategyKind.RAW;
971
+ content: string;
972
+ subject?: string | undefined;
973
+ context?: Record<string, string> | undefined;
974
+ }>, z.ZodObject<{
975
+ kind: z.ZodLiteral<ContentStrategyKind.FINDING>;
976
+ fid: z.ZodString;
977
+ }, "strip", z.ZodTypeAny, {
978
+ kind: ContentStrategyKind.FINDING;
979
+ fid: string;
980
+ }, {
981
+ kind: ContentStrategyKind.FINDING;
982
+ fid: string;
983
+ }>, z.ZodObject<{
984
+ kind: z.ZodLiteral<ContentStrategyKind.TEMPLATE>;
985
+ templateId: z.ZodString;
986
+ context: z.ZodRecord<z.ZodString, z.ZodString>;
987
+ }, "strip", z.ZodTypeAny, {
988
+ kind: ContentStrategyKind.TEMPLATE;
989
+ context: Record<string, string>;
990
+ templateId: string;
991
+ }, {
992
+ kind: ContentStrategyKind.TEMPLATE;
993
+ context: Record<string, string>;
994
+ templateId: string;
995
+ }>]>;
996
+ agentId: z.ZodOptional<z.ZodString>;
997
+ deliveryChannel: z.ZodLiteral<DeliveryStrategyKind.EMAIL>;
998
+ deliveryStrategy: z.ZodObject<{
999
+ copySecOpsTeam: z.ZodOptional<z.ZodBoolean>;
1000
+ to: z.ZodObject<{
1001
+ users: z.ZodArray<z.ZodString, "many">;
1002
+ }, "strip", z.ZodTypeAny, {
1003
+ users: string[];
1004
+ }, {
1005
+ users: string[];
1006
+ }>;
1007
+ subject: z.ZodString;
1008
+ }, "strip", z.ZodTypeAny, {
1009
+ subject: string;
1010
+ to: {
1011
+ users: string[];
1012
+ };
1013
+ copySecOpsTeam?: boolean | undefined;
1014
+ }, {
1015
+ subject: string;
1016
+ to: {
1017
+ users: string[];
1018
+ };
1019
+ copySecOpsTeam?: boolean | undefined;
1020
+ }>;
1021
+ }, "strip", z.ZodTypeAny, {
1022
+ status: NotificationStatus;
1023
+ contentStrategy: {
1024
+ kind: ContentStrategyKind.RAW;
1025
+ content: string;
1026
+ subject?: string | undefined;
1027
+ context?: Record<string, string> | undefined;
1028
+ } | {
1029
+ kind: ContentStrategyKind.TEMPLATE;
1030
+ context: Record<string, string>;
1031
+ templateId: string;
1032
+ } | {
1033
+ kind: ContentStrategyKind.FINDING;
1034
+ fid: string;
1035
+ };
1036
+ deliveryChannel: DeliveryStrategyKind.EMAIL;
1037
+ deliveryStrategy: {
1038
+ subject: string;
1039
+ to: {
1040
+ users: string[];
1041
+ };
1042
+ copySecOpsTeam?: boolean | undefined;
1043
+ };
1044
+ id?: string | undefined;
1045
+ uid?: string | undefined;
1046
+ createdAt?: string | undefined;
1047
+ updatedAt?: string | undefined;
1048
+ deletedAt?: string | null | undefined;
1049
+ fid?: string | undefined;
1050
+ agentId?: string | undefined;
1051
+ }, {
1052
+ status: NotificationStatus;
1053
+ contentStrategy: {
1054
+ kind: ContentStrategyKind.RAW;
1055
+ content: string;
1056
+ subject?: string | undefined;
1057
+ context?: Record<string, string> | undefined;
1058
+ } | {
1059
+ kind: ContentStrategyKind.TEMPLATE;
1060
+ context: Record<string, string>;
1061
+ templateId: string;
1062
+ } | {
1063
+ kind: ContentStrategyKind.FINDING;
1064
+ fid: string;
1065
+ };
1066
+ deliveryChannel: DeliveryStrategyKind.EMAIL;
1067
+ deliveryStrategy: {
1068
+ subject: string;
1069
+ to: {
1070
+ users: string[];
1071
+ };
1072
+ copySecOpsTeam?: boolean | undefined;
1073
+ };
1074
+ id?: string | undefined;
1075
+ uid?: string | undefined;
1076
+ createdAt?: string | undefined;
1077
+ updatedAt?: string | undefined;
1078
+ deletedAt?: string | null | undefined;
1079
+ fid?: string | undefined;
1080
+ agentId?: string | undefined;
1081
+ }>]>, z.ZodObject<{
1082
+ id: z.ZodString;
1083
+ createdAt: z.ZodString;
1084
+ updatedAt: z.ZodString;
1085
+ deletedAt: z.ZodNullable<z.ZodString>;
1086
+ }, "strip", z.ZodTypeAny, {
1087
+ id: string;
1088
+ createdAt: string;
1089
+ updatedAt: string;
1090
+ deletedAt: string | null;
1091
+ }, {
1092
+ id: string;
1093
+ createdAt: string;
1094
+ updatedAt: string;
1095
+ deletedAt: string | null;
1096
+ }>>;
158
1097
  export type NotificationDto = NotificationUpsertDto & BaseDto;
1098
+ export declare const _CreateNotificationDto: z.ZodObject<{
1099
+ id: z.ZodOptional<z.ZodString>;
1100
+ createdAt: z.ZodOptional<z.ZodString>;
1101
+ updatedAt: z.ZodOptional<z.ZodString>;
1102
+ deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1103
+ test: z.ZodOptional<z.ZodBoolean>;
1104
+ channel: z.ZodNativeEnum<typeof DeliveryStrategyKind>;
1105
+ content: z.ZodObject<{
1106
+ kind: z.ZodLiteral<ContentStrategyKind.RAW>;
1107
+ content: z.ZodString;
1108
+ subject: z.ZodOptional<z.ZodString>;
1109
+ context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1110
+ }, "strip", z.ZodTypeAny, {
1111
+ kind: ContentStrategyKind.RAW;
1112
+ content: string;
1113
+ subject?: string | undefined;
1114
+ context?: Record<string, string> | undefined;
1115
+ }, {
1116
+ kind: ContentStrategyKind.RAW;
1117
+ content: string;
1118
+ subject?: string | undefined;
1119
+ context?: Record<string, string> | undefined;
1120
+ }>;
1121
+ options: z.ZodObject<{
1122
+ copySecOpsTeam: z.ZodOptional<z.ZodBoolean>;
1123
+ }, "strip", z.ZodTypeAny, {
1124
+ copySecOpsTeam?: boolean | undefined;
1125
+ }, {
1126
+ copySecOpsTeam?: boolean | undefined;
1127
+ }>;
1128
+ uid: z.ZodOptional<z.ZodString>;
1129
+ fid: z.ZodOptional<z.ZodString>;
1130
+ faid: z.ZodOptional<z.ZodString>;
1131
+ agentId: z.ZodOptional<z.ZodString>;
1132
+ }, "strip", z.ZodTypeAny, {
1133
+ options: {
1134
+ copySecOpsTeam?: boolean | undefined;
1135
+ };
1136
+ content: {
1137
+ kind: ContentStrategyKind.RAW;
1138
+ content: string;
1139
+ subject?: string | undefined;
1140
+ context?: Record<string, string> | undefined;
1141
+ };
1142
+ channel: DeliveryStrategyKind;
1143
+ id?: string | undefined;
1144
+ createdAt?: string | undefined;
1145
+ updatedAt?: string | undefined;
1146
+ deletedAt?: string | null | undefined;
1147
+ test?: boolean | undefined;
1148
+ uid?: string | undefined;
1149
+ fid?: string | undefined;
1150
+ faid?: string | undefined;
1151
+ agentId?: string | undefined;
1152
+ }, {
1153
+ options: {
1154
+ copySecOpsTeam?: boolean | undefined;
1155
+ };
1156
+ content: {
1157
+ kind: ContentStrategyKind.RAW;
1158
+ content: string;
1159
+ subject?: string | undefined;
1160
+ context?: Record<string, string> | undefined;
1161
+ };
1162
+ channel: DeliveryStrategyKind;
1163
+ id?: string | undefined;
1164
+ createdAt?: string | undefined;
1165
+ updatedAt?: string | undefined;
1166
+ deletedAt?: string | null | undefined;
1167
+ test?: boolean | undefined;
1168
+ uid?: string | undefined;
1169
+ fid?: string | undefined;
1170
+ faid?: string | undefined;
1171
+ agentId?: string | undefined;
1172
+ }>;
1173
+ export type CreateNotificationDto = z.infer<typeof _CreateNotificationDto>;