@zyacreatives/shared 2.5.54 → 2.5.56

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 (111) 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 +3 -3
  14. package/dist/schemas/discipline.d.ts +63 -12
  15. package/dist/schemas/discipline.js +62 -65
  16. package/dist/schemas/entity-stats.d.ts +35 -3
  17. package/dist/schemas/entity-stats.js +24 -38
  18. package/dist/schemas/feed.d.ts +50 -3
  19. package/dist/schemas/feed.js +43 -13
  20. package/dist/schemas/file.d.ts +65 -24
  21. package/dist/schemas/file.js +60 -49
  22. package/dist/schemas/index.d.ts +1 -0
  23. package/dist/schemas/index.js +1 -0
  24. package/dist/schemas/investor-shortlist.d.ts +68 -11
  25. package/dist/schemas/investor-shortlist.js +46 -24
  26. package/dist/schemas/investor-signal.d.ts +52 -12
  27. package/dist/schemas/investor-signal.js +59 -39
  28. package/dist/schemas/investor.d.ts +3 -3
  29. package/dist/schemas/job-application.d.ts +291 -279
  30. package/dist/schemas/job-application.js +59 -95
  31. package/dist/schemas/job.d.ts +200 -659
  32. package/dist/schemas/job.js +98 -231
  33. package/dist/schemas/like.d.ts +3 -0
  34. package/dist/schemas/message.d.ts +125 -94
  35. package/dist/schemas/message.js +54 -55
  36. package/dist/schemas/notification.d.ts +99 -32
  37. package/dist/schemas/notification.js +46 -42
  38. package/dist/schemas/payout-method.d.ts +51 -31
  39. package/dist/schemas/payout-method.js +48 -58
  40. package/dist/schemas/post.d.ts +295 -204
  41. package/dist/schemas/post.js +148 -272
  42. package/dist/schemas/product.d.ts +308 -229
  43. package/dist/schemas/product.js +111 -94
  44. package/dist/schemas/project.d.ts +512 -449
  45. package/dist/schemas/project.js +144 -102
  46. package/dist/schemas/seller.d.ts +10 -10
  47. package/dist/schemas/user-strike.d.ts +3 -0
  48. package/dist/schemas/user.d.ts +127 -136
  49. package/dist/schemas/username.d.ts +1 -0
  50. package/dist/schemas/view.d.ts +1 -0
  51. package/dist/types/activity.d.ts +1 -3
  52. package/dist/types/auth.d.ts +1 -4
  53. package/dist/types/bookmark.d.ts +1 -3
  54. package/dist/types/chat.d.ts +1 -11
  55. package/dist/types/comment.d.ts +1 -5
  56. package/dist/types/common.d.ts +2 -8
  57. package/dist/types/discipline.d.ts +1 -11
  58. package/dist/types/entity-stats.d.ts +1 -3
  59. package/dist/types/feed.d.ts +1 -5
  60. package/dist/types/investor-shortlist.d.ts +1 -6
  61. package/dist/types/investor-signal.d.ts +1 -7
  62. package/dist/types/like.d.ts +1 -3
  63. package/dist/types/message.d.ts +1 -9
  64. package/dist/types/notification.d.ts +1 -9
  65. package/dist/types/user-strike.d.ts +1 -5
  66. package/dist/types/username.d.ts +1 -3
  67. package/package.json +1 -1
  68. package/src/index.ts +4 -5
  69. package/src/schemas/activity.ts +5 -4
  70. package/src/schemas/auth.ts +14 -10
  71. package/src/schemas/bookmark.ts +48 -29
  72. package/src/schemas/chat.ts +79 -18
  73. package/src/schemas/comment.ts +63 -49
  74. package/src/schemas/common.ts +8 -3
  75. package/src/schemas/discipline.ts +103 -71
  76. package/src/schemas/entity-stats.ts +32 -38
  77. package/src/schemas/feed.ts +62 -15
  78. package/src/schemas/file.ts +85 -58
  79. package/src/schemas/index.ts +1 -0
  80. package/src/schemas/investor-shortlist.ts +57 -8
  81. package/src/schemas/investor-signal.ts +79 -27
  82. package/src/schemas/job-application.ts +81 -115
  83. package/src/schemas/job.ts +160 -301
  84. package/src/schemas/like.ts +5 -1
  85. package/src/schemas/message.ts +71 -64
  86. package/src/schemas/notification.ts +63 -51
  87. package/src/schemas/payout-method.ts +47 -63
  88. package/src/schemas/post.ts +211 -272
  89. package/src/schemas/product.ts +202 -139
  90. package/src/schemas/project.ts +265 -147
  91. package/src/schemas/user-strike.ts +7 -1
  92. package/src/schemas/user.ts +2 -6
  93. package/src/schemas/username.ts +5 -3
  94. package/src/schemas/view.ts +0 -50
  95. package/src/types/activity.ts +0 -4
  96. package/src/types/auth.ts +0 -5
  97. package/src/types/bookmark.ts +0 -4
  98. package/src/types/chat.ts +0 -31
  99. package/src/types/comment.ts +0 -12
  100. package/src/types/common.ts +0 -14
  101. package/src/types/discipline.ts +0 -32
  102. package/src/types/entity-stats.ts +0 -4
  103. package/src/types/feed.ts +0 -10
  104. package/src/types/index.ts +0 -16
  105. package/src/types/investor-shortlist.ts +0 -18
  106. package/src/types/investor-signal.ts +0 -26
  107. package/src/types/like.ts +0 -4
  108. package/src/types/message.ts +0 -26
  109. package/src/types/notification.ts +0 -34
  110. package/src/types/user-strike.ts +0 -10
  111. package/src/types/username.ts +0 -4
