diff --git a/openapi.yaml b/openapi.yaml index 72f3d73..224d8ed 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -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' @@ -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: []}] @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/server.js b/server.js index 086394c..490f425 100644 --- a/server.js +++ b/server.js @@ -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" } @@ -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: "project (default), managed_by, colleagues or step_<number>" }, @@ -3447,7 +3449,8 @@ function buildDocsPage() { ], "\"Sketched from your setup\" on the Checklists page. Nothing is saved. Without project_id, 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 checklist can be sent to POST /checklists 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: "contacts_count and columns in order, each {stage_id, name, icon, colour, steps: [{action_id, number, title, action_type, action_name, done_count, waiting_count}]}" }, { code: "404", cls: "response-4xx", desc: "Not found, another Organisation's, or a project_id the Checklist isn't added to" } @@ -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; project_id 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: me, user:<id> or team:<id>" } ], [ { code: "200", cls: "response-2xx", desc: "contacts_count, complete_count, overdue_count, list_limit, complete and, for each action in order, completed_count, furthest_count and waiting_count, each with the first list_limit Contacts as {beneficiary_id, name, actions_done} (actions_done: how many of the Checklist's actions they have done); waiting Contacts also have days_waiting, overdue, skipped_a_step and responsible" }, @@ -3476,6 +3480,7 @@ function buildDocsPage() { { name: "list", type: "string", required: true, desc: "completed, furthest or waiting (the Table's lists for action_id), board (the Board column for action_id) or complete (Fully complete)" }, { name: "action_id", type: "integer", required: false, desc: "The action whose list it is; required for every list but complete" }, { 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; project_id 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: me, user:<id> or team:<id>" }, { 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)" }