ode-ts-client 1.1.4 → 1.2.0-dev-integration.202401121615

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 (104) hide show
  1. package/dist/analytics/Service.d.ts +17 -0
  2. package/dist/{ts/apps → apps}/timeline/Framework.d.ts +0 -1
  3. package/dist/{ts/apps → apps}/timeline/Notification.model.d.ts +0 -1
  4. package/dist/{ts/apps → apps}/timeline/interfaces.d.ts +0 -1
  5. package/dist/cache/Service.d.ts +14 -0
  6. package/dist/configure/Analytics.d.ts +40 -0
  7. package/dist/{ts/configure → configure}/AppConf.d.ts +3 -1
  8. package/dist/{ts/configure → configure}/Framework.d.ts +1 -2
  9. package/dist/configure/Service.d.ts +18 -0
  10. package/dist/{ts/configure → configure}/Theme.d.ts +0 -1
  11. package/dist/{ts/configure → configure}/User.d.ts +0 -1
  12. package/dist/{ts/configure → configure}/interfaces.d.ts +23 -5
  13. package/dist/directory/Service.d.ts +17 -0
  14. package/dist/directory/interface.d.ts +53 -0
  15. package/dist/{ts/explore → explorer}/interfaces.d.ts +111 -31
  16. package/dist/{ts/globals.d.ts → globals.d.ts} +4 -3
  17. package/dist/{ts/configure → idiom}/Idiom.d.ts +6 -3
  18. package/dist/idiom/Service.d.ts +24 -0
  19. package/dist/idiom/interfaces.d.ts +22 -0
  20. package/dist/index.cjs.d.ts +1 -0
  21. package/dist/index.d.ts +10 -0
  22. package/dist/legacy/Behaviours.d.ts +35 -0
  23. package/dist/legacy/entcore.d.ts +7 -0
  24. package/dist/legacy/http.d.ts +24 -0
  25. package/dist/legacy/me.d.ts +12 -0
  26. package/dist/legacy/rights.d.ts +55 -0
  27. package/dist/{ts/notify → notify}/Framework.d.ts +0 -1
  28. package/dist/{ts/notify → notify}/interfaces.d.ts +2 -3
  29. package/dist/ode-ts-client.esm.js +7388 -0
  30. package/dist/ode-ts-client.esm.js.map +1 -0
  31. package/dist/ode-ts-client.js +16 -15
  32. package/dist/ode-ts-client.js.map +1 -1
  33. package/dist/ode-ts-client.mjs +7388 -0
  34. package/dist/ode-ts-client.mjs.map +1 -0
  35. package/dist/resources/BlogResourceService.d.ts +12 -0
  36. package/dist/resources/MindmapResourceService.d.ts +12 -0
  37. package/dist/resources/ResourceService.d.ts +56 -0
  38. package/dist/resources/interface.d.ts +72 -0
  39. package/dist/rights/Service.d.ts +78 -0
  40. package/dist/rights/interface.d.ts +16 -0
  41. package/dist/services/OdeServices.d.ts +48 -0
  42. package/dist/services/index.d.ts +7 -0
  43. package/dist/{ts/session → session}/Framework.d.ts +2 -1
  44. package/dist/session/Service.d.ts +32 -0
  45. package/dist/{ts/session → session}/Session.d.ts +5 -3
  46. package/dist/{ts/session → session}/interfaces.d.ts +32 -4
  47. package/dist/share/Service.d.ts +18 -0
  48. package/dist/share/interface.d.ts +99 -0
  49. package/dist/{ts/transport → transport}/Framework.d.ts +0 -1
  50. package/dist/{ts/transport → transport}/Http.d.ts +0 -1
  51. package/dist/transport/Service.d.ts +25 -0
  52. package/dist/{ts/transport → transport}/interfaces.d.ts +3 -1
  53. package/dist/utils/FileTypeUtils.d.ts +6 -0
  54. package/dist/utils/MimeTypeUtils.d.ts +20 -0
  55. package/dist/utils/StringUtils.d.ts +3 -0
  56. package/dist/version.txt +1 -1
  57. package/dist/{ts/widget → widget}/Framework.d.ts +0 -1
  58. package/dist/{ts/widget → widget}/LastInfos.widget.d.ts +0 -1
  59. package/dist/{ts/widget → widget}/interfaces.d.ts +2 -2
  60. package/dist/workspace/Service.d.ts +12 -0
  61. package/dist/workspace/interface.d.ts +48 -0
  62. package/package.json +46 -33
  63. package/dist/test/Foundation.spec.d.ts +0 -2
  64. package/dist/test/Foundation.spec.d.ts.map +0 -1
  65. package/dist/test/mocks/agents/MockedAgentLoader.d.ts +0 -9
  66. package/dist/test/mocks/agents/MockedAgentLoader.d.ts.map +0 -1
  67. package/dist/test/mocks/agents/MockedFolderAgent.d.ts +0 -15
  68. package/dist/test/mocks/agents/MockedFolderAgent.d.ts.map +0 -1
  69. package/dist/ts/apps/timeline/Framework.d.ts.map +0 -1
  70. package/dist/ts/apps/timeline/Notification.model.d.ts.map +0 -1
  71. package/dist/ts/apps/timeline/interfaces.d.ts.map +0 -1
  72. package/dist/ts/configure/Analytics.d.ts +0 -19
  73. package/dist/ts/configure/Analytics.d.ts.map +0 -1
  74. package/dist/ts/configure/AppConf.d.ts.map +0 -1
  75. package/dist/ts/configure/Framework.d.ts.map +0 -1
  76. package/dist/ts/configure/Idiom.d.ts.map +0 -1
  77. package/dist/ts/configure/Theme.d.ts.map +0 -1
  78. package/dist/ts/configure/User.d.ts.map +0 -1
  79. package/dist/ts/configure/interfaces.d.ts.map +0 -1
  80. package/dist/ts/explore/Agent.d.ts +0 -21
  81. package/dist/ts/explore/Agent.d.ts.map +0 -1
  82. package/dist/ts/explore/AgentLoader.d.ts +0 -15
  83. package/dist/ts/explore/AgentLoader.d.ts.map +0 -1
  84. package/dist/ts/explore/Bus.d.ts +0 -21
  85. package/dist/ts/explore/Bus.d.ts.map +0 -1
  86. package/dist/ts/explore/Context.d.ts +0 -32
  87. package/dist/ts/explore/Context.d.ts.map +0 -1
  88. package/dist/ts/explore/Framework.d.ts +0 -15
  89. package/dist/ts/explore/Framework.d.ts.map +0 -1
  90. package/dist/ts/explore/interfaces.d.ts.map +0 -1
  91. package/dist/ts/globals.d.ts.map +0 -1
  92. package/dist/ts/index.d.ts +0 -12
  93. package/dist/ts/index.d.ts.map +0 -1
  94. package/dist/ts/notify/Framework.d.ts.map +0 -1
  95. package/dist/ts/notify/interfaces.d.ts.map +0 -1
  96. package/dist/ts/session/Framework.d.ts.map +0 -1
  97. package/dist/ts/session/Session.d.ts.map +0 -1
  98. package/dist/ts/session/interfaces.d.ts.map +0 -1
  99. package/dist/ts/transport/Framework.d.ts.map +0 -1
  100. package/dist/ts/transport/Http.d.ts.map +0 -1
  101. package/dist/ts/transport/interfaces.d.ts.map +0 -1
  102. package/dist/ts/widget/Framework.d.ts.map +0 -1
  103. package/dist/ts/widget/LastInfos.widget.d.ts.map +0 -1
  104. package/dist/ts/widget/interfaces.d.ts.map +0 -1
