@devopness/sdk-js 2.6.1 → 2.8.1

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 (54) hide show
  1. package/dist/DevopnessApiClient.d.ts +2 -0
  2. package/dist/DevopnessApiClient.js +2 -0
  3. package/dist/api/generated/apis/environments-members-api.d.ts +37 -0
  4. package/dist/api/generated/apis/environments-members-api.js +87 -0
  5. package/dist/api/generated/apis/environments-teams-api.d.ts +0 -9
  6. package/dist/api/generated/apis/environments-teams-api.js +0 -20
  7. package/dist/api/generated/apis/pipelines-steps-api.d.ts +9 -0
  8. package/dist/api/generated/apis/pipelines-steps-api.js +24 -0
  9. package/dist/api/generated/apis/projects-roles-api.d.ts +33 -0
  10. package/dist/api/generated/apis/projects-roles-api.js +69 -0
  11. package/dist/api/generated/apis/projects-teams-api.d.ts +27 -0
  12. package/dist/api/generated/apis/projects-teams-api.js +53 -0
  13. package/dist/api/generated/apis/roles-api.d.ts +39 -0
  14. package/dist/api/generated/apis/roles-api.js +85 -0
  15. package/dist/api/generated/apis/static-data-api.d.ts +6 -0
  16. package/dist/api/generated/apis/static-data-api.js +12 -0
  17. package/dist/api/generated/apis/teams-api.d.ts +30 -0
  18. package/dist/api/generated/apis/teams-api.js +80 -0
  19. package/dist/api/generated/apis/teams-invitations-api.d.ts +8 -0
  20. package/dist/api/generated/apis/teams-invitations-api.js +20 -0
  21. package/dist/api/generated/models/application-deployment.d.ts +6 -0
  22. package/dist/api/generated/models/environment-member-profile.d.ts +49 -0
  23. package/dist/api/generated/models/environment-member-profile.js +14 -0
  24. package/dist/api/generated/models/environment-member.d.ts +36 -0
  25. package/dist/api/generated/models/environment-member.js +14 -0
  26. package/dist/api/generated/models/environment-team-link.d.ts +24 -0
  27. package/dist/api/generated/models/environment-team-link.js +14 -0
  28. package/dist/api/generated/models/environment-team.d.ts +61 -0
  29. package/dist/api/generated/models/environment-team.js +14 -0
  30. package/dist/api/generated/models/environment.d.ts +6 -0
  31. package/dist/api/generated/models/index.d.ts +10 -0
  32. package/dist/api/generated/models/index.js +10 -0
  33. package/dist/api/generated/models/invitation.d.ts +0 -6
  34. package/dist/api/generated/models/permission-permissions.d.ts +42 -0
  35. package/dist/api/generated/models/permission-permissions.js +14 -0
  36. package/dist/api/generated/models/permission.d.ts +37 -0
  37. package/dist/api/generated/models/permission.js +14 -0
  38. package/dist/api/generated/models/pipeline-step-update.d.ts +49 -0
  39. package/dist/api/generated/models/pipeline-step-update.js +14 -0
  40. package/dist/api/generated/models/role-create.d.ts +36 -0
  41. package/dist/api/generated/models/role-create.js +14 -0
  42. package/dist/api/generated/models/role-update.d.ts +42 -0
  43. package/dist/api/generated/models/role-update.js +14 -0
  44. package/dist/api/generated/models/role.d.ts +60 -0
  45. package/dist/api/generated/models/role.js +14 -0
  46. package/dist/api/generated/models/team-create.d.ts +0 -6
  47. package/dist/api/generated/models/team.d.ts +0 -7
  48. package/dist/services/EnvironmentService.d.ts +2 -0
  49. package/dist/services/EnvironmentService.js +2 -0
  50. package/dist/services/ProjectService.d.ts +4 -0
  51. package/dist/services/ProjectService.js +4 -0
  52. package/dist/services/RoleService.d.ts +3 -0
  53. package/dist/services/RoleService.js +7 -0
  54. package/package.json +1 -1
