openapi: 3.1.0
info:
  title: StrafesNET Submissions - OpenAPI 3.1
  description: Browse and manage map submissions.
  version: 0.1.0
servers:
  - url: https://submissions.strafes.net/v1
tags:
  - name: Mapfixes
    description: Mapfix operations
  - name: Maps
    description: Map queries
  - name: Operations
    description: Long-running operations
  - name: Session
    description: Session queries
  - name: Submissions
    description: Submission operations
  - name: Scripts
    description: Script operations
  - name: ScriptPolicy
    description: Script policy operations
security:
  - cookieAuth: []
paths:
  /session/user:
    get:
      summary: Get information about the currently logged in user
      operationId: sessionUser
      tags:
        - Session
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/User"
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /session/roles:
    get:
      summary: Get list of roles for the current session
      operationId: sessionRoles
      tags:
        - Session
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Roles"
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /session/validate:
    get:
      summary: Ask if the current session is valid
      operationId: sessionValidate
      tags:
        - Session
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: boolean
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /maps:
    get:
      summary: Get list of maps
      operationId: listMaps
      tags:
        - Maps
      security: []
      parameters:
      - $ref: "#/components/parameters/Page"
      - $ref: "#/components/parameters/Limit"
      - name: DisplayName
        in: query
        schema:
          type: string
          maxLength: 128
      - name: Creator
        in: query
        schema:
          type: string
          maxLength: 128
      - name: GameID
        in: query
        schema:
          type: integer
          format: int32
      - name: Sort
        in: query
        schema:
          type: integer
          format: int32
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Map"
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /maps/{MapID}:
    get:
      summary: Retrieve map with ID
      operationId: getMap
      tags:
        - Maps
      security: []
      parameters:
        - $ref: '#/components/parameters/MapID'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Map"
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /mapfixes:
    get:
      summary: Get list of mapfixes
      operationId: listMapfixes
      tags:
        - Mapfixes
      security: []
      parameters:
      - $ref: "#/components/parameters/Page"
      - $ref: "#/components/parameters/Limit"
      - name: DisplayName
        in: query
        schema:
          type: string
          maxLength: 128
      - name: Creator
        in: query
        schema:
          type: string
          maxLength: 128
      - name: GameID
        in: query
        schema:
          type: integer
          format: int32
      - name: Sort
        in: query
        schema:
          type: integer
          format: int32
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Mapfix"
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
    post:
      summary: Trigger the validator to create a mapfix
      operationId: createMapfix
      tags:
        - Mapfixes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MapfixTriggerCreate'
      responses:
        "201":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OperationID"
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /mapfixes/{MapfixID}:
    get:
      summary: Retrieve map with ID
      operationId: getMapfix
      tags:
        - Mapfixes
      security: []
      parameters:
        - $ref: '#/components/parameters/MapfixID'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Mapfix"
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /mapfixes/{MapfixID}/model:
    post:
      summary: Update model following role restrictions
      operationId: updateMapfixModel
      tags:
        - Mapfixes
      parameters:
        - $ref: '#/components/parameters/MapfixID'
        - name: ModelID
          in: query
          required: true
          schema:
            type: integer
            format: int64
        - name: VersionID
          in: query
          required: true
          schema:
            type: integer
            format: int64
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /mapfixes/{MapfixID}/completed:
    post:
      summary: Called by maptest when a player completes the map
      operationId: setMapfixCompleted
      tags:
        - Mapfixes
      parameters:
        - $ref: '#/components/parameters/MapfixID'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /mapfixes/{MapfixID}/status/submit:
    post:
      summary: Role Submitter changes status from UnderConstruction|ChangesRequested -> Submitted
      operationId: actionMapfixSubmit
      tags:
        - Mapfixes
      parameters:
        - $ref: '#/components/parameters/MapfixID'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /mapfixes/{MapfixID}/status/revoke:
    post:
      summary: Role Submitter changes status from Submitted|ChangesRequested -> UnderConstruction
      operationId: actionMapfixRevoke
      tags:
        - Mapfixes
      parameters:
        - $ref: '#/components/parameters/MapfixID'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /mapfixes/{MapfixID}/status/trigger-validate:
    post:
      summary: Role Reviewer triggers validation and changes status from Submitted -> Validating
      operationId: actionMapfixTriggerValidate
      tags:
        - Mapfixes
      parameters:
        - $ref: '#/components/parameters/MapfixID'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /mapfixes/{MapfixID}/status/retry-validate:
    post:
      summary: Role Reviewer re-runs validation and changes status from Accepted -> Validating
      operationId: actionMapfixRetryValidate
      tags:
        - Mapfixes
      parameters:
        - $ref: '#/components/parameters/MapfixID'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /mapfixes/{MapfixID}/status/reset-validating:
    post:
      summary: Role Reviewer manually resets validating softlock and changes status from Validating -> Accepted
      operationId: actionMapfixAccepted
      tags:
        - Mapfixes
      parameters:
        - $ref: '#/components/parameters/MapfixID'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /mapfixes/{MapfixID}/status/reject:
    post:
      summary: Role Reviewer changes status from Submitted -> Rejected
      operationId: actionMapfixReject
      tags:
        - Mapfixes
      parameters:
        - $ref: '#/components/parameters/MapfixID'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /mapfixes/{MapfixID}/status/request-changes:
    post:
      summary: Role Reviewer changes status from Validated|Accepted|Submitted -> ChangesRequested
      operationId: actionMapfixRequestChanges
      tags:
        - Mapfixes
      parameters:
        - $ref: '#/components/parameters/MapfixID'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /mapfixes/{MapfixID}/status/trigger-upload:
    post:
      summary: Role Admin changes status from Validated -> Uploading
      operationId: actionMapfixTriggerUpload
      tags:
        - Mapfixes
      parameters:
        - $ref: '#/components/parameters/MapfixID'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /mapfixes/{MapfixID}/status/reset-uploading:
    post:
      summary: Role Admin manually resets uploading softlock and changes status from Uploading -> Validated
      operationId: actionMapfixValidated
      tags:
        - Mapfixes
      parameters:
        - $ref: '#/components/parameters/MapfixID'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /operations/{OperationID}:
    get:
      summary: Retrieve operation with ID
      operationId: getOperation
      tags:
        - Operations
      parameters:
        - $ref: '#/components/parameters/OperationID'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Operation"
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /submissions:
    get:
      summary: Get list of submissions
      operationId: listSubmissions
      tags:
        - Submissions
      security: []
      parameters:
      - $ref: "#/components/parameters/Page"
      - $ref: "#/components/parameters/Limit"
      - name: DisplayName
        in: query
        schema:
          type: string
          maxLength: 128
      - name: Creator
        in: query
        schema:
          type: string
          maxLength: 128
      - name: GameID
        in: query
        schema:
          type: integer
          format: int32
      - name: Sort
        in: query
        schema:
          type: integer
          format: int32
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Submission"
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
    post:
      summary: Trigger the validator to create a new submission
      operationId: createSubmission
      tags:
        - Submissions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmissionTriggerCreate'
      responses:
        "201":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/OperationID"
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /submissions/{SubmissionID}:
    get:
      summary: Retrieve map with ID
      operationId: getSubmission
      tags:
        - Submissions
      security: []
      parameters:
        - $ref: '#/components/parameters/SubmissionID'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Submission"
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /submissions/{SubmissionID}/model:
    post:
      summary: Update model following role restrictions
      operationId: updateSubmissionModel
      tags:
        - Submissions
      parameters:
        - $ref: '#/components/parameters/SubmissionID'
        - name: ModelID
          in: query
          required: true
          schema:
            type: integer
            format: int64
        - name: VersionID
          in: query
          required: true
          schema:
            type: integer
            format: int64
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /submissions/{SubmissionID}/completed:
    post:
      summary: Called by maptest when a player completes the map
      operationId: setSubmissionCompleted
      tags:
        - Submissions
      parameters:
        - $ref: '#/components/parameters/SubmissionID'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /submissions/{SubmissionID}/status/submit:
    post:
      summary: Role Submitter changes status from UnderConstruction|ChangesRequested -> Submitted
      operationId: actionSubmissionSubmit
      tags:
        - Submissions
      parameters:
        - $ref: '#/components/parameters/SubmissionID'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /submissions/{SubmissionID}/status/revoke:
    post:
      summary: Role Submitter changes status from Submitted|ChangesRequested -> UnderConstruction
      operationId: actionSubmissionRevoke
      tags:
        - Submissions
      parameters:
        - $ref: '#/components/parameters/SubmissionID'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /submissions/{SubmissionID}/status/trigger-validate:
    post:
      summary: Role Reviewer triggers validation and changes status from Submitted -> Validating
      operationId: actionSubmissionTriggerValidate
      tags:
        - Submissions
      parameters:
        - $ref: '#/components/parameters/SubmissionID'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /submissions/{SubmissionID}/status/retry-validate:
    post:
      summary: Role Reviewer re-runs validation and changes status from Accepted -> Validating
      operationId: actionSubmissionRetryValidate
      tags:
        - Submissions
      parameters:
        - $ref: '#/components/parameters/SubmissionID'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /submissions/{SubmissionID}/status/reset-validating:
    post:
      summary: Role Reviewer manually resets validating softlock and changes status from Validating -> Accepted
      operationId: actionSubmissionAccepted
      tags:
        - Submissions
      parameters:
        - $ref: '#/components/parameters/SubmissionID'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /submissions/{SubmissionID}/status/reject:
    post:
      summary: Role Reviewer changes status from Submitted -> Rejected
      operationId: actionSubmissionReject
      tags:
        - Submissions
      parameters:
        - $ref: '#/components/parameters/SubmissionID'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /submissions/{SubmissionID}/status/request-changes:
    post:
      summary: Role Reviewer changes status from Validated|Accepted|Submitted -> ChangesRequested
      operationId: actionSubmissionRequestChanges
      tags:
        - Submissions
      parameters:
        - $ref: '#/components/parameters/SubmissionID'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /submissions/{SubmissionID}/status/trigger-upload:
    post:
      summary: Role Admin changes status from Validated -> Uploading
      operationId: actionSubmissionTriggerUpload
      tags:
        - Submissions
      parameters:
        - $ref: '#/components/parameters/SubmissionID'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /submissions/{SubmissionID}/status/reset-uploading:
    post:
      summary: Role Admin manually resets uploading softlock and changes status from Uploading -> Validated
      operationId: actionSubmissionValidated
      tags:
        - Submissions
      parameters:
        - $ref: '#/components/parameters/SubmissionID'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /release-submissions:
    post:
      summary: Release a set of uploaded maps
      operationId: releaseSubmissions
      tags:
        - Submissions
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              minItems: 1
              maxItems: 255
              items:
                $ref: '#/components/schemas/ReleaseInfo'
      responses:
        "201":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /script-policy:
    get:
      summary: Get list of script policies
      operationId: listScriptPolicy
      tags:
        - ScriptPolicy
      security: []
      parameters:
      - $ref: "#/components/parameters/Page"
      - $ref: "#/components/parameters/Limit"
      - name: FromScriptHash
        in: query
        schema:
          type: string
          minLength: 16
          maxLength: 16
      - name: ToScriptID
        in: query
        schema:
          type: integer
          format: int64
      - name: Policy
        in: query
        schema:
          type: integer
          format: int32
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/ScriptPolicy"
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
    post:
      summary: Create a new script policy
      operationId: createScriptPolicy
      tags:
        - ScriptPolicy
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScriptPolicyCreate'
      responses:
        "201":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Id"
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /script-policy/{ScriptPolicyID}:
    get:
      summary: Get the specified script policy by ID
      operationId: getScriptPolicy
      tags:
        - ScriptPolicy
      security: []
      parameters:
        - $ref: '#/components/parameters/ScriptPolicyID'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ScriptPolicy"
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
    post:
      summary: Update the specified script policy by ID
      operationId: updateScriptPolicy
      tags:
        - ScriptPolicy
      parameters:
        - $ref: '#/components/parameters/ScriptPolicyID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScriptPolicyUpdate'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
    delete:
      summary: Delete the specified script policy by ID
      operationId: deleteScriptPolicy
      tags:
        - ScriptPolicy
      parameters:
        - $ref: '#/components/parameters/ScriptPolicyID'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /scripts:
    get:
      summary: Get list of scripts
      operationId: listScripts
      tags:
        - Script
      security: []
      parameters:
      - $ref: "#/components/parameters/Page"
      - $ref: "#/components/parameters/Limit"
      - name: Hash
        in: query
        schema:
          type: string
          minLength: 16
          maxLength: 16
      - name: Name
        in: query
        schema:
          type: string
          maxLength: 128
      - name: Source
        in: query
        schema:
          type: string
          maxLength: 1048576
      - name: ResourceType
        in: query
        schema:
          type: integer
          format: int32
      - name: ResourceID
        in: query
        schema:
          type: integer
          format: int64
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Script"
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
    post:
      summary: Create a new script
      operationId: createScript
      tags:
        - Scripts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScriptCreate'
      responses:
        "201":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Id"
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /scripts/{ScriptID}:
    get:
      summary: Get the specified script by ID
      operationId: getScript
      tags:
        - Scripts
      security: []
      parameters:
        - $ref: '#/components/parameters/ScriptID'
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Script"
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
    post:
      summary: Update the specified script by ID
      operationId: updateScript
      tags:
        - Scripts
      parameters:
        - $ref: '#/components/parameters/ScriptID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScriptUpdate'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
    delete:
      summary: Delete the specified script by ID
      operationId: deleteScript
      tags:
        - Scripts
      parameters:
        - $ref: '#/components/parameters/ScriptID'
      responses:
        "204":
          description: Successful response
        default:
          description: General Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
