New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@fluidframework/protocol-definitions

Package Overview
Dependencies
Maintainers
2
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluidframework/protocol-definitions - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0-97957

53

api-report/protocol-definitions.api.md

@@ -51,7 +51,4 @@ ## API Report File for "@fluidframework/protocol-definitions"

export interface IBranchOrigin {
// (undocumented)
id: string;
// (undocumented)
minimumSequenceNumber: number;
// (undocumented)
sequenceNumber: number;

@@ -118,2 +115,3 @@ }

client: IClient;
driverVersion?: string;
epoch?: string;

@@ -166,15 +164,9 @@ id: string;

export interface IDocumentMessage {
// (undocumented)
clientSequenceNumber: number;
// (undocumented)
compression?: string;
contents: any;
// (undocumented)
metadata?: any;
// (undocumented)
referenceSequenceNumber: number;
// (undocumented)
serverMetadata?: any;
// (undocumented)
traces?: ITrace[];
// (undocumented)
type: string;

@@ -199,7 +191,4 @@ }

export interface INack {
// (undocumented)
content: INackContent;
// (undocumented)
operation: IDocumentMessage | undefined;
// (undocumented)
sequenceNumber: number;

@@ -224,5 +213,3 @@ }

export interface IProposal {
// (undocumented)
key: string;
// (undocumented)
value: any;

@@ -314,29 +301,17 @@ }

export interface ISequencedDocumentMessage {
// (undocumented)
clientId: string;
// (undocumented)
clientSequenceNumber: number;
// (undocumented)
compression?: string;
contents: any;
// @alpha
expHash1?: string;
// (undocumented)
metadata?: any;
// (undocumented)
minimumSequenceNumber: number;
// (undocumented)
origin?: IBranchOrigin;
// (undocumented)
referenceSequenceNumber: number;
// (undocumented)
sequenceNumber: number;
// (undocumented)
serverMetadata?: any;
// (undocumented)
term: number | undefined;
// (undocumented)
timestamp: number;
// (undocumented)
traces?: ITrace[];
// (undocumented)
type: string;

@@ -512,7 +487,4 @@ }

export interface ITrace {
// (undocumented)
action: string;
// (undocumented)
service: string;
// (undocumented)
timestamp: number;

@@ -564,27 +536,14 @@ }

export enum MessageType {
// (undocumented)
ClientJoin = "join",
// (undocumented)
ClientLeave = "leave",
// (undocumented)
Control = "control",
// (undocumented)
NoClient = "noClient",
// (undocumented)
NoOp = "noop",
// (undocumented)
Operation = "op",
// (undocumented)
Propose = "propose",
// (undocumented)
Reject = "reject",
// (undocumented)
RemoteHelp = "remoteHelp",
// (undocumented)
RoundTrip = "tripComplete",
// (undocumented)
Summarize = "summarize",
// (undocumented)
SummaryAck = "summaryAck",
// (undocumented)
SummaryNack = "summaryNack"

@@ -612,2 +571,8 @@ }

// @public (undocumented)
export enum SignalType {
ClientJoin = "join",
ClientLeave = "leave"
}
// @public

@@ -614,0 +579,0 @@ export type SummaryObject = ISummaryTree | ISummaryBlob | ISummaryHandle | ISummaryAttachment;

6

dist/consensus.d.ts

@@ -15,3 +15,9 @@ /*!

export interface IProposal {
/**
* The key for the proposal.
*/
key: string;
/**
* The value of the proposal.
*/
value: any;

@@ -18,0 +24,0 @@ }

