cozy-client 32.2.8 → 32.3.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.
- package/dist/CozyClient.js +6 -3
- package/dist/authentication/mobile.js +2 -2
- package/dist/devtools/Queries.js +2 -2
- package/dist/manifest.js +2 -2
- package/dist/models/doctypes/index.js +12 -0
- package/dist/models/doctypes/locales/en.json +44 -0
- package/dist/models/doctypes/locales/fr.json +44 -0
- package/dist/models/doctypes/locales/index.js +23 -0
- package/dist/models/index.js +5 -1
- package/package.json +3 -3
- package/types/CozyClient.d.ts +10 -3
- package/types/manifest.d.ts +2 -2
- package/types/models/doctypes/index.d.ts +2 -0
- package/types/models/doctypes/locales/index.d.ts +3 -0
- package/types/models/index.d.ts +2 -1
package/dist/CozyClient.js
CHANGED
|
@@ -873,8 +873,11 @@ var CozyClient = /*#__PURE__*/function () {
|
|
|
873
873
|
* - Can only be called with documents from the same doctype
|
|
874
874
|
* - Does not support automatic creation of references
|
|
875
875
|
*
|
|
876
|
-
* @param {CozyClientDocument[]} docs
|
|
877
|
-
* @param {Object} mutationOptions
|
|
876
|
+
* @param {CozyClientDocument[]} docs - Documents from the same doctype
|
|
877
|
+
* @param {Object} mutationOptions - Mutation Options
|
|
878
|
+
* @param {string} [mutationOptions.as] - Mutation id
|
|
879
|
+
* @param {Function} [mutationOptions.update] - Function to update the document
|
|
880
|
+
* @param {Function} [mutationOptions.updateQueries] - Function to update queries
|
|
878
881
|
* @returns {Promise<void>}
|
|
879
882
|
*/
|
|
880
883
|
|
|
@@ -2550,7 +2553,7 @@ var CozyClient = /*#__PURE__*/function () {
|
|
|
2550
2553
|
CozyClient.hooks = CozyClient.hooks || {};
|
|
2551
2554
|
CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
|
|
2552
2555
|
|
|
2553
|
-
CozyClient.version = "32.2
|
|
2556
|
+
CozyClient.version = "32.3.2";
|
|
2554
2557
|
|
|
2555
2558
|
_microee.default.mixin(CozyClient);
|
|
2556
2559
|
|
|
@@ -27,7 +27,7 @@ var win = typeof window !== 'undefined' ? window : null;
|
|
|
27
27
|
/**
|
|
28
28
|
* Open a SafariView Controller and resolve with the URL containing the token
|
|
29
29
|
*
|
|
30
|
-
* @param {string} url
|
|
30
|
+
* @param {string} url - Url containing access_code and state
|
|
31
31
|
* @returns {Promise}
|
|
32
32
|
*/
|
|
33
33
|
|
|
@@ -65,7 +65,7 @@ var authenticateWithSafari = function authenticateWithSafari(url) {
|
|
|
65
65
|
/**
|
|
66
66
|
* Opens an InAppBrowser and resolves with the URL containing the token
|
|
67
67
|
*
|
|
68
|
-
* @param {string} url
|
|
68
|
+
* @param {string} url - Url containing access_code and state
|
|
69
69
|
* @returns {Promise}
|
|
70
70
|
*/
|
|
71
71
|
|
package/dist/devtools/Queries.js
CHANGED
|
@@ -93,7 +93,7 @@ var getClassNameForExecutedTimesQuery = function getClassNameForExecutedTimesQue
|
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
/**
|
|
96
|
-
* @param {{ queryState: QueryState }} props
|
|
96
|
+
* @param {{ queryState: QueryState }} props - Query state containing fetchStatus, lastError
|
|
97
97
|
*/
|
|
98
98
|
|
|
99
99
|
|
|
@@ -106,7 +106,7 @@ var FetchStatus = function FetchStatus(props) {
|
|
|
106
106
|
}, fetchStatus, fetchStatus === 'failed' ? " - ".concat(lastError) : null);
|
|
107
107
|
};
|
|
108
108
|
/**
|
|
109
|
-
* @param {{ queryState: QueryState }} props
|
|
109
|
+
* @param {{ queryState: QueryState }} props - Query state containing definition
|
|
110
110
|
*/
|
|
111
111
|
|
|
112
112
|
|
package/dist/manifest.js
CHANGED
|
@@ -38,9 +38,9 @@ function isPartnershipValid(partnership) {
|
|
|
38
38
|
return Boolean(partnership && partnership.description);
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
|
-
* Normalize app manifest,
|
|
41
|
+
* Normalize app manifest, retro-compatibility for old manifests
|
|
42
42
|
*
|
|
43
|
-
* @param {Manifest} manifest
|
|
43
|
+
* @param {Manifest} manifest - app manifest to normalize
|
|
44
44
|
* @returns {Manifest}
|
|
45
45
|
*/
|
|
46
46
|
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.locales = void 0;
|
|
9
|
+
|
|
10
|
+
var locales = _interopRequireWildcard(require("./locales"));
|
|
11
|
+
|
|
12
|
+
exports.locales = locales;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Permissions": {
|
|
3
|
+
"io": {
|
|
4
|
+
"cozy": {
|
|
5
|
+
"accounts": "Login details",
|
|
6
|
+
"apps": "List of installed applications",
|
|
7
|
+
"apps.suggestions": "Application suggestions",
|
|
8
|
+
"bank.accounts": "Banking accounts",
|
|
9
|
+
"bank.accounts.stats": "Stats on banking accounts",
|
|
10
|
+
"bank.balancehistories": "Bank balances",
|
|
11
|
+
"bank.groups": "Banking groups",
|
|
12
|
+
"bank.operations": "Bank operations",
|
|
13
|
+
"bank.settings": "Banks app settings",
|
|
14
|
+
"bank.recipients": "Banking transfer recipients",
|
|
15
|
+
"bank.recurrence": "Banks recurrence groups",
|
|
16
|
+
"bills": "Bills",
|
|
17
|
+
"certified.carbon_copy": "Carbon copy",
|
|
18
|
+
"certified.electronic_safe": "Electronic safe",
|
|
19
|
+
"coachco2.settings": "CoachCO2 app settings",
|
|
20
|
+
"contacts": "Contacts",
|
|
21
|
+
"contacts.groups": "Contacts groups",
|
|
22
|
+
"contacts.accounts": "Accounts linked to the contacts",
|
|
23
|
+
"files": "Files",
|
|
24
|
+
"files.versions": "Files versions",
|
|
25
|
+
"files.*": "File-related data (files, folders, versions, ...)",
|
|
26
|
+
"identities": "Identities",
|
|
27
|
+
"jobs": "Jobs",
|
|
28
|
+
"konnectors": "Connectors for importing data",
|
|
29
|
+
"konnectors.result": "Connectors results",
|
|
30
|
+
"netflix.views": "Netflix history",
|
|
31
|
+
"netflix.opinions": "Netflix opinions",
|
|
32
|
+
"notifications": "Notifications",
|
|
33
|
+
"oauth.clients": "Connected devices",
|
|
34
|
+
"permissions": "Delegating permissions",
|
|
35
|
+
"photos.albums": "Photo albums",
|
|
36
|
+
"photos.settings": "Photo settings",
|
|
37
|
+
"settings": "Settings",
|
|
38
|
+
"sharings": "Sharing",
|
|
39
|
+
"timeseries.geojson": "Trips",
|
|
40
|
+
"triggers": "Scheduling jobs"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Permissions": {
|
|
3
|
+
"io": {
|
|
4
|
+
"cozy": {
|
|
5
|
+
"accounts": "Identifiants",
|
|
6
|
+
"apps": "Liste des applications installées",
|
|
7
|
+
"apps.suggestions": "Suggestions d'applications",
|
|
8
|
+
"bank.accounts": "Comptes bancaires",
|
|
9
|
+
"bank.accounts.stats": "Statistiques sur les comptes bancaires",
|
|
10
|
+
"bank.balancehistories": "Soldes bancaires",
|
|
11
|
+
"bank.groups": "Groupes de comptes bancaires",
|
|
12
|
+
"bank.operations": "Opérations bancaires",
|
|
13
|
+
"bank.settings": "Paramètres de l'application Banks",
|
|
14
|
+
"bank.recipients": "Bénéficiaires de virements bancaires",
|
|
15
|
+
"bank.recurrence": "Groupes de récurrence bancaire",
|
|
16
|
+
"bills": "Factures",
|
|
17
|
+
"certified.carbon_copy": "Copie carbone",
|
|
18
|
+
"certified.electronic_safe": "Coffre-fort numérique",
|
|
19
|
+
"coachco2.settings": "Paramètres de l'application CoachCO2",
|
|
20
|
+
"contacts": "Contacts",
|
|
21
|
+
"contacts.groups": "Groupe de contacts",
|
|
22
|
+
"contacts.accounts": "Comptes associés aux contacts",
|
|
23
|
+
"files": "Fichiers",
|
|
24
|
+
"files.versions": "Versions des fichiers",
|
|
25
|
+
"files.*": "Données liées aux fichiers (fichiers, dossiers, versions, ...)",
|
|
26
|
+
"identities": "Identities",
|
|
27
|
+
"jobs": "Tâches à exécuter",
|
|
28
|
+
"konnectors": "Connecteurs pour importer des données",
|
|
29
|
+
"konnectors.result": "Résultats de connecteurs",
|
|
30
|
+
"netflix.views": "Historique Netflix",
|
|
31
|
+
"netflix.opinions": "Opinions Netflix",
|
|
32
|
+
"notifications": "Notifications",
|
|
33
|
+
"oauth.clients": "Appareils connectés",
|
|
34
|
+
"permissions": "Délégation de permissions",
|
|
35
|
+
"photos.albums": "Albums photos",
|
|
36
|
+
"photos.settings": "Paramètres des photos",
|
|
37
|
+
"settings": "Paramètres",
|
|
38
|
+
"sharings": "Partage",
|
|
39
|
+
"timeseries.geojson": "Déplacements",
|
|
40
|
+
"triggers": "Planification de tâches à exécuter dans le futur"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports, "fr", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function get() {
|
|
11
|
+
return _fr.default;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
Object.defineProperty(exports, "en", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function get() {
|
|
17
|
+
return _en.default;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
var _fr = _interopRequireDefault(require("./fr.json"));
|
|
22
|
+
|
|
23
|
+
var _en = _interopRequireDefault(require("./en.json"));
|
package/dist/models/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWild
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.dacc = exports.sharing = exports.timeseries = exports.document = exports.contact = exports.utils = exports.permission = exports.note = exports.account = exports.folder = exports.file = exports.applications = exports.instance = exports.trigger = exports.accounts = exports.triggers = void 0;
|
|
8
|
+
exports.doctypes = exports.dacc = exports.sharing = exports.timeseries = exports.document = exports.contact = exports.utils = exports.permission = exports.note = exports.account = exports.folder = exports.file = exports.applications = exports.instance = exports.trigger = exports.accounts = exports.triggers = void 0;
|
|
9
9
|
|
|
10
10
|
var trigger = _interopRequireWildcard(require("./trigger"));
|
|
11
11
|
|
|
@@ -62,6 +62,10 @@ exports.sharing = sharing;
|
|
|
62
62
|
var dacc = _interopRequireWildcard(require("./dacc"));
|
|
63
63
|
|
|
64
64
|
exports.dacc = dacc;
|
|
65
|
+
|
|
66
|
+
var doctypes = _interopRequireWildcard(require("./doctypes"));
|
|
67
|
+
|
|
68
|
+
exports.doctypes = doctypes;
|
|
65
69
|
// For backward compatibility before 9.0.0
|
|
66
70
|
var triggers = trigger;
|
|
67
71
|
exports.triggers = triggers;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-client",
|
|
3
|
-
"version": "32.2
|
|
3
|
+
"version": "32.3.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.node.js",
|
|
6
6
|
"browser": "dist/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@types/jest": "^26.0.20",
|
|
19
19
|
"@types/lodash": "^4.14.170",
|
|
20
20
|
"btoa": "^1.2.1",
|
|
21
|
-
"cozy-stack-client": "^32.2
|
|
21
|
+
"cozy-stack-client": "^32.3.2",
|
|
22
22
|
"json-stable-stringify": "^1.0.1",
|
|
23
23
|
"lodash": "^4.17.13",
|
|
24
24
|
"microee": "^0.0.6",
|
|
@@ -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": "
|
|
76
|
+
"gitHead": "5517f3f84a4d9d3e129f7bb74ea7d44dd66fa1a0"
|
|
77
77
|
}
|
package/types/CozyClient.d.ts
CHANGED
|
@@ -331,11 +331,18 @@ declare class CozyClient {
|
|
|
331
331
|
* - Can only be called with documents from the same doctype
|
|
332
332
|
* - Does not support automatic creation of references
|
|
333
333
|
*
|
|
334
|
-
* @param {CozyClientDocument[]} docs
|
|
335
|
-
* @param {Object} mutationOptions
|
|
334
|
+
* @param {CozyClientDocument[]} docs - Documents from the same doctype
|
|
335
|
+
* @param {Object} mutationOptions - Mutation Options
|
|
336
|
+
* @param {string} [mutationOptions.as] - Mutation id
|
|
337
|
+
* @param {Function} [mutationOptions.update] - Function to update the document
|
|
338
|
+
* @param {Function} [mutationOptions.updateQueries] - Function to update queries
|
|
336
339
|
* @returns {Promise<void>}
|
|
337
340
|
*/
|
|
338
|
-
saveAll(docs: CozyClientDocument[], mutationOptions?:
|
|
341
|
+
saveAll(docs: CozyClientDocument[], mutationOptions?: {
|
|
342
|
+
as?: string;
|
|
343
|
+
update?: Function;
|
|
344
|
+
updateQueries?: Function;
|
|
345
|
+
}): Promise<void>;
|
|
339
346
|
ensureCozyMetadata(document: any, options?: {
|
|
340
347
|
event: string;
|
|
341
348
|
}): any;
|
package/types/manifest.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ export function sanitizeCategories(categories: any): any;
|
|
|
3
3
|
export function areTermsValid(terms: any): boolean;
|
|
4
4
|
export function isPartnershipValid(partnership: any): boolean;
|
|
5
5
|
/**
|
|
6
|
-
* Normalize app manifest,
|
|
6
|
+
* Normalize app manifest, retro-compatibility for old manifests
|
|
7
7
|
*
|
|
8
|
-
* @param {Manifest} manifest
|
|
8
|
+
* @param {Manifest} manifest - app manifest to normalize
|
|
9
9
|
* @returns {Manifest}
|
|
10
10
|
*/
|
|
11
11
|
export function sanitize(manifest: Manifest): Manifest;
|
package/types/models/index.d.ts
CHANGED
|
@@ -14,4 +14,5 @@ import * as document from "./document";
|
|
|
14
14
|
import * as timeseries from "./timeseries";
|
|
15
15
|
import * as sharing from "./sharing";
|
|
16
16
|
import * as dacc from "./dacc";
|
|
17
|
-
|
|
17
|
+
import * as doctypes from "./doctypes";
|
|
18
|
+
export { trigger, instance, applications, file, folder, note, account, permission, utils, contact, document, timeseries, sharing, dacc, doctypes };
|