import type { AuthoredPostPage, PublishedPost, PublishPostInput, RemotePostRef, SocialDeletionDriver, SocialIdentityCredentials, SocialPublishingDriver, TimelineQuery, TimelineResult } from '../types'; /** Normalize "mastodon.social" / "https://mastodon.social/" → "https://mastodon.social". */ export declare function normalizeInstance(value: string): string; export declare interface MastodonAccount { accountId: string username: string displayName?: string url: string } export declare class MastodonApiError extends Error { public status: number; public body: string; constructor(message: string, status: number, body: string); get isAuthError(): boolean; } /** * Publishing driver for Mastodon (and API-compatible instances). * * Mastodon is token-based rather than OAuth-redirect based: the user creates * an access token in their instance's Preferences → Development, so there is * no consent URL or code exchange to model. * * Because every instance is a different host, `identity.did` carries the * instance base URL — the same slot LinkedIn uses for the member URN and * Instagram for the account id. */ export declare class MastodonPublishingDriver implements SocialPublishingDriver, SocialDeletionDriver { readonly provider: 'mastodon'; characterLimit: number; protected instanceOf(identity: SocialIdentityCredentials): string; protected tokenOf(identity: SocialIdentityCredentials): string; verifyCredentials(identity: SocialIdentityCredentials): Promise; uploadMedia(identity: SocialIdentityCredentials, bytes: Uint8Array, mimeType: string, altText?: string): Promise; publish(identity: SocialIdentityCredentials, post: PublishPostInput): Promise; timeline(_identity: SocialIdentityCredentials, _query?: TimelineQuery): Promise; listAuthoredPosts(identity: SocialIdentityCredentials, query?: TimelineQuery): Promise; deletePost(identity: SocialIdentityCredentials, ref: RemotePostRef): Promise; protected request(url: string, init: RequestInit): Promise; }