@devopness/sdk-js 2.47.0 → 2.49.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.
@@ -13,6 +13,7 @@ import { NetworkRuleService } from './services/NetworkRuleService';
13
13
  import { PipelineService } from './services/PipelineService';
14
14
  import { ProjectService } from './services/ProjectService';
15
15
  import { ResourceEventService } from './services/ResourceEventService';
16
+ import { ResourceLinkService } from './services/ResourceLinkService';
16
17
  import { RoleService } from './services/RoleService';
17
18
  import { ServerService } from './services/ServerService';
18
19
  import { ServiceService } from './services/ServiceService';
@@ -40,6 +41,7 @@ export declare class DevopnessApiClient {
40
41
  pipelines: PipelineService;
41
42
  projects: ProjectService;
42
43
  resourceEvents: ResourceEventService;
44
+ resourceLinks: ResourceLinkService;
43
45
  roles: RoleService;
44
46
  servers: ServerService;
45
47
  services: ServiceService;
@@ -16,6 +16,7 @@ const NetworkRuleService_1 = require("./services/NetworkRuleService");
16
16
  const PipelineService_1 = require("./services/PipelineService");
17
17
  const ProjectService_1 = require("./services/ProjectService");
18
18
  const ResourceEventService_1 = require("./services/ResourceEventService");
19
+ const ResourceLinkService_1 = require("./services/ResourceLinkService");
19
20
  const RoleService_1 = require("./services/RoleService");
20
21
  const ServerService_1 = require("./services/ServerService");
21
22
  const ServiceService_1 = require("./services/ServiceService");
@@ -48,6 +49,7 @@ class DevopnessApiClient {
48
49
  this.pipelines = new PipelineService_1.PipelineService();
49
50
  this.projects = new ProjectService_1.ProjectService();
50
51
  this.resourceEvents = new ResourceEventService_1.ResourceEventService();
52
+ this.resourceLinks = new ResourceLinkService_1.ResourceLinkService();
51
53
  this.roles = new RoleService_1.RoleService();
52
54
  this.servers = new ServerService_1.ServerService();
53
55
  this.services = new ServiceService_1.ServiceService();
@@ -0,0 +1,47 @@
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 { ResourceLinkRelation } from '../../generated/models';
15
+ /**
16
+ * ResourceLinksApiService - Auto-generated
17
+ */
18
+ export declare class ResourceLinksApiService extends ApiBaseService {
19
+ /**
20
+ *
21
+ * @summary List linked resources of the given resource
22
+ * @param {number} resourceId The resource ID.
23
+ * @param {string} resourceType The resource type to get linked resources.
24
+ * @param {number} [page] Number of the page to be retrieved
25
+ * @param {number} [perPage] Number of items returned per page
26
+ */
27
+ listResourceLinksByResourceType(resourceId: number, resourceType: string, page?: number, perPage?: number): Promise<ApiResponse<Array<ResourceLinkRelation>>>;
28
+ /**
29
+ *
30
+ * @summary List linked resources of specified link type
31
+ * @param {string} linkType The link type (&#x60;child&#x60; or &#x60;parent&#x60;).
32
+ * @param {number} resourceId The resource ID.
33
+ * @param {string} resourceType The resource type to get linked resources.
34
+ * @param {number} [page] Number of the page to be retrieved
35
+ * @param {number} [perPage] Number of items returned per page
36
+ */
37
+ listResourceLinksByResourceTypeAndLinkType(linkType: string, resourceId: number, resourceType: string, page?: number, perPage?: number): Promise<ApiResponse<Array<ResourceLinkRelation>>>;
38
+ /**
39
+ *
40
+ * @summary Delete a given resource link
41
+ * @param {number} childId The child resource ID.
42
+ * @param {string} childType The resource type of the child resource.
43
+ * @param {number} resourceId The parent resource ID.
44
+ * @param {string} resourceType The resource type of the parent resource.
45
+ */
46
+ unlinkResourceLinkFromResourceLink(childId: number, childType: string, resourceId: number, resourceType: string): Promise<ApiResponse<void>>;
47
+ }
@@ -0,0 +1,123 @@
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.ResourceLinksApiService = 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
+ * ResourceLinksApiService - Auto-generated
30
+ */
31
+ class ResourceLinksApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary List linked resources of the given resource
35
+ * @param {number} resourceId The resource ID.
36
+ * @param {string} resourceType The resource type to get linked resources.
37
+ * @param {number} [page] Number of the page to be retrieved
38
+ * @param {number} [perPage] Number of items returned per page
39
+ */
40
+ listResourceLinksByResourceType(resourceId, resourceType, page, perPage) {
41
+ return __awaiter(this, void 0, void 0, function* () {
42
+ if (resourceId === null || resourceId === undefined) {
43
+ throw new Exceptions_1.ArgumentNullException('resourceId', 'listResourceLinksByResourceType');
44
+ }
45
+ if (resourceType === null || resourceType === undefined) {
46
+ throw new Exceptions_1.ArgumentNullException('resourceType', 'listResourceLinksByResourceType');
47
+ }
48
+ let queryString = '';
49
+ const queryParams = { page: page, per_page: perPage, };
50
+ for (const key in queryParams) {
51
+ if (queryParams[key] === undefined || queryParams[key] === null) {
52
+ continue;
53
+ }
54
+ queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
55
+ }
56
+ const requestUrl = '/resource-links/{resource_type}/{resource_id}' + (queryString ? `?${queryString}` : '');
57
+ const response = yield this.get(requestUrl.replace(`{${"resource_id"}}`, encodeURIComponent(String(resourceId))).replace(`{${"resource_type"}}`, encodeURIComponent(String(resourceType))));
58
+ return new ApiResponse_1.ApiResponse(response);
59
+ });
60
+ }
61
+ /**
62
+ *
63
+ * @summary List linked resources of specified link type
64
+ * @param {string} linkType The link type (&#x60;child&#x60; or &#x60;parent&#x60;).
65
+ * @param {number} resourceId The resource ID.
66
+ * @param {string} resourceType The resource type to get linked resources.
67
+ * @param {number} [page] Number of the page to be retrieved
68
+ * @param {number} [perPage] Number of items returned per page
69
+ */
70
+ listResourceLinksByResourceTypeAndLinkType(linkType, resourceId, resourceType, page, perPage) {
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ if (linkType === null || linkType === undefined) {
73
+ throw new Exceptions_1.ArgumentNullException('linkType', 'listResourceLinksByResourceTypeAndLinkType');
74
+ }
75
+ if (resourceId === null || resourceId === undefined) {
76
+ throw new Exceptions_1.ArgumentNullException('resourceId', 'listResourceLinksByResourceTypeAndLinkType');
77
+ }
78
+ if (resourceType === null || resourceType === undefined) {
79
+ throw new Exceptions_1.ArgumentNullException('resourceType', 'listResourceLinksByResourceTypeAndLinkType');
80
+ }
81
+ let queryString = '';
82
+ const queryParams = { page: page, per_page: perPage, };
83
+ for (const key in queryParams) {
84
+ if (queryParams[key] === undefined || queryParams[key] === null) {
85
+ continue;
86
+ }
87
+ queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
88
+ }
89
+ const requestUrl = '/resource-links/{resource_type}/{resource_id}/{link_type}' + (queryString ? `?${queryString}` : '');
90
+ const response = yield this.get(requestUrl.replace(`{${"link_type"}}`, encodeURIComponent(String(linkType))).replace(`{${"resource_id"}}`, encodeURIComponent(String(resourceId))).replace(`{${"resource_type"}}`, encodeURIComponent(String(resourceType))));
91
+ return new ApiResponse_1.ApiResponse(response);
92
+ });
93
+ }
94
+ /**
95
+ *
96
+ * @summary Delete a given resource link
97
+ * @param {number} childId The child resource ID.
98
+ * @param {string} childType The resource type of the child resource.
99
+ * @param {number} resourceId The parent resource ID.
100
+ * @param {string} resourceType The resource type of the parent resource.
101
+ */
102
+ unlinkResourceLinkFromResourceLink(childId, childType, resourceId, resourceType) {
103
+ return __awaiter(this, void 0, void 0, function* () {
104
+ if (childId === null || childId === undefined) {
105
+ throw new Exceptions_1.ArgumentNullException('childId', 'unlinkResourceLinkFromResourceLink');
106
+ }
107
+ if (childType === null || childType === undefined) {
108
+ throw new Exceptions_1.ArgumentNullException('childType', 'unlinkResourceLinkFromResourceLink');
109
+ }
110
+ if (resourceId === null || resourceId === undefined) {
111
+ throw new Exceptions_1.ArgumentNullException('resourceId', 'unlinkResourceLinkFromResourceLink');
112
+ }
113
+ if (resourceType === null || resourceType === undefined) {
114
+ throw new Exceptions_1.ArgumentNullException('resourceType', 'unlinkResourceLinkFromResourceLink');
115
+ }
116
+ let queryString = '';
117
+ const requestUrl = '/resource-links/{resource_type}/{resource_id}/{child_type}/{child_id}/unlink' + (queryString ? `?${queryString}` : '');
118
+ const response = yield this.delete(requestUrl.replace(`{${"child_id"}}`, encodeURIComponent(String(childId))).replace(`{${"child_type"}}`, encodeURIComponent(String(childType))).replace(`{${"resource_id"}}`, encodeURIComponent(String(resourceId))).replace(`{${"resource_type"}}`, encodeURIComponent(String(resourceType))));
119
+ return new ApiResponse_1.ApiResponse(response);
120
+ });
121
+ }
122
+ }
123
+ exports.ResourceLinksApiService = ResourceLinksApiService;
@@ -93,6 +93,7 @@ export * from './language-runtime';
93
93
  export * from './language-runtime-engine-versions';
