interface AuthLike { token: string | null; handleUnauthorized(): void; } export interface Friend { userId: string; login: string; avatarUrl: string | null; status: string; since: number; } export interface FriendSearchResult { userId: string; login: string; avatarUrl: string | null; friendStatus: string; } export type FriendshipStatus = 'none' | 'pending_outgoing' | 'pending_incoming' | 'accepted' | 'blocked_by_you'; /** * Platform-level friends. Once two users are friends, every app on * FreeAppStore can use that relationship. * * @example * const friends = await app.friends.list() * const incoming = await app.friends.requests() * await app.friends.request('gh:456') * await app.friends.respond('gh:456', 'accept') */ export declare class Friends { readonly _appId: string; private readonly apiBase; private readonly auth; constructor(_appId: string, apiBase: string, auth: AuthLike); /** List friends by status. Defaults to accepted friends. */ list(status?: 'accepted' | 'pending_incoming' | 'pending_outgoing'): Promise; /** Shortcut: list incoming friend requests. */ requests(): Promise; /** Send a friend request. Returns status and whether it was auto-accepted (mutual). */ request(userId: string): Promise<{ status: string; autoAccepted: boolean; }>; /** Respond to a friend request or block a user. */ respond(userId: string, action: 'accept' | 'decline' | 'block'): Promise; /** Remove a friend, cancel outgoing request, or unblock. */ remove(userId: string): Promise; /** Shortcut: block a user. */ block(userId: string): Promise; /** Check if a specific user is a friend. */ isFriend(userId: string): Promise; /** Check the friendship status with a specific user. */ check(userId: string): Promise; /** Search users by GitHub login. Returns users with their friendship status. */ search(query: string): Promise; } export {}; //# sourceMappingURL=friends.d.ts.map