@devopness/sdk-js 3.6.3 → 3.6.5

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.
@@ -17,6 +17,7 @@ import { ProjectService } from "./services/ProjectService";
17
17
  import { ResourceEventService } from "./services/ResourceEventService";
18
18
  import { ResourceLinkService } from "./services/ResourceLinkService";
19
19
  import { RoleService } from "./services/RoleService";
20
+ import { SearchService } from "./services/SearchService";
20
21
  import { ServerService } from "./services/ServerService";
21
22
  import { ServiceService } from "./services/ServiceService";
22
23
  import { SocialAccountService } from "./services/SocialAccountService";
@@ -48,6 +49,7 @@ export declare class DevopnessApiClient {
48
49
  resourceEvents: ResourceEventService;
49
50
  resourceLinks: ResourceLinkService;
50
51
  roles: RoleService;
52
+ search: SearchService;
51
53
  servers: ServerService;
52
54
  services: ServiceService;
53
55
  socialAccounts: SocialAccountService;
@@ -20,6 +20,7 @@ const ProjectService_1 = require("./services/ProjectService");
20
20
  const ResourceEventService_1 = require("./services/ResourceEventService");
21
21
  const ResourceLinkService_1 = require("./services/ResourceLinkService");
22
22
  const RoleService_1 = require("./services/RoleService");
23
+ const SearchService_1 = require("./services/SearchService");
23
24
  const ServerService_1 = require("./services/ServerService");
24
25
  const ServiceService_1 = require("./services/ServiceService");
25
26
  const SocialAccountService_1 = require("./services/SocialAccountService");
@@ -56,6 +57,7 @@ class DevopnessApiClient {
56
57
  this.resourceEvents = new ResourceEventService_1.ResourceEventService();
57
58
  this.resourceLinks = new ResourceLinkService_1.ResourceLinkService();
58
59
  this.roles = new RoleService_1.RoleService();
60
+ this.search = new SearchService_1.SearchService();
59
61
  this.servers = new ServerService_1.ServerService();
60
62
  this.services = new ServiceService_1.ServiceService();
61
63
  this.socialAccounts = new SocialAccountService_1.SocialAccountService();
@@ -30,7 +30,7 @@ export declare class ActionsApiService extends ApiBaseService {
30
30
  * @summary Return a list of all actions belonging to current user
31
31
  * @param {number} [page] Number of the page to be retrieved
32
32
  * @param {number} [perPage] Number of items returned per page
33
- * @param {ListActionsFilterParameter} [filter] Filter the results using the available fields. Multiple filters can be combined. Example: `?filter[resource_type]=application&filter[status]=active`
33
+ * @param {ListActionsFilterParameter} [filter] Filter the results using the available fields. Multiple filters can be combined. Example: `?filter[organization_id]=123&filter[project_id]=456`
34
34
  */
35
35
  listActions(page?: number, perPage?: number, filter?: ListActionsFilterParameter): Promise<ApiResponse<Array<ActionRelation>>>;
36
36
  /**
@@ -50,7 +50,7 @@ class ActionsApiService extends ApiBaseService_1.ApiBaseService {
50
50
  * @summary Return a list of all actions belonging to current user
51
51
  * @param {number} [page] Number of the page to be retrieved
52
52
  * @param {number} [perPage] Number of items returned per page
53
- * @param {ListActionsFilterParameter} [filter] Filter the results using the available fields. Multiple filters can be combined. Example: &#x60;?filter[resource_type]&#x3D;application&amp;filter[status]&#x3D;active&#x60;
53
+ * @param {ListActionsFilterParameter} [filter] Filter the results using the available fields. Multiple filters can be combined. Example: &#x60;?filter[organization_id]&#x3D;123&amp;filter[project_id]&#x3D;456&#x60;
54
54
  */
55
55
  listActions(page, perPage, filter) {
56
56
  return __awaiter(this, void 0, void 0, function* () {
@@ -62,7 +62,7 @@ export declare class ApplicationsApiService extends ApiBaseService {
62
62
  * @param {number} environmentId The ID of the environment.
63
63
  * @param {number} [page] Number of the page to be retrieved
64
64
  * @param {number} [perPage] Number of items returned per page
65
- * @param {ListEnvironmentApplicationsFilterParameter} [filter] Filter the results using the available fields. Multiple filters can be combined. Example: &#x60;?filter[resource_type]&#x3D;application&amp;filter[status]&#x3D;active&#x60;
65
+ * @param {ListEnvironmentApplicationsFilterParameter} [filter] Filter the results using the available fields. Multiple filters can be combined. Example: &#x60;?filter[name]&#x3D;app&#x60;
66
66
  */
67
67
  listEnvironmentApplications(environmentId: number, page?: number, perPage?: number, filter?: ListEnvironmentApplicationsFilterParameter): Promise<ApiResponse<Array<ApplicationRelation>>>;
68
68
  /**
@@ -123,7 +123,7 @@ class ApplicationsApiService extends ApiBaseService_1.ApiBaseService {
123
123
  * @param {number} environmentId The ID of the environment.
124
124
  * @param {number} [page] Number of the page to be retrieved
125
125
  * @param {number} [perPage] Number of items returned per page
126
- * @param {ListEnvironmentApplicationsFilterParameter} [filter] Filter the results using the available fields. Multiple filters can be combined. Example: &#x60;?filter[resource_type]&#x3D;application&amp;filter[status]&#x3D;active&#x60;
126
+ * @param {ListEnvironmentApplicationsFilterParameter} [filter] Filter the results using the available fields. Multiple filters can be combined. Example: &#x60;?filter[name]&#x3D;app&#x60;
127
127
  */
128
128
  listEnvironmentApplications(environmentId, page, perPage, filter) {
129
129
  return __awaiter(this, void 0, void 0, function* () {
@@ -24,7 +24,7 @@ export declare class EnvironmentsActionsApiService extends ApiBaseService {
24
24
  * @param {number} environmentId The ID of the environment.
25
25
  * @param {number} [page] Number of the page to be retrieved
26
26
  * @param {number} [perPage] Number of items returned per page
27
- * @param {ListEnvironmentActionsFilterParameter} [filter] Filter the results using the available fields. Multiple filters can be combined. Example: &#x60;?filter[resource_type]&#x3D;application&amp;filter[status]&#x3D;active&#x60;
27
+ * @param {ListEnvironmentActionsFilterParameter} [filter] Filter the results using the available fields. Multiple filters can be combined. Example: &#x60;?filter[resource_type]&#x3D;application&amp;filter[resource_id]&#x3D;321&#x60;
28
28
  */
29
29
  listEnvironmentActions(environmentId: number, page?: number, perPage?: number, filter?: ListEnvironmentActionsFilterParameter): Promise<ApiResponse<Array<ActionRelation>>>;
30
30
  /**
@@ -34,7 +34,7 @@ export declare class EnvironmentsActionsApiService extends ApiBaseService {
34
34
  * @param {string} resourceType The resource type to get related actions.
35
35
  * @param {number} [page] Number of the page to be retrieved
36
36
  * @param {number} [perPage] Number of items returned per page
37
- * @param {ListEnvironmentActionsByResourceTypeFilterParameter} [filter] Filter the results using the available fields. Multiple filters can be combined. Example: &#x60;?filter[resource_type]&#x3D;application&amp;filter[status]&#x3D;active&#x60;
37
+ * @param {ListEnvironmentActionsByResourceTypeFilterParameter} [filter] Filter the results using the available fields. Multiple filters can be combined. Example: &#x60;?filter[resource_id]&#x3D;321&amp;filter[status]&#x3D;queued&#x60;
38
38
  */
39
39
  listEnvironmentActionsByResourceType(environmentId: number, resourceType: string, page?: number, perPage?: number, filter?: ListEnvironmentActionsByResourceTypeFilterParameter): Promise<ApiResponse<Array<ActionRelation>>>;
40
40
  }
@@ -36,7 +36,7 @@ class EnvironmentsActionsApiService extends ApiBaseService_1.ApiBaseService {
36
36
  * @param {number} environmentId The ID of the environment.
37
37
  * @param {number} [page] Number of the page to be retrieved
38
38
  * @param {number} [perPage] Number of items returned per page
39
- * @param {ListEnvironmentActionsFilterParameter} [filter] Filter the results using the available fields. Multiple filters can be combined. Example: &#x60;?filter[resource_type]&#x3D;application&amp;filter[status]&#x3D;active&#x60;
39
+ * @param {ListEnvironmentActionsFilterParameter} [filter] Filter the results using the available fields. Multiple filters can be combined. Example: &#x60;?filter[resource_type]&#x3D;application&amp;filter[resource_id]&#x3D;321&#x60;
40
40
  */
41
41
  listEnvironmentActions(environmentId, page, perPage, filter) {
42
42
  return __awaiter(this, void 0, void 0, function* () {
@@ -60,7 +60,7 @@ class EnvironmentsActionsApiService extends ApiBaseService_1.ApiBaseService {
60
60
  * @param {string} resourceType The resource type to get related actions.
61
61
  * @param {number} [page] Number of the page to be retrieved
62
62
  * @param {number} [perPage] Number of items returned per page
63
- * @param {ListEnvironmentActionsByResourceTypeFilterParameter} [filter] Filter the results using the available fields. Multiple filters can be combined. Example: &#x60;?filter[resource_type]&#x3D;application&amp;filter[status]&#x3D;active&#x60;
63
+ * @param {ListEnvironmentActionsByResourceTypeFilterParameter} [filter] Filter the results using the available fields. Multiple filters can be combined. Example: &#x60;?filter[resource_id]&#x3D;321&amp;filter[status]&#x3D;queued&#x60;
64
64
  */
65
65
  listEnvironmentActionsByResourceType(environmentId, resourceType, page, perPage, filter) {
66
66
  return __awaiter(this, void 0, void 0, function* () {
@@ -0,0 +1,29 @@
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 { SearchResourceRelation } from '../../generated/models';
15
+ /**
16
+ * SearchApiService - Auto-generated
17
+ */
18
+ export declare class SearchApiService extends ApiBaseService {
19
+ /**
20
+ *
21
+ * @summary Search resources the user can access in Devopness.
22
+ * @param {string} organizationId The organization ID or URL Slug to search within.
23
+ * @param {string} q The search expression used to match resources. Must be at least 2 characters. Must not be greater than 255 characters.
24
+ * @param {string} resourceType The resource family to search.
25
+ * @param {number} [page] Number of the page to be retrieved
26
+ * @param {number} [perPage] Number of items returned per page
27
+ */
28
+ listSearchResources(organizationId: string, q: string, resourceType: string, page?: number, perPage?: number): Promise<ApiResponse<Array<SearchResourceRelation>>>;
29
+ }
@@ -0,0 +1,66 @@
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.SearchApiService = void 0;
25
+ const ApiBaseService_1 = require("../../../services/ApiBaseService");
26
+ const ApiResponse_1 = require("../../../common/ApiResponse");
27
+ const Exceptions_1 = require("../../../common/Exceptions");
28
+ const utils_1 = require("../../../common/utils");
29
+ /**
30
+ * SearchApiService - Auto-generated
31
+ */
32
+ class SearchApiService extends ApiBaseService_1.ApiBaseService {
33
+ /**
34
+ *
35
+ * @summary Search resources the user can access in Devopness.
36
+ * @param {string} organizationId The organization ID or URL Slug to search within.
37
+ * @param {string} q The search expression used to match resources. Must be at least 2 characters. Must not be greater than 255 characters.
38
+ * @param {string} resourceType The resource family to search.
39
+ * @param {number} [page] Number of the page to be retrieved
40
+ * @param {number} [perPage] Number of items returned per page
41
+ */
42
+ listSearchResources(organizationId, q, resourceType, page, perPage) {
43
+ return __awaiter(this, void 0, void 0, function* () {
44
+ if (organizationId === null || organizationId === undefined) {
45
+ throw new Exceptions_1.ArgumentNullException('organizationId', 'listSearchResources');
46
+ }
47
+ if (q === null || q === undefined) {
48
+ throw new Exceptions_1.ArgumentNullException('q', 'listSearchResources');
49
+ }
50
+ if (resourceType === null || resourceType === undefined) {
51
+ throw new Exceptions_1.ArgumentNullException('resourceType', 'listSearchResources');
52
+ }
53
+ let queryString = (0, utils_1.parseQueryString)({
54
+ 'page': page,
55
+ 'per_page': perPage,
56
+ 'organization_id': organizationId,
57
+ 'q': q,
58
+ 'resource_type': resourceType,
59
+ });
60
+ const requestUrl = '/search' + (queryString ? `?${queryString}` : '');
61
+ const response = yield this.get(requestUrl);
62
+ return new ApiResponse_1.ApiResponse(response);
63
+ });
64
+ }
65
+ }
66
+ exports.SearchApiService = SearchApiService;
@@ -225,6 +225,7 @@ export * from './role-organization-create';
225
225
  export * from './role-relation';
226
226
  export * from './role-update';
227
227
  export * from './script-runner';
228
+ export * from './search-resource-relation';
228
229
  export * from './server';
229
230
  export * from './server-blueprint';
230
231
  export * from './server-blueprint-spec';
@@ -241,6 +241,7 @@ __exportStar(require("./role-organization-create"), exports);
241
241
  __exportStar(require("./role-relation"), exports);
242
242
  __exportStar(require("./role-update"), exports);
243
243
  __exportStar(require("./script-runner"), exports);
244
+ __exportStar(require("./search-resource-relation"), exports);
244
245
  __exportStar(require("./server"), exports);
245
246
  __exportStar(require("./server-blueprint"), exports);
246
247
  __exportStar(require("./server-blueprint-spec"), exports);
@@ -0,0 +1,54 @@
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 SearchResourceRelation
16
+ */
17
+ export interface SearchResourceRelation {
18
+ /**
19
+ * The matched resource type
20
+ * @type {string}
21
+ * @memberof SearchResourceRelation
22
+ */
23
+ resource_type: string;
24
+ /**
25
+ * The matched resource ID
26
+ * @type {number}
27
+ * @memberof SearchResourceRelation
28
+ */
29
+ resource_id: number;
30
+ /**
31
+ * The display name shown to the user
32
+ * @type {string}
33
+ * @memberof SearchResourceRelation
34
+ */
35
+ resource_name: string;
36
+ /**
37
+ * The organization that owns or contains the resource
38
+ * @type {number}
39
+ * @memberof SearchResourceRelation
40
+ */
41
+ organization_id?: number;
42
+ /**
43
+ * The project that contains the resource when applicable
44
+ * @type {number}
45
+ * @memberof SearchResourceRelation
46
+ */
47
+ project_id?: number;
48
+ /**
49
+ * The environment that contains the resource when applicable
50
+ * @type {number}
51
+ * @memberof SearchResourceRelation
52
+ */
53
+ environment_id?: number;
54
+ }
@@ -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,3 @@
1
+ import { SearchApiService } from "../api/generated/apis/search-api";
2
+ export declare class SearchService extends SearchApiService {
3
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SearchService = void 0;
4
+ const search_api_1 = require("../api/generated/apis/search-api");
5
+ class SearchService extends search_api_1.SearchApiService {
6
+ }
7
+ exports.SearchService = SearchService;
@@ -16,6 +16,7 @@ export * from "./ProjectService";
16
16
  export * from "./ResourceEventService";
17
17
  export * from "./ResourceLinkService";
18
18
  export * from "./RoleService";
19
+ export * from "./SearchService";
19
20
  export * from "./ServerService";
20
21
  export * from "./ServiceService";
21
22
  export * from "./SocialAccountService";
@@ -32,6 +32,7 @@ __exportStar(require("./ProjectService"), exports);
32
32
  __exportStar(require("./ResourceEventService"), exports);
33
33
  __exportStar(require("./ResourceLinkService"), exports);
34
34
  __exportStar(require("./RoleService"), exports);
35
+ __exportStar(require("./SearchService"), exports);
35
36
  __exportStar(require("./ServerService"), exports);
36
37
  __exportStar(require("./ServiceService"), exports);
37
38
  __exportStar(require("./SocialAccountService"), exports);
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.6.3",
4
+ "version": "3.6.5",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -64,7 +64,7 @@
64
64
  "@openapitools/openapi-generator-cli": "^2.41.0",
65
65
  "axios-mock-adapter": "^2.1.0",
66
66
  "husky": "9.1.7",
67
- "vite-plus": "0.3.1",
67
+ "vite-plus": "0.3.3",
68
68
  "typescript": "^7.0.2",
69
69
  "typedoc": "^0.28.20"
70
70
  },