@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/README.md +184 -100
- package/dist/index.d.mts +308 -0
- package/dist/index.d.ts +308 -10
- package/dist/index.js +308 -12
- package/dist/index.mjs +279 -0
- package/package.json +2 -2
- package/dist/BaseModel.d.ts +0 -8
- package/dist/BaseModel.js +0 -1
- package/dist/models/VacancySuggestion.d.ts +0 -19
- package/dist/models/VacancySuggestion.js +0 -18
- package/dist/models/application.d.ts +0 -40
- package/dist/models/application.js +0 -37
- package/dist/models/authUser.d.ts +0 -31
- package/dist/models/authUser.js +0 -80
- package/dist/models/client.d.ts +0 -13
- package/dist/models/client.js +0 -16
- package/dist/models/clientData.d.ts +0 -25
- package/dist/models/clientData.js +0 -24
- package/dist/models/clientLogin.d.ts +0 -18
- package/dist/models/clientLogin.js +0 -19
- package/dist/models/question.d.ts +0 -34
- package/dist/models/question.js +0 -1
- package/dist/models/userLogin.d.ts +0 -0
- package/dist/models/userLogin.js +0 -59
- package/dist/models/userQuestion.d.ts +0 -15
- package/dist/models/userQuestion.js +0 -37
- package/dist/models/vacancy.d.ts +0 -24
- package/dist/models/vacancy.js +0 -27
package/README.md
CHANGED
@@ -45,165 +45,249 @@ firestore-models/
|
|
45
45
|
└── package.json
|
46
46
|
```
|
47
47
|
|
48
|
-
##
|
48
|
+
## Base Model
|
49
|
+
|
50
|
+
All models extend from the BaseModel interface:
|
51
|
+
|
52
|
+
```typescript
|
53
|
+
interface BaseModel {
|
54
|
+
id?: string; // Optional document ID
|
55
|
+
createdAt?: Date | string; // Optional creation timestamp
|
56
|
+
updatedAt?: Date | string; // Optional update timestamp
|
57
|
+
}
|
58
|
+
```
|
59
|
+
|
60
|
+
## Models and Namespaces
|
61
|
+
|
62
|
+
Each model is defined within its own namespace, which includes:
|
63
|
+
|
64
|
+
- The model interface
|
65
|
+
- Path builders for Firestore collections and documents
|
66
|
+
- Utility functions for working with the model
|
49
67
|
|
50
68
|
### Client
|
51
69
|
|
52
70
|
```typescript
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
71
|
+
namespace Client {
|
72
|
+
interface Model extends BaseModel {
|
73
|
+
name: string;
|
74
|
+
email: string;
|
75
|
+
status: "active" | "inactive";
|
76
|
+
resume?: string;
|
77
|
+
}
|
78
|
+
|
79
|
+
// Path builders
|
80
|
+
const collection = () => "clients";
|
81
|
+
const document = (clientId: string) => `clients/${clientId}`;
|
82
|
+
|
83
|
+
// Utility functions
|
84
|
+
const formatClient = (client: Client.Model): string;
|
85
|
+
const createNew = (name: string, email: string): Client.Model;
|
60
86
|
}
|
61
87
|
```
|
62
88
|
|
63
89
|
### Application
|
64
90
|
|
65
91
|
```typescript
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
92
|
+
namespace Application {
|
93
|
+
interface Model extends BaseModel {
|
94
|
+
vacancyId: string;
|
95
|
+
clientId: string;
|
96
|
+
status:
|
97
|
+
| "new"
|
98
|
+
| "submitted"
|
99
|
+
| "interviewing"
|
100
|
+
| "accepted"
|
101
|
+
| "rejected"
|
102
|
+
| "withdrawn"
|
103
|
+
| "applying"
|
104
|
+
| "suggested"
|
105
|
+
| "approved";
|
106
|
+
coverLetter?: string;
|
107
|
+
resume?: string;
|
108
|
+
// Denormalized fields from Vacancy
|
109
|
+
company?: string;
|
110
|
+
position?: string;
|
111
|
+
location?: string;
|
112
|
+
jobId?: string;
|
113
|
+
advertisingUrl?: string;
|
114
|
+
applicationUrl?: string;
|
115
|
+
applicationDomain?: string;
|
116
|
+
advertisingDomain?: string;
|
117
|
+
description?: string;
|
118
|
+
fullPageText?: string;
|
119
|
+
}
|
120
|
+
|
121
|
+
// Path builders
|
122
|
+
const collection = (clientId: string) => `clients/${clientId}/applications`;
|
123
|
+
const document = (clientId: string, applicationId: string) =>
|
124
|
+
`clients/${clientId}/applications/${applicationId}`;
|
125
|
+
|
126
|
+
// Utility functions
|
127
|
+
const formatSummary = (application: Application.Model): string;
|
128
|
+
const formatDate = (date: Date | string): string;
|
129
|
+
const createNew = (
|
130
|
+
clientId: string,
|
131
|
+
vacancyId: string,
|
132
|
+
vacancyData: Partial<Vacancy.Model>
|
133
|
+
): Application.Model;
|
134
|
+
const updateStatus = (
|
135
|
+
application: Application.Model,
|
136
|
+
newStatus: Application.Model["status"]
|
137
|
+
): Application.Model;
|
94
138
|
}
|
95
139
|
```
|
96
140
|
|
97
141
|
### AuthUser
|
98
142
|
|
99
143
|
```typescript
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
144
|
+
namespace AuthUser {
|
145
|
+
interface Model extends BaseModel {
|
146
|
+
email: string;
|
147
|
+
displayName?: string;
|
148
|
+
photoURL?: string;
|
149
|
+
lastSignIn?: Date | string;
|
150
|
+
emailVerified?: boolean;
|
151
|
+
}
|
152
|
+
|
153
|
+
// Path builders
|
154
|
+
const collection = () => "users";
|
155
|
+
const document = (userId: string) => `users/${userId}`;
|
156
|
+
|
157
|
+
// Utility functions
|
158
|
+
const fromFirebaseUser = (user: any): AuthUser.Model;
|
159
|
+
const formatDates = (user: AuthUser.Model): Record<string, string>;
|
160
|
+
const toFirestore = (user: AuthUser.Model): Record<string, any>;
|
161
|
+
const fromFirestore = (data: Record<string, any>): AuthUser.Model;
|
106
162
|
}
|
107
163
|
```
|
108
164
|
|
109
165
|
### Vacancy
|
110
166
|
|
111
167
|
```typescript
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
168
|
+
namespace Vacancy {
|
169
|
+
interface Model extends BaseModel {
|
170
|
+
company: string;
|
171
|
+
position: string;
|
172
|
+
location: string;
|
173
|
+
jobId: string;
|
174
|
+
advertisingUrl: string;
|
175
|
+
applicationUrl: string;
|
176
|
+
applicationDomain: string;
|
177
|
+
advertisingDomain: string;
|
178
|
+
description: string;
|
179
|
+
fullPageText: string;
|
180
|
+
status: "active" | "inactive";
|
181
|
+
}
|
182
|
+
|
183
|
+
// Path builders
|
184
|
+
const collection = () => "vacancies";
|
185
|
+
const document = (vacancyId: string) => `vacancies/${vacancyId}`;
|
126
186
|
}
|
127
187
|
```
|
128
188
|
|
129
189
|
### Question
|
130
190
|
|
131
191
|
```typescript
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
192
|
+
namespace Question {
|
193
|
+
interface Model extends BaseModel {
|
194
|
+
text: string;
|
195
|
+
type: "text" | "multiple_choice" | "single_choice";
|
196
|
+
options?: string[];
|
197
|
+
required: boolean;
|
198
|
+
order: number;
|
199
|
+
}
|
200
|
+
|
201
|
+
// Path builders
|
202
|
+
const collection = () => "questions";
|
203
|
+
const document = (questionId: string) => `questions/${questionId}`;
|
140
204
|
}
|
141
205
|
```
|
142
206
|
|
143
207
|
### UserQuestion
|
144
208
|
|
145
209
|
```typescript
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
210
|
+
namespace UserQuestion {
|
211
|
+
interface Model extends BaseModel {
|
212
|
+
clientId: string;
|
213
|
+
questionId: string;
|
214
|
+
answer: string;
|
215
|
+
}
|
216
|
+
|
217
|
+
// Path builders
|
218
|
+
const collection = (clientId: string) => `clients/${clientId}/questions`;
|
219
|
+
const document = (clientId: string, questionId: string) =>
|
220
|
+
`clients/${clientId}/questions/${questionId}`;
|
152
221
|
}
|
153
222
|
```
|
154
223
|
|
155
224
|
### ClientData
|
156
225
|
|
157
226
|
```typescript
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
227
|
+
namespace ClientData {
|
228
|
+
interface Model extends BaseModel {
|
229
|
+
clientId: string;
|
230
|
+
key: string;
|
231
|
+
value: any;
|
232
|
+
}
|
233
|
+
|
234
|
+
// Path builders
|
235
|
+
const collection = (clientId: string) => `clients/${clientId}/data`;
|
236
|
+
const document = (clientId: string, key: string) =>
|
237
|
+
`clients/${clientId}/data/${key}`;
|
164
238
|
}
|
165
239
|
```
|
166
240
|
|
167
241
|
### ClientLogin
|
168
242
|
|
169
243
|
```typescript
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
244
|
+
namespace ClientLogin {
|
245
|
+
interface Model extends BaseModel {
|
246
|
+
clientId: string;
|
247
|
+
ipAddress: string;
|
248
|
+
userAgent: string;
|
249
|
+
}
|
250
|
+
|
251
|
+
// Path builders
|
252
|
+
const collection = (clientId: string) => `clients/${clientId}/logins`;
|
253
|
+
const document = (clientId: string, loginId: string) =>
|
254
|
+
`clients/${clientId}/logins/${loginId}`;
|
175
255
|
}
|
176
256
|
```
|
177
257
|
|
178
258
|
### VacancySuggestion
|
179
259
|
|
180
260
|
```typescript
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
261
|
+
namespace VacancySuggestion {
|
262
|
+
interface Model extends BaseModel {
|
263
|
+
clientId: string;
|
264
|
+
vacancyId: string;
|
265
|
+
status: "pending" | "accepted" | "rejected";
|
266
|
+
}
|
267
|
+
|
268
|
+
// Path builders
|
269
|
+
const collection = (clientId: string) => `clients/${clientId}/suggestions`;
|
270
|
+
const document = (clientId: string, suggestionId: string) =>
|
271
|
+
`clients/${clientId}/suggestions/${suggestionId}`;
|
187
272
|
}
|
188
273
|
```
|
189
274
|
|
190
275
|
## Usage
|
191
276
|
|
192
|
-
Import the models and
|
277
|
+
Import the models and their utilities in your application:
|
193
278
|
|
194
279
|
```typescript
|
195
|
-
import { Client
|
196
|
-
|
197
|
-
//
|
198
|
-
const
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
const clientDocPath = clientPath("123"); // returns 'clients/123'
|
280
|
+
import { Client } from "@jsw/firestore-models";
|
281
|
+
|
282
|
+
// Create a new client
|
283
|
+
const newClient = Client.createNew("John Doe", "john@example.com");
|
284
|
+
|
285
|
+
// Use the path builders
|
286
|
+
const clientDocPath = Client.document("123"); // returns 'clients/123'
|
287
|
+
const clientCollectionPath = Client.collection(); // returns 'clients'
|
288
|
+
|
289
|
+
// Use the utility functions
|
290
|
+
const formattedClient = Client.formatClient(newClient);
|
207
291
|
```
|
208
292
|
|
209
293
|
## Contributing
|
package/dist/index.d.mts
ADDED
@@ -0,0 +1,308 @@
|
|
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 };
|