components:
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: session_id
  parameters:
    MapID:
      name: MapID
      in: path
      required: true
      description: The unique identifier for a map.
      schema:
        type: integer
        format: int64
    MapfixID:
      name: MapfixID
      in: path
      required: true
      description: The unique identifier for a mapfix.
      schema:
        type: integer
        format: int64
    OperationID:
      name: OperationID
      in: path
      required: true
      description: The unique identifier for a long-running operation.
      schema:
        type: integer
        format: int32
    SubmissionID:
      name: SubmissionID
      in: path
      required: true
      description: The unique identifier for a submission.
      schema:
        type: integer
        format: int64
    ScriptID:
      name: ScriptID
      in: path
      required: true
      description: The unique identifier for a script.
      schema:
        type: integer
        format: int64
    ScriptPolicyID:
      name: ScriptPolicyID
      in: path
      required: true
      description: The unique identifier for a script policy.
      schema:
        type: integer
        format: int64
    Page:
      name: Page
      in: query
      required: true
      schema:
        type: integer
        format: int32
        minimum: 1
    Limit:
      name: Limit
      in: query
      required: true
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 100
  schemas:
    Id:
      required:
      - ID
      type: object
      properties:
        ID:
          type: integer
          format: int64
    OperationID:
      required:
      - OperationID
      type: object
      properties:
        OperationID:
          type: integer
          format: int32
    Roles:
      required:
      - Roles
      type: object
      properties:
        Roles:
          type: integer
          format: int32
    User:
      required:
      - UserID
      - Username
      - AvatarURL
      type: object
      properties:
        UserID:
          type: integer
          format: int64
        Username:
          type: string
          maxLength: 128
        AvatarURL:
          type: string
          maxLength: 256
    Map:
      required:
      - ID
      - DisplayName
      - Creator
      - GameID
      - Date
      type: object
      properties:
        ID:
          type: integer
          format: int64
        DisplayName:
          type: string
          maxLength: 128
        Creator:
          type: string
          maxLength: 128
        GameID:
          type: integer
          format: int32
        Date:
          type: integer
          format: int64
    Mapfix:
      required:
      - ID
      - DisplayName
      - Creator
      - GameID
      - CreatedAt
      - UpdatedAt
      - Submitter
      - AssetID
      - AssetVersion
      - Completed
      - TargetAssetID
      - StatusID
      - StatusMessage
      type: object
      properties:
        ID:
          type: integer
          format: int64
        DisplayName:
          type: string
          maxLength: 128
        Creator:
          type: string
          maxLength: 128
        GameID:
          type: integer
          format: int32
        CreatedAt:
          type: integer
          format: int64
        UpdatedAt:
          type: integer
          format: int64
        Submitter:
          type: integer
          format: int64
        AssetID:
          type: integer
          format: int64
        AssetVersion:
          type: integer
          format: int64
        Completed:
          type: boolean
        TargetAssetID:
          type: integer
          format: int64
        StatusID:
          type: integer
          format: int32
        StatusMessage:
          type: string
          maxLength: 256
    MapfixTriggerCreate:
      required:
      - AssetID
      - TargetAssetID
      type: object
      properties:
        AssetID:
          type: integer
          format: int64
        TargetAssetID:
          type: integer
          format: int64
    Operation:
      required:
      - OperationID
      - Date
      - Owner
      - Status
      - StatusMessage
      - Path
      type: object
      properties:
        OperationID:
          type: integer
          format: int32
        Date:
          type: integer
          format: int64
        Owner:
          type: integer
          format: int64
        Status:
          type: integer
          format: int32
        StatusMessage:
          type: string
          maxLength: 256
        Path:
          type: string
          maxLength: 128
    Submission:
      required:
      - ID
      - DisplayName
      - Creator
      - GameID
      - CreatedAt
      - UpdatedAt
      - Submitter
      - AssetID
      - AssetVersion
