@glissandoo/lib 1.0.2 → 1.0.3

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.
@@ -0,0 +1,11 @@
1
+ import * as firestore from '@google-cloud/firestore';
2
+ import Model from '../../../Model';
3
+ import { GroupAnalyticsData } from './types';
4
+ export default class GroupAnalytics extends Model<GroupAnalyticsData> {
5
+ constructor(doc: firestore.DocumentSnapshot);
6
+ get groupId(): string;
7
+ get satisfactionIndex(): number;
8
+ get satisfactionIndexElements(): Record<import("./types").SatisfactionIndexElements, import("./types").SITypes>;
9
+ get createdAt(): firestore.Timestamp;
10
+ get weekDate(): Date;
11
+ }
@@ -0,0 +1,29 @@
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 date_fns_1 = require("date-fns");
7
+ const lodash_1 = require("lodash");
8
+ const Model_1 = __importDefault(require("../../../Model"));
9
+ class GroupAnalytics extends Model_1.default {
10
+ constructor(doc) {
11
+ super(doc);
12
+ }
13
+ get groupId() {
14
+ return lodash_1.get(this.ref, 'parent.parent.id');
15
+ }
16
+ get satisfactionIndex() {
17
+ return this.data.satisfactionIndex || 0;
18
+ }
19
+ get satisfactionIndexElements() {
20
+ return this.data.satisfactionIndexElements || {};
21
+ }
22
+ get createdAt() {
23
+ return this.data.createdAt;
24
+ }
25
+ get weekDate() {
26
+ return date_fns_1.parse(this.id, 'yyyyMMdd', new Date());
27
+ }
28
+ }
29
+ exports.default = GroupAnalytics;
@@ -0,0 +1,20 @@
1
+ import { Timestamp } from '@google-cloud/firestore';
2
+ export declare enum SatisfactionIndexElements {
3
+ ADMIN_COUNT = "adminCount",
4
+ MEMBERS_COUNT = "memberCount",
5
+ EVENTS_PER_WEEK = "eventsPerWeek",
6
+ EVENTS_ROLLCALLED_RATIO = "eventsRollcalledRatio",
7
+ EVENTS_ATTENDANCE_PREVISION_RATIO = "eventsAttendancePrevisionRatio",
8
+ EVENTS_ANSWER_RATIO = "eventsAnswerRatio",
9
+ EVENTS_WITH_REPERTORY_RATIO = "eventsWithRepertoryRatio"
10
+ }
11
+ export interface SITypes {
12
+ value: number;
13
+ threshold: number;
14
+ result: number;
15
+ }
16
+ export interface GroupAnalyticsData {
17
+ satisfactionIndexElements: Record<SatisfactionIndexElements, SITypes>;
18
+ satisfactionIndex: number;
19
+ createdAt: Timestamp;
20
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SatisfactionIndexElements = void 0;
4
+ var SatisfactionIndexElements;
5
+ (function (SatisfactionIndexElements) {
6
+ SatisfactionIndexElements["ADMIN_COUNT"] = "adminCount";
7
+ SatisfactionIndexElements["MEMBERS_COUNT"] = "memberCount";
8
+ SatisfactionIndexElements["EVENTS_PER_WEEK"] = "eventsPerWeek";
9
+ SatisfactionIndexElements["EVENTS_ROLLCALLED_RATIO"] = "eventsRollcalledRatio";
10
+ SatisfactionIndexElements["EVENTS_ATTENDANCE_PREVISION_RATIO"] = "eventsAttendancePrevisionRatio";
11
+ SatisfactionIndexElements["EVENTS_ANSWER_RATIO"] = "eventsAnswerRatio";
12
+ SatisfactionIndexElements["EVENTS_WITH_REPERTORY_RATIO"] = "eventsWithRepertoryRatio";
13
+ })(SatisfactionIndexElements = exports.SatisfactionIndexElements || (exports.SatisfactionIndexElements = {}));
@@ -0,0 +1,12 @@
1
+ import * as firestore from '@google-cloud/firestore';
2
+ import Model from '../../Model';
3
+ import { GroupAnalyticsData } from './types';
4
+ export default class GroupAnalytics extends Model<GroupAnalyticsData> {
5
+ constructor(doc: firestore.DocumentSnapshot);
6
+ get groupId(): string;
7
+ get satisfactionIndex(): number;
8
+ get satisfactionIndexElements(): Record<import("./types").SatisfactionIndexElements, import("./types").SITypes>;
9
+ get createdAt(): firestore.Timestamp;
10
+ get weekDate(): Date;
11
+ get status(): string;
12
+ }
@@ -0,0 +1,32 @@
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 date_fns_1 = require("date-fns");
7
+ const lodash_1 = require("lodash");
8
+ const Model_1 = __importDefault(require("../../Model"));
9
+ class GroupAnalytics extends Model_1.default {
10
+ constructor(doc) {
11
+ super(doc);
12
+ }
13
+ get groupId() {
14
+ return lodash_1.get(this.ref, 'parent.parent.id');
15
+ }
16
+ get satisfactionIndex() {
17
+ return this.data.satisfactionIndex || 0;
18
+ }
19
+ get satisfactionIndexElements() {
20
+ return this.data.satisfactionIndexElements || {};
21
+ }
22
+ get createdAt() {
23
+ return this.data.createdAt;
24
+ }
25
+ get weekDate() {
26
+ return date_fns_1.parse(this.id, 'yyyyMMdd', new Date());
27
+ }
28
+ get status() {
29
+ return this.data.status;
30
+ }
31
+ }
32
+ exports.default = GroupAnalytics;
@@ -0,0 +1,25 @@
1
+ import { Timestamp } from '@google-cloud/firestore';
2
+ export declare enum SatisfactionIndexElements {
3
+ ROLLCALLED_EVENTS_RATIO = "ROLLCALLED_EVENTS_RATIO",
4
+ ADMIN_COUNT = "ADMIN_COUNT",
5
+ MEMBERS_COUNT = "MEMBERS_COUNT",
6
+ EVENTS_PER_WEEK = "EVENTS_PER_WEEK",
7
+ ATTENDANCE_PREVISION_RATIO = "ATTENDANCE_PREVISION_RATIO",
8
+ EVENTS_ANSWER_PERCENTAGE = "EVENTS_ANSWER_PERCENTAGE",
9
+ EVENTS_WITH_REPERTORY_PERCENTAGE = "EVENTS_WITH_REPERTORY_PERCENTAGE",
10
+ REPERTORY_COUNT = "REPERTORY_COUNT",
11
+ COMMUNICATION_COUNT = "COMMUNICATION_COUNT",
12
+ EVENTS_COUNT = "EVENTS_COUNT",
13
+ EVENTS_FUTURE_COUNT = "EVENTS_FUTURE_COUNT"
14
+ }
15
+ export interface SITypes {
16
+ value: number;
17
+ threshold: number;
18
+ result: number;
19
+ }
20
+ export interface GroupAnalyticsData {
21
+ satisfactionIndexElements: Record<SatisfactionIndexElements, SITypes>;
22
+ satisfactionIndex: number;
23
+ createdAt: Timestamp;
24
+ status: string;
25
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SatisfactionIndexElements = void 0;
4
+ var SatisfactionIndexElements;
5
+ (function (SatisfactionIndexElements) {
6
+ SatisfactionIndexElements["ROLLCALLED_EVENTS_RATIO"] = "ROLLCALLED_EVENTS_RATIO";
7
+ SatisfactionIndexElements["ADMIN_COUNT"] = "ADMIN_COUNT";
8
+ SatisfactionIndexElements["MEMBERS_COUNT"] = "MEMBERS_COUNT";
9
+ SatisfactionIndexElements["EVENTS_PER_WEEK"] = "EVENTS_PER_WEEK";
10
+ SatisfactionIndexElements["ATTENDANCE_PREVISION_RATIO"] = "ATTENDANCE_PREVISION_RATIO";
11
+ SatisfactionIndexElements["EVENTS_ANSWER_PERCENTAGE"] = "EVENTS_ANSWER_PERCENTAGE";
12
+ SatisfactionIndexElements["EVENTS_WITH_REPERTORY_PERCENTAGE"] = "EVENTS_WITH_REPERTORY_PERCENTAGE";
13
+ SatisfactionIndexElements["REPERTORY_COUNT"] = "REPERTORY_COUNT";
14
+ SatisfactionIndexElements["COMMUNICATION_COUNT"] = "COMMUNICATION_COUNT";
15
+ SatisfactionIndexElements["EVENTS_COUNT"] = "EVENTS_COUNT";
16
+ SatisfactionIndexElements["EVENTS_FUTURE_COUNT"] = "EVENTS_FUTURE_COUNT";
17
+ })(SatisfactionIndexElements = exports.SatisfactionIndexElements || (exports.SatisfactionIndexElements = {}));
@@ -0,0 +1,12 @@
1
+ import * as firestore from '@google-cloud/firestore';
2
+ import Model from '../../Model';
3
+ import { GroupAnalyticsData } from './types';
4
+ export default class GroupAnalytics extends Model<GroupAnalyticsData> {
5
+ constructor(doc: firestore.DocumentSnapshot);
6
+ get groupId(): string;
7
+ get satisfactionIndex(): number;
8
+ get satisfactionIndexElements(): Record<import("./types").SatisfactionIndexElements, import("./types").SITypes>;
9
+ get createdAt(): firestore.Timestamp;
10
+ get weekDate(): Date;
11
+ get status(): string;
12
+ }
@@ -0,0 +1,32 @@
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 date_fns_1 = require("date-fns");
7
+ const lodash_1 = require("lodash");
8
+ const Model_1 = __importDefault(require("../../Model"));
9
+ class GroupAnalytics extends Model_1.default {
10
+ constructor(doc) {
11
+ super(doc);
12
+ }
13
+ get groupId() {
14
+ return lodash_1.get(this.ref, 'parent.parent.id');
15
+ }
16
+ get satisfactionIndex() {
17
+ return this.data.satisfactionIndex || 0;
18
+ }
19
+ get satisfactionIndexElements() {
20
+ return this.data.satisfactionIndexElements || {};
21
+ }
22
+ get createdAt() {
23
+ return this.data.createdAt;
24
+ }
25
+ get weekDate() {
26
+ return date_fns_1.parse(this.id, 'yyyyMMdd', new Date());
27
+ }
28
+ get status() {
29
+ return this.data.status;
30
+ }
31
+ }
32
+ exports.default = GroupAnalytics;
@@ -0,0 +1,25 @@
1
+ import { Timestamp } from '@google-cloud/firestore';
2
+ export declare enum SatisfactionIndexElements {
3
+ ROLLCALLED_EVENTS_RATIO = "ROLLCALLED_EVENTS_RATIO",
4
+ ADMIN_COUNT = "ADMIN_COUNT",
5
+ MEMBERS_COUNT = "MEMBERS_COUNT",
6
+ EVENTS_PER_WEEK = "EVENTS_PER_WEEK",
7
+ ATTENDANCE_PREVISION_RATIO = "ATTENDANCE_PREVISION_RATIO",
8
+ EVENTS_ANSWER_PERCENTAGE = "EVENTS_ANSWER_PERCENTAGE",
9
+ EVENTS_WITH_REPERTORY_PERCENTAGE = "EVENTS_WITH_REPERTORY_PERCENTAGE",
10
+ REPERTORY_COUNT = "REPERTORY_COUNT",
11
+ COMMUNICATION_COUNT = "COMMUNICATION_COUNT",
12
+ EVENTS_COUNT = "EVENTS_COUNT",
13
+ EVENTS_FUTURE_COUNT = "EVENTS_FUTURE_COUNT"
14
+ }
15
+ export interface SITypes {
16
+ value: number;
17
+ threshold: number;
18
+ result: number;
19
+ }
20
+ export interface GroupAnalyticsData {
21
+ satisfactionIndexElements: Record<SatisfactionIndexElements, SITypes>;
22
+ satisfactionIndex: number;
23
+ createdAt: Timestamp;
24
+ status: string;
25
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SatisfactionIndexElements = void 0;
4
+ var SatisfactionIndexElements;
5
+ (function (SatisfactionIndexElements) {
6
+ SatisfactionIndexElements["ROLLCALLED_EVENTS_RATIO"] = "ROLLCALLED_EVENTS_RATIO";
7
+ SatisfactionIndexElements["ADMIN_COUNT"] = "ADMIN_COUNT";
8
+ SatisfactionIndexElements["MEMBERS_COUNT"] = "MEMBERS_COUNT";
9
+ SatisfactionIndexElements["EVENTS_PER_WEEK"] = "EVENTS_PER_WEEK";
10
+ SatisfactionIndexElements["ATTENDANCE_PREVISION_RATIO"] = "ATTENDANCE_PREVISION_RATIO";
11
+ SatisfactionIndexElements["EVENTS_ANSWER_PERCENTAGE"] = "EVENTS_ANSWER_PERCENTAGE";
12
+ SatisfactionIndexElements["EVENTS_WITH_REPERTORY_PERCENTAGE"] = "EVENTS_WITH_REPERTORY_PERCENTAGE";
13
+ SatisfactionIndexElements["REPERTORY_COUNT"] = "REPERTORY_COUNT";
14
+ SatisfactionIndexElements["COMMUNICATION_COUNT"] = "COMMUNICATION_COUNT";
15
+ SatisfactionIndexElements["EVENTS_COUNT"] = "EVENTS_COUNT";
16
+ SatisfactionIndexElements["EVENTS_FUTURE_COUNT"] = "EVENTS_FUTURE_COUNT";
17
+ })(SatisfactionIndexElements = exports.SatisfactionIndexElements || (exports.SatisfactionIndexElements = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissandoo/lib",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",