@notidotbot/noti-api-client 1.9.31 → 1.9.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/classes/guildPlatform.d.ts +3 -3
  2. package/dist/classes/guildPlatformAction.d.ts +2 -2
  3. package/dist/classes/guildStatChannels.d.ts +1 -1
  4. package/dist/index.d.ts +3 -1
  5. package/dist/index.js +4 -1
  6. package/dist/other/bitfields.d.ts +8 -2
  7. package/dist/other/bitfields.js +4 -0
  8. package/dist/other/features.d.ts +1 -1
  9. package/dist/other/features.js +2 -0
  10. package/dist/other/offlineGrace.d.ts +21 -0
  11. package/dist/other/offlineGrace.js +23 -0
  12. package/dist/other/prisma.d.ts +3 -0
  13. package/dist/other/types.d.ts +2 -0
  14. package/dist/other/zod/guild.zod.d.ts +2 -0
  15. package/dist/other/zod/guild.zod.js +1 -0
  16. package/dist/other/zod/kickStreamer.zod.d.ts +1 -0
  17. package/dist/other/zod/kickStreamer.zod.js +4 -0
  18. package/dist/other/zod/rumbleStreamer.zod.d.ts +1 -0
  19. package/dist/other/zod/rumbleStreamer.zod.js +4 -0
  20. package/dist/other/zod/tiktokStreamer.zod.d.ts +1 -0
  21. package/dist/other/zod/tiktokStreamer.zod.js +4 -0
  22. package/dist/other/zod/twitchStreamer.zod.d.ts +1 -0
  23. package/dist/other/zod/twitchStreamer.zod.js +4 -0
  24. package/dist/other/zod/twitterStreamer.zod.d.ts +149 -0
  25. package/dist/other/zod/twitterStreamer.zod.js +58 -0
  26. package/dist/tsconfig.tsbuildinfo +1 -1
  27. package/package.json +1 -1
  28. package/prisma/generated/ts-prisma.d.ts +5803 -869
  29. package/prisma/schema/models/guild.prisma +1 -0
  30. package/prisma/schema/models/kickStreamer.prisma +1 -0
  31. package/prisma/schema/models/rumbleStreamer.prisma +1 -0
  32. package/prisma/schema/models/tiktokStreamer.prisma +1 -0
  33. package/prisma/schema/models/twitchStreamer.prisma +1 -0
  34. package/prisma/schema/models/twitterStreamer.prisma +157 -0
  35. package/prisma/schema/schema.prisma +7 -0
@@ -1,4 +1,4 @@
1
- import { AllPlatforms, ClubStreamer, ClubStreamerZod, KickStreamer, KickStreamerZod, RumbleStreamer, RumbleStreamerZod, TikTokStreamer, TikTokStreamerZod, TwitchStreamer, TwitchStreamerZod, YouTubeStreamer, YouTubeStreamerZod } from '../other/prisma';
1
+ import { AllPlatforms, ClubStreamer, ClubStreamerZod, TwitterStreamer, TwitterStreamerZod, KickStreamer, KickStreamerZod, RumbleStreamer, RumbleStreamerZod, TikTokStreamer, TikTokStreamerZod, TwitchStreamer, TwitchStreamerZod, YouTubeStreamer, YouTubeStreamerZod } from '../other/prisma';
2
2
  import { CancelOutWebResponses, DeepPartial } from '../types';
3
3
  import { WebDataManager } from '../core/manager';
