// This file is auto-generated by @hey-api/openapi-ts

export type ClientOptions = {
  baseUrl: `${string}://${string}` | (string & {});
};

/**
 * AddBackgroundRequest
 *
 * Request model for adding/merging background information. Deprecated: use SetMissionRequest instead.
 */
export type AddBackgroundRequest = {
  /**
   * Content
   *
   * New background information to add or merge
   */
  content: string;
  /**
   * Update Disposition
   *
   * Deprecated - disposition is no longer auto-inferred from mission
   */
  update_disposition?: boolean;
};

/**
 * AsyncOperationSubmitResponse
 *
 * Response model for submitting an async operation.
 */
export type AsyncOperationSubmitResponse = {
  /**
   * Operation Id
   */
  operation_id: string;
  /**
   * Status
   */
  status: string;
};

/**
 * BackgroundResponse
 *
 * Response model for background update. Deprecated: use MissionResponse instead.
 */
export type BackgroundResponse = {
  /**
   * Mission
   */
  mission: string;
  /**
   * Background
   *
   * Deprecated: same as mission
   */
  background?: string | null;
  disposition?: DispositionTraits | null;
};

/**
 * BankConfigResponse
 *
 * Response model for bank configuration.
 */
export type BankConfigResponse = {
  /**
   * Bank Id
   *
   * Bank identifier
   */
  bank_id: string;
  /**
   * Config
   *
   * Fully resolved configuration with all hierarchical overrides applied (Python field names)
   */
  config: {
    [key: string]: unknown;
  };
  /**
   * Overrides
   *
   * Bank-specific configuration overrides only (Python field names)
   */
  overrides: {
    [key: string]: unknown;
  };
};

/**
 * BankConfigUpdate
 *
 * Request model for updating bank configuration.
 */
export type BankConfigUpdate = {
  /**
   * Updates
   *
   * Configuration overrides. Keys can be in Python field format (llm_provider) or environment variable format (HINDSIGHT_API_LLM_PROVIDER). Only hierarchical fields can be overridden per-bank.
   */
  updates: {
    [key: string]: unknown;
  };
};

/**
 * BankListItem
 *
 * Bank list item with profile summary.
 */
export type BankListItem = {
  /**
   * Bank Id
   */
  bank_id: string;
  /**
   * Name
   */
  name?: string | null;
  disposition: DispositionTraits;
  /**
   * Mission
   */
  mission?: string | null;
  /**
   * Created At
   */
  created_at?: string | null;
  /**
   * Updated At
   */
  updated_at?: string | null;
};

/**
 * BankListResponse
 *
 * Response model for listing all banks.
 */
export type BankListResponse = {
  /**
   * Banks
   */
  banks: Array<BankListItem>;
};

/**
 * BankProfileResponse
 *
 * Response model for bank profile.
 */
export type BankProfileResponse = {
  /**
   * Bank Id
   */
  bank_id: string;
  /**
   * Name
   */
  name: string;
  disposition: DispositionTraits;
  /**
   * Mission
   *
   * The agent's mission - who they are and what they're trying to accomplish
   */
  mission: string;
  /**
   * Background
   *
   * Deprecated: use mission instead
   */
  background?: string | null;
};

/**
 * BankStatsResponse
 *
 * Response model for bank statistics endpoint.
 */
export type BankStatsResponse = {
  /**
   * Bank Id
   */
  bank_id: string;
  /**
   * Total Nodes
   */
  total_nodes: number;
  /**
   * Total Links
   */
  total_links: number;
  /**
   * Total Documents
   */
  total_documents: number;
  /**
   * Nodes By Fact Type
   */
  nodes_by_fact_type: {
    [key: string]: number;
  };
  /**
   * Links By Link Type
   */
  links_by_link_type: {
    [key: string]: number;
  };
  /**
   * Links By Fact Type
   */
  links_by_fact_type: {
    [key: string]: number;
  };
  /**
   * Links Breakdown
   */
  links_breakdown: {
    [key: string]: {
      [key: string]: number;
    };
  };
  /**
   * Pending Operations
   */
  pending_operations: number;
  /**
   * Failed Operations
   */
  failed_operations: number;
  /**
   * Last Consolidated At
   *
   * When consolidation last ran (ISO format)
   */
  last_consolidated_at?: string | null;
  /**
   * Pending Consolidation
   *
   * Number of memories not yet processed into observations
   */
  pending_consolidation?: number;
  /**
   * Total Observations
   *
   * Total number of observations
   */
  total_observations?: number;
};

/**
 * Body_file_retain
 */
export type BodyFileRetain = {
  /**
   * Files
   *
   * Files to upload and convert
   */
  files: Array<Blob | File>;
  /**
   * Request
   *
   * JSON string with FileRetainRequest model
   */
  request: string;
};

/**
 * Budget
 *
 * Budget levels for recall/reflect operations.
 */
export type Budget = "low" | "mid" | "high";

/**
 * CancelOperationResponse
 *
 * Response model for cancel operation endpoint.
 */
export type CancelOperationResponse = {
  /**
   * Success
   */
  success: boolean;
  /**
   * Message
   */
  message: string;
  /**
   * Operation Id
   */
  operation_id: string;
};

/**
 * ChildOperationStatus
 *
 * Status of a child operation (for batch operations).
 */
export type ChildOperationStatus = {
  /**
   * Operation Id
   */
  operation_id: string;
  /**
   * Status
   */
  status: string;
  /**
   * Sub Batch Index
   */
  sub_batch_index?: number | null;
  /**
   * Items Count
   */
  items_count?: number | null;
  /**
   * Error Message
   */
  error_message?: string | null;
};

/**
 * ChunkData
 *
 * Chunk data for a single chunk.
 */
export type ChunkData = {
  /**
   * Id
   */
  id: string;
  /**
   * Text
   */
  text: string;
  /**
   * Chunk Index
   */
  chunk_index: number;
  /**
   * Truncated
   *
   * Whether the chunk text was truncated due to token limits
   */
  truncated?: boolean;
};

/**
 * ChunkIncludeOptions
 *
 * Options for including chunks in recall results.
 */
export type ChunkIncludeOptions = {
  /**
   * Max Tokens
   *
   * Maximum tokens for chunks (chunks may be truncated)
   */
  max_tokens?: number;
};

/**
 * ChunkResponse
 *
 * Response model for get chunk endpoint.
 */
export type ChunkResponse = {
  /**
   * Chunk Id
   */
  chunk_id: string;
  /**
   * Document Id
   */
  document_id: string;
  /**
   * Bank Id
   */
  bank_id: string;
  /**
   * Chunk Index
   */
  chunk_index: number;
  /**
   * Chunk Text
   */
  chunk_text: string;
  /**
   * Created At
   */
  created_at: string;
};

/**
 * ClearMemoryObservationsResponse
 *
 * Response model for clearing observations for a specific memory.
 */
export type ClearMemoryObservationsResponse = {
  /**
   * Deleted Count
   */
  deleted_count: number;
};

/**
 * ConsolidationResponse
 *
 * Response model for consolidation trigger endpoint.
 */
export type ConsolidationResponse = {
  /**
   * Operation Id
   *
   * ID of the async consolidation operation
   */
  operation_id: string;
  /**
   * Deduplicated
   *
   * True if an existing pending task was reused
   */
  deduplicated?: boolean;
};

/**
 * CreateBankRequest
 *
 * Request model for creating/updating a bank.
 */
export type CreateBankRequest = {
  /**
   * Name
   *
   * Deprecated: display label only, not advertised
   */
  name?: string | null;
  /**
   * Deprecated: use update_bank_config instead
   */
  disposition?: DispositionTraits | null;
  /**
   * Disposition Skepticism
   *
   * Deprecated: use update_bank_config instead
   */
  disposition_skepticism?: number | null;
  /**
   * Disposition Literalism
   *
   * Deprecated: use update_bank_config instead
   */
  disposition_literalism?: number | null;
  /**
   * Disposition Empathy
   *
   * Deprecated: use update_bank_config instead
   */
  disposition_empathy?: number | null;
  /**
   * Mission
   *
   * Deprecated: use update_bank_config with reflect_mission instead
   */
  mission?: string | null;
  /**
   * Background
   *
   * Deprecated: use update_bank_config with reflect_mission instead
   */
  background?: string | null;
  /**
   * Reflect Mission
   *
   * Mission/context for Reflect operations. Guides how Reflect interprets and uses memories.
   */
  reflect_mission?: string | null;
  /**
   * Retain Mission
   *
   * Steers what gets extracted during retain(). Injected alongside built-in extraction rules.
   */
  retain_mission?: string | null;
  /**
   * Retain Extraction Mode
   *
   * Fact extraction mode: 'concise' (default), 'verbose', or 'custom'.
   */
  retain_extraction_mode?: string | null;
  /**
   * Retain Custom Instructions
   *
   * Custom extraction prompt. Only active when retain_extraction_mode is 'custom'.
   */
  retain_custom_instructions?: string | null;
  /**
   * Retain Chunk Size
   *
   * Maximum token size for each content chunk during retain.
   */
  retain_chunk_size?: number | null;
  /**
   * Enable Observations
   *
   * Toggle automatic observation consolidation after retain().
   */
  enable_observations?: boolean | null;
  /**
   * Observations Mission
   *
   * Controls what gets synthesised into observations. Replaces built-in consolidation rules entirely.
   */
  observations_mission?: string | null;
};

