import * as HttpApiSchema from "@effect/platform/HttpApiSchema";
import * as Schema from "effect/Schema";
/**
 * SchedulerError - Indicates a failure in the job scheduling system.
 *
 * Causes:
 * - Failed to schedule a dump job
 * - Worker pool unavailable
 * - Internal scheduler state errors
 *
 * Applies to:
 * - POST /datasets/{name}/dump - When scheduling dataset dumps
 * - POST /datasets - When scheduling registration jobs
 */
export class SchedulerError extends Schema.Class("SchedulerError")({
    code: Schema.Literal("SCHEDULER_ERROR").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 500,
}) {
    _tag = "SchedulerError";
}
/**
 * MetadataDbError - Database operation failure in the metadata PostgreSQL database.
 *
 * Causes:
 * - Database connection failures
 * - SQL execution errors
 * - Database migration issues
 * - Worker notification send/receive failures
 * - Data consistency errors (e.g., multiple active locations)
 *
 * Applies to:
 * - Any operation that queries or updates metadata
 * - Worker coordination operations
 * - Dataset state tracking
 */
export class MetadataDbError extends Schema.Class("MetadataDbError")({
    code: Schema.Literal("METADATA_DB_ERROR").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 500,
}) {
    _tag = "MetadataDbError";
}
/**
 * DatasetStoreError - Failure in dataset storage operations.
 *
 * Causes:
 * - File/object store retrieval failures
 * - Manifest parsing errors (TOML/JSON)
 * - Unsupported dataset kind
 * - Dataset name validation failures
 * - Schema validation errors (missing or mismatched)
 * - Provider configuration not found
 * - SQL parsing failures in dataset definitions
 *
 * Applies to:
 * - GET /datasets - Listing datasets
 * - GET /datasets/{id} - Retrieving specific dataset
 * - POST /datasets/{id}/dump - When loading dataset definitions
 * - Query operations that access dataset metadata
 */
export class DatasetStoreError extends Schema.Class("DatasetStoreError")({
    code: Schema.Literal("DATASET_STORE_ERROR").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 500,
}) {
    _tag = "DatasetStoreError";
}
/**
 * DatasetNotFound - The requested dataset does not exist.
 *
 * Causes:
 * - Dataset ID does not exist in the system
 * - Dataset has been deleted
 * - Dataset not yet registered
 *
 * Applies to:
 * - GET /datasets/{id} - When dataset ID doesn't exist
 * - POST /datasets/{id}/dump - When attempting to dump non-existent dataset
 * - Query operations referencing non-existent datasets
 */
export class DatasetNotFound extends Schema.Class("DatasetNotFound")({
    code: Schema.Literal("DATASET_NOT_FOUND").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 404,
}) {
    _tag = "DatasetNotFound";
}
/**
 * TableNotFoundInDataset - Table not found in dataset.
 *
 * Causes:
 * - Table name referenced in SQL query does not exist in the dataset
 * - Table name is misspelled
 * - Dataset does not contain the referenced table
 *
 * Applies to:
 * - POST /schema - When analyzing SQL queries with invalid table references
 */
export class TableNotFoundInDataset extends Schema.Class("TableNotFoundInDataset")({
    code: Schema.Literal("TABLE_NOT_FOUND_IN_DATASET").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 404,
}) {
    _tag = "TableNotFoundInDataset";
}
/**
 * InvalidSelector - The provided dataset selector (name/version) is malformed or invalid.
 *
 * Causes:
 * - Dataset name contains invalid characters or doesn't follow naming conventions
 * - Dataset name is empty or malformed
 * - Version syntax is invalid (e.g., malformed semver)
 * - Path parameter extraction fails for dataset selection
 *
 * Applies to:
 * - GET /datasets/{name} - When dataset name format is invalid
 * - GET /datasets/{name}/versions/{version} - When name or version format is invalid
 * - Any endpoint accepting dataset selector parameters
 */
export class InvalidSelector extends Schema.Class("InvalidSelector")({
    code: Schema.Literal("INVALID_SELECTOR").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 400,
}) {
    _tag = "InvalidSelector";
}
/**
 * InvalidRequest - The request is malformed or contains invalid parameters.
 *
 * Causes:
 * - Missing required request parameters
 * - Invalid parameter values
 * - Malformed request body
 * - Invalid content type
 * - Request validation failures
 *
 * Applies to:
 * - POST /datasets - Invalid registration request
 * - POST /datasets/{id}/dump - Invalid dump parameters
 * - Any endpoint with request validation
 */