4
4
  export declare class APIGuildPlatform {
@@ -77,8 +77,8 @@ export type UsersForLiveRole = {
77
77
  id: string;
78
78
  name: string;
79
79
  }[];
80
- export type GuildSingleStreamer<T extends AllPlatforms> = T extends 'kick' ? KickStreamerZod : T extends 'twitch' ? TwitchStreamerZod : T extends 'rumble' ? RumbleStreamerZod : T extends 'tiktok' ? TikTokStreamerZod : T extends 'youtube' ? YouTubeStreamerZod : T extends 'club' ? ClubStreamerZod : never;
81
- export type GuildSingleStreamerWithFormatedRole<T extends AllPlatforms> = T extends 'kick' ? KickStreamer & UsersForLiveRole : T extends 'twitch' ? TwitchStreamer & UsersForLiveRole : T extends 'rumble' ? RumbleStreamer & UsersForLiveRole : T extends 'tiktok' ? TikTokStreamer & UsersForLiveRole : T extends 'youtube' ? YouTubeStreamerZod & UsersForLiveRole : T extends 'club' ? ClubStreamer & UsersForLiveRole : never;
80
+ export type GuildSingleStreamer<T extends AllPlatforms> = T extends 'kick' ? KickStreamerZod : T extends 'twitch' ? TwitchStreamerZod : T extends 'rumble' ? RumbleStreamerZod : T extends 'tiktok' ? TikTokStreamerZod : T extends 'youtube' ? YouTubeStreamerZod : T extends 'club' ? ClubStreamerZod : T extends 'twitter' ? TwitterStreamerZod : never;
81
+ export type GuildSingleStreamerWithFormatedRole<T extends AllPlatforms> = T extends 'kick' ? KickStreamer & UsersForLiveRole : T extends 'twitch' ? TwitchStreamer & UsersForLiveRole : T extends 'rumble' ? RumbleStreamer & UsersForLiveRole : T extends 'tiktok' ? TikTokStreamer & UsersForLiveRole : T extends 'youtube' ? YouTubeStreamerZod & UsersForLiveRole : T extends 'club' ? ClubStreamer & UsersForLiveRole : T extends 'twitter' ? TwitterStreamer & UsersForLiveRole : never;
82
82
  export type Platformstreamers<T extends boolean, P extends AllPlatforms> = {
83
83
  streamers: T extends true ? P extends 'kick' ? {
84
84
  streamerUserName: string;
@@ -1,4 +1,4 @@
1
- import { AllPlatforms, ClubStreamerZod, KickStreamerZod, RumbleStreamerZod, TikTokStreamerZod, TwitchStreamerZod, YouTubeStreamerZod } from '../other/prisma';
1
+ import { AllPlatforms, ClubStreamerZod, TwitterStreamerZod, KickStreamerZod, RumbleStreamerZod, TikTokStreamerZod, TwitchStreamerZod, YouTubeStreamerZod } from '../other/prisma';
2
2
  import { LeaderBoardTypesEnum, StreamerMessageTypeEnum } from '@prisma/client';
3
3
  import { RumbleType } from './guildPlatform';
4
4
  import { CancelOutWebResponses } from '../types';
@@ -80,7 +80,7 @@ export type PlatformActionReturnTypes = {
80
80
  'deleteKickStreamerRolesRaw': Awaited<ReturnType<APIPlatformAction['deleteKickStreamerRoles']>>;
81
81
  'deleteKickStreamerRolesSuccess': CancelOutWebResponses<Awaited<ReturnType<APIPlatformAction['deleteKickStreamerRoles']>>>;
82
82
  };
83
- export type StreamerUpdateMessage = (KickStreamerZod | TwitchStreamerZod | RumbleStreamerZod | TikTokStreamerZod | YouTubeStreamerZod | ClubStreamerZod)['customMessages'][number];
83
+ export type StreamerUpdateMessage = (KickStreamerZod | TwitchStreamerZod | RumbleStreamerZod | TikTokStreamerZod | YouTubeStreamerZod | ClubStreamerZod | TwitterStreamerZod)['customMessages'][number];
84
84
  export type KickRolesType = 'leaderboardSyncRoles' | 'giftedSubRoles';
85
85
  export type KickRolesSubType<T extends KickRolesType> = T extends 'leaderboardSyncRoles' ? LeaderBoardTypesEnum : T extends 'giftedSubRoles' ? string : never;
86
86
  export type KickRolesData<T extends KickRolesType> = T extends 'leaderboardSyncRoles' ? KickStreamerZod['leaderBoardSyncRoles'][number] : T extends 'giftedSubRoles' ? KickStreamerZod['giftedSubRoles'][number] : never;
@@ -7,7 +7,7 @@ import { WebDataManager } from '../core/manager';
7
7
  * checked against the Prisma schema by a guard there. Nothing links this copy to that one, so diff
8
8
  * both when either changes - a platform missing here is one the dashboard cannot configure.
9
9
  */
10
- export type StatChannelPlatform = 'kick' | 'twitch' | 'youtube' | 'tiktok' | 'rumble' | 'whatnot';
10
+ export type StatChannelPlatform = 'kick' | 'twitch' | 'youtube' | 'tiktok' | 'rumble' | 'whatnot' | 'twitter';
11
11
  /** Only Kick has a follower counter. Every other model has `isLive` alone. */
12
12
  export type StatChannelKind = 'isLive' | 'followers';
13
13
  /**
package/dist/index.d.ts CHANGED
@@ -34,6 +34,8 @@ export * from './classes/guildStatChannels';
34
34
  export * from './classes/games';
35
35
  export { GuildMessageTypeEnum, StreamerMessageTypeEnum, PlatformEnum, $Enums } from './other/enums';
36
36
  export { FEATURE_NAMES, } from './other/features';
37
+ export { OFFLINE_GRACE_CHOICES, OFFLINE_GRACE_DEFAULT, } from './other/offlineGrace';
38
+ export type { OfflineGraceMinutes } from './other/offlineGrace';
37
39
  export type { FeatureName, FeatureStatus, ResolvedFeature, } from './other/features';
38
40
  export type { Prisma, TSPrisma } from '@prisma/client';
39
- export type { ClientChangelog, Guild, User, Team, Member, KickStreamer, TwitchStreamer, YoutubeStreamer, TiktokStreamer, RumbleStreamer, ClubStreamer, GuildGiveaway, GuildRolePanel, GuildClipForward } from '@prisma/client';
41
+ export type { ClientChangelog, Guild, User, Team, Member, KickStreamer, TwitchStreamer, YoutubeStreamer, TiktokStreamer, RumbleStreamer, ClubStreamer, TwitterStreamer, GuildGiveaway, GuildRolePanel, GuildClipForward } from '@prisma/client';
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.FEATURE_NAMES = exports.$Enums = exports.PlatformEnum = exports.StreamerMessageTypeEnum = exports.GuildMessageTypeEnum = void 0;
17
+ exports.OFFLINE_GRACE_DEFAULT = exports.OFFLINE_GRACE_CHOICES = exports.FEATURE_NAMES = exports.$Enums = exports.PlatformEnum = exports.StreamerMessageTypeEnum = exports.GuildMessageTypeEnum = void 0;
18
18
  __exportStar(require("./core/manager"), exports);
19
19
  __exportStar(require("./types"), exports);
20
20
  __exportStar(require("./classes/@me"), exports);
@@ -58,3 +58,6 @@ Object.defineProperty(exports, "$Enums", { enumerable: true, get: function () {
58
58
  // Re-export per-feature launch-gate types + constants.
59
59
  var features_1 = require("./other/features");
60
60
  Object.defineProperty(exports, "FEATURE_NAMES", { enumerable: true, get: function () { return features_1.FEATURE_NAMES; } });
61
+ var offlineGrace_1 = require("./other/offlineGrace");
62
+ Object.defineProperty(exports, "OFFLINE_GRACE_CHOICES", { enumerable: true, get: function () { return offlineGrace_1.OFFLINE_GRACE_CHOICES; } });
63
+ Object.defineProperty(exports, "OFFLINE_GRACE_DEFAULT", { enumerable: true, get: function () { return offlineGrace_1.OFFLINE_GRACE_DEFAULT; } });
@@ -114,6 +114,8 @@ export declare const GuildFeatures: {
114
114
  FishingWebhooks: bigint;
115
115
  StreamRoles: bigint;
116
116
  RoleFilters: bigint;
117
+ TwitterNotifications: bigint;
118
+ TwitterLiveNotifications: bigint;
117
119
  };
118
120
  export declare const GuildFeaturesText: Record<keyof typeof GuildFeatures, string>;
119
121
  export declare const UserFeatures: {
@@ -215,8 +217,10 @@ export declare class GuildFeaturesManager extends BitFieldManager<typeof GuildFe
215
217
  FishingWebhooks: bigint;
216
218
  StreamRoles: bigint;
217
219
  RoleFilters: bigint;
220
+ TwitterNotifications: bigint;
221
+ TwitterLiveNotifications: bigint;
218
222
  };
219
- t: Record<"BaseSyncableRoles" | "FullSyncableRoles" | "LiveRole" | "StatCounters" | "VoteSkipping" | "KickAuditLogs" | "LeaderboardCommand" | "RefreshingLeaderboard" | "LeaderBoardSyncRoles" | "BetaAccess" | "PriorityNotifications" | "KickClips" | "KickNotifications" | "TwitchNotifications" | "ImportEmojis" | "ImportEmojisWithSub" | "CustomWebhooks" | "AnyMessageEditor" | "SyncSocialUsernames" | "AutoDeleteNotifications" | "TestNotificationCommand" | "CustomCooldowns" | "WelcomeAndLeaveNotifications" | "NotificationPingRoleId" | "SwitchStreamerAndGuildEmbeds" | "BirthdayNotifications" | "AllowNotSendingOfflineNotifications" | "AutoStatusLiveRoles" | "RumbleNotifications" | "AllowAutoPublishNotifications" | "NotificationOverrides" | "UseCustomButtons" | "AllowVodFeatures" | "TikTokNotifications" | "StatusRoles" | "ManageBranding" | "StickyMessages" | "Starboards" | "CustomStarboards" | "AutoThreadOnStarboard" | "StarboardRewardRole" | "Giveaways" | "GiveawayLogs" | "ModifyGiveawayWhileRunning" | "ScheduleGiveaways" | "GiveawayRequirements" | "GiveawayBonusEntries" | "GiveawayEntryLimit" | "DisableDoubleVoteEntry" | "YouTubeNotifications" | "LinkedRoles" | "RandomMessages" | "WeeklyBirthdayPanel" | "GameNotifications" | "GameCategoryRouting" | "GameAllTimeLowAlerts" | "GameChangelogs" | "GameRobloxTracking" | "FixUrlWebhook" | "FixUrlCustomRules" | "KickClipperSubscribe" | "WhatnotNotifications" | "ScheduledEventMessages" | "ScheduledMessageWebhooks" | "ReactionRoles" | "AdvancedRolePanels" | "KickClipForwarding" | "TwitchClipForwarding" | "ClubNotifications" | "RolePanelWebhooks" | "Fishing" | "FishingCustomization" | "FishingWebhooks" | "StreamRoles" | "RoleFilters", string>;
223
+ t: Record<"BaseSyncableRoles" | "FullSyncableRoles" | "LiveRole" | "StatCounters" | "VoteSkipping" | "KickAuditLogs" | "LeaderboardCommand" | "RefreshingLeaderboard" | "LeaderBoardSyncRoles" | "BetaAccess" | "PriorityNotifications" | "KickClips" | "KickNotifications" | "TwitchNotifications" | "ImportEmojis" | "ImportEmojisWithSub" | "CustomWebhooks" | "AnyMessageEditor" | "SyncSocialUsernames" | "AutoDeleteNotifications" | "TestNotificationCommand" | "CustomCooldowns" | "WelcomeAndLeaveNotifications" | "NotificationPingRoleId" | "SwitchStreamerAndGuildEmbeds" | "BirthdayNotifications" | "AllowNotSendingOfflineNotifications" | "AutoStatusLiveRoles" | "RumbleNotifications" | "AllowAutoPublishNotifications" | "NotificationOverrides" | "UseCustomButtons" | "AllowVodFeatures" | "TikTokNotifications" | "StatusRoles" | "ManageBranding" | "StickyMessages" | "Starboards" | "CustomStarboards" | "AutoThreadOnStarboard" | "StarboardRewardRole" | "Giveaways" | "GiveawayLogs" | "ModifyGiveawayWhileRunning" | "ScheduleGiveaways" | "GiveawayRequirements" | "GiveawayBonusEntries" | "GiveawayEntryLimit" | "DisableDoubleVoteEntry" | "YouTubeNotifications" | "LinkedRoles" | "RandomMessages" | "WeeklyBirthdayPanel" | "GameNotifications" | "GameCategoryRouting" | "GameAllTimeLowAlerts" | "GameChangelogs" | "GameRobloxTracking" | "FixUrlWebhook" | "FixUrlCustomRules" | "KickClipperSubscribe" | "WhatnotNotifications" | "ScheduledEventMessages" | "ScheduledMessageWebhooks" | "ReactionRoles" | "AdvancedRolePanels" | "KickClipForwarding" | "TwitchClipForwarding" | "ClubNotifications" | "RolePanelWebhooks" | "Fishing" | "FishingCustomization" | "FishingWebhooks" | "StreamRoles" | "RoleFilters" | "TwitterNotifications" | "TwitterLiveNotifications", string>;
220
224
  all: bigint;
221
225
  static b: {
222
226
  BaseSyncableRoles: bigint;
@@ -294,8 +298,10 @@ export declare class GuildFeaturesManager extends BitFieldManager<typeof GuildFe
294
298
  FishingWebhooks: bigint;
295
299
  StreamRoles: bigint;
296
300
  RoleFilters: bigint;
301
+ TwitterNotifications: bigint;
302
+ TwitterLiveNotifications: bigint;
297
303
  };
298
- static t: Record<"BaseSyncableRoles" | "FullSyncableRoles" | "LiveRole" | "StatCounters" | "VoteSkipping" | "KickAuditLogs" | "LeaderboardCommand" | "RefreshingLeaderboard" | "LeaderBoardSyncRoles" | "BetaAccess" | "PriorityNotifications" | "KickClips" | "KickNotifications" | "TwitchNotifications" | "ImportEmojis" | "ImportEmojisWithSub" | "CustomWebhooks" | "AnyMessageEditor" | "SyncSocialUsernames" | "AutoDeleteNotifications" | "TestNotificationCommand" | "CustomCooldowns" | "WelcomeAndLeaveNotifications" | "NotificationPingRoleId" | "SwitchStreamerAndGuildEmbeds" | "BirthdayNotifications" | "AllowNotSendingOfflineNotifications" | "AutoStatusLiveRoles" | "RumbleNotifications" | "AllowAutoPublishNotifications" | "NotificationOverrides" | "UseCustomButtons" | "AllowVodFeatures" | "TikTokNotifications" | "StatusRoles" | "ManageBranding" | "StickyMessages" | "Starboards" | "CustomStarboards" | "AutoThreadOnStarboard" | "StarboardRewardRole" | "Giveaways" | "GiveawayLogs" | "ModifyGiveawayWhileRunning" | "ScheduleGiveaways" | "GiveawayRequirements" | "GiveawayBonusEntries" | "GiveawayEntryLimit" | "DisableDoubleVoteEntry" | "YouTubeNotifications" | "LinkedRoles" | "RandomMessages" | "WeeklyBirthdayPanel" | "GameNotifications" | "GameCategoryRouting" | "GameAllTimeLowAlerts" | "GameChangelogs" | "GameRobloxTracking" | "FixUrlWebhook" | "FixUrlCustomRules" | "KickClipperSubscribe" | "WhatnotNotifications" | "ScheduledEventMessages" | "ScheduledMessageWebhooks" | "ReactionRoles" | "AdvancedRolePanels" | "KickClipForwarding" | "TwitchClipForwarding" | "ClubNotifications" | "RolePanelWebhooks" | "Fishing" | "FishingCustomization" | "FishingWebhooks" | "StreamRoles" | "RoleFilters", string>;
304
+ static t: Record<"BaseSyncableRoles" | "FullSyncableRoles" | "LiveRole" | "StatCounters" | "VoteSkipping" | "KickAuditLogs" | "LeaderboardCommand" | "RefreshingLeaderboard" | "LeaderBoardSyncRoles" | "BetaAccess" | "PriorityNotifications" | "KickClips" | "KickNotifications" | "TwitchNotifications" | "ImportEmojis" | "ImportEmojisWithSub" | "CustomWebhooks" | "AnyMessageEditor" | "SyncSocialUsernames" | "AutoDeleteNotifications" | "TestNotificationCommand" | "CustomCooldowns" | "WelcomeAndLeaveNotifications" | "NotificationPingRoleId" | "SwitchStreamerAndGuildEmbeds" | "BirthdayNotifications" | "AllowNotSendingOfflineNotifications" | "AutoStatusLiveRoles" | "RumbleNotifications" | "AllowAutoPublishNotifications" | "NotificationOverrides" | "UseCustomButtons" | "AllowVodFeatures" | "TikTokNotifications" | "StatusRoles" | "ManageBranding" | "StickyMessages" | "Starboards" | "CustomStarboards" | "AutoThreadOnStarboard" | "StarboardRewardRole" | "Giveaways" | "GiveawayLogs" | "ModifyGiveawayWhileRunning" | "ScheduleGiveaways" | "GiveawayRequirements" | "GiveawayBonusEntries" | "GiveawayEntryLimit" | "DisableDoubleVoteEntry" | "YouTubeNotifications" | "LinkedRoles" | "RandomMessages" | "WeeklyBirthdayPanel" | "GameNotifications" | "GameCategoryRouting" | "GameAllTimeLowAlerts" | "GameChangelogs" | "GameRobloxTracking" | "FixUrlWebhook" | "FixUrlCustomRules" | "KickClipperSubscribe" | "WhatnotNotifications" | "ScheduledEventMessages" | "ScheduledMessageWebhooks" | "ReactionRoles" | "AdvancedRolePanels" | "KickClipForwarding" | "TwitchClipForwarding" | "ClubNotifications" | "RolePanelWebhooks" | "Fishing" | "FishingCustomization" | "FishingWebhooks" | "StreamRoles" | "RoleFilters" | "TwitterNotifications" | "TwitterLiveNotifications", string>;
299
305
  static all: bigint;
300
306
  convertBitToField<T extends EnumValues<typeof GuildFeatures>>(bit: T): string | null;
301
307
  }
@@ -207,6 +207,8 @@ exports.GuildFeatures = {
207
207
  // Role FILTERS - restricting a status/live/stream role to members who do (or do not) hold given
208
208
  // roles. Premium Plus. Bit 75 is the next unused shift; never reuse a gap.
209
209
  RoleFilters: 1n << 75n,
210
+ TwitterNotifications: 1n << 76n,
211
+ TwitterLiveNotifications: 1n << 77n,
210
212
  };
211
213
  exports.GuildFeaturesText = {
212
214
  BaseSyncableRoles: 'Basic Syncable Roles',
@@ -286,6 +288,8 @@ exports.GuildFeaturesText = {
286
288
  FishingWebhooks: 'Fishing Webhooks',
287
289
  StreamRoles: 'Stream Roles',
288
290
  RoleFilters: 'Role Filters',
291
+ TwitterNotifications: 'X Post Notifications',
292
+ TwitterLiveNotifications: 'X Live Notifications',
289
293
  };
290
294
  exports.UserFeatures = {
291
295
  HasOneServerPremium: 1n << 0n,
@@ -1,4 +1,4 @@
1
- export declare const FEATURE_NAMES: readonly ["freeGames", "gameChangelogs", "robloxNotifications", "fixLinks", "clipperNotifications", "scheduledMessages", "linkedRoles", "reactionRoles", "clipForwarding", "club", "whatnot", "fishing", "giveaways", "starboards", "syncedRoles", "birthdays", "statusRoles", "autoStatusLiveRoles", "streamRoles", "emotes", "liveRoles", "stickyMessages", "welcomeLeave", "statCounters", "voteSkipping"];
1
+ export declare const FEATURE_NAMES: readonly ["freeGames", "gameChangelogs", "robloxNotifications", "fixLinks", "clipperNotifications", "scheduledMessages", "linkedRoles", "reactionRoles", "clipForwarding", "club", "whatnot", "fishing", "giveaways", "starboards", "syncedRoles", "birthdays", "statusRoles", "autoStatusLiveRoles", "streamRoles", "offlineGracePeriod", "twitter", "emotes", "liveRoles", "stickyMessages", "welcomeLeave", "statCounters", "voteSkipping"];
2
2
  export type FeatureName = (typeof FEATURE_NAMES)[number];
3
3
  export type FeatureStatus = 'off' | 'beta' | 'public';
4
4
  export type ResolvedFeature = 'public' | 'beta' | 'hidden';
@@ -24,6 +24,8 @@ exports.FEATURE_NAMES = [
24
24
  'statusRoles',
25
25
  'autoStatusLiveRoles',
26
26
  'streamRoles',
27
+ 'offlineGracePeriod',
28
+ 'twitter',
27
29
  'emotes',
28
30
  'liveRoles',
29
31
  'stickyMessages',
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Offline Grace Period - how long a confirmed offline is held in case the creator reconnects.
3
+ *
4
+ * Mirrors `src/modules/offlineGrace.ts` in Noti-v3. The two are hand-copied and nothing links them,
5
+ * so a change on either side has to be made on both - the server's `sdkDrift` test is what catches
6
+ * it, and only on a machine with both checkouts.
7
+ *
8
+ * The dashboard needs `OFFLINE_GRACE_CHOICES` to render the dropdown, and each tier's
9
+ * `maxOfflineGraceMinutes` (on `GuildPlanType`) to decide which options are selectable and which are
10
+ * shown as an upsell.
11
+ */
12
+ /** Every window the dropdown may offer, in minutes. `0` means "post the offline immediately". */
13
+ export declare const OFFLINE_GRACE_CHOICES: readonly [0, 5, 10, 15];
14
+ export type OfflineGraceMinutes = (typeof OFFLINE_GRACE_CHOICES)[number];
15
+ /**
16
+ * What an unset (`null`) value means, and the free tier's ceiling.
17
+ *
18
+ * Those being the same number is why the feature has no `GuildFeatures` bit: the per-tier cap alone
19
+ * answers both "may they change it" and "how far".
20
+ */
21
+ export declare const OFFLINE_GRACE_DEFAULT = 5;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ /**
3
+ * Offline Grace Period - how long a confirmed offline is held in case the creator reconnects.
4
+ *
5
+ * Mirrors `src/modules/offlineGrace.ts` in Noti-v3. The two are hand-copied and nothing links them,
6
+ * so a change on either side has to be made on both - the server's `sdkDrift` test is what catches
7
+ * it, and only on a machine with both checkouts.
8
+ *
9
+ * The dashboard needs `OFFLINE_GRACE_CHOICES` to render the dropdown, and each tier's
10
+ * `maxOfflineGraceMinutes` (on `GuildPlanType`) to decide which options are selectable and which are
11
+ * shown as an upsell.
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.OFFLINE_GRACE_DEFAULT = exports.OFFLINE_GRACE_CHOICES = void 0;
15
+ /** Every window the dropdown may offer, in minutes. `0` means "post the offline immediately". */
16
+ exports.OFFLINE_GRACE_CHOICES = [0, 5, 10, 15];
17
+ /**
18
+ * What an unset (`null`) value means, and the free tier's ceiling.
19
+ *
20
+ * Those being the same number is why the feature has no `GuildFeatures` bit: the per-tier cap alone
21
+ * answers both "may they change it" and "how far".
22
+ */
23
+ exports.OFFLINE_GRACE_DEFAULT = 5;
@@ -6,6 +6,7 @@ import { TwitchStreamerZod } from './zod/twitchStreamer.zod';
6
6
  import { TiktokStreamerZod } from './zod/tiktokStreamer.zod';
7
7
  import { RumbleStreamerZod } from './zod/rumbleStreamer.zod';
8
8
  import { ClubStreamerZod } from './zod/clubStreamer.zod';
9
+ import { TwitterStreamerZod } from './zod/twitterStreamer.zod';
9
10
  import { KickStreamerZod } from './zod/kickStreamer.zod';
10
11
  import { GuildStarboardZod } from './zod/starboard.zod';
11
12
  import { GuildGiveawayZod } from './zod/giveaways.zod';
@@ -35,6 +36,7 @@ export type RumbleStreamer = TSPrisma.TSPrismaModelsFull['RumbleStreamer'];
35
36
  export type TikTokStreamer = TSPrisma.TSPrismaModelsFull['TiktokStreamer'];
36
37
  export type YouTubeStreamer = TSPrisma.TSPrismaModelsFull['YoutubeStreamer'];
37
38
  export type ClubStreamer = TSPrisma.TSPrismaModelsFull['ClubStreamer'];
39
+ export type TwitterStreamer = TSPrisma.TSPrismaModelsFull['TwitterStreamer'];
38
40
  export type GuildStarboard = TSPrisma.TSPrismaModelsFull['GuildStarboard'];
39
41
  export type GuildGiveaway = TSPrisma.TSPrismaModelsFull['GuildGiveaway'];
40
42
  export type GuildRolePanel = TSPrisma.TSPrismaModelsFull['GuildRolePanel'];
@@ -62,6 +64,7 @@ export type RumbleStreamerZod = z.infer<typeof RumbleStreamerZod.RumbleStreamerS
62
64
  export type TikTokStreamerZod = z.infer<typeof TiktokStreamerZod.TiktokStreamerSchema>;
63
65
  export type YouTubeStreamerZod = z.infer<typeof YoutubeStreamerZod.YoutubeStreamerSchema>;
64
66
  export type ClubStreamerZod = z.infer<typeof ClubStreamerZod.ClubStreamerSchema>;
67
+ export type TwitterStreamerZod = z.infer<typeof TwitterStreamerZod.TwitterStreamerSchema>;
65
68
  export type GuildStarboardZod = z.infer<typeof GuildStarboardZod.GuildStarboardSchema>;
66
69
  export type GuildGiveawayZod = z.infer<typeof GuildGiveawayZod.GuildGiveawaySchema>;
67
70
  export type GuildGiveawayCreateSchema = z.infer<typeof GuildGiveawayZod.GuildGiveawayCreateSchema>;
@@ -19,6 +19,7 @@ export type GuildPlanType = {
19
19
  defaultRolePanels: number | null;
20
20
  defaultStatusRoles: number | null;
21
21
  defaultStreamRoles: number | null;
22
+ maxOfflineGraceMinutes: number | null;
22
23
  defaultStarboards: number | null;
23
24
  defaultOverrides: number | null;
24
25
  defaultKickConnections: number | null;
@@ -29,6 +30,7 @@ export type GuildPlanType = {
29
30
  defaultTiktokConnections: number | null;
30
31
  defaultWhatnotConnections: number | null;
31
32
  defaultClubConnections: number | null;
33
+ defaultTwitterConnections: number | null;
32
34
  defaultGameConnections: number | null;
33
35
  defaultKickClips: number | null;
34
36
  defaultTwitchClips: number | null;
@@ -27,6 +27,7 @@ export declare const GuildZod: {
27
27
  additionalTiktokConnections: z.ZodNumber;
28
28
  additionalWhatnotConnections: z.ZodNumber;
29
29
  additionalClubConnections: z.ZodNumber;
30
+ additionalTwitterConnections: z.ZodNumber;
30
31
  additionalKickClips: z.ZodNumber;
31
32
  additionalTwitchClips: z.ZodNumber;
32
33
  customBot: z.ZodBoolean;
@@ -325,6 +326,7 @@ export declare const GuildZod: {
325
326
  additionalTiktokConnections: z.ZodNumber;
326
327
  additionalWhatnotConnections: z.ZodNumber;
327
328
  additionalClubConnections: z.ZodNumber;
329
+ additionalTwitterConnections: z.ZodNumber;
328
330
  additionalKickClips: z.ZodNumber;
329
331
  additionalTwitchClips: z.ZodNumber;
330
332
  customBot: z.ZodBoolean;
@@ -69,6 +69,7 @@ const GuildPremiumSchema = zod_2.z.object({
69
69
  additionalTiktokConnections: zod_2.z.number().min(0),
70
70
  additionalWhatnotConnections: zod_2.z.number().min(0),
71
71
  additionalClubConnections: zod_2.z.number().min(0),
72
+ additionalTwitterConnections: zod_2.z.number().min(0),
72
73
  additionalKickClips: zod_2.z.number().min(0),
73
74
  additionalTwitchClips: zod_2.z.number().min(0),
74
75
  customBot: zod_2.z.boolean(),
@@ -91,6 +91,7 @@ export declare const KickStreamerZod: {
91
91
  pingRoleId: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"everyone">, z.ZodLiteral<"here">]>>;
92
92
  enableVodDownloading: z.ZodNullable<z.ZodBoolean>;
93
93
  customCoolDownBeforeNextLive: z.ZodNullable<z.ZodNumber>;
94
+ offlineGracePeriod: z.ZodNullable<z.ZodUnion<[z.ZodLiteral<number>, z.ZodLiteral<number>, ...z.ZodLiteral<number>[]]>>;
94
95
  usersWhoHaveRole: z.ZodArray<z.ZodLazy<z.ZodObject<{
95
96
  roleId: z.ZodString;
96
97
  userIds: z.ZodArray<z.ZodString>;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.KickStreamerZodPartial = exports.KickStreamerZod = void 0;
4
4
  const schema_zod_1 = require("./schema.zod");
5
5
  const zod_1 = require("./zod");
6
+ const offlineGrace_1 = require("../offlineGrace");
6
7
  const zod_2 = require("zod");
7
8
  const KickStreamerSchema = zod_2.z.object({
8
9
  streamerUserName: zod_2.z.string(),
@@ -32,6 +33,9 @@ const KickStreamerSchema = zod_2.z.object({
32
33
  pingRoleId: zod_1.SnowFlakeOrEveryone.nullable(),
33
34
  enableVodDownloading: zod_2.z.boolean().nullable(),
34
35
  customCoolDownBeforeNextLive: zod_2.z.number().min(0).max(360).nullable(),
36
+ // Hold an offline this long in case they reconnect, in minutes. `null` resolves to
37
+ // OFFLINE_GRACE_DEFAULT. A literal union, not min/max: it is a dropdown.
38
+ offlineGracePeriod: zod_2.z.union(offlineGrace_1.OFFLINE_GRACE_CHOICES.map((n) => zod_2.z.literal(n))).nullable(),
35
39
  usersWhoHaveRole: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_2.z.lazy(() => KSRoleWithUsersSchema)), ['roleId']),
36
40
  leaderBoardSyncRoles: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_2.z.lazy(() => KSLeaderBoardSyncRoleSchema)), ['type']),
37
41
  giftedSubRoles: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_2.z.lazy(() => KSGiftedSubRoleSchema)), ['roleId']),
@@ -72,6 +72,7 @@ export declare const RumbleStreamerZod: {
72
72
  pingRoleId: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"everyone">, z.ZodLiteral<"here">]>>;
73
73
  videoRoleId: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"everyone">, z.ZodLiteral<"here">]>>;
74
74
  customCoolDownBeforeNextLive: z.ZodNullable<z.ZodNumber>;
75
+ offlineGracePeriod: z.ZodNullable<z.ZodUnion<[z.ZodLiteral<number>, z.ZodLiteral<number>, ...z.ZodLiteral<number>[]]>>;
75
76
  notifyOnStreamVods: z.ZodNullable<z.ZodBoolean>;
76
77
  liveRoleId: z.ZodNullable<z.ZodString>;
77
78
  usersForLiveRole: z.ZodArray<z.ZodString>;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RumbleStreamerZodPartial = exports.RumbleStreamerZod = void 0;
4
4
  const schema_zod_1 = require("./schema.zod");
5
5
  const zod_1 = require("./zod");
6
+ const offlineGrace_1 = require("../offlineGrace");
6
7
  const zod_2 = require("zod");
7
8
  const RumbleStreamerSchema = zod_2.z.object({
8
9
  streamerUserName: zod_2.z.string(),
@@ -19,6 +20,9 @@ const RumbleStreamerSchema = zod_2.z.object({
19
20
  pingRoleId: zod_1.SnowFlakeOrEveryone.nullable(),
20
21
  videoRoleId: zod_1.SnowFlakeOrEveryone.nullable(),
21
22
  customCoolDownBeforeNextLive: zod_2.z.number().min(0).max(360).nullable(),
23
+ // Hold an offline this long in case they reconnect, in minutes. `null` resolves to
24
+ // OFFLINE_GRACE_DEFAULT. A literal union, not min/max: it is a dropdown.
25
+ offlineGracePeriod: zod_2.z.union(offlineGrace_1.OFFLINE_GRACE_CHOICES.map((n) => zod_2.z.literal(n))).nullable(),
22
26
  notifyOnStreamVods: zod_2.z.boolean().nullable(),
23
27
  liveRoleId: zod_1.SnowFlake.nullable(),
24
28
  usersForLiveRole: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_1.SnowFlake)),
@@ -67,6 +67,7 @@ export declare const TiktokStreamerZod: {
67
67
  showNotifyButton: z.ZodNullable<z.ZodBoolean>;
68
68
  pingRoleId: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"everyone">, z.ZodLiteral<"here">]>>;
69
69
  customCoolDownBeforeNextLive: z.ZodNullable<z.ZodNumber>;
70
+ offlineGracePeriod: z.ZodNullable<z.ZodUnion<[z.ZodLiteral<number>, z.ZodLiteral<number>, ...z.ZodLiteral<number>[]]>>;
70
71
  liveRoleId: z.ZodNullable<z.ZodString>;
71
72
  usersForLiveRole: z.ZodArray<z.ZodString>;
72
73
  usersWhoHaveLiveRole: z.ZodArray<z.ZodString>;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TiktokStreamerZodPartial = exports.TiktokStreamerZod = void 0;
4
4
  const schema_zod_1 = require("./schema.zod");
5
5
  const zod_1 = require("./zod");
6
+ const offlineGrace_1 = require("../offlineGrace");
6
7
  const zod_2 = require("zod");
7
8
  const TiktokStreamerSchema = zod_2.z.object({
8
9
  streamerUserName: zod_2.z.string(),
@@ -17,6 +18,9 @@ const TiktokStreamerSchema = zod_2.z.object({
17
18
  showNotifyButton: zod_2.z.boolean().nullable(),
18
19
  pingRoleId: zod_1.SnowFlakeOrEveryone.nullable(),
19
20
  customCoolDownBeforeNextLive: zod_2.z.number().min(0).max(360).nullable(),
21
+ // Hold an offline this long in case they reconnect, in minutes. `null` resolves to
22
+ // OFFLINE_GRACE_DEFAULT. A literal union, not min/max: it is a dropdown.
23
+ offlineGracePeriod: zod_2.z.union(offlineGrace_1.OFFLINE_GRACE_CHOICES.map((n) => zod_2.z.literal(n))).nullable(),
20
24
  liveRoleId: zod_1.SnowFlake.nullable(),
21
25
  usersForLiveRole: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_1.SnowFlake)),
22
26
  usersWhoHaveLiveRole: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_1.SnowFlake)),
@@ -68,6 +68,7 @@ export declare const TwitchStreamerZod: {
68
68
  showNotifyButton: z.ZodNullable<z.ZodBoolean>;
69
69
  pingRoleId: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"everyone">, z.ZodLiteral<"here">]>>;
70
70
  customCoolDownBeforeNextLive: z.ZodNullable<z.ZodNumber>;
71
+ offlineGracePeriod: z.ZodNullable<z.ZodUnion<[z.ZodLiteral<number>, z.ZodLiteral<number>, ...z.ZodLiteral<number>[]]>>;
71
72
  liveRoleId: z.ZodNullable<z.ZodString>;
72
73
  usersForLiveRole: z.ZodArray<z.ZodString>;
73
74
  usersWhoHaveLiveRole: z.ZodArray<z.ZodString>;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TwitchStreamerZodPartial = exports.TwitchStreamerZod = void 0;
4
4
  const schema_zod_1 = require("./schema.zod");
5
5
  const zod_1 = require("./zod");
6
+ const offlineGrace_1 = require("../offlineGrace");
6
7
  const zod_2 = require("zod");
7
8
  const TwitchStreamerSchema = zod_2.z.object({
8
9
  streamerUserName: zod_2.z.string(),
@@ -18,6 +19,9 @@ const TwitchStreamerSchema = zod_2.z.object({
18
19
  showNotifyButton: zod_2.z.boolean().nullable(),
19
20
  pingRoleId: zod_1.SnowFlakeOrEveryone.nullable(),
20
21
  customCoolDownBeforeNextLive: zod_2.z.number().min(0).max(360).nullable(),
22
+ // Hold an offline this long in case they reconnect, in minutes. `null` resolves to
23
+ // OFFLINE_GRACE_DEFAULT. A literal union, not min/max: it is a dropdown.
24
+ offlineGracePeriod: zod_2.z.union(offlineGrace_1.OFFLINE_GRACE_CHOICES.map((n) => zod_2.z.literal(n))).nullable(),
21
25
  liveRoleId: zod_1.SnowFlake.nullable(),
22
26
  usersForLiveRole: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_1.SnowFlake)),
23
27
  usersWhoHaveLiveRole: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_1.SnowFlake)),
@@ -0,0 +1,149 @@
1
+ import { PartialZodObject } from './schema.zod';
2
+ import { RemoveProperties } from '../prisma';
3
+ import { TSPrisma } from '@prisma/client';
4
+ import { z } from 'zod';
5
+ export type RT<T extends TSPrisma.AllModelNames> = z.ZodType<RemoveProperties<TSPrisma.TSPrismaModelsFull[T], TwitterStreamerRelations>>;
6
+ export type TwitterStreamerRelations = 'db' | 'twitterStreamer' | 'twsCustomMessage' | 'twsMessageEmbed';
7
+ export declare const TwitterStreamerZod: {
8
+ readonly TwitterStreamerSchema: z.ZodObject<{
9
+ streamerUserName: z.ZodString;
10
+ guildId: z.ZodString;
11
+ streamerId: z.ZodNullable<z.ZodString>;
12
+ usePerStreamerEmbeds: z.ZodNullable<z.ZodBoolean>;
13
+ autoPublishIfAnnouncmentChannel: z.ZodNullable<z.ZodBoolean>;
14
+ customMessages: z.ZodArray<z.ZodLazy<z.ZodObject<{
15
+ content: z.ZodNullable<z.ZodString>;
16
+ showInviteButton: z.ZodNullable<z.ZodBoolean>;
17
+ showWatchButton: z.ZodNullable<z.ZodBoolean>;
18
+ embed: z.ZodNullable<z.ZodLazy<z.ZodObject<{
19
+ title: z.ZodNullable<z.ZodString>;
20
+ url: z.ZodNullable<z.ZodString>;
21
+ description: z.ZodString;
22
+ color: z.ZodNullable<z.ZodString>;
23
+ footer: z.ZodNullable<z.ZodString>;
24
+ footerIcon: z.ZodNullable<z.ZodString>;
25
+ image: z.ZodNullable<z.ZodString>;
26
+ thumbnail: z.ZodNullable<z.ZodString>;
27
+ author: z.ZodNullable<z.ZodString>;
28
+ authorIcon: z.ZodNullable<z.ZodString>;
29
+ fields: z.ZodArray<z.ZodLazy<z.ZodObject<{
30
+ name: z.ZodString;
31
+ value: z.ZodNullable<z.ZodString>;
32
+ inline: z.ZodNullable<z.ZodBoolean>;
33
+ }, z.core.$strip>>>;
34
+ }, z.core.$strip>>>;
35
+ buttons: z.ZodArray<z.ZodLazy<z.ZodObject<{
36
+ title: z.ZodString;
37
+ url: z.ZodNullable<z.ZodString>;
38
+ emojiUnicodeOrId: z.ZodNullable<z.ZodString>;
39
+ }, z.core.$strip>>>;
40
+ webhook: z.ZodNullable<z.ZodLazy<z.ZodObject<{
41
+ enabled: z.ZodNullable<z.ZodBoolean>;
42
+ username: z.ZodNullable<z.ZodString>;
43
+ avatarUrl: z.ZodNullable<z.ZodString>;
44
+ }, z.core.$strip>>>;
45
+ type: z.ZodEnum<{
46
+ clip: "clip";
47
+ clipForward: "clipForward";
48
+ vod: "vod";
49
+ kickLive: "kickLive";
50
+ kickOffline: "kickOffline";
51
+ twitchLive: "twitchLive";
52
+ twitchOffline: "twitchOffline";
53
+ rumbleLive: "rumbleLive";
54
+ rumbleOffline: "rumbleOffline";
55
+ rumbleVideo: "rumbleVideo";
56
+ tiktokLive: "tiktokLive";
57
+ tiktokOffline: "tiktokOffline";
58
+ tiktokVideo: "tiktokVideo";
59
+ youtubeLive: "youtubeLive";
60
+ youtubeVideo: "youtubeVideo";
61
+ clubPost: "clubPost";
62
+ }>;
63
+ }, z.core.$strip>>>;
64
+ postNotificationChannelId: z.ZodNullable<z.ZodString>;
65
+ postPingRoleId: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"everyone">, z.ZodLiteral<"here">]>>;
66
+ showNotifyButton: z.ZodNullable<z.ZodBoolean>;
67
+ customCoolDownBeforeNextPost: z.ZodNullable<z.ZodNumber>;
68
+ lastPostId: z.ZodNullable<z.ZodString>;
69
+ lastPostAt: z.ZodNullable<z.ZodDate>;
70
+ liveNotificationChannelId: z.ZodNullable<z.ZodString>;
71
+ pingRoleId: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"everyone">, z.ZodLiteral<"here">]>>;
72
+ sendOfflineMessage: z.ZodNullable<z.ZodBoolean>;
73
+ deleteEmbeds: z.ZodNullable<z.ZodBoolean>;
74
+ customCoolDownBeforeNextLive: z.ZodNullable<z.ZodNumber>;
75
+ offlineGracePeriod: z.ZodNullable<z.ZodUnion<[z.ZodLiteral<number>, z.ZodLiteral<number>, ...z.ZodLiteral<number>[]]>>;
76
+ liveRoleId: z.ZodNullable<z.ZodString>;
77
+ usersForLiveRole: z.ZodArray<z.ZodString>;
78
+ usersWhoHaveLiveRole: z.ZodArray<z.ZodString>;
79
+ statsChannelIds: z.ZodNullable<z.ZodLazy<z.ZodObject<{
80
+ isLive: z.ZodNullable<z.ZodString>;
81
+ }, z.core.$strip>>>;
82
+ isCurrentlyLive: z.ZodNullable<z.ZodLazy<z.ZodObject<{
83
+ correct: z.ZodNullable<z.ZodBoolean>;
84
+ channelId: z.ZodNullable<z.ZodString>;
85
+ messageId: z.ZodNullable<z.ZodString>;
86
+ }, z.core.$strip>>>;
87
+ currentBroadcastId: z.ZodNullable<z.ZodString>;
88
+ lastLive: z.ZodNullable<z.ZodDate>;
89
+ }, z.core.$strip>;
90
+ readonly TWSCustomMessageSchema: z.ZodObject<{
91
+ content: z.ZodNullable<z.ZodString>;
92
+ showInviteButton: z.ZodNullable<z.ZodBoolean>;
93
+ showWatchButton: z.ZodNullable<z.ZodBoolean>;
94
+ embed: z.ZodNullable<z.ZodLazy<z.ZodObject<{
95
+ title: z.ZodNullable<z.ZodString>;
96
+ url: z.ZodNullable<z.ZodString>;
97
+ description: z.ZodString;
98
+ color: z.ZodNullable<z.ZodString>;
99
+ footer: z.ZodNullable<z.ZodString>;
100
+ footerIcon: z.ZodNullable<z.ZodString>;
101
+ image: z.ZodNullable<z.ZodString>;
102
+ thumbnail: z.ZodNullable<z.ZodString>;
103
+ author: z.ZodNullable<z.ZodString>;
104
+ authorIcon: z.ZodNullable<z.ZodString>;
105
+ fields: z.ZodArray<z.ZodLazy<z.ZodObject<{
106
+ name: z.ZodString;
107
+ value: z.ZodNullable<z.ZodString>;
108
+ inline: z.ZodNullable<z.ZodBoolean>;
109
+ }, z.core.$strip>>>;
110
+ }, z.core.$strip>>>;
111
+ buttons: z.ZodArray<z.ZodLazy<z.ZodObject<{
112
+ title: z.ZodString;
113
+ url: z.ZodNullable<z.ZodString>;
114
+ emojiUnicodeOrId: z.ZodNullable<z.ZodString>;
115
+ }, z.core.$strip>>>;
116
+ webhook: z.ZodNullable<z.ZodLazy<z.ZodObject<{
117
+ enabled: z.ZodNullable<z.ZodBoolean>;
118
+ username: z.ZodNullable<z.ZodString>;
119
+ avatarUrl: z.ZodNullable<z.ZodString>;
120
+ }, z.core.$strip>>>;
121
+ type: z.ZodEnum<{
122
+ clip: "clip";
123
+ clipForward: "clipForward";
124
+ vod: "vod";
125
+ kickLive: "kickLive";
126
+ kickOffline: "kickOffline";
127
+ twitchLive: "twitchLive";
128
+ twitchOffline: "twitchOffline";
129
+ rumbleLive: "rumbleLive";
130
+ rumbleOffline: "rumbleOffline";
131
+ rumbleVideo: "rumbleVideo";
132
+ tiktokLive: "tiktokLive";
133
+ tiktokOffline: "tiktokOffline";
134
+ tiktokVideo: "tiktokVideo";
135
+ youtubeLive: "youtubeLive";
136
+ youtubeVideo: "youtubeVideo";
137
+ clubPost: "clubPost";
138
+ }>;
139
+ }, z.core.$strip>;
140
+ readonly TWSStatsChannelIdSchema: z.ZodObject<{
141
+ isLive: z.ZodNullable<z.ZodString>;
142
+ }, z.core.$strip>;
143
+ readonly TWSCurrentlyLiveSchema: z.ZodObject<{
144
+ correct: z.ZodNullable<z.ZodBoolean>;
145
+ channelId: z.ZodNullable<z.ZodString>;
146
+ messageId: z.ZodNullable<z.ZodString>;
147
+ }, z.core.$strip>;
148
+ };
149
+ export declare const TwitterStreamerZodPartial: PartialZodObject<typeof TwitterStreamerZod>;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TwitterStreamerZodPartial = exports.TwitterStreamerZod = void 0;
4
+ const schema_zod_1 = require("./schema.zod");
5
+ const zod_1 = require("./zod");
6
+ const offlineGrace_1 = require("../offlineGrace");
7
+ const zod_2 = require("zod");
8
+ const TwitterStreamerSchema = zod_2.z.object({
9
+ streamerUserName: zod_2.z.string(),
10
+ guildId: zod_1.SnowFlake,
11
+ // The numeric X id. Handles get renamed; this is what polling is actually keyed on.
12
+ streamerId: zod_2.z.string().nullable(),
13
+ usePerStreamerEmbeds: zod_2.z.boolean().nullable(),
14
+ autoPublishIfAnnouncmentChannel: zod_2.z.boolean().nullable(),
15
+ customMessages: zod_2.z.array(zod_2.z.lazy(() => TWSCustomMessageSchema)),
16
+ // POSTS - free tier. Own channel and own ping role.
17
+ postNotificationChannelId: zod_1.SnowFlake.nullable(),
18
+ postPingRoleId: zod_1.SnowFlakeOrEveryone.nullable(),
19
+ showNotifyButton: zod_2.z.boolean().nullable(),
20
+ customCoolDownBeforeNextPost: zod_2.z.number().min(0).max(360).nullable(),
21
+ lastPostId: zod_2.z.string().nullable(),
22
+ lastPostAt: zod_2.z.date().nullable(),
23
+ // LIVE - paid tiers, gated separately by TwitterLiveNotifications. `pingRoleId` is the live role,
24
+ // matching every other platform that has one.
25
+ liveNotificationChannelId: zod_1.SnowFlake.nullable(),
26
+ pingRoleId: zod_1.SnowFlakeOrEveryone.nullable(),
27
+ sendOfflineMessage: zod_2.z.boolean().nullable(),
28
+ deleteEmbeds: zod_2.z.boolean().nullable(),
29
+ customCoolDownBeforeNextLive: zod_2.z.number().min(0).max(360).nullable(),
30
+ // A literal union, not min/max: it is a dropdown, and 7 minutes is not a value the UI can produce.
31
+ offlineGracePeriod: zod_2.z.union(offlineGrace_1.OFFLINE_GRACE_CHOICES.map((n) => zod_2.z.literal(n))).nullable(),
32
+ liveRoleId: zod_1.SnowFlake.nullable(),
33
+ usersForLiveRole: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_1.SnowFlake)),
34
+ usersWhoHaveLiveRole: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_1.SnowFlake)),
35
+ statsChannelIds: zod_2.z.lazy(() => TWSStatsChannelIdSchema).nullable(),
36
+ isCurrentlyLive: zod_2.z.lazy(() => TWSCurrentlyLiveSchema).nullable(),
37
+ currentBroadcastId: zod_2.z.string().nullable(),
38
+ lastLive: zod_2.z.date().nullable(),
39
+ });
40
+ const TWSCustomMessageSchema = zod_2.z.object({
41
+ type: schema_zod_1.StreamerMessageTypeEnum,
42
+ ...zod_1.CentralZod.Message(),
43
+ });
44
+ const TWSStatsChannelIdSchema = zod_2.z.object({
45
+ isLive: zod_2.z.string().nullable(),
46
+ });
47
+ const TWSCurrentlyLiveSchema = zod_2.z.object({
48
+ correct: zod_2.z.boolean().nullable(),
49
+ channelId: zod_1.SnowFlake.nullable(),
50
+ messageId: zod_1.SnowFlake.nullable(),
51
+ });
52
+ exports.TwitterStreamerZod = {
53
+ TwitterStreamerSchema,
54
+ TWSCustomMessageSchema,
55
+ TWSStatsChannelIdSchema,
56
+ TWSCurrentlyLiveSchema,
57
+ };
58
+ exports.TwitterStreamerZodPartial = Object.fromEntries(Object.entries(exports.TwitterStreamerZod).map(([key, value]) => [key, (0, schema_zod_1.deepPartialify)(value)]));