/**
 * CreateDirectiveRequest
 *
 * Request model for creating a directive.
 */
export type CreateDirectiveRequest = {
  /**
   * Name
   *
   * Human-readable name for the directive
   */
  name: string;
  /**
   * Content
   *
   * The directive text to inject into prompts
   */
  content: string;
  /**
   * Priority
   *
   * Higher priority directives are injected first
   */
  priority?: number;
  /**
   * Is Active
   *
   * Whether this directive is active
   */
  is_active?: boolean;
  /**
   * Tags
   *
   * Tags for filtering
   */
  tags?: Array<string>;
};

/**
 * CreateMentalModelRequest
 *
 * Request model for creating a mental model.
 */
export type CreateMentalModelRequest = {
  /**
   * Id
   *
   * Optional custom ID for the mental model (alphanumeric lowercase with hyphens)
   */
  id?: string | null;
  /**
   * Name
   *
   * Human-readable name for the mental model
   */
  name: string;
  /**
   * Source Query
   *
   * The query to run to generate content
   */
  source_query: string;
  /**
   * Tags
   *
   * Tags for scoped visibility
   */
  tags?: Array<string>;
  /**
   * Max Tokens
   *
   * Maximum tokens for generated content
   */
  max_tokens?: number;
  /**
   * Trigger settings
   */
  trigger?: MentalModelTrigger;
};

/**
 * CreateMentalModelResponse
 *
 * Response model for mental model creation.
 */
export type CreateMentalModelResponse = {
  /**
   * Mental Model Id
   *
   * ID of the created mental model
   */
  mental_model_id?: string | null;
  /**
   * Operation Id
   *
   * Operation ID to track refresh progress
   */
  operation_id: string;
};

/**
 * CreateWebhookRequest
 *
 * Request model for registering a webhook.
 */
export type CreateWebhookRequest = {
  /**
   * Url
   *
   * HTTP(S) endpoint URL to deliver events to
   */
  url: string;
  /**
   * Secret
   *
   * HMAC-SHA256 signing secret (optional)
   */
  secret?: string | null;
  /**
   * Event Types
   *
   * List of event types to deliver. Currently supported: 'consolidation.completed'
   */
  event_types?: Array<string>;
  /**
   * Enabled
   *
   * Whether this webhook is active
   */
  enabled?: boolean;
  /**
   * HTTP delivery configuration (method, timeout, headers, params)
   */
  http_config?: WebhookHttpConfig;
};

/**
 * DeleteDocumentResponse
 *
 * Response model for delete document endpoint.
 */
export type DeleteDocumentResponse = {
  /**
   * Success
   */
  success: boolean;
  /**
   * Message
   */
  message: string;
  /**
   * Document Id
   */
  document_id: string;
  /**
   * Memory Units Deleted
   */
  memory_units_deleted: number;
};

/**
 * DeleteResponse
 *
 * Response model for delete operations.
 */
export type DeleteResponse = {
  /**
   * Success
   */
  success: boolean;
  /**
   * Message
   */
  message?: string | null;
  /**
   * Deleted Count
   */
  deleted_count?: number | null;
};

/**
 * DirectiveListResponse
 *
 * Response model for listing directives.
 */
export type DirectiveListResponse = {
  /**
   * Items
   */
  items: Array<DirectiveResponse>;
};

/**
 * DirectiveResponse
 *
 * Response model for a directive.
 */
export type DirectiveResponse = {
  /**
   * Id
   */
  id: string;
  /**
   * Bank Id
   */
  bank_id: string;
  /**
   * Name
   */
  name: string;
  /**
   * Content
   */
  content: string;
  /**
   * Priority
   */
  priority?: number;
  /**
   * Is Active
   */
  is_active?: boolean;
  /**
   * Tags
   */
  tags?: Array<string>;
  /**
   * Created At
   */
  created_at?: string | null;
  /**
   * Updated At
   */
  updated_at?: string | null;
};

/**
 * DispositionTraits
 *
 * Disposition traits that influence how memories are formed and interpreted.
 */
export type DispositionTraits = {
  /**
   * Skepticism
   *
   * How skeptical vs trusting (1=trusting, 5=skeptical)
   */
  skepticism: number;
  /**
   * Literalism
   *
   * How literally to interpret information (1=flexible, 5=literal)
   */
  literalism: number;
  /**
   * Empathy
   *
   * How much to consider emotional context (1=detached, 5=empathetic)
   */
  empathy: number;
};

/**
 * DocumentResponse
 *
 * Response model for get document endpoint.
 */
export type DocumentResponse = {
  /**
   * Id
   */
  id: string;
  /**
   * Bank Id
   */
  bank_id: string;
  /**
   * Original Text
   */
  original_text: string;
  /**
   * Content Hash
   */
  content_hash: string | null;
  /**
   * Created At
   */
  created_at: string;
  /**
   * Updated At
   */
  updated_at: string;
  /**
   * Memory Unit Count
   */
  memory_unit_count: number;
  /**
   * Tags
   *
   * Tags associated with this document
   */
  tags?: Array<string>;
};

/**
 * EntityDetailResponse
 *
 * Response model for entity detail endpoint.
 */
export type EntityDetailResponse = {
  /**
   * Id
   */
  id: string;
  /**
   * Canonical Name
   */
  canonical_name: string;
  /**
   * Mention Count
   */
  mention_count: number;
  /**
   * First Seen
   */
  first_seen?: string | null;
  /**
   * Last Seen
   */
  last_seen?: string | null;
  /**
   * Metadata
   */
  metadata?: {
    [key: string]: unknown;
  } | null;
  /**
   * Observations
   */
  observations: Array<EntityObservationResponse>;
};

/**
 * EntityIncludeOptions
 *
 * Options for including entity observations in recall results.
 */
export type EntityIncludeOptions = {
  /**
   * Max Tokens
   *
   * Maximum tokens for entity observations
   */
  max_tokens?: number;
};

/**
 * EntityInput
 *
 * Entity to associate with retained content.
 */
export type EntityInput = {
  /**
   * Text
   *
   * The entity name/text
   */
  text: string;
  /**
   * Type
   *
   * Optional entity type (e.g., 'PERSON', 'ORG', 'CONCEPT')
   */
  type?: string | null;
};

/**
 * EntityListItem
 *
 * Entity list item with summary.
 */
export type EntityListItem = {
  /**
   * Id
   */
  id: string;
  /**
   * Canonical Name
   */
  canonical_name: string;
  /**
   * Mention Count
   */
  mention_count: number;
  /**
   * First Seen
   */
  first_seen?: string | null;
  /**
   * Last Seen
   */
  last_seen?: string | null;
  /**
   * Metadata
   */
  metadata?: {
    [key: string]: unknown;
  } | null;
};

/**
 * EntityListResponse
 *
 * Response model for entity list endpoint.
 */
export type EntityListResponse = {
  /**
   * Items
   */
  items: Array<EntityListItem>;
  /**
   * Total
   */
  total: number;
  /**
   * Limit
   */
  limit: number;
  /**
   * Offset
   */
  offset: number;
};

/**
 * EntityObservationResponse
 *
 * An observation about an entity.
 */
export type EntityObservationResponse = {
  /**
   * Text
   */
  text: string;
  /**
   * Mentioned At
   */
  mentioned_at?: string | null;
};

/**
 * EntityStateResponse
 *
 * Current mental model of an entity.
 */
export type EntityStateResponse = {
  /**
   * Entity Id
   */
  entity_id: string;
  /**
   * Canonical Name
   */
  canonical_name: string;
  /**
   * Observations
   */
  observations: Array<EntityObservationResponse>;
};

/**
 * FactsIncludeOptions
 *
 * Options for including facts (based_on) in reflect results.
 */
export type FactsIncludeOptions = {
  [key: string]: unknown;
};

/**
 * FeaturesInfo
 *
 * Feature flags indicating which capabilities are enabled.
 */
export type FeaturesInfo = {
  /**
   * Observations
   *
   * Whether observations (auto-consolidation) are enabled
   */
  observations: boolean;
  /**
   * Mcp
   *
   * Whether MCP (Model Context Protocol) server is enabled
   */
  mcp: boolean;
  /**
   * Worker
   *
   * Whether the background worker is enabled
   */
  worker: boolean;
  /**
   * Bank Config Api
   *
   * Whether per-bank configuration API is enabled
   */
  bank_config_api: boolean;
  /**
   * File Upload Api
   *
   * Whether file upload/conversion API is enabled
   */
  file_upload_api: boolean;
};

