import { type Channel, type Group, type Workspace } from '@doist/comms-sdk'; export declare const SUPPORTED_COMMS_HOSTS: readonly ["comms.todoist.com", "comms.staging.todoist.com", "comms.local.todoist.com"]; export declare function isSupportedCommsHost(hostname: string): boolean; export declare function isIdRef(ref: string): boolean; /** * Returns the raw id portion of `123`, `id:123`, or `id:abc-xyz`. The Comms * backend uses numeric ids for users and workspaces and base58 UUIDv7 strings * for everything else, so this stays string-typed and consumers narrow as * needed (`Number(...)` for numeric refs after validation). */ export declare function extractId(ref: string): string; export declare function extractNumericId(ref: string): number; export declare function parseNumericIdRefs(refs: string, label?: string): number[] | null; export declare function looksLikeRawId(ref: string): boolean; export interface ParsedCommsUrl { workspaceId?: number; channelId?: string; threadId?: string; commentId?: string; conversationId?: string; messageId?: string; } export declare function parseCommsUrl(url: string): ParsedCommsUrl | null; export type ParsedRef = { type: 'id'; id: string; } | { type: 'url'; parsed: ParsedCommsUrl; } | { type: 'name'; name: string; }; export declare function parseRef(ref: string): ParsedRef; export declare function resolveWorkspaceRef(ref: string): Promise; export declare function resolveThreadId(ref: string): string; export declare function resolveChannelRef(ref: string, workspaceId: number): Promise; export declare function resolveChannelId(ref: string): string; export declare function getDirectChannelId(ref: string): string | null; export declare function resolveCommentId(ref: string): string; export declare function resolveConversationId(ref: string): string; export declare function resolveMessageId(ref: string): string; export type CommsUrlRoute = { entityType: 'message' | 'conversation' | 'comment' | 'thread'; url: string; }; export declare function classifyCommsUrl(url: string): CommsUrlRoute | null; /** * Split a list of notify refs into numeric user IDs and base58 group IDs by * checking each ref against the workspace's known group IDs. Anything not in * the group set is treated as a user ID and parsed as a number. */ export declare function partitionNotifyIds(ids: readonly string[], groupIds: ReadonlySet): { userIds: number[]; groupIds: string[]; }; /** * Parse a comma-separated list of notify refs into raw IDs (untyped — callers * use {@link partitionNotifyIds} to split into users vs. groups). */ export declare function parseNotifyIdRefs(refs: string): string[]; export declare function resolveGroupRef(ref: string, workspaceId: number): Promise; export type ChannelMemberRefs = { userIds: number[]; expandedFrom: { groupId: string; groupName: string; userIds: number[]; }[]; }; /** * Resolve a mixed list of user and `group:` references for channel membership. * * Groups are expanded to their current `userIds` at call time. The group itself * is not persistently linked to the channel — callers should surface that * caveat in user-facing help text. * * Returns deduped userIds in input order, with a parallel `expandedFrom` list * recording which groups contributed (and which users each group brought in, * pre-dedup) for reporting purposes. */ export declare function resolveChannelMemberRefs(refs: string[], workspaceId: number): Promise; export declare function resolveUserRefs(refs: string, workspaceId: number, options?: { includeRemoved?: boolean; }): Promise; //# sourceMappingURL=refs.d.ts.map