@glissandoo/lib 1.55.3 → 1.56.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.
@@ -2,7 +2,7 @@ import { PlansGroup } from '../../helpers/plans';
2
2
  import { LanguagesTypes } from '../../lang';
3
3
  import { DocumentReference, DocumentSnapshot } from '../../types/firestore';
4
4
  import GroupBasic from './basic';
5
- import { GroupData, GroupStatus, SocialNetwork } from './types';
5
+ import { GroupConfigShowAttendanceToMembers, GroupData, GroupStatus, SocialNetwork } from './types';
6
6
  export default class Group extends GroupBasic<GroupData> {
7
7
  constructor(doc: DocumentSnapshot, lang?: LanguagesTypes);
8
8
  get owner(): DocumentReference;
@@ -41,7 +41,10 @@ export default class Group extends GroupBasic<GroupData> {
41
41
  get customerId(): string | null;
42
42
  get socialNetworks(): Record<SocialNetwork, string | null>;
43
43
  getSocialNetworkUrl(id: SocialNetwork): string | null;
44
- get config(): Record<import("./types").GroupConfig, boolean>;
44
+ get config(): {
45
+ includesMembersToEventsWhenJoined: boolean;
46
+ showAttendanceToMembers: GroupConfigShowAttendanceToMembers;
47
+ };
45
48
  get status(): GroupStatus;
46
49
  get planId(): PlansGroup;
47
50
  get templates(): Record<string, import("./types").GroupTemplateData>;
@@ -132,7 +132,14 @@ class Group extends basic_1.default {
132
132
  return null;
133
133
  }
134
134
  get config() {
135
- return this.data.config || {};
135
+ return {
136
+ [types_1.GroupConfigKey.IncludesMembersToEventsWhenJoined]: types_1.GroupConfigKey.IncludesMembersToEventsWhenJoined in this.data.config
137
+ ? this.data.config[types_1.GroupConfigKey.IncludesMembersToEventsWhenJoined]
138
+ : true,
139
+ [types_1.GroupConfigKey.ShowAttendanceToMembers]: types_1.GroupConfigKey.ShowAttendanceToMembers in this.data.config
140
+ ? this.data.config[types_1.GroupConfigKey.ShowAttendanceToMembers]
141
+ : types_1.GroupConfigShowAttendanceToMembers.None,
142
+ };
136
143
  }
137
144
  get status() {
138
145
  return this.data.status;
@@ -15,8 +15,15 @@ export declare enum GroupCreatedOn {
15
15
  App = "app",
16
16
  Dashboard = "dashboard"
17
17
  }
18
- export declare enum GroupConfig {
19
- IncludesMembersToEventsWhenJoined = "includesMembersToEventsWhenJoined"
18
+ export declare enum GroupConfigKey {
19
+ IncludesMembersToEventsWhenJoined = "includesMembersToEventsWhenJoined",
20
+ ShowAttendanceToMembers = "showAttendanceToMembers"
21
+ }
22
+ export declare enum GroupConfigShowAttendanceToMembers {
23
+ None = "none",
24
+ OnlyConfirmed = "onlyConfirmed",
25
+ OnlyToSection = "onlyToSection",
26
+ All = "all"
20
27
  }
21
28
  export declare enum GroupStatus {
22
29
  Premium = "premium",
@@ -84,6 +91,10 @@ export declare enum GroupRepertoireTagDefault {
84
91
  Fourth = "repertoireTags.4",
85
92
  Principal = "repertoireTags.principal"
86
93
  }
94
+ export interface GroupConfig {
95
+ [GroupConfigKey.IncludesMembersToEventsWhenJoined]: boolean;
96
+ [GroupConfigKey.ShowAttendanceToMembers]: GroupConfigShowAttendanceToMembers;
97
+ }
87
98
  export interface GroupRepertoireTag {
88
99
  title: string;
89
100
  default: boolean;
@@ -120,7 +131,7 @@ export interface GroupData extends GroupBasicData {
120
131
  description: string | null;
121
132
  deletedAt: Timestamp | null;
122
133
  socialNetworks?: Record<SocialNetwork, string | null>;
123
- config: Record<GroupConfig, boolean>;
134
+ config: GroupConfig;
124
135
  satisfactionIndex: {
125
136
  current: number;
126
137
  last: number;
@@ -1,16 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GroupRepertoireTagDefault = exports.GroupRepertoireTagReserved = exports.SocialNetwork = exports.GroupStatus = exports.GroupConfig = exports.GroupCreatedOn = void 0;
3
+ exports.GroupRepertoireTagDefault = exports.GroupRepertoireTagReserved = exports.SocialNetwork = exports.GroupStatus = exports.GroupConfigShowAttendanceToMembers = exports.GroupConfigKey = exports.GroupCreatedOn = void 0;
4
4
  var GroupCreatedOn;
5
5
  (function (GroupCreatedOn) {
6
6
  GroupCreatedOn["Web"] = "web";
7
7
  GroupCreatedOn["App"] = "app";
8
8
  GroupCreatedOn["Dashboard"] = "dashboard";
9
9
  })(GroupCreatedOn = exports.GroupCreatedOn || (exports.GroupCreatedOn = {}));
10
- var GroupConfig;
11
- (function (GroupConfig) {
12
- GroupConfig["IncludesMembersToEventsWhenJoined"] = "includesMembersToEventsWhenJoined";
13
- })(GroupConfig = exports.GroupConfig || (exports.GroupConfig = {}));
10
+ var GroupConfigKey;
11
+ (function (GroupConfigKey) {
12
+ GroupConfigKey["IncludesMembersToEventsWhenJoined"] = "includesMembersToEventsWhenJoined";
13
+ GroupConfigKey["ShowAttendanceToMembers"] = "showAttendanceToMembers";
14
+ })(GroupConfigKey = exports.GroupConfigKey || (exports.GroupConfigKey = {}));
15
+ var GroupConfigShowAttendanceToMembers;
16
+ (function (GroupConfigShowAttendanceToMembers) {
17
+ GroupConfigShowAttendanceToMembers["None"] = "none";
18
+ GroupConfigShowAttendanceToMembers["OnlyConfirmed"] = "onlyConfirmed";
19
+ GroupConfigShowAttendanceToMembers["OnlyToSection"] = "onlyToSection";
20
+ GroupConfigShowAttendanceToMembers["All"] = "all";
21
+ })(GroupConfigShowAttendanceToMembers = exports.GroupConfigShowAttendanceToMembers || (exports.GroupConfigShowAttendanceToMembers = {}));
14
22
  var GroupStatus;
15
23
  (function (GroupStatus) {
16
24
  GroupStatus["Premium"] = "premium";
@@ -34,8 +34,6 @@ export interface UserDeviceInfo {
34
34
  apiLevel: string;
35
35
  version: string;
36
36
  model: string;
37
- manufacturer: string;
38
- deviceName: string;
39
37
  systemName: string;
40
38
  token: string;
41
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissandoo/lib",
3
- "version": "1.55.3",
3
+ "version": "1.56.0",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",