@kekkle/shared 2.0.0-next.4 → 2.0.0-next.6

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.
Files changed (34) hide show
  1. package/dist/cjs/convertors/node/comment-document.converter.d.ts.map +1 -1
  2. package/dist/cjs/convertors/node/comment-document.converter.js +10 -6
  3. package/dist/cjs/convertors/web/comment-document.converter.d.ts.map +1 -1
  4. package/dist/cjs/convertors/web/comment-document.converter.js +10 -6
  5. package/dist/cjs/types/fields/comment/comment.d.ts +1 -1
  6. package/dist/cjs/types/fields/comment/comment.d.ts.map +1 -1
  7. package/dist/cjs/types/fields/comment/node/comment-firestore.d.ts +1 -1
  8. package/dist/cjs/types/fields/comment/node/comment-firestore.d.ts.map +1 -1
  9. package/dist/cjs/types/fields/comment/web/comment-firestore.d.ts +1 -1
  10. package/dist/cjs/types/fields/comment/web/comment-firestore.d.ts.map +1 -1
  11. package/dist/esm/convertors/node/comment-document.converter.d.ts.map +1 -1
  12. package/dist/esm/convertors/node/comment-document.converter.js +10 -6
  13. package/dist/esm/convertors/web/comment-document.converter.d.ts.map +1 -1
  14. package/dist/esm/convertors/web/comment-document.converter.js +10 -6
  15. package/dist/esm/types/fields/comment/comment.d.ts +1 -1
  16. package/dist/esm/types/fields/comment/comment.d.ts.map +1 -1
  17. package/dist/esm/types/fields/comment/node/comment-firestore.d.ts +1 -1
  18. package/dist/esm/types/fields/comment/node/comment-firestore.d.ts.map +1 -1
  19. package/dist/esm/types/fields/comment/web/comment-firestore.d.ts +1 -1
  20. package/dist/esm/types/fields/comment/web/comment-firestore.d.ts.map +1 -1
  21. package/dist/node/convertors/node/comment-document.converter.d.ts.map +1 -1
  22. package/dist/node/convertors/node/comment-document.converter.js +10 -6
  23. package/dist/node/convertors/web/comment-document.converter.d.ts.map +1 -1
  24. package/dist/node/convertors/web/comment-document.converter.js +10 -6
  25. package/dist/node/types/fields/comment/comment.d.ts +1 -1
  26. package/dist/node/types/fields/comment/comment.d.ts.map +1 -1
  27. package/dist/node/types/fields/comment/node/comment-firestore.d.ts +1 -1
  28. package/dist/node/types/fields/comment/node/comment-firestore.d.ts.map +1 -1
  29. package/dist/node/types/fields/comment/web/comment-firestore.d.ts +1 -1
  30. package/dist/node/types/fields/comment/web/comment-firestore.d.ts.map +1 -1
  31. package/dist/tsconfig.cjs.tsbuildinfo +1 -1
  32. package/dist/tsconfig.esm.tsbuildinfo +1 -1
  33. package/dist/tsconfig.node.tsbuildinfo +1 -1
  34. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/node/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,0BAA0B,CAAC;AAOlC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAqEjE,eAAO,MAAM,6BAA6B;;;;EACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;EACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;EACc,CAAC"}
