@notidotbot/noti-api-client 1.9.73 → 1.9.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/classes/@me.d.ts +45 -0
  2. package/dist/classes/@me.js +25 -0
  3. package/dist/classes/guildInGame.d.ts +259 -0
  4. package/dist/classes/guildInGame.js +114 -0
  5. package/dist/classes/guildInfluencerPanel.d.ts +13 -0
  6. package/dist/classes/guildMessageScheduler.d.ts +15 -1
  7. package/dist/classes/publicGiveaways.d.ts +1 -1
  8. package/dist/classes/publicGiveaways.js +1 -1
  9. package/dist/core/manager.d.ts +2 -0
  10. package/dist/core/manager.js +2 -0
  11. package/dist/index.d.ts +6 -0
  12. package/dist/index.js +19 -1
  13. package/dist/other/bitfields.d.ts +8 -2
  14. package/dist/other/bitfields.js +6 -0
  15. package/dist/other/features.d.ts +1 -1
  16. package/dist/other/features.js +2 -0
  17. package/dist/other/inGameAlerts.d.ts +83 -0
  18. package/dist/other/inGameAlerts.js +65 -0
  19. package/dist/other/inGameMiniMessage.d.ts +14 -0
  20. package/dist/other/inGameMiniMessage.js +135 -0
  21. package/dist/other/multiDestination.d.ts +89 -0
  22. package/dist/other/multiDestination.js +109 -0
  23. package/dist/other/types.d.ts +2 -0
  24. package/dist/other/zod/clubStreamer.zod.d.ts +12 -0
  25. package/dist/other/zod/clubStreamer.zod.js +10 -0
  26. package/dist/other/zod/giveaways.zod.d.ts +17 -0
  27. package/dist/other/zod/giveaways.zod.js +8 -0
  28. package/dist/other/zod/kickStreamer.zod.d.ts +23 -0
  29. package/dist/other/zod/kickStreamer.zod.js +11 -0
  30. package/dist/other/zod/rumbleStreamer.zod.d.ts +25 -0
  31. package/dist/other/zod/rumbleStreamer.zod.js +11 -0
  32. package/dist/other/zod/scheduledMessage.zod.d.ts +10 -2
  33. package/dist/other/zod/scheduledMessage.zod.js +29 -5
  34. package/dist/other/zod/schema.zod.d.ts +6 -0
  35. package/dist/other/zod/schema.zod.js +7 -1
  36. package/dist/other/zod/tiktokStreamer.zod.d.ts +25 -0
  37. package/dist/other/zod/tiktokStreamer.zod.js +11 -0
  38. package/dist/other/zod/twitchStreamer.zod.d.ts +23 -0
  39. package/dist/other/zod/twitchStreamer.zod.js +11 -0
  40. package/dist/other/zod/twitterStreamer.zod.d.ts +25 -0
  41. package/dist/other/zod/twitterStreamer.zod.js +11 -0
  42. package/dist/other/zod/youtubeStreamer.zod.d.ts +26 -0
  43. package/dist/other/zod/youtubeStreamer.zod.js +11 -0
  44. package/dist/other/zod/zod.d.ts +15 -0
  45. package/dist/other/zod/zod.js +12 -0
  46. package/dist/tsconfig.tsbuildinfo +1 -1
  47. package/package.json +1 -1
  48. package/prisma/generated/ts-prisma.d.ts +129 -0
  49. package/prisma/schema/models/clubStreamer.prisma +9 -0
  50. package/prisma/schema/models/giveaways.prisma +9 -0
  51. package/prisma/schema/models/inGame.prisma +77 -0
  52. package/prisma/schema/models/kickStreamer.prisma +11 -0
  53. package/prisma/schema/models/rumbleStreamer.prisma +12 -0
  54. package/prisma/schema/models/scheduledMessage.prisma +10 -1
  55. package/prisma/schema/models/tiktokStreamer.prisma +11 -0
  56. package/prisma/schema/models/twitchStreamer.prisma +12 -0
  57. package/prisma/schema/models/twitterStreamer.prisma +12 -0
  58. package/prisma/schema/models/youtubeStreamer.prisma +11 -0
  59. package/prisma/schema/schema.prisma +16 -0
