@fluidframework/fluid-static 2.0.0-internal.7.3.0 → 2.0.0-internal.7.4.1
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 +16 -0
- package/api-extractor-lint.json +13 -0
- package/api-extractor.json +3 -3
- package/api-report/fluid-static.api.md +45 -22
- package/dist/fluid-static-alpha.d.ts +417 -0
- package/dist/fluid-static-beta.d.ts +99 -0
- package/dist/fluid-static-public.d.ts +99 -0
- package/dist/fluid-static-untrimmed.d.ts +619 -0
- package/dist/fluidContainer.cjs +10 -3
- package/dist/fluidContainer.cjs.map +1 -1
- package/dist/fluidContainer.d.ts +12 -2
- package/dist/fluidContainer.d.ts.map +1 -1
- package/dist/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/rootDataObject.cjs +13 -2
- package/dist/rootDataObject.cjs.map +1 -1
- package/dist/rootDataObject.d.ts +9 -36
- package/dist/rootDataObject.d.ts.map +1 -1
- package/dist/serviceAudience.cjs +16 -1
- package/dist/serviceAudience.cjs.map +1 -1
- package/dist/serviceAudience.d.ts +9 -0
- package/dist/serviceAudience.d.ts.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.ts +21 -1
- package/dist/types.d.ts.map +1 -1
- package/lib/fluid-static-alpha.d.ts +417 -0
- package/lib/fluid-static-beta.d.ts +99 -0
- package/lib/fluid-static-public.d.ts +99 -0
- package/lib/fluid-static-untrimmed.d.ts +619 -0
- package/lib/fluidContainer.d.ts +13 -7
- package/lib/fluidContainer.d.ts.map +1 -1
- package/lib/fluidContainer.mjs +8 -2
- package/lib/fluidContainer.mjs.map +1 -1
- package/lib/index.d.ts +4 -9
- package/lib/index.d.ts.map +1 -1
- package/lib/index.mjs +3 -3
- package/lib/index.mjs.map +1 -1
- package/lib/rootDataObject.d.ts +9 -40
- package/lib/rootDataObject.d.ts.map +1 -1
- package/lib/rootDataObject.mjs +12 -1
- package/lib/rootDataObject.mjs.map +1 -1
- package/lib/serviceAudience.d.ts +10 -1
- package/lib/serviceAudience.d.ts.map +1 -1
- package/lib/serviceAudience.mjs +14 -0
- package/lib/serviceAudience.mjs.map +1 -1
- package/lib/types.d.ts +21 -1
- package/lib/types.d.ts.map +1 -1
- package/lib/types.mjs.map +1 -1
- package/lib/utils.d.ts +1 -1
- package/lib/utils.d.ts.map +1 -1
- package/package.json +38 -31
- package/src/fluidContainer.ts +17 -2
- package/src/index.ts +7 -2
- package/src/rootDataObject.ts +16 -1
- package/src/serviceAudience.ts +18 -0
- package/src/types.ts +22 -1
package/lib/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,eAAe,EAAE,MAAM,uCAAuC;OAChE,EAAE,gCAAgC,EAAE,MAAM,qCAAqC;OAC/E,EAAE,eAAe,EAAE,eAAe,EAAuB,iBAAiB,EAAE;AAEnF;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAAS,GAAG,gCAEzC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,QAAS,GAAG,kCAE3C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,WACrC,eAAe,KACrB,CAAC,gCAAgC,EAAE,EAAE,eAAe,EAAE,CA0BxD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/fluid-static",
|
|
3
|
-
"version": "2.0.0-internal.7.
|
|
3
|
+
"version": "2.0.0-internal.7.4.1",
|
|
4
4
|
"description": "A tool to enable consumption of Fluid Data Objects without requiring custom container code.",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -11,18 +11,6 @@
|
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"author": "Microsoft and contributors",
|
|
13
13
|
"sideEffects": false,
|
|
14
|
-
"exports": {
|
|
15
|
-
".": {
|
|
16
|
-
"import": {
|
|
17
|
-
"types": "./lib/index.d.ts",
|
|
18
|
-
"default": "./lib/index.mjs"
|
|
19
|
-
},
|
|
20
|
-
"require": {
|
|
21
|
-
"types": "./dist/index.d.ts",
|
|
22
|
-
"default": "./dist/index.cjs"
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
14
|
"main": "dist/index.cjs",
|
|
27
15
|
"module": "lib/index.mjs",
|
|
28
16
|
"types": "dist/index.d.ts",
|
|
@@ -47,31 +35,33 @@
|
|
|
47
35
|
"temp-directory": "nyc/.nyc_output"
|
|
48
36
|
},
|
|
49
37
|
"dependencies": {
|
|
50
|
-
"@fluid-internal/client-utils": ">=2.0.0-internal.7.
|
|
51
|
-
"@fluidframework/aqueduct": ">=2.0.0-internal.7.
|
|
52
|
-
"@fluidframework/container-definitions": ">=2.0.0-internal.7.
|
|
53
|
-
"@fluidframework/container-loader": ">=2.0.0-internal.7.
|
|
54
|
-
"@fluidframework/container-runtime-definitions": ">=2.0.0-internal.7.
|
|
55
|
-
"@fluidframework/core-interfaces": ">=2.0.0-internal.7.
|
|
56
|
-
"@fluidframework/datastore-definitions": ">=2.0.0-internal.7.
|
|
38
|
+
"@fluid-internal/client-utils": ">=2.0.0-internal.7.4.1 <2.0.0-internal.7.5.0",
|
|
39
|
+
"@fluidframework/aqueduct": ">=2.0.0-internal.7.4.1 <2.0.0-internal.7.5.0",
|
|
40
|
+
"@fluidframework/container-definitions": ">=2.0.0-internal.7.4.1 <2.0.0-internal.7.5.0",
|
|
41
|
+
"@fluidframework/container-loader": ">=2.0.0-internal.7.4.1 <2.0.0-internal.7.5.0",
|
|
42
|
+
"@fluidframework/container-runtime-definitions": ">=2.0.0-internal.7.4.1 <2.0.0-internal.7.5.0",
|
|
43
|
+
"@fluidframework/core-interfaces": ">=2.0.0-internal.7.4.1 <2.0.0-internal.7.5.0",
|
|
44
|
+
"@fluidframework/datastore-definitions": ">=2.0.0-internal.7.4.1 <2.0.0-internal.7.5.0",
|
|
57
45
|
"@fluidframework/protocol-definitions": "^3.0.0",
|
|
58
|
-
"@fluidframework/request-handler": ">=2.0.0-internal.7.
|
|
59
|
-
"@fluidframework/runtime-definitions": ">=2.0.0-internal.7.
|
|
60
|
-
"@fluidframework/runtime-utils": ">=2.0.0-internal.7.
|
|
46
|
+
"@fluidframework/request-handler": ">=2.0.0-internal.7.4.1 <2.0.0-internal.7.5.0",
|
|
47
|
+
"@fluidframework/runtime-definitions": ">=2.0.0-internal.7.4.1 <2.0.0-internal.7.5.0",
|
|
48
|
+
"@fluidframework/runtime-utils": ">=2.0.0-internal.7.4.1 <2.0.0-internal.7.5.0"
|
|
61
49
|
},
|
|
62
50
|
"devDependencies": {
|
|
51
|
+
"@arethetypeswrong/cli": "^0.13.3",
|
|
63
52
|
"@fluid-tools/build-cli": "^0.28.0",
|
|
64
53
|
"@fluidframework/build-common": "^2.0.3",
|
|
65
54
|
"@fluidframework/build-tools": "^0.28.0",
|
|
66
55
|
"@fluidframework/eslint-config-fluid": "^3.1.0",
|
|
67
56
|
"@fluidframework/fluid-static-previous": "npm:@fluidframework/fluid-static@2.0.0-internal.7.2.0",
|
|
68
|
-
"@fluidframework/map": ">=2.0.0-internal.7.
|
|
69
|
-
"@fluidframework/mocha-test-setup": ">=2.0.0-internal.7.
|
|
70
|
-
"@fluidframework/sequence": ">=2.0.0-internal.7.
|
|
57
|
+
"@fluidframework/map": ">=2.0.0-internal.7.4.1 <2.0.0-internal.7.5.0",
|
|
58
|
+
"@fluidframework/mocha-test-setup": ">=2.0.0-internal.7.4.1 <2.0.0-internal.7.5.0",
|
|
59
|
+
"@fluidframework/sequence": ">=2.0.0-internal.7.4.1 <2.0.0-internal.7.5.0",
|
|
71
60
|
"@microsoft/api-extractor": "^7.38.3",
|
|
72
61
|
"@types/mocha": "^9.1.1",
|
|
73
|
-
"@types/node": "^
|
|
62
|
+
"@types/node": "^18.19.0",
|
|
74
63
|
"c8": "^7.7.1",
|
|
64
|
+
"copyfiles": "^2.4.1",
|
|
75
65
|
"cross-env": "^7.0.3",
|
|
76
66
|
"eslint": "~8.50.0",
|
|
77
67
|
"mocha": "^10.2.0",
|
|
@@ -83,25 +73,42 @@
|
|
|
83
73
|
"tsc-multi": "^1.1.0",
|
|
84
74
|
"typescript": "~5.1.6"
|
|
85
75
|
},
|
|
76
|
+
"fluidBuild": {
|
|
77
|
+
"tasks": {
|
|
78
|
+
"build:docs": {
|
|
79
|
+
"dependsOn": [
|
|
80
|
+
"...",
|
|
81
|
+
"api-extractor:commonjs",
|
|
82
|
+
"api-extractor:esnext"
|
|
83
|
+
],
|
|
84
|
+
"script": false
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
86
88
|
"typeValidation": {
|
|
87
89
|
"broken": {}
|
|
88
90
|
},
|
|
89
91
|
"scripts": {
|
|
92
|
+
"api": "fluid-build . --task api",
|
|
93
|
+
"api-extractor:commonjs": "api-extractor run --local",
|
|
94
|
+
"api-extractor:esnext": "copyfiles -u 1 \"dist/**/*-@(alpha|beta|public|untrimmed).d.ts\" lib",
|
|
90
95
|
"build": "fluid-build . --task build",
|
|
91
96
|
"build:commonjs": "fluid-build . --task commonjs",
|
|
92
97
|
"build:compile": "fluid-build . --task compile",
|
|
93
|
-
"build:docs": "
|
|
98
|
+
"build:docs": "fluid-build . --task api",
|
|
94
99
|
"build:esnext": "tsc-multi --config ../../../common/build/build-common/tsc-multi.esm.json",
|
|
95
100
|
"build:test": "tsc-multi --config ./tsc-multi.test.json",
|
|
101
|
+
"check:are-the-types-wrong": "attw --pack",
|
|
102
|
+
"check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
|
|
96
103
|
"ci:build:docs": "api-extractor run",
|
|
97
104
|
"clean": "rimraf --glob dist lib \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
|
|
98
105
|
"eslint": "eslint --format stylish src",
|
|
99
106
|
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
100
107
|
"format": "npm run prettier:fix",
|
|
101
|
-
"lint": "npm run prettier && npm run eslint",
|
|
108
|
+
"lint": "npm run prettier && npm run check:release-tags && npm run eslint",
|
|
102
109
|
"lint:fix": "npm run prettier:fix && npm run eslint:fix",
|
|
103
|
-
"prettier": "prettier --check . --ignore-path ../../../.prettierignore",
|
|
104
|
-
"prettier:fix": "prettier --write . --ignore-path ../../../.prettierignore",
|
|
110
|
+
"prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
|
|
111
|
+
"prettier:fix": "prettier --write . --cache --ignore-path ../../../.prettierignore",
|
|
105
112
|
"test": "npm run test:mocha",
|
|
106
113
|
"test:coverage": "c8 npm test",
|
|
107
114
|
"test:mocha": "mocha --recursive \"dist/test/**/*.spec.cjs\" -r node_modules/@fluidframework/mocha-test-setup",
|
package/src/fluidContainer.ts
CHANGED
|
@@ -14,6 +14,7 @@ import type { ContainerSchema, IRootDataObject, LoadableObjectClass } from "./ty
|
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Extract the type of 'initialObjects' from the given {@link ContainerSchema} type.
|
|
17
|
+
* @alpha
|
|
17
18
|
*/
|
|
18
19
|
export type InitialObjects<T extends ContainerSchema> = {
|
|
19
20
|
// Construct a LoadableObjectRecord type by enumerating the keys of
|
|
@@ -30,6 +31,7 @@ export type InitialObjects<T extends ContainerSchema> = {
|
|
|
30
31
|
|
|
31
32
|
/**
|
|
32
33
|
* Events emitted from {@link IFluidContainer}.
|
|
34
|
+
* @alpha
|
|
33
35
|
*/
|
|
34
36
|
export interface IFluidContainerEvents extends IEvent {
|
|
35
37
|
/**
|
|
@@ -94,6 +96,7 @@ export interface IFluidContainerEvents extends IEvent {
|
|
|
94
96
|
* @typeparam TContainerSchema - Used to determine the type of 'initialObjects'.
|
|
95
97
|
*
|
|
96
98
|
* @remarks Note: external implementations of this interface are not supported.
|
|
99
|
+
* @alpha
|
|
97
100
|
*/
|
|
98
101
|
export interface IFluidContainer<TContainerSchema extends ContainerSchema = ContainerSchema>
|
|
99
102
|
extends IEventProvider<IFluidContainerEvents> {
|
|
@@ -208,6 +211,18 @@ export interface IFluidContainer<TContainerSchema extends ContainerSchema = Cont
|
|
|
208
211
|
dispose(): void;
|
|
209
212
|
}
|
|
210
213
|
|
|
214
|
+
/**
|
|
215
|
+
* @internal
|
|
216
|
+
*/
|
|
217
|
+
export function createFluidContainer<
|
|
218
|
+
TContainerSchema extends ContainerSchema = ContainerSchema,
|
|
219
|
+
>(props: {
|
|
220
|
+
container: IContainer;
|
|
221
|
+
rootDataObject: IRootDataObject;
|
|
222
|
+
}): IFluidContainer<TContainerSchema> {
|
|
223
|
+
return new FluidContainer<TContainerSchema>(props.container, props.rootDataObject);
|
|
224
|
+
}
|
|
225
|
+
|
|
211
226
|
/**
|
|
212
227
|
* Base {@link IFluidContainer} implementation.
|
|
213
228
|
*
|
|
@@ -216,6 +231,8 @@ export interface IFluidContainer<TContainerSchema extends ContainerSchema = Cont
|
|
|
216
231
|
*
|
|
217
232
|
* Note: this implementation is not complete. Consumers who rely on {@link IFluidContainer.attach}
|
|
218
233
|
* will need to utilize or provide a service-specific implementation of this type that implements that method.
|
|
234
|
+
* @deprecated use {@link createFluidContainer} and {@link IFluidContainer} instead
|
|
235
|
+
* @internal
|
|
219
236
|
*/
|
|
220
237
|
export class FluidContainer<TContainerSchema extends ContainerSchema = ContainerSchema>
|
|
221
238
|
extends TypedEventEmitter<IFluidContainerEvents>
|
|
@@ -334,8 +351,6 @@ export class FluidContainer<TContainerSchema extends ContainerSchema = Container
|
|
|
334
351
|
* Gets the underlying {@link @fluidframework/container-definitions#IContainer}.
|
|
335
352
|
*
|
|
336
353
|
* @remarks Used to power debug tooling.
|
|
337
|
-
*
|
|
338
|
-
* @internal
|
|
339
354
|
*/
|
|
340
355
|
public readonly INTERNAL_CONTAINER_DO_NOT_USE?: () => IContainer = () => {
|
|
341
356
|
return this.container;
|
package/src/index.ts
CHANGED
|
@@ -11,12 +11,16 @@
|
|
|
11
11
|
|
|
12
12
|
export {
|
|
13
13
|
FluidContainer,
|
|
14
|
+
createFluidContainer,
|
|
14
15
|
IFluidContainer,
|
|
15
16
|
IFluidContainerEvents,
|
|
16
17
|
InitialObjects,
|
|
17
18
|
} from "./fluidContainer";
|
|
18
|
-
export {
|
|
19
|
-
|
|
19
|
+
export {
|
|
20
|
+
DOProviderContainerRuntimeFactory,
|
|
21
|
+
createDOProviderContainerRuntimeFactory,
|
|
22
|
+
} from "./rootDataObject";
|
|
23
|
+
export { ServiceAudience, createServiceAudience } from "./serviceAudience";
|
|
20
24
|
export {
|
|
21
25
|
ContainerSchema,
|
|
22
26
|
DataObjectClass,
|
|
@@ -32,4 +36,5 @@ export {
|
|
|
32
36
|
MemberChangedListener,
|
|
33
37
|
Myself,
|
|
34
38
|
SharedObjectClass,
|
|
39
|
+
IProvideRootDataObject,
|
|
35
40
|
} from "./types";
|
package/src/rootDataObject.ts
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
import { IContainerRuntime } from "@fluidframework/container-runtime-definitions";
|
|
13
13
|
import { IFluidLoadable } from "@fluidframework/core-interfaces";
|
|
14
14
|
import { FlushMode } from "@fluidframework/runtime-definitions";
|
|
15
|
+
import { IRuntimeFactory } from "@fluidframework/container-definitions";
|
|
15
16
|
import {
|
|
16
17
|
ContainerSchema,
|
|
17
18
|
DataObjectClass,
|
|
@@ -39,12 +40,15 @@ export interface RootDataObjectProps {
|
|
|
39
40
|
* The entry-point/root collaborative object of the {@link IFluidContainer | Fluid Container}.
|
|
40
41
|
* Abstracts the dynamic code required to build a Fluid Container into a static representation for end customers.
|
|
41
42
|
*/
|
|
42
|
-
|
|
43
|
+
class RootDataObject
|
|
43
44
|
extends DataObject<{ InitialState: RootDataObjectProps }>
|
|
44
45
|
implements IRootDataObject
|
|
45
46
|
{
|
|
46
47
|
private readonly initialObjectsDirKey = "initial-objects-key";
|
|
47
48
|
private readonly _initialObjects: LoadableObjectRecord = {};
|
|
49
|
+
public get IRootDataObject() {
|
|
50
|
+
return this;
|
|
51
|
+
}
|
|
48
52
|
|
|
49
53
|
private get initialObjectsDir() {
|
|
50
54
|
const dir = this.root.getSubDirectory(this.initialObjectsDirKey);
|
|
@@ -139,6 +143,15 @@ export class RootDataObject
|
|
|
139
143
|
|
|
140
144
|
const rootDataStoreId = "rootDOId";
|
|
141
145
|
|
|
146
|
+
/**
|
|
147
|
+
* @internal
|
|
148
|
+
*/
|
|
149
|
+
export function createDOProviderContainerRuntimeFactory(props: {
|
|
150
|
+
schema: ContainerSchema;
|
|
151
|
+
}): IRuntimeFactory {
|
|
152
|
+
return new DOProviderContainerRuntimeFactory(props.schema);
|
|
153
|
+
}
|
|
154
|
+
|
|
142
155
|
/**
|
|
143
156
|
* Container code that provides a single {@link IRootDataObject}.
|
|
144
157
|
*
|
|
@@ -146,6 +159,8 @@ const rootDataStoreId = "rootDOId";
|
|
|
146
159
|
*
|
|
147
160
|
* This data object is dynamically customized (registry and initial objects) based on the schema provided.
|
|
148
161
|
* to the container runtime factory.
|
|
162
|
+
* @deprecated use {@link createDOProviderContainerRuntimeFactory} instead
|
|
163
|
+
* @internal
|
|
149
164
|
*/
|
|
150
165
|
export class DOProviderContainerRuntimeFactory extends BaseContainerRuntimeFactory {
|
|
151
166
|
private readonly rootDataObjectFactory: DataObjectFactory<
|
package/src/serviceAudience.ts
CHANGED
|
@@ -8,6 +8,22 @@ import { IAudience, IContainer } from "@fluidframework/container-definitions";
|
|
|
8
8
|
import { IClient } from "@fluidframework/protocol-definitions";
|
|
9
9
|
import { IServiceAudience, IServiceAudienceEvents, IMember, Myself } from "./types";
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export function createServiceAudience<M extends IMember = IMember>(props: {
|
|
15
|
+
container: IContainer;
|
|
16
|
+
createServiceMember: (audienceMember: IClient) => M;
|
|
17
|
+
}): IServiceAudience<M> {
|
|
18
|
+
// todo: once ServiceAudience isn't exported, we can remove abstract from it, and just use that here
|
|
19
|
+
const c = class NewServiceAudience extends ServiceAudience<M> {
|
|
20
|
+
protected createServiceMember(audienceMember: IClient) {
|
|
21
|
+
return props.createServiceMember(audienceMember);
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
return new c(props.container);
|
|
25
|
+
}
|
|
26
|
+
|
|
11
27
|
/**
|
|
12
28
|
* Base class for providing audience information for sessions interacting with {@link IFluidContainer}
|
|
13
29
|
*
|
|
@@ -17,6 +33,8 @@ import { IServiceAudience, IServiceAudienceEvents, IMember, Myself } from "./typ
|
|
|
17
33
|
* the user and client details returned in {@link IMember}.
|
|
18
34
|
*
|
|
19
35
|
* @typeParam M - A service-specific {@link IMember} implementation.
|
|
36
|
+
* @deprecated use {@link createServiceAudience} and {@link IServiceAudience} instead
|
|
37
|
+
* @internal
|
|
20
38
|
*/
|
|
21
39
|
export abstract class ServiceAudience<M extends IMember = IMember>
|
|
22
40
|
extends TypedEventEmitter<IServiceAudienceEvents<M>>
|
package/src/types.ts
CHANGED
|
@@ -9,12 +9,14 @@ import { IFluidDataStoreFactory } from "@fluidframework/runtime-definitions";
|
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* A mapping of string identifiers to instantiated `DataObject`s or `SharedObject`s.
|
|
12
|
+
* @alpha
|
|
12
13
|
*/
|
|
13
14
|
export type LoadableObjectRecord = Record<string, IFluidLoadable>;
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* A mapping of string identifiers to classes that will later be used to instantiate a corresponding `DataObject`
|
|
17
18
|
* or `SharedObject` in a {@link LoadableObjectRecord}.
|
|
19
|
+
* @alpha
|
|
18
20
|
*/
|
|
19
21
|
export type LoadableObjectClassRecord = Record<string, LoadableObjectClass<any>>;
|
|
20
22
|
|
|
@@ -22,6 +24,7 @@ export type LoadableObjectClassRecord = Record<string, LoadableObjectClass<any>>
|
|
|
22
24
|
* A class object of `DataObject` or `SharedObject`.
|
|
23
25
|
*
|
|
24
26
|
* @typeParam T - The class of the `DataObject` or `SharedObject`.
|
|
27
|
+
* @alpha
|
|
25
28
|
*/
|
|
26
29
|
export type LoadableObjectClass<T extends IFluidLoadable> =
|
|
27
30
|
| DataObjectClass<T>
|
|
@@ -32,6 +35,7 @@ export type LoadableObjectClass<T extends IFluidLoadable> =
|
|
|
32
35
|
* constructor that will return the type of the `DataObject`.
|
|
33
36
|
*
|
|
34
37
|
* @typeParam T - The class of the `DataObject`.
|
|
38
|
+
* @alpha
|
|
35
39
|
*/
|
|
36
40
|
export type DataObjectClass<T extends IFluidLoadable> = {
|
|
37
41
|
readonly factory: IFluidDataStoreFactory;
|
|
@@ -42,6 +46,7 @@ export type DataObjectClass<T extends IFluidLoadable> = {
|
|
|
42
46
|
* constructor that will return the type of the `DataObject`.
|
|
43
47
|
*
|
|
44
48
|
* @typeParam T - The class of the `SharedObject`.
|
|
49
|
+
* @alpha
|
|
45
50
|
*/
|
|
46
51
|
export type SharedObjectClass<T extends IFluidLoadable> = {
|
|
47
52
|
readonly getFactory: () => IChannelFactory;
|
|
@@ -51,6 +56,7 @@ export type SharedObjectClass<T extends IFluidLoadable> = {
|
|
|
51
56
|
* An object with a constructor that will return an {@link @fluidframework/core-interfaces#IFluidLoadable}.
|
|
52
57
|
*
|
|
53
58
|
* @typeParam T - The class of the loadable object.
|
|
59
|
+
* @alpha
|
|
54
60
|
*/
|
|
55
61
|
export type LoadableObjectCtor<T extends IFluidLoadable> = new (...args: any[]) => T;
|
|
56
62
|
|
|
@@ -61,6 +67,7 @@ export type LoadableObjectCtor<T extends IFluidLoadable> = new (...args: any[])
|
|
|
61
67
|
*
|
|
62
68
|
* It includes both the instances of objects that are initially available upon `Container` creation, as well
|
|
63
69
|
* as the types of objects that may be dynamically created throughout the lifetime of the `Container`.
|
|
70
|
+
* @alpha
|
|
64
71
|
*/
|
|
65
72
|
export interface ContainerSchema {
|
|
66
73
|
/**
|
|
@@ -96,11 +103,19 @@ export interface ContainerSchema {
|
|
|
96
103
|
dynamicObjectTypes?: LoadableObjectClass<any>[];
|
|
97
104
|
}
|
|
98
105
|
|
|
106
|
+
/**
|
|
107
|
+
* @internal
|
|
108
|
+
*/
|
|
109
|
+
export interface IProvideRootDataObject {
|
|
110
|
+
readonly IRootDataObject?: IRootDataObject;
|
|
111
|
+
}
|
|
112
|
+
|
|
99
113
|
/**
|
|
100
114
|
* Holds the collection of objects that the container was initially created with, as well as provides the ability
|
|
101
115
|
* to dynamically create further objects during usage.
|
|
116
|
+
* @internal
|
|
102
117
|
*/
|
|
103
|
-
export interface IRootDataObject {
|
|
118
|
+
export interface IRootDataObject extends IProvideRootDataObject {
|
|
104
119
|
/**
|
|
105
120
|
* Provides a record of the initial objects defined on creation.
|
|
106
121
|
*/
|
|
@@ -123,6 +138,7 @@ export interface IRootDataObject {
|
|
|
123
138
|
* @param member - The service-specific member object for the client.
|
|
124
139
|
*
|
|
125
140
|
* @see See {@link IServiceAudienceEvents} for usage details.
|
|
141
|
+
* @alpha
|
|
126
142
|
*/
|
|
127
143
|
export type MemberChangedListener<M extends IMember> = (clientId: string, member: M) => void;
|
|
128
144
|
|
|
@@ -135,6 +151,7 @@ export type MemberChangedListener<M extends IMember> = (clientId: string, member
|
|
|
135
151
|
* {@link IServiceAudience.getMembers} method will emit events.
|
|
136
152
|
*
|
|
137
153
|
* @typeParam M - A service-specific {@link IMember} implementation.
|
|
154
|
+
* @alpha
|
|
138
155
|
*/
|
|
139
156
|
export interface IServiceAudienceEvents<M extends IMember> extends IEvent {
|
|
140
157
|
/**
|
|
@@ -168,6 +185,7 @@ export interface IServiceAudienceEvents<M extends IMember> extends IEvent {
|
|
|
168
185
|
* details about the connecting client, such as device information, environment, or a username.
|
|
169
186
|
*
|
|
170
187
|
* @typeParam M - A service-specific {@link IMember} type.
|
|
188
|
+
* @alpha
|
|
171
189
|
*/
|
|
172
190
|
export interface IServiceAudience<M extends IMember>
|
|
173
191
|
extends IEventProvider<IServiceAudienceEvents<M>> {
|
|
@@ -188,6 +206,7 @@ export interface IServiceAudience<M extends IMember>
|
|
|
188
206
|
* Base interface for information for each connection made to the Fluid session.
|
|
189
207
|
*
|
|
190
208
|
* @remarks This interface can be extended to provide additional information specific to each service.
|
|
209
|
+
* @alpha
|
|
191
210
|
*/
|
|
192
211
|
export interface IConnection {
|
|
193
212
|
/**
|
|
@@ -205,6 +224,7 @@ export interface IConnection {
|
|
|
205
224
|
* Base interface to be implemented to fetch each service's member.
|
|
206
225
|
*
|
|
207
226
|
* @remarks This interface can be extended by each service to provide additional service-specific user metadata.
|
|
227
|
+
* @alpha
|
|
208
228
|
*/
|
|
209
229
|
export interface IMember {
|
|
210
230
|
/**
|
|
@@ -220,5 +240,6 @@ export interface IMember {
|
|
|
220
240
|
|
|
221
241
|
/**
|
|
222
242
|
* An extended member object that includes currentConnection
|
|
243
|
+
* @alpha
|
|
223
244
|
*/
|
|
224
245
|
export type Myself<M extends IMember = IMember> = M & { currentConnection: string };
|