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.
@@ -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";
@@ -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
@@ -19,7 +19,6 @@ export declare const APP: {
19
19
  readonly TIMELINE: "timeline";
20
20
  readonly CAS: "cas";
21
21
  readonly VIDEO: "video";
22
- readonly MINDMAP: "mindmap";
23
22
  };
24
23
  export declare type App = (typeof APP)[keyof typeof APP];
25
24
  export declare const USER_PREFS: {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export * from "./globals";
2
- export * from "./explorer/interfaces";
2
+ export * from "./explore/interfaces";
3
3
  export * from "./notify/interfaces";
4
4
  export * as RxJS from "rxjs";
5
5
  export * from "./transport/interfaces";