@@ -6,16 +6,68 @@ /*!

export declare enum MessageType {
/**
* Empty operation message. Used to send an updated reference sequence number.
* Relay service is free to coalesce these messages or fully drop them, if
* another op was used to update MSN to a number equal or higher than referenced
* sequence number in Noop.
*/
NoOp = "noop",
/**
* System message sent to indicate a new client has joined the collaboration.
*/
ClientJoin = "join",
/**
* System message sent to indicate a client has left the collaboration.
*/
ClientLeave = "leave",
/**
* Proposes a new consensus value.
*/
Propose = "propose",
/**
* Message used to reject a pending proposal.
*/
Reject = "reject",
/**
* Summary operation (op).
*/
Summarize = "summarize",
/**
* Summary operation (op) written.
*/
SummaryAck = "summaryAck",
/**
* Summary operation (op) write failure.
*/
SummaryNack = "summaryNack",
/**
* Channel operation (op).
*/
Operation = "op",
/**
* Message to indicate the need of a remote agent for a document.
*/
RemoteHelp = "remoteHelp",
/**
* Message to indicate that no active clients are present.
*/
NoClient = "noClient",
/**
* Message to indicate successful round trip.
*/
RoundTrip = "tripComplete",
/**
* Service specific control messages that are never sequenced.
*/
Control = "control"
}
export declare enum SignalType {
/**
* System signal sent to indicate a new client has joined the collaboration.
*/
ClientJoin = "join",
/**
* System signal sent to indicate a client has left the collaboration.
*/
ClientLeave = "leave"
}
/**

@@ -25,9 +77,27 @@ * Messages to track latency trace

export interface ITrace {
/**
* Service generating the trace.
*/
service: string;
/**
* Denotes receiving/sending.
*/
action: string;
/**
* Floating point time in milliseconds with up to nanosecond precision.
*/
timestamp: number;
}
export interface INack {
/**
* The operation that was just nacked.
*/
operation: IDocumentMessage | undefined;
/**
* The sequence number the client needs to catch up to before retrying.
*/
sequenceNumber: number;
/**
* Detail info about the nack.
*/
content: INackContent;

@@ -39,9 +109,35 @@ }

export interface IDocumentMessage {
/**
* The document's client sequence number.
*/
clientSequenceNumber: number;
/**
* The reference sequence number the message was sent relative to.
*/
referenceSequenceNumber: number;
/**
* The type of document message being sent.
*/
type: string;
/**
* The contents of the message.
*/
contents: any;
/**
* App provided metadata about the operation.
*/
metadata?: any;
/**
* Server provided metadata about the operation.
*/
serverMetadata?: any;
/**
* Traces related to the packet.
*/
traces?: ITrace[];
/**
* The compression algorithm that was used to compress contents of this op.
* @experimental Not ready for use
*/
compression?: string;
}

@@ -58,4 +154,13 @@ /**

export interface IBranchOrigin {
/**
* Origin branch of the message.
*/
id: string;
/**
* Sequence number for the message in branch ID.
*/
sequenceNumber: number;
/**
* Minimum sequence number for the message in branch ID.
*/
minimumSequenceNumber: number;

@@ -67,14 +172,55 @@ }

export interface ISequencedDocumentMessage {
/**
* The client ID that submitted the delta.
*/
clientId: string;
/**
* The sequenced identifier.
*/
sequenceNumber: number;
/**
* The term identifier.
*/
term: number | undefined;
/**
* The minimum sequence number for all connected clients.
*/
minimumSequenceNumber: number;
/**
* The document's client sequence number.
*/
clientSequenceNumber: number;
/**
* The reference sequence number the message was sent relative to.
*/
referenceSequenceNumber: number;
/**
* The type of operation.
*/
type: string;
/**
* The contents of the message.
*/
contents: any;
/**
* App provided metadata about the operation.
*/
metadata?: any;
/**
* Server provided metadata about the operation.
*/
serverMetadata?: any;
/**
* Origin branch information for the message.
*
* @remarks Can be marked undefined if the current message is also the origin.
*/
origin?: IBranchOrigin;
/**
* Traces related to the packet.
*/
traces?: ITrace[];
/**
* Timestamp when the server ticketed the message.
*/
timestamp: number;

@@ -86,2 +232,7 @@ /**

expHash1?: string;
/**
* The compression algorithm that was used to compress contents of this op.
* @experimental Not ready for use.
*/
compression?: string;
}

