@edifice.io/client 2.6.7-develop-integration.20261001195124 → 2.6.7-develop-b2school.20261002153216

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.
@@ -7,10 +7,8 @@ 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';
11
10
  import { IdiomService } from '../idiom/Service';
12
11
  import { INotifyFramework } from '../notify/interfaces';
13
- import { NextcloudService } from '../nextcloud/Service';
14
12
  import { IBehaviourService, IResourceService, IWebResourceService } from '../resources/interface';
15
13
  import { RightService } from '../rights/Service';
16
14
  import { SessionService } from '../session/Service';
@@ -26,10 +24,8 @@ export interface IOdeServices {
26
24
  conf(): ConfService;
27
25
  data(): IDataService;
28
26
  directory(): DirectoryService;
29
- googledrive(): GoogleDriveService;
30
27
  http(): HttpService;
31
28
  idiom(): IdiomService;
32
- nextcloud(): NextcloudService;
33
29
  notify(): INotifyFramework;
34
30
  resource(application: App, resourceType?: ResourceType): IResourceService & IWebResourceService;
35
31
  behaviour(application: App, resourceType: ResourceType): IBehaviourService;
@@ -47,10 +43,8 @@ export declare class OdeServices implements IOdeServices {
47
43
  private _conf;
48
44
  private _data;
49
45
  private _directory;
50
- private _googledrive;
51
46
  private _http;
52
47
  private _idiom;
53
- private _nextcloud;
54
48
  private _notify;
55
49
  private _rights;
56
50
  private _session;
@@ -67,10 +61,8 @@ export declare class OdeServices implements IOdeServices {
67
61
  conf(): ConfService;
68
62
  data(): DataService;
69
63
  directory(): DirectoryService;
70
- googledrive(): GoogleDriveService;
71
64
  http(): HttpService;
72
65
  idiom(): IdiomService;
73
- nextcloud(): NextcloudService;
74
66
  notify(): INotifyFramework;
75
67
  resource(application: App, resourceType?: ResourceType): IResourceService & IWebResourceService;
76
68
  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-integration.20261001195124",
3
+ "version": "2.6.7-develop-b2school.20261002153216",
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-integration.20261001195124"
40
+ "@edifice.io/utilities": "2.6.7-develop-b2school.20261002153216"
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-integration.20261001195124"
52
+ "@edifice.io/config": "2.6.7-develop-b2school.20261002153216"
53
53
  },
54
54
  "scripts": {
55
55
  "build": "vite build",
@@ -1,52 +0,0 @@
1
- import { IOdeServices } from '../services/OdeServices';
2
- import { WorkspaceElement, WorkspaceVisibility } from '../workspace/interface';
3
- import { GoogleDriveCopyFailure, GoogleDriveDocument } from './interface';
4
- /**
5
- * Raised when the backend failed to copy at least one document into the
6
- * workspace. Carries the documents that were copied anyway, so a caller can
7
- * still use them instead of discarding the whole selection.
8
- */
9
- export declare class GoogleDriveCopyError extends Error {
10
- readonly copied: WorkspaceElement[];
11
- readonly failures: GoogleDriveCopyFailure[];
12
- constructor(message: string, copied: WorkspaceElement[], failures: GoogleDriveCopyFailure[]);
13
- }
14
- export declare class GoogleDriveService {
15
- private context;
16
- constructor(context: IOdeServices);
17
- private get http();
18
- /**
19
- * List a user's Google Drive documents and folders inside a given folder.
20
- *
21
- * Google Drive addresses its entries by opaque id, not by path: `parentId` is
22
- * the id of the folder to list. The query param is nonetheless named `path`,
23
- * as the backend kept the name it uses for Nextcloud.
24
- *
25
- * @param userId - the id of the user whose files are listed.
26
- * @param parentId - id of the folder to list; the Drive root when omitted.
27
- */
28
- listDocuments(userId: string, parentId?: string): Promise<GoogleDriveDocument[]>;
29
- /**
30
- * Copy Google Drive documents into the entcore workspace.
31
- *
32
- * @param userId - the id of the user whose files are copied.
33
- * @param ids - Drive ids of the documents to copy.
34
- * @param parentId - the workspace folder to copy into; user's root when omitted.
35
- * @param params.application - the application the documents are added from.
36
- * @param params.visibility - "protected" files the documents under the
37
- * documents added from applications, the way an upload does.
38
- * @throws GoogleDriveCopyError when the backend reports at least one failure.
39
- */
40
- copyDocumentToWorkspace(userId: string, ids: string[], parentId?: string, params?: {
41
- application?: string;
42
- visibility?: WorkspaceVisibility;
43
- }): Promise<WorkspaceElement[]>;
44
- /**
45
- * Build the URL to download/preview a Google Drive document.
46
- * There is no dedicated thumbnail endpoint on the backend, so this is also
47
- * used as an image preview source for image documents.
48
- * @param userId - the id of the user who owns the file.
49
- * @param doc - the document to build the URL for.
50
- */
51
- getFileUrl(userId: string, doc: GoogleDriveDocument): string;
52
- }
@@ -1,41 +0,0 @@
1
- /** Mime type identifying a folder in Google Drive. */
2
- export declare const GOOGLE_DRIVE_FOLDER_MIME_TYPE = "application/vnd.google-apps.folder";
3
- /** A user's Google Drive document or folder, as consumed by the frontend. */
4
- export interface GoogleDriveDocument {
5
- /** Drive file id. Used as a unique id, and as the parent id when browsing. */
6
- id: string;
7
- name: string;
8
- ownerDisplayName?: string;
9
- contentType?: string;
10
- size?: number;
11
- isFolder: boolean;
12
- lastModified?: string;
13
- shared?: boolean;
14
- }
15
- /** Raw DTO returned by the `/googledrive/files/user/:userId` endpoint. */
16
- export interface GoogleDriveDocumentResponse {
17
- id: string;
18
- name: string;
19
- mimeType: string;
20
- size?: number;
21
- modifiedTime?: string;
22
- shared?: boolean;
23
- ownerDisplayName?: string;
24
- }
25
- /**
26
- * Per-document outcome returned by the copy-to-workspace endpoint. Unlike the
27
- * Nextcloud equivalent, which returns a flat array of workspace documents, each
28
- * entry here wraps the created document under `workspace` and carries its own
29
- * status, so a copy can partially fail.
30
- */
31
- export interface GoogleDriveCopyResult<TWorkspaceElement> {
32
- id: string;
33
- status?: 'ok' | 'error';
34
- message?: string;
35
- workspace?: TWorkspaceElement | null;
36
- }
37
- /** A single document the backend failed to copy into the workspace. */
38
- export interface GoogleDriveCopyFailure {
39
- id: string;
40
- message?: string;
41
- }
@@ -1,42 +0,0 @@
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
- }
@@ -1,27 +0,0 @@
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
- }