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
204 changes: 204 additions & 0 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ tags:
description: When a colleague is free for an appointment, and which colleagues could take on a Contact for one-to-one appointments, best fit first
- name: Training Materials
description: An Organisation's links to its own training documents and videos, each shown to the whole Organisation or to chosen Teams and Workspaces
- name: Training Tours
description: The guided tours on the Training materials page - the Welcome Tours picked for you, and every feature tour, with how far you have got
- name: Announcements
description: '"What''s new in Makerble" popups, written and scheduled by Makerble staff in Site Overview'
- name: Wishlist
Expand Down Expand Up @@ -2870,6 +2872,170 @@ paths:
$ref: '#/components/responses/ForbiddenError'
"404":
$ref: '#/components/responses/NotFound'
/organisations/{organisation_id}/picked_tours:
parameters:
- name: organisation_id
in: path
required: true
schema:
type: integer
get:
tags: [Training Tours]
summary: List the Welcome Tours picked for you
description: |
The Welcome Tours picked for you in the Organisation, as on Training materials › Tours picked for me:
the Organisation's tour for everyone, and the tour of each Team you are in there, from the day you join it.
Each says how far you have got. Someone with no part in the Organisation gets 403.
operationId: listPickedTours
security: [{tokenAuth: []}]
parameters:
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/PerPage'
responses:
"200":
description: The Welcome Tours picked for you
content:
application/json:
schema:
type: object
required: [page, page_size, page_count, total_count, data]
properties:
page: { type: integer }
page_size: { type: integer }
page_count: { type: integer }
total_count: { type: integer }
data:
type: array
items:
$ref: '#/components/schemas/PickedTour'
example:
page: 1
page_size: 2
page_count: 1
total_count: 2
data:
- {id: 3, name: Welcome to Hillside, team: null, stop_count: 6, status: not_started}
- {id: 7, name: Admin basics, team: {id: 12, name: Centre Administrators}, stop_count: 4, status: finished}
"401":
$ref: '#/components/responses/Unauthorized'
"403":
description: You have no part in this Organisation
"404":
$ref: '#/components/responses/NotFound'
/organisations/{organisation_id}/picked_tours/{id}/restart:
parameters:
- name: organisation_id
in: path
required: true
schema:
type: integer
- name: id
in: path
required: true
description: The Welcome Tour's id
schema:
type: integer
post:
tags: [Training Tours]
summary: Restart a Welcome Tour picked for you
description: |
Starts a Welcome Tour picked for you again from its first stop, as Restart the tour on Training materials
does, even one you have finished. It runs the next time you open a Makerble page. A tour not picked for you is refused.
operationId: restartPickedTour
security: [{tokenAuth: []}]
responses:
"200":
description: The tour has started
content:
application/json:
schema:
$ref: '#/components/schemas/StartedTour'
example: {id: 7, status: started, url: /charities/hillside/beneficiaries}
"401":
$ref: '#/components/responses/Unauthorized'
"403":
description: You have no part in this Organisation
"404":
$ref: '#/components/responses/NotFound'
"422":
$ref: '#/components/responses/UnprocessableEntity'
/training_tours:
get:
tags: [Training Tours]
summary: List every training tour
description: |
Every feature tour, the short tours that each introduce one feature, as on Training materials › All training
tours, with how far you have got: ready_to_watch (not started), started (begun but not finished) or completed.
operationId: listTrainingTours
security: [{tokenAuth: []}]
parameters:
- name: status
in: query
required: false
description: Only the tours with this status
schema:
type: string
enum: [ready_to_watch, started, completed]
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/PerPage'
responses:
"200":
description: The training tours
content:
application/json:
schema:
type: object
required: [page, page_size, page_count, total_count, data]
properties:
page: { type: integer }
page_size: { type: integer }
page_count: { type: integer }
total_count: { type: integer }
data:
type: array
items:
$ref: '#/components/schemas/TrainingTour'
example:
page: 1
page_size: 1
page_count: 1
total_count: 1
data:
- {id: 4, name: Checklists, stop_count: 5, status: ready_to_watch}
"401":
$ref: '#/components/responses/Unauthorized'
"422":
$ref: '#/components/responses/UnprocessableEntity'
/training_tours/{id}/start:
parameters:
- name: id
in: path
required: true
description: The feature tour's id
schema:
type: integer
post:
tags: [Training Tours]
summary: Start a training tour
description: |
Starts a feature tour for you from its first stop, as Take the tour does, even one you have finished.
It runs the next time you open a Makerble page.
operationId: startTrainingTour
security: [{tokenAuth: []}]
responses:
"200":
description: The tour has started
content:
application/json:
schema:
$ref: '#/components/schemas/StartedTour'
example: {id: 4, status: started, url: /charities/hillside/checklists}
"401":
$ref: '#/components/responses/Unauthorized'
"404":
$ref: '#/components/responses/NotFound'
"422":
$ref: '#/components/responses/UnprocessableEntity'
/organisations/{organisation_id}/welcome_journey_settings:
parameters:
- name: organisation_id
Expand Down Expand Up @@ -21808,6 +21974,44 @@ components:
project_name: { type: string, nullable: true }
editable: { type: boolean, description: Whether the caller may edit the event, and so unassign the colleague }
unassigned: { type: boolean, description: Whether this call took the colleague off the event }
PickedTour:
type: object
required: [id, name, team, stop_count, status]
properties:
id: { type: integer }
name: { type: string }
team:
type: object
nullable: true
description: The Team the tour is for; null for the Organisation's tour for everyone
properties:
id: { type: integer }
name: { type: string }
stop_count: { type: integer, description: How many stops the tour has }
status:
type: string
enum: [not_started, started, finished]
description: started includes a tour you put off; finished includes one you ended early
TrainingTour:
type: object
required: [id, name, stop_count, status]
properties:
id: { type: integer }
name: { type: string }
stop_count: { type: integer, description: How many stops the tour has }
status:
type: string
enum: [ready_to_watch, started, completed]
StartedTour:
type: object
required: [id, status, url]
properties:
id: { type: integer }
status: { type: string, enum: [started] }
url:
type: string
nullable: true
description: The page the tour's first stop opens; null when it starts on any page
TrainingMaterial:
type: object
description: A link to one of an Organisation's own training documents or videos, and who it is for
Expand Down
42 changes: 42 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,7 @@ function buildDocsPage() {
<a href="#feature-launches" class="nav-link"><span class="nav-method method-POST">POST</span>Feature Launches</a>
<a href="#feature-tours" class="nav-link"><span class="nav-method method-POST">POST</span>Feature Tours</a>
<a href="#training-materials" class="nav-link"><span class="nav-method method-POST">POST</span>Training Materials</a>
<a href="#training-tours" class="nav-link"><span class="nav-method method-GET">GET</span>Training Tours</a>
</div>
<div class="nav-section">
<div class="nav-section-label">Reference data</div>
Expand Down Expand Up @@ -5455,6 +5456,47 @@ function buildDocsPage() {
</div>
</section>

<!-- Training Tours -->
<section class="section" id="training-tours">
<div class="section-eyebrow">Integrations</div>
<h2 class="section-title">Training Tours</h2>
<div class="section-desc">
<p>The guided tours on the Training materials page under Helpdesk. <strong>Tours picked for me</strong> lists the Welcome Tours picked for you in an Organisation: its tour for everyone, and the tour of each Team you are in there. <strong>All training tours</strong> lists every feature tour, the short tours that each introduce one feature, with how far you have got.</p>
<p>Starting or restarting a tour sets it running from its first stop; it appears the next time you open a Makerble page. Someone with no part in the Organisation gets <code>403</code> for its Welcome Tours.</p>
</div>
<div class="endpoint-list">
${endpointCard("GET", "/organisations/{organisation_id}/picked_tours", "List the Welcome Tours picked for you", true, [
{ name: "organisation_id", in: "path", type: "integer", required: true, desc: "Organisation 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)" }
], [
{ code: "200", cls: "response-2xx", desc: "<code>{page, page_size, page_count, total_count, data: [{id, name, team, stop_count, status}]}</code>; status is <code>not_started</code>, <code>started</code> or <code>finished</code>" },
{ code: "403", cls: "response-4xx", desc: "You have no part in this Organisation" }
])}
${endpointCard("POST", "/organisations/{organisation_id}/picked_tours/{id}/restart", "Restart a Welcome Tour picked for you", true, [
{ name: "organisation_id", in: "path", type: "integer", required: true, desc: "Organisation ID" },
{ name: "id", in: "path", type: "integer", required: true, desc: "Welcome Tour ID" }
], [
{ code: "200", cls: "response-2xx", desc: "<code>{id, status: \"started\", url}</code>; url is the page its first stop opens" },
{ code: "422", cls: "response-4xx", desc: "The tour wasn't picked for you" }
])}
${endpointCard("GET", "/training_tours", "List every training tour", true, [
{ name: "status", type: "string", required: false, desc: "<code>ready_to_watch</code>, <code>started</code> or <code>completed</code>" },
{ name: "page", type: "integer", required: false, desc: "Page number" },
{ name: "per_page", type: "integer", required: false, desc: "Records per page (default 10, max 200)" }
], [
{ code: "200", cls: "response-2xx", desc: "<code>{page, page_size, page_count, total_count, data: [{id, name, stop_count, status}]}</code>" },
{ code: "422", cls: "response-4xx", desc: "An unknown status" }
])}
${endpointCard("POST", "/training_tours/{id}/start", "Start a training tour", true, [
{ name: "id", in: "path", type: "integer", required: true, desc: "Feature tour ID" }
], [
{ code: "200", cls: "response-2xx", desc: "<code>{id, status: \"started\", url}</code>" },
{ code: "422", cls: "response-4xx", desc: "The tour isn't live" }
])}
</div>
</section>

<!-- Age Bands -->
<section class="section" id="age-bands">
<div class="section-eyebrow">Demographics</div>
Expand Down
Loading