@fluidframework/runtime-definitions 2.0.0-dev.7.4.0.217884 → 2.0.0-dev.7.4.0.221926

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/api-extractor.json +0 -3
  3. package/api-report/runtime-definitions.api.md +29 -62
  4. package/dist/attribution.d.ts +4 -4
  5. package/dist/attribution.js.map +1 -1
  6. package/dist/dataStoreContext.d.ts +1 -1
  7. package/dist/dataStoreContext.d.ts.map +1 -1
  8. package/dist/dataStoreContext.js.map +1 -1
  9. package/dist/index.d.ts +49 -1
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +11 -2
  12. package/dist/index.js.map +1 -1
  13. package/dist/runtime-definitions-alpha.d.ts +73 -203
  14. package/dist/runtime-definitions-beta.d.ts +31 -0
  15. package/dist/runtime-definitions-public.d.ts +31 -0
  16. package/dist/runtime-definitions-untrimmed.d.ts +29 -211
  17. package/lib/runtime-definitions-alpha.d.ts +73 -203
  18. package/lib/runtime-definitions-beta.d.ts +31 -0
  19. package/lib/runtime-definitions-public.d.ts +31 -0
  20. package/lib/runtime-definitions-untrimmed.d.ts +29 -211
  21. package/package.json +7 -4
  22. package/src/attribution.ts +4 -4
  23. package/src/dataStoreContext.ts +1 -1
  24. package/src/index.ts +46 -6
  25. package/dist/id-compressor/idCompressor.d.ts +0 -139
  26. package/dist/id-compressor/idCompressor.d.ts.map +0 -1
  27. package/dist/id-compressor/idCompressor.js +0 -7
  28. package/dist/id-compressor/idCompressor.js.map +0 -1
  29. package/dist/id-compressor/identifiers.d.ts +0 -40
  30. package/dist/id-compressor/identifiers.d.ts.map +0 -1
  31. package/dist/id-compressor/identifiers.js +0 -7
  32. package/dist/id-compressor/identifiers.js.map +0 -1
  33. package/dist/id-compressor/index.d.ts +0 -8
  34. package/dist/id-compressor/index.d.ts.map +0 -1
  35. package/dist/id-compressor/index.js +0 -10
  36. package/dist/id-compressor/index.js.map +0 -1
  37. package/dist/id-compressor/persisted-types/0.0.1.d.ts +0 -46
  38. package/dist/id-compressor/persisted-types/0.0.1.d.ts.map +0 -1
  39. package/dist/id-compressor/persisted-types/0.0.1.js +0 -14
  40. package/dist/id-compressor/persisted-types/0.0.1.js.map +0 -1
  41. package/dist/id-compressor/persisted-types/index.d.ts +0 -6
  42. package/dist/id-compressor/persisted-types/index.d.ts.map +0 -1
  43. package/dist/id-compressor/persisted-types/index.js +0 -10
  44. package/dist/id-compressor/persisted-types/index.js.map +0 -1
  45. package/src/id-compressor/idCompressor.ts +0 -155
  46. package/src/id-compressor/identifiers.ts +0 -39
  47. package/src/id-compressor/index.ts +0 -16
  48. package/src/id-compressor/persisted-types/0.0.1.ts +0 -51
  49. package/src/id-compressor/persisted-types/README.md +0 -3
  50. package/src/id-compressor/persisted-types/index.ts +0 -12
@@ -1,13 +1,42 @@
1
+ import { AttachState } from '@fluidframework/container-definitions';
2
+ import { FluidObject } from '@fluidframework/core-interfaces';
3
+ import { IAudience } from '@fluidframework/container-definitions';
1
4
  import { IClientDetails } from '@fluidframework/protocol-definitions';
5
+ import { IdCompressor } from '@fluidframework/id-compressor';
6
+ import { IdCreationRange } from '@fluidframework/id-compressor';
7
+ import { IDeltaManager } from '@fluidframework/container-definitions';
8
+ import { IDisposable } from '@fluidframework/core-interfaces';
2
9
  import { IDocumentMessage } from '@fluidframework/protocol-definitions';
