@notidotbot/noti-api-client 1.6.2 → 1.6.4

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 (39) hide show
  1. package/dist/classes/guildClipForward.d.ts +709 -0
  2. package/dist/classes/guildClipForward.js +48 -0
  3. package/dist/classes/guildRolePanel.d.ts +189 -0
  4. package/dist/classes/guildRolePanel.js +48 -0
  5. package/dist/core/manager.d.ts +4 -0
  6. package/dist/core/manager.js +4 -0
  7. package/dist/index.d.ts +3 -1
  8. package/dist/index.js +2 -0
  9. package/dist/other/bitfields.d.ts +8 -2
  10. package/dist/other/bitfields.js +4 -0
  11. package/dist/other/enums.d.ts +10 -4
  12. package/dist/other/enums.js +5 -2
  13. package/dist/other/prisma.d.ts +13 -0
  14. package/dist/other/templates.d.ts +19 -0
  15. package/dist/other/templates.js +15 -0
  16. package/dist/other/zod/clipForward.zod.d.ts +200 -0
  17. package/dist/other/zod/clipForward.zod.js +46 -0
  18. package/dist/other/zod/guild.zod.d.ts +10 -3
  19. package/dist/other/zod/guild.zod.js +2 -0
  20. package/dist/other/zod/kickStreamer.zod.d.ts +4 -5
  21. package/dist/other/zod/kickStreamer.zod.js +0 -3
  22. package/dist/other/zod/rolePanels.zod.d.ts +137 -0
  23. package/dist/other/zod/rolePanels.zod.js +72 -0
  24. package/dist/other/zod/rumbleStreamer.zod.d.ts +9 -2
  25. package/dist/other/zod/rumbleStreamer.zod.js +5 -0
  26. package/dist/other/zod/schema.zod.d.ts +9 -6
  27. package/dist/other/zod/schema.zod.js +5 -2
  28. package/dist/other/zod/tiktokStreamer.zod.d.ts +4 -2
  29. package/dist/other/zod/twitchStreamer.zod.d.ts +4 -2
  30. package/dist/other/zod/youtubeStreamer.zod.d.ts +4 -2
  31. package/dist/tsconfig.tsbuildinfo +1 -1
  32. package/package.json +1 -1
  33. package/prisma/generated/ts-prisma.d.ts +5115 -1221
  34. package/prisma/schema/models/clipForward.prisma +105 -0
  35. package/prisma/schema/models/guild.prisma +2 -0
  36. package/prisma/schema/models/kickStreamer.prisma +0 -4
  37. package/prisma/schema/models/rolePanels.prisma +72 -0
  38. package/prisma/schema/models/rumbleStreamer.prisma +9 -3
  39. package/prisma/schema/schema.prisma +20 -2
