@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.
Files changed (74) hide show
  1. package/dist/api/generated/apis/actions-api.d.ts +3 -1
  2. package/dist/api/generated/apis/actions-api.js +18 -29
  3. package/dist/api/generated/apis/actions-logs-api.js +1 -2
  4. package/dist/api/generated/apis/applications-api.js +11 -20
  5. package/dist/api/generated/apis/applications-hooks-api.js +5 -8
  6. package/dist/api/generated/apis/applications-variables-api.js +6 -10
  7. package/dist/api/generated/apis/credentials-api.js +26 -46
  8. package/dist/api/generated/apis/credentials-repositories-api.js +6 -10
  9. package/dist/api/generated/apis/cron-jobs-api.js +10 -18
  10. package/dist/api/generated/apis/daemons-api.js +14 -26
  11. package/dist/api/generated/apis/environments-actions-api.d.ts +6 -2
  12. package/dist/api/generated/apis/environments-actions-api.js +15 -18
  13. package/dist/api/generated/apis/environments-api.js +5 -10
  14. package/dist/api/generated/apis/hook-requests-api.js +1 -2
  15. package/dist/api/generated/apis/hooks-api.js +4 -8
  16. package/dist/api/generated/apis/hooks-requests-api.js +5 -8
  17. package/dist/api/generated/apis/network-rules-api.js +10 -18
  18. package/dist/api/generated/apis/networks-api.js +13 -18
  19. package/dist/api/generated/apis/networks-subnets-api.js +8 -10
  20. package/dist/api/generated/apis/organizations-api.js +9 -16
  21. package/dist/api/generated/apis/pipelines-actions-api.js +6 -10
  22. package/dist/api/generated/apis/pipelines-api.js +9 -16
  23. package/dist/api/generated/apis/pipelines-hooks-api.js +6 -10
  24. package/dist/api/generated/apis/pipelines-steps-api.js +4 -8
  25. package/dist/api/generated/apis/projects-actions-api.js +5 -8
  26. package/dist/api/generated/apis/projects-api.js +11 -18
  27. package/dist/api/generated/apis/projects-apitokens-api.js +9 -16
  28. package/dist/api/generated/apis/projects-archived-environments-api.js +5 -8
  29. package/dist/api/generated/apis/projects-environments-api.js +6 -10
  30. package/dist/api/generated/apis/resource-events-api.js +6 -10
  31. package/dist/api/generated/apis/resource-links-api.js +12 -20
  32. package/dist/api/generated/apis/roles-api.js +9 -16
  33. package/dist/api/generated/apis/servers-api.js +19 -38
  34. package/dist/api/generated/apis/services-api.js +15 -28
  35. package/dist/api/generated/apis/services-variables-api.js +6 -10
  36. package/dist/api/generated/apis/social-accounts-api.js +9 -16
  37. package/dist/api/generated/apis/sshkeys-api.js +10 -18
  38. package/dist/api/generated/apis/sslcertificates-api.js +9 -16
  39. package/dist/api/generated/apis/static-data-api.js +27 -52
  40. package/dist/api/generated/apis/subnets-api.js +7 -12
  41. package/dist/api/generated/apis/team-invitations-api.js +6 -12
  42. package/dist/api/generated/apis/teams-api.js +32 -60
  43. package/dist/api/generated/apis/teams-invitations-api.js +6 -10
  44. package/dist/api/generated/apis/teams-members-api.js +7 -12
  45. package/dist/api/generated/apis/users-api.js +12 -24
  46. package/dist/api/generated/apis/users-environments-api.js +6 -8
  47. package/dist/api/generated/apis/users-passwords-api.js +2 -4
  48. package/dist/api/generated/apis/users-personal-access-tokens-api.js +9 -16
  49. package/dist/api/generated/apis/users-projects-api.js +6 -8
  50. package/dist/api/generated/apis/users-team-invitations-api.js +5 -8
  51. package/dist/api/generated/apis/variables-api.js +11 -16
  52. package/dist/api/generated/apis/virtual-hosts-api.js +11 -20
  53. package/dist/api/generated/models/application-apply-template-response.d.ts +1 -1
  54. package/dist/api/generated/models/application-environment-apply-template.d.ts +14 -2
  55. package/dist/api/generated/models/application-environment-create.d.ts +1 -1
  56. package/dist/api/generated/models/application-relation.d.ts +1 -1
  57. package/dist/api/generated/models/application-update.d.ts +1 -1
  58. package/dist/api/generated/models/application.d.ts +1 -1
  59. package/dist/api/generated/models/index.d.ts +3 -0
  60. package/dist/api/generated/models/index.js +3 -0
  61. package/dist/api/generated/models/list-actions-filter-parameter.d.ts +60 -0
  62. package/dist/api/generated/models/list-actions-filter-parameter.js +14 -0
  63. package/dist/api/generated/models/list-environment-actions-by-resource-type-filter-parameter.d.ts +36 -0
  64. package/dist/api/generated/models/list-environment-actions-by-resource-type-filter-parameter.js +14 -0
  65. package/dist/api/generated/models/list-environment-actions-filter-parameter.d.ts +42 -0
  66. package/dist/api/generated/models/list-environment-actions-filter-parameter.js +14 -0
  67. package/dist/api/generated/models/virtual-host-environment-create.d.ts +2 -2
  68. package/dist/api/generated/models/virtual-host-relation.d.ts +1 -1
  69. package/dist/api/generated/models/virtual-host-update.d.ts +2 -2
  70. package/dist/api/generated/models/virtual-host.d.ts +1 -1
  71. package/dist/common/utils.d.ts +12 -0
  72. package/dist/common/utils.js +71 -0
  73. package/dist/services/ApiBaseService.d.ts +4 -4
  74. package/package.json +3 -3
@@ -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
+ }
@@ -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, within the application directory, that contains the public files to be served when a user visits the domain name associated with this virtual host. Must not be greater than 255 characters.
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. The value of `root_directory` will be relative to this application directory.
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, within the application directory, that contains the public files to be served when a user visits the domain name associated with this virtual host
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, within the application directory, that contains the public files to be served when a user visits the domain name associated with this virtual host. Must not be greater than 255 characters.
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. The value of `root_directory` will be relative to this application directory.
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, within the application directory, that contains the public files to be served when a user visits the domain name associated with this virtual host
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, R = AxiosResponse<T>>(endpoint: string, data?: B): Promise<R>;
37
- protected put<T, B = undefined, R = AxiosResponse<T>>(endpoint: string, data?: B): Promise<R>;
38
- protected delete<T, R = AxiosResponse<T>>(endpoint: string): Promise<R>;
39
- protected get<T, R = AxiosResponse<T>>(endpoint: string): Promise<R>;
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.5.5",
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.6",
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.18.1",
73
+ "axios": "^1.19.0",
74
74
  "parse-link-header": "^2.0.0"
75
75
  }
76
76
  }