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
4 changes: 3 additions & 1 deletion openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8709,6 +8709,7 @@ paths:
type: string
enum: [text, number, date, time, file, video, audio, picture, section_title, email_address, telephone, signature]
description: |
A Weekly availability field can only be made as part of a Contact Form (`POST /contact_forms`), not here.
The kind of answer. `file` is an Attachment for any file; `video`, `audio` and
`picture` ask for that kind of media (see above).
section_text:
Expand Down Expand Up @@ -17466,7 +17467,8 @@ components:
type: string
field_data_type:
type: string
enum: [text, number, date, time, file, section_title, email_address, telephone, signature]
enum: [text, number, date, time, file, section_title, email_address, telephone, signature, weekly_availability]
description: "`weekly_availability` asks for the days and times a Contact can usually attend. It can only be made on a Contact Form."
section_text:
type: string
private:
Expand Down
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2369,7 +2369,7 @@ function buildDocsPage() {
${endpointCard("POST", "/fields", "Create a Field", true, [
{ name: "organisation_id", in: "body", type: "integer", required: true, desc: "The organisation (Charity) that will own it; you must be one of its editors" },
{ name: "field_name", in: "body", type: "string", required: true, desc: "The question, e.g. <code>Date of birth</code>" },
{ name: "field_data_type", in: "body", type: "string", required: true, desc: "<code>text</code>, <code>number</code>, <code>date</code>, <code>time</code>, <code>file</code>, <code>video</code>, <code>audio</code>, <code>picture</code>, <code>section_title</code>, <code>email_address</code>, <code>telephone</code> or <code>signature</code>. <code>video</code>, <code>audio</code> and <code>picture</code> make a Video, Audio or Picture question: an Attachment that asks for that kind of media, which people can record or take in the survey. It is returned with <code>field_type: file</code> and <code>capture_type</code>" },
{ name: "field_data_type", in: "body", type: "string", required: true, desc: "<code>text</code>, <code>number</code>, <code>date</code>, <code>time</code>, <code>file</code>, <code>video</code>, <code>audio</code>, <code>picture</code>, <code>section_title</code>, <code>email_address</code>, <code>telephone</code> or <code>signature</code>. <code>video</code>, <code>audio</code> and <code>picture</code> make a Video, Audio or Picture question: an Attachment that asks for that kind of media, which people can record or take in the survey. It is returned with <code>field_type: file</code> and <code>capture_type</code>. A Weekly availability field can only be made as part of a Contact Form" },
{ name: "section_text", in: "body", type: "string", required: false, desc: "For a <code>section_title</code> Field only" },
{ name: "private", in: "body", type: "boolean", required: false, desc: "Only the organisation's staff may see the answers" },
{ name: "force", in: "body", type: "boolean", required: false, desc: "<code>true</code> to create it even though a near-identical one exists (see 409)" }
Expand Down Expand Up @@ -2458,7 +2458,7 @@ function buildDocsPage() {
{ name: "department", in: "body", type: "string", required: true, desc: "<code>Personal</code>, <code>Professional</code> or <code>Public Impact</code>" },
{ name: "contact_role", in: "body", type: "string", required: true, desc: "What the Contacts are to the organisation, e.g. <code>Participant</code>" },
{ name: "contact_type", in: "body", type: "string", required: false, desc: "<code>Person</code> (default), <code>Organisation</code>, <code>Animal</code> or <code>Object</code>" },
{ name: "questions", in: "body", type: "array", required: true, desc: "In order, at most 50. Each has exactly one of <code>field_id</code>, <code>list_id</code> (reuse), <code>new_field</code> {field_name, field_data_type} or <code>new_list</code> {name, choices}; plus optional <code>is_mandatory</code>, <code>choice</code>, <code>layout</code>, <code>external_description</code>" },
{ name: "questions", in: "body", type: "array", required: true, desc: "In order, at most 50. Each has exactly one of <code>field_id</code>, <code>list_id</code> (reuse), <code>new_field</code> {field_name, field_data_type} or <code>new_list</code> {name, choices}; plus optional <code>is_mandatory</code>, <code>choice</code>, <code>layout</code>, <code>external_description</code>. A <code>new_field</code> may be a <code>weekly_availability</code> field, which asks for the days and times a Contact can usually attend: only Contact Forms can have one" },
{ name: "approved", in: "body", type: "boolean", required: false, desc: "Makerble staff only: let every organisation use the form" },
{ name: "force", in: "body", type: "boolean", required: false, desc: "<code>true</code> to create new items even though near-identical ones exist (see 409)" }
], [
Expand Down
Loading