@zyacreatives/shared 2.5.78 → 2.5.80

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/schemas/chat.d.ts +6 -0
  2. package/dist/schemas/chat.js +6 -1
  3. package/dist/schemas/comment.d.ts +72 -0
  4. package/dist/schemas/comment.js +15 -1
  5. package/dist/schemas/common.d.ts +5 -0
  6. package/dist/schemas/common.js +4 -1
  7. package/dist/schemas/discipline.d.ts +6 -0
  8. package/dist/schemas/discipline.js +5 -1
  9. package/dist/schemas/feed.d.ts +106 -0
  10. package/dist/schemas/feed.js +6 -1
  11. package/dist/schemas/file.d.ts +16 -0
  12. package/dist/schemas/file.js +12 -1
  13. package/dist/schemas/investor-shortlist.d.ts +9 -0
  14. package/dist/schemas/investor-shortlist.js +6 -1
  15. package/dist/schemas/investor-signal.d.ts +9 -0
  16. package/dist/schemas/investor-signal.js +6 -1
  17. package/dist/schemas/job-application.d.ts +41 -0
  18. package/dist/schemas/job-application.js +10 -1
  19. package/dist/schemas/job.d.ts +1 -0
  20. package/dist/schemas/message.d.ts +14 -0
  21. package/dist/schemas/message.js +13 -1
  22. package/dist/schemas/notification.d.ts +22 -0
  23. package/dist/schemas/notification.js +9 -0
  24. package/dist/schemas/payout-method.d.ts +9 -0
  25. package/dist/schemas/payout-method.js +8 -1
  26. package/dist/schemas/product.d.ts +4 -5
  27. package/dist/schemas/product.js +4 -6
  28. package/dist/schemas/transaction.d.ts +72 -1
  29. package/dist/schemas/transaction.js +36 -1
  30. package/dist/schemas/user.d.ts +39 -1
  31. package/dist/schemas/user.js +15 -1
  32. package/docs/backend-openapi-shared-contracts-handoff.md +193 -0
  33. package/package.json +1 -1
  34. package/src/schemas/chat.ts +25 -17
  35. package/src/schemas/comment.ts +40 -8
  36. package/src/schemas/common.ts +18 -11
  37. package/src/schemas/discipline.ts +24 -10
  38. package/src/schemas/feed.ts +18 -7
  39. package/src/schemas/file.ts +37 -13
  40. package/src/schemas/investor-shortlist.ts +30 -15
  41. package/src/schemas/investor-signal.ts +36 -21
  42. package/src/schemas/job-application.ts +34 -15
  43. package/src/schemas/job.ts +11 -9
  44. package/src/schemas/message.ts +29 -6
  45. package/src/schemas/notification.ts +13 -4
  46. package/src/schemas/payout-method.ts +18 -5
  47. package/src/schemas/product.ts +8 -6
  48. package/src/schemas/transaction.ts +61 -8
  49. package/src/schemas/user.ts +44 -16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.5.78",
