@devopness/sdk-js 2.162.1 → 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 (71) 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/api/generated/models/action-relation-shallow.d.ts +121 -0
  24. package/dist/api/generated/models/action-relation-shallow.js +14 -0
  25. package/dist/api/generated/models/application-last-deployments.d.ts +5 -5
  26. package/dist/api/generated/models/cron-job-relation.d.ts +3 -3
  27. package/dist/api/generated/models/daemon-relation.d.ts +3 -3
  28. package/dist/api/generated/models/index.d.ts +2 -0
  29. package/dist/api/generated/models/index.js +2 -0
  30. package/dist/api/generated/models/network-relation.d.ts +3 -3
  31. package/dist/api/generated/models/network-rule-relation.d.ts +3 -3
  32. package/dist/api/generated/models/resource-link-child.d.ts +55 -0
  33. package/dist/api/generated/models/resource-link-child.js +14 -0
  34. package/dist/api/generated/models/resource-link-relation.d.ts +3 -2
  35. package/dist/api/generated/models/server-relation.d.ts +3 -3
  36. package/dist/api/generated/models/service-relation.d.ts +3 -3
  37. package/dist/api/generated/models/ssh-key-relation.d.ts +3 -3
  38. package/dist/api/generated/models/ssl-certificate-relation.d.ts +3 -3
  39. package/dist/api/generated/models/user-relation.d.ts +6 -0
  40. package/dist/api/generated/models/virtual-host-relation.d.ts +3 -3
  41. package/dist/services/ApplicationService.d.ts +1 -2
  42. package/dist/services/ApplicationService.js +0 -2
  43. package/dist/services/EnvironmentService.d.ts +0 -22
  44. package/dist/services/EnvironmentService.js +0 -22
  45. package/dist/services/index.d.ts +1 -0
  46. package/dist/services/index.js +1 -0
  47. package/package.json +8 -8
  48. package/dist/api/generated/apis/applications-deployments-api.d.ts +0 -26
  49. package/dist/api/generated/apis/applications-deployments-api.js +0 -53
  50. package/dist/api/generated/apis/environments-applications-api.d.ts +0 -36
  51. package/dist/api/generated/apis/environments-applications-api.js +0 -78
  52. package/dist/api/generated/apis/environments-credentials-api.d.ts +0 -46
  53. package/dist/api/generated/apis/environments-credentials-api.js +0 -100
  54. package/dist/api/generated/apis/environments-cron-jobs-api.d.ts +0 -36
  55. package/dist/api/generated/apis/environments-cron-jobs-api.js +0 -78
  56. package/dist/api/generated/apis/environments-daemons-api.d.ts +0 -36
  57. package/dist/api/generated/apis/environments-daemons-api.js +0 -78
  58. package/dist/api/generated/apis/environments-network-rules-api.d.ts +0 -36
  59. package/dist/api/generated/apis/environments-network-rules-api.js +0 -78
  60. package/dist/api/generated/apis/environments-networks-api.d.ts +0 -39
  61. package/dist/api/generated/apis/environments-networks-api.js +0 -81
  62. package/dist/api/generated/apis/environments-servers-api.d.ts +0 -36
  63. package/dist/api/generated/apis/environments-servers-api.js +0 -78
  64. package/dist/api/generated/apis/environments-services-api.d.ts +0 -36
  65. package/dist/api/generated/apis/environments-services-api.js +0 -78
  66. package/dist/api/generated/apis/environments-sshkeys-api.d.ts +0 -36
  67. package/dist/api/generated/apis/environments-sshkeys-api.js +0 -78
  68. package/dist/api/generated/apis/environments-sslcertificates-api.d.ts +0 -36
  69. package/dist/api/generated/apis/environments-sslcertificates-api.js +0 -78
  70. package/dist/api/generated/apis/environments-virtual-hosts-api.d.ts +0 -36
  71. package/dist/api/generated/apis/environments-virtual-hosts-api.js +0 -78
