@zyacreatives/shared 2.1.72 → 2.1.74

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.
@@ -795,3 +795,19 @@ export declare const SearchUsersInputSchema: z.ZodObject<{
795
795
  limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
796
796
  cursor: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
797
797
  }, z.core.$strip>;
798
+ export declare const SearchUsersOutputSchema: z.ZodObject<{
799
+ users: z.ZodArray<z.ZodObject<{
800
+ email: z.ZodEmail;
801
+ username: z.ZodOptional<z.ZodString>;
802
+ id: z.ZodCUID2;
803
+ name: z.ZodOptional<z.ZodString>;
804
+ image: z.ZodOptional<z.ZodString>;
805
+ role: z.ZodEnum<{
806
+ CREATIVE: "CREATIVE";
807
+ BRAND: "BRAND";
808
+ INVESTOR: "INVESTOR";
809
+ ADMIN: "ADMIN";
810
+ }>;
811
+ }, z.core.$strip>>;
812
+ nextCursor: z.ZodOptional<z.ZodString>;
813
+ }, z.core.$strip>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SearchUsersInputSchema = exports.GetUserActivityOutputSchema = exports.GetUserActivityInputSchema = exports.GetAuthenticatedUserWithProjectLikesOutputSchema = exports.GetAuthenticatedUserWithUserFollowersOutputSchema = exports.GetAuthenticatedUserWithUserFollowingOutputSchema = exports.GetAuthenticatedUserWithProjectBookmarksOutputSchema = exports.GetAuthenticatedUserWithProjectsOutputSchema = exports.GetAuthenticatedUserProfileOutputSchema = exports.GetAuthenticatedUserOutputSchema = exports.UserWithPostsEntitySchema = exports.GetUserFollowingOutputSchema = exports.GetUserFollowersOutputSchema = exports.UserWithFollowersEntitySchema = exports.UserWithFollowingEntitySchema = exports.GetUserFollowersInputSchema = exports.GetUserFollowingInputSchema = exports.UserWithProjectBookmarksEntitySchema = exports.UserWithProjectLikesEntitySchema = exports.UserWithProjectsEntitySchema = exports.UserProfileEntitySchema = exports.UserStatsEntitySchema = exports.MinimalUserSchema = exports.UserEntitySchema = void 0;
3
+ exports.SearchUsersOutputSchema = exports.SearchUsersInputSchema = exports.GetUserActivityOutputSchema = exports.GetUserActivityInputSchema = exports.GetAuthenticatedUserWithProjectLikesOutputSchema = exports.GetAuthenticatedUserWithUserFollowersOutputSchema = exports.GetAuthenticatedUserWithUserFollowingOutputSchema = exports.GetAuthenticatedUserWithProjectBookmarksOutputSchema = exports.GetAuthenticatedUserWithProjectsOutputSchema = exports.GetAuthenticatedUserProfileOutputSchema = exports.GetAuthenticatedUserOutputSchema = exports.UserWithPostsEntitySchema = exports.GetUserFollowingOutputSchema = exports.GetUserFollowersOutputSchema = exports.UserWithFollowersEntitySchema = exports.UserWithFollowingEntitySchema = exports.GetUserFollowersInputSchema = exports.GetUserFollowingInputSchema = exports.UserWithProjectBookmarksEntitySchema = exports.UserWithProjectLikesEntitySchema = exports.UserWithProjectsEntitySchema = exports.UserProfileEntitySchema = exports.UserStatsEntitySchema = 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");
@@ -173,3 +173,10 @@ exports.SearchUsersInputSchema = zod_openapi_1.z.object({
173
173
  description: "The offset/cursor for pagination",
174
174
  }),
175
175
  });
