@jobsearch-works/firestore-models 1.0.16 → 1.0.18
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 +17 -1
- package/dist/index.d.ts +17 -1
- package/dist/index.js +18 -0
- package/dist/index.mjs +17 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
@@ -172,6 +172,22 @@ interface ClientQuestionAnswerPair {
|
|
172
172
|
createdAt?: Date;
|
173
173
|
}
|
174
174
|
|
175
|
+
declare namespace ClientKnowledgeBase {
|
176
|
+
/**
|
177
|
+
* Represents a Q&A pair in the user's knowledge base
|
178
|
+
*/
|
179
|
+
interface Model extends BaseModel {
|
180
|
+
questionText: string;
|
181
|
+
answerText?: string;
|
182
|
+
type: Type;
|
183
|
+
}
|
184
|
+
type Type = "text" | "select";
|
185
|
+
const TypeOptions: readonly Type[];
|
186
|
+
const collection: (clientId: string) => string;
|
187
|
+
const document: (clientId: string, questionId: string) => string;
|
188
|
+
const createNew: (questionText: string, type: Type, answerText?: string) => ClientKnowledgeBase.Model;
|
189
|
+
}
|
190
|
+
|
175
191
|
/**
|
176
192
|
* UserQuestionData interface defines the core data fields for a user question.
|
177
193
|
*/
|
@@ -239,4 +255,4 @@ declare namespace VacancySuggestion {
|
|
239
255
|
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;
|
240
256
|
}
|
241
257
|
|
242
|
-
export { Application, ApplicationQuestion, ApplicationQuestionDocument, AuthUser, AuthUserCollectionPath, AuthUserUtils, Client, ClientData, ClientLogin, ClientQuestionAnswerPair, Question, QuestionData, UserQuestion, UserQuestionData, Vacancy, VacancySuggestion, getAuthUserDocumentPath };
|
258
|
+
export { Application, ApplicationQuestion, ApplicationQuestionDocument, AuthUser, AuthUserCollectionPath, AuthUserUtils, Client, ClientData, ClientKnowledgeBase, ClientLogin, ClientQuestionAnswerPair, Question, QuestionData, UserQuestion, UserQuestionData, Vacancy, VacancySuggestion, getAuthUserDocumentPath };
|
package/dist/index.d.ts
CHANGED
@@ -172,6 +172,22 @@ interface ClientQuestionAnswerPair {
|
|
172
172
|
createdAt?: Date;
|
173
173
|
}
|
174
174
|
|
175
|
+
declare namespace ClientKnowledgeBase {
|
176
|
+
/**
|
177
|
+
* Represents a Q&A pair in the user's knowledge base
|
178
|
+
*/
|
179
|
+
interface Model extends BaseModel {
|
180
|
+
questionText: string;
|
181
|
+
answerText?: string;
|
182
|
+
type: Type;
|
183
|
+
}
|
184
|
+
type Type = "text" | "select";
|
185
|
+
const TypeOptions: readonly Type[];
|
186
|
+
const collection: (clientId: string) => string;
|
187
|
+
const document: (clientId: string, questionId: string) => string;
|
188
|
+
const createNew: (questionText: string, type: Type, answerText?: string) => ClientKnowledgeBase.Model;
|
189
|
+
}
|
190
|
+
|
175
191
|
/**
|
176
192
|
* UserQuestionData interface defines the core data fields for a user question.
|
177
193
|
*/
|
@@ -239,4 +255,4 @@ declare namespace VacancySuggestion {
|
|
239
255
|
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;
|
240
256
|
}
|
241
257
|
|
242
|
-
export { Application, ApplicationQuestion, ApplicationQuestionDocument, AuthUser, AuthUserCollectionPath, AuthUserUtils, Client, ClientData, ClientLogin, ClientQuestionAnswerPair, Question, QuestionData, UserQuestion, UserQuestionData, Vacancy, VacancySuggestion, getAuthUserDocumentPath };
|
258
|
+
export { Application, ApplicationQuestion, ApplicationQuestionDocument, AuthUser, AuthUserCollectionPath, AuthUserUtils, Client, ClientData, ClientKnowledgeBase, ClientLogin, ClientQuestionAnswerPair, Question, QuestionData, UserQuestion, UserQuestionData, Vacancy, VacancySuggestion, getAuthUserDocumentPath };
|
package/dist/index.js
CHANGED
@@ -25,6 +25,7 @@ __export(src_exports, {
|
|
25
25
|
AuthUserUtils: () => AuthUserUtils,
|
26
26
|
Client: () => Client,
|
27
27
|
ClientData: () => ClientData,
|
28
|
+
ClientKnowledgeBase: () => ClientKnowledgeBase,
|
28
29
|
ClientLogin: () => ClientLogin,
|
29
30
|
Vacancy: () => Vacancy,
|
30
31
|
VacancySuggestion: () => VacancySuggestion,
|
@@ -222,6 +223,22 @@ var ClientLogin;
|
|
222
223
|
};
|
223
224
|
})(ClientLogin || (ClientLogin = {}));
|
224
225
|
|
226
|
+
// src/models/ClientKnowledgeBase.ts
|
227
|
+
var ClientKnowledgeBase;
|
228
|
+
((ClientKnowledgeBase2) => {
|
229
|
+
ClientKnowledgeBase2.TypeOptions = ["text", "select"];
|
230
|
+
ClientKnowledgeBase2.collection = (clientId) => `clients/${clientId}/questions`;
|
231
|
+
ClientKnowledgeBase2.document = (clientId, questionId) => `clients/${clientId}/questions/${questionId}`;
|
232
|
+
ClientKnowledgeBase2.createNew = (questionText, type, answerText) => {
|
233
|
+
return {
|
234
|
+
questionText,
|
235
|
+
type,
|
236
|
+
answerText,
|
237
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
238
|
+
};
|
239
|
+
};
|
240
|
+
})(ClientKnowledgeBase || (ClientKnowledgeBase = {}));
|
241
|
+
|
225
242
|
// src/models/Vacancy.ts
|
226
243
|
var Vacancy;
|
227
244
|
((Vacancy2) => {
|
@@ -287,6 +304,7 @@ var VacancySuggestion;
|
|
287
304
|
AuthUserUtils,
|
288
305
|
Client,
|
289
306
|
ClientData,
|
307
|
+
ClientKnowledgeBase,
|
290
308
|
ClientLogin,
|
291
309
|
Vacancy,
|
292
310
|
VacancySuggestion,
|
package/dist/index.mjs
CHANGED
@@ -188,6 +188,22 @@ var ClientLogin;
|
|
188
188
|
};
|
189
189
|
})(ClientLogin || (ClientLogin = {}));
|
190
190
|
|
191
|
+
// src/models/ClientKnowledgeBase.ts
|
192
|
+
var ClientKnowledgeBase;
|
193
|
+
((ClientKnowledgeBase2) => {
|
194
|
+
ClientKnowledgeBase2.TypeOptions = ["text", "select"];
|
195
|
+
ClientKnowledgeBase2.collection = (clientId) => `clients/${clientId}/questions`;
|
196
|
+
ClientKnowledgeBase2.document = (clientId, questionId) => `clients/${clientId}/questions/${questionId}`;
|
197
|
+
ClientKnowledgeBase2.createNew = (questionText, type, answerText) => {
|
198
|
+
return {
|
199
|
+
questionText,
|
200
|
+
type,
|
201
|
+
answerText,
|
202
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
203
|
+
};
|
204
|
+
};
|
205
|
+
})(ClientKnowledgeBase || (ClientKnowledgeBase = {}));
|
206
|
+
|
191
207
|
// src/models/Vacancy.ts
|
192
208
|
var Vacancy;
|
193
209
|
((Vacancy2) => {
|
@@ -252,6 +268,7 @@ export {
|
|
252
268
|
AuthUserUtils,
|
253
269
|
Client,
|
254
270
|
ClientData,
|
271
|
+
ClientKnowledgeBase,
|
255
272
|
ClientLogin,
|
256
273
|
Vacancy,
|
257
274
|
VacancySuggestion,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@jobsearch-works/firestore-models",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.18",
|
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",
|