#     - ValidatedAssetID
#     - ValidatedAssetVersion
      - Completed
#     - UploadedAssetID
      - StatusID
      - StatusMessage
      type: object
      properties:
        ID:
          type: integer
          format: int64
        DisplayName:
          type: string
          maxLength: 128
        Creator:
          type: string
          maxLength: 128
        GameID:
          type: integer
          format: int32
        CreatedAt:
          type: integer
          format: int64
        UpdatedAt:
          type: integer
          format: int64
        Submitter:
          type: integer
          format: int64
        AssetID:
          type: integer
          format: int64
        AssetVersion:
          type: integer
          format: int64
        ValidatedAssetID:
          type: integer
          format: int64
        ValidatedAssetVersion:
          type: integer
          format: int64
        Completed:
          type: boolean
        UploadedAssetID:
          type: integer
          format: int64
        StatusID:
          type: integer
          format: int32
        StatusMessage:
          type: string
          maxLength: 256
    SubmissionTriggerCreate:
      required:
      - AssetID
      type: object
      properties:
        AssetID:
          type: integer
          format: int64
    ReleaseInfo:
      required:
      - SubmissionID
      - Date
      type: object
      properties:
        SubmissionID:
          type: integer
          format: int64
        Date:
          type: string
          format: date-time
    Script:
      required:
      - ID
      - Name
      - Hash
      - Source
      - ResourceType
      - ResourceID
      type: object
      properties:
        ID:
          type: integer
          format: int64
        Name:
          type: string
          maxLength: 128
        Hash:
          type: string
          minLength: 16
          maxLength: 16
        Source:
          type: string
          maxLength: 1048576
        ResourceType:
          type: integer
          format: int32
        ResourceID:
          type: integer
          format: int64
    ScriptCreate:
      required:
      - Name
      - Source
      - ResourceType