@@ -13,11 +13,20 @@ import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { Server } from '../../generated/models';
15
15
  import { ServerCommand } from '../../generated/models';
16
+ import { ServerEnvironmentCreate } from '../../generated/models';
17
+ import { ServerRelation } from '../../generated/models';
16
18
  import { ServerUpdate } from '../../generated/models';
17
19
  /**
18
20
  * ServersApiService - Auto-generated
19
21
  */
20
22
  export declare class ServersApiService extends ApiBaseService {
23
+ /**
24
+ *
25
+ * @summary Creates a server and link it to the given environment
26
+ * @param {number} environmentId The ID of the environment.
27
+ * @param {ServerEnvironmentCreate} serverEnvironmentCreate A JSON object containing the resource data
28
+ */
29
+ addEnvironmentServer(environmentId: number, serverEnvironmentCreate: ServerEnvironmentCreate): Promise<ApiResponse<Server>>;
21
30
  /**
22
31
  *
23
32
  * @summary Connect a server to devopness platform
@@ -50,6 +59,14 @@ export declare class ServersApiService extends ApiBaseService {
50
59
  * @param {number} serverId The ID of the server.
51
60
  */
52
61
  getStatusServer(serverId: number): Promise<ApiResponse<void>>;
62
+ /**
63
+ *
64
+ * @summary Return a list of all servers belonging to an environment
65
+ * @param {number} environmentId The ID of the environment.
66
+ * @param {number} [page] Number of the page to be retrieved
67
+ * @param {number} [perPage] Number of items returned per page
68
+ */
69
+ listEnvironmentServers(environmentId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<ServerRelation>>>;
53
70
  /**
54
71
  *
55
72
  * @summary Restart a current running server
@@ -29,6 +29,26 @@ const Exceptions_1 = require("../../../common/Exceptions");
29
29
  * ServersApiService - Auto-generated
30
30
  */
31
31
  class ServersApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary Creates a server and link it to the given environment
35
+ * @param {number} environmentId The ID of the environment.
36
+ * @param {ServerEnvironmentCreate} serverEnvironmentCreate A JSON object containing the resource data
37
+ */
38
+ addEnvironmentServer(environmentId, serverEnvironmentCreate) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (environmentId === null || environmentId === undefined) {
41
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'addEnvironmentServer');
42
+ }
43
+ if (serverEnvironmentCreate === null || serverEnvironmentCreate === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('serverEnvironmentCreate', 'addEnvironmentServer');
45
+ }
46
+ let queryString = '';
47
+ const requestUrl = '/environments/{environment_id}/servers' + (queryString ? `?${queryString}` : '');
48
+ const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), serverEnvironmentCreate);
49
+ return new ApiResponse_1.ApiResponse(response);
50
+ });
51
+ }
32
52
  /**
33
53
  *
34
54
  * @summary Connect a server to devopness platform
@@ -121,6 +141,31 @@ class ServersApiService extends ApiBaseService_1.ApiBaseService {
121
141
  return new ApiResponse_1.ApiResponse(response);
122
142
  });
123
143
  }
144
+ /**
145
+ *
146
+ * @summary Return a list of all servers belonging to an environment
147
+ * @param {number} environmentId The ID of the environment.
148
+ * @param {number} [page] Number of the page to be retrieved
149
+ * @param {number} [perPage] Number of items returned per page
150
+ */
151
+ listEnvironmentServers(environmentId, page, perPage) {
152
+ return __awaiter(this, void 0, void 0, function* () {
153
+ if (environmentId === null || environmentId === undefined) {
154
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentServers');
155
+ }
156
+ let queryString = '';
157
+ const queryParams = { page: page, per_page: perPage, };
158
+ for (const key in queryParams) {
159
+ if (queryParams[key] === undefined || queryParams[key] === null) {
160
+ continue;
161
+ }
162
+ queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
163
+ }
164
+ const requestUrl = '/environments/{environment_id}/servers' + (queryString ? `?${queryString}` : '');
165
+ const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
166
+ return new ApiResponse_1.ApiResponse(response);
167
+ });
168
+ }
124
169
  /**
125
170
  *
126
171
  * @summary Restart a current running server
@@ -12,7 +12,9 @@
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { Service } from '../../generated/models';
15
+ import { ServiceEnvironmentCreate } from '../../generated/models';
15
16
  import { ServiceGetStatus } from '../../generated/models';
17
+ import { ServiceRelation } from '../../generated/models';
16
18
  import { ServiceReload } from '../../generated/models';
17
19
  import { ServiceRestart } from '../../generated/models';
18
20
  import { ServiceStart } from '../../generated/models';
@@ -22,6 +24,13 @@ import { ServiceUpdate } from '../../generated/models';
22
24
  * ServicesApiService - Auto-generated
23
25
  */
