@zyacreatives/shared 2.5.52 → 2.5.55

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 (114) hide show
  1. package/dist/index.d.ts +0 -1
  2. package/dist/index.js +0 -1
  3. package/dist/schemas/activity.d.ts +1 -0
  4. package/dist/schemas/auth.d.ts +2 -0
  5. package/dist/schemas/bookmark.d.ts +62 -7
  6. package/dist/schemas/bookmark.js +32 -30
  7. package/dist/schemas/brand.d.ts +3 -3
  8. package/dist/schemas/chat.d.ts +96 -52
  9. package/dist/schemas/chat.js +44 -18
  10. package/dist/schemas/comment.d.ts +65 -21
  11. package/dist/schemas/comment.js +48 -54
  12. package/dist/schemas/common.d.ts +15 -11
  13. package/dist/schemas/creative.d.ts +21 -21
  14. package/dist/schemas/creative.js +3 -3
  15. package/dist/schemas/discipline.d.ts +63 -12
  16. package/dist/schemas/discipline.js +62 -65
  17. package/dist/schemas/entity-stats.d.ts +35 -3
  18. package/dist/schemas/entity-stats.js +24 -38
  19. package/dist/schemas/feed.d.ts +50 -3
  20. package/dist/schemas/feed.js +43 -13
  21. package/dist/schemas/file.d.ts +65 -24
  22. package/dist/schemas/file.js +60 -49
  23. package/dist/schemas/index.d.ts +1 -0
  24. package/dist/schemas/index.js +1 -0
  25. package/dist/schemas/investor-shortlist.d.ts +68 -11
  26. package/dist/schemas/investor-shortlist.js +46 -24
  27. package/dist/schemas/investor-signal.d.ts +52 -12
  28. package/dist/schemas/investor-signal.js +59 -39
  29. package/dist/schemas/investor.d.ts +3 -3
  30. package/dist/schemas/job-application.d.ts +291 -279
  31. package/dist/schemas/job-application.js +59 -95
  32. package/dist/schemas/job.d.ts +200 -659
  33. package/dist/schemas/job.js +98 -231
  34. package/dist/schemas/like.d.ts +3 -0
  35. package/dist/schemas/message.d.ts +125 -94
  36. package/dist/schemas/message.js +54 -55
  37. package/dist/schemas/notification.d.ts +99 -32
  38. package/dist/schemas/notification.js +46 -42
  39. package/dist/schemas/payout-method.d.ts +51 -31
  40. package/dist/schemas/payout-method.js +48 -58
  41. package/dist/schemas/post.d.ts +295 -204
  42. package/dist/schemas/post.js +148 -272
  43. package/dist/schemas/product.d.ts +308 -229
  44. package/dist/schemas/product.js +111 -94
  45. package/dist/schemas/project.d.ts +75 -107
  46. package/dist/schemas/project.js +1 -5
  47. package/dist/schemas/seller.d.ts +10 -10
  48. package/dist/schemas/user-strike.d.ts +3 -0
  49. package/dist/schemas/user.d.ts +128 -126
  50. package/dist/schemas/user.js +10 -1
  51. package/dist/schemas/username.d.ts +1 -0
  52. package/dist/schemas/view.d.ts +1 -0
  53. package/dist/types/activity.d.ts +1 -3
  54. package/dist/types/auth.d.ts +1 -4
  55. package/dist/types/bookmark.d.ts +1 -3
  56. package/dist/types/chat.d.ts +1 -11
  57. package/dist/types/comment.d.ts +1 -5
  58. package/dist/types/common.d.ts +2 -8
  59. package/dist/types/discipline.d.ts +1 -11
  60. package/dist/types/entity-stats.d.ts +1 -3
  61. package/dist/types/feed.d.ts +1 -5
  62. package/dist/types/investor-shortlist.d.ts +1 -6
  63. package/dist/types/investor-signal.d.ts +1 -7
  64. package/dist/types/like.d.ts +1 -3
  65. package/dist/types/message.d.ts +1 -9
  66. package/dist/types/notification.d.ts +1 -9
  67. package/dist/types/user-strike.d.ts +1 -5
  68. package/dist/types/username.d.ts +1 -3
  69. package/package.json +1 -1
  70. package/src/index.ts +4 -5
  71. package/src/schemas/activity.ts +5 -4
  72. package/src/schemas/auth.ts +14 -10
  73. package/src/schemas/bookmark.ts +48 -29
  74. package/src/schemas/chat.ts +79 -18
  75. package/src/schemas/comment.ts +63 -49
  76. package/src/schemas/common.ts +8 -3
  77. package/src/schemas/creative.ts +3 -3
  78. package/src/schemas/discipline.ts +103 -71
  79. package/src/schemas/entity-stats.ts +32 -38
  80. package/src/schemas/feed.ts +62 -15
  81. package/src/schemas/file.ts +85 -58
  82. package/src/schemas/index.ts +1 -0
  83. package/src/schemas/investor-shortlist.ts +57 -8
  84. package/src/schemas/investor-signal.ts +79 -27
  85. package/src/schemas/job-application.ts +81 -115
  86. package/src/schemas/job.ts +160 -301
  87. package/src/schemas/like.ts +5 -1
  88. package/src/schemas/message.ts +71 -64
  89. package/src/schemas/notification.ts +63 -51
  90. package/src/schemas/payout-method.ts +47 -63
  91. package/src/schemas/post.ts +211 -272
  92. package/src/schemas/product.ts +202 -139
  93. package/src/schemas/project.ts +7 -10
  94. package/src/schemas/user-strike.ts +7 -1
  95. package/src/schemas/user.ts +17 -5
  96. package/src/schemas/username.ts +5 -3
  97. package/src/schemas/view.ts +0 -50
  98. package/src/types/activity.ts +0 -4
  99. package/src/types/auth.ts +0 -5
  100. package/src/types/bookmark.ts +0 -4
  101. package/src/types/chat.ts +0 -31
  102. package/src/types/comment.ts +0 -12
  103. package/src/types/common.ts +0 -14
  104. package/src/types/discipline.ts +0 -32
  105. package/src/types/entity-stats.ts +0 -4
  106. package/src/types/feed.ts +0 -10
  107. package/src/types/index.ts +0 -16
  108. package/src/types/investor-shortlist.ts +0 -18
  109. package/src/types/investor-signal.ts +0 -26
  110. package/src/types/like.ts +0 -4
  111. package/src/types/message.ts +0 -26
  112. package/src/types/notification.ts +0 -34
  113. package/src/types/user-strike.ts +0 -10
  114. package/src/types/username.ts +0 -4
