@arrowsphere/api-client 3.30.0 → 3.32.0-rc-jpb.1
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/CHANGELOG.md +27 -1
- package/build/AbstractHttpClient.d.ts +1 -0
- package/build/AbstractHttpClient.js +4 -0
- package/build/publicGraphQLClient.d.ts +2 -0
- package/build/publicGraphQLClient.js +9 -0
- package/build/security/standards/standardsClient.d.ts +15 -0
- package/build/security/standards/standardsClient.js +24 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,33 @@
|
|
|
3
3
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
4
4
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
5
5
|
|
|
6
|
-
## [3.
|
|
6
|
+
## [3.31.0] - 2023-05-26
|
|
7
|
+
|
|
8
|
+
### Changed
|
|
9
|
+
|
|
10
|
+
- Add method removeHeader
|
|
11
|
+
|
|
12
|
+
## [3.30.0] - 2023-05-26
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- Add a new Rest client & rename AbstractRestfulClient
|
|
17
|
+
- Allow to mergeHeaders
|
|
18
|
+
- Allow to propagate easily an error handler from PublicApiClient to its instances
|
|
19
|
+
- Add marketplacesAgg type
|
|
20
|
+
- Fix ScoresAggType
|
|
21
|
+
- Fix array type
|
|
22
|
+
- Fix CheckAggType
|
|
23
|
+
|
|
24
|
+
## [3.29.0] - 2023-05-11
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- Add GQL client with token security and strong typing
|
|
29
|
+
- Add GQL client with token security and strong typing
|
|
30
|
+
- Add option token security for the abstract restful client
|
|
31
|
+
|
|
32
|
+
## [3.28.0] - 2023-05-09
|
|
7
33
|
|
|
8
34
|
### Changed
|
|
9
35
|
|
|
@@ -50,6 +50,7 @@ export declare abstract class AbstractHttpClient {
|
|
|
50
50
|
* @param headers
|
|
51
51
|
*/
|
|
52
52
|
mergeHeaders(headers: Record<string, string>): this;
|
|
53
|
+
removeHeader(headerKey: string): this;
|
|
53
54
|
/**
|
|
54
55
|
* Allow to register error/exception handler.
|
|
55
56
|
* Handlers can be developed in another projects as long as they respect the interface HttpExceptionHandler.
|
|
@@ -73,6 +73,10 @@ class AbstractHttpClient {
|
|
|
73
73
|
this.setHeaders(mergedHeaders);
|
|
74
74
|
return this;
|
|
75
75
|
}
|
|
76
|
+
removeHeader(headerKey) {
|
|
77
|
+
delete this.headers[headerKey];
|
|
78
|
+
return this;
|
|
79
|
+
}
|
|
76
80
|
/**
|
|
77
81
|
* Allow to register error/exception handler.
|
|
78
82
|
* Handlers can be developed in another projects as long as they respect the interface HttpExceptionHandler.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { CatalogGraphQLClient } from './catalog/catalogGraphQLClient';
|
|
2
2
|
import { AbstractGraphQLClient } from './abstractGraphQLClient';
|
|
3
|
+
import { SecurityScoreGraphQLClient } from './securityScore';
|
|
3
4
|
export declare class PublicGraphQLClient extends AbstractGraphQLClient {
|
|
4
5
|
getCatalogGraphQLClient(): CatalogGraphQLClient;
|
|
6
|
+
getSecurityScoreGraphQLClient(): SecurityScoreGraphQLClient;
|
|
5
7
|
}
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PublicGraphQLClient = void 0;
|
|
4
4
|
const catalogGraphQLClient_1 = require("./catalog/catalogGraphQLClient");
|
|
5
5
|
const abstractGraphQLClient_1 = require("./abstractGraphQLClient");
|
|
6
|
+
const securityScore_1 = require("./securityScore");
|
|
6
7
|
class PublicGraphQLClient extends abstractGraphQLClient_1.AbstractGraphQLClient {
|
|
7
8
|
getCatalogGraphQLClient() {
|
|
8
9
|
return new catalogGraphQLClient_1.CatalogGraphQLClient()
|
|
@@ -12,6 +13,14 @@ class PublicGraphQLClient extends abstractGraphQLClient_1.AbstractGraphQLClient
|
|
|
12
13
|
.setToken(this.token)
|
|
13
14
|
.setHttpExceptionHandlers(this.httpExceptionHandlers);
|
|
14
15
|
}
|
|
16
|
+
getSecurityScoreGraphQLClient() {
|
|
17
|
+
return new securityScore_1.SecurityScoreGraphQLClient()
|
|
18
|
+
.setUrl(this.url)
|
|
19
|
+
.setToken(this.token)
|
|
20
|
+
.setHeaders(this.headers)
|
|
21
|
+
.setToken(this.token)
|
|
22
|
+
.setHttpExceptionHandlers(this.httpExceptionHandlers);
|
|
23
|
+
}
|
|
15
24
|
}
|
|
16
25
|
exports.PublicGraphQLClient = PublicGraphQLClient;
|
|
17
26
|
//# sourceMappingURL=publicGraphQLClient.js.map
|
|
@@ -8,7 +8,22 @@ export declare class StandardsClient extends AbstractRestfulClient {
|
|
|
8
8
|
* The base path of the API
|
|
9
9
|
*/
|
|
10
10
|
protected basePath: string;
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated
|
|
13
|
+
* Prefer using listSecurityStandardsWithAccountReference
|
|
14
|
+
*/
|
|
11
15
|
listSecurityStandards(subscriptionReference: string, parameters?: Parameters): Promise<GetResult<Standards>>;
|
|
16
|
+
listSecurityStandardsWithAccountReference(subscriptionReference: string, parameters: Parameters | undefined, accountReference: string): Promise<GetResult<Standards>>;
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated
|
|
19
|
+
* Prefer using listSecurityChecksWithAccountReference
|
|
20
|
+
*/
|
|
12
21
|
listSecurityChecks(subscriptionReference: string, standardReference: string, parameters?: Parameters): Promise<GetResult<Checks>>;
|
|
22
|
+
listSecurityChecksWithAccountReference(subscriptionReference: string, standardReference: string, accountReference: string, parameters?: Parameters): Promise<GetResult<Checks>>;
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated
|
|
25
|
+
* Prefer using listSecurityResourcesWithAccountReference
|
|
26
|
+
*/
|
|
13
27
|
listSecurityResources(subscriptionReference: string, standardReference: string, checkReference: string, parameters?: Parameters): Promise<GetResult<Resources>>;
|
|
28
|
+
listSecurityResourcesWithAccountReference(subscriptionReference: string, standardReference: string, checkReference: string, accountReference: string, parameters?: Parameters): Promise<GetResult<Resources>>;
|
|
14
29
|
}
|
|
@@ -14,18 +14,42 @@ class StandardsClient extends abstractRestfulClient_1.AbstractRestfulClient {
|
|
|
14
14
|
*/
|
|
15
15
|
this.basePath = '/security';
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated
|
|
19
|
+
* Prefer using listSecurityStandardsWithAccountReference
|
|
20
|
+
*/
|
|
17
21
|
async listSecurityStandards(subscriptionReference, parameters = {}) {
|
|
18
22
|
this.path = `/${subscriptionReference}/standards`;
|
|
19
23
|
return new getResult_1.GetResult(standards_1.Standards, await this.get(parameters));
|
|
20
24
|
}
|
|
25
|
+
async listSecurityStandardsWithAccountReference(subscriptionReference, parameters = {}, accountReference) {
|
|
26
|
+
this.path = `/${subscriptionReference}/accounts/${accountReference}/standards`;
|
|
27
|
+
return new getResult_1.GetResult(standards_1.Standards, await this.get(parameters));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated
|
|
31
|
+
* Prefer using listSecurityChecksWithAccountReference
|
|
32
|
+
*/
|
|
21
33
|
async listSecurityChecks(subscriptionReference, standardReference, parameters = {}) {
|
|
22
34
|
this.path = `/${subscriptionReference}/standards/${standardReference}/checks`;
|
|
23
35
|
return new getResult_1.GetResult(checks_1.Checks, await this.get(parameters));
|
|
24
36
|
}
|
|
37
|
+
async listSecurityChecksWithAccountReference(subscriptionReference, standardReference, accountReference, parameters = {}) {
|
|
38
|
+
this.path = `/${subscriptionReference}/accounts/${accountReference}/standards/${standardReference}/checks`;
|
|
39
|
+
return new getResult_1.GetResult(checks_1.Checks, await this.get(parameters));
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated
|
|
43
|
+
* Prefer using listSecurityResourcesWithAccountReference
|
|
44
|
+
*/
|
|
25
45
|
async listSecurityResources(subscriptionReference, standardReference, checkReference, parameters = {}) {
|
|
26
46
|
this.path = `/${subscriptionReference}/standards/${standardReference}/checks/${checkReference}/resources`;
|
|
27
47
|
return new getResult_1.GetResult(resources_1.Resources, await this.get(parameters));
|
|
28
48
|
}
|
|
49
|
+
async listSecurityResourcesWithAccountReference(subscriptionReference, standardReference, checkReference, accountReference, parameters = {}) {
|
|
50
|
+
this.path = `/${subscriptionReference}/accounts/${accountReference}/standards/${standardReference}/checks/${checkReference}/resources`;
|
|
51
|
+
return new getResult_1.GetResult(resources_1.Resources, await this.get(parameters));
|
|
52
|
+
}
|
|
29
53
|
}
|
|
30
54
|
exports.StandardsClient = StandardsClient;
|
|
31
55
|
//# sourceMappingURL=standardsClient.js.map
|
package/package.json
CHANGED