/**
 * FileRetainResponse
 *
 * Response model for file upload endpoint.
 */
export type FileRetainResponse = {
  /**
   * Operation Ids
   *
   * Operation IDs for tracking file conversion operations. Use GET /v1/default/banks/{bank_id}/operations to list operations.
   */
  operation_ids: Array<string>;
};

/**
 * GraphDataResponse
 *
 * Response model for graph data endpoint.
 */
export type GraphDataResponse = {
  /**
   * Nodes
   */
  nodes: Array<{
    [key: string]: unknown;
  }>;
  /**
   * Edges
   */
  edges: Array<{
    [key: string]: unknown;
  }>;
  /**
   * Table Rows
   */
  table_rows: Array<{
    [key: string]: unknown;
  }>;
  /**
   * Total Units
   */
  total_units: number;
  /**
   * Limit
   */
  limit: number;
};

/**
 * HTTPValidationError
 */
export type HttpValidationError = {
  /**
   * Detail
   */
  detail?: Array<ValidationError>;
};

/**
 * IncludeOptions
 *
 * Options for including additional data in recall results.
 */
export type IncludeOptions = {
  /**
   * Include entity observations. Set to null to disable entity inclusion.
   */
  entities?: EntityIncludeOptions | null;
  /**
   * Include raw chunks. Set to {} to enable, null to disable (default: disabled).
   */
  chunks?: ChunkIncludeOptions | null;
  /**
   * Include source facts for observation-type results. Set to {} to enable, null to disable (default: disabled).
   */
  source_facts?: SourceFactsIncludeOptions | null;
};

/**
 * ListDocumentsResponse
 *
 * Response model for list documents endpoint.
 */
export type ListDocumentsResponse = {
  /**
   * Items
   */
  items: Array<{
    [key: string]: unknown;
  }>;
  /**
   * Total
   */
  total: number;
  /**
   * Limit
   */
  limit: number;
  /**
   * Offset
   */
  offset: number;
};

/**
 * ListMemoryUnitsResponse
 *
 * Response model for list memory units endpoint.
 */
export type ListMemoryUnitsResponse = {
  /**
   * Items
   */
  items: Array<{
    [key: string]: unknown;
  }>;
  /**
   * Total
   */
  total: number;
  /**
   * Limit
   */
  limit: number;
  /**
   * Offset
   */
  offset: number;
};

/**
 * ListTagsResponse
 *
 * Response model for list tags endpoint.
 */
export type ListTagsResponse = {
  /**
   * Items
   */
  items: Array<TagItem>;
  /**
   * Total
   */
  total: number;
  /**
   * Limit
   */
  limit: number;
  /**
   * Offset
   */
  offset: number;
};

/**
 * MemoryItem
 *
 * Single memory item for retain.
 */
export type MemoryItem = {
  /**
   * Content
   */
  content: string;
  /**
   * Timestamp
   *
   * When the content occurred. Accepts an ISO 8601 datetime string (e.g. '2024-01-15T10:30:00Z'), null/omitted (defaults to now), or the special string 'unset' to explicitly store without any timestamp (use this for timeless content such as fictional documents or static reference material).
   */
  timestamp?: string | null;
  /**
   * Context
   */
  context?: string | null;
  /**
   * Metadata
   */
  metadata?: {
    [key: string]: string;
  } | null;
  /**
   * Document Id
   *
   * Optional document ID for this memory item.
   */
  document_id?: string | null;
  /**
   * Entities
   *
   * Optional entities to combine with auto-extracted entities.
   */
  entities?: Array<EntityInput> | null;
  /**
   * Tags
   *
   * Optional tags for visibility scoping. Memories with tags can be filtered during recall.
   */
  tags?: Array<string> | null;
  /**
   * ObservationScopes
   *
   * How to scope observations during consolidation. 'per_tag' runs one consolidation pass per individual tag, creating separate observations for each tag. 'combined' (default) runs a single pass with all tags together. A list of tag lists runs one pass per inner list, giving full control over which combinations to use.
   */
  observation_scopes?:
    | "per_tag"
    | "combined"
    | "all_combinations"
    | Array<Array<string>>
    | null;
};

/**
 * MentalModelListResponse
 *
 * Response model for listing mental models.
 */
export type MentalModelListResponse = {
  /**
   * Items
   */
  items: Array<MentalModelResponse>;
};

/**
 * MentalModelResponse
 *
 * Response model for a mental model (stored reflect response).
 */
export type MentalModelResponse = {
  /**
   * Id
   */
  id: string;
  /**
   * Bank Id
   */
  bank_id: string;
  /**
   * Name
   */
  name: string;
  /**
   * Source Query
   */
  source_query: string;
  /**
   * Content
   *
   * The mental model content as well-formatted markdown (auto-generated from reflect endpoint)
   */
  content: string;
  /**
   * Tags
   */
  tags?: Array<string>;
  /**
   * Max Tokens
   */
  max_tokens?: number;
  trigger?: MentalModelTrigger;
  /**
   * Last Refreshed At
   */
  last_refreshed_at?: string | null;
  /**
   * Created At
   */
  created_at?: string | null;
  /**
   * Reflect Response
   *
   * Full reflect API response payload including based_on facts and observations
   */
  reflect_response?: {
    [key: string]: unknown;
  } | null;
};

/**
 * MentalModelTrigger
 *
 * Trigger settings for a mental model.
 */
export type MentalModelTrigger = {
  /**
   * Refresh After Consolidation
   *
   * If true, refresh this mental model after observations consolidation (real-time mode)
   */
  refresh_after_consolidation?: boolean;
};

/**
 * OperationResponse
 *
 * Response model for a single async operation.
 */
export type OperationResponse = {
  /**
   * Id
   */
  id: string;
  /**
   * Task Type
   */
  task_type: string;
  /**
   * Items Count
   */
  items_count: number;
  /**
   * Document Id
   */
  document_id?: string | null;
  /**
   * Created At
   */
  created_at: string;
  /**
   * Status
   */
  status: string;
  /**
   * Error Message
   */
  error_message: string | null;
};

/**
 * OperationStatusResponse
 *
 * Response model for getting a single operation status.
 */
export type OperationStatusResponse = {
  /**
   * Operation Id
   */
  operation_id: string;
  /**
   * Status
   */
  status: "pending" | "completed" | "failed" | "not_found";
  /**
   * Operation Type
   */
  operation_type?: string | null;
  /**
   * Created At
   */
  created_at?: string | null;
  /**
   * Updated At
   */
  updated_at?: string | null;
  /**
   * Completed At
   */
  completed_at?: string | null;
  /**
   * Error Message
   */
  error_message?: string | null;
  /**
   * Result Metadata
   *
   * Internal metadata for debugging. Structure may change without notice. Not for production use.
   */
  result_metadata?: {
    [key: string]: unknown;
  } | null;
  /**
   * Child Operations
   *
   * Child operations for batch operations (if applicable)
   */
  child_operations?: Array<ChildOperationStatus> | null;
};

/**
 * OperationsListResponse
 *
 * Response model for list operations endpoint.
 */
export type OperationsListResponse = {
  /**
   * Bank Id
   */
  bank_id: string;
  /**
   * Total
   */
  total: number;
  /**
   * Limit
   */
  limit: number;
  /**
   * Offset
   */
  offset: number;
  /**
   * Operations
   */
  operations: Array<OperationResponse>;
};

/**
 * RecallRequest
 *
 * Request model for recall endpoint.
 */
export type RecallRequest = {
  /**
   * Query
   */
  query: string;
  /**
   * Types
   *
   * List of fact types to recall: 'world', 'experience', 'observation'. Defaults to world and experience if not specified.
   */
  types?: Array<string> | null;
  budget?: Budget;
  /**
   * Max Tokens
   */
  max_tokens?: number;
  /**
   * Trace
   */
  trace?: boolean;
  /**
   * Query Timestamp
   *
   * ISO format date string (e.g., '2023-05-30T23:40:00')
   */
  query_timestamp?: string | null;
  /**
   * Options for including additional data (entities are included by default)
   */
  include?: IncludeOptions;
  /**
   * Tags
   *
   * Filter memories by tags. If not specified, all memories are returned.
   */
  tags?: Array<string> | null;
  /**
   * Tags Match
   *
   * How to match tags: 'any' (OR, includes untagged), 'all' (AND, includes untagged), 'any_strict' (OR, excludes untagged), 'all_strict' (AND, excludes untagged).
   */
  tags_match?: "any" | "all" | "any_strict" | "all_strict";
};