94
94
  export * from './language-runtime-framework';
95
95
  export * from './language-runtime-framework-defaults';
96
+ export * from './linked-resource-data';
96
97
  export * from './log';
97
98
  export * from './member';
98
99
  export * from './member-relation';
@@ -124,6 +125,7 @@ export * from './repository-relation';
124
125
  export * from './request-relation';
125
126
  export * from './resource';
126
127
  export * from './resource-event-relation';
128
+ export * from './resource-link-relation';
127
129
  export * from './resource-type';
128
130
  export * from './role';
129
131
  export * from './role-project-create';
@@ -109,6 +109,7 @@ __exportStar(require("./language-runtime"), exports);
109
109
  __exportStar(require("./language-runtime-engine-versions"), exports);
110
110
  __exportStar(require("./language-runtime-framework"), exports);
111
111
  __exportStar(require("./language-runtime-framework-defaults"), exports);
112
+ __exportStar(require("./linked-resource-data"), exports);
112
113
  __exportStar(require("./log"), exports);
113
114
  __exportStar(require("./member"), exports);
114
115
  __exportStar(require("./member-relation"), exports);
@@ -140,6 +141,7 @@ __exportStar(require("./repository-relation"), exports);
140
141
  __exportStar(require("./request-relation"), exports);
141
142
  __exportStar(require("./resource"), exports);
