@devopness/sdk-js 1.102.0 → 1.104.1

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 (51) hide show
  1. package/README.md +5 -5
  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 +0 -20
  5. package/dist/api/generated/apis/actions-api.js +0 -62
  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/logs-api.d.ts +0 -7
  11. package/dist/api/generated/apis/logs-api.js +0 -20
  12. package/dist/api/generated/apis/resource-events-api.d.ts +1 -1
  13. package/dist/api/generated/apis/resource-events-api.js +1 -1
  14. package/dist/api/generated/models/action-data.d.ts +18 -0
  15. package/dist/api/generated/models/{deployment-create-application.js → action-data.js} +0 -0
  16. package/dist/api/generated/models/action-deployment-commit.d.ts +90 -0
  17. package/dist/api/generated/models/{deployment-create-server.js → action-deployment-commit.js} +0 -0
  18. package/dist/api/generated/models/action-deployment-content.d.ts +55 -0
  19. package/dist/api/generated/models/{deployment-create.js → action-deployment-content.js} +0 -0
  20. package/dist/api/generated/models/action-deployment-data.d.ts +38 -0
  21. package/dist/api/generated/models/{deployment-relation.js → action-deployment-data.js} +0 -0
  22. package/dist/api/generated/models/action-trigger-type.d.ts +20 -0
  23. package/dist/api/generated/models/action-trigger-type.js +25 -0
  24. package/dist/api/generated/models/action-triggered-from.d.ts +73 -0
  25. package/dist/api/generated/models/{deployment-step.js → action-triggered-from.js} +0 -0
  26. package/dist/api/generated/models/action.d.ts +15 -1
  27. package/dist/api/generated/models/{deployment-create.d.ts → application-deployment.d.ts} +6 -6
  28. package/dist/api/generated/models/{deployment.js → application-deployment.js} +0 -0
  29. package/dist/api/generated/models/application-last-deployments.d.ts +5 -5
  30. package/dist/api/generated/models/index.d.ts +7 -6
  31. package/dist/api/generated/models/index.js +7 -6
  32. package/dist/api/generated/models/resource.d.ts +2 -3
  33. package/dist/api/generated/models/script.d.ts +11 -4
  34. package/dist/services/ActionService.d.ts +2 -0
  35. package/dist/services/ActionService.js +5 -0
  36. package/dist/services/EnvironmentService.d.ts +2 -0
  37. package/dist/services/EnvironmentService.js +2 -0
  38. package/dist/services/ProjectService.d.ts +2 -2
  39. package/dist/services/ProjectService.js +2 -2
  40. package/package.json +1 -1
  41. package/dist/api/generated/apis/deployments-api.d.ts +0 -25
  42. package/dist/api/generated/apis/deployments-api.js +0 -49
  43. package/dist/api/generated/apis/projects-deployments-api.d.ts +0 -27
  44. package/dist/api/generated/apis/projects-deployments-api.js +0 -58
  45. package/dist/api/generated/models/deployment-create-application.d.ts +0 -42
  46. package/dist/api/generated/models/deployment-create-server.d.ts +0 -30
  47. package/dist/api/generated/models/deployment-relation.d.ts +0 -103
  48. package/dist/api/generated/models/deployment-step.d.ts +0 -61
  49. package/dist/api/generated/models/deployment.d.ts +0 -110
  50. package/dist/services/DeploymentService.d.ts +0 -3
  51. package/dist/services/DeploymentService.js +0 -7
package/README.md CHANGED
@@ -20,7 +20,7 @@ yarn add @devopness/sdk-js
20
20
 
21
21
  ### Initializing
22
22
 
23
- To initialize the usage of Devopness SDK just import it and create a new instance of `DevopnessApiClient` class.
23
+ To initialize the usage of Devopness SDK, just import it and create a new instance of `DevopnessApiClient` class.
24
24
 
25
25
  Here is a generic simple example that can be used from `Node.js`, `TypeScript` or `Javascript` applications:
26
26
 
