@devopness/sdk-js 3.0.1 → 3.1.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.
@@ -12,7 +12,6 @@
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
14
  import { Organization } from '../../generated/models';
15
- import { OrganizationActivity } from '../../generated/models';
16
15
  import { OrganizationCreate } from '../../generated/models';
17
16
  import { OrganizationRelation } from '../../generated/models';
18
17
  import { OrganizationUpdate } from '../../generated/models';
@@ -32,12 +31,6 @@ export declare class OrganizationsApiService extends ApiBaseService {
32
31
  * @param {string} organizationId The numeric ID or URL Slug of an organization.
33
32
  */
34
33
  getOrganization(organizationId: string): Promise<ApiResponse<Organization>>;
35
- /**
36
- *
37
- * @summary Get activity information for an organization
38
- * @param {string} organizationId The numeric ID or URL Slug of an organization.
39
- */
40
- getOrganizationActivity(organizationId: string): Promise<ApiResponse<OrganizationActivity>>;
41
34
  /**
42
35
  *
43
36
  * @summary List all organizations of authenticated user
@@ -61,22 +61,6 @@ class OrganizationsApiService extends ApiBaseService_1.ApiBaseService {
61
61
  return new ApiResponse_1.ApiResponse(response);
62
62
  });
63
63
  }
64
- /**
65
- *
66
- * @summary Get activity information for an organization
67
- * @param {string} organizationId The numeric ID or URL Slug of an organization.
68
- */
69
- getOrganizationActivity(organizationId) {
70
- return __awaiter(this, void 0, void 0, function* () {
71
- if (organizationId === null || organizationId === undefined) {
72
- throw new Exceptions_1.ArgumentNullException('organizationId', 'getOrganizationActivity');
73
- }
74
- let queryString = '';
75
- const requestUrl = '/organizations/{organization_id}/activity' + (queryString ? `?${queryString}` : '');
76
- const response = yield this.get(requestUrl.replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId))));
77
- return new ApiResponse_1.ApiResponse(response);
78
- });
79
- }
80
64
  /**
81
65
  *
82
66
  * @summary List all organizations of authenticated user
@@ -11,17 +11,17 @@
11
11
  */
12
12
  import { ApiBaseService } from "../../../services/ApiBaseService";
13
13
  import { ApiResponse } from "../../../common/ApiResponse";
14
- import { EnvironmentRelation } from '../../generated/models';
14
+ import { MembershipRelation } from '../../generated/models';
15
15
  /**
16
- * OrganizationsEnvironmentsApiService - Auto-generated
16
+ * TeamsMembershipsApiService - Auto-generated
17
17
  */
18
- export declare class OrganizationsEnvironmentsApiService extends ApiBaseService {
18
+ export declare class TeamsMembershipsApiService extends ApiBaseService {
19
19
  /**
20
20
  *
21
- * @summary Return a list of all environments owned by an organization
22
- * @param {string} organizationId The numeric ID or URL Slug of an organization.
21
+ * @summary Return a list of all memberships of a team
22
+ * @param {number} teamId The ID of the team.
23
23
  * @param {number} [page] Number of the page to be retrieved
24
24
  * @param {number} [perPage] Number of items returned per page
25
25
  */
26
- listOrganizationEnvironments(organizationId: string, page?: number, perPage?: number): Promise<ApiResponse<Array<EnvironmentRelation>>>;
26
+ listTeamMemberships(teamId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<MembershipRelation>>>;
27
27
  }
@@ -21,25 +21,25 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
21
21
  });
22
22
  };
23
23
  Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.OrganizationsEnvironmentsApiService = void 0;
24
+ exports.TeamsMembershipsApiService = void 0;
25
25
  const ApiBaseService_1 = require("../../../services/ApiBaseService");
26
26
  const ApiResponse_1 = require("../../../common/ApiResponse");
27
27
  const Exceptions_1 = require("../../../common/Exceptions");
28
28
  /**
29
- * OrganizationsEnvironmentsApiService - Auto-generated
29
+ * TeamsMembershipsApiService - Auto-generated
30
30
  */