export class InvalidRequest extends Schema.Class("InvalidRequest")({
    code: Schema.Literal("INVALID_REQUEST").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 400,
}) {
    _tag = "InvalidRequest";
}
/**
 * InvalidManifest - Dataset manifest is semantically invalid.
 *
 * Causes:
 * - Invalid dataset references in SQL views
 * - Circular dependencies between datasets
 * - Invalid provider references
 * - Schema validation failures
 * - Invalid dataset configuration
 *
 * Applies to:
 * - POST /datasets - During manifest validation
 * - Dataset initialization
 * - Different from ManifestParseError (syntax vs semantics)
 */
export class InvalidManifest extends Schema.Class("InvalidManifest")({
    code: Schema.Literal("INVALID_MANIFEST").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 400,
}) {
    _tag = "InvalidManifest";
}
/**
 * UnexpectedJobStatus - Job is in an unexpected state for the requested operation.
 *
 * Causes:
 * - Attempting to schedule a dump when one is already running
 * - Job state machine violations
 * - Concurrent job modification attempts
 * - Invalid state transitions
 *
 * Applies to:
 * - POST /datasets/{id}/dump - When a dump is already in progress
 * - Job management operations
 *
 * Example: Trying to start a dump job when status is already "Running"
 */
export class UnexpectedJobStatus extends Schema.Class("UnexpectedJobStatus")({
    code: Schema.Literal("UNEXPECTED_JOB_STATUS").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 500,
}) {
    _tag = "UnexpectedJobStatus";
}
/**
 * JobNotFound - The requested job does not exist.
 *
 * Causes:
 * - Job ID does not exist in the system
 * - Job has been deleted
 * - Job has completed and been cleaned up
 *
 * Applies to:
 * - GET /jobs/{id} - When job ID doesn't exist
 * - DELETE /jobs/{id} - When attempting to delete non-existent job
 * - PUT /jobs/{id}/stop - When attempting to stop non-existent job
 */
export class JobNotFound extends Schema.Class("JobNotFound")({
    code: Schema.Literal("JOB_NOT_FOUND").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 404,
}) {
    _tag = "JobNotFound";
}
/**
 * InvalidQueryParameters - The query parameters are invalid or malformed.
 *
 * Causes:
 * - Invalid integer format for limit or pagination cursors
 * - Malformed query string syntax
 * - Missing required query parameters
 * - Query parameter validation failures
 *
 * Applies to:
 * - GET /jobs - Invalid pagination parameters
 * - Any endpoint with query parameter validation
 */
export class InvalidQueryParameters extends Schema.Class("InvalidQueryParameters")({
    code: Schema.Literal("INVALID_QUERY_PARAMETERS").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 400,
}) {
    _tag = "InvalidQueryParameters";
}
/**
 * LimitTooLarge - The requested limit exceeds the maximum allowed value.
 *
 * Causes:
 * - Limit parameter greater than maximum page size (1000)
 * - Attempting to request too many records at once
 * - Pagination limit validation failure
 *
 * Applies to:
 * - GET /jobs - When limit exceeds maximum
 * - Any paginated endpoint with limit validation
 */
export class LimitTooLarge extends Schema.Class("LimitTooLarge")({
    code: Schema.Literal("LIMIT_TOO_LARGE").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 400,
}) {
    _tag = "LimitTooLarge";
}
/**
 * LimitInvalid - The requested limit is invalid (zero or negative).
 *
 * Causes:
 * - Limit parameter is 0 or negative
 * - Invalid limit format or type
 * - Limit validation failure
 *
 * Applies to:
 * - GET /jobs - When limit is 0 or negative
 * - Any paginated endpoint with limit validation
 */
export class LimitInvalid extends Schema.Class("LimitInvalid")({
    code: Schema.Literal("LIMIT_INVALID").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 400,
}) {
    _tag = "LimitInvalid";
}
/**
 * ManifestRegistrationError - Failed to register manifest in the system.
 *
 * Causes:
 * - Internal error during manifest registration
 * - Registry service unavailable
 * - Manifest storage failure
 *
 * Applies to:
 * - POST /datasets - During manifest registration
 * - POST /datasets - During manifest registration
 */
