@devopness/sdk-js 2.14.1 → 2.16.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 (61) hide show
  1. package/dist/api/generated/apis/cron-jobs-api.d.ts +7 -7
  2. package/dist/api/generated/apis/cron-jobs-api.js +7 -7
  3. package/dist/api/generated/apis/environments-applications-api.d.ts +9 -0
  4. package/dist/api/generated/apis/environments-applications-api.js +20 -0
  5. package/dist/api/generated/apis/environments-cron-jobs-api.d.ts +11 -2
  6. package/dist/api/generated/apis/environments-cron-jobs-api.js +22 -2
  7. package/dist/api/generated/apis/environments-servers-api.d.ts +9 -9
  8. package/dist/api/generated/apis/environments-servers-api.js +20 -25
  9. package/dist/api/generated/apis/environments-services-api.d.ts +2 -2
  10. package/dist/api/generated/apis/environments-services-api.js +2 -2
  11. package/dist/api/generated/apis/environments-sshkeys-api.d.ts +11 -2
  12. package/dist/api/generated/apis/environments-sshkeys-api.js +22 -2
  13. package/dist/api/generated/apis/projects-cron-jobs-api.d.ts +4 -4
  14. package/dist/api/generated/apis/projects-cron-jobs-api.js +6 -6
  15. package/dist/api/generated/apis/projects-servers-api.d.ts +4 -4
  16. package/dist/api/generated/apis/projects-servers-api.js +6 -6
  17. package/dist/api/generated/apis/projects-services-api.d.ts +5 -5
  18. package/dist/api/generated/apis/projects-services-api.js +7 -7
  19. package/dist/api/generated/apis/projects-sshkeys-api.d.ts +1 -1
  20. package/dist/api/generated/apis/projects-sshkeys-api.js +1 -1
  21. package/dist/api/generated/apis/servers-api.d.ts +3 -4
  22. package/dist/api/generated/apis/servers-api.js +7 -7
  23. package/dist/api/generated/apis/services-api.d.ts +17 -17
  24. package/dist/api/generated/apis/services-api.js +20 -20
  25. package/dist/api/generated/models/application-environment-create.d.ts +138 -0
  26. package/dist/api/generated/models/{service-status-update.js → application-environment-create.js} +0 -0
  27. package/dist/api/generated/models/cron-job-create.d.ts +16 -16
  28. package/dist/api/generated/models/cron-job-environment-create.d.ts +54 -0
  29. package/dist/api/generated/models/cron-job-environment-create.js +14 -0
  30. package/dist/api/generated/models/cron-job-relation.d.ts +19 -12
  31. package/dist/api/generated/models/cron-job-update.d.ts +11 -11
  32. package/dist/api/generated/models/cron-job.d.ts +19 -19
  33. package/dist/api/generated/models/index.d.ts +4 -2
  34. package/dist/api/generated/models/index.js +4 -2
  35. package/dist/api/generated/models/server-relation.d.ts +22 -22
  36. package/dist/api/generated/models/server.d.ts +34 -28
  37. package/dist/api/generated/models/service-create.d.ts +11 -11
  38. package/dist/api/generated/models/service-relation.d.ts +14 -8
  39. package/dist/api/generated/models/service-reload.d.ts +1 -1
  40. package/dist/api/generated/models/service-restart.d.ts +1 -1
  41. package/dist/api/generated/models/service-start.d.ts +1 -1
  42. package/dist/api/generated/models/service-stop.d.ts +1 -1
  43. package/dist/api/generated/models/{service-status-update.d.ts → service-update-status.d.ts} +4 -4
  44. package/dist/api/generated/models/service-update-status.js +14 -0
  45. package/dist/api/generated/models/service-update.d.ts +2 -2
  46. package/dist/api/generated/models/service.d.ts +4 -4
  47. package/dist/api/generated/models/ssh-key-create.d.ts +5 -12
  48. package/dist/api/generated/models/ssh-key-project-create.d.ts +37 -0
  49. package/dist/api/generated/models/ssh-key-project-create.js +14 -0
  50. package/dist/api/generated/models/ssh-key-relation.d.ts +13 -7
  51. package/dist/api/generated/models/ssh-key-update.d.ts +2 -2
  52. package/dist/api/generated/models/ssh-key.d.ts +13 -7
  53. package/dist/api/generated/models/trigger-event.d.ts +2 -1
  54. package/dist/api/generated/models/trigger-event.js +2 -1
  55. package/dist/index.d.ts +1 -0
  56. package/dist/index.js +2 -1
  57. package/dist/services/index.d.ts +27 -0
  58. package/dist/services/index.js +43 -0
  59. package/package.json +14 -7
  60. package/dist/api/generated/models/service-action.d.ts +0 -27
  61. package/dist/api/generated/models/service-action.js +0 -32
