@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.
Files changed (53) hide show
  1. package/dist/api/generated/apis/applications-api.d.ts +25 -0
  2. package/dist/api/generated/apis/applications-api.js +65 -0
  3. package/dist/api/generated/apis/credentials-api.d.ts +27 -0
  4. package/dist/api/generated/apis/credentials-api.js +67 -0
  5. package/dist/api/generated/apis/cron-jobs-api.d.ts +17 -0
  6. package/dist/api/generated/apis/cron-jobs-api.js +45 -0
  7. package/dist/api/generated/apis/daemons-api.d.ts +17 -0
  8. package/dist/api/generated/apis/daemons-api.js +45 -0
  9. package/dist/api/generated/apis/network-rules-api.d.ts +17 -0
  10. package/dist/api/generated/apis/network-rules-api.js +45 -0
  11. package/dist/api/generated/apis/networks-api.d.ts +20 -0
  12. package/dist/api/generated/apis/networks-api.js +48 -0
  13. package/dist/api/generated/apis/servers-api.d.ts +17 -0
  14. package/dist/api/generated/apis/servers-api.js +45 -0
  15. package/dist/api/generated/apis/services-api.d.ts +17 -0
  16. package/dist/api/generated/apis/services-api.js +45 -0
  17. package/dist/api/generated/apis/sshkeys-api.d.ts +17 -0
  18. package/dist/api/generated/apis/sshkeys-api.js +45 -0
  19. package/dist/api/generated/apis/sslcertificates-api.d.ts +17 -0
  20. package/dist/api/generated/apis/sslcertificates-api.js +45 -0
  21. package/dist/api/generated/apis/virtual-hosts-api.d.ts +17 -0
  22. package/dist/api/generated/apis/virtual-hosts-api.js +45 -0
  23. package/dist/services/ApplicationService.d.ts +1 -2
  24. package/dist/services/ApplicationService.js +0 -2
  25. package/dist/services/EnvironmentService.d.ts +0 -22
  26. package/dist/services/EnvironmentService.js +0 -22
  27. package/dist/services/index.d.ts +1 -0
  28. package/dist/services/index.js +1 -0
  29. package/package.json +4 -4
  30. package/dist/api/generated/apis/applications-deployments-api.d.ts +0 -26
  31. package/dist/api/generated/apis/applications-deployments-api.js +0 -53
  32. package/dist/api/generated/apis/environments-applications-api.d.ts +0 -36
  33. package/dist/api/generated/apis/environments-applications-api.js +0 -78
  34. package/dist/api/generated/apis/environments-credentials-api.d.ts +0 -46
  35. package/dist/api/generated/apis/environments-credentials-api.js +0 -100
  36. package/dist/api/generated/apis/environments-cron-jobs-api.d.ts +0 -36
  37. package/dist/api/generated/apis/environments-cron-jobs-api.js +0 -78
  38. package/dist/api/generated/apis/environments-daemons-api.d.ts +0 -36
  39. package/dist/api/generated/apis/environments-daemons-api.js +0 -78
  40. package/dist/api/generated/apis/environments-network-rules-api.d.ts +0 -36
  41. package/dist/api/generated/apis/environments-network-rules-api.js +0 -78
  42. package/dist/api/generated/apis/environments-networks-api.d.ts +0 -39
  43. package/dist/api/generated/apis/environments-networks-api.js +0 -81
  44. package/dist/api/generated/apis/environments-servers-api.d.ts +0 -36
  45. package/dist/api/generated/apis/environments-servers-api.js +0 -78
  46. package/dist/api/generated/apis/environments-services-api.d.ts +0 -36
  47. package/dist/api/generated/apis/environments-services-api.js +0 -78
  48. package/dist/api/generated/apis/environments-sshkeys-api.d.ts +0 -36
  49. package/dist/api/generated/apis/environments-sshkeys-api.js +0 -78
  50. package/dist/api/generated/apis/environments-sslcertificates-api.d.ts +0 -36
  51. package/dist/api/generated/apis/environments-sslcertificates-api.js +0 -78
  52. package/dist/api/generated/apis/environments-virtual-hosts-api.d.ts +0 -36
  53. package/dist/api/generated/apis/environments-virtual-hosts-api.js +0 -78
