@@ -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
3575
+ schema :
3576
+ $ref : ' #/definitions/ErrorModel'
3577
+ ' 500 ' :
3578
+ description : Internal Server Error
3580
3579
schema :
3581
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
@@ -6119,6 +6180,9 @@ definitions:
6119
6180
email :
6120
6181
type : string
6121
6182
description : The user email
6183
+ hashEmail :
6184
+ type : string
6185
+ description : The email hash value
6122
6186
role :
6123
6187
description : The user role in the project
6124
6188
type : string
@@ -6156,26 +6220,41 @@ definitions:
6156
6220
type : object
6157
6221
properties :
6158
6222
success :
6159
- $ref : ' #/definitions/ProjectMemberInvite'
6223
+ type : array
6224
+ items :
6225
+ $ref : ' #/definitions/ProjectMemberInvite'
6160
6226
failed :
6161
6227
type : array
6162
6228
items :
6163
6229
type : object
6230
+ properties :
6231
+ email :
6232
+ description : invitation user email(Optional)
6233
+ type : string
6234
+ handle :
6235
+ description : invitation user handle(Optional)
6236
+ type : string
6237
+ message :
6238
+ description : create invitation error message
6239
+ type : string
6240
+ ProjectMemberInviteListResult :
6241
+ type : array
6242
+ items :
6243
+ $ref : ' #/definitions/ProjectMemberInvite'
6164
6244
AddProjectMemberInvitesRequest :
6165
6245
title : Add project member invites request object
6166
6246
type : object
6167
6247
properties :
6168
- userIds :
6169
- description : ' The user Id list, could not present with emails'
6248
+ handles :
6249
+ description : ' The user handle list, could not present with emails'
6170
6250
type : array
6171
6251
items :
6172
- type : integer
6173
- format : int64
6252
+ type : string
6174
6253
emails :
6175
6254
type : array
6176
6255
items :
6177
6256
type : string
6178
- description : ' The user email list, could not present with userIds '
6257
+ description : ' The user email list, could not present with handles '
6179
6258
role :
6180
6259
description : The target role in the project
6181
6260
type : string
@@ -6187,13 +6266,6 @@ definitions:
6187
6266
title : Update project member invite request object
6188
6267
type : object
6189
6268
properties :
6190
- userId :
6191
- type : integer
6192
- format : int64
6193
- description : ' The user Id, could not present with email'
6194
- email :
6195
- type : string
6196
- description : ' The user email, could not present with userId'
6197
6269
status :
6198
6270
description : The invite status
6199
6271
type : string
0 commit comments