@betterinternship/schema 1.11.0 → 1.12.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/package.json +1 -1
- package/dist/db.d.ts +0 -16
- package/dist/db.doc.types.d.ts +0 -107
- package/dist/db.doc.types.js +0 -3
- package/dist/db.doc.types.js.map +0 -1
- package/dist/db.internal.types.d.ts +0 -77
- package/dist/db.internal.types.js +0 -3
- package/dist/db.internal.types.js.map +0 -1
- package/dist/db.internship.types.d.ts +0 -96
- package/dist/db.internship.types.js +0 -3
- package/dist/db.internship.types.js.map +0 -1
- package/dist/db.iom.types.d.ts +0 -312
- package/dist/db.iom.types.js +0 -3
- package/dist/db.iom.types.js.map +0 -1
- package/dist/db.js +0 -67
- package/dist/db.js.map +0 -1
- package/dist/db.types.d.ts +0 -353
- package/dist/db.types.js +0 -3
- package/dist/db.types.js.map +0 -1
- package/dist/env.d.ts +0 -1
- package/dist/env.js +0 -7
- package/dist/env.js.map +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/index.js +0 -25
- package/dist/index.js.map +0 -1
- package/dist/repository/base.d.ts +0 -57
- package/dist/repository/base.js +0 -388
- package/dist/repository/base.js.map +0 -1
- package/dist/repository/errors.d.ts +0 -1
- package/dist/repository/errors.js +0 -16
- package/dist/repository/errors.js.map +0 -1
- package/dist/repository/factories.d.ts +0 -14
- package/dist/repository/factories.js +0 -45
- package/dist/repository/factories.js.map +0 -1
- package/dist/repository/index.d.ts +0 -3
- package/dist/repository/index.js +0 -20
- package/dist/repository/index.js.map +0 -1
- package/dist/repository/json-columns.d.ts +0 -5
- package/dist/repository/json-columns.js +0 -44
- package/dist/repository/json-columns.js.map +0 -1
- package/dist/repository/paginator.d.ts +0 -4
- package/dist/repository/paginator.js +0 -3
- package/dist/repository/paginator.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
package/dist/db.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.handleDBError = exports.iomDb = exports.internalDb = exports.documentDb = exports.internshipDb = exports.db = void 0;
|
|
4
|
-
const kysely_1 = require("kysely");
|
|
5
|
-
const pg_1 = require("pg");
|
|
6
|
-
const env_1 = require("./env");
|
|
7
|
-
let pool;
|
|
8
|
-
const getPool = () => {
|
|
9
|
-
if (pool)
|
|
10
|
-
return pool;
|
|
11
|
-
const DATABASE_URL = env_1.ENV.DATABASE_URL;
|
|
12
|
-
const DATABASE_CA_CERT = env_1.ENV.DATABASE_CA_CERT;
|
|
13
|
-
if (!DATABASE_URL)
|
|
14
|
-
throw new Error("[ERROR:ENV] Missing DATABASE_URL.");
|
|
15
|
-
const isNoVerify = DATABASE_URL.includes("sslmode=no-verify");
|
|
16
|
-
if (!DATABASE_CA_CERT && !isNoVerify)
|
|
17
|
-
throw new Error("[ERROR:ENV] Missing DATABASE_CA_CERT.");
|
|
18
|
-
pool = new pg_1.Pool({
|
|
19
|
-
connectionString: DATABASE_URL,
|
|
20
|
-
ssl: isNoVerify
|
|
21
|
-
? { rejectUnauthorized: false }
|
|
22
|
-
: {
|
|
23
|
-
rejectUnauthorized: true,
|
|
24
|
-
ca: DATABASE_CA_CERT?.replace(/\\n/g, "\n"),
|
|
25
|
-
checkServerIdentity: () => undefined,
|
|
26
|
-
},
|
|
27
|
-
});
|
|
28
|
-
return pool;
|
|
29
|
-
};
|
|
30
|
-
const lazyKysely = () => {
|
|
31
|
-
let instance;
|
|
32
|
-
const build = () => (instance ??= new kysely_1.Kysely({
|
|
33
|
-
dialect: new kysely_1.PostgresDialect({ pool: getPool() }),
|
|
34
|
-
}));
|
|
35
|
-
return new Proxy({}, {
|
|
36
|
-
get(_target, prop) {
|
|
37
|
-
const inst = build();
|
|
38
|
-
const value = Reflect.get(inst, prop, inst);
|
|
39
|
-
return typeof value === "function" ? value.bind(inst) : value;
|
|
40
|
-
},
|
|
41
|
-
has(_target, prop) {
|
|
42
|
-
return Reflect.has(build(), prop);
|
|
43
|
-
},
|
|
44
|
-
getPrototypeOf() {
|
|
45
|
-
return Object.getPrototypeOf(build());
|
|
46
|
-
},
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
exports.db = lazyKysely();
|
|
50
|
-
exports.internshipDb = lazyKysely();
|
|
51
|
-
exports.documentDb = lazyKysely();
|
|
52
|
-
exports.internalDb = lazyKysely();
|
|
53
|
-
exports.iomDb = lazyKysely();
|
|
54
|
-
const handleDBError = (error, description = "") => {
|
|
55
|
-
switch (error.code) {
|
|
56
|
-
case "PGRST116":
|
|
57
|
-
throw new Error(description, { cause: "DB_RECORD_NOT_FOUND" });
|
|
58
|
-
case "23505":
|
|
59
|
-
throw new Error(description, { cause: "DB_RECORD_ALREADY_EXISTS" });
|
|
60
|
-
case "23503":
|
|
61
|
-
throw new Error(description, { cause: "DB_REFERENCED_ERROR_NOT_FOUND" });
|
|
62
|
-
default:
|
|
63
|
-
throw new Error(description, { cause: "DB_OPERATION_FAILED" });
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
exports.handleDBError = handleDBError;
|
|
67
|
-
//# sourceMappingURL=db.js.map
|
package/dist/db.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"db.js","sourceRoot":"","sources":["../lib/db.ts"],"names":[],"mappings":"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"}
|
package/dist/db.types.d.ts
DELETED
|
@@ -1,353 +0,0 @@
|
|
|
1
|
-
import type { ColumnType } from "kysely";
|
|
2
|
-
export type CareerApplicationSource = "discord" | "mass" | "normal";
|
|
3
|
-
export type CareerApplicationVisibility = "archived" | "deleted" | "visible";
|
|
4
|
-
export type CareerJobActivationEvent = "activated" | "deactivated";
|
|
5
|
-
export type CareerJobActivationSource = "employer" | "god";
|
|
6
|
-
export type CareerJobPauseReason = "dormant" | "neglected" | "unresponsive";
|
|
7
|
-
export type CareerJobWaitlistRemovalReason = "left" | "listing_deleted" | "notified";
|
|
8
|
-
export type Generated<T> = T extends ColumnType<infer S, infer I, infer U> ? ColumnType<S, I | undefined, U> : ColumnType<T, T | undefined, T>;
|
|
9
|
-
export type Int8 = ColumnType<string, bigint | number | string, bigint | number | string>;
|
|
10
|
-
export type Json = JsonValue;
|
|
11
|
-
export type JsonArray = JsonValue[];
|
|
12
|
-
export type JsonObject = {
|
|
13
|
-
[x: string]: JsonValue | undefined;
|
|
14
|
-
};
|
|
15
|
-
export type JsonPrimitive = boolean | number | string | null;
|
|
16
|
-
export type JsonValue = JsonArray | JsonObject | JsonPrimitive;
|
|
17
|
-
export type Numeric = ColumnType<string, number | string, number | string>;
|
|
18
|
-
export type Timestamp = ColumnType<Date, Date | string, Date | string>;
|
|
19
|
-
export interface CareerApplications {
|
|
20
|
-
applied_at: Generated<Timestamp>;
|
|
21
|
-
cover_letter: string | null;
|
|
22
|
-
first_viewed: Timestamp | null;
|
|
23
|
-
id: Generated<string>;
|
|
24
|
-
job_id: string | null;
|
|
25
|
-
notes: string | null;
|
|
26
|
-
resume_id: string | null;
|
|
27
|
-
review: string | null;
|
|
28
|
-
source: CareerApplicationSource | null;
|
|
29
|
-
status: Generated<number>;
|
|
30
|
-
updated_at: Generated<Timestamp | null>;
|
|
31
|
-
user_id: string | null;
|
|
32
|
-
visibility: Generated<CareerApplicationVisibility>;
|
|
33
|
-
}
|
|
34
|
-
export interface CareerApplicationsChallengeSubmission {
|
|
35
|
-
applications_id: string;
|
|
36
|
-
id: Generated<Int8>;
|
|
37
|
-
submission: string | null;
|
|
38
|
-
}
|
|
39
|
-
export interface CareerConversations {
|
|
40
|
-
created_at: Generated<Timestamp>;
|
|
41
|
-
employer_id: string;
|
|
42
|
-
id: Generated<string>;
|
|
43
|
-
user_id: string;
|
|
44
|
-
}
|
|
45
|
-
export interface CareerEmployerIomLinkRequests {
|
|
46
|
-
consumed_at: Timestamp | null;
|
|
47
|
-
created_at: Generated<Timestamp>;
|
|
48
|
-
employer_id: string;
|
|
49
|
-
expires_at: Timestamp;
|
|
50
|
-
id: Generated<string>;
|
|
51
|
-
iom_tin: string;
|
|
52
|
-
token_hash: string;
|
|
53
|
-
}
|
|
54
|
-
export interface CareerEmployers {
|
|
55
|
-
accepted_universities: Generated<string[]>;
|
|
56
|
-
accepts_non_university: Generated<boolean>;
|
|
57
|
-
created_at: Generated<Timestamp>;
|
|
58
|
-
description: string | null;
|
|
59
|
-
email: string | null;
|
|
60
|
-
id: Generated<string>;
|
|
61
|
-
industry: string | null;
|
|
62
|
-
iom_company_id: string | null;
|
|
63
|
-
is_deactivated: Generated<boolean>;
|
|
64
|
-
is_verified: Generated<boolean>;
|
|
65
|
-
job_count: Generated<number>;
|
|
66
|
-
legal_entity_name: string;
|
|
67
|
-
location: string | null;
|
|
68
|
-
logo: string | null;
|
|
69
|
-
name: string;
|
|
70
|
-
owner_user_id: string | null;
|
|
71
|
-
phone_number: string | null;
|
|
72
|
-
tin: string | null;
|
|
73
|
-
updated_at: Generated<Timestamp>;
|
|
74
|
-
website: string | null;
|
|
75
|
-
}
|
|
76
|
-
export interface CareerEmployerUserKeyrings {
|
|
77
|
-
consumed_at: Timestamp | null;
|
|
78
|
-
created_at: Generated<Timestamp>;
|
|
79
|
-
employer_user_id: string;
|
|
80
|
-
expires_at: Timestamp | null;
|
|
81
|
-
hash: string;
|
|
82
|
-
id: Generated<string>;
|
|
83
|
-
}
|
|
84
|
-
export interface CareerEmployerUsers {
|
|
85
|
-
created_at: Generated<Timestamp>;
|
|
86
|
-
email: string;
|
|
87
|
-
employer_id: string;
|
|
88
|
-
first_name: string | null;
|
|
89
|
-
id: Generated<string>;
|
|
90
|
-
is_deactivated: Generated<boolean>;
|
|
91
|
-
is_verified: Generated<boolean>;
|
|
92
|
-
last_name: string | null;
|
|
93
|
-
middle_name: string | null;
|
|
94
|
-
password: string;
|
|
95
|
-
profile_picture: string | null;
|
|
96
|
-
receives_applicant_digest: Generated<boolean>;
|
|
97
|
-
role: Generated<string>;
|
|
98
|
-
updated_at: Generated<Timestamp>;
|
|
99
|
-
}
|
|
100
|
-
export interface CareerGodKeyrings {
|
|
101
|
-
created_at: Generated<Timestamp>;
|
|
102
|
-
employer_user_id: string;
|
|
103
|
-
hash: string;
|
|
104
|
-
id: Generated<string>;
|
|
105
|
-
last_used_at: Timestamp | null;
|
|
106
|
-
ref_employer_id: string | null;
|
|
107
|
-
}
|
|
108
|
-
export interface CareerGods {
|
|
109
|
-
employer_user_id: string;
|
|
110
|
-
id: Generated<string>;
|
|
111
|
-
}
|
|
112
|
-
export interface CareerInternshipFormMappings {
|
|
113
|
-
college_id: string | null;
|
|
114
|
-
department_id: string | null;
|
|
115
|
-
form_group_id: string;
|
|
116
|
-
id: Generated<string>;
|
|
117
|
-
university_id: string | null;
|
|
118
|
-
}
|
|
119
|
-
export interface CareerJobActivationEvents {
|
|
120
|
-
actor_employer_user_id: string | null;
|
|
121
|
-
employer_id: string;
|
|
122
|
-
event: CareerJobActivationEvent;
|
|
123
|
-
id: Generated<string>;
|
|
124
|
-
job_id: string;
|
|
125
|
-
occurred_at: Generated<Timestamp>;
|
|
126
|
-
qualified: Generated<boolean>;
|
|
127
|
-
source: CareerJobActivationSource;
|
|
128
|
-
}
|
|
129
|
-
export interface CareerJobPauses {
|
|
130
|
-
employer_id: string;
|
|
131
|
-
id: Generated<string>;
|
|
132
|
-
job_id: string;
|
|
133
|
-
paused_at: Generated<Timestamp>;
|
|
134
|
-
reason: CareerJobPauseReason;
|
|
135
|
-
unpaused_at: Timestamp | null;
|
|
136
|
-
unpaused_by: string | null;
|
|
137
|
-
}
|
|
138
|
-
export interface CareerJobs {
|
|
139
|
-
allowance: number | null;
|
|
140
|
-
created_at: Generated<Timestamp | null>;
|
|
141
|
-
description: string;
|
|
142
|
-
employer_id: string | null;
|
|
143
|
-
end_date: Int8 | null;
|
|
144
|
-
id: Generated<string>;
|
|
145
|
-
internship_preferences: Generated<Json>;
|
|
146
|
-
is_active: Generated<boolean | null>;
|
|
147
|
-
is_deleted: Generated<boolean>;
|
|
148
|
-
is_unlisted: Generated<boolean>;
|
|
149
|
-
is_year_round: boolean | null;
|
|
150
|
-
last_activated_at: Generated<Timestamp>;
|
|
151
|
-
location: string | null;
|
|
152
|
-
requirements: string | null;
|
|
153
|
-
salary: Numeric | null;
|
|
154
|
-
salary_freq: number | null;
|
|
155
|
-
start_date: Int8 | null;
|
|
156
|
-
title: string;
|
|
157
|
-
updated_at: Generated<Timestamp | null>;
|
|
158
|
-
view_count: Generated<Int8>;
|
|
159
|
-
}
|
|
160
|
-
export interface CareerJobsChallenge {
|
|
161
|
-
description: string | null;
|
|
162
|
-
id: Generated<string>;
|
|
163
|
-
jobs_id: string;
|
|
164
|
-
title: string;
|
|
165
|
-
}
|
|
166
|
-
export interface CareerJobWaitlists {
|
|
167
|
-
created_at: Generated<Timestamp>;
|
|
168
|
-
id: Generated<string>;
|
|
169
|
-
job_id: string;
|
|
170
|
-
notified_at: Timestamp | null;
|
|
171
|
-
removal_reason: CareerJobWaitlistRemovalReason | null;
|
|
172
|
-
removed_at: Timestamp | null;
|
|
173
|
-
user_id: string;
|
|
174
|
-
}
|
|
175
|
-
export interface CareerMoa {
|
|
176
|
-
employer_id: string;
|
|
177
|
-
expires_at: Generated<Timestamp>;
|
|
178
|
-
id: Generated<string>;
|
|
179
|
-
start_date: Generated<Timestamp>;
|
|
180
|
-
university_id: string;
|
|
181
|
-
}
|
|
182
|
-
export interface CareerPrismaMigrations {
|
|
183
|
-
applied_steps_count: Generated<number>;
|
|
184
|
-
checksum: string;
|
|
185
|
-
finished_at: Timestamp | null;
|
|
186
|
-
id: string;
|
|
187
|
-
logs: string | null;
|
|
188
|
-
migration_name: string;
|
|
189
|
-
rolled_back_at: Timestamp | null;
|
|
190
|
-
started_at: Generated<Timestamp>;
|
|
191
|
-
}
|
|
192
|
-
export interface CareerRefAppStatuses {
|
|
193
|
-
id: Generated<number>;
|
|
194
|
-
name: string;
|
|
195
|
-
order: number;
|
|
196
|
-
}
|
|
197
|
-
export interface CareerRefColleges {
|
|
198
|
-
id: Generated<string>;
|
|
199
|
-
name: string;
|
|
200
|
-
short_name: Generated<string>;
|
|
201
|
-
university_id: string;
|
|
202
|
-
}
|
|
203
|
-
export interface CareerRefDegrees {
|
|
204
|
-
id: Generated<string>;
|
|
205
|
-
name: string;
|
|
206
|
-
type: string;
|
|
207
|
-
university_id: string;
|
|
208
|
-
}
|
|
209
|
-
export interface CareerRefDepartments {
|
|
210
|
-
college_id: Generated<string>;
|
|
211
|
-
id: Generated<string>;
|
|
212
|
-
name: string;
|
|
213
|
-
short_name: string;
|
|
214
|
-
}
|
|
215
|
-
export interface CareerRefDomains {
|
|
216
|
-
id: Generated<string>;
|
|
217
|
-
name: string;
|
|
218
|
-
university_id: string;
|
|
219
|
-
}
|
|
220
|
-
export interface CareerRefIndustries {
|
|
221
|
-
id: Generated<string>;
|
|
222
|
-
name: string;
|
|
223
|
-
}
|
|
224
|
-
export interface CareerRefJobAllowances {
|
|
225
|
-
id: Generated<number>;
|
|
226
|
-
name: string;
|
|
227
|
-
}
|
|
228
|
-
export interface CareerRefJobCategories {
|
|
229
|
-
id: Generated<string>;
|
|
230
|
-
name: string;
|
|
231
|
-
order: number;
|
|
232
|
-
parent_id: string | null;
|
|
233
|
-
}
|
|
234
|
-
export interface CareerRefJobModes {
|
|
235
|
-
id: Generated<number>;
|
|
236
|
-
name: string;
|
|
237
|
-
}
|
|
238
|
-
export interface CareerRefJobPayFreq {
|
|
239
|
-
description: string;
|
|
240
|
-
factor: number | null;
|
|
241
|
-
id: Generated<number>;
|
|
242
|
-
name: string;
|
|
243
|
-
}
|
|
244
|
-
export interface CareerRefJobTypes {
|
|
245
|
-
id: Generated<number>;
|
|
246
|
-
name: string;
|
|
247
|
-
}
|
|
248
|
-
export interface CareerRefLevels {
|
|
249
|
-
grad_date: Generated<Timestamp | null>;
|
|
250
|
-
id: Generated<number>;
|
|
251
|
-
name: string;
|
|
252
|
-
order: number;
|
|
253
|
-
}
|
|
254
|
-
export interface CareerRefUniversities {
|
|
255
|
-
id: Generated<string>;
|
|
256
|
-
iom_university_id: string | null;
|
|
257
|
-
name: string;
|
|
258
|
-
}
|
|
259
|
-
export interface CareerResumes {
|
|
260
|
-
filename: string;
|
|
261
|
-
id: Generated<string>;
|
|
262
|
-
is_deleted: Generated<boolean>;
|
|
263
|
-
label: string;
|
|
264
|
-
uploaded_at: Generated<Timestamp>;
|
|
265
|
-
user_id: string;
|
|
266
|
-
}
|
|
267
|
-
export interface CareerSavedJobs {
|
|
268
|
-
id: Generated<string>;
|
|
269
|
-
job_id: string | null;
|
|
270
|
-
saved_at: Generated<Timestamp | null>;
|
|
271
|
-
user_id: string | null;
|
|
272
|
-
}
|
|
273
|
-
export interface CareerSessions {
|
|
274
|
-
employer_id: string | null;
|
|
275
|
-
id: Generated<string>;
|
|
276
|
-
owner_id: string;
|
|
277
|
-
subaccount_id: string | null;
|
|
278
|
-
timestamp: Generated<Timestamp>;
|
|
279
|
-
user_id: string | null;
|
|
280
|
-
}
|
|
281
|
-
export interface CareerUsers {
|
|
282
|
-
acknowledged_auto_apply: Generated<boolean>;
|
|
283
|
-
apply_for_me: Generated<boolean | null>;
|
|
284
|
-
auto_apply_enabled_at: Timestamp | null;
|
|
285
|
-
bio: string | null;
|
|
286
|
-
calendar_link: string | null;
|
|
287
|
-
college: string | null;
|
|
288
|
-
created_at: Generated<Timestamp | null>;
|
|
289
|
-
default_resume: string | null;
|
|
290
|
-
degree: string | null;
|
|
291
|
-
department: string | null;
|
|
292
|
-
discord_user_id: string | null;
|
|
293
|
-
edu_verification_email: string | null;
|
|
294
|
-
email: string;
|
|
295
|
-
expected_graduation_date: Timestamp | null;
|
|
296
|
-
first_name: string | null;
|
|
297
|
-
form_group_id: string | null;
|
|
298
|
-
form_group_joined_at: Timestamp | null;
|
|
299
|
-
github_link: string | null;
|
|
300
|
-
id: Generated<string>;
|
|
301
|
-
internship_moa_fields: Generated<Json>;
|
|
302
|
-
internship_preferences: Generated<Json>;
|
|
303
|
-
is_deactivated: Generated<boolean | null>;
|
|
304
|
-
is_verified: Generated<boolean>;
|
|
305
|
-
last_name: string | null;
|
|
306
|
-
linkedin_link: string | null;
|
|
307
|
-
middle_name: string | null;
|
|
308
|
-
phone_number: string | null;
|
|
309
|
-
portfolio_link: string | null;
|
|
310
|
-
profile_picture: string | null;
|
|
311
|
-
resume: string | null;
|
|
312
|
-
signatory_account_id: string | null;
|
|
313
|
-
university: string | null;
|
|
314
|
-
updated_at: Generated<Timestamp | null>;
|
|
315
|
-
verification_hash: string;
|
|
316
|
-
year_level: number | null;
|
|
317
|
-
}
|
|
318
|
-
export interface DB {
|
|
319
|
-
"career._prisma_migrations": CareerPrismaMigrations;
|
|
320
|
-
"career.applications": CareerApplications;
|
|
321
|
-
"career.applications_challenge_submission": CareerApplicationsChallengeSubmission;
|
|
322
|
-
"career.conversations": CareerConversations;
|
|
323
|
-
"career.employer_iom_link_requests": CareerEmployerIomLinkRequests;
|
|
324
|
-
"career.employer_user_keyrings": CareerEmployerUserKeyrings;
|
|
325
|
-
"career.employer_users": CareerEmployerUsers;
|
|
326
|
-
"career.employers": CareerEmployers;
|
|
327
|
-
"career.god_keyrings": CareerGodKeyrings;
|
|
328
|
-
"career.gods": CareerGods;
|
|
329
|
-
"career.internship_form_mappings": CareerInternshipFormMappings;
|
|
330
|
-
"career.job_activation_events": CareerJobActivationEvents;
|
|
331
|
-
"career.job_pauses": CareerJobPauses;
|
|
332
|
-
"career.job_waitlists": CareerJobWaitlists;
|
|
333
|
-
"career.jobs": CareerJobs;
|
|
334
|
-
"career.jobs_challenge": CareerJobsChallenge;
|
|
335
|
-
"career.moa": CareerMoa;
|
|
336
|
-
"career.ref_app_statuses": CareerRefAppStatuses;
|
|
337
|
-
"career.ref_colleges": CareerRefColleges;
|
|
338
|
-
"career.ref_degrees": CareerRefDegrees;
|
|
339
|
-
"career.ref_departments": CareerRefDepartments;
|
|
340
|
-
"career.ref_domains": CareerRefDomains;
|
|
341
|
-
"career.ref_industries": CareerRefIndustries;
|
|
342
|
-
"career.ref_job_allowances": CareerRefJobAllowances;
|
|
343
|
-
"career.ref_job_categories": CareerRefJobCategories;
|
|
344
|
-
"career.ref_job_modes": CareerRefJobModes;
|
|
345
|
-
"career.ref_job_pay_freq": CareerRefJobPayFreq;
|
|
346
|
-
"career.ref_job_types": CareerRefJobTypes;
|
|
347
|
-
"career.ref_levels": CareerRefLevels;
|
|
348
|
-
"career.ref_universities": CareerRefUniversities;
|
|
349
|
-
"career.resumes": CareerResumes;
|
|
350
|
-
"career.saved_jobs": CareerSavedJobs;
|
|
351
|
-
"career.sessions": CareerSessions;
|
|
352
|
-
"career.users": CareerUsers;
|
|
353
|
-
}
|
package/dist/db.types.js
DELETED
package/dist/db.types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"db.types.js","sourceRoot":"","sources":["../lib/db.types.ts"],"names":[],"mappings":""}
|
package/dist/env.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ENV: NodeJS.ProcessEnv;
|
package/dist/env.js
DELETED
package/dist/env.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"env.js","sourceRoot":"","sources":["../lib/env.ts"],"names":[],"mappings":";;;AAAA,iCAAiC;AACjC,MAAM,CAAC,MAAM,EAAE,CAAC;AACH,QAAA,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from "./db";
|
|
2
|
-
export * from "./db.types";
|
|
3
|
-
export * from "./repository";
|
|
4
|
-
export * as Internship from "./db.internship.types";
|
|
5
|
-
export * as Document from "./db.doc.types";
|
|
6
|
-
export * as Internal from "./db.internal.types";
|
|
7
|
-
export * as IOM from "./db.iom.types";
|
package/dist/index.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
exports.IOM = exports.Internal = exports.Document = exports.Internship = void 0;
|
|
18
|
-
__exportStar(require("./db"), exports);
|
|
19
|
-
__exportStar(require("./db.types"), exports);
|
|
20
|
-
__exportStar(require("./repository"), exports);
|
|
21
|
-
exports.Internship = require("./db.internship.types");
|
|
22
|
-
exports.Document = require("./db.doc.types");
|
|
23
|
-
exports.Internal = require("./db.internal.types");
|
|
24
|
-
exports.IOM = require("./db.iom.types");
|
|
25
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uCAAqB;AACrB,6CAA2B;AAC3B,+CAA6B;AAC7B,sDAAoD;AACpD,6CAA2C;AAC3C,kDAAgD;AAChD,wCAAsC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { Kysely, Selectable, Insertable, Updateable } from "kysely";
|
|
2
|
-
import { PaginationOptions } from "./paginator";
|
|
3
|
-
export declare class Repository<DB, T extends keyof DB & string, Entity = Selectable<DB[T]>, Insert = Insertable<DB[T]>, Update = Updateable<DB[T]>> {
|
|
4
|
-
protected db: Kysely<DB>;
|
|
5
|
-
protected table: T;
|
|
6
|
-
protected schema: string;
|
|
7
|
-
constructor(db: Kysely<DB>, table: T, schema: string);
|
|
8
|
-
private applySelect;
|
|
9
|
-
private applyCondition;
|
|
10
|
-
private applyFilters;
|
|
11
|
-
findOne(id: string, fields?: string): Promise<Entity>;
|
|
12
|
-
findOneOrNull(id: string, fields?: string): Promise<Entity | null>;
|
|
13
|
-
checkOneBy(filter: Partial<{
|
|
14
|
-
[column in keyof DB[T]]: unknown;
|
|
15
|
-
}>, fields?: string): Promise<boolean>;
|
|
16
|
-
countBy(filter?: Partial<{
|
|
17
|
-
[column in keyof DB[T]]: unknown;
|
|
18
|
-
}>): Promise<number>;
|
|
19
|
-
findOneBy(filter: Partial<{
|
|
20
|
-
[column in keyof DB[T]]: unknown;
|
|
21
|
-
}>, fields?: string): Promise<Entity>;
|
|
22
|
-
findOneByOrNull(filter: Partial<{
|
|
23
|
-
[column in keyof DB[T]]: unknown;
|
|
24
|
-
}>, fields?: string): Promise<Entity | null>;
|
|
25
|
-
findLastOrderedBy(filter: Partial<{
|
|
26
|
-
[column in keyof DB[T]]: unknown;
|
|
27
|
-
}>, sortField: keyof DB[T] & string, sortAscending?: boolean, fields?: string): Promise<Entity>;
|
|
28
|
-
findAllBy(filter: Partial<{
|
|
29
|
-
[column in keyof DB[T]]: unknown;
|
|
30
|
-
}>, fields?: string, options?: PaginationOptions): Promise<Entity[]>;
|
|
31
|
-
findAllByOrdered(filter: Partial<{
|
|
32
|
-
[column in keyof DB[T]]: unknown;
|
|
33
|
-
}>, sortField: keyof DB[T] & string, sortAscending?: boolean, options?: PaginationOptions, fields?: string): Promise<Entity[]>;
|
|
34
|
-
findAllIn(filterColumn: keyof DB[T] & string, filterValues: string[], fields?: string): Promise<Entity[]>;
|
|
35
|
-
findAll(fields?: string, options?: PaginationOptions): Promise<Entity[]>;
|
|
36
|
-
findPaginated(filter: Partial<{
|
|
37
|
-
[column in keyof DB[T]]: unknown;
|
|
38
|
-
}>, fields?: string, options?: {
|
|
39
|
-
page?: number;
|
|
40
|
-
limit?: number;
|
|
41
|
-
orderBy?: keyof DB[T] & string;
|
|
42
|
-
orderDir?: "asc" | "desc";
|
|
43
|
-
}): Promise<{
|
|
44
|
-
data: Entity[];
|
|
45
|
-
total: number;
|
|
46
|
-
}>;
|
|
47
|
-
countAll(): Promise<number>;
|
|
48
|
-
insertOne(insert: Partial<Insert>, fields?: string): Promise<Entity>;
|
|
49
|
-
updateOne(id: string, updated: Partial<Update>, fields?: string): Promise<Entity>;
|
|
50
|
-
updateAllBy(filters: Partial<{
|
|
51
|
-
[column in keyof DB[T]]: unknown;
|
|
52
|
-
}>, updated: Partial<Update>, fields?: string): Promise<Entity[]>;
|
|
53
|
-
deleteOne(id: string, fields?: string): Promise<Entity>;
|
|
54
|
-
deleteAllBy(filters: Partial<{
|
|
55
|
-
[column in keyof DB[T]]: unknown;
|
|
56
|
-
}>, fields?: string): Promise<Entity[]>;
|
|
57
|
-
}
|