@arrowsphere/api-client 3.16.0 → 3.17.0-rc.2
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/abstractClient.js +27 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +2 -0
- package/build/publicApiClient.d.ts +4 -0
- package/build/publicApiClient.js +14 -0
- package/build/security/index.d.ts +2 -0
- package/build/security/index.js +15 -0
- package/build/security/register/entity/registrationLink.d.ts +13 -0
- package/build/security/register/entity/registrationLink.js +40 -0
- package/build/security/register/index.d.ts +2 -0
- package/build/security/register/index.js +15 -0
- package/build/security/register/registerClient.d.ts +13 -0
- package/build/security/register/registerClient.js +33 -0
- package/build/security/standards/entities/checks/checks.d.ts +17 -0
- package/build/security/standards/entities/checks/checks.js +48 -0
- package/build/security/standards/entities/checks/securityChecks.d.ts +37 -0
- package/build/security/standards/entities/checks/securityChecks.js +96 -0
- package/build/security/standards/entities/resources/resources.d.ts +26 -0
- package/build/security/standards/entities/resources/resources.js +69 -0
- package/build/security/standards/entities/resources/securityResources.d.ts +16 -0
- package/build/security/standards/entities/resources/securityResources.js +47 -0
- package/build/security/standards/entities/standards/securityStandards.d.ts +28 -0
- package/build/security/standards/entities/standards/securityStandards.js +75 -0
- package/build/security/standards/entities/standards/standards.d.ts +17 -0
- package/build/security/standards/entities/standards/standards.js +48 -0
- package/build/security/standards/index.d.ts +6 -0
- package/build/security/standards/index.js +19 -0
- package/build/security/standards/standardsClient.d.ts +14 -0
- package/build/security/standards/standardsClient.js +31 -0
- package/package.json +1 -1
package/build/abstractClient.js
CHANGED
|
@@ -63,6 +63,14 @@ class AbstractClient {
|
|
|
63
63
|
this.client = client !== null && client !== void 0 ? client : axios_1.default.create();
|
|
64
64
|
// Prevent axios from throwing its own errors, let us do that
|
|
65
65
|
this.client.defaults.validateStatus = null;
|
|
66
|
+
this.client.interceptors.request.use((request) => {
|
|
67
|
+
console.log('AXIOS - Starting Request : ', JSON.stringify(request, null, 2));
|
|
68
|
+
return request;
|
|
69
|
+
});
|
|
70
|
+
this.client.interceptors.response.use((response) => {
|
|
71
|
+
console.log('AXIOS - Response : ', JSON.stringify(response, null, 2));
|
|
72
|
+
return response;
|
|
73
|
+
});
|
|
66
74
|
}
|
|
67
75
|
/**
|
|
68
76
|
* Sets the Client ArrowSphere API key
|
|
@@ -124,9 +132,13 @@ class AbstractClient {
|
|
|
124
132
|
* @returns Promise\<AxiosResponse['data']\>
|
|
125
133
|
*/
|
|
126
134
|
async get(parameters = {}, headers = {}, options = {}) {
|
|
135
|
+
console.log('GET parameters', parameters);
|
|
136
|
+
console.log('GET options', options);
|
|
137
|
+
console.log('GET Header', headers);
|
|
127
138
|
const response = await this.client.get(this.generateUrl(parameters, options), {
|
|
128
139
|
headers: this.prepareHeaders(headers),
|
|
129
140
|
});
|
|
141
|
+
console.log('GET Response', response);
|
|
130
142
|
return this.getResponse(response);
|
|
131
143
|
}
|
|
132
144
|
/**
|
|
@@ -165,9 +177,14 @@ class AbstractClient {
|
|
|
165
177
|
* @param options - Options to send
|
|
166
178
|
*/
|
|
167
179
|
async post(payload = {}, parameters = {}, headers = {}, options = {}) {
|
|
180
|
+
console.log('POST parameters', parameters);
|
|
181
|
+
console.log('POST options', options);
|
|
182
|
+
console.log('POST payload', payload);
|
|
183
|
+
console.log('POST Header', headers);
|
|
168
184
|
const response = await this.client.post(this.generateUrl(parameters, options), payload, {
|
|
169
185
|
headers: this.prepareHeaders(headers),
|
|
170
186
|
});
|
|
187
|
+
console.log('POST Response', response);
|
|
171
188
|
return this.getResponse(response);
|
|
172
189
|
}
|
|
173
190
|
/**
|
|
@@ -179,9 +196,14 @@ class AbstractClient {
|
|
|
179
196
|
* @returns Promise\<void\>
|
|
180
197
|
*/
|
|
181
198
|
async put(payload = {}, parameters = {}, headers = {}, options = {}) {
|
|
199
|
+
console.log('PUT parameters', parameters);
|
|
200
|
+
console.log('PUT options', options);
|
|
201
|
+
console.log('PUT payload', payload);
|
|
202
|
+
console.log('PUT Header', headers);
|
|
182
203
|
const response = await this.client.put(this.generateUrl(parameters, options), payload, {
|
|
183
204
|
headers: this.prepareHeaders(headers),
|
|
184
205
|
});
|
|
206
|
+
console.log('PUT Response', response);
|
|
185
207
|
return this.getResponse(response);
|
|
186
208
|
}
|
|
187
209
|
/**
|
|
@@ -193,9 +215,14 @@ class AbstractClient {
|
|
|
193
215
|
* @returns Promise\<T\>
|
|
194
216
|
*/
|
|
195
217
|
async patch(payload = {}, parameters = {}, headers = {}, options = {}) {
|
|
218
|
+
console.log('PATCH parameters', parameters);
|
|
219
|
+
console.log('PATCH options', options);
|
|
220
|
+
console.log('PATCH payload', payload);
|
|
221
|
+
console.log('PATCH Header', headers);
|
|
196
222
|
const response = await this.client.patch(this.generateUrl(parameters, options), payload, {
|
|
197
223
|
headers: this.prepareHeaders(headers),
|
|
198
224
|
});
|
|
225
|
+
console.log('PATCH Response', response);
|
|
199
226
|
return this.getResponse(response);
|
|
200
227
|
}
|
|
201
228
|
/**
|
package/build/index.d.ts
CHANGED
|
@@ -8,11 +8,13 @@ export * from './customers/';
|
|
|
8
8
|
export * from './exception/';
|
|
9
9
|
export * from './general/';
|
|
10
10
|
export * from './getResult';
|
|
11
|
+
export * from './pagination';
|
|
11
12
|
export * from './licenses/';
|
|
12
13
|
export * from './orders/';
|
|
13
14
|
export * from './publicApiClient';
|
|
14
15
|
export * from './publicGraphQLClient';
|
|
15
16
|
export * from './shared/';
|
|
17
|
+
export * from './security/';
|
|
16
18
|
export * from './subscriptions/';
|
|
17
19
|
export { ContactInformation };
|
|
18
20
|
import * as ContactInformation from './contact';
|
package/build/index.js
CHANGED
|
@@ -33,11 +33,13 @@ __exportStar(require("./customers/"), exports);
|
|
|
33
33
|
__exportStar(require("./exception/"), exports);
|
|
34
34
|
__exportStar(require("./general/"), exports);
|
|
35
35
|
__exportStar(require("./getResult"), exports);
|
|
36
|
+
__exportStar(require("./pagination"), exports);
|
|
36
37
|
__exportStar(require("./licenses/"), exports);
|
|
37
38
|
__exportStar(require("./orders/"), exports);
|
|
38
39
|
__exportStar(require("./publicApiClient"), exports);
|
|
39
40
|
__exportStar(require("./publicGraphQLClient"), exports);
|
|
40
41
|
__exportStar(require("./shared/"), exports);
|
|
42
|
+
__exportStar(require("./security/"), exports);
|
|
41
43
|
__exportStar(require("./subscriptions/"), exports);
|
|
42
44
|
const ContactInformation = __importStar(require("./contact"));
|
|
43
45
|
exports.ContactInformation = ContactInformation;
|
|
@@ -7,6 +7,8 @@ import { OrdersClient } from './orders';
|
|
|
7
7
|
import { ContactClient } from './contact';
|
|
8
8
|
import { CampaignClient } from './campaign';
|
|
9
9
|
import { ConsumptionClient } from './consumption';
|
|
10
|
+
import { StandardsClient } from './security/standards/standardsClient';
|
|
11
|
+
import { RegisterClient } from './security';
|
|
10
12
|
/**
|
|
11
13
|
* Public API Client class, should be the main entry point for your calls
|
|
12
14
|
*/
|
|
@@ -53,5 +55,7 @@ export declare class PublicApiClient extends AbstractClient {
|
|
|
53
55
|
*/
|
|
54
56
|
getCampaignClient(): CampaignClient;
|
|
55
57
|
getConsumptionClient(): ConsumptionClient;
|
|
58
|
+
getSecurityStandardsClient(): StandardsClient;
|
|
59
|
+
getSecurityRegisterClient(): RegisterClient;
|
|
56
60
|
}
|
|
57
61
|
export default PublicApiClient;
|
package/build/publicApiClient.js
CHANGED
|
@@ -10,6 +10,8 @@ const orders_1 = require("./orders");
|
|
|
10
10
|
const contact_1 = require("./contact");
|
|
11
11
|
const campaign_1 = require("./campaign");
|
|
12
12
|
const consumption_1 = require("./consumption");
|
|
13
|
+
const standardsClient_1 = require("./security/standards/standardsClient");
|
|
14
|
+
const security_1 = require("./security");
|
|
13
15
|
/**
|
|
14
16
|
* Public API Client class, should be the main entry point for your calls
|
|
15
17
|
*/
|
|
@@ -103,6 +105,18 @@ class PublicApiClient extends abstractClient_1.AbstractClient {
|
|
|
103
105
|
.setApiKey(this.apiKey)
|
|
104
106
|
.setHeaders(this.headers);
|
|
105
107
|
}
|
|
108
|
+
getSecurityStandardsClient() {
|
|
109
|
+
return new standardsClient_1.StandardsClient(this.client)
|
|
110
|
+
.setUrl(this.url)
|
|
111
|
+
.setApiKey(this.apiKey)
|
|
112
|
+
.setHeaders(this.headers);
|
|
113
|
+
}
|
|
114
|
+
getSecurityRegisterClient() {
|
|
115
|
+
return new security_1.RegisterClient(this.client)
|
|
116
|
+
.setUrl(this.url)
|
|
117
|
+
.setApiKey(this.apiKey)
|
|
118
|
+
.setHeaders(this.headers);
|
|
119
|
+
}
|
|
106
120
|
}
|
|
107
121
|
exports.PublicApiClient = PublicApiClient;
|
|
108
122
|
exports.default = PublicApiClient;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./register"), exports);
|
|
14
|
+
__exportStar(require("./standards"), exports);
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../abstractEntity';
|
|
2
|
+
export declare enum RegistrationLinkFields {
|
|
3
|
+
COLUMN_REGISTRATION_LINK = "registrationLink"
|
|
4
|
+
}
|
|
5
|
+
export declare type RegistrationLinkType = {
|
|
6
|
+
[RegistrationLinkFields.COLUMN_REGISTRATION_LINK]: string;
|
|
7
|
+
};
|
|
8
|
+
export declare class RegistrationLink extends AbstractEntity<RegistrationLinkType> {
|
|
9
|
+
#private;
|
|
10
|
+
constructor(registrationLinkInput: RegistrationLinkType);
|
|
11
|
+
get registrationLink(): string;
|
|
12
|
+
toJSON(): RegistrationLinkType;
|
|
13
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
3
|
+
if (!privateMap.has(receiver)) {
|
|
4
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
5
|
+
}
|
|
6
|
+
privateMap.set(receiver, value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
10
|
+
if (!privateMap.has(receiver)) {
|
|
11
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
12
|
+
}
|
|
13
|
+
return privateMap.get(receiver);
|
|
14
|
+
};
|
|
15
|
+
var _registrationLink;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.RegistrationLink = exports.RegistrationLinkFields = void 0;
|
|
18
|
+
const abstractEntity_1 = require("../../../abstractEntity");
|
|
19
|
+
var RegistrationLinkFields;
|
|
20
|
+
(function (RegistrationLinkFields) {
|
|
21
|
+
RegistrationLinkFields["COLUMN_REGISTRATION_LINK"] = "registrationLink";
|
|
22
|
+
})(RegistrationLinkFields = exports.RegistrationLinkFields || (exports.RegistrationLinkFields = {}));
|
|
23
|
+
class RegistrationLink extends abstractEntity_1.AbstractEntity {
|
|
24
|
+
constructor(registrationLinkInput) {
|
|
25
|
+
super(registrationLinkInput);
|
|
26
|
+
_registrationLink.set(this, void 0);
|
|
27
|
+
__classPrivateFieldSet(this, _registrationLink, registrationLinkInput[RegistrationLinkFields.COLUMN_REGISTRATION_LINK]);
|
|
28
|
+
}
|
|
29
|
+
get registrationLink() {
|
|
30
|
+
return __classPrivateFieldGet(this, _registrationLink);
|
|
31
|
+
}
|
|
32
|
+
toJSON() {
|
|
33
|
+
return {
|
|
34
|
+
[RegistrationLinkFields.COLUMN_REGISTRATION_LINK]: this.registrationLink,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.RegistrationLink = RegistrationLink;
|
|
39
|
+
_registrationLink = new WeakMap();
|
|
40
|
+
//# sourceMappingURL=registrationLink.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./entity/registrationLink"), exports);
|
|
14
|
+
__exportStar(require("./registerClient"), exports);
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AbstractClient, Parameters } from '../../abstractClient';
|
|
2
|
+
import { GetResult } from '../../getResult';
|
|
3
|
+
import { RegistrationLink } from './entity/registrationLink';
|
|
4
|
+
export declare class RegisterClient extends AbstractClient {
|
|
5
|
+
/**
|
|
6
|
+
* The base path of the API
|
|
7
|
+
*/
|
|
8
|
+
protected basePath: string;
|
|
9
|
+
register(subscriptionReference: string, parameters?: Parameters): Promise<GetResult<RegistrationLink>>;
|
|
10
|
+
deregister(subscriptionReference: string, parameters?: Parameters): Promise<void>;
|
|
11
|
+
checkRegister(subscriptionReference: string, parameters?: Parameters): Promise<void>;
|
|
12
|
+
triggerAsynchronousUpdate(subscriptionReference: string, parameters?: Parameters): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RegisterClient = void 0;
|
|
4
|
+
const abstractClient_1 = require("../../abstractClient");
|
|
5
|
+
const getResult_1 = require("../../getResult");
|
|
6
|
+
const registrationLink_1 = require("./entity/registrationLink");
|
|
7
|
+
class RegisterClient extends abstractClient_1.AbstractClient {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
/**
|
|
11
|
+
* The base path of the API
|
|
12
|
+
*/
|
|
13
|
+
this.basePath = '/security';
|
|
14
|
+
}
|
|
15
|
+
async register(subscriptionReference, parameters = {}) {
|
|
16
|
+
this.path = `/${subscriptionReference}/register`;
|
|
17
|
+
return new getResult_1.GetResult(registrationLink_1.RegistrationLink, await this.post(parameters));
|
|
18
|
+
}
|
|
19
|
+
async deregister(subscriptionReference, parameters = {}) {
|
|
20
|
+
this.path = `/${subscriptionReference}/deregister`;
|
|
21
|
+
return await this.post(parameters);
|
|
22
|
+
}
|
|
23
|
+
async checkRegister(subscriptionReference, parameters = {}) {
|
|
24
|
+
this.path = `/${subscriptionReference}/register/check`;
|
|
25
|
+
return await this.get(parameters);
|
|
26
|
+
}
|
|
27
|
+
async triggerAsynchronousUpdate(subscriptionReference, parameters = {}) {
|
|
28
|
+
this.path = `/${subscriptionReference}/update`;
|
|
29
|
+
return await this.post(parameters);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.RegisterClient = RegisterClient;
|
|
33
|
+
//# sourceMappingURL=registerClient.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../../abstractEntity';
|
|
2
|
+
import { SecurityChecks, SecurityChecksType } from './securityChecks';
|
|
3
|
+
export declare enum ChecksFields {
|
|
4
|
+
COLUMN_CHECKS = "checks",
|
|
5
|
+
COLUMN_UPDATED_AT = "updatedAt"
|
|
6
|
+
}
|
|
7
|
+
export declare type ChecksType = {
|
|
8
|
+
[ChecksFields.COLUMN_CHECKS]: Array<SecurityChecksType>;
|
|
9
|
+
[ChecksFields.COLUMN_UPDATED_AT]: string;
|
|
10
|
+
};
|
|
11
|
+
export declare class Checks extends AbstractEntity<ChecksType> {
|
|
12
|
+
#private;
|
|
13
|
+
constructor(checksDataInput: ChecksType);
|
|
14
|
+
get checks(): Array<SecurityChecks>;
|
|
15
|
+
get updatedAt(): string;
|
|
16
|
+
toJSON(): ChecksType;
|
|
17
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
3
|
+
if (!privateMap.has(receiver)) {
|
|
4
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
5
|
+
}
|
|
6
|
+
privateMap.set(receiver, value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
10
|
+
if (!privateMap.has(receiver)) {
|
|
11
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
12
|
+
}
|
|
13
|
+
return privateMap.get(receiver);
|
|
14
|
+
};
|
|
15
|
+
var _checks, _updatedAt;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Checks = exports.ChecksFields = void 0;
|
|
18
|
+
const abstractEntity_1 = require("../../../../abstractEntity");
|
|
19
|
+
const securityChecks_1 = require("./securityChecks");
|
|
20
|
+
var ChecksFields;
|
|
21
|
+
(function (ChecksFields) {
|
|
22
|
+
ChecksFields["COLUMN_CHECKS"] = "checks";
|
|
23
|
+
ChecksFields["COLUMN_UPDATED_AT"] = "updatedAt";
|
|
24
|
+
})(ChecksFields = exports.ChecksFields || (exports.ChecksFields = {}));
|
|
25
|
+
class Checks extends abstractEntity_1.AbstractEntity {
|
|
26
|
+
constructor(checksDataInput) {
|
|
27
|
+
super(checksDataInput);
|
|
28
|
+
_checks.set(this, void 0);
|
|
29
|
+
_updatedAt.set(this, void 0);
|
|
30
|
+
__classPrivateFieldSet(this, _checks, checksDataInput[ChecksFields.COLUMN_CHECKS].map((securityChecks) => new securityChecks_1.SecurityChecks(securityChecks)));
|
|
31
|
+
__classPrivateFieldSet(this, _updatedAt, checksDataInput[ChecksFields.COLUMN_UPDATED_AT]);
|
|
32
|
+
}
|
|
33
|
+
get checks() {
|
|
34
|
+
return __classPrivateFieldGet(this, _checks);
|
|
35
|
+
}
|
|
36
|
+
get updatedAt() {
|
|
37
|
+
return __classPrivateFieldGet(this, _updatedAt);
|
|
38
|
+
}
|
|
39
|
+
toJSON() {
|
|
40
|
+
return {
|
|
41
|
+
[ChecksFields.COLUMN_CHECKS]: this.checks.map((securityChecks) => securityChecks.toJSON()),
|
|
42
|
+
[ChecksFields.COLUMN_UPDATED_AT]: this.updatedAt,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.Checks = Checks;
|
|
47
|
+
_checks = new WeakMap(), _updatedAt = new WeakMap();
|
|
48
|
+
//# sourceMappingURL=checks.js.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../../abstractEntity';
|
|
2
|
+
export declare enum SecurityChecksFields {
|
|
3
|
+
COLUMN_DESCRIPTION = "description",
|
|
4
|
+
COLUMN_FLAGGED = "flagged",
|
|
5
|
+
COLUMN_IS_FAILED = "isFailed",
|
|
6
|
+
COLUMN_METADATA = "metadata",
|
|
7
|
+
COLUMN_NAME = "name",
|
|
8
|
+
COLUMN_PROCESSED = "processed",
|
|
9
|
+
COLUMN_REFERENCE = "reference",
|
|
10
|
+
COLUMN_SCORE = "score",
|
|
11
|
+
COLUMN_SEVERITY = "severity"
|
|
12
|
+
}
|
|
13
|
+
export declare type SecurityChecksType = {
|
|
14
|
+
[SecurityChecksFields.COLUMN_DESCRIPTION]: string;
|
|
15
|
+
[SecurityChecksFields.COLUMN_FLAGGED]: number;
|
|
16
|
+
[SecurityChecksFields.COLUMN_IS_FAILED]: boolean;
|
|
17
|
+
[SecurityChecksFields.COLUMN_METADATA]: Array<string>;
|
|
18
|
+
[SecurityChecksFields.COLUMN_NAME]: string;
|
|
19
|
+
[SecurityChecksFields.COLUMN_PROCESSED]: number;
|
|
20
|
+
[SecurityChecksFields.COLUMN_REFERENCE]: string;
|
|
21
|
+
[SecurityChecksFields.COLUMN_SCORE]: number;
|
|
22
|
+
[SecurityChecksFields.COLUMN_SEVERITY]: string;
|
|
23
|
+
};
|
|
24
|
+
export declare class SecurityChecks extends AbstractEntity<SecurityChecksType> {
|
|
25
|
+
#private;
|
|
26
|
+
constructor(securityChecksDataInput: SecurityChecksType);
|
|
27
|
+
get description(): string;
|
|
28
|
+
get flagged(): number;
|
|
29
|
+
get isFailed(): boolean;
|
|
30
|
+
get metadata(): Array<string>;
|
|
31
|
+
get name(): string;
|
|
32
|
+
get processed(): number;
|
|
33
|
+
get reference(): string;
|
|
34
|
+
get score(): number;
|
|
35
|
+
get severity(): string;
|
|
36
|
+
toJSON(): SecurityChecksType;
|
|
37
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
3
|
+
if (!privateMap.has(receiver)) {
|
|
4
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
5
|
+
}
|
|
6
|
+
privateMap.set(receiver, value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
10
|
+
if (!privateMap.has(receiver)) {
|
|
11
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
12
|
+
}
|
|
13
|
+
return privateMap.get(receiver);
|
|
14
|
+
};
|
|
15
|
+
var _description, _flagged, _isFailed, _metadata, _name, _processed, _reference, _score, _severity;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.SecurityChecks = exports.SecurityChecksFields = void 0;
|
|
18
|
+
const abstractEntity_1 = require("../../../../abstractEntity");
|
|
19
|
+
var SecurityChecksFields;
|
|
20
|
+
(function (SecurityChecksFields) {
|
|
21
|
+
SecurityChecksFields["COLUMN_DESCRIPTION"] = "description";
|
|
22
|
+
SecurityChecksFields["COLUMN_FLAGGED"] = "flagged";
|
|
23
|
+
SecurityChecksFields["COLUMN_IS_FAILED"] = "isFailed";
|
|
24
|
+
SecurityChecksFields["COLUMN_METADATA"] = "metadata";
|
|
25
|
+
SecurityChecksFields["COLUMN_NAME"] = "name";
|
|
26
|
+
SecurityChecksFields["COLUMN_PROCESSED"] = "processed";
|
|
27
|
+
SecurityChecksFields["COLUMN_REFERENCE"] = "reference";
|
|
28
|
+
SecurityChecksFields["COLUMN_SCORE"] = "score";
|
|
29
|
+
SecurityChecksFields["COLUMN_SEVERITY"] = "severity";
|
|
30
|
+
})(SecurityChecksFields = exports.SecurityChecksFields || (exports.SecurityChecksFields = {}));
|
|
31
|
+
class SecurityChecks extends abstractEntity_1.AbstractEntity {
|
|
32
|
+
constructor(securityChecksDataInput) {
|
|
33
|
+
super(securityChecksDataInput);
|
|
34
|
+
_description.set(this, void 0);
|
|
35
|
+
_flagged.set(this, void 0);
|
|
36
|
+
_isFailed.set(this, void 0);
|
|
37
|
+
_metadata.set(this, void 0);
|
|
38
|
+
_name.set(this, void 0);
|
|
39
|
+
_processed.set(this, void 0);
|
|
40
|
+
_reference.set(this, void 0);
|
|
41
|
+
_score.set(this, void 0);
|
|
42
|
+
_severity.set(this, void 0);
|
|
43
|
+
__classPrivateFieldSet(this, _description, securityChecksDataInput[SecurityChecksFields.COLUMN_DESCRIPTION]);
|
|
44
|
+
__classPrivateFieldSet(this, _flagged, securityChecksDataInput[SecurityChecksFields.COLUMN_FLAGGED]);
|
|
45
|
+
__classPrivateFieldSet(this, _isFailed, securityChecksDataInput[SecurityChecksFields.COLUMN_IS_FAILED]);
|
|
46
|
+
__classPrivateFieldSet(this, _metadata, securityChecksDataInput[SecurityChecksFields.COLUMN_METADATA]);
|
|
47
|
+
__classPrivateFieldSet(this, _name, securityChecksDataInput[SecurityChecksFields.COLUMN_NAME]);
|
|
48
|
+
__classPrivateFieldSet(this, _processed, securityChecksDataInput[SecurityChecksFields.COLUMN_PROCESSED]);
|
|
49
|
+
__classPrivateFieldSet(this, _reference, securityChecksDataInput[SecurityChecksFields.COLUMN_REFERENCE]);
|
|
50
|
+
__classPrivateFieldSet(this, _score, securityChecksDataInput[SecurityChecksFields.COLUMN_SCORE]);
|
|
51
|
+
__classPrivateFieldSet(this, _severity, securityChecksDataInput[SecurityChecksFields.COLUMN_SEVERITY]);
|
|
52
|
+
}
|
|
53
|
+
get description() {
|
|
54
|
+
return __classPrivateFieldGet(this, _description);
|
|
55
|
+
}
|
|
56
|
+
get flagged() {
|
|
57
|
+
return __classPrivateFieldGet(this, _flagged);
|
|
58
|
+
}
|
|
59
|
+
get isFailed() {
|
|
60
|
+
return __classPrivateFieldGet(this, _isFailed);
|
|
61
|
+
}
|
|
62
|
+
get metadata() {
|
|
63
|
+
return __classPrivateFieldGet(this, _metadata);
|
|
64
|
+
}
|
|
65
|
+
get name() {
|
|
66
|
+
return __classPrivateFieldGet(this, _name);
|
|
67
|
+
}
|
|
68
|
+
get processed() {
|
|
69
|
+
return __classPrivateFieldGet(this, _processed);
|
|
70
|
+
}
|
|
71
|
+
get reference() {
|
|
72
|
+
return __classPrivateFieldGet(this, _reference);
|
|
73
|
+
}
|
|
74
|
+
get score() {
|
|
75
|
+
return __classPrivateFieldGet(this, _score);
|
|
76
|
+
}
|
|
77
|
+
get severity() {
|
|
78
|
+
return __classPrivateFieldGet(this, _severity);
|
|
79
|
+
}
|
|
80
|
+
toJSON() {
|
|
81
|
+
return {
|
|
82
|
+
[SecurityChecksFields.COLUMN_DESCRIPTION]: this.description,
|
|
83
|
+
[SecurityChecksFields.COLUMN_FLAGGED]: this.flagged,
|
|
84
|
+
[SecurityChecksFields.COLUMN_IS_FAILED]: this.isFailed,
|
|
85
|
+
[SecurityChecksFields.COLUMN_METADATA]: this.metadata,
|
|
86
|
+
[SecurityChecksFields.COLUMN_NAME]: this.name,
|
|
87
|
+
[SecurityChecksFields.COLUMN_PROCESSED]: this.processed,
|
|
88
|
+
[SecurityChecksFields.COLUMN_REFERENCE]: this.reference,
|
|
89
|
+
[SecurityChecksFields.COLUMN_SCORE]: this.score,
|
|
90
|
+
[SecurityChecksFields.COLUMN_SEVERITY]: this.severity,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
exports.SecurityChecks = SecurityChecks;
|
|
95
|
+
_description = new WeakMap(), _flagged = new WeakMap(), _isFailed = new WeakMap(), _metadata = new WeakMap(), _name = new WeakMap(), _processed = new WeakMap(), _reference = new WeakMap(), _score = new WeakMap(), _severity = new WeakMap();
|
|
96
|
+
//# sourceMappingURL=securityChecks.js.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../../abstractEntity';
|
|
2
|
+
import { SecurityResources, SecurityResourcesType } from './securityResources';
|
|
3
|
+
export declare enum ResourcesFields {
|
|
4
|
+
COLUMN_DESCRIPTION = "description",
|
|
5
|
+
COLUMN_METADATA = "metadata",
|
|
6
|
+
COLUMN_NAME = "name",
|
|
7
|
+
COLUMN_RESOURCES = "resources",
|
|
8
|
+
COLUMN_UPDATED_AT = "updatedAt"
|
|
9
|
+
}
|
|
10
|
+
export declare type ResourcesType = {
|
|
11
|
+
[ResourcesFields.COLUMN_DESCRIPTION]: string;
|
|
12
|
+
[ResourcesFields.COLUMN_METADATA]: Array<string>;
|
|
13
|
+
[ResourcesFields.COLUMN_NAME]: string;
|
|
14
|
+
[ResourcesFields.COLUMN_RESOURCES]: Array<SecurityResourcesType>;
|
|
15
|
+
[ResourcesFields.COLUMN_UPDATED_AT]: string;
|
|
16
|
+
};
|
|
17
|
+
export declare class Resources extends AbstractEntity<ResourcesType> {
|
|
18
|
+
#private;
|
|
19
|
+
constructor(resources: ResourcesType);
|
|
20
|
+
get description(): string;
|
|
21
|
+
get metadata(): Array<string>;
|
|
22
|
+
get name(): string;
|
|
23
|
+
get resources(): Array<SecurityResources>;
|
|
24
|
+
get updatedAt(): string;
|
|
25
|
+
toJSON(): ResourcesType;
|
|
26
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
3
|
+
if (!privateMap.has(receiver)) {
|
|
4
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
5
|
+
}
|
|
6
|
+
privateMap.set(receiver, value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
10
|
+
if (!privateMap.has(receiver)) {
|
|
11
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
12
|
+
}
|
|
13
|
+
return privateMap.get(receiver);
|
|
14
|
+
};
|
|
15
|
+
var _description, _metadata, _name, _resources, _updatedAt;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Resources = exports.ResourcesFields = void 0;
|
|
18
|
+
const abstractEntity_1 = require("../../../../abstractEntity");
|
|
19
|
+
const securityResources_1 = require("./securityResources");
|
|
20
|
+
var ResourcesFields;
|
|
21
|
+
(function (ResourcesFields) {
|
|
22
|
+
ResourcesFields["COLUMN_DESCRIPTION"] = "description";
|
|
23
|
+
ResourcesFields["COLUMN_METADATA"] = "metadata";
|
|
24
|
+
ResourcesFields["COLUMN_NAME"] = "name";
|
|
25
|
+
ResourcesFields["COLUMN_RESOURCES"] = "resources";
|
|
26
|
+
ResourcesFields["COLUMN_UPDATED_AT"] = "updatedAt";
|
|
27
|
+
})(ResourcesFields = exports.ResourcesFields || (exports.ResourcesFields = {}));
|
|
28
|
+
class Resources extends abstractEntity_1.AbstractEntity {
|
|
29
|
+
constructor(resources) {
|
|
30
|
+
super(resources);
|
|
31
|
+
_description.set(this, void 0);
|
|
32
|
+
_metadata.set(this, void 0);
|
|
33
|
+
_name.set(this, void 0);
|
|
34
|
+
_resources.set(this, void 0);
|
|
35
|
+
_updatedAt.set(this, void 0);
|
|
36
|
+
__classPrivateFieldSet(this, _description, resources[ResourcesFields.COLUMN_DESCRIPTION]);
|
|
37
|
+
__classPrivateFieldSet(this, _metadata, resources[ResourcesFields.COLUMN_METADATA]);
|
|
38
|
+
__classPrivateFieldSet(this, _name, resources[ResourcesFields.COLUMN_NAME]);
|
|
39
|
+
__classPrivateFieldSet(this, _resources, resources[ResourcesFields.COLUMN_RESOURCES].map((securityResources) => new securityResources_1.SecurityResources(securityResources)));
|
|
40
|
+
__classPrivateFieldSet(this, _updatedAt, resources[ResourcesFields.COLUMN_UPDATED_AT]);
|
|
41
|
+
}
|
|
42
|
+
get description() {
|
|
43
|
+
return __classPrivateFieldGet(this, _description);
|
|
44
|
+
}
|
|
45
|
+
get metadata() {
|
|
46
|
+
return __classPrivateFieldGet(this, _metadata);
|
|
47
|
+
}
|
|
48
|
+
get name() {
|
|
49
|
+
return __classPrivateFieldGet(this, _name);
|
|
50
|
+
}
|
|
51
|
+
get resources() {
|
|
52
|
+
return __classPrivateFieldGet(this, _resources);
|
|
53
|
+
}
|
|
54
|
+
get updatedAt() {
|
|
55
|
+
return __classPrivateFieldGet(this, _updatedAt);
|
|
56
|
+
}
|
|
57
|
+
toJSON() {
|
|
58
|
+
return {
|
|
59
|
+
[ResourcesFields.COLUMN_DESCRIPTION]: this.description,
|
|
60
|
+
[ResourcesFields.COLUMN_METADATA]: this.metadata,
|
|
61
|
+
[ResourcesFields.COLUMN_NAME]: this.name,
|
|
62
|
+
[ResourcesFields.COLUMN_RESOURCES]: this.resources.map((securityResources) => securityResources.toJSON()),
|
|
63
|
+
[ResourcesFields.COLUMN_UPDATED_AT]: this.updatedAt,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.Resources = Resources;
|
|
68
|
+
_description = new WeakMap(), _metadata = new WeakMap(), _name = new WeakMap(), _resources = new WeakMap(), _updatedAt = new WeakMap();
|
|
69
|
+
//# sourceMappingURL=resources.js.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../../abstractEntity';
|
|
2
|
+
export declare enum SecurityResourcesFields {
|
|
3
|
+
COLUMN_STATUS = "status",
|
|
4
|
+
COLUMN_VALUES = "values"
|
|
5
|
+
}
|
|
6
|
+
export declare type SecurityResourcesType = {
|
|
7
|
+
[SecurityResourcesFields.COLUMN_STATUS]: string;
|
|
8
|
+
[SecurityResourcesFields.COLUMN_VALUES]: Array<string>;
|
|
9
|
+
};
|
|
10
|
+
export declare class SecurityResources extends AbstractEntity<SecurityResourcesType> {
|
|
11
|
+
#private;
|
|
12
|
+
constructor(securityResources: SecurityResourcesType);
|
|
13
|
+
get status(): string;
|
|
14
|
+
get values(): Array<string>;
|
|
15
|
+
toJSON(): SecurityResourcesType;
|
|
16
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
3
|
+
if (!privateMap.has(receiver)) {
|
|
4
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
5
|
+
}
|
|
6
|
+
privateMap.set(receiver, value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
10
|
+
if (!privateMap.has(receiver)) {
|
|
11
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
12
|
+
}
|
|
13
|
+
return privateMap.get(receiver);
|
|
14
|
+
};
|
|
15
|
+
var _status, _values;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.SecurityResources = exports.SecurityResourcesFields = void 0;
|
|
18
|
+
const abstractEntity_1 = require("../../../../abstractEntity");
|
|
19
|
+
var SecurityResourcesFields;
|
|
20
|
+
(function (SecurityResourcesFields) {
|
|
21
|
+
SecurityResourcesFields["COLUMN_STATUS"] = "status";
|
|
22
|
+
SecurityResourcesFields["COLUMN_VALUES"] = "values";
|
|
23
|
+
})(SecurityResourcesFields = exports.SecurityResourcesFields || (exports.SecurityResourcesFields = {}));
|
|
24
|
+
class SecurityResources extends abstractEntity_1.AbstractEntity {
|
|
25
|
+
constructor(securityResources) {
|
|
26
|
+
super(securityResources);
|
|
27
|
+
_status.set(this, void 0);
|
|
28
|
+
_values.set(this, void 0);
|
|
29
|
+
__classPrivateFieldSet(this, _status, securityResources[SecurityResourcesFields.COLUMN_STATUS]);
|
|
30
|
+
__classPrivateFieldSet(this, _values, securityResources[SecurityResourcesFields.COLUMN_VALUES]);
|
|
31
|
+
}
|
|
32
|
+
get status() {
|
|
33
|
+
return __classPrivateFieldGet(this, _status);
|
|
34
|
+
}
|
|
35
|
+
get values() {
|
|
36
|
+
return __classPrivateFieldGet(this, _values);
|
|
37
|
+
}
|
|
38
|
+
toJSON() {
|
|
39
|
+
return {
|
|
40
|
+
[SecurityResourcesFields.COLUMN_STATUS]: this.status,
|
|
41
|
+
[SecurityResourcesFields.COLUMN_VALUES]: this.values,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.SecurityResources = SecurityResources;
|
|
46
|
+
_status = new WeakMap(), _values = new WeakMap();
|
|
47
|
+
//# sourceMappingURL=securityResources.js.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../../abstractEntity';
|
|
2
|
+
export declare enum SecurityStandardsFields {
|
|
3
|
+
COLUMN_FAILED = "failed",
|
|
4
|
+
COLUMN_NAME = "name",
|
|
5
|
+
COLUMN_PASSED = "passed",
|
|
6
|
+
COLUMN_REFERENCE = "reference",
|
|
7
|
+
COLUMN_SCORE = "score",
|
|
8
|
+
COLUMN_TOTAL = "total"
|
|
9
|
+
}
|
|
10
|
+
export declare type SecurityStandardsType = {
|
|
11
|
+
[SecurityStandardsFields.COLUMN_FAILED]: number;
|
|
12
|
+
[SecurityStandardsFields.COLUMN_NAME]: string;
|
|
13
|
+
[SecurityStandardsFields.COLUMN_PASSED]: number;
|
|
14
|
+
[SecurityStandardsFields.COLUMN_REFERENCE]: string;
|
|
15
|
+
[SecurityStandardsFields.COLUMN_SCORE]: number;
|
|
16
|
+
[SecurityStandardsFields.COLUMN_TOTAL]: number;
|
|
17
|
+
};
|
|
18
|
+
export declare class SecurityStandards extends AbstractEntity<SecurityStandardsType> {
|
|
19
|
+
#private;
|
|
20
|
+
constructor(standardsSecurityDataInput: SecurityStandardsType);
|
|
21
|
+
get failed(): number;
|
|
22
|
+
get name(): string;
|
|
23
|
+
get passed(): number;
|
|
24
|
+
get reference(): string;
|
|
25
|
+
get score(): number;
|
|
26
|
+
get total(): number;
|
|
27
|
+
toJSON(): SecurityStandardsType;
|
|
28
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
3
|
+
if (!privateMap.has(receiver)) {
|
|
4
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
5
|
+
}
|
|
6
|
+
privateMap.set(receiver, value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
10
|
+
if (!privateMap.has(receiver)) {
|
|
11
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
12
|
+
}
|
|
13
|
+
return privateMap.get(receiver);
|
|
14
|
+
};
|
|
15
|
+
var _failed, _name, _passed, _reference, _score, _total;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.SecurityStandards = exports.SecurityStandardsFields = void 0;
|
|
18
|
+
const abstractEntity_1 = require("../../../../abstractEntity");
|
|
19
|
+
var SecurityStandardsFields;
|
|
20
|
+
(function (SecurityStandardsFields) {
|
|
21
|
+
SecurityStandardsFields["COLUMN_FAILED"] = "failed";
|
|
22
|
+
SecurityStandardsFields["COLUMN_NAME"] = "name";
|
|
23
|
+
SecurityStandardsFields["COLUMN_PASSED"] = "passed";
|
|
24
|
+
SecurityStandardsFields["COLUMN_REFERENCE"] = "reference";
|
|
25
|
+
SecurityStandardsFields["COLUMN_SCORE"] = "score";
|
|
26
|
+
SecurityStandardsFields["COLUMN_TOTAL"] = "total";
|
|
27
|
+
})(SecurityStandardsFields = exports.SecurityStandardsFields || (exports.SecurityStandardsFields = {}));
|
|
28
|
+
class SecurityStandards extends abstractEntity_1.AbstractEntity {
|
|
29
|
+
constructor(standardsSecurityDataInput) {
|
|
30
|
+
super(standardsSecurityDataInput);
|
|
31
|
+
_failed.set(this, void 0);
|
|
32
|
+
_name.set(this, void 0);
|
|
33
|
+
_passed.set(this, void 0);
|
|
34
|
+
_reference.set(this, void 0);
|
|
35
|
+
_score.set(this, void 0);
|
|
36
|
+
_total.set(this, void 0);
|
|
37
|
+
__classPrivateFieldSet(this, _failed, standardsSecurityDataInput[SecurityStandardsFields.COLUMN_FAILED]);
|
|
38
|
+
__classPrivateFieldSet(this, _name, standardsSecurityDataInput[SecurityStandardsFields.COLUMN_NAME]);
|
|
39
|
+
__classPrivateFieldSet(this, _passed, standardsSecurityDataInput[SecurityStandardsFields.COLUMN_PASSED]);
|
|
40
|
+
__classPrivateFieldSet(this, _reference, standardsSecurityDataInput[SecurityStandardsFields.COLUMN_REFERENCE]);
|
|
41
|
+
__classPrivateFieldSet(this, _score, standardsSecurityDataInput[SecurityStandardsFields.COLUMN_SCORE]);
|
|
42
|
+
__classPrivateFieldSet(this, _total, standardsSecurityDataInput[SecurityStandardsFields.COLUMN_TOTAL]);
|
|
43
|
+
}
|
|
44
|
+
get failed() {
|
|
45
|
+
return __classPrivateFieldGet(this, _failed);
|
|
46
|
+
}
|
|
47
|
+
get name() {
|
|
48
|
+
return __classPrivateFieldGet(this, _name);
|
|
49
|
+
}
|
|
50
|
+
get passed() {
|
|
51
|
+
return __classPrivateFieldGet(this, _passed);
|
|
52
|
+
}
|
|
53
|
+
get reference() {
|
|
54
|
+
return __classPrivateFieldGet(this, _reference);
|
|
55
|
+
}
|
|
56
|
+
get score() {
|
|
57
|
+
return __classPrivateFieldGet(this, _score);
|
|
58
|
+
}
|
|
59
|
+
get total() {
|
|
60
|
+
return __classPrivateFieldGet(this, _total);
|
|
61
|
+
}
|
|
62
|
+
toJSON() {
|
|
63
|
+
return {
|
|
64
|
+
[SecurityStandardsFields.COLUMN_FAILED]: this.failed,
|
|
65
|
+
[SecurityStandardsFields.COLUMN_NAME]: this.name,
|
|
66
|
+
[SecurityStandardsFields.COLUMN_PASSED]: this.passed,
|
|
67
|
+
[SecurityStandardsFields.COLUMN_REFERENCE]: this.reference,
|
|
68
|
+
[SecurityStandardsFields.COLUMN_SCORE]: this.score,
|
|
69
|
+
[SecurityStandardsFields.COLUMN_TOTAL]: this.total,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.SecurityStandards = SecurityStandards;
|
|
74
|
+
_failed = new WeakMap(), _name = new WeakMap(), _passed = new WeakMap(), _reference = new WeakMap(), _score = new WeakMap(), _total = new WeakMap();
|
|
75
|
+
//# sourceMappingURL=securityStandards.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AbstractEntity } from '../../../../abstractEntity';
|
|
2
|
+
import { SecurityStandards, SecurityStandardsType } from './securityStandards';
|
|
3
|
+
export declare enum StandardsFields {
|
|
4
|
+
COLUMN_STANDARDS = "standards",
|
|
5
|
+
COLUMN_UPDATED_AT = "updatedAt"
|
|
6
|
+
}
|
|
7
|
+
export declare type StandardsType = {
|
|
8
|
+
[StandardsFields.COLUMN_STANDARDS]: Array<SecurityStandardsType>;
|
|
9
|
+
[StandardsFields.COLUMN_UPDATED_AT]: string;
|
|
10
|
+
};
|
|
11
|
+
export declare class Standards extends AbstractEntity<StandardsType> {
|
|
12
|
+
#private;
|
|
13
|
+
constructor(standardsDataInput: StandardsType);
|
|
14
|
+
get standards(): Array<SecurityStandards>;
|
|
15
|
+
get updatedAt(): string;
|
|
16
|
+
toJSON(): StandardsType;
|
|
17
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
|
|
3
|
+
if (!privateMap.has(receiver)) {
|
|
4
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
5
|
+
}
|
|
6
|
+
privateMap.set(receiver, value);
|
|
7
|
+
return value;
|
|
8
|
+
};
|
|
9
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
|
|
10
|
+
if (!privateMap.has(receiver)) {
|
|
11
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
12
|
+
}
|
|
13
|
+
return privateMap.get(receiver);
|
|
14
|
+
};
|
|
15
|
+
var _standards, _updatedAt;
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Standards = exports.StandardsFields = void 0;
|
|
18
|
+
const abstractEntity_1 = require("../../../../abstractEntity");
|
|
19
|
+
const securityStandards_1 = require("./securityStandards");
|
|
20
|
+
var StandardsFields;
|
|
21
|
+
(function (StandardsFields) {
|
|
22
|
+
StandardsFields["COLUMN_STANDARDS"] = "standards";
|
|
23
|
+
StandardsFields["COLUMN_UPDATED_AT"] = "updatedAt";
|
|
24
|
+
})(StandardsFields = exports.StandardsFields || (exports.StandardsFields = {}));
|
|
25
|
+
class Standards extends abstractEntity_1.AbstractEntity {
|
|
26
|
+
constructor(standardsDataInput) {
|
|
27
|
+
super(standardsDataInput);
|
|
28
|
+
_standards.set(this, void 0);
|
|
29
|
+
_updatedAt.set(this, void 0);
|
|
30
|
+
__classPrivateFieldSet(this, _standards, standardsDataInput[StandardsFields.COLUMN_STANDARDS].map((securityStandards) => new securityStandards_1.SecurityStandards(securityStandards)));
|
|
31
|
+
__classPrivateFieldSet(this, _updatedAt, standardsDataInput[StandardsFields.COLUMN_UPDATED_AT]);
|
|
32
|
+
}
|
|
33
|
+
get standards() {
|
|
34
|
+
return __classPrivateFieldGet(this, _standards);
|
|
35
|
+
}
|
|
36
|
+
get updatedAt() {
|
|
37
|
+
return __classPrivateFieldGet(this, _updatedAt);
|
|
38
|
+
}
|
|
39
|
+
toJSON() {
|
|
40
|
+
return {
|
|
41
|
+
[StandardsFields.COLUMN_STANDARDS]: this.standards.map((securityStandards) => securityStandards.toJSON()),
|
|
42
|
+
[StandardsFields.COLUMN_UPDATED_AT]: this.updatedAt,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.Standards = Standards;
|
|
47
|
+
_standards = new WeakMap(), _updatedAt = new WeakMap();
|
|
48
|
+
//# sourceMappingURL=standards.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './entities/standards/securityStandards';
|
|
2
|
+
export * from './entities/standards/standards';
|
|
3
|
+
export * from './entities/checks/securityChecks';
|
|
4
|
+
export * from './entities/checks/checks';
|
|
5
|
+
export * from './entities/resources/securityResources';
|
|
6
|
+
export * from './entities/resources/resources';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
__exportStar(require("./entities/standards/securityStandards"), exports);
|
|
14
|
+
__exportStar(require("./entities/standards/standards"), exports);
|
|
15
|
+
__exportStar(require("./entities/checks/securityChecks"), exports);
|
|
16
|
+
__exportStar(require("./entities/checks/checks"), exports);
|
|
17
|
+
__exportStar(require("./entities/resources/securityResources"), exports);
|
|
18
|
+
__exportStar(require("./entities/resources/resources"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AbstractClient, Parameters } from '../../abstractClient';
|
|
2
|
+
import { Standards } from './entities/standards/standards';
|
|
3
|
+
import { GetResult } from '../../getResult';
|
|
4
|
+
import { Checks } from './entities/checks/checks';
|
|
5
|
+
import { Resources } from './entities/resources/resources';
|
|
6
|
+
export declare class StandardsClient extends AbstractClient {
|
|
7
|
+
/**
|
|
8
|
+
* The base path of the API
|
|
9
|
+
*/
|
|
10
|
+
protected basePath: string;
|
|
11
|
+
listSecurityStandards(subscriptionReference: string, parameters?: Parameters): Promise<GetResult<Standards>>;
|
|
12
|
+
listSecurityChecks(subscriptionReference: string, standardReference: string, parameters?: Parameters): Promise<GetResult<Checks>>;
|
|
13
|
+
listSecurityResources(subscriptionReference: string, standardReference: string, checkReference: string, parameters?: Parameters): Promise<GetResult<Resources>>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StandardsClient = void 0;
|
|
4
|
+
const abstractClient_1 = require("../../abstractClient");
|
|
5
|
+
const standards_1 = require("./entities/standards/standards");
|
|
6
|
+
const getResult_1 = require("../../getResult");
|
|
7
|
+
const checks_1 = require("./entities/checks/checks");
|
|
8
|
+
const resources_1 = require("./entities/resources/resources");
|
|
9
|
+
class StandardsClient extends abstractClient_1.AbstractClient {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
/**
|
|
13
|
+
* The base path of the API
|
|
14
|
+
*/
|
|
15
|
+
this.basePath = '/security';
|
|
16
|
+
}
|
|
17
|
+
async listSecurityStandards(subscriptionReference, parameters = {}) {
|
|
18
|
+
this.path = `/${subscriptionReference}/standards`;
|
|
19
|
+
return new getResult_1.GetResult(standards_1.Standards, await this.get(parameters));
|
|
20
|
+
}
|
|
21
|
+
async listSecurityChecks(subscriptionReference, standardReference, parameters = {}) {
|
|
22
|
+
this.path = `/${subscriptionReference}/standards/${standardReference}/checks`;
|
|
23
|
+
return new getResult_1.GetResult(checks_1.Checks, await this.get(parameters));
|
|
24
|
+
}
|
|
25
|
+
async listSecurityResources(subscriptionReference, standardReference, checkReference, parameters = {}) {
|
|
26
|
+
this.path = `/${subscriptionReference}/standards/${standardReference}/checks/${checkReference}/resources`;
|
|
27
|
+
return new getResult_1.GetResult(resources_1.Resources, await this.get(parameters));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.StandardsClient = StandardsClient;
|
|
31
|
+
//# sourceMappingURL=standardsClient.js.map
|
package/package.json
CHANGED