/**
 * Databricks Lakebase Chat Memory Node - Version 1
 * Stores the chat history in a Databricks Lakebase table.
 */


export interface LcMemoryLakebaseChatV1Params {
  authentication?: unknown;
/**
 * The Lakebase project
 * @searchListMethod getLakebaseProjects
 * @default {"mode":"list","value":""}
 */
    lakebaseProject?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
/**
 * The branch of the project
 * @searchListMethod getLakebaseBranches
 * @default {"mode":"list","value":""}
 */
    lakebaseBranch?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
/**
 * The Postgres database on the branch
 * @searchListMethod getLakebaseDatabases
 * @default {"mode":"list","value":""}
 */
    lakebaseDatabase?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
/**
 * The Postgres schema. To use a schema other than public, select By ID and enter its name.
 * @searchListMethod getLakebaseSchemas
 * @default {"mode":"list","value":"public","cachedResultName":"public"}
 */
    lakebaseSchema?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
/**
 * The table in the schema that stores the chat history
 * @default n8n_chat_histories
 */
    lakebaseTable?: string | Expression<string>;
/**
 * Session ID
 * @builderHint Use 'Connected Chat Trigger Node' (fromInput) if there is a Chat Trigger node earlier in the workflow. Otherwise use 'Define below' (customKey).
 * @default fromInput
 */
    sessionIdType?: 'fromInput' | 'customKey' | Expression<string>;
/**
 * The key to use to store session ID in the memory
 * @displayOptions.show { sessionIdType: ["customKey"] }
 */
    sessionKey?: string | Expression<string>;
/**
 * Context Window Length
 * @hint How many past interactions the model receives as context
 * @default 5
 */
    contextWindowLength?: number | Expression<number>;
}

export interface LcMemoryLakebaseChatV1Credentials {
  databricksOAuth2Api: CredentialReference;
}

interface LcMemoryLakebaseChatV1NodeBase {
  type: '@n8n/n8n-nodes-langchain.memoryLakebaseChat';
  version: 1;
}

export type LcMemoryLakebaseChatV1ParamsNode = LcMemoryLakebaseChatV1NodeBase & {
  config: NodeConfig<LcMemoryLakebaseChatV1Params> & { credentials?: LcMemoryLakebaseChatV1Credentials };
};

export type LcMemoryLakebaseChatV1Node = LcMemoryLakebaseChatV1ParamsNode;