cozy-client 33.0.1 → 33.0.2

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.
@@ -2636,7 +2636,7 @@ var CozyClient = /*#__PURE__*/function () {
2636
2636
  CozyClient.hooks = CozyClient.hooks || {};
2637
2637
  CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
2638
2638
 
2639
- CozyClient.version = "33.0.1";
2639
+ CozyClient.version = "33.0.2";
2640
2640
 
2641
2641
  _microee.default.mixin(CozyClient);
2642
2642
 
@@ -100,8 +100,10 @@ var isDirectory = function isDirectory(file) {
100
100
  return file && file.type === DIR_TYPE;
101
101
  };
102
102
  /**
103
+ * Is file param a correct note
103
104
  *
104
105
  * @param {IOCozyFile} file io.cozy.files
106
+ * @returns {boolean}
105
107
  */
106
108
 
107
109
 
package/dist/types.js CHANGED
@@ -163,12 +163,28 @@ var _dsl = require("./queries/dsl");
163
163
  * @property {object} [cozyMetadata] - Cozy Metadata
164
164
  */
165
165
 
166
+ /**
167
+ * Metadata on io.cozy.files documents
168
+ *
169
+ * This is a first step, to continue
170
+ *
171
+ * Filled according to:
172
+ * https://docs.cozy.io/en/cozy-doctypes/docs/io.cozy.files_metadata/
173
+ * https://docs.cozy.io/en/cozy-doctypes/docs/io.cozy.notes/
174
+ *
175
+ * @typedef {object} FileMetadata - A io.cozy.files document's metadata
176
+ * @property {object} [content] - The Note's content. See https://prosemirror.net/docs/ref/#model for more informations
177
+ * @property {object} [schema] - the schema used by prosemirror (with notes and marks serialized as arrays to preserve the order).
178
+ * @property {string} [title] - the initial title of the note (that will also be used for the file name)
179
+ * @property {number} [version] - Number of a note
180
+ */
181
+
166
182
  /**
167
183
  * @typedef {object} FileDocument - An io.cozy.files document
168
184
  * @property {string} _id - Id of the file
169
185
  * @property {FilesDoctype} _type - Doctype of the file
170
186
  * @property {string} name - Name of the file
171
- * @property {object} metadata - Metadata of the file
187
+ * @property {FileMetadata} metadata - Metadata of the file
172
188
  * @property {string} type - Type of the file
173
189
  * @property {string} class - Class of the file
174
190
  * @property {string} mime - Mime of the file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-client",
3
- "version": "33.0.1",
3
+ "version": "33.0.2",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.node.js",
6
6
  "browser": "dist/index.js",
@@ -73,5 +73,5 @@
73
73
  "react-native-ios11-devicecheck": "https://github.com/cozy/react-native-devicecheck#app-attest-v0.1"
74
74
  },
75
75
  "sideEffects": false,
76
- "gitHead": "4314ca7d19acb10bf4bb153e14f9152c32c8e0ff"
76
+ "gitHead": "c00ba115384a2ba0f562adb4fa5e141ea64dbe45"
77
77
  }
package/types/types.d.ts CHANGED
@@ -174,6 +174,27 @@ export type CozyClientDocument = {
174
174
  */
175
175
  cozyMetadata?: object;
176
176
  };
177
+ /**
178
+ * - A io.cozy.files document's metadata
179
+ */
180
+ export type FileMetadata = {
181
+ /**
182
+ * - The Note's content. See https://prosemirror.net/docs/ref/#model for more informations
183
+ */
184
+ content?: object;
185
+ /**
186
+ * - the schema used by prosemirror (with notes and marks serialized as arrays to preserve the order).
187
+ */
188
+ schema?: object;
189
+ /**
190
+ * - the initial title of the note (that will also be used for the file name)
191
+ */
192
+ title?: string;
193
+ /**
194
+ * - Number of a note
195
+ */
196
+ version?: number;
197
+ };
177
198
  /**
178
199
  * - An io.cozy.files document
179
200
  */
@@ -193,7 +214,7 @@ export type FileDocument = {
193
214
  /**
194
215
  * - Metadata of the file
195
216
  */
196
- metadata: object;
217
+ metadata: FileMetadata;
197
218
  /**
198
219
  * - Type of the file
199
220
  */