@fluidframework/driver-definitions 2.53.0 → 2.60.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 +4 -0
- package/api-report/{driver-definitions.legacy.alpha.api.md → driver-definitions.legacy.beta.api.md} +73 -73
- package/dist/driverError.d.ts +10 -20
- package/dist/driverError.d.ts.map +1 -1
- package/dist/driverError.js +1 -2
- package/dist/driverError.js.map +1 -1
- package/dist/git/resources.d.ts +2 -4
- package/dist/git/resources.d.ts.map +1 -1
- package/dist/git/resources.js.map +1 -1
- package/dist/protocol/clients.d.ts +1 -2
- package/dist/protocol/clients.d.ts.map +1 -1
- package/dist/protocol/clients.js.map +1 -1
- package/dist/protocol/config.d.ts +1 -2
- package/dist/protocol/config.d.ts.map +1 -1
- package/dist/protocol/config.js.map +1 -1
- package/dist/protocol/consensus.d.ts +7 -14
- package/dist/protocol/consensus.d.ts.map +1 -1
- package/dist/protocol/consensus.js.map +1 -1
- package/dist/protocol/date.d.ts +1 -2
- package/dist/protocol/date.d.ts.map +1 -1
- package/dist/protocol/date.js.map +1 -1
- package/dist/protocol/protocol.d.ts +15 -30
- package/dist/protocol/protocol.d.ts.map +1 -1
- package/dist/protocol/protocol.js +2 -4
- package/dist/protocol/protocol.js.map +1 -1
- package/dist/protocol/scopes.d.ts +1 -2
- package/dist/protocol/scopes.d.ts.map +1 -1
- package/dist/protocol/scopes.js +1 -2
- package/dist/protocol/scopes.js.map +1 -1
- package/dist/protocol/sockets.d.ts +2 -4
- package/dist/protocol/sockets.d.ts.map +1 -1
- package/dist/protocol/sockets.js.map +1 -1
- package/dist/protocol/storage.d.ts +10 -20
- package/dist/protocol/storage.d.ts.map +1 -1
- package/dist/protocol/storage.js +2 -4
- package/dist/protocol/storage.js.map +1 -1
- package/dist/protocol/summary.d.ts +1 -2
- package/dist/protocol/summary.d.ts.map +1 -1
- package/dist/protocol/summary.js.map +1 -1
- package/dist/protocol/tokens.d.ts +1 -2
- package/dist/protocol/tokens.d.ts.map +1 -1
- package/dist/protocol/tokens.js.map +1 -1
- package/dist/storage.d.ts +17 -34
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +2 -4
- package/dist/storage.js.map +1 -1
- package/dist/urlResolver.d.ts +5 -10
- package/dist/urlResolver.d.ts.map +1 -1
- package/dist/urlResolver.js +1 -2
- package/dist/urlResolver.js.map +1 -1
- package/lib/driverError.d.ts +10 -20
- package/lib/driverError.d.ts.map +1 -1
- package/lib/driverError.js +1 -2
- package/lib/driverError.js.map +1 -1
- package/lib/git/resources.d.ts +2 -4
- package/lib/git/resources.d.ts.map +1 -1
- package/lib/git/resources.js.map +1 -1
- package/lib/protocol/clients.d.ts +1 -2
- package/lib/protocol/clients.d.ts.map +1 -1
- package/lib/protocol/clients.js.map +1 -1
- package/lib/protocol/config.d.ts +1 -2
- package/lib/protocol/config.d.ts.map +1 -1
- package/lib/protocol/config.js.map +1 -1
- package/lib/protocol/consensus.d.ts +7 -14
- package/lib/protocol/consensus.d.ts.map +1 -1
- package/lib/protocol/consensus.js.map +1 -1
- package/lib/protocol/date.d.ts +1 -2
- package/lib/protocol/date.d.ts.map +1 -1
- package/lib/protocol/date.js.map +1 -1
- package/lib/protocol/protocol.d.ts +15 -30
- package/lib/protocol/protocol.d.ts.map +1 -1
- package/lib/protocol/protocol.js +2 -4
- package/lib/protocol/protocol.js.map +1 -1
- package/lib/protocol/scopes.d.ts +1 -2
- package/lib/protocol/scopes.d.ts.map +1 -1
- package/lib/protocol/scopes.js +1 -2
- package/lib/protocol/scopes.js.map +1 -1
- package/lib/protocol/sockets.d.ts +2 -4
- package/lib/protocol/sockets.d.ts.map +1 -1
- package/lib/protocol/sockets.js.map +1 -1
- package/lib/protocol/storage.d.ts +10 -20
- package/lib/protocol/storage.d.ts.map +1 -1
- package/lib/protocol/storage.js +2 -4
- package/lib/protocol/storage.js.map +1 -1
- package/lib/protocol/summary.d.ts +1 -2
- package/lib/protocol/summary.d.ts.map +1 -1
- package/lib/protocol/summary.js.map +1 -1
- package/lib/protocol/tokens.d.ts +1 -2
- package/lib/protocol/tokens.d.ts.map +1 -1
- package/lib/protocol/tokens.js.map +1 -1
- package/lib/storage.d.ts +17 -34
- package/lib/storage.d.ts.map +1 -1
- package/lib/storage.js +2 -4
- package/lib/storage.js.map +1 -1
- package/lib/urlResolver.d.ts +5 -10
- package/lib/urlResolver.d.ts.map +1 -1
- package/lib/urlResolver.js +1 -2
- package/lib/urlResolver.js.map +1 -1
- package/package.json +4 -4
- package/src/driverError.ts +10 -20
- package/src/git/resources.ts +2 -4
- package/src/protocol/clients.ts +1 -2
- package/src/protocol/config.ts +1 -2
- package/src/protocol/consensus.ts +7 -14
- package/src/protocol/date.ts +1 -2
- package/src/protocol/protocol.ts +15 -30
- package/src/protocol/scopes.ts +1 -2
- package/src/protocol/sockets.ts +2 -4
- package/src/protocol/storage.ts +11 -21
- package/src/protocol/summary.ts +1 -2
- package/src/protocol/tokens.ts +1 -2
- package/src/storage.ts +17 -34
- package/src/urlResolver.ts +5 -10
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { TypedMessage } from "@fluidframework/core-interfaces/internal";
|
|
6
6
|
/**
|
|
7
|
-
* @legacy
|
|
8
|
-
* @alpha
|
|
7
|
+
* @legacy @beta
|
|
9
8
|
*/
|
|
10
9
|
export declare enum MessageType {
|
|
11
10
|
/**
|
|
@@ -79,8 +78,7 @@ export declare enum SignalType {
|
|
|
79
78
|
}
|
|
80
79
|
/**
|
|
81
80
|
* Messages to track latency trace.
|
|
82
|
-
* @legacy
|
|
83
|
-
* @alpha
|
|
81
|
+
* @legacy @beta
|
|
84
82
|
*/
|
|
85
83
|
export interface ITrace {
|
|
86
84
|
/**
|
|
@@ -97,8 +95,7 @@ export interface ITrace {
|
|
|
97
95
|
timestamp: number;
|
|
98
96
|
}
|
|
99
97
|
/**
|
|
100
|
-
* @legacy
|
|
101
|
-
* @alpha
|
|
98
|
+
* @legacy @beta
|
|
102
99
|
*/
|
|
103
100
|
export interface INack {
|
|
104
101
|
/**
|
|
@@ -116,8 +113,7 @@ export interface INack {
|
|
|
116
113
|
}
|
|
117
114
|
/**
|
|
118
115
|
* Document-specific message.
|
|
119
|
-
* @legacy
|
|
120
|
-
* @alpha
|
|
116
|
+
* @legacy @beta
|
|
121
117
|
*/
|
|
122
118
|
export interface IDocumentMessage {
|
|
123
119
|
/**
|
|
@@ -163,8 +159,7 @@ export interface IDocumentSystemMessage extends IDocumentMessage {
|
|
|
163
159
|
}
|
|
164
160
|
/**
|
|
165
161
|
* Branch origin information.
|
|
166
|
-
* @legacy
|
|
167
|
-
* @alpha
|
|
162
|
+
* @legacy @beta
|
|
168
163
|
*/
|
|
169
164
|
export interface IBranchOrigin {
|
|
170
165
|
/**
|
|
@@ -182,8 +177,7 @@ export interface IBranchOrigin {
|
|
|
182
177
|
}
|
|
183
178
|
/**
|
|
184
179
|
* Sequenced message for a distributed document.
|
|
185
|
-
* @legacy
|
|
186
|
-
* @alpha
|
|
180
|
+
* @legacy @beta
|
|
187
181
|
*/
|
|
188
182
|
export interface ISequencedDocumentMessage {
|
|
189
183
|
/**
|
|
@@ -282,8 +276,7 @@ export interface ISequencedDocumentAugmentedMessage extends ISequencedDocumentMe
|
|
|
282
276
|
}
|
|
283
277
|
/**
|
|
284
278
|
* Common interface between incoming and outgoing signals.
|
|
285
|
-
* @legacy
|
|
286
|
-
* @alpha
|
|
279
|
+
* @legacy @beta
|
|
287
280
|
*/
|
|
288
281
|
export interface ISignalMessageBase<TMessage extends TypedMessage = TypedMessage> {
|
|
289
282
|
/**
|
|
@@ -310,8 +303,7 @@ export interface ISignalMessageBase<TMessage extends TypedMessage = TypedMessage
|
|
|
310
303
|
}
|
|
311
304
|
/**
|
|
312
305
|
* Interface for signals sent by the server to clients.
|
|
313
|
-
* @legacy
|
|
314
|
-
* @alpha
|
|
306
|
+
* @legacy @beta
|
|
315
307
|
*/
|
|
316
308
|
export interface ISignalMessage<TMessage extends TypedMessage = TypedMessage> extends ISignalMessageBase<TMessage> {
|
|
317
309
|
/**
|
|
@@ -326,8 +318,7 @@ export interface ISignalMessage<TMessage extends TypedMessage = TypedMessage> ex
|
|
|
326
318
|
*/
|
|
327
319
|
export type ISentSignalMessage<TMessage extends TypedMessage = TypedMessage> = ISignalMessageBase<TMessage>;
|
|
328
320
|
/**
|
|
329
|
-
* @legacy
|
|
330
|
-
* @alpha
|
|
321
|
+
* @legacy @beta
|
|
331
322
|
*/
|
|
332
323
|
export interface IUploadedSummaryDetails {
|
|
333
324
|
/**
|
|
@@ -336,8 +327,7 @@ export interface IUploadedSummaryDetails {
|
|
|
336
327
|
includesProtocolTree?: boolean;
|
|
337
328
|
}
|
|
338
329
|
/**
|
|
339
|
-
* @legacy
|
|
340
|
-
* @alpha
|
|
330
|
+
* @legacy @beta
|
|
341
331
|
*/
|
|
342
332
|
export interface ISummaryContent {
|
|
343
333
|
/**
|
|
@@ -374,8 +364,7 @@ export interface IServerError {
|
|
|
374
364
|
}
|
|
375
365
|
/**
|
|
376
366
|
* Data about the original proposed summary message.
|
|
377
|
-
* @legacy
|
|
378
|
-
* @alpha
|
|
367
|
+
* @legacy @beta
|
|
379
368
|
*/
|
|
380
369
|
export interface ISummaryProposal {
|
|
381
370
|
/**
|
|
@@ -385,8 +374,7 @@ export interface ISummaryProposal {
|
|
|
385
374
|
}
|
|
386
375
|
/**
|
|
387
376
|
* Contents of summary ack expected from the server.
|
|
388
|
-
* @legacy
|
|
389
|
-
* @alpha
|
|
377
|
+
* @legacy @beta
|
|
390
378
|
*/
|
|
391
379
|
export interface ISummaryAck {
|
|
392
380
|
/**
|
|
@@ -400,8 +388,7 @@ export interface ISummaryAck {
|
|
|
400
388
|
}
|
|
401
389
|
/**
|
|
402
390
|
* Contents of summary nack expected from the server.
|
|
403
|
-
* @legacy
|
|
404
|
-
* @alpha
|
|
391
|
+
* @legacy @beta
|
|
405
392
|
*/
|
|
406
393
|
export interface ISummaryNack {
|
|
407
394
|
/**
|
|
@@ -427,8 +414,7 @@ export interface ISummaryNack {
|
|
|
427
414
|
}
|
|
428
415
|
/**
|
|
429
416
|
* Interface for nack content.
|
|
430
|
-
* @legacy
|
|
431
|
-
* @alpha
|
|
417
|
+
* @legacy @beta
|
|
432
418
|
*/
|
|
433
419
|
export interface INackContent {
|
|
434
420
|
/**
|
|
@@ -454,8 +440,7 @@ export interface INackContent {
|
|
|
454
440
|
}
|
|
455
441
|
/**
|
|
456
442
|
* Type of the nack.
|
|
457
|
-
* @legacy
|
|
458
|
-
* @alpha
|
|
443
|
+
* @legacy @beta
|
|
459
444
|
*/
|
|
460
445
|
export declare enum NackErrorType {
|
|
461
446
|
/**
|
|
@@ -1 +1 @@
|
|
|
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
|
|
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;;GAEG;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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,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;;;GAGG;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;;;GAGG;AACH,oBAAY,aAAa;IACxB;;OAEG;IACH,eAAe,oBAAoB;IAEnC;;OAEG;IACH,iBAAiB,sBAAsB;IAEvC;;OAEG;IACH,eAAe,oBAAoB;IAEnC;;OAEG;IACH,kBAAkB,uBAAuB;CACzC"}
|
package/lib/protocol/protocol.js
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* @legacy
|
|
7
|
-
* @alpha
|
|
6
|
+
* @legacy @beta
|
|
8
7
|
*/
|
|
9
8
|
export var MessageType;
|
|
10
9
|
(function (MessageType) {
|
|
@@ -80,8 +79,7 @@ export var SignalType;
|
|
|
80
79
|
})(SignalType || (SignalType = {}));
|
|
81
80
|
/**
|
|
82
81
|
* Type of the nack.
|
|
83
|
-
* @legacy
|
|
84
|
-
* @alpha
|
|
82
|
+
* @legacy @beta
|
|
85
83
|
*/
|
|
86
84
|
export var NackErrorType;
|
|
87
85
|
(function (NackErrorType) {
|
|
@@ -1 +1 @@
|
|
|
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"]}
|
|
1
|
+
{"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/protocol/protocol.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;GAEG;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;AAobD;;;GAGG;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 @beta\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 @beta\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 @beta\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 @beta\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 @beta\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 @beta\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 @beta\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 @beta\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 @beta\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 @beta\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 @beta\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 @beta\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 @beta\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 @beta\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 @beta\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/lib/protocol/scopes.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../../src/protocol/scopes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../../src/protocol/scopes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,oBAAY,SAAS;IACpB;;OAEG;IACH,OAAO,aAAa;IAEpB;;OAEG;IACH,QAAQ,cAAc;IAEtB;;OAEG;IACH,YAAY,kBAAkB;CAC9B"}
|
package/lib/protocol/scopes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scopes.js","sourceRoot":"","sources":["../../src/protocol/scopes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH
|
|
1
|
+
{"version":3,"file":"scopes.js","sourceRoot":"","sources":["../../src/protocol/scopes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,CAAN,IAAY,SAeX;AAfD,WAAY,SAAS;IACpB;;OAEG;IACH,iCAAoB,CAAA;IAEpB;;OAEG;IACH,mCAAsB,CAAA;IAEtB;;OAEG;IACH,2CAA8B,CAAA;AAC/B,CAAC,EAfW,SAAS,KAAT,SAAS,QAepB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Defines scope access for a Container/Document.\n * @legacy @beta\n */\nexport enum ScopeType {\n\t/**\n\t * Read access is supported on the Container/Document\n\t */\n\tDocRead = \"doc:read\",\n\n\t/**\n\t * Write access is supported on the Container/Document\n\t */\n\tDocWrite = \"doc:write\",\n\n\t/**\n\t * User can generate new summaries operations\n\t */\n\tSummaryWrite = \"summary:write\",\n}\n"]}
|
|
@@ -8,8 +8,7 @@ import type { ISequencedDocumentMessage, ISignalMessage } from "./protocol.js";
|
|
|
8
8
|
import type { ITokenClaims } from "./tokens.js";
|
|
9
9
|
/**
|
|
10
10
|
* Message sent to connect to the given document.
|
|
11
|
-
* @legacy
|
|
12
|
-
* @alpha
|
|
11
|
+
* @legacy @beta
|
|
13
12
|
*/
|
|
14
13
|
export interface IConnect {
|
|
15
14
|
/**
|
|
@@ -65,8 +64,7 @@ export interface IConnect {
|
|
|
65
64
|
}
|
|
66
65
|
/**
|
|
67
66
|
* Message sent to indicate a client has connected to the server.
|
|
68
|
-
* @legacy
|
|
69
|
-
* @alpha
|
|
67
|
+
* @legacy @beta
|
|
70
68
|
*/
|
|
71
69
|
export interface IConnected {
|
|
72
70
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sockets.d.ts","sourceRoot":"","sources":["../../src/protocol/sockets.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD
|
|
1
|
+
{"version":3,"file":"sockets.d.ts","sourceRoot":"","sources":["../../src/protocol/sockets.ts"],"names":[],"mapp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EAAE,CAAC;IAEhC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAE5B;;OAEG;IACH,oBAAoB,EAAE,oBAAoB,CAAC;IAE3C;;OAEG;IACH,IAAI,EAAE,cAAc,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;;OAMG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE5C;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sockets.js","sourceRoot":"","sources":["../../src/protocol/sockets.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ConnectionMode, IClient, ISignalClient } from \"./clients.js\";\nimport type { IClientConfiguration } from \"./config.js\";\nimport type { ISequencedDocumentMessage, ISignalMessage } from \"./protocol.js\";\nimport type { ITokenClaims } from \"./tokens.js\";\n\n/**\n * Message sent to connect to the given document.\n * @legacy
|
|
1
|
+
{"version":3,"file":"sockets.js","sourceRoot":"","sources":["../../src/protocol/sockets.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ConnectionMode, IClient, ISignalClient } from \"./clients.js\";\nimport type { IClientConfiguration } from \"./config.js\";\nimport type { ISequencedDocumentMessage, ISignalMessage } from \"./protocol.js\";\nimport type { ITokenClaims } from \"./tokens.js\";\n\n/**\n * Message sent to connect to the given document.\n * @legacy @beta\n */\nexport interface IConnect {\n\t/**\n\t * The tenant ID for the document.\n\t */\n\ttenantId: string;\n\n\t/**\n\t * The document that is being connected to\n\t */\n\tid: string;\n\n\t/**\n\t * Authorization token\n\t */\n\t// TODO: Update this to use undefined instead of null.\n\t// eslint-disable-next-line @rushstack/no-new-null\n\ttoken: string | null;\n\n\t/**\n\t * Type of the client trying to connect\n\t */\n\tclient: IClient;\n\n\t/**\n\t * Semver list of protocol versions supported by the client ordered in priority of use\n\t */\n\tversions: string[];\n\n\t/**\n\t * Version of the driver which is connecting. It can be used at server to record in telemetry or\n\t * to block/allow specific driver version for specific features.\n\t */\n\tdriverVersion?: string;\n\n\t/**\n\t * Connection mode of client.\n\t */\n\tmode: ConnectionMode;\n\n\t/**\n\t * An optional nonce used during connection to identify connection attempts\n\t */\n\tnonce?: string;\n\n\t/**\n\t * Represents the version of document at client. It should match the version on server\n\t * for connection to be successful.\n\t */\n\tepoch?: string;\n\n\t/**\n\t * A list of optional features that client supports.\n\t * Features supported might be service specific.\n\t * If we have standardized features across all services, they need to be exposed in more structured way.\n\t */\n\tsupportedFeatures?: Record<string, unknown>;\n\n\t/**\n\t * Properties that client can send to server to tell info about client environment. These are a bunch of properties\n\t * separated by \";\" which server can log to better understand client environment etc.\n\t * Format: \"prop1:val1;prop2:val2;prop3:val3\"\n\t */\n\trelayUserAgent?: string;\n}\n\n/**\n * Message sent to indicate a client has connected to the server.\n * @legacy @beta\n */\nexport interface IConnected {\n\t/**\n\t * Claims for the client\n\t */\n\tclaims: ITokenClaims;\n\n\t/**\n\t * The client who is sending the message\n\t */\n\tclientId: string;\n\n\t/**\n\t * Whether or not this is an existing document\n\t */\n\texisting: boolean;\n\n\t/**\n\t * Maximum size of a message before chunking is required\n\t */\n\tmaxMessageSize: number;\n\n\t/**\n\t * Messages sent during the connection\n\t */\n\tinitialMessages: ISequencedDocumentMessage[];\n\n\t/**\n\t * Signals sent during the connection\n\t */\n\tinitialSignals: ISignalMessage[];\n\n\t/**\n\t * Prior clients already connected.\n\t */\n\tinitialClients: ISignalClient[];\n\n\t/**\n\t * Protocol version selected by the server to communicate with the client\n\t */\n\tversion: string;\n\n\t/**\n\t * List of protocol versions supported by the server\n\t */\n\tsupportedVersions: string[];\n\n\t/**\n\t * Configuration details provided by the service\n\t */\n\tserviceConfiguration: IClientConfiguration;\n\n\t/**\n\t * Connection mode of client.\n\t */\n\tmode: ConnectionMode;\n\n\t/**\n\t * An optional nonce used during connection to identify connection attempts\n\t */\n\tnonce?: string;\n\n\t/**\n\t * Last known sequence number to ordering service at the time of connection\n\t * It may lap actual last sequence number (quite a bit, if container is very active).\n\t * But it's best information for client to figure out how far it is behind, at least\n\t * for \"read\" connections. \"write\" connections may use own \"join\" op to similar information,\n\t * that is likely to be more up-to-date.\n\t */\n\tcheckpointSequenceNumber?: number;\n\n\t/**\n\t * Represents the version of document at server.\n\t */\n\tepoch?: string;\n\n\t/**\n\t * A list of optional features that ordering service supports.\n\t * Features supported might be service specific.\n\t * If we have standardized features across all services, they need to be exposed in more structured way.\n\t */\n\tsupportedFeatures?: Record<string, unknown>;\n\n\t/**\n\t * The time the client connected\n\t */\n\ttimestamp?: number;\n\n\t/**\n\t * Properties that server can send to client to tell info about node that client is connected to. For ex, for spo\n\t * it could contain info like build version, environment, region etc. These properties can be logged by client\n\t * to better understand server environment etc. and use it in case error occurs.\n\t * Format: \"prop1:val1;prop2:val2;prop3:val3\"\n\t */\n\trelayServiceAgent?: string;\n}\n"]}
|
|
@@ -4,8 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import type { IsoDate } from "./date.js";
|
|
6
6
|
/**
|
|
7
|
-
* @legacy
|
|
8
|
-
* @alpha
|
|
7
|
+
* @legacy @beta
|
|
9
8
|
*/
|
|
10
9
|
export interface IDocumentAttributes {
|
|
11
10
|
/**
|
|
@@ -18,8 +17,7 @@ export interface IDocumentAttributes {
|
|
|
18
17
|
minimumSequenceNumber: number;
|
|
19
18
|
}
|
|
20
19
|
/**
|
|
21
|
-
* @legacy
|
|
22
|
-
* @alpha
|
|
20
|
+
* @legacy @beta
|
|
23
21
|
*/
|
|
24
22
|
export declare enum FileMode {
|
|
25
23
|
File = "100644",
|
|
@@ -29,8 +27,7 @@ export declare enum FileMode {
|
|
|
29
27
|
}
|
|
30
28
|
/**
|
|
31
29
|
* Raw blob stored within the tree.
|
|
32
|
-
* @legacy
|
|
33
|
-
* @alpha
|
|
30
|
+
* @legacy @beta
|
|
34
31
|
*/
|
|
35
32
|
export interface IBlob {
|
|
36
33
|
/**
|
|
@@ -43,23 +40,20 @@ export interface IBlob {
|
|
|
43
40
|
encoding: "utf-8" | "base64";
|
|
44
41
|
}
|
|
45
42
|
/**
|
|
46
|
-
* @legacy
|
|
47
|
-
* @alpha
|
|
43
|
+
* @legacy @beta
|
|
48
44
|
*/
|
|
49
45
|
export interface IAttachment {
|
|
50
46
|
id: string;
|
|
51
47
|
}
|
|
52
48
|
/**
|
|
53
|
-
* @legacy
|
|
54
|
-
* @alpha
|
|
49
|
+
* @legacy @beta
|
|
55
50
|
*/
|
|
56
51
|
export interface ICreateBlobResponse {
|
|
57
52
|
id: string;
|
|
58
53
|
}
|
|
59
54
|
/**
|
|
60
55
|
* A tree entry wraps a path with a type of node.
|
|
61
|
-
* @legacy
|
|
62
|
-
* @alpha
|
|
56
|
+
* @legacy @beta
|
|
63
57
|
*/
|
|
64
58
|
export type ITreeEntry = {
|
|
65
59
|
/**
|
|
@@ -83,8 +77,7 @@ export type ITreeEntry = {
|
|
|
83
77
|
});
|
|
84
78
|
/**
|
|
85
79
|
* Type of entries that can be stored in a tree.
|
|
86
|
-
* @legacy
|
|
87
|
-
* @alpha
|
|
80
|
+
* @legacy @beta
|
|
88
81
|
*/
|
|
89
82
|
export declare enum TreeEntry {
|
|
90
83
|
Blob = "Blob",
|
|
@@ -92,8 +85,7 @@ export declare enum TreeEntry {
|
|
|
92
85
|
Attachment = "Attachment"
|
|
93
86
|
}
|
|
94
87
|
/**
|
|
95
|
-
* @legacy
|
|
96
|
-
* @alpha
|
|
88
|
+
* @legacy @beta
|
|
97
89
|
*/
|
|
98
90
|
export interface ITree {
|
|
99
91
|
entries: ITreeEntry[];
|
|
@@ -115,8 +107,7 @@ export interface ITree {
|
|
|
115
107
|
groupId?: string;
|
|
116
108
|
}
|
|
117
109
|
/**
|
|
118
|
-
* @legacy
|
|
119
|
-
* @alpha
|
|
110
|
+
* @legacy @beta
|
|
120
111
|
*/
|
|
121
112
|
export interface ISnapshotTree {
|
|
122
113
|
id?: string;
|
|
@@ -149,8 +140,7 @@ export interface ISnapshotTreeEx extends ISnapshotTree {
|
|
|
149
140
|
}
|
|
150
141
|
/**
|
|
151
142
|
* Represents a version of the snapshot of a data store.
|
|
152
|
-
* @legacy
|
|
153
|
-
* @alpha
|
|
143
|
+
* @legacy @beta
|
|
154
144
|
*/
|
|
155
145
|
export interface IVersion {
|
|
156
146
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/protocol/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/protocol/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,oBAAY,QAAQ;IACnB,IAAI,WAAW;IACf,UAAU,WAAW;IACrB,SAAS,WAAW;IACpB,OAAO,WAAW;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,KAAK;IACrB;;OAEG;IACH,QAAQ,EAA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AKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,aAAa;IACrD,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe,CAAA;KAAE,CAAC;CAC3C;AAED;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACxB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CACf"}
|
package/lib/protocol/storage.js
CHANGED
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
|
-
* @legacy
|
|
7
|
-
* @alpha
|
|
6
|
+
* @legacy @beta
|
|
8
7
|
*/
|
|
9
8
|
export var FileMode;
|
|
10
9
|
(function (FileMode) {
|
|
@@ -15,8 +14,7 @@ export var FileMode;
|
|
|
15
14
|
})(FileMode || (FileMode = {}));
|
|
16
15
|
/**
|
|
17
16
|
* Type of entries that can be stored in a tree.
|
|
18
|
-
* @legacy
|
|
19
|
-
* @alpha
|
|
17
|
+
* @legacy @beta
|
|
20
18
|
*/
|
|
21
19
|
export var TreeEntry;
|
|
22
20
|
(function (TreeEntry) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../src/protocol/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../../src/protocol/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmBH;;GAEG;AACH,MAAM,CAAN,IAAY,QAKX;AALD,WAAY,QAAQ;IACnB,2BAAe,CAAA;IACf,iCAAqB,CAAA;IACrB,gCAAoB,CAAA;IACpB,8BAAkB,CAAA;AACnB,CAAC,EALW,QAAQ,KAAR,QAAQ,QAKnB;AA+DD;;;GAGG;AACH,MAAM,CAAN,IAAY,SAIX;AAJD,WAAY,SAAS;IACpB,0BAAa,CAAA;IACb,0BAAa,CAAA;IACb,sCAAyB,CAAA;AAC1B,CAAC,EAJW,SAAS,KAAT,SAAS,QAIpB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IsoDate } from \"./date.js\";\n\n/**\n * @legacy @beta\n */\nexport interface IDocumentAttributes {\n\t/**\n\t * Sequence number at which the snapshot was taken\n\t */\n\tsequenceNumber: number;\n\n\t/**\n\t * Minimum sequence number when the snapshot was taken\n\t */\n\tminimumSequenceNumber: number;\n}\n\n/**\n * @legacy @beta\n */\nexport enum FileMode {\n\tFile = \"100644\",\n\tExecutable = \"100755\",\n\tDirectory = \"040000\",\n\tSymlink = \"120000\",\n}\n\n/**\n * Raw blob stored within the tree.\n * @legacy @beta\n */\nexport interface IBlob {\n\t/**\n\t * Contents of the blob\n\t */\n\tcontents: string;\n\n\t/**\n\t * The encoding of the contents string\n\t */\n\t// eslint-disable-next-line unicorn/text-encoding-identifier-case -- Cannot change \"utf-8\" to \"utf8\" as this encoding value is stored in summaries and would be a breaking change which needs to be done first before changing to utf8\n\tencoding: \"utf-8\" | \"base64\";\n}\n\n/**\n * @legacy @beta\n */\nexport interface IAttachment {\n\tid: string;\n}\n\n/**\n * @legacy @beta\n */\nexport interface ICreateBlobResponse {\n\tid: string;\n}\n\n/**\n * A tree entry wraps a path with a type of node.\n * @legacy @beta\n */\nexport type ITreeEntry = {\n\t/**\n\t * Path to the object\n\t */\n\tpath: string;\n\n\t/**\n\t * The file mode; one of 100644 for file (blob), 100755 for executable (blob), 040000 for subdirectory (tree)\n\t * or 120000 for a blob that specifies the path of a symlink\n\t */\n\tmode: FileMode;\n} & (\n\t| {\n\t\t\ttype: TreeEntry.Blob;\n\t\t\tvalue: IBlob;\n\t }\n\t| {\n\t\t\ttype: TreeEntry.Tree;\n\t\t\tvalue: ITree;\n\t }\n\t| {\n\t\t\ttype: TreeEntry.Attachment;\n\t\t\tvalue: IAttachment;\n\t }\n);\n\n/**\n * Type of entries that can be stored in a tree.\n * @legacy @beta\n */\nexport enum TreeEntry {\n\tBlob = \"Blob\",\n\tTree = \"Tree\",\n\tAttachment = \"Attachment\",\n}\n\n/**\n * @legacy @beta\n */\nexport interface ITree {\n\tentries: ITreeEntry[];\n\n\t/**\n\t * Unique ID representing all entries in the tree. Can be used to optimize snapshotting in the case\n\t * it is known that the `ITree` has already been created and stored\n\t */\n\tid?: string;\n\n\t/**\n\t * Indicates that this tree is unreferenced. If this is not present, the tree is considered referenced.\n\t */\n\tunreferenced?: true;\n\n\t/**\n\t * Represents the loading group to which the tree belongs to. Please refer to this readme for more context.\n\t * {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}\n\t * Also note that \"groupId\" is the same as \"loadingGroupId\" used elsewhere in the repo. The naming discrepancy is\n\t * intentional to minimize snapshot/summary size.\n\t */\n\tgroupId?: string;\n}\n\n/**\n * @legacy @beta\n */\nexport interface ISnapshotTree {\n\tid?: string;\n\tblobs: { [path: string]: string };\n\ttrees: { [path: string]: ISnapshotTree };\n\n\t/**\n\t * Indicates that this tree is unreferenced. If this is not present, the tree is considered referenced.\n\t */\n\tunreferenced?: true;\n\n\t/**\n\t * Represents the loading group to which the snapshot tree belongs to. Please refer to this readme for more context.\n\t * {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}\n\t * Also note that \"groupId\" is the same as \"loadingGroupId\" used elsewhere in the repo. The naming discrepancy is\n\t * intentional to minimize snapshot/summary size.\n\t */\n\tgroupId?: string;\n}\n\n/**\n * @internal\n */\nexport interface ISnapshotTreeEx extends ISnapshotTree {\n\tid: string;\n\ttrees: { [path: string]: ISnapshotTreeEx };\n}\n\n/**\n * Represents a version of the snapshot of a data store.\n * @legacy @beta\n */\nexport interface IVersion {\n\t/**\n\t * Version ID\n\t */\n\tid: string;\n\n\t/**\n\t * Tree ID for this version of the snapshot\n\t */\n\ttreeId: string;\n\n\t/**\n\t * Time when snapshot was generated.\n\t */\n\tdate?: IsoDate;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../../src/protocol/summary.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAC;AAE9F
|
|
1
|
+
{"version":3,"file":"summary.d.ts","sourceRoot":"","sources":["../../src/protocol/summary.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,YAAY,GAAG,cAAc,GAAG,kBAAkB,CAAC;AAE9F;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,cAAc,CAAC;AAExD;;;GAGG;AAEH,yBAAiB,WAAW,CAAC;IAC5B;;OAEG;IACH,KAAY,IAAI,GAAG,CAAC,CAAC;IACrB;;OAEG;IACH,KAAY,IAAI,GAAG,CAAC,CAAC;IACrB;;OAEG;IACH,KAAY,MAAM,GAAG,CAAC,CAAC;IACvB;;OAEG;IACH,KAAY,UAAU,GAAG,CAAC,CAAC;IAE3B;;;OAGG;IACI,MAAM,IAAI,EAAE,IAAiB,CAAC;IAErC;;;;;OAKG;IACI,MAAM,IAAI,EAAE,IAAiB,CAAC;IAErC;;;OAGG;IACI,MAAM,MAAM,EAAE,MAAmB,CAAC;IAEzC;;;;;OAKG;IACI,MAAM,UAAU,EAAE,UAAuB,CAAC;CACjD;AAED;;;GAGG;AACH,MAAM,MAAM,WAAW,GACpB,WAAW,CAAC,UAAU,GACtB,WAAW,CAAC,IAAI,GAChB,WAAW,CAAC,MAAM,GAClB,WAAW,CAAC,IAAI,CAAC;AAEpB;;;;;;;GAOG;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,IAAI,GAAG,WAAW,CAAC,IAAI,GAAG,WAAW,CAAC,UAAU,CAAC;AAE/F;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC;IAEzB;;OAEG;IACH,UAAU,EAAE,mBAAmB,CAAC;IAEhC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC;IACvB,OAAO,EAAE,MAAM,GAAG,UAAU,CAAC;CAC7B;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,WAAW,CAAC,UAAU,CAAC;IAC7B,EAAE,EAAE,MAAM,CAAC;CACX;AAED;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC5B,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC;IAEvB;;;;OAIG;IACH,IAAI,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAAA;KAAE,CAAC;IAExC;;;OAGG;IACH,YAAY,CAAC,EAAE,IAAI,CAAC;IAEpB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"summary.js","sourceRoot":"","sources":["../../src/protocol/summary.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"summary.js","sourceRoot":"","sources":["../../src/protocol/summary.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAiBH;;;GAGG;AACH,2DAA2D;AAC3D,MAAM,KAAW,WAAW,CA6C3B;AA7CD,WAAiB,WAAW;IAkB3B;;;OAGG;IACU,gBAAI,GAAS,CAAU,CAAC;IAErC;;;;;OAKG;IACU,gBAAI,GAAS,CAAU,CAAC;IAErC;;;OAGG;IACU,kBAAM,GAAW,CAAU,CAAC;IAEzC;;;;;OAKG;IACU,sBAAU,GAAe,CAAU,CAAC;AAClD,CAAC,EA7CgB,WAAW,KAAX,WAAW,QA6C3B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Object representing a node within a summary tree.\n *\n * @remarks\n * If any particular node is an {@link ISummaryTree}, it can contain additional `SummaryObject`s as its children.\n * @public\n */\nexport type SummaryObject = ISummaryTree | ISummaryBlob | ISummaryHandle | ISummaryAttachment;\n\n/**\n * The root of the summary tree.\n * @legacy @beta\n */\nexport type SummaryTree = ISummaryTree | ISummaryHandle;\n\n/**\n * Type tag used to distinguish different types of nodes in a {@link ISummaryTree}.\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace SummaryType {\n\t/**\n\t * @internal\n\t */\n\texport type Tree = 1;\n\t/**\n\t * @internal\n\t */\n\texport type Blob = 2;\n\t/**\n\t * @internal\n\t */\n\texport type Handle = 3;\n\t/**\n\t * @internal\n\t */\n\texport type Attachment = 4;\n\n\t/**\n\t * Represents a sub-tree in the summary.\n\t * @public\n\t */\n\texport const Tree: Tree = 1 as const;\n\n\t/**\n\t * Represents a blob of data that is added to the summary.\n\t * Such as the user data that is added to the DDS or metadata added by runtime\n\t * such as data store / channel attributes.\n\t * @public\n\t */\n\texport const Blob: Blob = 2 as const;\n\n\t/**\n\t * Path to a summary tree object from the last successful summary.\n\t * @public\n\t */\n\texport const Handle: Handle = 3 as const;\n\n\t/**\n\t * Unique identifier to larger blobs uploaded outside of the summary.\n\t * Ex. DDS has large images or video that will be uploaded by the BlobManager and\n\t * receive an Id that can be used in the summary.\n\t * @public\n\t */\n\texport const Attachment: Attachment = 4 as const;\n}\n\n/**\n * {@inheritDoc (SummaryType:namespace)}\n * @public\n */\nexport type SummaryType =\n\t| SummaryType.Attachment\n\t| SummaryType.Blob\n\t| SummaryType.Handle\n\t| SummaryType.Tree;\n\n/**\n * Summary type that {@link ISummaryHandle} points to.\n *\n * @remarks\n * Summary handles are often used to point to summary tree objects contained within older summaries, thus avoiding\n * the need to re-send the entire subtree if summary object has not changed.\n * @public\n */\nexport type SummaryTypeNoHandle = SummaryType.Tree | SummaryType.Blob | SummaryType.Attachment;\n\n/**\n * Path to a summary tree object from the last successful summary indicating the summary object hasn't\n * changed since it was uploaded.\n *\n * Special characters include '/'. '/' is used as a separator between different parts of the path as a way to traverse\n * different nodes in the previous summary/snapshot tree.\n *\n * Note, our algorithms use encodeURIComponent and decodeURIComponent to handle special characters in the path. If a string\n * causes this path to fail, the id will be invalid.\n *\n * @example\n * To illustrate, if a DataStore did not change since last summary, the framework runtime will use a handle for the\n * entire DataStore instead of re-sending the entire subtree. The same concept applies for a DDS.\n * An example of a handle string generated when the DDS did not change would be: '/.channels/<DataStoreId>/.channels/<DDSId>'.\n * An example of a handle string generated when the DataStore did not change would be: '/.channels/<DataStoreId>'.\n * An example of a handle string generated when the DDS blob did not change would be: `/.channels/<DataStoreId>/.channels/<DDSId>/<BlobId>`.\n * An example of a handle string generated when the DataStore .attributes blob did not change would be: `/.channels/<DataStoreId>/.attributes`.\n * @public\n */\nexport interface ISummaryHandle {\n\ttype: SummaryType.Handle;\n\n\t/**\n\t * Type of Summary Handle (SummaryType.Handle is not supported).\n\t */\n\thandleType: SummaryTypeNoHandle;\n\n\t/**\n\t * Unique path that identifies the corresponding sub-tree in a previous summary.\n\t */\n\thandle: string;\n}\n\n/**\n * String or Binary data to be uploaded to the server as part of the container's Summary.\n *\n * @remarks\n * Note: Already uploaded blobs would be referenced by an {@link ISummaryAttachment}.\n * Additional information can be found here: {@link https://github.com/microsoft/FluidFramework/issues/6568}\n *\n * @example\n * \"content\": \"\\{ \\\"pkg\\\":\\\"[\\\\\\\"OfficeRootComponent\\\\\\\",\\\\\\\"LastEditedComponent\\\\\\\"]\\\",\n * \\\"summaryFormatVersion\\\":2,\\\"isRootDataStore\\\":false \\}\"\n * @public\n */\nexport interface ISummaryBlob {\n\ttype: SummaryType.Blob;\n\tcontent: string | Uint8Array;\n}\n\n/**\n * Unique identifier for blobs uploaded outside of the summary.\n *\n * @remarks\n *\n * Attachment Blobs are uploaded and downloaded separately and do not take part of the snapshot payload.\n * The ID gets returned from the backend after the attachment has been uploaded.\n * Additional information can be found here: {@link https://github.com/microsoft/FluidFramework/issues/6374}\n *\n * @example\n * \"id\": \"bQAQKARDdMdTgqICmBa_ZB86YXwGP\"\n * @public\n */\nexport interface ISummaryAttachment {\n\ttype: SummaryType.Attachment;\n\tid: string;\n}\n\n/**\n * Tree Node data structure with children that are nodes of SummaryObject type:\n * Blob, Handle, Attachment or another Tree.\n * @public\n */\nexport interface ISummaryTree {\n\ttype: SummaryType.Tree;\n\n\t/**\n\t * The object containing all the tree's {@link SummaryObject} children.\n\t *\n\t * @param path - The key to store the SummaryObject at in the current summary tree being generated. Should not contain any \"/\" characters and should not change when encodeURIComponent is called on it.\n\t */\n\ttree: { [path: string]: SummaryObject };\n\n\t/**\n\t * Indicates that this tree entry is unreferenced.\n\t * If this is not present, the tree entry is considered referenced.\n\t */\n\tunreferenced?: true;\n\n\t/**\n\t * Represents the loading group to which the summary tree belongs to. Please refer to this readme for more context.\n\t * {@link https://github.com/microsoft/FluidFramework/blob/main/packages/runtime/container-runtime/README.md | README}\n\t * Also note that \"groupId\" is the same as \"loadingGroupId\" used elsewhere in the repo. The naming discrepancy is\n\t * intentional to minimize snapshot/summary size.\n\t */\n\tgroupId?: string;\n}\n"]}
|
package/lib/protocol/tokens.d.ts
CHANGED
|
@@ -7,8 +7,7 @@ import type { IUser } from "./users.js";
|
|
|
7
7
|
* {@link https://jwt.io/introduction/ | JSON Web Token (JWT)} Claims
|
|
8
8
|
*
|
|
9
9
|
* See {@link https://datatracker.ietf.org/doc/html/rfc7519#section-4}
|
|
10
|
-
* @legacy
|
|
11
|
-
* @alpha
|
|
10
|
+
* @legacy @beta
|
|
12
11
|
*/
|
|
13
12
|
export interface ITokenClaims {
|
|
14
13
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/protocol/tokens.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../src/protocol/tokens.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC5B;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC;IAEZ;;;;;;OAMG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;;;;OAMG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../src/protocol/tokens.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IUser } from \"./users.js\";\n\n/**\n * {@link https://jwt.io/introduction/ | JSON Web Token (JWT)} Claims\n *\n * See {@link https://datatracker.ietf.org/doc/html/rfc7519#section-4}\n * @legacy
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../src/protocol/tokens.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IUser } from \"./users.js\";\n\n/**\n * {@link https://jwt.io/introduction/ | JSON Web Token (JWT)} Claims\n *\n * See {@link https://datatracker.ietf.org/doc/html/rfc7519#section-4}\n * @legacy @beta\n */\nexport interface ITokenClaims {\n\t/**\n\t * Identifies the document (a.k.a container) for which the token is being generated.\n\t * Generated by the service.\n\t */\n\tdocumentId: string;\n\n\t/**\n\t * Identifies the permissions required by the client on the document or summary.\n\t * For every scope, you can define the permissions you want to give to the client.\n\t */\n\tscopes: string[];\n\n\t/**\n\t * Unique tenant identifier.\n\t */\n\ttenantId: string;\n\n\t/**\n\t * User for whom the token was created.\n\t */\n\tuser: IUser;\n\n\t/**\n\t * \"Issued At\"\n\t * Indicates when the authentication for this token occurred.\n\t * Expressed in {@link https://en.wikipedia.org/wiki/Unix_time | Unix Time}.\n\t *\n\t * See {@link https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.6}\n\t */\n\tiat: number;\n\n\t/**\n\t * \"Expiration Time\"\n\t * Identifies the expiration time on or after which the token must not be accepted for processing.\n\t * Expressed in {@link https://en.wikipedia.org/wiki/Unix_time | Unix Time}.\n\t *\n\t * See {@link https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.4}\n\t */\n\texp: number;\n\n\t/**\n\t * \"Version\"\n\t * Version of the access token.\n\t */\n\tver: string;\n\n\t/**\n\t * \"JWT ID\"\n\t * A unique identifier for the token.\n\t *\n\t * See {@link https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.7}\n\t */\n\tjti?: string;\n}\n"]}
|