diff --git a/openapi.yaml b/openapi.yaml index a6841d8..c3fcdeb 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -8270,6 +8270,13 @@ paths: ("Warn and ask for a reason to skip") makes them give a reason, which is logged. On an update, an action that doesn't mention it keeps its setting. + "Video (optional)": set `video_url` to a web link (`https://` or `http://`, up to 2048 + characters) to a video about the step, for self-paced training. On the Checklist's page, + **Watch the journey** shows each step as a card with its video: a YouTube, Vimeo, Loom or + Google Drive link plays in the card, and any other link (SharePoint, Slack, an intranet) + opens in a new tab. Send an empty `video_url` to remove it; on an update, an action that + doesn't mention it keeps its video. + Participant Journey stages: send `stages`, in order, each with a `key` of your choosing, a `name` and an `icon` (see `GET /checklists/stage_icons`; `clipboard` if left out), and give each action the `stage_key` of its stage. The Journey view on the Checklist's profile page @@ -8322,6 +8329,7 @@ paths: owner_team_id: 18 allow_manual_completion: true if_earlier_steps_not_done: "ask_reason" + video_url: "https://www.loom.com/share/22af2a7d40a54d0ba6d720140230b565" responses: "201": description: The Checklist, with its actions, projects and contacts_count @@ -8474,7 +8482,8 @@ paths: Each action includes who is responsible for it: `owner_kind`, `owner_user_id`, `owner_team_id`, `owner_relationship_side` and a readable `owner_description`, and its settings `due_within_days`, `only_this_project`, `allow_manual_completion` and - `if_earlier_steps_not_done` (`remind` or `ask_reason`), and its `stage_id`. `stages` lists the + `if_earlier_steps_not_done` (`remind` or `ask_reason`), its `video_url` (null for none) and its + `stage_id`. `stages` lists the Participant Journey stages in order, each with `id`, `name`, `icon`, `position` and `colour`. An action whose type isn't chosen yet has a null `action_type` and `action_name` "Not set yet". operationId: getChecklist diff --git a/server.js b/server.js index 362a458..9aabb2f 100644 --- a/server.js +++ b/server.js @@ -2657,20 +2657,20 @@ function buildDocsPage() { ${endpointCard("GET", "/checklists/{id}", "Get a Checklist", true, [ { name: "id", in: "path", type: "integer", required: true, desc: "Checklist ID" } ], [ - { code: "200", cls: "response-2xx", desc: "The Checklist with stages (id, name, icon, position, colour), actions (each with stage_id, due_within_days, its owner fields and owner_description; action_name is \"Not set yet\" while no type is chosen), projects and contacts_count" }, + { code: "200", cls: "response-2xx", desc: "The Checklist with stages (id, name, icon, position, colour), actions (each with stage_id, due_within_days, video_url, its owner fields and owner_description; action_name is \"Not set yet\" while no type is chosen), projects and contacts_count" }, { code: "404", cls: "response-4xx", desc: "Not found, or another Organisation's" } ])} ${endpointCard("POST", "/checklists", "Create a Checklist", true, [], [ { code: "201", cls: "response-2xx", desc: "The new Checklist" }, { code: "403", cls: "response-4xx", desc: "Not an editor or reporter of the Organisation" }, { code: "422", cls: "response-4xx", desc: "e.g. an action with every option unticked" } - ], "Body: charity_id, checklist: {name, description, stages: [{key, name, icon}], actions: [{action_type, title, description, stage_key, criteria, only_this_project, due_within_days, allow_manual_completion, if_earlier_steps_not_done, owner_kind, owner_user_id, owner_team_id, owner_relationship_side}]}. stages are the optional Participant Journey stages, in order: each action joins one by naming its key in stage_key, and each stage's actions are kept together. icon is one of GET /checklists/stage_icons (clipboard by default). An action without an action_type is saved as \"Not set yet\" and can't be done until a type is chosen. criteria holds specific values under the type's criteria_keys, or {any: true} for any record of the kind; an action with neither is saved as \"Not set yet\" and can't be done until it is set. The owner fields are optional. allow_manual_completion: true (\"Allow colleagues to tick this off by hand with a note\") lets colleagues mark the action done by hand. if_earlier_steps_not_done (\"If earlier steps aren't done\") is remind (the default: a reminder colleagues can dismiss) or ask_reason (they must give a reason to skip the earlier steps). only_this_project: true (\"Only count records in this project\") counts only records made in the Project the Checklist was added to the Contact through. due_within_days (\"Due within N days of the checklist being added\", 0 to 3650) gives the action a deadline; leave it out for none.")} + ], "Body: charity_id, checklist: {name, description, stages: [{key, name, icon}], actions: [{action_type, title, description, video_url, stage_key, criteria, only_this_project, due_within_days, allow_manual_completion, if_earlier_steps_not_done, owner_kind, owner_user_id, owner_team_id, owner_relationship_side}]}. stages are the optional Participant Journey stages, in order: each action joins one by naming its key in stage_key, and each stage's actions are kept together. icon is one of GET /checklists/stage_icons (clipboard by default). An action without an action_type is saved as \"Not set yet\" and can't be done until a type is chosen. criteria holds specific values under the type's criteria_keys, or {any: true} for any record of the kind; an action with neither is saved as \"Not set yet\" and can't be done until it is set. The owner fields are optional. allow_manual_completion: true (\"Allow colleagues to tick this off by hand with a note\") lets colleagues mark the action done by hand. if_earlier_steps_not_done (\"If earlier steps aren't done\") is remind (the default: a reminder colleagues can dismiss) or ask_reason (they must give a reason to skip the earlier steps). only_this_project: true (\"Only count records in this project\") counts only records made in the Project the Checklist was added to the Contact through. due_within_days (\"Due within N days of the checklist being added\", 0 to 3650) gives the action a deadline; leave it out for none. video_url (\"Video (optional)\") is a web link to a video about the step, shown in Watch the journey on the Checklist's page: YouTube, Vimeo, Loom and Google Drive videos play in place, other links open in a new tab.")} ${endpointCard("PATCH", "/checklists/{id}", "Update a Checklist", true, [ { name: "id", in: "path", type: "integer", required: true, desc: "Checklist ID" } ], [ { code: "200", cls: "response-2xx", desc: "The updated Checklist" }, { code: "403", cls: "response-4xx", desc: "Not an editor or reporter of the Organisation" } - ], "Actions with an id change; {id, _destroy: true} removes one; actions without an id are added. due_within_days: null removes an action's deadline. stages work the same way ({id, name, icon, position}, {id, _destroy: true}, or a new one with a key); an action's stage_key is a new stage's key or an existing stage's id, empty for no stage. A stage left without actions is removed.")} + ], "Actions with an id change; {id, _destroy: true} removes one; actions without an id are added. due_within_days: null removes an action's deadline. An empty video_url removes an action's video. stages work the same way ({id, name, icon, position}, {id, _destroy: true}, or a new one with a key); an action's stage_key is a new stage's key or an existing stage's id, empty for no stage. A stage left without actions is removed.")} ${endpointCard("GET", "/checklists/stage_icons", "List the icons a Checklist stage can have", true, [], [ { code: "200", cls: "response-2xx", desc: "{data: [{icon, name}]}: clipboard, calendar, people, chart, flag, message, home, heart, school, book" } ])}