@zyacreatives/shared 2.2.75 → 2.2.76

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.
@@ -408,6 +408,54 @@ export declare const UserWithJobBookmarksEntitySchema: z.ZodObject<{
408
408
  }, z.core.$strip>;
409
409
  }, z.core.$strip>>;
410
410
  }, z.core.$strip>;
411
+ export declare const UserWithJobBookmarksInputSchema: z.ZodObject<{
412
+ cursor: z.ZodNullable<z.ZodString>;
413
+ limit: z.ZodNullable<z.ZodInt>;
414
+ }, z.core.$strip>;
415
+ export declare const UserWithJobBookmarksOutputSchema: z.ZodObject<{
416
+ bookmarks: z.ZodObject<{
417
+ userId: z.ZodCUID2;
418
+ jobBookmarks: z.ZodArray<z.ZodObject<{
419
+ id: z.ZodCUID2;
420
+ createdAt: z.ZodOptional<z.ZodCoercedDate<unknown>>;
421
+ userId: z.ZodCUID2;
422
+ parentId: z.ZodCUID2;
423
+ parentType: z.ZodEnum<{
424
+ readonly PROJECT: "PROJECT";
425
+ readonly USER: "USER";
426
+ readonly JOB: "JOB";
427
+ readonly POST: "POST";
428
+ readonly COMMENT: "COMMENT";
429
+ readonly JOB_APPLICATION: "JOB_APPLICATION";
430
+ }>;
431
+ job: z.ZodObject<{
432
+ id: z.ZodCUID2;
433
+ title: z.ZodString;
434
+ brandId: z.ZodCUID2;
435
+ brandName: z.ZodString;
436
+ brandImgUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
437
+ jobType: z.ZodEnum<{
438
+ GIG: "GIG";
439
+ ROLE: "ROLE";
440
+ }>;
441
+ status: z.ZodOptional<z.ZodString>;
442
+ employmentType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
443
+ workMode: z.ZodString;
444
+ gigType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
445
+ location: z.ZodString;
446
+ overview: z.ZodString;
447
+ requiredSkills: z.ZodArray<z.ZodString>;
448
+ wagesMin: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
449
+ wagesMax: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
450
+ wagesCurrency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
451
+ wagesType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
452
+ createdAt: z.ZodString;
453
+ updatedAt: z.ZodString;
454
+ }, z.core.$strip>;
455
+ }, z.core.$strip>>;
456
+ }, z.core.$strip>;
457
+ nextCursor: z.ZodNullable<z.ZodString>;
458
+ }, z.core.$strip>;
411
459
  export declare const UserWithProjectBookmarksEntitySchema: z.ZodObject<{
412
460
  userId: z.ZodCUID2;
413
461
  projectBookmarks: z.ZodArray<z.ZodObject<{
@@ -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.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.UserWithJobBookmarksEntitySchema = exports.UserWithPostBookmarksEntitySchema = exports.UserWithPostLikesEntitySchema = exports.UserWithProjectLikesEntitySchema = exports.UserWithProjectsEntitySchema = exports.UserProfileEntitySchema = exports.UserStatsEntitySchema = exports.MinimalUserSchema = exports.UserEntitySchema = void 0;
3
+ exports.UserSearchDocumentSchema = 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.UserWithJobBookmarksOutputSchema = exports.UserWithJobBookmarksInputSchema = exports.UserWithJobBookmarksEntitySchema = exports.UserWithPostBookmarksEntitySchema = exports.UserWithPostLikesEntitySchema = 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");
@@ -127,6 +127,14 @@ exports.UserWithJobBookmarksEntitySchema = zod_openapi_1.z.object({
127
127
  job: job_1.JobSearchDocumentSchema,
128
128
  })),
129
129
  });
130
+ exports.UserWithJobBookmarksInputSchema = zod_openapi_1.z.object({
131
+ cursor: zod_openapi_1.z.string().nullable(),
132
+ limit: zod_openapi_1.z.int().positive().nullable(),
133
+ });
134
+ exports.UserWithJobBookmarksOutputSchema = zod_openapi_1.z.object({
135
+ bookmarks: exports.UserWithJobBookmarksEntitySchema,
136
+ nextCursor: zod_openapi_1.z.string().nullable(),
137
+ });
130
138
  exports.UserWithProjectBookmarksEntitySchema = zod_openapi_1.z