3
+ "version": "2.5.80",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -72,9 +72,9 @@ export const CreateChatInputSchema = z.object({
72
72
 
73
73
  export type CreateChatInput = z.infer<typeof CreateChatInputSchema>;
74
74
 
75
- export const ChatIdInputSchema = z.object({
76
- chatId: z.cuid2(),
77
- });
75
+ export const ChatIdInputSchema = z.object({
76
+ chatId: z.cuid2(),
77
+ });
78
78
 
79
79
  export type ChatIdInput = z.infer<typeof ChatIdInputSchema>;
80
80
 
@@ -118,17 +118,25 @@ export type GetMessageRequestsForUserOutput = z.infer<
118
118
  typeof GetMessageRequestsForUserOutputSchema
119
119
  >;
120
120
 
121
- export const ReportChatInputSchema = z.object({
122
- complaint: z.string().trim().min(10).max(1000),
123
- messageId: z.cuid2().optional(),
124
- });
125
-
126
- export type ReportChatInput = z.infer<typeof ReportChatInputSchema>
127
-
128
- export const ReportChatOutputSchema = z.object({
129
- reported: z.boolean(),
130
- chatId: z.string(),
131
- messageId: z.string().nullable(),
132
- });
133
-
134
- export type ReportChatOutput = z.infer<typeof ReportChatOutputSchema>
121
+ export const ReportChatInputSchema = z.object({
122
+ complaint: z.string().trim().min(10).max(1000),
123
+ messageId: z.cuid2().optional(),
124
+ });
125
+
126
+ export type ReportChatInput = z.infer<typeof ReportChatInputSchema>;
127
+
128
+ export const ReportChatOutputSchema = z.object({
129
+ reported: z.boolean(),
130
+ chatId: z.string(),
131
+ messageId: z.string().nullable(),
132
+ });
133
+
134
+ export type ReportChatOutput = z.infer<typeof ReportChatOutputSchema>;
135
+
136
+ export const ChatListQuerySchema = z.object({
137
+ cursor: z.string().optional(),
138
+ query: z.string().trim().max(100).optional(),
139
+ limit: z.coerce.number().int().min(1).max(100).default(20),
140
+ });
141
+
142
+ export type ChatListQuery = z.infer<typeof ChatListQuerySchema>;
@@ -59,11 +59,26 @@ export const CreateCommentInputSchema = z.object({
59
59
 
60
60
  export type CreateCommentInput = z.infer<typeof CreateCommentInputSchema>;
61
61
 
62
- export const DeleteCommentInputSchema = z.object({
63
- commentId: z.cuid2(),
64
- });
65
-
66
- export type DeleteCommentInput = z.infer<typeof DeleteCommentInputSchema>;
62
+ export const DeleteCommentInputSchema = z.object({
63
+ commentId: z.cuid2(),
64
+ });
65
+
66
+ export type DeleteCommentInput = z.infer<typeof DeleteCommentInputSchema>;
67
+
68
+ export const CommentIdInputSchema = z.object({
69
+ commentId: z.cuid2(),
70
+ });
71
+
72
+ export type CommentIdInput = z.infer<typeof CommentIdInputSchema>;
73
+
74
+ export const ProjectCommentParamsSchema = z.object({
75
+ projectId: z.cuid2(),
76
+ commentId: z.cuid2(),
77
+ });
78
+
79
+ export type ProjectCommentParams = z.infer<
80
+ typeof ProjectCommentParamsSchema
81
+ >;
67
82
 
68
83
  /**
69
84
  * --------------------------------
@@ -71,6 +86,23 @@ export type DeleteCommentInput = z.infer<typeof DeleteCommentInputSchema>;
71
86
  * --------------------------------
72
87
  */
73
88
 
74
- export const CommentOutputSchema = CommentEntitySchema;
75
-
76
- export type CommentOutput = z.infer<typeof CommentOutputSchema>;
89
+ export const CommentOutputSchema = CommentEntitySchema;
90
+
91
+ export type CommentOutput = z.infer<typeof CommentOutputSchema>;
92
+
93
+ export const CommentThreadResponseSchema = z.object({
94
+ comments: z.array(CommentEntitySchema),
95
+ });
96
+
97
+ export type CommentThreadResponse = z.infer<
98
+ typeof CommentThreadResponseSchema
99
+ >;
100
+
101
+ export const CommentRepliesOutputSchema = z.object({
102
+ replies: z.array(CommentEntitySchema),
103
+ nextCursor: z.string().nullable(),
104
+ });
105
+
106
+ export type CommentRepliesOutput = z.infer<
107
+ typeof CommentRepliesOutputSchema
108
+ >;
@@ -1,9 +1,15 @@
1
- import { z } from "@hono/zod-openapi";
2
- import { CommentEntitySchema } from "./comment";
3
- import { ActivitySchema } from "./activity";
4
- import { LINK_TYPES } from "../constants";
5
-
6
- export const CuidSchema = z.cuid2({ error: "Invalid CUID2 is written." });
1
+ import { z } from "@hono/zod-openapi";
2
+ import { CommentEntitySchema } from "./comment";
3
+ import { ActivitySchema } from "./activity";
4
+ import { LINK_TYPES } from "../constants";
5
+
6
+ export const CuidSchema = z.cuid2({ error: "Invalid CUID2 is written." });
7
+
8
+ export const IdInputSchema = z.object({
9
+ id: z.cuid2(),
10
+ });
11
+
12
+ export type IdInput = z.infer<typeof IdInputSchema>;
7
13
 
8
14
  export const UserIdentifierSchema = z.object({
9
15
  by: z.enum(["id", "username"]).optional().default("id"),
@@ -23,11 +29,12 @@ export const ProjectIdentifierSchema = z.object({
23
29
 
24
30
  export type ProjectIdentifier = z.infer<typeof ProjectIdentifierSchema>;
25
31
 
26
- export const DefaultApiSuccessOutputSchema = z.object({
27
- status: z.literal("success"),
28
- });
29
-
30
- export type ApiSuccessOutput = z.infer<typeof DefaultApiSuccessOutputSchema>;
32
+ export const DefaultApiSuccessOutputSchema = z.object({
33
+ status: z.literal("success"),
34
+ });
35
+
36
+ export type ApiSuccessOutput = z.infer<typeof DefaultApiSuccessOutputSchema>;
37
+ export type DefaultApiSuccessOutput = ApiSuccessOutput;
31
38
 
32
39
  export const EntityCommentsOutputSchema = z.object({
33
40
  comments: z.array(CommentEntitySchema),
@@ -85,11 +85,19 @@ export const GetDisciplinesInputSchema = z.object({
85
85
 
86
86
  export type GetDisciplinesInput = z.infer<typeof GetDisciplinesInputSchema>;
87
87
 
88
- export const SlugInputSchema = z.object({
89
- slug: z.string().max(128),
90
- });
91
-
92
- export type SlugInput = z.infer<typeof SlugInputSchema>;
88
+ export const SlugInputSchema = z.object({
89
+ slug: z.string().max(128),
90
+ });
91
+
92
+ export type SlugInput = z.infer<typeof SlugInputSchema>;
93
+
94
+ export const GetDisciplineTagsInputSchema = z.object({
95
+ substring: z.string(),
96
+ });
97
+
98
+ export type GetDisciplineTagsInput = z.infer<
99
+ typeof GetDisciplineTagsInputSchema
100
+ >;
93
101
 
94
102
  /**
95
103
  * --------------------------------
@@ -113,8 +121,14 @@ export type CreateDisciplinesOutput = z.infer<
113
121
  typeof CreateDisciplinesOutputSchema
114
122
  >;
115
123
 
116
- export const GetDisciplinesOutputSchema = z.object({
117
- disciplines: z.array(DisciplineEntitySchema),
118
- });
119
-
120
- export type GetDisciplinesOutput = z.infer<typeof GetDisciplinesOutputSchema>;
124
+ export const GetDisciplinesOutputSchema = z.object({
125
+ disciplines: z.array(DisciplineEntitySchema),
126
+ });
127
+
128
+ export type GetDisciplinesOutput = z.infer<typeof GetDisciplinesOutputSchema>;
129
+
130
+ export const GetDisciplineTagsOutputSchema = z.array(z.string());
131
+
132
+ export type GetDisciplineTagsOutput = z.infer<
133
+ typeof GetDisciplineTagsOutputSchema
134
+ >;
@@ -1,4 +1,6 @@
1
- import { z } from "@hono/zod-openapi";
1
+ import { z } from "@hono/zod-openapi";
2
+
3
+ import { FeedPostEntitySchema } from "./post";
2
4
 
3
5
  /**
4
6
  * --------------------------------
@@ -64,11 +66,20 @@ export const FeedTagsOutputSchema = FeedTagsEntitySchema;
64
66
 
65
67
  export type FeedTagsOutput = z.infer<typeof FeedTagsOutputSchema>;
66
68
 
67
- export const TrendingUsersOutputSchema = z.object({
68
- creators: z.array(TrendingUserSchema),
69
- });
70
-
71
- export type TrendingUsersOutput = z.infer<typeof TrendingUsersOutputSchema>;
69
+ export const TrendingUsersOutputSchema = z.object({
70
+ creators: z.array(TrendingUserSchema),
71
+ });
72
+
73
+ export type TrendingUsersOutput = z.infer<typeof TrendingUsersOutputSchema>;
74
+
75
+ export const GetFeedWithCommentPolicyOutputSchema = z.object({
76
+ feed: z.array(FeedPostEntitySchema),
77
+ nextCursor: z.string().optional(),
78
+ });
79
+
80
+ export type GetFeedWithCommentPolicyOutput = z.infer<
81
+ typeof GetFeedWithCommentPolicyOutputSchema
82
+ >;
72
83
 
73
84
  export const FeedTagsInputSchema = z.object({
74
85
  tags: z.array(z.string().min(1)).default([]),
@@ -79,4 +90,4 @@ export const FeedTagsSchema = z.object({
79
90
  tags: z.array(z.string()),
80
91
  });
81
92
 
82
- export type FeedTagsInput = z.infer<typeof FeedTagsInputSchema>;
93
+ export type FeedTagsInput = z.infer<typeof FeedTagsInputSchema>;
@@ -86,13 +86,28 @@ export type GetPresignedUploadUrlInput = z.infer<
86
86
  typeof GetPresignedUploadUrlInputSchema
87
87
  >;
88
88
 
89
- export const GetPresignedDownloadUrlInputSchema = z.object({
90
- fileId: z.cuid2(),
91
- });
92
-
93
- export type GetPresignedDownloadUrlInput = z.infer<
94
- typeof GetPresignedDownloadUrlInputSchema
95
- >;
89
+ export const GetPresignedDownloadUrlInputSchema = z.object({
90
+ fileId: z.cuid2(),
91
+ });
92
+
93
+ export type GetPresignedDownloadUrlInput = z.infer<
94
+ typeof GetPresignedDownloadUrlInputSchema
95
+ >;
96
+
97
+ export const PurchasedDownloadUrlInputSchema = z.object({
98
+ productId: z.cuid2(),
99
+ fileId: z.cuid2(),
100
+ });
101
+
102
+ export type PurchasedDownloadUrlInput = z.infer<
103
+ typeof PurchasedDownloadUrlInputSchema
104
+ >;
105
+
106
+ export const PublicFileUrlInputSchema = z.object({
107
+ fileId: z.cuid2().openapi({ example: "ckq7t9yb40001q9l5z6a5c7fg" }),
108
+ });
109
+
110
+ export type PublicFileUrlInput = z.infer<typeof PublicFileUrlInputSchema>;
96
111
 
97
112
  /**
98
113
  * --------------------------------
@@ -118,9 +133,18 @@ export type GetPresignedUploadUrlOutput = z.infer<
118
133
  typeof GetPresignedUploadUrlOutputSchema
119
134
  >;
120
135
 
121
- export const GetPresignedDownloadUrlOutputSchema =
122
- GetPresignedUploadUrlOutputSchema;
123
-
124
- export type GetPresignedDownloadUrlOutput = z.infer<
125
- typeof GetPresignedDownloadUrlOutputSchema
126
- >;
136
+ export const GetPresignedDownloadUrlOutputSchema =
137
+ GetPresignedUploadUrlOutputSchema;
138
+
139
+ export type GetPresignedDownloadUrlOutput = z.infer<
140
+ typeof GetPresignedDownloadUrlOutputSchema
141
+ >;
142
+
143
+ export const PresignedUrlJSendOutputSchema = z.object({
144
+ status: z.string(),
145
+ data: GetPresignedDownloadUrlOutputSchema,
146
+ });
147
+
148
+ export type PresignedUrlJSendOutput = z.infer<
149
+ typeof PresignedUrlJSendOutputSchema
150
+ >;
@@ -55,13 +55,19 @@ export type CreateInvestorShortlistInput = z.infer<
55
55
  typeof CreateInvestorShortlistInputSchema
56
56
  >;
57
57
 
58
- export const GetInvestorShortlistInputSchema = z.object({
59
- cursor: z.string().optional(),
60
- });
61
-
62
- export type GetInvestorShortlistInput = z.infer<
63
- typeof GetInvestorShortlistInputSchema
64
- >;
58
+ export const GetInvestorShortlistInputSchema = z.object({
59
+ cursor: z.string().optional(),
60
+ });
61
+
62
+ export type GetInvestorShortlistInput = z.infer<
63
+ typeof GetInvestorShortlistInputSchema
64
+ >;
65
+
66
+ export const InvestorShortlistItemIdInputSchema = z.object({ id: z.cuid2() });
67
+
68
+ export type InvestorShortlistItemIdInput = z.infer<
69
+ typeof InvestorShortlistItemIdInputSchema
70
+ >;
65
71
 
66
72
  /**
67
73
  * --------------------------------
@@ -69,11 +75,20 @@ export type GetInvestorShortlistInput = z.infer<
69
75
  * --------------------------------
70
76
  */
71
77
 
72
- export const GetInvestorShortlistOutputSchema = z.object({
73
- nextCursor: z.string().optional(),
74
- shortlistItems: z.array(InvestorShortlistEntitySchema),
75
- });
76
-
77
- export type GetInvestorShortlistOutput = z.infer<
78
- typeof GetInvestorShortlistOutputSchema
79
- >;
78
+ export const GetInvestorShortlistOutputSchema = z.object({
79
+ nextCursor: z.string().optional(),
80
+ shortlistItems: z.array(InvestorShortlistEntitySchema),
81
+ });
82
+
83
+ export type GetInvestorShortlistOutput = z.infer<
84
+ typeof GetInvestorShortlistOutputSchema
85
+ >;
86
+
87
+ export const CheckInvestorShortlistItemOutputSchema = z.object({
88
+ exists: z.boolean(),
89
+ shortlistItemId: z.string().nullable(),
90
+ });
91
+
92
+ export type CheckInvestorShortlistItemOutput = z.infer<
93
+ typeof CheckInvestorShortlistItemOutputSchema
94
+ >;
@@ -67,24 +67,30 @@ export type CreateInvestorSignalInput = z.infer<
67
67
  typeof CreateInvestorSignalInputSchema
68
68
  >;
69
69
 
70
- export const UpdateInvestorSignalStatusInputSchema = z.object({
71
- id: z.cuid2(),
72
- signalStatus: z.enum(SIGNAL_STATUS),
73
- version: z.int(),
74
- });
70
+ export const UpdateInvestorSignalStatusInputSchema = z.object({
71
+ id: z.cuid2(),
72
+ signalStatus: z.enum(SIGNAL_STATUS),
73
+ version: z.int(),
74
+ });
75
75
 
76
76
  export type UpdateInvestorSignalStatusInput = z.infer<
77
77
  typeof UpdateInvestorSignalStatusInputSchema
78
78
  >;
79
79
 
80
- export const GetInvestorSignalInputSchema = z.object({
81
- cursor: z.string().optional(),
82
- signalStatus: z.enum(SIGNAL_STATUS).optional(),
83
- });
84
-
85
- export type GetInvestorSignalInput = z.infer<
86
- typeof GetInvestorSignalInputSchema
87
- >;
80
+ export const GetInvestorSignalInputSchema = z.object({
81
+ cursor: z.string().optional(),
82
+ signalStatus: z.enum(SIGNAL_STATUS).optional(),
83
+ });
84
+
85
+ export type GetInvestorSignalInput = z.infer<
86
+ typeof GetInvestorSignalInputSchema
87
+ >;
88
+
89
+ export const InvestorSignalIdInputSchema = z.object({ id: z.cuid2() });
90
+
91
+ export type InvestorSignalIdInput = z.infer<
92
+ typeof InvestorSignalIdInputSchema
93
+ >;
88
94
 
89
95
  /**
90
96
  * --------------------------------
@@ -92,11 +98,20 @@ export type GetInvestorSignalInput = z.infer<
92
98
  * --------------------------------
93
99
  */
94
100
 
95
- export const GetInvestorSignalOutputSchema = z.object({
96
- nextCursor: z.string().optional(),
97
- signals: z.array(InvestorSignalEntitySchema),
98
- });
99
-
100
- export type GetInvestorSignalOutput = z.infer<
101
- typeof GetInvestorSignalOutputSchema
102
- >;
101
+ export const GetInvestorSignalOutputSchema = z.object({
102
+ nextCursor: z.string().optional(),
103
+ signals: z.array(InvestorSignalEntitySchema),
104
+ });
105
+
106
+ export type GetInvestorSignalOutput = z.infer<
107
+ typeof GetInvestorSignalOutputSchema
108
+ >;
109
+
110
+ export const CheckInvestorSignalOutputSchema = z.object({
111
+ exists: z.boolean(),
112
+ signalId: z.string().nullable(),
113
+ });
114
+
115
+ export type CheckInvestorSignalOutput = z.infer<
116
+ typeof CheckInvestorSignalOutputSchema
117
+ >;
@@ -183,11 +183,21 @@ export type TrackedJobApplicationEntity = z.infer<
183
183
  * --------------------------------
184
184
  */
185
185
 
186
- export const ApplicationIdInputSchema = z.object({
187
- id: z.cuid2(),
188
- });
189
-
190
- export type ApplicationIdInput = z.infer<typeof ApplicationIdInputSchema>;
186
+ export const ApplicationIdInputSchema = z.object({
187
+ id: z.cuid2(),
188
+ });
189
+
190
+ export type ApplicationIdInput = z.infer<typeof ApplicationIdInputSchema>;
191
+
192
+ export const JobApplicationIdInputSchema = z.object({
193
+ applicationId: z
194
+ .string()
195
+ .openapi({ param: { name: "applicationId", in: "path" } }),
196
+ });
197
+
198
+ export type JobApplicationIdInput = z.infer<
199
+ typeof JobApplicationIdInputSchema
200
+ >;
191
201
 
192
202
  export const CreateJobApplicationInputSchema = JobApplicationShape.extend({
193
203
  jobSections: z.array(z.enum(JOB_SECTIONS)).optional(),
@@ -248,18 +258,27 @@ export type GetTrackedJobApplicationsOutput = z.infer<
248
258
  typeof GetTrackedJobApplicationsOutputSchema
249
259
  >;
250
260
 
251
- export const GetApplicationStatusUpdatesCountOutputSchema = z.object({
252
- unreadCount: z.number(),
253
- });
261
+ export const GetApplicationStatusUpdatesCountOutputSchema = z.object({
262
+ unreadCount: z.number(),
263
+ });
254
264
 
255
265
  export type GetApplicationStatusUpdatesCountOutput = z.infer<
256
266
  typeof GetApplicationStatusUpdatesCountOutputSchema
257
267
  >;
258
268
 
259
- export const GetBrandUnansweredApplicationsOutputSchema = z.object({
260
- unansweredCount: z.number(),
261
- });
262
-
263
- export type GetBrandUnansweredApplicationsOutput = z.infer<
264
- typeof GetBrandUnansweredApplicationsOutputSchema
265
- >;
269
+ export const GetBrandUnansweredApplicationsOutputSchema = z.object({
270
+ unansweredCount: z.number(),
271
+ });
272
+
273
+ export type GetBrandUnansweredApplicationsOutput = z.infer<
274
+ typeof GetBrandUnansweredApplicationsOutputSchema
275
+ >;
276
+
277
+ export const GetApplicationsForJobOutputSchema = z.object({
278
+ applications: z.array(MinimalJobApplicationEntitySchema),
279
+ nextCursor: z.string().optional(),
280
+ });
281
+
282
+ export type GetApplicationsForJobOutput = z.infer<
283
+ typeof GetApplicationsForJobOutputSchema
284
+ >;
@@ -249,14 +249,16 @@ export const GetJobsOutputSchema = z.object({
249
249
 
250
250
  export type GetJobsOutput = z.infer<typeof GetJobsOutputSchema>;
251
251
 
252
- export const GetCreatedJobsOutputSchema = z.object({
253
- jobs: z.array(NormalizedJobSchema),
254
- noOfJobs: z.number(),
255
- noOfArchivedJobs: z.number(),
256
- noOfActiveJobs: z.number(),
257
- });
258
-
259
- export type GetCreatedJobsOutput = z.infer<typeof GetCreatedJobsOutputSchema>;
252
+ export const GetCreatedJobsOutputSchema = z.object({
253
+ jobs: z.array(NormalizedJobSchema),
254
+ noOfJobs: z.number(),
255
+ noOfArchivedJobs: z.number(),
256
+ noOfActiveJobs: z.number(),
257
+ });
258
+
259
+ export type GetCreatedJobsOutput = z.infer<typeof GetCreatedJobsOutputSchema>;
260
+
261
+ export type NormalizedJob = z.infer<typeof NormalizedJobSchema>;
260
262
 
261
263
  /**
262
264
  * --------------------------------
@@ -289,4 +291,4 @@ export const JobSearchDocumentSchema = z
289
291
  })
290
292
  .openapi("JobSearchDocument");
291
293
 
292
- export type JobSearchDocument = z.infer<typeof JobSearchDocumentSchema>;
294
+ export type JobSearchDocument = z.infer<typeof JobSearchDocumentSchema>;
@@ -99,12 +99,35 @@ export const CreateMessageInputSchema = MessageShape.extend({
99
99
 
100
100
  export type CreateMessageInput = z.infer<typeof CreateMessageInputSchema>;
101
101
 
102
- export const EditMessageInputSchema = z.object({
103
- messageId: z.cuid2(),
104
- content: z.string().optional(),
105
- });
106
-
107
- export type EditMessageInput = z.infer<typeof EditMessageInputSchema>;
102
+ export const EditMessageInputSchema = z.object({
103
+ messageId: z.cuid2(),
104
+ content: z.string().optional(),
105
+ });
106
+
107
+ export type EditMessageInput = z.infer<typeof EditMessageInputSchema>;
108
+
109
+ export const ChatIdParamSchema = z.object({
110
+ chatId: z.cuid2().openapi({ param: { name: "chatId", in: "path" } }),
111
+ });
112
+
113
+ export type ChatIdParam = z.infer<typeof ChatIdParamSchema>;
114
+
115
+ export const MessageParamsSchema = ChatIdParamSchema.extend({
116
+ messageId: z
117
+ .cuid2()
118
+ .openapi({ param: { name: "messageId", in: "path" } }),
119
+ });
120
+
121
+ export type MessageParams = z.infer<typeof MessageParamsSchema>;
122
+
123
+ export const DeleteMessagesInputSchema = z.object({
124
+ messageIds: z.array(z.cuid2()).min(1),
125
+ deleteForEveryone: z.boolean().default(false),
126
+ });
127
+
128
+ export type DeleteMessagesInput = z.infer<
129
+ typeof DeleteMessagesInputSchema
130
+ >;
108
131
 
109
132
  /**
110
133
  * --------------------------------
@@ -47,10 +47,11 @@ export const NotificationDetailsEntitySchema = NotificationEntitySchema.extend({
47
47
  actor: MinimalUserSchema,
48
48
  recipient: MinimalUserSchema,
49
49
  itemTitle: z.string().optional(),
50
- itemContent: z.string().optional(),
51
- itemImgUrl: z.string().optional(),
52
- itemStatus: z.string().optional(),
53
- });
50
+ itemContent: z.string().optional(),
51
+ itemImgUrl: z.string().optional(),
52
+ itemStatus: z.string().optional(),
53
+ signalProjectId: z.string().optional(),
54
+ });
54
55
 
55
56
  export type NotificationDetailsEntity = z.infer<
56
57
  typeof NotificationDetailsEntitySchema
@@ -132,6 +133,7 @@ export const NotificationInboxTabSchema = z.enum([
132
133
  "following",
133
134
  "likes",
134
135
  "comments",
136
+ "signals",
135
137
  "archived",
136
138
  ]);
137
139
 
@@ -146,6 +148,7 @@ export const NotificationInboxCategorySchema = z.enum([
146
148
  "system",
147
149
  "jobs",
148
150
  "marketplace",
151
+ "signals",
149
152
  ]);
150
153
 
151
154
  export const NotificationInboxKindSchema = z.enum([
@@ -168,6 +171,10 @@ export const NotificationInboxKindSchema = z.enum([
168
171
  "product_approved",
169
172
  "marketplace_drop",
170
173
  "friend_product_added",
174
+ "investment_signal_created",
175
+ "investment_signal_accepted",
176
+ "investment_signal_declined",
177
+ "investment_signal_archived",
171
178
  ]);
172
179
 
173
180
  export const NotificationInboxItemSchema = z
@@ -237,6 +244,7 @@ export const NotificationInboxItemSchema = z
237
244
  "PRODUCT",
238
245
  "CHAT",
239
246
  "SETTINGS",
247
+ "SIGNAL",
240
248
  ]),
241
249
  entityId: z.string().optional(),
242
250
  })
@@ -382,6 +390,7 @@ export const ListNotificationInboxOutputSchema = z.object({
382
390
  following: z.int().optional(),
383
391
  likes: z.int().optional(),
384
392
  comments: z.int().optional(),
393
+ signals: z.int().optional(),
385
394
  archived: z.int().optional(),
386
395
  })
387
396
  .optional(),
@@ -53,11 +53,24 @@ export type CreatePayoutMethodInput = z.infer<
53
53
  typeof CreatePayoutMethodInputSchema
54
54
  >;
55
55
 
56
- export const UpdatePayoutMethodInputSchema = PayoutMethodShape.partial();
57
-
58
- export type UpdatePayoutMethodInput = z.infer<
59
- typeof UpdatePayoutMethodInputSchema
60
- >;
56
+ export const UpdatePayoutMethodInputSchema = PayoutMethodShape.partial();
57
+
58
+ export type UpdatePayoutMethodInput = z.infer<
59
+ typeof UpdatePayoutMethodInputSchema
60
+ >;
61
+
62
+ export const GetBanksInputSchema = z.object({
63
+ country: z.string().optional(),
64
+ });
65
+
66
+ export type GetBanksInput = z.infer<typeof GetBanksInputSchema>;
67
+
68
+ export const VerifyAccountInputSchema = z.object({
69
+ accountNumber: z.string().regex(/^\d{10}$/),
70
+ bankCode: z.string().min(1),
71
+ });
72
+
73
+ export type VerifyAccountInput = z.infer<typeof VerifyAccountInputSchema>;
61
74
 
62
75
  /**
63
76
  * --------------------------------