@glissandoo/lib 1.4.4 → 1.4.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.
@@ -8,6 +8,7 @@ export declare namespace GroupFbFunctionsTypes {
8
8
  country: string;
9
9
  musicStyle: string;
10
10
  photoURL: string;
11
+ metadata?: Record<string, string>;
11
12
  }
12
13
  interface PublishResult {
13
14
  id: string;
package/helpers/plans.js CHANGED
@@ -9,7 +9,7 @@ var PlansGroup;
9
9
  PlansGroup["Tutti"] = "tutti";
10
10
  })(PlansGroup = exports.PlansGroup || (exports.PlansGroup = {}));
11
11
  exports.membersPerPlan = {
12
- [PlansGroup.Piano]: 10,
12
+ [PlansGroup.Piano]: 20,
13
13
  [PlansGroup.Mezzo]: 30,
14
14
  [PlansGroup.Forte]: 60,
15
15
  [PlansGroup.Tutti]: 1000,
@@ -44,6 +44,7 @@ export default class Group extends GroupBasic<GroupData> {
44
44
  current: number;
45
45
  last: number;
46
46
  };
47
+ get metadata(): Record<string, string>;
47
48
  getPlayer: (userId: string) => import("../Player/types").PlayerBasicData | null;
48
49
  isAdmin: (userId: string) => boolean;
49
50
  isPlayer: (userId: string) => boolean;
@@ -134,6 +134,9 @@ class Group extends basic_1.default {
134
134
  get satisfactionIndex() {
135
135
  return this.data.satisfactionIndex || { current: 0, last: 0 };
136
136
  }
137
+ get metadata() {
138
+ return this.data.metadata || {};
139
+ }
137
140
  get isExpiredTrial() {
138
141
  const isOutDateTrial = date_fns_1.isBefore(this.createdAt.toDate(), date_fns_1.subMonths(new Date(), 1));
139
142
  const members = this.activePlayers.length;
@@ -69,6 +69,7 @@ export interface GroupData extends GroupBasicData {
69
69
  eventCount: Record<EventType, number>;
70
70
  communicationCount: number;
71
71
  country: string;
72
+ metadata: Record<string, string>;
72
73
  readonly owner: DocumentReference;
73
74
  readonly createdAt: Timestamp;
74
75
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissandoo/lib",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",