@jobsearch-works/firestore-models 1.0.3 → 1.0.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/dist/index.d.ts CHANGED
@@ -1,10 +1,308 @@
1
- export * from "./BaseModel";
2
- export * from "./models/Application";
3
- export * from "./models/AuthUser";
4
- export * from "./models/Client";
5
- export * from "./models/ClientData";
6
- export * from "./models/ClientLogin";
7
- export * from "./models/Question";
8
- export * from "./models/UserQuestion";
9
- export * from "./models/Vacancy";
10
- export * from "./models/VacancySuggestion";
1
+ /**
2
+ * Generic type for all model interfaces
3
+ */
4
+ interface BaseModel {
5
+ id?: string;
6
+ createdAt?: Date | string;
7
+ updatedAt?: Date | string;
8
+ }
9
+
10
+ declare namespace Application {
11
+ /**
12
+ * Represents a job application
13
+ */
14
+ interface Model extends BaseModel {
15
+ vacancyId: string;
16
+ clientId: string;
17
+ status: "new" | "submitted" | "interviewing" | "accepted" | "rejected" | "withdrawn" | "applying" | "suggested" | "approved";
18
+ coverLetter?: string;
19
+ resume?: string;
20
+ company?: string;
21
+ position?: string;
22
+ location?: string;
23
+ jobId?: string;
24
+ advertisingUrl?: string;
25
+ applicationUrl?: string;
26
+ applicationDomain?: string;
27
+ advertisingDomain?: string;
28
+ description?: string;
29
+ fullPageText?: string;
30
+ }
31
+ const collection: (clientId: string) => string;
32
+ const document: (clientId: string, applicationId: string) => string;
33
+ const formatSummary: (application: Application.Model) => string;
34
+ const formatDate: (date: Date | string) => string;
35
+ const createNew: (clientId: string, vacancyId: string, vacancyData?: {
36
+ company?: string;
37
+ position?: string;
38
+ location?: string;
39
+ jobId?: string;
40
+ advertisingUrl?: string;
41
+ applicationUrl?: string;
42
+ applicationDomain?: string;
43
+ advertisingDomain?: string;
44
+ description?: string;
45
+ fullPageText?: string;
46
+ }) => Application.Model;
47
+ const updateStatus: (application: Application.Model, newStatus: Application.Model["status"]) => Application.Model;
48
+ }
49
+
50
+ declare const Application$1_Application: typeof Application;
51
+ declare namespace Application$1 {
52
+ export {
53
+ Application$1_Application as Application,
54
+ };
55
+ }
56
+
57
+ interface FirestoreTimestamp {
58
+ seconds: number;
59
+ nanoseconds: number;
60
+ _firestore_timestamp?: boolean;
61
+ }
62
+ /**
63
+ * AuthUser interface - replaces the old class-based model
64
+ */
65
+ interface AuthUser extends BaseModel {
66
+ email: string;
67
+ displayName?: string;
68
+ photoURL?: string;
69
+ lastSignIn?: Date | string;
70
+ emailVerified?: boolean;
71
+ }
72
+ declare const AuthUserCollectionPath = "users";
73
+ declare const getAuthUserDocumentPath: (userId: string) => string;
74
+ declare const AuthUserUtils: {
75
+ getTimestampFields: () => string[];
76
+ isFirestoreTimestamp: (value: any) => value is FirestoreTimestamp;
77
+ fromFirebaseUser: (user: any) => AuthUser;
78
+ formatDates: (user: AuthUser) => {
79
+ lastSignIn: string;
80
+ createdAt: string;
81
+ updatedAt?: string;
82
+ };
83
+ toFirestore: (user: AuthUser) => Record<string, any>;
84
+ fromFirestore: (data: Record<string, any>) => AuthUser;
85
+ };
86
+
87
+ type AuthUser$1_AuthUser = AuthUser;
88
+ declare const AuthUser$1_AuthUserCollectionPath: typeof AuthUserCollectionPath;
89
+ declare const AuthUser$1_AuthUserUtils: typeof AuthUserUtils;
90
+ declare const AuthUser$1_getAuthUserDocumentPath: typeof getAuthUserDocumentPath;
91
+ declare namespace AuthUser$1 {
92
+ export {
93
+ AuthUser$1_AuthUser as AuthUser,
94
+ AuthUser$1_AuthUserCollectionPath as AuthUserCollectionPath,
95
+ AuthUser$1_AuthUserUtils as AuthUserUtils,
96
+ AuthUser$1_getAuthUserDocumentPath as getAuthUserDocumentPath,
97
+ };
98
+ }
99
+
100
+ declare namespace Client {
101
+ interface Model extends BaseModel {
102
+ name: string;
103
+ email: string;
104
+ status: "active" | "inactive";
105
+ resume?: string;
106
+ }
107
+ const collection: () => string;
108
+ const document: (clientId: string) => string;
109
+ const formatClient: (client: Client.Model) => string;
110
+ const createNew: (name: string, email: string) => Client.Model;
111
+ }
112
+
113
+ declare const Client$1_Client: typeof Client;
114
+ declare namespace Client$1 {
115
+ export {
116
+ Client$1_Client as Client,
117
+ };
118
+ }
119
+
120
+ declare namespace ClientData {
121
+ /**
122
+ * Represents a user's personal data.
123
+ */
124
+ interface Model extends BaseModel {
125
+ firstName: string;
126
+ lastName: string;
127
+ middleName: string;
128
+ preferredName: string;
129
+ email: string;
130
+ phone: string;
131
+ address: string;
132
+ city: string;
133
+ suburb: string;
134
+ state: string;
135
+ zip: string;
136
+ country: string;
137
+ linkedIn?: string;
138
+ countryPhoneCode: string;
139
+ }
140
+ const collection: () => string;
141
+ const document: (clientDataId: string) => string;
142
+ const formatClientData: (clientData: ClientData.Model) => string;
143
+ const createNew: (firstName: string, lastName: string, email: string, phone: string, address: string, city: string, state: string, zip: string, country: string, countryPhoneCode: string, suburb: string) => ClientData.Model;
144
+ }
145
+
146
+ declare const ClientData$1_ClientData: typeof ClientData;
147
+ declare namespace ClientData$1 {
148
+ export {
149
+ ClientData$1_ClientData as ClientData,
150
+ };
151
+ }
152
+
153
+ declare namespace ClientLogin {
154
+ /**
155
+ * Represents login credentials for a client website
156
+ */
157
+ interface Model extends BaseModel {
158
+ userId: string;
159
+ url: string;
160
+ domain: string;
161
+ username?: string;
162
+ password: string;
163
+ email?: string;
164
+ }
165
+ const collection: (userId: string) => string;
166
+ const document: (userId: string, domain: string) => string;
167
+ const formatClientLogin: (clientLogin: ClientLogin.Model) => string;
168
+ const createNew: (userId: string, url: string, domain: string, password: string, username?: string, email?: string) => ClientLogin.Model;
169
+ }
170
+
171
+ declare const ClientLogin$1_ClientLogin: typeof ClientLogin;
172
+ declare namespace ClientLogin$1 {
173
+ export {
174
+ ClientLogin$1_ClientLogin as ClientLogin,
175
+ };
176
+ }
177
+
178
+ /**
179
+ * QuestionData interface defines the core data fields for a generic question.
180
+ */
181
+ interface QuestionData {
182
+ question: string;
183
+ options: string[];
184
+ }
185
+ /**
186
+ * Question interface - extends BaseModelInterface and includes QuestionData
187
+ */
188
+ interface Question extends BaseModel, QuestionData {
189
+ }
190
+ interface ApplicationQuestion {
191
+ questionText: string;
192
+ type: "text";
193
+ answer?: string;
194
+ }
195
+ /**
196
+ * Represents ApplicationQuestion data including its Firestore document ID.
197
+ */
198
+ type ApplicationQuestionDocument = ApplicationQuestion & {
199
+ id: string;
200
+ };
201
+ /**
202
+ * Represents a question-answer pair stored centrally for a client.
203
+ * Assumes structure in clients/{clientId}/questions collection.
204
+ */
205
+ interface ClientQuestionAnswerPair {
206
+ id?: string;
207
+ questionText: string;
208
+ answer: string;
209
+ createdAt?: Date;
210
+ }
211
+
212
+ type Question$1_ApplicationQuestion = ApplicationQuestion;
213
+ type Question$1_ApplicationQuestionDocument = ApplicationQuestionDocument;
214
+ type Question$1_ClientQuestionAnswerPair = ClientQuestionAnswerPair;
215
+ type Question$1_Question = Question;
216
+ type Question$1_QuestionData = QuestionData;
217
+ declare namespace Question$1 {
218
+ export {
219
+ Question$1_ApplicationQuestion as ApplicationQuestion,
220
+ Question$1_ApplicationQuestionDocument as ApplicationQuestionDocument,
221
+ Question$1_ClientQuestionAnswerPair as ClientQuestionAnswerPair,
222
+ Question$1_Question as Question,
223
+ Question$1_QuestionData as QuestionData,
224
+ };
225
+ }
226
+
227
+ /**
228
+ * UserQuestionData interface defines the core data fields for a user question.
229
+ */
230
+ interface UserQuestionData {
231
+ userId: string;
232
+ question: string;
233
+ answer: string;
234
+ options: string[];
235
+ }
236
+ /**
237
+ * UserQuestion interface - extends BaseModel and includes UserQuestionData
238
+ */
239
+ interface UserQuestion extends BaseModel, UserQuestionData {
240
+ }
241
+
242
+ type UserQuestion$1_UserQuestion = UserQuestion;
243
+ type UserQuestion$1_UserQuestionData = UserQuestionData;
244
+ declare namespace UserQuestion$1 {
245
+ export {
246
+ UserQuestion$1_UserQuestion as UserQuestion,
247
+ UserQuestion$1_UserQuestionData as UserQuestionData,
248
+ };
249
+ }
250
+
251
+ declare namespace Vacancy {
252
+ /**
253
+ * Represents a job vacancy
254
+ */
255
+ interface Model extends BaseModel {
256
+ company: string;
257
+ position: string;
258
+ location: string;
259
+ description: string;
260
+ advertisingUrl: string;
261
+ applicationUrl: string;
262
+ applicationDomain: string;
263
+ advertisingDomain: string;
264
+ fullPageText: string;
265
+ jobId: string;
266
+ suggestedTo?: string[];
267
+ }
268
+ const collection: () => string;
269
+ const document: (vacancyId: string) => string;
270
+ const formatSummary: (vacancy: Vacancy.Model) => string;
271
+ const formatDate: (date: Date | string) => string;
272
+ const createNew: (company: string, position: string, location: string, description: string, advertisingUrl: string, applicationUrl: string, applicationDomain: string, advertisingDomain: string, fullPageText: string, jobId: string) => Vacancy.Model;
273
+ }
274
+
275
+ declare const Vacancy$1_Vacancy: typeof Vacancy;
276
+ declare namespace Vacancy$1 {
277
+ export {
278
+ Vacancy$1_Vacancy as Vacancy,
279
+ };
280
+ }
281
+
282
+ declare namespace VacancySuggestion {
283
+ /**
284
+ * Represents a job vacancy suggestion for a client
285
+ */
286
+ interface Model extends BaseModel {
287
+ clientId: string;
288
+ vacancyId: string;
289
+ vacancyCompany: string;
290
+ vacancyPosition: string;
291
+ status: string;
292
+ createdAt: Date | string;
293
+ updatedAt?: Date | string;
294
+ }
295
+ const collection: (clientId: string) => string;
296
+ const document: (clientId: string, suggestionId: string) => string;
297
+ const formatSummary: (suggestion: VacancySuggestion.Model) => string;
298
+ const createNew: (clientId: string, vacancyId: string, vacancyCompany: string, vacancyPosition: string, status?: string) => VacancySuggestion.Model;
299
+ }
300
+
301
+ declare const VacancySuggestion$1_VacancySuggestion: typeof VacancySuggestion;
302
+ declare namespace VacancySuggestion$1 {
303
+ export {
304
+ VacancySuggestion$1_VacancySuggestion as VacancySuggestion,
305
+ };
306
+ }
307
+
308
+ export { Application$1 as Application, AuthUser$1 as AuthUser, BaseModel, Client$1 as Client, ClientData$1 as ClientData, ClientLogin$1 as ClientLogin, Question$1 as Question, UserQuestion$1 as UserQuestion, Vacancy$1 as Vacancy, VacancySuggestion$1 as VacancySuggestion };
package/dist/index.js CHANGED
@@ -1,12 +1,308 @@
1
- // Re-export base model
2
- export * from "./BaseModel";
3
- // Re-export all models
4
- export * from "./models/Application";
5
- export * from "./models/AuthUser";
6
- export * from "./models/Client";
7
- export * from "./models/ClientData";
8
- export * from "./models/ClientLogin";
9
- export * from "./models/Question";
10
- export * from "./models/UserQuestion";
11
- export * from "./models/Vacancy";
12
- export * from "./models/VacancySuggestion";
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ Application: () => Application_exports,
24
+ AuthUser: () => AuthUser_exports,
25
+ Client: () => Client_exports,
26
+ ClientData: () => ClientData_exports,
27
+ ClientLogin: () => ClientLogin_exports,
28
+ Question: () => Question_exports,
29
+ UserQuestion: () => UserQuestion_exports,
30
+ Vacancy: () => Vacancy_exports,
31
+ VacancySuggestion: () => VacancySuggestion_exports
32
+ });
33
+ module.exports = __toCommonJS(src_exports);
34
+
35
+ // src/models2/Application.ts
36
+ var Application_exports = {};
37
+ __export(Application_exports, {
38
+ Application: () => Application
39
+ });
40
+ var Application;
41
+ ((Application2) => {
42
+ Application2.collection = (clientId) => `clients/${clientId}/applications`;
43
+ Application2.document = (clientId, applicationId) => `clients/${clientId}/applications/${applicationId}`;
44
+ Application2.formatSummary = (application) => {
45
+ return `${application.position} at ${application.company} (${application.status})`;
46
+ };
47
+ Application2.formatDate = (date) => {
48
+ const dateObj = date instanceof Date ? date : new Date(date);
49
+ return dateObj.toLocaleDateString();
50
+ };
51
+ Application2.createNew = (clientId, vacancyId, vacancyData = {}) => {
52
+ return {
53
+ clientId,
54
+ vacancyId,
55
+ status: "new",
56
+ company: vacancyData.company,
57
+ position: vacancyData.position,
58
+ location: vacancyData.location,
59
+ jobId: vacancyData.jobId,
60
+ advertisingUrl: vacancyData.advertisingUrl,
61
+ applicationUrl: vacancyData.applicationUrl,
62
+ applicationDomain: vacancyData.applicationDomain,
63
+ advertisingDomain: vacancyData.advertisingDomain,
64
+ description: vacancyData.description,
65
+ fullPageText: vacancyData.fullPageText,
66
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
67
+ };
68
+ };
69
+ Application2.updateStatus = (application, newStatus) => {
70
+ return {
71
+ ...application,
72
+ status: newStatus,
73
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
74
+ };
75
+ };
76
+ })(Application || (Application = {}));
77
+
78
+ // src/models2/AuthUser.ts
79
+ var AuthUser_exports = {};
80
+ __export(AuthUser_exports, {
81
+ AuthUserCollectionPath: () => AuthUserCollectionPath,
82
+ AuthUserUtils: () => AuthUserUtils,
83
+ getAuthUserDocumentPath: () => getAuthUserDocumentPath
84
+ });
85
+ var AuthUserCollectionPath = "users";
86
+ var getAuthUserDocumentPath = (userId) => `users/${userId}`;
87
+ var AuthUserUtils = {
88
+ // Get timestamp fields for AuthUser
89
+ getTimestampFields: () => [],
90
+ // Check if value is a Firestore timestamp
91
+ isFirestoreTimestamp: (value) => {
92
+ return typeof value === "object" && value !== null && ("seconds" in value || "_firestore_timestamp" in value);
93
+ },
94
+ // Create from Firebase user object
95
+ fromFirebaseUser: (user) => {
96
+ return {
97
+ id: user.uid,
98
+ email: user.email,
99
+ displayName: user.displayName,
100
+ photoURL: user.photoURL,
101
+ emailVerified: user.emailVerified,
102
+ lastSignIn: (/* @__PURE__ */ new Date()).toISOString(),
103
+ // Current timestamp for new logins
104
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
105
+ };
106
+ },
107
+ // Convert dates to display format
108
+ formatDates: (user) => {
109
+ const formatDate = (dateValue) => {
110
+ if (!dateValue)
111
+ return "N/A";
112
+ const date = typeof dateValue === "string" ? new Date(dateValue) : dateValue;
113
+ return date.toLocaleString();
114
+ };
115
+ return {
116
+ lastSignIn: formatDate(user.lastSignIn),
117
+ createdAt: formatDate(user.createdAt),
118
+ updatedAt: user.updatedAt ? formatDate(user.updatedAt) : void 0
119
+ };
120
+ },
121
+ // Convert AuthUser to format for storage
122
+ toFirestore: (user) => {
123
+ const { id, ...data } = user;
124
+ if (data.lastSignIn && data.lastSignIn instanceof Date) {
125
+ data.lastSignIn = data.lastSignIn.toISOString();
126
+ }
127
+ if (data.createdAt && data.createdAt instanceof Date) {
128
+ data.createdAt = data.createdAt.toISOString();
129
+ }
130
+ if (data.updatedAt && data.updatedAt instanceof Date) {
131
+ data.updatedAt = data.updatedAt.toISOString();
132
+ } else {
133
+ data.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
134
+ }
135
+ return data;
136
+ },
137
+ // Convert from Firestore data to AuthUser
138
+ fromFirestore: (data) => {
139
+ const processedData = { ...data };
140
+ const timestampFields = [];
141
+ timestampFields.forEach((field) => {
142
+ if (data[field]) {
143
+ if (AuthUserUtils.isFirestoreTimestamp(data[field])) {
144
+ processedData[field] = new Date(
145
+ data[field].seconds * 1e3
146
+ ).toISOString();
147
+ } else if (typeof data[field] === "string") {
148
+ processedData[field] = data[field];
149
+ }
150
+ }
151
+ });
152
+ return processedData;
153
+ }
154
+ };
155
+
156
+ // src/models2/Client.ts
157
+ var Client_exports = {};
158
+ __export(Client_exports, {
159
+ Client: () => Client
160
+ });
161
+ var Client;
162
+ ((Client2) => {
163
+ Client2.collection = () => "clients";
164
+ Client2.document = (clientId) => `clients/${clientId}`;
165
+ Client2.formatClient = (client) => {
166
+ return `${client.name} (${client.email}) - ${client.status}`;
167
+ };
168
+ Client2.createNew = (name, email) => {
169
+ return {
170
+ name,
171
+ email,
172
+ status: "active",
173
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
174
+ };
175
+ };
176
+ })(Client || (Client = {}));
177
+
178
+ // src/models2/ClientData.ts
179
+ var ClientData_exports = {};
180
+ __export(ClientData_exports, {
181
+ ClientData: () => ClientData
182
+ });
183
+ var ClientData;
184
+ ((ClientData2) => {
185
+ ClientData2.collection = () => "clientData";
186
+ ClientData2.document = (clientDataId) => `clientData/${clientDataId}`;
187
+ ClientData2.formatClientData = (clientData) => {
188
+ return `${clientData.firstName} ${clientData.lastName} (${clientData.email})`;
189
+ };
190
+ ClientData2.createNew = (firstName, lastName, email, phone, address, city, state, zip, country, countryPhoneCode, suburb) => {
191
+ return {
192
+ firstName,
193
+ lastName,
194
+ middleName: "",
195
+ preferredName: "",
196
+ email,
197
+ phone,
198
+ address,
199
+ city,
200
+ suburb,
201
+ state,
202
+ zip,
203
+ country,
204
+ countryPhoneCode,
205
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
206
+ };
207
+ };
208
+ })(ClientData || (ClientData = {}));
209
+
210
+ // src/models2/ClientLogin.ts
211
+ var ClientLogin_exports = {};
212
+ __export(ClientLogin_exports, {
213
+ ClientLogin: () => ClientLogin
214
+ });
215
+ var ClientLogin;
216
+ ((ClientLogin2) => {
217
+ ClientLogin2.collection = (userId) => `clientLogins/${userId}`;
218
+ ClientLogin2.document = (userId, domain) => `clientLogins/${userId}/logins/${domain}`;
219
+ ClientLogin2.formatClientLogin = (clientLogin) => {
220
+ return `${clientLogin.domain} (${clientLogin.username || clientLogin.email || "no username"})`;
221
+ };
222
+ ClientLogin2.createNew = (userId, url, domain, password, username, email) => {
223
+ return {
224
+ userId,
225
+ url,
226
+ domain,
227
+ password,
228
+ username,
229
+ email,
230
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
231
+ };
232
+ };
233
+ })(ClientLogin || (ClientLogin = {}));
234
+
235
+ // src/models2/Question.ts
236
+ var Question_exports = {};
237
+
238
+ // src/models2/UserQuestion.ts
239
+ var UserQuestion_exports = {};
240
+
241
+ // src/models2/Vacancy.ts
242
+ var Vacancy_exports = {};
243
+ __export(Vacancy_exports, {
244
+ Vacancy: () => Vacancy
245
+ });
246
+ var Vacancy;
247
+ ((Vacancy2) => {
248
+ Vacancy2.collection = () => "vacancies";
249
+ Vacancy2.document = (vacancyId) => `vacancies/${vacancyId}`;
250
+ Vacancy2.formatSummary = (vacancy) => {
251
+ return `${vacancy.position} at ${vacancy.company} (${vacancy.location})`;
252
+ };
253
+ Vacancy2.formatDate = (date) => {
254
+ const dateObj = date instanceof Date ? date : new Date(date);
255
+ return dateObj.toLocaleDateString();
256
+ };
257
+ Vacancy2.createNew = (company, position, location, description, advertisingUrl, applicationUrl, applicationDomain, advertisingDomain, fullPageText, jobId) => {
258
+ return {
259
+ company,
260
+ position,
261
+ location,
262
+ description,
263
+ advertisingUrl,
264
+ applicationUrl,
265
+ applicationDomain,
266
+ advertisingDomain,
267
+ fullPageText,
268
+ jobId,
269
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
270
+ };
271
+ };
272
+ })(Vacancy || (Vacancy = {}));
273
+
274
+ // src/models2/VacancySuggestion.ts
275
+ var VacancySuggestion_exports = {};
276
+ __export(VacancySuggestion_exports, {
277
+ VacancySuggestion: () => VacancySuggestion
278
+ });
279
+ var VacancySuggestion;
280
+ ((VacancySuggestion2) => {
281
+ VacancySuggestion2.collection = (clientId) => `clients/${clientId}/vacancySuggestions`;
282
+ VacancySuggestion2.document = (clientId, suggestionId) => `clients/${clientId}/vacancySuggestions/${suggestionId}`;
283
+ VacancySuggestion2.formatSummary = (suggestion) => {
284
+ return `${suggestion.vacancyPosition} at ${suggestion.vacancyCompany} (${suggestion.status})`;
285
+ };
286
+ VacancySuggestion2.createNew = (clientId, vacancyId, vacancyCompany, vacancyPosition, status = "new") => {
287
+ return {
288
+ clientId,
289
+ vacancyId,
290
+ vacancyCompany,
291
+ vacancyPosition,
292
+ status,
293
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
294
+ };
295
+ };
296
+ })(VacancySuggestion || (VacancySuggestion = {}));
297
+ // Annotate the CommonJS export names for ESM import in node:
298
+ 0 && (module.exports = {
299
+ Application,
300
+ AuthUser,
301
+ Client,
302
+ ClientData,
303
+ ClientLogin,
304
+ Question,
305
+ UserQuestion,
306
+ Vacancy,
307
+ VacancySuggestion
308
+ });