Class ConvexChatMessageHistory<DataModel, SessionIdFieldName, TableName, IndexName, MessageTextFieldName, InsertMutation, LookupQuery, DeleteManyMutation>

Base class for all list chat message histories. All list chat message histories should extend this class.

Type Parameters

  • DataModel extends GenericDataModel

  • SessionIdFieldName extends FieldPaths<NamedTableInfo<DataModel, TableName>> = "sessionId"

  • TableName extends TableNamesInDataModel<DataModel> = "messages"

  • IndexName extends IndexNames<NamedTableInfo<DataModel, TableName>> = "bySessionId"

  • 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

Hierarchy

Constructors

  • Type Parameters

    • DataModel extends GenericDataModel

    • SessionIdFieldName extends string = "sessionId"

    • TableName extends string = "messages"

    • IndexName extends string | number | symbol = "bySessionId"

    • MessageTextFieldName extends string = "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

    Parameters

    • config: ConvexChatMessageHistoryInput<DataModel, TableName, IndexName, SessionIdFieldName, MessageTextFieldName, InsertMutation, LookupQuery, DeleteManyMutation>

    Returns ConvexChatMessageHistory<DataModel, SessionIdFieldName, TableName, IndexName, MessageTextFieldName, InsertMutation, LookupQuery, DeleteManyMutation>

Methods

  • Returns Promise<void>

  • Returns Promise<BaseMessage[]>

Generated using TypeDoc