@devopness/sdk-js 2.94.0 → 2.95.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.
@@ -16,6 +16,14 @@ import { ActionRelation } from '../../generated/models';
16
16
  * EnvironmentsActionsApiService - Auto-generated
17
17
  */
18
18
  export declare class EnvironmentsActionsApiService extends ApiBaseService {
19
+ /**
20
+ *
21
+ * @summary List environment actions
22
+ * @param {number} environmentId The ID of the environment.
23
+ * @param {number} [page] Number of the page to be retrieved
24
+ * @param {number} [perPage] Number of items returned per page
25
+ */
26
+ listEnvironmentActions(environmentId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<ActionRelation>>>;
19
27
  /**
20
28
  *
21
29
  * @summary List environment actions of a resource type
@@ -29,6 +29,31 @@ const Exceptions_1 = require("../../../common/Exceptions");
29
29
  * EnvironmentsActionsApiService - Auto-generated
30
30
  */
31
31
  class EnvironmentsActionsApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary List environment actions
35
+ * @param {number} environmentId The ID of the environment.
36
+ * @param {number} [page] Number of the page to be retrieved
37
+ * @param {number} [perPage] Number of items returned per page
38
+ */
39
+ listEnvironmentActions(environmentId, page, perPage) {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ if (environmentId === null || environmentId === undefined) {
42
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentActions');
43
+ }
44
+ let queryString = '';
45
+ const queryParams = { page: page, per_page: perPage, };
46
+ for (const key in queryParams) {
47
+ if (queryParams[key] === undefined || queryParams[key] === null) {
48
+ continue;
49
+ }
50
+ queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
51
+ }
52
+ const requestUrl = '/environments/{environment_id}/actions' + (queryString ? `?${queryString}` : '');
53
+ const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
54
+ return new ApiResponse_1.ApiResponse(response);
55
+ });
56
+ }
32
57
  /**
33
58
  *
34
59
  * @summary List environment actions of a resource type
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devopness/sdk-js",
3
- "version": "2.94.0",
3
+ "version": "2.95.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },