@notidotbot/noti-api-client 1.9.32 → 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.
- package/dist/classes/guildPlatform.d.ts +3 -3
- package/dist/classes/guildPlatformAction.d.ts +2 -2
- package/dist/classes/guildStatChannels.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/other/bitfields.d.ts +8 -2
- package/dist/other/bitfields.js +4 -0
- package/dist/other/features.d.ts +1 -1
- package/dist/other/features.js +1 -0
- package/dist/other/prisma.d.ts +3 -0
- package/dist/other/types.d.ts +1 -0
- package/dist/other/zod/guild.zod.d.ts +2 -0
- package/dist/other/zod/guild.zod.js +1 -0
- package/dist/other/zod/twitterStreamer.zod.d.ts +149 -0
- package/dist/other/zod/twitterStreamer.zod.js +58 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/prisma/generated/ts-prisma.d.ts +5803 -869
- package/prisma/schema/models/guild.prisma +1 -0
- package/prisma/schema/models/twitterStreamer.prisma +157 -0
- 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
|
@@ -38,4 +38,4 @@ export { OFFLINE_GRACE_CHOICES, OFFLINE_GRACE_DEFAULT, } from './other/offlineGr
|
|
|
38
38
|
export type { OfflineGraceMinutes } from './other/offlineGrace';
|
|
39
39
|
export type { FeatureName, FeatureStatus, ResolvedFeature, } from './other/features';
|
|
40
40
|
export type { Prisma, TSPrisma } from '@prisma/client';
|
|
41
|
-
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';
|
|
@@ -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
|
}
|
package/dist/other/bitfields.js
CHANGED
|
@@ -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,
|
package/dist/other/features.d.ts
CHANGED
|
@@ -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", "offlineGracePeriod", "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';
|
package/dist/other/features.js
CHANGED
package/dist/other/prisma.d.ts
CHANGED
|
@@ -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>;
|
package/dist/other/types.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export type GuildPlanType = {
|
|
|
30
30
|
defaultTiktokConnections: number | null;
|
|
31
31
|
defaultWhatnotConnections: number | null;
|
|
32
32
|
defaultClubConnections: number | null;
|
|
33
|
+
defaultTwitterConnections: number | null;
|
|
33
34
|
defaultGameConnections: number | null;
|
|
34
35
|
defaultKickClips: number | null;
|
|
35
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(),
|
|
@@ -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)]));
|