@arrowsphere/api-client 3.17.0-rc.1 → 3.17.0-rc.3
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.d.ts +1 -2
- package/build/abstractClient.js +3 -6
- package/build/axiosSingleton.d.ts +15 -0
- package/build/axiosSingleton.js +40 -0
- package/build/index.d.ts +3 -1
- package/build/index.js +3 -1
- package/build/publicApiClient.d.ts +4 -2
- package/build/publicApiClient.js +19 -12
- 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/{standards → security/standards}/entities/checks/checks.d.ts +1 -1
- package/build/{standards → security/standards}/entities/checks/checks.js +1 -1
- package/build/{standards → security/standards}/entities/checks/securityChecks.d.ts +1 -1
- package/build/{standards → security/standards}/entities/checks/securityChecks.js +1 -1
- package/build/{standards → security/standards}/entities/resources/resources.d.ts +1 -1
- package/build/{standards → security/standards}/entities/resources/resources.js +1 -1
- package/build/{standards → security/standards}/entities/resources/securityResources.d.ts +1 -1
- package/build/{standards → security/standards}/entities/resources/securityResources.js +1 -1
- package/build/{standards → security/standards}/entities/standards/securityStandards.d.ts +1 -1
- package/build/{standards → security/standards}/entities/standards/securityStandards.js +1 -1
- package/build/{standards → security/standards}/entities/standards/standards.d.ts +1 -1
- package/build/{standards → security/standards}/entities/standards/standards.js +1 -1
- package/build/{standards → security/standards}/index.d.ts +0 -0
- package/build/{standards → security/standards}/index.js +0 -0
- package/build/{standards → security/standards}/standardsClient.d.ts +2 -2
- package/build/{standards → security/standards}/standardsClient.js +2 -2
- package/package.json +3 -3
|
@@ -55,10 +55,9 @@ export declare abstract class AbstractClient {
|
|
|
55
55
|
protected headers: Headers;
|
|
56
56
|
/**
|
|
57
57
|
* AbstractClient constructor.
|
|
58
|
-
* @param client - Pre-existing Axios instance that will be used for calls
|
|
59
58
|
* @returns AbstractClient
|
|
60
59
|
*/
|
|
61
|
-
protected constructor(
|
|
60
|
+
protected constructor();
|
|
62
61
|
/**
|
|
63
62
|
* Sets the Client ArrowSphere API key
|
|
64
63
|
* @param key - ArrowSphere API key
|
package/build/abstractClient.js
CHANGED
|
@@ -4,11 +4,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.AbstractClient = exports.ParameterKeys = void 0;
|
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
|
8
7
|
const exception_1 = require("./exception");
|
|
9
8
|
const querystring_1 = __importDefault(require("querystring"));
|
|
10
9
|
const url_1 = require("url");
|
|
11
10
|
const path_1 = __importDefault(require("path"));
|
|
11
|
+
const axiosSingleton_1 = require("./axiosSingleton");
|
|
12
12
|
/**
|
|
13
13
|
* Lists of available query parameters for the API call
|
|
14
14
|
*/
|
|
@@ -24,10 +24,9 @@ var ParameterKeys;
|
|
|
24
24
|
class AbstractClient {
|
|
25
25
|
/**
|
|
26
26
|
* AbstractClient constructor.
|
|
27
|
-
* @param client - Pre-existing Axios instance that will be used for calls
|
|
28
27
|
* @returns AbstractClient
|
|
29
28
|
*/
|
|
30
|
-
constructor(
|
|
29
|
+
constructor() {
|
|
31
30
|
/**
|
|
32
31
|
* Base path for HTTP calls
|
|
33
32
|
*/
|
|
@@ -60,9 +59,7 @@ class AbstractClient {
|
|
|
60
59
|
* Defines header information for axios call
|
|
61
60
|
*/
|
|
62
61
|
this.headers = {};
|
|
63
|
-
this.client =
|
|
64
|
-
// Prevent axios from throwing its own errors, let us do that
|
|
65
|
-
this.client.defaults.validateStatus = null;
|
|
62
|
+
this.client = axiosSingleton_1.AxiosSingleton.getInstance();
|
|
66
63
|
}
|
|
67
64
|
/**
|
|
68
65
|
* Sets the Client ArrowSphere API key
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
export declare class AxiosSingleton {
|
|
3
|
+
private static _axiosInstance;
|
|
4
|
+
static getInstance(): AxiosInstance;
|
|
5
|
+
private static _initializedRequestInterceptor;
|
|
6
|
+
private static _initializedResponseInterceptor;
|
|
7
|
+
/**
|
|
8
|
+
* @param request - Axios Request
|
|
9
|
+
*/
|
|
10
|
+
private static _handleRequest;
|
|
11
|
+
/**
|
|
12
|
+
* @param response - Axios Response
|
|
13
|
+
*/
|
|
14
|
+
private static _handleResponse;
|
|
15
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AxiosSingleton = void 0;
|
|
7
|
+
const axios_1 = __importDefault(require("axios"));
|
|
8
|
+
class AxiosSingleton {
|
|
9
|
+
static getInstance() {
|
|
10
|
+
if (!AxiosSingleton._axiosInstance) {
|
|
11
|
+
AxiosSingleton._axiosInstance = axios_1.default.create();
|
|
12
|
+
AxiosSingleton._initializedRequestInterceptor();
|
|
13
|
+
AxiosSingleton._initializedResponseInterceptor();
|
|
14
|
+
AxiosSingleton._axiosInstance.defaults.validateStatus = null;
|
|
15
|
+
}
|
|
16
|
+
return AxiosSingleton._axiosInstance;
|
|
17
|
+
}
|
|
18
|
+
static _initializedRequestInterceptor() {
|
|
19
|
+
this._axiosInstance.interceptors.request.use(this._handleRequest);
|
|
20
|
+
}
|
|
21
|
+
static _initializedResponseInterceptor() {
|
|
22
|
+
this._axiosInstance.interceptors.response.use(this._handleResponse);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @param request - Axios Request
|
|
26
|
+
*/
|
|
27
|
+
static _handleRequest(request) {
|
|
28
|
+
console.log('AXIOS - Request : ', request);
|
|
29
|
+
return request;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @param response - Axios Response
|
|
33
|
+
*/
|
|
34
|
+
static _handleResponse(response) {
|
|
35
|
+
console.log('AXIOS - Response : ', response);
|
|
36
|
+
return response;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.AxiosSingleton = AxiosSingleton;
|
|
40
|
+
//# sourceMappingURL=axiosSingleton.js.map
|
package/build/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './axiosSingleton';
|
|
1
2
|
export * from './abstractClient';
|
|
2
3
|
export * from './abstractEntity';
|
|
3
4
|
export * from './abstractGraphQLClient';
|
|
@@ -8,12 +9,13 @@ export * from './customers/';
|
|
|
8
9
|
export * from './exception/';
|
|
9
10
|
export * from './general/';
|
|
10
11
|
export * from './getResult';
|
|
12
|
+
export * from './pagination';
|
|
11
13
|
export * from './licenses/';
|
|
12
14
|
export * from './orders/';
|
|
13
15
|
export * from './publicApiClient';
|
|
14
16
|
export * from './publicGraphQLClient';
|
|
15
17
|
export * from './shared/';
|
|
16
|
-
export * from './
|
|
18
|
+
export * from './security/';
|
|
17
19
|
export * from './subscriptions/';
|
|
18
20
|
export { ContactInformation };
|
|
19
21
|
import * as ContactInformation from './contact';
|
package/build/index.js
CHANGED
|
@@ -23,6 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.ContactInformation = void 0;
|
|
26
|
+
__exportStar(require("./axiosSingleton"), exports);
|
|
26
27
|
__exportStar(require("./abstractClient"), exports);
|
|
27
28
|
__exportStar(require("./abstractEntity"), exports);
|
|
28
29
|
__exportStar(require("./abstractGraphQLClient"), exports);
|
|
@@ -33,12 +34,13 @@ __exportStar(require("./customers/"), exports);
|
|
|
33
34
|
__exportStar(require("./exception/"), exports);
|
|
34
35
|
__exportStar(require("./general/"), exports);
|
|
35
36
|
__exportStar(require("./getResult"), exports);
|
|
37
|
+
__exportStar(require("./pagination"), exports);
|
|
36
38
|
__exportStar(require("./licenses/"), exports);
|
|
37
39
|
__exportStar(require("./orders/"), exports);
|
|
38
40
|
__exportStar(require("./publicApiClient"), exports);
|
|
39
41
|
__exportStar(require("./publicGraphQLClient"), exports);
|
|
40
42
|
__exportStar(require("./shared/"), exports);
|
|
41
|
-
__exportStar(require("./
|
|
43
|
+
__exportStar(require("./security/"), exports);
|
|
42
44
|
__exportStar(require("./subscriptions/"), exports);
|
|
43
45
|
const ContactInformation = __importStar(require("./contact"));
|
|
44
46
|
exports.ContactInformation = ContactInformation;
|
|
@@ -7,7 +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 './standards/standardsClient';
|
|
10
|
+
import { StandardsClient } from './security/standards/standardsClient';
|
|
11
|
+
import { RegisterClient } from './security';
|
|
11
12
|
/**
|
|
12
13
|
* Public API Client class, should be the main entry point for your calls
|
|
13
14
|
*/
|
|
@@ -54,6 +55,7 @@ export declare class PublicApiClient extends AbstractClient {
|
|
|
54
55
|
*/
|
|
55
56
|
getCampaignClient(): CampaignClient;
|
|
56
57
|
getConsumptionClient(): ConsumptionClient;
|
|
57
|
-
|
|
58
|
+
getSecurityStandardsClient(): StandardsClient;
|
|
59
|
+
getSecurityRegisterClient(): RegisterClient;
|
|
58
60
|
}
|
|
59
61
|
export default PublicApiClient;
|
package/build/publicApiClient.js
CHANGED
|
@@ -10,7 +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("./standards/standardsClient");
|
|
13
|
+
const standardsClient_1 = require("./security/standards/standardsClient");
|
|
14
|
+
const security_1 = require("./security");
|
|
14
15
|
/**
|
|
15
16
|
* Public API Client class, should be the main entry point for your calls
|
|
16
17
|
*/
|
|
@@ -23,7 +24,7 @@ class PublicApiClient extends abstractClient_1.AbstractClient {
|
|
|
23
24
|
* @returns {@link CustomersClient}
|
|
24
25
|
*/
|
|
25
26
|
getCustomersClient() {
|
|
26
|
-
return new customers_1.CustomersClient(
|
|
27
|
+
return new customers_1.CustomersClient()
|
|
27
28
|
.setUrl(this.url)
|
|
28
29
|
.setApiKey(this.apiKey)
|
|
29
30
|
.setHeaders(this.headers);
|
|
@@ -33,7 +34,7 @@ class PublicApiClient extends abstractClient_1.AbstractClient {
|
|
|
33
34
|
* @returns {@link WhoAmIClient}
|
|
34
35
|
*/
|
|
35
36
|
getWhoamiClient() {
|
|
36
|
-
return new general_1.WhoAmIClient(
|
|
37
|
+
return new general_1.WhoAmIClient()
|
|
37
38
|
.setUrl(this.url)
|
|
38
39
|
.setApiKey(this.apiKey)
|
|
39
40
|
.setHeaders(this.headers);
|
|
@@ -43,7 +44,7 @@ class PublicApiClient extends abstractClient_1.AbstractClient {
|
|
|
43
44
|
* @returns {@link LicensesClient}
|
|
44
45
|
*/
|
|
45
46
|
getLicensesClient() {
|
|
46
|
-
return new licenses_1.LicensesClient(
|
|
47
|
+
return new licenses_1.LicensesClient()
|
|
47
48
|
.setUrl(this.url)
|
|
48
49
|
.setApiKey(this.apiKey)
|
|
49
50
|
.setHeaders(this.headers);
|
|
@@ -53,7 +54,7 @@ class PublicApiClient extends abstractClient_1.AbstractClient {
|
|
|
53
54
|
* @returns {@link CheckDomainClient}
|
|
54
55
|
*/
|
|
55
56
|
getCheckDomainClient() {
|
|
56
|
-
return new general_1.CheckDomainClient(
|
|
57
|
+
return new general_1.CheckDomainClient()
|
|
57
58
|
.setUrl(this.url)
|
|
58
59
|
.setApiKey(this.apiKey)
|
|
59
60
|
.setHeaders(this.headers);
|
|
@@ -63,7 +64,7 @@ class PublicApiClient extends abstractClient_1.AbstractClient {
|
|
|
63
64
|
* @returns {@link SubscriptionsClient}
|
|
64
65
|
*/
|
|
65
66
|
getSubscriptionsClient() {
|
|
66
|
-
return new subscriptions_1.SubscriptionsClient(
|
|
67
|
+
return new subscriptions_1.SubscriptionsClient()
|
|
67
68
|
.setUrl(this.url)
|
|
68
69
|
.setApiKey(this.apiKey)
|
|
69
70
|
.setHeaders(this.headers);
|
|
@@ -73,7 +74,7 @@ class PublicApiClient extends abstractClient_1.AbstractClient {
|
|
|
73
74
|
* @returns {@link OrdersClient}
|
|
74
75
|
*/
|
|
75
76
|
getOrdersClient() {
|
|
76
|
-
return new orders_1.OrdersClient(
|
|
77
|
+
return new orders_1.OrdersClient()
|
|
77
78
|
.setUrl(this.url)
|
|
78
79
|
.setApiKey(this.apiKey)
|
|
79
80
|
.setHeaders(this.headers);
|
|
@@ -83,7 +84,7 @@ class PublicApiClient extends abstractClient_1.AbstractClient {
|
|
|
83
84
|
* @returns {@link ContactClient}
|
|
84
85
|
*/
|
|
85
86
|
getContactClient() {
|
|
86
|
-
return new contact_1.ContactClient(
|
|
87
|
+
return new contact_1.ContactClient()
|
|
87
88
|
.setUrl(this.url)
|
|
88
89
|
.setApiKey(this.apiKey)
|
|
89
90
|
.setHeaders(this.headers);
|
|
@@ -93,19 +94,25 @@ class PublicApiClient extends abstractClient_1.AbstractClient {
|
|
|
93
94
|
* @returns {@link ContactClient}
|
|
94
95
|
*/
|
|
95
96
|
getCampaignClient() {
|
|
96
|
-
return new campaign_1.CampaignClient(
|
|
97
|
+
return new campaign_1.CampaignClient()
|
|
97
98
|
.setUrl(this.url)
|
|
98
99
|
.setApiKey(this.apiKey)
|
|
99
100
|
.setHeaders(this.headers);
|
|
100
101
|
}
|
|
101
102
|
getConsumptionClient() {
|
|
102
|
-
return new consumption_1.ConsumptionClient(
|
|
103
|
+
return new consumption_1.ConsumptionClient()
|
|
103
104
|
.setUrl(this.url)
|
|
104
105
|
.setApiKey(this.apiKey)
|
|
105
106
|
.setHeaders(this.headers);
|
|
106
107
|
}
|
|
107
|
-
|
|
108
|
-
return new standardsClient_1.StandardsClient(
|
|
108
|
+
getSecurityStandardsClient() {
|
|
109
|
+
return new standardsClient_1.StandardsClient()
|
|
110
|
+
.setUrl(this.url)
|
|
111
|
+
.setApiKey(this.apiKey)
|
|
112
|
+
.setHeaders(this.headers);
|
|
113
|
+
}
|
|
114
|
+
getSecurityRegisterClient() {
|
|
115
|
+
return new security_1.RegisterClient()
|
|
109
116
|
.setUrl(this.url)
|
|
110
117
|
.setApiKey(this.apiKey)
|
|
111
118
|
.setHeaders(this.headers);
|
|
@@ -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
|
|
@@ -15,7 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
var _checks, _updatedAt;
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.Checks = exports.ChecksFields = void 0;
|
|
18
|
-
const abstractEntity_1 = require("
|
|
18
|
+
const abstractEntity_1 = require("../../../../abstractEntity");
|
|
19
19
|
const securityChecks_1 = require("./securityChecks");
|
|
20
20
|
var ChecksFields;
|
|
21
21
|
(function (ChecksFields) {
|
|
@@ -15,7 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
var _description, _flagged, _isFailed, _metadata, _name, _processed, _reference, _score, _severity;
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.SecurityChecks = exports.SecurityChecksFields = void 0;
|
|
18
|
-
const abstractEntity_1 = require("
|
|
18
|
+
const abstractEntity_1 = require("../../../../abstractEntity");
|
|
19
19
|
var SecurityChecksFields;
|
|
20
20
|
(function (SecurityChecksFields) {
|
|
21
21
|
SecurityChecksFields["COLUMN_DESCRIPTION"] = "description";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AbstractEntity } from '
|
|
1
|
+
import { AbstractEntity } from '../../../../abstractEntity';
|
|
2
2
|
import { SecurityResources, SecurityResourcesType } from './securityResources';
|
|
3
3
|
export declare enum ResourcesFields {
|
|
4
4
|
COLUMN_DESCRIPTION = "description",
|
|
@@ -15,7 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
var _description, _metadata, _name, _resources, _updatedAt;
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.Resources = exports.ResourcesFields = void 0;
|
|
18
|
-
const abstractEntity_1 = require("
|
|
18
|
+
const abstractEntity_1 = require("../../../../abstractEntity");
|
|
19
19
|
const securityResources_1 = require("./securityResources");
|
|
20
20
|
var ResourcesFields;
|
|
21
21
|
(function (ResourcesFields) {
|
|
@@ -15,7 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
var _status, _values;
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.SecurityResources = exports.SecurityResourcesFields = void 0;
|
|
18
|
-
const abstractEntity_1 = require("
|
|
18
|
+
const abstractEntity_1 = require("../../../../abstractEntity");
|
|
19
19
|
var SecurityResourcesFields;
|
|
20
20
|
(function (SecurityResourcesFields) {
|
|
21
21
|
SecurityResourcesFields["COLUMN_STATUS"] = "status";
|
|
@@ -15,7 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
var _failed, _name, _passed, _reference, _score, _total;
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.SecurityStandards = exports.SecurityStandardsFields = void 0;
|
|
18
|
-
const abstractEntity_1 = require("
|
|
18
|
+
const abstractEntity_1 = require("../../../../abstractEntity");
|
|
19
19
|
var SecurityStandardsFields;
|
|
20
20
|
(function (SecurityStandardsFields) {
|
|
21
21
|
SecurityStandardsFields["COLUMN_FAILED"] = "failed";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AbstractEntity } from '
|
|
1
|
+
import { AbstractEntity } from '../../../../abstractEntity';
|
|
2
2
|
import { SecurityStandards, SecurityStandardsType } from './securityStandards';
|
|
3
3
|
export declare enum StandardsFields {
|
|
4
4
|
COLUMN_STANDARDS = "standards",
|
|
@@ -15,7 +15,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
15
15
|
var _standards, _updatedAt;
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.Standards = exports.StandardsFields = void 0;
|
|
18
|
-
const abstractEntity_1 = require("
|
|
18
|
+
const abstractEntity_1 = require("../../../../abstractEntity");
|
|
19
19
|
const securityStandards_1 = require("./securityStandards");
|
|
20
20
|
var StandardsFields;
|
|
21
21
|
(function (StandardsFields) {
|
|
File without changes
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AbstractClient, Parameters } from '
|
|
1
|
+
import { AbstractClient, Parameters } from '../../abstractClient';
|
|
2
2
|
import { Standards } from './entities/standards/standards';
|
|
3
|
-
import { GetResult } from '
|
|
3
|
+
import { GetResult } from '../../getResult';
|
|
4
4
|
import { Checks } from './entities/checks/checks';
|
|
5
5
|
import { Resources } from './entities/resources/resources';
|
|
6
6
|
export declare class StandardsClient extends AbstractClient {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.StandardsClient = void 0;
|
|
4
|
-
const abstractClient_1 = require("
|
|
4
|
+
const abstractClient_1 = require("../../abstractClient");
|
|
5
5
|
const standards_1 = require("./entities/standards/standards");
|
|
6
|
-
const getResult_1 = require("
|
|
6
|
+
const getResult_1 = require("../../getResult");
|
|
7
7
|
const checks_1 = require("./entities/checks/checks");
|
|
8
8
|
const resources_1 = require("./entities/resources/resources");
|
|
9
9
|
class StandardsClient extends abstractClient_1.AbstractClient {
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "https://github.com/ArrowSphere/nodejs-api-client.git"
|
|
6
6
|
},
|
|
7
|
-
"version": "3.17.0-rc.
|
|
7
|
+
"version": "3.17.0-rc.3",
|
|
8
8
|
"description": "Node.js client for ArrowSphere's public API",
|
|
9
9
|
"main": "build/index.js",
|
|
10
10
|
"types": "build/index.d.ts",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@types/chai": "4.2.15",
|
|
34
34
|
"@types/chai-as-promised": "7.1.3",
|
|
35
35
|
"@types/mocha": "8.2.0",
|
|
36
|
-
"@types/node": "
|
|
36
|
+
"@types/node": "18.11.10",
|
|
37
37
|
"@types/sinon": "9.0.10",
|
|
38
38
|
"@types/sinon-chai": "3.2.5",
|
|
39
39
|
"@typescript-eslint/eslint-plugin": "4.15.0",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
81
|
"@types/validatorjs": "3.15.0",
|
|
82
|
-
"axios": "
|
|
82
|
+
"axios": "1.1.3",
|
|
83
83
|
"graphql": "^16.3.0",
|
|
84
84
|
"graphql-request": "4.2.0",
|
|
85
85
|
"validatorjs": "3.22.1"
|