@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
@@ -200,6 +200,7 @@ export declare const NotificationDetailsEntitySchema: z.ZodObject<{
200
200
  itemContent: z.ZodOptional<z.ZodString>;
201
201
  itemImgUrl: z.ZodOptional<z.ZodString>;
202
202
  itemStatus: z.ZodOptional<z.ZodString>;
203
+ signalProjectId: z.ZodOptional<z.ZodString>;
203
204
  }, z.core.$strip>;
204
205
  export type NotificationDetailsEntity = z.infer<typeof NotificationDetailsEntitySchema>;
205
206
  export declare const NotificationTabSchema: z.ZodEnum<{
@@ -402,6 +403,7 @@ export declare const NotificationInboxTabSchema: z.ZodEnum<{
402
403
  following: "following";
403
404
  all: "all";
404
405
  archived: "archived";
406
+ signals: "signals";
405
407
  }>;
406
408
  export type NotificationInboxTab = z.infer<typeof NotificationInboxTabSchema>;
407
409
  export declare const NotificationInboxCategorySchema: z.ZodEnum<{
@@ -410,6 +412,7 @@ export declare const NotificationInboxCategorySchema: z.ZodEnum<{
410
412
  jobs: "jobs";
411
413
  following: "following";
412
414
  system: "system";
415
+ signals: "signals";
413
416
  marketplace: "marketplace";
414
417
  }>;
415
418
  export declare const NotificationInboxKindSchema: z.ZodEnum<{
@@ -432,6 +435,10 @@ export declare const NotificationInboxKindSchema: z.ZodEnum<{
432
435
  product_approved: "product_approved";
433
436
  marketplace_drop: "marketplace_drop";
434
437
  friend_product_added: "friend_product_added";
438
+ investment_signal_created: "investment_signal_created";
439
+ investment_signal_accepted: "investment_signal_accepted";
440
+ investment_signal_declined: "investment_signal_declined";
441
+ investment_signal_archived: "investment_signal_archived";
435
442
  }>;
436
443
  export declare const NotificationInboxItemSchema: z.ZodObject<{
437
444
  id: z.ZodString;
@@ -455,6 +462,10 @@ export declare const NotificationInboxItemSchema: z.ZodObject<{
455
462
  product_approved: "product_approved";
456
463
  marketplace_drop: "marketplace_drop";
457
464
  friend_product_added: "friend_product_added";
465
+ investment_signal_created: "investment_signal_created";
466
+ investment_signal_accepted: "investment_signal_accepted";
467
+ investment_signal_declined: "investment_signal_declined";
468
+ investment_signal_archived: "investment_signal_archived";
458
469
  }>;
459
470
  tab: z.ZodEnum<{
460
471
  comments: "comments";
@@ -462,6 +473,7 @@ export declare const NotificationInboxItemSchema: z.ZodObject<{
462
473
  jobs: "jobs";
463
474
  following: "following";
464
475
  system: "system";
476
+ signals: "signals";
465
477
  marketplace: "marketplace";
466
478
  }>;
467
479
  isRead: z.ZodBoolean;
@@ -530,6 +542,7 @@ export declare const NotificationInboxItemSchema: z.ZodObject<{
530
542
  JOB: "JOB";
531
543
  POST: "POST";
532
544
  PRODUCT: "PRODUCT";
545
+ SIGNAL: "SIGNAL";
533
546
  COMMENT: "COMMENT";
534
547
  JOB_APPLICATION: "JOB_APPLICATION";
535
548
  CHAT: "CHAT";
@@ -641,6 +654,7 @@ export declare const ListNotificationInboxInputSchema: z.ZodObject<{
641
654
  following: "following";
642
655
  all: "all";
643
656
  archived: "archived";
657
+ signals: "signals";
644
658
  }>>>;
645
659
  unreadOnly: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
646
660
  cursor: z.ZodOptional<z.ZodString>;
@@ -741,6 +755,7 @@ export declare const ListNotificationsOutputSchema: z.ZodObject<{
741
755
  itemContent: z.ZodOptional<z.ZodString>;
742
756
  itemImgUrl: z.ZodOptional<z.ZodString>;
743
757
  itemStatus: z.ZodOptional<z.ZodString>;
758
+ signalProjectId: z.ZodOptional<z.ZodString>;
744
759
  }, z.core.$strip>>;
745
760
  items: z.ZodDefault<z.ZodArray<z.ZodObject<{
746
761
  id: z.ZodString;
@@ -913,6 +928,10 @@ export declare const ListNotificationInboxOutputSchema: z.ZodObject<{
913
928
  product_approved: "product_approved";
914
929
  marketplace_drop: "marketplace_drop";
915
930
  friend_product_added: "friend_product_added";
931
+ investment_signal_created: "investment_signal_created";
932
+ investment_signal_accepted: "investment_signal_accepted";
933
+ investment_signal_declined: "investment_signal_declined";
934
+ investment_signal_archived: "investment_signal_archived";
916
935
  }>;
917
936
  tab: z.ZodEnum<{
918
937
  comments: "comments";
@@ -920,6 +939,7 @@ export declare const ListNotificationInboxOutputSchema: z.ZodObject<{
920
939
  jobs: "jobs";
921
940
  following: "following";
922
941
  system: "system";
942
+ signals: "signals";
923
943
  marketplace: "marketplace";
924
944
  }>;
925
945
  isRead: z.ZodBoolean;
@@ -988,6 +1008,7 @@ export declare const ListNotificationInboxOutputSchema: z.ZodObject<{
988
1008
  JOB: "JOB";
989
1009
  POST: "POST";
990
1010
  PRODUCT: "PRODUCT";
1011
+ SIGNAL: "SIGNAL";
991
1012
  COMMENT: "COMMENT";
992
1013
  JOB_APPLICATION: "JOB_APPLICATION";
993
1014
  CHAT: "CHAT";
@@ -1053,6 +1074,7 @@ export declare const ListNotificationInboxOutputSchema: z.ZodObject<{
1053
1074
  following: z.ZodOptional<z.ZodInt>;
1054
1075
  likes: z.ZodOptional<z.ZodInt>;
1055
1076
  comments: z.ZodOptional<z.ZodInt>;
1077
+ signals: z.ZodOptional<z.ZodInt>;
1056
1078
  archived: z.ZodOptional<z.ZodInt>;
1057
1079
  }, z.core.$strip>>;
1058
1080
  }, z.core.$strip>;
@@ -41,6 +41,7 @@ exports.NotificationDetailsEntitySchema = exports.NotificationEntitySchema.exten
41
41
  itemContent: zod_openapi_1.z.string().optional(),
42
42
  itemImgUrl: zod_openapi_1.z.string().optional(),
43
43
  itemStatus: zod_openapi_1.z.string().optional(),
44
+ signalProjectId: zod_openapi_1.z.string().optional(),
44
45
  });
45
46
  exports.NotificationTabSchema = zod_openapi_1.z.enum([
46
47
  "all",
@@ -106,6 +107,7 @@ exports.NotificationInboxTabSchema = zod_openapi_1.z.enum([
106
107
  "following",
107
108
  "likes",
108
109
  "comments",
110
+ "signals",
109
111
  "archived",
110
112
  ]);
111
113
  exports.NotificationInboxCategorySchema = zod_openapi_1.z.enum([
@@ -115,6 +117,7 @@ exports.NotificationInboxCategorySchema = zod_openapi_1.z.enum([
115
117
  "system",
116
118
  "jobs",
117
119
  "marketplace",
120
+ "signals",
118
121
  ]);
119
122
  exports.NotificationInboxKindSchema = zod_openapi_1.z.enum([
120
123
  "account_verified",
@@ -136,6 +139,10 @@ exports.NotificationInboxKindSchema = zod_openapi_1.z.enum([
136
139
  "product_approved",
137
140
  "marketplace_drop",
138
141
  "friend_product_added",
142
+ "investment_signal_created",
143
+ "investment_signal_accepted",
144
+ "investment_signal_declined",
145
+ "investment_signal_archived",
139
146
  ]);
140
147
  exports.NotificationInboxItemSchema = zod_openapi_1.z
141
148
  .object({
@@ -196,6 +203,7 @@ exports.NotificationInboxItemSchema = zod_openapi_1.z
196
203
  "PRODUCT",
197
204
  "CHAT",
198
205
  "SETTINGS",
206
+ "SIGNAL",
199
207
  ]),
200
208
  entityId: zod_openapi_1.z.string().optional(),
201
209
  })
@@ -294,6 +302,7 @@ exports.ListNotificationInboxOutputSchema = zod_openapi_1.z.object({
294
302
  following: zod_openapi_1.z.int().optional(),
295
303
  likes: zod_openapi_1.z.int().optional(),
296
304
  comments: zod_openapi_1.z.int().optional(),
305
+ signals: zod_openapi_1.z.int().optional(),
297
306
  archived: zod_openapi_1.z.int().optional(),
298
307
  })
299
308
  .optional(),
@@ -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
@@ -1,9 +1,4 @@
1
1
  import { z } from "@hono/zod-openapi";
2
- /**
3
- * --------------------------------
4
- * SHARED
5
- * --------------------------------
6
- */
7
2
  export declare const ProductDiscountEntitySchema: z.ZodObject<{
8
3
  discountType: z.ZodEnum<{
9
4
  readonly FIXED_AMOUNT: "Fixed Amount";
@@ -311,6 +306,10 @@ export declare const ProductDiscountCheckInputSchema: z.ZodObject<{
311
306
  productId: z.ZodCUID2;
312
307
  }, z.core.$strip>;
313
308
  export type ProductDiscountCheckInput = z.infer<typeof ProductDiscountCheckInputSchema>;
309
+ export declare const ProductIdInputSchema: z.ZodObject<{
310
+ productId: z.ZodCUID2;
311
+ }, z.core.$strip>;
312
+ export type ProductIdInput = z.infer<typeof ProductIdInputSchema>;
314
313
  export declare const RevenueChartInputSchema: z.ZodObject<{
315
314
  startDate: z.ZodOptional<z.ZodString>;
316
315
  endDate: z.ZodOptional<z.ZodString>;
@@ -1,14 +1,9 @@
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");
7
- /**
8
- * --------------------------------
9
- * SHARED
10
- * --------------------------------
11
- */
12
7
  exports.ProductDiscountEntitySchema = zod_openapi_1.z.object({
13
8
  discountType: zod_openapi_1.z.enum(constants_1.DISCOUNT_TYPES),
14
9
  amount: zod_openapi_1.z.number().int().min(0),
@@ -179,6 +174,9 @@ exports.ProductDiscountCheckInputSchema = zod_openapi_1.z.object({
179
174
  discountCode: zod_openapi_1.z.string(),
180
175
  productId: zod_openapi_1.z.cuid2(),
181
176
  });
177
+ exports.ProductIdInputSchema = zod_openapi_1.z.object({
178
+ productId: zod_openapi_1.z.cuid2().openapi({ example: "ckj1a2b3c0000xyz" }),
179
+ });
182
180
  exports.RevenueChartInputSchema = zod_openapi_1.z.object({
183
181
  startDate: zod_openapi_1.z.string().optional(),
184
182
  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
+ });
@@ -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
@@ -0,0 +1,193 @@
1
+ # Backend OpenAPI Shared Contracts Handoff
2
+
3
+ Shared now exports the backend OpenAPI request/response contracts that were previously defined locally in backend route files. After publishing this package, update the backend dependency and replace the local schemas with top-level imports from `@zyacreatives/shared`.
4
+
5
+ ## Publish Target
6
+
7
+ - Package: `@zyacreatives/shared`
8
+ - Current source version: `2.5.79`
9
+ - Import style: prefer `@zyacreatives/shared` over deep imports such as `@zyacreatives/shared/dist/schemas/comment`.
10
+
11
+ ## Highest Priority Replacements
12
+
13
+ ### User Purchase Library
14
+
15
+ Backend sources:
16
+ - `src/api/user/user.openapi.ts`
17
+ - `src/api/transaction/transaction.services.ts`
18
+
19
+ Shared exports:
20
+ - `PurchaseLibraryInputSchema`
21
+ - `PurchaseLibraryItemSchema`
22
+ - `PurchaseLibraryOutputSchema`
23
+ - `type PurchaseLibraryInput`
24
+ - `type PurchaseLibraryItem`
25
+ - `type PurchaseLibraryOutput`
26
+
27
+ Backend migration notes:
28
+ - Replace the local OpenAPI schemas in `user.openapi.ts`.
29
+ - Remove duplicated `PurchaseLibraryItem` / purchase result service types in `transaction.services.ts` and infer/use the shared types instead.
30
+
31
+ ### Chat Reports And Chat List Query
32
+
33
+ Backend source:
34
+ - `src/api/chat/chat.openapi.ts`
35
+
36
+ Shared exports:
37
+ - `ReportChatInputSchema`
38
+ - `ReportChatOutputSchema`
39
+ - `ChatListQuerySchema`
40
+ - `type ReportChatInput`
41
+ - `type ReportChatOutput`
42
+ - `type ChatListQuery`
43
+
44
+ ### Job Dashboard / Application Status Outputs
45
+
46
+ Backend sources:
47
+ - `src/api/job/job.openapi.ts`
48
+ - `src/entity/job.entity.ts`
49
+
50
+ Shared exports:
51
+ - `NormalizedJobSchema`
52
+ - `type NormalizedJob`
53
+ - `GetCreatedJobsOutputSchema`
54
+ - `GetApplicationStatusUpdatesCountOutputSchema`
55
+ - `JobApplicationIdInputSchema`
56
+ - `GetApplicationsForJobOutputSchema`
57
+
58
+ Backend migration notes:
59
+ - Use shared `NormalizedJobSchema` for OpenAPI responses.
60
+ - `NormalizedJobSchema` remains compatible with the existing shared job entity schemas.
61
+ - `JobApplicationIdInputSchema` uses `{ applicationId: string }` for the path param.
62
+
63
+ ### Comment Threads And Replies
64
+
65
+ Backend sources:
66
+ - `src/api/comment/comment.openapi.ts`
67
+ - `src/api/project/project.openapi.ts`
68
+
69
+ Shared exports:
70
+ - `CommentThreadResponseSchema`
71
+ - `CommentRepliesOutputSchema`
72
+ - `CommentIdInputSchema`
73
+ - `ProjectCommentParamsSchema`
74
+
75
+ Backend migration notes:
76
+ - Replace deep `CommentEntitySchema` imports with top-level imports from `@zyacreatives/shared`.
77
+
78
+ ### Payout Method Utility Inputs
79
+
80
+ Backend source:
81
+ - `src/api/payout-method/payout-method.openapi.ts`
82
+
83
+ Shared exports:
84
+ - `GetBanksInputSchema`
85
+ - `VerifyAccountInputSchema`
86
+ - `type GetBanksInput`
87
+ - `type VerifyAccountInput`
88
+
89
+ ## Medium Priority Replacements
90
+
91
+ ### User Auth / Mentions / Feed Preferences
92
+
93
+ Backend source:
94
+ - `src/api/user/user.openapi.ts`
95
+
96
+ Shared exports:
97
+ - `UserAuthStatusEntitySchema`
98
+ - `DeactivateAccountInputSchema`
99
+ - `MentionableUsersInputSchema`
100
+ - `MentionableUsersOutputSchema`
101
+ - `UserWithJobBookmarksInputSchema`
102
+ - `FeedTagsInputSchema`
103
+ - `FeedTagsSchema`
104
+
105
+ ### Feed Variant Output
106
+
107
+ Backend source:
108
+ - `src/api/feed/feed.openapi.ts`
109
+
110
+ Shared export:
111
+ - `GetFeedWithCommentPolicyOutputSchema`
112
+
113
+ Note:
114
+ - If this is now the canonical feed response, consider replacing or aliasing backend usage of any older local feed output schema.
115
+
116
+ ### Messages Delete And Params
117
+
118
+ Backend sources:
119
+ - `src/api/message/message.openapi.ts`
120
+ - `src/api/message/message.services.ts`
121
+
122
+ Shared exports:
123
+ - `ChatIdParamSchema`
124
+ - `MessageParamsSchema`
125
+ - `DeleteMessagesInputSchema`
126
+ - `type DeleteMessagesInput`
127
+
128
+ ### Investor Signal / Shortlist Checks
129
+
130
+ Backend sources:
131
+ - `src/api/investor-signal/investor-signal.openapi.ts`
132
+ - `src/api/investor-shortlist-item/investor-shortlist-item.openapi.ts`
133
+
134
+ Shared exports:
135
+ - `CheckInvestorSignalOutputSchema`
136
+ - `CheckInvestorShortlistItemOutputSchema`
137
+ - `InvestorSignalIdInputSchema`
138
+ - `InvestorShortlistItemIdInputSchema`
139
+ - `DefaultApiSuccessOutputSchema`
140
+
141
+ ### File Route Params And JSend URL Response
142
+
143
+ Backend source:
144
+ - `src/api/file/file.openapi.ts`
145
+
146
+ Shared exports:
147
+ - `PurchasedDownloadUrlInputSchema`
148
+ - `PublicFileUrlInputSchema`
149
+ - `PresignedUrlJSendOutputSchema`
150
+
151
+ ## Low Priority / Primitive Replacements
152
+
153
+ ### Entity Id Params
154
+
155
+ Backend sources:
156
+ - `src/api/product/product.openapi.ts`
157
+ - `src/api/transaction/transaction.openapi.ts`
158
+ - `src/api/job/job.openapi.ts`
159
+ - inline investor module params
160
+
161
+ Shared exports:
162
+ - `ProductIdInputSchema`
163
+ - `TransactionIdInputSchema`
164
+ - `JobIdSchema`
165
+ - `ApplicationIdInputSchema`
166
+ - `IdInputSchema`
167
+
168
+ ### Discipline Tags Query
169
+
170
+ Backend source:
171
+ - `src/api/discipline/discipline.openapi.ts`
172
+
173
+ Shared exports:
174
+ - `GetDisciplineTagsInputSchema`
175
+ - `GetDisciplineTagsOutputSchema`
176
+
177
+ ## Suggested Backend Migration Order
178
+
179
+ 1. Update `@zyacreatives/shared` in backend `package.json` after publishing.
180
+ 2. Replace local OpenAPI schemas listed above with top-level shared imports.
181
+ 3. Remove duplicated service-level types where shared now exports matching types.
182
+ 4. Replace deep shared imports with top-level `@zyacreatives/shared` imports.
183
+ 5. Regenerate OpenAPI output.
184
+ 6. Run backend typecheck and route/OpenAPI tests.
185
+
186
+ ## Verification Completed In Shared
187
+
188
+ The shared package typechecks successfully with:
189
+
190
+ ```sh
191
+ pnpm.cmd tsc
192
+ ```
193
+