@devopness/sdk-js 2.16.0 → 2.17.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/environments-servers-api.d.ts +9 -0
- package/dist/api/generated/apis/environments-servers-api.js +25 -0
- package/dist/api/generated/apis/sshkeys-api.d.ts +4 -4
- package/dist/api/generated/apis/sshkeys-api.js +4 -4
- package/dist/api/generated/models/ssh-key-update.d.ts +3 -4
- package/package.json +1 -1
|
@@ -14,6 +14,7 @@ import { ApiResponse } from "../../../common/ApiResponse";
|
|
|
14
14
|
import { EnvironmentLinkItem } from '../../generated/models';
|
|
15
15
|
import { Server } from '../../generated/models';
|
|
16
16
|
import { ServerCreate } from '../../generated/models';
|
|
17
|
+
import { ServerRelation } from '../../generated/models';
|
|
17
18
|
/**
|
|
18
19
|
* EnvironmentsServersApiService - Auto-generated
|
|
19
20
|
*/
|
|
@@ -33,6 +34,14 @@ export declare class EnvironmentsServersApiService extends ApiBaseService {
|
|
|
33
34
|
* @param {EnvironmentLinkItem} [environmentLinkItem] A JSON object containing environment server link optional parameters
|
|
34
35
|
*/
|
|
35
36
|
linkServerToEnvironment(environmentId: number, serverId: number, environmentLinkItem?: EnvironmentLinkItem): Promise<ApiResponse<void>>;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @summary Return a list of all servers belonging to a environment
|
|
40
|
+
* @param {number} environmentId The ID of the environment.
|
|
41
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
42
|
+
* @param {number} [perPage] Number of items returned per page
|
|
43
|
+
*/
|
|
44
|
+
listEnvironmentServers(environmentId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<ServerRelation>>>;
|
|
36
45
|
/**
|
|
37
46
|
*
|
|
38
47
|
* @summary Replace all linked servers by new ones. Immediately deploying all changes to previously and newly linked servers
|
|
@@ -70,6 +70,31 @@ class EnvironmentsServersApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
70
70
|
return new ApiResponse_1.ApiResponse(response);
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @summary Return a list of all servers belonging to a environment
|
|
76
|
+
* @param {number} environmentId The ID of the environment.
|
|
77
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
78
|
+
* @param {number} [perPage] Number of items returned per page
|
|
79
|
+
*/
|
|
80
|
+
listEnvironmentServers(environmentId, page, perPage) {
|
|
81
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
+
if (environmentId === null || environmentId === undefined) {
|
|
83
|
+
throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentServers');
|
|
84
|
+
}
|
|
85
|
+
let queryString = '';
|
|
86
|
+
const queryParams = { page: page, per_page: perPage, };
|
|
87
|
+
for (const key in queryParams) {
|
|
88
|
+
if (queryParams[key] === undefined || queryParams[key] === null) {
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
|
|
92
|
+
}
|
|
93
|
+
const requestUrl = '/environments/{environment_id}/servers' + (queryString ? `?${queryString}` : '');
|
|
94
|
+
const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
|
|
95
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
96
|
+
});
|
|
97
|
+
}
|
|
73
98
|
/**
|
|
74
99
|
*
|
|
75
100
|
* @summary Replace all linked servers by new ones. Immediately deploying all changes to previously and newly linked servers
|
|
@@ -20,20 +20,20 @@ export declare class SSHKeysApiService extends ApiBaseService {
|
|
|
20
20
|
/**
|
|
21
21
|
*
|
|
22
22
|
* @summary Delete a given SSH key
|
|
23
|
-
* @param {number} sshKeyId
|
|
23
|
+
* @param {number} sshKeyId The ID of the ssh key.
|
|
24
24
|
*/
|
|
25
25
|
deleteSshKey(sshKeyId: number): Promise<ApiResponse<void>>;
|
|
26
26
|
/**
|
|
27
27
|
*
|
|
28
28
|
* @summary Get a SSH key by ID
|
|
29
|
-
* @param {number} sshKeyId
|
|
29
|
+
* @param {number} sshKeyId The ID of the ssh key.
|
|
30
30
|
*/
|
|
31
31
|
getSshKey(sshKeyId: number): Promise<ApiResponse<SshKey>>;
|
|
32
32
|
/**
|
|
33
33
|
*
|
|
34
34
|
* @summary Update an existing SSH key
|
|
35
|
-
* @param {number} sshKeyId
|
|
36
|
-
* @param {SshKeyUpdate} sshKeyUpdate A JSON object containing
|
|
35
|
+
* @param {number} sshKeyId The ID of the ssh key.
|
|
36
|
+
* @param {SshKeyUpdate} sshKeyUpdate A JSON object containing the resource data
|
|
37
37
|
*/
|
|
38
38
|
updateSshKey(sshKeyId: number, sshKeyUpdate: SshKeyUpdate): Promise<ApiResponse<void>>;
|
|
39
39
|
}
|
|
@@ -32,7 +32,7 @@ class SSHKeysApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
32
32
|
/**
|
|
33
33
|
*
|
|
34
34
|
* @summary Delete a given SSH key
|
|
35
|
-
* @param {number} sshKeyId
|
|
35
|
+
* @param {number} sshKeyId The ID of the ssh key.
|
|
36
36
|
*/
|
|
37
37
|
deleteSshKey(sshKeyId) {
|
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -48,7 +48,7 @@ class SSHKeysApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
48
48
|
/**
|
|
49
49
|
*
|
|
50
50
|
* @summary Get a SSH key by ID
|
|
51
|
-
* @param {number} sshKeyId
|
|
51
|
+
* @param {number} sshKeyId The ID of the ssh key.
|
|
52
52
|
*/
|
|
53
53
|
getSshKey(sshKeyId) {
|
|
54
54
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -64,8 +64,8 @@ class SSHKeysApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
64
64
|
/**
|
|
65
65
|
*
|
|
66
66
|
* @summary Update an existing SSH key
|
|
67
|
-
* @param {number} sshKeyId
|
|
68
|
-
* @param {SshKeyUpdate} sshKeyUpdate A JSON object containing
|
|
67
|
+
* @param {number} sshKeyId The ID of the ssh key.
|
|
68
|
+
* @param {SshKeyUpdate} sshKeyUpdate A JSON object containing the resource data
|
|
69
69
|
*/
|
|
70
70
|
updateSshKey(sshKeyId, sshKeyUpdate) {
|
|
71
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { EnvironmentLinkItem } from './environment-link-item';
|
|
13
12
|
/**
|
|
14
13
|
*
|
|
15
14
|
* @export
|
|
@@ -29,9 +28,9 @@ export interface SshKeyUpdate {
|
|
|
29
28
|
*/
|
|
30
29
|
name: string;
|
|
31
30
|
/**
|
|
32
|
-
*
|
|
33
|
-
* @type {Array<
|
|
31
|
+
* List of valid resource IDs
|
|
32
|
+
* @type {Array<number>}
|
|
34
33
|
* @memberof SshKeyUpdate
|
|
35
34
|
*/
|
|
36
|
-
|
|
35
|
+
servers?: Array<number>;
|
|
37
36
|
}
|