142
143
  __exportStar(require("./resource-event-relation"), exports);
144
+ __exportStar(require("./resource-link-relation"), exports);
143
145
  __exportStar(require("./resource-type"), exports);
144
146
  __exportStar(require("./role"), exports);
145
147
  __exportStar(require("./role-project-create"), exports);
@@ -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
+ * Object containing linked resource data
14
+ * @export
15
+ * @interface LinkedResourceData
16
+ */
17
+ export interface LinkedResourceData {
18
+ /**
19
+ * The unique ID of the resource
20
+ * @type {number}
21
+ * @memberof LinkedResourceData
22
+ */
23
+ id: number;
24
+ /**
25
+ * Resource name
26
+ * @type {string}
27
+ * @memberof LinkedResourceData
28
+ */
29
+ name: string;
30
+ /**
31
+ * The date and time when the record was created
32
+ * @type {string}
33
+ * @memberof LinkedResourceData
34
+ */
35
+ created_at?: string;
36
+ /**
37
+ * The date and time when the record was last updated
38
+ * @type {string}
39
+ * @memberof LinkedResourceData
40
+ */
41
+ updated_at?: 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 });
@@ -0,0 +1,55 @@
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 { LinkedResourceData } from './linked-resource-data';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface ResourceLinkRelation
17
+ */
18
+ export interface ResourceLinkRelation {
19
+ /**
20
+ * The link type to related resource (`child` or `parent`)
21
+ * @type {string}
22
+ * @memberof ResourceLinkRelation
23
+ */
24
+ link_type: string;
25
+ /**
26
+ * The human readable resource type
27
+ * @type {string}
28
+ * @memberof ResourceLinkRelation
29
+ */
30
+ resource_type_human_readable: string;
31
+ /**
32
+ * The linked resource type
33
+ * @type {string}
34
+ * @memberof ResourceLinkRelation
35
+ */
36
+ resource_type: string;
37
+ /**
38
+ * The linked resource ID
39
+ * @type {string}
40
+ * @memberof ResourceLinkRelation
41
+ */
42
+ resource_id: string;
43
+ /**
44
+ *
45
+ * @type {LinkedResourceData}
46
+ * @memberof ResourceLinkRelation
47
+ */
48
+ linked_resource_data: LinkedResourceData;
49
+ /**
50
+ *
51
+ * @type {Array<ResourceLinkRelation>}
52
+ * @memberof ResourceLinkRelation
53
+ */
54
+ children?: Array<ResourceLinkRelation>;
55
+ }
@@ -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 });
@@ -61,12 +61,6 @@ export interface SslCertificateRelation {
61
61
  * @memberof SslCertificateRelation
62
62
  */
63
63
  domains: Array<string>;
64
- /**
65
- * The application ID that contains this certificate
66
- * @type {number}
67
- * @memberof SslCertificateRelation
68
- */
69
- application_id: number;
70
64
  /**
71
65
  *
72
66
  * @type {ActionRelation}
@@ -64,12 +64,6 @@ export interface SslCertificate {
64
64
  * @memberof SslCertificate
65
65
  */
66
66
  domains: Array<string>;
67
- /**
68
- * The application ID that contains this certificate
69
- * @type {number}
70
- * @memberof SslCertificate
71
- */
72
- application_id: number;
73
67
  /**
74
68
  *
75
69
  * @type {UserRelation}
@@ -0,0 +1,3 @@
1
+ import { ResourceLinksApiService } from '../api/generated/apis/resource-links-api';
2
+ export declare class ResourceLinkService extends ResourceLinksApiService {
3
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ResourceLinkService = void 0;
4
+ const resource_links_api_1 = require("../api/generated/apis/resource-links-api");
5
+ class ResourceLinkService extends resource_links_api_1.ResourceLinksApiService {
6
+ }
7
+ exports.ResourceLinkService = ResourceLinkService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devopness/sdk-js",
3
- "version": "2.47.0",
3
+ "version": "2.49.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },