@ampsec/platform-client 63.3.0 → 64.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/dto/actionExecution.dto.d.ts +12 -6
- package/build/src/dto/actionExecution.dto.js +2 -1
- package/build/src/dto/actionExecution.dto.js.map +1 -1
- package/build/src/dto/platform/platform.actionExecution.dto.d.ts +12 -6
- package/build/src/services/AmpSdk.d.ts +3 -2
- package/build/src/services/AmpSdk.js +2 -1
- package/build/src/services/AmpSdk.js.map +1 -1
- package/build/src/services/connector.platform.service.d.ts +7 -0
- package/build/src/services/connector.platform.service.js +19 -0
- package/build/src/services/connector.platform.service.js.map +1 -0
- package/package.json +1 -1
- package/src/dto/actionExecution.dto.ts +2 -1
- package/src/services/AmpSdk.ts +3 -4
- package/src/services/connector.platform.service.ts +18 -0
|
@@ -10,7 +10,8 @@ export declare const _ActionExecutionDto: z.ZodObject<{
|
|
|
10
10
|
updatedAt: z.ZodString;
|
|
11
11
|
deletedAt: z.ZodNullable<z.ZodString>;
|
|
12
12
|
tid: z.ZodString;
|
|
13
|
-
|
|
13
|
+
actionSpecId: z.ZodString;
|
|
14
|
+
flowStateId: z.ZodNullable<z.ZodString>;
|
|
14
15
|
status: z.ZodNativeEnum<typeof ActionExecutionStatus>;
|
|
15
16
|
input: z.ZodUnknown;
|
|
16
17
|
output: z.ZodUnknown;
|
|
@@ -23,7 +24,8 @@ export declare const _ActionExecutionDto: z.ZodObject<{
|
|
|
23
24
|
createdAt: string;
|
|
24
25
|
updatedAt: string;
|
|
25
26
|
deletedAt: string | null;
|
|
26
|
-
|
|
27
|
+
actionSpecId: string;
|
|
28
|
+
flowStateId: string | null;
|
|
27
29
|
executionTime: string | null;
|
|
28
30
|
executionDuration: number | null;
|
|
29
31
|
input?: unknown;
|
|
@@ -35,7 +37,8 @@ export declare const _ActionExecutionDto: z.ZodObject<{
|
|
|
35
37
|
createdAt: string;
|
|
36
38
|
updatedAt: string;
|
|
37
39
|
deletedAt: string | null;
|
|
38
|
-
|
|
40
|
+
actionSpecId: string;
|
|
41
|
+
flowStateId: string | null;
|
|
39
42
|
executionTime: string | null;
|
|
40
43
|
executionDuration: number | null;
|
|
41
44
|
input?: unknown;
|
|
@@ -50,14 +53,16 @@ export declare const _ActionExecutionUpsertDto: z.ZodObject<{
|
|
|
50
53
|
createdAt: z.ZodOptional<z.ZodString>;
|
|
51
54
|
updatedAt: z.ZodOptional<z.ZodString>;
|
|
52
55
|
deletedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
53
|
-
|
|
56
|
+
actionSpecId: z.ZodString;
|
|
57
|
+
flowStateId: z.ZodNullable<z.ZodString>;
|
|
54
58
|
output: z.ZodUnknown;
|
|
55
59
|
executionTime: z.ZodNullable<z.ZodString>;
|
|
56
60
|
executionDuration: z.ZodNullable<z.ZodNumber>;
|
|
57
61
|
}, "strip", z.ZodTypeAny, {
|
|
58
62
|
status: ActionExecutionStatus;
|
|
59
63
|
tid: string;
|
|
60
|
-
|
|
64
|
+
actionSpecId: string;
|
|
65
|
+
flowStateId: string | null;
|
|
61
66
|
executionTime: string | null;
|
|
62
67
|
executionDuration: number | null;
|
|
63
68
|
input?: unknown;
|
|
@@ -69,7 +74,8 @@ export declare const _ActionExecutionUpsertDto: z.ZodObject<{
|
|
|
69
74
|
}, {
|
|
70
75
|
status: ActionExecutionStatus;
|
|
71
76
|
tid: string;
|
|
72
|
-
|
|
77
|
+
actionSpecId: string;
|
|
78
|
+
flowStateId: string | null;
|
|
73
79
|
executionTime: string | null;
|
|
74
80
|
executionDuration: number | null;
|
|
75
81
|
input?: unknown;
|
|
@@ -10,7 +10,8 @@ exports._ActionExecutionInput = zod_1.z.unknown();
|
|
|
10
10
|
exports._ActionExecutionOutput = zod_1.z.unknown();
|
|
11
11
|
exports._ActionExecutionDto = base_dto_1._BaseDto.extend({
|
|
12
12
|
tid: zod_1.z.string(),
|
|
13
|
-
|
|
13
|
+
actionSpecId: zod_1.z.string(),
|
|
14
|
+
flowStateId: zod_1.z.nullable(zod_1.z.string()),
|
|
14
15
|
status: zod_1.z.nativeEnum(actionExecution_status_1.ActionExecutionStatus),
|
|
15
16
|
input: exports._ActionExecutionInput,
|
|
16
17
|
output: exports._ActionExecutionOutput,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actionExecution.dto.js","sourceRoot":"","sources":["../../../src/dto/actionExecution.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,yCAAqD;AACrD,2EAAqE;AAErE,kIAAkI;AACrH,QAAA,qBAAqB,GAAG,OAAC,CAAC,OAAO,EAAE,CAAC;AAEjD,kIAAkI;AACrH,QAAA,sBAAsB,GAAG,OAAC,CAAC,OAAO,EAAE,CAAC;AAGrC,QAAA,mBAAmB,GAAG,mBAAQ,CAAC,MAAM,CAAC;IACjD,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"actionExecution.dto.js","sourceRoot":"","sources":["../../../src/dto/actionExecution.dto.ts"],"names":[],"mappings":";;;AAAA,6BAAsB;AACtB,yCAAqD;AACrD,2EAAqE;AAErE,kIAAkI;AACrH,QAAA,qBAAqB,GAAG,OAAC,CAAC,OAAO,EAAE,CAAC;AAEjD,kIAAkI;AACrH,QAAA,sBAAsB,GAAG,OAAC,CAAC,OAAO,EAAE,CAAC;AAGrC,QAAA,mBAAmB,GAAG,mBAAQ,CAAC,MAAM,CAAC;IACjD,GAAG,EAAE,OAAC,CAAC,MAAM,EAAE;IACf,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,WAAW,EAAE,OAAC,CAAC,QAAQ,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;IACnC,MAAM,EAAE,OAAC,CAAC,UAAU,CAAC,8CAAqB,CAAC;IAC3C,KAAK,EAAE,6BAAqB;IAC5B,MAAM,EAAE,8BAAsB;IAC9B,aAAa,EAAE,OAAC,CAAC,QAAQ,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;IACrC,iBAAiB,EAAE,OAAC,CAAC,QAAQ,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;CAC1C,CAAC,CAAC;AAGU,QAAA,yBAAyB,GAAG,2BAAmB,CAAC,OAAO,CAAC,0BAAe,CAAC,CAAC"}
|
|
@@ -2,7 +2,8 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const _PlatformActionExecutionDto: z.ZodObject<{
|
|
3
3
|
input: z.ZodUnknown;
|
|
4
4
|
status: z.ZodNativeEnum<typeof import("..").ActionExecutionStatus>;
|
|
5
|
-
|
|
5
|
+
actionSpecId: z.ZodString;
|
|
6
|
+
flowStateId: z.ZodNullable<z.ZodString>;
|
|
6
7
|
output: z.ZodUnknown;
|
|
7
8
|
executionTime: z.ZodNullable<z.ZodString>;
|
|
8
9
|
executionDuration: z.ZodNullable<z.ZodNumber>;
|
|
@@ -18,7 +19,8 @@ export declare const _PlatformActionExecutionDto: z.ZodObject<{
|
|
|
18
19
|
createdAt: string;
|
|
19
20
|
updatedAt: string;
|
|
20
21
|
deletedAt: string | null;
|
|
21
|
-
|
|
22
|
+
actionSpecId: string;
|
|
23
|
+
flowStateId: string | null;
|
|
22
24
|
executionTime: string | null;
|
|
23
25
|
executionDuration: number | null;
|
|
24
26
|
input?: unknown;
|
|
@@ -30,7 +32,8 @@ export declare const _PlatformActionExecutionDto: z.ZodObject<{
|
|
|
30
32
|
createdAt: string;
|
|
31
33
|
updatedAt: string;
|
|
32
34
|
deletedAt: string | null;
|
|
33
|
-
|
|
35
|
+
actionSpecId: string;
|
|
36
|
+
flowStateId: string | null;
|
|
34
37
|
executionTime: string | null;
|
|
35
38
|
executionDuration: number | null;
|
|
36
39
|
input?: unknown;
|
|
@@ -40,7 +43,8 @@ export type PlatformActionExecutionDto = z.infer<typeof _PlatformActionExecution
|
|
|
40
43
|
export declare const _PlatformActionExecutionUpsertDto: z.ZodObject<{
|
|
41
44
|
input: z.ZodUnknown;
|
|
42
45
|
status: z.ZodNativeEnum<typeof import("..").ActionExecutionStatus>;
|
|
43
|
-
|
|
46
|
+
actionSpecId: z.ZodString;
|
|
47
|
+
flowStateId: z.ZodNullable<z.ZodString>;
|
|
44
48
|
output: z.ZodUnknown;
|
|
45
49
|
executionTime: z.ZodNullable<z.ZodString>;
|
|
46
50
|
executionDuration: z.ZodNullable<z.ZodNumber>;
|
|
@@ -51,7 +55,8 @@ export declare const _PlatformActionExecutionUpsertDto: z.ZodObject<{
|
|
|
51
55
|
tid: z.ZodOptional<z.ZodString>;
|
|
52
56
|
}, "strip", z.ZodTypeAny, {
|
|
53
57
|
status: import("..").ActionExecutionStatus;
|
|
54
|
-
|
|
58
|
+
actionSpecId: string;
|
|
59
|
+
flowStateId: string | null;
|
|
55
60
|
executionTime: string | null;
|
|
56
61
|
executionDuration: number | null;
|
|
57
62
|
input?: unknown;
|
|
@@ -63,7 +68,8 @@ export declare const _PlatformActionExecutionUpsertDto: z.ZodObject<{
|
|
|
63
68
|
tid?: string | undefined;
|
|
64
69
|
}, {
|
|
65
70
|
status: import("..").ActionExecutionStatus;
|
|
66
|
-
|
|
71
|
+
actionSpecId: string;
|
|
72
|
+
flowStateId: string | null;
|
|
67
73
|
executionTime: string | null;
|
|
68
74
|
executionDuration: number | null;
|
|
69
75
|
input?: unknown;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PlatformActionExecutionDto, PlatformActionExecutionUpsertDto, PlatformAgentDto, PlatformAgentUpsertDto,
|
|
1
|
+
import { PlatformActionExecutionDto, PlatformActionExecutionUpsertDto, PlatformAgentDto, PlatformAgentUpsertDto, 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, PlatformTokenDto, PlatformTokenUpsertDto, ProviderDto, TenantDto, TenantUpsertDto } from '../dto';
|
|
2
2
|
import { AmpEntityService, AmpSdkAssetService, AmpSdkTenantService, AmpSdkUserService, TruncatableAmpEntityService } from './entity.service';
|
|
3
3
|
import { AmpRestClientOptions, RestClient } from './rest';
|
|
4
4
|
import { EnumService } from './rest/EnumService';
|
|
@@ -6,6 +6,7 @@ import { AmpSdkSettingsService } from './settings.service';
|
|
|
6
6
|
import { AmpSaaSEntityService, AmpSdkSaasAssetService, AmpSdkSaasComponentService, AmpSdkSaasUserService } from './saasEntity.service';
|
|
7
7
|
import { ContentfulService } from './contentful.service';
|
|
8
8
|
import { FindingsInsightsService } from './findingsInsights.service';
|
|
9
|
+
import { PlatformConnectorService } from './connector.platform.service';
|
|
9
10
|
export type AmpSdkOptions = AmpRestClientOptions;
|
|
10
11
|
/**
|
|
11
12
|
* AMP API
|
|
@@ -20,7 +21,7 @@ export declare class AmpSdkServices {
|
|
|
20
21
|
readonly actionExecutions: AmpEntityService<PlatformActionExecutionUpsertDto, PlatformActionExecutionDto>;
|
|
21
22
|
readonly agents: AmpEntityService<PlatformAgentUpsertDto, PlatformAgentDto>;
|
|
22
23
|
readonly asset: AmpSdkAssetService;
|
|
23
|
-
readonly connectors:
|
|
24
|
+
readonly connectors: PlatformConnectorService;
|
|
24
25
|
readonly contentful: ContentfulService;
|
|
25
26
|
readonly customActions: AmpEntityService<PlatformCustomActionUpsertDto, PlatformCustomActionDto>;
|
|
26
27
|
readonly customScoreCohorts: AmpEntityService<PlatformCustomScoreCohortUpsertDto, PlatformCustomScoreCohortDto>;
|
|
@@ -9,6 +9,7 @@ const settings_service_1 = require("./settings.service");
|
|
|
9
9
|
const saasEntity_service_1 = require("./saasEntity.service");
|
|
10
10
|
const contentful_service_1 = require("./contentful.service");
|
|
11
11
|
const findingsInsights_service_1 = require("./findingsInsights.service");
|
|
12
|
+
const connector_platform_service_1 = require("./connector.platform.service");
|
|
12
13
|
/**
|
|
13
14
|
* AMP API
|
|
14
15
|
* This client is a wrapper around the AMP REST API meant to be used by
|
|
@@ -23,7 +24,7 @@ class AmpSdkServices {
|
|
|
23
24
|
this.actionExecutions = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.ACTION_EXECUTION, constants_1.TARGET_API_PLATFORM);
|
|
24
25
|
this.agents = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.AGENTS, constants_1.TARGET_API_PLATFORM);
|
|
25
26
|
this.asset = new entity_service_1.AmpSdkAssetService(rest, constants_1.TARGET_API_PLATFORM);
|
|
26
|
-
this.connectors = new
|
|
27
|
+
this.connectors = new connector_platform_service_1.PlatformConnectorService(rest);
|
|
27
28
|
this.contentful = new contentful_service_1.ContentfulService();
|
|
28
29
|
this.customActions = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.CUSTOM_ACTIONS, constants_1.TARGET_API_PLATFORM);
|
|
29
30
|
this.customScoreCohorts = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.CUSTOM_SCORE_COHORTS, 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"],"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F,IAAI,CAAC,SAAS,GAAG,IAAI,0CAAqB,CAAC,IAAI,EAAE,+BAAmB,CAAC,CAAC;QACtE,IAAI,CAAC,gBAAgB,GAAG,IAAI,gDAA+B,CAA+D,IAAI,EAAE,gBAAI,CAAC,kBAAkB,EAAE,+BAAmB,CAAC,CAAC;QAC9K,IAAI,CAAC,oBAAoB,GAAG,IAAI,gDAA+B,CAC7D,IAAI,EACJ,gBAAI,CAAC,sBAAsB,EAC3B,+BAAmB,CACpB,CAAC;QACF,IAAI,CAAC,eAAe,GAAG,IAAI,gDAA+B,CAA6D,IAAI,EAAE,gBAAI,CAAC,iBAAiB,EAAE,+BAAmB,CAAC,CAAC;QAE1K,IAAI,CAAC,QAAQ,GAAG,IAAI,wCAAqB,CAAC,IAAI,CAAC,CAAC;QAChD,IAAI,CAAC,OAAO,GAAG,IAAI,qCAAoB,CAA6B,IAAI,EAAE,gBAAI,CAAC,OAAO,EAAE,+BAAmB,CAAC,CAAC;QAC7G,IAAI,CAAC,MAAM,GAAG,IAAI,qCAAoB,CAA2C,IAAI,EAAE,gBAAI,CAAC,MAAM,EAAE,+BAAmB,CAAC,CAAC;QACzH,IAAI,CAAC,KAAK,GAAG,IAAI,kCAAiB,CAAC,IAAI,EAAE,+BAAmB,CAAC,CAAC;IAChE,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;AA1ED,wCA0EC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PlatformConnectorDto, PlatformConnectorUpsertDto } from '../dto';
|
|
2
|
+
import { AmpEntityServiceImpl } from './entity.service';
|
|
3
|
+
import { RestClient } from './rest';
|
|
4
|
+
export declare class PlatformConnectorService extends AmpEntityServiceImpl<PlatformConnectorUpsertDto, PlatformConnectorDto> {
|
|
5
|
+
constructor(rest: RestClient);
|
|
6
|
+
seedFindings(id: string): Promise<void>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PlatformConnectorService = void 0;
|
|
4
|
+
const constants_1 = require("./constants");
|
|
5
|
+
const entity_service_1 = require("./entity.service");
|
|
6
|
+
class PlatformConnectorService extends entity_service_1.AmpEntityServiceImpl {
|
|
7
|
+
constructor(rest) {
|
|
8
|
+
super(rest, constants_1.KIND.CONNECTORS, constants_1.TARGET_API_PLATFORM);
|
|
9
|
+
}
|
|
10
|
+
async seedFindings(id) {
|
|
11
|
+
await this.getPage({
|
|
12
|
+
url: `/${this.targetApi}/v1/${this.kind}/${id}/seed_findings`,
|
|
13
|
+
method: 'POST',
|
|
14
|
+
});
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.PlatformConnectorService = PlatformConnectorService;
|
|
19
|
+
//# sourceMappingURL=connector.platform.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"connector.platform.service.js","sourceRoot":"","sources":["../../../src/services/connector.platform.service.ts"],"names":[],"mappings":";;;AACA,2CAAsD;AACtD,qDAAsD;AAGtD,MAAa,wBAAyB,SAAQ,qCAAsE;IAClH,YAAY,IAAgB;QAC1B,KAAK,CAAC,IAAI,EAAE,gBAAI,CAAC,UAAU,EAAE,+BAAmB,CAAC,CAAC;IACpD,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,EAAU;QAC3B,MAAM,IAAI,CAAC,OAAO,CAAC;YACjB,GAAG,EAAE,IAAI,IAAI,CAAC,SAAS,OAAO,IAAI,CAAC,IAAI,IAAI,EAAE,gBAAgB;YAC7D,MAAM,EAAE,MAAM;SACf,CAAC,CAAC;QACH,OAAO;IACT,CAAC;CACF;AAZD,4DAYC"}
|
package/package.json
CHANGED
|
@@ -11,7 +11,8 @@ export type ActionExecutionOutput = z.infer<typeof _ActionExecutionOutput>;
|
|
|
11
11
|
|
|
12
12
|
export const _ActionExecutionDto = _BaseDto.extend({
|
|
13
13
|
tid: z.string(),
|
|
14
|
-
|
|
14
|
+
actionSpecId: z.string(),
|
|
15
|
+
flowStateId: z.nullable(z.string()),
|
|
15
16
|
status: z.nativeEnum(ActionExecutionStatus),
|
|
16
17
|
input: _ActionExecutionInput,
|
|
17
18
|
output: _ActionExecutionOutput,
|
package/src/services/AmpSdk.ts
CHANGED
|
@@ -3,8 +3,6 @@ import {
|
|
|
3
3
|
PlatformActionExecutionUpsertDto,
|
|
4
4
|
PlatformAgentDto,
|
|
5
5
|
PlatformAgentUpsertDto,
|
|
6
|
-
PlatformConnectorDto,
|
|
7
|
-
PlatformConnectorUpsertDto,
|
|
8
6
|
PlatformCustomActionDto,
|
|
9
7
|
PlatformCustomActionUpsertDto,
|
|
10
8
|
PlatformCustomScoreCohortDto,
|
|
@@ -60,6 +58,7 @@ import {AmpSdkSettingsService} from './settings.service';
|
|
|
60
58
|
import {AmpSaaSEntityService, AmpSaaSEntityServiceImpl, AmpSdkSaasAssetService, AmpSdkSaasComponentService, AmpSdkSaasUserService} from './saasEntity.service';
|
|
61
59
|
import {ContentfulService} from './contentful.service';
|
|
62
60
|
import {FindingsInsightsService} from './findingsInsights.service';
|
|
61
|
+
import {PlatformConnectorService} from './connector.platform.service';
|
|
63
62
|
|
|
64
63
|
export type AmpSdkOptions = AmpRestClientOptions;
|
|
65
64
|
|
|
@@ -76,7 +75,7 @@ export class AmpSdkServices {
|
|
|
76
75
|
readonly actionExecutions: AmpEntityService<PlatformActionExecutionUpsertDto, PlatformActionExecutionDto>;
|
|
77
76
|
readonly agents: AmpEntityService<PlatformAgentUpsertDto, PlatformAgentDto>;
|
|
78
77
|
readonly asset: AmpSdkAssetService;
|
|
79
|
-
readonly connectors:
|
|
78
|
+
readonly connectors: PlatformConnectorService;
|
|
80
79
|
readonly contentful: ContentfulService;
|
|
81
80
|
readonly customActions: AmpEntityService<PlatformCustomActionUpsertDto, PlatformCustomActionDto>;
|
|
82
81
|
readonly customScoreCohorts: AmpEntityService<PlatformCustomScoreCohortUpsertDto, PlatformCustomScoreCohortDto>;
|
|
@@ -108,7 +107,7 @@ export class AmpSdkServices {
|
|
|
108
107
|
this.actionExecutions = new AmpEntityServiceImpl<PlatformActionExecutionUpsertDto, PlatformActionExecutionDto>(rest, KIND.ACTION_EXECUTION, TARGET_API_PLATFORM);
|
|
109
108
|
this.agents = new AmpEntityServiceImpl<PlatformAgentUpsertDto, PlatformAgentDto>(rest, KIND.AGENTS, TARGET_API_PLATFORM);
|
|
110
109
|
this.asset = new AmpSdkAssetService(rest, TARGET_API_PLATFORM);
|
|
111
|
-
this.connectors = new
|
|
110
|
+
this.connectors = new PlatformConnectorService(rest);
|
|
112
111
|
this.contentful = new ContentfulService();
|
|
113
112
|
this.customActions = new AmpEntityServiceImpl<PlatformCustomActionUpsertDto, PlatformCustomActionDto>(rest, KIND.CUSTOM_ACTIONS, TARGET_API_PLATFORM);
|
|
114
113
|
this.customScoreCohorts = new AmpEntityServiceImpl<PlatformCustomScoreCohortUpsertDto, PlatformCustomScoreCohortDto>(rest, KIND.CUSTOM_SCORE_COHORTS, TARGET_API_PLATFORM);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {PlatformConnectorDto, PlatformConnectorUpsertDto} from '../dto';
|
|
2
|
+
import {KIND, TARGET_API_PLATFORM} from './constants';
|
|
3
|
+
import {AmpEntityServiceImpl} from './entity.service';
|
|
4
|
+
import {RestClient} from './rest';
|
|
5
|
+
|
|
6
|
+
export class PlatformConnectorService extends AmpEntityServiceImpl<PlatformConnectorUpsertDto, PlatformConnectorDto> {
|
|
7
|
+
constructor(rest: RestClient) {
|
|
8
|
+
super(rest, KIND.CONNECTORS, TARGET_API_PLATFORM);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
async seedFindings(id: string): Promise<void> {
|
|
12
|
+
await this.getPage({
|
|
13
|
+
url: `/${this.targetApi}/v1/${this.kind}/${id}/seed_findings`,
|
|
14
|
+
method: 'POST',
|
|
15
|
+
});
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
}
|