Type Alias ShortViewKeySets
ShortViewKeySets: {
club: "streamerUserName" | "guildId";
kick:
| "streamerUserName"
| "streamerId"
| "chatRoomId"
| "guildId";
rumble: "streamerUserName" | "guildId" | "type";
tiktok: "streamerUserName" | "guildId";
twitch: "streamerUserName" | "streamerId" | "guildId";
twitter: "streamerUserName" | "guildId";
whatnot: never;
youtube: "streamerUserName" | "streamerId" | "guildId";
}
Which keys each platform's SHORT view projects. The key list only - never the field types.
Mirrors the
short ? DBStreamers.map((s) => ({ ... }))arm of each case in the API'ssrc/routes/data/guildPlatform.ts. Every field's TYPE comes from the model via thePickbelow, so a type here cannot drift from the schema.It had drifted. This type used to write the field types out by hand as well, and carried
kick.chatRoomId: stringandyoutube.streamerId: stringagainst nullable columns, andyoutube.guildId: string | nullagainst a required one. All three typechecked, and all three told a consumer the opposite of what the API sends.whatnotisneveronly to keep this lookup total overAllPlatforms. It isServedPlatformabove that actually removes it -Pick<T, never>is{}, notnever.