@devopness/sdk-js 3.2.0 → 3.3.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.
Files changed (82) hide show
  1. package/dist/api/generated/apis/projects-api.d.ts +2 -3
  2. package/dist/api/generated/apis/projects-api.js +3 -6
  3. package/dist/api/generated/apis/roles-api.d.ts +20 -3
  4. package/dist/api/generated/apis/roles-api.js +48 -3
  5. package/dist/api/generated/apis/subnets-api.d.ts +9 -0
  6. package/dist/api/generated/apis/subnets-api.js +25 -0
  7. package/dist/api/generated/apis/teams-api.d.ts +100 -0
  8. package/dist/api/generated/apis/teams-api.js +278 -0
  9. package/dist/api/generated/models/action-retry-response.d.ts +1 -1
  10. package/dist/api/generated/models/action.d.ts +1 -1
  11. package/dist/api/generated/models/application.d.ts +1 -1
  12. package/dist/api/generated/models/credential-relation.d.ts +1 -1
  13. package/dist/api/generated/models/credential.d.ts +1 -1
  14. package/dist/api/generated/models/cron-job-relation.d.ts +1 -1
  15. package/dist/api/generated/models/cron-job.d.ts +1 -1
  16. package/dist/api/generated/models/daemon-relation.d.ts +1 -1
  17. package/dist/api/generated/models/daemon.d.ts +1 -1
  18. package/dist/api/generated/models/environment.d.ts +6 -6
  19. package/dist/api/generated/models/hook.d.ts +1 -1
  20. package/dist/api/generated/models/index.d.ts +4 -5
  21. package/dist/api/generated/models/index.js +4 -5
  22. package/dist/api/generated/models/invitation-relation.d.ts +4 -4
  23. package/dist/api/generated/models/invitation.d.ts +1 -1
  24. package/dist/api/generated/models/member-relation.d.ts +1 -1
  25. package/dist/api/generated/models/member.d.ts +1 -1
  26. package/dist/api/generated/models/membership-relation.d.ts +23 -2
  27. package/dist/api/generated/models/network-rule.d.ts +1 -1
  28. package/dist/api/generated/models/network.d.ts +1 -1
  29. package/dist/api/generated/models/organization-relation.d.ts +1 -1
  30. package/dist/api/generated/models/organization.d.ts +7 -1
  31. package/dist/api/generated/models/personal-access-token-relation.d.ts +1 -1
  32. package/dist/api/generated/models/personal-access-token-rotate-response.d.ts +1 -1
  33. package/dist/api/generated/models/personal-access-token.d.ts +1 -1
  34. package/dist/api/generated/models/pipeline-relation.d.ts +1 -1
  35. package/dist/api/generated/models/pipeline.d.ts +1 -1
  36. package/dist/api/generated/models/project-relation.d.ts +4 -11
  37. package/dist/api/generated/models/project.d.ts +7 -8
  38. package/dist/api/generated/models/{role-project-create.d.ts → role-organization-create.d.ts} +5 -5
  39. package/dist/api/generated/models/role-relation.d.ts +15 -7
  40. package/dist/api/generated/models/role.d.ts +15 -7
  41. package/dist/api/generated/models/server.d.ts +1 -1
  42. package/dist/api/generated/models/service.d.ts +1 -1
  43. package/dist/api/generated/models/ssh-key.d.ts +1 -1
  44. package/dist/api/generated/models/ssl-certificate.d.ts +1 -1
  45. package/dist/api/generated/models/subnet-relation.d.ts +4 -3
  46. package/dist/api/generated/models/subnet.d.ts +1 -1
  47. package/dist/api/generated/models/team-environment-link.d.ts +1 -1
  48. package/dist/api/generated/models/team-invitation-relation.d.ts +4 -4
  49. package/dist/api/generated/models/team-membership-relation.d.ts +21 -11
  50. package/dist/api/generated/models/{team-project-create.d.ts → team-organization-create.d.ts} +4 -4
  51. package/dist/api/generated/models/team-organization-link.d.ts +24 -0
  52. package/dist/api/generated/models/{project-owner-type.d.ts → team-project-link.d.ts} +9 -5
  53. package/dist/api/generated/models/team-relation.d.ts +14 -0
  54. package/dist/api/generated/models/team.d.ts +12 -6
  55. package/dist/api/generated/models/variable-relation.d.ts +1 -1
  56. package/dist/api/generated/models/variable.d.ts +1 -1
  57. package/dist/api/generated/models/virtual-host-relation.d.ts +1 -1
  58. package/dist/api/generated/models/virtual-host.d.ts +1 -1
  59. package/dist/services/EnvironmentService.d.ts +0 -4
  60. package/dist/services/EnvironmentService.js +0 -4
  61. package/dist/services/ProjectService.d.ts +0 -4
  62. package/dist/services/ProjectService.js +0 -4
  63. package/dist/services/TeamService.d.ts +0 -2
  64. package/dist/services/TeamService.js +0 -2
  65. package/package.json +2 -2
  66. package/dist/api/generated/apis/environments-team-memberships-api.d.ts +0 -27
  67. package/dist/api/generated/apis/environments-team-memberships-api.js +0 -58
  68. package/dist/api/generated/apis/environments-teams-api.d.ts +0 -34
  69. package/dist/api/generated/apis/environments-teams-api.js +0 -77
  70. package/dist/api/generated/apis/projects-roles-api.d.ts +0 -36
  71. package/dist/api/generated/apis/projects-roles-api.js +0 -78
  72. package/dist/api/generated/apis/projects-teams-api.d.ts +0 -36
  73. package/dist/api/generated/apis/projects-teams-api.js +0 -78
  74. package/dist/api/generated/apis/teams-memberships-api.d.ts +0 -27
  75. package/dist/api/generated/apis/teams-memberships-api.js +0 -58
  76. package/dist/api/generated/models/project-create.d.ts +0 -36
  77. package/dist/api/generated/models/project-owner-relation.d.ts +0 -19
  78. package/dist/api/generated/models/project-owner-type.js +0 -25
  79. /package/dist/api/generated/models/{project-create.js → role-organization-create.js} +0 -0
  80. /package/dist/api/generated/models/{project-owner-relation.js → team-organization-create.js} +0 -0
  81. /package/dist/api/generated/models/{role-project-create.js → team-organization-link.js} +0 -0
  82. /package/dist/api/generated/models/{team-project-create.js → team-project-link.js} +0 -0
