@jobsearch-works/firestore-models 1.0.10 → 1.0.12

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.mts CHANGED
@@ -14,7 +14,7 @@ declare namespace Application {
14
14
  interface Model extends BaseModel {
15
15
  vacancyId: string;
16
16
  clientId: string;
17
- status: "new" | "submitted" | "interviewing" | "accepted" | "rejected" | "withdrawn" | "applying" | "suggested" | "approved";
17
+ status: Status;
18
18
  coverLetter?: string;
19
19
  resume?: string;
20
20
  company?: string;
@@ -28,6 +28,8 @@ declare namespace Application {
28
28
  description?: string;
29
29
  fullPageText?: string;
30
30
  }
31
+ type Status = "new" | "submitted" | "interviewing" | "accepted" | "rejected" | "withdrawn" | "applying" | "suggested" | "approved";
32
+ const StatusOptions: readonly Status[];
31
33
  const collection: (clientId: string) => string;
32
34
  const document: (clientId: string, applicationId: string) => string;
33
35
  const formatSummary: (application: Application.Model) => string;
@@ -187,6 +189,7 @@ declare namespace Vacancy {
187
189
  /**
188
190
  * Represents a job vacancy
189
191
  */
192
+ type Category = "Accounting" | "Administration & Office Support" | "Advertising, Arts & Media" | "Banking & Financial Services" | "Call Centre & Customer Service" | "CEO & General Management" | "Community Services & Development" | "Construction" | "Consulting & Strategy" | "Design & Architecture" | "Education & Training" | "Engineering" | "Farming, Animals & Conservation" | "Government & Defence" | "Healthcare & Medical" | "Hospitality & Tourism" | "Human Resources & Recruitment" | "Information & Communication Technology" | "Insurance & Superannuation" | "Legal" | "Manufacturing, Transport & Logistics" | "Marketing & Communications" | "Mining, Resources & Energy" | "Real Estate & Property" | "Retail & Consumer Products" | "Sales" | "Science & Technology" | "Self Employment" | "Sport & Recreation" | "Trades & Services";
190
193
  interface Model extends BaseModel {
191
194
  company: string;
192
195
  position: string;
@@ -198,13 +201,14 @@ declare namespace Vacancy {
198
201
  advertisingDomain: string;
199
202
  fullPageText: string;
200
203
  jobId: string;
204
+ category: Category;
201
205
  suggestedTo?: string[];
202
206
  }
203
207
  const collection: () => string;
204
208
  const document: (vacancyId: string) => string;
205
209
  const formatSummary: (vacancy: Vacancy.Model) => string;
206
210
  const formatDate: (date: Date | string) => string;
207
- const createNew: (company: string, position: string, location: string, description: string, advertisingUrl: string, applicationUrl: string, applicationDomain: string, advertisingDomain: string, fullPageText: string, jobId: string) => Vacancy.Model;
211
+ const createNew: (company: string, position: string, location: string, description: string, advertisingUrl: string, applicationUrl: string, applicationDomain: string, advertisingDomain: string, fullPageText: string, jobId: string, category: Category) => Vacancy.Model;
208
212
  }
209
213
 
210
214
  declare namespace VacancySuggestion {
@@ -214,16 +218,23 @@ declare namespace VacancySuggestion {
214
218
  interface Model extends BaseModel {
215
219
  clientId: string;
216
220
  vacancyId: string;
217
- vacancyCompany: string;
218
- vacancyPosition: string;
219
221
  status: string;
220
- createdAt: Date | string;
221
- updatedAt?: Date | string;
222
+ company: string;
223
+ position: string;
224
+ location: string;
225
+ description: string;
226
+ advertisingUrl: string;
227
+ applicationUrl: string;
228
+ applicationDomain: string;
229
+ advertisingDomain: string;
230
+ fullPageText: string;
231
+ jobId: string;
232
+ category: Vacancy.Category;
222
233
  }
223
234
  const collection: (clientId: string) => string;
224
235
  const document: (clientId: string, suggestionId: string) => string;
225
236
  const formatSummary: (suggestion: VacancySuggestion.Model) => string;
226
- const createNew: (clientId: string, vacancyId: string, vacancyCompany: string, vacancyPosition: string, status?: string) => VacancySuggestion.Model;
237
+ const createNew: (clientId: string, vacancyId: string, status: string, company: string, position: string, location: string, description: string, advertisingUrl: string, applicationUrl: string, applicationDomain: string, advertisingDomain: string, fullPageText: string, jobId: string, category: Vacancy.Category) => VacancySuggestion.Model;
227
238
  }
228
239
 
229
240
  export { Application, ApplicationQuestion, ApplicationQuestionDocument, AuthUser, AuthUserCollectionPath, AuthUserUtils, Client, ClientData, ClientLogin, ClientQuestionAnswerPair, Question, QuestionData, UserQuestion, UserQuestionData, Vacancy, VacancySuggestion, getAuthUserDocumentPath };
package/dist/index.d.ts CHANGED
@@ -14,7 +14,7 @@ declare namespace Application {
14
14
  interface Model extends BaseModel {
15
15
  vacancyId: string;
16
16
  clientId: string;
17
- status: "new" | "submitted" | "interviewing" | "accepted" | "rejected" | "withdrawn" | "applying" | "suggested" | "approved";
17
+ status: Status;
18
18
  coverLetter?: string;
19
19
  resume?: string;
20
20
  company?: string;
@@ -28,6 +28,8 @@ declare namespace Application {
28
28
  description?: string;
29
29
  fullPageText?: string;
30
30
  }
31
+ type Status = "new" | "submitted" | "interviewing" | "accepted" | "rejected" | "withdrawn" | "applying" | "suggested" | "approved";
32
+ const StatusOptions: readonly Status[];
31
33
  const collection: (clientId: string) => string;
32
34
  const document: (clientId: string, applicationId: string) => string;
33
35
  const formatSummary: (application: Application.Model) => string;
@@ -187,6 +189,7 @@ declare namespace Vacancy {
187
189
  /**
188
190
  * Represents a job vacancy
189
191
  */
192
+ type Category = "Accounting" | "Administration & Office Support" | "Advertising, Arts & Media" | "Banking & Financial Services" | "Call Centre & Customer Service" | "CEO & General Management" | "Community Services & Development" | "Construction" | "Consulting & Strategy" | "Design & Architecture" | "Education & Training" | "Engineering" | "Farming, Animals & Conservation" | "Government & Defence" | "Healthcare & Medical" | "Hospitality & Tourism" | "Human Resources & Recruitment" | "Information & Communication Technology" | "Insurance & Superannuation" | "Legal" | "Manufacturing, Transport & Logistics" | "Marketing & Communications" | "Mining, Resources & Energy" | "Real Estate & Property" | "Retail & Consumer Products" | "Sales" | "Science & Technology" | "Self Employment" | "Sport & Recreation" | "Trades & Services";
190
193
  interface Model extends BaseModel {
191
194
  company: string;
192
195
  position: string;
@@ -198,13 +201,14 @@ declare namespace Vacancy {
198
201
  advertisingDomain: string;
199
202
  fullPageText: string;
200
203
  jobId: string;
204
+ category: Category;
201
205
  suggestedTo?: string[];
202
206
  }
203
207
  const collection: () => string;
204
208
  const document: (vacancyId: string) => string;
205
209
  const formatSummary: (vacancy: Vacancy.Model) => string;
206
210
  const formatDate: (date: Date | string) => string;
207
- const createNew: (company: string, position: string, location: string, description: string, advertisingUrl: string, applicationUrl: string, applicationDomain: string, advertisingDomain: string, fullPageText: string, jobId: string) => Vacancy.Model;
211
+ const createNew: (company: string, position: string, location: string, description: string, advertisingUrl: string, applicationUrl: string, applicationDomain: string, advertisingDomain: string, fullPageText: string, jobId: string, category: Category) => Vacancy.Model;
208
212
  }
209
213
 
210
214
  declare namespace VacancySuggestion {
@@ -214,16 +218,23 @@ declare namespace VacancySuggestion {
214
218
  interface Model extends BaseModel {
215
219
  clientId: string;
216
220
  vacancyId: string;
217
- vacancyCompany: string;
218
- vacancyPosition: string;
219
221
  status: string;
220
- createdAt: Date | string;
221
- updatedAt?: Date | string;
222
+ company: string;
223
+ position: string;
224
+ location: string;
225
+ description: string;
226
+ advertisingUrl: string;
227
+ applicationUrl: string;
228
+ applicationDomain: string;
229
+ advertisingDomain: string;
230
+ fullPageText: string;
231
+ jobId: string;
232
+ category: Vacancy.Category;
222
233
  }
223
234
  const collection: (clientId: string) => string;
224
235
  const document: (clientId: string, suggestionId: string) => string;
225
236
  const formatSummary: (suggestion: VacancySuggestion.Model) => string;
226
- const createNew: (clientId: string, vacancyId: string, vacancyCompany: string, vacancyPosition: string, status?: string) => VacancySuggestion.Model;
237
+ const createNew: (clientId: string, vacancyId: string, status: string, company: string, position: string, location: string, description: string, advertisingUrl: string, applicationUrl: string, applicationDomain: string, advertisingDomain: string, fullPageText: string, jobId: string, category: Vacancy.Category) => VacancySuggestion.Model;
227
238
  }
228
239
 
229
240
  export { Application, ApplicationQuestion, ApplicationQuestionDocument, AuthUser, AuthUserCollectionPath, AuthUserUtils, Client, ClientData, ClientLogin, ClientQuestionAnswerPair, Question, QuestionData, UserQuestion, UserQuestionData, Vacancy, VacancySuggestion, getAuthUserDocumentPath };
package/dist/index.js CHANGED
@@ -35,6 +35,17 @@ module.exports = __toCommonJS(src_exports);
35
35
  // src/models/Application.ts
36
36
  var Application;
37
37
  ((Application2) => {
38
+ Application2.StatusOptions = [
39
+ "new",
40
+ "submitted",
41
+ "interviewing",
42
+ "accepted",
43
+ "rejected",
44
+ "withdrawn",
45
+ "applying",
46
+ "suggested",
47
+ "approved"
48
+ ];
38
49
  Application2.collection = (clientId) => `clients/${clientId}/applications`;
39
50
  Application2.document = (clientId, applicationId) => `clients/${clientId}/applications/${applicationId}`;
40
51
  Application2.formatSummary = (application) => {
@@ -222,7 +233,7 @@ var Vacancy;
222
233
  const dateObj = date instanceof Date ? date : new Date(date);
223
234
  return dateObj.toLocaleDateString();
224
235
  };
225
- Vacancy2.createNew = (company, position, location, description, advertisingUrl, applicationUrl, applicationDomain, advertisingDomain, fullPageText, jobId) => {
236
+ Vacancy2.createNew = (company, position, location, description, advertisingUrl, applicationUrl, applicationDomain, advertisingDomain, fullPageText, jobId, category) => {
226
237
  return {
227
238
  company,
228
239
  position,
@@ -234,6 +245,7 @@ var Vacancy;
234
245
  advertisingDomain,
235
246
  fullPageText,
236
247
  jobId,
248
+ category,
237
249
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
238
250
  };
239
251
  };
@@ -245,15 +257,24 @@ var VacancySuggestion;
245
257
  VacancySuggestion2.collection = (clientId) => `clients/${clientId}/vacancySuggestions`;
246
258
  VacancySuggestion2.document = (clientId, suggestionId) => `clients/${clientId}/vacancySuggestions/${suggestionId}`;
247
259
  VacancySuggestion2.formatSummary = (suggestion) => {
248
- return `${suggestion.vacancyPosition} at ${suggestion.vacancyCompany} (${suggestion.status})`;
260
+ return `${suggestion.position} at ${suggestion.company} (${suggestion.status})`;
249
261
  };
250
- VacancySuggestion2.createNew = (clientId, vacancyId, vacancyCompany, vacancyPosition, status = "new") => {
262
+ VacancySuggestion2.createNew = (clientId, vacancyId, status, company, position, location, description, advertisingUrl, applicationUrl, applicationDomain, advertisingDomain, fullPageText, jobId, category) => {
251
263
  return {
252
264
  clientId,
253
265
  vacancyId,
254
- vacancyCompany,
255
- vacancyPosition,
256
266
  status,
267
+ company,
268
+ position,
269
+ location,
270
+ description,
271
+ advertisingUrl,
272
+ applicationUrl,
273
+ applicationDomain,
274
+ advertisingDomain,
275
+ fullPageText,
276
+ jobId,
277
+ category,
257
278
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
258
279
  };
259
280
  };
package/dist/index.mjs CHANGED
@@ -1,6 +1,17 @@
1
1
  // src/models/Application.ts
2
2
  var Application;
3
3
  ((Application2) => {
4
+ Application2.StatusOptions = [
5
+ "new",
6
+ "submitted",
7
+ "interviewing",
8
+ "accepted",
9
+ "rejected",
10
+ "withdrawn",
11
+ "applying",
12
+ "suggested",
13
+ "approved"
14
+ ];
4
15
  Application2.collection = (clientId) => `clients/${clientId}/applications`;
5
16
  Application2.document = (clientId, applicationId) => `clients/${clientId}/applications/${applicationId}`;
6
17
  Application2.formatSummary = (application) => {
@@ -188,7 +199,7 @@ var Vacancy;
188
199
  const dateObj = date instanceof Date ? date : new Date(date);
189
200
  return dateObj.toLocaleDateString();
190
201
  };
191
- Vacancy2.createNew = (company, position, location, description, advertisingUrl, applicationUrl, applicationDomain, advertisingDomain, fullPageText, jobId) => {
202
+ Vacancy2.createNew = (company, position, location, description, advertisingUrl, applicationUrl, applicationDomain, advertisingDomain, fullPageText, jobId, category) => {
192
203
  return {
193
204
  company,
194
205
  position,
@@ -200,6 +211,7 @@ var Vacancy;
200
211
  advertisingDomain,
201
212
  fullPageText,
202
213
  jobId,
214
+ category,
203
215
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
204
216
  };
205
217
  };
@@ -211,15 +223,24 @@ var VacancySuggestion;
211
223
  VacancySuggestion2.collection = (clientId) => `clients/${clientId}/vacancySuggestions`;
212
224
  VacancySuggestion2.document = (clientId, suggestionId) => `clients/${clientId}/vacancySuggestions/${suggestionId}`;
213
225
  VacancySuggestion2.formatSummary = (suggestion) => {
214
- return `${suggestion.vacancyPosition} at ${suggestion.vacancyCompany} (${suggestion.status})`;
226
+ return `${suggestion.position} at ${suggestion.company} (${suggestion.status})`;
215
227
  };
216
- VacancySuggestion2.createNew = (clientId, vacancyId, vacancyCompany, vacancyPosition, status = "new") => {
228
+ VacancySuggestion2.createNew = (clientId, vacancyId, status, company, position, location, description, advertisingUrl, applicationUrl, applicationDomain, advertisingDomain, fullPageText, jobId, category) => {
217
229
  return {
218
230
  clientId,
219
231
  vacancyId,
220
- vacancyCompany,
221
- vacancyPosition,
222
232
  status,
233
+ company,
234
+ position,
235
+ location,
236
+ description,
237
+ advertisingUrl,
238
+ applicationUrl,
239
+ applicationDomain,
240
+ advertisingDomain,
241
+ fullPageText,
242
+ jobId,
243
+ category,
223
244
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
224
245
  };
225
246
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobsearch-works/firestore-models",
3
- "version": "1.0.10",
3
+ "version": "1.0.12",
4
4
  "description": "A shared library for standardizing Firestore document schemas and paths across multiple projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",