@notidotbot/noti-api-client 1.4.0
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/cname.js +3 -0
- package/dist/classes/@me.d.ts +122 -0
- package/dist/classes/@me.js +59 -0
- package/dist/classes/admin.d.ts +71 -0
- package/dist/classes/admin.js +26 -0
- package/dist/classes/client.d.ts +156 -0
- package/dist/classes/client.js +116 -0
- package/dist/classes/emotes.d.ts +31 -0
- package/dist/classes/emotes.js +24 -0
- package/dist/classes/files.d.ts +36 -0
- package/dist/classes/files.js +36 -0
- package/dist/classes/guild.d.ts +187 -0
- package/dist/classes/guild.js +140 -0
- package/dist/classes/guildDrops.d.ts +58 -0
- package/dist/classes/guildDrops.js +32 -0
- package/dist/classes/guildGiveaway.d.ts +110 -0
- package/dist/classes/guildGiveaway.js +76 -0
- package/dist/classes/guildPlatform.d.ts +163 -0
- package/dist/classes/guildPlatform.js +99 -0
- package/dist/classes/guildPlatformAction.d.ts +67 -0
- package/dist/classes/guildPlatformAction.js +26 -0
- package/dist/classes/guildStarboard.d.ts +66 -0
- package/dist/classes/guildStarboard.js +36 -0
- package/dist/classes/linked.d.ts +26 -0
- package/dist/classes/linked.js +32 -0
- package/dist/classes/other.d.ts +83 -0
- package/dist/classes/other.js +53 -0
- package/dist/classes/platform.d.ts +227 -0
- package/dist/classes/platform.js +30 -0
- package/dist/classes/premium.d.ts +179 -0
- package/dist/classes/premium.js +76 -0
- package/dist/classes/sessions.d.ts +42 -0
- package/dist/classes/sessions.js +30 -0
- package/dist/classes/teams.d.ts +88 -0
- package/dist/classes/teams.js +66 -0
- package/dist/classes/telemetry.d.ts +32 -0
- package/dist/classes/telemetry.js +28 -0
- package/dist/classes/user.d.ts +40 -0
- package/dist/classes/user.js +30 -0
- package/dist/classes/vods.d.ts +55 -0
- package/dist/classes/vods.js +38 -0
- package/dist/core/manager.d.ts +57 -0
- package/dist/core/manager.js +78 -0
- package/dist/core/utils.d.ts +4 -0
- package/dist/core/utils.js +26 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +42 -0
- package/dist/modules/stripe.d.ts +12 -0
- package/dist/modules/stripe.js +18 -0
- package/dist/other/bitfields.d.ts +283 -0
- package/dist/other/bitfields.js +323 -0
- package/dist/other/enums.d.ts +2 -0
- package/dist/other/enums.js +10 -0
- package/dist/other/prisma.d.ts +76 -0
- package/dist/other/prisma.js +9 -0
- package/dist/other/templates.d.ts +795 -0
- package/dist/other/templates.js +706 -0
- package/dist/other/types.d.ts +45 -0
- package/dist/other/types.js +17 -0
- package/dist/other/utils.d.ts +5 -0
- package/dist/other/utils.js +51 -0
- package/dist/other/zod/client.zod.d.ts +349 -0
- package/dist/other/zod/client.zod.js +63 -0
- package/dist/other/zod/drops.zod.d.ts +16 -0
- package/dist/other/zod/drops.zod.js +93 -0
- package/dist/other/zod/giveaways.zod.d.ts +382 -0
- package/dist/other/zod/giveaways.zod.js +72 -0
- package/dist/other/zod/guild.zod.d.ts +1638 -0
- package/dist/other/zod/guild.zod.js +139 -0
- package/dist/other/zod/kickStreamer.zod.d.ts +761 -0
- package/dist/other/zod/kickStreamer.zod.js +92 -0
- package/dist/other/zod/member.zod.d.ts +22 -0
- package/dist/other/zod/member.zod.js +15 -0
- package/dist/other/zod/r2Storage.zod.d.ts +56 -0
- package/dist/other/zod/r2Storage.zod.js +21 -0
- package/dist/other/zod/rumbleStreamer.zod.d.ts +530 -0
- package/dist/other/zod/rumbleStreamer.zod.js +45 -0
- package/dist/other/zod/schema.zod.d.ts +25 -0
- package/dist/other/zod/schema.zod.js +168 -0
- package/dist/other/zod/starboard.zod.d.ts +167 -0
- package/dist/other/zod/starboard.zod.js +46 -0
- package/dist/other/zod/team.zod.d.ts +107 -0
- package/dist/other/zod/team.zod.js +30 -0
- package/dist/other/zod/tiktokStreamer.zod.d.ts +473 -0
- package/dist/other/zod/tiktokStreamer.zod.js +46 -0
- package/dist/other/zod/twitchStreamer.zod.d.ts +473 -0
- package/dist/other/zod/twitchStreamer.zod.js +46 -0
- package/dist/other/zod/user.zod.d.ts +678 -0
- package/dist/other/zod/user.zod.js +124 -0
- package/dist/other/zod/youtubeStreamer.zod.d.ts +476 -0
- package/dist/other/zod/youtubeStreamer.zod.js +47 -0
- package/dist/other/zod/zod.d.ts +177 -0
- package/dist/other/zod/zod.js +60 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/types.d.ts +37 -0
- package/dist/types.js +2 -0
- package/package.json +63 -0
- package/prisma/generated/index.ts +25 -0
- package/prisma/generated/ts-prisma.d.ts +91725 -0
- package/prisma/schema/models/client.prisma +89 -0
- package/prisma/schema/models/drops.prisma +167 -0
- package/prisma/schema/models/giveaways.prisma +82 -0
- package/prisma/schema/models/guild.prisma +368 -0
- package/prisma/schema/models/kickStreamer.prisma +202 -0
- package/prisma/schema/models/member.prisma +10 -0
- package/prisma/schema/models/r2Storage.prisma +22 -0
- package/prisma/schema/models/rumbleStreamer.prisma +121 -0
- package/prisma/schema/models/starboard.prisma +66 -0
- package/prisma/schema/models/team.prisma +38 -0
- package/prisma/schema/models/tiktokStreamer.prisma +121 -0
- package/prisma/schema/models/twitchStreamer.prisma +122 -0
- package/prisma/schema/models/user.prisma +212 -0
- package/prisma/schema/models/youtubeStreamer.prisma +123 -0
- package/prisma/schema/schema.prisma +182 -0
- package/prisma.config.ts +6 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export * from '../types';
|
|
2
|
+
export type RemoveNull<T> = {
|
|
3
|
+
[K in keyof T as null extends T[K] ? K : never]?: T[K];
|
|
4
|
+
} & {
|
|
5
|
+
[K in keyof T as null extends T[K] ? never : K]: T[K];
|
|
6
|
+
};
|
|
7
|
+
export type PremiumPlanType = RemoveNull<(UserPlanType | GuildPlanType) & RawPlan>;
|
|
8
|
+
export type UserPlanType = {
|
|
9
|
+
type: 'user';
|
|
10
|
+
tierId: string;
|
|
11
|
+
userPremiumServerPremium: string | null;
|
|
12
|
+
};
|
|
13
|
+
export type GuildPlanType = {
|
|
14
|
+
type: 'guild';
|
|
15
|
+
tierId: string;
|
|
16
|
+
defaultStickyMessages: number | null;
|
|
17
|
+
defaultAutoLiveRoles: number | null;
|
|
18
|
+
defaultStatusRoles: number | null;
|
|
19
|
+
defaultStarboards: number | null;
|
|
20
|
+
defaultOverrides: number | null;
|
|
21
|
+
defaultKickConnections: number | null;
|
|
22
|
+
defaultRumbleConnections: number | null;
|
|
23
|
+
defaultTwitchConnections: number | null;
|
|
24
|
+
defaultYoutubeConnections: number | null;
|
|
25
|
+
defaultTiktokConnections: number | null;
|
|
26
|
+
maxGiveawayDurationHours: number | null;
|
|
27
|
+
maxGiveawayScheduleInFutureHours: number | null;
|
|
28
|
+
maxGiveawayRequirements: number | null;
|
|
29
|
+
maxAllowedVodDurationToSave: number | null;
|
|
30
|
+
maxAmountOfStreamersSavingVods: number | null;
|
|
31
|
+
};
|
|
32
|
+
export type RawPlan = {
|
|
33
|
+
tierId: string;
|
|
34
|
+
isShown: boolean;
|
|
35
|
+
enabled: boolean;
|
|
36
|
+
cents: number;
|
|
37
|
+
bitfield: string;
|
|
38
|
+
name: string;
|
|
39
|
+
description: string;
|
|
40
|
+
roleInSupportServer: string | null;
|
|
41
|
+
colorScheme: string | null;
|
|
42
|
+
highlighted: boolean | null;
|
|
43
|
+
showDecreasedPrice: string | null;
|
|
44
|
+
onSaleTag: boolean | null;
|
|
45
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("../types"), exports);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { KeysOf, DeepPartial, InferPartial } from '../types';
|
|
2
|
+
export declare function checkAndRemoveKeys<T extends Record<string, unknown>>(data: T, forbiddenKeys: KeysOf<InferPartial<T>>[], dont?: boolean, except?: KeysOf<InferPartial<T>>[]): {
|
|
3
|
+
modified: boolean;
|
|
4
|
+
obj: DeepPartial<T>;
|
|
5
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkAndRemoveKeys = checkAndRemoveKeys;
|
|
4
|
+
function checkAndRemoveKeys(data, forbiddenKeys, dont, except) {
|
|
5
|
+
if (dont)
|
|
6
|
+
return { modified: false, obj: data };
|
|
7
|
+
else if (forbiddenKeys.length === 0 || Object.keys(data).length === 0)
|
|
8
|
+
return { modified: false, obj: data };
|
|
9
|
+
else if (forbiddenKeys.includes('*'))
|
|
10
|
+
return { modified: true, obj: {} };
|
|
11
|
+
if (except?.length)
|
|
12
|
+
forbiddenKeys = forbiddenKeys.filter((key) => !except.includes(key));
|
|
13
|
+
let modified = false;
|
|
14
|
+
const formatForbiddenKeys = (keys) => keys.map((key) => key.endsWith('[]') ? key.slice(0, -2) : key);
|
|
15
|
+
const parseObject = (obj, forbiddenKeys) => {
|
|
16
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
17
|
+
if (formatForbiddenKeys(forbiddenKeys).includes(key)) {
|
|
18
|
+
delete obj[key];
|
|
19
|
+
modified = true;
|
|
20
|
+
}
|
|
21
|
+
else if (typeof value === 'object' && value !== null) {
|
|
22
|
+
const newKeys = forbiddenKeys.map((k) => {
|
|
23
|
+
const [first, ...rest] = k.split('.');
|
|
24
|
+
if (first === key)
|
|
25
|
+
return rest.join('.');
|
|
26
|
+
else
|
|
27
|
+
return k;
|
|
28
|
+
});
|
|
29
|
+
if (Array.isArray(value)) {
|
|
30
|
+
const newKeys = forbiddenKeys.map((k) => {
|
|
31
|
+
const [, ...rest] = k.split('.');
|
|
32
|
+
return rest.join('.');
|
|
33
|
+
});
|
|
34
|
+
for (const item of value) {
|
|
35
|
+
if (typeof item === 'object' && item !== null)
|
|
36
|
+
parseObject(item, newKeys);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
parseObject(value, newKeys);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return obj;
|
|
45
|
+
};
|
|
46
|
+
parseObject(data, forbiddenKeys);
|
|
47
|
+
return {
|
|
48
|
+
modified,
|
|
49
|
+
obj: data,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
import { PartialZodObject } from './schema.zod';
|
|
2
|
+
import { TSPrisma } from '@prisma/client';
|
|
3
|
+
import { RemoveProperties } from '../prisma';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
export type RT<T extends TSPrisma.AllModelNames> = z.ZodType<RemoveProperties<TSPrisma.TSPrismaModelsFull[T], ClientRelations>>;
|
|
6
|
+
export type ClientRelations = 'db' | 'client';
|
|
7
|
+
export declare const ClientZod: {
|
|
8
|
+
readonly ClientSchema: z.ZodObject<{
|
|
9
|
+
clientId: z.ZodEffects<z.ZodString, string, string>;
|
|
10
|
+
totalGiveaways: z.ZodNullable<z.ZodNumber>;
|
|
11
|
+
totalNotifications: z.ZodNullable<z.ZodNumber>;
|
|
12
|
+
statChannels: z.ZodNullable<z.ZodNumber>;
|
|
13
|
+
statusRoles: z.ZodNullable<z.ZodNumber>;
|
|
14
|
+
totalClips: z.ZodNullable<z.ZodNumber>;
|
|
15
|
+
totalVods: z.ZodNullable<z.ZodNumber>;
|
|
16
|
+
recentWhitelist: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
17
|
+
dashWhitelist: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
18
|
+
staff: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>;
|
|
19
|
+
faq: z.ZodEffects<z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
20
|
+
identifier: z.ZodString;
|
|
21
|
+
question: z.ZodNullable<z.ZodString>;
|
|
22
|
+
answer: z.ZodNullable<z.ZodString>;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
identifier: string;
|
|
25
|
+
question: string | null;
|
|
26
|
+
answer: string | null;
|
|
27
|
+
}, {
|
|
28
|
+
identifier: string;
|
|
29
|
+
question: string | null;
|
|
30
|
+
answer: string | null;
|
|
31
|
+
}>>, "many">, {
|
|
32
|
+
identifier: string;
|
|
33
|
+
question: string | null;
|
|
34
|
+
answer: string | null;
|
|
35
|
+
}[], {
|
|
36
|
+
identifier: string;
|
|
37
|
+
question: string | null;
|
|
38
|
+
answer: string | null;
|
|
39
|
+
}[]>;
|
|
40
|
+
blogs: z.ZodEffects<z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
41
|
+
identifier: z.ZodString;
|
|
42
|
+
title: z.ZodString;
|
|
43
|
+
isPinned: z.ZodBoolean;
|
|
44
|
+
tags: z.ZodArray<z.ZodString, "many">;
|
|
45
|
+
content: z.ZodString;
|
|
46
|
+
thumbnail: z.ZodNullable<z.ZodString>;
|
|
47
|
+
authorName: z.ZodString;
|
|
48
|
+
authorIcon: z.ZodString;
|
|
49
|
+
createdAt: z.ZodDate;
|
|
50
|
+
lastEdited: z.ZodDate;
|
|
51
|
+
views: z.ZodNumber;
|
|
52
|
+
reactions: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">, string[], string[]>;
|
|
53
|
+
reactionsCount: z.ZodNumber;
|
|
54
|
+
isPublic: z.ZodBoolean;
|
|
55
|
+
}, "strip", z.ZodTypeAny, {
|
|
56
|
+
title: string;
|
|
57
|
+
content: string;
|
|
58
|
+
thumbnail: string | null;
|
|
59
|
+
authorIcon: string;
|
|
60
|
+
identifier: string;
|
|
61
|
+
isPinned: boolean;
|
|
62
|
+
views: number;
|
|
63
|
+
reactions: string[];
|
|
64
|
+
reactionsCount: number;
|
|
65
|
+
tags: string[];
|
|
66
|
+
authorName: string;
|
|
67
|
+
createdAt: Date;
|
|
68
|
+
lastEdited: Date;
|
|
69
|
+
isPublic: boolean;
|
|
70
|
+
}, {
|
|
71
|
+
title: string;
|
|
72
|
+
content: string;
|
|
73
|
+
thumbnail: string | null;
|
|
74
|
+
authorIcon: string;
|
|
75
|
+
identifier: string;
|
|
76
|
+
isPinned: boolean;
|
|
77
|
+
views: number;
|
|
78
|
+
reactions: string[];
|
|
79
|
+
reactionsCount: number;
|
|
80
|
+
tags: string[];
|
|
81
|
+
authorName: string;
|
|
82
|
+
createdAt: Date;
|
|
83
|
+
lastEdited: Date;
|
|
84
|
+
isPublic: boolean;
|
|
85
|
+
}>>, "many">, {
|
|
86
|
+
title: string;
|
|
87
|
+
content: string;
|
|
88
|
+
thumbnail: string | null;
|
|
89
|
+
authorIcon: string;
|
|
90
|
+
identifier: string;
|
|
91
|
+
isPinned: boolean;
|
|
92
|
+
views: number;
|
|
93
|
+
reactions: string[];
|
|
94
|
+
reactionsCount: number;
|
|
95
|
+
tags: string[];
|
|
96
|
+
authorName: string;
|
|
97
|
+
createdAt: Date;
|
|
98
|
+
lastEdited: Date;
|
|
99
|
+
isPublic: boolean;
|
|
100
|
+
}[], {
|
|
101
|
+
title: string;
|
|
102
|
+
content: string;
|
|
103
|
+
thumbnail: string | null;
|
|
104
|
+
authorIcon: string;
|
|
105
|
+
identifier: string;
|
|
106
|
+
isPinned: boolean;
|
|
107
|
+
views: number;
|
|
108
|
+
reactions: string[];
|
|
109
|
+
reactionsCount: number;
|
|
110
|
+
tags: string[];
|
|
111
|
+
authorName: string;
|
|
112
|
+
createdAt: Date;
|
|
113
|
+
lastEdited: Date;
|
|
114
|
+
isPublic: boolean;
|
|
115
|
+
}[]>;
|
|
116
|
+
changelogs: z.ZodEffects<z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
117
|
+
identifier: z.ZodString;
|
|
118
|
+
date: z.ZodDate;
|
|
119
|
+
changes: z.ZodArray<z.ZodString, "many">;
|
|
120
|
+
title: z.ZodString;
|
|
121
|
+
isPublic: z.ZodBoolean;
|
|
122
|
+
thumbnail: z.ZodNullable<z.ZodString>;
|
|
123
|
+
}, "strip", z.ZodTypeAny, {
|
|
124
|
+
date: Date;
|
|
125
|
+
title: string;
|
|
126
|
+
thumbnail: string | null;
|
|
127
|
+
identifier: string;
|
|
128
|
+
isPublic: boolean;
|
|
129
|
+
changes: string[];
|
|
130
|
+
}, {
|
|
131
|
+
date: Date;
|
|
132
|
+
title: string;
|
|
133
|
+
thumbnail: string | null;
|
|
134
|
+
identifier: string;
|
|
135
|
+
isPublic: boolean;
|
|
136
|
+
changes: string[];
|
|
137
|
+
}>>, "many">, {
|
|
138
|
+
date: Date;
|
|
139
|
+
title: string;
|
|
140
|
+
thumbnail: string | null;
|
|
141
|
+
identifier: string;
|
|
142
|
+
isPublic: boolean;
|
|
143
|
+
changes: string[];
|
|
144
|
+
}[], {
|
|
145
|
+
date: Date;
|
|
146
|
+
title: string;
|
|
147
|
+
thumbnail: string | null;
|
|
148
|
+
identifier: string;
|
|
149
|
+
isPublic: boolean;
|
|
150
|
+
changes: string[];
|
|
151
|
+
}[]>;
|
|
152
|
+
logRawDataFor: z.ZodEffects<z.ZodArray<z.ZodLazy<z.ZodObject<{
|
|
153
|
+
username: z.ZodString;
|
|
154
|
+
platform: z.ZodEnum<["kick", "twitch", "rumble", "tiktok", "youtube"]>;
|
|
155
|
+
}, "strip", z.ZodTypeAny, {
|
|
156
|
+
username: string;
|
|
157
|
+
platform: "kick" | "twitch" | "rumble" | "tiktok" | "youtube";
|
|
158
|
+
}, {
|
|
159
|
+
username: string;
|
|
160
|
+
platform: "kick" | "twitch" | "rumble" | "tiktok" | "youtube";
|
|
161
|
+
}>>, "many">, {
|
|
162
|
+
username: string;
|
|
163
|
+
platform: "kick" | "twitch" | "rumble" | "tiktok" | "youtube";
|
|
164
|
+
}[], {
|
|
165
|
+
username: string;
|
|
166
|
+
platform: "kick" | "twitch" | "rumble" | "tiktok" | "youtube";
|
|
167
|
+
}[]>;
|
|
168
|
+
}, "strip", z.ZodTypeAny, {
|
|
169
|
+
statusRoles: number | null;
|
|
170
|
+
faq: {
|
|
171
|
+
identifier: string;
|
|
172
|
+
question: string | null;
|
|
173
|
+
answer: string | null;
|
|
174
|
+
}[];
|
|
175
|
+
blogs: {
|
|
176
|
+
title: string;
|
|
177
|
+
content: string;
|
|
178
|
+
thumbnail: string | null;
|
|
179
|
+
authorIcon: string;
|
|
180
|
+
identifier: string;
|
|
181
|
+
isPinned: boolean;
|
|
182
|
+
views: number;
|
|
183
|
+
reactions: string[];
|
|
184
|
+
reactionsCount: number;
|
|
185
|
+
tags: string[];
|
|
186
|
+
authorName: string;
|
|
187
|
+
createdAt: Date;
|
|
188
|
+
lastEdited: Date;
|
|
189
|
+
isPublic: boolean;
|
|
190
|
+
}[];
|
|
191
|
+
changelogs: {
|
|
192
|
+
date: Date;
|
|
193
|
+
title: string;
|
|
194
|
+
thumbnail: string | null;
|
|
195
|
+
identifier: string;
|
|
196
|
+
isPublic: boolean;
|
|
197
|
+
changes: string[];
|
|
198
|
+
}[];
|
|
199
|
+
logRawDataFor: {
|
|
200
|
+
username: string;
|
|
201
|
+
platform: "kick" | "twitch" | "rumble" | "tiktok" | "youtube";
|
|
202
|
+
}[];
|
|
203
|
+
clientId: string;
|
|
204
|
+
totalGiveaways: number | null;
|
|
205
|
+
totalNotifications: number | null;
|
|
206
|
+
statChannels: number | null;
|
|
207
|
+
totalClips: number | null;
|
|
208
|
+
totalVods: number | null;
|
|
209
|
+
recentWhitelist: string[];
|
|
210
|
+
dashWhitelist: string[];
|
|
211
|
+
staff: string[];
|
|
212
|
+
}, {
|
|
213
|
+
statusRoles: number | null;
|
|
214
|
+
faq: {
|
|
215
|
+
identifier: string;
|
|
216
|
+
question: string | null;
|
|
217
|
+
answer: string | null;
|
|
218
|
+
}[];
|
|
219
|
+
blogs: {
|
|
220
|
+
title: string;
|
|
221
|
+
content: string;
|
|
222
|
+
thumbnail: string | null;
|
|
223
|
+
authorIcon: string;
|
|
224
|
+
identifier: string;
|
|
225
|
+
isPinned: boolean;
|
|
226
|
+
views: number;
|
|
227
|
+
reactions: string[];
|
|
228
|
+
reactionsCount: number;
|
|
229
|
+
tags: string[];
|
|
230
|
+
authorName: string;
|
|
231
|
+
createdAt: Date;
|
|
232
|
+
lastEdited: Date;
|
|
233
|
+
isPublic: boolean;
|
|
234
|
+
}[];
|
|
235
|
+
changelogs: {
|
|
236
|
+
date: Date;
|
|
237
|
+
title: string;
|
|
238
|
+
thumbnail: string | null;
|
|
239
|
+
identifier: string;
|
|
240
|
+
isPublic: boolean;
|
|
241
|
+
changes: string[];
|
|
242
|
+
}[];
|
|
243
|
+
logRawDataFor: {
|
|
244
|
+
username: string;
|
|
245
|
+
platform: "kick" | "twitch" | "rumble" | "tiktok" | "youtube";
|
|
246
|
+
}[];
|
|
247
|
+
clientId: string;
|
|
248
|
+
totalGiveaways: number | null;
|
|
249
|
+
totalNotifications: number | null;
|
|
250
|
+
statChannels: number | null;
|
|
251
|
+
totalClips: number | null;
|
|
252
|
+
totalVods: number | null;
|
|
253
|
+
recentWhitelist: string[];
|
|
254
|
+
dashWhitelist: string[];
|
|
255
|
+
staff: string[];
|
|
256
|
+
}>;
|
|
257
|
+
readonly ClientFAQSchema: z.ZodObject<{
|
|
258
|
+
identifier: z.ZodString;
|
|
259
|
+
question: z.ZodNullable<z.ZodString>;
|
|
260
|
+
answer: z.ZodNullable<z.ZodString>;
|
|
261
|
+
}, "strip", z.ZodTypeAny, {
|
|
262
|
+
identifier: string;
|
|
263
|
+
question: string | null;
|
|
264
|
+
answer: string | null;
|
|
265
|
+
}, {
|
|
266
|
+
identifier: string;
|
|
267
|
+
question: string | null;
|
|
268
|
+
answer: string | null;
|
|
269
|
+
}>;
|
|
270
|
+
readonly ClientChangelogSchema: z.ZodObject<{
|
|
271
|
+
identifier: z.ZodString;
|
|
272
|
+
date: z.ZodDate;
|
|
273
|
+
changes: z.ZodArray<z.ZodString, "many">;
|
|
274
|
+
title: z.ZodString;
|
|
275
|
+
isPublic: z.ZodBoolean;
|
|
276
|
+
thumbnail: z.ZodNullable<z.ZodString>;
|
|
277
|
+
}, "strip", z.ZodTypeAny, {
|
|
278
|
+
date: Date;
|
|
279
|
+
title: string;
|
|
280
|
+
thumbnail: string | null;
|
|
281
|
+
identifier: string;
|
|
282
|
+
isPublic: boolean;
|
|
283
|
+
changes: string[];
|
|
284
|
+
}, {
|
|
285
|
+
date: Date;
|
|
286
|
+
title: string;
|
|
287
|
+
thumbnail: string | null;
|
|
288
|
+
identifier: string;
|
|
289
|
+
isPublic: boolean;
|
|
290
|
+
changes: string[];
|
|
291
|
+
}>;
|
|
292
|
+
readonly ClientBlogSchema: z.ZodObject<{
|
|
293
|
+
identifier: z.ZodString;
|
|
294
|
+
title: z.ZodString;
|
|
295
|
+
isPinned: z.ZodBoolean;
|
|
296
|
+
tags: z.ZodArray<z.ZodString, "many">;
|
|
297
|
+
content: z.ZodString;
|
|
298
|
+
thumbnail: z.ZodNullable<z.ZodString>;
|
|
299
|
+
authorName: z.ZodString;
|
|
300
|
+
authorIcon: z.ZodString;
|
|
301
|
+
createdAt: z.ZodDate;
|
|
302
|
+
lastEdited: z.ZodDate;
|
|
303
|
+
views: z.ZodNumber;
|
|
304
|
+
reactions: z.ZodEffects<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">, string[], string[]>;
|
|
305
|
+
reactionsCount: z.ZodNumber;
|
|
306
|
+
isPublic: z.ZodBoolean;
|
|
307
|
+
}, "strip", z.ZodTypeAny, {
|
|
308
|
+
title: string;
|
|
309
|
+
content: string;
|
|
310
|
+
thumbnail: string | null;
|
|
311
|
+
authorIcon: string;
|
|
312
|
+
identifier: string;
|
|
313
|
+
isPinned: boolean;
|
|
314
|
+
views: number;
|
|
315
|
+
reactions: string[];
|
|
316
|
+
reactionsCount: number;
|
|
317
|
+
tags: string[];
|
|
318
|
+
authorName: string;
|
|
319
|
+
createdAt: Date;
|
|
320
|
+
lastEdited: Date;
|
|
321
|
+
isPublic: boolean;
|
|
322
|
+
}, {
|
|
323
|
+
title: string;
|
|
324
|
+
content: string;
|
|
325
|
+
thumbnail: string | null;
|
|
326
|
+
authorIcon: string;
|
|
327
|
+
identifier: string;
|
|
328
|
+
isPinned: boolean;
|
|
329
|
+
views: number;
|
|
330
|
+
reactions: string[];
|
|
331
|
+
reactionsCount: number;
|
|
332
|
+
tags: string[];
|
|
333
|
+
authorName: string;
|
|
334
|
+
createdAt: Date;
|
|
335
|
+
lastEdited: Date;
|
|
336
|
+
isPublic: boolean;
|
|
337
|
+
}>;
|
|
338
|
+
readonly ClientLogRawDataSchema: z.ZodObject<{
|
|
339
|
+
username: z.ZodString;
|
|
340
|
+
platform: z.ZodEnum<["kick", "twitch", "rumble", "tiktok", "youtube"]>;
|
|
341
|
+
}, "strip", z.ZodTypeAny, {
|
|
342
|
+
username: string;
|
|
343
|
+
platform: "kick" | "twitch" | "rumble" | "tiktok" | "youtube";
|
|
344
|
+
}, {
|
|
345
|
+
username: string;
|
|
346
|
+
platform: "kick" | "twitch" | "rumble" | "tiktok" | "youtube";
|
|
347
|
+
}>;
|
|
348
|
+
};
|
|
349
|
+
export declare const ClientZodPartial: PartialZodObject<typeof ClientZod>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClientZodPartial = exports.ClientZod = void 0;
|
|
4
|
+
const schema_zod_1 = require("./schema.zod");
|
|
5
|
+
const zod_1 = require("./zod");
|
|
6
|
+
const zod_2 = require("zod");
|
|
7
|
+
const ClientSchema = zod_2.z.object({
|
|
8
|
+
clientId: zod_1.SnowFlake,
|
|
9
|
+
totalGiveaways: zod_2.z.number().nullable(),
|
|
10
|
+
totalNotifications: zod_2.z.number().nullable(),
|
|
11
|
+
statChannels: zod_2.z.number().nullable(),
|
|
12
|
+
statusRoles: zod_2.z.number().nullable(),
|
|
13
|
+
totalClips: zod_2.z.number().nullable(),
|
|
14
|
+
totalVods: zod_2.z.number().nullable(),
|
|
15
|
+
recentWhitelist: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_2.z.string())),
|
|
16
|
+
dashWhitelist: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_2.z.string())),
|
|
17
|
+
staff: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_2.z.string())),
|
|
18
|
+
faq: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_2.z.lazy(() => ClientFAQSchema)), ['identifier']),
|
|
19
|
+
blogs: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_2.z.lazy(() => ClientBlogSchema)), ['identifier']),
|
|
20
|
+
changelogs: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_2.z.lazy(() => ClientChangelogSchema)), ['identifier']),
|
|
21
|
+
logRawDataFor: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_2.z.lazy(() => ClientLogRawDataSchema)), ['username']),
|
|
22
|
+
});
|
|
23
|
+
const ClientFAQSchema = zod_2.z.object({
|
|
24
|
+
identifier: zod_2.z.string(),
|
|
25
|
+
question: zod_2.z.string().nullable(),
|
|
26
|
+
answer: zod_2.z.string().nullable(),
|
|
27
|
+
});
|
|
28
|
+
const ClientChangelogSchema = zod_2.z.object({
|
|
29
|
+
identifier: zod_2.z.string(),
|
|
30
|
+
date: zod_2.z.date(),
|
|
31
|
+
changes: zod_2.z.array(zod_2.z.string()),
|
|
32
|
+
title: zod_2.z.string(),
|
|
33
|
+
isPublic: zod_2.z.boolean(),
|
|
34
|
+
thumbnail: zod_2.z.string().nullable(),
|
|
35
|
+
});
|
|
36
|
+
const ClientBlogSchema = zod_2.z.object({
|
|
37
|
+
identifier: zod_2.z.string(),
|
|
38
|
+
title: zod_2.z.string(),
|
|
39
|
+
isPinned: zod_2.z.boolean(),
|
|
40
|
+
tags: zod_2.z.array(zod_2.z.string()),
|
|
41
|
+
content: zod_2.z.string(),
|
|
42
|
+
thumbnail: zod_2.z.string().nullable(),
|
|
43
|
+
authorName: zod_2.z.string(),
|
|
44
|
+
authorIcon: zod_2.z.string(),
|
|
45
|
+
createdAt: zod_2.z.date(),
|
|
46
|
+
lastEdited: zod_2.z.date(),
|
|
47
|
+
views: zod_2.z.number(),
|
|
48
|
+
reactions: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_1.SnowFlake)),
|
|
49
|
+
reactionsCount: zod_2.z.number(),
|
|
50
|
+
isPublic: zod_2.z.boolean(),
|
|
51
|
+
});
|
|
52
|
+
const ClientLogRawDataSchema = zod_2.z.object({
|
|
53
|
+
username: zod_2.z.string(),
|
|
54
|
+
platform: schema_zod_1.PlatformEnum,
|
|
55
|
+
});
|
|
56
|
+
exports.ClientZod = {
|
|
57
|
+
ClientSchema,
|
|
58
|
+
ClientFAQSchema,
|
|
59
|
+
ClientChangelogSchema,
|
|
60
|
+
ClientBlogSchema,
|
|
61
|
+
ClientLogRawDataSchema,
|
|
62
|
+
};
|
|
63
|
+
exports.ClientZodPartial = Object.fromEntries(Object.entries(exports.ClientZod).map(([key, value]) => [key, (0, schema_zod_1.deepPartialify)(value)]));
|
|
@@ -0,0 +1,16 @@
|
|
|
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], DropsRelations>>;
|
|
6
|
+
export type DropsRelations = 'db' | 'game' | 'sentDrops' | 'drops' | 'guildDropsGames' | 'webhook' | 'games' | 'guildDrops' | 'guildDropsGame';
|
|
7
|
+
export declare const DropsZod: {
|
|
8
|
+
readonly DropSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
9
|
+
readonly DropGameSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
10
|
+
readonly GuildDropsSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
11
|
+
readonly GuildDropsWebhookSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
12
|
+
readonly GuildDropsGameSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
13
|
+
readonly GuildDropsGameWebhookSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
14
|
+
readonly SentDropSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
15
|
+
};
|
|
16
|
+
export declare const DropsZodPartial: PartialZodObject<typeof DropsZod>;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DropsZodPartial = exports.DropsZod = void 0;
|
|
4
|
+
const schema_zod_1 = require("./schema.zod");
|
|
5
|
+
const zod_1 = require("./zod");
|
|
6
|
+
const zod_2 = require("zod");
|
|
7
|
+
const DropSchema = zod_2.z.object({
|
|
8
|
+
dropId: zod_2.z.string(),
|
|
9
|
+
platform: schema_zod_1.PlatformEnum,
|
|
10
|
+
name: zod_2.z.string(),
|
|
11
|
+
description: zod_2.z.string().nullable(),
|
|
12
|
+
imageUrl: zod_2.z.string().nullable(),
|
|
13
|
+
url: zod_2.z.string().nullable(),
|
|
14
|
+
startsAt: zod_2.z.date(),
|
|
15
|
+
endsAt: zod_2.z.date(),
|
|
16
|
+
status: zod_2.z.string(),
|
|
17
|
+
organizationId: zod_2.z.string().nullable(),
|
|
18
|
+
organizationName: zod_2.z.string().nullable(),
|
|
19
|
+
organizationUrl: zod_2.z.string().nullable(),
|
|
20
|
+
gameId: zod_2.z.string().nullable(),
|
|
21
|
+
game: zod_2.z.lazy(() => DropGameSchema).nullable(),
|
|
22
|
+
platformData: zod_2.z.any().nullable(),
|
|
23
|
+
sentDrops: zod_2.z.array(zod_2.z.lazy(() => SentDropSchema)),
|
|
24
|
+
createdAt: zod_2.z.date(),
|
|
25
|
+
updatedAt: zod_2.z.date(),
|
|
26
|
+
});
|
|
27
|
+
const DropGameSchema = zod_2.z.object({
|
|
28
|
+
gameId: zod_2.z.string(),
|
|
29
|
+
platform: schema_zod_1.PlatformEnum,
|
|
30
|
+
name: zod_2.z.string(),
|
|
31
|
+
slug: zod_2.z.string().nullable(),
|
|
32
|
+
imageUrl: zod_2.z.string().url().nullable(),
|
|
33
|
+
description: zod_2.z.string().max(2000).nullable(),
|
|
34
|
+
platformData: zod_2.z.any().nullable(),
|
|
35
|
+
createdAt: zod_2.z.date(),
|
|
36
|
+
updatedAt: zod_2.z.date(),
|
|
37
|
+
drops: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_2.z.lazy(() => DropSchema))),
|
|
38
|
+
guildDropsGames: (0, zod_1.NoDuplicate)(zod_2.z.array(zod_2.z.lazy(() => GuildDropsGameSchema))),
|
|
39
|
+
});
|
|
40
|
+
const GuildDropsSchema = zod_2.z.object({
|
|
41
|
+
guildId: zod_2.z.string(),
|
|
42
|
+
kickEnabled: zod_2.z.boolean(),
|
|
43
|
+
twitchEnabled: zod_2.z.boolean(),
|
|
44
|
+
liveNotifications: zod_2.z.boolean(),
|
|
45
|
+
channelId: zod_2.z.string().nullable(),
|
|
46
|
+
roleId: zod_2.z.string().nullable(),
|
|
47
|
+
games: zod_2.z.array(zod_2.z.lazy(() => GuildDropsGameSchema)),
|
|
48
|
+
webhook: zod_2.z.lazy(() => GuildDropsWebhookSchema).nullable(),
|
|
49
|
+
createdAt: zod_2.z.date(),
|
|
50
|
+
updatedAt: zod_2.z.date(),
|
|
51
|
+
});
|
|
52
|
+
const GuildDropsWebhookSchema = zod_2.z.object({
|
|
53
|
+
avatarUrl: zod_2.z.string().url().nullable(),
|
|
54
|
+
username: zod_2.z.string().nullable(),
|
|
55
|
+
guildDropsId: zod_2.z.string(),
|
|
56
|
+
guildDrops: zod_2.z.lazy(() => GuildDropsSchema).nullable(),
|
|
57
|
+
});
|
|
58
|
+
const GuildDropsGameSchema = zod_2.z.object({
|
|
59
|
+
gameId: zod_2.z.string(),
|
|
60
|
+
game: zod_2.z.lazy(() => DropGameSchema).nullable(),
|
|
61
|
+
guildDropsId: zod_2.z.string(),
|
|
62
|
+
guildDrops: zod_2.z.lazy(() => GuildDropsSchema),
|
|
63
|
+
channelId: zod_1.SnowFlake.nullable(),
|
|
64
|
+
roleId: zod_1.SnowFlakeOrEveryone.nullable(),
|
|
65
|
+
liveNotifications: zod_2.z.boolean().nullable(),
|
|
66
|
+
webhook: zod_2.z.lazy(() => GuildDropsGameWebhookSchema).nullable(),
|
|
67
|
+
createdAt: zod_2.z.date(),
|
|
68
|
+
});
|
|
69
|
+
const GuildDropsGameWebhookSchema = zod_2.z.object({
|
|
70
|
+
avatarUrl: zod_2.z.string().url().nullable(),
|
|
71
|
+
username: zod_2.z.string().nullable(),
|
|
72
|
+
guildDropsGameId: zod_2.z.string(),
|
|
73
|
+
guildDropsGame: zod_2.z.lazy(() => GuildDropsGameSchema).nullable(),
|
|
74
|
+
});
|
|
75
|
+
const SentDropSchema = zod_2.z.object({
|
|
76
|
+
dropId: zod_2.z.string(),
|
|
77
|
+
drop: zod_2.z.lazy(() => DropSchema).nullable(),
|
|
78
|
+
guildId: zod_1.SnowFlake,
|
|
79
|
+
platform: schema_zod_1.PlatformEnum,
|
|
80
|
+
channelId: zod_1.SnowFlake.nullable(),
|
|
81
|
+
messageId: zod_1.SnowFlake.nullable(),
|
|
82
|
+
sentAt: zod_2.z.date(),
|
|
83
|
+
});
|
|
84
|
+
exports.DropsZod = {
|
|
85
|
+
DropSchema,
|
|
86
|
+
DropGameSchema,
|
|
87
|
+
GuildDropsSchema,
|
|
88
|
+
GuildDropsWebhookSchema,
|
|
89
|
+
GuildDropsGameSchema,
|
|
90
|
+
GuildDropsGameWebhookSchema,
|
|
91
|
+
SentDropSchema,
|
|
92
|
+
};
|
|
93
|
+
exports.DropsZodPartial = Object.fromEntries(Object.entries(exports.DropsZod).map(([key, value]) => [key, (0, schema_zod_1.deepPartialify)(value)]));
|