@zyacreatives/shared 1.0.1 → 1.1.0

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.
Files changed (46) hide show
  1. package/dist/constants.d.ts +277 -0
  2. package/dist/constants.js +268 -0
  3. package/dist/index.js +17 -1
  4. package/dist/schemas/brand.d.ts +84 -0
  5. package/dist/schemas/brand.js +68 -0
  6. package/dist/schemas/common.d.ts +33 -0
  7. package/dist/schemas/common.js +58 -0
  8. package/dist/schemas/creative.d.ts +113 -0
  9. package/dist/schemas/creative.js +102 -0
  10. package/dist/schemas/user.d.ts +179 -0
  11. package/dist/schemas/user.js +93 -0
  12. package/dist/types/brand.d.ts +24 -0
  13. package/dist/types/brand.js +2 -0
  14. package/dist/types/common.d.ts +10 -0
  15. package/dist/types/common.js +2 -0
  16. package/dist/types/creative.d.ts +28 -0
  17. package/dist/types/creative.js +2 -0
  18. package/dist/types/discipline.d.ts +8 -0
  19. package/dist/types/discipline.js +2 -0
  20. package/dist/types/file.d.ts +12 -0
  21. package/dist/types/file.js +2 -0
  22. package/dist/types/index.d.ts +8 -1
  23. package/dist/types/index.js +24 -1
  24. package/dist/types/investor.d.ts +30 -0
  25. package/dist/types/investor.js +2 -0
  26. package/dist/types/project.d.ts +79 -0
  27. package/dist/types/project.js +2 -0
  28. package/dist/types/user.d.ts +42 -0
  29. package/dist/types/user.js +2 -0
  30. package/package.json +7 -3
  31. package/src/constants.ts +300 -0
  32. package/src/schemas/brand.ts +91 -0
  33. package/src/schemas/common.ts +67 -0
  34. package/src/schemas/creative.ts +125 -0
  35. package/src/schemas/user.ts +125 -0
  36. package/src/types/brand.ts +27 -0
  37. package/src/types/common.ts +11 -0
  38. package/src/types/creative.ts +32 -0
  39. package/src/types/discipline.ts +9 -0
  40. package/src/types/file.ts +13 -0
  41. package/src/types/index.ts +8 -1
  42. package/src/types/investor.ts +38 -0
  43. package/src/types/project.ts +101 -0
  44. package/src/types/user.ts +60 -0
  45. package/tsconfig.json +5 -3
  46. package/src/types/enums.ts +0 -109
