@zyacreatives/shared 2.5.52 → 2.5.55

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 (114) hide show
  1. package/dist/index.d.ts +0 -1
  2. package/dist/index.js +0 -1
  3. package/dist/schemas/activity.d.ts +1 -0
  4. package/dist/schemas/auth.d.ts +2 -0
  5. package/dist/schemas/bookmark.d.ts +62 -7
  6. package/dist/schemas/bookmark.js +32 -30
  7. package/dist/schemas/brand.d.ts +3 -3
  8. package/dist/schemas/chat.d.ts +96 -52
  9. package/dist/schemas/chat.js +44 -18
  10. package/dist/schemas/comment.d.ts +65 -21
  11. package/dist/schemas/comment.js +48 -54
  12. package/dist/schemas/common.d.ts +15 -11
  13. package/dist/schemas/creative.d.ts +21 -21
  14. package/dist/schemas/creative.js +3 -3
  15. package/dist/schemas/discipline.d.ts +63 -12
  16. package/dist/schemas/discipline.js +62 -65
  17. package/dist/schemas/entity-stats.d.ts +35 -3
  18. package/dist/schemas/entity-stats.js +24 -38
  19. package/dist/schemas/feed.d.ts +50 -3
  20. package/dist/schemas/feed.js +43 -13
  21. package/dist/schemas/file.d.ts +65 -24
  22. package/dist/schemas/file.js +60 -49
  23. package/dist/schemas/index.d.ts +1 -0
  24. package/dist/schemas/index.js +1 -0
  25. package/dist/schemas/investor-shortlist.d.ts +68 -11
  26. package/dist/schemas/investor-shortlist.js +46 -24
  27. package/dist/schemas/investor-signal.d.ts +52 -12
  28. package/dist/schemas/investor-signal.js +59 -39
  29. package/dist/schemas/investor.d.ts +3 -3
  30. package/dist/schemas/job-application.d.ts +291 -279
  31. package/dist/schemas/job-application.js +59 -95
  32. package/dist/schemas/job.d.ts +200 -659
  33. package/dist/schemas/job.js +98 -231
  34. package/dist/schemas/like.d.ts +3 -0
  35. package/dist/schemas/message.d.ts +125 -94
  36. package/dist/schemas/message.js +54 -55
  37. package/dist/schemas/notification.d.ts +99 -32
  38. package/dist/schemas/notification.js +46 -42
  39. package/dist/schemas/payout-method.d.ts +51 -31
  40. package/dist/schemas/payout-method.js +48 -58
  41. package/dist/schemas/post.d.ts +295 -204
  42. package/dist/schemas/post.js +148 -272
  43. package/dist/schemas/product.d.ts +308 -229
  44. package/dist/schemas/product.js +111 -94
  45. package/dist/schemas/project.d.ts +75 -107
  46. package/dist/schemas/project.js +1 -5
  47. package/dist/schemas/seller.d.ts +10 -10
  48. package/dist/schemas/user-strike.d.ts +3 -0
  49. package/dist/schemas/user.d.ts +128 -126
  50. package/dist/schemas/user.js +10 -1
  51. package/dist/schemas/username.d.ts +1 -0
  52. package/dist/schemas/view.d.ts +1 -0
  53. package/dist/types/activity.d.ts +1 -3
  54. package/dist/types/auth.d.ts +1 -4
  55. package/dist/types/bookmark.d.ts +1 -3
  56. package/dist/types/chat.d.ts +1 -11
  57. package/dist/types/comment.d.ts +1 -5
  58. package/dist/types/common.d.ts +2 -8
  59. package/dist/types/discipline.d.ts +1 -11
  60. package/dist/types/entity-stats.d.ts +1 -3
  61. package/dist/types/feed.d.ts +1 -5
  62. package/dist/types/investor-shortlist.d.ts +1 -6
  63. package/dist/types/investor-signal.d.ts +1 -7
  64. package/dist/types/like.d.ts +1 -3
  65. package/dist/types/message.d.ts +1 -9
  66. package/dist/types/notification.d.ts +1 -9
  67. package/dist/types/user-strike.d.ts +1 -5
  68. package/dist/types/username.d.ts +1 -3
  69. package/package.json +1 -1
  70. package/src/index.ts +4 -5
  71. package/src/schemas/activity.ts +5 -4
  72. package/src/schemas/auth.ts +14 -10
  73. package/src/schemas/bookmark.ts +48 -29
  74. package/src/schemas/chat.ts +79 -18
  75. package/src/schemas/comment.ts +63 -49
  76. package/src/schemas/common.ts +8 -3
  77. package/src/schemas/creative.ts +3 -3
  78. package/src/schemas/discipline.ts +103 -71
  79. package/src/schemas/entity-stats.ts +32 -38
  80. package/src/schemas/feed.ts +62 -15
  81. package/src/schemas/file.ts +85 -58
  82. package/src/schemas/index.ts +1 -0
  83. package/src/schemas/investor-shortlist.ts +57 -8
  84. package/src/schemas/investor-signal.ts +79 -27
  85. package/src/schemas/job-application.ts +81 -115
  86. package/src/schemas/job.ts +160 -301
  87. package/src/schemas/like.ts +5 -1
  88. package/src/schemas/message.ts +71 -64
  89. package/src/schemas/notification.ts +63 -51
  90. package/src/schemas/payout-method.ts +47 -63
  91. package/src/schemas/post.ts +211 -272
  92. package/src/schemas/product.ts +202 -139
  93. package/src/schemas/project.ts +7 -10
  94. package/src/schemas/user-strike.ts +7 -1
  95. package/src/schemas/user.ts +17 -5
  96. package/src/schemas/username.ts +5 -3
  97. package/src/schemas/view.ts +0 -50
  98. package/src/types/activity.ts +0 -4
  99. package/src/types/auth.ts +0 -5
  100. package/src/types/bookmark.ts +0 -4
  101. package/src/types/chat.ts +0 -31
  102. package/src/types/comment.ts +0 -12
  103. package/src/types/common.ts +0 -14
  104. package/src/types/discipline.ts +0 -32
  105. package/src/types/entity-stats.ts +0 -4
  106. package/src/types/feed.ts +0 -10
  107. package/src/types/index.ts +0 -16
  108. package/src/types/investor-shortlist.ts +0 -18
  109. package/src/types/investor-signal.ts +0 -26
  110. package/src/types/like.ts +0 -4
  111. package/src/types/message.ts +0 -26
  112. package/src/types/notification.ts +0 -34
  113. package/src/types/user-strike.ts +0 -10
  114. package/src/types/username.ts +0 -4
