Creating Plot Twists
    Preparing search index...

    Type Alias ActivityLink

    ActivityLink:
        | { type: external; title: string; url: string }
        | { type: conferencing; url: string; provider: ConferencingProvider }
        | {
            type: auth;
            title: string;
            provider: string;
            level: string;
            scopes: string[];
            callback: Callback;
        }
        | { type: callback; title: string; callback: Callback }

    Represents a clickable link attached to an activity.

    Activity links are rendered as buttons that enable user interaction with activities. Different link types have specific behaviors and required fields for proper functionality.

    Type Declaration

    • { type: external; title: string; url: string }
      • type: external

        External web link that opens in browser

      • title: string

        Display text for the link button

      • url: string

        URL to open when clicked

    • { type: conferencing; url: string; provider: ConferencingProvider }
      • type: conferencing

        Video conferencing link with provider-specific handling

      • url: string

        URL to join the conference

      • provider: ConferencingProvider

        Conferencing provider for UI customization

    • {
          type: auth;
          title: string;
          provider: string;
          level: string;
          scopes: string[];
          callback: Callback;
      }
      • type: auth

        Authentication link that initiates an OAuth flow

      • title: string

        Display text for the auth button

      • provider: string

        OAuth provider (e.g., "google", "microsoft")

      • level: string

        Authorization level ("user" or "priority")

      • scopes: string[]

        Array of OAuth scopes to request

      • callback: Callback

        Callback token for auth completion notification

    • { type: callback; title: string; callback: Callback }
      • type: callback

        Callback link that triggers a twist method when clicked

      • title: string

        Display text for the callback button

      • callback: Callback

        Token identifying the callback to execute

    // External link - opens URL in browser
    const externalLink: ActivityLink = {
    type: ActivityLinkType.external,
    title: "Open in Google Calendar",
    url: "https://calendar.google.com/event/123",
    };

    // Conferencing link - opens video conference with provider info
    const conferencingLink: ActivityLink = {
    type: ActivityLinkType.conferencing,
    url: "https://meet.google.com/abc-defg-hij",
    provider: ConferencingProvider.googleMeet,
    };

    // Integrations link - initiates OAuth flow
    const authLink: ActivityLink = {
    type: ActivityLinkType.auth,
    title: "Continue with Google",
    provider: AuthProvider.Google,
    level: AuthLevel.User,
    scopes: ["https://www.googleapis.com/auth/calendar.readonly"],
    callback: "callback-token-for-auth-completion"
    };

    // Callback link - triggers a twist method
    const callbackLink: ActivityLink = {
    type: ActivityLinkType.callback,
    title: "📅 Primary Calendar",
    token: "callback-token-here"
    };