@@ -25,6 +25,7 @@ import { TeamService } from './services/TeamService';
25
25
  import { ResourceEventService } from './services/ResourceEventService';
26
26
  import { ActionService } from './services/ActionService';
27
27
  import { PipelineService } from './services/PipelineService';
28
+ import { RoleService } from './services/RoleService';
28
29
  export declare class DevopnessApiClient {
29
30
  actions: ActionService;
30
31
  applications: ApplicationService;
@@ -40,6 +41,7 @@ export declare class DevopnessApiClient {
40
41
  outgoingHooks: HookOutgoingService;
41
42
  pipelines: PipelineService;
42
43
  projects: ProjectService;
44
+ roles: RoleService;
43
45
  resourceEvents: ResourceEventService;
44
46
  scripts: ScriptService;
45
47
  servers: ServerService;
@@ -28,6 +28,7 @@ const TeamService_1 = require("./services/TeamService");
28
28
  const ResourceEventService_1 = require("./services/ResourceEventService");
29
29
  const ActionService_1 = require("./services/ActionService");
30
30
  const PipelineService_1 = require("./services/PipelineService");
31
+ const RoleService_1 = require("./services/RoleService");
31
32
  class DevopnessApiClient {
32
33
  constructor(options) {
33
34
  ApiBaseService_1.ApiBaseService.configuration = new ApiBaseService_1.Configuration(options || {});
@@ -48,6 +49,7 @@ class DevopnessApiClient {
48
49
  this.outgoingHooks = new HookOutgoingService_1.HookOutgoingService();
49
50
  this.pipelines = new PipelineService_1.PipelineService();
50
51
  this.projects = new ProjectService_1.ProjectService();
52
+ this.roles = new RoleService_1.RoleService();
51
53
  this.resourceEvents = new ResourceEventService_1.ResourceEventService();
52
54
  this.scripts = new ScriptService_1.ScriptService();
53
55
  this.servers = new ServerService_1.ServerService();
@@ -0,0 +1,37 @@
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 { EnvironmentMember } from '../../generated/models';
15
+ import { EnvironmentMemberProfile } from '../../generated/models';
16
+ /**
17
+ * EnvironmentsMembersApiService - Auto-generated
18
+ */
19
+ export declare class EnvironmentsMembersApiService extends ApiBaseService {
20
+ /**
21
+ *
22
+ * @summary Returns the profile of a member on environment
23
+ * @param {number} environmentId Numeric ID of the environment to get members from
24
+ * @param {number} userId Numeric ID of the user to get profile information
25
+ * @param {number} [page] Number of the page to be retrieved
26
+ * @param {number} [perPage] Number of items returned per page
27
+ */
28
+ getEnvironmentMemberProfile(environmentId: number, userId: number, page?: number, perPage?: number): Promise<ApiResponse<EnvironmentMemberProfile>>;
29
+ /**
30
+ *
31
+ * @summary Returns a list of all members belonging to an environment
32
+ * @param {number} environmentId Numeric ID of the environment to get members from
33
+ * @param {number} [page] Number of the page to be retrieved
34
+ * @param {number} [perPage] Number of items returned per page
35
+ */
36
+ listEnvironmentMembers(environmentId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<EnvironmentMember>>>;
37
+ }
@@ -0,0 +1,87 @@
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.EnvironmentsMembersApiService = 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
+ * EnvironmentsMembersApiService - Auto-generated
30
+ */
31
+ class EnvironmentsMembersApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary Returns the profile of a member on environment
35
+ * @param {number} environmentId Numeric ID of the environment to get members from
36
+ * @param {number} userId Numeric ID of the user to get profile information
37
+ * @param {number} [page] Number of the page to be retrieved
38
+ * @param {number} [perPage] Number of items returned per page
39
+ */
40
+ getEnvironmentMemberProfile(environmentId, userId, page, perPage) {
41
+ return __awaiter(this, void 0, void 0, function* () {
42
+ if (environmentId === null || environmentId === undefined) {
43
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'getEnvironmentMemberProfile');
44
+ }
45
+ if (userId === null || userId === undefined) {
46
+ throw new Exceptions_1.ArgumentNullException('userId', 'getEnvironmentMemberProfile');
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 = '/environments/{environment_id}/members/{user_id}' + (queryString ? `?${queryString}` : '');
57
+ const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))).replace(`{${"user_id"}}`, encodeURIComponent(String(userId))));
58
+ return new ApiResponse_1.ApiResponse(response);
59
+ });
60
+ }
61
+ /**
62
+ *
63
+ * @summary Returns a list of all members belonging to an environment
64
+ * @param {number} environmentId Numeric ID of the environment to get members from
65
+ * @param {number} [page] Number of the page to be retrieved
66
+ * @param {number} [perPage] Number of items returned per page
67
+ */
68
+ listEnvironmentMembers(environmentId, page, perPage) {
69
+ return __awaiter(this, void 0, void 0, function* () {
70
+ if (environmentId === null || environmentId === undefined) {
71
+ throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentMembers');
72
+ }
73
+ let queryString = '';
74
+ const queryParams = { page: page, per_page: perPage, };
75
+ for (const key in queryParams) {
76
+ if (queryParams[key] === undefined || queryParams[key] === null) {
77
+ continue;
78
+ }
79
+ queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
80
+ }
81
+ const requestUrl = '/environments/{environment_id}/members' + (queryString ? `?${queryString}` : '');
82
+ const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
83
+ return new ApiResponse_1.ApiResponse(response);
84
+ });
85
+ }
86
+ }
87
+ exports.EnvironmentsMembersApiService = EnvironmentsMembersApiService;
@@ -11,20 +11,11 @@
11
11
  */
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
- import { Team } from '../../generated/models';
15
- import { TeamCreate } from '../../generated/models';
16
14
  import { TeamRelation } from '../../generated/models';
17
15
  /**
18
16
  * EnvironmentsTeamsApiService - Auto-generated
19
17
  */
20
18
  export declare class EnvironmentsTeamsApiService extends ApiBaseService {
21
- /**
22
- *
23
- * @summary Creates a team and link it to the given environment
24
- * @param {number} environmentId The numeric environment ID
25
- * @param {TeamCreate} teamCreate A JSON object containing team data
26
- */
27
- addTeamToEnvironment(environmentId: number, teamCreate: TeamCreate): Promise<ApiResponse<Team>>;
28
19
  /**
29
20
  *
30
21
  * @summary Returns a list of all teams belonging to an environment
@@ -29,26 +29,6 @@ const Exceptions_1 = require("../../../common/Exceptions");
29
29
  * EnvironmentsTeamsApiService - Auto-generated
30
30
  */
31
31
  class EnvironmentsTeamsApiService extends ApiBaseService_1.ApiBaseService {
32
- /**
33
- *
34
- * @summary Creates a team and link it to the given environment
35
- * @param {number} environmentId The numeric environment ID
36
- * @param {TeamCreate} teamCreate A JSON object containing team data
37
- */
38
- addTeamToEnvironment(environmentId, teamCreate) {
39
- return __awaiter(this, void 0, void 0, function* () {
40
- if (environmentId === null || environmentId === undefined) {
41
- throw new Exceptions_1.ArgumentNullException('environmentId', 'addTeamToEnvironment');
42
- }
43
- if (teamCreate === null || teamCreate === undefined) {
44
- throw new Exceptions_1.ArgumentNullException('teamCreate', 'addTeamToEnvironment');
45
- }
46
- let queryString = '';
47
- const requestUrl = '/environments/{environment_id}/teams' + (queryString ? `?${queryString}` : '');
48
- const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), teamCreate);
49
- return new ApiResponse_1.ApiResponse(response);
50
- });
51
- }
52
32
  /**
53
33
  *
54
34
  * @summary Returns a list of all teams belonging to an environment
@@ -13,6 +13,7 @@ import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { PipelineStep } from '../../generated/models';
15
15
  import { PipelineStepCreate } from '../../generated/models';
16
+ import { PipelineStepUpdate } from '../../generated/models';
16
17
  /**
17
18
  * PipelinesStepsApiService - Auto-generated
18
19
  */
@@ -38,4 +39,12 @@ export declare class PipelinesStepsApiService extends ApiBaseService {
38
39
  * @param {number} stepId Unique ID of the step to be unlinked
39
40
  */
40
41
  unlinkStepFromPipeline(pipelineId: number, stepId: number): Promise<ApiResponse<void>>;
42
+ /**
43
+ *
44
+ * @summary Update a pipeline step
45
+ * @param {number} pipelineId Unique ID of the pipeline
46
+ * @param {number} stepId Unique ID of the pipeline step to update information from
47
+ * @param {PipelineStepUpdate} pipelineStepUpdate A JSON object containing pipeline step data
48
+ */
49
+ updatePipelineStep(pipelineId: number, stepId: number, pipelineStepUpdate: PipelineStepUpdate): Promise<ApiResponse<void>>;
41
50
  }
@@ -89,5 +89,29 @@ class PipelinesStepsApiService extends ApiBaseService_1.ApiBaseService {
89
89
  return new ApiResponse_1.ApiResponse(response);
90
90
  });