/**
 * RecallResponse
 *
 * Response model for recall endpoints.
 */
export type RecallResponse = {
  /**
   * Results
   */
  results: Array<RecallResult>;
  /**
   * Trace
   */
  trace?: {
    [key: string]: unknown;
  } | null;
  /**
   * Entities
   *
   * Entity states for entities mentioned in results
   */
  entities?: {
    [key: string]: EntityStateResponse;
  } | null;
  /**
   * Chunks
   *
   * Chunks for facts, keyed by chunk_id
   */
  chunks?: {
    [key: string]: ChunkData;
  } | null;
  /**
   * Source Facts
   *
   * Source facts for observation-type results, keyed by fact ID
   */
  source_facts?: {
    [key: string]: RecallResult;
  } | null;
};

/**
 * RecallResult
 *
 * Single recall result item.
 */
export type RecallResult = {
  /**
   * Id
   */
  id: string;
  /**
   * Text
   */
  text: string;
  /**
   * Type
   */
  type?: string | null;
  /**
   * Entities
   */
  entities?: Array<string> | null;
  /**
   * Context
   */
  context?: string | null;
  /**
   * Occurred Start
   */
  occurred_start?: string | null;
  /**
   * Occurred End
   */
  occurred_end?: string | null;
  /**
   * Mentioned At
   */
  mentioned_at?: string | null;
  /**
   * Document Id
   */
  document_id?: string | null;
  /**
   * Metadata
   */
  metadata?: {
    [key: string]: string;
  } | null;
  /**
   * Chunk Id
   */
  chunk_id?: string | null;
  /**
   * Tags
   */
  tags?: Array<string> | null;
  /**
   * Source Fact Ids
   */
  source_fact_ids?: Array<string> | null;
};

/**
 * ReflectBasedOn
 *
 * Evidence the response is based on: memories, mental models, and directives.
 */
export type ReflectBasedOn = {
  /**
   * Memories
   *
   * Memory facts used to generate the response
   */
  memories?: Array<ReflectFact>;
  /**
   * Mental Models
   *
   * Mental models used during reflection
   */
  mental_models?: Array<ReflectMentalModel>;
  /**
   * Directives
   *
   * Directives applied during reflection
   */
  directives?: Array<ReflectDirective>;
};

/**
 * ReflectDirective
 *
 * A directive applied during reflect.
 */
export type ReflectDirective = {
  /**
   * Id
   *
   * Directive ID
   */
  id: string;
  /**
   * Name
   *
   * Directive name
   */
  name: string;
  /**
   * Content
   *
   * Directive content
   */
  content: string;
};

/**
 * ReflectFact
 *
 * A fact used in think response.
 */
export type ReflectFact = {
  /**
   * Id
   */
  id?: string | null;
  /**
   * Text
   *
   * Fact text. When type='observation', this contains markdown-formatted consolidated knowledge
   */
  text: string;
  /**
   * Type
   */
  type?: string | null;
  /**
   * Context
   */
  context?: string | null;
  /**
   * Occurred Start
   */
  occurred_start?: string | null;
  /**
   * Occurred End
   */
  occurred_end?: string | null;
};

/**
 * ReflectIncludeOptions
 *
 * Options for including additional data in reflect results.
 */
export type ReflectIncludeOptions = {
  /**
   * Include facts that the answer is based on. Set to {} to enable, null to disable (default: disabled).
   */
  facts?: FactsIncludeOptions | null;
  /**
   * Include tool calls trace. Set to {} for full trace (input+output), {output: false} for inputs only.
   */
  tool_calls?: ToolCallsIncludeOptions | null;
};

/**
 * ReflectLLMCall
 *
 * An LLM call made during reflect agent execution.
 */
export type ReflectLlmCall = {
  /**
   * Scope
   *
   * Call scope: agent_1, agent_2, final, etc.
   */
  scope: string;
  /**
   * Duration Ms
   *
   * Execution time in milliseconds
   */
  duration_ms: number;
};

/**
 * ReflectMentalModel
 *
 * A mental model used during reflect.
 */
export type ReflectMentalModel = {
  /**
   * Id
   *
   * Mental model ID
   */
  id: string;
  /**
   * Text
   *
   * Mental model content
   */
  text: string;
  /**
   * Context
   *
   * Additional context
   */
  context?: string | null;
};

/**
 * ReflectRequest
 *
 * Request model for reflect endpoint.
 */
export type ReflectRequest = {
  /**
   * Query
   */
  query: string;
  budget?: Budget;
  /**
   * Context
   *
   * DEPRECATED: Additional context is now concatenated with the query. Pass context directly in the query field instead. If provided, it will be appended to the query for backward compatibility.
   *
   * @deprecated
   */
  context?: string | null;
  /**
   * Max Tokens
   *
   * Maximum tokens for the response
   */
  max_tokens?: number;
  /**
   * Options for including additional data (disabled by default)
   */
  include?: ReflectIncludeOptions;
  /**
   * Response Schema
   *
   * Optional JSON Schema for structured output. When provided, the response will include a 'structured_output' field with the LLM response parsed according to this schema.
   */
  response_schema?: {
    [key: string]: unknown;
  } | null;
  /**
   * Tags
   *
   * Filter memories by tags during reflection. If not specified, all memories are considered.
   */
  tags?: Array<string> | null;
  /**
   * Tags Match
   *
   * How to match tags: 'any' (OR, includes untagged), 'all' (AND, includes untagged), 'any_strict' (OR, excludes untagged), 'all_strict' (AND, excludes untagged).
   */
  tags_match?: "any" | "all" | "any_strict" | "all_strict";
};

/**
 * ReflectResponse
 *
 * Response model for think endpoint.
 */
export type ReflectResponse = {
  /**
   * Text
   *
   * The reflect response as well-formatted markdown (headers, lists, bold/italic, code blocks, etc.)
   */
  text: string;
  /**
   * Evidence used to generate the response. Only present when include.facts is set.
   */
  based_on?: ReflectBasedOn | null;
  /**
   * Structured Output
   *
   * Structured output parsed according to the request's response_schema. Only present when response_schema was provided in the request.
   */
  structured_output?: {
    [key: string]: unknown;
  } | null;
  /**
   * Token usage metrics for LLM calls during reflection.
   */
  usage?: TokenUsage | null;
  /**
   * Execution trace of tool and LLM calls. Only present when include.tool_calls is set.
   */
  trace?: ReflectTrace | null;
};

/**
 * ReflectToolCall
 *
 * A tool call made during reflect agent execution.
 */
export type ReflectToolCall = {
  /**
   * Tool
   *
   * Tool name: lookup, recall, learn, expand
   */
  tool: string;
  /**
   * Input
   *
   * Tool input parameters
   */
  input: {
    [key: string]: unknown;
  };
  /**
   * Output
   *
   * Tool output (only included when include.tool_calls.output is true)
   */
  output?: {
    [key: string]: unknown;
  } | null;
  /**
   * Duration Ms
   *
   * Execution time in milliseconds
   */
  duration_ms: number;
  /**
   * Iteration
   *
   * Iteration number (1-based) when this tool was called
   */
  iteration?: number;
};

/**
 * ReflectTrace
 *
 * Execution trace of LLM and tool calls during reflection.
 */
export type ReflectTrace = {
  /**
   * Tool Calls
   *
   * Tool calls made during reflection
   */
  tool_calls?: Array<ReflectToolCall>;
  /**
   * Llm Calls
   *
   * LLM calls made during reflection
   */
  llm_calls?: Array<ReflectLlmCall>;
};

/**
 * RetainRequest
 *
 * Request model for retain endpoint.
 */
export type RetainRequest = {
  /**
   * Items
   */
  items: Array<MemoryItem>;
  /**
   * Async
   *
   * If true, process asynchronously in background. If false, wait for completion (default: false)
   */
  async?: boolean;
  /**
   * Document Tags
   *
   * Deprecated. Use item-level tags instead.
   *
   * @deprecated
   */
  document_tags?: Array<string> | null;
};

/**
 * RetainResponse
 *
 * Response model for retain endpoint.
 */
export type RetainResponse = {
  /**
   * Success
   */
  success: boolean;
  /**
   * Bank Id
   */
  bank_id: string;
  /**
   * Items Count
   */
  items_count: number;
  /**
   * Async
   *
   * Whether the operation was processed asynchronously
   */
  async: boolean;
  /**
   * Operation Id
   *
   * Operation ID for tracking async operations. Use GET /v1/default/banks/{bank_id}/operations to list operations. Only present when async=true.
   */
  operation_id?: string | null;
  /**
   * Token usage metrics for LLM calls during fact extraction (only present for synchronous operations)
   */
  usage?: TokenUsage | null;
};

/**
 * RetryOperationResponse
 *
 * Response model for retry operation endpoint.
 */
