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 | Alerts | Return Type | Description |
|---|---|---|---|
| createContainer(containerSchema, oldestSupportedClient) | Promise<{ container: IFluidContainer<TContainerSchema>; services: TinyliciousContainerServices; }> | Creates a new detached container instance in Tinylicious server. | |
| createContainer(containerSchema, compatibilityMode) | Deprecated | Promise<{ container: IFluidContainer<TContainerSchema>; services: TinyliciousContainerServices; }> | Creates a new detached container instance in Tinylicious server. |
| getContainer(id, containerSchema, oldestSupportedClient) | Promise<{ container: IFluidContainer<TContainerSchema>; services: TinyliciousContainerServices; }> | Accesses the existing container given its unique ID in the tinylicious server. | |
| getContainer(id, containerSchema, compatibilityMode) | Deprecated | 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.
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.
Signature
createContainer<TContainerSchema extends ContainerSchema>(containerSchema: TContainerSchema, oldestSupportedClient: OldestSupportedClientVersion): 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. |
| oldestSupportedClient | OldestSupportedClientVersion | Oldest Fluid Framework client version that must be able to open and process documents written by this client. Choosing an older version may limit available features and write formats. |
Returns
New detached container instance along with associated services.
Return type: Promise<{ container: IFluidContainer<TContainerSchema>; services: TinyliciousContainerServices; }>
createContainer
Creates a new detached container instance in Tinylicious server.
Pass an OldestSupportedClientVersion SemVer string (e.g. "2.0.0") instead. The legacy values "1" and "2" correspond to "1.0.0" and "2.0.0" respectively.
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 | Legacy CompatibilityMode value. |
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.
Signature
getContainer<TContainerSchema extends ContainerSchema>(id: string, containerSchema: TContainerSchema, oldestSupportedClient: OldestSupportedClientVersion): 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. |
| oldestSupportedClient | OldestSupportedClientVersion | Oldest Fluid Framework client version that must be able to open and process documents written by this client. Choosing an older version may limit available features and write formats. |
Returns
Existing 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.
Pass an OldestSupportedClientVersion SemVer string (e.g. "2.0.0") instead. The legacy values "1" and "2" correspond to "1.0.0" and "2.0.0" respectively.
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 | Legacy CompatibilityMode value. |
Returns
Existing container instance along with associated services.
Return type: Promise<{ container: IFluidContainer<TContainerSchema>; services: TinyliciousContainerServices; }>