@devopness/sdk-js 2.11.1 → 2.12.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/invitations-api.d.ts +1 -2
- package/dist/api/generated/apis/invitations-api.js +3 -7
- package/dist/api/generated/apis/teams-invitations-api.d.ts +5 -5
- package/dist/api/generated/apis/teams-invitations-api.js +5 -5
- package/dist/api/generated/apis/users-team-invitations-api.d.ts +26 -0
- package/dist/api/generated/apis/users-team-invitations-api.js +53 -0
- package/dist/api/generated/models/index.d.ts +3 -3
- package/dist/api/generated/models/index.js +3 -3
- package/dist/api/generated/models/{invitation-create.d.ts → team-invitation-create.d.ts} +3 -3
- package/dist/api/generated/models/{invitation-create.js → team-invitation-create.js} +0 -0
- package/dist/api/generated/models/{invitation-status.d.ts → team-invitation-status.d.ts} +1 -1
- package/dist/api/generated/models/{invitation-status.js → team-invitation-status.js} +7 -7
- package/dist/api/generated/models/{invitation.d.ts → team-invitation.d.ts} +24 -17
- package/dist/api/generated/models/{invitation.js → team-invitation.js} +0 -0
- package/dist/services/UserService.d.ts +2 -0
- package/dist/services/UserService.js +5 -0
- package/package.json +1 -1
|
@@ -19,7 +19,6 @@ export declare class InvitationsApiService extends ApiBaseService {
|
|
|
19
19
|
*
|
|
20
20
|
* @summary Accept a pending invitation
|
|
21
21
|
* @param {string} invitationId UUID of the invitation to be accepted
|
|
22
|
-
* @param {string} token The token of the invitation to be accepted
|
|
23
22
|
*/
|
|
24
|
-
acceptInvitation(invitationId: string
|
|
23
|
+
acceptInvitation(invitationId: string): Promise<ApiResponse<void>>;
|
|
25
24
|
}
|
|
@@ -33,19 +33,15 @@ class InvitationsApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
33
33
|
*
|
|
34
34
|
* @summary Accept a pending invitation
|
|
35
35
|
* @param {string} invitationId UUID of the invitation to be accepted
|
|
36
|
-
* @param {string} token The token of the invitation to be accepted
|
|
37
36
|
*/
|
|
38
|
-
acceptInvitation(invitationId
|
|
37
|
+
acceptInvitation(invitationId) {
|
|
39
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
39
|
if (invitationId === null || invitationId === undefined) {
|
|
41
40
|
throw new Exceptions_1.ArgumentNullException('invitationId', 'acceptInvitation');
|
|
42
41
|
}
|
|
43
|
-
if (token === null || token === undefined) {
|
|
44
|
-
throw new Exceptions_1.ArgumentNullException('token', 'acceptInvitation');
|
|
45
|
-
}
|
|
46
42
|
let queryString = '';
|
|
47
|
-
const requestUrl = '/invitations/{invitation_id}/accept
|
|
48
|
-
const response = yield this.post(requestUrl.replace(`{${"invitation_id"}}`, encodeURIComponent(String(invitationId)))
|
|
43
|
+
const requestUrl = '/invitations/{invitation_id}/accept' + (queryString ? `?${queryString}` : '');
|
|
44
|
+
const response = yield this.post(requestUrl.replace(`{${"invitation_id"}}`, encodeURIComponent(String(invitationId))));
|
|
49
45
|
return new ApiResponse_1.ApiResponse(response);
|
|
50
46
|
});
|
|
51
47
|
}
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { ApiBaseService } from "../../../services/ApiBaseService";
|
|
13
13
|
import { ApiResponse } from "../../../common/ApiResponse";
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
14
|
+
import { TeamInvitation } from '../../generated/models';
|
|
15
|
+
import { TeamInvitationCreate } from '../../generated/models';
|
|
16
16
|
/**
|
|
17
17
|
* TeamsInvitationsApiService - Auto-generated
|
|
18
18
|
*/
|
|
@@ -24,12 +24,12 @@ export declare class TeamsInvitationsApiService extends ApiBaseService {
|
|
|
24
24
|
* @param {number} [page] Number of the page to be retrieved
|
|
25
25
|
* @param {number} [perPage] Number of items returned per page
|
|
26
26
|
*/
|
|
27
|
-
listTeamInvitations(teamId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<
|
|
27
|
+
listTeamInvitations(teamId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<TeamInvitation>>>;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @summary Send invitation to user email to participate to a team
|
|
31
31
|
* @param {number} teamId Numeric ID of the team to invite an user
|
|
32
|
-
* @param {
|
|
32
|
+
* @param {TeamInvitationCreate} teamInvitationCreate A JSON object containing the email to send the invitation
|
|
33
33
|
*/
|
|
34
|
-
sendTeamInvitation(teamId: number,
|
|
34
|
+
sendTeamInvitation(teamId: number, teamInvitationCreate: TeamInvitationCreate): Promise<ApiResponse<TeamInvitation>>;
|
|
35
35
|
}
|
|
@@ -58,19 +58,19 @@ class TeamsInvitationsApiService extends ApiBaseService_1.ApiBaseService {
|
|
|
58
58
|
*
|
|
59
59
|
* @summary Send invitation to user email to participate to a team
|
|
60
60
|
* @param {number} teamId Numeric ID of the team to invite an user
|
|
61
|
-
* @param {
|
|
61
|
+
* @param {TeamInvitationCreate} teamInvitationCreate A JSON object containing the email to send the invitation
|
|
62
62
|
*/
|
|
63
|
-
sendTeamInvitation(teamId,
|
|
63
|
+
sendTeamInvitation(teamId, teamInvitationCreate) {
|
|
64
64
|
return __awaiter(this, void 0, void 0, function* () {
|
|
65
65
|
if (teamId === null || teamId === undefined) {
|
|
66
66
|
throw new Exceptions_1.ArgumentNullException('teamId', 'sendTeamInvitation');
|
|
67
67
|
}
|
|
68
|
-
if (
|
|
69
|
-
throw new Exceptions_1.ArgumentNullException('
|
|
68
|
+
if (teamInvitationCreate === null || teamInvitationCreate === undefined) {
|
|
69
|
+
throw new Exceptions_1.ArgumentNullException('teamInvitationCreate', 'sendTeamInvitation');
|
|
70
70
|
}
|
|
71
71
|
let queryString = '';
|
|
72
72
|
const requestUrl = '/teams/{team_id}/invitations' + (queryString ? `?${queryString}` : '');
|
|
73
|
-
const response = yield this.post(requestUrl.replace(`{${"team_id"}}`, encodeURIComponent(String(teamId))),
|
|
73
|
+
const response = yield this.post(requestUrl.replace(`{${"team_id"}}`, encodeURIComponent(String(teamId))), teamInvitationCreate);
|
|
74
74
|
return new ApiResponse_1.ApiResponse(response);
|
|
75
75
|
});
|
|
76
76
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { TeamInvitation } from '../../generated/models';
|
|
15
|
+
/**
|
|
16
|
+
* UsersTeamInvitationsApiService - Auto-generated
|
|
17
|
+
*/
|
|
18
|
+
export declare class UsersTeamInvitationsApiService extends ApiBaseService {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @summary Returns a list of all pending team invitations for the authenticated user
|
|
22
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
23
|
+
* @param {number} [perPage] Number of items returned per page
|
|
24
|
+
*/
|
|
25
|
+
listUserTeamInvitations(page?: number, perPage?: number): Promise<ApiResponse<Array<TeamInvitation>>>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* devopness API
|
|
5
|
+
* Devopness API - Painless essential DevOps to everyone
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: latest
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.UsersTeamInvitationsApiService = void 0;
|
|
25
|
+
const ApiBaseService_1 = require("../../../services/ApiBaseService");
|
|
26
|
+
const ApiResponse_1 = require("../../../common/ApiResponse");
|
|
27
|
+
/**
|
|
28
|
+
* UsersTeamInvitationsApiService - Auto-generated
|
|
29
|
+
*/
|
|
30
|
+
class UsersTeamInvitationsApiService extends ApiBaseService_1.ApiBaseService {
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @summary Returns a list of all pending team invitations for the authenticated user
|
|
34
|
+
* @param {number} [page] Number of the page to be retrieved
|
|
35
|
+
* @param {number} [perPage] Number of items returned per page
|
|
36
|
+
*/
|
|
37
|
+
listUserTeamInvitations(page, perPage) {
|
|
38
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
let queryString = '';
|
|
40
|
+
const queryParams = { page: page, per_page: perPage, };
|
|
41
|
+
for (const key in queryParams) {
|
|
42
|
+
if (queryParams[key] === undefined || queryParams[key] === null) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
queryString += (queryString ? '&' : '') + `${key}=${encodeURI(queryParams[key])}`;
|
|
46
|
+
}
|
|
47
|
+
const requestUrl = '/users/teams/invitations' + (queryString ? `?${queryString}` : '');
|
|
48
|
+
const response = yield this.get(requestUrl);
|
|
49
|
+
return new ApiResponse_1.ApiResponse(response);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.UsersTeamInvitationsApiService = UsersTeamInvitationsApiService;
|
|
@@ -101,9 +101,6 @@ export * from './hook-request-relation';
|
|
|
101
101
|
export * from './hook-type';
|
|
102
102
|
export * from './hook-variable';
|
|
103
103
|
export * from './hook-variable-type';
|
|
104
|
-
export * from './invitation';
|
|
105
|
-
export * from './invitation-create';
|
|
106
|
-
export * from './invitation-status';
|
|
107
104
|
export * from './language';
|
|
108
105
|
export * from './language-runtime';
|
|
109
106
|
export * from './language-runtime-framework';
|
|
@@ -191,6 +188,9 @@ export * from './ssl-certificate-type';
|
|
|
191
188
|
export * from './ssl-certificate-validation-level';
|
|
192
189
|
export * from './team';
|
|
193
190
|
export * from './team-create';
|
|
191
|
+
export * from './team-invitation';
|
|
192
|
+
export * from './team-invitation-create';
|
|
193
|
+
export * from './team-invitation-status';
|
|
194
194
|
export * from './team-relation';
|
|
195
195
|
export * from './team-update';
|
|
196
196
|
export * from './trigger-event';
|
|
@@ -117,9 +117,6 @@ __exportStar(require("./hook-request-relation"), exports);
|
|
|
117
117
|
__exportStar(require("./hook-type"), exports);
|
|
118
118
|
__exportStar(require("./hook-variable"), exports);
|
|
119
119
|
__exportStar(require("./hook-variable-type"), exports);
|
|
120
|
-
__exportStar(require("./invitation"), exports);
|
|
121
|
-
__exportStar(require("./invitation-create"), exports);
|
|
122
|
-
__exportStar(require("./invitation-status"), exports);
|
|
123
120
|
__exportStar(require("./language"), exports);
|
|
124
121
|
__exportStar(require("./language-runtime"), exports);
|
|
125
122
|
__exportStar(require("./language-runtime-framework"), exports);
|
|
@@ -207,6 +204,9 @@ __exportStar(require("./ssl-certificate-type"), exports);
|
|
|
207
204
|
__exportStar(require("./ssl-certificate-validation-level"), exports);
|
|
208
205
|
__exportStar(require("./team"), exports);
|
|
209
206
|
__exportStar(require("./team-create"), exports);
|
|
207
|
+
__exportStar(require("./team-invitation"), exports);
|
|
208
|
+
__exportStar(require("./team-invitation-create"), exports);
|
|
209
|
+
__exportStar(require("./team-invitation-status"), exports);
|
|
210
210
|
__exportStar(require("./team-relation"), exports);
|
|
211
211
|
__exportStar(require("./team-update"), exports);
|
|
212
212
|
__exportStar(require("./trigger-event"), exports);
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
/**
|
|
13
13
|
*
|
|
14
14
|
* @export
|
|
15
|
-
* @interface
|
|
15
|
+
* @interface TeamInvitationCreate
|
|
16
16
|
*/
|
|
17
|
-
export interface
|
|
17
|
+
export interface TeamInvitationCreate {
|
|
18
18
|
/**
|
|
19
19
|
* The user email to send the invitation
|
|
20
20
|
* @type {string}
|
|
21
|
-
* @memberof
|
|
21
|
+
* @memberof TeamInvitationCreate
|
|
22
22
|
*/
|
|
23
23
|
email: string;
|
|
24
24
|
}
|
|
File without changes
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.
|
|
15
|
+
exports.TeamInvitationStatus = void 0;
|
|
16
16
|
/**
|
|
17
17
|
* The status of the invitation
|
|
18
18
|
* @export
|
|
19
19
|
* @enum {string}
|
|
20
20
|
*/
|
|
21
|
-
var
|
|
22
|
-
(function (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
})(
|
|
21
|
+
var TeamInvitationStatus;
|
|
22
|
+
(function (TeamInvitationStatus) {
|
|
23
|
+
TeamInvitationStatus["Accepted"] = "accepted";
|
|
24
|
+
TeamInvitationStatus["Expired"] = "expired";
|
|
25
|
+
TeamInvitationStatus["Pending"] = "pending";
|
|
26
|
+
})(TeamInvitationStatus = exports.TeamInvitationStatus || (exports.TeamInvitationStatus = {}));
|
|
@@ -9,85 +9,92 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import {
|
|
12
|
+
import { ProjectRelation } from './project-relation';
|
|
13
|
+
import { TeamInvitationStatus } from './team-invitation-status';
|
|
13
14
|
import { TeamRelation } from './team-relation';
|
|
14
15
|
import { UserRelation } from './user-relation';
|
|
15
16
|
/**
|
|
16
17
|
*
|
|
17
18
|
* @export
|
|
18
|
-
* @interface
|
|
19
|
+
* @interface TeamInvitation
|
|
19
20
|
*/
|
|
20
|
-
export interface
|
|
21
|
+
export interface TeamInvitation {
|
|
21
22
|
/**
|
|
22
23
|
* The unique UUID of the given invitation
|
|
23
24
|
* @type {string}
|
|
24
|
-
* @memberof
|
|
25
|
+
* @memberof TeamInvitation
|
|
25
26
|
*/
|
|
26
27
|
id: string;
|
|
27
28
|
/**
|
|
28
29
|
*
|
|
29
|
-
* @type {
|
|
30
|
-
* @memberof
|
|
30
|
+
* @type {TeamInvitationStatus}
|
|
31
|
+
* @memberof TeamInvitation
|
|
31
32
|
*/
|
|
32
|
-
status:
|
|
33
|
+
status: TeamInvitationStatus;
|
|
33
34
|
/**
|
|
34
35
|
* Human readable version of the invitation status
|
|
35
36
|
* @type {string}
|
|
36
|
-
* @memberof
|
|
37
|
+
* @memberof TeamInvitation
|
|
37
38
|
*/
|
|
38
39
|
status_human_readable?: string;
|
|
39
40
|
/**
|
|
40
41
|
* The email of the user that has been invited to team
|
|
41
42
|
* @type {string}
|
|
42
|
-
* @memberof
|
|
43
|
+
* @memberof TeamInvitation
|
|
43
44
|
*/
|
|
44
45
|
email: string;
|
|
45
46
|
/**
|
|
46
47
|
* The IP of the user who accepted the invitation
|
|
47
48
|
* @type {string}
|
|
48
|
-
* @memberof
|
|
49
|
+
* @memberof TeamInvitation
|
|
49
50
|
*/
|
|
50
51
|
accepted_from_ip?: string | null;
|
|
51
52
|
/**
|
|
52
53
|
*
|
|
53
54
|
* @type {UserRelation}
|
|
54
|
-
* @memberof
|
|
55
|
+
* @memberof TeamInvitation
|
|
55
56
|
*/
|
|
56
57
|
created_by_user: UserRelation;
|
|
57
58
|
/**
|
|
58
59
|
*
|
|
59
60
|
* @type {UserRelation}
|
|
60
|
-
* @memberof
|
|
61
|
+
* @memberof TeamInvitation
|
|
61
62
|
*/
|
|
62
63
|
user: UserRelation;
|
|
63
64
|
/**
|
|
64
65
|
*
|
|
65
66
|
* @type {TeamRelation}
|
|
66
|
-
* @memberof
|
|
67
|
+
* @memberof TeamInvitation
|
|
67
68
|
*/
|
|
68
69
|
team: TeamRelation;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {ProjectRelation}
|
|
73
|
+
* @memberof TeamInvitation
|
|
74
|
+
*/
|
|
75
|
+
project?: ProjectRelation;
|
|
69
76
|
/**
|
|
70
77
|
* The date and time when the invitation will expire
|
|
71
78
|
* @type {string}
|
|
72
|
-
* @memberof
|
|
79
|
+
* @memberof TeamInvitation
|
|
73
80
|
*/
|
|
74
81
|
expires_at?: string;
|
|
75
82
|
/**
|
|
76
83
|
* The date and time when the invitation was accepted
|
|
77
84
|
* @type {string}
|
|
78
|
-
* @memberof
|
|
85
|
+
* @memberof TeamInvitation
|
|
79
86
|
*/
|
|
80
87
|
accepted_at?: string | null;
|
|
81
88
|
/**
|
|
82
89
|
* The date and time when the record was created
|
|
83
90
|
* @type {string}
|
|
84
|
-
* @memberof
|
|
91
|
+
* @memberof TeamInvitation
|
|
85
92
|
*/
|
|
86
93
|
created_at?: string;
|
|
87
94
|
/**
|
|
88
95
|
* The date and time when the record was last updated
|
|
89
96
|
* @type {string}
|
|
90
|
-
* @memberof
|
|
97
|
+
* @memberof TeamInvitation
|
|
91
98
|
*/
|
|
92
99
|
updated_at?: string;
|
|
93
100
|
}
|
|
File without changes
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import { UsersApiService } from '../api/generated/apis/users-api';
|
|
2
|
+
import { UsersTeamInvitationsApiService } from '../api/generated/apis/users-team-invitations-api';
|
|
2
3
|
export declare class UserService extends UsersApiService {
|
|
4
|
+
teamInvitations: UsersTeamInvitationsApiService;
|
|
3
5
|
}
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UserService = void 0;
|
|
4
4
|
const users_api_1 = require("../api/generated/apis/users-api");
|
|
5
|
+
const users_team_invitations_api_1 = require("../api/generated/apis/users-team-invitations-api");
|
|
5
6
|
class UserService extends users_api_1.UsersApiService {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.teamInvitations = new users_team_invitations_api_1.UsersTeamInvitationsApiService();
|
|
10
|
+
}
|
|
6
11
|
}
|
|
7
12
|
exports.UserService = UserService;
|