@@ -1,18 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProjectIdSchema = exports.CommentOnProjectOutputSchema = exports.DeleteProjectOutputSchema = exports.UpdateProjectOutputSchema = exports.CreateProjectOutputSchema = exports.ProjectUpdateOutputEntitySchema = exports.ProjectWithProjectBookmarksEntitySchema = exports.ProjectWithProjectViewsEntitySchema = exports.GetProjectWithLikesOutputSchema = exports.ProjectWithLikesEntitySchema = exports.GetProjectWithCommentsOutputSchema = exports.ProjectWithProjectCommentsEntitySchema = exports.SearchProjectsOutputSchema = exports.SearchProjectsInputSchema = exports.ProjectSearchDocumentSchema = exports.GetProjectOutputSchema = exports.ProjectDetailsEntitySchema = exports.CommentOnProjectInputSchema = exports.UpdateProjectInputSchema = exports.CreateProjectInputSchema = exports.ProjectSocialGraphEntitySchema = exports.MinimalProjectSchema = exports.ProjectWithFilesEntitySchema = exports.ProjectEntitySchema = void 0;
3
+ exports.CommentOnProjectOutputSchema = exports.DeleteProjectOutputSchema = exports.UpdateProjectOutputSchema = exports.CreateProjectOutputSchema = exports.ProjectUpdateOutputEntitySchema = exports.GetProjectWithLikesOutputSchema = exports.GetProjectWithCommentsOutputSchema = exports.SearchProjectsOutputSchema = exports.GetProjectOutputSchema = exports.ProjectSearchDocumentSchema = exports.ProjectIdSchema = exports.SearchProjectsInputSchema = exports.CommentOnProjectInputSchema = exports.UpdateProjectInputSchema = exports.CreateProjectInputSchema = exports.ProjectWithProjectBookmarksEntitySchema = exports.ProjectWithLikesEntitySchema = exports.ProjectWithProjectCommentsEntitySchema = exports.ProjectDetailsEntitySchema = exports.ProjectSocialGraphEntitySchema = exports.MinimalProjectSchema = exports.ProjectWithFilesEntitySchema = exports.ProjectEntitySchema = void 0;
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const constants_1 = require("../constants");
6
6
  const comment_1 = require("./comment");
