@zyacreatives/shared 2.3.1 → 2.3.2

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.
@@ -629,6 +629,73 @@ export declare const UserWithPostBookmarksEntitySchema: z.ZodObject<{
629
629
  }, z.core.$strip>;
630
630
  }, z.core.$strip>>;
631
631
  }, z.core.$strip>;
632
+ export declare const UserWithProductsEntitySchema: z.ZodObject<{
633
+ userId: z.ZodCUID2;
634
+ products: z.ZodArray<z.ZodObject<{
635
+ id: z.ZodCUID2;
636
+ sellerId: z.ZodCUID2;
637
+ sellerUsername: z.ZodString;
638
+ sellerName: z.ZodString;
639
+ sellerImageUrl: z.ZodNullable<z.ZodOptional<z.ZodURL>>;
640
+ title: z.ZodString;
641
+ description: z.ZodString;
642
+ keyFeatures: z.ZodString;
643
+ status: z.ZodDefault<z.ZodEnum<{
644
+ readonly ACTIVE: "ACTIVE";
645
+ readonly UNDER_REVIEW: "UNDER_REVIEW";
646
+ readonly DRAFT: "DRAFT";
647
+ readonly ARCHIVED: "ARCHIVED";
648
+ readonly DELETED: "DELETED";
649
+ }>>;
650
+ category: z.ZodString;
651
+ subcategory: z.ZodNullable<z.ZodOptional<z.ZodString>>;
652
+ tags: z.ZodArray<z.ZodString>;
653
+ coverImages: z.ZodDefault<z.ZodArray<z.ZodObject<{
654
+ fileId: z.ZodCUID2;
655
+ isThumbnail: z.ZodDefault<z.ZodBoolean>;
656
+ order: z.ZodDefault<z.ZodNumber>;
657
+ }, z.core.$strip>>>;
658
+ productFiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
659
+ fileId: z.ZodCUID2;
660
+ order: z.ZodDefault<z.ZodNumber>;
661
+ }, z.core.$strip>>>;
662
+ productLinks: z.ZodDefault<z.ZodArray<z.ZodURL>>;
663
+ pricingModel: z.ZodEnum<{
664
+ readonly FREE: "Free";
665
+ readonly FIXED: "Fixed";
666
+ readonly PWYW: "Pay What You Want";
667
+ }>;
668
+ currency: z.ZodEnum<{
669
+ readonly USD: "USD (United States Dollar)";
670
+ readonly EUR: "EUR (Euro)";
671
+ readonly GBP: "GBP (British Pound Sterling)";
672
+ readonly NGN: "NGN (Nigerian Naira)";
673
+ readonly CAD: "CAD (Canadian Dollar)";
674
+ readonly AUD: "AUD (Australian Dollar)";
675
+ readonly JPY: "JPY (Japanese Yen)";
676
+ readonly CHF: "CHF (Swiss Franc)";
677
+ readonly INR: "INR (Indian Rupee)";
678
+ readonly ZAR: "ZAR (South African Rand)";
679
+ }>;
680
+ price: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
681
+ suggestedPrice: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
682
+ discounts: z.ZodDefault<z.ZodArray<z.ZodObject<{
683
+ discountType: z.ZodEnum<{
684
+ readonly FIXED_AMOUNT: "Fixed Amount";
685
+ readonly PERCENTAGE: "Percentage";
686
+ }>;
687
+ amount: z.ZodNumber;
688
+ discountCode: z.ZodOptional<z.ZodString>;
689
+ expiry: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
690
+ }, z.core.$strip>>>;
691
+ supportEmail: z.ZodNullable<z.ZodOptional<z.ZodEmail>>;
692
+ supportPhone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
693
+ createdAt: z.ZodCoercedDate<unknown>;
694
+ updatedAt: z.ZodCoercedDate<unknown>;
695
+ deletedAt: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
696
+ }, z.core.$strip>>;
697
+ }, z.core.$strip>;
698
+ export type UserWithProductsEntity = z.infer<typeof UserWithProductsEntitySchema>;
632
699
  export declare const GetUserWithProjectBookmarksInputSchema: z.ZodObject<{
633
700
  cursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
634
701
  limit: z.ZodNullable<z.ZodOptional<z.ZodInt>>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserSearchDocumentSchema = exports.SearchUsersOutputSchema = exports.SearchUsersInputSchema = exports.GetUserActivityOutputSchema = exports.GetUserActivityInputSchema = exports.GetAuthenticatedUserWithUserFollowersOutputSchema = exports.GetAuthenticatedUserWithUserFollowingOutputSchema = exports.GetAuthenticatedUserWithProjectLikesOutputSchema = exports.GetAuthenticatedUserWithProjectBookmarksOutputSchema = exports.GetAuthenticatedUserWithProjectsOutputSchema = exports.GetAuthenticatedUserProfileOutputSchema = exports.GetAuthenticatedUserOutputSchema = exports.GetUserFollowersOutputSchema = exports.GetUserFollowingOutputSchema = exports.GetUserFollowersInputSchema = exports.GetUserFollowingInputSchema = exports.UserWithFollowersEntitySchema = exports.UserWithFollowingEntitySchema = exports.GetUserWithPostBookmarksOutputSchema = exports.GetUserWithProjectBookmarksOutputSchema = exports.GetUserWithPostBookmarksInputSchema = exports.GetUserWithProjectBookmarksInputSchema = exports.UserWithPostBookmarksEntitySchema = exports.UserWithProjectBookmarksEntitySchema = exports.UserWithJobBookmarksOutputSchema = exports.UserWithJobBookmarksInputSchema = exports.UserWithJobBookmarksEntitySchema = exports.UserWithPostLikesEntitySchema = exports.UserWithProjectLikesEntitySchema = exports.UserWithPostsEntitySchema = exports.UserWithProjectsEntitySchema = exports.UserStatsEntitySchema = exports.UserProfileEntitySchema = exports.MinimalUserSchema = exports.UserEntitySchema = void 0;
3
+ exports.UserSearchDocumentSchema = exports.SearchUsersOutputSchema = exports.SearchUsersInputSchema = exports.GetUserActivityOutputSchema = exports.GetUserActivityInputSchema = exports.GetAuthenticatedUserWithUserFollowersOutputSchema = exports.GetAuthenticatedUserWithUserFollowingOutputSchema = exports.GetAuthenticatedUserWithProjectLikesOutputSchema = exports.GetAuthenticatedUserWithProjectBookmarksOutputSchema = exports.GetAuthenticatedUserWithProjectsOutputSchema = exports.GetAuthenticatedUserProfileOutputSchema = exports.GetAuthenticatedUserOutputSchema = exports.GetUserFollowersOutputSchema = exports.GetUserFollowingOutputSchema = exports.GetUserFollowersInputSchema = exports.GetUserFollowingInputSchema = exports.UserWithFollowersEntitySchema = exports.UserWithFollowingEntitySchema = exports.GetUserWithPostBookmarksOutputSchema = exports.GetUserWithProjectBookmarksOutputSchema = exports.GetUserWithPostBookmarksInputSchema = exports.GetUserWithProjectBookmarksInputSchema = exports.UserWithProductsEntitySchema = exports.UserWithPostBookmarksEntitySchema = exports.UserWithProjectBookmarksEntitySchema = exports.UserWithJobBookmarksOutputSchema = exports.UserWithJobBookmarksInputSchema = 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");
@@ -11,6 +11,7 @@ const creative_1 = require("./creative");
11
11
  const investor_1 = require("./investor");
12
12
  const post_1 = require("./post");
13
13
  const job_1 = require("./job");
14
+ const product_1 = require("./product");
14
15
  // ==========================================
15
16
  // 1. CORE USER ENTITIES
16
17
  // ==========================================
@@ -157,6 +158,10 @@ exports.UserWithPostBookmarksEntitySchema = zod_openapi_1.z.object({
157
158
  post: post_1.PostWithFilesEntitySchema,
158
159
  })),
