@notidotbot/noti-api-client 1.9.61 → 1.9.63

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.
@@ -29,6 +29,8 @@ import { APIEmotes } from '../classes/emotes';
29
29
  import { APIFiles } from '../classes/files';
30
30
  import { APIMinigamesFishing } from '../classes/minigamesFishing';
31
31
  import { APIPublicFishing } from '../classes/publicFishing';
32
+ import { APIPublicGiveaways } from '../classes/publicGiveaways';
33
+ import { APIPublicDrops } from '../classes/publicDrops';
32
34
  import { APIGuildFishing } from '../classes/guildFishing';
33
35
  import { APIAdminFishing } from '../classes/adminFishing';
34
36
  import { APIAdmin } from '../classes/admin';
@@ -50,6 +52,8 @@ export declare class WebDataManager {
50
52
  readonly guildFishing: APIGuildFishing;
51
53
  readonly minigamesFishing: APIMinigamesFishing;
52
54
  readonly publicFishing: APIPublicFishing;
55
+ readonly publicGiveaways: APIPublicGiveaways;
56
+ readonly publicDrops: APIPublicDrops;
53
57
  readonly other: APIOther;
54
58
  readonly guild: APIGuild;
55
59
  readonly teams: APITeams;
@@ -34,6 +34,8 @@ const emotes_1 = require("../classes/emotes");
34
34
  const files_1 = require("../classes/files");
35
35
  const minigamesFishing_1 = require("../classes/minigamesFishing");
36
36
  const publicFishing_1 = require("../classes/publicFishing");
37
+ const publicGiveaways_1 = require("../classes/publicGiveaways");
38
+ const publicDrops_1 = require("../classes/publicDrops");
37
39
  const guildFishing_1 = require("../classes/guildFishing");
38
40
  const adminFishing_1 = require("../classes/adminFishing");
39
41
  const admin_1 = require("../classes/admin");
@@ -54,6 +56,8 @@ class WebDataManager {
54
56
  guildFishing = new guildFishing_1.APIGuildFishing(this);
55
57
  minigamesFishing = new minigamesFishing_1.APIMinigamesFishing(this);
56
58
  publicFishing = new publicFishing_1.APIPublicFishing(this);
59
+ publicGiveaways = new publicGiveaways_1.APIPublicGiveaways(this);
60
+ publicDrops = new publicDrops_1.APIPublicDrops(this);
57
61
  other = new other_1.APIOther(this);
58
62
  guild = new guild_1.APIGuild(this);
59
63
  teams = new teams_1.APITeams(this);
package/dist/index.d.ts CHANGED
@@ -7,6 +7,8 @@ export * from './classes/adminFishing';
7
7
  export * from './classes/guildFishing';
8
8
  export * from './classes/minigamesFishing';
9
9
  export * from './classes/publicFishing';
10
+ export * from './classes/publicGiveaways';
11
+ export * from './classes/publicDrops';
10
12
  export * from './classes/emotes';
11
13
  export * from './classes/files';
12
14
  export * from './classes/other';
@@ -39,6 +41,8 @@ export { GuildMessageTypeEnum, StreamerMessageTypeEnum, PlatformEnum, $Enums } f
39
41
  export { FEATURE_NAMES, } from './other/features';
40
42
  export { OFFLINE_GRACE_CHOICES, OFFLINE_GRACE_DEFAULT, OFFLINE_GRACE_PLATFORMS, } from './other/offlineGrace';
41
43
  export type { OfflineGraceMinutes, OfflineGracePlatform } from './other/offlineGrace';
44
+ export { GIVEAWAY_CLAIM_WINDOWS, GIVEAWAY_CLAIM_WINDOW_LABELS, GIVEAWAY_MAX_CLAIM_ROUNDS, GIVEAWAY_WINNER_ROLE_MAX_DAYS, GIVEAWAY_MIN_ACCOUNT_AGE_MAX_DAYS, GIVEAWAY_WINNER_ROLE_FORBIDDEN_PERMISSIONS, } from './other/giveawayClaims';
45
+ export type { GiveawayClaimWindow, GiveawayWinnerStatus } from './other/giveawayClaims';
42
46
  export type { FeatureName, FeatureStatus, ResolvedFeature, } from './other/features';
43
47
  export type { Prisma, TSPrisma } from '@prisma/client';
44
48
  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.OFFLINE_GRACE_PLATFORMS = exports.OFFLINE_GRACE_DEFAULT = exports.OFFLINE_GRACE_CHOICES = exports.FEATURE_NAMES = exports.$Enums = exports.PlatformEnum = exports.StreamerMessageTypeEnum = exports.GuildMessageTypeEnum = void 0;
17
+ exports.GIVEAWAY_WINNER_ROLE_FORBIDDEN_PERMISSIONS = exports.GIVEAWAY_MIN_ACCOUNT_AGE_MAX_DAYS = exports.GIVEAWAY_WINNER_ROLE_MAX_DAYS = exports.GIVEAWAY_MAX_CLAIM_ROUNDS = exports.GIVEAWAY_CLAIM_WINDOW_LABELS = exports.GIVEAWAY_CLAIM_WINDOWS = exports.OFFLINE_GRACE_PLATFORMS = 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);
@@ -24,6 +24,8 @@ __exportStar(require("./classes/adminFishing"), exports);
24
24
  __exportStar(require("./classes/guildFishing"), exports);
25
25
  __exportStar(require("./classes/minigamesFishing"), exports);
26
26
  __exportStar(require("./classes/publicFishing"), exports);
27
+ __exportStar(require("./classes/publicGiveaways"), exports);
28
+ __exportStar(require("./classes/publicDrops"), exports);
27
29
  __exportStar(require("./classes/emotes"), exports);
28
30
  __exportStar(require("./classes/files"), exports);
29
31
  __exportStar(require("./classes/other"), exports);
@@ -65,3 +67,10 @@ var offlineGrace_1 = require("./other/offlineGrace");
65
67
  Object.defineProperty(exports, "OFFLINE_GRACE_CHOICES", { enumerable: true, get: function () { return offlineGrace_1.OFFLINE_GRACE_CHOICES; } });
66
68
  Object.defineProperty(exports, "OFFLINE_GRACE_DEFAULT", { enumerable: true, get: function () { return offlineGrace_1.OFFLINE_GRACE_DEFAULT; } });
67
69
  Object.defineProperty(exports, "OFFLINE_GRACE_PLATFORMS", { enumerable: true, get: function () { return offlineGrace_1.OFFLINE_GRACE_PLATFORMS; } });
70
+ var giveawayClaims_1 = require("./other/giveawayClaims");
71
+ Object.defineProperty(exports, "GIVEAWAY_CLAIM_WINDOWS", { enumerable: true, get: function () { return giveawayClaims_1.GIVEAWAY_CLAIM_WINDOWS; } });
72
+ Object.defineProperty(exports, "GIVEAWAY_CLAIM_WINDOW_LABELS", { enumerable: true, get: function () { return giveawayClaims_1.GIVEAWAY_CLAIM_WINDOW_LABELS; } });
73
+ Object.defineProperty(exports, "GIVEAWAY_MAX_CLAIM_ROUNDS", { enumerable: true, get: function () { return giveawayClaims_1.GIVEAWAY_MAX_CLAIM_ROUNDS; } });
74
+ Object.defineProperty(exports, "GIVEAWAY_WINNER_ROLE_MAX_DAYS", { enumerable: true, get: function () { return giveawayClaims_1.GIVEAWAY_WINNER_ROLE_MAX_DAYS; } });
75
+ Object.defineProperty(exports, "GIVEAWAY_MIN_ACCOUNT_AGE_MAX_DAYS", { enumerable: true, get: function () { return giveawayClaims_1.GIVEAWAY_MIN_ACCOUNT_AGE_MAX_DAYS; } });
76
+ Object.defineProperty(exports, "GIVEAWAY_WINNER_ROLE_FORBIDDEN_PERMISSIONS", { enumerable: true, get: function () { return giveawayClaims_1.GIVEAWAY_WINNER_ROLE_FORBIDDEN_PERMISSIONS; } });
@@ -121,6 +121,8 @@ export declare const GuildFeatures: {
121
121
  AutoRoleTimers: bigint;
122
122
  AutoRoleInvites: bigint;
123
123
  StickyMessageRoleFilters: bigint;
124
+ GiveawayClaims: bigint;
125
+ GiveawayWinnerRole: bigint;
124
126
  };
125
127
  export declare const GuildFeaturesText: Record<keyof typeof GuildFeatures, string>;
126
128
  export declare const UserFeatures: {
@@ -229,8 +231,10 @@ export declare class GuildFeaturesManager extends BitFieldManager<typeof GuildFe
229
231
  AutoRoleTimers: bigint;
230
232
  AutoRoleInvites: bigint;
231
233
  StickyMessageRoleFilters: bigint;
234
+ GiveawayClaims: bigint;
235
+ GiveawayWinnerRole: bigint;
232
236
  };
233
- t: Record<"StickyMessages" | "LinkedRoles" | "StatusRoles" | "Starboards" | "KickClips" | "StatCounters" | "BaseSyncableRoles" | "FullSyncableRoles" | "LiveRole" | "VoteSkipping" | "KickAuditLogs" | "LeaderboardCommand" | "RefreshingLeaderboard" | "LeaderBoardSyncRoles" | "BetaAccess" | "PriorityNotifications" | "KickNotifications" | "TwitchNotifications" | "ImportEmojis" | "ImportEmojisWithSub" | "CustomWebhooks" | "AnyMessageEditor" | "SyncSocialUsernames" | "AutoDeleteNotifications" | "TestNotificationCommand" | "CustomCooldowns" | "WelcomeAndLeaveNotifications" | "NotificationPingRoleId" | "SwitchStreamerAndGuildEmbeds" | "BirthdayNotifications" | "AllowNotSendingOfflineNotifications" | "AutoStatusLiveRoles" | "RumbleNotifications" | "AllowAutoPublishNotifications" | "NotificationOverrides" | "UseCustomButtons" | "AllowVodFeatures" | "TikTokNotifications" | "ManageBranding" | "CustomStarboards" | "AutoThreadOnStarboard" | "StarboardRewardRole" | "Giveaways" | "GiveawayLogs" | "ModifyGiveawayWhileRunning" | "ScheduleGiveaways" | "GiveawayRequirements" | "GiveawayBonusEntries" | "GiveawayEntryLimit" | "DisableDoubleVoteEntry" | "YouTubeNotifications" | "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" | "BadgeAllGames" | "AutoRoles" | "AutoRoleTimers" | "AutoRoleInvites" | "StickyMessageRoleFilters", string>;
237
+ 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" | "BadgeAllGames" | "AutoRoles" | "AutoRoleTimers" | "AutoRoleInvites" | "StickyMessageRoleFilters" | "GiveawayClaims" | "GiveawayWinnerRole", string>;
234
238
  all: bigint;
235
239
  static b: {
236
240
  BaseSyncableRoles: bigint;
@@ -315,8 +319,10 @@ export declare class GuildFeaturesManager extends BitFieldManager<typeof GuildFe
315
319
  AutoRoleTimers: bigint;
316
320
  AutoRoleInvites: bigint;
317
321
  StickyMessageRoleFilters: bigint;
322
+ GiveawayClaims: bigint;
323
+ GiveawayWinnerRole: bigint;
318
324
  };
319
- static t: Record<"StickyMessages" | "LinkedRoles" | "StatusRoles" | "Starboards" | "KickClips" | "StatCounters" | "BaseSyncableRoles" | "FullSyncableRoles" | "LiveRole" | "VoteSkipping" | "KickAuditLogs" | "LeaderboardCommand" | "RefreshingLeaderboard" | "LeaderBoardSyncRoles" | "BetaAccess" | "PriorityNotifications" | "KickNotifications" | "TwitchNotifications" | "ImportEmojis" | "ImportEmojisWithSub" | "CustomWebhooks" | "AnyMessageEditor" | "SyncSocialUsernames" | "AutoDeleteNotifications" | "TestNotificationCommand" | "CustomCooldowns" | "WelcomeAndLeaveNotifications" | "NotificationPingRoleId" | "SwitchStreamerAndGuildEmbeds" | "BirthdayNotifications" | "AllowNotSendingOfflineNotifications" | "AutoStatusLiveRoles" | "RumbleNotifications" | "AllowAutoPublishNotifications" | "NotificationOverrides" | "UseCustomButtons" | "AllowVodFeatures" | "TikTokNotifications" | "ManageBranding" | "CustomStarboards" | "AutoThreadOnStarboard" | "StarboardRewardRole" | "Giveaways" | "GiveawayLogs" | "ModifyGiveawayWhileRunning" | "ScheduleGiveaways" | "GiveawayRequirements" | "GiveawayBonusEntries" | "GiveawayEntryLimit" | "DisableDoubleVoteEntry" | "YouTubeNotifications" | "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" | "BadgeAllGames" | "AutoRoles" | "AutoRoleTimers" | "AutoRoleInvites" | "StickyMessageRoleFilters", string>;
325
+ 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" | "BadgeAllGames" | "AutoRoles" | "AutoRoleTimers" | "AutoRoleInvites" | "StickyMessageRoleFilters" | "GiveawayClaims" | "GiveawayWinnerRole", string>;
320
326
  static all: bigint;
321
327
  convertBitToField<T extends EnumValues<typeof GuildFeatures>>(bit: T): string | null;
322
328
  }
