@playlive/fundraiser-data
    Preparing search index...

    Function fetchTiltifyCampaign

    • Fetch a Tiltify campaign by ID or by (teamUserSlug, slug) pair.

      Demo short-circuit: returns the registered provider's getDemoCampaign(isTeam) result when the slugs or ID match the demo identifiers. When the caller passes a demo campaign id whose team-ness disagrees with the isTeam flag (observed in the wild: useLinkedTeamCampaign's fallback path retries the team-campaign id with isTeam: false), we fall back to the opposite provider flavor so the matching demo fixture wins over a real proxy round trip.

      Validation: when the response carries a cause_id, the function filters out any campaign that doesn't match the configured cause (St. Jude in production) and returns null instead.

      Parameters

      • params: { id?: string; isTeam?: boolean; slug?: string; teamUserSlug?: string }

      Returns Promise<TiltifyCampaign | TiltifyTeamCampaign | TiltifyPersonalCampaign | null>

      Error when neither (id) nor (teamUserSlug, slug) resolves a campaign — preserves legacy "Campaign not found" semantics.