Type alias ConvexChatMessageHistoryInput<DataModel, TableName, IndexName, SessionIdFieldName, MessageTextFieldName, InsertMutation, LookupQuery, DeleteManyMutation>
ConvexChatMessageHistoryInput<DataModel, TableName, IndexName, SessionIdFieldName, MessageTextFieldName, InsertMutation, LookupQuery, DeleteManyMutation>: {
ctx: GenericActionCtx<DataModel>;
sessionId: DocumentByName<DataModel, TableName>[SessionIdFieldName];
deleteMany?: DeleteManyMutation;
index?: IndexName;
insert?: InsertMutation;
lookup?: LookupQuery;
messageTextFieldName?: MessageTextFieldName;
sessionIdField?: SessionIdFieldName;
table?: TableName;
}
Type Parameters
-
DataModel extends GenericDataModel
-
TableName extends TableNamesInDataModel<DataModel> = "messages"
-
IndexName extends IndexNames<NamedTableInfo<DataModel, TableName>> = "bySessionId"
-
SessionIdFieldName extends FieldPaths<NamedTableInfo<DataModel, TableName>> = "sessionId"
-
MessageTextFieldName extends FieldPaths<NamedTableInfo<DataModel, TableName>> = "message"
-
InsertMutation extends FunctionReference<"mutation", "internal", {
document: object;
table: string;
}> = any
-
LookupQuery extends FunctionReference<"query", "internal", {
index: string;
key: string;
keyField: string;
table: string;
}, object[]> = any
-
DeleteManyMutation extends FunctionReference<"mutation", "internal", {
index: string;
key: string;
keyField: string;
table: string;
}> = any
Type declaration
-
Readonly
ctx: GenericActionCtx<DataModel>
-
Readonly
sessionId: DocumentByName<DataModel, TableName>[SessionIdFieldName]
-
Optional
Readonly
deleteMany?: DeleteManyMutation
-
Optional
Readonly
index?: IndexName
-
Optional
Readonly
insert?: InsertMutation
-
Optional
Readonly
lookup?: LookupQuery
-
Optional
Readonly
messageTextFieldName?: MessageTextFieldName
-
Optional
Readonly
sessionIdField?: SessionIdFieldName
-
Optional
Readonly
table?: TableName
Type that defines the config required to initialize the ConvexChatMessageHistory class. At minimum it needs a sessionId and an ActionCtx.