@devopness/sdk-js 2.59.0 → 2.61.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.
@@ -25,6 +25,12 @@ export declare class ServersApiService extends ApiBaseService {
25
25
  * @param {number} serverId The ID of the server.
26
26
  */
27
27
  connectServer(activationToken: string, serverId: number): Promise<ApiResponse<string>>;
28
+ /**
29
+ *
30
+ * @summary Delete a given server
31
+ * @param {number} serverId The ID of the server.
32
+ */
33
+ deleteServer(serverId: number): Promise<ApiResponse<void>>;
28
34
  /**
29
35
  *
30
36
  * @summary Get a server by ID
@@ -37,6 +43,30 @@ export declare class ServersApiService extends ApiBaseService {
37
43
  * @param {number} serverId The ID of the server.
38
44
  */
39
45
  getServerCommands(serverId: number): Promise<ApiResponse<ServerCommand>>;
46
+ /**
47
+ *
48
+ * @summary Get current status of the server on the cloud provider
49
+ * @param {number} serverId The ID of the server.
50
+ */
51
+ getStatusServer(serverId: number): Promise<ApiResponse<void>>;
52
+ /**
53
+ *
54
+ * @summary Restart a current running server
55
+ * @param {number} serverId The ID of the server.
56
+ */
57
+ restartServer(serverId: number): Promise<ApiResponse<void>>;
58
+ /**
59
+ *
60
+ * @summary Start a previously stopped server
61
+ * @param {number} serverId The ID of the server.
62
+ */
63
+ startServer(serverId: number): Promise<ApiResponse<void>>;
64
+ /**
65
+ *
66
+ * @summary Stop a running server
67
+ * @param {number} serverId The ID of the server.
68
+ */
69
+ stopServer(serverId: number): Promise<ApiResponse<void>>;
40
70
  /**
41
71
  *
42
72
  * @summary Update an existing server
@@ -49,6 +49,22 @@ class ServersApiService extends ApiBaseService_1.ApiBaseService {
49
49
  return new ApiResponse_1.ApiResponse(response);
50
50
  });
51
51
  }
52
+ /**
53
+ *
54
+ * @summary Delete a given server
55
+ * @param {number} serverId The ID of the server.
56
+ */
57
+ deleteServer(serverId) {
58
+ return __awaiter(this, void 0, void 0, function* () {
59
+ if (serverId === null || serverId === undefined) {
60
+ throw new Exceptions_1.ArgumentNullException('serverId', 'deleteServer');
61
+ }
62
+ let queryString = '';
63
+ const requestUrl = '/servers/{server_id}' + (queryString ? `?${queryString}` : '');
64
+ const response = yield this.delete(requestUrl.replace(`{${"server_id"}}`, encodeURIComponent(String(serverId))));
65
+ return new ApiResponse_1.ApiResponse(response);
66
+ });
67
+ }
52
68
  /**
53
69
  *
54
70
  * @summary Get a server by ID
@@ -81,6 +97,70 @@ class ServersApiService extends ApiBaseService_1.ApiBaseService {
81
97
  return new ApiResponse_1.ApiResponse(response);
82
98
  });
83
99
  }
100
+ /**
101
+ *
102
+ * @summary Get current status of the server on the cloud provider
103
+ * @param {number} serverId The ID of the server.
104
+ */
105
+ getStatusServer(serverId) {
106
+ return __awaiter(this, void 0, void 0, function* () {
107
+ if (serverId === null || serverId === undefined) {
108
+ throw new Exceptions_1.ArgumentNullException('serverId', 'getStatusServer');
109
+ }
110
+ let queryString = '';
111
+ const requestUrl = '/servers/{server_id}/get-status' + (queryString ? `?${queryString}` : '');
112
+ const response = yield this.post(requestUrl.replace(`{${"server_id"}}`, encodeURIComponent(String(serverId))));
113
+ return new ApiResponse_1.ApiResponse(response);
114
+ });
115
+ }
116
+ /**
117
+ *
118
+ * @summary Restart a current running server
119
+ * @param {number} serverId The ID of the server.
120
+ */
121
+ restartServer(serverId) {
122
+ return __awaiter(this, void 0, void 0, function* () {
123
+ if (serverId === null || serverId === undefined) {
124
+ throw new Exceptions_1.ArgumentNullException('serverId', 'restartServer');
125
+ }
126
+ let queryString = '';
127
+ const requestUrl = '/servers/{server_id}/restart' + (queryString ? `?${queryString}` : '');
128
+ const response = yield this.post(requestUrl.replace(`{${"server_id"}}`, encodeURIComponent(String(serverId))));
129
+ return new ApiResponse_1.ApiResponse(response);
130
+ });
131
+ }
132
+ /**
133
+ *
134
+ * @summary Start a previously stopped server
135
+ * @param {number} serverId The ID of the server.
136
+ */
137
+ startServer(serverId) {
138
+ return __awaiter(this, void 0, void 0, function* () {
139
+ if (serverId === null || serverId === undefined) {
140
+ throw new Exceptions_1.ArgumentNullException('serverId', 'startServer');
141
+ }
142
+ let queryString = '';
143
+ const requestUrl = '/servers/{server_id}/start' + (queryString ? `?${queryString}` : '');
144
+ const response = yield this.post(requestUrl.replace(`{${"server_id"}}`, encodeURIComponent(String(serverId))));
145
+ return new ApiResponse_1.ApiResponse(response);
146
+ });
147
+ }
148
+ /**
149
+ *
150
+ * @summary Stop a running server
151
+ * @param {number} serverId The ID of the server.
152
+ */
153
+ stopServer(serverId) {
154
+ return __awaiter(this, void 0, void 0, function* () {
155
+ if (serverId === null || serverId === undefined) {
156
+ throw new Exceptions_1.ArgumentNullException('serverId', 'stopServer');
157
+ }
158
+ let queryString = '';
159
+ const requestUrl = '/servers/{server_id}/stop' + (queryString ? `?${queryString}` : '');
160
+ const response = yield this.post(requestUrl.replace(`{${"server_id"}}`, encodeURIComponent(String(serverId))));
161
+ return new ApiResponse_1.ApiResponse(response);
162
+ });
163
+ }
84
164
  /**
85
165
  *
86
166
  * @summary Update an existing server
@@ -21,4 +21,10 @@ export interface PipelineCreate {
21
21
  * @memberof PipelineCreate
22
22
  */
23
23
  name: string;
24
+ /**
25
+ * The resource operation associated to the pipeline. Must not be greater than 20 characters.
26
+ * @type {string}
27
+ * @memberof PipelineCreate
28
+ */
29
+ operation: string;
24
30
  }
