@zyacreatives/shared 2.5.77 → 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 (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 +22 -8
  21. package/dist/schemas/message.js +14 -2
  22. package/dist/schemas/payout-method.d.ts +9 -0
  23. package/dist/schemas/payout-method.js +8 -1
  24. package/dist/schemas/post.d.ts +11 -11
  25. package/dist/schemas/post.js +1 -1
  26. package/dist/schemas/product.d.ts +4 -0
  27. package/dist/schemas/product.js +4 -1
  28. package/dist/schemas/transaction.d.ts +72 -1
  29. package/dist/schemas/transaction.js +36 -1
  30. package/dist/schemas/user.d.ts +41 -3
  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 +30 -7
  45. package/src/schemas/payout-method.ts +18 -5
  46. package/src/schemas/post.ts +1 -1
  47. package/src/schemas/product.ts +15 -9
  48. package/src/schemas/transaction.ts +61 -8
  49. package/src/schemas/user.ts +44 -16
@@ -34,7 +34,7 @@ declare const MessageShape: z.ZodObject<{
34
34
  url: z.ZodURL;
35
35
  title: z.ZodOptional<z.ZodString>;
36
36
  description: z.ZodOptional<z.ZodString>;
37
- image: z.ZodOptional<z.ZodURL>;
37
+ image: z.ZodOptional<z.ZodString>;
38
38
  }, z.core.$strip>>;
39
39
  }, z.core.$strip>;
40
40
  export type MessageShapeType = z.infer<typeof MessageShape>;
@@ -50,7 +50,7 @@ export declare const MessageEntitySchema: z.ZodObject<{
50
50
  url: z.ZodURL;
51
51
  title: z.ZodOptional<z.ZodString>;
52
52
  description: z.ZodOptional<z.ZodString>;
53
- image: z.ZodOptional<z.ZodURL>;
53
+ image: z.ZodOptional<z.ZodString>;
54
54
  }, z.core.$strip>>;
55
55
  deletedBySender: z.ZodDefault<z.ZodBoolean>;
56
56
  deletedByReceiver: z.ZodDefault<z.ZodBoolean>;
@@ -87,7 +87,7 @@ export declare const MessageEntitySchema: z.ZodObject<{
87
87
  url: z.ZodURL;
88
88
  title: z.ZodOptional<z.ZodString>;
89
89
  description: z.ZodOptional<z.ZodString>;
90
- image: z.ZodOptional<z.ZodURL>;
90
+ image: z.ZodOptional<z.ZodString>;
91
91
  }, z.core.$strip>>;
92
92
  id: z.ZodCUID2;
93
93
  senderId: z.ZodCUID2;
@@ -109,7 +109,7 @@ export declare const MessageWithFilesEntitySchema: z.ZodObject<{
109
109
  url: z.ZodURL;
110
110
  title: z.ZodOptional<z.ZodString>;
111
111
  description: z.ZodOptional<z.ZodString>;
112
- image: z.ZodOptional<z.ZodURL>;
112
+ image: z.ZodOptional<z.ZodString>;
113
113
  }, z.core.$strip>>;
114
114
  deletedBySender: z.ZodDefault<z.ZodBoolean>;
115
115
  deletedByReceiver: z.ZodDefault<z.ZodBoolean>;
@@ -146,7 +146,7 @@ export declare const MessageWithFilesEntitySchema: z.ZodObject<{
146
146
  url: z.ZodURL;
147
147
  title: z.ZodOptional<z.ZodString>;
148
148
  description: z.ZodOptional<z.ZodString>;
149
- image: z.ZodOptional<z.ZodURL>;
149
+ image: z.ZodOptional<z.ZodString>;
150
150
  }, z.core.$strip>>;
151
151
  id: z.ZodCUID2;
152
152
  senderId: z.ZodCUID2;
@@ -195,7 +195,7 @@ export declare const CreateMessageInputSchema: z.ZodObject<{
195
195
  url: z.ZodURL;
196
196
  title: z.ZodOptional<z.ZodString>;
197
197
  description: z.ZodOptional<z.ZodString>;
198
- image: z.ZodOptional<z.ZodURL>;
198
+ image: z.ZodOptional<z.ZodString>;
199
199
  }, z.core.$strip>>;
200
200
  receiverId: z.ZodCUID2;
201
201
  files: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -210,6 +210,20 @@ export declare const EditMessageInputSchema: z.ZodObject<{
210
210
  content: z.ZodOptional<z.ZodString>;
211
211
  }, z.core.$strip>;
212
212
  export type EditMessageInput = z.infer<typeof EditMessageInputSchema>;
