openapi: 3.0.0
info:
  version: '0.0'
  title: Qomon
  description: |-
    This is Qomon's API definition.

    To get an authorization go to [Qomon's setting page](https://qomon.app/settings/extensions/connect) and create an API key.
servers:
  - description: Qomon production
    url: https://qomon.app/api
  - description: Qomon integration
    url: https://test.quorumapps.com/api
  - description: Qomon local
    url: http://localhost:8080

paths:
  /zapier/sample/{event}:
    get:
      tags:
        - Events
      summary: Retrieve all event published in the last 24H
      parameters: 
        - name: event
          in: path
          schema:
            type: string
          required: true
      responses:
        '200':
          description: |-
            Successful response
             
            Returns every event published in the last 24h, it's an array of jsons as provided by the backend + event posted on `/zapier/event/{event}/{id}`
          content:
            application/json:
              schema:
                type: array
                items: 
                  type: object

  /zapier/event/{event}/{id}:
    post:
      tags: 
        - Events
      summary: Publish a new event
      parameters: 
        - name: event
          in: path
          schema:
            type: string
          required: true
        - name: id
          in: path
          schema:
            type: string
          required: true
      requestBody:
        description: The content of the event, just a json, whatever you want
        content:
          application/json:
            schema: 
              type: object
      responses:
        '200':
          description: Successful response
        default:
          description: Something wrong happened
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    cookieAuth:
      type: apiKey
      in: cookie
      name: SID
security:
  # - cookieAuth: []
  - bearerAuth: []
