UNPKG

@river-build/react-sdk

Version:
27 lines 938 B
import type { Dms } from '@river-build/sdk'; import { type ActionConfig } from './internals/useAction'; /** * A hook that allows you to create a new direct message (DM). * @param config - The action config. * @returns An object containing the `createDM` action and the rest of the action result. */ export declare const useCreateDm: (config?: ActionConfig<Dms['createDM']>) => { data: { streamId: string; } | undefined; error: Error | undefined; isPending: boolean; isSuccess: boolean; isError: boolean; /** * Creates a new DM. * @param userId - The River `userId` of the user to create a DM with. * @returns A promise that resolves to the result of the create operation. */ createDM: (userId: string, streamSettings?: { disableMiniblockCreation: boolean; } | undefined) => Promise<{ streamId: string; }>; }; //# sourceMappingURL=useCreateDm.d.ts.map