24
26
  export declare class ServicesApiService extends ApiBaseService {
27
+ /**
28
+ *
29
+ * @summary Add a Service to the given environment
30
+ * @param {number} environmentId The ID of the environment.
31
+ * @param {ServiceEnvironmentCreate} serviceEnvironmentCreate A JSON object containing the resource data
32
+ */
33
+ addEnvironmentService(environmentId: number, serviceEnvironmentCreate: ServiceEnvironmentCreate): Promise<ApiResponse<Service>>;
25
34
  /**
26
35
  *
27
36
  * @summary Delete a given service
@@ -41,6 +50,14 @@ export declare class ServicesApiService extends ApiBaseService {
41
50
  * @param {ServiceGetStatus} serviceGetStatus A JSON object containing the resource data
42
51
  */
43
52
  getStatusService(serviceId: number, serviceGetStatus: ServiceGetStatus): Promise<ApiResponse<void>>;
53
+ /**
54
+ *
55
+ * @summary Return a list of all services belonging to a environment
56
+ * @param {number} environmentId The ID of the environment.
57
+ * @param {number} [page] Number of the page to be retrieved
58
+ * @param {number} [perPage] Number of items returned per page
59
+ */
60
+ listEnvironmentServices(environmentId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<ServiceRelation>>>;
44
61
  /**
45
62
  *
46
63
  * @summary Reload a service
@@ -29,6 +29,26 @@ const Exceptions_1 = require("../../../common/Exceptions");
29
29
  * ServicesApiService - Auto-generated
30
30
  */
31
31
  class ServicesApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary Add a Service to the given environment
35
+ * @param {number} environmentId The ID of the environment.
36
+ * @param {ServiceEnvironmentCreate} serviceEnvironmentCreate A JSON object containing the resource data
37
+ */
38
+ addEnvironmentService(environmentId, serviceEnvironmentCreate) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (environmentId === null || environmentId === undefined) {
41
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'addEnvironmentService');
42
+ }
43
+ if (serviceEnvironmentCreate === null || serviceEnvironmentCreate === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('serviceEnvironmentCreate', 'addEnvironmentService');
45
+ }
46
+ let queryString = '';
47
+ const requestUrl = '/environments/{environment_id}/services' + (queryString ? `?${queryString}` : '');
48
+ const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), serviceEnvironmentCreate);
49
+ return new ApiResponse_1.ApiResponse(response);
50
+ });
51
+ }
32
52
  /**
33
53
  *
34
54
  * @summary Delete a given service
@@ -81,6 +101,31 @@ class ServicesApiService extends ApiBaseService_1.ApiBaseService {
81
101
  return new ApiResponse_1.ApiResponse(response);
82
102
  });
83
103
  }
104
+ /**
105
+ *
106
+ * @summary Return a list of all services belonging to a environment
107
+ * @param {number} environmentId The ID of the environment.
108
+ * @param {number} [page] Number of the page to be retrieved
109
+ * @param {number} [perPage] Number of items returned per page
110
+ */
111
+ listEnvironmentServices(environmentId, page, perPage) {
112
+ return __awaiter(this, void 0, void 0, function* () {
113
+ if (environmentId === null || environmentId === undefined) {
114
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentServices');
115
+ }
116
+ let queryString = '';
117
+ const queryParams = { page: page, per_page: perPage, };
118
+ for (const key in queryParams) {
119
+ if (queryParams[key] === undefined || queryParams[key] === null) {
120
+ continue;
121
+ }
122
+ queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
123
+ }
124
+ const requestUrl = '/environments/{environment_id}/services' + (queryString ? `?${queryString}` : '');
125
+ const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
126
+ return new ApiResponse_1.ApiResponse(response);
127
+ });
128
+ }
84
129
  /**
85
130
  *
86
131
  * @summary Reload a service
@@ -12,11 +12,20 @@
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { SshKey } from '../../generated/models';
15
+ import { SshKeyEnvironmentCreate } from '../../generated/models';
16
+ import { SshKeyRelation } from '../../generated/models';
15
17
  import { SshKeyUpdate } from '../../generated/models';
16
18
  /**
17
19
  * SSHKeysApiService - Auto-generated
18
20
  */