@@ -0,0 +1,277 @@
1
+ export declare const ROLES: {
2
+ readonly CREATIVE: "CREATIVE";
3
+ readonly BRAND: "BRAND";
4
+ readonly INVESTOR: "INVESTOR";
5
+ readonly ADMIN: "ADMIN";
6
+ };
7
+ export declare const USER_STATUSES: {
8
+ readonly ACTIVE: "ACTIVE";
9
+ readonly SUSPENDED: "SUSPENDED";
10
+ readonly DELETED: "DELETED";
11
+ };
12
+ export declare const CLIENT_TYPES: {
13
+ readonly CREATIVE: "CREATIVE";
14
+ readonly BRAND: "BRAND";
15
+ readonly NONE: "NONE";
16
+ };
17
+ export declare const EXPERIENCE_LEVELS: {
18
+ readonly YEAR_0_1: "0-1 year";
19
+ readonly YEAR_1_3: "1-3 years";
20
+ readonly YEAR_3_5: "3-5 years";
21
+ readonly YEAR_5_PLUS: "5+ years";
22
+ };
23
+ export declare const ONBOARDING_PAGES: {
24
+ readonly EMAIL_VERIFICATION: "EMAIL_VERIFICATION";
25
+ readonly USERNAME_SELECTION: "USERNAME_SELECTION";
26
+ readonly ACCOUNT_TYPE_SELECTION: "ACCOUNT_TYPE_SELECTION";
27
+ readonly CREATIVE_PROFILE_DETAILS: "CREATIVE_PROFILE_DETAILS";
28
+ readonly CREATIVE_PROFILE_CUSTOMIZE_FEED: "CREATIVE_PROFILE_CUSTOMIZE_FEED";
29
+ readonly CREATIVE_PROFILE_PORTFOLIO: "CREATIVE_PROFILE_PORTFOLIO";
30
+ readonly BRAND_PROFILE_DETAILS: "BRAND_PROFILE_DETAILS";
31
+ readonly BRAND_PROFILE_CUSTOMIZE_FEED: "BRAND_PROFILE_CUSTOMIZE_FEED";
32
+ readonly BRAND_PROFILE_PORTFOLIO: "BRAND_PROFILE_PORTFOLIO";
33
+ readonly INVESTOR_PROFILE_DETAILS: "INVESTOR_PROFILE_DETAILS";
34
+ readonly INVESTOR_INVESTMENT_FOCUS: "INVESTOR_INVESTMENT_FOCUS";
35
+ readonly INVESTOR_VERIFICATION: "INVESTOR_VERIFICATION";
36
+ readonly DONE: "DONE";
37
+ };
38
+ export declare const INVESTOR_TYPES: {
39
+ readonly ANGEL_INVESTOR: "Angel Investor";
40
+ readonly VENTURE_CAPITALIST: "Venture Capitalist";
41
+ readonly PRIVATE_EQUITY_FIRM: "Private Equity Firm";
42
+ readonly VENTURE_DEBT_PROVIDER: "Venture Debt Provider";
43
+ readonly BANK: "Bank";
44
+ readonly CONVERTIBLE_NOTE_INVESTOR: "Convertible Note Investor";
45
+ readonly REVENUE_BASED_FINANCING_INVESTOR: "Revenue Based Financing Investor";
46
+ readonly CORPORATE_VENTURE_CAPITALIST: "Corporate Venture Capitalist";
47
+ readonly GOVERNMENT: "Government";
48
+ readonly SOCIAL_IMPACT_INVESTOR: "Social Impact Investor";
49
+ };
50
+ export declare const INVESTMENT_SIZES: {
51
+ readonly UNDER_5K: "Under 5k USD";
52
+ readonly BETWEEN_5K_25K: "5k - 25k USD";
53
+ readonly BETWEEN_25K_100K: "25k - 100k USD";
54
+ readonly BETWEEN_100K_500K: "100k - 500k USD";
55
+ readonly BETWEEN_500K_1M: "500k - 1M USD";
56
+ readonly OVER_1M: "1M+ USD";
57
+ };
58
+ export declare const GEOGRAPHIC_FOCUS: {
59
+ readonly AFRICA: "Africa";
60
+ readonly ASIA: "Asia";
61
+ readonly EUROPE: "Europe";
62
+ readonly NORTH_AMERICA: "North America";
63
+ readonly SOUTH_AMERICA: "South America";
64
+ readonly MIDDLE_EAST: "Middle East";
65
+ readonly OCEANIA: "Oceania";
66
+ readonly UK: "United Kingdom (UK)";
67
+ readonly US: "United States (US)";
68
+ readonly GLOBAL: "Global";
69
+ readonly OTHER: "Other";
70
+ };
71
+ export declare const INVESTOR_VERIFICATION_DOCUMENT_STATUSES: {
72
+ readonly PENDING: "PENDING";
73
+ readonly APPROVED: "APPROVED";
74
+ readonly REJECTED: "REJECTED";
75
+ };
76
+ export declare const INVESTOR_VERIFICATION_DOCUMENT_TYPES: {
77
+ readonly ID_PROOF: "ID_PROOF";
78
+ readonly BANK_STATEMENT: "BANK_STATEMENT";
79
+ readonly TAX_DOCUMENT: "TAX_DOCUMENT";
80
+ readonly BUSINESS_REGISTRATION: "BUSINESS_REGISTRATION";
81
+ readonly OTHER_CERTIFICATE: "OTHER_CERTIFICATE";
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
+ export type Role = (typeof ROLES)[keyof typeof ROLES];
93
+ export type UserStatus = (typeof USER_STATUSES)[keyof typeof USER_STATUSES];
94
+ export type ClientType = (typeof CLIENT_TYPES)[keyof typeof CLIENT_TYPES];
95
+ export type ExperienceLevel = (typeof EXPERIENCE_LEVELS)[keyof typeof EXPERIENCE_LEVELS];
96
+ export type OnboardingPage = (typeof ONBOARDING_PAGES)[keyof typeof ONBOARDING_PAGES];
97
+ export type InvestorType = (typeof INVESTOR_TYPES)[keyof typeof INVESTOR_TYPES];
98
+ export type InvestmentSize = (typeof INVESTMENT_SIZES)[keyof typeof INVESTMENT_SIZES];
99
+ export type GeographicFocus = (typeof GEOGRAPHIC_FOCUS)[keyof typeof GEOGRAPHIC_FOCUS];
100
+ export type InvestorVerificationDocumentStatus = (typeof INVESTOR_VERIFICATION_DOCUMENT_STATUSES)[keyof typeof INVESTOR_VERIFICATION_DOCUMENT_STATUSES];
101
+ 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
+ export declare const API_ROUTES: {
105
+ readonly healthCheck: "/health";
106
+ readonly username: {
107
+ readonly base: "/usernames";
108
+ readonly checkAvailability: "/:username/availability";
109
+ };
110
+ readonly personal: {
111
+ readonly base: "/me";
112
+ readonly getUser: "";
113
+ readonly getProfile: "/profile";
114
+ readonly getProjects: "/projects";
115
+ readonly getProjectBookmarks: "/project-bookmarks";
116
+ readonly getFollowers: "/followers";
117
+ readonly getFollowing: "/following";
118
+ };
119
+ readonly user: {
120
+ readonly base: "/users";
121
+ readonly getUser: "/:value";
122
+ readonly getProfile: "/:value/profile";
123
+ readonly getProjects: "/:value/projects";
124
+ readonly getFollowers: "/:userId/followers";
125
+ readonly getFollowing: "/:userId/following";
126
+ readonly followUser: "/:userId/follow";
127
+ readonly unfollowUser: "/:userId/unfollow";
128
+ readonly reserveUsername: "/reserve-username";
129
+ };
130
+ readonly redirect: {
131
+ readonly base: "/redirect";
132
+ readonly passwordReset: "/password-reset";
133
+ readonly verifiedUser: "/verified-user";
134
+ readonly googleProfile: "/google-profile";
135
+ readonly newGoogleProfile: "/new-google-profile";
136
+ };
137
+ readonly file: {
138
+ readonly base: "/files";
139
+ readonly getPresignedUploadUrl: "/get-upload-url";
140
+ readonly getPresignedDownloadUrl: "/:fileId/download-url";
141
+ readonly getPublicUrl: "/:fileId/public-url";
142
+ readonly createFile: "";
143
+ readonly deleteFile: "/:fileId";
144
+ };
145
+ readonly disciplines: {
146
+ readonly base: "/disciplines";
147
+ readonly getDisciplines: "";
148
+ readonly getSingleDiscipline: "/:slug";
149
+ readonly addDisciplines: "";
150
+ readonly deleteDiscipline: "/:slug";
151
+ };
152
+ readonly creatives: {
153
+ readonly base: "/creatives";
154
+ readonly createCreative: "";
155
+ readonly getCreative: "/:value";
156
+ readonly updateCreative: "";
157
+ };
158
+ readonly brands: {
159
+ readonly base: "/brands";
160
+ readonly createBrand: "";
161
+ readonly getBrand: "/:value";
162
+ readonly updateBrand: "";
163
+ };
164
+ readonly investors: {
165
+ readonly base: "/investors";
166
+ readonly createInvestor: "";
167
+ readonly getInvestor: "/:value";
168
+ readonly updateInvestor: "";
169
+ };
170
+ readonly projects: {
171
+ readonly base: "/projects";
172
+ readonly createProject: "";
173
+ readonly updateProject: "";
174
+ readonly listProjects: "";
175
+ readonly getProject: "/:projectId";
176
+ readonly deleteProject: "/:projectId";
177
+ readonly commentOnProject: "/:projectId/comment";
178
+ readonly deleteCommentOnProject: "/:projectId/comments/:commentId";
179
+ readonly bookmarkProject: "/:projectId/bookmark";
180
+ readonly unbookmarkProject: "/:projectId/unbookmark";
181
+ readonly likeProject: "/:projectId/like";
182
+ readonly unlikeProject: "/:projectId/unlike";
183
+ readonly viewProject: "/:projectId/view";
184
+ readonly getProjectComments: "/:projectId/comments";
185
+ readonly getProjectLikes: "/:projectId/likes";
186
+ readonly getProjectBookmarks: "/:projectId/bookmarks";
187
+ readonly getProjectViews: "/:projectId/views";
188
+ readonly getProjectUser: "/:projectId/user";
189
+ };
190
+ };
191
+ export declare const FRONTEND_API_ROUTES: {
192
+ readonly healthCheck: "health";
193
+ readonly username: {
194
+ readonly base: "usernames";
195
+ readonly checkAvailability: (username: string) => string;
196
+ };
197
+ readonly personal: {
198
+ readonly base: "me";
199
+ readonly getUser: "";
200
+ readonly getProfile: "profile";
201
+ readonly getProjects: "projects";
202
+ readonly getProjectBookmarks: "project-bookmarks";
203
+ readonly getFollowers: "followers";
204
+ readonly getFollowing: "following";
205
+ };
206
+ readonly user: {
207
+ readonly base: "users";
208
+ readonly getUser: (value: string) => string;
209
+ readonly getProfile: (value: string) => string;
210
+ readonly getProjects: (value: string) => string;
211
+ readonly getFollowers: (userId: string) => string;
212
+ readonly getFollowing: (userId: string) => string;
213
+ readonly followUser: (userId: string) => string;
214
+ readonly unfollowUser: (userId: string) => string;
215
+ readonly reserveUsername: "reserve-username";
216
+ };
217
+ readonly redirect: {
218
+ readonly base: "redirect";
219
+ readonly passwordReset: "password-reset";
220
+ readonly verifiedUser: "verified-user";
221
+ readonly googleProfile: "google-profile";
222
+ readonly newGoogleProfile: "new-google-profile";
223
+ };
224
+ readonly file: {
225
+ readonly base: "files";
226
+ readonly getPresignedUploadUrl: "get-upload-url";
227
+ readonly getPresignedDownloadUrl: (fileId: string) => string;
228
+ readonly getPublicUrl: (fileId: string) => string;
229
+ readonly createFile: "";
230
+ readonly deleteFile: (fileId: string) => string;
231
+ };
232
+ readonly disciplines: {
233
+ readonly base: "disciplines";
234
+ readonly getDisciplines: "";
235
+ readonly getSingleDiscipline: (slug: string) => string;
236
+ readonly addDisciplines: "";
237
+ readonly deleteDiscipline: (slug: string) => string;
238
+ };
239
+ readonly creatives: {
240
+ readonly base: "creatives";
241
+ readonly createCreative: "";
242
+ readonly getCreative: (value: string) => string;
243
+ readonly updateCreative: "";
244
+ };
245
+ readonly brands: {
246
+ readonly base: "brands";
247
+ readonly createBrand: "";
248
+ readonly getBrand: (value: string) => string;
249
+ readonly updateBrand: "";
250
+ };
251
+ readonly investors: {
252
+ readonly base: "investors";
253
+ readonly createInvestor: "";
254
+ readonly getInvestor: (value: string) => string;
255
+ readonly updateInvestor: "";
256
+ };
257
+ readonly projects: {
258
+ readonly base: "projects";
259
+ readonly createProject: "";
260
+ readonly updateProject: "";
261
+ readonly listProjects: "";
262
+ readonly getProject: (projectId: string) => string;
263
+ readonly deleteProject: (projectId: string) => string;
264
+ readonly commentOnProject: (projectId: string) => string;
265
+ readonly deleteCommentOnProject: (projectId: string, commentId: string) => string;
266
+ readonly bookmarkProject: (projectId: string) => string;
267
+ readonly unbookmarkProject: (projectId: string) => string;
268
+ readonly likeProject: (projectId: string) => string;
269
+ readonly unlikeProject: (projectId: string) => string;
270
+ readonly viewProject: (projectId: string) => string;
271
+ readonly getProjectComments: (projectId: string) => string;
272
+ readonly getProjectLikes: (projectId: string) => string;
273
+ readonly getProjectBookmarks: (projectId: string) => string;
274
+ readonly getProjectViews: (projectId: string) => string;
275
+ readonly getProjectUser: (projectId: string) => string;
276
+ };
277
+ };
@@ -0,0 +1,268 @@
1
+ "use strict";
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;
4
+ exports.ROLES = {
5
+ CREATIVE: "CREATIVE",
6
+ BRAND: "BRAND",
7
+ INVESTOR: "INVESTOR",
8
+ ADMIN: "ADMIN",
9
+ };
10
+ exports.USER_STATUSES = {
11
+ ACTIVE: "ACTIVE",
12
+ SUSPENDED: "SUSPENDED",
13
+ DELETED: "DELETED",
14
+ };
15
+ exports.CLIENT_TYPES = {
16
+ CREATIVE: "CREATIVE",
17
+ BRAND: "BRAND",
18
+ NONE: "NONE",
19
+ };
20
+ exports.EXPERIENCE_LEVELS = {
21
+ YEAR_0_1: "0-1 year",
22
+ YEAR_1_3: "1-3 years",
23
+ YEAR_3_5: "3-5 years",
24
+ YEAR_5_PLUS: "5+ years",
25
+ };
26
+ exports.ONBOARDING_PAGES = {
27
+ EMAIL_VERIFICATION: "EMAIL_VERIFICATION",
28
+ USERNAME_SELECTION: "USERNAME_SELECTION",
29
+ ACCOUNT_TYPE_SELECTION: "ACCOUNT_TYPE_SELECTION",
30
+ CREATIVE_PROFILE_DETAILS: "CREATIVE_PROFILE_DETAILS",
31
+ CREATIVE_PROFILE_CUSTOMIZE_FEED: "CREATIVE_PROFILE_CUSTOMIZE_FEED",
32
+ CREATIVE_PROFILE_PORTFOLIO: "CREATIVE_PROFILE_PORTFOLIO",
33
+ BRAND_PROFILE_DETAILS: "BRAND_PROFILE_DETAILS",
34
+ BRAND_PROFILE_CUSTOMIZE_FEED: "BRAND_PROFILE_CUSTOMIZE_FEED",
35
+ BRAND_PROFILE_PORTFOLIO: "BRAND_PROFILE_PORTFOLIO",
36
+ INVESTOR_PROFILE_DETAILS: "INVESTOR_PROFILE_DETAILS",
37
+ INVESTOR_INVESTMENT_FOCUS: "INVESTOR_INVESTMENT_FOCUS",
38
+ INVESTOR_VERIFICATION: "INVESTOR_VERIFICATION",
39
+ DONE: "DONE",
40
+ };
41
+ exports.INVESTOR_TYPES = {
42
+ ANGEL_INVESTOR: "Angel Investor",
43
+ VENTURE_CAPITALIST: "Venture Capitalist",
44
+ PRIVATE_EQUITY_FIRM: "Private Equity Firm",
45
+ VENTURE_DEBT_PROVIDER: "Venture Debt Provider",
46
+ BANK: "Bank",
47
+ CONVERTIBLE_NOTE_INVESTOR: "Convertible Note Investor",
48
+ REVENUE_BASED_FINANCING_INVESTOR: "Revenue Based Financing Investor",
49
+ CORPORATE_VENTURE_CAPITALIST: "Corporate Venture Capitalist",
50
+ GOVERNMENT: "Government",
51
+ SOCIAL_IMPACT_INVESTOR: "Social Impact Investor",
52
+ };
53
+ exports.INVESTMENT_SIZES = {
54
+ UNDER_5K: "Under 5k USD",
55
+ BETWEEN_5K_25K: "5k - 25k USD",
56
+ BETWEEN_25K_100K: "25k - 100k USD",
57
+ BETWEEN_100K_500K: "100k - 500k USD",
58
+ BETWEEN_500K_1M: "500k - 1M USD",
59
+ OVER_1M: "1M+ USD",
60
+ };
61
+ exports.GEOGRAPHIC_FOCUS = {
62
+ AFRICA: "Africa",
63
+ ASIA: "Asia",
64
+ EUROPE: "Europe",
65
+ NORTH_AMERICA: "North America",
66
+ SOUTH_AMERICA: "South America",
67
+ MIDDLE_EAST: "Middle East",
68
+ OCEANIA: "Oceania",
69
+ UK: "United Kingdom (UK)",
70
+ US: "United States (US)",
71
+ GLOBAL: "Global",
72
+ OTHER: "Other",
73
+ };
74
+ exports.INVESTOR_VERIFICATION_DOCUMENT_STATUSES = {
75
+ PENDING: "PENDING",
76
+ APPROVED: "APPROVED",
77
+ REJECTED: "REJECTED",
78
+ };
79
+ exports.INVESTOR_VERIFICATION_DOCUMENT_TYPES = {
80
+ ID_PROOF: "ID_PROOF",
81
+ BANK_STATEMENT: "BANK_STATEMENT",
82
+ TAX_DOCUMENT: "TAX_DOCUMENT",
83
+ BUSINESS_REGISTRATION: "BUSINESS_REGISTRATION",
84
+ OTHER_CERTIFICATE: "OTHER_CERTIFICATE",
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
+ exports.API_ROUTES = {
96
+ healthCheck: "/health",
97
+ username: {
98
+ base: "/usernames",
99
+ checkAvailability: "/:username/availability",
100
+ },
101
+ personal: {
102
+ base: "/me",
103
+ getUser: "",
104
+ getProfile: "/profile",
105
+ getProjects: "/projects",
106
+ getProjectBookmarks: "/project-bookmarks",
107
+ getFollowers: "/followers",
108
+ getFollowing: "/following",
109
+ },
110
+ user: {
111
+ base: "/users",
112
+ getUser: "/:value",
113
+ getProfile: "/:value/profile",
114
+ getProjects: "/:value/projects",
115
+ getFollowers: "/:userId/followers",
116
+ getFollowing: "/:userId/following",
117
+ followUser: "/:userId/follow",
118
+ unfollowUser: "/:userId/unfollow",
119
+ reserveUsername: "/reserve-username",
120
+ },
121
+ redirect: {
122
+ base: "/redirect",
123
+ passwordReset: "/password-reset",
124
+ verifiedUser: "/verified-user",
125
+ googleProfile: "/google-profile",
126
+ newGoogleProfile: "/new-google-profile",
127
+ },
128
+ file: {
129
+ base: "/files",
130
+ getPresignedUploadUrl: "/get-upload-url",
131
+ getPresignedDownloadUrl: "/:fileId/download-url",
132
+ getPublicUrl: "/:fileId/public-url",
133
+ createFile: "",
134
+ deleteFile: "/:fileId",
135
+ },
136
+ disciplines: {
137
+ base: "/disciplines",
138
+ getDisciplines: "",
139
+ getSingleDiscipline: "/:slug",
140
+ addDisciplines: "",
141
+ deleteDiscipline: "/:slug",
142
+ },
143
+ creatives: {
144
+ base: "/creatives",
145
+ createCreative: "",
146
+ getCreative: "/:value",
147
+ updateCreative: "",
148
+ },
149
+ brands: {
150
+ base: "/brands",
151
+ createBrand: "",
152
+ getBrand: "/:value",
153
+ updateBrand: "",
154
+ },
155
+ investors: {
156
+ base: "/investors",
157
+ createInvestor: "",
158
+ getInvestor: "/:value",
159
+ updateInvestor: "",
160
+ },
161
+ projects: {
162
+ base: "/projects",
163
+ createProject: "",
164
+ updateProject: "",
165
+ listProjects: "",
166
+ getProject: "/:projectId",
167
+ deleteProject: "/:projectId",
168
+ commentOnProject: "/:projectId/comment",
169
+ deleteCommentOnProject: "/:projectId/comments/:commentId",
170
+ bookmarkProject: "/:projectId/bookmark",
171
+ unbookmarkProject: "/:projectId/unbookmark",
172
+ likeProject: "/:projectId/like",
173
+ unlikeProject: "/:projectId/unlike",
174
+ viewProject: "/:projectId/view",
175
+ getProjectComments: "/:projectId/comments",
176
+ getProjectLikes: "/:projectId/likes",
177
+ getProjectBookmarks: "/:projectId/bookmarks",
178
+ getProjectViews: "/:projectId/views",
179
+ getProjectUser: "/:projectId/user",
180
+ },
181
+ };
182
+ exports.FRONTEND_API_ROUTES = {
183
+ healthCheck: "health",
184
+ username: {
185
+ base: "usernames",
186
+ checkAvailability: (username) => `${username}/availability`,
187
+ },
188
+ personal: {
189
+ base: "me",
190
+ getUser: "",
191
+ getProfile: "profile",
192
+ getProjects: "projects",
193
+ getProjectBookmarks: "project-bookmarks",
194
+ getFollowers: "followers",
195
+ getFollowing: "following",
196
+ },
197
+ user: {
198
+ base: "users",
199
+ getUser: (value) => `${value}`,
200
+ getProfile: (value) => `${value}/profile`,
201
+ getProjects: (value) => `${value}/projects`,
202
+ getFollowers: (userId) => `${userId}/followers`,
203
+ getFollowing: (userId) => `${userId}/following`,
204
+ followUser: (userId) => `${userId}/follow`,
205
+ unfollowUser: (userId) => `${userId}/unfollow`,
206
+ reserveUsername: "reserve-username",
207
+ },
208
+ redirect: {
209
+ base: "redirect",
210
+ passwordReset: "password-reset",
211
+ verifiedUser: "verified-user",
212
+ googleProfile: "google-profile",
213
+ newGoogleProfile: "new-google-profile",
214
+ },
215
+ file: {
216
+ base: "files",
217
+ getPresignedUploadUrl: "get-upload-url",
218
+ getPresignedDownloadUrl: (fileId) => `${fileId}/download-url`,
219
+ getPublicUrl: (fileId) => `${fileId}/public-url`,
220
+ createFile: "",
221
+ deleteFile: (fileId) => `${fileId}`,
222
+ },
223
+ disciplines: {
224
+ base: "disciplines",
225
+ getDisciplines: "",
226
+ getSingleDiscipline: (slug) => `${slug}`,
227
+ addDisciplines: "",
228
+ deleteDiscipline: (slug) => `${slug}`,
229
+ },
230
+ creatives: {
231
+ base: "creatives",
232
+ createCreative: "",
233
+ getCreative: (value) => `${value}`,
234
+ updateCreative: "",
235
+ },
236
+ brands: {
237
+ base: "brands",
238
+ createBrand: "",
239
+ getBrand: (value) => `${value}`,
240
+ updateBrand: "",
241
+ },
242
+ investors: {
243
+ base: "investors",
244
+ createInvestor: "",
245
+ getInvestor: (value) => `${value}`,
246
+ updateInvestor: "",
247
+ },
248
+ projects: {
249
+ base: "projects",
250
+ createProject: "",
251
+ updateProject: "",
252
+ listProjects: "",
253
+ getProject: (projectId) => `${projectId}`,
254
+ deleteProject: (projectId) => `${projectId}`,
255
+ commentOnProject: (projectId) => `${projectId}/comment`,
256
+ deleteCommentOnProject: (projectId, commentId) => `${projectId}/comments/${commentId}`,
257
+ bookmarkProject: (projectId) => `${projectId}/bookmark`,
258
+ unbookmarkProject: (projectId) => `${projectId}/unbookmark`,
259
+ likeProject: (projectId) => `${projectId}/like`,
260
+ unlikeProject: (projectId) => `${projectId}/unlike`,
261
+ viewProject: (projectId) => `${projectId}/view`,
262
+ getProjectComments: (projectId) => `${projectId}/comments`,
263
+ getProjectLikes: (projectId) => `${projectId}/likes`,
264
+ getProjectBookmarks: (projectId) => `${projectId}/bookmarks`,
265
+ getProjectViews: (projectId) => `${projectId}/views`,
266
+ getProjectUser: (projectId) => `${projectId}/user`,
267
+ },
268
+ };
package/dist/index.js CHANGED
@@ -1 +1,17 @@
1
- export * from "./types/index";
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./types/index"), exports);
@@ -0,0 +1,84 @@
1
+ import { z } from "@hono/zod-openapi";
2
+ export declare const BrandEntitySchema: z.ZodObject<{
3
+ id: z.ZodCUID2;
4
+ userId: z.ZodCUID2;
5
+ brandName: z.ZodString;
6
+ searchVector: z.ZodOptional<z.ZodString>;
7
+ bio: z.ZodOptional<z.ZodString>;
8
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
9
+ createdAt: z.ZodISODateTime;
10
+ updatedAt: z.ZodISODateTime;
11
+ }, z.core.$strip>;
12
+ export declare const CreateBrandProfileSchema: z.ZodObject<{
13
+ brandName: z.ZodString;
14
+ bio: z.ZodDefault<z.ZodOptional<z.ZodString>>;
15
+ tags: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
16
+ }, z.core.$strip>;
17
+ export declare const UpdateBrandProfileSchema: z.ZodObject<{
18
+ brandName: z.ZodOptional<z.ZodString>;
19
+ bio: z.ZodOptional<z.ZodString>;
20
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
21
+ }, z.core.$strip>;
22
+ export declare const GetBrandParamsSchema: z.ZodObject<{
23
+ value: z.ZodCUID2;
24
+ }, z.core.$strip>;
25
+ export declare const GetBrandQuerySchema: z.ZodObject<{
26
+ by: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
27
+ id: "id";
28
+ userId: "userId";
29
+ }>>>;
30
+ }, z.core.$strip>;
31
+ export declare const CreateBrandEndpointResponseSchema: z.ZodObject<{
32
+ id: z.ZodCUID2;
33
+ userId: z.ZodCUID2;
34
+ brandName: z.ZodString;
35
+ searchVector: z.ZodOptional<z.ZodString>;
36
+ bio: z.ZodOptional<z.ZodString>;
37
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
38
+ createdAt: z.ZodISODateTime;
39
+ updatedAt: z.ZodISODateTime;
40
+ }, z.core.$strip>;
41
+ export declare const GetBrandEndpointResponseSchema: z.ZodObject<{
42
+ id: z.ZodCUID2;
43
+ userId: z.ZodCUID2;
44
+ brandName: z.ZodString;
45
+ searchVector: z.ZodOptional<z.ZodString>;
46
+ bio: z.ZodOptional<z.ZodString>;
47
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
48
+ createdAt: z.ZodISODateTime;
49
+ updatedAt: z.ZodISODateTime;
50
+ user: z.ZodObject<{
51
+ id: z.ZodCUID2;
52
+ name: z.ZodOptional<z.ZodString>;
53
+ email: z.ZodEmail;
54
+ image: z.ZodOptional<z.ZodString>;
55
+ username: z.ZodOptional<z.ZodString>;
56
+ role: z.ZodEnum<{
57
+ CREATIVE: "CREATIVE";
58
+ BRAND: "BRAND";
59
+ INVESTOR: "INVESTOR";
60
+ ADMIN: "ADMIN";
61
+ }>;
62
+ }, z.core.$strip>;
63
+ }, z.core.$strip>;
64
+ export declare const UpdateBrandEndpointResponseSchema: z.ZodObject<{
65
+ id: z.ZodCUID2;
66
+ userId: z.ZodCUID2;
67
+ brandName: z.ZodString;
68
+ searchVector: z.ZodOptional<z.ZodString>;
69
+ bio: z.ZodOptional<z.ZodString>;
70
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
71
+ createdAt: z.ZodISODateTime;
72
+ updatedAt: z.ZodISODateTime;
73
+ }, z.core.$strip>;
74
+ export type CreateBrandDto = z.infer<typeof CreateBrandProfileSchema> & {
75
+ userId: string;
76
+ };
77
+ export type UpdateBrandDto = z.infer<typeof UpdateBrandProfileSchema> & {
78
+ userId: string;
79
+ };
80
+ export type GetBrandParams = z.infer<typeof GetBrandParamsSchema>;
81
+ export type GetBrandQuery = z.infer<typeof GetBrandQuerySchema>;
82
+ export type CreateBrandEndpointResponse = z.infer<typeof CreateBrandEndpointResponseSchema>;
83
+ export type GetBrandEndpointResponse = z.infer<typeof GetBrandEndpointResponseSchema>;
84
+ export type UpdateBrandEndpointResponse = z.infer<typeof UpdateBrandEndpointResponseSchema>;