ode-ts-client 1.1.3 → 1.1.4-dev.202306051713

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 (102) hide show
  1. package/dist/agents/blog.agent.d.ts +2 -0
  2. package/dist/agents/folder.agent.d.ts +2 -0
  3. package/dist/agents/index.d.ts +4 -0
  4. package/dist/{ts/apps → apps}/timeline/Framework.d.ts +0 -1
  5. package/dist/{ts/apps → apps}/timeline/Notification.model.d.ts +0 -1
  6. package/dist/{ts/apps → apps}/timeline/interfaces.d.ts +0 -1
  7. package/dist/cache/Service.d.ts +14 -0
  8. package/dist/{ts/configure → configure}/Analytics.d.ts +0 -1
  9. package/dist/{ts/configure → configure}/AppConf.d.ts +3 -1
  10. package/dist/{ts/configure → configure}/Framework.d.ts +1 -2
  11. package/dist/configure/Service.d.ts +17 -0
  12. package/dist/{ts/configure → configure}/Theme.d.ts +0 -1
  13. package/dist/{ts/configure → configure}/User.d.ts +0 -1
  14. package/dist/{ts/configure → configure}/interfaces.d.ts +24 -5
  15. package/dist/directory/Service.d.ts +17 -0
  16. package/dist/directory/interface.d.ts +53 -0
  17. package/dist/{ts/explore → explore}/Agent.d.ts +0 -1
  18. package/dist/{ts/explore → explore}/AgentLoader.d.ts +0 -2
  19. package/dist/{ts/explore → explore}/Bus.d.ts +0 -1
  20. package/dist/{ts/explore → explore}/Context.d.ts +3 -2
  21. package/dist/{ts/explore → explore}/Framework.d.ts +2 -2
  22. package/dist/{ts/explore → explore}/interfaces.d.ts +105 -28
  23. package/dist/{ts/globals.d.ts → globals.d.ts} +3 -3
  24. package/dist/{ts/configure → idiom}/Idiom.d.ts +6 -3
  25. package/dist/idiom/Service.d.ts +24 -0
  26. package/dist/idiom/interfaces.d.ts +22 -0
  27. package/dist/index.cjs.d.ts +1 -0
  28. package/dist/index.d.ts +10 -0
  29. package/dist/legacy/Behaviours.d.ts +35 -0
  30. package/dist/legacy/entcore.d.ts +7 -0
  31. package/dist/legacy/http.d.ts +24 -0
  32. package/dist/legacy/me.d.ts +12 -0
  33. package/dist/legacy/rights.d.ts +55 -0
  34. package/dist/{ts/notify → notify}/Framework.d.ts +0 -1
  35. package/dist/{ts/notify → notify}/interfaces.d.ts +2 -3
  36. package/dist/ode-ts-client.js +16 -15
  37. package/dist/ode-ts-client.js.map +1 -1
  38. package/dist/ode-ts-client.mjs +7701 -0
  39. package/dist/ode-ts-client.mjs.map +1 -0
  40. package/dist/resources/BlogResourceService.d.ts +11 -0
  41. package/dist/resources/ResourceService.d.ts +55 -0
  42. package/dist/resources/interface.d.ts +26 -0
  43. package/dist/rights/Service.d.ts +78 -0
  44. package/dist/rights/interface.d.ts +16 -0
  45. package/dist/services/OdeServices.d.ts +44 -0
  46. package/dist/services/index.d.ts +7 -0
  47. package/dist/{ts/session → session}/Framework.d.ts +2 -1
  48. package/dist/session/Service.d.ts +32 -0
  49. package/dist/{ts/session → session}/Session.d.ts +10 -3
  50. package/dist/{ts/session → session}/interfaces.d.ts +81 -4
  51. package/dist/share/Service.d.ts +18 -0
  52. package/dist/share/interface.d.ts +99 -0
  53. package/dist/{ts/transport → transport}/Framework.d.ts +0 -1
  54. package/dist/{ts/transport → transport}/Http.d.ts +0 -1
  55. package/dist/transport/Service.d.ts +25 -0
  56. package/dist/{ts/transport → transport}/interfaces.d.ts +3 -1
  57. package/dist/utils/FileTypeUtils.d.ts +6 -0
  58. package/dist/utils/MimeTypeUtils.d.ts +20 -0
  59. package/dist/utils/StringUtils.d.ts +3 -0
  60. package/dist/version.txt +1 -1
  61. package/dist/{ts/widget → widget}/Framework.d.ts +0 -1
  62. package/dist/{ts/widget → widget}/LastInfos.widget.d.ts +0 -1
  63. package/dist/{ts/widget → widget}/interfaces.d.ts +1 -2
  64. package/dist/workspace/Service.d.ts +12 -0
  65. package/dist/workspace/interface.d.ts +48 -0
  66. package/package.json +40 -30
  67. package/dist/test/Foundation.spec.d.ts +0 -2
  68. package/dist/test/Foundation.spec.d.ts.map +0 -1
  69. package/dist/test/mocks/agents/MockedAgentLoader.d.ts +0 -9
  70. package/dist/test/mocks/agents/MockedAgentLoader.d.ts.map +0 -1
  71. package/dist/test/mocks/agents/MockedFolderAgent.d.ts +0 -15
  72. package/dist/test/mocks/agents/MockedFolderAgent.d.ts.map +0 -1
  73. package/dist/ts/apps/timeline/Framework.d.ts.map +0 -1
  74. package/dist/ts/apps/timeline/Notification.model.d.ts.map +0 -1
  75. package/dist/ts/apps/timeline/interfaces.d.ts.map +0 -1
  76. package/dist/ts/configure/Analytics.d.ts.map +0 -1
  77. package/dist/ts/configure/AppConf.d.ts.map +0 -1
  78. package/dist/ts/configure/Framework.d.ts.map +0 -1
  79. package/dist/ts/configure/Idiom.d.ts.map +0 -1
  80. package/dist/ts/configure/Theme.d.ts.map +0 -1
  81. package/dist/ts/configure/User.d.ts.map +0 -1
  82. package/dist/ts/configure/interfaces.d.ts.map +0 -1
  83. package/dist/ts/explore/Agent.d.ts.map +0 -1
  84. package/dist/ts/explore/AgentLoader.d.ts.map +0 -1
  85. package/dist/ts/explore/Bus.d.ts.map +0 -1
  86. package/dist/ts/explore/Context.d.ts.map +0 -1
  87. package/dist/ts/explore/Framework.d.ts.map +0 -1
  88. package/dist/ts/explore/interfaces.d.ts.map +0 -1
  89. package/dist/ts/globals.d.ts.map +0 -1
  90. package/dist/ts/index.d.ts +0 -12
  91. package/dist/ts/index.d.ts.map +0 -1
  92. package/dist/ts/notify/Framework.d.ts.map +0 -1
  93. package/dist/ts/notify/interfaces.d.ts.map +0 -1
  94. package/dist/ts/session/Framework.d.ts.map +0 -1
  95. package/dist/ts/session/Session.d.ts.map +0 -1
  96. package/dist/ts/session/interfaces.d.ts.map +0 -1
  97. package/dist/ts/transport/Framework.d.ts.map +0 -1
  98. package/dist/ts/transport/Http.d.ts.map +0 -1
  99. package/dist/ts/transport/interfaces.d.ts.map +0 -1
  100. package/dist/ts/widget/Framework.d.ts.map +0 -1
  101. package/dist/ts/widget/LastInfos.widget.d.ts.map +0 -1
  102. package/dist/ts/widget/interfaces.d.ts.map +0 -1