#     - ResourceID
      type: object
      properties:
        Name:
          type: string
          maxLength: 128
        Source:
          type: string
          maxLength: 1048576
        ResourceType:
          type: integer
          format: int32
        ResourceID:
          type: integer
          format: int64
    ScriptUpdate:
      required:
      - ID
      type: object
      properties:
        ID:
          type: integer
          format: int64
        Name:
          type: string
          maxLength: 128
        Source:
          type: string
          maxLength: 1048576
        ResourceType:
          type: integer
          format: int32
        ResourceID:
          type: integer
          format: int64
    ScriptPolicy:
      required:
      - ID
      - FromScriptHash
      - ToScriptID
      - Policy
      type: object
      properties:
        ID:
          type: integer
          format: int64
        FromScriptHash:
          type: string
          minLength: 16
          maxLength: 16
        ToScriptID:
          type: integer
          format: int64
        Policy:
          type: integer
          format: int32
    ScriptPolicyCreate:
      required:
      - FromScriptID
      - ToScriptID
      - Policy
      type: object
      properties:
        FromScriptID:
          type: integer
          format: int64
        ToScriptID:
          type: integer
          format: int64
        Policy:
          type: integer
          format: int32
    ScriptPolicyUpdate:
      required:
      - ID
      type: object
      properties:
        ID:
          type: integer
          format: int64
        FromScriptID:
          type: integer
          format: int64
        ToScriptID:
          type: integer
          format: int64
        Policy:
          type: integer
          format: int32
    Error:
      description: Represents error object
      type: object
      properties:
        code:
          type: integer
          format: int64
        message:
          type: string
      required:
        - code
        - message