@zyacreatives/shared 2.5.78 → 2.5.79

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 (46) 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/payout-method.d.ts +9 -0
  23. package/dist/schemas/payout-method.js +8 -1
  24. package/dist/schemas/product.d.ts +4 -0
  25. package/dist/schemas/product.js +4 -1
  26. package/dist/schemas/transaction.d.ts +72 -1
  27. package/dist/schemas/transaction.js +36 -1
  28. package/dist/schemas/user.d.ts +39 -1
  29. package/dist/schemas/user.js +15 -1
  30. package/docs/backend-openapi-shared-contracts-handoff.md +193 -0
  31. package/package.json +1 -1
  32. package/src/schemas/chat.ts +25 -17
  33. package/src/schemas/comment.ts +40 -8
  34. package/src/schemas/common.ts +18 -11
  35. package/src/schemas/discipline.ts +24 -10
  36. package/src/schemas/feed.ts +18 -7
  37. package/src/schemas/file.ts +37 -13
  38. package/src/schemas/investor-shortlist.ts +30 -15
  39. package/src/schemas/investor-signal.ts +36 -21
  40. package/src/schemas/job-application.ts +34 -15
  41. package/src/schemas/job.ts +11 -9
  42. package/src/schemas/message.ts +29 -6
  43. package/src/schemas/payout-method.ts +18 -5
  44. package/src/schemas/product.ts +15 -9
  45. package/src/schemas/transaction.ts +61 -8
  46. package/src/schemas/user.ts +44 -16
@@ -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
  * --------------------------------
@@ -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
  * --------------------------------
