@ampsec/platform-client 62.7.0 → 62.9.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/dto/base.dto.d.ts +6 -0
- package/build/src/dto/base.dto.js +8 -2
- package/build/src/dto/base.dto.js.map +1 -1
- package/build/src/dto/customActions.dto.d.ts +365 -0
- package/build/src/dto/customActions.dto.js +40 -0
- package/build/src/dto/customActions.dto.js.map +1 -0
- package/build/src/dto/customScores.dto.d.ts +153 -0
- package/build/src/dto/customScores.dto.js +17 -0
- package/build/src/dto/customScores.dto.js.map +1 -0
- package/build/src/dto/findings.dto.d.ts +88 -0
- package/build/src/dto/findings.dto.js +25 -0
- package/build/src/dto/findings.dto.js.map +1 -1
- package/build/src/dto/flows.dto.d.ts +19 -0
- package/build/src/dto/flows.dto.js +9 -10
- package/build/src/dto/flows.dto.js.map +1 -1
- package/build/src/dto/index.d.ts +2 -0
- package/build/src/dto/index.js +2 -0
- package/build/src/dto/index.js.map +1 -1
- package/build/src/dto/notification.dto.d.ts +121 -121
- package/build/src/dto/notification.dto.js +1 -1
- package/build/src/dto/notification.dto.js.map +1 -1
- package/build/src/dto/platform/index.d.ts +2 -0
- package/build/src/dto/platform/index.js +2 -0
- package/build/src/dto/platform/index.js.map +1 -1
- package/build/src/dto/platform/platform.customActions.dto.d.ts +303 -0
- package/build/src/dto/platform/platform.customActions.dto.js +12 -0
- package/build/src/dto/platform/platform.customActions.dto.js.map +1 -0
- package/build/src/dto/platform/platform.customScores.dto.d.ts +165 -0
- package/build/src/dto/platform/platform.customScores.dto.js +18 -0
- package/build/src/dto/platform/platform.customScores.dto.js.map +1 -0
- package/build/src/dto/platform/platform.findings.dto.d.ts +77 -0
- package/build/src/dto/platform/platform.findings.dto.js +9 -0
- package/build/src/dto/platform/platform.findings.dto.js.map +1 -1
- package/build/src/services/AmpApi.d.ts +5 -1
- package/build/src/services/AmpApi.js +4 -0
- package/build/src/services/AmpApi.js.map +1 -1
- package/build/src/services/AmpSdk.d.ts +5 -4
- package/build/src/services/AmpSdk.js +4 -0
- package/build/src/services/AmpSdk.js.map +1 -1
- package/build/src/services/constants.d.ts +4 -0
- package/build/src/services/constants.js +4 -0
- package/build/src/services/constants.js.map +1 -1
- package/package.json +1 -1
- package/src/dto/base.dto.ts +7 -2
- package/src/dto/customActions.dto.ts +44 -0
- package/src/dto/customScores.dto.ts +21 -0
- package/src/dto/findings.dto.ts +29 -1
- package/src/dto/flows.dto.ts +8 -11
- package/src/dto/index.ts +2 -0
- package/src/dto/notification.dto.ts +1 -1
- package/src/dto/platform/index.ts +2 -0
- package/src/dto/platform/platform.customActions.dto.ts +12 -0
- package/src/dto/platform/platform.customScores.dto.ts +22 -0
- package/src/dto/platform/platform.findings.dto.ts +12 -1
- package/src/services/AmpApi.ts +29 -1
- package/src/services/AmpSdk.ts +24 -3
- package/src/services/constants.ts +4 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentDto, AgentUpsertDto, AssetDto, ProviderDto, ReportResultDto, SaasAssetDto, SaasComponentDto, SaasUserDto, TenantDto, TenantUpsertDto, UserDto } from '../dto';
|
|
1
|
+
import { AgentDto, AgentUpsertDto, AssetDto, CustomActionDto, CustomActionUpsertDto, CustomScoreCohortDto, CustomScoreCohortUpsertDto, CustomScoreValueDto, CustomScoreValueUpsertDto, FindingSpecDto, FindingSpecUpsertDto, ProviderDto, ReportResultDto, SaasAssetDto, SaasComponentDto, SaasUserDto, TenantDto, TenantUpsertDto, UserDto } from '../dto';
|
|
2
2
|
import { AmpEntityService, AmpDataService, AmpReportService, AmpSettingsService, ConnectorsService, FindingsInsightsService, FindingsService, NotificationService, PredictionService } from '.';
|
|
3
3
|
import { AmpRestClientOptions, AgentIdentityService, ConnectorInstallService, EnumService, RestClient } from './rest';
|
|
4
4
|
import { UsersInsightsService } from './usersInsights.service';
|
|
@@ -22,9 +22,13 @@ export declare class AmpApi {
|
|
|
22
22
|
readonly asset: AmpDataService<AssetDto>;
|
|
23
23
|
readonly cohorts: CohortService;
|
|
24
24
|
readonly connectors: ConnectorsService;
|
|
25
|
+
readonly customActions: AmpEntityService<CustomActionUpsertDto, CustomActionDto>;
|
|
26
|
+
readonly customScoreValues: AmpEntityService<CustomScoreValueUpsertDto, CustomScoreValueDto>;
|
|
27
|
+
readonly customScoreCohorts: AmpEntityService<CustomScoreCohortUpsertDto, CustomScoreCohortDto>;
|
|
25
28
|
readonly enums: EnumService;
|
|
26
29
|
readonly findings: FindingsService;
|
|
27
30
|
readonly findingsInsights: FindingsInsightsService;
|
|
31
|
+
readonly findingSpecs: AmpEntityService<FindingSpecUpsertDto, FindingSpecDto>;
|
|
28
32
|
readonly flowSpecs: FlowSpecsService;
|
|
29
33
|
readonly identity: AgentIdentityService;
|
|
30
34
|
readonly install: ConnectorInstallService;
|
|
@@ -25,9 +25,13 @@ class AmpApi {
|
|
|
25
25
|
this.asset = new _1.AmpDataServiceImpl(rest, constants_1.KIND.ASSETS);
|
|
26
26
|
this.cohorts = new CohortService_1.CohortService(rest);
|
|
27
27
|
this.connectors = new _1.ConnectorsService(rest);
|
|
28
|
+
this.customActions = new _1.AmpEntityServiceImpl(rest, constants_1.KIND.CUSTOM_ACTIONS);
|
|
29
|
+
this.customScoreCohorts = new _1.AmpEntityServiceImpl(rest, constants_1.KIND.CUSTOM_SCORE_COHORTS);
|
|
30
|
+
this.customScoreValues = new _1.AmpEntityServiceImpl(rest, constants_1.KIND.CUSTOM_SCORE_VALUES);
|
|
28
31
|
this.enums = new rest_1.DefaultEnumService(rest);
|
|
29
32
|
this.findings = new _1.FindingsService(rest);
|
|
30
33
|
this.findingsInsights = new _1.FindingsInsightsService(rest, constants_1.KIND.FINDINGS_INSIGHTS);
|
|
34
|
+
this.findingSpecs = new _1.AmpEntityServiceImpl(rest, constants_1.KIND.FINDING_SPECS);
|
|
31
35
|
this.flowSpecs = new flowSpecs_service_1.FlowSpecsService(rest);
|
|
32
36
|
this.identity = new rest_1.AgentIdentityService(rest);
|
|
33
37
|
this.install = new rest_1.ConnectorInstallService(rest, constants_1.TARGET_API_AGENT);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmpApi.js","sourceRoot":"","sources":["../../../src/services/AmpApi.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"AmpApi.js","sourceRoot":"","sources":["../../../src/services/AmpApi.ts"],"names":[],"mappings":";;;AAqBA,wBAaW;AACX,2CAAmD;AACnD,iCAA0J;AAC1J,mEAA6D;AAC7D,2DAAqD;AACrD,wDAAmD;AAInD;;;;;;;;;;;GAWG;AACH,MAAa,MAAM;IA4BjB,YAAY,IAAgB;QAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,uBAAoB,CAA2B,IAAI,EAAE,gBAAI,CAAC,MAAM,CAAC,CAAC;QACpF,IAAI,CAAC,KAAK,GAAG,IAAI,qBAAkB,CAAW,IAAI,EAAE,gBAAI,CAAC,MAAM,CAAC,CAAC;QACjE,IAAI,CAAC,OAAO,GAAG,IAAI,6BAAa,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,UAAU,GAAG,IAAI,oBAAiB,CAAC,IAAI,CAAC,CAAC;QAC9C,IAAI,CAAC,aAAa,GAAG,IAAI,uBAAoB,CAAyC,IAAI,EAAE,gBAAI,CAAC,cAAc,CAAC,CAAC;QACjH,IAAI,CAAC,kBAAkB,GAAG,IAAI,uBAAoB,CAAmD,IAAI,EAAE,gBAAI,CAAC,oBAAoB,CAAC,CAAC;QACtI,IAAI,CAAC,iBAAiB,GAAG,IAAI,uBAAoB,CAAiD,IAAI,EAAE,gBAAI,CAAC,mBAAmB,CAAC,CAAC;QAClI,IAAI,CAAC,KAAK,GAAG,IAAI,yBAAkB,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAI,CAAC,QAAQ,GAAG,IAAI,kBAAe,CAAC,IAAI,CAAC,CAAC;QAC1C,IAAI,CAAC,gBAAgB,GAAG,IAAI,0BAAuB,CAAC,IAA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AAC;QAC/D,IAAI,CAAC,aAAa,GAAG,IAAI,4CAAoB,CAAC,IAAI,CAAC,CAAC;QACpD,IAAI,CAAC,UAAU,GAAG,IAAI,oBAAiB,CAAC,IAAI,EAAE,gBAAI,CAAC,QAAQ,CAAC,CAAC;IAC/D,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;AA7DD,wBA6DC"}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import { PlatformAgentDto, PlatformAgentUpsertDto, PlatformConnectorDto, PlatformConnectorUpsertDto, PlatformFindingDto, PlatformFindingUpsertDto, PlatformNotificationDto, PlatformNotificationUpsertDto, PlatformProviderUpsertDto, PlatformReportResultDto, PlatformReportResultUpsertDto, PlatformRiskContributorDto, PlatformRiskContributorUpsertDto, PlatformSaasComponentDto, PlatformSaasComponentUpsertDto, PlatformStagedSaasAssetDto, PlatformStagedSaasAssetUpsertDto, PlatformStagedSaasUserDto, PlatformStagedSaasUserUpsertDto, ProviderDto, TenantDto, TenantUpsertDto } from '../dto';
|
|
1
|
+
import { PlatformAgentDto, PlatformAgentUpsertDto, PlatformConnectorDto, PlatformConnectorUpsertDto, PlatformCustomActionDto, PlatformCustomActionUpsertDto, PlatformCustomScoreCohortDto, PlatformCustomScoreCohortUpsertDto, PlatformCustomScoreValueDto, PlatformCustomScoreValueUpsertDto, PlatformFindingDto, PlatformFindingSpecDto, PlatformFindingSpecUpsertDto, PlatformFindingUpsertDto, PlatformFlowSpecDto, PlatformFlowSpecUpsertDto, PlatformFlowStateDto, PlatformFlowStateUpsertDto, PlatformJobExecutionStateDto, PlatformJobExecutionStateUpsertDto, PlatformJobSpecDto, PlatformJobSpecUpsertDto, PlatformNotificationDto, PlatformNotificationUpsertDto, PlatformProviderUpsertDto, PlatformReportResultDto, PlatformReportResultUpsertDto, PlatformRiskContributorDto, PlatformRiskContributorUpsertDto, PlatformSaasComponentDto, PlatformSaasComponentUpsertDto, PlatformStagedSaasAssetDto, PlatformStagedSaasAssetUpsertDto, PlatformStagedSaasUserDto, PlatformStagedSaasUserUpsertDto, ProviderDto, TenantDto, TenantUpsertDto } from '../dto';
|
|
2
2
|
import { AmpEntityService, AmpSdkAssetService, AmpSdkTenantService, AmpSdkUserService, TruncatableAmpEntityService } from './entity.service';
|
|
3
3
|
import { AmpRestClientOptions, RestClient } from './rest';
|
|
4
|
-
import { PlatformJobSpecDto, PlatformJobSpecUpsertDto } from '../dto/platform/platform.jobSpec.dto';
|
|
5
|
-
import { PlatformJobExecutionStateDto, PlatformJobExecutionStateUpsertDto } from '../dto/platform/platform.jobExecutionState.dto';
|
|
6
4
|
import { EnumService } from './rest/EnumService';
|
|
7
5
|
import { AmpSdkSettingsService } from './settings.service';
|
|
8
6
|
import { AmpSaaSEntityService, AmpSdkSaasAssetService, AmpSdkSaasComponentService, AmpSdkSaasUserService } from './saasEntity.service';
|
|
9
7
|
import { ContentfulService } from './contentful.service';
|
|
10
8
|
import { FindingsInsightsService } from './findingsInsights.service';
|
|
11
|
-
import { PlatformFlowSpecDto, PlatformFlowSpecUpsertDto, PlatformFlowStateDto, PlatformFlowStateUpsertDto } from '../dto/platform/platform.flows.dto';
|
|
12
9
|
export type AmpSdkOptions = AmpRestClientOptions;
|
|
13
10
|
/**
|
|
14
11
|
* AMP API
|
|
@@ -24,8 +21,12 @@ export declare class AmpSdkServices {
|
|
|
24
21
|
readonly asset: AmpSdkAssetService;
|
|
25
22
|
readonly connectors: AmpEntityService<PlatformConnectorUpsertDto, PlatformConnectorDto>;
|
|
26
23
|
readonly contentful: ContentfulService;
|
|
24
|
+
readonly customActions: AmpEntityService<PlatformCustomActionUpsertDto, PlatformCustomActionDto>;
|
|
25
|
+
readonly customScoreCohorts: AmpEntityService<PlatformCustomScoreCohortUpsertDto, PlatformCustomScoreCohortDto>;
|
|
26
|
+
readonly customScoreValues: AmpEntityService<PlatformCustomScoreValueUpsertDto, PlatformCustomScoreValueDto>;
|
|
27
27
|
readonly enums: EnumService;
|
|
28
28
|
readonly findings: AmpSaaSEntityService<PlatformFindingUpsertDto, PlatformFindingDto>;
|
|
29
|
+
readonly findingSpecs: AmpSaaSEntityService<PlatformFindingSpecUpsertDto, PlatformFindingSpecDto>;
|
|
29
30
|
readonly findingsInsights: FindingsInsightsService;
|
|
30
31
|
readonly flowSpecs: AmpSaaSEntityService<PlatformFlowSpecUpsertDto, PlatformFlowSpecDto>;
|
|
31
32
|
readonly flowStates: AmpSaaSEntityService<PlatformFlowStateUpsertDto, PlatformFlowStateDto>;
|
|
@@ -24,8 +24,12 @@ class AmpSdkServices {
|
|
|
24
24
|
this.asset = new entity_service_1.AmpSdkAssetService(rest, constants_1.TARGET_API_PLATFORM);
|
|
25
25
|
this.connectors = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.CONNECTORS, constants_1.TARGET_API_PLATFORM);
|
|
26
26
|
this.contentful = new contentful_service_1.ContentfulService();
|
|
27
|
+
this.customActions = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.CUSTOM_ACTIONS, constants_1.TARGET_API_PLATFORM);
|
|
28
|
+
this.customScoreCohorts = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.CUSTOM_SCORE_COHORTS, constants_1.TARGET_API_PLATFORM);
|
|
29
|
+
this.customScoreValues = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.CUSTOM_SCORE_VALUES, constants_1.TARGET_API_PLATFORM);
|
|
27
30
|
this.enums = new EnumService_1.DefaultEnumService(rest, constants_1.TARGET_API_PLATFORM);
|
|
28
31
|
this.findings = new saasEntity_service_1.AmpSaaSEntityServiceImpl(rest, constants_1.KIND.FINDINGS, constants_1.TARGET_API_PLATFORM);
|
|
32
|
+
this.findingSpecs = new saasEntity_service_1.AmpSaaSEntityServiceImpl(rest, constants_1.KIND.FINDING_SPECS, constants_1.TARGET_API_PLATFORM);
|
|
29
33
|
this.findingsInsights = new findingsInsights_service_1.FindingsInsightsService(rest, constants_1.KIND.FINDINGS_INSIGHTS, constants_1.TARGET_API_PLATFORM);
|
|
30
34
|
this.flowSpecs = new saasEntity_service_1.AmpSaaSEntityServiceImpl(rest, constants_1.KIND.FLOW_SPECS, constants_1.TARGET_API_PLATFORM);
|
|
31
35
|
this.flowStates = new saasEntity_service_1.AmpSaaSEntityServiceImpl(rest, constants_1.KIND.FLOW_STATES, constants_1.TARGET_API_PLATFORM);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmpSdk.js","sourceRoot":"","sources":["../../../src/services/AmpSdk.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"AmpSdk.js","sourceRoot":"","sources":["../../../src/services/AmpSdk.ts"],"names":[],"mappings":";;;AA4CA,qDAQ0B;AAC1B,iCAA0E;AAC1E,2CAAsD;AACtD,oDAAmE;AACnE,yDAAyD;AACzD,6DAA+J;AAC/J,6DAAuD;AACvD,yEAAmE;AAInE;;;;;;;;GAQG;AACH,MAAa,cAAc;IA8BzB,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,mCAAkB,CAAC,IAAI,EAAE,+BAAmB,CAAC,CAAC;QAC/D,IAAI,CAAC,UAAU,GAAG,IAAI,qCAAoB,CAAmD,IAAI,EAAE,gBAAI,CAAC,UAAU,EAAE,+BAAmB,CAAC,CAAC;QACzI,IAAI,CAAC,UAAU,GAAG,IAAI,sCAAiB,EAAE,CAAC;QAC1C,IAAI,CAAC,aAAa,GAAG,IAAI,qCAAoB,CAAyD,IAAI,EAAE,gBAAI,CAAC,cAAc,EAAE,+BAAmB,CAAC,CAAC;QACtJ,IAAI,CAAC,kBAAkB,G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,CAAC,CAAC;QACvC,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;CACF;AAtED,wCAsEC"}
|
|
@@ -10,11 +10,15 @@ export declare const KIND: {
|
|
|
10
10
|
AGENTS: string;
|
|
11
11
|
ASSETS: string;
|
|
12
12
|
CONNECTORS: string;
|
|
13
|
+
CUSTOM_ACTIONS: string;
|
|
14
|
+
CUSTOM_SCORE_COHORTS: string;
|
|
15
|
+
CUSTOM_SCORE_VALUES: string;
|
|
13
16
|
ENUM_DEPARTMENTS: string;
|
|
14
17
|
ENUM_ORGANIZATIONS: string;
|
|
15
18
|
ENUM_TITLES: string;
|
|
16
19
|
FINDINGS: string;
|
|
17
20
|
FINDINGS_INSIGHTS: string;
|
|
21
|
+
FINDING_SPECS: string;
|
|
18
22
|
FLOW_SPECS: string;
|
|
19
23
|
FLOW_STATES: string;
|
|
20
24
|
JOB_EXECUTIONS: string;
|
|
@@ -9,11 +9,15 @@ exports.KIND = {
|
|
|
9
9
|
AGENTS: 'agents',
|
|
10
10
|
ASSETS: 'assets',
|
|
11
11
|
CONNECTORS: 'connectors',
|
|
12
|
+
CUSTOM_ACTIONS: 'custom_actions',
|
|
13
|
+
CUSTOM_SCORE_COHORTS: 'custom_score_cohorts',
|
|
14
|
+
CUSTOM_SCORE_VALUES: 'custom_score_values',
|
|
12
15
|
ENUM_DEPARTMENTS: 'departments',
|
|
13
16
|
ENUM_ORGANIZATIONS: 'organizations',
|
|
14
17
|
ENUM_TITLES: 'titles',
|
|
15
18
|
FINDINGS: 'findings',
|
|
16
19
|
FINDINGS_INSIGHTS: 'findings_insights',
|
|
20
|
+
FINDING_SPECS: 'findings_specs',
|
|
17
21
|
FLOW_SPECS: 'flow_specs',
|
|
18
22
|
FLOW_STATES: 'flow_states',
|
|
19
23
|
JOB_EXECUTIONS: 'job_executions',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/services/constants.ts"],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EAAE,kBAAkB;IACpC,iBAAiB,EAAE,mBAAmB;IACtC,qBAAqB,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
package/src/dto/base.dto.ts
CHANGED
|
@@ -6,11 +6,16 @@ export const _BaseDto = z.object({
|
|
|
6
6
|
updatedAt: z.string(),
|
|
7
7
|
deletedAt: z.string().nullable(),
|
|
8
8
|
});
|
|
9
|
-
|
|
10
9
|
export type BaseDto = z.infer<typeof _BaseDto>;
|
|
11
10
|
|
|
12
|
-
export const
|
|
11
|
+
export const UPSERT_DTO_MASK = {
|
|
12
|
+
id: true,
|
|
13
|
+
createdAt: true,
|
|
14
|
+
updatedAt: true,
|
|
15
|
+
deletedAt: true,
|
|
16
|
+
} as const;
|
|
13
17
|
|
|
18
|
+
export const _BaseUpsertDto = _BaseDto.partial(UPSERT_DTO_MASK);
|
|
14
19
|
export type BaseUpsertDto = z.infer<typeof _BaseUpsertDto>;
|
|
15
20
|
|
|
16
21
|
const WithEtag = z.object({etag: z.string()});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {z} from 'zod';
|
|
2
|
+
import {UPSERT_DTO_MASK, _BaseDto} from './base.dto';
|
|
3
|
+
|
|
4
|
+
const _BaseCustomAction = _BaseDto.extend({
|
|
5
|
+
displayValue: z.string(),
|
|
6
|
+
description: z.string(),
|
|
7
|
+
isTemplate: z.boolean(),
|
|
8
|
+
retryStrategy: z
|
|
9
|
+
.object({
|
|
10
|
+
kind: z.literal('CONSTANT_BACKOFF'),
|
|
11
|
+
maxRetries: z.number(),
|
|
12
|
+
delay: z.number(),
|
|
13
|
+
})
|
|
14
|
+
.optional(),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export const _CustomRestActionMetaDto = z.object({
|
|
18
|
+
request: z.object({
|
|
19
|
+
url: z.string(),
|
|
20
|
+
method: z.string(),
|
|
21
|
+
payload: z.object({
|
|
22
|
+
kind: z.literal('TEMPLATE'),
|
|
23
|
+
format: z.literal('JSON'),
|
|
24
|
+
value: z.string(),
|
|
25
|
+
}),
|
|
26
|
+
headers: z.record(z.string()),
|
|
27
|
+
params: z.record(z.string()),
|
|
28
|
+
}),
|
|
29
|
+
timeout: z.number().optional(),
|
|
30
|
+
});
|
|
31
|
+
const _CustomRestActionDto = _BaseCustomAction.extend({
|
|
32
|
+
kind: z.literal('REST_ACTION'),
|
|
33
|
+
meta: _CustomRestActionMetaDto,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const _CustomRestActionUpsertDto = _CustomRestActionDto.partial(UPSERT_DTO_MASK);
|
|
37
|
+
|
|
38
|
+
export const _CustomActionDto = _CustomRestActionDto;
|
|
39
|
+
export type CustomActionDto = z.infer<typeof _CustomActionDto>;
|
|
40
|
+
|
|
41
|
+
export const _CustomActionUpsertDto = _CustomRestActionUpsertDto;
|
|
42
|
+
export type CustomActionUpsertDto = z.infer<typeof _CustomActionUpsertDto>;
|
|
43
|
+
|
|
44
|
+
// TODO action execution history + errors
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {z} from 'zod';
|
|
2
|
+
import {UPSERT_DTO_MASK, _BaseDto} from './base.dto';
|
|
3
|
+
import {_AmplifierCohortDto} from './flows.dto';
|
|
4
|
+
|
|
5
|
+
export const _CustomScoreValueDto = _BaseDto.extend({
|
|
6
|
+
findingSpecId: z.string(),
|
|
7
|
+
value: z.number(),
|
|
8
|
+
});
|
|
9
|
+
export type CustomScoreValueDto = z.infer<typeof _CustomScoreValueDto>;
|
|
10
|
+
|
|
11
|
+
export const _CustomScoreValueUpsertDto = _CustomScoreValueDto.partial(UPSERT_DTO_MASK);
|
|
12
|
+
export type CustomScoreValueUpsertDto = z.infer<typeof _CustomScoreValueUpsertDto>;
|
|
13
|
+
|
|
14
|
+
export const _CustomScoreCohortDto = _BaseDto.extend({
|
|
15
|
+
cohort: _AmplifierCohortDto,
|
|
16
|
+
multiplier: z.number(),
|
|
17
|
+
});
|
|
18
|
+
export type CustomScoreCohortDto = z.infer<typeof _CustomScoreCohortDto>;
|
|
19
|
+
|
|
20
|
+
export const _CustomScoreCohortUpsertDto = _CustomScoreCohortDto.partial(UPSERT_DTO_MASK);
|
|
21
|
+
export type CustomScoreCohortUpsertDto = z.infer<typeof _CustomScoreCohortUpsertDto>;
|
package/src/dto/findings.dto.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import {z} from 'zod';
|
|
1
2
|
import {SimpleAssetDto} from './assets.dto';
|
|
2
|
-
import {BaseDto, BaseUpsertDto} from './base.dto';
|
|
3
|
+
import {BaseDto, BaseUpsertDto, _BaseDto} from './base.dto';
|
|
3
4
|
import {Category, FindingKind} from './enums';
|
|
4
5
|
import {FindingOutcome, FindingSeverity, FindingStatus} from './enums';
|
|
5
6
|
import {SimpleProviderDto} from './providers.dto';
|
|
@@ -57,3 +58,30 @@ export type FindingDto = BaseDto &
|
|
|
57
58
|
/** Optionally populated when requested through query param `include=meta`. Comes from `saasComp.meta` */
|
|
58
59
|
meta?: SaasComponentMeta;
|
|
59
60
|
};
|
|
61
|
+
|
|
62
|
+
const _FindingSpecDescription = z.unknown();
|
|
63
|
+
export const _FindingSpecDto = _BaseDto.extend({
|
|
64
|
+
cid: z.string().optional(),
|
|
65
|
+
name: z.string(),
|
|
66
|
+
displayValue: z.string(),
|
|
67
|
+
eventType: z.string(),
|
|
68
|
+
description: z.union([z.string(), _FindingSpecDescription]),
|
|
69
|
+
severity: z.nativeEnum(FindingSeverity),
|
|
70
|
+
});
|
|
71
|
+
export type FindingSpecDto = z.infer<typeof _FindingSpecDto>;
|
|
72
|
+
|
|
73
|
+
export const _FindingSpecUpsertDto = _FindingSpecDto.partial({
|
|
74
|
+
id: true,
|
|
75
|
+
createdAt: true,
|
|
76
|
+
updatedAt: true,
|
|
77
|
+
deletedAt: true,
|
|
78
|
+
});
|
|
79
|
+
export type FindingSpecUpsertDto = z.infer<typeof _FindingSpecUpsertDto>;
|
|
80
|
+
|
|
81
|
+
export const _FindingSummaryDto = z.object({
|
|
82
|
+
id: z.string(),
|
|
83
|
+
cid: z.string().optional(),
|
|
84
|
+
displayValue: z.string(),
|
|
85
|
+
eventType: z.string(),
|
|
86
|
+
});
|
|
87
|
+
export type FindingSummaryDto = z.infer<typeof _FindingSummaryDto>;
|
package/src/dto/flows.dto.ts
CHANGED
|
@@ -108,18 +108,15 @@ const _FlowTriggerFilter = z.object({
|
|
|
108
108
|
custom: z.record(z.unknown()).optional(),
|
|
109
109
|
});
|
|
110
110
|
export type FlowTriggerFilter = z.infer<typeof _FlowTriggerFilter>;
|
|
111
|
+
export const _AmplifierCohortDto = z.object({
|
|
112
|
+
id: z.string(),
|
|
113
|
+
kind: z.enum(['ORGANIZATION', 'DEPARTMENT', 'USER', 'RISK_CONTRIBUTOR']),
|
|
114
|
+
displayValue: z.string(),
|
|
115
|
+
value: z.string(),
|
|
116
|
+
inclusive: z.boolean(),
|
|
117
|
+
});
|
|
111
118
|
const _FlowFilter = z.object({
|
|
112
|
-
cohorts: z.array(
|
|
113
|
-
z
|
|
114
|
-
.object({
|
|
115
|
-
id: z.string(),
|
|
116
|
-
kind: z.enum(['ORGANIZATION', 'DEPARTMENT', 'USER', 'RISK_CONTRIBUTOR']),
|
|
117
|
-
displayValue: z.string(),
|
|
118
|
-
value: z.string(),
|
|
119
|
-
inclusive: z.boolean(),
|
|
120
|
-
})
|
|
121
|
-
.optional()
|
|
122
|
-
),
|
|
119
|
+
cohorts: z.array(_AmplifierCohortDto.optional()),
|
|
123
120
|
custom: z.record(z.unknown()).optional(),
|
|
124
121
|
});
|
|
125
122
|
const _FlowTone = z.object({
|
package/src/dto/index.ts
CHANGED
|
@@ -5,6 +5,8 @@ export * from './base.dto';
|
|
|
5
5
|
export * from './connectors.dto';
|
|
6
6
|
export * from './constants';
|
|
7
7
|
export * from './coverage.dto';
|
|
8
|
+
export * from './customActions.dto';
|
|
9
|
+
export * from './customScores.dto';
|
|
8
10
|
export * from './defaultConnector.dto';
|
|
9
11
|
export * from './entityIdSummaries.dto';
|
|
10
12
|
export * from './enum.dto';
|
|
@@ -28,7 +28,7 @@ export const _NotificationAddress = z.object({
|
|
|
28
28
|
webhooks: z.array(z.string()).optional(),
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
export const _FlowContextKey = z.enum(['TONE', 'ACTION_GET_INSTRUCTIONS_ENABLED', 'GHOST_MODE_ENABLED']);
|
|
31
|
+
export const _FlowContextKey = z.enum(['TONE', 'ACTION_GET_INSTRUCTIONS_ENABLED', 'GHOST_MODE_ENABLED', 'REMINDER_COUNT']);
|
|
32
32
|
export const _FlowContext = z.record(_FlowContextKey, z.any());
|
|
33
33
|
|
|
34
34
|
export const _RawContentStrategy = z.object({
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export * from './platform.agents.dto';
|
|
2
2
|
export * from './platform.assets.dto';
|
|
3
3
|
export * from './platform.connectors.dto';
|
|
4
|
+
export * from './platform.customActions.dto';
|
|
5
|
+
export * from './platform.customScores.dto';
|
|
4
6
|
export * from './platform.findingsInsights.dto';
|
|
5
7
|
export * from './platform.findings.dto';
|
|
6
8
|
export * from './platform.flows.dto';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {z} from 'zod';
|
|
2
|
+
import {_CustomActionDto, _CustomActionUpsertDto} from '../customActions.dto';
|
|
3
|
+
|
|
4
|
+
export const _PlatformCustomActionDto = _CustomActionDto.extend({
|
|
5
|
+
tid: z.string(),
|
|
6
|
+
});
|
|
7
|
+
export type PlatformCustomActionDto = z.infer<typeof _PlatformCustomActionDto>;
|
|
8
|
+
|
|
9
|
+
export const _PlatformCustomActionUpsertDto = _CustomActionUpsertDto.extend({
|
|
10
|
+
tid: z.string(),
|
|
11
|
+
});
|
|
12
|
+
export type PlatformCustomActionUpsertDto = z.infer<typeof _PlatformCustomActionUpsertDto>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {z} from 'zod';
|
|
2
|
+
import {_CustomScoreCohortDto, _CustomScoreCohortUpsertDto, _CustomScoreValueDto, _CustomScoreValueUpsertDto} from '../customScores.dto';
|
|
3
|
+
|
|
4
|
+
export const _PlatformCustomScoreValueDto = _CustomScoreValueDto.extend({
|
|
5
|
+
tid: z.string(),
|
|
6
|
+
});
|
|
7
|
+
export type PlatformCustomScoreValueDto = z.infer<typeof _PlatformCustomScoreValueDto>;
|
|
8
|
+
|
|
9
|
+
export const _PlatformCustomScoreValueUpsertDto = _CustomScoreValueUpsertDto.extend({
|
|
10
|
+
tid: z.string(),
|
|
11
|
+
});
|
|
12
|
+
export type PlatformCustomScoreValueUpsertDto = z.infer<typeof _PlatformCustomScoreValueUpsertDto>;
|
|
13
|
+
|
|
14
|
+
export const _PlatformCustomScoreCohortDto = _CustomScoreCohortDto.extend({
|
|
15
|
+
tid: z.string(),
|
|
16
|
+
});
|
|
17
|
+
export type PlatformCustomScoreCohortDto = z.infer<typeof _PlatformCustomScoreCohortDto>;
|
|
18
|
+
|
|
19
|
+
export const _PlatformCustomScoreCohortUpsertDto = _CustomScoreCohortDto.extend({
|
|
20
|
+
tid: z.string(),
|
|
21
|
+
});
|
|
22
|
+
export type PlatformCustomScoreCohortUpsertDto = z.infer<typeof _PlatformCustomScoreCohortUpsertDto>;
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {z} from 'zod';
|
|
2
|
+
import {FindingDto, FindingUpsertDto, _FindingSpecDto, _FindingSpecUpsertDto} from '../findings.dto';
|
|
2
3
|
import {TenantBased, UpsertTenantBased} from './tenant.based.dto';
|
|
3
4
|
|
|
4
5
|
export type PlatformFindingUpsertDto = FindingUpsertDto & UpsertTenantBased;
|
|
5
6
|
|
|
6
7
|
export type PlatformFindingDto = FindingDto & TenantBased;
|
|
8
|
+
|
|
9
|
+
export const _PlatformFindingSpecDto = _FindingSpecDto.extend({
|
|
10
|
+
tid: z.string(),
|
|
11
|
+
});
|
|
12
|
+
export type PlatformFindingSpecDto = z.infer<typeof _PlatformFindingSpecDto>;
|
|
13
|
+
|
|
14
|
+
export const _PlatformFindingSpecUpsertDto = _FindingSpecUpsertDto.extend({
|
|
15
|
+
tid: z.string(),
|
|
16
|
+
});
|
|
17
|
+
export type PlatformFindingSpecUpsertDto = z.infer<typeof _PlatformFindingSpecUpsertDto>;
|
package/src/services/AmpApi.ts
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
AgentDto,
|
|
3
|
+
AgentUpsertDto,
|
|
4
|
+
AssetDto,
|
|
5
|
+
CustomActionDto,
|
|
6
|
+
CustomActionUpsertDto,
|
|
7
|
+
CustomScoreCohortDto,
|
|
8
|
+
CustomScoreCohortUpsertDto,
|
|
9
|
+
CustomScoreValueDto,
|
|
10
|
+
CustomScoreValueUpsertDto,
|
|
11
|
+
FindingSpecDto,
|
|
12
|
+
FindingSpecUpsertDto,
|
|
13
|
+
ProviderDto,
|
|
14
|
+
ReportResultDto,
|
|
15
|
+
SaasAssetDto,
|
|
16
|
+
SaasComponentDto,
|
|
17
|
+
SaasUserDto,
|
|
18
|
+
TenantDto,
|
|
19
|
+
TenantUpsertDto,
|
|
20
|
+
UserDto,
|
|
21
|
+
} from '../dto';
|
|
2
22
|
import {
|
|
3
23
|
AmpEntityService,
|
|
4
24
|
AmpEntityServiceImpl,
|
|
@@ -38,9 +58,13 @@ export class AmpApi {
|
|
|
38
58
|
readonly asset: AmpDataService<AssetDto>;
|
|
39
59
|
readonly cohorts: CohortService;
|
|
40
60
|
readonly connectors: ConnectorsService;
|
|
61
|
+
readonly customActions: AmpEntityService<CustomActionUpsertDto, CustomActionDto>;
|
|
62
|
+
readonly customScoreValues: AmpEntityService<CustomScoreValueUpsertDto, CustomScoreValueDto>;
|
|
63
|
+
readonly customScoreCohorts: AmpEntityService<CustomScoreCohortUpsertDto, CustomScoreCohortDto>;
|
|
41
64
|
readonly enums: EnumService;
|
|
42
65
|
readonly findings: FindingsService;
|
|
43
66
|
readonly findingsInsights: FindingsInsightsService;
|
|
67
|
+
readonly findingSpecs: AmpEntityService<FindingSpecUpsertDto, FindingSpecDto>;
|
|
44
68
|
readonly flowSpecs: FlowSpecsService;
|
|
45
69
|
readonly identity: AgentIdentityService;
|
|
46
70
|
readonly install: ConnectorInstallService;
|
|
@@ -62,9 +86,13 @@ export class AmpApi {
|
|
|
62
86
|
this.asset = new AmpDataServiceImpl<AssetDto>(rest, KIND.ASSETS);
|
|
63
87
|
this.cohorts = new CohortService(rest);
|
|
64
88
|
this.connectors = new ConnectorsService(rest);
|
|
89
|
+
this.customActions = new AmpEntityServiceImpl<CustomActionUpsertDto, CustomActionDto>(rest, KIND.CUSTOM_ACTIONS);
|
|
90
|
+
this.customScoreCohorts = new AmpEntityServiceImpl<CustomScoreCohortUpsertDto, CustomScoreCohortDto>(rest, KIND.CUSTOM_SCORE_COHORTS);
|
|
91
|
+
this.customScoreValues = new AmpEntityServiceImpl<CustomScoreValueUpsertDto, CustomScoreValueDto>(rest, KIND.CUSTOM_SCORE_VALUES);
|
|
65
92
|
this.enums = new DefaultEnumService(rest);
|
|
66
93
|
this.findings = new FindingsService(rest);
|
|
67
94
|
this.findingsInsights = new FindingsInsightsService(rest, KIND.FINDINGS_INSIGHTS);
|
|
95
|
+
this.findingSpecs = new AmpEntityServiceImpl<FindingSpecUpsertDto, FindingSpecDto>(rest, KIND.FINDING_SPECS);
|
|
68
96
|
this.flowSpecs = new FlowSpecsService(rest);
|
|
69
97
|
this.identity = new AgentIdentityService(rest);
|
|
70
98
|
this.install = new ConnectorInstallService(rest, TARGET_API_AGENT);
|
package/src/services/AmpSdk.ts
CHANGED
|
@@ -3,8 +3,24 @@ import {
|
|
|
3
3
|
PlatformAgentUpsertDto,
|
|
4
4
|
PlatformConnectorDto,
|
|
5
5
|
PlatformConnectorUpsertDto,
|
|
6
|
+
PlatformCustomActionDto,
|
|
7
|
+
PlatformCustomActionUpsertDto,
|
|
8
|
+
PlatformCustomScoreCohortDto,
|
|
9
|
+
PlatformCustomScoreCohortUpsertDto,
|
|
10
|
+
PlatformCustomScoreValueDto,
|
|
11
|
+
PlatformCustomScoreValueUpsertDto,
|
|
6
12
|
PlatformFindingDto,
|
|
13
|
+
PlatformFindingSpecDto,
|
|
14
|
+
PlatformFindingSpecUpsertDto,
|
|
7
15
|
PlatformFindingUpsertDto,
|
|
16
|
+
PlatformFlowSpecDto,
|
|
17
|
+
PlatformFlowSpecUpsertDto,
|
|
18
|
+
PlatformFlowStateDto,
|
|
19
|
+
PlatformFlowStateUpsertDto,
|
|
20
|
+
PlatformJobExecutionStateDto,
|
|
21
|
+
PlatformJobExecutionStateUpsertDto,
|
|
22
|
+
PlatformJobSpecDto,
|
|
23
|
+
PlatformJobSpecUpsertDto,
|
|
8
24
|
PlatformNotificationDto,
|
|
9
25
|
PlatformNotificationUpsertDto,
|
|
10
26
|
PlatformProviderUpsertDto,
|
|
@@ -37,14 +53,11 @@ import {
|
|
|
37
53
|
} from './entity.service';
|
|
38
54
|
import {AmpRestClientOptions, RestClient, getAmpRestClient} from './rest';
|
|
39
55
|
import {KIND, TARGET_API_PLATFORM} from './constants';
|
|
40
|
-
import {PlatformJobSpecDto, PlatformJobSpecUpsertDto} from '../dto/platform/platform.jobSpec.dto';
|
|
41
|
-
import {PlatformJobExecutionStateDto, PlatformJobExecutionStateUpsertDto} from '../dto/platform/platform.jobExecutionState.dto';
|
|
42
56
|
import {DefaultEnumService, EnumService} from './rest/EnumService';
|
|
43
57
|
import {AmpSdkSettingsService} from './settings.service';
|
|
44
58
|
import {AmpSaaSEntityService, AmpSaaSEntityServiceImpl, AmpSdkSaasAssetService, AmpSdkSaasComponentService, AmpSdkSaasUserService} from './saasEntity.service';
|
|
45
59
|
import {ContentfulService} from './contentful.service';
|
|
46
60
|
import {FindingsInsightsService} from './findingsInsights.service';
|
|
47
|
-
import {PlatformFlowSpecDto, PlatformFlowSpecUpsertDto, PlatformFlowStateDto, PlatformFlowStateUpsertDto} from '../dto/platform/platform.flows.dto';
|
|
48
61
|
|
|
49
62
|
export type AmpSdkOptions = AmpRestClientOptions;
|
|
50
63
|
|
|
@@ -62,8 +75,12 @@ export class AmpSdkServices {
|
|
|
62
75
|
readonly asset: AmpSdkAssetService;
|
|
63
76
|
readonly connectors: AmpEntityService<PlatformConnectorUpsertDto, PlatformConnectorDto>;
|
|
64
77
|
readonly contentful: ContentfulService;
|
|
78
|
+
readonly customActions: AmpEntityService<PlatformCustomActionUpsertDto, PlatformCustomActionDto>;
|
|
79
|
+
readonly customScoreCohorts: AmpEntityService<PlatformCustomScoreCohortUpsertDto, PlatformCustomScoreCohortDto>;
|
|
80
|
+
readonly customScoreValues: AmpEntityService<PlatformCustomScoreValueUpsertDto, PlatformCustomScoreValueDto>;
|
|
65
81
|
readonly enums: EnumService;
|
|
66
82
|
readonly findings: AmpSaaSEntityService<PlatformFindingUpsertDto, PlatformFindingDto>;
|
|
83
|
+
readonly findingSpecs: AmpSaaSEntityService<PlatformFindingSpecUpsertDto, PlatformFindingSpecDto>;
|
|
67
84
|
readonly findingsInsights: FindingsInsightsService;
|
|
68
85
|
readonly flowSpecs: AmpSaaSEntityService<PlatformFlowSpecUpsertDto, PlatformFlowSpecDto>;
|
|
69
86
|
readonly flowStates: AmpSaaSEntityService<PlatformFlowStateUpsertDto, PlatformFlowStateDto>;
|
|
@@ -88,8 +105,12 @@ export class AmpSdkServices {
|
|
|
88
105
|
this.asset = new AmpSdkAssetService(rest, TARGET_API_PLATFORM);
|
|
89
106
|
this.connectors = new AmpEntityServiceImpl<PlatformConnectorUpsertDto, PlatformConnectorDto>(rest, KIND.CONNECTORS, TARGET_API_PLATFORM);
|
|
90
107
|
this.contentful = new ContentfulService();
|
|
108
|
+
this.customActions = new AmpEntityServiceImpl<PlatformCustomActionUpsertDto, PlatformCustomActionDto>(rest, KIND.CUSTOM_ACTIONS, TARGET_API_PLATFORM);
|
|
109
|
+
this.customScoreCohorts = new AmpEntityServiceImpl<PlatformCustomScoreCohortUpsertDto, PlatformCustomScoreCohortDto>(rest, KIND.CUSTOM_SCORE_COHORTS, TARGET_API_PLATFORM);
|
|
110
|
+
this.customScoreValues = new AmpEntityServiceImpl<PlatformCustomScoreValueUpsertDto, PlatformCustomScoreValueDto>(rest, KIND.CUSTOM_SCORE_VALUES, TARGET_API_PLATFORM);
|
|
91
111
|
this.enums = new DefaultEnumService(rest, TARGET_API_PLATFORM);
|
|
92
112
|
this.findings = new AmpSaaSEntityServiceImpl<PlatformFindingUpsertDto, PlatformFindingDto>(rest, KIND.FINDINGS, TARGET_API_PLATFORM);
|
|
113
|
+
this.findingSpecs = new AmpSaaSEntityServiceImpl<PlatformFindingSpecUpsertDto, PlatformFindingSpecDto>(rest, KIND.FINDING_SPECS, TARGET_API_PLATFORM);
|
|
93
114
|
this.findingsInsights = new FindingsInsightsService(rest, KIND.FINDINGS_INSIGHTS, TARGET_API_PLATFORM);
|
|
94
115
|
this.flowSpecs = new AmpSaaSEntityServiceImpl<PlatformFlowSpecUpsertDto, PlatformFlowSpecDto>(rest, KIND.FLOW_SPECS, TARGET_API_PLATFORM);
|
|
95
116
|
this.flowStates = new AmpSaaSEntityServiceImpl<PlatformFlowStateUpsertDto, PlatformFlowStateDto>(rest, KIND.FLOW_STATES, TARGET_API_PLATFORM);
|
|
@@ -13,11 +13,15 @@ export const KIND = {
|
|
|
13
13
|
AGENTS: 'agents',
|
|
14
14
|
ASSETS: 'assets',
|
|
15
15
|
CONNECTORS: 'connectors',
|
|
16
|
+
CUSTOM_ACTIONS: 'custom_actions',
|
|
17
|
+
CUSTOM_SCORE_COHORTS: 'custom_score_cohorts',
|
|
18
|
+
CUSTOM_SCORE_VALUES: 'custom_score_values',
|
|
16
19
|
ENUM_DEPARTMENTS: 'departments',
|
|
17
20
|
ENUM_ORGANIZATIONS: 'organizations',
|
|
18
21
|
ENUM_TITLES: 'titles',
|
|
19
22
|
FINDINGS: 'findings',
|
|
20
23
|
FINDINGS_INSIGHTS: 'findings_insights',
|
|
24
|
+
FINDING_SPECS: 'findings_specs',
|
|
21
25
|
FLOW_SPECS: 'flow_specs',
|
|
22
26
|
FLOW_STATES: 'flow_states',
|
|
23
27
|
JOB_EXECUTIONS: 'job_executions',
|