31
- class OrganizationsEnvironmentsApiService extends ApiBaseService_1.ApiBaseService {
31
+ class TeamsMembershipsApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
- * @summary Return a list of all environments owned by an organization
35
- * @param {string} organizationId The numeric ID or URL Slug of an organization.
34
+ * @summary Return a list of all memberships of a team
35
+ * @param {number} teamId The ID of the team.
36
36
  * @param {number} [page] Number of the page to be retrieved
37
37
  * @param {number} [perPage] Number of items returned per page
38
38
  */
39
- listOrganizationEnvironments(organizationId, page, perPage) {
39
+ listTeamMemberships(teamId, page, perPage) {
40
40
  return __awaiter(this, void 0, void 0, function* () {
41
- if (organizationId === null || organizationId === undefined) {
42
- throw new Exceptions_1.ArgumentNullException('organizationId', 'listOrganizationEnvironments');
41
+ if (teamId === null || teamId === undefined) {
42
+ throw new Exceptions_1.ArgumentNullException('teamId', 'listTeamMemberships');
43
43
  }
44
44
  let queryString = '';
45
45
  const queryParams = { page: page, per_page: perPage, };
@@ -49,10 +49,10 @@ class OrganizationsEnvironmentsApiService extends ApiBaseService_1.ApiBaseServic
49
49
  }
50
50
  queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
51
51
  }
52
- const requestUrl = '/organizations/{organization_id}/environments' + (queryString ? `?${queryString}` : '');
53
- const response = yield this.get(requestUrl.replace(`{${"organization_id"}}`, encodeURIComponent(String(organizationId))));
52
+ const requestUrl = '/teams/{team_id}/memberships' + (queryString ? `?${queryString}` : '');
53
+ const response = yield this.get(requestUrl.replace(`{${"team_id"}}`, encodeURIComponent(String(teamId))));
54
54
  return new ApiResponse_1.ApiResponse(response);
55
55
  });
56
56
  }
57
57
  }
58
- exports.OrganizationsEnvironmentsApiService = OrganizationsEnvironmentsApiService;
58
+ exports.TeamsMembershipsApiService = TeamsMembershipsApiService;
@@ -137,6 +137,7 @@ export * from './linked-resource-summary-field';
137
137
  export * from './log';
138
138
  export * from './member';
139
139
  export * from './member-relation';
140
+ export * from './membership-relation';
140
141
  export * from './network';
141
142
  export * from './network-environment-create';
142
143
  export * from './network-provision-input';
@@ -158,7 +159,6 @@ export * from './operating-system';
158
159
  export * from './operating-system-version';
159
160
  export * from './operation-custom-settings';
160
161
  export * from './organization';
161
- export * from './organization-activity';
162
162
  export * from './organization-create';
163
163
  export * from './organization-relation';
164
164
  export * from './organization-update';
@@ -182,6 +182,8 @@ export * from './pipeline-update';
182
182
  export * from './project';
183
183
  export * from './project-create';
184
184
  export * from './project-organization-create';
185
+ export * from './project-owner-relation';
186
+ export * from './project-owner-type';
185
187
  export * from './project-relation';
186
188
  export * from './project-update';
187
189
  export * from './provider-code';
@@ -153,6 +153,7 @@ __exportStar(require("./linked-resource-summary-field"), exports);
153
153
  __exportStar(require("./log"), exports);
154
154
  __exportStar(require("./member"), exports);
155
155
  __exportStar(require("./member-relation"), exports);
156
+ __exportStar(require("./membership-relation"), exports);
156
157
  __exportStar(require("./network"), exports);
157
158
  __exportStar(require("./network-environment-create"), exports);
158
159
  __exportStar(require("./network-provision-input"), exports);
@@ -174,7 +175,6 @@ __exportStar(require("./operating-system"), exports);
174
175
  __exportStar(require("./operating-system-version"), exports);
175
176
  __exportStar(require("./operation-custom-settings"), exports);
176
177
  __exportStar(require("./organization"), exports);
177
- __exportStar(require("./organization-activity"), exports);
178
178
  __exportStar(require("./organization-create"), exports);
179
179
  __exportStar(require("./organization-relation"), exports);
180
180
  __exportStar(require("./organization-update"), exports);
@@ -198,6 +198,8 @@ __exportStar(require("./pipeline-update"), exports);
198
198
  __exportStar(require("./project"), exports);
199
199
  __exportStar(require("./project-create"), exports);
200
200
  __exportStar(require("./project-organization-create"), exports);
