import { ListChannelEndpointsArgs, ChannelEndpointResponse, NovuError } from '@novu/js'; type UseChannelEndpointsProps = ListChannelEndpointsArgs & { onSuccess?: (data: ChannelEndpointResponse[]) => void; onError?: (error: NovuError) => void; }; type UseChannelEndpointsResult = { endpoints: ChannelEndpointResponse[]; error?: NovuError; isLoading: boolean; isFetching: boolean; refetch: () => Promise; }; /** * List channel endpoints for the current subscriber. Use this to discover a linked * user endpoint (e.g. a `slack_user` endpoint) for a given connection identifier. * * @example * const { endpoints } = useChannelEndpoints({ integrationIdentifier: 'my-chat', connectionIdentifier }); * const isLinked = endpoints.some((endpoint) => endpoint.type === 'slack_user'); */ declare const useChannelEndpoints: (props?: UseChannelEndpointsProps) => UseChannelEndpointsResult; export { useChannelEndpoints }; export type { UseChannelEndpointsProps, UseChannelEndpointsResult };