# Proposed contract, version 1: endpoints, errors, paging, idempotency, security and the capability of every
# operation. Resource schemas were initialized from the data model (docs/06-data) and are kept aligned with it; input
# schemas (*Input, *Request) and views are specific to this contract. Status: proposal for review, not confirmed design.
# Conventions: docs/05-interfaces/choosing-an-interface.md. Vendor extensions: x-moonitoring-audience (who calls),
# x-moonitoring-capability (the capability checked), x-moonitoring-entitlement (the entitlement feature checked),
# x-moonitoring-requirements (the requirements of 1.requisiti-raffinati.txt the operation serves).
openapi: 3.1.0
info:
  title: Releases Builds API
  version: 1.0.0
  description: 'What a version contains: the catalog of projects, applications, platforms and depots, and the builds
    with their manifests and chunks, uploaded by CI through signed URLs and deduplicated by content. Staff shape
    the catalog; the build uploader creates builds; nothing here reaches a client until a release on a channel.'
servers:
- url: https://releases.moonitoring.com/builds/v1
  description: Prod
- url: https://stage-releases.moonitoring.com/builds/v1
  description: Stage, through IAP
security:
- bearer: []
tags:
- name: Catalog
  description: Projects, applications, platforms, depots
- name: Builds
  description: Complete versions
- name: Content
  description: Manifests, chunks, patches
