@pluto-khronos/types 0.1.2 → 0.2.1
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/schemas/betting.d.ts +1 -9
- package/dist/schemas/channels.d.ts +129 -1093
- package/dist/schemas/channels.js +132 -26
- package/dist/schemas/colors.d.ts +33 -1
- package/dist/schemas/guilds.d.ts +2 -14
- package/dist/schemas/match-metadata.d.ts +4 -46
- package/dist/schemas/shared.d.ts +1 -7
- package/dist/schemas/sports.d.ts +8 -31
- package/dist/schemas/teams.d.ts +2 -14
- package/package.json +12 -12
- package/dist/types.d.ts +0 -1
- package/dist/types.js +0 -2
package/dist/schemas/channels.js
CHANGED
|
@@ -19,9 +19,15 @@ const teams_1 = require("./teams");
|
|
|
19
19
|
*/
|
|
20
20
|
exports.channelDeletionJobSchema = zod_1.z
|
|
21
21
|
.object({
|
|
22
|
-
channelName: zod_1.z
|
|
22
|
+
channelName: zod_1.z
|
|
23
|
+
.string({
|
|
24
|
+
error: (issue) => issue.input === undefined
|
|
25
|
+
? { message: 'Channel name is required.' }
|
|
26
|
+
: { message: 'Channel name must be a string.' },
|
|
27
|
+
})
|
|
28
|
+
.describe('Name of the channel to be deleted'),
|
|
23
29
|
jobId: zod_1.z
|
|
24
|
-
.string()
|
|
30
|
+
.string({ error: 'Job ID must be a string if provided.' })
|
|
25
31
|
.optional()
|
|
26
32
|
.describe('Optional unique identifier for the deletion job'),
|
|
27
33
|
})
|
|
@@ -33,10 +39,23 @@ exports.channelDeletionJobSchema = zod_1.z
|
|
|
33
39
|
exports.channelDeletionResultSchema = zod_1.z
|
|
34
40
|
.object({
|
|
35
41
|
success: zod_1.z
|
|
36
|
-
.boolean(
|
|
42
|
+
.boolean({
|
|
43
|
+
error: (issue) => issue.input === undefined
|
|
44
|
+
? { message: 'Success status is required.' }
|
|
45
|
+
: { message: 'Success status must be a boolean.' },
|
|
46
|
+
})
|
|
37
47
|
.describe('Whether the deletion operation was successful'),
|
|
38
|
-
channelName: zod_1.z
|
|
39
|
-
|
|
48
|
+
channelName: zod_1.z
|
|
49
|
+
.string({
|
|
50
|
+
error: (issue) => issue.input === undefined
|
|
51
|
+
? { message: 'Channel name is required.' }
|
|
52
|
+
: { message: 'Channel name must be a string.' },
|
|
53
|
+
})
|
|
54
|
+
.describe('Name of the channel that was processed'),
|
|
55
|
+
error: zod_1.z
|
|
56
|
+
.string({ error: 'Error message must be a string if present.' })
|
|
57
|
+
.optional()
|
|
58
|
+
.describe('Error message if deletion failed'),
|
|
40
59
|
})
|
|
41
60
|
.describe('BullMQ Schema structure for channel deletion results');
|
|
42
61
|
/**
|
|
@@ -46,15 +65,27 @@ exports.channelDeletionResultSchema = zod_1.z
|
|
|
46
65
|
exports.channelDeletionEventSchema = zod_1.z
|
|
47
66
|
.object({
|
|
48
67
|
channelIds: zod_1.z
|
|
49
|
-
.array(zod_1.z.string()
|
|
68
|
+
.array(zod_1.z.string({ error: 'Each channel ID in the array must be a string.' }), {
|
|
69
|
+
error: (issue) => issue.input === undefined
|
|
70
|
+
? { message: 'An array of channel IDs is required.' }
|
|
71
|
+
: { message: 'Channel IDs must be provided as an array.' },
|
|
72
|
+
})
|
|
50
73
|
.describe('Array of channel IDs to be deleted from Discord'),
|
|
51
74
|
metadata: zod_1.z
|
|
52
75
|
.object({
|
|
53
76
|
publishedAt: zod_1.z
|
|
54
|
-
.date(
|
|
77
|
+
.date({
|
|
78
|
+
error: (issue) => issue.input === undefined
|
|
79
|
+
? { message: 'Published timestamp is required.' }
|
|
80
|
+
: { message: 'Published at must be a valid date.' },
|
|
81
|
+
})
|
|
55
82
|
.describe('Timestamp when the deletion event was published'),
|
|
56
83
|
eventId: zod_1.z
|
|
57
|
-
.string(
|
|
84
|
+
.string({
|
|
85
|
+
error: (issue) => issue.input === undefined
|
|
86
|
+
? { message: 'Event ID is required.' }
|
|
87
|
+
: { message: 'Event ID must be a string.' },
|
|
88
|
+
})
|
|
58
89
|
.describe('Unique identifier for tracking the deletion event'),
|
|
59
90
|
})
|
|
60
91
|
.describe('Metadata associated with the channel deletion event'),
|
|
@@ -66,13 +97,35 @@ exports.channelDeletionEventSchema = zod_1.z
|
|
|
66
97
|
*/
|
|
67
98
|
exports.channelAggregatedSchema = zod_1.z
|
|
68
99
|
.object({
|
|
69
|
-
id: zod_1.z
|
|
100
|
+
id: zod_1.z
|
|
101
|
+
.string({
|
|
102
|
+
error: (issue) => issue.input === undefined
|
|
103
|
+
? { message: 'Channel ID is required.' }
|
|
104
|
+
: { message: 'Channel ID must be a string.' },
|
|
105
|
+
})
|
|
106
|
+
.describe('Unique identifier for the channel'),
|
|
70
107
|
sport: sports_1.sportsServingSchema,
|
|
71
108
|
created: zod_1.z
|
|
72
|
-
.boolean(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
109
|
+
.boolean({
|
|
110
|
+
error: (issue) => issue.input === undefined
|
|
111
|
+
? { message: 'Creation status is required.' }
|
|
112
|
+
: { message: 'Creation status must be a boolean.' },
|
|
113
|
+
})
|
|
114
|
+
.describe('Whether the channel has been created in Discord [DEPRECATED FLAG]'),
|
|
115
|
+
gametime: zod_1.z
|
|
116
|
+
.date({
|
|
117
|
+
error: (issue) => issue.input === undefined
|
|
118
|
+
? { message: 'Game time is required.' }
|
|
119
|
+
: { message: 'Game time must be a valid date.' },
|
|
120
|
+
})
|
|
121
|
+
.describe('Scheduled time for the game/match'),
|
|
122
|
+
channelname: zod_1.z
|
|
123
|
+
.string({
|
|
124
|
+
error: (issue) => issue.input === undefined
|
|
125
|
+
? { message: 'Channel name is required.' }
|
|
126
|
+
: { message: 'Channel name must be a string.' },
|
|
127
|
+
})
|
|
128
|
+
.describe('Name of the Discord channel'),
|
|
76
129
|
matchOdds: betting_1.matchOddsSchema,
|
|
77
130
|
...teams_1.matchTeamsSchema.shape,
|
|
78
131
|
metadata: match_metadata_1.matchMetadataSchema.optional(),
|
|
@@ -84,18 +137,56 @@ exports.channelAggregatedSchema = zod_1.z
|
|
|
84
137
|
*/
|
|
85
138
|
exports.matchEmbedDisplaySchema = zod_1.z
|
|
86
139
|
.object({
|
|
87
|
-
favored: zod_1.z
|
|
140
|
+
favored: zod_1.z
|
|
141
|
+
.string({
|
|
142
|
+
error: (issue) => issue.input === undefined
|
|
143
|
+
? { message: 'Favored team name is required.' }
|
|
144
|
+
: { message: 'Favored team name must be a string.' },
|
|
145
|
+
})
|
|
146
|
+
.describe('Team favored to win'),
|
|
88
147
|
favoredTeamClr: colors_1.colorResolvableSchema.describe('Color for the favored team'),
|
|
89
|
-
home_team: zod_1.z
|
|
148
|
+
home_team: zod_1.z
|
|
149
|
+
.string({
|
|
150
|
+
error: (issue) => issue.input === undefined
|
|
151
|
+
? { message: 'Home team name is required.' }
|
|
152
|
+
: { message: 'Home team name must be a string.' },
|
|
153
|
+
})
|
|
154
|
+
.describe('Full name of home team'),
|
|
90
155
|
homeTeamShortName: zod_1.z
|
|
91
|
-
.string(
|
|
156
|
+
.string({
|
|
157
|
+
error: (issue) => issue.input === undefined
|
|
158
|
+
? { message: 'Home team short name is required.' }
|
|
159
|
+
: { message: 'Home team short name must be a string.' },
|
|
160
|
+
})
|
|
92
161
|
.describe('Short name/abbreviation of home team'),
|
|
93
|
-
away_team: zod_1.z
|
|
162
|
+
away_team: zod_1.z
|
|
163
|
+
.string({
|
|
164
|
+
error: (issue) => issue.input === undefined
|
|
165
|
+
? { message: 'Away team name is required.' }
|
|
166
|
+
: { message: 'Away team name must be a string.' },
|
|
167
|
+
})
|
|
168
|
+
.describe('Full name of away team'),
|
|
94
169
|
awayTeamShortName: zod_1.z
|
|
95
|
-
.string(
|
|
170
|
+
.string({
|
|
171
|
+
error: (issue) => issue.input === undefined
|
|
172
|
+
? { message: 'Away team short name is required.' }
|
|
173
|
+
: { message: 'Away team short name must be a string.' },
|
|
174
|
+
})
|
|
96
175
|
.describe('Short name/abbreviation of away team'),
|
|
97
|
-
bettingChanId: zod_1.z
|
|
98
|
-
|
|
176
|
+
bettingChanId: zod_1.z
|
|
177
|
+
.string({
|
|
178
|
+
error: (issue) => issue.input === undefined
|
|
179
|
+
? { message: 'Betting channel ID is required.' }
|
|
180
|
+
: { message: 'Betting channel ID must be a string.' },
|
|
181
|
+
})
|
|
182
|
+
.describe('ID of the betting channel'),
|
|
183
|
+
header: zod_1.z
|
|
184
|
+
.string({
|
|
185
|
+
error: (issue) => issue.input === undefined
|
|
186
|
+
? { message: 'Embed header is required.' }
|
|
187
|
+
: { message: 'Embed header must be a string.' },
|
|
188
|
+
})
|
|
189
|
+
.describe('Header text for the match embed'),
|
|
99
190
|
sport: sports_1.sportsServingSchema.describe('Sport type for the match'),
|
|
100
191
|
records: sports_1.teamRecordsResultSchema
|
|
101
192
|
.nullable()
|
|
@@ -110,7 +201,11 @@ exports.matchEmbedDisplaySchema = zod_1.z
|
|
|
110
201
|
exports.channelEligibleGuildSchema = guilds_1.guildConfigSchema
|
|
111
202
|
.extend({
|
|
112
203
|
eligibleMatches: zod_1.z
|
|
113
|
-
.array(zod_1.z.string()
|
|
204
|
+
.array(zod_1.z.string({ error: 'Each match ID must be a string.' }), {
|
|
205
|
+
error: (issue) => issue.input === undefined
|
|
206
|
+
? { message: 'Eligible matches array is required.' }
|
|
207
|
+
: { message: 'Eligible matches must be an array.' },
|
|
208
|
+
})
|
|
114
209
|
.describe('List of match IDs eligible for channel creation'),
|
|
115
210
|
})
|
|
116
211
|
.describe('Guild data for channel creation eligibility');
|
|
@@ -122,7 +217,7 @@ exports.channelCreationEventSchema = zod_1.z
|
|
|
122
217
|
.object({
|
|
123
218
|
channel: exports.channelAggregatedSchema,
|
|
124
219
|
guild: exports.channelEligibleGuildSchema,
|
|
125
|
-
metadata: shared_1.bullMqMetadataSchema,
|
|
220
|
+
metadata: shared_1.bullMqMetadataSchema.optional(),
|
|
126
221
|
})
|
|
127
222
|
.describe('Event data for channel creation operations');
|
|
128
223
|
/**
|
|
@@ -132,10 +227,18 @@ exports.channelCreationEventSchema = zod_1.z
|
|
|
132
227
|
exports.incomingChannelDataSchema = zod_1.z
|
|
133
228
|
.object({
|
|
134
229
|
channels: zod_1.z
|
|
135
|
-
.array(exports.channelAggregatedSchema
|
|
230
|
+
.array(exports.channelAggregatedSchema, {
|
|
231
|
+
error: (issue) => issue.input === undefined
|
|
232
|
+
? { message: 'Channels array is required.' }
|
|
233
|
+
: { message: 'Channels must be an array.' },
|
|
234
|
+
})
|
|
136
235
|
.describe('Array of channel data'),
|
|
137
236
|
guilds: zod_1.z
|
|
138
|
-
.array(exports.channelEligibleGuildSchema
|
|
237
|
+
.array(exports.channelEligibleGuildSchema, {
|
|
238
|
+
error: (issue) => issue.input === undefined
|
|
239
|
+
? { message: 'Guilds array is required.' }
|
|
240
|
+
: { message: 'Guilds must be an array.' },
|
|
241
|
+
})
|
|
139
242
|
.describe('Array of eligible guild data'),
|
|
140
243
|
})
|
|
141
244
|
.describe('Schema for Pluto to process channel creation events');
|
|
@@ -153,7 +256,10 @@ exports.ChannelWithGuildAggregatedSchema = zod_1.z
|
|
|
153
256
|
exports.channelEmbedPayloadSchema = exports.ChannelWithGuildAggregatedSchema.extend({
|
|
154
257
|
metadata: zod_1.z.object({
|
|
155
258
|
favoredTeamInfo: zod_1.z.custom().describe('Resolved team information'),
|
|
156
|
-
matchImg: zod_1.z
|
|
259
|
+
matchImg: zod_1.z
|
|
260
|
+
.instanceof(Buffer, { message: 'Match image must be a Buffer.' })
|
|
261
|
+
.nullable()
|
|
262
|
+
.describe('Match image buffer'),
|
|
157
263
|
...match_metadata_1.matchMetadataSchema.shape,
|
|
158
|
-
}),
|
|
264
|
+
}, { error: 'Invalid Channel Embed Payload metadata received' }),
|
|
159
265
|
}).describe('Data required to create a channel and send an embed');
|
package/dist/schemas/colors.d.ts
CHANGED
|
@@ -7,7 +7,39 @@ import { z } from 'zod';
|
|
|
7
7
|
* Schema for Discord.js color values, supporting hex, integer, and named colors
|
|
8
8
|
* @group Colors
|
|
9
9
|
*/
|
|
10
|
-
export declare const colorResolvableSchema: z.
|
|
10
|
+
export declare const colorResolvableSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodEnum<{
|
|
11
|
+
DEFAULT: "DEFAULT";
|
|
12
|
+
WHITE: "WHITE";
|
|
13
|
+
AQUA: "AQUA";
|
|
14
|
+
GREEN: "GREEN";
|
|
15
|
+
BLUE: "BLUE";
|
|
16
|
+
YELLOW: "YELLOW";
|
|
17
|
+
PURPLE: "PURPLE";
|
|
18
|
+
LUMINOUS_VIVID_PINK: "LUMINOUS_VIVID_PINK";
|
|
19
|
+
FUCHSIA: "FUCHSIA";
|
|
20
|
+
GOLD: "GOLD";
|
|
21
|
+
ORANGE: "ORANGE";
|
|
22
|
+
RED: "RED";
|
|
23
|
+
GREY: "GREY";
|
|
24
|
+
NAVY: "NAVY";
|
|
25
|
+
DARK_AQUA: "DARK_AQUA";
|
|
26
|
+
DARK_GREEN: "DARK_GREEN";
|
|
27
|
+
DARK_BLUE: "DARK_BLUE";
|
|
28
|
+
DARK_PURPLE: "DARK_PURPLE";
|
|
29
|
+
DARK_VIVID_PINK: "DARK_VIVID_PINK";
|
|
30
|
+
DARK_GOLD: "DARK_GOLD";
|
|
31
|
+
DARK_ORANGE: "DARK_ORANGE";
|
|
32
|
+
DARK_RED: "DARK_RED";
|
|
33
|
+
DARK_GREY: "DARK_GREY";
|
|
34
|
+
DARKER_GREY: "DARKER_GREY";
|
|
35
|
+
LIGHT_GREY: "LIGHT_GREY";
|
|
36
|
+
DARK_NAVY: "DARK_NAVY";
|
|
37
|
+
BLURPLE: "BLURPLE";
|
|
38
|
+
GREYPLE: "GREYPLE";
|
|
39
|
+
DARK_BUT_NOT_BLACK: "DARK_BUT_NOT_BLACK";
|
|
40
|
+
NOT_QUITE_BLACK: "NOT_QUITE_BLACK";
|
|
41
|
+
RANDOM: "RANDOM";
|
|
42
|
+
}>]>, z.ZodTransform<number | "Default" | "White" | "Aqua" | "Green" | "Blue" | "Yellow" | "Purple" | "LuminousVividPink" | "Fuchsia" | "Gold" | "Orange" | "Red" | "Grey" | "Navy" | "DarkAqua" | "DarkGreen" | "DarkBlue" | "DarkPurple" | "DarkVividPink" | "DarkGold" | "DarkOrange" | "DarkRed" | "DarkGrey" | "DarkerGrey" | "LightGrey" | "DarkNavy" | "Blurple" | "Greyple" | "DarkButNotBlack" | "NotQuiteBlack" | "Random" | readonly [red: number, green: number, blue: number] | `#${string}`, string | number>>;
|
|
11
43
|
/**
|
|
12
44
|
* Type representing a Discord.js color value
|
|
13
45
|
* Directly compatible with Discord.js ColorResolvable type when discord.js is installed
|
package/dist/schemas/guilds.d.ts
CHANGED
|
@@ -11,21 +11,9 @@ export declare const guildConfigSchema: z.ZodObject<{
|
|
|
11
11
|
guildId: z.ZodString;
|
|
12
12
|
bettingChannelId: z.ZodString;
|
|
13
13
|
gameCategoryId: z.ZodString;
|
|
14
|
-
preferredTeams: z.ZodOptional<z.ZodArray<z.ZodString
|
|
14
|
+
preferredTeams: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
15
15
|
sport: z.ZodString;
|
|
16
|
-
},
|
|
17
|
-
guildId: string;
|
|
18
|
-
bettingChannelId: string;
|
|
19
|
-
gameCategoryId: string;
|
|
20
|
-
sport: string;
|
|
21
|
-
preferredTeams?: string[] | undefined;
|
|
22
|
-
}, {
|
|
23
|
-
guildId: string;
|
|
24
|
-
bettingChannelId: string;
|
|
25
|
-
gameCategoryId: string;
|
|
26
|
-
sport: string;
|
|
27
|
-
preferredTeams?: string[] | undefined;
|
|
28
|
-
}>;
|
|
16
|
+
}, z.core.$strip>;
|
|
29
17
|
/**
|
|
30
18
|
* Type representing base guild configuration
|
|
31
19
|
* @group Guilds
|
|
@@ -12,52 +12,10 @@ export declare const matchMetadataSchema: z.ZodObject<{
|
|
|
12
12
|
records: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
13
13
|
home_team: z.ZodObject<{
|
|
14
14
|
total_record: z.ZodString;
|
|
15
|
-
},
|
|
16
|
-
total_record: string;
|
|
17
|
-
}, {
|
|
18
|
-
total_record: string;
|
|
19
|
-
}>;
|
|
15
|
+
}, z.core.$strip>;
|
|
20
16
|
away_team: z.ZodObject<{
|
|
21
17
|
total_record: z.ZodString;
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
total_record: string;
|
|
26
|
-
}>;
|
|
27
|
-
}, "strip", z.ZodTypeAny, {
|
|
28
|
-
home_team: {
|
|
29
|
-
total_record: string;
|
|
30
|
-
};
|
|
31
|
-
away_team: {
|
|
32
|
-
total_record: string;
|
|
33
|
-
};
|
|
34
|
-
}, {
|
|
35
|
-
home_team: {
|
|
36
|
-
total_record: string;
|
|
37
|
-
};
|
|
38
|
-
away_team: {
|
|
39
|
-
total_record: string;
|
|
40
|
-
};
|
|
41
|
-
}>>>;
|
|
42
|
-
}, "strip", z.ZodTypeAny, {
|
|
43
|
-
headline?: string | null | undefined;
|
|
44
|
-
records?: {
|
|
45
|
-
home_team: {
|
|
46
|
-
total_record: string;
|
|
47
|
-
};
|
|
48
|
-
away_team: {
|
|
49
|
-
total_record: string;
|
|
50
|
-
};
|
|
51
|
-
} | null | undefined;
|
|
52
|
-
}, {
|
|
53
|
-
headline?: string | null | undefined;
|
|
54
|
-
records?: {
|
|
55
|
-
home_team: {
|
|
56
|
-
total_record: string;
|
|
57
|
-
};
|
|
58
|
-
away_team: {
|
|
59
|
-
total_record: string;
|
|
60
|
-
};
|
|
61
|
-
} | null | undefined;
|
|
62
|
-
}>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
}, z.core.$strip>>>;
|
|
20
|
+
}, z.core.$strip>;
|
|
63
21
|
export type MatchMetadata = z.infer<typeof matchMetadataSchema>;
|
package/dist/schemas/shared.d.ts
CHANGED
|
@@ -10,13 +10,7 @@ import { z } from 'zod';
|
|
|
10
10
|
export declare const bullMqMetadataSchema: z.ZodObject<{
|
|
11
11
|
publishedAt: z.ZodDate;
|
|
12
12
|
eventId: z.ZodString;
|
|
13
|
-
},
|
|
14
|
-
publishedAt: Date;
|
|
15
|
-
eventId: string;
|
|
16
|
-
}, {
|
|
17
|
-
publishedAt: Date;
|
|
18
|
-
eventId: string;
|
|
19
|
-
}>;
|
|
13
|
+
}, z.core.$strip>;
|
|
20
14
|
/**
|
|
21
15
|
* Type representing BullMQ job metadata
|
|
22
16
|
* @group Queue
|
package/dist/schemas/sports.d.ts
CHANGED
|
@@ -15,18 +15,17 @@ export declare const SportsServing: {
|
|
|
15
15
|
* Schema for supported sports in the application
|
|
16
16
|
* @group Sports
|
|
17
17
|
*/
|
|
18
|
-
export declare const sportsServingSchema: z.ZodEnum<
|
|
18
|
+
export declare const sportsServingSchema: z.ZodEnum<{
|
|
19
|
+
nba: "nba";
|
|
20
|
+
nfl: "nfl";
|
|
21
|
+
}>;
|
|
19
22
|
/**
|
|
20
23
|
* Schema for a team's record information
|
|
21
24
|
* @group Sports
|
|
22
25
|
*/
|
|
23
26
|
export declare const teamRecordSchema: z.ZodObject<{
|
|
24
27
|
total_record: z.ZodString;
|
|
25
|
-
},
|
|
26
|
-
total_record: string;
|
|
27
|
-
}, {
|
|
28
|
-
total_record: string;
|
|
29
|
-
}>;
|
|
28
|
+
}, z.core.$strip>;
|
|
30
29
|
/**
|
|
31
30
|
* Schema for both teams' record information in a match
|
|
32
31
|
* @group Sports
|
|
@@ -34,33 +33,11 @@ export declare const teamRecordSchema: z.ZodObject<{
|
|
|
34
33
|
export declare const teamRecordsResultSchema: z.ZodObject<{
|
|
35
34
|
home_team: z.ZodObject<{
|
|
36
35
|
total_record: z.ZodString;
|
|
37
|
-
},
|
|
38
|
-
total_record: string;
|
|
39
|
-
}, {
|
|
40
|
-
total_record: string;
|
|
41
|
-
}>;
|
|
36
|
+
}, z.core.$strip>;
|
|
42
37
|
away_team: z.ZodObject<{
|
|
43
38
|
total_record: z.ZodString;
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
}, {
|
|
47
|
-
total_record: string;
|
|
48
|
-
}>;
|
|
49
|
-
}, "strip", z.ZodTypeAny, {
|
|
50
|
-
home_team: {
|
|
51
|
-
total_record: string;
|
|
52
|
-
};
|
|
53
|
-
away_team: {
|
|
54
|
-
total_record: string;
|
|
55
|
-
};
|
|
56
|
-
}, {
|
|
57
|
-
home_team: {
|
|
58
|
-
total_record: string;
|
|
59
|
-
};
|
|
60
|
-
away_team: {
|
|
61
|
-
total_record: string;
|
|
62
|
-
};
|
|
63
|
-
}>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
}, z.core.$strip>;
|
|
64
41
|
/**
|
|
65
42
|
* Type representing a team's record
|
|
66
43
|
* @group Sports
|
package/dist/schemas/teams.d.ts
CHANGED
|
@@ -10,13 +10,7 @@ import { z } from 'zod';
|
|
|
10
10
|
export declare const matchTeamsSchema: z.ZodObject<{
|
|
11
11
|
home_team: z.ZodString;
|
|
12
12
|
away_team: z.ZodString;
|
|
13
|
-
},
|
|
14
|
-
home_team: string;
|
|
15
|
-
away_team: string;
|
|
16
|
-
}, {
|
|
17
|
-
home_team: string;
|
|
18
|
-
away_team: string;
|
|
19
|
-
}>;
|
|
13
|
+
}, z.core.$strip>;
|
|
20
14
|
/**
|
|
21
15
|
* Schema for team abbreviations
|
|
22
16
|
* @group Teams
|
|
@@ -24,12 +18,6 @@ export declare const matchTeamsSchema: z.ZodObject<{
|
|
|
24
18
|
export declare const teamAbbreviationsSchema: z.ZodObject<{
|
|
25
19
|
homeTeamShortName: z.ZodString;
|
|
26
20
|
awayTeamShortName: z.ZodString;
|
|
27
|
-
},
|
|
28
|
-
homeTeamShortName: string;
|
|
29
|
-
awayTeamShortName: string;
|
|
30
|
-
}, {
|
|
31
|
-
homeTeamShortName: string;
|
|
32
|
-
awayTeamShortName: string;
|
|
33
|
-
}>;
|
|
21
|
+
}, z.core.$strip>;
|
|
34
22
|
export type MatchTeams = z.infer<typeof matchTeamsSchema>;
|
|
35
23
|
export type TeamAbbreviations = z.infer<typeof teamAbbreviationsSchema>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pluto-khronos/types",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Shared TypeScript types for Pluto & Khronos projects",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -26,20 +26,20 @@
|
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@biomejs/biome": "1.9.4",
|
|
29
|
-
"@types/bun": "^1.2.
|
|
30
|
-
"@types/node": "^22.
|
|
31
|
-
"discord.js": "^14.
|
|
32
|
-
"lefthook": "^1.
|
|
33
|
-
"typedoc": "^0.27.
|
|
34
|
-
"typedoc-plugin-markdown": "^4.
|
|
35
|
-
"typedoc-plugin-mdn-links": "^4.0.
|
|
36
|
-
"typedoc-plugin-zod": "^1.
|
|
37
|
-
"typedoc-theme-hierarchy": "^5.0.
|
|
38
|
-
"typescript": "^5.
|
|
29
|
+
"@types/bun": "^1.2.22",
|
|
30
|
+
"@types/node": "^22.18.5",
|
|
31
|
+
"discord.js": "^14.22.1",
|
|
32
|
+
"lefthook": "^1.13.1",
|
|
33
|
+
"typedoc": "^0.27.9",
|
|
34
|
+
"typedoc-plugin-markdown": "^4.8.1",
|
|
35
|
+
"typedoc-plugin-mdn-links": "^4.0.15",
|
|
36
|
+
"typedoc-plugin-zod": "^1.4.2",
|
|
37
|
+
"typedoc-theme-hierarchy": "^5.0.5",
|
|
38
|
+
"typescript": "^5.9.2"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"resolve-team": "^2.0.4",
|
|
42
|
-
"zod": "^
|
|
42
|
+
"zod": "^4.1.11"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"discord.js": "^14.0.0"
|
package/dist/types.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type ColorResolvable = `#${string}` | "DEFAULT" | "WHITE" | "AQUA" | "GREEN" | "BLUE" | "YELLOW" | "PURPLE" | "LUMINOUS_VIVID_PINK" | "FUCHSIA" | "GOLD" | "ORANGE" | "RED" | "GREY" | "NAVY" | "DARK_AQUA" | "DARK_GREEN" | "DARK_BLUE" | "DARK_PURPLE" | "DARK_VIVID_PINK" | "DARK_GOLD" | "DARK_ORANGE" | "DARK_RED" | "DARK_GREY" | "DARKER_GREY" | "LIGHT_GREY" | "DARK_NAVY" | "BLURPLE" | "GREYPLE" | "DARK_BUT_NOT_BLACK" | "NOT_QUITE_BLACK" | "RANDOM" | number;
|
package/dist/types.js
DELETED