@glissandoo/lib 1.1.3 → 1.1.5

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.
@@ -4,10 +4,12 @@ import { CommunicationCommentData } from './types';
4
4
  export default class CommunicationCommment extends Model<CommunicationCommentData> {
5
5
  constructor(doc: firestore.DocumentSnapshot);
6
6
  get communicationId(): string;
7
- private get userInfo();
7
+ private get player();
8
8
  get text(): string;
9
9
  get name(): string;
10
10
  get photoURL(): string;
11
+ get mainInstrument(): import("../../../helpers/instruments").InstrumentId;
12
+ get username(): string;
11
13
  private get createdBy();
12
14
  get userId(): string;
13
15
  get createdAt(): firestore.Timestamp;
@@ -12,17 +12,23 @@ class CommunicationCommment extends Model_1.default {
12
12
  get communicationId() {
13
13
  return get_1.default(this.ref, 'parent.parent.id');
14
14
  }
15
- get userInfo() {
16
- return this.data.userInfo;
15
+ get player() {
16
+ return this.data.playerInfo;
17
17
  }
18
18
  get text() {
19
19
  return this.data.text || '';
20
20
  }
21
21
  get name() {
22
- return this.userInfo.displayName;
22
+ return this.player.displayName;
23
23
  }
24
24
  get photoURL() {
25
- return this.userInfo.photoURL;
25
+ return this.player.photoURL;
26
+ }
27
+ get mainInstrument() {
28
+ return this.player.mainInstrument;
29
+ }
30
+ get username() {
31
+ return this.player.username;
26
32
  }
27
33
  get createdBy() {
28
34
  return this.data.createdBy;
@@ -1,8 +1,8 @@
1
1
  import { DocumentReference, Timestamp } from '@google-cloud/firestore';
2
- import { UserTinyData } from '../../User/types';
2
+ import { PlayerBasicData } from '../../Player/types';
3
3
  export interface CommunicationCommentData {
4
4
  text: string;
5
- userInfo: UserTinyData;
5
+ playerInfo: PlayerBasicData;
6
6
  editedAt: Timestamp | null;
7
7
  readonly createdBy: DocumentReference;
8
8
  readonly createdAt: Timestamp;
@@ -10,6 +10,23 @@ export declare enum CommunicationThumbnailType {
10
10
  Avatar = "avatar",
11
11
  Image = "image"
12
12
  }
13
+ export declare enum CommunicationReactions {
14
+ OK = "\uD83D\uDC4D",
15
+ Claps = "\uD83D\uDC4F",
16
+ Muscle = "\uD83D\uDCAA",
17
+ LOL = "\uD83D\uDE02",
18
+ HeartFace = "\uD83D\uDE0D",
19
+ Cool = "\uD83D\uDE0E",
20
+ Sad = "\uD83D\uDE22",
21
+ Sick = "\uD83E\uDD12",
22
+ Eyes = "\uD83D\uDC40",
23
+ Check = "\u2705",
24
+ Hearth = "\u2764\uFE0F",
25
+ Party = "\uD83C\uDF89",
26
+ Fire = "\uD83D\uDD25",
27
+ Rocket = "\uD83D\uDE80",
28
+ Car = "\uD83D\uDE97"
29
+ }
13
30
  export interface RichTextChildren {
14
31
  text: string;
15
32
  bold?: boolean;
@@ -28,7 +45,7 @@ export interface CommunicationRecipientData {
28
45
  viewedAt: Timestamp | null;
29
46
  lastViewedAt: Timestamp | null;
30
47
  countViews: number;
31
- reaction: string | null;
48
+ reaction: CommunicationReactions | null;
32
49
  }
33
50
  export interface CommunicationData {
34
51
  title: string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CommunicationThumbnailType = exports.CommunicationType = void 0;
3
+ exports.CommunicationReactions = exports.CommunicationThumbnailType = exports.CommunicationType = void 0;
4
4
  var CommunicationType;
5
5
  (function (CommunicationType) {
6
6
  CommunicationType["Private"] = "user";
@@ -11,3 +11,21 @@ var CommunicationThumbnailType;
11
11
  CommunicationThumbnailType["Avatar"] = "avatar";
12
12
  CommunicationThumbnailType["Image"] = "image";
13
13
  })(CommunicationThumbnailType = exports.CommunicationThumbnailType || (exports.CommunicationThumbnailType = {}));
14
+ var CommunicationReactions;
15
+ (function (CommunicationReactions) {
16
+ CommunicationReactions["OK"] = "\uD83D\uDC4D";
17
+ CommunicationReactions["Claps"] = "\uD83D\uDC4F";
18
+ CommunicationReactions["Muscle"] = "\uD83D\uDCAA";
19
+ CommunicationReactions["LOL"] = "\uD83D\uDE02";
20
+ CommunicationReactions["HeartFace"] = "\uD83D\uDE0D";
21
+ CommunicationReactions["Cool"] = "\uD83D\uDE0E";
22
+ CommunicationReactions["Sad"] = "\uD83D\uDE22";
23
+ CommunicationReactions["Sick"] = "\uD83E\uDD12";
24
+ CommunicationReactions["Eyes"] = "\uD83D\uDC40";
25
+ CommunicationReactions["Check"] = "\u2705";
26
+ CommunicationReactions["Hearth"] = "\u2764\uFE0F";
27
+ CommunicationReactions["Party"] = "\uD83C\uDF89";
28
+ CommunicationReactions["Fire"] = "\uD83D\uDD25";
29
+ CommunicationReactions["Rocket"] = "\uD83D\uDE80";
30
+ CommunicationReactions["Car"] = "\uD83D\uDE97";
31
+ })(CommunicationReactions = exports.CommunicationReactions || (exports.CommunicationReactions = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissandoo/lib",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",