diff --git a/openapi.yaml b/openapi.yaml index 297b358..d37f825 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -18532,6 +18532,10 @@ components: description: Who answers it items: type: string + contact_mode: + type: string + enum: [one_contact, several_contacts] + description: How the survey is shown when someone tries it on a toolkit page, About one contact (`one_contact`) or for Several or no contacts (`several_contacts`) repeats_at_intervals: type: boolean validated: @@ -21304,6 +21308,10 @@ components: intro_message: type: string nullable: true + contact_mode: + type: string + enum: [one_contact, several_contacts] + description: How the survey is shown when someone tries it on a toolkit page, About one contact (`one_contact`) or for Several or no contacts (`several_contacts`) current_fields: type: array items: diff --git a/server.js b/server.js index 9d3aa4b..94deade 100644 --- a/server.js +++ b/server.js @@ -2018,9 +2018,9 @@ function buildDocsPage() { ${endpointCard("GET", "/story_categories/{id}", "Get a Survey with full field detail", true, [ { name: "id", in: "path", type: "integer", required: true, desc: "Survey ID" } ], [ - { code: "200", cls: "response-2xx", desc: "Survey with current_fields, scale_indicator_choices, and verdict_data" }, + { code: "200", cls: "response-2xx", desc: "Survey with contact_mode, current_fields, scale_indicator_choices, and verdict_data" }, { code: "404", cls: "response-4xx", desc: "Not found" } - ], "Returns all questions in order (current_fields), the choice type (single/multiple) for each Scale Indicator (scale_indicator_choices), and scoring bands (verdict_data).")} + ], "Returns all questions in order (current_fields), the choice type (single/multiple) for each Scale Indicator (scale_indicator_choices), and scoring bands (verdict_data). contact_mode says how the survey is shown when someone tries it on a toolkit page: one_contact (About one contact) or several_contacts (Several or no contacts).")} ${endpointCard("GET", "/story_categories/{id}/verdicts", "Get verdict scores for a Survey Campaign", true, [ { name: "id", in: "path", type: "integer", required: true, desc: "Survey ID" }, { name: "project_id", type: "integer", required: true, desc: "Project the Survey Campaign belongs to" }, @@ -2638,7 +2638,7 @@ function buildDocsPage() { { name: "per_page", type: "integer", required: false, desc: "Surveys per page (default 10, max 200)" }, { name: "last_synced_datetime", type: "string", required: false, desc: "ISO 8601 — only Surveys updated after this" } ], [ - { code: "200", cls: "response-2xx", desc: "Surveys with id, name, description, shared_by, tag, question_count, estimated_minutes, themes, audiences, repeats_at_intervals, validated, verdicts, libraries_count (organisations using it), yours and added_to_a_project, plus facets: each filter's options with how many Surveys each would return given the other filters" } + { code: "200", cls: "response-2xx", desc: "Surveys with id, name, description, shared_by, tag, question_count, estimated_minutes, themes, audiences, repeats_at_intervals, contact_mode (one_contact or several_contacts, how its Try this survey popup on a toolkit page shows it), validated, verdicts, libraries_count (organisations using it), yours and added_to_a_project, plus facets: each filter's options with how many Surveys each would return given the other filters" } ])} ${endpointCard("GET", "/explore/surveys/{id}", "Preview an Explore Survey", true, [ { name: "id", in: "path", type: "integer", required: true, desc: "The Survey's id from Explore Surveys" }