@glissandoo/lib 1.0.39 → 1.1.0

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.
@@ -0,0 +1,14 @@
1
+ import * as firestore from '@google-cloud/firestore';
2
+ import Model from '../../Model';
3
+ import { CommunicationCommentData } from './types';
4
+ export default class CommunicationCommment extends Model<CommunicationCommentData> {
5
+ constructor(doc: firestore.DocumentSnapshot);
6
+ get communicationId(): string;
7
+ private get userInfo();
8
+ get name(): string;
9
+ get photoURL(): string;
10
+ private get createdBy();
11
+ get userId(): string;
12
+ get createdAt(): firestore.Timestamp;
13
+ get isEdited(): boolean;
14
+ }
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const get_1 = __importDefault(require("lodash/get"));
7
+ const Model_1 = __importDefault(require("../../Model"));
8
+ class CommunicationCommment extends Model_1.default {
9
+ constructor(doc) {
10
+ super(doc);
11
+ }
12
+ get communicationId() {
13
+ return get_1.default(this.ref, 'parent.parent.id');
14
+ }
15
+ get userInfo() {
16
+ return this.data.userInfo;
17
+ }
18
+ get name() {
19
+ return this.userInfo.displayName;
20
+ }
21
+ get photoURL() {
22
+ return this.userInfo.photoURL;
23
+ }
24
+ get createdBy() {
25
+ return this.data.createdBy;
26
+ }
27
+ get userId() {
28
+ return this.createdBy.id;
29
+ }
30
+ get createdAt() {
31
+ return this.data.createdAt;
32
+ }
33
+ get isEdited() {
34
+ return this.data.editedAt !== null;
35
+ }
36
+ }
37
+ exports.default = CommunicationCommment;
@@ -0,0 +1,9 @@
1
+ import { DocumentReference, Timestamp } from '@google-cloud/firestore';
2
+ import { UserTinyData } from '../../User/types';
3
+ export interface CommunicationCommentData {
4
+ text: string;
5
+ userInfo: UserTinyData;
6
+ editedAt: Timestamp | null;
7
+ readonly createdBy: DocumentReference;
8
+ readonly createdAt: Timestamp;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -38,6 +38,7 @@ export interface GroupRepertoryData extends ThemeBasicData {
38
38
  /** @deprecated */
39
39
  viewers: Record<string, GroupRepertoryViewer>;
40
40
  claims: Record<string, Record<string, GroupRepertoryClaimType>>;
41
+ clonedFrom: DocumentReference | null;
41
42
  readonly owner: DocumentReference;
42
43
  readonly createdAt: Timestamp;
43
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissandoo/lib",
3
- "version": "1.0.39",
3
+ "version": "1.1.0",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",