@ampsec/platform-client 41.0.0 → 43.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,4 +1,4 @@
1
1
  export declare enum DeliveryStrategyKind {
2
2
  EMAIL = "EMAIL",
3
- SLACK = "SLACK"
3
+ MESSAGING = "MESSAGING"
4
4
  }
@@ -5,6 +5,6 @@ exports.DeliveryStrategyKind = void 0;
5
5
  var DeliveryStrategyKind;
6
6
  (function (DeliveryStrategyKind) {
7
7
  DeliveryStrategyKind["EMAIL"] = "EMAIL";
8
- DeliveryStrategyKind["SLACK"] = "SLACK";
8
+ DeliveryStrategyKind["MESSAGING"] = "MESSAGING";
9
9
  })(DeliveryStrategyKind || (exports.DeliveryStrategyKind = DeliveryStrategyKind = {}));
10
10
  //# sourceMappingURL=deliveryStrategy.kind.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deliveryStrategy.kind.js","sourceRoot":"","sources":["../../../../src/dto/enums/deliveryStrategy.kind.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,uCAAe,CAAA;IACf,uCAAe,CAAA;AACjB,CAAC,EAHW,oBAAoB,oCAApB,oBAAoB,QAG/B"}
1
+ {"version":3,"file":"deliveryStrategy.kind.js","sourceRoot":"","sources":["../../../../src/dto/enums/deliveryStrategy.kind.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,uCAAe,CAAA;IACf,+CAAuB,CAAA;AACzB,CAAC,EAHW,oBAAoB,oCAApB,oBAAoB,QAG/B"}
@@ -1,8 +1,3 @@
1
1
  export declare enum RequiredDataProperty {
2
- DEVICE_NAME = "DEVICE_NAME",
3
- DURATION = "DURATION",
4
- ENROLL_DATE = "ENROLL_DATE",
5
- SOFTWARE_NAME = "SOFTWARE_NAME",
6
- START_DATE = "START_DATE",
7
- TITLE = "TITLE"
2
+ DURATION = "DURATION"
8
3
  }
@@ -4,11 +4,6 @@ exports.RequiredDataProperty = void 0;
4
4
  /* eslint-disable no-unused-vars */
5
5
  var RequiredDataProperty;
6
6
  (function (RequiredDataProperty) {
7
- RequiredDataProperty["DEVICE_NAME"] = "DEVICE_NAME";
8
7
  RequiredDataProperty["DURATION"] = "DURATION";
9
- RequiredDataProperty["ENROLL_DATE"] = "ENROLL_DATE";
10
- RequiredDataProperty["SOFTWARE_NAME"] = "SOFTWARE_NAME";
11
- RequiredDataProperty["START_DATE"] = "START_DATE";
12
- RequiredDataProperty["TITLE"] = "TITLE";
13
8
  })(RequiredDataProperty || (exports.RequiredDataProperty = RequiredDataProperty = {}));
14
9
  //# sourceMappingURL=requiredDataProperty.enum.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"requiredDataProperty.enum.js","sourceRoot":"","sources":["../../../../src/dto/enums/requiredDataProperty.enum.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,IAAY,oBAOX;AAPD,WAAY,oBAAoB;IAC9B,mDAA2B,CAAA;IAC3B,6CAAqB,CAAA;IACrB,mDAA2B,CAAA;IAC3B,uDAA+B,CAAA;IAC/B,iDAAyB,CAAA;IACzB,uCAAe,CAAA;AACjB,CAAC,EAPW,oBAAoB,oCAApB,oBAAoB,QAO/B"}
1
+ {"version":3,"file":"requiredDataProperty.enum.js","sourceRoot":"","sources":["../../../../src/dto/enums/requiredDataProperty.enum.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,IAAY,oBAEX;AAFD,WAAY,oBAAoB;IAC9B,6CAAqB,CAAA;AACvB,CAAC,EAFW,oBAAoB,oCAApB,oBAAoB,QAE/B"}
@@ -11,6 +11,10 @@ export type NotificationAddress = {
11
11
  /** Webhook URLs to which the notification is being sent */
12
12
  webhooks?: string[];
13
13
  };
14
+ export type AssetNotificationContext = {
15
+ /** Name of the asset */
16
+ deviceName: string;
17
+ };
14
18
  export type FindingNotificationContext = {
15
19
  /** Severity of the finding */
16
20
  severity: FindingSeverity;
@@ -19,6 +23,14 @@ export type FindingNotificationContext = {
19
23
  /** Kind of the finding */
20
24
  kind: FindingKind;
21
25
  };
26
+ export type TrainingNotificationContext = {
27
+ /** Title of the training */
28
+ title: string;
29
+ /** Date enrolled in the training */
30
+ enrollDate: string | null | undefined;
31
+ /** Date started the training */
32
+ startDate: string | null | undefined;
33
+ };
22
34
  export type UserNotificationContext = {
23
35
  /** First name of the user */
24
36
  firstName: string;
@@ -31,13 +43,15 @@ export type UserNotificationContext = {
31
43
  };
32
44
  export type ProviderNotificationContext = {
33
45
  /** Name of the provider */
34
- displayValue: string;
35
- /** Categories to which the provider applies */
36
- categories: string[];
46
+ softwareName: string;
37
47
  };
38
48
  export type NotificationContext = {
49
+ /** Estimated completion time for the remediation described by the notification */
50
+ estimatedCompletionTime: number;
51
+ asset?: AssetNotificationContext;
39
52
  finding?: FindingNotificationContext;
40
53
  provider?: ProviderNotificationContext;
54
+ training?: TrainingNotificationContext;
41
55
  user?: UserNotificationContext;
42
56
  };
43
57
  export type ContentStrategySpecification = {
@@ -1,6 +1,5 @@
1
1
  import { BaseDto } from './base.dto';
2
2
  import { ContentStrategyKind, DeliveryStrategyKind } from './enums';
3
- import { RequiredDataProperty } from './enums/requiredDataProperty.enum';
4
3
  import { WorkflowStepKind } from './enums/workflowStep.kind';
5
4
  import { WorkflowTriggerKind } from './enums/workflowTrigger.kind';
6
5
  export type WorflowStepDescriptor = {
@@ -14,8 +13,6 @@ export type WorflowStepDescriptor = {
14
13
  export type NotificationStepDescriptor = WorflowStepDescriptor & {
15
14
  /** Delivery strategy to be used for the notification */
16
15
  deliveryStrategyKinds: DeliveryStrategyKind[];
17
- /** Required data properties for the notification */
18
- requiredData: RequiredDataProperty[];
19
16
  };
20
17
  export type PauseStepDescriptor = WorflowStepDescriptor & {
21
18
  /** Duration, in days, to wait before executing the next step in the workflow */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampsec/platform-client",
3
- "version": "41.0.0",
3
+ "version": "43.0.0",
4
4
  "description": "",
5
5
  "main": "build/src/index.js",
6
6
  "runkitExampleFilename": "example/main.js",
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable no-unused-vars */
2
2
  export enum DeliveryStrategyKind {
3
3
  EMAIL = 'EMAIL',
4
- SLACK = 'SLACK',
4
+ MESSAGING = 'MESSAGING',
5
5
  }
@@ -1,9 +1,4 @@
1
1
  /* eslint-disable no-unused-vars */
2
2
  export enum RequiredDataProperty {
3
- DEVICE_NAME = 'DEVICE_NAME',
4
3
  DURATION = 'DURATION',
5
- ENROLL_DATE = 'ENROLL_DATE',
6
- SOFTWARE_NAME = 'SOFTWARE_NAME',
7
- START_DATE = 'START_DATE',
8
- TITLE = 'TITLE',
9
4
  }
@@ -13,6 +13,11 @@ export type NotificationAddress = {
13
13
  webhooks?: string[];
14
14
  };
15
15
 
16
+ export type AssetNotificationContext = {
17
+ /** Name of the asset */
18
+ deviceName: string;
19
+ };
20
+
16
21
  export type FindingNotificationContext = {
17
22
  /** Severity of the finding */
18
23
  severity: FindingSeverity;
@@ -22,6 +27,15 @@ export type FindingNotificationContext = {
22
27
  kind: FindingKind;
23
28
  };
24
29
 
30
+ export type TrainingNotificationContext = {
31
+ /** Title of the training */
32
+ title: string;
33
+ /** Date enrolled in the training */
34
+ enrollDate: string | null | undefined;
35
+ /** Date started the training */
36
+ startDate: string | null | undefined;
37
+ };
38
+
25
39
  export type UserNotificationContext = {
26
40
  /** First name of the user */
27
41
  firstName: string;
@@ -35,16 +49,18 @@ export type UserNotificationContext = {
35
49
 
36
50
  export type ProviderNotificationContext = {
37
51
  /** Name of the provider */
38
- displayValue: string;
39
- /** Categories to which the provider applies */
40
- categories: string[];
52
+ softwareName: string;
41
53
  };
42
54
 
43
55
  export type NotificationContext = {
44
56
  // TODO: determine what this should be
45
57
  // component?: ComponentNotificationContext;
58
+ /** Estimated completion time for the remediation described by the notification */
59
+ estimatedCompletionTime: number;
60
+ asset?: AssetNotificationContext;
46
61
  finding?: FindingNotificationContext;
47
62
  provider?: ProviderNotificationContext;
63
+ training?: TrainingNotificationContext;
48
64
  user?: UserNotificationContext;
49
65
  };
50
66
 
@@ -1,6 +1,5 @@
1
1
  import {BaseDto} from './base.dto';
2
2
  import {ContentStrategyKind, DeliveryStrategyKind} from './enums';
3
- import {RequiredDataProperty} from './enums/requiredDataProperty.enum';
4
3
  import {WorkflowStepKind} from './enums/workflowStep.kind';
5
4
  import {WorkflowTriggerKind} from './enums/workflowTrigger.kind';
6
5
 
@@ -16,8 +15,6 @@ export type WorflowStepDescriptor = {
16
15
  export type NotificationStepDescriptor = WorflowStepDescriptor & {
17
16
  /** Delivery strategy to be used for the notification */
18
17
  deliveryStrategyKinds: DeliveryStrategyKind[];
19
- /** Required data properties for the notification */
20
- requiredData: RequiredDataProperty[];
21
18
  };
22
19
 
23
20
  export type PauseStepDescriptor = WorflowStepDescriptor & {