159
160
  });
161
+ exports.UserWithProductsEntitySchema = zod_openapi_1.z.object({
162
+ userId: zod_openapi_1.z.cuid2(),
163
+ products: zod_openapi_1.z.array(product_1.ProductEntitySchema),
164
+ });
160
165
  exports.GetUserWithProjectBookmarksInputSchema = exports.UserWithJobBookmarksInputSchema;
161
166
  exports.GetUserWithPostBookmarksInputSchema = exports.UserWithJobBookmarksInputSchema;
162
167
  exports.GetUserWithProjectBookmarksOutputSchema = zod_openapi_1.z.object({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -26,6 +26,7 @@ import {
26
26
  PostWithFilesEntitySchema,
27
27
  } from "./post";
28
28
  import { JobEntitySchema, JobSearchDocumentSchema } from "./job";
29
+ import { ProductEntitySchema } from "./product";
29
30
 
30
31
  // ==========================================
31
32
  // 1. CORE USER ENTITIES
@@ -205,6 +206,15 @@ export const UserWithPostBookmarksEntitySchema = z.object({
205
206
  ),
206
207
  });
207
208
 
209
+ export const UserWithProductsEntitySchema = z.object({
210
+ userId: z.cuid2(),
211
+ products: z.array(ProductEntitySchema),
212
+ });
213
+
214
+ export type UserWithProductsEntity = z.infer<
215
+ typeof UserWithProductsEntitySchema
216
+ >;
217
+
208
218
  export const GetUserWithProjectBookmarksInputSchema =
209
219
  UserWithJobBookmarksInputSchema;
210
220
  export const GetUserWithPostBookmarksInputSchema =