@devopness/sdk-js 1.101.1 → 1.104.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 (50) hide show
  1. package/README.md +2 -10
  2. package/dist/DevopnessApiClient.d.ts +2 -4
  3. package/dist/DevopnessApiClient.js +2 -4
  4. package/dist/api/generated/apis/actions-api.d.ts +6 -0
  5. package/dist/api/generated/apis/actions-api.js +16 -0
  6. package/dist/api/generated/apis/actions-resources-api.d.ts +39 -0
  7. package/dist/api/generated/apis/actions-resources-api.js +95 -0
  8. package/dist/api/generated/apis/applications-deployments-api.d.ts +3 -13
  9. package/dist/api/generated/apis/applications-deployments-api.js +3 -28
  10. package/dist/api/generated/apis/{projects-deployments-api.d.ts → environments-actions-api.d.ts} +7 -6
  11. package/dist/api/generated/apis/{projects-deployments-api.js → environments-actions-api.js} +15 -11
  12. package/dist/api/generated/apis/logs-api.d.ts +0 -7
  13. package/dist/api/generated/apis/logs-api.js +0 -20
  14. package/dist/api/generated/apis/projects-actions-api.d.ts +39 -0
  15. package/dist/api/generated/apis/projects-actions-api.js +95 -0
  16. package/dist/api/generated/models/action-data.d.ts +18 -0
  17. package/dist/api/generated/models/{deployment-create-application.js → action-data.js} +0 -0
  18. package/dist/api/generated/models/action-deployment-commit.d.ts +90 -0
  19. package/dist/api/generated/models/{deployment-create-server.js → action-deployment-commit.js} +0 -0
  20. package/dist/api/generated/models/action-deployment-content.d.ts +55 -0
  21. package/dist/api/generated/models/{deployment-create.js → action-deployment-content.js} +0 -0
  22. package/dist/api/generated/models/action-deployment-data.d.ts +38 -0
  23. package/dist/api/generated/models/{deployment-relation.js → action-deployment-data.js} +0 -0
  24. package/dist/api/generated/models/action-trigger-type.d.ts +20 -0
  25. package/dist/api/generated/models/action-trigger-type.js +25 -0
  26. package/dist/api/generated/models/action-triggered-from.d.ts +73 -0
  27. package/dist/api/generated/models/{deployment-step.js → action-triggered-from.js} +0 -0
  28. package/dist/api/generated/models/action.d.ts +15 -1
  29. package/dist/api/generated/models/{deployment-create.d.ts → application-deployment.d.ts} +6 -6
  30. package/dist/api/generated/models/{deployment.js → application-deployment.js} +0 -0
  31. package/dist/api/generated/models/application-last-deployments.d.ts +5 -5
  32. package/dist/api/generated/models/index.d.ts +7 -6
  33. package/dist/api/generated/models/index.js +7 -6
  34. package/dist/api/generated/models/resource.d.ts +2 -3
  35. package/dist/api/generated/models/script.d.ts +11 -4
  36. package/dist/services/ActionService.d.ts +2 -0
  37. package/dist/services/ActionService.js +5 -0
  38. package/dist/services/ProjectService.d.ts +0 -2
  39. package/dist/services/ProjectService.js +0 -2
  40. package/package.json +3 -3
  41. package/LICENSE +0 -21
  42. package/dist/api/generated/apis/deployments-api.d.ts +0 -25
  43. package/dist/api/generated/apis/deployments-api.js +0 -49
  44. package/dist/api/generated/models/deployment-create-application.d.ts +0 -42
  45. package/dist/api/generated/models/deployment-create-server.d.ts +0 -30
  46. package/dist/api/generated/models/deployment-relation.d.ts +0 -103
  47. package/dist/api/generated/models/deployment-step.d.ts +0 -61
  48. package/dist/api/generated/models/deployment.d.ts +0 -110
  49. package/dist/services/DeploymentService.d.ts +0 -3
  50. package/dist/services/DeploymentService.js +0 -7
package/README.md CHANGED
@@ -1,19 +1,11 @@
1
1
  # Devopness SDK - JavaScript
2
2
 