@@ -88,0 +239,0 @@ export interface ISequencedDocumentSystemMessage extends ISequencedDocumentMessage {

@@ -7,32 +7,72 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.NackErrorType = exports.MessageType = void 0;
exports.NackErrorType = exports.SignalType = exports.MessageType = void 0;
var MessageType;
(function (MessageType) {
// Empty operation message. Used to send an updated reference sequence number.
/**
* Empty operation message. Used to send an updated reference sequence number.
* Relay service is free to coalesce these messages or fully drop them, if
* another op was used to update MSN to a number equal or higher than referenced
* sequence number in Noop.
*/
MessageType["NoOp"] = "noop";
// System message sent to indicate a new client has joined the collaboration
/**
* System message sent to indicate a new client has joined the collaboration.
*/
MessageType["ClientJoin"] = "join";
// System message sent to indicate a client has left the collaboration
/**
* System message sent to indicate a client has left the collaboration.
*/
MessageType["ClientLeave"] = "leave";
// Proposes a new consensus value
/**
* Proposes a new consensus value.
*/
MessageType["Propose"] = "propose";
// Message used to reject a pending proposal
/**
* Message used to reject a pending proposal.
*/
MessageType["Reject"] = "reject";
// Summary op
/**
* Summary operation (op).
*/
MessageType["Summarize"] = "summarize";
// Summary op written
/**
* Summary operation (op) written.
*/
MessageType["SummaryAck"] = "summaryAck";
// Summary op write failure
/**
* Summary operation (op) write failure.
*/
MessageType["SummaryNack"] = "summaryNack";
// Channel operation.
/**
* Channel operation (op).
*/
MessageType["Operation"] = "op";
// Message to indicate the need of a remote agent for a document.
/**
* Message to indicate the need of a remote agent for a document.
*/
MessageType["RemoteHelp"] = "remoteHelp";
// Message to indicate that no active clients are present.
/**
* Message to indicate that no active clients are present.
*/
MessageType["NoClient"] = "noClient";
// Message to indicate successful round trip.
/**
* Message to indicate successful round trip.
*/
MessageType["RoundTrip"] = "tripComplete";
// Service specific control messages that are never sequenced.
/**
* Service specific control messages that are never sequenced.
*/
MessageType["Control"] = "control";
})(MessageType = exports.MessageType || (exports.MessageType = {}));
var SignalType;
(function (SignalType) {
/**
* System signal sent to indicate a new client has joined the collaboration.
*/
SignalType["ClientJoin"] = "join";
/**
* System signal sent to indicate a client has left the collaboration.
*/
SignalType["ClientLeave"] = "leave";
})(SignalType = exports.SignalType || (exports.SignalType = {}));
/**

@@ -39,0 +79,0 @@ * Type of the Nack.

@@ -14,3 +14,3 @@ /*!

/**
* The tenant ID for the document
* The tenant ID for the document.
*/

@@ -35,2 +35,7 @@ tenantId: string;

/**
* Version of the driver which is connecting. It can be used at server to record in telemetry or
* to block/allow specific driver version for specific features.
*/
driverVersion?: string;
/**
* Connection mode of client.

@@ -37,0 +42,0 @@ */

@@ -15,3 +15,3 @@ /*!

/**
* Type tag used to distinguish different types of nodes in a {@link ISummaryTree}.
* Type tag used to distinguish different types of nodes in a {@link ISummaryTree}.
*/

@@ -24,3 +24,3 @@ export declare namespace SummaryType {

/**
* Represents a sub-tree in the summary.
* Represents a sub-tree in the summary.
*/

@@ -27,0 +27,0 @@ const Tree: Tree;

@@ -9,8 +9,9 @@ "use strict";

/**
* Type tag used to distinguish different types of nodes in a {@link ISummaryTree}.
* Type tag used to distinguish different types of nodes in a {@link ISummaryTree}.
*/
// eslint-disable-next-line @typescript-eslint/no-namespace
var SummaryType;
(function (SummaryType) {
/**
* Represents a sub-tree in the summary.
* Represents a sub-tree in the summary.
*/

@@ -17,0 +18,0 @@ SummaryType.Tree = 1;

@@ -15,3 +15,9 @@ /*!

export interface IProposal {
/**
* The key for the proposal.
*/
key: string;
/**
* The value of the proposal.
*/
value: any;

@@ -18,0 +24,0 @@ }

@@ -6,16 +6,68 @@ /*!

export declare enum MessageType {
/**
* Empty operation message. Used to send an updated reference sequence number.
* Relay service is free to coalesce these messages or fully drop them, if
* another op was used to update MSN to a number equal or higher than referenced
* sequence number in Noop.
*/
NoOp = "noop",
/**
* System message sent to indicate a new client has joined the collaboration.
*/
ClientJoin = "join",
/**
* System message sent to indicate a client has left the collaboration.
*/
ClientLeave = "leave",
/**
* Proposes a new consensus value.
*/
Propose = "propose",
/**
* Message used to reject a pending proposal.
*/
Reject = "reject",
/**
* Summary operation (op).
*/
Summarize = "summarize",
/**
* Summary operation (op) written.
*/
SummaryAck = "summaryAck",
/**
* Summary operation (op) write failure.
*/
SummaryNack = "summaryNack",
/**
* Channel operation (op).
*/
Operation = "op",
/**
* Message to indicate the need of a remote agent for a document.
*/
RemoteHelp = "remoteHelp",
/**
* Message to indicate that no active clients are present.
*/
NoClient = "noClient",
/**
* Message to indicate successful round trip.
*/
RoundTrip = "tripComplete",
/**
* Service specific control messages that are never sequenced.
*/
Control = "control"
}
export declare enum SignalType {
/**
* System signal sent to indicate a new client has joined the collaboration.
*/
ClientJoin = "join",
/**
* System signal sent to indicate a client has left the collaboration.
*/
ClientLeave = "leave"
}
/**

@@ -25,9 +77,27 @@ * Messages to track latency trace

export interface ITrace {
/**
* Service generating the trace.
*/
service: string;
/**
* Denotes receiving/sending.
*/
action: string;
/**
* Floating point time in milliseconds with up to nanosecond precision.
*/
timestamp: number;
}
export interface INack {
/**
* The operation that was just nacked.
*/
operation: IDocumentMessage | undefined;
/**
* The sequence number the client needs to catch up to before retrying.
*/
sequenceNumber: number;
/**
* Detail info about the nack.
*/
content: INackContent;

@@ -39,9 +109,35 @@ }

export interface IDocumentMessage {
/**
* The document's client sequence number.
*/
clientSequenceNumber: number;
/**
* The reference sequence number the message was sent relative to.
*/
referenceSequenceNumber: number;
/**
* The type of document message being sent.
*/
type: string;
/**
* The contents of the message.
*/
contents: any;
/**
* App provided metadata about the operation.
*/
metadata?: any;
/**
* Server provided metadata about the operation.
*/
serverMetadata?: any;
/**
* Traces related to the packet.
*/
traces?: ITrace[];
/**
* The compression algorithm that was used to compress contents of this op.
* @experimental Not ready for use
*/
compression?: string;
}

@@ -58,4 +154,13 @@ /**

export interface IBranchOrigin {
/**
* Origin branch of the message.
*/
id: string;
/**
* Sequence number for the message in branch ID.
*/
sequenceNumber: number;
/**
* Minimum sequence number for the message in branch ID.
*/
minimumSequenceNumber: number;

@@ -67,14 +172,55 @@ }

