@ampsec/platform-client 26.0.0 → 27.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 (35) hide show
  1. package/build/src/dto/enums/index.d.ts +2 -0
  2. package/build/src/dto/enums/index.js +2 -0
  3. package/build/src/dto/enums/index.js.map +1 -1
  4. package/build/src/dto/enums/{notificationStep.type.d.ts → workflowStep.type.d.ts} +1 -1
  5. package/build/src/dto/enums/workflowStep.type.js +10 -0
  6. package/build/src/dto/enums/workflowStep.type.js.map +1 -0
  7. package/build/src/dto/findings.dto.d.ts +1 -1
  8. package/build/src/dto/notification.dto.d.ts +5 -2
  9. package/build/src/dto/platform/index.d.ts +2 -0
  10. package/build/src/dto/platform/index.js +2 -0
  11. package/build/src/dto/platform/index.js.map +1 -1
  12. package/build/src/dto/platform/platform.workflow.dto.d.ts +3 -1
  13. package/build/src/dto/workflow.dto.d.ts +3 -3
  14. package/build/src/services/AmpApi.d.ts +2 -1
  15. package/build/src/services/AmpApi.js +1 -0
  16. package/build/src/services/AmpApi.js.map +1 -1
  17. package/build/src/services/AmpSdk.d.ts +3 -1
  18. package/build/src/services/AmpSdk.js +2 -0
  19. package/build/src/services/AmpSdk.js.map +1 -1
  20. package/build/src/services/constants.d.ts +2 -0
  21. package/build/src/services/constants.js +2 -0
  22. package/build/src/services/constants.js.map +1 -1
  23. package/package.json +1 -1
  24. package/src/dto/enums/index.ts +2 -0
  25. package/src/dto/enums/{notificationStep.type.ts → workflowStep.type.ts} +1 -1
  26. package/src/dto/findings.dto.ts +1 -1
  27. package/src/dto/notification.dto.ts +5 -2
  28. package/src/dto/platform/index.ts +2 -0
  29. package/src/dto/platform/platform.workflow.dto.ts +5 -1
  30. package/src/dto/workflow.dto.ts +3 -3
  31. package/src/services/AmpApi.ts +3 -0
  32. package/src/services/AmpSdk.ts +8 -0
  33. package/src/services/constants.ts +2 -0
  34. package/build/src/dto/enums/notificationStep.type.js +0 -10
  35. package/build/src/dto/enums/notificationStep.type.js.map +0 -1
@@ -6,5 +6,7 @@ export * from './findingKind';
6
6
  export * from './finding.severity';
7
7
  export * from './finding.status';
8
8
  export * from './jobExecution.status';
9
+ export * from './notification.status';
9
10
  export * from './riskContributor.type';
10
11
  export * from './saasComponentKind';
12
+ export * from './workflowStep.type';
@@ -22,6 +22,8 @@ __exportStar(require("./findingKind"), exports);
22
22
  __exportStar(require("./finding.severity"), exports);
23
23
  __exportStar(require("./finding.status"), exports);
24
24
  __exportStar(require("./jobExecution.status"), exports);
25
+ __exportStar(require("./notification.status"), exports);
25
26
  __exportStar(require("./riskContributor.type"), exports);
26
27
  __exportStar(require("./saasComponentKind"), exports);
