@ampsec/platform-client 13.2.1 → 13.3.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.
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { PlatformAgentDto, PlatformAgentUpsertDto, PlatformAssetDto, PlatformAssetUpsertDto, PlatformConnectorDto, PlatformConnectorUpsertDto, PlatformFindingDto, PlatformFindingUpsertDto, PlatformReportResultDto, PlatformReportResultUpsertDto, PlatformSaasAssetDto, PlatformSaasAssetUpsertDto, PlatformSaasComponentDto, PlatformSaasComponentUpsertDto, PlatformSaasUserDto, PlatformSaasUserUpsertDto, PlatformUserDto, PlatformUserUpsertDto, ProviderDto, TenantDto, TenantUpsertDto } from '../dto';
|
|
1
|
+
import { PlatformAgentDto, PlatformAgentUpsertDto, PlatformAssetDto, PlatformAssetUpsertDto, PlatformConnectorDto, PlatformConnectorUpsertDto, PlatformFindingDto, PlatformFindingUpsertDto, PlatformProviderUpsertDto, PlatformReportResultDto, PlatformReportResultUpsertDto, PlatformSaasAssetDto, PlatformSaasAssetUpsertDto, PlatformSaasComponentDto, PlatformSaasComponentUpsertDto, PlatformSaasUserDto, PlatformSaasUserUpsertDto, PlatformUserDto, PlatformUserUpsertDto, ProviderDto, TenantDto, TenantUpsertDto } from '../dto';
|
|
2
2
|
import { AmpEntityService, AmpGlobalEntityService, AmpSaaSEntityService } from './entity.service';
|
|
3
|
-
import { AmpDataService } from './data.service';
|
|
4
3
|
import { AmpRestClientOptions, RestClient } from './rest';
|
|
5
4
|
import { PlatformJobSpecDto, PlatformJobSpecUpsertDto } from '../dto/platform/platform.jobSpec.dto';
|
|
6
5
|
import { PlatformJobExecutionStateDto, PlatformJobExecutionStateUpsertDto } from '../dto/platform/platform.jobExecutionState.dto';
|
|
@@ -12,9 +11,7 @@ export type AmpSdkOptions = AmpRestClientOptions;
|
|
|
12
11
|
* trying to implement a simple web client you should leverage the AmpApi
|
|
13
12
|
* instead (see {@link AmpApi} ).
|
|
14
13
|
*
|
|
15
|
-
* This client provides CRUD access to
|
|
16
|
-
* have READ_ONLY access to the following resources:
|
|
17
|
-
* - providers: {@link AmpSdkServices.providers}
|
|
14
|
+
* This client provides CRUD access to all of the AMP API.
|
|
18
15
|
*/
|
|
19
16
|
export declare class AmpSdkServices {
|
|
20
17
|
readonly agents: AmpEntityService<PlatformAgentUpsertDto, PlatformAgentDto>;
|
|
@@ -23,7 +20,7 @@ export declare class AmpSdkServices {
|
|
|
23
20
|
readonly findings: AmpSaaSEntityService<PlatformFindingUpsertDto, PlatformFindingDto>;
|
|
24
21
|
readonly jobExecutions: AmpEntityService<PlatformJobExecutionStateUpsertDto, PlatformJobExecutionStateDto>;
|
|
25
22
|
readonly jobs: AmpEntityService<PlatformJobSpecUpsertDto, PlatformJobSpecDto>;
|
|
26
|
-
readonly providers:
|
|
23
|
+
readonly providers: AmpEntityService<PlatformProviderUpsertDto, ProviderDto>;
|
|
27
24
|
readonly reportResults: AmpSaaSEntityService<PlatformReportResultUpsertDto, PlatformReportResultDto>;
|
|
28
25
|
readonly saasAssets: AmpSaaSEntityService<PlatformSaasAssetUpsertDto, PlatformSaasAssetDto>;
|
|
29
26
|
readonly saasComponents: AmpSaaSEntityService<PlatformSaasComponentUpsertDto, PlatformSaasComponentDto>;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AmpSdkServices = void 0;
|
|
4
4
|
const entity_service_1 = require("./entity.service");
|
|
5
|
-
const data_service_1 = require("./data.service");
|
|
6
5
|
const rest_1 = require("./rest");
|
|
7
6
|
const constants_1 = require("./constants");
|
|
8
7
|
/**
|
|
@@ -12,9 +11,7 @@ const constants_1 = require("./constants");
|
|
|
12
11
|
* trying to implement a simple web client you should leverage the AmpApi
|
|
13
12
|
* instead (see {@link AmpApi} ).
|
|
14
13
|
*
|
|
15
|
-
* This client provides CRUD access to
|
|
16
|
-
* have READ_ONLY access to the following resources:
|
|
17
|
-
* - providers: {@link AmpSdkServices.providers}
|
|
14
|
+
* This client provides CRUD access to all of the AMP API.
|
|
18
15
|
*/
|
|
19
16
|
class AmpSdkServices {
|
|
20
17
|
constructor(rest) {
|
|
@@ -24,7 +21,7 @@ class AmpSdkServices {
|
|
|
24
21
|
this.findings = new entity_service_1.AmpSaaSEntityServiceImpl(rest, constants_1.KIND.FINDINGS, constants_1.TARGET_API_PLATFORM);
|
|
25
22
|
this.jobExecutions = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.JOB_EXECUTIONS, constants_1.TARGET_API_PLATFORM);
|
|
26
23
|
this.jobs = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.JOB_SPEC, constants_1.TARGET_API_PLATFORM);
|
|
27
|
-
this.providers = new
|
|
24
|
+
this.providers = new entity_service_1.AmpEntityServiceImpl(rest, constants_1.KIND.PROVIDERS, constants_1.TARGET_API_PLATFORM);
|
|
28
25
|
this.reportResults = new entity_service_1.AmpSaaSEntityServiceImpl(rest, constants_1.KIND.REPORT_RESULTS, constants_1.TARGET_API_PLATFORM);
|
|
29
26
|
this.saasAssets = new entity_service_1.AmpSaaSEntityServiceImpl(rest, constants_1.KIND.SAAS_ASSETS, constants_1.TARGET_API_PLATFORM);
|
|
30
27
|
this.saasComponents = new entity_service_1.AmpSaaSEntityServiceImpl(rest, constants_1.KIND.SAAS_COMPONENTS, 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":";;;AAwBA,qDAA4K;AAC5K,iCAA0E;AAC1E,2CAAsD;AAMtD;;;;;;;;GAQG;AACH,MAAa,cAAc;IAezB,YAAY,IAAgB;QAC1B,IAAI,CAAC,MAAM,GAAG,IA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6B,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;IAC7H,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;AAnCD,wCAmCC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ampsec/platform-client",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.3.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/src/index.js",
|
|
6
6
|
"runkitExampleFilename": "example/main.js",
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"lint": "gts lint src",
|
|
15
15
|
"clean": "gts clean src",
|
|
16
16
|
"fix": "gts fix",
|
|
17
|
-
"test": "jest"
|
|
17
|
+
"test": "jest",
|
|
18
|
+
"verify": "npm run lint && npm run test && npm run build"
|
|
18
19
|
},
|
|
19
20
|
"keywords": [],
|
|
20
21
|
"author": "Amplifier Security <engineering@amplifiersecurity.com>",
|
package/src/services/AmpSdk.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
PlatformConnectorUpsertDto,
|
|
8
8
|
PlatformFindingDto,
|
|
9
9
|
PlatformFindingUpsertDto,
|
|
10
|
+
PlatformProviderUpsertDto,
|
|
10
11
|
PlatformReportResultDto,
|
|
11
12
|
PlatformReportResultUpsertDto,
|
|
12
13
|
PlatformSaasAssetDto,
|
|
@@ -22,9 +23,8 @@ import {
|
|
|
22
23
|
TenantUpsertDto,
|
|
23
24
|
} from '../dto';
|
|
24
25
|
import {AmpEntityService, AmpEntityServiceImpl, AmpGlobalEntityService, AmpGlobalEntityServiceImpl, AmpSaaSEntityService, AmpSaaSEntityServiceImpl} from './entity.service';
|
|
25
|
-
import {AmpDataService, AmpDataServiceImpl} from './data.service';
|
|
26
26
|
import {AmpRestClientOptions, RestClient, getAmpRestClient} from './rest';
|
|
27
|
-
import {KIND,
|
|
27
|
+
import {KIND, TARGET_API_PLATFORM} from './constants';
|
|
28
28
|
import {PlatformJobSpecDto, PlatformJobSpecUpsertDto} from '../dto/platform/platform.jobSpec.dto';
|
|
29
29
|
import {PlatformJobExecutionStateDto, PlatformJobExecutionStateUpsertDto} from '../dto/platform/platform.jobExecutionState.dto';
|
|
30
30
|
|
|
@@ -37,9 +37,7 @@ export type AmpSdkOptions = AmpRestClientOptions;
|
|
|
37
37
|
* trying to implement a simple web client you should leverage the AmpApi
|
|
38
38
|
* instead (see {@link AmpApi} ).
|
|
39
39
|
*
|
|
40
|
-
* This client provides CRUD access to
|
|
41
|
-
* have READ_ONLY access to the following resources:
|
|
42
|
-
* - providers: {@link AmpSdkServices.providers}
|
|
40
|
+
* This client provides CRUD access to all of the AMP API.
|
|
43
41
|
*/
|
|
44
42
|
export class AmpSdkServices {
|
|
45
43
|
readonly agents: AmpEntityService<PlatformAgentUpsertDto, PlatformAgentDto>;
|
|
@@ -48,7 +46,7 @@ export class AmpSdkServices {
|
|
|
48
46
|
readonly findings: AmpSaaSEntityService<PlatformFindingUpsertDto, PlatformFindingDto>;
|
|
49
47
|
readonly jobExecutions: AmpEntityService<PlatformJobExecutionStateUpsertDto, PlatformJobExecutionStateDto>;
|
|
50
48
|
readonly jobs: AmpEntityService<PlatformJobSpecUpsertDto, PlatformJobSpecDto>;
|
|
51
|
-
readonly providers:
|
|
49
|
+
readonly providers: AmpEntityService<PlatformProviderUpsertDto, ProviderDto>;
|
|
52
50
|
readonly reportResults: AmpSaaSEntityService<PlatformReportResultUpsertDto, PlatformReportResultDto>;
|
|
53
51
|
readonly saasAssets: AmpSaaSEntityService<PlatformSaasAssetUpsertDto, PlatformSaasAssetDto>;
|
|
54
52
|
readonly saasComponents: AmpSaaSEntityService<PlatformSaasComponentUpsertDto, PlatformSaasComponentDto>;
|
|
@@ -63,7 +61,7 @@ export class AmpSdkServices {
|
|
|
63
61
|
this.findings = new AmpSaaSEntityServiceImpl<PlatformFindingUpsertDto, PlatformFindingDto>(rest, KIND.FINDINGS, TARGET_API_PLATFORM);
|
|
64
62
|
this.jobExecutions = new AmpEntityServiceImpl<PlatformJobExecutionStateUpsertDto, PlatformJobExecutionStateDto>(rest, KIND.JOB_EXECUTIONS, TARGET_API_PLATFORM);
|
|
65
63
|
this.jobs = new AmpEntityServiceImpl<PlatformJobSpecUpsertDto, PlatformJobSpecDto>(rest, KIND.JOB_SPEC, TARGET_API_PLATFORM);
|
|
66
|
-
this.providers = new
|
|
64
|
+
this.providers = new AmpEntityServiceImpl<PlatformProviderUpsertDto, ProviderDto>(rest, KIND.PROVIDERS, TARGET_API_PLATFORM);
|
|
67
65
|
this.reportResults = new AmpSaaSEntityServiceImpl<PlatformReportResultUpsertDto, PlatformReportResultDto>(rest, KIND.REPORT_RESULTS, TARGET_API_PLATFORM);
|
|
68
66
|
this.saasAssets = new AmpSaaSEntityServiceImpl<PlatformSaasAssetUpsertDto, PlatformSaasAssetDto>(rest, KIND.SAAS_ASSETS, TARGET_API_PLATFORM);
|
|
69
67
|
this.saasComponents = new AmpSaaSEntityServiceImpl<PlatformSaasComponentUpsertDto, PlatformSaasComponentDto>(rest, KIND.SAAS_COMPONENTS, TARGET_API_PLATFORM);
|