@jobsearch-works/firestore-models 1.0.27 → 1.0.29
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 +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +20 -0
- package/dist/index.mjs +19 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
@@ -288,4 +288,17 @@ declare namespace ApplicationQuestion {
|
|
288
288
|
const createNew: (questionText: string, type: Type, answerText?: string) => ApplicationQuestion.Model;
|
289
289
|
}
|
290
290
|
|
291
|
-
|
291
|
+
declare namespace Agent {
|
292
|
+
interface Model extends BaseModel {
|
293
|
+
name: string;
|
294
|
+
email: string;
|
295
|
+
status: "active" | "inactive";
|
296
|
+
profilePicture?: string;
|
297
|
+
}
|
298
|
+
const collection: () => string;
|
299
|
+
const document: (agentId: string) => string;
|
300
|
+
const formatAgent: (agent: Agent.Model) => string;
|
301
|
+
const createNew: (name: string, email: string) => Agent.Model;
|
302
|
+
}
|
303
|
+
|
304
|
+
export { Agent, Application, ApplicationQuestion, AuthUser, AuthUserCollectionPath, AuthUserUtils, Client, ClientData, ClientLogin, ClientQuestion, Vacancy, VacancySuggestion, getAuthUserDocumentPath };
|
package/dist/index.d.ts
CHANGED
@@ -288,4 +288,17 @@ declare namespace ApplicationQuestion {
|
|
288
288
|
const createNew: (questionText: string, type: Type, answerText?: string) => ApplicationQuestion.Model;
|
289
289
|
}
|
290
290
|
|
291
|
-
|
291
|
+
declare namespace Agent {
|
292
|
+
interface Model extends BaseModel {
|
293
|
+
name: string;
|
294
|
+
email: string;
|
295
|
+
status: "active" | "inactive";
|
296
|
+
profilePicture?: string;
|
297
|
+
}
|
298
|
+
const collection: () => string;
|
299
|
+
const document: (agentId: string) => string;
|
300
|
+
const formatAgent: (agent: Agent.Model) => string;
|
301
|
+
const createNew: (name: string, email: string) => Agent.Model;
|
302
|
+
}
|
303
|
+
|
304
|
+
export { Agent, Application, ApplicationQuestion, AuthUser, AuthUserCollectionPath, AuthUserUtils, Client, ClientData, ClientLogin, ClientQuestion, Vacancy, VacancySuggestion, getAuthUserDocumentPath };
|
package/dist/index.js
CHANGED
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
20
20
|
// src/index.ts
|
21
21
|
var src_exports = {};
|
22
22
|
__export(src_exports, {
|
23
|
+
Agent: () => Agent,
|
23
24
|
Application: () => Application,
|
24
25
|
ApplicationQuestion: () => ApplicationQuestion,
|
25
26
|
AuthUserCollectionPath: () => AuthUserCollectionPath,
|
@@ -346,8 +347,27 @@ var ApplicationQuestion;
|
|
346
347
|
};
|
347
348
|
};
|
348
349
|
})(ApplicationQuestion || (ApplicationQuestion = {}));
|
350
|
+
|
351
|
+
// src/models/Agent.ts
|
352
|
+
var Agent;
|
353
|
+
((Agent2) => {
|
354
|
+
Agent2.collection = () => "agents";
|
355
|
+
Agent2.document = (agentId) => `agents/${agentId}`;
|
356
|
+
Agent2.formatAgent = (agent) => {
|
357
|
+
return `${agent.name} (${agent.email}) - ${agent.status}`;
|
358
|
+
};
|
359
|
+
Agent2.createNew = (name, email) => {
|
360
|
+
return {
|
361
|
+
name,
|
362
|
+
email,
|
363
|
+
status: "active",
|
364
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
365
|
+
};
|
366
|
+
};
|
367
|
+
})(Agent || (Agent = {}));
|
349
368
|
// Annotate the CommonJS export names for ESM import in node:
|
350
369
|
0 && (module.exports = {
|
370
|
+
Agent,
|
351
371
|
Application,
|
352
372
|
ApplicationQuestion,
|
353
373
|
AuthUserCollectionPath,
|
package/dist/index.mjs
CHANGED
@@ -310,7 +310,26 @@ var ApplicationQuestion;
|
|
310
310
|
};
|
311
311
|
};
|
312
312
|
})(ApplicationQuestion || (ApplicationQuestion = {}));
|
313
|
+
|
314
|
+
// src/models/Agent.ts
|
315
|
+
var Agent;
|
316
|
+
((Agent2) => {
|
317
|
+
Agent2.collection = () => "agents";
|
318
|
+
Agent2.document = (agentId) => `agents/${agentId}`;
|
319
|
+
Agent2.formatAgent = (agent) => {
|
320
|
+
return `${agent.name} (${agent.email}) - ${agent.status}`;
|
321
|
+
};
|
322
|
+
Agent2.createNew = (name, email) => {
|
323
|
+
return {
|
324
|
+
name,
|
325
|
+
email,
|
326
|
+
status: "active",
|
327
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
328
|
+
};
|
329
|
+
};
|
330
|
+
})(Agent || (Agent = {}));
|
313
331
|
export {
|
332
|
+
Agent,
|
314
333
|
Application,
|
315
334
|
ApplicationQuestion,
|
316
335
|
AuthUserCollectionPath,
|
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.29",
|
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",
|