@@ -0,0 +1,17 @@
1
+ import { IWebApp } from "../index.cjs";
2
+ import { IOdeServices } from "../services/OdeServices";
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
+ }
@@ -23,4 +23,3 @@ export declare class TimelineApp implements ITimelineApp {
23
23
  loadFlashMessages(): Promise<void>;
24
24
  markAsRead(msg: IFlashMessageModel): Promise<void>;
25
25
  }
26
- //# sourceMappingURL=Framework.d.ts.map
@@ -8,4 +8,3 @@ export declare class Notification implements ITimelineNotification {
8
8
  discard(): Promise<any>;
9
9
  report(): Promise<any>;
10
10
  }
11
- //# sourceMappingURL=Notification.model.d.ts.map
@@ -67,4 +67,3 @@ export interface IFlashMessageModel {
67
67
  readonly signature?: string;
68
68
  readonly signatureColor?: string;
69
69
  }
70
- //# sourceMappingURL=interfaces.d.ts.map
@@ -0,0 +1,14 @@
1
+ import { IHttpParams, IHttpResponse } from "../transport/interfaces";
2
+ import { OdeServices } from "../services/OdeServices";
3
+ export declare class CacheService {
4
+ private context;
5
+ constructor(context: OdeServices);
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 declare type ParamsByTrackingSystem = {
3
+ type: "none" | "internal" | "matomo" | "multiple";
4
+ internal?: ITrackingParams;
5
+ matomo?: IMatomoTrackingParams;
6
+ xiti?: IXitiTrackingParams;
7
+ };
8
+ export declare 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
+ }
@@ -1,7 +1,9 @@
1
1
  import { App } from "../globals";
2
+ import { IWebApp } from "../index.cjs";
2
3
  export declare class AppConf {
3
4
  private _publicConf;
4
5
  private _currentApp?;
6
+ private _appConf;
5
7
  /**
6
8
  * Get the currently initialized App.
7
9
  * @see getter SessionFramework.currentApp
@@ -10,6 +12,6 @@ export declare class AppConf {
10
12
  setCurrentApp(app: App): AppConf;
11
13
  initialize(app: App, alternativeApp?: boolean): Promise<void>;
12
14
  getPublicConf(app: App): Promise<any>;
15
+ getWebAppConf(app: App): Promise<IWebApp | undefined>;
13
16
  loadI18n(app: App): Promise<void>;
14
17
  }
15
- //# sourceMappingURL=AppConf.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { IConfigurationFramework } from "./interfaces";
2
2
  import { Theme } from "./Theme";
3
- import { Idiom } from "./Idiom";
3
+ import { Idiom } from "../idiom/Idiom";
4
4
  import { User } from "./User";
5
5
  import { AppConf } from "./AppConf";
6
6
  import { Analytics } from "./Analytics";
@@ -20,4 +20,3 @@ export declare class ConfigurationFramework implements IConfigurationFramework {
20
20
  }
21
21
  /** The whole framework is a singleton. */
22
22
  export declare const configure: ConfigurationFramework;
23
- //# sourceMappingURL=Framework.d.ts.map
@@ -0,0 +1,18 @@
1
+ import { IGetConf } from "./interfaces";
2
+ import { App } from "../globals";
3
+ import { IOdeServices } from "../services/OdeServices";
4
+ export declare class ConfService {
5
+ private context;
6
+ constructor(context: IOdeServices);
7
+ private get http();
8
+ private get cdnDomain();
9
+ getConf(app: App): Promise<IGetConf>;
10
+ getCdnUrl(): string | undefined;
11
+ savePreference<T>(key: string, value: T): Promise<void>;
12
+ getPreference<T>(key: string): Promise<T>;
13
+ private getThemeConf;
14
+ private getExtendedTheme;
15
+ private getApplicationsList;
16
+ private getWebAppConf;
17
+ private getTheme;
18
+ }
@@ -32,4 +32,3 @@ export declare class Theme implements ITheme {
32
32
  listSkins(): Promise<IThemeConfOverriding[]>;
33
33
  getHelpPath(): Promise<String>;
34
34
  }
35
- //# sourceMappingURL=Theme.d.ts.map
@@ -19,4 +19,3 @@ export declare class User {
19
19
  loadLanguage(): Promise<string>;
20
20
  saveLanguage(lang: string): Promise<void>;
21
21
  }
22
- //# sourceMappingURL=User.d.ts.map
@@ -18,6 +18,8 @@ export interface IConfigurationFramework {
18
18
  initialize(app: App, alternativeApp?: boolean): Promise<void>;
19
19
  /** Load and return the public conf of an app. */
20
20
  getPublicConf(app: App): Promise<any>;
21
+ /** Load and return the server conf of an app. */
22
+ getWebAppConf(app: App): Promise<IWebApp | undefined>;
21
23
  /** Load the i18n of an app. */
22
24
  loadI18n(app: App): Promise<void>;
23
25
  };
@@ -78,7 +80,7 @@ export interface IMatomoTrackingParams extends ITrackingParams {
78
80
  export interface IXitiTrackingParams {
79
81
  /** Which property of LIBELLE_SERVICE to use depends on the frontend. */
80
82
  LIBELLE_SERVICE: {
81
- 'default': string;
83
+ default: string;
82
84
  } & {
83
85
  [prop: string]: string;
84
86
  };
@@ -167,8 +169,6 @@ export declare type AddBundleCallback = () => void | Promise<void>;
167
169
  export interface IIdiom {
168
170
  /** Get the translation of a given key.
169
171
  * @param params (optional) map of key/value variables.
170
- * Ex: Given "variabilized.i18n.key"="Limit to ${limit} bytes"
171
- * translate('variabilized.i18n.key', {limit:50}) will return "Limit to 50 bytes".
172
172
  * @return the key itself when no translation exists.
173
173
  */
174
174
  translate(key: string, params?: {
@@ -187,7 +187,7 @@ export interface IIdiom {
187
187
  /** @return a new string without accentuation. */
188
188
  removeAccents(str: string): string;
189
189
  }
190
- export declare type UserPreferenceKey = typeof USER_PREFS[keyof typeof USER_PREFS] | App;
190
+ export declare type UserPreferenceKey = (typeof USER_PREFS)[keyof typeof USER_PREFS] | App;
191
191
  export interface IUserPreferences {
192
192
  data: {
193
193
  [key in UserPreferenceKey]?: any;
@@ -197,4 +197,22 @@ export interface IUserPreferences {
197
197
  update(key: UserPreferenceKey, data: any): IUserPreferences;
198
198
  save(key: UserPreferenceKey): Promise<void>;
199
199
  }
200
- //# sourceMappingURL=interfaces.d.ts.map
200
+ export interface IOdeTheme {
201
+ basePath: string;
202
+ bootstrapPath: string;
203
+ bootstrapVersion: string;
204
+ is1d: boolean;
205
+ logoutCallback: string;
206
+ skin: string;
207
+ skinName: string;
208
+ skins: Array<IThemeConfOverriding>;
209
+ themeName: string;
210
+ themeUrl: string;
211
+ }
212
+ export interface IGetConf {
213
+ applications: IWebApp[];
214
+ conf: IThemeConf;
215
+ currentApp: IWebApp | undefined;
216
+ theme: IOdeTheme;
217
+ extendedTheme: any;
218
+ }
@@ -0,0 +1,17 @@
1
+ import { OdeServices } from "../services/OdeServices";
2
+ import { Bookmark, BookmarkWithDetails, BookmarkWithMembers, Group, User } from "./interface";
3
+ export declare class DirectoryService {
4
+ private odeServices;
5
+ constructor(odeServices: OdeServices);
6
+ private get http();
7
+ private get cache();
8
+ getAvatarUrl(id: string, type: "user" | "group", size?: string): string;
9
+ getDirectoryUrl(id: string, type: "user" | "group"): string;
10
+ getBookMarks(): Promise<Bookmark[]>;
11
+ getBookMarkById(idBookmark: string): Promise<BookmarkWithDetails>;
12
+ saveBookmarks(name: string, { bookmarks, groups, users, }: {
13
+ users: string[] | User[];
14
+ groups: string[] | Group[];
15
+ bookmarks: BookmarkWithMembers[] | string[];
16
+ }): Promise<BookmarkWithMembers>;
17
+ }
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Selected User when using directory routes
3
+ */
4
+ export interface User {
5
+ id: string;
6
+ displayName: string;
7
+ profile: string;
8
+ lastName: string;
9
+ firstName: string;
10
+ login: string;
11
+ }
12
+ export interface Group {
13
+ id: string;
14
+ displayName: string;
15
+ }
16
+ /**
17
+ * Id and Name of Bookmark
18
+ */
19
+ export interface Bookmark {
20
+ id: string;
21
+ displayName: string;
22
+ }
23
+ export interface BookmarkWithMembers extends Bookmark {
24
+ members: string[];
25
+ }
26
+ export interface BookmarkWithDetails extends Bookmark {
27
+ users: User[];
28
+ groups: Group[];
29
+ }
30
+ export interface BookmarkSaveResponse {
31
+ id: string;
32
+ }
33
+ /**
34
+ * Payload when getting bookamark info
35
+ */
36
+ export interface BookmarkGetResponse {
37
+ id: string;
38
+ name: string;
39
+ groups: Array<{
40
+ id: string;
41
+ name: string;
42
+ activationCode: boolean;
43
+ groupType: string;
44
+ profile: string;
45
+ sortName: string;
46
+ }>;
47
+ users: Array<{
48
+ displayName: string;
49
+ profile: string;
50
+ id: string;
51
+ activationCode: boolean;
52
+ }>;
53
+ }
@@ -1,8 +1,6 @@
1
1
  import { Observable } from "rxjs";
2
2
  import { App } from "../globals";
3
- export declare abstract class ExplorerFrameworkFactory {
4
- static instance(): IExplorerFramework;
5
- }
3
+ import { RightRole } from "../services";
6
4
  /** Framework exploration capabilities offered to the client. */
7
5
  export interface IExplorerFramework {
8
6
  /**
@@ -94,19 +92,29 @@ export interface IExplorerContext {
94
92
  * @param folderIds Array of folders ID to delete.
95
93
  */
96
94
  delete(resourceIds: ID[], folderIds: ID[]): Promise<void>;
95
+ /**
96
+ * Trash / Untrash resources and folders.
97
+ * @param trash boolean set status trash or untrash
98
+ * @param resourceIds Array of resources ID to delete.
99
+ * @param folderIds Array of folders ID to delete.
100
+ */
101
+ trash(trash: boolean, resourceIds: ID[], folderIds: ID[]): Promise<void>;
97
102
  /** Retrieves which properties of the resource(s) are manageable. */
98
103
  manageProperties(resourceType: ResourceType, resources: IResource[]): Promise<ManagePropertiesResult>;
99
104
  /** Update managed properties. */
100
105
  updateProperties(resourceType: ResourceType, resources: IResource[], props: {
101
106
  [key in PropKeyType]?: string;
102
107
  }): Promise<UpdatePropertiesResult>;
108
+ /** Publish to Library */
109
+ publish(resourceType: ResourceType, parameters: PublishParameters): Promise<PublishResult>;
103
110
  }
104
111
  export declare const RESOURCE: {
105
112
  readonly FOLDER: "folder";
106
113
  readonly BLOG: "blog";
107
114
  readonly EXERCISE: "exercise";
115
+ readonly MINDMAP: "mindmap";
108
116
  };
109
- export declare type ResourceType = typeof RESOURCE[keyof typeof RESOURCE];
117
+ export declare type ResourceType = (typeof RESOURCE)[keyof typeof RESOURCE];
110
118
  export declare const appNameForResource: {
111
119
  [R in ResourceType]: App;
112
120
  };
@@ -119,39 +127,47 @@ export declare const ACTION: {
119
127
  readonly UPD_PROPS: "properties";
120
128
  readonly COMMENT: "comment";
121
129
  readonly DELETE: "delete";
130
+ readonly TRASH: "trash";
131
+ readonly RESTORE: "restore";
122
132
  readonly MOVE: "move";
123
133
  readonly COPY: "copy";
124
134
  readonly EXPORT: "export";
125
135
  readonly SHARE: "share";
126
- readonly PUBLISH: "publish";
127
136
  readonly PRINT: "print";
137
+ readonly PAGES_LIST: "pages_list";
138
+ readonly DISTRIBUTE: "distribute";
139
+ readonly REGISTER: "register";
140
+ readonly PUBLISH: "publish";
141
+ readonly PUBLISH_MOODLE: "publish_moodle";
128
142
  };
129
- export declare type ActionType = typeof ACTION[keyof typeof ACTION];
143
+ export declare type ActionType = (typeof ACTION)[keyof typeof ACTION];
130
144
  export declare const FOLDER: {
131
145
  readonly BIN: "bin";
132
146
  readonly DEFAULT: "default";
133
147
  };
134
- export declare type FolderType = typeof FOLDER[keyof typeof FOLDER];
148
+ export declare type FolderType = (typeof FOLDER)[keyof typeof FOLDER];
135
149
  export declare const BOOLEAN_FILTER: {
136
150
  readonly OWNER: "owner";
137
151
  readonly SHARED: "shared";
138
152
  readonly PUBLIC: "public";
139
153
  readonly FAVORITE: "favorite";
140
154
  };
141
- export declare type BooleanFilterType = typeof BOOLEAN_FILTER[keyof typeof BOOLEAN_FILTER];
155
+ export declare type BooleanFilterType = (typeof BOOLEAN_FILTER)[keyof typeof BOOLEAN_FILTER];
142
156
  export declare const STRING_FILTER: {};
143
- export declare type StringFilterType = typeof STRING_FILTER[keyof typeof STRING_FILTER];
157
+ export declare type StringFilterType = (typeof STRING_FILTER)[keyof typeof STRING_FILTER];
144
158
  export declare const SORT_ORDER: {
145
159
  readonly ASC: "asc";
146
160
  readonly DESC: "desc";
147
161
  };
148
- export declare type SortOrderType = typeof SORT_ORDER[keyof typeof SORT_ORDER];
162
+ export declare type SortOrderType = (typeof SORT_ORDER)[keyof typeof SORT_ORDER];
149
163
  export declare const SORT_BY: {
150
164
  readonly NAME: "name";
151
- readonly MODIFY_DATE: "modifiedAt";
152
- readonly VIEWS: "views";
165
+ readonly MODIFY_DATE: "updatedAt";
166
+ readonly CREATEDAT: "createdAt";
167
+ readonly APPLICATION: "application";
168
+ readonly RESOURCE_TYPE: "resourceType";
153
169
  };
154
- export declare type SortByType = typeof SORT_BY[keyof typeof SORT_BY];
170
+ export declare type SortByType = (typeof SORT_BY)[keyof typeof SORT_BY];
155
171
  export declare type ID = string;
156
172
  export declare type StringFilterValue = {
157
173
  value: string;
@@ -164,23 +180,23 @@ export declare const PROP_KEY: {
164
180
  readonly DESCRIPTION: "description";
165
181
  readonly URL: "url";
166
182
  };
167
- export declare type PropKeyType = typeof PROP_KEY[keyof typeof PROP_KEY];
183
+ export declare type PropKeyType = (typeof PROP_KEY)[keyof typeof PROP_KEY];
168
184
  export declare const PROP_MODE: {
169
185
  readonly READONLY: "RO";
170
186
  readonly READWRITE: "RW";
171
187
  };
172
- export declare type PropModeType = typeof PROP_MODE[keyof typeof PROP_MODE];
188
+ export declare type PropModeType = (typeof PROP_MODE)[keyof typeof PROP_MODE];
173
189
  export declare const PROP_TYPE: {
174
190
  readonly TEXT: "text";
175
191
  readonly NUMBER: "number";
176
192
  readonly DATE: "date";
177
193
  readonly IMAGE: "image";
178
194
  };
179
- export declare type PropTypeType = typeof PROP_TYPE[keyof typeof PROP_TYPE];
195
+ export declare type PropTypeType = (typeof PROP_TYPE)[keyof typeof PROP_TYPE];
180
196
  export declare const PROP_FORMAT: {
181
197
  readonly PLAIN: "plain";
182
198
  };
183
- export declare type PropFormatType = typeof PROP_FORMAT[keyof typeof PROP_FORMAT];
199
+ export declare type PropFormatType = (typeof PROP_FORMAT)[keyof typeof PROP_FORMAT];
184
200
  export declare type SearchResultHandler = (input: IActionParameters, output: IActionResult) => void;
185
201
  export interface ISearchParameters {
186
202
  types: ResourceType[];
@@ -189,27 +205,35 @@ export interface ISearchParameters {
189
205
  orders?: OrderValues;
190
206
  pagination: IPagination;
191
207
  search?: String;
208
+ trashed?: boolean;
192
209
  }
193
210
  export interface ISearchResults {
194
211
  folders: IFolder[];
195
212
  pagination: IPagination;
196
213
  resources: IResource[];
214
+ searchConfig?: {
215
+ minLength: number;
216
+ };
197
217
  }
198
218
  export interface IContext extends ISearchResults {
199
- filters: IFilter[];
200
- orders: IOrder[];
201
- actions: IAction[];
202
219
  preferences: IPreferences;
203
220
  }
204
221
  export interface IAction {
205
222
  id: ActionType;
206
223
  available: boolean;
224
+ target?: "actionbar";
225
+ workflow: string;
226
+ right?: RightRole;
207
227
  }
208
228
  export interface IFolder {
209
229
  id: ID;
230
+ parentId: ID;
210
231
  name: string;
211
232
  type: FolderType | ID;
212
233
  childNumber: number;
234
+ trashed: boolean;
235
+ rights: string[];
236
+ ancestors: string[];
213
237
  }
214
238
  export interface IFilter {
215
239
  id: BooleanFilterType | StringFilterType;
@@ -231,23 +255,31 @@ export interface IProperty {
231
255
  i18n?: string;
232
256
  }
233
257
  export interface IResource {
234
- id: ID;
235
- name: string;
236
- thumbnail: string;
237
258
  application: App;
259
+ assetId: string;
260
+ creatorId: string;
261
+ creatorName: string;
262
+ comments?: number;
238
263
  createdAt: string;
239
- authorId: string;
240
- authorName: string;
264
+ favorite?: boolean;
265
+ folderIds?: ID[];
266
+ id: ID;
267
+ modifiedAt: string;
241
268
  modifierId: ID;
242
269
  modifierName: string;
243
- modifiedAt: string;
244
- folderId?: ID;
270
+ name: string;
271
+ slug?: string;
245
272
  public?: boolean;
246
273
  shared?: boolean;
247
- favorite?: boolean;
274
+ thumbnail: string;
275
+ updatedAt: string;
248
276
  views?: number;
249
- comments?: number;
277
+ trashed: boolean;
278
+ trashedBy?: string[];
279
+ rights: RightStringified[];
280
+ description: string;
250
281
  }
282
+ export declare type RightStringified = string;
251
283
  export interface IPreferences {
252
284
  view: "card" | "list";
253
285
  }
@@ -268,17 +300,35 @@ export declare type UpdateFolderParameters = IActionParameters & {
268
300
  parentId: ID | "default";
269
301
  name: string;
270
302
  };
303
+ export declare type OpenParameters = IActionParameters & {
304
+ resourceId: ID;
305
+ };
306
+ export declare type PrintParameters = IActionParameters & {
307
+ resourceId: ID;
308
+ withComments?: boolean;
309
+ };
271
310
  export declare type CopyParameters = IActionParameters & {
311
+ application: string;
272
312
  folderId: ID;
273
313
  resourceIds: ID[];
274
314
  folderIds: ID[];
275
315
  };
276
316
  export declare type MoveParameters = IActionParameters & {
317
+ application: string;
277
318
  folderId: ID;
278
319
  resourceIds: ID[];
279
320
  folderIds: ID[];
280
321
  };
281
322
  export declare type DeleteParameters = IActionParameters & {
323
+ application: string;
324
+ resourceType: string;
325
+ resourceIds: ID[];
326
+ folderIds: ID[];
327
+ };
328
+ export declare type TrashParameters = IActionParameters & {
329
+ trash: boolean;
330
+ application: string;
331
+ resourceType: string;
282
332
  resourceIds: ID[];
283
333
  folderIds: ID[];
284
334
  };
@@ -291,6 +341,23 @@ export declare type UpdatePropertiesParameters = IActionParameters & {
291
341
  [key in PropKeyType]?: string;
292
342
  };
293
343
  };
344
+ export declare type PublishParameters = IActionParameters & {
345
+ userId: string | undefined;
346
+ title: string;
347
+ cover: Blob;
348
+ language: string;
349
+ activityType: string[];
350
+ subjectArea: string[];
351
+ age: [string, string];
352
+ description: string;
353
+ keyWords: string;
354
+ application: string | undefined;
355
+ licence: string;
356
+ teacherAvatar: Blob;
357
+ resourceId: string;
358
+ resourceEntId: string;
359
+ userStructureName: string;
360
+ };
294
361
  export declare type FilterValues = {
295
362
  [B in BooleanFilterType]?: boolean;
296
363
  } & {
@@ -310,6 +377,7 @@ export declare type GetSubFoldersResult = IActionResult & {
310
377
  };
311
378
  export declare type CreateFolderResult = IActionResult & IFolder & {
312
379
  createdAt: string;
380
+ creator_id?: string;
313
381
  };
314
382
  export declare type UpdateFolderResult = CreateFolderResult & {
315
383
  updatedAt: string;
@@ -321,6 +389,19 @@ export declare type ManagePropertiesResult = IActionResult & {
321
389
  export declare type UpdatePropertiesResult = IActionResult & {
322
390
  resources: IResource[];
323
391
  };
392
+ export declare type PublishResult = IActionResult & {
393
+ details: {
394
+ application: string;
395
+ created_at: string;
396
+ description: string;
397
+ front_url: string;
398
+ id: string;
399
+ title: string;
400
+ };
401
+ message: string;
402
+ reason: string;
403
+ success: boolean;
404
+ };
324
405
  export interface IBus {
325
406
  /**
326
407
  * Ask any agent on the bus to perform an action on a type of resource.
@@ -334,7 +415,7 @@ export interface IBus {
334
415
  * Subscribe to ActionResults any agent produces for a given ResourceType and ActionType.
335
416
  * @param res The type of resource in concern.
336
417
  * @param action The action in concern.
337
- * @return A stream of {input:IActionParameters, output:IActionResult}
418
+ * @return A stream of IActionParameters and IActionResult
338
419
  */
339
420
  subscribe(res: ResourceType, action: ActionType): Observable<{
340
421
  input: IActionParameters;
@@ -349,4 +430,3 @@ export interface IBusAgent {
349
430
  /** Ask this agent to resolve an action. */
350
431
  activate(res: ResourceType, action: ActionType, parameters: IActionParameters): Promise<IActionResult>;
351
432
  }
352
- //# sourceMappingURL=interfaces.d.ts.map
@@ -8,8 +8,9 @@ export declare const ERROR_CODE: {
8
8
  readonly TRANSPORT_ERROR: "0060";
9
9
  readonly TIME_OUT: "0070";
10
10
  readonly MALFORMED_DATA: "0080";
11
+ readonly NOT_LOGGED_IN: "0090";
11
12
  };
12
- export declare type ErrorCode = typeof ERROR_CODE[keyof typeof ERROR_CODE];
13
+ export declare type ErrorCode = (typeof ERROR_CODE)[keyof typeof ERROR_CODE];
13
14
  export declare const APP: {
14
15
  readonly EXPLORER: "explorer";
15
16
  readonly PORTAL: "portal";
@@ -18,8 +19,9 @@ export declare const APP: {
18
19
  readonly TIMELINE: "timeline";
19
20
  readonly CAS: "cas";
20
21
  readonly VIDEO: "video";
22
+ readonly MINDMAP: "mindmap";
21
23
  };
22
- export declare type App = typeof APP[keyof typeof APP];
24
+ export declare type App = (typeof APP)[keyof typeof APP];
23
25
  export declare const USER_PREFS: {
24
26
  readonly APPS: "apps";
25
27
  readonly WIDGETS: "widgets";
@@ -29,4 +31,3 @@ export declare const USER_PREFS: {
29
31
  readonly INFOTIP: "infotip";
30
32
  readonly RGPD_COOKIES: "rgpdCookies";
31
33
  };
32
- //# sourceMappingURL=globals.d.ts.map
@@ -1,15 +1,18 @@
1
- import { AddBundleCallback, IIdiom } from "./interfaces";
1
+ import { AddBundleCallback, IIdiom } from "../configure/interfaces";
2
+ export declare const defaultDiacriticsRemovalMap: {
3
+ base: string;
4
+ letters: RegExp;
5
+ }[];
2
6
  export declare class Idiom implements IIdiom {
3
7
  translate(key: string, params?: {
4
8
  [param: string]: any;
5
9
  }): string;
6
10
  addBundlePromise(path: string): Promise<void>;
7
11
  addBundle(path: string, callback?: AddBundleCallback): void;
8
- private loadBundlePromise;
12
+ loadBundlePromise(lang: string, path: string): Promise<void>;
9
13
  private loadBundle;
10
14
  addTranslations(folder: string, callback?: AddBundleCallback): void;
11
15
  addAllTranslations(folders: string[]): Promise<void>;
12
16
  addKeys(keys: any): void;
13
17
  removeAccents(str: string): string;
14
18
  }
15
- //# sourceMappingURL=Idiom.d.ts.map
@@ -0,0 +1,24 @@
1
+ import { AddBundleCallback, IIdiom } from "./interfaces";
2
+ import { IOdeServices } from "../services/OdeServices";
3
+ import { App } from "../globals";
4
+ export declare const defaultDiacriticsRemovalMap: {
5
+ base: string;
6
+ letters: RegExp;
7
+ }[];
8
+ export declare class IdiomService implements IIdiom {
9
+ private context;
10
+ constructor(context: IOdeServices);
11
+ private get http();
12
+ getIdiom(currentLanguage: string, app: App): Promise<any>;
13
+ translate(key: string, params?: {
14
+ [param: string]: any;
15
+ }): string;
16
+ addBundlePromise(currentLanguage: string, path: string): Promise<void>;
17
+ addBundle(currentLanguage: string, path: string, callback?: AddBundleCallback): void;
18
+ loadBundlePromise(currentLanguage: string, path: string): Promise<void>;
19
+ private loadBundle;
20
+ addTranslations(folder: string, callback?: AddBundleCallback): void;
21
+ addAllTranslations(folders: string[]): Promise<void>;
22
+ addKeys(keys: any): void;
23
+ removeAccents(str: string): string;
24
+ }