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
33 changes: 32 additions & 1 deletion openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14734,6 +14734,12 @@ paths:
schema:
type: integer
description: Only the Checklists added to this Project of the Organisation. Not found if the Project isn't the Organisation's.
- name: album_id
in: query
required: false
schema:
type: integer
description: Only the Checklists added to this Album's (Bundle's) Projects that you can see. Not found for an Album you can't see.
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/PerPage'
- $ref: '#/components/parameters/LastSyncDatetime'
Expand Down Expand Up @@ -15186,7 +15192,8 @@ paths:
many of the project's contacts with the Checklist have done that step, as a count and a percentage.
Only Organisation Admins (every open project of their organisation), Team Leaders (open projects
where someone in a Team they lead is a colleague) and Album Editors (open projects in organisation
Albums they edit) may call it; anyone else gets 403. A Checklist that none of your projects uses
Albums they edit) may call it; anyone else gets 403. With `album_id`, it covers that Album's
projects instead, for anyone who can see the Album. A Checklist that none of your projects uses
returns 404. Only contacts you may see, that aren't deleted and are still active in the project,
are counted. Rows are sorted before pagination; the sort is not remembered.
security: [{tokenAuth: []}]
Expand All @@ -15196,6 +15203,12 @@ paths:
required: true
description: Checklist id
schema: {type: integer}
- name: album_id
in: query
required: false
schema:
type: integer
description: Summarise this Album's (Bundle's) Projects that use the Checklist instead, for anyone who can see the Album, as the Summary tab of its Checklist panel does. Not found for an Album you can't see, or a Checklist none of its Projects uses.
- $ref: '#/components/parameters/Page'
- $ref: '#/components/parameters/PerPage'
- name: sort
Expand Down Expand Up @@ -15268,6 +15281,12 @@ paths:
required: true
schema:
type: integer
- name: album_id
in: query
required: false
schema:
type: integer
description: Count only the Contacts in this Album's (Bundle's) Projects, as the Checklist panel on its profile page does. Not found for an Album you can't see, or a `project_id` outside it.
- name: project_id
in: query
required: false
Expand Down Expand Up @@ -15338,6 +15357,12 @@ paths:
required: true
schema:
type: integer
- name: album_id
in: query
required: false
schema:
type: integer
description: Only the Contacts in this Album's (Bundle's) Projects. Not found for an Album you can't see.
- name: list
in: query
required: true
Expand Down Expand Up @@ -15405,6 +15430,12 @@ paths:
required: true
schema:
type: integer
- name: album_id
in: query
required: false
schema:
type: integer
description: Count only the Contacts in this Album's (Bundle's) Projects. Not found for an Album you can't see.
- name: project_id
in: query
required: false
Expand Down
7 changes: 6 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -3380,6 +3380,7 @@ function buildDocsPage() {
${endpointCard("GET", "/checklists", "List an Organisation's Checklists", true, [
{ name: "charity_id", type: "integer", required: true, desc: "The Organisation ID" },
{ name: "project_id", type: "integer", required: false, desc: "Only the Checklists added to this Project of the Organisation" },
{ name: "album_id", type: "integer", required: false, desc: "Only the Checklists added to this Album's Projects" },
{ name: "page", type: "integer", required: false, desc: "Page number" },
{ name: "per_page", type: "integer", required: false, desc: "Records per page" },
{ name: "last_synced_datetime", type: "string", required: false, desc: "ISO 8601 incremental sync" }
Expand Down Expand Up @@ -3413,6 +3414,7 @@ function buildDocsPage() {
])}
${endpointCard("GET", "/checklists/{id}/summary", "Get a Checklist Summary across the projects you oversee", true, [
{ name: "id", in: "path", type: "integer", required: true, desc: "Checklist ID" },
{ name: "album_id", type: "integer", required: false, desc: "Summarise this Album's Projects instead, for anyone who can see the Album" },
{ name: "page", type: "integer", required: false, desc: "Page number" },
{ name: "per_page", type: "integer", required: false, desc: "Projects per page (default 10, max 200)" },
{ name: "sort", type: "string", required: false, desc: "<code>project</code> (default), <code>managed_by</code>, <code>colleagues</code> or <code>step_&lt;number&gt;</code>" },
Expand Down Expand Up @@ -3447,7 +3449,8 @@ function buildDocsPage() {
], "\"Sketched from your setup\" on the Checklists page. Nothing is saved. Without <code>project_id</code>, drafts from the running Project with the most Contacts that has at least two of: an active Signup Page, a Contact Form (other than the default), a Waiting List or Alumni status, and a Survey. The draft uses the five Participant Journey stages, leaving out any with nothing found: Sign up (one \"Complete a form\" step per Signup Page), Arrange support (the Contact Forms, then Waiting List → Enrolled), Provide support (each Survey's first Wave, and \"Invite to an event\" for the Project's Event Formats), Monitor progress (later Waves) and Achieve the goal (Move to Alumni). Every step already says what counts as done, and <code>checklist</code> can be sent to <code>POST /checklists</code> as it is.")}
${endpointCard("GET", "/checklists/{id}/journey", "Get a Checklist's Participant Journey", true, [
{ name: "id", in: "path", type: "integer", required: true, desc: "Checklist ID" },
{ name: "project_id", type: "integer", required: false, desc: "Count only the Contacts in this Project, one the Checklist is added to" }
{ name: "project_id", type: "integer", required: false, desc: "Count only the Contacts in this Project, one the Checklist is added to" },
{ name: "album_id", type: "integer", required: false, desc: "Count only the Contacts in this Album's Projects" }
], [
{ code: "200", cls: "response-2xx", desc: "<code>contacts_count</code> and <code>columns</code> in order, each <code>{stage_id, name, icon, colour, steps: [{action_id, number, title, action_type, action_name, done_count, waiting_count}]}</code>" },
{ code: "404", cls: "response-4xx", desc: "Not found, another Organisation's, or a <code>project_id</code> the Checklist isn't added to" }
Expand All @@ -3465,6 +3468,7 @@ function buildDocsPage() {
${endpointCard("GET", "/checklists/{id}/progress", "Get a Checklist's progress", true, [
{ name: "id", in: "path", type: "integer", required: true, desc: "Checklist ID" },
{ name: "project_id", type: "integer", required: false, desc: "Only Contacts in this Project, one the Checklist is added to" },
{ name: "album_id", type: "integer", required: false, desc: "Only Contacts in this Album's Projects; <code>project_id</code> must then be one of them" },
{ name: "responsible", type: "string", required: false, desc: "Only Contacts whose waiting action this person or Team is responsible for: <code>me</code>, <code>user:&lt;id&gt;</code> or <code>team:&lt;id&gt;</code>" }
], [
{ code: "200", cls: "response-2xx", desc: "<code>contacts_count</code>, <code>complete_count</code>, <code>overdue_count</code>, <code>list_limit</code>, <code>complete</code> and, for each action in order, <code>completed_count</code>, <code>furthest_count</code> and <code>waiting_count</code>, each with the first <code>list_limit</code> Contacts as <code>{beneficiary_id, name, actions_done}</code> (<code>actions_done</code>: how many of the Checklist's actions they have done); waiting Contacts also have <code>days_waiting</code>, <code>overdue</code>, <code>skipped_a_step</code> and <code>responsible</code>" },
Expand All @@ -3476,6 +3480,7 @@ function buildDocsPage() {
{ name: "list", type: "string", required: true, desc: "<code>completed</code>, <code>furthest</code> or <code>waiting</code> (the Table's lists for <code>action_id</code>), <code>board</code> (the Board column for <code>action_id</code>) or <code>complete</code> (Fully complete)" },
{ name: "action_id", type: "integer", required: false, desc: "The action whose list it is; required for every list but <code>complete</code>" },
{ name: "project_id", type: "integer", required: false, desc: "Only Contacts in this Project, one the Checklist is added to" },
{ name: "album_id", type: "integer", required: false, desc: "Only Contacts in this Album's Projects; <code>project_id</code> must then be one of them" },
{ name: "responsible", type: "string", required: false, desc: "Only Contacts whose waiting action this person or Team is responsible for: <code>me</code>, <code>user:&lt;id&gt;</code> or <code>team:&lt;id&gt;</code>" },
{ name: "page", type: "integer", required: false, desc: "Page number (default 1)" },
{ name: "per_page", type: "integer", required: false, desc: "Contacts per page (default 10, max 200)" }
Expand Down
Loading