paths:
  /projects:
    get:
      summary: List projects
      operationId: listReleaseProjects
      tags:
      - Catalog
      parameters:
      - name: include_archived
        in: query
        required: false
        schema:
          type: boolean
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/Cursor
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/Limit
      responses:
        '200':
          description: One page of results.
          content:
            application/json:
              schema:
                type: object
                description: One page of items.
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/ReleaseProject'
                  next_cursor:
                    type: string
                    description: Where the next page starts; absent on the last page.
                required:
                - items
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.releases.read
      x-moonitoring-requirements:
      - '100'
      - '1006.5'
    post:
      summary: Create a project
      operationId: createReleaseProject
      tags:
      - Catalog
      parameters:
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/IdempotencyKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReleaseProjectInput'
      responses:
        '201':
          description: The result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseProject'
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '409':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Conflict
        '422':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/UnprocessableEntity
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.release_catalog.manage
      x-moonitoring-requirements:
      - '100'
      - '1006.7'
  /projects/{project_id}:
    patch:
      summary: Update or archive a project
      operationId: updateReleaseProject
      tags:
      - Catalog
      parameters:
      - name: project_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReleaseProjectInput'
      responses:
        '200':
          description: The result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseProject'
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '404':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/NotFound
        '409':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Conflict
        '422':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/UnprocessableEntity
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.release_catalog.manage
      x-moonitoring-requirements:
      - '100'
      - '100.4'
      - '1006.7'
  /applications:
    get:
      summary: List applications
      operationId: listReleaseApplications
      tags:
      - Catalog
      parameters:
      - name: project
        in: query
        required: false
        schema:
          type: string
          format: uuid
        description: Only this project's.
      - name: audience
        in: query
        required: false
        schema:
          type: string
          enum:
          - public
          - organization
          - moonitoring
        description: Only this audience.
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/Cursor
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/Limit
      responses:
        '200':
          description: One page of results.
          content:
            application/json:
              schema:
                type: object
                description: One page of items.
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/ReleaseApplication'
                  next_cursor:
                    type: string
                    description: Where the next page starts; absent on the last page.
                required:
                - items
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.releases.read
      x-moonitoring-requirements:
      - '101'
      - '1006.5'
    post:
      summary: Create an application
      operationId: createReleaseApplication
      tags:
      - Catalog
      parameters:
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/IdempotencyKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReleaseApplicationInput'
      responses:
        '201':
          description: The result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseApplication'
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '409':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Conflict
        '422':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/UnprocessableEntity
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.release_catalog.manage
      x-moonitoring-requirements:
      - '101'
      - '101.8'
      - '1006.7'
  /applications/{application_id}:
    patch:
      summary: Update an application
      operationId: updateReleaseApplication
      description: The audience never widens after clients enrolled.
      tags:
      - Catalog
      parameters:
      - name: application_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReleaseApplicationInput'
      responses:
        '200':
          description: The result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseApplication'
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '404':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/NotFound
        '409':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Conflict
        '422':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/UnprocessableEntity
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.release_catalog.manage
      x-moonitoring-requirements:
      - '101'
      - '1006.7'
  /applications/{application_id}/depots:
    get:
      summary: List an application's depots
      operationId: listApplicationDepots
      tags:
      - Catalog
      parameters:
      - name: application_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/Cursor
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/Limit
      responses:
        '200':
          description: One page of results.
          content:
            application/json:
              schema:
                type: object
                description: One page of items.
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/ReleaseApplicationDepot'
                  next_cursor:
                    type: string
                    description: Where the next page starts; absent on the last page.
                required:
                - items
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '404':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/NotFound
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.releases.read
      x-moonitoring-requirements:
      - '104'
      - '1006.5'
  /applications/{application_id}/depots/{depot_id}:
    put:
      summary: Compose an application with a depot
      operationId: setApplicationDepot
      tags:
      - Catalog
      parameters:
      - name: application_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: depot_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReleaseApplicationDepotInput'
      responses:
        '200':
          description: The result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseApplicationDepot'
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '404':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/NotFound
        '409':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Conflict
        '422':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/UnprocessableEntity
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.release_catalog.manage
      x-moonitoring-requirements:
      - '104'
      - '104.4'
      - '1006.7'
    delete:
      summary: Remove a depot from an application
      operationId: deleteApplicationDepot
      tags:
      - Catalog
      parameters:
      - name: application_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: depot_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Done.
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '404':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/NotFound
        '409':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Conflict
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.release_catalog.manage
      x-moonitoring-requirements:
      - '104'
      - '1006.7'
  /platforms:
    get:
      summary: List platforms
      operationId: listReleasePlatforms
      tags:
      - Catalog
      parameters:
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/Cursor
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/Limit
      responses:
        '200':
          description: One page of results.
          content:
            application/json:
              schema:
                type: object
                description: One page of items.
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/ReleasePlatform'
                  next_cursor:
                    type: string
                    description: Where the next page starts; absent on the last page.
                required:
                - items
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.releases.read
      x-moonitoring-requirements:
      - '102'
    post:
      summary: Create a platform
      operationId: createReleasePlatform
      tags:
      - Catalog
      parameters:
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/IdempotencyKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReleasePlatformInput'
      responses:
        '201':
          description: The result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleasePlatform'
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '409':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Conflict
        '422':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/UnprocessableEntity
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.release_catalog.manage
      x-moonitoring-requirements:
      - '102'
      - '1006.7'
  /depots:
    get:
      summary: List depots
      operationId: listReleaseDepots
      tags:
      - Catalog
      parameters:
      - name: project
        in: query
        required: false
        schema:
          type: string
          format: uuid
        description: Only this project's.
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/Cursor
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/Limit
      responses:
        '200':
          description: One page of results.
          content:
            application/json:
              schema:
                type: object
                description: One page of items.
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/ReleaseDepot'
                  next_cursor:
                    type: string
                    description: Where the next page starts; absent on the last page.
                required:
                - items
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.releases.read
      x-moonitoring-requirements:
      - '103'
      - '1006.5'
    post:
      summary: Create a depot
      operationId: createReleaseDepot
      tags:
      - Catalog
      parameters:
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/IdempotencyKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReleaseDepotInput'
      responses:
        '201':
          description: The result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseDepot'
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '409':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Conflict
        '422':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/UnprocessableEntity
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.release_catalog.manage
      x-moonitoring-requirements:
      - '103'
      - '103.7'
      - '1007'
      - '1006.7'
  /depots/{depot_id}:
    patch:
      summary: Update a depot
      operationId: updateReleaseDepot
      tags:
      - Catalog
      parameters:
      - name: depot_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReleaseDepotInput'
      responses:
        '200':
          description: The result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseDepot'
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '404':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/NotFound
        '409':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Conflict
        '422':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/UnprocessableEntity
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.release_catalog.manage
      x-moonitoring-requirements:
      - '103'
      - '1006.7'
  /builds:
    get:
      summary: List builds
      operationId: listReleaseBuilds
      tags:
      - Builds
      parameters:
      - name: application
        in: query
        required: false
        schema:
          type: string
          format: uuid
        description: Only this application's.
      - name: status
        in: query
        required: false
        schema:
          type: string
          enum:
          - uploading
          - validating
          - ready
          - revoked
        description: Only this status.
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/Cursor
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/Limit
      responses:
        '200':
          description: One page of results.
          content:
            application/json:
              schema:
                type: object
                description: One page of items.
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/ReleaseBuild'
                  next_cursor:
                    type: string
                    description: Where the next page starts; absent on the last page.
                required:
                - items
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.releases.read
      x-moonitoring-requirements:
      - '109'
      - '1006.5'
    post:
      summary: Create a build
      operationId: createReleaseBuild
      description: 'By CI as a service account with `releases-publish`, or by a member of staff from the Console,
        which packs a folder per platform in the browser with the same `releases-client` code (decided 2026-11-11).
        Either way the creator cannot approve a release of the build.'
      tags:
      - Builds
      parameters:
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/IdempotencyKey
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReleaseBuildInput'
      responses:
        '201':
          description: The result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseBuild'
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '409':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Conflict
        '422':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/UnprocessableEntity
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.builds.upload
      x-moonitoring-requirements:
      - '109'
      - '109.3'
      - '109.8'
      - '1006.9'
  /builds/{build_id}:
    get:
      summary: Read a build
      operationId: getReleaseBuild
      tags:
      - Builds
      parameters:
      - name: build_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: The result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseBuild'
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '404':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/NotFound
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.releases.read
      x-moonitoring-requirements:
      - '109'
  /builds/{build_id}/chunks/check:
    post:
      summary: Check which chunks to upload
      operationId: checkReleaseChunks
      description: 'Deduplication is global: the same content is stored once per encryption key, and once unencrypted.'
      tags:
      - Content
      parameters:
      - name: build_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChunkCheckRequest'
      responses:
        '200':
          description: The result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChunkCheckResult'
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '404':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/NotFound
        '409':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Conflict
        '422':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/UnprocessableEntity
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.builds.upload
      x-moonitoring-requirements:
      - '105'
      - '105.3'
      - '1006.9'
  /builds/{build_id}/manifests:
    post:
      summary: Register a manifest
      operationId: createReleaseManifest
      tags:
      - Content
      parameters:
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/IdempotencyKey
      - name: build_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReleaseManifestInput'
      responses:
        '201':
          description: The result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseManifestCreated'
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '404':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/NotFound
        '409':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Conflict
        '422':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/UnprocessableEntity
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.builds.upload
      x-moonitoring-requirements:
      - '106'
      - '106.3'
      - '106.9'
      - '1006.9'
  /builds/{build_id}/depots:
    post:
      summary: Set a build's manifest for a depot
      operationId: setReleaseBuildDepot
      tags:
      - Builds
      parameters:
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/IdempotencyKey
      - name: build_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReleaseBuildDepotInput'
      responses:
        '201':
          description: The result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseBuildDepot'
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '404':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/NotFound
        '409':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Conflict
        '422':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/UnprocessableEntity
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.builds.upload
      x-moonitoring-requirements:
      - '110'
      - '1006.9'
    get:
      summary: List a build's depots
      operationId: listReleaseBuildDepots
      tags:
      - Builds
      parameters:
      - name: build_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/Cursor
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/Limit
      responses:
        '200':
          description: One page of results.
          content:
            application/json:
              schema:
                type: object
                description: One page of items.
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/ReleaseBuildDepot'
                  next_cursor:
                    type: string
                    description: Where the next page starts; absent on the last page.
                required:
                - items
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '404':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/NotFound
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.releases.read
      x-moonitoring-requirements:
      - '110'
  /builds/{build_id}/installers:
    get:
      summary: List a build's installers
      operationId: listReleaseInstallerArtifacts
      description: 'The installer file of each platform of the build, made by releases when the build became ready,
        with its version link; the Console shows a copy button for each link and for the application''s universal
        latest link.'
      tags:
      - Builds
      parameters:
      - name: build_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: The installers of the build.
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/ReleaseInstallerArtifact'
                  latest_link:
                    type: string
                    format: uri
                    description: The application's universal latest link; absent without a default channel.
                required:
                - items
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '404':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/NotFound
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.releases.read
      x-moonitoring-requirements:
      - '151'
      - '101.10'
  /builds/{build_id}/finalize:
    post:
      summary: Finalize a build
      operationId: finalizeReleaseBuild
      description: Validates that every required depot has a manifest and every chunk and blob is present; the build
        becomes ready. releases then makes the build's installer of each platform its binaries depot has (ReleaseInstallerArtifact,
        listed by `GET /builds/{build_id}/installers`).
      tags:
      - Builds
      parameters:
      - name: build_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: The result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseBuild'
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '404':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/NotFound
        '409':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Conflict
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.builds.upload
      x-moonitoring-requirements:
      - '109.6'
      - '1006.9'
  /builds/{build_id}/revoke:
    post:
      summary: Revoke a build
      operationId: revokeReleaseBuild
      description: It can no longer be staged, approved or rolled back to. Publishes `build.revoked.v1`.
      tags:
      - Builds
      parameters:
      - name: build_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RevokeBuildRequest'
      responses:
        '200':
          description: The result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseBuild'
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '404':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/NotFound
        '409':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Conflict
        '422':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/UnprocessableEntity
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.builds.revoke
      x-moonitoring-requirements:
      - '109.6'
      - '109.7'
      - '1006.10'
  /manifests/{manifest_id}:
    get:
      summary: Read a manifest
      operationId: getReleaseManifest
      tags:
      - Content
      parameters:
      - name: manifest_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: The result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleaseManifest'
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '404':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/NotFound
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.releases.read
      x-moonitoring-requirements:
      - '106'
  /manifests/{manifest_id}/files:
    get:
      summary: List a manifest's files
      operationId: listReleaseManifestFiles
      tags:
      - Content
      parameters:
      - name: manifest_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/Cursor
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/Limit
      responses:
        '200':
          description: One page of results.
          content:
            application/json:
              schema:
                type: object
                description: One page of items.
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/ReleaseManifestFile'
                  next_cursor:
                    type: string
                    description: Where the next page starts; absent on the last page.
                required:
                - items
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '404':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/NotFound
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.releases.read
      x-moonitoring-requirements:
      - '107'
  /depots/{depot_id}/patches:
    get:
      summary: List a depot's patches
      operationId: listReleasePatches
      tags:
      - Content
      parameters:
      - name: depot_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/Cursor
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/Limit
      responses:
        '200':
          description: One page of results.
          content:
            application/json:
              schema:
                type: object
                description: One page of items.
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/ReleasePatchArtifact'
                  next_cursor:
                    type: string
                    description: Where the next page starts; absent on the last page.
                required:
                - items
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '404':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/NotFound
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.releases.read
      x-moonitoring-requirements:
      - '108'
    post:
      summary: Register a patch
      operationId: createReleasePatch
      tags:
      - Content
      parameters:
      - $ref: ../../../../common/v1/schemas.yaml#/components/parameters/IdempotencyKey
      - name: depot_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReleasePatchArtifactInput'
      responses:
        '201':
          description: The result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReleasePatchArtifactCreated'
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '404':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/NotFound
        '409':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Conflict
        '422':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/UnprocessableEntity
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.builds.upload
      x-moonitoring-requirements:
      - '108'
      - '1006.9'
  /storage/purge:
    post:
      summary: Purge unreferenced content
      operationId: purgeReleaseStorage
      description: Marks, then sweeps after a grace period, chunks and manifests that no retained release references.
        Cannot be undone.
      tags:
      - Content
      responses:
        '202':
          description: The result.
          content:
            application/json:
              schema:
                type: object
                description: The request was accepted; the work continues in the background and can be followed
                  by its id.
                properties:
                  id:
                    type: string
                    format: uuid
                    description: The resource or run that was created to follow the work.
                  status:
                    type: string
                required:
                - id
        '400':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/BadRequest
        '401':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Unauthorized
        '403':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Forbidden
        '409':
          $ref: ../../../../common/v1/schemas.yaml#/components/responses/Conflict
      x-moonitoring-audience: staff
      x-moonitoring-capability: releases.release_storage.purge
      x-moonitoring-requirements:
      - '105'
      - '1006.16'
