diff --git a/openapi.yaml b/openapi.yaml
index cef82a0..5d51a12 100644
--- a/openapi.yaml
+++ b/openapi.yaml
@@ -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:
@@ -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:
diff --git a/server.js b/server.js
index b7b121c..3a0517d 100644
--- a/server.js
+++ b/server.js
@@ -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. Date of birth" },
- { name: "field_data_type", in: "body", type: "string", required: true, desc: "text, number, date, time, file, video, audio, picture, section_title, email_address, telephone or signature. video, audio and picture 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 field_type: file and capture_type" },
+ { name: "field_data_type", in: "body", type: "string", required: true, desc: "text, number, date, time, file, video, audio, picture, section_title, email_address, telephone or signature. video, audio and picture 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 field_type: file and capture_type. 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 section_title 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: "true to create it even though a near-identical one exists (see 409)" }
@@ -2458,7 +2458,7 @@ function buildDocsPage() {
{ name: "department", in: "body", type: "string", required: true, desc: "Personal, Professional or Public Impact" },
{ name: "contact_role", in: "body", type: "string", required: true, desc: "What the Contacts are to the organisation, e.g. Participant" },
{ name: "contact_type", in: "body", type: "string", required: false, desc: "Person (default), Organisation, Animal or Object" },
- { name: "questions", in: "body", type: "array", required: true, desc: "In order, at most 50. Each has exactly one of field_id, list_id (reuse), new_field {field_name, field_data_type} or new_list {name, choices}; plus optional is_mandatory, choice, layout, external_description" },
+ { name: "questions", in: "body", type: "array", required: true, desc: "In order, at most 50. Each has exactly one of field_id, list_id (reuse), new_field {field_name, field_data_type} or new_list {name, choices}; plus optional is_mandatory, choice, layout, external_description. A new_field may be a weekly_availability 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: "true to create new items even though near-identical ones exist (see 409)" }
], [