Skip to content

update invite endpoint part2 #481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 48 additions & 1 deletion docs/Project API.postman_collection.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"info": {
"_postman_id": "47adb133-9da4-4cc6-aa73-c7e7a2eb675e",
"_postman_id": "a0a9f1a7-84b1-45ad-a4c0-baa3552118cb",
"name": "Project API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
Expand Down Expand Up @@ -1110,6 +1110,21 @@
},
{
"name": "Create project customer with valid values",
"event": [
{
"listen": "test",
"script": {
"id": "320b75fe-958d-44ee-b2d2-1716b7b3e207",
"exec": [
"pm.test(\"Status code is 201\", function () {",
" pm.response.to.have.status(201);",
" pm.environment.set(\"inviteId2\", pm.response.json().success[0].id);",
"});"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [
Expand Down Expand Up @@ -1398,6 +1413,38 @@
}
},
"response": []
},
{
"name": "Cancel project member invite",
"request": {
"method": "DELETE",
"header": [
{
"key": "Authorization",
"value": "Bearer {{jwt-token-copilot-40051332}}"
},
{
"key": "Content-Type",
"name": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"url": {
"raw": "{{api-url}}/projects/{{projectId}}/invites/{{inviteId2}}",
"host": [
"{{api-url}}"
],
"path": [
"projects",
"{{projectId}}",
"invites",
"{{inviteId2}}"
]
},
"description": "Update a project's member."
},
"response": []
}
],
"event": [
Expand Down
36 changes: 35 additions & 1 deletion docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2890,7 +2890,7 @@ paths:
example:
'work.create': true
'workItem.edit': true

'401':
description: Unauthorized
schema:
Expand Down Expand Up @@ -3647,6 +3647,37 @@ paths:
description: Internal Server Error
schema:
$ref: '#/definitions/ErrorModel'
delete:
tags:
- project member invite
operationId: deleteProjectMemberInvite
security:
- Bearer: []
description: >-
Cancel an invite. All users who can access this endpoint, however more
restriction will be applied based on role to be cancelled.
parameters:
- $ref: '#/parameters/projectIdParam'
- $ref: '#/parameters/inviteIdParam'
responses:
'204':
description: Cancel success
'400':
description: Bad request
schema:
$ref: '#/definitions/ErrorModel'
'403':
description: Forbidden
schema:
$ref: '#/definitions/ErrorModel'
'404':
description: Not Found
schema:
$ref: '#/definitions/ErrorModel'
'500':
description: Internal Server Error
schema:
$ref: '#/definitions/ErrorModel'

'/projects/metadata/form/{key}':
get:
Expand Down Expand Up @@ -6149,6 +6180,9 @@ definitions:
email:
type: string
description: The user email
hashEmail:
type: string
description: The email hash value
role:
description: The user role in the project
type: string
Expand Down
10 changes: 10 additions & 0 deletions migrations/20200214_project_member_invites_hash_email.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--
-- UPDATE EXISTING TABLES:
-- project_member_invites:
-- added column `hashEmail`

--
-- project_member_invites

-- Add new column
ALTER TABLE project_member_invites ADD COLUMN "hashEmail" character varying(255) ;
70 changes: 33 additions & 37 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading