UNPKG

@river-build/react-sdk

Version:
32 lines 1.01 kB
import type { DmModel } from '@river-build/sdk'; import { type ObservableConfig } from './useObservable'; /** * Hook to get the data of a DM. * You can use this hook to get DM metadata and if the user has joined the DM. * @param streamId - The id of the DM to get the data of. * @param config - Configuration options for the observable. * @returns The DmModel of the DM. */ export declare const useDm: (streamId: string, config?: ObservableConfig.FromData<DmModel>) => { data: DmModel; error: Error | undefined; status: "error" | "loading" | "loaded"; isLoading: boolean; isError: boolean; isLoaded: boolean; } | { data: DmModel; error: Error | undefined; status: "error" | "loading" | "loaded"; isLoading: boolean; isError: boolean; isLoaded: boolean; } | { data: DmModel; error: Error | undefined; status: "error" | "loading" | "loaded"; isLoading: boolean; isError: boolean; isLoaded: boolean; }; //# sourceMappingURL=useDm.d.ts.map