@glissandoo/lib 1.46.2 → 1.48.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.
@@ -7,10 +7,12 @@ export default class EventoPlayer extends PlayerBasic<EventPlayerData> {
7
7
  get joinedAt(): firestore.Timestamp;
8
8
  get eventId(): string;
9
9
  get status(): EventPlayerStatus | null;
10
+ get statusHistory(): import("./types").EventPlayerStatusHistory[];
10
11
  get isConfirmed(): boolean;
11
12
  get isDeclined(): boolean;
12
13
  get isPending(): boolean;
13
14
  get rollcall(): EventPlayerStatus | null;
15
+ get rollcallHistory(): import("./types").EventPlayerRollcallHistory[];
14
16
  get isRollCallConfirmed(): boolean;
15
17
  get isRollCallDeclined(): boolean;
16
18
  get rollCalledAt(): firestore.Timestamp | null;
@@ -20,6 +20,9 @@ class EventoPlayer extends basic_1.default {
20
20
  get status() {
21
21
  return this.data.status;
22
22
  }
23
+ get statusHistory() {
24
+ return this.data.statusHistory || [];
25
+ }
23
26
  get isConfirmed() {
24
27
  return this.status === types_1.EventPlayerStatus.Confirmed;
25
28
  }
@@ -32,6 +35,9 @@ class EventoPlayer extends basic_1.default {
32
35
  get rollcall() {
33
36
  return this.data.rollcall || null;
34
37
  }
38
+ get rollcallHistory() {
39
+ return this.data.rollcallHistory || [];
40
+ }
35
41
  get isRollCallConfirmed() {
36
42
  return this.rollcall === types_1.EventPlayerStatus.Confirmed;
37
43
  }
@@ -1,5 +1,5 @@
1
1
  import { Timestamp } from '../../../types/firestore';
2
- import { EventPlayerBasicData } from '../types';
2
+ import { EventPlayerBasicData, EventRollcallHistory } from '../../Evento/types';
3
3
  export declare enum EventPlayerStatus {
4
4
  Confirmed = "confirmed",
5
5
  Declined = "declined"
@@ -11,9 +11,20 @@ export declare enum EventPlayerReason {
11
11
  LeavingEarly = "LeavingEarly",
12
12
  Other = "Other"
13
13
  }
14
+ export interface EventPlayerStatusHistory {
15
+ status: EventPlayerStatus | null;
16
+ changedAt: Timestamp;
17
+ reason?: EventPlayerReason | null;
18
+ note?: string | null;
19
+ }
20
+ export interface EventPlayerRollcallHistory extends EventRollcallHistory {
21
+ rollcall: EventPlayerStatus | null;
22
+ }
14
23
  export interface EventPlayerData extends EventPlayerBasicData {
15
24
  joinedAt: Timestamp;
16
25
  rollCalledAt: Timestamp | null;
26
+ statusHistory: EventPlayerStatusHistory[];
27
+ rollcallHistory: EventPlayerRollcallHistory[];
17
28
  /** @deprecated use rollcall */
18
29
  rollCallStatus?: EventPlayerStatus;
19
30
  }
@@ -27,7 +27,9 @@ export default class Evento extends EventoPromoter<EventData> {
27
27
  get createdAt(): import("../../types/firestore").Timestamp;
28
28
  get createdOn(): import("./types").EventCreatedOn;
29
29
  get rollCalledAt(): import("../../types/firestore").Timestamp | null;
30
+ get rollCalledBy(): string | null;
30
31
  get rollCallReminderAt(): import("../../types/firestore").Timestamp | null;
32
+ get rollCallHistory(): import("./types").EventRollcallHistory[];
31
33
  get notifyAt(): import("../../types/firestore").Timestamp;
32
34
  get isActive(): boolean;
33
35
  get isDeleted(): boolean;
@@ -90,9 +90,15 @@ class Evento extends promoter_1.default {
90
90
  get rollCalledAt() {
91
91
  return this.data.rollCalledAt;
92
92
  }
93
+ get rollCalledBy() {
94
+ return this.data.rollCalledBy || null;
95
+ }
93
96
  get rollCallReminderAt() {
94
97
  return this.data.rollCallReminderAt;
95
98
  }
99
+ get rollCallHistory() {
100
+ return this.data.rollCallHistory || [];
101
+ }
96
102
  get notifyAt() {
97
103
  return this.data.notifyAt;
98
104
  }
@@ -40,6 +40,10 @@ export interface EventViewer {
40
40
  count: number;
41
41
  }
42
42
  export type EventStage = Pick<StageTemplate, 'boardMap' | 'boardSettings'>;
43
+ export interface EventRollcallHistory {
44
+ changedAt: Timestamp;
45
+ changedBy: string;
46
+ }
43
47
  export interface EventPlayerBasicData extends PlayerBasicData {
44
48
  note?: string | null;
45
49
  reason?: EventPlayerReason | null;
@@ -88,7 +92,9 @@ export interface EventData extends EventPromoterData {
88
92
  maxAttendance: number | null;
89
93
  deletedAt: Timestamp | null;
90
94
  rollCalledAt: Timestamp | null;
95
+ rollCalledBy: string | null;
91
96
  rollCallReminderAt: Timestamp | null;
97
+ rollCallHistory: EventRollcallHistory[];
92
98
  /** @deprecated */
93
99
  viewers: Record<string, EventViewer>;
94
100
  templateId: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissandoo/lib",
3
- "version": "1.46.2",
3
+ "version": "1.48.0",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
@@ -1,21 +0,0 @@
1
- import { PlanPeriod, PlansGroup } from '../helpers/plans';
2
- export declare namespace PartnershipGroupFbFunctionsTypes {
3
- interface AddParams {
4
- partnershipId: string;
5
- groupId: string;
6
- }
7
- type AddResult = void;
8
- interface SetPlanParams {
9
- partnershipId: string;
10
- groupId: string;
11
- planId: PlansGroup;
12
- planPeriod: PlanPeriod;
13
- planDiscount: string | null;
14
- }
15
- type SetPlanResult = void;
16
- interface RemoveParams {
17
- partnershipId: string;
18
- groupId: string;
19
- }
20
- type RemoveResult = void;
21
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,37 +0,0 @@
1
- import { EventoFbFunctionsTypes } from '../functions/event';
2
- import { NotificationActions } from '../models/Notification/types';
3
- import { UserNotificationSettings } from '../models/User/types';
4
- import { BadgesTypes } from './badges';
5
- export declare const notificationActionsBadges: Record<BadgesTypes, {
6
- firstLevel: NotificationActions;
7
- upLevel: NotificationActions;
8
- }>;
9
- export declare enum NotificationEventActions {
10
- Create = "create",
11
- Cancel = "cancel",
12
- EditAttendance = "editAttendance",
13
- EditComments = "editComments",
14
- EditDatetime = "editDatetime",
15
- EditLocality = "editLocality",
16
- EditRepertory = "editRepertory",
17
- EditStage = "editStage",
18
- EditTitle = "editTitle",
19
- AddPlayers = "addPlayers",
20
- RemovePlayer = "removePlayers",
21
- ConfirmAssistance = "confirmAssistance",
22
- DeclineAssistance = "declineAssistance",
23
- Reminder = "reminder",
24
- ReminderEveningConfirm = "reminderEveningConfirm",
25
- ReminderEveningPending = "reminderEveningPending",
26
- ReminderMorningConfirm = "reminderMorningConfirm",
27
- ReminderMorningPending = "reminderMorningPending",
28
- ReminderRollcall = "reminderRollcall"
29
- }
30
- type RealtionScopeToNotification = Record<EventoFbFunctionsTypes.EditScope, NotificationEventActions>;
31
- export declare const editScopeToAction: RealtionScopeToNotification;
32
- type RelationActionNotification = Record<NotificationEventActions, NotificationActions>;
33
- export declare const notificationPerformance: RelationActionNotification;
34
- export declare const notificationSinglePractice: RelationActionNotification;
35
- export declare const notificationMultiplePractice: RelationActionNotification;
36
- export declare const userNotificationSettings: Record<UserNotificationSettings, NotificationActions[]>;
37
- export {};
@@ -1,126 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.userNotificationSettings = exports.notificationMultiplePractice = exports.notificationSinglePractice = exports.notificationPerformance = exports.editScopeToAction = exports.NotificationEventActions = exports.notificationActionsBadges = void 0;
4
- const types_1 = require("../models/Notification/types");
5
- const types_2 = require("../models/User/types");
6
- const badges_1 = require("./badges");
7
- exports.notificationActionsBadges = {
8
- [badges_1.BadgesTypes.AccPerformances]: {
9
- firstLevel: types_1.NotificationActions.BadgeAccPerformancesFirstLevel,
10
- upLevel: types_1.NotificationActions.BadgeAccPerformancesUpLevel,
11
- },
12
- [badges_1.BadgesTypes.AccPractices]: {
13
- firstLevel: types_1.NotificationActions.BadgeAccPracticesFirstLevel,
14
- upLevel: types_1.NotificationActions.BadgeAccPracticesUpLevel,
15
- },
16
- [badges_1.BadgesTypes.AnswerEvents]: {
17
- firstLevel: types_1.NotificationActions.BadgeAnswerEventsFirstLevel,
18
- upLevel: types_1.NotificationActions.BadgeAnswerEventsUpLevel,
19
- },
20
- [badges_1.BadgesTypes.StrikePractices]: {
21
- firstLevel: types_1.NotificationActions.BadgeStrikePracticesFirstLevel,
22
- upLevel: types_1.NotificationActions.BadgeStrikePracticesUpLevel,
23
- },
24
- };
25
- var NotificationEventActions;
26
- (function (NotificationEventActions) {
27
- NotificationEventActions["Create"] = "create";
28
- NotificationEventActions["Cancel"] = "cancel";
29
- NotificationEventActions["EditAttendance"] = "editAttendance";
30
- NotificationEventActions["EditComments"] = "editComments";
31
- NotificationEventActions["EditDatetime"] = "editDatetime";
32
- NotificationEventActions["EditLocality"] = "editLocality";
33
- NotificationEventActions["EditRepertory"] = "editRepertory";
34
- NotificationEventActions["EditStage"] = "editStage";
35
- NotificationEventActions["EditTitle"] = "editTitle";
36
- NotificationEventActions["AddPlayers"] = "addPlayers";
37
- NotificationEventActions["RemovePlayer"] = "removePlayers";
38
- NotificationEventActions["ConfirmAssistance"] = "confirmAssistance";
39
- NotificationEventActions["DeclineAssistance"] = "declineAssistance";
40
- NotificationEventActions["Reminder"] = "reminder";
41
- NotificationEventActions["ReminderEveningConfirm"] = "reminderEveningConfirm";
42
- NotificationEventActions["ReminderEveningPending"] = "reminderEveningPending";
43
- NotificationEventActions["ReminderMorningConfirm"] = "reminderMorningConfirm";
44
- NotificationEventActions["ReminderMorningPending"] = "reminderMorningPending";
45
- NotificationEventActions["ReminderRollcall"] = "reminderRollcall";
46
- })(NotificationEventActions = exports.NotificationEventActions || (exports.NotificationEventActions = {}));
47
- exports.editScopeToAction = {
48
- title: NotificationEventActions.EditTitle,
49
- locality: NotificationEventActions.EditLocality,
50
- comments: NotificationEventActions.EditComments,
51
- attendance: NotificationEventActions.EditAttendance,
52
- stage: NotificationEventActions.EditStage,
53
- };
54
- exports.notificationPerformance = {
55
- cancel: types_1.NotificationActions.PerformanceCancel,
56
- create: types_1.NotificationActions.PerformanceCreate,
57
- editAttendance: types_1.NotificationActions.PerformanceEditAttendance,
58
- editComments: types_1.NotificationActions.PerformanceEditComments,
59
- editDatetime: types_1.NotificationActions.PerformanceEditDatetime,
60
- editLocality: types_1.NotificationActions.PerformanceEditLocality,
61
- editRepertory: types_1.NotificationActions.PerformanceEditRepertory,
62
- editTitle: types_1.NotificationActions.PerformanceEditTitle,
63
- editStage: types_1.NotificationActions.PerformanceEditStage,
64
- addPlayers: types_1.NotificationActions.PerformancePlayersAdd,
65
- removePlayers: types_1.NotificationActions.PerformancePlayersRemove,
66
- confirmAssistance: types_1.NotificationActions.PerformanceAssistanceConfirm,
67
- declineAssistance: types_1.NotificationActions.PerformanceAssistanceDecline,
68
- reminder: types_1.NotificationActions.PerformanceReminder,
69
- reminderEveningConfirm: types_1.NotificationActions.PerformanceEveningReminderConfirm,
70
- reminderEveningPending: types_1.NotificationActions.PerformanceEveningReminderPending,
71
- reminderMorningConfirm: types_1.NotificationActions.PerformanceMorningReminderConfirm,
72
- reminderMorningPending: types_1.NotificationActions.PerformanceMorningReminderPending,
73
- reminderRollcall: types_1.NotificationActions.PerformanceRollCallReminder,
74
- };
75
- exports.notificationSinglePractice = {
76
- cancel: types_1.NotificationActions.PracticeCancel,
77
- create: types_1.NotificationActions.PracticeCreate,
78
- editAttendance: types_1.NotificationActions.PracticeEditAttendance,
79
- editComments: types_1.NotificationActions.PracticeEditComments,
80
- editDatetime: types_1.NotificationActions.PracticeEditDatetime,
81
- editLocality: types_1.NotificationActions.PracticeEditLocality,
82
- editRepertory: types_1.NotificationActions.PracticeEditRepertory,
83
- editTitle: types_1.NotificationActions.PracticeEditTitle,
84
- editStage: types_1.NotificationActions.PracticeEditStage,
85
- addPlayers: types_1.NotificationActions.PracticePlayersAdd,
86
- removePlayers: types_1.NotificationActions.PracticePlayersRemove,
87
- confirmAssistance: types_1.NotificationActions.PracticeAssistanceConfirm,
88
- declineAssistance: types_1.NotificationActions.PracticeAssistanceDecline,
89
- reminder: types_1.NotificationActions.PracticeReminder,
90
- reminderEveningConfirm: types_1.NotificationActions.PracticeEveningReminderConfirm,
91
- reminderEveningPending: types_1.NotificationActions.PracticeEveningReminderPending,
92
- reminderMorningConfirm: types_1.NotificationActions.PracticeMorningReminderConfirm,
93
- reminderMorningPending: types_1.NotificationActions.PracticeMorningReminderPending,
94
- reminderRollcall: types_1.NotificationActions.PracticeRollCallReminder,
95
- };
96
- exports.notificationMultiplePractice = {
97
- cancel: types_1.NotificationActions.PracticesCancel,
98
- create: types_1.NotificationActions.PracticesCreate,
99
- editAttendance: types_1.NotificationActions.PracticesEditAttendance,
100
- editComments: types_1.NotificationActions.PracticesEditComments,
101
- editDatetime: types_1.NotificationActions.PracticesEditDatetime,
102
- editLocality: types_1.NotificationActions.PracticesEditLocality,
103
- editRepertory: types_1.NotificationActions.PracticesEditRepertory,
104
- editTitle: types_1.NotificationActions.PracticesEditTitle,
105
- editStage: types_1.NotificationActions.PracticesEditStage,
106
- addPlayers: types_1.NotificationActions.PracticesPlayersAdd,
107
- removePlayers: types_1.NotificationActions.PracticesPlayersRemove,
108
- confirmAssistance: types_1.NotificationActions.PracticeAssistanceConfirm,
109
- declineAssistance: types_1.NotificationActions.PracticeAssistanceDecline,
110
- reminder: types_1.NotificationActions.PracticeReminder,
111
- reminderEveningConfirm: types_1.NotificationActions.PracticeEveningReminderConfirm,
112
- reminderEveningPending: types_1.NotificationActions.PracticeEveningReminderPending,
113
- reminderMorningConfirm: types_1.NotificationActions.PracticeMorningReminderConfirm,
114
- reminderMorningPending: types_1.NotificationActions.PracticeMorningReminderPending,
115
- reminderRollcall: types_1.NotificationActions.PracticeRollCallReminder,
116
- };
117
- exports.userNotificationSettings = {
118
- [types_2.UserNotificationSettings.AttendanceConfirmed]: [
119
- types_1.NotificationActions.PerformanceAssistanceConfirm,
120
- types_1.NotificationActions.PracticeAssistanceConfirm,
121
- ],
122
- [types_2.UserNotificationSettings.AttendanceDeclined]: [
123
- types_1.NotificationActions.PerformanceAssistanceDecline,
124
- types_1.NotificationActions.PracticeAssistanceDecline,
125
- ],
126
- };