{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rivery/json-schema/rivery-target-types-response-schema.json",
  "title": "TargetTypesResponse",
  "description": "The target types response",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rivery-data-flows-metadata-api-openapi.yml#/components/schemas/TargetTypesResponse",
  "properties": {
    "next_page": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Page",
      "description": "The next page URL"
    },
    "previous_page": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Previous Page",
      "description": "The previous page URL"
    },
    "page": {
      "type": "integer",
      "title": "Page",
      "description": "The page number",
      "default": 1
    },
    "current_page_size": {
      "type": "integer",
      "title": "Current Page Size",
      "description": "The current page size"
    },
    "total_items": {
      "type": "integer",
      "title": "Total Items",
      "description": "The total number of entities fetched",
      "default": 0
    },
    "items": {
      "items": {
        "$ref": "#/$defs/TargetTypeResponse"
      },
      "type": "array",
      "title": "Items"
    }
  },
  "type": "object",
  "required": [
    "current_page_size",
    "items"
  ],
  "$defs": {
    "FileZoneSettings": {
      "properties": {
        "target_type_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Target Type Id",
          "description": "ID for the filezone target type"
        },
        "default_connection_definition": {
          "type": "object",
          "title": "Default Connection Definition",
          "description": "Default filezone connection definition"
        },
        "is_default": {
          "type": "boolean",
          "title": "Is Default",
          "description": "Boolean indicating usage of default filezone",
          "default": false
        },
        "bucket": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Bucket",
          "description": "Filezone bucket"
        },
        "is_connection": {
          "type": "boolean",
          "title": "Is Connection",
          "description": "Boolean indicating whether connection utilizes filezone",
          "default": false
        },
        "fields_mapping": {
          "anyOf": [
            {
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Fields Mapping",
          "description": "Filezone fields mapping"
        },
        "target_type_options": {
          "anyOf": [
            {
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Target Type Options",
          "description": "Available filezone target types"
        }
      },
      "type": "object",
      "required": [
        "default_connection_definition"
      ],
      "title": "FileZoneSettings",
      "description": "File zone related settings"
    },
    "TargetTypeResponse": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name",
          "description": "Name of the target type"
        },
        "target_type": {
          "type": "string",
          "title": "Target Type",
          "description": "Target type ID"
        },
        "datasource_type_id": {
          "type": "string",
          "title": "Datasource Type Id",
          "description": "ID for the data source type"
        },
        "connection_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Connection Type",
          "description": "Connection type for the target"
        },
        "target_task_type_id": {
          "type": "string",
          "title": "Target Task Type Id",
          "description": "ID for the target task type"
        },
        "logic_step_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Logic Step Type",
          "description": "Type of logic step"
        },
        "target_settings": {
          "type": "object",
          "title": "Target Settings",
          "description": "Target settings"
        },
        "segment": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Segment",
          "description": "A target / data source type property that indicates whether it is a source, target, has connection, etc"
        },
        "river_type_id": {
          "type": "string",
          "title": "River Type Id",
          "description": "ID for the river type"
        },
        "icon": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Icon",
          "description": "Filename of icon"
        },
        "file_zone_settings": {
          "allOf": [
            {
              "$ref": "#/$defs/FileZoneSettings"
            }
          ],
          "description": "Settings for file zone targets"
        },
        "api_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Api Name",
          "description": "The name of the target that the API expects"
        }
      },
      "type": "object",
      "required": [
        "name",
        "target_type",
        "datasource_type_id",
        "target_task_type_id",
        "target_settings",
        "segment",
        "river_type_id",
        "file_zone_settings"
      ],
      "title": "TargetTypeResponse",
      "description": "Target Type properties to return."
    }
  }
}