openapi: 3.0.0
paths:
  /renders:
    get:
      operationId: RendersController_findAll
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RenderResponse'
      security:
        - bearer: []
      tags:
        - Renders
    post:
      operationId: RendersController_create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RenderDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderResponse'
      security:
        - bearer: []
      tags:
        - Renders
  /renders/{id}:
    get:
      operationId: RendersController_findOne
      parameters:
        - name: id
          required: true
          in: path
          description: The ID of the render
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderResponse'
      security:
        - bearer: []
      tags:
        - Renders
  /renders/project/{id}:
    get:
      operationId: RendersController_findAllRendersForProject
      parameters:
        - name: id
          required: true
          in: path
          description: The ID of the render
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RenderResponse'
      security:
        - bearer: []
      tags:
        - Renders
  /renders/logs/{id}:
    get:
      operationId: RendersController_renderLogs
      parameters:
        - name: direction
          required: true
          in: query
          description: Order by direction
          schema:
            enum:
              - ASC
              - DESC
            type: string
        - name: from
          required: true
          in: query
          description: The date from which to start filtering the logs
          schema:
            type: string
        - name: id
          required: true
          in: path
          description: The ID of the render
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogsResponse'
      security:
        - bearer: []
      tags:
        - Renders
  /renders/run:
    put:
      operationId: RendersController_runRender
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunDto'
      responses:
        '200':
          description: ''
      security:
        - bearer: []
      tags:
        - Renders
  /apikey:
    get:
      operationId: ApiKeyController_findAll
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ApiKey'
      security:
        - bearer: []
      tags:
        - ApiKey
    post:
      operationId: ApiKeyController_create
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiKey'
      security:
        - bearer: []
      tags:
        - ApiKey
  /apikey/{id}:
    delete:
      operationId: ApiKeyController_deleteOne
      parameters:
        - name: id
          required: true
          in: path
          description: The ID of the pipeline
          schema:
            type: string
      responses:
        '200':
          description: ''
      security:
        - bearer: []
      tags:
        - ApiKey
  /files/upload:
    post:
      operationId: FilesController_upload
      parameters: []
      requestBody:
        required: true
        description: File
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileUploadDto'
      responses:
        '201':
          description: ''
      security:
        - bearer: []
      tags:
        - Files
  /files/list:
    get:
      operationId: FilesController_list
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FileListDto'
      security:
        - bearer: []
      tags:
        - Files
  /files/file/{id}:
    get:
      operationId: FilesController_file
      parameters:
        - name: id
          required: true
          in: path
          description: The ID of the file
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileResponseDto'
      security:
        - bearer: []
      tags:
        - Files
  /files/s3config:
    get:
      operationId: FilesController_s3
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/S3Config'
      security:
        - bearer: []
      tags:
        - Files
  /pipeline:
    get:
      operationId: PipelinesController_findAll
      parameters: []
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Pipeline'
      security:
        - bearer: []
      tags:
        - Pipelines
    post:
      operationId: PipelinesController_create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePipelineDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pipeline'
      security:
        - bearer: []
      tags:
        - Pipelines
    put:
      operationId: PipelinesController_update
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdatePipelineDto'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pipeline'
      security:
        - bearer: []
      tags:
        - Pipelines
  /pipeline/project/{projectId}:
    get:
      operationId: PipelinesController_findByProject
      parameters:
        - name: projectId
          required: true
          in: path
          description: The projectId for the pipelines to be selected
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Pipeline'
      security:
        - bearer: []
      tags:
        - Pipelines
  /pipeline/{id}:
    delete:
      operationId: PipelinesController_deleteOne
      parameters:
        - name: id
          required: true
          in: path
          description: The ID of the pipeline
          schema:
            type: string
      responses:
        '200':
          description: ''
      security:
        - bearer: []
      tags:
        - Pipelines
    get:
      operationId: PipelinesController_findOne
      parameters:
        - name: id
          required: true
          in: path
          description: The ID of the pipeline
          schema:
            type: string
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Pipeline'
      security:
        - bearer: []
      tags:
        - Pipelines
  /pipeline/transpile:
    post:
      operationId: PipelinesController_transpile
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TranspilerRequest'
      responses:
        default:
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TranspilerResponse'
      security:
        - bearer: []
      tags:
        - Pipelines
