ode-ts-client 1.2.5 → 1.2.6

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 (66) hide show
  1. package/dist/ode-ts-client.esm.js +2212 -1942
  2. package/dist/ode-ts-client.esm.js.map +1 -1
  3. package/dist/ode-ts-client.js +4 -4
  4. package/dist/ode-ts-client.js.map +1 -1
  5. package/dist/ode-ts-client.mjs +2212 -1942
  6. package/dist/ode-ts-client.mjs.map +1 -1
  7. package/dist/test/Foundation.spec.d.ts +0 -0
  8. package/dist/{analytics → ts/analytics}/Service.d.ts +2 -2
  9. package/dist/{apps → ts/apps}/timeline/Framework.d.ts +2 -2
  10. package/dist/{apps → ts/apps}/timeline/Notification.model.d.ts +1 -1
  11. package/dist/{apps → ts/apps}/timeline/interfaces.d.ts +1 -1
  12. package/dist/{cache → ts/cache}/Service.d.ts +2 -2
  13. package/dist/{configure → ts/configure}/Analytics.d.ts +3 -3
  14. package/dist/{configure → ts/configure}/AppConf.d.ts +2 -2
  15. package/dist/{configure → ts/configure}/Framework.d.ts +6 -6
  16. package/dist/{configure → ts/configure}/Service.d.ts +3 -3
  17. package/dist/{configure → ts/configure}/Theme.d.ts +1 -1
  18. package/dist/{configure → ts/configure}/User.d.ts +3 -3
  19. package/dist/{configure → ts/configure}/interfaces.d.ts +7 -7
  20. package/dist/{directory → ts/directory}/Service.d.ts +2 -2
  21. package/dist/{explorer → ts/explorer}/interfaces.d.ts +41 -41
  22. package/dist/{globals.d.ts → ts/globals.d.ts} +2 -2
  23. package/dist/{idiom → ts/idiom}/Idiom.d.ts +1 -1
  24. package/dist/{idiom → ts/idiom}/Service.d.ts +3 -3
  25. package/dist/{idiom → ts/idiom}/interfaces.d.ts +1 -1
  26. package/dist/ts/index.cjs.d.ts +1 -0
  27. package/dist/ts/index.d.ts +10 -0
  28. package/dist/{notify → ts/notify}/Framework.d.ts +5 -5
  29. package/dist/{notify → ts/notify}/interfaces.d.ts +5 -5
  30. package/dist/{resources → ts/resources}/BlogResourceService.d.ts +3 -3
  31. package/dist/{resources → ts/resources}/MindmapResourceService.d.ts +3 -3
  32. package/dist/{resources → ts/resources}/ResourceService.d.ts +4 -4
  33. package/dist/{resources → ts/resources}/interface.d.ts +1 -1
  34. package/dist/{rights → ts/rights}/Service.d.ts +4 -4
  35. package/dist/{rights → ts/rights}/interface.d.ts +2 -2
  36. package/dist/{services → ts/services}/OdeServices.d.ts +11 -11
  37. package/dist/ts/services/index.d.ts +7 -0
  38. package/dist/{session → ts/session}/Framework.d.ts +2 -2
  39. package/dist/{session → ts/session}/Service.d.ts +4 -4
  40. package/dist/{session → ts/session}/Session.d.ts +2 -2
  41. package/dist/{session → ts/session}/interfaces.d.ts +7 -7
  42. package/dist/{share → ts/share}/Service.d.ts +5 -5
  43. package/dist/{share → ts/share}/interface.d.ts +6 -6
  44. package/dist/{transport → ts/transport}/Framework.d.ts +1 -1
  45. package/dist/{transport → ts/transport}/Http.d.ts +1 -1
  46. package/dist/{transport → ts/transport}/Service.d.ts +2 -2
  47. package/dist/{transport → ts/transport}/interfaces.d.ts +3 -3
  48. package/dist/{utils → ts/utils}/FileTypeUtils.d.ts +1 -1
  49. package/dist/{widget → ts/widget}/Framework.d.ts +2 -2
  50. package/dist/{widget → ts/widget}/interfaces.d.ts +5 -5
  51. package/dist/{workspace → ts/workspace}/Service.d.ts +2 -2
  52. package/dist/version.txt +1 -1
  53. package/package.json +6 -6
  54. package/dist/index.cjs.d.ts +0 -1
  55. package/dist/index.d.ts +0 -10
  56. package/dist/legacy/Behaviours.d.ts +0 -35
  57. package/dist/legacy/entcore.d.ts +0 -7
  58. package/dist/legacy/http.d.ts +0 -24
  59. package/dist/legacy/me.d.ts +0 -12
  60. package/dist/legacy/rights.d.ts +0 -55
  61. package/dist/services/index.d.ts +0 -7
  62. /package/dist/{directory → ts/directory}/interface.d.ts +0 -0
  63. /package/dist/{utils → ts/utils}/MimeTypeUtils.d.ts +0 -0
  64. /package/dist/{utils → ts/utils}/StringUtils.d.ts +0 -0
  65. /package/dist/{widget → ts/widget}/LastInfos.widget.d.ts +0 -0
  66. /package/dist/{workspace → ts/workspace}/interface.d.ts +0 -0
