diff --git a/openapi.yaml b/openapi.yaml index ce1753d..6576ff2 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -1161,6 +1161,11 @@ paths: stops that ask for a click). A `stop_key` the tour doesn't have yet adds that stop. Essentials stops (navbar_spaces, navbar_user) are always included. Only the fields sent change. Sending anything else as an Organisation Admin is refused with 403. + + Both can set `watch_checklist_ids`: up to 2 Checklists of the tour's Organisation that Watch the journey + shows a new colleague straight after the tour, one step at a time, in the order sent. A person sees only + those on their own workspaces. An empty list means they see up to 2 Checklists on their workspaces, most + recently updated first. More than 2, or a Checklist from another Organisation, is refused with 422. operationId: updateTour security: [{tokenAuth: []}] requestBody: @@ -1303,7 +1308,7 @@ paths: patch: tags: [Welcome Tours] summary: Update an Organisation's welcome journey settings - description: Sets "People can skip adding a profile picture". Change each tour's own settings with PATCH /tours/{id}. + description: Sets "People can skip adding a profile picture" and "People can skip Watch the journey". Send either or both. Change each tour's own settings with PATCH /tours/{id}. operationId: updateWelcomeJourneySettings security: [{tokenAuth: []}] requestBody: @@ -1312,10 +1317,11 @@ paths: application/json: schema: type: object - required: [photo_skippable] properties: photo_skippable: type: boolean + watch_skippable: + type: boolean example: photo_skippable: false responses: @@ -15904,6 +15910,13 @@ components: audience: type: string description: The Team's name, or "Everyone in the organisation (default)" + watch_checklist_ids: + type: array + items: + type: integer + description: >- + The Checklists that Watch the journey shows straight after the tour, in order (up to 2). Empty means + people see up to 2 Checklists on their workspaces, most recently updated first. mode: type: string enum: [required, optional] @@ -15995,6 +16008,12 @@ components: type: integer minimum: 1 maximum: 10 + watch_checklist_ids: + type: array + maxItems: 2 + items: + type: integer + description: Up to 2 Checklists of the tour's Organisation for Watch the journey, in order. Send [] to clear them. stops: type: array items: @@ -16113,6 +16132,9 @@ components: photo_skippable: type: boolean description: Whether people can skip adding a profile picture + watch_skippable: + type: boolean + description: Whether people can skip Watch the journey, the Checklists shown after the Welcome Tour tour_ids: type: array items: diff --git a/server.js b/server.js index 79b215a..0945795 100644 --- a/server.js +++ b/server.js @@ -4212,7 +4212,7 @@ function buildDocsPage() {
A Welcome Tour is the guided tour of Makerble's own pages that a new colleague is offered after adding their name and photo. Each stop dims the page except one area, such as the Spaces menu or the Contacts table, and either waits for Next or asks the person to click something (action: click). A tour belongs to an Organisation and, optionally, one of its Teams; team_id: null is the Organisation's default tour. Only a live tour is shown, and each Team (and the default) has at most one.
Makerble staff (System Access) see and change every tour. An Organisation Admin sees their own Organisation's tours and changes what their Welcome journey settings page changes: how strict a tour is (mode, where required is shown as Mandatory; start_skippable; later_limit, how many times someone can choose "I'll do this later", 1 to 10), and for each stop whether it is included, its wording (body, up to 280 characters; empty uses Makerble's default_body) and whether a click stop is skippable. Essentials stops are always included. They can also see who has finished a tour and send reminders. Anyone else gets 403.
Makerble staff (System Access) see and change every tour. An Organisation Admin sees their own Organisation's tours and changes what their Welcome journey settings page changes: how strict a tour is (mode, where required is shown as Mandatory; start_skippable; later_limit, how many times someone can choose "I'll do this later", 1 to 10), and for each stop whether it is included, its wording (body, up to 280 characters; empty uses Makerble's default_body) and whether a click stop is skippable. Essentials stops are always included. Both can choose up to 2 Checklists, watch_checklist_ids, that Watch the journey shows a new colleague straight after the tour. They can also see who has finished a tour and send reminders. Anyone else gets 403.
Stop keys: navbar_spaces, navbar_user, focus_table, contacts_table, contacts_search, contacts_filters, events_table, event_guests.
status is live)" },
{ code: "403", cls: "response-4xx", desc: "The user doesn't have System Access" },
{ code: "422", cls: "response-4xx", desc: "Validation failed, e.g. no name, an unknown stop_key, or a second live tour for the Team" }
- ], "Body: name, organisation_id, team_id, mode, status, start_skippable, later_limit, stops: [{stop_key, position, group_name, title, body, action_text, after_text, skippable}].")}
+ ], "Body: name, organisation_id, team_id, mode, status, start_skippable, later_limit, watch_checklist_ids, stops: [{stop_key, position, group_name, title, body, action_text, after_text, skippable}].")}
${endpointCard("PATCH", "/tours/{id}", "Update a Welcome Tour", true, [
{ name: "id", in: "path", type: "integer", required: true, desc: "Welcome Tour ID" }
], [
{ code: "200", cls: "response-2xx", desc: "Welcome Tour updated" },
{ code: "403", cls: "response-4xx", desc: "Not allowed, e.g. an Organisation Admin changing the name, status or a stop's wording" },
{ code: "404", cls: "response-4xx", desc: "Not found" },
- { code: "422", cls: "response-4xx", desc: "Validation failed, e.g. a later_limit of 11" }
- ], "Only the fields sent change. Staff can send everything, and _destroy: true on a stop removes it. An Organisation Admin can send mode, start_skippable, later_limit and stops: [{id or stop_key, included, body, skippable}]; a stop_key the tour doesn't have yet adds that stop.")}
+ { code: "422", cls: "response-4xx", desc: "Validation failed, e.g. a later_limit of 11, or more than 2 watch_checklist_ids" }
+ ], "Only the fields sent change. Staff can send everything, and _destroy: true on a stop removes it. An Organisation Admin can send mode, start_skippable, later_limit, watch_checklist_ids and stops: [{id or stop_key, included, body, skippable}]; a stop_key the tour doesn't have yet adds that stop. watch_checklist_ids takes up to 2 of the Organisation's Checklists, in order; a person sees only those on their own workspaces. Send [] to fall back to up to 2 Checklists on their workspaces, most recently updated first.")}
${endpointCard("GET", "/tours/{id}/progress", "See who has finished a Welcome Tour", true, [
{ name: "id", in: "path", type: "integer", required: true, desc: "Welcome Tour ID" },
{ name: "page", type: "integer", required: false, desc: "Page number" },
@@ -4266,18 +4266,19 @@ function buildDocsPage() {
${endpointCard("GET", "/organisations/{organisation_id}/welcome_journey_settings", "Get an Organisation's welcome journey settings", true, [
{ name: "organisation_id", in: "path", type: "integer", required: true, desc: "The Organisation (Charity) ID" }
], [
- { code: "200", cls: "response-2xx", desc: "photo_skippable and the Organisation's tour_ids" },
+ { code: "200", cls: "response-2xx", desc: "photo_skippable, watch_skippable and the Organisation's tour_ids" },
{ code: "403", cls: "response-4xx", desc: "Not an Organisation Admin of the Organisation" },
{ code: "404", cls: "response-4xx", desc: "Not found" }
])}
${endpointCard("PATCH", "/organisations/{organisation_id}/welcome_journey_settings", "Update an Organisation's welcome journey settings", true, [
{ name: "organisation_id", in: "path", type: "integer", required: true, desc: "The Organisation (Charity) ID" },
- { name: "photo_skippable", in: "body", type: "boolean", required: true, desc: "Whether people can skip adding a profile picture" }
+ { name: "photo_skippable", in: "body", type: "boolean", required: false, desc: "Whether people can skip adding a profile picture" },
+ { name: "watch_skippable", in: "body", type: "boolean", required: false, desc: "Whether people can skip Watch the journey, the Checklists shown after the Welcome Tour" }
], [
{ code: "200", cls: "response-2xx", desc: "The settings after the change" },
{ code: "403", cls: "response-4xx", desc: "Not an Organisation Admin of the Organisation" },
- { code: "422", cls: "response-4xx", desc: "photo_skippable missing" }
- ])}
+ { code: "422", cls: "response-4xx", desc: "Neither photo_skippable nor watch_skippable sent" }
+ ], "Send either setting or both.")}