91
91
  }
92
+ /**
93
+ *
94
+ * @summary Update a pipeline step
95
+ * @param {number} pipelineId Unique ID of the pipeline
96
+ * @param {number} stepId Unique ID of the pipeline step to update information from
97
+ * @param {PipelineStepUpdate} pipelineStepUpdate A JSON object containing pipeline step data
98
+ */
99
+ updatePipelineStep(pipelineId, stepId, pipelineStepUpdate) {
100
+ return __awaiter(this, void 0, void 0, function* () {
101
+ if (pipelineId === null || pipelineId === undefined) {
102
+ throw new Exceptions_1.ArgumentNullException('pipelineId', 'updatePipelineStep');
103
+ }
104
+ if (stepId === null || stepId === undefined) {
105
+ throw new Exceptions_1.ArgumentNullException('stepId', 'updatePipelineStep');
106
+ }
107
+ if (pipelineStepUpdate === null || pipelineStepUpdate === undefined) {
108
+ throw new Exceptions_1.ArgumentNullException('pipelineStepUpdate', 'updatePipelineStep');
109
+ }
110
+ let queryString = '';
111
+ const requestUrl = '/pipelines/{pipeline_id}/steps/{step_id}' + (queryString ? `?${queryString}` : '');
112
+ const response = yield this.put(requestUrl.replace(`{${"pipeline_id"}}`, encodeURIComponent(String(pipelineId))).replace(`{${"step_id"}}`, encodeURIComponent(String(stepId))), pipelineStepUpdate);
113
+ return new ApiResponse_1.ApiResponse(response);
114
+ });
115
+ }
92
116
  }