@@ -30,8 +30,8 @@ const devopnessApi = new DevopnessApiClient();
30
30
  ```
31
31
 
32
32
  The instance of `DevopnessApiClient` has properties to all services provided by the API.
33
- The name of the methods at services is the same as operation name in the documentation of the
34
- Devopness API. You can consult the URL of a endpoint to see the operation name. For instance
33
+ The name of the methods at services is the same as the operation name in the documentation of the
34
+ Devopness API. You can consult the URL of an endpoint to see the operation name. For instance,
35
35
  the URL to endpoint `POST /users/login` in the documentation is: `/#operation/login`
36
36
 
37
37
  ### Authenticating
@@ -49,7 +49,7 @@ async function authenticate(email, pass) {
49
49
  authenticate('user@email.com', 'secret-password');
50
50
  ```
51
51
 
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.
52
+ In the example above, `userTokens` is an 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.
53
53
 
54
54
  ### Invoking authentication protected endpoints
55
55
  Once an authentication token is set, any protected endpoint can be invoked.
@@ -74,7 +74,7 @@ getUserProfile();
74
74
  This package includes TypeScript declarations for every method.
75
75
  TypeScript versions `>= 3.8` are supported.
76
76
 
77
- Some methods in `Devopness SDK JavaScript` accept and return objects from the Devopness API. The type declarations for these objects will always track the latest version of the API. Therefore, if you'e using the latest version of this package you can rely on the Devopness API documentation for checking the input and return types of each API endpoint.
77
+ Some methods in `Devopness SDK JavaScript` accept and return objects from the Devopness API. The type declarations for these objects will always track the latest version of the API. Therefore, if you'e using the latest version of this package, you can rely on the Devopness API documentation for checking the input and return types of each API endpoint.
78
78
 
79
79
  ## Building and testing
80
80
  To build and test the SDK locally, follow these steps:
@@ -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();
@@ -13,7 +13,6 @@ import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { Action } from '../../generated/models';
15
15
  import { ActionListItem } from '../../generated/models';
16
- import { ActionType } from '../../generated/models';
17
16
  /**
18
17
  * ActionsApiService - Auto-generated
19
18
  */
@@ -31,25 +30,6 @@ export declare class ActionsApiService extends ApiBaseService {
31
30
  * @param {number} [perPage] Number of items returned per page
32
31
  */
33
32
  listActions(page?: number, perPage?: number): Promise<ApiResponse<Array<ActionListItem>>>;
34
- /**
35
- *
36
- * @summary List resource actions
37
- * @param {string} resourceType The resource type to get related actions
38
- * @param {number} resourceId Unique ID of the resource that is being searched
39
- * @param {number} [page] Number of the page to be retrieved
40
- * @param {number} [perPage] Number of items returned per page
41
- */
42
- listResourceActions(resourceType: string, resourceId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<ActionListItem>>>;
43
- /**
44
- *
45
- * @summary List resource actions of an action type
46
- * @param {string} resourceType The resource type to get related actions
47
- * @param {number} resourceId Unique ID of the resource that is being searched
48
- * @param {ActionType} actionType The action type
49
- * @param {number} [page] Number of the page to be retrieved
50
- * @param {number} [perPage] Number of items returned per page
51
- */
52
- listResourceActionsOfResourceTypeActionType(resourceType: string, resourceId: number, actionType: ActionType, page?: number, perPage?: number): Promise<ApiResponse<Array<ActionListItem>>>;
53
33
  /**
54
34
  *
55
35
  * @summary Retry an action
@@ -66,68 +66,6 @@ class ActionsApiService extends ApiBaseService_1.ApiBaseService {
66
66
  return new ApiResponse_1.ApiResponse(response);
67
67
  });
68
68
  }
69
- /**
70
- *
71
- * @summary List resource actions
72
- * @param {string} resourceType The resource type to get related actions
73
- * @param {number} resourceId Unique ID of the resource that is being searched
74
- * @param {number} [page] Number of the page to be retrieved
75
- * @param {number} [perPage] Number of items returned per page
76
- */
77
- listResourceActions(resourceType, resourceId, page, perPage) {
78
- return __awaiter(this, void 0, void 0, function* () {
79
- if (resourceType === null || resourceType === undefined) {
80
- throw new Exceptions_1.ArgumentNullException('resourceType', 'listResourceActions');
81
- }
82
- if (resourceId === null || resourceId === undefined) {
83
- throw new Exceptions_1.ArgumentNullException('resourceId', 'listResourceActions');
84
- }
85
- let queryString = '';
86
- const queryParams = { page: page, per_page: perPage, };
87
- for (const key in queryParams) {
88
- if (queryParams[key] === undefined || queryParams[key] === null) {
89
- continue;
90
- }
91
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
92
- }
93
- const requestUrl = '/actions/{resource_type}/{resource_id}' + (queryString ? `?${queryString}` : '');
94
- const response = yield this.get(requestUrl.replace(`{${"resource_type"}}`, encodeURIComponent(String(resourceType))).replace(`{${"resource_id"}}`, encodeURIComponent(String(resourceId))));
95
- return new ApiResponse_1.ApiResponse(response);
96
- });
97
- }
98
- /**
99
- *
100
- * @summary List resource actions of an action type
101
- * @param {string} resourceType The resource type to get related actions
102
- * @param {number} resourceId Unique ID of the resource that is being searched
103
- * @param {ActionType} actionType The action type
104
- * @param {number} [page] Number of the page to be retrieved
105
- * @param {number} [perPage] Number of items returned per page
106
- */
107
- listResourceActionsOfResourceTypeActionType(resourceType, resourceId, actionType, page, perPage) {
108
- return __awaiter(this, void 0, void 0, function* () {
109
- if (resourceType === null || resourceType === undefined) {
110
- throw new Exceptions_1.ArgumentNullException('resourceType', 'listResourceActionsOfResourceTypeActionType');
111
- }
112
- if (resourceId === null || resourceId === undefined) {
113
- throw new Exceptions_1.ArgumentNullException('resourceId', 'listResourceActionsOfResourceTypeActionType');
114
- }
115
- if (actionType === null || actionType === undefined) {
116
- throw new Exceptions_1.ArgumentNullException('actionType', 'listResourceActionsOfResourceTypeActionType');
117
- }
118
- let queryString = '';
119
- const queryParams = { page: page, per_page: perPage, };
120
- for (const key in queryParams) {
121
- if (queryParams[key] === undefined || queryParams[key] === null) {
122
- continue;
123
- }
124
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
125
- }
126
- const requestUrl = '/actions/{resource_type}/{resource_id}/{action_type}' + (queryString ? `?${queryString}` : '');
127
- const response = yield this.get(requestUrl.replace(`{${"resource_type"}}`, encodeURIComponent(String(resourceType))).replace(`{${"resource_id"}}`, encodeURIComponent(String(resourceId))).replace(`{${"action_type"}}`, encodeURIComponent(String(actionType))));
128
- return new ApiResponse_1.ApiResponse(response);
129
- });
130
- }
131
69
  /**
132
70
  *
133
71
  * @summary Retry an action
@@ -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
  }
@@ -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
@@ -20,7 +20,7 @@ export declare class ResourceEventsApiService extends ApiBaseService {
20
20
  *
21
21
  * @summary Return a list of all events belonging to a resource
22
22
  * @param {string} resourceType The resource type to get related events
23
- * @param {number} resourceId Unique ID of the resource that is being searched
23
+ * @param {number} resourceId Unique ID of the resource that\&#39;s being searched
24
24
  * @param {number} [page] Number of the page to be retrieved
25
25
  * @param {number} [perPage] Number of items returned per page
26
26
  */
@@ -33,7 +33,7 @@ class ResourceEventsApiService extends ApiBaseService_1.ApiBaseService {
33
33
  *
34
34
  * @summary Return a list of all events belonging to a resource
35
35
  * @param {string} resourceType The resource type to get related events
36
- * @param {number} resourceId Unique ID of the resource that is being searched
36
+ * @param {number} resourceId Unique ID of the resource that\&#39;s being searched
37
37
  * @param {number} [page] Number of the page to be retrieved
38
38
  * @param {number} [perPage] Number of items returned per page
39
39
  */
@@ -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;
@@ -0,0 +1,90 @@
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
+ /**
13
+ * Informations about the commit used on this deployment
14
+ * @export
15
+ * @interface ActionDeploymentCommit
16
+ */
17
+ export interface ActionDeploymentCommit {
18
+ /**
19
+ * The ID of the source provider
20
+ * @type {number}
21
+ * @memberof ActionDeploymentCommit
22
+ */
23
+ source_provider_id: number;
24
+ /**
25
+ * The source provider\'s name
26
+ * @type {string}
27
+ * @memberof ActionDeploymentCommit
28
+ */
29
+ provider: string;
30
+ /**
31
+ * The repository of the deployed application
32
+ * @type {string}
33
+ * @memberof ActionDeploymentCommit
34
+ */
35
+ repository: string;
36
+ /**
37
+ * The branch used on deployment
38
+ * @type {string}
39
+ * @memberof ActionDeploymentCommit
40
+ */
41
+ branch: string;
42
+ /**
43
+ * The commit hash used on deployment
44
+ * @type {string}
45
+ * @memberof ActionDeploymentCommit
46
+ */
47
+ hash: string;
48
+ /**
49
+ * The commit message
50
+ * @type {string}
51
+ * @memberof ActionDeploymentCommit
52
+ */
53
+ message: string;
54
+ /**
55
+ * The author of the commit
56
+ * @type {string}
57
+ * @memberof ActionDeploymentCommit
58
+ */
59
+ author_name: string;
60
+ /**
61
+ * The commit author\'s email
62
+ * @type {string}
63
+ * @memberof ActionDeploymentCommit
64
+ */
65
+ author_email: string;
66
+ /**
67
+ * The date and time when the commit was created
68
+ * @type {string}
69
+ * @memberof ActionDeploymentCommit
70
+ */
71
+ committed_at: string;
72
+ /**
73
+ * The commit URL on the source provider
74
+ * @type {string}
75
+ * @memberof ActionDeploymentCommit
76
+ */
77
+ url: string;
78
+ /**
79
+ * The URL to clone the repository on the specific commit
80
+ * @type {string}
81
+ * @memberof ActionDeploymentCommit
82
+ */
83
+ clone_url: string;
84
+ /**
85
+ * The URL to download the commit source code
86
+ * @type {string}
87
+ * @memberof ActionDeploymentCommit
88
+ */
89
+ download_url: string;
90
+ }
@@ -0,0 +1,55 @@
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 { DeploymentType } from './deployment-type';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ActionDeploymentContent
17
+ */
18
+ export interface ActionDeploymentContent {
19
+ /**
20
+ * The ID of the source provider
21
+ * @type {number}
22
+ * @memberof ActionDeploymentContent
23
+ */
24
+ provider_id: number;
25
+ /**
26
+ * The source provider\'s name
27
+ * @type {string}
28
+ * @memberof ActionDeploymentContent
29
+ */
30
+ provider_name: string;
31
+ /**
32
+ *
33
+ * @type {DeploymentType}
34
+ * @memberof ActionDeploymentContent
35
+ */
36
+ type: DeploymentType;
37
+ /**
38
+ * The repository of the deployed application
39
+ * @type {string}
40
+ * @memberof ActionDeploymentContent
41
+ */
42
+ repository: string;
43
+ /**
44
+ * The branch used on deployment
45
+ * @type {string}
46
+ * @memberof ActionDeploymentContent
47
+ */
48
+ branch: string;
49
+ /**
50
+ * The commit hash defined to be used on deployment
51
+ * @type {string}
52
+ * @memberof ActionDeploymentContent
53
+ */
54
+ hash: string | null;
55
+ }