@notidotbot/noti-api-client 1.9.32 → 1.9.35

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 (36) hide show
  1. package/dist/classes/guildFishing.d.ts +11 -0
  2. package/dist/classes/guildGiveaway.d.ts +23 -0
  3. package/dist/classes/guildPlatform.d.ts +3 -3
  4. package/dist/classes/guildPlatformAction.d.ts +2 -2
  5. package/dist/classes/guildStatChannels.d.ts +1 -1
  6. package/dist/index.d.ts +1 -1
  7. package/dist/modules/stripe.js +1 -0
  8. package/dist/other/bitfields.d.ts +8 -2
  9. package/dist/other/bitfields.js +4 -0
  10. package/dist/other/enums.d.ts +24 -0
  11. package/dist/other/enums.js +12 -0
  12. package/dist/other/features.d.ts +1 -1
  13. package/dist/other/features.js +1 -0
  14. package/dist/other/prisma.d.ts +3 -0
  15. package/dist/other/types.d.ts +1 -0
  16. package/dist/other/zod/client.zod.d.ts +4 -0
  17. package/dist/other/zod/clipForward.zod.d.ts +15 -0
  18. package/dist/other/zod/clubStreamer.zod.d.ts +10 -0
  19. package/dist/other/zod/drops.zod.d.ts +2 -0
  20. package/dist/other/zod/guild.zod.d.ts +23 -0
  21. package/dist/other/zod/guild.zod.js +1 -0
  22. package/dist/other/zod/kickStreamer.zod.d.ts +10 -0
  23. package/dist/other/zod/rumbleStreamer.zod.d.ts +10 -0
  24. package/dist/other/zod/schema.zod.d.ts +12 -0
  25. package/dist/other/zod/schema.zod.js +12 -0
  26. package/dist/other/zod/tiktokStreamer.zod.d.ts +10 -0
  27. package/dist/other/zod/twitchStreamer.zod.d.ts +10 -0
  28. package/dist/other/zod/twitterStreamer.zod.d.ts +159 -0
  29. package/dist/other/zod/twitterStreamer.zod.js +58 -0
  30. package/dist/other/zod/youtubeStreamer.zod.d.ts +10 -0
  31. package/dist/tsconfig.tsbuildinfo +1 -1
  32. package/package.json +1 -1
  33. package/prisma/generated/ts-prisma.d.ts +5803 -869
  34. package/prisma/schema/models/guild.prisma +1 -0
  35. package/prisma/schema/models/twitterStreamer.prisma +157 -0
  36. package/prisma/schema/schema.prisma +12 -0
@@ -88,7 +88,12 @@ exports.StreamerMessageTypeEnum = zod_1.z.enum([
88
88
  'tiktokVideo',
89
89
  'youtubeLive',
90
90
  'youtubeVideo',
91
+ 'whatnotLive',
92
+ 'whatnotOffline',
91
93
  'clubPost',
94
+ 'twitterPost',
95
+ 'twitterLive',
96
+ 'twitterOffline',
92
97
  ]);
