@jobsearch-works/firestore-models 1.0.19 → 1.0.21
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 +3 -52
- package/dist/index.d.ts +3 -52
- package/dist/index.js +10 -10
- package/dist/index.mjs +9 -9
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
@@ -138,41 +138,7 @@ declare namespace ClientLogin {
|
|
138
138
|
const createNew: (userId: string, url: string, domain: string, password: string, username?: string, email?: string) => ClientLogin.Model;
|
139
139
|
}
|
140
140
|
|
141
|
-
|
142
|
-
* QuestionData interface defines the core data fields for a generic question.
|
143
|
-
*/
|
144
|
-
interface QuestionData {
|
145
|
-
question: string;
|
146
|
-
options: string[];
|
147
|
-
}
|
148
|
-
/**
|
149
|
-
* Question interface - extends BaseModelInterface and includes QuestionData
|
150
|
-
*/
|
151
|
-
interface Question extends BaseModel, QuestionData {
|
152
|
-
}
|
153
|
-
interface ApplicationQuestion {
|
154
|
-
questionText: string;
|
155
|
-
type: "text";
|
156
|
-
answer?: string;
|
157
|
-
}
|
158
|
-
/**
|
159
|
-
* Represents ApplicationQuestion data including its Firestore document ID.
|
160
|
-
*/
|
161
|
-
type ApplicationQuestionDocument = ApplicationQuestion & {
|
162
|
-
id: string;
|
163
|
-
};
|
164
|
-
/**
|
165
|
-
* Represents a question-answer pair stored centrally for a client.
|
166
|
-
* Assumes structure in clients/{clientId}/questions collection.
|
167
|
-
*/
|
168
|
-
interface ClientQuestionAnswerPair {
|
169
|
-
id?: string;
|
170
|
-
questionText: string;
|
171
|
-
answer: string;
|
172
|
-
createdAt?: Date;
|
173
|
-
}
|
174
|
-
|
175
|
-
declare namespace ClientKnowledgeBase {
|
141
|
+
declare namespace ClientQuestion {
|
176
142
|
/**
|
177
143
|
* Represents a Q&A pair in the user's knowledge base
|
178
144
|
*/
|
@@ -186,22 +152,7 @@ declare namespace ClientKnowledgeBase {
|
|
186
152
|
const TypeOptions: readonly Type[];
|
187
153
|
const collection: (clientId: string) => string;
|
188
154
|
const document: (clientId: string, questionId: string) => string;
|
189
|
-
const createNew: (questionText: string, type: Type, answerText?: string, options?: string[]) =>
|
190
|
-
}
|
191
|
-
|
192
|
-
/**
|
193
|
-
* UserQuestionData interface defines the core data fields for a user question.
|
194
|
-
*/
|
195
|
-
interface UserQuestionData {
|
196
|
-
userId: string;
|
197
|
-
question: string;
|
198
|
-
answer: string;
|
199
|
-
options: string[];
|
200
|
-
}
|
201
|
-
/**
|
202
|
-
* UserQuestion interface - extends BaseModel and includes UserQuestionData
|
203
|
-
*/
|
204
|
-
interface UserQuestion extends BaseModel, UserQuestionData {
|
155
|
+
const createNew: (questionText: string, type: Type, answerText?: string, options?: string[]) => ClientQuestion.Model;
|
205
156
|
}
|
206
157
|
|
207
158
|
declare namespace Vacancy {
|
@@ -256,4 +207,4 @@ declare namespace VacancySuggestion {
|
|
256
207
|
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;
|
257
208
|
}
|
258
209
|
|
259
|
-
export { Application,
|
210
|
+
export { Application, AuthUser, AuthUserCollectionPath, AuthUserUtils, Client, ClientData, ClientLogin, ClientQuestion, Vacancy, VacancySuggestion, getAuthUserDocumentPath };
|
package/dist/index.d.ts
CHANGED
@@ -138,41 +138,7 @@ declare namespace ClientLogin {
|
|
138
138
|
const createNew: (userId: string, url: string, domain: string, password: string, username?: string, email?: string) => ClientLogin.Model;
|
139
139
|
}
|
140
140
|
|
141
|
-
|
142
|
-
* QuestionData interface defines the core data fields for a generic question.
|
143
|
-
*/
|
144
|
-
interface QuestionData {
|
145
|
-
question: string;
|
146
|
-
options: string[];
|
147
|
-
}
|
148
|
-
/**
|
149
|
-
* Question interface - extends BaseModelInterface and includes QuestionData
|
150
|
-
*/
|
151
|
-
interface Question extends BaseModel, QuestionData {
|
152
|
-
}
|
153
|
-
interface ApplicationQuestion {
|
154
|
-
questionText: string;
|
155
|
-
type: "text";
|
156
|
-
answer?: string;
|
157
|
-
}
|
158
|
-
/**
|
159
|
-
* Represents ApplicationQuestion data including its Firestore document ID.
|
160
|
-
*/
|
161
|
-
type ApplicationQuestionDocument = ApplicationQuestion & {
|
162
|
-
id: string;
|
163
|
-
};
|
164
|
-
/**
|
165
|
-
* Represents a question-answer pair stored centrally for a client.
|
166
|
-
* Assumes structure in clients/{clientId}/questions collection.
|
167
|
-
*/
|
168
|
-
interface ClientQuestionAnswerPair {
|
169
|
-
id?: string;
|
170
|
-
questionText: string;
|
171
|
-
answer: string;
|
172
|
-
createdAt?: Date;
|
173
|
-
}
|
174
|
-
|
175
|
-
declare namespace ClientKnowledgeBase {
|
141
|
+
declare namespace ClientQuestion {
|
176
142
|
/**
|
177
143
|
* Represents a Q&A pair in the user's knowledge base
|
178
144
|
*/
|
@@ -186,22 +152,7 @@ declare namespace ClientKnowledgeBase {
|
|
186
152
|
const TypeOptions: readonly Type[];
|
187
153
|
const collection: (clientId: string) => string;
|
188
154
|
const document: (clientId: string, questionId: string) => string;
|
189
|
-
const createNew: (questionText: string, type: Type, answerText?: string, options?: string[]) =>
|
190
|
-
}
|
191
|
-
|
192
|
-
/**
|
193
|
-
* UserQuestionData interface defines the core data fields for a user question.
|
194
|
-
*/
|
195
|
-
interface UserQuestionData {
|
196
|
-
userId: string;
|
197
|
-
question: string;
|
198
|
-
answer: string;
|
199
|
-
options: string[];
|
200
|
-
}
|
201
|
-
/**
|
202
|
-
* UserQuestion interface - extends BaseModel and includes UserQuestionData
|
203
|
-
*/
|
204
|
-
interface UserQuestion extends BaseModel, UserQuestionData {
|
155
|
+
const createNew: (questionText: string, type: Type, answerText?: string, options?: string[]) => ClientQuestion.Model;
|
205
156
|
}
|
206
157
|
|
207
158
|
declare namespace Vacancy {
|
@@ -256,4 +207,4 @@ declare namespace VacancySuggestion {
|
|
256
207
|
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;
|
257
208
|
}
|
258
209
|
|
259
|
-
export { Application,
|
210
|
+
export { Application, AuthUser, AuthUserCollectionPath, AuthUserUtils, Client, ClientData, ClientLogin, ClientQuestion, Vacancy, VacancySuggestion, getAuthUserDocumentPath };
|
package/dist/index.js
CHANGED
@@ -25,8 +25,8 @@ __export(src_exports, {
|
|
25
25
|
AuthUserUtils: () => AuthUserUtils,
|
26
26
|
Client: () => Client,
|
27
27
|
ClientData: () => ClientData,
|
28
|
-
ClientKnowledgeBase: () => ClientKnowledgeBase,
|
29
28
|
ClientLogin: () => ClientLogin,
|
29
|
+
ClientQuestion: () => ClientQuestion,
|
30
30
|
Vacancy: () => Vacancy,
|
31
31
|
VacancySuggestion: () => VacancySuggestion,
|
32
32
|
getAuthUserDocumentPath: () => getAuthUserDocumentPath
|
@@ -223,13 +223,13 @@ var ClientLogin;
|
|
223
223
|
};
|
224
224
|
})(ClientLogin || (ClientLogin = {}));
|
225
225
|
|
226
|
-
// src/models/
|
227
|
-
var
|
228
|
-
((
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
226
|
+
// src/models/ClientQuestion.ts
|
227
|
+
var ClientQuestion;
|
228
|
+
((ClientQuestion2) => {
|
229
|
+
ClientQuestion2.TypeOptions = ["text", "select"];
|
230
|
+
ClientQuestion2.collection = (clientId) => `clients/${clientId}/questions`;
|
231
|
+
ClientQuestion2.document = (clientId, questionId) => `clients/${clientId}/questions/${questionId}`;
|
232
|
+
ClientQuestion2.createNew = (questionText, type, answerText, options) => {
|
233
233
|
return {
|
234
234
|
questionText,
|
235
235
|
type,
|
@@ -238,7 +238,7 @@ var ClientKnowledgeBase;
|
|
238
238
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
239
239
|
};
|
240
240
|
};
|
241
|
-
})(
|
241
|
+
})(ClientQuestion || (ClientQuestion = {}));
|
242
242
|
|
243
243
|
// src/models/Vacancy.ts
|
244
244
|
var Vacancy;
|
@@ -305,8 +305,8 @@ var VacancySuggestion;
|
|
305
305
|
AuthUserUtils,
|
306
306
|
Client,
|
307
307
|
ClientData,
|
308
|
-
ClientKnowledgeBase,
|
309
308
|
ClientLogin,
|
309
|
+
ClientQuestion,
|
310
310
|
Vacancy,
|
311
311
|
VacancySuggestion,
|
312
312
|
getAuthUserDocumentPath
|
package/dist/index.mjs
CHANGED
@@ -188,13 +188,13 @@ var ClientLogin;
|
|
188
188
|
};
|
189
189
|
})(ClientLogin || (ClientLogin = {}));
|
190
190
|
|
191
|
-
// src/models/
|
192
|
-
var
|
193
|
-
((
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
191
|
+
// src/models/ClientQuestion.ts
|
192
|
+
var ClientQuestion;
|
193
|
+
((ClientQuestion2) => {
|
194
|
+
ClientQuestion2.TypeOptions = ["text", "select"];
|
195
|
+
ClientQuestion2.collection = (clientId) => `clients/${clientId}/questions`;
|
196
|
+
ClientQuestion2.document = (clientId, questionId) => `clients/${clientId}/questions/${questionId}`;
|
197
|
+
ClientQuestion2.createNew = (questionText, type, answerText, options) => {
|
198
198
|
return {
|
199
199
|
questionText,
|
200
200
|
type,
|
@@ -203,7 +203,7 @@ var ClientKnowledgeBase;
|
|
203
203
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
204
204
|
};
|
205
205
|
};
|
206
|
-
})(
|
206
|
+
})(ClientQuestion || (ClientQuestion = {}));
|
207
207
|
|
208
208
|
// src/models/Vacancy.ts
|
209
209
|
var Vacancy;
|
@@ -269,8 +269,8 @@ export {
|
|
269
269
|
AuthUserUtils,
|
270
270
|
Client,
|
271
271
|
ClientData,
|
272
|
-
ClientKnowledgeBase,
|
273
272
|
ClientLogin,
|
273
|
+
ClientQuestion,
|
274
274
|
Vacancy,
|
275
275
|
VacancySuggestion,
|
276
276
|
getAuthUserDocumentPath
|
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.21",
|
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",
|