@@ -45,6 +45,12 @@ import {
4545 transformJSONToProjectMember
4646} from '../models' ;
4747// @ts -ignore
48+ import {
49+ ProjectMemberInviteBody ,
50+ transformProjectMemberInviteBodyToJSON ,
51+ transformJSONToProjectMemberInviteBody
52+ } from '../models' ;
53+ // @ts -ignore
4854import {
4955 ProjectStatusEnum ,
5056 transformProjectStatusEnumToJSON ,
@@ -257,6 +263,100 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat
257263
258264
259265
266+ setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ;
267+ let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
268+ localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
269+
270+ return {
271+ url : toPathString ( localVarUrlObj ) ,
272+ options : localVarRequestOptions ,
273+ } ;
274+ } ,
275+ /**
276+ * Invite a member to the project.
277+ * @summary Invite a member
278+ * @param {string } projectId Project id
279+ * @param {ProjectMemberInviteBody } projectMemberInviteBody
280+ * @param {* } [options] Override http request option.
281+ * @throws {RequiredError }
282+ */
283+ inviteProjectMember : async ( projectId : string , projectMemberInviteBody : ProjectMemberInviteBody , options : any = { } ) : Promise < RequestArgs > => {
284+ // verify required parameter 'projectId' is not null or undefined
285+ assertParamExists ( 'inviteProjectMember' , 'projectId' , projectId )
286+ // verify required parameter 'projectMemberInviteBody' is not null or undefined
287+ assertParamExists ( 'inviteProjectMember' , 'projectMemberInviteBody' , projectMemberInviteBody )
288+ const localVarPath = `/v1/projects/{project_id}/members`
289+ . replace ( `{${ "project_id" } }` , encodeURIComponent ( String ( projectId ) ) ) ;
290+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
291+ const localVarUrlObj = new URL ( localVarPath , DUMMY_BASE_URL ) ;
292+ let baseOptions ;
293+ if ( configuration ) {
294+ baseOptions = configuration . baseOptions ;
295+ }
296+
297+ const localVarRequestOptions = { method : 'POST' , ...baseOptions , ...options } ;
298+ const localVarHeaderParameter = { } as any ;
299+ const localVarQueryParameter = { } as any ;
300+
301+ // authentication OAuth2 required
302+ // oauth required
303+ await setOAuthToObject ( localVarHeaderParameter , "OAuth2" , [ ] , configuration )
304+
305+ // authentication PersonalAccessToken required
306+ // http bearer authentication required
307+ await setBearerAuthToObject ( localVarHeaderParameter , configuration )
308+
309+
310+
311+ localVarHeaderParameter [ 'Content-Type' ] = 'application/json' ;
312+
313+ setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ;
314+ let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
315+ localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
316+ localVarRequestOptions . data = serializeDataIfNeeded ( transformProjectMemberInviteBodyToJSON ( projectMemberInviteBody ) , localVarRequestOptions , configuration )
317+
318+ return {
319+ url : toPathString ( localVarUrlObj ) ,
320+ options : localVarRequestOptions ,
321+ } ;
322+ } ,
323+ /**
324+ * Remove a member from the project.
325+ * @summary Remove a member
326+ * @param {string } projectId Project id
327+ * @param {string } memberId Member id
328+ * @param {* } [options] Override http request option.
329+ * @throws {RequiredError }
330+ */
331+ removeProjectMember : async ( projectId : string , memberId : string , options : any = { } ) : Promise < RequestArgs > => {
332+ // verify required parameter 'projectId' is not null or undefined
333+ assertParamExists ( 'removeProjectMember' , 'projectId' , projectId )
334+ // verify required parameter 'memberId' is not null or undefined
335+ assertParamExists ( 'removeProjectMember' , 'memberId' , memberId )
336+ const localVarPath = `/v1/projects/{project_id}/members/{member_id}`
337+ . replace ( `{${ "project_id" } }` , encodeURIComponent ( String ( projectId ) ) )
338+ . replace ( `{${ "member_id" } }` , encodeURIComponent ( String ( memberId ) ) ) ;
339+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
340+ const localVarUrlObj = new URL ( localVarPath , DUMMY_BASE_URL ) ;
341+ let baseOptions ;
342+ if ( configuration ) {
343+ baseOptions = configuration . baseOptions ;
344+ }
345+
346+ const localVarRequestOptions = { method : 'DELETE' , ...baseOptions , ...options } ;
347+ const localVarHeaderParameter = { } as any ;
348+ const localVarQueryParameter = { } as any ;
349+
350+ // authentication OAuth2 required
351+ // oauth required
352+ await setOAuthToObject ( localVarHeaderParameter , "OAuth2" , [ ] , configuration )
353+
354+ // authentication PersonalAccessToken required
355+ // http bearer authentication required
356+ await setBearerAuthToObject ( localVarHeaderParameter , configuration )
357+
358+
359+
260360 setSearchParams ( localVarUrlObj , localVarQueryParameter , options . query ) ;
261361 let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
262362 localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
@@ -375,6 +475,30 @@ export const ProjectsApiFp = function(configuration?: Configuration) {
375475 const localVarAxiosArgs = await localVarAxiosParamCreator . getProjects ( limit , workspace , status , offset , options ) ;
376476 return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ;
377477 } ,
478+ /**
479+ * Invite a member to the project.
480+ * @summary Invite a member
481+ * @param {string } projectId Project id
482+ * @param {ProjectMemberInviteBody } projectMemberInviteBody
483+ * @param {* } [options] Override http request option.
484+ * @throws {RequiredError }
485+ */
486+ async inviteProjectMember ( projectId : string , projectMemberInviteBody : ProjectMemberInviteBody , options ?: any ) : Promise < ( axios ?: AxiosInstance , basePath ?: string ) => AxiosPromise < any > > {
487+ const localVarAxiosArgs = await localVarAxiosParamCreator . inviteProjectMember ( projectId , projectMemberInviteBody , options ) ;
488+ return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ;
489+ } ,
490+ /**
491+ * Remove a member from the project.
492+ * @summary Remove a member
493+ * @param {string } projectId Project id
494+ * @param {string } memberId Member id
495+ * @param {* } [options] Override http request option.
496+ * @throws {RequiredError }
497+ */
498+ async removeProjectMember ( projectId : string , memberId : string , options ?: any ) : Promise < ( axios ?: AxiosInstance , basePath ?: string ) => AxiosPromise < any > > {
499+ const localVarAxiosArgs = await localVarAxiosParamCreator . removeProjectMember ( projectId , memberId , options ) ;
500+ return createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ;
501+ } ,
378502 /**
379503 * Update a project\'s name and description
380504 * @summary Update a project
@@ -471,6 +595,8 @@ export interface ProjectsApiGetProjectsSearchParams {
471595
472596
473597
598+
599+
474600/**
475601 * ProjectsApi - object-oriented interface
476602 * @export
@@ -552,6 +678,38 @@ export class ProjectsApi extends BaseAPI {
552678 } ;
553679 }
554680
681+ /**
682+ * Invite a member to the project.
683+ * @summary Invite a member
684+ * @param {string } projectId Project id
685+ * @param {ProjectMemberInviteBody } projectMemberInviteBody
686+ * @param {* } [options] Override http request option.
687+ * @throws {RequiredError }
688+ * @memberof ProjectsApi
689+ */
690+ public async inviteProjectMember ( projectId : string , projectMemberInviteBody : ProjectMemberInviteBody , options ?: any ) : Promise < AxiosResponse < void > > {
691+ const projectsApiFp = ProjectsApiFp ( this . configuration ) ;
692+ const request = await projectsApiFp . inviteProjectMember ( projectId , projectMemberInviteBody , options ) ;
693+ const response = await request ( this . axios , this . basePath ) ;
694+ return response ;
695+ }
696+
697+ /**
698+ * Remove a member from the project.
699+ * @summary Remove a member
700+ * @param {string } projectId Project id
701+ * @param {string } memberId Member id
702+ * @param {* } [options] Override http request option.
703+ * @throws {RequiredError }
704+ * @memberof ProjectsApi
705+ */
706+ public async removeProjectMember ( projectId : string , memberId : string , options ?: any ) : Promise < AxiosResponse < void > > {
707+ const projectsApiFp = ProjectsApiFp ( this . configuration ) ;
708+ const request = await projectsApiFp . removeProjectMember ( projectId , memberId , options ) ;
709+ const response = await request ( this . axios , this . basePath ) ;
710+ return response ;
711+ }
712+
555713 /**
556714 * Update a project\'s name and description
557715 * @summary Update a project
0 commit comments