@@ -217,6 +217,10 @@ exports.GuildFeatures = {
217
217
  AutoRoleInvites: 1n << 81n,
218
218
  // Sticky messages: per-sticky role whitelist/blacklist deciding whose messages re-post it. Premium.
219
219
  StickyMessageRoleFilters: 1n << 82n,
220
+ // Giveaway claims: winners must press Claim in a window or are rerolled (Premium Plus), and a role
221
+ // for winners (Premium).
222
+ GiveawayClaims: 1n << 83n,
223
+ GiveawayWinnerRole: 1n << 84n,
220
224
  };
221
225
  exports.GuildFeaturesText = {
222
226
  BaseSyncableRoles: 'Basic Syncable Roles',
@@ -303,6 +307,8 @@ exports.GuildFeaturesText = {
303
307
  AutoRoleTimers: 'Auto Role Timers',
304
308
  AutoRoleInvites: 'Auto Role Invite Rules',
305
309
  StickyMessageRoleFilters: 'Sticky Message Role Filters',
310
+ GiveawayClaims: 'Giveaway Claims',
311
+ GiveawayWinnerRole: 'Giveaway Winner Role',
306
312
  };
307
313
  exports.UserFeatures = {
308
314
  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", "badgeNotifications", "kickBounties", "autoRoles", "offlineGracePeriod", "twitter", "voteToTest", "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", "badgeNotifications", "kickBounties", "autoRoles", "giveawayClaims", "publicGiveaways", "publicDrops", "offlineGracePeriod", "twitter", "voteToTest", "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';
@@ -27,6 +27,9 @@ exports.FEATURE_NAMES = [
27
27
  'badgeNotifications',
28
28
  'kickBounties',
29
29
  'autoRoles',
30
+ 'giveawayClaims',
31
+ 'publicGiveaways',
32
+ 'publicDrops',
30
33
  'offlineGracePeriod',
31
34
  'twitter',
32
35
  'voteToTest',
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Giveaway claims - winners press Claim within a window, or the prize is rerolled.
3
+ *
4
+ * Mirrors `src/modules/giveawayClaims.ts` in Noti-v3. The server validates against the same list, so
5
+ * import these rather than retyping them: a hand-copied union drifts silently.
6
+ */
7
+ /** Claim windows a host can pick, in minutes: 10m, 30m, 1h, 6h, 12h, 24h. */
8
+ export declare const GIVEAWAY_CLAIM_WINDOWS: readonly [10, 30, 60, 360, 720, 1440];
9
+ export type GiveawayClaimWindow = typeof GIVEAWAY_CLAIM_WINDOWS[number];
10
+ /** How each claim window reads in a picker. */
11
+ export declare const GIVEAWAY_CLAIM_WINDOW_LABELS: Record<GiveawayClaimWindow, string>;
12
+ /** After this many claim rounds, unfilled prizes stay unclaimed. */
13
+ export declare const GIVEAWAY_MAX_CLAIM_ROUNDS = 10;
14
+ /** Bounds for `winnerRoleRemoveAfterDays` and `requirements.minAccountAgeDays`. */
15
+ export declare const GIVEAWAY_WINNER_ROLE_MAX_DAYS = 365;
16
+ export declare const GIVEAWAY_MIN_ACCOUNT_AGE_MAX_DAYS = 3650;
17
+ /**
18
+ * Permissions a winner role may never carry - the server refuses such a role (it goes to whoever wins).
19
+ * Use it to grey those roles out in the picker rather than letting the save fail.
20
+ */
21
+ export declare const GIVEAWAY_WINNER_ROLE_FORBIDDEN_PERMISSIONS: readonly ["Administrator", "ManageGuild", "ManageRoles", "ManageChannels", "ManageWebhooks", "BanMembers", "KickMembers", "ModerateMembers"];
22
+ /** A claim winner's state, as `winners[].status` carries it. */
23
+ export type GiveawayWinnerStatus = 'pending' | 'claimed' | 'expired';
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ /**
3
+ * Giveaway claims - winners press Claim within a window, or the prize is rerolled.
4
+ *
5
+ * Mirrors `src/modules/giveawayClaims.ts` in Noti-v3. The server validates against the same list, so
6
+ * import these rather than retyping them: a hand-copied union drifts silently.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.GIVEAWAY_WINNER_ROLE_FORBIDDEN_PERMISSIONS = exports.GIVEAWAY_MIN_ACCOUNT_AGE_MAX_DAYS = exports.GIVEAWAY_WINNER_ROLE_MAX_DAYS = exports.GIVEAWAY_MAX_CLAIM_ROUNDS = exports.GIVEAWAY_CLAIM_WINDOW_LABELS = exports.GIVEAWAY_CLAIM_WINDOWS = void 0;
10
+ /** Claim windows a host can pick, in minutes: 10m, 30m, 1h, 6h, 12h, 24h. */
11
+ exports.GIVEAWAY_CLAIM_WINDOWS = [10, 30, 60, 360, 720, 1440];
12
+ /** How each claim window reads in a picker. */
13
+ exports.GIVEAWAY_CLAIM_WINDOW_LABELS = {
14
+ 10: '10 minutes',
15
+ 30: '30 minutes',
16
+ 60: '1 hour',
17
+ 360: '6 hours',
18
+ 720: '12 hours',
19
+ 1440: '24 hours',
20
+ };
21
+ /** After this many claim rounds, unfilled prizes stay unclaimed. */
22
+ exports.GIVEAWAY_MAX_CLAIM_ROUNDS = 10;
23
+ /** Bounds for `winnerRoleRemoveAfterDays` and `requirements.minAccountAgeDays`. */
24
+ exports.GIVEAWAY_WINNER_ROLE_MAX_DAYS = 365;
25
+ exports.GIVEAWAY_MIN_ACCOUNT_AGE_MAX_DAYS = 3650;
26
+ /**
27
+ * Permissions a winner role may never carry - the server refuses such a role (it goes to whoever wins).
28
+ * Use it to grey those roles out in the picker rather than letting the save fail.
29
+ */
30
+ exports.GIVEAWAY_WINNER_ROLE_FORBIDDEN_PERMISSIONS = [
31
+ 'Administrator', 'ManageGuild', 'ManageRoles', 'ManageChannels', 'ManageWebhooks',
32
+ 'BanMembers', 'KickMembers', 'ModerateMembers',
33
+ ];
@@ -49,8 +49,17 @@ export declare const GuildGiveawayZod: {
49
49
  boostingServer: z.ZodNullable<z.ZodBoolean>;
50
50
  messageCount: z.ZodNullable<z.ZodNumber>;
51
51
  roles: z.ZodArray<z.ZodString>;
52
+ minAccountAgeDays: z.ZodNullable<z.ZodNumber>;
52
53
  }, z.core.$strip>>>>;
53
54
  bypassRequirementsRoles: z.ZodOptional<z.ZodArray<z.ZodString>>;
55
+ claimWindowMinutes: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<number>, z.ZodLiteral<number>, ...z.ZodLiteral<number>[]]>>>;
56
+ claimRound: z.ZodOptional<z.ZodNumber>;
57
+ claimFinishedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
58
+ claimMessageId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
59
+ winnerRoleId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
60
+ winnerRoleRemoveAfterDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
61
+ dmWinners: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
62
+ publicListing: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
54
63
  }, z.core.$strip>;
55
64
  readonly GuildGiveawaySchema: z.ZodObject<{
56
65
  giveawayId: z.ZodString;
@@ -96,8 +105,17 @@ export declare const GuildGiveawayZod: {
96
105
  boostingServer: z.ZodNullable<z.ZodBoolean>;
97
106
  messageCount: z.ZodNullable<z.ZodNumber>;
98
107
  roles: z.ZodArray<z.ZodString>;
108
+ minAccountAgeDays: z.ZodNullable<z.ZodNumber>;
99
109
  }, z.core.$strip>>>;
100
110
  bypassRequirementsRoles: z.ZodArray<z.ZodString>;
111
+ claimWindowMinutes: z.ZodNullable<z.ZodUnion<[z.ZodLiteral<number>, z.ZodLiteral<number>, ...z.ZodLiteral<number>[]]>>;
112
+ claimRound: z.ZodNumber;
113
+ claimFinishedAt: z.ZodNullable<z.ZodDate>;
114
+ claimMessageId: z.ZodNullable<z.ZodString>;
115
+ winnerRoleId: z.ZodNullable<z.ZodString>;
116
+ winnerRoleRemoveAfterDays: z.ZodNullable<z.ZodNumber>;
117
+ dmWinners: z.ZodNullable<z.ZodBoolean>;
118
+ publicListing: z.ZodNullable<z.ZodBoolean>;
101
119
  }, z.core.$strip>;
102
120
  readonly GuildGiveawayFilterSchema: z.ZodObject<{
103
121
  roleMode: z.ZodEnum<{
@@ -116,6 +134,7 @@ export declare const GuildGiveawayZod: {
116
134
  boostingServer: z.ZodNullable<z.ZodBoolean>;
117
135
  messageCount: z.ZodNullable<z.ZodNumber>;
118
136
  roles: z.ZodArray<z.ZodString>;
137
+ minAccountAgeDays: z.ZodNullable<z.ZodNumber>;
119
138
  }, z.core.$strip>;
120
139
  };
121
140
  export declare const GuildGiveawayZodPartial: PartialZodObject<typeof GuildGiveawayZod>;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GuildGiveawayZodPartial = exports.GuildGiveawayZod = void 0;
4
4
  const schema_zod_1 = require("./schema.zod");
5
5
  const zod_1 = require("./zod");
6
+ const giveawayClaims_1 = require("../giveawayClaims");
6
7
  const zod_2 = require("zod");
7
8
  const mainSchemaFields = {
8
9
  giveawayId: zod_2.z.string(),
@@ -28,6 +29,16 @@ const mainSchemaFields = {
28
29
  roleBonuses: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_2.z.lazy(() => GuildGiveawayRoleBonusSchema)), ['multiplier']),
29
30
  requirements: zod_2.z.lazy(() => GuildGiveawayRequirementsSchema).nullable(),
30
31
  bypassRequirementsRoles: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_1.SnowFlake)),
