@devopness/sdk-js 2.162.2 → 2.163.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/generated/apis/applications-api.d.ts +25 -0
- package/dist/api/generated/apis/applications-api.js +65 -0
- package/dist/api/generated/apis/credentials-api.d.ts +27 -0
- package/dist/api/generated/apis/credentials-api.js +67 -0
- package/dist/api/generated/apis/cron-jobs-api.d.ts +17 -0
- package/dist/api/generated/apis/cron-jobs-api.js +45 -0
- package/dist/api/generated/apis/daemons-api.d.ts +17 -0
- package/dist/api/generated/apis/daemons-api.js +45 -0
- package/dist/api/generated/apis/network-rules-api.d.ts +17 -0
- package/dist/api/generated/apis/network-rules-api.js +45 -0
- package/dist/api/generated/apis/networks-api.d.ts +20 -0
- package/dist/api/generated/apis/networks-api.js +48 -0
- package/dist/api/generated/apis/servers-api.d.ts +17 -0
- package/dist/api/generated/apis/servers-api.js +45 -0
- package/dist/api/generated/apis/services-api.d.ts +17 -0
- package/dist/api/generated/apis/services-api.js +45 -0
- package/dist/api/generated/apis/sshkeys-api.d.ts +17 -0
- package/dist/api/generated/apis/sshkeys-api.js +45 -0
- package/dist/api/generated/apis/sslcertificates-api.d.ts +17 -0
- package/dist/api/generated/apis/sslcertificates-api.js +45 -0
- package/dist/api/generated/apis/virtual-hosts-api.d.ts +17 -0
- package/dist/api/generated/apis/virtual-hosts-api.js +45 -0
- package/dist/services/ApplicationService.d.ts +1 -2
- package/dist/services/ApplicationService.js +0 -2
- package/dist/services/EnvironmentService.d.ts +0 -22
- package/dist/services/EnvironmentService.js +0 -22
- package/dist/services/index.d.ts +1 -0
- package/dist/services/index.js +1 -0
- package/package.json +4 -4
- package/dist/api/generated/apis/applications-deployments-api.d.ts +0 -26
- package/dist/api/generated/apis/applications-deployments-api.js +0 -53
- package/dist/api/generated/apis/environments-applications-api.d.ts +0 -36
- package/dist/api/generated/apis/environments-applications-api.js +0 -78
- package/dist/api/generated/apis/environments-credentials-api.d.ts +0 -46
- package/dist/api/generated/apis/environments-credentials-api.js +0 -100
- package/dist/api/generated/apis/environments-cron-jobs-api.d.ts +0 -36
- package/dist/api/generated/apis/environments-cron-jobs-api.js +0 -78
- package/dist/api/generated/apis/environments-daemons-api.d.ts +0 -36
- package/dist/api/generated/apis/environments-daemons-api.js +0 -78
- package/dist/api/generated/apis/environments-network-rules-api.d.ts +0 -36
- package/dist/api/generated/apis/environments-network-rules-api.js +0 -78
- package/dist/api/generated/apis/environments-networks-api.d.ts +0 -39
- package/dist/api/generated/apis/environments-networks-api.js +0 -81
- package/dist/api/generated/apis/environments-servers-api.d.ts +0 -36
- package/dist/api/generated/apis/environments-servers-api.js +0 -78
- package/dist/api/generated/apis/environments-services-api.d.ts +0 -36
- package/dist/api/generated/apis/environments-services-api.js +0 -78
- package/dist/api/generated/apis/environments-sshkeys-api.d.ts +0 -36
- package/dist/api/generated/apis/environments-sshkeys-api.js +0 -78
- package/dist/api/generated/apis/environments-sslcertificates-api.d.ts +0 -36
- package/dist/api/generated/apis/environments-sslcertificates-api.js +0 -78
- package/dist/api/generated/apis/environments-virtual-hosts-api.d.ts +0 -36
- package/dist/api/generated/apis/environments-virtual-hosts-api.js +0 -78
|
@@ -13,11 +13,20 @@ import { ApiBaseService } from "../../../services/ApiBaseService";
|
|
|
13
13
|
import { ApiResponse } from "../../../common/ApiResponse";
|
|
14
14
|
import { Server } from '../../generated/models';
|
|
15
15
|
import { ServerCommand } from '../../generated/models';
|
|
16
|
+
import { ServerEnvironmentCreate } from '../../generated/models';
|
|
17
|
+
import { ServerRelation } from '../../generated/models';
|
|
16
18
|
import { ServerUpdate } from '../../generated/models';
|
|
17
19
|
/**
|
|
18
20
|
* ServersApiService - Auto-generated
|
|
19
21
|
*/
|
|
20
22
|
export declare class ServersApiService extends ApiBaseService {
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @summary Creates a server and link it to the given environment
|
|
26
|
+
* @param {number} environmentId The ID of the environment.
|
|
27
|
+
* @param {ServerEnvironmentCreate} serverEnvironmentCreate A JSON object containing the resource data
|
|
28
|
+
*/
|
|
29
|
+
addEnvironmentServer(environmentId: number, serverEnvironmentCreate: ServerEnvironmentCreate): Promise<ApiResponse<Server>>;
|
|
21
30
|
/**
|
|
22
31
|
*
|
|
23
32
|
* @summary Connect a server to devopness platform
|
|
@@ -50,6 +59,14 @@ export declare class ServersApiService extends ApiBaseService {
|
|
|
50
59
|
* @param {number} serverId The ID of the server.
|
|
51
60
|
*/
|
|
52
61
|
getStatusServer(serverId: number): Promise<ApiResponse<void>>;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @summary Return a list of all servers belonging to an environment
|
|
65
|
+
* @param {number} environmentId The ID of the environment.
|
|
66
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
67
|
+
* @param {number} [perPage] Number of items returned per page
|
|
68
|
+
*/
|
|
69
|
+
listEnvironmentServers(environmentId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<ServerRelation>>>;
|
|
53
70
|
/**
|
|
54
71
|
*
|
|
55
72
|
* @summary Restart a current running server
|
|
@@ -29,6 +29,26 @@ const Exceptions_1 = require("../../../common/Exceptions");
|
|
|
29
29
|
* ServersApiService - Auto-generated
|
|
30
30
|
*/
|
|
31
31
|
class ServersApiService extends ApiBaseService_1.ApiBaseService {
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @summary Creates a server and link it to the given environment
|
|
35
|
+
* @param {number} environmentId The ID of the environment.
|
|
36
|
+
* @param {ServerEnvironmentCreate} serverEnvironmentCreate A JSON object containing the resource data
|
|
37
|
+
*/
|
|
38
|
+
addEnvironmentServer(environmentId, serverEnvironmentCreate) {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
if (environmentId === null || environmentId === undefined) {
|
|
41
|
+
throw new Exceptions_1.ArgumentNullException('environmentId', 'addEnvironmentServer');
|
|
42
|
+
}
|
|
43
|
+
if (serverEnvironmentCreate === null || serverEnvironmentCreate === undefined) {
|
|
44
|
+
throw new Exceptions_1.ArgumentNullException('serverEnvironmentCreate', 'addEnvironmentServer');
|
|
45
|
+
}
|
|
46
|
+
let queryString = '';
|
|
47
|
+
const requestUrl = '/environments/{environment_id}/servers' + (queryString ? `?${queryString}` : '');
|
|
48
|
+
const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), serverEnvironmentCreate);
|
|
49
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
32
52
|
/**
|
|
33
53
|
*
|
|
34
54
|
* @summary Connect a server to devopness platform
|
|
@@ -121,6 +141,31 @@ class ServersApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
121
141
|
return new ApiResponse_1.ApiResponse(response);
|
|
122
142
|
});
|
|
123
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
*
|
|
146
|
+
* @summary Return a list of all servers belonging to an environment
|
|
147
|
+
* @param {number} environmentId The ID of the environment.
|
|
148
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
149
|
+
* @param {number} [perPage] Number of items returned per page
|
|
150
|
+
*/
|
|
151
|
+
listEnvironmentServers(environmentId, page, perPage) {
|
|
152
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
if (environmentId === null || environmentId === undefined) {
|
|
154
|
+
throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentServers');
|
|
155
|
+
}
|
|
156
|
+
let queryString = '';
|
|
157
|
+
const queryParams = { page: page, per_page: perPage, };
|
|
158
|
+
for (const key in queryParams) {
|
|
159
|
+
if (queryParams[key] === undefined || queryParams[key] === null) {
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
|
|
163
|
+
}
|
|
164
|
+
const requestUrl = '/environments/{environment_id}/servers' + (queryString ? `?${queryString}` : '');
|
|
165
|
+
const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
|
|
166
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
167
|
+
});
|
|
168
|
+
}
|
|
124
169
|
/**
|
|
125
170
|
*
|
|
126
171
|
* @summary Restart a current running server
|
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
import { ApiBaseService } from "../../../services/ApiBaseService";
|
|
13
13
|
import { ApiResponse } from "../../../common/ApiResponse";
|
|
14
14
|
import { Service } from '../../generated/models';
|
|
15
|
+
import { ServiceEnvironmentCreate } from '../../generated/models';
|
|
15
16
|
import { ServiceGetStatus } from '../../generated/models';
|
|
17
|
+
import { ServiceRelation } from '../../generated/models';
|
|
16
18
|
import { ServiceReload } from '../../generated/models';
|
|
17
19
|
import { ServiceRestart } from '../../generated/models';
|
|
18
20
|
import { ServiceStart } from '../../generated/models';
|
|
@@ -22,6 +24,13 @@ import { ServiceUpdate } from '../../generated/models';
|
|
|
22
24
|
* ServicesApiService - Auto-generated
|
|
23
25
|
*/
|
|
24
26
|
export declare class ServicesApiService extends ApiBaseService {
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @summary Add a Service to the given environment
|
|
30
|
+
* @param {number} environmentId The ID of the environment.
|
|
31
|
+
* @param {ServiceEnvironmentCreate} serviceEnvironmentCreate A JSON object containing the resource data
|
|
32
|
+
*/
|
|
33
|
+
addEnvironmentService(environmentId: number, serviceEnvironmentCreate: ServiceEnvironmentCreate): Promise<ApiResponse<Service>>;
|
|
25
34
|
/**
|
|
26
35
|
*
|
|
27
36
|
* @summary Delete a given service
|
|
@@ -41,6 +50,14 @@ export declare class ServicesApiService extends ApiBaseService {
|
|
|
41
50
|
* @param {ServiceGetStatus} serviceGetStatus A JSON object containing the resource data
|
|
42
51
|
*/
|
|
43
52
|
getStatusService(serviceId: number, serviceGetStatus: ServiceGetStatus): Promise<ApiResponse<void>>;
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @summary Return a list of all services belonging to a environment
|
|
56
|
+
* @param {number} environmentId The ID of the environment.
|
|
57
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
58
|
+
* @param {number} [perPage] Number of items returned per page
|
|
59
|
+
*/
|
|
60
|
+
listEnvironmentServices(environmentId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<ServiceRelation>>>;
|
|
44
61
|
/**
|
|
45
62
|
*
|
|
46
63
|
* @summary Reload a service
|
|
@@ -29,6 +29,26 @@ const Exceptions_1 = require("../../../common/Exceptions");
|
|
|
29
29
|
* ServicesApiService - Auto-generated
|
|
30
30
|
*/
|
|
31
31
|
class ServicesApiService extends ApiBaseService_1.ApiBaseService {
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @summary Add a Service to the given environment
|
|
35
|
+
* @param {number} environmentId The ID of the environment.
|
|
36
|
+
* @param {ServiceEnvironmentCreate} serviceEnvironmentCreate A JSON object containing the resource data
|
|
37
|
+
*/
|
|
38
|
+
addEnvironmentService(environmentId, serviceEnvironmentCreate) {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
if (environmentId === null || environmentId === undefined) {
|
|
41
|
+
throw new Exceptions_1.ArgumentNullException('environmentId', 'addEnvironmentService');
|
|
42
|
+
}
|
|
43
|
+
if (serviceEnvironmentCreate === null || serviceEnvironmentCreate === undefined) {
|
|
44
|
+
throw new Exceptions_1.ArgumentNullException('serviceEnvironmentCreate', 'addEnvironmentService');
|
|
45
|
+
}
|
|
46
|
+
let queryString = '';
|
|
47
|
+
const requestUrl = '/environments/{environment_id}/services' + (queryString ? `?${queryString}` : '');
|
|
48
|
+
const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), serviceEnvironmentCreate);
|
|
49
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
32
52
|
/**
|
|
33
53
|
*
|
|
34
54
|
* @summary Delete a given service
|
|
@@ -81,6 +101,31 @@ class ServicesApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
81
101
|
return new ApiResponse_1.ApiResponse(response);
|
|
82
102
|
});
|
|
83
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* @summary Return a list of all services belonging to a environment
|
|
107
|
+
* @param {number} environmentId The ID of the environment.
|
|
108
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
109
|
+
* @param {number} [perPage] Number of items returned per page
|
|
110
|
+
*/
|
|
111
|
+
listEnvironmentServices(environmentId, page, perPage) {
|
|
112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
+
if (environmentId === null || environmentId === undefined) {
|
|
114
|
+
throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentServices');
|
|
115
|
+
}
|
|
116
|
+
let queryString = '';
|
|
117
|
+
const queryParams = { page: page, per_page: perPage, };
|
|
118
|
+
for (const key in queryParams) {
|
|
119
|
+
if (queryParams[key] === undefined || queryParams[key] === null) {
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
|
|
123
|
+
}
|
|
124
|
+
const requestUrl = '/environments/{environment_id}/services' + (queryString ? `?${queryString}` : '');
|
|
125
|
+
const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
|
|
126
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
127
|
+
});
|
|
128
|
+
}
|
|
84
129
|
/**
|
|
85
130
|
*
|
|
86
131
|
* @summary Reload a service
|
|
@@ -12,11 +12,20 @@
|
|
|
12
12
|
import { ApiBaseService } from "../../../services/ApiBaseService";
|
|
13
13
|
import { ApiResponse } from "../../../common/ApiResponse";
|
|
14
14
|
import { SshKey } from '../../generated/models';
|
|
15
|
+
import { SshKeyEnvironmentCreate } from '../../generated/models';
|
|
16
|
+
import { SshKeyRelation } from '../../generated/models';
|
|
15
17
|
import { SshKeyUpdate } from '../../generated/models';
|
|
16
18
|
/**
|
|
17
19
|
* SSHKeysApiService - Auto-generated
|
|
18
20
|
*/
|
|
19
21
|
export declare class SSHKeysApiService extends ApiBaseService {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @summary Create an SSH key and link it to the given environment
|
|
25
|
+
* @param {number} environmentId The ID of the environment.
|
|
26
|
+
* @param {SshKeyEnvironmentCreate} sshKeyEnvironmentCreate A JSON object containing the resource data
|
|
27
|
+
*/
|
|
28
|
+
addEnvironmentSshKey(environmentId: number, sshKeyEnvironmentCreate: SshKeyEnvironmentCreate): Promise<ApiResponse<SshKey>>;
|
|
20
29
|
/**
|
|
21
30
|
*
|
|
22
31
|
* @summary Delete a given SSH key
|
|
@@ -29,6 +38,14 @@ export declare class SSHKeysApiService extends ApiBaseService {
|
|
|
29
38
|
* @param {number} sshKeyId The ID of the ssh key.
|
|
30
39
|
*/
|
|
31
40
|
getSshKey(sshKeyId: number): Promise<ApiResponse<SshKey>>;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @summary Return a list of all SSH keys added to an environment
|
|
44
|
+
* @param {number} environmentId The ID of the environment.
|
|
45
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
46
|
+
* @param {number} [perPage] Number of items returned per page
|
|
47
|
+
*/
|
|
48
|
+
listEnvironmentSshKeys(environmentId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<SshKeyRelation>>>;
|
|
32
49
|
/**
|
|
33
50
|
*
|
|
34
51
|
* @summary Update an existing SSH key
|
|
@@ -29,6 +29,26 @@ const Exceptions_1 = require("../../../common/Exceptions");
|
|
|
29
29
|
* SSHKeysApiService - Auto-generated
|
|
30
30
|
*/
|
|
31
31
|
class SSHKeysApiService extends ApiBaseService_1.ApiBaseService {
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @summary Create an SSH key and link it to the given environment
|
|
35
|
+
* @param {number} environmentId The ID of the environment.
|
|
36
|
+
* @param {SshKeyEnvironmentCreate} sshKeyEnvironmentCreate A JSON object containing the resource data
|
|
37
|
+
*/
|
|
38
|
+
addEnvironmentSshKey(environmentId, sshKeyEnvironmentCreate) {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
if (environmentId === null || environmentId === undefined) {
|
|
41
|
+
throw new Exceptions_1.ArgumentNullException('environmentId', 'addEnvironmentSshKey');
|
|
42
|
+
}
|
|
43
|
+
if (sshKeyEnvironmentCreate === null || sshKeyEnvironmentCreate === undefined) {
|
|
44
|
+
throw new Exceptions_1.ArgumentNullException('sshKeyEnvironmentCreate', 'addEnvironmentSshKey');
|
|
45
|
+
}
|
|
46
|
+
let queryString = '';
|
|
47
|
+
const requestUrl = '/environments/{environment_id}/ssh-keys' + (queryString ? `?${queryString}` : '');
|
|
48
|
+
const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), sshKeyEnvironmentCreate);
|
|
49
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
32
52
|
/**
|
|
33
53
|
*
|
|
34
54
|
* @summary Delete a given SSH key
|
|
@@ -61,6 +81,31 @@ class SSHKeysApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
61
81
|
return new ApiResponse_1.ApiResponse(response);
|
|
62
82
|
});
|
|
63
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @summary Return a list of all SSH keys added to an environment
|
|
87
|
+
* @param {number} environmentId The ID of the environment.
|
|
88
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
89
|
+
* @param {number} [perPage] Number of items returned per page
|
|
90
|
+
*/
|
|
91
|
+
listEnvironmentSshKeys(environmentId, page, perPage) {
|
|
92
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
+
if (environmentId === null || environmentId === undefined) {
|
|
94
|
+
throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentSshKeys');
|
|
95
|
+
}
|
|
96
|
+
let queryString = '';
|
|
97
|
+
const queryParams = { page: page, per_page: perPage, };
|
|
98
|
+
for (const key in queryParams) {
|
|
99
|
+
if (queryParams[key] === undefined || queryParams[key] === null) {
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
|
|
103
|
+
}
|
|
104
|
+
const requestUrl = '/environments/{environment_id}/ssh-keys' + (queryString ? `?${queryString}` : '');
|
|
105
|
+
const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
|
|
106
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
107
|
+
});
|
|
108
|
+
}
|
|
64
109
|
/**
|
|
65
110
|
*
|
|
66
111
|
* @summary Update an existing SSH key
|
|
@@ -12,10 +12,19 @@
|
|
|
12
12
|
import { ApiBaseService } from "../../../services/ApiBaseService";
|
|
13
13
|
import { ApiResponse } from "../../../common/ApiResponse";
|
|
14
14
|
import { SslCertificate } from '../../generated/models';
|
|
15
|
+
import { SslCertificateEnvironmentCreate } from '../../generated/models';
|
|
16
|
+
import { SslCertificateRelation } from '../../generated/models';
|
|
15
17
|
/**
|
|
16
18
|
* SSLCertificatesApiService - Auto-generated
|
|
17
19
|
*/
|
|
18
20
|
export declare class SSLCertificatesApiService extends ApiBaseService {
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @summary Create a new ssl certificate
|
|
24
|
+
* @param {number} environmentId The ID of the environment.
|
|
25
|
+
* @param {SslCertificateEnvironmentCreate} sslCertificateEnvironmentCreate A JSON object containing the resource data
|
|
26
|
+
*/
|
|
27
|
+
addEnvironmentSslCertificate(environmentId: number, sslCertificateEnvironmentCreate: SslCertificateEnvironmentCreate): Promise<ApiResponse<SslCertificate>>;
|
|
19
28
|
/**
|
|
20
29
|
*
|
|
21
30
|
* @summary Delete a given SSL Certificate
|
|
@@ -28,4 +37,12 @@ export declare class SSLCertificatesApiService extends ApiBaseService {
|
|
|
28
37
|
* @param {number} sslCertificateId The ID of the ssl certificate.
|
|
29
38
|
*/
|
|
30
39
|
getSslCertificate(sslCertificateId: number): Promise<ApiResponse<SslCertificate>>;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @summary Return a list of all SSL Certificates belonging to an environment
|
|
43
|
+
* @param {number} environmentId The ID of the environment.
|
|
44
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
45
|
+
* @param {number} [perPage] Number of items returned per page
|
|
46
|
+
*/
|
|
47
|
+
listEnvironmentSslCertificates(environmentId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<SslCertificateRelation>>>;
|
|
31
48
|
}
|
|
@@ -29,6 +29,26 @@ const Exceptions_1 = require("../../../common/Exceptions");
|
|
|
29
29
|
* SSLCertificatesApiService - Auto-generated
|
|
30
30
|
*/
|
|
31
31
|
class SSLCertificatesApiService extends ApiBaseService_1.ApiBaseService {
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @summary Create a new ssl certificate
|
|
35
|
+
* @param {number} environmentId The ID of the environment.
|
|
36
|
+
* @param {SslCertificateEnvironmentCreate} sslCertificateEnvironmentCreate A JSON object containing the resource data
|
|
37
|
+
*/
|
|
38
|
+
addEnvironmentSslCertificate(environmentId, sslCertificateEnvironmentCreate) {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
if (environmentId === null || environmentId === undefined) {
|
|
41
|
+
throw new Exceptions_1.ArgumentNullException('environmentId', 'addEnvironmentSslCertificate');
|
|
42
|
+
}
|
|
43
|
+
if (sslCertificateEnvironmentCreate === null || sslCertificateEnvironmentCreate === undefined) {
|
|
44
|
+
throw new Exceptions_1.ArgumentNullException('sslCertificateEnvironmentCreate', 'addEnvironmentSslCertificate');
|
|
45
|
+
}
|
|
46
|
+
let queryString = '';
|
|
47
|
+
const requestUrl = '/environments/{environment_id}/ssl-certificates' + (queryString ? `?${queryString}` : '');
|
|
48
|
+
const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), sslCertificateEnvironmentCreate);
|
|
49
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
32
52
|
/**
|
|
33
53
|
*
|
|
34
54
|
* @summary Delete a given SSL Certificate
|
|
@@ -61,5 +81,30 @@ class SSLCertificatesApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
61
81
|
return new ApiResponse_1.ApiResponse(response);
|
|
62
82
|
});
|
|
63
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @summary Return a list of all SSL Certificates belonging to an environment
|
|
87
|
+
* @param {number} environmentId The ID of the environment.
|
|
88
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
89
|
+
* @param {number} [perPage] Number of items returned per page
|
|
90
|
+
*/
|
|
91
|
+
listEnvironmentSslCertificates(environmentId, page, perPage) {
|
|
92
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
+
if (environmentId === null || environmentId === undefined) {
|
|
94
|
+
throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentSslCertificates');
|
|
95
|
+
}
|
|
96
|
+
let queryString = '';
|
|
97
|
+
const queryParams = { page: page, per_page: perPage, };
|
|
98
|
+
for (const key in queryParams) {
|
|
99
|
+
if (queryParams[key] === undefined || queryParams[key] === null) {
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
|
|
103
|
+
}
|
|
104
|
+
const requestUrl = '/environments/{environment_id}/ssl-certificates' + (queryString ? `?${queryString}` : '');
|
|
105
|
+
const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
|
|
106
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
107
|
+
});
|
|
108
|
+
}
|
|
64
109
|
}
|
|
65
110
|
exports.SSLCertificatesApiService = SSLCertificatesApiService;
|
|
@@ -12,12 +12,21 @@
|
|
|
12
12
|
import { ApiBaseService } from "../../../services/ApiBaseService";
|
|
13
13
|
import { ApiResponse } from "../../../common/ApiResponse";
|
|
14
14
|
import { VirtualHost } from '../../generated/models';
|
|
15
|
+
import { VirtualHostEnvironmentCreate } from '../../generated/models';
|
|
15
16
|
import { VirtualHostGetStatus } from '../../generated/models';
|
|
17
|
+
import { VirtualHostRelation } from '../../generated/models';
|
|
16
18
|
import { VirtualHostUpdate } from '../../generated/models';
|
|
17
19
|
/**
|
|
18
20
|
* VirtualHostsApiService - Auto-generated
|
|
19
21
|
*/
|
|
20
22
|
export declare class VirtualHostsApiService extends ApiBaseService {
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @summary Create a new virtual host
|
|
26
|
+
* @param {number} environmentId The ID of the environment.
|
|
27
|
+
* @param {VirtualHostEnvironmentCreate} virtualHostEnvironmentCreate A JSON object containing the resource data
|
|
28
|
+
*/
|
|
29
|
+
addEnvironmentVirtualHost(environmentId: number, virtualHostEnvironmentCreate: VirtualHostEnvironmentCreate): Promise<ApiResponse<VirtualHost>>;
|
|
21
30
|
/**
|
|
22
31
|
*
|
|
23
32
|
* @summary Delete a given virtual host
|
|
@@ -37,6 +46,14 @@ export declare class VirtualHostsApiService extends ApiBaseService {
|
|
|
37
46
|
* @param {number} virtualHostId The ID of the virtual host.
|
|
38
47
|
*/
|
|
39
48
|
getVirtualHost(virtualHostId: number): Promise<ApiResponse<VirtualHost>>;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @summary Return a list of all Virtual Hosts belonging to an environment
|
|
52
|
+
* @param {number} environmentId The ID of the environment.
|
|
53
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
54
|
+
* @param {number} [perPage] Number of items returned per page
|
|
55
|
+
*/
|
|
56
|
+
listEnvironmentVirtualHosts(environmentId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<VirtualHostRelation>>>;
|
|
40
57
|
/**
|
|
41
58
|
*
|
|
42
59
|
* @summary Update an existing virtual host
|
|
@@ -29,6 +29,26 @@ const Exceptions_1 = require("../../../common/Exceptions");
|
|
|
29
29
|
* VirtualHostsApiService - Auto-generated
|
|
30
30
|
*/
|
|
31
31
|
class VirtualHostsApiService extends ApiBaseService_1.ApiBaseService {
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @summary Create a new virtual host
|
|
35
|
+
* @param {number} environmentId The ID of the environment.
|
|
36
|
+
* @param {VirtualHostEnvironmentCreate} virtualHostEnvironmentCreate A JSON object containing the resource data
|
|
37
|
+
*/
|
|
38
|
+
addEnvironmentVirtualHost(environmentId, virtualHostEnvironmentCreate) {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
if (environmentId === null || environmentId === undefined) {
|
|
41
|
+
throw new Exceptions_1.ArgumentNullException('environmentId', 'addEnvironmentVirtualHost');
|
|
42
|
+
}
|
|
43
|
+
if (virtualHostEnvironmentCreate === null || virtualHostEnvironmentCreate === undefined) {
|
|
44
|
+
throw new Exceptions_1.ArgumentNullException('virtualHostEnvironmentCreate', 'addEnvironmentVirtualHost');
|
|
45
|
+
}
|
|
46
|
+
let queryString = '';
|
|
47
|
+
const requestUrl = '/environments/{environment_id}/virtual-hosts' + (queryString ? `?${queryString}` : '');
|
|
48
|
+
const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), virtualHostEnvironmentCreate);
|
|
49
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
32
52
|
/**
|
|
33
53
|
*
|
|
34
54
|
* @summary Delete a given virtual host
|
|
@@ -81,6 +101,31 @@ class VirtualHostsApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
81
101
|
return new ApiResponse_1.ApiResponse(response);
|
|
82
102
|
});
|
|
83
103
|
}
|
|
104
|
+
/**
|
|
105
|
+
*
|
|
106
|
+
* @summary Return a list of all Virtual Hosts belonging to an environment
|
|
107
|
+
* @param {number} environmentId The ID of the environment.
|
|
108
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
109
|
+
* @param {number} [perPage] Number of items returned per page
|
|
110
|
+
*/
|
|
111
|
+
listEnvironmentVirtualHosts(environmentId, page, perPage) {
|
|
112
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
113
|
+
if (environmentId === null || environmentId === undefined) {
|
|
114
|
+
throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentVirtualHosts');
|
|
115
|
+
}
|
|
116
|
+
let queryString = '';
|
|
117
|
+
const queryParams = { page: page, per_page: perPage, };
|
|
118
|
+
for (const key in queryParams) {
|
|
119
|
+
if (queryParams[key] === undefined || queryParams[key] === null) {
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
|
|
123
|
+
}
|
|
124
|
+
const requestUrl = '/environments/{environment_id}/virtual-hosts' + (queryString ? `?${queryString}` : '');
|
|
125
|
+
const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
|
|
126
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
127
|
+
});
|
|
128
|
+
}
|
|
84
129
|
/**
|
|
85
130
|
*
|
|
86
131
|
* @summary Update an existing virtual host
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ApiBaseService } from './ApiBaseService';
|
|
2
2
|
import { ApplicationsApiService } from '../api/generated/apis/applications-api';
|
|
3
|
-
import { ApplicationsDeploymentsApiService } from '../api/generated/apis/applications-deployments-api';
|
|
4
3
|
import { ApplicationsVariablesApiService } from '../api/generated/apis/applications-variables-api';
|
|
5
4
|
import { ApplicationsHooksApiService } from '../api/generated/apis/applications-hooks-api';
|
|
6
5
|
export declare class ApplicationService extends ApiBaseService {
|
|
7
6
|
}
|
|
8
|
-
export interface ApplicationService extends ApplicationsApiService,
|
|
7
|
+
export interface ApplicationService extends ApplicationsApiService, ApplicationsVariablesApiService, ApplicationsHooksApiService {
|
|
9
8
|
}
|
|
@@ -4,7 +4,6 @@ exports.ApplicationService = void 0;
|
|
|
4
4
|
const ApiBaseService_1 = require("./ApiBaseService");
|
|
5
5
|
const MergeSiblingClasses_1 = require("../common/MergeSiblingClasses");
|
|
6
6
|
const applications_api_1 = require("../api/generated/apis/applications-api");
|
|
7
|
-
const applications_deployments_api_1 = require("../api/generated/apis/applications-deployments-api");
|
|
8
7
|
const applications_variables_api_1 = require("../api/generated/apis/applications-variables-api");
|
|
9
8
|
const applications_hooks_api_1 = require("../api/generated/apis/applications-hooks-api");
|
|
10
9
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging
|
|
@@ -13,7 +12,6 @@ class ApplicationService extends ApiBaseService_1.ApiBaseService {
|
|
|
13
12
|
exports.ApplicationService = ApplicationService;
|
|
14
13
|
(0, MergeSiblingClasses_1.mergeSiblingClasses)(ApplicationService, [
|
|
15
14
|
applications_api_1.ApplicationsApiService,
|
|
16
|
-
applications_deployments_api_1.ApplicationsDeploymentsApiService,
|
|
17
15
|
applications_variables_api_1.ApplicationsVariablesApiService,
|
|
18
16
|
applications_hooks_api_1.ApplicationsHooksApiService,
|
|
19
17
|
]);
|
|
@@ -1,31 +1,9 @@
|
|
|
1
1
|
import { EnvironmentsActionsApiService } from '../api/generated/apis/environments-actions-api';
|
|
2
2
|
import { EnvironmentsApiService } from '../api/generated/apis/environments-api';
|
|
3
|
-
import { EnvironmentsApplicationsApiService } from '../api/generated/apis/environments-applications-api';
|
|
4
|
-
import { EnvironmentsCredentialsApiService } from '../api/generated/apis/environments-credentials-api';
|
|
5
|
-
import { EnvironmentsCronJobsApiService } from '../api/generated/apis/environments-cron-jobs-api';
|
|
6
|
-
import { EnvironmentsDaemonsApiService } from '../api/generated/apis/environments-daemons-api';
|
|
7
|
-
import { EnvironmentsNetworkRulesApiService } from '../api/generated/apis/environments-network-rules-api';
|
|
8
|
-
import { EnvironmentsNetworksApiService } from '../api/generated/apis/environments-networks-api';
|
|
9
|
-
import { EnvironmentsServersApiService } from '../api/generated/apis/environments-servers-api';
|
|
10
|
-
import { EnvironmentsServicesApiService } from '../api/generated/apis/environments-services-api';
|
|
11
|
-
import { EnvironmentsSSHKeysApiService } from '../api/generated/apis/environments-sshkeys-api';
|
|
12
|
-
import { EnvironmentsSSLCertificatesApiService } from '../api/generated/apis/environments-sslcertificates-api';
|
|
13
3
|
import { EnvironmentsTeamMembershipsApiService } from '../api/generated/apis/environments-team-memberships-api';
|
|
14
4
|
import { EnvironmentsTeamsApiService } from '../api/generated/apis/environments-teams-api';
|
|
15
|
-
import { EnvironmentsVirtualHostsApiService } from '../api/generated/apis/environments-virtual-hosts-api';
|
|
16
5
|
export declare class EnvironmentService extends EnvironmentsApiService {
|
|
17
6
|
actions: EnvironmentsActionsApiService;
|
|
18
|
-
applications: EnvironmentsApplicationsApiService;
|
|
19
|
-
credentials: EnvironmentsCredentialsApiService;
|
|
20
|
-
cronjobs: EnvironmentsCronJobsApiService;
|
|
21
|
-
daemons: EnvironmentsDaemonsApiService;
|
|
22
|
-
networks: EnvironmentsNetworksApiService;
|
|
23
|
-
networkRules: EnvironmentsNetworkRulesApiService;
|
|
24
|
-
servers: EnvironmentsServersApiService;
|
|
25
|
-
services: EnvironmentsServicesApiService;
|
|
26
|
-
sshKeys: EnvironmentsSSHKeysApiService;
|
|
27
|
-
sslCertificates: EnvironmentsSSLCertificatesApiService;
|
|
28
7
|
teams: EnvironmentsTeamsApiService;
|
|
29
8
|
teamMemberships: EnvironmentsTeamMembershipsApiService;
|
|
30
|
-
virtualHosts: EnvironmentsVirtualHostsApiService;
|
|
31
9
|
}
|
|
@@ -3,36 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.EnvironmentService = void 0;
|
|
4
4
|
const environments_actions_api_1 = require("../api/generated/apis/environments-actions-api");
|
|
5
5
|
const environments_api_1 = require("../api/generated/apis/environments-api");
|
|
6
|
-
const environments_applications_api_1 = require("../api/generated/apis/environments-applications-api");
|
|
7
|
-
const environments_credentials_api_1 = require("../api/generated/apis/environments-credentials-api");
|
|
8
|
-
const environments_cron_jobs_api_1 = require("../api/generated/apis/environments-cron-jobs-api");
|
|
9
|
-
const environments_daemons_api_1 = require("../api/generated/apis/environments-daemons-api");
|
|
10
|
-
const environments_network_rules_api_1 = require("../api/generated/apis/environments-network-rules-api");
|
|
11
|
-
const environments_networks_api_1 = require("../api/generated/apis/environments-networks-api");
|
|
12
|
-
const environments_servers_api_1 = require("../api/generated/apis/environments-servers-api");
|
|
13
|
-
const environments_services_api_1 = require("../api/generated/apis/environments-services-api");
|
|
14
|
-
const environments_sshkeys_api_1 = require("../api/generated/apis/environments-sshkeys-api");
|
|
15
|
-
const environments_sslcertificates_api_1 = require("../api/generated/apis/environments-sslcertificates-api");
|
|
16
6
|
const environments_team_memberships_api_1 = require("../api/generated/apis/environments-team-memberships-api");
|
|
17
7
|
const environments_teams_api_1 = require("../api/generated/apis/environments-teams-api");
|
|
18
|
-
const environments_virtual_hosts_api_1 = require("../api/generated/apis/environments-virtual-hosts-api");
|
|
19
8
|
class EnvironmentService extends environments_api_1.EnvironmentsApiService {
|
|
20
9
|
constructor() {
|
|
21
10
|
super(...arguments);
|
|
22
11
|
this.actions = new environments_actions_api_1.EnvironmentsActionsApiService();
|
|
23
|
-
this.applications = new environments_applications_api_1.EnvironmentsApplicationsApiService();
|
|
24
|
-
this.credentials = new environments_credentials_api_1.EnvironmentsCredentialsApiService();
|
|
25
|
-
this.cronjobs = new environments_cron_jobs_api_1.EnvironmentsCronJobsApiService();
|
|
26
|
-
this.daemons = new environments_daemons_api_1.EnvironmentsDaemonsApiService();
|
|
27
|
-
this.networks = new environments_networks_api_1.EnvironmentsNetworksApiService();
|
|
28
|
-
this.networkRules = new environments_network_rules_api_1.EnvironmentsNetworkRulesApiService();
|
|
29
|
-
this.servers = new environments_servers_api_1.EnvironmentsServersApiService();
|
|
30
|
-
this.services = new environments_services_api_1.EnvironmentsServicesApiService();
|
|
31
|
-
this.sshKeys = new environments_sshkeys_api_1.EnvironmentsSSHKeysApiService();
|
|
32
|
-
this.sslCertificates = new environments_sslcertificates_api_1.EnvironmentsSSLCertificatesApiService();
|
|
33
12
|
this.teams = new environments_teams_api_1.EnvironmentsTeamsApiService();
|
|
34
13
|
this.teamMemberships = new environments_team_memberships_api_1.EnvironmentsTeamMembershipsApiService();
|
|
35
|
-
this.virtualHosts = new environments_virtual_hosts_api_1.EnvironmentsVirtualHostsApiService();
|
|
36
14
|
}
|
|
37
15
|
}
|
|
38
16
|
exports.EnvironmentService = EnvironmentService;
|
package/dist/services/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from './HookService';
|
|
|
10
10
|
export * from './LogService';
|
|
11
11
|
export * from './NetworkRuleService';
|
|
12
12
|
export * from './NetworkService';
|
|
13
|
+
export * from './OrganizationService';
|
|
13
14
|
export * from './PipelineService';
|
|
14
15
|
export * from './ProjectService';
|
|
15
16
|
export * from './ResourceEventService';
|
package/dist/services/index.js
CHANGED
|
@@ -26,6 +26,7 @@ __exportStar(require("./HookService"), exports);
|
|
|
26
26
|
__exportStar(require("./LogService"), exports);
|
|
27
27
|
__exportStar(require("./NetworkRuleService"), exports);
|
|
28
28
|
__exportStar(require("./NetworkService"), exports);
|
|
29
|
+
__exportStar(require("./OrganizationService"), exports);
|
|
29
30
|
__exportStar(require("./PipelineService"), exports);
|
|
30
31
|
__exportStar(require("./ProjectService"), exports);
|
|
31
32
|
__exportStar(require("./ResourceEventService"), exports);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@devopness/sdk-js",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.163.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@eslint/js": "^9.22.0",
|
|
55
55
|
"@openapitools/openapi-generator-cli": "^2.18.4",
|
|
56
56
|
"@types/jest": "^29.5.12",
|
|
57
|
-
"@typescript-eslint/parser": "^8.
|
|
57
|
+
"@typescript-eslint/parser": "^8.30.1",
|
|
58
58
|
"axios-mock-adapter": "^2.1.0",
|
|
59
59
|
"eslint": "^9.24.0",
|
|
60
60
|
"eslint-import-resolver-typescript": "^4.3.2",
|
|
@@ -63,10 +63,10 @@
|
|
|
63
63
|
"eslint-plugin-promise": "^7.2.1",
|
|
64
64
|
"husky": "9.1.7",
|
|
65
65
|
"jest": "^29.7.0",
|
|
66
|
-
"ts-jest": "^29.3.
|
|
66
|
+
"ts-jest": "^29.3.2",
|
|
67
67
|
"typedoc": "^0.28.2",
|
|
68
68
|
"typescript": "^5.8.3",
|
|
69
|
-
"typescript-eslint": "^8.
|
|
69
|
+
"typescript-eslint": "^8.30.1"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@types/parse-link-header": "^2.0.3",
|