export interface ISequencedDocumentMessage {
/**
* The client ID that submitted the delta.
*/
clientId: string;
/**
* The sequenced identifier.
*/
sequenceNumber: number;
/**
* The term identifier.
*/
term: number | undefined;
/**
* The minimum sequence number for all connected clients.
*/
minimumSequenceNumber: number;
/**
* The document's client sequence number.
*/
clientSequenceNumber: number;
/**
* The reference sequence number the message was sent relative to.
*/
referenceSequenceNumber: number;
/**
* The type of operation.
*/
type: string;
/**
* The contents of the message.
*/
contents: any;
/**
* App provided metadata about the operation.
*/
metadata?: any;
/**
* Server provided metadata about the operation.
*/
serverMetadata?: any;
/**
* Origin branch information for the message.
*
* @remarks Can be marked undefined if the current message is also the origin.
*/
origin?: IBranchOrigin;
/**
* Traces related to the packet.
*/
traces?: ITrace[];
/**
* Timestamp when the server ticketed the message.
*/
timestamp: number;

@@ -86,2 +232,7 @@ /**

expHash1?: string;
/**
* The compression algorithm that was used to compress contents of this op.
* @experimental Not ready for use.
*/
compression?: string;
}

@@ -88,0 +239,0 @@ export interface ISequencedDocumentSystemMessage extends ISequencedDocumentMessage {

@@ -7,29 +7,69 @@ /*!

(function (MessageType) {
// Empty operation message. Used to send an updated reference sequence number.
/**
* Empty operation message. Used to send an updated reference sequence number.
* Relay service is free to coalesce these messages or fully drop them, if
* another op was used to update MSN to a number equal or higher than referenced
* sequence number in Noop.
*/
MessageType["NoOp"] = "noop";
// System message sent to indicate a new client has joined the collaboration
/**
* System message sent to indicate a new client has joined the collaboration.
*/
MessageType["ClientJoin"] = "join";
// System message sent to indicate a client has left the collaboration
/**
* System message sent to indicate a client has left the collaboration.
*/
MessageType["ClientLeave"] = "leave";
// Proposes a new consensus value
/**
* Proposes a new consensus value.
*/
MessageType["Propose"] = "propose";
// Message used to reject a pending proposal
/**
* Message used to reject a pending proposal.
*/
MessageType["Reject"] = "reject";
// Summary op
/**
* Summary operation (op).
*/
MessageType["Summarize"] = "summarize";
// Summary op written
/**
* Summary operation (op) written.
*/
MessageType["SummaryAck"] = "summaryAck";
// Summary op write failure
/**
* Summary operation (op) write failure.
*/
MessageType["SummaryNack"] = "summaryNack";
// Channel operation.
/**
* Channel operation (op).
*/
MessageType["Operation"] = "op";
// Message to indicate the need of a remote agent for a document.
/**
* Message to indicate the need of a remote agent for a document.
*/
MessageType["RemoteHelp"] = "remoteHelp";
// Message to indicate that no active clients are present.
/**
* Message to indicate that no active clients are present.
*/
MessageType["NoClient"] = "noClient";
// Message to indicate successful round trip.
/**
* Message to indicate successful round trip.
*/
MessageType["RoundTrip"] = "tripComplete";
// Service specific control messages that are never sequenced.
/**
* Service specific control messages that are never sequenced.
*/
MessageType["Control"] = "control";
})(MessageType || (MessageType = {}));
export var SignalType;
(function (SignalType) {
/**
* System signal sent to indicate a new client has joined the collaboration.
*/
SignalType["ClientJoin"] = "join";
/**
* System signal sent to indicate a client has left the collaboration.
*/
SignalType["ClientLeave"] = "leave";
})(SignalType || (SignalType = {}));
/**

@@ -36,0 +76,0 @@ * Type of the Nack.

@@ -14,3 +14,3 @@ /*!

/**
* The tenant ID for the document
* The tenant ID for the document.
*/

