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

    Function deleteRuleset

    • Delete a ruleset by id. Returns { id } on success, mirroring the server's confirmation echo — the overlay-side state manager keys off the returned id to prune its local list.

      The campaign-scoped route returns the remaining rulesets for the campaign (an array) instead of { id }. When either shape lacks a recognizable id we return null.

      Returns Promise<{ id: string } | null>

      Promise resolving to { id } on success, or null if the response body is empty.

      Error when donationTrainApiUrl isn't configured, or when the response is non-2xx.

      // Admin — hits /rulesets/{id}, echoes { id }.
      const deleted = await deleteRuleset({ rulesetID: "r-1" });

      // OAuth — hits /campaign-rulesets/{campaignID}/{rulesetID}, returns
      // the remaining rulesets for the campaign.
      await deleteRuleset({
      rulesetID: "r-1",
      campaignID: "c-1",
      tiltifyOAuthToken: token,
      });

      DeleteRulesetParams