@glissandoo/lib 1.102.5 → 1.102.7

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.
@@ -2,9 +2,9 @@ import { BadgesTypes } from '../../../helpers/badges';
2
2
  import { LanguagesTypes } from '../../../lang';
3
3
  import { EventType } from '../../Evento/types';
4
4
  import { DocumentModel } from '../../Model';
5
- import PlayerBasic from '../../Player/basic';
5
+ import UserExtended from '../../User/extended';
6
6
  import { GroupPlayerData, GroupPlayerRole } from './types';
7
- export default class GroupPlayer extends PlayerBasic<GroupPlayerData> {
7
+ export default class GroupPlayer extends UserExtended<GroupPlayerData> {
8
8
  constructor(doc: DocumentModel, lang?: LanguagesTypes);
9
9
  get groupId(): string;
10
10
  get instruments(): import("../../../helpers/instruments").InstrumentId[];
@@ -7,9 +7,9 @@ const lodash_1 = require("lodash");
7
7
  const badges_1 = require("../../../helpers/badges");
8
8
  const utils_1 = require("../../../helpers/utils");
9
9
  const lang_1 = require("../../../lang");
10
- const basic_1 = __importDefault(require("../../Player/basic"));
10
+ const extended_1 = __importDefault(require("../../User/extended"));
11
11
  const types_1 = require("./types");
12
- class GroupPlayer extends basic_1.default {
12
+ class GroupPlayer extends extended_1.default {
13
13
  constructor(doc, lang = lang_1.defaultLocale) {
14
14
  super(doc, lang);
15
15
  }
@@ -12,7 +12,7 @@ class PlayerBasic extends basic_1.default {
12
12
  get basicInfo() {
13
13
  return {
14
14
  name: this.name,
15
- lastname: this.lastName,
15
+ lastname: this.lastname,
16
16
  displayName: this.displayName,
17
17
  photoURL: this.photoURL,
18
18
  username: this.username,
@@ -8,7 +8,7 @@ export default class UserBasic<D> extends ModelWithLang<D & UserBasicData> {
8
8
  get basicInfo(): UserBasicData;
9
9
  get displayName(): string;
10
10
  get name(): string;
11
- get lastName(): string;
11
+ get lastname(): string;
12
12
  get username(): string;
13
13
  get photoURL(): string;
14
14
  }
@@ -19,7 +19,7 @@ class UserBasic extends lang_2.default {
19
19
  return {
20
20
  ...this.tinyInfo,
21
21
  name: this.name,
22
- lastname: this.lastName,
22
+ lastname: this.lastname,
23
23
  username: this.username,
24
24
  };
25
25
  }
@@ -29,7 +29,7 @@ class UserBasic extends lang_2.default {
29
29
  get name() {
30
30
  return this.data.name;
31
31
  }
32
- get lastName() {
32
+ get lastname() {
33
33
  return this.data.lastname;
34
34
  }
35
35
  get username() {
@@ -7,5 +7,6 @@ export default class UserExtended<D> extends UserBasic<D & UserExtendedData> {
7
7
  get extendedInfo(): UserExtendedData;
8
8
  get locality(): string | null;
9
9
  get location(): FirebaseFirestore.GeoPoint | null;
10
+ get birthDate(): FirebaseFirestore.Timestamp | null;
10
11
  get email(): string;
11
12
  }
@@ -15,14 +15,17 @@ class UserExtended extends basic_1.default {
15
15
  email: this.email,
16
16
  locality: this.locality,
17
17
  location: this.location,
18
- birthDate: this.data.birthDate,
18
+ birthDate: this.birthDate,
19
19
  };
20
20
  }
21
21
  get locality() {
22
- return this.data.locality;
22
+ return this.data.locality || null;
23
23
  }
24
24
  get location() {
25
- return this.data.location;
25
+ return this.data.location || null;
26
+ }
27
+ get birthDate() {
28
+ return this.data.birthDate || null;
26
29
  }
27
30
  get email() {
28
31
  return this.data.email;
@@ -22,7 +22,6 @@ export default class User extends UserExtended<UserData> {
22
22
  get groups(): string[];
23
23
  get groupsAdmin(): string[];
24
24
  get isAdmin(): boolean;
25
- get birthDate(): FirebaseFirestore.Timestamp | null;
26
25
  get notificationSettings(): Record<UserNotificationSettings, boolean>;
27
26
  get emailSettings(): Record<UserEmailSettings, boolean>;
28
27
  get isActive(): boolean;
@@ -67,9 +67,6 @@ class User extends extended_1.default {
67
67
  get isAdmin() {
68
68
  return this.groupsAdmin.length > 0;
69
69
  }
70
- get birthDate() {
71
- return this.data.birthDate;
72
- }
73
70
  get notificationSettings() {
74
71
  return this.data.notificationSettings || (0, utils_1.enumToObj)(types_2.UserNotificationSettings, true);
75
72
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissandoo/lib",
3
- "version": "1.102.5",
3
+ "version": "1.102.7",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",