• The stored form of whatever the dashboard sent. The save transforms call this, not only zod.

    Zod alone is not enough here: the creator routes validate with the PARTIAL schema, and deepPartialify keeps an array's max but drops custom refinements (the no-duplicates check) and makes every field of an item optional. So a row with no channel, a channel listed twice, or a type the platform does not have could all reach the database. This drops them instead of failing the whole save:

    • no valid channelId -> dropped
    • a channel already listed -> the later row dropped
    • a pingRoleId that is not a role / everyone / here -> no ping (null)
    • a type this platform does not have, or a repeat -> dropped from types
    • beyond MAX_EXTRA_DESTINATIONS -> cut

    null and anything that is not a list mean "no extras" and store []: a Json column cannot take a plain null through Prisma, same as Guild.statChannelFormats storing {}.

    Parameters

    • platform:
          | "kick"
          | "twitch"
          | "rumble"
          | "tiktok"
          | "youtube"
          | "club"
          | "twitter"
    • input: unknown

    Returns ExtraDestination[]