@zyacreatives/shared 2.0.32 → 2.0.34
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/constants.d.ts +8 -0
- package/dist/constants.js +8 -1
- package/dist/schemas/user.d.ts +16 -0
- package/dist/schemas/user.js +8 -1
- package/dist/types/user.d.ts +3 -1
- package/package.json +1 -1
- package/src/constants.ts +8 -0
- package/src/schemas/user.ts +32 -2
- package/src/types/user.ts +5 -0
package/dist/constants.d.ts
CHANGED
|
@@ -179,6 +179,14 @@ export declare const POST_BADGE_TYPES: {
|
|
|
179
179
|
readonly DISCUSSION: "Discussion";
|
|
180
180
|
readonly MENTORSHIP: "Mentorship";
|
|
181
181
|
};
|
|
182
|
+
export declare const ACTIVITY_TYPES: {
|
|
183
|
+
readonly LIKE: "LIKE";
|
|
184
|
+
readonly UNLIKE: "UNLIKE";
|
|
185
|
+
readonly BOOKMARK: "BOOKMARK";
|
|
186
|
+
readonly UNBOOKMARK: "UNBOOKMARK";
|
|
187
|
+
readonly VIEW: "VIEW";
|
|
188
|
+
};
|
|
189
|
+
export type ActivityType = (typeof ACTIVITY_TYPES)[keyof typeof ACTIVITY_TYPES];
|
|
182
190
|
export type PostBadgeType = (typeof POST_BADGE_TYPES)[keyof typeof POST_BADGE_TYPES];
|
|
183
191
|
export type JobSections = (typeof JOB_SECTIONS)[keyof typeof JOB_SECTIONS];
|
|
184
192
|
export type WagesCurrency = (typeof WAGES_CURRENCY)[keyof typeof WAGES_CURRENCY];
|
package/dist/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DEFAULT_DISCIPLINES = exports.API_ROUTES = exports.POST_BADGE_TYPES = exports.JOB_STATUS = exports.WAGES_CURRENCY = exports.GIG_TYPE = exports.JOB_LOCATIONS = exports.JOB_SECTIONS = exports.WAGE_TYPES = exports.JOB_AVAILABILITY_TYPES = exports.EMPLOYMENT_TYPE = exports.WORK_MODE = exports.JOB_TYPE = exports.POST_TYPES = exports.ACTIVITY_PARENT_TYPES = exports.INVESTOR_VERIFICATION_DOCUMENT_TYPES = exports.INVESTOR_VERIFICATION_DOCUMENT_STATUSES = exports.GEOGRAPHIC_FOCUS = exports.INVESTMENT_SIZES = exports.INVESTOR_TYPES = exports.ONBOARDING_PAGES = exports.EXPERIENCE_LEVELS = exports.CLIENT_TYPES = exports.USER_STATUSES = exports.ROLES = void 0;
|
|
3
|
+
exports.DEFAULT_DISCIPLINES = exports.API_ROUTES = exports.ACTIVITY_TYPES = exports.POST_BADGE_TYPES = exports.JOB_STATUS = exports.WAGES_CURRENCY = exports.GIG_TYPE = exports.JOB_LOCATIONS = exports.JOB_SECTIONS = exports.WAGE_TYPES = exports.JOB_AVAILABILITY_TYPES = exports.EMPLOYMENT_TYPE = exports.WORK_MODE = exports.JOB_TYPE = exports.POST_TYPES = exports.ACTIVITY_PARENT_TYPES = exports.INVESTOR_VERIFICATION_DOCUMENT_TYPES = exports.INVESTOR_VERIFICATION_DOCUMENT_STATUSES = exports.GEOGRAPHIC_FOCUS = exports.INVESTMENT_SIZES = exports.INVESTOR_TYPES = exports.ONBOARDING_PAGES = exports.EXPERIENCE_LEVELS = exports.CLIENT_TYPES = exports.USER_STATUSES = exports.ROLES = void 0;
|
|
4
4
|
exports.ROLES = {
|
|
5
5
|
CREATIVE: "CREATIVE",
|
|
6
6
|
BRAND: "BRAND",
|
|
@@ -181,6 +181,13 @@ exports.POST_BADGE_TYPES = {
|
|
|
181
181
|
DISCUSSION: "Discussion",
|
|
182
182
|
MENTORSHIP: "Mentorship",
|
|
183
183
|
};
|
|
184
|
+
exports.ACTIVITY_TYPES = {
|
|
185
|
+
LIKE: "LIKE",
|
|
186
|
+
UNLIKE: "UNLIKE",
|
|
187
|
+
BOOKMARK: "BOOKMARK",
|
|
188
|
+
UNBOOKMARK: "UNBOOKMARK",
|
|
189
|
+
VIEW: "VIEW",
|
|
190
|
+
};
|
|
184
191
|
exports.API_ROUTES = {
|
|
185
192
|
healthCheck: "/health",
|
|
186
193
|
username: {
|
package/dist/schemas/user.d.ts
CHANGED
|
@@ -687,3 +687,19 @@ export declare const GetAuthenticatedUserWithProjectLikesOutputSchema: z.ZodObje
|
|
|
687
687
|
}, z.core.$strip>;
|
|
688
688
|
}, z.core.$strip>>;
|
|
689
689
|
}, z.core.$strip>;
|
|
690
|
+
export declare const GetUserActivityInputSchema: z.ZodObject<{
|
|
691
|
+
activityType: z.ZodEnum<{
|
|
692
|
+
LIKE: "LIKE";
|
|
693
|
+
UNLIKE: "UNLIKE";
|
|
694
|
+
BOOKMARK: "BOOKMARK";
|
|
695
|
+
UNBOOKMARK: "UNBOOKMARK";
|
|
696
|
+
VIEW: "VIEW";
|
|
697
|
+
}>;
|
|
698
|
+
}, z.core.$strip>;
|
|
699
|
+
export declare const GetUserActivityOutputSchema: z.ZodArray<z.ZodObject<{
|
|
700
|
+
parentId: z.ZodString;
|
|
701
|
+
parentType: z.ZodEnum<{
|
|
702
|
+
PROJECT: "PROJECT";
|
|
703
|
+
POST: "POST";
|
|
704
|
+
}>;
|
|
705
|
+
}, 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.GetAuthenticatedUserWithProjectLikesOutputSchema = exports.GetAuthenticatedUserWithUserFollowersOutputSchema = exports.GetAuthenticatedUserWithUserFollowingOutputSchema = exports.GetAuthenticatedUserWithProjectBookmarksOutputSchema = exports.GetAuthenticatedUserWithProjectsOutputSchema = exports.GetAuthenticatedUserProfileOutputSchema = exports.GetAuthenticatedUserOutputSchema = exports.GetUserFollowersOutputSchema = exports.GetUserFollowingOutputSchema = exports.UserWithFollowersEntitySchema = exports.UserWithFollowingEntitySchema = exports.GetUserFollowersInputSchema = exports.GetUserFollowingInputSchema = exports.UserWithProjectBookmarksEntitySchema = exports.UserWithProjectLikesEntitySchema = exports.UserWithProjectsEntitySchema = exports.UserProfileEntitySchema = exports.UserEntitySchema = exports.MinimalUserSchema = exports.BaseUserEntitySchema = exports.UserSocialGraphEntitySchema = void 0;
|
|
3
|
+
exports.GetUserActivityOutputSchema = exports.GetUserActivityInputSchema = exports.GetAuthenticatedUserWithProjectLikesOutputSchema = exports.GetAuthenticatedUserWithUserFollowersOutputSchema = exports.GetAuthenticatedUserWithUserFollowingOutputSchema = exports.GetAuthenticatedUserWithProjectBookmarksOutputSchema = exports.GetAuthenticatedUserWithProjectsOutputSchema = exports.GetAuthenticatedUserProfileOutputSchema = exports.GetAuthenticatedUserOutputSchema = exports.GetUserFollowersOutputSchema = exports.GetUserFollowingOutputSchema = exports.UserWithFollowersEntitySchema = exports.UserWithFollowingEntitySchema = exports.GetUserFollowersInputSchema = exports.GetUserFollowingInputSchema = exports.UserWithProjectBookmarksEntitySchema = exports.UserWithProjectLikesEntitySchema = exports.UserWithProjectsEntitySchema = exports.UserProfileEntitySchema = exports.UserEntitySchema = exports.MinimalUserSchema = exports.BaseUserEntitySchema = exports.UserSocialGraphEntitySchema = 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");
|
|
@@ -136,3 +136,10 @@ exports.GetAuthenticatedUserWithProjectBookmarksOutputSchema = exports.UserWithP
|
|
|
136
136
|
exports.GetAuthenticatedUserWithUserFollowingOutputSchema = exports.UserWithFollowingEntitySchema;
|
|
137
137
|
exports.GetAuthenticatedUserWithUserFollowersOutputSchema = exports.UserWithFollowersEntitySchema;
|
|
138
138
|
exports.GetAuthenticatedUserWithProjectLikesOutputSchema = exports.UserWithProjectLikesEntitySchema;
|
|
139
|
+
exports.GetUserActivityInputSchema = zod_openapi_1.z.object({
|
|
140
|
+
activityType: zod_openapi_1.z.enum(Object.values(constants_1.ACTIVITY_TYPES)),
|
|
141
|
+
});
|
|
142
|
+
exports.GetUserActivityOutputSchema = zod_openapi_1.z.array(zod_openapi_1.z.object({
|
|
143
|
+
parentId: zod_openapi_1.z.string(),
|
|
144
|
+
parentType: zod_openapi_1.z.enum(Object.values(constants_1.ACTIVITY_PARENT_TYPES)),
|
|
145
|
+
}));
|
package/dist/types/user.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseUserEntitySchema, MinimalUserSchema, UserEntitySchema, UserProfileEntitySchema, UserWithProjectsEntitySchema, UserWithProjectBookmarksEntitySchema, GetUserFollowingInputSchema, GetUserFollowersInputSchema, UserWithFollowingEntitySchema, UserWithFollowersEntitySchema, GetUserFollowingOutputSchema, GetUserFollowersOutputSchema, GetAuthenticatedUserOutputSchema, GetAuthenticatedUserProfileOutputSchema, GetAuthenticatedUserWithProjectsOutputSchema, GetAuthenticatedUserWithProjectBookmarksOutputSchema, GetAuthenticatedUserWithUserFollowingOutputSchema, GetAuthenticatedUserWithUserFollowersOutputSchema, UserWithProjectLikesEntitySchema, GetAuthenticatedUserWithProjectLikesOutputSchema } from "../schemas/user";
|
|
1
|
+
import { BaseUserEntitySchema, MinimalUserSchema, UserEntitySchema, UserProfileEntitySchema, UserWithProjectsEntitySchema, UserWithProjectBookmarksEntitySchema, GetUserFollowingInputSchema, GetUserFollowersInputSchema, UserWithFollowingEntitySchema, UserWithFollowersEntitySchema, GetUserFollowingOutputSchema, GetUserFollowersOutputSchema, GetAuthenticatedUserOutputSchema, GetAuthenticatedUserProfileOutputSchema, GetAuthenticatedUserWithProjectsOutputSchema, GetAuthenticatedUserWithProjectBookmarksOutputSchema, GetAuthenticatedUserWithUserFollowingOutputSchema, GetAuthenticatedUserWithUserFollowersOutputSchema, UserWithProjectLikesEntitySchema, GetAuthenticatedUserWithProjectLikesOutputSchema, GetUserActivityInputSchema, GetUserActivityOutputSchema } from "../schemas/user";
|
|
2
2
|
import { z } from "@hono/zod-openapi";
|
|
3
3
|
export type BaseUserEntity = z.infer<typeof BaseUserEntitySchema>;
|
|
4
4
|
export type MinimalUser = z.infer<typeof MinimalUserSchema>;
|
|
@@ -20,3 +20,5 @@ export type GetAuthenticatedUserWithProjectBookmarksOutput = z.infer<typeof GetA
|
|
|
20
20
|
export type GetAuthenticatedUserWithProjectLikesOutput = z.infer<typeof GetAuthenticatedUserWithProjectLikesOutputSchema>;
|
|
21
21
|
export type GetAuthenticatedUserWithUserFollowingOutput = z.infer<typeof GetAuthenticatedUserWithUserFollowingOutputSchema>;
|
|
22
22
|
export type GetAuthenticatedUserWithUserFollowersOutput = z.infer<typeof GetAuthenticatedUserWithUserFollowersOutputSchema>;
|
|
23
|
+
export type GetUserActivityInput = z.infer<typeof GetUserActivityInputSchema>;
|
|
24
|
+
export type GetUserActivityOutput = z.infer<typeof GetUserActivityOutputSchema>;
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
|
@@ -202,6 +202,14 @@ export const POST_BADGE_TYPES = {
|
|
|
202
202
|
MENTORSHIP: "Mentorship",
|
|
203
203
|
} as const;
|
|
204
204
|
|
|
205
|
+
export const ACTIVITY_TYPES = {
|
|
206
|
+
LIKE: "LIKE",
|
|
207
|
+
UNLIKE: "UNLIKE",
|
|
208
|
+
BOOKMARK: "BOOKMARK",
|
|
209
|
+
UNBOOKMARK: "UNBOOKMARK",
|
|
210
|
+
VIEW: "VIEW",
|
|
211
|
+
} as const;
|
|
212
|
+
export type ActivityType = (typeof ACTIVITY_TYPES)[keyof typeof ACTIVITY_TYPES];
|
|
205
213
|
export type PostBadgeType =
|
|
206
214
|
(typeof POST_BADGE_TYPES)[keyof typeof POST_BADGE_TYPES];
|
|
207
215
|
export type JobSections = (typeof JOB_SECTIONS)[keyof typeof JOB_SECTIONS];
|
package/src/schemas/user.ts
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { z } from "@hono/zod-openapi";
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import {
|
|
4
|
+
ROLES,
|
|
5
|
+
USER_STATUSES,
|
|
6
|
+
ONBOARDING_PAGES,
|
|
7
|
+
ACTIVITY_TYPES,
|
|
8
|
+
ACTIVITY_PARENT_TYPES,
|
|
9
|
+
} from "../constants";
|
|
10
|
+
import type {
|
|
11
|
+
Role,
|
|
12
|
+
UserStatus,
|
|
13
|
+
OnboardingPage,
|
|
14
|
+
ActivityType,
|
|
15
|
+
ActivityParentType,
|
|
16
|
+
} from "../constants";
|
|
5
17
|
import { ProjectEntitySchema } from "./project";
|
|
6
18
|
import { BookmarkEntitySchema } from "./bookmark";
|
|
7
19
|
import { LikeEntitySchema } from "./like";
|
|
@@ -168,3 +180,21 @@ export const GetAuthenticatedUserWithUserFollowersOutputSchema =
|
|
|
168
180
|
|
|
169
181
|
export const GetAuthenticatedUserWithProjectLikesOutputSchema =
|
|
170
182
|
UserWithProjectLikesEntitySchema;
|
|
183
|
+
|
|
184
|
+
export const GetUserActivityInputSchema = z.object({
|
|
185
|
+
activityType: z.enum(
|
|
186
|
+
Object.values(ACTIVITY_TYPES) as [ActivityType, ...ActivityType[]]
|
|
187
|
+
),
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
export const GetUserActivityOutputSchema = z.array(
|
|
191
|
+
z.object({
|
|
192
|
+
parentId: z.string(),
|
|
193
|
+
parentType: z.enum(
|
|
194
|
+
Object.values(ACTIVITY_PARENT_TYPES) as [
|
|
195
|
+
ActivityParentType,
|
|
196
|
+
...ActivityParentType[]
|
|
197
|
+
]
|
|
198
|
+
),
|
|
199
|
+
})
|
|
200
|
+
);
|
package/src/types/user.ts
CHANGED
|
@@ -19,6 +19,8 @@ import {
|
|
|
19
19
|
GetAuthenticatedUserWithUserFollowersOutputSchema,
|
|
20
20
|
UserWithProjectLikesEntitySchema,
|
|
21
21
|
GetAuthenticatedUserWithProjectLikesOutputSchema,
|
|
22
|
+
GetUserActivityInputSchema,
|
|
23
|
+
GetUserActivityOutputSchema,
|
|
22
24
|
} from "../schemas/user";
|
|
23
25
|
|
|
24
26
|
import { z } from "@hono/zod-openapi";
|
|
@@ -71,3 +73,6 @@ export type GetAuthenticatedUserWithUserFollowingOutput = z.infer<
|
|
|
71
73
|
export type GetAuthenticatedUserWithUserFollowersOutput = z.infer<
|
|
72
74
|
typeof GetAuthenticatedUserWithUserFollowersOutputSchema
|
|
73
75
|
>;
|
|
76
|
+
|
|
77
|
+
export type GetUserActivityInput = z.infer<typeof GetUserActivityInputSchema>;
|
|
78
|
+
export type GetUserActivityOutput = z.infer<typeof GetUserActivityOutputSchema>;
|