@@ -12,11 +12,28 @@
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { Application } from '../../generated/models';
15
+ import { ApplicationEnvironmentCreate } from '../../generated/models';
16
+ import { ApplicationRelation } from '../../generated/models';
15
17
  import { ApplicationUpdate } from '../../generated/models';
18
+ import { DeploymentApplicationCreate } from '../../generated/models';
16
19
  /**
17
20
  * ApplicationsApiService - Auto-generated
18
21
  */
19
22
  export declare class ApplicationsApiService extends ApiBaseService {
23
+ /**
24
+ *
25
+ * @summary Trigger a new deployment for current application
26
+ * @param {number} applicationId The ID of the application.
27
+ * @param {DeploymentApplicationCreate} deploymentApplicationCreate A JSON object containing the resource data
28
+ */
29
+ addApplicationDeployment(applicationId: number, deploymentApplicationCreate: DeploymentApplicationCreate): Promise<ApiResponse<void>>;
30
+ /**
31
+ *
32
+ * @summary Create a new application
33
+ * @param {number} environmentId The ID of the environment.
34
+ * @param {ApplicationEnvironmentCreate} applicationEnvironmentCreate A JSON object containing the resource data
35
+ */
36
+ addEnvironmentApplication(environmentId: number, applicationEnvironmentCreate: ApplicationEnvironmentCreate): Promise<ApiResponse<Application>>;
20
37
  /**
21
38
  *
22
39
  * @summary Delete a given application
@@ -29,6 +46,14 @@ export declare class ApplicationsApiService extends ApiBaseService {
29
46
  * @param {number} applicationId The ID of the application.
30
47
  */
31
48
  getApplication(applicationId: number): Promise<ApiResponse<Application>>;
49
+ /**
50
+ *
51
+ * @summary Return a list of all Applications 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
+ listEnvironmentApplications(environmentId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<ApplicationRelation>>>;
32
57
  /**
33
58
  *
34
59
  * @summary Update an existing application
@@ -29,6 +29,46 @@ const Exceptions_1 = require("../../../common/Exceptions");
29
29
  * ApplicationsApiService - Auto-generated
30
30
  */
31
31
  class ApplicationsApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary Trigger a new deployment for current application
35
+ * @param {number} applicationId The ID of the application.
36
+ * @param {DeploymentApplicationCreate} deploymentApplicationCreate A JSON object containing the resource data
37
+ */
38
+ addApplicationDeployment(applicationId, deploymentApplicationCreate) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (applicationId === null || applicationId === undefined) {
41
+ throw new Exceptions_1.ArgumentNullException('applicationId', 'addApplicationDeployment');
42
+ }
43
+ if (deploymentApplicationCreate === null || deploymentApplicationCreate === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('deploymentApplicationCreate', 'addApplicationDeployment');
45
+ }
46
+ let queryString = '';
47
+ const requestUrl = '/applications/{application_id}/deployments' + (queryString ? `?${queryString}` : '');
48
+ const response = yield this.post(requestUrl.replace(`{${"application_id"}}`, encodeURIComponent(String(applicationId))), deploymentApplicationCreate);
49
+ return new ApiResponse_1.ApiResponse(response);
50
+ });
51
+ }
52
+ /**
53
+ *
54
+ * @summary Create a new application
55
+ * @param {number} environmentId The ID of the environment.
56
+ * @param {ApplicationEnvironmentCreate} applicationEnvironmentCreate A JSON object containing the resource data
57
+ */
58
+ addEnvironmentApplication(environmentId, applicationEnvironmentCreate) {
59
+ return __awaiter(this, void 0, void 0, function* () {
60
+ if (environmentId === null || environmentId === undefined) {
61
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'addEnvironmentApplication');
62
+ }
63
+ if (applicationEnvironmentCreate === null || applicationEnvironmentCreate === undefined) {
64
+ throw new Exceptions_1.ArgumentNullException('applicationEnvironmentCreate', 'addEnvironmentApplication');
65
+ }
66
+ let queryString = '';
67
+ const requestUrl = '/environments/{environment_id}/applications' + (queryString ? `?${queryString}` : '');
68
+ const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), applicationEnvironmentCreate);
69
+ return new ApiResponse_1.ApiResponse(response);
70
+ });
71
+ }
32
72
  /**
33
73
  *
34
74
  * @summary Delete a given application
@@ -61,6 +101,31 @@ class ApplicationsApiService extends ApiBaseService_1.ApiBaseService {
61
101
  return new ApiResponse_1.ApiResponse(response);
62
102
  });
63
103
  }
104
+ /**
105
+ *
106
+ * @summary Return a list of all Applications 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
+ listEnvironmentApplications(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', 'listEnvironmentApplications');
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}/applications' + (queryString ? `?${queryString}` : '');
125
+ const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
126
+ return new ApiResponse_1.ApiResponse(response);
127
+ });
128
+ }
64
129
  /**
65
130
  *
66
131
  * @summary Update an existing application
@@ -12,11 +12,21 @@
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { Credential } from '../../generated/models';
15
+ import { CredentialEnvironmentCreate } from '../../generated/models';
16
+ import { CredentialRelation } from '../../generated/models';
17
+ import { CredentialSetting } from '../../generated/models';
15
18
  import { CredentialUpdate } from '../../generated/models';
16
19
  /**
17
20
  * CredentialsApiService - Auto-generated
18
21
  */
