@jobsearch-works/firestore-models 2.2.5 → 2.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 +73 -35
- package/dist/index.d.ts +73 -35
- package/dist/index.js +16 -5
- package/dist/index.mjs +16 -5
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
@@ -634,6 +634,13 @@ interface VacancySuggestion {
|
|
634
634
|
createdAt?: Date | string;
|
635
635
|
}
|
636
636
|
|
637
|
+
/**
|
638
|
+
* Document under authEmails/{authEmail}
|
639
|
+
*/
|
640
|
+
interface AuthEmail {
|
641
|
+
UID: string;
|
642
|
+
}
|
643
|
+
|
637
644
|
interface ApplicationEnrichedForm {
|
638
645
|
fields: ApplicationEnrichedField[];
|
639
646
|
formSelector: string;
|
@@ -820,37 +827,6 @@ interface Client {
|
|
820
827
|
readonly createdAt?: Date | string;
|
821
828
|
}
|
822
829
|
|
823
|
-
/**
|
824
|
-
* Subcollection document under Client
|
825
|
-
* Path: clients/{clientId}/emails/{docId}
|
826
|
-
* @see Client - Parent document
|
827
|
-
*/
|
828
|
-
interface ClientEmail {
|
829
|
-
id?: string;
|
830
|
-
messageId: string;
|
831
|
-
threadId?: string;
|
832
|
-
labelIds?: string[];
|
833
|
-
snippet?: string;
|
834
|
-
internalDate?: string;
|
835
|
-
payload?: {
|
836
|
-
headers?: Array<{
|
837
|
-
name: string;
|
838
|
-
value: string;
|
839
|
-
}>;
|
840
|
-
body?: {
|
841
|
-
data?: string;
|
842
|
-
};
|
843
|
-
parts?: Array<{
|
844
|
-
mimeType?: string;
|
845
|
-
body?: {
|
846
|
-
data?: string;
|
847
|
-
};
|
848
|
-
}>;
|
849
|
-
};
|
850
|
-
createdAt?: Date | string;
|
851
|
-
updatedAt?: Date | string;
|
852
|
-
}
|
853
|
-
|
854
830
|
/**
|
855
831
|
* Subcollection document under Client
|
856
832
|
* Path: clients/{clientId}/gmailTokens/{docId}
|
@@ -877,7 +853,7 @@ interface ClientInitialQuestion {
|
|
877
853
|
|
878
854
|
/**
|
879
855
|
* Subcollection document under Client
|
880
|
-
* Path: clients/{clientId}/applications/{applicationId}/
|
856
|
+
* Path: clients/{clientId}/applications/{applicationId}/virtualInterview/{interviewId}
|
881
857
|
* @see Client - Parent document
|
882
858
|
* @see Application - Related application
|
883
859
|
*/
|
@@ -973,6 +949,57 @@ interface ClientResume {
|
|
973
949
|
}>;
|
974
950
|
}
|
975
951
|
|
952
|
+
/**
|
953
|
+
* Subcollection document under clients/{userId}/access_tokens/{provider}
|
954
|
+
*/
|
955
|
+
interface ClientAccessToken {
|
956
|
+
access_token: string;
|
957
|
+
auth_email: string;
|
958
|
+
created_at: Date | string;
|
959
|
+
gmail_watch_history_id: number;
|
960
|
+
refresh_token: string;
|
961
|
+
scope: string[];
|
962
|
+
token_type: string;
|
963
|
+
}
|
964
|
+
|
965
|
+
/**
|
966
|
+
* Subcollection document under clients/{userId}/emails/{emailId}
|
967
|
+
* For new email structure
|
968
|
+
*/
|
969
|
+
interface ClientEmailV2 {
|
970
|
+
bcc: string[];
|
971
|
+
cc: string[];
|
972
|
+
to: string[];
|
973
|
+
from: string[];
|
974
|
+
date: string;
|
975
|
+
"html-content": string;
|
976
|
+
"text-content": string;
|
977
|
+
message_id: string;
|
978
|
+
snippet: string;
|
979
|
+
subject: string;
|
980
|
+
thread_id: string;
|
981
|
+
timestamp: number;
|
982
|
+
labels: string[];
|
983
|
+
}
|
984
|
+
|
985
|
+
/**
|
986
|
+
* Subcollection document under clients/{userId}/emails/{emailId}/analysed/general
|
987
|
+
*/
|
988
|
+
interface EmailAnalysedGeneral {
|
989
|
+
category: string;
|
990
|
+
date: string;
|
991
|
+
job_response: boolean;
|
992
|
+
suggested_action: string;
|
993
|
+
}
|
994
|
+
|
995
|
+
/**
|
996
|
+
* Subcollection document under clients/{userId}/emails/{emailId}/analysed/classified
|
997
|
+
* All fields are dynamic.
|
998
|
+
*/
|
999
|
+
interface EmailAnalysedClassified {
|
1000
|
+
[key: string]: any;
|
1001
|
+
}
|
1002
|
+
|
976
1003
|
type FirestoreTimestamp = {
|
977
1004
|
seconds: number;
|
978
1005
|
nanoseconds: number;
|
@@ -982,10 +1009,17 @@ declare const firestorePaths: {
|
|
982
1009
|
readonly clients: {
|
983
1010
|
readonly collection: () => string;
|
984
1011
|
readonly doc: (id: string) => string;
|
985
|
-
readonly
|
1012
|
+
readonly accessTokens: {
|
1013
|
+
readonly collection: (clientId: string) => string;
|
1014
|
+
readonly doc: (clientId: string, providerName: string) => string;
|
1015
|
+
};
|
986
1016
|
readonly emails: {
|
987
1017
|
readonly collection: (clientId: string) => string;
|
988
1018
|
readonly doc: (clientId: string, emailId: string) => string;
|
1019
|
+
readonly analysed: {
|
1020
|
+
readonly collection: (clientId: string, emailId: string) => string;
|
1021
|
+
readonly doc: (clientId: string, emailId: string, analysedType: "general" | "classified") => string;
|
1022
|
+
};
|
989
1023
|
};
|
990
1024
|
readonly questions: {
|
991
1025
|
readonly collection: (clientId: string) => string;
|
@@ -1006,7 +1040,7 @@ declare const firestorePaths: {
|
|
1006
1040
|
readonly applications: {
|
1007
1041
|
readonly collection: (clientId: string) => string;
|
1008
1042
|
readonly doc: (clientId: string, applicationId: string) => string;
|
1009
|
-
readonly
|
1043
|
+
readonly virtualInterview: {
|
1010
1044
|
readonly collection: (clientId: string, applicationId: string) => string;
|
1011
1045
|
readonly doc: (clientId: string, applicationId: string, interviewId: string) => string;
|
1012
1046
|
};
|
@@ -1044,6 +1078,10 @@ declare const firestorePaths: {
|
|
1044
1078
|
readonly collection: () => string;
|
1045
1079
|
readonly doc: (id: string) => string;
|
1046
1080
|
};
|
1081
|
+
readonly authEmails: {
|
1082
|
+
readonly collection: () => string;
|
1083
|
+
readonly doc: (authEmail: string) => string;
|
1084
|
+
};
|
1047
1085
|
};
|
1048
1086
|
|
1049
|
-
export { Agent, AgentStatus, Application, ApplicationEnrichedField, ApplicationEnrichedForm, ApplicationQuestion, ApplicationQuestionType, ApplicationQuestionTypeOptions, ApplicationStatus, AuthUser, Client, ClientCertifications, ClientEducation,
|
1087
|
+
export { Agent, AgentStatus, Application, ApplicationEnrichedField, ApplicationEnrichedForm, ApplicationQuestion, ApplicationQuestionType, ApplicationQuestionTypeOptions, ApplicationStatus, AuthEmail, AuthUser, Client, ClientAccessToken, ClientCertifications, ClientEducation, ClientEmailV2, ClientGmailToken, ClientInitialQuestion, ClientJobPreferences, ClientLanguage, ClientLogin, ClientPersonalData, ClientQuestion, ClientResume, ClientSkill, ClientStatus, ClientVirtualInterview, ClientWebsitePreferences, ClientWorkExperience, EmailAnalysedClassified, EmailAnalysedGeneral, FirestoreTimestamp, JobCategory, JobTitle, LocationId, UserPublic, Vacancy, VacancyCategory, VacancyExtractedField, VacancyExtractedForm, VacancySuggestion, firestorePaths, jobClassifications, locations };
|
package/dist/index.d.ts
CHANGED
@@ -634,6 +634,13 @@ interface VacancySuggestion {
|
|
634
634
|
createdAt?: Date | string;
|
635
635
|
}
|
636
636
|
|
637
|
+
/**
|
638
|
+
* Document under authEmails/{authEmail}
|
639
|
+
*/
|
640
|
+
interface AuthEmail {
|
641
|
+
UID: string;
|
642
|
+
}
|
643
|
+
|
637
644
|
interface ApplicationEnrichedForm {
|
638
645
|
fields: ApplicationEnrichedField[];
|
639
646
|
formSelector: string;
|
@@ -820,37 +827,6 @@ interface Client {
|
|
820
827
|
readonly createdAt?: Date | string;
|
821
828
|
}
|
822
829
|
|
823
|
-
/**
|
824
|
-
* Subcollection document under Client
|
825
|
-
* Path: clients/{clientId}/emails/{docId}
|
826
|
-
* @see Client - Parent document
|
827
|
-
*/
|
828
|
-
interface ClientEmail {
|
829
|
-
id?: string;
|
830
|
-
messageId: string;
|
831
|
-
threadId?: string;
|
832
|
-
labelIds?: string[];
|
833
|
-
snippet?: string;
|
834
|
-
internalDate?: string;
|
835
|
-
payload?: {
|
836
|
-
headers?: Array<{
|
837
|
-
name: string;
|
838
|
-
value: string;
|
839
|
-
}>;
|
840
|
-
body?: {
|
841
|
-
data?: string;
|
842
|
-
};
|
843
|
-
parts?: Array<{
|
844
|
-
mimeType?: string;
|
845
|
-
body?: {
|
846
|
-
data?: string;
|
847
|
-
};
|
848
|
-
}>;
|
849
|
-
};
|
850
|
-
createdAt?: Date | string;
|
851
|
-
updatedAt?: Date | string;
|
852
|
-
}
|
853
|
-
|
854
830
|
/**
|
855
831
|
* Subcollection document under Client
|
856
832
|
* Path: clients/{clientId}/gmailTokens/{docId}
|
@@ -877,7 +853,7 @@ interface ClientInitialQuestion {
|
|
877
853
|
|
878
854
|
/**
|
879
855
|
* Subcollection document under Client
|
880
|
-
* Path: clients/{clientId}/applications/{applicationId}/
|
856
|
+
* Path: clients/{clientId}/applications/{applicationId}/virtualInterview/{interviewId}
|
881
857
|
* @see Client - Parent document
|
882
858
|
* @see Application - Related application
|
883
859
|
*/
|
@@ -973,6 +949,57 @@ interface ClientResume {
|
|
973
949
|
}>;
|
974
950
|
}
|
975
951
|
|
952
|
+
/**
|
953
|
+
* Subcollection document under clients/{userId}/access_tokens/{provider}
|
954
|
+
*/
|
955
|
+
interface ClientAccessToken {
|
956
|
+
access_token: string;
|
957
|
+
auth_email: string;
|
958
|
+
created_at: Date | string;
|
959
|
+
gmail_watch_history_id: number;
|
960
|
+
refresh_token: string;
|
961
|
+
scope: string[];
|
962
|
+
token_type: string;
|
963
|
+
}
|
964
|
+
|
965
|
+
/**
|
966
|
+
* Subcollection document under clients/{userId}/emails/{emailId}
|
967
|
+
* For new email structure
|
968
|
+
*/
|
969
|
+
interface ClientEmailV2 {
|
970
|
+
bcc: string[];
|
971
|
+
cc: string[];
|
972
|
+
to: string[];
|
973
|
+
from: string[];
|
974
|
+
date: string;
|
975
|
+
"html-content": string;
|
976
|
+
"text-content": string;
|
977
|
+
message_id: string;
|
978
|
+
snippet: string;
|
979
|
+
subject: string;
|
980
|
+
thread_id: string;
|
981
|
+
timestamp: number;
|
982
|
+
labels: string[];
|
983
|
+
}
|
984
|
+
|
985
|
+
/**
|
986
|
+
* Subcollection document under clients/{userId}/emails/{emailId}/analysed/general
|
987
|
+
*/
|
988
|
+
interface EmailAnalysedGeneral {
|
989
|
+
category: string;
|
990
|
+
date: string;
|
991
|
+
job_response: boolean;
|
992
|
+
suggested_action: string;
|
993
|
+
}
|
994
|
+
|
995
|
+
/**
|
996
|
+
* Subcollection document under clients/{userId}/emails/{emailId}/analysed/classified
|
997
|
+
* All fields are dynamic.
|
998
|
+
*/
|
999
|
+
interface EmailAnalysedClassified {
|
1000
|
+
[key: string]: any;
|
1001
|
+
}
|
1002
|
+
|
976
1003
|
type FirestoreTimestamp = {
|
977
1004
|
seconds: number;
|
978
1005
|
nanoseconds: number;
|
@@ -982,10 +1009,17 @@ declare const firestorePaths: {
|
|
982
1009
|
readonly clients: {
|
983
1010
|
readonly collection: () => string;
|
984
1011
|
readonly doc: (id: string) => string;
|
985
|
-
readonly
|
1012
|
+
readonly accessTokens: {
|
1013
|
+
readonly collection: (clientId: string) => string;
|
1014
|
+
readonly doc: (clientId: string, providerName: string) => string;
|
1015
|
+
};
|
986
1016
|
readonly emails: {
|
987
1017
|
readonly collection: (clientId: string) => string;
|
988
1018
|
readonly doc: (clientId: string, emailId: string) => string;
|
1019
|
+
readonly analysed: {
|
1020
|
+
readonly collection: (clientId: string, emailId: string) => string;
|
1021
|
+
readonly doc: (clientId: string, emailId: string, analysedType: "general" | "classified") => string;
|
1022
|
+
};
|
989
1023
|
};
|
990
1024
|
readonly questions: {
|
991
1025
|
readonly collection: (clientId: string) => string;
|
@@ -1006,7 +1040,7 @@ declare const firestorePaths: {
|
|
1006
1040
|
readonly applications: {
|
1007
1041
|
readonly collection: (clientId: string) => string;
|
1008
1042
|
readonly doc: (clientId: string, applicationId: string) => string;
|
1009
|
-
readonly
|
1043
|
+
readonly virtualInterview: {
|
1010
1044
|
readonly collection: (clientId: string, applicationId: string) => string;
|
1011
1045
|
readonly doc: (clientId: string, applicationId: string, interviewId: string) => string;
|
1012
1046
|
};
|
@@ -1044,6 +1078,10 @@ declare const firestorePaths: {
|
|
1044
1078
|
readonly collection: () => string;
|
1045
1079
|
readonly doc: (id: string) => string;
|
1046
1080
|
};
|
1081
|
+
readonly authEmails: {
|
1082
|
+
readonly collection: () => string;
|
1083
|
+
readonly doc: (authEmail: string) => string;
|
1084
|
+
};
|
1047
1085
|
};
|
1048
1086
|
|
1049
|
-
export { Agent, AgentStatus, Application, ApplicationEnrichedField, ApplicationEnrichedForm, ApplicationQuestion, ApplicationQuestionType, ApplicationQuestionTypeOptions, ApplicationStatus, AuthUser, Client, ClientCertifications, ClientEducation,
|
1087
|
+
export { Agent, AgentStatus, Application, ApplicationEnrichedField, ApplicationEnrichedForm, ApplicationQuestion, ApplicationQuestionType, ApplicationQuestionTypeOptions, ApplicationStatus, AuthEmail, AuthUser, Client, ClientAccessToken, ClientCertifications, ClientEducation, ClientEmailV2, ClientGmailToken, ClientInitialQuestion, ClientJobPreferences, ClientLanguage, ClientLogin, ClientPersonalData, ClientQuestion, ClientResume, ClientSkill, ClientStatus, ClientVirtualInterview, ClientWebsitePreferences, ClientWorkExperience, EmailAnalysedClassified, EmailAnalysedGeneral, FirestoreTimestamp, JobCategory, JobTitle, LocationId, UserPublic, Vacancy, VacancyCategory, VacancyExtractedField, VacancyExtractedForm, VacancySuggestion, firestorePaths, jobClassifications, locations };
|
package/dist/index.js
CHANGED
@@ -1065,10 +1065,17 @@ var firestorePaths = {
|
|
1065
1065
|
clients: {
|
1066
1066
|
collection: () => "clients",
|
1067
1067
|
doc: (id) => `clients/${id}`,
|
1068
|
-
|
1068
|
+
accessTokens: {
|
1069
|
+
collection: (clientId) => `clients/${clientId}/access_tokens`,
|
1070
|
+
doc: (clientId, providerName) => `clients/${clientId}/access_tokens/${providerName}`
|
1071
|
+
},
|
1069
1072
|
emails: {
|
1070
1073
|
collection: (clientId) => `clients/${clientId}/emails`,
|
1071
|
-
doc: (clientId, emailId) => `clients/${clientId}/emails/${emailId}
|
1074
|
+
doc: (clientId, emailId) => `clients/${clientId}/emails/${emailId}`,
|
1075
|
+
analysed: {
|
1076
|
+
collection: (clientId, emailId) => `clients/${clientId}/emails/${emailId}/analysed`,
|
1077
|
+
doc: (clientId, emailId, analysedType) => `clients/${clientId}/emails/${emailId}/analysed/${analysedType}`
|
1078
|
+
}
|
1072
1079
|
},
|
1073
1080
|
questions: {
|
1074
1081
|
collection: (clientId) => `clients/${clientId}/questions`,
|
@@ -1089,9 +1096,9 @@ var firestorePaths = {
|
|
1089
1096
|
applications: {
|
1090
1097
|
collection: (clientId) => `clients/${clientId}/applications`,
|
1091
1098
|
doc: (clientId, applicationId) => `clients/${clientId}/applications/${applicationId}`,
|
1092
|
-
|
1093
|
-
collection: (clientId, applicationId) => `clients/${clientId}/applications/${applicationId}/
|
1094
|
-
doc: (clientId, applicationId, interviewId) => `clients/${clientId}/applications/${applicationId}/
|
1099
|
+
virtualInterview: {
|
1100
|
+
collection: (clientId, applicationId) => `clients/${clientId}/applications/${applicationId}/virtualInterview`,
|
1101
|
+
doc: (clientId, applicationId, interviewId) => `clients/${clientId}/applications/${applicationId}/virtualInterview/${interviewId}`
|
1095
1102
|
},
|
1096
1103
|
questions: {
|
1097
1104
|
collection: (clientId, applicationId) => `clients/${clientId}/applications/${applicationId}/questions`,
|
@@ -1126,6 +1133,10 @@ var firestorePaths = {
|
|
1126
1133
|
agents: {
|
1127
1134
|
collection: () => "agents",
|
1128
1135
|
doc: (id) => `agents/${id}`
|
1136
|
+
},
|
1137
|
+
authEmails: {
|
1138
|
+
collection: () => "authEmails",
|
1139
|
+
doc: (authEmail) => `authEmails/${authEmail}`
|
1129
1140
|
}
|
1130
1141
|
};
|
1131
1142
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/index.mjs
CHANGED
@@ -1034,10 +1034,17 @@ var firestorePaths = {
|
|
1034
1034
|
clients: {
|
1035
1035
|
collection: () => "clients",
|
1036
1036
|
doc: (id) => `clients/${id}`,
|
1037
|
-
|
1037
|
+
accessTokens: {
|
1038
|
+
collection: (clientId) => `clients/${clientId}/access_tokens`,
|
1039
|
+
doc: (clientId, providerName) => `clients/${clientId}/access_tokens/${providerName}`
|
1040
|
+
},
|
1038
1041
|
emails: {
|
1039
1042
|
collection: (clientId) => `clients/${clientId}/emails`,
|
1040
|
-
doc: (clientId, emailId) => `clients/${clientId}/emails/${emailId}
|
1043
|
+
doc: (clientId, emailId) => `clients/${clientId}/emails/${emailId}`,
|
1044
|
+
analysed: {
|
1045
|
+
collection: (clientId, emailId) => `clients/${clientId}/emails/${emailId}/analysed`,
|
1046
|
+
doc: (clientId, emailId, analysedType) => `clients/${clientId}/emails/${emailId}/analysed/${analysedType}`
|
1047
|
+
}
|
1041
1048
|
},
|
1042
1049
|
questions: {
|
1043
1050
|
collection: (clientId) => `clients/${clientId}/questions`,
|
@@ -1058,9 +1065,9 @@ var firestorePaths = {
|
|
1058
1065
|
applications: {
|
1059
1066
|
collection: (clientId) => `clients/${clientId}/applications`,
|
1060
1067
|
doc: (clientId, applicationId) => `clients/${clientId}/applications/${applicationId}`,
|
1061
|
-
|
1062
|
-
collection: (clientId, applicationId) => `clients/${clientId}/applications/${applicationId}/
|
1063
|
-
doc: (clientId, applicationId, interviewId) => `clients/${clientId}/applications/${applicationId}/
|
1068
|
+
virtualInterview: {
|
1069
|
+
collection: (clientId, applicationId) => `clients/${clientId}/applications/${applicationId}/virtualInterview`,
|
1070
|
+
doc: (clientId, applicationId, interviewId) => `clients/${clientId}/applications/${applicationId}/virtualInterview/${interviewId}`
|
1064
1071
|
},
|
1065
1072
|
questions: {
|
1066
1073
|
collection: (clientId, applicationId) => `clients/${clientId}/applications/${applicationId}/questions`,
|
@@ -1095,6 +1102,10 @@ var firestorePaths = {
|
|
1095
1102
|
agents: {
|
1096
1103
|
collection: () => "agents",
|
1097
1104
|
doc: (id) => `agents/${id}`
|
1105
|
+
},
|
1106
|
+
authEmails: {
|
1107
|
+
collection: () => "authEmails",
|
1108
|
+
doc: (authEmail) => `authEmails/${authEmail}`
|
1098
1109
|
}
|
1099
1110
|
};
|
1100
1111
|
export {
|
package/package.json
CHANGED