ode-ts-client 1.2.1-develop-pedago.202309041518 → 1.2.1-develop-b2school.202311301157
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/configure/Service.d.ts +0 -1
- package/dist/configure/interfaces.d.ts +2 -1
- package/dist/explore/Agent.d.ts +20 -0
- package/dist/explore/AgentLoader.d.ts +13 -0
- package/dist/explore/Bus.d.ts +20 -0
- package/dist/explore/Context.d.ts +33 -0
- package/dist/explore/Framework.d.ts +15 -0
- package/dist/{explorer → explore}/interfaces.d.ts +3 -1
- package/dist/globals.d.ts +0 -1
- package/dist/index.d.ts +1 -1
- package/dist/ode-ts-client.esm.js +1420 -984
- package/dist/ode-ts-client.esm.js.map +1 -1
- package/dist/ode-ts-client.js +4 -4
- package/dist/ode-ts-client.js.map +1 -1
- package/dist/ode-ts-client.mjs +1420 -984
- package/dist/ode-ts-client.mjs.map +1 -1
- package/dist/resources/BlogResourceService.d.ts +1 -2
- package/dist/resources/ResourceService.d.ts +1 -2
- package/dist/resources/interface.d.ts +0 -46
- package/dist/rights/Service.d.ts +1 -1
- package/dist/version.txt +1 -1
- package/package.json +22 -21
- package/dist/resources/MindmapResourceService.d.ts +0 -12
|
@@ -11,7 +11,6 @@ export declare class ConfService {
|
|
|
11
11
|
savePreference<T>(key: string, value: T): Promise<void>;
|
|
12
12
|
getPreference<T>(key: string): Promise<T>;
|
|
13
13
|
private getThemeConf;
|
|
14
|
-
private getExtendedTheme;
|
|
15
14
|
private getApplicationsList;
|
|
16
15
|
private getWebAppConf;
|
|
17
16
|
private getTheme;
|
|
@@ -199,7 +199,9 @@ export interface IUserPreferences {
|
|
|
199
199
|
}
|
|
200
200
|
export interface IOdeTheme {
|
|
201
201
|
basePath: string;
|
|
202
|
+
bootstrap: string;
|
|
202
203
|
bootstrapPath: string;
|
|
204
|
+
bootstrapUrl: string;
|
|
203
205
|
bootstrapVersion: string;
|
|
204
206
|
is1d: boolean;
|
|
205
207
|
logoutCallback: string;
|
|
@@ -214,5 +216,4 @@ export interface IGetConf {
|
|
|
214
216
|
conf: IThemeConf;
|
|
215
217
|
currentApp: IWebApp | undefined;
|
|
216
218
|
theme: IOdeTheme;
|
|
217
|
-
extendedTheme: any;
|
|
218
219
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ActionType, IActionParameters, IActionResult, IBusAgent, ResourceType } from "./interfaces";
|
|
2
|
+
export declare type IHandler = (parameters: IActionParameters) => Promise<IActionResult>;
|
|
3
|
+
/**
|
|
4
|
+
* Manage a generic RESOURCE
|
|
5
|
+
*/
|
|
6
|
+
export declare abstract class AbstractBusAgent implements IBusAgent {
|
|
7
|
+
constructor(managedResource: ResourceType);
|
|
8
|
+
/** Type of resource this agent can manage. */
|
|
9
|
+
protected managedResource: ResourceType;
|
|
10
|
+
protected static defaultHandler: IHandler;
|
|
11
|
+
protected handlerFor: {
|
|
12
|
+
[action in ActionType]: IHandler;
|
|
13
|
+
};
|
|
14
|
+
protected initialize(): void;
|
|
15
|
+
protected setHandler(action: ActionType, handler: IHandler): void;
|
|
16
|
+
protected getHandler(action: ActionType): IHandler;
|
|
17
|
+
/** Override to register handlers for actions this agent support. */
|
|
18
|
+
protected abstract registerHandlers(): void;
|
|
19
|
+
activate(res: ResourceType, action: ActionType, parameters: IActionParameters): Promise<IActionResult>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ResourceType } from "./interfaces";
|
|
2
|
+
/**
|
|
3
|
+
* Inner representation of an agent loader, from the bus' perspective.
|
|
4
|
+
*/
|
|
5
|
+
export interface IAgentLoader {
|
|
6
|
+
load(res: ResourceType): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Default implementation of the loader.
|
|
10
|
+
*/
|
|
11
|
+
export declare class AgentLoader implements IAgentLoader {
|
|
12
|
+
load(res: ResourceType): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ActionType, IActionResult, IBus, ResourceType, IBusAgent } from "./interfaces";
|
|
2
|
+
import { Observable } from "rxjs";
|
|
3
|
+
import { IActionParameters } from "..";
|
|
4
|
+
declare class Bus implements IBus {
|
|
5
|
+
private agents;
|
|
6
|
+
private comm;
|
|
7
|
+
setAgentFor(res: ResourceType, action: ActionType, agent: IBusAgent): void;
|
|
8
|
+
getAgentFor(res: ResourceType, action: ActionType): IBusAgent | null;
|
|
9
|
+
publish(res: ResourceType, action: ActionType, parameters: any): Promise<IActionResult>;
|
|
10
|
+
subscribe(res: ResourceType, action: ActionType): Observable<{
|
|
11
|
+
input: IActionParameters;
|
|
12
|
+
output: IActionResult;
|
|
13
|
+
}>;
|
|
14
|
+
private getActionMapping;
|
|
15
|
+
}
|
|
16
|
+
export declare class BusFactory {
|
|
17
|
+
private static _instance;
|
|
18
|
+
static get instance(): Bus;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { App } from "../globals";
|
|
3
|
+
import { IContext, IExplorerContext, ISearchParameters, ResourceType, GetResourcesResult, GetSubFoldersResult, CreateFolderResult, UpdateFolderResult, ID, ISearchResults, IResource, ManagePropertiesResult, UpdatePropertiesResult, PropKeyType, PublishParameters, PublishResult } from "./interfaces";
|
|
4
|
+
export declare class ExplorerContext implements IExplorerContext {
|
|
5
|
+
private searchParameters;
|
|
6
|
+
private context;
|
|
7
|
+
private bus;
|
|
8
|
+
private latestResults;
|
|
9
|
+
constructor(types: ResourceType[], app: App);
|
|
10
|
+
clear(): void;
|
|
11
|
+
isInitialized(): boolean;
|
|
12
|
+
getContext(): IContext | undefined;
|
|
13
|
+
getSearchParameters(): ISearchParameters;
|
|
14
|
+
private duplicateSearchParameters;
|
|
15
|
+
latestResources(): Observable<{
|
|
16
|
+
input: ISearchParameters;
|
|
17
|
+
output: ISearchResults;
|
|
18
|
+
}>;
|
|
19
|
+
initialize(): Promise<IContext>;
|
|
20
|
+
getResources(): Promise<GetResourcesResult>;
|
|
21
|
+
getSubFolders(parentId: string): Promise<GetSubFoldersResult>;
|
|
22
|
+
createFolder(resourceType: ResourceType, parentId: string, name: string): Promise<CreateFolderResult>;
|
|
23
|
+
updateFolder(folderId: ID, resourceType: ResourceType, parentId: ID | "default", name: string): Promise<UpdateFolderResult>;
|
|
24
|
+
copy(targetId: string, resourceIds: ID[], folderIds: ID[]): Promise<void>;
|
|
25
|
+
move(targetId: string, resourceIds: ID[], folderIds: ID[]): Promise<void>;
|
|
26
|
+
delete(resourceIds: string[], folderIds: string[]): Promise<void>;
|
|
27
|
+
trash(trash: boolean, resourceIds: string[], folderIds: string[]): Promise<void>;
|
|
28
|
+
manageProperties(resourceType: ResourceType, resources: IResource[]): Promise<ManagePropertiesResult>;
|
|
29
|
+
updateProperties(resourceType: ResourceType, resources: IResource[], props: {
|
|
30
|
+
[key in PropKeyType]?: string;
|
|
31
|
+
}): Promise<UpdatePropertiesResult>;
|
|
32
|
+
publish(resourceType: ResourceType, parameters: PublishParameters): Promise<PublishResult>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IBusAgent } from "..";
|
|
2
|
+
import { App } from "../globals";
|
|
3
|
+
import { IAgentLoader } from "./AgentLoader";
|
|
4
|
+
import { ActionType, IBus, IExplorerContext, IExplorerFramework, ResourceType } from "./interfaces";
|
|
5
|
+
export declare class ExplorerFramework implements IExplorerFramework {
|
|
6
|
+
private _agentLoader?;
|
|
7
|
+
get agentLoader(): IAgentLoader;
|
|
8
|
+
setAgentLoader(loader: IAgentLoader): void;
|
|
9
|
+
/** Load the agent dedicated to resolve this @param action on this @param resource */
|
|
10
|
+
requestAgentFor(resource: ResourceType, action: ActionType): Promise<IBusAgent>;
|
|
11
|
+
createContext(types: ResourceType[], app: App): IExplorerContext;
|
|
12
|
+
getBus(): IBus;
|
|
13
|
+
}
|
|
14
|
+
/** The whole framework is a singleton. */
|
|
15
|
+
export declare const explorer: IExplorerFramework;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Observable } from "rxjs";
|
|
2
2
|
import { App } from "../globals";
|
|
3
3
|
import { RightRole } from "../services";
|
|
4
|
+
export declare abstract class ExplorerFrameworkFactory {
|
|
5
|
+
static instance(): IExplorerFramework;
|
|
6
|
+
}
|
|
4
7
|
/** Framework exploration capabilities offered to the client. */
|
|
5
8
|
export interface IExplorerFramework {
|
|
6
9
|
/**
|
|
@@ -112,7 +115,6 @@ export declare const RESOURCE: {
|
|
|
112
115
|
readonly FOLDER: "folder";
|
|
113
116
|
readonly BLOG: "blog";
|
|
114
117
|
readonly EXERCISE: "exercise";
|
|
115
|
-
readonly MINDMAP: "mindmap";
|
|
116
118
|
};
|
|
117
119
|
export declare type ResourceType = (typeof RESOURCE)[keyof typeof RESOURCE];
|
|
118
120
|
export declare const appNameForResource: {
|
package/dist/globals.d.ts
CHANGED
package/dist/index.d.ts
CHANGED