@@ -0,0 +1,105 @@
1
+ // Clip Forwarding — a decoupled, platform-agnostic resource. One row = one channel whose native
2
+ // clips are forwarded to Discord. Independent of the live-notification streamer records. Gated
3
+ // per-platform (KickClipForwarding / TwitchClipForwarding) and capped per tier (defaultKickClips /
4
+ // defaultTwitchClips + addons).
5
+ model GuildClipForward {
6
+ dbId String @id @default(uuid())
7
+
8
+ clipForwardId String @unique // public id for the API/dashboard.
9
+
10
+ guildId String
11
+ platform PlatformEnum // kick | twitch (extensible).
12
+ streamerUserName String // channel slug/login whose clips are forwarded.
13
+
14
+ channelId String?
15
+ pingRoleId String?
16
+
17
+ minViews Int?
18
+ minDuration Int? // seconds.
19
+ maxPerCycle Int? // default 10.
20
+
21
+ allowMature Boolean? // default on.
22
+ includeOffline Boolean? // default off (live-stream clips only).
23
+
24
+ whitelistClippers String[]
25
+ blacklistClippers String[]
26
+
27
+ showNotifyButton Boolean?
28
+ usePerStreamerEmbeds Boolean? // Premium: custom per-forward message.
29
+
30
+ customMessages CFCustomMessage[]
31
+
32
+ lastClipAt DateTime? // Internal dedup: created_at of the most recently forwarded clip.
33
+ lastClipId String? // Internal dedup: id of the most recently forwarded clip (seeded on first check).
34
+
35
+ @@unique([guildId, platform, streamerUserName])
36
+ }
37
+
38
+ model CFCustomMessage {
39
+ dbId String @id @default(uuid())
40
+
41
+ type StreamerMessageTypeEnum
42
+ content String? @db.VarChar(2000)
43
+
44
+ embed CFMessageEmbed?
45
+ buttons CFMessageButton[]
46
+ webhook CFMessageWebhook?
47
+
48
+ clipForwardId String
49
+ clipForward GuildClipForward? @relation(fields: [clipForwardId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
50
+
51
+ @@unique([clipForwardId, type])
52
+ }
53
+
54
+ model CFMessageEmbed {
55
+ dbId String @id @default(uuid())
56
+
57
+ title String? @db.VarChar(256)
58
+ url String?
59
+ description String @db.VarChar(2048)
60
+ color String? @db.VarChar(10)
61
+ footer String? @db.VarChar(1024)
62
+ footerIcon String?
63
+ image String?
64
+ thumbnail String?
65
+ author String? @db.VarChar(256)
66
+ authorIcon String?
67
+ fields CFEmbedField[]
68
+
69
+ cfCustomMessageId String @unique
70
+ cfCustomMessage CFCustomMessage? @relation(fields: [cfCustomMessageId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
71
+ }
72
+
73
+ model CFEmbedField {
74
+ dbId String @id @default(uuid())
75
+
76
+ name String @db.VarChar(256)
77
+ value String? @db.VarChar(1024)
78
+ inline Boolean?
79
+
80
+ cfMessageEmbedId String
81
+ cfMessageEmbed CFMessageEmbed? @relation(fields: [cfMessageEmbedId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
82
+ }
83
+
84
+ model CFMessageButton {
85
+ dbId String @id @default(uuid())
86
+
87
+ title String @db.VarChar(80)
88
+ url String?
89
+
90
+ emojiUnicodeOrId String?
91
+
92
+ cfCustomMessageId String
93
+ cfCustomMessage CFCustomMessage? @relation(fields: [cfCustomMessageId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
94
+ }
95
+
96
+ model CFMessageWebhook {
97
+ dbId String @id @default(uuid())
98
+
99
+ enabled Boolean?
100
+ username String?
101
+ avatarUrl String?
102
+
103
+ cfCustomMessageId String @unique
104
+ cfCustomMessage CFCustomMessage? @relation(fields: [cfCustomMessageId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
105
+ }
@@ -89,6 +89,8 @@ model GuildPremium {
89
89
  additionalTwitchConnections Int @default(0)
90
90
  additionalYoutubeConnections Int @default(0)
91
91
  additionalTiktokConnections Int @default(0)
92
+ additionalKickClips Int @default(0)
93
+ additionalTwitchClips Int @default(0)
92
94
 
93
95
  customBot Boolean @default(false)
94
96
 
@@ -22,10 +22,6 @@ model KickStreamer {
22
22
 
23
23
  whitelistedClipperNames String[] // Filter by clipper usernames
24
24
 
25
- builtInClipsEnabled Boolean?
26
- builtInClipsChannelId String?
27
- builtInClipsPingRoleId String?
28
-
29
25
  vodsChannelId String?
30
26
  vodsPingRoleId String?
31
27
 
@@ -0,0 +1,72 @@
1
+ model GuildRolePanel {
2
+ dbId String @id @default(uuid())
3
+
4
+ panelId String @unique
5
+
6
+ guildId String
7
+ channelId String
8
+ messageId String?
9
+
10
+ name String @db.VarChar(100)
11
+
12
+ interactionType RolePanelType
13
+ assignMode RolePanelAssignMode
14
+
15
+ maxRoles Int?
16
+ logChannelId String?
17
+
18
+ requireAccountAgeDays Int?
19
+ requireJoinAgeDays Int?
20
+ boosterOnly Boolean?
21
+
22
+ embeds GuildRolePanelEmbed[]
23
+ rows GuildRolePanelRole[]
24
+ }
25
+
26
+ model GuildRolePanelRole {
27
+ dbId String @id @default(uuid())
28
+
29
+ roleId String
30
+ label String? @db.VarChar(80)
31
+ emojiUnicodeOrId String?
32
+ style Int?
33
+
34
+ temporaryMinutes Int?
35
+ requiredRoleIds String[]
36
+ blacklistRoleIds String[]
37
+
38
+ guildRolePanelId String
39
+ guildRolePanel GuildRolePanel? @relation(fields: [guildRolePanelId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
40
+ }
41
+
42
+ model GuildRolePanelEmbed {
43
+ dbId String @id @default(uuid())
44
+
45
+ order Int
46
+ title String? @db.VarChar(256)
47
+ url String?
48
+ description String @db.VarChar(2048)
49
+ color String? @db.VarChar(10)
50
+ footer String? @db.VarChar(1024)
51
+ footerIcon String?
52
+ image String?
53
+ thumbnail String?
54
+ author String? @db.VarChar(256)
55
+ authorIcon String?
56
+
57
+ fields GuildRolePanelEmbedField[]
58
+
59
+ guildRolePanelId String
60
+ guildRolePanel GuildRolePanel? @relation(fields: [guildRolePanelId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
61
+ }
62
+
63
+ model GuildRolePanelEmbedField {
64
+ dbId String @id @default(uuid())
65
+
66
+ name String @db.VarChar(256)
67
+ value String? @db.VarChar(1024)
68
+ inline Boolean?
69
+
70
+ guildRolePanelEmbedId String
71
+ guildRolePanelEmbed GuildRolePanelEmbed? @relation(fields: [guildRolePanelEmbedId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
72
+ }
@@ -13,12 +13,16 @@ model RumbleStreamer {
13
13
 
14
14
  customMessages RSCustomMessage[] // Premium
15
15
 
16
- notificationChannelId String?
17
- showNotifyButton Boolean?
16
+ notificationChannelId String? // Live notification channel.
17
+ videoNotificationChannelId String? // Upload (video) notification channel.
18
+ showNotifyButton Boolean?
18
19
 
19
20
  pingRoleId String?
21
+ videoRoleId String? // Ping role for uploads.
20
22
  customCoolDownBeforeNextLive Int? // Premium. In minutes.
21
23
 
24
+ notifyOnStreamVods Boolean? // If true, livestream replays (VODs) also trigger an upload notification.
25
+
22
26
  liveRoleId String?
23
27
  usersForLiveRole String[]
24
28
  usersWhoHaveLiveRole String[] // Internal
@@ -26,7 +30,9 @@ model RumbleStreamer {
26
30
  statsChannelIds RSStatsChannelId? // Internal
27
31
  isCurrentlyLive RSCurrentlyLive? // Internal
28
32
 
29
- lastLive DateTime?
33
+ lastLive DateTime?
34
+ lastVideo DateTime? // Upload dedup: timestamp of the most recently notified video.
35
+ lastVideoId String? // Upload dedup: id of the most recently notified video (seeded silently on first check).
30
36
 
31
37
  @@unique([streamerUserName, guildId])
32
38
  }
@@ -29,7 +29,7 @@ enum SingleMessageTypeEnum {
29
29
 
30
30
  enum StreamerMessageTypeEnum {
31
31
  clip
32
- kickBuiltInClip
32
+ clipForward
33
33
  vod
34
34
  kickLive
35
35
  kickOffline
@@ -37,6 +37,7 @@ enum StreamerMessageTypeEnum {
37
37
  twitchOffline
38
38
  rumbleLive
39
39
  rumbleOffline
40
+ rumbleVideo
40
41
  tiktokLive
41
42
  tiktokOffline
42
43
  tiktokVideo
@@ -57,7 +58,7 @@ enum GuildMessageTypeEnum {
57
58
 
58
59
  // StreamerMessageTypeEnum
59
60
  clip
60
- kickBuiltInClip
61
+ clipForward
61
62
  vod
62
63
  kickLive
63
64
  kickOffline
@@ -65,6 +66,7 @@ enum GuildMessageTypeEnum {
65
66
  twitchOffline
66
67
  rumbleLive
67
68
  rumbleOffline
69
+ rumbleVideo
68
70
  tiktokLive
69
71
  tiktokOffline
70
72
  tiktokVideo
@@ -114,6 +116,7 @@ enum UserMediaSharePermissionsEnum {
114
116
  enum PlatformsWithVideosEnum {
115
117
  tiktok
116
118
  youtube
119
+ rumble
117
120
  }
118
121
 
119
122
  enum RumbleTypeEnum {
@@ -218,6 +221,19 @@ enum ScheduledMessageTriggerEnum {
218
221
  guildEvent
219
222
  }
220
223
 
224
+ enum RolePanelType {
225
+ buttons
226
+ dropdown
227
+ reactions
228
+ }
229
+
230
+ enum RolePanelAssignMode {
231
+ toggle
232
+ unique
233
+ limit
234
+ verify
235
+ }
236
+
221
237
  model AllEnumsModel {
222
238
  dbId String @id @default(uuid())
223
239
 
@@ -244,4 +260,6 @@ model AllEnumsModel {
244
260
  gameRobloxKinds GameRobloxKindEnum
245
261
  scheduledRecurrence ScheduledMessageRecurrenceEnum
246
262
  scheduledTrigger ScheduledMessageTriggerEnum
263
+ rolePanelTypes RolePanelType
264
+ rolePanelAssignModes RolePanelAssignMode
247
265
  }