10
+ import { IDocumentStorageService } from '@fluidframework/driver-definitions';
11
+ import { IEvent } from '@fluidframework/core-interfaces';
12
+ import { IEventProvider } from '@fluidframework/core-interfaces';
13
+ import { IFluidHandle } from '@fluidframework/core-interfaces';
14
+ import { IFluidHandleContext } from '@fluidframework/core-interfaces';
15
+ import { IFluidRouter } from '@fluidframework/core-interfaces';
16
+ import { IIdCompressor } from '@fluidframework/id-compressor';
17
+ import { IIdCompressorCore } from '@fluidframework/id-compressor';
18
+ import { ILoaderOptions } from '@fluidframework/container-definitions';
19
+ import { initialClusterCapacity } from '@fluidframework/id-compressor';
20
+ import { IProvideFluidHandleContext } from '@fluidframework/core-interfaces';
3
21
  import { IQuorumClients } from '@fluidframework/protocol-definitions';
22
+ import { IRequest } from '@fluidframework/core-interfaces';
23
+ import { IResponse } from '@fluidframework/core-interfaces';
4
24
  import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
5
25
  import { ISignalMessage } from '@fluidframework/protocol-definitions';
6
26
  import { ISnapshotTree } from '@fluidframework/protocol-definitions';
7
27
  import { ISummaryTree } from '@fluidframework/protocol-definitions';
28
+ import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
8
29
  import { ITree } from '@fluidframework/protocol-definitions';
9
30
  import type { IUser } from '@fluidframework/protocol-definitions';
31
+ import { OpSpaceCompressedId } from '@fluidframework/id-compressor';
32
+ import { SerializedIdCompressor } from '@fluidframework/id-compressor';
33
+ import { SerializedIdCompressorWithNoSession } from '@fluidframework/id-compressor';
34
+ import { SerializedIdCompressorWithOngoingSession } from '@fluidframework/id-compressor';
35
+ import { SessionId } from '@fluidframework/id-compressor';
36
+ import { SessionSpaceCompressedId } from '@fluidframework/id-compressor';
37
+ import { StableId } from '@fluidframework/id-compressor';
10
38
  import { SummaryTree } from '@fluidframework/protocol-definitions';
39
+ import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
11
40
 
12
41
  /* Excluded from this release type: AliasResult */
13
42
 
@@ -55,6 +84,8 @@ import { SummaryTree } from '@fluidframework/protocol-definitions';
55
84
 
56
85
  /* Excluded from this release type: IDataStore */
57
86
 
87
+ /* Excluded from this release type: IdCompressor */
88
+
58
89
  /* Excluded from this release type: IdCreationRange */
59
90
 
60
91
  /* Excluded from this release type: IDeltaManager */
@@ -1,13 +1,42 @@
1
+ import { AttachState } from '@fluidframework/container-definitions';
2
+ import { FluidObject } from '@fluidframework/core-interfaces';
3
+ import { IAudience } from '@fluidframework/container-definitions';
1
4
  import { IClientDetails } from '@fluidframework/protocol-definitions';
5
+ import { IdCompressor } from '@fluidframework/id-compressor';
6
+ import { IdCreationRange } from '@fluidframework/id-compressor';
7
+ import { IDeltaManager } from '@fluidframework/container-definitions';
8
+ import { IDisposable } from '@fluidframework/core-interfaces';
2
9
  import { IDocumentMessage } from '@fluidframework/protocol-definitions';
10
+ import { IDocumentStorageService } from '@fluidframework/driver-definitions';
11
+ import { IEvent } from '@fluidframework/core-interfaces';
12
+ import { IEventProvider } from '@fluidframework/core-interfaces';
13
+ import { IFluidHandle } from '@fluidframework/core-interfaces';
14
+ import { IFluidHandleContext } from '@fluidframework/core-interfaces';
15
+ import { IFluidRouter } from '@fluidframework/core-interfaces';
16
+ import { IIdCompressor } from '@fluidframework/id-compressor';
17
+ import { IIdCompressorCore } from '@fluidframework/id-compressor';
18
+ import { ILoaderOptions } from '@fluidframework/container-definitions';
19
+ import { initialClusterCapacity } from '@fluidframework/id-compressor';
20
+ import { IProvideFluidHandleContext } from '@fluidframework/core-interfaces';
3
21
  import { IQuorumClients } from '@fluidframework/protocol-definitions';
22
+ import { IRequest } from '@fluidframework/core-interfaces';
23
+ import { IResponse } from '@fluidframework/core-interfaces';
4
24
  import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
