@devopness/sdk-js 2.22.1 → 2.24.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 +2 -4
- package/dist/DevopnessApiClient.js +2 -4
- package/dist/api/generated/apis/actions-api.d.ts +16 -5
- package/dist/api/generated/apis/actions-api.js +35 -2
- package/dist/api/generated/apis/actions-resources-api.d.ts +0 -11
- package/dist/api/generated/apis/actions-resources-api.js +0 -33
- package/dist/api/generated/apis/applications-api.d.ts +4 -4
- package/dist/api/generated/apis/applications-api.js +4 -4
- package/dist/api/generated/apis/applications-hooks-api.d.ts +5 -3
- package/dist/api/generated/apis/applications-hooks-api.js +12 -3
- package/dist/api/generated/apis/environments-api.d.ts +4 -4
- package/dist/api/generated/apis/environments-api.js +4 -4
- package/dist/api/generated/apis/environments-teams-api.d.ts +34 -0
- package/dist/api/generated/apis/environments-teams-api.js +77 -0
- package/dist/api/generated/apis/hook-requests-api.d.ts +25 -0
- package/dist/api/generated/apis/hook-requests-api.js +49 -0
- package/dist/api/generated/apis/hooks-api.d.ts +56 -0
- package/dist/api/generated/apis/hooks-api.js +133 -0
- package/dist/api/generated/apis/hooks-requests-api.d.ts +7 -17
- package/dist/api/generated/apis/hooks-requests-api.js +18 -37
- package/dist/api/generated/apis/pipelines-api.d.ts +10 -0
- package/dist/api/generated/apis/pipelines-api.js +29 -0
- package/dist/api/generated/apis/projects-api.d.ts +8 -8
- package/dist/api/generated/apis/projects-api.js +8 -8
- package/dist/api/generated/apis/roles-api.d.ts +6 -6
- package/dist/api/generated/apis/roles-api.js +6 -6
- package/dist/api/generated/apis/servers-api.d.ts +6 -6
- package/dist/api/generated/apis/servers-api.js +4 -4
- package/dist/api/generated/apis/services-variables-api.d.ts +36 -0
- package/dist/api/generated/apis/{pipelines-resources-api.js → services-variables-api.js} +31 -15
- package/dist/api/generated/apis/teams-api.d.ts +4 -20
- package/dist/api/generated/apis/teams-api.js +4 -48
- package/dist/api/generated/apis/teams-members-api.d.ts +8 -8
- package/dist/api/generated/apis/teams-members-api.js +16 -16
- package/dist/api/generated/apis/users-api.d.ts +1 -1
- package/dist/api/generated/apis/users-api.js +2 -2
- package/dist/api/generated/models/action-relation.d.ts +31 -4
- package/dist/api/generated/models/action-retry-response.d.ts +7 -1
- package/dist/api/generated/models/action-step-log.d.ts +1 -1
- package/dist/api/generated/models/action.d.ts +28 -22
- package/dist/api/generated/models/application-environment-create.d.ts +4 -3
- package/dist/api/generated/models/application-last-deployments.d.ts +5 -5
- package/dist/api/generated/models/application-project-create.d.ts +4 -3
- package/dist/api/generated/models/application-relation.d.ts +40 -41
- package/dist/api/generated/models/application-update.d.ts +50 -45
- package/dist/api/generated/models/application.d.ts +53 -48
- package/dist/api/generated/models/cron-job.d.ts +1 -1
- package/dist/api/generated/models/daemon.d.ts +1 -1
- package/dist/api/generated/models/environment.d.ts +3 -3
- package/dist/api/generated/models/hook-create.d.ts +84 -0
- package/dist/api/generated/models/{application-last-deployment.js → hook-create.js} +0 -0
- package/dist/api/generated/models/{hook-incoming-setting.d.ts → hook-incoming-settings.d.ts} +3 -3
- package/dist/api/generated/models/{hook-incoming-create.js → hook-incoming-settings.js} +0 -0
- package/dist/api/generated/models/hook-incoming-trigger-when-condition-type.d.ts +1 -1
- package/dist/api/generated/models/hook-incoming-trigger-when-condition-type.js +1 -1
- package/dist/api/generated/models/{hook-outgoing-setting.d.ts → hook-outgoing-settings.d.ts} +4 -4
- package/dist/api/generated/models/{hook-incoming-params.js → hook-outgoing-settings.js} +0 -0
- package/dist/api/generated/models/hook-outgoing-trigger-when-condition-type.d.ts +1 -1
- package/dist/api/generated/models/hook-outgoing-trigger-when-condition-type.js +1 -1
- package/dist/api/generated/models/hook-outgoing-trigger-when-condition.d.ts +1 -1
- package/dist/api/generated/models/hook-relation.d.ts +42 -35
- package/dist/api/generated/models/hook-request.d.ts +10 -10
- package/dist/api/generated/models/hook-update.d.ts +84 -0
- package/dist/api/generated/models/{hook-incoming-setting.js → hook-update.js} +0 -0
- package/dist/api/generated/models/hook-variable.d.ts +3 -3
- package/dist/api/generated/models/hook.d.ts +68 -22
- package/dist/api/generated/models/index.d.ts +9 -12
- package/dist/api/generated/models/index.js +9 -12
- package/dist/api/generated/models/invitation-relation.d.ts +2 -2
- package/dist/api/generated/models/invitation.d.ts +1 -1
- package/dist/api/generated/models/member-relation.d.ts +5 -11
- package/dist/api/generated/models/member.d.ts +13 -7
- package/dist/api/generated/models/request-relation.d.ts +60 -0
- package/dist/api/generated/models/{hook-incoming-update.js → request-relation.js} +0 -0
- package/dist/api/generated/models/{hook-incoming.d.ts → server-command.d.ts} +10 -4
- package/dist/api/generated/models/{hook-incoming.js → server-command.js} +0 -0
- package/dist/api/generated/models/server.d.ts +1 -1
- package/dist/api/generated/models/service.d.ts +1 -1
- package/dist/api/generated/models/subscription-plan.d.ts +30 -0
- package/dist/api/generated/models/{hook-outgoing-create.js → subscription-plan.js} +0 -0
- package/dist/api/generated/models/team-invitation-relation.d.ts +2 -2
- package/dist/api/generated/models/team-invitation.d.ts +2 -2
- package/dist/api/generated/models/team-membership-relation.d.ts +1 -1
- package/dist/api/generated/models/team.d.ts +1 -1
- package/dist/api/generated/models/{user-current.d.ts → user-me.d.ts} +18 -11
- package/dist/api/generated/models/{hook-outgoing-params.js → user-me.js} +0 -0
- package/dist/api/generated/models/user-update.d.ts +6 -0
- package/dist/api/generated/models/user.d.ts +7 -0
- package/dist/api/generated/models/variable-application-create.d.ts +0 -12
- package/dist/api/generated/models/variable-relation.d.ts +0 -6
- package/dist/api/generated/models/variable-service-create.d.ts +56 -0
- package/dist/api/generated/models/{hook-outgoing-setting.js → variable-service-create.js} +0 -0
- package/dist/api/generated/models/variable.d.ts +0 -6
- package/dist/services/EnvironmentService.d.ts +2 -0
- package/dist/services/EnvironmentService.js +2 -0
- package/dist/services/HookRequestService.d.ts +2 -2
- package/dist/services/HookRequestService.js +2 -2
- package/dist/services/HookService.d.ts +5 -0
- package/dist/services/HookService.js +12 -0
- package/dist/services/PipelineService.d.ts +0 -2
- package/dist/services/PipelineService.js +0 -2
- package/dist/services/ServiceService.d.ts +2 -0
- package/dist/services/ServiceService.js +5 -0
- package/dist/services/index.d.ts +1 -2
- package/dist/services/index.js +1 -2
- package/package.json +3 -3
- package/dist/api/generated/apis/hooks-incoming-api.d.ts +0 -53
- package/dist/api/generated/apis/hooks-incoming-api.js +0 -118
- package/dist/api/generated/apis/hooks-outgoing-api.d.ts +0 -46
- package/dist/api/generated/apis/hooks-outgoing-api.js +0 -101
- package/dist/api/generated/apis/pipelines-resources-api.d.ts +0 -28
- package/dist/api/generated/models/application-last-deployment.d.ts +0 -130
- package/dist/api/generated/models/hook-incoming-create.d.ts +0 -82
- package/dist/api/generated/models/hook-incoming-params.d.ts +0 -38
- package/dist/api/generated/models/hook-incoming-update.d.ts +0 -68
- package/dist/api/generated/models/hook-outgoing-create.d.ts +0 -70
- package/dist/api/generated/models/hook-outgoing-params.d.ts +0 -38
- package/dist/api/generated/models/hook-outgoing-update.d.ts +0 -76
- package/dist/api/generated/models/hook-outgoing-update.js +0 -14
- package/dist/api/generated/models/hook-outgoing.d.ts +0 -18
- package/dist/api/generated/models/hook-outgoing.js +0 -14
- package/dist/api/generated/models/user-current.js +0 -14
- package/dist/services/HookIncomingService.d.ts +0 -3
- package/dist/services/HookIncomingService.js +0 -7
- package/dist/services/HookOutgoingService.d.ts +0 -3
- package/dist/services/HookOutgoingService.js +0 -7
|
@@ -0,0 +1,133 @@
|
|
|
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.HooksApiService = 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
|
+
* HooksApiService - Auto-generated
|
|
30
|
+
*/
|
|
31
|
+
class HooksApiService extends ApiBaseService_1.ApiBaseService {
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @summary Create a hook to a specific resource
|
|
35
|
+
* @param {string} hookType The hook type.
|
|
36
|
+
* @param {HookCreate} hookCreate A JSON object containing the resource data
|
|
37
|
+
*/
|
|
38
|
+
addHook(hookType, hookCreate) {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
if (hookType === null || hookType === undefined) {
|
|
41
|
+
throw new Exceptions_1.ArgumentNullException('hookType', 'addHook');
|
|
42
|
+
}
|
|
43
|
+
if (hookCreate === null || hookCreate === undefined) {
|
|
44
|
+
throw new Exceptions_1.ArgumentNullException('hookCreate', 'addHook');
|
|
45
|
+
}
|
|
46
|
+
let queryString = '';
|
|
47
|
+
const requestUrl = '/hooks/{hook_type}' + (queryString ? `?${queryString}` : '');
|
|
48
|
+
const response = yield this.post(requestUrl.replace(`{${"hook_type"}}`, encodeURIComponent(String(hookType))), hookCreate);
|
|
49
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @summary Delete a given hook
|
|
55
|
+
* @param {string} hookId The ID of the hook.
|
|
56
|
+
* @param {string} hookType The hook type.
|
|
57
|
+
*/
|
|
58
|
+
deleteHook(hookId, hookType) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
if (hookId === null || hookId === undefined) {
|
|
61
|
+
throw new Exceptions_1.ArgumentNullException('hookId', 'deleteHook');
|
|
62
|
+
}
|
|
63
|
+
if (hookType === null || hookType === undefined) {
|
|
64
|
+
throw new Exceptions_1.ArgumentNullException('hookType', 'deleteHook');
|
|
65
|
+
}
|
|
66
|
+
let queryString = '';
|
|
67
|
+
const requestUrl = '/hooks/{hook_type}/{hook_id}' + (queryString ? `?${queryString}` : '');
|
|
68
|
+
const response = yield this.delete(requestUrl.replace(`{${"hook_id"}}`, encodeURIComponent(String(hookId))).replace(`{${"hook_type"}}`, encodeURIComponent(String(hookType))));
|
|
69
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @summary Get a hook by ID
|
|
75
|
+
* @param {string} hookId The ID of the hook.
|
|
76
|
+
* @param {string} hookType The hook type.
|
|
77
|
+
*/
|
|
78
|
+
getHook(hookId, hookType) {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
if (hookId === null || hookId === undefined) {
|
|
81
|
+
throw new Exceptions_1.ArgumentNullException('hookId', 'getHook');
|
|
82
|
+
}
|
|
83
|
+
if (hookType === null || hookType === undefined) {
|
|
84
|
+
throw new Exceptions_1.ArgumentNullException('hookType', 'getHook');
|
|
85
|
+
}
|
|
86
|
+
let queryString = '';
|
|
87
|
+
const requestUrl = '/hooks/{hook_type}/{hook_id}' + (queryString ? `?${queryString}` : '');
|
|
88
|
+
const response = yield this.get(requestUrl.replace(`{${"hook_id"}}`, encodeURIComponent(String(hookId))).replace(`{${"hook_type"}}`, encodeURIComponent(String(hookType))));
|
|
89
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
* @summary Trigger an incoming hook associated action
|
|
95
|
+
* @param {string} hookId The ID of the hook.
|
|
96
|
+
*/
|
|
97
|
+
triggerHook(hookId) {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
if (hookId === null || hookId === undefined) {
|
|
100
|
+
throw new Exceptions_1.ArgumentNullException('hookId', 'triggerHook');
|
|
101
|
+
}
|
|
102
|
+
let queryString = '';
|
|
103
|
+
const requestUrl = '/hooks/{hook_id}/trigger' + (queryString ? `?${queryString}` : '');
|
|
104
|
+
const response = yield this.post(requestUrl.replace(`{${"hook_id"}}`, encodeURIComponent(String(hookId))));
|
|
105
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @summary Update an existing hook
|
|
111
|
+
* @param {string} hookId The ID of the hook.
|
|
112
|
+
* @param {string} hookType The hook type.
|
|
113
|
+
* @param {HookUpdate} hookUpdate A JSON object containing the resource data
|
|
114
|
+
*/
|
|
115
|
+
updateHook(hookId, hookType, hookUpdate) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
if (hookId === null || hookId === undefined) {
|
|
118
|
+
throw new Exceptions_1.ArgumentNullException('hookId', 'updateHook');
|
|
119
|
+
}
|
|
120
|
+
if (hookType === null || hookType === undefined) {
|
|
121
|
+
throw new Exceptions_1.ArgumentNullException('hookType', 'updateHook');
|
|
122
|
+
}
|
|
123
|
+
if (hookUpdate === null || hookUpdate === undefined) {
|
|
124
|
+
throw new Exceptions_1.ArgumentNullException('hookUpdate', 'updateHook');
|
|
125
|
+
}
|
|
126
|
+
let queryString = '';
|
|
127
|
+
const requestUrl = '/hooks/{hook_type}/{hook_id}' + (queryString ? `?${queryString}` : '');
|
|
128
|
+
const response = yield this.put(requestUrl.replace(`{${"hook_id"}}`, encodeURIComponent(String(hookId))).replace(`{${"hook_type"}}`, encodeURIComponent(String(hookType))), hookUpdate);
|
|
129
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
exports.HooksApiService = HooksApiService;
|
|
@@ -11,28 +11,18 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { ApiBaseService } from "../../../services/ApiBaseService";
|
|
13
13
|
import { ApiResponse } from "../../../common/ApiResponse";
|
|
14
|
-
import {
|
|
15
|
-
import { HookRequestRelation } from '../../generated/models';
|
|
14
|
+
import { RequestRelation } from '../../generated/models';
|
|
16
15
|
/**
|
|
17
16
|
* HooksRequestsApiService - Auto-generated
|
|
18
17
|
*/
|
|
19
18
|
export declare class HooksRequestsApiService extends ApiBaseService {
|
|
20
19
|
/**
|
|
21
20
|
*
|
|
22
|
-
* @summary
|
|
23
|
-
* @param {string}
|
|
21
|
+
* @summary Returns a list of all hook requests belonging to a hook
|
|
22
|
+
* @param {string} hookId The ID of the hook.
|
|
23
|
+
* @param {string} hookType The hook type.
|
|
24
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
25
|
+
* @param {number} [perPage] Number of items returned per page
|
|
24
26
|
*/
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* @summary Returns a list of all hook requests belonging to an incoming hook
|
|
29
|
-
* @param {string} hookIncomingId Unique ID of the incoming hook to retrieve request list
|
|
30
|
-
*/
|
|
31
|
-
listIncomingHookRequests(hookIncomingId: string): Promise<ApiResponse<Array<HookRequestRelation>>>;
|
|
32
|
-
/**
|
|
33
|
-
*
|
|
34
|
-
* @summary Returns a list of all hook requests belonging to an outgoing hook
|
|
35
|
-
* @param {string} hookOutgoingId Unique ID of the outgoing hook to retrieve request list
|
|
36
|
-
*/
|
|
37
|
-
listOutgoingHookRequests(hookOutgoingId: string): Promise<ApiResponse<Array<HookRequestRelation>>>;
|
|
27
|
+
listHookRequestsByHookType(hookId: string, hookType: string, page?: number, perPage?: number): Promise<ApiResponse<Array<RequestRelation>>>;
|
|
38
28
|
}
|
|
@@ -31,49 +31,30 @@ const Exceptions_1 = require("../../../common/Exceptions");
|
|
|
31
31
|
class HooksRequestsApiService extends ApiBaseService_1.ApiBaseService {
|
|
32
32
|
/**
|
|
33
33
|
*
|
|
34
|
-
* @summary
|
|
35
|
-
* @param {string}
|
|
34
|
+
* @summary Returns a list of all hook requests belonging to a hook
|
|
35
|
+
* @param {string} hookId The ID of the hook.
|
|
36
|
+
* @param {string} hookType The hook type.
|
|
37
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
38
|
+
* @param {number} [perPage] Number of items returned per page
|
|
36
39
|
*/
|
|
37
|
-
|
|
40
|
+
listHookRequestsByHookType(hookId, hookType, page, perPage) {
|
|
38
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
if (
|
|
40
|
-
throw new Exceptions_1.ArgumentNullException('
|
|
42
|
+
if (hookId === null || hookId === undefined) {
|
|
43
|
+
throw new Exceptions_1.ArgumentNullException('hookId', 'listHookRequestsByHookType');
|
|
41
44
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const response = yield this.get(requestUrl.replace(`{${"hook_request_id"}}`, encodeURIComponent(String(hookRequestId))));
|
|
45
|
-
return new ApiResponse_1.ApiResponse(response);
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
*
|
|
50
|
-
* @summary Returns a list of all hook requests belonging to an incoming hook
|
|
51
|
-
* @param {string} hookIncomingId Unique ID of the incoming hook to retrieve request list
|
|
52
|
-
*/
|
|
53
|
-
listIncomingHookRequests(hookIncomingId) {
|
|
54
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
-
if (hookIncomingId === null || hookIncomingId === undefined) {
|
|
56
|
-
throw new Exceptions_1.ArgumentNullException('hookIncomingId', 'listIncomingHookRequests');
|
|
45
|
+
if (hookType === null || hookType === undefined) {
|
|
46
|
+
throw new Exceptions_1.ArgumentNullException('hookType', 'listHookRequestsByHookType');
|
|
57
47
|
}
|
|
58
48
|
let queryString = '';
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
*
|
|
66
|
-
* @summary Returns a list of all hook requests belonging to an outgoing hook
|
|
67
|
-
* @param {string} hookOutgoingId Unique ID of the outgoing hook to retrieve request list
|
|
68
|
-
*/
|
|
69
|
-
listOutgoingHookRequests(hookOutgoingId) {
|
|
70
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
71
|
-
if (hookOutgoingId === null || hookOutgoingId === undefined) {
|
|
72
|
-
throw new Exceptions_1.ArgumentNullException('hookOutgoingId', 'listOutgoingHookRequests');
|
|
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])}`;
|
|
73
55
|
}
|
|
74
|
-
|
|
75
|
-
const
|
|
76
|
-
const response = yield this.get(requestUrl.replace(`{${"hook_outgoing_id"}}`, encodeURIComponent(String(hookOutgoingId))));
|
|
56
|
+
const requestUrl = '/hooks/{hook_type}/{hook_id}/requests' + (queryString ? `?${queryString}` : '');
|
|
57
|
+
const response = yield this.get(requestUrl.replace(`{${"hook_id"}}`, encodeURIComponent(String(hookId))).replace(`{${"hook_type"}}`, encodeURIComponent(String(hookType))));
|
|
77
58
|
return new ApiResponse_1.ApiResponse(response);
|
|
78
59
|
});
|
|
79
60
|
}
|
|
@@ -13,6 +13,7 @@ import { ApiBaseService } from "../../../services/ApiBaseService";
|
|
|
13
13
|
import { ApiResponse } from "../../../common/ApiResponse";
|
|
14
14
|
import { Pipeline } from '../../generated/models';
|
|
15
15
|
import { PipelineCreate } from '../../generated/models';
|
|
16
|
+
import { PipelineRelation } from '../../generated/models';
|
|
16
17
|
import { PipelineUpdate } from '../../generated/models';
|
|
17
18
|
/**
|
|
18
19
|
* PipelinesApiService - Auto-generated
|
|
@@ -38,6 +39,15 @@ export declare class PipelinesApiService extends ApiBaseService {
|
|
|
38
39
|
* @param {number} pipelineId The ID of the pipeline.
|
|
39
40
|
*/
|
|
40
41
|
getPipeline(pipelineId: number): Promise<ApiResponse<Pipeline>>;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @summary Return a list of pipelines to a resource
|
|
45
|
+
* @param {number} resourceId The resource ID.
|
|
46
|
+
* @param {string} resourceType The resource type to get pipelines from.
|
|
47
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
48
|
+
* @param {number} [perPage] Number of items returned per page
|
|
49
|
+
*/
|
|
50
|
+
listPipelinesByResourceType(resourceId: number, resourceType: string, page?: number, perPage?: number): Promise<ApiResponse<Array<PipelineRelation>>>;
|
|
41
51
|
/**
|
|
42
52
|
*
|
|
43
53
|
* @summary Update an existing Pipeline
|
|
@@ -85,6 +85,35 @@ class PipelinesApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
85
85
|
return new ApiResponse_1.ApiResponse(response);
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
*
|
|
90
|
+
* @summary Return a list of pipelines to a resource
|
|
91
|
+
* @param {number} resourceId The resource ID.
|
|
92
|
+
* @param {string} resourceType The resource type to get pipelines from.
|
|
93
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
94
|
+
* @param {number} [perPage] Number of items returned per page
|
|
95
|
+
*/
|
|
96
|
+
listPipelinesByResourceType(resourceId, resourceType, page, perPage) {
|
|
97
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
if (resourceId === null || resourceId === undefined) {
|
|
99
|
+
throw new Exceptions_1.ArgumentNullException('resourceId', 'listPipelinesByResourceType');
|
|
100
|
+
}
|
|
101
|
+
if (resourceType === null || resourceType === undefined) {
|
|
102
|
+
throw new Exceptions_1.ArgumentNullException('resourceType', 'listPipelinesByResourceType');
|
|
103
|
+
}
|
|
104
|
+
let queryString = '';
|
|
105
|
+
const queryParams = { page: page, per_page: perPage, };
|
|
106
|
+
for (const key in queryParams) {
|
|
107
|
+
if (queryParams[key] === undefined || queryParams[key] === null) {
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
|
|
111
|
+
}
|
|
112
|
+
const requestUrl = '/pipelines/{resource_type}/{resource_id}' + (queryString ? `?${queryString}` : '');
|
|
113
|
+
const response = yield this.get(requestUrl.replace(`{${"resource_id"}}`, encodeURIComponent(String(resourceId))).replace(`{${"resource_type"}}`, encodeURIComponent(String(resourceType))));
|
|
114
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
88
117
|
/**
|
|
89
118
|
*
|
|
90
119
|
* @summary Update an existing Pipeline
|
|
@@ -21,28 +21,28 @@ import { ProjectUpdate } from '../../generated/models';
|
|
|
21
21
|
export declare class ProjectsApiService extends ApiBaseService {
|
|
22
22
|
/**
|
|
23
23
|
*
|
|
24
|
-
* @summary Create a
|
|
25
|
-
* @param {ProjectCreate} projectCreate A JSON object containing
|
|
24
|
+
* @summary Create a project
|
|
25
|
+
* @param {ProjectCreate} projectCreate A JSON object containing the resource data
|
|
26
26
|
*/
|
|
27
27
|
addProject(projectCreate: ProjectCreate): Promise<ApiResponse<Project>>;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
|
-
* @summary Get a
|
|
31
|
-
* @param {number} projectId
|
|
30
|
+
* @summary Get a Project by ID
|
|
31
|
+
* @param {number} projectId The ID of the project.
|
|
32
32
|
*/
|
|
33
33
|
getProject(projectId: number): Promise<ApiResponse<Project>>;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
|
-
* @summary
|
|
36
|
+
* @summary Return a list of all projects the current user has access to
|
|
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
|
*/
|
|
40
40
|
listProjects(page?: number, perPage?: number): Promise<ApiResponse<Array<ProjectRelation>>>;
|
|
41
41
|
/**
|
|
42
42
|
*
|
|
43
|
-
* @summary Update an existing
|
|
44
|
-
* @param {number} projectId
|
|
45
|
-
* @param {ProjectUpdate} projectUpdate A JSON object containing
|
|
43
|
+
* @summary Update an existing Project
|
|
44
|
+
* @param {number} projectId The ID of the project.
|
|
45
|
+
* @param {ProjectUpdate} projectUpdate A JSON object containing the resource data
|
|
46
46
|
*/
|
|
47
47
|
updateProject(projectId: number, projectUpdate: ProjectUpdate): Promise<ApiResponse<void>>;
|
|
48
48
|
}
|
|
@@ -31,8 +31,8 @@ const Exceptions_1 = require("../../../common/Exceptions");
|
|
|
31
31
|
class ProjectsApiService extends ApiBaseService_1.ApiBaseService {
|
|
32
32
|
/**
|
|
33
33
|
*
|
|
34
|
-
* @summary Create a
|
|
35
|
-
* @param {ProjectCreate} projectCreate A JSON object containing
|
|
34
|
+
* @summary Create a project
|
|
35
|
+
* @param {ProjectCreate} projectCreate A JSON object containing the resource data
|
|
36
36
|
*/
|
|
37
37
|
addProject(projectCreate) {
|
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -47,8 +47,8 @@ class ProjectsApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
*
|
|
50
|
-
* @summary Get a
|
|
51
|
-
* @param {number} projectId
|
|
50
|
+
* @summary Get a Project by ID
|
|
51
|
+
* @param {number} projectId The ID of the project.
|
|
52
52
|
*/
|
|
53
53
|
getProject(projectId) {
|
|
54
54
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -63,7 +63,7 @@ class ProjectsApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
65
|
*
|
|
66
|
-
* @summary
|
|
66
|
+
* @summary Return a list of all projects the current user has access to
|
|
67
67
|
* @param {number} [page] Number of the page to be retrieved
|
|
68
68
|
* @param {number} [perPage] Number of items returned per page
|
|
69
69
|
*/
|
|
@@ -84,9 +84,9 @@ class ProjectsApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
84
84
|
}
|
|
85
85
|
/**
|
|
86
86
|
*
|
|
87
|
-
* @summary Update an existing
|
|
88
|
-
* @param {number} projectId
|
|
89
|
-
* @param {ProjectUpdate} projectUpdate A JSON object containing
|
|
87
|
+
* @summary Update an existing Project
|
|
88
|
+
* @param {number} projectId The ID of the project.
|
|
89
|
+
* @param {ProjectUpdate} projectUpdate A JSON object containing the resource data
|
|
90
90
|
*/
|
|
91
91
|
updateProject(projectId, projectUpdate) {
|
|
92
92
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -19,21 +19,21 @@ import { RoleUpdate } from '../../generated/models';
|
|
|
19
19
|
export declare class RolesApiService extends ApiBaseService {
|
|
20
20
|
/**
|
|
21
21
|
*
|
|
22
|
-
* @summary Delete a role
|
|
23
|
-
* @param {number} roleId
|
|
22
|
+
* @summary Delete a given role
|
|
23
|
+
* @param {number} roleId The ID of the role.
|
|
24
24
|
*/
|
|
25
25
|
deleteRole(roleId: number): Promise<ApiResponse<void>>;
|
|
26
26
|
/**
|
|
27
27
|
*
|
|
28
|
-
* @summary Get a role
|
|
29
|
-
* @param {number} roleId
|
|
28
|
+
* @summary Get a role by ID
|
|
29
|
+
* @param {number} roleId The ID of the role.
|
|
30
30
|
*/
|
|
31
31
|
getRole(roleId: number): Promise<ApiResponse<Role>>;
|
|
32
32
|
/**
|
|
33
33
|
*
|
|
34
34
|
* @summary Update an existing role
|
|
35
|
-
* @param {number} roleId
|
|
36
|
-
* @param {RoleUpdate} roleUpdate A JSON object containing
|
|
35
|
+
* @param {number} roleId The ID of the role.
|
|
36
|
+
* @param {RoleUpdate} roleUpdate A JSON object containing the resource data
|
|
37
37
|
*/
|
|
38
38
|
updateRole(roleId: number, roleUpdate: RoleUpdate): Promise<ApiResponse<void>>;
|
|
39
39
|
}
|
|
@@ -31,8 +31,8 @@ const Exceptions_1 = require("../../../common/Exceptions");
|
|
|
31
31
|
class RolesApiService extends ApiBaseService_1.ApiBaseService {
|
|
32
32
|
/**
|
|
33
33
|
*
|
|
34
|
-
* @summary Delete a role
|
|
35
|
-
* @param {number} roleId
|
|
34
|
+
* @summary Delete a given role
|
|
35
|
+
* @param {number} roleId The ID of the role.
|
|
36
36
|
*/
|
|
37
37
|
deleteRole(roleId) {
|
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -47,8 +47,8 @@ class RolesApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
*
|
|
50
|
-
* @summary Get a role
|
|
51
|
-
* @param {number} roleId
|
|
50
|
+
* @summary Get a role by ID
|
|
51
|
+
* @param {number} roleId The ID of the role.
|
|
52
52
|
*/
|
|
53
53
|
getRole(roleId) {
|
|
54
54
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -64,8 +64,8 @@ class RolesApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
64
64
|
/**
|
|
65
65
|
*
|
|
66
66
|
* @summary Update an existing role
|
|
67
|
-
* @param {number} roleId
|
|
68
|
-
* @param {RoleUpdate} roleUpdate A JSON object containing
|
|
67
|
+
* @param {number} roleId The ID of the role.
|
|
68
|
+
* @param {RoleUpdate} roleUpdate A JSON object containing the resource data
|
|
69
69
|
*/
|
|
70
70
|
updateRole(roleId, roleUpdate) {
|
|
71
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import { ApiBaseService } from "../../../services/ApiBaseService";
|
|
13
13
|
import { ApiResponse } from "../../../common/ApiResponse";
|
|
14
14
|
import { Server } from '../../generated/models';
|
|
15
|
-
import {
|
|
15
|
+
import { ServerCommand } from '../../generated/models';
|
|
16
16
|
import { ServerUpdate } from '../../generated/models';
|
|
17
17
|
/**
|
|
18
18
|
* ServersApiService - Auto-generated
|
|
@@ -28,20 +28,20 @@ export declare class ServersApiService extends ApiBaseService {
|
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @summary Get a server by ID
|
|
31
|
-
* @param {number} serverId
|
|
31
|
+
* @param {number} serverId The ID of the server.
|
|
32
32
|
*/
|
|
33
33
|
getServer(serverId: number): Promise<ApiResponse<Server>>;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
36
|
* @summary Get commands to be executed on the given server
|
|
37
|
-
* @param {number} serverId The
|
|
37
|
+
* @param {number} serverId The ID of the server.
|
|
38
38
|
*/
|
|
39
|
-
getServerCommands(serverId: number): Promise<ApiResponse<
|
|
39
|
+
getServerCommands(serverId: number): Promise<ApiResponse<ServerCommand>>;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @summary Update an existing server
|
|
43
|
-
* @param {number} serverId
|
|
44
|
-
* @param {ServerUpdate} serverUpdate A JSON object containing
|
|
43
|
+
* @param {number} serverId The ID of the server.
|
|
44
|
+
* @param {ServerUpdate} serverUpdate A JSON object containing the resource data
|
|
45
45
|
*/
|
|
46
46
|
updateServer(serverId: number, serverUpdate: ServerUpdate): Promise<ApiResponse<void>>;
|
|
47
47
|
}
|
|
@@ -52,7 +52,7 @@ class ServersApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
52
52
|
/**
|
|
53
53
|
*
|
|
54
54
|
* @summary Get a server by ID
|
|
55
|
-
* @param {number} serverId
|
|
55
|
+
* @param {number} serverId The ID of the server.
|
|
56
56
|
*/
|
|
57
57
|
getServer(serverId) {
|
|
58
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -68,7 +68,7 @@ class ServersApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
68
68
|
/**
|
|
69
69
|
*
|
|
70
70
|
* @summary Get commands to be executed on the given server
|
|
71
|
-
* @param {number} serverId The
|
|
71
|
+
* @param {number} serverId The ID of the server.
|
|
72
72
|
*/
|
|
73
73
|
getServerCommands(serverId) {
|
|
74
74
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -84,8 +84,8 @@ class ServersApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
84
84
|
/**
|
|
85
85
|
*
|
|
86
86
|
* @summary Update an existing server
|
|
87
|
-
* @param {number} serverId
|
|
88
|
-
* @param {ServerUpdate} serverUpdate A JSON object containing
|
|
87
|
+
* @param {number} serverId The ID of the server.
|
|
88
|
+
* @param {ServerUpdate} serverUpdate A JSON object containing the resource data
|
|
89
89
|
*/
|
|
90
90
|
updateServer(serverId, serverUpdate) {
|
|
91
91
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -0,0 +1,36 @@
|
|
|
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 { Variable } from '../../generated/models';
|
|
15
|
+
import { VariableRelation } from '../../generated/models';
|
|
16
|
+
import { VariableServiceCreate } from '../../generated/models';
|
|
17
|
+
/**
|
|
18
|
+
* ServicesVariablesApiService - Auto-generated
|
|
19
|
+
*/
|
|
20
|
+
export declare class ServicesVariablesApiService extends ApiBaseService {
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @summary Create a new variable linked to a service
|
|
24
|
+
* @param {number} serviceId The ID of the service.
|
|
25
|
+
* @param {VariableServiceCreate} variableServiceCreate A JSON object containing the resource data
|
|
26
|
+
*/
|
|
27
|
+
addServiceVariable(serviceId: number, variableServiceCreate: VariableServiceCreate): Promise<ApiResponse<Variable>>;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @summary Return a list of variables belonging to a service
|
|
31
|
+
* @param {number} serviceId The ID of the service.
|
|
32
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
33
|
+
* @param {number} [perPage] Number of items returned per page
|
|
34
|
+
*/
|
|
35
|
+
listServiceVariables(serviceId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<VariableRelation>>>;
|
|
36
|
+
}
|
|
@@ -21,29 +21,45 @@ 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.ServicesVariablesApiService = 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
|
+
* ServicesVariablesApiService - Auto-generated
|
|
30
30
|
*/
|
|
31
|
-
class
|
|
31
|
+
class ServicesVariablesApiService extends ApiBaseService_1.ApiBaseService {
|
|
32
32
|
/**
|
|
33
33
|
*
|
|
34
|
-
* @summary
|
|
35
|
-
* @param {
|
|
36
|
-
* @param {
|
|
34
|
+
* @summary Create a new variable linked to a service
|
|
35
|
+
* @param {number} serviceId The ID of the service.
|
|
36
|
+
* @param {VariableServiceCreate} variableServiceCreate A JSON object containing the resource data
|
|
37
|
+
*/
|
|
38
|
+
addServiceVariable(serviceId, variableServiceCreate) {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
if (serviceId === null || serviceId === undefined) {
|
|
41
|
+
throw new Exceptions_1.ArgumentNullException('serviceId', 'addServiceVariable');
|
|
42
|
+
}
|
|
43
|
+
if (variableServiceCreate === null || variableServiceCreate === undefined) {
|
|
44
|
+
throw new Exceptions_1.ArgumentNullException('variableServiceCreate', 'addServiceVariable');
|
|
45
|
+
}
|
|
46
|
+
let queryString = '';
|
|
47
|
+
const requestUrl = '/services/{service_id}/variables' + (queryString ? `?${queryString}` : '');
|
|
48
|
+
const response = yield this.post(requestUrl.replace(`{${"service_id"}}`, encodeURIComponent(String(serviceId))), variableServiceCreate);
|
|
49
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @summary Return a list of variables belonging to a service
|
|
55
|
+
* @param {number} serviceId The ID of the service.
|
|
37
56
|
* @param {number} [page] Number of the page to be retrieved
|
|
38
57
|
* @param {number} [perPage] Number of items returned per page
|
|
39
58
|
*/
|
|
40
|
-
|
|
59
|
+
listServiceVariables(serviceId, page, perPage) {
|
|
41
60
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
-
if (
|
|
43
|
-
throw new Exceptions_1.ArgumentNullException('
|
|
44
|
-
}
|
|
45
|
-
if (resourceId === null || resourceId === undefined) {
|
|
46
|
-
throw new Exceptions_1.ArgumentNullException('resourceId', 'listPipelines');
|
|
61
|
+
if (serviceId === null || serviceId === undefined) {
|
|
62
|
+
throw new Exceptions_1.ArgumentNullException('serviceId', 'listServiceVariables');
|
|
47
63
|
}
|
|
48
64
|
let queryString = '';
|
|
49
65
|
const queryParams = { page: page, per_page: perPage, };
|
|
@@ -53,10 +69,10 @@ class PipelinesResourcesApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
53
69
|
}
|
|
54
70
|
queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
|
|
55
71
|
}
|
|
56
|
-
const requestUrl = '/
|
|
57
|
-
const response = yield this.get(requestUrl.replace(`{${"
|
|
72
|
+
const requestUrl = '/services/{service_id}/variables' + (queryString ? `?${queryString}` : '');
|
|
73
|
+
const response = yield this.get(requestUrl.replace(`{${"service_id"}}`, encodeURIComponent(String(serviceId))));
|
|
58
74
|
return new ApiResponse_1.ApiResponse(response);
|
|
59
75
|
});
|
|
60
76
|
}
|
|
61
77
|
}
|
|
62
|
-
exports.
|
|
78
|
+
exports.ServicesVariablesApiService = ServicesVariablesApiService;
|