1
+ {"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/node/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,0BAA0B,CAAC;AAOlC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AA6EjE,eAAO,MAAM,6BAA6B;;;;EACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;EACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;EACc,CAAC"}
@@ -18,12 +18,14 @@ const createCommentDocumentConverter = () => ({
18
18
  const { _id, affected_field, ...comments } = doc;
19
19
  const convertedComments = {};
20
20
  for (const [key, value] of Object.entries(comments)) {
21
- if (typeof value === "object" && value !== null && "date" in value) {
21
+ if (typeof value === "object" &&
22
+ value !== null &&
23
+ "created_at" in value) {
22
24
  convertedComments[key] = {
23
25
  ...value,
24
- date: value.date instanceof Date
25
- ? firestore_1.Timestamp.fromDate(value.date)
26
- : value.date, // FieldValue, Timestamp, or undefined passes through
26
+ created_at: value.created_at instanceof Date
27
+ ? firestore_1.Timestamp.fromDate(value.created_at)
28
+ : value.created_at, // FieldValue, Timestamp, or undefined passes through
27
29
  };
28
30
  }
29
31
  }
@@ -42,11 +44,13 @@ const createCommentDocumentConverter = () => ({
42
44
  const { affected_field, ...comments } = data;
43
45
  const convertedComments = {};
44
46
  for (const [key, value] of Object.entries(comments)) {
45
- if (typeof value === "object" && value !== null && "date" in value) {
47
+ if (typeof value === "object" &&
48
+ value !== null &&
49
+ "created_at" in value) {
46
50
  convertedComments[key] = {
47
51
  author: value.author,
48
52
  comment: value.comment,
49
- date: value.date.toDate(),
53
+ created_at: value.created_at.toDate(),
50
54
  };
51
55
  }
52
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/web/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,oBAAoB,CAAC;AA4E5B,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC"}
1
+ {"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/web/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,oBAAoB,CAAC;AAoF5B,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC"}
@@ -18,12 +18,14 @@ const createCommentDocumentConverter = () => ({
18
18
  const { _id, affected_field, ...comments } = doc;
19
19
  const convertedComments = {};
20
20
  for (const [key, value] of Object.entries(comments)) {
21
- if (typeof value === "object" && value !== null && "date" in value) {
21
+ if (typeof value === "object" &&
22
+ value !== null &&
23
+ "created_at" in value) {
22
24
  convertedComments[key] = {
23
25
  ...value,
24
- date: value.date instanceof Date
25
- ? firestore_1.Timestamp.fromDate(value.date)
26
- : value.date, // FieldValue, Timestamp, or undefined passes through
26
+ created_at: value.created_at instanceof Date
27
+ ? firestore_1.Timestamp.fromDate(value.created_at)
28
+ : value.created_at, // FieldValue, Timestamp, or undefined passes through
27
29
  };
28
30
  }
29
31
  }
@@ -42,11 +44,13 @@ const createCommentDocumentConverter = () => ({
42
44
  const { affected_field, ...comments } = data;
43
45
  const convertedComments = {};
44
46
  for (const [key, value] of Object.entries(comments)) {
45
- if (typeof value === "object" && value !== null && "date" in value) {
47
+ if (typeof value === "object" &&
48
+ value !== null &&
49
+ "created_at" in value) {
46
50
  convertedComments[key] = {
47
51
  author: value.author,
48
52
  comment: value.comment,
49
- date: value.date.toDate(),
53
+ created_at: value.created_at.toDate(),
50
54
  };
51
55
  }
52
56
  }
@@ -6,7 +6,7 @@
6
6
  export type Comment = {
7
7
  author: string;
8
8
  comment: string;
9
- date: Date;
9
+ created_at: Date;
10
10
  };
11
11
  export type PhotoComment = Comment;
12
12
  export type QuoteComment = Comment;
@@ -1 +1 @@
1
- {"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../../../src/types/fields/comment/comment.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,IAAI,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;AAEnC,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;AAEnC,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC"}
1
+ {"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../../../src/types/fields/comment/comment.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,IAAI,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;AAEnC,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;AAEnC,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC"}
@@ -5,7 +5,7 @@ import type { CommentFirestoreBase } from "../../../../types/fields/comment/comm
5
5
  * Uses Timestamp from firebase-admin/firestore
6
6
  */
7
7
  export type CommentFirestore = CommentFirestoreBase & {
8
- date: Timestamp;
8
+ created_at: Timestamp;
9
9
  };
10
10
  export type PhotoCommentFirestore = CommentFirestore;
11
11
  export type QuoteCommentFirestore = CommentFirestore;
@@ -1 +1 @@
1
- {"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/node/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,IAAI,EAAE,SAAS,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC"}
1
+ {"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/node/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,UAAU,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC"}
@@ -5,7 +5,7 @@ import type { CommentFirestoreBase } from "../../../../types/fields/comment/comm
5
5
  * Uses Timestamp from firebase/firestore
6
6
  */
7
7
  export type CommentFirestore = CommentFirestoreBase & {
8
- date: Timestamp;
8
+ created_at: Timestamp;
9
9
  };
10
10
  export type PhotoCommentFirestore = CommentFirestore;
11
11
  export type QuoteCommentFirestore = CommentFirestore;
@@ -1 +1 @@
1
- {"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/web/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,IAAI,EAAE,SAAS,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC"}
1
+ {"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/web/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,UAAU,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/node/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,0BAA0B,CAAC;AAOlC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAqEjE,eAAO,MAAM,6BAA6B;;;;EACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;EACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;EACc,CAAC"}
1
+ {"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/node/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,0BAA0B,CAAC;AAOlC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AA6EjE,eAAO,MAAM,6BAA6B;;;;EACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;EACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;EACc,CAAC"}
@@ -15,12 +15,14 @@ const createCommentDocumentConverter = () => ({
15
15
  const { _id, affected_field, ...comments } = doc;
16
16
  const convertedComments = {};
17
17
  for (const [key, value] of Object.entries(comments)) {
18
- if (typeof value === "object" && value !== null && "date" in value) {
18
+ if (typeof value === "object" &&
19
+ value !== null &&
20
+ "created_at" in value) {
19
21
  convertedComments[key] = {
20
22
  ...value,
21
- date: value.date instanceof Date
22
- ? Timestamp.fromDate(value.date)
23
- : value.date, // FieldValue, Timestamp, or undefined passes through
23
+ created_at: value.created_at instanceof Date
24
+ ? Timestamp.fromDate(value.created_at)
25
+ : value.created_at, // FieldValue, Timestamp, or undefined passes through
24
26
  };
25
27
  }
26
28
  }
@@ -39,11 +41,13 @@ const createCommentDocumentConverter = () => ({
39
41
  const { affected_field, ...comments } = data;
40
42
  const convertedComments = {};
41
43
  for (const [key, value] of Object.entries(comments)) {
42
- if (typeof value === "object" && value !== null && "date" in value) {
44
+ if (typeof value === "object" &&
45
+ value !== null &&
46
+ "created_at" in value) {
43
47
  convertedComments[key] = {
44
48
  author: value.author,
45
49
  comment: value.comment,
46
- date: value.date.toDate(),
50
+ created_at: value.created_at.toDate(),
47
51
  };
48
52
  }
49
53
  }
@@ -1 +1 @@
1
- {"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/web/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,oBAAoB,CAAC;AA4E5B,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC"}
1
+ {"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/web/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,oBAAoB,CAAC;AAoF5B,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC"}
@@ -15,12 +15,14 @@ const createCommentDocumentConverter = () => ({
15
15
  const { _id, affected_field, ...comments } = doc;
16
16
  const convertedComments = {};
17
17
  for (const [key, value] of Object.entries(comments)) {
18
- if (typeof value === "object" && value !== null && "date" in value) {
18
+ if (typeof value === "object" &&
19
+ value !== null &&
20
+ "created_at" in value) {
19
21
  convertedComments[key] = {
20
22
  ...value,
21
- date: value.date instanceof Date
22
- ? Timestamp.fromDate(value.date)
23
- : value.date, // FieldValue, Timestamp, or undefined passes through
23
+ created_at: value.created_at instanceof Date
24
+ ? Timestamp.fromDate(value.created_at)
25
+ : value.created_at, // FieldValue, Timestamp, or undefined passes through
24
26
  };
25
27
  }
26
28
  }
@@ -39,11 +41,13 @@ const createCommentDocumentConverter = () => ({
39
41
  const { affected_field, ...comments } = data;
40
42
  const convertedComments = {};
41
43
  for (const [key, value] of Object.entries(comments)) {
42
- if (typeof value === "object" && value !== null && "date" in value) {
44
+ if (typeof value === "object" &&
45
+ value !== null &&
46
+ "created_at" in value) {
43
47
  convertedComments[key] = {
44
48
  author: value.author,
45
49
  comment: value.comment,
46
- date: value.date.toDate(),
50
+ created_at: value.created_at.toDate(),
47
51
  };
48
52
  }
49
53
  }
@@ -6,7 +6,7 @@
6
6
  export type Comment = {
7
7
  author: string;
8
8
  comment: string;
9
- date: Date;
9
+ created_at: Date;
10
10
  };
11
11
  export type PhotoComment = Comment;
12
12
  export type QuoteComment = Comment;
@@ -1 +1 @@
1
- {"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../../../src/types/fields/comment/comment.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,IAAI,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;AAEnC,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;AAEnC,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC"}
1
+ {"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../../../src/types/fields/comment/comment.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,IAAI,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;AAEnC,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;AAEnC,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC"}
@@ -5,7 +5,7 @@ import type { CommentFirestoreBase } from "../../../../types/fields/comment/comm
5
5
  * Uses Timestamp from firebase-admin/firestore
6
6
  */
7
7
  export type CommentFirestore = CommentFirestoreBase & {
8
- date: Timestamp;
8
+ created_at: Timestamp;
9
9
  };
10
10
  export type PhotoCommentFirestore = CommentFirestore;
11
11
  export type QuoteCommentFirestore = CommentFirestore;
@@ -1 +1 @@
1
- {"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/node/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,IAAI,EAAE,SAAS,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC"}
1
+ {"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/node/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,UAAU,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC"}
@@ -5,7 +5,7 @@ import type { CommentFirestoreBase } from "../../../../types/fields/comment/comm
5
5
  * Uses Timestamp from firebase/firestore
6
6
  */
7
7
  export type CommentFirestore = CommentFirestoreBase & {
8
- date: Timestamp;
8
+ created_at: Timestamp;
9
9
  };
10
10
  export type PhotoCommentFirestore = CommentFirestore;
11
11
  export type QuoteCommentFirestore = CommentFirestore;
@@ -1 +1 @@
1
- {"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/web/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,IAAI,EAAE,SAAS,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC"}
1
+ {"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/web/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,UAAU,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/node/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,0BAA0B,CAAC;AAOlC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAqEjE,eAAO,MAAM,6BAA6B;;;;EACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;EACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;EACc,CAAC"}
1
+ {"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/node/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,0BAA0B,CAAC;AAOlC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AA6EjE,eAAO,MAAM,6BAA6B;;;;EACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;EACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;EACc,CAAC"}
@@ -15,12 +15,14 @@ const createCommentDocumentConverter = () => ({
15
15
  const { _id, affected_field, ...comments } = doc;
16
16
  const convertedComments = {};
17
17
  for (const [key, value] of Object.entries(comments)) {
18
- if (typeof value === "object" && value !== null && "date" in value) {
18
+ if (typeof value === "object" &&
19
+ value !== null &&
20
+ "created_at" in value) {
19
21
  convertedComments[key] = {
20
22
  ...value,
21
- date: value.date instanceof Date
22
- ? Timestamp.fromDate(value.date)
23
- : value.date, // FieldValue, Timestamp, or undefined passes through
23
+ created_at: value.created_at instanceof Date
24
+ ? Timestamp.fromDate(value.created_at)
25
+ : value.created_at, // FieldValue, Timestamp, or undefined passes through
24
26
  };
25
27
  }
26
28
  }
@@ -39,11 +41,13 @@ const createCommentDocumentConverter = () => ({
39
41
  const { affected_field, ...comments } = data;
40
42
  const convertedComments = {};
41
43
  for (const [key, value] of Object.entries(comments)) {
42
- if (typeof value === "object" && value !== null && "date" in value) {
44
+ if (typeof value === "object" &&
45
+ value !== null &&
46
+ "created_at" in value) {
43
47
  convertedComments[key] = {
44
48
  author: value.author,
45
49
  comment: value.comment,
46
- date: value.date.toDate(),
50
+ created_at: value.created_at.toDate(),
47
51
  };
48
52
  }
49
53
  }
@@ -1 +1 @@
1
- {"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/web/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,oBAAoB,CAAC;AA4E5B,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC"}
1
+ {"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/web/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,oBAAoB,CAAC;AAoF5B,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC"}
@@ -15,12 +15,14 @@ const createCommentDocumentConverter = () => ({
15
15
  const { _id, affected_field, ...comments } = doc;
16
16
  const convertedComments = {};
17
17
  for (const [key, value] of Object.entries(comments)) {
18
- if (typeof value === "object" && value !== null && "date" in value) {
18
+ if (typeof value === "object" &&
19
+ value !== null &&
20
+ "created_at" in value) {
19
21
  convertedComments[key] = {
20
22
  ...value,
21
- date: value.date instanceof Date
22
- ? Timestamp.fromDate(value.date)
23
- : value.date, // FieldValue, Timestamp, or undefined passes through
23
+ created_at: value.created_at instanceof Date
24
+ ? Timestamp.fromDate(value.created_at)
25
+ : value.created_at, // FieldValue, Timestamp, or undefined passes through
24
26
  };
25
27
  }
26
28
  }
@@ -39,11 +41,13 @@ const createCommentDocumentConverter = () => ({
39
41
  const { affected_field, ...comments } = data;
40
42
  const convertedComments = {};
41
43
  for (const [key, value] of Object.entries(comments)) {
42
- if (typeof value === "object" && value !== null && "date" in value) {
44
+ if (typeof value === "object" &&
45
+ value !== null &&
46
+ "created_at" in value) {
43
47
  convertedComments[key] = {
44
48
  author: value.author,
45
49
  comment: value.comment,
46
- date: value.date.toDate(),
50
+ created_at: value.created_at.toDate(),
47
51
  };
48
52
  }
49
53
  }
@@ -6,7 +6,7 @@
6
6
  export type Comment = {
7
7
  author: string;
8
8
  comment: string;
9
- date: Date;
9
+ created_at: Date;
10
10
  };
11
11
  export type PhotoComment = Comment;
12
12
  export type QuoteComment = Comment;
@@ -1 +1 @@
1
- {"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../../../src/types/fields/comment/comment.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,IAAI,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;AAEnC,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;AAEnC,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC"}
1
+ {"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../../../src/types/fields/comment/comment.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,IAAI,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;AAEnC,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;AAEnC,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC"}
@@ -5,7 +5,7 @@ import type { CommentFirestoreBase } from "../../../../types/fields/comment/comm
5
5
  * Uses Timestamp from firebase-admin/firestore
6
6
  */
7
7
  export type CommentFirestore = CommentFirestoreBase & {
8
- date: Timestamp;
8
+ created_at: Timestamp;
9
9
  };
10
10
  export type PhotoCommentFirestore = CommentFirestore;
11
11
  export type QuoteCommentFirestore = CommentFirestore;
@@ -1 +1 @@
1
- {"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/node/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,IAAI,EAAE,SAAS,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC"}
1
+ {"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/node/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,UAAU,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC"}
@@ -5,7 +5,7 @@ import type { CommentFirestoreBase } from "../../../../types/fields/comment/comm
5
5
  * Uses Timestamp from firebase/firestore
6
6
  */
7
7
  export type CommentFirestore = CommentFirestoreBase & {
8
- date: Timestamp;
8
+ created_at: Timestamp;
9
9
  };
10
10
  export type PhotoCommentFirestore = CommentFirestore;
11
11
  export type QuoteCommentFirestore = CommentFirestore;
@@ -1 +1 @@
1
- {"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/web/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,IAAI,EAAE,SAAS,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC"}
1
+ {"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/web/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,UAAU,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC"}