19
22
  export declare class CredentialsApiService extends ApiBaseService {
23
+ /**
24
+ *
25
+ * @summary Add a Credential to the given environment
26
+ * @param {number} environmentId The ID of the environment.
27
+ * @param {CredentialEnvironmentCreate} credentialEnvironmentCreate A JSON object containing the resource data
28
+ */
29
+ addEnvironmentCredential(environmentId: number, credentialEnvironmentCreate: CredentialEnvironmentCreate): Promise<ApiResponse<Credential>>;
20
30
  /**
21
31
  *
22
32
  * @summary Delete a given credential
@@ -29,12 +39,29 @@ export declare class CredentialsApiService extends ApiBaseService {
29
39
  * @param {number} credentialId The ID of the credential.
30
40
  */
31
41
  getCredential(credentialId: number): Promise<ApiResponse<Credential>>;
42
+ /**
43
+ *
44
+ * @summary Return provider settings
45
+ * @param {number} environmentId The ID of the environment.
46
+ * @param {string} providerCode The code of the provider.
47
+ */
48
+ getEnvironmentCredentialSettings(environmentId: number, providerCode: string): Promise<ApiResponse<CredentialSetting>>;
32
49
  /**
33
50
  *
34
51
  * @summary Get current status of a credential on its provider
35
52
  * @param {number} credentialId The ID of the credential.
36
53
  */
37
54
  getStatusCredential(credentialId: number): Promise<ApiResponse<void>>;
55
+ /**
56
+ *
57
+ * @summary Return a list of all Credentials belonging to an environment
58
+ * @param {number} environmentId The ID of the environment.
59
+ * @param {number} [page] Number of the page to be retrieved
60
+ * @param {number} [perPage] Number of items returned per page
61
+ * @param {string} [providerCode] Filter credentials by provider code.
62
+ * @param {string} [providerType] Filter credentials by provider type.
63
+ */
64
+ listEnvironmentCredentials(environmentId: number, page?: number, perPage?: number, providerCode?: string, providerType?: string): Promise<ApiResponse<Array<CredentialRelation>>>;
38
65
  /**
39
66
  *
40
67
  * @summary Update an existing Credential
@@ -29,6 +29,26 @@ const Exceptions_1 = require("../../../common/Exceptions");
29
29
  * CredentialsApiService - Auto-generated
30
30
  */
31
31
  class CredentialsApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary Add a Credential to the given environment
35
+ * @param {number} environmentId The ID of the environment.
36
+ * @param {CredentialEnvironmentCreate} credentialEnvironmentCreate A JSON object containing the resource data
37
+ */
38
+ addEnvironmentCredential(environmentId, credentialEnvironmentCreate) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (environmentId === null || environmentId === undefined) {
41
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'addEnvironmentCredential');
42
+ }
43
+ if (credentialEnvironmentCreate === null || credentialEnvironmentCreate === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('credentialEnvironmentCreate', 'addEnvironmentCredential');
45
+ }
46
+ let queryString = '';
47
+ const requestUrl = '/environments/{environment_id}/credentials' + (queryString ? `?${queryString}` : '');
48
+ const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), credentialEnvironmentCreate);
49
+ return new ApiResponse_1.ApiResponse(response);
50
+ });
51
+ }
32
52
  /**
33
53
  *
34
54
  * @summary Delete a given credential
@@ -61,6 +81,26 @@ class CredentialsApiService extends ApiBaseService_1.ApiBaseService {
61
81
  return new ApiResponse_1.ApiResponse(response);
62
82
  });
63
83
  }
84
+ /**
85
+ *
86
+ * @summary Return provider settings
87
+ * @param {number} environmentId The ID of the environment.
88
+ * @param {string} providerCode The code of the provider.
89
+ */
90
+ getEnvironmentCredentialSettings(environmentId, providerCode) {
91
+ return __awaiter(this, void 0, void 0, function* () {
92
+ if (environmentId === null || environmentId === undefined) {
93
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'getEnvironmentCredentialSettings');
94
+ }
95
+ if (providerCode === null || providerCode === undefined) {
96
+ throw new Exceptions_1.ArgumentNullException('providerCode', 'getEnvironmentCredentialSettings');
97
+ }
98
+ let queryString = '';
99
+ const requestUrl = '/environments/{environment_id}/credentials/{provider_code}/settings' + (queryString ? `?${queryString}` : '');
100
+ const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))).replace(`{${"provider_code"}}`, encodeURIComponent(String(providerCode))));
101
+ return new ApiResponse_1.ApiResponse(response);
102
+ });
103
+ }
64
104
  /**
65
105
  *
66
106
  * @summary Get current status of a credential on its provider
@@ -77,6 +117,33 @@ class CredentialsApiService extends ApiBaseService_1.ApiBaseService {
77
117
  return new ApiResponse_1.ApiResponse(response);
78
118
  });
79
119
  }
120
+ /**
121
+ *
122
+ * @summary Return a list of all Credentials belonging to an environment
123
+ * @param {number} environmentId The ID of the environment.
124
+ * @param {number} [page] Number of the page to be retrieved
125
+ * @param {number} [perPage] Number of items returned per page
126
+ * @param {string} [providerCode] Filter credentials by provider code.
127
+ * @param {string} [providerType] Filter credentials by provider type.
128
+ */
129
+ listEnvironmentCredentials(environmentId, page, perPage, providerCode, providerType) {
130
+ return __awaiter(this, void 0, void 0, function* () {
131
+ if (environmentId === null || environmentId === undefined) {
132
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentCredentials');
133
+ }
134
+ let queryString = '';
135
+ const queryParams = { page: page, per_page: perPage, provider_code: providerCode, provider_type: providerType, };
136
+ for (const key in queryParams) {
137
+ if (queryParams[key] === undefined || queryParams[key] === null) {
138
+ continue;
139
+ }
140
+ queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
141
+ }
142
+ const requestUrl = '/environments/{environment_id}/credentials' + (queryString ? `?${queryString}` : '');
143
+ const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
144
+ return new ApiResponse_1.ApiResponse(response);
145
+ });
146
+ }
80
147
  /**
81
148
  *
82
149
  * @summary Update an existing Credential
@@ -12,11 +12,20 @@
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { CronJob } from '../../generated/models';
15
+ import { CronJobEnvironmentCreate } from '../../generated/models';
16
+ import { CronJobRelation } from '../../generated/models';
15
17
  import { CronJobUpdate } from '../../generated/models';
16
18
  /**
17
19
  * CronJobsApiService - Auto-generated
18
20
  */
