From 5e7b2f1cfd61b59d95ab0c976a5bef5ee9716c54 Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Tue, 18 May 2021 10:36:23 +0100 Subject: [PATCH 01/40] BON-68 API: List - Manage content From a8dd1f24b59636daee24cfdf54d64881c1856820 Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Fri, 5 Feb 2021 10:04:37 +0000 Subject: [PATCH 02/40] BO-67 API: List - Manage content --- api.swagger.yaml | 110 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) diff --git a/api.swagger.yaml b/api.swagger.yaml index 288ffe96..0c35c40a 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -2526,6 +2526,77 @@ paths: - SessionCookieHeader: [] - APIKeyHeader: [] - CognitoJwt: [ invotra/groups:write ] + '/content/list': + get: + tags: + - 'content' + description: 'Search for all content types. An empty array is returned if no content was found. Multiple values may be supplied.' + parameters: + - name: content_type + description: 'Filter on the type of content.' + in: query + required: false + schema: + type: array + items: + $ref: '#/components/schemas/content-type-enum' + - name: custom_content_type + description: 'Filter by the custom content type machine name. Use in conjunction with content_type=custom_content. Multiple values may be supplied.' + in: query + required: false + schema: + type: array + items: + type: string + example: 'guideline' + - name: sort + description: 'Field to sort by.' + in: query + required: false + schema: + type: string + enum: + - timestamp_created + - timestamp_updated + default: timestamp_created + - name: order + description: 'Sort order.' + in: query + required: false + schema: + type: string + enum: + - asc + - desc + default: desc + - $ref: '#/components/parameters/offsetParam' + - $ref: '#/components/parameters/limitParam' + responses: + '200': + description: 'List of content matching the filter criteria.' + content: + application/json: + schema: + type: object + required: + - count + - results + properties: + count: + description: 'Count of results.' + type: integer + example: 50 + results: + description: 'The results set.' + type: array + items: + $ref: '#/components/schemas/content-list-schema' + '403': + description: 'User is not authorized to list content.' + security: + - SessionCookieHeader: [] + - APIKeyHeader: [] + - CognitoJwt: [ invotra/content:read ] '/blogs': post: tags: @@ -11826,7 +11897,46 @@ components: description: Colour of the category. Any CSS colour allowed. type: string example: '#FFFFFF' + content-list-schema: type: object + required: + - uuid + properties: + uuid: + description: 'Invotra UUID of the content.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + content-type-enum: + type: string + enum: + - blogs + - custom_content + - events + - forums + - galleries + - group_documents + - group_polls + - groups + - ideas + - lists + - manual_pages + - manuals + - messages + - multi_media + - news + - pages + - policies + - polls + - posts + - procedures + - processes + - promotions + - queries + - questions + - standard + - support_tickets + - webforms blog-schema: allOf: - $ref: '#/components/schemas/blog-schema-common' From 78c369a1b9fff36eef23ffccc1d2c37d5ae0400c Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Fri, 5 Feb 2021 12:48:46 +0000 Subject: [PATCH 03/40] Add props to /content/list --- api.swagger.yaml | 193 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 185 insertions(+), 8 deletions(-) diff --git a/api.swagger.yaml b/api.swagger.yaml index 0c35c40a..6d8c7abd 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -2530,39 +2530,132 @@ paths: get: tags: - 'content' - description: 'Search for all content types. An empty array is returned if no content was found. Multiple values may be supplied.' + description: 'Search for all content types. An empty array is returned if no content was found.' parameters: - name: content_type description: 'Filter on the type of content.' in: query - required: false schema: type: array items: $ref: '#/components/schemas/content-type-enum' - name: custom_content_type - description: 'Filter by the custom content type machine name. Use in conjunction with content_type=custom_content. Multiple values may be supplied.' + description: 'Filter by the custom content type machine name. Use in conjunction with content_type=custom_content.' in: query - required: false schema: type: array items: type: string example: 'guideline' + - name: site_section_uuid + description: 'Filter on Invotra UUID of the site section.' + in: query + schema: + type: array + items: + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + - name: site_section_descendants + description: 'When filtering on site section also include all descendant site sections.' + in: query + schema: + type: boolean + example: true + - name: author_uuid + description: 'Filter on Invotra UUID of the author.' + in: query + schema: + type: array + items: + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + - name: owner_uuid + description: 'Filter on Invotra UUID of the owner.' + in: query + schema: + type: array + items: + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + - name: external_id + description: 'Filter by external ID.' + in: query + schema: + type: array + items: + type: string + example: 'ABC123' + - name: workflow_state + description: 'Filter the list on workflow state. The default when not supplied is "published" only.' + in: query + schema: + type: array + items: + type: string + enum: + - draft + - needs_review + - published + - reviewed + - unpublished + - name: timestamp_created_start + description: 'Filter the results to only include messages created from (greater than or equal to) the specified timestamp (in seconds).' + in: query + schema: + type: integer + example: 1563357496 + - name: timestamp_created_end + description: 'Filter the results to only include messages created up to (less than or equal to) the specified timestamp (in seconds).' + in: query + schema: + type: integer + example: 1563357496 + - name: timestamp_updated_start + description: 'Filter the results to only include messages updated from (greater than or equal to) the specified timestamp (in seconds).' + in: query + schema: + type: integer + example: 1563357496 + - name: timestamp_updated_end + description: 'Filter the results to only include messages updated up to (less than or equal to) the specified timestamp (in seconds).' + in: query + schema: + type: integer + example: 1563357496 + - name: review_date_timestamp_start + description: 'Filter the results to only include messages with a review date from (greater than or equal to) the specified timestamp (in seconds).' + in: query + schema: + type: integer + example: 1563357496 + - name: review_date_timestamp_end + description: 'Filter the results to only include messages with a review date up to (less than or equal to) the specified timestamp (in seconds).' + in: query + schema: + type: integer + example: 1563357496 - name: sort description: 'Field to sort by.' in: query - required: false schema: type: string enum: + - author + - content_type + - owner + - review_date_timestamp + - site_section - timestamp_created - timestamp_updated + - title + - workflow_state default: timestamp_created - name: order description: 'Sort order.' in: query - required: false schema: type: string enum: @@ -2590,7 +2683,7 @@ paths: description: 'The results set.' type: array items: - $ref: '#/components/schemas/content-list-schema' + $ref: '#/components/schemas/content-schema' '403': description: 'User is not authorized to list content.' security: @@ -11897,16 +11990,100 @@ components: description: Colour of the category. Any CSS colour allowed. type: string example: '#FFFFFF' - content-list-schema: + content-schema: type: object required: - uuid + - title + - body + - content_type + - timestamp_created + - comment_count + - likes_count properties: uuid: description: 'Invotra UUID of the content.' type: string format: uuid example: '01234567-89ab-cdef-1234-56789abcdef0' + title: + description: 'Title of the content.' + type: string + example: 'Guidelines for creating a strong password' + body: + description: 'The body of the content.' + type: string + example: 'You can create strong passwords using an offline random password generator.' + content_type: + description: 'The content type of the content.' + allOf: + - $ref: '#/components/schemas/content-type-enum' + custom_content_type: + description: 'The custom content type machine name. Only present is the content type is "custom_content".' + type: string + example: 'guideline' + author: + description: 'The author of this content.' + allOf: + - $ref: '#/components/schemas/user-trimmed-schema' + owner: + description: 'The owner of this content.' + type: object + allOf: + - $ref: '#/components/schemas/user-trimmed-schema' + site_section: + description: 'The site section of this content.' + type: object + required: + - uuid + - name + properties: + uuid: + description: 'Invotra UUID of the site section.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + name: + description: 'The name of the site section.' + type: string + example: 'Operations' + state: + description: 'Indicates the workflow state of the content.' + type: string + enum: + - draft + - needs_review + - published + - reviewed + - unpublished + review_date_timestamp: + description: 'The review date timestamp for the content (in seconds). The review date is mandatory if configured to be in Invotra admin.' + type: integer + example: 1510941596 + timestamp_created: + description: 'This is the timestamp (in seconds) of when the content was created.' + type: integer + example: 1510941596 + timestamp_updated: + description: 'This is the timestamp (in seconds) of when the content was last updated.' + type: integer + example: 1510941696 + timestamp_published: + description: 'This is the timestamp (in seconds) of when the content was published.' + type: integer + example: 1510941696 + comment_count: + description: 'Count of comments on the content.' + type: integer + example: 5 + likes_count: + description: 'Count of likes on the content.' + type: integer + example: 5 + published: + description: 'Published status of the content.' + type: boolean + example: true content-type-enum: type: string enum: From ac4c97e7cd556683153eb1cfc00bd35fb5231efc Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Fri, 5 Feb 2021 14:22:48 +0000 Subject: [PATCH 04/40] BO-63 API: Upload screen - Upload Files --- api.swagger.yaml | 81 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/api.swagger.yaml b/api.swagger.yaml index 6d8c7abd..927087d4 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -5791,6 +5791,70 @@ paths: - SessionCookieHeader: [] - APIKeyHeader: [] - CognitoJwt: [ invotra/files:write ] + '/files/list': + get: + tags: + - 'files' + description: 'Search for files. An empty array is returned if no files are found.' + parameters: + - name: filename + description: 'Filter by filename. Matches on whole words.' + in: query + schema: + type: string + example: 'wallpaper.jpeg' + - name: type + description: 'Filter by file type.' + in: query + schema: + type: string + enum: + - image + - document + - audio + - video + example: 'image' + - name: filemime + description: 'Filter by file MIME type.' + in: query + schema: + type: string + example: 'image/jpeg' + - description: 'Filter by external ID.' + in: query + name: external_id + schema: + type: string + example: 'ABC123' + - $ref: '#/components/parameters/offsetParam' + - $ref: '#/components/parameters/limitParam' + responses: + '200': + description: 'List of files matching the filter criteria.' + content: + application/json: + schema: + type: object + required: + - count + - results + properties: + count: + description: 'Count of results.' + type: integer + example: 50 + results: + description: 'The results set.' + type: array + items: + allOf: + - $ref: '#/components/schemas/file-schema' + '403': + description: 'User is not authorized to list files.' + security: + - SessionCookieHeader: [] + - APIKeyHeader: [] + - CognitoJwt: [ invotra/files:read ] '/files/{file_id}': parameters: - description: The Invotra UUID of the file. @@ -5846,6 +5910,23 @@ paths: - SessionCookieHeader: [] - APIKeyHeader: [] - CognitoJwt: [ invotra/files:write ] + delete: + tags: + - files + description: 'Remove a file.' + responses: + '200': + description: 'The file was removed successfully.' + '400': + description: 'The supplied UUID was malformed.' + '403': + description: 'The user does not have permission to remove this file.' + '404': + description: 'The UUID does not correspond to an existing file.' + security: + - SessionCookieHeader: [] + - APIKeyHeader: [] + - CognitoJwt: [ invotra/files:write ] /job_roles: get: tags: From 6dec4f0bb2054691fdc28ae4ace787811d1618de Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Fri, 5 Feb 2021 15:40:28 +0000 Subject: [PATCH 05/40] Add properties to filesd --- api.swagger.yaml | 202 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 186 insertions(+), 16 deletions(-) diff --git a/api.swagger.yaml b/api.swagger.yaml index 927087d4..0f49b352 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -82,6 +82,25 @@ paths: - SessionCookieHeader: [] - APIKeyHeader: [] - CognitoJwt: [ invotra/drupal_info ] + /file_types: + get: + tags: + - configuration + description: 'List the currently configured file types and extentions.' + responses: + '200': + description: 'List of file types and extentions.' + content: + application/json: + schema: + type: array + items: + allOf: + - $ref: '#/components/schemas/file-type-configuration-schema' + security: + - SessionCookieHeader: [] + - APIKeyHeader: [] + - CognitoJwt: [ invotra/drupal_info ] /entities/path-lookup: get: tags: @@ -5802,30 +5821,106 @@ paths: in: query schema: type: string - example: 'wallpaper.jpeg' + example: 'wallpaper.jpeg' - name: type description: 'Filter by file type.' in: query schema: - type: string - enum: - - image - - document - - audio - - video - example: 'image' + type: array + items: + type: string + enum: + - image + - document + - audio + - video - name: filemime description: 'Filter by file MIME type.' in: query schema: - type: string - example: 'image/jpeg' + type: array + items: + type: string + example: 'image/jpeg' + - name: site_section_uuid + description: 'Filter on Invotra UUID of the site section.' + in: query + schema: + type: array + items: + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + - name: site_section_descendants + description: 'When filtering on site section also include all descendant site sections.' + in: query + schema: + type: boolean + example: true + - name: author_uuid + description: 'Filter on Invotra UUID of the author.' + in: query + schema: + type: array + items: + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' - description: 'Filter by external ID.' in: query name: external_id + schema: + type: array + items: + type: string + example: 'ABC123' + - name: timestamp_created_start + description: 'Filter the results to only include messages created from (greater than or equal to) the specified timestamp (in seconds).' + in: query + schema: + type: integer + example: 1563357496 + - name: timestamp_created_end + description: 'Filter the results to only include messages created up to (less than or equal to) the specified timestamp (in seconds).' + in: query + schema: + type: integer + example: 1563357496 + - name: timestamp_updated_start + description: 'Filter the results to only include messages updated from (greater than or equal to) the specified timestamp (in seconds).' + in: query + schema: + type: integer + example: 1563357496 + - name: timestamp_updated_end + description: 'Filter the results to only include messages updated up to (less than or equal to) the specified timestamp (in seconds).' + in: query + schema: + type: integer + example: 1563357496 + - name: sort + description: 'Field to sort by.' + in: query schema: type: string - example: 'ABC123' + enum: + - author + - filemime + - filename + - type + - site_section + - timestamp_created + - timestamp_updated + default: timestamp_created + - name: order + description: 'Sort order.' + in: query + schema: + type: string + enum: + - asc + - desc + default: desc - $ref: '#/components/parameters/offsetParam' - $ref: '#/components/parameters/limitParam' responses: @@ -17126,9 +17221,9 @@ components: required: - uuid - filename + - author - file_download - type - - filemime properties: uuid: description: The UUID of the entity. @@ -17139,6 +17234,26 @@ components: description: This is the filename type: string example: wallpaper.jpeg + author: + description: 'The author of this file.' + allOf: + - $ref: '#/components/schemas/user-trimmed-schema' + site_section: + description: 'The site section of this file.' + type: object + required: + - uuid + - name + properties: + uuid: + description: 'Invotra UUID of the site section.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + name: + description: 'The name of the site section.' + type: string + example: 'Operations' file_download: description: The location of the file type: string @@ -17188,12 +17303,38 @@ components: description: The width of the image in pixels. Returned if and only if the type is an image. type: integer example: 200 + timestamp_created: + description: 'This is the timestamp (in seconds) of when the file was created.' + type: integer + example: 1510941596 + timestamp_updated: + description: 'This is the timestamp (in seconds) of when the file was last updated.' + type: integer + example: 1510941696 file-schema-update: properties: filename: description: This is the filename. If using multipart/form-data this field may be omitted in favour of the 'filename' directive of the subpart Content-Disposition header. type: string example: wallpaper.jpeg + author: + description: 'The author of this file.' + type: object + properties: + uuid: + description: 'Invotra UUID of the user.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + site_section: + description: 'The site section of this file.' + type: object + properties: + uuid: + description: 'Invotra UUID of the site section.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' type: description: The type of file. type: string @@ -17217,11 +17358,40 @@ components: file-schema-create: allOf: - $ref: '#/components/schemas/file-schema-update' + - type: object + required: + - file + - filename + - type + properties: + file: + type: string + filename: + type: string + type: + type: string + author: + description: 'The author of this file. (Will use the authenticated user if not supplied.' + file-type-configuration-schema: + type: object required: - - file - - filename - - alt_text - - type + - name + - extentions + properties: + name: + description: 'The name of the file type.' + type: string + enum: + - image + - document + - audio + - video + extentions: + description: 'The file extentions permitted within the file type.' + type: array + items: + type: string + example: '.jpg' job-role-schema: allOf: - type: object From 5be7754f10dd57248b22cb042d289495be88fa4d Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Fri, 5 Feb 2021 15:44:23 +0000 Subject: [PATCH 06/40] Add autocomplete to site_sections/list --- api.swagger.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api.swagger.yaml b/api.swagger.yaml index 0f49b352..158fab8c 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -9908,6 +9908,11 @@ paths: in: query schema: type: string + - name: autocomplete + description: 'Autocomplete matches on name, per letter, from the start of the word.' + in: query + schema: + type: string - description: 'Filter by external ID.' in: query name: external_id From a5dd409c4d93c356ea14b78dcac9613894dc0d3d Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Fri, 5 Feb 2021 15:45:41 +0000 Subject: [PATCH 07/40] words --- api.swagger.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.swagger.yaml b/api.swagger.yaml index 158fab8c..dfff5a96 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -9909,7 +9909,7 @@ paths: schema: type: string - name: autocomplete - description: 'Autocomplete matches on name, per letter, from the start of the word.' + description: 'Autocomplete on name, matches per letter, from the start of the word.' in: query schema: type: string From 732870e942c4ec14ca7ef836ff39bbf94d39572e Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Thu, 11 Feb 2021 09:26:37 +0000 Subject: [PATCH 08/40] Removed incorect (custom) content types --- api.swagger.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/api.swagger.yaml b/api.swagger.yaml index dfff5a96..122c8166 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -12287,12 +12287,9 @@ components: - policies - polls - posts - - procedures - - processes - promotions - queries - questions - - standard - support_tickets - webforms blog-schema: From 5347ff6c0d2200824c5914dd91babef8f5cc56cd Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Tue, 9 Mar 2021 10:00:23 +0000 Subject: [PATCH 09/40] Add /content/list fulltext_search --- api.swagger.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api.swagger.yaml b/api.swagger.yaml index 122c8166..1704cd9b 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -2599,6 +2599,12 @@ paths: type: string format: uuid example: '01234567-89ab-cdef-1234-56789abcdef0' + - name: fulltext_search + description: 'Search within content title or body. Matches on whole words.' + in: query + schema: + type: string + example: 'parking' - name: external_id description: 'Filter by external ID.' in: query From 813c564838879632e4630c96940170543f4d4776 Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Mon, 15 Mar 2021 11:35:21 +0000 Subject: [PATCH 10/40] Add groups DELETE --- api.swagger.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/api.swagger.yaml b/api.swagger.yaml index 1704cd9b..d9e56c25 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -1812,6 +1812,23 @@ paths: - SessionCookieHeader: [] - APIKeyHeader: [] - CognitoJwt: [ invotra/groups:write ] + delete: + tags: + - groups + responses: + '200': + description: 'The group was deleted successfully.' + '400': + description: 'The supplied UUID was malformed.' + '403': + description: 'The user does not have permission to delete the group.' + '404': + description: 'The UUID does not correspond to an existing group.' + description: Delete a group. + security: + - SessionCookieHeader: [] + - APIKeyHeader: [] + - CognitoJwt: [ invotra/groups:write ] '/groups/{group_id}/members': parameters: - description: The Invotra UUID of the group. From 7208a7d55fb4d235953d7b4ed2f0a3516e6c9f0b Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Mon, 15 Mar 2021 11:43:34 +0000 Subject: [PATCH 11/40] Add manuals DELETE --- api.swagger.yaml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/api.swagger.yaml b/api.swagger.yaml index d9e56c25..c3391597 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -2308,6 +2308,23 @@ paths: - SessionCookieHeader: [] - APIKeyHeader: [] - CognitoJwt: [ invotra/groups:write ] + delete: + tags: + - posts + responses: + '200': + description: 'The post was deleted successfully.' + '400': + description: 'The supplied UUID was malformed.' + '403': + description: 'The user does not have permission to delete the post.' + '404': + description: 'The UUID does not correspond to an existing post.' + description: Delete a post. + security: + - SessionCookieHeader: [] + - APIKeyHeader: [] + - CognitoJwt: [ invotra/groups:write ] '/posts/{post_id}/replies': parameters: - description: The Invotra UUID of the parent post. Currently this must be a top-level post in its group. This restriction may be relaxed in a future API version. @@ -5552,6 +5569,23 @@ paths: - SessionCookieHeader: [] - APIKeyHeader: [] - CognitoJwt: [ invotra/manuals:read ] + delete: + tags: + - manuals + description: 'Delete a manual page, including the root manual page.' + responses: + '200': + description: 'The manual page was deleted successfully.' + '400': + description: 'The supplied UUID was malformed.' + '403': + description: 'The user does not have permission to delete the manual page.' + '404': + description: 'The UUID does not correspond to an existing manual page.' + security: + - SessionCookieHeader: [] + - APIKeyHeader: [] + - CognitoJwt: [ invotra/manuals:write ] '/manuals/pages': get: description: Get all pages in a manual or manual page. From d96bf3bb78120be5f1633f184aeefc3f5a4d0dfa Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Mon, 15 Mar 2021 16:50:29 +0000 Subject: [PATCH 12/40] Add deletes to new CT EPs --- api.swagger.yaml | 68 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/api.swagger.yaml b/api.swagger.yaml index c3391597..dc37c43e 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -3223,6 +3223,23 @@ paths: - SessionCookieHeader: [] - APIKeyHeader: [] - CognitoJwt: [ invotra/galleries:read ] + delete: + tags: + - galleries + responses: + '200': + description: 'The gallery was deleted successfully.' + '400': + description: 'The supplied UUID was malformed.' + '403': + description: 'The user does not have permission to delete the gallery.' + '404': + description: 'The UUID does not correspond to an existing gallery.' + description: Delete a gallery. + security: + - SessionCookieHeader: [] + - APIKeyHeader: [] + - CognitoJwt: [ invotra/galleries:write ] '/group_documents': post: tags: @@ -3697,6 +3714,23 @@ paths: - SessionCookieHeader: [] - APIKeyHeader: [] - CognitoJwt: [ invotra/ideas:read ] + delete: + tags: + - 'ideas' + responses: + '200': + description: 'The idea was deleted successfully.' + '400': + description: 'The supplied UUID was malformed.' + '403': + description: 'The user does not have permission to delete the idea.' + '404': + description: 'The UUID does not correspond to an existing idea.' + description: Delete an idea. + security: + - SessionCookieHeader: [] + - APIKeyHeader: [] + - CognitoJwt: [ invotra/ideas:write ] '/lists': post: tags: @@ -5231,6 +5265,23 @@ paths: - SessionCookieHeader: [] - APIKeyHeader: [] - CognitoJwt: [ invotra/queries:read ] + delete: + tags: + - 'queries' + responses: + '200': + description: 'The query was deleted successfully.' + '400': + description: 'The supplied UUID was malformed.' + '403': + description: 'The user does not have permission to delete the query.' + '404': + description: 'The UUID does not correspond to an existing query.' + description: Delete a query. + security: + - SessionCookieHeader: [] + - APIKeyHeader: [] + - CognitoJwt: [ invotra/queries:write ] '/support_tickets/list': get: tags: @@ -5329,6 +5380,23 @@ paths: - SessionCookieHeader: [] - APIKeyHeader: [] - CognitoJwt: [ invotra/support_tickets:read ] + delete: + tags: + - 'support tickets' + responses: + '200': + description: 'The support ticket was deleted successfully.' + '400': + description: 'The supplied UUID was malformed.' + '403': + description: 'The user does not have permission to delete the support ticket.' + '404': + description: 'The UUID does not correspond to an existing support ticket.' + description: Delete a support ticket. + security: + - SessionCookieHeader: [] + - APIKeyHeader: [] + - CognitoJwt: [ invotra/support_tickets:write ] '/webforms': post: tags: From 7f32b34abb88e845a17d02aacb7b0132bc8f22c3 Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Tue, 16 Mar 2021 10:04:57 +0000 Subject: [PATCH 13/40] Galleries EPs --- api.swagger.yaml | 237 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 237 insertions(+) diff --git a/api.swagger.yaml b/api.swagger.yaml index dc37c43e..832af49e 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -3119,6 +3119,39 @@ paths: - SessionCookieHeader: [] - APIKeyHeader: [] - CognitoJwt: [ invotra/custom_content:write ] + '/galleries': + post: + tags: + - 'galleries' + description: 'Provision a new gallery.' + responses: + '201': + description: 'The gallery was created successfully.' + headers: + Location: + description: 'The URL at which the newly provisioned gallery may be retrieved.' + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/successful-post-response-schema' + '400': + description: 'The gallery was not saved due to malformed JSON.' + '403': + description: 'User is not authorized to create a gallery.' + '422': + description: 'The gallery was not saved due to Drupal validation failure or JSON schema validation failure.' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/gallery-schema-create' + required: true + security: + - SessionCookieHeader: [] + - APIKeyHeader: [] + - CognitoJwt: [ invotra/galleries:write ] '/galleries/list': get: tags: @@ -3223,6 +3256,31 @@ paths: - SessionCookieHeader: [] - APIKeyHeader: [] - CognitoJwt: [ invotra/galleries:read ] + put: + tags: + - 'galleries' + description: 'Update gallery information.' + responses: + '200': + description: 'The gallery information was updated successfully.' + '400': + description: 'The supplied UUID or JSON was malformed.' + '403': + description: 'User is not authorized to update this gallery.' + '404': + description: 'The UUID does not correspond to an existing gallery.' + '422': + description: 'The gallery was not updated due to a Drupal validation failure or a JSON schema validation failure.' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/gallery-schema-update' + required: true + security: + - SessionCookieHeader: [] + - APIKeyHeader: [] + - CognitoJwt: [ invotra/galleries:write ] delete: tags: - galleries @@ -13119,6 +13177,185 @@ components: description: 'The timestamp of the schedule date (in seconds). If present the content is scheduled for a workflow state change, if not, the workflow state will be changed immediately.' type: integer example: 1510941596 + gallery-schema-update: + allOf: + - $ref: '#/components/schemas/gallery-schema-common' + - type: object + properties: + schedule_date_timestamp: + description: 'The timestamp of the schedule date (in seconds). If present the content is scheduled for a workflow state change, if not, the workflow state will be changed immediately.' + type: integer + example: 1510941596 + site_section: + description: 'The site section of this gallery.' + type: object + properties: + uuid: + description: 'Invotra UUID of the site section.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + image: + description: 'The image for this gallery.' + type: object + properties: + uuid: + description: 'Invotra UUID of the image.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + author: + description: 'The author of this gallery. (Will use the authenticated user if not supplied.' + type: object + properties: + uuid: + description: 'Invotra UUID of the user.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + owner: + description: 'The owner of this gallery.' + type: object + properties: + uuid: + description: 'Invotra UUID of the user.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + team: + description: 'The team targeting this gallery.' + type: object + properties: + uuid: + description: 'Invotra UUID of the team.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + locations: + description: 'The locations targeting this gallery.' + type: array + items: + type: object + properties: + uuid: + description: 'Invotra UUID of the location.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + grades: + description: 'The grades targeting this gallery.' + type: array + items: + type: object + properties: + uuid: + description: 'Invotra UUID of the grade.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + regions: + description: 'The regions targeting this gallery.' + type: array + items: + type: object + properties: + uuid: + description: 'Invotra UUID of the region.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + gallery-schema-create: + allOf: + - $ref: '#/components/schemas/gallery-schema-common' + - type: object + required: + - title + - body + - state + - site_section + properties: + schedule_date_timestamp: + description: 'The timestamp of the schedule date (in seconds). If present the content is scheduled for a workflow state change, if not, the workflow state will be changed immediately.' + type: integer + example: 1510941596 + site_section: + description: 'The site section of this gallery.' + type: object + properties: + uuid: + description: 'Invotra UUID of the site section.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + image: + description: 'The image for this gallery.' + type: object + properties: + uuid: + description: 'Invotra UUID of the image.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + author: + description: 'The author of this gallery. (Will use the authenticated user if not supplied.' + type: object + properties: + uuid: + description: 'Invotra UUID of the user.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + owner: + description: 'The owner of this gallery.' + type: object + properties: + uuid: + description: 'Invotra UUID of the user.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + team: + description: 'The team targeting this gallery.' + type: object + properties: + uuid: + description: 'Invotra UUID of the team.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + locations: + description: 'The locations targeting this gallery.' + type: array + items: + type: object + properties: + uuid: + description: 'Invotra UUID of the location.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + grades: + description: 'The grades targeting this gallery.' + type: array + items: + type: object + properties: + uuid: + description: 'Invotra UUID of the grade.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + regions: + description: 'The regions targeting this gallery.' + type: array + items: + type: object + properties: + uuid: + description: 'Invotra UUID of the region.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' gallery-schema-common: type: object properties: From f19094c6d66ef57e77437304428d97c98704c8e5 Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Tue, 16 Mar 2021 10:36:15 +0000 Subject: [PATCH 14/40] Ideas EPs --- api.swagger.yaml | 135 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) diff --git a/api.swagger.yaml b/api.swagger.yaml index 832af49e..ef0f6766 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -3674,6 +3674,39 @@ paths: - SessionCookieHeader: [] - APIKeyHeader: [] - CognitoJwt: [ invotra/group_polls:write ] + '/ideas': + post: + tags: + - 'ideas' + description: 'Provision a new idea.' + responses: + '201': + description: 'The idea was created successfully.' + headers: + Location: + description: 'The URL at which the newly provisioned idea may be retrieved.' + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/successful-post-response-schema' + '400': + description: 'The idea was not saved due to malformed JSON.' + '403': + description: 'User is not authorized to create a idea.' + '422': + description: 'The idea was not saved due to Drupal validation failure or JSON schema validation failure.' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/idea-schema-create' + required: true + security: + - SessionCookieHeader: [] + - APIKeyHeader: [] + - CognitoJwt: [ invotra/ideas:write ] '/ideas/list': get: tags: @@ -3772,6 +3805,31 @@ paths: - SessionCookieHeader: [] - APIKeyHeader: [] - CognitoJwt: [ invotra/ideas:read ] + put: + tags: + - 'ideas' + description: 'Update idea information.' + responses: + '200': + description: 'The idea information was updated successfully.' + '400': + description: 'The supplied UUID or JSON was malformed.' + '403': + description: 'User is not authorized to update this idea.' + '404': + description: 'The UUID does not correspond to an existing idea.' + '422': + description: 'The idea was not updated due to a Drupal validation failure or a JSON schema validation failure.' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/idea-schema-update' + required: true + security: + - SessionCookieHeader: [] + - APIKeyHeader: [] + - CognitoJwt: [ invotra/ideas:write ] delete: tags: - 'ideas' @@ -13784,6 +13842,83 @@ components: description: 'Count of likes on the idea.' type: integer example: 5 + idea-schema-update: + allOf: + - $ref: '#/components/schemas/idea-schema-common' + - type: object + properties: + schedule_date_timestamp: + description: 'The timestamp of the schedule date (in seconds). If present the content is scheduled for a workflow state change, if not, the workflow state will be changed immediately.' + type: integer + example: 1510941596 + idea_category: + description: 'The idea category.' + type: object + properties: + uuid: + description: 'Invotra UUID of the idea category.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + author: + description: 'The author of this idea. (Will use the authenticated user if not supplied.' + type: object + properties: + uuid: + description: 'Invotra UUID of the user.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + idea_assignee: + description: 'The assignee user of the idea.' + type: object + properties: + uuid: + description: 'Invotra UUID of the user.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + idea-schema-create: + allOf: + - $ref: '#/components/schemas/idea-schema-common' + - type: object + required: + - title + - body + - state + - site_section + properties: + schedule_date_timestamp: + description: 'The timestamp of the schedule date (in seconds). If present the content is scheduled for a workflow state change, if not, the workflow state will be changed immediately.' + type: integer + example: 1510941596 + idea_category: + description: 'The idea category.' + type: object + properties: + uuid: + description: 'Invotra UUID of the idea category.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + author: + description: 'The author of this idea. (Will use the authenticated user if not supplied.' + type: object + properties: + uuid: + description: 'Invotra UUID of the user.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + idea_assignee: + description: 'The assignee user of the idea.' + type: object + properties: + uuid: + description: 'Invotra UUID of the user.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' idea-schema-common: type: object properties: From 30cce62b1541bda43df5a4ebdfb121a3383380ce Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Tue, 16 Mar 2021 11:14:12 +0000 Subject: [PATCH 15/40] Queries EPs --- api.swagger.yaml | 127 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) diff --git a/api.swagger.yaml b/api.swagger.yaml index ef0f6766..2b6ec8d3 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -5283,6 +5283,39 @@ paths: - SessionCookieHeader: [] - APIKeyHeader: [] - CognitoJwt: [ invotra/promotions:write ] + '/queries': + post: + tags: + - 'queries' + description: 'Provision a new query.' + responses: + '201': + description: 'The query was created successfully.' + headers: + Location: + description: 'The URL at which the newly provisioned query may be retrieved.' + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/successful-post-response-schema' + '400': + description: 'The query was not saved due to malformed JSON.' + '403': + description: 'User is not authorized to create a query.' + '422': + description: 'The query was not saved due to Drupal validation failure or JSON schema validation failure.' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/query-schema-create' + required: true + security: + - SessionCookieHeader: [] + - APIKeyHeader: [] + - CognitoJwt: [ invotra/queries:write ] '/queries/list': get: tags: @@ -5381,6 +5414,31 @@ paths: - SessionCookieHeader: [] - APIKeyHeader: [] - CognitoJwt: [ invotra/queries:read ] + put: + tags: + - 'queries' + description: 'Update query information.' + responses: + '200': + description: 'The query information was updated successfully.' + '400': + description: 'The supplied UUID or JSON was malformed.' + '403': + description: 'User is not authorized to update this query.' + '404': + description: 'The UUID does not correspond to an existing query.' + '422': + description: 'The query was not updated due to a Drupal validation failure or a JSON schema validation failure.' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/query-schema-update' + required: true + security: + - SessionCookieHeader: [] + - APIKeyHeader: [] + - CognitoJwt: [ invotra/queries:write ] delete: tags: - 'queries' @@ -16891,6 +16949,75 @@ components: description: 'Count of likes on the query.' type: integer example: 5 + query-schema-update: + allOf: + - $ref: '#/components/schemas/query-schema-common' + - type: object + properties: + query_assignee: + description: 'The assignee user of the query.' + type: object + properties: + uuid: + description: 'Invotra UUID of the user.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + author: + description: 'The author of this query.' + type: object + properties: + uuid: + description: 'Invotra UUID of the user.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + query_category: + description: 'The category of the query.' + type: object + properties: + uuid: + description: 'Invotra UUID of the category.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + query-schema-create: + allOf: + - $ref: '#/components/schemas/query-schema-common' + - type: object + required: + - title + - body + - query_assignee + - query_category + properties: + query_assignee: + description: 'The assignee user of the query.' + type: object + properties: + uuid: + description: 'Invotra UUID of the user.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + author: + description: 'The author of this query.' + type: object + properties: + uuid: + description: 'Invotra UUID of the user.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + query_category: + description: 'The category of the query.' + type: object + properties: + uuid: + description: 'Invotra UUID of the category.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' query-schema-common: type: object properties: From f7db3b90037688e3b677a096208106678a12ac57 Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Tue, 16 Mar 2021 11:51:44 +0000 Subject: [PATCH 16/40] Maunals PUT --- api.swagger.yaml | 299 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 225 insertions(+), 74 deletions(-) diff --git a/api.swagger.yaml b/api.swagger.yaml index 2b6ec8d3..490abfee 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -5456,6 +5456,39 @@ paths: - SessionCookieHeader: [] - APIKeyHeader: [] - CognitoJwt: [ invotra/queries:write ] + '/support_tickets': + post: + tags: + - 'support tickets' + description: 'Provision a new support ticket.' + responses: + '201': + description: 'The support ticket was created successfully.' + headers: + Location: + description: 'The URL at which the newly provisioned support ticket may be retrieved.' + schema: + type: string + content: + application/json: + schema: + $ref: '#/components/schemas/successful-post-response-schema' + '400': + description: 'The support ticket was not saved due to malformed JSON.' + '403': + description: 'User is not authorized to create a support ticket.' + '422': + description: 'The support ticket was not saved due to Drupal validation failure or JSON schema validation failure.' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/support-ticket-schema-create' + required: true + security: + - SessionCookieHeader: [] + - APIKeyHeader: [] + - CognitoJwt: [ invotra/support_tickets:write ] '/support_tickets/list': get: tags: @@ -5554,6 +5587,31 @@ paths: - SessionCookieHeader: [] - APIKeyHeader: [] - CognitoJwt: [ invotra/support_tickets:read ] + put: + tags: + - 'support tickets' + description: 'Update support ticket information.' + responses: + '200': + description: 'The support ticket information was updated successfully.' + '400': + description: 'The supplied UUID or JSON was malformed.' + '403': + description: 'User is not authorized to update this support ticket.' + '404': + description: 'The UUID does not correspond to an existing support ticket.' + '422': + description: 'The support ticket was not updated due to a Drupal validation failure or a JSON schema validation failure.' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/support-ticket-schema-update' + required: true + security: + - SessionCookieHeader: [] + - APIKeyHeader: [] + - CognitoJwt: [ invotra/support_tickets:write ] delete: tags: - 'support tickets' @@ -5811,6 +5869,31 @@ paths: - SessionCookieHeader: [] - APIKeyHeader: [] - CognitoJwt: [ invotra/manuals:read ] + put: + tags: + - 'manuals' + description: 'Update manual page information, including the root manual page.' + responses: + '200': + description: 'The manual page information was updated successfully.' + '400': + description: 'The supplied UUID or JSON was malformed.' + '403': + description: 'User is not authorized to update this manual page.' + '404': + description: 'The UUID does not correspond to an existing manual page.' + '422': + description: 'The manual page was not updated due to a Drupal validation failure or a JSON schema validation failure.' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/manual-page-schema-update' + required: true + security: + - SessionCookieHeader: [] + - APIKeyHeader: [] + - CognitoJwt: [ invotra/manuals:write ] delete: tags: - manuals @@ -17064,6 +17147,37 @@ components: description: 'Count of comments on the support ticket.' type: integer example: 5 + support-ticket-schema-update: + allOf: + - $ref: '#/components/schemas/support-ticket-schema-common' + - type: object + properties: + author: + description: 'The author of this support ticket.' + type: object + properties: + uuid: + description: 'Invotra UUID of the user.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + support-ticket-schema-create: + allOf: + - $ref: '#/components/schemas/support-ticket-schema-common' + - type: object + required: + - title + - body + properties: + author: + description: 'The author of this support ticket.' + type: object + properties: + uuid: + description: 'Invotra UUID of the user.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' support-ticket-schema-common: type: object properties: @@ -17651,24 +17765,117 @@ components: type: string example: Code of Conduct manual-page-schema: + allOf: + - $ref: '#/components/schemas/manual-page-schema-common' + - type: object + properties: + uuid: + description: Invotra UUID of the manual page. + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + author: + description: 'The author of this manual page.' + type: object + allOf: + - $ref: '#/components/schemas/user-trimmed-schema' + image: + description: 'Image for the manual page.' + type: object + allOf: + - $ref: '#/components/schemas/file-schema' + timestamp_created: + description: This is the timestamp (in seconds) of when the manual page was created + type: integer + example: 1510941596 + timestamp_updated: + description: This is the timestamp (in seconds) of when the manual page was last updated + type: integer + example: 1510941696 + timestamp_published: + description: 'This is the timestamp (in seconds) of when the manual page was published.' + type: integer + example: 1510941696 + published: + description: 'Published status for the manual page.' + type: boolean + example: true + rating: + description: 'The mean average rating as a percentage calculated from all the ratings cast against this manual page.' + type: integer + example: 63 + attachments: + description: List of attachments on manual page + type: array + items: + allOf: + - $ref: '#/components/schemas/file-schema' + parent_page_uuid: + description: Invotra UUID of the parent manual page (empty at root). + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + child_pages_count: + description: Total count of child pages across all sections on this level of the manual hierarchy + type: integer + example: 50 + child_sections: + description: The manual sections of child manual pages + type: array + items: + type: object + properties: + section_name: + description: Manual page section name + type: string + example: Appendix + child_pages: + description: Manual child pages in section + type: array + items: + type: object + properties: + uuid: + description: Invotra UUID of the child manual page + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + title: + description: Title of child manual page + type: string + example: Appendix A - Acronyms + manual-page-schema-update: + allOf: + - $ref: '#/components/schemas/manual-page-schema-common' + - type: object + properties: + author: + description: 'The author of this manual page.' + type: object + properties: + uuid: + description: 'Invotra UUID of the user.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + image: + description: 'Image for the manual page.' + type: object + properties: + uuid: + description: 'Invotra UUID of the image.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + manual-page-schema-common: type: object properties: - uuid: - description: Invotra UUID of the manual page. - type: string - format: uuid - example: '01234567-89ab-cdef-1234-56789abcdef0' author_uuid: description: The uuid of the author type: string format: uuid example: 01234567-89ab-cdef-1234-56789abcdef0 deprecated: true - author: - description: 'The author of this manual page.' - type: object - allOf: - - $ref: '#/components/schemas/user-trimmed-schema' title: description: Title of the manual page type: string @@ -17681,11 +17888,6 @@ components: description: The main body text contents of the manual page type: string example: The full body describing Code of Conduct. - image: - description: 'Image for the manual page.' - type: object - allOf: - - $ref: '#/components/schemas/file-schema' site_section: description: Invotra UUID of site section of the manual page type: string @@ -17695,66 +17897,15 @@ components: description: Reference for the manual page type: string example: 'CCM-1' - timestamp_created: - description: This is the timestamp (in seconds) of when the manual page was created - type: integer - example: 1510941596 - timestamp_updated: - description: This is the timestamp (in seconds) of when the manual page was last updated - type: integer - example: 1510941696 - timestamp_published: - description: 'This is the timestamp (in seconds) of when the manual page was published.' - type: integer - example: 1510941696 - published: - description: 'Published status for the manual page.' - type: boolean - example: true - rating: - description: 'The mean average rating as a percentage calculated from all the ratings cast against this manual page.' - type: integer - example: 63 - attachments: - description: List of attachments on manual page - type: array - items: - allOf: - - $ref: '#/components/schemas/file-schema' - parent_page_uuid: - description: Invotra UUID of the parent manual page (empty at root). + state: + description: 'Indicates the workflow state of the manual page.' type: string - format: uuid - example: '01234567-89ab-cdef-1234-56789abcdef0' - child_pages_count: - description: Total count of child pages across all sections on this level of the manual hierarchy - type: integer - example: 50 - child_sections: - description: The manual sections of child manual pages - type: array - items: - type: object - properties: - section_name: - description: Manual page section name - type: string - example: Appendix - child_pages: - description: Manual child pages in section - type: array - items: - type: object - properties: - uuid: - description: Invotra UUID of the child manual page - type: string - format: uuid - example: '01234567-89ab-cdef-1234-56789abcdef0' - title: - description: Title of child manual page - type: string - example: Appendix A - Acronyms + enum: + - 'draft' + - 'needs_review' + - 'reviewed' + - 'published' + - 'unpublished' comment-schema: allOf: - $ref: '#/components/schemas/comment-schema-common' From 6e717d7fce23cafe9994e7be2ca9ca5557cc8608 Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Mon, 22 Mar 2021 15:14:40 +0000 Subject: [PATCH 17/40] add filename_fulltext_search --- api.swagger.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api.swagger.yaml b/api.swagger.yaml index 490abfee..5c12605d 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -6204,6 +6204,12 @@ paths: schema: type: string example: 'wallpaper.jpeg' + - description: 'Search within filename. Matches on whole words.' + in: query + name: filename_fulltext_search + schema: + type: string + example: 'wallpaper' - name: type description: 'Filter by file type.' in: query From 67eafeaf17704e1b7f31027b3a294ca477395cea Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Thu, 1 Apr 2021 15:38:38 +0100 Subject: [PATCH 18/40] Make 3x references read only --- api.swagger.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/api.swagger.yaml b/api.swagger.yaml index 5c12605d..e3c1ce2c 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -13973,6 +13973,10 @@ components: type: object allOf: - $ref: '#/components/schemas/user-trimmed-schema' + idea_reference: + description: 'The idea reference (read only automatically generated).' + type: string + example: 'I123' timestamp_created: description: 'This is the timestamp (in seconds) of when the idea was created.' type: integer @@ -14077,10 +14081,6 @@ components: description: 'The body of the idea.' type: string example: 'You can create strong passwords using an online random password generator.' - idea_reference: - description: 'The idea reference.' - type: string - example: 'I123' list-schema: allOf: - $ref: '#/components/schemas/list-schema-common' @@ -17022,6 +17022,10 @@ components: type: object allOf: - $ref: '#/components/schemas/user-trimmed-schema' + query_reference: + description: 'The query reference (read only automatically generated).' + type: string + example: 'Q123' timestamp_created: description: 'This is the timestamp (in seconds) of when the query was created.' type: integer @@ -17118,10 +17122,6 @@ components: description: 'The body of the query.' type: string example: 'Demonstrate your talent at the company talent competition.' - query_reference: - description: 'The query reference.' - type: string - example: 'Q123' review_date_timestamp: description: 'The review date timestamp for the query (in seconds).' type: integer @@ -17141,6 +17141,10 @@ components: type: object allOf: - $ref: '#/components/schemas/user-trimmed-schema' + support_ticket_reference: + description: 'The support ticket reference.' + type: string + example: 'SUP123' timestamp_created: description: 'This is the timestamp (in seconds) of when the support ticket was created.' type: integer @@ -17195,10 +17199,6 @@ components: description: 'The body of the support ticket.' type: string example: 'The website is broken can someone please take a look.' - support_ticket_reference: - description: 'The support ticket reference.' - type: string - example: 'SUP123' review_date_timestamp: description: 'The review date timestamp for the support ticket (in seconds).' type: integer From 8bffeb0e180fbdf73644dfd26de5633a3f06dc38 Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Mon, 5 Apr 2021 10:46:34 +0100 Subject: [PATCH 19/40] support_ticket PUT author only --- api.swagger.yaml | 74 +++++++----------------------------------------- 1 file changed, 11 insertions(+), 63 deletions(-) diff --git a/api.swagger.yaml b/api.swagger.yaml index e3c1ce2c..c22c1185 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -5456,39 +5456,6 @@ paths: - SessionCookieHeader: [] - APIKeyHeader: [] - CognitoJwt: [ invotra/queries:write ] - '/support_tickets': - post: - tags: - - 'support tickets' - description: 'Provision a new support ticket.' - responses: - '201': - description: 'The support ticket was created successfully.' - headers: - Location: - description: 'The URL at which the newly provisioned support ticket may be retrieved.' - schema: - type: string - content: - application/json: - schema: - $ref: '#/components/schemas/successful-post-response-schema' - '400': - description: 'The support ticket was not saved due to malformed JSON.' - '403': - description: 'User is not authorized to create a support ticket.' - '422': - description: 'The support ticket was not saved due to Drupal validation failure or JSON schema validation failure.' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/support-ticket-schema-create' - required: true - security: - - SessionCookieHeader: [] - - APIKeyHeader: [] - - CognitoJwt: [ invotra/support_tickets:write ] '/support_tickets/list': get: tags: @@ -17142,7 +17109,7 @@ components: allOf: - $ref: '#/components/schemas/user-trimmed-schema' support_ticket_reference: - description: 'The support ticket reference.' + description: 'The support ticket reference (read only automatically generated).' type: string example: 'SUP123' timestamp_created: @@ -17158,36 +17125,17 @@ components: type: integer example: 5 support-ticket-schema-update: - allOf: - - $ref: '#/components/schemas/support-ticket-schema-common' - - type: object - properties: - author: - description: 'The author of this support ticket.' - type: object - properties: - uuid: - description: 'Invotra UUID of the user.' - type: string - format: uuid - example: '01234567-89ab-cdef-1234-56789abcdef0' - support-ticket-schema-create: - allOf: - - $ref: '#/components/schemas/support-ticket-schema-common' - - type: object - required: - - title - - body + type: object + properties: + author: + description: 'The author of this support ticket.' + type: object properties: - author: - description: 'The author of this support ticket.' - type: object - properties: - uuid: - description: 'Invotra UUID of the user.' - type: string - format: uuid - example: '01234567-89ab-cdef-1234-56789abcdef0' + uuid: + description: 'Invotra UUID of the user.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' support-ticket-schema-common: type: object properties: From c2474f999509c2fb03e62ea742ed0907e1e6acea Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Mon, 5 Apr 2021 11:54:15 +0100 Subject: [PATCH 20/40] ideas PUT author,state only --- api.swagger.yaml | 138 +++++++++++------------------------------------ 1 file changed, 30 insertions(+), 108 deletions(-) diff --git a/api.swagger.yaml b/api.swagger.yaml index c22c1185..3a6ae169 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -3674,39 +3674,6 @@ paths: - SessionCookieHeader: [] - APIKeyHeader: [] - CognitoJwt: [ invotra/group_polls:write ] - '/ideas': - post: - tags: - - 'ideas' - description: 'Provision a new idea.' - responses: - '201': - description: 'The idea was created successfully.' - headers: - Location: - description: 'The URL at which the newly provisioned idea may be retrieved.' - schema: - type: string - content: - application/json: - schema: - $ref: '#/components/schemas/successful-post-response-schema' - '400': - description: 'The idea was not saved due to malformed JSON.' - '403': - description: 'User is not authorized to create a idea.' - '422': - description: 'The idea was not saved due to Drupal validation failure or JSON schema validation failure.' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/idea-schema-create' - required: true - security: - - SessionCookieHeader: [] - - APIKeyHeader: [] - - CognitoJwt: [ invotra/ideas:write ] '/ideas/list': get: tags: @@ -3732,6 +3699,12 @@ paths: schema: type: string example: '2012-12-25' + - name: state + description: 'Filter the list of group documents on a comma seperated list of statuses. Valid statuses are "draft", "published" and "unpublished", you may inlude both. The default when not supplied is "published" only.' + in: query + schema: + type: string + example: 'unpublished' - name: sort description: 'Field to sort by.' in: query @@ -13961,82 +13934,24 @@ components: type: integer example: 5 idea-schema-update: - allOf: - - $ref: '#/components/schemas/idea-schema-common' - - type: object - properties: - schedule_date_timestamp: - description: 'The timestamp of the schedule date (in seconds). If present the content is scheduled for a workflow state change, if not, the workflow state will be changed immediately.' - type: integer - example: 1510941596 - idea_category: - description: 'The idea category.' - type: object - properties: - uuid: - description: 'Invotra UUID of the idea category.' - type: string - format: uuid - example: '01234567-89ab-cdef-1234-56789abcdef0' - author: - description: 'The author of this idea. (Will use the authenticated user if not supplied.' - type: object - properties: - uuid: - description: 'Invotra UUID of the user.' - type: string - format: uuid - example: '01234567-89ab-cdef-1234-56789abcdef0' - idea_assignee: - description: 'The assignee user of the idea.' - type: object - properties: - uuid: - description: 'Invotra UUID of the user.' - type: string - format: uuid - example: '01234567-89ab-cdef-1234-56789abcdef0' - idea-schema-create: - allOf: - - $ref: '#/components/schemas/idea-schema-common' - - type: object - required: - - title - - body - - state - - site_section + type: object + properties: + author: + description: 'The author of this idea. (Will use the authenticated user if not supplied.' + type: object properties: - schedule_date_timestamp: - description: 'The timestamp of the schedule date (in seconds). If present the content is scheduled for a workflow state change, if not, the workflow state will be changed immediately.' - type: integer - example: 1510941596 - idea_category: - description: 'The idea category.' - type: object - properties: - uuid: - description: 'Invotra UUID of the idea category.' - type: string - format: uuid - example: '01234567-89ab-cdef-1234-56789abcdef0' - author: - description: 'The author of this idea. (Will use the authenticated user if not supplied.' - type: object - properties: - uuid: - description: 'Invotra UUID of the user.' - type: string - format: uuid - example: '01234567-89ab-cdef-1234-56789abcdef0' - idea_assignee: - description: 'The assignee user of the idea.' - type: object - properties: - uuid: - description: 'Invotra UUID of the user.' - type: string - format: uuid - example: '01234567-89ab-cdef-1234-56789abcdef0' + uuid: + description: 'Invotra UUID of the user.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + state: + description: 'Indicates the workflow state of the idea.' + type: string + enum: + - 'draft' + - 'published' + - 'unpublished' idea-schema-common: type: object properties: @@ -14048,6 +13963,13 @@ components: description: 'The body of the idea.' type: string example: 'You can create strong passwords using an online random password generator.' + state: + description: 'Indicates the workflow state of the idea.' + type: string + enum: + - 'draft' + - 'published' + - 'unpublished' list-schema: allOf: - $ref: '#/components/schemas/list-schema-common' From a60852af837733c22dacc16e36201c0080e7d407 Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Mon, 5 Apr 2021 12:17:02 +0100 Subject: [PATCH 21/40] queries PUT author,state only --- api.swagger.yaml | 134 ++++++++++++----------------------------------- 1 file changed, 33 insertions(+), 101 deletions(-) diff --git a/api.swagger.yaml b/api.swagger.yaml index 3a6ae169..6a17a2f4 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -3700,7 +3700,7 @@ paths: type: string example: '2012-12-25' - name: state - description: 'Filter the list of group documents on a comma seperated list of statuses. Valid statuses are "draft", "published" and "unpublished", you may inlude both. The default when not supplied is "published" only.' + description: 'Filter the list of ideas on a comma seperated list of statuses. Valid statuses are "draft", "published" and "unpublished", you may inlude both. The default when not supplied is "published" only.' in: query schema: type: string @@ -5256,39 +5256,6 @@ paths: - SessionCookieHeader: [] - APIKeyHeader: [] - CognitoJwt: [ invotra/promotions:write ] - '/queries': - post: - tags: - - 'queries' - description: 'Provision a new query.' - responses: - '201': - description: 'The query was created successfully.' - headers: - Location: - description: 'The URL at which the newly provisioned query may be retrieved.' - schema: - type: string - content: - application/json: - schema: - $ref: '#/components/schemas/successful-post-response-schema' - '400': - description: 'The query was not saved due to malformed JSON.' - '403': - description: 'User is not authorized to create a query.' - '422': - description: 'The query was not saved due to Drupal validation failure or JSON schema validation failure.' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/query-schema-create' - required: true - security: - - SessionCookieHeader: [] - - APIKeyHeader: [] - - CognitoJwt: [ invotra/queries:write ] '/queries/list': get: tags: @@ -5314,6 +5281,12 @@ paths: schema: type: string example: '2012-12-25' + - name: state + description: 'Filter the list of queries on a comma-separated list of states. Valid statuses are "draft", "published", and "unpublished". You may include multiple. The default when not supplied is "published" only.' + in: query + schema: + type: string + example: 'unpublished' - name: sort description: 'Field to sort by.' in: query @@ -16932,74 +16905,24 @@ components: type: integer example: 5 query-schema-update: - allOf: - - $ref: '#/components/schemas/query-schema-common' - - type: object - properties: - query_assignee: - description: 'The assignee user of the query.' - type: object - properties: - uuid: - description: 'Invotra UUID of the user.' - type: string - format: uuid - example: '01234567-89ab-cdef-1234-56789abcdef0' - author: - description: 'The author of this query.' - type: object - properties: - uuid: - description: 'Invotra UUID of the user.' - type: string - format: uuid - example: '01234567-89ab-cdef-1234-56789abcdef0' - query_category: - description: 'The category of the query.' - type: object - properties: - uuid: - description: 'Invotra UUID of the category.' - type: string - format: uuid - example: '01234567-89ab-cdef-1234-56789abcdef0' - query-schema-create: - allOf: - - $ref: '#/components/schemas/query-schema-common' - - type: object - required: - - title - - body - - query_assignee - - query_category + type: object + properties: + author: + description: 'The author of this query. (Will use the authenticated user if not supplied.' + type: object properties: - query_assignee: - description: 'The assignee user of the query.' - type: object - properties: - uuid: - description: 'Invotra UUID of the user.' - type: string - format: uuid - example: '01234567-89ab-cdef-1234-56789abcdef0' - author: - description: 'The author of this query.' - type: object - properties: - uuid: - description: 'Invotra UUID of the user.' - type: string - format: uuid - example: '01234567-89ab-cdef-1234-56789abcdef0' - query_category: - description: 'The category of the query.' - type: object - properties: - uuid: - description: 'Invotra UUID of the category.' - type: string - format: uuid - example: '01234567-89ab-cdef-1234-56789abcdef0' + uuid: + description: 'Invotra UUID of the user.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' + state: + description: 'Indicates the workflow state of the query.' + type: string + enum: + - 'draft' + - 'published' + - 'unpublished' query-schema-common: type: object properties: @@ -17011,6 +16934,15 @@ components: description: 'The body of the query.' type: string example: 'Demonstrate your talent at the company talent competition.' + state: + description: 'Indicates the workflow state of the query.' + type: string + enum: + - 'draft' + - 'needs_review' + - 'reviewed' + - 'published' + - 'unpublished' review_date_timestamp: description: 'The review date timestamp for the query (in seconds).' type: integer From b9f3f1ba224fa42e99baf2eab1567d0a41782830 Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Tue, 27 Apr 2021 09:52:13 +0100 Subject: [PATCH 22/40] ideas & queries to only have pub & unpub state --- api.swagger.yaml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/api.swagger.yaml b/api.swagger.yaml index 6a17a2f4..5bec267b 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -3700,7 +3700,7 @@ paths: type: string example: '2012-12-25' - name: state - description: 'Filter the list of ideas on a comma seperated list of statuses. Valid statuses are "draft", "published" and "unpublished", you may inlude both. The default when not supplied is "published" only.' + description: 'Filter the list of ideas on a comma seperated list of statuses. Valid statuses are "published" and "unpublished", you may inlude both. The default when not supplied is "published" only.' in: query schema: type: string @@ -5282,7 +5282,7 @@ paths: type: string example: '2012-12-25' - name: state - description: 'Filter the list of queries on a comma-separated list of states. Valid statuses are "draft", "published", and "unpublished". You may include multiple. The default when not supplied is "published" only.' + description: 'Filter the list of queries on a comma-separated list of states. Valid statuses are "published" and "unpublished". You may include multiple. The default when not supplied is "published" only.' in: query schema: type: string @@ -13922,7 +13922,6 @@ components: description: 'Indicates the workflow state of the idea.' type: string enum: - - 'draft' - 'published' - 'unpublished' idea-schema-common: @@ -13940,7 +13939,6 @@ components: description: 'Indicates the workflow state of the idea.' type: string enum: - - 'draft' - 'published' - 'unpublished' list-schema: @@ -16920,7 +16918,6 @@ components: description: 'Indicates the workflow state of the query.' type: string enum: - - 'draft' - 'published' - 'unpublished' query-schema-common: @@ -16938,9 +16935,6 @@ components: description: 'Indicates the workflow state of the query.' type: string enum: - - 'draft' - - 'needs_review' - - 'reviewed' - 'published' - 'unpublished' review_date_timestamp: From d52e01e4a773693555cf249cfe42cae3cca268f4 Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Tue, 27 Apr 2021 14:57:49 +0100 Subject: [PATCH 23/40] Remove new lines left in error From 05897ed1181f3e1d3b7f5c76bb99cf8780cc5097 Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Wed, 28 Apr 2021 10:28:00 +0100 Subject: [PATCH 24/40] Ideas & queries remove state --- api.swagger.yaml | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/api.swagger.yaml b/api.swagger.yaml index 5bec267b..9f30fd26 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -13918,12 +13918,6 @@ components: type: string format: uuid example: '01234567-89ab-cdef-1234-56789abcdef0' - state: - description: 'Indicates the workflow state of the idea.' - type: string - enum: - - 'published' - - 'unpublished' idea-schema-common: type: object properties: @@ -13935,12 +13929,6 @@ components: description: 'The body of the idea.' type: string example: 'You can create strong passwords using an online random password generator.' - state: - description: 'Indicates the workflow state of the idea.' - type: string - enum: - - 'published' - - 'unpublished' list-schema: allOf: - $ref: '#/components/schemas/list-schema-common' @@ -16914,12 +16902,6 @@ components: type: string format: uuid example: '01234567-89ab-cdef-1234-56789abcdef0' - state: - description: 'Indicates the workflow state of the query.' - type: string - enum: - - 'published' - - 'unpublished' query-schema-common: type: object properties: @@ -16931,12 +16913,6 @@ components: description: 'The body of the query.' type: string example: 'Demonstrate your talent at the company talent competition.' - state: - description: 'Indicates the workflow state of the query.' - type: string - enum: - - 'published' - - 'unpublished' review_date_timestamp: description: 'The review date timestamp for the query (in seconds).' type: integer From eb745075eac48a760abb699094ad86303200792c Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Thu, 29 Apr 2021 12:40:59 +0100 Subject: [PATCH 25/40] split list items schema, manual wording, CT enum --- api.swagger.yaml | 74 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 61 insertions(+), 13 deletions(-) diff --git a/api.swagger.yaml b/api.swagger.yaml index 9f30fd26..ea46166f 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -5810,7 +5810,7 @@ paths: delete: tags: - manuals - description: 'Delete a manual page, including the root manual page.' + description: 'Delete a manual page or a manual.' responses: '200': description: 'The manual page was deleted successfully.' @@ -12571,8 +12571,6 @@ components: enum: - blogs - custom_content - - events - - forums - galleries - group_documents - group_polls @@ -13943,6 +13941,16 @@ components: description: 'Summary text of the list.' type: string example: 'You can create strong passwords.' + list: + description: 'List of content and links in the list.' + type: array + items: + anyOf: + - $ref: '#/components/schemas/list-list-content-schema' + - $ref: '#/components/schemas/list-list-site-section-schema' + - $ref: '#/components/schemas/list-list-link-schema' + discriminator: + propertyName: type site_section: description: 'The site section of this list.' type: object @@ -14071,6 +14079,16 @@ components: - $ref: '#/components/schemas/list-schema-common' - type: object properties: + list: + description: 'List of content and links in the list.' + type: array + items: + anyOf: + - $ref: '#/components/schemas/list-list-content-schema-write' + - $ref: '#/components/schemas/list-list-site-section-schema-write' + - $ref: '#/components/schemas/list-list-link-schema' + discriminator: + propertyName: type site_section: description: 'The site section of this list.' type: object @@ -14147,6 +14165,16 @@ components: - $ref: '#/components/schemas/list-schema-common' - type: object properties: + list: + description: 'List of content and links in the list.' + type: array + items: + anyOf: + - $ref: '#/components/schemas/list-list-content-schema-write' + - $ref: '#/components/schemas/list-list-site-section-schema-write' + - $ref: '#/components/schemas/list-list-link-schema' + discriminator: + propertyName: type site_section: description: 'The site section of this list.' type: object @@ -14246,16 +14274,6 @@ components: description: 'The review date timestamp for the list (in seconds). The review date is mandatory if configured to be in Invotra admin.' type: integer example: 1510941596 - list: - description: 'List of content and links in the list.' - type: array - items: - anyOf: - - $ref: '#/components/schemas/list-list-content-schema' - - $ref: '#/components/schemas/list-list-site-section-schema' - - $ref: '#/components/schemas/list-list-link-schema' - discriminator: - propertyName: type list-list-common-schema: type: object required: @@ -14288,6 +14306,21 @@ components: type: string example: 'https://dev.invotra.com/api/0.3/blogs/01234567-89ab-cdef-1234-56789abcdef0' format: uri + list-list-content-schema-write: + allOf: + - $ref: '#/components/schemas/list-list-common-schema' + - type: object + properties: + type: + example: 'content' + content: + type: object + properties: + uuid: + description: 'Invotra UUID of the content.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' list-list-site-section-schema: allOf: - $ref: '#/components/schemas/list-list-common-schema' @@ -14308,6 +14341,21 @@ components: type: string example: 'https://dev.invotra.com/api/0.3/site_sections/01234567-89ab-cdef-1234-56789abcdef0' format: uri + list-list-site-section-schema-write: + allOf: + - $ref: '#/components/schemas/list-list-common-schema' + - type: object + properties: + type: + example: 'site_section' + content: + type: object + properties: + uuid: + description: 'Invotra UUID of the site section.' + type: string + format: uuid + example: '01234567-89ab-cdef-1234-56789abcdef0' list-list-link-schema: allOf: - $ref: '#/components/schemas/list-list-common-schema' From 27238f3e56e9b5afbb4956197e8e7ff1a145abc4 Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Fri, 21 May 2021 12:53:19 +0100 Subject: [PATCH 26/40] Add manual page count, and 422 on manual delete --- api.swagger.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/api.swagger.yaml b/api.swagger.yaml index ea46166f..b4ae0b84 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -5820,6 +5820,8 @@ paths: description: 'The user does not have permission to delete the manual page.' '404': description: 'The UUID does not correspond to an existing manual page.' + '422': + description: 'The manual was not deleted due to it having pages.' security: - SessionCookieHeader: [] - APIKeyHeader: [] @@ -17555,6 +17557,10 @@ components: type: object allOf: - $ref: '#/components/schemas/file-schema' + child_pages_count: + description: Total count of child pages at the top level of the manual. + type: integer + example: 50 timestamp_published: description: 'This is the timestamp (in seconds) of when the manual was published.' type: integer From c089242cae1005cbc3f323bcdc923efe25bb9398 Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Tue, 15 Jun 2021 16:34:41 +0100 Subject: [PATCH 27/40] manuals make author readony & owner updatable --- api.swagger.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/api.swagger.yaml b/api.swagger.yaml index 60ab5fe3..c933c65b 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -17871,6 +17871,11 @@ components: type: object allOf: - $ref: '#/components/schemas/user-trimmed-schema' + owner: + description: 'The owner of this manual page.' + type: object + allOf: + - $ref: '#/components/schemas/user-trimmed-schema' image: description: 'Image for the manual page.' type: object @@ -17941,8 +17946,8 @@ components: - $ref: '#/components/schemas/manual-page-schema-common' - type: object properties: - author: - description: 'The author of this manual page.' + owner: + description: 'The owner of this manual page.' type: object properties: uuid: From 2c1b37631e40d37e2d7d9ebbe6d68ecc6054ea04 Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Wed, 16 Jun 2021 14:34:03 +0100 Subject: [PATCH 28/40] INVGOV-13581 API content types owner/author trimmed user schema remove --- api.swagger.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/api.swagger.yaml b/api.swagger.yaml index 2d5c5c6e..03ed73ba 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -16799,11 +16799,6 @@ components: description: The user's username type: string example: Dorothy Whitehead - title: - description: "The user's title. A title object." - type: object - allOf: - - $ref: '#/components/schemas/title-schema' firstname: description: The user's first name type: string From 95e10b2857a12c6c7d5dac6303bb43fdacdff52a Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Thu, 17 Jun 2021 10:50:31 +0100 Subject: [PATCH 29/40] Add more file types --- api.swagger.yaml | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/api.swagger.yaml b/api.swagger.yaml index c933c65b..120d8879 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -6361,9 +6361,15 @@ paths: items: type: string enum: - - image - - document - audio + - document + - image + - ms_excel + - ms_powerpoint + - ms_word + - open_format_document + - other_document_types + - pdf - video - name: filemime description: 'Filter by file MIME type.' @@ -18158,9 +18164,15 @@ components: description: The type of file type: string enum: - - image - - document - audio + - document + - image + - ms_excel + - ms_powerpoint + - ms_word + - open_format_document + - other_document_types + - pdf - video filemime: description: The MIME type for the file @@ -18213,9 +18225,15 @@ components: description: The type of file. type: string enum: - - image - - document - audio + - document + - image + - ms_excel + - ms_powerpoint + - ms_word + - open_format_document + - other_document_types + - pdf - video filemime: description: The MIME type for the file. If using multipart/form-data this field may be omitted in favour of the subpart Content-Type header. @@ -18256,9 +18274,15 @@ components: description: 'The name of the file type.' type: string enum: - - image - - document - audio + - document + - image + - ms_excel + - ms_powerpoint + - ms_word + - open_format_document + - other_document_types + - pdf - video extentions: description: 'The file extentions permitted within the file type.' From 5b3263cd60c9c82153c1c975fbe7301a4c78e879 Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Thu, 17 Jun 2021 11:26:10 +0100 Subject: [PATCH 30/40] remove document file type, make examples audio --- api.swagger.yaml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/api.swagger.yaml b/api.swagger.yaml index 120d8879..c66b115d 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -6346,13 +6346,13 @@ paths: in: query schema: type: string - example: 'wallpaper.jpeg' + example: 'recording.mp3' - description: 'Search within filename. Matches on whole words.' in: query name: filename_fulltext_search schema: type: string - example: 'wallpaper' + example: 'recording' - name: type description: 'Filter by file type.' in: query @@ -6362,7 +6362,6 @@ paths: type: string enum: - audio - - document - image - ms_excel - ms_powerpoint @@ -6378,7 +6377,7 @@ paths: type: array items: type: string - example: 'image/jpeg' + example: 'audio/mpeg' - name: site_section_uuid description: 'Filter on Invotra UUID of the site section.' in: query @@ -18113,7 +18112,7 @@ components: filename: description: This is the filename type: string - example: wallpaper.jpeg + example: recording.mp3 author: description: 'The author of this file.' allOf: @@ -18165,7 +18164,6 @@ components: type: string enum: - audio - - document - image - ms_excel - ms_powerpoint @@ -18177,7 +18175,7 @@ components: filemime: description: The MIME type for the file type: string - example: image/jpeg + example: audio/mpeg alt_text: description: Alt text for an image. Returned if and only if the type is an image. type: string @@ -18202,7 +18200,7 @@ components: filename: description: This is the filename. If using multipart/form-data this field may be omitted in favour of the 'filename' directive of the subpart Content-Disposition header. type: string - example: wallpaper.jpeg + example: recording.mp3 author: description: 'The author of this file.' type: object @@ -18226,7 +18224,6 @@ components: type: string enum: - audio - - document - image - ms_excel - ms_powerpoint @@ -18238,7 +18235,7 @@ components: filemime: description: The MIME type for the file. If using multipart/form-data this field may be omitted in favour of the subpart Content-Type header. type: string - example: image/jpeg + example: audio/mpeg file: description: Base64 encoded version of the file. type: string @@ -18275,7 +18272,6 @@ components: type: string enum: - audio - - document - image - ms_excel - ms_powerpoint @@ -18289,7 +18285,7 @@ components: type: array items: type: string - example: '.jpg' + example: '.mp3' job-role-schema: allOf: - type: object From 2ba7cda02a34cbd7a14a13e41b87324e0c584338 Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Mon, 21 Jun 2021 15:03:30 +0100 Subject: [PATCH 31/40] revert file types back to 4 original --- api.swagger.yaml | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/api.swagger.yaml b/api.swagger.yaml index bd01461e..8c204ab8 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -6434,12 +6434,7 @@ paths: enum: - audio - image - - ms_excel - - ms_powerpoint - - ms_word - - open_format_document - - other_document_types - - pdf + - document - video - name: filemime description: 'Filter by file MIME type.' @@ -18272,12 +18267,7 @@ components: enum: - audio - image - - ms_excel - - ms_powerpoint - - ms_word - - open_format_document - - other_document_types - - pdf + - document - video filemime: description: The MIME type for the file @@ -18332,12 +18322,7 @@ components: enum: - audio - image - - ms_excel - - ms_powerpoint - - ms_word - - open_format_document - - other_document_types - - pdf + - document - video filemime: description: The MIME type for the file. If using multipart/form-data this field may be omitted in favour of the subpart Content-Type header. @@ -18380,12 +18365,7 @@ components: enum: - audio - image - - ms_excel - - ms_powerpoint - - ms_word - - open_format_document - - other_document_types - - pdf + - document - video extentions: description: 'The file extentions permitted within the file type.' From c17d30d4ffaba03530d0834d9d18937fbf02e399 Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Mon, 21 Jun 2021 15:07:25 +0100 Subject: [PATCH 32/40] 4 file types in alphabetical orderf --- api.swagger.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api.swagger.yaml b/api.swagger.yaml index 8c204ab8..747b9aa7 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -6433,8 +6433,8 @@ paths: type: string enum: - audio - - image - document + - image - video - name: filemime description: 'Filter by file MIME type.' @@ -18266,8 +18266,8 @@ components: type: string enum: - audio - - image - document + - image - video filemime: description: The MIME type for the file @@ -18321,8 +18321,8 @@ components: type: string enum: - audio - - image - document + - image - video filemime: description: The MIME type for the file. If using multipart/form-data this field may be omitted in favour of the subpart Content-Type header. @@ -18364,8 +18364,8 @@ components: type: string enum: - audio - - image - document + - image - video extentions: description: 'The file extentions permitted within the file type.' From adc76a1a725a0a39a97c8fad1c91307d40662bb9 Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Thu, 24 Jun 2021 11:37:56 +0100 Subject: [PATCH 33/40] spell extensions right --- api.swagger.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api.swagger.yaml b/api.swagger.yaml index 747b9aa7..f040b3e7 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -86,10 +86,10 @@ paths: get: tags: - configuration - description: 'List the currently configured file types and extentions.' + description: 'List the currently configured file types and extensions.' responses: '200': - description: 'List of file types and extentions.' + description: 'List of file types and extensions.' content: application/json: schema: @@ -18357,7 +18357,7 @@ components: type: object required: - name - - extentions + - extensions properties: name: description: 'The name of the file type.' @@ -18367,8 +18367,8 @@ components: - document - image - video - extentions: - description: 'The file extentions permitted within the file type.' + extensions: + description: 'The file extensions permitted within the file type.' type: array items: type: string From 80b4a6bd2126a05c788ee7492af41177495d5a0e Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Thu, 24 Jun 2021 14:44:45 +0100 Subject: [PATCH 34/40] put the new file types back --- api.swagger.yaml | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/api.swagger.yaml b/api.swagger.yaml index f040b3e7..3f2b4754 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -86,10 +86,10 @@ paths: get: tags: - configuration - description: 'List the currently configured file types and extensions.' + description: 'List the currently configured file types and extentions.' responses: '200': - description: 'List of file types and extensions.' + description: 'List of file types and extentions.' content: application/json: schema: @@ -6433,8 +6433,13 @@ paths: type: string enum: - audio - - document - image + - ms_excel + - ms_powerpoint + - ms_word + - open_document_format + - other_document_types + - pdf - video - name: filemime description: 'Filter by file MIME type.' @@ -18266,8 +18271,13 @@ components: type: string enum: - audio - - document - image + - ms_excel + - ms_powerpoint + - ms_word + - open_document_format + - other_document_types + - pdf - video filemime: description: The MIME type for the file @@ -18321,8 +18331,13 @@ components: type: string enum: - audio - - document - image + - ms_excel + - ms_powerpoint + - ms_word + - open_document_format + - other_document_types + - pdf - video filemime: description: The MIME type for the file. If using multipart/form-data this field may be omitted in favour of the subpart Content-Type header. @@ -18357,18 +18372,23 @@ components: type: object required: - name - - extensions + - extentions properties: name: description: 'The name of the file type.' type: string enum: - audio - - document - image + - ms_excel + - ms_powerpoint + - ms_word + - open_document_format + - other_document_types + - pdf - video - extensions: - description: 'The file extensions permitted within the file type.' + extentions: + description: 'The file extentions permitted within the file type.' type: array items: type: string From 15facbfdc460405c7d7a811b36e21dca50f4abf9 Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Thu, 24 Jun 2021 14:49:15 +0100 Subject: [PATCH 35/40] spell extensions right (again) --- api.swagger.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api.swagger.yaml b/api.swagger.yaml index 3f2b4754..4a993232 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -86,10 +86,10 @@ paths: get: tags: - configuration - description: 'List the currently configured file types and extentions.' + description: 'List the currently configured file types and extensions.' responses: '200': - description: 'List of file types and extentions.' + description: 'List of file types and extensions.' content: application/json: schema: @@ -18372,7 +18372,7 @@ components: type: object required: - name - - extentions + - extensions properties: name: description: 'The name of the file type.' @@ -18387,8 +18387,8 @@ components: - other_document_types - pdf - video - extentions: - description: 'The file extentions permitted within the file type.' + extensions: + description: 'The file extensions permitted within the file type.' type: array items: type: string From 4ddf5fcf77f757bc7b3dc28c39ff5acb2372c786 Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Thu, 24 Jun 2021 17:41:18 +0100 Subject: [PATCH 36/40] Add file types facets --- api.swagger.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/api.swagger.yaml b/api.swagger.yaml index 4a993232..7cfb53e9 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -6545,6 +6545,8 @@ paths: description: 'Count of results.' type: integer example: 50 + facets: + $ref: '#/components/schemas/file-facets-schema' results: description: 'The results set.' type: array @@ -18368,6 +18370,39 @@ components: type: string author: description: 'The author of this file. (Will use the authenticated user if not supplied.' + file-facets-schema: + description: 'Facet counts for the list of files.' + type: object + required: + - types + properties: + types: + type: array + items: + type: object + required: + - facet_count + - data + properties: + facet_count: + description: 'The facet count for this file type.' + type: integer + example: 33 + data: + type: object + properties: + type: + type: string + enum: + - audio + - image + - ms_excel + - ms_powerpoint + - ms_word + - open_document_format + - other_document_types + - pdf + - video file-type-configuration-schema: type: object required: From 4038e91546b53bc282d3c21c8c0f952c236830db Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Thu, 24 Jun 2021 17:42:50 +0100 Subject: [PATCH 37/40] Make factes files required --- api.swagger.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/api.swagger.yaml b/api.swagger.yaml index 7cfb53e9..ded6353e 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -6539,6 +6539,7 @@ paths: type: object required: - count + - facets - results properties: count: From 8f429e805b7133d8714084080646a3d4637b9143 Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Thu, 24 Jun 2021 17:45:39 +0100 Subject: [PATCH 38/40] Make factes files type required --- api.swagger.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api.swagger.yaml b/api.swagger.yaml index ded6353e..8ee369f6 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -18391,6 +18391,8 @@ components: example: 33 data: type: object + required: + - type properties: type: type: string From ccb9c37a94e45dca1b72a9f57b518c5ea4a9258d Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Thu, 1 Jul 2021 15:27:17 +0100 Subject: [PATCH 39/40] remove sort on type from /files/list --- api.swagger.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/api.swagger.yaml b/api.swagger.yaml index 8ee369f6..9236e3d2 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -6514,7 +6514,6 @@ paths: - author - filemime - filename - - type - site_section - timestamp_created - timestamp_updated From c5fdf33c5887be13ae04ee431dc5e5d5ffce7c99 Mon Sep 17 00:00:00 2001 From: sam-ludlow Date: Fri, 2 Jul 2021 12:55:25 +0100 Subject: [PATCH 40/40] SWAGGER-5.18 POST /users - is_line_manager should be read only --- api.swagger.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api.swagger.yaml b/api.swagger.yaml index e9926ff1..8f10f6d4 100644 --- a/api.swagger.yaml +++ b/api.swagger.yaml @@ -11437,6 +11437,11 @@ components: type: array items: $ref: '#/components/schemas/region-list-schema' + is_line_manager: + description: 'This user is a manager of other users.' + type: boolean + example: false + readOnly: true read_only: description: 'Users who are flagged as read-only are not able to create, update, or delete content.' type: boolean @@ -11532,11 +11537,6 @@ components: type: string format: uuid example: 01234567-89ab-cdef-1234-56789abcdef0 - is_line_manager: - description: 'This user is a manager of other users.' - type: boolean - default: false - example: false firstname: description: The user's first name type: string