cozy-client 24.10.2 → 25.0.3

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.
@@ -46,6 +46,39 @@ export function hasMetadataAttribute({ file, attribute }: {
46
46
  file: IOCozyFile;
47
47
  attribute: string;
48
48
  }): boolean;
49
+ export function getFullpath(client: CozyClient, dirId: string, name: string): Promise<string>;
50
+ export function move(client: CozyClient, fileId: string, destination: {
51
+ folderId: string;
52
+ path: string;
53
+ }, force?: boolean): Promise<any>;
54
+ export function overrideFileForPath(client: CozyClient, dirPath: string, file: object, metadata: object): Promise<IOCozyFile>;
55
+ export function generateNewFileNameOnConflict(filenameWithoutExtension: string): string;
56
+ export function generateFileNameForRevision(file: IOCozyFile, revision: object, f: Function): string;
57
+ export function uploadFileWithConflictStrategy(client: CozyClient, file: string | ArrayBuffer, options: FileUploadOptions): any;
58
+ export function readMobileFile(fileURL: string): Promise<any>;
59
+ export function doMobileUpload(client: CozyClient, fileURL: string, options: FileUploadOptions): Promise<any>;
60
+ export type FileUploadOptions = {
61
+ /**
62
+ * - The file name to upload
63
+ */
64
+ name?: string;
65
+ /**
66
+ * - The dirId to upload the file to
67
+ */
68
+ dirId?: string;
69
+ /**
70
+ * - An object containing the metadata to attach
71
+ */
72
+ metadata?: object;
73
+ /**
74
+ * - The file Content-Type
75
+ */
76
+ contentType?: string;
77
+ /**
78
+ * - Erase / rename
79
+ */
80
+ conflictStrategy?: string;
81
+ };
49
82
  import { IOCozyFile } from "../types";
50
83
  import CozyClient from "../CozyClient";
51
84
  import { QueryResult } from "../types";
package/types/types.d.ts CHANGED
@@ -99,6 +99,10 @@ export type CozyClientDocument = {
99
99
  * - Id of the document
100
100
  */
101
101
  _id?: string;
102
+ /**
103
+ * - Id of the document
104
+ */
105
+ id?: string;
102
106
  /**
103
107
  * - Type of the document
104
108
  */