19
21
  export declare class SSHKeysApiService extends ApiBaseService {
22
+ /**
23
+ *
24
+ * @summary Create an SSH key and link it to the given environment
25
+ * @param {number} environmentId The ID of the environment.
26
+ * @param {SshKeyEnvironmentCreate} sshKeyEnvironmentCreate A JSON object containing the resource data
27
+ */
28
+ addEnvironmentSshKey(environmentId: number, sshKeyEnvironmentCreate: SshKeyEnvironmentCreate): Promise<ApiResponse<SshKey>>;
20
29
  /**
21
30
  *
22
31
  * @summary Delete a given SSH key
@@ -29,6 +38,14 @@ export declare class SSHKeysApiService extends ApiBaseService {
29
38
  * @param {number} sshKeyId The ID of the ssh key.
30
39
  */
31
40
  getSshKey(sshKeyId: number): Promise<ApiResponse<SshKey>>;
41
+ /**
42
+ *
43
+ * @summary Return a list of all SSH keys added to an environment
44
+ * @param {number} environmentId The ID of the environment.
45
+ * @param {number} [page] Number of the page to be retrieved
46
+ * @param {number} [perPage] Number of items returned per page
47
+ */
48
+ listEnvironmentSshKeys(environmentId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<SshKeyRelation>>>;
32
49
  /**
33
50
  *
34
51
  * @summary Update an existing SSH key
@@ -29,6 +29,26 @@ const Exceptions_1 = require("../../../common/Exceptions");
29
29
  * SSHKeysApiService - Auto-generated
30
30
  */
31
31
  class SSHKeysApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary Create an SSH key and link it to the given environment
35
+ * @param {number} environmentId The ID of the environment.
36
+ * @param {SshKeyEnvironmentCreate} sshKeyEnvironmentCreate A JSON object containing the resource data
37
+ */
38
+ addEnvironmentSshKey(environmentId, sshKeyEnvironmentCreate) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (environmentId === null || environmentId === undefined) {
41
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'addEnvironmentSshKey');
42
+ }
43
+ if (sshKeyEnvironmentCreate === null || sshKeyEnvironmentCreate === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('sshKeyEnvironmentCreate', 'addEnvironmentSshKey');
45
+ }
46
+ let queryString = '';
47
+ const requestUrl = '/environments/{environment_id}/ssh-keys' + (queryString ? `?${queryString}` : '');
48
+ const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), sshKeyEnvironmentCreate);
49
+ return new ApiResponse_1.ApiResponse(response);
50
+ });
51
+ }
32
52
  /**
33
53
  *
34
54
  * @summary Delete a given SSH key
@@ -61,6 +81,31 @@ class SSHKeysApiService extends ApiBaseService_1.ApiBaseService {
61
81
  return new ApiResponse_1.ApiResponse(response);
62
82
  });
63
83
  }
84
+ /**
85
+ *
86
+ * @summary Return a list of all SSH keys added to an environment
87
+ * @param {number} environmentId The ID of the environment.
88
+ * @param {number} [page] Number of the page to be retrieved
89
+ * @param {number} [perPage] Number of items returned per page
90
+ */
91
+ listEnvironmentSshKeys(environmentId, page, perPage) {
92
+ return __awaiter(this, void 0, void 0, function* () {
93
+ if (environmentId === null || environmentId === undefined) {
94
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentSshKeys');
95
+ }
96
+ let queryString = '';
97
+ const queryParams = { page: page, per_page: perPage, };
98
+ for (const key in queryParams) {
99
+ if (queryParams[key] === undefined || queryParams[key] === null) {
100
+ continue;
101
+ }
102
+ queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
103
+ }
104
+ const requestUrl = '/environments/{environment_id}/ssh-keys' + (queryString ? `?${queryString}` : '');
105
+ const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
106
+ return new ApiResponse_1.ApiResponse(response);
107
+ });
108
+ }
64
109
  /**
65
110
  *
66
111
  * @summary Update an existing SSH key
@@ -12,10 +12,19 @@
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { SslCertificate } from '../../generated/models';
15
+ import { SslCertificateEnvironmentCreate } from '../../generated/models';
16
+ import { SslCertificateRelation } from '../../generated/models';
15
17
  /**
16
18
  * SSLCertificatesApiService - Auto-generated
17
19
  */
