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
157 changes: 157 additions & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,13 @@ tags:
Seats per Colleague: which seat each colleague holds on each of an Organisation's current
Contracts, and changing one. A colleague's roles decide the lowest seat (Billing Role) they
need on Role-based Pricing. Only the Organisation's admins can change seats.
- name: Setup guide
description: |
An Organisation's Setup guide: the main things to set up in Makerble, how far each has got,
and whether it is done. Makerble ticks each item off when it sees it done; an item once done
stays done. An Organisation Admin can mark an item "Not relevant to us", which takes it out of
the total. Organisation Admins and Makerble staff can use it, while the Setup guide is switched
on for the Organisation (it is on for Organisations created since it was released).
- name: Usage
description: |
An Organisation's usage against the allowances in its plan: Contacts, Stories (survey
Expand Down Expand Up @@ -14348,6 +14355,108 @@ paths:
"404":
$ref: '#/components/responses/NotFound'

/organisations/{organisation_id}/setup_guide:
parameters:
- $ref: '#/components/parameters/OrganisationId'
get:
tags: [Setup guide]
summary: Get an Organisation's Setup guide
description: |
The Setup guide's items for an Organisation (Charity), in order, with how far each has got in
words (`progress`), what counts as done (`done_when`), and whether it is done or marked "Not
relevant to us". `done_count` and `total_count` leave out items marked not relevant; `finished`
is true once every item is done or not relevant.