213
+ export declare const ChatIdParamSchema: z.ZodObject<{
214
+ chatId: z.ZodCUID2;
215
+ }, z.core.$strip>;
216
+ export type ChatIdParam = z.infer<typeof ChatIdParamSchema>;
217
+ export declare const MessageParamsSchema: z.ZodObject<{
218
+ chatId: z.ZodCUID2;
219
+ messageId: z.ZodCUID2;
220
+ }, z.core.$strip>;
221
+ export type MessageParams = z.infer<typeof MessageParamsSchema>;
222
+ export declare const DeleteMessagesInputSchema: z.ZodObject<{
223
+ messageIds: z.ZodArray<z.ZodCUID2>;
224
+ deleteForEveryone: z.ZodDefault<z.ZodBoolean>;
225
+ }, z.core.$strip>;
226
+ export type DeleteMessagesInput = z.infer<typeof DeleteMessagesInputSchema>;
213
227
  /**
214
228
  * --------------------------------
215
229
  * OUTPUTS
@@ -223,7 +237,7 @@ export declare const GetMessagesOutputSchema: z.ZodObject<{
223
237
  url: z.ZodURL;
224
238
  title: z.ZodOptional<z.ZodString>;
225
239
  description: z.ZodOptional<z.ZodString>;
226
- image: z.ZodOptional<z.ZodURL>;
240
+ image: z.ZodOptional<z.ZodString>;
227
241
  }, z.core.$strip>>;
228
242
  deletedBySender: z.ZodDefault<z.ZodBoolean>;
229
243
  deletedByReceiver: z.ZodDefault<z.ZodBoolean>;
@@ -260,7 +274,7 @@ export declare const GetMessagesOutputSchema: z.ZodObject<{
260
274
  url: z.ZodURL;
261
275
  title: z.ZodOptional<z.ZodString>;
262
276
  description: z.ZodOptional<z.ZodString>;
263
- image: z.ZodOptional<z.ZodURL>;
277
+ image: z.ZodOptional<z.ZodString>;
264
278
  }, z.core.$strip>>;
265
279
  id: z.ZodCUID2;
266
280
  senderId: z.ZodCUID2;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetMessagesOutputSchema = exports.EditMessageInputSchema = exports.CreateMessageInputSchema = exports.MessageWithFilesEntitySchema = exports.MessageFileEntitySchema = exports.MessageEntitySchema = void 0;
3
+ exports.GetMessagesOutputSchema = exports.DeleteMessagesInputSchema = exports.MessageParamsSchema = exports.ChatIdParamSchema = exports.EditMessageInputSchema = exports.CreateMessageInputSchema = exports.MessageWithFilesEntitySchema = exports.MessageFileEntitySchema = exports.MessageEntitySchema = void 0;
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const constants_1 = require("../constants");
6
6
  /**
@@ -20,7 +20,7 @@ const MessageShape = zod_openapi_1.z.object({
20
20
  url: zod_openapi_1.z.url(),
21
21
  title: zod_openapi_1.z.string().optional(),
22
22
  description: zod_openapi_1.z.string().optional(),
23
- image: zod_openapi_1.z.url().optional(),
23
+ image: zod_openapi_1.z.string().optional(),
24
24
  })
25
25
  .optional(),
26
26
  });
@@ -75,6 +75,18 @@ exports.EditMessageInputSchema = zod_openapi_1.z.object({
75
75
  messageId: zod_openapi_1.z.cuid2(),
76
76
  content: zod_openapi_1.z.string().optional(),
77
77
  });
78
+ exports.ChatIdParamSchema = zod_openapi_1.z.object({
79
+ chatId: zod_openapi_1.z.cuid2().openapi({ param: { name: "chatId", in: "path" } }),
80
+ });
81
+ exports.MessageParamsSchema = exports.ChatIdParamSchema.extend({
82
+ messageId: zod_openapi_1.z
83
+ .cuid2()
84
+ .openapi({ param: { name: "messageId", in: "path" } }),
85
+ });
86
+ exports.DeleteMessagesInputSchema = zod_openapi_1.z.object({
87
+ messageIds: zod_openapi_1.z.array(zod_openapi_1.z.cuid2()).min(1),
88
+ deleteForEveryone: zod_openapi_1.z.boolean().default(false),
89
+ });
78
90
  /**
79
91
  * --------------------------------
80
92
  * OUTPUTS
@@ -75,6 +75,15 @@ export declare const UpdatePayoutMethodInputSchema: z.ZodObject<{
75
75
  isDefault: z.ZodOptional<z.ZodBoolean>;
76
76
  }, z.core.$strip>;
77
77
  export type UpdatePayoutMethodInput = z.infer<typeof UpdatePayoutMethodInputSchema>;
78
+ export declare const GetBanksInputSchema: z.ZodObject<{
79
+ country: z.ZodOptional<z.ZodString>;
80
+ }, z.core.$strip>;
81
+ export type GetBanksInput = z.infer<typeof GetBanksInputSchema>;
82
+ export declare const VerifyAccountInputSchema: z.ZodObject<{
83
+ accountNumber: z.ZodString;
84
+ bankCode: z.ZodString;
85
+ }, z.core.$strip>;
86
+ export type VerifyAccountInput = z.infer<typeof VerifyAccountInputSchema>;
78
87
  /**
79
88
  * --------------------------------
80
89
  * OUTPUTS
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BankListOutputSchema = exports.VerifyAccountOutputSchema = exports.UpdatePayoutMethodInputSchema = exports.CreatePayoutMethodInputSchema = exports.PayoutMethodEntitySchema = void 0;
3
+ exports.BankListOutputSchema = exports.VerifyAccountOutputSchema = exports.VerifyAccountInputSchema = exports.GetBanksInputSchema = exports.UpdatePayoutMethodInputSchema = exports.CreatePayoutMethodInputSchema = exports.PayoutMethodEntitySchema = void 0;
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const constants_1 = require("../constants");
6
6
  /**
@@ -41,6 +41,13 @@ exports.CreatePayoutMethodInputSchema = PayoutMethodShape.omit({
41
41
  externalBankId: true,
42
42
  });
43
43
  exports.UpdatePayoutMethodInputSchema = PayoutMethodShape.partial();
44
+ exports.GetBanksInputSchema = zod_openapi_1.z.object({
45
+ country: zod_openapi_1.z.string().optional(),
46
+ });
47
+ exports.VerifyAccountInputSchema = zod_openapi_1.z.object({
48
+ accountNumber: zod_openapi_1.z.string().regex(/^\d{10}$/),
49
+ bankCode: zod_openapi_1.z.string().min(1),
50
+ });
44
51
  /**
45
52
  * --------------------------------
46
53
  * OUTPUTS
@@ -8,7 +8,7 @@ export declare const LinkMetaSchema: z.ZodObject<{
8
8
  url: z.ZodURL;
9
9
  title: z.ZodOptional<z.ZodString>;
10
10
  description: z.ZodOptional<z.ZodString>;
11
- image: z.ZodOptional<z.ZodURL>;
11
+ image: z.ZodOptional<z.ZodString>;
12
12
  }, z.core.$strip>;
13
13
  export type LinkMeta = z.infer<typeof LinkMetaSchema>;
14
14
  declare const PostTagSchema: z.ZodObject<{
@@ -60,7 +60,7 @@ declare const PostShape: z.ZodObject<{
60
60
  url: z.ZodURL;
61
61
  title: z.ZodOptional<z.ZodString>;
62
62
  description: z.ZodOptional<z.ZodString>;
63
- image: z.ZodOptional<z.ZodURL>;
63
+ image: z.ZodOptional<z.ZodString>;
64
64
  }, z.core.$strip>>;
65
65
  }, z.core.$strip>;
66
66
  export type PostShapeType = z.infer<typeof PostShape>;
@@ -116,7 +116,7 @@ export declare const PostEntitySchema: z.ZodObject<{
116
116
  url: z.ZodURL;
117
117
  title: z.ZodOptional<z.ZodString>;
118
118
  description: z.ZodOptional<z.ZodString>;
119
- image: z.ZodOptional<z.ZodURL>;
119
+ image: z.ZodOptional<z.ZodString>;
120
120
  }, z.core.$strip>>;
121
121
  id: z.ZodCUID2;
122
122
  userId: z.ZodCUID2;
@@ -174,7 +174,7 @@ export declare const PostWithFilesEntitySchema: z.ZodObject<{
174
174
  url: z.ZodURL;
175
175
  title: z.ZodOptional<z.ZodString>;
176
176
  description: z.ZodOptional<z.ZodString>;
177
- image: z.ZodOptional<z.ZodURL>;
177
+ image: z.ZodOptional<z.ZodString>;
178
178
  }, z.core.$strip>>;
179
179
  id: z.ZodCUID2;
180
180
  userId: z.ZodCUID2;
@@ -257,7 +257,7 @@ export declare const FeedPostEntitySchema: z.ZodObject<{
257
257
  url: z.ZodURL;
258
258
  title: z.ZodOptional<z.ZodString>;
259
259
  description: z.ZodOptional<z.ZodString>;
260
- image: z.ZodOptional<z.ZodURL>;
260
+ image: z.ZodOptional<z.ZodString>;
261
261
  }, z.core.$strip>>;
262
262
  id: z.ZodCUID2;
263
263
  userId: z.ZodCUID2;
@@ -356,7 +356,7 @@ export declare const CreatePostInputSchema: z.ZodObject<{
356
356
  url: z.ZodURL;
357
357
  title: z.ZodOptional<z.ZodString>;
358
358
  description: z.ZodOptional<z.ZodString>;
359
- image: z.ZodOptional<z.ZodURL>;
359
+ image: z.ZodOptional<z.ZodString>;
360
360
  }, z.core.$strip>>;
361
361
  content: z.ZodOptional<z.ZodString>;
362
362
  files: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -455,7 +455,7 @@ export declare const CreatePostOutputSchema: z.ZodObject<{
455
455
  url: z.ZodURL;
456
456
  title: z.ZodOptional<z.ZodString>;
457
457
  description: z.ZodOptional<z.ZodString>;
458
- image: z.ZodOptional<z.ZodURL>;
458
+ image: z.ZodOptional<z.ZodString>;
459
459
  }, z.core.$strip>>;
460
460
  id: z.ZodCUID2;
461
461
  userId: z.ZodCUID2;
@@ -508,7 +508,7 @@ export declare const GetPostOutputSchema: z.ZodObject<{
508
508
  url: z.ZodURL;
509
509
  title: z.ZodOptional<z.ZodString>;
510
510
  description: z.ZodOptional<z.ZodString>;
511
- image: z.ZodOptional<z.ZodURL>;
511
+ image: z.ZodOptional<z.ZodString>;
512
512
  }, z.core.$strip>>;
513
513
  id: z.ZodCUID2;
514
514
  userId: z.ZodCUID2;
@@ -542,7 +542,7 @@ export declare const LinkPreviewOutputSchema: z.ZodObject<{
542
542
  url: z.ZodURL;
543
543
  title: z.ZodOptional<z.ZodString>;
544
544
  description: z.ZodOptional<z.ZodString>;
545
- image: z.ZodOptional<z.ZodURL>;
545
+ image: z.ZodOptional<z.ZodString>;
546
546
  }, z.core.$strip>;
547
547
  export type LinkPreviewOutput = z.infer<typeof LinkPreviewOutputSchema>;
548
548
  export declare const GetFeedOutputSchema: z.ZodObject<{
@@ -593,7 +593,7 @@ export declare const GetFeedOutputSchema: z.ZodObject<{
593
593
  url: z.ZodURL;
594
594
  title: z.ZodOptional<z.ZodString>;
595
595
  description: z.ZodOptional<z.ZodString>;
596
- image: z.ZodOptional<z.ZodURL>;
596
+ image: z.ZodOptional<z.ZodString>;
597
597
  }, z.core.$strip>>;
598
598
  id: z.ZodCUID2;
599
599
  userId: z.ZodCUID2;
@@ -699,7 +699,7 @@ export declare const SearchPostOutputSchema: z.ZodObject<{
699
699
  url: z.ZodURL;
700
700
  title: z.ZodOptional<z.ZodString>;
701
701
  description: z.ZodOptional<z.ZodString>;
702
- image: z.ZodOptional<z.ZodURL>;
702
+ image: z.ZodOptional<z.ZodString>;
703
703
  }, z.core.$strip>>;
704
704
  id: z.ZodCUID2;
705
705
  userId: z.ZodCUID2;
@@ -15,7 +15,7 @@ exports.LinkMetaSchema = zod_openapi_1.z.object({
15
15
  url: zod_openapi_1.z.url(),
16
16
  title: zod_openapi_1.z.string().optional(),
17
17
  description: zod_openapi_1.z.string().optional(),
18
- image: zod_openapi_1.z.url().optional(),
18
+ image: zod_openapi_1.z.string().optional(),
19
19
  });
20
20
  const PostTagSchema = zod_openapi_1.z.object({
21
21
  id: zod_openapi_1.z.int(),
@@ -311,6 +311,10 @@ export declare const ProductDiscountCheckInputSchema: z.ZodObject<{
311
311
  productId: z.ZodCUID2;
312
312
  }, z.core.$strip>;
313
313
  export type ProductDiscountCheckInput = z.infer<typeof ProductDiscountCheckInputSchema>;
314
+ export declare const ProductIdInputSchema: z.ZodObject<{
315
+ productId: z.ZodCUID2;
316
+ }, z.core.$strip>;
317
+ export type ProductIdInput = z.infer<typeof ProductIdInputSchema>;
314
318
  export declare const RevenueChartInputSchema: z.ZodObject<{
315
319
  startDate: z.ZodOptional<z.ZodString>;
316
320
  endDate: z.ZodOptional<z.ZodString>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProductPurchaseSnapshotSchema = exports.SellerDashboardStatsOutputSchema = exports.ProductRevenueChartOutputSchema = exports.RevenueChartPointSchema = exports.ProductTransactionsOutputSchema = exports.ProductTransactionItemSchema = exports.ProductStatsOutputSchema = exports.ProductDiscountCheckOutputSchema = exports.GetMarketplaceInfoOutputSchema = exports.SearchProductOutputSchema = exports.MarketplaceCategorySchema = exports.MarketplaceProductEntitySchema = exports.ProductSearchDocumentSchema = exports.RevenueChartInputSchema = exports.ProductDiscountCheckInputSchema = exports.SearchProductInputSchema = exports.UpdateProductInputSchema = exports.ProductServiceAndComplianceInputSchema = exports.CreateProductInputSchema = exports.ProductEntitySchema = exports.ProductLinkSchema = exports.ProductDiscountEntitySchema = void 0;
3
+ exports.ProductPurchaseSnapshotSchema = exports.SellerDashboardStatsOutputSchema = exports.ProductRevenueChartOutputSchema = exports.RevenueChartPointSchema = exports.ProductTransactionsOutputSchema = exports.ProductTransactionItemSchema = exports.ProductStatsOutputSchema = exports.ProductDiscountCheckOutputSchema = exports.GetMarketplaceInfoOutputSchema = exports.SearchProductOutputSchema = exports.MarketplaceCategorySchema = exports.MarketplaceProductEntitySchema = exports.ProductSearchDocumentSchema = exports.RevenueChartInputSchema = exports.ProductIdInputSchema = exports.ProductDiscountCheckInputSchema = exports.SearchProductInputSchema = exports.UpdateProductInputSchema = exports.ProductServiceAndComplianceInputSchema = exports.CreateProductInputSchema = exports.ProductEntitySchema = exports.ProductLinkSchema = exports.ProductDiscountEntitySchema = void 0;
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const constants_1 = require("../constants");
6
6
  const file_1 = require("./file");
@@ -179,6 +179,9 @@ exports.ProductDiscountCheckInputSchema = zod_openapi_1.z.object({
179
179
  discountCode: zod_openapi_1.z.string(),
180
180
  productId: zod_openapi_1.z.cuid2(),
181
181
  });
182
+ exports.ProductIdInputSchema = zod_openapi_1.z.object({
183
+ productId: zod_openapi_1.z.cuid2().openapi({ example: "ckj1a2b3c0000xyz" }),
184
+ });
182
185
  exports.RevenueChartInputSchema = zod_openapi_1.z.object({
183
186
  startDate: zod_openapi_1.z.string().optional(),
184
187
  endDate: zod_openapi_1.z.string().optional(),
@@ -122,6 +122,7 @@ export declare const CreateTransactionInputSchema: z.ZodObject<{
122
122
  readonly FAILED: "FAILED";
123
123
  readonly REFUNDED: "REFUNDED";
124
124
  }>>;
125
+ productId: z.ZodCUID2;
125
126
  amount: z.ZodNumber;
126
127
  currency: z.ZodEnum<{
127
128
  readonly USD: "USD (United States Dollar)";
@@ -130,7 +131,6 @@ export declare const CreateTransactionInputSchema: z.ZodObject<{
130
131
  readonly NGN: "NGN (Nigerian Naira)";
131
132
  }>;
132
133
  sellerId: z.ZodCUID2;
133
- productId: z.ZodCUID2;
134
134
  buyerId: z.ZodCUID2;
135
135
  platformFee: z.ZodNumber;
136
136
  sellerAmount: z.ZodNumber;
@@ -438,3 +438,74 @@ export declare const InitTransactionOutputSchema: z.ZodObject<{
438
438
  checkoutUrl: z.ZodNullable<z.ZodURL>;
439
439
  }, z.core.$strip>;
440
440
  export type InitTransactionResult = z.infer<typeof InitTransactionOutputSchema>;
441
+ export declare const TransactionIdInputSchema: z.ZodObject<{
442
+ transactionId: z.ZodCUID2;
443
+ }, z.core.$strip>;
444
+ export type TransactionIdInput = z.infer<typeof TransactionIdInputSchema>;
445
+ export declare const PurchaseLibraryInputSchema: z.ZodObject<{
446
+ page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
447
+ pageSize: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
448
+ }, z.core.$strip>;
449
+ export type PurchaseLibraryInput = z.infer<typeof PurchaseLibraryInputSchema>;
450
+ export declare const PurchaseLibraryItemSchema: z.ZodObject<{
451
+ transactionId: z.ZodCUID2;
452
+ productId: z.ZodCUID2;
453
+ itemName: z.ZodString;
454
+ creator: z.ZodObject<{
455
+ id: z.ZodCUID2;
456
+ name: z.ZodString;
457
+ username: z.ZodString;
458
+ image: z.ZodNullable<z.ZodURL>;
459
+ }, z.core.$strip>;
460
+ fileCategory: z.ZodNullable<z.ZodString>;
461
+ purchaseDate: z.ZodISODateTime;
462
+ status: z.ZodEnum<{
463
+ REFUNDED: "REFUNDED";
464
+ PURCHASED: "PURCHASED";
465
+ }>;
466
+ currency: z.ZodEnum<{
467
+ readonly USD: "USD (United States Dollar)";
468
+ readonly EUR: "EUR (Euro)";
469
+ readonly GBP: "GBP (British Pound Sterling)";
470
+ readonly NGN: "NGN (Nigerian Naira)";
471
+ }>;
472
+ amount: z.ZodNumber;
473
+ thumbnailImgUrl: z.ZodNullable<z.ZodURL>;
474
+ }, z.core.$strip>;
475
+ export type PurchaseLibraryItem = z.infer<typeof PurchaseLibraryItemSchema>;
476
+ export declare const PurchaseLibraryOutputSchema: z.ZodObject<{
477
+ purchases: z.ZodArray<z.ZodObject<{
478
+ transactionId: z.ZodCUID2;
479
+ productId: z.ZodCUID2;
480
+ itemName: z.ZodString;
481
+ creator: z.ZodObject<{
482
+ id: z.ZodCUID2;
483
+ name: z.ZodString;
484
+ username: z.ZodString;
485
+ image: z.ZodNullable<z.ZodURL>;
486
+ }, z.core.$strip>;
487
+ fileCategory: z.ZodNullable<z.ZodString>;
488
+ purchaseDate: z.ZodISODateTime;
489
+ status: z.ZodEnum<{
490
+ REFUNDED: "REFUNDED";
491
+ PURCHASED: "PURCHASED";
492
+ }>;
493
+ currency: z.ZodEnum<{
494
+ readonly USD: "USD (United States Dollar)";
495
+ readonly EUR: "EUR (Euro)";
496
+ readonly GBP: "GBP (British Pound Sterling)";
497
+ readonly NGN: "NGN (Nigerian Naira)";
498
+ }>;
499
+ amount: z.ZodNumber;
500
+ thumbnailImgUrl: z.ZodNullable<z.ZodURL>;
501
+ }, z.core.$strip>>;
502
+ pagination: z.ZodObject<{
503
+ page: z.ZodNumber;
504
+ pageSize: z.ZodNumber;
505
+ totalItems: z.ZodNumber;
506
+ totalPages: z.ZodNumber;
507
+ hasPreviousPage: z.ZodBoolean;
508
+ hasNextPage: z.ZodBoolean;
509
+ }, z.core.$strip>;
510
+ }, z.core.$strip>;
511
+ export type PurchaseLibraryOutput = z.infer<typeof PurchaseLibraryOutputSchema>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InitTransactionOutputSchema = exports.TransactionEntitySchema = exports.UpdateTransactionWebhookInputSchema = exports.CreateTransactionInputSchema = exports.InitTransactionInputSchema = exports.BaseTransactionSchema = void 0;
3
+ exports.PurchaseLibraryOutputSchema = exports.PurchaseLibraryItemSchema = exports.PurchaseLibraryInputSchema = exports.TransactionIdInputSchema = exports.InitTransactionOutputSchema = exports.TransactionEntitySchema = exports.UpdateTransactionWebhookInputSchema = exports.CreateTransactionInputSchema = exports.InitTransactionInputSchema = exports.BaseTransactionSchema = void 0;
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const constants_1 = require("../constants");
6
6
  const product_1 = require("./product");
@@ -89,3 +89,38 @@ exports.InitTransactionOutputSchema = zod_openapi_1.z
89
89
  }),
90
90
  })
91
91
  .openapi({ title: "InitTransactionResult" });
92
+ exports.TransactionIdInputSchema = zod_openapi_1.z.object({
93
+ transactionId: zod_openapi_1.z.cuid2().openapi({ example: "ckj1a2b3c0000xyz" }),
94
+ });
95
+ exports.PurchaseLibraryInputSchema = zod_openapi_1.z.object({
96
+ page: zod_openapi_1.z.coerce.number().int().min(1).default(1),
97
+ pageSize: zod_openapi_1.z.coerce.number().int().min(1).max(100).default(20),
98
+ });
99
+ exports.PurchaseLibraryItemSchema = zod_openapi_1.z.object({
100
+ transactionId: zod_openapi_1.z.cuid2(),
101
+ productId: zod_openapi_1.z.cuid2(),
102
+ itemName: zod_openapi_1.z.string(),
103
+ creator: zod_openapi_1.z.object({
104
+ id: zod_openapi_1.z.cuid2(),
105
+ name: zod_openapi_1.z.string(),
106
+ username: zod_openapi_1.z.string(),
107
+ image: zod_openapi_1.z.url().nullable(),
108
+ }),
109
+ fileCategory: zod_openapi_1.z.string().nullable(),
110
+ purchaseDate: zod_openapi_1.z.iso.datetime(),
111
+ status: zod_openapi_1.z.enum(["PURCHASED", "REFUNDED"]),
112
+ currency: zod_openapi_1.z.enum(constants_1.WAGES_CURRENCY),
113
+ amount: zod_openapi_1.z.number().int(),
114
+ thumbnailImgUrl: zod_openapi_1.z.url().nullable(),
115
+ });
116
+ exports.PurchaseLibraryOutputSchema = zod_openapi_1.z.object({
117
+ purchases: zod_openapi_1.z.array(exports.PurchaseLibraryItemSchema),
118
+ pagination: zod_openapi_1.z.object({
119
+ page: zod_openapi_1.z.number().int(),
120
+ pageSize: zod_openapi_1.z.number().int(),
121
+ totalItems: zod_openapi_1.z.number().int(),
122
+ totalPages: zod_openapi_1.z.number().int(),
123
+ hasPreviousPage: zod_openapi_1.z.boolean(),
124
+ hasNextPage: zod_openapi_1.z.boolean(),
125
+ }),
126
+ });
@@ -377,7 +377,7 @@ export declare const UserWithPostsEntitySchema: z.ZodObject<{
377
377
  url: z.ZodURL;
378
378
  title: z.ZodOptional<z.ZodString>;
379
379
  description: z.ZodOptional<z.ZodString>;
380
- image: z.ZodOptional<z.ZodURL>;
380
+ image: z.ZodOptional<z.ZodString>;
381
381
  }, z.core.$strip>>;
382
382
  id: z.ZodCUID2;
383
383
  userId: z.ZodCUID2;
@@ -728,7 +728,7 @@ export declare const UserWithPostBookmarksEntitySchema: z.ZodObject<{
728
728
  url: z.ZodURL;
729
729
  title: z.ZodOptional<z.ZodString>;
730
730
  description: z.ZodOptional<z.ZodString>;
731
- image: z.ZodOptional<z.ZodURL>;
731
+ image: z.ZodOptional<z.ZodString>;
732
732
  }, z.core.$strip>>;
733
733
  id: z.ZodCUID2;
734
734
  userId: z.ZodCUID2;
@@ -846,14 +846,21 @@ export type UserWithProductsEntity = z.infer<typeof UserWithProductsEntitySchema
846
846
  export declare const UserAuthStatusEntitySchema: z.ZodObject<{
847
847
  exists: z.ZodBoolean;
848
848
  isOAuthOnly: z.ZodBoolean;
849
+ hasPassword: z.ZodBoolean;
850
+ canChangePassword: z.ZodBoolean;
851
+ canSetPassword: z.ZodBoolean;
849
852
  providers: z.ZodArray<z.ZodString>;
850
853
  }, z.core.$strip>;
854
+ export declare const DeactivateAccountInputSchema: z.ZodObject<{
855
+ password: z.ZodOptional<z.ZodString>;
856
+ }, z.core.$strip>;
851
857
  export declare const UserWithJobBookmarksInputSchema: z.ZodObject<{
852
858
  cursor: z.ZodOptional<z.ZodString>;
853
859
  limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
854
860
  }, z.core.$strip>;
855
861
  export type UserAuthStatusEntity = z.infer<typeof UserAuthStatusEntitySchema>;
856
- export type UserWithJobBookmarksInput = z.infer<typeof UserWithJobBookmarksEntitySchema>;
862
+ export type DeactivateAccountInput = z.infer<typeof DeactivateAccountInputSchema>;
863
+ export type UserWithJobBookmarksInput = z.infer<typeof UserWithJobBookmarksInputSchema>;
857
864
  /**
858
865
  * --------------------------------
859
866
  * FOLLOW SYSTEM
@@ -967,6 +974,37 @@ export declare const SearchUsersOutputSchema: z.ZodObject<{
967
974
  nextCursor: z.ZodOptional<z.ZodString>;
968
975
  }, z.core.$strip>;
969
976
  export type SearchUsersOutput = z.infer<typeof SearchUsersOutputSchema>;
977
+ export declare const MentionableUsersInputSchema: z.ZodObject<{
978
+ query: z.ZodDefault<z.ZodString>;
979
+ roles: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodEnum<{
980
+ CREATIVE: "CREATIVE";
981
+ BRAND: "BRAND";
982
+ INVESTOR: "INVESTOR";
983
+ ADMIN: "ADMIN";
984
+ }>>>>;
985
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
986
+ }, z.core.$strip>;
987
+ export type MentionableUsersInput = z.infer<typeof MentionableUsersInputSchema>;
988
+ export declare const MentionableUsersOutputSchema: z.ZodObject<{
989
+ users: z.ZodArray<z.ZodObject<{
990
+ id: z.ZodCUID2;
991
+ name: z.ZodDefault<z.ZodString>;
992
+ email: z.ZodEmail;
993
+ image: z.ZodDefault<z.ZodString>;
994
+ username: z.ZodDefault<z.ZodString>;
995
+ role: z.ZodEnum<{
996
+ CREATIVE: "CREATIVE";
997
+ BRAND: "BRAND";
998
+ INVESTOR: "INVESTOR";
999
+ ADMIN: "ADMIN";
1000
+ }>;
1001
+ isFollowing: z.ZodBoolean;
1002
+ followsYou: z.ZodBoolean;
1003
+ noOfFollowers: z.ZodNumber;
1004
+ disciplines: z.ZodArray<z.ZodString>;
1005
+ }, z.core.$strip>>;
1006
+ }, z.core.$strip>;
1007
+ export type MentionableUsersOutput = z.infer<typeof MentionableUsersOutputSchema>;
970
1008
  /**
971
1009
  * --------------------------------
972
1010
  * ACTIVITY
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserSearchDocumentSchema = exports.GetUserActivityOutputSchema = exports.GetUserActivityInputSchema = exports.SearchUsersOutputSchema = exports.SearchUsersInputSchema = exports.UserWithFollowersEntitySchema = exports.UserWithFollowingEntitySchema = exports.UserWithJobBookmarksInputSchema = exports.UserAuthStatusEntitySchema = exports.UserWithProductsEntitySchema = exports.UserWithPostBookmarksEntitySchema = exports.UserWithProjectBookmarksEntitySchema = exports.UserWithJobBookmarksEntitySchema = exports.UserWithPostLikesEntitySchema = exports.UserWithProjectLikesEntitySchema = exports.UserWithPostsEntitySchema = exports.UserWithProjectsEntitySchema = exports.UserStatsEntitySchema = exports.UserProfileEntitySchema = exports.UserEntitySchema = void 0;
3
+ exports.UserSearchDocumentSchema = exports.GetUserActivityOutputSchema = exports.GetUserActivityInputSchema = exports.MentionableUsersOutputSchema = exports.MentionableUsersInputSchema = exports.SearchUsersOutputSchema = exports.SearchUsersInputSchema = exports.UserWithFollowersEntitySchema = exports.UserWithFollowingEntitySchema = exports.UserWithJobBookmarksInputSchema = exports.DeactivateAccountInputSchema = exports.UserAuthStatusEntitySchema = exports.UserWithProductsEntitySchema = exports.UserWithPostBookmarksEntitySchema = exports.UserWithProjectBookmarksEntitySchema = exports.UserWithJobBookmarksEntitySchema = exports.UserWithPostLikesEntitySchema = exports.UserWithProjectLikesEntitySchema = exports.UserWithPostsEntitySchema = exports.UserWithProjectsEntitySchema = exports.UserStatsEntitySchema = exports.UserProfileEntitySchema = exports.UserEntitySchema = void 0;
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const constants_1 = require("../constants");
6
6
  const project_1 = require("./project");
@@ -126,8 +126,14 @@ exports.UserWithProductsEntitySchema = zod_openapi_1.z.object({
126
126
  exports.UserAuthStatusEntitySchema = zod_openapi_1.z.object({
127
127
  exists: zod_openapi_1.z.boolean(),
128
128
  isOAuthOnly: zod_openapi_1.z.boolean(),
129
+ hasPassword: zod_openapi_1.z.boolean(),
130
+ canChangePassword: zod_openapi_1.z.boolean(),
131
+ canSetPassword: zod_openapi_1.z.boolean(),
129
132
  providers: zod_openapi_1.z.array(zod_openapi_1.z.string()),
130
133
  });
134
+ exports.DeactivateAccountInputSchema = zod_openapi_1.z.object({
135
+ password: zod_openapi_1.z.string().min(1).optional(),
136
+ });
131
137
  exports.UserWithJobBookmarksInputSchema = zod_openapi_1.z.object({
132
138
  cursor: zod_openapi_1.z.string().optional(),
133
139
  limit: zod_openapi_1.z.coerce.number().int().positive().optional(),
@@ -179,6 +185,14 @@ exports.SearchUsersOutputSchema = zod_openapi_1.z.object({
179
185
  })),
180
186
  nextCursor: zod_openapi_1.z.string().optional(),
181
187
  });
188
+ exports.MentionableUsersInputSchema = zod_openapi_1.z.object({
189
+ query: zod_openapi_1.z.string().default(""),
190
+ roles: exports.SearchUsersInputSchema.shape.roles,
191
+ limit: zod_openapi_1.z.coerce.number().int().min(1).max(10).default(10),
192
+ });
193
+ exports.MentionableUsersOutputSchema = exports.SearchUsersOutputSchema.pick({
194
+ users: true,
195
+ });
182
196
  /**
183
197
  * --------------------------------
184
198
  * ACTIVITY