@glissandoo/lib 1.0.4 → 1.0.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.
@@ -5,6 +5,7 @@ export declare enum CollectionNames {
5
5
  UserGroups = "groups",
6
6
  UserNotifications = "notifications",
7
7
  Counters = "database",
8
+ Records = "records",
8
9
  Event = "event",
9
10
  EventPlayers = "players",
10
11
  EventRepertory = "repertory",
@@ -9,6 +9,7 @@ var CollectionNames;
9
9
  CollectionNames["UserGroups"] = "groups";
10
10
  CollectionNames["UserNotifications"] = "notifications";
11
11
  CollectionNames["Counters"] = "database";
12
+ CollectionNames["Records"] = "records";
12
13
  CollectionNames["Event"] = "event";
13
14
  CollectionNames["EventPlayers"] = "players";
14
15
  CollectionNames["EventRepertory"] = "repertory";
@@ -8,4 +8,5 @@ export default class GroupAnalytics extends Model<GroupAnalyticsData> {
8
8
  get satisfactionIndexElements(): Record<import("./types").SatisfactionIndexElements, import("./types").SITypes>;
9
9
  get createdAt(): firestore.Timestamp;
10
10
  get weekDate(): Date;
11
+ get status(): string;
11
12
  }
@@ -25,5 +25,8 @@ class GroupAnalytics extends Model_1.default {
25
25
  get weekDate() {
26
26
  return date_fns_1.parse(this.id, 'yyyyMMdd', new Date());
27
27
  }
28
+ get status() {
29
+ return this.data.status;
30
+ }
28
31
  }
29
32
  exports.default = GroupAnalytics;
@@ -1,12 +1,16 @@
1
1
  import { Timestamp } from '@google-cloud/firestore';
2
2
  export declare enum SatisfactionIndexElements {
3
- ADMIN_COUNT = "adminCount",
4
- MEMBERS_COUNT = "memberCount",
5
- EVENTS_PER_WEEK = "eventsPerWeek",
6
- EVENTS_ROLLCALLED_RATIO = "eventsRollcalledRatio",
7
- EVENTS_ATTENDANCE_PREVISION_RATIO = "eventsAttendancePrevisionRatio",
8
- EVENTS_ANSWER_RATIO = "eventsAnswerRatio",
9
- EVENTS_WITH_REPERTORY_RATIO = "eventsWithRepertoryRatio"
3
+ ROLLCALLED_EVENTS_RATIO = "ROLLCALLED_EVENTS_RATIO",
4
+ ADMIN_COUNT = "ADMIN_COUNT",
5
+ MEMBERS_COUNT = "MEMBERS_COUNT",
6
+ EVENTS_PER_WEEK = "EVENTS_PER_WEEK",
7
+ ATTENDANCE_PREVISION_RATIO = "ATTENDANCE_PREVISION_RATIO",
8
+ EVENTS_ANSWER_PERCENTAGE = "EVENTS_ANSWER_PERCENTAGE",
9
+ EVENTS_WITH_REPERTORY_PERCENTAGE = "EVENTS_WITH_REPERTORY_PERCENTAGE",
10
+ REPERTORY_COUNT = "REPERTORY_COUNT",
11
+ COMMUNICATION_COUNT = "COMMUNICATION_COUNT",
12
+ EVENTS_COUNT = "EVENTS_COUNT",
13
+ EVENTS_FUTURE_COUNT = "EVENTS_FUTURE_COUNT"
10
14
  }
11
15
  export interface SITypes {
12
16
  value: number;
@@ -17,4 +21,5 @@ export interface GroupAnalyticsData {
17
21
  satisfactionIndexElements: Record<SatisfactionIndexElements, SITypes>;
18
22
  satisfactionIndex: number;
19
23
  createdAt: Timestamp;
24
+ status: string;
20
25
  }
@@ -3,11 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SatisfactionIndexElements = void 0;
4
4
  var SatisfactionIndexElements;
5
5
  (function (SatisfactionIndexElements) {
6
- SatisfactionIndexElements["ADMIN_COUNT"] = "adminCount";
7
- SatisfactionIndexElements["MEMBERS_COUNT"] = "memberCount";
8
- SatisfactionIndexElements["EVENTS_PER_WEEK"] = "eventsPerWeek";
9
- SatisfactionIndexElements["EVENTS_ROLLCALLED_RATIO"] = "eventsRollcalledRatio";
10
- SatisfactionIndexElements["EVENTS_ATTENDANCE_PREVISION_RATIO"] = "eventsAttendancePrevisionRatio";
11
- SatisfactionIndexElements["EVENTS_ANSWER_RATIO"] = "eventsAnswerRatio";
12
- SatisfactionIndexElements["EVENTS_WITH_REPERTORY_RATIO"] = "eventsWithRepertoryRatio";
6
+ SatisfactionIndexElements["ROLLCALLED_EVENTS_RATIO"] = "ROLLCALLED_EVENTS_RATIO";
7
+ SatisfactionIndexElements["ADMIN_COUNT"] = "ADMIN_COUNT";
8
+ SatisfactionIndexElements["MEMBERS_COUNT"] = "MEMBERS_COUNT";
9
+ SatisfactionIndexElements["EVENTS_PER_WEEK"] = "EVENTS_PER_WEEK";
10
+ SatisfactionIndexElements["ATTENDANCE_PREVISION_RATIO"] = "ATTENDANCE_PREVISION_RATIO";
11
+ SatisfactionIndexElements["EVENTS_ANSWER_PERCENTAGE"] = "EVENTS_ANSWER_PERCENTAGE";
12
+ SatisfactionIndexElements["EVENTS_WITH_REPERTORY_PERCENTAGE"] = "EVENTS_WITH_REPERTORY_PERCENTAGE";
13
+ SatisfactionIndexElements["REPERTORY_COUNT"] = "REPERTORY_COUNT";
14
+ SatisfactionIndexElements["COMMUNICATION_COUNT"] = "COMMUNICATION_COUNT";
15
+ SatisfactionIndexElements["EVENTS_COUNT"] = "EVENTS_COUNT";
16
+ SatisfactionIndexElements["EVENTS_FUTURE_COUNT"] = "EVENTS_FUTURE_COUNT";
13
17
  })(SatisfactionIndexElements = exports.SatisfactionIndexElements || (exports.SatisfactionIndexElements = {}));
@@ -17,18 +17,22 @@ export default class User extends UserBasic<UserData> {
17
17
  get federationId(): string | null;
18
18
  get pushToken(): string | null;
19
19
  get tokens(): string[];
20
- get notificationBadge(): number;
20
+ get notifications(): number;
21
21
  get language(): import("../../lang").LanguagesTypes;
22
22
  get createdAt(): FirebaseFirestore.Timestamp;
23
23
  get intercomId(): string | null;
24
- get adminGroups(): string[];
24
+ get groupsAdmin(): string[];
25
25
  get isAdmin(): boolean;
26
26
  get birthDate(): FirebaseFirestore.Timestamp | null;
27
+ /** @deprecated */
27
28
  private get devices();
29
+ /** @deprecated */
28
30
  get devicesList(): (import("./types").DeviceInfo & {
29
31
  id: string;
30
32
  })[];
33
+ /** @deprecated */
31
34
  get hasDevices(): boolean;
35
+ /** @deprecated */
32
36
  get device(): (import("./types").DeviceInfo & {
33
37
  id: string;
34
38
  }) | null;
@@ -54,7 +54,7 @@ class User extends basic_1.default {
54
54
  get tokens() {
55
55
  return this.data.tokens || [];
56
56
  }
57
- get notificationBadge() {
57
+ get notifications() {
58
58
  return this.data.notifications || 0;
59
59
  }
60
60
  get language() {
@@ -66,25 +66,29 @@ class User extends basic_1.default {
66
66
  get intercomId() {
67
67
  return this.data.intercom_id || null;
68
68
  }
69
- get adminGroups() {
69
+ get groupsAdmin() {
70
70
  return this.data.groups_admin || [];
71
71
  }
72
72
  get isAdmin() {
73
- return this.adminGroups.length > 0;
73
+ return this.groupsAdmin.length > 0;
74
74
  }
75
75
  get birthDate() {
76
76
  return this.data.birthDate;
77
77
  }
78
+ /** @deprecated */
78
79
  get devices() {
79
80
  return this.data.devices || {};
80
81
  }
82
+ /** @deprecated */
81
83
  get devicesList() {
82
84
  const list = Object.keys(this.devices).map((id) => Object.assign(this.devices[id], { id }));
83
85
  return orderBy_1.default(list, (device) => device.last_seen_at.toDate(), ['desc']);
84
86
  }
87
+ /** @deprecated */
85
88
  get hasDevices() {
86
89
  return this.devicesList.length > 0;
87
90
  }
91
+ /** @deprecated */
88
92
  get device() {
89
93
  if (this.hasDevices) {
90
94
  return this.devicesList[0];
@@ -55,6 +55,7 @@ export interface UserData extends UserBasicData {
55
55
  federationId: string | null;
56
56
  groups_admin: string[];
57
57
  birthDate: Timestamp | null;
58
+ /** @deprecated */
58
59
  devices: Record<string, DeviceInfo> | null;
59
60
  disabledNotifications: Record<string, boolean> | null;
60
61
  appConfig: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissandoo/lib",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",