18
20
  export declare class SSLCertificatesApiService extends ApiBaseService {
21
+ /**
22
+ *
23
+ * @summary Create a new ssl certificate
24
+ * @param {number} environmentId The ID of the environment.
25
+ * @param {SslCertificateEnvironmentCreate} sslCertificateEnvironmentCreate A JSON object containing the resource data
26
+ */
27
+ addEnvironmentSslCertificate(environmentId: number, sslCertificateEnvironmentCreate: SslCertificateEnvironmentCreate): Promise<ApiResponse<SslCertificate>>;
19
28
  /**
20
29
  *
21
30
  * @summary Delete a given SSL Certificate
@@ -28,4 +37,12 @@ export declare class SSLCertificatesApiService extends ApiBaseService {
28
37
  * @param {number} sslCertificateId The ID of the ssl certificate.
29
38
  */
30
39
  getSslCertificate(sslCertificateId: number): Promise<ApiResponse<SslCertificate>>;
40
+ /**
41
+ *
42
+ * @summary Return a list of all SSL Certificates belonging to an environment
43
+ * @param {number} environmentId The ID of the environment.
44
+ * @param {number} [page] Number of the page to be retrieved
45
+ * @param {number} [perPage] Number of items returned per page
46
+ */
47
+ listEnvironmentSslCertificates(environmentId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<SslCertificateRelation>>>;
31
48
  }
@@ -29,6 +29,26 @@ const Exceptions_1 = require("../../../common/Exceptions");
29
29
  * SSLCertificatesApiService - Auto-generated
30
30
  */
31
31
  class SSLCertificatesApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary Create a new ssl certificate
35
+ * @param {number} environmentId The ID of the environment.
36
+ * @param {SslCertificateEnvironmentCreate} sslCertificateEnvironmentCreate A JSON object containing the resource data
37
+ */
38
+ addEnvironmentSslCertificate(environmentId, sslCertificateEnvironmentCreate) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (environmentId === null || environmentId === undefined) {
41
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'addEnvironmentSslCertificate');
42
+ }
43
+ if (sslCertificateEnvironmentCreate === null || sslCertificateEnvironmentCreate === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('sslCertificateEnvironmentCreate', 'addEnvironmentSslCertificate');
45
+ }
46
+ let queryString = '';
47
+ const requestUrl = '/environments/{environment_id}/ssl-certificates' + (queryString ? `?${queryString}` : '');
48
+ const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), sslCertificateEnvironmentCreate);
49
+ return new ApiResponse_1.ApiResponse(response);
50
+ });
51
+ }
32
52
  /**
33
53
  *
34
54
  * @summary Delete a given SSL Certificate
@@ -61,5 +81,30 @@ class SSLCertificatesApiService extends ApiBaseService_1.ApiBaseService {
61
81
  return new ApiResponse_1.ApiResponse(response);
62
82
  });
63
83
  }
84
+ /**
85
+ *
86
+ * @summary Return a list of all SSL Certificates belonging to an environment
87
+ * @param {number} environmentId The ID of the environment.
88
+ * @param {number} [page] Number of the page to be retrieved
89
+ * @param {number} [perPage] Number of items returned per page
90
+ */
91
+ listEnvironmentSslCertificates(environmentId, page, perPage) {
92
+ return __awaiter(this, void 0, void 0, function* () {
93
+ if (environmentId === null || environmentId === undefined) {
94
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentSslCertificates');
95
+ }
96
+ let queryString = '';
97
+ const queryParams = { page: page, per_page: perPage, };
98
+ for (const key in queryParams) {
99
+ if (queryParams[key] === undefined || queryParams[key] === null) {
100
+ continue;
101
+ }
102
+ queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
103
+ }
104
+ const requestUrl = '/environments/{environment_id}/ssl-certificates' + (queryString ? `?${queryString}` : '');
105
+ const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
106
+ return new ApiResponse_1.ApiResponse(response);
107
+ });
108
+ }
64
109
  }
