@zyacreatives/shared 2.5.64 → 2.5.66

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.
@@ -55,9 +55,9 @@ export declare const MinimalBrandEntitySchema: z.ZodObject<{
55
55
  userId: z.ZodCUID2;
56
56
  createdAt: z.ZodISODateTime;
57
57
  updatedAt: z.ZodISODateTime;
58
+ brandName: z.ZodString;
58
59
  bio: z.ZodDefault<z.ZodString>;
59
60
  disciplines: z.ZodDefault<z.ZodArray<z.ZodString>>;
60
- brandName: z.ZodString;
61
61
  }, z.core.$strip>;
62
62
  export type MinimalBrandEntity = z.infer<typeof MinimalBrandEntitySchema>;
63
63
  export declare const BrandWithUserEntitySchema: z.ZodObject<{
@@ -65,15 +65,15 @@ export declare const BrandWithUserEntitySchema: z.ZodObject<{
65
65
  userId: z.ZodCUID2;
66
66
  createdAt: z.ZodISODateTime;
67
67
  updatedAt: z.ZodISODateTime;
68
+ brandName: z.ZodString;
68
69
  bio: z.ZodDefault<z.ZodString>;
69
70
  disciplines: z.ZodDefault<z.ZodArray<z.ZodString>>;
70
- brandName: z.ZodString;
71
71
  user: z.ZodObject<{
72
- email: z.ZodEmail;
73
- username: z.ZodDefault<z.ZodString>;
74
72
  id: z.ZodCUID2;
75
73
  name: z.ZodDefault<z.ZodString>;
74
+ email: z.ZodEmail;
76
75
  image: z.ZodDefault<z.ZodString>;
76
+ username: z.ZodDefault<z.ZodString>;
77
77
  role: z.ZodEnum<{
78
78
  CREATIVE: "CREATIVE";
79
79
  BRAND: "BRAND";
@@ -84,8 +84,8 @@ export declare const BrandWithUserEntitySchema: z.ZodObject<{
84
84
  }, z.core.$strip>;
85
85
  export type BrandWithUserEntity = z.infer<typeof BrandWithUserEntitySchema>;
86
86
  export declare const CreateBrandProfileInputSchema: z.ZodObject<{
87
- location: z.ZodString;
88
87
  brandName: z.ZodString;
88
+ location: z.ZodString;
89
89
  disciplineSlugs: z.ZodArray<z.ZodString>;
90
90
  }, z.core.$strip>;
91
91
  export type CreateBrandProfileInput = z.infer<typeof CreateBrandProfileInputSchema>;
@@ -140,15 +140,15 @@ export declare const SearchBrandOutputSchema: z.ZodObject<{
140
140
  userId: z.ZodCUID2;
141
141
  createdAt: z.ZodISODateTime;
142
142
  updatedAt: z.ZodISODateTime;
143
+ brandName: z.ZodString;
143
144
  bio: z.ZodDefault<z.ZodString>;
144
145
  disciplines: z.ZodDefault<z.ZodArray<z.ZodString>>;
145
- brandName: z.ZodString;
146
146
  user: z.ZodObject<{
147
- email: z.ZodEmail;
148
- username: z.ZodDefault<z.ZodString>;
149
147
  id: z.ZodCUID2;
150
148
  name: z.ZodDefault<z.ZodString>;
149
+ email: z.ZodEmail;
151
150
  image: z.ZodDefault<z.ZodString>;
151
+ username: z.ZodDefault<z.ZodString>;
152
152
  role: z.ZodEnum<{
153
153
  CREATIVE: "CREATIVE";
154
154
  BRAND: "BRAND";
@@ -4,7 +4,7 @@ exports.UpdateBrandOutputSchema = exports.GetBrandOutputSchema = exports.CreateB
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const constants_1 = require("../constants");
6
6
  const common_1 = require("./common");
7
- const user_1 = require("./user");
7
+ const minimal_user_1 = require("./minimal-user");
8
8
  const BrandShape = zod_openapi_1.z.object({
9
9
  brandName: zod_openapi_1.z.string().min(1).max(200),
10
10
  bio: zod_openapi_1.z.string().max(600).default(""),
@@ -44,7 +44,7 @@ exports.MinimalBrandEntitySchema = exports.BrandEntitySchema.pick({
44
44
  updatedAt: true,
45
45
  });
46
46
  exports.BrandWithUserEntitySchema = exports.MinimalBrandEntitySchema.extend({
47
- user: user_1.MinimalUserSchema,
47
+ user: minimal_user_1.MinimalUserSchema,
48
48
  });
49
49
  exports.CreateBrandProfileInputSchema = BrandShape.pick({
50
50
  brandName: true,
@@ -96,13 +96,13 @@ export declare const MinimalCreativeEntitySchema: z.ZodObject<{
96
96
  role: z.ZodDefault<z.ZodString>;
97
97
  bio: z.ZodDefault<z.ZodString>;
98
98
  location: z.ZodDefault<z.ZodString>;
99
+ disciplines: z.ZodDefault<z.ZodArray<z.ZodString>>;
99
100
  experienceLevel: z.ZodEnum<{
100
101
  "0-1 year": "0-1 year";
101
102
  "1-3 years": "1-3 years";
102
103
  "3-5 years": "3-5 years";
103
104
  "5+ years": "5+ years";
104
105
  }>;
105
- disciplines: z.ZodDefault<z.ZodArray<z.ZodString>>;
106
106
  }, z.core.$strip>;
107
107
  export type MinimalCreativeEntity = z.infer<typeof MinimalCreativeEntitySchema>;
108
108
  /**
@@ -324,19 +324,19 @@ export declare const CreativeWithUserEntitySchema: z.ZodObject<{
324
324
  role: z.ZodDefault<z.ZodString>;
325
325
  bio: z.ZodDefault<z.ZodString>;
326
326
  location: z.ZodDefault<z.ZodString>;
327
+ disciplines: z.ZodDefault<z.ZodArray<z.ZodString>>;
327
328
  experienceLevel: z.ZodEnum<{
328
329
  "0-1 year": "0-1 year";
329
330
  "1-3 years": "1-3 years";
330
331
  "3-5 years": "3-5 years";
331
332
  "5+ years": "5+ years";
332
333
  }>;
333
- disciplines: z.ZodDefault<z.ZodArray<z.ZodString>>;
334
334
  user: z.ZodObject<{
335
- email: z.ZodEmail;
336
- username: z.ZodDefault<z.ZodString>;
337
335
  id: z.ZodCUID2;
338
336
  name: z.ZodDefault<z.ZodString>;
337
+ email: z.ZodEmail;
339
338
  image: z.ZodDefault<z.ZodString>;
339
+ username: z.ZodDefault<z.ZodString>;
340
340
  role: z.ZodEnum<{
341
341
  CREATIVE: "CREATIVE";
342
342
  BRAND: "BRAND";
@@ -366,19 +366,19 @@ export declare const SearchCreativeOutputSchema: z.ZodObject<{
366
366
  role: z.ZodDefault<z.ZodString>;
367
367
  bio: z.ZodDefault<z.ZodString>;
368
368
  location: z.ZodDefault<z.ZodString>;
369
+ disciplines: z.ZodDefault<z.ZodArray<z.ZodString>>;
369
370
  experienceLevel: z.ZodEnum<{
370
371
  "0-1 year": "0-1 year";
371
372
  "1-3 years": "1-3 years";
372
373
  "3-5 years": "3-5 years";
373
374
  "5+ years": "5+ years";
374
375
  }>;
375
- disciplines: z.ZodDefault<z.ZodArray<z.ZodString>>;
376
376
  user: z.ZodObject<{
377
- email: z.ZodEmail;
378
- username: z.ZodDefault<z.ZodString>;
379
377
  id: z.ZodCUID2;
380
378
  name: z.ZodDefault<z.ZodString>;
379
+ email: z.ZodEmail;
381
380
  image: z.ZodDefault<z.ZodString>;
381
+ username: z.ZodDefault<z.ZodString>;
382
382
  role: z.ZodEnum<{
383
383
  CREATIVE: "CREATIVE";
384
384
  BRAND: "BRAND";
@@ -4,7 +4,7 @@ exports.SearchCreativeOutputSchema = exports.SearchCreativeInputSchema = exports
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const constants_1 = require("../constants");
6
6
  const common_1 = require("./common");
7
- const user_1 = require("./user");
7
+ const minimal_user_1 = require("./minimal-user");
8
8
  /**
9
9
  * --------------------------------
10
10
  * SHAPE
@@ -112,7 +112,7 @@ exports.UpdateCreativeOutputSchema = exports.CreativeEntitySchema;
112
112
  * --------------------------------
113
113
  */
114
114
  exports.CreativeWithUserEntitySchema = exports.MinimalCreativeEntitySchema.extend({
115
- user: user_1.MinimalUserSchema,
115
+ user: minimal_user_1.MinimalUserSchema,
116
116
  });
117
117
  /**
118
118
  * --------------------------------
@@ -28,3 +28,4 @@ export * from "./seller";
28
28
  export * from "./product";
29
29
  export * from "./transaction";
30
30
  export * from "./settings";
31
+ export * from "./minimal-user";
@@ -44,3 +44,4 @@ __exportStar(require("./seller"), exports);
44
44
  __exportStar(require("./product"), exports);
45
45
  __exportStar(require("./transaction"), exports);
46
46
  __exportStar(require("./settings"), exports);
47
+ __exportStar(require("./minimal-user"), exports);
@@ -148,13 +148,13 @@ export declare const MinimalInvestorEntitySchema: z.ZodObject<{
148
148
  updatedAt: z.ZodISODateTime;
149
149
  bio: z.ZodDefault<z.ZodString>;
150
150
  location: z.ZodDefault<z.ZodString>;
151
+ disciplines: z.ZodDefault<z.ZodArray<z.ZodString>>;
151
152
  experienceLevel: z.ZodEnum<{
152
153
  "0-1 year": "0-1 year";
153
154
  "1-3 years": "1-3 years";
154
155
  "3-5 years": "3-5 years";
155
156
  "5+ years": "5+ years";
156
157
  }>;
157
- disciplines: z.ZodDefault<z.ZodArray<z.ZodString>>;
158
158
  investorType: z.ZodEnum<{
159
159
  "Angel Investor": "Angel Investor";
160
160
  "Venture Capitalist": "Venture Capitalist";
@@ -504,13 +504,13 @@ export declare const InvestorWithUserEntitySchema: z.ZodObject<{
504
504
  updatedAt: z.ZodISODateTime;
505
505
  bio: z.ZodDefault<z.ZodString>;
506
506
  location: z.ZodDefault<z.ZodString>;
507
+ disciplines: z.ZodDefault<z.ZodArray<z.ZodString>>;
507
508
  experienceLevel: z.ZodEnum<{
508
509
  "0-1 year": "0-1 year";
509
510
  "1-3 years": "1-3 years";
510
511
  "3-5 years": "3-5 years";
511
512
  "5+ years": "5+ years";
512
513
  }>;
513
- disciplines: z.ZodDefault<z.ZodArray<z.ZodString>>;
514
514
  investorType: z.ZodEnum<{
515
515
  "Angel Investor": "Angel Investor";
516
516
  "Venture Capitalist": "Venture Capitalist";
@@ -546,11 +546,11 @@ export declare const InvestorWithUserEntitySchema: z.ZodObject<{
546
546
  }>;
547
547
  websiteURL: z.ZodDefault<z.ZodURL>;
548
548
  user: z.ZodObject<{
549
- email: z.ZodEmail;
550
- username: z.ZodDefault<z.ZodString>;
551
549
  id: z.ZodCUID2;
552
550
  name: z.ZodDefault<z.ZodString>;
551
+ email: z.ZodEmail;
553
552
  image: z.ZodDefault<z.ZodString>;
553
+ username: z.ZodDefault<z.ZodString>;
554
554
  role: z.ZodEnum<{
555
555
  CREATIVE: "CREATIVE";
556
556
  BRAND: "BRAND";
@@ -594,13 +594,13 @@ export declare const SearchInvestorOutputSchema: z.ZodObject<{
594
594
  updatedAt: z.ZodISODateTime;
595
595
  bio: z.ZodDefault<z.ZodString>;
596
596
  location: z.ZodDefault<z.ZodString>;
597
+ disciplines: z.ZodDefault<z.ZodArray<z.ZodString>>;
597
598
  experienceLevel: z.ZodEnum<{
598
599
  "0-1 year": "0-1 year";
599
600
  "1-3 years": "1-3 years";
600
601
  "3-5 years": "3-5 years";
601
602
  "5+ years": "5+ years";
602
603
  }>;
603
- disciplines: z.ZodDefault<z.ZodArray<z.ZodString>>;
604
604
  investorType: z.ZodEnum<{
605
605
  "Angel Investor": "Angel Investor";
606
606
  "Venture Capitalist": "Venture Capitalist";
@@ -636,11 +636,11 @@ export declare const SearchInvestorOutputSchema: z.ZodObject<{
636
636
  }>;
637
637
  websiteURL: z.ZodDefault<z.ZodURL>;
638
638
  user: z.ZodObject<{
639
- email: z.ZodEmail;
640
- username: z.ZodDefault<z.ZodString>;
641
639
  id: z.ZodCUID2;
642
640
  name: z.ZodDefault<z.ZodString>;
641
+ email: z.ZodEmail;
643
642
  image: z.ZodDefault<z.ZodString>;
643
+ username: z.ZodDefault<z.ZodString>;
644
644
  role: z.ZodEnum<{
645
645
  CREATIVE: "CREATIVE";
646
646
  BRAND: "BRAND";
@@ -4,7 +4,7 @@ exports.SearchInvestorOutputSchema = exports.SearchInvestorInputSchema = exports
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const constants_1 = require("../constants");
6
6
  const common_1 = require("./common");
7
- const user_1 = require("./user");
7
+ const minimal_user_1 = require("./minimal-user");
8
8
  /**
9
9
  * --------------------------------
10
10
  * SHAPE
@@ -108,7 +108,7 @@ exports.UpdateInvestorOutputSchema = exports.InvestorEntitySchema;
108
108
  * --------------------------------
109
109
  */
110
110
  exports.InvestorWithUserEntitySchema = exports.MinimalInvestorEntitySchema.extend({
111
- user: user_1.MinimalUserSchema,
111
+ user: minimal_user_1.MinimalUserSchema,
112
112
  });
113
113
  /**
114
114
  * --------------------------------
@@ -100,11 +100,11 @@ export declare const JobApplicationEntitySchema: z.ZodObject<{
100
100
  id: z.ZodCUID2;
101
101
  applicantId: z.ZodCUID2;
102
102
  user: z.ZodObject<{
103
- email: z.ZodEmail;
104
- username: z.ZodDefault<z.ZodString>;
105
103
  id: z.ZodCUID2;
106
104
  name: z.ZodDefault<z.ZodString>;
105
+ email: z.ZodEmail;
107
106
  image: z.ZodDefault<z.ZodString>;
107
+ username: z.ZodDefault<z.ZodString>;
108
108
  role: z.ZodEnum<{
109
109
  CREATIVE: "CREATIVE";
110
110
  BRAND: "BRAND";
@@ -123,11 +123,11 @@ export declare const MinimalJobApplicationEntitySchema: z.ZodObject<{
123
123
  id: z.ZodCUID2;
124
124
  jobId: z.ZodCUID2;
125
125
  user: z.ZodObject<{
126
- email: z.ZodEmail;
127
- username: z.ZodDefault<z.ZodString>;
128
126
  id: z.ZodCUID2;
129
127
  name: z.ZodDefault<z.ZodString>;
128
+ email: z.ZodEmail;
130
129
  image: z.ZodDefault<z.ZodString>;
130
+ username: z.ZodDefault<z.ZodString>;
131
131
  role: z.ZodEnum<{
132
132
  CREATIVE: "CREATIVE";
133
133
  BRAND: "BRAND";
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetTrackedJobApplicationsOutputSchema = exports.GetTrackedJobApplicationsInputSchema = exports.UpdateJobApplicationInputSchema = exports.CreateJobApplicationInputSchema = exports.TrackedJobApplicationEntitySchema = exports.MinimalJobApplicationEntitySchema = exports.JobApplicationEntitySchema = void 0;
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const constants_1 = require("../constants");
6
- const user_1 = require("./user");
7
6
  const job_1 = require("./job");
7
+ const minimal_user_1 = require("./minimal-user");
8
8
  /**
9
9
  * --------------------------------
10
10
  * ENUMS
@@ -62,7 +62,7 @@ exports.JobApplicationEntitySchema = zod_openapi_1.z
62
62
  .object({
63
63
  id: zod_openapi_1.z.cuid2(),
64
64
  applicantId: zod_openapi_1.z.cuid2(),
65
- user: user_1.MinimalUserSchema,
65
+ user: minimal_user_1.MinimalUserSchema,
66
66
  ...JobApplicationShape.shape,
67
67
  applicationStatus: ApplicationStatusSchema,
68
68
  createdAt: zod_openapi_1.z.iso.datetime(),
@@ -77,7 +77,7 @@ exports.JobApplicationEntitySchema = zod_openapi_1.z
77
77
  exports.MinimalJobApplicationEntitySchema = zod_openapi_1.z.object({
78
78
  id: zod_openapi_1.z.cuid2(),
79
79
  jobId: zod_openapi_1.z.cuid2(),
80
- user: user_1.MinimalUserSchema,
80
+ user: minimal_user_1.MinimalUserSchema,
81
81
  coverLetter: zod_openapi_1.z.string(),
82
82
  applicationStatus: ApplicationStatusSchema,
83
83
  createdAt: zod_openapi_1.z.iso.datetime(),
@@ -0,0 +1,15 @@
1
+ import { z } from "@hono/zod-openapi";
2
+ export declare const MinimalUserSchema: z.ZodObject<{
3
+ id: z.ZodCUID2;
4
+ name: z.ZodDefault<z.ZodString>;
5
+ email: z.ZodEmail;
6
+ image: z.ZodDefault<z.ZodString>;
7
+ username: z.ZodDefault<z.ZodString>;
8
+ role: z.ZodEnum<{
9
+ CREATIVE: "CREATIVE";
10
+ BRAND: "BRAND";
11
+ INVESTOR: "INVESTOR";
12
+ ADMIN: "ADMIN";
13
+ }>;
14
+ }, z.core.$strip>;
15
+ export type MinimalUser = z.infer<typeof MinimalUserSchema>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MinimalUserSchema = void 0;
4
+ // schemas/minimal-user.ts
5
+ const zod_openapi_1 = require("@hono/zod-openapi");
6
+ const constants_1 = require("../constants");
7
+ exports.MinimalUserSchema = zod_openapi_1.z
8
+ .object({
9
+ id: zod_openapi_1.z.cuid2(),
10
+ name: zod_openapi_1.z.string().default(""),
11
+ email: zod_openapi_1.z.email(),
12
+ image: zod_openapi_1.z.string().default(""),
13
+ username: zod_openapi_1.z.string().default(""),
14
+ role: zod_openapi_1.z.enum(Object.values(constants_1.ROLES)),
15
+ })
16
+ .openapi("MinimalUser");
@@ -169,11 +169,11 @@ export declare const NotificationDetailsEntitySchema: z.ZodObject<{
169
169
  }>;
170
170
  id: z.ZodCUID2;
171
171
  actor: z.ZodObject<{
172
- email: z.ZodEmail;
173
- username: z.ZodDefault<z.ZodString>;
174
172
  id: z.ZodCUID2;
175
173
  name: z.ZodDefault<z.ZodString>;
174
+ email: z.ZodEmail;
176
175
  image: z.ZodDefault<z.ZodString>;
176
+ username: z.ZodDefault<z.ZodString>;
177
177
  role: z.ZodEnum<{
178
178
  CREATIVE: "CREATIVE";
179
179
  BRAND: "BRAND";
@@ -182,11 +182,11 @@ export declare const NotificationDetailsEntitySchema: z.ZodObject<{
182
182
  }>;
183
183
  }, z.core.$strip>;
184
184
  recipient: z.ZodObject<{
185
- email: z.ZodEmail;
186
- username: z.ZodDefault<z.ZodString>;
187
185
  id: z.ZodCUID2;
188
186
  name: z.ZodDefault<z.ZodString>;
187
+ email: z.ZodEmail;
189
188
  image: z.ZodDefault<z.ZodString>;
189
+ username: z.ZodDefault<z.ZodString>;
190
190
  role: z.ZodEnum<{
191
191
  CREATIVE: "CREATIVE";
192
192
  BRAND: "BRAND";
@@ -293,11 +293,11 @@ export declare const ListNotificationsOutputSchema: z.ZodObject<{
293
293
  }>;
294
294
  id: z.ZodCUID2;
295
295
  actor: z.ZodObject<{
296
- email: z.ZodEmail;
297
- username: z.ZodDefault<z.ZodString>;
298
296
  id: z.ZodCUID2;
299
297
  name: z.ZodDefault<z.ZodString>;
298
+ email: z.ZodEmail;
300
299
  image: z.ZodDefault<z.ZodString>;
300
+ username: z.ZodDefault<z.ZodString>;
301
301
  role: z.ZodEnum<{
302
302
  CREATIVE: "CREATIVE";
303
303
  BRAND: "BRAND";
@@ -306,11 +306,11 @@ export declare const ListNotificationsOutputSchema: z.ZodObject<{
306
306
  }>;
307
307
  }, z.core.$strip>;
308
308
  recipient: z.ZodObject<{
309
- email: z.ZodEmail;
310
- username: z.ZodDefault<z.ZodString>;
311
309
  id: z.ZodCUID2;
312
310
  name: z.ZodDefault<z.ZodString>;
311
+ email: z.ZodEmail;
313
312
  image: z.ZodDefault<z.ZodString>;
313
+ username: z.ZodDefault<z.ZodString>;
314
314
  role: z.ZodEnum<{
315
315
  CREATIVE: "CREATIVE";
316
316
  BRAND: "BRAND";
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NotificationCountOutputSchema = exports.ListNotificationsOutputSchema = exports.MarkReadInputSchema = exports.ListNotificationsInputSchema = exports.NotificationDetailsEntitySchema = exports.NotificationEntitySchema = void 0;
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const constants_1 = require("../constants");
6
- const user_1 = require("./user");
6
+ const minimal_user_1 = require("./minimal-user");
7
7
  /**
8
8
  * --------------------------------
9
9
  * SHAPE
@@ -34,8 +34,8 @@ exports.NotificationEntitySchema = zod_openapi_1.z
34
34
  })
35
35
  .openapi("Notification");
36
36
  exports.NotificationDetailsEntitySchema = exports.NotificationEntitySchema.extend({
37
- actor: user_1.MinimalUserSchema,
38
- recipient: user_1.MinimalUserSchema,
37
+ actor: minimal_user_1.MinimalUserSchema,
38
+ recipient: minimal_user_1.MinimalUserSchema,
39
39
  itemTitle: zod_openapi_1.z.string().optional(),
40
40
  itemContent: zod_openapi_1.z.string().optional(),
41
41
  itemImgUrl: zod_openapi_1.z.string().optional(),
@@ -304,11 +304,11 @@ export declare const ProjectDetailsEntitySchema: z.ZodObject<{
304
304
  id: z.ZodCUID2;
305
305
  userId: z.ZodCUID2;
306
306
  user: z.ZodObject<{
307
- email: z.ZodEmail;
308
- username: z.ZodDefault<z.ZodString>;
309
307
  id: z.ZodCUID2;
310
308
  name: z.ZodDefault<z.ZodString>;
309
+ email: z.ZodEmail;
311
310
  image: z.ZodDefault<z.ZodString>;
311
+ username: z.ZodDefault<z.ZodString>;
312
312
  role: z.ZodEnum<{
313
313
  CREATIVE: "CREATIVE";
314
314
  BRAND: "BRAND";
@@ -728,11 +728,11 @@ export declare const GetProjectOutputSchema: z.ZodObject<{
728
728
  id: z.ZodCUID2;
729
729
  userId: z.ZodCUID2;
730
730
  user: z.ZodObject<{
731
- email: z.ZodEmail;
732
- username: z.ZodDefault<z.ZodString>;
733
731
  id: z.ZodCUID2;
734
732
  name: z.ZodDefault<z.ZodString>;
733
+ email: z.ZodEmail;
735
734
  image: z.ZodDefault<z.ZodString>;
735
+ username: z.ZodDefault<z.ZodString>;
736
736
  role: z.ZodEnum<{
737
737
  CREATIVE: "CREATIVE";
738
738
  BRAND: "BRAND";
@@ -5,9 +5,9 @@ const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const constants_1 = require("../constants");
6
6
  const comment_1 = require("./comment");
7
7
  const bookmark_1 = require("./bookmark");
8
- const user_1 = require("./user");
9
8
  const activity_1 = require("./activity");
10
9
  const file_1 = require("./file");
10
+ const minimal_user_1 = require("./minimal-user");
11
11
  /**
12
12
  * --------------------------------
13
13
  * SHAPE
@@ -77,7 +77,7 @@ exports.ProjectSocialGraphEntitySchema = zod_openapi_1.z
77
77
  })
78
78
  .openapi("ProjectSocialGraph");
79
79
  exports.ProjectDetailsEntitySchema = exports.ProjectEntitySchema.extend({
80
- user: user_1.MinimalUserSchema,
80
+ user: minimal_user_1.MinimalUserSchema,
81
81
  files: zod_openapi_1.z.array(file_1.FileEntitySchema).optional(),
82
82
  }).openapi("ProjectDetails");
83
83
  exports.ProjectWithProjectCommentsEntitySchema = exports.MinimalProjectSchema.extend({
@@ -80,20 +80,6 @@ export type UserEntity = z.infer<typeof UserEntitySchema>;
80
80
  * DERIVED ENTITIES
81
81
  * --------------------------------
82
82
  */
83
- export declare const MinimalUserSchema: z.ZodObject<{
84
- email: z.ZodEmail;
85
- username: z.ZodDefault<z.ZodString>;
86
- id: z.ZodCUID2;
87
- name: z.ZodDefault<z.ZodString>;
88
- image: z.ZodDefault<z.ZodString>;
89
- role: z.ZodEnum<{
90
- CREATIVE: "CREATIVE";
91
- BRAND: "BRAND";
92
- INVESTOR: "INVESTOR";
93
- ADMIN: "ADMIN";
94
- }>;
95
- }, z.core.$strip>;
96
- export type MinimalUser = z.infer<typeof MinimalUserSchema>;
97
83
  export declare const UserProfileEntitySchema: z.ZodObject<{
98
84
  createdAt: z.ZodISODateTime;
99
85
  updatedAt: z.ZodISODateTime;
@@ -300,6 +286,7 @@ export declare const UserWithProjectsEntitySchema: z.ZodObject<{
300
286
  }>;
301
287
  startDate: z.ZodOptional<z.ZodISODateTime>;
302
288
  endDate: z.ZodOptional<z.ZodISODateTime>;
289
+ version: z.ZodInt;
303
290
  imagePlaceholderUrl: z.ZodURL;
304
291
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
305
292
  projectCreatorType: z.ZodEnum<{
@@ -344,7 +331,6 @@ export declare const UserWithProjectsEntitySchema: z.ZodObject<{
344
331
  }>>;
345
332
  currentTraction: z.ZodString;
346
333
  isOpenToInvestment: z.ZodDefault<z.ZodBoolean>;
347
- version: z.ZodInt;
348
334
  }, z.core.$strip>>;
349
335
  }, z.core.$strip>;
350
336
  export type UserWithProjectsEntity = z.infer<typeof UserWithProjectsEntitySchema>;
@@ -854,11 +840,11 @@ declare const FollowMeta: z.ZodObject<{
854
840
  }, z.core.$strip>;
855
841
  export type FollowMeta = z.infer<typeof FollowMeta>;
856
842
  export declare const UserWithFollowingEntitySchema: z.ZodObject<{
857
- email: z.ZodEmail;
858
- username: z.ZodDefault<z.ZodString>;
859
843
  id: z.ZodCUID2;
860
844
  name: z.ZodDefault<z.ZodString>;
845
+ email: z.ZodEmail;
861
846
  image: z.ZodDefault<z.ZodString>;
847
+ username: z.ZodDefault<z.ZodString>;
862
848
  role: z.ZodEnum<{
863
849
  CREATIVE: "CREATIVE";
864
850
  BRAND: "BRAND";
@@ -866,11 +852,11 @@ export declare const UserWithFollowingEntitySchema: z.ZodObject<{
866
852
  ADMIN: "ADMIN";
867
853
  }>;
868
854
  following: z.ZodArray<z.ZodObject<{
869
- email: z.ZodEmail;
870
- username: z.ZodDefault<z.ZodString>;
871
855
  id: z.ZodCUID2;
872
856
  name: z.ZodDefault<z.ZodString>;
857
+ email: z.ZodEmail;
873
858
  image: z.ZodDefault<z.ZodString>;
859
+ username: z.ZodDefault<z.ZodString>;
874
860
  role: z.ZodEnum<{
875
861
  CREATIVE: "CREATIVE";
876
862
  BRAND: "BRAND";
@@ -883,11 +869,11 @@ export declare const UserWithFollowingEntitySchema: z.ZodObject<{
883
869
  }, z.core.$strip>;
884
870
  export type UserWithFollowingEntity = z.infer<typeof UserWithFollowingEntitySchema>;
885
871
  export declare const UserWithFollowersEntitySchema: z.ZodObject<{
886
- email: z.ZodEmail;
887
- username: z.ZodDefault<z.ZodString>;
888
872
  id: z.ZodCUID2;
889
873
  name: z.ZodDefault<z.ZodString>;
874
+ email: z.ZodEmail;
890
875
  image: z.ZodDefault<z.ZodString>;
876
+ username: z.ZodDefault<z.ZodString>;
891
877
  role: z.ZodEnum<{
892
878
  CREATIVE: "CREATIVE";
893
879
  BRAND: "BRAND";
@@ -895,11 +881,11 @@ export declare const UserWithFollowersEntitySchema: z.ZodObject<{
895
881
  ADMIN: "ADMIN";
896
882
  }>;
897
883
  followers: z.ZodArray<z.ZodObject<{
898
- email: z.ZodEmail;
899
- username: z.ZodDefault<z.ZodString>;
900
884
  id: z.ZodCUID2;
901
885
  name: z.ZodDefault<z.ZodString>;
886
+ email: z.ZodEmail;
902
887
  image: z.ZodDefault<z.ZodString>;
888
+ username: z.ZodDefault<z.ZodString>;
903
889
  role: z.ZodEnum<{
904
890
  CREATIVE: "CREATIVE";
905
891
  BRAND: "BRAND";
@@ -937,11 +923,11 @@ export declare const SearchUsersInputSchema: z.ZodObject<{
937
923
  export type SearchUsersInput = z.infer<typeof SearchUsersInputSchema>;
938
924
  export declare const SearchUsersOutputSchema: z.ZodObject<{
939
925
  users: z.ZodArray<z.ZodObject<{
940
- email: z.ZodEmail;
941
- username: z.ZodDefault<z.ZodString>;
942
926
  id: z.ZodCUID2;
943
927
  name: z.ZodDefault<z.ZodString>;
928
+ email: z.ZodEmail;
944
929
  image: z.ZodDefault<z.ZodString>;
930
+ username: z.ZodDefault<z.ZodString>;
945
931
  role: z.ZodEnum<{
946
932
  CREATIVE: "CREATIVE";
947
933
  BRAND: "BRAND";
@@ -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.MinimalUserSchema = exports.UserEntitySchema = void 0;
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;
4
4
  const zod_openapi_1 = require("@hono/zod-openapi");
5
5
  const constants_1 = require("../constants");
6
6
  const project_1 = require("./project");
@@ -12,6 +12,7 @@ const investor_1 = require("./investor");
12
12
  const post_1 = require("./post");
13
13
  const job_1 = require("./job");
14
14
  const product_1 = require("./product");
15
+ const minimal_user_1 = require("./minimal-user");
15
16
  /**
16
17
  * --------------------------------
17
18
  * SHAPE
@@ -47,14 +48,6 @@ exports.UserEntitySchema = zod_openapi_1.z
47
48
  * DERIVED ENTITIES
48
49
  * --------------------------------
49
50
  */
50
- exports.MinimalUserSchema = exports.UserEntitySchema.pick({
51
- id: true,
52
- name: true,
53
- email: true,
54
- image: true,
55
- username: true,
56
- role: true,
57
- }).openapi("MinimalUser");
58
51
  exports.UserProfileEntitySchema = exports.UserEntitySchema.extend({
59
52
  profileType: zod_openapi_1.z.enum(["creative", "brand", "investor"]).optional(),
60
53
  brand: brand_1.BrandEntitySchema.optional(),
@@ -148,11 +141,11 @@ const FollowMeta = zod_openapi_1.z.object({
148
141
  isFollowing: zod_openapi_1.z.boolean(),
149
142
  followsYou: zod_openapi_1.z.boolean(),
150
143
  });
151
- exports.UserWithFollowingEntitySchema = exports.MinimalUserSchema.extend({
152
- following: zod_openapi_1.z.array(exports.MinimalUserSchema.extend(FollowMeta.shape)),
144
+ exports.UserWithFollowingEntitySchema = minimal_user_1.MinimalUserSchema.extend({
145
+ following: zod_openapi_1.z.array(minimal_user_1.MinimalUserSchema.extend(FollowMeta.shape)),
153
146
  });
154
- exports.UserWithFollowersEntitySchema = exports.MinimalUserSchema.extend({
155
- followers: zod_openapi_1.z.array(exports.MinimalUserSchema.extend(FollowMeta.shape)),
147
+ exports.UserWithFollowersEntitySchema = minimal_user_1.MinimalUserSchema.extend({
148
+ followers: zod_openapi_1.z.array(minimal_user_1.MinimalUserSchema.extend(FollowMeta.shape)),
156
149
  });
157
150
  /**
158
151
  * --------------------------------
@@ -178,7 +171,7 @@ exports.SearchUsersInputSchema = zod_openapi_1.z.object({
178
171
  ...CursorPaginationInput.shape,
179
172
  });
180
173
  exports.SearchUsersOutputSchema = zod_openapi_1.z.object({
181
- users: zod_openapi_1.z.array(exports.MinimalUserSchema.extend({
174
+ users: zod_openapi_1.z.array(minimal_user_1.MinimalUserSchema.extend({
182
175
  isFollowing: zod_openapi_1.z.boolean(),
183
176
  followsYou: zod_openapi_1.z.boolean(),
184
177
  noOfFollowers: zod_openapi_1.z.number().int(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.5.64",
3
+ "version": "2.5.66",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  import { z } from "@hono/zod-openapi";
2
2
  import { LINK_TYPES } from "../constants";
3
3
  import { ProfileIdentifierSchema } from "./common";
4
- import { MinimalUserSchema } from "./user";
4
+ import { MinimalUserSchema } from "./minimal-user";
5
5
 
6
6
 
7
7
  const BrandShape = z.object({
@@ -1,7 +1,8 @@
1
1
  import { z } from "@hono/zod-openapi";
2
2
  import { EXPERIENCE_LEVELS, ExperienceLevel, LINK_TYPES } from "../constants";
3
3
  import { ProfileIdentifierSchema } from "./common";
4
- import { MinimalUserSchema } from "./user";
4
+ import { MinimalUserSchema } from "./minimal-user";
5
+
5
6
 
6
7
  /**
7
8
  * --------------------------------
@@ -28,3 +28,4 @@ export * from "./seller";
28
28
  export * from "./product";
29
29
  export * from "./transaction";
30
30
  export * from "./settings";
31
+ export * from "./minimal-user"
@@ -11,7 +11,8 @@ import {
11
11
  LINK_TYPES,
12
12
  } from "../constants";
13
13
  import { CuidSchema, ProfileIdentifierSchema } from "./common";
14
- import { MinimalUserSchema } from "./user";
14
+ import { MinimalUserSchema } from "./minimal-user";
15
+
15
16
 
16
17
  /**
17
18
  * --------------------------------
@@ -12,8 +12,8 @@ import {
12
12
  JobType,
13
13
  } from "../constants";
14
14
 
15
- import { MinimalUserSchema } from "./user";
16
15
  import { NormalizedJobSchema } from "./job";
16
+ import { MinimalUserSchema } from "./minimal-user";
17
17
 
18
18
  /**
19
19
  * --------------------------------
@@ -152,6 +152,7 @@ export const RoleDetailsSchema = z.object({
152
152
  * --------------------------------
153
153
  */
154
154
 
155
+
155
156
  export const GigJobEntitySchema = JobEntitySchema.extend({
156
157
  jobType: z.literal(JOB_TYPE.GIG),
157
158
  gigType: GigTypeSchema,
@@ -0,0 +1,17 @@
1
+ // schemas/minimal-user.ts
2
+ import { z } from "@hono/zod-openapi";
3
+ import { ROLES } from "../constants";
4
+ import type { Role } from "../constants";
5
+
6
+ export const MinimalUserSchema = z
7
+ .object({
8
+ id: z.cuid2(),
9
+ name: z.string().default(""),
10
+ email: z.email(),
11
+ image: z.string().default(""),
12
+ username: z.string().default(""),
13
+ role: z.enum(Object.values(ROLES) as [Role, ...Role[]]),
14
+ })
15
+ .openapi("MinimalUser");
16
+
17
+ export type MinimalUser = z.infer<typeof MinimalUserSchema>;
@@ -1,7 +1,7 @@
1
1
  import { z } from "@hono/zod-openapi";
2
2
 
3
3
  import { ACTIVITY_PARENT_TYPES, NOTIFICATION_TYPES } from "../constants";
4
- import { MinimalUserSchema } from "./user";
4
+ import { MinimalUserSchema } from "./minimal-user";
5
5
 
6
6
  /**
7
7
  * --------------------------------
@@ -10,10 +10,10 @@ import {
10
10
 
11
11
  import { CommentEntitySchema } from "./comment";
12
12
  import { BookmarkEntitySchema } from "./bookmark";
13
- import { MinimalUserSchema } from "./user";
14
13
  import { ActivitySchema } from "./activity";
15
14
  import { FileEntitySchema } from "./file";
16
15
  import { LikeEntitySchema } from "./like";
16
+ import { MinimalUserSchema } from "./minimal-user";
17
17
 
18
18
  /**
19
19
  * --------------------------------
@@ -25,6 +25,7 @@ import { InvestorEntitySchema } from "./investor";
25
25
  import { PostEntitySchema, PostWithFilesEntitySchema } from "./post";
26
26
  import { JobSearchDocumentSchema } from "./job";
27
27
  import { ProductEntitySchema } from "./product";
28
+ import { MinimalUserSchema } from "./minimal-user";
28
29
 
29
30
  /**
30
31
  * --------------------------------
@@ -72,16 +73,6 @@ export type UserEntity = z.infer<typeof UserEntitySchema>;
72
73
  * --------------------------------
73
74
  */
74
75
 
75
- export const MinimalUserSchema = UserEntitySchema.pick({
76
- id: true,
77
- name: true,
78
- email: true,
79
- image: true,
80
- username: true,
81
- role: true,
82
- }).openapi("MinimalUser");
83
-
84
- export type MinimalUser = z.infer<typeof MinimalUserSchema>;
85
76
 
86
77
  export const UserProfileEntitySchema = UserEntitySchema.extend({
87
78
  profileType: z.enum(["creative", "brand", "investor"]).optional(),