@devopness/sdk-js 2.98.0 → 2.99.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/api/generated/apis/servers-api.d.ts +2 -1
- package/dist/api/generated/apis/servers-api.js +9 -1
- package/dist/api/generated/apis/users-environments-api.d.ts +27 -0
- package/dist/api/generated/apis/users-environments-api.js +58 -0
- package/dist/api/generated/models/archived-environment-relation.d.ts +7 -0
- package/dist/api/generated/models/environment-relation.d.ts +7 -0
- package/dist/api/generated/models/network-rule-direction.d.ts +0 -1
- package/dist/api/generated/models/network-rule-direction.js +0 -1
- package/dist/api/generated/models/resource-event.d.ts +2 -2
- package/dist/api/generated/models/resource-link-relation.d.ts +2 -2
- package/dist/api/generated/models/user-billing.d.ts +0 -7
- package/dist/services/UserService.d.ts +3 -1
- package/dist/services/UserService.js +3 -1
- package/package.json +1 -1
|
@@ -29,8 +29,9 @@ export declare class ServersApiService extends ApiBaseService {
|
|
|
29
29
|
*
|
|
30
30
|
* @summary Delete a given server
|
|
31
31
|
* @param {number} serverId The ID of the server.
|
|
32
|
+
* @param {boolean} [destroyServerDisks] Indicates whether disks associated with a cloud server should be deleted after the server is destroyed
|
|
32
33
|
*/
|
|
33
|
-
deleteServer(serverId: number): Promise<ApiResponse<void>>;
|
|
34
|
+
deleteServer(serverId: number, destroyServerDisks?: boolean): Promise<ApiResponse<void>>;
|
|
34
35
|
/**
|
|
35
36
|
*
|
|
36
37
|
* @summary Get a server by ID
|
|
@@ -53,13 +53,21 @@ class ServersApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
53
53
|
*
|
|
54
54
|
* @summary Delete a given server
|
|
55
55
|
* @param {number} serverId The ID of the server.
|
|
56
|
+
* @param {boolean} [destroyServerDisks] Indicates whether disks associated with a cloud server should be deleted after the server is destroyed
|
|
56
57
|
*/
|
|
57
|
-
deleteServer(serverId) {
|
|
58
|
+
deleteServer(serverId, destroyServerDisks) {
|
|
58
59
|
return __awaiter(this, void 0, void 0, function* () {
|
|
59
60
|
if (serverId === null || serverId === undefined) {
|
|
60
61
|
throw new Exceptions_1.ArgumentNullException('serverId', 'deleteServer');
|
|
61
62
|
}
|
|
62
63
|
let queryString = '';
|
|
64
|
+
const queryParams = { destroy_server_disks: destroyServerDisks, };
|
|
65
|
+
for (const key in queryParams) {
|
|
66
|
+
if (queryParams[key] === undefined || queryParams[key] === null) {
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
|
|
70
|
+
}
|
|
63
71
|
const requestUrl = '/servers/{server_id}' + (queryString ? `?${queryString}` : '');
|
|
64
72
|
const response = yield this.delete(requestUrl.replace(`{${"server_id"}}`, encodeURIComponent(String(serverId))));
|
|
65
73
|
return new ApiResponse_1.ApiResponse(response);
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { EnvironmentRelation } from '../../generated/models';
|
|
15
|
+
/**
|
|
16
|
+
* UsersEnvironmentsApiService - Auto-generated
|
|
17
|
+
*/
|
|
18
|
+
export declare class UsersEnvironmentsApiService extends ApiBaseService {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @summary Get current user\'s environments, projects and the amount of credits used
|
|
22
|
+
* @param {number} userId The ID of the user.
|
|
23
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
24
|
+
* @param {number} [perPage] Number of items returned per page
|
|
25
|
+
*/
|
|
26
|
+
listUserEnvironments(userId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<EnvironmentRelation>>>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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.UsersEnvironmentsApiService = 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
|
+
* UsersEnvironmentsApiService - Auto-generated
|
|
30
|
+
*/
|
|
31
|
+
class UsersEnvironmentsApiService extends ApiBaseService_1.ApiBaseService {
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @summary Get current user\'s environments, projects and the amount of credits used
|
|
35
|
+
* @param {number} userId The ID of the user.
|
|
36
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
37
|
+
* @param {number} [perPage] Number of items returned per page
|
|
38
|
+
*/
|
|
39
|
+
listUserEnvironments(userId, page, perPage) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
if (userId === null || userId === undefined) {
|
|
42
|
+
throw new Exceptions_1.ArgumentNullException('userId', 'listUserEnvironments');
|
|
43
|
+
}
|
|
44
|
+
let queryString = '';
|
|
45
|
+
const queryParams = { page: page, per_page: perPage, };
|
|
46
|
+
for (const key in queryParams) {
|
|
47
|
+
if (queryParams[key] === undefined || queryParams[key] === null) {
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
|
|
51
|
+
}
|
|
52
|
+
const requestUrl = '/users/{user_id}/environments' + (queryString ? `?${queryString}` : '');
|
|
53
|
+
const response = yield this.get(requestUrl.replace(`{${"user_id"}}`, encodeURIComponent(String(userId))));
|
|
54
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.UsersEnvironmentsApiService = UsersEnvironmentsApiService;
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import { EnvironmentType } from './environment-type';
|
|
13
|
+
import { ProjectRelation } from './project-relation';
|
|
13
14
|
/**
|
|
14
15
|
*
|
|
15
16
|
* @export
|
|
@@ -64,4 +65,10 @@ export interface ArchivedEnvironmentRelation {
|
|
|
64
65
|
* @memberof ArchivedEnvironmentRelation
|
|
65
66
|
*/
|
|
66
67
|
archived_at: string | null;
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @type {ProjectRelation}
|
|
71
|
+
* @memberof ArchivedEnvironmentRelation
|
|
72
|
+
*/
|
|
73
|
+
project: ProjectRelation | null;
|
|
67
74
|
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import { EnvironmentType } from './environment-type';
|
|
13
|
+
import { ProjectRelation } from './project-relation';
|
|
13
14
|
/**
|
|
14
15
|
*
|
|
15
16
|
* @export
|
|
@@ -64,4 +65,10 @@ export interface EnvironmentRelation {
|
|
|
64
65
|
* @memberof EnvironmentRelation
|
|
65
66
|
*/
|
|
66
67
|
archived_at: string | null;
|
|
68
|
+
/**
|
|
69
|
+
*
|
|
70
|
+
* @type {ProjectRelation}
|
|
71
|
+
* @memberof EnvironmentRelation
|
|
72
|
+
*/
|
|
73
|
+
project: ProjectRelation | null;
|
|
67
74
|
}
|
|
@@ -20,7 +20,6 @@ exports.NetworkRuleDirection = void 0;
|
|
|
20
20
|
*/
|
|
21
21
|
var NetworkRuleDirection;
|
|
22
22
|
(function (NetworkRuleDirection) {
|
|
23
|
-
NetworkRuleDirection["Any"] = "any";
|
|
24
23
|
NetworkRuleDirection["Inbound"] = "inbound";
|
|
25
24
|
NetworkRuleDirection["Outbound"] = "outbound";
|
|
26
25
|
})(NetworkRuleDirection = exports.NetworkRuleDirection || (exports.NetworkRuleDirection = {}));
|
|
@@ -24,10 +24,10 @@ export interface ResourceEvent {
|
|
|
24
24
|
resource_type: string;
|
|
25
25
|
/**
|
|
26
26
|
* The resource ID.
|
|
27
|
-
* @type {
|
|
27
|
+
* @type {number}
|
|
28
28
|
* @memberof ResourceEvent
|
|
29
29
|
*/
|
|
30
|
-
resource_id:
|
|
30
|
+
resource_id: number;
|
|
31
31
|
/**
|
|
32
32
|
*
|
|
33
33
|
* @type {Subscription}
|
|
@@ -36,10 +36,10 @@ export interface ResourceLinkRelation {
|
|
|
36
36
|
resource_type: string;
|
|
37
37
|
/**
|
|
38
38
|
* The linked resource ID
|
|
39
|
-
* @type {
|
|
39
|
+
* @type {number}
|
|
40
40
|
* @memberof ResourceLinkRelation
|
|
41
41
|
*/
|
|
42
|
-
resource_id:
|
|
42
|
+
resource_id: number;
|
|
43
43
|
/**
|
|
44
44
|
* If false, the link cannot be manually removed
|
|
45
45
|
* @type {boolean}
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import { EnvironmentRelation } from './environment-relation';
|
|
13
12
|
import { Subscription } from './subscription';
|
|
14
13
|
/**
|
|
15
14
|
*
|
|
@@ -23,10 +22,4 @@ export interface UserBilling {
|
|
|
23
22
|
* @memberof UserBilling
|
|
24
23
|
*/
|
|
25
24
|
active_subscription: Subscription | null;
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
28
|
-
* @type {Array<EnvironmentRelation>}
|
|
29
|
-
* @memberof UserBilling
|
|
30
|
-
*/
|
|
31
|
-
environments: Array<EnvironmentRelation>;
|
|
32
25
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { UsersApiService } from '../api/generated/apis/users-api';
|
|
2
2
|
import { UsersTeamInvitationsApiService } from '../api/generated/apis/users-team-invitations-api';
|
|
3
3
|
import { UsersPasswordsApiService } from '../api/generated/apis/users-passwords-api';
|
|
4
|
+
import { UsersEnvironmentsApiService } from '../api/generated/apis/users-environments-api';
|
|
4
5
|
export declare class UserService extends UsersApiService {
|
|
5
|
-
|
|
6
|
+
environments: UsersEnvironmentsApiService;
|
|
6
7
|
passwords: UsersPasswordsApiService;
|
|
8
|
+
teamInvitations: UsersTeamInvitationsApiService;
|
|
7
9
|
}
|
|
@@ -4,11 +4,13 @@ exports.UserService = void 0;
|
|
|
4
4
|
const users_api_1 = require("../api/generated/apis/users-api");
|
|
5
5
|
const users_team_invitations_api_1 = require("../api/generated/apis/users-team-invitations-api");
|
|
6
6
|
const users_passwords_api_1 = require("../api/generated/apis/users-passwords-api");
|
|
7
|
+
const users_environments_api_1 = require("../api/generated/apis/users-environments-api");
|
|
7
8
|
class UserService extends users_api_1.UsersApiService {
|
|
8
9
|
constructor() {
|
|
9
10
|
super(...arguments);
|
|
10
|
-
this.
|
|
11
|
+
this.environments = new users_environments_api_1.UsersEnvironmentsApiService();
|
|
11
12
|
this.passwords = new users_passwords_api_1.UsersPasswordsApiService();
|
|
13
|
+
this.teamInvitations = new users_team_invitations_api_1.UsersTeamInvitationsApiService();
|
|
12
14
|
}
|
|
13
15
|
}
|
|
14
16
|
exports.UserService = UserService;
|