7
7
  const bookmark_1 = require("./bookmark");
8
- const view_1 = require("./view");
9
8
  const user_1 = require("./user");
10
9
  const activity_1 = require("./activity");
11
10
  const file_1 = require("./file");
12
- exports.ProjectEntitySchema = zod_openapi_1.z
13
- .object({
14
- id: zod_openapi_1.z.cuid2(),
15
- userId: zod_openapi_1.z.cuid2(),
11
+ /**
12
+ * --------------------------------
13
+ * SHAPE
14
+ * --------------------------------
15
+ */
16
+ const ProjectShape = zod_openapi_1.z.object({
16
17
  title: zod_openapi_1.z.string(),
17
18
  description: zod_openapi_1.z.string().optional(),
18
19
  overview: zod_openapi_1.z.string().optional(),
@@ -21,9 +22,9 @@ exports.ProjectEntitySchema = zod_openapi_1.z
21
22
  tags: zod_openapi_1.z.array(zod_openapi_1.z.string()).optional(),
22
23
  projectCreatorType: zod_openapi_1.z.enum(constants_1.ROLES),
23
24
  clientId: zod_openapi_1.z.cuid2().optional(),
24
- status: zod_openapi_1.z.enum(constants_1.PROJECT_STATUS),
25
25
  clientType: zod_openapi_1.z.enum(constants_1.CLIENT_TYPES).optional(),
26
26
  clientName: zod_openapi_1.z.string().optional(),
27
+ status: zod_openapi_1.z.enum(constants_1.PROJECT_STATUS),
27
28
  isFeatured: zod_openapi_1.z.boolean().optional(),
28
29
  problemBeingSolved: zod_openapi_1.z.string().max(600).optional(),
29
30
  whoItsFor: zod_openapi_1.z.string().max(600).optional(),
@@ -32,16 +33,32 @@ exports.ProjectEntitySchema = zod_openapi_1.z
32
33
  capitalLookingToRaiseCurrency: zod_openapi_1.z.enum(constants_1.WAGES_CURRENCY).optional(),
33
34
  currentTraction: zod_openapi_1.z.string().max(600),
34
35
  isOpenToInvestment: zod_openapi_1.z.boolean().default(false),
35
- startDate: zod_openapi_1.z.coerce.date().optional(),
36
- endDate: zod_openapi_1.z.coerce.date().optional(),
37
- createdAt: zod_openapi_1.z.coerce.date(),
38
- updatedAt: zod_openapi_1.z.coerce.date(),
39
- version: zod_openapi_1.z.number().int(),
36
+ startDate: zod_openapi_1.z.iso.datetime().optional(),
37
+ endDate: zod_openapi_1.z.iso.datetime().optional(),
38
+ });
39
+ /**
40
+ * --------------------------------
41
+ * BASE ENTITY
42
+ * --------------------------------
43
+ */
44
+ exports.ProjectEntitySchema = zod_openapi_1.z
45
+ .object({
46
+ id: zod_openapi_1.z.cuid2(),
47
+ userId: zod_openapi_1.z.cuid2(),
48
+ ...ProjectShape.shape,
49
+ createdAt: zod_openapi_1.z.iso.datetime(),
50
+ updatedAt: zod_openapi_1.z.iso.datetime(),
51
+ version: zod_openapi_1.z.int(),
40
52
  })
41
- .openapi("ProjectEntity");
53
+ .openapi("Project");
54
+ /**
55
+ * --------------------------------
56
+ * DERIVED ENTITIES
57
+ * --------------------------------
58
+ */
42
59
  exports.ProjectWithFilesEntitySchema = exports.ProjectEntitySchema.extend({
43
60
  files: zod_openapi_1.z.array(file_1.FileEntitySchema).optional(),
44
- }).openapi("ProjectWithFilesEntity");
61
+ }).openapi("ProjectWithFiles");
45
62
  exports.MinimalProjectSchema = exports.ProjectEntitySchema.pick({
46
63
  id: true,
47
64
  title: true,
@@ -58,7 +75,61 @@ exports.ProjectSocialGraphEntitySchema = zod_openapi_1.z
58
75
  noOfBookmarks: zod_openapi_1.z.number().int().optional(),
59
76
  noOfViews: zod_openapi_1.z.number().int().optional(),
60
77
  })