Items (`key`): `teams` (Create your teams; only for Organisations with 11 or more staff),
`workspaces` (Add your workspaces), `welcome_tour` (Set up your team's Welcome Tour),
`checklists` (Set up a checklist on each workspace), and under "Automate your reporting"
(`section`): `reporting_requirements`, `demographics` and `metrics`. Workspaces are Projects;
closed ones, and the one Makerble creates with the Organisation, never count.

This is the Setup guide page, under Help › Setup guide. The guide is at most seven items, so
it isn't paginated.
operationId: getSetupGuide
security: [{tokenAuth: []}]
responses:
"200":
description: The Setup guide
content:
application/json:
schema:
$ref: '#/components/schemas/SetupGuide'
example:
organisation_id: 42
done_count: 3
total_count: 6
finished: false
data:
- key: workspaces
title: Add your workspaces
section: null
progress: 2 of 2 workspaces
done_when: Done when you've created at least 2. The one Makerble makes for you doesn't count.
done: true
not_relevant: false
- key: checklists
title: Set up a checklist on each workspace
section: null
progress: 4 of 18 workspaces
done_when: Done when each open workspace has a checklist. Closed workspaces are left out.
done: false
not_relevant: false
"401":
$ref: '#/components/responses/Unauthorized'
"403":
$ref: '#/components/responses/SetupGuideForbidden'
"404":
$ref: '#/components/responses/NotFound'
/organisations/{organisation_id}/setup_guide/items/{item_key}:
parameters:
- $ref: '#/components/parameters/OrganisationId'
- name: item_key
in: path
required: true
description: The item's `key`, e.g. `checklists`.
schema:
type: string
enum: [teams, workspaces, welcome_tour, checklists, reporting_requirements, demographics, metrics]
patch:
tags: [Setup guide]
summary: Mark a Setup guide item Not relevant, or undo it
description: |
"Not relevant to us" (`not_relevant: true`) takes the item out of the Organisation's total and
records who chose it and when; `not_relevant: false` is Undo and puts it back. Whether the item
is done is unchanged: Makerble ticks items, nobody ticks them by hand. Answers with the whole
Setup guide, as GET does.
operationId: updateSetupGuideItem
security: [{tokenAuth: []}]
requestBody:
required: true
content:
application/json:
schema:
type: object
required: [not_relevant]
properties:
not_relevant:
type: boolean
example:
not_relevant: true
responses:
"200":
description: The Setup guide after the change
content:
application/json:
schema:
$ref: '#/components/schemas/SetupGuide'
"401":
$ref: '#/components/responses/Unauthorized'
"403":
$ref: '#/components/responses/SetupGuideForbidden'
"404":
$ref: '#/components/responses/NotFound'
"422":
$ref: '#/components/responses/UnprocessableEntity'
/organisations/{organisation_id}/age_bands:
parameters:
- $ref: '#/components/parameters/OrganisationId'
Expand Down Expand Up @@ -16420,6 +16529,14 @@ components:
description: Also include Indicators or Outcomes from the public library shared by all organisations (default false)

responses:
SetupGuideForbidden:
description: You aren't an Organisation Admin of this Organisation, or its Setup guide is switched off
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
error: Only an Organisation Admin can see the Setup guide.
LibraryItemCreated:
description: Created. The new item as **Get a library item** shows it, and whether it is approved for the public library
content:
Expand Down Expand Up @@ -16568,6 +16685,46 @@ components:
error: "Webhooks are not turned on for this organisation"

schemas:
SetupGuide:
type: object
properties:
organisation_id:
type: integer
done_count:
type: integer
description: Items done, leaving out those marked not relevant.
total_count:
type: integer
description: Items shown, leaving out those marked not relevant.
finished:
type: boolean
description: True once every item is done or marked not relevant.
data:
type: array
items:
$ref: '#/components/schemas/SetupGuideItem'
SetupGuideItem:
type: object
properties:
key:
type: string
enum: [teams, workspaces, welcome_tour, checklists, reporting_requirements, demographics, metrics]
title:
type: string
section:
type: string
nullable: true
description: The heading the item sits under, e.g. "Automate your reporting", or null.
progress:
type: string
description: How far it has got, in words, e.g. "3 of 5 workspaces". Always the current picture, even once done.
done_when:
type: string
done:
type: boolean
description: True once Makerble has seen it done. It stays done.
not_relevant:
type: boolean
AnnouncementNameChange:
type: object
required: [old_name, new_name]
Expand Down
30 changes: 30 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,7 @@ function buildDocsPage() {
<a href="#api-keys" class="nav-link"><span class="nav-method method-POST">POST</span>API keys</a>
<a href="#seats" class="nav-link"><span class="nav-method method-GET">GET</span>Seats</a>
<a href="#usage" class="nav-link"><span class="nav-method method-GET">GET</span>Usage</a>
<a href="#setup-guide" class="nav-link"><span class="nav-method method-GET">GET</span>Setup guide</a>
<a href="#announcements" class="nav-link"><span class="nav-method method-POST">POST</span>Announcements</a>
<a href="#wishlist" class="nav-link"><span class="nav-method method-POST">POST</span>Wishlist</a>
<a href="#welcome-tours" class="nav-link"><span class="nav-method method-POST">POST</span>Welcome Tours</a>
Expand Down Expand Up @@ -4261,6 +4262,35 @@ function buildDocsPage() {
</div>
</section>

<!-- Setup guide -->
<section class="section" id="setup-guide">
<div class="section-eyebrow">Organisation</div>
<h2 class="section-title">Setup guide</h2>
<div class="section-desc">
<p>An Organisation's Setup guide: the main things to set up in Makerble, how far each has got and whether it is done. This is the <strong>Setup guide</strong> page, under <strong>Help › Setup guide</strong>. Makerble ticks each item off when it sees it done, and once done an item stays done; <code>progress</code> always shows the current picture in words, for example "3 of 5 workspaces".</p>
<p>Items (<code>key</code>): <code>teams</code> (only for Organisations with 11 or more staff), <code>workspaces</code>, <code>welcome_tour</code>, <code>checklists</code>, and under "Automate your reporting" (<code>section</code>): <code>reporting_requirements</code>, <code>demographics</code> and <code>metrics</code>. Closed Workspaces, and the one Makerble creates with the Organisation, never count. An item marked "Not relevant to us" leaves <code>total_count</code>; <code>finished</code> is <code>true</code> once every item is done or not relevant.</p>
<p>Only the Organisation's Organisation Admins and Makerble staff can use it, and only while the Setup guide is switched on for the Organisation (it is on for Organisations created since it was released). Anyone else gets <code>403</code>.</p>
</div>
<div class="endpoint-list">
${endpointCard("GET", "/organisations/{organisation_id}/setup_guide", "Get an Organisation's Setup guide", true, [
{ name: "organisation_id", in: "path", type: "integer", required: true, desc: "The Organisation (Charity) ID" }
], [
{ code: "200", cls: "response-2xx", desc: "organisation_id, done_count, total_count, finished, and data: each item's key, title, section, progress, done_when, done and not_relevant" },
{ code: "403", cls: "response-4xx", desc: "Not an Organisation Admin of this Organisation, or its Setup guide is switched off" },
{ code: "404", cls: "response-4xx", desc: "No such Organisation" }
])}
${endpointCard("PATCH", "/organisations/{organisation_id}/setup_guide/items/{item_key}", "Mark a Setup guide item Not relevant, or undo it", true, [
{ name: "organisation_id", in: "path", type: "integer", required: true, desc: "The Organisation (Charity) ID" },
{ name: "item_key", in: "path", type: "string", required: true, desc: "The item's <code>key</code>, e.g. <code>checklists</code>" },
{ name: "not_relevant", in: "body", type: "boolean", required: true, desc: "<code>true</code> marks it Not relevant to us (recording who and when); <code>false</code> is Undo. Whether it is done is unchanged." }
], [
{ code: "200", cls: "response-2xx", desc: "The whole Setup guide after the change" },
{ code: "403", cls: "response-4xx", desc: "Not an Organisation Admin of this Organisation, or its Setup guide is switched off" },
{ code: "422", cls: "response-4xx", desc: "No such item, or not_relevant isn't true or false" }
])}
</div>
</section>

<!-- Announcements -->
<section class="section" id="announcements">
<div class="section-eyebrow">Integrations</div>
Expand Down
Loading