@devopness/sdk-js 2.164.10 → 3.0.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.
@@ -17,10 +17,11 @@ import { ApiResponse } from "../../../common/ApiResponse";
17
17
  export declare class TeamInvitationsApiService extends ApiBaseService {
18
18
  /**
19
19
  *
20
- * @summary Accept a pending team invitation
20
+ * @summary Accept a team invitation
21
21
  * @param {string} teamInvitationId The ID of the team invitation.
22
+ * @param {string} [token] The token to authorize the acceptance of public invitations.
22
23
  */
23
- acceptTeamInvitation(teamInvitationId: string): Promise<ApiResponse<void>>;
24
+ acceptTeamInvitation(teamInvitationId: string, token?: string): Promise<ApiResponse<void>>;
24
25
  /**
25
26
  *
26
27
  * @summary Delete a pending team invitation
@@ -29,7 +30,7 @@ export declare class TeamInvitationsApiService extends ApiBaseService {
29
30
  deleteTeamInvitation(teamInvitationId: string): Promise<ApiResponse<void>>;
30
31
  /**
31
32
  *
32
- * @summary Reject a pending team invitation
33
+ * @summary Reject a pending private team invitation
33
34
  * @param {string} teamInvitationId The ID of the team invitation.
34
35
  */
35
36
  rejectTeamInvitation(teamInvitationId: string): Promise<ApiResponse<void>>;
@@ -31,15 +31,23 @@ const Exceptions_1 = require("../../../common/Exceptions");
31
31
  class TeamInvitationsApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
- * @summary Accept a pending team invitation
34
+ * @summary Accept a team invitation
35
35
  * @param {string} teamInvitationId The ID of the team invitation.
36
+ * @param {string} [token] The token to authorize the acceptance of public invitations.
36
37
  */
37
- acceptTeamInvitation(teamInvitationId) {
38
+ acceptTeamInvitation(teamInvitationId, token) {
38
39
  return __awaiter(this, void 0, void 0, function* () {
39
40
  if (teamInvitationId === null || teamInvitationId === undefined) {
40
41
  throw new Exceptions_1.ArgumentNullException('teamInvitationId', 'acceptTeamInvitation');
41
42
  }
42
43
  let queryString = '';
44
+ const queryParams = { token: token, };
45
+ for (const key in queryParams) {
46
+ if (queryParams[key] === undefined || queryParams[key] === null) {
47
+ continue;
48
+ }
49
+ queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
50
+ }
43
51
  const requestUrl = '/team-invitations/{team_invitation_id}/accept' + (queryString ? `?${queryString}` : '');
44
52
  const response = yield this.post(requestUrl.replace(`{${"team_invitation_id"}}`, encodeURIComponent(String(teamInvitationId))));
45
53
  return new ApiResponse_1.ApiResponse(response);
@@ -63,7 +71,7 @@ class TeamInvitationsApiService extends ApiBaseService_1.ApiBaseService {
63
71
  }
64
72
  /**
65
73
  *
66
- * @summary Reject a pending team invitation
74
+ * @summary Reject a pending private team invitation
67
75
  * @param {string} teamInvitationId The ID of the team invitation.
68
76
  */
69
77
  rejectTeamInvitation(teamInvitationId) {
@@ -20,14 +20,14 @@ import { InvitationTeamCreate } from '../../generated/models';
20
20
  export declare class TeamsInvitationsApiService extends ApiBaseService {
21
21
  /**
22
22
  *
23
- * @summary Send invitation to user email to participate to a team
23
+ * @summary Create a new invitation for a team
24
24
  * @param {number} teamId The ID of the team.
25
25
  * @param {InvitationTeamCreate} invitationTeamCreate A JSON object containing the resource data
26
26
  */
27
27
  addTeamInvitation(teamId: number, invitationTeamCreate: InvitationTeamCreate): Promise<ApiResponse<Invitation>>;
28
28
  /**
29
29
  *
30
- * @summary Return a list of pending invitations belonging to a team
30
+ * @summary Return a list of invitations belonging to a team
31
31
  * @param {number} teamId The ID of the team.
32
32
  * @param {number} [page] Number of the page to be retrieved
33
33
  * @param {number} [perPage] Number of items returned per page
@@ -31,7 +31,7 @@ const Exceptions_1 = require("../../../common/Exceptions");
31
31
  class TeamsInvitationsApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
- * @summary Send invitation to user email to participate to a team
34
+ * @summary Create a new invitation for a team
35
35
  * @param {number} teamId The ID of the team.
36
36
  * @param {InvitationTeamCreate} invitationTeamCreate A JSON object containing the resource data
37
37
  */
@@ -51,7 +51,7 @@ class TeamsInvitationsApiService extends ApiBaseService_1.ApiBaseService {
51
51
  }
52
52
  /**
53
53
  *
54
- * @summary Return a list of pending invitations belonging to a team
54
+ * @summary Return a list of invitations belonging to a team
55
55
  * @param {number} teamId The ID of the team.
56
56
  * @param {number} [page] Number of the page to be retrieved
57
57
  * @param {number} [perPage] Number of items returned per page
@@ -19,7 +19,7 @@ import { MemberRelation } from '../../generated/models';
19
19
  export declare class TeamsMembersApiService extends ApiBaseService {
20
20
  /**
21
21
  *
22
- * @summary Delete a given team member
22
+ * @summary Remove a member from a team
23
23
  * @param {number} teamId The ID of the team.
24
24
  * @param {number} userId The ID of the user.
25
25
  */
@@ -31,7 +31,7 @@ const Exceptions_1 = require("../../../common/Exceptions");
31
31
  class TeamsMembersApiService extends ApiBaseService_1.ApiBaseService {
32
32
  /**
33
33
  *
34
- * @summary Delete a given team member
34
+ * @summary Remove a member from a team
35
35
  * @param {number} teamId The ID of the team.
36
36
  * @param {number} userId The ID of the user.
37
37
  */
@@ -285,6 +285,7 @@ export * from './team';
285
285
  export * from './team-environment-link';
286
286
  export * from './team-invitation-relation';
287
287
  export * from './team-invitation-status';
288
+ export * from './team-invitation-type';
288
289
  export * from './team-membership-relation';
289
290
  export * from './team-project-create';
290
291
  export * from './team-relation';
@@ -301,6 +301,7 @@ __exportStar(require("./team"), exports);
301
301
  __exportStar(require("./team-environment-link"), exports);
302
302
  __exportStar(require("./team-invitation-relation"), exports);
303
303
  __exportStar(require("./team-invitation-status"), exports);
304
+ __exportStar(require("./team-invitation-type"), exports);
304
305
  __exportStar(require("./team-membership-relation"), exports);
305
306
  __exportStar(require("./team-project-create"), exports);
306
307
  __exportStar(require("./team-relation"), exports);
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import { ProjectRelation } from './project-relation';
13
13
  import { TeamInvitationStatus } from './team-invitation-status';
14
+ import { TeamInvitationType } from './team-invitation-type';
14
15
  import { TeamRelation } from './team-relation';
15
16
  import { UserRelation } from './user-relation';
16
17
  /**
@@ -25,12 +26,24 @@ export interface InvitationRelation {
25
26
  * @memberof InvitationRelation
26
27
  */
27
28
  id: string;
29
+ /**
30
+ *
31
+ * @type {TeamInvitationType}
32
+ * @memberof InvitationRelation
33
+ */
34
+ type: TeamInvitationType;
35
+ /**
36
+ * The token used to accept the public invitation
37
+ * @type {string}
38
+ * @memberof InvitationRelation
39
+ */
40
+ token: string | null;
28
41
  /**
29
42
  * The email of the user that has been invited to team
30
43
  * @type {string}
31
44
  * @memberof InvitationRelation
32
45
  */
33
- email: string;
46
+ email: string | null;
34
47
  /**
35
48
  *
36
49
  * @type {TeamInvitationStatus}
@@ -55,12 +68,6 @@ export interface InvitationRelation {
55
68
  * @memberof InvitationRelation
56
69
  */
57
70
  created_by_user: UserRelation;
58
- /**
59
- *
60
- * @type {UserRelation}
61
- * @memberof InvitationRelation
62
- */
63
- user: UserRelation;
64
71
  /**
65
72
  *
66
73
  * @type {TeamRelation}
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { TeamInvitationType } from './team-invitation-type';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -16,9 +17,15 @@
16
17
  */
17
18
  export interface InvitationTeamCreate {
18
19
  /**
19
- * The user email to send the invitation. Must be a valid email address.
20
+ *
21
+ * @type {TeamInvitationType}
22
+ * @memberof InvitationTeamCreate
23
+ */
24
+ type: TeamInvitationType;
25
+ /**
26
+ * The user email to send the invitation. Must be a valid email address. This field is required when <code>type</code> is <code>private</code>.
20
27
  * @type {string}
21
28
  * @memberof InvitationTeamCreate
22
29
  */
23
- email: string;
30
+ email?: string;
24
31
  }
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import { TeamInvitationStatus } from './team-invitation-status';
13
+ import { TeamInvitationType } from './team-invitation-type';
13
14
  import { TeamRelation } from './team-relation';
14
15
  import { UserRelation } from './user-relation';
15
16
  /**
@@ -24,12 +25,24 @@ export interface Invitation {
24
25
  * @memberof Invitation
25
26
  */
26
27
  id: string;
28
+ /**
29
+ *
30
+ * @type {TeamInvitationType}
31
+ * @memberof Invitation
32
+ */
33
+ type: TeamInvitationType;
34
+ /**
35
+ * The token used to accept the public invitation
36
+ * @type {string}
37
+ * @memberof Invitation
38
+ */
39
+ token: string | null;
27
40
  /**
28
41
  * The email of the user that has been invited to team
29
42
  * @type {string}
30
43
  * @memberof Invitation
31
44
  */
32
- email: string;
45
+ email: string | null;
33
46
  /**
34
47
  *
35
48
  * @type {TeamInvitationStatus}
@@ -54,12 +67,6 @@ export interface Invitation {
54
67
  * @memberof Invitation
55
68
  */
56
69
  created_by_user: UserRelation;
57
- /**
58
- *
59
- * @type {UserRelation}
60
- * @memberof Invitation
61
- */
62
- user: UserRelation;
63
70
  /**
64
71
  *
65
72
  * @type {TeamRelation}
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import { ProjectRelation } from './project-relation';
13
13
  import { TeamInvitationStatus } from './team-invitation-status';
14
+ import { TeamInvitationType } from './team-invitation-type';
14
15
  import { TeamRelation } from './team-relation';
15
16
  import { UserRelation } from './user-relation';
16
17
  /**
@@ -25,12 +26,24 @@ export interface TeamInvitationRelation {
25
26
  * @memberof TeamInvitationRelation
26
27
  */
27
28
  id: string;
29
+ /**
30
+ *
31
+ * @type {TeamInvitationType}
32
+ * @memberof TeamInvitationRelation
33
+ */
34
+ type: TeamInvitationType;
35
+ /**
36
+ * The token used to accept the public invitation
37
+ * @type {string}
38
+ * @memberof TeamInvitationRelation
39
+ */
40
+ token: string | null;
28
41
  /**
29
42
  * The email of the user that has been invited to team
30
43
  * @type {string}
31
44
  * @memberof TeamInvitationRelation
32
45
  */
33
- email: string;
46
+ email: string | null;
34
47
  /**
35
48
  *
36
49
  * @type {TeamInvitationStatus}
@@ -55,12 +68,6 @@ export interface TeamInvitationRelation {
55
68
  * @memberof TeamInvitationRelation
56
69
  */
57
70
  created_by_user: UserRelation;
58
- /**
59
- *
60
- * @type {UserRelation}
61
- * @memberof TeamInvitationRelation
62
- */
63
- user: UserRelation;
64
71
  /**
65
72
  *
66
73
  * @type {TeamRelation}
@@ -10,12 +10,14 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- * The status of the invitation
13
+ * The possible status of Team Invitation.
14
14
  * @export
15
15
  * @enum {string}
16
16
  */
17
17
  export declare enum TeamInvitationStatus {
18
18
  Accepted = "accepted",
19
19
  Expired = "expired",
20
- Pending = "pending"
20
+ Pending = "pending",
21
+ Rejected = "rejected",
22
+ Active = "active"
21
23
  }
@@ -14,7 +14,7 @@
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.TeamInvitationStatus = void 0;
16
16
  /**
17
- * The status of the invitation
17
+ * The possible status of Team Invitation.
18
18
  * @export
19
19
  * @enum {string}
20
20
  */
@@ -23,4 +23,6 @@ var TeamInvitationStatus;
23
23
  TeamInvitationStatus["Accepted"] = "accepted";
24
24
  TeamInvitationStatus["Expired"] = "expired";
25
25
  TeamInvitationStatus["Pending"] = "pending";
26
+ TeamInvitationStatus["Rejected"] = "rejected";
27
+ TeamInvitationStatus["Active"] = "active";
26
28
  })(TeamInvitationStatus || (exports.TeamInvitationStatus = TeamInvitationStatus = {}));
@@ -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 Team Invitation.
14
+ * @export
15
+ * @enum {string}
16
+ */
17
+ export declare enum TeamInvitationType {
18
+ Private = "private",
19
+ Public = "public"
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.TeamInvitationType = void 0;
16
+ /**
17
+ * The possible types of Team Invitation.
18
+ * @export
19
+ * @enum {string}
20
+ */
21
+ var TeamInvitationType;
22
+ (function (TeamInvitationType) {
23
+ TeamInvitationType["Private"] = "private";
24
+ TeamInvitationType["Public"] = "public";
25
+ })(TeamInvitationType || (exports.TeamInvitationType = TeamInvitationType = {}));
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": "2.164.10",
4
+ "version": "3.0.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -51,22 +51,22 @@
51
51
  },
52
52
  "homepage": "https://github.com/devopness/devopness#readme",
53
53
  "devDependencies": {
54
- "@eslint/js": "^9.36.0",
55
- "@openapitools/openapi-generator-cli": "^2.24.0",
54
+ "@eslint/js": "^9.37.0",
55
+ "@openapitools/openapi-generator-cli": "^2.25.0",
56
56
  "@types/jest": "^30.0.0",
57
- "@typescript-eslint/parser": "^8.45.0",
57
+ "@typescript-eslint/parser": "^8.46.1",
58
58
  "axios-mock-adapter": "^2.1.0",
59
- "eslint": "^9.36.0",
59
+ "eslint": "^9.37.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",
63
63
  "eslint-plugin-promise": "^7.2.1",
64
64
  "husky": "9.1.7",
65
65
  "jest": "^30.2.0",
66
- "ts-jest": "^29.4.4",
67
- "typedoc": "^0.28.13",
66
+ "ts-jest": "^29.4.5",
67
+ "typedoc": "^0.28.14",
68
68
  "typescript": "^5.9.3",
69
- "typescript-eslint": "^8.45.0"
69
+ "typescript-eslint": "^8.46.1"
70
70
  },
71
71
  "dependencies": {
72
72
  "@types/parse-link-header": "^2.0.3",