UNPKG

@river-build/react-sdk

Version:
27 lines 1.04 kB
import type { Gdms } from '@river-build/sdk'; import { type ActionConfig } from './internals/useAction'; /** * A hook that allows you to create a new group direct message (GDM). * @param config - The action config. * @returns An object containing the `createGDM` action and the rest of the action result. */ export declare const useCreateGdm: (config?: ActionConfig<Gdms['createGDM']>) => { data: { streamId: string; } | undefined; error: Error | undefined; isPending: boolean; isSuccess: boolean; isError: boolean; /** * Creates a new GDM. * @param userIds - The River `userIds` of the users to invite to the GDM. * @returns A promise that resolves to the result of the create operation. */ createGDM: (userIds: string[], channelProperties?: import("@river-build/proto").EncryptedData | undefined, streamSettings?: { disableMiniblockCreation: boolean; } | undefined) => Promise<{ streamId: string; }>; }; //# sourceMappingURL=useCreateGdm.d.ts.map