@zyacreatives/shared 2.3.2 → 2.3.4

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.
@@ -243,10 +243,12 @@ export declare const ProductEntitySchema: z.ZodObject<{
243
243
  fileId: z.ZodCUID2;
244
244
  isThumbnail: z.ZodDefault<z.ZodBoolean>;
245
245
  order: z.ZodDefault<z.ZodNumber>;
246
+ url: z.ZodURL;
246
247
  }, z.core.$strip>>>;
247
248
  productFiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
248
249
  fileId: z.ZodCUID2;
249
250
  order: z.ZodDefault<z.ZodNumber>;
251
+ url: z.ZodURL;
250
252
  }, z.core.$strip>>>;
251
253
  productLinks: z.ZodDefault<z.ZodArray<z.ZodURL>>;
252
254
  pricingModel: z.ZodEnum<{
@@ -184,8 +184,10 @@ exports.ProductEntitySchema = zod_openapi_1.z
184
184
  category: zod_openapi_1.z.string(),
185
185
  subcategory: zod_openapi_1.z.string().optional().nullable(),
186
186
  tags: zod_openapi_1.z.array(zod_openapi_1.z.string()),
187
- coverImages: zod_openapi_1.z.array(exports.ProductCoverImageEntitySchema).default([]),
188
- productFiles: zod_openapi_1.z.array(exports.ProductDeliveryFileEntitySchema).default([]),
187
+ coverImages: zod_openapi_1.z
188
+ .array(exports.ProductCoverImageEntitySchema.extend({ url: zod_openapi_1.z.url() }))
189
+ .default([]),
190
+ productFiles: zod_openapi_1.z.array(exports.ProductDeliveryFileEntitySchema.extend({ url: zod_openapi_1.z.url() })).default([]),
189
191
  productLinks: zod_openapi_1.z.array(zod_openapi_1.z.url()).default([]),
190
192
  pricingModel: zod_openapi_1.z.enum(constants_1.PRICING_MODELS),
191
193
  currency: zod_openapi_1.z.enum(constants_1.WAGES_CURRENCY),
@@ -654,10 +654,12 @@ export declare const UserWithProductsEntitySchema: z.ZodObject<{
654
654
  fileId: z.ZodCUID2;
655
655
  isThumbnail: z.ZodDefault<z.ZodBoolean>;
656
656
  order: z.ZodDefault<z.ZodNumber>;
657
+ url: z.ZodURL;
657
658
  }, z.core.$strip>>>;
658
659
  productFiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
659
660
  fileId: z.ZodCUID2;
660
661
  order: z.ZodDefault<z.ZodNumber>;
662
+ url: z.ZodURL;
661
663
  }, z.core.$strip>>>;
662
664
  productLinks: z.ZodDefault<z.ZodArray<z.ZodURL>>;
663
665
  pricingModel: z.ZodEnum<{
@@ -777,6 +779,78 @@ export declare const GetUserWithProjectBookmarksOutputSchema: z.ZodObject<{
777
779
  }, z.core.$strip>;
778
780
  nextCursor: z.ZodNullable<z.ZodString>;
779
781
  }, z.core.$strip>;