93
98
  exports.GuildMessageTypeEnum = zod_1.z.enum([
94
99
  'giveawayRerolled',
@@ -115,7 +120,12 @@ exports.GuildMessageTypeEnum = zod_1.z.enum([
115
120
  'tiktokVideo',
116
121
  'youtubeLive',
117
122
  'youtubeVideo',
123
+ 'whatnotLive',
124
+ 'whatnotOffline',
118
125
  'clubPost',
126
+ 'twitterPost',
127
+ 'twitterLive',
128
+ 'twitterOffline',
119
129
  ]);
120
130
  exports.GuildSingleMessageTypeEnum = zod_1.z.enum([
121
131
  'autoLiveRoleAdded',
@@ -137,7 +147,9 @@ exports.PlatformEnum = zod_1.z.enum([
137
147
  'rumble',
138
148
  'tiktok',
139
149
  'youtube',
150
+ 'whatnot',
140
151
  'club',
152
+ 'twitter',
141
153
  ]);
142
154
  // Clip forwarding is only offered for Kick and Twitch — keep the enum (and the dashboard's platform
143
155
  // list) restricted to those, not the full PlatformEnum.
@@ -59,7 +59,12 @@ export declare const TiktokStreamerZod: {
59
59
  tiktokVideo: "tiktokVideo";
60
60
  youtubeLive: "youtubeLive";
61
61
  youtubeVideo: "youtubeVideo";
62
+ whatnotLive: "whatnotLive";
63
+ whatnotOffline: "whatnotOffline";
62
64
  clubPost: "clubPost";
65
+ twitterPost: "twitterPost";
66
+ twitterLive: "twitterLive";
67
+ twitterOffline: "twitterOffline";
63
68
  }>;
64
69
  }, z.core.$strip>>>;
65
70
  liveNotificationChannelId: z.ZodNullable<z.ZodString>;
@@ -129,7 +134,12 @@ export declare const TiktokStreamerZod: {
129
134
  tiktokVideo: "tiktokVideo";
130
135
  youtubeLive: "youtubeLive";
131
136
  youtubeVideo: "youtubeVideo";
137
+ whatnotLive: "whatnotLive";
138
+ whatnotOffline: "whatnotOffline";
132
139
  clubPost: "clubPost";
140
+ twitterPost: "twitterPost";
141
+ twitterLive: "twitterLive";
142
+ twitterOffline: "twitterOffline";
133
143
  }>;
134
144
  }, z.core.$strip>;
135
145
  readonly TTSStatsChannelIdSchema: z.ZodObject<{
@@ -61,7 +61,12 @@ export declare const TwitchStreamerZod: {
61
61
  tiktokVideo: "tiktokVideo";
62
62
  youtubeLive: "youtubeLive";
63
63
  youtubeVideo: "youtubeVideo";
64
+ whatnotLive: "whatnotLive";
65
+ whatnotOffline: "whatnotOffline";
64
66
  clubPost: "clubPost";
67
+ twitterPost: "twitterPost";
68
+ twitterLive: "twitterLive";
69
+ twitterOffline: "twitterOffline";
65
70
  }>;
66
71
  }, z.core.$strip>>>;
67
72
  notificationChannelId: z.ZodNullable<z.ZodString>;
@@ -129,7 +134,12 @@ export declare const TwitchStreamerZod: {
129
134
  tiktokVideo: "tiktokVideo";
130
135
  youtubeLive: "youtubeLive";
131
136
  youtubeVideo: "youtubeVideo";
137
+ whatnotLive: "whatnotLive";
138
+ whatnotOffline: "whatnotOffline";
132
139
  clubPost: "clubPost";
140
+ twitterPost: "twitterPost";
141
+ twitterLive: "twitterLive";
142
+ twitterOffline: "twitterOffline";
133
143
  }>;
134
144
  }, z.core.$strip>;
135
145
  readonly TSStatsChannelIdSchema: z.ZodObject<{
@@ -0,0 +1,159 @@
1
+ import { PartialZodObject } from './schema.zod';
2
+ import { RemoveProperties } from '../prisma';
3
+ import { TSPrisma } from '@prisma/client';
4
+ import { z } from 'zod';
5
+ export type RT<T extends TSPrisma.AllModelNames> = z.ZodType<RemoveProperties<TSPrisma.TSPrismaModelsFull[T], TwitterStreamerRelations>>;
6
+ export type TwitterStreamerRelations = 'db' | 'twitterStreamer' | 'twsCustomMessage' | 'twsMessageEmbed';
7
+ export declare const TwitterStreamerZod: {
8
+ readonly TwitterStreamerSchema: z.ZodObject<{
9
+ streamerUserName: z.ZodString;
10
+ guildId: z.ZodString;
11
+ streamerId: z.ZodNullable<z.ZodString>;
12
+ usePerStreamerEmbeds: z.ZodNullable<z.ZodBoolean>;
13
+ autoPublishIfAnnouncmentChannel: z.ZodNullable<z.ZodBoolean>;
14
+ customMessages: z.ZodArray<z.ZodLazy<z.ZodObject<{
15
+ content: z.ZodNullable<z.ZodString>;
16
+ showInviteButton: z.ZodNullable<z.ZodBoolean>;
17
+ showWatchButton: z.ZodNullable<z.ZodBoolean>;
18
+ embed: z.ZodNullable<z.ZodLazy<z.ZodObject<{
19
+ title: z.ZodNullable<z.ZodString>;
20
+ url: z.ZodNullable<z.ZodString>;
21
+ description: z.ZodString;
22
+ color: z.ZodNullable<z.ZodString>;
23
+ footer: z.ZodNullable<z.ZodString>;
24
+ footerIcon: z.ZodNullable<z.ZodString>;
25
+ image: z.ZodNullable<z.ZodString>;
26
+ thumbnail: z.ZodNullable<z.ZodString>;
27
+ author: z.ZodNullable<z.ZodString>;
28
+ authorIcon: z.ZodNullable<z.ZodString>;
29
+ fields: z.ZodArray<z.ZodLazy<z.ZodObject<{
30
+ name: z.ZodString;
31
+ value: z.ZodNullable<z.ZodString>;
32
+ inline: z.ZodNullable<z.ZodBoolean>;
33
+ }, z.core.$strip>>>;
34
+ }, z.core.$strip>>>;
35
+ buttons: z.ZodArray<z.ZodLazy<z.ZodObject<{
36
+ title: z.ZodString;
37
+ url: z.ZodNullable<z.ZodString>;
38
+ emojiUnicodeOrId: z.ZodNullable<z.ZodString>;
39
+ }, z.core.$strip>>>;
40
+ webhook: z.ZodNullable<z.ZodLazy<z.ZodObject<{
41
+ enabled: z.ZodNullable<z.ZodBoolean>;
42
+ username: z.ZodNullable<z.ZodString>;
43
+ avatarUrl: z.ZodNullable<z.ZodString>;
44
+ }, z.core.$strip>>>;
45
+ type: z.ZodEnum<{
46
+ clip: "clip";
47
+ clipForward: "clipForward";
48
+ vod: "vod";
49
+ kickLive: "kickLive";
50
+ kickOffline: "kickOffline";
51
+ twitchLive: "twitchLive";
52
+ twitchOffline: "twitchOffline";
53
+ rumbleLive: "rumbleLive";
54
+ rumbleOffline: "rumbleOffline";
55
+ rumbleVideo: "rumbleVideo";
56
+ tiktokLive: "tiktokLive";
57
+ tiktokOffline: "tiktokOffline";
58
+ tiktokVideo: "tiktokVideo";
59
+ youtubeLive: "youtubeLive";
60
+ youtubeVideo: "youtubeVideo";
61
+ whatnotLive: "whatnotLive";
62
+ whatnotOffline: "whatnotOffline";
63
+ clubPost: "clubPost";
64
+ twitterPost: "twitterPost";
65
+ twitterLive: "twitterLive";
66
+ twitterOffline: "twitterOffline";
67
+ }>;
68
+ }, z.core.$strip>>>;
69
+ postNotificationChannelId: z.ZodNullable<z.ZodString>;
70
+ postPingRoleId: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"everyone">, z.ZodLiteral<"here">]>>;
71
+ showNotifyButton: z.ZodNullable<z.ZodBoolean>;
72
+ customCoolDownBeforeNextPost: z.ZodNullable<z.ZodNumber>;
73
+ lastPostId: z.ZodNullable<z.ZodString>;
74
+ lastPostAt: z.ZodNullable<z.ZodDate>;
75
+ liveNotificationChannelId: z.ZodNullable<z.ZodString>;
76
+ pingRoleId: z.ZodNullable<z.ZodUnion<readonly [z.ZodString, z.ZodLiteral<"everyone">, z.ZodLiteral<"here">]>>;
77
+ sendOfflineMessage: z.ZodNullable<z.ZodBoolean>;
78
+ deleteEmbeds: z.ZodNullable<z.ZodBoolean>;
79
+ customCoolDownBeforeNextLive: z.ZodNullable<z.ZodNumber>;
80
+ offlineGracePeriod: z.ZodNullable<z.ZodUnion<[z.ZodLiteral<number>, z.ZodLiteral<number>, ...z.ZodLiteral<number>[]]>>;
81
+ liveRoleId: z.ZodNullable<z.ZodString>;
82
+ usersForLiveRole: z.ZodArray<z.ZodString>;
83
+ usersWhoHaveLiveRole: z.ZodArray<z.ZodString>;
84
+ statsChannelIds: z.ZodNullable<z.ZodLazy<z.ZodObject<{
85
+ isLive: z.ZodNullable<z.ZodString>;
86
+ }, z.core.$strip>>>;
87
+ isCurrentlyLive: z.ZodNullable<z.ZodLazy<z.ZodObject<{
88
+ correct: z.ZodNullable<z.ZodBoolean>;
89
+ channelId: z.ZodNullable<z.ZodString>;
90
+ messageId: z.ZodNullable<z.ZodString>;
91
+ }, z.core.$strip>>>;
92
+ currentBroadcastId: z.ZodNullable<z.ZodString>;
93
+ lastLive: z.ZodNullable<z.ZodDate>;
94
+ }, z.core.$strip>;
95
+ readonly TWSCustomMessageSchema: z.ZodObject<{
96
+ content: z.ZodNullable<z.ZodString>;
97
+ showInviteButton: z.ZodNullable<z.ZodBoolean>;
98
+ showWatchButton: z.ZodNullable<z.ZodBoolean>;
99
+ embed: z.ZodNullable<z.ZodLazy<z.ZodObject<{
100
+ title: z.ZodNullable<z.ZodString>;
101
+ url: z.ZodNullable<z.ZodString>;
102
+ description: z.ZodString;
103
+ color: z.ZodNullable<z.ZodString>;
104
+ footer: z.ZodNullable<z.ZodString>;
105
+ footerIcon: z.ZodNullable<z.ZodString>;
106
+ image: z.ZodNullable<z.ZodString>;
107
+ thumbnail: z.ZodNullable<z.ZodString>;
108
+ author: z.ZodNullable<z.ZodString>;
109
+ authorIcon: z.ZodNullable<z.ZodString>;
110
+ fields: z.ZodArray<z.ZodLazy<z.ZodObject<{
111
+ name: z.ZodString;
112
+ value: z.ZodNullable<z.ZodString>;
113
+ inline: z.ZodNullable<z.ZodBoolean>;
114
+ }, z.core.$strip>>>;
115
+ }, z.core.$strip>>>;
116
+ buttons: z.ZodArray<z.ZodLazy<z.ZodObject<{
117
+ title: z.ZodString;
118
+ url: z.ZodNullable<z.ZodString>;
119
+ emojiUnicodeOrId: z.ZodNullable<z.ZodString>;
120
+ }, z.core.$strip>>>;
121
+ webhook: z.ZodNullable<z.ZodLazy<z.ZodObject<{
122
+ enabled: z.ZodNullable<z.ZodBoolean>;
123
+ username: z.ZodNullable<z.ZodString>;
124
+ avatarUrl: z.ZodNullable<z.ZodString>;
125
+ }, z.core.$strip>>>;
126
+ type: z.ZodEnum<{
127
+ clip: "clip";
128
+ clipForward: "clipForward";
129
+ vod: "vod";
130
+ kickLive: "kickLive";
131
+ kickOffline: "kickOffline";
132
+ twitchLive: "twitchLive";
133
+ twitchOffline: "twitchOffline";
134
+ rumbleLive: "rumbleLive";
135
+ rumbleOffline: "rumbleOffline";
136
+ rumbleVideo: "rumbleVideo";
137
+ tiktokLive: "tiktokLive";
138
+ tiktokOffline: "tiktokOffline";
139
+ tiktokVideo: "tiktokVideo";
140
+ youtubeLive: "youtubeLive";
141
+ youtubeVideo: "youtubeVideo";
142
+ whatnotLive: "whatnotLive";
143
+ whatnotOffline: "whatnotOffline";
144
+ clubPost: "clubPost";
145
+ twitterPost: "twitterPost";
146
+ twitterLive: "twitterLive";
147
+ twitterOffline: "twitterOffline";
148
+ }>;
149
+ }, z.core.$strip>;
150
+ readonly TWSStatsChannelIdSchema: z.ZodObject<{
151
+ isLive: z.ZodNullable<z.ZodString>;
152
+ }, z.core.$strip>;
153
+ readonly TWSCurrentlyLiveSchema: z.ZodObject<{
154
+ correct: z.ZodNullable<z.ZodBoolean>;
155
+ channelId: z.ZodNullable<z.ZodString>;
156
+ messageId: z.ZodNullable<z.ZodString>;
157
+ }, z.core.$strip>;
158
+ };
159
+ export declare const TwitterStreamerZodPartial: PartialZodObject<typeof TwitterStreamerZod>;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TwitterStreamerZodPartial = exports.TwitterStreamerZod = void 0;
4
+ const schema_zod_1 = require("./schema.zod");
5
+ const zod_1 = require("./zod");
6
+ const offlineGrace_1 = require("../offlineGrace");
7
+ const zod_2 = require("zod");
8
+ const TwitterStreamerSchema = zod_2.z.object({
9
+ streamerUserName: zod_2.z.string(),
10
+ guildId: zod_1.SnowFlake,
11
+ // The numeric X id. Handles get renamed; this is what polling is actually keyed on.
12
+ streamerId: zod_2.z.string().nullable(),
13
+ usePerStreamerEmbeds: zod_2.z.boolean().nullable(),
14
+ autoPublishIfAnnouncmentChannel: zod_2.z.boolean().nullable(),
15
+ customMessages: zod_2.z.array(zod_2.z.lazy(() => TWSCustomMessageSchema)),
16
+ // POSTS - free tier. Own channel and own ping role.
17
+ postNotificationChannelId: zod_1.SnowFlake.nullable(),
18
+ postPingRoleId: zod_1.SnowFlakeOrEveryone.nullable(),
19
+ showNotifyButton: zod_2.z.boolean().nullable(),
20
+ customCoolDownBeforeNextPost: zod_2.z.number().min(0).max(360).nullable(),
21
+ lastPostId: zod_2.z.string().nullable(),
22
+ lastPostAt: zod_2.z.date().nullable(),
23
+ // LIVE - paid tiers, gated separately by TwitterLiveNotifications. `pingRoleId` is the live role,
24
+ // matching every other platform that has one.
25
+ liveNotificationChannelId: zod_1.SnowFlake.nullable(),
26
+ pingRoleId: zod_1.SnowFlakeOrEveryone.nullable(),
27
+ sendOfflineMessage: zod_2.z.boolean().nullable(),
28
+ deleteEmbeds: zod_2.z.boolean().nullable(),
29
+ customCoolDownBeforeNextLive: zod_2.z.number().min(0).max(360).nullable(),
30
+ // A literal union, not min/max: it is a dropdown, and 7 minutes is not a value the UI can produce.
31
+ offlineGracePeriod: zod_2.z.union(offlineGrace_1.OFFLINE_GRACE_CHOICES.map((n) => zod_2.z.literal(n))).nullable(),
32
+ liveRoleId: zod_1.SnowFlake.nullable(),
33
+ usersForLiveRole: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_1.SnowFlake)),
34
+ usersWhoHaveLiveRole: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_1.SnowFlake)),
35
+ statsChannelIds: zod_2.z.lazy(() => TWSStatsChannelIdSchema).nullable(),
36
+ isCurrentlyLive: zod_2.z.lazy(() => TWSCurrentlyLiveSchema).nullable(),
37
+ currentBroadcastId: zod_2.z.string().nullable(),
38
+ lastLive: zod_2.z.date().nullable(),
39
+ });
40
+ const TWSCustomMessageSchema = zod_2.z.object({
41
+ type: schema_zod_1.StreamerMessageTypeEnum,
42
+ ...zod_1.CentralZod.Message(),
43
+ });
44
+ const TWSStatsChannelIdSchema = zod_2.z.object({
45
+ isLive: zod_2.z.string().nullable(),
46
+ });
47
+ const TWSCurrentlyLiveSchema = zod_2.z.object({
48
+ correct: zod_2.z.boolean().nullable(),
49
+ channelId: zod_1.SnowFlake.nullable(),
50
+ messageId: zod_1.SnowFlake.nullable(),
51
+ });
52
+ exports.TwitterStreamerZod = {
53
+ TwitterStreamerSchema,
54
+ TWSCustomMessageSchema,
55
+ TWSStatsChannelIdSchema,
56
+ TWSCurrentlyLiveSchema,
57
+ };
58
+ exports.TwitterStreamerZodPartial = Object.fromEntries(Object.entries(exports.TwitterStreamerZod).map(([key, value]) => [key, (0, schema_zod_1.deepPartialify)(value)]));
@@ -60,7 +60,12 @@ export declare const YoutubeStreamerZod: {
60
60
  tiktokVideo: "tiktokVideo";
61
61
  youtubeLive: "youtubeLive";
62
62
  youtubeVideo: "youtubeVideo";
63
+ whatnotLive: "whatnotLive";
64
+ whatnotOffline: "whatnotOffline";
63
65
  clubPost: "clubPost";
66
+ twitterPost: "twitterPost";
67
+ twitterLive: "twitterLive";
68
+ twitterOffline: "twitterOffline";
64
69
  }>;
65
70
  }, z.core.$strip>>>;
66
71
  liveNotificationChannelId: z.ZodNullable<z.ZodString>;
@@ -130,7 +135,12 @@ export declare const YoutubeStreamerZod: {
130
135
  tiktokVideo: "tiktokVideo";
131
136
  youtubeLive: "youtubeLive";
132
137
  youtubeVideo: "youtubeVideo";
138
+ whatnotLive: "whatnotLive";
139
+ whatnotOffline: "whatnotOffline";
133
140
  clubPost: "clubPost";
141
+ twitterPost: "twitterPost";
142
+ twitterLive: "twitterLive";
143
+ twitterOffline: "twitterOffline";
134
144
  }>;
135
145
  }, z.core.$strip>;
136
146
  readonly YTSStatsChannelIdSchema: z.ZodObject<{