cozy-client 51.0.0 → 51.0.1

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.
@@ -3032,7 +3032,7 @@ var CozyClient = /*#__PURE__*/function () {
3032
3032
  CozyClient.hooks = CozyClient.hooks || {};
3033
3033
  CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
3034
3034
 
3035
- CozyClient.version = "51.0.0";
3035
+ CozyClient.version = "51.0.1";
3036
3036
 
3037
3037
  _microee.default.mixin(CozyClient);
3038
3038
 
package/dist/types.js CHANGED
@@ -426,6 +426,20 @@ var _dsl = require("./queries/dsl");
426
426
  * @property {boolean} [favorite] - Whether the document is marked as favorite
427
427
  */
428
428
 
429
+ /**
430
+ * @typedef {object} UploadedBy
431
+ * @property {string} slug - The slug of the application that has made the upload
432
+ * @property {string} version - The version number of this application
433
+ */
434
+
435
+ /**
436
+ * @typedef {object} CozyMetadataFile - Extra fields inside cozyMetadata only for io.cozy.files documents
437
+ * @property {string} [createdOn] - The instance URL on which the file has created (useful if the file is shared between several cozy instances)
438
+ * @property {string} [uploadedAt] - The server date/time of the last upload (when the content was changed)
439
+ * @property {string} [uploadedOn] - The instance URL on which the file content was changed the last time
440
+ * @property {UploadedBy[]} [uploadedBy] - Information on which app has made the last upload
441
+ */
442
+
429
443
  /**
430
444
  * @typedef {object} CozyClientDocumentMeta - Meta object as specified by JSON-API (https://jsonapi.org/format/#document-meta)
431
445
  * @property {string} [rev] - Current revision of the document
@@ -493,6 +507,7 @@ var _dsl = require("./queries/dsl");
493
507
  * @property {string} updated_at - Last modification date of the file
494
508
  * @property {number} size - Size of the file, in bytes
495
509
  * @property {boolean} trashed - Whether the folder is in the trash
510
+ * @property {CozyMetadata & CozyMetadataFile} [cozyMetadata] - Cozy Metadata
496
511
  * @typedef {CozyClientDocument & FileDocument} IOCozyFile - An io.cozy.files document
497
512
  */
498
513
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-client",
3
- "version": "51.0.0",
3
+ "version": "51.0.1",
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": "5039e2507091aefae6f9adce232bd54c2f566712"
76
+ "gitHead": "6b03c58ebef0e5c8455490b3300e36c803ca0565"
77
77
  }
package/types/types.d.ts CHANGED
@@ -705,6 +705,37 @@ export type CozyMetadata = {
705
705
  */
706
706
  favorite?: boolean;
707
707
  };
708
+ export type UploadedBy = {
709
+ /**
710
+ * - The slug of the application that has made the upload
711
+ */
712
+ slug: string;
713
+ /**
714
+ * - The version number of this application
715
+ */
716
+ version: string;
717
+ };
718
+ /**
719
+ * - Extra fields inside cozyMetadata only for io.cozy.files documents
720
+ */
721
+ export type CozyMetadataFile = {
722
+ /**
723
+ * - The instance URL on which the file has created (useful if the file is shared between several cozy instances)
724
+ */
725
+ createdOn?: string;
726
+ /**
727
+ * - The server date/time of the last upload (when the content was changed)
728
+ */
729
+ uploadedAt?: string;
730
+ /**
731
+ * - The instance URL on which the file content was changed the last time
732
+ */
733
+ uploadedOn?: string;
734
+ /**
735
+ * - Information on which app has made the last upload
736
+ */
737
+ uploadedBy?: UploadedBy[];
738
+ };
708
739
  /**
709
740
  * - Meta object as specified by JSON-API (https://jsonapi.org/format/#document-meta)
710
741
  */
@@ -894,6 +925,10 @@ export type FileDocument = {
894
925
  * - Whether the folder is in the trash
895
926
  */
896
927
  trashed: boolean;
928
+ /**
929
+ * - Cozy Metadata
930
+ */
931
+ cozyMetadata?: CozyMetadata & CozyMetadataFile;
897
932
  };
898
933
  /**
899
934
  * - An io.cozy.files document