info:
  title: FFmpeglab
  description: FFmpeglab API
  version: '1.0'
  contact: {}
tags:
  - name: ffmpeglab
    description: ''
servers: []
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http
  schemas:
    EditorProjectConfiguration:
      type: object
      properties:
        length:
          type: number
        width:
          type: number
        height:
          type: number
        lastUpdated:
          type: number
        start:
          type: number
        end:
          type: number
        outputFilePath:
          type: string
        compressionLevel:
          type: number
        framerate:
          type: number
        opacity:
          type: number
        aspectRatio:
          type: string
        preset:
          type: string
          enum:
            - ultrafast
            - superfast
            - veryfast
            - faster
            - fast
            - medium
            - slow
            - slower
            - veryslow
        output:
          type: string
          enum:
            - mp4
            - gif
            - mp3
            - mov
            - avi
            - mkv
            - png
            - jpg
        code:
          type: string
        selectedCode:
          type: string
          enum:
            - generated
            - custom
      required:
        - length
        - width
        - height
        - lastUpdated
        - start
        - end
        - outputFilePath
        - compressionLevel
        - framerate
        - opacity
        - aspectRatio
        - preset
        - output
        - code
        - selectedCode
    EditorProject:
      type: object
      properties:
        id:
          type: string
        userId:
          type: string
        title:
          type: string
        date:
          type: number
        folderId:
          type: string
        orderId:
          type: number
        editor:
          $ref: '#/components/schemas/EditorProjectConfiguration'
      required:
        - id
        - userId
        - title
        - date
        - folderId
        - orderId
        - editor
    EditorLayerParams:
      type: object
      properties:
        muted:
          type: boolean
        videoDisabled:
          type: boolean
        isCommentLayer:
          type: boolean
      required:
        - muted
        - videoDisabled
        - isCommentLayer
    PositionParams:
      type: object
      properties:
        top:
          type: number
        bottom:
          type: number
        left:
          type: number
        right:
          type: number
      required:
        - top
        - bottom
        - left
        - right
    Resize:
      type: object
      properties:
        x:
          type: number
        'y':
          type: number
      required:
        - x
        - 'y'
    RGB:
      type: object
      properties:
        r:
          type: number
        g:
          type: number
        b:
          type: number
      required:
        - r
        - g
        - b
    EncoderProjectEncoding:
      type: object
      properties:
        outputFilePath:
          type: string
        compressionLevel:
          type: number
        width:
          type: number
        height:
          type: number
        crf:
          type: number
        preset:
          type: string
          enum:
            - ultrafast
            - superfast
            - veryfast
            - faster
            - fast
            - medium
            - slow
            - slower
            - veryslow
        output:
          type: string
          enum:
            - mp4
            - gif
            - mp3
            - mov
            - avi
            - mkv
            - png
            - jpg
        code:
          type: array
          items:
            type: string
        lastUpdated:
          type: number
        start:
          type: number
        end:
          type: number
        soundVolume:
          type: number
        opacity:
          type: number
        reverse:
          type: boolean
        speed:
          type: number
          enum:
            - 0.5
            - 0.6
            - 0.7
            - 0.8
            - 0.9
            - 1
            - 1.1
            - 1.2
            - 1.3
            - 1.4
            - 1.5
            - 1.6
            - 1.7
            - 1.8
            - 1.9
            - 2
        transitionIn:
          type: string
          enum:
            - none
            - fade
            - fadeblack
            - fadewhite
            - distance
            - wipeleft
            - wiperight
            - wipeup
            - wipedown
            - slideleft
            - slideright
            - slideup
            - slidedown
            - smoothleft
            - smoothright
            - smoothup
            - smoothdown
            - fadegrays
            - squeezev
            - squeezeh
            - zoomin
            - dissolve
            - pixelize
            - radial
            - hblur
            - wipetl
            - wipetr
            - wipebl
            - wipebr
            - hlslice
            - hrslice
            - vuslice
            - vdslice
            - circlecrop
            - rectcrop
            - circleclose
            - circleopen
            - horzclose
            - horzopen
            - vertclose
            - vertopen
        transitionOut:
          type: string
          enum:
            - none
            - fade
            - fadeblack
            - fadewhite
            - distance
            - wipeleft
            - wiperight
            - wipeup
            - wipedown
            - slideleft
            - slideright
            - slideup
            - slidedown
            - smoothleft
            - smoothright
            - smoothup
            - smoothdown
            - fadegrays
            - squeezev
            - squeezeh
            - zoomin
            - dissolve
            - pixelize
            - radial
            - hblur
            - wipetl
            - wipetr
            - wipebl
            - wipebr
            - hlslice
            - hrslice
            - vuslice
            - vdslice
            - circlecrop
            - rectcrop
            - circleclose
            - circleopen
            - horzclose
            - horzopen
            - vertclose
            - vertopen
        transitionInDuration:
          type: number
        transitionOutDuration:
          type: number
        pan:
          $ref: '#/components/schemas/PositionParams'
        crop:
          $ref: '#/components/schemas/PositionParams'
        resize:
          $ref: '#/components/schemas/Resize'
        color:
          $ref: '#/components/schemas/RGB'
        scale:
          type: number
      required:
        - outputFilePath
        - compressionLevel
        - width
        - height
        - crf
        - preset
        - output
        - code
        - lastUpdated
        - start
        - end
        - soundVolume
        - opacity
        - reverse
        - speed
        - transitionIn
        - transitionOut
        - transitionInDuration
        - transitionOutDuration
        - pan
        - crop
        - resize
        - color
        - scale
    EncoderProject:
      type: object
      properties:
        id:
          type: string
        uri:
          type: string
        url:
          type: string
        date:
          type: number
        folderId:
          type: string
        title:
          type: string
        description:
          type: string
        filename:
          type: string
        fileType:
          type: string
        userId:
          type: string
        size:
          type: number
        type:
          type: string
        hasCloud:
          type: boolean
        hasAudio:
          type: boolean
        width:
          type: number
        height:
          type: number
        orderId:
          type: number
        duration:
          type: number
        isCopy:
          type: string
        isVideo:
          type: boolean
        isAudio:
          type: boolean
        isTextFile:
          type: string
        isReplace:
          type: boolean
        encoding:
          $ref: '#/components/schemas/EncoderProjectEncoding'
      required:
        - id
        - uri
        - url
        - date
        - folderId
        - title
        - description
        - filename
        - fileType
        - userId
        - size
        - type
        - hasCloud
        - hasAudio
        - width
        - height
        - orderId
        - duration
        - isCopy
        - isVideo
        - isAudio
        - isTextFile
        - isReplace
        - encoding
    EditorLayer:
      type: object
      properties:
        id:
          type: string
        userId:
          type: string
        title:
          type: string
        date:
          type: number
        folderId:
          type: string
        orderId:
          type: number
        isEditorLayer:
          type: boolean
        editor:
          $ref: '#/components/schemas/EditorLayerParams'
        media:
          type: array
          items:
            $ref: '#/components/schemas/EncoderProject'
      required:
        - id
        - userId
        - title
        - date
        - folderId
        - orderId
        - isEditorLayer
        - editor
        - media
    RenderData:
      type: object
      properties:
        project:
          $ref: '#/components/schemas/EditorProject'
        layers:
          type: array
          items:
            $ref: '#/components/schemas/EditorLayer'
      required:
        - project
        - layers
    Media:
      type: object
      properties:
        id:
          type: string
        uri:
          type: string
        url:
          type: string
        date:
          type: number
        folderId:
          type: string
        title:
          type: string
        description:
          type: string
        filename:
          type: string
        fileType:
          type: string
        userId:
          type: string
        size:
          type: number
        type:
          type: string
        hasCloud:
          type: boolean
        hasAudio:
          type: boolean
        width:
          type: number
        height:
          type: number
        orderId:
          type: number
        duration:
          type: number
        isCopy:
          type: string
        isVideo:
          type: boolean
        isAudio:
          type: boolean
        isTextFile:
          type: string
        isReplace:
          type: boolean
      required:
        - id
        - uri
        - url
        - date
        - folderId
        - title
        - description
        - filename
        - fileType
        - userId
        - size
        - type
        - hasCloud
        - hasAudio
        - width
        - height
        - orderId
        - duration
        - isCopy
        - isVideo
        - isAudio
        - isTextFile
        - isReplace
    RenderResponse:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        project:
          type: string
        status:
          type: string
        public:
          type: boolean
        user_id:
          type: string
        progress:
          type: number
        logs:
          type: string
        data:
          $ref: '#/components/schemas/RenderData'
        result:
          $ref: '#/components/schemas/Media'
      required:
        - id
        - title
        - project
        - status
        - public
        - user_id
        - progress
        - logs
        - data
        - result
    LogPiece:
      type: object
      properties:
        id:
          type: string
        date:
          format: date-time
          type: string
        logs:
          type: string
        render:
          type: string
        user_id:
          type: string
      required:
        - id
        - date
        - logs
        - render
        - user_id
    LogsResponse:
      type: object
      properties:
        logs:
          type: array
          items:
            $ref: '#/components/schemas/LogPiece'
      required:
        - logs
    RenderDto:
      type: object
      properties:
        project:
          $ref: '#/components/schemas/EditorProject'
        layers:
          type: array
          items:
            $ref: '#/components/schemas/EditorLayer'
      required:
        - project
        - layers
    RunDto:
      type: object
      properties:
        id:
          type: string
      required:
        - id
    ApiKey:
      type: object
      properties: {}
    FileUploadDto:
      type: object
      properties:
        file:
          type: string
          format: binary
      required:
        - file
    FileObject:
      type: object
      properties:
        Key:
          type: string
        LastModified:
          format: date-time
          type: string
        ETag:
          type: string
        Size:
          type: number
      required:
        - Key
        - LastModified
        - ETag
        - Size
    FileListDto:
      type: object
      properties:
        list:
          type: array
          items:
            $ref: '#/components/schemas/FileObject'
      required:
        - list
    FileResponseDto:
      type: object
      properties:
        link:
          type: string
          format: url
      required:
        - link
    S3Credentials:
      type: object
      properties:
        accessKeyId:
          type: string
        secretAccessKey:
          type: string
        sessionToken:
          type: string
      required:
        - accessKeyId
        - secretAccessKey
        - sessionToken
    S3Config:
      type: object
      properties:
        bucketId:
          type: string
        region:
          type: string
        endpoint:
          type: string
        userId:
          type: string
        credentials:
          $ref: '#/components/schemas/S3Credentials'
      required:
        - bucketId
        - region
        - endpoint
        - userId
        - credentials
    Pipeline:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        status:
          type: string
        user_id:
          type: string
        downsql:
          type: string
        upsql:
          type: string
        yml:
          type: string
        project:
          type: string
        date:
          format: date-time
          type: string
        version:
          type: number
      required:
        - id
        - title
        - status
        - user_id
        - downsql
        - upsql
        - yml
        - project
        - date
        - version
    CreatePipelineDto:
      type: object
      properties:
        title:
          type: string
        downsql:
          type: string
        upsql:
          type: string
        yml:
          type: string
        project:
          type: string
      required:
        - title
        - downsql
        - upsql
        - yml
        - project
    UpdatePipelineDto:
      type: object
      properties:
        title:
          type: string
        downsql:
          type: string
        upsql:
          type: string
        yml:
          type: string
        id:
          type: string
        status:
          type: string
      required:
        - title
        - downsql
        - upsql
        - yml
        - id
        - status
    TranspilerRequest:
      type: object
      properties:
        yml:
          type: string
      required:
        - yml
    TranspilerResponse:
      type: object
      properties:
        files:
          type: object
      required:
        - files
