@notidotbot/noti-api-client 1.4.0
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/cname.js +3 -0
- package/dist/classes/@me.d.ts +122 -0
- package/dist/classes/@me.js +59 -0
- package/dist/classes/admin.d.ts +71 -0
- package/dist/classes/admin.js +26 -0
- package/dist/classes/client.d.ts +156 -0
- package/dist/classes/client.js +116 -0
- package/dist/classes/emotes.d.ts +31 -0
- package/dist/classes/emotes.js +24 -0
- package/dist/classes/files.d.ts +36 -0
- package/dist/classes/files.js +36 -0
- package/dist/classes/guild.d.ts +187 -0
- package/dist/classes/guild.js +140 -0
- package/dist/classes/guildDrops.d.ts +58 -0
- package/dist/classes/guildDrops.js +32 -0
- package/dist/classes/guildGiveaway.d.ts +110 -0
- package/dist/classes/guildGiveaway.js +76 -0
- package/dist/classes/guildPlatform.d.ts +163 -0
- package/dist/classes/guildPlatform.js +99 -0
- package/dist/classes/guildPlatformAction.d.ts +67 -0
- package/dist/classes/guildPlatformAction.js +26 -0
- package/dist/classes/guildStarboard.d.ts +66 -0
- package/dist/classes/guildStarboard.js +36 -0
- package/dist/classes/linked.d.ts +26 -0
- package/dist/classes/linked.js +32 -0
- package/dist/classes/other.d.ts +83 -0
- package/dist/classes/other.js +53 -0
- package/dist/classes/platform.d.ts +227 -0
- package/dist/classes/platform.js +30 -0
- package/dist/classes/premium.d.ts +179 -0
- package/dist/classes/premium.js +76 -0
- package/dist/classes/sessions.d.ts +42 -0
- package/dist/classes/sessions.js +30 -0
- package/dist/classes/teams.d.ts +88 -0
- package/dist/classes/teams.js +66 -0
- package/dist/classes/telemetry.d.ts +32 -0
- package/dist/classes/telemetry.js +28 -0
- package/dist/classes/user.d.ts +40 -0
- package/dist/classes/user.js +30 -0
- package/dist/classes/vods.d.ts +55 -0
- package/dist/classes/vods.js +38 -0
- package/dist/core/manager.d.ts +57 -0
- package/dist/core/manager.js +78 -0
- package/dist/core/utils.d.ts +4 -0
- package/dist/core/utils.js +26 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +42 -0
- package/dist/modules/stripe.d.ts +12 -0
- package/dist/modules/stripe.js +18 -0
- package/dist/other/bitfields.d.ts +283 -0
- package/dist/other/bitfields.js +323 -0
- package/dist/other/enums.d.ts +2 -0
- package/dist/other/enums.js +10 -0
- package/dist/other/prisma.d.ts +76 -0
- package/dist/other/prisma.js +9 -0
- package/dist/other/templates.d.ts +795 -0
- package/dist/other/templates.js +706 -0
- package/dist/other/types.d.ts +45 -0
- package/dist/other/types.js +17 -0
- package/dist/other/utils.d.ts +5 -0
- package/dist/other/utils.js +51 -0
- package/dist/other/zod/client.zod.d.ts +349 -0
- package/dist/other/zod/client.zod.js +63 -0
- package/dist/other/zod/drops.zod.d.ts +16 -0
- package/dist/other/zod/drops.zod.js +93 -0
- package/dist/other/zod/giveaways.zod.d.ts +382 -0
- package/dist/other/zod/giveaways.zod.js +72 -0
- package/dist/other/zod/guild.zod.d.ts +1638 -0
- package/dist/other/zod/guild.zod.js +139 -0
- package/dist/other/zod/kickStreamer.zod.d.ts +761 -0
- package/dist/other/zod/kickStreamer.zod.js +92 -0
- package/dist/other/zod/member.zod.d.ts +22 -0
- package/dist/other/zod/member.zod.js +15 -0
- package/dist/other/zod/r2Storage.zod.d.ts +56 -0
- package/dist/other/zod/r2Storage.zod.js +21 -0
- package/dist/other/zod/rumbleStreamer.zod.d.ts +530 -0
- package/dist/other/zod/rumbleStreamer.zod.js +45 -0
- package/dist/other/zod/schema.zod.d.ts +25 -0
- package/dist/other/zod/schema.zod.js +168 -0
- package/dist/other/zod/starboard.zod.d.ts +167 -0
- package/dist/other/zod/starboard.zod.js +46 -0
- package/dist/other/zod/team.zod.d.ts +107 -0
- package/dist/other/zod/team.zod.js +30 -0
- package/dist/other/zod/tiktokStreamer.zod.d.ts +473 -0
- package/dist/other/zod/tiktokStreamer.zod.js +46 -0
- package/dist/other/zod/twitchStreamer.zod.d.ts +473 -0
- package/dist/other/zod/twitchStreamer.zod.js +46 -0
- package/dist/other/zod/user.zod.d.ts +678 -0
- package/dist/other/zod/user.zod.js +124 -0
- package/dist/other/zod/youtubeStreamer.zod.d.ts +476 -0
- package/dist/other/zod/youtubeStreamer.zod.js +47 -0
- package/dist/other/zod/zod.d.ts +177 -0
- package/dist/other/zod/zod.js +60 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types.d.ts +37 -0
- package/dist/types.js +2 -0
- package/package.json +63 -0
- package/prisma/generated/index.ts +25 -0
- package/prisma/generated/ts-prisma.d.ts +91725 -0
- package/prisma/schema/models/client.prisma +89 -0
- package/prisma/schema/models/drops.prisma +167 -0
- package/prisma/schema/models/giveaways.prisma +82 -0
- package/prisma/schema/models/guild.prisma +368 -0
- package/prisma/schema/models/kickStreamer.prisma +202 -0
- package/prisma/schema/models/member.prisma +10 -0
- package/prisma/schema/models/r2Storage.prisma +22 -0
- package/prisma/schema/models/rumbleStreamer.prisma +121 -0
- package/prisma/schema/models/starboard.prisma +66 -0
- package/prisma/schema/models/team.prisma +38 -0
- package/prisma/schema/models/tiktokStreamer.prisma +121 -0
- package/prisma/schema/models/twitchStreamer.prisma +122 -0
- package/prisma/schema/models/user.prisma +212 -0
- package/prisma/schema/models/youtubeStreamer.prisma +123 -0
- package/prisma/schema/schema.prisma +182 -0
- package/prisma.config.ts +6 -0
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
export type EnumKeys<T extends Record<string, bigint>> = keyof T;
|
|
2
|
+
export type EnumValues<T extends Record<string, bigint>> = T[keyof T];
|
|
3
|
+
export declare abstract class BitFieldManager<E extends Record<string, bigint>, T extends Record<keyof E, string>> {
|
|
4
|
+
private enumObject;
|
|
5
|
+
private enumTexts;
|
|
6
|
+
private onChange?;
|
|
7
|
+
bitfield: bigint;
|
|
8
|
+
private old;
|
|
9
|
+
abstract convertBitToField(bit: EnumValues<E>): string | null;
|
|
10
|
+
constructor(enumObject: E, enumTexts: T, initialValue?: EnumValues<E>, onChange?: ((oldBitfield: bigint, newBitfield: bigint) => void) | undefined);
|
|
11
|
+
set(bit: EnumValues<E>): this;
|
|
12
|
+
add(bit: EnumValues<E>): this;
|
|
13
|
+
addMultiple(bits: EnumValues<E>[]): this;
|
|
14
|
+
addNew(bits: EnumValues<E>[]): this;
|
|
15
|
+
remove(bit: EnumValues<E>): this;
|
|
16
|
+
removeMultiple(bits: EnumValues<E>[]): this;
|
|
17
|
+
has(bit: EnumValues<E>): boolean;
|
|
18
|
+
hasSome(bits: EnumValues<E>[]): boolean;
|
|
19
|
+
hasAll(bits: EnumValues<E>[]): boolean;
|
|
20
|
+
reset(): this;
|
|
21
|
+
toggle(bit: EnumValues<E>): this;
|
|
22
|
+
toggleMultiple(bits: EnumValues<E>[]): this;
|
|
23
|
+
toArray(): EnumKeys<E>[];
|
|
24
|
+
toNiceArray(): string[];
|
|
25
|
+
toBits(): EnumValues<E>[];
|
|
26
|
+
toAll(): {
|
|
27
|
+
bit: EnumValues<E>;
|
|
28
|
+
text: string;
|
|
29
|
+
key: EnumKeys<E>;
|
|
30
|
+
}[];
|
|
31
|
+
toString(): string;
|
|
32
|
+
private run;
|
|
33
|
+
static fromArray<E extends Record<string, bigint>, T extends Record<keyof E, string> = Record<keyof E, string>>(enumObject: E, enumTexts: T, array: EnumKeys<E>[], initialValue?: EnumValues<E>): BitFieldManager<E, T>;
|
|
34
|
+
static deserialize(bitfield: string | number): bigint;
|
|
35
|
+
static serialize(bitfield: bigint): string;
|
|
36
|
+
static fromBits(enumObject: Record<string, bigint>): bigint;
|
|
37
|
+
}
|
|
38
|
+
export declare class ImplementedBitFieldManager<E extends Record<string, bigint>, T extends Record<keyof E, string>> extends BitFieldManager<E, T> {
|
|
39
|
+
convertBitToField(): string | null;
|
|
40
|
+
}
|
|
41
|
+
export declare const GuildFeatures: {
|
|
42
|
+
BaseSyncableRoles: bigint;
|
|
43
|
+
FullSyncableRoles: bigint;
|
|
44
|
+
LiveRole: bigint;
|
|
45
|
+
StatCounters: bigint;
|
|
46
|
+
VoteSkipping: bigint;
|
|
47
|
+
KickAuditLogs: bigint;
|
|
48
|
+
LeaderboardCommand: bigint;
|
|
49
|
+
RefreshingLeaderboard: bigint;
|
|
50
|
+
LeaderBoardSyncRoles: bigint;
|
|
51
|
+
BetaAccess: bigint;
|
|
52
|
+
PriorityNotifications: bigint;
|
|
53
|
+
KickClips: bigint;
|
|
54
|
+
KickNotifications: bigint;
|
|
55
|
+
TwitchNotifications: bigint;
|
|
56
|
+
ImportEmojis: bigint;
|
|
57
|
+
ImportEmojisWithSub: bigint;
|
|
58
|
+
CustomWebhooks: bigint;
|
|
59
|
+
AnyMessageEditor: bigint;
|
|
60
|
+
SyncSocialUsernames: bigint;
|
|
61
|
+
AutoDeleteNotifications: bigint;
|
|
62
|
+
TestNotificationCommand: bigint;
|
|
63
|
+
CustomCooldowns: bigint;
|
|
64
|
+
WelcomeAndLeaveNotifications: bigint;
|
|
65
|
+
NotificationPingRoleId: bigint;
|
|
66
|
+
SwitchStreamerAndGuildEmbeds: bigint;
|
|
67
|
+
BirthdayNotifications: bigint;
|
|
68
|
+
AllowNotSendingOfflineNotifications: bigint;
|
|
69
|
+
AutoStatusLiveRoles: bigint;
|
|
70
|
+
RumbleNotifications: bigint;
|
|
71
|
+
AllowAutoPublishNotifications: bigint;
|
|
72
|
+
NotificationOverrides: bigint;
|
|
73
|
+
UseCustomButtons: bigint;
|
|
74
|
+
AllowVodFeatures: bigint;
|
|
75
|
+
TikTokNotifications: bigint;
|
|
76
|
+
StatusRoles: bigint;
|
|
77
|
+
ManageBranding: bigint;
|
|
78
|
+
StickyMessages: bigint;
|
|
79
|
+
Starboards: bigint;
|
|
80
|
+
CustomStarboards: bigint;
|
|
81
|
+
AutoThreadOnStarboard: bigint;
|
|
82
|
+
StarboardRewardRole: bigint;
|
|
83
|
+
Giveaways: bigint;
|
|
84
|
+
GiveawayLogs: bigint;
|
|
85
|
+
ModifyGiveawayWhileRunning: bigint;
|
|
86
|
+
ScheduleGiveaways: bigint;
|
|
87
|
+
GiveawayRequirements: bigint;
|
|
88
|
+
GiveawayBonusEntries: bigint;
|
|
89
|
+
GiveawayEntryLimit: bigint;
|
|
90
|
+
DisableDoubleVoteEntry: bigint;
|
|
91
|
+
YouTubeNotifications: bigint;
|
|
92
|
+
};
|
|
93
|
+
export declare const GuildFeaturesText: Record<keyof typeof GuildFeatures, string>;
|
|
94
|
+
export declare const UserFeatures: {
|
|
95
|
+
HasOneServerPremium: bigint;
|
|
96
|
+
GlobalVoteSkip: bigint;
|
|
97
|
+
MediaShare: bigint;
|
|
98
|
+
LinkedRoles: bigint;
|
|
99
|
+
};
|
|
100
|
+
export declare const UserFeaturesText: Record<keyof typeof UserFeatures, string>;
|
|
101
|
+
export declare const UserFlags: {
|
|
102
|
+
Partner: bigint;
|
|
103
|
+
Premium: bigint;
|
|
104
|
+
Staff: bigint;
|
|
105
|
+
Developer: bigint;
|
|
106
|
+
Beta: bigint;
|
|
107
|
+
Owner: bigint;
|
|
108
|
+
};
|
|
109
|
+
export declare const UserFlagsText: Record<keyof typeof UserFlags, string>;
|
|
110
|
+
export declare const TeamPermissions: {
|
|
111
|
+
ManageMediaShare: bigint;
|
|
112
|
+
};
|
|
113
|
+
export declare const TeamPermissionsText: Record<keyof typeof TeamPermissions, string>;
|
|
114
|
+
export declare class GuildFeaturesManager extends BitFieldManager<typeof GuildFeatures, typeof GuildFeaturesText> {
|
|
115
|
+
constructor(initialValue: EnumValues<typeof GuildFeatures> | string);
|
|
116
|
+
b: {
|
|
117
|
+
BaseSyncableRoles: bigint;
|
|
118
|
+
FullSyncableRoles: bigint;
|
|
119
|
+
LiveRole: bigint;
|
|
120
|
+
StatCounters: bigint;
|
|
121
|
+
VoteSkipping: bigint;
|
|
122
|
+
KickAuditLogs: bigint;
|
|
123
|
+
LeaderboardCommand: bigint;
|
|
124
|
+
RefreshingLeaderboard: bigint;
|
|
125
|
+
LeaderBoardSyncRoles: bigint;
|
|
126
|
+
BetaAccess: bigint;
|
|
127
|
+
PriorityNotifications: bigint;
|
|
128
|
+
KickClips: bigint;
|
|
129
|
+
KickNotifications: bigint;
|
|
130
|
+
TwitchNotifications: bigint;
|
|
131
|
+
ImportEmojis: bigint;
|
|
132
|
+
ImportEmojisWithSub: bigint;
|
|
133
|
+
CustomWebhooks: bigint;
|
|
134
|
+
AnyMessageEditor: bigint;
|
|
135
|
+
SyncSocialUsernames: bigint;
|
|
136
|
+
AutoDeleteNotifications: bigint;
|
|
137
|
+
TestNotificationCommand: bigint;
|
|
138
|
+
CustomCooldowns: bigint;
|
|
139
|
+
WelcomeAndLeaveNotifications: bigint;
|
|
140
|
+
NotificationPingRoleId: bigint;
|
|
141
|
+
SwitchStreamerAndGuildEmbeds: bigint;
|
|
142
|
+
BirthdayNotifications: bigint;
|
|
143
|
+
AllowNotSendingOfflineNotifications: bigint;
|
|
144
|
+
AutoStatusLiveRoles: bigint;
|
|
145
|
+
RumbleNotifications: bigint;
|
|
146
|
+
AllowAutoPublishNotifications: bigint;
|
|
147
|
+
NotificationOverrides: bigint;
|
|
148
|
+
UseCustomButtons: bigint;
|
|
149
|
+
AllowVodFeatures: bigint;
|
|
150
|
+
TikTokNotifications: bigint;
|
|
151
|
+
StatusRoles: bigint;
|
|
152
|
+
ManageBranding: bigint;
|
|
153
|
+
StickyMessages: bigint;
|
|
154
|
+
Starboards: bigint;
|
|
155
|
+
CustomStarboards: bigint;
|
|
156
|
+
AutoThreadOnStarboard: bigint;
|
|
157
|
+
StarboardRewardRole: bigint;
|
|
158
|
+
Giveaways: bigint;
|
|
159
|
+
GiveawayLogs: bigint;
|
|
160
|
+
ModifyGiveawayWhileRunning: bigint;
|
|
161
|
+
ScheduleGiveaways: bigint;
|
|
162
|
+
GiveawayRequirements: bigint;
|
|
163
|
+
GiveawayBonusEntries: bigint;
|
|
164
|
+
GiveawayEntryLimit: bigint;
|
|
165
|
+
DisableDoubleVoteEntry: bigint;
|
|
166
|
+
YouTubeNotifications: bigint;
|
|
167
|
+
};
|
|
168
|
+
t: Record<"StickyMessages" | "StatusRoles" | "Starboards" | "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" | "ManageBranding" | "CustomStarboards" | "AutoThreadOnStarboard" | "StarboardRewardRole" | "Giveaways" | "GiveawayLogs" | "ModifyGiveawayWhileRunning" | "ScheduleGiveaways" | "GiveawayRequirements" | "GiveawayBonusEntries" | "GiveawayEntryLimit" | "DisableDoubleVoteEntry" | "YouTubeNotifications", string>;
|
|
169
|
+
all: bigint;
|
|
170
|
+
static b: {
|
|
171
|
+
BaseSyncableRoles: bigint;
|
|
172
|
+
FullSyncableRoles: bigint;
|
|
173
|
+
LiveRole: bigint;
|
|
174
|
+
StatCounters: bigint;
|
|
175
|
+
VoteSkipping: bigint;
|
|
176
|
+
KickAuditLogs: bigint;
|
|
177
|
+
LeaderboardCommand: bigint;
|
|
178
|
+
RefreshingLeaderboard: bigint;
|
|
179
|
+
LeaderBoardSyncRoles: bigint;
|
|
180
|
+
BetaAccess: bigint;
|
|
181
|
+
PriorityNotifications: bigint;
|
|
182
|
+
KickClips: bigint;
|
|
183
|
+
KickNotifications: bigint;
|
|
184
|
+
TwitchNotifications: bigint;
|
|
185
|
+
ImportEmojis: bigint;
|
|
186
|
+
ImportEmojisWithSub: bigint;
|
|
187
|
+
CustomWebhooks: bigint;
|
|
188
|
+
AnyMessageEditor: bigint;
|
|
189
|
+
SyncSocialUsernames: bigint;
|
|
190
|
+
AutoDeleteNotifications: bigint;
|
|
191
|
+
TestNotificationCommand: bigint;
|
|
192
|
+
CustomCooldowns: bigint;
|
|
193
|
+
WelcomeAndLeaveNotifications: bigint;
|
|
194
|
+
NotificationPingRoleId: bigint;
|
|
195
|
+
SwitchStreamerAndGuildEmbeds: bigint;
|
|
196
|
+
BirthdayNotifications: bigint;
|
|
197
|
+
AllowNotSendingOfflineNotifications: bigint;
|
|
198
|
+
AutoStatusLiveRoles: bigint;
|
|
199
|
+
RumbleNotifications: bigint;
|
|
200
|
+
AllowAutoPublishNotifications: bigint;
|
|
201
|
+
NotificationOverrides: bigint;
|
|
202
|
+
UseCustomButtons: bigint;
|
|
203
|
+
AllowVodFeatures: bigint;
|
|
204
|
+
TikTokNotifications: bigint;
|
|
205
|
+
StatusRoles: bigint;
|
|
206
|
+
ManageBranding: bigint;
|
|
207
|
+
StickyMessages: bigint;
|
|
208
|
+
Starboards: bigint;
|
|
209
|
+
CustomStarboards: bigint;
|
|
210
|
+
AutoThreadOnStarboard: bigint;
|
|
211
|
+
StarboardRewardRole: bigint;
|
|
212
|
+
Giveaways: bigint;
|
|
213
|
+
GiveawayLogs: bigint;
|
|
214
|
+
ModifyGiveawayWhileRunning: bigint;
|
|
215
|
+
ScheduleGiveaways: bigint;
|
|
216
|
+
GiveawayRequirements: bigint;
|
|
217
|
+
GiveawayBonusEntries: bigint;
|
|
218
|
+
GiveawayEntryLimit: bigint;
|
|
219
|
+
DisableDoubleVoteEntry: bigint;
|
|
220
|
+
YouTubeNotifications: bigint;
|
|
221
|
+
};
|
|
222
|
+
static t: Record<"StickyMessages" | "StatusRoles" | "Starboards" | "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" | "ManageBranding" | "CustomStarboards" | "AutoThreadOnStarboard" | "StarboardRewardRole" | "Giveaways" | "GiveawayLogs" | "ModifyGiveawayWhileRunning" | "ScheduleGiveaways" | "GiveawayRequirements" | "GiveawayBonusEntries" | "GiveawayEntryLimit" | "DisableDoubleVoteEntry" | "YouTubeNotifications", string>;
|
|
223
|
+
static all: bigint;
|
|
224
|
+
convertBitToField<T extends EnumValues<typeof GuildFeatures>>(bit: T): string | null;
|
|
225
|
+
}
|
|
226
|
+
export declare class UserFeaturesManager extends BitFieldManager<typeof UserFeatures, typeof UserFeaturesText> {
|
|
227
|
+
constructor(initialValue: EnumValues<typeof UserFeatures> | string);
|
|
228
|
+
b: {
|
|
229
|
+
HasOneServerPremium: bigint;
|
|
230
|
+
GlobalVoteSkip: bigint;
|
|
231
|
+
MediaShare: bigint;
|
|
232
|
+
LinkedRoles: bigint;
|
|
233
|
+
};
|
|
234
|
+
t: Record<"LinkedRoles" | "HasOneServerPremium" | "GlobalVoteSkip" | "MediaShare", string>;
|
|
235
|
+
all: bigint;
|
|
236
|
+
static b: {
|
|
237
|
+
HasOneServerPremium: bigint;
|
|
238
|
+
GlobalVoteSkip: bigint;
|
|
239
|
+
MediaShare: bigint;
|
|
240
|
+
LinkedRoles: bigint;
|
|
241
|
+
};
|
|
242
|
+
static t: Record<"LinkedRoles" | "HasOneServerPremium" | "GlobalVoteSkip" | "MediaShare", string>;
|
|
243
|
+
static all: bigint;
|
|
244
|
+
convertBitToField<T extends EnumValues<typeof UserFeatures>>(bit: T): string | null;
|
|
245
|
+
}
|
|
246
|
+
export declare class UserFlagsManager extends BitFieldManager<typeof UserFlags, typeof UserFlagsText> {
|
|
247
|
+
constructor(initialValue: EnumValues<typeof UserFlags> | string);
|
|
248
|
+
b: {
|
|
249
|
+
Partner: bigint;
|
|
250
|
+
Premium: bigint;
|
|
251
|
+
Staff: bigint;
|
|
252
|
+
Developer: bigint;
|
|
253
|
+
Beta: bigint;
|
|
254
|
+
Owner: bigint;
|
|
255
|
+
};
|
|
256
|
+
t: Record<"Partner" | "Premium" | "Staff" | "Developer" | "Beta" | "Owner", string>;
|
|
257
|
+
all: bigint;
|
|
258
|
+
static b: {
|
|
259
|
+
Partner: bigint;
|
|
260
|
+
Premium: bigint;
|
|
261
|
+
Staff: bigint;
|
|
262
|
+
Developer: bigint;
|
|
263
|
+
Beta: bigint;
|
|
264
|
+
Owner: bigint;
|
|
265
|
+
};
|
|
266
|
+
static t: Record<"Partner" | "Premium" | "Staff" | "Developer" | "Beta" | "Owner", string>;
|
|
267
|
+
static all: bigint;
|
|
268
|
+
convertBitToField<T extends EnumValues<typeof UserFlags>>(bit: T): string | null;
|
|
269
|
+
}
|
|
270
|
+
export declare class TeamPermissionsManager extends BitFieldManager<typeof TeamPermissions, typeof TeamPermissionsText> {
|
|
271
|
+
constructor(initialValue: EnumValues<typeof TeamPermissions> | string);
|
|
272
|
+
b: {
|
|
273
|
+
ManageMediaShare: bigint;
|
|
274
|
+
};
|
|
275
|
+
t: Record<"ManageMediaShare", string>;
|
|
276
|
+
all: bigint;
|
|
277
|
+
static b: {
|
|
278
|
+
ManageMediaShare: bigint;
|
|
279
|
+
};
|
|
280
|
+
static t: Record<"ManageMediaShare", string>;
|
|
281
|
+
static all: bigint;
|
|
282
|
+
convertBitToField<T extends EnumValues<typeof TeamPermissions>>(bit: T): string | null;
|
|
283
|
+
}
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TeamPermissionsManager = exports.UserFlagsManager = exports.UserFeaturesManager = exports.GuildFeaturesManager = exports.TeamPermissionsText = exports.TeamPermissions = exports.UserFlagsText = exports.UserFlags = exports.UserFeaturesText = exports.UserFeatures = exports.GuildFeaturesText = exports.GuildFeatures = exports.ImplementedBitFieldManager = exports.BitFieldManager = void 0;
|
|
4
|
+
class BitFieldManager {
|
|
5
|
+
enumObject;
|
|
6
|
+
enumTexts;
|
|
7
|
+
onChange;
|
|
8
|
+
bitfield;
|
|
9
|
+
old;
|
|
10
|
+
constructor(enumObject, enumTexts, initialValue, onChange) {
|
|
11
|
+
this.enumObject = enumObject;
|
|
12
|
+
this.enumTexts = enumTexts;
|
|
13
|
+
this.onChange = onChange;
|
|
14
|
+
this.bitfield = BigInt(initialValue ?? 0);
|
|
15
|
+
this.old = 0n;
|
|
16
|
+
}
|
|
17
|
+
set(bit) {
|
|
18
|
+
this.old = this.bitfield;
|
|
19
|
+
this.bitfield = bit;
|
|
20
|
+
this.run();
|
|
21
|
+
return this;
|
|
22
|
+
}
|
|
23
|
+
add(bit) {
|
|
24
|
+
this.old = this.bitfield;
|
|
25
|
+
this.bitfield |= bit;
|
|
26
|
+
this.run();
|
|
27
|
+
return this;
|
|
28
|
+
}
|
|
29
|
+
addMultiple(bits) {
|
|
30
|
+
for (const bit of bits)
|
|
31
|
+
this.add(bit);
|
|
32
|
+
return this;
|
|
33
|
+
}
|
|
34
|
+
addNew(bits) {
|
|
35
|
+
for (const bit of bits)
|
|
36
|
+
if (!this.has(bit))
|
|
37
|
+
this.add(bit);
|
|
38
|
+
return this;
|
|
39
|
+
}
|
|
40
|
+
remove(bit) {
|
|
41
|
+
this.old = this.bitfield;
|
|
42
|
+
this.bitfield &= ~BigInt(bit);
|
|
43
|
+
this.run();
|
|
44
|
+
return this;
|
|
45
|
+
}
|
|
46
|
+
removeMultiple(bits) {
|
|
47
|
+
for (const bit of bits)
|
|
48
|
+
this.remove(bit);
|
|
49
|
+
return this;
|
|
50
|
+
}
|
|
51
|
+
has(bit) {
|
|
52
|
+
return (this.bitfield & bit) === bit;
|
|
53
|
+
}
|
|
54
|
+
hasSome(bits) {
|
|
55
|
+
for (const bit of bits)
|
|
56
|
+
if (this.has(bit))
|
|
57
|
+
return true;
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
hasAll(bits) {
|
|
61
|
+
for (const bit of bits)
|
|
62
|
+
if (!this.has(bit))
|
|
63
|
+
return false;
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
reset() {
|
|
67
|
+
this.old = this.bitfield;
|
|
68
|
+
this.bitfield = 0n;
|
|
69
|
+
this.run();
|
|
70
|
+
return this;
|
|
71
|
+
}
|
|
72
|
+
toggle(bit) {
|
|
73
|
+
this.old = this.bitfield;
|
|
74
|
+
this.bitfield ^= bit;
|
|
75
|
+
this.run();
|
|
76
|
+
return this;
|
|
77
|
+
}
|
|
78
|
+
toggleMultiple(bits) {
|
|
79
|
+
for (const bit of bits)
|
|
80
|
+
this.toggle(bit);
|
|
81
|
+
return this;
|
|
82
|
+
}
|
|
83
|
+
toArray() {
|
|
84
|
+
return Object.keys(this.enumObject).filter((bit) => this.has(this.enumObject[bit]));
|
|
85
|
+
}
|
|
86
|
+
toNiceArray() {
|
|
87
|
+
return Object.keys(this.enumObject).filter((bit) => this.has(this.enumObject[bit])).map((bit) => this.enumTexts[bit]);
|
|
88
|
+
}
|
|
89
|
+
toBits() {
|
|
90
|
+
return Object.keys(this.enumObject).filter((bit) => this.has(this.enumObject[bit])).map((bit) => this.enumObject[bit]);
|
|
91
|
+
}
|
|
92
|
+
toAll() {
|
|
93
|
+
return Object.keys(this.enumObject).map((bit) => ({ bit: this.enumObject[bit], text: this.enumTexts[bit], key: bit }));
|
|
94
|
+
}
|
|
95
|
+
toString() {
|
|
96
|
+
return this.bitfield.toString();
|
|
97
|
+
}
|
|
98
|
+
run() {
|
|
99
|
+
if (this.onChange && this.old !== this.bitfield)
|
|
100
|
+
this.onChange(this.old, this.bitfield);
|
|
101
|
+
}
|
|
102
|
+
static fromArray(enumObject, enumTexts, array, initialValue) {
|
|
103
|
+
const bitfield = new ImplementedBitFieldManager(enumObject, enumTexts, initialValue);
|
|
104
|
+
for (const bit of array) {
|
|
105
|
+
bitfield.add(enumObject[bit]);
|
|
106
|
+
}
|
|
107
|
+
return bitfield;
|
|
108
|
+
}
|
|
109
|
+
static deserialize(bitfield) {
|
|
110
|
+
return BigInt(bitfield);
|
|
111
|
+
}
|
|
112
|
+
static serialize(bitfield) {
|
|
113
|
+
return bitfield.toString();
|
|
114
|
+
}
|
|
115
|
+
static fromBits(enumObject) {
|
|
116
|
+
return Object.values(enumObject).reduce((acc, p) => acc | p, 0n);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
exports.BitFieldManager = BitFieldManager;
|
|
120
|
+
class ImplementedBitFieldManager extends BitFieldManager {
|
|
121
|
+
convertBitToField() {
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
exports.ImplementedBitFieldManager = ImplementedBitFieldManager;
|
|
126
|
+
exports.GuildFeatures = {
|
|
127
|
+
BaseSyncableRoles: 1n << 0n, // Sub, Mod, Vip, Og.
|
|
128
|
+
FullSyncableRoles: 1n << 1n, // Founder, Verified, Sub Gifter.
|
|
129
|
+
LiveRole: 1n << 2n,
|
|
130
|
+
StatCounters: 1n << 3n,
|
|
131
|
+
VoteSkipping: 1n << 4n,
|
|
132
|
+
KickAuditLogs: 1n << 5n,
|
|
133
|
+
LeaderboardCommand: 1n << 6n,
|
|
134
|
+
RefreshingLeaderboard: 1n << 7n,
|
|
135
|
+
LeaderBoardSyncRoles: 1n << 8n,
|
|
136
|
+
BetaAccess: 1n << 9n,
|
|
137
|
+
PriorityNotifications: 1n << 10n, // Totally.
|
|
138
|
+
KickClips: 1n << 11n,
|
|
139
|
+
KickNotifications: 1n << 12n,
|
|
140
|
+
TwitchNotifications: 1n << 13n,
|
|
141
|
+
ImportEmojis: 1n << 14n,
|
|
142
|
+
ImportEmojisWithSub: 1n << 15n,
|
|
143
|
+
CustomWebhooks: 1n << 16n,
|
|
144
|
+
AnyMessageEditor: 1n << 17n, // Includes welcome, leave, birthday, all socials, videos, but not sticky messages.
|
|
145
|
+
SyncSocialUsernames: 1n << 18n,
|
|
146
|
+
AutoDeleteNotifications: 1n << 19n,
|
|
147
|
+
TestNotificationCommand: 1n << 20n,
|
|
148
|
+
CustomCooldowns: 1n << 21n,
|
|
149
|
+
WelcomeAndLeaveNotifications: 1n << 22n,
|
|
150
|
+
NotificationPingRoleId: 1n << 23n,
|
|
151
|
+
SwitchStreamerAndGuildEmbeds: 1n << 24n,
|
|
152
|
+
BirthdayNotifications: 1n << 25n,
|
|
153
|
+
AllowNotSendingOfflineNotifications: 1n << 26n,
|
|
154
|
+
AutoStatusLiveRoles: 1n << 27n,
|
|
155
|
+
RumbleNotifications: 1n << 28n,
|
|
156
|
+
AllowAutoPublishNotifications: 1n << 29n,
|
|
157
|
+
NotificationOverrides: 1n << 30n,
|
|
158
|
+
UseCustomButtons: 1n << 31n,
|
|
159
|
+
AllowVodFeatures: 1n << 32n,
|
|
160
|
+
TikTokNotifications: 1n << 33n,
|
|
161
|
+
StatusRoles: 1n << 34n,
|
|
162
|
+
ManageBranding: 1n << 35n,
|
|
163
|
+
StickyMessages: 1n << 36n,
|
|
164
|
+
Starboards: 1n << 37n,
|
|
165
|
+
CustomStarboards: 1n << 38n,
|
|
166
|
+
AutoThreadOnStarboard: 1n << 40n,
|
|
167
|
+
StarboardRewardRole: 1n << 41n,
|
|
168
|
+
Giveaways: 1n << 42n,
|
|
169
|
+
GiveawayLogs: 1n << 43n,
|
|
170
|
+
ModifyGiveawayWhileRunning: 1n << 44n,
|
|
171
|
+
ScheduleGiveaways: 1n << 45n,
|
|
172
|
+
GiveawayRequirements: 1n << 46n,
|
|
173
|
+
GiveawayBonusEntries: 1n << 47n,
|
|
174
|
+
GiveawayEntryLimit: 1n << 48n,
|
|
175
|
+
DisableDoubleVoteEntry: 1n << 49n,
|
|
176
|
+
YouTubeNotifications: 1n << 50n,
|
|
177
|
+
};
|
|
178
|
+
exports.GuildFeaturesText = {
|
|
179
|
+
BaseSyncableRoles: 'Basic Syncable Roles',
|
|
180
|
+
FullSyncableRoles: 'All Syncable Roles',
|
|
181
|
+
LiveRole: 'Streamer Live Role',
|
|
182
|
+
StatCounters: 'Stat Counters',
|
|
183
|
+
VoteSkipping: 'Vote Skipping',
|
|
184
|
+
KickAuditLogs: 'Kick Audit Logs',
|
|
185
|
+
LeaderboardCommand: 'Leaderboard Command',
|
|
186
|
+
RefreshingLeaderboard: 'Refreshing Leaderboard',
|
|
187
|
+
LeaderBoardSyncRoles: 'Leaderboard Sync Roles',
|
|
188
|
+
BetaAccess: 'Beta Access',
|
|
189
|
+
PriorityNotifications: 'Priority Notifications',
|
|
190
|
+
KickClips: 'Kick Clips',
|
|
191
|
+
KickNotifications: 'Kick Notifications',
|
|
192
|
+
TwitchNotifications: 'Twitch Notifications',
|
|
193
|
+
ImportEmojis: 'Import Emojis',
|
|
194
|
+
ImportEmojisWithSub: 'Import Emojis With Sub Lock',
|
|
195
|
+
CustomWebhooks: 'Custom Webhooks',
|
|
196
|
+
AnyMessageEditor: 'Global Message Editor',
|
|
197
|
+
SyncSocialUsernames: 'Sync Social Usernames',
|
|
198
|
+
AutoDeleteNotifications: 'Auto Delete Notifications',
|
|
199
|
+
TestNotificationCommand: 'Test Notification Command',
|
|
200
|
+
CustomCooldowns: 'Custom Cooldowns',
|
|
201
|
+
WelcomeAndLeaveNotifications: 'Welcome And Leave Notifications',
|
|
202
|
+
NotificationPingRoleId: 'Notification Ping Role',
|
|
203
|
+
SwitchStreamerAndGuildEmbeds: 'Per Streamer Custom Message Editor',
|
|
204
|
+
BirthdayNotifications: 'Birthday Notifications',
|
|
205
|
+
AllowNotSendingOfflineNotifications: 'Disable Offline Notifications',
|
|
206
|
+
AutoStatusLiveRoles: 'Auto Status Live Roles',
|
|
207
|
+
RumbleNotifications: 'Rumble Notifications',
|
|
208
|
+
AllowAutoPublishNotifications: 'Allow Auto Publish Notifications',
|
|
209
|
+
NotificationOverrides: 'Notification Overrides',
|
|
210
|
+
UseCustomButtons: 'Use Custom Buttons',
|
|
211
|
+
AllowVodFeatures: 'Allow VOD Notifications',
|
|
212
|
+
TikTokNotifications: 'TikTok Notifications',
|
|
213
|
+
StatusRoles: 'Status Roles',
|
|
214
|
+
ManageBranding: 'Manage Branding',
|
|
215
|
+
StickyMessages: 'Sticky Messages',
|
|
216
|
+
Starboards: 'Starboards',
|
|
217
|
+
CustomStarboards: 'Custom Starboards',
|
|
218
|
+
AutoThreadOnStarboard: 'Auto Thread On Starboard',
|
|
219
|
+
StarboardRewardRole: 'Starboard Reward Role',
|
|
220
|
+
Giveaways: 'Giveaways',
|
|
221
|
+
GiveawayLogs: 'Giveaway Logs',
|
|
222
|
+
ModifyGiveawayWhileRunning: 'Modify Giveaway While Running',
|
|
223
|
+
ScheduleGiveaways: 'Schedule Giveaways',
|
|
224
|
+
GiveawayRequirements: 'Giveaway Requirements',
|
|
225
|
+
GiveawayBonusEntries: 'Giveaway Bonus Entries',
|
|
226
|
+
GiveawayEntryLimit: 'Giveaway Entry Limit',
|
|
227
|
+
DisableDoubleVoteEntry: 'Disable Double Vote Entry',
|
|
228
|
+
YouTubeNotifications: 'YouTube Notifications',
|
|
229
|
+
};
|
|
230
|
+
exports.UserFeatures = {
|
|
231
|
+
HasOneServerPremium: 1n << 0n,
|
|
232
|
+
GlobalVoteSkip: 1n << 1n,
|
|
233
|
+
MediaShare: 1n << 2n,
|
|
234
|
+
LinkedRoles: 1n << 3n,
|
|
235
|
+
};
|
|
236
|
+
exports.UserFeaturesText = {
|
|
237
|
+
HasOneServerPremium: '1x Server Premium',
|
|
238
|
+
GlobalVoteSkip: 'Global Vote Skip',
|
|
239
|
+
MediaShare: 'Media Share',
|
|
240
|
+
LinkedRoles: 'Linked Roles',
|
|
241
|
+
};
|
|
242
|
+
exports.UserFlags = {
|
|
243
|
+
Partner: 1n << 0n,
|
|
244
|
+
Premium: 1n << 1n,
|
|
245
|
+
Staff: 1n << 2n,
|
|
246
|
+
Developer: 1n << 3n,
|
|
247
|
+
Beta: 1n << 4n,
|
|
248
|
+
Owner: 1n << 5n,
|
|
249
|
+
};
|
|
250
|
+
exports.UserFlagsText = {
|
|
251
|
+
Partner: 'Partner',
|
|
252
|
+
Premium: 'Premium',
|
|
253
|
+
Staff: 'Staff',
|
|
254
|
+
Developer: 'Developer',
|
|
255
|
+
Beta: 'Beta',
|
|
256
|
+
Owner: 'Owner',
|
|
257
|
+
};
|
|
258
|
+
exports.TeamPermissions = {
|
|
259
|
+
ManageMediaShare: 1n << 0n,
|
|
260
|
+
};
|
|
261
|
+
exports.TeamPermissionsText = {
|
|
262
|
+
ManageMediaShare: 'Manage Media Share',
|
|
263
|
+
};
|
|
264
|
+
class GuildFeaturesManager extends BitFieldManager {
|
|
265
|
+
constructor(initialValue) {
|
|
266
|
+
super(exports.GuildFeatures, exports.GuildFeaturesText, typeof initialValue === 'string' ? GuildFeaturesManager.deserialize(initialValue) : initialValue);
|
|
267
|
+
}
|
|
268
|
+
b = exports.GuildFeatures;
|
|
269
|
+
t = exports.GuildFeaturesText;
|
|
270
|
+
all = GuildFeaturesManager.fromBits(exports.GuildFeatures);
|
|
271
|
+
static b = exports.GuildFeatures;
|
|
272
|
+
static t = exports.GuildFeaturesText;
|
|
273
|
+
static all = GuildFeaturesManager.fromBits(exports.GuildFeatures);
|
|
274
|
+
convertBitToField(bit) {
|
|
275
|
+
return Object.keys(this.b).find((key) => this.b[key] === bit) ?? null;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
exports.GuildFeaturesManager = GuildFeaturesManager;
|
|
279
|
+
class UserFeaturesManager extends BitFieldManager {
|
|
280
|
+
constructor(initialValue) {
|
|
281
|
+
super(exports.UserFeatures, exports.UserFeaturesText, typeof initialValue === 'string' ? UserFeaturesManager.deserialize(initialValue) : initialValue);
|
|
282
|
+
}
|
|
283
|
+
b = exports.UserFeatures;
|
|
284
|
+
t = exports.UserFeaturesText;
|
|
285
|
+
all = UserFeaturesManager.fromBits(exports.UserFeatures);
|
|
286
|
+
static b = exports.UserFeatures;
|
|
287
|
+
static t = exports.UserFeaturesText;
|
|
288
|
+
static all = UserFeaturesManager.fromBits(exports.UserFeatures);
|
|
289
|
+
convertBitToField(bit) {
|
|
290
|
+
return Object.keys(this.b).find((key) => this.b[key] === bit) ?? null;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
exports.UserFeaturesManager = UserFeaturesManager;
|
|
294
|
+
class UserFlagsManager extends BitFieldManager {
|
|
295
|
+
constructor(initialValue) {
|
|
296
|
+
super(exports.UserFlags, exports.UserFlagsText, typeof initialValue === 'string' ? UserFlagsManager.deserialize(initialValue) : initialValue);
|
|
297
|
+
}
|
|
298
|
+
b = exports.UserFlags;
|
|
299
|
+
t = exports.UserFlagsText;
|
|
300
|
+
all = UserFlagsManager.fromBits(exports.UserFlags);
|
|
301
|
+
static b = exports.UserFlags;
|
|
302
|
+
static t = exports.UserFlagsText;
|
|
303
|
+
static all = UserFlagsManager.fromBits(exports.UserFlags);
|
|
304
|
+
convertBitToField(bit) {
|
|
305
|
+
return Object.keys(this.b).find((key) => this.b[key] === bit) ?? null;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
exports.UserFlagsManager = UserFlagsManager;
|
|
309
|
+
class TeamPermissionsManager extends BitFieldManager {
|
|
310
|
+
constructor(initialValue) {
|
|
311
|
+
super(exports.TeamPermissions, exports.TeamPermissionsText, typeof initialValue === 'string' ? TeamPermissionsManager.deserialize(initialValue) : initialValue);
|
|
312
|
+
}
|
|
313
|
+
b = exports.TeamPermissions;
|
|
314
|
+
t = exports.TeamPermissionsText;
|
|
315
|
+
all = TeamPermissionsManager.fromBits(exports.TeamPermissions);
|
|
316
|
+
static b = exports.TeamPermissions;
|
|
317
|
+
static t = exports.TeamPermissionsText;
|
|
318
|
+
static all = TeamPermissionsManager.fromBits(exports.TeamPermissions);
|
|
319
|
+
convertBitToField(bit) {
|
|
320
|
+
return Object.keys(this.b).find((key) => this.b[key] === bit) ?? null;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
exports.TeamPermissionsManager = TeamPermissionsManager;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Browser-safe enum re-exports from Prisma
|
|
3
|
+
// This file only contains type exports and const values, no Prisma Client imports
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.$Enums = exports.PlatformEnum = exports.StreamerMessageTypeEnum = exports.GuildMessageTypeEnum = void 0;
|
|
6
|
+
var client_1 = require("@prisma/client");
|
|
7
|
+
Object.defineProperty(exports, "GuildMessageTypeEnum", { enumerable: true, get: function () { return client_1.GuildMessageTypeEnum; } });
|
|
8
|
+
Object.defineProperty(exports, "StreamerMessageTypeEnum", { enumerable: true, get: function () { return client_1.StreamerMessageTypeEnum; } });
|
|
9
|
+
Object.defineProperty(exports, "PlatformEnum", { enumerable: true, get: function () { return client_1.PlatformEnum; } });
|
|
10
|
+
Object.defineProperty(exports, "$Enums", { enumerable: true, get: function () { return client_1.$Enums; } });
|