@fluidframework/datastore-definitions 2.0.0-internal.7.1.0 → 2.0.0-internal.7.2.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/datastore-definitions.api.md +1 -1
- package/dist/dataStoreRuntime.d.ts +4 -3
- package/dist/dataStoreRuntime.d.ts.map +1 -1
- package/dist/dataStoreRuntime.js.map +1 -1
- package/package.json +9 -10
- package/src/dataStoreRuntime.ts +4 -3
- package/dist/datastore-definitions-alpha.d.ts +0 -445
- package/dist/datastore-definitions-beta.d.ts +0 -445
- package/dist/datastore-definitions-public.d.ts +0 -445
- package/dist/datastore-definitions.d.ts +0 -445
package/CHANGELOG.md
CHANGED
|
@@ -127,7 +127,7 @@ export interface IFluidDataStoreRuntime extends IEventProvider<IFluidDataStoreRu
|
|
|
127
127
|
request(request: IRequest): Promise<IResponse>;
|
|
128
128
|
// (undocumented)
|
|
129
129
|
readonly rootRoutingContext: IFluidHandleContext;
|
|
130
|
-
submitSignal(type: string, content: any): void;
|
|
130
|
+
submitSignal(type: string, content: any, targetClientId?: string): void;
|
|
131
131
|
uploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;
|
|
132
132
|
waitAttached(): Promise<void>;
|
|
133
133
|
}
|
|
@@ -65,8 +65,9 @@ export interface IFluidDataStoreRuntime extends IEventProvider<IFluidDataStoreRu
|
|
|
65
65
|
* Submits the signal to be sent to other clients.
|
|
66
66
|
* @param type - Type of the signal.
|
|
67
67
|
* @param content - Content of the signal.
|
|
68
|
+
* @param targetClientId - When specified, the signal is only sent to the provided client id.
|
|
68
69
|
*/
|
|
69
|
-
submitSignal(type: string, content: any): void;
|
|
70
|
+
submitSignal(type: string, content: any, targetClientId?: string): void;
|
|
70
71
|
/**
|
|
71
72
|
* Returns the current quorum.
|
|
72
73
|
*/
|
|
@@ -85,11 +86,11 @@ export interface IFluidDataStoreRuntime extends IEventProvider<IFluidDataStoreRu
|
|
|
85
86
|
*/
|
|
86
87
|
readonly entryPoint: IFluidHandle<FluidObject>;
|
|
87
88
|
/**
|
|
88
|
-
* @deprecated
|
|
89
|
+
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
89
90
|
*/
|
|
90
91
|
request(request: IRequest): Promise<IResponse>;
|
|
91
92
|
/**
|
|
92
|
-
* @deprecated
|
|
93
|
+
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
93
94
|
*/
|
|
94
95
|
readonly IFluidRouter: IFluidRouter;
|
|
95
96
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataStoreRuntime.d.ts","sourceRoot":"","sources":["../src/dataStoreRuntime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,MAAM,EACN,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,mBAAmB,EAEnB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,SAAS,EACT,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACN,SAAS,EACT,aAAa,EACb,WAAW,EACX,cAAc,EACd,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACN,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EACzB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACN,aAAa,EACb,qBAAqB,EACrB,8BAA8B,EAC9B,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,CAAC;AAE7B,MAAM,WAAW,4BAA6B,SAAQ,MAAM;IAC3D,CAAC,KAAK,EAAE,cAAc,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,EAAE,QAAQ,EAAE,MAAM,IAAI,OAAE;IACrF,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,OAA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,CAAC,CAAC;IAEhG;;;;;OAKG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAExE;;OAEG;IACH,SAAS,IAAI,cAAc,CAAC;IAE5B;;OAEG;IACH,WAAW,IAAI,SAAS,CAAC;IAEzB;;OAEG;IACH,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9B;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,YAAY,CAAC,WAAW,CAAC,CAAC;IAE/C;;OAEG;IACH,OAAO,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAE/C;;OAEG;IAEH,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;CACpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataStoreRuntime.js","sourceRoot":"","sources":["../src/dataStoreRuntime.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 {\n\tIEvent,\n\tIEventProvider,\n\tITelemetryLogger,\n\tIDisposable,\n\tIFluidHandleContext,\n\t// eslint-disable-next-line import/no-deprecated\n\tIFluidRouter,\n\tIFluidHandle,\n\tFluidObject,\n\tIRequest,\n\tIResponse,\n} from \"@fluidframework/core-interfaces\";\nimport {\n\tIAudience,\n\tIDeltaManager,\n\tAttachState,\n\tILoaderOptions,\n} from \"@fluidframework/container-definitions\";\nimport {\n\tIDocumentMessage,\n\tIQuorumClients,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/protocol-definitions\";\nimport {\n\tIIdCompressor,\n\tIInboundSignalMessage,\n\tIProvideFluidDataStoreRegistry,\n} from \"@fluidframework/runtime-definitions\";\nimport { IChannel } from \".\";\n\nexport interface IFluidDataStoreRuntimeEvents extends IEvent {\n\t(event: \"disconnected\" | \"dispose\" | \"attaching\" | \"attached\", listener: () => void);\n\t(event: \"op\", listener: (message: ISequencedDocumentMessage) => void);\n\t(event: \"signal\", listener: (message: IInboundSignalMessage, local: boolean) => void);\n\t(event: \"connected\", listener: (clientId: string) => void);\n}\n\n/**\n * Represents the runtime for the data store. Contains helper functions/state of the data store.\n */\nexport interface IFluidDataStoreRuntime\n\textends IEventProvider<IFluidDataStoreRuntimeEvents>,\n\t\tIDisposable,\n\t\tPartial<IProvideFluidDataStoreRegistry> {\n\treadonly id: string;\n\n\treadonly IFluidHandleContext: IFluidHandleContext;\n\n\treadonly rootRoutingContext: IFluidHandleContext;\n\treadonly channelsRoutingContext: IFluidHandleContext;\n\treadonly objectsRoutingContext: IFluidHandleContext;\n\n\treadonly options: ILoaderOptions;\n\n\treadonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\n\treadonly clientId: string | undefined;\n\n\treadonly connected: boolean;\n\n\treadonly logger: ITelemetryLogger;\n\n\t/**\n\t * Indicates the attachment state of the data store to a host service.\n\t */\n\treadonly attachState: AttachState;\n\n\treadonly idCompressor?: IIdCompressor;\n\n\t/**\n\t * Returns the channel with the given id\n\t */\n\tgetChannel(id: string): Promise<IChannel>;\n\n\t/**\n\t * Invokes the given callback and expects that no ops are submitted\n\t * until execution finishes. If an op is submitted, an error will be raised.\n\t *\n\t * Can be disabled by feature gate `Fluid.ContainerRuntime.DisableOpReentryCheck`\n\t *\n\t * @param callback - the callback to be invoked\n\t */\n\tensureNoDataModelChanges<T>(callback: () => T): T;\n\n\t/**\n\t * Creates a new channel of the given type.\n\t * @param id - ID of the channel to be created. A unique ID will be generated if left undefined.\n\t * @param type - Type of the channel.\n\t */\n\tcreateChannel(id: string | undefined, type: string): IChannel;\n\n\t/**\n\t * Bind the channel with the data store runtime. If the runtime\n\t * is attached then we attach the channel to make it live.\n\t */\n\tbindChannel(channel: IChannel): void;\n\n\t// Blob related calls\n\t/**\n\t * Api to upload a blob of data.\n\t * @param blob - blob to be uploaded.\n\t */\n\tuploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;\n\n\t/**\n\t * Submits the signal to be sent to other clients.\n\t * @param type - Type of the signal.\n\t * @param content - Content of the signal.\n\t */\n\tsubmitSignal(type: string, content: any): void;\n\n\t/**\n\t * Returns the current quorum.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Returns the current audience.\n\t */\n\tgetAudience(): IAudience;\n\n\t/**\n\t * Resolves when a local data store is attached.\n\t */\n\twaitAttached(): Promise<void>;\n\n\t/**\n\t * Exposes a handle to the root object / entryPoint of the data store. Use this as the primary way of interacting\n\t * with it.\n\t */\n\treadonly entryPoint: IFluidHandle<FluidObject>;\n\n\t/**\n\t * @deprecated
|
|
1
|
+
{"version":3,"file":"dataStoreRuntime.js","sourceRoot":"","sources":["../src/dataStoreRuntime.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 {\n\tIEvent,\n\tIEventProvider,\n\tITelemetryLogger,\n\tIDisposable,\n\tIFluidHandleContext,\n\t// eslint-disable-next-line import/no-deprecated\n\tIFluidRouter,\n\tIFluidHandle,\n\tFluidObject,\n\tIRequest,\n\tIResponse,\n} from \"@fluidframework/core-interfaces\";\nimport {\n\tIAudience,\n\tIDeltaManager,\n\tAttachState,\n\tILoaderOptions,\n} from \"@fluidframework/container-definitions\";\nimport {\n\tIDocumentMessage,\n\tIQuorumClients,\n\tISequencedDocumentMessage,\n} from \"@fluidframework/protocol-definitions\";\nimport {\n\tIIdCompressor,\n\tIInboundSignalMessage,\n\tIProvideFluidDataStoreRegistry,\n} from \"@fluidframework/runtime-definitions\";\nimport { IChannel } from \".\";\n\nexport interface IFluidDataStoreRuntimeEvents extends IEvent {\n\t(event: \"disconnected\" | \"dispose\" | \"attaching\" | \"attached\", listener: () => void);\n\t(event: \"op\", listener: (message: ISequencedDocumentMessage) => void);\n\t(event: \"signal\", listener: (message: IInboundSignalMessage, local: boolean) => void);\n\t(event: \"connected\", listener: (clientId: string) => void);\n}\n\n/**\n * Represents the runtime for the data store. Contains helper functions/state of the data store.\n */\nexport interface IFluidDataStoreRuntime\n\textends IEventProvider<IFluidDataStoreRuntimeEvents>,\n\t\tIDisposable,\n\t\tPartial<IProvideFluidDataStoreRegistry> {\n\treadonly id: string;\n\n\treadonly IFluidHandleContext: IFluidHandleContext;\n\n\treadonly rootRoutingContext: IFluidHandleContext;\n\treadonly channelsRoutingContext: IFluidHandleContext;\n\treadonly objectsRoutingContext: IFluidHandleContext;\n\n\treadonly options: ILoaderOptions;\n\n\treadonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;\n\n\treadonly clientId: string | undefined;\n\n\treadonly connected: boolean;\n\n\treadonly logger: ITelemetryLogger;\n\n\t/**\n\t * Indicates the attachment state of the data store to a host service.\n\t */\n\treadonly attachState: AttachState;\n\n\treadonly idCompressor?: IIdCompressor;\n\n\t/**\n\t * Returns the channel with the given id\n\t */\n\tgetChannel(id: string): Promise<IChannel>;\n\n\t/**\n\t * Invokes the given callback and expects that no ops are submitted\n\t * until execution finishes. If an op is submitted, an error will be raised.\n\t *\n\t * Can be disabled by feature gate `Fluid.ContainerRuntime.DisableOpReentryCheck`\n\t *\n\t * @param callback - the callback to be invoked\n\t */\n\tensureNoDataModelChanges<T>(callback: () => T): T;\n\n\t/**\n\t * Creates a new channel of the given type.\n\t * @param id - ID of the channel to be created. A unique ID will be generated if left undefined.\n\t * @param type - Type of the channel.\n\t */\n\tcreateChannel(id: string | undefined, type: string): IChannel;\n\n\t/**\n\t * Bind the channel with the data store runtime. If the runtime\n\t * is attached then we attach the channel to make it live.\n\t */\n\tbindChannel(channel: IChannel): void;\n\n\t// Blob related calls\n\t/**\n\t * Api to upload a blob of data.\n\t * @param blob - blob to be uploaded.\n\t */\n\tuploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;\n\n\t/**\n\t * Submits the signal to be sent to other clients.\n\t * @param type - Type of the signal.\n\t * @param content - Content of the signal.\n\t * @param targetClientId - When specified, the signal is only sent to the provided client id.\n\t */\n\tsubmitSignal(type: string, content: any, targetClientId?: string): void;\n\n\t/**\n\t * Returns the current quorum.\n\t */\n\tgetQuorum(): IQuorumClients;\n\n\t/**\n\t * Returns the current audience.\n\t */\n\tgetAudience(): IAudience;\n\n\t/**\n\t * Resolves when a local data store is attached.\n\t */\n\twaitAttached(): Promise<void>;\n\n\t/**\n\t * Exposes a handle to the root object / entryPoint of the data store. Use this as the primary way of interacting\n\t * with it.\n\t */\n\treadonly entryPoint: IFluidHandle<FluidObject>;\n\n\t/**\n\t * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\trequest(request: IRequest): Promise<IResponse>;\n\n\t/**\n\t * @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the \"entryPoint\" pattern. Refer to Removing-IFluidRouter.md\n\t */\n\t// eslint-disable-next-line import/no-deprecated\n\treadonly IFluidRouter: IFluidRouter;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/datastore-definitions",
|
|
3
|
-
"version": "2.0.0-internal.7.
|
|
3
|
+
"version": "2.0.0-internal.7.2.0",
|
|
4
4
|
"description": "Fluid data store definitions",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -14,19 +14,18 @@
|
|
|
14
14
|
"main": "dist/index.js",
|
|
15
15
|
"types": "dist/index.d.ts",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@fluidframework/container-definitions": ">=2.0.0-internal.7.
|
|
18
|
-
"@fluidframework/core-interfaces": ">=2.0.0-internal.7.
|
|
17
|
+
"@fluidframework/container-definitions": ">=2.0.0-internal.7.2.0 <2.0.0-internal.7.3.0",
|
|
18
|
+
"@fluidframework/core-interfaces": ">=2.0.0-internal.7.2.0 <2.0.0-internal.7.3.0",
|
|
19
19
|
"@fluidframework/protocol-definitions": "^3.0.0",
|
|
20
|
-
"@fluidframework/runtime-definitions": ">=2.0.0-internal.7.
|
|
20
|
+
"@fluidframework/runtime-definitions": ">=2.0.0-internal.7.2.0 <2.0.0-internal.7.3.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@fluid-tools/build-cli": "^0.
|
|
24
|
-
"@fluidframework/build-common": "^2.0.
|
|
25
|
-
"@fluidframework/build-tools": "^0.
|
|
26
|
-
"@fluidframework/datastore-definitions-previous": "npm:@fluidframework/datastore-definitions@2.0.0-internal.7.
|
|
23
|
+
"@fluid-tools/build-cli": "^0.26.1",
|
|
24
|
+
"@fluidframework/build-common": "^2.0.3",
|
|
25
|
+
"@fluidframework/build-tools": "^0.26.1",
|
|
26
|
+
"@fluidframework/datastore-definitions-previous": "npm:@fluidframework/datastore-definitions@2.0.0-internal.7.1.0",
|
|
27
27
|
"@fluidframework/eslint-config-fluid": "^3.0.0",
|
|
28
28
|
"@microsoft/api-extractor": "^7.37.0",
|
|
29
|
-
"copyfiles": "^2.4.1",
|
|
30
29
|
"eslint": "~8.50.0",
|
|
31
30
|
"prettier": "~3.0.3",
|
|
32
31
|
"rimraf": "^4.4.0",
|
|
@@ -41,7 +40,7 @@
|
|
|
41
40
|
"build:docs": "api-extractor run --local",
|
|
42
41
|
"build:test": "tsc --project ./src/test/tsconfig.json",
|
|
43
42
|
"ci:build:docs": "api-extractor run",
|
|
44
|
-
"clean": "rimraf --glob
|
|
43
|
+
"clean": "rimraf --glob dist \"*.tsbuildinfo\" \"*.build.log\" _api-extractor-temp",
|
|
45
44
|
"eslint": "eslint --format stylish src",
|
|
46
45
|
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
47
46
|
"format": "npm run prettier:fix",
|
package/src/dataStoreRuntime.ts
CHANGED
|
@@ -112,8 +112,9 @@ export interface IFluidDataStoreRuntime
|
|
|
112
112
|
* Submits the signal to be sent to other clients.
|
|
113
113
|
* @param type - Type of the signal.
|
|
114
114
|
* @param content - Content of the signal.
|
|
115
|
+
* @param targetClientId - When specified, the signal is only sent to the provided client id.
|
|
115
116
|
*/
|
|
116
|
-
submitSignal(type: string, content: any): void;
|
|
117
|
+
submitSignal(type: string, content: any, targetClientId?: string): void;
|
|
117
118
|
|
|
118
119
|
/**
|
|
119
120
|
* Returns the current quorum.
|
|
@@ -137,12 +138,12 @@ export interface IFluidDataStoreRuntime
|
|
|
137
138
|
readonly entryPoint: IFluidHandle<FluidObject>;
|
|
138
139
|
|
|
139
140
|
/**
|
|
140
|
-
* @deprecated
|
|
141
|
+
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
141
142
|
*/
|
|
142
143
|
request(request: IRequest): Promise<IResponse>;
|
|
143
144
|
|
|
144
145
|
/**
|
|
145
|
-
* @deprecated
|
|
146
|
+
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
146
147
|
*/
|
|
147
148
|
// eslint-disable-next-line import/no-deprecated
|
|
148
149
|
readonly IFluidRouter: IFluidRouter;
|
|
@@ -1,445 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This library defines the interfaces required to implement and/or communicate
|
|
3
|
-
* with a data store.
|
|
4
|
-
*
|
|
5
|
-
* @packageDocumentation
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { AttachState } from '@fluidframework/container-definitions';
|
|
9
|
-
import { FluidObject } from '@fluidframework/core-interfaces';
|
|
10
|
-
import { IAudience } from '@fluidframework/container-definitions';
|
|
11
|
-
import { IDeltaManager } from '@fluidframework/container-definitions';
|
|
12
|
-
import { IDisposable } from '@fluidframework/core-interfaces';
|
|
13
|
-
import { IDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
14
|
-
import { IEvent } from '@fluidframework/core-interfaces';
|
|
15
|
-
import { IEventProvider } from '@fluidframework/core-interfaces';
|
|
16
|
-
import { IExperimentalIncrementalSummaryContext } from '@fluidframework/runtime-definitions';
|
|
17
|
-
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
18
|
-
import { IFluidHandleContext } from '@fluidframework/core-interfaces';
|
|
19
|
-
import { IFluidLoadable } from '@fluidframework/core-interfaces';
|
|
20
|
-
import { IFluidRouter } from '@fluidframework/core-interfaces';
|
|
21
|
-
import { IGarbageCollectionData } from '@fluidframework/runtime-definitions';
|
|
22
|
-
import { IIdCompressor } from '@fluidframework/runtime-definitions';
|
|
23
|
-
import { IInboundSignalMessage } from '@fluidframework/runtime-definitions';
|
|
24
|
-
import { ILoaderOptions } from '@fluidframework/container-definitions';
|
|
25
|
-
import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
|
|
26
|
-
import { IQuorumClients } from '@fluidframework/protocol-definitions';
|
|
27
|
-
import { IRequest } from '@fluidframework/core-interfaces';
|
|
28
|
-
import { IResponse } from '@fluidframework/core-interfaces';
|
|
29
|
-
import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
|
|
30
|
-
import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
|
|
31
|
-
import { ITelemetryContext } from '@fluidframework/runtime-definitions';
|
|
32
|
-
import { ITelemetryLogger } from '@fluidframework/core-interfaces';
|
|
33
|
-
|
|
34
|
-
export declare interface IChannel extends IFluidLoadable {
|
|
35
|
-
/**
|
|
36
|
-
* A readonly identifier for the channel
|
|
37
|
-
*/
|
|
38
|
-
readonly id: string;
|
|
39
|
-
readonly attributes: IChannelAttributes;
|
|
40
|
-
/**
|
|
41
|
-
* Generates summary of the channel synchronously. It is called when an `attach message`
|
|
42
|
-
* for a local channel is generated. In other words, when the channel is being attached
|
|
43
|
-
* to make it visible to other clients.
|
|
44
|
-
*
|
|
45
|
-
* @remarks
|
|
46
|
-
*
|
|
47
|
-
* Note: Since the Attach Summary is generated for local channels when making them visible to
|
|
48
|
-
* remote clients, they don't have any previous summaries to compare against. For this reason,
|
|
49
|
-
* the attach summary cannot contain summary handles (paths to sub-trees or blobs).
|
|
50
|
-
* It can, however, contain {@link @fluidframework/protocol-definitions#ISummaryAttachment}
|
|
51
|
-
* (handles to blobs uploaded async via the blob manager).
|
|
52
|
-
*
|
|
53
|
-
* @param fullTree - A flag indicating whether the attempt should generate a full
|
|
54
|
-
* summary tree without any handles for unchanged subtrees.
|
|
55
|
-
*
|
|
56
|
-
* Default: `false`
|
|
57
|
-
*
|
|
58
|
-
* @param trackState - An optimization for tracking state of objects across summaries. If the state
|
|
59
|
-
* of an object did not change since last successful summary, an
|
|
60
|
-
* {@link @fluidframework/protocol-definitions#ISummaryHandle} can be used
|
|
61
|
-
* instead of re-summarizing it. If this is `false`, the expectation is that you should never
|
|
62
|
-
* send an `ISummaryHandle`, since you are not expected to track state.
|
|
63
|
-
*
|
|
64
|
-
* Note: The goal is to remove the trackState and automatically decided whether the
|
|
65
|
-
* handles will be used or not: {@link https://github.com/microsoft/FluidFramework/issues/10455}
|
|
66
|
-
*
|
|
67
|
-
* Default: `false`
|
|
68
|
-
*
|
|
69
|
-
* @param telemetryContext - See {@link @fluidframework/runtime-definitions#ITelemetryContext}.
|
|
70
|
-
*
|
|
71
|
-
* @returns A summary capturing the current state of the channel.
|
|
72
|
-
*/
|
|
73
|
-
getAttachSummary(fullTree?: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
|
|
74
|
-
/**
|
|
75
|
-
* Generates summary of the channel asynchronously.
|
|
76
|
-
* This should not be called where the channel can be modified while summarization is in progress.
|
|
77
|
-
*
|
|
78
|
-
* @param fullTree - flag indicating whether the attempt should generate a full
|
|
79
|
-
* summary tree without any handles for unchanged subtrees. It should only be set to true when generating
|
|
80
|
-
* a summary from the entire container.
|
|
81
|
-
*
|
|
82
|
-
* Default: `false`
|
|
83
|
-
*
|
|
84
|
-
* @param trackState - An optimization for tracking state of objects across summaries. If the state
|
|
85
|
-
* of an object did not change since last successful summary, an
|
|
86
|
-
* {@link @fluidframework/protocol-definitions#ISummaryHandle} can be used
|
|
87
|
-
* instead of re-summarizing it. If this is `false`, the expectation is that you should never
|
|
88
|
-
* send an `ISummaryHandle`, since you are not expected to track state.
|
|
89
|
-
*
|
|
90
|
-
* Default: `false`
|
|
91
|
-
*
|
|
92
|
-
* Note: The goal is to remove the trackState and automatically decided whether the
|
|
93
|
-
* handles will be used or not: {@link https://github.com/microsoft/FluidFramework/issues/10455}
|
|
94
|
-
*
|
|
95
|
-
* @param telemetryContext - See {@link @fluidframework/runtime-definitions#ITelemetryContext}.
|
|
96
|
-
*
|
|
97
|
-
* @returns A summary capturing the current state of the channel.
|
|
98
|
-
*/
|
|
99
|
-
summarize(fullTree?: boolean, trackState?: boolean, telemetryContext?: ITelemetryContext, incrementalSummaryContext?: IExperimentalIncrementalSummaryContext): Promise<ISummaryTreeWithStats>;
|
|
100
|
-
/**
|
|
101
|
-
* Checks if the channel is attached to storage.
|
|
102
|
-
* @returns True iff the channel is attached.
|
|
103
|
-
*/
|
|
104
|
-
isAttached(): boolean;
|
|
105
|
-
/**
|
|
106
|
-
* Enables the channel to send and receive ops.
|
|
107
|
-
* @param services - The services to connect to.
|
|
108
|
-
*/
|
|
109
|
-
connect(services: IChannelServices): void;
|
|
110
|
-
/**
|
|
111
|
-
* Returns the GC data for this channel. It contains a list of GC nodes that contains references to
|
|
112
|
-
* other GC nodes.
|
|
113
|
-
* @param fullGC - true to bypass optimizations and force full generation of GC data.
|
|
114
|
-
*/
|
|
115
|
-
getGCData(fullGC?: boolean): IGarbageCollectionData;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Represents the attributes of a channel/DDS.
|
|
120
|
-
*/
|
|
121
|
-
export declare interface IChannelAttributes {
|
|
122
|
-
/**
|
|
123
|
-
* Type name of the DDS for factory look up with ISharedObjectRegistry
|
|
124
|
-
*/
|
|
125
|
-
readonly type: string;
|
|
126
|
-
/**
|
|
127
|
-
* Format version of the snapshot
|
|
128
|
-
* Currently, only use to display a debug message if the version is incompatible
|
|
129
|
-
*/
|
|
130
|
-
readonly snapshotFormatVersion: string;
|
|
131
|
-
/**
|
|
132
|
-
* The package version of the code of the DDS, for debug only
|
|
133
|
-
*/
|
|
134
|
-
readonly packageVersion?: string;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Definitions of a channel factory.
|
|
139
|
-
*
|
|
140
|
-
* @remarks
|
|
141
|
-
*
|
|
142
|
-
* The runtime must be able to produce "channels" of the correct in-memory object type for the collaborative session.
|
|
143
|
-
* Here "channels" are typically distributed data structures (DDSs).
|
|
144
|
-
*
|
|
145
|
-
* The runtime will consult with a registry of such factories during
|
|
146
|
-
* {@link https://fluidframework.com/docs/build/containers/ | Container} load and when receiving "attach" operations
|
|
147
|
-
* (ops), which indicate a new instance of a channel being introduced to the collaboration session, to produce the
|
|
148
|
-
* appropriate in-memory object.
|
|
149
|
-
*
|
|
150
|
-
* Factories follow a common model but enable custom behavior.
|
|
151
|
-
*
|
|
152
|
-
* @example
|
|
153
|
-
*
|
|
154
|
-
* If a collaboration includes a {@link https://fluidframework.com/docs/data-structures/map/ | SharedMap},
|
|
155
|
-
* the collaborating clients will need to have access to a factory that can produce the `SharedMap` object.
|
|
156
|
-
*/
|
|
157
|
-
export declare interface IChannelFactory {
|
|
158
|
-
/**
|
|
159
|
-
* String representing the type of the factory.
|
|
160
|
-
*/
|
|
161
|
-
readonly type: string;
|
|
162
|
-
/**
|
|
163
|
-
* Attributes of the channel.
|
|
164
|
-
*/
|
|
165
|
-
readonly attributes: IChannelAttributes;
|
|
166
|
-
/**
|
|
167
|
-
* Loads the given channel. This call is only ever invoked internally as the only thing
|
|
168
|
-
* that is ever directly loaded is the document itself. Load will then only be called on documents that
|
|
169
|
-
* were created and added to a channel.
|
|
170
|
-
* @param runtime - Data store runtime containing state/info/helper methods about the data store.
|
|
171
|
-
* @param id - ID of the channel.
|
|
172
|
-
* @param services - Services to read objects at a given path using the delta connection.
|
|
173
|
-
* @param channelAttributes - The attributes for the the channel to be loaded.
|
|
174
|
-
* @returns The loaded object
|
|
175
|
-
*
|
|
176
|
-
* @privateRemarks
|
|
177
|
-
* Thought: should the storage object include the version information and limit access to just files
|
|
178
|
-
* for the given object? The latter seems good in general. But both are probably good things. We then just
|
|
179
|
-
* need a way to allow the document to provide later storage for the object.
|
|
180
|
-
*/
|
|
181
|
-
load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, channelAttributes: Readonly<IChannelAttributes>): Promise<IChannel>;
|
|
182
|
-
/**
|
|
183
|
-
* Creates a local version of the channel.
|
|
184
|
-
* Calling attach on the object later will insert it into the object stream.
|
|
185
|
-
* @param runtime - The runtime the new object will be associated with
|
|
186
|
-
* @param id - The unique ID of the new object
|
|
187
|
-
* @returns The newly created object.
|
|
188
|
-
*
|
|
189
|
-
* @privateRemarks
|
|
190
|
-
* NOTE here - When we attach we need to submit all the pending ops prior to actually doing the attach
|
|
191
|
-
* for consistency.
|
|
192
|
-
*/
|
|
193
|
-
create(runtime: IFluidDataStoreRuntime, id: string): IChannel;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Storage services to read the objects at a given path using the given delta connection.
|
|
198
|
-
*/
|
|
199
|
-
export declare interface IChannelServices {
|
|
200
|
-
deltaConnection: IDeltaConnection;
|
|
201
|
-
objectStorage: IChannelStorageService;
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Storage services to read the objects at a given path.
|
|
206
|
-
*/
|
|
207
|
-
export declare interface IChannelStorageService {
|
|
208
|
-
/**
|
|
209
|
-
* Reads the object contained at the given path. Returns a buffer representation for the object.
|
|
210
|
-
*/
|
|
211
|
-
readBlob(path: string): Promise<ArrayBufferLike>;
|
|
212
|
-
/**
|
|
213
|
-
* Determines if there is an object contained at the given path.
|
|
214
|
-
*/
|
|
215
|
-
contains(path: string): Promise<boolean>;
|
|
216
|
-
/**
|
|
217
|
-
* Lists the blobs that exist at a specific path.
|
|
218
|
-
*/
|
|
219
|
-
list(path: string): Promise<string[]>;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* Interface to represent a connection to a delta notification stream.
|
|
224
|
-
*/
|
|
225
|
-
export declare interface IDeltaConnection {
|
|
226
|
-
connected: boolean;
|
|
227
|
-
/**
|
|
228
|
-
* Send new messages to the server.
|
|
229
|
-
* @param messageContent - The content of the message to be sent.
|
|
230
|
-
* @param localOpMetadata - The local metadata associated with the message. This is kept locally by the runtime
|
|
231
|
-
* and not sent to the server. It will be provided back when this message is acknowledged by the server. It will
|
|
232
|
-
* also be provided back when asked to resubmit the message.
|
|
233
|
-
*/
|
|
234
|
-
submit(messageContent: any, localOpMetadata: unknown): void;
|
|
235
|
-
/**
|
|
236
|
-
* Attaches a message handler to the delta connection
|
|
237
|
-
*/
|
|
238
|
-
attach(handler: IDeltaHandler): void;
|
|
239
|
-
/**
|
|
240
|
-
* Indicates that the channel is dirty and needs to be part of the summary. It is called by a SharedSummaryBlock
|
|
241
|
-
* that needs to be part of the summary but does not generate ops.
|
|
242
|
-
*/
|
|
243
|
-
dirty(): void;
|
|
244
|
-
/**
|
|
245
|
-
* Called when a new outbound reference is added to another node. This is used by garbage collection to identify
|
|
246
|
-
* all references added in the system.
|
|
247
|
-
* @param srcHandle - The handle of the node that added the reference.
|
|
248
|
-
* @param outboundHandle - The handle of the outbound node that is referenced.
|
|
249
|
-
*/
|
|
250
|
-
addedGCOutboundReference?(srcHandle: IFluidHandle, outboundHandle: IFluidHandle): void;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
/**
|
|
254
|
-
* Handler provided by shared data structure to process requests from the runtime.
|
|
255
|
-
*/
|
|
256
|
-
export declare interface IDeltaHandler {
|
|
257
|
-
/**
|
|
258
|
-
* Processes the op.
|
|
259
|
-
* @param message - The message to process
|
|
260
|
-
* @param local - Whether the message originated from the local client
|
|
261
|
-
* @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.
|
|
262
|
-
* For messages from a remote client, this will be undefined.
|
|
263
|
-
*/
|
|
264
|
-
process: (message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown) => void;
|
|
265
|
-
/**
|
|
266
|
-
* State change events to indicate changes to the delta connection
|
|
267
|
-
* @param connected - true if connected, false otherwise
|
|
268
|
-
*/
|
|
269
|
-
setConnectionState(connected: boolean): void;
|
|
270
|
-
/**
|
|
271
|
-
* Called when the runtime asks the client to resubmit an op. This may be because the Container reconnected and
|
|
272
|
-
* this op was not acked.
|
|
273
|
-
* The client can choose to resubmit the same message, submit different / multiple messages or not submit anything
|
|
274
|
-
* at all.
|
|
275
|
-
* @param message - The original message that was submitted.
|
|
276
|
-
* @param localOpMetadata - The local metadata associated with the original message.
|
|
277
|
-
*/
|
|
278
|
-
reSubmit(message: any, localOpMetadata: unknown): void;
|
|
279
|
-
/**
|
|
280
|
-
* Apply changes from an op. Used when rehydrating an attached container
|
|
281
|
-
* with pending changes. This prepares the SharedObject for seeing an ACK
|
|
282
|
-
* for the op or resubmitting the op upon reconnection.
|
|
283
|
-
* @param message - Contents of a stashed op.
|
|
284
|
-
* @returns localMetadata of the op, to be passed to process() or resubmit()
|
|
285
|
-
* when the op is ACKed or resubmitted, respectively
|
|
286
|
-
*/
|
|
287
|
-
applyStashedOp(message: any): unknown;
|
|
288
|
-
/**
|
|
289
|
-
* Revert a local op.
|
|
290
|
-
* @param message - The original message that was submitted.
|
|
291
|
-
* @param localOpMetadata - The local metadata associated with the original message.
|
|
292
|
-
*/
|
|
293
|
-
rollback?(message: any, localOpMetadata: unknown): void;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
/**
|
|
297
|
-
* Represents the runtime for the data store. Contains helper functions/state of the data store.
|
|
298
|
-
*/
|
|
299
|
-
export declare interface IFluidDataStoreRuntime extends IEventProvider<IFluidDataStoreRuntimeEvents>, IDisposable, Partial<IProvideFluidDataStoreRegistry> {
|
|
300
|
-
readonly id: string;
|
|
301
|
-
readonly IFluidHandleContext: IFluidHandleContext;
|
|
302
|
-
readonly rootRoutingContext: IFluidHandleContext;
|
|
303
|
-
readonly channelsRoutingContext: IFluidHandleContext;
|
|
304
|
-
readonly objectsRoutingContext: IFluidHandleContext;
|
|
305
|
-
readonly options: ILoaderOptions;
|
|
306
|
-
readonly deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>;
|
|
307
|
-
readonly clientId: string | undefined;
|
|
308
|
-
readonly connected: boolean;
|
|
309
|
-
readonly logger: ITelemetryLogger;
|
|
310
|
-
/**
|
|
311
|
-
* Indicates the attachment state of the data store to a host service.
|
|
312
|
-
*/
|
|
313
|
-
readonly attachState: AttachState;
|
|
314
|
-
readonly idCompressor?: IIdCompressor;
|
|
315
|
-
/**
|
|
316
|
-
* Returns the channel with the given id
|
|
317
|
-
*/
|
|
318
|
-
getChannel(id: string): Promise<IChannel>;
|
|
319
|
-
/**
|
|
320
|
-
* Invokes the given callback and expects that no ops are submitted
|
|
321
|
-
* until execution finishes. If an op is submitted, an error will be raised.
|
|
322
|
-
*
|
|
323
|
-
* Can be disabled by feature gate `Fluid.ContainerRuntime.DisableOpReentryCheck`
|
|
324
|
-
*
|
|
325
|
-
* @param callback - the callback to be invoked
|
|
326
|
-
*/
|
|
327
|
-
ensureNoDataModelChanges<T>(callback: () => T): T;
|
|
328
|
-
/**
|
|
329
|
-
* Creates a new channel of the given type.
|
|
330
|
-
* @param id - ID of the channel to be created. A unique ID will be generated if left undefined.
|
|
331
|
-
* @param type - Type of the channel.
|
|
332
|
-
*/
|
|
333
|
-
createChannel(id: string | undefined, type: string): IChannel;
|
|
334
|
-
/**
|
|
335
|
-
* Bind the channel with the data store runtime. If the runtime
|
|
336
|
-
* is attached then we attach the channel to make it live.
|
|
337
|
-
*/
|
|
338
|
-
bindChannel(channel: IChannel): void;
|
|
339
|
-
/**
|
|
340
|
-
* Api to upload a blob of data.
|
|
341
|
-
* @param blob - blob to be uploaded.
|
|
342
|
-
*/
|
|
343
|
-
uploadBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandle<ArrayBufferLike>>;
|
|
344
|
-
/**
|
|
345
|
-
* Submits the signal to be sent to other clients.
|
|
346
|
-
* @param type - Type of the signal.
|
|
347
|
-
* @param content - Content of the signal.
|
|
348
|
-
*/
|
|
349
|
-
submitSignal(type: string, content: any): void;
|
|
350
|
-
/**
|
|
351
|
-
* Returns the current quorum.
|
|
352
|
-
*/
|
|
353
|
-
getQuorum(): IQuorumClients;
|
|
354
|
-
/**
|
|
355
|
-
* Returns the current audience.
|
|
356
|
-
*/
|
|
357
|
-
getAudience(): IAudience;
|
|
358
|
-
/**
|
|
359
|
-
* Resolves when a local data store is attached.
|
|
360
|
-
*/
|
|
361
|
-
waitAttached(): Promise<void>;
|
|
362
|
-
/**
|
|
363
|
-
* Exposes a handle to the root object / entryPoint of the data store. Use this as the primary way of interacting
|
|
364
|
-
* with it.
|
|
365
|
-
*/
|
|
366
|
-
readonly entryPoint: IFluidHandle<FluidObject>;
|
|
367
|
-
/**
|
|
368
|
-
* @deprecated - Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
369
|
-
*/
|
|
370
|
-
request(request: IRequest): Promise<IResponse>;
|
|
371
|
-
/**
|
|
372
|
-
* @deprecated - Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
373
|
-
*/
|
|
374
|
-
readonly IFluidRouter: IFluidRouter;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
export declare interface IFluidDataStoreRuntimeEvents extends IEvent {
|
|
378
|
-
(event: "disconnected" | "dispose" | "attaching" | "attached", listener: () => void): any;
|
|
379
|
-
(event: "op", listener: (message: ISequencedDocumentMessage) => void): any;
|
|
380
|
-
(event: "signal", listener: (message: IInboundSignalMessage, local: boolean) => void): any;
|
|
381
|
-
(event: "connected", listener: (clientId: string) => void): any;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
/**
|
|
385
|
-
* Used to constrain a type `T` to types that are serializable as JSON.
|
|
386
|
-
* Produces a compile-time error if `T` contains non-Jsonable members.
|
|
387
|
-
*
|
|
388
|
-
* @remarks
|
|
389
|
-
* Note that this does NOT prevent using of values with non-json compatible data,
|
|
390
|
-
* it only prevents using values with types that include non-json compatible data.
|
|
391
|
-
* This means that one can, for example, pass an a value typed with json compatible
|
|
392
|
-
* interface into this function,
|
|
393
|
-
* that could actually be a class with lots on non-json compatible fields and methods.
|
|
394
|
-
*
|
|
395
|
-
* Important: `T extends Jsonable<T>` is incorrect (does not even compile).
|
|
396
|
-
* `T extends Jsonable` is also incorrect since `Jsonable` is just `any` and thus applies no constraint at all.
|
|
397
|
-
*
|
|
398
|
-
* The optional 'TReplaced' parameter may be used to permit additional leaf types to support
|
|
399
|
-
* situations where a `replacer` is used to handle special values (e.g., `Jsonable<{ x: IFluidHandle }, IFluidHandle>`).
|
|
400
|
-
*
|
|
401
|
-
* Note that `Jsonable<T>` does not protect against the following pitfalls when serializing with JSON.stringify():
|
|
402
|
-
*
|
|
403
|
-
* - `undefined` properties on objects are omitted (i.e., properties become undefined instead of equal to undefined).
|
|
404
|
-
*
|
|
405
|
-
* - When `undefined` appears as the root object or as an array element it is coerced to `null`.
|
|
406
|
-
*
|
|
407
|
-
* - Non-finite numbers (`NaN`, `+/-Infinity`) are also coerced to `null`.
|
|
408
|
-
*
|
|
409
|
-
* - prototypes and non-enumerable properties are lost.
|
|
410
|
-
*
|
|
411
|
-
* Also, `Jsonable<T>` does not prevent the construction of circular references.
|
|
412
|
-
*
|
|
413
|
-
* Using `Jsonable` (with no type parameters) or `Jsonable<any>` is just a type alias for `any`
|
|
414
|
-
* and should not be used if type safety is desired.
|
|
415
|
-
*
|
|
416
|
-
* @example Typical usage
|
|
417
|
-
*
|
|
418
|
-
* ```typescript
|
|
419
|
-
* function foo<T>(value: Jsonable<T>) { ... }
|
|
420
|
-
* ```
|
|
421
|
-
*/
|
|
422
|
-
export declare type Jsonable<T = any, TReplaced = void> = T extends undefined | null | boolean | number | string | TReplaced ? T : Extract<T, Function> extends never ? {
|
|
423
|
-
[K in keyof T]: Extract<K, symbol> extends never ? Jsonable<T[K], TReplaced> : never;
|
|
424
|
-
} : never;
|
|
425
|
-
|
|
426
|
-
/**
|
|
427
|
-
* Used to constrain a type 'T' to types that Fluid can intrinsically serialize. Produces a
|
|
428
|
-
* compile-time error if `T` contains non-serializable members.
|
|
429
|
-
*
|
|
430
|
-
* @remarks
|
|
431
|
-
* See Jsonable for caveats regarding serialization of `undefined`, non-finite numbers,
|
|
432
|
-
* and circular references.
|
|
433
|
-
*
|
|
434
|
-
* Important: `T extends Serializable<T>` is generally incorrect.
|
|
435
|
-
* (Any value of `T` extends the serializable subset of itself.)
|
|
436
|
-
*
|
|
437
|
-
* @example Typical usage
|
|
438
|
-
*
|
|
439
|
-
* ```typescript
|
|
440
|
-
* function serialize<T>(value: Serializable<T>) { ... }
|
|
441
|
-
* ```
|
|
442
|
-
*/
|
|
443
|
-
export declare type Serializable<T = any> = Jsonable<T, IFluidHandle>;
|
|
444
|
-
|
|
445
|
-
export { }
|