@notidotbot/noti-api-client 1.9.31 → 1.9.33
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/guildPlatform.d.ts +3 -3
- package/dist/classes/guildPlatformAction.d.ts +2 -2
- package/dist/classes/guildStatChannels.d.ts +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4 -1
- package/dist/other/bitfields.d.ts +8 -2
- package/dist/other/bitfields.js +4 -0
- package/dist/other/features.d.ts +1 -1
- package/dist/other/features.js +2 -0
- package/dist/other/offlineGrace.d.ts +21 -0
- package/dist/other/offlineGrace.js +23 -0
- package/dist/other/prisma.d.ts +3 -0
- package/dist/other/types.d.ts +2 -0
- package/dist/other/zod/guild.zod.d.ts +2 -0
- package/dist/other/zod/guild.zod.js +1 -0
- package/dist/other/zod/kickStreamer.zod.d.ts +1 -0
- package/dist/other/zod/kickStreamer.zod.js +4 -0
- package/dist/other/zod/rumbleStreamer.zod.d.ts +1 -0
- package/dist/other/zod/rumbleStreamer.zod.js +4 -0
- package/dist/other/zod/tiktokStreamer.zod.d.ts +1 -0
- package/dist/other/zod/tiktokStreamer.zod.js +4 -0
- package/dist/other/zod/twitchStreamer.zod.d.ts +1 -0
- package/dist/other/zod/twitchStreamer.zod.js +4 -0
- package/dist/other/zod/twitterStreamer.zod.d.ts +149 -0
- package/dist/other/zod/twitterStreamer.zod.js +58 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/prisma/generated/ts-prisma.d.ts +5803 -869
- package/prisma/schema/models/guild.prisma +1 -0
- package/prisma/schema/models/kickStreamer.prisma +1 -0
- package/prisma/schema/models/rumbleStreamer.prisma +1 -0
- package/prisma/schema/models/tiktokStreamer.prisma +1 -0
- package/prisma/schema/models/twitchStreamer.prisma +1 -0
- package/prisma/schema/models/twitterStreamer.prisma +157 -0
- package/prisma/schema/schema.prisma +7 -0
|
@@ -94,6 +94,7 @@ model GuildPremium {
|
|
|
94
94
|
additionalTiktokConnections Int @default(0)
|
|
95
95
|
additionalWhatnotConnections Int @default(0)
|
|
96
96
|
additionalClubConnections Int @default(0)
|
|
97
|
+
additionalTwitterConnections Int @default(0)
|
|
97
98
|
additionalKickClips Int @default(0)
|
|
98
99
|
additionalTwitchClips Int @default(0)
|
|
99
100
|
|
|
@@ -37,6 +37,7 @@ model KickStreamer {
|
|
|
37
37
|
pingRoleId String?
|
|
38
38
|
enableVodDownloading Boolean? // Premium
|
|
39
39
|
customCoolDownBeforeNextLive Int? // Premium. In minutes.
|
|
40
|
+
offlineGracePeriod Int? // Hold an offline this long in case they reconnect. In minutes. null = 5 (free default).
|
|
40
41
|
|
|
41
42
|
usersWhoHaveRole KSRoleWithUsers[] // Internal & Premium
|
|
42
43
|
leaderBoardSyncRoles KSLeaderBoardSyncRole[] // Premium
|
|
@@ -20,6 +20,7 @@ model RumbleStreamer {
|
|
|
20
20
|
pingRoleId String?
|
|
21
21
|
videoRoleId String? // Ping role for uploads.
|
|
22
22
|
customCoolDownBeforeNextLive Int? // Premium. In minutes.
|
|
23
|
+
offlineGracePeriod Int? // Hold an offline this long in case they reconnect. In minutes. null = 5 (free default).
|
|
23
24
|
|
|
24
25
|
notifyOnStreamVods Boolean? // If true, livestream replays (VODs) also trigger an upload notification.
|
|
25
26
|
|
|
@@ -17,6 +17,7 @@ model TiktokStreamer {
|
|
|
17
17
|
|
|
18
18
|
pingRoleId String?
|
|
19
19
|
customCoolDownBeforeNextLive Int? // Premium. In minutes.
|
|
20
|
+
offlineGracePeriod Int? // Hold an offline this long in case they reconnect. In minutes. null = 5 (free default).
|
|
20
21
|
|
|
21
22
|
liveRoleId String?
|
|
22
23
|
usersForLiveRole String[]
|
|
@@ -19,6 +19,7 @@ model TwitchStreamer {
|
|
|
19
19
|
|
|
20
20
|
pingRoleId String?
|
|
21
21
|
customCoolDownBeforeNextLive Int? // Premium. In minutes.
|
|
22
|
+
offlineGracePeriod Int? // Hold an offline this long in case they reconnect. In minutes. null = 5 (free default).
|
|
22
23
|
|
|
23
24
|
liveRoleId String?
|
|
24
25
|
usersForLiveRole String[]
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
// X (Twitter). Two notification kinds on ONE row, and they are separately entitled:
|
|
2
|
+
//
|
|
3
|
+
// - POSTS, polled from FxTwitter's public API. Free tier, capped at one connection.
|
|
4
|
+
// Deduped and anti-backfilled by lastPostId / lastPostAt, exactly as Club does.
|
|
5
|
+
// - LIVE, read from the Open Graph metadata X serves for a broadcast page. Paid tiers only.
|
|
6
|
+
// `currentBroadcastId` is learned from a go-live POST - there is no other source for it, because
|
|
7
|
+
// FxEmbed does not implement broadcasts and X has no live API.
|
|
8
|
+
//
|
|
9
|
+
// One row rather than two so a server configures the creator once and simply has no live channel to
|
|
10
|
+
// set until it upgrades - the upsell sits on a creator it already follows.
|
|
11
|
+
//
|
|
12
|
+
// SUB-MODEL PREFIX IS `TWS`, NOT `TS`. `TS*` is Twitch (TSCustomMessage, TSCurrentlyLive, ...).
|
|
13
|
+
model TwitterStreamer {
|
|
14
|
+
dbId String @id @default(uuid())
|
|
15
|
+
|
|
16
|
+
streamerUserName String
|
|
17
|
+
guildId String
|
|
18
|
+
|
|
19
|
+
// X handles get RENAMED. Polling by handle alone would silently stop matching, so the numeric id is
|
|
20
|
+
// captured at add time and FxTwitter is queried as `id:<streamerId>`; the handle is for display and
|
|
21
|
+
// is refreshed from each poll.
|
|
22
|
+
streamerId String?
|
|
23
|
+
|
|
24
|
+
usePerStreamerEmbeds Boolean?
|
|
25
|
+
autoPublishIfAnnouncmentChannel Boolean?
|
|
26
|
+
|
|
27
|
+
customMessages TWSCustomMessage[]
|
|
28
|
+
|
|
29
|
+
// POSTS. Free tier. Its own channel AND its own ping role, so a server can route new posts
|
|
30
|
+
// somewhere quieter than go-lives and ping a different group for each.
|
|
31
|
+
//
|
|
32
|
+
// NAMING: `pingRoleId` means the LIVE role here, matching kick/tiktok/rumble/youtube/whatnot - five
|
|
33
|
+
// of the six platforms that have it. Club is the exception only because Club has no live concept.
|
|
34
|
+
// Secondary kinds are prefixed, as kick does with clipPingRoleId / vodsPingRoleId.
|
|
35
|
+
postNotificationChannelId String?
|
|
36
|
+
postPingRoleId String?
|
|
37
|
+
showNotifyButton Boolean?
|
|
38
|
+
|
|
39
|
+
customCoolDownBeforeNextPost Int?
|
|
40
|
+
|
|
41
|
+
lastPostId String?
|
|
42
|
+
lastPostAt DateTime?
|
|
43
|
+
|
|
44
|
+
// LIVE. Premium and above - gated by TwitterLiveNotifications, not by TwitterNotifications.
|
|
45
|
+
liveNotificationChannelId String?
|
|
46
|
+
pingRoleId String?
|
|
47
|
+
sendOfflineMessage Boolean?
|
|
48
|
+
deleteEmbeds Boolean?
|
|
49
|
+
customCoolDownBeforeNextLive Int?
|
|
50
|
+
offlineGracePeriod Int?
|
|
51
|
+
|
|
52
|
+
liveRoleId String?
|
|
53
|
+
usersForLiveRole String[]
|
|
54
|
+
usersWhoHaveLiveRole String[]
|
|
55
|
+
|
|
56
|
+
statsChannelIds TWSStatsChannelId?
|
|
57
|
+
isCurrentlyLive TWSCurrentlyLive?
|
|
58
|
+
|
|
59
|
+
// The broadcast being tracked right now, learned from a go-live post. Cleared when the page reports
|
|
60
|
+
// ENDED. Never cleared on an inconclusive read - that is how a live embed survives a blip.
|
|
61
|
+
currentBroadcastId String?
|
|
62
|
+
lastLive DateTime?
|
|
63
|
+
|
|
64
|
+
@@unique([streamerUserName, guildId])
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
model TWSCustomMessage {
|
|
68
|
+
dbId String @id @default(uuid())
|
|
69
|
+
|
|
70
|
+
type StreamerMessageTypeEnum
|
|
71
|
+
content String? @db.VarChar(2000)
|
|
72
|
+
// Per-message editor override for the branding (Invite Noti) button; null = fall back to guild disableBranding.
|
|
73
|
+
showInviteButton Boolean?
|
|
74
|
+
showWatchButton Boolean?
|
|
75
|
+
|
|
76
|
+
embed TWSMessageEmbed?
|
|
77
|
+
buttons TWSMessageButton[]
|
|
78
|
+
webhook TWSMessageWebhook?
|
|
79
|
+
|
|
80
|
+
twitterStreamerId String
|
|
81
|
+
twitterStreamer TwitterStreamer? @relation(fields: [twitterStreamerId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
|
|
82
|
+
|
|
83
|
+
@@unique([twitterStreamerId, type])
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
model TWSMessageEmbed {
|
|
87
|
+
dbId String @id @default(uuid())
|
|
88
|
+
|
|
89
|
+
title String? @db.VarChar(256)
|
|
90
|
+
url String?
|
|
91
|
+
description String @db.VarChar(2048)
|
|
92
|
+
color String? @db.VarChar(10)
|
|
93
|
+
footer String? @db.VarChar(1024)
|
|
94
|
+
footerIcon String?
|
|
95
|
+
image String?
|
|
96
|
+
thumbnail String?
|
|
97
|
+
author String? @db.VarChar(256)
|
|
98
|
+
authorIcon String?
|
|
99
|
+
fields TWSEmbedField[]
|
|
100
|
+
|
|
101
|
+
twsCustomMessageId String @unique
|
|
102
|
+
twsCustomMessage TWSCustomMessage? @relation(fields: [twsCustomMessageId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
model TWSEmbedField {
|
|
106
|
+
dbId String @id @default(uuid())
|
|
107
|
+
|
|
108
|
+
name String @db.VarChar(256)
|
|
109
|
+
value String? @db.VarChar(1024)
|
|
110
|
+
inline Boolean?
|
|
111
|
+
|
|
112
|
+
twsMessageEmbedId String
|
|
113
|
+
twsMessageEmbed TWSMessageEmbed? @relation(fields: [twsMessageEmbedId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
model TWSMessageButton {
|
|
117
|
+
dbId String @id @default(uuid())
|
|
118
|
+
|
|
119
|
+
title String @db.VarChar(80)
|
|
120
|
+
url String?
|
|
121
|
+
|
|
122
|
+
emojiUnicodeOrId String?
|
|
123
|
+
|
|
124
|
+
twsCustomMessageId String
|
|
125
|
+
twsCustomMessage TWSCustomMessage? @relation(fields: [twsCustomMessageId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
model TWSMessageWebhook {
|
|
129
|
+
dbId String @id @default(uuid())
|
|
130
|
+
|
|
131
|
+
enabled Boolean?
|
|
132
|
+
username String?
|
|
133
|
+
avatarUrl String?
|
|
134
|
+
|
|
135
|
+
twsCustomMessageId String @unique
|
|
136
|
+
twsCustomMessage TWSCustomMessage? @relation(fields: [twsCustomMessageId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
model TWSStatsChannelId {
|
|
140
|
+
dbId String @id @default(uuid())
|
|
141
|
+
|
|
142
|
+
isLive String?
|
|
143
|
+
|
|
144
|
+
twitterStreamerId String @unique
|
|
145
|
+
twitterStreamer TwitterStreamer? @relation(fields: [twitterStreamerId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
model TWSCurrentlyLive {
|
|
149
|
+
dbId String @id @default(uuid())
|
|
150
|
+
|
|
151
|
+
correct Boolean?
|
|
152
|
+
channelId String?
|
|
153
|
+
messageId String?
|
|
154
|
+
|
|
155
|
+
twitterStreamerId String @unique
|
|
156
|
+
twitterStreamer TwitterStreamer? @relation(fields: [twitterStreamerId], references: [dbId], onUpdate: Cascade, onDelete: Cascade)
|
|
157
|
+
}
|
|
@@ -44,6 +44,9 @@ enum StreamerMessageTypeEnum {
|
|
|
44
44
|
youtubeLive
|
|
45
45
|
youtubeVideo
|
|
46
46
|
clubPost
|
|
47
|
+
twitterPost
|
|
48
|
+
twitterLive
|
|
49
|
+
twitterOffline
|
|
47
50
|
}
|
|
48
51
|
|
|
49
52
|
enum GuildMessageTypeEnum {
|
|
@@ -74,6 +77,9 @@ enum GuildMessageTypeEnum {
|
|
|
74
77
|
youtubeLive
|
|
75
78
|
youtubeVideo
|
|
76
79
|
clubPost
|
|
80
|
+
twitterPost
|
|
81
|
+
twitterLive
|
|
82
|
+
twitterOffline
|
|
77
83
|
}
|
|
78
84
|
|
|
79
85
|
enum GuildSingleMessageTypeEnum {
|
|
@@ -99,6 +105,7 @@ enum PlatformEnum {
|
|
|
99
105
|
tiktok
|
|
100
106
|
youtube
|
|
101
107
|
club
|
|
108
|
+
twitter
|
|
102
109
|
}
|
|
103
110
|
|
|
104
111
|
enum ClipperCategoryEnum {
|