-
Notifications
You must be signed in to change notification settings - Fork 557
feat(odsp-client): Add OdspContainerServices readonly and sensitivity label event emitters #25800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
db1d16a
1010d8e
df9b2a4
c0ad929
becd168
db96d73
3bb1e16
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,9 @@ | |
|
|
||
| import type { | ||
| IConfigProviderBase, | ||
| IDisposable, | ||
| IEvent, | ||
| IEventProvider, | ||
| ITelemetryBaseLogger, | ||
| } from "@fluidframework/core-interfaces"; | ||
| import type { | ||
|
|
@@ -79,6 +82,23 @@ export interface OdspContainerAttachProps { | |
| fileName: string | undefined; | ||
| } | ||
|
|
||
| /** | ||
| * Events emitted by the ODSP container service to notify consumers of select | ||
| * container changes. | ||
| * @beta | ||
| * @sealed | ||
| */ | ||
| export interface IOdspContainerServicesEvents extends IEvent { | ||
| /** | ||
| * Emitted when the read-only state of the container changes. | ||
| */ | ||
| (event: "readOnlyStateChanged", listener: (readonly: boolean) => void): void; | ||
| /** | ||
| * Emitted when the sensitivity label of the container changes. | ||
| */ | ||
| (event: "sensitivityLabelChanged", listener: (sensitivityLabelsInfo: string) => void): void; | ||
znewton marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| /** | ||
| * ODSP version of the IFluidContainer interface. | ||
| * @beta | ||
|
|
@@ -106,12 +126,33 @@ export interface IOdspFluidContainer< | |
| * 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. | ||
| * @beta | ||
znewton marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| * @sealed | ||
| */ | ||
| export interface OdspContainerServices { | ||
| export interface OdspContainerServices | ||
| extends IEventProvider<IOdspContainerServicesEvents>, | ||
| IDisposable { | ||
| /** | ||
| * 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. | ||
| */ | ||
| audience: IOdspAudience; | ||
|
|
||
| /** | ||
| * Gets the read-only state of the container, if available. | ||
znewton marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| * This is not available until the container is in the "Connected" state. | ||
| * @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. | ||
| */ | ||
| getReadOnlyState(): boolean | undefined; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In general readonly state is not service-specific, so I'd probably expect to find it on IFluidContainer rather than a container services interface.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a handy way of exposing functionality via ODSP's
znewton marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| /** | ||
| * 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. | ||
| * @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. | ||
| */ | ||
| getSensitivityLabelsInfo(): string | undefined; | ||
| } | ||
|
|
||
| /** | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.