131
139
  .object({
132
140
  userId: zod_openapi_1.z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
@@ -269,10 +277,7 @@ exports.UserSearchDocumentSchema = zod_openapi_1.z
269
277
  role: zod_openapi_1.z
270
278
  .enum(Object.values(constants_1.ROLES))
271
279
  .openapi({ example: "CREATIVE" }),
272
- bio: zod_openapi_1.z
273
- .string()
274
- .nullable()
275
- .openapi({
280
+ bio: zod_openapi_1.z.string().nullable().openapi({
276
281
  example: "Passionate designer and developer based in Lagos.",
277
282
  }),
278
283
  location: zod_openapi_1.z.string().nullable().openapi({ example: "Lagos, Nigeria" }),
@@ -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, SearchUsersOutputSchema, UserWithPostBookmarksEntitySchema, UserWithPostLikesEntitySchema, UserSearchDocumentSchema, UserWithJobBookmarksEntitySchema } 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, UserWithPostBookmarksEntitySchema, UserWithPostLikesEntitySchema, UserSearchDocumentSchema, UserWithJobBookmarksEntitySchema, UserWithJobBookmarksInputSchema, UserWithJobBookmarksOutputSchema } 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>;
@@ -30,3 +30,5 @@ export type SearchUsersInput = z.infer<typeof SearchUsersInputSchema>;
30
30
  export type SearchUsersOutput = z.infer<typeof SearchUsersOutputSchema>;
31
31
  export type UserSearchDocument = z.infer<typeof UserSearchDocumentSchema>;
32
32
  export type UserWithJobBookmarksEntity = z.infer<typeof UserWithJobBookmarksEntitySchema>;
33
+ export type UserWithJobBookmarksInput = z.infer<typeof UserWithJobBookmarksInputSchema>;
34
+ export type UserWithJobBookmarksOutput = z.infer<typeof UserWithJobBookmarksOutputSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "2.2.75",
3
+ "version": "2.2.76",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -161,6 +161,16 @@ export const UserWithJobBookmarksEntitySchema = z.object({
161
161
  ),
162
162
  });
163
163
 
164
+ export const UserWithJobBookmarksInputSchema = z.object({
165
+ cursor: z.string().nullable(),
166
+ limit: z.int().positive().nullable(),
167
+ });
168
+
169
+ export const UserWithJobBookmarksOutputSchema = z.object({
170
+ bookmarks: UserWithJobBookmarksEntitySchema,
171
+ nextCursor: z.string().nullable(),
172
+ });
173
+
164
174
  export const UserWithProjectBookmarksEntitySchema = z
165
175
  .object({
166
176
  userId: z.cuid2().openapi({ example: "cksd0v6q0000s9a5y8z7p3x9" }),
@@ -340,12 +350,9 @@ export const UserSearchDocumentSchema = z
340
350
  role: z
341
351
  .enum(Object.values(ROLES) as [Role, ...Role[]])
342
352
  .openapi({ example: "CREATIVE" }),
343
- bio: z
344
- .string()
345
- .nullable()
346
- .openapi({
347
- example: "Passionate designer and developer based in Lagos.",
348
- }),
353
+ bio: z.string().nullable().openapi({
354
+ example: "Passionate designer and developer based in Lagos.",
355
+ }),
349
356
  location: z.string().nullable().openapi({ example: "Lagos, Nigeria" }),
350
357
  disciplines: z
351
358
  .array(z.string())
package/src/types/user.ts CHANGED
@@ -1,33 +1,35 @@
1
1
  import {
2
- MinimalUserSchema,
3
- UserEntitySchema,
4
- UserProfileEntitySchema,
5
- UserWithProjectsEntitySchema,
6
- UserWithProjectBookmarksEntitySchema,
7
- GetUserFollowingInputSchema,
8
- GetUserFollowersInputSchema,
9
- UserWithFollowingEntitySchema,
10
- UserWithFollowersEntitySchema,
11
- GetUserFollowingOutputSchema,
12
- GetUserFollowersOutputSchema,
13
- GetAuthenticatedUserOutputSchema,
14
- GetAuthenticatedUserProfileOutputSchema,
15
- GetAuthenticatedUserWithProjectsOutputSchema,
16
- GetAuthenticatedUserWithProjectBookmarksOutputSchema,
17
- GetAuthenticatedUserWithUserFollowingOutputSchema,
18
- GetAuthenticatedUserWithUserFollowersOutputSchema,
19
- SearchUsersInputSchema,
20
- UserWithProjectLikesEntitySchema,
21
- GetAuthenticatedUserWithProjectLikesOutputSchema,
22
- GetUserActivityInputSchema,
23
- GetUserActivityOutputSchema,
24
- UserStatsEntitySchema,
25
- UserWithPostsEntitySchema,
26
- SearchUsersOutputSchema,
27
- UserWithPostBookmarksEntitySchema,
28
- UserWithPostLikesEntitySchema,
29
- UserSearchDocumentSchema,
30
- UserWithJobBookmarksEntitySchema,
2
+ MinimalUserSchema,
3
+ UserEntitySchema,
4
+ UserProfileEntitySchema,
5
+ UserWithProjectsEntitySchema,
6
+ UserWithProjectBookmarksEntitySchema,
7
+ GetUserFollowingInputSchema,
8
+ GetUserFollowersInputSchema,
9
+ UserWithFollowingEntitySchema,
10
+ UserWithFollowersEntitySchema,
11
+ GetUserFollowingOutputSchema,
12
+ GetUserFollowersOutputSchema,
13
+ GetAuthenticatedUserOutputSchema,
14
+ GetAuthenticatedUserProfileOutputSchema,
15
+ GetAuthenticatedUserWithProjectsOutputSchema,
16
+ GetAuthenticatedUserWithProjectBookmarksOutputSchema,
17
+ GetAuthenticatedUserWithUserFollowingOutputSchema,
18
+ GetAuthenticatedUserWithUserFollowersOutputSchema,
19
+ SearchUsersInputSchema,
20
+ UserWithProjectLikesEntitySchema,
21
+ GetAuthenticatedUserWithProjectLikesOutputSchema,
22
+ GetUserActivityInputSchema,
23
+ GetUserActivityOutputSchema,
24
+ UserStatsEntitySchema,
25
+ UserWithPostsEntitySchema,
26
+ SearchUsersOutputSchema,
27
+ UserWithPostBookmarksEntitySchema,
28
+ UserWithPostLikesEntitySchema,
29
+ UserSearchDocumentSchema,
30
+ UserWithJobBookmarksEntitySchema,
31
+ UserWithJobBookmarksInputSchema,
32
+ UserWithJobBookmarksOutputSchema,
31
33
  } from "../schemas/user";
32
34
 
33
35
  import { z } from "@hono/zod-openapi";
@@ -37,57 +39,57 @@ export type MinimalUser = z.infer<typeof MinimalUserSchema>;
37
39
  export type UserEntity = z.infer<typeof UserEntitySchema>;
38
40
  export type UserProfileEntity = z.infer<typeof UserProfileEntitySchema>;
39
41
  export type UserWithProjectsEntity = z.infer<
40
- typeof UserWithProjectsEntitySchema
42
+ typeof UserWithProjectsEntitySchema
41
43
  >;
42
44
  export type UserWithProjectBookmarksEntity = z.infer<
43
- typeof UserWithProjectBookmarksEntitySchema
45
+ typeof UserWithProjectBookmarksEntitySchema
44
46
  >;
45
47
  export type UserWithProjectLikesEntity = z.infer<
46
- typeof UserWithProjectLikesEntitySchema
48
+ typeof UserWithProjectLikesEntitySchema
47
49
  >;
48
50
 
49
51
  export type UserWithPostBookmarksEntity = z.infer<
50
- typeof UserWithPostBookmarksEntitySchema
52
+ typeof UserWithPostBookmarksEntitySchema
51
53
  >;
52
54
  export type UserWithPostLikesEntity = z.infer<
53
- typeof UserWithPostLikesEntitySchema
55
+ typeof UserWithPostLikesEntitySchema
54
56
  >;
55
57
 
56
58
  export type UserWithUserPostsEntity = z.infer<typeof UserWithPostsEntitySchema>;
57
59
  export type GetUserFollowingInput = z.infer<typeof GetUserFollowingInputSchema>;
58
60
  export type GetUserFollowersInput = z.infer<typeof GetUserFollowersInputSchema>;
59
61
  export type UserWithFollowingEntity = z.infer<
60
- typeof UserWithFollowingEntitySchema
62
+ typeof UserWithFollowingEntitySchema
61
63
  >;
62
64
  export type UserWithFollowersEntity = z.infer<
63
- typeof UserWithFollowersEntitySchema
65
+ typeof UserWithFollowersEntitySchema
64
66
  >;
65
67
  export type GetUserFollowingOutput = z.infer<
66
- typeof GetUserFollowingOutputSchema
68
+ typeof GetUserFollowingOutputSchema
67
69
  >;
68
70
  export type GetUserFollowersOutput = z.infer<
69
- typeof GetUserFollowersOutputSchema
71
+ typeof GetUserFollowersOutputSchema
70
72
  >;
71
73
  export type GetAuthenticatedUserOutput = z.infer<
72
- typeof GetAuthenticatedUserOutputSchema
74
+ typeof GetAuthenticatedUserOutputSchema
73
75
  >;
74
76
  export type GetAuthenticatedUserProfileOutput = z.infer<
75
- typeof GetAuthenticatedUserProfileOutputSchema
77
+ typeof GetAuthenticatedUserProfileOutputSchema
76
78
  >;
77
79
  export type GetAuthenticatedUserWithProjectsOutput = z.infer<
78
- typeof GetAuthenticatedUserWithProjectsOutputSchema
80
+ typeof GetAuthenticatedUserWithProjectsOutputSchema
79
81
  >;
80
82
  export type GetAuthenticatedUserWithProjectBookmarksOutput = z.infer<
81
- typeof GetAuthenticatedUserWithProjectBookmarksOutputSchema
83
+ typeof GetAuthenticatedUserWithProjectBookmarksOutputSchema
82
84
  >;
83
85
  export type GetAuthenticatedUserWithProjectLikesOutput = z.infer<
84
- typeof GetAuthenticatedUserWithProjectLikesOutputSchema
86
+ typeof GetAuthenticatedUserWithProjectLikesOutputSchema
85
87
  >;
86
88
  export type GetAuthenticatedUserWithUserFollowingOutput = z.infer<
87
- typeof GetAuthenticatedUserWithUserFollowingOutputSchema
89
+ typeof GetAuthenticatedUserWithUserFollowingOutputSchema
88
90
  >;
89
91
  export type GetAuthenticatedUserWithUserFollowersOutput = z.infer<
90
- typeof GetAuthenticatedUserWithUserFollowersOutputSchema
92
+ typeof GetAuthenticatedUserWithUserFollowersOutputSchema
91
93
  >;
92
94
 
93
95
  export type GetUserActivityInput = z.infer<typeof GetUserActivityInputSchema>;
@@ -98,4 +100,12 @@ export type SearchUsersInput = z.infer<typeof SearchUsersInputSchema>;
98
100
  export type SearchUsersOutput = z.infer<typeof SearchUsersOutputSchema>;
99
101
  export type UserSearchDocument = z.infer<typeof UserSearchDocumentSchema>;
100
102
 
101
- export type UserWithJobBookmarksEntity = z.infer<typeof UserWithJobBookmarksEntitySchema>;
103
+ export type UserWithJobBookmarksEntity = z.infer<
104
+ typeof UserWithJobBookmarksEntitySchema
105
+ >;
106
+ export type UserWithJobBookmarksInput = z.infer<
107
+ typeof UserWithJobBookmarksInputSchema
108
+ >;
109
+ export type UserWithJobBookmarksOutput = z.infer<
110
+ typeof UserWithJobBookmarksOutputSchema
111
+ >;