@jobsearch-works/firestore-models 1.0.22 → 1.0.24

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
@@ -156,8 +156,48 @@ declare namespace ClientQuestion {
156
156
  }
157
157
 
158
158
  declare namespace Vacancy {
159
- const CategoryValues: readonly ["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"];
160
- type Category = (typeof CategoryValues)[number];
159
+ /**
160
+ * Runtime constant object representing all categories.
161
+ */
162
+ const Category: {
163
+ readonly Accounting: "Accounting";
164
+ readonly AdministrationAndOfficeSupport: "Administration & Office Support";
165
+ readonly AdvertisingArtsAndMedia: "Advertising, Arts & Media";
166
+ readonly BankingAndFinancialServices: "Banking & Financial Services";
167
+ readonly CallCentreAndCustomerService: "Call Centre & Customer Service";
168
+ readonly CEOAndGeneralManagement: "CEO & General Management";
169
+ readonly CommunityServicesAndDevelopment: "Community Services & Development";
170
+ readonly Construction: "Construction";
171
+ readonly ConsultingAndStrategy: "Consulting & Strategy";
172
+ readonly DesignAndArchitecture: "Design & Architecture";
173
+ readonly EducationAndTraining: "Education & Training";
174
+ readonly Engineering: "Engineering";
175
+ readonly FarmingAnimalsAndConservation: "Farming, Animals & Conservation";
176
+ readonly GovernmentAndDefence: "Government & Defence";
177
+ readonly HealthcareAndMedical: "Healthcare & Medical";
178
+ readonly HospitalityAndTourism: "Hospitality & Tourism";
179
+ readonly HumanResourcesAndRecruitment: "Human Resources & Recruitment";
180
+ readonly InformationAndCommunicationTechnology: "Information & Communication Technology";
181
+ readonly InsuranceAndSuperannuation: "Insurance & Superannuation";
182
+ readonly Legal: "Legal";
183
+ readonly ManufacturingTransportAndLogistics: "Manufacturing, Transport & Logistics";
184
+ readonly MarketingAndCommunications: "Marketing & Communications";
185
+ readonly MiningResourcesAndEnergy: "Mining, Resources & Energy";
186
+ readonly RealEstateAndProperty: "Real Estate & Property";
187
+ readonly RetailAndConsumerProducts: "Retail & Consumer Products";
188
+ readonly Sales: "Sales";
189
+ readonly ScienceAndTechnology: "Science & Technology";
190
+ readonly SelfEmployment: "Self Employment";
191
+ readonly SportAndRecreation: "Sport & Recreation";
192
+ readonly TradesAndServices: "Trades & Services";
193
+ };
194
+ /**
195
+ * Type representing a valid category value.
196
+ */
197
+ type Category = (typeof Category)[keyof typeof Category];
198
+ /**
199
+ * Vacancy model definition.
200
+ */
161
201
  interface Model extends BaseModel {
162
202
  company: string;
163
203
  position: string;
@@ -172,10 +212,25 @@ declare namespace Vacancy {
172
212
  category: Category;
173
213
  suggestedTo?: string[];
174
214
  }
215
+ /**
216
+ * Returns the Firestore collection path for vacancies.
217
+ */
175
218
  const collection: () => string;
219
+ /**
220
+ * Returns the Firestore document path for a specific vacancy.
221
+ */
176
222
  const document: (vacancyId: string) => string;
223
+ /**
224
+ * Formats a short summary of a vacancy.
225
+ */
177
226
  const formatSummary: (vacancy: Vacancy.Model) => string;
227
+ /**
228
+ * Formats a date into a localized string.
229
+ */
178
230
  const formatDate: (date: Date | string) => string;
231
+ /**
232
+ * Creates a new Vacancy.Model with the given data.
233
+ */
179
234
  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;
180
235
  }
181
236
 
@@ -205,4 +260,20 @@ declare namespace VacancySuggestion {
205
260
  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;
206
261
  }
207
262
 
208
- export { Application, AuthUser, AuthUserCollectionPath, AuthUserUtils, Client, ClientData, ClientLogin, ClientQuestion, Vacancy, VacancySuggestion, getAuthUserDocumentPath };
263
+ declare namespace ApplicationQuestion {
264
+ /**
265
+ * Represents a question and answer for a job application
266
+ */
267
+ interface Model extends BaseModel {
268
+ questionText: string;
269
+ answerText?: string;
270
+ type: Type;
271
+ }
272
+ type Type = "text" | "select";
273
+ const TypeOptions: readonly Type[];
274
+ const collection: (clientId: string, applicationId: string) => string;
275
+ const document: (clientId: string, applicationId: string, questionId: string) => string;
276
+ const createNew: (questionText: string, type: Type, answerText?: string) => ApplicationQuestion.Model;
277
+ }
278
+
279
+ export { Application, ApplicationQuestion, AuthUser, AuthUserCollectionPath, AuthUserUtils, Client, ClientData, ClientLogin, ClientQuestion, Vacancy, VacancySuggestion, getAuthUserDocumentPath };
package/dist/index.d.ts CHANGED
@@ -156,8 +156,48 @@ declare namespace ClientQuestion {
156
156
  }
157
157
 
158
158
  declare namespace Vacancy {
159
- const CategoryValues: readonly ["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"];
160
- type Category = (typeof CategoryValues)[number];
159
+ /**
160
+ * Runtime constant object representing all categories.
161
+ */
162
+ const Category: {
163
+ readonly Accounting: "Accounting";
164
+ readonly AdministrationAndOfficeSupport: "Administration & Office Support";
165
+ readonly AdvertisingArtsAndMedia: "Advertising, Arts & Media";
166
+ readonly BankingAndFinancialServices: "Banking & Financial Services";
167
+ readonly CallCentreAndCustomerService: "Call Centre & Customer Service";
168
+ readonly CEOAndGeneralManagement: "CEO & General Management";
169
+ readonly CommunityServicesAndDevelopment: "Community Services & Development";
170
+ readonly Construction: "Construction";
171
+ readonly ConsultingAndStrategy: "Consulting & Strategy";
172
+ readonly DesignAndArchitecture: "Design & Architecture";
173
+ readonly EducationAndTraining: "Education & Training";
174
+ readonly Engineering: "Engineering";
175
+ readonly FarmingAnimalsAndConservation: "Farming, Animals & Conservation";
176
+ readonly GovernmentAndDefence: "Government & Defence";
177
+ readonly HealthcareAndMedical: "Healthcare & Medical";
178
+ readonly HospitalityAndTourism: "Hospitality & Tourism";
179
+ readonly HumanResourcesAndRecruitment: "Human Resources & Recruitment";
180
+ readonly InformationAndCommunicationTechnology: "Information & Communication Technology";
181
+ readonly InsuranceAndSuperannuation: "Insurance & Superannuation";
182
+ readonly Legal: "Legal";
183
+ readonly ManufacturingTransportAndLogistics: "Manufacturing, Transport & Logistics";
184
+ readonly MarketingAndCommunications: "Marketing & Communications";
185
+ readonly MiningResourcesAndEnergy: "Mining, Resources & Energy";
186
+ readonly RealEstateAndProperty: "Real Estate & Property";
187
+ readonly RetailAndConsumerProducts: "Retail & Consumer Products";
188
+ readonly Sales: "Sales";
189
+ readonly ScienceAndTechnology: "Science & Technology";
190
+ readonly SelfEmployment: "Self Employment";
191
+ readonly SportAndRecreation: "Sport & Recreation";
192
+ readonly TradesAndServices: "Trades & Services";
193
+ };
194
+ /**
195
+ * Type representing a valid category value.
196
+ */
197
+ type Category = (typeof Category)[keyof typeof Category];
198
+ /**
199
+ * Vacancy model definition.
200
+ */
161
201
  interface Model extends BaseModel {
162
202
  company: string;
163
203
  position: string;
@@ -172,10 +212,25 @@ declare namespace Vacancy {
172
212
  category: Category;
173
213
  suggestedTo?: string[];
174
214
  }
215
+ /**
216
+ * Returns the Firestore collection path for vacancies.
217
+ */
175
218
  const collection: () => string;
219
+ /**
220
+ * Returns the Firestore document path for a specific vacancy.
221
+ */
176
222
  const document: (vacancyId: string) => string;
223
+ /**
224
+ * Formats a short summary of a vacancy.
225
+ */
177
226
  const formatSummary: (vacancy: Vacancy.Model) => string;
227
+ /**
228
+ * Formats a date into a localized string.
229
+ */
178
230
  const formatDate: (date: Date | string) => string;
231
+ /**
232
+ * Creates a new Vacancy.Model with the given data.
233
+ */
179
234
  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;
180
235
  }
181
236
 
@@ -205,4 +260,20 @@ declare namespace VacancySuggestion {
205
260
  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;
206
261
  }
207
262
 
208
- export { Application, AuthUser, AuthUserCollectionPath, AuthUserUtils, Client, ClientData, ClientLogin, ClientQuestion, Vacancy, VacancySuggestion, getAuthUserDocumentPath };
263
+ declare namespace ApplicationQuestion {
264
+ /**
265
+ * Represents a question and answer for a job application
266
+ */
267
+ interface Model extends BaseModel {
268
+ questionText: string;
269
+ answerText?: string;
270
+ type: Type;
271
+ }
272
+ type Type = "text" | "select";
273
+ const TypeOptions: readonly Type[];
274
+ const collection: (clientId: string, applicationId: string) => string;
275
+ const document: (clientId: string, applicationId: string, questionId: string) => string;
276
+ const createNew: (questionText: string, type: Type, answerText?: string) => ApplicationQuestion.Model;
277
+ }
278
+
279
+ export { Application, ApplicationQuestion, AuthUser, AuthUserCollectionPath, AuthUserUtils, Client, ClientData, ClientLogin, ClientQuestion, Vacancy, VacancySuggestion, getAuthUserDocumentPath };
package/dist/index.js CHANGED
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var src_exports = {};
22
22
  __export(src_exports, {
23
23
  Application: () => Application,
24
+ ApplicationQuestion: () => ApplicationQuestion,
24
25
  AuthUserCollectionPath: () => AuthUserCollectionPath,
25
26
  AuthUserUtils: () => AuthUserUtils,
26
27
  Client: () => Client,
@@ -243,38 +244,38 @@ var ClientQuestion;
243
244
  // src/models/Vacancy.ts
244
245
  var Vacancy;
245
246
  ((Vacancy2) => {
246
- Vacancy2.CategoryValues = [
247
- "Accounting",
248
- "Administration & Office Support",
249
- "Advertising, Arts & Media",
250
- "Banking & Financial Services",
251
- "Call Centre & Customer Service",
252
- "CEO & General Management",
253
- "Community Services & Development",
254
- "Construction",
255
- "Consulting & Strategy",
256
- "Design & Architecture",
257
- "Education & Training",
258
- "Engineering",
259
- "Farming, Animals & Conservation",
260
- "Government & Defence",
261
- "Healthcare & Medical",
262
- "Hospitality & Tourism",
263
- "Human Resources & Recruitment",
264
- "Information & Communication Technology",
265
- "Insurance & Superannuation",
266
- "Legal",
267
- "Manufacturing, Transport & Logistics",
268
- "Marketing & Communications",
269
- "Mining, Resources & Energy",
270
- "Real Estate & Property",
271
- "Retail & Consumer Products",
272
- "Sales",
273
- "Science & Technology",
274
- "Self Employment",
275
- "Sport & Recreation",
276
- "Trades & Services"
277
- ];
247
+ Vacancy2.Category = {
248
+ Accounting: "Accounting",
249
+ AdministrationAndOfficeSupport: "Administration & Office Support",
250
+ AdvertisingArtsAndMedia: "Advertising, Arts & Media",
251
+ BankingAndFinancialServices: "Banking & Financial Services",
252
+ CallCentreAndCustomerService: "Call Centre & Customer Service",
253
+ CEOAndGeneralManagement: "CEO & General Management",
254
+ CommunityServicesAndDevelopment: "Community Services & Development",
255
+ Construction: "Construction",
256
+ ConsultingAndStrategy: "Consulting & Strategy",
257
+ DesignAndArchitecture: "Design & Architecture",
258
+ EducationAndTraining: "Education & Training",
259
+ Engineering: "Engineering",
260
+ FarmingAnimalsAndConservation: "Farming, Animals & Conservation",
261
+ GovernmentAndDefence: "Government & Defence",
262
+ HealthcareAndMedical: "Healthcare & Medical",
263
+ HospitalityAndTourism: "Hospitality & Tourism",
264
+ HumanResourcesAndRecruitment: "Human Resources & Recruitment",
265
+ InformationAndCommunicationTechnology: "Information & Communication Technology",
266
+ InsuranceAndSuperannuation: "Insurance & Superannuation",
267
+ Legal: "Legal",
268
+ ManufacturingTransportAndLogistics: "Manufacturing, Transport & Logistics",
269
+ MarketingAndCommunications: "Marketing & Communications",
270
+ MiningResourcesAndEnergy: "Mining, Resources & Energy",
271
+ RealEstateAndProperty: "Real Estate & Property",
272
+ RetailAndConsumerProducts: "Retail & Consumer Products",
273
+ Sales: "Sales",
274
+ ScienceAndTechnology: "Science & Technology",
275
+ SelfEmployment: "Self Employment",
276
+ SportAndRecreation: "Sport & Recreation",
277
+ TradesAndServices: "Trades & Services"
278
+ };
278
279
  Vacancy2.collection = () => "vacancies";
279
280
  Vacancy2.document = (vacancyId) => `vacancies/${vacancyId}`;
280
281
  Vacancy2.formatSummary = (vacancy) => `${vacancy.position} at ${vacancy.company} (${vacancy.location})`;
@@ -328,9 +329,26 @@ var VacancySuggestion;
328
329
  };
329
330
  };
330
331
  })(VacancySuggestion || (VacancySuggestion = {}));
332
+
333
+ // src/models/ApplicationQuestion.ts
334
+ var ApplicationQuestion;
335
+ ((ApplicationQuestion2) => {
336
+ ApplicationQuestion2.TypeOptions = ["text", "select"];
337
+ ApplicationQuestion2.collection = (clientId, applicationId) => `clients/${clientId}/applications/${applicationId}/questions`;
338
+ ApplicationQuestion2.document = (clientId, applicationId, questionId) => `clients/${clientId}/applications/${applicationId}/questions/${questionId}`;
339
+ ApplicationQuestion2.createNew = (questionText, type, answerText) => {
340
+ return {
341
+ questionText,
342
+ type,
343
+ answerText,
344
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
345
+ };
346
+ };
347
+ })(ApplicationQuestion || (ApplicationQuestion = {}));
331
348
  // Annotate the CommonJS export names for ESM import in node:
332
349
  0 && (module.exports = {
333
350
  Application,
351
+ ApplicationQuestion,
334
352
  AuthUserCollectionPath,
335
353
  AuthUserUtils,
336
354
  Client,
package/dist/index.mjs CHANGED
@@ -208,38 +208,38 @@ var ClientQuestion;
208
208
  // src/models/Vacancy.ts
209
209
  var Vacancy;
210
210
  ((Vacancy2) => {
211
- Vacancy2.CategoryValues = [
212
- "Accounting",
213
- "Administration & Office Support",
214
- "Advertising, Arts & Media",
215
- "Banking & Financial Services",
216
- "Call Centre & Customer Service",
217
- "CEO & General Management",
218
- "Community Services & Development",
219
- "Construction",
220
- "Consulting & Strategy",
221
- "Design & Architecture",
222
- "Education & Training",
223
- "Engineering",
224
- "Farming, Animals & Conservation",
225
- "Government & Defence",
226
- "Healthcare & Medical",
227
- "Hospitality & Tourism",
228
- "Human Resources & Recruitment",
229
- "Information & Communication Technology",
230
- "Insurance & Superannuation",
231
- "Legal",
232
- "Manufacturing, Transport & Logistics",
233
- "Marketing & Communications",
234
- "Mining, Resources & Energy",
235
- "Real Estate & Property",
236
- "Retail & Consumer Products",
237
- "Sales",
238
- "Science & Technology",
239
- "Self Employment",
240
- "Sport & Recreation",
241
- "Trades & Services"
242
- ];
211
+ Vacancy2.Category = {
212
+ Accounting: "Accounting",
213
+ AdministrationAndOfficeSupport: "Administration & Office Support",
214
+ AdvertisingArtsAndMedia: "Advertising, Arts & Media",
215
+ BankingAndFinancialServices: "Banking & Financial Services",
216
+ CallCentreAndCustomerService: "Call Centre & Customer Service",
217
+ CEOAndGeneralManagement: "CEO & General Management",
218
+ CommunityServicesAndDevelopment: "Community Services & Development",
219
+ Construction: "Construction",
220
+ ConsultingAndStrategy: "Consulting & Strategy",
221
+ DesignAndArchitecture: "Design & Architecture",
222
+ EducationAndTraining: "Education & Training",
223
+ Engineering: "Engineering",
224
+ FarmingAnimalsAndConservation: "Farming, Animals & Conservation",
225
+ GovernmentAndDefence: "Government & Defence",
226
+ HealthcareAndMedical: "Healthcare & Medical",
227
+ HospitalityAndTourism: "Hospitality & Tourism",
228
+ HumanResourcesAndRecruitment: "Human Resources & Recruitment",
229
+ InformationAndCommunicationTechnology: "Information & Communication Technology",
230
+ InsuranceAndSuperannuation: "Insurance & Superannuation",
231
+ Legal: "Legal",
232
+ ManufacturingTransportAndLogistics: "Manufacturing, Transport & Logistics",
233
+ MarketingAndCommunications: "Marketing & Communications",
234
+ MiningResourcesAndEnergy: "Mining, Resources & Energy",
235
+ RealEstateAndProperty: "Real Estate & Property",
236
+ RetailAndConsumerProducts: "Retail & Consumer Products",
237
+ Sales: "Sales",
238
+ ScienceAndTechnology: "Science & Technology",
239
+ SelfEmployment: "Self Employment",
240
+ SportAndRecreation: "Sport & Recreation",
241
+ TradesAndServices: "Trades & Services"
242
+ };
243
243
  Vacancy2.collection = () => "vacancies";
244
244
  Vacancy2.document = (vacancyId) => `vacancies/${vacancyId}`;
245
245
  Vacancy2.formatSummary = (vacancy) => `${vacancy.position} at ${vacancy.company} (${vacancy.location})`;
@@ -293,8 +293,25 @@ var VacancySuggestion;
293
293
  };
294
294
  };
295
295
  })(VacancySuggestion || (VacancySuggestion = {}));
296
+
297
+ // src/models/ApplicationQuestion.ts
298
+ var ApplicationQuestion;
299
+ ((ApplicationQuestion2) => {
300
+ ApplicationQuestion2.TypeOptions = ["text", "select"];
301
+ ApplicationQuestion2.collection = (clientId, applicationId) => `clients/${clientId}/applications/${applicationId}/questions`;
302
+ ApplicationQuestion2.document = (clientId, applicationId, questionId) => `clients/${clientId}/applications/${applicationId}/questions/${questionId}`;
303
+ ApplicationQuestion2.createNew = (questionText, type, answerText) => {
304
+ return {
305
+ questionText,
306
+ type,
307
+ answerText,
308
+ createdAt: (/* @__PURE__ */ new Date()).toISOString()
309
+ };
310
+ };
311
+ })(ApplicationQuestion || (ApplicationQuestion = {}));
296
312
  export {
297
313
  Application,
314
+ ApplicationQuestion,
298
315
  AuthUserCollectionPath,
299
316
  AuthUserUtils,
300
317
  Client,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobsearch-works/firestore-models",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
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",