@jlandis1/guessphrase-shared 1.0.11 → 1.0.13
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/index.d.ts +4 -6
- package/dist/index.js +1 -0
- package/dist/src/phrase.js +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { TRegisterSchema, TLoginSchema } from './src/auth.js';
|
|
3
|
-
import { TPhraseSchema } from './src/phrase.js';
|
|
1
|
+
export type { ZodTypeAny } from 'zod';
|
|
4
2
|
export { registerSchema, loginSchema } from './src/auth.js';
|
|
5
|
-
export type {
|
|
6
|
-
export
|
|
7
|
-
export type { TPhraseSchema };
|
|
3
|
+
export type { TRegisterSchema, TLoginSchema } from './src/auth.js';
|
|
4
|
+
export { phraseSchema } from './src/phrase.js';
|
|
5
|
+
export type { TPhraseSchema } from './src/phrase.js';
|
package/dist/index.js
CHANGED
package/dist/src/phrase.js
CHANGED
|
@@ -3,8 +3,8 @@ export const phraseSchema = z.object({
|
|
|
3
3
|
phrase_id: z.number(),
|
|
4
4
|
phrase: z.string().min(1, 'Phrase is required').max(255, 'Phrase cannot be more than 255 characters'),
|
|
5
5
|
hint: z.string().max(255, 'Hint cannot be more than 255 characters').nullable(),
|
|
6
|
-
date: z.string().regex(
|
|
7
|
-
message: "Date must be in format
|
|
6
|
+
date: z.string().regex(/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/, {
|
|
7
|
+
message: "Date must be in format YYYY-MM-DD",
|
|
8
8
|
}),
|
|
9
9
|
from_user: z.string().nullable(),
|
|
10
10
|
to_user: z.string().nullable(),
|