@@ -19,21 +19,21 @@ import { CronJobUpdate } from '../../generated/models';
19
19
  export declare class CronJobsApiService extends ApiBaseService {
20
20
  /**
21
21
  *
22
- * @summary Delete a given CronJob
23
- * @param {number} cronJobId Numeric ID of the cron job to be deleted
22
+ * @summary Delete a given Cron Job
23
+ * @param {number} cronJobId The ID of the cron job.
24
24
  */
25
25
  deleteCronJob(cronJobId: number): Promise<ApiResponse<void>>;
26
26
  /**
27
27
  *
28
- * @summary Get a CronJob by ID
29
- * @param {number} cronJobId Numeric ID of the cron job to get
28
+ * @summary Get a Cron Job by ID
29
+ * @param {number} cronJobId The ID of the cron job.
30
30
  */
31
31
  getCronJob(cronJobId: number): Promise<ApiResponse<CronJob>>;
32
32
  /**
33
33
  *
34
- * @summary Update an existing cron job
35
- * @param {number} cronJobId Numeric ID of the cron job to update
36
- * @param {CronJobUpdate} cronJobUpdate A JSON object containing cron job data
34
+ * @summary Update an existing Cron Job
35
+ * @param {number} cronJobId The ID of the cron job.
36
+ * @param {CronJobUpdate} cronJobUpdate A JSON object containing the resource data
37
37
  */
38
38
  updateCronJob(cronJobId: number, cronJobUpdate: CronJobUpdate): Promise<ApiResponse<void>>;
39
39
  }
@@ -31,8 +31,8 @@ const Exceptions_1 = require("../../../common/Exceptions");
31
31
  class CronJobsApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
- * @summary Delete a given CronJob
35
- * @param {number} cronJobId Numeric ID of the cron job to be deleted
34
+ * @summary Delete a given Cron Job
35
+ * @param {number} cronJobId The ID of the cron job.
36
36
  */