19
21
  export declare class CronJobsApiService extends ApiBaseService {
22
+ /**
23
+ *
24
+ * @summary Add a Cron Job to the given environment
25
+ * @param {number} environmentId The ID of the environment.
26
+ * @param {CronJobEnvironmentCreate} cronJobEnvironmentCreate A JSON object containing the resource data
27
+ */
28
+ addEnvironmentCronJob(environmentId: number, cronJobEnvironmentCreate: CronJobEnvironmentCreate): Promise<ApiResponse<CronJob>>;
20
29
  /**
21
30
  *
22
31
  * @summary Delete a given Cron Job
@@ -29,6 +38,14 @@ export declare class CronJobsApiService extends ApiBaseService {
29
38
  * @param {number} cronJobId The ID of the cron job.
30
39
  */
31
40
  getCronJob(cronJobId: number): Promise<ApiResponse<CronJob>>;
41
+ /**
42
+ *
43
+ * @summary Return a list of all Cron Jobs belonging 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
+ listEnvironmentCronJobs(environmentId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<CronJobRelation>>>;
32
49
  /**
33
50
  *
34
51
  * @summary Update an existing Cron Job
@@ -29,6 +29,26 @@ const Exceptions_1 = require("../../../common/Exceptions");
29
29
  * CronJobsApiService - Auto-generated
30
30
  */
31
31
  class CronJobsApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary Add a Cron Job to the given environment
35
+ * @param {number} environmentId The ID of the environment.
36
+ * @param {CronJobEnvironmentCreate} cronJobEnvironmentCreate A JSON object containing the resource data
37
+ */
38
+ addEnvironmentCronJob(environmentId, cronJobEnvironmentCreate) {
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 (cronJobEnvironmentCreate === null || cronJobEnvironmentCreate === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('cronJobEnvironmentCreate', '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))), cronJobEnvironmentCreate);
49
+ return new ApiResponse_1.ApiResponse(response);
50
+ });
51
+ }
32
52
  /**
33
53
  *
34
54
  * @summary Delete a given Cron Job
@@ -61,6 +81,31 @@ class CronJobsApiService 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 Cron Jobs 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
+ listEnvironmentCronJobs(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', 'listEnvironmentCronJobs');
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}/cron-jobs' + (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 Cron Job
@@ -12,7 +12,9 @@
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { Daemon } from '../../generated/models';
15
+ import { DaemonEnvironmentCreate } from '../../generated/models';
15
16
  import { DaemonGetStatus } from '../../generated/models';
17
+ import { DaemonRelation } from '../../generated/models';
16
18
  import { DaemonRestart } from '../../generated/models';
17
19
  import { DaemonStart } from '../../generated/models';
18
20
  import { DaemonStop } from '../../generated/models';
@@ -21,6 +23,13 @@ import { DaemonUpdate } from '../../generated/models';
21
23
  * DaemonsApiService - Auto-generated
22
24
  */
23
25
  export declare class DaemonsApiService extends ApiBaseService {
26
+ /**
27
+ *
28
+ * @summary Add a Daemon to the given environment
29
+ * @param {number} environmentId The ID of the environment.
30
+ * @param {DaemonEnvironmentCreate} daemonEnvironmentCreate A JSON object containing the resource data
31
+ */
32
+ addEnvironmentDaemon(environmentId: number, daemonEnvironmentCreate: DaemonEnvironmentCreate): Promise<ApiResponse<Daemon>>;
24
33
  /**
25
34
  *
26
35
  * @summary Delete a given Daemon
@@ -40,6 +49,14 @@ export declare class DaemonsApiService extends ApiBaseService {
40
49
  * @param {DaemonGetStatus} daemonGetStatus A JSON object containing the resource data
41
50
  */
42
51
  getStatusDaemon(daemonId: number, daemonGetStatus: DaemonGetStatus): Promise<ApiResponse<void>>;
52
+ /**
53
+ *
54
+ * @summary Return a list of all Daemons belonging to an environment
55
+ * @param {number} environmentId The ID of the environment.
56
+ * @param {number} [page] Number of the page to be retrieved
57
+ * @param {number} [perPage] Number of items returned per page
58
+ */
59
+ listEnvironmentDaemons(environmentId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<DaemonRelation>>>;
43
60
  /**
44
61
  *
45
62
  * @summary Restart a Daemon
@@ -29,6 +29,26 @@ const Exceptions_1 = require("../../../common/Exceptions");
29
29
  * DaemonsApiService - Auto-generated
30
30
  */
31
31
  class DaemonsApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary Add a Daemon to the given environment
35
+ * @param {number} environmentId The ID of the environment.
36
+ * @param {DaemonEnvironmentCreate} daemonEnvironmentCreate A JSON object containing the resource data
37
+ */
38
+ addEnvironmentDaemon(environmentId, daemonEnvironmentCreate) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (environmentId === null || environmentId === undefined) {
41
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'addEnvironmentDaemon');
42
+ }
43
+ if (daemonEnvironmentCreate === null || daemonEnvironmentCreate === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('daemonEnvironmentCreate', 'addEnvironmentDaemon');
45
+ }
46
+ let queryString = '';
47
+ const requestUrl = '/environments/{environment_id}/daemons' + (queryString ? `?${queryString}` : '');
48
+ const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), daemonEnvironmentCreate);
49
+ return new ApiResponse_1.ApiResponse(response);
50
+ });
51
+ }
32
52
  /**
33
53
  *
34
54
  * @summary Delete a given Daemon
@@ -81,6 +101,31 @@ class DaemonsApiService 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 Daemons 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
+ listEnvironmentDaemons(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', 'listEnvironmentDaemons');
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}/daemons' + (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 Restart a Daemon
@@ -12,11 +12,20 @@
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { NetworkRule } from '../../generated/models';
15
+ import { NetworkRuleEnvironmentCreate } from '../../generated/models';
16
+ import { NetworkRuleRelation } from '../../generated/models';
15
17
  import { NetworkRuleUpdate } from '../../generated/models';
16
18
  /**
17
19
  * NetworkRulesApiService - Auto-generated
18
20
  */
