@notidotbot/noti-api-client 1.9.74 → 1.9.76
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/@me.d.ts +45 -0
- package/dist/classes/@me.js +25 -0
- package/dist/classes/guildInGame.d.ts +259 -0
- package/dist/classes/guildInGame.js +114 -0
- package/dist/classes/guildInfluencerPanel.d.ts +13 -0
- package/dist/classes/guildMessageScheduler.d.ts +15 -1
- package/dist/classes/publicGiveaways.d.ts +3 -1
- package/dist/classes/publicGiveaways.js +1 -1
- package/dist/core/manager.d.ts +2 -0
- package/dist/core/manager.js +2 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +12 -1
- package/dist/other/bitfields.d.ts +7 -4
- package/dist/other/bitfields.js +3 -0
- package/dist/other/features.d.ts +1 -1
- package/dist/other/features.js +1 -0
- package/dist/other/inGameAlerts.d.ts +83 -0
- package/dist/other/inGameAlerts.js +65 -0
- package/dist/other/inGameMiniMessage.d.ts +14 -0
- package/dist/other/inGameMiniMessage.js +135 -0
- package/dist/other/types.d.ts +2 -0
- package/dist/other/zod/clubStreamer.zod.d.ts +5 -0
- package/dist/other/zod/clubStreamer.zod.js +7 -0
- package/dist/other/zod/giveaways.zod.d.ts +17 -0
- package/dist/other/zod/giveaways.zod.js +8 -0
- package/dist/other/zod/kickStreamer.zod.d.ts +6 -0
- package/dist/other/zod/kickStreamer.zod.js +7 -0
- package/dist/other/zod/rumbleStreamer.zod.d.ts +7 -0
- package/dist/other/zod/rumbleStreamer.zod.js +7 -0
- package/dist/other/zod/scheduledMessage.zod.d.ts +10 -2
- package/dist/other/zod/scheduledMessage.zod.js +29 -5
- package/dist/other/zod/schema.zod.d.ts +6 -0
- package/dist/other/zod/schema.zod.js +7 -1
- package/dist/other/zod/tiktokStreamer.zod.d.ts +7 -0
- package/dist/other/zod/tiktokStreamer.zod.js +7 -0
- package/dist/other/zod/twitchStreamer.zod.d.ts +6 -0
- package/dist/other/zod/twitchStreamer.zod.js +7 -0
- package/dist/other/zod/twitterStreamer.zod.d.ts +7 -0
- package/dist/other/zod/twitterStreamer.zod.js +7 -0
- package/dist/other/zod/youtubeStreamer.zod.d.ts +7 -0
- package/dist/other/zod/youtubeStreamer.zod.js +7 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/prisma/generated/ts-prisma.d.ts +129 -0
- package/prisma/schema/models/clubStreamer.prisma +5 -0
- package/prisma/schema/models/giveaways.prisma +9 -0
- package/prisma/schema/models/inGame.prisma +77 -0
- package/prisma/schema/models/kickStreamer.prisma +5 -0
- package/prisma/schema/models/rumbleStreamer.prisma +5 -0
- package/prisma/schema/models/scheduledMessage.prisma +10 -1
- package/prisma/schema/models/tiktokStreamer.prisma +5 -0
- package/prisma/schema/models/twitchStreamer.prisma +5 -0
- package/prisma/schema/models/twitterStreamer.prisma +5 -0
- package/prisma/schema/models/youtubeStreamer.prisma +5 -0
- package/prisma/schema/schema.prisma +16 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// In-Game: a game server (Minecraft first) connected to a Discord server. phases/in-game/.
|
|
2
|
+
|
|
3
|
+
enum InGameGameEnum {
|
|
4
|
+
minecraft
|
|
5
|
+
roblox
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
model GuildInGameServer {
|
|
9
|
+
dbId String @id @default(uuid())
|
|
10
|
+
// Discord guild id. NO relation to Guild on purpose: a bare `db(guild)` auto-includes every relation, and this
|
|
11
|
+
// must never ride along with a guild read.
|
|
12
|
+
guildId String
|
|
13
|
+
game InGameGameEnum @default(minecraft)
|
|
14
|
+
// The server's MOTD at connect time, colour codes stripped. Renamable on the dashboard.
|
|
15
|
+
name String @db.VarChar(64)
|
|
16
|
+
// sha256 of the token; the token itself is never stored. Shown once at redeem / rotate.
|
|
17
|
+
tokenHash String @unique
|
|
18
|
+
// The first characters of the token, so the dashboard can say which one a server holds.
|
|
19
|
+
tokenPrefix String @db.VarChar(16)
|
|
20
|
+
// The dashboard user who redeemed the code. The socket has no user, so the `inGame` launch flag resolves
|
|
21
|
+
// against this one (TRACKER G17).
|
|
22
|
+
createdBy String
|
|
23
|
+
// The owner's pick of which servers stay active when the guild is over its plan limit (G10). "Paused" is
|
|
24
|
+
// DERIVED at read time - pinned first, then oldest - never stored, so no plan-change path can leave it stale.
|
|
25
|
+
pinned Boolean @default(false)
|
|
26
|
+
// Written by the socket server (P2) on disconnect and at most every 5 minutes while connected.
|
|
27
|
+
lastSeenAt DateTime?
|
|
28
|
+
// The reward presets this server's rewards.yml offers, as reported on identify (P7). The dashboard's dropdown.
|
|
29
|
+
rewardPresets String[]
|
|
30
|
+
createdAt DateTime @default(now())
|
|
31
|
+
|
|
32
|
+
@@index([guildId])
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// A player's Minecraft account linked to their Discord account, FOR ONE DISCORD SERVER (phases/in-game/ P6, TRACKER
|
|
36
|
+
// G8). Made through that server's connected game server, counted only there: a dishonest server owner can only ever
|
|
37
|
+
// affect their own server. Standalone, no relation to User: a bare `db(user)` would auto-include it.
|
|
38
|
+
// Deleted with the guild (index.ts guild cleanup) and on a user data deletion request (userDataDeletion.ts).
|
|
39
|
+
model GuildMinecraftLink {
|
|
40
|
+
dbId String @id @default(uuid())
|
|
41
|
+
guildId String
|
|
42
|
+
// Discord user id.
|
|
43
|
+
userId String
|
|
44
|
+
// Minecraft UUID: Java (version 4), or Floodgate's 00000000-0000-0000-... for Bedrock.
|
|
45
|
+
uuid String
|
|
46
|
+
// Last seen name, refreshed on join (throttled). Floodgate names without their prefix.
|
|
47
|
+
name String @db.VarChar(32)
|
|
48
|
+
bedrock Boolean @default(false)
|
|
49
|
+
// The GuildInGameServer whose player made the link.
|
|
50
|
+
serverId String
|
|
51
|
+
linkedAt DateTime @default(now())
|
|
52
|
+
|
|
53
|
+
@@unique([guildId, uuid])
|
|
54
|
+
@@unique([guildId, userId])
|
|
55
|
+
@@index([userId])
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// A giveaway prize paid in Minecraft (phases/in-game/ P7, TRACKER G9 / R4). State lives HERE, not in the replay: it is
|
|
59
|
+
// offered to the paying server on every identify until done, and claimed atomically (pending -> claimed) by the one
|
|
60
|
+
// node the winner is online on, so it is paid once or visibly not at all. `dbId` is the rewardId the plugin sees.
|
|
61
|
+
model GuildInGameReward {
|
|
62
|
+
dbId String @id @default(uuid())
|
|
63
|
+
guildId String
|
|
64
|
+
giveawayId String
|
|
65
|
+
userId String
|
|
66
|
+
uuid String
|
|
67
|
+
preset String @db.VarChar(32)
|
|
68
|
+
serverId String
|
|
69
|
+
status InGameRewardStatusEnum @default(pending)
|
|
70
|
+
error String? @db.VarChar(300)
|
|
71
|
+
createdAt DateTime @default(now())
|
|
72
|
+
doneAt DateTime?
|
|
73
|
+
|
|
74
|
+
@@unique([giveawayId, userId])
|
|
75
|
+
@@index([serverId, status])
|
|
76
|
+
@@index([guildId])
|
|
77
|
+
}
|
|
@@ -18,6 +18,11 @@ model KickStreamer {
|
|
|
18
18
|
// The creator's own channel + pingRoleId is destination 1 and is not stored here.
|
|
19
19
|
extraDestinations Json?
|
|
20
20
|
|
|
21
|
+
// Minecraft: show this creator's notifications on connected game servers. Off by default.
|
|
22
|
+
inGame Boolean @default(false)
|
|
23
|
+
inGameTypes String[]
|
|
24
|
+
inGameServerIds String[]
|
|
25
|
+
|
|
21
26
|
clipEnabled Boolean?
|
|
22
27
|
clipChannelId String?
|
|
23
28
|
clipPingRoleId String?
|
|
@@ -18,6 +18,11 @@ model RumbleStreamer {
|
|
|
18
18
|
// The creator's own channel + pingRoleId is destination 1 and is not stored here.
|
|
19
19
|
extraDestinations Json?
|
|
20
20
|
|
|
21
|
+
// Minecraft: show this creator's notifications on connected game servers. Off by default.
|
|
22
|
+
inGame Boolean @default(false)
|
|
23
|
+
inGameTypes String[]
|
|
24
|
+
inGameServerIds String[]
|
|
25
|
+
|
|
21
26
|
notificationChannelId String? // Live notification channel.
|
|
22
27
|
videoNotificationChannelId String? // Upload (video) notification channel.
|
|
23
28
|
showNotifyButton Boolean?
|
|
@@ -4,11 +4,20 @@ model GuildScheduledMessage {
|
|
|
4
4
|
messageId String @unique
|
|
5
5
|
|
|
6
6
|
guildId String
|
|
7
|
-
|
|
7
|
+
// Null for a Minecraft-only message (phases/in-game/ P5). Required while sendToDiscord is on (zod).
|
|
8
|
+
channelId String?
|
|
8
9
|
creatorId String
|
|
9
10
|
|
|
10
11
|
content String @db.VarChar(2000)
|
|
11
12
|
|
|
13
|
+
// Where it goes (P5). At least one is on (zod). A deleted channel turns sendToDiscord off when the message
|
|
14
|
+
// also goes to Minecraft, instead of deleting the whole message.
|
|
15
|
+
sendToDiscord Boolean @default(true)
|
|
16
|
+
sendToInGame Boolean @default(false)
|
|
17
|
+
// Restricted MiniMessage (colours, decorations, gradient, hover, open_url only - inGame/miniMessage.ts).
|
|
18
|
+
// Null = the Discord content converted (inGame/convert.ts).
|
|
19
|
+
minecraftContent String? @db.VarChar(2000)
|
|
20
|
+
|
|
12
21
|
trigger ScheduledMessageTriggerEnum @default(time)
|
|
13
22
|
|
|
14
23
|
recurrence ScheduledMessageRecurrenceEnum @default(once)
|
|
@@ -15,6 +15,11 @@ model TiktokStreamer {
|
|
|
15
15
|
// The creator's own channel + pingRoleId is destination 1 and is not stored here.
|
|
16
16
|
extraDestinations Json?
|
|
17
17
|
|
|
18
|
+
// Minecraft: show this creator's notifications on connected game servers. Off by default.
|
|
19
|
+
inGame Boolean @default(false)
|
|
20
|
+
inGameTypes String[]
|
|
21
|
+
inGameServerIds String[]
|
|
22
|
+
|
|
18
23
|
liveNotificationChannelId String?
|
|
19
24
|
videoNotificationChannelId String?
|
|
20
25
|
showNotifyButton Boolean?
|
|
@@ -19,6 +19,11 @@ model TwitchStreamer {
|
|
|
19
19
|
// The creator's own channel + pingRoleId is destination 1 and is not stored here.
|
|
20
20
|
extraDestinations Json?
|
|
21
21
|
|
|
22
|
+
// Minecraft: show this creator's notifications on connected game servers. Off by default.
|
|
23
|
+
inGame Boolean @default(false)
|
|
24
|
+
inGameTypes String[]
|
|
25
|
+
inGameServerIds String[]
|
|
26
|
+
|
|
22
27
|
notificationChannelId String?
|
|
23
28
|
showNotifyButton Boolean?
|
|
24
29
|
|
|
@@ -31,6 +31,11 @@ model TwitterStreamer {
|
|
|
31
31
|
// The creator's own channel + pingRoleId is destination 1 and is not stored here.
|
|
32
32
|
extraDestinations Json?
|
|
33
33
|
|
|
34
|
+
// Minecraft: show this creator's notifications on connected game servers. Off by default.
|
|
35
|
+
inGame Boolean @default(false)
|
|
36
|
+
inGameTypes String[]
|
|
37
|
+
inGameServerIds String[]
|
|
38
|
+
|
|
34
39
|
// POSTS. Free tier. Its own channel AND its own ping role, so a server can route new posts
|
|
35
40
|
// somewhere quieter than go-lives and ping a different group for each.
|
|
36
41
|
//
|
|
@@ -17,6 +17,11 @@ model YoutubeStreamer {
|
|
|
17
17
|
// The creator's own channel + pingRoleId is destination 1 and is not stored here.
|
|
18
18
|
extraDestinations Json?
|
|
19
19
|
|
|
20
|
+
// Minecraft: show this creator's notifications on connected game servers. Off by default.
|
|
21
|
+
inGame Boolean @default(false)
|
|
22
|
+
inGameTypes String[]
|
|
23
|
+
inGameServerIds String[]
|
|
24
|
+
|
|
20
25
|
liveNotificationChannelId String?
|
|
21
26
|
videoNotificationChannelId String?
|
|
22
27
|
showNotifyButton Boolean?
|
|
@@ -191,6 +191,22 @@ enum GiveawayWinnerStatusEnum {
|
|
|
191
191
|
expired
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
+
// How a giveaway shows in Minecraft (phases/in-game/ P7, TRACKER G9): not at all, announced, or announced and
|
|
195
|
+
// enterable in game.
|
|
196
|
+
enum GiveawayInGameModeEnum {
|
|
197
|
+
off
|
|
198
|
+
announce
|
|
199
|
+
enter
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// A Minecraft reward's life (P7): created at the draw, claimed by the node the winner is on, then done or failed.
|
|
203
|
+
enum InGameRewardStatusEnum {
|
|
204
|
+
pending
|
|
205
|
+
claimed
|
|
206
|
+
done
|
|
207
|
+
failed
|
|
208
|
+
}
|
|
209
|
+
|
|
194
210
|
enum UserNotificationSeverityEnum {
|
|
195
211
|
info
|
|
196
212
|
warning
|