201
+ __exportStar(require("./project-owner-relation"), exports);
202
+ __exportStar(require("./project-owner-type"), exports);
201
203
  __exportStar(require("./project-relation"), exports);
202
204
  __exportStar(require("./project-update"), exports);
203
205
  __exportStar(require("./provider-code"), exports);
@@ -0,0 +1,44 @@
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 { EnvironmentRelation } from './environment-relation';
13
+ import { RoleRelation } from './role-relation';
14
+ /**
15
+ *
16
+ * @export
17
+ * @interface MembershipRelation
18
+ */
19
+ export interface MembershipRelation {
20
+ /**
21
+ *
22
+ * @type {EnvironmentRelation}
23
+ * @memberof MembershipRelation
24
+ */
25
+ environment: EnvironmentRelation | null;
26
+ /**
27
+ *
28
+ * @type {RoleRelation}
29
+ * @memberof MembershipRelation
30
+ */
31
+ role: RoleRelation | null;
32
+ /**
33
+ * The date and time when the record was created
34
+ * @type {string}
35
+ * @memberof MembershipRelation
36
+ */
37
+ created_at: string;
38
+ /**
39
+ * The date and time when the record was last updated
40
+ * @type {string}
41
+ * @memberof MembershipRelation
42
+ */
43
+ updated_at: string;
44
+ }
@@ -0,0 +1,19 @@
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 { OrganizationRelation } from './organization-relation';
13
+ import { UserRelation } from './user-relation';
14
+ /**
15
+ * @type ProjectOwnerRelation
16
+ * The owner of the project (user or organization)
17
+ * @export
18
+ */
19
+ export type ProjectOwnerRelation = OrganizationRelation | UserRelation;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ /**
4
+ * devopness API
5
+ * Devopness API - Painless essential DevOps to everyone
6
+ *
7
+ * The version of the OpenAPI document: latest
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,20 @@
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
+ * The possible types of users.
14
+ * @export
15
+ * @enum {string}
16
+ */
17
+ export declare enum ProjectOwnerType {
18
+ User = "user",
19
+ Org = "org"
20
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ /**
4
+ * devopness API
5
+ * Devopness API - Painless essential DevOps to everyone
6
+ *
7
+ * The version of the OpenAPI document: latest
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.ProjectOwnerType = void 0;
16
+ /**
17
+ * The possible types of users.
18
+ * @export
19
+ * @enum {string}
20
+ */
21
+ var ProjectOwnerType;
22
+ (function (ProjectOwnerType) {
23
+ ProjectOwnerType["User"] = "user";
24
+ ProjectOwnerType["Org"] = "org";
25
+ })(ProjectOwnerType || (exports.ProjectOwnerType = ProjectOwnerType = {}));
@@ -9,6 +9,8 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { ProjectOwnerRelation } from './project-owner-relation';
13
+ import { ProjectOwnerType } from './project-owner-type';
12
14
  import { ResourceSummaryItem } from './resource-summary-item';
13
15
  import { UserRelation } from './user-relation';
14
16
  /**
@@ -53,6 +55,18 @@ export interface ProjectRelation {
53
55
  * @memberof ProjectRelation
54
56
  */
55
57
  os_users: Array<object>;
58
+ /**
59
+ *
60
+ * @type {ProjectOwnerRelation}
61
+ * @memberof ProjectRelation
62
+ */
63
+ owner: ProjectOwnerRelation;
64
+ /**
65
+ *
66
+ * @type {ProjectOwnerType}
67
+ * @memberof ProjectRelation
68
+ */
69
+ owner_type: ProjectOwnerType;
56
70
  /**
57
71
  *
58
72
  * @type {UserRelation}
@@ -9,6 +9,8 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { ProjectOwnerRelation } from './project-owner-relation';
13
+ import { ProjectOwnerType } from './project-owner-type';
12
14
  import { ResourceSummaryItem } from './resource-summary-item';
13
15
  import { UserRelation } from './user-relation';
14
16
  /**
@@ -53,6 +55,18 @@ export interface Project {
53
55
  * @memberof Project
54
56
  */
55
57
  os_users: Array<object>;
58
+ /**
59
+ *
60
+ * @type {ProjectOwnerRelation}
61
+ * @memberof Project
62
+ */
63
+ owner: ProjectOwnerRelation;
64
+ /**
65
+ *
66
+ * @type {ProjectOwnerType}
67
+ * @memberof Project
68
+ */
69
+ owner_type: ProjectOwnerType;
56
70
  /**
57
71
  *
58
72
  * @type {UserRelation}
@@ -1,5 +1,3 @@
1
1
  import { OrganizationsApiService } from "../api/generated/apis/organizations-api";
2
- import { OrganizationsEnvironmentsApiService } from "../api/generated/apis/organizations-environments-api";
3
2
  export declare class OrganizationService extends OrganizationsApiService {
4
- environments: OrganizationsEnvironmentsApiService;
5
3
  }
@@ -2,11 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OrganizationService = void 0;
4
4
  const organizations_api_1 = require("../api/generated/apis/organizations-api");
5
- const organizations_environments_api_1 = require("../api/generated/apis/organizations-environments-api");
6
5
  class OrganizationService extends organizations_api_1.OrganizationsApiService {
7
- constructor() {
8
- super(...arguments);
9
- this.environments = new organizations_environments_api_1.OrganizationsEnvironmentsApiService();
10
- }
11
6
  }
12
7
  exports.OrganizationService = OrganizationService;
@@ -1,7 +1,9 @@
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';
4
5
  export declare class TeamService extends TeamsApiService {
5
6
  invitations: TeamsInvitationsApiService;
6
7
  members: TeamsMembersApiService;
8
+ memberships: TeamsMembershipsApiService;
7
9
  }
@@ -4,11 +4,13 @@ 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");
7
8
  class TeamService extends teams_api_1.TeamsApiService {
8
9
  constructor() {
9
10
  super(...arguments);
10
11
  this.invitations = new teams_invitations_api_1.TeamsInvitationsApiService();
11
12
  this.members = new teams_members_api_1.TeamsMembersApiService();
13
+ this.memberships = new teams_memberships_api_1.TeamsMembershipsApiService();
12
14
  }
13
15
  }
14
16
  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.0.1",
4
+ "version": "3.1.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -54,9 +54,9 @@
54
54
  "@eslint/js": "^9.37.0",
55
55
  "@openapitools/openapi-generator-cli": "^2.25.0",
56
56
  "@types/jest": "^30.0.0",
57
- "@typescript-eslint/parser": "^8.46.1",
57
+ "@typescript-eslint/parser": "^8.46.2",
58
58
  "axios-mock-adapter": "^2.1.0",
59
- "eslint": "^9.37.0",
59
+ "eslint": "^9.38.0",
60
60
  "eslint-import-resolver-typescript": "^4.4.4",
61
61
  "eslint-plugin-import": "^2.32.0",
62
62
  "eslint-plugin-n": "^17.23.1",
@@ -66,11 +66,11 @@
66
66
  "ts-jest": "^29.4.5",
67
67
  "typedoc": "^0.28.14",
68
68
  "typescript": "^5.9.3",
69
- "typescript-eslint": "^8.46.1"
69
+ "typescript-eslint": "^8.46.2"
70
70
  },
71
71
  "dependencies": {
72
72
  "@types/parse-link-header": "^2.0.3",
73
- "axios": "^1.12.0",
73
+ "axios": "^1.13.0",
74
74
  "parse-link-header": "^2.0.0"
75
75
  }
76
76
  }
@@ -1,46 +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 { TriggeredActions } from './triggered-actions';
13
- import { UserEnvironmentStats } from './user-environment-stats';
14
- import { UserProjectStats } from './user-project-stats';
15
- import { UserTeamStats } from './user-team-stats';
16
- /**
17
- *
18
- * @export
19
- * @interface OrganizationActivity
20
- */
21
- export interface OrganizationActivity {
22
- /**
23
- *
24
- * @type {UserProjectStats}
25
- * @memberof OrganizationActivity
26
- */
27
- projects: UserProjectStats;
28
- /**
29
- *
30
- * @type {UserEnvironmentStats}
31
- * @memberof OrganizationActivity
32
- */
33
- environments: UserEnvironmentStats;
34
- /**
35
- *
36
- * @type {UserTeamStats}
37
- * @memberof OrganizationActivity
38
- */
39
- teams: UserTeamStats;
40
- /**
41
- *
42
- * @type {TriggeredActions}
43
- * @memberof OrganizationActivity
44
- */
45
- triggered_actions: TriggeredActions;
46
- }