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 that defines the config required to initialize the ConvexChatMessageHistory class. At minimum it needs a sessionId and an ActionCtx.

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