portfolio-types 3.0.0 → 6.0.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.
package/lib/index.d.ts CHANGED
@@ -3,78 +3,107 @@ export interface PortfolioBaseEntity {
3
3
  title: string;
4
4
  visibility: boolean;
5
5
  position: number;
6
- createdAt: Date;
7
- updatedAt: Date;
6
+ createdAt: string;
7
+ updatedAt: string;
8
8
  }
9
- export interface PortfolioFile extends Omit<PortfolioBaseEntity, 'visibility' | 'position'> {
9
+ export interface PortfolioAuthor {
10
+ id: string;
11
+ username: string;
12
+ }
13
+ export interface PortfolioFile extends Viewable, Omit<PortfolioBaseEntity, 'visibility' | 'position'> {
10
14
  originalName: string;
11
- storageKey: string;
15
+ downloadUrl: string;
12
16
  mimeType: string;
13
17
  size: number;
14
18
  }
15
19
  export type PortfolioFileList = Array<PortfolioFile>;
16
- export interface PortfolioYourLanguage extends Omit<PortfolioBaseEntity, 'visibility' | 'position'>, Colorable {
20
+ export interface PortfolioYourLanguage extends Viewable, Omit<PortfolioBaseEntity, 'visibility' | 'position'>, Colorable {
17
21
  level: string;
22
+ author: PortfolioAuthor;
18
23
  }
19
24
  export type PortfolioYourLanguageList = Array<PortfolioYourLanguage>;
20
- export interface PortfolioTool extends Omit<PortfolioBaseEntity, 'visibility' | 'position'>, Colorable {
25
+ export interface PortfolioTool extends Viewable, Omit<PortfolioBaseEntity, 'visibility' | 'position'>, Colorable {
21
26
  file: PortfolioFile;
27
+ author: PortfolioAuthor;
22
28
  }
23
29
  export type PortfolioToolList = Array<PortfolioTool>;
24
- export interface PortfolioSkillCategory extends Omit<PortfolioBaseEntity, 'visibility' | 'position'>, Colorable {
30
+ export interface PortfolioSkillCategory extends Viewable, Omit<PortfolioBaseEntity, 'visibility' | 'position'>, Colorable {
31
+ author: PortfolioAuthor;
25
32
  }
26
33
  export type PortfolioSkillCategoryList = Array<PortfolioSkillCategory>;
27
- export interface PortfolioSocial extends PortfolioBaseEntity {
34
+ export interface PortfolioSocial extends Viewable, PortfolioBaseEntity {
28
35
  url: string;
29
36
  file: PortfolioFile;
37
+ author: PortfolioAuthor;
30
38
  }
31
39
  export type PortfolioSocialList = Array<PortfolioSocial>;
32
- export interface PortfolioSkill extends PortfolioBaseEntity, Colorable {
40
+ export interface PortfolioSkill extends Viewable, PortfolioBaseEntity, Colorable {
41
+ /** Proficiency level as an integer from 0 to 100. */
33
42
  level: number;
34
43
  categoryList: PortfolioSkillCategoryList;
35
- tool: PortfolioTool;
36
- isPrimary?: boolean;
44
+ tool: PortfolioTool | null;
45
+ isPrimary: boolean;
46
+ author: PortfolioAuthor;
37
47
  }
38
48
  export type PortfolioSkillList = Array<PortfolioSkill>;
39
- export interface PortfolioProject extends PortfolioBaseEntity {
49
+ export interface PortfolioProject extends Viewable, PortfolioBaseEntity {
40
50
  description: string;
41
- releasedAt: Date;
42
- primaryTool: PortfolioTool;
43
- toolList: PortfolioToolList;
44
- fileList: PortfolioFileList;
45
- demoUrl?: string;
46
- repositoryUrl?: string;
51
+ releasedAt: string;
52
+ tool: PortfolioTool | null;
53
+ tools: PortfolioToolList;
54
+ files: PortfolioFileList;
55
+ demoUrl: string | null;
56
+ repositoryUrl: string | null;
57
+ author: PortfolioAuthor;
47
58
  }
48
59
  export type PortfolioProjectList = Array<PortfolioProject>;
49
- export interface PortfolioCertificate extends PortfolioBaseEntity {
50
- issuedAt: Date;
60
+ export interface PortfolioCertificate extends Viewable, PortfolioBaseEntity {
61
+ issuedAt: string;
51
62
  file: PortfolioFile;
63
+ author: PortfolioAuthor;
52
64
  }
53
65
  export type PortfolioCertificateList = Array<PortfolioCertificate>;
54
- export interface PortfolioDocument extends PortfolioBaseEntity {
66
+ export interface PortfolioDocument extends Viewable, PortfolioBaseEntity {
55
67
  language: string;
68
+ author: PortfolioAuthor;
56
69
  }
57
70
  export type PortfolioDocumentList = Array<PortfolioDocument>;
58
- export interface PortfolioPersonalInfo {
71
+ export interface PortfolioPersonalInfo extends Viewable, Omit<PortfolioBaseEntity, 'title' | 'visibility' | 'position'> {
59
72
  firstName: string;
60
73
  lastName: string;
61
74
  email: string;
62
75
  aboutMe: string;
63
76
  yourLanguageList: PortfolioYourLanguageList;
64
- experienceYears?: number;
65
- specialization?: string;
66
- position?: string;
67
- birthDate?: Date;
68
- biography?: string;
69
- country?: string;
70
- zipCode?: string;
71
- town?: string;
72
- phone?: string;
77
+ experienceYears: number | null;
78
+ specialization: string | null;
79
+ position: string | null;
80
+ birthDate: string | null;
81
+ biography: string | null;
82
+ country: string | null;
83
+ zipCode: string | null;
84
+ town: string | null;
85
+ phone: string | null;
86
+ author: PortfolioAuthor;
87
+ }
88
+ export declare enum PortfolioUserRole {
89
+ SUPER_ADMIN = "SUPER_ADMIN",
90
+ ADMIN = "ADMIN",
91
+ USER = "USER"
92
+ }
93
+ export interface PortfolioUser extends Omit<PortfolioBaseEntity, 'title' | 'visibility' | 'position'> {
94
+ username: string;
95
+ email: string;
96
+ roles: PortfolioUserRole[];
97
+ isAccountDisabled: boolean;
98
+ isEmailVerified: boolean;
99
+ passwordChangedAt: string | null;
100
+ avatar: PortfolioFile | null;
73
101
  }
102
+ export type PortfolioUserList = Array<PortfolioUser>;
74
103
  interface Colorable {
75
- color?: HexColor;
104
+ color: `#${string}` | null;
76
105
  }
77
- interface HexColor {
78
- hex: `#${string}`;
106
+ interface Viewable {
107
+ isPublic: boolean;
79
108
  }
80
109
  export {};
package/lib/index.js CHANGED
@@ -1,2 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PortfolioUserRole = void 0;
4
+ // -------
5
+ var PortfolioUserRole;
6
+ (function (PortfolioUserRole) {
7
+ PortfolioUserRole["SUPER_ADMIN"] = "SUPER_ADMIN";
8
+ PortfolioUserRole["ADMIN"] = "ADMIN";
9
+ PortfolioUserRole["USER"] = "USER";
10
+ })(PortfolioUserRole || (exports.PortfolioUserRole = PortfolioUserRole = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "portfolio-types",
3
- "version": "3.0.0",
3
+ "version": "6.0.0",
4
4
  "private": false,
5
5
  "description": "Types for the Portfolio project",
6
6
  "keywords": [
@@ -35,6 +35,6 @@
35
35
  "test": "echo \"Error: no test specified\" && exit 1"
36
36
  },
37
37
  "devDependencies": {
38
- "typescript": "^5.9.3"
38
+ "typescript": "^6.0.3"
39
39
  }
40
40
  }