176
+ exports.SearchUsersOutputSchema = zod_openapi_1.z.object({
177
+ users: zod_openapi_1.z.array(exports.MinimalUserSchema),
178
+ nextCursor: zod_openapi_1.z.string().optional().openapi({
179
+ example: "abc123",
180
+ description: "The next cursor for pagination",
181
+ }),
182
+ });
@@ -1,4 +1,4 @@
1
- import { MinimalUserSchema, UserEntitySchema, UserProfileEntitySchema, UserWithProjectsEntitySchema, UserWithProjectBookmarksEntitySchema, GetUserFollowingInputSchema, GetUserFollowersInputSchema, UserWithFollowingEntitySchema, UserWithFollowersEntitySchema, GetUserFollowingOutputSchema, GetUserFollowersOutputSchema, GetAuthenticatedUserOutputSchema, GetAuthenticatedUserProfileOutputSchema, GetAuthenticatedUserWithProjectsOutputSchema, GetAuthenticatedUserWithProjectBookmarksOutputSchema, GetAuthenticatedUserWithUserFollowingOutputSchema, GetAuthenticatedUserWithUserFollowersOutputSchema, SearchUsersInputSchema, UserWithProjectLikesEntitySchema, GetAuthenticatedUserWithProjectLikesOutputSchema, GetUserActivityInputSchema, GetUserActivityOutputSchema, UserStatsEntitySchema, UserWithPostsEntitySchema } from "../schemas/user";
1
+ import { MinimalUserSchema, UserEntitySchema, UserProfileEntitySchema, UserWithProjectsEntitySchema, UserWithProjectBookmarksEntitySchema, GetUserFollowingInputSchema, GetUserFollowersInputSchema, UserWithFollowingEntitySchema, UserWithFollowersEntitySchema, GetUserFollowingOutputSchema, GetUserFollowersOutputSchema, GetAuthenticatedUserOutputSchema, GetAuthenticatedUserProfileOutputSchema, GetAuthenticatedUserWithProjectsOutputSchema, GetAuthenticatedUserWithProjectBookmarksOutputSchema, GetAuthenticatedUserWithUserFollowingOutputSchema, GetAuthenticatedUserWithUserFollowersOutputSchema, SearchUsersInputSchema, UserWithProjectLikesEntitySchema, GetAuthenticatedUserWithProjectLikesOutputSchema, GetUserActivityInputSchema, GetUserActivityOutputSchema, UserStatsEntitySchema, UserWithPostsEntitySchema, SearchUsersOutputSchema } from "../schemas/user";
2
2
  import { z } from "@hono/zod-openapi";
3
3
  export type BaseUserEntity = z.infer<typeof UserEntitySchema>;
4
4
  export type MinimalUser = z.infer<typeof MinimalUserSchema>;
@@ -25,3 +25,4 @@ export type GetUserActivityInput = z.infer<typeof GetUserActivityInputSchema>;
25
25
  export type GetUserActivityOutput = z.infer<typeof GetUserActivityOutputSchema>;
26
26
  export type UserStatsEntity = z.infer<typeof UserStatsEntitySchema>;
27
27
  export type SearchUsersInput = z.infer<typeof SearchUsersInputSchema>;
28
+ export type SearchUsersOutput = z.infer<typeof SearchUsersOutputSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.1.72",
3
+ "version": "2.1.74",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -238,3 +238,11 @@ export const SearchUsersInputSchema = z.object({
238
238
  description: "The offset/cursor for pagination",
239
239
  }),
240
240
  });
241
+
242
+ export const SearchUsersOutputSchema = z.object({
243
+ users: z.array(MinimalUserSchema),
244
+ nextCursor: z.string().optional().openapi({
245
+ example: "abc123",
246
+ description: "The next cursor for pagination",
247
+ }),
248
+ });
package/src/types/user.ts CHANGED
@@ -23,6 +23,7 @@ import {
23
23
  GetUserActivityOutputSchema,
24
24
  UserStatsEntitySchema,
25
25
  UserWithPostsEntitySchema,
26
+ SearchUsersOutputSchema,
26
27
  } from "../schemas/user";
27
28
 
28
29
  import { z } from "@hono/zod-openapi";
@@ -80,4 +81,6 @@ export type GetAuthenticatedUserWithUserFollowersOutput = z.infer<
80
81
  export type GetUserActivityInput = z.infer<typeof GetUserActivityInputSchema>;
81
82
  export type GetUserActivityOutput = z.infer<typeof GetUserActivityOutputSchema>;
82
83
  export type UserStatsEntity = z.infer<typeof UserStatsEntitySchema>;
84
+
83
85
  export type SearchUsersInput = z.infer<typeof SearchUsersInputSchema>;
86
+ export type SearchUsersOutput = z.infer<typeof SearchUsersOutputSchema>;