61
- .openapi("ProjectSocialGraphEntity");
78
+ .openapi("ProjectSocialGraph");
79
+ exports.ProjectDetailsEntitySchema = exports.ProjectEntitySchema.extend({
80
+ user: user_1.MinimalUserSchema,
81
+ files: zod_openapi_1.z.array(file_1.FileEntitySchema).optional(),
82
+ }).openapi("ProjectDetails");
83
+ exports.ProjectWithProjectCommentsEntitySchema = exports.MinimalProjectSchema.extend({
84
+ comments: zod_openapi_1.z.array(comment_1.CommentEntitySchema),
85
+ }).openapi("ProjectWithProjectComments");
86
+ exports.ProjectWithLikesEntitySchema = exports.MinimalProjectSchema.extend({
87
+ likes: zod_openapi_1.z.array(activity_1.ActivitySchema.extend({
88
+ followsYou: zod_openapi_1.z.boolean().optional(),
89
+ isFollowing: zod_openapi_1.z.boolean().optional(),
90
+ })),
91
+ }).openapi("ProjectWithLikes");
92
+ exports.ProjectWithProjectBookmarksEntitySchema = exports.MinimalProjectSchema.extend({
93
+ bookmarks: zod_openapi_1.z.array(bookmark_1.BookmarkEntitySchema),
94
+ }).openapi("ProjectWithProjectBookmarks");
95
+ /**
96
+ * --------------------------------
97
+ * INPUT HELPERS
98
+ * --------------------------------
99
+ */
100
+ const coerceArray = (value) => {
101
+ if (typeof value === "string")
102
+ return value === "" ? [] : value.split(",");
103
+ return value;
104
+ };
105
+ const coerceBoolean = (value) => {
106
+ if (value === "true")
107
+ return true;
108
+ if (value === "false")
109
+ return false;
110
+ return value;
111
+ };
112
+ const nullableStringToUndefined = (value) => {
113
+ if (value === "" || value === null || value === undefined)
114
+ return undefined;
115
+ return value;
116
+ };
117
+ const urlInputSchema = zod_openapi_1.z
118
+ .string()
119
+ .transform((value) => {
120
+ if (!value)
121
+ return value;
122
+ if (value.startsWith("http://") || value.startsWith("https://")) {
123
+ return value;
124
+ }
125
+ return `https://${value}`;
126
+ })
127
+ .pipe(zod_openapi_1.z.url().or(zod_openapi_1.z.literal("")));
128
+ /**
129
+ * --------------------------------
130
+ * INPUTS
131
+ * --------------------------------
132
+ */
62
133
  exports.CreateProjectInputSchema = zod_openapi_1.z
