openapi: 3.0.2
info:
  version: 2.0.0
  title: Dash API
  contact:
    email: help@dash.app
    url: https://dash.app
  x-logo:
    url: https://link.assetfile.io/6hwNdbwsFaEQ95b7ZBHyLL.png
  description: >
    # Introduction


    The Dash API follows the
    [REST](https://en.wikipedia.org/wiki/Representational_state_transfer)
    standard and uses common
    [HTTP](https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol) headers,
    methods and response codes.

    Request and response bodies are all in
    [JSON](https://www.json.org/json-en.html) format except for `PUT` requests
    of binary file data when upload files.


    # Operations, Jobs and Batches


    If the standard `PUT`, `PATCH` and `DELETE` methods cannot adequately
    describe an operation on a resource the operation may itself  be treated as
    a resource and the endpoint URLs will reflect this accordingly.

    For example making a `POST` to `/asset-uploads` returns an
    [`AssetUpload`](#operation/postAssetUpload) resource which describes the
    URL(s) the client should `PUT` the binary data to upload a file to an asset.


    If an operation is unlikely to complete via a synchronous REST call, or
    asynchronous behaviour is simply preferable, job resource endpoints may
    provided for the operation.

    Created job resources can then be periodically polled to Get the status of
    the operation.

    Such endpoints can be expected to contain a `job` qualifier. e.g
    `/asset-download-jobs` and `/asset-download-jobs/{id}`


    All job resources can be expected to conform to a polymorphic job structure
    with common properties such as `id`, `progress` and type specific properties
    such as `dateCompleted` for successfully completed jobs.


    If an operation can be applied to multiple resources an endpoint may
    provided to create a batch resource for the operation.

    Such endpoints can be expected to contain a `batch` qualifier.

    As batch operations almost always need to be asynchronous you can expect to
    see both qualifiers in the endpoint URL e.g `/asset-download-batch-jobs` and
    `/asset-download-batch-jobs/{id}`.



    # Authorisation


    ## Get a short-lived bearer token for testing


    You should read the [OAuth2 section](#section/Authorisation/OAuth2) if you
    want to set up programmatic API access to Dash. However, if you just want to
    try out an API endpoint, or want to [request your client ID and
    secret](#operation/putCustomIntegrationSettings) (required for OAuth2
    below), you can get a short-lived bearer token:


    1. Log in to your Dash account as normal

    2. Open the browser developer tools (CMD + OPTION + I on Mac or CTRL + SHIFT
    + I on Windows)

    3. Click the "Application" tab

    4. Under "Storage" in the left panel, expand "local storage"

    5. Click on the URL of your Dash site

    6. Copy the "value" for the access_token from the right-hand panel (be sure
    to select the whole thing - double click to edit, select all then copy).


    This token can be used to try out an endpoint directly from these docs. Just
    click "Try it..." in the right-hand panel and enter your token in the "Auth"
    tab.


    ## OAuth2

    Dash uses OAuth 2.0 for authorisation. A good overview of OAuth 2.0 can be
    found [here](https://auth0.com/docs/protocols/protocol-oauth2).


    Endpoints: 

    * https://login.dash.app/authorize

    * https://login.dash.app/oauth/token


    Scopes to note:

    * **subdomain**: this should be set to the subdomain of the Dash the user is
    trying to access e.g. `subdomain:my-account`

    * **offline_access**: the standard OAuth 2.0 scope to use to obtain a
    refresh token


    Audience:

    An query parameter of `audience=https://assetplatform.io` must be provided
    to the https://login.dash.app/authorize endpoint 


    To obtain your client ID and secret, follow the steps above to [get a
    temporary bearer
    token](#section/Authorisation/Get-a-short-lived-bearer-token-for-testing)
    and use this to [create custom integration
    settings](#operation/putCustomIntegrationSettings). The response you receive
    from the custom integrations settings endpoint will include your client ID
    and secret.


    ## Authorization Code Flow

    To begin the flow, send your user in a browser to to


    https://login.dash.app/authorize?response_type=code&audience=https://assetplatform.io&client_id={YOUR_CLIENT_ID}&redirect_uri={YOUR_REDIRECT}&scope=offline_access%20subdomain:{YOUR_SUBDOMAIN}


    Once the user successfully authenticates, they will be redirected to your
    `redirect_uri` with the Authorization Code provided in a query parameter.


    Now that you have an Authorization Code, you must exchange it for your
    tokens via the https://login.dash.app/oauth/token endpoint


    ```

    curl --request POST \
      --url 'https://login.dash.app/oauth/token' \
      --header 'content-type: application/x-www-form-urlencoded' \
      --data grant_type=authorization_code \
      --data 'client_id={YOUR_CLIENT_ID}' \
      --data 'client_secret={YOUR_CLIENT_SECRET}' \
      --data 'code={CODE_FROM_PREVIOUS_STEP}' \
      --data 'redirect_uri={YOUR_REDIRECT}'
    ```


    A more detailed description of the Authorization Code Flow can be found
    [here](https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-auth-code-flow)     
      
    ## Authentication Without User Interaction 


    Due to security concerns, neither OAuth grant types `Client Credentials` or
    `Password` are supported by the Dash API.


    If you require an automated script to call the Dash API, we recommend going
    through the Authorization Code Flow described above once, specifying the
    offline_access scope to get a refresh token along with your access token.

    Your script can store and use this refresh token to call
    https://login.dash.app/oauth/token and get a new access token when the
    current one expires.


    ## Current User Details

    The Bearer Token is a standard [JWT](https://jwt.io/introduction) token so
    can be useful to decode in some cases.

    For example, the `sub` field of the Bearer Token can be used in cases where
    you need access to the `User.id` of the current user.


    e.g. When making an [`AssetSearch`](#operation/postAssetSearch) with the
    `STAGED_BY` criterion to find all [`Asset`](#tag/Assets) resources staged by
    the current user.


    Alternatively the [GET Current User](#operation/getCurrentUser) endpoint
    contains properties for the current user to avoid needing to decode the
    Bearer Token.


    # Permitted Actions

    In most responses from the Dash API you will find a `permittedActions`
    property alongside a `result` property which contains the resource.

    This is to provide context for operations the current user is permitted to
    perform on that resource.


    If an expected permitted action is not included in the `permittedActions`
    property then the current user does not have permission to perform the
    action.


    The [GET Current User](#operation/getCurrentUser) endpoint houses permitted
    actions which are not associated with a specific API resource instance.

    e.g. If the current user has permission to create new [`Asset`](#tag/Assets)
    resources then the [GET Current User](#operation/getCurrentUser)
    `permittedActions` property will contain the permitted action `ASSETS` :
    `CREATE_ASSETS`.


    # Common Use Cases


    ## Getting fields and field options for asset metadata


    [`Asset.metadata`](#tag/Assets) consists of a map of `String` to `String[]`


    The keys for map are [`Field`](#tag/Fields) IDs. Full details, including the
    field name, can be got via the [GET Field](#tag/Fields/operation/getField)
    endpoint or the full list of fields for an account can be retrieved via the
    [GET Fields](#tag/Fields/operation/getFields) endpoint.  


    The map values are a list of plain text values if [`Field.hasFixedOptions =
    false`](#tag/Fields) or a list of [`FieldOption`](#tag/Field-Options) IDs if
    [`Field.hasFixedOptions = true`](#tag/Fields)    


    Where [`Field.hasFixedOptions = true`](#tag/Fields) details, including the
    field option name, can be got via the [GET Field
    Option](#operation/getFieldOption) endpoint. 


    Where [`Field.hierarchical = true`](#tag/Fields) the complete branch of the
    tree will be returned and can be constructed via the
    [`FieldOption.parent`](#tag/Field-Options) property.


    ## Getting the full schema of fields and field options

    The full list of fields for an account can be retrieved via the [GET
    Fields](#tag/Fields/operation/getFields) endpoint.


    Where [`Field.hasFixedOptions = true`](#tag/Fields) the [POST Field Option
    Searches](#operation/postFieldOptionSearch) endpoint can be used to get the
    available options.


    Where [`Field.hierarchical = true`](#tag/Fields) you should start with a
    `PARENT_ID` `FIELD_IS_EMPTY` query to get the top level options and then
    `PARENT_ID` `FIELD_EQUALS` queries to get each sub-level.  
                       
    ## Folders 

    A Folder in Dash is simply a [`FieldOption`](#tag/Field-Options), for the
    built-in Folders [`Field`](#tag/Fields). To determine the ID of the Folders
    [`Field`](#tag/Fields), use the [`Folder Settings`](#tag/Folder-Settings)
    endpoint. Once you have this ID, Folders behave the same as any other
    [`Field`](#tag/Fields).


    For getting the folder tree see [Getting fields and field options for asset
    metadata](#section/Common-Use-Cases/Getting-fields-and-field-options-for-asset-metadata)
    and [Getting the full schema of fields and field
    options](#section/Common-Use-Cases/Getting-the-full-schema-of-fields-and-field-options)


    For getting assets in folders see
    [`AssetSearch`](#operation/postAssetSearch) 


    For getting assets in no folders see the _Search for field is empty_ example
    in the [POST Asset Searches](#operation/postAssetSearch) endpoint.


    ## Creating a new asset


    Assets are the main resources in Dash. An asset consists of a file, some
    fixed properties (such as the date the asset was added to Dash) and custom
    metadata.


    To create new assets and upload files:


    1. [Create an Asset and Upload batch
    job](#operation/postAssetAndUploadBatchJob)

    2. Wait for the job to complete by checking the [GET Asset and upload batch
    job](#operation/postAssetUpload/operation/getAssetAndUploadBatchJob)
    endpoint

    3. The completed job includes an [`AssetUpload`](#operation/postAssetUpload)
    resources in the job's `result` property. For each file you want to upload:
       * Make PUT requests to upload your file part with the byte ranges specified to the URLs in the corresponding `AssetUploadPart`.
       * Get the `etag` property from the response of each PUT request and use them to complete the upload via the (POST Asset Upload Completion)(#operation/postAssetUploadCompletion)
    4. The assets will be created with a [lifecycle
    status](#tag/Asset-Lifecycle) of `STAGED`. Use the [POST Asset lifecycle
    transition batch job](postAssetLifecycleTransitionBatchJob) endpoint if
    you'd like to change the state of the assets (e.g. to `PENDING_APPROVAL` or
    `LIVE`).


    ## Uploading a new file for an asset    

    1. Create an [`AssetUpload`](#operation/postAssetUpload) via the [POST Asset
    Upload](#operation/postAssetUpload/operation/postAssetUpload) endpoint

    3. Make PUT requests to upload your file part with the byte ranges specified
    to the URLs in the corresponding `AssetUploadPart`.

    4. Get the `etag` property from the response of each PUT request and use
    them to complete the upload via the (POST Asset Upload
    Completion)(#operation/postAssetUploadCompletion)


    ## Getting asset file versions

    The current [`AssetFile`](#operation/getAssetFiles) for an
    [`Asset`](#tag/Assets) is returned in the [`Asset`](#tag/Assets) resource
    via the [`Asset.currentFile`](#tag/Assets) property.


    The [GET Asset Files](#operation/getAssetFiles) endpoint can be used to get
    all [`AssetFile`](#operation/getAssetFiles) resources for an
    [`Asset`](#tag/Assets)


    ## Editing asset metadata    

    Edit the contents of one or more [`Asset.metadata`](#tag/Assets) map
    properties via the [POST Asset Metadata Edit Batch
    Job](#operation/postAssetMetadataEditBatchJob) endpoint and check on the
    progress and status of the edit via the [GET Asset Metadata Edit Batch
    Job](#operation/getAssetMetadataEditBatchJob) endpoint.


    ## Getting user collections    

    1. Get the current user ID from the [current user
    details](#section/Authorisation/Current-User-Details)

    2. Use this ID in the `ASSOCIATED_WITH_USER` criterion of the [POST
    Collection
    Search](#operation/postCollectionSearch/operation/postCollectionSearch)
    endpoint to get all collections a user has access to.

    3. To get the [`Asset`](#tag/Assets) resources in each collection see the
    _All assets in a collection_ and _Search within assets in a collection_
    examples  in the [POST Asset Searches](#operation/postAssetSearch) endpoint
    for how to specify the [`Collection.id`](#tag/Collections) in a
    `COLLECTIONS` : `FIELD_EQUALS` criterion.


    ## Search by file extension

    See the _Search by file extension_ and _Search by multiple file extensions_
    example in the [POST Asset Searches](#operation/postAssetSearch) endpoint


    ## Searching for changed assets

    The following date properties exist on an asset and can be supplied as FIXED
    field criteria in the [POST Asset Searches](#operation/postAssetSearch)
    endpoint


    - [`Asset.lifecycleStatus.dateStaged`](#tag/Assets) : The datetime the
    [`Asset`](#tag/Assets) was created but not yet live. `DATE_STAGED` in search
    criteria.

    - [`Asset.lifecycleStatus.datePendingApproval`](#tag/Assets) : The datetime
    the [`Asset`](#tag/Assets) was set for approval (if it was).
    `DATE_PENDING_APPROVAL` in search criteria.

    - [`Asset.lifecycleStatus.dateLive`](#tag/Assets) : The datetime the
    [`Asset`](#tag/Assets) was put live. `DATE_LIVE` in search criteria.

    - [`Asset.currentAssetFile.dateAdded`](#tag/Assets) : The datetime the
    latest [`AssetFile`](#operation/getAssetFiles) was added.
    `DATE_LAST_ASSET_FILE_ADDED` in search criteria.

    - [`Asset.dateLastModified`](#tag/Assets) : The datetime the *any* change
    was made to an [`Asset`](#tag/Assets). This includes all of the above and
    any change to custom metadata `DATE_LAST_MODIFIED` in search criteria.


    There is currently no way to determine if only custom metadata has changes.


    # Migration from V1


    Several breaking changes have been introduced in the switch from V1 to V2,
    which are all the result of three changes.

    - The domain is changing from `brightdash.app` to `dash.app`.  All URLs used
    to access the API, including for authorisation, should be updated to the new
    domain.

    - The concept of "asset staging status" has been renamed to "asset
    lifecycle" with the introduction of the bin, which adds another state for
    assets that isn't just about the staging workflow.  This second change
    manifests in the changing of the StagingWorkflowTransitionBatchJob to the
    LifecycleTransitionBatchJob, a refactoring of the asset model to bring the
    "date added" and "added by" fields together with other lifecycle
    information, and the renaming of the "date added" and "added by" fields to
    the more specific "date live" and "staged by".

    - Asset batch jobs used to only support carrying out operations on assets by
    a search criterion.  This has been extended to also allow performing
    operations by id, so the "criterion" field has changed to a "selector" field
    which supports objects of either type.

    - The term `Attribute` has been renamed to `Field` throughout, to mirror the
    change of terminology within the Dash frontend.


    All these changes are described in more specific detail below.


    ## Domain

    - Domain has changed from `brightdash.app` to `dash.app` throughout the API.

    ## Asset Staging Workflow

    - The path of this endpoint has changed from
    `asset-staging-workflow-transition-batch-jobs` to
    `asset-lifecycle-transition-batch-jobs`.

    - `criterion` in the POST body has become `selector`, and the criterion now
    needs to be wrapped in the following `{"type": "BY_CRITERION", "criterion":
    {...}}`.

    ## Asset Searches

    For both scroll and paged searches:

    - The following `criterion.field.fieldName` and `sorts.field.fieldName`
    values have been renamed:
      - `DATE_ADDED` -> `DATE_LIVE`
      - `ADDED_BY` -> `STAGED_BY`
    - The `stagingStatus`, `addedBy`, and `dateAdded` fields have been removed
    from the response. This data can now be found in the `lifecycleStatus`
    field.

    ## Asset Deletion

    - `criterion` in the POST body has become `selector`, and the criterion now
    needs to be wrapped in the following `{"type": "BY_CRITERION", "criterion":
    {...}}`.

    ## Asset Metadata Edit

    - `criterion` in the POST body has become `selector`, and the criterion now
    needs to be wrapped in the following `{"type": "BY_CRITERION", "criterion":
    {...}}`.

    ## Search Filters

    - The value returned from the `searchField` field of search filter results
    of type `HARD_CODED_FREE_OPTION` have changed from `DATE_ADDED` to
    `DATE_LIVE`.  This isn't really a breaking change as the specification says
    this field could return any string, but it feels worth mentioning.

    ## Saved Search

    - The following `criterion.field.fieldName` and `sorts.field.fieldName`
    values have been renamed for both POSTing and GETting SavedSearches:
        - `DATE_ADDED` -> `DATE_LIVE`
        - `ADDED_BY` -> `STAGED_BY`
    ## Attributes/Fields

    - The string `Attribute` has been replaced with the string `Field`
    throughout.  This includes e.g. `AttributeOption` being renamed to
    `FieldOption`.  A simple find and replace should be enough to migrate.
tags:
  - name: Fields
    description: >
      [`Field`](#tag/Fields) resources define the custom metadata schema for
      [`Asset`](#tag/Assets) resources in your Dash account.

      Every [`Asset`](#tag/Assets) in your Dash account can be assigned a value
      or values for each [`Field`](#tag/Fields) you define.


      The type and structure of the data stored against the
      [`Asset`](#tag/Assets) for each [`Field`](#tag/Fields) is described by a
      series of properties specified on the [`Field`](#tag/Fields).
  - name: Field Options
    description: >
      [`FieldOption`](#tag/Field-Options) resources define the set of valid
      choices for a [`Field`](#tag/Fields) when [`Field.hasFixedOptions =
      true`](#tag/Fields).


      An [`FieldOption`](#tag/Field-Options) has human-readable
      [`FieldOption.value`](#tag/Field-Options) and an
      [`FieldOption.position`](#tag/Field-Options) which determines the order in
      which it appears in relation to the other
      [`FieldOption`](#tag/Field-Options) resources for a
      [`Field`](#tag/Fields).


      If [`Field.hierarchical = true`](#tag/Fields) then
      [`FieldOption.parent`](#tag/Field-Options) is the
      [`FieldOption`](#tag/Field-Options) which is the parent node of the
      [`FieldOption`](#tag/Field-Options) in the tree.

      [`FieldOption.position`](#tag/Field-Options) then determines the order in
      which the option appears in relation to the other options with the same
      [`FieldOption.parent`](#tag/Field-Options).


      The [`FieldOption`](#tag/Field-Options) resource intentionally does not
      include the list of child [`FieldOption`](#tag/Field-Options) resources.

      This is to prevent costly loading of large
      [`FieldOption`](#tag/Field-Options) tree structures.

      [`FieldOption.leaf`](#tag/Field-Options) and
      [`FieldOption.numberOfChildren`](#tag/Field-Options) properties can be
      used to determine the number of children for a node, but it is recommended
      to implement a combination of lazy-loading strategies using the [GET Field
      Option](#operation/getFieldOption) and [POST Field Option
      Searches](#operation/postFieldOptionSearch) resources for retrieval.


      e.g. Doing a [GET Field Option](#operation/getFieldOption) with an
      [`FieldOption.id`](#tag/Field-Options) value found in
      [`Asset.metadata.values`](#tag/Assets) will give the complete branch of
      the tree necessary in the context of the viewing that
      [`Asset`](#tag/Assets) via the [`FieldOption.parent`](#tag/Field-Options)
      property.

      For traversing down an [`FieldOption`](#tag/Field-Options) tree [POST
      Field Option Searches](#operation/postFieldOptionSearch) can be used to
      first get all the top-level options and then each sub level as and when
      needed.


      Searching allows you to find [`FieldOption`](#tag/Field-Options) resources
      in your Dash matching specific criteria


      Criteria can be constructed based on direct comparison or pattern matching
      of a set of fixed [`FieldOption`](#tag/Field-Options) properties.


      The logical operators `AND`, `OR` and `NOT` are provided to support
      complex queries based on multiple fields.


      A list of sorts can also be provided to control the order in the which the
      results are returned.
  - name: Field Option Images
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
  - name: Assets
    description: >
      An [`Asset`](#tag/Assets) is the main resource in Dash. It consists of:


      * One or more [`AssetFile`](#operation/getAssetFiles) resources, detailing
      the versions of a file for an [`Asset`](#tag/Assets). Only the current
      [`AssetFile`](#operation/getAssetFiles) for an [`Asset`](#tag/Assets) is
      returned with the [`Asset`](#tag/Assets) resource. Use [GET Asset
      Files](#operation/getAssetFiles) to retrieve all
      [`AssetFile`](#operation/getAssetFiles) resources for an
      [`Asset`](#tag/Assets)

      * [`Asset.metadata`](#tag/Assets) which defines the assigned values for
      this [`Asset`](#tag/Assets) for [`Field`](#tag/Fields) resources

      * A number of fixed properties, e.g. `addedBy` the `User.id` of whoever
      added the [`Asset`](#tag/Assets)


      For the sake of performance any [`Field`](#tag/Fields) and
      [`FieldOption`](#tag/Field-Options) resources referenced in the
      [`Asset.metadata.values`](#tag/Assets) will need to be retrieved
      separately, if required.


      ### Searching


      Searching allows you to find [`Asset`](#tag/Assets) resources in your Dash
      matching specific criteria.


      Criteria can be constructed based on direct comparison or pattern matching
      of fields, where fields are either [`Asset.metadata.values`](#tag/Assets)
      or certain fixed [`Asset`](#tag/Assets) properties.

      The fixed `KEYWORDS` field can be used for a general purpose search as it
      will search across all [`Asset.metadata.values`](#tag/Assets) and fixed
      [`Asset`](#tag/Assets) properties.


      For searches involving [`Field`](#tag/Fields) resources where
      [`Field.hasFixedOptions = true`](#tag/Fields) a search using either the
      [`FieldOption.id`](#tag/Field-Options) or
      [`FieldOption.name`](#tag/Field-Options) will match.


      Any [`Asset`](#tag/Assets) which is assigned an
      [`FieldOption.id`](#tag/Field-Options) value for a [`Field`](#tag/Fields)
      resource where [`Field.hierarchical = true`](#tag/Fields) implicitly has
      the values of any parent [`FieldOption`](#tag/Field-Options) resources
      too.

      As such, any search using the parents
      [`FieldOption.id`](#tag/Field-Options) or
      [`FieldOption.name`](#tag/Field-Options) will match the
      [`Asset`](#tag/Assets).


      e.g. Given the hierarchical [`FieldOption`](#tag/Field-Options) structure
      `Grandparent / Parent / Child`, an [`Asset`](#tag/Assets) assigned the
      [`FieldOption.id`](#tag/Field-Options) of `Child`  will also be returned
      in searches for `Parent` or `Grandparent`.


      The logical operators `AND`, `OR` and `NOT` are provided to support
      complex queries based on multiple fields.


      A list of sorts can also be provided to control the order in the which the
      results are returned.


      The `action` property of a search, which defaults to `SEARCH_FOR_VIEW`,
      specifies the context in which the search is being run. For example if you
      only want to return [`Asset`](#tag/Assets) resources that the search
      [`User`](#tag/Users) has permission to delete then set the `action` to be
      `SEARCH_FOR_DELETE`.


      > **By default, searches will only returns results where
      [`Asset.lifecycleStatus.state = 'LIVE'`](#tag/Assets).**

      > **If you require search results to contain results with other state
      values, this needs to be explicitly included in the criteria.**


      Two kinds of search are possible, a standard
      [`AssetSearch`](#operation/postAssetSearch) and a
      [`AssetScrollSearch`](#operation/postAssetScrollSearch).`


      ### Lifecycle


      Dash provides a simple lifecycle for [`Asset`](#tag/Assets) resources to
      facilitate review and approval before they are accessible to other users,
      and also keep them `BINNED` after deletion so they can be retrieved.

      The lifecycle has four states

      * STAGED

      * PENDING_APPROVAL

      * LIVE

      * BINNED


      Depending on the [`Asset.lifecycleStatus.state`](#tag/Assets) value an
      [`Asset`](#tag/Assets) resources will only be visible to certain users.


      [`Asset`](#tag/Assets) resources begin in the `STAGED` state.

      While in the `STAGED` state [`Asset`](#tag/Assets) resources are only
      visible to the user who created the [`Asset`](#tag/Assets) and users where
      `User.isAdmin = true`.


      A [`User`](#tag/Users) with permission to create new
      [`Asset`](#tag/Assets) resources may not have the permission to move it to
      the `LIVE` state.

      While in the `PENDING_APPROVAL` state [`Asset`](#tag/Assets) resources are
      only visible to users where `User.isAdmin = true`.


      Once in the `LIVE` state [`Asset`](#tag/Assets) resources visibility is
      defined by `UserGroup` permissions (currently only configurable via the
      Dash frontend, not via the API)


      [`User`](#tag/Users) can change the state of [`Assets`](#tag/Assets) to
      `BINNED` when the [`Asset`](#tag/Assets) is `LIVE`. A `BINNED`
      [`Asset`](#tag/Assets) can be restored to `LIVE`.


      ### Asset Files


      An [`AssetFile`](#operation/getAssetFiles) describes a version of a file
      for an [`Asset`](#tag/Assets).

      Properties describe details of the file such as `mediaType` and
      `dimensions` (for images and videos).

      A `previewUrl` provides a means to access previews of the
      [`AssetFile`](#operation/getAssetFiles)


      The current [`AssetFile`](#operation/getAssetFiles) for an
      [`Asset`](#tag/Assets) is returned with the [`Asset`](#tag/Assets)
      resource.


      The [`AssetFile.id`](#operation/getAssetFiles) can be provided when
      creating an [`AssetDownload`](#tag/Asset-Downloads) to download a specific
      [`AssetFile`](#operation/getAssetFiles) for an [`Asset`](#tag/Assets).


      An [`AssetUpload`](#operation/postAssetUpload) resource is created when
      you want to upload a file to an [`Asset`](#tag/Assets).

      Upon completion a new [`AssetFile`](#operation/getAssetFiles) is created
      and will subsequently be returned in
      [`Asset.currentAssetFile`](#tag/Assets).

      You can use [GET Asset Files](#operation/getAssetFiles) to retrieve the
      all [`AssetFile`](#operation/getAssetFiles) resources for an
      [`Asset`](#tag/Assets).


      The [`AssetUpload`](#operation/postAssetUpload) resource defines one or
      more URLs to which parts of the file should be PUT to.


      Below is an example CURL PUT request that could be used to upload a local
      file part to an upload part URL taken from an
      [`AssetUpload`](#operation/postAssetUpload):


      ```

      curl --request PUT '<UPLOAD_PART_URL>' \

      --header 'Content-Length: <SIZE_OF_PART>' \

      --header 'Content-Type: <FILE_CONTENT_TYPE>' \

      --data '@<PATH_TO_FILE_PART>'

      ```


      The upload is then completed by sending a list of the eTags returned from
      each of these PUTs to
      [`AssetUploadComplete`](#operation/postAssetUploadCompletion)
  - name: Field Views
    description: >
      [`FieldView`](#tag/Field-Views)s provide an ordered view of a subset of
      [`Field`](#tag/Fields)s, which can be configured by admins.  This can be
      used to decide which [`Field`](#tag/Fields)s to show alongside
      [`Asset`](#tag]/Assets)s in different contexts.
  - name: Asset Comments
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
  - name: Asset Downloads
    description: >
      An [`AssetDownload`](#tag/Asset-Downloads) resource is created when you
      want to download and optionally transform an
      [`AssetFile`](#operation/getAssetFiles) of an [`Asset`](#tag/Assets).


      When ready a URL is provided to download the transformed file.
  - name: Asset Embeddable Links
    description: >
      Embeddable Links provide a way to get a public (although unguessable) link
      to an optionally transformed [`AssetFile`](#operation/getAssetFiles) of an
      [`Asset`](#tag/Assets).
  - name: Asset Saved Crop Areas
    description: >
      An [`Asset Saved Crop Area`](#tag/Asset-Saved-Crop-Areas) resource is a
      saved crop area for a given [`AssetFile`](#operation/getAssetFiles) of an
      [`Asset`](#tag/Assets).
  - name: Asset Saved Crop Area Summaries
    description: >
      An [`Asset Saved Crop Area Summary`](#tag/Asset-Saved-Crop-Area-Summaries)
      resource is a saved crop area summary for a given
      [`AssetFile`](#operation/getAssetFiles) of an [`Asset`](#tag/Assets).
  - name: Asset Deduplication
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
  - name: Asset Deletion
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
  - name: Asset Metadata Export
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
  - name: Asset Shares
    description: >
      An [`AssetShare`](#tag/Asset-Shares) resource is a set of
      [`Assets`](#tag/Assets) which has been publicly shared. This can be for a
      limited period of time or forever.


      The assets shared can be view only or can also be downloaded.
  - name: Accounts
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
  - name: Account Security
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
  - name: AI Image Generations
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
  - name: Auto-Tagging Image Settings
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
  - name: Text In Image Settings
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
  - name: Onboarding Checklist
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
  - name: Folder Settings
    description: >
      For the most part Folders in Dash are just like any custom
      [`Field`](#tag/Fields) with [`Field.hasFixedOptions = true`](#tag/Fields),
      [`Field.hierarchical = true`](#tag/Fields) and [`Field.multiValue =
      true`](#tag/Fields).


      The Folders [`Field`](#tag/Fields) also has the following behaviour.


      * It cannot be deleted - [`Field.indestructable = true`](#tag/Fields)

      * It is used to define [`Asset`](#tag/Assets)  permissions for a
      `UserGroup` (currently only configurable via the Dash frontend, not via
      the API)

      * A quick browse widget of your Folders [`Field`](#tag/Fields) appears on
      your Dash app homepage.


      Folder Settings specify the [`Field.id`](#tag/Fields) of the Folders
      [`Field`](#tag/Fields) in your Dash.
  - name: Search Filters
    description: >
      The [Search Filter View](#operation/getSearchFilters) defines which
      filters appear, and the order in which they appear, in the left hand
      filter bar on the search page in the Dash frontend.

      These filters are used to build search criteria.


      Filters either refer to a [`Field`](#tag/Fields) in your Dash or a one of
      a subset of the fixed search fields available in the search API (currently
      `DATE_LIVE`, `FILE_TYPE` or `STAGED`)
  - name: Users
    description: >
      The [`User`](#tag/Users) resource contains information about a user in
      Dash such as their email address and their name (if provided).
  - name: User Referrer
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
  - name: User Preferences
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
  - name: Groups
    description: >
      [`Groups`](#tag/Groups) are used to specify the permissions of
      [`Users`](#tag/Users) in Dash.
  - name: Staff Members
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
  - name: Collections
    description: >
      A [`Collection`](#tag/Collections) is a user defined set of
      [`Asset`](#tag/Assets) resources.


      The [`Asset`](#tag/Assets) resources in a [`Collection`](#tag/Collections)
      are not returned with the [`Collection`](#tag/Collections) resource.

      To get the [`Asset`](#tag/Assets) resources you must create an [Asset
      Search](#operation/postAssetSearch) and use the
      [`Collection.id`](#tag/Collections) as the value in a `COLLECTIONS` :
      `FIELD_EQUALS` criterion.


      Searching allows you to find [`Collection`](#tag/Collections) resources in
      your Dash matching specific criteria.


      A list of sorts can also be provided to control the order in the which the
      results are returned.
  - name: Collection Shares
    description: >
      A [`CollectionShare`](#tag/Collection-Shares) is a
      [`Collection`](#tag/Collection) that has been made accessible to anyone
      with the `id` or `slug` of the [`Collection`](#tag/Collection).


      Searching allows you to find [`CollectionShare`](#tag/Collection-Shares)
      resources in your Dash matching specific criteria.


      A list of sorts can also be provided to control the order in the which the
      results are returned.
  - name: Subdomains
    description: >
      A
      [`SubdomainAvailabilityCheck`](#operation/postSubdomainAvailabilityCheck)
      is used to check whether a Dash subdomain is in use or not.
  - name: Corebook
    description: >
      At present the Corebook integration with Dash is configured entirely
      within Corebook.  However, Dash allows admins to set their
      [`CorebookSettings.corebookUrl`](#operation/putCorebookSettings), which
      will then show up as a "Brand" link to all users.
  - name: Shopify
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
  - name: OAuth2
    description: >
      Dash allows admins of a given account to manage their OAuth2 connections.

      An admin can view the account's `accountId`, OAuth2 `clientId` and
      `clientSecret`, plus any `domainUrls` and `callbackUrls` which may have
      been set.

      The `domainUrls` are origins that will be allowed to make requests to
      OAuth2.

      The `callbackUrls` are the URLs that OAuth2 can call back to after a user
      authenticates.

      To view these setting use
      [`getOAuth2Settings`](#operation/getOAuth2Settings).

      To set the list of `domainUrls` and `callbackUrls` use
      [`putOAuth2Settings`](#operation/putOAuth2Settings).
  - name: Saved Searches
    description: >
      A SavedSearch is an `AssetSearch`(#operation/postAssetSearch)`.criterion`
      and `AssetSearch`(#operation/postAssetSearch)`.sorts` that have been saved
      by a user.  The user may also chose to receive email updates every time a
      new asset matches the saved criterion.


      Searching allows you to find [`SavedSearches`](#tag/Saved-Searches)
      resources in your Dash matching specific criteria.
  - name: Asset Download Events
    description: >
      An [`Asset Download Event
      Search`](#operation/postAssetDownloadEventSearch) allows you to search and
      aggregate over `Asset Download Events`      


      Criteria can be constructed based on exact or ranged comparison of the
      queryable event fields listed in the request schema below. 

      Some fields like `USER_TYPE` and `DOWNLOAD_TYPE` have a fixed set of
      possible values which can be determined from the response scheme
      below.    
            
      The logical operators `AND`, `OR` and `NOT` are provided to support
      complex queries based on multiple fields.


      A list of sorts can also be provided to control the order in the which the
      results are returned.


      Only the ids of referenced resources such as [`Portal`](#tag/Portals) and
      [`Asset`](#tag/Assets) are provided in the response, which can then be
      used to GET the full resources.         


      Aggregations operations can also be performed on the events described by
      the criteria, in order to, for example

      - Search across all downloads and count the number of downloads for each
      asset

      - Search downloads for a specific user and count the number of downloads
      per month


      Note, an [`Asset Download Event
      Search`](#operation/postAssetDownloadEventSearch) will only allow you to
      page to **10,000** but values returned in any aggregations and the
      `totalResults` property will be correct.
  - name: Portals
    description: >
      Portals allow a public (or passcode protected) view on
      [`Assets`](#tag/Assets) within a set of folders.
  - name: Theme
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
  - name: Cloud Connections
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
  - name: Cloud Objects
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
  - name: Cloud Import Jobs
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
  - name: Guest Uploads
    description: |
      Guest Uploads allow guests to upload assets to a specific Folder.
  - name: Guest Access Tokens
    description: >
      Guest Upload Access Tokens are used to access the API as a guest upload
      user
  - name: Subscription
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
  - name: Entity Quota Overrides
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
  - name: Shopify SKU Settings
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
  - name: Allowed Login Methods
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
  - name: Terms and Conditions
    description: >
      Coming soon; [contact us](mailto:help@dash.app) if you need access to this
      API endpoint.
x-tagGroups:
  - name: Account
    tags:
      - Accounts
      - Account Security
      - Allowed Login Methods
      - Auto-Tagging Image Settings
      - Entity Quota Overrides
      - Folder Settings
      - Onboarding Checklist
      - Preset Transformations
      - Search Filters
      - Shopify SKU Settings
      - Subscription
      - Text In Image Settings
      - Terms and Conditions
      - Theme
  - name: AI Image Generations
    tags:
      - AI Image Generations
      - Reference Image Uploads
  - name: Asset
    tags:
      - Assets
      - Asset Comments
      - Asset Deduplication
      - Asset Embeddable Links
      - Asset Metadata Export
      - Asset Saved Crop Area Summaries
      - Asset Saved Crop Areas
  - name: Asset Share
    tags:
      - Asset Shares
      - Asset Share Access Tokens
      - Asset Share Emails
  - name: Collection
    tags:
      - Collections
      - Collection Shares
  - name: Cloud Import
    tags:
      - Cloud Connections
      - Cloud Import Jobs
      - Cloud Objects
  - name: Domain
    tags:
      - Subdomains
      - Ping
  - name: Event
    tags:
      - Asset Download Events
  - name: Field
    tags:
      - Fields
      - Field Options
      - Field Option Images
      - Field Views
  - name: Guest Upload
    tags:
      - Guest Uploads
      - Guest Upload Access Tokens
      - Guest Upload Emails
      - Publicly Available Guest Upload Data
  - name: Integration
    tags:
      - Corebook
      - Custom
      - External App
      - Shopify
      - WordPress
  - name: Portals
    tags:
      - Portals
      - Portal Access Tokens
      - Portal Emails
      - Publicly Available Portal Datas
  - name: Saved Search
    tags:
      - Saved Searches
  - name: User
    tags:
      - Groups
      - Staff Members
      - Users
      - User Referrer
      - User Preferences
servers:
  - description: Production
    url: https://api-v2.dash.app
  - description: Staging
    url: https://api-v2.dashstaging.app
paths:
  /fields:
    get:
      tags:
        - Fields
      summary: Get all fields
      description: >
        Get all [`Field`](#tag/Fields) resources ordered by
        [`Field.name`](#tag/Fields).
      operationId: getFields
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FieldWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      tags:
        - Fields
      summary: Create a field
      description: |
        Create a [`Field`](#tag/Fields) resource.
      operationId: postField
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FieldRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FieldWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /fields/{id}:
    get:
      tags:
        - Fields
      summary: Get a field
      description: >
        Get a [`Field`](#tag/Fields) resource.


        When [`Field.hasFixedOptions = true`](#tag/Fields) the
        [`FieldOption`](#tag/Field-Options) resources for this
        [`Field`](#tag/Fields) can be retrieved via an
        [`FieldOptionSearch`](##operation/postFieldOptionSearch)
      operationId: getField
      parameters:
        - name: id
          in: path
          description: The unique ID of the field
          required: true
          schema:
            type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FieldWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      tags:
        - Fields
      summary: Update a field
      operationId: patchField
      parameters:
        - name: id
          in: path
          description: The unique ID of the field
          required: true
          schema:
            type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
      description: |
        Update a [`Field`](#tag/Fields) resource.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FieldPatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FieldWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - Fields
      summary: Delete a field
      operationId: deleteField
      parameters:
        - name: id
          in: path
          description: The unique ID of the field
          required: true
          schema:
            type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
      description: |
        Delete a [`Field`](#tag/Fields) resource.
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /field-options:
    post:
      tags:
        - Field Options
      summary: Create a field option
      description: >
        Create a new [`FieldOption`](#tag/Field-Options) resource adding it to
        the set of valid choices for an [`Field`](#tag/Fields) where
        [`Field.hasFixedOptions = true`](#tag/Fields).
      operationId: postFieldOption
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FieldOptionRequest'
            examples:
              Create at top level:
                value:
                  fieldId: a52b5315-15b8-417f-b742-d6902108bac1
                  value: My Top Level Folder
                  position: 3
                  parentId: null
              Create at sub level:
                value:
                  fieldId: a52b5315-15b8-417f-b742-d6902108bac1
                  value: My Sub Folder
                  position: 0
                  parentId: 1fc6d6c3-c42d-48e2-b0db-5d680a58ca52
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FieldOptionWithPermittedActions'
              examples:
                Create at top level:
                  value:
                    result:
                      id: 1fc6d6c3-c42d-48e2-b0db-5d680a58ca52
                      fieldId: a52b5315-15b8-417f-b742-d6902108bac1
                      value: My Top Level Folder
                      position: 0
                      leaf: false
                      parent: null
                    permittedActions: []
                Create at sub level:
                  value:
                    $ref: >-
                      ../components//examples/field/option/FieldOptionWithPermittedActionsWithParent1.yaml
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /field-options/{id}:
    get:
      tags:
        - Field Options
      summary: Get a field option
      operationId: getFieldOption
      description: >
        Get an [`FieldOption`](#tag/Field-Options) resource for an
        [`Field`](#tag/Fields) where [`Field.hasFixedOptions =
        true`](#tag/Fields).
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`FieldOption`](#tag/Field-Options)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FieldOptionWithPermittedActions'
              examples:
                Without parent:
                  value:
                    result:
                      id: 1fc6d6c3-c42d-48e2-b0db-5d680a58ca52
                      fieldId: a52b5315-15b8-417f-b742-d6902108bac1
                      value: My Top Level Folder
                      position: 0
                      leaf: false
                      parent: null
                    permittedActions: []
                With parent:
                  value:
                    result:
                      id: 1ecabbb8-85d5-11eb-8dcd-0242ac130003
                      fieldId: a52b5315-15b8-417f-b742-d6902108bac1
                      value: Another Sub Folder
                      position: 1
                      leaf: true
                      parent:
                        result:
                          id: 1fc6d6c3-c42d-48e2-b0db-5d680a58ca52
                          fieldId: a52b5315-15b8-417f-b742-d6902108bac1
                          value: My Top Level Folder
                          position: 0
                          leaf: false
                          parent: null
                        permittedActions: []
                      permittedActions: []
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - Field Options
      summary: Delete a field option
      operationId: deleteFieldOption
      description: >
        Delete an [`FieldOption`](#tag/Field-Options) resource, removing it from
        the set of valid choices for an [`Field`](#tag/Fields).


        > **When deleting an option within a hierarchy of options all options in
        the hierarchy below the one being deleted will also be deleted.**
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`FieldOption`](#tag/Field-Options)
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /field-option-batches:
    post:
      tags:
        - Field Options
      summary: Create field options
      description: >
        Create new [`FieldOption`](#tag/Field-Options) resources adding them to
        the set of valid choices for an [`Field`](#tag/Fields) where
        [`Field.hasFixedOptions = true`](#tag/Fields).
      operationId: postFieldOptionBatches
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FieldOptionBatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FieldOptionBatch'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /field-option-searches:
    post:
      tags:
        - Field Options
      summary: Search for field options
      operationId: postFieldOptionSearch
      description: >
        Create a new [`FieldOptionSearch`](##operation/postFieldOptionSearch)


        The most commmon uses of an
        [`FieldOptionSearch`](##operation/postFieldOptionSearch) is to retrieve
        the [`FieldOption`](#tag/Field-Options) resources for an
        [`Field`](#tag/Fields) using the `FIELD_ID` field criterion.

        When [`Field.hierarchical = true`](#tag/Fields) it is recommended to
        retrieve each level of the tree via a separate search using `PARENT_ID`
        field criteria.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FieldOptionSearchRequest'
            examples:
              Search for top level options:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: AND
                    criteria:
                      - type: FIELD_EQUALS
                        field: FIELD_ID
                        value: a52b5315-15b8-417f-b742-d6902108bac1
                      - type: FIELD_IS_EMPTY
                        field: PARENT_ID
                  sorts:
                    - field: POSITION
                      order: ASC
              Search for sub level options:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: AND
                    criteria:
                      - type: FIELD_EQUALS
                        field: FIELD_ID
                        value: a52b5315-15b8-417f-b742-d6902108bac1
                      - type: FIELD_EQUALS
                        field: PARENT_ID
                        value: 1fc6d6c3-c42d-48e2-b0db-5d680a58ca52
                  sorts:
                    - field: POSITION
                      order: ASC
              Search for all options for a field:
                value:
                  from: 0
                  pageSize: 1
                  criterion:
                    type: FIELD_EQUALS
                    field: FIELD_ID
                    value: a52b5315-15b8-417f-b742-d6902108bac1
                  sorts: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FieldOptionSearch'
              examples:
                Search for top level options:
                  value:
                    results:
                      - result:
                          id: 1fc6d6c3-c42d-48e2-b0db-5d680a58ca52
                          fieldId: a52b5315-15b8-417f-b742-d6902108bac1
                          value: My Top Level Folder
                          position: 0
                          leaf: false
                          parent: null
                        permittedActions: []
                      - result:
                          id: 1fc6d6c3-c42d-48e2-b0db-5d680a58ca52
                          fieldId: a52b5315-15b8-417f-b742-d6902108bac1
                          value: Another Top Level Folder
                          position: 1
                          leaf: false
                          parent: null
                        permittedActions: []
                    totalResults: 2
                Search for sub level options:
                  value:
                    results:
                      - result:
                          result:
                            id: 8f6ef636-85d0-11eb-8dcd-0242ac130003
                            fieldId: a52b5315-15b8-417f-b742-d6902108bac1
                            value: My Sub Folder
                            position: 0
                            leaf: true
                            parent:
                              result:
                                id: 1fc6d6c3-c42d-48e2-b0db-5d680a58ca52
                                fieldId: a52b5315-15b8-417f-b742-d6902108bac1
                                value: My Top Level Folder
                                position: 0
                                leaf: false
                                parent: null
                              permittedActions: []
                            permittedActions: []
                      - result:
                          id: 1ecabbb8-85d5-11eb-8dcd-0242ac130003
                          fieldId: a52b5315-15b8-417f-b742-d6902108bac1
                          value: Another Sub Folder
                          position: 1
                          leaf: true
                          parent:
                            result:
                              id: 1fc6d6c3-c42d-48e2-b0db-5d680a58ca52
                              fieldId: a52b5315-15b8-417f-b742-d6902108bac1
                              value: My Top Level Folder
                              position: 0
                              leaf: false
                              parent: null
                            permittedActions: []
                          permittedActions: []
                    totalResults: 2
                Search for all options for a field:
                  value:
                    results:
                      - result:
                          id: 1fc6d6c3-c42d-48e2-b0db-5d680a58ca52
                          fieldId: a52b5315-15b8-417f-b742-d6902108bac1
                          value: A folder
                          position: 0
                          leaf: false
                          parent: null
                        permittedActions: []
                    totalResults: 568
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /field-option-images:
    post:
      x-dash-internal: true
      tags:
        - Field Option Images
      summary: Get field option images
      operationId: postFieldOptionImageBatches
      description: |
        Get Field Option Images in batches
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FieldOptionImageBatchRequest'
            examples:
              Get field option images for a few field options:
                value:
                  items:
                    - batchItemId: 1
                      fieldOptionId: 1fc6d6c3-c42d-48e2-b0db-5d680a58ca52
                    - batchItemId: 2
                      fieldOptionId: 1ecabbb8-85d5-11eb-8dcd-0242ac130003
                    - batchItemId: 3
                      fieldOptionId: 5a2481e0-819f-4b46-a7e6-143f943345f2
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FieldOptionImageBatch'
              examples:
                Get field option images for a few field options:
                  value:
                    successes:
                      '1':
                        accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                        fieldId: 7756d388-110c-4712-b350-0b2b48e156c1
                        fieldOptionId: 1fc6d6c3-c42d-48e2-b0db-5d680a58ca52
                        url: https://example.com
                      '2':
                        accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                        fieldId: 7756d388-110c-4712-b350-0b2b48e156c1
                        fieldOptionId: 1ecabbb8-85d5-11eb-8dcd-0242ac130003
                        url: https://example.com
                    failures:
                      '3': FIELD_OPTION_IMAGE_DOES_NOT_EXIST
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /field-option-images/{id}:
    delete:
      x-dash-internal: true
      tags:
        - Field Option Images
      summary: Delete a field option image
      operationId: deleteFieldOptionImage
      description: |
        Delete a field Option Image
      parameters:
        - name: id
          in: path
          description: >-
            The unique ID of the [`FieldOption`](#tag/Field-Options) that the
            image belongs to
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /field-option-image-uploads:
    post:
      x-dash-internal: true
      tags:
        - Field Option Images
      summary: Upload a field option image
      operationId: postUploadFieldOptionImage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FieldOptionImageUploadRequest'
            examples:
              Get an image upload object:
                value:
                  accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                  fieldId: 7756d388-110c-4712-b350-0b2b48e156c1
                  fieldOptionId: 1fc6d6c3-c42d-48e2-b0db-5d680a58ca52
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FieldOptionImageUpload'
              examples:
                Get an image upload object:
                  value:
                    url: https://example.com
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /field-views:
    get:
      tags:
        - Field Views
      summary: Get all field views
      description: |
        Get all [`FieldViews`](#tag/Field-Views).
      operationId: getFieldViews
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FieldViewWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /assets/{id}:
    get:
      tags:
        - Assets
      summary: Get an asset.
      operationId: getAsset
      description: |
        Get an [`Asset`](#tag/Assets)
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`Asset`](#tag/Assets)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - Assets
      summary: Delete an asset
      operationId: deleteAsset
      description: >
        Delete an [`Asset`](#tag/Assets). All associated
        [`AssetFile`](#operation/getAssetFiles) resources will also be deleted.
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`Asset`](#tag/Assets)
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      tags:
        - Assets
      summary: Update an asset
      operationId: patchAsset
      description: |
        Patch an [`Asset`](#tag/Assets)
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`Asset`](#tag/Assets)
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetPatchRequest'
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /assets-creations:
    post:
      x-dash-internal: true
      tags:
        - Assets
      summary: Create some new assets
      operationId: postAssetsCreations
      description: >
        Create a specified number of new [`Asset`](#tag/Assets)s without files. 
        [`AssetUpload`](#operation/postAssetUploadBatchJobs)s can be done
        separately.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetsCreationRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetsCreationWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-and-upload-batch-jobs:
    post:
      tags:
        - Assets
      summary: Create assets and upload files
      operationId: postAssetAndUploadBatchJob
      description: >
        An [`AssetAndUploadBatchJob`](#operation/postAssetAndUploadBatchJob)
        should be created when you want to create multiple
        [`Asset`](#tag/Assets) resources and also create an
        [`AssetUpload`](#operation/postAssetUpload) for each of them.


        Each asset can be uploaded in a single part or in multiple parts. If the
        filesize is less than 5MiB then it must be uploaded in a single part. If
        the filesize is greater than 5GiB then it must be uploaded in multiple
        parts, each smaller than 5GiB.


        The [`AssetUpload`](#operation/postAssetUpload) resources in the
        completed job should then be used to upload the files for each and asset
        and complete each upload.


        After the [`Asset`](#tag/Assets) resources have been created and files
        uploaded to them they will still be in [`Asset.lifecycleStatus.state =
        'STAGED'`](#tag/Assets).

        To send them for approval or put them live see [Asset
        Lifecycle](#tag/Asset-Lifecycle).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetAndUploadBatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetAndUploadBatchJob'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-and-upload-batch-jobs/{id}:
    get:
      tags:
        - Assets
      summary: Get the status of creating assets and uploading files
      operationId: getAssetAndUploadBatchJob
      description: >
        Get the status and eventual result of an
        [`AssetAndUploadBatchJob`](#operation/postAssetAndUploadBatchJob)
      parameters:
        - name: id
          in: path
          description: >-
            The unique ID of the
            [`AssetAndUploadBatchJob`](#operation/postAssetAndUploadBatchJob)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetAndUploadBatchJob'
              examples:
                Completed:
                  value:
                    id: be161977-d44e-4888-af3c-66522e223963
                    accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                    creatorId: google-oauth2|110955770826801837334
                    type: COMPLETED
                    progress:
                      steps:
                        - id: assetAndUploadGetJobItemsStep
                          status: COMPLETED
                          completedItems: 2
                          totalItems: 2
                        - id: assetAndUploadProcessJobItemsStep
                          status: COMPLETED
                          completedItems: 2
                          totalItems: 2
                    dateCompleted: '2021-02-15T09:24:01.417Z'
                    result:
                      successes:
                        file-1:
                          result:
                            id: 5a2481e0-819f-4b46-a7e6-143f943345f2
                            assetId: 7af90a8b-7ccd-430f-a85d-e8614015bc47
                            uploadParts:
                              - partNumber: 1
                                startByte: 0
                                endByte: 6999999
                                url: >-
                                  https://platform-asset-storage.s3.eu-west-1.amazonaws.com/cfb665ca-ce35-4418-b9d5-70ee815db4bd/7af90a8b-7ccd-430f-a85d-e8614015bc47?uploadId=5a2481e0-819f-4b46-a7e6-143f943345f2&part-number=1
                              - partNumber: 2,
                                startByte: 7000000
                                endByte: 13999999
                                url: >-
                                  https://platform-asset-storage.s3.eu-west-1.amazonaws.com/cfb665ca-ce35-4418-b9d5-70ee815db4bd7af90a8b-7ccd-430f-a85d-e8614015bc47?uploadId=5a2481e0-819f-4b46-a7e6-143f943345f2&part-number=2
                              - partNumber: 3
                                startByte: 14000000
                                endByte: 15318361
                                url: >-
                                  https://platform-asset-storage.s3.eu-west-1.amazonaws.com/cfb665ca-ce35-4418-b9d5-70ee815db4bd/7af90a8b-7ccd-430f-a85d-e8614015bc47/?uploadId=5a2481e0-819f-4b46-a7e6-143f943345f2&part-number=3
                          permittedActions: []
                        file-2:
                          result:
                            id: 9f49416e-0813-4930-bf44-a3414ac57938
                            assetId: 86739a63-a4f3-4655-bd45-7a567379356c
                            uploadParts:
                              - partNumber: 1
                                startByte: 0
                                endByte: 123456
                                url: >-
                                  https://platform-asset-storage.s3.eu-west-1.amazonaws.com/cfb665ca-ce35-4418-b9d5-70ee815db4bd/86739a63-a4f3-4655-bd45-7a567379356c/86739a63-a4f3-4655-bd45-7a567379356c?uploadId=9f49416e-0813-4930-bf44-a3414ac57938&part-number=1
                          permittedActions: []
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-uploads:
    post:
      tags:
        - Assets
      summary: Upload an asset file
      description: >
        Create a new [`AssetUpload`](#operation/postAssetUpload) resource for an
        existing [`Asset`](#tag/Assets).
      operationId: postAssetUpload
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetUploadRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetUploadWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-upload-batch-jobs:
    post:
      x-dash-internal: true
      tags:
        - Assets
      summary: Upload files to assets
      operationId: postAssetUploadBatchJob
      description: >
        An [`AssetUploadBatchJob`](#operation/postAssetUploadBatchJob) should be
        created when you want to create an
        [`AssetUpload`](#operation/postAssetUpload) for multiple assets.


        The [`AssetUpload`](#operation/postAssetUpload) resources in the
        completed job should then be used to upload the files for each and asset
        and complete each upload.


        After the files have been uploaded to the [`Asset`](#tag/Assets)s they
        will still be in [`Asset.lifecycleStatus.state =
        'STAGED'`](#tag/Assets).

        To send them for approval or put them live see [Asset
        Lifecycle](#tag/Asset-Lifecycle).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetUploadBatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetAndUploadBatchJob'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-upload-batch-jobs/{id}:
    get:
      x-dash-internal: true
      tags:
        - Assets
      summary: Get the status of uploading files
      operationId: getAssetUploadBatchJob
      description: >
        Get the status and eventual result of an
        [`AssetUploadBatchJob`](#operation/postAssetUploadBatchJob)
      parameters:
        - name: id
          in: path
          description: >-
            The unique ID of the
            [`AssetUploadBatchJob`](#operation/postAssetUploadBatchJob)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetAndUploadBatchJob'
              examples:
                Completed:
                  value:
                    id: be161977-d44e-4888-af3c-66522e223963
                    accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                    creatorId: google-oauth2|110955770826801837334
                    type: COMPLETED
                    progress:
                      steps:
                        - id: assetAndUploadGetJobItemsStep
                          status: COMPLETED
                          completedItems: 2
                          totalItems: 2
                        - id: assetAndUploadProcessJobItemsStep
                          status: COMPLETED
                          completedItems: 2
                          totalItems: 2
                    dateCompleted: '2021-02-15T09:24:01.417Z'
                    result:
                      successes:
                        file-1:
                          result:
                            id: 5a2481e0-819f-4b46-a7e6-143f943345f2
                            assetId: 7af90a8b-7ccd-430f-a85d-e8614015bc47
                            uploadParts:
                              - partNumber: 1
                                startByte: 0
                                endByte: 6999999
                                url: >-
                                  https://platform-asset-storage.s3.eu-west-1.amazonaws.com/cfb665ca-ce35-4418-b9d5-70ee815db4bd/7af90a8b-7ccd-430f-a85d-e8614015bc47?uploadId=5a2481e0-819f-4b46-a7e6-143f943345f2&part-number=1
                              - partNumber: 2,
                                startByte: 7000000
                                endByte: 13999999
                                url: >-
                                  https://platform-asset-storage.s3.eu-west-1.amazonaws.com/cfb665ca-ce35-4418-b9d5-70ee815db4bd7af90a8b-7ccd-430f-a85d-e8614015bc47?uploadId=5a2481e0-819f-4b46-a7e6-143f943345f2&part-number=2
                              - partNumber: 3
                                startByte: 14000000
                                endByte: 15318361
                                url: >-
                                  https://platform-asset-storage.s3.eu-west-1.amazonaws.com/cfb665ca-ce35-4418-b9d5-70ee815db4bd/7af90a8b-7ccd-430f-a85d-e8614015bc47/?uploadId=5a2481e0-819f-4b46-a7e6-143f943345f2&part-number=3
                          permittedActions: []
                        file-2:
                          result:
                            id: 9f49416e-0813-4930-bf44-a3414ac57938
                            assetId: 86739a63-a4f3-4655-bd45-7a567379356c
                            uploadParts:
                              - partNumber: 1
                                startByte: 0
                                endByte: 123456
                                url: >-
                                  https://platform-asset-storage.s3.eu-west-1.amazonaws.com/cfb665ca-ce35-4418-b9d5-70ee815db4bd/86739a63-a4f3-4655-bd45-7a567379356c/86739a63-a4f3-4655-bd45-7a567379356c?uploadId=9f49416e-0813-4930-bf44-a3414ac57938&part-number=1
                          permittedActions: []
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-upload-completions:
    post:
      tags:
        - Assets
      summary: Complete an asset file upload
      operationId: postAssetUploadCompletion
      description: >
        After an [`AssetUpload`](#operation/postAssetUpload) has been created
        and each part of the file data has been `PUT` to the relavant URL the
        eTag from each `PUT` must be sent to indicate the upload is complete.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetUploadCompletionRequest'
            examples:
              Complete 3 parts:
                value:
                  uploadId: 5a2481e0-819f-4b46-a7e6-143f943345f2
                  assetId: 7af90a8b-7ccd-430f-a85d-e8614015bc47
                  parts:
                    - partNumber: 1
                      eTag: 569726cc-2149-4167-abee-26a068fbda22
                    - partNumber: 2
                      eTag: a9398831-2221-4c1f-90e7-b467b926aa16
                    - partNumber: 3
                      eTag: 820f3b61-3ac7-481c-a6e4-d6c5041683af
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetUploadCompletionWithPermittedActions'
              examples:
                Success:
                  value:
                    result:
                      type: SUCCESS
                    permittedActions: []
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /assets/{id}/files:
    get:
      tags:
        - Assets
      summary: Get an asset's files
      operationId: getAssetFiles
      description: >
        Get all of the [`AssetFile`](#operation/getAssetFiles) resources for the
        specified [`Asset`](#tag/Assets).
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`AssetFile`](#operation/getAssetFiles)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AssetFileWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-files/{id}:
    delete:
      tags:
        - Assets
      summary: Delete an asset file
      operationId: deleteAssetFile
      description: >
        Delete an [`AssetFile`](#operation/getAssetFiles) resource.


        The Asset's current AssetFile cannot be deleted and will return an error
        if tried.

        (Only older version AssetFiles can be deleted.)
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`AssetFile`](#operation/getAssetFiles)
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-download-batch-jobs:
    post:
      tags:
        - Assets
      summary: Download assets
      operationId: postAssetDownloadBatchJob
      description: >
        An [`AssetDownloadBatchJob`](#operation/postAssetDownloadBatchJob)
        should be created when you want to download and optionally transform
        multiple [`AssetFile`](#operation/getAssetFiles) resources.


        You can optionally request that a zip is created of all the transformed
        files.


        The `transformationDescription` in the request can be one of two types,
        `CUSTOM` or `PRESET`.


        A `CUSTOM` `transformationDescription` is a list of
        `candidateTransformations` which are evaluated in turn against each
        [`AssetFile`](#operation/getAssetFiles) specified in the request.

        If the [`AssetFile`](#operation/getAssetFiles)  meets the
        `candidateTransformation.criteria` then the
        `candidateTransformation.transformation` is applied. Otherwise, the next
        candiate is considered.

        The `candidateTransformation.transformation` is a series of operations
        to apply to the  [`AssetFile`](#operation/getAssetFiles) in order (e.g.
        resize to 200 by 100  and then covert to JPG). An empty list of
        operations indicates the file should be left untransformed.


        Putting this all together this allows you to describe a transformations
        such as:


        * Resized any image file, otherwise leave the file untransformed

        * Convert any image that supports transparency to PNG otherwise convert
        to JPG


        A `PRESET` `transformationDescription` is similar to a `CUSTOM`
        transformation except the `transformationDescription` has been
        predefined.

        These presets are currently only configurable via the Dash frontend, but
        can be found via a
        [`PresetTransformationSearch`](#operation/postPresetTransformationSearch).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetDownloadBatchRequest'
            examples:
              Resize and convert all:
                value:
                  items:
                    - batchItemId: download-1
                      assetId: 2b746f61-d36d-4627-a547-936f6f20594b
                    - batchItemId: download-2
                      assetId: 23cfaab7-c9f3-4b28-ac21-7b5b18f2519a
                    - batchItemId: download-3
                      assetId: 1ef8108f-6c94-4112-9736-abd147a7a940
                  transformationDescription:
                    type: CUSTOM
                    candidateTransformations:
                      - criteria:
                          - type: MATCHES_MEDIA_TYPES
                            mediaTypes:
                              - type: '*'
                                subType: '*'
                        transformation:
                          - type: RESIZE
                            width: 100
                            height: 200
                          - type: CONVERT
                            mediaType:
                              type: image
                              subType: jpeg
                  zip: true
              All untransformed:
                value:
                  items:
                    - batchItemId: download-1
                      assetId: 2b746f61-d36d-4627-a547-936f6f20594b
                    - batchItemId: download-2
                      assetId: 23cfaab7-c9f3-4b28-ac21-7b5b18f2519a
                    - batchItemId: download-3
                      assetId: 1ef8108f-6c94-4112-9736-abd147a7a940
                  transformationDescription:
                    type: CUSTOM
                    candidateTransformations:
                      - criteria:
                          - type: MATCHES_MEDIA_TYPES
                            mediaTypes:
                              - type: '*'
                                subType: '*'
                        transformation: []
                  zip: true
              Images as JPGs otherwise untransformed:
                value:
                  items:
                    - batchItemId: download-1
                      assetId: 2b746f61-d36d-4627-a547-936f6f20594b
                    - batchItemId: download-2
                      assetId: 23cfaab7-c9f3-4b28-ac21-7b5b18f2519a
                    - batchItemId: download-3
                      assetId: 1ef8108f-6c94-4112-9736-abd147a7a940
                  transformationDescription:
                    type: CUSTOM
                    candidateTransformations:
                      - criteria:
                          type: MATCHES_MEDIA_TYPES
                          mediaTypes:
                            - type: image
                              subType: '*'
                        transformation:
                          - type: CONVERT
                            mediaType:
                              type: image
                              subType: jpeg
                      - criteria:
                          - type: MATCHES_MEDIA_TYPES
                            mediaTypes:
                              - type: '*'
                                subType: '*'
                        transformation: []
                  zip: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetDownloadBatchJob'
              examples:
                In progress:
                  value:
                    id: be161977-d44e-4888-af3c-66522e223963
                    accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                    creatorId: google-oauth2|110955770826801837334
                    type: IN_PROGRESS
                    status: PENDING
                    progress:
                      steps:
                        - id: assetDownloadGetJobItemsStep
                          status: STARTED
                          completedItems: 0
                          totalItems: 0
                        - id: assetDownloadProcessJobItemsStep
                          status: PENDING
                          completedItems: 0
                          totalItems: 0
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-download-batch-jobs/{id}:
    get:
      tags:
        - Assets
      summary: Get the status of downloading assets
      operationId: getAssetDownloadBatchJob
      description: >
        Get the status and eventual result of an
        [`AssetDownloadBatchJob`](#operation/postAssetDownloadBatchJob)
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetDownloadBatchJob'
              examples:
                Completed:
                  value:
                    id: be161977-d44e-4888-af3c-66522e223963
                    accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                    creatorId: google-oauth2|110955770826801837334
                    type: COMPLETED
                    progress:
                      steps:
                        - id: assetDownloadGetJobItemsStep
                          status: COMPLETED
                          completedItems: 3
                          totalItems: 3
                        - id: assetDownloadProcessJobItemsStep
                          status: COMPLETED
                          completedItems: 3
                          totalItems: 3
                    dateCompleted: '2021-02-15T09:24:01.417Z'
                    result:
                      successes:
                        download-1:
                          result:
                            url: >-
                              https://platform-asset-storage.s3.eu-west-1.amazonaws.com/cfb665ca-ce35-4418-b9d5/?signature=dsf78bsdf78
                          permittedActions: []
                        download-2:
                          result:
                            url: >-
                              https://platform-asset-storage.s3.eu-west-1.amazonaws.com/dsasasds-ce35-4418-b9d5/?signature=dsf78bsdf78
                          permittedActions: []
                        download-3:
                          result:
                            url: >-
                              https://platform-asset-storage.s3.eu-west-1.amazonaws.com/dsasasds-ce35-4418dasdasdasd/?signature=dsf78bsdf78
                          permittedActions: []
                      zipUrl: >-
                        https://platform-asset-storage.s3.eu-west-1.amazonaws.com/dsasawadsad418dasdasdasd/?signature=dsf78bsdf78
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-searches:
    post:
      tags:
        - Assets
      summary: Search for assets
      description: >
        A standard [`AssetSearch`](#operation/postAssetSearch) will only allow
        you to page to **10,000** results regardless of the value returned in
        the `totalResults` property.


        If you need to be able to process more than **10,000** results consider
        an [AssetScrollSearch](#operation/postAssetScrollSearch) instead.
      operationId: postAssetSearch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetPaginatedSearchRequest'
            examples:
              Search by field option id:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: FIELD_EQUALS
                    value: a32fe863-0a1d-4b54-990a-b094139cf81c
                    field:
                      type: FIELD
                      fieldId: a52b5315-15b8-417f-b742-d6902108bac1
                  sorts: []
              Search by field value:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: FIELD_EQUALS
                    value: Folder 1
                    field:
                      type: FIELD
                      fieldId: a52b5315-15b8-417f-b742-d6902108bac1
                  sorts: []
              Search by any field value:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: OR
                    criteria:
                      - type: FIELD_EQUALS
                        value: Value 1
                        field:
                          type: FIELD
                          fieldId: a52b5315-15b8-417f-b742-d6902108bac1
                      - type: FIELD_EQUALS
                        value: Value 2
                        field:
                          type: FIELD
                          fieldId: a52b5315-15b8-417f-b742-d6902108bac1
                      - type: FIELD_EQUALS
                        value: Value 3
                        field:
                          type: FIELD
                          fieldId: a52b5315-15b8-417f-b742-d6902108bac1
                  sorts: []
              Search for field is empty:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: FIELD_IS_EMPTY
                    field:
                      type: FIELD
                      fieldId: a52b5315-15b8-417f-b742-d6902108bac1
                  sorts: []
              Search by date added range:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: FIELD_MATCHES
                    value: '[2021-01-01 TO 2021-02-01]'
                    field:
                      type: FIXED
                      fieldName: DATE_LIVE
                  sorts: []
              Search by keywords:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: FIELD_MATCHES
                    value: interesting things
                    field:
                      type: FIXED
                      fieldName: KEYWORDS
                  sorts: []
              Search by file extension:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: FIELD_MATCHES
                    value: '*.png'
                    field:
                      type: FIXED
                      fieldName: FILENAME
                  sorts: []
              Search by not file extension:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: NOT
                    criterion:
                      - type: FIELD_MATCHES
                        value: '*.png'
                        field:
                          type: FIXED
                          fieldName: FILENAME
                  sorts: []
              Search by multiple file extensions:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: OR
                    criteria:
                      - type: FIELD_MATCHES
                        value: '*.png'
                        field:
                          type: FIXED
                          fieldName: FILENAME
                      - type: FIELD_MATCHES
                        value: '*.jpg'
                        field:
                          type: FIXED
                          fieldName: FILENAME
                      - type: FIELD_MATCHES
                        value: '*.tif'
                        field:
                          type: FIXED
                          fieldName: FILENAME
                  sorts: []
              Search by filename:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: FIELD_EQUALS
                    value: my-image.png
                    field:
                      type: FIXED
                      fieldName: FILENAME
                  sorts: []
              Search for staged assets staged by user:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: AND
                    criteria:
                      - type: FIELD_EQUALS
                        value: STAGED
                        field:
                          type: FIXED
                          fieldName: LIFECYCLE_STATE
                      - type: FIELD_EQUALS
                        value: google-oauth2|110457667287511486432
                        field:
                          type: FIXED
                          fieldName: STAGED_BY
                  sorts: []
              All assets ordered by date added:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: MATCH_ALL
                  sorts:
                    - field:
                        type: FIXED
                        fieldName: DATE_LIVE
                      order: DESC
              All assets in a collection:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: FIELD_EQUALS
                    value: a32fe863-0a1d-4b54-990a-b094139cf81c
                    field:
                      type: FIXED
                      fieldName: COLLECTIONS
                  sorts:
                    - field:
                        type: FIXED
                        fieldName: DATE_LIVE
                      order: DESC
              Search within assets in a collection:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: AND
                    criteria:
                      - type: FIELD_EQUALS
                        value: a32fe863-0a1d-4b54-990a-b094139cf81c
                        field:
                          type: FIXED
                          fieldName: COLLECTIONS
                      - type: FIELD_MATCHES
                        value: interesting things
                        field:
                          type: FIXED
                          fieldName: KEYWORDS
                  sorts: []
              Match all and aggregate on filetype:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: MATCH_ALL
                  sorts: []
                  aggregations:
                    by_filetype:
                      type: TERMS
                      field:
                        type: FIXED
                        fieldName: FILE_TYPE
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetSearch'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-scroll-searches:
    post:
      tags:
        - Assets
      summary: Scroll search for assets
      operationId: postAssetScrollSearch
      description: >
        Asset scroll searches provide a means of scrolling one way through
        search results of any number of [`Asset`](#tag/Assets) resources.


        Page size can stil be specified, but a scroll search will always proceed
        sequentially once through each page.


        The [`AssetScrollSearch.scrollId`](#operation/postAssetScrollSearch) in
        the search the response is used to [continue the scroll
        search](#operation/postAssetScrollSearchScroll).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetScrollSearchRequest'
            examples:
              All assets ordered by date added:
                value:
                  pageSize: 100
                  criterion:
                    type: MATCH_ALL
                  sorts:
                    - field:
                        type: FIXED
                        fieldName: DATE_LIVE
                      order: DESC
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetScrollSearch'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-scroll-search-scrolls:
    post:
      tags:
        - Assets
      summary: Continue an asset scroll search
      operationId: postAssetScrollSearchScroll
      description: >
        Continue a previoulsy started
        [`AssetScrollSearch`](#operation/postAssetScrollSearch).


        > **You must use the scrollId resturned in each new response as a
        scrollId is not guarenteed to remain fixed over the course of a scroll**
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetScrollSearchScrollRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetScrollSearch'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-metadata-edit-batch-jobs:
    post:
      tags:
        - Assets
      summary: Update assets' metadata
      operationId: postAssetMetadataEditBatchJob
      description: >
        Edit the metadata of a set of [`Asset`](#tag/Assets)s by the specified
        assets selector.  


        Use the `BY_IDS` selector to edit a specific list of
        [`Asset.ids`](#tag/Assets), or the `BY_CRITERION` selector to edit a
        search criterion, e.g. all [`Asset`](#tag/Assets)s in a specific
        folder.  See [`AssetSearch`](#operation/postAssetSearch) for more detail
        on the available criterion.


        `metadataFieldValueUpdates` also has two types of objects that can be
        used.  For example, a [`FieldOption`](#tag/Field-Options) with a `value`
        of "My Option" and an `id` of "3ba2cb5b-dbe9-48ed-8e07-71f26929e617" can
        be set either `BY_VALUES` by using the `value` "My Option", or `BY_IDS`
        by using the `id` "3ba2cb5b-dbe9-48ed-8e07-71f26929e617".  For
        [`Fields`](#tag/Fields) that do not have
        [`FieldOptions`](#tag/Field-Options) (e.g. text fields), either type can
        be used.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetadataEditBatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoResultJob'
              examples:
                In progress:
                  value:
                    id: be161977-d44e-4888-af3c-66522e223963
                    accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                    creatorId: google-oauth2|110955770826801837334
                    type: IN_PROGRESS
                    status: PENDING
                    progress:
                      steps:
                        - id: GET_ITEMS
                          status: STARTED
                          completedItems: 0
                          totalItems: 0
                        - id: PROCESS_ITEMS
                          status: PENDING
                          completedItems: 0
                          totalItems: 0
                Complete:
                  value:
                    id: be161977-d44e-4888-af3c-66522e223963
                    accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                    creatorId: google-oauth2|110955770826801837334
                    type: COMPLETED
                    progress:
                      steps:
                        - id: GET_ITEMS
                          status: COMPLETED
                          completedItems: 3
                          totalItems: 3
                        - id: PROCESS_ITEMS
                          status: COMPLETED
                          completedItems: 3
                          totalItems: 3
                    dateCompleted: '2021-02-15T09:24:01.417Z'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-metadata-edit-batch-jobs/{id}:
    get:
      tags:
        - Assets
      summary: Get the status of updating assets' metadata
      operationId: getAssetMetadataEditBatchJob
      description: >
        Get the status of a [`Asset Metadata Edit Batch
        Job`](#operation/postAssetMetadataEditBatchJob)
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoResultJob'
              examples:
                In progress:
                  value:
                    id: be161977-d44e-4888-af3c-66522e223963
                    accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                    creatorId: google-oauth2|110955770826801837334
                    type: IN_PROGRESS
                    status: PENDING
                    progress:
                      steps:
                        - id: GET_ITEMS
                          status: STARTED
                          completedItems: 0
                          totalItems: 0
                        - id: PROCESS_ITEMS
                          status: PENDING
                          completedItems: 0
                          totalItems: 0
                Complete:
                  value:
                    id: be161977-d44e-4888-af3c-66522e223963
                    accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                    creatorId: google-oauth2|110955770826801837334
                    type: COMPLETED
                    progress:
                      steps:
                        - id: GET_ITEMS
                          status: COMPLETED
                          completedItems: 3
                          totalItems: 3
                        - id: PROCESS_ITEMS
                          status: COMPLETED
                          completedItems: 3
                          totalItems: 3
                    dateCompleted: '2021-02-15T09:24:01.417Z'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-metadata-suggestion-batch-jobs:
    post:
      tags:
        - Assets
      summary: Get metadata suggestions for assets
      operationId: postAssetMetadataSuggestionBatchJob
      description: >
        Get metadata suggestions for a set of [`Asset`](#tag/Assets)s by the
        specified assets selector.  


        Use the `BY_IDS` selector to get suggestions for a specific list of
        [`Asset.ids`](#tag/Assets), or the `BY_CRITERION` selector to get
        suggestions for a search criterion, e.g. all [`Asset`](#tag/Assets)s in
        a specific folder.  See [`AssetSearch`](#operation/postAssetSearch) for
        more detail on the available criterion.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MetadataSuggestionBatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetadataSuggestionBatchJob'
              examples:
                In progress:
                  value:
                    id: be161977-d44e-4888-af3c-66522e223963
                    accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                    creatorId: google-oauth2|110955770826801837334
                    type: IN_PROGRESS
                    status: PENDING
                    progress:
                      steps:
                        - id: GET_ITEMS
                          status: STARTED
                          completedItems: 0
                          totalItems: 0
                        - id: PROCESS_ITEMS
                          status: PENDING
                          completedItems: 0
                          totalItems: 0
                Complete:
                  value:
                    id: be161977-d44e-4888-af3c-66522e223963
                    accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                    creatorId: google-oauth2|110955770826801837334
                    type: COMPLETED
                    progress:
                      steps:
                        - id: GET_ITEMS
                          status: COMPLETED
                          completedItems: 3
                          totalItems: 3
                        - id: PROCESS_ITEMS
                          status: COMPLETED
                          completedItems: 3
                          totalItems: 3
                    dateCompleted: '2021-02-15T09:24:01.417Z'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /rejected-asset-metadata-suggestion-batches:
    post:
      tags:
        - Assets
      summary: Create rejected asset metadata suggestions
      description: >
        Record the fact that some asset metadata suggestions have been rejected,
        and should therefore not be suggested again for the given asset.
      operationId: postRejectedAssetMetadataSuggestionBatches
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RejectedMetadataSuggestionBatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RejectedMetadataSuggestionBatch'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-metadata-suggestion-batch-jobs/{id}:
    get:
      tags:
        - Assets
      summary: Get the status of metadata suggestions for assets
      operationId: getAssetMetadataSuggestionBatchJob
      description: >
        Get the status of a [`Asset Suggestion Edit Batch
        Job`](#operation/postAssetSuggestionEditBatchJob)
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetadataSuggestionBatchJob'
              examples:
                In progress:
                  value:
                    id: be161977-d44e-4888-af3c-66522e223963
                    accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                    creatorId: google-oauth2|110955770826801837334
                    type: IN_PROGRESS
                    status: PENDING
                    progress:
                      steps:
                        - id: GET_ITEMS
                          status: STARTED
                          completedItems: 0
                          totalItems: 0
                        - id: PROCESS_ITEMS
                          status: PENDING
                          completedItems: 0
                          totalItems: 0
                Complete:
                  value:
                    id: be161977-d44e-4888-af3c-66522e223963
                    accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                    creatorId: google-oauth2|110955770826801837334
                    type: COMPLETED
                    progress:
                      steps:
                        - id: GET_ITEMS
                          status: COMPLETED
                          completedItems: 3
                          totalItems: 3
                        - id: PROCESS_ITEMS
                          status: COMPLETED
                          completedItems: 3
                          totalItems: 3
                    dateCompleted: '2021-02-15T09:24:01.417Z'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-lifecycle-transition-batch-jobs:
    post:
      tags:
        - Assets
      summary: Update assets' lifecycle stage
      operationId: postAssetLifecycleTransitionBatchJob
      description: >
        Move a set of [`Asset`](#tag/Assets) resources from one
        [`Asset.lifecycleStatus.state`](#tag/Assets) to another.


        The [`Asset`](#tag/Assets) resources to be added to the batch job are
        specified using the [`AssetSearch`](#operation/postAssetSearch) criteria
        language or by a simple set of ids


        > **If you are selecting by search criteria you must explicitly include
        criteria describing the state you are moving from in order to account
        for the fact that the Dash API will only return Assets in the 'LIVE'
        state by default. See the request examples for more.**
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LifecycleTransitionBatchRequest'
            examples:
              Move all staged by user to pending approval:
                value:
                  transition: STAGED_TO_PENDING_APPROVAL
                  selector:
                    type: BY_CRITERION
                    criterion:
                      type: AND
                      criteria:
                        - type: FIELD_EQUALS
                          value: STAGED
                          field:
                            type: FIXED
                            fieldName: LIFECYCLE_STATE
                        - type: FIELD_EQUALS
                          value: google-oauth2|110457667287511486432
                          field:
                            type: FIXED
                            fieldName: STAGED_BY
              Move all in pending approval to live:
                value:
                  transition: PENDING_APPROVAL_TO_LIVE
                  selector:
                    type: BY_CRITERION
                    criterion:
                      type: FIELD_EQUALS
                      value: PENDING_APPROVAL
                      field:
                        type: FIXED
                        fieldName: LIFECYCLE_STATE
              Move specific asset to pending approval:
                value:
                  transition: STAGED_TO_PENDING_APPROVAL
                  selector:
                    type: BY_CRITERION
                    criterion:
                      type: AND
                      criteria:
                        - type: FIELD_EQUALS
                          value: STAGED
                          field:
                            type: FIXED
                            fieldName: LIFECYCLE_STATE
                        - type: FIELD_EQUALS
                          value: 4920d633-d42e-4f01-b9d2-2f65dd6363e8
                          field:
                            type: FIXED
                            fieldName: ID
              Move specific assets to pending approval:
                value:
                  transition: STAGED_TO_PENDING_APPROVAL
                  selector:
                    type: BY_CRITERION
                    criterion:
                      type: AND
                      criteria:
                        - type: FIELD_EQUALS
                          value: STAGED
                          field:
                            type: FIXED
                            fieldName: LIFECYCLE_STATE
                        - type: OR
                          criteria:
                            - type: FIELD_EQUALS
                              value: 4920d633-d42e-4f01-b9d2-2f65dd6363e8
                              field:
                                type: FIXED
                                fieldName: ID
                            - type: FIELD_EQUALS
                              value: 0454170b-b80e-42bf-b7a9-99c5f6a78fbb
                              field:
                                type: FIXED
                                fieldName: ID
                            - type: FIELD_EQUALS
                              value: 8d1f8bf8-d712-46ee-9642-5a725bc486f2
                              field:
                                type: FIXED
                                fieldName: ID
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoResultJob'
              examples:
                In progress:
                  value:
                    id: be161977-d44e-4888-af3c-66522e223963
                    accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                    creatorId: google-oauth2|110955770826801837334
                    type: IN_PROGRESS
                    status: PENDING
                    progress:
                      steps:
                        - id: lifecycleTransitionGetJobItemsStep
                          status: STARTED
                          completedItems: 0
                          totalItems: 0
                        - id: lifecycleTransitionProcessJobItemsStep
                          status: PENDING
                          completedItems: 0
                          totalItems: 0
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-lifecycle-transition-batch-jobs/{id}:
    get:
      tags:
        - Assets
      summary: Get the status of updating assets' lifecycle stage
      operationId: getAssetLifecycleTransitionBatchJob
      description: >
        Get the status of an
        [`AssetLifecycleTransitionBatchJob`](#operation/postAssetLifecycleTransitionBatchJob)
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoResultJob'
              examples:
                Complete:
                  value:
                    id: be161977-d44e-4888-af3c-66522e223963
                    accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                    creatorId: google-oauth2|110955770826801837334
                    type: COMPLETED
                    progress:
                      steps:
                        - id: lifecycleTransitionGetJobItemsStep
                          status: COMPLETED
                          completedItems: 3
                          totalItems: 3
                        - id: lifecycleTransitionProcessJobItemsStep
                          status: COMPLETED
                          completedItems: 3
                          totalItems: 3
                    dateCompleted: '2021-02-15T09:24:01.417Z'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-deletion-batch-jobs:
    post:
      x-dash-internal: true
      tags:
        - Assets
      summary: Delete assets
      operationId: postAssetDeletionBatchJob
      description: |
        Delete a set of [`Asset`](#tag/Assets) by the specified assets selector
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetDeletionBatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoResultJob'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /assets/{id}/saved-crop-areas:
    post:
      tags:
        - Asset Saved Crop Areas
      summary: Create a saved crop area for an asset
      operationId: postSavedCropArea
      description: >
        Create a [`SavedCropArea`](#tag/Asset-Saved-Crop-Areas) for the
        specified [`Asset`](#tag/Assets).
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`Asset`](#tag/Asset)
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SavedCropAreaRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SavedCropAreaWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /assets/{id}/saved-crop-area-summaries:
    get:
      tags:
        - Asset Saved Crop Area Summaries
      summary: Get an asset's saved crop area summaries
      operationId: getSavedCropAreaSummaries
      description: >
        Get all of the [`SavedCropAreaSummaries`](#tag/Asset-Saved-Crop-Areas)
        resources for the specified [`Asset`](#tag/Assets).
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`Asset`](#tag/Asset)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/SavedCropAreaSummaryWithPermittedActions
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /assets/{id}/comments:
    get:
      x-dash-internal: true
      tags:
        - Asset Comments
      summary: Get an asset's comments
      operationId: getAssetComments
      description: >
        Get all of the [`Comment`](#tag/Asset-Comments) resources for the
        specified [`Asset`](#tag/Assets).
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`Asset`](#tag/Assets)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CommentWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      x-dash-internal: true
      tags:
        - Asset Comments
      summary: Create a comment on an asset
      operationId: postAssetComments
      description: >
        Create a new [`Comment`](#tag/Asset-Comments) for the specified
        [`Asset`](#tag/Assets).
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`Asset`](#tag/Assets)
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommentRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommentWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-deduplication-batch-jobs:
    post:
      x-dash-internal: true
      tags:
        - Asset Deduplication
      summary: Deduplicate all assets
      operationId: postAssetDeduplicationBatchJob
      description: >
        Deduplicate duplicate [`Assets`](#tag/Assets), where a duplicate is an
        asset with the same file checksum as

        another asset. Duplicates are deleted. Metadata values from duplicates
        are merged into the original asset's 

        metadata. For metadata multivalues, e.g. folders, the total set of
        values is merged. For metadata text values, the

        longest length text value is merged. For metadata date and date-time
        values, the oldest value is merged.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoResultJob'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-metadata-export-batch-jobs:
    post:
      x-dash-internal: true
      tags:
        - Asset Metadata Export
      summary: Export assets' metadata
      operationId: postMetadataExportBatchJob
      description: |
        Export the metadata of all [`Asset`](#tag/Assets)s to a CSV file
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetadataExportBatchJob'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-metadata-export-batch-jobs/{id}:
    get:
      x-dash-internal: true
      tags:
        - Asset Metadata Export
      summary: Get the status of exporting assets' metadata
      operationId: getMetadataExportBatchJob
      description: >
        Get the status and eventual result of a
        [`MetadataExportJob`](#operation/postMetadataExportJob)
      parameters:
        - name: id
          in: path
          description: >-
            The unique ID of the
            [`MetadataExportJob`](#operation/postMetadataExportJob)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetadataExportBatchJob'
              examples:
                Completed:
                  value:
                    $ref: >-
                      ../components/schemas/asset/metadata-export/MetadataExportCompletedJob.yaml
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      x-dash-internal: true
      tags:
        - Asset Metadata Export
      summary: Update the status of exporting assets' metadata
      operationId: patchMetadataExportBatchJob
      description: |
        Update a [`MetadataExportJob`](#operation/postMetadataExportJob)
      parameters:
        - name: id
          in: path
          description: >-
            The unique ID of the
            [`MetadataExportJob`](#operation/postMetadataExportJob)
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobPatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetadataExportBatchJob'
              examples:
                Completed:
                  value:
                    $ref: >-
                      ../components/schemas/asset/metadata-export/MetadataExportCompletedJob.yaml
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      x-dash-internal: true
      tags:
        - Asset Metadata Export
      summary: Discard exporting assets' metadata
      operationId: deleteMetadataExportBatchJob
      description: >
        Stops a [`MetadataExportJob`](#operation/postMetadataExportJob) and
        deletes it
      parameters:
        - name: id
          in: path
          description: >-
            The unique ID of the
            [`MetadataExportJob`](#operation/postMetadataExportJob)
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-saved-crop-areas/{id}:
    get:
      tags:
        - Asset Saved Crop Areas
      summary: Get a saved crop area
      operationId: getSavedCropArea
      description: |
        Get a [`SavedCropArea`](#tag/Asset-Saved-Crop-Areas) resource.
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`SavedCropArea`](#tag/Asset-Saved-Crop-Areas)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SavedCropAreaWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      tags:
        - Asset Saved Crop Areas
      summary: Update a saved crop area
      operationId: patchSavedCropArea
      description: >
        Update a [`SavedCropArea`](#tag/Asset-Saved-Crop-Areas) resource. Only
        the provided fields will be updated
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`SavedCropArea`](#tag/Asset-Saved-Crop-Areas)
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SavedCropAreaPatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SavedCropAreaWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - Asset Saved Crop Areas
      summary: Delete a Saved Crop Area
      operationId: deleteSavedCropArea
      description: |
        Delete a [`SavedCropArea`](#tag/Asset-Saved-Crop-Areas) resource.
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`SavedCropArea`](#tag/Asset-Saved-Crop-Areas)
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-saved-crop-area-summary-searches:
    post:
      x-dash-internal: true
      tags:
        - Asset Saved Crop Area Summaries
      summary: Search for asset saved crop area summaries
      operationId: postAssetSavedCropAreaSummarySearch
      description: >
        Create a new [`Asset Saved Crop Area Summary
        Search`](#operation/postAssetSavedCropAreaSummarySearch)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SavedCropAreaSummarySearchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SavedCropAreaSummarySearch'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-shares:
    post:
      tags:
        - Asset Shares
      summary: Create an asset share
      operationId: createAssetShare
      description: |
        Create an [`AssetShare`](#tag/Asset-Shares).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetShareRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetShareWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-shares/{id}:
    get:
      security: []
      tags:
        - Asset Shares
      summary: Get an asset share
      operationId: getAssetShare
      description: >
        Get an [`AssetShare`](#tag/Asset-Shares)


        **This endpoint is unauthenticated. Do not send a Bearer Token in the
        Authorization Header**
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`AssetShare`](#tag/Asset-Shares)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetShareWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      tags:
        - Asset Shares
      summary: Update an asset share
      operationId: patchAssetShare
      description: |
        Patch an [`AssetShare`](#tag/Asset-Shares)
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`AssetShare`](#tag/Asset-Shares)
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetSharePatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetShareWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - Asset Shares
      summary: Delete an asset share
      operationId: deleteAssetShare
      description: |
        Delete an [`AssetShare`](#tag/Asset-Shares) resource.
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`AssetShare`](#tag/Asset-Shares)
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-shares/{id}/access-token:
    get:
      security: []
      tags:
        - Asset Share Access Tokens
      summary: Get an asset share access token
      operationId: getAssetShareAccessToken
      description: >
        Get an access token for viewing data which has been shared as part of
        the [`AssetShare`](#tag/Asset-Shares).  Use this access token in the
        same way as the normal signed-in user token to make requests with the
        permissions of the share applied.


        **This endpoint is unauthenticated. Do not send a Bearer Token in the
        Authorization Header**
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`AssetShare`](#tag/Asset-Shares)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessTokenWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-share-emails:
    post:
      tags:
        - Asset Share Emails
      summary: Email a link to an asset share
      operationId: createAssetShareEmail
      description: >
        Send an [`AssetShare`](#tag/Asset-Shares) via email to a specified email
        address
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetShareEmailRequest'
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-share-searches:
    post:
      x-dash-internal: true
      tags:
        - Asset Shares
      summary: Search for asset shares
      operationId: postAssetShareSearch
      description: |
        Create a new [`AssetShareSearch`](#operation/postAssetShareSearch)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetShareSearchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetShareSearch'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /comments/{id}:
    patch:
      x-dash-internal: true
      tags:
        - Asset Comments
      summary: Update an asset comment
      operationId: patchComment
      description: |
        Patch a [`Comment`](#tag/Asset-Comments)
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`Comment`](#tag/Asset-Comments)
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommentPatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommentWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      x-dash-internal: true
      tags:
        - Asset Comments
      summary: Delete an asset comment
      operationId: deleteComment
      description: |
        Delete a [`Comment`](#tag/Asset-Comments) resource.
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`Comment`](#tag/Asset-Comments)
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /accounts:
    post:
      x-dash-internal: true
      tags:
        - Accounts
      summary: Create an account
      operationId: postAccounts
      description: >
        Create an [`Account`]

        > **This endpoint is unauthenticated. Do not send a Bearer Token in the
        Authorization Header**
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /account-invite-requests:
    post:
      x-dash-internal: true
      tags:
        - Accounts
      summary: Request an invite to an account
      operationId: postAccountInviteRequest
      description: >
        Create a new [`AccountInviteRequest`]


        **This endpoint is unauthenticated. Do not send a Bearer Token in the
        Authorization Header**
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountInviteRequest'
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /publicly-available-account-data-searches:
    post:
      security: []
      tags:
        - Accounts
      summary: Search for publicly available account data
      operationId: postPubliclyAvailableAccountDataSearches
      description: >
        Create a new
        [`PubliclyAvailableAccountData`](#operation/postPubliclyAvailableAccountDataSearches).


        **This endpoint is unauthenticated. Do not send a Bearer Token in the
        Authorization Header**
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PubliclyAvailableAccountDataSearchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PubliclyAvailableAccountDataSearch'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /account-security:
    get:
      x-dash-internal: true
      tags:
        - Account Security
      summary: Get the account security
      operationId: getAccountSecurity
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountSecurityWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    put:
      x-dash-internal: true
      tags:
        - Account Security
      summary: Update the account security
      operationId: putAccountSecurity
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountSecurityPutRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountSecurityWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /ai-image-generations:
    post:
      x-dash-internal: true
      tags:
        - AI Image Generations
      summary: Generate an AI Image
      operationId: postAiImageGenerations
      description: |
        Generate an AI Image through an API for downloading or adding to Dash.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AiImageGenerationsRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AiImageGenerationsResponse'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /reference-image-uploads:
    post:
      x-dash-internal: true
      tags:
        - Reference Image Uploads
      summary: Upload a reference image
      operationId: postReferenceImageUploads
      description: >
        Generate an S3 bucket key and url for uploading a reference image to for
        generating an AI Image.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReferenceImageUploadsResponse'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /auto-tagging-image-settings:
    get:
      x-dash-internal: true
      tags:
        - Auto-Tagging Image Settings
      summary: Get the account auto-tagging image settings
      operationId: getAutoTaggingImageSettings
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/AutoTaggingImageSettingsWithPermittedActions
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      x-dash-internal: true
      tags:
        - Auto-Tagging Image Settings
      summary: Update the account auto-tagging image settings
      operationId: patchAutoTaggingImageSettings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AutoTaggingImageSettingsPatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/AutoTaggingImageSettingsWithPermittedActions
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /text-in-image-settings:
    get:
      x-dash-internal: true
      tags:
        - Text In Image Settings
      summary: Get the account text in image settings
      operationId: getTextInImageSettings
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TextInImageSettingsWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      x-dash-internal: true
      tags:
        - Text In Image Settings
      summary: Update the account text in image settings
      operationId: patchTextInImageSettings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TextInImageSettingsPatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TextInImageSettingsWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /onboarding-checklist:
    get:
      x-dash-internal: true
      tags:
        - Onboarding Checklist
      summary: Get the account onboarding checklist
      operationId: getOnboardingChecklist
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnboardingChecklistWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      x-dash-internal: true
      tags:
        - Onboarding Checklist
      summary: Update the account onboarding checklist
      operationId: patchOnboardingChecklist
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OnboardingChecklistPatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnboardingChecklistWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /search-filters:
    get:
      x-dash-internal: true
      tags:
        - Search Filters
      summary: Get all search filters
      description: |
        Get the [`SearchFilter`](#tag/Search-Filters) resources
      operationId: getSearchFilters
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SearchFilterWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /search-filter-view:
    get:
      tags:
        - Search Filters
      summary: Get the account search filter view
      description: >
        Get the [`SearchFilter`](#tag/Search-Filters) resources that have been
        configured as in use
      operationId: getSearchFilterView
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchFilterViewWithPermittedActions'
              examples:
                View:
                  value:
                    accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                    searchFilters:
                      - type: FIELD
                        id: 502d1473-f047-4a2c-9885-16274e4407b9
                        accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                        fieldId: 88eb1aca-cf98-4e87-9165-33e7be8b1ea1
                        allowEmpty: true
                      - type: HARD_CODED_FIXED_OPTION
                        id: cb8ad3d9-0c26-4f0e-9884-585d24a86d59
                        accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                        searchField: FILE_TYPE
                        allowEmpty: false
                        name: File Type
                        options:
                          - Image
                          - Video
                          - Audio
                          - Document
                          - Other
                      - type: HARD_CODED_FREE_OPTION
                        id: 5c02e3a0-57f2-4576-b41c-a0a4e30688bd
                        accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                        searchField: DATE_LIVE
                        name: Date Added
                        dataType: DATE_TIME
                        allowEmpty: false
                      - type: HARD_CODED_USER
                        id: 246b1496-61d3-4b23-ad8e-d6dc990e9ef6
                        accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                        searchField: STAGED_BY
                        name: Added by
                        allowEmpty: false
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /search-filter-view/search-filters:
    post:
      tags:
        - Search Filters
      summary: Add a search filter to the account search filter view
      operationId: postSearchFilterViewSearchFilter
      description: |
        Configure a [`SearchFilter`](#tag/Search-Filters) resource as in-use
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchFilterViewSearchFilterRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchFilterViewWithPermittedActions'
              examples:
                View:
                  value:
                    accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                    searchFilters:
                      - type: FIELD
                        id: 502d1473-f047-4a2c-9885-16274e4407b9
                        accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                        fieldId: 88eb1aca-cf98-4e87-9165-33e7be8b1ea1
                        allowEmpty: true
                      - type: HARD_CODED_FIXED_OPTION
                        id: cb8ad3d9-0c26-4f0e-9884-585d24a86d59
                        accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                        searchField: FILE_TYPE
                        allowEmpty: false
                        name: File Type
                        options:
                          - Image
                          - Video
                          - Audio
                          - Document
                          - Other
                      - type: HARD_CODED_FREE_OPTION
                        id: 5c02e3a0-57f2-4576-b41c-a0a4e30688bd
                        accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                        searchField: DATE_LIVE
                        name: Date Added
                        dataType: DATE_TIME
                        allowEmpty: false
                      - type: HARD_CODED_USER
                        id: 246b1496-61d3-4b23-ad8e-d6dc990e9ef6
                        accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                        searchField: STAGED_BY
                        name: Added by
                        allowEmpty: false
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /search-filter-view/search-filters/{id}:
    patch:
      tags:
        - Search Filters
      summary: Patch a search filter in the account search filter view
      operationId: patchSearchFilterViewSearchFilter
      description: >
        Change the display position of a [`SearchFilter`](#tag/Search-Filters)
        resource in the search filter view
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`SearchFilter`](#tag/Search-Filters)
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchFilterViewSearchFilterPatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchFilterViewWithPermittedActions'
              examples:
                View:
                  value:
                    accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                    searchFilters:
                      - type: FIELD
                        id: 502d1473-f047-4a2c-9885-16274e4407b9
                        accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                        fieldId: 88eb1aca-cf98-4e87-9165-33e7be8b1ea1
                        allowEmpty: true
                      - type: HARD_CODED_FIXED_OPTION
                        id: cb8ad3d9-0c26-4f0e-9884-585d24a86d59
                        accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                        searchField: FILE_TYPE
                        allowEmpty: false
                        name: File Type
                        options:
                          - Image
                          - Video
                          - Audio
                          - Document
                          - Other
                      - type: HARD_CODED_FREE_OPTION
                        id: 5c02e3a0-57f2-4576-b41c-a0a4e30688bd
                        accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                        searchField: DATE_LIVE
                        name: Date Added
                        dataType: DATE_TIME
                        allowEmpty: false
                      - type: HARD_CODED_USER
                        id: 246b1496-61d3-4b23-ad8e-d6dc990e9ef6
                        accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                        searchField: STAGED_BY
                        name: Added by
                        allowEmpty: false
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - Search Filters
      summary: Delete a search filter from the account search filter view
      operationId: deleteSearchFilterViewSearchFilter
      description: |
        Configure a [`SearchFilter`](#tag/Search-Filters) resource as not in-use
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`SearchFilter`](#tag/Search-Filters)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchFilterViewWithPermittedActions'
              examples:
                View:
                  value:
                    accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                    searchFilters:
                      - type: FIELD
                        id: 502d1473-f047-4a2c-9885-16274e4407b9
                        accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                        fieldId: 88eb1aca-cf98-4e87-9165-33e7be8b1ea1
                        allowEmpty: true
                      - type: HARD_CODED_FIXED_OPTION
                        id: cb8ad3d9-0c26-4f0e-9884-585d24a86d59
                        accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                        searchField: FILE_TYPE
                        allowEmpty: false
                        name: File Type
                        options:
                          - Image
                          - Video
                          - Audio
                          - Document
                          - Other
                      - type: HARD_CODED_FREE_OPTION
                        id: 5c02e3a0-57f2-4576-b41c-a0a4e30688bd
                        accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                        searchField: DATE_LIVE
                        name: Date Added
                        dataType: DATE_TIME
                        allowEmpty: false
                      - type: HARD_CODED_USER
                        id: 246b1496-61d3-4b23-ad8e-d6dc990e9ef6
                        accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                        searchField: STAGED_BY
                        name: Added by
                        allowEmpty: false
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /folder-settings:
    get:
      tags:
        - Folder Settings
      summary: Get the account folder settings
      operationId: getFolderSettings
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FolderSettingsWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /shopify-sku-settings:
    get:
      x-dash-internal: true
      tags:
        - Shopify SKU Settings
      summary: Get the account Shopify SKU settings
      operationId: getShopifySkuSettings
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShopifySkuSettingsWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    put:
      x-dash-internal: true
      tags:
        - Shopify SKU Settings
      summary: Create or update the account Shopify SKU settings
      operationId: putShopifySkuSettings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShopifySkuSettingsRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShopifySkuSettingsWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      x-dash-internal: true
      tags:
        - Shopify SKU Settings
      summary: Delete the account Shopify SKU settings
      operationId: deleteShopifySkuSettings
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /context-types/{contextType}/contexts/{contextId}/theme:
    get:
      x-dash-internal: true
      tags:
        - Theme
      summary: Get the account theme
      operationId: getTheme
      description: |
        Get the account's [`Theme`](#tag/Theme)
      parameters:
        - name: contextType
          in: path
          required: true
          schema:
            type: string
        - name: contextId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThemeWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      x-dash-internal: true
      tags:
        - Theme
      summary: Update the account theme
      operationId: patchTheme
      description: |
        Update the [`Theme`](#tag/Theme) of the account.
      parameters:
        - name: contextType
          in: path
          required: true
          schema:
            type: string
        - name: contextId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ThemePatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThemeWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /context-types/{contextType}/contexts/{contextId}/theme-image-uploads:
    post:
      x-dash-internal: true
      tags:
        - Theme
      summary: Upload a theme image
      operationId: postThemeImageUpload
      description: >
        Post an upload object for one of the images in the account's
        [`Theme`](#tag/Theme)
      parameters:
        - name: contextType
          in: path
          required: true
          schema:
            type: string
        - name: contextId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ThemeImageUploadRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThemeImageUpload'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /theme-searches:
    post:
      security: []
      tags:
        - Theme
      summary: Search for account themes
      operationId: postThemeSearch
      description: >
        Create a new [`ThemeSearch`](#operation/postThemeSearch). This can be
        used to search for a theme by subdomain.


        **This endpoint is unauthenticated. Do not send a Bearer Token in the
        Authorization Header**
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ThemeSearchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThemeSearch'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /context-types/{contextType}/contexts/{contextId}/theme/favicon:
    delete:
      x-dash-internal: true
      tags:
        - Theme
      summary: Delete the account theme favicon
      operationId: deleteThemeFavicon
      description: |
        Delete the favicon from the [`Theme`](#tag/Theme)
      parameters:
        - name: contextType
          in: path
          required: true
          schema:
            type: string
        - name: contextId
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /context-types/{contextType}/contexts/{contextId}/theme/homepage-image:
    delete:
      x-dash-internal: true
      tags:
        - Theme
      summary: Delete the account theme homepage image
      operationId: deleteThemeHomepageImage
      description: |
        Delete the homepage image from the [`Theme`](#tag/Theme)
      parameters:
        - name: contextType
          in: path
          required: true
          schema:
            type: string
        - name: contextId
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /context-types/{contextType}/contexts/{contextId}/theme/login-image:
    delete:
      x-dash-internal: true
      tags:
        - Theme
      summary: Delete the account theme login image
      operationId: deleteThemeLoginImage
      description: |
        Delete the login image from the [`Theme`](#tag/Theme)
      parameters:
        - name: contextType
          in: path
          required: true
          schema:
            type: string
        - name: contextId
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /context-types/{contextType}/contexts/{contextId}/theme/logo:
    delete:
      x-dash-internal: true
      tags:
        - Theme
      summary: Delete the account theme logo
      operationId: deleteThemeLogo
      description: |
        Delete the logo from the [`Theme`](#tag/Theme)
      parameters:
        - name: contextType
          in: path
          required: true
          schema:
            type: string
        - name: contextId
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /theme:
    get:
      x-dash-internal: true
      tags:
        - Theme
      summary: Get the account theme
      operationId: getThemeDeprecated
      description: |
        Get the account's [`Theme`](#tag/Theme)
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThemeWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      x-dash-internal: true
      tags:
        - Theme
      summary: Update the account theme
      operationId: patchThemeDeprecated
      description: |
        Update the [`Theme`](#tag/Theme) of the account.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ThemePatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThemeWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /theme-image-uploads:
    post:
      x-dash-internal: true
      tags:
        - Theme
      summary: Upload a theme image
      operationId: postThemeImageUploadDeprecated
      description: >
        Post an upload object for one of the images in the account's
        [`Theme`](#tag/Theme)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ThemeImageUploadRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThemeImageUpload'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /theme/favicon:
    delete:
      x-dash-internal: true
      tags:
        - Theme
      summary: Delete the account theme favicon
      operationId: deleteThemeFaviconDeprecated
      description: |
        Delete the favicon from the [`Theme`](#tag/Theme)
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /theme/homepage-image:
    delete:
      x-dash-internal: true
      tags:
        - Theme
      summary: Delete the account theme homepage image
      operationId: deleteThemeHomepageImageDeprecated
      description: |
        Delete the homepage image from the [`Theme`](#tag/Theme)
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /theme/login-image:
    delete:
      x-dash-internal: true
      tags:
        - Theme
      summary: Delete the account theme login image
      operationId: deleteThemeLoginImageDeprecated
      description: |
        Delete the login image from the [`Theme`](#tag/Theme)
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /theme/logo:
    delete:
      x-dash-internal: true
      tags:
        - Theme
      summary: Delete the account theme logo
      operationId: deleteThemeLogoDeprecated
      description: |
        Delete the logo from the [`Theme`](#tag/Theme)
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /users:
    post:
      tags:
        - Users
      summary: Create a user
      operationId: postUser
      description: |
        Create a new [`User`](#tag/Users) in the current account
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountUserWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /users/{id}:
    get:
      tags:
        - Users
      summary: Get a user
      operationId: getUser
      description: |
        Get a [`User`](#tag/Users)
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`User`](#tag/Users) or the User's email
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserWithNoPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      tags:
        - Users
      summary: Update a user
      operationId: patchUser
      description: |
        Patch a [`User`](#tag/Users)
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`User`](#tag/Users) or the User's email
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserPatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountUserWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - Users
      summary: Delete a User
      operationId: deleteUser
      description: >
        Delete a [`User`](#tag/Users) and delete all
        [`AssetShares`](#tag/Asset-Shares) belonging to that user
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`User`](#tag/Users) or the User's email
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /user-batch-jobs:
    post:
      x-dash-internal: true
      tags:
        - Users
      summary: Create users
      operationId: postUserBatchJob
      description: |
        Create new [`User`](#tag/Users) resources in the current account
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserBatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserBatchJob'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /user-batch-jobs/{id}:
    get:
      x-dash-internal: true
      tags:
        - Users
      summary: Get the status of creating users
      operationId: getUserBatchJob
      description: >
        Get the status and eventual result of an
        [`UserBatchJob`](#operation/postUserBatchJob)
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`UserBatchJob`](#operation/postUserBatchJob)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserBatchJob'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /user-searches:
    post:
      tags:
        - Users
      summary: Search for users
      operationId: postUserSearch
      description: |
        Create a new `UserSearch`
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserSearchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserSearch'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /user-deletes:
    post:
      tags:
        - Users
      summary: Delete a user
      description: >
        Delete a [`User`](#tag/Users) with the option to delete all
        [`AssetShares`](#tag/Asset-Shares) belonging to that user
      operationId: postDeleteUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserDeleteRequest'
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /current-user:
    get:
      tags:
        - Users
      summary: Get the current user
      operationId: getCurrentUser
      description: |
        Get the currently authenticated [`User`](#tag/Users)
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /current-user-referrer:
    get:
      x-dash-internal: true
      tags:
        - User Referrer
      summary: Get the current user's referrer code
      operationId: getCurrentUserReferrer
      description: |
        Get the currently authenticated [`User`](#tag/Users)'s referrer code
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReferrerWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /current-user-preferences:
    get:
      x-dash-internal: true
      tags:
        - User Preferences
      summary: Get the current user's preferences
      operationId: getCurrentUserPreferences
      description: |
        Get the currently authenticated [`User`](#tag/Users)'s preferences
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserPreferencesWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      x-dash-internal: true
      tags:
        - User Preferences
      summary: Update the current user's preferences
      operationId: patchCurrentUserPreferences
      description: |
        Update the currently authenticated [`User`](#tag/Users)'s preferences
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserPreferencesPatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserPreferencesWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /current-user-creation-status:
    get:
      x-dash-internal: true
      tags:
        - Users
      summary: Check the creation status of the current user
      operationId: getCurrentUserCreationStatus
      description: >
        Get the currently authenticated [`User`](#tag/Users)'s creation status
        (used for detecting if a temporary signup token has been used)
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/UserCreationStatusResponseWithPermittedActions
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /groups:
    get:
      tags:
        - Groups
      summary: Get all groups
      operationId: getGroups
      description: >
        Get all of the [`Groups`](#tag/Group) in the current
        [`Account`](#tag/Account)
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupsWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      tags:
        - Groups
      summary: Create a group
      operationId: postGroup
      description: |
        Create a [`Group`](#tag/Group)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GroupRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /groups/{id}:
    get:
      tags:
        - Groups
      summary: Get a group
      operationId: getGroup
      description: |
        Get a [`Group`](#tag/Group)
      parameters:
        - name: id
          in: path
          description: The unique ID of the group
          required: true
          schema:
            type: string
          example: cff665ca-ce35-5418-b9d5-70ee815db4bc
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      tags:
        - Groups
      summary: Update a group
      operationId: patchGroup
      description: |
        Update a [`Group`](#tag/Group)
      parameters:
        - name: id
          in: path
          description: The unique ID of the group
          required: true
          schema:
            type: string
          example: cff665ca-ce35-5418-b9d5-70ee815db4bc
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GroupPatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - Groups
      summary: Delete a group
      operationId: deleteGroup
      description: |
        Delete a [`Group`](#tag/Group)
      parameters:
        - name: id
          in: path
          description: The unique ID of the group
          required: true
          schema:
            type: string
          example: cff665ca-ce35-5418-b9d5-70ee815db4bc
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /staff-members/{id}:
    delete:
      x-dash-internal: true
      tags:
        - Staff Members
      summary: Delete a staff member
      operationId: deleteStaffMember
      description: |
        Delete [`Staff Member`](#tag/Staff-Members) with the specified ID.
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`Staff Member`](#tag/Staff-Members)
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /staff-members:
    get:
      x-dash-internal: true
      tags:
        - Staff Members
      summary: Get all staff members
      operationId: getStaffMembers
      description: |
        Get all [`Staff Members`](#tag/Staff-Members).
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StaffMember'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      x-dash-internal: true
      tags:
        - Staff Members
      summary: Create a staff member
      operationId: postStaffMember
      description: >
        Create a new [`Staff Member`](#tag/Staff-Members). Staff Members can log
        in to any Dash account.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StaffMemberRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StaffMember'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /collections:
    post:
      tags:
        - Collections
      summary: Create a collection
      operationId: postCollection
      description: |
        Create a new [`Collection`](#tag/Collection).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CollectionRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /collections/{id}:
    patch:
      tags:
        - Collections
      summary: Update a collection
      operationId: patchCollection
      description: |
        Patch a [`Collection`](#tag/Collections)
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`Collection`](#tag/Collections)
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CollectionPatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /collection-searches:
    post:
      tags:
        - Collections
      summary: Search for collections
      operationId: postCollectionSearch
      description: >
        Create a new [`CollectionSearch`](#operation/postCollectionSearch)


        The most commmon use of an
        [`CollectionSearch`](#operation/postCollectionSearch) is to retrieve all
        the [`Collection`](#tag/Collections) resources associated with a
        [`User`](#tag/Users)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CollectionSearchRequest'
            examples:
              Search for collections associated with user:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: ASSOCIATED_WITH_USER
                    userId: google-oauth2|110955770826801837334
                  sorts:
                    - field: NAME
                      order: ASC
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionSearch'
              examples:
                Search for collections associated with user:
                  value:
                    results:
                      - result:
                          id: 1ecabbb8-85d5-11eb-8dcd-0242ac130003
                          accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                          name: Collaboration Collection
                          createdBy: google-oauth2|340955570626871847637
                          dateCreated: '2021-04-15T09:24:01.417Z'
                          permittedActions: []
                      - result:
                          id: 1fc6d6c3-c42d-48e2-b0db-5d680a58ca52
                          accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                          name: My Collection 1
                          createdBy: google-oauth2|110955770826801837334
                          dateCreated: '2021-02-15T09:24:01.417Z'
                        permittedActions: []
                      - result:
                          id: a52b5315-15b8-417f-b742-d6902108bac1
                          accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                          name: My Collection 2
                          createdBy: google-oauth2|110955770826801837334
                          dateCreated: '2021-03-15T09:24:01.417Z'
                        permittedActions: []
                    totalResults: 3
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /subdomain-availability-check:
    post:
      security: []
      tags:
        - Subdomains
      summary: Check subdomain availability
      operationId: postSubdomainAvailabilityCheck
      description: >
        > **This endpoint is unauthenticated. Do not send a Bearer Token in the
        Authorization Header**
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubdomainAvailabilityCheckRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubdomainAvailabilityCheck'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /grouped-preset-transformations:
    get:
      tags:
        - Preset Transformations
      summary: Get grouped preset transformations
      operationId: getGroupedPresetTransformations
      description: >
        Get all [`PresetTransformations`](#tag/Preset-Transformations) for the
        account in a group structure.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/GroupedPresetTransformationsWithPermittedActions
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /preset-transformation-searches:
    post:
      tags:
        - Preset Transformations
      summary: Search for preset transformations
      operationId: postPresetTransformationSearch
      description: >
        Create a new
        [`PresetTransformationSearch`](#operation/postPresetTransformationSearch). 
        This is most commonly used for finding presets that are applicable to a
        set of assets, so that one can be selected for use to create some
        [`AssetDownloads`](#tag/Asset-Downloads).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PresetTransformationSearchRequest'
            examples:
              Search for non-crop presets that can be used with specified set of assets:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: AND
                    criteria:
                      - type: APPLICABLE_FOR_ANY_ASSETS
                        assetIds:
                          - 2b746f61-d36d-4627-a547-936f6f20594b
                      - type: NOT
                        criterion:
                          type: HAS_TRANSFORMATION_OF_TYPE
                          transformationType: CROP
                  sorts: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PresetTransformationSearch'
              examples:
                Search for non-crop presets that can be used with specified set of assets:
                  value:
                    results:
                      - result:
                          id: a060635d-5807-4115-a2ed-f0588d47e7ba
                          accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                          name: Medium
                          position: 1
                          candidatePresetTransformations:
                            - criteria:
                                - type: MATCHES_MEDIA_TYPES
                                  mediaTypes:
                                    - type: image
                                      subType: '*'
                                    - type: application
                                      subType: psd
                                - type: IS_TRANSPARENT
                                  isTransparent: true
                              transformationTemplate:
                                - type: RESIZE
                                  width: 1200
                                  height: 1200
                                - type: CONVERT
                                  mediaType:
                                    type: image
                                    subType: png
                            - criteria:
                                - type: MATCHES_MEDIA_TYPES
                                  mediaTypes:
                                    - type: image
                                      subtype: '*'
                                    - type: application
                                      subtype: psd
                                - type: IS_TRANSPARENT
                                  isTransparent: false
                              transformationTemplate:
                                - type: RESIZE
                                  width: 1200
                                  height: 1200
                                - type: CONVERT
                                  mediaType:
                                    type: image
                                    subType: jpeg
                        permittedActions: []
                      - result:
                          id: 917087a6-8f76-4e77-be14-1ac637637c69
                          accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                          name: Large
                          position: 2
                          candidatePresetTransformations:
                            - criteria:
                                - type: MATCHES_MEDIA_TYPES
                                  mediaTypes:
                                    - type: image
                                      subType: '*'
                                    - type: application
                                      subType: psd
                                - type: IS_TRANSPARENT
                                  isTransparent: true
                              transformationTemplate:
                                - type: RESIZE
                                  width: 1200
                                  height: 1200
                                - type: CONVERT
                                  mediaType:
                                    type: image
                                    subType: png
                            - criteria:
                                - type: MATCHES_MEDIA_TYPES
                                  mediaTypes:
                                    - image/*
                                    - application/psd
                                - type: IS_TRANSPARENT
                                  isTransparent: false
                              transformationTemplate:
                                - type: RESIZE
                                  width: 2500
                                  height: 2500
                                - type: CONVERT
                                  mediaType:
                                    type: image
                                    subType: jpeg
                        permittedActions: []
                    totalResults: 2
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /preset-transformations-for-asset-searches:
    post:
      x-dash-internal: true
      tags:
        - Preset Transformations
      summary: Search for preset transformations for assets
      operationId: postPresetTransformationsForAssetSearch
      description: |
        Create a new [`PresetTransformationsForAssetSearch`]
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PresetTransformationsForAssetSearchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PresetTransformationsForAssetSearch'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /corebook-settings:
    get:
      tags:
        - Corebook
      summary: Get the account Corebook settings
      operationId: getCorebookSettings
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CorebookSettingsWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    put:
      tags:
        - Corebook
      summary: Update the account Corebook settings
      operationId: putCorebookSettings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CorebookSettingsRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CorebookSettingsWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /wordpress-settings:
    get:
      x-dash-internal: true
      tags:
        - WordPress
      summary: Get the account WordPress settings
      operationId: getWordPressSettings
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WordPressSettingsWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    put:
      x-dash-internal: true
      tags:
        - WordPress
      summary: Create or update the account WordPress settings
      operationId: putWordPressSettings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WordPressSettingsPutRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WordPressSettingsWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      x-dash-internal: true
      tags:
        - WordPress
      summary: Update the account WordPress settings
      operationId: patchWordPressSettings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WordPressSettingsPatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WordPressSettingsWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      x-dash-internal: true
      tags:
        - WordPress
      summary: Delete the account WordPress settings
      operationId: deleteWordPressSettings
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /shopify-export-jobs/{id}:
    get:
      x-dash-internal: true
      tags:
        - Shopify
      summary: Get the status of exporting to Shopify
      operationId: getShopifyExportJob
      description: >
        Get the status and eventual result of a
        [`ShopifyExportJob`](#operation/postShopifyExportJob)
      parameters:
        - name: id
          in: path
          description: >-
            The unique ID of the
            [`ShopifyExportJob`](#operation/postShopifyExportJob)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShopifyExportJobWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      x-dash-internal: true
      tags:
        - Shopify
      summary: Update the status of exporting to Shopify
      operationId: patchShopifyExportJob
      description: >
        Update a [`ShopifyExportJob`](#operation/postShopifyExportJob).
        Primarily used to stop a job.
      parameters:
        - name: id
          in: path
          description: >-
            The unique ID of the
            [`ShopifyExportJob`](#operation/postShopifyExportJob)
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobPatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShopifyExportJobWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      x-dash-internal: true
      tags:
        - Shopify
      summary: Delete a Shopify export
      operationId: deleteShopifyExportJob
      description: |
        Deletes a [`ShopifyExportJob`](#operation/postShopifyExportJob)
      parameters:
        - name: id
          in: path
          description: >-
            The unique ID of the
            [`ShopifyExportJob`](#operation/postShopifyExportJob)
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /shopify-export-jobs:
    post:
      x-dash-internal: true
      tags:
        - Shopify
      summary: Export images to products in Shopify
      operationId: postShopifyExportJob
      description: >
        Create a Shopify export job to upload multiple assets from Dash into
        your Shopify account.

        The uploaded assets can be associated with products and their position
        on the product listing can be specified.

        Existing Shopify images can also be reordered.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShopifyExportRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShopifyExportJobWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /current-user-shopify-export-jobs:
    get:
      x-dash-internal: true
      tags:
        - Shopify
      summary: Get the current user's shopify export jobs
      operationId: getCurrentUserShopifyExportJobs
      description: >
        Get the status and eventual result of all
        [`ShopifyExportJob`](#operation/postShopifyExportJob)s for the current
        user
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ShopifyExportJobWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /create-shopify-product-image-batch-jobs:
    post:
      x-dash-internal: true
      tags:
        - Shopify
      summary: Send product images to Shopify
      operationId: postCreateShopifyProductImageBatchJob
      description: >
        See [`AssetDownloadBatchJob`](#operation/postAssetDownloadBatchJob) for
        an idea of how to use this endpoint
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateShopifyProductImageBatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoResultJob'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /create-shopify-image-batch-jobs:
    post:
      x-dash-internal: true
      tags:
        - Shopify
      summary: Send images to Shopify
      operationId: postCreateShopifyImageBatchJob
      description: >
        See [`AssetDownloadBatchJob`](#operation/postAssetDownloadBatchJob) for
        an idea of how to use this endpoint
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateShopifyImageBatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NoResultJob'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /custom-integration-settings:
    get:
      tags:
        - Custom
      summary: Get the account custom integration settings
      operationId: getCustomIntegrationSettings
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CustomIntegrationSettingsWithPermittedActions
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    put:
      tags:
        - Custom
      summary: Create or update the account custom integration settings
      operationId: putCustomIntegrationSettings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomIntegrationSettingsPutRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CustomIntegrationSettingsWithPermittedActions
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      tags:
        - Custom
      summary: Update the account custom integration settings
      operationId: patchCustomIntegrationSettings
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomIntegrationSettingsPatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CustomIntegrationSettingsWithPermittedActions
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - Custom
      summary: Delete the account custom integration settings
      operationId: deleteCustomIntegrationSettings
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /external-app-users:
    post:
      x-dash-internal: true
      tags:
        - External App
      summary: Create an external app user
      operationId: postExternalAppUser
      description: >
        Associate an external app user ID with the currently authenticated Dash
        user
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalAppUserRequest'
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /external-app-sso-tokens:
    post:
      x-dash-internal: true
      tags:
        - External App
      summary: Create an external app SSO token
      operationId: postExternalAppSsoTokens
      description: |
        Create external app SSO token for the current user
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalAppSsoTokenRequest'
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /external-app-accounts:
    get:
      x-dash-internal: true
      tags:
        - External App
      summary: Get all external app accounts
      description: >
        Get all [`ExternalAppAccount`](#operation/getExternalAppAccounts)
        resources ordered by
        [`ExternalAppAccount.externalAppAccountId`](#operation/getExternalAppAccounts)
      operationId: getExternalAppAccounts
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ExternalAppAccountWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    post:
      x-dash-internal: true
      tags:
        - External App
      summary: Create an external app account
      operationId: postExternalAppAccount
      description: >
        Associate an external app account with the account of the currently
        authenticated Dash user
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExternalAppAccountRequest'
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /collection-shares:
    post:
      tags:
        - Collection Shares
      summary: Create a collection share
      operationId: postCollectionShare
      description: >
        Create a new [`CollectionShare`](#tag/Collection-Share), making a
        [`Collection`](#tag/Collection) available to anyone who has one of the
        `CollectionShare.slugs`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CollectionShareRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionShareWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /collection-shares/{id}:
    get:
      security: []
      tags:
        - Collection Shares
      summary: Get a collection share
      operationId: getCollectionShare
      description: >
        Get a [`CollectionShare`](#tag/Collection-Shares)


        **This endpoint is unauthenticated. Do not send a Bearer Token in the
        Authorization Header**
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`CollectionShare`](#tag/Collection-Shares)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionShareWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      tags:
        - Collection Shares
      summary: Update a collection share
      operationId: patchCollectionShare
      description: |
        Patch a [`CollectionShare`](#tag/Collection-Shares)
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`CollectionShare`](#tag/Collection-Shares)
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CollectionSharePatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionShareWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - Collection Shares
      summary: Delete a collection share
      operationId: deleteCollectionShare
      description: |
        Delete a [`CollectionShare`](#tag/Collection-Shares)
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`CollectionShare`](#tag/Collection-Shares)
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /collection-shares/{id}/access-token:
    get:
      security: []
      tags:
        - Collection Share Access Tokens
      summary: Get a collection share access token
      operationId: getCollectionShareAccessToken
      description: >
        Get an access token for viewing data which has been shared as part of
        the [`CollectionShare`](#tag/Collection-Shares).  Use this access token
        in the same way as the normal signed-in user token to make requests with
        the permissions of the share applied.


        **This endpoint is unauthenticated. Do not send a Bearer Token in the
        Authorization Header**
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`CollectionShare`](#tag/Collection-Shares)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessTokenWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /collection-share-searches:
    post:
      x-dash-internal: true
      tags:
        - Collection Shares
      summary: Search for collection shares
      operationId: postCollectionShareSearch
      description: >
        Create a new
        [`CollectionShareSearch`](#operation/postCollectionShareSearch)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CollectionShareSearchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionShareSearch'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /publicly-available-collection-share-searches:
    post:
      security: []
      tags:
        - Collection Shares
      summary: Search for publicly available collection shares
      operationId: postPubliclyAvailableCollectionShareSearch
      description: >
        Create a new
        [`CollectionShareSearch`](#operation/postCollectionShareSearch)


        **This endpoint is unauthenticated. Do not send a Bearer Token in the
        Authorization Header**
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicCollectionShareSearchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CollectionShareSearch'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /saved-searches:
    post:
      tags:
        - Saved Searches
      summary: Create a saved search
      description: |
        Create a new [`SavedSearch`](#tag/Saved-Searches) resource.
      operationId: postSavedSearch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SavedSearchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SavedSearch'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /saved-searches/{id}:
    get:
      tags:
        - Saved Searches
      summary: Get a saved search
      operationId: getSavedSearch
      description: |
        Get a [`SavedSearch`](#tag/Saved-Searches) resource.
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`SavedSearch`](#tag/Saved-Searches)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SavedSearchWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      tags:
        - Saved Searches
      summary: Update a saved search
      operationId: patchSavedSearch
      description: >
        Update a [`SavedSearch`](#tag/Saved-Searches) resource. Only the
        provided fields will be updated
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`SavedSearch`](#tag/Saved-Searches)
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SavedSearchPatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SavedSearchWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - Saved Search
      summary: Delete a Saved Search
      operationId: deleteSaveSearch
      description: |
        Delete a [`SavedSearch`](#tag/Saved-Searches) resource.
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`SavedSearch`](#tag/Saved-Searches)
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /saved-search-searches:
    post:
      tags:
        - Saved Searches
      summary: Search for saved searches
      operationId: postSavedSearchSearch
      description: >
        Create a new [`SavedSearchSearch`](#operation/postSavedSearchSearch)


        The only use of a
        [`SavedSearchSearch`](#operation/postSavedSearchSearch) as of now is to
        retrieve all the [`SavedSearch`](#tag/Saved-Search) resources created by
        a [`User`](#tag/Users)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SavedSearchSearchRequest'
            examples:
              Search for saved searches created by a user:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: FIELD_EQUALS
                    field: CREATOR_ID
                    value: google-oauth2|110955770826801837334
                  sorts: []
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SavedSearchSearch'
              examples:
                Search for saved searches created by a user:
                  value:
                    results:
                      - result:
                          id: 1ecabbb8-85d5-11eb-8dcd-0242ac130003
                          accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                          creatorId: google-oauth2|340955570626871847637
                          name: Favourite search
                          emailUserOnNewUploads: true
                          criterion:
                            type: FIELD_EQUALS
                            value: a32fe863-0a1d-4b54-990a-b094139cf81c
                            field:
                              type: FIELD
                              fieldId: a52b5315-15b8-417f-b742-d6902108bac1
                          sorts: []
                        permittedActions: []
                      - result:
                          id: 1fc6d6c3-c42d-48e2-b0db-5d680a58ca52
                          accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                          creatorId: google-oauth2|340955570626871847637
                          name: Added in January
                          emailUserOnNewUploads: false
                          criterion:
                            type: FIELD_MATCHES
                            value: '[2021-01-01 TO 2021-02-01]'
                            field:
                              type: FIXED
                              fieldName: DATE_LIVE
                          sorts: []
                        permittedActions: []
                      - result:
                          id: a52b5315-15b8-417f-b742-d6902108bac1
                          accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                          creatorId: google-oauth2|340955570626871847637
                          name: My saved search
                          emailUserOnNewUploads: true
                          criterion:
                            type: MATCH_ALL
                          sorts:
                            - field:
                                type: FIXED
                                fieldName: DATE_LIVE
                              order: DESC
                        permittedActions: []
                    totalResults: 3
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /asset-download-event-searches:
    post:
      tags:
        - Asset Download Events
      summary: Search for asset download events
      operationId: postAssetDownloadEventSearch
      description: >
        Create a new [`Asset Download Event
        Search`](#operation/postAssetDownloadEventSearch)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssetDownloadEventSearchRequest'
            examples:
              Search downloads by user id:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: FIELD_EQUALS
                    field: USER_ID
                    value: 162c8739-b830-4d2f-b241-97951734a04e
                  sorts:
                    - field: DATE_TIME
                      order: DESC
                  aggregations: {}
              Search downloads by user email and asset id:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: AND
                    criteria:
                      - type: FIELD_EQUALS
                        field: ASSET_ID
                        value: c1045fb1-da2c-4190-8aec-741bdc31ad88
                      - type: FIELD_EQUALS
                        field: USER_EMAIL
                        value: joe-bloggs@test.com
                  sorts:
                    - field: DATE_TIME
                      order: ASC
                  aggregations: {}
              Search downloads by multiple asset ids:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: OR
                    criteria:
                      - type: FIELD_EQUALS
                        field: ASSET_ID
                        value: c1045fb1-da2c-4190-8aec-741bdc31ad88
                      - type: FIELD_EQUALS
                        field: ASSET_ID
                        value: 28f1a532-5a86-4c0d-80a9-b3b67a9edcdd
                      - type: FIELD_EQUALS
                        field: ASSET_ID
                        value: 7b00d039-9b01-436c-8632-15a33f024ee2
                  sorts:
                    - field: ASSET_ID
                      order: ASC
                    - field: DATE_TIME
                      order: ASC
                  aggregations: {}
              Search downloads within date range:
                value:
                  from: 0
                  pageSize: 100
                  criterion:
                    type: FIELD_IN_RANGE
                    field: DATE_TIME
                    from: '2023-09-24T12:57:34.295Z'
                    to: '2023-10-24T12:57:34.295'
                  sorts:
                    - field: DATE_TIME
                      order: DESC
                  aggregations: {}
              Aggregate all downloads by date:
                value:
                  from: 0
                  pageSize: 0
                  criterion:
                    type: MATCH_ALL
                  sorts: []
                  aggregations:
                    by_day:
                      type: DATE_HISTOGRAM
                      field: DATE_TIME
                      interval: ONE_DAY
                      lowerBound: '2023-10-17T00:00:00.295Z'
                      upperBound: '2023-10-24T23:59:59.295Z'
              Aggregate portal downloads by portal:
                value:
                  from: 0
                  pageSize: 0
                  criterion:
                    type: FIELD_EQUALS
                    field: USER_TYPE
                    value: PORTAL_USER
                  sorts: []
                  aggregations:
                    by_portal:
                      type: TERMS
                      field: PORTAL_ID
              Aggregate account user downloads by user id:
                value:
                  from: 0
                  pageSize: 0
                  criterion:
                    type: FIELD_EQUALS
                    field: USER_TYPE
                    value: ACCOUNT_USER
                  sorts: []
                  aggregations:
                    by_user:
                      type: TERMS
                      field: USER_ID
              Aggregate account user downloads by user id and asset id:
                value:
                  from: 0
                  pageSize: 0
                  criterion:
                    type: FIELD_EQUALS
                    field: USER_TYPE
                    value: ACCOUNT_USER
                  sorts: []
                  aggregations:
                    by_user:
                      type: TERMS
                      field: USER_ID
                    by_asset:
                      type: TERMS
                      field: ASSET_ID
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetDownloadEventSearch'
              examples:
                Results with paged events without aggregations:
                  value:
                    totalResults: 3
                    results:
                      - result:
                          id: 7d240457-6232-4702-af61-7ce5e6ffc34e
                          accountId: a61a254c-4bbd-41e6-ba52-22a82ce9fca1
                          assetId: 2441039a-fb70-4cf8-8070-b2ac6a70186f
                          assetFileId: 2441239a-fb70-4cf8-8070-b2ac6a60186f
                          dateTime: '2023-10-23T17:05:28.68Z'
                          downloadType: PRESET
                          downloadDescription: Large
                          downloadPresetId: a2b1817f-ba85-47cf-87ec-3183df7a9bd0
                          userData:
                            type: ACCOUNT_USER
                            userId: google-oauth2|101322069082130951052
                            userEmail: joe-blogs@test.com
                        permittedActions: []
                      - result:
                          id: 9d240457-6232-4702-af61-7ce5e6ffc34e
                          accountId: a61a254c-4bbd-41e6-ba52-22a82ce9fca1
                          assetId: 2441039a-fb70-4cf8-8070-b2ac6a70186f
                          assetFileId: 3441239a-fb70-4cf8-8070-b2ac6a60186f
                          dateTime: '2023-11-23T17:05:28.68Z'
                          downloadType: PRESET
                          downloadDescription: Small
                          downloadPresetId: a2b1817f-ba85-47cf-87ec-3183df7a9bd0
                          userData:
                            type: ACCOUNT_USER
                            userId: google-oauth2|201322069082130951052
                            userEmail: sue-blogs@test.com
                        permittedActions: []
                      - result:
                          id: 9d240457-6232-4702-af61-7ce5e6ffc34e
                          accountId: a61a254c-4bbd-41e6-ba52-22a82ce9fca1
                          assetId: 3441039a-fb70-4cf8-8070-b2ac6a70186f
                          assetFileId: 3441239a-fb70-4cf8-8070-b2ac6a60186f
                          dateTime: '2023-11-23T17:05:28.68Z'
                          downloadType: PRESET
                          downloadDescription: Small
                          downloadPresetId: a2b1817f-ba85-47cf-87ec-3183df7a9bd0
                          userData:
                            type: ACCOUNT_USER
                            userId: google-oauth2|201322069082130951052
                            userEmail: sue-blogs@test.com
                        permittedActions: []
                    aggregations: []
                Results with paged events with aggregations:
                  value:
                    totalResults: 3
                    results:
                      - result:
                          id: 7d240457-6232-4702-af61-7ce5e6ffc34e
                          accountId: a61a254c-4bbd-41e6-ba52-22a82ce9fca1
                          assetId: 2441039a-fb70-4cf8-8070-b2ac6a70186f
                          assetFileId: 2441239a-fb70-4cf8-8070-b2ac6a60186f
                          dateTime: '2023-10-23T17:05:28.68Z'
                          downloadType: PRESET
                          downloadDescription: Large
                          downloadPresetId: a2b1817f-ba85-47cf-87ec-3183df7a9bd0
                          userData:
                            type: ACCOUNT_USER
                            userId: google-oauth2|101322069082130951052
                            userEmail: joe-blogs@test.com
                        permittedActions: []
                      - result:
                          id: 9d240457-6232-4702-af61-7ce5e6ffc34e
                          accountId: a61a254c-4bbd-41e6-ba52-22a82ce9fca1
                          assetId: 2441039a-fb70-4cf8-8070-b2ac6a70186f
                          assetFileId: 3441239a-fb70-4cf8-8070-b2ac6a60186f
                          dateTime: '2023-11-23T17:05:28.68Z'
                          downloadType: PRESET
                          downloadDescription: Small
                          downloadPresetId: a2b1817f-ba85-47cf-87ec-3183df7a9bd0
                          userData:
                            type: ACCOUNT_USER
                            userId: google-oauth2|201322069082130951052
                            userEmail: sue-blogs@test.com
                        permittedActions: []
                      - result:
                          id: 9d240457-6232-4702-af61-7ce5e6ffc34e
                          accountId: a61a254c-4bbd-41e6-ba52-22a82ce9fca1
                          assetId: 3441039a-fb70-4cf8-8070-b2ac6a70186f
                          assetFileId: 3441239a-fb70-4cf8-8070-b2ac6a60186f
                          dateTime: '2023-11-23T17:05:28.68Z'
                          downloadType: PRESET
                          downloadDescription: Small
                          downloadPresetId: a2b1817f-ba85-47cf-87ec-3183df7a9bd0
                          userData:
                            type: ACCOUNT_USER
                            userId: google-oauth2|201322069082130951052
                            userEmail: sue-blogs@test.com
                        permittedActions: []
                    aggregations:
                      by_user_email:
                        type: BUCKET
                        buckets:
                          - key: joe-blogs@test.com
                            count: 1
                          - key: sue-blogs@test.com
                            count: 2
                Results without paged events with terms bucket aggregations:
                  value:
                    totalResults: 10
                    results: []
                    aggregations:
                      by_portal_id:
                        type: BUCKET
                        buckets:
                          - key: dc530896-8664-41b5-abc2-612976792b06
                            count: 1
                          - key: 6f530896-8664-41b5-abc2-612976792b06
                            count: 5
                          - key: ea6ed9bd-871b-4df4-8762-09d55bafac87
                            count: 4
                Results without paged events with multiple terms bucket aggregations:
                  value:
                    totalResults: 3
                    results: []
                    aggregations:
                      by_user_email:
                        type: BUCKET
                        buckets:
                          - key: joe-blogs@test.com
                            count: 1
                          - key: sue-blogs@test.com
                            count: 2
                      by_asset_id:
                        type: BUCKET
                        buckets:
                          - key: dc530896-8664-41b5-abc2-612976792b06
                            count: 1
                          - key: 6f530896-8664-41b5-abc2-612976792b06
                            count: 1
                          - key: ea6ed9bd-871b-4df4-8762-09d55bafac87
                            count: 1
                Results without paged events with date histogram bucket aggregations:
                  value:
                    totalResults: 20
                    results: []
                    aggregations:
                      by_day:
                        type: BUCKET
                        buckets:
                          - key: '2023-09-17T00:00:00.000Z'
                            count: 0
                          - key: '2023-09-17T00:00:00.000Z'
                            count: 5
                          - key: '2023-09-17T00:00:00.000Z'
                            count: 4
                          - key: '2023-09-17T00:00:00.000Z'
                            count: 10
                          - key: '2023-09-17T00:00:00.000Z'
                            count: 0
                          - key: '2023-09-17T00:00:00.000Z'
                            count: 1
                          - key: '2023-09-17T00:00:00.000Z'
                            count: 0
                No results:
                  value:
                    totalResults: 0
                    results: []
                    aggregations: []
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /portals:
    post:
      tags:
        - Portals
      summary: Create a portal
      operationId: postPortal
      description: >
        Create a new [`Portal`](#tag/Portals), allowing public access to
        specified folders to anyone who has one of the `Portal.slugs`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PortalRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PortalWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /portals/{id}:
    get:
      tags:
        - Portals
      summary: Get a portal
      operationId: getPortal
      description: |
        Get a [`Portal`](#tag/Portals)
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`Portal`](#tag/Portals)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PortalWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      tags:
        - Portals
      summary: Update a portal
      operationId: patchPortal
      description: |
        Patch a [`Portal`](#tag/Portals)
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`Portal`](#tag/Portals)
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PortalPatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PortalWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      tags:
        - Portals
      summary: Delete a portal
      operationId: deletePortal
      description: |
        Delete a [`Portal`](#tag/Portals).
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`Portal`](#tag/Portals)
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /portal-searches:
    post:
      tags:
        - Portals
      summary: Search for portals
      operationId: postPortalSearch
      description: |
        Create a new [`PortalSearch`](#operation/postPortalSearch)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PortalSearchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PortalSearch'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /portals/{id}/access-token:
    get:
      security:
        - {}
        - portalPasscode: []
      tags:
        - Portal Access Tokens
      summary: Get a portal access token
      operationId: getPortalAccessToken
      description: >
        Get an access token for making requests as [`Portal`](#tag/Portals)
        user.  Use this access token in the same way as the normal signed-in
        user token to make requests with the permissions of the share applied.


        **This endpoint is not authenticated with a Bearer token. Do not send a
        Bearer Token in the Authorization Header**


        If the portal has a passcode, select the `portalPasscode` Authorization
        header and prefix the passcode with "Passcode ".
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`Portal`](#tag/Portals)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessTokenWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /subdomains/{subdomain}/publicly-available-portal-datas/{slug}:
    get:
      x-dash-internal: true
      tags:
        - Publicly Available Portal Datas
      summary: Get public portal data
      operationId: getPubliclyAvailablePortalData
      description: |
        Get the publicly available data for a portal by subdomain and slug
      parameters:
        - name: subdomain
          in: path
          description: >-
            The subdomain of the `Account` the [`Portal`](#tag/Portals) belongs
            to
          required: true
          schema:
            type: string
        - name: slug
          in: path
          description: The slug of the [`Portal`](#tag/Portals)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PubliclyAvailablePortalDataWithPermittedActions
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /portal-emails:
    post:
      tags:
        - Portal Emails
      summary: Email a link to a portal
      operationId: createPortal
      description: |
        Send a [`Portal`](#tag/Portals) via email to a specified email address
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PortalEmailRequest'
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /guest-uploads:
    post:
      x-dash-internal: true
      tags:
        - Guest Uploads
      summary: Create a guest upload
      operationId: postGuestUpload
      description: >
        Create a new [`GuestUpload`](#tag/Guest-Uploads) URL, to share with a
        guest to upload files to a specified folder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GuestUploadRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuestUploadWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /guest-uploads/{id}:
    get:
      x-dash-internal: true
      tags:
        - Guest Uploads
      summary: Get a guest upload
      operationId: getGuestUpload
      description: |
        Get a [`GuestUpload`](#tag/Guest-Uploads)
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`GuestUpload`](#tag/Guest-Uploads)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuestUploadWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      x-dash-internal: true
      tags:
        - Guest Uploads
      summary: Update a guest upload
      operationId: patchGuestUpload
      description: |
        Patch a [`GuestUpload`](#tag/Guest-Uploads)
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`GuestUpload`](#tag/Guest-Uploads)
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GuestUploadPatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuestUploadWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      x-dash-internal: true
      tags:
        - Guest Uploads
      summary: Delete a GuestUpload
      operationId: deleteGuestUpload
      description: |
        Delete a [`GuestUpload`](#tag/Guest-Uploads).
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`GuestUpload`](#tag/Guest-Uploads)
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /guest-upload-searches:
    post:
      x-dash-internal: true
      tags:
        - Guest Uploads
      summary: Search for guest uploads
      operationId: postGuestUploadSearch
      description: |
        Create a new [`GuestUploadSearch`](#operation/postGuestUploadSearch)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GuestUploadSearchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GuestUploadSearch'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /guest-upload-emails:
    post:
      x-dash-internal: true
      tags:
        - Guest Upload Emails
      summary: Email a link to a guest upload
      operationId: postGuestUploadEmail
      description: >
        Send a [`GuestUpload`](#tag/Guest-Uploads) URL via email to a specified
        email address
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GuestUploadEmailRequest'
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /guest-upload-access-tokens:
    post:
      x-dash-internal: true
      security: []
      tags:
        - Guest Upload Access Tokens
      summary: Create a guest upload access token
      operationId: postGuestUploadAccessToken
      description: >
        Create an access token for making requests as a
        [`GuestUpload`](#tag/Guest-Uploads) user.  Using this access token, the
        guest can upload assets.


        **This endpoint is unauthenticated. Do not send a Bearer Token in the
        Authorization Header**
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GuestUploadAccessTokenRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessTokenWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /subdomains/{subdomain}/publicly-available-guest-upload-data/{slug}:
    get:
      x-dash-internal: true
      tags:
        - Publicly Available Guest Upload Data
      summary: Get public guest upload data
      operationId: getPubliclyAvailableGuestUploadData
      description: |
        Get the publicly available data for a Guest Upload by subdomain and slug
      parameters:
        - name: subdomain
          in: path
          description: >-
            The subdomain of the `Account` the
            [`GuestUpload`](#tag/Guest-Uploads) belongs to
          required: true
          schema:
            type: string
        - name: slug
          in: path
          description: The slug of the [`GuestUpload`](#tag/Guest-Uploads)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PubliclyAvailableGuestUploadDataWithPermittedActions
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /cloud-connections:
    post:
      x-dash-internal: true
      tags:
        - Cloud Connections
      summary: Create a cloud connection
      description: >
        Create a new [`Cloud Connections`](#tag/Cloud-Connections) resource to
        connect to a cloud storage providers and import assets into Dash
      operationId: postCloudConnections
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CloudConnectionRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudConnectionWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /cloud-connections/{id}:
    get:
      x-dash-internal: true
      tags:
        - Cloud Connections
      summary: Get a cloud connection
      operationId: getCloudConnection
      description: >
        Get a [`CloudConnection`](#tag/Cloud-Connections) resource to connect
        which connects to Cloud Storage Providers in order to import assets into
        Dash
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`CloudConnection`](#tag/Cloud-Connections)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudConnectionWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      x-dash-internal: true
      tags:
        - Cloud Connections
      summary: Delete a cloud connection
      operationId: deleteCloudConnection
      description: |
        Delete a [`Cloud Connections`](#tag/Cloud-Connections) resource
      parameters:
        - name: id
          in: path
          description: The unique ID of the [`Cloud Connections`](#tag/Cloud-Connections)
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /cloud-connections/{id}/cloud-objects/{cloudObjectId}:
    get:
      x-dash-internal: true
      tags:
        - Cloud Objects
      summary: Get a cloud object
      operationId: getCloudObject
      description: |
        Get a CloudObject
      parameters:
        - name: id
          in: path
          description: The unique ID of the CloudConnection that the CloudObject belongs to
          required: true
          schema:
            type: string
        - name: cloudObjectId
          in: path
          description: The unique ID of the CloudObject
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudObject'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /current-user-cloud-connections:
    get:
      x-dash-internal: true
      tags:
        - Cloud Connections
      summary: Get the current user's cloud connections
      description: >
        Get all the [`CloudConnection`](#tag/Cloud-Connections) resources for
        the current user
      operationId: getCurrentUserCloudConnections
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CloudConnectionWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /cloud-object-searches:
    post:
      x-dash-internal: true
      tags:
        - Cloud Objects
      summary: Search for cloud objects
      operationId: postCloudObjectSearches
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CloudObjectPagedSearchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudObjectPagedSearch'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /cloud-import-jobs:
    post:
      x-dash-internal: true
      tags:
        - Cloud Import Jobs
      summary: Import cloud objects
      description: >
        Create a new [`Cloud Import Job`](#tag/Cloud-Import-Jobs) resource to
        import assets into Dash
      operationId: postCloudImportJobs
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CloudImportJobRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudImportJobWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /cloud-import-jobs/{id}:
    get:
      x-dash-internal: true
      tags:
        - Cloud Import Jobs
      summary: Get the status of a cloud object import
      operationId: getCloudImportJob
      description: >
        Get the status and eventual result of a
        [`CloudImportJob`](#operation/postCloudImportJob)
      parameters:
        - name: id
          in: path
          description: >-
            The unique ID of the
            [`CloudImportJob`](#operation/postCloudImportJob)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudImportJobWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      x-dash-internal: true
      tags:
        - Cloud Import Jobs
      summary: Update the status of a cloud object import
      operationId: patchCloudImportJob
      description: >
        Update a [`CloudImportJob`](#operation/postCloudImportJob). Primarily
        used to stop a job.
      parameters:
        - name: id
          in: path
          description: >-
            The unique ID of the
            [`CloudImportJob`](#operation/postCloudImportJob)
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JobPatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudImportJobWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      x-dash-internal: true
      tags:
        - Cloud Import Jobs
      summary: Delete a cloud object import
      operationId: deleteCloudImportJob
      description: |
        Deletes a [`CloudImportJob`](#operation/postCloudImportJob)
      parameters:
        - name: id
          in: path
          description: >-
            The unique ID of the
            [`CloudImportJob`](#operation/postCloudImportJob)
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /current-user-cloud-import-jobs:
    get:
      x-dash-internal: true
      tags:
        - Cloud Import Jobs
      summary: Get the current user's cloud imports
      description: >
        Get all [`CloudImportJob`](#tag/Cloud-Import-Jobs) resources for the
        current user
      parameters:
        - name: type
          in: query
          description: The cloud provider type of the jobs to get
          schema:
            type: string
            enum:
              - DROPBOX
              - GOOGLE
      operationId: getCurrentUserCloudImportJobs
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CloudImportJobWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /oauth-callback:
    get:
      x-dash-internal: true
      security: []
      tags:
        - Cloud Connections
      summary: Proxy for OAuth callback
      operationId: getOAuthCallback
      description: >
        > **This endpoint is unauthenticated. Do not send a Bearer Token in the
        Authorization Header**
      responses:
        '302':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /shopify-connections/{id}:
    get:
      x-dash-internal: true
      security: []
      tags:
        - Shopify
      summary: Get a Shopify connection
      operationId: getShopifyConnection
      description: |
        Get details about a particular connection to Shopify
      parameters:
        - name: id
          in: path
          description: The shop name that uniquely identifies a Shopify connection
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShopifyConnectionWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /shopify-callback:
    get:
      x-dash-internal: true
      security: []
      tags:
        - Shopify
      summary: Callback required to install Dash with Shopify
      operationId: getShopifyCallback
      description: >
        This is quite an internal endpoint and is only really in the API due to
        needing to be on the dash.app domain.
      parameters:
        - name: shop
          in: query
          description: The shop name that uniquely identifies a Shopify connection
          required: true
          schema:
            type: string
        - name: hmac
          in: query
          description: >-
            A hash of all other parameters created by using the Shopify secret
            key as the key
          required: true
          schema:
            type: string
        - name: session
          in: query
          description: The current session
          required: false
          schema:
            type: string
        - name: timestamp
          in: query
          required: false
          schema:
            type: string
        - name: locale
          in: query
          required: false
          schema:
            type: string
        - name: host
          in: query
          required: false
          schema:
            type: string
        - name: embedded
          in: query
          required: false
          schema:
            type: string
      responses:
        '302':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /subscription:
    get:
      x-dash-internal: true
      tags:
        - Subscription
      summary: Get the account subscription
      operationId: getSubscription
      description: |
        Get the Subscription associated with your account
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      x-dash-internal: true
      tags:
        - Subscription
      summary: Delete the account subscription
      operationId: deleteSubscription
      description: |
        Delete the Subscription associated with your account
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /subscription-estimate:
    get:
      x-dash-internal: true
      tags:
        - Subscription
      summary: Get the subscription estimate
      operationId: getSubscriptionEstimate
      description: |
        Get an estimate of the upcoming subscription based on current usage
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatedSubscriptionWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /subscription-intents:
    post:
      x-dash-internal: true
      tags:
        - Subscription
      summary: Create a subscription intent
      description: >
        Create a new Subscription Intent resource to indicate intent to
        subscribe to a paid plan
      operationId: postSubscriptionIntent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionIntentRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionIntentWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /subscription-intents/{id}:
    get:
      x-dash-internal: true
      tags:
        - Subscription
      summary: Get a subscription intent
      operationId: getSubscriptionIntent
      description: |
        Get a Subscription Intent resource
      parameters:
        - name: id
          in: path
          description: The unique ID of the SubscriptionIntent
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionIntentWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    patch:
      x-dash-internal: true
      tags:
        - Subscription
      summary: Update a subscription intent
      operationId: patchSubscriptionIntent
      description: |
        Update a Subscription Intent resource
      parameters:
        - name: id
          in: path
          description: The unique ID of the SubscriptionIntent
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubscriptionIntentPatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionIntentWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /subscription-usage:
    get:
      x-dash-internal: true
      tags:
        - Subscription
      summary: Get subscription usage
      description: >
        Get a summary of your subscription usage for the last six months.


        If you are on a tiered subscription (Starting, Growing or Dashing), the
        download counts will be bucketed by calendar month. For example, the
        last counts will include all downloads this calendar month up to today.


        If you are on the new value-based pricing (Startup, Small Team, Growing
        Brand or Established Brand), then the download counts are bucketed based
        on your billing month.
      operationId: getSubscriptionUsage
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionUsage'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /embeddable-links/{id}:
    patch:
      tags:
        - Asset Embeddable Links
      summary: Update an asset embeddable link
      operationId: EmbeddableLink
      description: >
        Update an [`AssetEmbeddableLink`](#tag/Asset-Embeddable-Links)
        resource's status.


        Currently only a patch to status: `REVOKED` is supported.

        This will update the `AssetEmbeddableLink` resource's status to
        `REVOKED` and fileStatus to `DELETED`.
      parameters:
        - name: id
          in: path
          description: >-
            The unique ID of the
            [`AssetEmbeddableLink`](#tag/Asset-Embeddable-Links)
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbeddableLinkPatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbeddableLinkWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /embeddable-link-batch-jobs:
    post:
      tags:
        - Asset Embeddable Links
      summary: Create asset embeddable links
      operationId: postAssetEmbeddableLinkBatchJob
      description: >
        An
        [`AssetEmbeddableLinkBatchJob`](#operation/postAssetEmbeddableLinkBatchJob)
        should be created when you want to create embeddable links for multiple
        [`AssetFile`](#operation/getAssetFiles) resources.


        There is a limit of 500 batch request items for this endpoint.

        If more than 500 items are requested, the endpoint will error with a bad
        request(400) response.


        The `transformationDescription` can be one of two types, `CUSTOM` or
        `PRESET`.


        This definition and usage matches the `transformationDescription` used
        in [`AssetDownloadBatchJob`](#operation/postAssetDownloadBatchJob).


        A `CUSTOM` `transformationDescription` is a list of
        `candidateTransformations` which are evaluated in turn against each
        [`AssetFile`](#operation/getAssetFiles) specified in the request.

        If the [`AssetFile`](#operation/getAssetFiles)  meets the
        `candidateTransformation.criteria` then the
        `candidateTransformation.transformation` is applied. Otherwise, the next
        candidate is considered.

        The `candidateTransformation.transformation` is a series of operations
        to apply to the  [`AssetFile`](#operation/getAssetFiles) in order (e.g.
        resize to 200 by 100  and then covert to JPG). An empty list of
        operations indicates the file should be left untransformed.


        A `PRESET` `transformationDescription` is similar to a `CUSTOM`
        transformation except the `transformationDescription` has been
        predefined.

        These presets are currently only configurable via the Dash frontend, but
        can be found via a
        [`PresetTransformationSearch`](#operation/postPresetTransformationSearch).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbeddableLinkBatchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbeddableLinkBatchJob'
              examples:
                In progress:
                  value:
                    id: be161977-d44e-4888-af3c-66522e223963
                    accountId: cfb665ca-ce35-4418-b9d5-70ee815db4bd
                    creatorId: google-oauth2|110955770826801837334
                    type: IN_PROGRESS
                    status: PENDING
                    progress:
                      steps:
                        - id: embeddableLinkGetJobItemsStep
                          status: STARTED
                          completedItems: 0
                          totalItems: 0
                        - id: embeddableLinkProcessJobItemsStep
                          status: PENDING
                          completedItems: 0
                          totalItems: 0
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /embeddable-link-batch-jobs/{id}:
    get:
      tags:
        - Asset Embeddable Links
      summary: Get the status of creating asset embeddable links
      operationId: getAssetEmbeddableLinkBatchJob
      description: >
        Get the status and eventual result of an
        [`AssetEmbeddableLinkBatchJob`](#operation/postAssetEmbeddableLinkBatchJob)
      parameters:
        - name: id
          in: path
          description: >-
            The unique ID of the
            [`AssetEmbeddableLinkBatchJob`](#operation/postAssetEmbeddableLinkBatchJob)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbeddableLinkBatchJob'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      x-dash-internal: true
      tags:
        - Asset Embeddable Links
      summary: Discard creating asset embeddable links
      operationId: deleteAssetEmbeddableLinkBatchJob
      description: >
        Stops an
        [`AssetEmbeddableLinkBatchJob`](#operation/postAssetEmbeddableLinkBatchJob)
        and deletes it
      parameters:
        - name: id
          in: path
          description: >-
            The unique ID of the
            [`AssetEmbeddableLinkBatchJob`](#operation/postAssetEmbeddableLinkBatchJob)
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /embeddable-link-searches:
    post:
      tags:
        - Asset Embeddable Links
      summary: Search for asset embeddable links
      operationId: postEmbeddableLinkSearches
      description: >
        Create a new
        [`AssetEmbeddableLinkSearch`](#operation/postEmbeddableLinkSearches).

        The criterion and sort currently support search by `ASSET_ID` field
        only.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbeddableLinkSearchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmbeddableLinkSearch'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /dash-ping:
    get:
      x-dash-internal: true
      security: []
      tags:
        - Ping
      summary: Check Dash API availability
      operationId: getPing
      description: >
        > **This endpoint is unauthenticated. Do not send a Bearer Token in the
        Authorization Header**
      responses:
        '204':
          description: Success
          headers:
            Access-Control-Allow-Origin:
              schema:
                type: string
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /platform/users:
    post:
      x-dash-internal: true
      tags:
        - Users
      summary: Create a platform user
      operationId: postPlatformUser
      description: |
        Create a new [`Platform User`](#operation/postPlatformUser)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlatformUserRequest'
      responses:
        '200':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /platform/users/{id}:
    patch:
      x-dash-internal: true
      tags:
        - Users
      summary: Patch a platform user
      operationId: patchPlatformUser
      description: |
        Update a `Platform User`
      parameters:
        - name: id
          in: path
          description: The unique ID of the `Platform User`
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlatformUserPatchRequest'
      responses:
        '200':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /platform/current-user-account-searches:
    post:
      x-dash-internal: true
      tags:
        - Users
      summary: Get accounts which the current user has a seat in
      operationId: postPlatformCurrentUserAccountsSearch
      description: >
        Get accounts which the currently authenticated [`Platform
        User`](#operation/postPlatformUser)'s has a seat in
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlatformCurrentUserAccountSearchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PubliclyAvailableAccountDataSearch'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /platform/user-forgotten-passwords:
    post:
      x-dash-internal: true
      security: []
      tags:
        - Users
      summary: Request a password reset
      operationId: postPlatformUserForgottenPassword
      description: |
        Request a [`Platform User`](#operation/postPlatformUser) password reset
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlatformUserForgottenPasswordRequest'
      responses:
        '200':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /platform/user-reset-passwords:
    post:
      x-dash-internal: true
      tags:
        - Users
      summary: Reset a password
      operationId: postPlatformUserResetPassword
      description: |
        Reset a [`Platform User`](#operation/postPlatformUser) password
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlatformUserResetPasswordRequest'
      responses:
        '200':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /platform/user-sign-up-tokens:
    post:
      x-dash-internal: true
      security: []
      tags:
        - Users
      summary: Get a sign-up token
      operationId: postPlatformUserSignUpToken
      description: >
        Get an authentication token needed to create a [`Platform
        User`](#operation/postPlatformUser)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlatformUserSignUpTokenRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformUserSignUpToken'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /platform/user-verifications:
    post:
      x-dash-internal: true
      security: []
      tags:
        - Users
      summary: Request verification code for sign-up
      operationId: postPlatformUserVerification
      description: >
        Request verification code needed to retrieve authentication token to
        create a [`Platform User`](#operation/postPlatformUser)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlatformUserVerificationRequest'
      responses:
        '200':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /admin/accounts/{accountId}/entities/{id}/quota-override:
    get:
      x-dash-internal: true
      tags:
        - Entity Quota Overrides
      summary: Get an EntityQuotaOverride
      operationId: getEntityQuotaOverride
      description: >
        Get the [`EntityQuotaOverride`](#tag/EntityQuotaOverride) for the
        specified entity.


        Valid entity IDs are:

        - user

        - guestUpload

        - portal

        - savedSearch

        - presetSize

        - group

        - comment

        - assetShare

        - embeddableLink

        - embeddedDataMapping

        - field

        - fieldOption

        - collection
      parameters:
        - name: accountId
          in: path
          description: The ID of the account
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: The ID of the entity
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityQuotaOverrideWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    put:
      x-dash-internal: true
      tags:
        - Entity Quota Overrides
      summary: Create or update an EntityQuotaOverride
      operationId: putEntityQuotaOverride
      description: >
        Create a [`EntityQuotaOverride`](#tag/EntityQuotaOverride) for the
        specified entity.
      parameters:
        - name: accountId
          in: path
          description: The ID of the account
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: The ID of the entity
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EntityQuotaOverrideRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EntityQuotaOverrideWithPermittedActions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /shopify-product-searches:
    post:
      x-dash-internal: true
      tags:
        - Shopify
      summary: Search for shopify products
      operationId: postProductSearches
      description: |
        Search for products from a given Shopify store
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShopifyProductSearchRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShopifyProductSearch'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /allowed-login-methods:
    put:
      x-dash-internal: true
      tags:
        - Allowed Login Methods
      summary: Update the allowed login methods
      operationId: putAllowedLoginMethods
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AllowedLoginMethods'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AllowedLoginMethods'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /account-terms-and-conditions/{id}:
    get:
      security: []
      x-dash-internal: true
      tags:
        - Terms and Conditions
      summary: Get account terms and conditions
      operationId: getAccountTermsAndConditions
      description: >
        Get an
        [`AccountTermsAndConditions`](#operation/getAccountTermsAndConditions)


        **This endpoint is unauthenticated. Do not send a Bearer Token in the
        Authorization Header**
      parameters:
        - name: id
          in: path
          description: >-
            The unique ID of the
            [`AccountTermsAndConditions`](#operation/getAccountTermsAndConditions)
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountTermsAndConditions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      x-dash-internal: true
      tags:
        - Terms and Conditions
      summary: Delete account terms and conditions
      operationId: deleteAccountTermsAndConditions
      description: >
        Delete an
        [`AccountTermsAndConditions`](#operation/getAccountTermsAndConditions)
      parameters:
        - name: id
          in: path
          description: >-
            The unique ID of the
            [`AccountTermsAndConditions`](#operation/getAccountTermsAndConditions)
          required: true
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    put:
      x-dash-internal: true
      tags:
        - Terms and Conditions
      summary: Create or update account terms and conditions
      operationId: putAccountTermsAndConditions
      description: >
        Create or update an
        [`AccountTermsAndConditions`](#operation/getAccountTermsAndConditions)
      parameters:
        - name: id
          in: path
          description: >-
            The unique ID of the
            [`AccountTermsAndConditions`](#operation/getAccountTermsAndConditions)
          required: true
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountTermsAndConditionsRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountTermsAndConditions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /account-terms-and-conditions-in-effect:
    get:
      security: []
      x-dash-internal: true
      tags:
        - Terms and Conditions
      summary: Get the account terms and conditions in effect
      operationId: getAccountTermsAndConditionsInEffect
      description: >
        Get the latest
        [`AccountTermsAndConditions`](#operation/getAccountTermsAndConditions)
        in effect


        **This endpoint is unauthenticated. Do not send a Bearer Token in the
        Authorization Header**
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountTermsAndConditions'
        4XX:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /robots.txt:
    get:
      x-dash-internal: true
      security: []
      summary: Serve robots.txt for web crawlers
      operationId: getRobotsTxt
      responses:
        '200':
          description: The robots.txt file
          content:
            text/plain:
              schema:
                type: string
                example: |
                  User-agent: *
                  Disallow: /
components:
  securitySchemes:
    bearerToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
    portalPasscode:
      type: apiKey
      name: Authorization
      in: header
      description: Prefix the value with \"Passcode \"
  schemas:
    DataType:
      type: string
      description: |
        Defines the format the data can take
        * STRING: Any format
        * DATE: Dates in the ISO date format
        * DATE_TIME: Date Times in the ISO datetime format
      enum:
        - STRING
        - DATE
        - DATE_TIME
      example: STRING
    FieldOptionSearchField:
      type: string
      enum:
        - FIELD_ID
        - PARENT_ID
        - VALUE
        - ID
        - POSITION
      example: FIELD_ID
      description: The name of the [`FieldOption`](#tag/Field-Options) property value
    Field:
      type: object
      required:
        - id
        - accountId
        - name
        - dataType
        - multiValue
        - hasFixedOptions
        - hierarchical
        - editControl
        - indestructible
        - recommended
        - browsable
      properties:
        id:
          type: string
          description: The unique ID of the [`Field`](#tag/Fields)
          example: a52b5315-15b8-417f-b742-d6902108bac1
        accountId:
          description: The unique ID of the `Account` the [`Field`](#tag/Fields) belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        name:
          type: string
          description: Human-readable name of the [`Field`](#tag/Fields)
          example: Folders
        dataType:
          $ref: '#/components/schemas/DataType'
        multiValue:
          type: boolean
          description: >
            If `true` an [`Asset`](#tag/Assets) can be assigned multiple values
            for this [`Field`](#tag/Fields).

            If `false` an [`Asset`](#tag/Assets) can only be assigned a single
            value for this [`Field`](#tag/Fields).


            e.g. An [`Asset`](#tag/Assets) can only have a single _Title_ but
            could be assigned multiple _Tags_.
          example: true
        hasFixedOptions:
          type: boolean
          description: >
            If `true` the possible values for this [`Field`](#tag/Fields) are
            taken from a fixed set.

            If `false` the possible values for this [`Field`](#tag/Fields) are
            unrestricted.


            The set of fixed values for an [`Field`](#tag/Fields) are defined by
            the [`FieldOption`](#tag/Field-Options) resource.


            If `true` the values in the [`Asset.metadata.values`](#tag/Assets)
            map reference an [`FieldOption.id`](#tag/Field-Options).

            If `false` the values in the [`Asset.metadata.values`](#tag/Assets)
            map contain the human-readable value.
          example: true
        hierarchical:
          type: boolean
          description: >
            Only applicable when [`Field.hasFixedOptions = true`](#tag/Fields).


            If `true` the fixed set possible values for the
            [`Field`](#tag/Fields) form a hierarchical tree structure.

            An optional [`FieldOption.parent`](#tag/Field-Options) specifies the
            [`FieldOption`](#tag/Field-Options) of it's parent in the tree.

            If [`FieldOption.parent = null`](#tag/Field-Options) the
            [`FieldOption`](#tag/Field-Options) sits at the root of the tree.
          example: true
        editControl:
          type: string
          description: >
            An indication of the type of edit control would be sensible to use
            to edit the [`Field`](#tag/Fields)
          enum:
            - SINGLE_LINE_TEXT
            - TEXT_AREA
            - TAGS
            - CONTROLLED_TAGS
            - DROPDOWN
            - CHECKLIST
            - FOLDER_PICKER
            - DATE_PICKER
            - DATE_TIME_PICKER
            - EXPIRY_DATE_PICKER
            - RATING
          example: FOLDER_PICKER
        indestructible:
          type: boolean
          description: >
            If `true` the [`Field`](#tag/Fields) cannot be deleted. Primarily
            used to prevent removal of an [`Field`](#tag/Fields) which is
            required by Dash.
          example: true
        recommended:
          type: boolean
          description: >
            If `true` it is recommended for assets to have a value for this
            [`Field`](#tag/Fields).

            Clients should highlight missing recommended values during creation
            and editing of assets.

            Clients can also use the `FIELD_IS_EMPTY` criterion in an
            [`AssetSearch`](#operation/postAssetSearch) to find assets with
            missing recommended values.
          example: true
        defaultSortField:
          nullable: true
          description: >-
            The sort to use when searching for
            [`FieldOption`](#tag/FieldOptions)s related to this
            [`Field`](#tag/Fields) if no sort is provided.
          $ref: '#/components/schemas/FieldOptionSearchField'
        browsable:
          type: boolean
          description: >
            If `true` assets with a value for this [`Field`](#tag/Fields) can be
            browsed in the Browse page.
          example: true
    ResourceType:
      type: string
      description: Defines the type of the resource that is being permitted to act on
      enum:
        - ACCOUNT
        - ASSET
        - ASSET_SHARES
        - ASSETS
        - ASSETS_IN_NO_FOLDERS
        - CLOUD_CONNECTION
        - CLOUD_CONNECTIONS
        - COLLECTION
        - COLLECTIONS
        - COMMENT
        - CUSTOM_TERMS_AND_CONDITIONS
        - EMAILS
        - FIELD_OPTION
        - FIELDS
        - INDESIGN_EXTENSION
        - INTELLIGENCE_SETTINGS
        - METADATA_SCHEMA
        - PORTALS
        - PRESET_SIZES
        - REFERRAL
        - SAVED_SEARCHES
        - SHOPIFY_INTEGRATION_V2
        - SUBSCRIPTION
        - THEME
        - TOP_LEVEL_FIELD_OPTIONS
        - USER_GROUPS
        - WEB_USAGE
      example: ASSET
    ActionType:
      type: string
      description: Defines the action that is being permitted
      enum:
        - ADD_ASSET_TO_COLLECTION
        - ADD_COLLABORATOR_TO_COLLECTION
        - APPROVE_ASSETS
        - CONFIGURE_SHOPIFY_INTEGRATION
        - CREATE_ASSET_SHARES
        - CREATE_ASSETS
        - CREATE_CHILD_FIELD_OPTIONS
        - CREATE_CLOUD_CONNECTIONS
        - CREATE_COLLECTIONS
        - CREATE_COLLECTION_COMMENTS
        - CREATE_COMMENTS
        - CREATE_EMBEDDABLE_LINKS
        - CREATE_PORTALS
        - CREATE_SAVED_SEARCHES
        - CREATE_SUBSCRIPTION
        - CREATE_TOP_LEVEL_FIELD_OPTIONS
        - CUSTOMISE_EMAILS
        - DELETE_ASSET
        - DELETE_CLOUD_CONNECTION
        - DELETE_COLLECTION
        - DELETE_COMMENT
        - DOWNLOAD_ASSET
        - DOWNLOAD_INDESIGN_EXTENSION
        - EDIT_ACCOUNT
        - EDIT_ASSET
        - EDIT_CLOUD_CONNECTION
        - EDIT_COLLECTION
        - EDIT_COMMENT
        - EDIT_FIELDS
        - EDIT_INTELLIGENCE_SETTINGS_ADDRESS_LOOKUP
        - EDIT_INTELLIGENCE_SETTINGS_IMAGE_AUTO_TAGGING
        - EDIT_INTELLIGENCE_SETTINGS_IMAGE_FACIAL_REC
        - EDIT_INTELLIGENCE_SETTINGS_TEXT_IN_IMAGE
        - EDIT_INTELLIGENCE_SETTINGS_VIDEO_AUTO_TAGGING
        - EDIT_INTELLIGENCE_SETTINGS_VIDEO_FACIAL_REC
        - EDIT_METADATA_SCHEMA
        - EDIT_PRESET_SIZES
        - EDIT_THEME
        - EDIT_USER_GROUPS
        - EXPORT_TO_SHOPIFY
        - IMPORT_ASSETS_OR_METADATA
        - IMPORT_FROM_CLOUD
        - MAKE_REFERRAL
        - MANAGE_CUSTOM_TERMS_AND_CONDITIONS
        - PROMOTE_ASSETS_TO_LIVE
        - PUT_ASSETS_IN_NO_FOLDER
        - REMOVE_ASSET_FROM_COLLECTION
        - REMOVE_COLLABORATOR_FROM_COLLECTION
        - RUN_NATURAL_LANGUAGE_SEARCH
        - SEARCH_FOR_VIEW
        - SET_ASSETS_LIFECYCLE_STATUS_BINNED
        - SET_ASSETS_LIFECYCLE_STATUS_LIVE
        - UPDATE_METADATA_WITH_FIELD_OPTION
        - USE_CANVA_INTEGRATION
        - USE_CLOUD_CONNECTION
        - USE_COLLECTIONS
        - USE_EMBEDDABLE_LINKS
        - VIEW_ASSET
        - VIEW_ASSET_EVENTS
        - VIEW_ASSET_FACES
        - VIEW_ASSETS_IN_NO_FOLDER
        - VIEW_CLOUD_CONNECTION
        - VIEW_COLLECTION
        - VIEW_COMMENTS
        - VIEW_WEB_USAGE
      example: VIEW_ASSET
    PermittedAction:
      type: object
      required:
        - resourceType
        - action
      properties:
        resourceType:
          $ref: '#/components/schemas/ResourceType'
        resourceId:
          type: string
          description: >-
            The ID of the resource that is being permitted to act on.  This may
            be null if the permission is on the resource type as a whole rather
            than an individual instance.
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        action:
          $ref: '#/components/schemas/ActionType'
    FieldWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/Field'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    Error:
      type: object
      properties:
        timestamp:
          type: string
          description: The datetime that the error occurred in ISO offset format
          format: date-time
          example: '2021-02-16T16:21:58.640+00:00'
        status:
          type: integer
          description: The HTTP status code of the error
          example: 401
        error:
          type: string
          description: The title of the error
          example: Unauthorized
        message:
          type: string
          description: A more detailed error message
          example: null
        path:
          type: string
          description: The path that was called which led to the error
          example: /folder-settings
    FieldRequest:
      type: object
      required:
        - name
        - dataType
        - multiValue
        - hasFixedOptions
        - hierarchical
        - editControl
        - recommended
        - browsable
      properties:
        name:
          type: string
          description: Human-readable name of the [`Field`](#tag/Fields)
          example: Folders
        dataType:
          $ref: '#/components/schemas/DataType'
        multiValue:
          type: boolean
          description: >
            If `true` an [`Asset`](#tag/Assets) can be assigned multiple values
            for this [`Field`](#tag/Fields).

            If `false` an [`Asset`](#tag/Assets) can only be assigned a single
            value for this [`Field`](#tag/Fields).


            e.g. An [`Asset`](#tag/Assets) can only have a single _Title_ but
            could be assigned multiple _Tags_.
          example: true
        hasFixedOptions:
          type: boolean
          description: >
            If `true` the possible values for this [`Field`](#tag/Fields) are
            taken from a fixed set.

            If `false` the possible values for this [`Field`](#tag/Fields) are
            unrestricted.


            The set of fixed values for an [`Field`](#tag/Fields) are defined by
            the [`FieldOption`](#tag/Field-Options) resource.


            If `true` the values in the [`Asset.metadata.values`](#tag/Assets)
            map reference an [`FieldOption.id`](#tag/Field-Options).

            If `false` the values in the [`Asset.metadata.values`](#tag/Assets)
            map contain the human-readable value.
          example: true
        hierarchical:
          type: boolean
          description: >
            Only applicable when [`Field.hasFixedOptions = true`](#tag/Fields).


            If `true` the fixed set possible values for the
            [`Field`](#tag/Fields) form a hierarchical tree structure.

            An optional [`FieldOption.parent`](#tag/Field-Options) specifies the
            [`FieldOption`](#tag/Field-Options) of it's parent in the tree.

            If [`FieldOption.parent = null`](#tag/Field-Options) the
            [`FieldOption`](#tag/Field-Options) sits at the root of the tree.
          example: true
        editControl:
          type: string
          description: >
            An indication of the type of edit control would be sensible to use
            to edit the [`Field`](#tag/Fields)
          enum:
            - SINGLE_LINE_TEXT
            - TEXT_AREA
            - TAGS
            - CONTROLLED_TAGS
            - DROPDOWN
            - CHECKLIST
            - FOLDER_PICKER
            - DATE_PICKER
            - DATE_TIME_PICKER
            - EXPIRY_DATE_PICKER
            - RATING
          example: FOLDER_PICKER
        recommended:
          type: boolean
          description: >
            If `true` it is recommended for assets to have a value for this
            [`Field`](#tag/Fields).

            Clients should highlight missing recommended values during creation
            and editing of assets.

            Clients can also use the `FIELD_IS_EMPTY` criterion in an
            [`AssetSearch`](#operation/postAssetSearch) to find assets with
            missing recommended values.
          example: true
        defaultSortField:
          nullable: true
          description: >-
            The sort to use when searching for
            [`FieldOption`](#tag/FieldOptions)s related to this
            [`Field`](#tag/Fields) if no sort is provided.
          $ref: '#/components/schemas/FieldOptionSearchField'
        browsable:
          type: boolean
          description: >
            If `true` assets with a value for this [`Field`](#tag/Fields) can be
            browsed in the Browse page.
          example: true
    NullableFieldOptionSearchFieldPatch:
      type: object
      properties:
        value:
          $ref: '#/components/schemas/FieldOptionSearchField'
    FieldPatchRequest:
      type: object
      properties:
        name:
          type: string
          nullable: true
          description: Human-readable name of the [`Field`](#tag/Fields)
          example: Folders
        recommended:
          type: boolean
          nullable: true
          description: >
            If `true` it is recommended for assets to have a value for this
            [`Field`](#tag/Fields).

            Clients should highlight missing recommended values during creation
            and editing of assets.

            Clients can also use the `FIELD_IS_EMPTY` criterion in an
            [`AssetSearch`](#operation/postAssetSearch) to find assets with
            missing recommended values.
          example: true
        defaultSortField:
          nullable: true
          description: >-
            The sort to use when searching for
            [`FieldOption`](#tag/FieldOptions)s related to this
            [`Field`](#tag/Fields) if no sort is provided.
          $ref: '#/components/schemas/NullableFieldOptionSearchFieldPatch'
        browsable:
          type: boolean
          nullable: true
          description: >-
            Whether assets with a value for this [`Field`](#tag/Fields) can be
            browsed in the Browse page. Note that this option cannot be changed
            for Folder fields or non-fixed-option fields.
          example: false
    FieldOptionRequest:
      type: object
      required:
        - fieldId
        - value
        - position
      properties:
        fieldId:
          type: string
          description: >-
            The unique ID of the [`Field`](#tag/Fields) the
            [`FieldOption`](#tag/Field-Options) should belong to
          example: a52b5315-15b8-417f-b742-d6902108bac1
        value:
          type: string
          description: The human-readable value of the [`FieldOption`](#tag/Field-Options)
          example: Folder A
        position:
          type: integer
          description: >-
            The 0-based position the [`FieldOption`](#tag/Field-Options) should
            occupy relative to the other options
          example: 2
        parentId:
          description: >-
            The [`FieldOption.id`](#tag/Field-Options) of the option above this
            one in the hierarchy
          type: string
          nullable: true
          default: null
    FieldOptionWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/FieldOption'
        permittedActions:
          type: array
          description: >
            Permitted actions for [`FieldOption`](#tag/Field-Options) resources:


            * `FIELD_OPTION` : `UPDATE_METADATA_WITH_FIELD_OPTION` - Whether the
            user can assign this [`FieldOption`](#tag/Field-Options) as a value
            in [`Asset.metadata.values`](#tag/Assets)
          items:
            $ref: '#/components/schemas/PermittedAction'
    FieldOption:
      type: object
      required:
        - id
        - value
        - fieldId
        - position
        - leaf
        - numberOfChildren
      properties:
        id:
          type: string
          description: The unique ID for the [`FieldOption`](#tag/Field-Options)
          example: 1fc6d6c3-c42d-48e2-b0db-5d680a58ca52
        value:
          type: string
          description: The human-readable value of the [`FieldOption`](#tag/Field-Options)
          example: Folder A
        fieldId:
          type: string
          description: >-
            The unique ID of the [`Field`](#tag/Fields) the
            [`FieldOption`](#tag/Field-Options) belongs to
          example: a52b5315-15b8-417f-b742-d6902108bac1
        position:
          type: integer
          description: >
            The 0-based position the [`FieldOption`](#tag/Field-Options) has in
            realtion to other options for the [`Field`](#tag/Fields).

            If [`Field.hierarchical = true`](#tag/Fields) this position related
            to other options with the same
            [`FieldOption.parent`](#tag/Field-Options).
          example: 2
        leaf:
          type: boolean
          description: >-
            When [`Field.hierarchical = true`](#tag/Fields) whether this field
            option is a leaf node i.e. has no children.
          example: true
        numberOfChildren:
          type: integer
          description: >-
            When [`Field.hierarchical = true`](#tag/Fields) the number of
            children this field option has.
          example: 0
        parent:
          type: object
          description: >-
            When [`Field.hierarchical = true`](#tag/Fields) the
            [`FieldOption`](#tag/Field-Options) that this
            [`FieldOption`](#tag/Field-Options) is a child of
          nullable: true
          allOf:
            - $ref: '#/components/schemas/FieldOptionWithPermittedActions'
    BatchItem:
      type: object
      required:
        - batchItemId
      properties:
        batchItemId:
          type: string
          description: >
            An ID provided by the caller to uniquely identify this item in the
            batch request

            This is will be used to match the relevant results in the batch
            result
          example: my-item-1
    FieldOptionBatchRequestItem:
      allOf:
        - $ref: '#/components/schemas/BatchItem'
        - $ref: '#/components/schemas/FieldOptionRequest'
    FieldOptionBatchRequest:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/FieldOptionBatchRequestItem'
    FieldOptionFailure:
      type: string
      enum:
        - OPTION_ALREADY_EXISTS_AT_THIS_LEVEL
        - PARENT_DOES_NOT_EXIST
        - FIELD_DOES_NOT_EXIST
    FieldOptionBatch:
      type: object
      required:
        - successes
        - failures
      properties:
        successes:
          type: object
          description: >-
            A map of successful results keyed on the `batchItemId` provided in
            the request
          additionalProperties:
            $ref: '#/components/schemas/FieldOptionWithPermittedActions'
        failures:
          type: object
          description: A map of failures keyed on the `batchItemId` provided in the request
          additionalProperties:
            $ref: '#/components/schemas/FieldOptionFailure'
    BasePaginatedSearchInAccountRequest:
      type: object
      required:
        - from
        - pageSize
      properties:
        from:
          description: The item number to begin the result set from
          type: integer
          example: 0
          default: 0
        pageSize:
          description: The maximum number of items to return in the result set
          type: integer
          example: 100
          default: 100
    SearchCriterion:
      type: object
      required:
        - type
      properties:
        type:
          type: string
    FieldEqualsSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - value
          properties:
            value:
              type: string
              description: The value to check equality against
              example: Folder
    FieldOptionFieldEqualsSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldEqualsSearchCriterion'
        - type: object
          required:
            - type
            - field
          properties:
            type:
              type: string
              enum:
                - FIELD_EQUALS
            field:
              $ref: '#/components/schemas/FieldOptionSearchField'
    FieldContainsSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - value
          properties:
            value:
              type: string
              description: The value to check whether the field contains
              example: older
    FieldOptionFieldContainsSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldContainsSearchCriterion'
        - type: object
          required:
            - type
            - field
          properties:
            type:
              type: string
              enum:
                - FIELD_CONTAINS
            field:
              $ref: '#/components/schemas/FieldOptionSearchField'
    FieldInSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - values
          properties:
            values:
              type: array
              items:
                type: string
              description: The values to check equality against the field values
              example:
                - this
                - that
    FieldOptionFieldInSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldInSearchCriterion'
        - type: object
          required:
            - type
            - values
          properties:
            type:
              type: string
              enum:
                - FIELD_IN
            field:
              $ref: '#/components/schemas/FieldOptionSearchField'
    FieldIsEmptySearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
    FieldOptionFieldIsEmptySearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldIsEmptySearchCriterion'
        - type: object
          required:
            - type
            - field
          properties:
            type:
              type: string
              enum:
                - FIELD_IS_EMPTY
            field:
              $ref: '#/components/schemas/FieldOptionSearchField'
    MatchAllSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - MATCH_ALL
    FieldOptionSearchCriterion:
      oneOf:
        - $ref: '#/components/schemas/FieldOptionFieldEqualsSearchCriterion'
        - $ref: '#/components/schemas/FieldOptionFieldContainsSearchCriterion'
        - $ref: '#/components/schemas/FieldOptionFieldInSearchCriterion'
        - $ref: '#/components/schemas/FieldOptionFieldIsEmptySearchCriterion'
        - $ref: '#/components/schemas/MatchAllSearchCriterion'
        - $ref: '#/components/schemas/FieldOptionAndSearchCriterion'
        - $ref: '#/components/schemas/FieldOptionOrSearchCriterion'
        - $ref: '#/components/schemas/FieldOptionNotSearchCriterion'
      discriminator:
        propertyName: type
        mapping:
          FIELD_EQUALS: '#/components/schemas/FieldOptionFieldEqualsSearchCriterion'
          FIELD_CONTAINS: '#/components/schemas/FieldOptionFieldContainsSearchCriterion'
          FIELD_IN: '#/components/schemas/FieldOptionFieldInSearchCriterion'
          FIELD_IS_EMPTY: '#/components/schemas/FieldOptionFieldIsEmptySearchCriterion'
          MATCH_ALL: '#/components/schemas/MatchAllSearchCriterion'
          AND: '#/components/schemas/FieldOptionAndSearchCriterion'
          OR: '#/components/schemas/FieldOptionOrSearchCriterion'
          NOT: '#/components/schemas/FieldOptionNotSearchCriterion'
    FieldOptionAndSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - type
            - criteria
          properties:
            type:
              type: string
              enum:
                - AND
            criteria:
              type: array
              description: The list of criteria to AND together
              items:
                $ref: '#/components/schemas/FieldOptionSearchCriterion'
    FieldOptionOrSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - type
            - criteria
          properties:
            type:
              type: string
              enum:
                - OR
            criteria:
              type: array
              description: The list of criteria to OR together
              items:
                $ref: '#/components/schemas/FieldOptionSearchCriterion'
    FieldOptionNotSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - type
            - criterion
          properties:
            type:
              type: string
              enum:
                - NOT
            criterion:
              description: The criterion to negate
              $ref: '#/components/schemas/FieldOptionSearchCriterion'
    SortOrder:
      type: string
      description: The order of the sort
      enum:
        - ASC
        - DESC
    FieldOptionSort:
      type: object
      required:
        - field
        - order
      properties:
        field:
          $ref: '#/components/schemas/FieldOptionSearchField'
        order:
          $ref: '#/components/schemas/SortOrder'
    FieldOptionSearchRequest:
      allOf:
        - $ref: '#/components/schemas/BasePaginatedSearchInAccountRequest'
        - type: object
          required:
            - criterion
            - sorts
          properties:
            criterion:
              description: The search criterion
              $ref: '#/components/schemas/FieldOptionSearchCriterion'
            sorts:
              description: Sorts to be applied to the search in order of precedence
              type: array
              items:
                $ref: '#/components/schemas/FieldOptionSort'
    FieldOptionSearch:
      type: object
      required:
        - results
        - totalResults
      properties:
        results:
          type: array
          description: >-
            The specified page of [`FieldOption`](#tag/Field-Options) resources 
            which match the search criterion
          items:
            $ref: '#/components/schemas/FieldOptionWithPermittedActions'
        totalResults:
          type: integer
          description: >-
            The total number of [`FieldOption`](#tag/Field-Options) resources
            which match the search criterion
          example: 1337
    FieldOptionImageRequest:
      type: object
      required:
        - fieldOptionId
      properties:
        fieldOptionId:
          type: string
          description: >-
            The unique ID of the [`FieldOption`](#tag/Field-Options) the
            [`FieldOptionImage`](#tag/Field-Option-Images) belongs to
          example: a52b5315-15b8-417f-b742-d6902108bac1
    FieldOptionImageBatchRequestItem:
      allOf:
        - $ref: '#/components/schemas/BatchItem'
        - $ref: '#/components/schemas/FieldOptionImageRequest'
    FieldOptionImageBatchRequest:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/FieldOptionImageBatchRequestItem'
    FieldOptionImage:
      type: object
      required:
        - accountId
        - fieldId
        - fieldOptionId
        - url
      properties:
        accountId:
          description: >-
            The ID of the `Account` the [`FieldOption`](#tag/Field-Options)
            belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        fieldId:
          description: >-
            The ID of the [`Field`](#tag/Fields) the
            [`FieldOption`](#tag/Field-Options) belongs to
          type: string
          example: 7756d388-110c-4712-b350-0b2b48e156c1
        fieldOptionId:
          description: The ID of the [`FieldOption`](#tag/Field-Options) with this image
          type: string
          example: 1fc6d6c3-c42d-48e2-b0db-5d680a58ca52
        url:
          description: The signed URL of the image
          type: string
          example: https://example.com
    FieldOptionImageWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/FieldOptionImage'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    FieldOptionImageFailure:
      type: string
      enum:
        - FIELD_OPTION_IMAGE_DOES_NOT_EXIST
    FieldOptionImageBatch:
      type: object
      required:
        - successes
        - failures
      properties:
        successes:
          type: object
          description: >-
            A map of successful results keyed on the `batchItemId` provided in
            the request
          additionalProperties:
            $ref: '#/components/schemas/FieldOptionImageWithPermittedActions'
        failures:
          type: object
          description: A map of failues keyed on the `batchItemId` provided in the request
          additionalProperties:
            $ref: '#/components/schemas/FieldOptionImageFailure'
    FieldOptionImageUploadRequest:
      type: object
      required:
        - accountId
        - fieldId
        - fieldOptionId
      properties:
        accountId:
          description: >-
            The ID of the `Account` the [`FieldOption`](#tag/Field-Options)
            belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        fieldId:
          description: >-
            The ID of the [`Field`](#tag/Fields) the
            [`FieldOption`](#tag/Field-Options) belongs to
          type: string
          example: 7756d388-110c-4712-b350-0b2b48e156c1
        fieldOptionId:
          description: >-
            The ID of the [`FieldOption`](#tag/Field-Options) you would like to
            upload an image for
          type: string
          example: 1fc6d6c3-c42d-48ue2-b0db-5d680a58ca52
    FieldOptionImageUpload:
      type: object
      required:
        - url
      properties:
        url:
          description: The URL that can be used to upload an image
          type: string
          example: https://example.com
    FieldView:
      type: object
      required:
        - id
        - accountId
        - type
        - fields
      properties:
        id:
          type: string
          description: The unique ID of the [`FieldView`](#tag/Field-Views)
          example: e9a367e4-8216-497f-b6a9-59e3b945a7f3
        accountId:
          description: The unique ID of the `Account` the [`Field`](#tag/Fields) belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        type:
          type: string
          description: The context in which to use this [`FieldView`](#tag/Field-Views)
          enum:
            - INTERNAL_SUMMARY
            - INTERNAL_DETAILED
            - EXTERNAL_SUMMARY
            - EXTERNAL_DETAILED
          example: INTERNAL_DETAILED
        fields:
          type: array
          items:
            $ref: '#/components/schemas/Field'
    FieldViewWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/FieldView'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    LifecycleStatusStaged:
      type: object
      required:
        - state
        - dateStaged
        - stagedBy
        - stagedBatchPosition
      properties:
        state:
          type: string
          enum:
            - STAGED
        dateStaged:
          type: string
          format: date-time
          description: The datetime the asset was staged in ISO datetime format
          example: '2021-02-15T09:24:01.417Z'
        stagedBy:
          type: string
          description: The ID of the [`User`](#tag/Users) who staged the asset
          example: google-oauth2|110457667287511486432
        stagedBatchPosition:
          type: number
          description: >-
            The position of the asset within the batch of assets that it was
            staged with
          example: 0
    LifecycleStatusPendingApproval:
      type: object
      required:
        - state
        - dateStaged
        - stagedBy
        - stagedBatchPosition
        - datePendingApproval
        - pendingApprovalBy
      properties:
        state:
          type: string
          enum:
            - PENDING_APPROVAL
        dateStaged:
          type: string
          format: date-time
          description: The datetime the asset was staged in ISO datetime format
          example: '2021-02-15T09:24:01.417Z'
        stagedBy:
          type: string
          description: The ID of the [`User`](#tag/Users) who staged the asset
          example: google-oauth2|110457667287511486432
        stagedBatchPosition:
          type: number
          description: >-
            The position of the asset within the batch of assets that it was
            staged with
          example: 0
        datePendingApproval:
          type: string
          format: date-time
          description: >-
            The datetime the asset was moved to pending approval in ISO datetime
            format
          example: '2021-02-15T09:24:01.417Z'
        pendingApprovalBy:
          type: string
          description: >-
            The ID of the [`User`](#tag/Users) who moved the asset to pending
            approval
          example: google-oauth2|110457667287511486432
    LifecycleStatusLive:
      type: object
      required:
        - state
        - dateStaged
        - stagedBy
        - stagedBatchPosition
        - dateLive
        - liveBy
      properties:
        state:
          type: string
          enum:
            - LIVE
        dateStaged:
          type: string
          format: date-time
          description: The datetime the asset was staged in ISO datetime format
          example: '2021-02-15T09:24:01.417Z'
        stagedBy:
          type: string
          description: The ID of the [`User`](#tag/Users) who staged the asset
          example: google-oauth2|110457667287511486432
        stagedBatchPosition:
          type: number
          description: >-
            The position of the asset within the batch of assets that it was
            staged with
          example: 0
        datePendingApproval:
          type: string
          nullable: true
          format: date-time
          description: >-
            The datetime the asset was moved to pending approval in ISO datetime
            format
          example: '2021-02-15T09:24:01.417Z'
        pendingApprovalBy:
          type: string
          nullable: true
          description: >-
            The ID of the [`User`](#tag/Users) who moved the asset to pending
            approval
          example: google-oauth2|110457667287511486432
        dateLive:
          type: string
          format: date-time
          description: The datetime the asset was moved to live in ISO datetime format
          example: '2021-02-15T09:24:01.417Z'
        liveBy:
          type: string
          description: The ID of the [`User`](#tag/Users) who moved the asset to live
          example: google-oauth2|110457667287511486432
    LifecycleStatusBinned:
      type: object
      required:
        - state
        - dateStaged
        - stagedBy
        - stagedBatchPosition
        - dateLive
        - liveBy
        - dateBinned
        - binnedBy
      properties:
        state:
          type: string
          enum:
            - BINNED
        dateStaged:
          type: string
          format: date-time
          description: The datetime the asset was staged in ISO datetime format
          example: '2021-02-15T09:24:01.417Z'
        stagedBy:
          type: string
          description: The ID of the [`User`](#tag/Users) who staged the asset
          example: google-oauth2|110457667287511486432
        stagedBatchPosition:
          type: number
          description: >-
            The position of the asset within the batch of assets that it was
            staged with
          example: 0
        datePendingApproval:
          type: string
          nullable: true
          format: date-time
          description: >-
            The datetime the asset was moved to pending approval in ISO datetime
            format
          example: '2021-02-15T09:24:01.417Z'
        pendingApprovalBy:
          type: string
          nullable: true
          description: >-
            The ID of the [`User`](#tag/Users) who moved the asset to pending
            approval
          example: google-oauth2|110457667287511486432
        dateLive:
          type: string
          format: date-time
          description: The datetime the asset was moved to live in ISO datetime format
          example: '2021-02-15T09:24:01.417Z'
        liveBy:
          type: string
          description: The ID of the [`User`](#tag/Users) who moved the asset to live
          example: google-oauth2|110457667287511486432
        dateBinned:
          type: string
          format: date-time
          description: The datetime the asset was moved to bin in ISO datetime format
          example: '2021-02-15T09:24:01.417Z'
        binnedBy:
          type: string
          description: The ID of the [`User`](#tag/Users) who moved the asset to bin
          example: google-oauth2|110457667287511486432
    LifecycleStatus:
      oneOf:
        - $ref: '#/components/schemas/LifecycleStatusStaged'
        - $ref: '#/components/schemas/LifecycleStatusPendingApproval'
        - $ref: '#/components/schemas/LifecycleStatusLive'
        - $ref: '#/components/schemas/LifecycleStatusBinned'
      discriminator:
        propertyName: state
        mapping:
          STAGED: '#/components/schemas/LifecycleStatusStaged'
          PENDING_APPROVAL: '#/components/schemas/LifecycleStatusPendingApproval'
          LIVE: '#/components/schemas/LifecycleStatusLive'
          BINNED: '#/components/schemas/LifecycleStatusBinned'
    Metadata:
      type: object
      required:
        - version
        - values
      properties:
        version:
          type: integer
          description: The current version number of the [`Asset.metadata`](#tag/Assets)
          example: 11
        values:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
            description: >
              Map of [`Field.id`](#tag/Fields) keys to `string[]` values.


              If the referenced [`Field.multiValue`](#tag/Fields) property is
              `true` then the `string[]` will contain `0-*` values.

              If the referenced [`Field.multiValue`](#tag/Fields) property is
              `false` then the `string[]` will contain `0-1` values.


              The absence of an [`Field.id`](#tag/Fields) in the map is
              equivalent to a `string[]` with `0` values. i.e. the
              [`Asset`](#tag/Assets) has no specified value for that
              [`Field`](#tag/Fields).


              If the referenced [`Field.hasFixedOptions`](#tag/Fields) property
              is `true` then each item in the `string[]` will be an
              [`FieldOption.id`](#tag/Field-Options).

              The human-readable value can then be found in the referenced
              [`FieldOption.value`](#tag/Field-Options) property.

              If the referenced [`Field.hasFixedOptions`](#tag/Fields) property
              is `false` then each item in the `string[]` will itself be a
              human-readable value.


              Clients of the API are expected to retrieve the referenced
              [`Field`](#tag/Fields) and [`FieldOption`](#tag/Field-Options)
              objects independently via the appropriate endpoints.
          example:
            a52b5315-15b8-417f-b742-d6902108bac1:
              - A view from a mountain
            f992794c-85db-11eb-8dcd-0242ac130003:
              - Outdoors
              - Mountain
              - Snow
            219bc1fa-85dc-11eb-8dcd-0242ac130003:
              - a32fe863-0a1d-4b54-990a-b094139cf81c
              - 0e1bddba-9339-4e6e-b5ae-3adc60ad927a
    FileType:
      type: string
      enum:
        - IMAGE
        - GIF
        - VIDEO
        - AUDIO
        - DOCUMENT
        - OTHER
      example: IMAGE
    Dimensions:
      type: object
      required:
        - width
        - height
      properties:
        width:
          type: integer
          description: The width in pixels
          example: 800
        height:
          type: integer
          description: The height in pixels
          example: 600
    Orientation:
      type: string
      enum:
        - PORTRAIT
        - LANDSCAPE
        - SQUARE
        - PANORAMIC_LANDSCAPE
        - PANORAMIC_PORTRAIT
      example: PORTRAIT
    OrientationTransformation:
      type: string
      nullable: true
      enum:
        - HORIZONTAL
        - MIRROR_HORIZONTAL
        - ROTATE_180
        - MIRROR_VERTICAL
        - MIRROR_HORIZONTAL_ROTATE_270
        - ROTATE_90
        - MIRROR_HORRIZONTAL_ROTATE_90
        - ROTATE_270
        - null
      example: HORIZONTAL
    MediaType:
      type: object
      required:
        - type
        - subType
      properties:
        type:
          type: string
          description: The main type of the media
          example: image
        subType:
          type: string
          description: The sub type of the media
          example: jpeg
    GpsLocation:
      type: object
      required:
        - latitude
        - longitude
      properties:
        latitude:
          type: number
          format: double
          description: The latitudinal component of the GPS location in degress
          example: 50.8256345
        longitude:
          type: number
          format: double
          description: The longitudinal component of the GPS location in degress
          example: -0.143761
    AssetFile:
      type: object
      required:
        - id
        - assetId
        - size
        - filename
        - dateAdded
        - fileType
        - usesTransparency
        - mediaType
        - previewUrl
      properties:
        id:
          type: string
          description: The unique ID for the [`AssetFile`](#operation/getAssetFiles)
          example: e2b03444-8c5d-44ed-bd9f-7eee882bdf81
        assetId:
          type: string
          description: The ID of the [`Asset`](#tag/Assets) this file belongs to
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        size:
          type: integer
          description: The size of the file in bytes
          example: 44040192
        filename:
          type: string
          description: The filename
          example: a_file.jpg
        checksum:
          type: string
          nullable: true
          description: MD5 hash of the file
          example: 120EA8A25E5D487BF68B5F7096440019
        dateAdded:
          type: string
          format: date-time
          description: >-
            The datetime the [`AssetFile`](#operation/getAssetFiles) was added
            in ISO datetime format
          example: '2021-02-15T09:26:01.417Z'
        fileType:
          $ref: '#/components/schemas/FileType'
        dimensions:
          description: The pixel dimensions of the file if applicable
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Dimensions'
        orientation:
          description: The orientation of the file
          type: string
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Orientation'
        orientationTransformation:
          description: >-
            The transformation that has been applied to the orientation of the
            file if applicable
          allOf:
            - $ref: '#/components/schemas/OrientationTransformation'
        duration:
          description: The duration of the file in seconds if applicable
          example: null
          type: integer
          nullable: true
        usesTransparency:
          type: boolean
          description: Whether the file uses transparency
          example: false
        mediaType:
          $ref: '#/components/schemas/MediaType'
        gpsLocation:
          description: The GPS location embedded within the file if there is one
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/GpsLocation'
        previewUrl:
          type: string
          description: >
            A signed URL used get previews for an
            [`AssetFile`](#operation/getAssetFiles).


            The type of preview is specified in the format
            `/[WIDTH]x[HEIGHT].EXTENSION`


            This is then appended to the *path* part of the
            [`AssetFile.previewUrl`](#operation/getAssetFiles).


            Note, the URL signature is present as a query parameter so clients
            must ensure the URL query part remains as is.


            e.g. Given an [`Asset.previewURL`](#tag/Assets) of


            `http://123.cloudfront.net/account-1/asset-1/file-1?signature=safe`


            in order to get a 100 by 200 PNG preview the modified URL would be:


            `http://123.cloudfront.net/account-1/asset-1/file-1/100x200.png?signature=safe`


            The preview is not guaranteed to be ready immediately.

            If the request to the preview URL returns a `202` accepted response
            clients will need to periodically request again until a `200`
            success response is received, and the preview is ready.

            If a `404` response is returned the requested preview cannot be
            generated for an [`AssetFile`](#operation/getAssetFiles).


            Current supported image preview extension are `jpg`, `png`, `webp`
            and `webm`.

            An image preview can be generated for most file types


            Current supported video preview extensions are `mp4`.

            A video preview can only be generated for videos.
          example: >-
            https://d7h9v39iheghu.cloudfront.net/previews/7af90a8b-7ccd-430f-a85d-e8614015bc47/e2b03444-8c5d-44ed-bd9f-7eee882bdf81?Policy=OTU0MjAwfX19XX0_&Signature=begSbvwpYg&Key-Pair-Id=APKAJXJN6VNR3OLZJ
    Stats:
      type: object
      required:
        - downloadCount
      properties:
        downloadCount:
          type: integer
          description: The number of times the asset has been downloaded
          example: 42
    ContextComments:
      type: object
      required:
        - count
      properties:
        count:
          type: integer
          description: The number of comments the asset has
          example: 4
    ContextCommentsMap:
      type: object
      description: >
        Property names: property1, property2, etc. are contextIds.


        For the given contextId, the property value is an object of comment
        properties.


        If there are no comments, then this object has no properties, eg. {}
      additionalProperties:
        $ref: '#/components/schemas/ContextComments'
    OriginGuestUpload:
      type: object
      required:
        - type
        - guestUploadId
        - temporarySessionId
      properties:
        type:
          type: string
          enum:
            - GUEST_UPLOAD
        guestUploadId:
          type: string
          description: The ID of the GuestUpload that this asset originated from
          example: 55f9964c-095d-4b8b-bb5e-4118d2e76ad0
        temporarySessionId:
          type: string
          description: The ID of the temporary session that this asset originated from
          example: 431263a2-a84a-4a35-86a1-c9a1ea435600
    Origin:
      oneOf:
        - $ref: '#/components/schemas/OriginGuestUpload'
      discriminator:
        propertyName: type
        mapping:
          GUEST_UPLOAD: '#/components/schemas/OriginGuestUpload'
    Asset:
      type: object
      required:
        - id
        - accountId
        - lifecycleStatus
        - dateLastModified
        - metadata
        - stats
        - contextComments
      properties:
        id:
          type: string
          description: The unique ID for the [`Asset`](#tag/Assets)
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        accountId:
          description: The ID of the `Account` the [`Asset`](#tag/Assets) belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        lifecycleStatus:
          $ref: '#/components/schemas/LifecycleStatus'
        dateLastModified:
          type: string
          description: The datetime the asset was modified in ISO datetime format
          example: '2021-02-17T09:24:01.417Z'
        metadata:
          $ref: '#/components/schemas/Metadata'
        currentAssetFile:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/AssetFile'
        stats:
          $ref: '#/components/schemas/Stats'
        contextComments:
          $ref: '#/components/schemas/ContextCommentsMap'
        origin:
          nullable: true
          $ref: '#/components/schemas/Origin'
    AssetWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/Asset'
        permittedActions:
          type: array
          description: >
            Permitted actions for [`Asset`](#tag/Assets) resources:


            * `ASSET` : `DELETE_ASSET` - Whether the user can delete this
            [`Asset`](#tag/Assets) resource
          items:
            $ref: '#/components/schemas/PermittedAction'
    AssetPatchRequest:
      type: object
      properties:
        currentAssetFileId:
          type: string
          nullable: true
          description: The ID of the current [`AssetFile`](#operation/getAssetFiles)
          example: e2b03444-8c5d-44ed-bd9f-7eee882bdf81
    AssetsCreationRequest:
      type: object
      required:
        - numberToCreate
      properties:
        numberToCreate:
          type: integer
          description: The number of assets to create
          example: 42
    AssetsCreation:
      type: object
      required:
        - assetIds
      properties:
        assetIds:
          type: array
          description: A list of the created asset's IDs
          example:
            - 2b746f61-d36d-4627-a547-936f6f20594b
            - 23cfaab7-c9f3-4b28-ac21-7b5b18f2519a
          items:
            type: string
    AssetsCreationWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/AssetsCreation'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    AssetUploadPartUrlRequest:
      type: object
      required:
        - partNumber
      properties:
        partNumber:
          type: integer
          description: 1-based indexing number of the part
          example: 2
        contentMd5:
          type: string
          description: The MD5 hash of the content contained within the part
          example: 86fb269d190d2c85f6e0468ceca42a20
          nullable: true
    AssetUploadPartUrlsRequest:
      type: object
      required:
        - urlRequests
      properties:
        uploadId:
          type: string
          example: 5a2481e0-819f-4b46-a7e6-143f943345f2
          description: >-
            The unique identifier of the
            [`AssetUpload`](#operation/postAssetUpload) to get URLs for.  If
            this is not provided, a new multi-part upload will be generated. 
            Therefore this only needs to be provided when not getting all upload
            URLs at once.
          nullable: true
        urlRequests:
          type: array
          items:
            $ref: '#/components/schemas/AssetUploadPartUrlRequest'
    AssetUploadDetails:
      type: object
      required:
        - path
        - size
      properties:
        path:
          type: string
          example: /Folder A/Folder D/a_file.jpg
          description: >
            The path of the file including filename and any folders. This path
            will to set the value of the [`Asset`](#tag/Assets) [Folder
            Field](#tag/Folder-Settings). Set to "/" to upload to the top-level
            in Dash.
        size:
          type: integer
          description: The size of the file that is to be uploaded (in bytes)
          example: 15318362
        partSize:
          description: >-
            Optionally specify the part size (in bytes) for multi-part uploading
            of the file. This must be less than 5368709120, and more than
            5242880 unless it is the final part. If omitted or null a default
            part size will be used.
          type: integer
          nullable: true
          example: 7000000
          maximum: 5368709120
        partUrlsRequest:
          nullable: true
          $ref: '#/components/schemas/AssetUploadPartUrlsRequest'
    AssetAndUploadBatchRequestItem:
      allOf:
        - $ref: '#/components/schemas/BatchItem'
        - $ref: '#/components/schemas/AssetUploadDetails'
    AssetAndUploadBatchRequest:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/AssetAndUploadBatchRequestItem'
    JobStepProgress:
      type: object
      required:
        - name
        - status
        - completedItems
      properties:
        name:
          type: string
          description: The name of the job step.
          example: STEP_NAME
        status:
          type: string
          enum:
            - COMPLETED
            - PENDING
            - STARTING
            - STARTED
            - STOPPING
            - STOPPED
            - FAILED
            - ABANDONED
            - UNKNOWN
          example: STARTED
        completedItems:
          type: integer
          description: The number of items that have been completed in this step so far
          example: 0
        totalItems:
          type: integer
          nullable: true
          description: The total number of items to be processed by this step if known
          example: 2
    JobProgress:
      type: object
      required:
        - steps
      properties:
        steps:
          type: array
          items:
            $ref: '#/components/schemas/JobStepProgress'
    BaseJob:
      type: object
      required:
        - id
        - accountId
        - creatorId
        - type
        - progress
      properties:
        id:
          type: string
          description: Unique identifier of the job that has been created
          example: be161977-d44e-4888-af3c-66522e223963
        accountId:
          description: The ID of the account the job is happening in
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        creatorId:
          description: The ID of the [`User`](#tag/Users) who created the job
          type: string
          example: google-oauth2|110955770826801837334
        type:
          type: string
          description: The job type
          enum:
            - IN_PROGRESS
            - COMPLETED
            - FAILED
        progress:
          $ref: '#/components/schemas/JobProgress'
    InProgressJob:
      allOf:
        - $ref: '#/components/schemas/BaseJob'
        - type: object
          required:
            - status
            - type
          properties:
            status:
              type: string
              enum:
                - PENDING
                - STARTING
                - STARTED
                - STOPPING
            type:
              type: string
              description: The job type
              enum:
                - IN_PROGRESS
    CompletedJob:
      allOf:
        - $ref: '#/components/schemas/BaseJob'
        - type: object
          required:
            - dateCompleted
            - type
          properties:
            dateCompleted:
              type: string
              format: date-time
              description: The datetime the job was completed in ISO datetime format
              example: '2021-02-15T09:24:01.417Z'
            type:
              type: string
              description: The job type
              enum:
                - COMPLETED
    AssetUploadPart:
      type: object
      properties:
        partNumber:
          type: integer
          description: 1-based indexing number of the part
          example: 2
        startByte:
          type: integer
          description: The first byte of the file chunk to upload for this upload part
          example: 1048576
        endByte:
          type: integer
          description: >-
            The last byte (inclusive) of the file chunk to upload for this
            upload part
          example: 2097151
        url:
          type: string
          description: The URL to put the file chunk to for this upload part
          example: https://fill-this-in-later.com
    AssetUpload:
      type: object
      required:
        - id
        - assetId
        - assetFileId
        - uploadParts
      properties:
        id:
          type: string
          description: >-
            The unique identifier for the
            [`AssetUpload`](#operation/postAssetUpload) to this
            [`Asset`](#tag/Assets)
          example: 5a2481e0-819f-4b46-a7e6-143f943345f2
        assetId:
          type: string
          description: >-
            The ID of the [`Asset`](#tag/Assets) the
            [`AssetUpload`](#operation/postAssetUpload) is for
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        assetFileId:
          type: string
          description: >-
            The ID of the [`AssetFile`](#operation/getAssetFiles) the
            [`AssetUpload`](#operation/postAssetUpload) is for
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        uploadParts:
          type: array
          description: A list of all the upload part destinations
          items:
            $ref: '#/components/schemas/AssetUploadPart'
    AssetAndUploadWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/AssetUpload'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    AssetUploadFailure:
      type: string
      enum:
        - ASSET_NOT_FOUND
        - ASSET_IS_BINNED
    AssetAndUploadBatch:
      type: object
      required:
        - successes
        - failures
      properties:
        successes:
          type: object
          description: >-
            A map of assets and uploads keyed on the `batchItemId` provided in
            the request
          additionalProperties:
            $ref: '#/components/schemas/AssetAndUploadWithPermittedActions'
        failures:
          type: object
          description: A map of failures keyed on the `batchItemId` provided in the request
          additionalProperties:
            $ref: '#/components/schemas/AssetUploadFailure'
    AssetAndUploadBatchCompletedJob:
      allOf:
        - $ref: '#/components/schemas/CompletedJob'
        - type: object
          required:
            - result
          properties:
            result:
              $ref: '#/components/schemas/AssetAndUploadBatch'
    FailedJob:
      allOf:
        - $ref: '#/components/schemas/BaseJob'
        - type: object
          required:
            - status
            - reason
          properties:
            type:
              type: string
              enum:
                - FAILED
            status:
              type: string
              enum:
                - STOPPED
                - FAILED
                - ABANDONED
                - UNKNOWN
            reason:
              type: object
              required:
                - code
                - message
              properties:
                code:
                  type: string
                message:
                  type: string
    AssetAndUploadBatchJob:
      oneOf:
        - $ref: '#/components/schemas/InProgressJob'
        - $ref: '#/components/schemas/AssetAndUploadBatchCompletedJob'
        - $ref: '#/components/schemas/FailedJob'
      discriminator:
        propertyName: type
        mapping:
          IN_PROGRESS: '#/components/schemas/InProgressJob'
          COMPLETED: '#/components/schemas/AssetAndUploadBatchCompletedJob'
          FAILED: '#/components/schemas/FailedJob'
    AssetUploadRequest:
      allOf:
        - type: object
          required:
            - assetId
          properties:
            assetId:
              type: string
              example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
              description: >-
                The ID of the [`Asset`](#tag/Assets) to create an
                [`AssetUpload`](#operation/postAssetUpload) for
            assetFileId:
              type: string
              nullable: true
              description: >-
                The ID of the [`AssetFile`](#operation/getAssetFiles) to create
                am asset upload for. If null, a new
                [`AssetFile`](#operation/getAssetFiles) is created.
              example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        - $ref: '#/components/schemas/AssetUploadDetails'
    AssetUploadWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/AssetUpload'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    AssetUploadBatchRequestItem:
      allOf:
        - $ref: '#/components/schemas/BatchItem'
        - $ref: '#/components/schemas/AssetUploadRequest'
    AssetUploadBatchRequest:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/AssetUploadBatchRequestItem'
    AssetUploadCompletedPart:
      type: object
      properties:
        partNumber:
          type: integer
          description: 1-based indexing number of the part
          example: 1
        eTag:
          type: string
          description: >-
            The etag of the complete part found in the etag response header of
            the successful PUT
          example: 756c75095b79a3a0c4d967d5b3fc28b6
    AssetUploadCompletionRequest:
      type: object
      properties:
        assetId:
          type: string
          description: >-
            The ID of the [`Asset`](#tag/Assets) the
            [`AssetUpload`](#operation/postAssetUpload) is for
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        uploadId:
          type: string
          description: >-
            The unique identifier for the
            [`AssetUpload`](#operation/postAssetUpload) to this
            [`Asset`](#tag/Assets)
          example: 5a2481e0-819f-4b46-a7e6-143f943345f2
        parts:
          type: array
          items:
            $ref: '#/components/schemas/AssetUploadCompletedPart'
    AssetUploadCompletionSuccess:
      type: object
      properties:
        type:
          type: string
          enum:
            - SUCCESS
          example: SUCCESS
    AssetUploadCompletionFailure:
      type: object
      properties:
        type:
          type: string
          enum:
            - FAILURE
        reason:
          type: string
          description: The reason the upload was unable to complete
          enum:
            - UPLOAD_NOT_FOUND
            - UNEXPECTED_ERROR
    AssetUploadCompletion:
      oneOf:
        - $ref: '#/components/schemas/AssetUploadCompletionSuccess'
        - $ref: '#/components/schemas/AssetUploadCompletionFailure'
      discriminator:
        propertyName: type
        mapping:
          SUCCESS: '#/components/schemas/AssetUploadCompletionSuccess'
          FAILURE: '#/components/schemas/AssetUploadCompletionFailure'
    AssetUploadCompletionWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/AssetUploadCompletion'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    AssetFileWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/AssetFile'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    CropPresetParameters:
      type: object
      required:
        - type
        - x
        - 'y'
        - width
        - height
      properties:
        type:
          type: string
          enum:
            - CROP
        x:
          type: integer
          description: The x coordinate of the top left corner of the crop
          example: 200
        'y':
          type: integer
          description: The y coordinate of the top left corner of the crop
          example: 100
        width:
          type: integer
          description: The width of the crop's bounding box
          example: 400
        height:
          type: integer
          description: The height of the crop's bounding box
          example: 300
    ConvertPresetParameters:
      type: object
      required:
        - type
        - mediaType
      properties:
        type:
          type: string
          enum:
            - CONVERT
        mediaType:
          description: The media type to convert to
          $ref: '#/components/schemas/MediaType'
    PresetParameters:
      oneOf:
        - $ref: '#/components/schemas/CropPresetParameters'
        - $ref: '#/components/schemas/ConvertPresetParameters'
      discriminator:
        propertyName: type
        mapping:
          CROP: '#/components/schemas/CropPresetParameters'
          CONVERT: '#/components/schemas/ConvertPresetParameters'
    AssetDownloadDetails:
      type: object
      required:
        - assetId
      properties:
        assetId:
          type: string
          description: The ID of the [`Asset`](#tag/Assets) to create a download for
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        assetFileId:
          type: string
          nullable: true
          description: >-
            The ID of the [`AssetFile`](#operation/getAssetFiles) to create a
            download for. If null the current
            [`AssetFile`](#operation/getAssetFiles) is used.
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        outputFilename:
          type: string
          nullable: true
          description: >
            The filename to set in the Content-Disposition response header of
            the download URL. If null the original file name is used.
        presetParameters:
          type: array
          description: PresetParameters for this `assetId`
          default: []
          items:
            $ref: '#/components/schemas/PresetParameters'
    AssetDownloadBatchRequestItem:
      allOf:
        - $ref: '#/components/schemas/BatchItem'
        - $ref: '#/components/schemas/AssetDownloadDetails'
    MatchesMediaTypesTransformationCriterion:
      type: object
      required:
        - type
        - mediaTypes
      properties:
        type:
          type: string
          enum:
            - MATCHES_MEDIA_TYPES
        mediaTypes:
          type: array
          description: Match files with these media types
          items:
            $ref: '#/components/schemas/MediaType'
    IsTransparentTransformationCriterion:
      type: object
      required:
        - type
        - isTransparent
      properties:
        type:
          type: string
          enum:
            - IS_TRANSPARENT
        isTransparent:
          type: boolean
          description: Match files with a transparency value of this
          example: true
    TransformationCriterion:
      oneOf:
        - $ref: '#/components/schemas/MatchesMediaTypesTransformationCriterion'
        - $ref: '#/components/schemas/IsTransparentTransformationCriterion'
      discriminator:
        propertyName: type
        mapping:
          MATCHES_MEDIA_TYPES: '#/components/schemas/MatchesMediaTypesTransformationCriterion'
          IS_TRANSPARENT: '#/components/schemas/IsTransparentTransformationCriterion'
    CropTransformation:
      type: object
      required:
        - type
        - x
        - 'y'
        - width
        - height
      properties:
        type:
          type: string
          enum:
            - CROP
        x:
          type: integer
          description: The x coordinate of the top left corner of the crop
          example: 200
        'y':
          type: integer
          description: The y coordinate of the top left corner of the crop
          example: 100
        width:
          type: integer
          description: The width of the crop's bounding box
          example: 400
        height:
          type: integer
          description: The height of the crop's bounding box
          example: 300
    ResizeTransformation:
      type: object
      required:
        - type
        - width
        - height
      properties:
        type:
          type: string
          enum:
            - RESIZE
        width:
          type: integer
          description: The maximum width the resized file should have
          example: 400
        height:
          type: integer
          description: The maxium height the resized file should have
          example: 300
    ConvertTransformation:
      type: object
      required:
        - type
        - mediaType
      properties:
        type:
          type: string
          enum:
            - CONVERT
        mediaType:
          description: The media type to convert to
          $ref: '#/components/schemas/MediaType'
    ConvertBitrateTransformation:
      type: object
      required:
        - type
        - videoBitRate
        - audioBitRate
        - audioSampleRate
      properties:
        type:
          type: string
          enum:
            - CONVERT_BITRATE
        videoBitRate:
          type: integer
          description: The bit rate in bits per second to convert the video to
          example: 2000
        audioBitRate:
          type: integer
          description: The bit rate in bits per second to convert the audio to
          example: 96
        audioSampleRate:
          type: integer
          description: The sample rate in hurtz to convert the audio to
          example: 48
    ClipTransformation:
      type: object
      required:
        - type
        - startTimecode
        - endTimecode
      properties:
        type:
          type: string
          enum:
            - CLIP
        startTimecode:
          type: string
          description: The timecode to start the clip from, in the format HH:MM:SS:FF
          example: '00:33:22:56'
        endTimecode:
          type: string
          description: The timecode to end the clip at, in the format HH:MM:SS:FF
          example: '00:56:33:22'
    Transformation:
      oneOf:
        - $ref: '#/components/schemas/CropTransformation'
        - $ref: '#/components/schemas/ResizeTransformation'
        - $ref: '#/components/schemas/ConvertTransformation'
        - $ref: '#/components/schemas/ConvertBitrateTransformation'
        - $ref: '#/components/schemas/ClipTransformation'
      discriminator:
        propertyName: type
        mapping:
          CROP: '#/components/schemas/CropTransformation'
          RESIZE: '#/components/schemas/ResizeTransformation'
          CONVERT: '#/components/schemas/ConvertTransformation'
          CONVERT_BITRATE: '#/components/schemas/ConvertBitrateTransformation'
          CLIP: '#/components/schemas/ClipTransformation'
    CandidateTransformation:
      type: object
      required:
        - criteria
        - transformation
      properties:
        criteria:
          type: array
          items:
            $ref: '#/components/schemas/TransformationCriterion'
        transformation:
          type: array
          items:
            $ref: '#/components/schemas/Transformation'
          default: []
    CustomTransformationDescription:
      type: object
      required:
        - type
        - candidateTransformations
      properties:
        type:
          type: string
          enum:
            - CUSTOM
        candidateTransformations:
          type: array
          items:
            $ref: '#/components/schemas/CandidateTransformation'
    PresetTransformationDescription:
      type: object
      required:
        - type
        - presetTransformationId
      properties:
        type:
          type: string
          enum:
            - PRESET
        presetTransformationId:
          type: string
          description: The ID of the preset transformation to use to transform the assets
          example: a060635d-5807-4115-a2ed-f0588d47e7ba
    TransformationDescription:
      oneOf:
        - $ref: '#/components/schemas/CustomTransformationDescription'
        - $ref: '#/components/schemas/PresetTransformationDescription'
      discriminator:
        propertyName: type
        mapping:
          CUSTOM: '#/components/schemas/CustomTransformationDescription'
          PRESET: '#/components/schemas/PresetTransformationDescription'
    AssetDownloadBatchRequest:
      type: object
      required:
        - items
        - transformationDescription
        - zip
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/AssetDownloadBatchRequestItem'
        transformationDescription:
          $ref: '#/components/schemas/TransformationDescription'
        zip:
          type: boolean
          description: Whether to combine all the output files into a zip
          example: true
    AssetDownload:
      type: object
      required:
        - url
      properties:
        url:
          type: string
    AssetDownloadWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/AssetDownload'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    AssetDownloadFailure:
      type: string
      enum:
        - ASSET_NOT_FOUND
        - ASSET_FILE_NOT_FOUND
        - ASSET_FILE_NOT_READY
        - INVALID_TRANSFORMATION
        - TRANSFORMATION_FAILED
        - COULD_NOT_ADD_TO_ZIP
    AssetDownloadBatch:
      type: object
      required:
        - successes
        - failures
      properties:
        successes:
          type: object
          description: >-
            A map of successful results keyed on the `batchItemId` provided in
            the request
          additionalProperties:
            $ref: '#/components/schemas/AssetDownloadWithPermittedActions'
        failures:
          type: object
          description: A map of failures keyed on the `batchItemId` provided in the request
          additionalProperties:
            $ref: '#/components/schemas/AssetDownloadFailure'
        zipUrl:
          type: string
          nullable: true
          description: >-
            URL to download the zip file coontaining all the succesful Asset
            Downloads (it was requested)
          example: https://zip-url-example.here
    AssetDownloadBatchCompletedJob:
      allOf:
        - $ref: '#/components/schemas/CompletedJob'
        - type: object
          required:
            - result
          properties:
            result:
              $ref: '#/components/schemas/AssetDownloadBatch'
    AssetDownloadBatchJob:
      oneOf:
        - $ref: '#/components/schemas/InProgressJob'
        - $ref: '#/components/schemas/AssetDownloadBatchCompletedJob'
        - $ref: '#/components/schemas/FailedJob'
      discriminator:
        propertyName: type
        mapping:
          IN_PROGRESS: '#/components/schemas/InProgressJob'
          COMPLETED: '#/components/schemas/AssetDownloadBatchCompletedJob'
          FAILED: '#/components/schemas/FailedJob'
    AssetSearchFieldFixed:
      type: object
      required:
        - type
        - fieldName
      properties:
        type:
          type: string
          enum:
            - FIXED
        fieldName:
          type: string
          enum:
            - STAGED_BY
            - PENDING_APPROVAL_BY
            - LIVE_BY
            - COLLECTIONS
            - DATE_LIVE
            - DATE_PENDING_APPROVAL
            - DATE_STAGED
            - DATE_LAST_MODIFIED
            - DATE_LAST_ASSET_FILE_ADDED
            - DOWNLOAD_COUNT
            - FILE_SIZE
            - FILE_TYPE
            - FILE_CHECKSUM
            - FILENAME
            - ID
            - KEYWORDS
            - KEYWORDS_WITHOUT_FILE_SEMANTIC_MEANING
            - KEYWORDS_WITH_FILE_SEMANTIC_MEANING
            - ORIENTATION
            - LIFECYCLE_STATE
            - DATE_BINNED
            - BINNED_BY
            - WIDTH
            - HEIGHT
            - ORIGIN_TEMPORARY_SESSION_ID
            - ORIGIN_GUEST_UPLOAD_ID
          example: STAGED_BY
          description: >-
            The name of the fixed [`Asset`](#tag/Assets) property value used to
            search on.
    AssetSearchFieldField:
      type: object
      required:
        - type
        - fieldId
      properties:
        type:
          type: string
          enum:
            - FIELD
        fieldId:
          type: string
          example: a52b5315-15b8-417f-b742-d6902108bac1
          description: >-
            The [`Field.id`](#tag/Fields) to which the criterion applies.  i.e.
            the [`Asset.metadata.values`](#tag/Assets) key of the map value used
            to search on.
    AssetSearchField:
      oneOf:
        - $ref: '#/components/schemas/AssetSearchFieldFixed'
        - $ref: '#/components/schemas/AssetSearchFieldField'
      discriminator:
        propertyName: type
        mapping:
          FIXED: '#/components/schemas/AssetSearchFieldFixed'
          FIELD: '#/components/schemas/AssetSearchFieldField'
    AssetFieldEqualsSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldEqualsSearchCriterion'
        - type: object
          required:
            - type
            - field
          properties:
            type:
              type: string
              enum:
                - FIELD_EQUALS
            field:
              $ref: '#/components/schemas/AssetSearchField'
            includeDescendants:
              type: boolean
              description: >-
                If the field is hierarchical, then a value of `true` will
                include assets with descendant field values, e.g. in
                sub-folders, while `false` will include only assets with the
                field value specified.
              default: true
            boost:
              type: number
              description: >-
                A floating-point value that specifies the weight of this field
                toward the relevance score. Values above 1.0 increase the
                field’s relevance. Values between 0.0 and 1.0 decrease the
                field’s relevance. Default is 1.0.
              nullable: true
              default: null
    AssetFieldHasAnyEqualSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldInSearchCriterion'
        - type: object
          required:
            - type
            - field
          properties:
            type:
              type: string
              enum:
                - FIELD_HAS_ANY_EQUAL
            field:
              $ref: '#/components/schemas/AssetSearchField'
            includeDescendants:
              type: boolean
              description: >-
                If the field is hierarchical, then a value of `true` will
                include assets with descendant field values, e.g. in
                sub-folders, while `false` will include only assets with the
                field value specified.
              default: true
            boost:
              type: number
              description: >-
                A floating-point value that specifies the weight of this field
                toward the relevance score. Values above 1.0 increase the
                field’s relevance. Values between 0.0 and 1.0 decrease the
                field’s relevance. Default is 1.0.
              nullable: true
              default: null
    AssetFieldHasAllEqualSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldInSearchCriterion'
        - type: object
          required:
            - type
            - field
          properties:
            type:
              type: string
              enum:
                - FIELD_HAS_ALL_EQUAL
            field:
              $ref: '#/components/schemas/AssetSearchField'
            includeDescendants:
              type: boolean
              description: >-
                If the field is hierarchical, then a value of `true` will
                include assets with descendant field values, e.g. in
                sub-folders, while `false` will include only assets with the
                field value specified.
              default: true
            boost:
              type: number
              description: >-
                A floating-point value that specifies the weight of this field
                toward the relevance score. Values above 1.0 increase the
                field’s relevance. Values between 0.0 and 1.0 decrease the
                field’s relevance. Default is 1.0.
              nullable: true
              default: null
    FieldMatchesSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - value
          properties:
            value:
              type: string
              description: >-
                The value to match against. Supports wildcard syntax and ranges
                in the form `[this TO that]`
              example: '*older'
    AssetFieldMatchesSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldMatchesSearchCriterion'
        - type: object
          required:
            - type
            - field
          properties:
            type:
              type: string
              enum:
                - FIELD_MATCHES
            field:
              $ref: '#/components/schemas/AssetSearchField'
            includeDescendants:
              type: boolean
              description: >-
                If the field is hierarchical, then a value of `true` will
                include assets with descendant field values, e.g. in
                sub-folders, while `false` will include only assets with the
                field value specified.
              default: true
            boost:
              type: number
              description: >-
                A floating-point value that specifies the weight of this field
                toward the relevance score. Values above 1.0 increase the
                field’s relevance. Values between 0.0 and 1.0 decrease the
                field’s relevance. Default is 1.0.
              nullable: true
              default: null
    AssetFieldIsEmptySearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldIsEmptySearchCriterion'
        - type: object
          required:
            - type
            - field
          properties:
            type:
              type: string
              enum:
                - FIELD_IS_EMPTY
            field:
              $ref: '#/components/schemas/AssetSearchField'
    AssetIsSimilarToAssetCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - type
            - assetId
          properties:
            type:
              type: string
              enum:
                - IS_SIMILAR_TO_ASSET
            assetId:
              type: string
              description: >-
                The unique ID for the [`Asset`](#tag/Assets) to look for
                conceptually similar matches of
              example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
            threshold:
              type: number
              description: >-
                Cut off point for how similar the matches have to be, with 1
                being an exact match and 0 being completely different
              example: 0.8
              nullable: true
    MatchNoneSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - MATCH_NONE
    AssetSearchCriterion:
      oneOf:
        - $ref: '#/components/schemas/AssetFieldEqualsSearchCriterion'
        - $ref: '#/components/schemas/AssetFieldHasAnyEqualSearchCriterion'
        - $ref: '#/components/schemas/AssetFieldHasAllEqualSearchCriterion'
        - $ref: '#/components/schemas/AssetFieldMatchesSearchCriterion'
        - $ref: '#/components/schemas/AssetFieldIsEmptySearchCriterion'
        - $ref: '#/components/schemas/AssetAndSearchCriterion'
        - $ref: '#/components/schemas/AssetOrSearchCriterion'
        - $ref: '#/components/schemas/AssetNotSearchCriterion'
        - $ref: '#/components/schemas/AssetIsSimilarToAssetCriterion'
        - $ref: '#/components/schemas/MatchAllSearchCriterion'
        - $ref: '#/components/schemas/MatchNoneSearchCriterion'
      discriminator:
        propertyName: type
        mapping:
          FIELD_EQUALS: '#/components/schemas/AssetFieldEqualsSearchCriterion'
          FIELD_HAS_ANY_EQUAL: '#/components/schemas/AssetFieldHasAnyEqualSearchCriterion'
          FIELD_HAS_ALL_EQUAL: '#/components/schemas/AssetFieldHasAllEqualSearchCriterion'
          FIELD_MATCHES: '#/components/schemas/AssetFieldMatchesSearchCriterion'
          FIELD_IS_EMPTY: '#/components/schemas/AssetFieldIsEmptySearchCriterion'
          IS_SIMILAR_TO_ASSET: '#/components/schemas/AssetIsSimilarToAssetCriterion'
          MATCH_ALL: '#/components/schemas/MatchAllSearchCriterion'
          MATCH_NONE: '#/components/schemas/MatchNoneSearchCriterion'
          AND: '#/components/schemas/AssetAndSearchCriterion'
          OR: '#/components/schemas/AssetOrSearchCriterion'
          NOT: '#/components/schemas/AssetNotSearchCriterion'
    AssetAndSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - type
            - criteria
          properties:
            type:
              type: string
              enum:
                - AND
            criteria:
              type: array
              description: The list of criteria to AND together
              items:
                $ref: '#/components/schemas/AssetSearchCriterion'
    AssetOrSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - type
            - criteria
          properties:
            type:
              type: string
              enum:
                - OR
            criteria:
              type: array
              description: The list of criteria to OR together
              items:
                $ref: '#/components/schemas/AssetSearchCriterion'
    AssetNotSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - type
            - criterion
          properties:
            type:
              type: string
              enum:
                - NOT
            criterion:
              description: The criterion to negate
              $ref: '#/components/schemas/AssetSearchCriterion'
    AssetSortFieldFixed:
      type: object
      required:
        - type
        - fieldName
      properties:
        type:
          type: string
          enum:
            - FIXED
        fieldName:
          type: string
          enum:
            - STAGED_BY
            - PENDING_APPROVAL_BY
            - LIVE_BY
            - DATE_LIVE
            - DATE_PENDING_APPROVAL
            - DATE_STAGED
            - DATE_LAST_MODIFIED
            - DATE_LAST_ASSET_FILE_ADDED
            - DOWNLOAD_COUNT
            - FILE_SIZE
            - FILE_TYPE
            - FILENAME
            - ID
            - ORIENTATION
            - RELEVANCE
            - LIFECYCLE_STATE
            - DATE_BINNED
            - BINNED_BY
            - STAGED_BATCH_POSITION
            - STAGED_ORDER
            - ADDED_ORDER
          example: STAGED_BY
          description: >-
            The name of the fixed [`Asset`](#tag/Assets) property value used to
            sort on.
    AssetSortFieldField:
      type: object
      required:
        - type
        - fieldId
      properties:
        type:
          type: string
          enum:
            - FIELD
        fieldId:
          type: string
          example: a52b5315-15b8-417f-b742-d6902108bac1
          description: >-
            The [`Field.id`](#tag/Fields) to which the sort applies.  i.e. the
            [`Asset.metadata.values`](#tag/Assets) key of the map value used to
            sort on.
    AssetSortField:
      oneOf:
        - $ref: '#/components/schemas/AssetSortFieldFixed'
        - $ref: '#/components/schemas/AssetSortFieldField'
      discriminator:
        propertyName: type
        mapping:
          FIXED: '#/components/schemas/AssetSortFieldFixed'
          FIELD: '#/components/schemas/AssetSortFieldField'
    AssetSort:
      type: object
      required:
        - field
        - order
      properties:
        field:
          $ref: '#/components/schemas/AssetSortField'
        order:
          $ref: '#/components/schemas/SortOrder'
    BaseAssetSearchRequest:
      type: object
      required:
        - criterion
        - sorts
      properties:
        criterion:
          description: The search criterion
          $ref: '#/components/schemas/AssetSearchCriterion'
        sorts:
          description: Sorts to be applied to the search in order of precedence
          type: array
          items:
            $ref: '#/components/schemas/AssetSort'
        action:
          type: string
          default: SEARCH_FOR_VIEW
          example: SEARCH_FOR_VIEW
          description: >-
            Specifies the context in which the search is being run. For example
            if you only want to return [`Asset`](#tag/Assets) resources that the
            search [`User`](#tag/Users) has permission to delete then set the
            `action` to be `SEARCH_FOR_DELETE`.
          enum:
            - SEARCH_FOR_CHANGE_LIFECYCLE_STATE_TO_PENDING_APPROVAL
            - SEARCH_FOR_CHANGE_LIFECYCLE_STATE_TO_LIVE
            - SEARCH_FOR_CHANGE_LIFECYCLE_STATE_TO_BINNED
            - SEARCH_FOR_DELETE
            - SEARCH_FOR_EDIT
            - SEARCH_FOR_PROMOTE_TO_LIVE
            - SEARCH_FOR_SEND_FOR_APPROVAL
            - SEARCH_FOR_VIEW
    AssetAggregationRequestInclusionOptions:
      type: object
      description: >-
        Field values to include and/or exclude in the aggregation. Exclusions
        take precedence over inclusions.
      properties:
        includeTerms:
          type: array
          description: >-
            If set, only the listed field values will be included in the
            aggregation
          items:
            type: string
        excludeTerms:
          type: array
          description: >-
            If set, all listed field values will be excluded from the
            aggregation
          items:
            type: string
    AssetTermsAggregationRequest:
      type: object
      required:
        - type
        - field
      properties:
        type:
          type: string
        field:
          $ref: '#/components/schemas/AssetSearchField'
        valueWhenMissing:
          type: string
          description: >-
            The value to assign to assets that do not have a value for the field
            that you are aggregating upon
          example: Unknown
        inclusionOptions:
          $ref: '#/components/schemas/AssetAggregationRequestInclusionOptions'
    AssetAggregationRequest:
      oneOf:
        - $ref: '#/components/schemas/AssetTermsAggregationRequest'
      discriminator:
        propertyName: type
        mapping:
          TERMS: '#/components/schemas/AssetTermsAggregationRequest'
    AssetAggregationRequestsMap:
      type: object
      properties:
        aggregations:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/AssetAggregationRequest'
          description: >-
            A map of requested aggregations. The results will be returned in a
            map with the same provided keys.
    AssetPaginatedSearchRequest:
      allOf:
        - $ref: '#/components/schemas/BasePaginatedSearchInAccountRequest'
        - $ref: '#/components/schemas/BaseAssetSearchRequest'
        - $ref: '#/components/schemas/AssetAggregationRequestsMap'
    BaseAssetSearch:
      type: object
      required:
        - results
        - totalResults
      properties:
        results:
          type: array
          description: >-
            The requested page of [`Asset`](#tag/Assets) resources which match
            the search criterion
          items:
            $ref: '#/components/schemas/AssetWithPermittedActions'
        totalResults:
          type: integer
          description: >-
            The total number of [`Asset`](#tag/Assets) resources which match the
            search criterion
          example: 1337
    AssetAggregationBucket:
      type: object
      required:
        - key
        - count
      properties:
        key:
          type: string
          description: The unique name of the bucket
          example: null
        count:
          type: integer
          description: The number of assets in the bucket
          example: 15
    AssetAggregationBucketResponse:
      type: object
      required:
        - key
        - buckets
      properties:
        type:
          type: string
        buckets:
          description: The collection of unique buckets within the requested aggregation
          type: array
          items:
            $ref: '#/components/schemas/AssetAggregationBucket'
    AssetAggregationResponse:
      oneOf:
        - $ref: '#/components/schemas/AssetAggregationBucketResponse'
      discriminator:
        propertyName: type
        mapping:
          BUCKET: '#/components/schemas/AssetAggregationBucketResponse'
    AssetAggregationResponsesMap:
      type: object
      properties:
        aggregations:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/AssetAggregationResponse'
          description: >-
            A map of the aggregations requested keyed on the keys provided by
            the user in the request.
    AssetSearch:
      allOf:
        - $ref: '#/components/schemas/BaseAssetSearch'
        - $ref: '#/components/schemas/AssetAggregationResponsesMap'
        - type: object
    BaseScrollSearchInAccountRequest:
      type: object
      properties:
        pageSize:
          description: The maximum number of items to return in the result set
          type: integer
          example: 100
          default: 100
    AssetScrollSearchRequest:
      allOf:
        - $ref: '#/components/schemas/BaseScrollSearchInAccountRequest'
        - $ref: '#/components/schemas/BaseAssetSearchRequest'
    AssetScrollSearch:
      allOf:
        - $ref: '#/components/schemas/BaseAssetSearch'
        - type: object
          required:
            - scrollId
          properties:
            scrollId:
              type: string
              example: 58b0d88b-d0c9-47fc-9038-7195b234cc0b
              description: >-
                The ID used to continue the
                [`AssetScrollSearch`](#operation/postAssetScrollSearch)
    AssetScrollSearchScrollRequest:
      type: object
      required:
        - scrollId
      properties:
        scrollId:
          type: string
          example: 58b0d88b-d0c9-47fc-9038-7195b234cc0b
          description: >-
            The ID to continue the
            [`AssetScrollSearch`](#operation/postAssetScrollSearch)
    AssetsSelectorByCriterion:
      type: object
      required:
        - type
        - criterion
      properties:
        type:
          type: string
          enum:
            - BY_CRITERION
        criterion:
          $ref: '#/components/schemas/AssetSearchCriterion'
    AssetsSelectorByIds:
      type: object
      required:
        - type
        - ids
      properties:
        type:
          type: string
          enum:
            - BY_IDS
        ids:
          type: array
          description: The list of assets ids to select
          items:
            type: string
    AssetsSelector:
      oneOf:
        - $ref: '#/components/schemas/AssetsSelectorByCriterion'
        - $ref: '#/components/schemas/AssetsSelectorByIds'
      discriminator:
        propertyName: type
        mapping:
          BY_CRITERION: '#/components/schemas/AssetsSelectorByCriterion'
          BY_IDS: '#/components/schemas/AssetsSelectorByIds'
    MetadataFieldValueUpdateOperation:
      type: string
      enum:
        - ADD
        - REMOVE
        - SET
      example: REMOVE
    MetadataFieldValueUpdateByValues:
      type: object
      required:
        - type
        - operation
        - fieldId
        - values
      properties:
        type:
          type: string
          enum:
            - BY_VALUES
        operation:
          $ref: '#/components/schemas/MetadataFieldValueUpdateOperation'
          description: >-
            What metadata value update operation this is.  ADD adds the
            specified values to the existing set of values for the field, REMOVE
            removes the specified values from the existing values, and SET
            replaces the existing values with the specified values.
        fieldId:
          type: string
          description: The unique ID of the [`Field`](#tag/Fields) to apply the update to
          example: a52b5315-15b8-417f-b742-d6902108bac1
        values:
          type: array
          description: The list of values to update the specified field with
          items:
            type: string
    MetadataFieldValueUpdateByIds:
      type: object
      required:
        - type
        - operation
        - fieldId
        - ids
      properties:
        type:
          type: string
          enum:
            - BY_IDS
        operation:
          $ref: '#/components/schemas/MetadataFieldValueUpdateOperation'
          description: >-
            What metadata value update operation this is.  ADD adds the
            specified values to the existing set of values for the field, REMOVE
            removes the specified values from the existing values, and SET
            replaces the existing values with the specified values.
        fieldId:
          type: string
          description: The unique ID of the [`Field`](#tag/Fields) to apply the update to
          example: a52b5315-15b8-417f-b742-d6902108bac1
        ids:
          type: array
          description: The list of field option ids to update the specified field with
          items:
            type: string
    MetadataFieldValueUpdate:
      oneOf:
        - $ref: '#/components/schemas/MetadataFieldValueUpdateByValues'
        - $ref: '#/components/schemas/MetadataFieldValueUpdateByIds'
      discriminator:
        propertyName: type
        mapping:
          BY_VALUES: '#/components/schemas/MetadataFieldValueUpdateByValues'
          BY_IDS: '#/components/schemas/MetadataFieldValueUpdateByIds'
    MetadataEditBatchRequest:
      type: object
      required:
        - selector
        - metadataFieldValueUpdates
      properties:
        selector:
          $ref: '#/components/schemas/AssetsSelector'
        metadataFieldValueUpdates:
          type: array
          items:
            $ref: '#/components/schemas/MetadataFieldValueUpdate'
    NoResultJob:
      oneOf:
        - $ref: '#/components/schemas/InProgressJob'
        - $ref: '#/components/schemas/CompletedJob'
        - $ref: '#/components/schemas/FailedJob'
      discriminator:
        propertyName: type
        mapping:
          IN_PROGRESS: '#/components/schemas/InProgressJob'
          COMPLETED: '#/components/schemas/CompletedJob'
          FAILED: '#/components/schemas/FailedJob'
    MetadataSuggestionBatchRequest:
      type: object
      required:
        - selector
      properties:
        selector:
          $ref: '#/components/schemas/AssetsSelector'
    MetadataSuggestion:
      type: object
      required:
        - values
      properties:
        values:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
            description: >
              Map of [`Field.id`](#tag/Fields) keys to `string[]` values.


              If the referenced [`Field.multiValue`](#tag/Fields) property is
              `true` then the `string[]` will contain `0-*` values.

              If the referenced [`Field.multiValue`](#tag/Fields) property is
              `false` then the `string[]` will contain `0-1` values.


              The absence of an [`Field.id`](#tag/Fields) in the map is
              equivalent to a `string[]` with `0` values. i.e. the
              [`Asset`](#tag/Assets) has no specified value for that
              [`Field`](#tag/Fields).


              If the referenced [`Field.hasFixedOptions`](#tag/Fields) property
              is `true` then each item in the `string[]` will be an
              [`FieldOption.id`](#tag/Field-Options).

              The human-readable value can then be found in the referenced
              [`FieldOption.value`](#tag/Field-Options) property.

              If the referenced [`Field.hasFixedOptions`](#tag/Fields) property
              is `false` then each item in the `string[]` will itself be a
              human-readable value.


              Clients of the API are expected to retrieve the referenced
              [`Field`](#tag/Fields) and [`FieldOption`](#tag/Field-Options)
              objects independently via the appropriate endpoints.
    MetadataSuggestionWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/MetadataSuggestion'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    MetadataSuggestionBatch:
      type: object
      required:
        - successes
      properties:
        successes:
          type: object
          description: A map of successful results keyed on the asset ID
          additionalProperties:
            $ref: '#/components/schemas/MetadataSuggestionWithPermittedActions'
    MetadataSuggestionCompletedJob:
      allOf:
        - $ref: '#/components/schemas/CompletedJob'
        - type: object
          required:
            - result
          properties:
            result:
              $ref: '#/components/schemas/MetadataSuggestionBatch'
    MetadataSuggestionBatchJob:
      oneOf:
        - $ref: '#/components/schemas/InProgressJob'
        - $ref: '#/components/schemas/MetadataSuggestionCompletedJob'
        - $ref: '#/components/schemas/FailedJob'
      discriminator:
        propertyName: type
        mapping:
          IN_PROGRESS: '#/components/schemas/InProgressJob'
          COMPLETED: '#/components/schemas/MetadataSuggestionCompletedJob'
          FAILED: '#/components/schemas/FailedJob'
    RejectedMetadataSuggestionRequest:
      type: object
      required:
        - assetId
        - fieldId
        - value
      properties:
        assetId:
          type: string
          description: The ID of the [`Asset`](#tag/Assets) the suggestion is for
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        fieldId:
          type: string
          description: The unique ID of the [`Field`](#tag/Fields) the suggestion is for
          example: a52b5315-15b8-417f-b742-d6902108bac1
        value:
          type: string
          description: >-
            The value that was suggested and has now been rejected.  This will
            be the ID of a [`FieldOption`](#tag/Field-Options)
          example: 1fc6d6c3-c42d-48ue2-b0db-5d680a58ca52
    RejectedMetadataSuggestionRequestItem:
      allOf:
        - $ref: '#/components/schemas/BatchItem'
        - $ref: '#/components/schemas/RejectedMetadataSuggestionRequest'
    RejectedMetadataSuggestionBatchRequest:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/RejectedMetadataSuggestionRequestItem'
    RejectedMetadataSuggestion:
      type: object
      required:
        - id
        - assetId
        - fieldId
        - value
      properties:
        id:
          type: string
          description: The unique identifier for this Rejected Metadata Suggestion
          example: 9ca10283-b2a5-44aa-93b5-376644746170
        assetId:
          type: string
          description: The ID of the [`Asset`](#tag/Assets) the suggestion is for
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        fieldId:
          type: string
          description: The unique ID of the [`Field`](#tag/Fields) the suggestion is for
          example: a52b5315-15b8-417f-b742-d6902108bac1
        value:
          type: string
          description: >-
            The value that was suggested and has now been rejected.  This will
            be the ID of a [`FieldOption`](#tag/Field-Options)
          example: 1fc6d6c3-c42d-48ue2-b0db-5d680a58ca52
    RejectedMetadataSuggestionWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/RejectedMetadataSuggestion'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    RejectedMetadataSuggestionBatch:
      type: object
      required:
        - successes
      properties:
        successes:
          type: object
          description: >-
            A map of successful results keyed on the `batchItemId` provided in
            the request
          additionalProperties:
            $ref: >-
              #/components/schemas/RejectedMetadataSuggestionWithPermittedActions
    LifecycleTransition:
      type: string
      description: The transition. Generally describe the state moving from and to.
      enum:
        - STAGED_TO_PENDING_APPROVAL
        - STAGED_TO_LIVE
        - PENDING_APPROVAL_TO_LIVE
        - LIVE_TO_BINNED
        - BINNED_TO_LIVE
    LifecycleTransitionBatchRequest:
      type: object
      properties:
        selector:
          $ref: '#/components/schemas/AssetsSelector'
        transition:
          $ref: '#/components/schemas/LifecycleTransition'
    AssetDeletionBatchRequest:
      type: object
      required:
        - selector
      properties:
        selector:
          $ref: '#/components/schemas/AssetsSelector'
    CropParameters:
      type: object
      required:
        - x
        - 'y'
        - width
        - height
      properties:
        x:
          type: integer
          description: The x coordinate of the top left corner of the crop
          example: 200
        'y':
          type: integer
          description: The y coordinate of the top left corner of the crop
          example: 100
        width:
          type: integer
          description: The width of the crop's bounding box
          example: 400
        height:
          type: integer
          description: The height of the crop's bounding box
          example: 300
    SavedCropAreaRequest:
      type: object
      required:
        - presetId
        - cropParameters
        - previewUri
      properties:
        presetId:
          type: string
          description: >-
            The unique ID for a
            [`PresetTransformation`](#tag/Preset-Transformations). It only
            applies to CropTransformation presets.
        cropParameters:
          $ref: '#/components/schemas/CropParameters'
        previewUri:
          type: string
          description: The preview of this crop area in Base64
    SavedCropAreaSummary:
      type: object
      required:
        - id
        - presetId
        - assetId
        - cropParameters
      properties:
        id:
          type: string
          description: The unique ID of the [`SavedCropArea`](#tag/Asset-Saved-Crop-Areas)
        presetId:
          type: string
          description: >-
            The unique ID for a
            [`PresetTransformation`](#tag/Preset-Transformations). It only
            applies to CropTransformation presets.
        assetId:
          type: string
          description: The unique ID for the [`Asset`](#tag/Assets)
        cropParameters:
          $ref: '#/components/schemas/CropParameters'
    SavedCropArea:
      allOf:
        - $ref: '#/components/schemas/SavedCropAreaSummary'
        - type: object
          required:
            - previewUri
          properties:
            previewUri:
              type: string
              description: The preview of this crop area in Base64
    SavedCropAreaWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/SavedCropArea'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    SavedCropAreaSummaryWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/SavedCropAreaSummary'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    ContextType:
      type: string
      enum:
        - APPROVAL
        - COLLECTION
      description: The type of context the comment is in
      example: APPROVAL
    Comment:
      type: object
      required:
        - id
        - accountId
        - userId
        - assetId
        - contextType
        - contextId
        - text
        - dateCreated
      properties:
        id:
          type: string
          description: The unique ID for the [`Comment`](#tag/Asset-Comments)
          example: 8bc23748-39e0-4dce-a48e-f71845eeeec3
        accountId:
          description: >-
            The ID of the `Account` the [`Comment`](#tag/Asset-Comments) belongs
            to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        userId:
          description: >-
            The ID of the [`User`](#tag/Users) who created this
            [`Comment`](#tag/Asset-Comments)
          type: string
          example: google-oauth2|110955770826801837334
        assetId:
          type: string
          description: >-
            The ID of the [`Asset`](#tag/Assets) this
            [`Comment`](#tag/Asset-Comments) belongs to
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        contextType:
          $ref: '#/components/schemas/ContextType'
        contextId:
          type: string
          description: >-
            Identifies which context this [`Comment`](#tag/Asset-Comments)
            should be shown in
          example: collection/a52b5315-15b8-417f-b742-d6902108bac1
        text:
          type: string
          description: The text content of the [`Comment`](#tag/Asset-Comments)
          example: This is a comment that has been left by a user, how insightful!
          maxLength: 4000
        dateCreated:
          type: string
          format: date-time
          description: >-
            The datetime the [`Comment`](#tag/Asset-Comments) was created in ISO
            datetime format
          example: '2021-02-17T09:24:01.417Z'
    CommentWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/Comment'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    CommentRequest:
      type: object
      required:
        - contextId
        - text
      properties:
        contextId:
          type: string
          description: >-
            Identifies which context this [`Comment`](#tag/Asset-Comments)
            should be shown in
          example: collection/a52b5315-15b8-417f-b742-d6902108bac1
        contextType:
          $ref: '#/components/schemas/ContextType'
        text:
          type: string
          description: The text content of the [`Comment`](#tag/Asset-Comments)
          example: This is a comment that has been left by a user, how insightful!
          maxLength: 4000
    MetadataExportResult:
      type: object
      properties:
        downloadUrl:
          type: string
          description: URL to download the CSV file containing the exported metadata
          example: https://csv-url-example.here
    MetadataExportCompletedJob:
      allOf:
        - $ref: '#/components/schemas/CompletedJob'
        - type: object
          required:
            - result
          properties:
            result:
              $ref: '#/components/schemas/MetadataExportResult'
    MetadataExportBatchJob:
      oneOf:
        - $ref: '#/components/schemas/InProgressJob'
        - $ref: '#/components/schemas/MetadataExportCompletedJob'
        - $ref: '#/components/schemas/FailedJob'
      discriminator:
        propertyName: type
        mapping:
          IN_PROGRESS: '#/components/schemas/InProgressJob'
          COMPLETED: '#/components/schemas/MetadataExportCompletedJob'
          FAILED: '#/components/schemas/FailedJob'
    JobPatchRequest:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          nullable: true
          description: The status of the job
          enum:
            - STARTED
            - STOPPED
    SavedCropAreaPatchRequest:
      type: object
      properties:
        cropParameters:
          $ref: '#/components/schemas/CropParameters'
        previewUri:
          type: string
          description: The preview of this crop area in Base64
    SavedCropAreaSummarySearchField:
      type: string
      enum:
        - PRESET_ID
        - ASSET_ID
      example: PRESET_ID
      description: >-
        The name of the
        [`SavedCropAreaSummary`](#tag/Asset-Saved-Crop-Area-Summaries) property
        value
    SavedCropAreaSummaryFieldEqualsSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldEqualsSearchCriterion'
        - type: object
          required:
            - type
            - field
          properties:
            type:
              type: string
              enum:
                - FIELD_EQUALS
            field:
              $ref: '#/components/schemas/SavedCropAreaSummarySearchField'
    SavedCropAreaSummaryFieldInSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldInSearchCriterion'
        - type: object
          required:
            - type
            - field
          properties:
            type:
              type: string
              enum:
                - FIELD_IN
            field:
              $ref: '#/components/schemas/SavedCropAreaSummarySearchField'
    SavedCropAreaSummarySearchCriterion:
      oneOf:
        - $ref: '#/components/schemas/SavedCropAreaSummaryFieldEqualsSearchCriterion'
        - $ref: '#/components/schemas/SavedCropAreaSummaryFieldInSearchCriterion'
        - $ref: '#/components/schemas/SavedCropAreaSummaryAndSearchCriterion'
      discriminator:
        propertyName: type
        mapping:
          FIELD_EQUALS: '#/components/schemas/SavedCropAreaSummaryFieldEqualsSearchCriterion'
          FIELD_IN: '#/components/schemas/SavedCropAreaSummaryFieldInSearchCriterion'
          AND: '#/components/schemas/SavedCropAreaSummaryAndSearchCriterion'
    SavedCropAreaSummaryAndSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - type
            - criteria
          properties:
            type:
              type: string
              enum:
                - AND
            criteria:
              type: array
              description: The list of criteria to AND together
              items:
                $ref: '#/components/schemas/SavedCropAreaSummarySearchCriterion'
    SavedCropAreaSummarySort:
      type: object
      required:
        - field
        - order
      properties:
        field:
          $ref: '#/components/schemas/SavedCropAreaSummarySearchField'
        order:
          $ref: '#/components/schemas/SortOrder'
    SavedCropAreaSummarySearchRequest:
      allOf:
        - $ref: '#/components/schemas/BasePaginatedSearchInAccountRequest'
        - type: object
          required:
            - criterion
            - sorts
          properties:
            criterion:
              description: The search criterion
              $ref: '#/components/schemas/SavedCropAreaSummarySearchCriterion'
            sorts:
              description: Sorts to be applied to the search in order of precedence
              type: array
              items:
                $ref: '#/components/schemas/SavedCropAreaSummarySort'
    SavedCropAreaSummarySearch:
      type: object
      required:
        - results
        - totalResults
      properties:
        results:
          type: array
          description: >-
            The specified page of
            [`SavedCropAreaSummary`](#tag/Asset-Saved-Crop-Area-Summaries)
            resources which match the search criterion
          items:
            $ref: '#/components/schemas/SavedCropAreaSummaryWithPermittedActions'
        totalResults:
          type: integer
          description: >-
            The total number of
            [`SavedCropAreaSummary`](#tag/Asset-Saved-Crop-Area-Summaries)
            resources which match the search criterion
          example: 15
    AssetPermittedActionsWithDefault:
      type: string
      enum:
        - VIEW
        - VIEW_AND_DOWNLOAD
      example: VIEW
      default: VIEW_AND_DOWNLOAD
      description: Permissions users have on assets they are viewing
    AssetShareRequest:
      type: object
      required:
        - assetIds
        - expiry
      properties:
        assetIds:
          description: The set of [`Asset`](#tag/Assets) identifiers that have been shared
          type: array
          items:
            type: string
          example:
            - 7af90a8b-7ccd-430f-a85d-e8614015bc47
            - 024e1b06-4bda-4630-a788-8063a5b9df85
        expiry:
          type: string
          nullable: true
          format: date-time
          description: >-
            The datetime the share will expire and no longer be accessible in
            ISO datetime format. If the expiry is null, the share will never
            expire.
          example: '2021-02-17T09:24:01.417Z'
        assetPermittedActions:
          $ref: '#/components/schemas/AssetPermittedActionsWithDefault'
    AdminPermissions:
      type: object
      required:
        - permissionsType
      properties:
        permissionsType:
          type: string
          enum:
            - ADMIN
    GroupRole:
      description: The role of users in this group
      type: string
      example: BASIC
      enum:
        - BASIC
        - CONTRIBUTOR
    FieldWhitelistAllOptions:
      type: object
      required:
        - fieldWhitelistType
      properties:
        fieldWhitelistType:
          type: string
          enum:
            - ALL_OPTIONS
    FieldWhitelistSpecificOptions:
      type: object
      required:
        - fieldWhitelistType
        - fieldOptionIds
      properties:
        fieldWhitelistType:
          type: string
          enum:
            - SPECIFIC_OPTIONS
        fieldOptionIds:
          description: >-
            The IDs of the [`FieldOption`](#tag/Field-Options) resources that
            are whitelisted
          type: array
          items:
            type: string
    FieldWhitelist:
      oneOf:
        - $ref: '#/components/schemas/FieldWhitelistAllOptions'
        - $ref: '#/components/schemas/FieldWhitelistSpecificOptions'
      discriminator:
        propertyName: fieldWhitelistType
        mapping:
          ALL_OPTIONS: '#/components/schemas/FieldWhitelistAllOptions'
          SPECIFIC_OPTIONS: '#/components/schemas/FieldWhitelistSpecificOptions'
    Group:
      type: object
      required:
        - id
        - accountId
        - name
        - role
        - numberOfUsers
        - fieldWhitelist
      properties:
        id:
          description: The unique ID of group
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        accountId:
          description: The unique ID of the `Account` the group belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        name:
          description: The name of the group
          type: string
          example: My Group Name
        role:
          $ref: '#/components/schemas/GroupRole'
        numberOfUsers:
          description: The number of users in the group
          example: 56
          type: integer
        fieldWhitelist:
          $ref: '#/components/schemas/FieldWhitelist'
    InGroupsPermissions:
      type: object
      required:
        - permissionsType
        - requiresUploadApproval
        - canApprove
        - groups
      properties:
        permissionsType:
          type: string
          enum:
            - IN_GROUPS
        requiresUploadApproval:
          description: Whether the [`User`](#tag/Users)'s uploads require approval
          type: boolean
          example: true
        canApprove:
          description: Whether the [`User`](#tag/Users) can approve assets
          type: boolean
          example: true
        groups:
          type: array
          items:
            $ref: '#/components/schemas/Group'
    UserPermissions:
      oneOf:
        - $ref: '#/components/schemas/AdminPermissions'
        - $ref: '#/components/schemas/InGroupsPermissions'
      discriminator:
        propertyName: permissionsType
        mapping:
          ADMIN: '#/components/schemas/AdminPermissions'
          IN_GROUPS: '#/components/schemas/InGroupsPermissions'
    ActiveAccountUser:
      type: object
      required:
        - type
        - accountId
        - id
        - email
        - permissions
      properties:
        type:
          type: string
          enum:
            - ACTIVE_ACCOUNT_USER
        accountId:
          description: The unique ID of the `Account` the [`User`](#tag/Users) belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        id:
          description: The unique ID of the [`User`](#tag/Users)
          type: string
          example: google-oauth2|110955770826801837334
        email:
          description: The email address of the [`User`](#tag/Users)
          type: string
          example: john.smith@gmail.com
        permissions:
          $ref: '#/components/schemas/UserPermissions'
        name:
          description: The full name of the user.
          type: string
          nullable: true
          example: Ken Hassleback
        firstName:
          description: The first name of the user
          type: string
          example: Ken
        lastName:
          description: The last name of the user
          type: string
          example: Hassleback
        picture:
          description: A URL for the profile picture of the user, if they have one
          example: https://example.com/john-smith-picture.jpg
          type: string
          nullable: true
        lastLogin:
          type: string
          nullable: true
          format: date-time
          description: The datetime the user last logged in, in ISO offset format
          example: '2021-02-16T16:21:58.640+00:00'
    PendingAccountUser:
      type: object
      required:
        - type
        - accountId
        - email
        - permissions
      properties:
        type:
          type: string
          enum:
            - PENDING_ACCOUNT_USER
        accountId:
          description: The unique ID of the `Account` the [`User`](#tag/Users) belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        email:
          description: The email address of the [`User`](#tag/Users)
          type: string
          example: john.smith@gmail.com
        permissions:
          $ref: '#/components/schemas/UserPermissions'
    PortalUser:
      type: object
      required:
        - type
        - accountId
        - id
      properties:
        type:
          type: string
          enum:
            - PORTAL_USER
        accountId:
          description: The unique ID of the `Account` the [`User`](#tag/Users) belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        id:
          description: The unique ID of the [`User`](#tag/Users)
          type: string
          example: google-oauth2|110955770826801837334
    ExternalAccessUser:
      type: object
      required:
        - type
        - accountId
        - id
      properties:
        type:
          type: string
          enum:
            - EXTERNAL_ACCESS_USER
        accountId:
          description: The unique ID of the `Account` the [`User`](#tag/Users) belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        id:
          description: The unique ID of the [`User`](#tag/Users)
          type: string
          example: google-oauth2|110955770826801837334
    GuestUploadUser:
      type: object
      required:
        - type
        - accountId
        - id
        - email
      properties:
        type:
          type: string
          enum:
            - GUEST_UPLOAD_USER
        accountId:
          description: The unique ID of the `Account` the [`User`](#tag/Users) belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        id:
          description: The unique ID of the [`User`](#tag/Users)
          type: string
          example: google-oauth2|110955770826801837334
        email:
          description: The email address of the [`User`](#tag/Users)
          type: string
          example: john.smith@gmail.com
    User:
      oneOf:
        - $ref: '#/components/schemas/ActiveAccountUser'
        - $ref: '#/components/schemas/PendingAccountUser'
        - $ref: '#/components/schemas/PortalUser'
        - $ref: '#/components/schemas/ExternalAccessUser'
        - $ref: '#/components/schemas/GuestUploadUser'
      discriminator:
        propertyName: type
        mapping:
          ACTIVE_ACCOUNT_USER: '#/components/schemas/ActiveAccountUser'
          PENDING_ACCOUNT_USER: '#/components/schemas/PendingAccountUser'
          PORTAL_USER: '#/components/schemas/PortalUser'
          EXTERNAL_ACCESS_USER: '#/components/schemas/ExternalAccessUser'
          GUEST_UPLOAD_USER: '#/components/schemas/GuestUploadUser'
    AssetPermittedActions:
      type: string
      enum:
        - VIEW
        - VIEW_AND_DOWNLOAD
      example: VIEW
      description: Permissions users have on assets they are viewing
    AssetShare:
      type: object
      required:
        - id
        - accountId
        - assetIds
        - expiry
        - assetPermittedActions
        - valid
      properties:
        id:
          type: string
          description: The unique ID for the [`AssetShare`](#tag/Asset-Shares)
          example: 4517a7ba-a482-4211-b97e-f4256f53fd32
        accountId:
          description: >-
            The ID of the `Account` the [`AssetShare`](#tag/Asset-Shares)
            belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        author:
          description: >-
            The details of the user who authored the share, or null if the user
            no longer exists
          nullable: true
          $ref: '#/components/schemas/User'
        assetIds:
          description: The set of [`Asset`](#tag/Assets) identifiers that have been shared
          type: array
          items:
            type: string
          example:
            - 7af90a8b-7ccd-430f-a85d-e8614015bc47
            - 024e1b06-4bda-4630-a788-8063a5b9df85
        expiry:
          type: string
          nullable: true
          format: date-time
          description: >-
            The datetime the share will expire and no longer be accessible in
            ISO datetime format. If the expiry is null, the share will never
            expire.
          example: '2021-02-17T09:24:01.417Z'
        assetPermittedActions:
          $ref: '#/components/schemas/AssetPermittedActions'
        valid:
          type: boolean
          example: true
          description: >-
            Whether the [`AssetShare`](#tag/Asset-Shares) is still
            valid/accessible
    AssetShareWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/AssetShare'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    NullableDateTimePatch:
      type: object
      properties:
        value:
          description: >-
            The new value for the datetime in ISO format, e.g.
            2021-02-17T09:24:01.417Z
          type: string
          format: date-time
          nullable: true
          example: '2021-02-17T09:24:01.417Z'
    AssetSharePatchRequest:
      type: object
      properties:
        expiry:
          $ref: '#/components/schemas/NullableDateTimePatch'
        assetPermittedActions:
          $ref: '#/components/schemas/AssetPermittedActions'
    AccessToken:
      type: object
      required:
        - accessToken
      properties:
        accessToken:
          type: string
          description: A JWT access token which can be used to access Dash
          example: >-
            eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Ik5UZzNPRFV4TkVKQk56UTVRemswTjBFNFFUTTJOVUV6TlRnNU9VVXpRakU0UmtKQlJrSXpOUSJ9.eyJodHRwczovL2Fzc2V0cGxhdGZvcm0uaW8vYWNjb3VudF9pZCI6IjE3ZmNhYzg5LWNjMmUtNGE0MC1hYTZmLWI4NWQ4MDEzMDRkMyIsImh0dHBzOi8vYXNzZXRwbGF0Zm9ybS5pby9leHRlcm5hbF9hY2Nlc3NfaWQiOiI4NjVjNjBiYi02NzA5LTQxZTAtOGI0ZS0yNTljYTk4MjkzNTEiLCJodHRwczovL2Fzc2V0cGxhdGZvcm0uaW8vZXh0ZXJuYWxfYWNjZXNzX3Jlc291cmNlX3R5cGUiOiJTSEFSRSIsImh0dHBzOi8vYXNzZXRwbGF0Zm9ybS5pby9zY29wZSI6ImFjY2VzczpleHRlcm5hbF9hY2Nlc3MiLCJodHRwczovL2Fzc2V0cGxhdGZvcm0uaW8vdGVtcG9yYXJ5X3VzZXJfaWQiOiJ0ZW1wb3JhcnktdXNlci1mb3ItZXh0ZXJuYWwtYWNjZXNzfDg2NWM2MGJiLTY3MDktNDFlMC04YjRlLTI1OWNhOTgyOTM1MXxTSEFSRXxmMDJmNTE2Mi03OTc4LTRhMzktYWZkMS0zZGU1MzY1ODlmNDkiLCJpc3MiOiJodHRwczovL2xvZ2luLmJyaWdodGRhc2hzdGFnaW5nLmFwcC8iLCJzdWIiOiJWNFhJdWN1eEx5UzFmNjVkd2RmaWRib1BLcnFFb3lkWUBjbGllbnRzIiwiYXVkIjoiaHR0cHM6Ly9hc3NldHBzdGFnaW5nLmlvIiwiaWF0IjoxNjIwMTIzMjgyLCJleHAiOjE2MjAyMDk2ODIsImF6cCI6IlY0WEl1Y3V4THlTMWY2NWR3ZGZpZGJvUEtycUVveWRZIiwiZ3R5IjoiY2xpZW50LWNyZWRlbnRpYWxzIn0.clGEEfy-8yQNQ_f4TDc0OqA8Zi5gHq_-9gKFRif69DNnhzIbgqduVnaweR6x1KJU8CgnZiDMBKEwsiZw3gs-U8XnBIzbb8ImpdhYjoKnGv520oUKAA5RiAThamj1a0jGphmnDd3cCS6uIqdkSvxziE9ktL-MLNqbNFfgvdQuCo66YDqjhaHN7bqvliqaleUSRYZOd016M_N_ya21lamSxZcVintaktyvOApuAVgTMyIrrO8VuyhWW-cmiRFYKeTWnl2_kv9s_xQyWQ_PHH92rVCgRJwbofQEko4Isj4ZhLkA2xrurCPrz6VCtD5GYUfJNUWN_HcEHFsSqSYCsGfBAg
    AccessTokenWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/AccessToken'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    AssetShareEmailRequest:
      type: object
      properties:
        assetShareId:
          type: string
          description: >-
            The unique ID for the [`AssetShare`](#tag/Asset-Shares) to be
            emailed
          example: 4517a7ba-a482-4211-b97e-f4256f53fd32
        email:
          type: string
          description: The email address to send the [`AssetShare`](#tag/Asset-Shares) to
          example: john.smith@gmail.com
    AssetShareSearchField:
      type: string
      enum:
        - CREATED_BY
      example: CREATED_BY
      description: >-
        The ID of the [`User`](#tag/Users) who created the
        [`AssetShare`](#tag/Asset-Shares)
    AssetShareFieldEqualsSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldEqualsSearchCriterion'
        - type: object
          required:
            - type
            - field
          properties:
            type:
              type: string
              enum:
                - FIELD_EQUALS
              example: FIELD_EQUALS
            field:
              $ref: '#/components/schemas/AssetShareSearchField'
    AssetShareSearchCriterion:
      oneOf:
        - $ref: '#/components/schemas/AssetShareFieldEqualsSearchCriterion'
      discriminator:
        propertyName: type
        mapping:
          FIELD_EQUALS: '#/components/schemas/AssetShareFieldEqualsSearchCriterion'
    AssetShareSortField:
      type: string
      enum:
        - ID
        - EXPIRY
      example: EXPIRY
      description: >-
        The name of the [`AssetShare`](#tag/Asset-Shares) property value, the
        default is EXPIRY
    AssetShareSort:
      type: object
      properties:
        field:
          $ref: '#/components/schemas/AssetShareSortField'
        order:
          $ref: '#/components/schemas/SortOrder'
    AssetShareSearchRequest:
      allOf:
        - $ref: '#/components/schemas/BasePaginatedSearchInAccountRequest'
        - type: object
          required:
            - criterion
          properties:
            criterion:
              description: The search criterion
              $ref: '#/components/schemas/AssetShareSearchCriterion'
            sorts:
              description: Sorts to be applied to the search in order of precedence
              type: array
              items:
                $ref: '#/components/schemas/AssetShareSort'
    AssetShareSearch:
      type: object
      required:
        - results
        - totalResults
      properties:
        results:
          type: array
          description: >-
            The specified page of [`AssetShare`](#tag/Asset-Shares) resources
            which match the search criterion
          items:
            $ref: '#/components/schemas/AssetShareWithPermittedActions'
        totalResults:
          type: integer
          description: >-
            The total number of [`AssetShare`](#tag/Asset-Shares) resources
            which match the search criterion
          example: 15
    CommentPatchRequest:
      type: object
      properties:
        text:
          type: string
          description: The text content of the [`Comment`](#tag/Asset-Comments)
          example: >-
            This is an edited comment that has been left by a user, how
            insightful!
          maxLength: 4000
    Attribution:
      type: object
      required:
        - source
      properties:
        source:
          type: string
        freeText:
          type: string
          nullable: true
    SelfReportedCompanyDescription:
      type: string
      enum:
        - SELLING_PRODUCTS
        - CREATIVE_MARKETING_AGENCY
        - NON_PROFIT
        - OTHER
        - SKIPPED
        - NEVER_ASKED
      example: SELLING_PRODUCTS
      default: SKIPPED
    Beta:
      type: string
      enum:
        - AI
      example: AI
    AccountRequest:
      type: object
      required:
        - subdomain
      properties:
        subdomain:
          description: The subdomain of the `Account`
          type: string
          example: planto
        companyName:
          description: >-
            The company name of the `Account`, if not given this will default to
            the subdomain
          type: string
          example: Planto
        trialSignUpSource:
          type: string
          nullable: true
        attribution:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Attribution'
        selfReportedCompanyDescription:
          $ref: '#/components/schemas/SelfReportedCompanyDescription'
        referrerCode:
          type: string
          nullable: true
        optInToBetas:
          type: array
          default: []
          items:
            $ref: '#/components/schemas/Beta'
    AccountPlan:
      type: string
      enum:
        - STAFF
        - STARTING
        - GROWING
        - DASHING
        - VALUE_BASED_FREE_TRIAL
        - VALUE_BASED_FREE_TRIAL_VERIFIED
        - VALUE_BASED_FREE_TRIAL_ENDED
        - VALUE_BASED_FREE_TRIAL_VERIFIED_ENDED
        - VALUE_BASED_UNVERIFIED
        - VALUE_BASED
    Account:
      type: object
      required:
        - id
        - subdomain
        - companyName
        - dateCreated
        - plan
        - selfReportedCompanyDescription
      properties:
        id:
          description: The unique ID of the `Account`
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        subdomain:
          description: The subdomain `Account`
          type: string
          example: planto
        companyName:
          description: >-
            The company name of the `Account`, defaults to subdomain if not
            given in the request
          type: string
          example: Planto
        plan:
          $ref: '#/components/schemas/AccountPlan'
        dateCreated:
          type: string
          format: date-time
          description: The datetime the `Account` was created in ISO datetime format
          example: '2021-02-17T09:24:01.417Z'
        dateExpires:
          type: string
          nullable: true
          format: date
          description: >-
            The date the `Account` expires if still in a free trial, in ISO date
            format
          example: '2021-02-27'
        trialSignUpSource:
          type: string
          nullable: true
        attribution:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/Attribution'
        selfReportedCompanyDescription:
          $ref: '#/components/schemas/SelfReportedCompanyDescription'
    AccountWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/Account'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    AccountInviteRequest:
      type: object
      required:
        - accountId
      properties:
        accountId:
          description: The ID of the account the invite request is for
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
    PubliclyAvailableAccountDataSearchField:
      type: string
      enum:
        - SUBDOMAIN
      example: SUBDOMAIN
      description: The name of the search field
    PubliclyAvailableAccountDataFieldEqualsSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldEqualsSearchCriterion'
        - type: object
          properties:
            type:
              type: string
              enum:
                - FIELD_EQUALS
            field:
              $ref: '#/components/schemas/PubliclyAvailableAccountDataSearchField'
    PubliclyAvailableAccountDataHasUsersWithEmailDomainSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - type
            - domain
          properties:
            type:
              type: string
              enum:
                - HAS_USERS_WITH_EMAIL_DOMAIN
            domain:
              type: string
              description: Check for users in the account with this email domain
              example: my-company.com
    PubliclyAvailableAccountDataSearchCriterion:
      oneOf:
        - $ref: >-
            #/components/schemas/PubliclyAvailableAccountDataFieldEqualsSearchCriterion
        - $ref: >-
            #/components/schemas/PubliclyAvailableAccountDataHasUsersWithEmailDomainSearchCriterion
      discriminator:
        propertyName: type
        mapping:
          FIELD_EQUALS: >-
            #/components/schemas/PubliclyAvailableAccountDataFieldEqualsSearchCriterion
          HAS_USERS_WITH_EMAIL_DOMAIN: >-
            #/components/schemas/PubliclyAvailableAccountDataHasUsersWithEmailDomainSearchCriterion
    PubliclyAvailableAccountDataSearchRequest:
      allOf:
        - $ref: '#/components/schemas/BasePaginatedSearchInAccountRequest'
        - type: object
          required:
            - criterion
            - sorts
          properties:
            criterion:
              description: The search criterion
              $ref: '#/components/schemas/PubliclyAvailableAccountDataSearchCriterion'
            sorts:
              description: >-
                This search does not accept any sorts, but has the sorts
                parameter anyway to fit in with other searches.  You must always
                provide an empty list for this parameter.
              type: array
              items:
                type: object
              example: []
    LoginMethod:
      type: string
      enum:
        - PASSWORD
        - GOOGLE
        - MICROSOFT
      example: PASSWORD
    PubliclyAvailableAccountData:
      type: object
      required:
        - id
        - subdomain
        - allowedLoginMethods
      properties:
        id:
          description: The unique ID of the `Account`
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        subdomain:
          description: The subdomain `Account`
          type: string
          example: planto
        accentColour:
          type: string
          nullable: true
          description: The hex code of the colour to be used to theme the account
          example: '#333666'
        logoUrl:
          type: string
          nullable: true
          description: The url of the logo for the account
          example: https://example.com
        loginImageUrl:
          type: string
          nullable: true
          description: The URL of the image to be displayed on the login screen
          example: https://example.com
        faviconUrl:
          type: string
          nullable: true
          description: The URL of the favicon for the account
          example: https://example.com
        allowedLoginMethods:
          type: array
          description: The allowed login methods for the account
          items:
            $ref: '#/components/schemas/LoginMethod'
    PubliclyAvailableAccountDataWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/PubliclyAvailableAccountData'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    PubliclyAvailableAccountDataSearch:
      type: object
      required:
        - results
        - totalResults
      properties:
        results:
          type: array
          description: >-
            The specified page of [`PubliclyAvailableAccountData`] resources
            which match the search criterion
          items:
            $ref: >-
              #/components/schemas/PubliclyAvailableAccountDataWithPermittedActions
        totalResults:
          type: integer
          description: >-
            The total number of [`PubliclyAvailableAccountData`] resources which
            match the search criterion
          example: 15
    AccountSecurity:
      type: object
      required:
        - accountId
        - mfaEnabled
      properties:
        accountId:
          description: >-
            The unique ID of the `Account` the
            [`AccountSecurity`](#tag/Account-Security) is for
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        mfaEnabled:
          type: boolean
          description: >
            Whether users of the account must configure and use multi-factor
            authentication on login
          example: true
    AccountSecurityWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/AccountSecurity'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    AccountSecurityPutRequest:
      type: object
      required:
        - mfaEnabled
      properties:
        mfaEnabled:
          type: boolean
          description: >
            Whether users of the account must configure and use multi-factor
            authentication on login
          example: true
    ReferenceImageAsset:
      type: object
      required:
        - type
        - id
      properties:
        type:
          type: string
        id:
          type: string
          description: Image prompt asset id to feed into the AI image generator
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
    ReferenceImageUploaded:
      type: object
      required:
        - type
        - key
      properties:
        type:
          type: string
        key:
          type: string
          description: >-
            Image prompt key for S3 bucket where image is held to feed into the
            AI image generator
          example: >-
            reference-image-uploads/cfb665ca-ce35-4418-b9d5-70ee815db4bd/3a26dafd-6f4d-4098-826d-ed258e789792
    ReferenceImage:
      type: object
      nullable: true
      oneOf:
        - $ref: '#/components/schemas/ReferenceImageAsset'
        - $ref: '#/components/schemas/ReferenceImageUploaded'
      discriminator:
        propertyName: type
        mapping:
          ASSET: '#/components/schemas/ReferenceImageAsset'
          UPLOADED: '#/components/schemas/ReferenceImageUploaded'
    AiImageGenerationsRequest:
      type: object
      required:
        - prompt
      properties:
        prompt:
          type: string
          description: Text prompt to feed into the AI image generator
          example: >-
            Oak table and chair set out in Wes Anderson style with green wall
            background and birch wood floor.
        referenceImage:
          $ref: '#/components/schemas/ReferenceImage'
        aspectRatio:
          type: string
          description: Aspect ratio of the output image from the AI image generator
          example: '1:1'
          enum:
            - '3:7'
            - '9:16'
            - '10:16'
            - '2:3'
            - '3:4'
            - '4:5'
            - '1:1'
            - '5:4'
            - '4:3'
            - '3:2'
            - '16:10'
            - '16:9'
            - '7:3'
          default: '1:1'
        promptUpsampling:
          type: boolean
          example: false
          default: false
        seed:
          type: integer
          nullable: true
          example: null
          default: null
        safetyTolerance:
          type: integer
          example: 2
          default: 2
        outputFormat:
          type: string
          example: png
          enum:
            - png
            - jpeg
          default: png
        numberOfImages:
          type: integer
          example: 4
          default: 4
    AiImageGenerationsResponse:
      type: object
      properties:
        result:
          type: object
          required:
            - imageUrls
          properties:
            imageUrls:
              type: array
              description: List of URLs linking to the response images
              items:
                type: string
              example:
                - https://example.com/image1.png
                - https://example.com/image2.png
                - https://example.com/image3.png
                - https://example.com/image4.png
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
          description: Actions the user is allowed to perform
    ReferenceImageUploadsResponse:
      type: object
      properties:
        result:
          type: object
          required:
            - key
            - url
          properties:
            key:
              description: The key that can be used to upload an image
              type: string
              example: 3a26dafd-6f4d-4098-826d-ed258e789792
            url:
              description: The URL that can be used to upload an image
              type: string
              example: https://example.com
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
          description: Actions the user is allowed to perform
    AutoTaggingImageSettings:
      type: object
      required:
        - accountId
        - enabled
        - confidence
      properties:
        accountId:
          description: >-
            The unique ID of the `Account` the
            [`AutoTaggingImageSettings`](#tag/Auto-Tagging-Image-Settings) is
            for
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        enabled:
          type: boolean
          description: Whether auto-tagging for images is enabled
          example: true
        confidence:
          type: number
          description: >
            A number between 1 and 100 indicating how confident Dash should be
            about a tag being applicable to an image to include it
          example: true
    AutoTaggingImageSettingsWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/AutoTaggingImageSettings'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    AutoTaggingImageSettingsPatchRequest:
      type: object
      properties:
        enabled:
          type: boolean
          nullable: true
          description: Whether auto-tagging for images is enabled
          example: true
        confidence:
          type: number
          nullable: true
          description: >
            A number between 1 and 100 indicating how confident Dash should be
            about a tag being applicable to an image to include it.
          example: 85
    TextInImageSettings:
      type: object
      required:
        - accountId
        - enabled
        - confidence
      properties:
        accountId:
          description: >-
            The unique ID of the `Account` the
            [`TextInImageSettings`](#tag/Text-In-Image-Settings) is for
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        enabled:
          type: boolean
          description: Whether text in image extraction is enabled
          example: true
        confidence:
          type: number
          description: >
            A number between 1 and 100 indicating how confident Dash should be
            about the text in the image
          example: true
    TextInImageSettingsWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/TextInImageSettings'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    TextInImageSettingsPatchRequest:
      type: object
      properties:
        enabled:
          type: boolean
          nullable: true
          description: Whether text in image extraction is enabled
          example: true
        confidence:
          type: number
          nullable: true
          description: >
            A number between 1 and 100 indicating how confident Dash should be
            about the text in the image
          example: 85
    OnboardingChecklist:
      type: object
      required:
        - accountId
        - hasCompletedInitialImport
        - hasLoggedIn
        - hasUploadedSomeFiles
        - hasAddedSomeAttributes
        - hasSignedUp
        - hasCustomisedTheme
        - hasInvitedUsers
      properties:
        accountId:
          description: >-
            The unique ID of the `Account` the
            [`OnboardingChecklist`](#tag/Onboarding-Checklist) is for
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        hasCompletedInitialImport:
          type: boolean
          example: true
        hasLoggedIn:
          type: boolean
          example: true
        hasUploadedSomeFiles:
          type: boolean
          example: true
        hasAddedSomeAttributes:
          type: boolean
          example: true
        hasSignedUp:
          type: boolean
          example: true
        hasCustomisedTheme:
          type: boolean
          example: true
        hasInvitedUsers:
          type: boolean
          example: true
    OnboardingChecklistWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/OnboardingChecklist'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    OnboardingChecklistPatchRequest:
      type: object
      properties:
        hasCompletedInitialImport:
          type: boolean
          nullable: true
          example: true
        hasLoggedIn:
          type: boolean
          nullable: true
          example: true
        hasUploadedSomeFiles:
          type: boolean
          nullable: true
          example: true
        hasAddedSomeAttributes:
          type: boolean
          nullable: true
          example: true
        hasSignedUp:
          type: boolean
          nullable: true
          example: true
        hasCustomisedTheme:
          type: boolean
          nullable: true
          example: true
        hasInvitedUsers:
          type: boolean
          nullable: true
          example: true
    BaseSearchFilter:
      type: object
      required:
        - id
        - accountId
        - adminOnly
        - allowEmpty
      properties:
        id:
          description: The unique ID of the [`SearchFilter`](#tag/Search-Filters)
          type: string
          example: 502318d9-b42e-406c-b69d-f58dc15d8fa0
        adminOnly:
          description: Whether the filter is only visible to admin users
          type: boolean
          example: true
        accountId:
          description: The ID of the account the filter belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        allowEmpty:
          description: Whether we can filter by an empty value
          type: boolean
          example: true
    FieldSearchFilter:
      allOf:
        - $ref: '#/components/schemas/BaseSearchFilter'
        - type: object
          required:
            - type
            - fieldId
          properties:
            type:
              type: string
              enum:
                - FIELD
            fieldId:
              description: The ID of the field to filter by
              type: string
              example: a52b5315-15b8-417f-b742-d6902108bac1
    HardCodedFixedOptionsSearchFilter:
      allOf:
        - $ref: '#/components/schemas/BaseSearchFilter'
        - type: object
          required:
            - type
            - searchField
            - name
            - options
          properties:
            type:
              type: string
              enum:
                - HARD_CODED_FIXED_OPTION
            searchField:
              type: string
              description: >
                The `AssetSearchField.fieldName` which should be set when
                building search criteria for this filter when
                `AssetSearchField.type = 'FIXED'`
              enum:
                - ORIENTATION
                - FILE_TYPE
            name:
              description: The human readable name of the filter
              type: string
              example: File type
            options:
              description: A list of all the available options
              type: array
              items:
                type: string
              example:
                - Image
                - Video
                - GIF
                - Audio
                - Document
                - Other
    HardCodedFreeOptionsSearchFilter:
      allOf:
        - $ref: '#/components/schemas/BaseSearchFilter'
        - type: object
          required:
            - type
            - searchField
            - name
            - dataType
          properties:
            type:
              type: string
              enum:
                - HARD_CODED_FREE_OPTION
            searchField:
              type: string
              description: >
                The `AssetSearchField.fieldName` which should be set when
                building search criteria for this filter when
                `AssetSearchField.type = 'FIXED'`
              enum:
                - DATE_LIVE
            name:
              description: The human-readable name of the filter
              type: string
              example: Date Added
            dataType:
              $ref: '#/components/schemas/DataType'
    UserSearchField:
      type: string
      enum:
        - IS_ADMIN
        - EMAIL
        - ID
        - TYPE
        - NAME
      example: IS_ADMIN
      description: The name of the [`User`](#tag/Users) resource property value
    UserFieldEqualsSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldEqualsSearchCriterion'
        - type: object
          required:
            - type
            - field
          properties:
            type:
              type: string
              enum:
                - FIELD_EQUALS
            field:
              $ref: '#/components/schemas/UserSearchField'
    UserFieldMatchesSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldMatchesSearchCriterion'
        - type: object
          required:
            - type
            - field
          properties:
            type:
              type: string
              enum:
                - FIELD_MATCHES
            field:
              $ref: '#/components/schemas/UserSearchField'
    UserSearchCriterion:
      oneOf:
        - $ref: '#/components/schemas/MatchAllSearchCriterion'
        - $ref: '#/components/schemas/UserFieldEqualsSearchCriterion'
        - $ref: '#/components/schemas/UserFieldMatchesSearchCriterion'
        - $ref: '#/components/schemas/UserOrSearchCriterion'
        - $ref: '#/components/schemas/UserAndSearchCriterion'
        - $ref: '#/components/schemas/UserNotSearchCriterion'
        - $ref: '#/components/schemas/UserInGroupWhereFieldEqualsSearchCriterion'
        - $ref: '#/components/schemas/UserCanUploadSearchCriterion'
        - $ref: '#/components/schemas/UserFieldInSearchCriterion'
      discriminator:
        propertyName: type
        mapping:
          MATCH_ALL: '#/components/schemas/MatchAllSearchCriterion'
          FIELD_EQUALS: '#/components/schemas/UserFieldEqualsSearchCriterion'
          FIELD_MATCHES: '#/components/schemas/UserFieldMatchesSearchCriterion'
          OR: '#/components/schemas/UserOrSearchCriterion'
          AND: '#/components/schemas/UserAndSearchCriterion'
          NOT: '#/components/schemas/UserNotSearchCriterion'
          IN_GROUP_WHERE_FIELD_EQUALS: '#/components/schemas/UserInGroupWhereFieldEqualsSearchCriterion'
          CAN_UPLOAD: '#/components/schemas/UserCanUploadSearchCriterion'
          FIELD_IN: '#/components/schemas/UserFieldInSearchCriterion'
    UserOrSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - type
            - criteria
          properties:
            type:
              type: string
              enum:
                - OR
            criteria:
              type: array
              description: The list of criteria to OR together
              items:
                $ref: '#/components/schemas/UserSearchCriterion'
    UserAndSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - type
            - criteria
          properties:
            type:
              type: string
              enum:
                - AND
            criteria:
              type: array
              description: The list of criteria to AND together
              items:
                $ref: '#/components/schemas/UserSearchCriterion'
    UserNotSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - type
            - criterion
          properties:
            type:
              type: string
              enum:
                - NOT
            criterion:
              $ref: '#/components/schemas/UserSearchCriterion'
    UserGroupSearchField:
      type: string
      enum:
        - ROLE
      example: ROLE
      description: The name of the `UserGroup` resource property value
    UserInGroupWhereFieldEqualsSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldEqualsSearchCriterion'
        - type: object
          required:
            - type
            - field
          properties:
            type:
              type: string
              enum:
                - IN_GROUP_WHERE_FIELD_EQUALS
            field:
              $ref: '#/components/schemas/UserGroupSearchField'
    UserCanUploadSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - CAN_UPLOAD
    UserFieldInSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldInSearchCriterion'
        - type: object
          required:
            - type
            - field
          properties:
            type:
              type: string
              enum:
                - FIELD_IN
            field:
              $ref: '#/components/schemas/UserSearchField'
    HardCodedUserSearchFilter:
      allOf:
        - $ref: '#/components/schemas/BaseSearchFilter'
        - type: object
          required:
            - type
            - searchField
            - name
            - userSearchCriterion
          properties:
            type:
              type: string
              enum:
                - HARD_CODED_USER
            searchField:
              type: string
              description: >
                The `AssetSearchField.fieldName` which should be set when
                building search criteria for this filter when
                `AssetSearchField.type = 'FIXED'`
              enum:
                - STAGED_BY
            name:
              description: The human-readable name of the filter
              type: string
              example: Date Added
            userSearchCriterion:
              $ref: '#/components/schemas/UserSearchCriterion'
    HardCodedFreeOptionDimensionsSearchFilter:
      allOf:
        - $ref: '#/components/schemas/BaseSearchFilter'
        - type: object
          required:
            - type
            - name
            - searchFieldForWidth
            - searchFieldForHeight
          properties:
            type:
              type: string
              enum:
                - HARD_CODED_FREE_OPTION_DIMENSION
            name:
              description: The human-readable name of the filter
              type: string
              example: Dimension
            searchFieldForWidth:
              type: string
              description: The `AssetSearchField.fieldName` to use for this filter.
              enum:
                - WIDTH
            searchFieldForHeight:
              type: string
              description: The `AssetSearchField.fieldName` to use for this filter.
              enum:
                - HEIGHT
    SearchFilter:
      oneOf:
        - $ref: '#/components/schemas/FieldSearchFilter'
        - $ref: '#/components/schemas/HardCodedFixedOptionsSearchFilter'
        - $ref: '#/components/schemas/HardCodedFreeOptionsSearchFilter'
        - $ref: '#/components/schemas/HardCodedUserSearchFilter'
        - $ref: '#/components/schemas/HardCodedFreeOptionDimensionsSearchFilter'
      discriminator:
        propertyName: type
        mapping:
          FIELD: '#/components/schemas/FieldSearchFilter'
          HARD_CODED_FIXED_OPTION: '#/components/schemas/HardCodedFixedOptionsSearchFilter'
          HARD_CODED_FREE_OPTION: '#/components/schemas/HardCodedFreeOptionsSearchFilter'
          HARD_CODED_USER: '#/components/schemas/HardCodedUserSearchFilter'
          HARD_CODED_FREE_OPTION_DIMENSION: '#/components/schemas/HardCodedFreeOptionDimensionsSearchFilter'
    SearchFilterWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/SearchFilter'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    SearchFilterView:
      type: object
      required:
        - accountId
        - searchFilters
      properties:
        accountId:
          description: The ID of the `Account` the filter belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        searchFilters:
          type: array
          items:
            $ref: '#/components/schemas/SearchFilter'
    SearchFilterViewWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/SearchFilterView'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    SearchFilterViewSearchFilterRequest:
      type: object
      required:
        - searchFilterId
        - position
      properties:
        searchFilterId:
          type: string
          description: Unique ID of the [`SearchFilter`](#tag/Search-Filters)
          example: 4cb261ad-dffb-414e-89cf-6902e3031d44
        position:
          type: number
          description: >-
            The zero-based display position of this
            [`SearchFilter`](#tag/Search-Filters) within the search filter view
          example: 0
    SearchFilterViewSearchFilterPatchRequest:
      type: object
      properties:
        position:
          type: number
          nullable: true
          description: >-
            The zero-based display position of this
            [`SearchFilter`](#tag/Search-Filters) within the search filter view
          example: 0
    FolderSettings:
      type: object
      required:
        - accountId
        - fieldId
      properties:
        accountId:
          description: The ID of the account the field belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        fieldId:
          description: The ID of the field which represents folders for this account
          type: string
          example: 7756d388-110c-4712-b350-0b2b48e156c1
    FolderSettingsWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/FolderSettings'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    ShopifySkuSettings:
      type: object
      required:
        - fieldId
      properties:
        fieldId:
          description: The ID of the field which should be used to match SKUs in Shopify
          type: string
          example: 7756d388-110c-4712-b350-0b2b48e156c1
    ShopifySkuSettingsWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/ShopifySkuSettings'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    ShopifySkuSettingsRequest:
      type: object
      required:
        - fieldId
      properties:
        fieldId:
          description: The ID of the field which should be used to match SKUs in Shopify
          type: string
          example: 7756d388-110c-4712-b350-0b2b48e156c1
    Theme:
      type: object
      required:
        - showRecentlyAddedAssets
      properties:
        accentColour:
          type: string
          nullable: true
          description: The hex code of the colour to be used to theme the account
          example: '#333666'
        logoUrl:
          type: string
          nullable: true
          description: The url of the logo for the account
          example: https://example.com
        loginImageUrl:
          type: string
          nullable: true
          description: The URL of the image to be displayed on the login screen
          example: https://example.com
        faviconUrl:
          type: string
          nullable: true
          description: The URL of the favicon for the account
          example: https://example.com
        homepageImageUrl:
          type: string
          nullable: true
          description: The URL of the image to be displayed on the homepage
          example: https://example.com
        showRecentlyAddedAssets:
          type: boolean
          description: >-
            Whether to include a preview of recently added assets on the
            homepage
          example: true
        contextType:
          type: string
          enum:
            - PORTAL
            - ACCOUNT
          description: The type of context the theme applies in
          example: ACCOUNT
        contextId:
          type: string
          description: The identifier of the context the theme applies in
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
    ThemeWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/Theme'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    NullableStringFieldPatch:
      type: object
      properties:
        value:
          description: The new value for the field
          type: string
          nullable: true
          example: example value
    ThemePatchRequest:
      type: object
      properties:
        accentColour:
          $ref: '#/components/schemas/NullableStringFieldPatch'
          description: The hex code of the colour to be used to theme the account
          example: '#333666'
        showRecentlyAddedAssets:
          type: boolean
          nullable: true
          description: >-
            Whether to include a preview of recently added assets on the
            homepage
          example: true
    ThemeImageType:
      type: string
      enum:
        - FAVICON
        - LOGO
        - HOMEPAGE_IMAGE
        - LOGIN_IMAGE
      example: FAVICON
    ThemeImageUploadRequest:
      type: object
      required:
        - themeImageType
      properties:
        themeImageType:
          $ref: '#/components/schemas/ThemeImageType'
          description: The type of theme image to create an upload object for
    ThemeImageUpload:
      type: object
      required:
        - url
      properties:
        url:
          description: The URL that can be used to upload an image
          type: string
          example: https://example.com
    ThemeSearchField:
      type: string
      enum:
        - SUBDOMAIN
        - CONTEXT_TYPE
        - CONTEXT_ID
      example: SUBDOMAIN
      description: The name of the [`Theme`](#tag/Theme) search field
    ThemeFieldEqualsSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldEqualsSearchCriterion'
        - type: object
          properties:
            field:
              $ref: '#/components/schemas/ThemeSearchField'
    ThemeSearchCriterion:
      oneOf:
        - $ref: '#/components/schemas/ThemeFieldEqualsSearchCriterion'
        - $ref: '#/components/schemas/ThemeAndSearchCriterion'
      discriminator:
        propertyName: type
        mapping:
          FIELD_EQUALS: '#/components/schemas/ThemeFieldEqualsSearchCriterion'
          AND: '#/components/schemas/ThemeAndSearchCriterion'
    ThemeAndSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - type
            - criteria
          properties:
            type:
              type: string
              enum:
                - AND
            criteria:
              type: array
              description: The list of criteria to AND together
              items:
                $ref: '#/components/schemas/ThemeSearchCriterion'
    ThemeSearchRequest:
      allOf:
        - $ref: '#/components/schemas/BasePaginatedSearchInAccountRequest'
        - type: object
          required:
            - criterion
            - sorts
          properties:
            criterion:
              description: The search criterion
              $ref: '#/components/schemas/ThemeSearchCriterion'
            sorts:
              description: >-
                This search does not accept any sorts, but has the sorts
                parameter anyway to fit in with other searches.  You must always
                provide an empty list for this parameter.
              type: array
              items:
                type: object
              example: []
    ThemeSearch:
      type: object
      required:
        - results
        - totalResults
      properties:
        results:
          type: array
          description: >-
            The specified page of [`Theme`](#tag/Theme) resources which match
            the search criterion
          items:
            $ref: '#/components/schemas/ThemeWithPermittedActions'
        totalResults:
          type: integer
          description: >-
            The total number of [`Theme`](#tag/Theme) resources which match the
            search criterion
          example: 15
    AdminUserRequest:
      type: object
      required:
        - type
        - email
      properties:
        type:
          type: string
          enum:
            - ADMIN
        email:
          description: The email address of the [`User`](#tag/Users)
          type: string
          example: john.smith@gmail.com
        welcomeMessage:
          type: string
          description: >-
            An optional welcome message included in the [`User`](#tag/Users)
            user invite email
          default: >-
            You have been invited to join Dash — a tool for managing images,
            videos and more.
    InGroupsUserRequest:
      type: object
      required:
        - type
        - email
        - requiresUploadApproval
        - canApprove
        - groupIds
      properties:
        type:
          type: string
          enum:
            - IN_GROUPS
        email:
          description: The email address of the [`User`](#tag/Users)
          type: string
          example: john.smith@gmail.com
        requiresUploadApproval:
          description: Whether the [`User`](#tag/Users)'s uploads require approval
          type: boolean
          example: true
        canApprove:
          description: Whether the [`User`](#tag/Users) can approve assets
          type: boolean
          example: true
        groupIds:
          type: array
          description: The IDs of the groups that this user should belong to
          items:
            type: string
        welcomeMessage:
          type: string
          description: >-
            An optional welcome message included in the [`User`](#tag/Users)
            user invite email
          default: >-
            You have been invited to join Dash — a tool for managing images,
            videos and more.
    UserRequest:
      oneOf:
        - $ref: '#/components/schemas/AdminUserRequest'
        - $ref: '#/components/schemas/InGroupsUserRequest'
      discriminator:
        propertyName: type
        mapping:
          ADMIN: '#/components/schemas/AdminUserRequest'
          IN_GROUPS: '#/components/schemas/InGroupsUserRequest'
    AccountUser:
      oneOf:
        - $ref: '#/components/schemas/ActiveAccountUser'
        - $ref: '#/components/schemas/PendingAccountUser'
      discriminator:
        propertyName: type
        mapping:
          ACTIVE_ACCOUNT_USER: '#/components/schemas/ActiveAccountUser'
          PENDING_ACCOUNT_USER: '#/components/schemas/PendingAccountUser'
    AccountUserWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/AccountUser'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    UserWithNoPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/User'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    AdminUserPatchRequest:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - ADMIN
    InGroupsUserPatchRequest:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - IN_GROUPS
        requiresUploadApproval:
          description: Whether the [`User`](#tag/Users)'s uploads require approval
          type: boolean
          nullable: true
          example: true
        canApprove:
          description: Whether the [`User`](#tag/Users) can approve assets
          type: boolean
          nullable: true
          example: true
        groupIds:
          type: array
          description: The IDs of the groups that this user should belong to
          nullable: true
          items:
            type: string
    UserPatchRequest:
      oneOf:
        - $ref: '#/components/schemas/AdminUserPatchRequest'
        - $ref: '#/components/schemas/InGroupsUserPatchRequest'
      discriminator:
        propertyName: type
        mapping:
          ADMIN: '#/components/schemas/AdminUserPatchRequest'
          IN_GROUPS: '#/components/schemas/InGroupsUserPatchRequest'
    AdminUserRequestItem:
      allOf:
        - $ref: '#/components/schemas/BatchItem'
        - $ref: '#/components/schemas/AdminUserRequest'
    InGroupsUserRequestItem:
      allOf:
        - $ref: '#/components/schemas/BatchItem'
        - $ref: '#/components/schemas/InGroupsUserRequest'
    UserBatchRequestItem:
      oneOf:
        - $ref: '#/components/schemas/AdminUserRequestItem'
        - $ref: '#/components/schemas/InGroupsUserRequestItem'
      discriminator:
        propertyName: type
        mapping:
          ADMIN: '#/components/schemas/AdminUserRequestItem'
          IN_GROUPS: '#/components/schemas/InGroupsUserRequestItem'
    UserBatchRequest:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/UserBatchRequestItem'
    UserFailure:
      type: string
      enum:
        - USER_ALREADY_EXISTS
        - UNEXPECTED_ERROR
    UserBatch:
      type: object
      required:
        - successes
        - failures
      properties:
        successes:
          type: object
          description: >-
            A map of new account users keyed on the `batchItemId` provided in
            the request
          additionalProperties:
            $ref: '#/components/schemas/AccountUserWithPermittedActions'
        failures:
          type: object
          description: A map of failures keyed on the `batchItemId` provided in the request
          additionalProperties:
            $ref: '#/components/schemas/UserFailure'
    UserBatchCompletedJob:
      allOf:
        - $ref: '#/components/schemas/CompletedJob'
        - type: object
          required:
            - result
          properties:
            result:
              $ref: '#/components/schemas/UserBatch'
    UserBatchJob:
      oneOf:
        - $ref: '#/components/schemas/InProgressJob'
        - $ref: '#/components/schemas/UserBatchCompletedJob'
        - $ref: '#/components/schemas/FailedJob'
      discriminator:
        propertyName: type
        mapping:
          IN_PROGRESS: '#/components/schemas/InProgressJob'
          COMPLETED: '#/components/schemas/UserBatchCompletedJob'
          FAILED: '#/components/schemas/FailedJob'
    UserSortField:
      type: string
      enum:
        - EMAIL
      example: EMAIL
      description: The name of the [`User`](#tag/Users) property value to sort buy
    UserSort:
      type: object
      required:
        - field
        - order
      properties:
        field:
          $ref: '#/components/schemas/UserSortField'
        order:
          $ref: '#/components/schemas/SortOrder'
    UserSearchRequest:
      allOf:
        - $ref: '#/components/schemas/BasePaginatedSearchInAccountRequest'
        - type: object
          required:
            - criterion
            - sorts
          properties:
            criterion:
              description: The search criterion
              $ref: '#/components/schemas/UserSearchCriterion'
            sorts:
              description: Sorts to be applied to the search in order of precedence
              type: array
              items:
                $ref: '#/components/schemas/UserSort'
    UserSearch:
      type: object
      required:
        - results
        - totalResults
      properties:
        results:
          type: array
          description: >-
            The specified page of [`User`](#tag/Users) resources  which match
            the search criterion
          items:
            $ref: '#/components/schemas/UserWithNoPermittedActions'
        totalResults:
          type: integer
          description: >-
            The total number of [`User`](#tag/Users) resources which match the
            search criterion
          example: 10
    UserDeleteRequest:
      type: object
      properties:
        id:
          type: string
          description: The unique ID of the [`User`](#tag/Users) or the User's email
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        deleteAssetShares:
          type: boolean
          description: >-
            Whether to delete all [`AssetShares`](#tag/Asset-Shares) belonging
            to the [`User`](#tag/Users)
          example: true
    UnverifiedFreeTrialDenialReason:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - UNVERIFIED_FREE_TRIAL
    UnverifiedPaidPlanDenialReason:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - UNVERIFIED_PAID_PLAN
    PlanUpgradeRequiredDenialReason:
      type: object
      required:
        - type
        - acceptablePlans
      properties:
        type:
          type: string
          enum:
            - PLAN_UPGRADE_REQUIRED
        acceptablePlans:
          type: array
          description: >-
            The plans that the account could be upgraded to in order to get
            access to this action.
          items:
            $ref: '#/components/schemas/AccountPlan'
    DenialReason:
      description: The reason that this action is denied.
      oneOf:
        - $ref: '#/components/schemas/UnverifiedFreeTrialDenialReason'
        - $ref: '#/components/schemas/UnverifiedPaidPlanDenialReason'
        - $ref: '#/components/schemas/PlanUpgradeRequiredDenialReason'
      discriminator:
        propertyName: type
        mapping:
          UNVERIFIED_FREE_TRIAL: '#/components/schemas/UnverifiedFreeTrialDenialReason'
          UNVERIFIED_PAID_PLAN: '#/components/schemas/UnverifiedPaidPlanDenialReason'
          PLAN_UPGRADE_REQUIRED: '#/components/schemas/PlanUpgradeRequiredDenialReason'
    DeniedActionWithReason:
      type: object
      required:
        - resourceType
        - action
      properties:
        resourceType:
          $ref: '#/components/schemas/ResourceType'
        resourceId:
          type: string
          description: >-
            The ID of the resource on which this action is being denied.  This
            may be null if the permission is on the resource type as a whole
            rather than an individual instance.
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        action:
          $ref: '#/components/schemas/ActionType'
        denialReason:
          $ref: '#/components/schemas/DenialReason'
    UserWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/User'
        permittedActions:
          type: array
          description: >
            Permitted actions which are not associated with a specific API
            resource instance are included here.


            * `ASSETS` : `CREATE_ASSETS` - Whether the user can create new
            assets

            * `ASSETS` : `PUT_ASSETS_IN_NO_FOLDER` - Whether the user can create
            / edit an [`Asset`](#tag/Assets) resources such that they have no
            value for the [Folder Field](#tag/Folder-Settings)

            * `ASSETS` : `SET_ASSETS_STAGING_STATUS_LIVE` - Whether the user can
            set [`Asset.lifecycleStatus.state`](#tag/Assets) to `LIVE` via the
            [Asset Lifecycle](#tag/Asset-Lifecycle)

            * `FIELDS` : `EDIT_FIELDS` - Whether the user can create, edit and
            delete [`Field`](#tag/Fields) and
            [`FieldOption`](#tag/Field-Options) resources
          items:
            $ref: '#/components/schemas/PermittedAction'
        deniedActionsWithReasons:
          type: array
          description: >
            Actions that are denied due to the user's account plan, along with
            the reason for denial.
          items:
            $ref: '#/components/schemas/DeniedActionWithReason'
    Referrer:
      type: object
      required:
        - code
      properties:
        code:
          type: string
          description: The code for this [`Referrer`]
          example: 5fb665ca-ce35-4418-b9d5-70ee815db4bd
    ReferrerWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/Referrer'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    MatchValues:
      type: string
      enum:
        - ALL
        - ANY
    UserPreferences:
      type: object
      required:
        - userId
        - defaultSort
        - defaultSearchFiltersMatchValues
      properties:
        userId:
          type: string
          description: The ID of the [`User`](#tag/Users) whose preferences these are
          example: google-oauth2|110955770826801837334
        defaultSort:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/AssetSort'
        defaultSearchFiltersMatchValues:
          type: object
          description: >-
            A map keyed on filter id, of the initial match values operation
            (ALL/ANY) for the user's search filters.
          additionalProperties:
            $ref: '#/components/schemas/MatchValues'
    UserPreferencesWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/UserPreferences'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    NullableAssetSortFieldPatch:
      type: object
      properties:
        value:
          $ref: '#/components/schemas/AssetSort'
    UserPreferencesPatchRequest:
      type: object
      properties:
        defaultSort:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/NullableAssetSortFieldPatch'
        defaultSearchFiltersMatchValues:
          nullable: true
          type: object
          additionalProperties:
            $ref: '#/components/schemas/MatchValues'
    UserCreationStatusResponse:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          description: Either PENDING or CREATED depending on the current status
          enum:
            - PENDING
            - CREATED
    UserCreationStatusResponseWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/UserCreationStatusResponse'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    GroupWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/Group'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    GroupsWithPermittedActions:
      type: array
      items:
        $ref: '#/components/schemas/GroupWithPermittedActions'
    GroupRequest:
      type: object
      required:
        - name
        - role
        - fieldWhitelist
      properties:
        name:
          description: The name of the group
          type: string
        role:
          $ref: '#/components/schemas/GroupRole'
        fieldWhitelist:
          $ref: '#/components/schemas/FieldWhitelist'
    GroupPatchRequest:
      type: object
      properties:
        name:
          description: The name of the group
          nullable: true
          type: string
        role:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/GroupRole'
        fieldWhitelist:
          nullable: true
          type: object
          allOf:
            - $ref: '#/components/schemas/FieldWhitelist'
    StaffMember:
      type: object
      required:
        - id
        - email
      properties:
        id:
          type: string
          description: The unique ID of the [`StaffMember`](#tag/Staff-Members)
          example: 55f9964c-095d-4b8b-bb5e-4118d2e76ad0
        email:
          type: string
          description: Email of the [`StaffMember`](#tag/Staff-Members)
          example: some-staff-name@dash.app
    StaffMemberRequest:
      type: object
      required:
        - email
      properties:
        email:
          type: string
          description: Email of the [`StaffMember`](#tag/Staff-Members)
          example: some-staff-name@dash.app
    CollectionRequest:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: Name of the [`Collection`](#tag/Collections)
          example: Folders
    CollectionCollaborator:
      type: object
      required:
        - id
        - collectionId
        - userId
      properties:
        id:
          type: string
          description: The unique ID for the `CollectionCollaborator`
          example: 76c5765e-4623-41c9-a521-23610343f019
        collectionId:
          description: >-
            The unique ID of the [`Collection`](#tag/Collections) which is being
            collaborated on
          type: string
          example: a52b5315-15b8-417f-b742-d6902108bac1
        userId:
          type: string
          description: The ID of the [`User`](#tag/Users) who is a collaborator
          example: google-oauth2|110955770826801837334
    CollectionShare:
      type: object
      required:
        - id
        - accountId
        - collectionId
        - collectionName
        - currentSlug
        - slugs
        - expiry
        - assetPermittedActions
      properties:
        id:
          type: string
          description: The unique ID for the [`CollectionShare`](#tag/Collection-Shares)
          example: 4517a7ba-a482-4211-b97e-f4256f53fd32
        accountId:
          description: >-
            The ID of the `Account` the
            [`CollectionShare`](#tag/Collection-Shares) belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        collectionId:
          description: >-
            The unique ID of the [`Collection`](#tag/Collections) which is being
            shared
          type: string
          example: a52b5315-15b8-417f-b742-d6902108bac1
        collectionName:
          type: string
          description: Name of the [`Collection`](#tag/Collections) which is being shared
          example: Folders
        currentSlug:
          type: string
          description: >-
            A human readable unique identifier based on the
            [`Collection`](#tag/Collections) name, used in the Dash frontend
            share URL
          example: EW7DT/folders
        slugs:
          description: >-
            The set of all slugs that have ever been used, maintained so that
            old share URLs still work
          type: array
          items:
            type: string
          example:
            - EW7DT/folders
            - B35FP/old-name
        expiry:
          type: string
          nullable: true
          format: date-time
          description: >-
            The datetime the share will expire and no longer be accessible in
            ISO datetime format. If the expiry is null, the share will never
            expire.
          example: '2021-02-17T09:24:01.417Z'
        assetPermittedActions:
          $ref: '#/components/schemas/AssetPermittedActions'
    Collection:
      type: object
      required:
        - id
        - accountId
        - name
        - creatorId
        - dateCreated
        - collaborators
      properties:
        id:
          type: string
          description: The unique ID of the [`Collection`](#tag/Collections)
          example: a52b5315-15b8-417f-b742-d6902108bac1
        accountId:
          description: >-
            The unique ID of the `Account` the [`Collection`](#tag/Collections)
            belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        name:
          type: string
          description: Name of the [`Collection`](#tag/Collections)
          example: Folders
        creatorId:
          description: The ID of the [`User`](#tag/Users) who created the collection
          type: string
          example: google-oauth2|110955770826801837334
        dateCreated:
          type: string
          format: date-time
          description: The datetime the collection was created in ISO datetime format
          example: '2021-02-17T09:24:01.417Z'
        collaborators:
          type: array
          items:
            $ref: '#/components/schemas/CollectionCollaborator'
        share:
          $ref: '#/components/schemas/CollectionShare'
    CollectionWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/Collection'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    CollectionPatchRequest:
      type: object
      properties:
        name:
          type: string
          nullable: true
          description: Name of the [`Collection`](#tag/Collections)
          example: Folders
    CollectionAssociatedWithUserSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          properties:
            userId:
              description: >-
                The ID of the [`User`](#tag/Users) who either created or is a
                collaborator on the collection
              type: string
              example: google-oauth2|110955770826801837334
    CollectionSearchCriterion:
      oneOf:
        - $ref: '#/components/schemas/CollectionAssociatedWithUserSearchCriterion'
      discriminator:
        propertyName: type
        mapping:
          ASSOCIATED_WITH_USER: '#/components/schemas/CollectionAssociatedWithUserSearchCriterion'
    CollectionSortField:
      type: string
      enum:
        - NAME
      example: NAME
      description: The name of the [`Collection`](#tag/Collections) property value
    CollectionSort:
      type: object
      properties:
        field:
          $ref: '#/components/schemas/CollectionSortField'
        order:
          $ref: '#/components/schemas/SortOrder'
    CollectionSearchRequest:
      allOf:
        - $ref: '#/components/schemas/BasePaginatedSearchInAccountRequest'
        - type: object
          properties:
            criterion:
              description: The search criterion
              $ref: '#/components/schemas/CollectionSearchCriterion'
            sorts:
              description: Sorts to be applied to the search in order of precedence
              type: array
              items:
                $ref: '#/components/schemas/CollectionSort'
    CollectionSearch:
      type: object
      properties:
        results:
          type: array
          description: >-
            The specified page of [`Collection`](#tag/Collections) resources
            which match the search criterion
          items:
            $ref: '#/components/schemas/CollectionWithPermittedActions'
        totalResults:
          type: integer
          description: >-
            The total number of [`Collection`](#tag/Collections) resources which
            match the search criterion
          example: 15
    SubdomainAvailabilityCheckRequest:
      type: object
      properties:
        subdomain:
          description: The subdomain to check for availability
          type: string
          example: my-company
    SubdomainAvailabilityCheck:
      type: object
      properties:
        subdomain:
          description: The subdomain that was checked for availability
          type: string
          example: my-company
        isAvailable:
          type: boolean
          example: true
    ResizeTransformationTemplate:
      type: object
      required:
        - type
        - width
        - height
      properties:
        type:
          type: string
          enum:
            - RESIZE
        width:
          type: integer
          description: The maximum width the resized file should have
          example: 400
        height:
          type: integer
          description: The maxium height the resized file should have
          example: 300
    CropTransformationTemplate:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - CROP
    ConvertTransformationTemplate:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - CONVERT
        mediaType:
          description: The media type to convert to
          $ref: '#/components/schemas/MediaType'
    TransformationTemplate:
      oneOf:
        - $ref: '#/components/schemas/ResizeTransformationTemplate'
        - $ref: '#/components/schemas/CropTransformationTemplate'
        - $ref: '#/components/schemas/ConvertTransformationTemplate'
      discriminator:
        propertyName: type
        mapping:
          RESIZE: '#/components/schemas/ResizeTransformationTemplate'
          CROP: '#/components/schemas/CropTransformationTemplate'
          CONVERT: '#/components/schemas/ConvertTransformationTemplate'
    CandidatePresetTransformation:
      type: object
      required:
        - criteria
        - transformationTemplate
      properties:
        criteria:
          type: array
          items:
            $ref: '#/components/schemas/TransformationCriterion'
        transformationTemplate:
          type: array
          items:
            $ref: '#/components/schemas/TransformationTemplate'
    PresetTransformation:
      type: object
      required:
        - id
        - accountId
        - name
        - position
        - candidatePresetTransformations
      properties:
        id:
          description: The unique ID for the `PresetTransformation`
          type: string
          example: a060635d-5807-4115-a2ed-f0588d47e7ba
        accountId:
          description: The ID of the `Account` the preset transformation belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        name:
          description: Human readable name of the `PresetTransformation`
          type: string
          example: Medium
        position:
          description: >-
            The 0-based position the `PresetTransformation` has in relation to
            other presets for the group it is in.
          type: integer
          example: 1
        candidatePresetTransformations:
          type: array
          items:
            $ref: '#/components/schemas/CandidatePresetTransformation'
    PresetTransformationGroup:
      type: object
      required:
        - id
        - name
        - iconUrl
        - items
      properties:
        id:
          description: The unique ID for the `PresetTransformationGroup`
          type: string
          example: ce809f3d-c9e1-4802-9aa9-620c0bf00dd6
        name:
          description: Human readable name of the `PresetTransformationGroup`
          type: string
          example: LinkedIn
        iconUrl:
          description: URL for an icon to display alongside the group
          type: string
          example: https://planto.dash.app/assets/images/social-icons/linkedin.svg
        items:
          type: array
          items:
            $ref: '#/components/schemas/PresetTransformation'
    PresetTransformationGroupType:
      type: object
      required:
        - id
        - name
        - groups
      properties:
        id:
          description: The unique ID for the `PresetTransformationGroupType`
          type: string
          example: 1080e904-187c-4e65-8b40-d93e63c391dc
        name:
          description: Human readable name of the `PresetTransformationGroupType`
          type: string
          example: Social media sizes
        groups:
          type: array
          items:
            $ref: '#/components/schemas/PresetTransformationGroup'
    GroupedPresetTransformations:
      type: object
      required:
        - itemGroupTypes
        - ungroupedItems
      properties:
        itemGroupTypes:
          type: array
          items:
            $ref: '#/components/schemas/PresetTransformationGroupType'
        ungroupedItems:
          type: array
          items:
            $ref: '#/components/schemas/PresetTransformation'
    GroupedPresetTransformationsWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/GroupedPresetTransformations'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    PresetTransformationHasTransformationOfTypeSearchCriterion:
      type: object
      properties:
        type:
          type: string
          enum:
            - HAS_TRANSFORMATION_OF_TYPE
        transformationType:
          type: string
          enum:
            - CROP
            - RESIZE
            - CONVERT
            - CONVERT_BITRATE
    PresetTransformationApplicableForAnyAssetsSearchCriterion:
      type: object
      properties:
        type:
          type: string
          enum:
            - APPLICABLE_FOR_ANY_ASSETS
        assetIds:
          type: array
          items:
            type: string
    PresetTransformationSearchCriterion:
      oneOf:
        - $ref: >-
            #/components/schemas/PresetTransformationHasTransformationOfTypeSearchCriterion
        - $ref: >-
            #/components/schemas/PresetTransformationApplicableForAnyAssetsSearchCriterion
        - $ref: '#/components/schemas/MatchAllSearchCriterion'
        - $ref: '#/components/schemas/PresetTransformationAndSearchCriterion'
        - $ref: '#/components/schemas/PresetTransformationOrSearchCriterion'
        - $ref: '#/components/schemas/PresetTransformationNotSearchCriterion'
      discriminator:
        propertyName: type
        mapping:
          HAS_TRANSFORMATION_OF_TYPE: >-
            #/components/schemas/PresetTransformationHasTransformationOfTypeSearchCriterion
          APPLICABLE_FOR_ANY_ASSETS: >-
            #/components/schemas/PresetTransformationApplicableForAnyAssetsSearchCriterion
          MATCH_ALL: '#/components/schemas/MatchAllSearchCriterion'
          AND: '#/components/schemas/PresetTransformationAndSearchCriterion'
          OR: '#/components/schemas/PresetTransformationOrSearchCriterion'
          NOT: '#/components/schemas/PresetTransformationNotSearchCriterion'
    PresetTransformationAndSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          properties:
            criteria:
              type: array
              description: The list of criteria to AND together
              items:
                $ref: '#/components/schemas/PresetTransformationSearchCriterion'
    PresetTransformationOrSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          properties:
            criteria:
              type: array
              description: The list of criteria to OR together
              items:
                $ref: '#/components/schemas/PresetTransformationSearchCriterion'
    PresetTransformationNotSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          properties:
            criterion:
              description: The criterion to negate
              $ref: '#/components/schemas/PresetTransformationSearchCriterion'
    PresetTransformationSort:
      type: object
      properties:
        field:
          type: string
          enum:
            - ID
        order:
          $ref: '#/components/schemas/SortOrder'
    PresetTransformationSearchRequest:
      allOf:
        - $ref: '#/components/schemas/BasePaginatedSearchInAccountRequest'
        - type: object
          properties:
            criterion:
              description: The search criterion
              $ref: '#/components/schemas/PresetTransformationSearchCriterion'
            sorts:
              description: Sorts to be applied to the search in order of precedence
              type: array
              items:
                $ref: '#/components/schemas/PresetTransformationSort'
    PresetTransformationWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/PresetTransformation'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    PresetTransformationSearch:
      type: object
      properties:
        results:
          type: array
          description: >-
            The specified page of
            [`PresetTransformation`](#tag/Preset-Transformations) resources 
            which match the search criterion
          items:
            $ref: '#/components/schemas/PresetTransformationWithPermittedActions'
        totalResults:
          type: integer
          description: >-
            The total number of
            [`PresetTransformation`](#tag/Preset-Transformations) resources
            which match the search criterion
          example: 1337
    PresetTransformationsForAssetSearchField:
      type: string
      enum:
        - ASSET_ID
      example: ASSET_ID
      description: The name of the [`PresetTransformationsForAsset`] property value
    PresetTransformationsForAssetFieldInSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldInSearchCriterion'
        - type: object
          required:
            - type
            - values
          properties:
            type:
              type: string
              enum:
                - FIELD_IN
            field:
              $ref: '#/components/schemas/PresetTransformationsForAssetSearchField'
    PresetTransformationsForAssetSearchCriterion:
      oneOf:
        - $ref: >-
            #/components/schemas/PresetTransformationsForAssetFieldInSearchCriterion
      discriminator:
        propertyName: type
        mapping:
          FIELD_IN: >-
            #/components/schemas/PresetTransformationsForAssetFieldInSearchCriterion
    PresetTransformationsForAssetSort:
      type: object
      required:
        - field
        - order
      properties:
        field:
          type: string
          enum:
            - ASSET_ID
        order:
          $ref: '#/components/schemas/SortOrder'
    PresetTransformationsForAssetSearchRequest:
      allOf:
        - $ref: '#/components/schemas/BasePaginatedSearchInAccountRequest'
        - type: object
          required:
            - criterion
            - sorts
          properties:
            criterion:
              description: The search criterion
              $ref: >-
                #/components/schemas/PresetTransformationsForAssetSearchCriterion
            sorts:
              description: Sorts to be applied to the search in order of precedence
              type: array
              items:
                $ref: '#/components/schemas/PresetTransformationsForAssetSort'
    PresetTransformationsForAsset:
      type: object
      required:
        - assetId
        - presetTransformationIds
      properties:
        assetId:
          description: The unique ID for the `Asset`
          type: string
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        presetTransformationIds:
          type: array
          items:
            type: string
    PresetTransformationsForAssetWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/PresetTransformationsForAsset'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    PresetTransformationsForAssetSearch:
      type: object
      properties:
        results:
          type: array
          description: >-
            The specified page of `PresetTransformationsForAsset` resources 
            which match the search criterion
          items:
            $ref: >-
              #/components/schemas/PresetTransformationsForAssetWithPermittedActions
        totalResults:
          type: integer
          description: >-
            The total number of [`PresetTransformationsForAsset`] resources
            which match the search criterion
          example: 1337
    CorebookSettings:
      type: object
      properties:
        accountId:
          description: The ID of the account the Corebook settings belong to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        enabled:
          description: Whether Corebook integration is enable
          type: boolean
          example: true
        corebookUrl:
          description: >-
            The URL to Corebook that is used to link users to the brand
            guidelines
          type: string
          example: https://www.corebook.io/dash
    CorebookSettingsWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/CorebookSettings'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    CorebookSettingsRequest:
      type: object
      properties:
        enabled:
          description: Whether Corebook integration is enable
          type: boolean
          example: true
        corebookUrl:
          description: >-
            The URL to Corebook that will be used to link users to the brand
            guidelines
          type: string
          example: https://www.corebook.io/dash
    WordPressSettings:
      type: object
      required:
        - accountId
        - clientId
        - clientSecret
        - baseUrls
      properties:
        accountId:
          description: The ID of the account of these WordPress settings.
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        clientId:
          description: >-
            The ID of the client application. Used to configure the Dash
            WordPress plugin.
          type: string
          example: CFB665Cace354418B9D570EE815DB4bd
        clientSecret:
          description: >-
            The secret of the client application (not base64 encoded). Used to
            configure the Dash WordPress plugin.
          type: string
          example: EE815DB4-CFB665Ca-fzHDlUibM9g6JwiOXf9Vxh6f_egJD
        baseUrls:
          description: The base urls of your WordPress instances using the Dash plugin.
          type: array
          items:
            description: The base URL
            type: string
            example: https://my-wordpress.com
    WordPressSettingsWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/WordPressSettings'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    WordPressSettingsPutRequest:
      type: object
      required:
        - baseUrls
      properties:
        baseUrls:
          description: The base urls of your WordPress instances using the Dash plugin.
          type: array
          items:
            description: The base URL
            type: string
            example: https://my-wordpress.com
    WordPressSettingsPatchRequest:
      type: object
      properties:
        baseUrls:
          description: The base urls of your WordPress instances using the Dash plugin.
          type: array
          nullable: true
          items:
            description: The base URL
            type: string
            example: https://my-wordpress.com
    ShopifyExportResultAssetFailure:
      type: object
      required:
        - assetId
        - assetFileId
      properties:
        assetId:
          type: string
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        assetFileId:
          type: string
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
    ShopifyExportResultUploadFailure:
      type: object
      required:
        - assetId
        - assetFileId
        - filename
        - shopifyFileId
      properties:
        assetId:
          type: string
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        assetFileId:
          type: string
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        filename:
          type: string
          example: hat.jpg
        shopifyFileId:
          type: string
          nullable: true
          example: hat_1.jpg
    ShopifyExportResultProductFailure:
      type: object
      required:
        - productId
        - shopifyFileId
      properties:
        productId:
          type: string
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        shopifyFileId:
          type: string
          example: hat_1.jpg
    ShopifyExportResult:
      type: object
      required:
        - hasAnyFailures
        - transformationFailures
        - uploadFailures
        - productAssignmentFailures
        - reorderFailures
      properties:
        hasAnyFailures:
          type: boolean
          example: true
        transformationFailures:
          type: array
          items:
            $ref: '#/components/schemas/ShopifyExportResultAssetFailure'
        uploadFailures:
          type: array
          items:
            $ref: '#/components/schemas/ShopifyExportResultUploadFailure'
        productAssignmentFailures:
          type: array
          items:
            $ref: '#/components/schemas/ShopifyExportResultProductFailure'
        reorderFailures:
          type: array
          items:
            $ref: '#/components/schemas/ShopifyExportResultProductFailure'
    ShopifyExportCompletedJob:
      allOf:
        - $ref: '#/components/schemas/CompletedJob'
        - type: object
          required:
            - result
          properties:
            result:
              $ref: '#/components/schemas/ShopifyExportResult'
    ShopifyExportJob:
      oneOf:
        - $ref: '#/components/schemas/InProgressJob'
        - $ref: '#/components/schemas/ShopifyExportCompletedJob'
        - $ref: '#/components/schemas/FailedJob'
      discriminator:
        propertyName: type
        mapping:
          IN_PROGRESS: '#/components/schemas/InProgressJob'
          COMPLETED: '#/components/schemas/ShopifyExportCompletedJob'
          FAILED: '#/components/schemas/FailedJob'
    ShopifyExportJobWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/ShopifyExportJob'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    ShopifyFile:
      type: object
      required:
        - type
        - shopifyFileId
      properties:
        type:
          type: string
          enum:
            - SHOPIFY_FILE
        shopifyFileId:
          type: string
          description: The ID of the file in shopify to update the position of
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
    DashAsset:
      type: object
      required:
        - type
        - assetId
        - assetFileId
        - transformationDescription
      properties:
        type:
          type: string
          enum:
            - ASSET
        assetId:
          type: string
          description: The ID of the [`Asset`](#tag/Assets) to export to Shopify
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        assetFileId:
          type: string
          description: >-
            The ID of the [`AssetFile`](#operation/getAssetFiles) to export to
            Shopify
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        transformationDescription:
          $ref: '#/components/schemas/TransformationDescription'
        presetParameters:
          type: array
          description: PresetParameters for this `assetId`
          default: []
          items:
            $ref: '#/components/schemas/PresetParameters'
    ShopifyExportSource:
      oneOf:
        - $ref: '#/components/schemas/ShopifyFile'
        - $ref: '#/components/schemas/DashAsset'
      discriminator:
        propertyName: type
        mapping:
          SHOPIFY_FILE: '#/components/schemas/ShopifyFile'
          ASSET: '#/components/schemas/DashAsset'
    ShopifyProductFileDestination:
      type: object
      required:
        - productId
        - position
      properties:
        productId:
          description: The id of the product in Shopify to create images for
          type: string
          example: 1234
        position:
          type: integer
          description: The position of the Shopify image in the product listing
          example: 3
    ShopifyExportRequestItem:
      type: object
      required:
        - source
        - productFileDestinations
      properties:
        source:
          $ref: '#/components/schemas/ShopifyExportSource'
        productFileDestinations:
          type: array
          items:
            $ref: '#/components/schemas/ShopifyProductFileDestination'
    ShopifyExportRequest:
      type: object
      required:
        - shop
        - shopifyAccessToken
        - items
      properties:
        shop:
          type: string
          description: The shop to search within
          example: planto.myshopify.com
        shopifyAccessToken:
          type: string
          description: >-
            An access token obtained for the above Shopify store that will be
            used to make requests to Shopify with
          example: cjuqb_6bp89123d45516c78288f433bd8bc13j
        items:
          type: array
          items:
            $ref: '#/components/schemas/ShopifyExportRequestItem'
    CreateShopifyProductImageBatchRequest:
      type: object
      required:
        - productId
        - items
        - transformationDescription
      properties:
        shop:
          description: The "shop" slug for the specific Shopify shop to create images in
          type: string
          example: example.myshopify.com
        productId:
          description: The id of the product in Shopify to create images for
          type: string
          example: 1234
        items:
          type: array
          items:
            $ref: '#/components/schemas/AssetDownloadBatchRequestItem'
        transformationDescription:
          $ref: '#/components/schemas/TransformationDescription'
    ShopifyImageUsedInProduct:
      type: object
      required:
        - type
        - productId
      properties:
        type:
          type: string
          enum:
            - PRODUCT
        productId:
          description: The id of the product in Shopify to create images for
          type: string
          example: 1234
    ShopifyImageUsedInOther:
      type: object
      required:
        - type
        - sourcePage
      properties:
        type:
          type: string
          enum:
            - OTHER
        sourcePage:
          enum:
            - ARTICLE
            - BLOG
            - PAGE
    ShopifyImageUsedIn:
      oneOf:
        - $ref: '#/components/schemas/ShopifyImageUsedInProduct'
        - $ref: '#/components/schemas/ShopifyImageUsedInOther'
      discriminator:
        propertyName: type
        mapping:
          PRODUCT: '#/components/schemas/ShopifyImageUsedInProduct'
          OTHER: '#/components/schemas/ShopifyImageUsedInOther'
    CreateShopifyImageBatchRequest:
      type: object
      required:
        - usedIn
        - items
        - transformationDescription
      properties:
        shop:
          description: The "shop" slug for the specific Shopify shop to create images in
          type: string
          example: example.myshopify.com
        usedIn:
          $ref: '#/components/schemas/ShopifyImageUsedIn'
        items:
          type: array
          items:
            $ref: '#/components/schemas/AssetDownloadBatchRequestItem'
        transformationDescription:
          $ref: '#/components/schemas/TransformationDescription'
    CustomIntegrationSettings:
      type: object
      required:
        - accountId
        - clientId
        - clientSecret
        - allowedWebOriginUrls
        - allowedCallbackUrls
        - allowedLogoutUrls
      properties:
        accountId:
          description: The ID of the account the WordPress settings belong to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        clientId:
          description: >-
            The ID of the client application. Used in the authentication flow of
            your custom integartion.
          type: string
          example: CFB665Cace354418B9D570EE815DB4bd
        clientSecret:
          description: >-
            The secret of the client application. Used in the authentication
            flow of your custom integartion.
          type: string
          example: EE815DB4-CFB665Ca-fzHDlUibM9g6JwiOXf9Vxh6f_egJD
        allowedWebOriginUrls:
          description: Allowed origins for use in any cross-origin authentication flow
          type: array
          items:
            description: The allowed origin URL
            type: string
            example: https://my-app.com
        allowedCallbackUrls:
          description: Allowed URLs for callback during authentication flow
          type: array
          items:
            description: The allowed callback URL
            type: string
            example: https://my-app.com/callback
        allowedLogoutUrls:
          description: Allowed URLs to redirect to after logout
          type: array
          items:
            description: The allowed callback URL
            type: string
            example: https://my-app.com/callback
    CustomIntegrationSettingsWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/CustomIntegrationSettings'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    CustomIntegrationSettingsPutRequest:
      type: object
      required:
        - allowedWebOriginUrls
        - allowedCallbackUrls
        - allowedLogoutUrls
      properties:
        allowedWebOriginUrls:
          description: Allowed origins for use in the cross-origin authentication flow
          type: array
          items:
            description: The allowed origin URL
            type: string
            example: https://my-app.com
        allowedCallbackUrls:
          description: >-
            Allowed URLs for callback (i.e. with generated access token) during
            authentication flow
          type: array
          items:
            description: The allowed callback URL
            type: string
            example: https://my-app.com/callback
        allowedLogoutUrls:
          description: Allowed URLs to redirect to after logout
          type: array
          items:
            description: The allowed callback URL
            type: string
            example: https://my-app.com/callback
    CustomIntegrationSettingsPatchRequest:
      type: object
      properties:
        allowedWebOriginUrls:
          description: Allowed origins for use in the cross-origin authentication flow
          type: array
          nullable: true
          items:
            description: The allowed origin URL
            type: string
            example: https://my-app.com
        allowedCallbackUrls:
          description: >-
            Allowed URLs for callback (i.e. with generated access token) during
            authentication flow
          type: array
          nullable: true
          items:
            description: The allowed callback URL
            type: string
            example: https://my-app.com/callback
        allowedLogoutUrls:
          description: Allowed URLs to redirect to after logout
          type: array
          nullable: true
          items:
            description: The allowed callback URL
            type: string
            example: https://my-app.com/callback
    ExternalAppUserRequest:
      type: object
      properties:
        externalAppUserId:
          type: string
          description: External app user ID
        appName:
          type: string
          enum:
            - CANVA
    ExternalAppSsoTokenRequest:
      type: object
      required:
        - appName
      properties:
        appName:
          type: string
          enum:
            - FRILL
    AppName:
      type: string
      enum:
        - SHOPIFY
      example: SHOPIFY
    ExternalAppAccount:
      type: object
      required:
        - id
        - accountId
        - externalAppAccountId
        - appName
        - configured
      properties:
        id:
          type: string
          description: >-
            The unique ID of the
            [`ExternalAppAccount`](#operation/getExternalAppAccounts) resource.
          example: 55f9964c-095d-4b8b-bb5e-4118d2e76ad0
        accountId:
          description: >-
            The unique ID of the `Account` the
            [`ExternalAppAccount`](#operation/getExternalAppAccounts) belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        externalAppAccountId:
          type: string
          description: >-
            A unique identifier of the specific account to connect to in the
            external app
          example: my.myshopify.com
        appName:
          $ref: '#/components/schemas/AppName'
        configured:
          type: boolean
          description: >-
            Whether the external app has been configured and is ready for use.
            e.g. has the Dash Shopify app been successfully installed in your
            store
          example: true
    ExternalAppAccountWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/ExternalAppAccount'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    ExternalAppAccountRequest:
      type: object
      required:
        - externalAppAccountId
        - appName
        - connectionPayload
      properties:
        externalAppAccountId:
          type: string
          description: >-
            A unique identifier of the specific account to connect to in the
            external app
          example: put the Shopify domain here
        appName:
          $ref: '#/components/schemas/AppName'
        connectionPayload:
          type: object
          description: Any additional data that is required to connect to the external app
          example:
            type: SHOPIFY
            clientId: put the Client ID here
            clientSecret: put the Client secret here
            accessToken: ''
    CollectionShareRequest:
      type: object
      required:
        - collectionId
      properties:
        collectionId:
          description: The unique ID of the [`Collection`](#tag/Collections) to be shared
          type: string
          example: a52b5315-15b8-417f-b742-d6902108bac1
        expiry:
          type: string
          nullable: true
          format: date-time
          description: >-
            The datetime the share will expire and no longer be accessible in
            ISO datetime format. If the expiry is null, the share will never
            expire.
          example: '2021-02-17T09:24:01.417Z'
          default: null
        assetPermittedActions:
          $ref: '#/components/schemas/AssetPermittedActionsWithDefault'
    CollectionShareWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/CollectionShare'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    CollectionSharePatchRequest:
      type: object
      properties:
        expiry:
          $ref: '#/components/schemas/NullableDateTimePatch'
        assetPermittedActions:
          $ref: '#/components/schemas/AssetPermittedActions'
    CollectionShareSearchField:
      type: string
      enum:
        - CREATED_BY
      example: CREATED_BY
      description: >-
        The ID of the [`User`](#tag/Users) who created the
        [`CollectionShare`](#tag/Collection-Shares)
    CollectionShareFieldEqualsSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldEqualsSearchCriterion'
        - type: object
          required:
            - type
            - field
          properties:
            type:
              type: string
              enum:
                - FIELD_EQUALS
              example: FIELD_EQUALS
            field:
              $ref: '#/components/schemas/CollectionShareSearchField'
    CollectionShareSearchCriterion:
      oneOf:
        - $ref: '#/components/schemas/CollectionShareFieldEqualsSearchCriterion'
      discriminator:
        propertyName: type
        mapping:
          FIELD_EQUALS: '#/components/schemas/CollectionShareFieldEqualsSearchCriterion'
    CollectionShareSortField:
      type: string
      enum:
        - ID
        - COLLECTION_ID
        - EXPIRY
      example: ID
      description: >-
        The name of the [`CollectionShare`](#tag/Collection-Shares) property
        value
    CollectionShareSort:
      type: object
      properties:
        field:
          $ref: '#/components/schemas/CollectionShareSortField'
        order:
          $ref: '#/components/schemas/SortOrder'
    CollectionShareSearchRequest:
      allOf:
        - $ref: '#/components/schemas/BasePaginatedSearchInAccountRequest'
        - type: object
          properties:
            criterion:
              description: The search criterion
              $ref: '#/components/schemas/CollectionShareSearchCriterion'
            sorts:
              description: Sorts to be applied to the search in order of precedence
              type: array
              items:
                $ref: '#/components/schemas/CollectionShareSort'
    CollectionShareSearch:
      type: object
      properties:
        results:
          type: array
          description: >-
            The specified page of [`CollectionShare`](#tag/Collection-Shares)
            resources which match the search criterion
          items:
            $ref: '#/components/schemas/CollectionShareWithPermittedActions'
        totalResults:
          type: integer
          description: >-
            The total number of [`CollectionShare`](#tag/Collection-Shares)
            resources which match the search criterion
          example: 15
    FieldHasItemSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - value
          properties:
            value:
              type: string
              description: >-
                Checks whether a collection field has an item of exactly this
                value
              example: an item
    PublicCollectionShareSearchField:
      type: string
      enum:
        - SLUGS
      example: SLUGS
      description: >-
        The name of the [`PublicCollectionShare`](#tag/Collection-Shares)
        property value
    PublicCollectionShareFieldHasItemSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldHasItemSearchCriterion'
        - type: object
          properties:
            field:
              $ref: '#/components/schemas/PublicCollectionShareSearchField'
    PublicCollectionShareSearchCriterion:
      oneOf:
        - $ref: >-
            #/components/schemas/PublicCollectionShareFieldHasItemSearchCriterion
      discriminator:
        propertyName: type
        mapping:
          FIELD_HAS_ITEMS: >-
            #/components/schemas/PublicCollectionShareFieldHasItemSearchCriterion
    PublicCollectionShareSortField:
      type: string
      enum:
        - ID
      example: ID
      description: >-
        The name of the [`PublicCollectionShare`](#tag/Collection-Shares)
        property value
    PublicCollectionShareSort:
      type: object
      properties:
        field:
          $ref: '#/components/schemas/PublicCollectionShareSortField'
        order:
          $ref: '#/components/schemas/SortOrder'
    PublicCollectionShareSearchRequest:
      allOf:
        - $ref: '#/components/schemas/BasePaginatedSearchInAccountRequest'
        - type: object
          properties:
            criterion:
              description: The search criterion
              $ref: '#/components/schemas/PublicCollectionShareSearchCriterion'
            sorts:
              description: Sorts to be applied to the search in order of precedence
              type: array
              items:
                $ref: '#/components/schemas/PublicCollectionShareSort'
    SavedSearchRequest:
      type: object
      required:
        - name
        - emailUserOnNewUploads
        - criterion
        - sorts
      properties:
        name:
          type: string
          description: Name of the [`SavedSearch`](#tag/Saved-Searches)
          example: My favourite search
        emailUserOnNewUploads:
          description: >-
            Whether to email the creator when a new upload matches the saved
            search criterion
          type: boolean
          example: true
        criterion:
          description: The search criterion
          $ref: '#/components/schemas/AssetSearchCriterion'
        sorts:
          description: Sorts to be applied to the search in order of precedence
          type: array
          items:
            $ref: '#/components/schemas/AssetSort'
    SavedSearch:
      type: object
      required:
        - id
        - accountId
        - name
        - creatorId
        - emailUserOnNewUploads
        - criterion
        - sorts
      properties:
        id:
          type: string
          description: The unique ID of the [`SavedSearch`](#tag/Saved-Searches)
          example: 1627573b-1273-441e-90d1-505d1f8ab47c
        accountId:
          description: >-
            The unique ID of the `Account` the
            [`SavedSearch`](#tag/Saved-Searches) belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        creatorId:
          description: >-
            The ID of the [`User`](#tag/Users) who created the
            [`SavedSearch`](#tag/Saved-Searches)
          type: string
          example: google-oauth2|110955770826801837334
        name:
          type: string
          description: Name of the [`SavedSearch`](#tag/Saved-Searches)
          example: My favourite search
        emailUserOnNewUploads:
          description: >-
            Whether to email the creator when a new upload matches the saved
            search criterion
          type: boolean
          example: true
        criterion:
          description: The search criterion
          $ref: '#/components/schemas/AssetSearchCriterion'
        sorts:
          description: Sorts to be applied to the search in order of precedence
          type: array
          items:
            $ref: '#/components/schemas/AssetSort'
    SavedSearchWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/SavedSearch'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    SavedSearchPatchRequest:
      type: object
      properties:
        name:
          type: string
          nullable: true
          description: Name of the [`SavedSearch`](#tag/Saved-Searches)
          example: My favourite search
        emailUserOnNewUploads:
          description: >-
            Whether to email the creator when a new upload matches the saved
            search criterion
          type: boolean
          nullable: true
          example: true
    SavedSearchSearchField:
      type: string
      enum:
        - CREATOR_ID
      example: CREATOR_ID
      description: The name of the [`SavedSearch`](#tag/Saved-Searches) property value
    SavedSearchFieldEqualsSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldEqualsSearchCriterion'
        - type: object
          required:
            - type
            - field
          properties:
            type:
              type: string
              enum:
                - FIELD_EQUALS
            field:
              $ref: '#/components/schemas/SavedSearchSearchField'
    SavedSearchSearchCriterion:
      oneOf:
        - $ref: '#/components/schemas/SavedSearchFieldEqualsSearchCriterion'
      discriminator:
        propertyName: type
        mapping:
          FIELD_EQUALS: '#/components/schemas/SavedSearchFieldEqualsSearchCriterion'
    SavedSearchSearchRequest:
      allOf:
        - $ref: '#/components/schemas/BasePaginatedSearchInAccountRequest'
        - type: object
          required:
            - criterion
            - sorts
          properties:
            criterion:
              description: The search criterion
              $ref: '#/components/schemas/SavedSearchSearchCriterion'
            sorts:
              description: >-
                This search does not accept any sorts, but has the sorts
                parameter anyway to fit in with other searches.  You must always
                provide an empty list for this parameter.
              type: array
              items:
                type: object
              example: []
    SavedSearchSearch:
      type: object
      required:
        - results
        - totalResults
      properties:
        results:
          type: array
          description: >-
            The specified page of [`SavedSearch`](#tag/Saved-Searches) resources
            which match the search criterion
          items:
            $ref: '#/components/schemas/SavedSearchWithPermittedActions'
        totalResults:
          type: integer
          description: >-
            The total number of [`SavedSearch`](#tag/Saved-Searches) resources
            which match the search criterion
          example: 15
    AssetDownloadEventField:
      type: string
      enum:
        - ASSET_ID
        - ASSET_FILE_ID
        - USER_EMAIL
        - USER_TYPE
        - DOWNLOAD_TYPE
        - DOWNLOAD_DESCRIPTION
        - DOWNLOAD_PRESET_ID
        - USER_ID
        - DATE_TIME
        - PORTAL_ID
      description: The name of the [`AssetDownloadEvent`] property value
      example: ASSET_ID
    AssetDownloadEventFieldEqualsSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldEqualsSearchCriterion'
        - type: object
          required:
            - field
          properties:
            field:
              $ref: '#/components/schemas/AssetDownloadEventField'
    FieldInRangeSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - from
            - to
          properties:
            from:
              type: string
              description: The value the range is from
              example: A
            to:
              type: string
              description: The value the range is to
              example: Z
    AssetDownloadEventFieldInRangeSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldInRangeSearchCriterion'
        - type: object
          required:
            - field
          properties:
            field:
              $ref: '#/components/schemas/AssetDownloadEventField'
    AssetDownloadEventSearchCriterion:
      oneOf:
        - $ref: '#/components/schemas/MatchAllSearchCriterion'
        - $ref: '#/components/schemas/AssetDownloadEventFieldEqualsSearchCriterion'
        - $ref: '#/components/schemas/AssetDownloadEventFieldInRangeSearchCriterion'
        - $ref: '#/components/schemas/AssetDownloadEventAndSearchCriterion'
        - $ref: '#/components/schemas/AssetDownloadEventOrSearchCriterion'
        - $ref: '#/components/schemas/AssetDownloadEventNotSearchCriterion'
      discriminator:
        propertyName: type
        mapping:
          MATCH_ALL: '#/components/schemas/MatchAllSearchCriterion'
          FIELD_EQUALS: '#/components/schemas/AssetDownloadEventFieldEqualsSearchCriterion'
          FIELD_IN_RANGE: '#/components/schemas/AssetDownloadEventFieldInRangeSearchCriterion'
          AND: '#/components/schemas/AssetDownloadEventAndSearchCriterion'
          OR: '#/components/schemas/AssetDownloadEventOrSearchCriterion'
          NOT: '#/components/schemas/AssetDownloadEventNotSearchCriterion'
    AssetDownloadEventAndSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - criteria
          properties:
            criteria:
              type: array
              items:
                $ref: '#/components/schemas/AssetDownloadEventSearchCriterion'
              description: The list of criteria to AND together
    AssetDownloadEventOrSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - criteria
          properties:
            criteria:
              type: array
              description: The list of criteria to OR together
              items:
                $ref: '#/components/schemas/AssetDownloadEventSearchCriterion'
    AssetDownloadEventNotSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - criterion
          properties:
            criterion:
              description: The criterion to negate
              $ref: '#/components/schemas/AssetDownloadEventSearchCriterion'
              required: true
    AssetDownloadEventSort:
      type: object
      required:
        - field
        - order
      properties:
        field:
          $ref: '#/components/schemas/AssetDownloadEventField'
        order:
          $ref: '#/components/schemas/SortOrder'
    EventTermsAggregationRequest:
      type: object
      required:
        - type
      properties:
        type:
          type: string
        valueWhenMissing:
          type: string
          description: >-
            The value to assign to events that do not have a value for the field
            that you are aggregating upon
          example: Unknown
    AssetDownloadEventTermsAggregationRequest:
      allOf:
        - $ref: '#/components/schemas/EventTermsAggregationRequest'
        - type: object
          required:
            - field
          properties:
            field:
              $ref: '#/components/schemas/AssetDownloadEventField'
              required: true
    EventDateInterval:
      type: string
      enum:
        - ONE_HOUR
        - ONE_DAY
        - ONE_WEEK
        - ONE_MONTH
      description: The interval to use for the date aggrgation
      example: ONE_HOUR
    EventDateHistogramAggregationRequest:
      type: object
      required:
        - type
        - interval
      properties:
        type:
          type: string
        interval:
          $ref: '#/components/schemas/EventDateInterval'
        valueWhenMissing:
          type: string
          description: >-
            The value to assign to events that do not have a value for the field
            that you are aggregating upon
          example: Unknown
        lowerBound:
          type: string
          format: date-time
          description: >
            Optional lower bound to use for the range of the date aggregation.


            If excluded the first bucket returned will be the one containing the
            earliest event.


            If included the empty buckets will be returned from the lower bound
            to bucket containing the earliest event.
          example: '2021-02-15T09:24:01.417Z'
        upperBound:
          type: string
          format: date-time
          description: >
            Optional upper bound to use for the range of the date aggregation.


            If excluded the last bucket returned will be the one containing the
            latest event.


            If included the empty buckets will be returned from the bucket
            containing the latest event to the upper bound.
          example: '2021-02-15T09:24:01.417Z'
    AssetDownloadEventDateField:
      type: string
      enum:
        - DATE_TIME
      description: The name of the [`AssetDownloadEvent`] date field
      example: DATE_TIME
    AssetDownloadEventDateHistogramAggregationRequest:
      allOf:
        - $ref: '#/components/schemas/EventDateHistogramAggregationRequest'
        - type: object
          required:
            - field
          properties:
            field:
              $ref: '#/components/schemas/AssetDownloadEventDateField'
    AssetDownloadEventAggregationRequest:
      oneOf:
        - $ref: >-
            #/components/schemas/AssetDownloadEventDateHistogramAggregationRequest
        - $ref: '#/components/schemas/AssetDownloadEventTermsAggregationRequest'
      discriminator:
        propertyName: type
        mapping:
          TERMS: '#/components/schemas/AssetDownloadEventTermsAggregationRequest'
          DATE_HISTOGRAM: >-
            #/components/schemas/AssetDownloadEventDateHistogramAggregationRequest
    AssetDownloadEventSearchRequest:
      allOf:
        - $ref: '#/components/schemas/BasePaginatedSearchInAccountRequest'
        - type: object
          required:
            - criterion
            - sorts
          properties:
            criterion:
              $ref: '#/components/schemas/AssetDownloadEventSearchCriterion'
              description: The search criterion
              required: true
            sorts:
              type: array
              items:
                $ref: '#/components/schemas/AssetDownloadEventSort'
              description: Sorts to be applied to the search in order of precedence
              default: []
            aggregations:
              type: object
              additionalProperties:
                $ref: '#/components/schemas/AssetDownloadEventAggregationRequest'
              description: >-
                A map of requested aggregations. The results will be returned in
                a map with the same provided keys.
    UserDataAccountUser:
      type: object
      required:
        - type
        - userId
        - userEmail
      properties:
        type:
          type: string
          enum:
            - ACCOUNT_USER
        userId:
          type: string
          description: The ID of the [`User`](#tag/Users) who downloaded the asset
          example: google-oauth2|110955770826801837334
        userEmail:
          type: string
          description: >-
            The email address of the [`User`](#tag/Users) who downloaded the
            asset
          example: john.smith
    UserDataShareUser:
      type: object
      required:
        - type
        - userId
      properties:
        type:
          type: string
          enum:
            - SHARE_USER
        userId:
          type: string
          description: The ID of the [`User`](#tag/Users) who downloaded the asset
          example: google-oauth2|110955770826801837334
    UserDataPortalUser:
      type: object
      required:
        - type
        - userId
        - portalId
      properties:
        type:
          type: string
          enum:
            - PORTAL_USER
        userId:
          type: string
          description: The ID of the [`User`](#tag/Users) who downloaded the asset
          example: google-oauth2|110955770826801837334
        portalId:
          type: string
          description: >-
            The ID of the [`Portal`](#tag/Portals) the user who downloaded the
            asset was in
          example: 55f9964c-095d-4b8b-bb5e-4118d2e76ad0
    UserDataUnknown:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - UNKNOWN
    UserData:
      oneOf:
        - $ref: '#/components/schemas/UserDataAccountUser'
        - $ref: '#/components/schemas/UserDataShareUser'
        - $ref: '#/components/schemas/UserDataPortalUser'
        - $ref: '#/components/schemas/UserDataUnknown'
      discriminator:
        propertyName: type
        mapping:
          ACCOUNT_USER: '#/components/schemas/UserDataAccountUser'
          SHARE_USER: '#/components/schemas/UserDataShareUser'
          PORTAL_USER: '#/components/schemas/UserDataPortalUser'
          UNKNOWN: '#/components/schemas/UserDataUnknown'
    AssetDownloadEvent:
      type: object
      required:
        - id
        - accountId
        - assetId
        - assetFileId
        - dateTime
        - downloadType
        - downloadDescription
        - userData
      properties:
        id:
          type: string
          description: The unique ID of the [`AssetDownloadEvent`]
          example: a52b5315-15b8-417f-b742-d6902108bac1
        accountId:
          type: string
          description: The unique ID of the `Account` the [`AssetDownloadEvent`] was for
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        assetId:
          type: string
          description: >-
            The ID of the [`Asset`](#tag/Assets) the [`AssetDownloadEvent`] was
            for
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        assetFileId:
          type: string
          description: >-
            The ID of the [`AssetFile`](#operation/getAssetFiles) the
            [`AssetDownloadEvent`] was for
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        dateTime:
          type: string
          format: date-time
          description: The datetime of the asset download in ISO datetime format
          example: '2021-02-17T09:24:01.417Z'
        downloadType:
          type: string
          enum:
            - ORIGINAL
            - PRESET
            - CUSTOM
            - UNKNOWN
          description: >-
            Whether the download was of the original file, a preset
            transformation or a custom transformation
          example: ORIGINAL
        downloadDescription:
          type: string
          description: A human-readable description of the download.
          example: ORIGINAL
        downloadPresetId:
          type: string
          description: The ID of the `PresetTransformation` if `downloadType=PRESET`
          example: ORIGINAL
        userData:
          $ref: '#/components/schemas/UserData'
    AssetDownloadEventWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/AssetDownloadEvent'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    EventAggregationValueResponse:
      type: object
      required:
        - key
        - value
      properties:
        type:
          type: string
        value:
          type: string
          description: The value of the aggregation
          example: 109
    EventAggregationBucket:
      type: object
      required:
        - key
        - count
      properties:
        key:
          type: string
          description: The unique name of the bucket
          example: null
        count:
          type: integer
          description: The number of events in the bucket
          example: 15
    EventAggregationBucketResponse:
      type: object
      required:
        - key
        - buckets
      properties:
        type:
          type: string
        buckets:
          description: The collection of unique buckets within the requested aggregation
          type: array
          items:
            $ref: '#/components/schemas/EventAggregationBucket'
    EventAggregationResponse:
      oneOf:
        - $ref: '#/components/schemas/EventAggregationValueResponse'
        - $ref: '#/components/schemas/EventAggregationBucketResponse'
      discriminator:
        propertyName: type
        mapping:
          VALUE: '#/components/schemas/EventAggregationValueResponse'
          BUCKET: '#/components/schemas/EventAggregationBucketResponse'
    AssetDownloadEventSearch:
      type: object
      required:
        - results
        - totalResults
        - aggregations
      properties:
        results:
          type: array
          description: >-
            The specified page of [`AssetDownloadEvent`] resources which match
            the search criterion
          items:
            $ref: '#/components/schemas/AssetDownloadEventWithPermittedActions'
        totalResults:
          type: integer
          description: >-
            The total number of [`AssetDownloadEvent`] resources which match the
            search criterion
          example: 15
        aggregations:
          type: object
          description: >-
            A map of the aggregations requested keyed on the user provided key
            in the request
          additionalProperties:
            $ref: '#/components/schemas/EventAggregationResponse'
    WelcomeMessage:
      type: object
      properties:
        title:
          type: string
          nullable: true
          description: Optional title of the `Welcome Message`
          example: Welcome to our reseller portal
        body:
          description: >-
            Optional body of text displayed below the title in the `Welcome
            Message`
          nullable: true
          type: string
          example: >-
            Take a look around our reseller portal and quickly find all the
            assets you need. Happy browsing!
    PortalRequest:
      type: object
      required:
        - name
        - slug
        - whitelistedFolderFieldOptionIds
        - welcomeMessage
        - showRecentlyAddedAssets
      properties:
        name:
          type: string
          description: Name of the [`Portal`](#tag/Portals)
          example: Reseller portal
        slug:
          type: string
          description: A human readable unique identifier, used in the Dash portal URL
          example: reseller-portal
        whitelistedFolderFieldOptionIds:
          description: >-
            The folder [`FieldOption`](#tag/Field-Options)s which portal users
            will have permission to view/download assets from.  Users will also
            have permission on the descendants of the specified field options.
          type: array
          items:
            type: string
          example:
            - 4cb261ad-dffb-414e-89cf-6902e3031d44
            - 4e14dc90-eb7b-4fd2-87e5-e8968c236ec0
        welcomeMessage:
          $ref: '#/components/schemas/WelcomeMessage'
        showRecentlyAddedAssets:
          type: boolean
          description: >-
            Whether this portal should include a preview of recently added
            assets
          example: true
        passcode:
          type: string
          nullable: true
          description: >-
            A passcode that must be provided when viewing a portal.  Note that
            this is NOT a password and as such is stored in plain text
          example: LetMeInPlease
        assetPermittedActions:
          $ref: '#/components/schemas/AssetPermittedActionsWithDefault'
    Portal:
      type: object
      required:
        - id
        - accountId
        - name
        - currentSlug
        - slugs
        - whitelistedFolderFieldOptionIds
        - welcomeMessage
        - showRecentlyAddedAssets
        - assetPermittedActions
      properties:
        id:
          type: string
          description: The unique ID of the [`Portal`](#tag/Portals)
          example: 55f9964c-095d-4b8b-bb5e-4118d2e76ad0
        accountId:
          description: >-
            The unique ID of the `Account` the [`Portal`](#tag/Portals) belongs
            to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        name:
          type: string
          description: Name of the [`Portal`](#tag/Portals)
          example: Reseller portal
        currentSlug:
          type: string
          description: A human readable unique identifier, used in the Dash portal URL
          example: reseller-portal
        slugs:
          description: >-
            The set of all slugs that have ever been used, maintained so that
            old share URLs can still work
          type: array
          items:
            type: string
          example:
            - reseller-portal
            - old-slug-here
        whitelistedFolderFieldOptionIds:
          description: >-
            The folder [`FieldOption`](#tag/Field-Options)s which portal users
            will have permission to view/download assets from.
          type: array
          items:
            type: string
          example:
            - 4cb261ad-dffb-414e-89cf-6902e3031d44
            - 4e14dc90-eb7b-4fd2-87e5-e8968c236ec0
        welcomeMessage:
          $ref: '#/components/schemas/WelcomeMessage'
        showRecentlyAddedAssets:
          type: boolean
          description: >-
            Whether this portal should include a preview of recently added
            assets
          example: true
        passcode:
          type: string
          nullable: true
          description: >-
            A passcode that must be provided when viewing a portal.  Note that
            this is NOT a password and as such is stored in plain text
          example: LetMeInPlease
        assetPermittedActions:
          $ref: '#/components/schemas/AssetPermittedActions'
    PortalWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/Portal'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    PortalPatchRequest:
      type: object
      properties:
        name:
          type: string
          nullable: true
          description: Name of the [`Portal`](#tag/Portals)
          example: Reseller portal
        slug:
          type: string
          nullable: true
          description: A human readable unique identifier, used in the Dash portal URL
          example: reseller-portal
        whitelistedFolderFieldOptionIds:
          description: >-
            The folder [`FieldOption`](#tag/Field-Options)s which portal users
            will have permission to view/download assets from.
          type: array
          nullable: true
          items:
            type: string
          example:
            - 4cb261ad-dffb-414e-89cf-6902e3031d44
            - 4e14dc90-eb7b-4fd2-87e5-e8968c236ec0
        welcomeMessage:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/WelcomeMessage'
        showRecentlyAddedAssets:
          type: boolean
          nullable: true
          description: >-
            Whether this portal should include a preview of recently added
            assets
          example: true
        passcode:
          description: >-
            A passcode that must be provided when viewing a portal.  Note that
            this is NOT a password and as such is stored in plain text
          $ref: '#/components/schemas/NullableStringFieldPatch'
        assetPermittedActions:
          $ref: '#/components/schemas/AssetPermittedActionsWithDefault'
    PortalSearchCriterion:
      oneOf:
        - $ref: '#/components/schemas/MatchAllSearchCriterion'
      discriminator:
        propertyName: type
        mapping:
          MATCH_ALL: '#/components/schemas/MatchAllSearchCriterion'
    PortalSortField:
      type: string
      enum:
        - NAME
      example: NAME
      description: The name of the [`Portal`](#tag/Portals) property value
    PortalSort:
      type: object
      required:
        - field
        - order
      properties:
        field:
          $ref: '#/components/schemas/PortalSortField'
        order:
          $ref: '#/components/schemas/SortOrder'
    PortalSearchRequest:
      allOf:
        - $ref: '#/components/schemas/BasePaginatedSearchInAccountRequest'
        - type: object
          required:
            - criterion
            - sorts
          properties:
            criterion:
              description: The search criterion
              $ref: '#/components/schemas/PortalSearchCriterion'
            sorts:
              description: Sorts to be applied to the search in order of precedence
              type: array
              items:
                $ref: '#/components/schemas/PortalSort'
    PortalSearch:
      type: object
      required:
        - results
        - totalResults
      properties:
        results:
          type: array
          description: >-
            The specified page of [`Portal`](#tag/Portals) resources which match
            the search criterion
          items:
            $ref: '#/components/schemas/PortalWithPermittedActions'
        totalResults:
          type: integer
          description: >-
            The total number of [`Portal`](#tag/Portals) resources which match
            the search criterion
          example: 15
    PubliclyAvailablePortalData:
      type: object
      required:
        - id
        - accountId
        - name
        - currentSlug
        - slugs
        - whitelistedFolderFieldOptionIds
        - welcomeMessage
        - showRecentlyAddedAssets
        - requiresPasscode
        - assetPermittedActions
      properties:
        id:
          type: string
          description: The unique ID of the [`Portal`](#tag/Portals)
          example: 55f9964c-095d-4b8b-bb5e-4118d2e76ad0
        accountId:
          description: >-
            The unique ID of the `Account` the [`Portal`](#tag/Portals) belongs
            to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        name:
          type: string
          description: Name of the [`Portal`](#tag/Portals)
          example: Reseller portal
        currentSlug:
          type: string
          description: A human readable unique identifier, used in the Dash portal URL
          example: reseller-portal
        slugs:
          description: >-
            The set of all slugs that have ever been used, maintained so that
            old share URLs can still work
          type: array
          items:
            type: string
          example:
            - reseller-portal
            - old-slug-here
        whitelistedFolderFieldOptionIds:
          description: >-
            The folder [`FieldOption`](#tag/Field-Options)s which portal users
            will have permission to view/download assets from.
          type: array
          items:
            type: string
          example:
            - 4cb261ad-dffb-414e-89cf-6902e3031d44
            - 4e14dc90-eb7b-4fd2-87e5-e8968c236ec0
        welcomeMessage:
          $ref: '#/components/schemas/WelcomeMessage'
        showRecentlyAddedAssets:
          type: boolean
          description: >-
            Whether this portal should include a preview of recently added
            assets
          example: true
        requiresPasscode:
          type: boolean
          description: Whether access to this portal requires a passcode
          example: true
        assetPermittedActions:
          $ref: '#/components/schemas/AssetPermittedActions'
    PubliclyAvailablePortalDataWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/PubliclyAvailablePortalData'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    PortalEmailRequest:
      type: object
      properties:
        portalId:
          type: string
          description: The unique ID for the [`Portal`](#tag/Portals) to be emailed
          example: 55f9964c-095d-4b8b-bb5e-4118d2e76ad0
        email:
          type: string
          description: The email address to send the [`Portal`](#tag/Portals) to
          example: john.smith@gmail.com
    GuestUploadRequest:
      type: object
      required:
        - folderFieldOptionId
        - name
      properties:
        folderFieldOptionId:
          description: >-
            The unique ID of the `Folder` where guest files are uploaded  when
            this [`GuestUpload`](#tag/Guest-Uploads) URL is used
          type: string
          example: c4e146aa3-543a-4d58-bf99-0d33cf73e942
        name:
          type: string
          description: >-
            A human readable name for the [`GuestUpload`](#tag/Guest-Uploads)
            URL
          example: Social media Content
        message:
          type: string
          nullable: true
          description: >-
            Optional message shown to anyone that visits the
            [`GuestUpload`](#tag/Guest-Uploads) URL
          example: Please upload your favourite social media pics for approval
        messageHeading:
          type: string
          nullable: true
          description: >-
            Optional message header shown to anyone that visits the
            [`GuestUpload`](#tag/Guest-Uploads) URL
          example: Social media uploads
    GuestUpload:
      type: object
      required:
        - id
        - accountId
        - folderFieldOptionId
        - name
        - currentSlug
        - slugs
      properties:
        id:
          type: string
          description: The unique ID of the [`GuestUpload`](#tag/Guest-Uploads) URL
          example: 55f9964c-095d-4b8b-bb5e-4118d2e76ad0
        accountId:
          description: >-
            The unique ID of the `Account` the
            [`GuestUpload`](#tag/Guest-Uploads) URL belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        folderFieldOptionId:
          description: >-
            The unique ID of the `Folder` where guest files are uploaded  when
            this [`GuestUpload`](#tag/Guest-Uploads) URL is used
          type: string
          example: c4e146aa3-543a-4d58-bf99-0d33cf73e942
        name:
          type: string
          description: >-
            A human readable name for the [`GuestUpload`](#tag/Guest-Uploads)
            URL
          example: Social media Content
        currentSlug:
          type: string
          description: >-
            A human readable unique identifier based on the
            [`GuestUpload`](#tag/Guest-Uploads) name, used in the GuestUpload
            URL
          example: puaon-social-media-content
        slugs:
          description: >-
            The set of all slugs that have ever been used, maintained so that
            old shared GuestUpload URLs can still work
          type: array
          items:
            type: string
          example:
            - puaon-social-media-content
            - azxmq-social-media-old
        message:
          type: string
          nullable: true
          description: >-
            Optional message shown to anyone that visits the
            [`GuestUpload`](#tag/Guest-Uploads) URL
          example: Please upload your favourite social media pics for approval
        messageHeading:
          type: string
          nullable: true
          description: >-
            Optional message header shown to anyone that visits the
            [`GuestUpload`](#tag/Guest-Uploads) URL
          example: Social media uploads
    GuestUploadWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/GuestUpload'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    GuestUploadPatchRequest:
      type: object
      properties:
        folderFieldOptionId:
          description: >-
            The unique ID of the `Folder` where guest files are uploaded  when
            this [`GuestUpload`](#tag/Guest-Uploads) URL is used
          type: string
          nullable: true
          example: c4e146aa3-543a-4d58-bf99-0d33cf73e942
        name:
          type: string
          nullable: true
          description: >-
            A human readable name for the [`GuestUpload`](#tag/Guest-Uploads)
            URL
          example: Social media Content
        message:
          type: string
          nullable: true
          description: >-
            Message shown to anyone that visits the
            [`GuestUpload`](#tag/Guest-Uploads) URL
          example: Please upload your favourite social media pics for approval
        messageHeading:
          type: string
          nullable: true
          description: >-
            Optional message header shown to anyone that visits the
            [`GuestUpload`](#tag/Guest-Uploads) URL
          example: Social media uploads
    GuestUploadSearchCriterion:
      oneOf:
        - $ref: '#/components/schemas/MatchAllSearchCriterion'
      discriminator:
        propertyName: type
        mapping:
          MATCH_ALL: '#/components/schemas/MatchAllSearchCriterion'
    GuestUploadSortField:
      type: string
      enum:
        - NAME
      example: NAME
      description: The name of the [`GuestUpload`](#tag/Guest-Uploads) property value
    GuestUploadSort:
      type: object
      required:
        - field
        - order
      properties:
        field:
          $ref: '#/components/schemas/GuestUploadSortField'
        order:
          $ref: '#/components/schemas/SortOrder'
    GuestUploadSearchRequest:
      allOf:
        - $ref: '#/components/schemas/BasePaginatedSearchInAccountRequest'
        - type: object
          required:
            - criterion
            - sorts
          properties:
            criterion:
              description: The search criterion
              $ref: '#/components/schemas/GuestUploadSearchCriterion'
            sorts:
              description: Sorts to be applied to the search in order of precedence
              type: array
              items:
                $ref: '#/components/schemas/GuestUploadSort'
    GuestUploadSearch:
      type: object
      required:
        - results
        - totalResults
      properties:
        results:
          type: array
          description: >-
            The specified page of [`GuestUpload`](#tag/Guest-Uploads) resources
            which match the search criterion
          items:
            $ref: '#/components/schemas/GuestUploadWithPermittedActions'
        totalResults:
          type: integer
          description: >-
            The total number of [`GuestUpload`](#tag/Guest-Uploads) resources
            which match the search criterion
          example: 15
    GuestUploadEmailRequest:
      type: object
      required:
        - guestUploadId
        - email
      properties:
        guestUploadId:
          type: string
          description: >-
            The unique ID for the [`GuestUpload`](#tag/Guest-Uploads) URL to be
            emailed
          example: 55f9964c-095d-4b8b-bb5e-4118d2e76ad0
        email:
          type: string
          description: >-
            The email address to send the [`GuestUpload`](#tag/Guest-Uploads)
            URL to
          example: john.smith@gmail.com
    GuestUploadAccessTokenRequest:
      type: object
      required:
        - id
        - email
      properties:
        guestUploadId:
          type: string
          description: The unique ID for the [`GuestUpload`](#tag/Guest-Uploads) URL
          example: 55f9964c-095d-4b8b-bb5e-4118d2e76ad0
        email:
          type: string
          description: The email address of the [`GuestUpload`](#tag/Guest-Uploads) user
          example: john.smith@gmail.com
    PubliclyAvailableGuestUploadData:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
          description: The unique ID of the [`GuestUpload`](#tag/Guest-Uploads) URL
          example: 55f9964c-095d-4b8b-bb5e-4118d2e76ad0
        name:
          type: string
          description: >-
            A human readable name for the [`GuestUpload`](#tag/Guest-Uploads)
            URL
          example: Social media Content
        message:
          type: string
          description: >-
            Optional message shown to anyone that visits the
            [`GuestUpload`](#tag/Guest-Uploads) URL
          example: Please upload your favourite social media pics for approval
        messageHeading:
          type: string
          description: >-
            Optional message header shown to anyone that visits the
            [`GuestUpload`](#tag/Guest-Uploads) URL
          example: Social media uploads
    PubliclyAvailableGuestUploadDataWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/PubliclyAvailableGuestUploadData'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    GoogleCloudConnectionRequest:
      type: object
      required:
        - type
        - authorizationCode
        - redirectUri
      properties:
        type:
          type: string
        authorizationCode:
          type: string
          description: >-
            The temporary OAuth2 authorization code that Dash can exchange for
            an access token to a user's Google Cloud
          example: e2b03444-8c5d-44ed-bd9f-7eee882bdf81
        redirectUri:
          type: string
          description: >-
            The redirect URI that was specified when getting the
            `authorizationCode`.
          example: https://auth.dash.app/cloud-connect
    DropboxCloudConnectionRequest:
      type: object
      required:
        - type
        - authorizationCode
        - redirectUri
      properties:
        type:
          type: string
        authorizationCode:
          type: string
          description: >-
            The temporary OAuth2 authorization code that Dash can exchange for
            an access token to a user's Dropbox
          example: e2b03444-8c5d-44ed-bd9f-7eee882bdf81
        redirectUri:
          type: string
          description: >-
            The redirect URI that was specified when getting the
            `authorizationCode`.
          example: https://auth.dash.app/cloud-connect
    CloudConnectionRequest:
      oneOf:
        - $ref: '#/components/schemas/GoogleCloudConnectionRequest'
        - $ref: '#/components/schemas/DropboxCloudConnectionRequest'
      discriminator:
        propertyName: type
        mapping:
          GOOGLE: '#/components/schemas/GoogleCloudConnectionRequest'
          DROPBOX: '#/components/schemas/DropboxCloudConnectionRequest'
    BaseCloudConnection:
      type: object
      required:
        - type
        - id
        - accountId
        - creatorId
      properties:
        type:
          type: string
        id:
          type: string
          description: The unique ID for the [`CloudConnection`](#tag/Cloud-Connections)
          example: e2b03444-8c5d-44ed-bd9f-7eee882bdf81
        accountId:
          description: >-
            The unique ID of the `Account` the
            [`CloudConnection`](#tag/Cloud-Connections) belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        creatorId:
          description: >-
            The ID of the [`User`](#tag/Users) who created the
            [`CloudConnection`](#tag/Cloud-Connections)
          type: string
          example: google-oauth2|110955770826801837334
    GoogleCloudConnection:
      allOf:
        - $ref: '#/components/schemas/BaseCloudConnection'
        - type: object
          required:
            - email
          properties:
            email:
              description: >-
                The email address of the user associated with the
                [`CloudConnection`](#tag/Cloud-Connections)
              type: string
              example: john.smith@gmail.com
            name:
              description: >-
                The name of the user associated with the
                [`CloudConnection`](#tag/Cloud-Connections), if they have one
              type: string
              nullable: true
              example: John Smith
            picture:
              description: >-
                A URL for the profile picture of the user associated with the
                [`CloudConnection`](#tag/Cloud-Connections), if they have one
              example: https://example.com/john-smith-picture.jpg
              type: string
              nullable: true
    DropboxCloudConnection:
      allOf:
        - $ref: '#/components/schemas/BaseCloudConnection'
        - type: object
          required:
            - email
          properties:
            email:
              description: >-
                The email address of the user associated with the
                [`CloudConnection`](#tag/Cloud-Connections)
              type: string
              example: john.smith@gmail.com
            name:
              description: >-
                The name of the user associated with the
                [`CloudConnection`](#tag/Cloud-Connections), if they have one
              type: string
              nullable: true
              example: John Smith
            picture:
              description: >-
                A URL for the profile picture of the user associated with the
                [`CloudConnection`](#tag/Cloud-Connections), if they have one
              example: https://example.com/john-smith-picture.jpg
              type: string
              nullable: true
    CloudConnection:
      oneOf:
        - $ref: '#/components/schemas/GoogleCloudConnection'
        - $ref: '#/components/schemas/DropboxCloudConnection'
      discriminator:
        propertyName: type
        mapping:
          GOOGLE: '#/components/schemas/GoogleCloudConnection'
          DROPBOX: '#/components/schemas/DropboxCloudConnection'
    CloudConnectionWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/CloudConnection'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    CloudObjectRootFolder:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - ROOT_FOLDER
    CloudObjectIdValue:
      type: object
      required:
        - type
        - value
      properties:
        type:
          type: string
          enum:
            - VALUE
        value:
          type: string
    CloudObjectIdValueOrRootFolder:
      oneOf:
        - $ref: '#/components/schemas/CloudObjectRootFolder'
        - $ref: '#/components/schemas/CloudObjectIdValue'
      discriminator:
        propertyName: type
        mapping:
          ROOT_FOLDER: '#/components/schemas/CloudObjectRootFolder'
          VALUE: '#/components/schemas/CloudObjectIdValue'
    BaseCloudObject:
      type: object
      required:
        - id
        - parentId
        - name
        - type
      properties:
        id:
          type: string
          description: Unique identifier of the cloud object
          example: be161977-d44e-4888-af3c-66522e223963
        parentId:
          $ref: '#/components/schemas/CloudObjectIdValueOrRootFolder'
        name:
          description: >-
            The name of the cloud object. May or may not contain a file
            extension depending on the Cloud Drive implementation
          type: string
          example: My File
        type:
          type: string
          description: The cloud object type
          enum:
            - FILE
            - FOLDER
            - FOLDER_SHORTCUT
            - FILE_SHORTCUT
    CloudFile:
      allOf:
        - $ref: '#/components/schemas/BaseCloudObject'
        - type: object
          required:
            - type
            - size
            - dateLastModified
          properties:
            type:
              type: string
              description: The cloud object type
              enum:
                - FILE
            size:
              type: integer
              description: The size of the cloud file
              example: 15318362
            dateLastModified:
              type: string
              description: >-
                The datetime the cloud file was last modified in ISO datetime
                format
              example: '2021-02-17T09:24:01.417Z'
            thumbnailUrl:
              type: string
              nullable: true
              description: URL for the file thumbnail if available
            iconUrl:
              type: string
              nullable: true
              description: URL for the file icon if available
    CloudFolder:
      allOf:
        - $ref: '#/components/schemas/BaseCloudObject'
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              description: The cloud object type
              enum:
                - FOLDER
    CloudFileShortcut:
      allOf:
        - $ref: '#/components/schemas/BaseCloudObject'
        - type: object
          required:
            - type
            - targetId
          properties:
            type:
              type: string
              description: The cloud object type
              enum:
                - FILE_SHORTCUT
            targetId:
              type: string
              description: The id of the cloud object the shortcut points to
    CloudFolderShortcut:
      allOf:
        - $ref: '#/components/schemas/BaseCloudObject'
        - type: object
          required:
            - type
            - targetId
          properties:
            type:
              type: string
              description: The cloud object type
              enum:
                - FOLDER_SHORTCUT
            targetId:
              type: string
              description: The id of the cloud object the shortcut points to
    CloudObject:
      oneOf:
        - $ref: '#/components/schemas/CloudFile'
        - $ref: '#/components/schemas/CloudFolder'
        - $ref: '#/components/schemas/CloudFileShortcut'
        - $ref: '#/components/schemas/CloudFolderShortcut'
      discriminator:
        propertyName: type
        mapping:
          FILE: '#/components/schemas/CloudFile'
          FOLDER: '#/components/schemas/CloudFolder'
          FILE_SHORTCUT: '#/components/schemas/CloudFileShortcut'
          FOLDER_SHORTCUT: '#/components/schemas/CloudFolderShortcut'
    CloudObjectSearchField:
      type: string
      enum:
        - PARENT_ID
      example: PARENT_ID
    CloudObjectFieldEqualsSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - type
            - field
            - value
          properties:
            type:
              type: string
              enum:
                - FIELD_EQUALS
            field:
              $ref: '#/components/schemas/CloudObjectSearchField'
            value:
              $ref: '#/components/schemas/CloudObjectIdValueOrRootFolder'
    CloudObjectMatchesTextSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/SearchCriterion'
        - type: object
          required:
            - type
            - text
          properties:
            type:
              type: string
              enum:
                - MATCHES_TEXT
            text:
              type: string
              description: The text to match on
              example: interesting things
    CloudObjectSearchCriterion:
      oneOf:
        - $ref: '#/components/schemas/CloudObjectFieldEqualsSearchCriterion'
        - $ref: '#/components/schemas/CloudObjectMatchesTextSearchCriterion'
      discriminator:
        propertyName: type
        mapping:
          FIELD_EQUALS: '#/components/schemas/CloudObjectFieldEqualsSearchCriterion'
          MATCHES_TEXT: '#/components/schemas/CloudObjectMatchesTextSearchCriterion'
    CloudObjectPagedSearchRequest:
      type: object
      required:
        - cloudConnectionId
        - criterion
      properties:
        cloudConnectionId:
          type: string
          description: >-
            The unique ID for the [`CloudConnection`](#tag/Cloud-Connections) to
            search in
          example: e2b03444-8c5d-44ed-bd9f-7eee882bdf81
        criterion:
          description: The search criterion
          $ref: '#/components/schemas/CloudObjectSearchCriterion'
        pageSize:
          description: The maximum number of items to return in the result set
          type: integer
          example: 100
          default: 100
        pageToken:
          type: string
          nullable: true
          description: The page token to continue a previous search
          example: hds7bs78bbw7v8w
    CloudObjectPagedSearch:
      type: object
      required:
        - results
      properties:
        results:
          type: array
          description: >-
            The specified page of [`CloudObject`] resources which match the
            search criterion
          items:
            $ref: '#/components/schemas/CloudObject'
        nextPage:
          type: object
          nullable: true
          allOf:
            - $ref: '#/components/schemas/CloudObjectPagedSearchRequest'
    CloudObjectsSelectorByIds:
      type: object
      required:
        - type
        - cloudObjectIds
      properties:
        type:
          enum:
            - BY_IDS
        cloudObjectIds:
          type: array
          description: The list of cloud object ids to select
          items:
            type: string
    CloudObjectsSelector:
      oneOf:
        - $ref: '#/components/schemas/CloudObjectsSelectorByIds'
      discriminator:
        propertyName: type
        mapping:
          BY_IDS: '#/components/schemas/CloudObjectsSelectorByIds'
    CloudObjectPathMapping:
      type: object
      required:
        - matchPrefix
        - removePrefix
        - addPrefix
      properties:
        matchPrefix:
          type: string
          description: >-
            Apply mappings to [`CloudObject`] resources with a path that matches
            this prefix
          example: path/to/folder
        removePrefix:
          type: string
          description: >-
            Remove this prefix from the path of matching [`CloudObject`]
            resources
          example: path/to/
        addPrefix:
          type: string
          description: Add this prefix to the path of matching [`CloudObject`] resources
          example: new-folder/
    CloudImportJobRequest:
      type: object
      required:
        - cloudConnectionId
        - criterion
        - keepFolderStructure
        - destinationPath
      properties:
        cloudConnectionId:
          type: string
          description: >-
            The unique ID for the [`CloudConnection`](#tag/Cloud-Connections) to
            import files from
          example: e2b03444-8c5d-44ed-bd9f-7eee882bdf81
        selector:
          $ref: '#/components/schemas/CloudObjectsSelector'
        keepFolderStructure:
          type: boolean
          description: >-
            Whether to maintain the source folder structure beneath the selected
            objects
          example: true
        destinationPath:
          type: string
          description: >-
            The path of the folder in Dash to import the files into. Use an
            empty string to import to the top level.
          example: path/to/folder
        pathMappings:
          type: array
          description: >-
            A list of [`CloudObjectPathMapping`]s to apply to the imported
            [`CloudObject`]s
          items:
            $ref: '#/components/schemas/CloudObjectPathMapping'
    CloudImportResult:
      type: object
      required:
        - totalObjects
        - foldersSkipped
        - emptyFilesSkipped
        - otherFilesSkipped
        - filesFailedToImport
        - filesAlreadyImported
        - filesSuccessfullyImported
      properties:
        totalObjects:
          type: integer
          example: 100
        foldersSkipped:
          type: integer
          example: 1
        emptyFilesSkipped:
          type: integer
          example: 2
        otherFilesSkipped:
          type: integer
          example: 3
        filesFailedToImport:
          type: integer
          example: 4
        filesAlreadyImported:
          type: integer
          example: 5
        filesSuccessfullyImported:
          type: integer
          example: 85
    CloudImportCompletedJob:
      allOf:
        - $ref: '#/components/schemas/CompletedJob'
        - type: object
          required:
            - result
          properties:
            result:
              $ref: '#/components/schemas/CloudImportResult'
    CloudImportJob:
      oneOf:
        - $ref: '#/components/schemas/InProgressJob'
        - $ref: '#/components/schemas/CloudImportCompletedJob'
        - $ref: '#/components/schemas/FailedJob'
      discriminator:
        propertyName: type
        mapping:
          IN_PROGRESS: '#/components/schemas/InProgressJob'
          COMPLETED: '#/components/schemas/CloudImportCompletedJob'
          FAILED: '#/components/schemas/FailedJob'
    CloudImportJobWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/CloudImportJob'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    ShopifyConnection:
      type: object
      required:
        - id
        - clientId
      properties:
        id:
          description: The shop name that uniquely identifies a Shopify connection
          type: string
          example: example.myshopify.com
        clientId:
          description: The Client ID required to use Shopify's App Bridge framework
          type: string
          example: 339764aa5d7d5cd60ad55a48d3e4fc8d
    ShopifyConnectionWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/ShopifyConnection'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    LimitedDownloads:
      type: object
      required:
        - type
        - limit
      properties:
        type:
          type: string
          enum:
            - LIMITED
        limit:
          type: integer
          description: The maximum number of downloads allowed each month
          example: 1000
    UnlimitedDownloads:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - UNLIMITED
    Downloads:
      oneOf:
        - $ref: '#/components/schemas/LimitedDownloads'
        - $ref: '#/components/schemas/UnlimitedDownloads'
      discriminator:
        propertyName: type
        mapping:
          LIMITED: '#/components/schemas/LimitedDownloads'
          UNLIMITED: '#/components/schemas/UnlimitedDownloads'
    TieredValueBasedPlan:
      type: object
      required:
        - type
        - planName
        - downloads
        - assetsIncludedInPlan
        - extraAssets
        - assets
      properties:
        type:
          type: string
          enum:
            - TIERED_VALUE_BASED
        planName:
          type: string
          example: STARTUP
          enum:
            - STARTUP
            - SMALL_TEAM
            - GROWING_BRAND
            - ESTABLISHED_BRAND
        downloads:
          $ref: '#/components/schemas/Downloads'
        assetsIncludedInPlan:
          type: integer
          example: 2000
        extraAssets:
          type: integer
          example: 1000
        assets:
          type: integer
          example: 3000
    StorageAndDownloadsPlan:
      type: object
      required:
        - type
        - planName
        - downloads
        - storageIncludedInPlanInGb
        - extraStorageInGb
        - storageInGb
      properties:
        type:
          type: string
          enum:
            - STORAGE_AND_DOWNLOADS
        planName:
          type: string
          example: STARTUP
          enum:
            - STARTUP
            - SMALL_TEAM
            - GROWING_BRAND
            - ESTABLISHED_BRAND
        downloads:
          $ref: '#/components/schemas/Downloads'
        storageIncludedInPlanInGb:
          type: integer
          example: 50
        extraStorageInGb:
          type: integer
          example: 10
        storageInGb:
          type: integer
          example: 60
    StorageAndDownloadsV7Plan:
      type: object
      required:
        - type
        - planName
        - downloads
        - storageIncludedInPlanInGb
        - extraStorageInGb
        - storageInGb
      properties:
        type:
          type: string
          enum:
            - STORAGE_AND_DOWNLOADS_V7
        planName:
          type: string
          example: STARTUP
          enum:
            - STARTUP
            - GROWING_BRAND
            - ESTABLISHED_BRAND
            - ENTERPRISE
        downloads:
          $ref: '#/components/schemas/Downloads'
        storageIncludedInPlanInGb:
          type: integer
          example: 50
        extraStorageInGb:
          type: integer
          example: 10
        storageInGb:
          type: integer
          example: 60
    StorageAndDownloadsV8Plan:
      type: object
      required:
        - type
        - planName
        - downloads
        - storageIncludedInPlanInGb
        - extraStorageInGb
        - storageInGb
      properties:
        type:
          type: string
          enum:
            - STORAGE_AND_DOWNLOADS_V8
        planName:
          type: string
          example: STARTUP
          enum:
            - STARTUP
            - GROWING_BRAND
            - ESTABLISHED_BRAND
            - ENTERPRISE
        downloads:
          $ref: '#/components/schemas/Downloads'
        storageIncludedInPlanInGb:
          type: integer
          example: 50
        extraStorageInGb:
          type: integer
          example: 10
        storageInGb:
          type: integer
          example: 60
    FeatureBasedPlan:
      type: object
      required:
        - type
        - planName
        - users
        - storageInGb
      properties:
        type:
          type: string
          enum:
            - FEATURE_BASED
        planName:
          type: string
          example: STARTING
          enum:
            - STARTING
            - GROWING
            - DASHING
        users:
          type: integer
          example: 4
        storageInGb:
          type: integer
          example: 60
    SliderValueBasedPlan:
      type: object
      required:
        - type
        - downloads
        - assets
      properties:
        type:
          type: string
          enum:
            - SLIDER_VALUE_BASED
        downloads:
          type: integer
          example: 150
        assets:
          type: integer
          example: 3000
    Plan:
      oneOf:
        - $ref: '#/components/schemas/TieredValueBasedPlan'
        - $ref: '#/components/schemas/StorageAndDownloadsPlan'
        - $ref: '#/components/schemas/StorageAndDownloadsV7Plan'
        - $ref: '#/components/schemas/StorageAndDownloadsV8Plan'
        - $ref: '#/components/schemas/FeatureBasedPlan'
        - $ref: '#/components/schemas/SliderValueBasedPlan'
      discriminator:
        propertyName: type
        mapping:
          TIERED_VALUE_BASED: '#/components/schemas/TieredValueBasedPlan'
          STORAGE_AND_DOWNLOADS: '#/components/schemas/StorageAndDownloadsPlan'
          STORAGE_AND_DOWNLOADS_V7: '#/components/schemas/StorageAndDownloadsV7Plan'
          STORAGE_AND_DOWNLOADS_V8: '#/components/schemas/StorageAndDownloadsV8Plan'
          FEATURE_BASED: '#/components/schemas/FeatureBasedPlan'
          SLIDER_VALUE_BASED: '#/components/schemas/SliderValueBasedPlan'
    Address:
      type: object
      required:
        - country
        - line1
      properties:
        country:
          type: string
          example: United Kingdom
        state:
          type: string
          nullable: true
          example: Texas
        city:
          type: string
          nullable: true
          example: Brighton
        postalCode:
          type: string
          nullable: true
          example: BN1 1AB
        line1:
          type: string
          example: Flat 56
        line2:
          type: string
          nullable: true
          example: 13 some road
    Amount:
      type: object
      required:
        - amountWithTax
        - amountWithoutTax
        - includesTax
      properties:
        amountWithTax:
          type: integer
          description: >-
            The price of the subscription in the lowest denomination of the
            chosen currency
          example: 12000
        amountWithoutTax:
          type: integer
          description: >-
            The price of the subscription without tax in the lowest denomination
            of the chosen currency
          example: 10000
        includesTax:
          type: boolean
          description: Whether the price for the subscription includes tax
          example: true
    Billing:
      type: object
      required:
        - name
        - email
        - address
        - period
        - currency
        - nextBillingDate
        - amount
      properties:
        name:
          type: string
          description: The name of the billing contact
          example: Example name
        email:
          type: string
          description: The email of the billing contact
          example: email@example.com
        address:
          $ref: '#/components/schemas/Address'
        period:
          type: string
          description: How frequently you want to be billed
          example: MONTHLY
          enum:
            - MONTHLY
            - QUARTERLY
            - SEMIANNUALLY
            - ANNUALLY
            - BIENNIALLY
        currency:
          type: string
          description: The currency code of the currency you want to pay in
          example: GBP
          enum:
            - GBP
            - EUR
            - USD
            - AUD
            - CAD
        nextBillingDate:
          type: string
          format: date-time
          description: The datetime the next invoice for the subscription will be sent
          example: '2021-02-17T09:24:01.417Z'
        amount:
          $ref: '#/components/schemas/Amount'
    Coupon:
      type: object
      required:
        - id
        - name
        - discountPercentage
        - status
      properties:
        id:
          type: string
          description: The ID of the coupon
          example: 5%OFF-COUPON
        name:
          type: string
          description: The name of the coupon
          example: 5% off coupon
        discountPercentage:
          type: number
          format: double
          description: The percentage discount given by the coupon
          example: 12.5
        status:
          type: string
          description: The status of the coupon
          example: ACTIVE
          enum:
            - ACTIVE
            - EXPIRED
            - ARCHIVED
            - DELETED
    SignupUser:
      type: object
      required:
        - email
      properties:
        email:
          type: string
          description: Email of the user who is signing up
          example: some@email.com
        name:
          type: string
          nullable: true
          description: Name of the user who is signing up
          example: Some Name
    CreatedSubscription:
      type: object
      required:
        - type
        - accountId
        - startDate
        - plan
        - companyName
        - billing
        - coupons
        - signupUser
      properties:
        type:
          type: string
          enum:
            - CREATED
        accountId:
          description: >-
            The unique ID of the `Account` the
            [`Subscription`](#tag/Subscription) is for
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        startDate:
          type: string
          format: date-time
          description: >-
            The datetime the [`Subscription`](#tag/Subscription) started in ISO
            datetime format
          example: '2021-02-17T09:24:01.417Z'
        companyName:
          description: The company name of the [`Subscription`](#tag/Subscription)
          type: string
          nullable: true
          example: Acme Inc.
        plan:
          $ref: '#/components/schemas/Plan'
        billing:
          $ref: '#/components/schemas/Billing'
        coupons:
          type: array
          items:
            $ref: '#/components/schemas/Coupon'
        signupUser:
          $ref: '#/components/schemas/SignupUser'
    PendingSubscription:
      type: object
      required:
        - type
        - accountId
        - setupIntentId
      properties:
        type:
          type: string
          enum:
            - PENDING
        accountId:
          description: >-
            The unique ID of the `Account` the
            [`Subscription`](#tag/Subscription) is for
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        setupIntentId:
          description: A unique reference to a payment provider's setup intent object
          type: string
          example: some-setup-intent-id
        subscriptionIntentId:
          description: A unique reference to a subscription intent object
          type: string
          nullable: true
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
    FailedSubscription:
      type: object
      required:
        - type
        - accountId
        - setupIntentId
        - failure
      properties:
        type:
          type: string
          enum:
            - FAILED
        accountId:
          description: >-
            The unique ID of the `Account` the
            [`Subscription`](#tag/Subscription) is for
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        setupIntentId:
          description: A unique reference to a payment provider's setup intent object
          type: string
          example: some-setup-intent-id
        subscriptionIntentId:
          description: A unique reference to a subscription intent object
          type: string
          nullable: true
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        failure:
          description: The reason this subscription could not be created
          type: string
          example: This is the reason that the subscription could not be created
    Subscription:
      oneOf:
        - $ref: '#/components/schemas/CreatedSubscription'
        - $ref: '#/components/schemas/PendingSubscription'
        - $ref: '#/components/schemas/FailedSubscription'
      discriminator:
        propertyName: type
        mapping:
          CREATED: '#/components/schemas/CreatedSubscription'
          PENDING: '#/components/schemas/PendingSubscription'
          FAILED: '#/components/schemas/FailedSubscription'
    SubscriptionWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/Subscription'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    CreatedSubscriptionWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/CreatedSubscription'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    TieredValueBasedPlanRequest:
      type: object
      required:
        - type
        - planName
        - extraAssets
      properties:
        type:
          type: string
          enum:
            - TIERED_VALUE_BASED
        planName:
          type: string
          example: STARTUP
          enum:
            - STARTUP
            - SMALL_TEAM
            - GROWING_BRAND
            - ESTABLISHED_BRAND
        extraAssets:
          type: integer
          example: 1000
    StorageAndDownloadsPlanRequest:
      type: object
      required:
        - type
        - planName
        - extraStorageInGb
      properties:
        type:
          type: string
          enum:
            - STORAGE_AND_DOWNLOADS
        planName:
          type: string
          example: STARTUP
          enum:
            - STARTUP
            - SMALL_TEAM
            - GROWING_BRAND
            - ESTABLISHED_BRAND
        extraStorageInGb:
          type: integer
          example: 10
    StorageAndDownloadsV7PlanRequest:
      type: object
      required:
        - type
        - planName
        - extraStorageInGb
      properties:
        type:
          type: string
          enum:
            - STORAGE_AND_DOWNLOADS_V7
        planName:
          type: string
          example: STARTUP
          enum:
            - STARTUP
            - GROWING_BRAND
            - ESTABLISHED_BRAND
            - ENTERPRISE
        extraStorageInGb:
          type: integer
          example: 10
    StorageAndDownloadsV8PlanRequest:
      type: object
      required:
        - type
        - planName
        - extraStorageInGb
      properties:
        type:
          type: string
          enum:
            - STORAGE_AND_DOWNLOADS_V8
        planName:
          type: string
          example: STARTUP
          enum:
            - STARTUP
            - GROWING_BRAND
            - ESTABLISHED_BRAND
            - ENTERPRISE
        extraStorageInGb:
          type: integer
          example: 10
    PlanRequest:
      oneOf:
        - $ref: '#/components/schemas/TieredValueBasedPlanRequest'
        - $ref: '#/components/schemas/StorageAndDownloadsPlanRequest'
        - $ref: '#/components/schemas/StorageAndDownloadsV7PlanRequest'
        - $ref: '#/components/schemas/StorageAndDownloadsV8PlanRequest'
      discriminator:
        propertyName: type
        mapping:
          TIERED_VALUE_BASED: '#/components/schemas/TieredValueBasedPlanRequest'
          STORAGE_AND_DOWNLOADS: '#/components/schemas/StorageAndDownloadsPlanRequest'
          STORAGE_AND_DOWNLOADS_V7: '#/components/schemas/StorageAndDownloadsV7PlanRequest'
          STORAGE_AND_DOWNLOADS_V8: '#/components/schemas/StorageAndDownloadsV8PlanRequest'
    BillingRequest:
      type: object
      required:
        - billingPeriod
        - currency
      properties:
        billingPeriod:
          type: string
          description: How frequently you want to be billed
          example: MONTHLY
          enum:
            - MONTHLY
            - ANNUALLY
        currency:
          type: string
          description: The currency code of the currency you want to pay in
          example: GBP
          enum:
            - GBP
            - EUR
            - USD
            - AUD
            - CAD
        country:
          type: string
          description: The country code of the billing address
          nullable: true
          example: GB
    SubscriptionIntentRequest:
      type: object
      required:
        - planRequest
        - billingRequest
        - signupUser
        - couponIds
      properties:
        planRequest:
          $ref: '#/components/schemas/PlanRequest'
          description: The plan of the subscription you intend to pay for
        billingRequest:
          $ref: '#/components/schemas/BillingRequest'
          description: The billing details of the subscription you intend to pay for
        signupUser:
          $ref: '#/components/schemas/SignupUser'
          description: The details of the user that is signing up
        couponIds:
          type: array
          description: The coupon IDs to apply to the subscription you intend to pay for
          items:
            type: string
    PendingPaymentStatus:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - PENDING
    ApprovedPaymentStatus:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - APPROVED
    SucceededPaymentStatus:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - SUCCEEDED
    FailedPaymentStatus:
      type: object
      required:
        - type
        - errorCode
        - errorText
      properties:
        type:
          type: string
          enum:
            - FAILED
        errorCode:
          type: string
          description: The error code received from the payment platform
          example: 1234
        errorText:
          type: string
          description: The error message received from the payment platform
          example: Insufficient funds
    PaymentStatus:
      oneOf:
        - $ref: '#/components/schemas/PendingPaymentStatus'
        - $ref: '#/components/schemas/ApprovedPaymentStatus'
        - $ref: '#/components/schemas/SucceededPaymentStatus'
        - $ref: '#/components/schemas/FailedPaymentStatus'
      discriminator:
        propertyName: type
        mapping:
          PENDING: '#/components/schemas/PendingPaymentStatus'
          APPROVED: '#/components/schemas/ApprovedPaymentStatus'
          SUCCEEDED: '#/components/schemas/SucceededPaymentStatus'
          FAILED: '#/components/schemas/FailedPaymentStatus'
    SubscriptionIntent:
      type: object
      required:
        - id
        - setupIntentId
        - setupIntentClientSecret
        - accountId
        - amount
        - planRequest
        - billingRequest
        - signupUser
        - coupons
        - paymentStatus
      properties:
        id:
          type: string
          description: A unique reference to a subscription intent object
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        setupIntentId:
          type: string
          description: A unique reference to a payment provider's setup intent object
          example: some-setup-intent-id
        setupIntentClientSecret:
          type: string
          description: >-
            The secret used to add a payment method to the setup intent using a
            payment provider
          example: some-setup-intent-client-secret
        accountId:
          type: string
          description: >-
            The account ID of the account that this subscription intent belongs
            to
        amount:
          $ref: '#/components/schemas/Amount'
        planRequest:
          $ref: '#/components/schemas/PlanRequest'
          description: The plan of the subscription you intend to pay for
        billingRequest:
          $ref: '#/components/schemas/BillingRequest'
          description: The billing details of the subscription you intend to pay for
        signupUser:
          $ref: '#/components/schemas/SignupUser'
          description: The details of the user that is signing up
        coupons:
          type: array
          description: The coupons to apply to the subscription you intend to pay for
          items:
            $ref: '#/components/schemas/Coupon'
        paymentStatus:
          $ref: '#/components/schemas/PaymentStatus'
          description: The status of the payment for the subscription
    SubscriptionIntentWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/SubscriptionIntent'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    SubscriptionIntentPatchRequest:
      type: object
      properties:
        planRequest:
          $ref: '#/components/schemas/PlanRequest'
          nullable: true
          description: The plan of the subscription you intend to pay for
        billingRequest:
          $ref: '#/components/schemas/BillingRequest'
          nullable: true
          description: The billing details of the subscription you intend to pay for
        signupUser:
          $ref: '#/components/schemas/SignupUser'
          nullable: true
          description: The details of the user that is signing up
        couponIds:
          type: array
          nullable: true
          description: The coupon IDs to apply to the subscription you intend to pay for
          items:
            type: string
    DownloadCountInDateRange:
      type: object
      required:
        - dateFrom
        - dateTo
        - downloadCount
      properties:
        dateFrom:
          type: string
          format: date-time
          description: Date downloads are counted from
          example: '2024-01-15T00:00:00.000Z'
        dateTo:
          type: string
          format: date-time
          description: Date downloads are counted to
          example: '2024-02-15T00:00:00.000Z'
        downloadCount:
          type: integer
          description: Number of downloads in this date range
          example: 15
    DownloadCountsByUserType:
      type: object
      description: Download usage in the last month broken down into different categories
      required:
        - downloadsBySignedInUsers
        - downloadsByPublicVisitors
        - activeEmbeddableLinks
      properties:
        downloadsBySignedInUsers:
          type: integer
          description: Number of downloads by signed-in users in the last month
          example: 67
        downloadsByPublicVisitors:
          type: integer
          description: >-
            Number of downloads by portal users and share link users in the last
            month
          example: 0
        activeEmbeddableLinks:
          type: integer
          description: Number of currently-active embeddable links
          example: 15
    SubscriptionUsage:
      type: object
      required:
        - lastSixMonthsDownloadCountsChronologically
        - lastMonthDownloadCountsByUserType
        - storageBytesStored
        - numberOfAssets
      properties:
        lastSixMonthsDownloadCountsChronologically:
          type: array
          items:
            $ref: '#/components/schemas/DownloadCountInDateRange'
          minItems: 6
          maxItems: 6
          description: Download counts for the last 6 months in chronological order
        lastMonthDownloadCountsByUserType:
          $ref: '#/components/schemas/DownloadCountsByUserType'
        storageBytesStored:
          type: integer
          description: Number of bytes of data currently stored
          example: 7981506322
        numberOfAssets:
          type: integer
          description: Total number of assets currently in account
          example: 2540
    EmbeddableLinkPatchRequest:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          description: The status of the AssetEmbeddableLink
          enum:
            - REVOKED
    DeterminedTransformation:
      type: object
      required:
        - transformations
      properties:
        transformations:
          type: array
          items:
            $ref: '#/components/schemas/Transformation'
    EmbeddableLink:
      type: object
      required:
        - id
        - accountId
        - assetId
        - assetFileId
        - transformationDescription
        - determinedTransformation
        - status
        - fileStatus
        - url
      properties:
        id:
          type: string
          description: >-
            The unique ID of the
            [`AssetEmbeddableLink`](#tag/Asset-Embeddable-Links)
          example: 02e3b733-57c0-43f1-bee4-687569cf1bfa
        accountId:
          description: >-
            The unique ID of the `Account` the
            [`AssetEmbeddableLink`](#tag/Asset-Embeddable-Links) belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        assetId:
          type: string
          description: >-
            The ID of the [`Asset`](#tag/Assets) the
            [`AssetEmbeddableLink`](#tag/Asset-Embeddable-Links) is for
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        assetFileId:
          type: string
          description: >-
            The ID of the [`AssetFile`](#operation/getAssetFiles) the
            [`AssetEmbeddableLink`](#tag/Asset-Embeddable-Links) is for
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        transformationDescription:
          $ref: '#/components/schemas/TransformationDescription'
        determinedTransformation:
          $ref: '#/components/schemas/DeterminedTransformation'
        status:
          type: string
          description: >-
            The high level status of the
            [`AssetEmbeddableLink`](#tag/Asset-Embeddable-Links)
          example: ACTIVE
          enum:
            - PENDING
            - ACTIVE
            - FAILED
            - REVOKE_REQUESTED
            - REVOKED
        fileStatus:
          type: string
          description: More in depth status on the generation of the file itself
          example: COPIED
          enum:
            - TEMP_FILE_PENDING
            - TEMP_FILE_FAILED
            - TEMP_FILE_GENERATED
            - COPY_PENDING
            - COPIED
            - DELETE_PENDING
            - DELETED
        url:
          type: string
          description: The location of the actual embeddable file
          example: >-
            https://link.assetfile.io/3KdYk7kAiPS0kxhOC43krJ/axel-vazquez-5bb6VFLYCCM-unsplash.jpg
    EmbeddableLinkWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/EmbeddableLink'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    EmbeddableLinkDetails:
      type: object
      required:
        - assetId
      properties:
        assetId:
          type: string
          description: >-
            The ID of the [`Asset`](#tag/Assets) to create an embeddable link
            for
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        assetFileId:
          type: string
          nullable: true
          description: >-
            The ID of the [`AssetFile`](#operation/getAssetFiles) to create an
            embeddable link for. If null the current
            [`AssetFile`](#operation/getAssetFiles) is used.
          example: 7af90a8b-7ccd-430f-a85d-e8614015bc47
        presetParameters:
          type: array
          description: PresetParameters for this `assetId`
          default: []
          items:
            $ref: '#/components/schemas/PresetParameters'
    EmbeddableLinkBatchRequestItem:
      allOf:
        - $ref: '#/components/schemas/BatchItem'
        - $ref: '#/components/schemas/EmbeddableLinkDetails'
    EmbeddableLinkBatchRequest:
      type: object
      required:
        - items
        - transformationDescription
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/EmbeddableLinkBatchRequestItem'
        transformationDescription:
          $ref: '#/components/schemas/TransformationDescription'
    EmbeddableLinkFailure:
      type: string
      enum:
        - INVALID
        - FORBIDDEN
        - FAILURE
    EmbeddableLinkBatch:
      type: object
      required:
        - results
        - failures
      properties:
        results:
          type: object
          description: A map of results keyed on the `batchItemId` provided in the request
          additionalProperties:
            $ref: '#/components/schemas/EmbeddableLinkWithPermittedActions'
        failures:
          type: object
          description: A map of failures keyed on the `batchItemId` provided in the request
          additionalProperties:
            $ref: '#/components/schemas/EmbeddableLinkFailure'
    EmbeddableLinkBatchCompletedJob:
      allOf:
        - $ref: '#/components/schemas/CompletedJob'
        - type: object
          required:
            - result
          properties:
            result:
              $ref: '#/components/schemas/EmbeddableLinkBatch'
    EmbeddableLinkBatchJob:
      oneOf:
        - $ref: '#/components/schemas/InProgressJob'
        - $ref: '#/components/schemas/EmbeddableLinkBatchCompletedJob'
        - $ref: '#/components/schemas/FailedJob'
      discriminator:
        propertyName: type
        mapping:
          IN_PROGRESS: '#/components/schemas/InProgressJob'
          COMPLETED: '#/components/schemas/EmbeddableLinkBatchCompletedJob'
          FAILED: '#/components/schemas/FailedJob'
    EmbeddableLinkSearchField:
      type: string
      enum:
        - ASSET_ID
      example: ASSET_ID
      description: >-
        The name of the [`AssetEmbeddableLink`](#tag/Asset-Embeddable-Links)
        property value to search by
    EmbeddableLinkFieldInSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldInSearchCriterion'
        - type: object
          required:
            - type
            - field
          properties:
            type:
              type: string
              enum:
                - FIELD_IN
            field:
              $ref: '#/components/schemas/EmbeddableLinkSearchField'
    EmbeddableLinkSearchCriterion:
      oneOf:
        - $ref: '#/components/schemas/EmbeddableLinkFieldInSearchCriterion'
      discriminator:
        propertyName: type
        mapping:
          FIELD_IN: '#/components/schemas/EmbeddableLinkFieldInSearchCriterion'
    EmbeddableLinkSortField:
      type: string
      enum:
        - ASSET_ID
      example: ASSET_ID
      description: >-
        The name of the [`EmbeddableLink`](#tag/Asset-Embeddable-Links) property
        value to sort by
    EmbeddableLinkSort:
      type: object
      properties:
        field:
          $ref: '#/components/schemas/EmbeddableLinkSortField'
        order:
          $ref: '#/components/schemas/SortOrder'
    EmbeddableLinkSearchRequest:
      allOf:
        - $ref: '#/components/schemas/BasePaginatedSearchInAccountRequest'
        - type: object
          properties:
            criterion:
              description: The search criterion
              $ref: '#/components/schemas/EmbeddableLinkSearchCriterion'
            sorts:
              description: Sorts to be applied to the search in order of precedence
              type: array
              items:
                $ref: '#/components/schemas/EmbeddableLinkSort'
    EmbeddableLinkSearch:
      type: object
      properties:
        results:
          type: array
          description: >-
            The specified page of
            [`AssetEmbeddableLink`](#tag/Asset-Embeddable-Links) resources which
            match the search criterion
          items:
            $ref: '#/components/schemas/EmbeddableLinkWithPermittedActions'
        totalResults:
          type: integer
          description: >-
            The total number of
            [`AssetEmbeddableLink`](#tag/Asset-Embeddable-Links) resources which
            match the search criterion
          example: 15
    PlatformUserRequest:
      type: object
      required:
        - email
        - password
      properties:
        email:
          description: The email address of the new user
          type: string
          example: ken.hasselback@gmail.com
        password:
          description: The password of the new user
          type: string
          example: password
        firstName:
          nullable: true
          description: The first name of the new user
          type: string
          example: Ken
        lastName:
          nullable: true
          description: The last name of the new user
          type: string
          example: Hasselback
    PlatformUserPatchRequest:
      type: object
      properties:
        firstName:
          nullable: true
          description: The updated first name of the user
          type: string
          example: Bob
        lastName:
          nullable: true
          description: The updated last name of the user
          type: string
          example: Syurunkl
    PlatformCurrentUserAccountSearchRequest:
      type: object
      properties:
        from:
          description: The item number to begin the result set from
          type: integer
          example: 0
          default: 0
        pageSize:
          description: The maximum number of items to return in the result set
          type: integer
          example: 100
          default: 100
    PlatformUserForgottenPasswordRequest:
      type: object
      required:
        - email
      properties:
        email:
          description: The email address to send the password reset to
          type: string
          example: john.smith@gmail.com
    PlatformUserResetPasswordRequest:
      type: object
      required:
        - userId
        - password
      properties:
        userId:
          description: The id of the user to reset the password for
          type: string
          example: john.smith@gmail.com
        password:
          description: The new password
          type: string
          example: password2
    PlatformUserSignUpTokenRequest:
      type: object
      required:
        - email
        - activationCode
      properties:
        email:
          description: The email address that the token should allow sign-up for
          type: string
          example: john.smith@gmail.com
        verificationCode:
          description: >-
            The  code which confirms the caller is verified owner of the
            supplied email address
          type: string
    PlatformUserSignUpToken:
      type: object
      required:
        - token
      properties:
        token:
          description: The authentication token to be used to complete sign-up
          type: string
    PlatformUserVerificationRequest:
      type: object
      required:
        - email
      properties:
        email:
          description: The email address to send the verification code to
          type: string
          example: john.smith@gmail.com
    EntityQuotaOverride:
      type: object
      required:
        - id
        - accountId
        - entityName
        - quota
      properties:
        id:
          type: string
          description: >-
            The unique ID of the
            [`EntityQuotaOverride`](#tag/EntityQuotaOverride)
          example: 18214033-c6b0-4e53-be89-3eca66297c5d
        accountId:
          description: >-
            The unique ID of the `Account` the
            [`EntityQuotaOverride`](#tag/EntityQuotaOverride) belongs to
          type: string
          example: cfb665ca-ce35-4418-b9d5-70ee815db4bd
        entityName:
          type: string
          description: >-
            The name of the entity that is having its quota overridden for this
            account
          example: USER
        quota:
          type: number
          description: The entity's new quota amount for this account
          example: 5000
    EntityQuotaOverrideWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/EntityQuotaOverride'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    EntityQuotaOverrideRequest:
      type: object
      required:
        - quota
      properties:
        quota:
          type: number
          description: The entity's new quota amount for this account
          example: 5000
    ShopifyProductSearchField:
      type: string
      enum:
        - SKU
      example: SKU
      description: The name of the Shopify Product property value
    ShopifyProductFieldInSearchCriterion:
      allOf:
        - $ref: '#/components/schemas/FieldInSearchCriterion'
        - type: object
          required:
            - type
            - field
          properties:
            type:
              type: string
              enum:
                - FIELD_IN
            field:
              $ref: '#/components/schemas/ShopifyProductSearchField'
    ShopifyProductSearchCriterion:
      oneOf:
        - $ref: '#/components/schemas/ShopifyProductFieldInSearchCriterion'
      discriminator:
        propertyName: type
        mapping:
          FIELD_IN: '#/components/schemas/ShopifyProductFieldInSearchCriterion'
    ShopifyProductSearchRequest:
      type: object
      required:
        - shop
        - shopifyAccessToken
        - criterion
        - pageSize
      properties:
        shop:
          type: string
          description: The shop to search within
          example: planto.myshopify.com
        shopifyAccessToken:
          type: string
          description: >-
            An access token obtained for the above Shopify store that will be
            used to make requests to Shopify with
          example: cjuqb_6bp89123d45516c78288f433bd8bc13j
        criterion:
          $ref: '#/components/schemas/ShopifyProductSearchCriterion'
        pageSize:
          type: integer
          description: Number of results to include in a page
          example: 100
        cursor:
          type: string
          nullable: true
          description: >-
            The position to start the search results from.  Starts from the
            start if no value provided
          example: >-
            eyJsYXN0X2lkIjo3MDE3MjQ0MDY1ODQ4LCJsYXN0X3ZhbHVlIjoiNzAxNzI0NDA2NTg0OCJ9
    ShopifyProductMedia:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          description: The ID of the media in Shopify
          example: 5692493762034
        previewUrl:
          type: string
          nullable: true
          description: A URL that provides a preview image of the media
          example: https://example.com/preview
        duration:
          type: integer
          nullable: true
          description: The duration of the media in milliseconds, if it has one
          example: 60000
    ShopifyProduct:
      type: object
      required:
        - id
        - title
        - handle
        - media
        - skus
      properties:
        id:
          type: string
          description: The ID of the product in Shopify
          example: 7693497762034
        title:
          type: string
          description: The title shown on the product page
          example: Sol classic tee
        handle:
          type: string
          description: >-
            The no-spaces-allowed-but-still-human-readable identifier of the
            product
          example: mens-premium-cotton-tshirt-1
        media:
          type: array
          items:
            $ref: '#/components/schemas/ShopifyProductMedia'
        skus:
          type: array
          description: The list of SKUs associated with the product
          items:
            type: string
    ShopifyProductWithPermittedActions:
      type: object
      required:
        - result
        - permittedActions
      properties:
        result:
          $ref: '#/components/schemas/ShopifyProduct'
        permittedActions:
          type: array
          items:
            $ref: '#/components/schemas/PermittedAction'
    ShopifyProductSearch:
      type: object
      required:
        - results
      properties:
        results:
          type: array
          description: >-
            The specified page of Shopify Product resources which match the
            search criterion
          items:
            $ref: '#/components/schemas/ShopifyProductWithPermittedActions'
        nextCursor:
          type: string
          nullable: true
          description: >-
            The cursor to feed back into the next search request to get the next
            page of results.  Null if there are no more results
          example: >-
            eyJsYXN0X2lkIjo3MDE3MjQ0MDY1ODQ4LCJsYXN0X3ZhbHVlIjoiNzAxNzI0NDA2NTg0OCJ9
    AllowedLoginMethods:
      type: array
      description: The allowed login methods for the account
      items:
        $ref: '#/components/schemas/LoginMethod'
    AccountTermsAndConditions:
      type: object
      required:
        - id
        - url
      properties:
        id:
          type: string
          description: The id of the terms and conditions
          example: v12
        url:
          type: string
          description: The URL to the terms and conditions document
          example: https://signup.dash.app/resources/legal/terms-v12.pdf
    AccountTermsAndConditionsRequest:
      type: object
      properties:
        dateOfEffect:
          type: string
          description: The datetime the terms come into effect
          example: '2025-12-23T00:00:00.001Z'
          default: NOW()
        paidPlansShouldReaccept:
          type: boolean
          description: >-
            Whether accounts on paid plans should be asked to reaccept these new
            terms
          default: false
        reacceptPath:
          type: string
          description: >-
            The path on the frontend app to send the user to reaccept. If null
            the default /account-terms-and-conditions route will be used.
          example: /account-terms-and-conditions-demerger
          nullable: true
          default: null
security:
  - bearerToken: []
