@devopness/sdk-js 1.101.0 → 1.103.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.
- package/README.md +2 -10
- package/dist/DevopnessApiClient.d.ts +0 -2
- package/dist/DevopnessApiClient.js +0 -2
- package/dist/api/generated/apis/actions-api.d.ts +6 -0
- package/dist/api/generated/apis/actions-api.js +16 -0
- package/dist/api/generated/apis/actions-resources-api.d.ts +39 -0
- package/dist/api/generated/apis/actions-resources-api.js +95 -0
- package/dist/api/generated/apis/applications-deployments-api.d.ts +3 -13
- package/dist/api/generated/apis/applications-deployments-api.js +3 -28
- package/dist/api/generated/apis/{projects-deployments-api.d.ts → environments-actions-api.d.ts} +7 -6
- package/dist/api/generated/apis/{projects-deployments-api.js → environments-actions-api.js} +15 -11
- package/dist/api/generated/apis/logs-api.d.ts +0 -7
- package/dist/api/generated/apis/logs-api.js +0 -20
- package/dist/api/generated/apis/projects-actions-api.d.ts +39 -0
- package/dist/api/generated/apis/projects-actions-api.js +95 -0
- package/dist/api/generated/models/{deployment-create.js → action-trigger-type.d.ts} +9 -3
- package/dist/api/generated/models/action-trigger-type.js +25 -0
- package/dist/api/generated/models/action-triggered-from.d.ts +73 -0
- package/dist/api/generated/models/{deployment-create-application.js → action-triggered-from.js} +0 -0
- package/dist/api/generated/models/action.d.ts +8 -1
- package/dist/api/generated/models/{deployment-create.d.ts → application-deployment.d.ts} +6 -6
- package/dist/api/generated/models/{deployment-create-server.js → application-deployment.js} +0 -0
- package/dist/api/generated/models/application-last-deployments.d.ts +5 -5
- package/dist/api/generated/models/cloud-service.d.ts +2 -2
- package/dist/api/generated/models/cloud-service.js +2 -2
- package/dist/api/generated/models/index.d.ts +3 -6
- package/dist/api/generated/models/index.js +3 -6
- package/dist/api/generated/models/resource.d.ts +2 -3
- package/dist/api/generated/models/script.d.ts +11 -4
- package/dist/api/generated/models/server-cloud-service-name.d.ts +2 -2
- package/dist/api/generated/models/server-cloud-service-name.js +2 -2
- package/dist/services/ActionService.d.ts +2 -0
- package/dist/services/ActionService.js +5 -0
- package/dist/services/ProjectService.d.ts +0 -2
- package/dist/services/ProjectService.js +0 -2
- package/package.json +3 -3
- package/LICENSE +0 -21
- package/dist/api/generated/apis/deployments-api.d.ts +0 -25
- package/dist/api/generated/apis/deployments-api.js +0 -49
- package/dist/api/generated/models/deployment-create-application.d.ts +0 -42
- package/dist/api/generated/models/deployment-create-server.d.ts +0 -30
- package/dist/api/generated/models/deployment-relation.d.ts +0 -103
- package/dist/api/generated/models/deployment-relation.js +0 -14
- package/dist/api/generated/models/deployment-step.d.ts +0 -61
- package/dist/api/generated/models/deployment-step.js +0 -14
- package/dist/api/generated/models/deployment.d.ts +0 -110
- package/dist/api/generated/models/deployment.js +0 -14
- package/dist/services/DeploymentService.d.ts +0 -3
- package/dist/services/DeploymentService.js +0 -7
package/README.md
CHANGED
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
# Devopness SDK - JavaScript
|
|
2
2
|
|
|
3
|
-
[](https://github.com/devopness/devopness-sdk-js/blob/master/LICENSE)
|
|
4
|
-

|
|
5
|
-
|
|
6
3
|
[](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
|
|
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
|
|
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';
|
|
@@ -31,7 +30,6 @@ export declare class DevopnessApiClient {
|
|
|
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");
|
|
@@ -39,7 +38,6 @@ class DevopnessApiClient {
|
|
|
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\'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\'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\'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\'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 {
|
|
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 {
|
|
23
|
+
* @param {ApplicationDeployment} [applicationDeployment] A JSON object containing deployment parameters
|
|
26
24
|
*/
|
|
27
|
-
deployApplication(applicationId: number,
|
|
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 {
|
|
36
|
+
* @param {ApplicationDeployment} [applicationDeployment] A JSON object containing deployment parameters
|
|
37
37
|
*/
|
|
38
|
-
deployApplication(applicationId,
|
|
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))),
|
|
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
|
}
|
package/dist/api/generated/apis/{projects-deployments-api.d.ts → environments-actions-api.d.ts}
RENAMED
|
@@ -11,17 +11,18 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { ApiBaseService } from "../../../services/ApiBaseService";
|
|
13
13
|
import { ApiResponse } from "../../../common/ApiResponse";
|
|
14
|
-
import {
|
|
14
|
+
import { ActionListItem } from '../../generated/models';
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* EnvironmentsActionsApiService - Auto-generated
|
|
17
17
|
*/
|
|
18
|
-
export declare class
|
|
18
|
+
export declare class EnvironmentsActionsApiService extends ApiBaseService {
|
|
19
19
|
/**
|
|
20
20
|
*
|
|
21
|
-
* @summary
|
|
22
|
-
* @param {number}
|
|
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
|
-
|
|
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.
|
|
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
|
-
*
|
|
29
|
+
* EnvironmentsActionsApiService - Auto-generated
|
|
30
30
|
*/
|
|
31
|
-
class
|
|
31
|
+
class EnvironmentsActionsApiService extends ApiBaseService_1.ApiBaseService {
|
|
32
32
|
/**
|
|
33
33
|
*
|
|
34
|
-
* @summary
|
|
35
|
-
* @param {number}
|
|
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
|
-
|
|
40
|
+
listEnvironmentActionsOfResourceType(environmentId, resourceType, page, perPage) {
|
|
40
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
if (
|
|
42
|
-
throw new Exceptions_1.ArgumentNullException('
|
|
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 = '/
|
|
53
|
-
const response = yield this.get(requestUrl.replace(`{${"
|
|
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.
|
|
62
|
+
exports.EnvironmentsActionsApiService = EnvironmentsActionsApiService;
|
|
@@ -31,13 +31,6 @@ export declare class LogsApiService extends ApiBaseService {
|
|
|
31
31
|
* @param {number} actionStepOrder Step\'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;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* eslint-disable */
|
|
3
1
|
/**
|
|
4
2
|
* devopness API
|
|
5
3
|
* Devopness API - Painless essential DevOps to everyone
|
|
@@ -11,4 +9,12 @@
|
|
|
11
9
|
* https://openapi-generator.tech
|
|
12
10
|
* Do not edit the class manually.
|
|
13
11
|
*/
|
|
14
|
-
|
|
12
|
+
/**
|
|
13
|
+
* * `hook`: the action have been triggered by an `incoming hook`. * `manual`: the action have been manually triggered.
|
|
14
|
+
* @export
|
|
15
|
+
* @enum {string}
|
|
16
|
+
*/
|
|
17
|
+
export declare enum ActionTriggerType {
|
|
18
|
+
Hook = "hook",
|
|
19
|
+
Manual = "manual"
|
|
20
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
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 });
|
|
15
|
+
exports.ActionTriggerType = void 0;
|
|
16
|
+
/**
|
|
17
|
+
* * `hook`: the action have been triggered by an `incoming hook`. * `manual`: the action have been manually triggered.
|
|
18
|
+
* @export
|
|
19
|
+
* @enum {string}
|
|
20
|
+
*/
|
|
21
|
+
var ActionTriggerType;
|
|
22
|
+
(function (ActionTriggerType) {
|
|
23
|
+
ActionTriggerType["Hook"] = "hook";
|
|
24
|
+
ActionTriggerType["Manual"] = "manual";
|
|
25
|
+
})(ActionTriggerType = exports.ActionTriggerType || (exports.ActionTriggerType = {}));
|