info:
  description: API for managing counterparty risk and intelligence
  title: SupplierSelect Vendor API
  version: 1.8.1
servers:
- url: https://re.postrfp.com/vendor/api/
- url: http://localhost:9000/vendor/api/
paths:
  /events:
    get:
      description: "Returns a paginated array of audit events for the user's organisation.\n\
        Supports paging. Requires permission MANAGE_USERS."
      parameters:
      - in: query
        required: false
        name: page_size
        description: The number of records to return in a single page,  maximum 
          200, minimum 1
        schema:
          type: integer
          default: 20
      - in: query
        required: false
        name: page
        description: Page number of records to show, beginning from 1
        schema:
          type: integer
          default: 1
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SummaryEvent'
      operationId: get_events
      tags:
      - Audit
  /issue/{issue_id}:
    get:
      description: "Retrieve a single Issue visible to the respondent (restricted
        field set including\nproject title and watch status). Visibility validated
        against respondent org."
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VendorIssue'
      operationId: get_issue
      tags:
      - Issue
  /issue/{issue_id}/allocate:
    post:
      description: "Bulk (re)assign allocated_to for specified questions in an Issue.
        Overwrites any\nexisting allocation and stamps allocated_by with the caller.
        No response body.\nPermission: ALLOCATE_QUESTIONS."
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: post_issue_allocate
      tags:
      - Workflow
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AllocatedToList'
  /issue/{issue_id}/answer/attachment:
    post:
      description: Upload an attachment to provide an answer to a specific 
        question.
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnswerAttachmentIds'
      operationId: post_issue_answer_attachment
      tags:
      - Attachments
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                attachment_upload:
                  type: string
                  format: binary
                el_id:
                  type: string
  /issue/{issue_id}/answer/attachment/{attachment_id}:
    get:
      description: Download a single Issue Attachment file
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      - in: path
        required: true
        name: attachment_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: get_issue_answer_attachment
      tags:
      - Attachments
  /issue/{issue_id}/answer/element/{element_id}:
    delete:
      description: "Delete the answer (and any associated attachment) for a single
        question element\nin this Issue."
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      - in: path
        required: true
        name: element_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: delete_issue_answer_element
      tags:
      - Questionnaire
  /issue/{issue_id}/answerimport:
    get:
      description: "Preview importable answers from other Issues in the same Project,
        optionally\nrestricted to a section (node_number). Counts only; no data mutation."
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      - in: query
        required: false
        name: nodeNumber
        description: Dotted String number e.g. 3.12.5 giving position of the 
          question or section within the questionnaire
        schema:
          type: string
          default: ''
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportableAnswersList'
      operationId: get_issue_answerimport
      tags:
      - Questionnaire
    post:
      description: "Import answers from another Issue (optionally section‑scoped).
        Returns imported,\nunchanged, and error lists per question. Skips invalid
        or unchanged targets."
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnswerImportResult'
      operationId: post_issue_answerimport
      tags:
      - Questionnaire
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImportAnswers'
  /issue/{issue_id}/answers/replace:
    post:
      description: "Bulk in‑place text replacement (search_term -> replace_term) across
        all answers\nin the Issue. Returns count of questions affected. Honors permissions
        & bulk_import flag."
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Count'
      operationId: post_issue_answers_replace
      tags:
      - Questionnaire
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TextReplace'
  /issue/{issue_id}/answers/search:
    get:
      description: "Text search across this Issue's answers (case‑sensitive via utf8mb4_bin
        collation).\nReturns matching question numbers & IDs."
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      - in: query
        required: true
        name: searchTerm
        description: See Path documentation for details of search special 
          characters
        schema:
          type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnswerSearchList'
      operationId: get_issue_answers_search
      tags:
      - Questionnaire
  /issue/{issue_id}/attachment:
    post:
      description: Upload an Issue attachment together with metadata 
        (description etc)
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Id'
      operationId: post_issue_attachment
      tags:
      - Attachments
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                attachment_upload:
                  type: string
                  format: binary
                description:
                  type: string
  /issue/{issue_id}/attachment/{attachment_id}:
    get:
      description: Download a single Issue Attachment file
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      - in: path
        required: true
        name: attachment_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: get_issue_attachment
      tags:
      - Attachments
  /issue/{issue_id}/attachments:
    delete:
      description: "Delete those Issue attachments whose IDs are given in the JSON
        body\ndocument"
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: delete_issue_attachments
      tags:
      - Attachments
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IdList'
    get:
      description: list Issue Attachments for the given Issue ID
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Attachment'
      operationId: get_issue_attachments
      tags:
      - Attachments
  /issue/{issue_id}/note:
    post:
      description: "Create a respondent note (kind=RespondentNote). Private flag restricts
        visibility\nto respondent org. Emits PROJECT_NOTE_ADDED audit event with field
        changes."
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Id'
      operationId: post_issue_note
      tags:
      - Issue
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RespondentNote'
  /issue/{issue_id}/notes:
    get:
      description: "List notes visible to the respondent for this Issue (privacy /
        distribution\nfiltering applied)."
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ReadNote'
      operationId: get_issue_notes
      tags:
      - Issue
  /issue/{issue_id}/question:
    get:
      description: "A single question (by questionnaire number) with respondent-specific
        answer state\nand response workflow metadata (response_state)."
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      - in: query
        required: false
        name: nodeNumber
        description: Dotted String number e.g. 3.12.5 giving position of the 
          question or section within the questionnaire
        schema:
          type: string
          default: ''
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnsweredQuestion'
      operationId: get_issue_question
      tags:
      - Questionnaire
  /issue/{issue_id}/question/{question_id}/answers:
    post:
      description: "Save/replace answers for all elements of one question. Attachments
        must be uploaded\nvia the dedicated attachment endpoint (not here). Rejects
        empty submission."
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      - in: path
        required: true
        name: question_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: post_issue_question_answers
      tags:
      - Questionnaire
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ElementAnswerList'
  /issue/{issue_id}/question/{question_id}/attachment/{attachment_id}:
    get:
      description: Download a Question Attachment.
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      - in: path
        required: true
        name: question_id
        schema:
          type: integer
      - in: path
        required: true
        name: attachment_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: get_issue_question_attachment
      tags:
      - Attachments
  /issue/{issue_id}/scoregaps:
    get:
      description: "Per‑question win/loss gap report for a respondent Issue.\n\nFor
        each question the service compares this Issue’s agreed (consensus) score\n\
        to the highest agreed score achieved by any other scoreable respondent\n(Submitted
        / Updateable) in the same Project, using the weighting set defined\nfor win/loss
        analysis (issue.winloss_weightset_id or 0 if unset).\n\nReturned fields:\n\
        \  - question_id / number / title / node_type\n  - weight (only meaningful
        if the Project exposes weightings)\n  - score_gap:\n      * Numeric difference
        (this_issue_score - best_other_score) when at least\n        3 respondents
        have scores (prevents inferring a competitor’s exact score).\n      * One
        of \"+\", \"-\", \"==\" when only 2 (or fewer) scored respondents:\n     \
        \     \"+\"  -> this Issue leads\n          \"-\"  -> another Issue leads\n\
        \          \"==\" -> tie or no comparative data\n\nWeightings are included
        only if project.expose_weightings is True.\nPositive gap indicates an advantage;
        negative indicates a deficit."
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ScoreGaps'
      operationId: get_issue_scoregaps
      tags:
      - Reports
  /issue/{issue_id}/section/{section_id}:
    get:
      description: Full section detail including immediate subsections and 
        answered question data for this Issue.
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      - in: path
        required: true
        name: section_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FullSection'
      operationId: get_issue_section
      tags:
      - Questionnaire
  /issue/{issue_id}/section/{section_id}/stats:
    get:
      description: 'Progress metrics for a section: counts grouped by response status
        for this Issue.'
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      - in: path
        required: true
        name: section_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AnswerStats'
      operationId: get_issue_section_stats
      tags:
      - Questionnaire
  /issue/{issue_id}/section/{section_id}/workflow:
    get:
      description: "Section workflow snapshot for an Issue: returns section metadata
        plus a paged list\n(page size 20) of question response state rows (status,
        allocated/review fields,\nquestion number & IDs). Supports pagination via
        standard pager params.\nPermission: access to Issue & Section (implicit respondent
        visibility rules)."
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      - in: path
        required: true
        name: section_id
        schema:
          type: integer
      - in: query
        required: false
        name: page_size
        description: The number of records to return in a single page,  maximum 
          200, minimum 1
        schema:
          type: integer
          default: 20
      - in: query
        required: false
        name: page
        description: Page number of records to show, beginning from 1
        schema:
          type: integer
          default: 1
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowSection'
      operationId: get_issue_section_workflow
      tags:
      - Workflow
  /issue/{issue_id}/sections:
    get:
      description: "Flat list of all sections in the Project (IDs, parent IDs, human
        numbers, titles)\nordered by questionnaire numbering."
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TreeNode'
      operationId: get_issue_sections
      tags:
      - Questionnaire
  /issue/{issue_id}/status:
    post:
      description: "Perform an allowed respondent status transition: Accepted, Submitted,
        Declined.\nEnforces mandatory answer / deadline rules on submission. Emits
        audit events."
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: post_issue_status
      tags:
      - Issue
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IssueStatus'
  /issue/{issue_id}/tree:
    get:
      description: "Questionnaire structure (section + optional question hierarchy)
        for the Issue's Project root.\nSet q_with_questions=true to embed questions
        at each section node."
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      - in: query
        required: false
        name: withQuestions
        schema:
          type: boolean
          default: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Nodes'
      operationId: get_issue_tree
      tags:
      - Questionnaire
  /issue/{issue_id}/watchers:
    delete:
      description: "Remove users from an Issue's watch list. A user can remove themselves;
        bulk changes require MANAGE_USERS.\nReturns list of user IDs removed."
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: integer
      operationId: delete_issue_watchers
      tags:
      - Users
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TargetUserList'
    post:
      description: "Add users to an Issue's watch list. A user can add themselves;
        bulk changes require MANAGE_USERS.\nReturns list of user IDs newly added."
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: integer
      operationId: post_issue_watchers
      tags:
      - Users
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TargetUserList'
  /issue/{issue_id}/watchlist:
    get:
      description: Get watch list (users watching) for an Issue visible to the 
        caller. Includes watch timestamps.
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IssueWatchList'
      operationId: get_issue_watchlist
      tags:
      - Users
  /issue/{issue_id}/workflow:
    post:
      description: "Toggle workflow usage flag for this Issue (no audit event). Permission:\n\
        ISSUE_UPDATE_WORKFLOW."
      parameters:
      - in: path
        required: true
        name: issue_id
        schema:
          type: integer
      responses:
        '200':
          description: Successful Response
      operationId: post_issue_workflow
      tags:
      - Issue
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IssueUseWorkflow'
  /issues:
    get:
      description: "List respondent Issues (excludes Not Sent / Retracted). Ordered
        by most recent\nissue_date descending."
      parameters: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/VendorIssue'
      operationId: get_issues
      tags:
      - Issue
  /permissions:
    get:
      description: List all available permissions
      parameters: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
      operationId: get_permissions
      tags:
      - Users
  /roles:
    get:
      description: List available role names (built‑in plus organisation custom 
        roles) for assignment.
      parameters: []
      responses:
        '200':
          description: Successful Response
      operationId: get_roles
      tags:
      - Users
  /user:
    delete:
      description: "Delete a user in the caller's organisation. Requires MANAGE_USERS.\n\
        Emits USER_DELETED audit event."
      parameters: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StringId'
      operationId: delete_user
      tags:
      - Users
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditableUser'
    get:
      description: Retrieve a single user in the same organisation. Rejects 
        cross‑organisation access.
      parameters:
      - in: query
        required: true
        name: targetUser
        schema:
          type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FullUser'
      operationId: get_user
      tags:
      - Users
    post:
      description: "Create a new user in the caller's organisation. Requires MANAGE_USERS.\n\
        Emits USER_UPDATED audit event capturing initial attributes & roles."
      parameters: []
      responses:
        '200':
          description: Successful Response
          links:
            get_user:
              operationId: get_user
              parameters:
                targetUser: $response.body#/id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StringId'
      operationId: post_user
      tags:
      - Users
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditableUser'
    put:
      description: "Update a user's name, email and roles. User may self‑update; otherwise
        MANAGE_USERS required.\nEmits USER_UPDATED audit event with per‑field change
        records."
      parameters: []
      responses:
        '200':
          description: Successful Response
      operationId: put_user
      tags:
      - Users
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EditableUser'
  /users:
    get:
      description: List users in the caller's organisation (respondent scope). 
        Returns basic identity fields.
      parameters: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/BaseUser'
      operationId: get_users
      tags:
      - Users
  /whoami:
    get:
      description: Return the authenticated user's full profile (roles & derived
        permissions).
      parameters: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FullUser'
      operationId: get_whoami
      tags:
      - Users