export type RetryOperationResponse = {
  /**
   * Success
   */
  success: boolean;
  /**
   * Message
   */
  message: string;
  /**
   * Operation Id
   */
  operation_id: string;
};

/**
 * SourceFactsIncludeOptions
 *
 * Options for including source facts for observation-type results.
 */
export type SourceFactsIncludeOptions = {
  /**
   * Max Tokens
   *
   * Maximum total tokens for source facts across all observations (-1 = unlimited)
   */
  max_tokens?: number;
  /**
   * Max Tokens Per Observation
   *
   * Maximum tokens of source facts per observation (-1 = unlimited)
   */
  max_tokens_per_observation?: number;
};

/**
 * TagItem
 *
 * Single tag with usage count.
 */
export type TagItem = {
  /**
   * Tag
   *
   * The tag value
   */
  tag: string;
  /**
   * Count
   *
   * Number of memories with this tag
   */
  count: number;
};

/**
 * TokenUsage
 *
 * Token usage metrics for LLM calls.
 *
 * Tracks input/output tokens for a single request to enable
 * per-request cost tracking and monitoring.
 */
export type TokenUsage = {
  /**
   * Input Tokens
   *
   * Number of input/prompt tokens consumed
   */
  input_tokens?: number;
  /**
   * Output Tokens
   *
   * Number of output/completion tokens generated
   */
  output_tokens?: number;
  /**
   * Total Tokens
   *
   * Total tokens (input + output)
   */
  total_tokens?: number;
};

/**
 * ToolCallsIncludeOptions
 *
 * Options for including tool calls in reflect results.
 */
export type ToolCallsIncludeOptions = {
  /**
   * Output
   *
   * Include tool outputs in the trace. Set to false to only include inputs (smaller payload).
   */
  output?: boolean;
};

/**
 * UpdateDirectiveRequest
 *
 * Request model for updating a directive.
 */
export type UpdateDirectiveRequest = {
  /**
   * Name
   *
   * New name
   */
  name?: string | null;
  /**
   * Content
   *
   * New content
   */
  content?: string | null;
  /**
   * Priority
   *
   * New priority
   */
  priority?: number | null;
  /**
   * Is Active
   *
   * New active status
   */
  is_active?: boolean | null;
  /**
   * Tags
   *
   * New tags
   */
  tags?: Array<string> | null;
};

/**
 * UpdateDispositionRequest
 *
 * Request model for updating disposition traits.
 */
export type UpdateDispositionRequest = {
  disposition: DispositionTraits;
};

/**
 * UpdateDocumentRequest
 *
 * Request model for updating a document's mutable fields.
 */
export type UpdateDocumentRequest = {
  /**
   * Tags
   *
   * New tags for the document and its memory units. Triggers observation invalidation and re-consolidation.
   */
  tags?: Array<string> | null;
};

/**
 * UpdateDocumentResponse
 *
 * Response model for update document endpoint.
 */
export type UpdateDocumentResponse = {
  /**
   * Success
   */
  success?: boolean;
};

/**
 * UpdateMentalModelRequest
 *
 * Request model for updating a mental model.
 */
export type UpdateMentalModelRequest = {
  /**
   * Name
   *
   * New name for the mental model
   */
  name?: string | null;
  /**
   * Source Query
   *
   * New source query for the mental model
   */
  source_query?: string | null;
  /**
   * Max Tokens
   *
   * Maximum tokens for generated content
   */
  max_tokens?: number | null;
  /**
   * Tags
   *
   * Tags for scoped visibility
   */
  tags?: Array<string> | null;
  /**
   * Trigger settings
   */
  trigger?: MentalModelTrigger | null;
};

/**
 * UpdateWebhookRequest
 *
 * Request model for updating a webhook. Only provided fields are updated.
 */
export type UpdateWebhookRequest = {
  /**
   * Url
   *
   * HTTP(S) endpoint URL
   */
  url?: string | null;
  /**
   * Secret
   *
   * HMAC-SHA256 signing secret. Omit to keep existing; send null to clear.
   */
  secret?: string | null;
  /**
   * Event Types
   *
   * List of event types
   */
  event_types?: Array<string> | null;
  /**
   * Enabled
   *
   * Whether this webhook is active
   */
  enabled?: boolean | null;
  /**
   * HTTP delivery configuration
   */
  http_config?: WebhookHttpConfig | null;
};

/**
 * ValidationError
 */
export type ValidationError = {
  /**
   * Location
   */
  loc: Array<string | number>;
  /**
   * Message
   */
  msg: string;
  /**
   * Error Type
   */
  type: string;
};

/**
 * VersionResponse
 *
 * Response model for the version/info endpoint.
 */
export type VersionResponse = {
  /**
   * Api Version
   *
   * API version string
   */
  api_version: string;
  /**
   * Enabled feature flags
   */
  features: FeaturesInfo;
};

/**
 * WebhookDeliveryListResponse
 *
 * Response model for listing webhook deliveries.
 */
export type WebhookDeliveryListResponse = {
  /**
   * Items
   */
  items: Array<WebhookDeliveryResponse>;
  /**
   * Next Cursor
   */
  next_cursor?: string | null;
};

/**
 * WebhookDeliveryResponse
 *
 * Response model for a webhook delivery record.
 */
export type WebhookDeliveryResponse = {
  /**
   * Id
   */
  id: string;
  /**
   * Webhook Id
   */
  webhook_id: string | null;
  /**
   * Url
   */
  url: string;
  /**
   * Event Type
   */
  event_type: string;
  /**
   * Status
   */
  status: string;
  /**
   * Attempts
   */
  attempts: number;
  /**
   * Next Retry At
   */
  next_retry_at?: string | null;
  /**
   * Last Error
   */
  last_error?: string | null;
  /**
   * Last Response Status
   */
  last_response_status?: number | null;
  /**
   * Last Response Body
   */
  last_response_body?: string | null;
  /**
   * Last Attempt At
   */
  last_attempt_at?: string | null;
  /**
   * Created At
   */
  created_at?: string | null;
  /**
   * Updated At
   */
  updated_at?: string | null;
};

/**
 * WebhookHttpConfig
 *
 * HTTP delivery configuration for a webhook.
 */
export type WebhookHttpConfig = {
  /**
   * Method
   *
   * HTTP method: GET or POST
   */
  method?: string;
  /**
   * Timeout Seconds
   *
   * HTTP request timeout in seconds
   */
  timeout_seconds?: number;
  /**
   * Headers
   *
   * Custom HTTP headers
   */
  headers?: {
    [key: string]: string;
  };
  /**
   * Params
   *
   * Custom HTTP query parameters
   */
  params?: {
    [key: string]: string;
  };
};

/**
 * WebhookListResponse
 *
 * Response model for listing webhooks.
 */
export type WebhookListResponse = {
  /**
   * Items
   */
  items: Array<WebhookResponse>;
};

/**
 * WebhookResponse
 *
 * Response model for a webhook.
 */
export type WebhookResponse = {
  /**
   * Id
   */
  id: string;
  /**
   * Bank Id
   */
  bank_id: string | null;
  /**
   * Url
   */
  url: string;
  /**
   * Secret
   *
   * Signing secret (redacted in responses)
   */
  secret?: string | null;
  /**
   * Event Types
   */
  event_types: Array<string>;
  /**
   * Enabled
   */
  enabled: boolean;
  http_config?: WebhookHttpConfig;
  /**
   * Created At
   */
  created_at?: string | null;
  /**
   * Updated At
   */
  updated_at?: string | null;
};

export type HealthEndpointHealthGetData = {
  body?: never;
  path?: never;
  query?: never;
  url: "/health";
};

export type HealthEndpointHealthGetResponses = {
  /**
   * Successful Response
   */
  200: unknown;
};

export type GetVersionData = {
  body?: never;
  path?: never;
  query?: never;
  url: "/version";
};

export type GetVersionResponses = {
  /**
   * Successful Response
   */
  200: VersionResponse;
};

export type GetVersionResponse = GetVersionResponses[keyof GetVersionResponses];

export type MetricsEndpointMetricsGetData = {
  body?: never;
  path?: never;
  query?: never;
  url: "/metrics";
};

export type MetricsEndpointMetricsGetResponses = {
  /**
   * Successful Response
   */
  200: unknown;
};

export type GetGraphData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: {
    /**
     * Type
     */
    type?: string | null;
    /**
     * Limit
     */
    limit?: number;
    /**
     * Q
     */
    q?: string | null;
    /**
     * Tags
     */
    tags?: Array<string> | null;
    /**
     * Tags Match
     */
    tags_match?: string;
  };
  url: "/v1/default/banks/{bank_id}/graph";
};

export type GetGraphErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type GetGraphError = GetGraphErrors[keyof GetGraphErrors];

export type GetGraphResponses = {
  /**
   * Successful Response
   */
  200: GraphDataResponse;
};

