@glissandoo/lib 1.13.0 → 1.13.2
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/plans.d.ts +5 -0
- package/helpers/plans.js +24 -1
- package/models/Group/index.d.ts +1 -0
- package/models/Group/index.js +3 -0
- package/models/Group/types.d.ts +1 -0
- package/package.json +1 -1
package/helpers/plans.d.ts
CHANGED
|
@@ -6,4 +6,9 @@ export declare enum PlansGroup {
|
|
|
6
6
|
Fortissimo = "fortissimo",
|
|
7
7
|
Tutti = "tutti"
|
|
8
8
|
}
|
|
9
|
+
export declare enum PlanPeriod {
|
|
10
|
+
Yearly = "yearly",
|
|
11
|
+
Monthly = "monthly"
|
|
12
|
+
}
|
|
9
13
|
export declare const membersPerPlan: Record<PlansGroup, number>;
|
|
14
|
+
export declare const pricesPerPlan: Record<PlanPeriod, Record<PlansGroup, number>>;
|
package/helpers/plans.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.membersPerPlan = exports.PlansGroup = void 0;
|
|
3
|
+
exports.pricesPerPlan = exports.membersPerPlan = exports.PlanPeriod = exports.PlansGroup = void 0;
|
|
4
4
|
var PlansGroup;
|
|
5
5
|
(function (PlansGroup) {
|
|
6
6
|
PlansGroup["Piano"] = "piano";
|
|
@@ -10,6 +10,11 @@ var PlansGroup;
|
|
|
10
10
|
PlansGroup["Fortissimo"] = "fortissimo";
|
|
11
11
|
PlansGroup["Tutti"] = "tutti";
|
|
12
12
|
})(PlansGroup = exports.PlansGroup || (exports.PlansGroup = {}));
|
|
13
|
+
var PlanPeriod;
|
|
14
|
+
(function (PlanPeriod) {
|
|
15
|
+
PlanPeriod["Yearly"] = "yearly";
|
|
16
|
+
PlanPeriod["Monthly"] = "monthly";
|
|
17
|
+
})(PlanPeriod = exports.PlanPeriod || (exports.PlanPeriod = {}));
|
|
13
18
|
exports.membersPerPlan = {
|
|
14
19
|
[PlansGroup.Piano]: 20,
|
|
15
20
|
[PlansGroup.MezzoPiano]: 40,
|
|
@@ -18,3 +23,21 @@ exports.membersPerPlan = {
|
|
|
18
23
|
[PlansGroup.Fortissimo]: 100,
|
|
19
24
|
[PlansGroup.Tutti]: 1000,
|
|
20
25
|
};
|
|
26
|
+
exports.pricesPerPlan = {
|
|
27
|
+
[PlanPeriod.Monthly]: {
|
|
28
|
+
[PlansGroup.Piano]: 0,
|
|
29
|
+
[PlansGroup.MezzoPiano]: 9.9,
|
|
30
|
+
[PlansGroup.MezzoForte]: 14.9,
|
|
31
|
+
[PlansGroup.Forte]: 19.9,
|
|
32
|
+
[PlansGroup.Fortissimo]: 24.9,
|
|
33
|
+
[PlansGroup.Tutti]: 29.9,
|
|
34
|
+
},
|
|
35
|
+
[PlanPeriod.Yearly]: {
|
|
36
|
+
[PlansGroup.Piano]: 0,
|
|
37
|
+
[PlansGroup.MezzoPiano]: 99,
|
|
38
|
+
[PlansGroup.MezzoForte]: 149,
|
|
39
|
+
[PlansGroup.Forte]: 199,
|
|
40
|
+
[PlansGroup.Fortissimo]: 249,
|
|
41
|
+
[PlansGroup.Tutti]: 299,
|
|
42
|
+
},
|
|
43
|
+
};
|
package/models/Group/index.d.ts
CHANGED
package/models/Group/index.js
CHANGED
|
@@ -152,5 +152,8 @@ class Group extends basic_1.default {
|
|
|
152
152
|
get stageTemplatesList() {
|
|
153
153
|
return Object.keys(this.stageTemplates).map((templateId) => Object.assign({}, this.stageTemplates[templateId], { id: templateId }));
|
|
154
154
|
}
|
|
155
|
+
get firstAnswerAt() {
|
|
156
|
+
return this.data.firstAnswerAt || null;
|
|
157
|
+
}
|
|
155
158
|
}
|
|
156
159
|
exports.default = Group;
|
package/models/Group/types.d.ts
CHANGED
|
@@ -89,6 +89,7 @@ export interface GroupData extends GroupBasicData {
|
|
|
89
89
|
country: string;
|
|
90
90
|
stageTemplates: Record<string, StageTemplate>;
|
|
91
91
|
metadata: Record<string, string>;
|
|
92
|
+
firstAnswerAt: Timestamp | null;
|
|
92
93
|
readonly owner: DocumentReference;
|
|
93
94
|
readonly createdAt: Timestamp;
|
|
94
95
|
}
|