@@ -13,6 +13,15 @@ model ClubStreamer {
13
13
 
14
14
  customMessages CSCustomMessage[]
15
15
 
16
+ // Premium Plus (MultiDestination). Up to 2 extra channels: [{ channelId, pingRoleId, types }]. [] = none.
17
+ // The creator's own channel + pingRoleId is destination 1 and is not stored here.
18
+ extraDestinations Json?
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
+
16
25
  notificationChannelId String?
17
26
  showNotifyButton Boolean?
18
27
 
@@ -48,6 +48,13 @@ model GuildGiveaway {
48
48
  // Public giveaways page: null follows the server's `publicGiveaways`, true/false overrides it.
49
49
  publicListing Boolean?
50
50
 
51
+ // Minecraft (phases/in-game/ P7). Needs the `inGame` flag to set. A reward preset is a name from a connected
52
+ // server's rewards.yml (needs InGameRewards to set; a stored one stays after a lapse and is paused, not paid).
53
+ // inGameRewardServerId: which connected server pays; null = the guild's only one.
54
+ inGameMode GiveawayInGameModeEnum @default(off)
55
+ inGameRewardPreset String? @db.VarChar(32)
56
+ inGameRewardServerId String?
57
+
51
58
  // The public page scans running giveaways across every server.
52
59
  @@index([endedAt, startedAt])
53
60
  }
@@ -119,6 +126,8 @@ model GuildGiveawayRequirements {
119
126
  messageCount Int?
120
127
  roles String[]
121
128
  minAccountAgeDays Int?
129
+ // Minecraft (P7): the entrant linked a Minecraft account in this server (GuildMinecraftLink).
130
+ minecraftLinked Boolean?
122
131
 
123
132
  guildGiveawayId String @unique
124
133
  guildGiveaway GuildGiveaway? @relation(fields: [guildGiveawayId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
@@ -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
+ }
@@ -14,6 +14,15 @@ model KickStreamer {
14
14
 
15
15
  customMessages KSCustomMessage[] // Premium
16
16
 
17
+ // Premium Plus (MultiDestination). Up to 2 extra channels: [{ channelId, pingRoleId, types }]. [] = none.
18
+ // The creator's own channel + pingRoleId is destination 1 and is not stored here.
19
+ extraDestinations Json?
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
+
17
26
  clipEnabled Boolean?
18
27
  clipChannelId String?
19
28
  clipPingRoleId String?
@@ -207,6 +216,8 @@ model KSCurrentlyLive {
207
216
  correct Boolean?
208
217
  channelId String?
209
218
  messageId String?
219
+ // Copies of the live post in extra destinations, [{ channelId, messageId }], for the offline to edit or delete.
220
+ extraPosts Json?
210
221
 
211
222
  kickStreamerId String @unique
212
223
  kickStreamer KickStreamer? @relation(fields: [kickStreamerId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
@@ -10,9 +10,19 @@ model RumbleStreamer {
10
10
  sendOfflineMessage Boolean?
11
11
  usePerStreamerEmbeds Boolean? // Premium
12
12
  autoPublishIfAnnouncmentChannel Boolean? // Premium
13
+ updateLivePost Boolean? // Premium Plus (LivePostUpdates). null = on, false = off. Edit the live post on a title/category change.
13
14
 
14
15
  customMessages RSCustomMessage[] // Premium
15
16
 
17
+ // Premium Plus (MultiDestination). Up to 2 extra channels: [{ channelId, pingRoleId, types }]. [] = none.
18
+ // The creator's own channel + pingRoleId is destination 1 and is not stored here.
19
+ extraDestinations Json?
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
+
16
26
  notificationChannelId String? // Live notification channel.
17
27
  videoNotificationChannelId String? // Upload (video) notification channel.
18
28
  showNotifyButton Boolean?
@@ -124,6 +134,8 @@ model RSCurrentlyLive {
124
134
  correct Boolean?
125
135
  channelId String?
126
136
  messageId String?
137
+ // Copies of the live post in extra destinations, [{ channelId, messageId }], for the offline to edit or delete.
138
+ extraPosts Json?
127
139
 
128
140
  rumbleStreamerId String @unique
129
141
  rumbleStreamer RumbleStreamer? @relation(fields: [rumbleStreamerId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
@@ -4,11 +4,20 @@ model GuildScheduledMessage {
4
4
  messageId String @unique
5
5
 
6
6
  guildId String
7
- channelId String
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)
@@ -11,6 +11,15 @@ model TiktokStreamer {
11
11
 
12
12
  customMessages TTSCustomMessage[] // Premium
13
13
 
14
+ // Premium Plus (MultiDestination). Up to 2 extra channels: [{ channelId, pingRoleId, types }]. [] = none.
15
+ // The creator's own channel + pingRoleId is destination 1 and is not stored here.
16
+ extraDestinations Json?
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
+
14
23
  liveNotificationChannelId String?
15
24
  videoNotificationChannelId String?
16
25
  showNotifyButton Boolean?
@@ -119,6 +128,8 @@ model TTSCurrentlyLive {
119
128
  correct Boolean?
120
129
  channelId String?
121
130
  messageId String?
131
+ // Copies of the live post in extra destinations, [{ channelId, messageId }], for the offline to edit or delete.
132
+ extraPosts Json?
122
133
 
123
134
  tiktokStreamerId String @unique
124
135
  tiktokStreamer TiktokStreamer? @relation(fields: [tiktokStreamerId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
@@ -11,9 +11,19 @@ model TwitchStreamer {
11
11
  sendOfflineMessage Boolean?
12
12
  usePerStreamerEmbeds Boolean? // Premium
13
13
  autoPublishIfAnnouncmentChannel Boolean? // Premium
14
+ updateLivePost Boolean? // Premium Plus (LivePostUpdates). null = on, false = off. Edit the live post on a title/category change.
14
15
 
15
16
  customMessages TSCustomMessage[] // Premium
16
17
 
18
+ // Premium Plus (MultiDestination). Up to 2 extra channels: [{ channelId, pingRoleId, types }]. [] = none.
19
+ // The creator's own channel + pingRoleId is destination 1 and is not stored here.
20
+ extraDestinations Json?
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
+
17
27
  notificationChannelId String?
18
28
  showNotifyButton Boolean?
19
29
 
@@ -119,6 +129,8 @@ model TSCurrentlyLive {
119
129
  correct Boolean?
120
130
  channelId String?
121
131
  messageId String?
132
+ // Copies of the live post in extra destinations, [{ channelId, messageId }], for the offline to edit or delete.
133
+ extraPosts Json?
122
134
 
123
135
  twitchStreamerId String @unique
124
136
  twitchStreamer TwitchStreamer? @relation(fields: [twitchStreamerId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
@@ -23,9 +23,19 @@ model TwitterStreamer {
23
23
 
24
24
  usePerStreamerEmbeds Boolean?
25
25
  autoPublishIfAnnouncmentChannel Boolean?
26
+ updateLivePost Boolean? // Premium Plus (LivePostUpdates). null = on, false = off. Edit the live post on a title/category change.
26
27
 
27
28
  customMessages TWSCustomMessage[]
28
29
 
30
+ // Premium Plus (MultiDestination). Up to 2 extra channels: [{ channelId, pingRoleId, types }]. [] = none.
31
+ // The creator's own channel + pingRoleId is destination 1 and is not stored here.
32
+ extraDestinations Json?
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
+
29
39
  // POSTS. Free tier. Its own channel AND its own ping role, so a server can route new posts
30
40
  // somewhere quieter than go-lives and ping a different group for each.
31
41
  //
@@ -151,6 +161,8 @@ model TWSCurrentlyLive {
151
161
  correct Boolean?
152
162
  channelId String?
153
163
  messageId String?
164
+ // Copies of the live post in extra destinations, [{ channelId, messageId }], for the offline to edit or delete.
165
+ extraPosts Json?
154
166
 
155
167
  twitterStreamerId String @unique
156
168
  twitterStreamer TwitterStreamer? @relation(fields: [twitterStreamerId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
@@ -13,6 +13,15 @@ model YoutubeStreamer {
13
13
 
14
14
  customMessages YTSCustomMessage[] // Premium
15
15
 
16
+ // Premium Plus (MultiDestination). Up to 2 extra channels: [{ channelId, pingRoleId, types }]. [] = none.
17
+ // The creator's own channel + pingRoleId is destination 1 and is not stored here.
18
+ extraDestinations Json?
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
+
16
25
  liveNotificationChannelId String?
17
26
  videoNotificationChannelId String?
18
27
  showNotifyButton Boolean?
@@ -128,6 +137,8 @@ model YTSCurrentlyLive {
128
137
  correct Boolean?
129
138
  channelId String?
130
139
  messageId String?
140
+ // Copies of the live post in extra destinations, [{ channelId, messageId }], for the offline to edit or delete.
141
+ extraPosts Json?
131
142
 
132
143
  youtubeStreamerId String @unique
133
144
  youtubeStreamer YoutubeStreamer? @relation(fields: [youtubeStreamerId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
@@ -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