@@ -9,7 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { ProjectRelation } from './project-relation';
12
+ import { OrganizationRelation } from './organization-relation';
13
13
  import { TeamInvitationStatus } from './team-invitation-status';
14
14
  import { TeamInvitationType } from './team-invitation-type';
15
15
  import { TeamRelation } from './team-relation';
@@ -67,7 +67,7 @@ export interface TeamInvitationRelation {
67
67
  * @type {UserRelation}
68
68
  * @memberof TeamInvitationRelation
69
69
  */
70
- created_by_user: UserRelation;
70
+ created_by_user: UserRelation | null;
71
71
  /**
72
72
  *
73
73
  * @type {TeamRelation}
@@ -76,10 +76,10 @@ export interface TeamInvitationRelation {
76
76
  team: TeamRelation | null;
77
77
  /**
78
78
  *
79
- * @type {ProjectRelation}
79
+ * @type {OrganizationRelation}
80
80
  * @memberof TeamInvitationRelation
81
81
  */
82
- project: ProjectRelation | null;
82
+ organization: OrganizationRelation | null;
83
83
  /**
84
84
  * The date and time when the invitation was accepted
85
85
  * @type {string}
@@ -9,7 +9,11 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { EnvironmentRelation } from './environment-relation';
13
+ import { OrganizationRelation } from './organization-relation';
14
+ import { ProjectRelation } from './project-relation';
12
15
  import { RoleRelation } from './role-relation';
16
+ import { TeamRelation } from './team-relation';
13
17
  /**
14
18
  *
15
19
  * @export
@@ -17,29 +21,35 @@ import { RoleRelation } from './role-relation';
17
21
  */
18
22
  export interface TeamMembershipRelation {
19
23
  /**
20
- * The unique ID of the given team
21
- * @type {number}
24
+ *
25
+ * @type {TeamRelation}
22
26
  * @memberof TeamMembershipRelation
23
27
  */
24
- id: number;
28
+ team: TeamRelation | null;
25
29
  /**
26
- * The name of the given team
27
- * @type {string}
30
+ *
31
+ * @type {RoleRelation}
28
32
  * @memberof TeamMembershipRelation
29
33
  */
30
- name: string;
34
+ role: RoleRelation | null;
31
35
  /**
32
- * The URL to team\'s image
33
- * @type {string}
36
+ *
37
+ * @type {OrganizationRelation}
34
38
  * @memberof TeamMembershipRelation
35
39
  */
36
- photo_url: string;
40
+ organization: OrganizationRelation | null;
37
41
  /**
38
42
  *
39
- * @type {RoleRelation}
43
+ * @type {ProjectRelation}
40
44
  * @memberof TeamMembershipRelation
41
45
  */
42
- role: RoleRelation | null;
46
+ project: ProjectRelation | null;
47
+ /**
48
+ *
49
+ * @type {EnvironmentRelation}
50
+ * @memberof TeamMembershipRelation
51
+ */
52
+ environment: EnvironmentRelation | null;
43
53
  /**
44
54
  * The date and time when the record was created
45
55
  * @type {string}
@@ -12,19 +12,19 @@
12
12
  /**
13
13
  *
14
14
  * @export
15
- * @interface TeamProjectCreate
15
+ * @interface TeamOrganizationCreate
16
16
  */
17
- export interface TeamProjectCreate {
17
+ export interface TeamOrganizationCreate {
18
18
  /**
19
19
  * The name of the team. Must not be greater than 255 characters.
20
20
  * @type {string}
21
- * @memberof TeamProjectCreate
21
+ * @memberof TeamOrganizationCreate
22
22
  */
23
23
  name: string;
24
24
  /**
25
25
  * The URL to team\'s image. Must be a valid URL.
26
26
  * @type {string}
27
- * @memberof TeamProjectCreate
27
+ * @memberof TeamOrganizationCreate
28
28
  */
29
29
  photo_url?: string;
30
30
  }
@@ -0,0 +1,24 @@
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 TeamOrganizationLink
16
+ */
17
+ export interface TeamOrganizationLink {
18
+ /**
19
+ * The role\'s ID to link to the team.
20
+ * @type {number}
21
+ * @memberof TeamOrganizationLink
22
+ */
23
+ role_id: number;
24
+ }
@@ -10,11 +10,15 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- * The possible types of users.
13
+ *
14
14
  * @export
15
- * @enum {string}
15
+ * @interface TeamProjectLink
16
16
  */
17
- export declare enum ProjectOwnerType {
18
- User = "user",
19
- Org = "org"
17
+ export interface TeamProjectLink {
18
+ /**
19
+ * The role\'s ID to link to the team.
20
+ * @type {number}
21
+ * @memberof TeamProjectLink
22
+ */
23
+ role_id: number;
20
24
  }
@@ -9,6 +9,8 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { OrganizationRelation } from './organization-relation';
13
+ import { UserRelation } from './user-relation';
12
14
  /**
13
15
  *
14
16
  * @export
@@ -33,6 +35,18 @@ export interface TeamRelation {
33
35
  * @memberof TeamRelation
34
36
  */
35
37
  photo_url: string | null;
38
+ /**
39
+ *
40
+ * @type {OrganizationRelation}
41
+ * @memberof TeamRelation
42
+ */
43
+ organization: OrganizationRelation | null;
44
+ /**
45
+ *
46
+ * @type {UserRelation}
47
+ * @memberof TeamRelation
48
+ */
49
+ created_by_user: UserRelation | null;
36
50
  /**
37
51
  * The date and time when the record was created
38
52
  * @type {string}
@@ -9,7 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { ProjectRelation } from './project-relation';
12
+ import { OrganizationRelation } from './organization-relation';
13
13
  import { UserRelation } from './user-relation';
14
14
  /**
15
15
  *
@@ -35,18 +35,24 @@ export interface Team {
35
35
  * @memberof Team
36
36
  */
37
37
  photo_url: string | null;
38
+ /**
39
+ * The list of users
40
+ * @type {Array<UserRelation>}
41
+ * @memberof Team
42
+ */
43
+ users: Array<UserRelation>;
38
44
  /**
39
45
  *
40
- * @type {ProjectRelation}
46
+ * @type {OrganizationRelation}
41
47
  * @memberof Team
42
48
  */
43
- project: ProjectRelation | null;
49
+ organization: OrganizationRelation | null;
44
50
  /**
45
- * The list of users
46
- * @type {Array<UserRelation>}
51
+ *
52
+ * @type {UserRelation}
47
53
  * @memberof Team
48
54
  */
49
- users: Array<UserRelation>;
55
+ created_by_user: UserRelation | null;
50
56
  /**
51
57
  * The date and time when the record was created
52
58
  * @type {string}
@@ -83,7 +83,7 @@ export interface VariableRelation {
83
83
  * @type {UserRelation}
84
84
  * @memberof VariableRelation
85
85
  */
86
- created_by_user?: UserRelation;
86
+ created_by_user?: UserRelation | null;
87
87
  /**
88
88
  * The date and time when the record was created
89
89
  * @type {string}
@@ -83,7 +83,7 @@ export interface Variable {
83
83
  * @type {UserRelation}
84
84
  * @memberof Variable
85
85
  */
86
- created_by_user?: UserRelation;
86
+ created_by_user?: UserRelation | null;
87
87
  /**
88
88
  * The date and time when the record was created
89
89
  * @type {string}
@@ -79,7 +79,7 @@ export interface VirtualHostRelation {
79
79
  * @type {UserRelation}
80
80
  * @memberof VirtualHostRelation
81
81
  */
82
- created_by_user?: UserRelation;
82
+ created_by_user?: UserRelation | null;
83
83
  /**
84
84
  * The date and time when the record was created
85
85
  * @type {string}
@@ -79,7 +79,7 @@ export interface VirtualHost {
79
79
  * @type {UserRelation}
80
80
  * @memberof VirtualHost
81
81
  */
82
- created_by_user: UserRelation;
82
+ created_by_user: UserRelation | null;
83
83
  /**
84
84
  * The date and time when the record was created
85
85
  * @type {string}
@@ -1,9 +1,5 @@
1
1
  import { EnvironmentsActionsApiService } from '../api/generated/apis/environments-actions-api';
2
2
  import { EnvironmentsApiService } from '../api/generated/apis/environments-api';
3
- import { EnvironmentsTeamMembershipsApiService } from '../api/generated/apis/environments-team-memberships-api';
4
- import { EnvironmentsTeamsApiService } from '../api/generated/apis/environments-teams-api';
5
3
  export declare class EnvironmentService extends EnvironmentsApiService {
6
4
  actions: EnvironmentsActionsApiService;
7
- teams: EnvironmentsTeamsApiService;
8
- teamMemberships: EnvironmentsTeamMembershipsApiService;
9
5
  }
@@ -3,14 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.EnvironmentService = void 0;
4
4
  const environments_actions_api_1 = require("../api/generated/apis/environments-actions-api");
5
5
  const environments_api_1 = require("../api/generated/apis/environments-api");
6
- const environments_team_memberships_api_1 = require("../api/generated/apis/environments-team-memberships-api");
7
- const environments_teams_api_1 = require("../api/generated/apis/environments-teams-api");
8
6
  class EnvironmentService extends environments_api_1.EnvironmentsApiService {
9
7
  constructor() {
10
8
  super(...arguments);
11
9
  this.actions = new environments_actions_api_1.EnvironmentsActionsApiService();
12
- this.teams = new environments_teams_api_1.EnvironmentsTeamsApiService();
13
- this.teamMemberships = new environments_team_memberships_api_1.EnvironmentsTeamMembershipsApiService();
14
10
  }
15
11
  }
16
12
  exports.EnvironmentService = EnvironmentService;
@@ -1,13 +1,9 @@
1
1
  import { ProjectsApiService } from '../api/generated/apis/projects-api';
2
2
  import { ProjectsActionsApiService } from '../api/generated/apis/projects-actions-api';
3
3
  import { ProjectsEnvironmentsApiService } from '../api/generated/apis/projects-environments-api';
4
- import { ProjectsRolesApiService } from '../api/generated/apis/projects-roles-api';
5
- import { ProjectsTeamsApiService } from '../api/generated/apis/projects-teams-api';
6
4
  import { ProjectsArchivedEnvironmentsApiService } from '../api/generated/apis/projects-archived-environments-api';
7
5
  export declare class ProjectService extends ProjectsApiService {
8
6
  actions: ProjectsActionsApiService;
9
7
  archivedEnvironments: ProjectsArchivedEnvironmentsApiService;
10
8
  environments: ProjectsEnvironmentsApiService;
11
- roles: ProjectsRolesApiService;
12
- teams: ProjectsTeamsApiService;
13
9
  }
@@ -4,8 +4,6 @@ exports.ProjectService = void 0;
4
4
  const projects_api_1 = require("../api/generated/apis/projects-api");
5
5
  const projects_actions_api_1 = require("../api/generated/apis/projects-actions-api");
6
6
  const projects_environments_api_1 = require("../api/generated/apis/projects-environments-api");
7
- const projects_roles_api_1 = require("../api/generated/apis/projects-roles-api");
8
- const projects_teams_api_1 = require("../api/generated/apis/projects-teams-api");
9
7
  const projects_archived_environments_api_1 = require("../api/generated/apis/projects-archived-environments-api");
10
8
  class ProjectService extends projects_api_1.ProjectsApiService {
11
9
  constructor() {
@@ -13,8 +11,6 @@ class ProjectService extends projects_api_1.ProjectsApiService {
13
11
  this.actions = new projects_actions_api_1.ProjectsActionsApiService();
14
12
  this.archivedEnvironments = new projects_archived_environments_api_1.ProjectsArchivedEnvironmentsApiService();
15
13
  this.environments = new projects_environments_api_1.ProjectsEnvironmentsApiService();
16
- this.roles = new projects_roles_api_1.ProjectsRolesApiService();
17
- this.teams = new projects_teams_api_1.ProjectsTeamsApiService();
18
14
  }
19
15
  }
20
16
  exports.ProjectService = ProjectService;
@@ -1,9 +1,7 @@
1
1
  import { TeamsApiService } from '../api/generated/apis/teams-api';
2
2
  import { TeamsInvitationsApiService } from '../api/generated/apis/teams-invitations-api';
3
3
  import { TeamsMembersApiService } from '../api/generated/apis/teams-members-api';
4
- import { TeamsMembershipsApiService } from '../api/generated/apis/teams-memberships-api';
5
4
  export declare class TeamService extends TeamsApiService {
6
5
  invitations: TeamsInvitationsApiService;
7
6
  members: TeamsMembersApiService;
8
- memberships: TeamsMembershipsApiService;
9
7
  }
@@ -4,13 +4,11 @@ exports.TeamService = void 0;
4
4
  const teams_api_1 = require("../api/generated/apis/teams-api");
5
5
  const teams_invitations_api_1 = require("../api/generated/apis/teams-invitations-api");
6
6
  const teams_members_api_1 = require("../api/generated/apis/teams-members-api");
7
- const teams_memberships_api_1 = require("../api/generated/apis/teams-memberships-api");
8
7
  class TeamService extends teams_api_1.TeamsApiService {
9
8
  constructor() {
10
9
  super(...arguments);
11
10
  this.invitations = new teams_invitations_api_1.TeamsInvitationsApiService();
12
11
  this.members = new teams_members_api_1.TeamsMembersApiService();
13
- this.memberships = new teams_memberships_api_1.TeamsMembershipsApiService();
14
12
  }
15
13
  }
16
14
  exports.TeamService = TeamService;
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.2.0",
4
+ "version": "3.3.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -70,7 +70,7 @@
70
70
  },
71
71
  "dependencies": {
72
72
  "@types/parse-link-header": "^2.0.3",
73
- "axios": "^1.13.4",
73
+ "axios": "^1.13.6",
74
74
  "parse-link-header": "^2.0.0"
75
75
  }
76
76
  }
@@ -1,27 +0,0 @@
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 { TeamMembershipRelation } from '../../generated/models';
15
- /**
16
- * EnvironmentsTeamMembershipsApiService - Auto-generated
17
- */
18
- export declare class EnvironmentsTeamMembershipsApiService extends ApiBaseService {
19
- /**
20
- *
21
- * @summary Return a list of teams with access to an environment
22
- * @param {number} environmentId The ID of the environment.
23
- * @param {number} [page] Number of the page to be retrieved
24
- * @param {number} [perPage] Number of items returned per page
25
- */
26
- listEnvironmentTeamMemberships(environmentId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<TeamMembershipRelation>>>;
27
- }
@@ -1,58 +0,0 @@
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.EnvironmentsTeamMembershipsApiService = 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
- * EnvironmentsTeamMembershipsApiService - Auto-generated
30
- */
31
- class EnvironmentsTeamMembershipsApiService extends ApiBaseService_1.ApiBaseService {
32
- /**
33
- *
34
- * @summary Return a list of teams with access to an environment
35
- * @param {number} environmentId The ID of the environment.
36
- * @param {number} [page] Number of the page to be retrieved
37
- * @param {number} [perPage] Number of items returned per page
38
- */
39
- listEnvironmentTeamMemberships(environmentId, page, perPage) {
40
- return __awaiter(this, void 0, void 0, function* () {
41
- if (environmentId === null || environmentId === undefined) {
42
- throw new Exceptions_1.ArgumentNullException('environmentId', 'listEnvironmentTeamMemberships');
43
- }
44
- let queryString = '';
45
- const queryParams = { page: page, per_page: perPage, };
46
- for (const key in queryParams) {
47
- if (queryParams[key] === undefined || queryParams[key] === null) {
48
- continue;
49
- }
50
- queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
51
- }
52
- const requestUrl = '/environments/{environment_id}/team-memberships' + (queryString ? `?${queryString}` : '');
53
- const response = yield this.get(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))));
54
- return new ApiResponse_1.ApiResponse(response);
55
- });
56
- }
57
- }
58
- exports.EnvironmentsTeamMembershipsApiService = EnvironmentsTeamMembershipsApiService;
@@ -1,34 +0,0 @@
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 { TeamEnvironmentLink } from '../../generated/models';
15
- /**
16
- * EnvironmentsTeamsApiService - Auto-generated
17
- */
18
- export declare class EnvironmentsTeamsApiService extends ApiBaseService {
19
- /**
20
- *
21
- * @summary Link team to a given environment
22
- * @param {number} environmentId The ID of the environment.
23
- * @param {number} teamId The ID of the team.
24
- * @param {TeamEnvironmentLink} teamEnvironmentLink A JSON object containing the resource data
25
- */
26
- linkTeamToEnvironment(environmentId: number, teamId: number, teamEnvironmentLink: TeamEnvironmentLink): Promise<ApiResponse<void>>;
27
- /**
28
- *
29
- * @summary Unlink team from the environment
30
- * @param {number} environmentId The ID of the environment.
31
- * @param {number} teamId The ID of the team.
32
- */
33
- unlinkTeamFromEnvironment(environmentId: number, teamId: number): Promise<ApiResponse<void>>;
34
- }
@@ -1,77 +0,0 @@
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.EnvironmentsTeamsApiService = 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
- * EnvironmentsTeamsApiService - Auto-generated
30
- */
31
- class EnvironmentsTeamsApiService extends ApiBaseService_1.ApiBaseService {
32
- /**
33
- *
34
- * @summary Link team to a given environment
35
- * @param {number} environmentId The ID of the environment.
36
- * @param {number} teamId The ID of the team.
37
- * @param {TeamEnvironmentLink} teamEnvironmentLink A JSON object containing the resource data
38
- */
39
- linkTeamToEnvironment(environmentId, teamId, teamEnvironmentLink) {
40
- return __awaiter(this, void 0, void 0, function* () {
41
- if (environmentId === null || environmentId === undefined) {
42
- throw new Exceptions_1.ArgumentNullException('environmentId', 'linkTeamToEnvironment');
43
- }
44
- if (teamId === null || teamId === undefined) {
45
- throw new Exceptions_1.ArgumentNullException('teamId', 'linkTeamToEnvironment');
46
- }
47
- if (teamEnvironmentLink === null || teamEnvironmentLink === undefined) {
48
- throw new Exceptions_1.ArgumentNullException('teamEnvironmentLink', 'linkTeamToEnvironment');
49
- }
50
- let queryString = '';
51
- const requestUrl = '/environments/{environment_id}/teams/{team_id}/link' + (queryString ? `?${queryString}` : '');
52
- const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))).replace(`{${"team_id"}}`, encodeURIComponent(String(teamId))), teamEnvironmentLink);
53
- return new ApiResponse_1.ApiResponse(response);
54
- });
55
- }
56
- /**
57
- *
58
- * @summary Unlink team from the environment
59
- * @param {number} environmentId The ID of the environment.
60
- * @param {number} teamId The ID of the team.
61
- */
62
- unlinkTeamFromEnvironment(environmentId, teamId) {
63
- return __awaiter(this, void 0, void 0, function* () {
64
- if (environmentId === null || environmentId === undefined) {
65
- throw new Exceptions_1.ArgumentNullException('environmentId', 'unlinkTeamFromEnvironment');
66
- }
67
- if (teamId === null || teamId === undefined) {
68
- throw new Exceptions_1.ArgumentNullException('teamId', 'unlinkTeamFromEnvironment');
69
- }
70
- let queryString = '';
71
- const requestUrl = '/environments/{environment_id}/teams/{team_id}/unlink' + (queryString ? `?${queryString}` : '');
72
- const response = yield this.delete(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))).replace(`{${"team_id"}}`, encodeURIComponent(String(teamId))));
73
- return new ApiResponse_1.ApiResponse(response);
74
- });
75
- }
76
- }
77
- exports.EnvironmentsTeamsApiService = EnvironmentsTeamsApiService;
@@ -1,36 +0,0 @@
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 { RoleProjectCreate } from '../../generated/models';
16
- import { RoleRelation } from '../../generated/models';
17
- /**
18
- * ProjectsRolesApiService - Auto-generated
19
- */
20
- export declare class ProjectsRolesApiService extends ApiBaseService {
21
- /**
22
- *
23
- * @summary Create a role to a given project
24
- * @param {number} projectId The ID of the project.
25
- * @param {RoleProjectCreate} roleProjectCreate A JSON object containing the resource data
26
- */
27
- addProjectRole(projectId: number, roleProjectCreate: RoleProjectCreate): Promise<ApiResponse<Role>>;
28
- /**
29
- *
30
- * @summary List all roles from a project
31
- * @param {number} projectId The ID of the project.
32
- * @param {number} [page] Number of the page to be retrieved
33
- * @param {number} [perPage] Number of items returned per page
34
- */
35
- listProjectRoles(projectId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<RoleRelation>>>;
36
- }