Skip to content
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
129 changes: 103 additions & 26 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -640,13 +640,35 @@ paths:
tags: [Announcements]
summary: List Announcements
description: |
Lists the "What's new in Makerble" popups written in Site Overview › Announcements, newest
first, with how many people have seen each one and how many clicked its "Learn more" link.
Each signed-in user in an announcement's audience sees it once, between its start and end
dates. System Access users only (Makerble staff); anyone else gets 403.
Lists popup announcements, newest first, with how many people have seen each one and how
many clicked its "Learn more" link. Each signed-in user in an announcement's audience sees
it once, between its start and end dates.

There are two kinds. Makerble's own "What's new in Makerble" popups (`scope_type` null) are
written in Site Overview › Announcements. An Organisation, Workspace (Project) or Team's
announcements (`scope_type` `Charity`, `Project` or `Team`) are written by the people who
look after it, for the colleagues there, on that place's Announcements page.

System Access users (Makerble staff) see every announcement. Anyone else sees only those for
places where they hold the role now: an Organisation Admin sees their Organisation's and its
Workspaces' and Teams'; a Workspace editor (Project Editor) sees that Workspace's; a Team
leader sees that Team's. Someone who can make announcements nowhere gets 403.
operationId: listAnnouncements
security: [{tokenAuth: []}]
parameters:
- name: scope_type
in: query
required: false
description: With `scope_id`, only this place's announcements.
schema:
type: string
enum: [Charity, Project, Team]
- name: scope_id
in: query
required: false
description: The Organisation, Workspace or Team id, with `scope_type`.
schema:
type: integer
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/PerPage'
- $ref: '#/components/parameters/LastSyncDatetime'
Expand All @@ -665,10 +687,20 @@ paths:
tags: [Announcements]
summary: Create an Announcement
description: |
Creates a "What's new in Makerble" popup. It is saved as a draft (seen by nobody) unless
`status` is `scheduled`, when it shows from `starts_on` to `ends_on` to its audience.
Write the headline in sentence case, saying plainly what changed, and a message that says
what the person needs to do, which is often nothing. System Access users only.
Creates a popup announcement. It is saved as a draft (seen by nobody) unless `status` is
`scheduled`, when it shows from `starts_on` to `ends_on` to its audience. Write the headline
in sentence case, saying plainly what changed, and a message that says what the person
needs to do, which is often nothing.

With `scope_type` and `scope_id`, it is that Organisation's, Workspace's or Team's
announcement. Its audience is always the colleagues there (`audience` is ignored), it can't
use the name change animation, and its Learn more link can be any https page. The user must
be an Organisation Admin of that Organisation (or of the Workspace's or Team's
Organisation), an editor of that Workspace, or a leader of that Team; otherwise 403. A place
that doesn't exist gets 404.