components:
  schemas:
    ReleaseProject:
      description: The top-level grouping of the software we distribute. A project owns applications and the depots
        they share.
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Key.
        slug:
          type: string
          description: Unique.
        name:
          type: string
        archived_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
      - id
      - slug
      - name
      - created_at
      - updated_at
    ReleaseApplication:
      description: 'An installable client of a project, such as the farm sync agent or the Console, with its own
        builds and channels. Its audience says who the software is built for and how its clients sign in: public,
        Organization users, or Moonitoring staff; channels narrow within that audience and never widen it.'
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Key.
        project:
          type: string
          format: uuid
          description: ID of the ReleaseProject.
        slug:
          type: string
          description: Unique across projects, so the download page is addressed by it alone.
        name:
          type: string
        carries_adapters:
          type: boolean
          default: false
          description: Set on the farm sync client; only its builds may declare `adapters`.
        default_channel:
          type: string
          format: uuid
          description: ID of the ReleaseChannel, a listed channel of this application, whose active release the latest
            download links give (req 101.10), e.g. stable for the farm sync client. Absent, no latest link.
        kind:
          type: string
          enum:
          - desktop
          - mobile
          - launcher
          - tool
          - agent
        build_seq:
          type: integer
          description: Counter that issues `build_number` (see ReleaseBuild).
        archived_at:
          type: string
          format: date-time
        audience:
          type: string
          enum:
          - public
          - organization
          - moonitoring
          description: 'Who the software is built for, and so how its clients sign in: public, nobody; organization,
            an access user token (user, active Organization, role; see User); moonitoring, a staff token (see MoonitoringUser).
            A channel narrows within the audience (ReleaseChannel) and never widens it. Partners and integrators
            are Organizations.'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
      - id
      - project
      - slug
      - name
      - kind
      - build_seq
      - audience
      - created_at
      - updated_at
    ReleasePlatform:
      description: A combination of operating system and architecture that a build can target.
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Key.
        os:
          type: string
          enum:
          - windows
          - macos
          - linux
          - android
          - ios
        arch:
          type: string
          enum:
          - x64
          - arm64
          - universal
          description: '`(os, arch)` is unique.'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
      - id
      - os
      - arch
      - created_at
      - updated_at
    ReleaseDepot:
      description: A package of content with its own versions, such as the binaries for one platform, shared assets
        or a language pack. Several applications of a project can share a depot.
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Key.
        project:
          type: string
          format: uuid
          description: ID of the ReleaseProject.
        slug:
          type: string
          description: '`(project, slug)` is unique.'
        kind:
          type: string
          enum:
          - binaries
          - shared_assets
          - language_pack
          - optional
        platform:
          type: string
          format: uuid
          description: 'ID of the ReleasePlatform. Empty: cross-platform.'
        language:
          type: string
          description: BCP-47.
        chunking_params:
          $ref: ../../../../common/v1/schemas.yaml#/components/schemas/ChunkingParams
        encryption_key:
          type: string
          format: uuid
          description: ID of the ReleaseEncryptionKey. Only for confidential content; content that is not secret
            is signed, not encrypted.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
      - id
      - project
      - slug
      - kind
      - chunking_params
      - created_at
      - updated_at
    ReleaseApplicationDepot:
      description: States which depots compose an application, and how each one is installed.
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Key.
        application:
          type: string
          format: uuid
          description: ID of the ReleaseApplication.
        depot:
          type: string
          format: uuid
          description: ID of the ReleaseDepot. Must belong to the application's project. `(application, depot)`
            is unique.
        install_policy:
          type: string
          enum:
          - required
          - default_on
          - optional
          - on_demand
        install_path:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
      - id
      - application
      - depot
      - install_policy
      - install_path
      - created_at
      - updated_at
    ReleaseChunk:
      description: A piece of a file, identified by its content, so identical pieces are stored once and shared
        by every manifest that contains them. Immutable.
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Key.
        hash:
          type: string
          description: Hash of the uncompressed content.
        encryption_key:
          type: string
          format: uuid
          description: 'ID of the ReleaseEncryptionKey. `(hash, encryption_key)` is unique: the same content is
            stored once per key, and once unencrypted.'
        size_raw:
          type: integer
        size_stored:
          type: integer
        compression:
          type: string
          enum:
          - none
          - zstd
          - lzma
        storage_key:
          type: string
          description: Unique.
        created_at:
          type: string
          format: date-time
      required:
      - id
      - hash
      - size_raw
      - size_stored
      - compression
      - storage_key
      - created_at
    ReleaseManifest:
      description: 'A complete snapshot of a depot: for each file, the chunks that rebuild it. The full file list
        is stored as a signed file in file storage. Immutable.'
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Key.
        depot:
          type: string
          format: uuid
          description: ID of the ReleaseDepot.
        content_hash:
          type: string
          description: Unique. Hash of the canonical blob.
        object_key:
          type: string
        format_version:
          type: integer
        total_size_raw:
          type: integer
        file_count:
          type: integer
        chunk_count:
          type: integer
        chunks:
          type: array
          items:
            type: string
            format: uuid
          description: ID of the ReleaseChunk. Only the set of chunks, for garbage collection and for estimating
            a delta on the server.
        created_at:
          type: string
          format: date-time
      required:
      - id
      - depot
      - content_hash
      - object_key
      - format_version
      - total_size_raw
      - file_count
      - chunk_count
      - created_at
    ReleaseManifestFile:
      description: One file of a manifest, kept only when search or audit by single file is needed.
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Key.
        manifest:
          type: string
          format: uuid
          description: ID of the ReleaseManifest.
        path:
          type: string
          description: '`(manifest, path)` is unique.'
        size:
          type: integer
        file_hash:
          type: string
        flags:
          type: array
          items:
            type: string
            enum:
            - executable
            - symlink
            - user_config
          description: '`user_config`: an update never overwrites the file.'
      required:
      - id
      - manifest
      - path
      - size
      - file_hash
    ReleasePatchArtifact:
      description: A ready-made update that holds only the differences between two manifests of a depot, prepared
        for the most common upgrades.
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Key.
        depot:
          type: string
          format: uuid
          description: ID of the ReleaseDepot.
        from_manifest:
          type: string
          format: uuid
          description: ID of the ReleaseManifest.
        to_manifest:
          type: string
          format: uuid
          description: ID of the ReleaseManifest. Both manifests belong to the depot.
        algorithm:
          type: string
          enum:
          - bsdiff
          - zstd_patch
          - wharf
          description: '`(from_manifest, to_manifest, algorithm)` is unique.'
        size:
          type: integer
        content_hash:
          type: string
        object_key:
          type: string
        created_at:
          type: string
          format: date-time
      required:
      - id
      - depot
      - from_manifest
      - to_manifest
      - algorithm
      - size
      - content_hash
      - object_key
      - created_at
    ReleaseBuild:
      description: A complete version of an application. Its content never changes; only its status can, for example
        when it is revoked.
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Key.
        application:
          type: string
          format: uuid
          description: ID of the ReleaseApplication.
        build_number:
          type: integer
          description: Always increasing; the only key used to order builds. `(application, build_number)` is unique.
        version_label:
          type: string
          description: Semver shown to people; never used for comparisons.
        source_ref:
          type: string
          description: Commit or CI tag.
        status:
          type: string
          enum:
          - uploading
          - validating
          - ready
          - revoked
        revoked_reason:
          type: string
        created_by:
          type: string
          format: uuid
          description: ID of the MoonitoringUser. Usually the CI, as a MoonitoringServiceAccount.
        adapters:
          type: array
          description: 'The source adapters the build carries, as the client declares them in its catalog; only
            for a farm sync client. farm registers them (SourceAdapter, side client) from `release.activated.v1`.'
          items:
            type: object
            properties:
              code:
                type: string
                description: Stable name of the reader, e.g. `sialleva.export`.
              adapter_version:
                type: string
                description: Semantic version of the adapter.
              source_channel:
                type: string
                description: The name of the farm SourceChannel it reads, e.g. `SiAlleva` (unique in farm).
              supported_versions:
                type: string
                description: The source versions it was tested against, e.g. ">=3.0.1, <3.1".
            required:
            - code
            - adapter_version
            - source_channel
            - supported_versions
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
      - id
      - application
      - build_number
      - version_label
      - source_ref
      - status
      - created_by
      - created_at
      - updated_at
    ReleaseInstallerArtifact:
      description: 'The single installer file of one build for one platform: the installer of releases, made for the
        build''s application when the build became ready, with the application, the build and the root metadata of every
        listed channel of the application inside it. It carries no secret. Immutable.'
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Key.
        build:
          type: string
          format: uuid
          description: ID of the ReleaseBuild.
        platform:
          type: string
          format: uuid
          description: ID of the ReleasePlatform. (build, platform) is unique.
        object_key:
          type: string
          description: Where the file is kept in the content bucket.
        content_hash:
          type: string
          description: SHA-256 of the file.
        size:
          type: integer
        version_link:
          type: string
          format: uri
          description: The download link of this version and platform, `/downloads/v1/{application_slug}/versions/{version_label}/{platform}`.
        created_at:
          type: string
          format: date-time
      required:
      - id
      - build
      - platform
      - object_key
      - content_hash
      - size
      - version_link
      - created_at
    ReleaseBuildDepot:
      description: Says which manifest a build uses for each depot of its application.
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Key.
        build:
          type: string
          format: uuid
          description: ID of the ReleaseBuild.
        depot:
          type: string
          format: uuid
          description: ID of the ReleaseDepot. Must be a depot of the build's application (see ReleaseApplicationDepot).
            `(build, depot)` is unique.
        manifest:
          type: string
          format: uuid
          description: ID of the ReleaseManifest. Must be a manifest of that depot.
      required:
      - id
      - build
      - depot
      - manifest
    ReleaseProjectInput:
      type: object
      description: Input to create or change a ReleaseProject; server-managed fields are left out.
      properties:
        slug:
          type: string
          description: Unique.
        name:
          type: string
        archived:
          type: boolean
          default: false
          description: Archive it, or bring it back; an archived one is kept and offered to nobody (decided 2026-11-05).
      required:
      - slug
      - name
      additionalProperties: false
    ReleaseApplicationInput:
      type: object
      description: Input to create or change a ReleaseApplication; server-managed fields are left out.
      properties:
        project:
          type: string
          format: uuid
          description: ID of the ReleaseProject.
        slug:
          type: string
          description: Unique across projects, so the download page is addressed by it alone.
        name:
          type: string
        carries_adapters:
          type: boolean
          default: false
          description: Set on the farm sync client; only its builds may declare `adapters`.
        default_channel:
          type: string
          format: uuid
          description: ID of the ReleaseChannel, a listed channel of this application, whose active release the latest
            download links give (req 101.10), e.g. stable for the farm sync client. Absent, no latest link.
        kind:
          type: string
          enum:
          - desktop
          - mobile
          - launcher
          - tool
          - agent
        audience:
          type: string
          enum:
          - public
          - organization
          - moonitoring
          description: 'Who the software is built for, and so how its clients sign in: public, nobody; organization,
            an access user token (user, active Organization, role; see User); moonitoring, a staff token (see MoonitoringUser).
            A channel narrows within the audience (ReleaseChannel) and never widens it. Partners and integrators
            are Organizations.'
        archived:
          type: boolean
          default: false
          description: Archive it, or bring it back; an archived one is kept and offered to nobody (decided 2026-11-05).
      required:
      - project
      - slug
      - name
      - kind
      - audience
      additionalProperties: false
    ReleasePlatformInput:
      type: object
      description: Input to create or change a ReleasePlatform; server-managed fields are left out.
      properties:
        os:
          type: string
          enum:
          - windows
          - macos
          - linux
          - android
          - ios
        arch:
          type: string
          enum:
          - x64
          - arm64
          - universal
          description: '`(os, arch)` is unique.'
      required:
      - os
      - arch
      additionalProperties: false
    ReleaseDepotInput:
      type: object
      description: Input to create or change a ReleaseDepot; server-managed fields are left out.
      properties:
        project:
          type: string
          format: uuid
          description: ID of the ReleaseProject.
        slug:
          type: string
          description: '`(project, slug)` is unique.'
        kind:
          type: string
          enum:
          - binaries
          - shared_assets
          - language_pack
          - optional
        platform:
          type: string
          format: uuid
          description: 'ID of the ReleasePlatform. Empty: cross-platform.'
        language:
          type: string
          description: BCP-47.
        chunking_params:
          $ref: ../../../../common/v1/schemas.yaml#/components/schemas/ChunkingParams
        encryption_key:
          type: string
          format: uuid
          description: ID of the ReleaseEncryptionKey. Only for confidential content; content that is not secret
            is signed, not encrypted.
      required:
      - project
      - slug
      - kind
      - chunking_params
      additionalProperties: false
    ReleaseApplicationDepotInput:
      type: object
      description: Input to create or change a ReleaseApplicationDepot; server-managed fields are left out.
      properties:
        install_policy:
          type: string
          enum:
          - required
          - default_on
          - optional
          - on_demand
        install_path:
          type: string
      required:
      - install_policy
      - install_path
      additionalProperties: false
    ReleaseBuildInput:
      type: object
      description: Creates a build in status uploading; the build number is issued by the application's counter.
      properties:
        application:
          type: string
          format: uuid
          description: ID of the ReleaseApplication.
        version_label:
          type: string
          description: Semver shown to people; never used for comparisons.
        source_ref:
          type: string
          description: Commit or CI tag.
        adapters:
          type: array
          description: 'The source adapters the build carries, as the client declares them in its catalog; only
            for a farm sync client. farm registers them (SourceAdapter, side client) from `release.activated.v1`.'
          items:
            type: object
            properties:
              code:
                type: string
                description: Stable name of the reader, e.g. `sialleva.export`.
              adapter_version:
                type: string
                description: Semantic version of the adapter.
              source_channel:
                type: string
                description: The name of the farm SourceChannel it reads, e.g. `SiAlleva` (unique in farm).
              supported_versions:
                type: string
                description: The source versions it was tested against, e.g. ">=3.0.1, <3.1".
            required:
            - code
            - adapter_version
            - source_channel
            - supported_versions
      required:
      - application
      - version_label
      - source_ref
      additionalProperties: false
    ChunkCheckRequest:
      type: object
      description: The chunks of a manifest, by hash of their uncompressed content; only those we do not hold get
        an upload URL.
      properties:
        chunks:
          type: array
          items:
            type: object
            properties:
              hash:
                type: string
              size_raw:
                type: integer
              size_stored:
                type: integer
              compression:
                type: string
                enum:
                - none
                - zstd
                - lzma
              encryption_key:
                type: string
                format: uuid
            required:
            - hash
            - size_raw
            - size_stored
            - compression
          minItems: 1
          maxItems: 1000
      required:
      - chunks
    ChunkCheckResult:
      type: object
      description: Per chunk, whether it is known or must be uploaded.
      properties:
        chunks:
          type: array
          items:
            type: object
            properties:
              hash:
                type: string
              known:
                type: boolean
              upload:
                $ref: ../../../../common/v1/schemas.yaml#/components/schemas/SignedUrl
            required:
            - hash
            - known
      required:
      - chunks
    ReleaseManifestInput:
      type: object
      description: Registers a manifest of a depot and returns where to upload its signed blob.
      properties:
        depot:
          type: string
          format: uuid
          description: ID of the ReleaseDepot.
        content_hash:
          type: string
          description: Unique. Hash of the canonical blob.
        format_version:
          type: integer
        total_size_raw:
          type: integer
        file_count:
          type: integer
        chunk_count:
          type: integer
        chunks:
          type: array
          items:
            type: string
          description: Hashes of every chunk the manifest references; all must be known.
      required:
      - depot
      - content_hash
      - format_version
      - total_size_raw
      - file_count
      - chunk_count
      additionalProperties: false
    ReleaseManifestCreated:
      type: object
      description: The manifest and where to upload its blob.
      properties:
        manifest:
          $ref: '#/components/schemas/ReleaseManifest'
        upload:
          $ref: ../../../../common/v1/schemas.yaml#/components/schemas/SignedUrl
      required:
      - manifest
      - upload
    ReleaseBuildDepotInput:
      type: object
      description: Which manifest the build uses for a depot of its application.
      properties:
        depot:
          type: string
          format: uuid
        manifest:
          type: string
          format: uuid
      required:
      - depot
      - manifest
    ReleasePatchArtifactInput:
      type: object
      description: Input to create or change a ReleasePatchArtifact; server-managed fields are left out.
      properties:
        depot:
          type: string
          format: uuid
          description: ID of the ReleaseDepot.
        from_manifest:
          type: string
          format: uuid
          description: ID of the ReleaseManifest.
        to_manifest:
          type: string
          format: uuid
          description: ID of the ReleaseManifest. Both manifests belong to the depot.
        algorithm:
          type: string
          enum:
          - bsdiff
          - zstd_patch
          - wharf
          description: '`(from_manifest, to_manifest, algorithm)` is unique.'
        size:
          type: integer
        content_hash:
          type: string
      required:
      - depot
      - from_manifest
      - to_manifest
      - algorithm
      - size
      - content_hash
      additionalProperties: false
    ReleasePatchArtifactCreated:
      type: object
      description: The patch and where to upload it.
      properties:
        patch:
          $ref: '#/components/schemas/ReleasePatchArtifact'
        upload:
          $ref: ../../../../common/v1/schemas.yaml#/components/schemas/SignedUrl
      required:
      - patch
      - upload
    RevokeBuildRequest:
      type: object
      description: Marks a build revoked with a reason.
      properties:
        reason:
          type: string
      required:
      - reason
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'The short-lived token signed by `access`: an Organization user token, a staff token or a client
        token, as the operation''s audience says.'
