@jobsearch-works/firestore-models 1.0.20 → 1.0.22
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 -54
- package/dist/index.d.ts +3 -54
- package/dist/index.js +33 -3
- package/dist/index.mjs +33 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
@@ -138,40 +138,6 @@ 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
141
|
declare namespace ClientQuestion {
|
176
142
|
/**
|
177
143
|
* Represents a Q&A pair in the user's knowledge base
|
@@ -189,26 +155,9 @@ declare namespace ClientQuestion {
|
|
189
155
|
const createNew: (questionText: string, type: Type, answerText?: string, options?: string[]) => ClientQuestion.Model;
|
190
156
|
}
|
191
157
|
|
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 {
|
205
|
-
}
|
206
|
-
|
207
158
|
declare namespace Vacancy {
|
208
|
-
|
209
|
-
|
210
|
-
*/
|
211
|
-
type Category = "Accounting" | "Administration & Office Support" | "Advertising, Arts & Media" | "Banking & Financial Services" | "Call Centre & Customer Service" | "CEO & General Management" | "Community Services & Development" | "Construction" | "Consulting & Strategy" | "Design & Architecture" | "Education & Training" | "Engineering" | "Farming, Animals & Conservation" | "Government & Defence" | "Healthcare & Medical" | "Hospitality & Tourism" | "Human Resources & Recruitment" | "Information & Communication Technology" | "Insurance & Superannuation" | "Legal" | "Manufacturing, Transport & Logistics" | "Marketing & Communications" | "Mining, Resources & Energy" | "Real Estate & Property" | "Retail & Consumer Products" | "Sales" | "Science & Technology" | "Self Employment" | "Sport & Recreation" | "Trades & Services";
|
159
|
+
const CategoryValues: readonly ["Accounting", "Administration & Office Support", "Advertising, Arts & Media", "Banking & Financial Services", "Call Centre & Customer Service", "CEO & General Management", "Community Services & Development", "Construction", "Consulting & Strategy", "Design & Architecture", "Education & Training", "Engineering", "Farming, Animals & Conservation", "Government & Defence", "Healthcare & Medical", "Hospitality & Tourism", "Human Resources & Recruitment", "Information & Communication Technology", "Insurance & Superannuation", "Legal", "Manufacturing, Transport & Logistics", "Marketing & Communications", "Mining, Resources & Energy", "Real Estate & Property", "Retail & Consumer Products", "Sales", "Science & Technology", "Self Employment", "Sport & Recreation", "Trades & Services"];
|
160
|
+
type Category = (typeof CategoryValues)[number];
|
212
161
|
interface Model extends BaseModel {
|
213
162
|
company: string;
|
214
163
|
position: string;
|
@@ -256,4 +205,4 @@ declare namespace VacancySuggestion {
|
|
256
205
|
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
206
|
}
|
258
207
|
|
259
|
-
export { Application,
|
208
|
+
export { Application, AuthUser, AuthUserCollectionPath, AuthUserUtils, Client, ClientData, ClientLogin, ClientQuestion, Vacancy, VacancySuggestion, getAuthUserDocumentPath };
|
package/dist/index.d.ts
CHANGED
@@ -138,40 +138,6 @@ 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
141
|
declare namespace ClientQuestion {
|
176
142
|
/**
|
177
143
|
* Represents a Q&A pair in the user's knowledge base
|
@@ -189,26 +155,9 @@ declare namespace ClientQuestion {
|
|
189
155
|
const createNew: (questionText: string, type: Type, answerText?: string, options?: string[]) => ClientQuestion.Model;
|
190
156
|
}
|
191
157
|
|
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 {
|
205
|
-
}
|
206
|
-
|
207
158
|
declare namespace Vacancy {
|
208
|
-
|
209
|
-
|
210
|
-
*/
|
211
|
-
type Category = "Accounting" | "Administration & Office Support" | "Advertising, Arts & Media" | "Banking & Financial Services" | "Call Centre & Customer Service" | "CEO & General Management" | "Community Services & Development" | "Construction" | "Consulting & Strategy" | "Design & Architecture" | "Education & Training" | "Engineering" | "Farming, Animals & Conservation" | "Government & Defence" | "Healthcare & Medical" | "Hospitality & Tourism" | "Human Resources & Recruitment" | "Information & Communication Technology" | "Insurance & Superannuation" | "Legal" | "Manufacturing, Transport & Logistics" | "Marketing & Communications" | "Mining, Resources & Energy" | "Real Estate & Property" | "Retail & Consumer Products" | "Sales" | "Science & Technology" | "Self Employment" | "Sport & Recreation" | "Trades & Services";
|
159
|
+
const CategoryValues: readonly ["Accounting", "Administration & Office Support", "Advertising, Arts & Media", "Banking & Financial Services", "Call Centre & Customer Service", "CEO & General Management", "Community Services & Development", "Construction", "Consulting & Strategy", "Design & Architecture", "Education & Training", "Engineering", "Farming, Animals & Conservation", "Government & Defence", "Healthcare & Medical", "Hospitality & Tourism", "Human Resources & Recruitment", "Information & Communication Technology", "Insurance & Superannuation", "Legal", "Manufacturing, Transport & Logistics", "Marketing & Communications", "Mining, Resources & Energy", "Real Estate & Property", "Retail & Consumer Products", "Sales", "Science & Technology", "Self Employment", "Sport & Recreation", "Trades & Services"];
|
160
|
+
type Category = (typeof CategoryValues)[number];
|
212
161
|
interface Model extends BaseModel {
|
213
162
|
company: string;
|
214
163
|
position: string;
|
@@ -256,4 +205,4 @@ declare namespace VacancySuggestion {
|
|
256
205
|
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
206
|
}
|
258
207
|
|
259
|
-
export { Application,
|
208
|
+
export { Application, AuthUser, AuthUserCollectionPath, AuthUserUtils, Client, ClientData, ClientLogin, ClientQuestion, Vacancy, VacancySuggestion, getAuthUserDocumentPath };
|
package/dist/index.js
CHANGED
@@ -243,11 +243,41 @@ var ClientQuestion;
|
|
243
243
|
// src/models/Vacancy.ts
|
244
244
|
var Vacancy;
|
245
245
|
((Vacancy2) => {
|
246
|
+
Vacancy2.CategoryValues = [
|
247
|
+
"Accounting",
|
248
|
+
"Administration & Office Support",
|
249
|
+
"Advertising, Arts & Media",
|
250
|
+
"Banking & Financial Services",
|
251
|
+
"Call Centre & Customer Service",
|
252
|
+
"CEO & General Management",
|
253
|
+
"Community Services & Development",
|
254
|
+
"Construction",
|
255
|
+
"Consulting & Strategy",
|
256
|
+
"Design & Architecture",
|
257
|
+
"Education & Training",
|
258
|
+
"Engineering",
|
259
|
+
"Farming, Animals & Conservation",
|
260
|
+
"Government & Defence",
|
261
|
+
"Healthcare & Medical",
|
262
|
+
"Hospitality & Tourism",
|
263
|
+
"Human Resources & Recruitment",
|
264
|
+
"Information & Communication Technology",
|
265
|
+
"Insurance & Superannuation",
|
266
|
+
"Legal",
|
267
|
+
"Manufacturing, Transport & Logistics",
|
268
|
+
"Marketing & Communications",
|
269
|
+
"Mining, Resources & Energy",
|
270
|
+
"Real Estate & Property",
|
271
|
+
"Retail & Consumer Products",
|
272
|
+
"Sales",
|
273
|
+
"Science & Technology",
|
274
|
+
"Self Employment",
|
275
|
+
"Sport & Recreation",
|
276
|
+
"Trades & Services"
|
277
|
+
];
|
246
278
|
Vacancy2.collection = () => "vacancies";
|
247
279
|
Vacancy2.document = (vacancyId) => `vacancies/${vacancyId}`;
|
248
|
-
Vacancy2.formatSummary = (vacancy) => {
|
249
|
-
return `${vacancy.position} at ${vacancy.company} (${vacancy.location})`;
|
250
|
-
};
|
280
|
+
Vacancy2.formatSummary = (vacancy) => `${vacancy.position} at ${vacancy.company} (${vacancy.location})`;
|
251
281
|
Vacancy2.formatDate = (date) => {
|
252
282
|
const dateObj = date instanceof Date ? date : new Date(date);
|
253
283
|
return dateObj.toLocaleDateString();
|
package/dist/index.mjs
CHANGED
@@ -208,11 +208,41 @@ var ClientQuestion;
|
|
208
208
|
// src/models/Vacancy.ts
|
209
209
|
var Vacancy;
|
210
210
|
((Vacancy2) => {
|
211
|
+
Vacancy2.CategoryValues = [
|
212
|
+
"Accounting",
|
213
|
+
"Administration & Office Support",
|
214
|
+
"Advertising, Arts & Media",
|
215
|
+
"Banking & Financial Services",
|
216
|
+
"Call Centre & Customer Service",
|
217
|
+
"CEO & General Management",
|
218
|
+
"Community Services & Development",
|
219
|
+
"Construction",
|
220
|
+
"Consulting & Strategy",
|
221
|
+
"Design & Architecture",
|
222
|
+
"Education & Training",
|
223
|
+
"Engineering",
|
224
|
+
"Farming, Animals & Conservation",
|
225
|
+
"Government & Defence",
|
226
|
+
"Healthcare & Medical",
|
227
|
+
"Hospitality & Tourism",
|
228
|
+
"Human Resources & Recruitment",
|
229
|
+
"Information & Communication Technology",
|
230
|
+
"Insurance & Superannuation",
|
231
|
+
"Legal",
|
232
|
+
"Manufacturing, Transport & Logistics",
|
233
|
+
"Marketing & Communications",
|
234
|
+
"Mining, Resources & Energy",
|
235
|
+
"Real Estate & Property",
|
236
|
+
"Retail & Consumer Products",
|
237
|
+
"Sales",
|
238
|
+
"Science & Technology",
|
239
|
+
"Self Employment",
|
240
|
+
"Sport & Recreation",
|
241
|
+
"Trades & Services"
|
242
|
+
];
|
211
243
|
Vacancy2.collection = () => "vacancies";
|
212
244
|
Vacancy2.document = (vacancyId) => `vacancies/${vacancyId}`;
|
213
|
-
Vacancy2.formatSummary = (vacancy) => {
|
214
|
-
return `${vacancy.position} at ${vacancy.company} (${vacancy.location})`;
|
215
|
-
};
|
245
|
+
Vacancy2.formatSummary = (vacancy) => `${vacancy.position} at ${vacancy.company} (${vacancy.location})`;
|
216
246
|
Vacancy2.formatDate = (date) => {
|
217
247
|
const dateObj = date instanceof Date ? date : new Date(date);
|
218
248
|
return dateObj.toLocaleDateString();
|
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.22",
|
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",
|