@jobsearch-works/firestore-models 4.2.8 → 4.3.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 +54 -1
- package/dist/index.d.ts +54 -1
- package/dist/index.js +4 -0
- package/dist/index.mjs +4 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -861,6 +861,17 @@ interface ApplicationRunMetadata {
|
|
|
861
861
|
fieldsCompleted?: number;
|
|
862
862
|
durationSeconds?: number;
|
|
863
863
|
}
|
|
864
|
+
/**
|
|
865
|
+
* Structured log entry for automation runs
|
|
866
|
+
* Provides better querying, filtering, and UI display than plain text logs
|
|
867
|
+
*/
|
|
868
|
+
interface ApplicationRunLogEntry {
|
|
869
|
+
timestamp: Date | string;
|
|
870
|
+
message: string;
|
|
871
|
+
level?: "info" | "success" | "warning" | "error";
|
|
872
|
+
step?: string;
|
|
873
|
+
metadata?: Record<string, any>;
|
|
874
|
+
}
|
|
864
875
|
interface ApplicationRun {
|
|
865
876
|
id?: string;
|
|
866
877
|
applicationId: string;
|
|
@@ -873,6 +884,7 @@ interface ApplicationRun {
|
|
|
873
884
|
tokensUsed?: number;
|
|
874
885
|
summary?: string;
|
|
875
886
|
log?: string;
|
|
887
|
+
logEntries?: ApplicationRunLogEntry[];
|
|
876
888
|
failureReason?: string;
|
|
877
889
|
triggeredBy: ApplicationRunTrigger;
|
|
878
890
|
metadata?: ApplicationRunMetadata;
|
|
@@ -880,6 +892,43 @@ interface ApplicationRun {
|
|
|
880
892
|
updatedAt?: Date | string;
|
|
881
893
|
}
|
|
882
894
|
|
|
895
|
+
/**
|
|
896
|
+
* Daily statistics for application submissions and archivals
|
|
897
|
+
* Stored in a single document per client for efficient querying
|
|
898
|
+
*/
|
|
899
|
+
interface DailyApplicationStats {
|
|
900
|
+
/** Number of applications applied (submitted) on this day */
|
|
901
|
+
applied: number;
|
|
902
|
+
/** Number of applications archived (rejected or withdrawn) on this day */
|
|
903
|
+
archived: number;
|
|
904
|
+
}
|
|
905
|
+
/**
|
|
906
|
+
* Application statistics aggregated by day
|
|
907
|
+
* Path: stats/{clientId}
|
|
908
|
+
*
|
|
909
|
+
* One document per client containing all application statistics.
|
|
910
|
+
* The dailyStats object uses date strings (YYYY-MM-DD format) as keys
|
|
911
|
+
* for efficient daily aggregation and querying.
|
|
912
|
+
*/
|
|
913
|
+
interface ApplicationStats {
|
|
914
|
+
/** Document ID is the clientId */
|
|
915
|
+
id?: string;
|
|
916
|
+
clientId: string;
|
|
917
|
+
/**
|
|
918
|
+
* Daily statistics keyed by date string (YYYY-MM-DD format)
|
|
919
|
+
* Example: { "2025-01-15": { applied: 3, archived: 1 } }
|
|
920
|
+
*/
|
|
921
|
+
dailyStats: Record<string, DailyApplicationStats>;
|
|
922
|
+
/** Total count of all applications applied (ever) */
|
|
923
|
+
totalApplied: number;
|
|
924
|
+
/** Total count of all applications archived (ever) */
|
|
925
|
+
totalArchived: number;
|
|
926
|
+
/** Last time stats were updated */
|
|
927
|
+
updatedAt?: Date | string;
|
|
928
|
+
/** When this stats document was created */
|
|
929
|
+
createdAt?: Date | string;
|
|
930
|
+
}
|
|
931
|
+
|
|
883
932
|
/**
|
|
884
933
|
* Embedded sub-object within Client document
|
|
885
934
|
* @see Client - Parent document interface
|
|
@@ -1197,6 +1246,10 @@ declare const firestorePaths: {
|
|
|
1197
1246
|
readonly collection: () => string;
|
|
1198
1247
|
readonly doc: (authEmail: string) => string;
|
|
1199
1248
|
};
|
|
1249
|
+
readonly stats: {
|
|
1250
|
+
readonly collection: () => string;
|
|
1251
|
+
readonly doc: (clientId: string) => string;
|
|
1252
|
+
};
|
|
1200
1253
|
};
|
|
1201
1254
|
|
|
1202
|
-
export { Address, AdminReport, Agent, AgentStatus, Application, ApplicationQuestion, ApplicationQuestionType, ApplicationQuestionTypeOptions, ApplicationRun, ApplicationRunMetadata, ApplicationRunOutcome, ApplicationRunStatus, ApplicationRunTrigger, 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 };
|
|
1255
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -861,6 +861,17 @@ interface ApplicationRunMetadata {
|
|
|
861
861
|
fieldsCompleted?: number;
|
|
862
862
|
durationSeconds?: number;
|
|
863
863
|
}
|
|
864
|
+
/**
|
|
865
|
+
* Structured log entry for automation runs
|
|
866
|
+
* Provides better querying, filtering, and UI display than plain text logs
|
|
867
|
+
*/
|
|
868
|
+
interface ApplicationRunLogEntry {
|
|
869
|
+
timestamp: Date | string;
|
|
870
|
+
message: string;
|
|
871
|
+
level?: "info" | "success" | "warning" | "error";
|
|
872
|
+
step?: string;
|
|
873
|
+
metadata?: Record<string, any>;
|
|
874
|
+
}
|
|
864
875
|
interface ApplicationRun {
|
|
865
876
|
id?: string;
|
|
866
877
|
applicationId: string;
|
|
@@ -873,6 +884,7 @@ interface ApplicationRun {
|
|
|
873
884
|
tokensUsed?: number;
|
|
874
885
|
summary?: string;
|
|
875
886
|
log?: string;
|
|
887
|
+
logEntries?: ApplicationRunLogEntry[];
|
|
876
888
|
failureReason?: string;
|
|
877
889
|
triggeredBy: ApplicationRunTrigger;
|
|
878
890
|
metadata?: ApplicationRunMetadata;
|
|
@@ -880,6 +892,43 @@ interface ApplicationRun {
|
|
|
880
892
|
updatedAt?: Date | string;
|
|
881
893
|
}
|
|
882
894
|
|
|
895
|
+
/**
|
|
896
|
+
* Daily statistics for application submissions and archivals
|
|
897
|
+
* Stored in a single document per client for efficient querying
|
|
898
|
+
*/
|
|
899
|
+
interface DailyApplicationStats {
|
|
900
|
+
/** Number of applications applied (submitted) on this day */
|
|
901
|
+
applied: number;
|
|
902
|
+
/** Number of applications archived (rejected or withdrawn) on this day */
|
|
903
|
+
archived: number;
|
|
904
|
+
}
|
|
905
|
+
/**
|
|
906
|
+
* Application statistics aggregated by day
|
|
907
|
+
* Path: stats/{clientId}
|
|
908
|
+
*
|
|
909
|
+
* One document per client containing all application statistics.
|
|
910
|
+
* The dailyStats object uses date strings (YYYY-MM-DD format) as keys
|
|
911
|
+
* for efficient daily aggregation and querying.
|
|
912
|
+
*/
|
|
913
|
+
interface ApplicationStats {
|
|
914
|
+
/** Document ID is the clientId */
|
|
915
|
+
id?: string;
|
|
916
|
+
clientId: string;
|
|
917
|
+
/**
|
|
918
|
+
* Daily statistics keyed by date string (YYYY-MM-DD format)
|
|
919
|
+
* Example: { "2025-01-15": { applied: 3, archived: 1 } }
|
|
920
|
+
*/
|
|
921
|
+
dailyStats: Record<string, DailyApplicationStats>;
|
|
922
|
+
/** Total count of all applications applied (ever) */
|
|
923
|
+
totalApplied: number;
|
|
924
|
+
/** Total count of all applications archived (ever) */
|
|
925
|
+
totalArchived: number;
|
|
926
|
+
/** Last time stats were updated */
|
|
927
|
+
updatedAt?: Date | string;
|
|
928
|
+
/** When this stats document was created */
|
|
929
|
+
createdAt?: Date | string;
|
|
930
|
+
}
|
|
931
|
+
|
|
883
932
|
/**
|
|
884
933
|
* Embedded sub-object within Client document
|
|
885
934
|
* @see Client - Parent document interface
|
|
@@ -1197,6 +1246,10 @@ declare const firestorePaths: {
|
|
|
1197
1246
|
readonly collection: () => string;
|
|
1198
1247
|
readonly doc: (authEmail: string) => string;
|
|
1199
1248
|
};
|
|
1249
|
+
readonly stats: {
|
|
1250
|
+
readonly collection: () => string;
|
|
1251
|
+
readonly doc: (clientId: string) => string;
|
|
1252
|
+
};
|
|
1200
1253
|
};
|
|
1201
1254
|
|
|
1202
|
-
export { Address, AdminReport, Agent, AgentStatus, Application, ApplicationQuestion, ApplicationQuestionType, ApplicationQuestionTypeOptions, ApplicationRun, ApplicationRunMetadata, ApplicationRunOutcome, ApplicationRunStatus, ApplicationRunTrigger, 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 };
|
|
1255
|
+
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 };
|
package/dist/index.js
CHANGED
|
@@ -1522,6 +1522,10 @@ var firestorePaths = {
|
|
|
1522
1522
|
authEmails: {
|
|
1523
1523
|
collection: () => "authEmails",
|
|
1524
1524
|
doc: (authEmail) => `authEmails/${authEmail}`
|
|
1525
|
+
},
|
|
1526
|
+
stats: {
|
|
1527
|
+
collection: () => "stats",
|
|
1528
|
+
doc: (clientId) => `stats/${clientId}`
|
|
1525
1529
|
}
|
|
1526
1530
|
};
|
|
1527
1531
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.mjs
CHANGED
|
@@ -1484,6 +1484,10 @@ var firestorePaths = {
|
|
|
1484
1484
|
authEmails: {
|
|
1485
1485
|
collection: () => "authEmails",
|
|
1486
1486
|
doc: (authEmail) => `authEmails/${authEmail}`
|
|
1487
|
+
},
|
|
1488
|
+
stats: {
|
|
1489
|
+
collection: () => "stats",
|
|
1490
|
+
doc: (clientId) => `stats/${clientId}`
|
|
1487
1491
|
}
|
|
1488
1492
|
};
|
|
1489
1493
|
export {
|
package/package.json
CHANGED