@zyacreatives/shared 1.1.1 → 1.1.3

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.
@@ -80,15 +80,6 @@ export declare const INVESTOR_VERIFICATION_DOCUMENT_TYPES: {
80
80
  readonly BUSINESS_REGISTRATION: "BUSINESS_REGISTRATION";
81
81
  readonly OTHER_CERTIFICATE: "OTHER_CERTIFICATE";
82
82
  };
83
- export declare const COMMENT_STATUSES: {
84
- readonly ACTIVE: "ACTIVE";
85
- readonly HIDDEN: "HIDDEN";
86
- readonly DELETED: "DELETED";
87
- };
88
- export declare const FILE_VISIBILITIES: {
89
- readonly PUBLIC: "PUBLIC";
90
- readonly PRIVATE: "PRIVATE";
91
- };
92
83
  export type Role = (typeof ROLES)[keyof typeof ROLES];
93
84
  export type UserStatus = (typeof USER_STATUSES)[keyof typeof USER_STATUSES];
94
85
  export type ClientType = (typeof CLIENT_TYPES)[keyof typeof CLIENT_TYPES];
@@ -99,8 +90,6 @@ export type InvestmentSize = (typeof INVESTMENT_SIZES)[keyof typeof INVESTMENT_S
99
90
  export type GeographicFocus = (typeof GEOGRAPHIC_FOCUS)[keyof typeof GEOGRAPHIC_FOCUS];
100
91
  export type InvestorVerificationDocumentStatus = (typeof INVESTOR_VERIFICATION_DOCUMENT_STATUSES)[keyof typeof INVESTOR_VERIFICATION_DOCUMENT_STATUSES];
101
92
  export type InvestorVerificationDocumentType = (typeof INVESTOR_VERIFICATION_DOCUMENT_TYPES)[keyof typeof INVESTOR_VERIFICATION_DOCUMENT_TYPES];
102
- export type CommentStatus = (typeof COMMENT_STATUSES)[keyof typeof COMMENT_STATUSES];
103
- export type FileVisibility = (typeof FILE_VISIBILITIES)[keyof typeof FILE_VISIBILITIES];
104
93
  export declare const API_ROUTES: {
105
94
  readonly healthCheck: "/health";
106
95
  readonly username: {
package/dist/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FRONTEND_API_ROUTES = exports.API_ROUTES = exports.FILE_VISIBILITIES = exports.COMMENT_STATUSES = 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.FRONTEND_API_ROUTES = exports.API_ROUTES = 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",
@@ -83,15 +83,6 @@ exports.INVESTOR_VERIFICATION_DOCUMENT_TYPES = {
83
83
  BUSINESS_REGISTRATION: "BUSINESS_REGISTRATION",
84
84
  OTHER_CERTIFICATE: "OTHER_CERTIFICATE",
85
85
  };
86
- exports.COMMENT_STATUSES = {
87
- ACTIVE: "ACTIVE",
88
- HIDDEN: "HIDDEN",
89
- DELETED: "DELETED",
90
- };
91
- exports.FILE_VISIBILITIES = {
92
- PUBLIC: "PUBLIC",
93
- PRIVATE: "PRIVATE",
94
- };
95
86
  exports.API_ROUTES = {
96
87
  healthCheck: "/health",
97
88
  username: {
@@ -5,6 +5,7 @@ export declare const BrandEntitySchema: z.ZodObject<{
5
5
  brandName: z.ZodString;
6
6
  searchVector: z.ZodOptional<z.ZodString>;
7
7
  bio: z.ZodOptional<z.ZodString>;
8
+ disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
8
9
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
9
10
  createdAt: z.ZodISODateTime;
10
11
  updatedAt: z.ZodISODateTime;
@@ -34,6 +35,7 @@ export declare const CreateBrandEndpointResponseSchema: z.ZodObject<{
34
35
  brandName: z.ZodString;
35
36
  searchVector: z.ZodOptional<z.ZodString>;
36
37
  bio: z.ZodOptional<z.ZodString>;
38
+ disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
37
39
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
38
40
  createdAt: z.ZodISODateTime;
39
41
  updatedAt: z.ZodISODateTime;
@@ -44,6 +46,7 @@ export declare const GetBrandEndpointResponseSchema: z.ZodObject<{
44
46
  brandName: z.ZodString;
45
47
  searchVector: z.ZodOptional<z.ZodString>;
46
48
  bio: z.ZodOptional<z.ZodString>;
49
+ disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
47
50
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
48
51
  createdAt: z.ZodISODateTime;
49
52
  updatedAt: z.ZodISODateTime;
@@ -67,6 +70,7 @@ export declare const UpdateBrandEndpointResponseSchema: z.ZodObject<{
67
70
  brandName: z.ZodString;
68
71
  searchVector: z.ZodOptional<z.ZodString>;
69
72
  bio: z.ZodOptional<z.ZodString>;
73
+ disciplines: z.ZodOptional<z.ZodArray<z.ZodString>>;
70
74
  tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
71
75
  createdAt: z.ZodISODateTime;
72
76
  updatedAt: z.ZodISODateTime;
@@ -13,6 +13,12 @@ exports.BrandEntitySchema = zod_openapi_1.z
13
13
  bio: zod_openapi_1.z.string().optional().openapi({
14
14
  example: "A creative studio specializing in product design.",
15
15
  }),
16
+ disciplines: zod_openapi_1.z
17
+ .array(zod_openapi_1.z.string())
18
+ .optional()
19
+ .openapi({
20
+ example: ["graphic-design", "branding"],
21
+ }),
16
22
  tags: zod_openapi_1.z
17
23
  .array(zod_openapi_1.z.string())
18
24
  .optional()
@@ -1,4 +1,4 @@
1
- import type { ClientType, CommentStatus, Role } from "../constants";
1
+ import type { ClientType, Role } from "../constants";
2
2
  import type { ProjectSocialGraphEntity } from "./common";
3
3
  import type { BaseUserEntity, MinimalUser } from "./user";
4
4
  export type ProjectFileEntity = {
@@ -47,7 +47,6 @@ export type ProjectLikeEntity = {
47
47
  };
48
48
  export type ProjectCommentEntity = {
49
49
  id: string;
50
- status: CommentStatus;
51
50
  createdAt: Date;
52
51
  userId: string;
53
52
  projectId: string;
@@ -77,3 +76,15 @@ export type ListProjectsDto = {
77
76
  page?: number;
78
77
  perPage?: number;
79
78
  };
79
+ export type ProjectWithProjectViewsEntity = MinimalProject & {
80
+ views: ProjectViewEntity[];
81
+ } & Partial<ProjectSocialGraphEntity>;
82
+ export type ProjectWithProjectCommentsEntity = MinimalProject & {
83
+ comments: ProjectCommentEntity[];
84
+ } & Partial<ProjectSocialGraphEntity>;
85
+ export type ProjectWithProjectLikesEntity = MinimalProject & {
86
+ likes: ProjectLikeEntity[];
87
+ } & Partial<ProjectSocialGraphEntity>;
88
+ export type ProjectWithProjectBookmarksEntity = MinimalProject & {
89
+ bookmarks: ProjectBookmarkEntity[];
90
+ } & Partial<ProjectSocialGraphEntity>;
@@ -9,6 +9,7 @@ export type BaseUserEntity = {
9
9
  image?: string;
10
10
  username?: string;
11
11
  displayUsername?: string;
12
+ searchVector?: string;
12
13
  role: Role;
13
14
  status: UserStatus;
14
15
  onboardingPage: OnboardingPage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyacreatives/shared",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/constants.ts CHANGED
@@ -90,17 +90,6 @@ export const INVESTOR_VERIFICATION_DOCUMENT_TYPES = {
90
90
  OTHER_CERTIFICATE: "OTHER_CERTIFICATE",
91
91
  } as const;
92
92
 
93
- export const COMMENT_STATUSES = {
94
- ACTIVE: "ACTIVE",
95
- HIDDEN: "HIDDEN",
96
- DELETED: "DELETED",
97
- } as const;
98
-
99
- export const FILE_VISIBILITIES = {
100
- PUBLIC: "PUBLIC",
101
- PRIVATE: "PRIVATE",
102
- } as const;
103
-
104
93
  export type Role = (typeof ROLES)[keyof typeof ROLES];
105
94
  export type UserStatus = (typeof USER_STATUSES)[keyof typeof USER_STATUSES];
106
95
  export type ClientType = (typeof CLIENT_TYPES)[keyof typeof CLIENT_TYPES];
@@ -117,10 +106,6 @@ export type InvestorVerificationDocumentStatus =
117
106
  (typeof INVESTOR_VERIFICATION_DOCUMENT_STATUSES)[keyof typeof INVESTOR_VERIFICATION_DOCUMENT_STATUSES];
118
107
  export type InvestorVerificationDocumentType =
119
108
  (typeof INVESTOR_VERIFICATION_DOCUMENT_TYPES)[keyof typeof INVESTOR_VERIFICATION_DOCUMENT_TYPES];
120
- export type CommentStatus =
121
- (typeof COMMENT_STATUSES)[keyof typeof COMMENT_STATUSES];
122
- export type FileVisibility =
123
- (typeof FILE_VISIBILITIES)[keyof typeof FILE_VISIBILITIES];
124
109
 
125
110
  export const API_ROUTES = {
126
111
  healthCheck: "/health",
@@ -11,6 +11,12 @@ export const BrandEntitySchema = z
11
11
  bio: z.string().optional().openapi({
12
12
  example: "A creative studio specializing in product design.",
13
13
  }),
14
+ disciplines: z
15
+ .array(z.string())
16
+ .optional()
17
+ .openapi({
18
+ example: ["graphic-design", "branding"],
19
+ }),
14
20
  tags: z
15
21
  .array(z.string())
16
22
  .optional()
@@ -1,4 +1,4 @@
1
- import type { ClientType, CommentStatus, Role } from "../constants";
1
+ import type { ClientType, Role } from "../constants";
2
2
  import type { ProjectSocialGraphEntity } from "./common";
3
3
  import type { BaseUserEntity, MinimalUser } from "./user";
4
4
 
@@ -54,7 +54,6 @@ export type ProjectLikeEntity = {
54
54
 
55
55
  export type ProjectCommentEntity = {
56
56
  id: string;
57
- status: CommentStatus;
58
57
  createdAt: Date;
59
58
  userId: string;
60
59
  projectId: string;
@@ -99,3 +98,19 @@ export type ListProjectsDto = {
99
98
  page?: number;
100
99
  perPage?: number;
101
100
  };
101
+
102
+ export type ProjectWithProjectViewsEntity = MinimalProject & {
103
+ views: ProjectViewEntity[];
104
+ } & Partial<ProjectSocialGraphEntity>;
105
+
106
+ export type ProjectWithProjectCommentsEntity = MinimalProject & {
107
+ comments: ProjectCommentEntity[];
108
+ } & Partial<ProjectSocialGraphEntity>;
109
+
110
+ export type ProjectWithProjectLikesEntity = MinimalProject & {
111
+ likes: ProjectLikeEntity[];
112
+ } & Partial<ProjectSocialGraphEntity>;
113
+
114
+ export type ProjectWithProjectBookmarksEntity = MinimalProject & {
115
+ bookmarks: ProjectBookmarkEntity[];
116
+ } & Partial<ProjectSocialGraphEntity>;
package/src/types/user.ts CHANGED
@@ -10,6 +10,7 @@ export type BaseUserEntity = {
10
10
  image?: string;
11
11
  username?: string;
12
12
  displayUsername?: string;
13
+ searchVector?: string;
13
14
  role: Role;
14
15
  status: UserStatus;
15
16
  onboardingPage: OnboardingPage;