Skip to main content
Version: v2

TinyliciousClient Class

Provides the ability to have a Fluid object backed by a Tinylicious service.

Sealed

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​

ConstructorDescription
(constructor)(properties)Creates a new client instance using configuration parameters.

Methods​

MethodAlertsReturn TypeDescription
createContainer(containerSchema, oldestSupportedClient)Promise<{ container: IFluidContainer<TContainerSchema>; services: TinyliciousContainerServices; }>Creates a new detached container instance in Tinylicious server.
createContainer(containerSchema, compatibilityMode)DeprecatedPromise<{ 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)DeprecatedPromise<{ 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​

ParameterModifiersTypeDescription
propertiesoptionalTinyliciousClientPropsOptional. 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​
ParameterConstraintDescription
TContainerSchemaContainerSchema

Parameters​

ParameterTypeDescription
containerSchemaTContainerSchemaContainer schema for the new container.
oldestSupportedClientOldestSupportedClientVersionOldest 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.

This API is deprecated and will be removed in a future release.

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​
ParameterConstraintDescription
TContainerSchemaContainerSchema

Parameters​

ParameterTypeDescription
containerSchemaTContainerSchemaContainer schema for the new container.
compatibilityModeCompatibilityModeLegacy 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​
ParameterConstraintDescription
TContainerSchemaContainerSchema

Parameters​

ParameterTypeDescription
idstringUnique ID of the container.
containerSchemaTContainerSchemaContainer schema used to access data objects in the container.
oldestSupportedClientOldestSupportedClientVersionOldest 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.

This API is deprecated and will be removed in a future release.

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​
ParameterConstraintDescription
TContainerSchemaContainerSchema

Parameters​

ParameterTypeDescription
idstringUnique ID of the container.
containerSchemaTContainerSchemaContainer schema used to access data objects in the container.
compatibilityModeCompatibilityModeLegacy CompatibilityMode value.

Returns​

Existing container instance along with associated services.

Return type: Promise<{ container: IFluidContainer<TContainerSchema>; services: TinyliciousContainerServices; }>

See Also​

https://fluidframework.com/docs/testing/tinylicious/