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,22 @@
1
+ export declare type AddBundleCallback = () => void | Promise<void>;
2
+ export interface IIdiom {
3
+ /** Get the translation of a given key.
4
+ * @param params (optional) map of key/value variables.
5
+ * @return the key itself when no translation exists.
6
+ */
7
+ translate(key: string, params?: {
8
+ [param: string]: any;
9
+ }): string;
10
+ /** Load a language bundle then return a Promise. */
11
+ addBundlePromise(currentLanguage: string, path: string): Promise<void>;
12
+ /** Load a language bundle then call an optional callback. */
13
+ addBundle(currentLanguage: string, path: string, callback?: AddBundleCallback): void;
14
+ /** Load the JSON language file from a given folder, using the current user's language, then call an optional callback. */
15
+ addTranslations(folder: string, callback?: AddBundleCallback): void;
16
+ /** Load the JSON language files from many given folders, using the current user's language, then return a Promise. */
17
+ addAllTranslations(folders: string[]): Promise<void>;
18
+ /** Add new key/values translations to the in-memory dictionary, using a key/value map. Existing in-memory keys ARE NOT REPLACED. Only new ones are added. */
19
+ addKeys(keys: any): void;
20
+ /** @return a new string without accentuation. */
21
+ removeAccents(str: string): string;
22
+ }
@@ -0,0 +1 @@
1
+ export * from "./index";
@@ -0,0 +1,10 @@
1
+ export * from "./globals";
2
+ export * from "./explorer/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";
10
+ export * from "./services";
@@ -0,0 +1,35 @@
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(
23
+ serviceName: string,
24
+ resource: IBehavioursAppBehaviours,
25
+ ): Promise<any>;
26
+ // @deprecated findBehaviours(serviceName, resource): void;
27
+ loadBehaviours(
28
+ serviceName: string,
29
+ callback: (resource: IBehavioursAppBehaviours) => void,
30
+ ): IBehavioursActions;
31
+ load(serviceName: string): Promise<any>;
32
+ findWorkflow(serviceName: string): Promise<any>;
33
+ workflowsFrom(obj: any, dependencies: any): {};
34
+ applicationsBehaviours: any;
35
+ }
@@ -0,0 +1,7 @@
1
+ import { IBehaviours } from "./Behaviours";
2
+
3
+ declare interface Entcore {
4
+ Behaviours: IBehaviours;
5
+ }
6
+ export declare var entcore: Entcore;
7
+ export declare var newLogin: boolean;
@@ -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
+ }
@@ -0,0 +1,55 @@
1
+ export interface Shareable {
2
+ shared: any;
3
+ owner: {
4
+ userId: string;
5
+ displayName: string;
6
+ };
7
+ myRights: any;
8
+ }
9
+ export interface ShareVisible {
10
+ id: string;
11
+ name: string;
12
+ groupDisplayName?: string;
13
+ structureName?: string;
14
+ actions?: any;
15
+ }
16
+ export interface ShareAction {
17
+ name: string[];
18
+ displayName: string;
19
+ type: string;
20
+ priority?: number;
21
+ requires?: any;
22
+ }
23
+ export interface ShareInfosDetail {
24
+ checked: {
25
+ [key: string]: string[];
26
+ };
27
+ checkedInherited: {
28
+ [key: string]: string[];
29
+ };
30
+ visibles: ShareVisible[];
31
+ }
32
+ export interface ShareInfos {
33
+ actions: ShareAction[];
34
+ groups: ShareInfosDetail;
35
+ users: ShareInfosDetail;
36
+ }
37
+ export interface SharePayload {
38
+ groups?: {
39
+ [key: string]: string[];
40
+ };
41
+ bookmarks?: {
42
+ [key: string]: string[];
43
+ };
44
+ users?: {
45
+ [key: string]: string[];
46
+ };
47
+ }
48
+ export declare class Rights<T extends Shareable> {
49
+ private resource;
50
+ constructor(resource: T);
51
+ myRights: any;
52
+ isOwner(): boolean;
53
+ fromBehaviours(prefix?: string): Promise<any>;
54
+ fromObject(obj: any, prefix: string): Promise<any>;
55
+ }
@@ -31,4 +31,3 @@ declare class NotifyFramework implements INotifyFramework {
31
31
  /** The whole framework is a singleton. */
32
32
  export declare const notify: NotifyFramework;
33
33
  export {};
34
- //# sourceMappingURL=Framework.d.ts.map
@@ -53,10 +53,9 @@ export declare const LAYER_NAME: {
53
53
  readonly WIDGETS: "widgets";
54
54
  readonly EXPLORER: "explorer";
55
55
  };
56
- export declare type LayerName = typeof LAYER_NAME[keyof typeof LAYER_NAME];
56
+ export declare type LayerName = (typeof LAYER_NAME)[keyof typeof LAYER_NAME];
57
57
  export declare const EVENT_NAME: {
58
58
  readonly USERPREF_CHANGED: "userprefChanged";
59
59
  readonly SEARCH_RESULTED: "searchResulted";
60
60
  };
61
- export declare type EventName = typeof EVENT_NAME[keyof typeof EVENT_NAME];
62
- //# sourceMappingURL=interfaces.d.ts.map
61
+ export declare type EventName = (typeof EVENT_NAME)[keyof typeof EVENT_NAME];