@@ -1,5 +1,5 @@
1
- import { IEmailValidationInfos, IEmailValidationState, IMfaCodeState, IMfaInfos, IMobileValidationInfos, IMobileValidationState, IQuotaAndUsage, ISession, IUserDescription, IUserInfo, UserProfile } from "./interfaces";
2
- import { App } from "../globals";
1
+ import { IEmailValidationInfos, IEmailValidationState, IMfaCodeState, IMfaInfos, IMobileValidationInfos, IMobileValidationState, IQuotaAndUsage, ISession, IUserDescription, IUserInfo, UserProfile } from './interfaces';
2
+ import { App } from '../globals';
3
3
  export declare class Session implements ISession {
4
4
  private _me;
5
5
  private _currentLanguage;
@@ -1,5 +1,5 @@
1
- import { App } from "../globals";
2
- import { WidgetName } from "../widget/interfaces";
1
+ import { App } from '../globals';
2
+ import { WidgetName } from '../widget/interfaces';
3
3
  export declare abstract class SessionFrameworkFactory {
4
4
  static instance(): ISessionFramework;
5
5
  }
@@ -66,19 +66,19 @@ export interface ISession {
66
66
  /** Send a 6-digits code to the server to validate a pending MFA. */
67
67
  tryMfaCode(code: String): Promise<IMfaCodeState>;
68
68
  }
69
- export declare type Hobby = {
69
+ export type Hobby = {
70
70
  visibility: "PRIVE" | "PUBLIC";
71
71
  category: "sport" | "cinema" | "animals" | "music" | "places" | "books";
72
72
  values: string;
73
73
  };
74
- export declare type School = {
74
+ export type School = {
75
75
  classes: Array<string>;
76
76
  id: string;
77
77
  name: string;
78
78
  UAI: string;
79
79
  exports: string[];
80
80
  };
81
- export declare type UserProfile = Array<"Student" | "Teacher" | "Relative" | "Personnel" | "Guest">;
81
+ export type UserProfile = Array<"Student" | "Teacher" | "Relative" | "Personnel" | "Guest">;
82
82
  export interface IUserDescription {
83
83
  alertSize: boolean;
84
84
  health: string;
@@ -166,7 +166,7 @@ export declare const WIDGET_POSITION: {
166
166
  readonly LEFT: "left";
167
167
  readonly RIGHT: "right";
168
168
  };
169
- export declare type WidgetPosition = (typeof WIDGET_POSITION)[keyof typeof WIDGET_POSITION];
169
+ export type WidgetPosition = (typeof WIDGET_POSITION)[keyof typeof WIDGET_POSITION];
170
170
  export interface IWidgetModel {
171
171
  application?: string;
172
172
  position?: WidgetPosition;
@@ -258,7 +258,7 @@ export interface IGetSession {
258
258
  userProfile?: UserProfile;
259
259
  bookmarkedApps: IWebApp[];
260
260
  }
261
- export declare type PersonApiResult = {
261
+ export type PersonApiResult = {
262
262
  status: "ok" | string;
263
263
  result: Array<IUserDescription>;
264
264
  };
@@ -1,11 +1,11 @@
1
- import { OdeServices } from "../services/OdeServices";
2
- import { GetResourceRightPayload, ShareMapping, ShareRightWithVisibles, PutShareResponse, ShareSubject, ShareRight, ShareRightAction, ShareRightActionDisplayName } from "./interface";
1
+ import { OdeServices } from '../services/OdeServices';
2
+ import { GetResourceRightPayload, ShareMapping, ShareRightWithVisibles, PutShareResponse, ShareSubject, ShareRight, ShareRightAction, ShareRightActionDisplayName } from './interface';
3
3
  export declare class ShareService {
4
4
  protected context: OdeServices;
5
5
  constructor(context: OdeServices);
6
- get directory(): import("../directory/Service").DirectoryService;
7
- get http(): import("../transport/Service").HttpService;
8
- get cache(): import("../cache/Service").CacheService;
6
+ get directory(): import('../directory/Service').DirectoryService;
7
+ get http(): import('../transport/Service').HttpService;
8
+ get cache(): import('../cache/Service').CacheService;
9
9
  searchShareSubjects(app: string, resourceId: string, searchText: string): Promise<ShareSubject[]>;
10
10
  getShareMapping(app: string): Promise<ShareMapping>;
11
11
  getActionsAvailableFor({ id, type }: {
@@ -1,4 +1,4 @@
1
- import { Group, Bookmark, User } from "../directory/interface";
1
+ import { Group, Bookmark, User } from '../directory/interface';
2
2
  export interface ShareRight {
3
3
  id: string;
4
4
  type: ShareRightType;
@@ -14,7 +14,7 @@ export interface ShareRight {
14
14
  /**
15
15
  * Type of share right
16
16
  * */
17
- export declare type ShareRightType = "user" | "group" | "sharebookmark";
17
+ export type ShareRightType = "user" | "group" | "sharebookmark";
18
18
  /**
19
19
  * Type of action when sharing
20
20
  * */
@@ -27,14 +27,14 @@ export interface ShareRightAction {
27
27
  /**
28
28
  * Name of current action when sharing
29
29
  * */
30
- export declare type ShareRightActionDisplayName = "read" | "contrib" | "manage" | "publish" | "manager" | "comment";
31
- export declare type ShareRightActionDisplayNameExt = ShareRightActionDisplayName | "creator";
32
- export declare type SharingRight = Record<ShareRightActionDisplayName, {
30
+ export type ShareRightActionDisplayName = "read" | "contrib" | "manage" | "publish" | "manager" | "comment";
31
+ export type ShareRightActionDisplayNameExt = ShareRightActionDisplayName | "creator";
32
+ export type SharingRight = Record<ShareRightActionDisplayName, {
33
33
  priority: number;
34
34
  default: boolean;
35
35
  requires: ShareRightActionDisplayName[];
36
36
  }>;
37
- export declare type ShareMapping = Record<ShareRightActionDisplayName, string[]>;
37
+ export type ShareMapping = Record<ShareRightActionDisplayName, string[]>;
38
38
  /**
39
39
  * Payload of shared resource
40
40
  * */
@@ -1,4 +1,4 @@
1
- import { IHttp, ITransportFramework } from "./interfaces";
1
+ import { IHttp, ITransportFramework } from './interfaces';
2
2
  declare class TransportFramework implements ITransportFramework {
3
3
  private _http;
4
4
  get http(): IHttp;
@@ -1,4 +1,4 @@
1
- import { IHttp, IHttpParams, IHttpResponse } from "./interfaces";
1
+ import { IHttp, IHttpParams, IHttpResponse } from './interfaces';
2
2
  export declare class Http implements IHttp {
3
3
  private axios;
4
4
  private _latestResponse;
@@ -1,5 +1,5 @@
1
- import { IHttpResponse, IHttpParams } from "./interfaces";
2
- import { OdeServices } from "../services/OdeServices";
1
+ import { IHttpResponse, IHttpParams } from './interfaces';
2
+ import { OdeServices } from '../services/OdeServices';
3
3
  export declare class HttpService {
4
4
  private context;
5
5
  private axios;
@@ -44,8 +44,8 @@ export interface IHttp {
44
44
  loadScript(url: string, params?: IHttpParams): Promise<void>;
45
45
  setCdn(url: string): void;
46
46
  }
47
- export declare type IHttpParamsResponseType = "arraybuffer" | "blob" | "document" | "json" | "text" | "stream";
48
- export declare type IHttpParams = {
47
+ export type IHttpParamsResponseType = "arraybuffer" | "blob" | "document" | "json" | "text" | "stream";
48
+ export type IHttpParams = {
49
49
  /** Request the API to send a notification when done. */
50
50
  readonly requestName?: string;
51
51
  /** Set to true to prevent sending notifications. */
@@ -61,7 +61,7 @@ export declare type IHttpParams = {
61
61
  /** Response Type */
62
62
  readonly responseType?: IHttpParamsResponseType;
63
63
  };
64
- export declare type IHttpResponse = {
64
+ export type IHttpResponse = {
65
65
  status: number;
66
66
  statusText: string;
67
67
  headers?: any;
@@ -3,4 +3,4 @@ export declare class FileTypeUtils {
3
3
  static registerContentTypeToFileType(mapper: ContentTypeToFileType): void;
4
4
  static getFileType(fileType: string, previewRole?: boolean, extension?: string): string;
5
5
  }
6
- export declare type ContentTypeToFileType = (contentType: string, previewRole: boolean) => string | undefined;
6
+ export type ContentTypeToFileType = (contentType: string, previewRole: boolean) => string | undefined;
@@ -1,5 +1,5 @@
1
- import { IWidgetFramework, IWidget, WidgetUserPref, WidgetName } from "./interfaces";
2
- import { IWidgetModel, WidgetPosition } from "../session/interfaces";
1
+ import { IWidgetFramework, IWidget, WidgetUserPref, WidgetName } from './interfaces';
2
+ import { IWidgetModel, WidgetPosition } from '../session/interfaces';
3
3
  export declare class WidgetFramework implements IWidgetFramework {
4
4
  private _initialized?;
5
5
  private _widgets;
@@ -1,4 +1,4 @@
1
- import { IWidgetModel, WidgetPosition } from "../session/interfaces";
1
+ import { IWidgetModel, WidgetPosition } from '../session/interfaces';
2
2
  export declare const WIDGET_NAME: {
3
3
  readonly LAST_INFOS: "last-infos-widget";
4
4
  readonly BIRTHDAY: "birthday";
@@ -23,7 +23,7 @@ export declare const WIDGET_NAME: {
23
23
  readonly CANTINE: "cantine-widget";
24
24
  readonly SCREEN_TIME: "screen-time-widget";
25
25
  };
26
- export declare type WidgetName = (typeof WIDGET_NAME)[keyof typeof WIDGET_NAME];
26
+ export type WidgetName = (typeof WIDGET_NAME)[keyof typeof WIDGET_NAME];
27
27
  export declare abstract class WidgetFrameworkFactory {
28
28
  static instance(): IWidgetFramework;
29
29
  }
@@ -43,8 +43,8 @@ export interface IWidget {
43
43
  /** The widgets conf at user level. */
44
44
  readonly userPref: WidgetUserPref;
45
45
  }
46
- export declare type WidgetSpecificUserPrefs = "schoolId";
47
- export declare type WidgetUserPref = {
46
+ export type WidgetSpecificUserPrefs = "schoolId";
47
+ export type WidgetUserPref = {
48
48
  /** Integer defining the sort order of this widget. */
49
49
  index: number;
50
50
  /** Boolean indicating wether the user wants to see this widget, or not. */
@@ -54,4 +54,4 @@ export declare type WidgetUserPref = {
54
54
  } & {
55
55
  [pref in WidgetSpecificUserPrefs]?: any;
56
56
  };
57
- export * from "./LastInfos.widget";
57
+ export * from './LastInfos.widget';
@@ -1,5 +1,5 @@
1
- import { OdeServices } from "../services/OdeServices";
2
- import { WorkspaceElement } from "./interface";
1
+ import { OdeServices } from '../services/OdeServices';
2
+ import { WorkspaceElement } from './interface';
3
3
  export declare class WorkspaceService {
4
4
  private context;
5
5
  constructor(context: OdeServices);
package/dist/version.txt CHANGED
@@ -1 +1 @@
1
- ode-ts-client= 13/02/2026 18:47:17
1
+ ode-ts-client= 18/05/2026 18:25:33
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ode-ts-client",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "Foundation frameworks by Open Digital Education",
5
5
  "homepage": "https://github.com/opendigitaleducation/ode-ts-client#readme",
6
6
  "bugs": {
@@ -16,12 +16,12 @@
16
16
  ".": {
17
17
  "require": "./dist/ode-ts-client.js",
18
18
  "import": "./dist/ode-ts-client.mjs",
19
- "types": "./dist/index.d.ts"
19
+ "types": "./dist/ts/index.d.ts"
20
20
  }
21
21
  },
22
22
  "main": "dist/ode-ts-client.js",
23
23
  "module": "dist/ode-ts-client.mjs",
24
- "types": "dist/index.d.ts",
24
+ "types": "dist/ts/index.d.ts",
25
25
  "files": [
26
26
  "dist"
27
27
  ],
@@ -41,9 +41,9 @@
41
41
  "terser": "5.16.0",
42
42
  "typedoc": "0.22.13",
43
43
  "typedoc-plugin-markdown": "3.11.14",
44
- "typescript": "4.6.4",
45
- "vite": "3.2.3",
46
- "vite-plugin-dts": "1.7.1"
44
+ "typescript": "5.2.2",
45
+ "vite": "5.1.4",
46
+ "vite-plugin-dts": "4.5.4"
47
47
  },
48
48
  "engines": {
49
49
  "node": "16 || 18"
@@ -1 +0,0 @@
1
- export * from "./index";
package/dist/index.d.ts DELETED
@@ -1,10 +0,0 @@
1
- export * from "./globals";
2
- export * from "./explorer/interfaces";
3
- export * from "./notify/interfaces";
4
- export * as RxJS from "rxjs";
5
- export * from "./transport/interfaces";
6
- export * from "./configure/interfaces";
7
- export * from "./session/interfaces";
8
- export * from "./widget/interfaces";
9
- export * from "./apps/timeline/interfaces";
10
- export * from "./services";
@@ -1,35 +0,0 @@
1
- import { Shareable } from "./rights";
2
-
3
- export interface IBehavioursActions {
4
- error(cb: Function): void;
5
- }
6
- export interface IBehavioursCopyRightsParams {
7
- provider: { resource: Shareable; application: string };
8
- target: { resources: Shareable[]; application: string };
9
- }
10
- export interface IBehavioursAppBehaviours {
11
- model: any;
12
- rights: { resource: any; workflow: any };
13
- loadResources(): Promise<any>;
14
- sniplets: any;
15
- }
16
- export declare interface IBehaviours {
17
- storedRights: any;
18
- sharingRights(): Promise<any>;
19
- appSharingRights(prefix: string): Promise<any>;
20
- copyRights(params: IBehavioursCopyRightsParams): Promise<void>;
21
- register(application: string, appBehaviours: any): void;
22
- findRights(
23
- serviceName: string,
24
- resource: IBehavioursAppBehaviours,
25
- ): Promise<any>;
26
- // @deprecated findBehaviours(serviceName, resource): void;
27
- loadBehaviours(
28
- serviceName: string,
29
- callback: (resource: IBehavioursAppBehaviours) => void,
30
- ): IBehavioursActions;
31
- load(serviceName: string): Promise<any>;
32
- findWorkflow(serviceName: string): Promise<any>;
33
- workflowsFrom(obj: any, dependencies: any): {};
34
- applicationsBehaviours: any;
35
- }
@@ -1,7 +0,0 @@
1
- import { IBehaviours } from "./Behaviours";
2
-
3
- declare interface Entcore {
4
- Behaviours: IBehaviours;
5
- }
6
- export declare var entcore: Entcore;
7
- export declare var newLogin: boolean;
@@ -1,24 +0,0 @@
1
- export declare function Http(): void;
2
- export declare var http: () => any;
3
- export declare let toFormData: (obj) => string;
4
- /**
5
- * Promisified HTTP
6
- */
7
- export declare type PromiseHttp<T> = Promise<T> & {
8
- e400: (e) => void;
9
- };
10
- export declare class HttpPromisified<T> {
11
- private inner;
12
- constructor(inner?: any);
13
- private promisify(req);
14
- get(url: string, params?: any): PromiseHttp<T>;
15
- post(url: string, params?: any): PromiseHttp<T>;
16
- postFile(url: string, data: any, params?: any): PromiseHttp<T>;
17
- postJson(url: string, json: any): PromiseHttp<T>;
18
- put(url: string, data?: any): PromiseHttp<T>;
19
- putJson(url: string, json: any): PromiseHttp<T>;
20
- delete(url: string): PromiseHttp<T>;
21
- deleteJson(url: string, json: any): PromiseHttp<T>;
22
- putFile(url: string, data: FormData, opt?: any): PromiseHttp<T>;
23
- }
24
- export declare function httpPromisy<T>(inner?: any): HttpPromisified<T>;
@@ -1,12 +0,0 @@
1
- export declare class Me {
2
- static preferences: any;
3
- static loading: any[];
4
- private static eventer;
5
- static hasWorkflowRight(workflowName: string): Promise<boolean>;
6
- static readonly session: any;
7
- static savePreference(app: string): Promise<void>;
8
- static preference(app: string): Promise<any>;
9
- static revalidateTerms(): Promise<void>;
10
- static shouldRevalidate(): Promise<{}>;
11
- static onSessionReady(): Promise<{}>;
12
- }
@@ -1,55 +0,0 @@
1
- export interface Shareable {
2
- shared: any;
3
- owner: {
4
- userId: string;
5
- displayName: string;
6
- };
7
- myRights: any;
8
- }
9
- export interface ShareVisible {
10
- id: string;
11
- name: string;
12
- groupDisplayName?: string;
13
- structureName?: string;
14
- actions?: any;
15
- }
16
- export interface ShareAction {
17
- name: string[];
18
- displayName: string;
19
- type: string;
20
- priority?: number;
21
- requires?: any;
22
- }
23
- export interface ShareInfosDetail {
24
- checked: {
25
- [key: string]: string[];
26
- };
27
- checkedInherited: {
28
- [key: string]: string[];
29
- };
30
- visibles: ShareVisible[];
31
- }
32
- export interface ShareInfos {
33
- actions: ShareAction[];
34
- groups: ShareInfosDetail;
35
- users: ShareInfosDetail;
36
- }
37
- export interface SharePayload {
38
- groups?: {
39
- [key: string]: string[];
40
- };
41
- bookmarks?: {
42
- [key: string]: string[];
43
- };
44
- users?: {
45
- [key: string]: string[];
46
- };
47
- }
48
- export declare class Rights<T extends Shareable> {
49
- private resource;
50
- constructor(resource: T);
51
- myRights: any;
52
- isOwner(): boolean;
53
- fromBehaviours(prefix?: string): Promise<any>;
54
- fromObject(obj: any, prefix: string): Promise<any>;
55
- }
@@ -1,7 +0,0 @@
1
- import { IOdeServices } from "./OdeServices";
2
- export declare const odeServices: IOdeServices;
3
- export * from "../directory/interface";
4
- export * from "../resources/interface";
5
- export * from "../rights/interface";
6
- export * from "../share/interface";
7
- export * from "../workspace/interface";
File without changes
File without changes
File without changes
File without changes