@notidotbot/noti-api-client 1.6.3 → 1.6.5

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.
@@ -0,0 +1,108 @@
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
+ whitelistCategories String[]
28
+ blacklistCategories String[]
29
+
30
+ showNotifyButton Boolean?
31
+ usePerStreamerEmbeds Boolean? // Premium: custom per-forward message.
32
+
33
+ customMessages CFCustomMessage[]
34
+
35
+ lastClipAt DateTime? // Internal dedup: created_at of the most recently forwarded clip.
36
+ lastClipId String? // Internal dedup: id of the most recently forwarded clip (seeded on first check).
37
+
38
+ @@unique([guildId, platform, streamerUserName])
39
+ }
40
+
41
+ model CFCustomMessage {
42
+ dbId String @id @default(uuid())
43
+
44
+ type StreamerMessageTypeEnum
45
+ content String? @db.VarChar(2000)
46
+
47
+ embed CFMessageEmbed?
48
+ buttons CFMessageButton[]
49
+ webhook CFMessageWebhook?
50
+
51
+ clipForwardId String
52
+ clipForward GuildClipForward? @relation(fields: [clipForwardId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
53
+
54
+ @@unique([clipForwardId, type])
55
+ }
56
+
57
+ model CFMessageEmbed {
58
+ dbId String @id @default(uuid())
59
+
60
+ title String? @db.VarChar(256)
61
+ url String?
62
+ description String @db.VarChar(2048)
63
+ color String? @db.VarChar(10)
64
+ footer String? @db.VarChar(1024)
65
+ footerIcon String?
66
+ image String?
67
+ thumbnail String?
68
+ author String? @db.VarChar(256)
69
+ authorIcon String?
70
+ fields CFEmbedField[]
71
+
72
+ cfCustomMessageId String @unique
73
+ cfCustomMessage CFCustomMessage? @relation(fields: [cfCustomMessageId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
74
+ }
75
+
76
+ model CFEmbedField {
77
+ dbId String @id @default(uuid())
78
+
79
+ name String @db.VarChar(256)
80
+ value String? @db.VarChar(1024)
81
+ inline Boolean?
82
+
83
+ cfMessageEmbedId String
84
+ cfMessageEmbed CFMessageEmbed? @relation(fields: [cfMessageEmbedId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
85
+ }
86
+
87
+ model CFMessageButton {
88
+ dbId String @id @default(uuid())
89
+
90
+ title String @db.VarChar(80)
91
+ url String?
92
+
93
+ emojiUnicodeOrId String?
94
+
95
+ cfCustomMessageId String
96
+ cfCustomMessage CFCustomMessage? @relation(fields: [cfCustomMessageId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
97
+ }
98
+
99
+ model CFMessageWebhook {
100
+ dbId String @id @default(uuid())
101
+
102
+ enabled Boolean?
103
+ username String?
104
+ avatarUrl String?
105
+
106
+ cfCustomMessageId String @unique
107
+ cfCustomMessage CFCustomMessage? @relation(fields: [cfCustomMessageId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
108
+ }
@@ -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,11 @@
1
+ // Persistent Twitch category (game) id -> name store. Twitch clips only return a gameId; resolving the
2
+ // name costs a Helix call, so we store it forever (names never change) — one API call per category ever,
3
+ // fronted by a short Redis hot-cache. Also the source for the dashboard's category-filter picker.
4
+ model TwitchGame {
5
+ dbId String @id @default(uuid())
6
+
7
+ gameId String @unique
8
+ name String
9
+
10
+ updatedAt DateTime @default(now()) @updatedAt
11
+ }
@@ -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
@@ -58,7 +58,7 @@ enum GuildMessageTypeEnum {
58
58
 
59
59
  // StreamerMessageTypeEnum
60
60
  clip
61
- kickBuiltInClip
61
+ clipForward
62
62
  vod
63
63
  kickLive
64
64
  kickOffline