5
25
  import { ISignalMessage } from '@fluidframework/protocol-definitions';
6
26
  import { ISnapshotTree } from '@fluidframework/protocol-definitions';
7
27
  import { ISummaryTree } from '@fluidframework/protocol-definitions';
28
+ import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
8
29
  import { ITree } from '@fluidframework/protocol-definitions';
9
30
  import type { IUser } from '@fluidframework/protocol-definitions';
31
+ import { OpSpaceCompressedId } from '@fluidframework/id-compressor';
32
+ import { SerializedIdCompressor } from '@fluidframework/id-compressor';
33
+ import { SerializedIdCompressorWithNoSession } from '@fluidframework/id-compressor';
34
+ import { SerializedIdCompressorWithOngoingSession } from '@fluidframework/id-compressor';
35
+ import { SessionId } from '@fluidframework/id-compressor';
36
+ import { SessionSpaceCompressedId } from '@fluidframework/id-compressor';
37
+ import { StableId } from '@fluidframework/id-compressor';
10
38
  import { SummaryTree } from '@fluidframework/protocol-definitions';
39
+ import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
11
40
 
12
41
  /* Excluded from this release type: AliasResult */
13
42
 
@@ -55,6 +84,8 @@ import { SummaryTree } from '@fluidframework/protocol-definitions';
55
84
 
56
85
  /* Excluded from this release type: IDataStore */
57
86
 
87
+ /* Excluded from this release type: IdCompressor */
88
+
58
89
  /* Excluded from this release type: IdCreationRange */
59
90
 
60
91
  /* Excluded from this release type: IDeltaManager */
@@ -2,6 +2,8 @@ import { AttachState } from '@fluidframework/container-definitions';
2
2
  import { FluidObject } from '@fluidframework/core-interfaces';
3
3
  import { IAudience } from '@fluidframework/container-definitions';
4
4
  import { IClientDetails } from '@fluidframework/protocol-definitions';
5
+ import { IdCompressor } from '@fluidframework/id-compressor';
6
+ import { IdCreationRange } from '@fluidframework/id-compressor';
5
7
  import { IDeltaManager } from '@fluidframework/container-definitions';
6
8
  import { IDisposable } from '@fluidframework/core-interfaces';
7
9
  import { IDocumentMessage } from '@fluidframework/protocol-definitions';
@@ -11,7 +13,10 @@ import { IEventProvider } from '@fluidframework/core-interfaces';
11
13
  import { IFluidHandle } from '@fluidframework/core-interfaces';
12
14
  import { IFluidHandleContext } from '@fluidframework/core-interfaces';
13
15
  import { IFluidRouter } from '@fluidframework/core-interfaces';
16
+ import { IIdCompressor } from '@fluidframework/id-compressor';
17
+ import { IIdCompressorCore } from '@fluidframework/id-compressor';
14
18
  import { ILoaderOptions } from '@fluidframework/container-definitions';
19
+ import { initialClusterCapacity } from '@fluidframework/id-compressor';
15
20
  import { IProvideFluidHandleContext } from '@fluidframework/core-interfaces';
16
21
  import { IQuorumClients } from '@fluidframework/protocol-definitions';
17
22
  import { IRequest } from '@fluidframework/core-interfaces';
@@ -23,6 +28,13 @@ import { ISummaryTree } from '@fluidframework/protocol-definitions';
23
28
  import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
24
29
  import { ITree } from '@fluidframework/protocol-definitions';
25
30
  import type { IUser } from '@fluidframework/protocol-definitions';
31
+ import { OpSpaceCompressedId } from '@fluidframework/id-compressor';
32
+ import { SerializedIdCompressor } from '@fluidframework/id-compressor';
33
+ import { SerializedIdCompressorWithNoSession } from '@fluidframework/id-compressor';
34
+ import { SerializedIdCompressorWithOngoingSession } from '@fluidframework/id-compressor';
35
+ import { SessionId } from '@fluidframework/id-compressor';
36
+ import { SessionSpaceCompressedId } from '@fluidframework/id-compressor';
37
+ import { StableId } from '@fluidframework/id-compressor';
26
38
  import { SummaryTree } from '@fluidframework/protocol-definitions';
27
39
  import { TelemetryEventPropertyType } from '@fluidframework/core-interfaces';
28
40
 
