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

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

  • BaseListChatMessageHistory
    • ConvexChatMessageHistory

Constructors

Methods

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

  • Parameters

    • message: BaseMessage

    Returns Promise<void>

  • Returns Promise<void>

  • Returns Promise<BaseMessage[]>

Generated using TypeDoc