@ampsec/platform-client 31.1.0 → 32.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.
@@ -1,6 +1,6 @@
1
1
  import { BaseDto, BaseUpsertDto } from './base.dto';
2
2
  import { NotificationStatus } from './enums';
3
- import { NotificationStepData } from './workflow.dto';
3
+ import { NotificationStepData, TrainingNotificationStepData } from './workflow.dto';
4
4
  export type NotificationAddress = {
5
5
  /** Connector ID for the notification channel */
6
6
  cid: string;
@@ -27,7 +27,7 @@ export type NotificationUpsertDto = BaseUpsertDto & {
27
27
  /** Status of the notification */
28
28
  status: NotificationStatus;
29
29
  /** Data to be used for the notification */
30
- data: NotificationStepData;
30
+ data: NotificationStepData | TrainingNotificationStepData;
31
31
  /** Optional user provided notification message */
32
32
  rawContent?: string;
33
33
  };
@@ -29,6 +29,11 @@ export type SaasComponentMeta = {
29
29
  extId?: string;
30
30
  email?: string;
31
31
  };
32
+ _training?: {
33
+ title?: string;
34
+ enrollDate?: string | null;
35
+ startDate?: string | null;
36
+ };
32
37
  [propName: string]: unknown;
33
38
  };
34
39
  export type SaasComponentUpsertDto = ChangeAwareUpsertDto & {
@@ -10,12 +10,12 @@ export type NotificationStepData = {
10
10
  softwareName: string;
11
11
  };
12
12
  export type TrainingNotificationStepData = NotificationStepData & {
13
- /** Name of the training module */
14
- title: string;
15
- /** Description of the training module */
16
- description: string;
17
- /** Due date associated with the training module */
18
- dueDate: string;
13
+ /** Name of the training module to which the notification of finding applies */
14
+ title?: string;
15
+ /** Date on which the user enrolled in the training module */
16
+ enrollDate?: string;
17
+ /** Date on which the user started the training module */
18
+ startDate?: string;
19
19
  };
20
20
  export type PauseStepData = {
21
21
  /** Estimated duration, in minutes, to resolve the finding */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampsec/platform-client",
3
- "version": "31.1.0",
3
+ "version": "32.0.0",
4
4
  "description": "",
5
5
  "main": "build/src/index.js",
6
6
  "runkitExampleFilename": "example/main.js",
@@ -1,6 +1,6 @@
1
1
  import {BaseDto, BaseUpsertDto} from './base.dto';
2
2
  import {NotificationStatus} from './enums';
3
- import {NotificationStepData} from './workflow.dto';
3
+ import {NotificationStepData, TrainingNotificationStepData} from './workflow.dto';
4
4
 
5
5
  export type NotificationAddress = {
6
6
  /** Connector ID for the notification channel */
@@ -29,7 +29,7 @@ export type NotificationUpsertDto = BaseUpsertDto & {
29
29
  /** Status of the notification */
30
30
  status: NotificationStatus;
31
31
  /** Data to be used for the notification */
32
- data: NotificationStepData;
32
+ data: NotificationStepData | TrainingNotificationStepData;
33
33
  /** Optional user provided notification message */
34
34
  rawContent?: string;
35
35
  };
@@ -30,6 +30,11 @@ export type SaasComponentMeta = {
30
30
  extId?: string;
31
31
  email?: string;
32
32
  };
33
+ _training?: {
34
+ title?: string;
35
+ enrollDate?: string | null;
36
+ startDate?: string | null;
37
+ };
33
38
  [propName: string]: unknown;
34
39
  };
35
40
 
@@ -12,12 +12,12 @@ export type NotificationStepData = {
12
12
  };
13
13
 
14
14
  export type TrainingNotificationStepData = NotificationStepData & {
15
- /** Name of the training module */
16
- title: string;
17
- /** Description of the training module */
18
- description: string;
19
- /** Due date associated with the training module */
20
- dueDate: string;
15
+ /** Name of the training module to which the notification of finding applies */
16
+ title?: string;
17
+ /** Date on which the user enrolled in the training module */
18
+ enrollDate?: string;
19
+ /** Date on which the user started the training module */
20
+ startDate?: string;
21
21
  };
22
22
 
23
23
  export type PauseStepData = {