@devopness/sdk-js 3.5.5 → 3.6.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/actions-api.d.ts +3 -1
- package/dist/api/generated/apis/actions-api.js +18 -29
- package/dist/api/generated/apis/actions-logs-api.js +1 -2
- package/dist/api/generated/apis/applications-api.js +11 -20
- package/dist/api/generated/apis/applications-hooks-api.js +5 -8
- package/dist/api/generated/apis/applications-variables-api.js +6 -10
- package/dist/api/generated/apis/credentials-api.js +26 -46
- package/dist/api/generated/apis/credentials-repositories-api.js +6 -10
- package/dist/api/generated/apis/cron-jobs-api.js +10 -18
- package/dist/api/generated/apis/daemons-api.js +14 -26
- package/dist/api/generated/apis/environments-actions-api.d.ts +6 -2
- package/dist/api/generated/apis/environments-actions-api.js +15 -18
- package/dist/api/generated/apis/environments-api.js +5 -10
- package/dist/api/generated/apis/hook-requests-api.js +1 -2
- package/dist/api/generated/apis/hooks-api.js +4 -8
- package/dist/api/generated/apis/hooks-requests-api.js +5 -8
- package/dist/api/generated/apis/network-rules-api.js +10 -18
- package/dist/api/generated/apis/networks-api.js +13 -18
- package/dist/api/generated/apis/networks-subnets-api.js +8 -10
- package/dist/api/generated/apis/organizations-api.js +9 -16
- package/dist/api/generated/apis/pipelines-actions-api.js +6 -10
- package/dist/api/generated/apis/pipelines-api.js +9 -16
- package/dist/api/generated/apis/pipelines-hooks-api.js +6 -10
- package/dist/api/generated/apis/pipelines-steps-api.js +4 -8
- package/dist/api/generated/apis/projects-actions-api.js +5 -8
- package/dist/api/generated/apis/projects-api.js +11 -18
- package/dist/api/generated/apis/projects-apitokens-api.js +9 -16
- package/dist/api/generated/apis/projects-archived-environments-api.js +5 -8
- package/dist/api/generated/apis/projects-environments-api.js +6 -10
- package/dist/api/generated/apis/resource-events-api.js +6 -10
- package/dist/api/generated/apis/resource-links-api.js +12 -20
- package/dist/api/generated/apis/roles-api.js +9 -16
- package/dist/api/generated/apis/servers-api.js +19 -38
- package/dist/api/generated/apis/services-api.js +15 -28
- package/dist/api/generated/apis/services-variables-api.js +6 -10
- package/dist/api/generated/apis/social-accounts-api.js +9 -16
- package/dist/api/generated/apis/sshkeys-api.js +10 -18
- package/dist/api/generated/apis/sslcertificates-api.js +9 -16
- package/dist/api/generated/apis/static-data-api.js +27 -52
- package/dist/api/generated/apis/subnets-api.js +7 -12
- package/dist/api/generated/apis/team-invitations-api.js +6 -12
- package/dist/api/generated/apis/teams-api.js +32 -60
- package/dist/api/generated/apis/teams-invitations-api.js +6 -10
- package/dist/api/generated/apis/teams-members-api.js +7 -12
- package/dist/api/generated/apis/users-api.js +12 -24
- package/dist/api/generated/apis/users-environments-api.js +6 -8
- package/dist/api/generated/apis/users-passwords-api.js +2 -4
- package/dist/api/generated/apis/users-personal-access-tokens-api.js +9 -16
- package/dist/api/generated/apis/users-projects-api.js +6 -8
- package/dist/api/generated/apis/users-team-invitations-api.js +5 -8
- package/dist/api/generated/apis/variables-api.js +11 -16
- package/dist/api/generated/apis/virtual-hosts-api.js +11 -20
- package/dist/api/generated/models/application-apply-template-response.d.ts +1 -1
- package/dist/api/generated/models/application-environment-apply-template.d.ts +14 -2
- package/dist/api/generated/models/application-environment-create.d.ts +1 -1
- package/dist/api/generated/models/application-relation.d.ts +1 -1
- package/dist/api/generated/models/application-update.d.ts +1 -1
- package/dist/api/generated/models/application.d.ts +1 -1
- package/dist/api/generated/models/index.d.ts +3 -0
- package/dist/api/generated/models/index.js +3 -0
- package/dist/api/generated/models/list-actions-filter-parameter.d.ts +60 -0
- package/dist/api/generated/models/list-actions-filter-parameter.js +14 -0
- package/dist/api/generated/models/list-environment-actions-by-resource-type-filter-parameter.d.ts +36 -0
- package/dist/api/generated/models/list-environment-actions-by-resource-type-filter-parameter.js +14 -0
- package/dist/api/generated/models/list-environment-actions-filter-parameter.d.ts +42 -0
- package/dist/api/generated/models/list-environment-actions-filter-parameter.js +14 -0
- package/dist/api/generated/models/virtual-host-environment-create.d.ts +2 -2
- package/dist/api/generated/models/virtual-host-relation.d.ts +1 -1
- package/dist/api/generated/models/virtual-host-update.d.ts +2 -2
- package/dist/api/generated/models/virtual-host.d.ts +1 -1
- package/dist/common/utils.d.ts +12 -0
- package/dist/common/utils.js +71 -0
- package/dist/services/ApiBaseService.d.ts +4 -4
- package/package.json +3 -3
package/dist/api/generated/models/list-environment-actions-by-resource-type-filter-parameter.d.ts
ADDED
|
@@ -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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ListEnvironmentActionsByResourceTypeFilterParameter
|
|
16
|
+
*/
|
|
17
|
+
export interface ListEnvironmentActionsByResourceTypeFilterParameter {
|
|
18
|
+
/**
|
|
19
|
+
* Resource ID. Example: `?filter[resource_id]=321`
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof ListEnvironmentActionsByResourceTypeFilterParameter
|
|
22
|
+
*/
|
|
23
|
+
resource_id?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Action status. Supported values: pending, waiting, skipped, queued, in-progress, completed, failed. Example: `?filter[status]=queued`
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof ListEnvironmentActionsByResourceTypeFilterParameter
|
|
28
|
+
*/
|
|
29
|
+
status?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Action operation name. Example: `?filter[operation]=deploy`
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ListEnvironmentActionsByResourceTypeFilterParameter
|
|
34
|
+
*/
|
|
35
|
+
operation?: string;
|
|
36
|
+
}
|
package/dist/api/generated/models/list-environment-actions-by-resource-type-filter-parameter.js
ADDED
|
@@ -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 });
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface ListEnvironmentActionsFilterParameter
|
|
16
|
+
*/
|
|
17
|
+
export interface ListEnvironmentActionsFilterParameter {
|
|
18
|
+
/**
|
|
19
|
+
* Resource type. Example: `?filter[resource_type]=application`
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof ListEnvironmentActionsFilterParameter
|
|
22
|
+
*/
|
|
23
|
+
resource_type?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Resource ID. Example: `?filter[resource_id]=321`
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof ListEnvironmentActionsFilterParameter
|
|
28
|
+
*/
|
|
29
|
+
resource_id?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Action status. Supported values: pending, waiting, skipped, queued, in-progress, completed, failed. Example: `?filter[status]=queued`
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof ListEnvironmentActionsFilterParameter
|
|
34
|
+
*/
|
|
35
|
+
status?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Action operation name. Example: `?filter[operation]=deploy`
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof ListEnvironmentActionsFilterParameter
|
|
40
|
+
*/
|
|
41
|
+
operation?: string;
|
|
42
|
+
}
|
|
@@ -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 });
|
|
@@ -35,7 +35,7 @@ export interface VirtualHostEnvironmentCreate {
|
|
|
35
35
|
*/
|
|
36
36
|
name: string;
|
|
37
37
|
/**
|
|
38
|
-
* The document root location
|
|
38
|
+
* The document root location to be served for this virtual host. When the virtual host is linked to an application, the value must be a relative path within that application directory. When no application is linked, the value must be an absolute path. Must start with one of <code>/</code> Must not be greater than 255 characters.
|
|
39
39
|
* @type {string}
|
|
40
40
|
* @memberof VirtualHostEnvironmentCreate
|
|
41
41
|
*/
|
|
@@ -47,7 +47,7 @@ export interface VirtualHostEnvironmentCreate {
|
|
|
47
47
|
*/
|
|
48
48
|
application_listen_address?: string | null;
|
|
49
49
|
/**
|
|
50
|
-
* The ID of the application to be associated with the virtual host.
|
|
50
|
+
* The ID of the application to be associated with the virtual host. When set, the value of `root_directory` will be relative to this application directory.
|
|
51
51
|
* @type {number}
|
|
52
52
|
* @memberof VirtualHostEnvironmentCreate
|
|
53
53
|
*/
|
|
@@ -51,7 +51,7 @@ export interface VirtualHostRelation {
|
|
|
51
51
|
*/
|
|
52
52
|
application: ApplicationRelation | null;
|
|
53
53
|
/**
|
|
54
|
-
* The document root location
|
|
54
|
+
* The document root location served by this virtual host. When the virtual host is linked to an application, the value is relative to that application directory. When no application is linked, the value is an absolute path
|
|
55
55
|
* @type {string}
|
|
56
56
|
* @memberof VirtualHostRelation
|
|
57
57
|
*/
|
|
@@ -28,7 +28,7 @@ export interface VirtualHostUpdate {
|
|
|
28
28
|
*/
|
|
29
29
|
name: string;
|
|
30
30
|
/**
|
|
31
|
-
* The document root location
|
|
31
|
+
* The document root location to be served for this virtual host. When the virtual host is linked to an application, the value must be a relative path within that application directory. When no application is linked, the value must be an absolute path. Must start with one of <code>/</code> Must not be greater than 255 characters.
|
|
32
32
|
* @type {string}
|
|
33
33
|
* @memberof VirtualHostUpdate
|
|
34
34
|
*/
|
|
@@ -40,7 +40,7 @@ export interface VirtualHostUpdate {
|
|
|
40
40
|
*/
|
|
41
41
|
application_listen_address?: string | null;
|
|
42
42
|
/**
|
|
43
|
-
* The ID of the application to be associated with the virtual host.
|
|
43
|
+
* The ID of the application to be associated with the virtual host. When set, the value of `root_directory` will be relative to this application directory.
|
|
44
44
|
* @type {number}
|
|
45
45
|
* @memberof VirtualHostUpdate
|
|
46
46
|
*/
|
|
@@ -51,7 +51,7 @@ export interface VirtualHost {
|
|
|
51
51
|
*/
|
|
52
52
|
application: ApplicationRelation | null;
|
|
53
53
|
/**
|
|
54
|
-
* The document root location
|
|
54
|
+
* The document root location served by this virtual host. When the virtual host is linked to an application, the value is relative to that application directory. When no application is linked, the value is an absolute path
|
|
55
55
|
* @type {string}
|
|
56
56
|
* @memberof VirtualHost
|
|
57
57
|
*/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Devopness API TypeScript SDK - Painless essential DevOps to everyone
|
|
3
|
+
*/
|
|
4
|
+
type QueryStringParam = unknown;
|
|
5
|
+
/**
|
|
6
|
+
* Returns the query string from the given query parameters.
|
|
7
|
+
*
|
|
8
|
+
* @param inParams The query parameters.
|
|
9
|
+
* @returns The query string.
|
|
10
|
+
*/
|
|
11
|
+
export declare function parseQueryString(inParams?: Record<string, QueryStringParam>): string;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Devopness API TypeScript SDK - Painless essential DevOps to everyone
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.parseQueryString = parseQueryString;
|
|
7
|
+
/**
|
|
8
|
+
* Returns the query string from the given query parameters.
|
|
9
|
+
*
|
|
10
|
+
* @param inParams The query parameters.
|
|
11
|
+
* @returns The query string.
|
|
12
|
+
*/
|
|
13
|
+
function parseQueryString(inParams = {}) {
|
|
14
|
+
const outParams = {};
|
|
15
|
+
for (const key of Object.keys(inParams)) {
|
|
16
|
+
const value = inParams[key];
|
|
17
|
+
if (isEmpty(value)) {
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
if (key === "filter") {
|
|
21
|
+
Object.assign(outParams, parseFilterQueryString(value));
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
outParams[key] = value;
|
|
25
|
+
}
|
|
26
|
+
const searchParams = new URLSearchParams();
|
|
27
|
+
for (const key of Object.keys(outParams)) {
|
|
28
|
+
searchParams.append(key, String(outParams[key]));
|
|
29
|
+
}
|
|
30
|
+
return searchParams.toString();
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Returns the query string from the given filter parameters.
|
|
34
|
+
*
|
|
35
|
+
* @param filterParam The filter parameters.
|
|
36
|
+
* @returns The filter query string parameters.
|
|
37
|
+
*/
|
|
38
|
+
function parseFilterQueryString(filterParam) {
|
|
39
|
+
const outParams = {};
|
|
40
|
+
if (typeof filterParam !== "object" || filterParam === null || Array.isArray(filterParam)) {
|
|
41
|
+
return outParams;
|
|
42
|
+
}
|
|
43
|
+
const params = filterParam;
|
|
44
|
+
for (const key of Object.keys(params)) {
|
|
45
|
+
const value = params[key];
|
|
46
|
+
if (isEmpty(value)) {
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const filterKey = `filter[${key}]`;
|
|
50
|
+
const filterValue = String(value);
|
|
51
|
+
outParams[filterKey] = filterValue;
|
|
52
|
+
}
|
|
53
|
+
return outParams;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Return whether a query parameter value should be omitted.
|
|
57
|
+
*
|
|
58
|
+
* @param value The query parameter value.
|
|
59
|
+
* @returns Whether the query parameter value should be omitted.
|
|
60
|
+
*/
|
|
61
|
+
function isEmpty(value) {
|
|
62
|
+
return (value === undefined ||
|
|
63
|
+
value === null ||
|
|
64
|
+
value === false ||
|
|
65
|
+
value === "" ||
|
|
66
|
+
(Array.isArray(value) && value.length === 0) ||
|
|
67
|
+
(typeof value === "object" &&
|
|
68
|
+
value !== null &&
|
|
69
|
+
!Array.isArray(value) &&
|
|
70
|
+
Object.keys(value).length === 0));
|
|
71
|
+
}
|
|
@@ -33,8 +33,8 @@ export declare class ApiBaseService {
|
|
|
33
33
|
*/
|
|
34
34
|
private static decodeJwtPayload;
|
|
35
35
|
baseURL(): string;
|
|
36
|
-
protected post<T, B = undefined
|
|
37
|
-
protected put<T, B = undefined
|
|
38
|
-
protected delete<T
|
|
39
|
-
protected get<T
|
|
36
|
+
protected post<T, B = undefined>(endpoint: string, data?: B): Promise<AxiosResponse<T>>;
|
|
37
|
+
protected put<T, B = undefined>(endpoint: string, data?: B): Promise<AxiosResponse<T>>;
|
|
38
|
+
protected delete<T>(endpoint: string): Promise<AxiosResponse<T>>;
|
|
39
|
+
protected get<T>(endpoint: string): Promise<AxiosResponse<T>>;
|
|
40
40
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@devopness/sdk-js",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.6.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -64,13 +64,13 @@
|
|
|
64
64
|
"@openapitools/openapi-generator-cli": "^2.40.1",
|
|
65
65
|
"axios-mock-adapter": "^2.1.0",
|
|
66
66
|
"husky": "9.1.7",
|
|
67
|
-
"vite-plus": "0.2.
|
|
67
|
+
"vite-plus": "0.2.8",
|
|
68
68
|
"typescript": "^7.0.2",
|
|
69
69
|
"typedoc": "^0.28.20"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
72
|
"@types/parse-link-header": "^2.0.3",
|
|
73
|
-
"axios": "^1.
|
|
73
|
+
"axios": "^1.19.0",
|
|
74
74
|
"parse-link-header": "^2.0.0"
|
|
75
75
|
}
|
|
76
76
|
}
|