@@ -46,12 +46,30 @@ export interface PipelineRelation {
46
46
  * @memberof PipelineRelation
47
47
  */
48
48
  resource_type: string;
49
+ /**
50
+ * Human readable version of the resource type
51
+ * @type {string}
52
+ * @memberof PipelineRelation
53
+ */
54
+ resource_type_human_readable: string;
49
55
  /**
50
56
  * The pipeline\'s resource ID
51
57
  * @type {number}
52
58
  * @memberof PipelineRelation
53
59
  */
54
60
  resource_id: number;
61
+ /**
62
+ * The resource operation associated to the pipeline.
63
+ * @type {string}
64
+ * @memberof PipelineRelation
65
+ */
66
+ operation: string;
67
+ /**
68
+ * Human readable version of the operation
69
+ * @type {string}
70
+ * @memberof PipelineRelation
71
+ */
72
+ operation_human_readable: string;
55
73
  /**
56
74
  *
57
75
  * @type {UserRelation}
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { ResourceType } from './resource-type';
12
13
  import { Step } from './step';
13
14
  import { UserRelation } from './user-relation';
14
15
  /**
@@ -42,17 +43,35 @@ export interface Pipeline {
42
43
  */
43
44
  project_id: number;
44
45
  /**
45
- * The pipeline\'s resource type
46
+ *
47
+ * @type {ResourceType}
48
+ * @memberof Pipeline
49
+ */
50
+ resource_type: ResourceType;
51
+ /**
52
+ * Human readable version of the resource type
46
53
  * @type {string}
47
54
  * @memberof Pipeline
48
55
  */
49
- resource_type: string;
56
+ resource_type_human_readable: string;
50
57
  /**
51
58
  * The pipeline\'s resource ID
52
59
  * @type {number}
53
60
  * @memberof Pipeline
54
61
  */
55
62
  resource_id: number;
63
+ /**
64
+ * The resource operation associated to the pipeline.
65
+ * @type {string}
66
+ * @memberof Pipeline
67
+ */
68
+ operation: string;
69
+ /**
70
+ * Human readable version of the operation
71
+ * @type {string}
72
+ * @memberof Pipeline
73
+ */
74
+ operation_human_readable: string;
56
75
  /**
57
76
  *
58
77
  * @type {Array<Step>}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devopness/sdk-js",
3
- "version": "2.59.0",
3
+ "version": "2.61.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },