@devopness/sdk-js 2.14.1 → 2.15.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.
Files changed (47) hide show
  1. package/dist/api/generated/apis/environments-applications-api.d.ts +9 -0
  2. package/dist/api/generated/apis/environments-applications-api.js +20 -0
  3. package/dist/api/generated/apis/environments-servers-api.d.ts +9 -9
  4. package/dist/api/generated/apis/environments-servers-api.js +20 -25
  5. package/dist/api/generated/apis/environments-services-api.d.ts +2 -2
  6. package/dist/api/generated/apis/environments-services-api.js +2 -2
  7. package/dist/api/generated/apis/environments-sshkeys-api.d.ts +11 -2
  8. package/dist/api/generated/apis/environments-sshkeys-api.js +22 -2
  9. package/dist/api/generated/apis/projects-servers-api.d.ts +4 -4
  10. package/dist/api/generated/apis/projects-servers-api.js +6 -6
  11. package/dist/api/generated/apis/projects-services-api.d.ts +5 -5
  12. package/dist/api/generated/apis/projects-services-api.js +7 -7
  13. package/dist/api/generated/apis/projects-sshkeys-api.d.ts +1 -1
  14. package/dist/api/generated/apis/projects-sshkeys-api.js +1 -1
  15. package/dist/api/generated/apis/servers-api.d.ts +3 -4
  16. package/dist/api/generated/apis/servers-api.js +7 -7
  17. package/dist/api/generated/apis/services-api.d.ts +17 -17
  18. package/dist/api/generated/apis/services-api.js +20 -20
  19. package/dist/api/generated/models/application-environment-create.d.ts +138 -0
  20. package/dist/api/generated/models/{service-status-update.js → application-environment-create.js} +0 -0
  21. package/dist/api/generated/models/index.d.ts +3 -2
  22. package/dist/api/generated/models/index.js +3 -2
  23. package/dist/api/generated/models/server-relation.d.ts +22 -22
  24. package/dist/api/generated/models/server.d.ts +34 -28
  25. package/dist/api/generated/models/service-create.d.ts +11 -11
  26. package/dist/api/generated/models/service-relation.d.ts +14 -8
  27. package/dist/api/generated/models/service-reload.d.ts +1 -1
  28. package/dist/api/generated/models/service-restart.d.ts +1 -1
  29. package/dist/api/generated/models/service-start.d.ts +1 -1
  30. package/dist/api/generated/models/service-stop.d.ts +1 -1
  31. package/dist/api/generated/models/{service-status-update.d.ts → service-update-status.d.ts} +4 -4
  32. package/dist/api/generated/models/service-update-status.js +14 -0
  33. package/dist/api/generated/models/service-update.d.ts +2 -2
  34. package/dist/api/generated/models/service.d.ts +4 -4
  35. package/dist/api/generated/models/ssh-key-create.d.ts +5 -12
  36. package/dist/api/generated/models/ssh-key-project-create.d.ts +37 -0
  37. package/dist/api/generated/models/ssh-key-project-create.js +14 -0
  38. package/dist/api/generated/models/ssh-key-relation.d.ts +13 -7
  39. package/dist/api/generated/models/ssh-key-update.d.ts +2 -2
  40. package/dist/api/generated/models/ssh-key.d.ts +13 -7
  41. package/dist/index.d.ts +1 -0
  42. package/dist/index.js +2 -1
  43. package/dist/services/index.d.ts +27 -0
  44. package/dist/services/index.js +43 -0
  45. package/package.json +14 -7
  46. package/dist/api/generated/models/service-action.d.ts +0 -27
  47. package/dist/api/generated/models/service-action.js +0 -32
@@ -11,11 +11,20 @@
11
11
  */
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
+ import { Application } from '../../generated/models';
15
+ import { ApplicationCreate } from '../../generated/models';
14
16
  import { ApplicationRelation } from '../../generated/models';
15
17
  /**
16
18
  * EnvironmentsApplicationsApiService - Auto-generated
17
19
  */
18
20
  export declare class EnvironmentsApplicationsApiService extends ApiBaseService {
21
+ /**
22
+ *
23
+ * @summary Create a new application
24
+ * @param {number} environmentId The ID of the environment.
25
+ * @param {ApplicationCreate} applicationCreate A JSON object containing the resource data
26
+ */
27
+ addEnvironmentApplication(environmentId: number, applicationCreate: ApplicationCreate): Promise<ApiResponse<Application>>;
19
28
  /**
20
29
  *
21
30
  * @summary Returns a list of all applications belonging to a environment
@@ -29,6 +29,26 @@ const Exceptions_1 = require("../../../common/Exceptions");
29
29
  * EnvironmentsApplicationsApiService - Auto-generated
30
30
  */
31
31
  class EnvironmentsApplicationsApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary Create a new application
35
+ * @param {number} environmentId The ID of the environment.
36
+ * @param {ApplicationCreate} applicationCreate A JSON object containing the resource data
37
+ */
38
+ addEnvironmentApplication(environmentId, applicationCreate) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (environmentId === null || environmentId === undefined) {
41
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'addEnvironmentApplication');
42
+ }
43
+ if (applicationCreate === null || applicationCreate === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('applicationCreate', 'addEnvironmentApplication');
45
+ }
46
+ let queryString = '';
47
+ const requestUrl = '/environments/{environment_id}/applications' + (queryString ? `?${queryString}` : '');
48
+ const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), applicationCreate);
49
+ return new ApiResponse_1.ApiResponse(response);
50
+ });
51
+ }
32
52
  /**
33
53
  *
34
54
  * @summary Returns a list of all applications belonging to a environment
@@ -12,11 +12,19 @@
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { EnvironmentLinkItem } from '../../generated/models';
15
- import { ServerRelation } from '../../generated/models';
15
+ import { Server } from '../../generated/models';
16
+ import { ServerCreate } from '../../generated/models';
16
17
  /**
17
18
  * EnvironmentsServersApiService - Auto-generated
18
19
  */
19
20
  export declare class EnvironmentsServersApiService extends ApiBaseService {
21
+ /**
22
+ *
23
+ * @summary Creates a server and link it to the given environment
24
+ * @param {number} environmentId The ID of the environment.
25
+ * @param {ServerCreate} serverCreate A JSON object containing the resource data
26
+ */
27
+ addEnvironmentServer(environmentId: number, serverCreate: ServerCreate): Promise<ApiResponse<Server>>;
20
28
  /**
21
29
  *
22
30
  * @summary Link a server to an environment
@@ -25,14 +33,6 @@ export declare class EnvironmentsServersApiService extends ApiBaseService {
25
33
  * @param {EnvironmentLinkItem} [environmentLinkItem] A JSON object containing environment server link optional parameters
26
34
  */
27
35
  linkServerToEnvironment(environmentId: number, serverId: number, environmentLinkItem?: EnvironmentLinkItem): Promise<ApiResponse<void>>;
28
- /**
29
- *
30
- * @summary Return a list of all servers belonging to a environment
31
- * @param {number} environmentId Numeric ID of the environment to get servers from
32
- * @param {number} [page] Number of the page to be retrieved
33
- * @param {number} [perPage] Number of items returned per page
34
- */
35
- listEnvironmentServers(environmentId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<ServerRelation>>>;
36
36
  /**
37
37
  *
38
38
  * @summary Replace all linked servers by new ones. Immediately deploying all changes to previously and newly linked servers
@@ -31,47 +31,42 @@ const Exceptions_1 = require("../../../common/Exceptions");
31
31
  class EnvironmentsServersApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
- * @summary Link a server to an environment
35
- * @param {number} environmentId Unique ID of the environment
36
- * @param {number} serverId Unique ID of the server to be linked
37
- * @param {EnvironmentLinkItem} [environmentLinkItem] A JSON object containing environment server link optional parameters
34
+ * @summary Creates a server and link it to the given environment
35
+ * @param {number} environmentId The ID of the environment.
36
+ * @param {ServerCreate} serverCreate A JSON object containing the resource data
38
37
  */
39
- linkServerToEnvironment(environmentId, serverId, environmentLinkItem) {
38
+ addEnvironmentServer(environmentId, serverCreate) {
40
39
  return __awaiter(this, void 0, void 0, function* () {
41
40
  if (environmentId === null || environmentId === undefined) {
42
- throw new Exceptions_1.ArgumentNullException('environmentId', 'linkServerToEnvironment');
41
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'addEnvironmentServer');
43
42
  }
44
- if (serverId === null || serverId === undefined) {
45
- throw new Exceptions_1.ArgumentNullException('serverId', 'linkServerToEnvironment');
43
+ if (serverCreate === null || serverCreate === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('serverCreate', 'addEnvironmentServer');
46
45
  }
47
46
  let queryString = '';
48
- const requestUrl = '/environments/{environment_id}/servers/{server_id}/link' + (queryString ? `?${queryString}` : '');
49
- const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))).replace(`{${"server_id"}}`, encodeURIComponent(String(serverId))), environmentLinkItem);
47
+ const requestUrl = '/environments/{environment_id}/servers' + (queryString ? `?${queryString}` : '');
48
+ const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), serverCreate);
50
49
  return new ApiResponse_1.ApiResponse(response);
