@devopness/sdk-js 3.1.7 → 3.1.9

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.
@@ -23,6 +23,12 @@ export declare class EnvironmentsApiService extends ApiBaseService {
23
23
  * @param {number} environmentId The ID of the environment.
24
24
  */
25
25
  archiveEnvironment(environmentId: number): Promise<ApiResponse<void>>;
26
+ /**
27
+ *
28
+ * @summary Delete a given environment
29
+ * @param {number} environmentId The ID of the environment.
30
+ */
31
+ deleteEnvironment(environmentId: number): Promise<ApiResponse<void>>;
26
32
  /**
27
33
  *
28
34
  * @summary Get an environment by ID
@@ -45,6 +45,22 @@ class EnvironmentsApiService extends ApiBaseService_1.ApiBaseService {
45
45
  return new ApiResponse_1.ApiResponse(response);
46
46
  });
47
47
  }
48
+ /**
49
+ *
50
+ * @summary Delete a given environment
51
+ * @param {number} environmentId The ID of the environment.
52
+ */
53
+ deleteEnvironment(environmentId) {
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ if (environmentId === null || environmentId === undefined) {
56
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'deleteEnvironment');
57
+ }
58
+ let queryString = '';
59
+ const requestUrl = '/environments/{environment_id}' + (queryString ? `?${queryString}` : '');
60
+ const response = yield this.delete(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
61
+ return new ApiResponse_1.ApiResponse(response);
62
+ });
63
+ }
48
64
  /**
49
65
  *
50
66
  * @summary Get an environment by ID
@@ -25,6 +25,12 @@ export declare class OrganizationsApiService extends ApiBaseService {
25
25
  * @param {OrganizationCreate} organizationCreate A JSON object containing the resource data
26
26
  */
27
27
  addOrganization(organizationCreate: OrganizationCreate): Promise<ApiResponse<Organization>>;
28
+ /**
29
+ *
30
+ * @summary Delete a given organization
31
+ * @param {string} organizationId The numeric ID or URL Slug of an organization.
32
+ */
33
+ deleteOrganization(organizationId: string): Promise<ApiResponse<void>>;
28
34
  /**
29
35
  *
30
36
  * @summary Get an organization by ID or URL Slug
@@ -45,6 +45,22 @@ class OrganizationsApiService extends ApiBaseService_1.ApiBaseService {
45
45
  return new ApiResponse_1.ApiResponse(response);
46
46
  });
47
47
  }
48
+ /**
49
+ *
50
+ * @summary Delete a given organization
51
+ * @param {string} organizationId The numeric ID or URL Slug of an organization.
52
+ */
53
+ deleteOrganization(organizationId) {
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ if (organizationId === null || organizationId === undefined) {
56
+ throw new Exceptions_1.ArgumentNullException('organizationId', 'deleteOrganization');
57
+ }
58
+ let queryString = '';
59
+ const requestUrl = '/organizations/{organization_id}' + (queryString ? `?${queryString}` : '');
60
+ const response = yield this.delete(requestUrl.replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId))));
61
+ return new ApiResponse_1.ApiResponse(response);
62
+ });
63
+ }
48
64
  /**
49
65
  *
50
66
  * @summary Get an organization by ID or URL Slug
@@ -13,18 +13,32 @@ import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { Project } from '../../generated/models';
15
15
  import { ProjectCreate } from '../../generated/models';
16
+ import { ProjectOrganizationCreate } from '../../generated/models';
16
17
  import { ProjectRelation } from '../../generated/models';
17
18
  import { ProjectUpdate } from '../../generated/models';
18
19
  /**
19
20
  * ProjectsApiService - Auto-generated
20
21
  */
