OdspContainerServices Interface
OdspContainerServices is returned by the OdspClient alongside a FluidContainer. It holds the functionality specifically tied to the ODSP service, and how the data stored in the FluidContainer is persisted in the backend and consumed by users. Any functionality regarding how the data is handled within the FluidContainer itself, i.e. which data objects or DDSes to use, will not be included here but rather on the FluidContainer class itself.
To use, import via @fluidframework/odsp-client/beta.
For more information about our API support guarantees, see here.
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 interface OdspContainerServices extends IDisposable
Extends: IDisposable
Properties
| Property | Alerts | Type | Description |
|---|---|---|---|
| audience | Beta | IOdspAudience | Provides an object that facilitates obtaining information about users present in the Fluid session, as well as listeners for roster changes triggered by users joining or leaving the session. |
| events | Beta | Listenable<IOdspContainerServicesEvents> |
Methods
| Method | Alerts | Return Type | Description |
|---|---|---|---|
| getReadOnlyState() | Beta | boolean | undefined | Gets the read-only state of the container, if available. This is not available until the container is in the "Connected" state. |
| getSensitivityLabelsInfo() | Beta | string | undefined | Gets the sensitivity labels info of the container, if available. This is not available until the container is in the "Connected" state, and will only be available if sensitivity labels have been applied to the container. |
Property Details
audience
Provides an object that facilitates obtaining information about users present in the Fluid session, as well as listeners for roster changes triggered by users joining or leaving the session.
For more information about our API support guarantees, see here.
Signature
audience: IOdspAudience;
Type: IOdspAudience
events
For more information about our API support guarantees, see here.
Signature
events: Listenable<IOdspContainerServicesEvents>;
Type: Listenable<IOdspContainerServicesEvents>
Method Details
getReadOnlyState
Gets the read-only state of the container, if available. This is not available until the container is in the "Connected" state.
For more information about our API support guarantees, see here.
Signature
getReadOnlyState(): boolean | undefined;
Remarks
In the case that the read-only state cannot be determined, wait for the "readOnlyStateChanged" event to be emitted.
Returns
The read-only state (true when readonly, false when editable), or undefined if not available.
Return type: boolean | undefined
getSensitivityLabelsInfo
Gets the sensitivity labels info of the container, if available. This is not available until the container is in the "Connected" state, and will only be available if sensitivity labels have been applied to the container.
For more information about our API support guarantees, see here.
Signature
getSensitivityLabelsInfo(): string | undefined;
Remarks
In the case that the sensitivity labels info are expected but cannot be determined, wait for the "sensitivityLabelChanged" event to be emitted.
Returns
The sensitivity labels info string, or undefined if not available.
Return type: string | undefined