28
+ __exportStar(require("./workflowStep.type"), exports);
27
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,iDAA+B;AAC/B,6CAA2B;AAC3B,qDAAmC;AACnC,gDAA8B;AAC9B,qDAAmC;AACnC,mDAAiC;AACjC,wDAAsC;AACtC,yDAAuC;AACvC,sDAAoC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,iDAA+B;AAC/B,6CAA2B;AAC3B,qDAAmC;AACnC,gDAA8B;AAC9B,qDAAmC;AACnC,mDAAiC;AACjC,wDAAsC;AACtC,wDAAsC;AACtC,yDAAuC;AACvC,sDAAoC;AACpC,sDAAoC"}
@@ -1,4 +1,4 @@
1
- export declare enum NotificationStepType {
1
+ export declare enum WorkflowStepType {
2
2
  NOTIFICATION = "NOTIFICATION",
3
3
  PAUSE = "PAUSE"
4
4
  }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WorkflowStepType = void 0;
4
+ /* eslint-disable no-unused-vars */
5
+ var WorkflowStepType;
6
+ (function (WorkflowStepType) {
7
+ WorkflowStepType["NOTIFICATION"] = "NOTIFICATION";
8
+ WorkflowStepType["PAUSE"] = "PAUSE";
9
+ })(WorkflowStepType || (exports.WorkflowStepType = WorkflowStepType = {}));
10
+ //# sourceMappingURL=workflowStep.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflowStep.type.js","sourceRoot":"","sources":["../../../../src/dto/enums/workflowStep.type.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,iDAA6B,CAAA;IAC7B,mCAAe,CAAA;AACjB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B"}
@@ -34,7 +34,7 @@ export type FindingUpsertDto = BaseUpsertDto & {
34
34
  * "Resets" notifications schedule after pause or failed verification.
35
35
  * Defaults to "NOW".
36
36
  */
37
- startNotificationsAt?: string;
37
+ nextNotificationAfter?: string;
38
38
  /** Number of times this finding was marked PENDING_VERIFIED. Defaults to `0` */
39
39
  verificationCount?: number;
40
40
  };
@@ -1,4 +1,5 @@
1
- import { BaseDto } from './base.dto';
1
+ import { BaseDto, BaseUpsertDto } from './base.dto';
2
+ import { NotificationStatus } from './enums';
2
3
  export type NotificationAddress = {
3
4
  /** Connector ID for the notification channel */
4
5
  cid: string;
@@ -9,7 +10,7 @@ export type NotificationAddress = {
9
10
  /** Webhook URLs to which the notification is being sent */
10
11
  webhooks?: string[];
11
12
  };
12
- export type NotificationUpsertDto = {
13
+ export type NotificationUpsertDto = BaseUpsertDto & {
13
14
  /** Workflow ID for which the notification is being created */
14
15
  wfid: string;
15
16
  /** Finding ID for which the notification is being created */
@@ -22,5 +23,7 @@ export type NotificationUpsertDto = {
22
23
  uid: string;
23
24
  /** Step number in the workflow for which the notification is being created */
24
25
  stepNumber: number;
26
+ /** Status of the notification */
27
+ status: NotificationStatus;
25
28
  };
26
29
  export type NotificationDto = NotificationUpsertDto & BaseDto;
@@ -4,6 +4,7 @@ export * from './platform.connectors.dto';
4
4
  export * from './platform.findings.dto';
5
5
  export * from './platform.jobExecutionState.dto';
6
6
  export * from './platform.jobSpec.dto';
7
+ export * from './platform.notification.dto';
7
8
  export * from './platform.providers.dto';
8
9
  export * from './platform.reportResults.dto';
9
10
  export * from './platform.riskContributor.dto';
@@ -14,3 +15,4 @@ export * from './platform.ampSetting.dto';
14
15
  export * from './platform.tenants.dto';
15
16
  export * from './platform.users.dto';
16
17
  export * from './tenant.based.dto';
18
+ export * from './platform.workflow.dto';
@@ -20,6 +20,7 @@ __exportStar(require("./platform.connectors.dto"), exports);
20
20
  __exportStar(require("./platform.findings.dto"), exports);
21
21
  __exportStar(require("./platform.jobExecutionState.dto"), exports);
22
22
  __exportStar(require("./platform.jobSpec.dto"), exports);
23
+ __exportStar(require("./platform.notification.dto"), exports);
23
24
  __exportStar(require("./platform.providers.dto"), exports);
24
25
  __exportStar(require("./platform.reportResults.dto"), exports);
25
26
  __exportStar(require("./platform.riskContributor.dto"), exports);
@@ -30,4 +31,5 @@ __exportStar(require("./platform.ampSetting.dto"), exports);
30
31
  __exportStar(require("./platform.tenants.dto"), exports);
31
32
  __exportStar(require("./platform.users.dto"), exports);
32
33
  __exportStar(require("./tenant.based.dto"), exports);
34
+ __exportStar(require("./platform.workflow.dto"), exports);
33
35
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/platform/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,wDAAsC;AACtC,4DAA0C;AAC1C,0DAAwC;AACxC,mEAAiD;AACjD,yDAAuC;AACvC,2DAAyC;AACzC,+DAA6C;AAC7C,iEAA+C;AAC/C,4DAA0C;AAC1C,gEAA8C;AAC9C,2DAAyC;AACzC,4DAA0C;AAC1C,yDAAuC;AACvC,uDAAqC;AACrC,qDAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/dto/platform/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,wDAAsC;AACtC,4DAA0C;AAC1C,0DAAwC;AACxC,mEAAiD;AACjD,yDAAuC;AACvC,8DAA4C;AAC5C,2DAAyC;AACzC,+DAA6C;AAC7C,iEAA+C;AAC/C,4DAA0C;AAC1C,gEAA8C;AAC9C,2DAAyC;AACzC,4DAA0C;AAC1C,yDAAuC;AACvC,uDAAqC;AACrC,qDAAmC;AACnC,0DAAwC"}
@@ -1,4 +1,6 @@
1
- import { WorkflowDto, WorkflowUpsertDto } from '../workflow.dto';
1
+ import { WorkflowDto, WorkflowProgressDto, WorkflowProgressUpsertDto, WorkflowUpsertDto } from '../workflow.dto';
2
2
  import { TenantBased } from './tenant.based.dto';
3
3
  export type PlatformWorkflowUpsertDto = WorkflowUpsertDto & TenantBased;
4
4
  export type PlatformWorkflowDto = WorkflowDto & TenantBased;
5
+ export type PlatformWorkflowProgressUpsertDto = WorkflowProgressUpsertDto & TenantBased;
6
+ export type PlatformWorkflowProgressDto = WorkflowProgressDto & TenantBased;
@@ -1,5 +1,5 @@
1
1
  import { BaseDto } from './base.dto';
2
- import { NotificationStepType } from './enums/notificationStep.type';
2
+ import { WorkflowStepType } from './enums/workflowStep.type';
3
3
  import { WorkflowTriggerType } from './enums/workflowTrigger.type';
4
4
  export type NotificationStepData = {
5
5
  /** Name of the device to which the notification of finding applies */
@@ -19,7 +19,7 @@ export type WorkflowStep = {
19
19
  /** Number of the step in the workflow */
20
20
  stepNumber: number;
21
21
  /** Type of the notification step, either NOTIFICATION or PAUSE */
22
- type: NotificationStepType;
22
+ type: WorkflowStepType;
23
23
  /** ID of the template to be used for the notification */
24
24
  templateId?: string;
25
25
  /** Data associated with the notification step */
@@ -61,7 +61,7 @@ export type WorkflowProgressUpsertDto = {
61
61
  /** Step number to transition the workflow to next */
62
62
  nextStep: number;
63
63
  /** ID of the user for which the workflow is being executed */
64
- uid: string | null;
64
+ uid: string;
65
65
  /** whether or not this instance of the workflow has been completed */
66
66
  workflowCompleted: boolean;
67
67
  };
@@ -1,4 +1,4 @@
1
- import { AgentDto, AgentUpsertDto, AssetDto, ConnectorDto, ConnectorUpsertDto, FindingDto, ProviderDto, ReportResultDto, SaasAssetDto, SaasComponentDto, SaasUserDto, TenantDto, TenantUpsertDto, UserDto } from '../dto';
1
+ import { AgentDto, AgentUpsertDto, AssetDto, ConnectorDto, ConnectorUpsertDto, FindingDto, NotificationDto, ProviderDto, ReportResultDto, SaasAssetDto, SaasComponentDto, SaasUserDto, TenantDto, TenantUpsertDto, UserDto } from '../dto';
2
2
  import { AmpEntityService } from './entity.service';
3
3
  import { AmpDataService } from './data.service';
4
4
  import { AmpRestClientOptions, RestClient } from './rest';
@@ -24,6 +24,7 @@ export declare class AmpApi {
24
24
  readonly connectors: AmpEntityService<ConnectorUpsertDto, ConnectorDto>;
25
25
  readonly enums: EnumService;
26
26
  readonly findings: AmpDataService<FindingDto>;
27
+ readonly notifications: AmpDataService<NotificationDto>;
27
28
  readonly providers: AmpDataService<ProviderDto>;
28
29
  readonly reportResults: AmpDataService<ReportResultDto>;
29
30
  readonly reports: AmpReportService;
@@ -27,6 +27,7 @@ class AmpApi {
27
27
  this.connectors = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.CONNECTORS);
28
28
  this.enums = new EnumService_1.DefaultEnumService(rest);
29
29
  this.findings = new data_service_1.AmpDataServiceImpl(rest, constants_1.KIND.FINDINGS);
30
+ this.notifications = new data_service_1.AmpDataServiceImpl(rest, constants_1.KIND.NOTIFICATIONS);
30
31
  this.providers = new data_service_1.AmpDataServiceImpl(rest, constants_1.KIND.PROVIDERS);
31
32
  this.reportResults = new data_service_1.AmpDataServiceImpl(rest, constants_1.KIND.REPORT_RESULTS);
32
33
  this.reports = new reports_service_1.AmpReportServiceImpl(rest);
@@ -1 +1 @@
1
- {"version":3,"file":"AmpApi.js","sourceRoot":"","sources":["../../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S,GAAG,IAAI,iCAAkB,CAAc,IAAI,EAAE,gBAAI,CAAC,SAAS,CAAC,CAAC;QAC3E,IAAI,CAAC,aAAa,GAAG,IAAI,iCAAkB,CAAkB,IAAI,EAAE,gBAAI,CAAC,cAAc,CAAC,CAAC;QACxF,IAAI,CAAC,OAAO,GAAG,IAAI,sCAAoB,CAAC,IAAI,CAAC,CAAC;QAC9C,IAAI,CAAC,UAAU,GAAG,IAAI,iCAAkB,CAAe,IAAI,EAAE,gBAAI,CAAC,WAAW,CAAC,CAAC;QAC/E,IAAI,CAAC,cAAc,GAAG,IAAI,iCAAkB,CAAmB,IAAI,EAAE,gBAAI,CAAC,eAAe,CAAC,CAAC;QAC3F,IAAI,CAAC,SAAS,GAAG,IAAI,iCAAkB,CAAc,IAAI,EAAE,gBAAI,CAAC,UAAU,CAAC,CAAC;QAC5E,IAAI,CAAC,QAAQ,GAAG,IAAI,qCAAkB,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,OAAO,GAAG,IAAI,qCAAoB,CAA6B,IAAI,EAAE,gBAAI,CAAC,OAAO,CAAC,CAAC;QACxF,IAAI,CAAC,KAAK,GAAG,IAAI,iCAAkB,CAAU,IAAI,EAAE,gBAAI,CAAC,KAAK,CAAC,CAAC;IACjE,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,OAAsB;QACpC,MAAM,IAAI,GAAG,IAAA,uBAAgB,EAAC,OAAO,CAAC,CAAC;QACvC,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CACF;AAvCD,wBAuCC"}
@@ -1,4 +1,4 @@
1
- import { PlatformAgentDto, PlatformAgentUpsertDto, PlatformAssetDto, PlatformAssetUpsertDto, PlatformConnectorDto, PlatformConnectorUpsertDto, PlatformFindingDto, PlatformFindingUpsertDto, PlatformProviderUpsertDto, PlatformReportResultDto, PlatformReportResultUpsertDto, PlatformRiskContributorDto, PlatformRiskContributorUpsertDto, PlatformSaasAssetDto, PlatformSaasAssetUpsertDto, PlatformSaasComponentDto, PlatformSaasComponentUpsertDto, PlatformSaasUserDto, PlatformSaasUserUpsertDto, PlatformUserDto, PlatformUserUpsertDto, ProviderDto, TenantDto, TenantUpsertDto } from '../dto';
1
+ import { PlatformAgentDto, PlatformAgentUpsertDto, PlatformAssetDto, PlatformAssetUpsertDto, PlatformConnectorDto, PlatformConnectorUpsertDto, PlatformFindingDto, PlatformFindingUpsertDto, PlatformNotificationDto, PlatformNotificationUpsertDto, PlatformProviderUpsertDto, PlatformReportResultDto, PlatformReportResultUpsertDto, PlatformRiskContributorDto, PlatformRiskContributorUpsertDto, PlatformSaasAssetDto, PlatformSaasAssetUpsertDto, PlatformSaasComponentDto, PlatformSaasComponentUpsertDto, PlatformSaasUserDto, PlatformSaasUserUpsertDto, PlatformUserDto, PlatformUserUpsertDto, PlatformWorkflowProgressDto, PlatformWorkflowProgressUpsertDto, ProviderDto, TenantDto, TenantUpsertDto } from '../dto';
2
2
  import { AmpEntityService, AmpGlobalEntityService, AmpSaaSEntityService, AmpSdkTenantService } from './entity.service';
3
3
  import { AmpRestClientOptions, RestClient } from './rest';
4
4
  import { PlatformJobSpecDto, PlatformJobSpecUpsertDto } from '../dto/platform/platform.jobSpec.dto';
@@ -23,6 +23,7 @@ export declare class AmpSdkServices {
23
23
  readonly findings: AmpSaaSEntityService<PlatformFindingUpsertDto, PlatformFindingDto>;
24
24
  readonly jobExecutions: AmpEntityService<PlatformJobExecutionStateUpsertDto, PlatformJobExecutionStateDto>;
25
25
  readonly jobs: AmpEntityService<PlatformJobSpecUpsertDto, PlatformJobSpecDto>;
26
+ readonly notifications: AmpEntityService<PlatformNotificationUpsertDto, PlatformNotificationDto>;
26
27
  readonly providers: AmpEntityService<PlatformProviderUpsertDto, ProviderDto>;
27
28
  readonly reportResults: AmpSaaSEntityService<PlatformReportResultUpsertDto, PlatformReportResultDto>;
28
29
  readonly riskContributors: AmpSaaSEntityService<PlatformRiskContributorUpsertDto, PlatformRiskContributorDto>;
@@ -32,6 +33,7 @@ export declare class AmpSdkServices {
32
33
  readonly settings: AmpSettingsService;
33
34
  readonly tenants: AmpSdkTenantService<TenantUpsertDto, TenantDto>;
34
35
  readonly users: AmpGlobalEntityService<PlatformUserUpsertDto, PlatformUserDto>;
36
+ readonly workflowsProgress: AmpEntityService<PlatformWorkflowProgressUpsertDto, PlatformWorkflowProgressDto>;
35
37
  constructor(rest: RestClient);
36
38
  static instance(options: AmpSdkOptions): AmpSdkServices;
37
39
  }
@@ -24,6 +24,7 @@ class AmpSdkServices {
24
24
  this.findings = new entity_service_1.AmpSaaSEntityServiceImpl(rest, constants_1.KIND.FINDINGS, constants_1.TARGET_API_PLATFORM);
25
25
  this.jobExecutions = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.JOB_EXECUTIONS, constants_1.TARGET_API_PLATFORM);
26
26
  this.jobs = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.JOB_SPEC, constants_1.TARGET_API_PLATFORM);
27
+ this.notifications = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.NOTIFICATIONS, constants_1.TARGET_API_PLATFORM);
27
28
  this.providers = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.PROVIDERS, constants_1.TARGET_API_PLATFORM);
28
29
  this.reportResults = new entity_service_1.AmpSaaSEntityServiceImpl(rest, constants_1.KIND.REPORT_RESULTS, constants_1.TARGET_API_PLATFORM);
29
30
  this.riskContributors = new entity_service_1.AmpSaaSEntityServiceImpl(rest, constants_1.KIND.RISK_CONTRIBUTORS, constants_1.TARGET_API_PLATFORM);
@@ -33,6 +34,7 @@ class AmpSdkServices {
33
34
  this.settings = new settings_service_1.AmpSettingsService(rest, constants_1.TARGET_API_PLATFORM);
34
35
  this.tenants = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.TENANTS, constants_1.TARGET_API_PLATFORM);
35
36
  this.users = new entity_service_1.AmpGlobalEntityServiceImpl(rest, constants_1.KIND.USERS, constants_1.TARGET_API_PLATFORM);
37
+ this.workflowsProgress = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.WORKFLOW_PROGRESS, constants_1.TARGET_API_PLATFORM);
36
38
  }
37
39
  static instance(options) {
38
40
  const rest = (0, rest_1.getAmpRestClient)(options);
@@ -1 +1 @@
1
- {"version":3,"file":"AmpSdk.js","sourceRoot":"","sources":["../../../src/services/AmpSdk.ts"],"names":[],"mappings":";;;AA0BA,qDAQ0B;AAC1B,iCAA0E;AAC1E,2CAAsD;AAGtD,oDAAmE;AACnE,yDAAsD;AAItD;;;;;;;;GAQG;AACH,MAAa,cAAc;IAkBzB,YAAY,IAAgB;QAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,qCAAoB,CAA2C,IAAI,EAAE,gBAAI,CAAC,MAAM,EAAE,+BAAmB,CAAC,CAAC;QACzH,IAAI,CAAC,KAAK,GAAG,IAAI,2CAA0B,CAA2C,IAAI,EAAE,gBAAI,CAAC,MAAM,EAAE,+BAAmB,CAAC,CAAC;QAC9H,IAAI,CAAC,UAAU,GAAG,IAAI,qCAAoB,CAAmD,IAAI,EAAE,gBAAI,CAAC,UAAU,EAAE,+BAAmB,CAAC,CAAC;QACzI,IAAI,CAAC,KAAK,GAAG,IAAI,gCAAkB,CAAC,IAAI,EAAE,+BAAmB,CAAC,CAAC;QAC/D,IAAI,CAAC,QAAQ,GAAG,IAAI,yCAAwB,CAA+C,IAAI,EAAE,gBAAI,CAAC,QAAQ,EAAE,+BAAmB,CAAC,CAAC;QACrI,IAAI,CAAC,aAAa,GAAG,IAAI,qCAAoB,CAAmE,IAAI,EAAE,gBAAI,CAAC,cAAc,EAAE,+BAAmB,CAAC,CAAC;QAChK,IAAI,CAAC,IAAI,GAAG,IAAI,qCAAoB,CAA+C,IAAI,EAAE,gBAAI,CAAC,QAAQ,EAAE,+BAAmB,CAAC,CAAC;QAC7H,IAAI,CAAC,SAAS,GAAG,IAAI,qCAAoB,CAAyC,IAAI,EAAE,gBAAI,CAAC,SA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C,iBAAiB,EAAE,+BAAmB,CAAC,CAAC;QACtK,IAAI,CAAC,UAAU,GAAG,IAAI,yCAAwB,CAAmD,IAAI,EAAE,gBAAI,CAAC,WAAW,EAAE,+BAAmB,CAAC,CAAC;QAC9I,IAAI,CAAC,cAAc,GAAG,IAAI,yCAAwB,CAA2D,IAAI,EAAE,gBAAI,CAAC,eAAe,EAAE,+BAAmB,CAAC,CAAC;QAC9J,IAAI,CAAC,SAAS,GAAG,IAAI,yCAAwB,CAAiD,IAAI,EAAE,gBAAI,CAAC,UAAU,EAAE,+BAAmB,CAAC,CAAC;QAC1I,IAAI,CAAC,QAAQ,GAAG,IAAI,qCAAkB,CAAC,IAAI,EAAE,+BAAmB,CAAC,CAAC;QAClE,IAAI,CAAC,OAAO,GAAG,IAAI,qCAAoB,CAA6B,IAAI,EAAE,gBAAI,CAAC,OAAO,EAAE,+BAAmB,CAAC,CAAC;QAC7G,IAAI,CAAC,KAAK,GAAG,IAAI,2CAA0B,CAAyC,IAAI,EAAE,gBAAI,CAAC,KAAK,EAAE,+BAAmB,CAAC,CAAC;QAC3H,IAAI,CAAC,iBAAiB,GAAG,IAAI,qCAAoB,CAAiE,IAAI,EAAE,gBAAI,CAAC,iBAAiB,EAAE,+BAAmB,CAAC,CAAC;IACvK,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,OAAsB;QACpC,MAAM,IAAI,GAAG,IAAA,uBAAgB,EAAC,OAAO,CAAC,CAAC;QACvC,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;CACF;AA7CD,wCA6CC"}
@@ -15,6 +15,7 @@ export declare const KIND: {
15
15
  FINDINGS: string;
16
16
  JOB_EXECUTIONS: string;
17
17
  JOB_SPEC: string;
18
+ NOTIFICATIONS: string;
18
19
  PROVIDERS: string;
19
20
  REPORT_RESULTS: string;
20
21
  RISK_CONTRIBUTORS: string;
@@ -23,6 +24,7 @@ export declare const KIND: {
23
24
  SAAS_USERS: string;
24
25
  TENANTS: string;
25
26
  USERS: string;
27
+ WORKFLOW_PROGRESS: string;
26
28
  };
27
29
  export declare const REPORTS: {
28
30
  HEALTH_SCORE: string;
@@ -14,6 +14,7 @@ exports.KIND = {
14
14
  FINDINGS: 'findings',
15
15
  JOB_EXECUTIONS: 'job_executions',
16
16
  JOB_SPEC: 'jobs',
17
+ NOTIFICATIONS: 'notifications',
17
18
  PROVIDERS: 'providers',
18
19
  REPORT_RESULTS: 'report_results',
19
20
  RISK_CONTRIBUTORS: 'risk_contributors',
@@ -22,6 +23,7 @@ exports.KIND = {
22
23
  SAAS_USERS: 'saas_users',
23
24
  TENANTS: 'tenants',
24
25
  USERS: 'users',
26
+ WORKFLOW_PROGRESS: 'workflows_progress',
25
27
  };
26
28
  exports.REPORTS = {
27
29
  HEALTH_SCORE: 'health-score',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/services/constants.ts"],"names":[],"mappings":";;;AAIa,QAAA,2BAA2B,GAAG,CAAC,CAAC;AAGhC,QAAA,mBAAmB,GAAc,UAAU,CAAC;AAC5C,QAAA,gBAAgB,GAAc,KAAK,CAAC;AAEpC,QAAA,IAAI,GAAG;IAClB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,YAAY;IACxB,gBAAgB,EAAE,aAAa;IAC/B,kBAAkB,EAAE,eAAe;IACnC,WAAW,EAAE,QAAQ;IACrB,QAAQ,EAAE,UAAU;IACpB,cAAc,EAAE,gBAAgB;IAChC,QAAQ,EAAE,MAAM;IAChB,SAAS,EAAE,WAAW;IACtB,cAAc,EAAE,gBAAgB;IAChC,iBAAiB,EAAE,mBAAmB;IACtC,WAAW,EAAE,aAAa;IAC1B,eAAe,EAAE,iBAAiB;IAClC,UAAU,EAAE,YAAY;IACxB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;CACf,CAAC;AAEW,QAAA,OAAO,GAAG;IACrB,YAAY,EAAE,cAAc;IAC5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B,EAAE,uBAAuB;IAC9C,2BAA2B,EAAE,6BAA6B;IAC1D,YAAY,EAAE,0BAA0B;IACxC,qBAAqB,EAAE,uBAAuB;IAC9C,gBAAgB,EAAE,kBAAkB;IACpC,WAAW,EAAE,aAAa;IAC1B,mBAAmB;IACnB,kBAAkB,EAAE,sBAAsB;CAC3C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampsec/platform-client",
3
- "version": "26.0.0",
3
+ "version": "27.0.0",
4
4
  "description": "",
5
5
  "main": "build/src/index.js",
6
6
  "runkitExampleFilename": "example/main.js",
@@ -6,5 +6,7 @@ export * from './findingKind';
6
6
  export * from './finding.severity';
7
7
  export * from './finding.status';
8
8
  export * from './jobExecution.status';
9
+ export * from './notification.status';
9
10
  export * from './riskContributor.type';
10
11
  export * from './saasComponentKind';
12
+ export * from './workflowStep.type';
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable no-unused-vars */
2
- export enum NotificationStepType {
2
+ export enum WorkflowStepType {
3
3
  NOTIFICATION = 'NOTIFICATION',
4
4
  PAUSE = 'PAUSE',
5
5
  }
@@ -35,7 +35,7 @@ export type FindingUpsertDto = BaseUpsertDto & {
35
35
  * "Resets" notifications schedule after pause or failed verification.
36
36
  * Defaults to "NOW".
37
37
  */
38
- startNotificationsAt?: string;
38
+ nextNotificationAfter?: string;
39
39
  /** Number of times this finding was marked PENDING_VERIFIED. Defaults to `0` */
40
40
  verificationCount?: number;
41
41
  };
@@ -1,4 +1,5 @@
1
- import {BaseDto} from './base.dto';
1
+ import {BaseDto, BaseUpsertDto} from './base.dto';
2
+ import {NotificationStatus} from './enums';
2
3
 
3
4
  export type NotificationAddress = {
4
5
  /** Connector ID for the notification channel */
@@ -11,7 +12,7 @@ export type NotificationAddress = {
11
12
  webhooks?: string[];
12
13
  };
13
14
 
14
- export type NotificationUpsertDto = {
15
+ export type NotificationUpsertDto = BaseUpsertDto & {
15
16
  /** Workflow ID for which the notification is being created */
16
17
  wfid: string;
17
18
  /** Finding ID for which the notification is being created */
@@ -24,6 +25,8 @@ export type NotificationUpsertDto = {
24
25
  uid: string;
25
26
  /** Step number in the workflow for which the notification is being created */
26
27
  stepNumber: number;
28
+ /** Status of the notification */
29
+ status: NotificationStatus;
27
30
  };
28
31
 
29
32
  export type NotificationDto = NotificationUpsertDto & BaseDto;
@@ -4,6 +4,7 @@ export * from './platform.connectors.dto';
4
4
  export * from './platform.findings.dto';
5
5
  export * from './platform.jobExecutionState.dto';
6
6
  export * from './platform.jobSpec.dto';
7
+ export * from './platform.notification.dto';
7
8
  export * from './platform.providers.dto';
8
9
  export * from './platform.reportResults.dto';
9
10
  export * from './platform.riskContributor.dto';
@@ -14,3 +15,4 @@ export * from './platform.ampSetting.dto';
14
15
  export * from './platform.tenants.dto';
15
16
  export * from './platform.users.dto';
16
17
  export * from './tenant.based.dto';
18
+ export * from './platform.workflow.dto';
@@ -1,6 +1,10 @@
1
- import {WorkflowDto, WorkflowUpsertDto} from '../workflow.dto';
1
+ import {WorkflowDto, WorkflowProgressDto, WorkflowProgressUpsertDto, WorkflowUpsertDto} from '../workflow.dto';
2
2
  import {TenantBased} from './tenant.based.dto';
3
3
 
4
4
  export type PlatformWorkflowUpsertDto = WorkflowUpsertDto & TenantBased;
5
5
 
6
6
  export type PlatformWorkflowDto = WorkflowDto & TenantBased;
7
+
8
+ export type PlatformWorkflowProgressUpsertDto = WorkflowProgressUpsertDto & TenantBased;
9
+
10
+ export type PlatformWorkflowProgressDto = WorkflowProgressDto & TenantBased;
@@ -1,5 +1,5 @@
1
1
  import {BaseDto} from './base.dto';
2
- import {NotificationStepType} from './enums/notificationStep.type';
2
+ import {WorkflowStepType} from './enums/workflowStep.type';
3
3
  import {WorkflowTriggerType} from './enums/workflowTrigger.type';
4
4
 
5
5
  export type NotificationStepData = {
@@ -22,7 +22,7 @@ export type WorkflowStep = {
22
22
  /** Number of the step in the workflow */
23
23
  stepNumber: number;
24
24
  /** Type of the notification step, either NOTIFICATION or PAUSE */
25
- type: NotificationStepType;
25
+ type: WorkflowStepType;
26
26
  /** ID of the template to be used for the notification */
27
27
  templateId?: string;
28
28
  /** Data associated with the notification step */
@@ -75,7 +75,7 @@ export type WorkflowProgressUpsertDto = {
75
75
  /** Step number to transition the workflow to next */
76
76
  nextStep: number;
77
77
  /** ID of the user for which the workflow is being executed */
78
- uid: string | null;
78
+ uid: string;
79
79
  /** whether or not this instance of the workflow has been completed */
80
80
  workflowCompleted: boolean;
81
81
  };
@@ -5,6 +5,7 @@ import {
5
5
  ConnectorDto,
6
6
  ConnectorUpsertDto,
7
7
  FindingDto,
8
+ NotificationDto,
8
9
  ProviderDto,
9
10
  ReportResultDto,
10
11
  SaasAssetDto,
@@ -42,6 +43,7 @@ export class AmpApi {
42
43
  readonly connectors: AmpEntityService<ConnectorUpsertDto, ConnectorDto>;
43
44
  readonly enums: EnumService;
44
45
  readonly findings: AmpDataService<FindingDto>;
46
+ readonly notifications: AmpDataService<NotificationDto>;
45
47
  readonly providers: AmpDataService<ProviderDto>;
46
48
  readonly reportResults: AmpDataService<ReportResultDto>;
47
49
  readonly reports: AmpReportService;
@@ -58,6 +60,7 @@ export class AmpApi {
58
60
  this.connectors = new AmpEntityServiceImpl<ConnectorUpsertDto, ConnectorDto>(rest, KIND.CONNECTORS);
59
61
  this.enums = new DefaultEnumService(rest);
60
62
  this.findings = new AmpDataServiceImpl<FindingDto>(rest, KIND.FINDINGS);
63
+ this.notifications = new AmpDataServiceImpl<NotificationDto>(rest, KIND.NOTIFICATIONS);
61
64
  this.providers = new AmpDataServiceImpl<ProviderDto>(rest, KIND.PROVIDERS);
62
65
  this.reportResults = new AmpDataServiceImpl<ReportResultDto>(rest, KIND.REPORT_RESULTS);
63
66
  this.reports = new AmpReportServiceImpl(rest);
@@ -7,6 +7,8 @@ import {
7
7
  PlatformConnectorUpsertDto,
8
8
  PlatformFindingDto,
9
9
  PlatformFindingUpsertDto,
10
+ PlatformNotificationDto,
11
+ PlatformNotificationUpsertDto,
10
12
  PlatformProviderUpsertDto,
11
13
  PlatformReportResultDto,
12
14
  PlatformReportResultUpsertDto,
@@ -20,6 +22,8 @@ import {
20
22
  PlatformSaasUserUpsertDto,
21
23
  PlatformUserDto,
22
24
  PlatformUserUpsertDto,
25
+ PlatformWorkflowProgressDto,
26
+ PlatformWorkflowProgressUpsertDto,
23
27
  ProviderDto,
24
28
  TenantDto,
25
29
  TenantUpsertDto,
@@ -59,6 +63,7 @@ export class AmpSdkServices {
59
63
  readonly findings: AmpSaaSEntityService<PlatformFindingUpsertDto, PlatformFindingDto>;
60
64
  readonly jobExecutions: AmpEntityService<PlatformJobExecutionStateUpsertDto, PlatformJobExecutionStateDto>;
61
65
  readonly jobs: AmpEntityService<PlatformJobSpecUpsertDto, PlatformJobSpecDto>;
66
+ readonly notifications: AmpEntityService<PlatformNotificationUpsertDto, PlatformNotificationDto>;
62
67
  readonly providers: AmpEntityService<PlatformProviderUpsertDto, ProviderDto>;
63
68
  readonly reportResults: AmpSaaSEntityService<PlatformReportResultUpsertDto, PlatformReportResultDto>;
64
69
  readonly riskContributors: AmpSaaSEntityService<PlatformRiskContributorUpsertDto, PlatformRiskContributorDto>;
@@ -68,6 +73,7 @@ export class AmpSdkServices {
68
73
  readonly settings: AmpSettingsService;
69
74
  readonly tenants: AmpSdkTenantService<TenantUpsertDto, TenantDto>;
70
75
  readonly users: AmpGlobalEntityService<PlatformUserUpsertDto, PlatformUserDto>;
76
+ readonly workflowsProgress: AmpEntityService<PlatformWorkflowProgressUpsertDto, PlatformWorkflowProgressDto>;
71
77
 
72
78
  constructor(rest: RestClient) {
73
79
  this.agents = new AmpEntityServiceImpl<PlatformAgentUpsertDto, PlatformAgentDto>(rest, KIND.AGENTS, TARGET_API_PLATFORM);
@@ -77,6 +83,7 @@ export class AmpSdkServices {
77
83
  this.findings = new AmpSaaSEntityServiceImpl<PlatformFindingUpsertDto, PlatformFindingDto>(rest, KIND.FINDINGS, TARGET_API_PLATFORM);
78
84
  this.jobExecutions = new AmpEntityServiceImpl<PlatformJobExecutionStateUpsertDto, PlatformJobExecutionStateDto>(rest, KIND.JOB_EXECUTIONS, TARGET_API_PLATFORM);
79
85
  this.jobs = new AmpEntityServiceImpl<PlatformJobSpecUpsertDto, PlatformJobSpecDto>(rest, KIND.JOB_SPEC, TARGET_API_PLATFORM);
86
+ this.notifications = new AmpEntityServiceImpl<PlatformNotificationUpsertDto, PlatformNotificationDto>(rest, KIND.NOTIFICATIONS, TARGET_API_PLATFORM);
80
87
  this.providers = new AmpEntityServiceImpl<PlatformProviderUpsertDto, ProviderDto>(rest, KIND.PROVIDERS, TARGET_API_PLATFORM);
81
88
  this.reportResults = new AmpSaaSEntityServiceImpl<PlatformReportResultUpsertDto, PlatformReportResultDto>(rest, KIND.REPORT_RESULTS, TARGET_API_PLATFORM);
82
89
  this.riskContributors = new AmpSaaSEntityServiceImpl<PlatformRiskContributorUpsertDto, PlatformRiskContributorDto>(rest, KIND.RISK_CONTRIBUTORS, TARGET_API_PLATFORM);
@@ -86,6 +93,7 @@ export class AmpSdkServices {
86
93
  this.settings = new AmpSettingsService(rest, TARGET_API_PLATFORM);
87
94
  this.tenants = new AmpEntityServiceImpl<TenantUpsertDto, TenantDto>(rest, KIND.TENANTS, TARGET_API_PLATFORM);
88
95
  this.users = new AmpGlobalEntityServiceImpl<PlatformUserUpsertDto, PlatformUserDto>(rest, KIND.USERS, TARGET_API_PLATFORM);
96
+ this.workflowsProgress = new AmpEntityServiceImpl<PlatformWorkflowProgressUpsertDto, PlatformWorkflowProgressDto>(rest, KIND.WORKFLOW_PROGRESS, TARGET_API_PLATFORM);
89
97
  }
90
98
 
91
99
  static instance(options: AmpSdkOptions): AmpSdkServices {
@@ -18,6 +18,7 @@ export const KIND = {
18
18
  FINDINGS: 'findings',
19
19
  JOB_EXECUTIONS: 'job_executions',
20
20
  JOB_SPEC: 'jobs',
21
+ NOTIFICATIONS: 'notifications',
21
22
  PROVIDERS: 'providers',
22
23
  REPORT_RESULTS: 'report_results',
23
24
  RISK_CONTRIBUTORS: 'risk_contributors',
@@ -26,6 +27,7 @@ export const KIND = {
26
27
  SAAS_USERS: 'saas_users',
27
28
  TENANTS: 'tenants',
28
29
  USERS: 'users',
30
+ WORKFLOW_PROGRESS: 'workflows_progress',
29
31
  };
30
32
 
31
33
  export const REPORTS = {
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NotificationStepType = void 0;
4
- /* eslint-disable no-unused-vars */
5
- var NotificationStepType;
6
- (function (NotificationStepType) {
7
- NotificationStepType["NOTIFICATION"] = "NOTIFICATION";
8
- NotificationStepType["PAUSE"] = "PAUSE";
9
- })(NotificationStepType || (exports.NotificationStepType = NotificationStepType = {}));
10
- //# sourceMappingURL=notificationStep.type.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"notificationStep.type.js","sourceRoot":"","sources":["../../../../src/dto/enums/notificationStep.type.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,qDAA6B,CAAA;IAC7B,uCAAe,CAAA;AACjB,CAAC,EAHW,oBAAoB,oCAApB,oBAAoB,QAG/B"}