@edifice.io/client 2.0.0-develop-b2school.20250109175008 → 2.0.1-develop-hotfix.1736762895570

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.
@@ -384,6 +384,12 @@ export interface CollaborativewallUpdate extends UpdateParameters {
384
384
  export interface CollaborativewallResource extends IResource {
385
385
  'publish-type': 'RESTRAINT' | 'IMMEDIATE';
386
386
  }
387
+ export interface HomeworksCreate extends CreateParameters {
388
+ repeats?: any[];
389
+ }
390
+ export interface HomeworksUpdate extends UpdateParameters {
391
+ repeats?: any[];
392
+ }
387
393
  export interface ScrapbookUpdate extends UpdateParameters {
388
394
  }
389
395
  export interface ScrapbookResource extends IResource {
@@ -0,0 +1,14 @@
1
+ import { ResourceType } from '../..';
2
+ import { HomeworksCreate, CreateResult, HomeworksUpdate, UpdateResult } from '../interface';
3
+ import { ResourceService } from '../ResourceService';
4
+ export declare class HomeworksResourceService extends ResourceService {
5
+ create<T extends HomeworksCreate>(parameters: T): Promise<CreateResult>;
6
+ update(parameters: HomeworksUpdate): Promise<UpdateResult>;
7
+ getResourceType(): ResourceType;
8
+ getApplication(): string;
9
+ getFormUrl(folderId?: string): string;
10
+ getViewUrl(resourceId: string): string;
11
+ getPrintUrl(resourceId: string): string;
12
+ getEditUrl(resourceId: string): string;
13
+ getExportUrl(): string;
14
+ }
@@ -1,8 +1,5 @@
1
1
  import { App } from '../globals';
2
2
  import { WidgetName } from '../widget/interfaces';
3
- export declare abstract class SessionFrameworkFactory {
4
- static instance(): ISessionFramework;
5
- }
6
3
  export interface ISessionFramework {
7
4
  /** Initialize once before use. */
8
5
  initialize(): Promise<void>;
@@ -1,6 +1,3 @@
1
- export declare abstract class TransportFrameworkFactory {
2
- static instance(): ITransportFramework;
3
- }
4
1
  export interface ITransportFramework {
5
2
  /** Default instance. */
6
3
  readonly http: IHttp;
@@ -1,3 +1,4 @@
1
+ import { IOdeServices } from '../services/OdeServices';
1
2
  export interface ILastInfosModel {
2
3
  date: string;
3
4
  shared: [];
@@ -9,6 +10,9 @@ export interface ILastInfosModel {
9
10
  _id: number;
10
11
  }
11
12
  export declare class LastInfosWidget {
13
+ protected context: IOdeServices;
14
+ constructor(context: IOdeServices);
15
+ get http(): import('../transport/Service').HttpService;
12
16
  loadInfos(maxResults: number): Promise<ILastInfosModel[]>;
13
17
  getMaxResults(): Promise<number>;
14
18
  setMaxResults(maxResults: number): Promise<void>;
@@ -20,9 +20,6 @@ export declare const WIDGET_NAME: {
20
20
  readonly SCHOOL: "school-widget";
21
21
  };
22
22
  export type WidgetName = (typeof WIDGET_NAME)[keyof typeof WIDGET_NAME];
23
- export declare abstract class WidgetFrameworkFactory {
24
- static instance(): IWidgetFramework;
25
- }
26
23
  export interface IWidgetFramework {
27
24
  /** Loads the widget configuration. */
28
25
  initialize(version: string | null, cdnDomain: string | null): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/client",
3
- "version": "2.0.0-develop-b2school.20250109175008",
3
+ "version": "2.0.1-develop-hotfix.1736762895570",
4
4
  "description": "Edifice TypeScript Client",
5
5
  "homepage": "https://github.com/edificeio/edifice-frontend-framework/tree/main/packages/client#readme",
6
6
  "bugs": {
@@ -30,18 +30,18 @@
30
30
  "dependencies": {
31
31
  "axios": "^1.7.7",
32
32
  "core-js": "^3.35.1",
33
- "@edifice.io/utilities": "2.0.0-develop-b2school.20250109175008"
33
+ "@edifice.io/utilities": "2.0.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/jasmine": "5.1.4",
37
- "@types/node": "^22.9.1",
37
+ "@types/node": "catalog:",
38
38
  "jasmine": "5.1.0",
39
39
  "rimraf": "5.0.5",
40
- "rollup-plugin-visualizer": "5.12.0",
40
+ "rollup-plugin-visualizer": "catalog:",
41
41
  "typedoc": "0.25.7",
42
42
  "typedoc-plugin-markdown": "3.17.1",
43
- "vite": "^5.4.11",
44
- "vite-plugin-dts": "^4.1.0"
43
+ "vite": "catalog:",
44
+ "vite-plugin-dts": "catalog:"
45
45
  },
46
46
  "scripts": {
47
47
  "build": "vite build",
@@ -1,25 +0,0 @@
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
- }
@@ -1,10 +0,0 @@
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
- }
@@ -1,69 +0,0 @@
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
- }
@@ -1,17 +0,0 @@
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
- }
@@ -1,22 +0,0 @@
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;
@@ -1,34 +0,0 @@
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
- }
@@ -1,21 +0,0 @@
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
- }
@@ -1,18 +0,0 @@
1
- import { AddBundleCallback, IIdiom } from '../configure/interfaces';
2
- export declare const defaultDiacriticsRemovalMap: {
3
- base: string;
4
- letters: RegExp;
5
- }[];
6
- export declare class Idiom implements IIdiom {
7
- translate(key: string, params?: {
8
- [param: string]: any;
9
- }): string;
10
- addBundlePromise(path: string): Promise<void>;
11
- addBundle(path: string, callback?: AddBundleCallback): void;
12
- loadBundlePromise(lang: string, path: string): Promise<void>;
13
- private loadBundle;
14
- addTranslations(folder: string, callback?: AddBundleCallback): void;
15
- addAllTranslations(folders: string[]): Promise<void>;
16
- addKeys(keys: any): void;
17
- removeAccents(str: string): string;
18
- }
@@ -1,10 +0,0 @@
1
- import { ISessionFramework } from './interfaces';
2
- import { Session } from './Session';
3
- export declare class SessionFramework implements ISessionFramework {
4
- session: Session;
5
- initialize(): Promise<void>;
6
- login(email: string, password: string, rememberMe?: boolean, secureLocation?: boolean): Promise<void>;
7
- logout(): Promise<void>;
8
- }
9
- /** The whole framework is a singleton. */
10
- export declare const session: SessionFramework;
@@ -1,34 +0,0 @@
1
- import { IEmailValidationInfos, IEmailValidationState, IMfaCodeState, IMfaInfos, IMobileValidationInfos, IMobileValidationState, IQuotaAndUsage, ISession, IUserDescription, IUserInfo, UserProfile } from './interfaces';
2
- import { App } from '../globals';
3
- export declare class Session implements ISession {
4
- private _me;
5
- private _currentLanguage;
6
- private _notLoggedIn;
7
- private _description?;
8
- private _profile?;
9
- get currentLanguage(): string;
10
- get notLoggedIn(): boolean;
11
- get description(): IUserDescription;
12
- get avatarUrl(): string;
13
- get user(): IUserInfo;
14
- get currentApp(): App | null;
15
- initialize(): Promise<void>;
16
- private setCurrentModel;
17
- hasWorkflow(workflowName: string): boolean;
18
- hasRight(resource: any, right: any): boolean;
19
- get latestQuotaAndUsage(): Promise<IQuotaAndUsage>;
20
- private setCurrentLanguage;
21
- private loadDefaultLanguage;
22
- private loadDescription;
23
- get profile(): UserProfile;
24
- getUserProfile(): Promise<UserProfile>;
25
- private loadUserLanguage;
26
- getEmailValidationInfos(): Promise<IEmailValidationInfos>;
27
- checkEmail(email: String): Promise<void>;
28
- tryEmailValidation(code: String): Promise<IEmailValidationState>;
29
- getMobileValidationInfos(): Promise<IMobileValidationInfos>;
30
- checkMobile(mobile: String): Promise<void>;
31
- tryMobileValidation(code: String): Promise<IMobileValidationState>;
32
- getMfaInfos(): Promise<IMfaInfos>;
33
- tryMfaCode(code: String): Promise<IMfaCodeState>;
34
- }
@@ -1,9 +0,0 @@
1
- import { IHttp, ITransportFramework } from './interfaces';
2
- declare class TransportFramework implements ITransportFramework {
3
- private _http;
4
- get http(): IHttp;
5
- newHttpInstance(params?: any): IHttp;
6
- }
7
- /** The whole framework is a singleton. */
8
- export declare const transport: TransportFramework;
9
- export {};
@@ -1,26 +0,0 @@
1
- import { IHttp, IHttpParams, IHttpResponse } from './interfaces';
2
- export declare class Http implements IHttp {
3
- private axios;
4
- private _latestResponse;
5
- constructor(params?: any);
6
- setCdn(cdnUrl: string): void;
7
- private toAxiosConfig;
8
- private toCdnUrl;
9
- private mapAxiosError;
10
- private mapAxiosResponse;
11
- get latestResponse(): IHttpResponse;
12
- isResponseError(): boolean;
13
- get<R = any>(url: string, params?: IHttpParams): Promise<R>;
14
- post<R = any>(url: string, data?: any, params?: IHttpParams): Promise<R>;
15
- postFile<R = any>(url: string, data: any, params?: IHttpParams): Promise<R>;
16
- postJson<R = any>(url: string, json: any, params?: IHttpParams): Promise<R>;
17
- put<R = any>(url: string, data?: any, params?: IHttpParams): Promise<R>;
18
- putJson<R = any>(url: string, json: any, params?: IHttpParams): Promise<R>;
19
- delete<R = any>(url: string, params?: IHttpParams): Promise<R>;
20
- deleteJson<R = any>(url: string, json: any): Promise<R>;
21
- getScript<R = any>(url: string, params?: IHttpParams, variableName?: string): Promise<R>;
22
- loadScript(url: string, params?: IHttpParams): Promise<void>;
23
- }
24
- /**
25
- * Promisified HTTP
26
- */
@@ -1,31 +0,0 @@
1
- import { IWidgetFramework, IWidget, WidgetUserPref, WidgetName } from './interfaces';
2
- import { IWidgetModel, WidgetPosition } from '../session/interfaces';
3
- export declare class WidgetFramework implements IWidgetFramework {
4
- private _initialized?;
5
- private _widgets;
6
- initialize(version: string | null, cdnDomain: string | null): Promise<void>;
7
- get list(): Widget[];
8
- lookup(widgetName: string): IWidget | undefined;
9
- lookupDefaultPosition(widgetName: WidgetName): WidgetPosition | undefined;
10
- private _userPrefs;
11
- get userPrefs(): IWidgetUserPrefs;
12
- private loadUserPrefs;
13
- saveUserPrefs(): Promise<void>;
14
- private applyUserPrefs;
15
- }
16
- declare class Widget implements IWidget {
17
- private _platformConf;
18
- constructor(_platformConf: IWidgetModel);
19
- get platformConf(): IWidgetModel;
20
- private _schoolConf;
21
- get schoolConf(): {};
22
- private _userPref;
23
- get userPref(): WidgetUserPref;
24
- applyUserPref(pref: WidgetUserPref): void;
25
- }
26
- interface IWidgetUserPrefs {
27
- [widgetName: string]: WidgetUserPref;
28
- }
29
- /** The whole framework is a singleton. */
30
- export declare const widgets: WidgetFramework;
31
- export {};