export class ManifestRegistrationError extends Schema.Class("ManifestRegistrationError")({
    code: Schema.Literal("MANIFEST_REGISTRATION_ERROR").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 500,
}) {
    _tag = "ManifestRegistrationError";
}
/**
 * ManifestLinkingError - Failed to link manifest to dataset.
 *
 * Causes:
 * - Error during manifest linking in metadata database
 * - Error updating dev tag
 * - Database transaction failure
 * - Foreign key constraint violations
 *
 * Applies to:
 * - POST /datasets - During manifest linking to dataset
 */
export class ManifestLinkingError extends Schema.Class("ManifestLinkingError")({
    code: Schema.Literal("MANIFEST_LINKING_ERROR").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 500,
}) {
    _tag = "ManifestLinkingError";
}
/**
 * VersionTaggingError - Failed to tag version for the dataset.
 *
 * Causes:
 * - Error during version tagging in metadata database
 * - Invalid semantic version format
 * - Error updating latest tag
 * - Database constraint violations
 *
 * Applies to:
 * - POST /datasets - During version tagging
 */
export class VersionTaggingError extends Schema.Class("VersionTaggingError")({
    code: Schema.Literal("VERSION_TAGGING_ERROR").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 500,
}) {
    _tag = "VersionTaggingError";
}
/**
 * DependencyValidationError - Manifest dependency validation error.
 *
 * Causes:
 * - SQL queries are invalid
 * - SQL queries reference datasets not declared in dependencies
 * - Undeclared dependencies in manifest
 * - Circular dependencies
 *
 * Applies to:
 * - POST /datasets - During manifest validation
 */
export class DependencyValidationError extends Schema.Class("DependencyValidationError")({
    code: Schema.Literal("DEPENDENCY_VALIDATION_ERROR").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 400,
}) {
    _tag = "DependencyValidationError";
}
/**
 * UnsupportedDatasetKind - Dataset kind is not supported.
 *
 * Causes:
 * - Dataset kind is not one of the supported types (manifest, evm-rpc, firehose, eth-beacon)
 * - Invalid or unknown dataset kind value
 * - Legacy dataset kinds that are no longer supported
 *
 * Applies to:
 * - POST /datasets - During manifest validation
 */
export class UnsupportedDatasetKind extends Schema.Class("UnsupportedDatasetKind")({
    code: Schema.Literal("UNSUPPORTED_DATASET_KIND").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 400,
}) {
    _tag = "UnsupportedDatasetKind";
}
/**
 * ManifestNotFound - Manifest with the provided hash not found.
 *
 * Causes:
 * - A manifest hash was provided but the manifest doesn't exist in the system
 * - The hash is valid format but no manifest is stored with that hash
 * - Manifest was deleted or never registered
 *
 * Applies to:
 * - POST /datasets - When linking to a manifest hash that doesn't exist
 */
export class ManifestNotFound extends Schema.Class("ManifestNotFound")({
    code: Schema.Literal("MANIFEST_NOT_FOUND").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 404,
}) {
    _tag = "ManifestNotFound";
}
/**
 * InvalidPayloadFormat - Invalid request payload format.
 *
 * Causes:
 * - Request JSON is malformed or invalid
 * - Required fields are missing or have wrong types
 * - Dataset name or version format is invalid
 * - JSON deserialization failures
 *
 * Applies to:
 * - POST /datasets - When request body is invalid
 * - POST /schema - When request payload cannot be parsed
 */
export class InvalidPayloadFormat extends Schema.Class("InvalidPayloadFormat")({
    code: Schema.Literal("INVALID_PAYLOAD_FORMAT").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 400,
}) {
    _tag = "InvalidPayloadFormat";
}
/**
 * StoreError - Dataset store operation error.
 *
 * Causes:
 * - Failed to load dataset from store
 * - Dataset store configuration errors
 * - Dataset store connectivity issues
 * - Object store access failures
 *
 * Applies to:
 * - POST /datasets - During dataset store operations
 */
