@jobsearch-works/firestore-models 1.0.23 → 1.0.24
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
@@ -260,4 +260,20 @@ declare namespace VacancySuggestion {
|
|
260
260
|
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;
|
261
261
|
}
|
262
262
|
|
263
|
-
|
263
|
+
declare namespace ApplicationQuestion {
|
264
|
+
/**
|
265
|
+
* Represents a question and answer for a job application
|
266
|
+
*/
|
267
|
+
interface Model extends BaseModel {
|
268
|
+
questionText: string;
|
269
|
+
answerText?: string;
|
270
|
+
type: Type;
|
271
|
+
}
|
272
|
+
type Type = "text" | "select";
|
273
|
+
const TypeOptions: readonly Type[];
|
274
|
+
const collection: (clientId: string, applicationId: string) => string;
|
275
|
+
const document: (clientId: string, applicationId: string, questionId: string) => string;
|
276
|
+
const createNew: (questionText: string, type: Type, answerText?: string) => ApplicationQuestion.Model;
|
277
|
+
}
|
278
|
+
|
279
|
+
export { Application, ApplicationQuestion, AuthUser, AuthUserCollectionPath, AuthUserUtils, Client, ClientData, ClientLogin, ClientQuestion, Vacancy, VacancySuggestion, getAuthUserDocumentPath };
|
package/dist/index.d.ts
CHANGED
@@ -260,4 +260,20 @@ declare namespace VacancySuggestion {
|
|
260
260
|
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;
|
261
261
|
}
|
262
262
|
|
263
|
-
|
263
|
+
declare namespace ApplicationQuestion {
|
264
|
+
/**
|
265
|
+
* Represents a question and answer for a job application
|
266
|
+
*/
|
267
|
+
interface Model extends BaseModel {
|
268
|
+
questionText: string;
|
269
|
+
answerText?: string;
|
270
|
+
type: Type;
|
271
|
+
}
|
272
|
+
type Type = "text" | "select";
|
273
|
+
const TypeOptions: readonly Type[];
|
274
|
+
const collection: (clientId: string, applicationId: string) => string;
|
275
|
+
const document: (clientId: string, applicationId: string, questionId: string) => string;
|
276
|
+
const createNew: (questionText: string, type: Type, answerText?: string) => ApplicationQuestion.Model;
|
277
|
+
}
|
278
|
+
|
279
|
+
export { Application, ApplicationQuestion, AuthUser, AuthUserCollectionPath, AuthUserUtils, Client, ClientData, ClientLogin, ClientQuestion, Vacancy, VacancySuggestion, getAuthUserDocumentPath };
|
package/dist/index.js
CHANGED
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
21
21
|
var src_exports = {};
|
22
22
|
__export(src_exports, {
|
23
23
|
Application: () => Application,
|
24
|
+
ApplicationQuestion: () => ApplicationQuestion,
|
24
25
|
AuthUserCollectionPath: () => AuthUserCollectionPath,
|
25
26
|
AuthUserUtils: () => AuthUserUtils,
|
26
27
|
Client: () => Client,
|
@@ -328,9 +329,26 @@ var VacancySuggestion;
|
|
328
329
|
};
|
329
330
|
};
|
330
331
|
})(VacancySuggestion || (VacancySuggestion = {}));
|
332
|
+
|
333
|
+
// src/models/ApplicationQuestion.ts
|
334
|
+
var ApplicationQuestion;
|
335
|
+
((ApplicationQuestion2) => {
|
336
|
+
ApplicationQuestion2.TypeOptions = ["text", "select"];
|
337
|
+
ApplicationQuestion2.collection = (clientId, applicationId) => `clients/${clientId}/applications/${applicationId}/questions`;
|
338
|
+
ApplicationQuestion2.document = (clientId, applicationId, questionId) => `clients/${clientId}/applications/${applicationId}/questions/${questionId}`;
|
339
|
+
ApplicationQuestion2.createNew = (questionText, type, answerText) => {
|
340
|
+
return {
|
341
|
+
questionText,
|
342
|
+
type,
|
343
|
+
answerText,
|
344
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
345
|
+
};
|
346
|
+
};
|
347
|
+
})(ApplicationQuestion || (ApplicationQuestion = {}));
|
331
348
|
// Annotate the CommonJS export names for ESM import in node:
|
332
349
|
0 && (module.exports = {
|
333
350
|
Application,
|
351
|
+
ApplicationQuestion,
|
334
352
|
AuthUserCollectionPath,
|
335
353
|
AuthUserUtils,
|
336
354
|
Client,
|
package/dist/index.mjs
CHANGED
@@ -293,8 +293,25 @@ var VacancySuggestion;
|
|
293
293
|
};
|
294
294
|
};
|
295
295
|
})(VacancySuggestion || (VacancySuggestion = {}));
|
296
|
+
|
297
|
+
// src/models/ApplicationQuestion.ts
|
298
|
+
var ApplicationQuestion;
|
299
|
+
((ApplicationQuestion2) => {
|
300
|
+
ApplicationQuestion2.TypeOptions = ["text", "select"];
|
301
|
+
ApplicationQuestion2.collection = (clientId, applicationId) => `clients/${clientId}/applications/${applicationId}/questions`;
|
302
|
+
ApplicationQuestion2.document = (clientId, applicationId, questionId) => `clients/${clientId}/applications/${applicationId}/questions/${questionId}`;
|
303
|
+
ApplicationQuestion2.createNew = (questionText, type, answerText) => {
|
304
|
+
return {
|
305
|
+
questionText,
|
306
|
+
type,
|
307
|
+
answerText,
|
308
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
309
|
+
};
|
310
|
+
};
|
311
|
+
})(ApplicationQuestion || (ApplicationQuestion = {}));
|
296
312
|
export {
|
297
313
|
Application,
|
314
|
+
ApplicationQuestion,
|
298
315
|
AuthUserCollectionPath,
|
299
316
|
AuthUserUtils,
|
300
317
|
Client,
|
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.24",
|
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",
|