@ampsec/platform-client 21.2.0 → 22.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.
@@ -0,0 +1,6 @@
1
+ export declare enum PlatformJobKind {
2
+ INGESTION_PIPELINE_CONTEXT = "INGESTION_PIPELINE_CONTEXT",
3
+ INSIGHT_FINDINGS_CONTEXT = "INSIGHT_FINDINGS_CONTEXT",
4
+ INSIGHT_REPORTS_CONTEXT = "INSIGHT_REPORTS_CONTEXT",
5
+ AMPSEC_PLATFORM_CONTEXT = "AMPSEC_PLATFORM_CONTEXT"
6
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PlatformJobKind = void 0;
4
+ /* eslint-disable no-unused-vars */
5
+ var PlatformJobKind;
6
+ (function (PlatformJobKind) {
7
+ PlatformJobKind["INGESTION_PIPELINE_CONTEXT"] = "INGESTION_PIPELINE_CONTEXT";
8
+ PlatformJobKind["INSIGHT_FINDINGS_CONTEXT"] = "INSIGHT_FINDINGS_CONTEXT";
9
+ PlatformJobKind["INSIGHT_REPORTS_CONTEXT"] = "INSIGHT_REPORTS_CONTEXT";
10
+ PlatformJobKind["AMPSEC_PLATFORM_CONTEXT"] = "AMPSEC_PLATFORM_CONTEXT";
11
+ })(PlatformJobKind || (exports.PlatformJobKind = PlatformJobKind = {}));
12
+ //# sourceMappingURL=platformJobKind.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platformJobKind.js","sourceRoot":"","sources":["../../../../src/dto/enums/platformJobKind.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,4EAAyD,CAAA;IACzD,wEAAqD,CAAA;IACrD,sEAAmD,CAAA;IACnD,sEAAmD,CAAA;AACrD,CAAC,EALW,eAAe,+BAAf,eAAe,QAK1B"}
@@ -1,6 +1,8 @@
1
1
  export type IdSummary = {
2
2
  id: string;
3
3
  etag: string;
4
+ uid?: string;
5
+ aid?: string;
4
6
  };
5
7
  export type ExtKeyMap = {
6
8
  [propName: string]: IdSummary;
@@ -1,25 +1,26 @@
1
1
  import { BaseDto, BaseUpsertDto } from '../base.dto';
2
2
  import { JobExecutionStatus } from '../enums/jobExecution.status';
3
+ import { PlatformJobKind } from '../enums/platformJobKind';
3
4
  import { TenantBased, UpsertTenantBased } from './tenant.based.dto';
4
5
  export type BasicJobSchedule = {
5
6
  kind: 'basic';
6
7
  offset: number;
7
8
  interval: number;
8
9
  };
9
- export type IngestionPipelineContext = {
10
- kind: 'INGESTION_PIPELINE_CONTEXT';
11
- cid: string;
10
+ export type JobInputContext = {
12
11
  scratch: unknown;
13
12
  };
14
13
  export type PlatformJobSpecUpsertDto = BaseUpsertDto & {
15
- /** Human readable name of the Job Specification */
16
- displayValue: string;
14
+ /** Job type */
15
+ kind: PlatformJobKind;
16
+ /** Tenant Id */
17
+ tid?: string;
17
18
  /** Connector Id */
18
- cid: string;
19
+ cid?: string;
19
20
  /** Schedule configuration for the job. */
20
21
  schedule: BasicJobSchedule;
21
22
  /** Context for the job execution, e.g. ingestion pipeline */
22
- inputContext: IngestionPipelineContext;
23
+ inputContext: JobInputContext;
23
24
  /** Status of the current or latest job execution */
24
25
  status: JobExecutionStatus;
25
26
  /** Date of the next job execution */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ampsec/platform-client",
3
- "version": "21.2.0",
3
+ "version": "22.0.0",
4
4
  "description": "",
5
5
  "main": "build/src/index.js",
6
6
  "runkitExampleFilename": "example/main.js",
@@ -0,0 +1,7 @@
1
+ /* eslint-disable no-unused-vars */
2
+ export enum PlatformJobKind {
3
+ INGESTION_PIPELINE_CONTEXT = 'INGESTION_PIPELINE_CONTEXT',
4
+ INSIGHT_FINDINGS_CONTEXT = 'INSIGHT_FINDINGS_CONTEXT',
5
+ INSIGHT_REPORTS_CONTEXT = 'INSIGHT_REPORTS_CONTEXT',
6
+ AMPSEC_PLATFORM_CONTEXT = 'AMPSEC_PLATFORM_CONTEXT',
7
+ }
@@ -1,6 +1,8 @@
1
1
  export type IdSummary = {
2
2
  id: string;
3
3
  etag: string;
4
+ uid?: string;
5
+ aid?: string;
4
6
  };
5
7
 
6
8
  export type ExtKeyMap = {
@@ -1,5 +1,6 @@
1
1
  import {BaseDto, BaseUpsertDto} from '../base.dto';
2
2
  import {JobExecutionStatus} from '../enums/jobExecution.status';
3
+ import {PlatformJobKind} from '../enums/platformJobKind';
3
4
  import {TenantBased, UpsertTenantBased} from './tenant.based.dto';
4
5
 
5
6
  export type BasicJobSchedule = {
@@ -8,21 +9,21 @@ export type BasicJobSchedule = {
8
9
  interval: number;
9
10
  };
10
11
 
11
- export type IngestionPipelineContext = {
12
- kind: 'INGESTION_PIPELINE_CONTEXT';
13
- cid: string;
12
+ export type JobInputContext = {
14
13
  scratch: unknown;
15
14
  };
16
15
 
17
16
  export type PlatformJobSpecUpsertDto = BaseUpsertDto & {
18
- /** Human readable name of the Job Specification */
19
- displayValue: string;
17
+ /** Job type */
18
+ kind: PlatformJobKind;
19
+ /** Tenant Id */
20
+ tid?: string;
20
21
  /** Connector Id */
21
- cid: string;
22
+ cid?: string;
22
23
  /** Schedule configuration for the job. */
23
24
  schedule: BasicJobSchedule;
24
25
  /** Context for the job execution, e.g. ingestion pipeline */
25
- inputContext: IngestionPipelineContext;
26
+ inputContext: JobInputContext;
26
27
  /** Status of the current or latest job execution */
27
28
  status: JobExecutionStatus;
28
29
  /** Date of the next job execution */