Without them, it is one of Makerble's own "What's new in Makerble" popups: System Access
users only.
operationId: createAnnouncement
security: [{tokenAuth: []}]
requestBody:
Expand All @@ -677,20 +709,35 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/AnnouncementInput'
example:
title: Projects are now Workspaces, and Albums are now Portfolios
body: Nothing has moved. Only the names have changed.
visual_type: name_change
name_changes:
- old_name: Projects
new_name: Workspaces
- old_name: Albums
new_name: Portfolios
learn_more_url: https://makerble.atlassian.net/wiki/spaces/MCPD/pages/123/Workspaces
audience: everyone
starts_on: "2026-12-01"
ends_on: "2026-12-31"
status: scheduled
examples:
makerble:
summary: One of Makerble's own (System Access users)
value:
title: Projects are now Workspaces, and Albums are now Portfolios
body: Nothing has moved. Only the names have changed.
visual_type: name_change
name_changes:
- old_name: Projects
new_name: Workspaces
- old_name: Albums
new_name: Portfolios
learn_more_url: https://makerble.atlassian.net/wiki/spaces/MCPD/pages/123/Workspaces
audience: everyone
starts_on: "2026-12-01"
ends_on: "2026-12-31"
status: scheduled
workspace:
summary: A Workspace's, for the colleagues on it
value:
scope_type: Project
scope_id: 42
title: Term dates are out
body: Have a look before you book leave.
visual_type: none
learn_more_url: https://riverside.org.uk/term-dates
starts_on: "2026-12-01"
ends_on: "2026-12-08"
status: scheduled
responses:
"201":
description: The created Announcement
Expand All @@ -702,6 +749,8 @@ paths:
$ref: '#/components/responses/Unauthorized'
"403":
$ref: '#/components/responses/ForbiddenError'
"404":
$ref: '#/components/responses/NotFound'
"422":
$ref: '#/components/responses/UnprocessableEntityList'
/announcements/{id}:
Expand All @@ -714,7 +763,9 @@ paths:
get:
tags: [Announcements]
summary: Get an Announcement
description: One "What's new in Makerble" popup, with its seen and "Learn more" click counts. System Access users only.
description: |
One announcement, with its seen and "Learn more" click counts. System Access users can get any;
anyone else only one for a place where they hold the role (see List Announcements), or 403.
operationId: getAnnouncement
security: [{tokenAuth: []}]
responses:
Expand All @@ -736,7 +787,9 @@ paths:
description: |
Changes only the fields sent. Without `status`, a draft stays a draft and a scheduled
announcement stays scheduled. Editing a live announcement doesn't show it again to people
who have already seen it. To end one early, set `ends_on` to today. System Access users only.
who have already seen it. To end one early, set `ends_on` to today. An announcement never
moves to another place: `scope_type` and `scope_id` are ignored here. System Access users can
change any; anyone else only one for a place where they hold the role now, or 403.
operationId: updateAnnouncement
security: [{tokenAuth: []}]
requestBody:
Expand Down Expand Up @@ -14850,6 +14903,15 @@ components:
AnnouncementInput:
type: object
properties:
scope_type:
type: string
enum: [Charity, Project, Team]
description: |
On create only: whose announcement it is, an Organisation (`Charity`), a Workspace
(`Project`) or a Team, with `scope_id`. Leave out for one of Makerble's own.
scope_id:
type: integer
description: On create only, with `scope_type`.
title:
type: string
maxLength: 90
Expand All @@ -14861,7 +14923,7 @@ components:
visual_type:
type: string
enum: [name_change, vimeo, none]
description: The name-change animation, a Vimeo video, or nothing.
description: The name-change animation (Makerble's own only), a Vimeo video, or nothing.
name_changes:
type: array
minItems: 1
Expand All @@ -14875,7 +14937,10 @@ components:
learn_more_url:
type: string
nullable: true
description: Optional. A page in the Makerble User Guide (https://makerble.atlassian.net/wiki/spaces/MCPD/...).
description: |
Optional. For Makerble's own, a page in the Makerble User Guide
(https://makerble.atlassian.net/wiki/spaces/MCPD/...). For a place's, any https page; one
outside the User Guide is marked as opening outside Makerble.
button_label:
type: string
maxLength: 24
Expand All @@ -14886,6 +14951,7 @@ components:
description: |
`everyone`: every signed-in user. `colleagues`: everyone except Contacts with a login
(active participants). `administrators`: Organisation Admins of at least one organisation.
Ignored for a place's announcement, which is always for the colleagues there.
starts_on:
type: string
format: date
Expand All @@ -14903,6 +14969,17 @@ components:
properties:
id:
type: integer
scope_type:
type: string
enum: [Charity, Project, Team, null]
nullable: true
description: |
Whose announcement it is: an Organisation (`Charity`), a Workspace (`Project`) or a Team.
Null for Makerble's own. Its audience is that place's colleagues: an Organisation's
colleagues, a Workspace's editors, reporters and observers, or a Team's members and leaders.
scope_id:
type: integer
nullable: true
title:
type: string
body:
Expand Down
24 changes: 14 additions & 10 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -4001,42 +4001,46 @@ function buildDocsPage() {
<div class="section-eyebrow">Integrations</div>
<h2 class="section-title">Announcements</h2>
<div class="section-desc">
<p>An Announcement is the "What's new in Makerble" popup that each signed-in user in its audience sees once, between its start and end dates, for example "Projects are now Workspaces". Makerble staff write them in Site Overview › Announcements. These endpoints are for System Access users only; anyone else gets <code>403</code>.</p>
<p><code>visual_type</code> is <code>name_change</code> (an animation of 1 to 3 <code>name_changes</code>, old name → new name), <code>vimeo</code> (a Vimeo video at <code>vimeo_url</code>) or <code>none</code>. <code>audience</code> is <code>everyone</code>, <code>colleagues</code> (everyone except Contacts with a login) or <code>administrators</code> (Organisation Admins). <code>status</code> stores <code>draft</code> or <code>scheduled</code>; <code>current_status</code> also says whether a scheduled one is <code>live</code> or has <code>ended</code>.</p>
<p>An Announcement is a popup that each signed-in user in its audience sees once, between its start and end dates. There are two kinds. Makerble's own "What's new in Makerble" popups, for example "Projects are now Workspaces", are written by Makerble staff in Site Overview › Announcements; their <code>scope_type</code> is <code>null</code>. An Organisation's, Workspace's or Team's announcements are written by the people who look after it, for the colleagues there: <code>scope_type</code> is <code>Charity</code>, <code>Project</code> or <code>Team</code>, with <code>scope_id</code>.</p>
<p>System Access users can see and change every announcement. Anyone else can see and change only those for places where they hold the role now: an Organisation Admin, for their Organisation and its Workspaces and Teams; a Workspace editor (Project Editor), for that Workspace; a Team leader, for that Team. Someone who can make announcements nowhere gets <code>403</code>.</p>
<p><code>visual_type</code> is <code>name_change</code> (an animation of 1 to 3 <code>name_changes</code>, old name → new name), <code>vimeo</code> (a Vimeo video at <code>vimeo_url</code>) or <code>none</code>. <code>audience</code> is <code>everyone</code>, <code>colleagues</code> (everyone except Contacts with a login) or <code>administrators</code> (Organisation Admins); a place's announcement is always for its colleagues (an Organisation's colleagues, a Workspace's editors, reporters and observers, or a Team's members and leaders), can't use <code>name_change</code>, and its <code>learn_more_url</code> can be any https page. <code>status</code> stores <code>draft</code> or <code>scheduled</code>; <code>current_status</code> also says whether a scheduled one is <code>live</code> or has <code>ended</code>.</p>
</div>
<div class="callout callout-tip">
<span class="callout-icon">✓</span>
<span><strong>Writing tip:</strong> Write the headline in sentence case, saying plainly what changed, and a message that says what the person needs to do, which is often nothing. Save as a draft first; send <code>status: scheduled</code> when it's ready. To end one early, set <code>ends_on</code> to today.</span>
</div>
<div class="endpoint-list">
${endpointCard("GET", "/announcements", "List Announcements", true, [
{ name: "scope_type", type: "string", required: false, desc: "With <code>scope_id</code>, only this place's: <code>Charity</code>, <code>Project</code> or <code>Team</code>" },
{ name: "scope_id", type: "integer", required: false, desc: "The Organisation, Workspace or Team ID" },
{ name: "page", type: "integer", required: false, desc: "Page number" },
{ name: "per_page", type: "integer", required: false, desc: "Records per page (default 10, max 200)" },
{ name: "last_synced_datetime", type: "string", required: false, desc: "ISO 8601 incremental sync" }
], [
{ code: "200", cls: "response-2xx", desc: "Paginated Announcements, newest first, each with <code>seen_count</code> and <code>learn_more_click_count</code>" },
{ code: "403", cls: "response-4xx", desc: "The user doesn't have System Access" }
{ code: "200", cls: "response-2xx", desc: "Paginated Announcements the user may see, newest first, each with <code>scope_type</code>, <code>scope_id</code>, <code>seen_count</code> and <code>learn_more_click_count</code>" },
{ code: "403", cls: "response-4xx", desc: "The user can make announcements nowhere" }
])}
${endpointCard("GET", "/announcements/{id}", "Get an Announcement", true, [
{ name: "id", in: "path", type: "integer", required: true, desc: "Announcement ID" }
], [
{ code: "200", cls: "response-2xx", desc: "The Announcement, with its seen and Learn more click counts" },
{ code: "403", cls: "response-4xx", desc: "The user doesn't have System Access" },
{ code: "403", cls: "response-4xx", desc: "Not one the user may see" },
{ code: "404", cls: "response-4xx", desc: "Not found" }
])}
${endpointCard("POST", "/announcements", "Create an Announcement", true, [], [
{ code: "201", cls: "response-2xx", desc: "Announcement created (a draft unless <code>status</code> is <code>scheduled</code>)" },
{ code: "403", cls: "response-4xx", desc: "The user doesn't have System Access" },
{ code: "422", cls: "response-4xx", desc: "Validation failed, e.g. no headline, a headline over 90 characters, or a Vimeo visual with a YouTube link" }
], "Body: <code>title</code> (headline, up to 90), <code>body</code> (message, up to 280), <code>visual_type</code>, <code>name_changes: [{old_name, new_name}]</code> (1 to 3), <code>vimeo_url</code>, <code>learn_more_url</code> (a Makerble User Guide page), <code>button_label</code> (default \"Got it\"), <code>audience</code>, <code>starts_on</code>, <code>ends_on</code>, <code>status</code>.")}
{ code: "403", cls: "response-4xx", desc: "The user doesn't hold the role on that place, or (with no place) doesn't have System Access" },
{ code: "404", cls: "response-4xx", desc: "The Organisation, Workspace or Team doesn't exist" },
{ code: "422", cls: "response-4xx", desc: "Validation failed, e.g. no headline, a headline over 90 characters, a Vimeo visual with a YouTube link, or the name change animation for a place" }
], "Body: <code>scope_type</code> and <code>scope_id</code> (whose announcement; leave out for one of Makerble's own), <code>title</code> (headline, up to 90), <code>body</code> (message, up to 280), <code>visual_type</code>, <code>name_changes: [{old_name, new_name}]</code> (1 to 3), <code>vimeo_url</code>, <code>learn_more_url</code> (a Makerble User Guide page for Makerble's own; any https page for a place's), <code>button_label</code> (default \"Got it\"), <code>audience</code>, <code>starts_on</code>, <code>ends_on</code>, <code>status</code>.")}
${endpointCard("PATCH", "/announcements/{id}", "Update an Announcement", true, [
{ name: "id", in: "path", type: "integer", required: true, desc: "Announcement ID" }
], [
{ code: "200", cls: "response-2xx", desc: "Announcement updated" },
{ code: "403", cls: "response-4xx", desc: "The user doesn't have System Access" },
{ code: "403", cls: "response-4xx", desc: "Not one the user may change" },
{ code: "404", cls: "response-4xx", desc: "Not found" },
{ code: "422", cls: "response-4xx", desc: "Validation failed, e.g. 4 name changes" }
], "Same body as create; only the fields sent change. Without <code>status</code>, a draft stays a draft and a scheduled announcement stays scheduled. Editing a live announcement doesn't show it again to people who have already seen it.")}
], "Same body as create; only the fields sent change. Without <code>status</code>, a draft stays a draft and a scheduled announcement stays scheduled. Editing a live announcement doesn't show it again to people who have already seen it. An announcement never moves to another place, so <code>scope_type</code> and <code>scope_id</code> are ignored.")}
</div>
</section>

Expand Down
Loading