onecore 0.6.7 → 0.6.8
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/package.json +1 -1
- package/src/db.ts +3 -0
- package/src/job.ts +50 -71
- package/src/metadata.ts +2 -0
package/package.json
CHANGED
package/src/db.ts
CHANGED
|
@@ -20,6 +20,9 @@ export interface Executor {
|
|
|
20
20
|
execute(sql: string, args?: any[]): Promise<number>
|
|
21
21
|
executeBatch(statements: Statement[], requireFirstAffected?: boolean): Promise<number>
|
|
22
22
|
query<T>(sql: string, args?: any[], m?: StringMap, bools?: Attribute[]): Promise<T[]>
|
|
23
|
+
queryOne<T>(sql: string, args?: any[], m?: StringMap, bools?: Attribute[]): Promise<T | null>
|
|
24
|
+
executeScalar<T>(sql: string, args?: any[]): Promise<T | null>
|
|
25
|
+
count(sql: string, args?: any[]): Promise<number>
|
|
23
26
|
}
|
|
24
27
|
export interface Transaction extends Executor {
|
|
25
28
|
commit(): Promise<void>
|
package/src/job.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DateRange, Filter,
|
|
1
|
+
import { DateRange, Filter, TimeRange } from "./model";
|
|
2
2
|
|
|
3
3
|
export interface Attachment {
|
|
4
4
|
originalFilename: string;
|
|
@@ -7,37 +7,6 @@ export interface Attachment {
|
|
|
7
7
|
size: number;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
export interface Article {
|
|
11
|
-
id: string
|
|
12
|
-
slug: string
|
|
13
|
-
title: string
|
|
14
|
-
description?: string
|
|
15
|
-
publishedAt?: Date
|
|
16
|
-
tags?: string[]
|
|
17
|
-
thumbnail?: string
|
|
18
|
-
status?: string
|
|
19
|
-
createdAt?: Date
|
|
20
|
-
authorId?: string
|
|
21
|
-
savedAt?: Date
|
|
22
|
-
}
|
|
23
|
-
export interface ArticleFilter extends Filter {
|
|
24
|
-
id?: string
|
|
25
|
-
slug?: string
|
|
26
|
-
title?: string
|
|
27
|
-
description?: string
|
|
28
|
-
status?: string
|
|
29
|
-
publishedAt: TimeRange
|
|
30
|
-
tags?: string[]
|
|
31
|
-
authorId?: string
|
|
32
|
-
userId?: string
|
|
33
|
-
isSaved?: boolean
|
|
34
|
-
}
|
|
35
|
-
export interface ArticleRepository {
|
|
36
|
-
search(filter: ArticleFilter, limit: number, page?: number, fields?: string[]): Promise<SearchResult<Article>>
|
|
37
|
-
load(slug: string, userId?: string): Promise<Article | null>
|
|
38
|
-
getIdBySlug(slug: string): Promise<string>
|
|
39
|
-
}
|
|
40
|
-
|
|
41
10
|
export interface Achievement {
|
|
42
11
|
subject: string;
|
|
43
12
|
description: string;
|
|
@@ -46,17 +15,7 @@ export interface Skill {
|
|
|
46
15
|
skill: string;
|
|
47
16
|
hirable: boolean;
|
|
48
17
|
}
|
|
49
|
-
|
|
50
|
-
userId?: string;
|
|
51
|
-
username?: string;
|
|
52
|
-
email?: string;
|
|
53
|
-
displayName?: string;
|
|
54
|
-
dateOfBirth?: DateRange;
|
|
55
|
-
status?: string[]|string;
|
|
56
|
-
interests?: string[];
|
|
57
|
-
skills?: Skill[];
|
|
58
|
-
achievements?: Achievement[];
|
|
59
|
-
}
|
|
18
|
+
|
|
60
19
|
export interface RoleFilter extends Filter {
|
|
61
20
|
roleId?: string;
|
|
62
21
|
roleName?: string;
|
|
@@ -91,35 +50,50 @@ export interface ReviewCommentFilter extends Filter {
|
|
|
91
50
|
time?: DateRange;
|
|
92
51
|
updatedAt?: DateRange;
|
|
93
52
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
rate: number
|
|
97
|
-
rate1: number
|
|
98
|
-
rate2: number
|
|
99
|
-
rate3: number
|
|
100
|
-
rate4: number
|
|
101
|
-
rate5: number
|
|
102
|
-
count: number;
|
|
103
|
-
score: number;
|
|
53
|
+
|
|
54
|
+
export interface Rate {
|
|
55
|
+
rate: number
|
|
56
|
+
rate1: number
|
|
57
|
+
rate2: number
|
|
58
|
+
rate3: number
|
|
59
|
+
rate4: number
|
|
60
|
+
rate5: number
|
|
104
61
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
count: number;
|
|
119
|
-
score: number;
|
|
62
|
+
|
|
63
|
+
export interface Article {
|
|
64
|
+
id: string
|
|
65
|
+
slug: string
|
|
66
|
+
title: string
|
|
67
|
+
description?: string
|
|
68
|
+
publishedAt?: Date
|
|
69
|
+
tags?: string[]
|
|
70
|
+
thumbnail?: string
|
|
71
|
+
status?: string
|
|
72
|
+
createdAt?: Date
|
|
73
|
+
authorId?: string
|
|
74
|
+
savedAt?: Date
|
|
120
75
|
}
|
|
121
|
-
|
|
122
|
-
|
|
76
|
+
|
|
77
|
+
export interface User {
|
|
78
|
+
id: string
|
|
79
|
+
username: string
|
|
80
|
+
email?: string
|
|
81
|
+
phone?: string
|
|
82
|
+
dateOfBirth?: Date
|
|
83
|
+
displayName?: string
|
|
84
|
+
status?: string
|
|
85
|
+
imageURL?: string
|
|
86
|
+
coverURL?: string
|
|
87
|
+
headline?: string
|
|
88
|
+
bio?: string
|
|
89
|
+
website?: string
|
|
90
|
+
occupation?: string
|
|
91
|
+
company?: string
|
|
92
|
+
location?: string
|
|
93
|
+
|
|
94
|
+
followedAt?: Date
|
|
95
|
+
followerCount?: number
|
|
96
|
+
followingCount?: number
|
|
123
97
|
}
|
|
124
98
|
|
|
125
99
|
export interface Company {
|
|
@@ -153,8 +127,11 @@ export interface Job {
|
|
|
153
127
|
skills?: string[]
|
|
154
128
|
minSalary?: number
|
|
155
129
|
maxSalary?: number
|
|
156
|
-
companyId?: string
|
|
157
130
|
status: string
|
|
131
|
+
companyId?: string
|
|
132
|
+
companyName?: string
|
|
133
|
+
logo?: string
|
|
134
|
+
savedAt?: Date
|
|
158
135
|
}
|
|
159
136
|
export interface JobFilter extends Filter {
|
|
160
137
|
id?: string
|
|
@@ -169,4 +146,6 @@ export interface JobFilter extends Filter {
|
|
|
169
146
|
applicantCount?: number
|
|
170
147
|
companyId?: string
|
|
171
148
|
status?: string
|
|
149
|
+
userId?: string
|
|
150
|
+
isSaved?: boolean
|
|
172
151
|
}
|
package/src/metadata.ts
CHANGED