@devopness/sdk-js 1.102.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/dist/DevopnessApiClient.d.ts +0 -2
- package/dist/DevopnessApiClient.js +0 -2
- package/dist/api/generated/apis/actions-api.d.ts +0 -20
- package/dist/api/generated/apis/actions-api.js +0 -62
- 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/logs-api.d.ts +0 -7
- package/dist/api/generated/apis/logs-api.js +0 -20
- package/dist/api/generated/apis/resource-events-api.d.ts +1 -1
- package/dist/api/generated/apis/resource-events-api.js +1 -1
- 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/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/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 +1 -1
- 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/apis/projects-deployments-api.d.ts +0 -27
- package/dist/api/generated/apis/projects-deployments-api.js +0 -58
- 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
|
@@ -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();
|
|
@@ -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\'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
|
}
|
|
@@ -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
|
|
@@ -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
|
|
23
|
+
* @param {number} resourceId Unique ID of the resource that\'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
|
|
36
|
+
* @param {number} resourceId Unique ID of the resource that\'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
|
*/
|
|
@@ -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 = {}));
|
|
@@ -0,0 +1,73 @@
|
|
|
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 { ActionTriggerType } from './action-trigger-type';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ActionTriggeredFrom
|
|
17
|
+
*/
|
|
18
|
+
export interface ActionTriggeredFrom {
|
|
19
|
+
/**
|
|
20
|
+
* The HTTP origin of the request that have been dispatched the action.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof ActionTriggeredFrom
|
|
23
|
+
*/
|
|
24
|
+
origin: string | null;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {ActionTriggerType}
|
|
28
|
+
* @memberof ActionTriggeredFrom
|
|
29
|
+
*/
|
|
30
|
+
trigger_type: ActionTriggerType;
|
|
31
|
+
/**
|
|
32
|
+
* The hook or user name that have been triggered the action.
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof ActionTriggeredFrom
|
|
35
|
+
*/
|
|
36
|
+
name: string;
|
|
37
|
+
/**
|
|
38
|
+
* The user\'s email if the action have been manually triggered.
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof ActionTriggeredFrom
|
|
41
|
+
*/
|
|
42
|
+
email: string | null;
|
|
43
|
+
/**
|
|
44
|
+
* The IP address of the request origin.
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof ActionTriggeredFrom
|
|
47
|
+
*/
|
|
48
|
+
ip_address: string;
|
|
49
|
+
/**
|
|
50
|
+
* The user\'s ID if the action have been manually triggered.
|
|
51
|
+
* @type {number}
|
|
52
|
+
* @memberof ActionTriggeredFrom
|
|
53
|
+
*/
|
|
54
|
+
user_id: number | null;
|
|
55
|
+
/**
|
|
56
|
+
* The hook\'s ID if the action have been triggered by a hook.
|
|
57
|
+
* @type {number}
|
|
58
|
+
* @memberof ActionTriggeredFrom
|
|
59
|
+
*/
|
|
60
|
+
hook_id: number | null;
|
|
61
|
+
/**
|
|
62
|
+
* The hook request\'s ID if the action have been triggered by a hook.
|
|
63
|
+
* @type {number}
|
|
64
|
+
* @memberof ActionTriggeredFrom
|
|
65
|
+
*/
|
|
66
|
+
hook_request_id: number | null;
|
|
67
|
+
/**
|
|
68
|
+
* The value defined has pull request ID on triggering a deployment.
|
|
69
|
+
* @type {number}
|
|
70
|
+
* @memberof ActionTriggeredFrom
|
|
71
|
+
*/
|
|
72
|
+
pull_request_id: number | null;
|
|
73
|
+
}
|
package/dist/api/generated/models/{deployment-create-application.js → action-triggered-from.js}
RENAMED
|
File without changes
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import { ActionHookRequest } from './action-hook-request';
|
|
13
13
|
import { ActionStatus } from './action-status';
|
|
14
14
|
import { ActionSummary } from './action-summary';
|
|
15
|
+
import { ActionTriggeredFrom } from './action-triggered-from';
|
|
15
16
|
import { ActionType } from './action-type';
|
|
16
17
|
import { EnvironmentRelation } from './environment-relation';
|
|
17
18
|
import { ProjectRelation } from './project-relation';
|
|
@@ -78,12 +79,18 @@ export interface Action {
|
|
|
78
79
|
* @memberof Action
|
|
79
80
|
*/
|
|
80
81
|
environment?: EnvironmentRelation;
|
|
82
|
+
/**
|
|
83
|
+
*
|
|
84
|
+
* @type {ActionTriggeredFrom}
|
|
85
|
+
* @memberof Action
|
|
86
|
+
*/
|
|
87
|
+
triggered_from: ActionTriggeredFrom;
|
|
81
88
|
/**
|
|
82
89
|
*
|
|
83
90
|
* @type {UserRelation}
|
|
84
91
|
* @memberof Action
|
|
85
92
|
*/
|
|
86
|
-
triggered_by_user
|
|
93
|
+
triggered_by_user?: UserRelation;
|
|
87
94
|
/**
|
|
88
95
|
*
|
|
89
96
|
* @type {ProjectRelation}
|
|
@@ -13,31 +13,31 @@ import { DeploymentType } from './deployment-type';
|
|
|
13
13
|
/**
|
|
14
14
|
*
|
|
15
15
|
* @export
|
|
16
|
-
* @interface
|
|
16
|
+
* @interface ApplicationDeployment
|
|
17
17
|
*/
|
|
18
|
-
export interface
|
|
18
|
+
export interface ApplicationDeployment {
|
|
19
19
|
/**
|
|
20
20
|
*
|
|
21
21
|
* @type {DeploymentType}
|
|
22
|
-
* @memberof
|
|
22
|
+
* @memberof ApplicationDeployment
|
|
23
23
|
*/
|
|
24
24
|
type: DeploymentType;
|
|
25
25
|
/**
|
|
26
26
|
* The name of the branch from which the application source code will be retrieved and deployed. This parameter is ignored when `hash` is provided.
|
|
27
27
|
* @type {string}
|
|
28
|
-
* @memberof
|
|
28
|
+
* @memberof ApplicationDeployment
|
|
29
29
|
*/
|
|
30
30
|
branch: string;
|
|
31
31
|
/**
|
|
32
32
|
* The commit hash from which the application source code will be retrieved and deployed. When provided `branch` parameter is ignored
|
|
33
33
|
* @type {string}
|
|
34
|
-
* @memberof
|
|
34
|
+
* @memberof ApplicationDeployment
|
|
35
35
|
*/
|
|
36
36
|
hash?: string;
|
|
37
37
|
/**
|
|
38
38
|
* List of servers ids that the deploy will be triggered to
|
|
39
39
|
* @type {Array<number>}
|
|
40
|
-
* @memberof
|
|
40
|
+
* @memberof ApplicationDeployment
|
|
41
41
|
*/
|
|
42
42
|
servers?: Array<number>;
|
|
43
43
|
}
|
|
File without changes
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
12
|
+
import { Action } from './action';
|
|
13
13
|
/**
|
|
14
14
|
* Latest deployment created to application and the more recent completed deployment
|
|
15
15
|
* @export
|
|
@@ -18,14 +18,14 @@ import { DeploymentRelation } from './deployment-relation';
|
|
|
18
18
|
export interface ApplicationLastDeployments {
|
|
19
19
|
/**
|
|
20
20
|
*
|
|
21
|
-
* @type {
|
|
21
|
+
* @type {Action}
|
|
22
22
|
* @memberof ApplicationLastDeployments
|
|
23
23
|
*/
|
|
24
|
-
latest?:
|
|
24
|
+
latest?: Action | null;
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
|
-
* @type {
|
|
27
|
+
* @type {Action}
|
|
28
28
|
* @memberof ApplicationLastDeployments
|
|
29
29
|
*/
|
|
30
|
-
live?:
|
|
30
|
+
live?: Action | null;
|
|
31
31
|
}
|