@fluidframework/driver-definitions 2.41.0-338401 → 2.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/api-report/driver-definitions.legacy.alpha.api.md +4 -4
- package/dist/protocol/protocol.d.ts +6 -5
- package/dist/protocol/protocol.d.ts.map +1 -1
- package/dist/protocol/protocol.js.map +1 -1
- package/lib/protocol/protocol.d.ts +6 -5
- package/lib/protocol/protocol.d.ts.map +1 -1
- package/lib/protocol/protocol.js.map +1 -1
- package/package.json +4 -4
- package/src/protocol/protocol.ts +9 -5
package/CHANGELOG.md
CHANGED
|
@@ -468,17 +468,17 @@ export interface ISignalClient {
|
|
|
468
468
|
}
|
|
469
469
|
|
|
470
470
|
// @alpha @legacy
|
|
471
|
-
export interface ISignalMessage extends ISignalMessageBase {
|
|
471
|
+
export interface ISignalMessage<TMessage extends TypedMessage = TypedMessage> extends ISignalMessageBase<TMessage> {
|
|
472
472
|
clientId: string | null;
|
|
473
473
|
}
|
|
474
474
|
|
|
475
475
|
// @alpha @legacy
|
|
476
|
-
export interface ISignalMessageBase {
|
|
476
|
+
export interface ISignalMessageBase<TMessage extends TypedMessage = TypedMessage> {
|
|
477
477
|
clientConnectionNumber?: number;
|
|
478
|
-
content:
|
|
478
|
+
content: TMessage["content"];
|
|
479
479
|
referenceSequenceNumber?: number;
|
|
480
480
|
targetClientId?: string;
|
|
481
|
-
type?:
|
|
481
|
+
type?: TMessage["type"];
|
|
482
482
|
}
|
|
483
483
|
|
|
484
484
|
// @alpha @legacy
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
+
import type { TypedMessage } from "@fluidframework/core-interfaces/internal";
|
|
5
6
|
/**
|
|
6
7
|
* @legacy
|
|
7
8
|
* @alpha
|
|
@@ -284,15 +285,15 @@ export interface ISequencedDocumentAugmentedMessage extends ISequencedDocumentMe
|
|
|
284
285
|
* @legacy
|
|
285
286
|
* @alpha
|
|
286
287
|
*/
|
|
287
|
-
export interface ISignalMessageBase {
|
|
288
|
+
export interface ISignalMessageBase<TMessage extends TypedMessage = TypedMessage> {
|
|
288
289
|
/**
|
|
289
290
|
* Signal content
|
|
290
291
|
*/
|
|
291
|
-
content:
|
|
292
|
+
content: TMessage["content"];
|
|
292
293
|
/**
|
|
293
294
|
* Signal type
|
|
294
295
|
*/
|
|
295
|
-
type?:
|
|
296
|
+
type?: TMessage["type"];
|
|
296
297
|
/**
|
|
297
298
|
* Counts the number of signals sent by the sending client.
|
|
298
299
|
*/
|
|
@@ -312,7 +313,7 @@ export interface ISignalMessageBase {
|
|
|
312
313
|
* @legacy
|
|
313
314
|
* @alpha
|
|
314
315
|
*/
|
|
315
|
-
export interface ISignalMessage extends ISignalMessageBase {
|
|
316
|
+
export interface ISignalMessage<TMessage extends TypedMessage = TypedMessage> extends ISignalMessageBase<TMessage> {
|
|
316
317
|
/**
|
|
317
318
|
* The client ID that submitted the message.
|
|
318
319
|
* For server generated messages the clientId will be null.
|
|
@@ -323,7 +324,7 @@ export interface ISignalMessage extends ISignalMessageBase {
|
|
|
323
324
|
* Interface for signals sent by clients to the server.
|
|
324
325
|
* @internal
|
|
325
326
|
*/
|
|
326
|
-
export type ISentSignalMessage = ISignalMessageBase
|
|
327
|
+
export type ISentSignalMessage<TMessage extends TypedMessage = TypedMessage> = ISignalMessageBase<TMessage>;
|
|
327
328
|
/**
|
|
328
329
|
* @legacy
|
|
329
330
|
* @alpha
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/protocol/protocol.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,oBAAY,WAAW;IACtB;;;;;OAKG;IACH,IAAI,SAAS;IAEb;;OAEG;IACH,UAAU,SAAS;IAEnB;;OAEG;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EF;;GAEG;AACH,MAAM,WAAW,+BAAgC,SAAQ,yBAAyB;IACjF,IAAI,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,MAAM,WAAW,kCAAmC,SAAQ,yBAAyB;IACpF,iBAAiB,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;
|
|
1
|
+
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/protocol/protocol.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAE7E;;;GAGG;AACH,oBAAY,WAAW;IACtB;;;;;OAKG;IACH,IAAI,SAAS;IAEb;;OAEG;IACH,UAAU,SAAS;IAEnB;;OAEG;IACH,WAAW,UAAU;IAErB;;OAEG;IACH,OAAO,YAAY;IAEnB;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,SAAS,cAAc;IAEvB;;OAEG;IACH,UAAU,eAAe;IAEzB;;OAEG;IACH,WAAW,gBAAgB;IAE3B;;OAEG;IACH,SAAS,OAAO;IAEhB;;OAEG;IACH,QAAQ,aAAa;IAErB;;OAEG;IACH,SAAS,iBAAiB;IAE1B;;OAEG;IACH,OAAO,YAAY;CACnB;AAED;;GAEG;AACH,oBAAY,UAAU;IACrB;;OAEG;IACH,UAAU,SAAS;IAEnB;;OAEG;IACH,WAAW,UAAU;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,MAAM;IACtB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,KAAK;IACrB;;OAEG;IACH,SAAS,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAExC;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAE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AC;CACpB;AAED;;;;GAIG;AACH,oBAAY,aAAa;IACxB;;OAEG;IACH,eAAe,oBAAoB;IAEnC;;OAEG;IACH,iBAAiB,sBAAsB;IAEvC;;OAEG;IACH,eAAe,oBAAoB;IAEnC;;OAEG;IACH,kBAAkB,uBAAuB;CACzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/protocol/protocol.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH;;;GAGG;AACH,IAAY,WAoEX;AApED,WAAY,WAAW;IACtB;;;;;OAKG;IACH,4BAAa,CAAA;IAEb;;OAEG;IACH,kCAAmB,CAAA;IAEnB;;OAEG;IACH,oCAAqB,CAAA;IAErB;;OAEG;IACH,kCAAmB,CAAA;IAEnB;;OAEG;IACH,gCAAiB,CAAA;IAEjB;;OAEG;IACH,gCAAiB,CAAA;IAEjB;;OAEG;IACH,sCAAuB,CAAA;IAEvB;;OAEG;IACH,wCAAyB,CAAA;IAEzB;;OAEG;IACH,0CAA2B,CAAA;IAE3B;;OAEG;IACH,+BAAgB,CAAA;IAEhB;;OAEG;IACH,oCAAqB,CAAA;IAErB;;OAEG;IACH,yCAA0B,CAAA;IAE1B;;OAEG;IACH,kCAAmB,CAAA;AACpB,CAAC,EApEW,WAAW,2BAAX,WAAW,QAoEtB;AAED;;GAEG;AACH,IAAY,UAUX;AAVD,WAAY,UAAU;IACrB;;OAEG;IACH,iCAAmB,CAAA;IAEnB;;OAEG;IACH,mCAAqB,CAAA;AACtB,CAAC,EAVW,UAAU,0BAAV,UAAU,QAUrB;AA+bD;;;;GAIG;AACH,IAAY,aAoBX;AApBD,WAAY,aAAa;IACxB;;OAEG;IACH,oDAAmC,CAAA;IAEnC;;OAEG;IACH,wDAAuC,CAAA;IAEvC;;OAEG;IACH,oDAAmC,CAAA;IAEnC;;OAEG;IACH,0DAAyC,CAAA;AAC1C,CAAC,EApBW,aAAa,6BAAb,aAAa,QAoBxB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @legacy\n * @alpha\n */\nexport enum MessageType {\n\t/**\n\t * Empty operation message. Used to send an updated reference sequence number.\n\t * Relay service is free to coalesce these messages or fully drop them, if\n\t * another message was used to update MSN to a number equal or higher than referenced\n\t * sequence number in Noop.\n\t */\n\tNoOp = \"noop\",\n\n\t/**\n\t * System message sent to indicate a new client has joined the collaboration.\n\t */\n\tClientJoin = \"join\",\n\n\t/**\n\t * System message sent to indicate a client has left the collaboration.\n\t */\n\tClientLeave = \"leave\",\n\n\t/**\n\t * Proposes a new consensus value.\n\t */\n\tPropose = \"propose\",\n\n\t/**\n\t * Message used to reject a pending proposal.\n\t */\n\tReject = \"reject\",\n\n\t/**\n\t * Message sent by client accepting proposal\n\t */\n\tAccept = \"accept\",\n\n\t/**\n\t * Summary operation (message).\n\t */\n\tSummarize = \"summarize\",\n\n\t/**\n\t * Summary operation (message) written.\n\t */\n\tSummaryAck = \"summaryAck\",\n\n\t/**\n\t * Summary operation (message) write failure.\n\t */\n\tSummaryNack = \"summaryNack\",\n\n\t/**\n\t * Operation (message) produced by container runtime.\n\t */\n\tOperation = \"op\",\n\n\t/**\n\t * Message to indicate that no active clients are present.\n\t */\n\tNoClient = \"noClient\",\n\n\t/**\n\t * Message to indicate successful round trip.\n\t */\n\tRoundTrip = \"tripComplete\",\n\n\t/**\n\t * Service specific control messages that are never sequenced.\n\t */\n\tControl = \"control\",\n}\n\n/**\n * @internal\n */\nexport enum SignalType {\n\t/**\n\t * System signal sent to indicate a new client has joined the collaboration.\n\t */\n\tClientJoin = \"join\",\n\n\t/**\n\t * System signal sent to indicate a client has left the collaboration.\n\t */\n\tClientLeave = \"leave\",\n}\n\n/**\n * Messages to track latency trace.\n * @legacy\n * @alpha\n */\nexport interface ITrace {\n\t/**\n\t * Service generating the trace.\n\t */\n\tservice: string;\n\n\t/**\n\t * Denotes receiving/sending.\n\t */\n\taction: string;\n\n\t/**\n\t * Floating point time in milliseconds with up to nanosecond precision.\n\t */\n\ttimestamp: number;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface INack {\n\t/**\n\t * The operation that was just nacked.\n\t */\n\toperation: IDocumentMessage | undefined;\n\n\t/**\n\t * The sequence number the client needs to catch up to before retrying.\n\t */\n\tsequenceNumber: number;\n\n\t/**\n\t * Detail info about the nack.\n\t */\n\tcontent: INackContent;\n}\n\n/**\n * Document-specific message.\n * @legacy\n * @alpha\n */\nexport interface IDocumentMessage {\n\t/**\n\t * The document's client sequence number.\n\t */\n\tclientSequenceNumber: number;\n\n\t/**\n\t * The reference sequence number the message was sent relative to.\n\t */\n\treferenceSequenceNumber: number;\n\n\t/**\n\t * The type of document message being sent.\n\t */\n\ttype: string;\n\n\t/**\n\t * The contents of the message.\n\t */\n\tcontents: unknown;\n\n\t/**\n\t * App provided metadata about the operation.\n\t */\n\tmetadata?: unknown;\n\n\t/**\n\t * Server provided metadata about the operation.\n\t */\n\tserverMetadata?: unknown;\n\n\t/**\n\t * Traces related to the packet.\n\t */\n\ttraces?: ITrace[];\n\n\t/**\n\t * The compression algorithm that was used to compress contents of this message.\n\t * @experimental Not ready for use\n\t */\n\tcompression?: string;\n}\n\n/**\n * Document Message with optional system level data field.\n * @internal\n */\nexport interface IDocumentSystemMessage extends IDocumentMessage {\n\tdata: string;\n}\n\n/**\n * Branch origin information.\n * @legacy\n * @alpha\n */\nexport interface IBranchOrigin {\n\t/**\n\t * Origin branch of the message.\n\t */\n\tid: string;\n\n\t/**\n\t * Sequence number for the message in branch ID.\n\t */\n\tsequenceNumber: number;\n\n\t/**\n\t * Minimum sequence number for the message in branch ID.\n\t */\n\tminimumSequenceNumber: number;\n}\n\n/**\n * Sequenced message for a distributed document.\n * @legacy\n * @alpha\n */\nexport interface ISequencedDocumentMessage {\n\t/**\n\t * The client ID that submitted the message.\n\t * For server generated messages the clientId will be null;\n\t */\n\t// eslint-disable-next-line @rushstack/no-new-null\n\tclientId: string | null;\n\n\t/**\n\t * The sequenced identifier.\n\t */\n\tsequenceNumber: number;\n\n\t/**\n\t * The minimum sequence number for all connected clients.\n\t */\n\tminimumSequenceNumber: number;\n\n\t/**\n\t * The document's client sequence number.\n\t */\n\tclientSequenceNumber: number;\n\n\t/**\n\t * The reference sequence number the message was sent relative to.\n\t */\n\treferenceSequenceNumber: number;\n\n\t/**\n\t * The type of operation.\n\t */\n\ttype: string;\n\n\t/**\n\t * The contents of the message.\n\t */\n\tcontents: unknown;\n\n\t/**\n\t * App provided metadata about the operation.\n\t */\n\tmetadata?: unknown;\n\n\t/**\n\t * Server provided metadata about the operation.\n\t */\n\tserverMetadata?: unknown;\n\n\t/**\n\t * Origin branch information for the message.\n\t *\n\t * @remarks Can be marked undefined if the current message is also the origin.\n\t */\n\torigin?: IBranchOrigin;\n\n\t/**\n\t * Traces related to the packet.\n\t */\n\ttraces?: ITrace[];\n\n\t/**\n\t * Timestamp when the server ticketed the message.\n\t */\n\ttimestamp: number;\n\n\t/**\n\t * Data provided by service. Only present in service generated messages.\n\t */\n\tdata?: string;\n\n\t/**\n\t * Experimental field for storing the rolling hash at sequence number.\n\t *\n\t * @deprecated Use ISequencedDocumentMessageExperimental instead.\n\t */\n\texpHash1?: string;\n\n\t/**\n\t * The compression algorithm that was used to compress contents of this message.\n\t *\n\t * @deprecated Use ISequencedDocumentMessageExperimental instead.\n\t */\n\tcompression?: string;\n}\n\n/**\n * {@link ISequencedDocumentAugmentedMessage} with experimental properties.\n * @internal\n */\nexport type ISequencedDocumentMessageExperimental = Omit<\n\tISequencedDocumentMessage,\n\t\"expHash1\" | \"compression\"\n> & {\n\t/**\n\t * Stores the rolling hash at sequence number.\n\t */\n\texpHash1?: string;\n\n\t/**\n\t * The compression algorithm that was used to compress contents of this message.\n\t */\n\tcompression?: string;\n};\n\n/**\n * @internal\n */\nexport interface ISequencedDocumentSystemMessage extends ISequencedDocumentMessage {\n\tdata: string;\n}\n\n/**\n * @internal\n */\nexport interface ISequencedDocumentAugmentedMessage extends ISequencedDocumentMessage {\n\tadditionalContent: string;\n}\n\n/**\n * Common interface between incoming and outgoing signals.\n * @legacy\n * @alpha\n */\nexport interface ISignalMessageBase {\n\t/**\n\t * Signal content\n\t */\n\tcontent: unknown;\n\n\t/**\n\t * Signal type\n\t */\n\ttype?: string;\n\n\t/**\n\t * Counts the number of signals sent by the sending client.\n\t */\n\tclientConnectionNumber?: number;\n\n\t/**\n\t * Sequence number that indicates when the signal was created in relation to the delta stream\n\t */\n\treferenceSequenceNumber?: number;\n\n\t/**\n\t * Client ID of the singular client the signal is being (or has been) sent to.\n\t * May only be specified when IConnect.supportedFeatures['submit_signals_v2'] is true, will throw otherwise.\n\t */\n\ttargetClientId?: string;\n}\n\n/**\n * Interface for signals sent by the server to clients.\n * @legacy\n * @alpha\n */\nexport interface ISignalMessage extends ISignalMessageBase {\n\t/**\n\t * The client ID that submitted the message.\n\t * For server generated messages the clientId will be null.\n\t */\n\t// eslint-disable-next-line @rushstack/no-new-null\n\tclientId: string | null;\n}\n\n/**\n * Interface for signals sent by clients to the server.\n * @internal\n */\nexport type ISentSignalMessage = ISignalMessageBase;\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IUploadedSummaryDetails {\n\t/**\n\t * Indicates whether the uploaded summary contains \".protocol\" tree.\n\t */\n\tincludesProtocolTree?: boolean;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface ISummaryContent {\n\t/**\n\t * Handle reference to the summary data.\n\t */\n\thandle: string;\n\n\t/**\n\t * Message included as part of the summary.\n\t */\n\tmessage: string;\n\n\t/**\n\t * Handles to parent summaries of the proposed new summary.\n\t */\n\tparents: string[];\n\n\t/**\n\t * Handle to the current latest summary stored by the service\n\t */\n\thead: string;\n\n\t/**\n\t * Details of the uploaded summary.\n\t */\n\tdetails?: IUploadedSummaryDetails;\n\n\t// TODO - need an epoch/reload bit to indicate to clients that the summary has changed and requires a reload\n\t// This could be encoded in the summary itself as well but then would require the client to download it to check\n}\n\n/**\n * General errors returned from the server.\n * May want to add error code or something similar in the future.\n * @internal\n */\nexport interface IServerError {\n\t/**\n\t * Message describing the server error.\n\t */\n\terrorMessage: string;\n}\n\n/**\n * Data about the original proposed summary message.\n * @legacy\n * @alpha\n */\nexport interface ISummaryProposal {\n\t/**\n\t * Actual sequence number of the summary message proposal.\n\t */\n\tsummarySequenceNumber: number;\n}\n\n/**\n * Contents of summary ack expected from the server.\n * @legacy\n * @alpha\n */\nexport interface ISummaryAck {\n\t/**\n\t * Handle of the complete summary.\n\t */\n\thandle: string;\n\n\t/**\n\t * Information about the proposed summary message.\n\t */\n\tsummaryProposal: ISummaryProposal;\n}\n\n/**\n * Contents of summary nack expected from the server.\n * @legacy\n * @alpha\n */\nexport interface ISummaryNack {\n\t/**\n\t * Information about the proposed summary message.\n\t */\n\tsummaryProposal: ISummaryProposal;\n\n\t/**\n\t * An error code number that represents the error. It will be a valid HTTP error code.\n\t * 403 errors are non retriable.\n\t * 400 errors are always immediately retriable.\n\t * 429 errors are retriable or non retriable (depends on type field).\n\t */\n\tcode?: number;\n\n\t/**\n\t * A message about the error for debugging/logging/telemetry purposes\n\t */\n\tmessage?: string;\n\n\t/**\n\t * Optional Retry-After time in seconds.\n\t * If specified, the client should wait this many seconds before retrying.8\n\t */\n\tretryAfter?: number;\n}\n\n/**\n * Interface for nack content.\n * @legacy\n * @alpha\n */\nexport interface INackContent {\n\t/**\n\t * An error code number that represents the error. It will be a valid HTTP error code.\n\t * 403 errors are non retriable and client should acquire a new identity before reconnection.\n\t * 400 errors are always immediately retriable\n\t * 429 errors are retriable or non retriable (depends on type field).\n\t */\n\tcode: number;\n\n\t/**\n\t * Type of the Nack.\n\t */\n\ttype: NackErrorType;\n\n\t/**\n\t * A message about the nack for debugging/logging/telemetry purposes\n\t */\n\tmessage: string;\n\n\t/**\n\t * Optional Retry-After time in seconds\n\t * If specified, the client should wait this many seconds before retrying\n\t */\n\tretryAfter?: number;\n}\n\n/**\n * Type of the nack.\n * @legacy\n * @alpha\n */\nexport enum NackErrorType {\n\t/**\n\t * Retriable after {@link ISummaryNack.retryAfter} seconds.\n\t */\n\tThrottlingError = \"ThrottlingError\",\n\n\t/**\n\t * Client's token is not valid for the intended message.\n\t */\n\tInvalidScopeError = \"InvalidScopeError\",\n\n\t/**\n\t * Clients message is invalid and should retry immediately with a valid message.\n\t */\n\tBadRequestError = \"BadRequestError\",\n\n\t/**\n\t * Service is having issues. Client should not retry.\n\t */\n\tLimitExceededError = \"LimitExceededError\",\n}\n"]}
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/protocol/protocol.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;;GAGG;AACH,IAAY,WAoEX;AApED,WAAY,WAAW;IACtB;;;;;OAKG;IACH,4BAAa,CAAA;IAEb;;OAEG;IACH,kCAAmB,CAAA;IAEnB;;OAEG;IACH,oCAAqB,CAAA;IAErB;;OAEG;IACH,kCAAmB,CAAA;IAEnB;;OAEG;IACH,gCAAiB,CAAA;IAEjB;;OAEG;IACH,gCAAiB,CAAA;IAEjB;;OAEG;IACH,sCAAuB,CAAA;IAEvB;;OAEG;IACH,wCAAyB,CAAA;IAEzB;;OAEG;IACH,0CAA2B,CAAA;IAE3B;;OAEG;IACH,+BAAgB,CAAA;IAEhB;;OAEG;IACH,oCAAqB,CAAA;IAErB;;OAEG;IACH,yCAA0B,CAAA;IAE1B;;OAEG;IACH,kCAAmB,CAAA;AACpB,CAAC,EApEW,WAAW,2BAAX,WAAW,QAoEtB;AAED;;GAEG;AACH,IAAY,UAUX;AAVD,WAAY,UAAU;IACrB;;OAEG;IACH,iCAAmB,CAAA;IAEnB;;OAEG;IACH,mCAAqB,CAAA;AACtB,CAAC,EAVW,UAAU,0BAAV,UAAU,QAUrB;AAicD;;;;GAIG;AACH,IAAY,aAoBX;AApBD,WAAY,aAAa;IACxB;;OAEG;IACH,oDAAmC,CAAA;IAEnC;;OAEG;IACH,wDAAuC,CAAA;IAEvC;;OAEG;IACH,oDAAmC,CAAA;IAEnC;;OAEG;IACH,0DAAyC,CAAA;AAC1C,CAAC,EApBW,aAAa,6BAAb,aAAa,QAoBxB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TypedMessage } from \"@fluidframework/core-interfaces/internal\";\n\n/**\n * @legacy\n * @alpha\n */\nexport enum MessageType {\n\t/**\n\t * Empty operation message. Used to send an updated reference sequence number.\n\t * Relay service is free to coalesce these messages or fully drop them, if\n\t * another message was used to update MSN to a number equal or higher than referenced\n\t * sequence number in Noop.\n\t */\n\tNoOp = \"noop\",\n\n\t/**\n\t * System message sent to indicate a new client has joined the collaboration.\n\t */\n\tClientJoin = \"join\",\n\n\t/**\n\t * System message sent to indicate a client has left the collaboration.\n\t */\n\tClientLeave = \"leave\",\n\n\t/**\n\t * Proposes a new consensus value.\n\t */\n\tPropose = \"propose\",\n\n\t/**\n\t * Message used to reject a pending proposal.\n\t */\n\tReject = \"reject\",\n\n\t/**\n\t * Message sent by client accepting proposal\n\t */\n\tAccept = \"accept\",\n\n\t/**\n\t * Summary operation (message).\n\t */\n\tSummarize = \"summarize\",\n\n\t/**\n\t * Summary operation (message) written.\n\t */\n\tSummaryAck = \"summaryAck\",\n\n\t/**\n\t * Summary operation (message) write failure.\n\t */\n\tSummaryNack = \"summaryNack\",\n\n\t/**\n\t * Operation (message) produced by container runtime.\n\t */\n\tOperation = \"op\",\n\n\t/**\n\t * Message to indicate that no active clients are present.\n\t */\n\tNoClient = \"noClient\",\n\n\t/**\n\t * Message to indicate successful round trip.\n\t */\n\tRoundTrip = \"tripComplete\",\n\n\t/**\n\t * Service specific control messages that are never sequenced.\n\t */\n\tControl = \"control\",\n}\n\n/**\n * @internal\n */\nexport enum SignalType {\n\t/**\n\t * System signal sent to indicate a new client has joined the collaboration.\n\t */\n\tClientJoin = \"join\",\n\n\t/**\n\t * System signal sent to indicate a client has left the collaboration.\n\t */\n\tClientLeave = \"leave\",\n}\n\n/**\n * Messages to track latency trace.\n * @legacy\n * @alpha\n */\nexport interface ITrace {\n\t/**\n\t * Service generating the trace.\n\t */\n\tservice: string;\n\n\t/**\n\t * Denotes receiving/sending.\n\t */\n\taction: string;\n\n\t/**\n\t * Floating point time in milliseconds with up to nanosecond precision.\n\t */\n\ttimestamp: number;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface INack {\n\t/**\n\t * The operation that was just nacked.\n\t */\n\toperation: IDocumentMessage | undefined;\n\n\t/**\n\t * The sequence number the client needs to catch up to before retrying.\n\t */\n\tsequenceNumber: number;\n\n\t/**\n\t * Detail info about the nack.\n\t */\n\tcontent: INackContent;\n}\n\n/**\n * Document-specific message.\n * @legacy\n * @alpha\n */\nexport interface IDocumentMessage {\n\t/**\n\t * The document's client sequence number.\n\t */\n\tclientSequenceNumber: number;\n\n\t/**\n\t * The reference sequence number the message was sent relative to.\n\t */\n\treferenceSequenceNumber: number;\n\n\t/**\n\t * The type of document message being sent.\n\t */\n\ttype: string;\n\n\t/**\n\t * The contents of the message.\n\t */\n\tcontents: unknown;\n\n\t/**\n\t * App provided metadata about the operation.\n\t */\n\tmetadata?: unknown;\n\n\t/**\n\t * Server provided metadata about the operation.\n\t */\n\tserverMetadata?: unknown;\n\n\t/**\n\t * Traces related to the packet.\n\t */\n\ttraces?: ITrace[];\n\n\t/**\n\t * The compression algorithm that was used to compress contents of this message.\n\t * @experimental Not ready for use\n\t */\n\tcompression?: string;\n}\n\n/**\n * Document Message with optional system level data field.\n * @internal\n */\nexport interface IDocumentSystemMessage extends IDocumentMessage {\n\tdata: string;\n}\n\n/**\n * Branch origin information.\n * @legacy\n * @alpha\n */\nexport interface IBranchOrigin {\n\t/**\n\t * Origin branch of the message.\n\t */\n\tid: string;\n\n\t/**\n\t * Sequence number for the message in branch ID.\n\t */\n\tsequenceNumber: number;\n\n\t/**\n\t * Minimum sequence number for the message in branch ID.\n\t */\n\tminimumSequenceNumber: number;\n}\n\n/**\n * Sequenced message for a distributed document.\n * @legacy\n * @alpha\n */\nexport interface ISequencedDocumentMessage {\n\t/**\n\t * The client ID that submitted the message.\n\t * For server generated messages the clientId will be null;\n\t */\n\t// eslint-disable-next-line @rushstack/no-new-null\n\tclientId: string | null;\n\n\t/**\n\t * The sequenced identifier.\n\t */\n\tsequenceNumber: number;\n\n\t/**\n\t * The minimum sequence number for all connected clients.\n\t */\n\tminimumSequenceNumber: number;\n\n\t/**\n\t * The document's client sequence number.\n\t */\n\tclientSequenceNumber: number;\n\n\t/**\n\t * The reference sequence number the message was sent relative to.\n\t */\n\treferenceSequenceNumber: number;\n\n\t/**\n\t * The type of operation.\n\t */\n\ttype: string;\n\n\t/**\n\t * The contents of the message.\n\t */\n\tcontents: unknown;\n\n\t/**\n\t * App provided metadata about the operation.\n\t */\n\tmetadata?: unknown;\n\n\t/**\n\t * Server provided metadata about the operation.\n\t */\n\tserverMetadata?: unknown;\n\n\t/**\n\t * Origin branch information for the message.\n\t *\n\t * @remarks Can be marked undefined if the current message is also the origin.\n\t */\n\torigin?: IBranchOrigin;\n\n\t/**\n\t * Traces related to the packet.\n\t */\n\ttraces?: ITrace[];\n\n\t/**\n\t * Timestamp when the server ticketed the message.\n\t */\n\ttimestamp: number;\n\n\t/**\n\t * Data provided by service. Only present in service generated messages.\n\t */\n\tdata?: string;\n\n\t/**\n\t * Experimental field for storing the rolling hash at sequence number.\n\t *\n\t * @deprecated Use ISequencedDocumentMessageExperimental instead.\n\t */\n\texpHash1?: string;\n\n\t/**\n\t * The compression algorithm that was used to compress contents of this message.\n\t *\n\t * @deprecated Use ISequencedDocumentMessageExperimental instead.\n\t */\n\tcompression?: string;\n}\n\n/**\n * {@link ISequencedDocumentAugmentedMessage} with experimental properties.\n * @internal\n */\nexport type ISequencedDocumentMessageExperimental = Omit<\n\tISequencedDocumentMessage,\n\t\"expHash1\" | \"compression\"\n> & {\n\t/**\n\t * Stores the rolling hash at sequence number.\n\t */\n\texpHash1?: string;\n\n\t/**\n\t * The compression algorithm that was used to compress contents of this message.\n\t */\n\tcompression?: string;\n};\n\n/**\n * @internal\n */\nexport interface ISequencedDocumentSystemMessage extends ISequencedDocumentMessage {\n\tdata: string;\n}\n\n/**\n * @internal\n */\nexport interface ISequencedDocumentAugmentedMessage extends ISequencedDocumentMessage {\n\tadditionalContent: string;\n}\n\n/**\n * Common interface between incoming and outgoing signals.\n * @legacy\n * @alpha\n */\nexport interface ISignalMessageBase<TMessage extends TypedMessage = TypedMessage> {\n\t/**\n\t * Signal content\n\t */\n\tcontent: TMessage[\"content\"];\n\n\t/**\n\t * Signal type\n\t */\n\ttype?: TMessage[\"type\"];\n\n\t/**\n\t * Counts the number of signals sent by the sending client.\n\t */\n\tclientConnectionNumber?: number;\n\n\t/**\n\t * Sequence number that indicates when the signal was created in relation to the delta stream\n\t */\n\treferenceSequenceNumber?: number;\n\n\t/**\n\t * Client ID of the singular client the signal is being (or has been) sent to.\n\t * May only be specified when IConnect.supportedFeatures['submit_signals_v2'] is true, will throw otherwise.\n\t */\n\ttargetClientId?: string;\n}\n\n/**\n * Interface for signals sent by the server to clients.\n * @legacy\n * @alpha\n */\nexport interface ISignalMessage<TMessage extends TypedMessage = TypedMessage>\n\textends ISignalMessageBase<TMessage> {\n\t/**\n\t * The client ID that submitted the message.\n\t * For server generated messages the clientId will be null.\n\t */\n\t// eslint-disable-next-line @rushstack/no-new-null\n\tclientId: string | null;\n}\n\n/**\n * Interface for signals sent by clients to the server.\n * @internal\n */\nexport type ISentSignalMessage<TMessage extends TypedMessage = TypedMessage> =\n\tISignalMessageBase<TMessage>;\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IUploadedSummaryDetails {\n\t/**\n\t * Indicates whether the uploaded summary contains \".protocol\" tree.\n\t */\n\tincludesProtocolTree?: boolean;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface ISummaryContent {\n\t/**\n\t * Handle reference to the summary data.\n\t */\n\thandle: string;\n\n\t/**\n\t * Message included as part of the summary.\n\t */\n\tmessage: string;\n\n\t/**\n\t * Handles to parent summaries of the proposed new summary.\n\t */\n\tparents: string[];\n\n\t/**\n\t * Handle to the current latest summary stored by the service\n\t */\n\thead: string;\n\n\t/**\n\t * Details of the uploaded summary.\n\t */\n\tdetails?: IUploadedSummaryDetails;\n\n\t// TODO - need an epoch/reload bit to indicate to clients that the summary has changed and requires a reload\n\t// This could be encoded in the summary itself as well but then would require the client to download it to check\n}\n\n/**\n * General errors returned from the server.\n * May want to add error code or something similar in the future.\n * @internal\n */\nexport interface IServerError {\n\t/**\n\t * Message describing the server error.\n\t */\n\terrorMessage: string;\n}\n\n/**\n * Data about the original proposed summary message.\n * @legacy\n * @alpha\n */\nexport interface ISummaryProposal {\n\t/**\n\t * Actual sequence number of the summary message proposal.\n\t */\n\tsummarySequenceNumber: number;\n}\n\n/**\n * Contents of summary ack expected from the server.\n * @legacy\n * @alpha\n */\nexport interface ISummaryAck {\n\t/**\n\t * Handle of the complete summary.\n\t */\n\thandle: string;\n\n\t/**\n\t * Information about the proposed summary message.\n\t */\n\tsummaryProposal: ISummaryProposal;\n}\n\n/**\n * Contents of summary nack expected from the server.\n * @legacy\n * @alpha\n */\nexport interface ISummaryNack {\n\t/**\n\t * Information about the proposed summary message.\n\t */\n\tsummaryProposal: ISummaryProposal;\n\n\t/**\n\t * An error code number that represents the error. It will be a valid HTTP error code.\n\t * 403 errors are non retriable.\n\t * 400 errors are always immediately retriable.\n\t * 429 errors are retriable or non retriable (depends on type field).\n\t */\n\tcode?: number;\n\n\t/**\n\t * A message about the error for debugging/logging/telemetry purposes\n\t */\n\tmessage?: string;\n\n\t/**\n\t * Optional Retry-After time in seconds.\n\t * If specified, the client should wait this many seconds before retrying.8\n\t */\n\tretryAfter?: number;\n}\n\n/**\n * Interface for nack content.\n * @legacy\n * @alpha\n */\nexport interface INackContent {\n\t/**\n\t * An error code number that represents the error. It will be a valid HTTP error code.\n\t * 403 errors are non retriable and client should acquire a new identity before reconnection.\n\t * 400 errors are always immediately retriable\n\t * 429 errors are retriable or non retriable (depends on type field).\n\t */\n\tcode: number;\n\n\t/**\n\t * Type of the Nack.\n\t */\n\ttype: NackErrorType;\n\n\t/**\n\t * A message about the nack for debugging/logging/telemetry purposes\n\t */\n\tmessage: string;\n\n\t/**\n\t * Optional Retry-After time in seconds\n\t * If specified, the client should wait this many seconds before retrying\n\t */\n\tretryAfter?: number;\n}\n\n/**\n * Type of the nack.\n * @legacy\n * @alpha\n */\nexport enum NackErrorType {\n\t/**\n\t * Retriable after {@link ISummaryNack.retryAfter} seconds.\n\t */\n\tThrottlingError = \"ThrottlingError\",\n\n\t/**\n\t * Client's token is not valid for the intended message.\n\t */\n\tInvalidScopeError = \"InvalidScopeError\",\n\n\t/**\n\t * Clients message is invalid and should retry immediately with a valid message.\n\t */\n\tBadRequestError = \"BadRequestError\",\n\n\t/**\n\t * Service is having issues. Client should not retry.\n\t */\n\tLimitExceededError = \"LimitExceededError\",\n}\n"]}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
+
import type { TypedMessage } from "@fluidframework/core-interfaces/internal";
|
|
5
6
|
/**
|
|
6
7
|
* @legacy
|
|
7
8
|
* @alpha
|
|
@@ -284,15 +285,15 @@ export interface ISequencedDocumentAugmentedMessage extends ISequencedDocumentMe
|
|
|
284
285
|
* @legacy
|
|
285
286
|
* @alpha
|
|
286
287
|
*/
|
|
287
|
-
export interface ISignalMessageBase {
|
|
288
|
+
export interface ISignalMessageBase<TMessage extends TypedMessage = TypedMessage> {
|
|
288
289
|
/**
|
|
289
290
|
* Signal content
|
|
290
291
|
*/
|
|
291
|
-
content:
|
|
292
|
+
content: TMessage["content"];
|
|
292
293
|
/**
|
|
293
294
|
* Signal type
|
|
294
295
|
*/
|
|
295
|
-
type?:
|
|
296
|
+
type?: TMessage["type"];
|
|
296
297
|
/**
|
|
297
298
|
* Counts the number of signals sent by the sending client.
|
|
298
299
|
*/
|
|
@@ -312,7 +313,7 @@ export interface ISignalMessageBase {
|
|
|
312
313
|
* @legacy
|
|
313
314
|
* @alpha
|
|
314
315
|
*/
|
|
315
|
-
export interface ISignalMessage extends ISignalMessageBase {
|
|
316
|
+
export interface ISignalMessage<TMessage extends TypedMessage = TypedMessage> extends ISignalMessageBase<TMessage> {
|
|
316
317
|
/**
|
|
317
318
|
* The client ID that submitted the message.
|
|
318
319
|
* For server generated messages the clientId will be null.
|
|
@@ -323,7 +324,7 @@ export interface ISignalMessage extends ISignalMessageBase {
|
|
|
323
324
|
* Interface for signals sent by clients to the server.
|
|
324
325
|
* @internal
|
|
325
326
|
*/
|
|
326
|
-
export type ISentSignalMessage = ISignalMessageBase
|
|
327
|
+
export type ISentSignalMessage<TMessage extends TypedMessage = TypedMessage> = ISignalMessageBase<TMessage>;
|
|
327
328
|
/**
|
|
328
329
|
* @legacy
|
|
329
330
|
* @alpha
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../src/protocol/protocol.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,oBAAY,WAAW;IACtB;;;;;OAKG;IACH,IAAI,SAAS;IAEb;;OAEG;IACH,UAAU,SAAS;IAEnB;;OAEG;IACH,WAAW,UAAU;IAErB;;OAEG;IACH,OAAO,YAAY;IAEnB;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,MAAM,WAAW;IAEjB;;OAEG;IACH,SAAS,cAAc;IAEvB;;OAEG;IACH,UAAU,eAAe;IAEzB;;OAEG;IACH,WAAW,gBAAgB;IAE3B;;OAEG;IACH,SAAS,OAAO;IAEhB;;OAEG;IACH,QAAQ,aAAa;IAErB;;OAEG;IACH,SAAS,iBAAiB;IAE1B;;OAEG;IACH,OAAO,YAAY;CACnB;AAED;;GAEG;AACH,oBAAY,UAAU;IACrB;;OAEG;IACH,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AI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,CAAC,EAAE,uBAAuB,CAAC;CAIlC;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC5B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAC;CAC9B;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,eAAe,EAAE,gBAAgB,CAAC;CAClC;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC5B;;OAEG;IACH,eAAe,EAAE,gBAAgB,CAAC;IAElC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC5B;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,aAAa,CAAC;IAEpB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,oBAAY,aAAa;IACxB;;OAEG;IACH,eAAe,oBAAoB;IAEnC;;OAEG;IACH,iBAAiB,sBAAsB;IAEvC;;OAEG;IACH,eAAe,oBAAoB;IAEnC;;OAEG;IACH,kBAAkB,uBAAuB;CACzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/protocol/protocol.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,CAAN,IAAY,WAoEX;AApED,WAAY,WAAW;IACtB;;;;;OAKG;IACH,4BAAa,CAAA;IAEb;;OAEG;IACH,kCAAmB,CAAA;IAEnB;;OAEG;IACH,oCAAqB,CAAA;IAErB;;OAEG;IACH,kCAAmB,CAAA;IAEnB;;OAEG;IACH,gCAAiB,CAAA;IAEjB;;OAEG;IACH,gCAAiB,CAAA;IAEjB;;OAEG;IACH,sCAAuB,CAAA;IAEvB;;OAEG;IACH,wCAAyB,CAAA;IAEzB;;OAEG;IACH,0CAA2B,CAAA;IAE3B;;OAEG;IACH,+BAAgB,CAAA;IAEhB;;OAEG;IACH,oCAAqB,CAAA;IAErB;;OAEG;IACH,yCAA0B,CAAA;IAE1B;;OAEG;IACH,kCAAmB,CAAA;AACpB,CAAC,EApEW,WAAW,KAAX,WAAW,QAoEtB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,UAUX;AAVD,WAAY,UAAU;IACrB;;OAEG;IACH,iCAAmB,CAAA;IAEnB;;OAEG;IACH,mCAAqB,CAAA;AACtB,CAAC,EAVW,UAAU,KAAV,UAAU,QAUrB;AA+bD;;;;GAIG;AACH,MAAM,CAAN,IAAY,aAoBX;AApBD,WAAY,aAAa;IACxB;;OAEG;IACH,oDAAmC,CAAA;IAEnC;;OAEG;IACH,wDAAuC,CAAA;IAEvC;;OAEG;IACH,oDAAmC,CAAA;IAEnC;;OAEG;IACH,0DAAyC,CAAA;AAC1C,CAAC,EApBW,aAAa,KAAb,aAAa,QAoBxB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * @legacy\n * @alpha\n */\nexport enum MessageType {\n\t/**\n\t * Empty operation message. Used to send an updated reference sequence number.\n\t * Relay service is free to coalesce these messages or fully drop them, if\n\t * another message was used to update MSN to a number equal or higher than referenced\n\t * sequence number in Noop.\n\t */\n\tNoOp = \"noop\",\n\n\t/**\n\t * System message sent to indicate a new client has joined the collaboration.\n\t */\n\tClientJoin = \"join\",\n\n\t/**\n\t * System message sent to indicate a client has left the collaboration.\n\t */\n\tClientLeave = \"leave\",\n\n\t/**\n\t * Proposes a new consensus value.\n\t */\n\tPropose = \"propose\",\n\n\t/**\n\t * Message used to reject a pending proposal.\n\t */\n\tReject = \"reject\",\n\n\t/**\n\t * Message sent by client accepting proposal\n\t */\n\tAccept = \"accept\",\n\n\t/**\n\t * Summary operation (message).\n\t */\n\tSummarize = \"summarize\",\n\n\t/**\n\t * Summary operation (message) written.\n\t */\n\tSummaryAck = \"summaryAck\",\n\n\t/**\n\t * Summary operation (message) write failure.\n\t */\n\tSummaryNack = \"summaryNack\",\n\n\t/**\n\t * Operation (message) produced by container runtime.\n\t */\n\tOperation = \"op\",\n\n\t/**\n\t * Message to indicate that no active clients are present.\n\t */\n\tNoClient = \"noClient\",\n\n\t/**\n\t * Message to indicate successful round trip.\n\t */\n\tRoundTrip = \"tripComplete\",\n\n\t/**\n\t * Service specific control messages that are never sequenced.\n\t */\n\tControl = \"control\",\n}\n\n/**\n * @internal\n */\nexport enum SignalType {\n\t/**\n\t * System signal sent to indicate a new client has joined the collaboration.\n\t */\n\tClientJoin = \"join\",\n\n\t/**\n\t * System signal sent to indicate a client has left the collaboration.\n\t */\n\tClientLeave = \"leave\",\n}\n\n/**\n * Messages to track latency trace.\n * @legacy\n * @alpha\n */\nexport interface ITrace {\n\t/**\n\t * Service generating the trace.\n\t */\n\tservice: string;\n\n\t/**\n\t * Denotes receiving/sending.\n\t */\n\taction: string;\n\n\t/**\n\t * Floating point time in milliseconds with up to nanosecond precision.\n\t */\n\ttimestamp: number;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface INack {\n\t/**\n\t * The operation that was just nacked.\n\t */\n\toperation: IDocumentMessage | undefined;\n\n\t/**\n\t * The sequence number the client needs to catch up to before retrying.\n\t */\n\tsequenceNumber: number;\n\n\t/**\n\t * Detail info about the nack.\n\t */\n\tcontent: INackContent;\n}\n\n/**\n * Document-specific message.\n * @legacy\n * @alpha\n */\nexport interface IDocumentMessage {\n\t/**\n\t * The document's client sequence number.\n\t */\n\tclientSequenceNumber: number;\n\n\t/**\n\t * The reference sequence number the message was sent relative to.\n\t */\n\treferenceSequenceNumber: number;\n\n\t/**\n\t * The type of document message being sent.\n\t */\n\ttype: string;\n\n\t/**\n\t * The contents of the message.\n\t */\n\tcontents: unknown;\n\n\t/**\n\t * App provided metadata about the operation.\n\t */\n\tmetadata?: unknown;\n\n\t/**\n\t * Server provided metadata about the operation.\n\t */\n\tserverMetadata?: unknown;\n\n\t/**\n\t * Traces related to the packet.\n\t */\n\ttraces?: ITrace[];\n\n\t/**\n\t * The compression algorithm that was used to compress contents of this message.\n\t * @experimental Not ready for use\n\t */\n\tcompression?: string;\n}\n\n/**\n * Document Message with optional system level data field.\n * @internal\n */\nexport interface IDocumentSystemMessage extends IDocumentMessage {\n\tdata: string;\n}\n\n/**\n * Branch origin information.\n * @legacy\n * @alpha\n */\nexport interface IBranchOrigin {\n\t/**\n\t * Origin branch of the message.\n\t */\n\tid: string;\n\n\t/**\n\t * Sequence number for the message in branch ID.\n\t */\n\tsequenceNumber: number;\n\n\t/**\n\t * Minimum sequence number for the message in branch ID.\n\t */\n\tminimumSequenceNumber: number;\n}\n\n/**\n * Sequenced message for a distributed document.\n * @legacy\n * @alpha\n */\nexport interface ISequencedDocumentMessage {\n\t/**\n\t * The client ID that submitted the message.\n\t * For server generated messages the clientId will be null;\n\t */\n\t// eslint-disable-next-line @rushstack/no-new-null\n\tclientId: string | null;\n\n\t/**\n\t * The sequenced identifier.\n\t */\n\tsequenceNumber: number;\n\n\t/**\n\t * The minimum sequence number for all connected clients.\n\t */\n\tminimumSequenceNumber: number;\n\n\t/**\n\t * The document's client sequence number.\n\t */\n\tclientSequenceNumber: number;\n\n\t/**\n\t * The reference sequence number the message was sent relative to.\n\t */\n\treferenceSequenceNumber: number;\n\n\t/**\n\t * The type of operation.\n\t */\n\ttype: string;\n\n\t/**\n\t * The contents of the message.\n\t */\n\tcontents: unknown;\n\n\t/**\n\t * App provided metadata about the operation.\n\t */\n\tmetadata?: unknown;\n\n\t/**\n\t * Server provided metadata about the operation.\n\t */\n\tserverMetadata?: unknown;\n\n\t/**\n\t * Origin branch information for the message.\n\t *\n\t * @remarks Can be marked undefined if the current message is also the origin.\n\t */\n\torigin?: IBranchOrigin;\n\n\t/**\n\t * Traces related to the packet.\n\t */\n\ttraces?: ITrace[];\n\n\t/**\n\t * Timestamp when the server ticketed the message.\n\t */\n\ttimestamp: number;\n\n\t/**\n\t * Data provided by service. Only present in service generated messages.\n\t */\n\tdata?: string;\n\n\t/**\n\t * Experimental field for storing the rolling hash at sequence number.\n\t *\n\t * @deprecated Use ISequencedDocumentMessageExperimental instead.\n\t */\n\texpHash1?: string;\n\n\t/**\n\t * The compression algorithm that was used to compress contents of this message.\n\t *\n\t * @deprecated Use ISequencedDocumentMessageExperimental instead.\n\t */\n\tcompression?: string;\n}\n\n/**\n * {@link ISequencedDocumentAugmentedMessage} with experimental properties.\n * @internal\n */\nexport type ISequencedDocumentMessageExperimental = Omit<\n\tISequencedDocumentMessage,\n\t\"expHash1\" | \"compression\"\n> & {\n\t/**\n\t * Stores the rolling hash at sequence number.\n\t */\n\texpHash1?: string;\n\n\t/**\n\t * The compression algorithm that was used to compress contents of this message.\n\t */\n\tcompression?: string;\n};\n\n/**\n * @internal\n */\nexport interface ISequencedDocumentSystemMessage extends ISequencedDocumentMessage {\n\tdata: string;\n}\n\n/**\n * @internal\n */\nexport interface ISequencedDocumentAugmentedMessage extends ISequencedDocumentMessage {\n\tadditionalContent: string;\n}\n\n/**\n * Common interface between incoming and outgoing signals.\n * @legacy\n * @alpha\n */\nexport interface ISignalMessageBase {\n\t/**\n\t * Signal content\n\t */\n\tcontent: unknown;\n\n\t/**\n\t * Signal type\n\t */\n\ttype?: string;\n\n\t/**\n\t * Counts the number of signals sent by the sending client.\n\t */\n\tclientConnectionNumber?: number;\n\n\t/**\n\t * Sequence number that indicates when the signal was created in relation to the delta stream\n\t */\n\treferenceSequenceNumber?: number;\n\n\t/**\n\t * Client ID of the singular client the signal is being (or has been) sent to.\n\t * May only be specified when IConnect.supportedFeatures['submit_signals_v2'] is true, will throw otherwise.\n\t */\n\ttargetClientId?: string;\n}\n\n/**\n * Interface for signals sent by the server to clients.\n * @legacy\n * @alpha\n */\nexport interface ISignalMessage extends ISignalMessageBase {\n\t/**\n\t * The client ID that submitted the message.\n\t * For server generated messages the clientId will be null.\n\t */\n\t// eslint-disable-next-line @rushstack/no-new-null\n\tclientId: string | null;\n}\n\n/**\n * Interface for signals sent by clients to the server.\n * @internal\n */\nexport type ISentSignalMessage = ISignalMessageBase;\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IUploadedSummaryDetails {\n\t/**\n\t * Indicates whether the uploaded summary contains \".protocol\" tree.\n\t */\n\tincludesProtocolTree?: boolean;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface ISummaryContent {\n\t/**\n\t * Handle reference to the summary data.\n\t */\n\thandle: string;\n\n\t/**\n\t * Message included as part of the summary.\n\t */\n\tmessage: string;\n\n\t/**\n\t * Handles to parent summaries of the proposed new summary.\n\t */\n\tparents: string[];\n\n\t/**\n\t * Handle to the current latest summary stored by the service\n\t */\n\thead: string;\n\n\t/**\n\t * Details of the uploaded summary.\n\t */\n\tdetails?: IUploadedSummaryDetails;\n\n\t// TODO - need an epoch/reload bit to indicate to clients that the summary has changed and requires a reload\n\t// This could be encoded in the summary itself as well but then would require the client to download it to check\n}\n\n/**\n * General errors returned from the server.\n * May want to add error code or something similar in the future.\n * @internal\n */\nexport interface IServerError {\n\t/**\n\t * Message describing the server error.\n\t */\n\terrorMessage: string;\n}\n\n/**\n * Data about the original proposed summary message.\n * @legacy\n * @alpha\n */\nexport interface ISummaryProposal {\n\t/**\n\t * Actual sequence number of the summary message proposal.\n\t */\n\tsummarySequenceNumber: number;\n}\n\n/**\n * Contents of summary ack expected from the server.\n * @legacy\n * @alpha\n */\nexport interface ISummaryAck {\n\t/**\n\t * Handle of the complete summary.\n\t */\n\thandle: string;\n\n\t/**\n\t * Information about the proposed summary message.\n\t */\n\tsummaryProposal: ISummaryProposal;\n}\n\n/**\n * Contents of summary nack expected from the server.\n * @legacy\n * @alpha\n */\nexport interface ISummaryNack {\n\t/**\n\t * Information about the proposed summary message.\n\t */\n\tsummaryProposal: ISummaryProposal;\n\n\t/**\n\t * An error code number that represents the error. It will be a valid HTTP error code.\n\t * 403 errors are non retriable.\n\t * 400 errors are always immediately retriable.\n\t * 429 errors are retriable or non retriable (depends on type field).\n\t */\n\tcode?: number;\n\n\t/**\n\t * A message about the error for debugging/logging/telemetry purposes\n\t */\n\tmessage?: string;\n\n\t/**\n\t * Optional Retry-After time in seconds.\n\t * If specified, the client should wait this many seconds before retrying.8\n\t */\n\tretryAfter?: number;\n}\n\n/**\n * Interface for nack content.\n * @legacy\n * @alpha\n */\nexport interface INackContent {\n\t/**\n\t * An error code number that represents the error. It will be a valid HTTP error code.\n\t * 403 errors are non retriable and client should acquire a new identity before reconnection.\n\t * 400 errors are always immediately retriable\n\t * 429 errors are retriable or non retriable (depends on type field).\n\t */\n\tcode: number;\n\n\t/**\n\t * Type of the Nack.\n\t */\n\ttype: NackErrorType;\n\n\t/**\n\t * A message about the nack for debugging/logging/telemetry purposes\n\t */\n\tmessage: string;\n\n\t/**\n\t * Optional Retry-After time in seconds\n\t * If specified, the client should wait this many seconds before retrying\n\t */\n\tretryAfter?: number;\n}\n\n/**\n * Type of the nack.\n * @legacy\n * @alpha\n */\nexport enum NackErrorType {\n\t/**\n\t * Retriable after {@link ISummaryNack.retryAfter} seconds.\n\t */\n\tThrottlingError = \"ThrottlingError\",\n\n\t/**\n\t * Client's token is not valid for the intended message.\n\t */\n\tInvalidScopeError = \"InvalidScopeError\",\n\n\t/**\n\t * Clients message is invalid and should retry immediately with a valid message.\n\t */\n\tBadRequestError = \"BadRequestError\",\n\n\t/**\n\t * Service is having issues. Client should not retry.\n\t */\n\tLimitExceededError = \"LimitExceededError\",\n}\n"]}
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/protocol/protocol.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,MAAM,CAAN,IAAY,WAoEX;AApED,WAAY,WAAW;IACtB;;;;;OAKG;IACH,4BAAa,CAAA;IAEb;;OAEG;IACH,kCAAmB,CAAA;IAEnB;;OAEG;IACH,oCAAqB,CAAA;IAErB;;OAEG;IACH,kCAAmB,CAAA;IAEnB;;OAEG;IACH,gCAAiB,CAAA;IAEjB;;OAEG;IACH,gCAAiB,CAAA;IAEjB;;OAEG;IACH,sCAAuB,CAAA;IAEvB;;OAEG;IACH,wCAAyB,CAAA;IAEzB;;OAEG;IACH,0CAA2B,CAAA;IAE3B;;OAEG;IACH,+BAAgB,CAAA;IAEhB;;OAEG;IACH,oCAAqB,CAAA;IAErB;;OAEG;IACH,yCAA0B,CAAA;IAE1B;;OAEG;IACH,kCAAmB,CAAA;AACpB,CAAC,EApEW,WAAW,KAAX,WAAW,QAoEtB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,UAUX;AAVD,WAAY,UAAU;IACrB;;OAEG;IACH,iCAAmB,CAAA;IAEnB;;OAEG;IACH,mCAAqB,CAAA;AACtB,CAAC,EAVW,UAAU,KAAV,UAAU,QAUrB;AAicD;;;;GAIG;AACH,MAAM,CAAN,IAAY,aAoBX;AApBD,WAAY,aAAa;IACxB;;OAEG;IACH,oDAAmC,CAAA;IAEnC;;OAEG;IACH,wDAAuC,CAAA;IAEvC;;OAEG;IACH,oDAAmC,CAAA;IAEnC;;OAEG;IACH,0DAAyC,CAAA;AAC1C,CAAC,EApBW,aAAa,KAAb,aAAa,QAoBxB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TypedMessage } from \"@fluidframework/core-interfaces/internal\";\n\n/**\n * @legacy\n * @alpha\n */\nexport enum MessageType {\n\t/**\n\t * Empty operation message. Used to send an updated reference sequence number.\n\t * Relay service is free to coalesce these messages or fully drop them, if\n\t * another message was used to update MSN to a number equal or higher than referenced\n\t * sequence number in Noop.\n\t */\n\tNoOp = \"noop\",\n\n\t/**\n\t * System message sent to indicate a new client has joined the collaboration.\n\t */\n\tClientJoin = \"join\",\n\n\t/**\n\t * System message sent to indicate a client has left the collaboration.\n\t */\n\tClientLeave = \"leave\",\n\n\t/**\n\t * Proposes a new consensus value.\n\t */\n\tPropose = \"propose\",\n\n\t/**\n\t * Message used to reject a pending proposal.\n\t */\n\tReject = \"reject\",\n\n\t/**\n\t * Message sent by client accepting proposal\n\t */\n\tAccept = \"accept\",\n\n\t/**\n\t * Summary operation (message).\n\t */\n\tSummarize = \"summarize\",\n\n\t/**\n\t * Summary operation (message) written.\n\t */\n\tSummaryAck = \"summaryAck\",\n\n\t/**\n\t * Summary operation (message) write failure.\n\t */\n\tSummaryNack = \"summaryNack\",\n\n\t/**\n\t * Operation (message) produced by container runtime.\n\t */\n\tOperation = \"op\",\n\n\t/**\n\t * Message to indicate that no active clients are present.\n\t */\n\tNoClient = \"noClient\",\n\n\t/**\n\t * Message to indicate successful round trip.\n\t */\n\tRoundTrip = \"tripComplete\",\n\n\t/**\n\t * Service specific control messages that are never sequenced.\n\t */\n\tControl = \"control\",\n}\n\n/**\n * @internal\n */\nexport enum SignalType {\n\t/**\n\t * System signal sent to indicate a new client has joined the collaboration.\n\t */\n\tClientJoin = \"join\",\n\n\t/**\n\t * System signal sent to indicate a client has left the collaboration.\n\t */\n\tClientLeave = \"leave\",\n}\n\n/**\n * Messages to track latency trace.\n * @legacy\n * @alpha\n */\nexport interface ITrace {\n\t/**\n\t * Service generating the trace.\n\t */\n\tservice: string;\n\n\t/**\n\t * Denotes receiving/sending.\n\t */\n\taction: string;\n\n\t/**\n\t * Floating point time in milliseconds with up to nanosecond precision.\n\t */\n\ttimestamp: number;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface INack {\n\t/**\n\t * The operation that was just nacked.\n\t */\n\toperation: IDocumentMessage | undefined;\n\n\t/**\n\t * The sequence number the client needs to catch up to before retrying.\n\t */\n\tsequenceNumber: number;\n\n\t/**\n\t * Detail info about the nack.\n\t */\n\tcontent: INackContent;\n}\n\n/**\n * Document-specific message.\n * @legacy\n * @alpha\n */\nexport interface IDocumentMessage {\n\t/**\n\t * The document's client sequence number.\n\t */\n\tclientSequenceNumber: number;\n\n\t/**\n\t * The reference sequence number the message was sent relative to.\n\t */\n\treferenceSequenceNumber: number;\n\n\t/**\n\t * The type of document message being sent.\n\t */\n\ttype: string;\n\n\t/**\n\t * The contents of the message.\n\t */\n\tcontents: unknown;\n\n\t/**\n\t * App provided metadata about the operation.\n\t */\n\tmetadata?: unknown;\n\n\t/**\n\t * Server provided metadata about the operation.\n\t */\n\tserverMetadata?: unknown;\n\n\t/**\n\t * Traces related to the packet.\n\t */\n\ttraces?: ITrace[];\n\n\t/**\n\t * The compression algorithm that was used to compress contents of this message.\n\t * @experimental Not ready for use\n\t */\n\tcompression?: string;\n}\n\n/**\n * Document Message with optional system level data field.\n * @internal\n */\nexport interface IDocumentSystemMessage extends IDocumentMessage {\n\tdata: string;\n}\n\n/**\n * Branch origin information.\n * @legacy\n * @alpha\n */\nexport interface IBranchOrigin {\n\t/**\n\t * Origin branch of the message.\n\t */\n\tid: string;\n\n\t/**\n\t * Sequence number for the message in branch ID.\n\t */\n\tsequenceNumber: number;\n\n\t/**\n\t * Minimum sequence number for the message in branch ID.\n\t */\n\tminimumSequenceNumber: number;\n}\n\n/**\n * Sequenced message for a distributed document.\n * @legacy\n * @alpha\n */\nexport interface ISequencedDocumentMessage {\n\t/**\n\t * The client ID that submitted the message.\n\t * For server generated messages the clientId will be null;\n\t */\n\t// eslint-disable-next-line @rushstack/no-new-null\n\tclientId: string | null;\n\n\t/**\n\t * The sequenced identifier.\n\t */\n\tsequenceNumber: number;\n\n\t/**\n\t * The minimum sequence number for all connected clients.\n\t */\n\tminimumSequenceNumber: number;\n\n\t/**\n\t * The document's client sequence number.\n\t */\n\tclientSequenceNumber: number;\n\n\t/**\n\t * The reference sequence number the message was sent relative to.\n\t */\n\treferenceSequenceNumber: number;\n\n\t/**\n\t * The type of operation.\n\t */\n\ttype: string;\n\n\t/**\n\t * The contents of the message.\n\t */\n\tcontents: unknown;\n\n\t/**\n\t * App provided metadata about the operation.\n\t */\n\tmetadata?: unknown;\n\n\t/**\n\t * Server provided metadata about the operation.\n\t */\n\tserverMetadata?: unknown;\n\n\t/**\n\t * Origin branch information for the message.\n\t *\n\t * @remarks Can be marked undefined if the current message is also the origin.\n\t */\n\torigin?: IBranchOrigin;\n\n\t/**\n\t * Traces related to the packet.\n\t */\n\ttraces?: ITrace[];\n\n\t/**\n\t * Timestamp when the server ticketed the message.\n\t */\n\ttimestamp: number;\n\n\t/**\n\t * Data provided by service. Only present in service generated messages.\n\t */\n\tdata?: string;\n\n\t/**\n\t * Experimental field for storing the rolling hash at sequence number.\n\t *\n\t * @deprecated Use ISequencedDocumentMessageExperimental instead.\n\t */\n\texpHash1?: string;\n\n\t/**\n\t * The compression algorithm that was used to compress contents of this message.\n\t *\n\t * @deprecated Use ISequencedDocumentMessageExperimental instead.\n\t */\n\tcompression?: string;\n}\n\n/**\n * {@link ISequencedDocumentAugmentedMessage} with experimental properties.\n * @internal\n */\nexport type ISequencedDocumentMessageExperimental = Omit<\n\tISequencedDocumentMessage,\n\t\"expHash1\" | \"compression\"\n> & {\n\t/**\n\t * Stores the rolling hash at sequence number.\n\t */\n\texpHash1?: string;\n\n\t/**\n\t * The compression algorithm that was used to compress contents of this message.\n\t */\n\tcompression?: string;\n};\n\n/**\n * @internal\n */\nexport interface ISequencedDocumentSystemMessage extends ISequencedDocumentMessage {\n\tdata: string;\n}\n\n/**\n * @internal\n */\nexport interface ISequencedDocumentAugmentedMessage extends ISequencedDocumentMessage {\n\tadditionalContent: string;\n}\n\n/**\n * Common interface between incoming and outgoing signals.\n * @legacy\n * @alpha\n */\nexport interface ISignalMessageBase<TMessage extends TypedMessage = TypedMessage> {\n\t/**\n\t * Signal content\n\t */\n\tcontent: TMessage[\"content\"];\n\n\t/**\n\t * Signal type\n\t */\n\ttype?: TMessage[\"type\"];\n\n\t/**\n\t * Counts the number of signals sent by the sending client.\n\t */\n\tclientConnectionNumber?: number;\n\n\t/**\n\t * Sequence number that indicates when the signal was created in relation to the delta stream\n\t */\n\treferenceSequenceNumber?: number;\n\n\t/**\n\t * Client ID of the singular client the signal is being (or has been) sent to.\n\t * May only be specified when IConnect.supportedFeatures['submit_signals_v2'] is true, will throw otherwise.\n\t */\n\ttargetClientId?: string;\n}\n\n/**\n * Interface for signals sent by the server to clients.\n * @legacy\n * @alpha\n */\nexport interface ISignalMessage<TMessage extends TypedMessage = TypedMessage>\n\textends ISignalMessageBase<TMessage> {\n\t/**\n\t * The client ID that submitted the message.\n\t * For server generated messages the clientId will be null.\n\t */\n\t// eslint-disable-next-line @rushstack/no-new-null\n\tclientId: string | null;\n}\n\n/**\n * Interface for signals sent by clients to the server.\n * @internal\n */\nexport type ISentSignalMessage<TMessage extends TypedMessage = TypedMessage> =\n\tISignalMessageBase<TMessage>;\n\n/**\n * @legacy\n * @alpha\n */\nexport interface IUploadedSummaryDetails {\n\t/**\n\t * Indicates whether the uploaded summary contains \".protocol\" tree.\n\t */\n\tincludesProtocolTree?: boolean;\n}\n\n/**\n * @legacy\n * @alpha\n */\nexport interface ISummaryContent {\n\t/**\n\t * Handle reference to the summary data.\n\t */\n\thandle: string;\n\n\t/**\n\t * Message included as part of the summary.\n\t */\n\tmessage: string;\n\n\t/**\n\t * Handles to parent summaries of the proposed new summary.\n\t */\n\tparents: string[];\n\n\t/**\n\t * Handle to the current latest summary stored by the service\n\t */\n\thead: string;\n\n\t/**\n\t * Details of the uploaded summary.\n\t */\n\tdetails?: IUploadedSummaryDetails;\n\n\t// TODO - need an epoch/reload bit to indicate to clients that the summary has changed and requires a reload\n\t// This could be encoded in the summary itself as well but then would require the client to download it to check\n}\n\n/**\n * General errors returned from the server.\n * May want to add error code or something similar in the future.\n * @internal\n */\nexport interface IServerError {\n\t/**\n\t * Message describing the server error.\n\t */\n\terrorMessage: string;\n}\n\n/**\n * Data about the original proposed summary message.\n * @legacy\n * @alpha\n */\nexport interface ISummaryProposal {\n\t/**\n\t * Actual sequence number of the summary message proposal.\n\t */\n\tsummarySequenceNumber: number;\n}\n\n/**\n * Contents of summary ack expected from the server.\n * @legacy\n * @alpha\n */\nexport interface ISummaryAck {\n\t/**\n\t * Handle of the complete summary.\n\t */\n\thandle: string;\n\n\t/**\n\t * Information about the proposed summary message.\n\t */\n\tsummaryProposal: ISummaryProposal;\n}\n\n/**\n * Contents of summary nack expected from the server.\n * @legacy\n * @alpha\n */\nexport interface ISummaryNack {\n\t/**\n\t * Information about the proposed summary message.\n\t */\n\tsummaryProposal: ISummaryProposal;\n\n\t/**\n\t * An error code number that represents the error. It will be a valid HTTP error code.\n\t * 403 errors are non retriable.\n\t * 400 errors are always immediately retriable.\n\t * 429 errors are retriable or non retriable (depends on type field).\n\t */\n\tcode?: number;\n\n\t/**\n\t * A message about the error for debugging/logging/telemetry purposes\n\t */\n\tmessage?: string;\n\n\t/**\n\t * Optional Retry-After time in seconds.\n\t * If specified, the client should wait this many seconds before retrying.8\n\t */\n\tretryAfter?: number;\n}\n\n/**\n * Interface for nack content.\n * @legacy\n * @alpha\n */\nexport interface INackContent {\n\t/**\n\t * An error code number that represents the error. It will be a valid HTTP error code.\n\t * 403 errors are non retriable and client should acquire a new identity before reconnection.\n\t * 400 errors are always immediately retriable\n\t * 429 errors are retriable or non retriable (depends on type field).\n\t */\n\tcode: number;\n\n\t/**\n\t * Type of the Nack.\n\t */\n\ttype: NackErrorType;\n\n\t/**\n\t * A message about the nack for debugging/logging/telemetry purposes\n\t */\n\tmessage: string;\n\n\t/**\n\t * Optional Retry-After time in seconds\n\t * If specified, the client should wait this many seconds before retrying\n\t */\n\tretryAfter?: number;\n}\n\n/**\n * Type of the nack.\n * @legacy\n * @alpha\n */\nexport enum NackErrorType {\n\t/**\n\t * Retriable after {@link ISummaryNack.retryAfter} seconds.\n\t */\n\tThrottlingError = \"ThrottlingError\",\n\n\t/**\n\t * Client's token is not valid for the intended message.\n\t */\n\tInvalidScopeError = \"InvalidScopeError\",\n\n\t/**\n\t * Clients message is invalid and should retry immediately with a valid message.\n\t */\n\tBadRequestError = \"BadRequestError\",\n\n\t/**\n\t * Service is having issues. Client should not retry.\n\t */\n\tLimitExceededError = \"LimitExceededError\",\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/driver-definitions",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.42.0",
|
|
4
4
|
"description": "Fluid driver definitions",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"main": "lib/index.js",
|
|
48
48
|
"types": "lib/public.d.ts",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@fluidframework/core-interfaces": "2.
|
|
50
|
+
"@fluidframework/core-interfaces": "~2.42.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@arethetypeswrong/cli": "^0.17.1",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"@fluid-tools/build-cli": "^0.55.0",
|
|
56
56
|
"@fluidframework/build-common": "^2.0.3",
|
|
57
57
|
"@fluidframework/build-tools": "^0.55.0",
|
|
58
|
-
"@fluidframework/driver-definitions-previous": "npm:@fluidframework/driver-definitions@2.
|
|
59
|
-
"@fluidframework/eslint-config-fluid": "^5.7.
|
|
58
|
+
"@fluidframework/driver-definitions-previous": "npm:@fluidframework/driver-definitions@2.41.0",
|
|
59
|
+
"@fluidframework/eslint-config-fluid": "^5.7.4",
|
|
60
60
|
"@microsoft/api-extractor": "7.52.8",
|
|
61
61
|
"concurrently": "^8.2.1",
|
|
62
62
|
"copyfiles": "^2.4.1",
|
package/src/protocol/protocol.ts
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import type { TypedMessage } from "@fluidframework/core-interfaces/internal";
|
|
7
|
+
|
|
6
8
|
/**
|
|
7
9
|
* @legacy
|
|
8
10
|
* @alpha
|
|
@@ -341,16 +343,16 @@ export interface ISequencedDocumentAugmentedMessage extends ISequencedDocumentMe
|
|
|
341
343
|
* @legacy
|
|
342
344
|
* @alpha
|
|
343
345
|
*/
|
|
344
|
-
export interface ISignalMessageBase {
|
|
346
|
+
export interface ISignalMessageBase<TMessage extends TypedMessage = TypedMessage> {
|
|
345
347
|
/**
|
|
346
348
|
* Signal content
|
|
347
349
|
*/
|
|
348
|
-
content:
|
|
350
|
+
content: TMessage["content"];
|
|
349
351
|
|
|
350
352
|
/**
|
|
351
353
|
* Signal type
|
|
352
354
|
*/
|
|
353
|
-
type?:
|
|
355
|
+
type?: TMessage["type"];
|
|
354
356
|
|
|
355
357
|
/**
|
|
356
358
|
* Counts the number of signals sent by the sending client.
|
|
@@ -374,7 +376,8 @@ export interface ISignalMessageBase {
|
|
|
374
376
|
* @legacy
|
|
375
377
|
* @alpha
|
|
376
378
|
*/
|
|
377
|
-
export interface ISignalMessage extends
|
|
379
|
+
export interface ISignalMessage<TMessage extends TypedMessage = TypedMessage>
|
|
380
|
+
extends ISignalMessageBase<TMessage> {
|
|
378
381
|
/**
|
|
379
382
|
* The client ID that submitted the message.
|
|
380
383
|
* For server generated messages the clientId will be null.
|
|
@@ -387,7 +390,8 @@ export interface ISignalMessage extends ISignalMessageBase {
|
|
|
387
390
|
* Interface for signals sent by clients to the server.
|
|
388
391
|
* @internal
|
|
389
392
|
*/
|
|
390
|
-
export type ISentSignalMessage =
|
|
393
|
+
export type ISentSignalMessage<TMessage extends TypedMessage = TypedMessage> =
|
|
394
|
+
ISignalMessageBase<TMessage>;
|
|
391
395
|
|
|
392
396
|
/**
|
|
393
397
|
* @legacy
|