@@ -0,0 +1,2 @@
1
+ import { AgentFactory } from ".";
2
+ export declare const factory: AgentFactory;
@@ -0,0 +1,2 @@
1
+ import { AgentFactory } from ".";
2
+ export declare const factory: AgentFactory;
@@ -0,0 +1,4 @@
1
+ import { IBusAgent } from "..";
2
+ export declare type AgentFactory = () => IBusAgent;
3
+ export { factory as blogAgentFactory } from "./blog.agent";
4
+ export { factory as folderAgentFactory } from "./folder.agent";
@@ -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
+ }
@@ -16,4 +16,3 @@ export declare class Analytics {
16
16
  /** 2021 implementation of XiTi. */
17
17
  private initializeXiti;
18
18
  }
19
- //# sourceMappingURL=Analytics.d.ts.map
@@ -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,17 @@
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 getApplicationsList;
15
+ private getWebAppConf;
16
+ private getTheme;
17
+ }
@@ -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,23 @@ 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
+ bootstrap: string;
203
+ bootstrapPath: string;
204
+ bootstrapUrl: string;
205
+ bootstrapVersion: string;
206
+ is1d: boolean;
207
+ logoutCallback: string;
208
+ skin: string;
209
+ skinName: string;
210
+ skins: Array<IThemeConfOverriding>;
211
+ themeName: string;
212
+ themeUrl: string;
213
+ }
214
+ export interface IGetConf {
215
+ applications: IWebApp[];
216
+ conf: IThemeConf;
217
+ currentApp: IWebApp | undefined;
218
+ theme: IOdeTheme;
219
+ }
@@ -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
+ }
@@ -18,4 +18,3 @@ export declare abstract class AbstractBusAgent implements IBusAgent {
18
18
  protected abstract registerHandlers(): void;
19
19
  activate(res: ResourceType, action: ActionType, parameters: IActionParameters): Promise<IActionResult>;
20
20
  }
