From 071f964e296da9e01ae706cf985cc171ed585f38 Mon Sep 17 00:00:00 2001 From: Radmacher <66096031+rdmchr@users.noreply.github.com> Date: Sat, 6 Nov 2021 14:30:32 +0100 Subject: [PATCH 01/19] Working on an overhaul for the teams documentation. --- app/controllers/api/teams.php | 16 ++++++++-------- docs/references/teams/create-team.md | 2 +- docs/references/teams/delete-team.md | 2 +- docs/references/teams/list-teams.md | 4 +++- docs/references/teams/update-team.md | 2 +- 5 files changed, 14 insertions(+), 12 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 128a03c2eb..746aeecfb8 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -32,7 +32,7 @@ App::post('/v1/teams') ->label('sdk.response.code', Response::STATUS_CODE_CREATED) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_TEAM) - ->param('name', null, new Text(128), 'Team name. Max length: 128 chars.') + ->param('name', null, new Text(128), 'The name of the team. Max length: 128 chars.') ->param('roles', ['owner'], new ArrayList(new Key()), 'Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.', true) ->inject('response') ->inject('user') @@ -113,10 +113,10 @@ App::get('/v1/teams') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_TEAM_LIST) - ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) - ->param('limit', 25, new Range(0, 100), 'Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true) - ->param('offset', 0, new Range(0, 2000), 'Results offset. The default value is 0. Use this param to manage pagination.', true) - ->param('orderType', 'ASC', new WhiteList(['ASC', 'DESC'], true), 'Order result by ASC or DESC order.', true) + ->param('search', '', new Text(256), 'Enter any text to search. Max length: 256 chars.', true) + ->param('limit', 25, new Range(0, 100), 'Limit how many results will be returned. Returns 25 results by default. Maximum of 100 results allowed per request.', true) + ->param('offset', 0, new Range(0, 2000), 'Use this value to manage pagination. The default value is 0.', true) + ->param('orderType', 'ASC', new WhiteList(['ASC', 'DESC'], true), 'Use ASC to order results in ascending and DESC to order results in descending order.', true) ->inject('response') ->inject('projectDB') ->action(function ($search, $limit, $offset, $orderType, $response, $projectDB) { @@ -178,8 +178,8 @@ App::put('/v1/teams/:teamId') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_TEAM) - ->param('teamId', '', new UID(), 'Team unique ID.') - ->param('name', null, new Text(128), 'Team name. Max length: 128 chars.') + ->param('teamId', '', new UID(), 'The unique team ID.') + ->param('name', null, new Text(128), 'The new team name. Max length: 128 chars.') ->inject('response') ->inject('projectDB') ->action(function ($teamId, $name, $response, $projectDB) { @@ -214,7 +214,7 @@ App::delete('/v1/teams/:teamId') ->label('sdk.description', '/docs/references/teams/delete-team.md') ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) ->label('sdk.response.model', Response::MODEL_NONE) - ->param('teamId', '', new UID(), 'Team unique ID.') + ->param('teamId', '', new UID(), 'The unique team ID.') ->inject('response') ->inject('projectDB') ->inject('events') diff --git a/docs/references/teams/create-team.md b/docs/references/teams/create-team.md index 91bd09e8f9..41a36693e8 100644 --- a/docs/references/teams/create-team.md +++ b/docs/references/teams/create-team.md @@ -1 +1 @@ -Create a new team. The user who creates the team will automatically be assigned as the owner of the team. The team owner can invite new members, who will be able add new owners and update or delete the team from your project. \ No newline at end of file +Use this endpoint to create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members or add new owners. However, every member can delete or update the team. \ No newline at end of file diff --git a/docs/references/teams/delete-team.md b/docs/references/teams/delete-team.md index 887dfcc06f..16672499ea 100644 --- a/docs/references/teams/delete-team.md +++ b/docs/references/teams/delete-team.md @@ -1 +1 @@ -Delete a team by its unique ID. Only team owners have write access for this resource. \ No newline at end of file +Delete a team using its unique ID. Every member of the team has access to this endpoint. \ No newline at end of file diff --git a/docs/references/teams/list-teams.md b/docs/references/teams/list-teams.md index 04a3959e4c..feab2d45a4 100644 --- a/docs/references/teams/list-teams.md +++ b/docs/references/teams/list-teams.md @@ -1 +1,3 @@ -Get a list of all the current user teams. You can use the query params to filter your results. On admin mode, this endpoint will return a list of all of the project's teams. [Learn more about different API modes](/docs/admin). \ No newline at end of file +Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results. + +On admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](/docs/admin). \ No newline at end of file diff --git a/docs/references/teams/update-team.md b/docs/references/teams/update-team.md index afa84135a2..bc83e897f5 100644 --- a/docs/references/teams/update-team.md +++ b/docs/references/teams/update-team.md @@ -1 +1 @@ -Update a team by its unique ID. Only team owners have write access for this resource. \ No newline at end of file +Update a team using its unique ID. Every team member has access to this endpoint. \ No newline at end of file From 010fca8f18e31e764dfe1e8a54f75e2bdd68e676 Mon Sep 17 00:00:00 2001 From: Radmacher <66096031+rdmchr@users.noreply.github.com> Date: Wed, 10 Nov 2021 13:45:23 +0100 Subject: [PATCH 02/19] Fixed permissions misunderstanding --- docs/references/teams/create-team.md | 2 +- docs/references/teams/delete-team.md | 2 +- docs/references/teams/update-team.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/references/teams/create-team.md b/docs/references/teams/create-team.md index 41a36693e8..3ff3a30c8e 100644 --- a/docs/references/teams/create-team.md +++ b/docs/references/teams/create-team.md @@ -1 +1 @@ -Use this endpoint to create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members or add new owners. However, every member can delete or update the team. \ No newline at end of file +Use this endpoint to create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team. \ No newline at end of file diff --git a/docs/references/teams/delete-team.md b/docs/references/teams/delete-team.md index 16672499ea..6b73736e9a 100644 --- a/docs/references/teams/delete-team.md +++ b/docs/references/teams/delete-team.md @@ -1 +1 @@ -Delete a team using its unique ID. Every member of the team has access to this endpoint. \ No newline at end of file +Delete a team using its unique ID. Only members with the owner role can delete the team. \ No newline at end of file diff --git a/docs/references/teams/update-team.md b/docs/references/teams/update-team.md index bc83e897f5..0acb528e1c 100644 --- a/docs/references/teams/update-team.md +++ b/docs/references/teams/update-team.md @@ -1 +1 @@ -Update a team using its unique ID. Every team member has access to this endpoint. \ No newline at end of file +Update a team using its unique ID. Only members with the owner role can update the team. \ No newline at end of file From 5924026bb8e290defa7a602cac2540a54404da0e Mon Sep 17 00:00:00 2001 From: Radmacher <66096031+rdmchr@users.noreply.github.com> Date: Wed, 10 Nov 2021 16:32:10 +0100 Subject: [PATCH 03/19] Updated create team membership docs --- app/controllers/api/teams.php | 18 +++++++++--------- .../references/teams/create-team-membership.md | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 746aeecfb8..e173f5faac 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -150,7 +150,7 @@ App::get('/v1/teams/:teamId') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_TEAM) - ->param('teamId', '', new UID(), 'Team unique ID.') + ->param('teamId', '', new UID(), 'The unique team ID.') ->inject('response') ->inject('projectDB') ->action(function ($teamId, $response, $projectDB) { @@ -260,11 +260,11 @@ App::post('/v1/teams/:teamId/memberships') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_MEMBERSHIP) ->label('abuse-limit', 10) - ->param('teamId', '', new UID(), 'Team unique ID.') - ->param('email', '', new Email(), 'New team member email.') - ->param('roles', [], new ArrayList(new Key()), 'Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.') + ->param('teamId', '', new UID(), 'The unique team ID.') + ->param('email', '', new Email(), 'The email address of the new team member.') + ->param('roles', [], new ArrayList(new Key()), 'An Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.') ->param('url', '', function ($clients) { return new Host($clients); }, 'URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.', false, ['clients']) // TODO add our own built-in confirm page - ->param('name', '', new Text(128), 'New team member name. Max length: 128 chars.', true) + ->param('name', '', new Text(128), 'The name of the new team member. Max length: 128 chars.', true) ->inject('response') ->inject('project') ->inject('user') @@ -472,7 +472,7 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_MEMBERSHIP) - ->param('teamId', '', new UID(), 'Team unique ID.') + ->param('teamId', '', new UID(), 'The unique team ID.') ->param('membershipId', '', new UID(), 'Membership ID.') ->param('roles', [], new ArrayList(new Key()), 'Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.') ->inject('request') @@ -534,7 +534,7 @@ App::get('/v1/teams/:teamId/memberships') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_MEMBERSHIP_LIST) - ->param('teamId', '', new UID(), 'Team unique ID.') + ->param('teamId', '', new UID(), 'The unique team ID.') ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) ->param('limit', 25, new Range(0, 100), 'Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true) ->param('offset', 0, new Range(0, 2000), 'Results offset. The default value is 0. Use this param to manage pagination.', true) @@ -588,7 +588,7 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId/status') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_MEMBERSHIP) - ->param('teamId', '', new UID(), 'Team unique ID.') + ->param('teamId', '', new UID(), 'The unique team ID.') ->param('membershipId', '', new UID(), 'Membership ID.') ->param('userId', '', new UID(), 'User unique ID.') ->param('secret', '', new Text(256), 'Secret key.') @@ -734,7 +734,7 @@ App::delete('/v1/teams/:teamId/memberships/:membershipId') ->label('sdk.description', '/docs/references/teams/delete-team-membership.md') ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) ->label('sdk.response.model', Response::MODEL_NONE) - ->param('teamId', '', new UID(), 'Team unique ID.') + ->param('teamId', '', new UID(), 'The unique team ID.') ->param('membershipId', '', new UID(), 'Membership ID.') ->inject('response') ->inject('projectDB') diff --git a/docs/references/teams/create-team-membership.md b/docs/references/teams/create-team-membership.md index c6d81de484..f0bf9e416c 100644 --- a/docs/references/teams/create-team-membership.md +++ b/docs/references/teams/create-team-membership.md @@ -1,5 +1,5 @@ -Use this endpoint to invite a new member to join your team. If initiated from Client SDK, an email with a link to join the team will be sent to the new member's email address if the member doesn't exist in the project it will be created automatically. If initiated from server side SDKs, new member will automatically be added to the team. +Use this endpoint to invite a new member to join your team. If initiated from the client SDK, an email with a link to join the team will be sent to the member's email address and an account will be created for them should they not be signed up already. If initiated from server-side SDKs, the new member will automatically be added to the team. -Use the 'URL' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](/docs/client/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. While calling from side SDKs the redirect url can be empty string. +Use the 'url' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](/docs/client/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. -Please note that in order to avoid a [Redirect Attacks](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when added your platforms in the console interface. \ No newline at end of file +Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) the only valid redirect URL's are the once from domains you have set when adding your platforms in the console interface. \ No newline at end of file From 4137bdb09820acfce921eff9ee7f816569cb00fd Mon Sep 17 00:00:00 2001 From: Radmacher <66096031+rdmchr@users.noreply.github.com> Date: Wed, 10 Nov 2021 16:43:07 +0100 Subject: [PATCH 04/19] Updated update team membership roles docs --- app/controllers/api/teams.php | 4 ++-- docs/references/teams/update-team-membership-roles.md | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 docs/references/teams/update-team-membership-roles.md diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index e173f5faac..0565131665 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -473,8 +473,8 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_MEMBERSHIP) ->param('teamId', '', new UID(), 'The unique team ID.') - ->param('membershipId', '', new UID(), 'Membership ID.') - ->param('roles', [], new ArrayList(new Key()), 'Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.') + ->param('membershipId', '', new UID(), 'The membership ID.') + ->param('roles', [], new ArrayList(new Key()), 'An array of strings. Use this param to set the user\'s roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.') ->inject('request') ->inject('response') ->inject('user') diff --git a/docs/references/teams/update-team-membership-roles.md b/docs/references/teams/update-team-membership-roles.md new file mode 100644 index 0000000000..add91638bb --- /dev/null +++ b/docs/references/teams/update-team-membership-roles.md @@ -0,0 +1 @@ +Use this endpoint to modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](/docs/permissions) \ No newline at end of file From 3ff2cf172fdfc31d0fbbb467cf561ced51504fcf Mon Sep 17 00:00:00 2001 From: Radmacher <66096031+rdmchr@users.noreply.github.com> Date: Wed, 10 Nov 2021 17:13:51 +0100 Subject: [PATCH 05/19] Updated get team members doc --- app/controllers/api/teams.php | 6 +++--- docs/references/teams/get-team-members.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 0565131665..cc5ffe52ea 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -535,10 +535,10 @@ App::get('/v1/teams/:teamId/memberships') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_MEMBERSHIP_LIST) ->param('teamId', '', new UID(), 'The unique team ID.') - ->param('search', '', new Text(256), 'Search term to filter your list results. Max length: 256 chars.', true) - ->param('limit', 25, new Range(0, 100), 'Results limit value. By default will return maximum 25 results. Maximum of 100 results allowed per request.', true) + ->param('search', '', new Text(256), 'Search term to filter your results. Max length: 256 chars.', true) + ->param('limit', 25, new Range(0, 100), 'Limit how many results will be returned. By default will return a maximum of 25 results. Maximum of 100 results allowed per request.', true) ->param('offset', 0, new Range(0, 2000), 'Results offset. The default value is 0. Use this param to manage pagination.', true) - ->param('orderType', 'ASC', new WhiteList(['ASC', 'DESC'], true), 'Order result by ASC or DESC order.', true) + ->param('orderType', 'ASC', new WhiteList(['ASC', 'DESC'], true), 'Order results by ASC or DESC order.', true) ->inject('response') ->inject('projectDB') ->action(function ($teamId, $search, $limit, $offset, $orderType, $response, $projectDB) { diff --git a/docs/references/teams/get-team-members.md b/docs/references/teams/get-team-members.md index ee939b9978..f8a5c7839f 100644 --- a/docs/references/teams/get-team-members.md +++ b/docs/references/teams/get-team-members.md @@ -1 +1 @@ -Get a team members by the team unique ID. All team members have read access for this list of resources. \ No newline at end of file +Lists a teams members using the team's unique ID. All team members have read access to this endpoint. \ No newline at end of file From 6ccceb9f326191749c0e93564b0bda3ff0fd6130 Mon Sep 17 00:00:00 2001 From: Radmacher <66096031+rdmchr@users.noreply.github.com> Date: Wed, 10 Nov 2021 17:21:36 +0100 Subject: [PATCH 06/19] Updated update team membership status doc --- app/controllers/api/teams.php | 6 +++--- docs/references/teams/update-team-membership-status.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index cc5ffe52ea..f6fd001cfd 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -589,9 +589,9 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId/status') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_MEMBERSHIP) ->param('teamId', '', new UID(), 'The unique team ID.') - ->param('membershipId', '', new UID(), 'Membership ID.') - ->param('userId', '', new UID(), 'User unique ID.') - ->param('secret', '', new Text(256), 'Secret key.') + ->param('membershipId', '', new UID(), 'The membership ID.') + ->param('userId', '', new UID(), 'The unique user ID.') + ->param('secret', '', new Text(256), 'The secret key.') ->inject('request') ->inject('response') ->inject('user') diff --git a/docs/references/teams/update-team-membership-status.md b/docs/references/teams/update-team-membership-status.md index ae2da76774..ab8f4ca36a 100644 --- a/docs/references/teams/update-team-membership-status.md +++ b/docs/references/teams/update-team-membership-status.md @@ -1 +1 @@ -Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email recieved by the user. \ No newline at end of file +Use this endpoint to allow a user to accept an invitation to join a team after being redirected back to your app from the invitation email received by the user. \ No newline at end of file From 4f7b699b0cad2621bd8c9db52f8566c5b283286d Mon Sep 17 00:00:00 2001 From: Radmacher <66096031+rdmchr@users.noreply.github.com> Date: Wed, 10 Nov 2021 17:32:47 +0100 Subject: [PATCH 07/19] Updated delete team membership doc --- app/controllers/api/teams.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index f6fd001cfd..bb5a966774 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -735,7 +735,7 @@ App::delete('/v1/teams/:teamId/memberships/:membershipId') ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) ->label('sdk.response.model', Response::MODEL_NONE) ->param('teamId', '', new UID(), 'The unique team ID.') - ->param('membershipId', '', new UID(), 'Membership ID.') + ->param('membershipId', '', new UID(), 'The membership ID.') ->inject('response') ->inject('projectDB') ->inject('audits') From 244b829c6800c63b05e90ad3e464b0abe80418c6 Mon Sep 17 00:00:00 2001 From: Radmacher <66096031+rdmchr@users.noreply.github.com> Date: Thu, 2 Dec 2021 23:10:14 +0100 Subject: [PATCH 08/19] Update app/controllers/api/teams.php Co-authored-by: kodumbeats --- app/controllers/api/teams.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index bb5a966774..7b06c13d7f 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -114,7 +114,7 @@ App::get('/v1/teams') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_TEAM_LIST) ->param('search', '', new Text(256), 'Enter any text to search. Max length: 256 chars.', true) - ->param('limit', 25, new Range(0, 100), 'Limit how many results will be returned. Returns 25 results by default. Maximum of 100 results allowed per request.', true) + ->param('limit', 25, new Range(0, 100), 'Limit how many results will be returned. Returns up to 25 results by default. Maximum of 100 results allowed per request.', true) ->param('offset', 0, new Range(0, 2000), 'Use this value to manage pagination. The default value is 0.', true) ->param('orderType', 'ASC', new WhiteList(['ASC', 'DESC'], true), 'Use ASC to order results in ascending and DESC to order results in descending order.', true) ->inject('response') From 18dfe9b4a0a57385ccbdd9924b26a1270e8a009a Mon Sep 17 00:00:00 2001 From: Radmacher <66096031+rdmchr@users.noreply.github.com> Date: Thu, 2 Dec 2021 23:10:36 +0100 Subject: [PATCH 09/19] Update docs/references/teams/get-team-members.md Co-authored-by: kodumbeats --- docs/references/teams/get-team-members.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/references/teams/get-team-members.md b/docs/references/teams/get-team-members.md index f8a5c7839f..d18b2b358e 100644 --- a/docs/references/teams/get-team-members.md +++ b/docs/references/teams/get-team-members.md @@ -1 +1 @@ -Lists a teams members using the team's unique ID. All team members have read access to this endpoint. \ No newline at end of file +Lists a team's members using the team's unique ID. All team members have read access to this endpoint. \ No newline at end of file From c3f06f9a580a8bbfbbd0e72c78594aa59c572c82 Mon Sep 17 00:00:00 2001 From: Radmacher <66096031+rdmchr@users.noreply.github.com> Date: Thu, 2 Dec 2021 23:19:07 +0100 Subject: [PATCH 10/19] Update app/controllers/api/teams.php Co-authored-by: kodumbeats --- app/controllers/api/teams.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 7b06c13d7f..1b2e998737 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -262,7 +262,7 @@ App::post('/v1/teams/:teamId/memberships') ->label('abuse-limit', 10) ->param('teamId', '', new UID(), 'The unique team ID.') ->param('email', '', new Email(), 'The email address of the new team member.') - ->param('roles', [], new ArrayList(new Key()), 'An Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.') + ->param('roles', [], new ArrayList(new Key()), 'An array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.') ->param('url', '', function ($clients) { return new Host($clients); }, 'URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.', false, ['clients']) // TODO add our own built-in confirm page ->param('name', '', new Text(128), 'The name of the new team member. Max length: 128 chars.', true) ->inject('response') From 95e2cb6290c4d35fc61f454af56a123b2094b825 Mon Sep 17 00:00:00 2001 From: Radmacher <66096031+rdmchr@users.noreply.github.com> Date: Thu, 2 Dec 2021 23:20:57 +0100 Subject: [PATCH 11/19] Update app/controllers/api/teams.php Co-authored-by: kodumbeats --- app/controllers/api/teams.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 1b2e998737..f822a81fed 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -116,7 +116,7 @@ App::get('/v1/teams') ->param('search', '', new Text(256), 'Enter any text to search. Max length: 256 chars.', true) ->param('limit', 25, new Range(0, 100), 'Limit how many results will be returned. Returns up to 25 results by default. Maximum of 100 results allowed per request.', true) ->param('offset', 0, new Range(0, 2000), 'Use this value to manage pagination. The default value is 0.', true) - ->param('orderType', 'ASC', new WhiteList(['ASC', 'DESC'], true), 'Use ASC to order results in ascending and DESC to order results in descending order.', true) + ->param('orderType', 'ASC', new WhiteList(['ASC', 'DESC'], true), 'Order result by ASC or DESC order.', true) ->inject('response') ->inject('projectDB') ->action(function ($search, $limit, $offset, $orderType, $response, $projectDB) { From 34f6aea63bd1508ccac697a48e7b38fccb4e2b47 Mon Sep 17 00:00:00 2001 From: Radmacher <66096031+rdmchr@users.noreply.github.com> Date: Wed, 8 Dec 2021 23:16:45 +0100 Subject: [PATCH 12/19] Update app/controllers/api/teams.php Co-authored-by: kodumbeats --- app/controllers/api/teams.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index f822a81fed..bcf081eedc 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -113,7 +113,7 @@ App::get('/v1/teams') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_TEAM_LIST) - ->param('search', '', new Text(256), 'Enter any text to search. Max length: 256 chars.', true) + ->param('search', '', new Text(256), 'Search term to filter results. Max length: 256 chars.', true) ->param('limit', 25, new Range(0, 100), 'Limit how many results will be returned. Returns up to 25 results by default. Maximum of 100 results allowed per request.', true) ->param('offset', 0, new Range(0, 2000), 'Use this value to manage pagination. The default value is 0.', true) ->param('orderType', 'ASC', new WhiteList(['ASC', 'DESC'], true), 'Order result by ASC or DESC order.', true) From 9fb460396c29c5d979f2896b559ad8917535e2e3 Mon Sep 17 00:00:00 2001 From: Radmacher <66096031+rdmchr@users.noreply.github.com> Date: Wed, 8 Dec 2021 23:22:52 +0100 Subject: [PATCH 13/19] Fixed inconsistency --- docs/references/teams/delete-team.md | 2 +- docs/references/teams/get-team-members.md | 2 +- docs/references/teams/get-team.md | 2 +- docs/references/teams/list-teams.md | 2 +- docs/references/teams/update-team.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/references/teams/delete-team.md b/docs/references/teams/delete-team.md index 6b73736e9a..19dfe40969 100644 --- a/docs/references/teams/delete-team.md +++ b/docs/references/teams/delete-team.md @@ -1 +1 @@ -Delete a team using its unique ID. Only members with the owner role can delete the team. \ No newline at end of file +Use this endpoint to delete a team using its unique ID. Only team members with the owner role can delete the team. \ No newline at end of file diff --git a/docs/references/teams/get-team-members.md b/docs/references/teams/get-team-members.md index d18b2b358e..e4de1c9788 100644 --- a/docs/references/teams/get-team-members.md +++ b/docs/references/teams/get-team-members.md @@ -1 +1 @@ -Lists a team's members using the team's unique ID. All team members have read access to this endpoint. \ No newline at end of file +Use this endpoint to list a team's members using the team's unique ID. All team members have read access to this endpoint. \ No newline at end of file diff --git a/docs/references/teams/get-team.md b/docs/references/teams/get-team.md index 800612ab15..5449bf2153 100644 --- a/docs/references/teams/get-team.md +++ b/docs/references/teams/get-team.md @@ -1 +1 @@ -Get a team by its unique ID. All team members have read access for this resource. \ No newline at end of file +Use this endpoint to get a team by its unique ID. All team members have read access for this resource. \ No newline at end of file diff --git a/docs/references/teams/list-teams.md b/docs/references/teams/list-teams.md index feab2d45a4..68c3621cbd 100644 --- a/docs/references/teams/list-teams.md +++ b/docs/references/teams/list-teams.md @@ -1,3 +1,3 @@ -Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results. +Use this endpoint to get a list of all the teams in which the current user is a member. You can use the parameters to filter your results. On admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](/docs/admin). \ No newline at end of file diff --git a/docs/references/teams/update-team.md b/docs/references/teams/update-team.md index 0acb528e1c..aa88d0e242 100644 --- a/docs/references/teams/update-team.md +++ b/docs/references/teams/update-team.md @@ -1 +1 @@ -Update a team using its unique ID. Only members with the owner role can update the team. \ No newline at end of file +Use this endpoint to update a team using its unique ID. Only members with the owner role can update the team. \ No newline at end of file From bfbf0e54b9696de48f5279655f68955619106754 Mon Sep 17 00:00:00 2001 From: Radmacher <66096031+rdmchr@users.noreply.github.com> Date: Fri, 10 Dec 2021 16:44:54 +0100 Subject: [PATCH 14/19] Rolled back addition of articles --- app/controllers/api/teams.php | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index bcf081eedc..6c9ac4fd42 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -32,7 +32,7 @@ App::post('/v1/teams') ->label('sdk.response.code', Response::STATUS_CODE_CREATED) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_TEAM) - ->param('name', null, new Text(128), 'The name of the team. Max length: 128 chars.') + ->param('name', null, new Text(128), 'Team name. Max length: 128 chars.') ->param('roles', ['owner'], new ArrayList(new Key()), 'Array of strings. Use this param to set the roles in the team for the user who created it. The default role is **owner**. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.', true) ->inject('response') ->inject('user') @@ -178,8 +178,8 @@ App::put('/v1/teams/:teamId') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_TEAM) - ->param('teamId', '', new UID(), 'The unique team ID.') - ->param('name', null, new Text(128), 'The new team name. Max length: 128 chars.') + ->param('teamId', '', new UID(), 'Unique team ID.') + ->param('name', null, new Text(128), 'New team name. Max length: 128 chars.') ->inject('response') ->inject('projectDB') ->action(function ($teamId, $name, $response, $projectDB) { @@ -214,7 +214,7 @@ App::delete('/v1/teams/:teamId') ->label('sdk.description', '/docs/references/teams/delete-team.md') ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) ->label('sdk.response.model', Response::MODEL_NONE) - ->param('teamId', '', new UID(), 'The unique team ID.') + ->param('teamId', '', new UID(), 'Unique team ID.') ->inject('response') ->inject('projectDB') ->inject('events') @@ -260,11 +260,11 @@ App::post('/v1/teams/:teamId/memberships') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_MEMBERSHIP) ->label('abuse-limit', 10) - ->param('teamId', '', new UID(), 'The unique team ID.') - ->param('email', '', new Email(), 'The email address of the new team member.') + ->param('teamId', '', new UID(), 'Unique team ID.') + ->param('email', '', new Email(), 'Email address of the new team member.') ->param('roles', [], new ArrayList(new Key()), 'An array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.') ->param('url', '', function ($clients) { return new Host($clients); }, 'URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.', false, ['clients']) // TODO add our own built-in confirm page - ->param('name', '', new Text(128), 'The name of the new team member. Max length: 128 chars.', true) + ->param('name', '', new Text(128), 'Name of the new team member. Max length: 128 chars.', true) ->inject('response') ->inject('project') ->inject('user') @@ -472,8 +472,8 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_MEMBERSHIP) - ->param('teamId', '', new UID(), 'The unique team ID.') - ->param('membershipId', '', new UID(), 'The membership ID.') + ->param('teamId', '', new UID(), 'Unique team ID.') + ->param('membershipId', '', new UID(), 'Membership ID.') ->param('roles', [], new ArrayList(new Key()), 'An array of strings. Use this param to set the user\'s roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.') ->inject('request') ->inject('response') @@ -534,7 +534,7 @@ App::get('/v1/teams/:teamId/memberships') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_MEMBERSHIP_LIST) - ->param('teamId', '', new UID(), 'The unique team ID.') + ->param('teamId', '', new UID(), 'Unique team ID.') ->param('search', '', new Text(256), 'Search term to filter your results. Max length: 256 chars.', true) ->param('limit', 25, new Range(0, 100), 'Limit how many results will be returned. By default will return a maximum of 25 results. Maximum of 100 results allowed per request.', true) ->param('offset', 0, new Range(0, 2000), 'Results offset. The default value is 0. Use this param to manage pagination.', true) @@ -588,10 +588,10 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId/status') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_MEMBERSHIP) - ->param('teamId', '', new UID(), 'The unique team ID.') - ->param('membershipId', '', new UID(), 'The membership ID.') - ->param('userId', '', new UID(), 'The unique user ID.') - ->param('secret', '', new Text(256), 'The secret key.') + ->param('teamId', '', new UID(), 'Unique team ID.') + ->param('membershipId', '', new UID(), 'Membership ID.') + ->param('userId', '', new UID(), 'Unique user ID.') + ->param('secret', '', new Text(256), 'Secret key.') ->inject('request') ->inject('response') ->inject('user') @@ -734,8 +734,8 @@ App::delete('/v1/teams/:teamId/memberships/:membershipId') ->label('sdk.description', '/docs/references/teams/delete-team-membership.md') ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) ->label('sdk.response.model', Response::MODEL_NONE) - ->param('teamId', '', new UID(), 'The unique team ID.') - ->param('membershipId', '', new UID(), 'The membership ID.') + ->param('teamId', '', new UID(), 'Unique team ID.') + ->param('membershipId', '', new UID(), 'Membership ID.') ->inject('response') ->inject('projectDB') ->inject('audits') From eb9d258be77206a9c20811a2ea9950140df10be9 Mon Sep 17 00:00:00 2001 From: Radmacher <66096031+rdmchr@users.noreply.github.com> Date: Fri, 10 Dec 2021 16:45:21 +0100 Subject: [PATCH 15/19] Changed "On admin mode" to "In admin mode" --- docs/references/teams/list-teams.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/references/teams/list-teams.md b/docs/references/teams/list-teams.md index 68c3621cbd..a360974998 100644 --- a/docs/references/teams/list-teams.md +++ b/docs/references/teams/list-teams.md @@ -1,3 +1,3 @@ Use this endpoint to get a list of all the teams in which the current user is a member. You can use the parameters to filter your results. -On admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](/docs/admin). \ No newline at end of file +In admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](/docs/admin). \ No newline at end of file From f02c1d01c5626e260e738fbee19b471f8b8db540 Mon Sep 17 00:00:00 2001 From: Radmacher <66096031+rdmchr@users.noreply.github.com> Date: Fri, 10 Dec 2021 16:48:47 +0100 Subject: [PATCH 16/19] Removed "Use this endpoint" to avoid repetition --- docs/references/teams/create-team-membership.md | 2 +- docs/references/teams/create-team.md | 2 +- docs/references/teams/delete-team.md | 2 +- docs/references/teams/get-team.md | 2 +- docs/references/teams/list-teams.md | 2 +- docs/references/teams/update-team-membership-roles.md | 2 +- docs/references/teams/update-team.md | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/references/teams/create-team-membership.md b/docs/references/teams/create-team-membership.md index f0bf9e416c..7668c69b99 100644 --- a/docs/references/teams/create-team-membership.md +++ b/docs/references/teams/create-team-membership.md @@ -1,4 +1,4 @@ -Use this endpoint to invite a new member to join your team. If initiated from the client SDK, an email with a link to join the team will be sent to the member's email address and an account will be created for them should they not be signed up already. If initiated from server-side SDKs, the new member will automatically be added to the team. +Invite a new member to join your team. If initiated from the client SDK, an email with a link to join the team will be sent to the member's email address and an account will be created for them should they not be signed up already. If initiated from server-side SDKs, the new member will automatically be added to the team. Use the 'url' parameter to redirect the user from the invitation email back to your app. When the user is redirected, use the [Update Team Membership Status](/docs/client/teams#teamsUpdateMembershipStatus) endpoint to allow the user to accept the invitation to the team. diff --git a/docs/references/teams/create-team.md b/docs/references/teams/create-team.md index 3ff3a30c8e..eaa8b1d9a1 100644 --- a/docs/references/teams/create-team.md +++ b/docs/references/teams/create-team.md @@ -1 +1 @@ -Use this endpoint to create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team. \ No newline at end of file +Create a new team. The user who creates the team will automatically be assigned as the owner of the team. Only the users with the owner role can invite new members, add new owners and delete or update the team. \ No newline at end of file diff --git a/docs/references/teams/delete-team.md b/docs/references/teams/delete-team.md index 19dfe40969..82bcc24cdf 100644 --- a/docs/references/teams/delete-team.md +++ b/docs/references/teams/delete-team.md @@ -1 +1 @@ -Use this endpoint to delete a team using its unique ID. Only team members with the owner role can delete the team. \ No newline at end of file +Delete a team using its unique ID. Only team members with the owner role can delete the team. \ No newline at end of file diff --git a/docs/references/teams/get-team.md b/docs/references/teams/get-team.md index 5449bf2153..800612ab15 100644 --- a/docs/references/teams/get-team.md +++ b/docs/references/teams/get-team.md @@ -1 +1 @@ -Use this endpoint to get a team by its unique ID. All team members have read access for this resource. \ No newline at end of file +Get a team by its unique ID. All team members have read access for this resource. \ No newline at end of file diff --git a/docs/references/teams/list-teams.md b/docs/references/teams/list-teams.md index a360974998..5b59bcbaae 100644 --- a/docs/references/teams/list-teams.md +++ b/docs/references/teams/list-teams.md @@ -1,3 +1,3 @@ -Use this endpoint to get a list of all the teams in which the current user is a member. You can use the parameters to filter your results. +Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results. In admin mode, this endpoint returns a list of all the teams in the current project. [Learn more about different API modes](/docs/admin). \ No newline at end of file diff --git a/docs/references/teams/update-team-membership-roles.md b/docs/references/teams/update-team-membership-roles.md index add91638bb..43e8a2a1ee 100644 --- a/docs/references/teams/update-team-membership-roles.md +++ b/docs/references/teams/update-team-membership-roles.md @@ -1 +1 @@ -Use this endpoint to modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](/docs/permissions) \ No newline at end of file +Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](/docs/permissions) \ No newline at end of file diff --git a/docs/references/teams/update-team.md b/docs/references/teams/update-team.md index aa88d0e242..0acb528e1c 100644 --- a/docs/references/teams/update-team.md +++ b/docs/references/teams/update-team.md @@ -1 +1 @@ -Use this endpoint to update a team using its unique ID. Only members with the owner role can update the team. \ No newline at end of file +Update a team using its unique ID. Only members with the owner role can update the team. \ No newline at end of file From 75a83e9b535c7d21c5d0aec274461f6a9b725668 Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Fri, 10 Dec 2021 12:22:10 -0500 Subject: [PATCH 17/19] Harmonize offset param descriptions --- app/controllers/api/teams.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index 6c9ac4fd42..fbe7f0b4ba 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -115,7 +115,7 @@ App::get('/v1/teams') ->label('sdk.response.model', Response::MODEL_TEAM_LIST) ->param('search', '', new Text(256), 'Search term to filter results. Max length: 256 chars.', true) ->param('limit', 25, new Range(0, 100), 'Limit how many results will be returned. Returns up to 25 results by default. Maximum of 100 results allowed per request.', true) - ->param('offset', 0, new Range(0, 2000), 'Use this value to manage pagination. The default value is 0.', true) + ->param('offset', 0, new Range(0, 2000), 'Results offset. The default value is 0. Use this value to manage pagination.', true) ->param('orderType', 'ASC', new WhiteList(['ASC', 'DESC'], true), 'Order result by ASC or DESC order.', true) ->inject('response') ->inject('projectDB') @@ -537,7 +537,7 @@ App::get('/v1/teams/:teamId/memberships') ->param('teamId', '', new UID(), 'Unique team ID.') ->param('search', '', new Text(256), 'Search term to filter your results. Max length: 256 chars.', true) ->param('limit', 25, new Range(0, 100), 'Limit how many results will be returned. By default will return a maximum of 25 results. Maximum of 100 results allowed per request.', true) - ->param('offset', 0, new Range(0, 2000), 'Results offset. The default value is 0. Use this param to manage pagination.', true) + ->param('offset', 0, new Range(0, 2000), 'Results offset. The default value is 0. Use this value to manage pagination.', true) ->param('orderType', 'ASC', new WhiteList(['ASC', 'DESC'], true), 'Order results by ASC or DESC order.', true) ->inject('response') ->inject('projectDB') From ca821f398965d9d90268597d24758f113ef27d8e Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Fri, 10 Dec 2021 12:23:20 -0500 Subject: [PATCH 18/19] Add missing period to doc --- docs/references/teams/update-team-membership-roles.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/references/teams/update-team-membership-roles.md b/docs/references/teams/update-team-membership-roles.md index 43e8a2a1ee..344d2875df 100644 --- a/docs/references/teams/update-team-membership-roles.md +++ b/docs/references/teams/update-team-membership-roles.md @@ -1 +1 @@ -Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](/docs/permissions) \ No newline at end of file +Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](/docs/permissions). \ No newline at end of file From ad3fb9303d6413a569149352d440273f475765d8 Mon Sep 17 00:00:00 2001 From: Radmacher <66096031+rdmchr@users.noreply.github.com> Date: Mon, 13 Dec 2021 18:15:05 +0100 Subject: [PATCH 19/19] Removed 'unique' --- app/controllers/api/teams.php | 18 +++++++++--------- docs/references/teams/delete-team.md | 2 +- docs/references/teams/get-team-members.md | 2 +- docs/references/teams/get-team.md | 2 +- docs/references/teams/update-team.md | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/controllers/api/teams.php b/app/controllers/api/teams.php index fbe7f0b4ba..a9eac064c0 100644 --- a/app/controllers/api/teams.php +++ b/app/controllers/api/teams.php @@ -150,7 +150,7 @@ App::get('/v1/teams/:teamId') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_TEAM) - ->param('teamId', '', new UID(), 'The unique team ID.') + ->param('teamId', '', new UID(), 'Team ID.') ->inject('response') ->inject('projectDB') ->action(function ($teamId, $response, $projectDB) { @@ -178,7 +178,7 @@ App::put('/v1/teams/:teamId') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_TEAM) - ->param('teamId', '', new UID(), 'Unique team ID.') + ->param('teamId', '', new UID(), 'Team ID.') ->param('name', null, new Text(128), 'New team name. Max length: 128 chars.') ->inject('response') ->inject('projectDB') @@ -214,7 +214,7 @@ App::delete('/v1/teams/:teamId') ->label('sdk.description', '/docs/references/teams/delete-team.md') ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) ->label('sdk.response.model', Response::MODEL_NONE) - ->param('teamId', '', new UID(), 'Unique team ID.') + ->param('teamId', '', new UID(), 'Team ID.') ->inject('response') ->inject('projectDB') ->inject('events') @@ -260,7 +260,7 @@ App::post('/v1/teams/:teamId/memberships') ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_MEMBERSHIP) ->label('abuse-limit', 10) - ->param('teamId', '', new UID(), 'Unique team ID.') + ->param('teamId', '', new UID(), 'Team ID.') ->param('email', '', new Email(), 'Email address of the new team member.') ->param('roles', [], new ArrayList(new Key()), 'An array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.') ->param('url', '', function ($clients) { return new Host($clients); }, 'URL to redirect the user back to your app from the invitation email. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.', false, ['clients']) // TODO add our own built-in confirm page @@ -472,7 +472,7 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_MEMBERSHIP) - ->param('teamId', '', new UID(), 'Unique team ID.') + ->param('teamId', '', new UID(), 'Team ID.') ->param('membershipId', '', new UID(), 'Membership ID.') ->param('roles', [], new ArrayList(new Key()), 'An array of strings. Use this param to set the user\'s roles in the team. A role can be any string. Learn more about [roles and permissions](/docs/permissions). Max length for each role is 32 chars.') ->inject('request') @@ -534,7 +534,7 @@ App::get('/v1/teams/:teamId/memberships') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_MEMBERSHIP_LIST) - ->param('teamId', '', new UID(), 'Unique team ID.') + ->param('teamId', '', new UID(), 'Team ID.') ->param('search', '', new Text(256), 'Search term to filter your results. Max length: 256 chars.', true) ->param('limit', 25, new Range(0, 100), 'Limit how many results will be returned. By default will return a maximum of 25 results. Maximum of 100 results allowed per request.', true) ->param('offset', 0, new Range(0, 2000), 'Results offset. The default value is 0. Use this value to manage pagination.', true) @@ -588,9 +588,9 @@ App::patch('/v1/teams/:teamId/memberships/:membershipId/status') ->label('sdk.response.code', Response::STATUS_CODE_OK) ->label('sdk.response.type', Response::CONTENT_TYPE_JSON) ->label('sdk.response.model', Response::MODEL_MEMBERSHIP) - ->param('teamId', '', new UID(), 'Unique team ID.') + ->param('teamId', '', new UID(), 'Team ID.') ->param('membershipId', '', new UID(), 'Membership ID.') - ->param('userId', '', new UID(), 'Unique user ID.') + ->param('userId', '', new UID(), 'User ID.') ->param('secret', '', new Text(256), 'Secret key.') ->inject('request') ->inject('response') @@ -734,7 +734,7 @@ App::delete('/v1/teams/:teamId/memberships/:membershipId') ->label('sdk.description', '/docs/references/teams/delete-team-membership.md') ->label('sdk.response.code', Response::STATUS_CODE_NOCONTENT) ->label('sdk.response.model', Response::MODEL_NONE) - ->param('teamId', '', new UID(), 'Unique team ID.') + ->param('teamId', '', new UID(), 'Team ID.') ->param('membershipId', '', new UID(), 'Membership ID.') ->inject('response') ->inject('projectDB') diff --git a/docs/references/teams/delete-team.md b/docs/references/teams/delete-team.md index 82bcc24cdf..5240a8f14b 100644 --- a/docs/references/teams/delete-team.md +++ b/docs/references/teams/delete-team.md @@ -1 +1 @@ -Delete a team using its unique ID. Only team members with the owner role can delete the team. \ No newline at end of file +Delete a team using its ID. Only team members with the owner role can delete the team. \ No newline at end of file diff --git a/docs/references/teams/get-team-members.md b/docs/references/teams/get-team-members.md index e4de1c9788..d7dd04977f 100644 --- a/docs/references/teams/get-team-members.md +++ b/docs/references/teams/get-team-members.md @@ -1 +1 @@ -Use this endpoint to list a team's members using the team's unique ID. All team members have read access to this endpoint. \ No newline at end of file +Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. \ No newline at end of file diff --git a/docs/references/teams/get-team.md b/docs/references/teams/get-team.md index 800612ab15..3662a20f2b 100644 --- a/docs/references/teams/get-team.md +++ b/docs/references/teams/get-team.md @@ -1 +1 @@ -Get a team by its unique ID. All team members have read access for this resource. \ No newline at end of file +Get a team by its ID. All team members have read access for this resource. \ No newline at end of file diff --git a/docs/references/teams/update-team.md b/docs/references/teams/update-team.md index 0acb528e1c..1f646bad57 100644 --- a/docs/references/teams/update-team.md +++ b/docs/references/teams/update-team.md @@ -1 +1 @@ -Update a team using its unique ID. Only members with the owner role can update the team. \ No newline at end of file +Update a team using its ID. Only members with the owner role can update the team. \ No newline at end of file