{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mammoth-io/json-schema/mammoth-io-batch-details-schema.json",
  "title": "BatchDetails",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mammoth-io-batches-api-openapi.yml#/components/schemas/BatchDetails",
  "properties": {
    "batch": {
      "$ref": "#/$defs/BatchInfoSchema"
    }
  },
  "type": "object",
  "required": [
    "batch"
  ],
  "$defs": {
    "ApiPostDsBatchSource": {
      "properties": {
        "type": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Type of the source"
        }
      },
      "type": "object",
      "required": [],
      "title": "ApiPostDsBatchSource"
    },
    "BatchDescriptionCloud": {
      "properties": {
        "space_id": {
          "oneOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Space ID"
        },
        "from_date": {
          "oneOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "description": "From Date"
        },
        "to_date": {
          "oneOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "description": "To Date"
        },
        "data_file_path": {
          "oneOf": [
            {
              "type": "string",
              "format": "uri"
            },
            {
              "type": "null"
            }
          ],
          "description": "Data File Path"
        },
        "on_refresh_action": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "On Refresh Action"
        }
      },
      "type": "object",
      "required": [],
      "title": "BatchDescriptionCloud"
    },
    "BatchDescriptionFile": {
      "properties": {
        "numeric_error_columns": {
          "oneOf": [
            {
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "description": "Numeric Error Columns"
        },
        "date_error_columns": {
          "oneOf": [
            {
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "description": "Date Error Columns"
        }
      },
      "type": "object",
      "required": [],
      "title": "BatchDescriptionFile"
    },
    "BatchInfoSchema": {
      "properties": {
        "id": {
          "oneOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Batch ID"
        },
        "description": {
          "oneOf": [
            {
              "$ref": "#/$defs/BatchDescriptionFile"
            },
            {
              "$ref": "#/$defs/BatchDescriptionCloud"
            },
            {
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "description": "Batch Description"
        },
        "column_count": {
          "oneOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Column Count"
        },
        "row_count": {
          "oneOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Row Count"
        },
        "source": {
          "oneOf": [
            {
              "$ref": "#/$defs/CloudDsBatchSource"
            },
            {
              "$ref": "#/$defs/BranchInBatchSource"
            },
            {
              "$ref": "#/$defs/ProjectBranchInBatchSource"
            },
            {
              "$ref": "#/$defs/WebhookDsBatchSource"
            },
            {
              "$ref": "#/$defs/FileDsBatchSource"
            },
            {
              "$ref": "#/$defs/DuplicateOrCombineDsBatchSource"
            },
            {
              "$ref": "#/$defs/ApiPostDsBatchSource"
            },
            {
              "type": "null"
            }
          ],
          "description": "Batch Source"
        },
        "name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Batch Name"
        },
        "created_at": {
          "oneOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "description": "Batch Creation Time"
        },
        "state": {
          "type": [
            "null",
            "string"
          ],
          "enum": [
            "active",
            "sync_pending",
            "suspended",
            "deleting",
            "pending_delete",
            null
          ],
          "description": "Batch State"
        },
        "data_schema": {
          "oneOf": [
            {
              "items": {
                "$ref": "#/$defs/api_ds_schema_ColumnSchema"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "description": "Data Schema"
        }
      },
      "type": "object",
      "required": [],
      "title": "BatchInfoSchema"
    },
    "BranchInBatchSource": {
      "properties": {
        "resource_path": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Resource Path"
        },
        "dataview_id": {
          "oneOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Dataview ID"
        },
        "dataview_name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Dataview Name"
        },
        "dataset_name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Dataset Name"
        },
        "type": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Type of the source"
        }
      },
      "type": "object",
      "required": [],
      "title": "BranchInBatchSource"
    },
    "CloudDBBatchSource": {
      "properties": {
        "database": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Database Name"
        },
        "host": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Host"
        },
        "username": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "User name"
        }
      },
      "type": "object",
      "required": [],
      "title": "CloudDBBatchSource"
    },
    "CloudDsBatchSource": {
      "properties": {
        "type": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Type of the source"
        },
        "connector_name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Connector Name"
        },
        "query": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Query"
        },
        "profile": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Profile"
        },
        "connector_details": {
          "oneOf": [
            {
              "$ref": "#/$defs/CloudDBBatchSource"
            },
            {
              "$ref": "#/$defs/CloudDsDatabricksBatchSource"
            },
            {
              "$ref": "#/$defs/CloudDsBigqueryBatchSource"
            },
            {
              "$ref": "#/$defs/CloudDsParquetBatchSource"
            },
            {
              "$ref": "#/$defs/CloudDsSnowflakeBatchSource"
            },
            {
              "$ref": "#/$defs/CloudDsZoomBatchSource"
            },
            {
              "$ref": "#/$defs/CloudDsGoogleAnalyticsBatchSource"
            },
            {
              "$ref": "#/$defs/CloudDsGoogleAdsBatchSource"
            },
            {
              "$ref": "#/$defs/CloudDsShopifyBatchSource"
            },
            {
              "$ref": "#/$defs/CloudDsFacebookBatchSource"
            },
            {
              "$ref": "#/$defs/CloudDsHubspotBatchSource"
            },
            {
              "$ref": "#/$defs/CloudDsMailchimpBatchSource"
            },
            {
              "$ref": "#/$defs/CloudDsSalesforceBatchSource"
            },
            {
              "$ref": "#/$defs/CloudDsSftpBatchSource"
            },
            {
              "type": "null"
            }
          ],
          "description": "Connector Details"
        }
      },
      "type": "object",
      "required": [],
      "title": "CloudDsBatchSource"
    },
    "CloudDsBigqueryBatchSource": {
      "properties": {
        "email": {
          "oneOf": [
            {
              "type": "string",
              "format": "email",
              "title": "Email of the user",
              "description": "Email of the customer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Email"
        },
        "project": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Project Name"
        },
        "dataset": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Name of the Dataset"
        }
      },
      "type": "object",
      "required": [],
      "title": "CloudDsBigqueryBatchSource"
    },
    "CloudDsDatabricksBatchSource": {
      "properties": {
        "host": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Host"
        },
        "http_path": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "HTTP Path"
        },
        "catalog": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Catalog"
        }
      },
      "type": "object",
      "required": [],
      "title": "CloudDsDatabricksBatchSource"
    },
    "CloudDsFacebookBatchSource": {
      "properties": {
        "email": {
          "oneOf": [
            {
              "type": "string",
              "format": "email",
              "title": "Email of the user",
              "description": "Email of the customer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Email"
        },
        "user_name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "User Name"
        }
      },
      "type": "object",
      "required": [],
      "title": "CloudDsFacebookBatchSource"
    },
    "CloudDsGoogleAdsBatchSource": {
      "properties": {
        "email": {
          "oneOf": [
            {
              "type": "string",
              "format": "email",
              "title": "Email of the user",
              "description": "Email of the customer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Email"
        },
        "account_name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Account Name"
        }
      },
      "type": "object",
      "required": [],
      "title": "CloudDsGoogleAdsBatchSource"
    },
    "CloudDsGoogleAnalyticsBatchSource": {
      "properties": {
        "email": {
          "oneOf": [
            {
              "type": "string",
              "format": "email",
              "title": "Email of the user",
              "description": "Email of the customer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Email"
        }
      },
      "type": "object",
      "required": [],
      "title": "CloudDsGoogleAnalyticsBatchSource"
    },
    "CloudDsHubspotBatchSource": {
      "properties": {
        "email": {
          "oneOf": [
            {
              "type": "string",
              "format": "email",
              "title": "Email of the user",
              "description": "Email of the customer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Email"
        },
        "user_name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "User Name"
        },
        "domain": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Domain"
        }
      },
      "type": "object",
      "required": [],
      "title": "CloudDsHubspotBatchSource"
    },
    "CloudDsMailchimpBatchSource": {
      "properties": {
        "email": {
          "oneOf": [
            {
              "type": "string",
              "format": "email",
              "title": "Email of the user",
              "description": "Email of the customer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Email"
        }
      },
      "type": "object",
      "required": [],
      "title": "CloudDsMailchimpBatchSource"
    },
    "CloudDsParquetBatchSource": {
      "properties": {
        "database": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Database Name"
        },
        "host": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Host"
        },
        "username": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "User name"
        },
        "account_name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Account Name"
        },
        "container": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Container"
        }
      },
      "type": "object",
      "required": [],
      "title": "CloudDsParquetBatchSource"
    },
    "CloudDsSalesforceBatchSource": {
      "properties": {
        "email": {
          "oneOf": [
            {
              "type": "string",
              "format": "email",
              "title": "Email of the user",
              "description": "Email of the customer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Email"
        },
        "instance_url": {
          "oneOf": [
            {
              "type": "string",
              "format": "url"
            },
            {
              "type": "null"
            }
          ],
          "description": "Instance URL"
        }
      },
      "type": "object",
      "required": [],
      "title": "CloudDsSalesforceBatchSource"
    },
    "CloudDsSftpBatchSource": {
      "properties": {
        "email": {
          "oneOf": [
            {
              "type": "string",
              "format": "email",
              "title": "Email of the user",
              "description": "Email of the customer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Email"
        },
        "domain": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Domain"
        },
        "username": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Username"
        }
      },
      "type": "object",
      "required": [],
      "title": "CloudDsSftpBatchSource"
    },
    "CloudDsShopifyBatchSource": {
      "properties": {
        "shop_name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Shop Name"
        },
        "shop_url": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Shop URL"
        }
      },
      "type": "object",
      "required": [],
      "title": "CloudDsShopifyBatchSource"
    },
    "CloudDsSnowflakeBatchSource": {
      "properties": {
        "database": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Database Name"
        },
        "host": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Host"
        },
        "username": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "User name"
        },
        "account": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Account"
        },
        "warehouse": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Warehouse"
        },
        "role": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Role"
        }
      },
      "type": "object",
      "required": [],
      "title": "CloudDsSnowflakeBatchSource"
    },
    "CloudDsZoomBatchSource": {
      "properties": {
        "email": {
          "oneOf": [
            {
              "type": "string",
              "format": "email",
              "title": "Email of the user",
              "description": "Email of the customer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Email"
        }
      },
      "type": "object",
      "required": [],
      "title": "CloudDsZoomBatchSource"
    },
    "DuplicateOrCombineDsBatchSource": {
      "properties": {
        "resource_path": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Resource Path"
        },
        "type": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Type of the source"
        },
        "dataset_id": {
          "oneOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Dataset ID"
        },
        "dataset_name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Dataset Name"
        }
      },
      "type": "object",
      "required": [],
      "title": "DuplicateOrCombineDsBatchSource"
    },
    "FileDsBatchSource": {
      "properties": {
        "type": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Type of the source"
        },
        "file_name": {
          "oneOf": [
            {
              "type": "string",
              "format": "uri"
            },
            {
              "type": "null"
            }
          ],
          "description": "File Name"
        },
        "url": {
          "oneOf": [
            {
              "type": "string",
              "format": "url"
            },
            {
              "type": "null"
            }
          ],
          "description": "URL"
        }
      },
      "type": "object",
      "required": [],
      "title": "FileDsBatchSource"
    },
    "ProjectBranchInBatchSource": {
      "properties": {
        "dataview_id": {
          "oneOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Dataview ID"
        },
        "dataview_name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Dataview Name"
        },
        "dataset_name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Dataset Name"
        },
        "type": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Type of the source"
        },
        "project_name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Project Name"
        }
      },
      "type": "object",
      "required": [],
      "title": "ProjectBranchInBatchSource"
    },
    "WebhookDsBatchSource": {
      "properties": {
        "type": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Type of the source"
        }
      },
      "type": "object",
      "required": [],
      "title": "WebhookDsBatchSource"
    },
    "api_ds_schema_ColumnSchema": {
      "properties": {
        "c_id": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Column ID"
        },
        "c_name": {
          "oneOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "Column Name"
        },
        "c_type": {
          "type": [
            "null",
            "string"
          ],
          "enum": [
            "text",
            "numeric",
            "date",
            null
          ],
          "description": "Column Type"
        }
      },
      "type": "object",
      "required": [],
      "title": "ColumnSchema"
    }
  }
}