export type GetGraphResponse = GetGraphResponses[keyof GetGraphResponses];

export type ListMemoriesData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: {
    /**
     * Type
     */
    type?: string | null;
    /**
     * Q
     */
    q?: string | null;
    /**
     * Limit
     */
    limit?: number;
    /**
     * Offset
     */
    offset?: number;
  };
  url: "/v1/default/banks/{bank_id}/memories/list";
};

export type ListMemoriesErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type ListMemoriesError = ListMemoriesErrors[keyof ListMemoriesErrors];

export type ListMemoriesResponses = {
  /**
   * Successful Response
   */
  200: ListMemoryUnitsResponse;
};

export type ListMemoriesResponse =
  ListMemoriesResponses[keyof ListMemoriesResponses];

export type GetMemoryData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
    /**
     * Memory Id
     */
    memory_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/memories/{memory_id}";
};

export type GetMemoryErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type GetMemoryError = GetMemoryErrors[keyof GetMemoryErrors];

export type GetMemoryResponses = {
  /**
   * Successful Response
   */
  200: unknown;
};

export type GetObservationHistoryData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
    /**
     * Memory Id
     */
    memory_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/memories/{memory_id}/history";
};

export type GetObservationHistoryErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type GetObservationHistoryError =
  GetObservationHistoryErrors[keyof GetObservationHistoryErrors];

export type GetObservationHistoryResponses = {
  /**
   * Successful Response
   */
  200: unknown;
};

export type RecallMemoriesData = {
  body: RecallRequest;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/memories/recall";
};

export type RecallMemoriesErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type RecallMemoriesError =
  RecallMemoriesErrors[keyof RecallMemoriesErrors];

export type RecallMemoriesResponses = {
  /**
   * Successful Response
   */
  200: RecallResponse;
};

export type RecallMemoriesResponse =
  RecallMemoriesResponses[keyof RecallMemoriesResponses];

export type ReflectData = {
  body: ReflectRequest;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/reflect";
};

export type ReflectErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type ReflectError = ReflectErrors[keyof ReflectErrors];

export type ReflectResponses = {
  /**
   * Successful Response
   */
  200: ReflectResponse;
};

export type ReflectResponse2 = ReflectResponses[keyof ReflectResponses];

export type ListBanksData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path?: never;
  query?: never;
  url: "/v1/default/banks";
};

export type ListBanksErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type ListBanksError = ListBanksErrors[keyof ListBanksErrors];

export type ListBanksResponses = {
  /**
   * Successful Response
   */
  200: BankListResponse;
};

export type ListBanksResponse = ListBanksResponses[keyof ListBanksResponses];

export type GetAgentStatsData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/stats";
};

export type GetAgentStatsErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type GetAgentStatsError = GetAgentStatsErrors[keyof GetAgentStatsErrors];

export type GetAgentStatsResponses = {
  /**
   * Successful Response
   */
  200: BankStatsResponse;
};

export type GetAgentStatsResponse =
  GetAgentStatsResponses[keyof GetAgentStatsResponses];

export type ListEntitiesData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: {
    /**
     * Limit
     *
     * Maximum number of entities to return
     */
    limit?: number;
    /**
     * Offset
     *
     * Offset for pagination
     */
    offset?: number;
  };
  url: "/v1/default/banks/{bank_id}/entities";
};

export type ListEntitiesErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type ListEntitiesError = ListEntitiesErrors[keyof ListEntitiesErrors];

export type ListEntitiesResponses = {
  /**
   * Successful Response
   */
  200: EntityListResponse;
};

export type ListEntitiesResponse =
  ListEntitiesResponses[keyof ListEntitiesResponses];

export type GetEntityData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
    /**
     * Entity Id
     */
    entity_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/entities/{entity_id}";
};

export type GetEntityErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type GetEntityError = GetEntityErrors[keyof GetEntityErrors];

export type GetEntityResponses = {
  /**
   * Successful Response
   */
  200: EntityDetailResponse;
};

export type GetEntityResponse = GetEntityResponses[keyof GetEntityResponses];

export type RegenerateEntityObservationsData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
    /**
     * Entity Id
     */
    entity_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/entities/{entity_id}/regenerate";
};

export type RegenerateEntityObservationsErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type RegenerateEntityObservationsError =
  RegenerateEntityObservationsErrors[keyof RegenerateEntityObservationsErrors];

export type RegenerateEntityObservationsResponses = {
  /**
   * Successful Response
   */
  200: EntityDetailResponse;
};

export type RegenerateEntityObservationsResponse =
  RegenerateEntityObservationsResponses[keyof RegenerateEntityObservationsResponses];

export type ListMentalModelsData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: {
    /**
     * Tags
     *
     * Filter by tags
     */
    tags?: Array<string> | null;
    /**
     * Tags Match
     *
     * How to match tags
     */
    tags_match?: "any" | "all" | "exact";
    /**
     * Limit
     */
    limit?: number;
    /**
     * Offset
     */
    offset?: number;
  };
  url: "/v1/default/banks/{bank_id}/mental-models";
};

export type ListMentalModelsErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type ListMentalModelsError =
  ListMentalModelsErrors[keyof ListMentalModelsErrors];

export type ListMentalModelsResponses = {
  /**
   * Successful Response
   */
  200: MentalModelListResponse;
};

export type ListMentalModelsResponse =
  ListMentalModelsResponses[keyof ListMentalModelsResponses];

export type CreateMentalModelData = {
  body: CreateMentalModelRequest;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/mental-models";
};

export type CreateMentalModelErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type CreateMentalModelError =
  CreateMentalModelErrors[keyof CreateMentalModelErrors];

export type CreateMentalModelResponses = {
  /**
   * Successful Response
   */
  200: CreateMentalModelResponse;
};

export type CreateMentalModelResponse2 =
  CreateMentalModelResponses[keyof CreateMentalModelResponses];

export type DeleteMentalModelData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
    /**
     * Mental Model Id
     */
    mental_model_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/mental-models/{mental_model_id}";
};

export type DeleteMentalModelErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type DeleteMentalModelError =
  DeleteMentalModelErrors[keyof DeleteMentalModelErrors];

export type DeleteMentalModelResponses = {
  /**
   * Successful Response
   */
  200: unknown;
};

export type GetMentalModelData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
    /**
     * Mental Model Id
     */
    mental_model_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/mental-models/{mental_model_id}";
};

export type GetMentalModelErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type GetMentalModelError =
  GetMentalModelErrors[keyof GetMentalModelErrors];

export type GetMentalModelResponses = {
  /**
   * Successful Response
   */
  200: MentalModelResponse;
};

export type GetMentalModelResponse =
  GetMentalModelResponses[keyof GetMentalModelResponses];

export type UpdateMentalModelData = {
  body: UpdateMentalModelRequest;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
    /**
     * Mental Model Id
     */
    mental_model_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/mental-models/{mental_model_id}";
};

export type UpdateMentalModelErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type UpdateMentalModelError =
  UpdateMentalModelErrors[keyof UpdateMentalModelErrors];

export type UpdateMentalModelResponses = {
  /**
   * Successful Response
   */
  200: MentalModelResponse;
};

export type UpdateMentalModelResponse =
  UpdateMentalModelResponses[keyof UpdateMentalModelResponses];

export type GetMentalModelHistoryData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
    /**
     * Mental Model Id
     */
    mental_model_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/mental-models/{mental_model_id}/history";
};

export type GetMentalModelHistoryErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type GetMentalModelHistoryError =
  GetMentalModelHistoryErrors[keyof GetMentalModelHistoryErrors];

export type GetMentalModelHistoryResponses = {
  /**
   * Successful Response
   */
  200: unknown;
};

export type RefreshMentalModelData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
    /**
     * Mental Model Id
     */
    mental_model_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/mental-models/{mental_model_id}/refresh";
};

export type RefreshMentalModelErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type RefreshMentalModelError =
  RefreshMentalModelErrors[keyof RefreshMentalModelErrors];

export type RefreshMentalModelResponses = {
  /**
   * Successful Response
   */
  200: AsyncOperationSubmitResponse;
};

export type RefreshMentalModelResponse =
  RefreshMentalModelResponses[keyof RefreshMentalModelResponses];

export type ListDirectivesData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: {
    /**
     * Tags
     *
     * Filter by tags
     */
    tags?: Array<string> | null;
    /**
     * Tags Match
     *
     * How to match tags
     */
    tags_match?: "any" | "all" | "exact";
    /**
     * Active Only
     *
     * Only return active directives
     */
    active_only?: boolean;
    /**
     * Limit
     */
    limit?: number;
    /**
     * Offset
     */
    offset?: number;
  };
  url: "/v1/default/banks/{bank_id}/directives";
};