93
117
  exports.PipelinesStepsApiService = PipelinesStepsApiService;
@@ -0,0 +1,33 @@
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 { Role } from '../../generated/models';
15
+ import { RoleCreate } from '../../generated/models';
16
+ /**
17
+ * ProjectsRolesApiService - Auto-generated
18
+ */
19
+ export declare class ProjectsRolesApiService extends ApiBaseService {
20
+ /**
21
+ *
22
+ * @summary Create a role to a given project
23
+ * @param {number} projectId The project numeric ID
24
+ * @param {RoleCreate} roleCreate A JSON object containing server data
25
+ */
26
+ addRoleToProject(projectId: number, roleCreate: RoleCreate): Promise<ApiResponse<Role>>;
27
+ /**
28
+ *
29
+ * @summary List all roles from a project
30
+ * @param {number} projectId The project numeric ID
31
+ */
32
+ listProjectRoles(projectId: number): Promise<ApiResponse<Array<Role>>>;
33
+ }
@@ -0,0 +1,69 @@
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.ProjectsRolesApiService = 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
+ * ProjectsRolesApiService - Auto-generated
30
+ */
31
+ class ProjectsRolesApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary Create a role to a given project
35
+ * @param {number} projectId The project numeric ID
36
+ * @param {RoleCreate} roleCreate A JSON object containing server data
37
+ */
38
+ addRoleToProject(projectId, roleCreate) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (projectId === null || projectId === undefined) {
41
+ throw new Exceptions_1.ArgumentNullException('projectId', 'addRoleToProject');
42
+ }
43
+ if (roleCreate === null || roleCreate === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('roleCreate', 'addRoleToProject');
45
+ }
46
+ let queryString = '';
47
+ const requestUrl = '/projects/{project_id}/roles' + (queryString ? `?${queryString}` : '');
48
+ const response = yield this.post(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))), roleCreate);
49
+ return new ApiResponse_1.ApiResponse(response);
50
+ });
51
+ }
52
+ /**
53
+ *
54
+ * @summary List all roles from a project
55
+ * @param {number} projectId The project numeric ID
56
+ */
57
+ listProjectRoles(projectId) {
58
+ return __awaiter(this, void 0, void 0, function* () {
59
+ if (projectId === null || projectId === undefined) {
60
+ throw new Exceptions_1.ArgumentNullException('projectId', 'listProjectRoles');
61
+ }
62
+ let queryString = '';
63
+ const requestUrl = '/projects/{project_id}/roles' + (queryString ? `?${queryString}` : '');
64
+ const response = yield this.get(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))));
65
+ return new ApiResponse_1.ApiResponse(response);
66
+ });
67
+ }
68
+ }
69
+ exports.ProjectsRolesApiService = ProjectsRolesApiService;
@@ -0,0 +1,27 @@
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 { Team } from '../../generated/models';
15
+ import { TeamCreate } from '../../generated/models';
16
+ /**
17
+ * ProjectsTeamsApiService - Auto-generated
18
+ */
19
+ export declare class ProjectsTeamsApiService extends ApiBaseService {
20
+ /**
21
+ *
22
+ * @summary Create a team to the given project
23
+ * @param {number} projectId The numeric project ID
24
+ * @param {TeamCreate} teamCreate A JSON object containing team data
25
+ */
26
+ addTeam(projectId: number, teamCreate: TeamCreate): Promise<ApiResponse<Team>>;
27
+ }
@@ -0,0 +1,53 @@
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.ProjectsTeamsApiService = 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
+ * ProjectsTeamsApiService - Auto-generated
30
+ */
31
+ class ProjectsTeamsApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary Create a team to the given project
35
+ * @param {number} projectId The numeric project ID
36
+ * @param {TeamCreate} teamCreate A JSON object containing team data
37
+ */
38
+ addTeam(projectId, teamCreate) {
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ if (projectId === null || projectId === undefined) {
41
+ throw new Exceptions_1.ArgumentNullException('projectId', 'addTeam');
42
+ }
43
+ if (teamCreate === null || teamCreate === undefined) {
44
+ throw new Exceptions_1.ArgumentNullException('teamCreate', 'addTeam');
45
+ }
46
+ let queryString = '';
47
+ const requestUrl = '/projects/{project_id}/teams' + (queryString ? `?${queryString}` : '');
48
+ const response = yield this.post(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))), teamCreate);
49
+ return new ApiResponse_1.ApiResponse(response);
50
+ });
51
+ }
52
+ }
53
+ exports.ProjectsTeamsApiService = ProjectsTeamsApiService;
@@ -0,0 +1,39 @@
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 { Role } from '../../generated/models';
15
+ import { RoleUpdate } from '../../generated/models';
16
+ /**
17
+ * RolesApiService - Auto-generated
18
+ */
19
+ export declare class RolesApiService extends ApiBaseService {
20
+ /**
21
+ *
22
+ * @summary Delete a role
23
+ * @param {number} roleId Numeric ID of the role to delete
24
+ */
25
+ deleteRole(roleId: number): Promise<ApiResponse<void>>;
26
+ /**
27
+ *
28
+ * @summary Get a role
29
+ * @param {number} roleId Numeric ID of the role to get
30
+ */
31
+ getRole(roleId: number): Promise<ApiResponse<Role>>;
32
+ /**
33
+ *
34
+ * @summary Update an existing role
35
+ * @param {number} roleId Numeric ID of the role to update
36
+ * @param {RoleUpdate} roleUpdate A JSON object containing role data
37
+ */
38
+ updateRole(roleId: number, roleUpdate: RoleUpdate): Promise<ApiResponse<void>>;
39
+ }
@@ -0,0 +1,85 @@
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.RolesApiService = 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
+ * RolesApiService - Auto-generated
30
+ */
31
+ class RolesApiService extends ApiBaseService_1.ApiBaseService {
32
+ /**
33
+ *
34
+ * @summary Delete a role
35
+ * @param {number} roleId Numeric ID of the role to delete
36
+ */
37
+ deleteRole(roleId) {
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ if (roleId === null || roleId === undefined) {
40
+ throw new Exceptions_1.ArgumentNullException('roleId', 'deleteRole');
41
+ }
42
+ let queryString = '';
43
+ const requestUrl = '/roles/{role_id}' + (queryString ? `?${queryString}` : '');
44
+ const response = yield this.delete(requestUrl.replace(`{${"role_id"}}`, encodeURIComponent(String(roleId))));
45
+ return new ApiResponse_1.ApiResponse(response);
46
+ });
47
+ }
48
+ /**
49
+ *
50
+ * @summary Get a role
51
+ * @param {number} roleId Numeric ID of the role to get
52
+ */
53
+ getRole(roleId) {
54
+ return __awaiter(this, void 0, void 0, function* () {
55
+ if (roleId === null || roleId === undefined) {
56
+ throw new Exceptions_1.ArgumentNullException('roleId', 'getRole');
57
+ }
58
+ let queryString = '';
59
+ const requestUrl = '/roles/{role_id}' + (queryString ? `?${queryString}` : '');
60
+ const response = yield this.get(requestUrl.replace(`{${"role_id"}}`, encodeURIComponent(String(roleId))));
61
+ return new ApiResponse_1.ApiResponse(response);
62
+ });
63
+ }
64
+ /**
65
+ *
66
+ * @summary Update an existing role
67
+ * @param {number} roleId Numeric ID of the role to update
68
+ * @param {RoleUpdate} roleUpdate A JSON object containing role data
69
+ */
70
+ updateRole(roleId, roleUpdate) {
71
+ return __awaiter(this, void 0, void 0, function* () {
72
+ if (roleId === null || roleId === undefined) {
73
+ throw new Exceptions_1.ArgumentNullException('roleId', 'updateRole');
74
+ }
75
+ if (roleUpdate === null || roleUpdate === undefined) {
76
+ throw new Exceptions_1.ArgumentNullException('roleUpdate', 'updateRole');
77
+ }
78
+ let queryString = '';
79
+ const requestUrl = '/roles/{role_id}' + (queryString ? `?${queryString}` : '');
80
+ const response = yield this.put(requestUrl.replace(`{${"role_id"}}`, encodeURIComponent(String(roleId))), roleUpdate);
81
+ return new ApiResponse_1.ApiResponse(response);
82
+ });
83
+ }
84
+ }
85
+ exports.RolesApiService = RolesApiService;
@@ -17,6 +17,7 @@ import { CloudProvider } from '../../generated/models';
17
17
  import { CloudProviderService } from '../../generated/models';
