@edifice.io/client 1.7.4-develop-pedago.20241211160712

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.
Files changed (83) hide show
  1. package/LICENSE +661 -0
  2. package/README.md +90 -0
  3. package/dist/analytics/Service.d.ts +17 -0
  4. package/dist/apps/timeline/Framework.d.ts +25 -0
  5. package/dist/apps/timeline/Notification.model.d.ts +10 -0
  6. package/dist/apps/timeline/interfaces.d.ts +69 -0
  7. package/dist/audience/ReactionsService.d.ts +22 -0
  8. package/dist/audience/Service.d.ts +13 -0
  9. package/dist/audience/ViewsService.d.ts +12 -0
  10. package/dist/audience/interface.d.ts +108 -0
  11. package/dist/cache/Service.d.ts +14 -0
  12. package/dist/configure/Analytics.d.ts +40 -0
  13. package/dist/configure/AppConf.d.ts +17 -0
  14. package/dist/configure/Framework.d.ts +22 -0
  15. package/dist/configure/Service.d.ts +21 -0
  16. package/dist/configure/Theme.d.ts +34 -0
  17. package/dist/configure/User.d.ts +21 -0
  18. package/dist/configure/interfaces.d.ts +218 -0
  19. package/dist/data/Service.d.ts +25 -0
  20. package/dist/data/WebBroker.d.ts +12 -0
  21. package/dist/data/interface.d.ts +50 -0
  22. package/dist/directory/Service.d.ts +17 -0
  23. package/dist/directory/interface.d.ts +53 -0
  24. package/dist/embedder/Service.d.ts +39 -0
  25. package/dist/embedder/interface.d.ts +14 -0
  26. package/dist/globals.d.ts +52 -0
  27. package/dist/idiom/Idiom.d.ts +18 -0
  28. package/dist/idiom/Service.d.ts +24 -0
  29. package/dist/idiom/interfaces.d.ts +22 -0
  30. package/dist/index.cjs +6 -0
  31. package/dist/index.d.ts +13 -0
  32. package/dist/index.js +6192 -0
  33. package/dist/notify/Framework.d.ts +29 -0
  34. package/dist/notify/Subject.d.ts +9 -0
  35. package/dist/notify/interfaces.d.ts +113 -0
  36. package/dist/resources/ResourceService.d.ts +52 -0
  37. package/dist/resources/ServiceRegistry.d.ts +25 -0
  38. package/dist/resources/SnipletsService.d.ts +18 -0
  39. package/dist/resources/behaviours/AbstractBehaviourService.d.ts +34 -0
  40. package/dist/resources/behaviours/ActualitesBehaviour.d.ts +6 -0
  41. package/dist/resources/behaviours/BlogBehaviour.d.ts +6 -0
  42. package/dist/resources/behaviours/CollaborativewallBehaviour.d.ts +6 -0
  43. package/dist/resources/behaviours/CommunityBehaviour.d.ts +6 -0
  44. package/dist/resources/behaviours/ExercizerBehaviour.d.ts +6 -0
  45. package/dist/resources/behaviours/FormulaireBehaviour.d.ts +6 -0
  46. package/dist/resources/behaviours/ForumBehaviour.d.ts +6 -0
  47. package/dist/resources/behaviours/HomeworksBehaviour.d.ts +6 -0
  48. package/dist/resources/behaviours/MagnetoBehaviour.d.ts +6 -0
  49. package/dist/resources/behaviours/MindmapBehaviour.d.ts +6 -0
  50. package/dist/resources/behaviours/PagesBehaviour.d.ts +6 -0
  51. package/dist/resources/behaviours/PollBehaviour.d.ts +6 -0
  52. package/dist/resources/behaviours/ScrapbookBehaviour.d.ts +6 -0
  53. package/dist/resources/behaviours/TimelinegeneratorBehaviour.d.ts +6 -0
  54. package/dist/resources/behaviours/WikiBehaviour.d.ts +6 -0
  55. package/dist/resources/behaviours/WorkspaceBehaviour.d.ts +7 -0
  56. package/dist/resources/interface.d.ts +390 -0
  57. package/dist/resources/services/ScrapbookResourceService.d.ts +14 -0
  58. package/dist/rights/Service.d.ts +77 -0
  59. package/dist/rights/interface.d.ts +18 -0
  60. package/dist/services/OdeServices.d.ts +72 -0
  61. package/dist/services/index.d.ts +10 -0
  62. package/dist/session/Framework.d.ts +10 -0
  63. package/dist/session/Service.d.ts +39 -0
  64. package/dist/session/Session.d.ts +34 -0
  65. package/dist/session/interfaces.d.ts +268 -0
  66. package/dist/share/Service.d.ts +18 -0
  67. package/dist/share/interface.d.ts +104 -0
  68. package/dist/transport/Framework.d.ts +9 -0
  69. package/dist/transport/Http.d.ts +26 -0
  70. package/dist/transport/Service.d.ts +31 -0
  71. package/dist/transport/interfaces.d.ts +70 -0
  72. package/dist/utilities/DocumentHelper.d.ts +27 -0
  73. package/dist/utilities/StringUtils.d.ts +3 -0
  74. package/dist/utilities/index.d.ts +3 -0
  75. package/dist/utilities/isActionAvailable.d.ts +2 -0
  76. package/dist/video/Service.d.ts +21 -0
  77. package/dist/video/interface.d.ts +42 -0
  78. package/dist/widget/Framework.d.ts +31 -0
  79. package/dist/widget/LastInfos.widget.d.ts +15 -0
  80. package/dist/widget/interfaces.d.ts +53 -0
  81. package/dist/workspace/Service.d.ts +75 -0
  82. package/dist/workspace/interface.d.ts +67 -0
  83. package/package.json +53 -0
