@devopness/sdk-js 1.91.0 → 1.94.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/projects-api.d.ts +1 -1
- package/dist/api/generated/apis/projects-api.js +1 -1
- package/dist/api/generated/apis/sshkeys-api.d.ts +8 -0
- package/dist/api/generated/apis/sshkeys-api.js +20 -0
- package/dist/api/generated/models/application.d.ts +1 -1
- package/dist/api/generated/models/deployment-create.d.ts +2 -2
- package/dist/api/generated/models/deployment-relation.d.ts +6 -0
- package/dist/api/generated/models/deployment.d.ts +1 -1
- package/dist/api/generated/models/index.d.ts +1 -0
- package/dist/api/generated/models/index.js +1 -0
- package/dist/api/generated/models/member-relation.d.ts +12 -0
- package/dist/api/generated/models/project-relation.d.ts +7 -0
- package/dist/api/generated/models/project.d.ts +7 -0
- package/dist/api/generated/models/ssh-key-update.d.ts +37 -0
- package/dist/api/generated/models/ssh-key-update.js +14 -0
- package/dist/api/generated/models/ssl-certificate-relation.d.ts +6 -0
- package/dist/api/generated/models/ssl-certificate.d.ts +6 -0
- package/dist/common/ApiResponse.js +4 -2
- package/dist/services/ApiBaseService.js +3 -0
- package/package.json +5 -5
|
@@ -33,7 +33,7 @@ export declare class ProjectsApiService extends ApiBaseService {
|
|
|
33
33
|
getProject(projectId: number): Promise<ApiResponse<Project>>;
|
|
34
34
|
/**
|
|
35
35
|
*
|
|
36
|
-
* @summary Returns a list of all projects
|
|
36
|
+
* @summary Returns 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
|
*/
|
|
@@ -63,7 +63,7 @@ class ProjectsApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
65
|
*
|
|
66
|
-
* @summary Returns a list of all projects
|
|
66
|
+
* @summary Returns 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
|
*/
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
import { ApiBaseService } from "../../../services/ApiBaseService";
|
|
13
13
|
import { ApiResponse } from "../../../common/ApiResponse";
|
|
14
14
|
import { SshKey } from '../../generated/models';
|
|
15
|
+
import { SshKeyUpdate } from '../../generated/models';
|
|
15
16
|
/**
|
|
16
17
|
* SSHKeysApiService - Auto-generated
|
|
17
18
|
*/
|
|
@@ -28,4 +29,11 @@ export declare class SSHKeysApiService extends ApiBaseService {
|
|
|
28
29
|
* @param {number} sshKeyId Numeric ID of the SSH key to get
|
|
29
30
|
*/
|
|
30
31
|
getSshKey(sshKeyId: number): Promise<ApiResponse<SshKey>>;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @summary Update an existing SSH key
|
|
35
|
+
* @param {number} sshKeyId Numeric ID of the SSH key to be updated
|
|
36
|
+
* @param {SshKeyUpdate} sshKeyUpdate A JSON object containing SSH key data
|
|
37
|
+
*/
|
|
38
|
+
updateSshKey(sshKeyId: number, sshKeyUpdate: SshKeyUpdate): Promise<ApiResponse<void>>;
|
|
31
39
|
}
|
|
@@ -61,5 +61,25 @@ class SSHKeysApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
61
61
|
return new ApiResponse_1.ApiResponse(response);
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @summary Update an existing SSH key
|
|
67
|
+
* @param {number} sshKeyId Numeric ID of the SSH key to be updated
|
|
68
|
+
* @param {SshKeyUpdate} sshKeyUpdate A JSON object containing SSH key data
|
|
69
|
+
*/
|
|
70
|
+
updateSshKey(sshKeyId, sshKeyUpdate) {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
if (sshKeyId === null || sshKeyId === undefined) {
|
|
73
|
+
throw new Exceptions_1.ArgumentNullException('sshKeyId', 'updateSshKey');
|
|
74
|
+
}
|
|
75
|
+
if (sshKeyUpdate === null || sshKeyUpdate === undefined) {
|
|
76
|
+
throw new Exceptions_1.ArgumentNullException('sshKeyUpdate', 'updateSshKey');
|
|
77
|
+
}
|
|
78
|
+
let queryString = '';
|
|
79
|
+
const requestUrl = '/ssh-keys/{ssh_key_id}' + (queryString ? `?${queryString}` : '');
|
|
80
|
+
const response = yield this.put(requestUrl.replace(`{${"ssh_key_id"}}`, encodeURIComponent(String(sshKeyId))), sshKeyUpdate);
|
|
81
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
64
84
|
}
|
|
65
85
|
exports.SSHKeysApiService = SSHKeysApiService;
|
|
@@ -23,13 +23,13 @@ export interface DeploymentCreate {
|
|
|
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
28
|
* @memberof DeploymentCreate
|
|
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
34
|
* @memberof DeploymentCreate
|
|
35
35
|
*/
|
|
@@ -28,6 +28,12 @@ export interface DeploymentRelation {
|
|
|
28
28
|
* @memberof DeploymentRelation
|
|
29
29
|
*/
|
|
30
30
|
id: number;
|
|
31
|
+
/**
|
|
32
|
+
* The application\'s name that the deployment belongs to
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof DeploymentRelation
|
|
35
|
+
*/
|
|
36
|
+
name: string;
|
|
31
37
|
/**
|
|
32
38
|
*
|
|
33
39
|
* @type {ActionStatus}
|
|
@@ -149,6 +149,7 @@ export * from './source-provider-name';
|
|
|
149
149
|
export * from './ssh-key';
|
|
150
150
|
export * from './ssh-key-create';
|
|
151
151
|
export * from './ssh-key-relation';
|
|
152
|
+
export * from './ssh-key-update';
|
|
152
153
|
export * from './ssl-certificate';
|
|
153
154
|
export * from './ssl-certificate-create';
|
|
154
155
|
export * from './ssl-certificate-issuer';
|
|
@@ -161,6 +161,7 @@ __exportStar(require("./source-provider-name"), exports);
|
|
|
161
161
|
__exportStar(require("./ssh-key"), exports);
|
|
162
162
|
__exportStar(require("./ssh-key-create"), exports);
|
|
163
163
|
__exportStar(require("./ssh-key-relation"), exports);
|
|
164
|
+
__exportStar(require("./ssh-key-update"), exports);
|
|
164
165
|
__exportStar(require("./ssl-certificate"), exports);
|
|
165
166
|
__exportStar(require("./ssl-certificate-create"), exports);
|
|
166
167
|
__exportStar(require("./ssl-certificate-issuer"), exports);
|
|
@@ -22,6 +22,18 @@ export interface MemberRelation {
|
|
|
22
22
|
* @memberof MemberRelation
|
|
23
23
|
*/
|
|
24
24
|
role: string;
|
|
25
|
+
/**
|
|
26
|
+
* The date and time when the record was created
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof MemberRelation
|
|
29
|
+
*/
|
|
30
|
+
created_at?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The date and time when the record was last updated
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof MemberRelation
|
|
35
|
+
*/
|
|
36
|
+
updated_at?: string;
|
|
25
37
|
/**
|
|
26
38
|
*
|
|
27
39
|
* @type {UserRelation}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import { UserRelation } from './user-relation';
|
|
12
13
|
/**
|
|
13
14
|
*
|
|
14
15
|
* @export
|
|
@@ -51,4 +52,10 @@ export interface ProjectRelation {
|
|
|
51
52
|
* @memberof ProjectRelation
|
|
52
53
|
*/
|
|
53
54
|
os_users?: Array<object>;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {UserRelation}
|
|
58
|
+
* @memberof ProjectRelation
|
|
59
|
+
*/
|
|
60
|
+
created_by_user?: UserRelation;
|
|
54
61
|
}
|
|
@@ -17,6 +17,7 @@ import { NetworkRuleRelation } from './network-rule-relation';
|
|
|
17
17
|
import { ServerRelation } from './server-relation';
|
|
18
18
|
import { ServiceRelation } from './service-relation';
|
|
19
19
|
import { SshKeyRelation } from './ssh-key-relation';
|
|
20
|
+
import { UserRelation } from './user-relation';
|
|
20
21
|
/**
|
|
21
22
|
*
|
|
22
23
|
* @export
|
|
@@ -71,6 +72,12 @@ export interface Project {
|
|
|
71
72
|
* @memberof Project
|
|
72
73
|
*/
|
|
73
74
|
applications: Array<ApplicationRelation>;
|
|
75
|
+
/**
|
|
76
|
+
*
|
|
77
|
+
* @type {UserRelation}
|
|
78
|
+
* @memberof Project
|
|
79
|
+
*/
|
|
80
|
+
created_by_user?: UserRelation;
|
|
74
81
|
/**
|
|
75
82
|
*
|
|
76
83
|
* @type {Array<CronJobRelation>}
|
|
@@ -0,0 +1,37 @@
|
|
|
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 { EnvironmentLinkItem } from './environment-link-item';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface SshKeyUpdate
|
|
17
|
+
*/
|
|
18
|
+
export interface SshKeyUpdate {
|
|
19
|
+
/**
|
|
20
|
+
* The Id of the SSH key
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof SshKeyUpdate
|
|
23
|
+
*/
|
|
24
|
+
id: number;
|
|
25
|
+
/**
|
|
26
|
+
* The name entered by the user to uniquely identify the public SSH key
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof SshKeyUpdate
|
|
29
|
+
*/
|
|
30
|
+
name: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {Array<EnvironmentLinkItem>}
|
|
34
|
+
* @memberof SshKeyUpdate
|
|
35
|
+
*/
|
|
36
|
+
environments?: Array<EnvironmentLinkItem>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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 });
|
|
@@ -31,6 +31,12 @@ export interface SslCertificateRelation {
|
|
|
31
31
|
* @memberof SslCertificateRelation
|
|
32
32
|
*/
|
|
33
33
|
domains: Array<string>;
|
|
34
|
+
/**
|
|
35
|
+
* The name given to SSL certificate
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof SslCertificateRelation
|
|
38
|
+
*/
|
|
39
|
+
name: string;
|
|
34
40
|
/**
|
|
35
41
|
*
|
|
36
42
|
* @type {SslCertificateIssuer}
|
|
@@ -33,6 +33,12 @@ export interface SslCertificate {
|
|
|
33
33
|
* @memberof SslCertificate
|
|
34
34
|
*/
|
|
35
35
|
domains: Array<string>;
|
|
36
|
+
/**
|
|
37
|
+
* The name given to SSL certificate
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof SslCertificate
|
|
40
|
+
*/
|
|
41
|
+
name: string;
|
|
36
42
|
/**
|
|
37
43
|
*
|
|
38
44
|
* @type {SslCertificateIssuer}
|
|
@@ -14,8 +14,10 @@ class ApiResponse {
|
|
|
14
14
|
if (axiosResp.headers) {
|
|
15
15
|
const linkHeader = (0, parse_link_header_1.default)(axiosResp.headers.link);
|
|
16
16
|
this.pageCount = Number((_a = linkHeader === null || linkHeader === void 0 ? void 0 : linkHeader.last) === null || _a === void 0 ? void 0 : _a.page) || 1;
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
if (axiosResp.headers['x-devopness-action-id']) {
|
|
18
|
+
// axios headers are intentionally lower cased, as per https://github.com/axios/axios/issues/413
|
|
19
|
+
this.actionId = Number(axiosResp.headers['x-devopness-action-id']);
|
|
20
|
+
}
|
|
19
21
|
}
|
|
20
22
|
}
|
|
21
23
|
}
|
|
@@ -66,6 +66,9 @@ class ApiBaseService {
|
|
|
66
66
|
}
|
|
67
67
|
setupAxiosRequestInterceptors() {
|
|
68
68
|
this.api.interceptors.request.use((config) => {
|
|
69
|
+
if (!config.headers) {
|
|
70
|
+
config.headers = {};
|
|
71
|
+
}
|
|
69
72
|
if (ApiBaseService._accessToken) {
|
|
70
73
|
config.headers.Authorization = `Bearer ${ApiBaseService._accessToken}`;
|
|
71
74
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devopness/sdk-js",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.94.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@openapitools/openapi-generator-cli": "^2.0.2",
|
|
49
49
|
"@types/jest": "^27.0.1",
|
|
50
|
-
"@typescript-eslint/eslint-plugin": "^4.
|
|
51
|
-
"@typescript-eslint/parser": "^4.
|
|
50
|
+
"@typescript-eslint/eslint-plugin": "^4.33.0",
|
|
51
|
+
"@typescript-eslint/parser": "^4.33.0",
|
|
52
52
|
"axios-mock-adapter": "^1.18.1",
|
|
53
53
|
"eslint": "^7.32.0",
|
|
54
54
|
"eslint-config-standard-with-typescript": "^21.0.1",
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
"jest": "^27.0.6",
|
|
61
61
|
"ts-jest": "^27.0.3",
|
|
62
62
|
"typedoc": "^0.22.3",
|
|
63
|
-
"typescript": "^4.0
|
|
63
|
+
"typescript": "^4.4.0"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@types/parse-link-header": "^1.0.0",
|
|
67
|
-
"axios": "^0.21.
|
|
67
|
+
"axios": "^0.21.4",
|
|
68
68
|
"parse-link-header": "^1.0.1"
|
|
69
69
|
}
|
|
70
70
|
}
|