abhi-medium-blog 1.0.0 → 1.0.3

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.
@@ -0,0 +1,23 @@
1
+ import z from "zod";
2
+ export declare const signupInput: z.ZodObject<{
3
+ email: z.ZodString;
4
+ password: z.ZodString;
5
+ name: z.ZodOptional<z.ZodString>;
6
+ }, z.core.$strip>;
7
+ export declare const signinInput: z.ZodObject<{
8
+ email: z.ZodString;
9
+ password: z.ZodString;
10
+ }, z.core.$strip>;
11
+ export declare const createBlogInput: z.ZodObject<{
12
+ title: z.ZodString;
13
+ content: z.ZodString;
14
+ }, z.core.$strip>;
15
+ export declare const editBlogInput: z.ZodObject<{
16
+ id: z.ZodString;
17
+ title: z.ZodString;
18
+ content: z.ZodString;
19
+ }, z.core.$strip>;
20
+ export type SignupInput = z.infer<typeof signupInput>;
21
+ export type SigninInput = z.infer<typeof signinInput>;
22
+ export type CreateBlogInput = z.infer<typeof createBlogInput>;
23
+ export type EditBlogInput = z.infer<typeof editBlogInput>;
package/dist/index.js CHANGED
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.editBlogInput = exports.createBlogInput = exports.signinInput = exports.signupInput = void 0;
7
7
  const zod_1 = __importDefault(require("zod"));
8
8
  exports.signupInput = zod_1.default.object({
9
- username: zod_1.default.string().email(),
9
+ email: zod_1.default.string().email(),
10
10
  password: zod_1.default.string().min(6),
11
- name: zod_1.default.string().optional()
11
+ name: zod_1.default.string().optional(),
12
12
  });
13
13
  exports.signinInput = zod_1.default.object({
14
- username: zod_1.default.string().email(),
14
+ email: zod_1.default.string().email(),
15
15
  password: zod_1.default.string().min(6),
16
16
  });
17
17
  exports.createBlogInput = zod_1.default.object({
@@ -19,7 +19,7 @@ exports.createBlogInput = zod_1.default.object({
19
19
  content: zod_1.default.string(),
20
20
  });
21
21
  exports.editBlogInput = zod_1.default.object({
22
+ id: zod_1.default.string(), // Prisma Post.id is a uuid string
22
23
  title: zod_1.default.string(),
23
24
  content: zod_1.default.string(),
24
- id: zod_1.default.number()
25
25
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abhi-medium-blog",
3
- "version": "1.0.0",
3
+ "version": "1.0.3",
4
4
  "description": "Medium-style blog backend built with Hono, Prisma, and Cloudflare Workers",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -22,7 +22,12 @@
22
22
  "type": "git",
23
23
  "url": "git+https://github.com/abhisek7154/The-Forgotten-Archive.git"
24
24
  },
25
- "keywords": ["cloudflare", "prisma", "hono", "blog"],
25
+ "keywords": [
26
+ "cloudflare",
27
+ "prisma",
28
+ "hono",
29
+ "blog"
30
+ ],
26
31
  "author": "Abhisek sahoo",
27
32
  "license": "ISC",
28
33
  "bugs": {