51
50
  });
52
51
  }
53
52
  /**
54
53
  *
55
- * @summary Return a list of all servers belonging to a environment
56
- * @param {number} environmentId Numeric ID of the environment to get servers from
57
- * @param {number} [page] Number of the page to be retrieved
58
- * @param {number} [perPage] Number of items returned per page
54
+ * @summary Link a server to an environment
55
+ * @param {number} environmentId Unique ID of the environment
56
+ * @param {number} serverId Unique ID of the server to be linked
57
+ * @param {EnvironmentLinkItem} [environmentLinkItem] A JSON object containing environment server link optional parameters
59
58
  */
60
- listEnvironmentServers(environmentId, page, perPage) {
59
+ linkServerToEnvironment(environmentId, serverId, environmentLinkItem) {
61
60
  return __awaiter(this, void 0, void 0, function* () {
62
61
  if (environmentId === null || environmentId === undefined) {
63
- throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentServers');
62
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'linkServerToEnvironment');
64
63
  }
65
- let queryString = '';
66
- const queryParams = { page: page, per_page: perPage, };
67
- for (const key in queryParams) {
68
- if (queryParams[key] === undefined || queryParams[key] === null) {
69
- continue;
70
- }
71
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
64
+ if (serverId === null || serverId === undefined) {
65
+ throw new Exceptions_1.ArgumentNullException('serverId', 'linkServerToEnvironment');
72
66
  }
73
- const requestUrl = '/environments/{environment_id}/servers' + (queryString ? `?${queryString}` : '');
74
- const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
67
+ let queryString = '';
68
+ const requestUrl = '/environments/{environment_id}/servers/{server_id}/link' + (queryString ? `?${queryString}` : '');
69
+ const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))).replace(`{${"server_id"}}`, encodeURIComponent(String(serverId))), environmentLinkItem);
75
70
  return new ApiResponse_1.ApiResponse(response);
76
71
  });
77
72
  }