@@ -1,32 +1,54 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.GetInvestorShortlistOutputSchema = exports.GetInvestorShortlistInputSchema = exports.CreateInvestorShortlistInputSchema = exports.InvestorShortlistEntitySchema = void 0;
7
- const zod_1 = __importDefault(require("zod"));
4
+ const zod_openapi_1 = require("@hono/zod-openapi");
8
5
  const constants_1 = require("../constants");
9
- exports.InvestorShortlistEntitySchema = zod_1.default.object({
10
- id: zod_1.default.cuid2(),
11
- userId: zod_1.default.cuid2(),
12
- projectId: zod_1.default.cuid2(),
13
- projectImage: zod_1.default.url(),
14
- projectCreatorImage: zod_1.default.url().optional(),
15
- projectCreatorName: zod_1.default.string(),
16
- projectName: zod_1.default.string(),
17
- projectTotalRaising: zod_1.default.string(),
18
- projectTotalRaisingCurrency: zod_1.default.enum(constants_1.WAGES_CURRENCY),
19
- projectVentureStage: zod_1.default.enum(constants_1.VENTURE_STAGES).optional(),
20
- createdAt: zod_1.default.coerce.date(),
21
- updatedAt: zod_1.default.coerce.date(),
6
+ /**
7
+ * --------------------------------
8
+ * SHAPE
9
+ * --------------------------------
10
+ */
11
+ const InvestorShortlistShape = zod_openapi_1.z.object({
12
+ projectId: zod_openapi_1.z.cuid2(),
13
+ projectImage: zod_openapi_1.z.url(),
14
+ projectCreatorImage: zod_openapi_1.z.url().optional(),
15
+ projectCreatorName: zod_openapi_1.z.string(),
16
+ projectName: zod_openapi_1.z.string(),
17
+ projectTotalRaising: zod_openapi_1.z.string(),
18
+ projectTotalRaisingCurrency: zod_openapi_1.z.enum(constants_1.WAGES_CURRENCY),
19
+ projectVentureStage: zod_openapi_1.z.enum(constants_1.VENTURE_STAGES).optional(),
22
20
  });
23
- exports.CreateInvestorShortlistInputSchema = zod_1.default.object({
24
- projectId: zod_1.default.cuid2(),
21
+ /**
22
+ * --------------------------------
23
+ * BASE ENTITY
24
+ * --------------------------------
25
+ */
26
+ exports.InvestorShortlistEntitySchema = zod_openapi_1.z
27
+ .object({
28
+ id: zod_openapi_1.z.cuid2(),
29
+ userId: zod_openapi_1.z.cuid2(),
30
+ ...InvestorShortlistShape.shape,
31
+ createdAt: zod_openapi_1.z.iso.datetime(),
32
+ updatedAt: zod_openapi_1.z.iso.datetime(),
33
+ })
34
+ .openapi("InvestorShortlist");
35
+ /**
36
+ * --------------------------------
37
+ * INPUTS
38
+ * --------------------------------
39
+ */
40
+ exports.CreateInvestorShortlistInputSchema = zod_openapi_1.z.object({
41
+ projectId: zod_openapi_1.z.cuid2(),
25
42
  });
26
- exports.GetInvestorShortlistInputSchema = zod_1.default.object({
27
- cursor: zod_1.default.string().optional().nullable(),
43
+ exports.GetInvestorShortlistInputSchema = zod_openapi_1.z.object({
44
+ cursor: zod_openapi_1.z.string().optional(),
28
45
  });
29
- exports.GetInvestorShortlistOutputSchema = zod_1.default.object({
30
- nextCursor: zod_1.default.string().optional().nullable(),
31
- shortlistItems: zod_1.default.array(exports.InvestorShortlistEntitySchema),
46
+ /**
47
+ * --------------------------------
48
+ * OUTPUTS
49
+ * --------------------------------
50
+ */
51
+ exports.GetInvestorShortlistOutputSchema = zod_openapi_1.z.object({
52
+ nextCursor: zod_openapi_1.z.string().optional(),
53
+ shortlistItems: zod_openapi_1.z.array(exports.InvestorShortlistEntitySchema),
32
54
  });
@@ -1,4 +1,28 @@
1
- import z from "zod";
1
+ import { z } from "@hono/zod-openapi";
2
+ /**
3
+ * --------------------------------
4
+ * SHAPE
5
+ * --------------------------------
6
+ */
7
+ declare const InvestorSignalShape: z.ZodObject<{
8
+ projectId: z.ZodCUID2;
9
+ signalInterestType: z.ZodEnum<{
10
+ readonly INVESTMENT: "Exploring investment opportunities";
11
+ readonly PARTNERSHIP: "Partnership & Collaboration";
12
+ readonly PRODUCT_INTEREST: "Interested in using the product";
13
+ readonly TECHNICAL_COLLABORATION: "Technical collaboration / integration";
14
+ readonly TALENT_HIRING: "Talent & Hiring";
15
+ readonly MEDIA_PRESS: "Media / Press";
16
+ readonly GENERAL_INQUIRY: "General inquiry";
17
+ }>;
18
+ interestDetails: z.ZodString;
19
+ }, z.core.$strip>;
20
+ export type InvestorSignalShapeType = z.infer<typeof InvestorSignalShape>;
21
+ /**
22
+ * --------------------------------
23
+ * BASE ENTITY
24
+ * --------------------------------
25
+ */
2
26
  export declare const InvestorSignalEntitySchema: z.ZodObject<{
3
27
  id: z.ZodCUID2;
4
28
  userId: z.ZodCUID2;
@@ -49,10 +73,16 @@ export declare const InvestorSignalEntitySchema: z.ZodObject<{
49
73
  readonly PENDING: "PENDING";
50
74
  readonly ARCHIVED: "ARCHIVED";
51
75
  }>>;
52
- createdAt: z.ZodCoercedDate<unknown>;
76
+ createdAt: z.ZodISODateTime;
77
+ updatedAt: z.ZodISODateTime;
53
78
  version: z.ZodInt;
54
- updatedAt: z.ZodCoercedDate<unknown>;
55
79
  }, z.core.$strip>;
80
+ export type InvestorSignalEntity = z.infer<typeof InvestorSignalEntitySchema>;
81
+ /**
82
+ * --------------------------------
83
+ * INPUTS
84
+ * --------------------------------
85
+ */
56
86
  export declare const CreateInvestorSignalInputSchema: z.ZodObject<{
57
87
  projectId: z.ZodCUID2;
58
88
  signalInterestType: z.ZodEnum<{
@@ -66,27 +96,35 @@ export declare const CreateInvestorSignalInputSchema: z.ZodObject<{
66
96
  }>;
67
97
  interestDetails: z.ZodString;
68
98
  }, z.core.$strip>;
69
- export declare const UpdateInvestorSignalStatusSchema: z.ZodObject<{
99
+ export type CreateInvestorSignalInput = z.infer<typeof CreateInvestorSignalInputSchema>;
100
+ export declare const UpdateInvestorSignalStatusInputSchema: z.ZodObject<{
70
101
  id: z.ZodCUID2;
71
- signalStatus: z.ZodDefault<z.ZodEnum<{
102
+ signalStatus: z.ZodEnum<{
72
103
  readonly ACCEPTED: "ACCEPTED";
73
104
  readonly DECLINED: "DECLINED";
74
105
  readonly PENDING: "PENDING";
75
106
  readonly ARCHIVED: "ARCHIVED";
76
- }>>;
107
+ }>;
77
108
  version: z.ZodInt;
78
109
  }, z.core.$strip>;
110
+ export type UpdateInvestorSignalStatusInput = z.infer<typeof UpdateInvestorSignalStatusInputSchema>;
79
111
  export declare const GetInvestorSignalInputSchema: z.ZodObject<{
80
- cursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
81
- signalStatus: z.ZodNullable<z.ZodOptional<z.ZodEnum<{
112
+ cursor: z.ZodOptional<z.ZodString>;
113
+ signalStatus: z.ZodOptional<z.ZodEnum<{
82
114
  readonly ACCEPTED: "ACCEPTED";
83
115
  readonly DECLINED: "DECLINED";
84
116
  readonly PENDING: "PENDING";
85
117
  readonly ARCHIVED: "ARCHIVED";
86
- }>>>;
118
+ }>>;
87
119
  }, z.core.$strip>;
120
+ export type GetInvestorSignalInput = z.infer<typeof GetInvestorSignalInputSchema>;
121
+ /**
122
+ * --------------------------------
123
+ * OUTPUTS
124
+ * --------------------------------
125
+ */
88
126
  export declare const GetInvestorSignalOutputSchema: z.ZodObject<{
89
- nextCursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
127
+ nextCursor: z.ZodOptional<z.ZodString>;
90
128
  signals: z.ZodArray<z.ZodObject<{
91
129
  id: z.ZodCUID2;
92
130
  userId: z.ZodCUID2;
@@ -137,8 +175,10 @@ export declare const GetInvestorSignalOutputSchema: z.ZodObject<{
137
175
  readonly PENDING: "PENDING";
138
176
  readonly ARCHIVED: "ARCHIVED";
139
177
  }>>;
140
- createdAt: z.ZodCoercedDate<unknown>;
178
+ createdAt: z.ZodISODateTime;
179
+ updatedAt: z.ZodISODateTime;
141
180
  version: z.ZodInt;
142
- updatedAt: z.ZodCoercedDate<unknown>;
143
181
  }, z.core.$strip>>;
144
182
  }, z.core.$strip>;
183
+ export type GetInvestorSignalOutput = z.infer<typeof GetInvestorSignalOutputSchema>;
184
+ export {};
@@ -1,46 +1,66 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.GetInvestorSignalOutputSchema = exports.GetInvestorSignalInputSchema = exports.UpdateInvestorSignalStatusSchema = exports.CreateInvestorSignalInputSchema = exports.InvestorSignalEntitySchema = void 0;
7
- const zod_1 = __importDefault(require("zod"));
3
+ exports.GetInvestorSignalOutputSchema = exports.GetInvestorSignalInputSchema = exports.UpdateInvestorSignalStatusInputSchema = exports.CreateInvestorSignalInputSchema = exports.InvestorSignalEntitySchema = void 0;
4
+ const zod_openapi_1 = require("@hono/zod-openapi");
8
5
  const constants_1 = require("../constants");
9
- exports.InvestorSignalEntitySchema = zod_1.default.object({
10
- id: zod_1.default.cuid2(),
11
- userId: zod_1.default.cuid2(),
12
- projectId: zod_1.default.cuid2(),
13
- projectCreatorUserId: zod_1.default.cuid2(),
14
- projectImage: zod_1.default.url(),
15
- projectCreatorUsername: zod_1.default.string(),
16
- projectName: zod_1.default.string(),
17
- projectCreatorImage: zod_1.default.url().optional(),
18
- projectCreatorName: zod_1.default.string(),
19
- projectTotalRaising: zod_1.default.string(),
20
- projectTotalRaisingCurrency: zod_1.default.enum(constants_1.WAGES_CURRENCY),
21
- projectVentureStage: zod_1.default.enum(constants_1.VENTURE_STAGES),
22
- signalInterestType: zod_1.default.enum(constants_1.SIGNAL_INTEREST_TYPES),
23
- interestDetails: zod_1.default.string().max(600),
24
- signalStatus: zod_1.default.enum(constants_1.SIGNAL_STATUS).default("PENDING"),
25
- createdAt: zod_1.default.coerce.date(),
26
- version: zod_1.default.int(),
27
- updatedAt: zod_1.default.coerce.date(),
6
+ /**
7
+ * --------------------------------
8
+ * SHAPE
9
+ * --------------------------------
10
+ */
11
+ const InvestorSignalShape = zod_openapi_1.z.object({
12
+ projectId: zod_openapi_1.z.cuid2(),
13
+ signalInterestType: zod_openapi_1.z.enum(constants_1.SIGNAL_INTEREST_TYPES),
14
+ interestDetails: zod_openapi_1.z.string().max(600),
28
15
  });
29
- exports.CreateInvestorSignalInputSchema = zod_1.default.object({
30
- projectId: zod_1.default.cuid2(),
31
- signalInterestType: zod_1.default.enum(constants_1.SIGNAL_INTEREST_TYPES),
32
- interestDetails: zod_1.default.string().max(600),
16
+ /**
17
+ * --------------------------------
18
+ * BASE ENTITY
19
+ * --------------------------------
20
+ */
21
+ exports.InvestorSignalEntitySchema = zod_openapi_1.z
22
+ .object({
23
+ id: zod_openapi_1.z.cuid2(),
24
+ userId: zod_openapi_1.z.cuid2(),
25
+ projectId: zod_openapi_1.z.cuid2(),
26
+ projectCreatorUserId: zod_openapi_1.z.cuid2(),
27
+ projectImage: zod_openapi_1.z.url(),
28
+ projectCreatorUsername: zod_openapi_1.z.string(),
29
+ projectName: zod_openapi_1.z.string(),
30
+ projectCreatorImage: zod_openapi_1.z.url().optional(),
31
+ projectCreatorName: zod_openapi_1.z.string(),
32
+ projectTotalRaising: zod_openapi_1.z.string(),
33
+ projectTotalRaisingCurrency: zod_openapi_1.z.enum(constants_1.WAGES_CURRENCY),
34
+ projectVentureStage: zod_openapi_1.z.enum(constants_1.VENTURE_STAGES),
35
+ signalInterestType: zod_openapi_1.z.enum(constants_1.SIGNAL_INTEREST_TYPES),
36
+ interestDetails: zod_openapi_1.z.string().max(600),
37
+ signalStatus: zod_openapi_1.z.enum(constants_1.SIGNAL_STATUS).default("PENDING"),
38
+ createdAt: zod_openapi_1.z.iso.datetime(),
39
+ updatedAt: zod_openapi_1.z.iso.datetime(),
40
+ version: zod_openapi_1.z.int(),
41
+ })
42
+ .openapi("InvestorSignal");
43
+ /**
44
+ * --------------------------------
45
+ * INPUTS
46
+ * --------------------------------
47
+ */
48
+ exports.CreateInvestorSignalInputSchema = InvestorSignalShape.extend({});
49
+ exports.UpdateInvestorSignalStatusInputSchema = zod_openapi_1.z.object({
50
+ id: zod_openapi_1.z.cuid2(),
51
+ signalStatus: zod_openapi_1.z.enum(constants_1.SIGNAL_STATUS),
52
+ version: zod_openapi_1.z.int(),
33
53
  });
34
- exports.UpdateInvestorSignalStatusSchema = zod_1.default.object({
35
- id: zod_1.default.cuid2(),
36
- signalStatus: zod_1.default.enum(constants_1.SIGNAL_STATUS).default("PENDING"),
37
- version: zod_1.default.int(),
54
+ exports.GetInvestorSignalInputSchema = zod_openapi_1.z.object({
55
+ cursor: zod_openapi_1.z.string().optional(),
56
+ signalStatus: zod_openapi_1.z.enum(constants_1.SIGNAL_STATUS).optional(),
38
57
  });
39
- exports.GetInvestorSignalInputSchema = zod_1.default.object({
40
- cursor: zod_1.default.string().optional().nullable(),
41
- signalStatus: zod_1.default.enum(constants_1.SIGNAL_STATUS).optional().nullable(),
42
- });
43
- exports.GetInvestorSignalOutputSchema = zod_1.default.object({
44
- nextCursor: zod_1.default.string().optional().nullable(),
45
- signals: zod_1.default.array(exports.InvestorSignalEntitySchema),
58
+ /**
59
+ * --------------------------------
60
+ * OUTPUTS
61
+ * --------------------------------
62
+ */
63
+ exports.GetInvestorSignalOutputSchema = zod_openapi_1.z.object({
64
+ nextCursor: zod_openapi_1.z.string().optional(),
65
+ signals: zod_openapi_1.z.array(exports.InvestorSignalEntitySchema),
46
66
  });
@@ -143,8 +143,8 @@ export type InvestorEntity = z.infer<typeof InvestorEntitySchema>;
143
143
  */
144
144
  export declare const MinimalInvestorEntitySchema: z.ZodObject<{
145
145
  id: z.ZodCUID2;
146
- createdAt: z.ZodISODateTime;
147
146
  userId: z.ZodCUID2;
147
+ createdAt: z.ZodISODateTime;
148
148
  updatedAt: z.ZodISODateTime;
149
149
  bio: z.ZodDefault<z.ZodString>;
150
150
  location: z.ZodDefault<z.ZodString>;
@@ -499,8 +499,8 @@ export type UpdateInvestorOutput = z.infer<typeof UpdateInvestorOutputSchema>;
499
499
  */
500
500
  export declare const InvestorWithUserEntitySchema: z.ZodObject<{
501
501
  id: z.ZodCUID2;
502
- createdAt: z.ZodISODateTime;
503
502
  userId: z.ZodCUID2;
503
+ createdAt: z.ZodISODateTime;
504
504
  updatedAt: z.ZodISODateTime;
505
505
  bio: z.ZodDefault<z.ZodString>;
506
506
  location: z.ZodDefault<z.ZodString>;
@@ -589,8 +589,8 @@ export type SearchInvestorInput = z.infer<typeof SearchInvestorInputSchema>;
589
589
  export declare const SearchInvestorOutputSchema: z.ZodObject<{
590
590
  investors: z.ZodArray<z.ZodObject<{
591
591
  id: z.ZodCUID2;
592
- createdAt: z.ZodISODateTime;
593
592
  userId: z.ZodCUID2;
593
+ createdAt: z.ZodISODateTime;
594
594
  updatedAt: z.ZodISODateTime;
595
595
  bio: z.ZodDefault<z.ZodString>;
596
596
  location: z.ZodDefault<z.ZodString>;