@jobsearch-works/firestore-models 4.3.1 → 4.3.3

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
@@ -818,6 +818,8 @@ interface Application {
818
818
  advertisingDomain?: string;
819
819
  description?: string;
820
820
  fullPageText?: string;
821
+ requiresHumanVerification?: boolean;
822
+ verificationType?: string;
821
823
  createdAt?: Date | string;
822
824
  updatedAt?: Date | string;
823
825
  }
@@ -861,6 +863,9 @@ interface ApplicationRunMetadata {
861
863
  questionsAnswered?: number;
862
864
  fieldsCompleted?: number;
863
865
  durationSeconds?: number;
866
+ aiProvider?: string;
867
+ model?: string;
868
+ provider?: string;
864
869
  }
865
870
  /**
866
871
  * Structured log entry for automation runs
@@ -884,7 +889,6 @@ interface ApplicationRun {
884
889
  completedAt?: Date | string;
885
890
  tokensUsed?: number;
886
891
  summary?: string;
887
- log?: string;
888
892
  logEntries?: ApplicationRunLogEntry[];
889
893
  failureReason?: string;
890
894
  triggeredBy: ApplicationRunTrigger;
@@ -894,22 +898,25 @@ interface ApplicationRun {
894
898
  }
895
899
 
896
900
  /**
897
- * Daily statistics for application submissions and archivals
898
- * Stored in a single document per client for efficient querying
901
+ * Statistics for a time period (day, week, or month)
902
+ * Tracks all application status changes
899
903
  */
