@ampsec/platform-client 21.3.0 → 22.1.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.
- package/build/src/FilterCriteria.d.ts +5 -0
- package/build/src/dto/enums/platformJobKind.d.ts +6 -0
- package/build/src/dto/enums/platformJobKind.js +12 -0
- package/build/src/dto/enums/platformJobKind.js.map +1 -0
- package/build/src/dto/platform/platform.jobSpec.dto.d.ts +8 -7
- package/package.json +1 -1
- package/src/FilterCriteria.ts +6 -0
- package/src/dto/enums/platformJobKind.ts +7 -0
- package/src/dto/platform/platform.jobSpec.dto.ts +8 -7
|
@@ -36,6 +36,9 @@ export type DateMatcher = {
|
|
|
36
36
|
$lte?: string;
|
|
37
37
|
$gte?: string;
|
|
38
38
|
};
|
|
39
|
+
export type SortOptions = {
|
|
40
|
+
[key: string]: 'ASC' | 'DESC';
|
|
41
|
+
};
|
|
39
42
|
export type FilterCriteria = {
|
|
40
43
|
/** Number of records to return. */
|
|
41
44
|
limit?: number;
|
|
@@ -59,6 +62,8 @@ export type FilterCriteria = {
|
|
|
59
62
|
updatedAt?: DateMatcher;
|
|
60
63
|
/** Deleted at Date. `null` if not deleted */
|
|
61
64
|
deletedAt?: DateMatcher | null;
|
|
65
|
+
/** Sort Criteria */
|
|
66
|
+
sort?: SortOptions;
|
|
62
67
|
/** catch all bucket for other fields */
|
|
63
68
|
[key: string]: string | StringMatcher | number | NumberMatcher | boolean | null | undefined;
|
|
64
69
|
};
|
|
@@ -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,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
|
|
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
|
-
/**
|
|
16
|
-
|
|
14
|
+
/** Job type */
|
|
15
|
+
kind: PlatformJobKind;
|
|
16
|
+
/** Tenant Id */
|
|
17
|
+
tid?: string;
|
|
17
18
|
/** Connector Id */
|
|
18
|
-
cid
|
|
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:
|
|
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
package/src/FilterCriteria.ts
CHANGED
|
@@ -38,6 +38,10 @@ export type DateMatcher = {
|
|
|
38
38
|
$gte?: string;
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
+
export type SortOptions = {
|
|
42
|
+
[key: string]: 'ASC' | 'DESC';
|
|
43
|
+
};
|
|
44
|
+
|
|
41
45
|
export type FilterCriteria = {
|
|
42
46
|
/** Number of records to return. */
|
|
43
47
|
limit?: number;
|
|
@@ -61,6 +65,8 @@ export type FilterCriteria = {
|
|
|
61
65
|
updatedAt?: DateMatcher;
|
|
62
66
|
/** Deleted at Date. `null` if not deleted */
|
|
63
67
|
deletedAt?: DateMatcher | null;
|
|
68
|
+
/** Sort Criteria */
|
|
69
|
+
sort?: SortOptions;
|
|
64
70
|
/** catch all bucket for other fields */
|
|
65
71
|
[key: string]: string | StringMatcher | number | NumberMatcher | boolean | null | undefined;
|
|
66
72
|
};
|
|
@@ -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,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
|
|
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
|
-
/**
|
|
19
|
-
|
|
17
|
+
/** Job type */
|
|
18
|
+
kind: PlatformJobKind;
|
|
19
|
+
/** Tenant Id */
|
|
20
|
+
tid?: string;
|
|
20
21
|
/** Connector Id */
|
|
21
|
-
cid
|
|
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:
|
|
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 */
|