65
110
  exports.SSLCertificatesApiService = SSLCertificatesApiService;
@@ -12,12 +12,21 @@
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { VirtualHost } from '../../generated/models';
15
+ import { VirtualHostEnvironmentCreate } from '../../generated/models';
15
16
  import { VirtualHostGetStatus } from '../../generated/models';
17
+ import { VirtualHostRelation } from '../../generated/models';
16
18
  import { VirtualHostUpdate } from '../../generated/models';
17
19
  /**
18
20
  * VirtualHostsApiService - Auto-generated
19
21
  */
20
22
  export declare class VirtualHostsApiService extends ApiBaseService {
23
+ /**
24
+ *
25
+ * @summary Create a new virtual host
26
+ * @param {number} environmentId The ID of the environment.
27
+ * @param {VirtualHostEnvironmentCreate} virtualHostEnvironmentCreate A JSON object containing the resource data
28
+ */
29
+ addEnvironmentVirtualHost(environmentId: number, virtualHostEnvironmentCreate: VirtualHostEnvironmentCreate): Promise<ApiResponse<VirtualHost>>;
21
30
  /**
22
31
  *
23
32
  * @summary Delete a given virtual host
@@ -37,6 +46,14 @@ export declare class VirtualHostsApiService extends ApiBaseService {
37
46
  * @param {number} virtualHostId The ID of the virtual host.
38
47
  */
39
48
  getVirtualHost(virtualHostId: number): Promise<ApiResponse<VirtualHost>>;
49
+ /**
50
+ *
51
+ * @summary Return a list of all Virtual Hosts belonging to an environment
52
+ * @param {number} environmentId The ID of the environment.
53
+ * @param {number} [page] Number of the page to be retrieved
54
+ * @param {number} [perPage] Number of items returned per page
55
+ */
56
+ listEnvironmentVirtualHosts(environmentId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<VirtualHostRelation>>>;
40
57
  /**
41
58
  *
42
59
  * @summary Update an existing virtual host
@@ -29,6 +29,26 @@ const Exceptions_1 = require("../../../common/Exceptions");
29
29
  * VirtualHostsApiService - Auto-generated
30
30
  */
31
31
  class VirtualHostsApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary Create a new virtual host
35
+ * @param {number} environmentId The ID of the environment.
36
+ * @param {VirtualHostEnvironmentCreate} virtualHostEnvironmentCreate A JSON object containing the resource data
37
+ */
38
+ addEnvironmentVirtualHost(environmentId, virtualHostEnvironmentCreate) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (environmentId === null || environmentId === undefined) {
41
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'addEnvironmentVirtualHost');
42
+ }
43
+ if (virtualHostEnvironmentCreate === null || virtualHostEnvironmentCreate === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('virtualHostEnvironmentCreate', 'addEnvironmentVirtualHost');
45
+ }
46
+ let queryString = '';
47
+ const requestUrl = '/environments/{environment_id}/virtual-hosts' + (queryString ? `?${queryString}` : '');
48
+ const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), virtualHostEnvironmentCreate);
49
+ return new ApiResponse_1.ApiResponse(response);
50
+ });
51
+ }
32
52
  /**
33
53
  *
34
54
  * @summary Delete a given virtual host
@@ -81,6 +101,31 @@ class VirtualHostsApiService extends ApiBaseService_1.ApiBaseService {
81
101
  return new ApiResponse_1.ApiResponse(response);
82
102
  });
83
103
  }
104
+ /**
105
+ *
106
+ * @summary Return a list of all Virtual Hosts belonging to an environment
107
+ * @param {number} environmentId The ID of the environment.
108
+ * @param {number} [page] Number of the page to be retrieved
109
+ * @param {number} [perPage] Number of items returned per page
110
+ */
111
+ listEnvironmentVirtualHosts(environmentId, page, perPage) {
112
+ return __awaiter(this, void 0, void 0, function* () {
113
+ if (environmentId === null || environmentId === undefined) {
114
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentVirtualHosts');
115
+ }
116
+ let queryString = '';
117
+ const queryParams = { page: page, per_page: perPage, };
118
+ for (const key in queryParams) {
119
+ if (queryParams[key] === undefined || queryParams[key] === null) {
120
+ continue;
121
+ }
122
+ queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
123
+ }
124
+ const requestUrl = '/environments/{environment_id}/virtual-hosts' + (queryString ? `?${queryString}` : '');
125
+ const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
126
+ return new ApiResponse_1.ApiResponse(response);
127
+ });
128
+ }
84
129
  /**
85
130
  *
86
131
  * @summary Update an existing virtual host
@@ -0,0 +1,121 @@
1
+ /**
2
+ * devopness API
3
+ * Devopness API - Painless essential DevOps to everyone
4
+ *
5
+ * The version of the OpenAPI document: latest
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import { ActionData } from './action-data';
13
+ import { ActionStatus } from './action-status';
14
+ import { ActionStatusReasonCode } from './action-status-reason-code';
15
+ import { ActionSummary } from './action-summary';
16
+ import { ActionTarget } from './action-target';
17
+ import { ActionTriggeredFrom } from './action-triggered-from';
18
+ import { ActionType } from './action-type';
19
+ /**
20
+ *
21
+ * @export
22
+ * @interface ActionRelationShallow
23
+ */
24
+ export interface ActionRelationShallow {
25
+ /**
26
+ * The Id of the action
27
+ * @type {number}
28
+ * @memberof ActionRelationShallow
29
+ */
30
+ id: number;
31
+ /**
32
+ *
33
+ * @type {ActionStatus}
34
+ * @memberof ActionRelationShallow
35
+ */
36
+ status: ActionStatus;
37
+ /**
38
+ * Human readable version of the action status
39
+ * @type {string}
40
+ * @memberof ActionRelationShallow
41
+ */
42
+ status_human_readable: string;
43
+ /**
44
+ *
45
+ * @type {ActionStatusReasonCode}
46
+ * @memberof ActionRelationShallow
47
+ */
48
+ status_reason_code: ActionStatusReasonCode;
49
+ /**
50
+ * Human readable version of the status reason code
51
+ * @type {string}
52
+ * @memberof ActionRelationShallow
53
+ */
54
+ status_reason_human_readable: string;
55
+ /**
56
+ *
57
+ * @type {ActionType}
58
+ * @memberof ActionRelationShallow
59
+ */
60
+ type: ActionType;
61
+ /**
62
+ * Human readable version of the action type
63
+ * @type {string}
64
+ * @memberof ActionRelationShallow
65
+ */
66
+ type_human_readable: string;
67
+ /**
68
+ * Permalink to view the action on Devopness web
69
+ * @type {string}
70
+ * @memberof ActionRelationShallow
71
+ */
72
+ url_web_permalink: string;
73
+ /**
74
+ *
75
+ * @type {ActionData}
76
+ * @memberof ActionRelationShallow
77
+ */
78
+ action_data?: ActionData | null;
79
+ /**
80
+ *
81
+ * @type {ActionTriggeredFrom}
82
+ * @memberof ActionRelationShallow
83
+ */
84
+ triggered_from?: ActionTriggeredFrom;
85
+ /**
86
+ *
87
+ * @type {ActionSummary}
88
+ * @memberof ActionRelationShallow
89
+ */
90
+ summary?: ActionSummary;
91
+ /**
92
+ * List of actions dispatched to cloud resource targets
93
+ * @type {Array<ActionTarget>}
94
+ * @memberof ActionRelationShallow
95
+ */
96
+ targets?: Array<ActionTarget>;
97
+ /**
98
+ * When the action started
99
+ * @type {string}
100
+ * @memberof ActionRelationShallow
101
+ */
102
+ started_at: string | null;
103
+ /**
104
+ * When the action completed
105
+ * @type {string}
106
+ * @memberof ActionRelationShallow
107
+ */
108
+ completed_at: string | null;
109
+ /**
110
+ * When the action was created
111
+ * @type {string}
112
+ * @memberof ActionRelationShallow
113
+ */
114
+ created_at: string;
115
+ /**
116
+ * When the action was last updated
117
+ * @type {string}
118
+ * @memberof ActionRelationShallow
119
+ */
120
+ updated_at: string;
121
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ /**
4
+ * devopness API
5
+ * Devopness API - Painless essential DevOps to everyone
6
+ *
7
+ * The version of the OpenAPI document: latest
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -9,7 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { ActionRelation } from './action-relation';
12
+ import { ActionRelationShallow } from './action-relation-shallow';
13
13
  /**
14
14
  * Latest deployment created to application and the more recent completed deployment
15
15
  * @export
@@ -18,14 +18,14 @@ import { ActionRelation } from './action-relation';
18
18
  export interface ApplicationLastDeployments {
19
19
  /**
20
20
  *
21
- * @type {ActionRelation}
21
+ * @type {ActionRelationShallow}
22
22
  * @memberof ApplicationLastDeployments
23
23
  */
24
- latest?: ActionRelation | null;
24
+ latest?: ActionRelationShallow | null;
25
25
  /**
26
26
  *
27
- * @type {ActionRelation}
27
+ * @type {ActionRelationShallow}
28
28
  * @memberof ApplicationLastDeployments
29
29
  */
30
- live?: ActionRelation | null;
30
+ live?: ActionRelationShallow | null;
31
31
  }
@@ -9,7 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { ActionRelation } from './action-relation';
12
+ import { ActionRelationShallow } from './action-relation-shallow';
13
13
  import { ApplicationRelation } from './application-relation';
14
14
  import { CronJobPattern } from './cron-job-pattern';
15
15
  import { UserRelation } from './user-relation';
@@ -63,10 +63,10 @@ export interface CronJobRelation {
63
63
  is_auto_generated: boolean;
64
64
  /**
65
65
  *
66
- * @type {ActionRelation}
66
+ * @type {ActionRelationShallow}
67
67
  * @memberof CronJobRelation
68
68
  */
69
- last_action: ActionRelation | null;
69
+ last_action: ActionRelationShallow | null;
70
70
  /**
71
71
  *
72
72
  * @type {UserRelation}