@@ -18,8 +18,8 @@ import { ServiceRelation } from '../../generated/models';
18
18
  export declare class EnvironmentsServicesApiService extends ApiBaseService {
19
19
  /**
20
20
  *
21
- * @summary Returns a list of all services belonging to a environment
22
- * @param {number} environmentId Numeric ID of the environment to get services from
21
+ * @summary Return a list of all services belonging to a environment
22
+ * @param {number} environmentId The ID of the environment.
23
23
  * @param {number} [page] Number of the page to be retrieved
24
24
  * @param {number} [perPage] Number of items returned per page
25
25
  */
@@ -31,8 +31,8 @@ const Exceptions_1 = require("../../../common/Exceptions");
31
31
  class EnvironmentsServicesApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
- * @summary Returns a list of all services belonging to a environment
35
- * @param {number} environmentId Numeric ID of the environment to get services from
34
+ * @summary Return a list of all services belonging to a environment
35
+ * @param {number} environmentId The ID of the environment.
36
36
  * @param {number} [page] Number of the page to be retrieved
37
37
  * @param {number} [perPage] Number of items returned per page
38
38
  */
@@ -11,6 +11,8 @@
11
11
  */
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
+ import { SshKey } from '../../generated/models';
15
+ import { SshKeyCreate } from '../../generated/models';
14
16
  import { SshKeyRelation } from '../../generated/models';
15
17
  /**
16
18
  * EnvironmentsSSHKeysApiService - Auto-generated
@@ -18,8 +20,15 @@ import { SshKeyRelation } from '../../generated/models';
18
20
  export declare class EnvironmentsSSHKeysApiService extends ApiBaseService {
19
21
  /**
20
22
  *
21
- * @summary Returns a list of all SSH Keys belonging to a environment
22
- * @param {number} environmentId Numeric ID of the environment to get SSH Keys from
23
+ * @summary Create an SSH key and link it to the given environment
24
+ * @param {number} environmentId The ID of the environment.
25
+ * @param {SshKeyCreate} sshKeyCreate A JSON object containing the resource data
26
+ */
27
+ addEnvironmentSshKey(environmentId: number, sshKeyCreate: SshKeyCreate): Promise<ApiResponse<SshKey>>;
28
+ /**
29
+ *
30
+ * @summary Return a list of all SSH keys added to an environment
31
+ * @param {number} environmentId The ID of the environment.
23
32
  * @param {number} [page] Number of the page to be retrieved
24
33
  * @param {number} [perPage] Number of items returned per page
25
34
  */
@@ -31,8 +31,28 @@ const Exceptions_1 = require("../../../common/Exceptions");
31
31
  class EnvironmentsSSHKeysApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
- * @summary Returns a list of all SSH Keys belonging to a environment
35
- * @param {number} environmentId Numeric ID of the environment to get SSH Keys from
34
+ * @summary Create an SSH key and link it to the given environment
35
+ * @param {number} environmentId The ID of the environment.
36
+ * @param {SshKeyCreate} sshKeyCreate A JSON object containing the resource data
37
+ */
38
+ addEnvironmentSshKey(environmentId, sshKeyCreate) {
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 (sshKeyCreate === null || sshKeyCreate === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('sshKeyCreate', '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))), sshKeyCreate);
49
+ return new ApiResponse_1.ApiResponse(response);
50
+ });
51
+ }
52
+ /**
53
+ *
54
+ * @summary Return a list of all SSH keys added to an environment
55
+ * @param {number} environmentId The ID of the environment.
36
56
  * @param {number} [page] Number of the page to be retrieved
37
57
  * @param {number} [perPage] Number of items returned per page
38
58
  */
@@ -21,14 +21,14 @@ export declare class ProjectsServersApiService extends ApiBaseService {
21
21
  /**
22
22
  *
23
23
  * @summary Creates a server and link it to the given project
24
- * @param {number} projectId The project numeric Id
25
- * @param {ServerCreate} serverCreate A JSON object containing server data
24
+ * @param {number} projectId The ID of the project.
25
+ * @param {ServerCreate} serverCreate A JSON object containing the resource data
26
26
  */
27
- addServerToProject(projectId: number, serverCreate: ServerCreate): Promise<ApiResponse<Server>>;
27
+ addProjectServer(projectId: number, serverCreate: ServerCreate): Promise<ApiResponse<Server>>;
28
28
  /**
29
29
  *
30
30
  * @summary List all servers linked to a project
31
- * @param {number} projectId The project numeric Id
31
+ * @param {number} projectId The ID of the project.
32
32
  * @param {number} [page] Number of the page to be retrieved
33
33
  * @param {number} [perPage] Number of items returned per page
34
34
  */
@@ -32,16 +32,16 @@ class ProjectsServersApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
34
  * @summary Creates a server and link it to the given project
35
- * @param {number} projectId The project numeric Id
36
- * @param {ServerCreate} serverCreate A JSON object containing server data
35
+ * @param {number} projectId The ID of the project.
36
+ * @param {ServerCreate} serverCreate A JSON object containing the resource data
37
37
  */
38
- addServerToProject(projectId, serverCreate) {
38
+ addProjectServer(projectId, serverCreate) {
39
39
  return __awaiter(this, void 0, void 0, function* () {
40
40
  if (projectId === null || projectId === undefined) {
41
- throw new Exceptions_1.ArgumentNullException('projectId', 'addServerToProject');
41
+ throw new Exceptions_1.ArgumentNullException('projectId', 'addProjectServer');
42
42
  }
43
43
  if (serverCreate === null || serverCreate === undefined) {
44
- throw new Exceptions_1.ArgumentNullException('serverCreate', 'addServerToProject');
44
+ throw new Exceptions_1.ArgumentNullException('serverCreate', 'addProjectServer');
45
45
  }
46
46
  let queryString = '';
47
47
  const requestUrl = '/projects/{project_id}/servers' + (queryString ? `?${queryString}` : '');
@@ -52,7 +52,7 @@ class ProjectsServersApiService extends ApiBaseService_1.ApiBaseService {
52
52
  /**
53
53
  *
54
54
  * @summary List all servers linked to a project
55
- * @param {number} projectId The project numeric Id
55
+ * @param {number} projectId The ID of the project.
56
56
  * @param {number} [page] Number of the page to be retrieved
57
57
  * @param {number} [perPage] Number of items returned per page
58
58
  */
@@ -20,15 +20,15 @@ import { ServiceRelation } from '../../generated/models';
20
20
  export declare class ProjectsServicesApiService extends ApiBaseService {
21
21
  /**
22
22
  *
23
- * @summary Add a service to a project and triggers its setup in each linked server
24
- * @param {number} projectId The service\&#39;s unique id
25
- * @param {ServiceCreate} serviceCreate A JSON object containing service data
23
+ * @summary Add a service to a project and trigger its setup in each linked server
24
+ * @param {number} projectId The ID of the project.
25
+ * @param {ServiceCreate} serviceCreate A JSON object containing the resource data
26
26
  */
27
- addServiceToProject(projectId: number, serviceCreate: ServiceCreate): Promise<ApiResponse<Service>>;
27
+ addProjectService(projectId: number, serviceCreate: ServiceCreate): Promise<ApiResponse<Service>>;
28
28
  /**
29
29
  *
30
30
  * @summary List all services in a project
31
- * @param {number} projectId The service unique Id
31
+ * @param {number} projectId The ID of the project.
32
32
  * @param {number} [page] Number of the page to be retrieved
33
33
  * @param {number} [perPage] Number of items returned per page
34
34
  */
@@ -31,17 +31,17 @@ const Exceptions_1 = require("../../../common/Exceptions");
31
31
  class ProjectsServicesApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
- * @summary Add a service to a project and triggers its setup in each linked server
35
- * @param {number} projectId The service\&#39;s unique id
36
- * @param {ServiceCreate} serviceCreate A JSON object containing service data
34
+ * @summary Add a service to a project and trigger its setup in each linked server
35
+ * @param {number} projectId The ID of the project.
36
+ * @param {ServiceCreate} serviceCreate A JSON object containing the resource data
37
37
  */
38
- addServiceToProject(projectId, serviceCreate) {
38
+ addProjectService(projectId, serviceCreate) {
39
39
  return __awaiter(this, void 0, void 0, function* () {
40
40
  if (projectId === null || projectId === undefined) {
41
- throw new Exceptions_1.ArgumentNullException('projectId', 'addServiceToProject');
41
+ throw new Exceptions_1.ArgumentNullException('projectId', 'addProjectService');
42
42
  }
43
43
  if (serviceCreate === null || serviceCreate === undefined) {
44
- throw new Exceptions_1.ArgumentNullException('serviceCreate', 'addServiceToProject');
44
+ throw new Exceptions_1.ArgumentNullException('serviceCreate', 'addProjectService');
45
45
  }
46
46
  let queryString = '';
47
47
  const requestUrl = '/projects/{project_id}/services' + (queryString ? `?${queryString}` : '');
@@ -52,7 +52,7 @@ class ProjectsServicesApiService extends ApiBaseService_1.ApiBaseService {
52
52
  /**
53
53
  *
54
54
  * @summary List all services in a project
55
- * @param {number} projectId The service unique Id
55
+ * @param {number} projectId The ID of the project.
56
56
  * @param {number} [page] Number of the page to be retrieved
57
57
  * @param {number} [perPage] Number of items returned per page
58
58
  */
@@ -28,7 +28,7 @@ export declare class ProjectsSSHKeysApiService extends ApiBaseService {
28
28
  /**
29
29
  *
30
30
  * @summary Return a list of all SSH keys added to a project
31
- * @param {number} projectId The project numeric Id
31
+ * @param {number} projectId The ID of the project.
32
32
  * @param {number} [page] Number of the page to be retrieved
33
33
  * @param {number} [perPage] Number of items returned per page
34
34
  */
@@ -52,7 +52,7 @@ class ProjectsSSHKeysApiService extends ApiBaseService_1.ApiBaseService {
52
52
  /**
53
53
  *
54
54
  * @summary Return a list of all SSH keys added to a project
55
- * @param {number} projectId The project numeric Id
55
+ * @param {number} projectId The ID of the project.
56
56
  * @param {number} [page] Number of the page to be retrieved
57
57
  * @param {number} [perPage] Number of items returned per page
58
58
  */
@@ -13,7 +13,6 @@ import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { Server } from '../../generated/models';
15
15
  import { ServerCommands } from '../../generated/models';
16
- import { ServerConnect } from '../../generated/models';
17
16
  import { ServerUpdate } from '../../generated/models';
18
17
  /**
19
18
  * ServersApiService - Auto-generated
@@ -22,10 +21,10 @@ export declare class ServersApiService extends ApiBaseService {
22
21
  /**
23
22
  *
24
23
  * @summary Connect a server to devopness platform
25
- * @param {number} serverId The server numeric Id
26
- * @param {string} activationToken The server activation token
24
+ * @param {string} activationToken The server activation token.
25
+ * @param {number} serverId The ID of the server.
27
26
  */
28
- connectServer(serverId: number, activationToken: string): Promise<ApiResponse<ServerConnect>>;
27
+ connectServer(activationToken: string, serverId: number): Promise<ApiResponse<string>>;
29
28
  /**
30
29
  *
31
30
  * @summary Get a server by ID
@@ -32,20 +32,20 @@ class ServersApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
34
  * @summary Connect a server to devopness platform
35
- * @param {number} serverId The server numeric Id
36
- * @param {string} activationToken The server activation token
35
+ * @param {string} activationToken The server activation token.
36
+ * @param {number} serverId The ID of the server.
37
37
  */
38
- connectServer(serverId, activationToken) {
38
+ connectServer(activationToken, serverId) {
39
39
  return __awaiter(this, void 0, void 0, function* () {
40
- if (serverId === null || serverId === undefined) {
41
- throw new Exceptions_1.ArgumentNullException('serverId', 'connectServer');
42
- }
43
40
  if (activationToken === null || activationToken === undefined) {
44
41
  throw new Exceptions_1.ArgumentNullException('activationToken', 'connectServer');
45
42
  }
43
+ if (serverId === null || serverId === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('serverId', 'connectServer');
45
+ }
46
46
  let queryString = '';
47
47
  const requestUrl = '/servers/{server_id}/connect/{activation_token}' + (queryString ? `?${queryString}` : '');
48
- const response = yield this.post(requestUrl.replace(`{${"server_id"}}`, encodeURIComponent(String(serverId))).replace(`{${"activation_token"}}`, encodeURIComponent(String(activationToken))));
48
+ const response = yield this.post(requestUrl.replace(`{${"activation_token"}}`, encodeURIComponent(String(activationToken))).replace(`{${"server_id"}}`, encodeURIComponent(String(serverId))));
49
49
  return new ApiResponse_1.ApiResponse(response);
50
50
  });
51
51
  }
@@ -15,9 +15,9 @@ import { Service } from '../../generated/models';
15
15
  import { ServiceReload } from '../../generated/models';
16
16
  import { ServiceRestart } from '../../generated/models';
17
17
  import { ServiceStart } from '../../generated/models';
18
- import { ServiceStatusUpdate } from '../../generated/models';
19
18
  import { ServiceStop } from '../../generated/models';
20
19
  import { ServiceUpdate } from '../../generated/models';
20
+ import { ServiceUpdateStatus } from '../../generated/models';
21
21
  /**
22
22
  * ServicesApiService - Auto-generated
23
23
  */
@@ -25,55 +25,55 @@ export declare class ServicesApiService extends ApiBaseService {
25
25
  /**
26
26
  *
27
27
  * @summary Delete a given service
28
- * @param {number} serviceId The Id of the service to be deleted
28
+ * @param {number} serviceId The ID of the service.
29
29
  */
30
30
  deleteService(serviceId: number): Promise<ApiResponse<void>>;
31
31
  /**
32
32
  *
33
33
  * @summary Get details of a single service
34
- * @param {number} serviceId Unique ID of the service to get
34
+ * @param {number} serviceId The ID of the service.
35
35
  */
36
36
  getService(serviceId: number): Promise<ApiResponse<Service>>;
37
37
  /**
38
38
  *
39
39
  * @summary Reload a service
40
- * @param {number} serviceId The unique id of the service
41
- * @param {ServiceReload} serviceReload A JSON object containing the environment id
40
+ * @param {number} serviceId The ID of the service.
41
+ * @param {ServiceReload} serviceReload A JSON object containing the resource data
42
42
  */
43
43
  reloadService(serviceId: number, serviceReload: ServiceReload): Promise<ApiResponse<void>>;
44
44
  /**
45
45
  *
46
46
  * @summary Restart a service
47
- * @param {number} serviceId The unique id of the service
48
- * @param {ServiceRestart} serviceRestart A JSON object containing the environment id
47
+ * @param {number} serviceId The ID of the service.
48
+ * @param {ServiceRestart} serviceRestart A JSON object containing the resource data
49
49
  */
50
50
  restartService(serviceId: number, serviceRestart: ServiceRestart): Promise<ApiResponse<void>>;
51
51
  /**
52
52
  *
53
53
  * @summary Start a service
54
- * @param {number} serviceId The unique id of the service
55
- * @param {ServiceStart} serviceStart A JSON object containing the environment id
54
+ * @param {number} serviceId The ID of the service.
55
+ * @param {ServiceStart} serviceStart A JSON object containing the resource data
56
56
  */
57
57
  startService(serviceId: number, serviceStart: ServiceStart): Promise<ApiResponse<void>>;
58
58
  /**
59
59
  *
60
60
  * @summary Stop a service
61
- * @param {number} serviceId The unique id of the service
62
- * @param {ServiceStop} serviceStop A JSON object containing the environment id
61
+ * @param {number} serviceId The ID of the service.
62
+ * @param {ServiceStop} serviceStop A JSON object containing the resource data
63
63
  */
64
64
  stopService(serviceId: number, serviceStop: ServiceStop): Promise<ApiResponse<void>>;
65
65
  /**
66
66
  *
67
67
  * @summary Update an existing service
68
- * @param {number} serviceId The unique id of the service
69
- * @param {ServiceUpdate} serviceUpdate A JSON object containing service data
68
+ * @param {number} serviceId The ID of the service.
69
+ * @param {ServiceUpdate} serviceUpdate A JSON object containing the resource data
70
70
  */
71
71
  updateService(serviceId: number, serviceUpdate: ServiceUpdate): Promise<ApiResponse<void>>;
72
72
  /**
73
- * Trigger a status update action for a service in all project servers asynchronously. To get the output of service status update action the endpoint [getServiceStatusLog](/#operation/getServiceStatusLog) should be invoked.
73
+ *
74
74
  * @summary Update status of a service
75
- * @param {number} serviceId The unique id of the service
76
- * @param {ServiceStatusUpdate} serviceStatusUpdate A JSON object containing the environment id
75
+ * @param {number} serviceId The ID of the service.
76
+ * @param {ServiceUpdateStatus} serviceUpdateStatus A JSON object containing the resource data
77
77
  */
78
- updateServiceStatus(serviceId: number, serviceStatusUpdate: ServiceStatusUpdate): Promise<ApiResponse<void>>;
78
+ updateStatusService(serviceId: number, serviceUpdateStatus: ServiceUpdateStatus): Promise<ApiResponse<void>>;
79
79
  }
@@ -32,7 +32,7 @@ class ServicesApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
34
  * @summary Delete a given service
35
- * @param {number} serviceId The Id of the service to be deleted
35
+ * @param {number} serviceId The ID of the service.
36
36
  */
37
37
  deleteService(serviceId) {
38
38
  return __awaiter(this, void 0, void 0, function* () {
@@ -48,7 +48,7 @@ class ServicesApiService extends ApiBaseService_1.ApiBaseService {
48
48
  /**
49
49
  *
50
50
  * @summary Get details of a single service
51
- * @param {number} serviceId Unique ID of the service to get
51
+ * @param {number} serviceId The ID of the service.
52
52
  */
53
53
  getService(serviceId) {
54
54
  return __awaiter(this, void 0, void 0, function* () {
@@ -64,8 +64,8 @@ class ServicesApiService extends ApiBaseService_1.ApiBaseService {
64
64
  /**
65
65
  *
66
66
  * @summary Reload a service
67
- * @param {number} serviceId The unique id of the service
68
- * @param {ServiceReload} serviceReload A JSON object containing the environment id
67
+ * @param {number} serviceId The ID of the service.
68
+ * @param {ServiceReload} serviceReload A JSON object containing the resource data
69
69
  */
70
70
  reloadService(serviceId, serviceReload) {
71
71
  return __awaiter(this, void 0, void 0, function* () {
@@ -84,8 +84,8 @@ class ServicesApiService extends ApiBaseService_1.ApiBaseService {
84
84
  /**
85
85
  *
86
86
  * @summary Restart a service
87
- * @param {number} serviceId The unique id of the service
88
- * @param {ServiceRestart} serviceRestart A JSON object containing the environment id
87
+ * @param {number} serviceId The ID of the service.
88
+ * @param {ServiceRestart} serviceRestart A JSON object containing the resource data
89
89
  */
90
90
  restartService(serviceId, serviceRestart) {
91
91
  return __awaiter(this, void 0, void 0, function* () {
@@ -104,8 +104,8 @@ class ServicesApiService extends ApiBaseService_1.ApiBaseService {
104
104
  /**
105
105
  *
106
106
  * @summary Start a service
107
- * @param {number} serviceId The unique id of the service
108
- * @param {ServiceStart} serviceStart A JSON object containing the environment id
107
+ * @param {number} serviceId The ID of the service.
108
+ * @param {ServiceStart} serviceStart A JSON object containing the resource data
109
109
  */
110
110
  startService(serviceId, serviceStart) {
111
111
  return __awaiter(this, void 0, void 0, function* () {
@@ -124,8 +124,8 @@ class ServicesApiService extends ApiBaseService_1.ApiBaseService {
124
124
  /**
125
125
  *
126
126
  * @summary Stop a service
127
- * @param {number} serviceId The unique id of the service
128
- * @param {ServiceStop} serviceStop A JSON object containing the environment id
127
+ * @param {number} serviceId The ID of the service.
128
+ * @param {ServiceStop} serviceStop A JSON object containing the resource data
129
129
  */
130
130
  stopService(serviceId, serviceStop) {
131
131
  return __awaiter(this, void 0, void 0, function* () {
@@ -144,8 +144,8 @@ class ServicesApiService extends ApiBaseService_1.ApiBaseService {
144
144
  /**
145
145
  *
146
146
  * @summary Update an existing service
147
- * @param {number} serviceId The unique id of the service
148
- * @param {ServiceUpdate} serviceUpdate A JSON object containing service data
147
+ * @param {number} serviceId The ID of the service.
148
+ * @param {ServiceUpdate} serviceUpdate A JSON object containing the resource data
149
149
  */
150
150
  updateService(serviceId, serviceUpdate) {
151
151
  return __awaiter(this, void 0, void 0, function* () {
@@ -162,22 +162,22 @@ class ServicesApiService extends ApiBaseService_1.ApiBaseService {
162
162
  });
163
163
  }
164
164
  /**
165
- * Trigger a status update action for a service in all project servers asynchronously. To get the output of service status update action the endpoint [getServiceStatusLog](/#operation/getServiceStatusLog) should be invoked.
165
+ *
166
166
  * @summary Update status of a service
167
- * @param {number} serviceId The unique id of the service
168
- * @param {ServiceStatusUpdate} serviceStatusUpdate A JSON object containing the environment id
167
+ * @param {number} serviceId The ID of the service.
168
+ * @param {ServiceUpdateStatus} serviceUpdateStatus A JSON object containing the resource data
169
169
  */
170
- updateServiceStatus(serviceId, serviceStatusUpdate) {
170
+ updateStatusService(serviceId, serviceUpdateStatus) {
171
171
  return __awaiter(this, void 0, void 0, function* () {
172
172
  if (serviceId === null || serviceId === undefined) {
173
- throw new Exceptions_1.ArgumentNullException('serviceId', 'updateServiceStatus');
173
+ throw new Exceptions_1.ArgumentNullException('serviceId', 'updateStatusService');
174
174
  }
175
- if (serviceStatusUpdate === null || serviceStatusUpdate === undefined) {
176
- throw new Exceptions_1.ArgumentNullException('serviceStatusUpdate', 'updateServiceStatus');
175
+ if (serviceUpdateStatus === null || serviceUpdateStatus === undefined) {
176
+ throw new Exceptions_1.ArgumentNullException('serviceUpdateStatus', 'updateStatusService');
177
177
  }
178
178
  let queryString = '';
179
179
  const requestUrl = '/services/{service_id}/update-status' + (queryString ? `?${queryString}` : '');
180
- const response = yield this.post(requestUrl.replace(`{${"service_id"}}`, encodeURIComponent(String(serviceId))), serviceStatusUpdate);
180
+ const response = yield this.post(requestUrl.replace(`{${"service_id"}}`, encodeURIComponent(String(serviceId))), serviceUpdateStatus);
181
181
  return new ApiResponse_1.ApiResponse(response);
182
182
  });
183
183
  }