cozy-harvest-lib 22.5.6 → 22.5.7

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [22.5.7](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@22.5.6...cozy-harvest-lib@22.5.7) (2024-03-27)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Index creation into file data card with sourceAccountIdentifier ([81a0418](https://github.com/cozy/cozy-libs/commit/81a0418ebc723957a8bf6230d7b103c3b448143b))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [22.5.6](https://github.com/cozy/cozy-libs/compare/cozy-harvest-lib@22.5.5...cozy-harvest-lib@22.5.6) (2024-03-26)
7
18
 
8
19
 
@@ -22,9 +22,9 @@ var useFolderToSaveFiles = function useFolderToSaveFiles(folderToSaveId) {
22
22
  var useSourceAccountIdentifierFiles = function useSourceAccountIdentifierFiles(sourceAccountIdentifier, slug) {
23
23
  return useQuery(Q('io.cozy.files').where({
24
24
  'cozyMetadata.sourceAccountIdentifier': sourceAccountIdentifier,
25
- trashed: false,
26
- 'cozyMetadata.createdByApp': slug
27
- }).indexFields(['cozyMetadata.sourceAccountIdentifier', 'cozyMetadata.createdByApp', 'cozyMetadata.createdAt', 'trashed']).sortBy([{
25
+ 'cozyMetadata.createdByApp': slug,
26
+ trashed: false
27
+ }).indexFields(['cozyMetadata.sourceAccountIdentifier', 'cozyMetadata.createdAt', 'cozyMetadata.createdByApp', 'trashed']).sortBy([{
28
28
  'cozyMetadata.sourceAccountIdentifier': 'desc'
29
29
  }, {
30
30
  'cozyMetadata.createdAt': 'desc'
@@ -33,7 +33,7 @@ var useSourceAccountIdentifierFiles = function useSourceAccountIdentifierFiles(s
33
33
  }, {
34
34
  trashed: 'desc'
35
35
  }]).limitBy(5), {
36
- as: "fileDataCard_io.cozy.files/sourceAccountIdentifier/".concat(sourceAccountIdentifier, "/").concat(slug),
36
+ as: "fileDataCard_io.cozy.files/sourceAccountIdentifier/".concat(sourceAccountIdentifier, "/createdByApp/").concat(slug),
37
37
  fetchPolicy: CozyClient.fetchPolicies.olderThan(30 * 1000)
38
38
  });
39
39
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-harvest-lib",
3
- "version": "22.5.6",
3
+ "version": "22.5.7",
4
4
  "description": "Provides logic, modules and components for Cozy's harvest applications.",
5
5
  "main": "dist/index.js",
6
6
  "author": "Cozy",
@@ -107,5 +107,5 @@
107
107
  "react-router-dom": ">=4.3.1"
108
108
  },
109
109
  "sideEffects": false,
110
- "gitHead": "b5c0c718917fdd4197ef3c5c37729091a423b28e"
110
+ "gitHead": "64907333a758e4bbaf3e28100bb968f22cba612a"
111
111
  }
@@ -26,13 +26,13 @@ const useSourceAccountIdentifierFiles = (sourceAccountIdentifier, slug) =>
26
26
  Q('io.cozy.files')
27
27
  .where({
28
28
  'cozyMetadata.sourceAccountIdentifier': sourceAccountIdentifier,
29
- trashed: false,
30
- 'cozyMetadata.createdByApp': slug
29
+ 'cozyMetadata.createdByApp': slug,
30
+ trashed: false
31
31
  })
32
32
  .indexFields([
33
33
  'cozyMetadata.sourceAccountIdentifier',
34
- 'cozyMetadata.createdByApp',
35
34
  'cozyMetadata.createdAt',
35
+ 'cozyMetadata.createdByApp',
36
36
  'trashed'
37
37
  ])
38
38
  .sortBy([
@@ -43,7 +43,7 @@ const useSourceAccountIdentifierFiles = (sourceAccountIdentifier, slug) =>
43
43
  ])
44
44
  .limitBy(5),
45
45
  {
46
- as: `fileDataCard_io.cozy.files/sourceAccountIdentifier/${sourceAccountIdentifier}/${slug}`,
46
+ as: `fileDataCard_io.cozy.files/sourceAccountIdentifier/${sourceAccountIdentifier}/createdByApp/${slug}`,
47
47
  fetchPolicy: CozyClient.fetchPolicies.olderThan(30 * 1000)
48
48
  }
49
49
  )