@glissandoo/lib 1.123.1 → 1.123.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.
- package/models/User/index.d.ts +7 -1
- package/models/User/index.js +9 -0
- package/models/User/types.d.ts +6 -0
- package/models/User/types.js +5 -1
- package/package.json +1 -1
package/models/User/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { LanguagesTypes } from '../../lang';
|
|
|
2
2
|
import { DocumentModel } from '../Model';
|
|
3
3
|
import { RepertoireFilterBy, RepertoireFilterDirection } from '../Repertory/types';
|
|
4
4
|
import UserExtended from './extended';
|
|
5
|
-
import { UserAppConfig, UserDashboardConfig, UserData, UserEmailSettings, UserEventsFilter, UserNotificationSettings, UserRole } from './types';
|
|
5
|
+
import { UserAppConfig, UserCalendarConfig, UserDashboardConfig, UserData, UserEmailSettings, UserEventsFilter, UserNotificationSettings, UserRole } from './types';
|
|
6
6
|
export default class User extends UserExtended<UserData> {
|
|
7
7
|
constructor(doc: DocumentModel);
|
|
8
8
|
get instruments(): string[];
|
|
@@ -52,6 +52,9 @@ export default class User extends UserExtended<UserData> {
|
|
|
52
52
|
repertoire_order_direction: RepertoireFilterDirection;
|
|
53
53
|
events_type: import("../Evento/types").EventType | null;
|
|
54
54
|
};
|
|
55
|
+
get calendarConfig(): {
|
|
56
|
+
sync_prompt_dismissed: boolean;
|
|
57
|
+
};
|
|
55
58
|
getDashboardConfig<T extends UserDashboardConfig>(value: T): {
|
|
56
59
|
default_group_id: string | null;
|
|
57
60
|
default_partnership_id: string | null;
|
|
@@ -74,6 +77,9 @@ export default class User extends UserExtended<UserData> {
|
|
|
74
77
|
offers_filter_instrument: import("../../helpers/instruments").InstrumentId | null;
|
|
75
78
|
offers_filter_music_style: import("../../helpers/musicStyles").MusicStyleId | null;
|
|
76
79
|
}[T];
|
|
80
|
+
getCalendarConfig<T extends UserCalendarConfig>(value: T): {
|
|
81
|
+
sync_prompt_dismissed: boolean;
|
|
82
|
+
}[T];
|
|
77
83
|
getNotificationSetting(key: UserNotificationSettings): boolean;
|
|
78
84
|
getNotificationByGroup(groupId: string): number;
|
|
79
85
|
get registerVia(): import("./types").UserRegisterVia;
|
package/models/User/index.js
CHANGED
|
@@ -132,12 +132,21 @@ class User extends extended_1.default {
|
|
|
132
132
|
}, dashboardConfig);
|
|
133
133
|
return values;
|
|
134
134
|
}
|
|
135
|
+
get calendarConfig() {
|
|
136
|
+
const { calendarConfig } = this.data;
|
|
137
|
+
return {
|
|
138
|
+
[types_2.UserCalendarConfig.SyncPromptDismissed]: calendarConfig?.[types_2.UserCalendarConfig.SyncPromptDismissed] ?? false,
|
|
139
|
+
};
|
|
140
|
+
}
|
|
135
141
|
getDashboardConfig(value) {
|
|
136
142
|
return this.dashboardConfig[value];
|
|
137
143
|
}
|
|
138
144
|
getAppConfig(value) {
|
|
139
145
|
return this.appConfig[value];
|
|
140
146
|
}
|
|
147
|
+
getCalendarConfig(value) {
|
|
148
|
+
return this.calendarConfig[value];
|
|
149
|
+
}
|
|
141
150
|
getNotificationSetting(key) {
|
|
142
151
|
return this.data.notificationSettings[key];
|
|
143
152
|
}
|
package/models/User/types.d.ts
CHANGED
|
@@ -32,6 +32,9 @@ export declare enum UserDashboardConfig {
|
|
|
32
32
|
RepertoireOrderDirection = "repertoire_order_direction",
|
|
33
33
|
EventsType = "events_type"
|
|
34
34
|
}
|
|
35
|
+
export declare enum UserCalendarConfig {
|
|
36
|
+
SyncPromptDismissed = "sync_prompt_dismissed"
|
|
37
|
+
}
|
|
35
38
|
export declare enum UserNotificationSettings {
|
|
36
39
|
AttendanceConfirmed = "enabled_attendance_confirmed",
|
|
37
40
|
AttendanceDeclined = "enabled_attendance_declined",
|
|
@@ -117,6 +120,9 @@ export interface UserData extends UserExtendedData {
|
|
|
117
120
|
[UserAppConfig.OffersFilterInstrument]: InstrumentId | null;
|
|
118
121
|
[UserAppConfig.OffersFilterMusicStyle]: MusicStyleId | null;
|
|
119
122
|
};
|
|
123
|
+
calendarConfig: {
|
|
124
|
+
[UserCalendarConfig.SyncPromptDismissed]: boolean;
|
|
125
|
+
};
|
|
120
126
|
analyticsEnabled: boolean;
|
|
121
127
|
registerVia: UserRegisterVia;
|
|
122
128
|
lastAppLoginAt: Timestamp | null;
|
package/models/User/types.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserEventsFilter = exports.UserEmailSettings = exports.UserNotificationSettings = exports.UserDashboardConfig = exports.UserAppConfig = exports.UserRegisterVia = exports.UserRole = void 0;
|
|
3
|
+
exports.UserEventsFilter = exports.UserEmailSettings = exports.UserNotificationSettings = exports.UserCalendarConfig = exports.UserDashboardConfig = exports.UserAppConfig = exports.UserRegisterVia = exports.UserRole = void 0;
|
|
4
4
|
var UserRole;
|
|
5
5
|
(function (UserRole) {
|
|
6
6
|
UserRole["SuperAdmin"] = "admin";
|
|
@@ -33,6 +33,10 @@ var UserDashboardConfig;
|
|
|
33
33
|
UserDashboardConfig["RepertoireOrderDirection"] = "repertoire_order_direction";
|
|
34
34
|
UserDashboardConfig["EventsType"] = "events_type";
|
|
35
35
|
})(UserDashboardConfig = exports.UserDashboardConfig || (exports.UserDashboardConfig = {}));
|
|
36
|
+
var UserCalendarConfig;
|
|
37
|
+
(function (UserCalendarConfig) {
|
|
38
|
+
UserCalendarConfig["SyncPromptDismissed"] = "sync_prompt_dismissed";
|
|
39
|
+
})(UserCalendarConfig = exports.UserCalendarConfig || (exports.UserCalendarConfig = {}));
|
|
36
40
|
var UserNotificationSettings;
|
|
37
41
|
(function (UserNotificationSettings) {
|
|
38
42
|
UserNotificationSettings["AttendanceConfirmed"] = "enabled_attendance_confirmed";
|