Skip to content
Draft
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
40 changes: 40 additions & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32148,6 +32148,46 @@ components:
type: string
nullable: true
description: The Mailchimp list the Project's Contacts are added to
state_permissions:
type: array
description: >-
Who can give Contacts each status (Beneficiary State) switched on in the Project, set on Project
Preferences under each status as "Who can give contacts the ... status in this workspace?".
restricted false means Any colleague. When restricted is true, only organisation admins, leaders and
members of the listed Teams (team_ids), and managers and reporters of the listed workspaces
(project_ids) can give that status. In a request, send only the statuses to change. A restricted
status needs at least one Team or workspace from the Project's organisation, or the request is
refused with 422.
items:
type: object
required: [beneficiary_state_id]
properties:
beneficiary_state_id:
type: integer
description: The status, from beneficiary_states on GET /projects/{id}
name:
type: string
readOnly: true
description: The status's name, e.g. Enrolled or Waiting List
restricted:
type: boolean
description: false for Any colleague, true for only the Teams and workspaces listed
team_ids:
type: array
items:
type: integer
description: Teams whose leaders and members can give the status
project_ids:
type: array
items:
type: integer
description: Workspaces (Projects) whose managers and reporters can give the status
example:
- beneficiary_state_id: 1
name: Enrolled
restricted: true
team_ids: [12]
project_ids: []

ProjectTargets:
type: object
Expand Down
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,7 @@ function buildDocsPage() {
${endpointCard("GET", "/projects/{id}/preferences", "Get a Project's Project Preferences", true, [
{ name: "id", in: "path", type: "integer", required: true, desc: "Project ID" }
], [
{ code: "200", cls: "response-2xx", desc: "The Project Preferences: Contact Forms and statuses (Waiting List, Enrolled, Alumni, Declined) with their forms and baseline Surveys, editorial control, Events, Cases, Timesheets, default Story privacy, the Mailchimp list, and the Region and Industry for localised Financial Values: the project's own <code>region_factor_option_id</code> and <code>industry_factor_option_id</code> (null to use the organisation's), and <code>region</code> and <code>industry</code> in effect, <code>{id, name, source}</code> with source <code>project</code> or <code>organisation</code>" },
{ code: "200", cls: "response-2xx", desc: "The Project Preferences: Contact Forms and statuses (Waiting List, Enrolled, Alumni, Declined) with their forms and baseline Surveys, editorial control, Events, Cases, Timesheets, default Story privacy, the Mailchimp list, and the Region and Industry for localised Financial Values: the project's own <code>region_factor_option_id</code> and <code>industry_factor_option_id</code> (null to use the organisation's), and <code>region</code> and <code>industry</code> in effect, <code>{id, name, source}</code> with source <code>project</code> or <code>organisation</code>, and <code>state_permissions</code>: who can give Contacts each status, <code>[{beneficiary_state_id, name, restricted, team_ids, project_ids}]</code>, where <code>restricted: false</code> means Any colleague" },
{ code: "401", cls: "response-4xx", desc: "Not authenticated" },
{ code: "403", cls: "response-4xx", desc: "Not a Manager of the Project or an Organisation Admin (e.g. a Changemaker)" },
{ code: "404", cls: "response-4xx", desc: "Not found, or in an Organisation you don't work in" }
Expand All @@ -1413,7 +1413,7 @@ function buildDocsPage() {
{ code: "403", cls: "response-4xx", desc: "Not a Manager of the Project or an Organisation Admin" },
{ code: "404", cls: "response-4xx", desc: "Not found, or in an Organisation you don't work in" },
{ code: "422", cls: "response-4xx", desc: "<code>{errors: [...]}</code>" }
], "Saves what the <b>Project Preferences</b> page saves, with the same permissions. Only the settings you send change. Forms, Case Forms, Event Formats and Surveys must be the Project's Organisation's.")}
], "Saves what the <b>Project Preferences</b> page saves, with the same permissions. Only the settings you send change. Forms, Case Forms, Event Formats and Surveys must be the Project's Organisation's. To choose who can give Contacts a status (\"Who can give contacts the Enrolled status in this workspace?\"), send <code>state_permissions: [{beneficiary_state_id, restricted: true, team_ids, project_ids}]</code> for each status to change: then only Organisation Admins, the leaders and members of those Teams, and the Managers and Reporters of those workspaces can give it. A restricted status needs at least one Team or workspace (422 otherwise); <code>restricted: false</code> returns it to Any colleague.")}
${endpointCard("GET", "/projects/{id}/targets", "Get a Project's targets", true, [
{ name: "id", in: "path", type: "integer", required: true, desc: "Project ID" }
], [
Expand Down
Loading