63
134
  .object({
64
135
  id: zod_openapi_1.z.cuid2().optional(),
@@ -77,25 +148,11 @@ exports.UpdateProjectInputSchema = zod_openapi_1.z
77
148
  .min(10, "Add a bit more detail to your description.")
78
149
  .optional(),
79
150
  overview: zod_openapi_1.z.string().optional(),
80
- url: zod_openapi_1.z
81
- .string()
82
- .transform((val) => {
83
- if (!val)
84
- return val;
85
- if (val.startsWith("http://") || val.startsWith("https://"))
86
- return val;
87
- return `https://${val}`;
88
- })
89
- .pipe(zod_openapi_1.z.url("Check your link.").or(zod_openapi_1.z.literal("")))
90
- .optional(),
151
+ url: urlInputSchema.optional(),
91
152
  imagePlaceholderUrl: zod_openapi_1.z.url().optional().or(zod_openapi_1.z.literal("")),
92
153
  tags: zod_openapi_1.z.array(zod_openapi_1.z.string()).optional(),
93
154
  projectCreatorType: zod_openapi_1.z.enum(constants_1.ROLES).optional(),
94
- clientId: zod_openapi_1.z
95
- .string()
96
- .optional()
97
- .transform((val) => (val === "" || val === undefined ? undefined : val))
98
- .pipe(zod_openapi_1.z.cuid2().optional()),
155
+ clientId: zod_openapi_1.z.preprocess(nullableStringToUndefined, zod_openapi_1.z.cuid2().optional()),
99
156
  clientType: zod_openapi_1.z.enum(constants_1.CLIENT_TYPES).optional(),
100
157
  clientName: zod_openapi_1.z.string().optional(),
101
158
  isFeatured: zod_openapi_1.z.boolean().optional(),
@@ -119,21 +176,25 @@ exports.UpdateProjectInputSchema = zod_openapi_1.z
119
176
  .max(600)
120
177
  .optional(),
121
178
  isOpenToInvestment: zod_openapi_1.z.boolean().default(false),
122
- startDate: zod_openapi_1.z.coerce.date().optional(),
123
- endDate: zod_openapi_1.z.coerce.date().optional(),
124
- version: zod_openapi_1.z.number().int().default(1),
179
+ startDate: zod_openapi_1.z.iso.datetime().optional(),
180
+ endDate: zod_openapi_1.z.iso.datetime().optional(),
181
+ version: zod_openapi_1.z.int().default(1),
125
182
  })