@@ -35,2 +35,7 @@ tenantId: string;

/**
* Version of the driver which is connecting. It can be used at server to record in telemetry or
* to block/allow specific driver version for specific features.
*/
driverVersion?: string;
/**
* Connection mode of client.

@@ -37,0 +42,0 @@ */

@@ -15,3 +15,3 @@ /*!

/**
* Type tag used to distinguish different types of nodes in a {@link ISummaryTree}.
* Type tag used to distinguish different types of nodes in a {@link ISummaryTree}.
*/

@@ -24,3 +24,3 @@ export declare namespace SummaryType {

/**
* Represents a sub-tree in the summary.
* Represents a sub-tree in the summary.
*/

@@ -27,0 +27,0 @@ const Tree: Tree;

@@ -6,8 +6,9 @@ /*!

/**
* Type tag used to distinguish different types of nodes in a {@link ISummaryTree}.
* Type tag used to distinguish different types of nodes in a {@link ISummaryTree}.
*/
// eslint-disable-next-line @typescript-eslint/no-namespace
export var SummaryType;
(function (SummaryType) {
/**
* Represents a sub-tree in the summary.
* Represents a sub-tree in the summary.
*/

@@ -14,0 +15,0 @@ SummaryType.Tree = 1;

{
"name": "@fluidframework/protocol-definitions",
"version": "1.0.0",
"version": "1.1.0-97957",
"description": "Fluid protocol definitions",

@@ -47,5 +47,5 @@ "homepage": "https://fluidframework.com",

"devDependencies": {
"@fluidframework/build-common": "^0.24.0",
"@fluidframework/build-tools": "^0.3.1000",
"@fluidframework/eslint-config-fluid": "^0.28.2000",
"@fluidframework/build-common": "^1.0.0",
"@fluidframework/build-tools": "^0.4.4000",
"@fluidframework/eslint-config-fluid": "^1.0.0",
"@fluidframework/protocol-definitions-previous": "npm:@fluidframework/protocol-definitions@0.1028.1000",

@@ -55,3 +55,3 @@ "@microsoft/api-extractor": "^7.22.2",

"concurrently": "^6.2.0",
"copyfiles": "^2.1.0",
"copyfiles": "^2.4.1",
"eslint": "~8.6.0",

@@ -58,0 +58,0 @@ "eslint-config-prettier": "~8.5.0",

@@ -17,6 +17,12 @@ /*!

export interface IProposal {
// The key for the proposal
/**
* The key for the proposal.
*/
key: string;
// The value of the proposal
/**
* The value of the proposal.
*/
// TODO: use `unknown` instead.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
value: any;

@@ -58,2 +64,4 @@ }

key: string,
// TODO: use `unknown` instead.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
value: any,

@@ -83,2 +91,4 @@ approvalSequenceNumber: number,

export interface IQuorumProposals extends IEventProvider<IQuorumProposalsEvents>, IDisposable {
// TODO: use `unknown` instead.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
propose(key: string, value: any): Promise<void>;

@@ -88,2 +98,4 @@

// TODO: return `unknown` instead.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
get(key: string): any;

@@ -90,0 +102,0 @@ }

@@ -7,42 +7,83 @@ /*!

export enum MessageType {
// Empty operation message. Used to send an updated reference sequence number.
/**
* Empty operation message. Used to send an updated reference sequence number.
* Relay service is free to coalesce these messages or fully drop them, if
* another op was used to update MSN to a number equal or higher than referenced
* sequence number in Noop.
*/
NoOp = "noop",
// System message sent to indicate a new client has joined the collaboration
/**
* System message sent to indicate a new client has joined the collaboration.
*/
ClientJoin = "join",
// System message sent to indicate a client has left the collaboration
/**
* System message sent to indicate a client has left the collaboration.
*/
ClientLeave = "leave",
// Proposes a new consensus value
/**
* Proposes a new consensus value.
*/
Propose = "propose",
// Message used to reject a pending proposal
/**
* Message used to reject a pending proposal.
*/
Reject = "reject",
// Summary op
/**
* Summary operation (op).
*/
Summarize = "summarize",
// Summary op written
/**
* Summary operation (op) written.
*/
SummaryAck = "summaryAck",
// Summary op write failure
/**
* Summary operation (op) write failure.
*/
SummaryNack = "summaryNack",
// Channel operation.
/**
* Channel operation (op).
*/
Operation = "op",
// Message to indicate the need of a remote agent for a document.
/**
* Message to indicate the need of a remote agent for a document.
*/
RemoteHelp = "remoteHelp",
// Message to indicate that no active clients are present.
/**
* Message to indicate that no active clients are present.
*/
NoClient = "noClient",
// Message to indicate successful round trip.
/**
* Message to indicate successful round trip.
*/
RoundTrip = "tripComplete",
// Service specific control messages that are never sequenced.
/**
* Service specific control messages that are never sequenced.
*/
Control = "control",
}
export enum SignalType {
/**
* System signal sent to indicate a new client has joined the collaboration.
*/
ClientJoin = "join",
/**
* System signal sent to indicate a client has left the collaboration.
*/
ClientLeave = "leave",
}
/**

@@ -52,9 +93,15 @@ * Messages to track latency trace

export interface ITrace {
// Service generating the trace.
/**
* Service generating the trace.
*/
service: string;
// Denotes receiving/sending.
/**
* Denotes receiving/sending.
*/
action: string;
// Floating point time in milliseconds with up to nanosecond precision
/**
* Floating point time in milliseconds with up to nanosecond precision.
*/
timestamp: number;

@@ -64,9 +111,15 @@ }

export interface INack {
// The operation that was just nacked
/**
* The operation that was just nacked.
*/
operation: IDocumentMessage | undefined;
// The sequence number the client needs to catch up to before retrying
/**
* The sequence number the client needs to catch up to before retrying.
*/
sequenceNumber: number;
// Detail info about the nack.
/**
* Detail info about the nack.
*/
content: INackContent;

@@ -79,22 +132,48 @@ }

export interface IDocumentMessage {
// The document's client sequence number
/**
* The document's client sequence number.
*/
clientSequenceNumber: number;
// The reference sequence number the message was sent relative to
/**
* The reference sequence number the message was sent relative to.
*/
referenceSequenceNumber: number;
// The type of document message being sent
/**
* The type of document message being sent.
*/
type: string;
// The contents of the message
/**
* The contents of the message.
*/
// TODO: use `unknown` instead.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
contents: any;
// App provided metadata about the operation
/**
* App provided metadata about the operation.
*/
// TODO: use `unknown` instead.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
metadata?: any;
// Server provided metadata about the operation
/**
* Server provided metadata about the operation.
*/
// TODO: use `unknown` instead.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
serverMetadata?: any;
// Traces related to the packet.
/**
* Traces related to the packet.
*/
traces?: ITrace[];
/**
* The compression algorithm that was used to compress contents of this op.
* @experimental Not ready for use
*/
compression?: string;
}

@@ -113,9 +192,15 @@

export interface IBranchOrigin {
// Origin branch of the message
/**
* Origin branch of the message.
*/
id: string;
// Sequence number for the message in branch id
/**
* Sequence number for the message in branch ID.
*/
sequenceNumber: number;
// Min sequence number for the message in branch id
/**
* Minimum sequence number for the message in branch ID.
*/
minimumSequenceNumber: number;

@@ -128,40 +213,73 @@ }

export interface ISequencedDocumentMessage {
// The client ID that submitted the delta
/**
* The client ID that submitted the delta.
*/
clientId: string;
// The sequenced identifier
/**
* The sequenced identifier.
*/
sequenceNumber: number;
// The term identifier
/**
* The term identifier.
*/
term: number | undefined;
// The minimum sequence number for all connected clients
/**
* The minimum sequence number for all connected clients.
*/
minimumSequenceNumber: number;
// The document's client sequence number
/**
* The document's client sequence number.
*/
clientSequenceNumber: number;
// The reference sequence number the message was sent relative to
/**
* The reference sequence number the message was sent relative to.
*/
referenceSequenceNumber: number;
// The type of operation
/**
* The type of operation.
*/
type: string;
// The contents of the message
/**
* The contents of the message.
*/
// TODO: use `unknown` instead.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
contents: any;
// App provided metadata about the operation
/**
* App provided metadata about the operation.
*/
// TODO: use `unknown` instead.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
metadata?: any;
// Server provided metadata about the operation
/**
* Server provided metadata about the operation.
*/
// TODO: use `unknown` instead.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
serverMetadata?: any;
// Origin branch information for the message. Can be marked undefined if the current
// message is also the origin.
/**
* Origin branch information for the message.
*
* @remarks Can be marked undefined if the current message is also the origin.
*/
origin?: IBranchOrigin;
// Traces related to the packet.
/**
* Traces related to the packet.
*/
traces?: ITrace[];
// Timestamp when the server ticketed the message
/**
* Timestamp when the server ticketed the message.
*/
timestamp: number;

@@ -174,2 +292,8 @@

expHash1?: string;
/**
* The compression algorithm that was used to compress contents of this op.
* @experimental Not ready for use.
*/
compression?: string;
}

@@ -190,2 +314,4 @@

// TODO: use `unknown` instead.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
content: any;

@@ -192,0 +318,0 @@

@@ -16,3 +16,3 @@ /*!

/**
* The tenant ID for the document
* The tenant ID for the document.
*/

@@ -44,2 +44,8 @@ tenantId: string;

/**
* Version of the driver which is connecting. It can be used at server to record in telemetry or
* to block/allow specific driver version for specific features.
*/
driverVersion?: string;
/**
* Connection mode of client.

@@ -65,2 +71,4 @@ */

*/
// TODO: use `unknown` instead.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
supportedFeatures?: Record<string, any>;

@@ -159,2 +167,4 @@

*/
// TODO: use `unknown` instead.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
supportedFeatures?: Record<string, any>;

@@ -161,0 +171,0 @@

@@ -18,4 +18,5 @@ /*!

/**
* Type tag used to distinguish different types of nodes in a {@link ISummaryTree}.
* Type tag used to distinguish different types of nodes in a {@link ISummaryTree}.
*/
// eslint-disable-next-line @typescript-eslint/no-namespace
export namespace SummaryType {

@@ -28,3 +29,3 @@ export type Tree = 1;

/**
* Represents a sub-tree in the summary.
* Represents a sub-tree in the summary.
*/

@@ -31,0 +32,0 @@ export const Tree: Tree = 1 as const;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc