@jobsearch-works/firestore-models 1.0.30 → 1.0.32
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/README.md +17 -3
- package/dist/index.d.mts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +20 -0
- package/dist/index.mjs +19 -0
- package/package.json +1 -1
package/README.md
CHANGED
@@ -18,12 +18,26 @@ This library serves as a single source of truth for Firestore data structures ac
|
|
18
18
|
|
19
19
|
## Installation
|
20
20
|
|
21
|
+
The package is published on npm as [@jobsearch-works/firestore-models](https://www.npmjs.com/package/@jobsearch-works/firestore-models).
|
22
|
+
|
23
|
+
You can install it using npm:
|
24
|
+
|
25
|
+
```bash
|
26
|
+
npm install @jobsearch-works/firestore-models
|
27
|
+
```
|
28
|
+
|
29
|
+
For development purposes, you can also install directly from GitHub:
|
30
|
+
|
21
31
|
```bash
|
22
|
-
|
23
|
-
|
24
|
-
|
32
|
+
# Install from GitHub (for development only)
|
33
|
+
npm install github:jobsearch-works/firestore-models
|
34
|
+
|
35
|
+
# Or specify a particular commit/branch
|
36
|
+
npm install github:jobsearch-works/firestore-models#commit-hash
|
25
37
|
```
|
26
38
|
|
39
|
+
Note: Regular `npm update` won't update GitHub-hosted packages to the latest version. For production use, always use the npm package version.
|
40
|
+
|
27
41
|
## Project Structure
|
28
42
|
|
29
43
|
```
|
package/dist/index.d.mts
CHANGED
@@ -301,4 +301,32 @@ declare namespace Agent {
|
|
301
301
|
const createNew: (name: string, email: string) => Agent.Model;
|
302
302
|
}
|
303
303
|
|
304
|
-
|
304
|
+
declare namespace GmailMessage {
|
305
|
+
interface Model extends BaseModel {
|
306
|
+
messageId: string;
|
307
|
+
threadId?: string;
|
308
|
+
labelIds?: string[];
|
309
|
+
snippet?: string;
|
310
|
+
internalDate?: string;
|
311
|
+
payload?: {
|
312
|
+
headers?: Array<{
|
313
|
+
name: string;
|
314
|
+
value: string;
|
315
|
+
}>;
|
316
|
+
body?: {
|
317
|
+
data?: string;
|
318
|
+
};
|
319
|
+
parts?: Array<{
|
320
|
+
mimeType?: string;
|
321
|
+
body?: {
|
322
|
+
data?: string;
|
323
|
+
};
|
324
|
+
}>;
|
325
|
+
};
|
326
|
+
}
|
327
|
+
const collection: (clientId: string) => string;
|
328
|
+
const document: (clientId: string, messageId: string) => string;
|
329
|
+
const createNew: (messageId: string, threadId?: string, payload?: Model["payload"], labelIds?: string[], snippet?: string, internalDate?: string) => Model;
|
330
|
+
}
|
331
|
+
|
332
|
+
export { Agent, Application, ApplicationQuestion, AuthUser, Client, ClientData, ClientLogin, ClientQuestion, GmailMessage, Vacancy, VacancySuggestion };
|
package/dist/index.d.ts
CHANGED
@@ -301,4 +301,32 @@ declare namespace Agent {
|
|
301
301
|
const createNew: (name: string, email: string) => Agent.Model;
|
302
302
|
}
|
303
303
|
|
304
|
-
|
304
|
+
declare namespace GmailMessage {
|
305
|
+
interface Model extends BaseModel {
|
306
|
+
messageId: string;
|
307
|
+
threadId?: string;
|
308
|
+
labelIds?: string[];
|
309
|
+
snippet?: string;
|
310
|
+
internalDate?: string;
|
311
|
+
payload?: {
|
312
|
+
headers?: Array<{
|
313
|
+
name: string;
|
314
|
+
value: string;
|
315
|
+
}>;
|
316
|
+
body?: {
|
317
|
+
data?: string;
|
318
|
+
};
|
319
|
+
parts?: Array<{
|
320
|
+
mimeType?: string;
|
321
|
+
body?: {
|
322
|
+
data?: string;
|
323
|
+
};
|
324
|
+
}>;
|
325
|
+
};
|
326
|
+
}
|
327
|
+
const collection: (clientId: string) => string;
|
328
|
+
const document: (clientId: string, messageId: string) => string;
|
329
|
+
const createNew: (messageId: string, threadId?: string, payload?: Model["payload"], labelIds?: string[], snippet?: string, internalDate?: string) => Model;
|
330
|
+
}
|
331
|
+
|
332
|
+
export { Agent, Application, ApplicationQuestion, AuthUser, Client, ClientData, ClientLogin, ClientQuestion, GmailMessage, Vacancy, VacancySuggestion };
|
package/dist/index.js
CHANGED
@@ -28,6 +28,7 @@ __export(src_exports, {
|
|
28
28
|
ClientData: () => ClientData,
|
29
29
|
ClientLogin: () => ClientLogin,
|
30
30
|
ClientQuestion: () => ClientQuestion,
|
31
|
+
GmailMessage: () => GmailMessage,
|
31
32
|
Vacancy: () => Vacancy,
|
32
33
|
VacancySuggestion: () => VacancySuggestion
|
33
34
|
});
|
@@ -375,6 +376,24 @@ var Agent;
|
|
375
376
|
};
|
376
377
|
};
|
377
378
|
})(Agent || (Agent = {}));
|
379
|
+
|
380
|
+
// src/models/GmailMessage.ts
|
381
|
+
var GmailMessage;
|
382
|
+
((GmailMessage2) => {
|
383
|
+
GmailMessage2.collection = (clientId) => `clientEmails/${clientId}/messages`;
|
384
|
+
GmailMessage2.document = (clientId, messageId) => `${(0, GmailMessage2.collection)(clientId)}/${messageId}`;
|
385
|
+
GmailMessage2.createNew = (messageId, threadId, payload, labelIds, snippet, internalDate) => {
|
386
|
+
return {
|
387
|
+
messageId,
|
388
|
+
threadId,
|
389
|
+
payload,
|
390
|
+
labelIds,
|
391
|
+
snippet,
|
392
|
+
internalDate,
|
393
|
+
createdAt: /* @__PURE__ */ new Date()
|
394
|
+
};
|
395
|
+
};
|
396
|
+
})(GmailMessage || (GmailMessage = {}));
|
378
397
|
// Annotate the CommonJS export names for ESM import in node:
|
379
398
|
0 && (module.exports = {
|
380
399
|
Agent,
|
@@ -385,6 +404,7 @@ var Agent;
|
|
385
404
|
ClientData,
|
386
405
|
ClientLogin,
|
387
406
|
ClientQuestion,
|
407
|
+
GmailMessage,
|
388
408
|
Vacancy,
|
389
409
|
VacancySuggestion
|
390
410
|
});
|
package/dist/index.mjs
CHANGED
@@ -340,6 +340,24 @@ var Agent;
|
|
340
340
|
};
|
341
341
|
};
|
342
342
|
})(Agent || (Agent = {}));
|
343
|
+
|
344
|
+
// src/models/GmailMessage.ts
|
345
|
+
var GmailMessage;
|
346
|
+
((GmailMessage2) => {
|
347
|
+
GmailMessage2.collection = (clientId) => `clientEmails/${clientId}/messages`;
|
348
|
+
GmailMessage2.document = (clientId, messageId) => `${(0, GmailMessage2.collection)(clientId)}/${messageId}`;
|
349
|
+
GmailMessage2.createNew = (messageId, threadId, payload, labelIds, snippet, internalDate) => {
|
350
|
+
return {
|
351
|
+
messageId,
|
352
|
+
threadId,
|
353
|
+
payload,
|
354
|
+
labelIds,
|
355
|
+
snippet,
|
356
|
+
internalDate,
|
357
|
+
createdAt: /* @__PURE__ */ new Date()
|
358
|
+
};
|
359
|
+
};
|
360
|
+
})(GmailMessage || (GmailMessage = {}));
|
343
361
|
export {
|
344
362
|
Agent,
|
345
363
|
Application,
|
@@ -349,6 +367,7 @@ export {
|
|
349
367
|
ClientData,
|
350
368
|
ClientLogin,
|
351
369
|
ClientQuestion,
|
370
|
+
GmailMessage,
|
352
371
|
Vacancy,
|
353
372
|
VacancySuggestion
|
354
373
|
};
|
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.32",
|
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",
|