3
- [![MIT License](https://img.shields.io/badge/license-MIT_License-green.svg?style=flat-square)](https://github.com/devopness/devopness-sdk-js/blob/master/LICENSE)
4
- ![CI](https://github.com/devopness/sdk-js/workflows/CI/badge.svg)
5
-
6
3
  [![NPM](https://nodei.co/npm/@devopness/sdk-js.png?downloads=true&stars=true)](https://nodei.co/npm/@devopness/sdk-js/)
7
4
 
8
5
  The official Devopness SDK for JavaScript, available for browsers, mobile devices and `Node.js` backends.
9
6
 
10
7
  Devopness SDK includes a pre-defined set of classes that provide convenient access to Devopness platform data. This SDK aims to make it easy and fun to consume Devopness API resources from web, Node.js or mobile apps written in the JavaScript programming language.
11
8
 
12
- ## About Devopness
13
- `Devopness` aims to drastically change the way software developers deploy applications and manage on-premise and cloud servers in a secure and performant fashion.
14
-
15
- By streamlining essential DevOps practices we're making first class software deployment and server management tools accessible and affordable to every developer in the world.
16
-
17
9
  ## Usage
18
10
 
19
11
  ### Install/Upgrade
@@ -57,7 +49,7 @@ async function authenticate(email, pass) {
57
49
  authenticate('user@email.com', 'secret-password');
58
50
  ```
59
51
 
60
- In the example above, `userTokens` is a instance of `ApiResponse` and the `data` property has the data requested from the API. See [ApiResponse.ts](https://github.com/devopness/devopness-sdk-js/blob/master/src/common/ApiResponse.ts) for reference.
52
+ In the example above, `userTokens` is a instance of `ApiResponse` and the `data` property has the data requested from the API. See [ApiResponse.ts](https://github.com/devopness/devopness/blob/master/src/common/ApiResponse.ts) for reference.
61
53
 
62
54
  ### Invoking authentication protected endpoints
63
55
  Once an authentication token is set, any protected endpoint can be invoked.
@@ -88,7 +80,7 @@ Some methods in `Devopness SDK JavaScript` accept and return objects from the De
88
80
  To build and test the SDK locally, follow these steps:
89
81
  1. Clone de repository
90
82
  ```
91
- git clone https://github.com/devopness/devopness-sdk-js.git
83
+ git clone https://github.com/devopness/devopness.git
92
84
  ```
93
85
  2. Install missing dependencies
94
86
 
@@ -1,7 +1,6 @@
1
1
  import { ConfigurationOptions } from './services/ApiBaseService';
2
2
  import { ApplicationService } from './services/ApplicationService';
3
3
  import { DaemonService } from './services/DaemonService';
4
- import { DeploymentService } from './services/DeploymentService';
5
4
  import { EnvironmentService } from './services/EnvironmentService';
6
5
  import { NetworkRuleService } from './services/NetworkRuleService';
7
6
  import { ProjectService } from './services/ProjectService';
@@ -14,7 +13,6 @@ import { SslCertificateService } from './services/SslCertificateService';
14
13
  import { UserService } from './services/UserService';
15
14
  import { CronJobService } from './services/CronJobService';
16
15
  import { StaticService } from './services/StaticService';
17
- import { ActionsApiService } from './api/generated/apis/actions-api';
18
16
  import { SocialAccountService } from './services/SocialAccountService';
19
17
  import { LogService } from './services/LogService';
20
18
  import { VariableService } from './services/VariableService';
@@ -25,13 +23,13 @@ import { CloudProviderService } from './services/CloudProviderService';
25
23
  import { InvitationService } from './services/InvitationService';
26
24
  import { TeamService } from './services/TeamService';
27
25
  import { ResourceEventService } from './services/ResourceEventService';
26
+ import { ActionService } from './services/ActionService';
28
27
  export declare class DevopnessApiClient {
29
- actions: ActionsApiService;
28
+ actions: ActionService;
30
29
  applications: ApplicationService;
31
30
  cloudProviders: CloudProviderService;
32
31
  cronjobs: CronJobService;
33
32
  daemons: DaemonService;
34
- deployments: DeploymentService;
35
33
  environments: EnvironmentService;
36
34
  hookRequests: HookRequestService;
37
35
  incomingHooks: HookIncomingService;
@@ -4,7 +4,6 @@ exports.DevopnessApiClient = void 0;
4
4
  const ApiBaseService_1 = require("./services/ApiBaseService");
5
5
  const ApplicationService_1 = require("./services/ApplicationService");
6
6
  const DaemonService_1 = require("./services/DaemonService");
7
- const DeploymentService_1 = require("./services/DeploymentService");
8
7
  const EnvironmentService_1 = require("./services/EnvironmentService");
9
8
  const NetworkRuleService_1 = require("./services/NetworkRuleService");
10
9
  const ProjectService_1 = require("./services/ProjectService");
@@ -17,7 +16,6 @@ const SslCertificateService_1 = require("./services/SslCertificateService");
17
16
  const UserService_1 = require("./services/UserService");
18
17
  const CronJobService_1 = require("./services/CronJobService");
19
18
  const StaticService_1 = require("./services/StaticService");
20
- const actions_api_1 = require("./api/generated/apis/actions-api");
21
19
  const SocialAccountService_1 = require("./services/SocialAccountService");
22
20
  const LogService_1 = require("./services/LogService");
23
21
  const VariableService_1 = require("./services/VariableService");
@@ -28,18 +26,18 @@ const CloudProviderService_1 = require("./services/CloudProviderService");
28
26
  const InvitationService_1 = require("./services/InvitationService");
29
27
  const TeamService_1 = require("./services/TeamService");
30
28
  const ResourceEventService_1 = require("./services/ResourceEventService");
29
+ const ActionService_1 = require("./services/ActionService");
31
30
  class DevopnessApiClient {
32
31
  constructor(options) {
33
32
  ApiBaseService_1.ApiBaseService.configuration = new ApiBaseService_1.Configuration(options || {});
34
33
  // we initialize the services explicitly, instead of auto initialize them on property declaration in the beginning of the class,
35
34
  // cause some (or all) of them depend on `ApiBaseService.configuration` property be set. Furthermore, we ensure all assertions
36
35
  // for non provided required parameters are quickly returned to the end user before spending time loading extra resources
37
- this.actions = new actions_api_1.ActionsApiService();
36
+ this.actions = new ActionService_1.ActionService();
38
37
  this.applications = new ApplicationService_1.ApplicationService();
39
38
  this.cloudProviders = new CloudProviderService_1.CloudProviderService();
40
39
  this.cronjobs = new CronJobService_1.CronJobService();
41
40
  this.daemons = new DaemonService_1.DaemonService();
42
- this.deployments = new DeploymentService_1.DeploymentService();
43
41
  this.environments = new EnvironmentService_1.EnvironmentService();
44
42
  this.hookRequests = new HookRequestService_1.HookRequestService();
45
43
  this.incomingHooks = new HookIncomingService_1.HookIncomingService();
@@ -30,4 +30,10 @@ export declare class ActionsApiService extends ApiBaseService {
30
30
  * @param {number} [perPage] Number of items returned per page
31
31
  */
32
32
  listActions(page?: number, perPage?: number): Promise<ApiResponse<Array<ActionListItem>>>;
33
+ /**
34
+ *
35
+ * @summary Retry an action
36
+ * @param {number} actionId Numeric ID of the action to be retried
37
+ */
38
+ retryAction(actionId: number): Promise<ApiResponse<Action>>;
33
39
  }
@@ -66,5 +66,21 @@ class ActionsApiService extends ApiBaseService_1.ApiBaseService {
66
66
  return new ApiResponse_1.ApiResponse(response);
67
67
  });
68
68
  }
69
+ /**
70
+ *
71
+ * @summary Retry an action
72
+ * @param {number} actionId Numeric ID of the action to be retried
73
+ */
74
+ retryAction(actionId) {
75
+ return __awaiter(this, void 0, void 0, function* () {
76
+ if (actionId === null || actionId === undefined) {
77
+ throw new Exceptions_1.ArgumentNullException('actionId', 'retryAction');
78
+ }
79
+ let queryString = '';
80
+ const requestUrl = '/actions/{action_id}/retry' + (queryString ? `?${queryString}` : '');
81
+ const response = yield this.post(requestUrl.replace(`{${"action_id"}}`, encodeURIComponent(String(actionId))));
82
+ return new ApiResponse_1.ApiResponse(response);
83
+ });
84
+ }
69
85
  }
70
86
  exports.ActionsApiService = ActionsApiService;
@@ -0,0 +1,39 @@
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 { ApiBaseService } from "../../../services/ApiBaseService";
13
+ import { ApiResponse } from "../../../common/ApiResponse";
14
+ import { ActionListItem } from '../../generated/models';
15
+ import { ActionType } from '../../generated/models';
16
+ /**
17
+ * ActionsResourcesApiService - Auto-generated
18
+ */
19
+ export declare class ActionsResourcesApiService extends ApiBaseService {
20
+ /**
21
+ *
22
+ * @summary List resource actions
23
+ * @param {string} resourceType The resource type to get related actions
24
+ * @param {number} resourceId Unique ID of the resource that\&#39;s being searched
25
+ * @param {number} [page] Number of the page to be retrieved
26
+ * @param {number} [perPage] Number of items returned per page
27
+ */
28
+ listResourceActions(resourceType: string, resourceId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<ActionListItem>>>;
29
+ /**
30
+ *
31
+ * @summary List resource actions of an action type
32
+ * @param {string} resourceType The resource type to get related actions
33
+ * @param {number} resourceId Unique ID of the resource that\&#39;s being searched
34
+ * @param {ActionType} actionType The action type
35
+ * @param {number} [page] Number of the page to be retrieved
36
+ * @param {number} [perPage] Number of items returned per page
37
+ */
38
+ listResourceActionsOfResourceTypeActionType(resourceType: string, resourceId: number, actionType: ActionType, page?: number, perPage?: number): Promise<ApiResponse<Array<ActionListItem>>>;
39
+ }
@@ -0,0 +1,95 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.ActionsResourcesApiService = void 0;
25
+ const ApiBaseService_1 = require("../../../services/ApiBaseService");
26
+ const ApiResponse_1 = require("../../../common/ApiResponse");
27
+ const Exceptions_1 = require("../../../common/Exceptions");
28
+ /**
29
+ * ActionsResourcesApiService - Auto-generated
30
+ */
31
+ class ActionsResourcesApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary List resource actions
35
+ * @param {string} resourceType The resource type to get related actions
36
+ * @param {number} resourceId Unique ID of the resource that\&#39;s being searched
37
+ * @param {number} [page] Number of the page to be retrieved
38
+ * @param {number} [perPage] Number of items returned per page
39
+ */
40
+ listResourceActions(resourceType, resourceId, page, perPage) {
41
+ return __awaiter(this, void 0, void 0, function* () {
42
+ if (resourceType === null || resourceType === undefined) {
43
+ throw new Exceptions_1.ArgumentNullException('resourceType', 'listResourceActions');
44
+ }
45
+ if (resourceId === null || resourceId === undefined) {
46
+ throw new Exceptions_1.ArgumentNullException('resourceId', 'listResourceActions');
47
+ }
48
+ let queryString = '';
49
+ const queryParams = { page: page, per_page: perPage, };
50
+ for (const key in queryParams) {
51
+ if (queryParams[key] === undefined || queryParams[key] === null) {
52
+ continue;
53
+ }
54
+ queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
55
+ }
56
+ const requestUrl = '/actions/{resource_type}/{resource_id}' + (queryString ? `?${queryString}` : '');
57
+ const response = yield this.get(requestUrl.replace(`{${"resource_type"}}`, encodeURIComponent(String(resourceType))).replace(`{${"resource_id"}}`, encodeURIComponent(String(resourceId))));
58
+ return new ApiResponse_1.ApiResponse(response);
59
+ });
60
+ }
61
+ /**
62
+ *
63
+ * @summary List resource actions of an action type
64
+ * @param {string} resourceType The resource type to get related actions
65
+ * @param {number} resourceId Unique ID of the resource that\&#39;s being searched
66
+ * @param {ActionType} actionType The action type
67
+ * @param {number} [page] Number of the page to be retrieved
68
+ * @param {number} [perPage] Number of items returned per page
69
+ */
70
+ listResourceActionsOfResourceTypeActionType(resourceType, resourceId, actionType, page, perPage) {
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ if (resourceType === null || resourceType === undefined) {
73
+ throw new Exceptions_1.ArgumentNullException('resourceType', 'listResourceActionsOfResourceTypeActionType');
74
+ }
75
+ if (resourceId === null || resourceId === undefined) {
76
+ throw new Exceptions_1.ArgumentNullException('resourceId', 'listResourceActionsOfResourceTypeActionType');
77
+ }
78
+ if (actionType === null || actionType === undefined) {
79
+ throw new Exceptions_1.ArgumentNullException('actionType', 'listResourceActionsOfResourceTypeActionType');
80
+ }
81
+ let queryString = '';
82
+ const queryParams = { page: page, per_page: perPage, };
83
+ for (const key in queryParams) {
84
+ if (queryParams[key] === undefined || queryParams[key] === null) {
85
+ continue;
86
+ }
87
+ queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
88
+ }
89
+ const requestUrl = '/actions/{resource_type}/{resource_id}/{action_type}' + (queryString ? `?${queryString}` : '');
90
+ const response = yield this.get(requestUrl.replace(`{${"resource_type"}}`, encodeURIComponent(String(resourceType))).replace(`{${"resource_id"}}`, encodeURIComponent(String(resourceId))).replace(`{${"action_type"}}`, encodeURIComponent(String(actionType))));
91
+ return new ApiResponse_1.ApiResponse(response);
92
+ });
93
+ }
94
+ }
95
+ exports.ActionsResourcesApiService = ActionsResourcesApiService;
@@ -11,9 +11,7 @@
11
11
  */
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
- import { Deployment } from '../../generated/models';
15
- import { DeploymentCreate } from '../../generated/models';
16
- import { DeploymentRelation } from '../../generated/models';
14
+ import { ApplicationDeployment } from '../../generated/models';
17
15
  /**
18
16
  * ApplicationsDeploymentsApiService - Auto-generated
19
17
  */
@@ -22,15 +20,7 @@ export declare class ApplicationsDeploymentsApiService extends ApiBaseService {
22
20
  *
23
21
  * @summary Trigger a new deployment for current application
24
22
  * @param {number} applicationId Numeric ID of the application to be deployed
25
- * @param {DeploymentCreate} [deploymentCreate] A JSON object containing deployment parameters
23
+ * @param {ApplicationDeployment} [applicationDeployment] A JSON object containing deployment parameters
26
24
  */
27
- deployApplication(applicationId: number, deploymentCreate?: DeploymentCreate): Promise<ApiResponse<Deployment>>;
28
- /**
29
- *
30
- * @summary Returns a list of all deployments belonging to an application
31
- * @param {number} applicationId Numeric ID of the application to get deployments from
32
- * @param {number} [page] Number of the page to be retrieved
33
- * @param {number} [perPage] Number of items returned per page
34
- */
35
- listApplicationDeployments(applicationId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<DeploymentRelation>>>;
25
+ deployApplication(applicationId: number, applicationDeployment?: ApplicationDeployment): Promise<ApiResponse<void>>;
36
26
  }
@@ -33,41 +33,16 @@ class ApplicationsDeploymentsApiService extends ApiBaseService_1.ApiBaseService
33
33
  *
34
34
  * @summary Trigger a new deployment for current application
35
35
  * @param {number} applicationId Numeric ID of the application to be deployed
36
- * @param {DeploymentCreate} [deploymentCreate] A JSON object containing deployment parameters
36
+ * @param {ApplicationDeployment} [applicationDeployment] A JSON object containing deployment parameters
37
37
  */
38
- deployApplication(applicationId, deploymentCreate) {
38
+ deployApplication(applicationId, applicationDeployment) {
39
39
  return __awaiter(this, void 0, void 0, function* () {
40
40
  if (applicationId === null || applicationId === undefined) {
41
41
  throw new Exceptions_1.ArgumentNullException('applicationId', 'deployApplication');
42
42
  }
43
43
  let queryString = '';
44
44
  const requestUrl = '/applications/{application_id}/deployments' + (queryString ? `?${queryString}` : '');
45
- const response = yield this.post(requestUrl.replace(`{${"application_id"}}`, encodeURIComponent(String(applicationId))), deploymentCreate);
46
- return new ApiResponse_1.ApiResponse(response);
47
- });
48
- }
49
- /**
50
- *
51
- * @summary Returns a list of all deployments belonging to an application
52
- * @param {number} applicationId Numeric ID of the application to get deployments from
53
- * @param {number} [page] Number of the page to be retrieved
54
- * @param {number} [perPage] Number of items returned per page
55
- */
56
- listApplicationDeployments(applicationId, page, perPage) {
57
- return __awaiter(this, void 0, void 0, function* () {
58
- if (applicationId === null || applicationId === undefined) {
59
- throw new Exceptions_1.ArgumentNullException('applicationId', 'listApplicationDeployments');
60
- }
61
- let queryString = '';
62
- const queryParams = { page: page, per_page: perPage, };
63
- for (const key in queryParams) {
64
- if (queryParams[key] === undefined || queryParams[key] === null) {
65
- continue;
66
- }
67
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
68
- }
69
- const requestUrl = '/applications/{application_id}/deployments' + (queryString ? `?${queryString}` : '');
70
- const response = yield this.get(requestUrl.replace(`{${"application_id"}}`, encodeURIComponent(String(applicationId))));
45
+ const response = yield this.post(requestUrl.replace(`{${"application_id"}}`, encodeURIComponent(String(applicationId))), applicationDeployment);
71
46
  return new ApiResponse_1.ApiResponse(response);
72
47
  });
73
48
  }
@@ -11,17 +11,18 @@
11
11
  */
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
- import { DeploymentRelation } from '../../generated/models';
14
+ import { ActionListItem } from '../../generated/models';
15
15
  /**
16
- * ProjectsDeploymentsApiService - Auto-generated
16
+ * EnvironmentsActionsApiService - Auto-generated
17
17
  */
18
- export declare class ProjectsDeploymentsApiService extends ApiBaseService {
18
+ export declare class EnvironmentsActionsApiService extends ApiBaseService {
19
19
  /**
20
20
  *
21
- * @summary Returns a list of all deployments belonging to a project
22
- * @param {number} projectId Numeric ID of the project to get deployments from
21
+ * @summary List environment actions of a resource type
22
+ * @param {number} environmentId Unique ID of the environment to get
23
+ * @param {string} resourceType The resource type to get related actions
23
24
  * @param {number} [page] Number of the page to be retrieved
24
25
  * @param {number} [perPage] Number of items returned per page
25
26
  */
26
- listProjectDeployments(projectId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<DeploymentRelation>>>;
27
+ listEnvironmentActionsOfResourceType(environmentId: number, resourceType: string, page?: number, perPage?: number): Promise<ApiResponse<Array<ActionListItem>>>;
27
28
  }
@@ -21,25 +21,29 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.ProjectsDeploymentsApiService = void 0;
24
+ exports.EnvironmentsActionsApiService = void 0;
25
25
  const ApiBaseService_1 = require("../../../services/ApiBaseService");
26
26
  const ApiResponse_1 = require("../../../common/ApiResponse");
27
27
  const Exceptions_1 = require("../../../common/Exceptions");
28
28
  /**
29
- * ProjectsDeploymentsApiService - Auto-generated
29
+ * EnvironmentsActionsApiService - Auto-generated
30
30
  */
31
- class ProjectsDeploymentsApiService extends ApiBaseService_1.ApiBaseService {
31
+ class EnvironmentsActionsApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
- * @summary Returns a list of all deployments belonging to a project
35
- * @param {number} projectId Numeric ID of the project to get deployments from
34
+ * @summary List environment actions of a resource type
35
+ * @param {number} environmentId Unique ID of the environment to get
36
+ * @param {string} resourceType The resource type to get related actions
36
37
  * @param {number} [page] Number of the page to be retrieved
37
38
  * @param {number} [perPage] Number of items returned per page
38
39
  */
39
- listProjectDeployments(projectId, page, perPage) {
40
+ listEnvironmentActionsOfResourceType(environmentId, resourceType, page, perPage) {
40
41
  return __awaiter(this, void 0, void 0, function* () {
41
- if (projectId === null || projectId === undefined) {
42
- throw new Exceptions_1.ArgumentNullException('projectId', 'listProjectDeployments');
42
+ if (environmentId === null || environmentId === undefined) {
43
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentActionsOfResourceType');
44
+ }
45
+ if (resourceType === null || resourceType === undefined) {
46
+ throw new Exceptions_1.ArgumentNullException('resourceType', 'listEnvironmentActionsOfResourceType');
43
47
  }
44
48
  let queryString = '';
45
49
  const queryParams = { page: page, per_page: perPage, };
@@ -49,10 +53,10 @@ class ProjectsDeploymentsApiService extends ApiBaseService_1.ApiBaseService {
49
53
  }
50
54
  queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
51
55
  }
52
- const requestUrl = '/projects/{project_id}/deployments' + (queryString ? `?${queryString}` : '');
53
- const response = yield this.get(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))));
56
+ const requestUrl = '/environments/{environment_id}/actions/{resource_type}' + (queryString ? `?${queryString}` : '');
57
+ const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))).replace(`{${"resource_type"}}`, encodeURIComponent(String(resourceType))));
54
58
  return new ApiResponse_1.ApiResponse(response);
55
59
  });
56
60
  }
57
61
  }
58
- exports.ProjectsDeploymentsApiService = ProjectsDeploymentsApiService;
62
+ exports.EnvironmentsActionsApiService = EnvironmentsActionsApiService;
@@ -31,13 +31,6 @@ export declare class LogsApiService extends ApiBaseService {
31
31
  * @param {number} actionStepOrder Step\&#39;s order number to get the logs from
32
32
  */
33
33
  getActionStepLog(actionId: number, serverId: number, actionStepOrder: number): Promise<ApiResponse<ActionStepLog>>;
34
- /**
35
- *
36
- * @summary Get deployment step log
37
- * @param {number} deploymentId Numeric ID of the deployment to which the step belongs to
38
- * @param {number} deploymentStepOrder Relative order number of the deployment step
39
- */
40
- getDeploymentStepLog(deploymentId: number, deploymentStepOrder: number): Promise<ApiResponse<Log>>;
41
34
  /**
42
35
  *
43
36
  * @summary Get service reload log
@@ -69,26 +69,6 @@ class LogsApiService extends ApiBaseService_1.ApiBaseService {
69
69
  return new ApiResponse_1.ApiResponse(response);
70
70
  });
71
71
  }
72
- /**
73
- *
74
- * @summary Get deployment step log
75
- * @param {number} deploymentId Numeric ID of the deployment to which the step belongs to
76
- * @param {number} deploymentStepOrder Relative order number of the deployment step
77
- */
78
- getDeploymentStepLog(deploymentId, deploymentStepOrder) {
79
- return __awaiter(this, void 0, void 0, function* () {
80
- if (deploymentId === null || deploymentId === undefined) {
81
- throw new Exceptions_1.ArgumentNullException('deploymentId', 'getDeploymentStepLog');
82
- }
83
- if (deploymentStepOrder === null || deploymentStepOrder === undefined) {
84
- throw new Exceptions_1.ArgumentNullException('deploymentStepOrder', 'getDeploymentStepLog');
85
- }
86
- let queryString = '';
87
- const requestUrl = '/logs/deployment/{deployment_id}/step/{deployment_step_order}' + (queryString ? `?${queryString}` : '');
88
- const response = yield this.get(requestUrl.replace(`{${"deployment_id"}}`, encodeURIComponent(String(deploymentId))).replace(`{${"deployment_step_order"}}`, encodeURIComponent(String(deploymentStepOrder))));
89
- return new ApiResponse_1.ApiResponse(response);
90
- });
91
- }
92
72
  /**
93
73
  *
94
74
  * @summary Get service reload log
@@ -0,0 +1,39 @@
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 { ApiBaseService } from "../../../services/ApiBaseService";
13
+ import { ApiResponse } from "../../../common/ApiResponse";
14
+ import { ActionListItem } from '../../generated/models';
15
+ import { ActionType } from '../../generated/models';
16
+ /**
17
+ * ProjectsActionsApiService - Auto-generated
18
+ */
19
+ export declare class ProjectsActionsApiService extends ApiBaseService {
20
+ /**
21
+ *
22
+ * @summary List resource actions of a resource type
23
+ * @param {number} projectId Unique ID of the project to get
24
+ * @param {string} resourceType The resource type to get related actions
25
+ * @param {number} [page] Number of the page to be retrieved
26
+ * @param {number} [perPage] Number of items returned per page
27
+ */
28
+ listProjectActionsOfResourceType(projectId: number, resourceType: string, page?: number, perPage?: number): Promise<ApiResponse<Array<ActionListItem>>>;
29
+ /**
30
+ *
31
+ * @summary List project actions of a resource type and action type
32
+ * @param {number} projectId Unique ID of the project to get
33
+ * @param {string} resourceType The resource type to get related actions
34
+ * @param {ActionType} actionType The action type
35
+ * @param {number} [page] Number of the page to be retrieved
36
+ * @param {number} [perPage] Number of items returned per page
37
+ */
38
+ listProjectActionsOfResourceTypeActionType(projectId: number, resourceType: string, actionType: ActionType, page?: number, perPage?: number): Promise<ApiResponse<Array<ActionListItem>>>;
39
+ }
@@ -0,0 +1,95 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.ProjectsActionsApiService = void 0;
25
+ const ApiBaseService_1 = require("../../../services/ApiBaseService");
26
+ const ApiResponse_1 = require("../../../common/ApiResponse");
27
+ const Exceptions_1 = require("../../../common/Exceptions");
28
+ /**
29
+ * ProjectsActionsApiService - Auto-generated
30
+ */
31
+ class ProjectsActionsApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary List resource actions of a resource type
35
+ * @param {number} projectId Unique ID of the project to get
36
+ * @param {string} resourceType The resource type to get related actions
37
+ * @param {number} [page] Number of the page to be retrieved
38
+ * @param {number} [perPage] Number of items returned per page
39
+ */
40
+ listProjectActionsOfResourceType(projectId, resourceType, page, perPage) {
41
+ return __awaiter(this, void 0, void 0, function* () {
42
+ if (projectId === null || projectId === undefined) {
43
+ throw new Exceptions_1.ArgumentNullException('projectId', 'listProjectActionsOfResourceType');
44
+ }
45
+ if (resourceType === null || resourceType === undefined) {
46
+ throw new Exceptions_1.ArgumentNullException('resourceType', 'listProjectActionsOfResourceType');
47
+ }
48
+ let queryString = '';
49
+ const queryParams = { page: page, per_page: perPage, };
50
+ for (const key in queryParams) {
51
+ if (queryParams[key] === undefined || queryParams[key] === null) {
52
+ continue;
53
+ }
54
+ queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
55
+ }
56
+ const requestUrl = '/projects/{project_id}/actions/{resource_type}' + (queryString ? `?${queryString}` : '');
57
+ const response = yield this.get(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))).replace(`{${"resource_type"}}`, encodeURIComponent(String(resourceType))));
58
+ return new ApiResponse_1.ApiResponse(response);
59
+ });
60
+ }
61
+ /**
62
+ *
63
+ * @summary List project actions of a resource type and action type
64
+ * @param {number} projectId Unique ID of the project to get
65
+ * @param {string} resourceType The resource type to get related actions
66
+ * @param {ActionType} actionType The action type
67
+ * @param {number} [page] Number of the page to be retrieved
68
+ * @param {number} [perPage] Number of items returned per page
69
+ */
70
+ listProjectActionsOfResourceTypeActionType(projectId, resourceType, actionType, page, perPage) {
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ if (projectId === null || projectId === undefined) {
73
+ throw new Exceptions_1.ArgumentNullException('projectId', 'listProjectActionsOfResourceTypeActionType');
74
+ }
75
+ if (resourceType === null || resourceType === undefined) {
76
+ throw new Exceptions_1.ArgumentNullException('resourceType', 'listProjectActionsOfResourceTypeActionType');
77
+ }
78
+ if (actionType === null || actionType === undefined) {
79
+ throw new Exceptions_1.ArgumentNullException('actionType', 'listProjectActionsOfResourceTypeActionType');
80
+ }
81
+ let queryString = '';
82
+ const queryParams = { page: page, per_page: perPage, };
83
+ for (const key in queryParams) {
84
+ if (queryParams[key] === undefined || queryParams[key] === null) {
85
+ continue;
86
+ }
87
+ queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
88
+ }
89
+ const requestUrl = '/projects/{project_id}/actions/{resource_type}/{action_type}' + (queryString ? `?${queryString}` : '');
90
+ const response = yield this.get(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))).replace(`{${"resource_type"}}`, encodeURIComponent(String(resourceType))).replace(`{${"action_type"}}`, encodeURIComponent(String(actionType))));
91
+ return new ApiResponse_1.ApiResponse(response);
92
+ });
93
+ }
94
+ }
95
+ exports.ProjectsActionsApiService = ProjectsActionsApiService;
@@ -0,0 +1,18 @@
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 { ActionDeploymentData } from './action-deployment-data';
13
+ /**
14
+ * @type ActionData
15
+ * Data related to action resource.
16
+ * @export
17
+ */
18
+ export declare type ActionData = ActionDeploymentData;