32
+ // phases/giveaway-claims/. claimRound / claimFinishedAt are server-owned (GuildGiveawayInternalKeys).
33
+ claimWindowMinutes: zod_2.z.union(giveawayClaims_1.GIVEAWAY_CLAIM_WINDOWS.map((n) => zod_2.z.literal(n))).nullable(),
34
+ claimRound: zod_2.z.number().int().min(0),
35
+ claimFinishedAt: zod_2.z.date().nullable(),
36
+ claimMessageId: zod_1.SnowFlake.nullable(),
37
+ winnerRoleId: zod_1.SnowFlake.nullable(),
38
+ winnerRoleRemoveAfterDays: zod_2.z.number().int().min(1).max(giveawayClaims_1.GIVEAWAY_WINNER_ROLE_MAX_DAYS).nullable(),
39
+ dmWinners: zod_2.z.boolean().nullable(),
40
+ // Public giveaways page: null follows the server, true/false overrides it.
41
+ publicListing: zod_2.z.boolean().nullable(),
31
42
  };
32
43
  const GuildGiveawaySchema = zod_2.z.object({
33
44
  ...mainSchemaFields,
@@ -61,6 +72,7 @@ const GuildGiveawayRequirementsSchema = zod_2.z.object({
61
72
  boostingServer: zod_2.z.boolean().nullable(),
62
73
  messageCount: zod_2.z.number().min(1).nullable(),
63
74
  roles: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_1.SnowFlake)),
75
+ minAccountAgeDays: zod_2.z.number().int().min(1).max(giveawayClaims_1.GIVEAWAY_MIN_ACCOUNT_AGE_MAX_DAYS).nullable(),
64
76
  });
