openapi: 3.1.0
info:
  version: 1.0.0
  title: Events
components:
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
  schemas:
    CloudEvent:
      type: object
      properties:
        specversion:
          type: string
          enum:
            - '1.0'
          description: The version of the CloudEvents specification which the event uses.
        source:
          type: string
          example: cloud.upowr.<env>
          description: Identifies the context in which an event happened.
        id:
          type: string
          description: A unique identifier for the event.
        sequence:
          type: number
          description: >-
            A unique (when combined with source), monotonically increasing
            sequence number that starts with 0. It can be used to detect
            duplicate events..
        time:
          type: string
          format: date-time
          description: Timestamp of when the event happened.
        data:
          type: object
          description: The event payload.
          additionalProperties: true
      required:
        - specversion
        - type
        - source
        - id
        - sequence
        - time
    Currency:
      type: object
      properties:
        currency:
          type: string
        formatted:
          type: string
        precision:
          type: integer
        value:
          type: integer
    Customer.ContactDetailsChanged:
      type: object
      description: >-
        The name, email, mobile number, or mobile verification status of the
        customer has been changed
      properties:
        data:
          type: object
          properties:
            firstName:
              type: string
            lastName:
              type: string
            email:
              type: string
              format: email
            mobile:
              type: string
              description: 'format: ^+[1-9]{1}[0-9]{0,2}[0-9]{10,12}$'
              example: '+61400000000'
            isVerifiedMobile:
              type: boolean
              description: Has the customer verified their mobile number
          required:
            - email
            - mobile
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Customer.Created:
      type: object
      description: A new customer has been created
      properties:
        data:
          type: object
          properties:
            firstName:
              type: string
            lastName:
              type: string
            email:
              type: string
              format: email
            mobile:
              type: string
              description: 'format: ^+[1-9]{1}[0-9]{0,2}[0-9]{10,12}$'
            ref:
              type: string
            xref:
              type: string
            class:
              type: string
            primeContractor:
              type: string
          required:
            - email
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Customer.PrimeContractorChanged:
      type: object
      description: The prime contractor for a customer has been changed
      properties:
        data:
          type: object
          properties:
            primeContractor:
              type: string
              example: initech
          required:
            - primeContractor
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
    File:
      type: object
      properties:
        code:
          type: string
        directory:
          type: string
        fileName:
          type: string
        hash:
          type: string
        href:
          type: string
        label:
          type: string
        lastModified:
          type: string
          format: date-time
        sizeBytes:
          type: integer
        type:
          type: string
      required:
        - code
        - directory
        - fileName
        - hash
        - label
        - sizeBytes
        - type
    Job.Accepted:
      type: object
      description: A job has been accepted by the installer
      properties:
        data:
          type: object
          properties:
            jobId:
              type: string
              format: uuid
            jobRef:
              type: string
            parentJobId:
              type: string
              format: uuid
            jobType:
              type: string
            installerCompanyId:
              description: The id of the company that has accepted the job
              example: initech
            scheduledAt:
              type: string
              format: date-time
            scheduledAtLocal:
              type: string
              format: date-time
          required:
            - jobId
            - jobRef
            - jobType
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Job.Assigned:
      type: object
      description: A job has been assigned to an installer company
      properties:
        data:
          type: object
          properties:
            jobId:
              type: string
              format: uuid
            jobRef:
              type: string
            parentJobId:
              type: string
              format: uuid
            jobType:
              type: string
            installerCompanyId:
              type: string
              description: The id of the company to which the job was assigned
              example: initech
            isAssignedToApp:
              type: boolean
              description: Whether the job has been assigned to the installer app
          required:
            - jobId
            - jobRef
            - jobType
            - installerCompanyId
            - isAssignedToApp
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Job.Cancelled:
      type: object
      description: A job has been cancelled
      properties:
        data:
          type: object
          properties:
            jobId:
              type: string
              format: uuid
            jobRef:
              type: string
            parentJobId:
              type: string
              format: uuid
            jobType:
              type: string
            cancelReason:
              type: string
              description: The reason for rejection
              example: Customer believes solar panels cause covid
            cancelledByUserId:
              type: string
              description: The user id of the user who rejected the job
          required:
            - jobId
            - jobRef
            - jobType
            - installerCompanyId
            - cancelReason
            - cancelledByUserId
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Job.Completed:
      type: object
      description: A new job has been completed
      properties:
        data:
          type: object
          properties:
            jobId:
              type: string
              format: uuid
            jobRef:
              type: string
            parentJobId:
              type: string
              format: uuid
            jobType:
              type: string
          required:
            - jobId
            - jobRef
            - jobType
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Job.Confirmed:
      type: object
      description: A job has been confirmed by the installer
      properties:
        data:
          type: object
          properties:
            jobId:
              type: string
              format: uuid
            jobRef:
              type: string
            parentJobId:
              type: string
              format: uuid
            jobType:
              type: string
            installerCompanyId:
              description: The id of the company that has accepted the job
              example: initech
            scheduledAt:
              type: string
              format: date-time
            scheduledAtLocal:
              type: string
              format: date-time
          required:
            - jobId
            - jobRef
            - jobType
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Job.Created:
      type: object
      description: A new job has been created
      properties:
        data:
          type: object
          properties:
            jobId:
              type: string
              format: uuid
            jobRef:
              type: string
            parentJobId:
              type: string
              format: uuid
            jobType:
              type: string
          required:
            - jobId
            - jobRef
            - jobType
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Job.FileAdded:
      type: object
      description: A file has been added to a job
      properties:
        data:
          type: object
          properties:
            jobId:
              type: string
              format: uuid
            jobRef:
              type: string
            parentJobId:
              type: string
              format: uuid
            jobType:
              type: string
            file:
              $ref: '#/components/schemas/File'
          required:
            - jobId
            - jobRef
            - jobType
            - file
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Job.InstallerTaskSubmitted:
      type: object
      description: The installer has submitted a task on a job
      properties:
        data:
          type: object
          properties:
            jobId:
              type: string
              format: uuid
            jobRef:
              type: string
            parentJobId:
              type: string
              format: uuid
            jobType:
              type: string
            taskId:
              description: The id of the installer task that was submitted
              example: customer_survey
              type: string
          required:
            - jobId
            - jobRef
            - jobType
            - taskId
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Job.Rejected:
      type: object
      description: A job has been rejected by the installer
      properties:
        data:
          type: object
          properties:
            jobId:
              type: string
              format: uuid
            jobRef:
              type: string
            parentJobId:
              type: string
              format: uuid
            jobType:
              type: string
            installerCompanyId:
              type: string
              description: The id of the company that has rejected the job
              example: initech
            rejectionReason:
              description: The reason for rejection
              example: I'm on holiday in a yurt without an internet connection
              type: string
            rejectedByInstallerUserId:
              type: string
              description: The user id of the installer who rejected the job
          required:
            - jobId
            - jobRef
            - jobType
            - installerCompanyId
            - rejectionReason
            - rejectedByInstallerUserId
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Job.Rescheduled:
      type: object
      description: A job has been rescheduled by the installer
      properties:
        data:
          type: object
          properties:
            jobId:
              type: string
              format: uuid
            jobRef:
              type: string
            parentJobId:
              type: string
              format: uuid
            jobType:
              type: string
            installerCompanyId:
              description: The id of the company that has accepted the job
              example: initech
            scheduledAt:
              type: string
              format: date-time
            scheduledAtLocal:
              type: string
              format: date-time
            rescheduleReason:
              type: string
              description: The reason for rescheduling
              example: Clash with Taylor Swift concert
            previouslyScheduledAt:
              type: string
              format: date-time
            previouslyScheduledAtLocal:
              type: string
              format: date-time
          required:
            - jobId
            - jobRef
            - jobType
            - previouslyScheduledAt
            - previouslyScheduledAtLocal
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Job.Reviewed:
      type: object
      description: A review has been added to a job
      properties:
        data:
          type: object
          properties:
            jobId:
              type: string
              format: uuid
            jobRef:
              type: string
            parentJobId:
              type: string
              format: uuid
            jobType:
              type: string
            userEmail:
              description: The email of the user who submitted the review
              type: string
              format: email
            reviewType:
              type: string
              example: Site inspection review
            reviewData:
              type: object
              additionalProperties: true
              properties:
                outcome:
                  type: string
                  description: The outcome of the review
                  example: no_action
                comments:
                  type: string
                  description: Comments on the review
                  example: The site was clean and tidy
            displayReviewData:
              example:
                - name: outcome
                  label: QA Outcome
                  value: no_action
                  displayValue: Compliant and meets standards
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                  label:
                    type: string
                  value: {}
                  displayValue: {}
                required:
                  - name
                  - label
                  - value
                  - displayValue
          required:
            - jobId
            - jobRef
            - jobType
            - userEmail
            - reviewType
            - reviewData
            - displayReviewData
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Job.Scheduled:
      type: object
      description: >-
        A job has been scheduled by the installer. NOTE: Jobs can be scheduled
        when they are accepted. In those cases this event will not fire
      properties:
        data:
          type: object
          properties:
            jobId:
              type: string
              format: uuid
            jobRef:
              type: string
            parentJobId:
              type: string
              format: uuid
            jobType:
              type: string
            installerCompanyId:
              type: string
              description: The id of the company that has accepted the job
              example: initech
            scheduledAt:
              type: string
              format: date-time
            scheduledAtLocal:
              type: string
              format: date-time
          required:
            - jobId
            - jobRef
            - jobType
            - scheduledAt
            - scheduledAtLocal
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Job.StateChanged:
      type: object
      description: >-
        A job has a new state. NOTE: This event will fire even if the state is
        the same as it was before.
      properties:
        data:
          type: object
          properties:
            jobId:
              type: string
              format: uuid
            jobRef:
              type: string
            parentJobId:
              type: string
              format: uuid
            jobType:
              type: string
            oldState:
              $ref: '#/components/schemas/PublicJobstatusenum'
              description: The previous state
              example: ASSIGNED
            newState:
              $ref: '#/components/schemas/PublicJobstatusenum'
              description: The new state
              example: ACCEPTED
          required:
            - jobId
            - jobRef
            - jobType
            - newState
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Job.Submitted:
      type: object
      description: The installer has submitted all tasks on a job
      properties:
        data:
          type: object
          properties:
            jobId:
              type: string
              format: uuid
            jobRef:
              type: string
            parentJobId:
              type: string
              format: uuid
            jobType:
              type: string
            taskIds:
              description: The ids of the installer tasks that have been submitted
              type: array
              example:
                - customer_survey
                - site_inspection
              items:
                type: string
          required:
            - jobId
            - jobRef
            - jobType
            - taskIds
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Job.Unassigned:
      type: object
      description: A job has been unassigned from an installer company
      properties:
        data:
          type: object
          properties:
            jobId:
              type: string
              format: uuid
            jobRef:
              type: string
            parentJobId:
              type: string
              format: uuid
            jobType:
              type: string
            installerCompanyId:
              type: string
              description: The id of the company that the job was unassigned from
              example: initech
            isAssignedToApp:
              type: boolean
              description: Whether the job has been assigned to the installer app
          required:
            - jobId
            - jobRef
            - jobType
            - installerCompanyId
            - isAssignedToApp
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Job.WeatherForecastAdded:
      type: object
      description: A weather forecast has been added to a job
      properties:
        data:
          type: object
          properties:
            jobId:
              type: string
              format: uuid
            jobRef:
              type: string
            parentJobId:
              type: string
              format: uuid
            jobType:
              type: string
            forecastDate:
              description: >-
                The date and time for which this weather forecast applies. Will
                typically match the job scheduled date at the time the forecast
                was retrieved. Note as this is a future date, there is no
                timezone information and the time is assumed to be in the local
                timezone of the job.
              type: string
              format: date-time
            minTemperatureC:
              description: Minimum forecasted temperature in degrees Celsius.
              type: number
              example: 12
            maxTemperatureC:
              description: Maximum forecasted temperature in degrees Celsius.
              type: number
              example: 24
            precipitationMm:
              description: Expected precipitation amount in millimetres.
              type: number
              example: 0
            rainProbability:
              description: >-
                Probability of rain as a decimal between 0 and 1. Example 0.75
                means 75% chance of rain.
              type: number
              example: 0
            windSpeedKmh:
              description: Average wind speed in kilometres per hour.
              type: number
              example: 10
            windDirection:
              description: >-
                Wind direction using 16-point compass notation (N, NNE, NE, ENE,
                E, ESE, SE, SSE, S, SSW, SW, WSW, W, WNW, NW, NNW).
              type: string
              example: NNW
            conditions:
              description: >-
                General weather conditions description (e.g., Sunny, Cloudy,
                Rain).
              type: string
              example: Clear
          required:
            - jobId
            - jobRef
            - jobType
            - forecastDate
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Project.ContractAccepted:
      type: object
      description: The contract for a project has been accepted by the customer
      properties:
        data:
          type: object
          properties:
            acceptedAt:
              type: string
              format: date-time
          required:
            - acceptedAt
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Project.Created:
      type: object
      description: A new project has been created
      properties:
        data:
          type: object
          properties: {}
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Project.DepositPaid:
      type: object
      description: The user has paid the deposit on a project
      properties:
        data:
          type: object
          properties:
            amount:
              $ref: '#/components/schemas/Currency'
          required:
            - amount
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Project.FileAdded:
      type: object
      description: A file has been added to a project
      properties:
        data:
          type: object
          properties:
            file:
              $ref: '#/components/schemas/File'
          required:
            - file
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Project.Rejected:
      type: object
      description: A project has been rejected
      properties:
        data:
          type: object
          properties:
            rejectReason:
              type: string
              description: The reason for rejection
              example: Cannot service location
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Project.StageChanged:
      type: object
      description: A project has a new stage
      properties:
        data:
          type: object
          properties:
            oldStage:
              type: string
              description: The previous stage
              example: ONBOARDING
            newStage:
              type: string
              description: The new stage
              example: QUOTING
            state:
              type: string
              description: The current state
              example: DESIGNING
          required:
            - newStage
            - state
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Project.StateChanged:
      type: object
      description: A project has a new state
      properties:
        data:
          type: object
          properties:
            oldState:
              type: string
              description: The previous state
              example: ONBOARDING
            newState:
              type: string
              description: The new state
              example: DESIGNING
            stage:
              type: string
              description: The current stage
              example: QUOTING
          required:
            - newState
            - stage
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    PublicJobstatusenum:
      type: string
      enum:
        - CREATED
        - OPEN
        - ASSIGNED
        - ACCEPTED
        - SCHEDULED
        - RESCHEDULED
        - SUBMITTED
        - OVERDUE
        - UNSATISFACTORY
        - COMPLETED
        - PAID
        - CANCELLED
        - REJECTED
        - PREPARED
        - REVIEWED
        - COMMISSIONED
    PublicQuoteStatus:
      type: string
      enum:
        - INITIATED
        - DRAFT
        - APPROVED
        - CREATED
        - ACCEPTED
        - REBATE_ELIGIBLE
        - REBATE_APPLIED
        - AWAITING_FINANCING_APPROVAL
        - FINANCING_REJECTED
        - REJECTED
        - VOIDED
        - RETAIL_SIGNUP_EIC_SUBMITTED
        - RETAIL_SIGNUP_PAYMENT_SUBMITTED
        - AWAITING_EXTERNAL_APPROVAL
    Quote.Accepted:
      type: object
      description: A quote has been accepted
      properties:
        data:
          type: object
          properties:
            quoteId:
              type: string
              format: uuid
          required:
            - quoteId
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Quote.Created:
      type: object
      description: A new quote has been created
      properties:
        data:
          type: object
          properties:
            quoteId:
              type: string
              format: uuid
            duplicateOfQuoteId:
              description: The id of the quote that this quote is a duplicate of
              type: string
              format: uuid
            replacementOfQuoteId:
              description: The id of the quote that this quote has replaced
              type: string
              format: uuid
          required:
            - quoteId
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Quote.DiscountChanged:
      type: object
      description: The discount on a quote has been changed
      properties:
        data:
          type: object
          properties:
            quoteId:
              type: string
              format: uuid
            customerCostAmount:
              $ref: '#/components/schemas/Currency'
            customerGrossCostAmount:
              $ref: '#/components/schemas/Currency'
            customerGstAmount:
              $ref: '#/components/schemas/Currency'
            depositAmount:
              $ref: '#/components/schemas/Currency'
            discountAmount:
              $ref: '#/components/schemas/Currency'
          required:
            - quoteId
            - customerCostAmount
            - customerGrossCostAmount
            - customerGstAmount
            - depositAmount
            - discountAmount
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Quote.ExternalApprovalRequested:
      type: object
      description: An external approval has been requested on a quote
      properties:
        data:
          type: object
          properties:
            quoteId:
              type: string
              format: uuid
          required:
            - quoteId
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Quote.ExternalApprovalResponded:
      type: object
      description: >-
        An external approval has been responded to on a quote - this may be
        approved or rejected
      properties:
        data:
          type: object
          properties:
            quoteId:
              type: string
              format: uuid
            approved:
              type: boolean
              description: Whether the external approval was or not
          required:
            - quoteId
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Quote.FileAdded:
      type: object
      description: A file has been added to a quote
      properties:
        data:
          type: object
          properties:
            quoteId:
              type: string
              format: uuid
            file:
              $ref: '#/components/schemas/File'
          required:
            - quoteId
            - file
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Quote.FinanceRequestApproved:
      type: object
      description: A finance request on a quote has been approved
      properties:
        data:
          type: object
          properties:
            quoteId:
              type: string
              format: uuid
            requestId:
              type: string
              format: uuid
            requestProviderName:
              type: string
            requestProductName:
              type: string
            requestState:
              type: string
            requestXRef:
              type: string
            amount:
              $ref: '#/components/schemas/Currency'
          required:
            - quoteId
            - requestId
            - requestProviderName
            - requestProductName
            - requestState
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Quote.FinanceRequestCancelled:
      type: object
      description: A finance request on a quote has been cancelled
      properties:
        data:
          type: object
          properties:
            quoteId:
              type: string
              format: uuid
            requestId:
              type: string
              format: uuid
            requestProviderName:
              type: string
            requestProductName:
              type: string
            requestState:
              type: string
            requestXRef:
              type: string
          required:
            - quoteId
            - requestId
            - requestProviderName
            - requestProductName
            - requestState
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Quote.FinanceRequested:
      type: object
      description: A finance request has been initiated on a quote
      properties:
        data:
          type: object
          properties:
            quoteId:
              type: string
              format: uuid
            requestId:
              type: string
              format: uuid
            requestProviderName:
              type: string
            requestProductName:
              type: string
            requestState:
              type: string
            requestXRef:
              type: string
          required:
            - quoteId
            - requestId
            - requestProviderName
            - requestProductName
            - requestState
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Quote.FinanceRequestRejected:
      type: object
      description: A finance request on a quote has been rejected
      properties:
        data:
          type: object
          properties:
            quoteId:
              type: string
              format: uuid
            requestId:
              type: string
              format: uuid
            requestProviderName:
              type: string
            requestProductName:
              type: string
            requestState:
              type: string
            requestXRef:
              type: string
          required:
            - quoteId
            - requestId
            - requestProviderName
            - requestProductName
            - requestState
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Quote.GovernmentSupportUpdated:
      type: object
      description: The government support configuration on a quote has been updated
      properties:
        data:
          type: object
          properties:
            quoteId:
              type: string
              format: uuid
            customerCostAmount:
              $ref: '#/components/schemas/Currency'
            customerGrossCostAmount:
              $ref: '#/components/schemas/Currency'
            customerGstAmount:
              $ref: '#/components/schemas/Currency'
            isGovSubsidyApplied:
              type: boolean
            govSupportProgram:
              type: string
            govSubsidyAmount:
              $ref: '#/components/schemas/Currency'
            isGovLoanRequested:
              type: boolean
            isGovLoanApplied:
              type: boolean
            govLoanAmount:
              $ref: '#/components/schemas/Currency'
          required:
            - quoteId
            - customerCostAmount
            - customerGrossCostAmount
            - customerGstAmount
            - isGovSubsidyApplied
            - govSupportProgram
            - govSubsidyAmount
            - isGovLoanRequested
            - isGovLoanApplied
            - govLoanAmount
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Quote.ItemsUpdated:
      type: object
      description: The items on a quote have been updated
      properties:
        data:
          type: object
          properties:
            quoteId:
              type: string
              format: uuid
            customerCostAmount:
              $ref: '#/components/schemas/Currency'
            customerGrossCostAmount:
              $ref: '#/components/schemas/Currency'
            customerGstAmount:
              $ref: '#/components/schemas/Currency'
            depositAmount:
              $ref: '#/components/schemas/Currency'
          required:
            - quoteId
            - customerCostAmount
            - customerGrossCostAmount
            - customerGstAmount
            - depositAmount
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Quote.Published:
      type: object
      description: A quote has been published
      properties:
        data:
          type: object
          properties:
            quoteId:
              type: string
              format: uuid
            customerCostAmount:
              $ref: '#/components/schemas/Currency'
            customerGrossCostAmount:
              $ref: '#/components/schemas/Currency'
            customerGstAmount:
              $ref: '#/components/schemas/Currency'
            depositAmount:
              $ref: '#/components/schemas/Currency'
            isBattery:
              type: boolean
            isSolar:
              type: boolean
          required:
            - quoteId
            - customerCostAmount
            - customerGrossCostAmount
            - customerGstAmount
            - depositAmount
            - isBattery
            - isSolar
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Quote.Rejected:
      type: object
      description: A quote has been rejected
      properties:
        data:
          type: object
          properties:
            quoteId:
              type: string
              format: uuid
          required:
            - quoteId
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Quote.StateChanged:
      type: object
      description: A quote has a new state.
      properties:
        data:
          type: object
          properties:
            quoteId:
              type: string
              format: uuid
            oldState:
              $ref: '#/components/schemas/PublicQuoteStatus'
              description: The previous state
              example: DRAFT
            newState:
              $ref: '#/components/schemas/PublicQuoteStatus'
              description: The new state
              example: CREATED
          required:
            - quoteId
            - newState
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Quote.SystemForecasted:
      type: object
      description: The system forecast on a quote has been recalculated
      properties:
        data:
          type: object
          properties:
            quoteId:
              type: string
              format: uuid
            avoidedImportsKwh:
              type: number
            savingsAmount:
              $ref: '#/components/schemas/Currency'
          required:
            - quoteId
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Quote.Voided:
      type: object
      description: A quote has been voided
      properties:
        data:
          type: object
          properties:
            quoteId:
              type: string
              format: uuid
          required:
            - quoteId
        customerId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
      required:
        - data
        - customerId
        - projectId
    Site.AddressChanged:
      type: object
      description: The address on a site has been changed
      properties:
        data:
          type: object
          properties:
            siteId:
              type: string
            addressLine1:
              type: string
            addressLine2:
              type: string
            suburb:
              type: string
            state:
              type: string
            postCode:
              type: string
            latitudeDeg:
              type: number
            longitudeDeg:
              type: number
          required:
            - siteId
            - addressLine1
            - addressLine2
            - suburb
            - state
            - postCode
            - latitudeDeg
            - longitudeDeg
          example:
            addressLine1: 100 Main Road
            suburb: Hobart
            state: TAS
            postCode: 1234
            latitudeDeg: -42.967508
            longitudeDeg: 147.214441
        customerId:
          type: string
          format: uuid
      required:
        - data
        - customerId
    Site.ContactChanged:
      type: object
      description: >-
        The contact details on a site have been changed. Only used for
        commercial sites.
      properties:
        data:
          type: object
          properties:
            siteId:
              type: string
            contactFirstName:
              type: string
            contactLastName:
              type: string
            contactEmail:
              type: string
            contactMobile:
              type: string
          required:
            - siteId
            - contactFirstName
            - contactLastName
            - contactEmail
            - contactMobile
          example:
            contactFirstName: Ray
            contactLastName: Beam
            contactEmail: ray@email.none
            contactMobile: 61400000000
        customerId:
          type: string
          format: uuid
      required:
        - data
        - customerId
    Site.Created:
      type: object
      description: A new Site has been created
      properties:
        data:
          type: object
          properties:
            siteId:
              type: string
            addressLine1:
              type: string
            addressLine2:
              type: string
            suburb:
              type: string
            state:
              type: string
            postCode:
              type: string
            latitudeDeg:
              type: number
            longitudeDeg:
              type: number
            timezone:
              type: string
            phaseNum:
              type: integer
            dnsp:
              type: string
            nmi:
              type: string
          required:
            - siteId
            - addressLine1
            - addressLine2
            - suburb
            - state
            - postCode
            - latitudeDeg
            - longitudeDeg
            - timezone
            - phaseNum
            - dnsp
            - nmi
          example:
            addressLine1: 100 Main Road
            suburb: Hobart
            state: TAS
            postCode: 1234
            latitudeDeg: -42.967508
            longitudeDeg: 147.214441
            timezone: Australia/Hobart
            phaseNum: 2
            dnsp: NL0000TSTEST0
            nmi: 123456789
        customerId:
          type: string
          format: uuid
      required:
        - data
        - customerId
    Site.Rejected:
      type: object
      description: A site has been rejected
      properties:
        data:
          type: object
          properties:
            siteId:
              type: string
            rejectionReason:
              type: string
              description: The reason for rejection
              example: This is not a house, it is a cow.
          required:
            - siteId
            - rejectionReason
        customerId:
          type: string
          format: uuid
      required:
        - data
        - customerId
    Site.VppAssetDetailsConfirmed:
      type: object
      description: The VPP asset details on a site have been confirmed
      properties:
        data:
          type: object
          properties:
            siteId:
              type: string
          required:
            - siteId
        customerId:
          type: string
          format: uuid
      required:
        - data
        - customerId
    Site.VppAssetOnboarded:
      type: object
      description: The VPP asset has been onboarded
      properties:
        data:
          type: object
          properties:
            siteId:
              type: string
          required:
            - siteId
        customerId:
          type: string
          format: uuid
      required:
        - data
        - customerId
    Site.VppAssetRejected:
      type: object
      description: The VPP asset has been rejected
      properties:
        data:
          type: object
          properties:
            siteId:
              type: string
          required:
            - siteId
        customerId:
          type: string
          format: uuid
      required:
        - data
        - customerId