18
18
  import { CronJobOptions } from '../../generated/models';
19
19
  import { EnvironmentOptions } from '../../generated/models';
20
+ import { Permission } from '../../generated/models';
20
21
  import { ServiceOptions } from '../../generated/models';
21
22
  /**
22
23
  * StaticDataApiService - Auto-generated
@@ -55,6 +56,11 @@ export declare class StaticDataApiService extends ApiBaseService {
55
56
  * @summary Lists options of the environments
56
57
  */
57
58
  listEnvironmentOptions(): Promise<ApiResponse<EnvironmentOptions>>;
59
+ /**
60
+ *
61
+ * @summary Lists available permissions
62
+ */
63
+ listPermissions(): Promise<ApiResponse<Array<Permission>>>;
58
64
  /**
59
65
  *
60
66
  * @summary Lists options of the services
@@ -113,6 +113,18 @@ class StaticDataApiService extends ApiBaseService_1.ApiBaseService {
113
113
  return new ApiResponse_1.ApiResponse(response);
114
114
  });
115
115
  }
116
+ /**
117
+ *
118
+ * @summary Lists available permissions
119
+ */
120
+ listPermissions() {
121
+ return __awaiter(this, void 0, void 0, function* () {
122
+ let queryString = '';
123
+ const requestUrl = '/static/permissions' + (queryString ? `?${queryString}` : '');
124
+ const response = yield this.get(requestUrl);
125
+ return new ApiResponse_1.ApiResponse(response);
126
+ });
127
+ }
116
128
  /**
117
129
  *
118
130
  * @summary Lists options of the services
@@ -11,15 +11,45 @@
11
11
  */
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
+ import { EnvironmentTeamLink } from '../../generated/models';
14
15
  import { Team } from '../../generated/models';
