TinyliciousClient Class
Provides the ability to have a Fluid object backed by a Tinylicious service.
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
Signature
/** @sealed */
export declare class TinyliciousClient
Constructors
Constructor | Description |
---|---|
(constructor)(properties) | Creates a new client instance using configuration parameters. |
Methods
Method | Return Type | Description |
---|---|---|
createContainer(containerSchema, compatibilityMode) | Promise<{ container: IFluidContainer<TContainerSchema>; services: TinyliciousContainerServices; }> | Creates a new detached container instance in Tinylicious server. |
getContainer(id, containerSchema, compatibilityMode) | Promise<{ container: IFluidContainer<TContainerSchema>; services: TinyliciousContainerServices; }> | Accesses the existing container given its unique ID in the tinylicious server. |
Constructor Details
(constructor)
Creates a new client instance using configuration parameters.
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
Signature
constructor(properties?: TinyliciousClientProps);
Parameters
Parameter | Modifiers | Type | Description |
---|---|---|---|
properties | optional | TinyliciousClientProps | Optional. Properties for initializing a new TinyliciousClient instance |
Method Details
createContainer
Creates a new detached container instance in Tinylicious server.
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
Signature
createContainer<TContainerSchema extends ContainerSchema>(containerSchema: TContainerSchema, compatibilityMode: CompatibilityMode): Promise<{
container: IFluidContainer<TContainerSchema>;
services: TinyliciousContainerServices;
}>;
Type Parameters
Parameter | Constraint | Description |
---|---|---|
TContainerSchema | ContainerSchema |
Parameters
Parameter | Type | Description |
---|---|---|
containerSchema | TContainerSchema | Container schema for the new container. |
compatibilityMode | CompatibilityMode | Compatibility mode the container should run in. |
Returns
New detached container instance along with associated services.
Return type: Promise<{ container: IFluidContainer<TContainerSchema>; services: TinyliciousContainerServices; }>
getContainer
Accesses the existing container given its unique ID in the tinylicious server.
This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.
Signature
getContainer<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema, compatibilityMode: CompatibilityMode): Promise<{
container: IFluidContainer<TContainerSchema>;
services: TinyliciousContainerServices;
}>;
Type Parameters
Parameter | Constraint | Description |
---|---|---|
TContainerSchema | ContainerSchema |
Parameters
Parameter | Type | Description |
---|---|---|
id | string | Unique ID of the container. |
containerSchema | TContainerSchema | Container schema used to access data objects in the container. |
compatibilityMode | CompatibilityMode | Compatibility mode the container should run in. |
Returns
Existing container instance along with associated services.
Return type: Promise<{ container: IFluidContainer<TContainerSchema>; services: TinyliciousContainerServices; }>