@glissandoo/lib 1.61.1 → 1.62.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.
- package/functions/event.d.ts +1 -0
- package/models/Evento/index.d.ts +1 -0
- package/models/Evento/index.js +3 -0
- package/models/Evento/types.d.ts +1 -0
- package/models/Group/index.d.ts +5 -0
- package/models/Group/index.js +14 -0
- package/models/Group/types.d.ts +14 -1
- package/models/Group/types.js +8 -1
- package/models/User/Notification/index.d.ts +1 -1
- package/models/User/Notification/index.js +2 -1
- package/package.json +1 -1
package/functions/event.d.ts
CHANGED
package/models/Evento/index.d.ts
CHANGED
package/models/Evento/index.js
CHANGED
|
@@ -195,5 +195,8 @@ class Evento extends promoter_1.default {
|
|
|
195
195
|
get isSelectionModeOpen() {
|
|
196
196
|
return (0, lodash_1.isNull)(this.selectionModeClosedAt) && this.selectionMode === types_1.EventSelectionMode.Open;
|
|
197
197
|
}
|
|
198
|
+
get sites() {
|
|
199
|
+
return this.data.sites || false;
|
|
200
|
+
}
|
|
198
201
|
}
|
|
199
202
|
exports.default = Evento;
|
package/models/Evento/types.d.ts
CHANGED
|
@@ -119,6 +119,7 @@ export interface EventData extends EventPromoterData {
|
|
|
119
119
|
customAt: Timestamp | null;
|
|
120
120
|
};
|
|
121
121
|
selectionModeClosedAt: Timestamp | null;
|
|
122
|
+
sites: boolean;
|
|
122
123
|
readonly owner: DocumentReference;
|
|
123
124
|
readonly createdAt: Timestamp;
|
|
124
125
|
readonly createdOn: EventCreatedOn;
|
package/models/Group/index.d.ts
CHANGED
|
@@ -46,6 +46,11 @@ export default class Group extends GroupBasic<GroupData> {
|
|
|
46
46
|
includesMembersToEventsWhenJoined: boolean;
|
|
47
47
|
showAttendanceToMembers: GroupConfigShowAttendanceToMembers;
|
|
48
48
|
};
|
|
49
|
+
get configSites(): {
|
|
50
|
+
active: boolean;
|
|
51
|
+
showEvents: boolean;
|
|
52
|
+
showMembers: boolean;
|
|
53
|
+
};
|
|
49
54
|
get status(): GroupStatus;
|
|
50
55
|
get planId(): PlansGroup;
|
|
51
56
|
get templates(): Record<string, import("./types").GroupTemplateData>;
|
package/models/Group/index.js
CHANGED
|
@@ -123,6 +123,7 @@ class Group extends basic_1.default {
|
|
|
123
123
|
[types_1.SocialNetwork.Twitter]: null,
|
|
124
124
|
[types_1.SocialNetwork.Instagram]: null,
|
|
125
125
|
[types_1.SocialNetwork.YouTube]: null,
|
|
126
|
+
[types_1.SocialNetwork.Web]: null,
|
|
126
127
|
};
|
|
127
128
|
}
|
|
128
129
|
getSocialNetworkUrl(id) {
|
|
@@ -141,6 +142,19 @@ class Group extends basic_1.default {
|
|
|
141
142
|
: types_1.GroupConfigShowAttendanceToMembers.None,
|
|
142
143
|
};
|
|
143
144
|
}
|
|
145
|
+
get configSites() {
|
|
146
|
+
return {
|
|
147
|
+
[types_1.GroupConfigSitesKey.Active]: types_1.GroupConfigSitesKey.Active in this.data.config
|
|
148
|
+
? this.data.configSites[types_1.GroupConfigSitesKey.Active]
|
|
149
|
+
: false,
|
|
150
|
+
[types_1.GroupConfigSitesKey.ShowEvents]: types_1.GroupConfigSitesKey.ShowEvents in this.data.config
|
|
151
|
+
? this.data.configSites[types_1.GroupConfigSitesKey.ShowEvents]
|
|
152
|
+
: true,
|
|
153
|
+
[types_1.GroupConfigSitesKey.ShowMembers]: types_1.GroupConfigSitesKey.ShowMembers in this.data.config
|
|
154
|
+
? this.data.configSites[types_1.GroupConfigSitesKey.ShowMembers]
|
|
155
|
+
: false,
|
|
156
|
+
};
|
|
157
|
+
}
|
|
144
158
|
get status() {
|
|
145
159
|
return this.data.status;
|
|
146
160
|
}
|
package/models/Group/types.d.ts
CHANGED
|
@@ -19,6 +19,11 @@ export declare enum GroupConfigKey {
|
|
|
19
19
|
IncludesMembersToEventsWhenJoined = "includesMembersToEventsWhenJoined",
|
|
20
20
|
ShowAttendanceToMembers = "showAttendanceToMembers"
|
|
21
21
|
}
|
|
22
|
+
export declare enum GroupConfigSitesKey {
|
|
23
|
+
Active = "active",
|
|
24
|
+
ShowMembers = "showMembers",
|
|
25
|
+
ShowEvents = "showEvents"
|
|
26
|
+
}
|
|
22
27
|
export declare enum GroupConfigShowAttendanceToMembers {
|
|
23
28
|
None = "none",
|
|
24
29
|
OnlyConfirmed = "onlyConfirmed",
|
|
@@ -35,7 +40,8 @@ export declare enum SocialNetwork {
|
|
|
35
40
|
Facebook = "facebook",
|
|
36
41
|
Twitter = "twitter",
|
|
37
42
|
Instagram = "instagram",
|
|
38
|
-
YouTube = "youtube"
|
|
43
|
+
YouTube = "youtube",
|
|
44
|
+
Web = "web"
|
|
39
45
|
}
|
|
40
46
|
export interface GroupAddressData {
|
|
41
47
|
address: string;
|
|
@@ -69,6 +75,7 @@ export interface GroupAlgoliaData extends Omit<GroupBasicData, 'location'> {
|
|
|
69
75
|
siChange: 'up' | 'down' | 'equal';
|
|
70
76
|
createdAt: number;
|
|
71
77
|
memberForecast: string;
|
|
78
|
+
sites: boolean;
|
|
72
79
|
}
|
|
73
80
|
export interface AGroupBasicData extends GroupBasicData {
|
|
74
81
|
id: string;
|
|
@@ -97,6 +104,11 @@ export interface GroupConfig {
|
|
|
97
104
|
[GroupConfigKey.IncludesMembersToEventsWhenJoined]: boolean;
|
|
98
105
|
[GroupConfigKey.ShowAttendanceToMembers]: GroupConfigShowAttendanceToMembers;
|
|
99
106
|
}
|
|
107
|
+
export interface GroupConfigSites {
|
|
108
|
+
[GroupConfigSitesKey.Active]: boolean;
|
|
109
|
+
[GroupConfigSitesKey.ShowMembers]: boolean;
|
|
110
|
+
[GroupConfigSitesKey.ShowEvents]: boolean;
|
|
111
|
+
}
|
|
100
112
|
export interface GroupRepertoireTag {
|
|
101
113
|
title: string;
|
|
102
114
|
default: boolean;
|
|
@@ -134,6 +146,7 @@ export interface GroupData extends GroupBasicData {
|
|
|
134
146
|
deletedAt: Timestamp | null;
|
|
135
147
|
socialNetworks?: Record<SocialNetwork, string | null>;
|
|
136
148
|
config: GroupConfig;
|
|
149
|
+
configSites: GroupConfigSites;
|
|
137
150
|
satisfactionIndex: {
|
|
138
151
|
current: number;
|
|
139
152
|
last: number;
|
package/models/Group/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GroupRepertoireTagDefault = exports.GroupRepertoireTagReserved = exports.SocialNetwork = exports.GroupStatus = exports.GroupConfigShowAttendanceToMembers = exports.GroupConfigKey = exports.GroupCreatedOn = void 0;
|
|
3
|
+
exports.GroupRepertoireTagDefault = exports.GroupRepertoireTagReserved = exports.SocialNetwork = exports.GroupStatus = exports.GroupConfigShowAttendanceToMembers = exports.GroupConfigSitesKey = exports.GroupConfigKey = exports.GroupCreatedOn = void 0;
|
|
4
4
|
var GroupCreatedOn;
|
|
5
5
|
(function (GroupCreatedOn) {
|
|
6
6
|
GroupCreatedOn["Web"] = "web";
|
|
@@ -12,6 +12,12 @@ var GroupConfigKey;
|
|
|
12
12
|
GroupConfigKey["IncludesMembersToEventsWhenJoined"] = "includesMembersToEventsWhenJoined";
|
|
13
13
|
GroupConfigKey["ShowAttendanceToMembers"] = "showAttendanceToMembers";
|
|
14
14
|
})(GroupConfigKey = exports.GroupConfigKey || (exports.GroupConfigKey = {}));
|
|
15
|
+
var GroupConfigSitesKey;
|
|
16
|
+
(function (GroupConfigSitesKey) {
|
|
17
|
+
GroupConfigSitesKey["Active"] = "active";
|
|
18
|
+
GroupConfigSitesKey["ShowMembers"] = "showMembers";
|
|
19
|
+
GroupConfigSitesKey["ShowEvents"] = "showEvents";
|
|
20
|
+
})(GroupConfigSitesKey = exports.GroupConfigSitesKey || (exports.GroupConfigSitesKey = {}));
|
|
15
21
|
var GroupConfigShowAttendanceToMembers;
|
|
16
22
|
(function (GroupConfigShowAttendanceToMembers) {
|
|
17
23
|
GroupConfigShowAttendanceToMembers["None"] = "none";
|
|
@@ -32,6 +38,7 @@ var SocialNetwork;
|
|
|
32
38
|
SocialNetwork["Twitter"] = "twitter";
|
|
33
39
|
SocialNetwork["Instagram"] = "instagram";
|
|
34
40
|
SocialNetwork["YouTube"] = "youtube";
|
|
41
|
+
SocialNetwork["Web"] = "web";
|
|
35
42
|
})(SocialNetwork = exports.SocialNetwork || (exports.SocialNetwork = {}));
|
|
36
43
|
var GroupRepertoireTagReserved;
|
|
37
44
|
(function (GroupRepertoireTagReserved) {
|
|
@@ -6,7 +6,7 @@ export default class Notification extends Model<UserNotificationData> {
|
|
|
6
6
|
constructor(doc: DocumentModel, lang?: LanguagesTypes);
|
|
7
7
|
private getTranslationByAction;
|
|
8
8
|
protected get references(): FirebaseFirestore.DocumentReference<FirebaseFirestore.DocumentData, FirebaseFirestore.DocumentData>[];
|
|
9
|
-
get userId(): string
|
|
9
|
+
get userId(): string;
|
|
10
10
|
get photoURL(): string;
|
|
11
11
|
get meta(): import("./types").MetaNotificationData;
|
|
12
12
|
get action(): import("../../Notification/types").NotificationActions;
|
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const lodash_1 = require("lodash");
|
|
7
7
|
const placeholders_1 = require("../../../helpers/notifications/placeholders");
|
|
8
|
+
const utils_1 = require("../../../helpers/utils");
|
|
8
9
|
const lang_1 = require("../../../lang");
|
|
9
10
|
const Model_1 = __importDefault(require("../../Model"));
|
|
10
11
|
class Notification extends Model_1.default {
|
|
@@ -23,7 +24,7 @@ class Notification extends Model_1.default {
|
|
|
23
24
|
return this.data.references || [];
|
|
24
25
|
}
|
|
25
26
|
get userId() {
|
|
26
|
-
return (0,
|
|
27
|
+
return (0, utils_1.at)(this.ref.path.split('/'), 1) || '';
|
|
27
28
|
}
|
|
28
29
|
get photoURL() {
|
|
29
30
|
return this.data.photoURL;
|