@jobsearch-works/firestore-models 4.0.2 → 4.1.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/dist/index.d.mts CHANGED
@@ -583,6 +583,18 @@ interface UserPublic {
583
583
  updatedAt?: Date | string;
584
584
  }
585
585
 
586
+ type ApplicationQuestionType = "text" | "select" | "radio" | "checkbox" | "textarea" | "file";
587
+ declare const ApplicationQuestionTypeOptions: readonly ApplicationQuestionType[];
588
+ interface ApplicationQuestion {
589
+ id?: string;
590
+ questionText: string;
591
+ answerText?: string;
592
+ type: ApplicationQuestionType;
593
+ selector?: string;
594
+ action?: string;
595
+ options?: string[];
596
+ }
597
+
586
598
  declare const VacancyCategory: {
587
599
  readonly Accounting: "Accounting";
588
600
  readonly AdministrationAndOfficeSupport: "Administration & Office Support";
@@ -631,6 +643,7 @@ interface Vacancy {
631
643
  category: VacancyCategory;
632
644
  suggestedTo?: string[];
633
645
  embeddedValue?: number[];
646
+ questions?: Omit<ApplicationQuestion, "answerText">[];
634
647
  createdAt?: Date | string;
635
648
  updatedAt?: Date | string;
636
649
  }
@@ -643,6 +656,19 @@ interface VacancySuggestion {
643
656
  createdAt?: Date | string;
644
657
  }
645
658
 
659
+ interface WeeklyApplication {
660
+ readonly id?: string;
661
+ readonly week: number;
662
+ readonly startDate: string;
663
+ readonly endDate: string;
664
+ readonly applicationsDone: number;
665
+ }
666
+
667
+ interface AdminReport {
668
+ readonly agentName: string;
669
+ readonly applications: WeeklyApplication;
670
+ }
671
+
646
672
  /**
647
673
  * Address interface for client resume
648
674
  */
@@ -740,6 +766,7 @@ interface Application {
740
766
  assignedTo?: string;
741
767
  coverLetter?: string;
742
768
  resume?: ClientResume;
769
+ questions?: ApplicationQuestion[];
743
770
  submittedAt?: Date | string;
744
771
  interviewingAt?: Date | string;
745
772
  acceptedAt?: Date | string;
@@ -762,20 +789,6 @@ interface Application {
762
789
  updatedAt?: Date | string;
763
790
  }
764
791
 
765
- type ApplicationQuestionType = "text" | "select";
766
- declare const ApplicationQuestionTypeOptions: readonly ApplicationQuestionType[];
767
- interface ApplicationQuestion {
768
- id?: string;
769
- questionText: string;
770
- answerText?: string;
771
- clientId: string;
772
- type: ApplicationQuestionType;
773
- createdAt?: Date | string;
774
- updatedAt?: Date | string;
775
- selector?: string;
776
- action?: string;
777
- }
778
-
779
792
  /**
780
793
  * Embedded sub-object within Client document
781
794
  * @see Client - Parent document interface
@@ -801,6 +814,15 @@ interface ClientPersonalData {
801
814
  ethnicity?: string;
802
815
  disabilityStatus?: string;
803
816
  securityClearance?: string;
817
+ workEligibility?: 'Australian Citizen' | 'Permanent Resident' | 'Temporary Visa' | 'Student Visa' | 'Working Holiday Visa' | 'Other';
818
+ visaType?: string;
819
+ workRestrictions?: string;
820
+ emergencyContactName?: string;
821
+ emergencyContactPhone?: string;
822
+ emergencyContactRelationship?: string;
823
+ backgroundCheckConsent?: 'Yes' | 'No';
824
+ drugTestConsent?: 'Yes' | 'No';
825
+ travelWillingness?: 'Yes' | 'No' | 'Sometimes';
804
826
  createdAt?: Date | string;
805
827
  updatedAt?: Date | string;
806
828
  photoUrl?: string;
@@ -824,8 +846,15 @@ interface ClientJobPreferences {
824
846
  jobCategories: JobCategory[];
825
847
  locations: LocationId[];
826
848
  salaryExpectation?: number;
849
+ minSalary?: number;
850
+ maxSalary?: number;
827
851
  employmentTypes: string[];
828
852
  remotePreference: 'remote' | 'hybrid' | 'office';
853
+ earliestStartDate?: string;
854
+ workAvailability?: 'full-time' | 'part-time' | 'casual' | 'contract' | 'flexible';
855
+ weekendWork?: 'yes' | 'no' | 'sometimes';
856
+ shiftWork?: 'yes' | 'no' | 'sometimes';
857
+ travelWillingness?: 'yes' | 'no' | 'sometimes';
829
858
  visaSponsorshipRequired: boolean;
830
859
  createdAt?: Date | string;
831
860
  updatedAt?: Date | string;
@@ -1024,14 +1053,6 @@ declare const firestorePaths: {
1024
1053
  readonly applications: {
1025
1054
  readonly collection: (clientId: string) => string;
1026
1055
  readonly doc: (clientId: string, applicationId: string) => string;
1027
- readonly virtualInterview: {
1028
- readonly collection: (clientId: string, applicationId: string) => string;
1029
- readonly doc: (clientId: string, applicationId: string, interviewId: string) => string;
1030
- };
1031
- readonly questions: {
1032
- readonly collection: (clientId: string, applicationId: string) => string;
1033
- readonly doc: (clientId: string, applicationId: string, questionId: string) => string;
1034
- };
1035
1056
  readonly notes: {
1036
1057
  readonly collection: (clientId: string, applicationId: string) => string;
1037
1058
  readonly doc: (clientId: string, applicationId: string, noteId: string) => string;
@@ -1065,6 +1086,10 @@ declare const firestorePaths: {
1065
1086
  readonly agents: {
1066
1087
  readonly collection: () => string;
1067
1088
  readonly doc: (id: string) => string;
1089
+ readonly weeklyApplications: {
1090
+ readonly collection: (agentId: string) => string;
1091
+ readonly doc: (agentId: string, docId: string) => string;
1092
+ };
1068
1093
  };
1069
1094
  readonly companies: {
1070
1095
  readonly collection: () => string;
@@ -1076,4 +1101,4 @@ declare const firestorePaths: {
1076
1101
  };
1077
1102
  };
1078
1103
 
1079
- export { Address, Agent, AgentStatus, Application, ApplicationQuestion, ApplicationQuestionType, ApplicationQuestionTypeOptions, ApplicationStatus, AuthEmail, AuthUser, Certification, Client, ClientAccessToken, ClientCompanyPreferences, ClientEmail, ClientGmailToken, ClientInitialQuestion, ClientJobPreferences, ClientLogin, ClientPersonalData, ClientQuestion, ClientResume, ClientStatus, ClientStatusEnum, ClientVirtualInterview, Companies, Education, EmailCategory, EmailLog, Experience, FirestoreTimestamp, JobCategory, JobTitle, LocationId, Project, UserPublic, Vacancy, VacancyCategory, VacancySuggestion, countries, firestorePaths, initialQuestions, jobClassifications, locations };
1104
+ export { Address, AdminReport, Agent, AgentStatus, Application, ApplicationQuestion, ApplicationQuestionType, ApplicationQuestionTypeOptions, ApplicationStatus, AuthEmail, AuthUser, Certification, Client, ClientAccessToken, ClientCompanyPreferences, ClientEmail, ClientGmailToken, ClientInitialQuestion, ClientJobPreferences, ClientLogin, ClientPersonalData, ClientQuestion, ClientResume, ClientStatus, ClientStatusEnum, ClientVirtualInterview, Companies, Education, EmailCategory, EmailLog, Experience, FirestoreTimestamp, JobCategory, JobTitle, LocationId, Project, UserPublic, Vacancy, VacancyCategory, VacancySuggestion, countries, firestorePaths, initialQuestions, jobClassifications, locations };
package/dist/index.d.ts CHANGED
@@ -583,6 +583,18 @@ interface UserPublic {
583
583
  updatedAt?: Date | string;
584
584
  }
585
585
 
586
+ type ApplicationQuestionType = "text" | "select" | "radio" | "checkbox" | "textarea" | "file";
587
+ declare const ApplicationQuestionTypeOptions: readonly ApplicationQuestionType[];
588
+ interface ApplicationQuestion {
589
+ id?: string;
590
+ questionText: string;
591
+ answerText?: string;
592
+ type: ApplicationQuestionType;
593
+ selector?: string;
594
+ action?: string;
595
+ options?: string[];
596
+ }
597
+
586
598
  declare const VacancyCategory: {
587
599
  readonly Accounting: "Accounting";
588
600
  readonly AdministrationAndOfficeSupport: "Administration & Office Support";
@@ -631,6 +643,7 @@ interface Vacancy {
631
643
  category: VacancyCategory;
632
644
  suggestedTo?: string[];
633
645
  embeddedValue?: number[];
646
+ questions?: Omit<ApplicationQuestion, "answerText">[];
634
647
  createdAt?: Date | string;
635
648
  updatedAt?: Date | string;
636
649
  }
@@ -643,6 +656,19 @@ interface VacancySuggestion {
643
656
  createdAt?: Date | string;
644
657
  }
645
658
 
659
+ interface WeeklyApplication {
660
+ readonly id?: string;
661
+ readonly week: number;
662
+ readonly startDate: string;
663
+ readonly endDate: string;
664
+ readonly applicationsDone: number;
665
+ }
666
+
667
+ interface AdminReport {
668
+ readonly agentName: string;
669
+ readonly applications: WeeklyApplication;
670
+ }
671
+
646
672
  /**
647
673
  * Address interface for client resume
648
674
  */
@@ -740,6 +766,7 @@ interface Application {
740
766
  assignedTo?: string;
741
767
  coverLetter?: string;
742
768
  resume?: ClientResume;
769
+ questions?: ApplicationQuestion[];
743
770
  submittedAt?: Date | string;
744
771
  interviewingAt?: Date | string;
745
772
  acceptedAt?: Date | string;
@@ -762,20 +789,6 @@ interface Application {
762
789
  updatedAt?: Date | string;
763
790
  }
764
791
 
765
- type ApplicationQuestionType = "text" | "select";
766
- declare const ApplicationQuestionTypeOptions: readonly ApplicationQuestionType[];
767
- interface ApplicationQuestion {
768
- id?: string;
769
- questionText: string;
770
- answerText?: string;
771
- clientId: string;
772
- type: ApplicationQuestionType;
773
- createdAt?: Date | string;
774
- updatedAt?: Date | string;
775
- selector?: string;
776
- action?: string;
777
- }
778
-
779
792
  /**
780
793
  * Embedded sub-object within Client document
781
794
  * @see Client - Parent document interface
@@ -801,6 +814,15 @@ interface ClientPersonalData {
801
814
  ethnicity?: string;
802
815
  disabilityStatus?: string;
803
816
  securityClearance?: string;
817
+ workEligibility?: 'Australian Citizen' | 'Permanent Resident' | 'Temporary Visa' | 'Student Visa' | 'Working Holiday Visa' | 'Other';
818
+ visaType?: string;
819
+ workRestrictions?: string;
820
+ emergencyContactName?: string;
821
+ emergencyContactPhone?: string;
822
+ emergencyContactRelationship?: string;
823
+ backgroundCheckConsent?: 'Yes' | 'No';
824
+ drugTestConsent?: 'Yes' | 'No';
825
+ travelWillingness?: 'Yes' | 'No' | 'Sometimes';
804
826
  createdAt?: Date | string;
805
827
  updatedAt?: Date | string;
806
828
  photoUrl?: string;
@@ -824,8 +846,15 @@ interface ClientJobPreferences {
824
846
  jobCategories: JobCategory[];
825
847
  locations: LocationId[];
826
848
  salaryExpectation?: number;
849
+ minSalary?: number;
850
+ maxSalary?: number;
827
851
  employmentTypes: string[];
828
852
  remotePreference: 'remote' | 'hybrid' | 'office';
853
+ earliestStartDate?: string;
854
+ workAvailability?: 'full-time' | 'part-time' | 'casual' | 'contract' | 'flexible';
855
+ weekendWork?: 'yes' | 'no' | 'sometimes';
856
+ shiftWork?: 'yes' | 'no' | 'sometimes';
857
+ travelWillingness?: 'yes' | 'no' | 'sometimes';
829
858
  visaSponsorshipRequired: boolean;
830
859
  createdAt?: Date | string;
831
860
  updatedAt?: Date | string;
@@ -1024,14 +1053,6 @@ declare const firestorePaths: {
1024
1053
  readonly applications: {
1025
1054
  readonly collection: (clientId: string) => string;
1026
1055
  readonly doc: (clientId: string, applicationId: string) => string;
1027
- readonly virtualInterview: {
1028
- readonly collection: (clientId: string, applicationId: string) => string;
1029
- readonly doc: (clientId: string, applicationId: string, interviewId: string) => string;
1030
- };
1031
- readonly questions: {
1032
- readonly collection: (clientId: string, applicationId: string) => string;
1033
- readonly doc: (clientId: string, applicationId: string, questionId: string) => string;
1034
- };
1035
1056
  readonly notes: {
1036
1057
  readonly collection: (clientId: string, applicationId: string) => string;
1037
1058
  readonly doc: (clientId: string, applicationId: string, noteId: string) => string;
@@ -1065,6 +1086,10 @@ declare const firestorePaths: {
1065
1086
  readonly agents: {
1066
1087
  readonly collection: () => string;
1067
1088
  readonly doc: (id: string) => string;
1089
+ readonly weeklyApplications: {
1090
+ readonly collection: (agentId: string) => string;
1091
+ readonly doc: (agentId: string, docId: string) => string;
1092
+ };
1068
1093
  };
1069
1094
  readonly companies: {
1070
1095
  readonly collection: () => string;
@@ -1076,4 +1101,4 @@ declare const firestorePaths: {
1076
1101
  };
1077
1102
  };
1078
1103
 
1079
- export { Address, Agent, AgentStatus, Application, ApplicationQuestion, ApplicationQuestionType, ApplicationQuestionTypeOptions, ApplicationStatus, AuthEmail, AuthUser, Certification, Client, ClientAccessToken, ClientCompanyPreferences, ClientEmail, ClientGmailToken, ClientInitialQuestion, ClientJobPreferences, ClientLogin, ClientPersonalData, ClientQuestion, ClientResume, ClientStatus, ClientStatusEnum, ClientVirtualInterview, Companies, Education, EmailCategory, EmailLog, Experience, FirestoreTimestamp, JobCategory, JobTitle, LocationId, Project, UserPublic, Vacancy, VacancyCategory, VacancySuggestion, countries, firestorePaths, initialQuestions, jobClassifications, locations };
1104
+ export { Address, AdminReport, Agent, AgentStatus, Application, ApplicationQuestion, ApplicationQuestionType, ApplicationQuestionTypeOptions, ApplicationStatus, AuthEmail, AuthUser, Certification, Client, ClientAccessToken, ClientCompanyPreferences, ClientEmail, ClientGmailToken, ClientInitialQuestion, ClientJobPreferences, ClientLogin, ClientPersonalData, ClientQuestion, ClientResume, ClientStatus, ClientStatusEnum, ClientVirtualInterview, Companies, Education, EmailCategory, EmailLog, Experience, FirestoreTimestamp, JobCategory, JobTitle, LocationId, Project, UserPublic, Vacancy, VacancyCategory, VacancySuggestion, countries, firestorePaths, initialQuestions, jobClassifications, locations };
package/dist/index.js CHANGED
@@ -1282,7 +1282,7 @@ var ApplicationStatus = {
1282
1282
  };
1283
1283
 
1284
1284
  // src/types/clients/ApplicationQuestion.ts
1285
- var ApplicationQuestionTypeOptions = ["text", "select"];
1285
+ var ApplicationQuestionTypeOptions = ["text", "select", "radio", "checkbox", "textarea", "file"];
1286
1286
 
1287
1287
  // src/paths/firestorePaths.ts
1288
1288
  var firestorePaths = {
@@ -1312,14 +1312,6 @@ var firestorePaths = {
1312
1312
  applications: {
1313
1313
  collection: (clientId) => `clients/${clientId}/applications`,
1314
1314
  doc: (clientId, applicationId) => `clients/${clientId}/applications/${applicationId}`,
1315
- virtualInterview: {
1316
- collection: (clientId, applicationId) => `clients/${clientId}/applications/${applicationId}/virtualInterview`,
1317
- doc: (clientId, applicationId, interviewId) => `clients/${clientId}/applications/${applicationId}/virtualInterview/${interviewId}`
1318
- },
1319
- questions: {
1320
- collection: (clientId, applicationId) => `clients/${clientId}/applications/${applicationId}/questions`,
1321
- doc: (clientId, applicationId, questionId) => `clients/${clientId}/applications/${applicationId}/questions/${questionId}`
1322
- },
1323
1315
  notes: {
1324
1316
  collection: (clientId, applicationId) => `clients/${clientId}/applications/${applicationId}/notes`,
1325
1317
  doc: (clientId, applicationId, noteId) => `clients/${clientId}/applications/${applicationId}/notes/${noteId}`
@@ -1352,7 +1344,11 @@ var firestorePaths = {
1352
1344
  },
1353
1345
  agents: {
1354
1346
  collection: () => "agents",
1355
- doc: (id) => `agents/${id}`
1347
+ doc: (id) => `agents/${id}`,
1348
+ weeklyApplications: {
1349
+ collection: (agentId) => `agents/${agentId}/weeklyApplications`,
1350
+ doc: (agentId, docId) => `agents/${agentId}/weeklyApplications/${docId}`
1351
+ }
1356
1352
  },
1357
1353
  companies: {
1358
1354
  collection: () => "companies",
package/dist/index.mjs CHANGED
@@ -1248,7 +1248,7 @@ var ApplicationStatus = {
1248
1248
  };
1249
1249
 
1250
1250
  // src/types/clients/ApplicationQuestion.ts
1251
- var ApplicationQuestionTypeOptions = ["text", "select"];
1251
+ var ApplicationQuestionTypeOptions = ["text", "select", "radio", "checkbox", "textarea", "file"];
1252
1252
 
1253
1253
  // src/paths/firestorePaths.ts
1254
1254
  var firestorePaths = {
@@ -1278,14 +1278,6 @@ var firestorePaths = {
1278
1278
  applications: {
1279
1279
  collection: (clientId) => `clients/${clientId}/applications`,
1280
1280
  doc: (clientId, applicationId) => `clients/${clientId}/applications/${applicationId}`,
1281
- virtualInterview: {
1282
- collection: (clientId, applicationId) => `clients/${clientId}/applications/${applicationId}/virtualInterview`,
1283
- doc: (clientId, applicationId, interviewId) => `clients/${clientId}/applications/${applicationId}/virtualInterview/${interviewId}`
1284
- },
1285
- questions: {
1286
- collection: (clientId, applicationId) => `clients/${clientId}/applications/${applicationId}/questions`,
1287
- doc: (clientId, applicationId, questionId) => `clients/${clientId}/applications/${applicationId}/questions/${questionId}`
1288
- },
1289
1281
  notes: {
1290
1282
  collection: (clientId, applicationId) => `clients/${clientId}/applications/${applicationId}/notes`,
1291
1283
  doc: (clientId, applicationId, noteId) => `clients/${clientId}/applications/${applicationId}/notes/${noteId}`
@@ -1318,7 +1310,11 @@ var firestorePaths = {
1318
1310
  },
1319
1311
  agents: {
1320
1312
  collection: () => "agents",
1321
- doc: (id) => `agents/${id}`
1313
+ doc: (id) => `agents/${id}`,
1314
+ weeklyApplications: {
1315
+ collection: (agentId) => `agents/${agentId}/weeklyApplications`,
1316
+ doc: (agentId, docId) => `agents/${agentId}/weeklyApplications/${docId}`
1317
+ }
1322
1318
  },
1323
1319
  companies: {
1324
1320
  collection: () => "companies",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobsearch-works/firestore-models",
3
- "version": "4.0.2",
3
+ "version": "4.1.0",
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",