tags:
- name: Attachments
- name: Audit
- name: Issue
  description: "Respondent Issue endpoints.\n\nExposes a limited Issue view for respondents:
    list/retrieve Issues, perform\nallowed status transitions, toggle workflow usage,
    and create/list respondent\nnotes (with audit logging where applicable)."
- name: Questionnaire
- name: Reports
- name: Users
  description: Manage user accounts and issue watchlists
- name: Workflow
  description: "Team Workflow endpoints.\n\nWorkflow here = assigning a responsible
    user to draft an answer (allocated_to) and\ntracking review / approval (status
    transitions handled elsewhere). These endpoints:\n  * List per‑question response
    state (allocation + review status) for a section (paged).\n  * Bulk assign (or
    reassign) responsible users for selected questions in an Issue."
openapi: 3.1.1
components:
  schemas:
    AllocatedTo:
      properties:
        allocated_to:
          title: Allocated To
          type: string
        question_instance_id:
          title: Question Instance Id
          type: integer
      required:
      - allocated_to
      - question_instance_id
      title: AllocatedTo
      type: object
    AllocatedToList:
      items:
        $ref: '#/components/schemas/AllocatedTo'
      title: AllocatedToList
      type: array
    AnswerAttachmentIds:
      properties:
        attachment_id:
          exclusiveMaximum: 4294967295
          exclusiveMinimum: 0
          title: Attachment Id
          type: integer
        answer_id:
          exclusiveMaximum: 4294967295
          exclusiveMinimum: 0
          title: Answer Id
          type: integer
      required:
      - attachment_id
      - answer_id
      title: AnswerAttachmentIds
      type: object
    AnswerImportResult:
      properties:
        imported:
          items:
            type: string
          title: Imported
          type: array
        errors:
          items:
            type: string
          title: Errors
          type: array
        unchanged:
          items:
            type: string
          title: Unchanged
          type: array
      required:
      - imported
      - errors
      - unchanged
      title: AnswerImportResult
      type: object
    AnswerResponseState:
      properties:
        status:
          title: Status
          type: string
        allocated_by:
          anyOf:
          - type: string
          - type: 'null'
          title: Allocated By
        allocated_to:
          anyOf:
          - type: string
          - type: 'null'
          title: Allocated To
        approved_by:
          anyOf:
          - type: string
          - type: 'null'
          title: Approved By
        updated_by:
          anyOf:
          - type: string
          - type: 'null'
          title: Updated By
        date_updated:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Date Updated
        question_instance_id:
          title: Question Instance Id
          type: integer
      required:
      - status
      - allocated_by
      - allocated_to
      - approved_by
      - updated_by
      - date_updated
      - question_instance_id
      title: AnswerResponseState
      type: object
    AnswerSearch:
      properties:
        number:
          title: Number
          type: string
        question_id:
          title: Question Id
          type: integer
      required:
      - number
      - question_id
      title: AnswerSearch
      type: object
    AnswerSearchList:
      properties:
        matches:
          items:
            $ref: '#/components/schemas/AnswerSearch'
          title: Matches
          type: array
      required:
      - matches
      title: AnswerSearchList
      type: object
    AnswerStats:
      properties:
        allocated_to:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Allocated To
        status:
          title: Status
          type: string
        question_count:
          title: Question Count
          type: integer
      required:
      - status
      - question_count
      title: AnswerStats
      type: object
    AnsweredQuestion:
      properties:
        title:
          maxLength: 1024
          minLength: 2
          title: Title
          type: string
        elements:
          $ref: '#/components/schemas/ElGrid'
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          readOnly: true
          title: Id
        number:
          title: Number
          type: string
        section_id:
          anyOf:
          - exclusiveMaximum: 4294967295
            type: integer
          - type: 'null'
          default:
          title: Section Id
        response_state:
          items:
            $ref: '#/components/schemas/AnswerResponseState'
          title: Response State
          type: array
      required:
      - title
      - elements
      - number
      - response_state
      title: AnsweredQuestion
      type: object
    Attachment:
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
        filename:
          title: Filename
          type: string
        mimetype:
          title: Mimetype
          type: string
        size:
          title: Size
          type: string
        size_bytes:
          title: Size Bytes
          type: integer
        private:
          title: Private
          type: boolean
        description:
          maxLength: 255
          minLength: 1
          title: Description
          type: string
        date_uploaded:
          format: date-time
          title: Date Uploaded
          type: string
        author_id:
          title: Author Id
          type: string
        org_id:
          title: Org Id
          type: string
      required:
      - filename
      - mimetype
      - size
      - size_bytes
      - private
      - description
      - date_uploaded
      - author_id
      - org_id
      title: Attachment
      type: object
    BaseOrganisation:
      properties:
        id:
          maxLength: 50
          minLength: 3
          title: Id
          type: string
        name:
          maxLength: 50
          minLength: 3
          title: Name
          type: string
        type:
          anyOf:
          - $ref: '#/components/schemas/OrgType'
          - type: 'null'
          default:
        public:
          default: false
          title: Public
          type: boolean
        domain_name:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Domain Name
      required:
      - id
      - name
      title: BaseOrganisation
      type: object
    BaseUser:
      properties:
        id:
          title: Id
          type: string
        org_id:
          title: Org Id
          type: string
        type:
          title: Type
          type: string
        fullname:
          title: Fullname
          type: string
        email:
          title: Email
          type: string
        previous_login_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Previous Login Date
      required:
      - id
      - org_id
      - type
      - fullname
      - email
      title: BaseUser
      type: object
    Category:
      properties:
        name:
          maxLength: 50
          minLength: 3
          title: Name
          type: string
        description:
          maxLength: 250
          title: Description
          type: string
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
      required:
      - name
      - description
      title: Category
      type: object
    Checkbox:
      additionalProperties: false
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          readOnly: true
          title: Id
        el_type:
          const: CB
          title: El Type
          type: string
        label:
          anyOf:
          - maxLength: 4086
            type: string
          - type: 'null'
          default:
          title: Label
        colspan:
          default: 1
          maximum: 10
          minimum: 1
          title: Colspan
          type: integer
        rowspan:
          default: 1
          maximum: 50
          minimum: 1
          title: Rowspan
          type: integer
      required:
      - el_type
      title: Checkbox
      type: object
    Choice:
      additionalProperties: false
      properties:
        autoscore:
          anyOf:
          - maximum: 1000
            minimum: 0
            type: integer
          - type: 'null'
          default:
          title: Autoscore
        label:
          maxLength: 1024
          minLength: 1
          title: Label
          type: string
      required:
      - label
      title: Choice
      type: object
    Count:
      description: Generic count model
      properties:
        description:
          title: Description
          type: string
        count:
          title: Count
          type: integer
      required:
      - description
      - count
      title: Count
      type: object
    Distribution:
      enum:
      - BROADCAST_NOTICE
      - RESPONDENT_QUERY
      - RESPONDENT_INTERNAL_MEMO
      - ISSUER_INTERNAL_MEMO
      - TARGETED
      title: Distribution
      type: string
    EditableUser:
      properties:
        id:
          maxLength: 50
          minLength: 5
          title: Id
          type: string
        org_id:
          maxLength: 50
          minLength: 4
          title: Org Id
          type: string
        fullname:
          maxLength: 50
          minLength: 5
          title: Fullname
          type: string
        email:
          format: email
          title: Email
          type: string
        type:
          $ref: '#/components/schemas/UserType'
          default: standard
        roles:
          items:
            maxLength: 255
            minLength: 3
            type: string
          maxItems: 20
          title: Roles
          type: array
      required:
      - id
      - org_id
      - fullname
      - email
      - roles
      title: EditableUser
      type: object
    ElGrid:
      items:
        $ref: '#/components/schemas/ElRow'
      maxItems: 50
      minItems: 0
      title: ElGrid
      type: array
    ElRow:
      items:
        anyOf:
        - $ref: '#/components/schemas/TextInput'
        - $ref: '#/components/schemas/Label'
        - $ref: '#/components/schemas/RadioChoices'
        - $ref: '#/components/schemas/SelectDropdown'
        - $ref: '#/components/schemas/Checkbox'
        - $ref: '#/components/schemas/QuestionAttachment'
        - $ref: '#/components/schemas/UploadField'
      maxItems: 10
      minItems: 0
      title: ElRow
      type: array
    ElementAnswer:
      properties:
        element_id:
          description: ID of the question Element for this answer
          title: Element Id
          type: integer
        answer:
          maxLength: 65536
          title: Answer
          type: string
      required:
      - element_id
      - answer
      title: ElementAnswer
      type: object
    ElementAnswerList:
      items:
        $ref: '#/components/schemas/ElementAnswer'
      maxItems: 100
      minItems: 0
      title: ElementAnswerList
      type: array
    Error:
      properties:
        error:
          title: Error
          type: string
        description:
          title: Description
          type: string
      required:
      - error
      - description
      title: Error
      type: object
    EvIssue:
      properties:
        respondent_id:
          title: Respondent Id
          type: string
        label:
          anyOf:
          - type: string
          - type: 'null'
          title: Label
      required:
      - respondent_id
      - label
      title: EvIssue
      type: object
    FullSection:
      properties:
        title:
          maxLength: 255
          minLength: 1
          title: Title
          type: string
        description:
          anyOf:
          - maxLength: 1024
            type: string
          - type: 'null'
          default:
          title: Description
        id:
          title: Id
          type: integer
        parent_id:
          anyOf:
          - exclusiveMinimum: 0
            type: integer
          - type: 'null'
          title: Parent Id
        number:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Number
        subsections:
          items:
            $ref: '#/components/schemas/TreeNode'
          title: Subsections
          type: array
        questions:
          items:
            $ref: '#/components/schemas/Question'
          title: Questions
          type: array
      required:
      - title
      - id
      - parent_id
      - subsections
      - questions
      title: FullSection
      type: object
    FullUser:
      description: "Don't use for incoming data - permissions are derived from user's
        roles\nthus should not be set directly."
      properties:
        id:
          title: Id
          type: string
        org_id:
          title: Org Id
          type: string
        type:
          $ref: '#/components/schemas/UserType'
          default: standard
        fullname:
          title: Fullname
          type: string
        email:
          title: Email
          type: string
        previous_login_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Previous Login Date
        organisation:
          $ref: '#/components/schemas/Organisation'
        roles:
          items:
            type: string
          title: Roles
          type: array
        permissions:
          description: List of this user's permissions, based on their roles
          items:
            type: string
          title: Permissions
          type: array
          uniqueItems: true
      required:
      - id
      - org_id
      - fullname
      - email
      - organisation
      - roles
      - permissions
      title: FullUser
      type: object
    HitTypes:
      enum:
      - questions
      - choices
      - answers
      - notes
      - scoreComments
      title: HitTypes
      type: string
    HttpHeader:
      properties:
        header:
          maxLength: 255
          pattern: ^[a-zA-Z0-9-]+$
          title: Header
          type: string
        value:
          maxLength: 2048
          title: Value
          type: string
      required:
      - header
      - value
      title: HttpHeader
      type: object
    Id:
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
      title: Id
      type: object
    IdList:
      properties:
        ids:
          items:
            type: integer
          title: Ids
          type: array
      required:
      - ids
      title: IdList
      type: object
    ImportAnswers:
      properties:
        source_issue_id:
          title: Source Issue Id
          type: integer
        section_number:
          title: Section Number
          type: string
      required:
      - source_issue_id
      - section_number
      title: ImportAnswers
      type: object
    ImportableAnswers:
      properties:
        title:
          title: Title
          type: string
        issue_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Issue Date
        submitted_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Submitted Date
        question_count:
          title: Question Count
          type: integer
        issue_id:
          title: Issue Id
          type: integer
      required:
      - title
      - issue_date
      - submitted_date
      - question_count
      - issue_id
      title: ImportableAnswers
      type: object
    ImportableAnswersList:
      items:
        $ref: '#/components/schemas/ImportableAnswers'
      title: ImportableAnswersList
      type: array
    Issue:
      description: "Represents the directly editable fields of an Issue\n\nEither
        respondent or respondent_email must be set, but not both"
      properties:
        label:
          anyOf:
          - maxLength: 250
            type: string
          - type: 'null'
          default:
          title: Label
        deadline:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Deadline
        award_status:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Award Status
        internal_comments:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Internal Comments
        feedback:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Feedback
        winloss_exposed:
          default: false
          title: Winloss Exposed
          type: boolean
        winloss_expiry:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Winloss Expiry
        id:
          title: Id
          type: integer
        project_id:
          title: Project Id
          type: integer
        respondent:
          anyOf:
          - $ref: '#/components/schemas/Organisation'
          - type: 'null'
          default:
        respondent_email:
          anyOf:
          - format: email
            type: string
          - type: 'null'
          default:
          title: Respondent Email
        status:
          title: Status
          type: string
        accepted_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Accepted Date
        submitted_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Submitted Date
        issue_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          description: Date the Issue was published
          title: Issue Date
      required:
      - id
      - project_id
      - status
      title: Issue
      type: object
    IssueScores:
      properties:
        total_score:
          description: Total calculated score for the issue
          title: Total Score
          type: number
        section_scores:
          additionalProperties:
            type: number
          description: Dictionary mapping section IDs to their calculated scores
          example:
            '1': 85.5
            '2': 92.0
            '3': 78.3
          title: Section Scores
          type: object
        question_scores:
          additionalProperties:
            type: number
          description: Dictionary mapping question IDs to their calculated 
            scores
          example:
            '1': 90.0
            '2': 85.0
            '3': 88.5
            '4': 76.0
          title: Question Scores
          type: object
      required:
      - total_score
      - section_scores
      - question_scores
      title: IssueScores
      type: object
    IssueStatus:
      properties:
        new_status:
          $ref: '#/components/schemas/IssueStatuses'
      required:
      - new_status
      title: IssueStatus
      type: object
    IssueStatuses:
      enum:
      - Not Sent
      - Opportunity
      - Accepted
      - Updateable
      - Declined
      - Submitted
      - Retracted
      title: IssueStatuses
      type: string
    IssueUseWorkflow:
      properties:
        use_workflow:
          title: Use Workflow
          type: boolean
      required:
      - use_workflow
      title: IssueUseWorkflow
      type: object
    IssueWatchList:
      properties:
        issue_id:
          title: Issue Id
          type: integer
        watchlist:
          items:
            $ref: '#/components/schemas/Watcher'
          title: Watchlist
          type: array
      required:
      - issue_id
      - watchlist
      title: IssueWatchList
      type: object
    Label:
      additionalProperties: false
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          readOnly: true
          title: Id
        el_type:
          const: LB
          title: El Type
          type: string
        label:
          anyOf:
          - maxLength: 4086
            type: string
          - type: 'null'
          default:
          title: Label
        colspan:
          default: 1
          maximum: 10
          minimum: 1
          title: Colspan
          type: integer
        rowspan:
          default: 1
          maximum: 50
          minimum: 1
          title: Rowspan
          type: integer
      required:
      - el_type
      title: Label
      type: object
    ListIssue:
      properties:
        label:
          anyOf:
          - maxLength: 250
            type: string
          - type: 'null'
          default:
          title: Label
        deadline:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Deadline
        respondent_id:
          anyOf:
          - maxLength: 50
            type: string
          - type: 'null'
          default:
          title: Respondent Id
        respondent_email:
          anyOf:
          - format: email
            type: string
          - type: 'null'
          default:
          title: Respondent Email
        issue_id:
          title: Issue Id
          type: integer
        winloss_exposed:
          default: false
          title: Winloss Exposed
          type: boolean
        winloss_expiry:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Winloss Expiry
        project_title:
          title: Project Title
          type: string
        project_id:
          title: Project Id
          type: integer
        status:
          title: Status
          type: string
        issue_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Issue Date
        submitted_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Submitted Date
      required:
      - issue_id
      - project_title
      - project_id
      - status
      title: ListIssue
      type: object
    ListProject:
      properties:
        id:
          title: Id
          type: integer
        workflow_id:
          title: Workflow Id
          type: integer
        title:
          title: Title
          type: string
        owner_org_name:
          title: Owner Org Name
          type: string
        owner_org_id:
          title: Owner Org Id
          type: string
        status:
          title: Status
          type: string
        deadline:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Deadline
        date_created:
          format: date-time
          title: Date Created
          type: string
        watching_since:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Watching Since
        is_watched:
          default: false
          title: Is Watched
          type: boolean
      required:
      - id
      - workflow_id
      - title
      - owner_org_name
      - owner_org_id
      - status
      - date_created
      title: ListProject
      type: object
    MatchedElement:
      properties:
        title:
          title: Title
          type: string
        number:
          title: Number
          type: string
        el_type:
          title: El Type
          type: string
        label:
          title: Label
          type: string
        choices:
          items:
            $ref: '#/components/schemas/Choice'
          title: Choices
          type: array
      required:
      - title
      - number
      - el_type
      - label
      - choices
      title: MatchedElement
      type: object
    Node:
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
        number:
          title: Number
          type: string
        title:
          title: Title
          type: string
      required:
      - number
      - title
      title: Node
      type: object
    NodeTypeEnum:
      enum:
      - section
      - question
      title: NodeTypeEnum
      type: string
    Nodes:
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
        number:
          title: Number
          type: string
        title:
          title: Title
          type: string
        type:
          title: Type
          type: string
        subsections:
          anyOf:
          - items:
              $ref: '#/components/schemas/Nodes'
            type: array
          - type: 'null'
          default:
          title: Subsections
        questions:
          anyOf:
          - items:
              $ref: '#/components/schemas/Nodes'
            type: array
          - type: 'null'
          default:
          title: Questions
      required:
      - number
      - title
      - type
      title: Nodes
      type: object
    OrgType:
      enum:
      - RESPONDENT
      - BUYER
      - CONSULTANT
      title: OrgType
      type: string
    Organisation:
      properties:
        id:
          maxLength: 50
          minLength: 3
          title: Id
          type: string
        name:
          maxLength: 50
          minLength: 3
          title: Name
          type: string
        type:
          anyOf:
          - $ref: '#/components/schemas/OrgType'
          - type: 'null'
          default:
        public:
          default: false
          title: Public
          type: boolean
        domain_name:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Domain Name
        password_expiry:
          default: 0
          title: Password Expiry
          type: integer
      required:
      - id
      - name
      title: Organisation
      type: object
    Pagination:
      description: Schema for pagination information.
      properties:
        current_page:
          title: Current Page
          type: integer
        page_size:
          title: Page Size
          type: integer
        total_count:
          title: Total Count
          type: integer
        total_pages:
          title: Total Pages
          type: integer
        has_next:
          title: Has Next
          type: boolean
        current_page_count:
          default: 0
          description: Number of records in the current page
          title: Current Page Count
          type: integer
      required:
      - current_page
      - page_size
      - total_count
      - total_pages
      - has_next
      title: Pagination
      type: object
    Participant:
      properties:
        organisation:
          $ref: '#/components/schemas/Organisation'
        role:
          maxLength: 255
          title: Role
          type: string
      required:
      - organisation
      - role
      title: Participant
      type: object
    ProjectField:
      description: "ProjectFields allow the user to associate custom data fields with
        their project.\n\nBy default such fields are invisible to respondent users
        - behaviour dictated by the 'private'\nproperty. ProjectFields are ordered
        when displayed according to the 'position' property."
      properties:
        key:
          maxLength: 64
          minLength: 1
          title: Key
          type: string
        value:
          maxLength: 8192
          title: Value
          type: string
        private:
          default: true
          description: Indicates whether this field is visible to Respondents
          title: Private
          type: boolean
      required:
      - key
      - value
      title: ProjectField
      type: object
    QElementStats:
      properties:
        TX:
          description: Count of Text Input elements
          title: Tx
          type: integer
        CR:
          description: Count of Radio Choices elements
          title: Cr
          type: integer
        CC:
          description: Count of Combon/Select elements
          title: Cc
          type: integer
        CB:
          description: Count of Checkbox elements
          title: Cb
          type: integer
        LB:
          description: Count of Label elements
          title: Lb
          type: integer
        QA:
          description: Count of Question Attachment elements
          title: Qa
          type: integer
        AT:
          description: Count of Upload Field Attachment elements
          title: At
          type: integer
        MD:
          description: Count of Media elements
          title: Md
          type: integer
        answerable_elements:
          description: Total number of answerable elements
          title: Answerable Elements
          type: integer
      required:
      - TX
      - CR
      - CC
      - CB
      - LB
      - QA
      - AT
      - MD
      - answerable_elements
      title: QElementStats
      type: object
    QWeight:
      properties:
        question_id:
          exclusiveMaximum: 4294967295
          exclusiveMinimum: 0
          title: Question Id
          type: integer
        weight:
          minimum: 0.0
          title: Weight
          type: number
      required:
      - question_id
      - weight
      title: QWeight
      type: object
    Question:
      properties:
        title:
          maxLength: 1024
          minLength: 2
          title: Title
          type: string
        elements:
          $ref: '#/components/schemas/ElGrid'
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          readOnly: true
          title: Id
        number:
          title: Number
          type: string
        section_id:
          anyOf:
          - exclusiveMaximum: 4294967295
            type: integer
          - type: 'null'
          default:
          title: Section Id
      required:
      - title
      - elements
      - number
      title: Question
      type: object
    QuestionAttachment:
      additionalProperties: false
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          readOnly: true
          title: Id
        el_type:
          const: QA
          title: El Type
          type: string
        label:
          anyOf:
          - maxLength: 4086
            type: string
          - type: 'null'
          default:
          title: Label
        colspan:
          default: 1
          maximum: 10
          minimum: 1
          title: Colspan
          type: integer
        rowspan:
          default: 1
          maximum: 50
          minimum: 1
          title: Rowspan
          type: integer
      required:
      - el_type
      title: QuestionAttachment
      type: object
    QuestionScore:
      properties:
        question_id:
          title: Question Id
          type: integer
        issue_id:
          title: Issue Id
          type: integer
        scoreset_id:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Scoreset Id
        score:
          anyOf:
          - type: number
          - type: 'null'
          default:
          title: Score
      required:
      - question_id
      - issue_id
      title: QuestionScore
      type: object
    RadioChoices:
      additionalProperties: false
      properties:
        choices:
          items:
            $ref: '#/components/schemas/Choice'
          maxItems: 20
          minItems: 2
          title: Choices
          type: array
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          readOnly: true
          title: Id
        el_type:
          const: CR
          title: El Type
          type: string
        label:
          anyOf:
          - maxLength: 4086
            type: string
          - type: 'null'
          default:
          title: Label
        colspan:
          default: 1
          maximum: 10
          minimum: 1
          title: Colspan
          type: integer
        rowspan:
          default: 1
          maximum: 50
          minimum: 1
          title: Rowspan
          type: integer
        mandatory:
          default: false
          title: Mandatory
          type: boolean
      required:
      - choices
      - el_type
      title: RadioChoices
      type: object
    ReadNote:
      properties:
        target_org_id:
          anyOf:
          - type: string
          - type: 'null'
          default:
          description: ID of the Organisation to who this Note is addressed
          title: Target Org Id
        note_text:
          maxLength: 16384
          minLength: 1
          title: Note Text
          type: string
        internal:
          default: false
          description: If true, visible only to buyer (participant) 
            organisations
          title: Internal
          type: boolean
        note_id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Note Id
        note_time:
          format: date-time
          title: Note Time
          type: string
        organisation_id:
          maxLength: 50
          title: Organisation Id
          type: string
        distribution:
          $ref: '#/components/schemas/Distribution'
      required:
      - note_text
      - note_time
      - organisation_id
      - distribution
      title: ReadNote
      type: object
    RelationshipType:
      properties:
        id:
          anyOf:
          - exclusiveMaximum: 2147483648
            exclusiveMinimum: 0
            type: integer
          - type: 'null'
          default:
          title: Id
        name:
          maxLength: 128
          minLength: 2
          title: Name
          type: string
        description:
          anyOf:
          - maxLength: 256
            type: string
          - type: 'null'
          default:
          title: Description
      required:
      - name
      title: RelationshipType
      type: object
    RespondentAnswer:
      properties:
        answer_id:
          title: Answer Id
          type: integer
        answer:
          title: Answer
          type: string
        respondent_id:
          title: Respondent Id
          type: string
        issue_id:
          title: Issue Id
          type: integer
        project_id:
          title: Project Id
          type: integer
        project_title:
          title: Project Title
          type: string
        date_published:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          title: Date Published
      required:
      - answer_id
      - answer
      - respondent_id
      - issue_id
      - project_id
      - project_title
      - date_published
      title: RespondentAnswer
      type: object
    RespondentNote:
      properties:
        note_text:
          title: Note Text
          type: string
        internal:
          default: false
          description: If true, visible only to the respondent organisation
          title: Internal
          type: boolean
      required:
      - note_text
      title: RespondentNote
      type: object
    ScoreGaps:
      properties:
        question_id:
          title: Question Id
          type: integer
        number:
          title: Number
          type: string
        title:
          title: Title
          type: string
        node_type:
          title: Node Type
          type: string
        score_gap:
          title: Score Gap
          type: number
        weight:
          title: Weight
          type: number
      required:
      - question_id
      - number
      - title
      - node_type
      - score_gap
      - weight
      title: ScoreGaps
      type: object
    ScoringModel:
      description: Enum for score types
      enum:
      - Unweighted
      - Direct
      - Absolute
      title: ScoringModel
      type: string
    SecWeight:
      properties:
        section_id:
          exclusiveMaximum: 4294967295
          exclusiveMinimum: 0
          title: Section Id
          type: integer
        weight:
          minimum: 0.0
          title: Weight
          type: number
      required:
      - section_id
      - weight
      title: SecWeight
      type: object
    Section:
      properties:
        title:
          maxLength: 255
          minLength: 1
          title: Title
          type: string
        description:
          anyOf:
          - maxLength: 1024
            type: string
          - type: 'null'
          default:
          title: Description
        id:
          anyOf:
          - exclusiveMinimum: 0
            type: integer
          - type: 'null'
          default:
          title: Id
        parent_id:
          anyOf:
          - exclusiveMinimum: 0
            type: integer
          - type: 'null'
          title: Parent Id
        number:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Number
      required:
      - title
      - parent_id
      title: Section
      type: object
    SectionScoreDoc:
      properties:
        question_id:
          exclusiveMaximum: 4294967295
          exclusiveMinimum: 0
          title: Question Id
          type: integer
        scores:
          items:
            $ref: '#/components/schemas/postrfp__shared__serial__models__SectionScore'
          title: Scores
          type: array
      required:
      - question_id
      - scores
      title: SectionScoreDoc
      type: object
    SelectDropdown:
      additionalProperties: false
      properties:
        choices:
          items:
            $ref: '#/components/schemas/Choice'
          maxItems: 20
          minItems: 2
          title: Choices
          type: array
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          readOnly: true
          title: Id
        el_type:
          const: CC
          title: El Type
          type: string
        label:
          anyOf:
          - maxLength: 4086
            type: string
          - type: 'null'
          default:
          title: Label
        colspan:
          default: 1
          maximum: 10
          minimum: 1
          title: Colspan
          type: integer
        rowspan:
          default: 1
          maximum: 50
          minimum: 1
          title: Rowspan
          type: integer
        mandatory:
          default: false
          title: Mandatory
          type: boolean
      required:
      - choices
      - el_type
      title: SelectDropdown
      type: object
    StatusSchema:
      description: Schema for state data compatible with  editor.
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
        name:
          description: Human-readable name of the state
          maxLength: 64
          title: Name
          type: string
        code:
          description: System identifier for the state
          maxLength: 64
          title: Code
          type: string
        colour:
          anyOf:
          - maxLength: 7
            pattern: ^#[0-9A-Fa-f]{6}$
            type: string
          - type: 'null'
          default:
          description: Hex color code (#RRGGBB)
          examples:
          - '#1E90FF'
          title: Colour
        status_actions:
          default: []
          items:
            type: string
          title: Status Actions
          type: array
        description:
          anyOf:
          - maxLength: 512
            type: string
          - type: 'null'
          default:
          title: Description
      required:
      - name
      - code
      title: StatusSchema
      type: object
    StringId:
      properties:
        id:
          title: Id
          type: string
      required:
      - id
      title: StringId
      type: object
    SummaryEvent:
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
        timestamp:
          format: date-time
          title: Timestamp
          type: string
        user_id:
          title: User Id
          type: string
        event_type:
          title: Event Type
          type: string
      required:
      - timestamp
      - user_id
      - event_type
      title: SummaryEvent
      type: object
    TargetUser:
      properties:
        targetUser:
          anyOf:
          - minLength: 3
            type: string
          - type: 'null'
          default:
          title: Targetuser
      title: TargetUser
      type: object
    TargetUserList:
      items:
        $ref: '#/components/schemas/TargetUser'
      title: TargetUserList
      type: array
    TextInput:
      additionalProperties: false
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          readOnly: true
          title: Id
        el_type:
          const: TX
          title: El Type
          type: string
        label:
          anyOf:
          - maxLength: 4086
            type: string
          - type: 'null'
          default:
          title: Label
        colspan:
          default: 1
          maximum: 10
          minimum: 1
          title: Colspan
          type: integer
        rowspan:
          default: 1
          maximum: 50
          minimum: 1
          title: Rowspan
          type: integer
        height:
          default: 1
          exclusiveMaximum: 40
          exclusiveMinimum: 0
          title: Height
          type: integer
        width:
          default: 1
          exclusiveMaximum: 500
          exclusiveMinimum: 0
          title: Width
          type: integer
        regexp:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Regexp
        mandatory:
          default: false
          title: Mandatory
          type: boolean
      required:
      - el_type
      title: TextInput
      type: object
    TextReplace:
      properties:
        search_term:
          title: Search Term
          type: string
        replace_term:
          title: Replace Term
          type: string
        dry_run:
          default: true
          title: Dry Run
          type: boolean
      required:
      - search_term
      - replace_term
      title: TextReplace
      type: object
    TransitionSchema:
      description: Schema for transition data compatible with  editor.
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
        name:
          maxLength: 64
          title: Name
          type: string
        source_status:
          $ref: '#/components/schemas/StatusSchema'
        target_status:
          $ref: '#/components/schemas/StatusSchema'
        guard_policy:
          anyOf:
          - type: string
          - type: 'null'
          default:
          description: CEL expression for guard condition
          title: Guard Policy
      required:
      - name
      - source_status
      - target_status
      title: TransitionSchema
      type: object
    TreeNode:
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
        parent_id:
          anyOf:
          - type: integer
          - type: 'null'
          title: Parent Id
        number:
          title: Number
          type: string
        title:
          title: Title
          type: string
      required:
      - parent_id
      - number
      - title
      title: TreeNode
      type: object
    UpdateParticipant:
      properties:
        org_id:
          maxLength: 50
          title: Org Id
          type: string
        role:
          maxLength: 255
          title: Role
          type: string
      required:
      - org_id
      - role
      title: UpdateParticipant
      type: object
    UploadField:
      additionalProperties: false
      properties:
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          readOnly: true
          title: Id
        el_type:
          const: AT
          title: El Type
          type: string
        label:
          anyOf:
          - maxLength: 4086
            type: string
          - type: 'null'
          default:
          title: Label
        colspan:
          default: 1
          maximum: 10
          minimum: 1
          title: Colspan
          type: integer
        rowspan:
          default: 1
          maximum: 50
          minimum: 1
          title: Rowspan
          type: integer
        mandatory:
          default: false
          title: Mandatory
          type: boolean
      required:
      - el_type
      title: UploadField
      type: object
    User:
      properties:
        id:
          title: Id
          type: string
        org_id:
          title: Org Id
          type: string
        type:
          $ref: '#/components/schemas/UserType'
          default: standard
        fullname:
          title: Fullname
          type: string
        email:
          title: Email
          type: string
        previous_login_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Previous Login Date
        organisation:
          $ref: '#/components/schemas/Organisation'
        roles:
          items:
            type: string
          title: Roles
          type: array
      required:
      - id
      - org_id
      - fullname
      - email
      - organisation
      - roles
      title: User
      type: object
    UserType:
      enum:
      - standard
      - restricted
      title: UserType
      type: string
    VendorIssue:
      properties:
        label:
          anyOf:
          - maxLength: 250
            type: string
          - type: 'null'
          default:
          title: Label
        deadline:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Deadline
        award_status:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Award Status
        internal_comments:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Internal Comments
        feedback:
          anyOf:
          - type: string
          - type: 'null'
          default:
          title: Feedback
        winloss_exposed:
          default: false
          title: Winloss Exposed
          type: boolean
        winloss_expiry:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Winloss Expiry
        id:
          title: Id
          type: integer
        project_id:
          title: Project Id
          type: integer
        respondent:
          anyOf:
          - $ref: '#/components/schemas/Organisation'
          - type: 'null'
          default:
        respondent_email:
          anyOf:
          - format: email
            type: string
          - type: 'null'
          default:
          title: Respondent Email
        status:
          title: Status
          type: string
        accepted_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Accepted Date
        submitted_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Submitted Date
        issue_date:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          description: Date the Issue was published
          title: Issue Date
        title:
          description: Title of the parent Project
          title: Title
          type: string
        owner_org:
          $ref: '#/components/schemas/Organisation'
          description: Org that created the Project - the Buyer
        is_watched:
          default: false
          description: Shows if the current user is watching this issue
          title: Is Watched
          type: boolean
      required:
      - id
      - project_id
      - status
      - title
      - owner_org
      title: VendorIssue
      type: object
    Watcher:
      properties:
        user_id:
          title: User Id
          type: string
        fullname:
          title: Fullname
          type: string
        email:
          anyOf:
          - format: email
            type: string
          - type: 'null'
          default:
          title: Email
        watching_since:
          anyOf:
          - format: date-time
            type: string
          - type: 'null'
          default:
          title: Watching Since
        is_watching:
          default: false
          title: Is Watching
          type: boolean
      required:
      - user_id
      - fullname
      title: Watcher
      type: object
    WeightSet:
      properties:
        name:
          maxLength: 255
          minLength: 1
          title: Name
          type: string
        id:
          anyOf:
          - type: integer
          - type: 'null'
          default:
          title: Id
      required:
      - name
      title: WeightSet
      type: object
    Weightings:
      properties:
        questions:
          items:
            $ref: '#/components/schemas/QWeight'
          title: Questions
          type: array
        sections:
          items:
            $ref: '#/components/schemas/SecWeight'
          title: Sections
          type: array
      required:
      - questions
      - sections
      title: Weightings
      type: object
    WorkflowSection:
      properties:
        section:
          $ref: '#/components/schemas/Section'
        questions:
          items:
            $ref: '#/components/schemas/AnswerResponseState'
          title: Questions
          type: array
        count:
          title: Count
          type: integer
      required:
      - section
      - questions
      - count
      title: WorkflowSection
      type: object
    postrfp__shared__serial__models__SectionScore:
      properties:
        issue_id:
          exclusiveMaximum: 4294967295
          exclusiveMinimum: 0
          title: Issue Id
          type: integer
        score_value:
          anyOf:
          - type: number
          - pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            type: string
          title: Score Value
      required:
      - issue_id
      - score_value
      title: SectionScore
      type: object
    postrfp__shared__serial__scoremodels__SectionScore:
      properties:
        section_id:
          title: Section Id
          type: integer
        issue_id:
          title: Issue Id
          type: integer
        question_count:
          title: Question Count
          type: integer
        questions_scored:
          title: Questions Scored
          type: integer
        score:
          anyOf:
          - type: number
          - type: 'null'
          default:
          title: Score
      required:
      - section_id
      - issue_id
      - question_count
      - questions_scored
      title: SectionScore
      type: object