126
183
  .superRefine(({ startDate, endDate }, ctx) => {
184
+ if (!startDate)
185
+ return;
127
186
  const today = new Date();
128
187
  today.setHours(0, 0, 0, 0);
129
- if (startDate && startDate > today) {
188
+ const parsedStartDate = new Date(startDate);
189
+ const parsedEndDate = endDate ? new Date(endDate) : undefined;
190
+ if (parsedStartDate > today) {
130
191
  ctx.addIssue({
131
192
  path: ["startDate"],
132
193
  code: "custom",
133
194
  message: "Start date cannot be in the future.",
134
195
  });
135
196
  }
136
- if (startDate && endDate && startDate > endDate) {
197
+ if (parsedEndDate && parsedStartDate > parsedEndDate) {
137
198
  ctx.addIssue({
138
199
  path: ["endDate"],
139
200
  code: "custom",
@@ -143,24 +204,44 @@ exports.UpdateProjectInputSchema = zod_openapi_1.z
143
204
  })
144
205
  .openapi("UpdateProjectInput");
145
206
  exports.CommentOnProjectInputSchema = comment_1.CommentEntitySchema;
146
- exports.ProjectDetailsEntitySchema = exports.ProjectEntitySchema.extend({
147
- user: user_1.MinimalUserSchema,
148
- files: zod_openapi_1.z.array(file_1.FileEntitySchema).optional(),
149
- }).openapi("ProjectDetailsEntity");
150
- exports.GetProjectOutputSchema = exports.ProjectDetailsEntitySchema.extend({
151
- isLiked: zod_openapi_1.z.boolean().optional(),
152
- isBookmarked: zod_openapi_1.z.boolean().optional(),
153
- }).openapi("GetProjectOutput");
207
+ exports.SearchProjectsInputSchema = zod_openapi_1.z
208
+ .object({
209
+ query: zod_openapi_1.z.string().optional(),
210
+ limit: zod_openapi_1.z.coerce.number().min(1).max(100).default(40),
211
+ cursor: zod_openapi_1.z.string().optional(),
212
+ tags: zod_openapi_1.z.preprocess(coerceArray, zod_openapi_1.z.array(zod_openapi_1.z.string())).optional(),
213
+ isOpenToInvestment: zod_openapi_1.z.preprocess(coerceBoolean, zod_openapi_1.z.boolean()).optional(),
214
+ minCapital: zod_openapi_1.z.coerce.number().optional(),
215
+ maxCapital: zod_openapi_1.z.coerce.number().optional(),
216
+ ventureStages: zod_openapi_1.z
217
+ .preprocess(coerceArray, zod_openapi_1.z.array(zod_openapi_1.z.enum(constants_1.VENTURE_STAGES)))
218
+ .optional(),
219
+ projectCreatorTypes: zod_openapi_1.z
220
+ .preprocess(coerceArray, zod_openapi_1.z.array(zod_openapi_1.z.enum(constants_1.ROLES)))
221
+ .optional(),
222
+ clientTypes: zod_openapi_1.z
223
+ .preprocess(coerceArray, zod_openapi_1.z.array(zod_openapi_1.z.enum(constants_1.CLIENT_TYPES)))
224
+ .optional(),
225
+ })
226
+ .openapi("SearchProjectsInput");
227
+ exports.ProjectIdSchema = zod_openapi_1.z.object({
228
+ projectId: zod_openapi_1.z.cuid2(),
229
+ });
230
+ /**
231
+ * --------------------------------
232
+ * SEARCH DOCUMENT
233
+ * --------------------------------
234
+ */
154
235
  exports.ProjectSearchDocumentSchema = zod_openapi_1.z
155
236
  .object({
156
- id: zod_openapi_1.z.string(),
157
- userId: zod_openapi_1.z.string(),
237
+ id: zod_openapi_1.z.cuid2(),
238
+ userId: zod_openapi_1.z.cuid2(),
158
239
  title: zod_openapi_1.z.string(),
159
240
  imagePlaceholderUrl: zod_openapi_1.z.url(),
160
241
  projectCreatorType: zod_openapi_1.z.enum(constants_1.ROLES),
161
242
  isOpenToInvestment: zod_openapi_1.z.boolean(),
162
- createdAt: zod_openapi_1.z.number(),
163
- updatedAt: zod_openapi_1.z.number(),
243
+ createdAt: zod_openapi_1.z.iso.datetime(),
244
+ updatedAt: zod_openapi_1.z.iso.datetime(),
164
245
  description: zod_openapi_1.z.string().optional(),
165
246
  capitalLookingToRaise: zod_openapi_1.z.number().optional(),
166
247
  capitalLookingToRaiseCurrency: zod_openapi_1.z.enum(constants_1.WAGES_CURRENCY).optional(),
@@ -170,74 +251,36 @@ exports.ProjectSearchDocumentSchema = zod_openapi_1.z
170
251
  creatorUsername: zod_openapi_1.z.string(),
171
252
  creatorImageUrl: zod_openapi_1.z.string(),
172
253
  creatorName: zod_openapi_1.z.string(),
173
- clientId: zod_openapi_1.z.string().optional(),
254
+ clientId: zod_openapi_1.z.cuid2().optional(),
174
255
  clientType: zod_openapi_1.z.enum(constants_1.CLIENT_TYPES).optional(),
175
256
  clientName: zod_openapi_1.z.string().optional(),
176
257
  isFeatured: zod_openapi_1.z.boolean().optional(),
177
- startDate: zod_openapi_1.z.number().optional(),
178
- endDate: zod_openapi_1.z.number().optional(),
258
+ startDate: zod_openapi_1.z.iso.datetime().optional(),
259
+ endDate: zod_openapi_1.z.iso.datetime().optional(),
179
260
  files: zod_openapi_1.z.array(file_1.FileEntitySchema).optional(),
180
261
  })
181
262
  .openapi("ProjectSearchDocument");
182
- const coerceArray = (val) => {
183
- if (typeof val === "string")
184
- return val === "" ? [] : val.split(",");
185
- return val;
186
- };
187
- const coerceBoolean = (val) => {
188
- if (val === "true")
189
- return true;
190
- if (val === "false")
191
- return false;
192
- return val;
193
- };
194
- exports.SearchProjectsInputSchema = zod_openapi_1.z
195
- .object({
196
- query: zod_openapi_1.z.string().optional(),
197
- limit: zod_openapi_1.z.coerce.number().optional().default(40),
198
- cursor: zod_openapi_1.z.string().optional().nullable(),
199
- tags: zod_openapi_1.z.preprocess(coerceArray, zod_openapi_1.z.array(zod_openapi_1.z.string())).optional(),
200
- isOpenToInvestment: zod_openapi_1.z.preprocess(coerceBoolean, zod_openapi_1.z.boolean()).optional(),
201
- minCapital: zod_openapi_1.z.coerce.number().optional(),
202
- maxCapital: zod_openapi_1.z.coerce.number().optional(),
203
- ventureStages: zod_openapi_1.z
204
- .preprocess(coerceArray, zod_openapi_1.z.array(zod_openapi_1.z.enum(constants_1.VENTURE_STAGES)))
205
- .optional(),
206
- projectCreatorTypes: zod_openapi_1.z
207
- .preprocess(coerceArray, zod_openapi_1.z.array(zod_openapi_1.z.enum(constants_1.ROLES)))
208
- .optional(),
209
- clientTypes: zod_openapi_1.z
210
- .preprocess(coerceArray, zod_openapi_1.z.array(zod_openapi_1.z.enum(constants_1.CLIENT_TYPES)))
211
- .optional(),
212
- })
213
- .openapi("SearchProjectsInput");
263
+ /**
264
+ * --------------------------------
265
+ * OUTPUTS
266
+ * --------------------------------
267
+ */
268
+ exports.GetProjectOutputSchema = exports.ProjectDetailsEntitySchema.extend({
269
+ isLiked: zod_openapi_1.z.boolean().optional(),
270
+ isBookmarked: zod_openapi_1.z.boolean().optional(),
271
+ }).openapi("GetProjectOutput");
214
272
  exports.SearchProjectsOutputSchema = zod_openapi_1.z
215
273
  .object({
216
274
  projects: zod_openapi_1.z.array(exports.ProjectSearchDocumentSchema),
217
- nextCursor: zod_openapi_1.z.string().optional().nullable(),
275
+ nextCursor: zod_openapi_1.z.string().optional(),
218
276
  })
219
277
  .openapi("SearchProjectsOutput");
220
- exports.ProjectWithProjectCommentsEntitySchema = exports.MinimalProjectSchema.extend({
221
- comments: zod_openapi_1.z.array(comment_1.CommentEntitySchema),
222
- }).openapi("ProjectWithProjectCommentsEntity");
223
278
  exports.GetProjectWithCommentsOutputSchema = exports.ProjectWithProjectCommentsEntitySchema.extend({
224
- nextCursor: zod_openapi_1.z.string().optional().nullable(),
279
+ nextCursor: zod_openapi_1.z.string().optional(),
225
280
  }).openapi("GetProjectWithCommentsOutput");
226
- exports.ProjectWithLikesEntitySchema = exports.MinimalProjectSchema.extend({
227
- likes: zod_openapi_1.z.array(activity_1.ActivitySchema.extend({
228
- followsYou: zod_openapi_1.z.boolean().optional(),
229
- isFollowing: zod_openapi_1.z.boolean().optional(),
230
- })),
231
- }).openapi("ProjectWithLikesEntity");
232
281
  exports.GetProjectWithLikesOutputSchema = exports.ProjectWithLikesEntitySchema.extend({
233
- nextCursor: zod_openapi_1.z.string().optional().nullable(),
282
+ nextCursor: zod_openapi_1.z.string().optional(),
234
283
  }).openapi("GetProjectWithLikesOutput");
235
- exports.ProjectWithProjectViewsEntitySchema = exports.MinimalProjectSchema.extend({
236
- views: zod_openapi_1.z.array(view_1.ViewEntitySchema),
237
- }).openapi("ProjectWithProjectViewsEntity");
238
- exports.ProjectWithProjectBookmarksEntitySchema = exports.MinimalProjectSchema.extend({
239
- bookmarks: zod_openapi_1.z.array(bookmark_1.BookmarkEntitySchema),
240
- }).openapi("ProjectWithProjectBookmarksEntity");
241
284
  exports.ProjectUpdateOutputEntitySchema = zod_openapi_1.z.object({
242
285
  id: zod_openapi_1.z.cuid2(),
243
286
  });
@@ -248,4 +291,3 @@ exports.CommentOnProjectOutputSchema = comment_1.CommentEntitySchema.omit({
248
291
  likesCount: true,
249
292
  isLiked: true,
250
293
  });
251
- exports.ProjectIdSchema = zod_openapi_1.z.object({ projectId: zod_openapi_1.z.cuid2() });
@@ -58,26 +58,26 @@ export declare const SellerProfileSchema: z.ZodObject<{
58
58
  createdAt: z.ZodCoercedDate<unknown>;
59
59
  updatedAt: z.ZodCoercedDate<unknown>;
60
60
  payoutMethods: z.ZodArray<z.ZodObject<{
61
- id: z.ZodCUID2;
62
- sellerId: z.ZodCUID2;
61
+ status: z.ZodEnum<{
62
+ readonly VERIFIED: "VERIFIED";
63
+ readonly PENDING: "PENDING";
64
+ readonly REJECTED: "REJECTED";
65
+ }>;
66
+ createdAt: z.ZodISODateTime;
67
+ updatedAt: z.ZodISODateTime;
63
68
  provider: z.ZodEnum<{
64
69
  readonly PAYSTACK: "PAYSTACK";
65
70
  readonly STRIPE: "STRIPE";
66
71
  readonly NONE: "NONE";
67
72
  }>;
68
- currency: z.ZodString;
69
73
  bankName: z.ZodString;
70
74
  accountLast4: z.ZodString;
71
75
  accountName: z.ZodString;
72
76
  externalBankId: z.ZodNullable<z.ZodString>;
73
77
  isDefault: z.ZodBoolean;
74
- status: z.ZodDefault<z.ZodEnum<{
75
- readonly VERIFIED: "VERIFIED";
76
- readonly PENDING: "PENDING";
77
- readonly REJECTED: "REJECTED";
78
- }>>;
79
- createdAt: z.ZodCoercedDate<unknown>;
80
- updatedAt: z.ZodCoercedDate<unknown>;
78
+ id: z.ZodCUID2;
79
+ sellerId: z.ZodCUID2;
80
+ currency: z.ZodString;
81
81
  }, z.core.$strip>>;
82
82
  }, z.core.$strip>;
83
83
  export type SellerProfile = z.infer<typeof SellerProfileSchema>;
@@ -59,3 +59,6 @@ export declare const UpsertUserStrikeOutputSchema: z.ZodObject<{
59
59
  createdAt: z.ZodCoercedDate<unknown>;
60
60
  updatedAt: z.ZodCoercedDate<unknown>;
61
61
  }, z.core.$strip>;
62
+ export type UserStrikeEntity = z.infer<typeof UserStrikeEntitySchema>;
63
+ export type UpsertUserStrikeInput = z.infer<typeof UpsertUserStrikeInputSchema>;
64
+ export type UpsertUserStrikeOutput = z.infer<typeof UpsertUserStrikeOutputSchema>;