19
21
  export declare class NetworkRulesApiService extends ApiBaseService {
22
+ /**
23
+ *
24
+ * @summary Add a Network Rule to the given environment
25
+ * @param {number} environmentId The ID of the environment.
26
+ * @param {NetworkRuleEnvironmentCreate} networkRuleEnvironmentCreate A JSON object containing the resource data
27
+ */
28
+ addEnvironmentNetworkRule(environmentId: number, networkRuleEnvironmentCreate: NetworkRuleEnvironmentCreate): Promise<ApiResponse<NetworkRule>>;
20
29
  /**
21
30
  *
22
31
  * @summary Delete a given Network Rule
@@ -29,6 +38,14 @@ export declare class NetworkRulesApiService extends ApiBaseService {
29
38
  * @param {number} networkRuleId The ID of the network rule.
30
39
  */
31
40
  getNetworkRule(networkRuleId: number): Promise<ApiResponse<NetworkRule>>;
41
+ /**
42
+ *
43
+ * @summary Return a list of all Network Rules belonging 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
+ listEnvironmentNetworkRules(environmentId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<NetworkRuleRelation>>>;
32
49
  /**
33
50
  *
34
51
  * @summary Update an existing Network Rule
@@ -29,6 +29,26 @@ const Exceptions_1 = require("../../../common/Exceptions");
29
29
  * NetworkRulesApiService - Auto-generated
30
30
  */
31
31
  class NetworkRulesApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary Add a Network Rule to the given environment
35
+ * @param {number} environmentId The ID of the environment.
36
+ * @param {NetworkRuleEnvironmentCreate} networkRuleEnvironmentCreate A JSON object containing the resource data
37
+ */
38
+ addEnvironmentNetworkRule(environmentId, networkRuleEnvironmentCreate) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (environmentId === null || environmentId === undefined) {
41
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'addEnvironmentNetworkRule');
42
+ }
43
+ if (networkRuleEnvironmentCreate === null || networkRuleEnvironmentCreate === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('networkRuleEnvironmentCreate', 'addEnvironmentNetworkRule');
45
+ }
46
+ let queryString = '';
47
+ const requestUrl = '/environments/{environment_id}/network-rules' + (queryString ? `?${queryString}` : '');
48
+ const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), networkRuleEnvironmentCreate);
49
+ return new ApiResponse_1.ApiResponse(response);
50
+ });
51
+ }
32
52
  /**
33
53
  *
34
54
  * @summary Delete a given Network Rule
@@ -61,6 +81,31 @@ class NetworkRulesApiService 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 Network Rules 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
+ listEnvironmentNetworkRules(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', 'listEnvironmentNetworkRules');
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}/network-rules' + (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 Network Rule
@@ -12,11 +12,20 @@
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { Network } from '../../generated/models';
15
+ import { NetworkEnvironmentCreate } from '../../generated/models';
16
+ import { NetworkRelation } from '../../generated/models';
15
17
  import { NetworkUpdate } from '../../generated/models';
16
18
  /**
17
19
  * NetworksApiService - Auto-generated
18
20
  */