21
22
  export declare class ProjectsApiService extends ApiBaseService {
23
+ /**
24
+ *
25
+ * @summary Create a project to a given organization
26
+ * @param {string} organizationId The numeric ID or URL Slug of an organization.
27
+ * @param {ProjectOrganizationCreate} projectOrganizationCreate A JSON object containing the resource data
28
+ */
29
+ addOrganizationProject(organizationId: string, projectOrganizationCreate: ProjectOrganizationCreate): Promise<ApiResponse<Project>>;
22
30
  /**
23
31
  *
24
32
  * @summary Create a project for the authenticated user
25
33
  * @param {ProjectCreate} projectCreate A JSON object containing the resource data
26
34
  */
27
35
  addProject(projectCreate: ProjectCreate): Promise<ApiResponse<Project>>;
36
+ /**
37
+ *
38
+ * @summary Delete a given project
39
+ * @param {number} projectId The ID of the project.
40
+ */
41
+ deleteProject(projectId: number): Promise<ApiResponse<void>>;
28
42
  /**
29
43
  *
30
44
  * @summary Get a Project by ID
@@ -29,6 +29,26 @@ const Exceptions_1 = require("../../../common/Exceptions");
29
29
  * ProjectsApiService - Auto-generated
30
30
  */
31
31
  class ProjectsApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary Create a project to a given organization
35
+ * @param {string} organizationId The numeric ID or URL Slug of an organization.
36
+ * @param {ProjectOrganizationCreate} projectOrganizationCreate A JSON object containing the resource data
37
+ */
38
+ addOrganizationProject(organizationId, projectOrganizationCreate) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (organizationId === null || organizationId === undefined) {
41
+ throw new Exceptions_1.ArgumentNullException('organizationId', 'addOrganizationProject');
42
+ }
43
+ if (projectOrganizationCreate === null || projectOrganizationCreate === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('projectOrganizationCreate', 'addOrganizationProject');
45
+ }
46
+ let queryString = '';
47
+ const requestUrl = '/organizations/{organization_id}/projects' + (queryString ? `?${queryString}` : '');
48
+ const response = yield this.post(requestUrl.replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId))), projectOrganizationCreate);
49
+ return new ApiResponse_1.ApiResponse(response);
50
+ });
51
+ }
32
52
  /**
33
53
  *
34
54
  * @summary Create a project for the authenticated user
@@ -45,6 +65,22 @@ class ProjectsApiService extends ApiBaseService_1.ApiBaseService {
45
65
  return new ApiResponse_1.ApiResponse(response);
46
66
  });
47
67
  }
68
+ /**
69
+ *
70
+ * @summary Delete a given project
71
+ * @param {number} projectId The ID of the project.
72
+ */
73
+ deleteProject(projectId) {
74
+ return __awaiter(this, void 0, void 0, function* () {
75
+ if (projectId === null || projectId === undefined) {
76
+ throw new Exceptions_1.ArgumentNullException('projectId', 'deleteProject');
77
+ }
78
+ let queryString = '';
79
+ const requestUrl = '/projects/{project_id}' + (queryString ? `?${queryString}` : '');
80
+ const response = yield this.delete(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))));
81
+ return new ApiResponse_1.ApiResponse(response);
82
+ });
83
+ }
48
84
  /**
49
85
  *
50
86
  * @summary Get a Project by ID
@@ -181,6 +181,7 @@ export * from './pipeline-trigger-when';
181
181
  export * from './pipeline-update';
182
182
  export * from './project';
183
183
  export * from './project-create';
184
+ export * from './project-organization-create';
184
185
  export * from './project-owner-relation';
185
186
  export * from './project-owner-type';
186
187
  export * from './project-relation';
@@ -197,6 +197,7 @@ __exportStar(require("./pipeline-trigger-when"), exports);
197
197
  __exportStar(require("./pipeline-update"), exports);
198
198
  __exportStar(require("./project"), exports);
199
199
  __exportStar(require("./project-create"), exports);
200
+ __exportStar(require("./project-organization-create"), exports);
200
201
  __exportStar(require("./project-owner-relation"), exports);
201
202
  __exportStar(require("./project-owner-type"), exports);
202
203
  __exportStar(require("./project-relation"), exports);
@@ -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 ProjectOrganizationCreate
16
+ */
17
+ export interface ProjectOrganizationCreate {
18
+ /**
19
+ * The name of the project. Must not be greater than 60 characters.
20
+ * @type {string}
21
+ * @memberof ProjectOrganizationCreate
22
+ */
23
+ name: string;
24
+ /**
25
+ * A base64 string representation of the logo image.
26
+ * @type {string}
27
+ * @memberof ProjectOrganizationCreate
28
+ */
29
+ logo_image?: string;
30
+ /**
31
+ * A URL path to the project\'s logo image. Must be a valid URL.
32
+ * @type {string}
33
+ * @memberof ProjectOrganizationCreate
34
+ */
35
+ logo_url?: 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 });
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.1.7",
4
+ "version": "3.1.9",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -54,7 +54,7 @@
54
54
  "@eslint/js": "^9.39.2",
55
55
  "@openapitools/openapi-generator-cli": "^2.28.0",
56
56
  "@types/jest": "^30.0.0",
57
- "@typescript-eslint/parser": "^8.53.1",
57
+ "@typescript-eslint/parser": "^8.54.0",
58
58
  "axios-mock-adapter": "^2.1.0",
59
59
  "eslint": "^9.39.2",
60
60
  "eslint-import-resolver-typescript": "^4.4.4",
@@ -66,11 +66,11 @@
66
66
  "ts-jest": "^29.4.5",
67
67
  "typedoc": "^0.28.16",
68
68
  "typescript": "^5.9.3",
69
- "typescript-eslint": "^8.53.1"
69
+ "typescript-eslint": "^8.54.0"
70
70
  },
71
71
  "dependencies": {
72
72
  "@types/parse-link-header": "^2.0.3",
73
- "axios": "^1.13.2",
73
+ "axios": "^1.13.4",
74
74
  "parse-link-header": "^2.0.0"
75
75
  }
76
76
  }