package/README.md ADDED
@@ -0,0 +1,90 @@
1
+ # Edifice TS Client
2
+
3
+ Edifice TS Client exposes frameworks for interacting with [entcore-based servers APIs](https://github.com/opendigitaleducation/entcore).
4
+ It is written in typescript, with minimal dependencies (rxjs and axios at the moment).
5
+
6
+ ## Prerequisites
7
+
8
+ - `pnpm: >= 7 | 8`
9
+ - `node: >= 16 | 18`
10
+
11
+ ## Getting Started
12
+
13
+ ```bash
14
+ pnpm install
15
+ ```
16
+
17
+ ### Build
18
+
19
+ ```bash
20
+ pnpm run build
21
+ ```
22
+
23
+ ## Documentation
24
+
25
+ As rule of thumb, **@edifice.io/client never uses any browser-related technology** (no HTMLElement, Document, navigator...).
26
+ It focus exclusively on data exchange with the servers.
27
+
28
+ - [IConfigurationFramework](docs/interfaces/iconfigurationframework.md) is composed of 3 layers
29
+
30
+ - Platform (apps, theme, analytics, i18n...)
31
+ - School
32
+ - User (preferences)
33
+
34
+ - [ISession](docs/interfaces/isession.md) of the connected user
35
+
36
+ - user
37
+ - description
38
+ - currentLanguage
39
+ - notLoggedIn
40
+ - avatarUrl
41
+ - currentApp (the one which initialized the framework)
42
+ - hasWorkflow
43
+ - hasRight
44
+
45
+ - [INotifyFramework](docs/interfaces/inotifyframework.md) for async messages
46
+
47
+ - onLangReady
48
+ - onSessionReady
49
+ - onSkinReady
50
+ - onOverridesReady
51
+ - promisify (generic for creating/resolving/rejecting a Promise)
52
+ - events (a publish/subscribe event broker)
53
+
54
+ - [ITransportFramework](docs/interfaces/itransportframework.md) wraps the HTTP protocol
55
+
56
+ - [IExplorerFramework](docs/interfaces/iexplorerframework.md) to look for resources
57
+
58
+ - [IWidgetFramework](docs/interfaces/iwidgetframework.md) dedicated to widgets conf/prefs
59
+
60
+ - and specific app frameworks for modeling their data
61
+ - [ITimelineApp](docs/interfaces/itimelineapp.md)
62
+ - ...
63
+
64
+ [Browse the full API documentation here](docs/modules.md)
65
+
66
+ ## Additional developers notes
67
+
68
+ 4 additional libs are installed by the `pnpm install` command.
69
+
70
+ - [ViteJS](https://vitejs.dev/) as a Bundler
71
+ - [Typedoc](https://typedoc.org/guides/doccomments/) to generate the markdown documentation, in **/docs**, from the Typescript comments in source code.
72
+ - [husky](https://github.com/typicode/husky) to install a local [git pre-commit hook](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks#_client_side_hooks), in order to run the unit-tests and update /docs before every commit.
73
+ => **/docs will always be up-to-date on the git server**.
74
+
75
+ The `pnpm run build` command will populate the **/dist** directory
76
+
77
+ - **/dist/ts** contains the JS code and associated _.d.ts_ and _.js.map_ files, later packaged in NPM (done by our CI).
78
+ - **/dist/bundle** contains the production-ready code/map.
79
+
80
+ So, **you'll just have to write nice documented code, and unit tests** where needed !
81
+
82
+ ## Push Force
83
+
84
+ `git push --force` is not recommended!
85
+
86
+ ```
87
+ After a git history rewrite due to a git push --force, the git tags and notes referencing the commits that were rewritten are lost.
88
+ ```
89
+
90
+ If it happens, read this troubleshooting section: [Troubleshooting](https://semantic-release.gitbook.io/semantic-release/support/troubleshooting#release-not-found-release-branch-after-git-push-force)
@@ -0,0 +1,17 @@
1
+ import { IOdeServices } from '../services/OdeServices';
2
+ import { IWebApp } from '../session/interfaces';
3
+ export declare class AnalyticsService {
4
+ private context;
5
+ constructor(context: IOdeServices);
6
+ private get http();
7
+ private get session();
8
+ /**
9
+ * Xiti tracker for page loading.
10
+ * @param locationPath
11
+ * @param app
12
+ */
13
+ trackPageLoad(locationPath: string, app: IWebApp): Promise<void>;
14
+ private getXitiConfig;
15
+ private loadXitiScript;
16
+ private getXitiTrackingParams;
17
+ }
@@ -0,0 +1,25 @@
1
+ import { IFlashMessageModel, ITimelineApp } from './interfaces';
2
+ import { Notification } from './Notification.model';
3
+ export declare class TimelineApp implements ITimelineApp {
4
+ private _notifications;
5
+ private _notificationTypes;
6
+ private _flashMessages;
7
+ private _pageNumber;
8
+ private _lastPage;
9
+ private _loading;
10
+ showMine: boolean;
11
+ get notifications(): Array<Notification>;
12
+ get isLoading(): boolean;
13
+ get page(): number;
14
+ get hasMorePage(): boolean;
15
+ get notificationTypes(): Array<string>;
16
+ get selectedNotificationTypes(): Array<string>;
17
+ get preferences(): any;
18
+ get flashMessages(): IFlashMessageModel[];
19
+ savePreferences(): Promise<void>;
20
+ resetPagination(): void;
21
+ initialize(): Promise<void>;
22
+ loadNotifications(force?: boolean): Promise<void>;
23
+ loadFlashMessages(): Promise<void>;
24
+ markAsRead(msg: IFlashMessageModel): Promise<void>;
25
+ }
@@ -0,0 +1,10 @@
1
+ import { ITimelineNotification, NotificationModel } from './interfaces';
2
+ export declare class Notification implements ITimelineNotification {
3
+ constructor(model: NotificationModel);
4
+ _id: string;
5
+ model: NotificationModel;
6
+ isUnread(): boolean;
7
+ delete(): Promise<any>;
8
+ discard(): Promise<any>;
9
+ report(): Promise<any>;
10
+ }
@@ -0,0 +1,69 @@
1
+ export declare abstract class ITimelineFactory {
2
+ static createInstance(): ITimelineApp;
3
+ }
4
+ export interface ITimelineApp {
5
+ initialize(): Promise<void>;
6
+ readonly notificationTypes: Array<string>;
7
+ readonly selectedNotificationTypes: Array<string>;
8
+ showMine: boolean;
9
+ /** Load more notifications, or force loading more by virtually incrementing the page. */
10
+ loadNotifications(force?: boolean): Promise<void>;
11
+ readonly notifications: Array<ITimelineNotification>;
12
+ resetPagination(): void;
13
+ readonly isLoading: boolean;
14
+ readonly page: number;
15
+ readonly hasMorePage: boolean;
16
+ savePreferences(): Promise<void>;
17
+ readonly preferences: any;
18
+ loadFlashMessages(): Promise<void>;
19
+ readonly flashMessages: Array<IFlashMessageModel>;
20
+ markAsRead(msg: IFlashMessageModel): Promise<void>;
21
+ }
22
+ export interface ITimelineNotification {
23
+ readonly _id: string;
24
+ readonly model: NotificationModel;
25
+ isUnread(): boolean;
26
+ delete(): Promise<void>;
27
+ discard(): Promise<void>;
28
+ report(): Promise<void>;
29
+ }
30
+ export type NotificationModel = {
31
+ _id: string;
32
+ type: string;
33
+ eventType: string;
34
+ resource: string;
35
+ sender: string;
36
+ params: {
37
+ uri: string;
38
+ username: string;
39
+ blogTitle: string;
40
+ resourceUri: string;
41
+ };
42
+ date: {
43
+ $date: number;
44
+ };
45
+ message: string;
46
+ recipients?: Array<Recipient>;
47
+ reported?: boolean;
48
+ reporters?: any;
49
+ };
50
+ export interface Recipient {
51
+ userId: string;
52
+ }
53
+ export interface IFlashMessageModel {
54
+ readonly id: string;
55
+ readonly title?: string;
56
+ readonly contents?: Object;
57
+ readonly startDate?: string;
58
+ readonly endDate?: string;
59
+ readonly readCount?: number;
60
+ readonly author?: string;
61
+ readonly profiles?: string[];
62
+ readonly color?: string;
63
+ readonly customColor?: string | null;
64
+ readonly lastModifier?: string;
65
+ readonly structureId?: string;
66
+ readonly subStructures?: string[];
67
+ readonly signature?: string;
68
+ readonly signatureColor?: string;
69
+ }
@@ -0,0 +1,22 @@
1
+ import { IOdeServices } from '../services/OdeServices';
2
+ import { IReactionsService, ReactionDetailsData, ReactionSummaryData, ReactionType } from './interface';
3
+ export type ReactionSummariesData = {
4
+ reactionsByResource: {
5
+ [resourceId: string]: ReactionSummaryData | undefined;
6
+ };
7
+ };
8
+ export declare class ReactionsService implements IReactionsService {
9
+ private context;
10
+ private module;
11
+ private resourceType;
12
+ constructor(context: IOdeServices, module: string, resourceType: string);
13
+ private get http();
14
+ loadAvailableReactions(): Promise<("REACTION_1" | "REACTION_2" | "REACTION_3" | "REACTION_4")[] | undefined>;
15
+ loadReactionSummaries(resourceIds: string[]): Promise<{
16
+ [resourceId: string]: ReactionSummaryData | undefined;
17
+ }>;
18
+ loadReactionDetails(resourceId: string, page: number, size: number): Promise<ReactionDetailsData | undefined>;
19
+ deleteReaction(resourceId: string): Promise<void>;
20
+ updateReaction(resourceId: string, reactionType: ReactionType): Promise<void>;
21
+ createReaction(resourceId: string, reactionType: ReactionType): Promise<void>;
22
+ }
@@ -0,0 +1,13 @@
1
+ import { App, ResourceType } from '../globals';
2
+ import { IOdeServices } from '../services/OdeServices';
3
+ import { ReactionsService } from './ReactionsService';
4
+ import { ViewsService } from './ViewsService';
5
+ import { IAudienceService } from './interface';
6
+ export declare class AudienceService implements IAudienceService {
7
+ private context;
8
+ private module;
9
+ private resourceType;
10
+ constructor(context: IOdeServices, module: App, resourceType: ResourceType);
11
+ get views(): ViewsService;
12
+ get reactions(): ReactionsService;
13
+ }
@@ -0,0 +1,12 @@
1
+ import { IOdeServices } from '../services/OdeServices';
2
+ import { IViewsService, ViewsCounters, ViewsDetails } from './interface';
3
+ export declare class ViewsService implements IViewsService {
4
+ private context;
5
+ private module;
6
+ private resourceType;
7
+ constructor(context: IOdeServices, module: string, resourceType: string);
8
+ private get http();
9
+ getCounters(resourceIds: string[]): Promise<ViewsCounters>;
10
+ getDetails(resourceId: string): Promise<ViewsDetails | undefined>;
11
+ trigger(resourceId: string): Promise<void>;
12
+ }
@@ -0,0 +1,108 @@
1
+ import { UserProfile } from '../session/interfaces';
2
+ export interface IAudienceService {
3
+ readonly views: IViewsService;
4
+ readonly reactions: IReactionsService;
5
+ }
6
+ export interface IViewsService {
7
+ /**
8
+ * Load the views counter for a list of resources.
9
+ * @param resourceIds list of resource ids
10
+ * @returns map of counters, indexed by resource id.
11
+ */
12
+ getCounters(resourceIds: string[]): Promise<ViewsCounters>;
13
+ /**
14
+ * Load the views details for a resource.
15
+ * @param resourceId ID of the resource
16
+ * @returns detailed views counters, or `undefined` if an error occured.
17
+ */
18
+ getDetails(resourceId: string): Promise<ViewsDetails | undefined>;
19
+ /**
20
+ * Trigger a view for a resource.
21
+ * @param resourceId id
22
+ */
23
+ trigger(resourceId: string): Promise<void>;
24
+ }
25
+ /**
26
+ * ViewsCounters model
27
+ */
28
+ export type ViewsCounters = {
29
+ [resourceId: string]: number;
30
+ };
31
+ /**
32
+ * Views details
33
+ */
34
+ export interface ViewsDetails {
35
+ viewsCounter: number;
36
+ uniqueViewsCounter: number;
37
+ uniqueViewsPerProfile?: ViewsDetailsProfile[];
38
+ }
39
+ /**
40
+ * Views details
41
+ */
42
+ export interface ViewsDetailsProfile {
43
+ profile: UserProfile[number];
44
+ counter: number;
45
+ }
46
+ export interface IReactionsService {
47
+ /**
48
+ * Load the list of available reactions types, which is configured on the platform.
49
+ * @return a list of types, or undefined if an error occured.
50
+ */
51
+ loadAvailableReactions(): Promise<ReactionType[] | undefined>;
52
+ /**
53
+ * Load the reactions summary for a list of resources.
54
+ * @param resourceIds list of resource ids
55
+ * @returns map of summaries, indexed by resource id.
56
+ */
57
+ loadReactionSummaries(resourceIds: string[]): Promise<{
58
+ [resourceId: string]: ReactionSummaryData | undefined;
59
+ }>;
60
+ /**
61
+ * Load the reactions details for a resource.
62
+ * @param resourceId ID of the resource
63
+ * @param page Page number
64
+ * @param size Number of results per page.
65
+ */
66
+ loadReactionDetails(resourceId: string, page: number, size: number): Promise<ReactionDetailsData | undefined>;
67
+ /**
68
+ * Remove the current user reaction to a resource.
69
+ * @param resourceId id
70
+ */
71
+ deleteReaction(resourceId: string): Promise<void>;
72
+ /**
73
+ * Change the current user reaction to a resource.
74
+ * @param resourceId id
75
+ * @param reactionType reaction to set
76
+ */
77
+ updateReaction(resourceId: string, reactionType: ReactionType): Promise<void>;
78
+ /**
79
+ * Set the current user reaction to a resource.
80
+ * @param resourceId id
81
+ * @param reactionType reaction to set
82
+ */
83
+ createReaction(resourceId: string, reactionType: ReactionType): Promise<void>;
84
+ }
85
+ /** Typing of a Reaction */
86
+ export declare const ReactionTypes: readonly ["REACTION_1", "REACTION_2", "REACTION_3", "REACTION_4"];
87
+ export type ReactionType = (typeof ReactionTypes)[number];
88
+ /** Typing of a Reaction summary */
89
+ export type ReactionSummaryData = {
90
+ reactionTypes?: Array<ReactionType> | null;
91
+ userReaction?: ReactionType | null;
92
+ totalReactionsCounter: number;
93
+ };
94
+ /** Typing of a Reaction details */
95
+ export type ReactionDetailsData = {
96
+ reactionCounters: {
97
+ countByType: {
98
+ [type in ReactionType]?: number;
99
+ };
100
+ allReactionsCounter: number;
101
+ };
102
+ userReactions: Array<{
103
+ userId: string;
104
+ profile: 'Teacher' | 'Student' | 'Relative' | 'Personnel';
105
+ reactionType: ReactionType;
106
+ displayName: string;
107
+ }>;
108
+ };
@@ -0,0 +1,14 @@
1
+ import { IHttpParams, IHttpResponse } from '../transport/interfaces';
2
+ import { IOdeServices } from '../services/OdeServices';
3
+ export declare class CacheService {
4
+ private context;
5
+ constructor(context: IOdeServices);
6
+ private get http();
7
+ private fromCacheIfPossible;
8
+ clearCache(key?: string): void;
9
+ httpGet<R = any>(url: string, params?: IHttpParams): Promise<{
10
+ value: R;
11
+ response: IHttpResponse;
12
+ }>;
13
+ httpGetJson<R = any>(url: string, params?: IHttpParams): Promise<R>;
14
+ }
@@ -0,0 +1,40 @@
1
+ import { AnalyticStatus, IXitiTrackingParams, IMatomoTrackingParams, ITrackingParams, TrackingType } from './interfaces';
2
+ export type ParamsByTrackingSystem = {
3
+ type: 'none' | 'internal' | 'matomo' | 'multiple';
4
+ internal?: ITrackingParams;
5
+ matomo?: IMatomoTrackingParams;
6
+ xiti?: IXitiTrackingParams;
7
+ };
8
+ export type XitiConf = {
9
+ ID_EXPLOITANT: string;
10
+ ID_PLATEFORME: string;
11
+ ID_PROJET: string;
12
+ active: boolean;
13
+ config: boolean;
14
+ structureMap?: {
15
+ [structureId: string]: {
16
+ UAI?: string;
17
+ active: boolean;
18
+ collectiviteId?: number;
19
+ plateformeId?: any;
20
+ projetId?: any;
21
+ };
22
+ };
23
+ };
24
+ export declare class Analytics {
25
+ private _status;
26
+ private _params?;
27
+ get status(): AnalyticStatus;
28
+ xiti(): Promise<IXitiTrackingParams | undefined>;
29
+ parameters<T extends ITrackingParams>(type: TrackingType): Promise<T | undefined>;
30
+ private parametersWithCheck;
31
+ /**
32
+ * This method loads the conf and waits for the user session to start.
33
+ * It can be called ASAP, but it will be automatically called if needed.
34
+ * @returns A promise of the end of the init process (it may throw errors)
35
+ * @throws ERROR_CODE.MALFORMED_DATA when config cannot be read.
36
+ */
37
+ private initialize;
38
+ /** 2021 implementation of XiTi. */
39
+ private initializeXiti;
40
+ }
@@ -0,0 +1,17 @@
1
+ import { App } from '../globals';
2
+ import { IWebApp } from '../session/interfaces';
3
+ export declare class AppConf {
4
+ private _publicConf;
5
+ private _currentApp?;
6
+ private _appConf;
7
+ /**
8
+ * Get the currently initialized App.
9
+ * @see getter SessionFramework.currentApp
10
+ */
11
+ get currentApp(): App | null;
12
+ setCurrentApp(app: App): AppConf;
13
+ initialize(app: App, alternativeApp?: boolean): Promise<void>;
14
+ getPublicConf(app: App): Promise<any>;
15
+ getWebAppConf(app: App): Promise<IWebApp | undefined>;
16
+ loadI18n(app: App): Promise<void>;
17
+ }
@@ -0,0 +1,22 @@
1
+ import { IConfigurationFramework } from './interfaces';
2
+ import { Theme } from './Theme';
3
+ import { Idiom } from '../idiom/Idiom';
4
+ import { User } from './User';
5
+ import { AppConf } from './AppConf';
6
+ import { Analytics } from './Analytics';
7
+ export declare class ConfigurationFramework implements IConfigurationFramework {
8
+ readonly Platform: {
9
+ deploymentTag: string;
10
+ cdnDomain: string;
11
+ apps: AppConf;
12
+ theme: Theme;
13
+ analytics: Analytics;
14
+ idiom: Idiom;
15
+ listLanguages: () => Promise<any>;
16
+ };
17
+ readonly School: {};
18
+ readonly User: User;
19
+ initialize(version?: string | null, cdnDomain?: string | null): Promise<void>;
20
+ }
21
+ /** The whole framework is a singleton. */
22
+ export declare const configure: ConfigurationFramework;
@@ -0,0 +1,21 @@
1
+ import { App } from '../globals';
2
+ import { IOdeServices } from '../services/OdeServices';
3
+ import { IGetConf } from './interfaces';
4
+ export declare class ConfService {
5
+ private context;
6
+ constructor(context: IOdeServices);
7
+ private get http();
8
+ private get cache();
9
+ private get cdnDomain();
10
+ private get notify();
11
+ getConf(app: App): Promise<IGetConf>;
12
+ getPublicConf<T>(app: App): Promise<T>;
13
+ getCdnUrl(): string | undefined;
14
+ savePreference<T>(key: string, value: T): Promise<void>;
15
+ getPreference<T>(key: string): Promise<T>;
16
+ private getThemeConf;
17
+ private getApplicationsList;
18
+ private getWebAppConf;
19
+ private getTheme;
20
+ getLogoutCallback(version?: string): Promise<any>;
21
+ }
@@ -0,0 +1,34 @@
1
+ import { ITheme, IThemeConf, IThemeDesc, IThemeOverrides, IThemeConfOverriding } from './interfaces';
2
+ export declare class Theme implements ITheme {
3
+ private _conf?;
4
+ private _loaded?;
5
+ skinName: string;
6
+ themeName: string;
7
+ skin: string;
8
+ themeUrl: string;
9
+ templateOverrides: IThemeOverrides;
10
+ portalTemplate: string;
11
+ basePath: string;
12
+ logoutCallback: string;
13
+ skins: Array<IThemeConfOverriding>;
14
+ is1D: boolean;
15
+ is2D: boolean;
16
+ initialize(version?: string): Promise<void>;
17
+ private get version();
18
+ private get cdnDomain();
19
+ onFullyReady(): Promise<ITheme>;
20
+ private _onSkinReady;
21
+ onSkinReady(): Promise<ITheme>;
22
+ private _onOverrideReady;
23
+ onOverrideReady(): Promise<IThemeOverrides>;
24
+ getConf(version?: string): Promise<IThemeConf>;
25
+ load(version?: string): Promise<void>;
26
+ private loadDisconnected;
27
+ private loadConnected;
28
+ /** Load the user's configured theme. */
29
+ private loadDefaultTheme;
30
+ listThemes(): Promise<IThemeDesc[]>;
31
+ setDefaultTheme(theme: IThemeDesc): Promise<void>;
32
+ listSkins(): Promise<IThemeConfOverriding[]>;
33
+ getHelpPath(): Promise<String>;
34
+ }
@@ -0,0 +1,21 @@
1
+ import { App } from '../globals';
2
+ import { IUserPreferences } from './interfaces';
3
+ import { IWebApp } from '../session/interfaces';
4
+ export declare class User {
5
+ private _me;
6
+ private _keepOpenOnLogout;
7
+ private _preferences;
8
+ private _bookmarkedApps;
9
+ get keepOpenOnLogout(): boolean;
10
+ get preferences(): IUserPreferences;
11
+ get bookmarkedApps(): Array<IWebApp>;
12
+ initialize(version?: string): Promise<void>;
13
+ private setCurrentModel;
14
+ private loadPublicConf;
15
+ /** Bookmarks : pinned apps */
16
+ private loadBookmarks;
17
+ loadAppPrefs(app: App): Promise<any>;
18
+ saveAppPrefs(app: App): Promise<void>;
19
+ loadLanguage(): Promise<string>;
20
+ saveLanguage(lang: string): Promise<void>;
21
+ }