782
+ export declare const GetUserWithProductsOutputSchema: z.ZodObject<{
783
+ products: z.ZodObject<{
784
+ userId: z.ZodCUID2;
785
+ products: z.ZodArray<z.ZodObject<{
786
+ id: z.ZodCUID2;
787
+ sellerId: z.ZodCUID2;
788
+ sellerUsername: z.ZodString;
789
+ sellerName: z.ZodString;
790
+ sellerImageUrl: z.ZodNullable<z.ZodOptional<z.ZodURL>>;
791
+ title: z.ZodString;
792
+ description: z.ZodString;
793
+ keyFeatures: z.ZodString;
794
+ status: z.ZodDefault<z.ZodEnum<{
795
+ readonly ACTIVE: "ACTIVE";
796
+ readonly UNDER_REVIEW: "UNDER_REVIEW";
797
+ readonly DRAFT: "DRAFT";
798
+ readonly ARCHIVED: "ARCHIVED";
799
+ readonly DELETED: "DELETED";
800
+ }>>;
801
+ category: z.ZodString;
802
+ subcategory: z.ZodNullable<z.ZodOptional<z.ZodString>>;
803
+ tags: z.ZodArray<z.ZodString>;
804
+ coverImages: z.ZodDefault<z.ZodArray<z.ZodObject<{
805
+ fileId: z.ZodCUID2;
806
+ isThumbnail: z.ZodDefault<z.ZodBoolean>;
807
+ order: z.ZodDefault<z.ZodNumber>;
808
+ url: z.ZodURL;
809
+ }, z.core.$strip>>>;
810
+ productFiles: z.ZodDefault<z.ZodArray<z.ZodObject<{
811
+ fileId: z.ZodCUID2;
812
+ order: z.ZodDefault<z.ZodNumber>;
813
+ url: z.ZodURL;
814
+ }, z.core.$strip>>>;
815
+ productLinks: z.ZodDefault<z.ZodArray<z.ZodURL>>;
816
+ pricingModel: z.ZodEnum<{
817
+ readonly FREE: "Free";
818
+ readonly FIXED: "Fixed";
819
+ readonly PWYW: "Pay What You Want";
820
+ }>;
821
+ currency: z.ZodEnum<{
822
+ readonly USD: "USD (United States Dollar)";
823
+ readonly EUR: "EUR (Euro)";
824
+ readonly GBP: "GBP (British Pound Sterling)";
825
+ readonly NGN: "NGN (Nigerian Naira)";
826
+ readonly CAD: "CAD (Canadian Dollar)";
827
+ readonly AUD: "AUD (Australian Dollar)";
828
+ readonly JPY: "JPY (Japanese Yen)";
829
+ readonly CHF: "CHF (Swiss Franc)";
830
+ readonly INR: "INR (Indian Rupee)";
831
+ readonly ZAR: "ZAR (South African Rand)";
832
+ }>;
833
+ price: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
834
+ suggestedPrice: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
835
+ discounts: z.ZodDefault<z.ZodArray<z.ZodObject<{
836
+ discountType: z.ZodEnum<{
837
+ readonly FIXED_AMOUNT: "Fixed Amount";
838
+ readonly PERCENTAGE: "Percentage";
839
+ }>;
840
+ amount: z.ZodNumber;
841
+ discountCode: z.ZodOptional<z.ZodString>;
842
+ expiry: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
843
+ }, z.core.$strip>>>;
844
+ supportEmail: z.ZodNullable<z.ZodOptional<z.ZodEmail>>;
845
+ supportPhone: z.ZodNullable<z.ZodOptional<z.ZodString>>;
846
+ createdAt: z.ZodCoercedDate<unknown>;
847
+ updatedAt: z.ZodCoercedDate<unknown>;
848
+ deletedAt: z.ZodNullable<z.ZodOptional<z.ZodCoercedDate<unknown>>>;
849
+ }, z.core.$strip>>;
850
+ }, z.core.$strip>;
851
+ nextCursor: z.ZodNullable<z.ZodString>;
852
+ }, z.core.$strip>;
853
+ export type UserWithProductsOutput = z.infer<typeof GetUserWithProductsOutputSchema>;
780
854
  export declare const GetUserWithPostBookmarksOutputSchema: z.ZodObject<{
781
855
  bookmarks: z.ZodArray<z.ZodObject<{
782
856
  id: z.ZodCUID2;
@@ -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.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;
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.GetUserWithProductsOutputSchema = 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");
@@ -168,6 +168,10 @@ exports.GetUserWithProjectBookmarksOutputSchema = zod_openapi_1.z.object({
168
168
  bookmarks: exports.UserWithProjectBookmarksEntitySchema,
169
169
  nextCursor: zod_openapi_1.z.string().nullable(),
170
170
  });
171
+ exports.GetUserWithProductsOutputSchema = zod_openapi_1.z.object({
172
+ products: exports.UserWithProductsEntitySchema,
173
+ nextCursor: zod_openapi_1.z.string().nullable(),
174
+ });
171
175
  exports.GetUserWithPostBookmarksOutputSchema = zod_openapi_1.z.object({
172
176
  bookmarks: zod_openapi_1.z.array(bookmark_1.BookmarkEntitySchema.extend({
173
177
  post: post_1.FeedPostEntitySchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.3.2",
3
+ "version": "2.3.4",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -239,8 +239,10 @@ export const ProductEntitySchema = z
239
239
  subcategory: z.string().optional().nullable(),
240
240
  tags: z.array(z.string()),
241
241
 
242
- coverImages: z.array(ProductCoverImageEntitySchema).default([]),
243
- productFiles: z.array(ProductDeliveryFileEntitySchema).default([]),
242
+ coverImages: z
243
+ .array(ProductCoverImageEntitySchema.extend({ url: z.url() }))
244
+ .default([]),
245
+ productFiles: z.array(ProductDeliveryFileEntitySchema.extend({url: z.url()})).default([]),
244
246
  productLinks: z.array(z.url()).default([]),
245
247
 
246
248
  pricingModel: z.enum(PRICING_MODELS),
@@ -225,6 +225,15 @@ export const GetUserWithProjectBookmarksOutputSchema = z.object({
225
225
  nextCursor: z.string().nullable(),
226
226
  });
227
227
 
228
+ export const GetUserWithProductsOutputSchema = z.object({
229
+ products: UserWithProductsEntitySchema,
230
+ nextCursor: z.string().nullable(),
231
+ });
232
+
233
+ export type UserWithProductsOutput = z.infer<
234
+ typeof GetUserWithProductsOutputSchema
235
+ >;
236
+
228
237
  export const GetUserWithPostBookmarksOutputSchema = z.object({
229
238
  bookmarks: z.array(
230
239
  BookmarkEntitySchema.extend({