65
77
  exports.GuildGiveawayZod = {
66
78
  GuildGiveawayCreateSchema,
@@ -68,6 +68,8 @@ export declare const GuildZod: {
68
68
  vodDownloadStoreForHours: z.ZodNullable<z.ZodNumber>;
69
69
  disableDoubleVoteEntry: z.ZodNullable<z.ZodBoolean>;
70
70
  giveawayLogsChannelId: z.ZodNullable<z.ZodString>;
71
+ publicGiveaways: z.ZodBoolean;
72
+ giveawayJoinLinks: z.ZodBoolean;
71
73
  randomMessages: z.ZodArray<z.ZodLazy<z.ZodObject<{
72
74
  type: z.ZodEnum<{
73
75
  birthday: "birthday";
@@ -28,6 +28,8 @@ const GuildSchema = zod_2.z.object({
28
28
  vodDownloadStoreForHours: zod_2.z.number().min(0).nullable(),
29
29
  disableDoubleVoteEntry: zod_2.z.boolean().nullable(),
30
30
  giveawayLogsChannelId: zod_1.SnowFlake.nullable(),
31
+ publicGiveaways: zod_2.z.boolean(),
32
+ giveawayJoinLinks: zod_2.z.boolean(),
31
33
  randomMessages: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_2.z.lazy(() => GuildRandomMessageSchema)), ['type']),
32
34
  autoLiveRoleLogs: zod_1.SnowFlake.nullable(),
33
35
  autoLiveRoles: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_2.z.lazy(() => GuildAutoLiveRoleSchema)), ['roleId']),