import { ICommit , ICommitDetails } from "@fluidframework/gitresources" ; import { IProtocolState , ISummaryTree , ICommittedProposal } from "@fluidframework/protocol-definitions" ; import { IGitCache } from "@fluidframework/server-services-client" ; import { LambdaName } from "./lambdas" ; import { INackMessagesControlMessageContents } from "./messages" ; export interface IDocumentDetails { existing : boolean ; value : IDocument ; } export interface IDocumentStorage { getDocument ( tenantId , documentId ) : Promise < IDocument > ; getOrCreateDocument ( tenantId , documentId ) : Promise < IDocumentDetails > ; getLatestVersion ( tenantId , documentId ) : Promise < ICommit > ; getVersions ( tenantId , documentId , count ) : Promise < ICommitDetails [ ] > ; getVersion ( tenantId , documentId , sha ) : Promise < ICommit > ; getFullTree ( tenantId , documentId ) : Promise < { cache : IGitCache ; code : string ; } > ; createDocument ( tenantId , documentId , summary , sequenceNumber , term , initialHash , values ) : Promise < IDocumentDetails > ; } export interface IClientSequenceNumber { canEvict : boolean ; clientId : string | undefined ; lastUpdate : number ; nack : boolean ; referenceSequenceNumber : number ; clientSequenceNumber : number ; scopes : string [ ] ; serverMetadata ? : any ; } export interface IDeliState { clients : IClientSequenceNumber [ ] | undefined ; durableSequenceNumber : number ; logOffset : number ; sequenceNumber : number ; expHash1 : string ; epoch : number ; term : number ; lastSentMSN : number | undefined ; nackMessages : INackMessagesControlMessageContents | undefined ; successfullyStartedLambdas : LambdaName [ ] ; } export interface IScribe { logOffset : number ; minimumSequenceNumber : number ; sequenceNumber : number ; protocolState : IProtocolState ; lastClientSummaryHead : string | undefined ; lastSummarySequenceNumber : number | undefined ; } export interface IDocument { version : string ; createTime : number ; documentId : string ; tenantId : string ; scribe : string ; deli : string ; scheduledDeletionTime ? : string ; }