export class StoreError extends Schema.Class("StoreError")({
    code: Schema.Literal("STORE_ERROR").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 500,
}) {
    _tag = "StoreError";
}
/**
 * InvalidJobId - The provided job ID is malformed or invalid.
 *
 * Causes:
 * - Job ID contains invalid characters
 * - Job ID format does not match expected pattern
 * - Empty or null job ID
 * - Job ID is not a valid integer
 *
 * Applies to:
 * - GET /jobs/{id} - When ID format is invalid
 * - DELETE /jobs/{id} - When ID format is invalid
 * - PUT /jobs/{id}/stop - When ID format is invalid
 */
export class InvalidJobId extends Schema.Class("InvalidJobId")({
    code: Schema.Literal("INVALID_JOB_ID").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 400,
}) {
    _tag = "InvalidJobId";
}
/**
 * RegistrationFailed - Failed to register manifest in the registry system.
 *
 * Causes:
 * - Dataset already exists with the given name and version
 * - Dataset store error during manifest storage
 * - Database error during registry operations
 * - Serialization error when processing manifest
 *
 * Applies to:
 * - POST /register - When manifest registration fails
 */
export class RegistrationFailed extends Schema.Class("RegistrationFailed")({
    code: Schema.Literal("REGISTRATION_FAILED").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 500,
}) {
    _tag = "RegistrationFailed";
}
/**
 * PlanningError - Query planning failure.
 *
 * Causes:
 * - Query planning fails due to invalid references
 * - Type inference failures
 * - Schema determination errors
 * - Internal DataFusion planning errors
 *
 * Applies to:
 * - POST /schema - When determining output schema
 * - Query execution operations
 */
export class PlanningError extends Schema.Class("PlanningError")({
    code: Schema.Literal("PLANNING_ERROR").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 500,
}) {
    _tag = "PlanningError";
}
/**
 * CatalogForSqlError - Failure to build catalog for SQL query.
 *
 * Causes:
 * - Failed to load datasets referenced in SQL query
 * - Dataset store unavailable for catalog construction
 * - Invalid dataset references in query
 * - Catalog initialization failures
 *
 * Applies to:
 * - Query execution operations
 * - Schema inference operations (POST /schema)
 */
export class CatalogForSqlError extends Schema.Class("CatalogForSqlError")({
    code: Schema.Literal("CATALOG_FOR_SQL_ERROR").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 500,
}) {
    _tag = "CatalogForSqlError";
}
/**
 * UnqualifiedTable - Table reference is not qualified with a dataset.
 *
 * Causes:
 * - SQL query contains a table reference without a schema/dataset qualifier
 * - All tables must be qualified with a dataset reference (e.g., dataset.table)
 *
 * Applies to:
 * - POST /schema - When analyzing SQL queries
 * - Query operations with unqualified table references
 */
export class UnqualifiedTable extends Schema.Class("UnqualifiedTable")({
    code: Schema.Literal("UNQUALIFIED_TABLE").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 400,
}) {
    _tag = "UnqualifiedTable";
}
/**
 * CatalogQualifiedTable - Table reference includes a catalog qualifier.
 *
 * Causes:
 * - SQL query contains a catalog-qualified table reference (catalog.schema.table)
 * - Only dataset-qualified tables are supported (dataset.table)
 *
 * Applies to:
 * - POST /schema - When analyzing SQL queries
 * - Query operations with catalog-qualified table references
 */
export class CatalogQualifiedTable extends Schema.Class("CatalogQualifiedTable")({
    code: Schema.Literal("CATALOG_QUALIFIED_TABLE").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 400,
}) {
    _tag = "CatalogQualifiedTable";
}
/**
 * InvalidTableName - Table name does not conform to SQL identifier rules.
 *
 * Causes:
 * - Table name contains invalid characters
 * - Table name doesn't follow naming conventions
 * - Table name exceeds maximum length
 *
 * Applies to:
 * - POST /schema - When analyzing SQL queries
 * - Query operations with invalid table names
 */
export class InvalidTableName extends Schema.Class("InvalidTableName")({
    code: Schema.Literal("INVALID_TABLE_NAME").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 400,
}) {
    _tag = "InvalidTableName";
}
/**
 * InvalidSchemaReference - Schema portion of table reference is not a valid dataset reference.
 *
 * Causes:
 * - Schema/dataset reference format is invalid
 * - Dataset reference doesn't conform to expected format (namespace/name@version)
 * - Invalid characters or structure in dataset reference
 *
 * Applies to:
 * - POST /schema - When analyzing SQL queries
 * - Query operations with invalid schema references
 */