37
37
  deleteCronJob(cronJobId) {
38
38
  return __awaiter(this, void 0, void 0, function* () {
@@ -47,8 +47,8 @@ class CronJobsApiService extends ApiBaseService_1.ApiBaseService {
47
47
  }
48
48
  /**
49
49
  *
50
- * @summary Get a CronJob by ID
51
- * @param {number} cronJobId Numeric ID of the cron job to get
50
+ * @summary Get a Cron Job by ID
51
+ * @param {number} cronJobId The ID of the cron job.
52
52
  */
53
53
  getCronJob(cronJobId) {
54
54
  return __awaiter(this, void 0, void 0, function* () {
@@ -63,9 +63,9 @@ class CronJobsApiService extends ApiBaseService_1.ApiBaseService {
63
63
  }
64
64
  /**
65
65
  *
66
- * @summary Update an existing cron job
67
- * @param {number} cronJobId Numeric ID of the cron job to update
68
- * @param {CronJobUpdate} cronJobUpdate A JSON object containing cron job data
66
+ * @summary Update an existing Cron Job
67
+ * @param {number} cronJobId The ID of the cron job.
68
+ * @param {CronJobUpdate} cronJobUpdate A JSON object containing the resource data
69
69
  */
70
70
  updateCronJob(cronJobId, cronJobUpdate) {
71
71
  return __awaiter(this, void 0, void 0, function* () {
@@ -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
@@ -11,6 +11,8 @@
11
11
  */
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
+ import { CronJob } from '../../generated/models';
15
+ import { CronJobCreate } from '../../generated/models';
14
16
  import { CronJobRelation } from '../../generated/models';
15
17
  /**
16
18
  * EnvironmentsCronJobsApiService - Auto-generated
@@ -18,8 +20,15 @@ import { CronJobRelation } from '../../generated/models';
18
20
  export declare class EnvironmentsCronJobsApiService extends ApiBaseService {
19
21
  /**
20
22
  *
21
- * @summary Return a list of all Cron Jobs belonging to a environment
22
- * @param {number} environmentId Numeric ID of the environment to get cron jobs from
23
+ * @summary Add a Cron Job to the given environment
24
+ * @param {number} environmentId The ID of the environment.
25
+ * @param {CronJobCreate} cronJobCreate A JSON object containing the resource data
26
+ */
27
+ addEnvironmentCronJob(environmentId: number, cronJobCreate: CronJobCreate): Promise<ApiResponse<CronJob>>;
28
+ /**
29
+ *
30
+ * @summary Return a list of all Cron Jobs belonging 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 EnvironmentsCronJobsApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
- * @summary Return a list of all Cron Jobs belonging to a environment
35
- * @param {number} environmentId Numeric ID of the environment to get cron jobs from
34
+ * @summary Add a Cron Job to the given environment
35
+ * @param {number} environmentId The ID of the environment.
36
+ * @param {CronJobCreate} cronJobCreate A JSON object containing the resource data
37
+ */
38
+ addEnvironmentCronJob(environmentId, cronJobCreate) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (environmentId === null || environmentId === undefined) {
41
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'addEnvironmentCronJob');
42
+ }
43
+ if (cronJobCreate === null || cronJobCreate === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('cronJobCreate', 'addEnvironmentCronJob');
45
+ }
46
+ let queryString = '';
47
+ const requestUrl = '/environments/{environment_id}/cron-jobs' + (queryString ? `?${queryString}` : '');
48
+ const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), cronJobCreate);
49
+ return new ApiResponse_1.ApiResponse(response);
50
+ });
51
+ }
52
+ /**
53
+ *
54
+ * @summary Return a list of all Cron Jobs belonging 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
  */
@@ -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 ProjectsCronJobsApiService extends ApiBaseService {
21
21
  /**
22
22
  *
23
23
  * @summary Add a Cron Job to the given project
24
- * @param {number} projectId The project numeric Id
25
- * @param {CronJobCreate} cronJobCreate A JSON object containing cron job data
24
+ * @param {number} projectId The ID of the project.
25
+ * @param {CronJobCreate} cronJobCreate A JSON object containing the resource data
26
26
  */
27
- addCronJobToProject(projectId: number, cronJobCreate: CronJobCreate): Promise<ApiResponse<CronJob>>;
27
+ addProjectCronJob(projectId: number, cronJobCreate: CronJobCreate): Promise<ApiResponse<CronJob>>;
28
28
  /**
29
29
  *
30
30
  * @summary Return a list of all Cron Jobs belonging to a project
31
- * @param {number} projectId Numeric ID of the project to get cron jobs from
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 ProjectsCronJobsApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
34
  * @summary Add a Cron Job to the given project
35
- * @param {number} projectId The project numeric Id
36
- * @param {CronJobCreate} cronJobCreate A JSON object containing cron job data
35
+ * @param {number} projectId The ID of the project.
36
+ * @param {CronJobCreate} cronJobCreate A JSON object containing the resource data
37
37
  */
38
- addCronJobToProject(projectId, cronJobCreate) {
38
+ addProjectCronJob(projectId, cronJobCreate) {
39
39
  return __awaiter(this, void 0, void 0, function* () {
40
40
  if (projectId === null || projectId === undefined) {
41
- throw new Exceptions_1.ArgumentNullException('projectId', 'addCronJobToProject');
41
+ throw new Exceptions_1.ArgumentNullException('projectId', 'addProjectCronJob');
42
42
  }
43
43
  if (cronJobCreate === null || cronJobCreate === undefined) {
44
- throw new Exceptions_1.ArgumentNullException('cronJobCreate', 'addCronJobToProject');
44
+ throw new Exceptions_1.ArgumentNullException('cronJobCreate', 'addProjectCronJob');
45
45
  }
46
46
  let queryString = '';
47
47
  const requestUrl = '/projects/{project_id}/cron-jobs' + (queryString ? `?${queryString}` : '');
@@ -52,7 +52,7 @@ class ProjectsCronJobsApiService extends ApiBaseService_1.ApiBaseService {
52
52
  /**
53
53
  *
54
54
  * @summary Return a list of all Cron Jobs belonging to a project
55
- * @param {number} projectId Numeric ID of the project to get cron jobs from
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
  */
@@ -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
  }