ode-ts-client 1.1.2 → 1.1.3-explorer.202302151517
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.
- package/dist/agents/blog.agent.d.ts +2 -0
- package/dist/agents/folder.agent.d.ts +2 -0
- package/dist/agents/index.d.ts +4 -0
- package/dist/{ts/apps → apps}/timeline/Framework.d.ts +0 -1
- package/dist/{ts/apps → apps}/timeline/Notification.model.d.ts +0 -1
- package/dist/{ts/apps → apps}/timeline/interfaces.d.ts +1 -2
- package/dist/{ts/configure → configure}/Analytics.d.ts +0 -1
- package/dist/{ts/configure → configure}/AppConf.d.ts +3 -1
- package/dist/{ts/configure → configure}/Framework.d.ts +0 -1
- package/dist/{ts/configure → configure}/Idiom.d.ts +3 -2
- package/dist/{ts/configure → configure}/Theme.d.ts +0 -1
- package/dist/{ts/configure → configure}/User.d.ts +0 -1
- package/dist/{ts/configure → configure}/interfaces.d.ts +13 -7
- package/dist/{ts/explore → explore}/Agent.d.ts +1 -2
- package/dist/{ts/explore → explore}/AgentLoader.d.ts +0 -2
- package/dist/{ts/explore → explore}/Bus.d.ts +0 -1
- package/dist/{ts/explore → explore}/Context.d.ts +3 -2
- package/dist/{ts/explore → explore}/Framework.d.ts +2 -2
- package/dist/{ts/explore → explore}/interfaces.d.ts +110 -43
- package/dist/{ts/globals.d.ts → globals.d.ts} +3 -3
- package/dist/index.cjs.d.ts +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/legacy/Behaviours.d.ts +29 -0
- package/dist/legacy/entcore.d.ts +7 -0
- package/dist/legacy/http.d.ts +24 -0
- package/dist/legacy/me.d.ts +12 -0
- package/dist/legacy/rights.d.ts +55 -0
- package/dist/{ts/notify → notify}/Framework.d.ts +0 -1
- package/dist/{ts/notify → notify}/interfaces.d.ts +2 -3
- package/dist/ode-ts-client.js +15 -16
- package/dist/ode-ts-client.mjs +8478 -0
- package/dist/{ts/session → session}/Framework.d.ts +2 -1
- package/dist/{ts/session → session}/Session.d.ts +10 -3
- package/dist/{ts/session → session}/interfaces.d.ts +93 -4
- package/dist/{ts/transport → transport}/Framework.d.ts +0 -1
- package/dist/{ts/transport → transport}/Http.d.ts +0 -1
- package/dist/{ts/transport → transport}/interfaces.d.ts +5 -3
- package/dist/version.txt +1 -1
- package/dist/{ts/widget → widget}/Framework.d.ts +0 -1
- package/dist/{ts/widget → widget}/LastInfos.widget.d.ts +0 -1
- package/dist/{ts/widget → widget}/interfaces.d.ts +3 -4
- package/package.json +18 -14
- package/dist/ode-ts-client.js.map +0 -1
- package/dist/test/Foundation.spec.d.ts +0 -2
- package/dist/test/Foundation.spec.d.ts.map +0 -1
- package/dist/test/mocks/agents/MockedAgentLoader.d.ts +0 -9
- package/dist/test/mocks/agents/MockedAgentLoader.d.ts.map +0 -1
- package/dist/test/mocks/agents/MockedFolderAgent.d.ts +0 -15
- package/dist/test/mocks/agents/MockedFolderAgent.d.ts.map +0 -1
- package/dist/ts/apps/timeline/Framework.d.ts.map +0 -1
- package/dist/ts/apps/timeline/Notification.model.d.ts.map +0 -1
- package/dist/ts/apps/timeline/interfaces.d.ts.map +0 -1
- package/dist/ts/configure/Analytics.d.ts.map +0 -1
- package/dist/ts/configure/AppConf.d.ts.map +0 -1
- package/dist/ts/configure/Framework.d.ts.map +0 -1
- package/dist/ts/configure/Idiom.d.ts.map +0 -1
- package/dist/ts/configure/Theme.d.ts.map +0 -1
- package/dist/ts/configure/User.d.ts.map +0 -1
- package/dist/ts/configure/interfaces.d.ts.map +0 -1
- package/dist/ts/explore/Agent.d.ts.map +0 -1
- package/dist/ts/explore/AgentLoader.d.ts.map +0 -1
- package/dist/ts/explore/Bus.d.ts.map +0 -1
- package/dist/ts/explore/Context.d.ts.map +0 -1
- package/dist/ts/explore/Framework.d.ts.map +0 -1
- package/dist/ts/explore/interfaces.d.ts.map +0 -1
- package/dist/ts/globals.d.ts.map +0 -1
- package/dist/ts/index.d.ts +0 -12
- package/dist/ts/index.d.ts.map +0 -1
- package/dist/ts/notify/Framework.d.ts.map +0 -1
- package/dist/ts/notify/interfaces.d.ts.map +0 -1
- package/dist/ts/session/Framework.d.ts.map +0 -1
- package/dist/ts/session/Session.d.ts.map +0 -1
- package/dist/ts/session/interfaces.d.ts.map +0 -1
- package/dist/ts/transport/Framework.d.ts.map +0 -1
- package/dist/ts/transport/Http.d.ts.map +0 -1
- package/dist/ts/transport/interfaces.d.ts.map +0 -1
- package/dist/ts/widget/Framework.d.ts.map +0 -1
- package/dist/ts/widget/LastInfos.widget.d.ts.map +0 -1
- package/dist/ts/widget/interfaces.d.ts.map +0 -1
|
@@ -27,7 +27,7 @@ export interface ITimelineNotification {
|
|
|
27
27
|
discard(): Promise<void>;
|
|
28
28
|
report(): Promise<void>;
|
|
29
29
|
}
|
|
30
|
-
export
|
|
30
|
+
export type NotificationModel = {
|
|
31
31
|
_id: string;
|
|
32
32
|
type: string;
|
|
33
33
|
eventType: string;
|
|
@@ -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
|
|
@@ -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,8 @@
|
|
|
1
1
|
import { AddBundleCallback, IIdiom } from "./interfaces";
|
|
2
2
|
export declare class Idiom implements IIdiom {
|
|
3
|
-
translate(key: string
|
|
3
|
+
translate(key: string, params?: {
|
|
4
|
+
[param: string]: any;
|
|
5
|
+
}): string;
|
|
4
6
|
addBundlePromise(path: string): Promise<void>;
|
|
5
7
|
addBundle(path: string, callback?: AddBundleCallback): void;
|
|
6
8
|
private loadBundlePromise;
|
|
@@ -10,4 +12,3 @@ export declare class Idiom implements IIdiom {
|
|
|
10
12
|
addKeys(keys: any): void;
|
|
11
13
|
removeAccents(str: string): string;
|
|
12
14
|
}
|
|
13
|
-
//# sourceMappingURL=Idiom.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
|
};
|
|
@@ -56,8 +58,8 @@ export interface IConfigurationFramework {
|
|
|
56
58
|
saveLanguage(lang: string): Promise<void>;
|
|
57
59
|
};
|
|
58
60
|
}
|
|
59
|
-
export
|
|
60
|
-
export
|
|
61
|
+
export type AnalyticStatus = "void" | "pending" | "ready" | "failed";
|
|
62
|
+
export type TrackingType = "matomo" | "internal";
|
|
61
63
|
export interface ITrackingParams {
|
|
62
64
|
/** Whitelist of events to track, in the form "app" or "app.eventName" or "*.eventName". */
|
|
63
65
|
trackOnly: string[];
|
|
@@ -160,15 +162,20 @@ export interface IThemeConfOverriding {
|
|
|
160
162
|
ignoreSubjects?: Array<string>;
|
|
161
163
|
};
|
|
162
164
|
}
|
|
163
|
-
export
|
|
165
|
+
export type IThemeOverrides = {
|
|
164
166
|
[app in App]?: string;
|
|
165
167
|
};
|
|
166
|
-
export
|
|
168
|
+
export type AddBundleCallback = () => void | Promise<void>;
|
|
167
169
|
export interface IIdiom {
|
|
168
170
|
/** Get the translation of a given key.
|
|
171
|
+
* @param params (optional) map of key/value variables.
|
|
172
|
+
* Ex: Given "variabilized.i18n.key"="Limit to ${limit} bytes"
|
|
173
|
+
* translate('variabilized.i18n.key', {limit:50}) will return "Limit to 50 bytes".
|
|
169
174
|
* @return the key itself when no translation exists.
|
|
170
175
|
*/
|
|
171
|
-
translate(key: string
|
|
176
|
+
translate(key: string, params?: {
|
|
177
|
+
[param: string]: any;
|
|
178
|
+
}): string;
|
|
172
179
|
/** Load a language bundle then return a Promise. */
|
|
173
180
|
addBundlePromise(path: string): Promise<void>;
|
|
174
181
|
/** Load a language bundle then call an optional callback. */
|
|
@@ -182,7 +189,7 @@ export interface IIdiom {
|
|
|
182
189
|
/** @return a new string without accentuation. */
|
|
183
190
|
removeAccents(str: string): string;
|
|
184
191
|
}
|
|
185
|
-
export
|
|
192
|
+
export type UserPreferenceKey = typeof USER_PREFS[keyof typeof USER_PREFS] | App;
|
|
186
193
|
export interface IUserPreferences {
|
|
187
194
|
data: {
|
|
188
195
|
[key in UserPreferenceKey]?: any;
|
|
@@ -192,4 +199,3 @@ export interface IUserPreferences {
|
|
|
192
199
|
update(key: UserPreferenceKey, data: any): IUserPreferences;
|
|
193
200
|
save(key: UserPreferenceKey): Promise<void>;
|
|
194
201
|
}
|
|
195
|
-
//# sourceMappingURL=interfaces.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ActionType, IActionParameters, IActionResult, IBusAgent, ResourceType } from "./interfaces";
|
|
2
|
-
export
|
|
2
|
+
export type IHandler = (parameters: IActionParameters) => Promise<IActionResult>;
|
|
3
3
|
/**
|
|
4
4
|
* Manage a generic RESOURCE
|
|
5
5
|
*/
|
|
@@ -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
|
|
@@ -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
|
|
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
|
|
@@ -94,19 +94,28 @@ export interface IExplorerContext {
|
|
|
94
94
|
* @param folderIds Array of folders ID to delete.
|
|
95
95
|
*/
|
|
96
96
|
delete(resourceIds: ID[], folderIds: ID[]): Promise<void>;
|
|
97
|
+
/**
|
|
98
|
+
* Trash / Untrash resources and folders.
|
|
99
|
+
* @param trash boolean set status trash or untrash
|
|
100
|
+
* @param resourceIds Array of resources ID to delete.
|
|
101
|
+
* @param folderIds Array of folders ID to delete.
|
|
102
|
+
*/
|
|
103
|
+
trash(trash: boolean, resourceIds: ID[], folderIds: ID[]): Promise<void>;
|
|
97
104
|
/** Retrieves which properties of the resource(s) are manageable. */
|
|
98
105
|
manageProperties(resourceType: ResourceType, resources: IResource[]): Promise<ManagePropertiesResult>;
|
|
99
106
|
/** Update managed properties. */
|
|
100
107
|
updateProperties(resourceType: ResourceType, resources: IResource[], props: {
|
|
101
108
|
[key in PropKeyType]?: string;
|
|
102
109
|
}): Promise<UpdatePropertiesResult>;
|
|
110
|
+
/** Publish to Library */
|
|
111
|
+
publish(resourceType: ResourceType, parameters: PublishParameters): Promise<PublishResult>;
|
|
103
112
|
}
|
|
104
113
|
export declare const RESOURCE: {
|
|
105
114
|
readonly FOLDER: "folder";
|
|
106
115
|
readonly BLOG: "blog";
|
|
107
116
|
readonly EXERCISE: "exercise";
|
|
108
117
|
};
|
|
109
|
-
export
|
|
118
|
+
export type ResourceType = typeof RESOURCE[keyof typeof RESOURCE];
|
|
110
119
|
export declare const appNameForResource: {
|
|
111
120
|
[R in ResourceType]: App;
|
|
112
121
|
};
|
|
@@ -119,41 +128,47 @@ export declare const ACTION: {
|
|
|
119
128
|
readonly UPD_PROPS: "properties";
|
|
120
129
|
readonly COMMENT: "comment";
|
|
121
130
|
readonly DELETE: "delete";
|
|
131
|
+
readonly TRASH: "trash";
|
|
132
|
+
readonly RESTORE: "restore";
|
|
122
133
|
readonly MOVE: "move";
|
|
123
134
|
readonly COPY: "copy";
|
|
124
135
|
readonly EXPORT: "export";
|
|
125
136
|
readonly SHARE: "share";
|
|
126
|
-
readonly PUBLISH: "publish";
|
|
127
137
|
readonly PRINT: "print";
|
|
138
|
+
readonly PAGES_LIST: "pages_list";
|
|
139
|
+
readonly DISTRIBUTE: "distribute";
|
|
140
|
+
readonly REGISTER: "register";
|
|
141
|
+
readonly PUBLISH: "publish";
|
|
142
|
+
readonly PUBLISH_MOODLE: "publish_moodle";
|
|
128
143
|
};
|
|
129
|
-
export
|
|
144
|
+
export type ActionType = typeof ACTION[keyof typeof ACTION];
|
|
130
145
|
export declare const FOLDER: {
|
|
131
146
|
readonly BIN: "bin";
|
|
132
147
|
readonly DEFAULT: "default";
|
|
133
148
|
};
|
|
134
|
-
export
|
|
149
|
+
export type FolderType = typeof FOLDER[keyof typeof FOLDER];
|
|
135
150
|
export declare const BOOLEAN_FILTER: {
|
|
136
151
|
readonly OWNER: "owner";
|
|
137
152
|
readonly SHARED: "shared";
|
|
138
153
|
readonly PUBLIC: "public";
|
|
139
154
|
readonly FAVORITE: "favorite";
|
|
140
155
|
};
|
|
141
|
-
export
|
|
156
|
+
export type BooleanFilterType = typeof BOOLEAN_FILTER[keyof typeof BOOLEAN_FILTER];
|
|
142
157
|
export declare const STRING_FILTER: {};
|
|
143
|
-
export
|
|
158
|
+
export type StringFilterType = typeof STRING_FILTER[keyof typeof STRING_FILTER];
|
|
144
159
|
export declare const SORT_ORDER: {
|
|
145
160
|
readonly ASC: "asc";
|
|
146
161
|
readonly DESC: "desc";
|
|
147
162
|
};
|
|
148
|
-
export
|
|
163
|
+
export type SortOrderType = typeof SORT_ORDER[keyof typeof SORT_ORDER];
|
|
149
164
|
export declare const SORT_BY: {
|
|
150
165
|
readonly NAME: "name";
|
|
151
166
|
readonly MODIFY_DATE: "modifiedAt";
|
|
152
167
|
readonly VIEWS: "views";
|
|
153
168
|
};
|
|
154
|
-
export
|
|
155
|
-
export
|
|
156
|
-
export
|
|
169
|
+
export type SortByType = typeof SORT_BY[keyof typeof SORT_BY];
|
|
170
|
+
export type ID = string;
|
|
171
|
+
export type StringFilterValue = {
|
|
157
172
|
value: string;
|
|
158
173
|
i18n: string;
|
|
159
174
|
};
|
|
@@ -164,24 +179,24 @@ export declare const PROP_KEY: {
|
|
|
164
179
|
readonly DESCRIPTION: "description";
|
|
165
180
|
readonly URL: "url";
|
|
166
181
|
};
|
|
167
|
-
export
|
|
182
|
+
export type PropKeyType = typeof PROP_KEY[keyof typeof PROP_KEY];
|
|
168
183
|
export declare const PROP_MODE: {
|
|
169
184
|
readonly READONLY: "RO";
|
|
170
185
|
readonly READWRITE: "RW";
|
|
171
186
|
};
|
|
172
|
-
export
|
|
187
|
+
export type PropModeType = typeof PROP_MODE[keyof typeof PROP_MODE];
|
|
173
188
|
export declare const PROP_TYPE: {
|
|
174
189
|
readonly TEXT: "text";
|
|
175
190
|
readonly NUMBER: "number";
|
|
176
191
|
readonly DATE: "date";
|
|
177
192
|
readonly IMAGE: "image";
|
|
178
193
|
};
|
|
179
|
-
export
|
|
194
|
+
export type PropTypeType = typeof PROP_TYPE[keyof typeof PROP_TYPE];
|
|
180
195
|
export declare const PROP_FORMAT: {
|
|
181
196
|
readonly PLAIN: "plain";
|
|
182
197
|
};
|
|
183
|
-
export
|
|
184
|
-
export
|
|
198
|
+
export type PropFormatType = typeof PROP_FORMAT[keyof typeof PROP_FORMAT];
|
|
199
|
+
export type SearchResultHandler = (input: IActionParameters, output: IActionResult) => void;
|
|
185
200
|
export interface ISearchParameters {
|
|
186
201
|
types: ResourceType[];
|
|
187
202
|
app: App;
|
|
@@ -204,12 +219,15 @@ export interface IContext extends ISearchResults {
|
|
|
204
219
|
export interface IAction {
|
|
205
220
|
id: ActionType;
|
|
206
221
|
available: boolean;
|
|
222
|
+
target?: "actionbar";
|
|
207
223
|
}
|
|
208
224
|
export interface IFolder {
|
|
209
225
|
id: ID;
|
|
226
|
+
parentId: ID;
|
|
210
227
|
name: string;
|
|
211
228
|
type: FolderType | ID;
|
|
212
229
|
childNumber: number;
|
|
230
|
+
trashed: boolean;
|
|
213
231
|
}
|
|
214
232
|
export interface IFilter {
|
|
215
233
|
id: BooleanFilterType | StringFilterType;
|
|
@@ -231,96 +249,146 @@ export interface IProperty {
|
|
|
231
249
|
i18n?: string;
|
|
232
250
|
}
|
|
233
251
|
export interface IResource {
|
|
234
|
-
id: ID;
|
|
235
|
-
name: string;
|
|
236
|
-
thumbnail: string;
|
|
237
252
|
application: App;
|
|
238
|
-
|
|
253
|
+
assetId: string;
|
|
239
254
|
authorId: string;
|
|
240
|
-
|
|
255
|
+
creatorName: string;
|
|
256
|
+
comments?: number;
|
|
257
|
+
createdAt: string;
|
|
258
|
+
favorite?: boolean;
|
|
259
|
+
folderId?: ID;
|
|
260
|
+
id: ID;
|
|
261
|
+
modifiedAt: string;
|
|
241
262
|
modifierId: ID;
|
|
242
263
|
modifierName: string;
|
|
243
|
-
|
|
244
|
-
folderId?: ID;
|
|
264
|
+
name: string;
|
|
245
265
|
public?: boolean;
|
|
246
266
|
shared?: boolean;
|
|
247
|
-
|
|
267
|
+
thumbnail: string;
|
|
268
|
+
updatedAt: string;
|
|
248
269
|
views?: number;
|
|
249
|
-
|
|
270
|
+
trashed: boolean;
|
|
250
271
|
}
|
|
251
272
|
export interface IPreferences {
|
|
252
273
|
view: "card" | "list";
|
|
253
274
|
}
|
|
254
275
|
export interface IActionParameters {
|
|
255
276
|
}
|
|
256
|
-
export
|
|
257
|
-
export
|
|
258
|
-
export
|
|
277
|
+
export type GetContextParameters = IActionParameters & ISearchParameters;
|
|
278
|
+
export type GetResourcesParameters = IActionParameters & ISearchParameters;
|
|
279
|
+
export type CreateFolderParameters = IActionParameters & {
|
|
259
280
|
app: App;
|
|
260
281
|
type: ResourceType;
|
|
261
282
|
parentId: ID | "default";
|
|
262
283
|
name: string;
|
|
263
284
|
};
|
|
264
|
-
export
|
|
285
|
+
export type UpdateFolderParameters = IActionParameters & {
|
|
265
286
|
folderId: ID;
|
|
266
287
|
app: App;
|
|
267
288
|
type: ResourceType;
|
|
268
289
|
parentId: ID | "default";
|
|
269
290
|
name: string;
|
|
270
291
|
};
|
|
271
|
-
export
|
|
292
|
+
export type OpenParameters = IActionParameters & {
|
|
293
|
+
resourceId: ID;
|
|
294
|
+
};
|
|
295
|
+
export type PrintParameters = IActionParameters & {
|
|
296
|
+
resourceId: ID;
|
|
297
|
+
withComments?: boolean;
|
|
298
|
+
};
|
|
299
|
+
export type CopyParameters = IActionParameters & {
|
|
300
|
+
application: string;
|
|
272
301
|
folderId: ID;
|
|
273
302
|
resourceIds: ID[];
|
|
274
303
|
folderIds: ID[];
|
|
275
304
|
};
|
|
276
|
-
export
|
|
305
|
+
export type MoveParameters = IActionParameters & {
|
|
306
|
+
application: string;
|
|
277
307
|
folderId: ID;
|
|
278
308
|
resourceIds: ID[];
|
|
279
309
|
folderIds: ID[];
|
|
280
310
|
};
|
|
281
|
-
export
|
|
311
|
+
export type DeleteParameters = IActionParameters & {
|
|
312
|
+
application: string;
|
|
313
|
+
resourceType: string;
|
|
314
|
+
resourceIds: ID[];
|
|
315
|
+
folderIds: ID[];
|
|
316
|
+
};
|
|
317
|
+
export type TrashParameters = IActionParameters & {
|
|
318
|
+
trash: boolean;
|
|
319
|
+
application: string;
|
|
320
|
+
resourceType: string;
|
|
282
321
|
resourceIds: ID[];
|
|
283
322
|
folderIds: ID[];
|
|
284
323
|
};
|
|
285
|
-
export
|
|
324
|
+
export type ManagePropertiesParameters = IActionParameters & {
|
|
286
325
|
resources: IResource[];
|
|
287
326
|
};
|
|
288
|
-
export
|
|
327
|
+
export type UpdatePropertiesParameters = IActionParameters & {
|
|
289
328
|
resources: IResource[];
|
|
290
329
|
props: {
|
|
291
330
|
[key in PropKeyType]?: string;
|
|
292
331
|
};
|
|
293
332
|
};
|
|
294
|
-
export
|
|
333
|
+
export type PublishParameters = IActionParameters & {
|
|
334
|
+
userId: string | undefined;
|
|
335
|
+
title: string;
|
|
336
|
+
cover: Blob;
|
|
337
|
+
language: string;
|
|
338
|
+
activityType: string[];
|
|
339
|
+
subjectArea: string[];
|
|
340
|
+
age: [string, string];
|
|
341
|
+
description: string;
|
|
342
|
+
keyWords: string;
|
|
343
|
+
application: string | undefined;
|
|
344
|
+
licence: string;
|
|
345
|
+
teacherAvatar: Blob;
|
|
346
|
+
resourceId: string;
|
|
347
|
+
userStructureName: string;
|
|
348
|
+
};
|
|
349
|
+
export type FilterValues = {
|
|
295
350
|
[B in BooleanFilterType]?: boolean;
|
|
296
351
|
} & {
|
|
297
352
|
[S in StringFilterType]?: string;
|
|
298
353
|
} & {
|
|
299
354
|
folder?: ID;
|
|
300
355
|
};
|
|
301
|
-
export
|
|
356
|
+
export type OrderValues = {
|
|
302
357
|
[O in SortByType]?: SortOrderType;
|
|
303
358
|
};
|
|
304
359
|
export interface IActionResult {
|
|
305
360
|
}
|
|
306
|
-
export
|
|
307
|
-
export
|
|
308
|
-
export
|
|
361
|
+
export type GetContextResult = IActionResult & IContext;
|
|
362
|
+
export type GetResourcesResult = IActionResult & ISearchResults;
|
|
363
|
+
export type GetSubFoldersResult = IActionResult & {
|
|
309
364
|
folders: IFolder[];
|
|
310
365
|
};
|
|
311
|
-
export
|
|
366
|
+
export type CreateFolderResult = IActionResult & IFolder & {
|
|
312
367
|
createdAt: string;
|
|
313
368
|
};
|
|
314
|
-
export
|
|
369
|
+
export type UpdateFolderResult = CreateFolderResult & {
|
|
315
370
|
updatedAt: string;
|
|
316
371
|
parentId: ID | "default";
|
|
317
372
|
};
|
|
318
|
-
export
|
|
373
|
+
export type ManagePropertiesResult = IActionResult & {
|
|
319
374
|
genericProps: IProperty[];
|
|
320
375
|
};
|
|
321
|
-
export
|
|
376
|
+
export type UpdatePropertiesResult = IActionResult & {
|
|
322
377
|
resources: IResource[];
|
|
323
378
|
};
|
|
379
|
+
export type PublishResult = IActionResult & {
|
|
380
|
+
details: {
|
|
381
|
+
application: string;
|
|
382
|
+
created_at: string;
|
|
383
|
+
description: string;
|
|
384
|
+
front_url: string;
|
|
385
|
+
id: string;
|
|
386
|
+
title: string;
|
|
387
|
+
};
|
|
388
|
+
message: string;
|
|
389
|
+
reason: string;
|
|
390
|
+
success: boolean;
|
|
391
|
+
};
|
|
324
392
|
export interface IBus {
|
|
325
393
|
/**
|
|
326
394
|
* Ask any agent on the bus to perform an action on a type of resource.
|
|
@@ -349,4 +417,3 @@ export interface IBusAgent {
|
|
|
349
417
|
/** Ask this agent to resolve an action. */
|
|
350
418
|
activate(res: ResourceType, action: ActionType, parameters: IActionParameters): Promise<IActionResult>;
|
|
351
419
|
}
|
|
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
|
|
13
|
+
export 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
|
|
23
|
+
export 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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./index";
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./globals";
|
|
2
|
+
export * from "./explore/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";
|
|
@@ -0,0 +1,29 @@
|
|
|
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( serviceName:string, resource:IBehavioursAppBehaviours ): Promise<any>;
|
|
23
|
+
// @deprecated findBehaviours(serviceName, resource): void;
|
|
24
|
+
loadBehaviours( serviceName:string, callback: ((resource:IBehavioursAppBehaviours)=>void) ): IBehavioursActions;
|
|
25
|
+
load( serviceName:string ): Promise<any>;
|
|
26
|
+
findWorkflow( serviceName:string ): Promise<any>;
|
|
27
|
+
workflowsFrom( obj:any, dependencies:any ): {};
|
|
28
|
+
applicationsBehaviours: any;
|
|
29
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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>;
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
}
|