21
- //# sourceMappingURL=Agent.d.ts.map
@@ -9,7 +9,5 @@ export interface IAgentLoader {
9
9
  * Default implementation of the loader.
10
10
  */
11
11
  export declare class AgentLoader implements IAgentLoader {
12
- private http;
13
12
  load(res: ResourceType): Promise<void>;
14
13
  }
15
- //# sourceMappingURL=AgentLoader.d.ts.map
@@ -18,4 +18,3 @@ export declare class BusFactory {
18
18
  static get instance(): Bus;
19
19
  }
20
20
  export {};
21
- //# sourceMappingURL=Bus.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { Observable } from "rxjs";
2
2
  import { App } from "../globals";
3
- import { IContext, IExplorerContext, ISearchParameters, ResourceType, GetResourcesResult, GetSubFoldersResult, CreateFolderResult, UpdateFolderResult, ID, ISearchResults, IResource, ManagePropertiesResult, UpdatePropertiesResult, PropKeyType } from "./interfaces";
3
+ import { IContext, IExplorerContext, ISearchParameters, ResourceType, GetResourcesResult, GetSubFoldersResult, CreateFolderResult, UpdateFolderResult, ID, ISearchResults, IResource, ManagePropertiesResult, UpdatePropertiesResult, PropKeyType, PublishParameters, PublishResult } from "./interfaces";
4
4
  export declare class ExplorerContext implements IExplorerContext {
5
5
  private searchParameters;
6
6
  private context;
@@ -24,9 +24,10 @@ export declare class ExplorerContext implements IExplorerContext {
24
24
  copy(targetId: string, resourceIds: ID[], folderIds: ID[]): Promise<void>;
25
25
  move(targetId: string, resourceIds: ID[], folderIds: ID[]): Promise<void>;
26
26
  delete(resourceIds: string[], folderIds: string[]): Promise<void>;
27
+ trash(trash: boolean, resourceIds: string[], folderIds: string[]): Promise<void>;
27
28
  manageProperties(resourceType: ResourceType, resources: IResource[]): Promise<ManagePropertiesResult>;
28
29
  updateProperties(resourceType: ResourceType, resources: IResource[], props: {
29
30
  [key in PropKeyType]?: string;
30
31
  }): Promise<UpdatePropertiesResult>;
32
+ publish(resourceType: ResourceType, parameters: PublishParameters): Promise<PublishResult>;
31
33
  }
32
- //# sourceMappingURL=Context.d.ts.map
@@ -3,7 +3,8 @@ import { App } from "../globals";
3
3
  import { IAgentLoader } from "./AgentLoader";
4
4
  import { ActionType, IBus, IExplorerContext, IExplorerFramework, ResourceType } from "./interfaces";
5
5
  export declare class ExplorerFramework implements IExplorerFramework {
6
- private agentLoader;
6
+ private _agentLoader?;
7
+ get agentLoader(): IAgentLoader;
7
8
  setAgentLoader(loader: IAgentLoader): void;
8
9
  /** Load the agent dedicated to resolve this @param action on this @param resource */
9
10
  requestAgentFor(resource: ResourceType, action: ActionType): Promise<IBusAgent>;
@@ -12,4 +13,3 @@ export declare class ExplorerFramework implements IExplorerFramework {
12
13
  }
13
14
  /** The whole framework is a singleton. */
14
15
  export declare const explorer: IExplorerFramework;
15
- //# sourceMappingURL=Framework.d.ts.map
@@ -1,5 +1,6 @@
1
1
  import { Observable } from "rxjs";
2
2
  import { App } from "../globals";
3
+ import { RightRole } from "../services";
3
4
  export declare abstract class ExplorerFrameworkFactory {
4
5
  static instance(): IExplorerFramework;
5
6
  }
@@ -94,19 +95,28 @@ export interface IExplorerContext {
94
95
  * @param folderIds Array of folders ID to delete.
95
96
  */
96
97
  delete(resourceIds: ID[], folderIds: ID[]): Promise<void>;
98
+ /**
99
+ * Trash / Untrash resources and folders.
100
+ * @param trash boolean set status trash or untrash
101
+ * @param resourceIds Array of resources ID to delete.
102
+ * @param folderIds Array of folders ID to delete.
103
+ */
104
+ trash(trash: boolean, resourceIds: ID[], folderIds: ID[]): Promise<void>;
97
105
  /** Retrieves which properties of the resource(s) are manageable. */
98
106
  manageProperties(resourceType: ResourceType, resources: IResource[]): Promise<ManagePropertiesResult>;
99
107
  /** Update managed properties. */
100
108
  updateProperties(resourceType: ResourceType, resources: IResource[], props: {
101
109
  [key in PropKeyType]?: string;
102
110
  }): Promise<UpdatePropertiesResult>;
111
+ /** Publish to Library */
112
+ publish(resourceType: ResourceType, parameters: PublishParameters): Promise<PublishResult>;
103
113
  }
104
114
  export declare const RESOURCE: {
105
115
  readonly FOLDER: "folder";
106
116
  readonly BLOG: "blog";
107
117
  readonly EXERCISE: "exercise";
108
118
  };
109
- export declare type ResourceType = typeof RESOURCE[keyof typeof RESOURCE];
119
+ export declare type ResourceType = (typeof RESOURCE)[keyof typeof RESOURCE];
110
120
  export declare const appNameForResource: {
111
121
  [R in ResourceType]: App;
112
122
  };
@@ -119,39 +129,47 @@ export declare const ACTION: {
119
129
  readonly UPD_PROPS: "properties";
120
130
  readonly COMMENT: "comment";
121
131
  readonly DELETE: "delete";
132
+ readonly TRASH: "trash";
133
+ readonly RESTORE: "restore";
122
134
  readonly MOVE: "move";
123
135
  readonly COPY: "copy";
124
136
  readonly EXPORT: "export";
125
137
  readonly SHARE: "share";
126
- readonly PUBLISH: "publish";
127
138
  readonly PRINT: "print";
139
+ readonly PAGES_LIST: "pages_list";
140
+ readonly DISTRIBUTE: "distribute";
141
+ readonly REGISTER: "register";
142
+ readonly PUBLISH: "publish";
143
+ readonly PUBLISH_MOODLE: "publish_moodle";
128
144
  };
129
- export declare type ActionType = typeof ACTION[keyof typeof ACTION];
145
+ export declare type ActionType = (typeof ACTION)[keyof typeof ACTION];
130
146
  export declare const FOLDER: {
131
147
  readonly BIN: "bin";
132
148
  readonly DEFAULT: "default";
133
149
  };
134
- export declare type FolderType = typeof FOLDER[keyof typeof FOLDER];
150
+ export declare type FolderType = (typeof FOLDER)[keyof typeof FOLDER];
135
151
  export declare const BOOLEAN_FILTER: {
136
152
  readonly OWNER: "owner";
137
153
  readonly SHARED: "shared";
138
154
  readonly PUBLIC: "public";
139
155
  readonly FAVORITE: "favorite";
140
156
  };
141
- export declare type BooleanFilterType = typeof BOOLEAN_FILTER[keyof typeof BOOLEAN_FILTER];
157
+ export declare type BooleanFilterType = (typeof BOOLEAN_FILTER)[keyof typeof BOOLEAN_FILTER];
142
158
  export declare const STRING_FILTER: {};
143
- export declare type StringFilterType = typeof STRING_FILTER[keyof typeof STRING_FILTER];
159
+ export declare type StringFilterType = (typeof STRING_FILTER)[keyof typeof STRING_FILTER];
144
160
  export declare const SORT_ORDER: {
145
161
  readonly ASC: "asc";
146
162
  readonly DESC: "desc";
147
163
  };
148
- export declare type SortOrderType = typeof SORT_ORDER[keyof typeof SORT_ORDER];
164
+ export declare type SortOrderType = (typeof SORT_ORDER)[keyof typeof SORT_ORDER];
149
165
  export declare const SORT_BY: {
150
166
  readonly NAME: "name";
151
- readonly MODIFY_DATE: "modifiedAt";
152
- readonly VIEWS: "views";
167
+ readonly MODIFY_DATE: "updatedAt";
168
+ readonly CREATEDAT: "createdAt";
169
+ readonly APPLICATION: "application";
170
+ readonly RESOURCE_TYPE: "resourceType";
153
171
  };
154
- export declare type SortByType = typeof SORT_BY[keyof typeof SORT_BY];
172
+ export declare type SortByType = (typeof SORT_BY)[keyof typeof SORT_BY];
155
173
  export declare type ID = string;
156
174
  export declare type StringFilterValue = {
157
175
  value: string;
@@ -164,23 +182,23 @@ export declare const PROP_KEY: {
164
182
  readonly DESCRIPTION: "description";
165
183
  readonly URL: "url";
166
184
  };
167
- export declare type PropKeyType = typeof PROP_KEY[keyof typeof PROP_KEY];
185
+ export declare type PropKeyType = (typeof PROP_KEY)[keyof typeof PROP_KEY];
168
186
  export declare const PROP_MODE: {
169
187
  readonly READONLY: "RO";
170
188
  readonly READWRITE: "RW";
171
189
  };
172
- export declare type PropModeType = typeof PROP_MODE[keyof typeof PROP_MODE];
190
+ export declare type PropModeType = (typeof PROP_MODE)[keyof typeof PROP_MODE];
173
191
  export declare const PROP_TYPE: {
174
192
  readonly TEXT: "text";
175
193
  readonly NUMBER: "number";
176
194
  readonly DATE: "date";
177
195
  readonly IMAGE: "image";
178
196
  };
179
- export declare type PropTypeType = typeof PROP_TYPE[keyof typeof PROP_TYPE];
197
+ export declare type PropTypeType = (typeof PROP_TYPE)[keyof typeof PROP_TYPE];
180
198
  export declare const PROP_FORMAT: {
181
199
  readonly PLAIN: "plain";
182
200
  };
183
- export declare type PropFormatType = typeof PROP_FORMAT[keyof typeof PROP_FORMAT];
201
+ export declare type PropFormatType = (typeof PROP_FORMAT)[keyof typeof PROP_FORMAT];
184
202
  export declare type SearchResultHandler = (input: IActionParameters, output: IActionResult) => void;
185
203
  export interface ISearchParameters {
186
204
  types: ResourceType[];
@@ -189,6 +207,7 @@ export interface ISearchParameters {
189
207
  orders?: OrderValues;
190
208
  pagination: IPagination;
191
209
  search?: String;
210
+ trashed?: boolean;
192
211
  }
193
212
  export interface ISearchResults {
194
213
  folders: IFolder[];
@@ -196,20 +215,24 @@ export interface ISearchResults {
196
215
  resources: IResource[];
197
216
  }
198
217
  export interface IContext extends ISearchResults {
199
- filters: IFilter[];
200
- orders: IOrder[];
201
- actions: IAction[];
202
218
  preferences: IPreferences;
203
219
  }
204
220
  export interface IAction {
205
221
  id: ActionType;
206
222
  available: boolean;
223
+ target?: "actionbar";
224
+ workflow: string;
225
+ right?: RightRole;
207
226
  }
208
227
  export interface IFolder {
209
228
  id: ID;
229
+ parentId: ID;
210
230
  name: string;
211
231
  type: FolderType | ID;
212
232
  childNumber: number;
233
+ trashed: boolean;
234
+ rights: string[];
235
+ ancestors: string[];
213
236
  }
214
237
  export interface IFilter {
215
238
  id: BooleanFilterType | StringFilterType;
@@ -231,23 +254,30 @@ export interface IProperty {
231
254
  i18n?: string;
232
255
  }
233
256
  export interface IResource {
234
- id: ID;
235
- name: string;
236
- thumbnail: string;
237
257
  application: App;
258
+ assetId: string;
259
+ creatorId: string;
260
+ creatorName: string;
261
+ comments?: number;
238
262
  createdAt: string;
239
- authorId: string;
240
- authorName: string;
263
+ favorite?: boolean;
264
+ folderIds?: ID[];
265
+ id: ID;
266
+ modifiedAt: string;
241
267
  modifierId: ID;
242
268
  modifierName: string;
243
- modifiedAt: string;
244
- folderId?: ID;
269
+ name: string;
270
+ slug?: string;
245
271
  public?: boolean;
246
272
  shared?: boolean;
247
- favorite?: boolean;
273
+ thumbnail: string;
274
+ updatedAt: string;
248
275
  views?: number;
249
- comments?: number;
276
+ trashed: boolean;
277
+ rights: RightStringified[];
278
+ description: string;
250
279
  }
280
+ export declare type RightStringified = string;
251
281
  export interface IPreferences {
252
282
  view: "card" | "list";
253
283
  }
@@ -268,17 +298,35 @@ export declare type UpdateFolderParameters = IActionParameters & {
268
298
  parentId: ID | "default";
269
299
  name: string;
270
300
  };
301
+ export declare type OpenParameters = IActionParameters & {
302
+ resourceId: ID;
303
+ };
304
+ export declare type PrintParameters = IActionParameters & {
305
+ resourceId: ID;
306
+ withComments?: boolean;
307
+ };
271
308
  export declare type CopyParameters = IActionParameters & {
309
+ application: string;
272
310
  folderId: ID;
273
311
  resourceIds: ID[];
274
312
  folderIds: ID[];
275
313
  };
276
314
  export declare type MoveParameters = IActionParameters & {
315
+ application: string;
277
316
  folderId: ID;
278
317
  resourceIds: ID[];
279
318
  folderIds: ID[];
280
319
  };
281
320
  export declare type DeleteParameters = IActionParameters & {
321
+ application: string;
322
+ resourceType: string;
323
+ resourceIds: ID[];
324
+ folderIds: ID[];
325
+ };
326
+ export declare type TrashParameters = IActionParameters & {
327
+ trash: boolean;
328
+ application: string;
329
+ resourceType: string;
282
330
  resourceIds: ID[];
283
331
  folderIds: ID[];
284
332
  };
@@ -291,6 +339,22 @@ export declare type UpdatePropertiesParameters = IActionParameters & {
291
339
  [key in PropKeyType]?: string;
292
340
  };
293
341
  };
342
+ export declare type PublishParameters = IActionParameters & {
343
+ userId: string | undefined;
344
+ title: string;
345
+ cover: Blob;
346
+ language: string;
347
+ activityType: string[];
348
+ subjectArea: string[];
349
+ age: [string, string];
350
+ description: string;
351
+ keyWords: string;
352
+ application: string | undefined;
353
+ licence: string;
354
+ teacherAvatar: Blob;
355
+ resourceId: string;
356
+ userStructureName: string;
357
+ };
294
358
  export declare type FilterValues = {
295
359
  [B in BooleanFilterType]?: boolean;
296
360
  } & {
@@ -310,6 +374,7 @@ export declare type GetSubFoldersResult = IActionResult & {
310
374
  };
311
375
  export declare type CreateFolderResult = IActionResult & IFolder & {
312
376
  createdAt: string;
377
+ creator_id?: string;
313
378
  };
314
379
  export declare type UpdateFolderResult = CreateFolderResult & {
315
380
  updatedAt: string;
@@ -321,6 +386,19 @@ export declare type ManagePropertiesResult = IActionResult & {
321
386
  export declare type UpdatePropertiesResult = IActionResult & {
322
387
  resources: IResource[];
323
388
  };
389
+ export declare type PublishResult = IActionResult & {
390
+ details: {
391
+ application: string;
392
+ created_at: string;
393
+ description: string;
394
+ front_url: string;
395
+ id: string;
396
+ title: string;
397
+ };
398
+ message: string;
399
+ reason: string;
400
+ success: boolean;
401
+ };
324
402
  export interface IBus {
325
403
  /**
326
404
  * Ask any agent on the bus to perform an action on a type of resource.
@@ -334,7 +412,7 @@ export interface IBus {
334
412
  * Subscribe to ActionResults any agent produces for a given ResourceType and ActionType.
335
413
  * @param res The type of resource in concern.
336
414
  * @param action The action in concern.
337
- * @return A stream of {input:IActionParameters, output:IActionResult}
415
+ * @return A stream of IActionParameters and IActionResult
338
416
  */
339
417
  subscribe(res: ResourceType, action: ActionType): Observable<{
340
418
  input: IActionParameters;
@@ -349,4 +427,3 @@ export interface IBusAgent {
349
427
  /** Ask this agent to resolve an action. */
350
428
  activate(res: ResourceType, action: ActionType, parameters: IActionParameters): Promise<IActionResult>;
351
429
  }
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";
@@ -19,7 +20,7 @@ export declare const APP: {
19
20
  readonly CAS: "cas";
20
21
  readonly VIDEO: "video";
21
22
  };
22
- export declare type App = typeof APP[keyof typeof APP];
23
+ export declare type App = (typeof APP)[keyof typeof APP];
23
24
  export declare const USER_PREFS: {
24
25
  readonly APPS: "apps";
25
26
  readonly WIDGETS: "widgets";
@@ -29,4 +30,3 @@ export declare const USER_PREFS: {
29
30
  readonly INFOTIP: "infotip";
30
31
  readonly RGPD_COOKIES: "rgpdCookies";
31
32
  };
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