export type ListDirectivesErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type ListDirectivesError =
  ListDirectivesErrors[keyof ListDirectivesErrors];

export type ListDirectivesResponses = {
  /**
   * Successful Response
   */
  200: DirectiveListResponse;
};

export type ListDirectivesResponse =
  ListDirectivesResponses[keyof ListDirectivesResponses];

export type CreateDirectiveData = {
  body: CreateDirectiveRequest;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/directives";
};

export type CreateDirectiveErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type CreateDirectiveError =
  CreateDirectiveErrors[keyof CreateDirectiveErrors];

export type CreateDirectiveResponses = {
  /**
   * Successful Response
   */
  200: DirectiveResponse;
};

export type CreateDirectiveResponse =
  CreateDirectiveResponses[keyof CreateDirectiveResponses];

export type DeleteDirectiveData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
    /**
     * Directive Id
     */
    directive_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/directives/{directive_id}";
};

export type DeleteDirectiveErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type DeleteDirectiveError =
  DeleteDirectiveErrors[keyof DeleteDirectiveErrors];

export type DeleteDirectiveResponses = {
  /**
   * Successful Response
   */
  200: unknown;
};

export type GetDirectiveData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
    /**
     * Directive Id
     */
    directive_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/directives/{directive_id}";
};

export type GetDirectiveErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type GetDirectiveError = GetDirectiveErrors[keyof GetDirectiveErrors];

export type GetDirectiveResponses = {
  /**
   * Successful Response
   */
  200: DirectiveResponse;
};

export type GetDirectiveResponse =
  GetDirectiveResponses[keyof GetDirectiveResponses];

export type UpdateDirectiveData = {
  body: UpdateDirectiveRequest;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
    /**
     * Directive Id
     */
    directive_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/directives/{directive_id}";
};

export type UpdateDirectiveErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type UpdateDirectiveError =
  UpdateDirectiveErrors[keyof UpdateDirectiveErrors];

export type UpdateDirectiveResponses = {
  /**
   * Successful Response
   */
  200: DirectiveResponse;
};

export type UpdateDirectiveResponse =
  UpdateDirectiveResponses[keyof UpdateDirectiveResponses];

export type ListDocumentsData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: {
    /**
     * Q
     *
     * Case-insensitive substring filter on document ID (e.g. 'report' matches 'report-2024')
     */
    q?: string | null;
    /**
     * Tags
     *
     * Filter documents by tags
     */
    tags?: Array<string> | null;
    /**
     * Tags Match
     *
     * How to match tags: 'any', 'all', 'any_strict', 'all_strict'
     */
    tags_match?: string;
    /**
     * Limit
     */
    limit?: number;
    /**
     * Offset
     */
    offset?: number;
  };
  url: "/v1/default/banks/{bank_id}/documents";
};

export type ListDocumentsErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type ListDocumentsError = ListDocumentsErrors[keyof ListDocumentsErrors];

export type ListDocumentsResponses = {
  /**
   * Successful Response
   */
  200: ListDocumentsResponse;
};

export type ListDocumentsResponse2 =
  ListDocumentsResponses[keyof ListDocumentsResponses];

export type DeleteDocumentData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
    /**
     * Document Id
     */
    document_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/documents/{document_id}";
};

export type DeleteDocumentErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type DeleteDocumentError =
  DeleteDocumentErrors[keyof DeleteDocumentErrors];

export type DeleteDocumentResponses = {
  /**
   * Successful Response
   */
  200: DeleteDocumentResponse;
};

export type DeleteDocumentResponse2 =
  DeleteDocumentResponses[keyof DeleteDocumentResponses];

export type GetDocumentData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
    /**
     * Document Id
     */
    document_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/documents/{document_id}";
};

export type GetDocumentErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type GetDocumentError = GetDocumentErrors[keyof GetDocumentErrors];

export type GetDocumentResponses = {
  /**
   * Successful Response
   */
  200: DocumentResponse;
};

export type GetDocumentResponse =
  GetDocumentResponses[keyof GetDocumentResponses];

export type UpdateDocumentData = {
  body: UpdateDocumentRequest;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
    /**
     * Document Id
     */
    document_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/documents/{document_id}";
};

export type UpdateDocumentErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type UpdateDocumentError =
  UpdateDocumentErrors[keyof UpdateDocumentErrors];

export type UpdateDocumentResponses = {
  /**
   * Successful Response
   */
  200: UpdateDocumentResponse;
};

export type UpdateDocumentResponse2 =
  UpdateDocumentResponses[keyof UpdateDocumentResponses];

export type ListTagsData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: {
    /**
     * Q
     *
     * Wildcard pattern to filter tags (e.g., 'user:*' for user:alice, '*-admin' for role-admin). Use '*' as wildcard. Case-insensitive.
     */
    q?: string | null;
    /**
     * Limit
     *
     * Maximum number of tags to return
     */
    limit?: number;
    /**
     * Offset
     *
     * Offset for pagination
     */
    offset?: number;
  };
  url: "/v1/default/banks/{bank_id}/tags";
};

export type ListTagsErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type ListTagsError = ListTagsErrors[keyof ListTagsErrors];

export type ListTagsResponses = {
  /**
   * Successful Response
   */
  200: ListTagsResponse;
};

export type ListTagsResponse2 = ListTagsResponses[keyof ListTagsResponses];

export type GetChunkData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Chunk Id
     */
    chunk_id: string;
  };
  query?: never;
  url: "/v1/default/chunks/{chunk_id}";
};

export type GetChunkErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type GetChunkError = GetChunkErrors[keyof GetChunkErrors];

export type GetChunkResponses = {
  /**
   * Successful Response
   */
  200: ChunkResponse;
};

export type GetChunkResponse = GetChunkResponses[keyof GetChunkResponses];

export type ListOperationsData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: {
    /**
     * Status
     *
     * Filter by status: pending, completed, or failed
     */
    status?: string | null;
    /**
     * Type
     *
     * Filter by operation type: retain, consolidation, refresh_mental_model, file_convert_retain, webhook_delivery
     */
    type?: string | null;
    /**
     * Limit
     *
     * Maximum number of operations to return
     */
    limit?: number;
    /**
     * Offset
     *
     * Number of operations to skip
     */
    offset?: number;
  };
  url: "/v1/default/banks/{bank_id}/operations";
};

export type ListOperationsErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type ListOperationsError =
  ListOperationsErrors[keyof ListOperationsErrors];

export type ListOperationsResponses = {
  /**
   * Successful Response
   */
  200: OperationsListResponse;
};

export type ListOperationsResponse =
  ListOperationsResponses[keyof ListOperationsResponses];

export type CancelOperationData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
    /**
     * Operation Id
     */
    operation_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/operations/{operation_id}";
};

export type CancelOperationErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type CancelOperationError =
  CancelOperationErrors[keyof CancelOperationErrors];

export type CancelOperationResponses = {
  /**
   * Successful Response
   */
  200: CancelOperationResponse;
};

export type CancelOperationResponse2 =
  CancelOperationResponses[keyof CancelOperationResponses];

export type GetOperationStatusData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
    /**
     * Operation Id
     */
    operation_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/operations/{operation_id}";
};

export type GetOperationStatusErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type GetOperationStatusError =
  GetOperationStatusErrors[keyof GetOperationStatusErrors];

export type GetOperationStatusResponses = {
  /**
   * Successful Response
   */
  200: OperationStatusResponse;
};

export type GetOperationStatusResponse =
  GetOperationStatusResponses[keyof GetOperationStatusResponses];

export type RetryOperationData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
    /**
     * Operation Id
     */
    operation_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/operations/{operation_id}/retry";
};

export type RetryOperationErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type RetryOperationError =
  RetryOperationErrors[keyof RetryOperationErrors];

export type RetryOperationResponses = {
  /**
   * Successful Response
   */
  200: RetryOperationResponse;
};

export type RetryOperationResponse2 =
  RetryOperationResponses[keyof RetryOperationResponses];

export type GetBankProfileData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/profile";
};

export type GetBankProfileErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type GetBankProfileError =
  GetBankProfileErrors[keyof GetBankProfileErrors];

export type GetBankProfileResponses = {
  /**
   * Successful Response
   */
  200: BankProfileResponse;
};

export type GetBankProfileResponse =
  GetBankProfileResponses[keyof GetBankProfileResponses];

export type UpdateBankDispositionData = {
  body: UpdateDispositionRequest;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/profile";
};

export type UpdateBankDispositionErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type UpdateBankDispositionError =
  UpdateBankDispositionErrors[keyof UpdateBankDispositionErrors];

export type UpdateBankDispositionResponses = {
  /**
   * Successful Response
   */
  200: BankProfileResponse;
};

export type UpdateBankDispositionResponse =
  UpdateBankDispositionResponses[keyof UpdateBankDispositionResponses];

