@zyacreatives/shared 2.1.71 → 2.1.72
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.
- package/dist/schemas/user.d.ts +11 -0
- package/dist/schemas/user.js +18 -1
- package/dist/types/user.d.ts +2 -1
- package/package.json +1 -1
- package/src/schemas/user.ts +18 -0
- package/src/types/user.ts +2 -0
package/dist/schemas/user.d.ts
CHANGED
|
@@ -784,3 +784,14 @@ export declare const GetUserActivityOutputSchema: z.ZodArray<z.ZodObject<{
|
|
|
784
784
|
JOB_APPLICATION: "JOB_APPLICATION";
|
|
785
785
|
}>;
|
|
786
786
|
}, z.core.$strip>>;
|
|
787
|
+
export declare const SearchUsersInputSchema: z.ZodObject<{
|
|
788
|
+
query: z.ZodDefault<z.ZodString>;
|
|
789
|
+
role: z.ZodOptional<z.ZodEnum<{
|
|
790
|
+
CREATIVE: "CREATIVE";
|
|
791
|
+
BRAND: "BRAND";
|
|
792
|
+
INVESTOR: "INVESTOR";
|
|
793
|
+
ADMIN: "ADMIN";
|
|
794
|
+
}>>;
|
|
795
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
796
|
+
cursor: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
797
|
+
}, z.core.$strip>;
|
package/dist/schemas/user.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
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.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");
|
|
@@ -156,3 +156,20 @@ exports.GetUserActivityOutputSchema = zod_openapi_1.z.array(zod_openapi_1.z.obje
|
|
|
156
156
|
parentId: zod_openapi_1.z.string(),
|
|
157
157
|
parentType: zod_openapi_1.z.enum(Object.values(constants_1.ACTIVITY_PARENT_TYPES)),
|
|
158
158
|
}));
|
|
159
|
+
exports.SearchUsersInputSchema = zod_openapi_1.z.object({
|
|
160
|
+
query: zod_openapi_1.z.string().default("").openapi({
|
|
161
|
+
example: "john",
|
|
162
|
+
description: "Search by name, email, username, or discipline",
|
|
163
|
+
}),
|
|
164
|
+
role: zod_openapi_1.z.enum(Object.values(constants_1.ROLES)).optional(),
|
|
165
|
+
limit: zod_openapi_1.z.coerce
|
|
166
|
+
.number()
|
|
167
|
+
.min(1)
|
|
168
|
+
.max(100)
|
|
169
|
+
.default(20)
|
|
170
|
+
.openapi({ example: 20 }),
|
|
171
|
+
cursor: zod_openapi_1.z.coerce.number().min(0).default(0).openapi({
|
|
172
|
+
example: 0,
|
|
173
|
+
description: "The offset/cursor for pagination",
|
|
174
|
+
}),
|
|
175
|
+
});
|
package/dist/types/user.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MinimalUserSchema, UserEntitySchema, UserProfileEntitySchema, UserWithProjectsEntitySchema, UserWithProjectBookmarksEntitySchema, GetUserFollowingInputSchema, GetUserFollowersInputSchema, UserWithFollowingEntitySchema, UserWithFollowersEntitySchema, GetUserFollowingOutputSchema, GetUserFollowersOutputSchema, GetAuthenticatedUserOutputSchema, GetAuthenticatedUserProfileOutputSchema, GetAuthenticatedUserWithProjectsOutputSchema, GetAuthenticatedUserWithProjectBookmarksOutputSchema, GetAuthenticatedUserWithUserFollowingOutputSchema, GetAuthenticatedUserWithUserFollowersOutputSchema, 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 } 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>;
|
|
@@ -24,3 +24,4 @@ export type GetAuthenticatedUserWithUserFollowersOutput = z.infer<typeof GetAuth
|
|
|
24
24
|
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
|
+
export type SearchUsersInput = z.infer<typeof SearchUsersInputSchema>;
|
package/package.json
CHANGED
package/src/schemas/user.ts
CHANGED
|
@@ -220,3 +220,21 @@ export const GetUserActivityOutputSchema = z.array(
|
|
|
220
220
|
),
|
|
221
221
|
}),
|
|
222
222
|
);
|
|
223
|
+
|
|
224
|
+
export const SearchUsersInputSchema = z.object({
|
|
225
|
+
query: z.string().default("").openapi({
|
|
226
|
+
example: "john",
|
|
227
|
+
description: "Search by name, email, username, or discipline",
|
|
228
|
+
}),
|
|
229
|
+
role: z.enum(Object.values(ROLES) as [Role, ...Role[]]).optional(),
|
|
230
|
+
limit: z.coerce
|
|
231
|
+
.number()
|
|
232
|
+
.min(1)
|
|
233
|
+
.max(100)
|
|
234
|
+
.default(20)
|
|
235
|
+
.openapi({ example: 20 }),
|
|
236
|
+
cursor: z.coerce.number().min(0).default(0).openapi({
|
|
237
|
+
example: 0,
|
|
238
|
+
description: "The offset/cursor for pagination",
|
|
239
|
+
}),
|
|
240
|
+
});
|
package/src/types/user.ts
CHANGED
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
GetAuthenticatedUserWithProjectBookmarksOutputSchema,
|
|
17
17
|
GetAuthenticatedUserWithUserFollowingOutputSchema,
|
|
18
18
|
GetAuthenticatedUserWithUserFollowersOutputSchema,
|
|
19
|
+
SearchUsersInputSchema,
|
|
19
20
|
UserWithProjectLikesEntitySchema,
|
|
20
21
|
GetAuthenticatedUserWithProjectLikesOutputSchema,
|
|
21
22
|
GetUserActivityInputSchema,
|
|
@@ -79,3 +80,4 @@ export type GetAuthenticatedUserWithUserFollowersOutput = z.infer<
|
|
|
79
80
|
export type GetUserActivityInput = z.infer<typeof GetUserActivityInputSchema>;
|
|
80
81
|
export type GetUserActivityOutput = z.infer<typeof GetUserActivityOutputSchema>;
|
|
81
82
|
export type UserStatsEntity = z.infer<typeof UserStatsEntitySchema>;
|
|
83
|
+
export type SearchUsersInput = z.infer<typeof SearchUsersInputSchema>;
|