19
21
  export declare class NetworksApiService extends ApiBaseService {
22
+ /**
23
+ *
24
+ * @summary Create a new network for the given environment
25
+ * @param {number} environmentId The ID of the environment.
26
+ * @param {NetworkEnvironmentCreate} networkEnvironmentCreate A JSON object containing the resource data
27
+ */
28
+ addEnvironmentNetwork(environmentId: number, networkEnvironmentCreate: NetworkEnvironmentCreate): Promise<ApiResponse<Network>>;
20
29
  /**
21
30
  *
22
31
  * @summary Delete a given network
@@ -35,6 +44,17 @@ export declare class NetworksApiService extends ApiBaseService {
35
44
  * @param {number} networkId The ID of the network.
36
45
  */
37
46
  getStatusNetwork(networkId: number): Promise<ApiResponse<void>>;
47
+ /**
48
+ *
49
+ * @summary Return a list of all networks belonging to an environment
50
+ * @param {number} environmentId The ID of the environment.
51
+ * @param {number} [page] Number of the page to be retrieved
52
+ * @param {number} [perPage] Number of items returned per page
53
+ * @param {boolean} [includeDefaultNetwork] If true, include a \&#39;default\&#39; network in the list.
54
+ * @param {string} [providerName] Filter by network\&#39;s cloud provider.
55
+ * @param {string} [region] Filter by network\&#39;s region.
56
+ */
57
+ listEnvironmentNetworks(environmentId: number, page?: number, perPage?: number, includeDefaultNetwork?: boolean, providerName?: string, region?: string): Promise<ApiResponse<Array<NetworkRelation>>>;
38
58
  /**
39
59
  *
40
60
  * @summary Update an existing Network
@@ -29,6 +29,26 @@ const Exceptions_1 = require("../../../common/Exceptions");
29
29
  * NetworksApiService - Auto-generated
30
30
  */
31
31
  class NetworksApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary Create a new network for the given environment
35
+ * @param {number} environmentId The ID of the environment.
36
+ * @param {NetworkEnvironmentCreate} networkEnvironmentCreate A JSON object containing the resource data
37
+ */
38
+ addEnvironmentNetwork(environmentId, networkEnvironmentCreate) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (environmentId === null || environmentId === undefined) {
41
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'addEnvironmentNetwork');
42
+ }
43
+ if (networkEnvironmentCreate === null || networkEnvironmentCreate === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('networkEnvironmentCreate', 'addEnvironmentNetwork');
45
+ }
46
+ let queryString = '';
47
+ const requestUrl = '/environments/{environment_id}/networks' + (queryString ? `?${queryString}` : '');
48
+ const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), networkEnvironmentCreate);
49
+ return new ApiResponse_1.ApiResponse(response);
50
+ });
51
+ }
32
52
  /**
33
53
  *
34
54
  * @summary Delete a given network
@@ -77,6 +97,34 @@ class NetworksApiService extends ApiBaseService_1.ApiBaseService {
77
97
  return new ApiResponse_1.ApiResponse(response);
78
98
  });
79
99
  }
100
+ /**
101
+ *
102
+ * @summary Return a list of all networks belonging to an environment
103
+ * @param {number} environmentId The ID of the environment.
104
+ * @param {number} [page] Number of the page to be retrieved
105
+ * @param {number} [perPage] Number of items returned per page
106
+ * @param {boolean} [includeDefaultNetwork] If true, include a \&#39;default\&#39; network in the list.
107
+ * @param {string} [providerName] Filter by network\&#39;s cloud provider.
108
+ * @param {string} [region] Filter by network\&#39;s region.
109
+ */
110
+ listEnvironmentNetworks(environmentId, page, perPage, includeDefaultNetwork, providerName, region) {
111
+ return __awaiter(this, void 0, void 0, function* () {
112
+ if (environmentId === null || environmentId === undefined) {
113
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentNetworks');
114
+ }
115
+ let queryString = '';
116
+ const queryParams = { page: page, per_page: perPage, include_default_network: includeDefaultNetwork, provider_name: providerName, region: region, };
117
+ for (const key in queryParams) {
118
+ if (queryParams[key] === undefined || queryParams[key] === null) {
119
+ continue;
120
+ }
121
+ queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
122
+ }
123
+ const requestUrl = '/environments/{environment_id}/networks' + (queryString ? `?${queryString}` : '');
124
+ const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
125
+ return new ApiResponse_1.ApiResponse(response);
126
+ });
127
+ }
80
128
  /**
81
129
  *
82
130
  * @summary Update an existing Network