@fluidframework/aqueduct 2.0.0-dev.7.4.0.215930 → 2.0.0-dev.7.4.0.216897
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/dist/aqueduct-alpha.d.ts +78 -425
- package/dist/aqueduct-beta.d.ts +78 -425
- package/dist/aqueduct-public.d.ts +78 -425
- package/dist/aqueduct-untrimmed.d.ts +16 -15
- package/dist/container-runtime-factories/baseContainerRuntimeFactory.cjs +1 -1
- package/dist/container-runtime-factories/baseContainerRuntimeFactory.cjs.map +1 -1
- package/dist/container-runtime-factories/baseContainerRuntimeFactory.d.ts +1 -1
- package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.cjs +1 -1
- package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.cjs.map +1 -1
- package/dist/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.d.ts +1 -1
- package/dist/data-object-factories/dataObjectFactory.cjs +1 -1
- package/dist/data-object-factories/dataObjectFactory.cjs.map +1 -1
- package/dist/data-object-factories/dataObjectFactory.d.ts +1 -1
- package/dist/data-object-factories/pureDataObjectFactory.cjs +1 -1
- package/dist/data-object-factories/pureDataObjectFactory.cjs.map +1 -1
- package/dist/data-object-factories/pureDataObjectFactory.d.ts +3 -2
- package/dist/data-object-factories/pureDataObjectFactory.d.ts.map +1 -1
- package/dist/data-objects/dataObject.cjs +1 -1
- package/dist/data-objects/dataObject.cjs.map +1 -1
- package/dist/data-objects/dataObject.d.ts +1 -1
- package/dist/data-objects/pureDataObject.cjs +1 -1
- package/dist/data-objects/pureDataObject.cjs.map +1 -1
- package/dist/data-objects/pureDataObject.d.ts +1 -1
- package/dist/data-objects/types.cjs.map +1 -1
- package/dist/data-objects/types.d.ts +2 -2
- package/dist/request-handlers/requestHandlers.cjs +3 -3
- package/dist/request-handlers/requestHandlers.cjs.map +1 -1
- package/dist/request-handlers/requestHandlers.d.ts +3 -3
- package/dist/utils/containerInteractions.cjs +3 -3
- package/dist/utils/containerInteractions.cjs.map +1 -1
- package/dist/utils/containerInteractions.d.ts +3 -3
- package/lib/aqueduct-alpha.d.ts +78 -425
- package/lib/aqueduct-beta.d.ts +78 -425
- package/lib/aqueduct-public.d.ts +78 -425
- package/lib/aqueduct-untrimmed.d.ts +16 -15
- package/lib/container-runtime-factories/baseContainerRuntimeFactory.mjs +1 -1
- package/lib/container-runtime-factories/baseContainerRuntimeFactory.mjs.map +1 -1
- package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.mjs +1 -1
- package/lib/container-runtime-factories/containerRuntimeFactoryWithDefaultDataStore.mjs.map +1 -1
- package/lib/data-object-factories/dataObjectFactory.mjs +1 -1
- package/lib/data-object-factories/dataObjectFactory.mjs.map +1 -1
- package/lib/data-object-factories/pureDataObjectFactory.mjs +1 -1
- package/lib/data-object-factories/pureDataObjectFactory.mjs.map +1 -1
- package/lib/data-objects/dataObject.mjs +1 -1
- package/lib/data-objects/dataObject.mjs.map +1 -1
- package/lib/data-objects/pureDataObject.mjs +1 -1
- package/lib/data-objects/pureDataObject.mjs.map +1 -1
- package/lib/data-objects/types.mjs.map +1 -1
- package/lib/request-handlers/requestHandlers.mjs +3 -3
- package/lib/request-handlers/requestHandlers.mjs.map +1 -1
- package/lib/utils/containerInteractions.mjs +3 -3
- package/lib/utils/containerInteractions.mjs.map +1 -1
- package/package.json +18 -17
package/lib/aqueduct-beta.d.ts
CHANGED
|
@@ -13,446 +13,99 @@
|
|
|
13
13
|
* @packageDocumentation
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
import { ContainerRuntime } from '@fluidframework/container-runtime';
|
|
18
|
-
import { FluidDataStoreRuntime } from '@fluidframework/datastore';
|
|
19
|
-
import { FluidObject } from '@fluidframework/core-interfaces';
|
|
20
|
-
import { FluidObjectSymbolProvider } from '@fluidframework/synthesize';
|
|
21
|
-
import { IChannelFactory } from '@fluidframework/datastore-definitions';
|
|
22
|
-
import { IContainer } from '@fluidframework/container-definitions';
|
|
23
|
-
import { IContainerContext } from '@fluidframework/container-definitions';
|
|
24
|
-
import { IContainerRuntime } from '@fluidframework/container-runtime-definitions';
|
|
25
|
-
import { IContainerRuntimeBase } from '@fluidframework/runtime-definitions';
|
|
26
|
-
import { IContainerRuntimeOptions } from '@fluidframework/container-runtime';
|
|
27
|
-
import { IEvent } from '@fluidframework/core-interfaces';
|
|
28
|
-
import { IFluidDataStoreContext } from '@fluidframework/runtime-definitions';
|
|
29
|
-
import { IFluidDataStoreContextDetached } from '@fluidframework/runtime-definitions';
|
|
30
|
-
import { IFluidDataStoreFactory } from '@fluidframework/runtime-definitions';
|
|
31
|
-
import { IFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
|
|
32
|
-
import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
|
|
33
|
-
import { IFluidDependencySynthesizer } from '@fluidframework/synthesize';
|
|
34
|
-
import { IFluidHandle } from '@fluidframework/core-interfaces';
|
|
35
|
-
import { IFluidLoadable } from '@fluidframework/core-interfaces';
|
|
36
|
-
import type { IFluidMountableViewClass } from '@fluidframework/view-interfaces';
|
|
37
|
-
import { IFluidRouter } from '@fluidframework/core-interfaces';
|
|
38
|
-
import { IProvideFluidDataStoreRegistry } from '@fluidframework/runtime-definitions';
|
|
39
|
-
import { IProvideFluidHandle } from '@fluidframework/core-interfaces';
|
|
40
|
-
import { IRequest } from '@fluidframework/core-interfaces';
|
|
41
|
-
import { IResponse } from '@fluidframework/core-interfaces';
|
|
42
|
-
import { ISharedDirectory } from '@fluidframework/map';
|
|
43
|
-
import { NamedFluidDataStoreRegistryEntries } from '@fluidframework/runtime-definitions';
|
|
44
|
-
import { NamedFluidDataStoreRegistryEntry } from '@fluidframework/runtime-definitions';
|
|
45
|
-
import { RequestParser } from '@fluidframework/runtime-utils';
|
|
46
|
-
import { RuntimeFactoryHelper } from '@fluidframework/runtime-utils';
|
|
47
|
-
import { RuntimeRequestHandler } from '@fluidframework/request-handler';
|
|
16
|
+
/* Excluded from this release type: AsyncFluidObjectProvider */
|
|
48
17
|
|
|
49
|
-
|
|
50
|
-
* BaseContainerRuntimeFactory produces container runtimes with the specified data store and service registries,
|
|
51
|
-
* request handlers, runtimeOptions, and entryPoint initialization function.
|
|
52
|
-
* It can be subclassed to implement a first-time initialization procedure for the containers it creates.
|
|
53
|
-
* @public
|
|
54
|
-
*/
|
|
55
|
-
export declare class BaseContainerRuntimeFactory extends RuntimeFactoryHelper implements IProvideFluidDataStoreRegistry {
|
|
56
|
-
get IFluidDataStoreRegistry(): IFluidDataStoreRegistry;
|
|
57
|
-
private readonly registry;
|
|
58
|
-
private readonly registryEntries;
|
|
59
|
-
private readonly dependencyContainer?;
|
|
60
|
-
private readonly runtimeOptions?;
|
|
61
|
-
private readonly requestHandlers;
|
|
62
|
-
private readonly provideEntryPoint;
|
|
63
|
-
/**
|
|
64
|
-
* @param registryEntries - The data store registry for containers produced
|
|
65
|
-
* @param dependencyContainer - deprecated, will be removed in a future release
|
|
66
|
-
* @param requestHandlers - Request handlers for containers produced
|
|
67
|
-
* @param runtimeOptions - The runtime options passed to the ContainerRuntime when instantiating it
|
|
68
|
-
* @param provideEntryPoint - Function that will initialize the entryPoint of the ContainerRuntime instances
|
|
69
|
-
* created with this factory
|
|
70
|
-
*/
|
|
71
|
-
constructor(props: {
|
|
72
|
-
registryEntries: NamedFluidDataStoreRegistryEntries;
|
|
73
|
-
dependencyContainer?: IFluidDependencySynthesizer;
|
|
74
|
-
/** @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md */
|
|
75
|
-
requestHandlers?: RuntimeRequestHandler[];
|
|
76
|
-
runtimeOptions?: IContainerRuntimeOptions;
|
|
77
|
-
provideEntryPoint: (runtime: IContainerRuntime) => Promise<FluidObject>;
|
|
78
|
-
});
|
|
79
|
-
instantiateFirstTime(runtime: ContainerRuntime): Promise<void>;
|
|
80
|
-
instantiateFromExisting(runtime: ContainerRuntime): Promise<void>;
|
|
81
|
-
preInitialize(context: IContainerContext, existing: boolean): Promise<ContainerRuntime>;
|
|
82
|
-
/**
|
|
83
|
-
* Subclasses may override containerInitializingFirstTime to perform any setup steps at the time the container
|
|
84
|
-
* is created. This likely includes creating any initial data stores that are expected to be there at the outset.
|
|
85
|
-
* @param runtime - The container runtime for the container being initialized
|
|
86
|
-
*/
|
|
87
|
-
protected containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void>;
|
|
88
|
-
/**
|
|
89
|
-
* Subclasses may override containerHasInitialized to perform any steps after the container has initialized.
|
|
90
|
-
* This likely includes loading any data stores that are expected to be there at the outset.
|
|
91
|
-
* @param runtime - The container runtime for the container being initialized
|
|
92
|
-
*/
|
|
93
|
-
protected containerHasInitialized(runtime: IContainerRuntime): Promise<void>;
|
|
94
|
-
}
|
|
18
|
+
/* Excluded from this release type: BaseContainerRuntimeFactory */
|
|
95
19
|
|
|
96
|
-
|
|
97
|
-
* A ContainerRuntimeFactory that initializes Containers with a single default data store, which can be requested from
|
|
98
|
-
* the container with an empty URL.
|
|
99
|
-
*
|
|
100
|
-
* This factory should be exposed as fluidExport off the entry point to your module.
|
|
101
|
-
* @public
|
|
102
|
-
*/
|
|
103
|
-
export declare class ContainerRuntimeFactoryWithDefaultDataStore extends BaseContainerRuntimeFactory {
|
|
104
|
-
static readonly defaultDataStoreId = "default";
|
|
105
|
-
protected readonly defaultFactory: IFluidDataStoreFactory;
|
|
106
|
-
/**
|
|
107
|
-
* Constructor
|
|
108
|
-
* @param defaultFactory -
|
|
109
|
-
* @param registryEntries -
|
|
110
|
-
* @param dependencyContainer - deprecated, will be removed in a future release
|
|
111
|
-
* @param requestHandlers -
|
|
112
|
-
* @param runtimeOptions -
|
|
113
|
-
* @param provideEntryPoint -
|
|
114
|
-
*/
|
|
115
|
-
constructor(props: {
|
|
116
|
-
defaultFactory: IFluidDataStoreFactory;
|
|
117
|
-
registryEntries: NamedFluidDataStoreRegistryEntries;
|
|
118
|
-
dependencyContainer?: IFluidDependencySynthesizer;
|
|
119
|
-
/** @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md */
|
|
120
|
-
requestHandlers?: RuntimeRequestHandler[];
|
|
121
|
-
runtimeOptions?: IContainerRuntimeOptions;
|
|
122
|
-
provideEntryPoint?: (runtime: IContainerRuntime) => Promise<FluidObject>;
|
|
123
|
-
});
|
|
124
|
-
/**
|
|
125
|
-
* {@inheritDoc BaseContainerRuntimeFactory.containerInitializingFirstTime}
|
|
126
|
-
*/
|
|
127
|
-
protected containerInitializingFirstTime(runtime: IContainerRuntime): Promise<void>;
|
|
128
|
-
}
|
|
20
|
+
/* Excluded from this release type: ContainerRuntime */
|
|
129
21
|
|
|
130
|
-
|
|
131
|
-
* DataObject is a base data store that is primed with a root directory. It
|
|
132
|
-
* ensures that it is created and ready before you can access it.
|
|
133
|
-
*
|
|
134
|
-
* Having a single root directory allows for easier development. Instead of creating
|
|
135
|
-
* and registering channels with the runtime any new DDS that is set on the root
|
|
136
|
-
* will automatically be registered.
|
|
137
|
-
*
|
|
138
|
-
* @typeParam I - The optional input types used to strongly type the data object
|
|
139
|
-
* @public
|
|
140
|
-
*/
|
|
141
|
-
export declare abstract class DataObject<I extends DataObjectTypes = DataObjectTypes> extends PureDataObject<I> {
|
|
142
|
-
private internalRoot;
|
|
143
|
-
private readonly rootDirectoryId;
|
|
144
|
-
/**
|
|
145
|
-
* The root directory will either be ready or will return an error. If an error is thrown
|
|
146
|
-
* the root has not been correctly created/set.
|
|
147
|
-
*/
|
|
148
|
-
protected get root(): ISharedDirectory;
|
|
149
|
-
/**
|
|
150
|
-
* Initializes internal objects and calls initialization overrides.
|
|
151
|
-
* Caller is responsible for ensuring this is only invoked once.
|
|
152
|
-
*/
|
|
153
|
-
initializeInternal(existing: boolean): Promise<void>;
|
|
154
|
-
/**
|
|
155
|
-
* Generates an error string indicating an item is uninitialized.
|
|
156
|
-
* @param item - The name of the item that was uninitialized.
|
|
157
|
-
*/
|
|
158
|
-
protected getUninitializedErrorString(item: string): string;
|
|
159
|
-
}
|
|
22
|
+
/* Excluded from this release type: ContainerRuntimeFactoryWithDefaultDataStore */
|
|
160
23
|
|
|
161
|
-
|
|
162
|
-
* DataObjectFactory is the IFluidDataStoreFactory for use with DataObjects.
|
|
163
|
-
* It facilitates DataObject's features (such as its shared directory) by
|
|
164
|
-
* ensuring relevant shared objects etc are available to the factory.
|
|
165
|
-
*
|
|
166
|
-
* @typeParam TObj - DataObject (concrete type)
|
|
167
|
-
* @typeParam I - The input types for the DataObject
|
|
168
|
-
* @public
|
|
169
|
-
*/
|
|
170
|
-
export declare class DataObjectFactory<TObj extends DataObject<I>, I extends DataObjectTypes = DataObjectTypes> extends PureDataObjectFactory<TObj, I> {
|
|
171
|
-
constructor(type: string, ctor: new (props: IDataObjectProps<I>) => TObj, sharedObjects: readonly IChannelFactory[] | undefined, optionalProviders: FluidObjectSymbolProvider<I["OptionalProviders"]>, registryEntries?: NamedFluidDataStoreRegistryEntries, runtimeFactory?: typeof FluidDataStoreRuntime);
|
|
172
|
-
}
|
|
24
|
+
/* Excluded from this release type: DataObject */
|
|
173
25
|
|
|
174
|
-
|
|
175
|
-
* This type is used as the base generic input to DataObject and PureDataObject.
|
|
176
|
-
* @public
|
|
177
|
-
*/
|
|
178
|
-
export declare interface DataObjectTypes {
|
|
179
|
-
/**
|
|
180
|
-
* represents a type that will define optional providers that will be injected
|
|
181
|
-
*/
|
|
182
|
-
OptionalProviders?: FluidObject;
|
|
183
|
-
/**
|
|
184
|
-
* the initial state type that the produced data object may take during creation
|
|
185
|
-
*/
|
|
186
|
-
InitialState?: any;
|
|
187
|
-
/**
|
|
188
|
-
* represents events that will be available in the EventForwarder
|
|
189
|
-
*/
|
|
190
|
-
Events?: IEvent;
|
|
191
|
-
}
|
|
26
|
+
/* Excluded from this release type: DataObjectFactory */
|
|
192
27
|
|
|
193
|
-
|
|
194
|
-
* Default request handler for a Fluid object that returns the object itself if:
|
|
195
|
-
*
|
|
196
|
-
* 1. the request url is empty
|
|
197
|
-
*
|
|
198
|
-
* 2. the request url is "/"
|
|
199
|
-
*
|
|
200
|
-
* 3. the request url starts with "/" and is followed by a query param, such as /?key=value
|
|
201
|
-
*
|
|
202
|
-
* Returns a 404 error for any other url.
|
|
203
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
204
|
-
* @public
|
|
205
|
-
*/
|
|
206
|
-
export declare function defaultFluidObjectRequestHandler(fluidObject: FluidObject, request: IRequest): IResponse;
|
|
28
|
+
/* Excluded from this release type: DataObjectTypes */
|
|
207
29
|
|
|
208
|
-
|
|
209
|
-
* Pipe through container request into internal request.
|
|
210
|
-
* If request is empty and default url is provided, redirect request to such default url.
|
|
211
|
-
* @param defaultRootId - optional default root data store ID to pass request in case request is empty.
|
|
212
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
213
|
-
* @public
|
|
214
|
-
*/
|
|
215
|
-
export declare const defaultRouteRequestHandler: (defaultRootId: string) => (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse | undefined>;
|
|
30
|
+
/* Excluded from this release type: defaultFluidObjectRequestHandler */
|
|
216
31
|
|
|
217
|
-
|
|
218
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
219
|
-
* Helper function for getting the default Fluid Object from a Container. This function only works for
|
|
220
|
-
* Containers that support "/" request.
|
|
221
|
-
*
|
|
222
|
-
* @typeParam T - Defines the type you expect to be returned.
|
|
223
|
-
*
|
|
224
|
-
* @param container - Container you're attempting to get the object from
|
|
225
|
-
* @public
|
|
226
|
-
*/
|
|
227
|
-
export declare function getDefaultObjectFromContainer<T = FluidObject>(container: IContainer): Promise<T>;
|
|
32
|
+
/* Excluded from this release type: defaultRouteRequestHandler */
|
|
228
33
|
|
|
229
|
-
|
|
230
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
231
|
-
* Helper function for getting a Fluid Object from a Container given a path/url. This function only works for
|
|
232
|
-
* Containers that support getting FluidObjects via request.
|
|
233
|
-
*
|
|
234
|
-
* @typeParam T - Defines the type you expect to be returned.
|
|
235
|
-
*
|
|
236
|
-
* @param path - Unique path/url of the FluidObject
|
|
237
|
-
* @param container - Container you're attempting to get the object from
|
|
238
|
-
* @public
|
|
239
|
-
*/
|
|
240
|
-
export declare function getObjectFromContainer<T = FluidObject>(path: string, container: IContainer): Promise<T>;
|
|
34
|
+
/* Excluded from this release type: FluidDataStoreRuntime */
|
|
241
35
|
|
|
242
|
-
|
|
243
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
244
|
-
* Helper function for getting as Fluid Object from a Container given a Unique Id. This function only works for
|
|
245
|
-
* Containers that support getting FluidObjects via request.
|
|
246
|
-
*
|
|
247
|
-
* @typeParam T - Defines the type you expect to be returned.
|
|
248
|
-
*
|
|
249
|
-
* @param id - Unique id of the FluidObject
|
|
250
|
-
* @param container - Container you're attempting to get the object from
|
|
251
|
-
* @public
|
|
252
|
-
*/
|
|
253
|
-
export declare function getObjectWithIdFromContainer<T = FluidObject>(id: string, container: IContainer): Promise<T>;
|
|
36
|
+
/* Excluded from this release type: FluidObject */
|
|
254
37
|
|
|
255
|
-
|
|
256
|
-
* @public
|
|
257
|
-
*/
|
|
258
|
-
export declare interface IDataObjectProps<I extends DataObjectTypes = DataObjectTypes> {
|
|
259
|
-
readonly runtime: IFluidDataStoreRuntime;
|
|
260
|
-
readonly context: IFluidDataStoreContext;
|
|
261
|
-
readonly providers: AsyncFluidObjectProvider<I["OptionalProviders"]>;
|
|
262
|
-
readonly initProps?: I["InitialState"];
|
|
263
|
-
}
|
|
38
|
+
/* Excluded from this release type: FluidObjectSymbolProvider */
|
|
264
39
|
|
|
265
|
-
|
|
266
|
-
* Useful interface in places where it's useful to do type erasure for PureDataObject generic
|
|
267
|
-
* @public
|
|
268
|
-
*/
|
|
269
|
-
export declare interface IRootDataObjectFactory extends IFluidDataStoreFactory {
|
|
270
|
-
createRootInstance(rootDataStoreId: string, runtime: IContainerRuntime): Promise<IFluidRouter>;
|
|
271
|
-
}
|
|
40
|
+
/* Excluded from this release type: getDefaultObjectFromContainer */
|
|
272
41
|
|
|
273
|
-
|
|
274
|
-
* A mountable view is only required if the view needs to be mounted across a bundle boundary. Mounting across
|
|
275
|
-
* bundle boundaries breaks some frameworks, so the mountable view is used to ensure the mounting is done within
|
|
276
|
-
* the same bundle as the view. For example, React hooks don't work if mounted across bundles since there will
|
|
277
|
-
* be two React instances, breaking the Rules of Hooks. When cross-bundle mounting isn't required, the mountable
|
|
278
|
-
* view isn't necessary.
|
|
279
|
-
*
|
|
280
|
-
* When a request is received with a mountableView: true header, this request handler will reissue the request
|
|
281
|
-
* without the header, and respond with a mountable view of the given class using the response.
|
|
282
|
-
* @param MountableViewClass - The type of mountable view to use when responding
|
|
283
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
284
|
-
* @public
|
|
285
|
-
*/
|
|
286
|
-
export declare const mountableViewRequestHandler: (MountableViewClass: IFluidMountableViewClass, handlers: RuntimeRequestHandler[]) => (request: RequestParser, runtime: IContainerRuntime) => Promise<IResponse>;
|
|
42
|
+
/* Excluded from this release type: getObjectFromContainer */
|
|
287
43
|
|
|
288
|
-
|
|
289
|
-
* This is a bare-bones base class that does basic setup and enables for factory on an initialize call.
|
|
290
|
-
* You probably don't want to inherit from this data store directly unless
|
|
291
|
-
* you are creating another base data store class
|
|
292
|
-
*
|
|
293
|
-
* @typeParam I - The optional input types used to strongly type the data object
|
|
294
|
-
* @public
|
|
295
|
-
*/
|
|
296
|
-
export declare abstract class PureDataObject<I extends DataObjectTypes = DataObjectTypes> extends TypedEventEmitter<I["Events"] & IEvent> implements IFluidLoadable, IFluidRouter, IProvideFluidHandle {
|
|
297
|
-
/**
|
|
298
|
-
* This is your FluidDataStoreRuntime object
|
|
299
|
-
*/
|
|
300
|
-
protected readonly runtime: IFluidDataStoreRuntime;
|
|
301
|
-
/**
|
|
302
|
-
* This context is used to talk up to the ContainerRuntime
|
|
303
|
-
*/
|
|
304
|
-
protected readonly context: IFluidDataStoreContext;
|
|
305
|
-
/**
|
|
306
|
-
* Providers are FluidObject keyed objects that provide back
|
|
307
|
-
* a promise to the corresponding FluidObject or undefined.
|
|
308
|
-
* Providers injected/provided by the Container and/or HostingApplication
|
|
309
|
-
*
|
|
310
|
-
* To define providers set FluidObject interfaces in the OptionalProviders generic type for your data store
|
|
311
|
-
*/
|
|
312
|
-
protected readonly providers: AsyncFluidObjectProvider<I["OptionalProviders"]>;
|
|
313
|
-
protected initProps?: I["InitialState"];
|
|
314
|
-
protected initializeP: Promise<void> | undefined;
|
|
315
|
-
get id(): string;
|
|
316
|
-
/**
|
|
317
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
318
|
-
*/
|
|
319
|
-
get IFluidRouter(): this;
|
|
320
|
-
get IFluidLoadable(): this;
|
|
321
|
-
get IFluidHandle(): IFluidHandle<this>;
|
|
322
|
-
/**
|
|
323
|
-
* Handle to a data store
|
|
324
|
-
*/
|
|
325
|
-
get handle(): IFluidHandle<this>;
|
|
326
|
-
static getDataObject(runtime: IFluidDataStoreRuntime): Promise<PureDataObject<DataObjectTypes>>;
|
|
327
|
-
constructor(props: IDataObjectProps<I>);
|
|
328
|
-
/**
|
|
329
|
-
* Return this object if someone requests it directly
|
|
330
|
-
* We will return this object in two scenarios:
|
|
331
|
-
*
|
|
332
|
-
* 1. the request url is a "/"
|
|
333
|
-
*
|
|
334
|
-
* 2. the request url is empty
|
|
335
|
-
*/
|
|
336
|
-
request(req: IRequest): Promise<IResponse>;
|
|
337
|
-
/**
|
|
338
|
-
* Call this API to ensure PureDataObject is fully initialized.
|
|
339
|
-
* Initialization happens on demand, only on as-needed bases.
|
|
340
|
-
* In most cases you should allow factory/object to decide when to finish initialization.
|
|
341
|
-
* But if you are supplying your own implementation of DataStoreRuntime factory and overriding some methods
|
|
342
|
-
* and need a fully initialized object, then you can call this API to ensure object is fully initialized.
|
|
343
|
-
*/
|
|
344
|
-
finishInitialization(existing: boolean): Promise<void>;
|
|
345
|
-
/**
|
|
346
|
-
* Internal initialize implementation. Overwriting this will change the flow of the PureDataObject and should
|
|
347
|
-
* generally not be done.
|
|
348
|
-
*
|
|
349
|
-
* Calls initializingFirstTime, initializingFromExisting, and hasInitialized. Caller is
|
|
350
|
-
* responsible for ensuring this is only invoked once.
|
|
351
|
-
*/
|
|
352
|
-
initializeInternal(existing: boolean): Promise<void>;
|
|
353
|
-
/**
|
|
354
|
-
* Called every time the data store is initialized, before initializingFirstTime or
|
|
355
|
-
* initializingFromExisting is called.
|
|
356
|
-
*/
|
|
357
|
-
protected preInitialize(): Promise<void>;
|
|
358
|
-
/**
|
|
359
|
-
* Called the first time the data store is initialized (new creations with a new
|
|
360
|
-
* data store runtime)
|
|
361
|
-
*
|
|
362
|
-
* @param props - Optional props to be passed in on create
|
|
363
|
-
*/
|
|
364
|
-
protected initializingFirstTime(props?: I["InitialState"]): Promise<void>;
|
|
365
|
-
/**
|
|
366
|
-
* Called every time but the first time the data store is initialized (creations
|
|
367
|
-
* with an existing data store runtime)
|
|
368
|
-
*/
|
|
369
|
-
protected initializingFromExisting(): Promise<void>;
|
|
370
|
-
/**
|
|
371
|
-
* Called every time the data store is initialized after create or existing.
|
|
372
|
-
*/
|
|
373
|
-
protected hasInitialized(): Promise<void>;
|
|
374
|
-
}
|
|
44
|
+
/* Excluded from this release type: getObjectWithIdFromContainer */
|
|
375
45
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
*/
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
* They get attached only when a handle to one of them is attached to already attached objects.
|
|
440
|
-
*/
|
|
441
|
-
createInstance(runtime: IContainerRuntimeBase, initialState?: I["InitialState"]): Promise<TObj>;
|
|
442
|
-
/**
|
|
443
|
-
* Creates a new root instance of the object. Uses container's registry to find this factory.
|
|
444
|
-
* It's expected that only container owners would use this functionality, as only such developers
|
|
445
|
-
* have knowledge of entries in container registry.
|
|
446
|
-
* The name in this registry for such record should match type of this factory.
|
|
447
|
-
* @param runtime - container runtime. It's registry is used to create an object.
|
|
448
|
-
* @param initialState - The initial state to provide to the created component.
|
|
449
|
-
* @returns an object created by this factory. Data store and objects created are not attached to container.
|
|
450
|
-
* They get attached only when a handle to one of them is attached to already attached objects.
|
|
451
|
-
*/
|
|
452
|
-
createRootInstance(rootDataStoreId: string, runtime: IContainerRuntime, initialState?: I["InitialState"]): Promise<TObj>;
|
|
453
|
-
protected createNonRootInstanceCore(containerRuntime: IContainerRuntimeBase, packagePath: Readonly<string[]>, initialState?: I["InitialState"]): Promise<TObj>;
|
|
454
|
-
protected createInstanceCore(context: IFluidDataStoreContextDetached, initialState?: I["InitialState"]): Promise<TObj>;
|
|
455
|
-
}
|
|
46
|
+
/* Excluded from this release type: IChannelFactory */
|
|
47
|
+
|
|
48
|
+
/* Excluded from this release type: IContainer */
|
|
49
|
+
|
|
50
|
+
/* Excluded from this release type: IContainerContext */
|
|
51
|
+
|
|
52
|
+
/* Excluded from this release type: IContainerRuntime */
|
|
53
|
+
|
|
54
|
+
/* Excluded from this release type: IContainerRuntimeBase */
|
|
55
|
+
|
|
56
|
+
/* Excluded from this release type: IContainerRuntimeOptions */
|
|
57
|
+
|
|
58
|
+
/* Excluded from this release type: IDataObjectProps */
|
|
59
|
+
|
|
60
|
+
/* Excluded from this release type: IEvent */
|
|
61
|
+
|
|
62
|
+
/* Excluded from this release type: IFluidDataStoreContext */
|
|
63
|
+
|
|
64
|
+
/* Excluded from this release type: IFluidDataStoreContextDetached */
|
|
65
|
+
|
|
66
|
+
/* Excluded from this release type: IFluidDataStoreFactory */
|
|
67
|
+
|
|
68
|
+
/* Excluded from this release type: IFluidDataStoreRegistry */
|
|
69
|
+
|
|
70
|
+
/* Excluded from this release type: IFluidDataStoreRuntime */
|
|
71
|
+
|
|
72
|
+
/* Excluded from this release type: IFluidDependencySynthesizer */
|
|
73
|
+
|
|
74
|
+
/* Excluded from this release type: IFluidHandle */
|
|
75
|
+
|
|
76
|
+
/* Excluded from this release type: IFluidLoadable */
|
|
77
|
+
|
|
78
|
+
/* Excluded from this release type: IFluidMountableViewClass */
|
|
79
|
+
|
|
80
|
+
/* Excluded from this release type: IFluidRouter */
|
|
81
|
+
|
|
82
|
+
/* Excluded from this release type: IProvideFluidDataStoreRegistry */
|
|
83
|
+
|
|
84
|
+
/* Excluded from this release type: IProvideFluidHandle */
|
|
85
|
+
|
|
86
|
+
/* Excluded from this release type: IRequest */
|
|
87
|
+
|
|
88
|
+
/* Excluded from this release type: IResponse */
|
|
89
|
+
|
|
90
|
+
/* Excluded from this release type: IRootDataObjectFactory */
|
|
91
|
+
|
|
92
|
+
/* Excluded from this release type: ISharedDirectory */
|
|
93
|
+
|
|
94
|
+
/* Excluded from this release type: mountableViewRequestHandler */
|
|
95
|
+
|
|
96
|
+
/* Excluded from this release type: NamedFluidDataStoreRegistryEntries */
|
|
97
|
+
|
|
98
|
+
/* Excluded from this release type: NamedFluidDataStoreRegistryEntry */
|
|
99
|
+
|
|
100
|
+
/* Excluded from this release type: PureDataObject */
|
|
101
|
+
|
|
102
|
+
/* Excluded from this release type: PureDataObjectFactory */
|
|
103
|
+
|
|
104
|
+
/* Excluded from this release type: RequestParser */
|
|
105
|
+
|
|
106
|
+
/* Excluded from this release type: RuntimeFactoryHelper */
|
|
107
|
+
|
|
108
|
+
/* Excluded from this release type: RuntimeRequestHandler */
|
|
456
109
|
|
|
457
110
|
/* Excluded from this release type: TypedEventEmitter */
|
|
458
111
|
|