@@ -2890,7 +2890,7 @@ paths:
2890
2890
example :
2891
2891
' work.create ' : true
2892
2892
' workItem.edit ' : true
2893
-
2893
+
2894
2894
' 401 ' :
2895
2895
description : Unauthorized
2896
2896
schema :
@@ -3519,31 +3519,26 @@ paths:
3519
3519
description : Internal Server Error
3520
3520
schema :
3521
3521
$ref : ' #/definitions/ErrorModel'
3522
- ' /projects/{projectId}/members/invite ' :
3522
+ ' /projects/{projectId}/invites ' :
3523
3523
get :
3524
3524
tags :
3525
3525
- project member invite
3526
- operationId : getCurrentUserInvite
3526
+ operationId : listProjectInvites
3527
3527
security :
3528
3528
- Bearer : []
3529
- description : Retrieve the invite for current user.
3529
+ description : >-
3530
+ If user can "view" this project, he/she can get all invitations.
3531
+ Otherwise user can only see his/her own invitation in this project.
3532
+ If user has no invitation in this project or this project doesn't exist, an empty array will be returned.
3530
3533
parameters :
3531
3534
- $ref : ' #/parameters/projectIdParam'
3532
3535
responses :
3533
3536
' 200 ' :
3534
3537
description : The invite for current user
3535
3538
schema :
3536
- $ref : ' #/definitions/ProjectMemberInviteSuccessAndFailure'
3537
- ' 400 ' :
3538
- description : Bad request
3539
- schema :
3540
- $ref : ' #/definitions/ErrorModel'
3541
- ' 401 ' :
3542
- description : Unauthorized
3543
- schema :
3544
- $ref : ' #/definitions/ErrorModel'
3545
- ' 404 ' :
3546
- description : Invite not found
3539
+ $ref : ' #/definitions/ProjectMemberInviteListResult'
3540
+ ' 403 ' :
3541
+ description : Forbidden
3547
3542
schema :
3548
3543
$ref : ' #/definitions/ErrorModel'
3549
3544
' 500 ' :
@@ -3567,27 +3562,54 @@ paths:
3567
3562
schema :
3568
3563
$ref : ' #/definitions/AddProjectMemberInvitesRequest'
3569
3564
responses :
3570
- ' 200 ' :
3571
- description : Returns the newly created invite
3565
+ ' 201 ' :
3566
+ description : Created
3572
3567
schema :
3573
3568
$ref : ' #/definitions/ProjectMemberInviteSuccessAndFailure'
3574
3569
' 400 ' :
3575
3570
description : Bad request
3576
3571
schema :
3577
3572
$ref : ' #/definitions/ErrorModel'
3578
- ' 401 ' :
3579
- description : Unauthorized
3573
+ ' 403 ' :
3574
+ description : Forbidden
3580
3575
schema :
3581
3576
$ref : ' #/definitions/ErrorModel'
3577
+ ' 500 ' :
3578
+ description : Internal Server Error
3579
+ schema :
3580
+ $ref : ' #/definitions/ErrorModel'
3581
+ ' /projects/{projectId}/invites/{inviteId} ' :
3582
+ get :
3583
+ tags :
3584
+ - project member invite
3585
+ operationId : getProjectMemberInvite
3586
+ security :
3587
+ - Bearer : []
3588
+ description : >-
3589
+ Get an invite. Users who can "view" this project can see this invitation.
3590
+ User got invited by this inviteId can also see this invitation.
3591
+ If project/invitation doesn't exist, or this invitation is not for logged-in user, it will return 404 response.
3592
+ parameters :
3593
+ - $ref : ' #/parameters/projectIdParam'
3594
+ - $ref : ' #/parameters/inviteIdParam'
3595
+ responses :
3596
+ ' 200 ' :
3597
+ description : Returns the newly updated invite
3598
+ schema :
3599
+ $ref : ' #/definitions/ProjectMemberInvite'
3582
3600
' 403 ' :
3583
3601
description : Forbidden
3584
3602
schema :
3585
3603
$ref : ' #/definitions/ErrorModel'
3604
+ ' 404 ' :
3605
+ description : Not Found
3606
+ schema :
3607
+ $ref : ' #/definitions/ErrorModel'
3586
3608
' 500 ' :
3587
3609
description : Internal Server Error
3588
3610
schema :
3589
3611
$ref : ' #/definitions/ErrorModel'
3590
- put :
3612
+ patch :
3591
3613
tags :
3592
3614
- project member invite
3593
3615
operationId : updateProjectMemberInvite
@@ -3598,6 +3620,7 @@ paths:
3598
3620
restriction will be applied based on role to be updated.
3599
3621
parameters :
3600
3622
- $ref : ' #/parameters/projectIdParam'
3623
+ - $ref : ' #/parameters/inviteIdParam'
3601
3624
- in : body
3602
3625
name : body
3603
3626
required : true
@@ -3607,19 +3630,50 @@ paths:
3607
3630
' 200 ' :
3608
3631
description : Returns the newly updated invite
3609
3632
schema :
3610
- $ref : ' #/definitions/ProjectMemberInviteSuccessAndFailure '
3633
+ $ref : ' #/definitions/ProjectMemberInvite '
3611
3634
' 400 ' :
3612
3635
description : Bad request
3613
3636
schema :
3614
3637
$ref : ' #/definitions/ErrorModel'
3615
- ' 401 ' :
3616
- description : Unauthorized
3638
+ ' 403 ' :
3639
+ description : Forbidden
3640
+ schema :
3641
+ $ref : ' #/definitions/ErrorModel'
3642
+ ' 404 ' :
3643
+ description : Not Found
3644
+ schema :
3645
+ $ref : ' #/definitions/ErrorModel'
3646
+ ' 500 ' :
3647
+ description : Internal Server Error
3648
+ schema :
3649
+ $ref : ' #/definitions/ErrorModel'
3650
+ delete :
3651
+ tags :
3652
+ - project member invite
3653
+ operationId : deleteProjectMemberInvite
3654
+ security :
3655
+ - Bearer : []
3656
+ description : >-
3657
+ Cancel an invite. All users who can access this endpoint, however more
3658
+ restriction will be applied based on role to be cancelled.
3659
+ parameters :
3660
+ - $ref : ' #/parameters/projectIdParam'
3661
+ - $ref : ' #/parameters/inviteIdParam'
3662
+ responses :
3663
+ ' 204 ' :
3664
+ description : Cancel success
3665
+ ' 400 ' :
3666
+ description : Bad request
3617
3667
schema :
3618
3668
$ref : ' #/definitions/ErrorModel'
3619
3669
' 403 ' :
3620
3670
description : Forbidden
3621
3671
schema :
3622
3672
$ref : ' #/definitions/ErrorModel'
3673
+ ' 404 ' :
3674
+ description : Not Found
3675
+ schema :
3676
+ $ref : ' #/definitions/ErrorModel'
3623
3677
' 500 ' :
3624
3678
description : Internal Server Error
3625
3679
schema :
@@ -4794,6 +4848,13 @@ parameters:
4794
4848
required : true
4795
4849
type : integer
4796
4850
format : int64
4851
+ inviteIdParam :
4852
+ name : inviteId
4853
+ in : path
4854
+ description : project member invite identifier
4855
+ required : true
4856
+ type : integer
4857
+ format : int64
4797
4858
definitions :
4798
4859
ErrorModel :
4799
4860
type : object
@@ -6209,26 +6270,41 @@ definitions:
6209
6270
type : object
6210
6271
properties :
6211
6272
success :
6212
- $ref : ' #/definitions/ProjectMemberInvite'
6273
+ type : array
6274
+ items :
6275
+ $ref : ' #/definitions/ProjectMemberInvite'
6213
6276
failed :
6214
6277
type : array
6215
6278
items :
6216
6279
type : object
6280
+ properties :
6281
+ email :
6282
+ description : invitation user email(Optional)
6283
+ type : string
6284
+ handle :
6285
+ description : invitation user handle(Optional)
6286
+ type : string
6287
+ message :
6288
+ description : create invitation error message
6289
+ type : string
6290
+ ProjectMemberInviteListResult :
6291
+ type : array
6292
+ items :
6293
+ $ref : ' #/definitions/ProjectMemberInvite'
6217
6294
AddProjectMemberInvitesRequest :
6218
6295
title : Add project member invites request object
6219
6296
type : object
6220
6297
properties :
6221
- userIds :
6222
- description : ' The user Id list, could not present with emails'
6298
+ handles :
6299
+ description : ' The user handle list, could not present with emails'
6223
6300
type : array
6224
6301
items :
6225
- type : integer
6226
- format : int64
6302
+ type : string
6227
6303
emails :
6228
6304
type : array
6229
6305
items :
6230
6306
type : string
6231
- description : ' The user email list, could not present with userIds '
6307
+ description : ' The user email list, could not present with handles '
6232
6308
role :
6233
6309
description : The target role in the project
6234
6310
type : string
@@ -6240,13 +6316,6 @@ definitions:
6240
6316
title : Update project member invite request object
6241
6317
type : object
6242
6318
properties :
6243
- userId :
6244
- type : integer
6245
- format : int64
6246
- description : ' The user Id, could not present with email'
6247
- email :
6248
- type : string
6249
- description : ' The user email, could not present with userId'
6250
6319
status :
6251
6320
description : The invite status
6252
6321
type : string
0 commit comments