@edifice.io/client 2.6.7-develop-b2school.20261002174012 → 2.6.7-develop-integration.20261003123008

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,42 @@
1
+ import { IOdeServices } from '../services/OdeServices';
2
+ import { WorkspaceElement, WorkspaceVisibility } from '../workspace/interface';
3
+ import { NextcloudDocument } from './interface';
4
+ export declare class NextcloudService {
5
+ private context;
6
+ constructor(context: IOdeServices);
7
+ private get http();
8
+ /**
9
+ * List a user's Nextcloud documents and folders at a given path.
10
+ * @param userId - the id of the user whose files are listed.
11
+ * @param path - path to list, relative to the user's Nextcloud root; root when omitted.
12
+ */
13
+ listDocuments(userId: string, path?: string): Promise<NextcloudDocument[]>;
14
+ /**
15
+ * Copy Nextcloud documents into the entcore workspace.
16
+ * @param userId - the id of the user whose files are copied.
17
+ * @param paths - paths of the documents to copy, relative to the user's Nextcloud root.
18
+ * @param parentId - the workspace folder to copy into; user's root when omitted.
19
+ * @param params.application - the application the documents are added from.
20
+ * @param params.visibility - "protected" files the documents under the
21
+ * documents added from applications, the way an upload does.
22
+ */
23
+ copyDocumentToWorkspace(userId: string, paths: string[], parentId?: string, params?: {
24
+ application?: string;
25
+ visibility?: WorkspaceVisibility;
26
+ }): Promise<WorkspaceElement[]>;
27
+ /**
28
+ * Check whether a user has an active Nextcloud OAuth2 connection.
29
+ * @param userId - the id of the user to check.
30
+ */
31
+ getOauth2Status(userId: string): Promise<{
32
+ connected: boolean;
33
+ }>;
34
+ /**
35
+ * Build the URL to download/preview a Nextcloud document.
36
+ * There is no dedicated thumbnail endpoint on the backend, so this is also
37
+ * used as an image preview source for image documents.
38
+ * @param userId - the id of the user who owns the file.
39
+ * @param doc - the document to build the URL for.
40
+ */
41
+ getFileUrl(userId: string, doc: NextcloudDocument): string;
42
+ }
@@ -0,0 +1,27 @@
1
+ /** A user's Nextcloud document or folder, as consumed by the frontend. */
2
+ export interface NextcloudDocument {
3
+ /** Path of this entry, relative to the user's Nextcloud root. Used as a unique id. */
4
+ path: string;
5
+ name: string;
6
+ ownerDisplayName?: string;
7
+ contentType?: string;
8
+ size?: number;
9
+ favorite?: boolean;
10
+ etag?: string;
11
+ fileId?: string;
12
+ isFolder: boolean;
13
+ lastModified?: string;
14
+ }
15
+ /** Raw DTO returned by the `/nextcloud/files/user/:userId` endpoint. */
16
+ export interface NextcloudDocumentResponse {
17
+ path: string;
18
+ displayname: string;
19
+ ownerDisplayName?: string;
20
+ contentType?: string;
21
+ size?: number;
22
+ favorite?: boolean;
23
+ etag?: string;
24
+ fileId?: string;
25
+ isFolder: boolean;
26
+ lastModified?: string;
27
+ }
@@ -7,8 +7,10 @@ import { IDataService } from '../data/interface';
7
7
  import { DirectoryService } from '../directory/Service';
8
8
  import { EmbedderService } from '../embedder/Service';
9
9
  import { App, ResourceType } from '../globals';
10
+ import { GoogleDriveService } from '../googledrive/Service';
10
11
  import { IdiomService } from '../idiom/Service';
11
12
  import { INotifyFramework } from '../notify/interfaces';
13
+ import { NextcloudService } from '../nextcloud/Service';
12
14
  import { IBehaviourService, IResourceService, IWebResourceService } from '../resources/interface';
13
15
  import { RightService } from '../rights/Service';
14
16
  import { SessionService } from '../session/Service';
@@ -24,8 +26,10 @@ export interface IOdeServices {
24
26
  conf(): ConfService;
25
27
  data(): IDataService;
26
28
  directory(): DirectoryService;
29
+ googledrive(): GoogleDriveService;
27
30
  http(): HttpService;
28
31
  idiom(): IdiomService;
32
+ nextcloud(): NextcloudService;
29
33
  notify(): INotifyFramework;
30
34
  resource(application: App, resourceType?: ResourceType): IResourceService & IWebResourceService;
31
35
  behaviour(application: App, resourceType: ResourceType): IBehaviourService;
@@ -43,8 +47,10 @@ export declare class OdeServices implements IOdeServices {
43
47
  private _conf;
44
48
  private _data;
45
49
  private _directory;
50
+ private _googledrive;
46
51
  private _http;
47
52
  private _idiom;
53
+ private _nextcloud;
48
54
  private _notify;
49
55
  private _rights;
50
56
  private _session;
@@ -61,8 +67,10 @@ export declare class OdeServices implements IOdeServices {
61
67
  conf(): ConfService;
62
68
  data(): DataService;
63
69
  directory(): DirectoryService;
70
+ googledrive(): GoogleDriveService;
64
71
  http(): HttpService;
65
72
  idiom(): IdiomService;
73
+ nextcloud(): NextcloudService;
66
74
  notify(): INotifyFramework;
67
75
  resource(application: App, resourceType?: ResourceType): IResourceService & IWebResourceService;
68
76
  behaviour(application: App, resourceType: ResourceType): IBehaviourService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/client",
3
- "version": "2.6.7-develop-b2school.20261002174012",
3
+ "version": "2.6.7-develop-integration.20261003123008",
4
4
  "description": "Edifice TypeScript Client",
5
5
  "keywords": [
6
6
  "typescript",
@@ -37,7 +37,7 @@
37
37
  "axios": "1.13.4",
38
38
  "core-js": "3.48.0",
39
39
  "ua-parser-js": "2.0.9",
40
- "@edifice.io/utilities": "2.6.7-develop-b2school.20261002174012"
40
+ "@edifice.io/utilities": "2.6.7-develop-integration.20261003123008"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/jasmine": "5.1.4",
@@ -49,7 +49,7 @@
49
49
  "typedoc-plugin-markdown": "3.17.1",
50
50
  "vite": "5.4.14",
51
51
  "vite-plugin-dts": "4.5.4",
52
- "@edifice.io/config": "2.6.7-develop-b2school.20261002174012"
52
+ "@edifice.io/config": "2.6.7-develop-integration.20261003123008"
53
53
  },
54
54
  "scripts": {
55
55
  "build": "vite build",