@@ -55,7 +67,7 @@ export declare interface AttributionInfo {
55
67
 
56
68
  /**
57
69
  * Can be indexed into the ContainerRuntime in order to retrieve {@link AttributionInfo}.
58
- * @internal
70
+ * @alpha
59
71
  */
60
72
  export declare type AttributionKey = OpAttributionKey | DetachedAttributionKey | LocalAttributionKey;
61
73
 
@@ -107,7 +119,7 @@ export declare enum CreateSummarizerNodeSource {
107
119
  * is currently unsupported, as applications can effectively modify content anonymously while detached.
108
120
  * The runtime has no mechanism for reliably obtaining the user. It would be reasonable to start supporting
109
121
  * this functionality if the host provided additional context to their attributor or attach calls.
110
- * @internal
122
+ * @alpha
111
123
  */
112
124
  export declare interface DetachedAttributionKey {
113
125
  type: "detached";
@@ -341,19 +353,9 @@ export declare interface IDataStore {
341
353
  readonly IFluidRouter: IFluidRouter;
342
354
  }
343
355
 
344
- /**
345
- * Data describing a range of session-local IDs (from a remote or local session).
346
- *
347
- * A range is composed of local IDs that were generated.
348
- * @alpha
349
- */
350
- export declare interface IdCreationRange {
351
- readonly sessionId: SessionId;
352
- readonly ids?: {
353
- readonly firstGenCount: number;
354
- readonly count: number;
355
- };
356
- }
356
+ export { IdCompressor }
357
+
358
+ export { IdCreationRange }
357
359
 
358
360
  /**
359
361
  * An envelope wraps the contents with the intended target
@@ -689,139 +691,9 @@ export declare interface IGarbageCollectionDetailsBase {
689
691
  gcData?: IGarbageCollectionData;
690
692
  }
691
693
 
692
- /**
693
- * A distributed UUID generator and compressor.
694
- *
695
- * Generates arbitrary non-colliding v4 UUIDs, called stable IDs, for multiple "sessions" (which can be distributed across the network),
696
- * providing each session with the ability to map these UUIDs to `numbers`.
697
- *
698
- * A session is a unique identifier that denotes a single compressor. New IDs are created through a single compressor API
699
- * which should then sent in ranges to the server for total ordering (and are subsequently relayed to other clients). When a new ID is
700
- * created it is said to be created by the compressor's "local" session.
701
- *
702
- * For each stable ID created, two numeric IDs are provided by the compressor:
703
- *
704
- * 1. A session-local ID, which is stable for the lifetime of the session (which could be longer than that of the compressor object, as it may
705
- * be serialized for offline usage). Available as soon as the stable ID is allocated. These IDs are session-unique and are thus only
706
- * safely usable within the scope of the compressor that created it.
707
- *
708
- * 2. A final ID, which is stable across serialization and deserialization of an IdCompressor. Available as soon as the range containing
709
- * the corresponding session-local ID is totally ordered (via consensus) with respect to other sessions' allocations.
710
- * Final IDs are known to and publicly usable by any compressor that has received them.
711
- *
712
- * Compressors will allocate UUIDs in non-random ways to reduce entropy allowing for optimized storage of the data needed
713
- * to map the UUIDs to the numbers.
714
- *
715
- * The following invariants are upheld by IdCompressor:
716
- *
717
- * 1. Session-local IDs will always decompress to the same UUIDs for the lifetime of the session.
718
- *
719
- * 2. Final IDs will always decompress to the same UUIDs.
720
- *
721
- * 3. After a server-processed range of session-local IDs (from any session) is received by a compressor, any of those session-local IDs may be
722
- * translated by the compressor into the corresponding final ID. For any given session-local ID, this translation will always yield the
723
- * same final ID.
724
- *
725
- * 4. A UUID will always compress into the same session-local ID for the lifetime of the session.
726
- *
727
- * Session-local IDs are sent across the wire in efficiently-represented ranges. These ranges are created by querying the compressor, and *must*
728
- * be ordered (i.e. sent to the server) in the order they are created in order to preserve the above invariants.
729
- *
730
- * Session-local IDs can be used immediately after creation, but will eventually (after being sequenced) have a corresponding final ID. This
731
- * could make reasoning about equality of those two forms difficult. For example, if a cache is keyed off of a
732
- * session-local ID but is later queried using the final ID (which is semantically equal, as it decompresses to the same UUID/string) it will
733
- * produce a cache miss. In order to make using collections of both remotely created and locally created IDs easy, regardless of whether the
734
- * session-local IDs have been finalized, the compressor defines two "spaces" of IDs:
735
- *
736
- * 1. Session space: in this space, all IDs are normalized to their "most local form". This means that all IDs created by the local session
737
- * will be in local form, regardless of if they have been finalized. Remotely created IDs, which could only have been received after
738
- * finalizing and will never have a local form for the compressor, will of course be final IDs. This space should be used with consumer APIs
739
- * and data structures, as the lifetime of the IDs is guaranteed to be the same as the compressor object. Care must be taken to not use
740
- * these IDs across compressor objects, as the local IDs are specific to the compressor that created them.
741
- *
742
- * 2. Op space: in this space, all IDs are normalized to their "most final form". This means that all IDs except session-local IDs that
743
- * have not yet been finalized will be in final ID form. This space is useful for serialization in ops (e.g. references), as other clients
744
- * that receive them need not do any work to normalize them to *their* session-space in the common case. Note that IDs in op space may move
745
- * out of Op space over time, namely, when a session-local ID in this space becomes finalized, and thereafter has a "more final form".
746
- * Consequentially, it may be useful to restrict parameters of a persisted type to this space (to optimize perf), but it is potentially
747
- * incorrect to use this type for a runtime variable. This is an asymmetry that does not affect session space, as local IDs are always as
748
- * "local as possible".
749
- *
750
- * These two spaces naturally define a rule: consumers of compressed IDs should use session-space IDs, but serialized forms such as ops
751
- * should use op-space IDs.
752
- * @alpha
753
- */
754
- export declare interface IIdCompressor {
755
- localSessionId: SessionId;
756
- /**
757
- * Generates a new compressed ID or returns an existing one.
758
- * This should ONLY be called to generate IDs for local operations.
759
- * @returns A new local ID in session space.
760
- */
761
- generateCompressedId(): SessionSpaceCompressedId;
762
- /**
763
- * Normalizes a session space ID into op space.
764
- * @param id - the local ID to normalize.
765
- * @returns the ID in op space.
766
- */
767
- normalizeToOpSpace(id: SessionSpaceCompressedId): OpSpaceCompressedId;
768
- /**
769
- * Normalizes an ID into session space.
770
- * @param id - the ID to normalize. If it is a local ID, it is assumed to have been created by the session corresponding
771
- * to `sessionId`.
772
- * @param originSessionId - the session from which `id` originated
773
- * @returns the session-space ID corresponding to `id`, which might not have been a final ID if the client that created it had not yet
774
- * finalized it. This can occur when a client references an ID during the window of time in which it is waiting to receive the ordered
775
- * range that contained it from the server.
776
- */
777
- normalizeToSessionSpace(id: OpSpaceCompressedId, originSessionId: SessionId): SessionSpaceCompressedId;
778
- /**
779
- * Decompresses a previously compressed ID into a UUID.
780
- * @param id - the compressed ID to be decompressed.
781
- * @returns the UUID associated with the compressed ID. Fails if the ID was not generated by this compressor.
782
- */
783
- decompress(id: SessionSpaceCompressedId): StableId;
784
- /**
785
- * Recompresses a UUID.
786
- * @param uncompressed - the UUID to recompress.
787
- * @returns the `CompressedId` associated with `uncompressed`. Fails if it has not been previously compressed by this compressor.
788
- */
789
- recompress(uncompressed: StableId): SessionSpaceCompressedId;
790
- /**
791
- * Attempts to recompresses a UUID.
792
- * @param uncompressed - the UUID to recompress,
793
- * @returns the `CompressedId` associated with `uncompressed` or undefined if it has not been previously compressed by this compressor.
794
- */
795
- tryRecompress(uncompressed: StableId): SessionSpaceCompressedId | undefined;
796
- }
694
+ export { IIdCompressor }
797
695
 
798
- /**
799
- * @alpha
800
- */
801
- export declare interface IIdCompressorCore {
802
- /**
803
- * Returns a range of IDs created by this session in a format for sending to the server for finalizing.
804
- * The range will include all IDs generated via calls to `generateCompressedId` since the last time this method was called.
805
- * @returns the range of IDs, which may be empty. This range must be sent to the server for ordering before
806
- * it is finalized. Ranges must be sent to the server in the order that they are taken via calls to this method.
807
- */
808
- takeNextCreationRange(): IdCreationRange;
809
- /**
810
- * Finalizes the supplied range of IDs (which may be from either a remote or local session).
811
- * @param range - the range of session-local IDs to finalize.
812
- */
813
- finalizeCreationRange(range: IdCreationRange): void;
814
- /**
815
- * Returns a persistable form of the current state of this `IdCompressor` which can be rehydrated via `IdCompressor.deserialize()`.
816
- * This includes finalized state as well as un-finalized state and is therefore suitable for use in offline scenarios.
817
- */
818
- serialize(withSession: true): SerializedIdCompressorWithOngoingSession;
819
- /**
820
- * Returns a persistable form of the current state of this `IdCompressor` which can be rehydrated via `IdCompressor.deserialize()`.
821
- * This only includes finalized state and is therefore suitable for use in summaries.
822
- */
823
- serialize(withSession: false): SerializedIdCompressorWithNoSession;
824
- }
696
+ export { IIdCompressorCore }
825
697
 
826
698
  /**
827
699
  * Represents ISignalMessage with its type.
@@ -842,12 +714,7 @@ export declare type InboundAttachMessage = Omit<IAttachMessage, "snapshot"> & {
842
714
  snapshot: IAttachMessage["snapshot"] | null;
843
715
  };
844
716
 
845
- /**
846
- * Roughly equates to a minimum of 1M sessions before we start allocating 64 bit IDs.
847
- * This value must *NOT* change without careful consideration to compatibility.
848
- * @internal
849
- */
850
- export declare const initialClusterCapacity = 512;
717
+ export { initialClusterCapacity }
851
718
 
852
719
  /**
853
720
  * @alpha
@@ -1152,7 +1019,7 @@ export declare interface ITelemetryContext {
1152
1019
 
1153
1020
  /**
1154
1021
  * AttributionKey associated with content that has been made locally but not yet acked by the server.
1155
- * @internal
1022
+ * @alpha
1156
1023
  */
1157
1024
  export declare interface LocalAttributionKey {
1158
1025
  type: "local";
@@ -1174,7 +1041,7 @@ export declare type NamedFluidDataStoreRegistryEntry = [string, Promise<FluidDat
1174
1041
  /**
1175
1042
  * AttributionKey representing a reference to some op in the op stream.
1176
1043
  * Content associated with this key aligns with content modified by that op.
1177
- * @internal
1044
+ * @alpha
1178
1045
  */
1179
1046
  export declare interface OpAttributionKey {
1180
1047
  /**
@@ -1190,68 +1057,19 @@ export declare interface OpAttributionKey {
1190
1057
  seq: number;
1191
1058
  }
1192
1059
 
1193
- /**
1194
- * A compressed ID that has been normalized into "op space".
1195
- * Serialized/persisted structures (e.g. ops) should use op-space IDs as a performance optimization, as they require less normalizing when
1196
- * received by a remote client due to the fact that op space for a given compressor is session space for all other compressors.
1197
- * @alpha
1198
- */
1199
- export declare type OpSpaceCompressedId = number & {
1200
- readonly OpNormalized: "9209432d-a959-4df7-b2ad-767ead4dbcae";
1201
- };
1060
+ export { OpSpaceCompressedId }
1202
1061
 
1203
- /**
1204
- * The serialized contents of an IdCompressor, suitable for persistence in a summary.
1205
- * @alpha
1206
- */
1207
- export declare type SerializedIdCompressor = string & {
1208
- readonly _serializedIdCompressor: "8c73c57c-1cf4-4278-8915-6444cb4f6af5";
1209
- };
1062
+ export { SerializedIdCompressor }
1210
1063
 
1211
- /**
1212
- * The serialized contents of an IdCompressor, suitable for persistence in a summary.
1213
- * @alpha
1214
- */
1215
- export declare type SerializedIdCompressorWithNoSession = SerializedIdCompressor & {
1216
- readonly _noLocalState: "3aa2e1e8-cc28-4ea7-bc1a-a11dc3f26dfb";
1217
- };
1064
+ export { SerializedIdCompressorWithNoSession }
1218
1065
 
1219
- /**
1220
- * The serialized contents of an IdCompressor, suitable for persistence in a summary.
1221
- * @alpha
1222
- */
1223
- export declare type SerializedIdCompressorWithOngoingSession = SerializedIdCompressor & {
1224
- readonly _hasLocalState: "1281acae-6d14-47e7-bc92-71c8ee0819cb";
1225
- };
1066
+ export { SerializedIdCompressorWithOngoingSession }
1226
1067
 
1227
- /**
1228
- * A StableId which is suitable for use as a session identifier
1229
- * @alpha
1230
- */
1231
- export declare type SessionId = StableId & {
1232
- readonly SessionId: "4498f850-e14e-4be9-8db0-89ec00997e58";
1233
- };
1068
+ export { SessionId }
1234
1069
 
1235
- /**
1236
- * A compressed ID that has been normalized into "session space" (see `IdCompressor` for more).
1237
- * Consumer-facing APIs and data structures should use session-space IDs as their lifetime and equality is stable and tied to
1238
- * the scope of the session (i.e. compressor) that produced them.
1239
- * @alpha
1240
- */
1241
- export declare type SessionSpaceCompressedId = number & {
1242
- readonly SessionUnique: "cea55054-6b82-4cbf-ad19-1fa645ea3b3e";
1243
- };
1070
+ export { SessionSpaceCompressedId }
1244
1071
 
1245
- /**
1246
- * A version 4, variant 1 uuid (https://datatracker.ietf.org/doc/html/rfc4122).
1247
- * A 128-bit Universally Unique IDentifier. Represented here
1248
- * with a string of the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,
1249
- * where x is a lowercase hex digit.
1250
- * @alpha
1251
- */
1252
- export declare type StableId = string & {
1253
- readonly StableId: "53172b0d-a3d5-41ea-bd75-b43839c97f5a";
1254
- };
1072
+ export { StableId }
1255
1073
 
1256
1074
  /**
1257
1075
  * @alpha
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/runtime-definitions",
3
- "version": "2.0.0-dev.7.4.0.217884",
3
+ "version": "2.0.0-dev.7.4.0.221926",
4
4
  "description": "Fluid Runtime definitions",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -14,12 +14,14 @@
14
14
  "main": "dist/index.js",
15
15
  "types": "dist/index.d.ts",
16
16
  "dependencies": {
17
- "@fluidframework/container-definitions": "2.0.0-dev.7.4.0.217884",
18
- "@fluidframework/core-interfaces": "2.0.0-dev.7.4.0.217884",
19
- "@fluidframework/driver-definitions": "2.0.0-dev.7.4.0.217884",
17
+ "@fluidframework/container-definitions": "2.0.0-dev.7.4.0.221926",
18
+ "@fluidframework/core-interfaces": "2.0.0-dev.7.4.0.221926",
19
+ "@fluidframework/driver-definitions": "2.0.0-dev.7.4.0.221926",
20
+ "@fluidframework/id-compressor": "2.0.0-dev.7.4.0.221926",
20
21
  "@fluidframework/protocol-definitions": "^3.0.0"
21
22
  },
22
23
  "devDependencies": {
24
+ "@arethetypeswrong/cli": "^0.13.3",
23
25
  "@fluid-tools/build-cli": "^0.28.0",
24
26
  "@fluidframework/build-common": "^2.0.3",
25
27
  "@fluidframework/build-tools": "^0.28.0",
@@ -65,6 +67,7 @@
65
67
  "build:compile": "fluid-build . --task compile",
66
68
  "build:docs": "fluid-build . --task api",
67
69
  "build:test": "tsc --project ./src/test/tsconfig.json",
70
+ "check:are-the-types-wrong": "attw --pack",
68
71
  "check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
69
72
  "ci:build:docs": "api-extractor run",
70
73
  "clean": "rimraf --glob dist \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp",
@@ -8,7 +8,7 @@ import type { IUser } from "@fluidframework/protocol-definitions";
8
8
  /**
9
9
  * AttributionKey representing a reference to some op in the op stream.
10
10
  * Content associated with this key aligns with content modified by that op.
11
- * @internal
11
+ * @alpha
12
12
  */
13
13
  export interface OpAttributionKey {
14
14
  /**
@@ -32,7 +32,7 @@ export interface OpAttributionKey {
32
32
  * is currently unsupported, as applications can effectively modify content anonymously while detached.
33
33
  * The runtime has no mechanism for reliably obtaining the user. It would be reasonable to start supporting
34
34
  * this functionality if the host provided additional context to their attributor or attach calls.
35
- * @internal
35
+ * @alpha
36
36
  */
37
37
  export interface DetachedAttributionKey {
38
38
  type: "detached";
@@ -50,7 +50,7 @@ export interface DetachedAttributionKey {
50
50
 
51
51
  /**
52
52
  * AttributionKey associated with content that has been made locally but not yet acked by the server.
53
- * @internal
53
+ * @alpha
54
54
  */
55
55
  export interface LocalAttributionKey {
56
56
  type: "local";
@@ -58,7 +58,7 @@ export interface LocalAttributionKey {
58
58
 
59
59
  /**
60
60
  * Can be indexed into the ContainerRuntime in order to retrieve {@link AttributionInfo}.
61
- * @internal
61
+ * @alpha
62
62
  */
63
63
  export type AttributionKey = OpAttributionKey | DetachedAttributionKey | LocalAttributionKey;
64
64
 
@@ -31,6 +31,7 @@ import {
31
31
  ISequencedDocumentMessage,
32
32
  ISnapshotTree,
33
33
  } from "@fluidframework/protocol-definitions";
34
+ import { IIdCompressor } from "@fluidframework/id-compressor";
34
35
  import { IProvideFluidDataStoreFactory } from "./dataStoreFactory";
35
36
  import { IProvideFluidDataStoreRegistry } from "./dataStoreRegistry";
36
37
  import { IGarbageCollectionData, IGarbageCollectionDetailsBase } from "./garbageCollection";
@@ -42,7 +43,6 @@ import {
42
43
  ITelemetryContext,
43
44
  SummarizeInternalFn,
44
45
  } from "./summary";
45
- import { IIdCompressor } from "./id-compressor";
46
46
 
47
47
  /**
48
48
  * Runtime flush mode handling
package/src/index.ts CHANGED
@@ -65,16 +65,56 @@ export {
65
65
  SummarizeInternalFn,
66
66
  totalBlobSizePropertyName,
67
67
  } from "./summary";
68
+
69
+ // Re-exports for backwards compatibility.
70
+ // Will be removed in the future.
68
71
  export {
69
- IIdCompressorCore,
72
+ /**
73
+ * @deprecated Import from `@fluidframework/id-compressor` instead.
74
+ */
75
+ IdCompressor,
76
+ /**
77
+ * @deprecated Import from `@fluidframework/id-compressor` instead.
78
+ */
70
79
  IIdCompressor,
80
+ /**
81
+ * @deprecated Import from `@fluidframework/id-compressor` instead.
82
+ */
83
+ IIdCompressorCore,
84
+ /**
85
+ * @deprecated Import from `@fluidframework/id-compressor` instead.
86
+ */
87
+ IdCreationRange,
88
+ /**
89
+ * @deprecated Import from `@fluidframework/id-compressor` instead.
90
+ */
91
+ OpSpaceCompressedId,
92
+ /**
93
+ * @deprecated Import from `@fluidframework/id-compressor` instead.
94
+ */
71
95
  SerializedIdCompressor,
72
- SerializedIdCompressorWithOngoingSession,
96
+ /**
97
+ * @deprecated Import from `@fluidframework/id-compressor` instead.
98
+ */
73
99
  SerializedIdCompressorWithNoSession,
74
- SessionSpaceCompressedId,
75
- OpSpaceCompressedId,
100
+ /**
101
+ * @deprecated Import from `@fluidframework/id-compressor` instead.
102
+ */
103
+ SerializedIdCompressorWithOngoingSession,
104
+ /**
105
+ * @deprecated Import from `@fluidframework/id-compressor` instead.
106
+ */
76
107
  SessionId,
108
+ /**
109
+ * @deprecated Import from `@fluidframework/id-compressor` instead.
110
+ */
111
+ SessionSpaceCompressedId,
112
+ /**
113
+ * @deprecated Import from `@fluidframework/id-compressor` instead.
114
+ */
77
115
  StableId,
78
- IdCreationRange,
116
+ /**
117
+ * @deprecated Import from `@fluidframework/id-compressor` instead.
118
+ */
79
119
  initialClusterCapacity,
80
- } from "./id-compressor";
120
+ } from "@fluidframework/id-compressor";