Documentation
    Preparing search index...

    Interface CommonServiceOptions

    Options for createCommonService.

    interface CommonServiceOptions {
        follow?: (
            pubkeys: string[],
            context: CommonServiceContext,
        ) => CommonActionResult | Promise<CommonActionResult>;
        follows?: (
            context: CommonServiceContext,
        ) => CommonFollowsResult | Promise<CommonFollowsResult>;
        getProfile?: (
            target: string,
            context: CommonServiceContext,
        ) => CommonProfileResult | Promise<CommonProfileResult>;
        react?: (
            targetEventId: string,
            reaction: CommonReaction,
            customEmojiHref: string | undefined,
            context: CommonServiceContext,
        ) => CommonActionResult | Promise<CommonActionResult>;
        report?: (
            target: CommonReportTarget,
            reason: CommonReportReason,
            text: string,
            context: CommonServiceContext,
        ) => CommonActionResult | Promise<CommonActionResult>;
        unfollow?: (
            pubkeys: string[],
            context: CommonServiceContext,
        ) => CommonActionResult | Promise<CommonActionResult>;
    }
    Index

    Properties

    follow?: (
        pubkeys: string[],
        context: CommonServiceContext,
    ) => CommonActionResult | Promise<CommonActionResult>

    Host-owned follow action.

    follows?: (
        context: CommonServiceContext,
    ) => CommonFollowsResult | Promise<CommonFollowsResult>

    Host-owned current-user follows lookup.

    getProfile?: (
        target: string,
        context: CommonServiceContext,
    ) => CommonProfileResult | Promise<CommonProfileResult>

    Host-owned profile lookup.

    react?: (
        targetEventId: string,
        reaction: CommonReaction,
        customEmojiHref: string | undefined,
        context: CommonServiceContext,
    ) => CommonActionResult | Promise<CommonActionResult>

    Host-owned reaction action.

    report?: (
        target: CommonReportTarget,
        reason: CommonReportReason,
        text: string,
        context: CommonServiceContext,
    ) => CommonActionResult | Promise<CommonActionResult>

    Host-owned report action.

    unfollow?: (
        pubkeys: string[],
        context: CommonServiceContext,
    ) => CommonActionResult | Promise<CommonActionResult>

    Host-owned unfollow action.