webhooks:
  Project.Created:
    post:
      summary: Created
      description: A new project has been created
      tags:
        - Project
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Project.Created
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Project.Created'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Project.ContractAccepted:
    post:
      summary: ContractAccepted
      description: The contract for a project has been accepted by the customer
      tags:
        - Project
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Project.ContractAccepted
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Project.ContractAccepted'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Project.DepositPaid:
    post:
      summary: DepositPaid
      description: The user has paid the deposit on a project
      tags:
        - Project
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Project.DepositPaid
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Project.DepositPaid'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Project.FileAdded:
    post:
      summary: FileAdded
      description: A file has been added to a project
      tags:
        - Project
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Project.FileAdded
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Project.FileAdded'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Project.Rejected:
    post:
      summary: Rejected
      description: A project has been rejected
      tags:
        - Project
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Project.Rejected
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Project.Rejected'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Site.AddressChanged:
    post:
      summary: AddressChanged
      description: The address on a site has been changed
      tags:
        - Site
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Site.AddressChanged
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Site.AddressChanged'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Site.ContactChanged:
    post:
      summary: ContactChanged
      description: >-
        The contact details on a site have been changed. Only used for
        commercial sites.
      tags:
        - Site
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Site.ContactChanged
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Site.ContactChanged'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Site.Created:
    post:
      summary: Created
      description: A new Site has been created
      tags:
        - Site
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Site.Created
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Site.Created'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Site.Rejected:
    post:
      summary: Rejected
      description: A site has been rejected
      tags:
        - Site
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Site.Rejected
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Site.Rejected'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Site.VppAssetDetailsConfirmed:
    post:
      summary: VppAssetDetailsConfirmed
      description: The VPP asset details on a site have been confirmed
      tags:
        - Site
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Site.VppAssetDetailsConfirmed
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Site.VppAssetDetailsConfirmed'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Site.VppAssetOnboarded:
    post:
      summary: VppAssetOnboarded
      description: The VPP asset has been onboarded
      tags:
        - Site
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Site.VppAssetOnboarded
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Site.VppAssetOnboarded'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Site.VppAssetRejected:
    post:
      summary: VppAssetRejected
      description: The VPP asset has been rejected
      tags:
        - Site
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Site.VppAssetRejected
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Site.VppAssetRejected'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Customer.Created:
    post:
      summary: Created
      description: A new customer has been created
      tags:
        - Customer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Customer.Created
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Customer.Created'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Customer.ContactDetailsChanged:
    post:
      summary: ContactDetailsChanged
      description: >-
        The name, email, mobile number, or mobile verification status of the
        customer has been changed
      tags:
        - Customer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Customer.ContactDetailsChanged
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Customer.ContactDetailsChanged'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Customer.PrimeContractorChanged:
    post:
      summary: PrimeContractorChanged
      description: The prime contractor for a customer has been changed
      tags:
        - Customer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Customer.PrimeContractorChanged
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Customer.PrimeContractorChanged'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Job.Created:
    post:
      summary: Created
      description: A new job has been created
      tags:
        - Job
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Job.Created
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Job.Created'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Job.StateChanged:
    post:
      summary: StateChanged
      description: >-
        A job has a new state. NOTE: This event will fire even if the state is
        the same as it was before.
      tags:
        - Job
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Job.StateChanged
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Job.StateChanged'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Job.Assigned:
    post:
      summary: Assigned
      description: A job has been assigned to an installer company
      tags:
        - Job
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Job.Assigned
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Job.Assigned'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Job.Unassigned:
    post:
      summary: Unassigned
      description: A job has been unassigned from an installer company
      tags:
        - Job
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Job.Unassigned
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Job.Unassigned'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Job.Scheduled:
    post:
      summary: Scheduled
      description: >-
        A job has been scheduled by the installer. NOTE: Jobs can be scheduled
        when they are accepted. In those cases this event will not fire
      tags:
        - Job
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Job.Scheduled
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Job.Scheduled'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Job.Accepted:
    post:
      summary: Accepted
      description: A job has been accepted by the installer
      tags:
        - Job
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Job.Accepted
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Job.Accepted'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Job.Confirmed:
    post:
      summary: Confirmed
      description: A job has been confirmed by the installer
      tags:
        - Job
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Job.Confirmed
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Job.Confirmed'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Job.Rescheduled:
    post:
      summary: Rescheduled
      description: A job has been rescheduled by the installer
      tags:
        - Job
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Job.Rescheduled
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Job.Rescheduled'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Job.Rejected:
    post:
      summary: Rejected
      description: A job has been rejected by the installer
      tags:
        - Job
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Job.Rejected
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Job.Rejected'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Job.Cancelled:
    post:
      summary: Cancelled
      description: A job has been cancelled
      tags:
        - Job
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Job.Cancelled
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Job.Cancelled'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Job.Completed:
    post:
      summary: Completed
      description: A new job has been completed
      tags:
        - Job
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Job.Completed
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Job.Completed'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Job.FileAdded:
    post:
      summary: FileAdded
      description: A file has been added to a job
      tags:
        - Job
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Job.FileAdded
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Job.FileAdded'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Job.InstallerTaskSubmitted:
    post:
      summary: InstallerTaskSubmitted
      description: The installer has submitted a task on a job
      tags:
        - Job
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Job.InstallerTaskSubmitted
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Job.InstallerTaskSubmitted'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Job.Submitted:
    post:
      summary: Submitted
      description: The installer has submitted all tasks on a job
      tags:
        - Job
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Job.Submitted
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Job.Submitted'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Job.Reviewed:
    post:
      summary: Reviewed
      description: A review has been added to a job
      tags:
        - Job
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Job.Reviewed
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Job.Reviewed'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Job.WeatherForecastAdded:
    post:
      summary: WeatherForecastAdded
      description: A weather forecast has been added to a job
      tags:
        - Job
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Job.WeatherForecastAdded
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Job.WeatherForecastAdded'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Quote.Created:
    post:
      summary: Created
      description: A new quote has been created
      tags:
        - Quote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Quote.Created
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Quote.Created'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Quote.StateChanged:
    post:
      summary: StateChanged
      description: A quote has a new state.
      tags:
        - Quote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Quote.StateChanged
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Quote.StateChanged'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Quote.FileAdded:
    post:
      summary: FileAdded
      description: A file has been added to a quote
      tags:
        - Quote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Quote.FileAdded
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Quote.FileAdded'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Quote.Accepted:
    post:
      summary: Accepted
      description: A quote has been accepted
      tags:
        - Quote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Quote.Accepted
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Quote.Accepted'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Quote.Published:
    post:
      summary: Published
      description: A quote has been published
      tags:
        - Quote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Quote.Published
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Quote.Published'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Quote.Rejected:
    post:
      summary: Rejected
      description: A quote has been rejected
      tags:
        - Quote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Quote.Rejected
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Quote.Rejected'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Quote.Voided:
    post:
      summary: Voided
      description: A quote has been voided
      tags:
        - Quote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Quote.Voided
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Quote.Voided'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Quote.DiscountChanged:
    post:
      summary: DiscountChanged
      description: The discount on a quote has been changed
      tags:
        - Quote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Quote.DiscountChanged
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Quote.DiscountChanged'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Quote.ItemsUpdated:
    post:
      summary: ItemsUpdated
      description: The items on a quote have been updated
      tags:
        - Quote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Quote.ItemsUpdated
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Quote.ItemsUpdated'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Quote.GovernmentSupportUpdated:
    post:
      summary: GovernmentSupportUpdated
      description: The government support configuration on a quote has been updated
      tags:
        - Quote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Quote.GovernmentSupportUpdated
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Quote.GovernmentSupportUpdated'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Quote.SystemForecasted:
    post:
      summary: SystemForecasted
      description: The system forecast on a quote has been recalculated
      tags:
        - Quote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Quote.SystemForecasted
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Quote.SystemForecasted'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Quote.ExternalApprovalRequested:
    post:
      summary: ExternalApprovalRequested
      description: An external approval has been requested on a quote
      tags:
        - Quote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Quote.ExternalApprovalRequested
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Quote.ExternalApprovalRequested'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Quote.ExternalApprovalResponded:
    post:
      summary: ExternalApprovalResponded
      description: >-
        An external approval has been responded to on a quote - this may be
        approved or rejected
      tags:
        - Quote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Quote.ExternalApprovalResponded
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Quote.ExternalApprovalResponded'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Quote.FinanceRequested:
    post:
      summary: FinanceRequested
      description: A finance request has been initiated on a quote
      tags:
        - Quote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Quote.FinanceRequested
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Quote.FinanceRequested'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Quote.FinanceRequestApproved:
    post:
      summary: FinanceRequestApproved
      description: A finance request on a quote has been approved
      tags:
        - Quote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Quote.FinanceRequestApproved
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Quote.FinanceRequestApproved'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Quote.FinanceRequestRejected:
    post:
      summary: FinanceRequestRejected
      description: A finance request on a quote has been rejected
      tags:
        - Quote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Quote.FinanceRequestRejected
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Quote.FinanceRequestRejected'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Quote.FinanceRequestCancelled:
    post:
      summary: FinanceRequestCancelled
      description: A finance request on a quote has been cancelled
      tags:
        - Quote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Quote.FinanceRequestCancelled
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Quote.FinanceRequestCancelled'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Project.StageChanged:
    post:
      summary: StageChanged
      description: A project has a new stage
      tags:
        - Project
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Project.StageChanged
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Project.StageChanged'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
  Project.StateChanged:
    post:
      summary: StateChanged
      description: A project has a new state
      tags:
        - Project
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: Project.StateChanged
                - $ref: '#/components/schemas/CloudEvent'
                - $ref: '#/components/schemas/Project.StateChanged'
      responses:
        '200':
          description: Event was handled successfully.
        '500':
          description: Error encountered while handling the event. It will be resent later.