900
- interface DailyApplicationStats {
901
- /** Number of applications applied (submitted) on this day */
904
+ interface ApplicationPeriodStats {
905
+ /** Number of applications suggested in this period */
906
+ suggested: number;
907
+ /** Number of applications applied (submitted) in this period */
902
908
  applied: number;
903
- /** Number of applications archived (rejected or withdrawn) on this day */
909
+ /** Number of applications archived (rejected or withdrawn) in this period */
904
910
  archived: number;
911
+ /** Number of applications that moved to interviewing in this period */
912
+ interviews: number;
905
913
  }
906
914
  /**
907
- * Application statistics aggregated by day
915
+ * Application statistics aggregated by day, week, and month
908
916
  * Path: stats/{clientId}
909
917
  *
910
918
  * One document per client containing all application statistics.
911
- * The dailyStats object uses date strings (YYYY-MM-DD format) as keys
912
- * for efficient daily aggregation and querying.
919
+ * Statistics are keyed by date strings for efficient aggregation and querying.
913
920
  */
914
921
  interface ApplicationStats {
915
922
  /** Document ID is the clientId */
@@ -917,13 +924,27 @@ interface ApplicationStats {
917
924
  clientId: string;
918
925
  /**
919
926
  * Daily statistics keyed by date string (YYYY-MM-DD format)
920
- * Example: { "2025-01-15": { applied: 3, archived: 1 } }
927
+ * Example: { "2025-01-15": { suggested: 2, applied: 3, archived: 1, interviews: 0 } }
921
928
  */
922
- dailyStats: Record<string, DailyApplicationStats>;
929
+ dailyStats: Record<string, ApplicationPeriodStats>;
930
+ /**
931
+ * Weekly statistics keyed by week start date (YYYY-MM-DD format, Monday of the week)
932
+ * Example: { "2025-01-13": { suggested: 10, applied: 15, archived: 5, interviews: 2 } }
933
+ */
934
+ weeklyStats?: Record<string, ApplicationPeriodStats>;
935
+ /**
936
+ * Monthly statistics keyed by month (YYYY-MM format)
937
+ * Example: { "2025-01": { suggested: 45, applied: 60, archived: 20, interviews: 8 } }
938
+ */
939
+ monthlyStats?: Record<string, ApplicationPeriodStats>;
940
+ /** Total count of all applications suggested (ever) */
941
+ totalSuggested: number;
923
942
  /** Total count of all applications applied (ever) */
924
943
  totalApplied: number;
925
944
  /** Total count of all applications archived (ever) */
926
945
  totalArchived: number;
946
+ /** Total count of all applications that reached interview stage (ever) */
947
+ totalInterviews: number;
927
948
  /** Last time stats were updated */
928
949
  updatedAt?: Date | string;
929
950
  /** When this stats document was created */
@@ -962,6 +983,8 @@ interface ClientPersonalData {
962
983
  backgroundCheckConsent?: 'Yes' | 'No';
963
984
  drugTestConsent?: 'Yes' | 'No';
964
985
  travelWillingness?: 'Yes' | 'No' | 'Sometimes';
986
+ holdsAustralianSecurityClearance?: 'Yes' | 'No';
987
+ requiresRecruitmentAdjustments?: 'Yes' | 'No';
965
988
  createdAt?: Date | string;
966
989
  updatedAt?: Date | string;
967
990
  photoUrl?: string;
@@ -1253,4 +1276,4 @@ declare const firestorePaths: {
1253
1276
  };
1254
1277
  };
1255
1278
 
1256
- export { Address, AdminReport, Agent, AgentStatus, Application, ApplicationQuestion, ApplicationQuestionType, ApplicationQuestionTypeOptions, ApplicationRun, ApplicationRunLogEntry, ApplicationRunMetadata, ApplicationRunOutcome, ApplicationRunStatus, ApplicationRunTrigger, ApplicationStats, ApplicationStatus, AuthEmail, AuthUser, Certification, Client, ClientAccessToken, ClientCompanyPreferences, ClientEmail, ClientGmailToken, ClientInitialQuestion, ClientJobPreferences, ClientLogin, ClientPersonalData, ClientQuestion, ClientResume, ClientStatus, ClientStatusEnum, ClientVirtualInterview, Companies, DailyApplicationStats, EMAIL_CATEGORIES, Education, EmailCategory, EmailLog, Experience, FirestoreTimestamp, GmailOAuthSession, JobCategory, JobTitle, LocationId, Project, UserPublic, Vacancy, VacancyCategory, VacancySuggestion, countries, firestorePaths, initialQuestions, jobClassifications, locations };
1279
+ export { Address, AdminReport, Agent, AgentStatus, Application, ApplicationPeriodStats, ApplicationQuestion, ApplicationQuestionType, ApplicationQuestionTypeOptions, ApplicationRun, ApplicationRunLogEntry, ApplicationRunMetadata, ApplicationRunOutcome, ApplicationRunStatus, ApplicationRunTrigger, ApplicationStats, ApplicationStatus, AuthEmail, AuthUser, Certification, Client, ClientAccessToken, ClientCompanyPreferences, ClientEmail, ClientGmailToken, ClientInitialQuestion, ClientJobPreferences, ClientLogin, ClientPersonalData, ClientQuestion, ClientResume, ClientStatus, ClientStatusEnum, ClientVirtualInterview, Companies, EMAIL_CATEGORIES, Education, EmailCategory, EmailLog, Experience, FirestoreTimestamp, GmailOAuthSession, JobCategory, JobTitle, LocationId, Project, UserPublic, Vacancy, VacancyCategory, VacancySuggestion, countries, firestorePaths, initialQuestions, jobClassifications, locations };
package/dist/index.d.ts CHANGED
@@ -818,6 +818,8 @@ interface Application {
818
818
  advertisingDomain?: string;
819
819
  description?: string;
820
820
  fullPageText?: string;
821
+ requiresHumanVerification?: boolean;
822
+ verificationType?: string;
821
823
  createdAt?: Date | string;
822
824
  updatedAt?: Date | string;
823
825
  }
@@ -861,6 +863,9 @@ interface ApplicationRunMetadata {
861
863
  questionsAnswered?: number;
862
864
  fieldsCompleted?: number;
863
865
  durationSeconds?: number;
866
+ aiProvider?: string;
867
+ model?: string;
868
+ provider?: string;
864
869
  }
865
870
  /**
866
871
  * Structured log entry for automation runs
@@ -884,7 +889,6 @@ interface ApplicationRun {
884
889
  completedAt?: Date | string;
885
890
  tokensUsed?: number;
886
891
  summary?: string;
887
- log?: string;
888
892
  logEntries?: ApplicationRunLogEntry[];
889
893
  failureReason?: string;
890
894
  triggeredBy: ApplicationRunTrigger;
@@ -894,22 +898,25 @@ interface ApplicationRun {
894
898
  }
895
899
 
896
900
  /**
897
- * Daily statistics for application submissions and archivals
898
- * Stored in a single document per client for efficient querying
901
+ * Statistics for a time period (day, week, or month)
902
+ * Tracks all application status changes
899
903
  */
900
- interface DailyApplicationStats {
901
- /** Number of applications applied (submitted) on this day */
904
+ interface ApplicationPeriodStats {
905
+ /** Number of applications suggested in this period */
906
+ suggested: number;
907
+ /** Number of applications applied (submitted) in this period */
902
908
  applied: number;
903
- /** Number of applications archived (rejected or withdrawn) on this day */
909
+ /** Number of applications archived (rejected or withdrawn) in this period */
904
910
  archived: number;
911
+ /** Number of applications that moved to interviewing in this period */
912
+ interviews: number;
905
913
  }
906
914
  /**
907
- * Application statistics aggregated by day
915
+ * Application statistics aggregated by day, week, and month
908
916
  * Path: stats/{clientId}
909
917
  *
910
918
  * One document per client containing all application statistics.
911
- * The dailyStats object uses date strings (YYYY-MM-DD format) as keys
912
- * for efficient daily aggregation and querying.
919
+ * Statistics are keyed by date strings for efficient aggregation and querying.
913
920
  */
914
921
  interface ApplicationStats {
915
922
  /** Document ID is the clientId */
@@ -917,13 +924,27 @@ interface ApplicationStats {
917
924
  clientId: string;
918
925
  /**
919
926
  * Daily statistics keyed by date string (YYYY-MM-DD format)
920
- * Example: { "2025-01-15": { applied: 3, archived: 1 } }
927
+ * Example: { "2025-01-15": { suggested: 2, applied: 3, archived: 1, interviews: 0 } }
921
928
  */
922
- dailyStats: Record<string, DailyApplicationStats>;
929
+ dailyStats: Record<string, ApplicationPeriodStats>;
930
+ /**
931
+ * Weekly statistics keyed by week start date (YYYY-MM-DD format, Monday of the week)
932
+ * Example: { "2025-01-13": { suggested: 10, applied: 15, archived: 5, interviews: 2 } }
933
+ */
934
+ weeklyStats?: Record<string, ApplicationPeriodStats>;
935
+ /**
936
+ * Monthly statistics keyed by month (YYYY-MM format)
937
+ * Example: { "2025-01": { suggested: 45, applied: 60, archived: 20, interviews: 8 } }
938
+ */
939
+ monthlyStats?: Record<string, ApplicationPeriodStats>;
940
+ /** Total count of all applications suggested (ever) */
941
+ totalSuggested: number;
923
942
  /** Total count of all applications applied (ever) */
924
943
  totalApplied: number;
925
944
  /** Total count of all applications archived (ever) */
926
945
  totalArchived: number;
946
+ /** Total count of all applications that reached interview stage (ever) */
947
+ totalInterviews: number;
927
948
  /** Last time stats were updated */
928
949
  updatedAt?: Date | string;
929
950
  /** When this stats document was created */
@@ -962,6 +983,8 @@ interface ClientPersonalData {
962
983
  backgroundCheckConsent?: 'Yes' | 'No';
963
984
  drugTestConsent?: 'Yes' | 'No';
964
985
  travelWillingness?: 'Yes' | 'No' | 'Sometimes';
986
+ holdsAustralianSecurityClearance?: 'Yes' | 'No';
987
+ requiresRecruitmentAdjustments?: 'Yes' | 'No';
965
988
  createdAt?: Date | string;
966
989
  updatedAt?: Date | string;
967
990
  photoUrl?: string;
@@ -1253,4 +1276,4 @@ declare const firestorePaths: {
1253
1276
  };
1254
1277
  };
1255
1278
 
1256
- export { Address, AdminReport, Agent, AgentStatus, Application, ApplicationQuestion, ApplicationQuestionType, ApplicationQuestionTypeOptions, ApplicationRun, ApplicationRunLogEntry, ApplicationRunMetadata, ApplicationRunOutcome, ApplicationRunStatus, ApplicationRunTrigger, ApplicationStats, ApplicationStatus, AuthEmail, AuthUser, Certification, Client, ClientAccessToken, ClientCompanyPreferences, ClientEmail, ClientGmailToken, ClientInitialQuestion, ClientJobPreferences, ClientLogin, ClientPersonalData, ClientQuestion, ClientResume, ClientStatus, ClientStatusEnum, ClientVirtualInterview, Companies, DailyApplicationStats, EMAIL_CATEGORIES, Education, EmailCategory, EmailLog, Experience, FirestoreTimestamp, GmailOAuthSession, JobCategory, JobTitle, LocationId, Project, UserPublic, Vacancy, VacancyCategory, VacancySuggestion, countries, firestorePaths, initialQuestions, jobClassifications, locations };
1279
+ export { Address, AdminReport, Agent, AgentStatus, Application, ApplicationPeriodStats, ApplicationQuestion, ApplicationQuestionType, ApplicationQuestionTypeOptions, ApplicationRun, ApplicationRunLogEntry, ApplicationRunMetadata, ApplicationRunOutcome, ApplicationRunStatus, ApplicationRunTrigger, ApplicationStats, ApplicationStatus, AuthEmail, AuthUser, Certification, Client, ClientAccessToken, ClientCompanyPreferences, ClientEmail, ClientGmailToken, ClientInitialQuestion, ClientJobPreferences, ClientLogin, ClientPersonalData, ClientQuestion, ClientResume, ClientStatus, ClientStatusEnum, ClientVirtualInterview, Companies, EMAIL_CATEGORIES, Education, EmailCategory, EmailLog, Experience, FirestoreTimestamp, GmailOAuthSession, JobCategory, JobTitle, LocationId, Project, UserPublic, Vacancy, VacancyCategory, VacancySuggestion, countries, firestorePaths, initialQuestions, jobClassifications, locations };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobsearch-works/firestore-models",
3
- "version": "4.3.1",
3
+ "version": "4.3.3",
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",