@zyacreatives/shared 2.5.51 → 2.5.54

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.
@@ -18,10 +18,10 @@ declare const CreativeShape: z.ZodObject<{
18
18
  workExperience: z.ZodDefault<z.ZodArray<z.ZodObject<{
19
19
  companyName: z.ZodString;
20
20
  position: z.ZodString;
21
- startDate: z.ZodOptional<z.ZodString>;
22
- endDate: z.ZodOptional<z.ZodString>;
21
+ startDate: z.ZodOptional<z.ZodISODateTime>;
22
+ endDate: z.ZodOptional<z.ZodISODateTime>;
23
23
  currentlyWorking: z.ZodDefault<z.ZodBoolean>;
24
- description: z.ZodDefault<z.ZodString>;
24
+ description: z.ZodOptional<z.ZodString>;
25
25
  }, z.core.$strip>>>;
26
26
  links: z.ZodDefault<z.ZodArray<z.ZodObject<{
27
27
  url: z.ZodURL;
@@ -63,10 +63,10 @@ export declare const CreativeEntitySchema: z.ZodObject<{
63
63
  workExperience: z.ZodDefault<z.ZodArray<z.ZodObject<{
64
64
  companyName: z.ZodString;
65
65
  position: z.ZodString;
66
- startDate: z.ZodOptional<z.ZodString>;
67
- endDate: z.ZodOptional<z.ZodString>;
66
+ startDate: z.ZodOptional<z.ZodISODateTime>;
67
+ endDate: z.ZodOptional<z.ZodISODateTime>;
68
68
  currentlyWorking: z.ZodDefault<z.ZodBoolean>;
69
- description: z.ZodDefault<z.ZodString>;
69
+ description: z.ZodOptional<z.ZodString>;
70
70
  }, z.core.$strip>>>;
71
71
  links: z.ZodDefault<z.ZodArray<z.ZodObject<{
72
72
  url: z.ZodURL;
@@ -136,10 +136,10 @@ export declare const UpdateCreativeProfileInputSchema: z.ZodObject<{
136
136
  workExperience: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
137
137
  companyName: z.ZodString;
138
138
  position: z.ZodString;
139
- startDate: z.ZodOptional<z.ZodString>;
140
- endDate: z.ZodOptional<z.ZodString>;
139
+ startDate: z.ZodOptional<z.ZodISODateTime>;
140
+ endDate: z.ZodOptional<z.ZodISODateTime>;
141
141
  currentlyWorking: z.ZodDefault<z.ZodBoolean>;
142
- description: z.ZodDefault<z.ZodString>;
142
+ description: z.ZodOptional<z.ZodString>;
143
143
  }, z.core.$strip>>>>;
144
144
  links: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
145
145
  url: z.ZodURL;
@@ -202,10 +202,10 @@ export declare const CreateCreativeOutputSchema: z.ZodObject<{
202
202
  workExperience: z.ZodDefault<z.ZodArray<z.ZodObject<{
203
203
  companyName: z.ZodString;
204
204
  position: z.ZodString;
205
- startDate: z.ZodOptional<z.ZodString>;
206
- endDate: z.ZodOptional<z.ZodString>;
205
+ startDate: z.ZodOptional<z.ZodISODateTime>;
206
+ endDate: z.ZodOptional<z.ZodISODateTime>;
207
207
  currentlyWorking: z.ZodDefault<z.ZodBoolean>;
208
- description: z.ZodDefault<z.ZodString>;
208
+ description: z.ZodOptional<z.ZodString>;
209
209
  }, z.core.$strip>>>;
210
210
  links: z.ZodDefault<z.ZodArray<z.ZodObject<{
211
211
  url: z.ZodURL;
@@ -244,10 +244,10 @@ export declare const GetCreativeOutputSchema: z.ZodObject<{
244
244
  workExperience: z.ZodDefault<z.ZodArray<z.ZodObject<{
245
245
  companyName: z.ZodString;
246
246
  position: z.ZodString;
247
- startDate: z.ZodOptional<z.ZodString>;
248
- endDate: z.ZodOptional<z.ZodString>;
247
+ startDate: z.ZodOptional<z.ZodISODateTime>;
248
+ endDate: z.ZodOptional<z.ZodISODateTime>;
249
249
  currentlyWorking: z.ZodDefault<z.ZodBoolean>;
250
- description: z.ZodDefault<z.ZodString>;
250
+ description: z.ZodOptional<z.ZodString>;
251
251
  }, z.core.$strip>>>;
252
252
  links: z.ZodDefault<z.ZodArray<z.ZodObject<{
253
253
  url: z.ZodURL;
@@ -286,10 +286,10 @@ export declare const UpdateCreativeOutputSchema: z.ZodObject<{
286
286
  workExperience: z.ZodDefault<z.ZodArray<z.ZodObject<{
287
287
  companyName: z.ZodString;
288
288
  position: z.ZodString;
289
- startDate: z.ZodOptional<z.ZodString>;
290
- endDate: z.ZodOptional<z.ZodString>;
289
+ startDate: z.ZodOptional<z.ZodISODateTime>;
290
+ endDate: z.ZodOptional<z.ZodISODateTime>;
291
291
  currentlyWorking: z.ZodDefault<z.ZodBoolean>;
292
- description: z.ZodDefault<z.ZodString>;
292
+ description: z.ZodOptional<z.ZodString>;
293
293
  }, z.core.$strip>>>;
294
294
  links: z.ZodDefault<z.ZodArray<z.ZodObject<{
295
295
  url: z.ZodURL;
@@ -20,10 +20,10 @@ const CreativeShape = zod_openapi_1.z.object({
20
20
  .array(zod_openapi_1.z.object({
21
21
  companyName: zod_openapi_1.z.string(),
22
22
  position: zod_openapi_1.z.string(),
23
- startDate: zod_openapi_1.z.string().datetime().optional(),
24
- endDate: zod_openapi_1.z.string().datetime().optional(),
23
+ startDate: zod_openapi_1.z.iso.datetime().optional(),
24
+ endDate: zod_openapi_1.z.iso.datetime().optional(),
25
25
  currentlyWorking: zod_openapi_1.z.boolean().default(false),
26
- description: zod_openapi_1.z.string().default(""),
26
+ description: zod_openapi_1.z.string().optional(),
27
27
  }))
28
28
  .default([]),
29
29
  links: zod_openapi_1.z
@@ -1,4 +1,40 @@
1
1
  import { z } from "@hono/zod-openapi";
2
+ /**
3
+ * --------------------------------
4
+ * SHAPE
5
+ * --------------------------------
6
+ */
7
+ declare const UserShape: z.ZodObject<{
8
+ email: z.ZodEmail;
9
+ emailVerified: z.ZodBoolean;
10
+ name: z.ZodDefault<z.ZodString>;
11
+ image: z.ZodDefault<z.ZodString>;
12
+ username: z.ZodDefault<z.ZodString>;
13
+ displayUsername: z.ZodDefault<z.ZodString>;
14
+ role: z.ZodEnum<{
15
+ CREATIVE: "CREATIVE";
16
+ BRAND: "BRAND";
17
+ INVESTOR: "INVESTOR";
18
+ ADMIN: "ADMIN";
19
+ }>;
20
+ status: z.ZodEnum<{
21
+ ACTIVE: "ACTIVE";
22
+ SUSPENDED: "SUSPENDED";
23
+ DELETED: "DELETED";
24
+ }>;
25
+ onboardingPage: z.ZodEnum<{
26
+ EMAIL_VERIFICATION: "EMAIL_VERIFICATION";
27
+ USERNAME_SELECTION: "USERNAME_SELECTION";
28
+ ACCOUNT_TYPE_SELECTION: "ACCOUNT_TYPE_SELECTION";
29
+ CREATIVE_PROFILE_DETAILS: "CREATIVE_PROFILE_DETAILS";
30
+ BRAND_PROFILE_DETAILS: "BRAND_PROFILE_DETAILS";
31
+ INVESTOR_PROFILE_DETAILS: "INVESTOR_PROFILE_DETAILS";
32
+ INVESTOR_INVESTMENT_FOCUS: "INVESTOR_INVESTMENT_FOCUS";
33
+ INVESTOR_VERIFICATION: "INVESTOR_VERIFICATION";
34
+ DONE: "DONE";
35
+ }>;
36
+ }, z.core.$strip>;
37
+ export type UserShapeType = z.infer<typeof UserShape>;
2
38
  /**
3
39
  * --------------------------------
4
40
  * BASE ENTITY
@@ -140,10 +176,10 @@ export declare const UserProfileEntitySchema: z.ZodObject<{
140
176
  workExperience: z.ZodDefault<z.ZodArray<z.ZodObject<{
141
177
  companyName: z.ZodString;
142
178
  position: z.ZodString;
143
- startDate: z.ZodOptional<z.ZodString>;
144
- endDate: z.ZodOptional<z.ZodString>;
179
+ startDate: z.ZodOptional<z.ZodISODateTime>;
180
+ endDate: z.ZodOptional<z.ZodISODateTime>;
145
181
  currentlyWorking: z.ZodDefault<z.ZodBoolean>;
146
- description: z.ZodDefault<z.ZodString>;
182
+ description: z.ZodOptional<z.ZodString>;
147
183
  }, z.core.$strip>>>;
148
184
  links: z.ZodDefault<z.ZodArray<z.ZodObject<{
149
185
  url: z.ZodURL;
@@ -237,6 +273,16 @@ export declare const UserStatsEntitySchema: z.ZodObject<{
237
273
  followingCount: z.ZodInt;
238
274
  followingIds: z.ZodArray<z.ZodCUID2>;
239
275
  }, z.core.$strip>;
276
+ export type UserStatsEntity = z.infer<typeof UserStatsEntitySchema>;
277
+ /**
278
+ * --------------------------------
279
+ * COMPOSED ENTITIES
280
+ * --------------------------------
281
+ */
282
+ declare const UserWithId: z.ZodObject<{
283
+ userId: z.ZodCUID2;
284
+ }, z.core.$strip>;
285
+ export type UserWithIdType = z.infer<typeof UserWithId>;
240
286
  export declare const UserWithProjectsEntitySchema: z.ZodObject<{
241
287
  userId: z.ZodCUID2;
242
288
  projects: z.ZodArray<z.ZodObject<{
@@ -301,6 +347,7 @@ export declare const UserWithProjectsEntitySchema: z.ZodObject<{
301
347
  version: z.ZodNumber;
302
348
  }, z.core.$strip>>;
303
349
  }, z.core.$strip>;
350
+ export type UserWithProjectsEntity = z.infer<typeof UserWithProjectsEntitySchema>;
304
351
  export declare const UserWithPostsEntitySchema: z.ZodObject<{
305
352
  userId: z.ZodCUID2;
306
353
  posts: z.ZodArray<z.ZodObject<{
@@ -380,94 +427,7 @@ export declare const UserWithPostsEntitySchema: z.ZodObject<{
380
427
  }, z.core.$strip>>>;
381
428
  }, z.core.$strip>>;
382
429
  }, z.core.$strip>;
383
- export declare const UserWithProductsEntitySchema: z.ZodObject<{
384
- userId: z.ZodCUID2;
385
- products: z.ZodArray<z.ZodObject<{
386
- id: z.ZodCUID2;
387
- sellerId: z.ZodCUID2;
388
- sellerUsername: z.ZodString;
389
- sellerName: z.ZodString;
390
- sellerImageUrl: z.ZodNullable<z.ZodOptional<z.ZodURL>>;
391
- title: z.ZodString;
392
- description: z.ZodString;
393
- keyFeatures: z.ZodString;
394
- status: z.ZodDefault<z.ZodEnum<{
395
- readonly ACTIVE: "ACTIVE";
396
- readonly UNDER_REVIEW: "UNDER_REVIEW";
397
- readonly DRAFT: "DRAFT";
398
- readonly ARCHIVED: "ARCHIVED";
399
- readonly DELETED: "DELETED";
400
- }>>;
401
- category: z.ZodString;
402
- subcategory: z.ZodNullable<z.ZodOptional<z.ZodString>>;
403
- tags: z.ZodArray<z.ZodString>;
404
- files: z.ZodDefault<z.ZodArray<z.ZodObject<{
405
- id: z.ZodCUID2;
406
- key: z.ZodString;
407
- mimeType: z.ZodString;
408
- url: z.ZodURL;
409
- parentId: z.ZodNullable<z.ZodCUID2>;
410
- parentType: z.ZodNullable<z.ZodEnum<{
411
- readonly PROJECT: "PROJECT";
412
- readonly USER: "USER";
413
- readonly JOB: "JOB";
414
- readonly POST: "POST";
415
- readonly PRODUCT: "PRODUCT";
416
- readonly SIGNAL: "SIGNAL";
417
- readonly PRODUCT_COVER: "PRODUCT_COVER";
418
- readonly PRODUCT_DELIVERY: "PRODUCT_DELIVERY";
419
- readonly COMMENT: "COMMENT";
420
- readonly JOB_APPLICATION: "JOB_APPLICATION";
421
- }>>;
422
- isThumbnail: z.ZodNullable<z.ZodBoolean>;
423
- order: z.ZodNumber;
424
- createdAt: z.ZodCoercedDate<unknown>;
425
- updatedAt: z.ZodCoercedDate<unknown>;
426
- deletedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
427
- }, z.core.$strip>>>;
428
- productLinks: z.ZodDefault<z.ZodArray<z.ZodObject<{
429
- title: z.ZodNullable<z.ZodString>;
430
- url: z.ZodString;
431
- }, z.core.$strip>>>;
432
- pricingModel: z.ZodEnum<{
433
- readonly FREE: "Free";
434
- readonly FIXED: "Fixed";
435
- readonly PWYW: "Pay What You Want";
436
- }>;
437
- currency: z.ZodEnum<{
438
- readonly USD: "USD (United States Dollar)";
439
- readonly EUR: "EUR (Euro)";
440
- readonly GBP: "GBP (British Pound Sterling)";
441
- readonly NGN: "NGN (Nigerian Naira)";
442
- readonly CAD: "CAD (Canadian Dollar)";
443
- readonly AUD: "AUD (Australian Dollar)";
444
- readonly JPY: "JPY (Japanese Yen)";
445
- readonly CHF: "CHF (Swiss Franc)";
446
- readonly INR: "INR (Indian Rupee)";
447
- readonly ZAR: "ZAR (South African Rand)";
448
- }>;
449
- price: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
450
- suggestedPrice: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
451
- discounts: z.ZodDefault<z.ZodArray<z.ZodObject<{
452
- discountType: z.ZodEnum<{
453
- readonly FIXED_AMOUNT: "Fixed Amount";
454
- readonly PERCENTAGE: "Percentage";
455
- }>;
456
- amount: z.ZodNumber;
457
- discountCode: z.ZodOptional<z.ZodString>;
458
- active: z.ZodDefault<z.ZodBoolean>;
459
- }, z.core.$strip>>>;
460
- ownsRights: z.ZodBoolean;
461
- noHarmfulContent: z.ZodBoolean;
462
- providesSupport: z.ZodBoolean;
463
- agreesToTerms: z.ZodBoolean;
464
- supportEmail: z.ZodNullable<z.ZodOptional<z.ZodEmail>>;
465
- supportPhone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
466
- createdAt: z.ZodCoercedDate<unknown>;
467
- updatedAt: z.ZodCoercedDate<unknown>;
468
- deletedAt: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
469
- }, z.core.$strip>>;
470
- }, z.core.$strip>;
430
+ export type UserWithPostsEntity = z.infer<typeof UserWithPostsEntitySchema>;
471
431
  export declare const UserWithProjectLikesEntitySchema: z.ZodObject<{
472
432
  userId: z.ZodCUID2;
473
433
  projectLikes: z.ZodArray<z.ZodObject<{
@@ -498,6 +458,7 @@ export declare const UserWithProjectLikesEntitySchema: z.ZodObject<{
498
458
  }, z.core.$strip>;
499
459
  }, z.core.$strip>>;
500
460
  }, z.core.$strip>;
461
+ export type UserWithProjectLikesEntity = z.infer<typeof UserWithProjectLikesEntitySchema>;
501
462
  export declare const UserWithPostLikesEntitySchema: z.ZodObject<{
502
463
  userId: z.ZodCUID2;
503
464
  postLikes: z.ZodArray<z.ZodObject<{
@@ -529,6 +490,7 @@ export declare const UserWithPostLikesEntitySchema: z.ZodObject<{
529
490
  }, z.core.$strip>;
530
491
  }, z.core.$strip>>;
531
492
  }, z.core.$strip>;
493
+ export type UserWithPostLikesEntity = z.infer<typeof UserWithPostLikesEntitySchema>;
532
494
  /**
533
495
  * --------------------------------
534
496
  * BOOKMARKS
@@ -581,6 +543,7 @@ export declare const UserWithJobBookmarksEntitySchema: z.ZodObject<{
581
543
  }, z.core.$strip>;
582
544
  }, z.core.$strip>>;
583
545
  }, z.core.$strip>;
546
+ export type UserWithJobBookmarksEntity = z.infer<typeof UserWithJobBookmarksEntitySchema>;
584
547
  export declare const UserWithProjectBookmarksEntitySchema: z.ZodObject<{
585
548
  userId: z.ZodCUID2;
586
549
  projectBookmarks: z.ZodArray<z.ZodObject<{
@@ -681,6 +644,7 @@ export declare const UserWithProjectBookmarksEntitySchema: z.ZodObject<{
681
644
  }, z.core.$strip>;
682
645
  }, z.core.$strip>>;
683
646
  }, z.core.$strip>;
647
+ export type UserWithProjectBookmarksEntity = z.infer<typeof UserWithProjectBookmarksEntitySchema>;
684
648
  export declare const UserWithPostBookmarksEntitySchema: z.ZodObject<{
685
649
  userId: z.ZodCUID2;
686
650
  postBookmarks: z.ZodArray<z.ZodObject<{
@@ -778,6 +742,117 @@ export declare const UserWithPostBookmarksEntitySchema: z.ZodObject<{
778
742
  }, z.core.$strip>;
779
743
  }, z.core.$strip>>;
780
744
  }, z.core.$strip>;
745
+ export type UserWithPostBookmarksEntity = z.infer<typeof UserWithPostBookmarksEntitySchema>;
746
+ export declare const UserWithProductsEntitySchema: z.ZodObject<{
747
+ userId: z.ZodCUID2;
748
+ products: z.ZodArray<z.ZodObject<{
749
+ id: z.ZodCUID2;
750
+ sellerId: z.ZodCUID2;
751
+ sellerUsername: z.ZodString;
752
+ sellerName: z.ZodString;
753
+ sellerImageUrl: z.ZodNullable<z.ZodOptional<z.ZodURL>>;
754
+ title: z.ZodString;
755
+ description: z.ZodString;
756
+ keyFeatures: z.ZodString;
757
+ status: z.ZodDefault<z.ZodEnum<{
758
+ readonly ACTIVE: "ACTIVE";
759
+ readonly UNDER_REVIEW: "UNDER_REVIEW";
760
+ readonly DRAFT: "DRAFT";
761
+ readonly ARCHIVED: "ARCHIVED";
762
+ readonly DELETED: "DELETED";
763
+ }>>;
764
+ category: z.ZodString;
765
+ subcategory: z.ZodNullable<z.ZodOptional<z.ZodString>>;
766
+ tags: z.ZodArray<z.ZodString>;
767
+ files: z.ZodDefault<z.ZodArray<z.ZodObject<{
768
+ id: z.ZodCUID2;
769
+ key: z.ZodString;
770
+ mimeType: z.ZodString;
771
+ url: z.ZodURL;
772
+ parentId: z.ZodNullable<z.ZodCUID2>;
773
+ parentType: z.ZodNullable<z.ZodEnum<{
774
+ readonly PROJECT: "PROJECT";
775
+ readonly USER: "USER";
776
+ readonly JOB: "JOB";
777
+ readonly POST: "POST";
778
+ readonly PRODUCT: "PRODUCT";
779
+ readonly SIGNAL: "SIGNAL";
780
+ readonly PRODUCT_COVER: "PRODUCT_COVER";
781
+ readonly PRODUCT_DELIVERY: "PRODUCT_DELIVERY";
782
+ readonly COMMENT: "COMMENT";
783
+ readonly JOB_APPLICATION: "JOB_APPLICATION";
784
+ }>>;
785
+ isThumbnail: z.ZodNullable<z.ZodBoolean>;
786
+ order: z.ZodNumber;
787
+ createdAt: z.ZodCoercedDate<unknown>;
788
+ updatedAt: z.ZodCoercedDate<unknown>;
789
+ deletedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
790
+ }, z.core.$strip>>>;
791
+ productLinks: z.ZodDefault<z.ZodArray<z.ZodObject<{
792
+ title: z.ZodNullable<z.ZodString>;
793
+ url: z.ZodString;
794
+ }, z.core.$strip>>>;
795
+ pricingModel: z.ZodEnum<{
796
+ readonly FREE: "Free";
797
+ readonly FIXED: "Fixed";
798
+ readonly PWYW: "Pay What You Want";
799
+ }>;
800
+ currency: z.ZodEnum<{
801
+ readonly USD: "USD (United States Dollar)";
802
+ readonly EUR: "EUR (Euro)";
803
+ readonly GBP: "GBP (British Pound Sterling)";
804
+ readonly NGN: "NGN (Nigerian Naira)";
805
+ readonly CAD: "CAD (Canadian Dollar)";
806
+ readonly AUD: "AUD (Australian Dollar)";
807
+ readonly JPY: "JPY (Japanese Yen)";
808
+ readonly CHF: "CHF (Swiss Franc)";
809
+ readonly INR: "INR (Indian Rupee)";
810
+ readonly ZAR: "ZAR (South African Rand)";
811
+ }>;
812
+ price: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
813
+ suggestedPrice: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
814
+ discounts: z.ZodDefault<z.ZodArray<z.ZodObject<{
815
+ discountType: z.ZodEnum<{
816
+ readonly FIXED_AMOUNT: "Fixed Amount";
817
+ readonly PERCENTAGE: "Percentage";
818
+ }>;
819
+ amount: z.ZodNumber;
820
+ discountCode: z.ZodOptional<z.ZodString>;
821
+ active: z.ZodDefault<z.ZodBoolean>;
822
+ }, z.core.$strip>>>;
823
+ ownsRights: z.ZodBoolean;
824
+ noHarmfulContent: z.ZodBoolean;
825
+ providesSupport: z.ZodBoolean;
826
+ agreesToTerms: z.ZodBoolean;
827
+ supportEmail: z.ZodNullable<z.ZodOptional<z.ZodEmail>>;
828
+ supportPhone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
829
+ createdAt: z.ZodCoercedDate<unknown>;
830
+ updatedAt: z.ZodCoercedDate<unknown>;
831
+ deletedAt: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
832
+ }, z.core.$strip>>;
833
+ }, z.core.$strip>;
834
+ export type UserWithProductsEntity = z.infer<typeof UserWithProductsEntitySchema>;
835
+ export declare const UserAuthStatusEntitySchema: z.ZodObject<{
836
+ exists: z.ZodBoolean;
837
+ isOAuthOnly: z.ZodBoolean;
838
+ providers: z.ZodArray<z.ZodString>;
839
+ }, z.core.$strip>;
840
+ export declare const UserWithJobBookmarksInputSchema: z.ZodObject<{
841
+ cursor: z.ZodOptional<z.ZodString>;
842
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
843
+ }, z.core.$strip>;
844
+ export type UserAuthStatusEntity = z.infer<typeof UserAuthStatusEntitySchema>;
845
+ export type UserWithJobBookmarksInput = z.infer<typeof UserWithJobBookmarksEntitySchema>;
846
+ /**
847
+ * --------------------------------
848
+ * FOLLOW SYSTEM
849
+ * --------------------------------
850
+ */
851
+ declare const FollowMeta: z.ZodObject<{
852
+ isFollowing: z.ZodBoolean;
853
+ followsYou: z.ZodBoolean;
854
+ }, z.core.$strip>;
855
+ export type FollowMeta = z.infer<typeof FollowMeta>;
781
856
  export declare const UserWithFollowingEntitySchema: z.ZodObject<{
782
857
  email: z.ZodEmail;
783
858
  username: z.ZodDefault<z.ZodString>;
@@ -806,6 +881,7 @@ export declare const UserWithFollowingEntitySchema: z.ZodObject<{
806
881
  followsYou: z.ZodBoolean;
807
882
  }, z.core.$strip>>;
808
883
  }, z.core.$strip>;
884
+ export type UserWithFollowingEntity = z.infer<typeof UserWithFollowingEntitySchema>;
809
885
  export declare const UserWithFollowersEntitySchema: z.ZodObject<{
810
886
  email: z.ZodEmail;
811
887
  username: z.ZodDefault<z.ZodString>;
@@ -834,6 +910,17 @@ export declare const UserWithFollowersEntitySchema: z.ZodObject<{
834
910
  followsYou: z.ZodBoolean;
835
911
  }, z.core.$strip>>;
836
912
  }, z.core.$strip>;
913
+ export type UserWithFollowersEntity = z.infer<typeof UserWithFollowersEntitySchema>;
914
+ /**
915
+ * --------------------------------
916
+ * SEARCH USERS
917
+ * --------------------------------
918
+ */
919
+ declare const CursorPaginationInput: z.ZodObject<{
920
+ cursor: z.ZodOptional<z.ZodString>;
921
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
922
+ }, z.core.$strip>;
923
+ export type CursorPaginationInput = z.infer<typeof CursorPaginationInput>;
837
924
  export declare const SearchUsersInputSchema: z.ZodObject<{
838
925
  cursor: z.ZodOptional<z.ZodString>;
839
926
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
@@ -847,6 +934,7 @@ export declare const SearchUsersInputSchema: z.ZodObject<{
847
934
  disciplines: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
848
935
  locations: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodArray<z.ZodString>>>;
849
936
  }, z.core.$strip>;
937
+ export type SearchUsersInput = z.infer<typeof SearchUsersInputSchema>;
850
938
  export declare const SearchUsersOutputSchema: z.ZodObject<{
851
939
  users: z.ZodArray<z.ZodObject<{
852
940
  email: z.ZodEmail;
@@ -867,6 +955,7 @@ export declare const SearchUsersOutputSchema: z.ZodObject<{
867
955
  }, z.core.$strip>>;
868
956
  nextCursor: z.ZodOptional<z.ZodString>;
869
957
  }, z.core.$strip>;
958
+ export type SearchUsersOutput = z.infer<typeof SearchUsersOutputSchema>;
870
959
  /**
871
960
  * --------------------------------
872
961
  * ACTIVITY
@@ -881,6 +970,7 @@ export declare const GetUserActivityInputSchema: z.ZodObject<{
881
970
  VIEW: "VIEW";
882
971
  }>;
883
972
  }, z.core.$strip>;
973
+ export type GetUserActivityInput = z.infer<typeof GetUserActivityInputSchema>;
884
974
  export declare const GetUserActivityOutputSchema: z.ZodArray<z.ZodObject<{
885
975
  parentId: z.ZodCUID2;
886
976
  parentType: z.ZodEnum<{
@@ -896,9 +986,10 @@ export declare const GetUserActivityOutputSchema: z.ZodArray<z.ZodObject<{
896
986
  JOB_APPLICATION: "JOB_APPLICATION";
897
987
  }>;
898
988
  }, z.core.$strip>>;
989
+ export type GetUserActivityOutput = z.infer<typeof GetUserActivityOutputSchema>;
899
990
  /**
900
991
  * --------------------------------
901
- * SEARCH DOCUMENT (ALLOWED NULLS)
992
+ * SEARCH DOCUMENT
902
993
  * --------------------------------
903
994
  */
904
995
  export declare const UserSearchDocumentSchema: z.ZodObject<{
@@ -918,3 +1009,5 @@ export declare const UserSearchDocumentSchema: z.ZodObject<{
918
1009
  updatedAt: z.ZodNullable<z.ZodISODateTime>;
919
1010
  createdAt: z.ZodNullable<z.ZodISODateTime>;
920
1011
  }, z.core.$strip>;
1012
+ export type UserSearchDocument = z.infer<typeof UserSearchDocumentSchema>;
1013
+ export {};
@@ -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.UserWithPostBookmarksEntitySchema = exports.UserWithProjectBookmarksEntitySchema = exports.UserWithJobBookmarksEntitySchema = exports.UserWithPostLikesEntitySchema = exports.UserWithProjectLikesEntitySchema = exports.UserWithProductsEntitySchema = 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.MinimalUserSchema = 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");
@@ -78,9 +78,6 @@ exports.UserWithProjectsEntitySchema = UserWithId.extend({
78
78
  exports.UserWithPostsEntitySchema = UserWithId.extend({
79
79
  posts: zod_openapi_1.z.array(post_1.PostWithFilesEntitySchema),
80
80
  });
81
- exports.UserWithProductsEntitySchema = UserWithId.extend({
82
- products: zod_openapi_1.z.array(product_1.ProductEntitySchema),
83
- });
84
81
  exports.UserWithProjectLikesEntitySchema = UserWithId.extend({
85
82
  projectLikes: zod_openapi_1.z.array(like_1.LikeEntitySchema.extend({
86
83
  project: project_1.ProjectEntitySchema.pick({
@@ -129,6 +126,19 @@ exports.UserWithPostBookmarksEntitySchema = UserWithId.extend({
129
126
  post: post_1.PostWithFilesEntitySchema,
130
127
  })),
131
128
  });
129
+ exports.UserWithProductsEntitySchema = zod_openapi_1.z.object({
130
+ userId: zod_openapi_1.z.cuid2(),
131
+ products: zod_openapi_1.z.array(product_1.ProductEntitySchema),
132
+ });
133
+ exports.UserAuthStatusEntitySchema = zod_openapi_1.z.object({
134
+ exists: zod_openapi_1.z.boolean(),
135
+ isOAuthOnly: zod_openapi_1.z.boolean(),
136
+ providers: zod_openapi_1.z.array(zod_openapi_1.z.string()),
137
+ });
138
+ exports.UserWithJobBookmarksInputSchema = zod_openapi_1.z.object({
139
+ cursor: zod_openapi_1.z.string().optional(),
140
+ limit: zod_openapi_1.z.coerce.number().int().positive().optional(),
141
+ });
132
142
  /**
133
143
  * --------------------------------
134
144
  * FOLLOW SYSTEM
@@ -146,18 +156,13 @@ exports.UserWithFollowersEntitySchema = exports.MinimalUserSchema.extend({
146
156
  });
147
157
  /**
148
158
  * --------------------------------
149
- * PAGINATION INPUT (REUSED)
159
+ * SEARCH USERS
150
160
  * --------------------------------
151
161
  */
152
162
  const CursorPaginationInput = zod_openapi_1.z.object({
153
163
  cursor: zod_openapi_1.z.string().optional(),
154
164
  limit: zod_openapi_1.z.coerce.number().int().min(1).max(100).default(20),
155
165
  });
156
- /**
157
- * --------------------------------
158
- * SEARCH USERS
159
- * --------------------------------
160
- */
161
166
  const coerceArray = (val) => {
162
167
  if (typeof val === "string")
163
168
  return val === "" ? [] : val.split(",");
@@ -195,7 +200,7 @@ exports.GetUserActivityOutputSchema = zod_openapi_1.z.array(zod_openapi_1.z.obje
195
200
  }));
196
201
  /**
197
202
  * --------------------------------
198
- * SEARCH DOCUMENT (ALLOWED NULLS)
203
+ * SEARCH DOCUMENT
199
204
  * --------------------------------
200
205
  */
201
206
  exports.UserSearchDocumentSchema = zod_openapi_1.z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.5.51",
3
+ "version": "2.5.54",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -23,10 +23,10 @@ const CreativeShape = z.object({
23
23
  z.object({
24
24
  companyName: z.string(),
25
25
  position: z.string(),
26
- startDate: z.string().datetime().optional(),
27
- endDate: z.string().datetime().optional(),
26
+ startDate: z.iso.datetime().optional(),
27
+ endDate: z.iso.datetime().optional(),
28
28
  currentlyWorking: z.boolean().default(false),
29
- description: z.string().default(""),
29
+ description: z.string().optional(),
30
30
  }),
31
31
  )
32
32
  .default([]),
@@ -50,7 +50,7 @@ const UserShape = z.object({
50
50
  ),
51
51
  });
52
52
 
53
- type UserShapeType = z.infer<typeof UserShape>;
53
+ export type UserShapeType = z.infer<typeof UserShape>;
54
54
 
55
55
  /**
56
56
  * --------------------------------
@@ -102,6 +102,8 @@ export const UserStatsEntitySchema = z.object({
102
102
  followingIds: z.array(z.cuid2()),
103
103
  });
104
104
 
105
+ export type UserStatsEntity = z.infer<typeof UserStatsEntitySchema>;
106
+
105
107
  /**
106
108
  * --------------------------------
107
109
  * COMPOSED ENTITIES
@@ -109,18 +111,19 @@ export const UserStatsEntitySchema = z.object({
109
111
  */
110
112
 
111
113
  const UserWithId = z.object({ userId: z.cuid2() });
114
+ export type UserWithIdType = z.infer<typeof UserWithId>;
112
115
 
113
116
  export const UserWithProjectsEntitySchema = UserWithId.extend({
114
117
  projects: z.array(ProjectEntitySchema.omit({ overview: true })),
115
118
  });
119
+ export type UserWithProjectsEntity = z.infer<
120
+ typeof UserWithProjectsEntitySchema
121
+ >;
116
122
 
117
123
  export const UserWithPostsEntitySchema = UserWithId.extend({
118
124
  posts: z.array(PostWithFilesEntitySchema),
119
125
  });
120
-
121
- export const UserWithProductsEntitySchema = UserWithId.extend({
122
- products: z.array(ProductEntitySchema),
123
- });
126
+ export type UserWithPostsEntity = z.infer<typeof UserWithPostsEntitySchema>;
124
127
 
125
128
  export const UserWithProjectLikesEntitySchema = UserWithId.extend({
126
129
  projectLikes: z.array(
@@ -137,6 +140,9 @@ export const UserWithProjectLikesEntitySchema = UserWithId.extend({
137
140
  }),
138
141
  ),
139
142
  });
143
+ export type UserWithProjectLikesEntity = z.infer<
144
+ typeof UserWithProjectLikesEntitySchema
145
+ >;
140
146
 
141
147
  export const UserWithPostLikesEntitySchema = UserWithId.extend({
142
148
  postLikes: z.array(
@@ -153,6 +159,9 @@ export const UserWithPostLikesEntitySchema = UserWithId.extend({
153
159
  }),
154
160
  ),
155
161
  });
162
+ export type UserWithPostLikesEntity = z.infer<
163
+ typeof UserWithPostLikesEntitySchema
164
+ >;
156
165
 
157
166
  /**
158
167
  * --------------------------------
@@ -169,6 +178,9 @@ export const UserWithJobBookmarksEntitySchema = UserWithId.extend({
169
178
  }),
170
179
  ),
171
180
  });
181
+ export type UserWithJobBookmarksEntity = z.infer<
182
+ typeof UserWithJobBookmarksEntitySchema
183
+ >;
172
184
 
173
185
  export const UserWithProjectBookmarksEntitySchema = UserWithId.extend({
174
186
  projectBookmarks: z.array(
@@ -177,6 +189,9 @@ export const UserWithProjectBookmarksEntitySchema = UserWithId.extend({
177
189
  }),
178
190
  ),
179
191
  });
192
+ export type UserWithProjectBookmarksEntity = z.infer<
193
+ typeof UserWithProjectBookmarksEntitySchema
194
+ >;
180
195
 
181
196
  export const UserWithPostBookmarksEntitySchema = UserWithId.extend({
182
197
  postBookmarks: z.array(
@@ -185,6 +200,33 @@ export const UserWithPostBookmarksEntitySchema = UserWithId.extend({
185
200
  }),
186
201
  ),
187
202
  });
203
+ export type UserWithPostBookmarksEntity = z.infer<
204
+ typeof UserWithPostBookmarksEntitySchema
205
+ >;
206
+
207
+ export const UserWithProductsEntitySchema = z.object({
208
+ userId: z.cuid2(),
209
+ products: z.array(ProductEntitySchema),
210
+ });
211
+ export type UserWithProductsEntity = z.infer<
212
+ typeof UserWithProductsEntitySchema
213
+ >;
214
+
215
+ export const UserAuthStatusEntitySchema = z.object({
216
+ exists: z.boolean(),
217
+ isOAuthOnly: z.boolean(),
218
+ providers: z.array(z.string()),
219
+ });
220
+
221
+ export const UserWithJobBookmarksInputSchema = z.object({
222
+ cursor: z.string().optional(),
223
+ limit: z.coerce.number().int().positive().optional(),
224
+ });
225
+
226
+ export type UserAuthStatusEntity = z.infer<typeof UserAuthStatusEntitySchema>;
227
+ export type UserWithJobBookmarksInput = z.infer<
228
+ typeof UserWithJobBookmarksEntitySchema
229
+ >;
188
230
 
189
231
  /**
190
232
  * --------------------------------
@@ -196,18 +238,25 @@ const FollowMeta = z.object({
196
238
  isFollowing: z.boolean(),
197
239
  followsYou: z.boolean(),
198
240
  });
241
+ export type FollowMeta = z.infer<typeof FollowMeta>;
199
242
 
200
243
  export const UserWithFollowingEntitySchema = MinimalUserSchema.extend({
201
244
  following: z.array(MinimalUserSchema.extend(FollowMeta.shape)),
202
245
  });
246
+ export type UserWithFollowingEntity = z.infer<
247
+ typeof UserWithFollowingEntitySchema
248
+ >;
203
249
 
204
250
  export const UserWithFollowersEntitySchema = MinimalUserSchema.extend({
205
251
  followers: z.array(MinimalUserSchema.extend(FollowMeta.shape)),
206
252
  });
253
+ export type UserWithFollowersEntity = z.infer<
254
+ typeof UserWithFollowersEntitySchema
255
+ >;
207
256
 
208
257
  /**
209
258
  * --------------------------------
210
- * PAGINATION INPUT (REUSED)
259
+ * SEARCH USERS
211
260
  * --------------------------------
212
261
  */
213
262
 
@@ -215,12 +264,7 @@ const CursorPaginationInput = z.object({
215
264
  cursor: z.string().optional(),
216
265
  limit: z.coerce.number().int().min(1).max(100).default(20),
217
266
  });
218
-
219
- /**
220
- * --------------------------------
221
- * SEARCH USERS
222
- * --------------------------------
223
- */
267
+ export type CursorPaginationInput = z.infer<typeof CursorPaginationInput>;
224
268
 
225
269
  const coerceArray = (val: unknown) => {
226
270
  if (typeof val === "string") return val === "" ? [] : val.split(",");
@@ -239,6 +283,7 @@ export const SearchUsersInputSchema = z.object({
239
283
  locations: z.preprocess(coerceArray, z.array(z.string())).optional(),
240
284
  ...CursorPaginationInput.shape,
241
285
  });
286
+ export type SearchUsersInput = z.infer<typeof SearchUsersInputSchema>;
242
287
 
243
288
  export const SearchUsersOutputSchema = z.object({
244
289
  users: z.array(
@@ -251,6 +296,7 @@ export const SearchUsersOutputSchema = z.object({
251
296
  ),
252
297
  nextCursor: z.string().optional(),
253
298
  });
299
+ export type SearchUsersOutput = z.infer<typeof SearchUsersOutputSchema>;
254
300
 
255
301
  /**
256
302
  * --------------------------------
@@ -263,6 +309,7 @@ export const GetUserActivityInputSchema = z.object({
263
309
  Object.values(ACTIVITY_TYPES) as [ActivityType, ...ActivityType[]],
264
310
  ),
265
311
  });
312
+ export type GetUserActivityInput = z.infer<typeof GetUserActivityInputSchema>;
266
313
 
267
314
  export const GetUserActivityOutputSchema = z.array(
268
315
  z.object({
@@ -275,10 +322,11 @@ export const GetUserActivityOutputSchema = z.array(
275
322
  ),
276
323
  }),
277
324
  );
325
+ export type GetUserActivityOutput = z.infer<typeof GetUserActivityOutputSchema>;
278
326
 
279
327
  /**
280
328
  * --------------------------------
281
- * SEARCH DOCUMENT (ALLOWED NULLS)
329
+ * SEARCH DOCUMENT
282
330
  * --------------------------------
283
331
  */
284
332
 
@@ -294,3 +342,4 @@ export const UserSearchDocumentSchema = z.object({
294
342
  updatedAt: z.iso.datetime().nullable(),
295
343
  createdAt: z.iso.datetime().nullable(),
296
344
  });
345
+ export type UserSearchDocument = z.infer<typeof UserSearchDocumentSchema>;