@glissandoo/lib 1.45.0 → 1.46.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/helpers/collections.d.ts +1 -0
- package/helpers/collections.js +1 -0
- package/helpers/types.d.ts +0 -11
- package/models/Evento/types.d.ts +1 -1
- package/models/Group/StageTemplate/index.d.ts +13 -0
- package/models/Group/StageTemplate/index.js +33 -0
- package/models/Group/StageTemplate/types.d.ts +18 -0
- package/models/Group/StageTemplate/types.js +2 -0
- package/models/Group/index.d.ts +0 -4
- package/models/Group/index.js +0 -6
- package/models/Group/types.d.ts +0 -2
- package/package.json +1 -1
package/helpers/collections.d.ts
CHANGED
package/helpers/collections.js
CHANGED
|
@@ -22,6 +22,7 @@ var CollectionNames;
|
|
|
22
22
|
CollectionNames["GroupAnalytics"] = "analytics";
|
|
23
23
|
CollectionNames["GroupPlayerEvents"] = "events";
|
|
24
24
|
CollectionNames["GroupRepertory"] = "repertory";
|
|
25
|
+
CollectionNames["GroupStageTemplates"] = "stageTemplates";
|
|
25
26
|
CollectionNames["Metrics"] = "metrics";
|
|
26
27
|
CollectionNames["Partner"] = "partner";
|
|
27
28
|
CollectionNames["Partnership"] = "partnership";
|
package/helpers/types.d.ts
CHANGED
|
@@ -9,14 +9,3 @@ export interface AdminItem {
|
|
|
9
9
|
photoURL: string | null;
|
|
10
10
|
status: AdminItemStatus;
|
|
11
11
|
}
|
|
12
|
-
export interface BoardSettings {
|
|
13
|
-
numberStraight: number;
|
|
14
|
-
podium: boolean;
|
|
15
|
-
rows: number[];
|
|
16
|
-
}
|
|
17
|
-
export type BoardCoordinates = [number, number] | null;
|
|
18
|
-
export interface StageTemplate {
|
|
19
|
-
title: string;
|
|
20
|
-
boardMap: Record<string, BoardCoordinates>;
|
|
21
|
-
boardSettings: BoardSettings;
|
|
22
|
-
}
|
package/models/Evento/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Descendant } from '../../helpers/slate';
|
|
2
|
-
import { StageTemplate } from '../../helpers/types';
|
|
3
2
|
import { DocumentReference, GeoPoint, Timestamp } from '../../types/firestore';
|
|
3
|
+
import { StageTemplate } from '../Group/StageTemplate/types';
|
|
4
4
|
import { GroupBasicData } from '../Group/types';
|
|
5
5
|
import { PlayerBasicData } from '../Player/types';
|
|
6
6
|
import { ThemeBasicData } from '../Repertory/types';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DocumentSnapshot } from '../../../types/firestore';
|
|
2
|
+
import Model from '../../Model';
|
|
3
|
+
import { StageTemplateData } from './types';
|
|
4
|
+
export default class GroupStageTemplate extends Model<StageTemplateData> {
|
|
5
|
+
constructor(doc: DocumentSnapshot);
|
|
6
|
+
get title(): string;
|
|
7
|
+
get boardMap(): Record<string, import("./types").BoardCoordinates>;
|
|
8
|
+
get boardSettings(): import("./types").BoardSettings;
|
|
9
|
+
get updatedBy(): string;
|
|
10
|
+
get updatedAt(): import("../../../types/firestore").Timestamp;
|
|
11
|
+
get createdBy(): string;
|
|
12
|
+
get createdAt(): import("../../../types/firestore").Timestamp;
|
|
13
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const Model_1 = __importDefault(require("../../Model"));
|
|
7
|
+
class GroupStageTemplate extends Model_1.default {
|
|
8
|
+
constructor(doc) {
|
|
9
|
+
super(doc);
|
|
10
|
+
}
|
|
11
|
+
get title() {
|
|
12
|
+
return this.data.title;
|
|
13
|
+
}
|
|
14
|
+
get boardMap() {
|
|
15
|
+
return this.data.boardMap;
|
|
16
|
+
}
|
|
17
|
+
get boardSettings() {
|
|
18
|
+
return this.data.boardSettings;
|
|
19
|
+
}
|
|
20
|
+
get updatedBy() {
|
|
21
|
+
return this.data.updatedBy;
|
|
22
|
+
}
|
|
23
|
+
get updatedAt() {
|
|
24
|
+
return this.data.updatedAt;
|
|
25
|
+
}
|
|
26
|
+
get createdBy() {
|
|
27
|
+
return this.data.createdBy;
|
|
28
|
+
}
|
|
29
|
+
get createdAt() {
|
|
30
|
+
return this.data.createdAt;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.default = GroupStageTemplate;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Timestamp } from '../../../types/firestore';
|
|
2
|
+
export interface BoardSettings {
|
|
3
|
+
numberStraight: number;
|
|
4
|
+
podium: boolean;
|
|
5
|
+
rows: number[];
|
|
6
|
+
}
|
|
7
|
+
export type BoardCoordinates = [number, number] | null;
|
|
8
|
+
export interface StageTemplate {
|
|
9
|
+
title: string;
|
|
10
|
+
boardMap: Record<string, BoardCoordinates>;
|
|
11
|
+
boardSettings: BoardSettings;
|
|
12
|
+
}
|
|
13
|
+
export interface StageTemplateData extends StageTemplate {
|
|
14
|
+
updatedBy: string;
|
|
15
|
+
updatedAt: Timestamp;
|
|
16
|
+
readonly createdBy: string;
|
|
17
|
+
readonly createdAt: Timestamp;
|
|
18
|
+
}
|
package/models/Group/index.d.ts
CHANGED
|
@@ -57,10 +57,6 @@ export default class Group extends GroupBasic<GroupData> {
|
|
|
57
57
|
isAdmin: (userId: string) => boolean;
|
|
58
58
|
isPlayer: (userId: string) => boolean;
|
|
59
59
|
get isExpiredTrial(): boolean;
|
|
60
|
-
get stageTemplates(): Record<string, import("../../helpers/types").StageTemplate>;
|
|
61
|
-
get stageTemplatesList(): (import("../../helpers/types").StageTemplate & {
|
|
62
|
-
id: string;
|
|
63
|
-
})[];
|
|
64
60
|
get firstAnswerAt(): import("../../types/firestore").Timestamp | null;
|
|
65
61
|
get repertoireTags(): Record<string, import("./types").GroupRepertoireTag>;
|
|
66
62
|
get repertoireTagsList(): (import("./types").GroupRepertoireTag & {
|
package/models/Group/index.js
CHANGED
|
@@ -158,12 +158,6 @@ class Group extends basic_1.default {
|
|
|
158
158
|
const isAboveMembersLimitPlanFree = members > plans_1.membersPerPlan[plans_1.PlansGroup.Piano];
|
|
159
159
|
return this.status !== types_1.GroupStatus.Premium && isOutDateTrial && isAboveMembersLimitPlanFree;
|
|
160
160
|
}
|
|
161
|
-
get stageTemplates() {
|
|
162
|
-
return this.data.stageTemplates || {};
|
|
163
|
-
}
|
|
164
|
-
get stageTemplatesList() {
|
|
165
|
-
return (0, objects_1.mapToArray)(this.stageTemplates);
|
|
166
|
-
}
|
|
167
161
|
get firstAnswerAt() {
|
|
168
162
|
return this.data.firstAnswerAt || null;
|
|
169
163
|
}
|
package/models/Group/types.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { InstrumentId } from '../../helpers/instruments';
|
|
2
2
|
import { MusicStyleType } from '../../helpers/musicStyles';
|
|
3
3
|
import { PlansGroup } from '../../helpers/plans';
|
|
4
|
-
import { StageTemplate } from '../../helpers/types';
|
|
5
4
|
import { DocumentReference, GeoPoint, Timestamp } from '../../types/firestore';
|
|
6
5
|
import { EventType } from '../Evento/types';
|
|
7
6
|
import { PlayerBasicData } from '../Player/types';
|
|
@@ -125,7 +124,6 @@ export interface GroupData extends GroupBasicData {
|
|
|
125
124
|
eventCount: Record<EventType, number>;
|
|
126
125
|
communicationCount: number;
|
|
127
126
|
country: string;
|
|
128
|
-
stageTemplates: Record<string, StageTemplate>;
|
|
129
127
|
instruments: Partial<Record<InstrumentId, GroupInstrument>>;
|
|
130
128
|
metadata: Record<string, string>;
|
|
131
129
|
firstAnswerAt: Timestamp | null;
|