@@ -1,9 +1,11 @@
1
- import z from "zod";
2
- export declare const CommentEntitySchema: z.ZodObject<{
3
- id: z.ZodCUID2;
4
- userId: z.ZodCUID2;
1
+ import { z } from "@hono/zod-openapi";
2
+ /**
3
+ * --------------------------------
4
+ * SHAPE
5
+ * --------------------------------
6
+ */
7
+ declare const CommentShape: z.ZodObject<{
5
8
  parentId: z.ZodCUID2;
6
- parentCommentId: z.ZodOptional<z.ZodCUID2>;
7
9
  parentType: z.ZodEnum<{
8
10
  readonly PROJECT: "PROJECT";
9
11
  readonly USER: "USER";
@@ -17,29 +19,74 @@ export declare const CommentEntitySchema: z.ZodObject<{
17
19
  readonly JOB_APPLICATION: "JOB_APPLICATION";
18
20
  }>;
19
21
  content: z.ZodString;
22
+ parentCommentId: z.ZodOptional<z.ZodCUID2>;
23
+ replyToId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
24
+ }, z.core.$strip>;
25
+ export type CommentShapeType = z.infer<typeof CommentShape>;
26
+ /**
27
+ * --------------------------------
28
+ * BASE ENTITY
29
+ * --------------------------------
30
+ */
31
+ export declare const CommentEntitySchema: z.ZodObject<{
20
32
  commenterUsername: z.ZodOptional<z.ZodString>;
21
33
  commenterName: z.ZodOptional<z.ZodString>;
22
34
  commenterImageUrl: z.ZodOptional<z.ZodString>;
23
- replyToId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
24
- createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
25
35
  isLiked: z.ZodDefault<z.ZodBoolean>;
26
36
  likesCount: z.ZodDefault<z.ZodInt>;
27
37
  hasReplies: z.ZodOptional<z.ZodBoolean>;
28
- updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
38
+ createdAt: z.ZodISODateTime;
39
+ updatedAt: z.ZodOptional<z.ZodISODateTime>;
40
+ parentId: z.ZodCUID2;
41
+ parentType: z.ZodEnum<{
42
+ readonly PROJECT: "PROJECT";
43
+ readonly USER: "USER";
44
+ readonly JOB: "JOB";
45
+ readonly POST: "POST";
46
+ readonly PRODUCT: "PRODUCT";
47
+ readonly SIGNAL: "SIGNAL";
48
+ readonly PRODUCT_COVER: "PRODUCT_COVER";
49
+ readonly PRODUCT_DELIVERY: "PRODUCT_DELIVERY";
50
+ readonly COMMENT: "COMMENT";
51
+ readonly JOB_APPLICATION: "JOB_APPLICATION";
52
+ }>;
53
+ content: z.ZodString;
54
+ parentCommentId: z.ZodOptional<z.ZodCUID2>;
55
+ replyToId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
56
+ id: z.ZodCUID2;
57
+ userId: z.ZodCUID2;
29
58
  }, z.core.$strip>;
30
- export declare const CommentInputSchema: z.ZodObject<{
59
+ export type CommentEntity = z.infer<typeof CommentEntitySchema>;
60
+ /**
61
+ * --------------------------------
62
+ * INPUTS
63
+ * --------------------------------
64
+ */
65
+ export declare const CreateCommentInputSchema: z.ZodObject<{
31
66
  content: z.ZodString;
32
67
  parentCommentId: z.ZodOptional<z.ZodCUID2>;
33
- replyToId: z.ZodOptional<z.ZodCUID2>;
68
+ replyToId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
34
69
  }, z.core.$strip>;
70
+ export type CreateCommentInput = z.infer<typeof CreateCommentInputSchema>;
35
71
  export declare const DeleteCommentInputSchema: z.ZodObject<{
36
72
  commentId: z.ZodCUID2;
37
73
  }, z.core.$strip>;
74
+ export type DeleteCommentInput = z.infer<typeof DeleteCommentInputSchema>;
75
+ /**
76
+ * --------------------------------
77
+ * OUTPUTS
78
+ * --------------------------------
79
+ */
38
80
  export declare const CommentOutputSchema: z.ZodObject<{
39
- id: z.ZodCUID2;
40
- userId: z.ZodCUID2;
81
+ commenterUsername: z.ZodOptional<z.ZodString>;
82
+ commenterName: z.ZodOptional<z.ZodString>;
83
+ commenterImageUrl: z.ZodOptional<z.ZodString>;
84
+ isLiked: z.ZodDefault<z.ZodBoolean>;
85
+ likesCount: z.ZodDefault<z.ZodInt>;
86
+ hasReplies: z.ZodOptional<z.ZodBoolean>;
87
+ createdAt: z.ZodISODateTime;
88
+ updatedAt: z.ZodOptional<z.ZodISODateTime>;
41
89
  parentId: z.ZodCUID2;
42
- parentCommentId: z.ZodOptional<z.ZodCUID2>;
43
90
  parentType: z.ZodEnum<{
44
91
  readonly PROJECT: "PROJECT";
45
92
  readonly USER: "USER";
@@ -53,13 +100,10 @@ export declare const CommentOutputSchema: z.ZodObject<{
53
100
  readonly JOB_APPLICATION: "JOB_APPLICATION";
54
101
  }>;
55
102
  content: z.ZodString;
56
- commenterUsername: z.ZodOptional<z.ZodString>;
57
- commenterName: z.ZodOptional<z.ZodString>;
58
- commenterImageUrl: z.ZodOptional<z.ZodString>;
103
+ parentCommentId: z.ZodOptional<z.ZodCUID2>;
59
104
  replyToId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
60
- createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
61
- isLiked: z.ZodDefault<z.ZodBoolean>;
62
- likesCount: z.ZodDefault<z.ZodInt>;
63
- hasReplies: z.ZodOptional<z.ZodBoolean>;
64
- updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
105
+ id: z.ZodCUID2;
106
+ userId: z.ZodCUID2;
65
107
  }, z.core.$strip>;
108
+ export type CommentOutput = z.infer<typeof CommentOutputSchema>;
109
+ export {};
@@ -1,62 +1,56 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.CommentOutputSchema = exports.DeleteCommentInputSchema = exports.CommentInputSchema = exports.CommentEntitySchema = void 0;
7
- const zod_1 = __importDefault(require("zod"));
3
+ exports.CommentOutputSchema = exports.DeleteCommentInputSchema = exports.CreateCommentInputSchema = exports.CommentEntitySchema = void 0;
4
+ const zod_openapi_1 = require("@hono/zod-openapi");
8
5
  const constants_1 = require("../constants");
9
- exports.CommentEntitySchema = zod_1.default.object({
10
- id: zod_1.default.cuid2().openapi({
11
- description: "The unique CUID2 identifier for the comment.",
12
- example: "tr4q2k7k0000c7625z2k8ggy",
13
- }),
14
- userId: zod_1.default.cuid2().openapi({
15
- description: "The CUID2 of the user who created the comment.",
16
- example: "clq9p8f2z0000c762s7k4g1b",
17
- }),
18
- parentId: zod_1.default.cuid2().openapi({
19
- description: "The CUID2 of the parent entity (e.g., a post or project) this comment belongs to.",
20
- example: "clq9p8f2z0000c762s7k4g1b",
21
- }),
22
- parentCommentId: zod_1.default.cuid2().optional(),
23
- parentType: zod_1.default.enum(constants_1.ACTIVITY_PARENT_TYPES).openapi({
24
- description: "The type of the parent entity this comment is attached to.",
25
- example: "POST", // Assuming 'POST' is a value in ACTIVITY_PARENT_TYPES
26
- }),
27
- content: zod_1.default.string().openapi({
28
- description: "The text content of the comment. May contain Markdown.",
29
- example: "This is a great point! I hadn't considered that perspective.",
30
- }),
31
- commenterUsername: zod_1.default.string().optional(),
32
- commenterName: zod_1.default.string().optional(),
33
- commenterImageUrl: zod_1.default.string().optional(),
34
- replyToId: zod_1.default.cuid2().optional().nullable().openapi({
35
- description: "The ID of the parent comment if this is a reply. Null for top-level comments.",
36
- example: "tr4q2k7k0000c7625z2k8ggy", // Example of a parent comment's ID
37
- }),
38
- createdAt: zod_1.default.coerce.date().optional().openapi({
39
- description: "The date and time the comment was created.",
40
- example: "2023-10-27T10:00:00.000Z",
41
- format: "date-time",
42
- }),
43
- isLiked: zod_1.default.boolean().default(false),
44
- likesCount: zod_1.default.int().default(0),
45
- hasReplies: zod_1.default.boolean().optional(),
46
- updatedAt: zod_1.default.coerce.date().optional().openapi({
47
- description: "The date and time the comment was last updated.",
48
- example: "2023-10-27T10:05:00.000Z",
49
- format: "date-time",
50
- }),
6
+ /**
7
+ * --------------------------------
8
+ * SHAPE
9
+ * --------------------------------
10
+ */
11
+ const CommentShape = zod_openapi_1.z.object({
12
+ parentId: zod_openapi_1.z.cuid2(),
13
+ parentType: zod_openapi_1.z.enum(constants_1.ACTIVITY_PARENT_TYPES),
14
+ content: zod_openapi_1.z.string(),
15
+ parentCommentId: zod_openapi_1.z.cuid2().optional(),
16
+ replyToId: zod_openapi_1.z.cuid2().optional().nullable(),
51
17
  });
52
- exports.CommentInputSchema = zod_1.default
18
+ /**
19
+ * --------------------------------
20
+ * BASE ENTITY
21
+ * --------------------------------
22
+ */
23
+ exports.CommentEntitySchema = zod_openapi_1.z
53
24
  .object({
54
- content: zod_1.default.string(),
55
- parentCommentId: zod_1.default.cuid2().optional(),
56
- replyToId: zod_1.default.cuid2().optional(),
25
+ id: zod_openapi_1.z.cuid2(),
26
+ userId: zod_openapi_1.z.cuid2(),
27
+ ...CommentShape.shape,
28
+ commenterUsername: zod_openapi_1.z.string().optional(),
29
+ commenterName: zod_openapi_1.z.string().optional(),
30
+ commenterImageUrl: zod_openapi_1.z.string().optional(),
31
+ isLiked: zod_openapi_1.z.boolean().default(false),
32
+ likesCount: zod_openapi_1.z.int().default(0),
33
+ hasReplies: zod_openapi_1.z.boolean().optional(),
34
+ createdAt: zod_openapi_1.z.iso.datetime(),
35
+ updatedAt: zod_openapi_1.z.iso.datetime().optional(),
57
36
  })
58
- .openapi({ title: "Comment on Project" });
59
- exports.DeleteCommentInputSchema = zod_1.default.object({
60
- commentId: zod_1.default.cuid2(),
37
+ .openapi("Comment");
38
+ /**
39
+ * --------------------------------
40
+ * INPUTS
41
+ * --------------------------------
42
+ */
43
+ exports.CreateCommentInputSchema = zod_openapi_1.z.object({
44
+ content: zod_openapi_1.z.string(),
45
+ parentCommentId: zod_openapi_1.z.cuid2().optional(),
46
+ replyToId: zod_openapi_1.z.cuid2().optional().nullable(),
61
47
  });
48
+ exports.DeleteCommentInputSchema = zod_openapi_1.z.object({
49
+ commentId: zod_openapi_1.z.cuid2(),
50
+ });
51
+ /**
52
+ * --------------------------------
53
+ * OUTPUTS
54
+ * --------------------------------
55
+ */
62
56
  exports.CommentOutputSchema = exports.CommentEntitySchema;
@@ -27,10 +27,15 @@ export declare const DefaultApiSuccessOutputSchema: z.ZodObject<{
27
27
  export type ApiSuccessOutput = z.infer<typeof DefaultApiSuccessOutputSchema>;
28
28
  export declare const EntityCommentsOutputSchema: z.ZodObject<{
29
29
  comments: z.ZodArray<z.ZodObject<{
30
- id: z.ZodCUID2;
31
- userId: z.ZodCUID2;
30
+ commenterUsername: z.ZodOptional<z.ZodString>;
31
+ commenterName: z.ZodOptional<z.ZodString>;
32
+ commenterImageUrl: z.ZodOptional<z.ZodString>;
33
+ isLiked: z.ZodDefault<z.ZodBoolean>;
34
+ likesCount: z.ZodDefault<z.ZodInt>;
35
+ hasReplies: z.ZodOptional<z.ZodBoolean>;
36
+ createdAt: z.ZodISODateTime;
37
+ updatedAt: z.ZodOptional<z.ZodISODateTime>;
32
38
  parentId: z.ZodCUID2;
33
- parentCommentId: z.ZodOptional<z.ZodCUID2>;
34
39
  parentType: z.ZodEnum<{
35
40
  readonly PROJECT: "PROJECT";
36
41
  readonly USER: "USER";
@@ -44,15 +49,10 @@ export declare const EntityCommentsOutputSchema: z.ZodObject<{
44
49
  readonly JOB_APPLICATION: "JOB_APPLICATION";
45
50
  }>;
46
51
  content: z.ZodString;
47
- commenterUsername: z.ZodOptional<z.ZodString>;
48
- commenterName: z.ZodOptional<z.ZodString>;
49
- commenterImageUrl: z.ZodOptional<z.ZodString>;
52
+ parentCommentId: z.ZodOptional<z.ZodCUID2>;
50
53
  replyToId: z.ZodNullable<z.ZodOptional<z.ZodCUID2>>;
51
- createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
52
- isLiked: z.ZodDefault<z.ZodBoolean>;
53
- likesCount: z.ZodDefault<z.ZodInt>;
54
- hasReplies: z.ZodOptional<z.ZodBoolean>;
55
- updatedAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
54
+ id: z.ZodCUID2;
55
+ userId: z.ZodCUID2;
56
56
  }, z.core.$strip>>;
57
57
  nextCursor: z.ZodNullable<z.ZodString>;
58
58
  }, z.core.$strip>;
@@ -142,3 +142,7 @@ export declare const WorkExperienceSchema: z.ZodObject<{
142
142
  description: z.ZodDefault<z.ZodString>;
143
143
  }, z.core.$strip>;
144
144
  export declare const WebsiteUrlInputSchema: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, z.ZodUnion<[z.ZodURL, z.ZodLiteral<"">]>>>;
145
+ export type Cursor = {
146
+ id: string;
147
+ createdAt: string;
148
+ };
@@ -18,10 +18,10 @@ declare const CreativeShape: z.ZodObject<{
18
18
  workExperience: z.ZodDefault<z.ZodArray<z.ZodObject<{
19
19
  companyName: z.ZodString;
20
20
  position: z.ZodString;
21
- startDate: z.ZodOptional<z.ZodString>;
22
- endDate: z.ZodOptional<z.ZodString>;
21
+ startDate: z.ZodOptional<z.ZodISODateTime>;
22
+ endDate: z.ZodOptional<z.ZodISODateTime>;
23
23
  currentlyWorking: z.ZodDefault<z.ZodBoolean>;
24
- description: z.ZodDefault<z.ZodString>;
24
+ description: z.ZodOptional<z.ZodString>;
25
25
  }, z.core.$strip>>>;
26
26
  links: z.ZodDefault<z.ZodArray<z.ZodObject<{
27
27
  url: z.ZodURL;
@@ -63,10 +63,10 @@ export declare const CreativeEntitySchema: z.ZodObject<{
63
63
  workExperience: z.ZodDefault<z.ZodArray<z.ZodObject<{
64
64
  companyName: z.ZodString;
65
65
  position: z.ZodString;
66
- startDate: z.ZodOptional<z.ZodString>;
67
- endDate: z.ZodOptional<z.ZodString>;
66
+ startDate: z.ZodOptional<z.ZodISODateTime>;
67
+ endDate: z.ZodOptional<z.ZodISODateTime>;
68
68
  currentlyWorking: z.ZodDefault<z.ZodBoolean>;
69
- description: z.ZodDefault<z.ZodString>;
69
+ description: z.ZodOptional<z.ZodString>;
70
70
  }, z.core.$strip>>>;
71
71
  links: z.ZodDefault<z.ZodArray<z.ZodObject<{
72
72
  url: z.ZodURL;
@@ -90,8 +90,8 @@ export declare const CreativeEntitySchema: z.ZodObject<{
90
90
  export type CreativeEntity = z.infer<typeof CreativeEntitySchema>;
91
91
  export declare const MinimalCreativeEntitySchema: z.ZodObject<{
92
92
  id: z.ZodCUID2;
93
- createdAt: z.ZodString;
94
93
  userId: z.ZodCUID2;
94
+ createdAt: z.ZodString;
95
95
  updatedAt: z.ZodString;
96
96
  role: z.ZodDefault<z.ZodString>;
97
97
  bio: z.ZodDefault<z.ZodString>;
@@ -136,10 +136,10 @@ export declare const UpdateCreativeProfileInputSchema: z.ZodObject<{
136
136
  workExperience: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
137
137
  companyName: z.ZodString;
138
138
  position: z.ZodString;
139
- startDate: z.ZodOptional<z.ZodString>;
140
- endDate: z.ZodOptional<z.ZodString>;
139
+ startDate: z.ZodOptional<z.ZodISODateTime>;
140
+ endDate: z.ZodOptional<z.ZodISODateTime>;
141
141
  currentlyWorking: z.ZodDefault<z.ZodBoolean>;
142
- description: z.ZodDefault<z.ZodString>;
142
+ description: z.ZodOptional<z.ZodString>;
143
143
  }, z.core.$strip>>>>;
144
144
  links: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
145
145
  url: z.ZodURL;
@@ -202,10 +202,10 @@ export declare const CreateCreativeOutputSchema: z.ZodObject<{
202
202
  workExperience: z.ZodDefault<z.ZodArray<z.ZodObject<{
203
203
  companyName: z.ZodString;
204
204
  position: z.ZodString;
205
- startDate: z.ZodOptional<z.ZodString>;
206
- endDate: z.ZodOptional<z.ZodString>;
205
+ startDate: z.ZodOptional<z.ZodISODateTime>;
206
+ endDate: z.ZodOptional<z.ZodISODateTime>;
207
207
  currentlyWorking: z.ZodDefault<z.ZodBoolean>;
208
- description: z.ZodDefault<z.ZodString>;
208
+ description: z.ZodOptional<z.ZodString>;
209
209
  }, z.core.$strip>>>;
210
210
  links: z.ZodDefault<z.ZodArray<z.ZodObject<{
211
211
  url: z.ZodURL;
@@ -244,10 +244,10 @@ export declare const GetCreativeOutputSchema: z.ZodObject<{
244
244
  workExperience: z.ZodDefault<z.ZodArray<z.ZodObject<{
245
245
  companyName: z.ZodString;
246
246
  position: z.ZodString;
247
- startDate: z.ZodOptional<z.ZodString>;
248
- endDate: z.ZodOptional<z.ZodString>;
247
+ startDate: z.ZodOptional<z.ZodISODateTime>;
248
+ endDate: z.ZodOptional<z.ZodISODateTime>;
249
249
  currentlyWorking: z.ZodDefault<z.ZodBoolean>;
250
- description: z.ZodDefault<z.ZodString>;
250
+ description: z.ZodOptional<z.ZodString>;
251
251
  }, z.core.$strip>>>;
252
252
  links: z.ZodDefault<z.ZodArray<z.ZodObject<{
253
253
  url: z.ZodURL;
@@ -286,10 +286,10 @@ export declare const UpdateCreativeOutputSchema: z.ZodObject<{
286
286
  workExperience: z.ZodDefault<z.ZodArray<z.ZodObject<{
287
287
  companyName: z.ZodString;
288
288
  position: z.ZodString;
289
- startDate: z.ZodOptional<z.ZodString>;
290
- endDate: z.ZodOptional<z.ZodString>;
289
+ startDate: z.ZodOptional<z.ZodISODateTime>;
290
+ endDate: z.ZodOptional<z.ZodISODateTime>;
291
291
  currentlyWorking: z.ZodDefault<z.ZodBoolean>;
292
- description: z.ZodDefault<z.ZodString>;
292
+ description: z.ZodOptional<z.ZodString>;
293
293
  }, z.core.$strip>>>;
294
294
  links: z.ZodDefault<z.ZodArray<z.ZodObject<{
295
295
  url: z.ZodURL;
@@ -318,8 +318,8 @@ export type UpdateCreativeOutput = z.infer<typeof UpdateCreativeOutputSchema>;
318
318
  */
319
319
  export declare const CreativeWithUserEntitySchema: z.ZodObject<{
320
320
  id: z.ZodCUID2;
321
- createdAt: z.ZodString;
322
321
  userId: z.ZodCUID2;
322
+ createdAt: z.ZodString;
323
323
  updatedAt: z.ZodString;
324
324
  role: z.ZodDefault<z.ZodString>;
325
325
  bio: z.ZodDefault<z.ZodString>;
@@ -360,8 +360,8 @@ export type SearchCreativeInput = z.infer<typeof SearchCreativeInputSchema>;
360
360
  export declare const SearchCreativeOutputSchema: z.ZodObject<{
361
361
  creatives: z.ZodArray<z.ZodObject<{
362
362
  id: z.ZodCUID2;
363
- createdAt: z.ZodString;
364
363
  userId: z.ZodCUID2;
364
+ createdAt: z.ZodString;
365
365
  updatedAt: z.ZodString;
366
366
  role: z.ZodDefault<z.ZodString>;
367
367
  bio: z.ZodDefault<z.ZodString>;
@@ -20,10 +20,10 @@ const CreativeShape = zod_openapi_1.z.object({
20
20
  .array(zod_openapi_1.z.object({
21
21
  companyName: zod_openapi_1.z.string(),
22
22
  position: zod_openapi_1.z.string(),
23
- startDate: zod_openapi_1.z.string().datetime().optional(),
24
- endDate: zod_openapi_1.z.string().datetime().optional(),
23
+ startDate: zod_openapi_1.z.iso.datetime().optional(),
24
+ endDate: zod_openapi_1.z.iso.datetime().optional(),
25
25
  currentlyWorking: zod_openapi_1.z.boolean().default(false),
26
- description: zod_openapi_1.z.string().default(""),
26
+ description: zod_openapi_1.z.string().optional(),
27
27
  }))
28
28
  .default([]),
29
29
  links: zod_openapi_1.z
@@ -1,35 +1,87 @@
1
1
  import { z } from "@hono/zod-openapi";
2
+ /**
3
+ * --------------------------------
4
+ * SHAPE
5
+ * --------------------------------
6
+ */
7
+ declare const DisciplineShape: z.ZodObject<{
8
+ slug: z.ZodString;
9
+ name: z.ZodString;
10
+ }, z.core.$strip>;
11
+ export type DisciplineShapeType = z.infer<typeof DisciplineShape>;
12
+ declare const TagShape: z.ZodObject<{
13
+ name: z.ZodString;
14
+ disciplineSlug: z.ZodOptional<z.ZodString>;
15
+ }, z.core.$strip>;
16
+ export type TagShapeType = z.infer<typeof TagShape>;
17
+ /**
18
+ * --------------------------------
19
+ * BASE ENTITY
20
+ * --------------------------------
21
+ */
2
22
  export declare const BaseDisciplineEntitySchema: z.ZodObject<{
3
23
  slug: z.ZodString;
4
24
  name: z.ZodString;
5
25
  }, z.core.$strip>;
26
+ export type BaseDisciplineEntity = z.infer<typeof BaseDisciplineEntitySchema>;
6
27
  export declare const TagEntitySchema: z.ZodObject<{
7
- id: z.ZodInt;
8
28
  name: z.ZodString;
9
29
  disciplineSlug: z.ZodOptional<z.ZodString>;
30
+ id: z.ZodInt;
10
31
  }, z.core.$strip>;
32
+ export type TagEntity = z.infer<typeof TagEntitySchema>;
33
+ /**
34
+ * --------------------------------
35
+ * DERIVED ENTITIES
36
+ * --------------------------------
37
+ */
11
38
  export declare const DisciplineEntitySchema: z.ZodObject<{
12
39
  slug: z.ZodString;
13
40
  name: z.ZodString;
14
41
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
15
42
  }, z.core.$strip>;
16
- export declare const DisciplineUpdateOutputSchema: z.ZodObject<{
17
- slug: z.ZodString;
18
- }, z.core.$strip>;
43
+ export type DisciplineEntity = z.infer<typeof DisciplineEntitySchema>;
44
+ /**
45
+ * --------------------------------
46
+ * INPUTS
47
+ * --------------------------------
48
+ */
19
49
  export declare const CreateDisciplinesInputSchema: z.ZodObject<{
20
50
  disciplines: z.ZodArray<z.ZodObject<{
21
51
  name: z.ZodString;
22
52
  tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
23
53
  }, z.core.$strip>>;
24
54
  }, z.core.$strip>;
25
- export declare const CreateDisciplinesOutputSchema: z.ZodObject<{
26
- disciplines: z.ZodArray<z.ZodString>;
27
- }, z.core.$strip>;
55
+ export type CreateDisciplinesInput = z.infer<typeof CreateDisciplinesInputSchema>;
28
56
  export declare const GetDisciplinesInputSchema: z.ZodObject<{
29
- withTags: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"true">, z.ZodLiteral<"false">]>>;
30
- getDefault: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"true">, z.ZodLiteral<"false">]>>;
57
+ withTags: z.ZodPipe<z.ZodOptional<z.ZodEnum<{
58
+ true: "true";
59
+ false: "false";
60
+ }>>, z.ZodTransform<boolean, "true" | "false" | undefined>>;
61
+ getDefault: z.ZodPipe<z.ZodOptional<z.ZodEnum<{
62
+ true: "true";
63
+ false: "false";
64
+ }>>, z.ZodTransform<boolean, "true" | "false" | undefined>>;
31
65
  slugs: z.ZodOptional<z.ZodString>;
32
66
  }, z.core.$strip>;
67
+ export type GetDisciplinesInput = z.infer<typeof GetDisciplinesInputSchema>;
68
+ export declare const SlugInputSchema: z.ZodObject<{
69
+ slug: z.ZodString;
70
+ }, z.core.$strip>;
71
+ export type SlugInput = z.infer<typeof SlugInputSchema>;
72
+ /**
73
+ * --------------------------------
74
+ * OUTPUTS
75
+ * --------------------------------
76
+ */
77
+ export declare const DisciplineUpdateOutputSchema: z.ZodObject<{
78
+ slug: z.ZodString;
79
+ }, z.core.$strip>;
80
+ export type DisciplineUpdateOutput = z.infer<typeof DisciplineUpdateOutputSchema>;
81
+ export declare const CreateDisciplinesOutputSchema: z.ZodObject<{
82
+ disciplines: z.ZodArray<z.ZodString>;
83
+ }, z.core.$strip>;
84
+ export type CreateDisciplinesOutput = z.infer<typeof CreateDisciplinesOutputSchema>;
33
85
  export declare const GetDisciplinesOutputSchema: z.ZodObject<{
34
86
  disciplines: z.ZodArray<z.ZodObject<{
35
87
  slug: z.ZodString;
@@ -37,6 +89,5 @@ export declare const GetDisciplinesOutputSchema: z.ZodObject<{
37
89
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
38
90
  }, z.core.$strip>>;
39
91
  }, z.core.$strip>;
40
- export declare const SlugInputSchema: z.ZodObject<{
41
- slug: z.ZodString;
42
- }, z.core.$strip>;
92
+ export type GetDisciplinesOutput = z.infer<typeof GetDisciplinesOutputSchema>;
93
+ export {};
@@ -1,79 +1,76 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SlugInputSchema = exports.GetDisciplinesOutputSchema = exports.GetDisciplinesInputSchema = exports.CreateDisciplinesOutputSchema = exports.CreateDisciplinesInputSchema = exports.DisciplineUpdateOutputSchema = exports.DisciplineEntitySchema = exports.TagEntitySchema = exports.BaseDisciplineEntitySchema = void 0;
3
+ exports.GetDisciplinesOutputSchema = exports.CreateDisciplinesOutputSchema = exports.DisciplineUpdateOutputSchema = exports.SlugInputSchema = exports.GetDisciplinesInputSchema = exports.CreateDisciplinesInputSchema = exports.DisciplineEntitySchema = exports.TagEntitySchema = exports.BaseDisciplineEntitySchema = void 0;
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
- exports.BaseDisciplineEntitySchema = zod_openapi_1.z.object({
6
- slug: zod_openapi_1.z.string().openapi({ example: "digital-art" }),
7
- name: zod_openapi_1.z.string().openapi({ example: "Digital Art" }),
5
+ /**
6
+ * --------------------------------
7
+ * SHAPE
8
+ * --------------------------------
9
+ */
10
+ const DisciplineShape = zod_openapi_1.z.object({
11
+ slug: zod_openapi_1.z.string(),
12
+ name: zod_openapi_1.z.string(),
8
13
  });
9
- exports.TagEntitySchema = zod_openapi_1.z.object({
10
- id: zod_openapi_1.z.int(),
14
+ const TagShape = zod_openapi_1.z.object({
11
15
  name: zod_openapi_1.z.string(),
12
16
  disciplineSlug: zod_openapi_1.z.string().optional(),
13
17
  });
14
- exports.DisciplineEntitySchema = exports.BaseDisciplineEntitySchema.extend({
15
- tags: zod_openapi_1.z
16
- .array(zod_openapi_1.z.string().openapi({ example: "illustration" }))
17
- .optional()
18
- .openapi({ example: ["illustration", "concept-art"] }),
19
- }).openapi({ title: "DisciplineEntity" });
20
- exports.DisciplineUpdateOutputSchema = zod_openapi_1.z
21
- .object({
22
- slug: zod_openapi_1.z.string().openapi({ example: "digital-art" }),
23
- })
24
- .openapi({ title: "DisciplineUpdateOutput" });
25
- exports.CreateDisciplinesInputSchema = zod_openapi_1.z
18
+ /**
19
+ * --------------------------------
20
+ * BASE ENTITY
21
+ * --------------------------------
22
+ */
23
+ exports.BaseDisciplineEntitySchema = DisciplineShape.openapi("BaseDiscipline");
24
+ exports.TagEntitySchema = zod_openapi_1.z
26
25
  .object({
27
- disciplines: zod_openapi_1.z
28
- .array(zod_openapi_1.z.object({
29
- name: zod_openapi_1.z.string().max(128).openapi({ example: "Mathematics" }),
30
- tags: zod_openapi_1.z
31
- .array(zod_openapi_1.z.string().openapi({ example: "algebra" }))
32
- .default([])
33
- .openapi({ example: ["algebra", "geometry"] }),
34
- }))
35
- .openapi({
36
- description: "Array of disciplines to upsert.",
37
- example: [
38
- { name: "Mathematics", tags: ["algebra", "geometry"] },
39
- { name: "Physics", tags: ["mechanics", "optics"] },
40
- ],
41
- }),
42
- })
43
- .openapi({ title: "CreateDisciplinesInput" });
44
- exports.CreateDisciplinesOutputSchema = zod_openapi_1.z
45
- .object({
46
- disciplines: zod_openapi_1.z.array(zod_openapi_1.z.string()),
26
+ id: zod_openapi_1.z.int(),
27
+ ...TagShape.shape,
47
28
  })
48
- .openapi({ title: "CreateDisciplinesOutput" });
49
- exports.GetDisciplinesInputSchema = zod_openapi_1.z
50
- .object({
29
+ .openapi("Tag");
30
+ /**
31
+ * --------------------------------
32
+ * DERIVED ENTITIES
33
+ * --------------------------------
34
+ */
35
+ exports.DisciplineEntitySchema = exports.BaseDisciplineEntitySchema.extend({
36
+ tags: zod_openapi_1.z.array(zod_openapi_1.z.string()).optional(),
37
+ }).openapi("Discipline");
38
+ /**
39
+ * --------------------------------
40
+ * INPUTS
41
+ * --------------------------------
42
+ */
43
+ exports.CreateDisciplinesInputSchema = zod_openapi_1.z.object({
44
+ disciplines: zod_openapi_1.z.array(zod_openapi_1.z.object({
45
+ name: zod_openapi_1.z.string().max(128),
46
+ tags: zod_openapi_1.z.array(zod_openapi_1.z.string()).default([]),
47
+ })),
48
+ });
49
+ exports.GetDisciplinesInputSchema = zod_openapi_1.z.object({
51
50
  withTags: zod_openapi_1.z
52
- .union([zod_openapi_1.z.literal("true"), zod_openapi_1.z.literal("false")])
51
+ .enum(["true", "false"])
53
52
  .optional()
54
- .openapi({
55
- description: "Whether to include tags in the response.",
56
- example: "true",
57
- }),
53
+ .transform((value) => value === "true"),
58
54
  getDefault: zod_openapi_1.z
59
- .union([zod_openapi_1.z.literal("true"), zod_openapi_1.z.literal("false")])
55
+ .enum(["true", "false"])
60
56
  .optional()
61
- .openapi({
62
- description: "Fetch the default list of disciplines (non user-added disciplines).",
63
- }),
64
- slugs: zod_openapi_1.z.string().optional().openapi({
65
- description: "Comma-separated list of discipline slugs to filter by.",
66
- example: "mathematics,physics",
67
- }),
68
- })
69
- .openapi({ title: "GetDisciplinesInput" });
70
- exports.GetDisciplinesOutputSchema = zod_openapi_1.z
71
- .object({
57
+ .transform((value) => value === "true"),
58
+ slugs: zod_openapi_1.z.string().optional(),
59
+ });
60
+ exports.SlugInputSchema = zod_openapi_1.z.object({
61
+ slug: zod_openapi_1.z.string().max(128),
62
+ });
63
+ /**
64
+ * --------------------------------
65
+ * OUTPUTS
66
+ * --------------------------------
67
+ */
68
+ exports.DisciplineUpdateOutputSchema = zod_openapi_1.z.object({
69
+ slug: zod_openapi_1.z.string(),
70
+ });
71
+ exports.CreateDisciplinesOutputSchema = zod_openapi_1.z.object({
72
+ disciplines: zod_openapi_1.z.array(zod_openapi_1.z.string()),
73
+ });
74
+ exports.GetDisciplinesOutputSchema = zod_openapi_1.z.object({
72
75
  disciplines: zod_openapi_1.z.array(exports.DisciplineEntitySchema),
73
- })
74
- .openapi({ title: "GetDisciplinesOutput" });
75
- exports.SlugInputSchema = zod_openapi_1.z
76
- .object({
77
- slug: zod_openapi_1.z.string().max(128).openapi({ example: "mathematics" }),
78
- })
79
- .openapi({ title: "SlugInput" });
76
+ });