export class InvalidSchemaReference extends Schema.Class("InvalidSchemaReference")({
    code: Schema.Literal("INVALID_SCHEMA_REFERENCE").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 400,
}) {
    _tag = "InvalidSchemaReference";
}
/**
 * ResolveHashError - Failed to resolve dataset reference to hash.
 *
 * Causes:
 * - Dataset store cannot resolve a reference to content hash
 * - Storage backend errors
 * - Invalid reference format
 *
 * Applies to:
 * - POST /schema - When resolving dataset references
 */
export class ResolveHashError extends Schema.Class("ResolveHashError")({
    code: Schema.Literal("RESOLVE_HASH_ERROR").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 500,
}) {
    _tag = "ResolveHashError";
}
/**
 * GetDatasetError - Failed to retrieve dataset from store.
 *
 * Causes:
 * - Dataset manifest is invalid or corrupted
 * - Unsupported dataset kind
 * - Storage backend errors when reading dataset
 *
 * Applies to:
 * - POST /schema - When loading dataset definitions
 */
export class GetDatasetError extends Schema.Class("GetDatasetError")({
    code: Schema.Literal("GET_DATASET_ERROR").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 500,
}) {
    _tag = "GetDatasetError";
}
/**
 * EthCallUdfCreationError - Failed to create ETH call UDF.
 *
 * Causes:
 * - Invalid provider configuration for dataset
 * - Provider connection issues
 * - Dataset is not an EVM RPC dataset but eth_call was requested
 *
 * Applies to:
 * - POST /schema - When creating ETH call UDFs
 */
export class EthCallUdfCreationError extends Schema.Class("EthCallUdfCreationError")({
    code: Schema.Literal("ETH_CALL_UDF_CREATION_ERROR").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 500,
}) {
    _tag = "EthCallUdfCreationError";
}
/**
 * InvalidFunctionReference - Invalid function reference in SQL.
 *
 * Causes:
 * - Function's dataset qualifier cannot be parsed as valid dataset reference
 * - Invalid function qualification format
 *
 * Applies to:
 * - POST /schema - When analyzing SQL queries with dataset-qualified functions
 */
export class InvalidFunctionReference extends Schema.Class("InvalidFunctionReference")({
    code: Schema.Literal("INVALID_FUNCTION_REFERENCE").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 400,
}) {
    _tag = "InvalidFunctionReference";
}
/**
 * InvalidFunctionFormat - Invalid function format in SQL.
 *
 * Causes:
 * - Function names must be either unqualified or dataset-qualified
 * - Function has more than two parts
 * - Invalid function naming format
 *
 * Applies to:
 * - POST /schema - When analyzing SQL queries with functions
 */
export class InvalidFunctionFormat extends Schema.Class("InvalidFunctionFormat")({
    code: Schema.Literal("INVALID_FUNCTION_FORMAT").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 400,
}) {
    _tag = "InvalidFunctionFormat";
}
/**
 * SqlParseError - SQL parse error.
 *
 * Causes:
 * - SQL query has invalid syntax
 * - Unsupported SQL features are used
 * - Query parsing fails
 *
 * Applies to:
 * - POST /schema - When parsing SQL queries
 */
export class SqlParseError extends Schema.Class("SqlParseError")({
    code: Schema.Literal("SQL_PARSE_ERROR").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 400,
}) {
    _tag = "SqlParseError";
}
/**
 * FunctionNotFoundInDataset - Function not found in referenced dataset.
 *
 * Causes:
 * - SQL query references a function that doesn't exist in the dataset
 * - Function name is misspelled or dataset doesn't define the function
 *
 * Applies to:
 * - POST /schema - When resolving function references
 */
export class FunctionNotFoundInDataset extends Schema.Class("FunctionNotFoundInDataset")({
    code: Schema.Literal("FUNCTION_NOT_FOUND_IN_DATASET").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 404,
}) {
    _tag = "FunctionNotFoundInDataset";
}
/**
 * EthCallNotAvailable - eth_call function not available for dataset.
 *
 * Causes:
 * - eth_call function is referenced in SQL but dataset doesn't support it
 * - Dataset is not an EVM RPC dataset
 *
 * Applies to:
 * - POST /schema - When checking eth_call availability
 */