16
+ import { TeamCreate } from '../../generated/models';
15
17
  /**
16
18
  * TeamsApiService - Auto-generated
17
19
  */
18
20
  export declare class TeamsApiService extends ApiBaseService {
21
+ /**
22
+ *
23
+ * @summary Delete a given team
24
+ * @param {number} teamId Numeric ID of the team to be deleted
25
+ */
26
+ deleteTeam(teamId: number): Promise<ApiResponse<void>>;
19
27
  /**
20
28
  *
21
29
  * @summary Get a team by ID
22
30
  * @param {number} teamId Numeric ID of the team to be retrieved
23
31
  */
24
32
  getTeam(teamId: number): Promise<ApiResponse<Team>>;
33
+ /**
34
+ *
35
+ * @summary Link team to a given environment
36
+ * @param {number} environmentId Numeric ID of the environment to link
37
+ * @param {number} teamId Numeric ID of the team to be linked
38
+ * @param {EnvironmentTeamLink} environmentTeamLink A JSON object containing the role ID
39
+ */
40
+ linkTeamToEnvironment(environmentId: number, teamId: number, environmentTeamLink: EnvironmentTeamLink): Promise<ApiResponse<void>>;
41
+ /**
42
+ *
43
+ * @summary Unlink team from the environment
44
+ * @param {number} environmentId Numeric ID of the environment to unlink
45
+ * @param {number} teamId Numeric ID of the team to be unlinked
46
+ */
47
+ unlinkTeamFromEnvironment(environmentId: number, teamId: number): Promise<ApiResponse<void>>;
48
+ /**
49
+ *
50
+ * @summary Update an existing team
51
+ * @param {number} teamId Numeric ID of the team to be updated
52
+ * @param {TeamCreate} teamCreate A JSON object containing team data
53
+ */
54
+ updateTeam(teamId: number, teamCreate: TeamCreate): Promise<ApiResponse<void>>;
25
55
  }