@devopness/sdk-js 2.11.0 → 2.12.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.
- 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/environment-team.d.ts +0 -6
- package/dist/api/generated/models/invitation.d.ts +7 -0
- package/dist/services/EnvironmentService.d.ts +0 -2
- package/dist/services/EnvironmentService.js +0 -2
- package/dist/services/UserService.d.ts +2 -0
- package/dist/services/UserService.js +5 -0
- package/package.json +1 -1
- package/dist/api/generated/apis/environments-invitations-api.d.ts +0 -35
- package/dist/api/generated/apis/environments-invitations-api.js +0 -78
|
@@ -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 { Invitation } 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<Invitation>>>;
|
|
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;
|
|
@@ -34,12 +34,6 @@ export interface EnvironmentTeam {
|
|
|
34
34
|
* @memberof EnvironmentTeam
|
|
35
35
|
*/
|
|
36
36
|
photo_url: string | null;
|
|
37
|
-
/**
|
|
38
|
-
* The unique id of the role used on this environment
|
|
39
|
-
* @type {number}
|
|
40
|
-
* @memberof EnvironmentTeam
|
|
41
|
-
*/
|
|
42
|
-
role_id?: number;
|
|
43
37
|
/**
|
|
44
38
|
*
|
|
45
39
|
* @type {Role}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import { InvitationStatus } from './invitation-status';
|
|
13
|
+
import { ProjectRelation } from './project-relation';
|
|
13
14
|
import { TeamRelation } from './team-relation';
|
|
14
15
|
import { UserRelation } from './user-relation';
|
|
15
16
|
/**
|
|
@@ -66,6 +67,12 @@ export interface Invitation {
|
|
|
66
67
|
* @memberof Invitation
|
|
67
68
|
*/
|
|
68
69
|
team: TeamRelation;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {ProjectRelation}
|
|
73
|
+
* @memberof Invitation
|
|
74
|
+
*/
|
|
75
|
+
project?: ProjectRelation;
|
|
69
76
|
/**
|
|
70
77
|
* The date and time when the invitation will expire
|
|
71
78
|
* @type {string}
|
|
@@ -3,7 +3,6 @@ import { EnvironmentsActionsApiService } from '../api/generated/apis/environment
|
|
|
3
3
|
import { EnvironmentsApplicationsApiService } from '../api/generated/apis/environments-applications-api';
|
|
4
4
|
import { EnvironmentsCronJobsApiService } from '../api/generated/apis/environments-cron-jobs-api';
|
|
5
5
|
import { EnvironmentsDaemonsApiService } from '../api/generated/apis/environments-daemons-api';
|
|
6
|
-
import { EnvironmentsInvitationsApiService } from '../api/generated/apis/environments-invitations-api';
|
|
7
6
|
import { EnvironmentsNetworkRulesApiService } from '../api/generated/apis/environments-network-rules-api';
|
|
8
7
|
import { EnvironmentsServersApiService } from '../api/generated/apis/environments-servers-api';
|
|
9
8
|
import { EnvironmentsServicesApiService } from '../api/generated/apis/environments-services-api';
|
|
@@ -15,7 +14,6 @@ export declare class EnvironmentService extends EnvironmentsApiService {
|
|
|
15
14
|
applications: EnvironmentsApplicationsApiService;
|
|
16
15
|
cronjobs: EnvironmentsCronJobsApiService;
|
|
17
16
|
daemons: EnvironmentsDaemonsApiService;
|
|
18
|
-
invitations: EnvironmentsInvitationsApiService;
|
|
19
17
|
members: EnvironmentsMembersApiService;
|
|
20
18
|
networkRules: EnvironmentsNetworkRulesApiService;
|
|
21
19
|
servers: EnvironmentsServersApiService;
|
|
@@ -6,7 +6,6 @@ const environments_actions_api_1 = require("../api/generated/apis/environments-a
|
|
|
6
6
|
const environments_applications_api_1 = require("../api/generated/apis/environments-applications-api");
|
|
7
7
|
const environments_cron_jobs_api_1 = require("../api/generated/apis/environments-cron-jobs-api");
|
|
8
8
|
const environments_daemons_api_1 = require("../api/generated/apis/environments-daemons-api");
|
|
9
|
-
const environments_invitations_api_1 = require("../api/generated/apis/environments-invitations-api");
|
|
10
9
|
const environments_network_rules_api_1 = require("../api/generated/apis/environments-network-rules-api");
|
|
11
10
|
const environments_servers_api_1 = require("../api/generated/apis/environments-servers-api");
|
|
12
11
|
const environments_services_api_1 = require("../api/generated/apis/environments-services-api");
|
|
@@ -20,7 +19,6 @@ class EnvironmentService extends environments_api_1.EnvironmentsApiService {
|
|
|
20
19
|
this.applications = new environments_applications_api_1.EnvironmentsApplicationsApiService();
|
|
21
20
|
this.cronjobs = new environments_cron_jobs_api_1.EnvironmentsCronJobsApiService();
|
|
22
21
|
this.daemons = new environments_daemons_api_1.EnvironmentsDaemonsApiService();
|
|
23
|
-
this.invitations = new environments_invitations_api_1.EnvironmentsInvitationsApiService();
|
|
24
22
|
this.members = new environments_members_api_1.EnvironmentsMembersApiService();
|
|
25
23
|
this.networkRules = new environments_network_rules_api_1.EnvironmentsNetworkRulesApiService();
|
|
26
24
|
this.servers = new environments_servers_api_1.EnvironmentsServersApiService();
|
|
@@ -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;
|
package/package.json
CHANGED
|
@@ -1,35 +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 { Invitation } from '../../generated/models';
|
|
15
|
-
import { InvitationCreate } from '../../generated/models';
|
|
16
|
-
/**
|
|
17
|
-
* EnvironmentsInvitationsApiService - Auto-generated
|
|
18
|
-
*/
|
|
19
|
-
export declare class EnvironmentsInvitationsApiService extends ApiBaseService {
|
|
20
|
-
/**
|
|
21
|
-
*
|
|
22
|
-
* @summary Returns a list of all invitations belonging to an environment
|
|
23
|
-
* @param {number} environmentId Numeric ID of the environment to get invitations from
|
|
24
|
-
* @param {number} [page] Number of the page to be retrieved
|
|
25
|
-
* @param {number} [perPage] Number of items returned per page
|
|
26
|
-
*/
|
|
27
|
-
listEnvironmentInvitations(environmentId: number, page?: number, perPage?: number): Promise<ApiResponse<Array<Invitation>>>;
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @summary Send invitation to user email to participate to a project\'s environment
|
|
31
|
-
* @param {number} environmentId Numeric ID of the environment to invite a user
|
|
32
|
-
* @param {InvitationCreate} invitationCreate A JSON object containing the email to send the invitation
|
|
33
|
-
*/
|
|
34
|
-
sendInvitation(environmentId: number, invitationCreate: InvitationCreate): Promise<ApiResponse<Invitation>>;
|
|
35
|
-
}
|
|
@@ -1,78 +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.EnvironmentsInvitationsApiService = 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
|
-
* EnvironmentsInvitationsApiService - Auto-generated
|
|
30
|
-
*/
|
|
31
|
-
class EnvironmentsInvitationsApiService extends ApiBaseService_1.ApiBaseService {
|
|
32
|
-
/**
|
|
33
|
-
*
|
|
34
|
-
* @summary Returns a list of all invitations belonging to an environment
|
|
35
|
-
* @param {number} environmentId Numeric ID of the environment to get invitations from
|
|
36
|
-
* @param {number} [page] Number of the page to be retrieved
|
|
37
|
-
* @param {number} [perPage] Number of items returned per page
|
|
38
|
-
*/
|
|
39
|
-
listEnvironmentInvitations(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', 'listEnvironmentInvitations');
|
|
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}/invitations' + (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
|
-
*
|
|
59
|
-
* @summary Send invitation to user email to participate to a project\'s environment
|
|
60
|
-
* @param {number} environmentId Numeric ID of the environment to invite a user
|
|
61
|
-
* @param {InvitationCreate} invitationCreate A JSON object containing the email to send the invitation
|
|
62
|
-
*/
|
|
63
|
-
sendInvitation(environmentId, invitationCreate) {
|
|
64
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
-
if (environmentId === null || environmentId === undefined) {
|
|
66
|
-
throw new Exceptions_1.ArgumentNullException('environmentId', 'sendInvitation');
|
|
67
|
-
}
|
|
68
|
-
if (invitationCreate === null || invitationCreate === undefined) {
|
|
69
|
-
throw new Exceptions_1.ArgumentNullException('invitationCreate', 'sendInvitation');
|
|
70
|
-
}
|
|
71
|
-
let queryString = '';
|
|
72
|
-
const requestUrl = '/environments/{environment_id}/invitations' + (queryString ? `?${queryString}` : '');
|
|
73
|
-
const response = yield this.post(requestUrl.replace(`{${"environment_id"}}`, encodeURIComponent(String(environmentId))), invitationCreate);
|
|
74
|
-
return new ApiResponse_1.ApiResponse(response);
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
exports.EnvironmentsInvitationsApiService = EnvironmentsInvitationsApiService;
|