export class EthCallNotAvailable extends Schema.Class("EthCallNotAvailable")({
    code: Schema.Literal("ETH_CALL_NOT_AVAILABLE").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 404,
}) {
    _tag = "EthCallNotAvailable";
}
/**
 * DependencyNotFound - Dependency not found in dataset store.
 *
 * Causes:
 * - Referenced dependency does not exist in dataset store
 * - Specified version or hash cannot be found
 *
 * Applies to:
 * - POST /schema - When resolving dependencies
 */
export class DependencyNotFound extends Schema.Class("DependencyNotFound")({
    code: Schema.Literal("DEPENDENCY_NOT_FOUND").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 404,
}) {
    _tag = "DependencyNotFound";
}
/**
 * DependencyAliasNotFound - Dependency alias not found in dependencies map.
 *
 * Causes:
 * - Table reference uses an alias not provided in dependencies
 * - Function reference uses an alias not provided in dependencies
 *
 * Applies to:
 * - POST /schema - When looking up dependency aliases
 */
export class DependencyAliasNotFound extends Schema.Class("DependencyAliasNotFound")({
    code: Schema.Literal("DEPENDENCY_ALIAS_NOT_FOUND").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 400,
}) {
    _tag = "DependencyAliasNotFound";
}
/**
 * EmptyTablesAndFunctions - No tables or functions provided.
 *
 * Causes:
 * - At least one table or function is required for schema analysis
 *
 * Applies to:
 * - POST /schema - When both tables and functions fields are empty
 */
export class EmptyTablesAndFunctions extends Schema.Class("EmptyTablesAndFunctions")({
    code: Schema.Literal("EMPTY_TABLES_AND_FUNCTIONS").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 400,
}) {
    _tag = "EmptyTablesAndFunctions";
}
/**
 * InvalidTableSql - SQL syntax error in table definition.
 *
 * Causes:
 * - Query parsing fails
 *
 * Applies to:
 * - POST /schema - When analyzing table SQL queries
 */
export class InvalidTableSql extends Schema.Class("InvalidTableSql")({
    code: Schema.Literal("INVALID_TABLE_SQL").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 400,
}) {
    _tag = "InvalidTableSql";
}
/**
 * TableReferenceResolution - Failed to extract table references from SQL.
 *
 * Causes:
 * - Invalid table reference format encountered
 *
 * Applies to:
 * - POST /schema - When resolving table references
 */
export class TableReferenceResolution extends Schema.Class("TableReferenceResolution")({
    code: Schema.Literal("TABLE_REFERENCE_RESOLUTION").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 400,
}) {
    _tag = "TableReferenceResolution";
}
/**
 * FunctionReferenceResolution - Failed to resolve function references from SQL.
 *
 * Causes:
 * - Unsupported DML statements encountered
 *
 * Applies to:
 * - POST /schema - When resolving function references
 */
export class FunctionReferenceResolution extends Schema.Class("FunctionReferenceResolution")({
    code: Schema.Literal("FUNCTION_REFERENCE_RESOLUTION").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 500,
}) {
    _tag = "FunctionReferenceResolution";
}
/**
 * DependencyResolution - Failed to resolve dependency.
 *
 * Causes:
 * - Database query fails during resolution
 *
 * Applies to:
 * - POST /schema - When resolving dependencies
 */
export class DependencyResolution extends Schema.Class("DependencyResolution")({
    code: Schema.Literal("DEPENDENCY_RESOLUTION").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 500,
}) {
    _tag = "DependencyResolution";
}
/**
 * SchemaInference - Failed to infer output schema from query.
 *
 * Causes:
 * - Schema determination encounters errors
 *
 * Applies to:
 * - POST /schema - When inferring output schema
 */
export class SchemaInference extends Schema.Class("SchemaInference")({
    code: Schema.Literal("SCHEMA_INFERENCE").pipe(Schema.propertySignature, Schema.fromKey("error_code")),
    message: Schema.String.pipe(Schema.propertySignature, Schema.fromKey("error_message")),
}, {
    [HttpApiSchema.AnnotationStatus]: 500,
}) {
    _tag = "SchemaInference";
}
//# sourceMappingURL=Error.js.map