export type AddBankBackgroundData = {
  body: AddBackgroundRequest;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/background";
};

export type AddBankBackgroundErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type AddBankBackgroundError =
  AddBankBackgroundErrors[keyof AddBankBackgroundErrors];

export type AddBankBackgroundResponses = {
  /**
   * Successful Response
   */
  200: BackgroundResponse;
};

export type AddBankBackgroundResponse =
  AddBankBackgroundResponses[keyof AddBankBackgroundResponses];

export type DeleteBankData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}";
};

export type DeleteBankErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type DeleteBankError = DeleteBankErrors[keyof DeleteBankErrors];

export type DeleteBankResponses = {
  /**
   * Successful Response
   */
  200: DeleteResponse;
};

export type DeleteBankResponse = DeleteBankResponses[keyof DeleteBankResponses];

export type UpdateBankData = {
  body: CreateBankRequest;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}";
};

export type UpdateBankErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type UpdateBankError = UpdateBankErrors[keyof UpdateBankErrors];

export type UpdateBankResponses = {
  /**
   * Successful Response
   */
  200: BankProfileResponse;
};

export type UpdateBankResponse = UpdateBankResponses[keyof UpdateBankResponses];

export type CreateOrUpdateBankData = {
  body: CreateBankRequest;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}";
};

export type CreateOrUpdateBankErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type CreateOrUpdateBankError =
  CreateOrUpdateBankErrors[keyof CreateOrUpdateBankErrors];

export type CreateOrUpdateBankResponses = {
  /**
   * Successful Response
   */
  200: BankProfileResponse;
};

export type CreateOrUpdateBankResponse =
  CreateOrUpdateBankResponses[keyof CreateOrUpdateBankResponses];

export type ClearObservationsData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/observations";
};

export type ClearObservationsErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type ClearObservationsError =
  ClearObservationsErrors[keyof ClearObservationsErrors];

export type ClearObservationsResponses = {
  /**
   * Successful Response
   */
  200: DeleteResponse;
};

export type ClearObservationsResponse =
  ClearObservationsResponses[keyof ClearObservationsResponses];

export type ClearMemoryObservationsData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
    /**
     * Memory Id
     */
    memory_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/memories/{memory_id}/observations";
};

export type ClearMemoryObservationsErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type ClearMemoryObservationsError =
  ClearMemoryObservationsErrors[keyof ClearMemoryObservationsErrors];

export type ClearMemoryObservationsResponses = {
  /**
   * Successful Response
   */
  200: ClearMemoryObservationsResponse;
};

export type ClearMemoryObservationsResponse2 =
  ClearMemoryObservationsResponses[keyof ClearMemoryObservationsResponses];

export type ResetBankConfigData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/config";
};

export type ResetBankConfigErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type ResetBankConfigError =
  ResetBankConfigErrors[keyof ResetBankConfigErrors];

export type ResetBankConfigResponses = {
  /**
   * Successful Response
   */
  200: BankConfigResponse;
};

export type ResetBankConfigResponse =
  ResetBankConfigResponses[keyof ResetBankConfigResponses];

export type GetBankConfigData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/config";
};

export type GetBankConfigErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type GetBankConfigError = GetBankConfigErrors[keyof GetBankConfigErrors];

export type GetBankConfigResponses = {
  /**
   * Successful Response
   */
  200: BankConfigResponse;
};

export type GetBankConfigResponse =
  GetBankConfigResponses[keyof GetBankConfigResponses];

export type UpdateBankConfigData = {
  body: BankConfigUpdate;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/config";
};

export type UpdateBankConfigErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type UpdateBankConfigError =
  UpdateBankConfigErrors[keyof UpdateBankConfigErrors];

export type UpdateBankConfigResponses = {
  /**
   * Successful Response
   */
  200: BankConfigResponse;
};

export type UpdateBankConfigResponse =
  UpdateBankConfigResponses[keyof UpdateBankConfigResponses];

export type TriggerConsolidationData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/consolidate";
};

export type TriggerConsolidationErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type TriggerConsolidationError =
  TriggerConsolidationErrors[keyof TriggerConsolidationErrors];

export type TriggerConsolidationResponses = {
  /**
   * Successful Response
   */
  200: ConsolidationResponse;
};

export type TriggerConsolidationResponse =
  TriggerConsolidationResponses[keyof TriggerConsolidationResponses];

export type ListWebhooksData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/webhooks";
};

export type ListWebhooksErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type ListWebhooksError = ListWebhooksErrors[keyof ListWebhooksErrors];

export type ListWebhooksResponses = {
  /**
   * Successful Response
   */
  200: WebhookListResponse;
};

export type ListWebhooksResponse =
  ListWebhooksResponses[keyof ListWebhooksResponses];

export type CreateWebhookData = {
  body: CreateWebhookRequest;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/webhooks";
};

export type CreateWebhookErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type CreateWebhookError = CreateWebhookErrors[keyof CreateWebhookErrors];

export type CreateWebhookResponses = {
  /**
   * Successful Response
   */
  201: WebhookResponse;
};

export type CreateWebhookResponse =
  CreateWebhookResponses[keyof CreateWebhookResponses];

export type DeleteWebhookData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
    /**
     * Webhook Id
     */
    webhook_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/webhooks/{webhook_id}";
};

export type DeleteWebhookErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type DeleteWebhookError = DeleteWebhookErrors[keyof DeleteWebhookErrors];

export type DeleteWebhookResponses = {
  /**
   * Successful Response
   */
  200: DeleteResponse;
};

export type DeleteWebhookResponse =
  DeleteWebhookResponses[keyof DeleteWebhookResponses];

export type UpdateWebhookData = {
  body: UpdateWebhookRequest;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
    /**
     * Webhook Id
     */
    webhook_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/webhooks/{webhook_id}";
};

export type UpdateWebhookErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type UpdateWebhookError = UpdateWebhookErrors[keyof UpdateWebhookErrors];

export type UpdateWebhookResponses = {
  /**
   * Successful Response
   */
  200: WebhookResponse;
};

export type UpdateWebhookResponse =
  UpdateWebhookResponses[keyof UpdateWebhookResponses];

export type ListWebhookDeliveriesData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
    /**
     * Webhook Id
     */
    webhook_id: string;
  };
  query?: {
    /**
     * Limit
     *
     * Maximum number of deliveries to return
     */
    limit?: number;
    /**
     * Cursor
     *
     * Pagination cursor (created_at of last item)
     */
    cursor?: string | null;
  };
  url: "/v1/default/banks/{bank_id}/webhooks/{webhook_id}/deliveries";
};

export type ListWebhookDeliveriesErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type ListWebhookDeliveriesError =
  ListWebhookDeliveriesErrors[keyof ListWebhookDeliveriesErrors];

export type ListWebhookDeliveriesResponses = {
  /**
   * Successful Response
   */
  200: WebhookDeliveryListResponse;
};

export type ListWebhookDeliveriesResponse =
  ListWebhookDeliveriesResponses[keyof ListWebhookDeliveriesResponses];

export type ClearBankMemoriesData = {
  body?: never;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: {
    /**
     * Type
     *
     * Optional fact type filter (world, experience, opinion)
     */
    type?: string | null;
  };
  url: "/v1/default/banks/{bank_id}/memories";
};

export type ClearBankMemoriesErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type ClearBankMemoriesError =
  ClearBankMemoriesErrors[keyof ClearBankMemoriesErrors];

export type ClearBankMemoriesResponses = {
  /**
   * Successful Response
   */
  200: DeleteResponse;
};

export type ClearBankMemoriesResponse =
  ClearBankMemoriesResponses[keyof ClearBankMemoriesResponses];

export type RetainMemoriesData = {
  body: RetainRequest;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/memories";
};

export type RetainMemoriesErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type RetainMemoriesError =
  RetainMemoriesErrors[keyof RetainMemoriesErrors];

export type RetainMemoriesResponses = {
  /**
   * Successful Response
   */
  200: RetainResponse;
};

export type RetainMemoriesResponse =
  RetainMemoriesResponses[keyof RetainMemoriesResponses];

export type FileRetainData = {
  body: BodyFileRetain;
  headers?: {
    /**
     * Authorization
     */
    authorization?: string | null;
  };
  path: {
    /**
     * Bank Id
     */
    bank_id: string;
  };
  query?: never;
  url: "/v1/default/banks/{bank_id}/files/retain";
};

export type FileRetainErrors = {
  /**
   * Validation Error
   */
  422: HttpValidationError;
};

export type FileRetainError = FileRetainErrors[keyof FileRetainErrors];

export type FileRetainResponses = {
  /**
   * Successful Response
   */
  200: FileRetainResponse;
};

export type FileRetainResponse2 =
  FileRetainResponses[keyof FileRetainResponses];
