@zyacreatives/shared 1.0.0 → 1.1.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.
Files changed (49) hide show
  1. package/dist/constants.d.ts +277 -0
  2. package/dist/constants.js +268 -0
  3. package/dist/index.d.ts +1 -1
  4. package/dist/index.js +17 -1
  5. package/dist/schemas/brand.d.ts +84 -0
  6. package/dist/schemas/brand.js +68 -0
  7. package/dist/schemas/common.d.ts +33 -0
  8. package/dist/schemas/common.js +58 -0
  9. package/dist/schemas/creative.d.ts +113 -0
  10. package/dist/schemas/creative.js +102 -0
  11. package/dist/schemas/user.d.ts +179 -0
  12. package/dist/schemas/user.js +93 -0
  13. package/dist/types/brand.d.ts +24 -0
  14. package/dist/types/brand.js +2 -0
  15. package/dist/types/common.d.ts +10 -0
  16. package/dist/types/common.js +2 -0
  17. package/dist/types/creative.d.ts +28 -0
  18. package/dist/types/creative.js +2 -0
  19. package/dist/types/discipline.d.ts +8 -0
  20. package/dist/types/discipline.js +2 -0
  21. package/dist/types/enums.d.ts +97 -0
  22. package/dist/types/enums.js +110 -0
  23. package/dist/types/file.d.ts +12 -0
  24. package/dist/types/file.js +2 -0
  25. package/dist/types/index.d.ts +8 -0
  26. package/dist/types/index.js +24 -0
  27. package/dist/types/investor.d.ts +30 -0
  28. package/dist/types/investor.js +2 -0
  29. package/dist/types/project.d.ts +79 -0
  30. package/dist/types/project.js +2 -0
  31. package/dist/types/user.d.ts +42 -0
  32. package/dist/types/user.js +2 -0
  33. package/package.json +8 -3
  34. package/src/constants.ts +300 -0
  35. package/src/index.ts +1 -1
  36. package/src/schemas/brand.ts +91 -0
  37. package/src/schemas/common.ts +67 -0
  38. package/src/schemas/creative.ts +125 -0
  39. package/src/schemas/user.ts +125 -0
  40. package/src/types/brand.ts +27 -0
  41. package/src/types/common.ts +11 -0
  42. package/src/types/creative.ts +32 -0
  43. package/src/types/discipline.ts +9 -0
  44. package/src/types/file.ts +13 -0
  45. package/src/types/index.ts +8 -0
  46. package/src/types/investor.ts +38 -0
  47. package/src/types/project.ts +101 -0
  48. package/src/types/user.ts +60 -0
  49. package/tsconfig.json +5 -2
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateBrandEndpointResponseSchema = exports.GetBrandEndpointResponseSchema = exports.CreateBrandEndpointResponseSchema = exports.GetBrandQuerySchema = exports.GetBrandParamsSchema = exports.UpdateBrandProfileSchema = exports.CreateBrandProfileSchema = exports.BrandEntitySchema = void 0;
4
+ const zod_openapi_1 = require("@hono/zod-openapi");
5
+ const common_1 = require("./common");
6
+ const user_1 = require("./user");
7
+ exports.BrandEntitySchema = zod_openapi_1.z
8
+ .object({
9
+ id: zod_openapi_1.z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
10
+ userId: zod_openapi_1.z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
11
+ brandName: zod_openapi_1.z.string().min(1).openapi({ example: "Acme Creative Studio" }),
12
+ searchVector: zod_openapi_1.z.string().optional(),
13
+ bio: zod_openapi_1.z.string().optional().openapi({
14
+ example: "A creative studio specializing in product design.",
15
+ }),
16
+ tags: zod_openapi_1.z
17
+ .array(zod_openapi_1.z.string())
18
+ .optional()
19
+ .openapi({ example: ["branding", "design", "marketing"] }),
20
+ createdAt: zod_openapi_1.z.iso
21
+ .datetime()
22
+ .openapi({ example: "2025-10-13T09:00:00.000Z" }),
23
+ updatedAt: zod_openapi_1.z.iso
24
+ .datetime()
25
+ .openapi({ example: "2025-10-13T09:00:00.000Z" }),
26
+ })
27
+ .openapi("BrandEntity");
28
+ exports.CreateBrandProfileSchema = zod_openapi_1.z
29
+ .object({
30
+ brandName: zod_openapi_1.z
31
+ .string()
32
+ .min(1, "Brand name is required")
33
+ .openapi({ example: "Acme Creative Studio" }),
34
+ bio: zod_openapi_1.z.string().max(210).optional().default("").openapi({
35
+ example: "We help brands tell their stories through design.",
36
+ }),
37
+ tags: zod_openapi_1.z
38
+ .array(zod_openapi_1.z.string())
39
+ .optional()
40
+ .default([])
41
+ .openapi({ example: ["branding", "ux", "campaigns"] }),
42
+ })
43
+ .openapi({
44
+ title: "create brand profile",
45
+ });
46
+ exports.UpdateBrandProfileSchema = zod_openapi_1.z
47
+ .object({
48
+ brandName: zod_openapi_1.z.string().min(1).optional().openapi({ example: "Acme Studio" }),
49
+ bio: zod_openapi_1.z.string().max(210).optional().openapi({
50
+ example: "Updated bio for our creative agency.",
51
+ }),
52
+ tags: zod_openapi_1.z
53
+ .array(zod_openapi_1.z.string())
54
+ .optional()
55
+ .openapi({ example: ["branding", "product", "illustration"] }),
56
+ })
57
+ .openapi({
58
+ title: "update brand profile",
59
+ });
60
+ exports.GetBrandParamsSchema = zod_openapi_1.z.object({
61
+ value: common_1.CuidSchema,
62
+ });
63
+ exports.GetBrandQuerySchema = common_1.ProfileIdentifierSchema;
64
+ exports.CreateBrandEndpointResponseSchema = exports.BrandEntitySchema;
65
+ exports.GetBrandEndpointResponseSchema = exports.BrandEntitySchema.extend({
66
+ user: user_1.MinimalUserSchema,
67
+ });
68
+ exports.UpdateBrandEndpointResponseSchema = exports.BrandEntitySchema;
@@ -0,0 +1,33 @@
1
+ import { z } from "@hono/zod-openapi";
2
+ export declare const CuidSchema: z.ZodCUID2;
3
+ export declare const UserIdentifierSchema: z.ZodObject<{
4
+ by: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
5
+ id: "id";
6
+ username: "username";
7
+ }>>>;
8
+ }, z.core.$strip>;
9
+ export type UserIdentifier = z.infer<typeof UserIdentifierSchema>;
10
+ export declare const ProfileIdentifierSchema: z.ZodObject<{
11
+ by: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
12
+ id: "id";
13
+ userId: "userId";
14
+ }>>>;
15
+ }, z.core.$strip>;
16
+ export type ProfileIdentifier = z.infer<typeof ProfileIdentifierSchema>;
17
+ export declare const ProjectIdentifierSchema: z.ZodObject<{
18
+ by: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
19
+ id: "id";
20
+ userId: "userId";
21
+ }>>>;
22
+ }, z.core.$strip>;
23
+ export type ProjectIdentifier = z.infer<typeof ProjectIdentifierSchema>;
24
+ export declare const ProjectSocialGraphEntitySchema: z.ZodObject<{
25
+ noOfLikes: z.ZodOptional<z.ZodNumber>;
26
+ noOfComments: z.ZodOptional<z.ZodNumber>;
27
+ noOfBookmarks: z.ZodOptional<z.ZodNumber>;
28
+ noOfViews: z.ZodOptional<z.ZodNumber>;
29
+ }, z.core.$strip>;
30
+ export declare const UserSocialGraphEntitySchema: z.ZodObject<{
31
+ followerCount: z.ZodOptional<z.ZodNumber>;
32
+ followingCount: z.ZodOptional<z.ZodNumber>;
33
+ }, z.core.$strip>;
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserSocialGraphEntitySchema = exports.ProjectSocialGraphEntitySchema = exports.ProjectIdentifierSchema = exports.ProfileIdentifierSchema = exports.UserIdentifierSchema = exports.CuidSchema = void 0;
4
+ const zod_openapi_1 = require("@hono/zod-openapi");
5
+ exports.CuidSchema = zod_openapi_1.z.cuid2({ error: "Invalid CUID2 is written." });
6
+ exports.UserIdentifierSchema = zod_openapi_1.z.object({
7
+ by: zod_openapi_1.z.enum(["id", "username"]).optional().default("id"),
8
+ });
9
+ exports.ProfileIdentifierSchema = zod_openapi_1.z.object({
10
+ by: zod_openapi_1.z.enum(["id", "userId"]).optional().default("id"),
11
+ });
12
+ exports.ProjectIdentifierSchema = zod_openapi_1.z.object({
13
+ by: zod_openapi_1.z.enum(["id", "userId"]).optional().default("id"),
14
+ });
15
+ exports.ProjectSocialGraphEntitySchema = zod_openapi_1.z
16
+ .object({
17
+ noOfLikes: zod_openapi_1.z
18
+ .number()
19
+ .int()
20
+ .nonnegative()
21
+ .optional()
22
+ .openapi({ example: 350 }),
23
+ noOfComments: zod_openapi_1.z
24
+ .number()
25
+ .int()
26
+ .nonnegative()
27
+ .optional()
28
+ .openapi({ example: 78 }),
29
+ noOfBookmarks: zod_openapi_1.z
30
+ .number()
31
+ .int()
32
+ .nonnegative()
33
+ .optional()
34
+ .openapi({ example: 25 }),
35
+ noOfViews: zod_openapi_1.z
36
+ .number()
37
+ .int()
38
+ .nonnegative()
39
+ .optional()
40
+ .openapi({ example: 1024 }),
41
+ })
42
+ .openapi("ProjectSocialGraphEntity");
43
+ exports.UserSocialGraphEntitySchema = zod_openapi_1.z
44
+ .object({
45
+ followerCount: zod_openapi_1.z
46
+ .number()
47
+ .int()
48
+ .nonnegative()
49
+ .optional()
50
+ .openapi({ example: 120 }),
51
+ followingCount: zod_openapi_1.z
52
+ .number()
53
+ .int()
54
+ .nonnegative()
55
+ .optional()
56
+ .openapi({ example: 45 }),
57
+ })
58
+ .openapi("UserSocialGraphEntity");
@@ -0,0 +1,113 @@
1
+ import { z } from "@hono/zod-openapi";
2
+ export declare const CreativeEntitySchema: z.ZodObject<{
3
+ id: z.ZodCUID2;
4
+ userId: z.ZodCUID2;
5
+ bio: z.ZodOptional<z.ZodString>;
6
+ location: z.ZodOptional<z.ZodString>;
7
+ searchVector: z.ZodOptional<z.ZodString>;
8
+ experienceLevel: z.ZodOptional<z.ZodEnum<{
9
+ [x: string]: string;
10
+ }>>;
11
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
12
+ disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
13
+ createdAt: z.ZodISODateTime;
14
+ updatedAt: z.ZodISODateTime;
15
+ }, z.core.$strip>;
16
+ export declare const CreateCreativeProfileSchema: z.ZodObject<{
17
+ experienceLevel: z.ZodDefault<z.ZodEnum<{
18
+ readonly YEAR_0_1: "0-1 year";
19
+ readonly YEAR_1_3: "1-3 years";
20
+ readonly YEAR_3_5: "3-5 years";
21
+ readonly YEAR_5_PLUS: "5+ years";
22
+ }>>;
23
+ bio: z.ZodDefault<z.ZodOptional<z.ZodString>>;
24
+ location: z.ZodDefault<z.ZodOptional<z.ZodString>>;
25
+ disciplineSlugs: z.ZodDefault<z.ZodArray<z.ZodString>>;
26
+ }, z.core.$strip>;
27
+ export declare const UpdateCreativeProfileSchema: z.ZodObject<{
28
+ experienceLevel: z.ZodOptional<z.ZodEnum<{
29
+ readonly YEAR_0_1: "0-1 year";
30
+ readonly YEAR_1_3: "1-3 years";
31
+ readonly YEAR_3_5: "3-5 years";
32
+ readonly YEAR_5_PLUS: "5+ years";
33
+ }>>;
34
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
35
+ bio: z.ZodOptional<z.ZodString>;
36
+ location: z.ZodOptional<z.ZodString>;
37
+ disciplineSlugs: z.ZodOptional<z.ZodArray<z.ZodString>>;
38
+ }, z.core.$strip>;
39
+ export declare const GetCreativeParamsSchema: z.ZodObject<{
40
+ value: z.ZodCUID2;
41
+ }, z.core.$strip>;
42
+ export declare const GetCreativeQuerySchema: z.ZodObject<{
43
+ by: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
44
+ id: "id";
45
+ userId: "userId";
46
+ }>>>;
47
+ }, z.core.$strip>;
48
+ export declare const CreateCreativeEndpointResponseSchema: z.ZodObject<{
49
+ id: z.ZodCUID2;
50
+ userId: z.ZodCUID2;
51
+ bio: z.ZodOptional<z.ZodString>;
52
+ location: z.ZodOptional<z.ZodString>;
53
+ searchVector: z.ZodOptional<z.ZodString>;
54
+ experienceLevel: z.ZodOptional<z.ZodEnum<{
55
+ [x: string]: string;
56
+ }>>;
57
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
58
+ disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
59
+ createdAt: z.ZodISODateTime;
60
+ updatedAt: z.ZodISODateTime;
61
+ }, z.core.$strip>;
62
+ export declare const GetCreativeEndpointResponseSchema: z.ZodObject<{
63
+ id: z.ZodCUID2;
64
+ userId: z.ZodCUID2;
65
+ bio: z.ZodOptional<z.ZodString>;
66
+ location: z.ZodOptional<z.ZodString>;
67
+ searchVector: z.ZodOptional<z.ZodString>;
68
+ experienceLevel: z.ZodOptional<z.ZodEnum<{
69
+ [x: string]: string;
70
+ }>>;
71
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
72
+ disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
73
+ createdAt: z.ZodISODateTime;
74
+ updatedAt: z.ZodISODateTime;
75
+ user: z.ZodObject<{
76
+ id: z.ZodCUID2;
77
+ name: z.ZodOptional<z.ZodString>;
78
+ email: z.ZodEmail;
79
+ image: z.ZodOptional<z.ZodString>;
80
+ username: z.ZodOptional<z.ZodString>;
81
+ role: z.ZodEnum<{
82
+ CREATIVE: "CREATIVE";
83
+ BRAND: "BRAND";
84
+ INVESTOR: "INVESTOR";
85
+ ADMIN: "ADMIN";
86
+ }>;
87
+ }, z.core.$strip>;
88
+ }, z.core.$strip>;
89
+ export declare const UpdateCreativeEndpointResponseSchema: z.ZodObject<{
90
+ id: z.ZodCUID2;
91
+ userId: z.ZodCUID2;
92
+ bio: z.ZodOptional<z.ZodString>;
93
+ location: z.ZodOptional<z.ZodString>;
94
+ searchVector: z.ZodOptional<z.ZodString>;
95
+ experienceLevel: z.ZodOptional<z.ZodEnum<{
96
+ [x: string]: string;
97
+ }>>;
98
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
99
+ disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
100
+ createdAt: z.ZodISODateTime;
101
+ updatedAt: z.ZodISODateTime;
102
+ }, z.core.$strip>;
103
+ export type CreateCreativeDto = z.infer<typeof CreateCreativeProfileSchema> & {
104
+ userId: string;
105
+ };
106
+ export type UpdateCreativeDto = z.infer<typeof UpdateCreativeProfileSchema> & {
107
+ userId: string;
108
+ };
109
+ export type GetCreativeParams = z.infer<typeof GetCreativeParamsSchema>;
110
+ export type GetCreativeQuery = z.infer<typeof GetCreativeQuerySchema>;
111
+ export type CreateCreativeEndpointResponse = z.infer<typeof CreateCreativeEndpointResponseSchema>;
112
+ export type GetCreativeEndpointResponse = z.infer<typeof GetCreativeEndpointResponseSchema>;
113
+ export type UpdateCreativeEndpointResponse = z.infer<typeof UpdateCreativeEndpointResponseSchema>;
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateCreativeEndpointResponseSchema = exports.GetCreativeEndpointResponseSchema = exports.CreateCreativeEndpointResponseSchema = exports.GetCreativeQuerySchema = exports.GetCreativeParamsSchema = exports.UpdateCreativeProfileSchema = exports.CreateCreativeProfileSchema = exports.CreativeEntitySchema = void 0;
4
+ const zod_openapi_1 = require("@hono/zod-openapi");
5
+ const constants_1 = require("../constants");
6
+ const common_1 = require("./common");
7
+ const user_1 = require("./user");
8
+ exports.CreativeEntitySchema = zod_openapi_1.z
9
+ .object({
10
+ id: zod_openapi_1.z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
11
+ userId: zod_openapi_1.z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
12
+ bio: zod_openapi_1.z
13
+ .string()
14
+ .optional()
15
+ .openapi({ example: "Passionate visual artist." }),
16
+ location: zod_openapi_1.z.string().optional().openapi({ example: "Lagos, Nigeria" }),
17
+ searchVector: zod_openapi_1.z.string().optional(),
18
+ experienceLevel: zod_openapi_1.z
19
+ .enum(Object.values(constants_1.EXPERIENCE_LEVELS))
20
+ .optional()
21
+ .openapi({ example: "1-3 years" }),
22
+ tags: zod_openapi_1.z
23
+ .array(zod_openapi_1.z.string())
24
+ .optional()
25
+ .openapi({ example: ["digital-art", "illustration"] }),
26
+ disciplines: zod_openapi_1.z
27
+ .array(zod_openapi_1.z.string())
28
+ .optional()
29
+ .openapi({ example: ["painting", "animation"] }),
30
+ createdAt: zod_openapi_1.z.iso
31
+ .datetime()
32
+ .openapi({ example: "2025-10-13T09:00:00.000Z" }),
33
+ updatedAt: zod_openapi_1.z.iso
34
+ .datetime()
35
+ .openapi({ example: "2025-10-13T09:00:00.000Z" }),
36
+ })
37
+ .openapi("CreativeEntity");
38
+ exports.CreateCreativeProfileSchema = zod_openapi_1.z
39
+ .object({
40
+ experienceLevel: zod_openapi_1.z
41
+ .enum(constants_1.EXPERIENCE_LEVELS)
42
+ .default(constants_1.EXPERIENCE_LEVELS.YEAR_0_1)
43
+ .openapi({ example: constants_1.EXPERIENCE_LEVELS.YEAR_1_3 }),
44
+ bio: zod_openapi_1.z
45
+ .string()
46
+ .max(210)
47
+ .optional()
48
+ .default("")
49
+ .openapi({ example: "I am a freelance UI/UX designer." }),
50
+ location: zod_openapi_1.z
51
+ .string()
52
+ .max(100)
53
+ .optional()
54
+ .default("")
55
+ .openapi({ example: "Lagos, Nigeria" }),
56
+ disciplineSlugs: zod_openapi_1.z
57
+ .array(zod_openapi_1.z.string())
58
+ .min(1, "At least one discipline is required")
59
+ .default([])
60
+ .openapi({ example: ["ui-ux", "frontend"] }),
61
+ })
62
+ .openapi({
63
+ title: "create creative profile",
64
+ });
65
+ exports.UpdateCreativeProfileSchema = zod_openapi_1.z
66
+ .object({
67
+ experienceLevel: zod_openapi_1.z
68
+ .enum(constants_1.EXPERIENCE_LEVELS)
69
+ .optional()
70
+ .openapi({ example: constants_1.EXPERIENCE_LEVELS.YEAR_3_5 }),
71
+ tags: zod_openapi_1.z
72
+ .array(zod_openapi_1.z.string())
73
+ .optional()
74
+ .openapi({ example: ["react", "design", "product"] }),
75
+ bio: zod_openapi_1.z
76
+ .string()
77
+ .max(210)
78
+ .optional()
79
+ .openapi({ example: "I am a freelance UI/UX designer." }),
80
+ location: zod_openapi_1.z
81
+ .string()
82
+ .max(100)
83
+ .optional()
84
+ .openapi({ example: "Lagos, Nigeria" }),
85
+ disciplineSlugs: zod_openapi_1.z
86
+ .array(zod_openapi_1.z.string())
87
+ .min(1, "At least one discipline is required")
88
+ .optional()
89
+ .openapi({ example: ["frontend", "ui-ux"] }),
90
+ })
91
+ .openapi({
92
+ title: "update creative profile",
93
+ });
94
+ exports.GetCreativeParamsSchema = zod_openapi_1.z.object({
95
+ value: common_1.CuidSchema,
96
+ });
97
+ exports.GetCreativeQuerySchema = common_1.ProfileIdentifierSchema;
98
+ exports.CreateCreativeEndpointResponseSchema = exports.CreativeEntitySchema;
99
+ exports.GetCreativeEndpointResponseSchema = exports.CreativeEntitySchema.extend({
100
+ user: user_1.MinimalUserSchema,
101
+ });
102
+ exports.UpdateCreativeEndpointResponseSchema = exports.CreativeEntitySchema;
@@ -0,0 +1,179 @@
1
+ import { z } from "@hono/zod-openapi";
2
+ export declare const BaseUserEntitySchema: z.ZodObject<{
3
+ id: z.ZodCUID2;
4
+ email: z.ZodEmail;
5
+ emailVerified: z.ZodBoolean;
6
+ name: z.ZodOptional<z.ZodString>;
7
+ image: z.ZodOptional<z.ZodString>;
8
+ username: z.ZodOptional<z.ZodString>;
9
+ displayUsername: z.ZodOptional<z.ZodString>;
10
+ role: z.ZodEnum<{
11
+ CREATIVE: "CREATIVE";
12
+ BRAND: "BRAND";
13
+ INVESTOR: "INVESTOR";
14
+ ADMIN: "ADMIN";
15
+ }>;
16
+ status: z.ZodEnum<{
17
+ ACTIVE: "ACTIVE";
18
+ SUSPENDED: "SUSPENDED";
19
+ DELETED: "DELETED";
20
+ }>;
21
+ onboardingPage: z.ZodEnum<{
22
+ EMAIL_VERIFICATION: "EMAIL_VERIFICATION";
23
+ USERNAME_SELECTION: "USERNAME_SELECTION";
24
+ ACCOUNT_TYPE_SELECTION: "ACCOUNT_TYPE_SELECTION";
25
+ CREATIVE_PROFILE_DETAILS: "CREATIVE_PROFILE_DETAILS";
26
+ CREATIVE_PROFILE_CUSTOMIZE_FEED: "CREATIVE_PROFILE_CUSTOMIZE_FEED";
27
+ CREATIVE_PROFILE_PORTFOLIO: "CREATIVE_PROFILE_PORTFOLIO";
28
+ BRAND_PROFILE_DETAILS: "BRAND_PROFILE_DETAILS";
29
+ BRAND_PROFILE_CUSTOMIZE_FEED: "BRAND_PROFILE_CUSTOMIZE_FEED";
30
+ BRAND_PROFILE_PORTFOLIO: "BRAND_PROFILE_PORTFOLIO";
31
+ INVESTOR_PROFILE_DETAILS: "INVESTOR_PROFILE_DETAILS";
32
+ INVESTOR_INVESTMENT_FOCUS: "INVESTOR_INVESTMENT_FOCUS";
33
+ INVESTOR_VERIFICATION: "INVESTOR_VERIFICATION";
34
+ DONE: "DONE";
35
+ }>;
36
+ createdAt: z.ZodISODateTime;
37
+ updatedAt: z.ZodISODateTime;
38
+ }, z.core.$strip>;
39
+ export declare const MinimalUserSchema: z.ZodObject<{
40
+ id: z.ZodCUID2;
41
+ name: z.ZodOptional<z.ZodString>;
42
+ email: z.ZodEmail;
43
+ image: z.ZodOptional<z.ZodString>;
44
+ username: z.ZodOptional<z.ZodString>;
45
+ role: z.ZodEnum<{
46
+ CREATIVE: "CREATIVE";
47
+ BRAND: "BRAND";
48
+ INVESTOR: "INVESTOR";
49
+ ADMIN: "ADMIN";
50
+ }>;
51
+ }, z.core.$strip>;
52
+ export declare const UserEntitySchema: z.ZodObject<{
53
+ id: z.ZodCUID2;
54
+ email: z.ZodEmail;
55
+ emailVerified: z.ZodBoolean;
56
+ name: z.ZodOptional<z.ZodString>;
57
+ image: z.ZodOptional<z.ZodString>;
58
+ username: z.ZodOptional<z.ZodString>;
59
+ displayUsername: z.ZodOptional<z.ZodString>;
60
+ role: z.ZodEnum<{
61
+ CREATIVE: "CREATIVE";
62
+ BRAND: "BRAND";
63
+ INVESTOR: "INVESTOR";
64
+ ADMIN: "ADMIN";
65
+ }>;
66
+ status: z.ZodEnum<{
67
+ ACTIVE: "ACTIVE";
68
+ SUSPENDED: "SUSPENDED";
69
+ DELETED: "DELETED";
70
+ }>;
71
+ onboardingPage: z.ZodEnum<{
72
+ EMAIL_VERIFICATION: "EMAIL_VERIFICATION";
73
+ USERNAME_SELECTION: "USERNAME_SELECTION";
74
+ ACCOUNT_TYPE_SELECTION: "ACCOUNT_TYPE_SELECTION";
75
+ CREATIVE_PROFILE_DETAILS: "CREATIVE_PROFILE_DETAILS";
76
+ CREATIVE_PROFILE_CUSTOMIZE_FEED: "CREATIVE_PROFILE_CUSTOMIZE_FEED";
77
+ CREATIVE_PROFILE_PORTFOLIO: "CREATIVE_PROFILE_PORTFOLIO";
78
+ BRAND_PROFILE_DETAILS: "BRAND_PROFILE_DETAILS";
79
+ BRAND_PROFILE_CUSTOMIZE_FEED: "BRAND_PROFILE_CUSTOMIZE_FEED";
80
+ BRAND_PROFILE_PORTFOLIO: "BRAND_PROFILE_PORTFOLIO";
81
+ INVESTOR_PROFILE_DETAILS: "INVESTOR_PROFILE_DETAILS";
82
+ INVESTOR_INVESTMENT_FOCUS: "INVESTOR_INVESTMENT_FOCUS";
83
+ INVESTOR_VERIFICATION: "INVESTOR_VERIFICATION";
84
+ DONE: "DONE";
85
+ }>;
86
+ createdAt: z.ZodISODateTime;
87
+ updatedAt: z.ZodISODateTime;
88
+ followerCount: z.ZodOptional<z.ZodNumber>;
89
+ followingCount: z.ZodOptional<z.ZodNumber>;
90
+ }, z.core.$strip>;
91
+ export declare const UserProfileEntitySchema: z.ZodObject<{
92
+ id: z.ZodCUID2;
93
+ email: z.ZodEmail;
94
+ emailVerified: z.ZodBoolean;
95
+ name: z.ZodOptional<z.ZodString>;
96
+ image: z.ZodOptional<z.ZodString>;
97
+ username: z.ZodOptional<z.ZodString>;
98
+ displayUsername: z.ZodOptional<z.ZodString>;
99
+ role: z.ZodEnum<{
100
+ CREATIVE: "CREATIVE";
101
+ BRAND: "BRAND";
102
+ INVESTOR: "INVESTOR";
103
+ ADMIN: "ADMIN";
104
+ }>;
105
+ status: z.ZodEnum<{
106
+ ACTIVE: "ACTIVE";
107
+ SUSPENDED: "SUSPENDED";
108
+ DELETED: "DELETED";
109
+ }>;
110
+ onboardingPage: z.ZodEnum<{
111
+ EMAIL_VERIFICATION: "EMAIL_VERIFICATION";
112
+ USERNAME_SELECTION: "USERNAME_SELECTION";
113
+ ACCOUNT_TYPE_SELECTION: "ACCOUNT_TYPE_SELECTION";
114
+ CREATIVE_PROFILE_DETAILS: "CREATIVE_PROFILE_DETAILS";
115
+ CREATIVE_PROFILE_CUSTOMIZE_FEED: "CREATIVE_PROFILE_CUSTOMIZE_FEED";
116
+ CREATIVE_PROFILE_PORTFOLIO: "CREATIVE_PROFILE_PORTFOLIO";
117
+ BRAND_PROFILE_DETAILS: "BRAND_PROFILE_DETAILS";
118
+ BRAND_PROFILE_CUSTOMIZE_FEED: "BRAND_PROFILE_CUSTOMIZE_FEED";
119
+ BRAND_PROFILE_PORTFOLIO: "BRAND_PROFILE_PORTFOLIO";
120
+ INVESTOR_PROFILE_DETAILS: "INVESTOR_PROFILE_DETAILS";
121
+ INVESTOR_INVESTMENT_FOCUS: "INVESTOR_INVESTMENT_FOCUS";
122
+ INVESTOR_VERIFICATION: "INVESTOR_VERIFICATION";
123
+ DONE: "DONE";
124
+ }>;
125
+ createdAt: z.ZodISODateTime;
126
+ updatedAt: z.ZodISODateTime;
127
+ followerCount: z.ZodOptional<z.ZodNumber>;
128
+ followingCount: z.ZodOptional<z.ZodNumber>;
129
+ profileType: z.ZodOptional<z.ZodEnum<{
130
+ creative: "creative";
131
+ brand: "brand";
132
+ investor: "investor";
133
+ }>>;
134
+ bio: z.ZodOptional<z.ZodString>;
135
+ location: z.ZodOptional<z.ZodString>;
136
+ experienceLevel: z.ZodOptional<z.ZodEnum<{
137
+ "0-1 year": "0-1 year";
138
+ "1-3 years": "1-3 years";
139
+ "3-5 years": "3-5 years";
140
+ "5+ years": "5+ years";
141
+ }>>;
142
+ disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
143
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
144
+ brandName: z.ZodOptional<z.ZodString>;
145
+ websiteURL: z.ZodOptional<z.ZodString>;
146
+ investorType: z.ZodOptional<z.ZodEnum<{
147
+ "Angel Investor": "Angel Investor";
148
+ "Venture Capitalist": "Venture Capitalist";
149
+ "Private Equity Firm": "Private Equity Firm";
150
+ "Venture Debt Provider": "Venture Debt Provider";
151
+ Bank: "Bank";
152
+ "Convertible Note Investor": "Convertible Note Investor";
153
+ "Revenue Based Financing Investor": "Revenue Based Financing Investor";
154
+ "Corporate Venture Capitalist": "Corporate Venture Capitalist";
155
+ Government: "Government";
156
+ "Social Impact Investor": "Social Impact Investor";
157
+ }>>;
158
+ investmentSize: z.ZodOptional<z.ZodEnum<{
159
+ "Under 5k USD": "Under 5k USD";
160
+ "5k - 25k USD": "5k - 25k USD";
161
+ "25k - 100k USD": "25k - 100k USD";
162
+ "100k - 500k USD": "100k - 500k USD";
163
+ "500k - 1M USD": "500k - 1M USD";
164
+ "1M+ USD": "1M+ USD";
165
+ }>>;
166
+ geographicFocus: z.ZodOptional<z.ZodEnum<{
167
+ Africa: "Africa";
168
+ Asia: "Asia";
169
+ Europe: "Europe";
170
+ "North America": "North America";
171
+ "South America": "South America";
172
+ "Middle East": "Middle East";
173
+ Oceania: "Oceania";
174
+ "United Kingdom (UK)": "United Kingdom (UK)";
175
+ "United States (US)": "United States (US)";
176
+ Global: "Global";
177
+ Other: "Other";
178
+ }>>;
179
+ }, z.core.$strip>;
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserProfileEntitySchema = exports.UserEntitySchema = exports.MinimalUserSchema = exports.BaseUserEntitySchema = void 0;
4
+ const zod_openapi_1 = require("@hono/zod-openapi");
5
+ const constants_1 = require("../constants");
6
+ const common_1 = require("./common");
7
+ exports.BaseUserEntitySchema = zod_openapi_1.z
8
+ .object({
9
+ id: zod_openapi_1.z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
10
+ email: zod_openapi_1.z.email().openapi({ example: "user@example.com" }),
11
+ emailVerified: zod_openapi_1.z.boolean().openapi({ example: true }),
12
+ name: zod_openapi_1.z.string().optional().openapi({ example: "John Doe" }),
13
+ image: zod_openapi_1.z
14
+ .string()
15
+ .optional()
16
+ .openapi({ example: "https://example.com/avatar.png" }),
17
+ username: zod_openapi_1.z.string().optional().openapi({ example: "johndoe" }),
18
+ displayUsername: zod_openapi_1.z.string().optional().openapi({ example: "@johndoe" }),
19
+ role: zod_openapi_1.z.enum(Object.values(constants_1.ROLES)).openapi({
20
+ example: "CREATIVE",
21
+ }),
22
+ status: zod_openapi_1.z
23
+ .enum(Object.values(constants_1.USER_STATUSES))
24
+ .openapi({
25
+ example: "ACTIVE",
26
+ }),
27
+ onboardingPage: zod_openapi_1.z
28
+ .enum(Object.values(constants_1.ONBOARDING_PAGES))
29
+ .openapi({
30
+ example: "DONE",
31
+ }),
32
+ createdAt: zod_openapi_1.z.iso
33
+ .datetime()
34
+ .openapi({ example: "2025-10-13T09:00:00.000Z" }),
35
+ updatedAt: zod_openapi_1.z.iso
36
+ .datetime()
37
+ .openapi({ example: "2025-10-13T09:00:00.000Z" }),
38
+ })
39
+ .openapi("BaseUserEntity");
40
+ exports.MinimalUserSchema = exports.BaseUserEntitySchema.pick({
41
+ id: true,
42
+ name: true,
43
+ email: true,
44
+ image: true,
45
+ username: true,
46
+ role: true,
47
+ }).openapi("MinimalUser");
48
+ exports.UserEntitySchema = exports.BaseUserEntitySchema.merge(common_1.UserSocialGraphEntitySchema).openapi("UserEntity");
49
+ exports.UserProfileEntitySchema = exports.UserEntitySchema.extend({
50
+ profileType: zod_openapi_1.z.enum(["creative", "brand", "investor"]).optional().openapi({
51
+ example: "creative",
52
+ }),
53
+ bio: zod_openapi_1.z.string().optional().openapi({
54
+ example: "Passionate digital artist focusing on UI/UX.",
55
+ }),
56
+ location: zod_openapi_1.z.string().optional().openapi({
57
+ example: "Lagos, Nigeria",
58
+ }),
59
+ experienceLevel: zod_openapi_1.z
60
+ .enum(Object.values(constants_1.EXPERIENCE_LEVELS))
61
+ .optional()
62
+ .openapi({ example: constants_1.EXPERIENCE_LEVELS.YEAR_1_3 }),
63
+ disciplines: zod_openapi_1.z
64
+ .array(zod_openapi_1.z.string())
65
+ .optional()
66
+ .openapi({
67
+ example: ["ui-ux", "frontend"],
68
+ }),
69
+ tags: zod_openapi_1.z
70
+ .array(zod_openapi_1.z.string())
71
+ .optional()
72
+ .openapi({
73
+ example: ["react", "design", "product"],
74
+ }),
75
+ brandName: zod_openapi_1.z.string().optional().openapi({
76
+ example: "Acme Creative Studio",
77
+ }),
78
+ websiteURL: zod_openapi_1.z.string().optional().openapi({
79
+ example: "https://acme-creative.com",
80
+ }),
81
+ investorType: zod_openapi_1.z
82
+ .enum(Object.values(constants_1.INVESTOR_TYPES))
83
+ .optional()
84
+ .openapi({ example: constants_1.INVESTOR_TYPES.ANGEL_INVESTOR }),
85
+ investmentSize: zod_openapi_1.z
86
+ .enum(Object.values(constants_1.INVESTMENT_SIZES))
87
+ .optional()
88
+ .openapi({ example: constants_1.INVESTMENT_SIZES.BETWEEN_25K_100K }),
89
+ geographicFocus: zod_openapi_1.z
90
+ .enum(Object.values(constants_1.GEOGRAPHIC_FOCUS))
91
+ .optional()
92
+ .openapi({ example: constants_1.GEOGRAPHIC_FOCUS.AFRICA }),
93
+ }).openapi("UserProfileEntity");
@@ -0,0 +1,24 @@
1
+ import type { MinimalUser } from "./user";
2
+ export type BrandEntity = {
3
+ id: string;
4
+ userId: string;
5
+ brandName: string;
6
+ searchVector?: string;
7
+ bio?: string;
8
+ tags?: string[];
9
+ createdAt: Date;
10
+ updatedAt: Date;
11
+ };
12
+ export type BrandWithUserEntity = BrandEntity & {
13
+ user: MinimalUser;
14
+ disciplines: string[];
15
+ };
16
+ export type ListBrandsInput = {
17
+ query?: string;
18
+ disciplines?: string[];
19
+ experienceLevels?: string[];
20
+ location?: string;
21
+ tags?: string[];
22
+ page?: number;
23
+ perPage?: number;
24
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });