@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,60 @@
1
+ import type { OnboardingPage, Role, UserStatus } from "../constants";
2
+ import type { UserSocialGraphEntity } from "./common";
3
+ import type { ProjectBookmarkEntity, ProjectEntity } from "./project";
4
+
5
+ export type BaseUserEntity = {
6
+ id: string;
7
+ email: string;
8
+ emailVerified: boolean;
9
+ name?: string;
10
+ image?: string;
11
+ username?: string;
12
+ displayUsername?: string;
13
+ role: Role;
14
+ status: UserStatus;
15
+ onboardingPage: OnboardingPage;
16
+ createdAt: Date;
17
+ updatedAt: Date;
18
+ };
19
+
20
+ export type MinimalUser = Pick<
21
+ BaseUserEntity,
22
+ "id" | "name" | "email" | "image" | "username" | "role"
23
+ >;
24
+
25
+ export type UserEntity = BaseUserEntity & UserSocialGraphEntity;
26
+
27
+ export type UserProfileEntity = UserEntity & {
28
+ profileType?: "creative" | "brand" | "investor";
29
+ bio?: string;
30
+ location?: string;
31
+ experienceLevel?: string;
32
+ disciplines?: any[];
33
+ tags?: any[];
34
+ brandName?: string;
35
+ websiteURL?: string;
36
+ investorType?: string;
37
+ investmentSize?: string;
38
+ geographicFocus?: string;
39
+ };
40
+
41
+ export type UserWithProjectsEntity = {
42
+ userId: string;
43
+ projects: Omit<ProjectEntity, "overview">[];
44
+ };
45
+
46
+ export type UserWithProjectBookmarksEntity = {
47
+ userId: string;
48
+ projectBookmarks: (ProjectBookmarkEntity & {
49
+ project: Pick<
50
+ ProjectEntity,
51
+ | "id"
52
+ | "title"
53
+ | "description"
54
+ | "tags"
55
+ | "startDate"
56
+ | "endDate"
57
+ | "imagePlaceholderUrl"
58
+ >;
59
+ })[];
60
+ };
package/tsconfig.json CHANGED
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "target": "ESNext",
4
- "module": "ESNext",
4
+ "module": "NodeNext",
5
+ "moduleResolution": "NodeNext",
5
6
  "declaration": true,
6
- "baseUrl": ".",
7
7
  "outDir": "dist",
8
- "strict": true
8
+ "strict": true,
9
+ "esModuleInterop": true,
10
+ "skipLibCheck": true
9
11
  },
10
12
  "include": ["src"]
11
13
  }
@@ -1,109 +0,0 @@
1
- export enum RoleEnum {
2
- CREATIVE = "CREATIVE",
3
- BRAND = "BRAND",
4
- INVESTOR = "INVESTOR",
5
- ADMIN = "ADMIN",
6
- }
7
-
8
- export enum UserStatusEnum {
9
- ACTIVE = "ACTIVE",
10
- SUSPENDED = "SUSPENDED",
11
- DELETED = "DELETED",
12
- }
13
-
14
- export enum ClientTypeEnum {
15
- CREATIVE = "CREATIVE",
16
- BRAND = "BRAND",
17
- NONE = "NONE",
18
- }
19
-
20
- export enum ExperienceLevelEnum {
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
-
27
- export enum OnboardingPageEnum {
28
- ACCOUNT_TYPE_SELECTION = "ACCOUNT_TYPE_SELECTION",
29
- USERNAME_SELECTION = "USERNAME_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
-
42
- export enum FileVisibilityEnum {
43
- PUBLIC = "PUBLIC",
44
- PRIVATE = "PRIVATE",
45
- }
46
-
47
- export enum FileContentTypeEnum {
48
- IMAGE = "IMAGE",
49
- VIDEO = "VIDEO",
50
- DOCUMENT = "DOCUMENT",
51
- AUDIO = "AUDIO",
52
- OTHER = "OTHER",
53
- }
54
-
55
- export enum InvestorTypeEnum {
56
- ANGEL_INVESTOR = "Angel Investor",
57
- VENTURE_CAPITALIST = "Venture Capitalist",
58
- PRIVATE_EQUITY_FIRM = "Private Equity Firm",
59
- VENTURE_DEBT_PROVIDER = "Venture Debt Provider",
60
- BANK = "Bank",
61
- CONVERTIBLE_NOTE_INVESTOR = "Convertible Note Investor",
62
- REVENUE_BASED_FINANCING_INVESTOR = "Revenue Based Financing Investor",
63
- CORPORATE_VENTURE_CAPITALIST = "Corporate Venture Capitalist",
64
- GOVERNMENT = "Government",
65
- SOCIAL_IMPACT_INVESTOR = "Social Impact Investor",
66
- }
67
-
68
- export enum InvestmentSizeEnum {
69
- UNDER_5K = "Under 5k USD",
70
- BETWEEN_5K_25K = "5k - 25k USD",
71
- BETWEEN_25K_100K = "25k - 100k USD",
72
- BETWEEN_100K_500K = "100k - 500k USD",
73
- BETWEEN_500K_1M = "500k - 1M USD",
74
- OVER_1M = "1M+ USD",
75
- }
76
-
77
- export enum GeographicFocusEnum {
78
- AFRICA = "Africa",
79
- ASIA = "Asia",
80
- EUROPE = "Europe",
81
- NORTH_AMERICA = "North America",
82
- SOUTH_AMERICA = "South America",
83
- MIDDLE_EAST = "Middle East",
84
- OCEANIA = "Oceania",
85
- UK = "United Kingdom (UK)",
86
- US = "United States (US)",
87
- GLOBAL = "Global",
88
- OTHER = "Other",
89
- }
90
-
91
- export enum InvestorVerificationDocumentStatusEnum {
92
- PENDING = "PENDING",
93
- APPROVED = "APPROVED",
94
- REJECTED = "REJECTED",
95
- }
96
-
97
- export enum InvestorVerificationDocumentTypeEnum {
98
- ID_PROOF = "ID_PROOF",
99
- BANK_STATEMENT = "BANK_STATEMENT",
100
- TAX_DOCUMENT = "TAX_DOCUMENT",
101
- BUSINESS_REGISTRATION = "BUSINESS_REGISTRATION",
102
- OTHER_CERTIFICATE = "OTHER_CERTIFICATE",
103
- }
104
-
105
- export enum CommentStatusEnum {
106
- ACTIVE = "ACTIVE",
107
- HIDDEN = "HIDDEN",
108
- DELETED = "DELETED",
109
- }