@@ -256,14 +256,20 @@ export const SearchProductInputSchema = z.object({
256
256
 
257
257
  export type SearchProductInput = z.infer<typeof SearchProductInputSchema>;
258
258
 
259
- export const ProductDiscountCheckInputSchema = z.object({
260
- discountCode: z.string(),
261
- productId: z.cuid2(),
262
- });
263
-
264
- export type ProductDiscountCheckInput = z.infer<
265
- typeof ProductDiscountCheckInputSchema
266
- >;
259
+ export const ProductDiscountCheckInputSchema = z.object({
260
+ discountCode: z.string(),
261
+ productId: z.cuid2(),
262
+ });
263
+
264
+ export type ProductDiscountCheckInput = z.infer<
265
+ typeof ProductDiscountCheckInputSchema
266
+ >;
267
+
268
+ export const ProductIdInputSchema = z.object({
269
+ productId: z.cuid2().openapi({ example: "ckj1a2b3c0000xyz" }),
270
+ });
271
+
272
+ export type ProductIdInput = z.infer<typeof ProductIdInputSchema>;
267
273
 
268
274
  export const RevenueChartInputSchema = z.object({
269
275
  startDate: z.string().optional(),
@@ -445,4 +451,4 @@ export const ProductPurchaseSnapshotSchema = z.object({
445
451
 
446
452
  export type ProductPurchaseSnapshot = z.infer<
447
453
  typeof ProductPurchaseSnapshotSchema
448
- >;
454
+ >;
@@ -120,15 +120,68 @@ export type TransactionEntity = z.infer<typeof TransactionEntitySchema>;
120
120
  * --------------------------------
121
121
  */
122
122
 
123
- export const InitTransactionOutputSchema = z
124
- .object({
125
- transaction: TransactionEntitySchema,
126
- checkoutUrl: z.url().nullable().openapi({
127
- description: "The Stripe/Paystack checkout URL to redirect the user to",
123
+ export const InitTransactionOutputSchema = z
124
+ .object({
125
+ transaction: TransactionEntitySchema,
126
+ checkoutUrl: z.url().nullable().openapi({
127
+ description: "The Stripe/Paystack checkout URL to redirect the user to",
128
128
  }),
129
129
  })
130
130
  .openapi({ title: "InitTransactionResult" });
131
131
 
132
- export type InitTransactionResult = z.infer<
133
- typeof InitTransactionOutputSchema
134
- >;
132
+ export type InitTransactionResult = z.infer<
133
+ typeof InitTransactionOutputSchema
134
+ >;
135
+
136
+ export const TransactionIdInputSchema = z.object({
137
+ transactionId: z.cuid2().openapi({ example: "ckj1a2b3c0000xyz" }),
138
+ });
139
+
140
+ export type TransactionIdInput = z.infer<typeof TransactionIdInputSchema>;
141
+
142
+ export const PurchaseLibraryInputSchema = z.object({
143
+ page: z.coerce.number().int().min(1).default(1),
144
+ pageSize: z.coerce.number().int().min(1).max(100).default(20),
145
+ });
146
+
147
+ export type PurchaseLibraryInput = z.infer<
148
+ typeof PurchaseLibraryInputSchema
149
+ >;
150
+
151
+ export const PurchaseLibraryItemSchema = z.object({
152
+ transactionId: z.cuid2(),
153
+ productId: z.cuid2(),
154
+ itemName: z.string(),
155
+ creator: z.object({
156
+ id: z.cuid2(),
157
+ name: z.string(),
158
+ username: z.string(),
159
+ image: z.url().nullable(),
160
+ }),
161
+ fileCategory: z.string().nullable(),
162
+ purchaseDate: z.iso.datetime(),
163
+ status: z.enum(["PURCHASED", "REFUNDED"]),
164
+ currency: z.enum(WAGES_CURRENCY),
165
+ amount: z.number().int(),
166
+ thumbnailImgUrl: z.url().nullable(),
167
+ });
168
+
169
+ export type PurchaseLibraryItem = z.infer<
170
+ typeof PurchaseLibraryItemSchema
171
+ >;
172
+
173
+ export const PurchaseLibraryOutputSchema = z.object({
174
+ purchases: z.array(PurchaseLibraryItemSchema),
175
+ pagination: z.object({
176
+ page: z.number().int(),
177
+ pageSize: z.number().int(),
178
+ totalItems: z.number().int(),
179
+ totalPages: z.number().int(),
180
+ hasPreviousPage: z.boolean(),
181
+ hasNextPage: z.boolean(),
182
+ }),
183
+ });
184
+
185
+ export type PurchaseLibraryOutput = z.infer<
186
+ typeof PurchaseLibraryOutputSchema
187
+ >;
@@ -199,21 +199,31 @@ export type UserWithProductsEntity = z.infer<
199
199
  typeof UserWithProductsEntitySchema
200
200
  >;
201
201
 
202
- export const UserAuthStatusEntitySchema = z.object({
203
- exists: z.boolean(),
204
- isOAuthOnly: z.boolean(),
205
- providers: z.array(z.string()),
206
- });
207
-
208
- export const UserWithJobBookmarksInputSchema = z.object({
209
- cursor: z.string().optional(),
210
- limit: z.coerce.number().int().positive().optional(),
211
- });
212
-
213
- export type UserAuthStatusEntity = z.infer<typeof UserAuthStatusEntitySchema>;
214
- export type UserWithJobBookmarksInput = z.infer<
215
- typeof UserWithJobBookmarksEntitySchema
216
- >;
202
+ export const UserAuthStatusEntitySchema = z.object({
203
+ exists: z.boolean(),
204
+ isOAuthOnly: z.boolean(),
205
+ hasPassword: z.boolean(),
206
+ canChangePassword: z.boolean(),
207
+ canSetPassword: z.boolean(),
208
+ providers: z.array(z.string()),
209
+ });
210
+
211
+ export const DeactivateAccountInputSchema = z.object({
212
+ password: z.string().min(1).optional(),
213
+ });
214
+
215
+ export const UserWithJobBookmarksInputSchema = z.object({
216
+ cursor: z.string().optional(),
217
+ limit: z.coerce.number().int().positive().optional(),
218
+ });
219
+
220
+ export type UserAuthStatusEntity = z.infer<typeof UserAuthStatusEntitySchema>;
221
+ export type DeactivateAccountInput = z.infer<
222
+ typeof DeactivateAccountInputSchema
223
+ >;
224
+ export type UserWithJobBookmarksInput = z.infer<
225
+ typeof UserWithJobBookmarksInputSchema
226
+ >;
217
227
 
218
228
  /**
219
229
  * --------------------------------
@@ -283,7 +293,25 @@ export const SearchUsersOutputSchema = z.object({
283
293
  ),
284
294
  nextCursor: z.string().optional(),
285
295
  });
286
- export type SearchUsersOutput = z.infer<typeof SearchUsersOutputSchema>;
296
+ export type SearchUsersOutput = z.infer<typeof SearchUsersOutputSchema>;
297
+
298
+ export const MentionableUsersInputSchema = z.object({
299
+ query: z.string().default(""),
300
+ roles: SearchUsersInputSchema.shape.roles,
301
+ limit: z.coerce.number().int().min(1).max(10).default(10),
302
+ });
303
+
304
+ export type MentionableUsersInput = z.infer<
305
+ typeof MentionableUsersInputSchema
306
+ >;
307
+
308
+ export const MentionableUsersOutputSchema = SearchUsersOutputSchema.pick({
309
+ users: true,
310
+ });
311
+
312
+ export type MentionableUsersOutput = z.infer<
313
+ typeof MentionableUsersOutputSchema
314
+ >;
287
315
 
288
316
  /**
289
317
  * --------------------------------