@devopness/sdk-js 3.2.1 → 3.3.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.
- package/dist/api/generated/apis/projects-api.d.ts +2 -3
- package/dist/api/generated/apis/projects-api.js +3 -6
- package/dist/api/generated/apis/roles-api.d.ts +20 -3
- package/dist/api/generated/apis/roles-api.js +48 -3
- package/dist/api/generated/apis/teams-api.d.ts +100 -0
- package/dist/api/generated/apis/teams-api.js +278 -0
- package/dist/api/generated/models/action-retry-response.d.ts +1 -1
- package/dist/api/generated/models/action.d.ts +1 -1
- package/dist/api/generated/models/application.d.ts +1 -1
- package/dist/api/generated/models/credential-relation.d.ts +1 -1
- package/dist/api/generated/models/credential.d.ts +1 -1
- package/dist/api/generated/models/cron-job-relation.d.ts +1 -1
- package/dist/api/generated/models/cron-job.d.ts +1 -1
- package/dist/api/generated/models/daemon-relation.d.ts +1 -1
- package/dist/api/generated/models/daemon.d.ts +1 -1
- package/dist/api/generated/models/environment.d.ts +6 -6
- package/dist/api/generated/models/hook.d.ts +1 -1
- package/dist/api/generated/models/index.d.ts +4 -5
- package/dist/api/generated/models/index.js +4 -5
- package/dist/api/generated/models/invitation-relation.d.ts +4 -4
- package/dist/api/generated/models/invitation.d.ts +1 -1
- package/dist/api/generated/models/member-relation.d.ts +1 -1
- package/dist/api/generated/models/member.d.ts +1 -1
- package/dist/api/generated/models/membership-relation.d.ts +23 -2
- package/dist/api/generated/models/network-rule.d.ts +1 -1
- package/dist/api/generated/models/network.d.ts +1 -1
- package/dist/api/generated/models/organization-relation.d.ts +1 -1
- package/dist/api/generated/models/organization.d.ts +7 -1
- package/dist/api/generated/models/personal-access-token-relation.d.ts +1 -1
- package/dist/api/generated/models/personal-access-token-rotate-response.d.ts +1 -1
- package/dist/api/generated/models/personal-access-token.d.ts +1 -1
- package/dist/api/generated/models/pipeline-relation.d.ts +1 -1
- package/dist/api/generated/models/pipeline.d.ts +1 -1
- package/dist/api/generated/models/project-relation.d.ts +4 -11
- package/dist/api/generated/models/project.d.ts +7 -8
- package/dist/api/generated/models/{role-project-create.d.ts → role-organization-create.d.ts} +5 -5
- package/dist/api/generated/models/role-relation.d.ts +15 -7
- package/dist/api/generated/models/role.d.ts +15 -7
- package/dist/api/generated/models/server.d.ts +1 -1
- package/dist/api/generated/models/service.d.ts +1 -1
- package/dist/api/generated/models/ssh-key.d.ts +1 -1
- package/dist/api/generated/models/ssl-certificate.d.ts +1 -1
- package/dist/api/generated/models/subnet-relation.d.ts +1 -1
- package/dist/api/generated/models/subnet.d.ts +1 -1
- package/dist/api/generated/models/team-environment-link.d.ts +1 -1
- package/dist/api/generated/models/team-invitation-relation.d.ts +4 -4
- package/dist/api/generated/models/team-membership-relation.d.ts +21 -11
- package/dist/api/generated/models/{team-project-create.d.ts → team-organization-create.d.ts} +4 -4
- package/dist/api/generated/models/team-organization-link.d.ts +24 -0
- package/dist/api/generated/models/{project-owner-type.d.ts → team-project-link.d.ts} +9 -5
- package/dist/api/generated/models/team-relation.d.ts +14 -0
- package/dist/api/generated/models/team.d.ts +12 -6
- package/dist/api/generated/models/variable-relation.d.ts +1 -1
- package/dist/api/generated/models/variable.d.ts +1 -1
- package/dist/api/generated/models/virtual-host-relation.d.ts +1 -1
- package/dist/api/generated/models/virtual-host.d.ts +1 -1
- package/dist/services/EnvironmentService.d.ts +0 -4
- package/dist/services/EnvironmentService.js +0 -4
- package/dist/services/ProjectService.d.ts +0 -4
- package/dist/services/ProjectService.js +0 -4
- package/dist/services/TeamService.d.ts +0 -2
- package/dist/services/TeamService.js +0 -2
- package/package.json +2 -2
- package/dist/api/generated/apis/environments-team-memberships-api.d.ts +0 -27
- package/dist/api/generated/apis/environments-team-memberships-api.js +0 -58
- package/dist/api/generated/apis/environments-teams-api.d.ts +0 -34
- package/dist/api/generated/apis/environments-teams-api.js +0 -77
- package/dist/api/generated/apis/projects-roles-api.d.ts +0 -36
- package/dist/api/generated/apis/projects-roles-api.js +0 -78
- package/dist/api/generated/apis/projects-teams-api.d.ts +0 -36
- package/dist/api/generated/apis/projects-teams-api.js +0 -78
- package/dist/api/generated/apis/teams-memberships-api.d.ts +0 -27
- package/dist/api/generated/apis/teams-memberships-api.js +0 -58
- package/dist/api/generated/models/project-create.d.ts +0 -36
- package/dist/api/generated/models/project-owner-relation.d.ts +0 -19
- package/dist/api/generated/models/project-owner-type.js +0 -25
- /package/dist/api/generated/models/{project-create.js → role-organization-create.js} +0 -0
- /package/dist/api/generated/models/{project-owner-relation.js → team-organization-create.js} +0 -0
- /package/dist/api/generated/models/{role-project-create.js → team-organization-link.js} +0 -0
- /package/dist/api/generated/models/{team-project-create.js → team-project-link.js} +0 -0
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
import { ApiBaseService } from "../../../services/ApiBaseService";
|
|
13
13
|
import { ApiResponse } from "../../../common/ApiResponse";
|
|
14
14
|
import { Project } from '../../generated/models';
|
|
15
|
-
import { ProjectCreate } from '../../generated/models';
|
|
16
15
|
import { ProjectOrganizationCreate } from '../../generated/models';
|
|
17
16
|
import { ProjectRelation } from '../../generated/models';
|
|
18
17
|
import { ProjectUpdate } from '../../generated/models';
|
|
@@ -29,10 +28,10 @@ export declare class ProjectsApiService extends ApiBaseService {
|
|
|
29
28
|
addOrganizationProject(organizationId: string, projectOrganizationCreate: ProjectOrganizationCreate): Promise<ApiResponse<Project>>;
|
|
30
29
|
/**
|
|
31
30
|
*
|
|
31
|
+
* @deprecated
|
|
32
32
|
* @summary Create a project for the authenticated user
|
|
33
|
-
* @param {ProjectCreate} projectCreate A JSON object containing the resource data
|
|
34
33
|
*/
|
|
35
|
-
addProject(
|
|
34
|
+
addProject(): Promise<ApiResponse<Project>>;
|
|
36
35
|
/**
|
|
37
36
|
*
|
|
38
37
|
* @summary Delete a given project
|
|
@@ -51,17 +51,14 @@ class ProjectsApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
53
|
*
|
|
54
|
+
* @deprecated
|
|
54
55
|
* @summary Create a project for the authenticated user
|
|
55
|
-
* @param {ProjectCreate} projectCreate A JSON object containing the resource data
|
|
56
56
|
*/
|
|
57
|
-
addProject(
|
|
57
|
+
addProject() {
|
|
58
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
-
if (projectCreate === null || projectCreate === undefined) {
|
|
60
|
-
throw new Exceptions_1.ArgumentNullException('projectCreate', 'addProject');
|
|
61
|
-
}
|
|
62
59
|
let queryString = '';
|
|
63
60
|
const requestUrl = '/projects' + (queryString ? `?${queryString}` : '');
|
|
64
|
-
const response = yield this.post(requestUrl
|
|
61
|
+
const response = yield this.post(requestUrl);
|
|
65
62
|
return new ApiResponse_1.ApiResponse(response);
|
|
66
63
|
});
|
|
67
64
|
}
|
|
@@ -12,27 +12,44 @@
|
|
|
12
12
|
import { ApiBaseService } from "../../../services/ApiBaseService";
|
|
13
13
|
import { ApiResponse } from "../../../common/ApiResponse";
|
|
14
14
|
import { Role } from '../../generated/models';
|
|
15
|
+
import { RoleOrganizationCreate } from '../../generated/models';
|
|
16
|
+
import { RoleRelation } from '../../generated/models';
|
|
15
17
|
import { RoleUpdate } from '../../generated/models';
|
|
16
18
|
/**
|
|
17
19
|
* RolesApiService - Auto-generated
|
|
18
20
|
*/
|
|
19
21
|
export declare class RolesApiService extends ApiBaseService {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @summary Create a role to a given organization
|
|
25
|
+
* @param {string} organizationId The numeric ID or URL Slug of an organization.
|
|
26
|
+
* @param {RoleOrganizationCreate} roleOrganizationCreate A JSON object containing the resource data
|
|
27
|
+
*/
|
|
28
|
+
addOrganizationRole(organizationId: string, roleOrganizationCreate: RoleOrganizationCreate): Promise<ApiResponse<Role>>;
|
|
20
29
|
/**
|
|
21
30
|
*
|
|
22
31
|
* @summary Delete a given role
|
|
23
|
-
* @param {number} roleId The ID of
|
|
32
|
+
* @param {number} roleId The ID of a role.
|
|
24
33
|
*/
|
|
25
34
|
deleteRole(roleId: number): Promise<ApiResponse<void>>;
|
|
26
35
|
/**
|
|
27
36
|
*
|
|
28
37
|
* @summary Get a role by ID
|
|
29
|
-
* @param {number} roleId The ID of
|
|
38
|
+
* @param {number} roleId The ID of a role.
|
|
30
39
|
*/
|
|
31
40
|
getRole(roleId: number): Promise<ApiResponse<Role>>;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @summary List all roles from a organization
|
|
44
|
+
* @param {string} organizationId The numeric ID or URL Slug of an organization.
|
|
45
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
46
|
+
* @param {number} [perPage] Number of items returned per page
|
|
47
|
+
*/
|
|
48
|
+
listOrganizationRoles(organizationId: string, page?: number, perPage?: number): Promise<ApiResponse<Array<RoleRelation>>>;
|
|
32
49
|
/**
|
|
33
50
|
*
|
|
34
51
|
* @summary Update an existing role
|
|
35
|
-
* @param {number} roleId The ID of
|
|
52
|
+
* @param {number} roleId The ID of a role.
|
|
36
53
|
* @param {RoleUpdate} roleUpdate A JSON object containing the resource data
|
|
37
54
|
*/
|
|
38
55
|
updateRole(roleId: number, roleUpdate: RoleUpdate): Promise<ApiResponse<void>>;
|
|
@@ -29,10 +29,30 @@ const Exceptions_1 = require("../../../common/Exceptions");
|
|
|
29
29
|
* RolesApiService - Auto-generated
|
|
30
30
|
*/
|
|
31
31
|
class RolesApiService extends ApiBaseService_1.ApiBaseService {
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @summary Create a role to a given organization
|
|
35
|
+
* @param {string} organizationId The numeric ID or URL Slug of an organization.
|
|
36
|
+
* @param {RoleOrganizationCreate} roleOrganizationCreate A JSON object containing the resource data
|
|
37
|
+
*/
|
|
38
|
+
addOrganizationRole(organizationId, roleOrganizationCreate) {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
if (organizationId === null || organizationId === undefined) {
|
|
41
|
+
throw new Exceptions_1.ArgumentNullException('organizationId', 'addOrganizationRole');
|
|
42
|
+
}
|
|
43
|
+
if (roleOrganizationCreate === null || roleOrganizationCreate === undefined) {
|
|
44
|
+
throw new Exceptions_1.ArgumentNullException('roleOrganizationCreate', 'addOrganizationRole');
|
|
45
|
+
}
|
|
46
|
+
let queryString = '';
|
|
47
|
+
const requestUrl = '/organizations/{organization_id}/roles' + (queryString ? `?${queryString}` : '');
|
|
48
|
+
const response = yield this.post(requestUrl.replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId))), roleOrganizationCreate);
|
|
49
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
32
52
|
/**
|
|
33
53
|
*
|
|
34
54
|
* @summary Delete a given role
|
|
35
|
-
* @param {number} roleId The ID of
|
|
55
|
+
* @param {number} roleId The ID of a role.
|
|
36
56
|
*/
|
|
37
57
|
deleteRole(roleId) {
|
|
38
58
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -48,7 +68,7 @@ class RolesApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
48
68
|
/**
|
|
49
69
|
*
|
|
50
70
|
* @summary Get a role by ID
|
|
51
|
-
* @param {number} roleId The ID of
|
|
71
|
+
* @param {number} roleId The ID of a role.
|
|
52
72
|
*/
|
|
53
73
|
getRole(roleId) {
|
|
54
74
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -61,10 +81,35 @@ class RolesApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
61
81
|
return new ApiResponse_1.ApiResponse(response);
|
|
62
82
|
});
|
|
63
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @summary List all roles from a organization
|
|
87
|
+
* @param {string} organizationId The numeric ID or URL Slug of an organization.
|
|
88
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
89
|
+
* @param {number} [perPage] Number of items returned per page
|
|
90
|
+
*/
|
|
91
|
+
listOrganizationRoles(organizationId, page, perPage) {
|
|
92
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
+
if (organizationId === null || organizationId === undefined) {
|
|
94
|
+
throw new Exceptions_1.ArgumentNullException('organizationId', 'listOrganizationRoles');
|
|
95
|
+
}
|
|
96
|
+
let queryString = '';
|
|
97
|
+
const queryParams = { page: page, per_page: perPage, };
|
|
98
|
+
for (const key in queryParams) {
|
|
99
|
+
if (queryParams[key] === undefined || queryParams[key] === null) {
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
|
|
103
|
+
}
|
|
104
|
+
const requestUrl = '/organizations/{organization_id}/roles' + (queryString ? `?${queryString}` : '');
|
|
105
|
+
const response = yield this.get(requestUrl.replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId))));
|
|
106
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
107
|
+
});
|
|
108
|
+
}
|
|
64
109
|
/**
|
|
65
110
|
*
|
|
66
111
|
* @summary Update an existing role
|
|
67
|
-
* @param {number} roleId The ID of
|
|
112
|
+
* @param {number} roleId The ID of a role.
|
|
68
113
|
* @param {RoleUpdate} roleUpdate A JSON object containing the resource data
|
|
69
114
|
*/
|
|
70
115
|
updateRole(roleId, roleUpdate) {
|
|
@@ -11,12 +11,26 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { ApiBaseService } from "../../../services/ApiBaseService";
|
|
13
13
|
import { ApiResponse } from "../../../common/ApiResponse";
|
|
14
|
+
import { MembershipRelation } from '../../generated/models';
|
|
14
15
|
import { Team } from '../../generated/models';
|
|
16
|
+
import { TeamEnvironmentLink } from '../../generated/models';
|
|
17
|
+
import { TeamMembershipRelation } from '../../generated/models';
|
|
18
|
+
import { TeamOrganizationCreate } from '../../generated/models';
|
|
19
|
+
import { TeamOrganizationLink } from '../../generated/models';
|
|
20
|
+
import { TeamProjectLink } from '../../generated/models';
|
|
21
|
+
import { TeamRelation } from '../../generated/models';
|
|
15
22
|
import { TeamUpdate } from '../../generated/models';
|
|
16
23
|
/**
|
|
17
24
|
* TeamsApiService - Auto-generated
|
|
18
25
|
*/
|
|
19
26
|
export declare class TeamsApiService extends ApiBaseService {
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @summary Add a team to the given organization
|
|
30
|
+
* @param {string} organizationId The numeric ID or URL Slug of an organization.
|
|
31
|
+
* @param {TeamOrganizationCreate} teamOrganizationCreate A JSON object containing the resource data
|
|
32
|
+
*/
|
|
33
|
+
addOrganizationTeam(organizationId: string, teamOrganizationCreate: TeamOrganizationCreate): Promise<ApiResponse<Team>>;
|
|
20
34
|
/**
|
|
21
35
|
*
|
|
22
36
|
* @summary Delete a given team
|
|
@@ -29,6 +43,92 @@ export declare class TeamsApiService extends ApiBaseService {
|
|
|
29
43
|
* @param {number} teamId The ID of the team.
|
|
30
44
|
*/
|
|
31
45
|
getTeam(teamId: number): Promise<ApiResponse<Team>>;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @summary Link the given team to an environment with a specific role
|
|
49
|
+
* @param {number} environmentId The ID of the environment.
|
|
50
|
+
* @param {number} teamId The ID of the team.
|
|
51
|
+
* @param {TeamEnvironmentLink} teamEnvironmentLink A JSON object containing the resource data
|
|
52
|
+
*/
|
|
53
|
+
linkTeamToEnvironment(environmentId: number, teamId: number, teamEnvironmentLink: TeamEnvironmentLink): Promise<ApiResponse<void>>;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @summary Link the given team to an organization with a specific role
|
|
57
|
+
* @param {string} organizationId The ID of the organization.
|
|
58
|
+
* @param {number} teamId The ID of the team.
|
|
59
|
+
* @param {TeamOrganizationLink} teamOrganizationLink A JSON object containing the resource data
|
|
60
|
+
*/
|
|
61
|
+
linkTeamToOrganization(organizationId: string, teamId: number, teamOrganizationLink: TeamOrganizationLink): Promise<ApiResponse<void>>;
|
|
62
|
+
/**
|
|
63
|
+
*
|
|
64
|
+
* @summary Link the given team to a project with a specific role
|
|
65
|
+
* @param {number} projectId The ID of the project.
|
|
66
|
+
* @param {number} teamId The ID of the team.
|
|
67
|
+
* @param {TeamProjectLink} teamProjectLink A JSON object containing the resource data
|
|
68
|
+
*/
|
|
69
|
+
linkTeamToProject(projectId: number, teamId: number, teamProjectLink: TeamProjectLink): Promise<ApiResponse<void>>;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @summary Return a list of teams with access to an environment
|
|
73
|
+
* @param {number} environmentId The ID of the environment.
|
|
74
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
75
|
+
* @param {number} [perPage] Number of items returned per page
|
|
76
|
+
*/
|
|
77
|
+
listEnvironmentTeamMemberships(environmentId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<TeamMembershipRelation>>>;
|
|
78
|
+
/**
|
|
79
|
+
*
|
|
80
|
+
* @summary Return a list of teams with access to an organization
|
|
81
|
+
* @param {string} organizationId The ID of the organization.
|
|
82
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
83
|
+
* @param {number} [perPage] Number of items returned per page
|
|
84
|
+
*/
|
|
85
|
+
listOrganizationTeamMemberships(organizationId: string, page?: number, perPage?: number): Promise<ApiResponse<Array<TeamMembershipRelation>>>;
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
* @summary Return a list of all teams belonging to an organization
|
|
89
|
+
* @param {string} organizationId The numeric ID or URL Slug of an organization.
|
|
90
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
91
|
+
* @param {number} [perPage] Number of items returned per page
|
|
92
|
+
*/
|
|
93
|
+
listOrganizationTeams(organizationId: string, page?: number, perPage?: number): Promise<ApiResponse<Array<TeamRelation>>>;
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* @summary Return a list of teams with access to a project
|
|
97
|
+
* @param {number} projectId The ID of the project.
|
|
98
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
99
|
+
* @param {number} [perPage] Number of items returned per page
|
|
100
|
+
*/
|
|
101
|
+
listProjectTeamMemberships(projectId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<TeamMembershipRelation>>>;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @summary Return a list of all memberships of a team
|
|
105
|
+
* @param {number} teamId The ID of the team.
|
|
106
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
107
|
+
* @param {number} [perPage] Number of items returned per page
|
|
108
|
+
* @param {string} [filterBy] Returns only memberships associated with the given link type.
|
|
109
|
+
*/
|
|
110
|
+
listTeamMemberships(teamId: number, page?: number, perPage?: number, filterBy?: string): Promise<ApiResponse<Array<MembershipRelation>>>;
|
|
111
|
+
/**
|
|
112
|
+
*
|
|
113
|
+
* @summary Unlink the given team from an environment
|
|
114
|
+
* @param {number} environmentId The ID of the environment.
|
|
115
|
+
* @param {number} teamId The ID of the team.
|
|
116
|
+
*/
|
|
117
|
+
unlinkTeamFromEnvironment(environmentId: number, teamId: number): Promise<ApiResponse<void>>;
|
|
118
|
+
/**
|
|
119
|
+
*
|
|
120
|
+
* @summary Unlink the given team from an organization
|
|
121
|
+
* @param {string} organizationId The ID of the organization.
|
|
122
|
+
* @param {number} teamId The ID of the team.
|
|
123
|
+
*/
|
|
124
|
+
unlinkTeamFromOrganization(organizationId: string, teamId: number): Promise<ApiResponse<void>>;
|
|
125
|
+
/**
|
|
126
|
+
*
|
|
127
|
+
* @summary Unlink the given team from a project
|
|
128
|
+
* @param {number} projectId The ID of the project.
|
|
129
|
+
* @param {number} teamId The ID of the team.
|
|
130
|
+
*/
|
|
131
|
+
unlinkTeamFromProject(projectId: number, teamId: number): Promise<ApiResponse<void>>;
|
|
32
132
|
/**
|
|
33
133
|
*
|
|
34
134
|
* @summary Update an existing team
|
|
@@ -29,6 +29,26 @@ const Exceptions_1 = require("../../../common/Exceptions");
|
|
|
29
29
|
* TeamsApiService - Auto-generated
|
|
30
30
|
*/
|
|
31
31
|
class TeamsApiService extends ApiBaseService_1.ApiBaseService {
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
* @summary Add a team to the given organization
|
|
35
|
+
* @param {string} organizationId The numeric ID or URL Slug of an organization.
|
|
36
|
+
* @param {TeamOrganizationCreate} teamOrganizationCreate A JSON object containing the resource data
|
|
37
|
+
*/
|
|
38
|
+
addOrganizationTeam(organizationId, teamOrganizationCreate) {
|
|
39
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
40
|
+
if (organizationId === null || organizationId === undefined) {
|
|
41
|
+
throw new Exceptions_1.ArgumentNullException('organizationId', 'addOrganizationTeam');
|
|
42
|
+
}
|
|
43
|
+
if (teamOrganizationCreate === null || teamOrganizationCreate === undefined) {
|
|
44
|
+
throw new Exceptions_1.ArgumentNullException('teamOrganizationCreate', 'addOrganizationTeam');
|
|
45
|
+
}
|
|
46
|
+
let queryString = '';
|
|
47
|
+
const requestUrl = '/organizations/{organization_id}/teams' + (queryString ? `?${queryString}` : '');
|
|
48
|
+
const response = yield this.post(requestUrl.replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId))), teamOrganizationCreate);
|
|
49
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
32
52
|
/**
|
|
33
53
|
*
|
|
34
54
|
* @summary Delete a given team
|
|
@@ -61,6 +81,264 @@ class TeamsApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
61
81
|
return new ApiResponse_1.ApiResponse(response);
|
|
62
82
|
});
|
|
63
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
*
|
|
86
|
+
* @summary Link the given team to an environment with a specific role
|
|
87
|
+
* @param {number} environmentId The ID of the environment.
|
|
88
|
+
* @param {number} teamId The ID of the team.
|
|
89
|
+
* @param {TeamEnvironmentLink} teamEnvironmentLink A JSON object containing the resource data
|
|
90
|
+
*/
|
|
91
|
+
linkTeamToEnvironment(environmentId, teamId, teamEnvironmentLink) {
|
|
92
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
+
if (environmentId === null || environmentId === undefined) {
|
|
94
|
+
throw new Exceptions_1.ArgumentNullException('environmentId', 'linkTeamToEnvironment');
|
|
95
|
+
}
|
|
96
|
+
if (teamId === null || teamId === undefined) {
|
|
97
|
+
throw new Exceptions_1.ArgumentNullException('teamId', 'linkTeamToEnvironment');
|
|
98
|
+
}
|
|
99
|
+
if (teamEnvironmentLink === null || teamEnvironmentLink === undefined) {
|
|
100
|
+
throw new Exceptions_1.ArgumentNullException('teamEnvironmentLink', 'linkTeamToEnvironment');
|
|
101
|
+
}
|
|
102
|
+
let queryString = '';
|
|
103
|
+
const requestUrl = '/environments/{environment_id}/teams/{team_id}/link' + (queryString ? `?${queryString}` : '');
|
|
104
|
+
const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))).replace(`{${"team_id"}}`, encodeURIComponent(String(teamId))), teamEnvironmentLink);
|
|
105
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
*
|
|
110
|
+
* @summary Link the given team to an organization with a specific role
|
|
111
|
+
* @param {string} organizationId The ID of the organization.
|
|
112
|
+
* @param {number} teamId The ID of the team.
|
|
113
|
+
* @param {TeamOrganizationLink} teamOrganizationLink A JSON object containing the resource data
|
|
114
|
+
*/
|
|
115
|
+
linkTeamToOrganization(organizationId, teamId, teamOrganizationLink) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
if (organizationId === null || organizationId === undefined) {
|
|
118
|
+
throw new Exceptions_1.ArgumentNullException('organizationId', 'linkTeamToOrganization');
|
|
119
|
+
}
|
|
120
|
+
if (teamId === null || teamId === undefined) {
|
|
121
|
+
throw new Exceptions_1.ArgumentNullException('teamId', 'linkTeamToOrganization');
|
|
122
|
+
}
|
|
123
|
+
if (teamOrganizationLink === null || teamOrganizationLink === undefined) {
|
|
124
|
+
throw new Exceptions_1.ArgumentNullException('teamOrganizationLink', 'linkTeamToOrganization');
|
|
125
|
+
}
|
|
126
|
+
let queryString = '';
|
|
127
|
+
const requestUrl = '/organizations/{organization_id}/teams/{team_id}/link' + (queryString ? `?${queryString}` : '');
|
|
128
|
+
const response = yield this.post(requestUrl.replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId))).replace(`{${"team_id"}}`, encodeURIComponent(String(teamId))), teamOrganizationLink);
|
|
129
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
*
|
|
134
|
+
* @summary Link the given team to a project with a specific role
|
|
135
|
+
* @param {number} projectId The ID of the project.
|
|
136
|
+
* @param {number} teamId The ID of the team.
|
|
137
|
+
* @param {TeamProjectLink} teamProjectLink A JSON object containing the resource data
|
|
138
|
+
*/
|
|
139
|
+
linkTeamToProject(projectId, teamId, teamProjectLink) {
|
|
140
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
141
|
+
if (projectId === null || projectId === undefined) {
|
|
142
|
+
throw new Exceptions_1.ArgumentNullException('projectId', 'linkTeamToProject');
|
|
143
|
+
}
|
|
144
|
+
if (teamId === null || teamId === undefined) {
|
|
145
|
+
throw new Exceptions_1.ArgumentNullException('teamId', 'linkTeamToProject');
|
|
146
|
+
}
|
|
147
|
+
if (teamProjectLink === null || teamProjectLink === undefined) {
|
|
148
|
+
throw new Exceptions_1.ArgumentNullException('teamProjectLink', 'linkTeamToProject');
|
|
149
|
+
}
|
|
150
|
+
let queryString = '';
|
|
151
|
+
const requestUrl = '/projects/{project_id}/teams/{team_id}/link' + (queryString ? `?${queryString}` : '');
|
|
152
|
+
const response = yield this.post(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))).replace(`{${"team_id"}}`, encodeURIComponent(String(teamId))), teamProjectLink);
|
|
153
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
*
|
|
158
|
+
* @summary Return a list of teams with access to an environment
|
|
159
|
+
* @param {number} environmentId The ID of the environment.
|
|
160
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
161
|
+
* @param {number} [perPage] Number of items returned per page
|
|
162
|
+
*/
|
|
163
|
+
listEnvironmentTeamMemberships(environmentId, page, perPage) {
|
|
164
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
165
|
+
if (environmentId === null || environmentId === undefined) {
|
|
166
|
+
throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentTeamMemberships');
|
|
167
|
+
}
|
|
168
|
+
let queryString = '';
|
|
169
|
+
const queryParams = { page: page, per_page: perPage, };
|
|
170
|
+
for (const key in queryParams) {
|
|
171
|
+
if (queryParams[key] === undefined || queryParams[key] === null) {
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
|
|
175
|
+
}
|
|
176
|
+
const requestUrl = '/environments/{environment_id}/team-memberships' + (queryString ? `?${queryString}` : '');
|
|
177
|
+
const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
|
|
178
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
*
|
|
183
|
+
* @summary Return a list of teams with access to an organization
|
|
184
|
+
* @param {string} organizationId The ID of the organization.
|
|
185
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
186
|
+
* @param {number} [perPage] Number of items returned per page
|
|
187
|
+
*/
|
|
188
|
+
listOrganizationTeamMemberships(organizationId, page, perPage) {
|
|
189
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
190
|
+
if (organizationId === null || organizationId === undefined) {
|
|
191
|
+
throw new Exceptions_1.ArgumentNullException('organizationId', 'listOrganizationTeamMemberships');
|
|
192
|
+
}
|
|
193
|
+
let queryString = '';
|
|
194
|
+
const queryParams = { page: page, per_page: perPage, };
|
|
195
|
+
for (const key in queryParams) {
|
|
196
|
+
if (queryParams[key] === undefined || queryParams[key] === null) {
|
|
197
|
+
continue;
|
|
198
|
+
}
|
|
199
|
+
queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
|
|
200
|
+
}
|
|
201
|
+
const requestUrl = '/organizations/{organization_id}/team-memberships' + (queryString ? `?${queryString}` : '');
|
|
202
|
+
const response = yield this.get(requestUrl.replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId))));
|
|
203
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
*
|
|
208
|
+
* @summary Return a list of all teams belonging to an organization
|
|
209
|
+
* @param {string} organizationId The numeric ID or URL Slug of an organization.
|
|
210
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
211
|
+
* @param {number} [perPage] Number of items returned per page
|
|
212
|
+
*/
|
|
213
|
+
listOrganizationTeams(organizationId, page, perPage) {
|
|
214
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
215
|
+
if (organizationId === null || organizationId === undefined) {
|
|
216
|
+
throw new Exceptions_1.ArgumentNullException('organizationId', 'listOrganizationTeams');
|
|
217
|
+
}
|
|
218
|
+
let queryString = '';
|
|
219
|
+
const queryParams = { page: page, per_page: perPage, };
|
|
220
|
+
for (const key in queryParams) {
|
|
221
|
+
if (queryParams[key] === undefined || queryParams[key] === null) {
|
|
222
|
+
continue;
|
|
223
|
+
}
|
|
224
|
+
queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
|
|
225
|
+
}
|
|
226
|
+
const requestUrl = '/organizations/{organization_id}/teams' + (queryString ? `?${queryString}` : '');
|
|
227
|
+
const response = yield this.get(requestUrl.replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId))));
|
|
228
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
*
|
|
233
|
+
* @summary Return a list of teams with access to a project
|
|
234
|
+
* @param {number} projectId The ID of the project.
|
|
235
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
236
|
+
* @param {number} [perPage] Number of items returned per page
|
|
237
|
+
*/
|
|
238
|
+
listProjectTeamMemberships(projectId, page, perPage) {
|
|
239
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
240
|
+
if (projectId === null || projectId === undefined) {
|
|
241
|
+
throw new Exceptions_1.ArgumentNullException('projectId', 'listProjectTeamMemberships');
|
|
242
|
+
}
|
|
243
|
+
let queryString = '';
|
|
244
|
+
const queryParams = { page: page, per_page: perPage, };
|
|
245
|
+
for (const key in queryParams) {
|
|
246
|
+
if (queryParams[key] === undefined || queryParams[key] === null) {
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
|
|
250
|
+
}
|
|
251
|
+
const requestUrl = '/projects/{project_id}/team-memberships' + (queryString ? `?${queryString}` : '');
|
|
252
|
+
const response = yield this.get(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))));
|
|
253
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
*
|
|
258
|
+
* @summary Return a list of all memberships of a team
|
|
259
|
+
* @param {number} teamId The ID of the team.
|
|
260
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
261
|
+
* @param {number} [perPage] Number of items returned per page
|
|
262
|
+
* @param {string} [filterBy] Returns only memberships associated with the given link type.
|
|
263
|
+
*/
|
|
264
|
+
listTeamMemberships(teamId, page, perPage, filterBy) {
|
|
265
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
266
|
+
if (teamId === null || teamId === undefined) {
|
|
267
|
+
throw new Exceptions_1.ArgumentNullException('teamId', 'listTeamMemberships');
|
|
268
|
+
}
|
|
269
|
+
let queryString = '';
|
|
270
|
+
const queryParams = { page: page, per_page: perPage, filter_by: filterBy, };
|
|
271
|
+
for (const key in queryParams) {
|
|
272
|
+
if (queryParams[key] === undefined || queryParams[key] === null) {
|
|
273
|
+
continue;
|
|
274
|
+
}
|
|
275
|
+
queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
|
|
276
|
+
}
|
|
277
|
+
const requestUrl = '/teams/{team_id}/memberships' + (queryString ? `?${queryString}` : '');
|
|
278
|
+
const response = yield this.get(requestUrl.replace(`{${"team_id"}}`, encodeURIComponent(String(teamId))));
|
|
279
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
*
|
|
284
|
+
* @summary Unlink the given team from an environment
|
|
285
|
+
* @param {number} environmentId The ID of the environment.
|
|
286
|
+
* @param {number} teamId The ID of the team.
|
|
287
|
+
*/
|
|
288
|
+
unlinkTeamFromEnvironment(environmentId, teamId) {
|
|
289
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
290
|
+
if (environmentId === null || environmentId === undefined) {
|
|
291
|
+
throw new Exceptions_1.ArgumentNullException('environmentId', 'unlinkTeamFromEnvironment');
|
|
292
|
+
}
|
|
293
|
+
if (teamId === null || teamId === undefined) {
|
|
294
|
+
throw new Exceptions_1.ArgumentNullException('teamId', 'unlinkTeamFromEnvironment');
|
|
295
|
+
}
|
|
296
|
+
let queryString = '';
|
|
297
|
+
const requestUrl = '/environments/{environment_id}/teams/{team_id}/unlink' + (queryString ? `?${queryString}` : '');
|
|
298
|
+
const response = yield this.delete(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))).replace(`{${"team_id"}}`, encodeURIComponent(String(teamId))));
|
|
299
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
*
|
|
304
|
+
* @summary Unlink the given team from an organization
|
|
305
|
+
* @param {string} organizationId The ID of the organization.
|
|
306
|
+
* @param {number} teamId The ID of the team.
|
|
307
|
+
*/
|
|
308
|
+
unlinkTeamFromOrganization(organizationId, teamId) {
|
|
309
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
310
|
+
if (organizationId === null || organizationId === undefined) {
|
|
311
|
+
throw new Exceptions_1.ArgumentNullException('organizationId', 'unlinkTeamFromOrganization');
|
|
312
|
+
}
|
|
313
|
+
if (teamId === null || teamId === undefined) {
|
|
314
|
+
throw new Exceptions_1.ArgumentNullException('teamId', 'unlinkTeamFromOrganization');
|
|
315
|
+
}
|
|
316
|
+
let queryString = '';
|
|
317
|
+
const requestUrl = '/organizations/{organization_id}/teams/{team_id}/unlink' + (queryString ? `?${queryString}` : '');
|
|
318
|
+
const response = yield this.delete(requestUrl.replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId))).replace(`{${"team_id"}}`, encodeURIComponent(String(teamId))));
|
|
319
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
320
|
+
});
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
*
|
|
324
|
+
* @summary Unlink the given team from a project
|
|
325
|
+
* @param {number} projectId The ID of the project.
|
|
326
|
+
* @param {number} teamId The ID of the team.
|
|
327
|
+
*/
|
|
328
|
+
unlinkTeamFromProject(projectId, teamId) {
|
|
329
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
330
|
+
if (projectId === null || projectId === undefined) {
|
|
331
|
+
throw new Exceptions_1.ArgumentNullException('projectId', 'unlinkTeamFromProject');
|
|
332
|
+
}
|
|
333
|
+
if (teamId === null || teamId === undefined) {
|
|
334
|
+
throw new Exceptions_1.ArgumentNullException('teamId', 'unlinkTeamFromProject');
|
|
335
|
+
}
|
|
336
|
+
let queryString = '';
|
|
337
|
+
const requestUrl = '/projects/{project_id}/teams/{team_id}/unlink' + (queryString ? `?${queryString}` : '');
|
|
338
|
+
const response = yield this.delete(requestUrl.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId))).replace(`{${"team_id"}}`, encodeURIComponent(String(teamId))));
|
|
339
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
340
|
+
});
|
|
341
|
+
}
|
|
64
342
|
/**
|
|
65
343
|
*
|
|
66
344
|
* @summary Update an existing team
|