cozy-client 43.4.1 → 43.5.0

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.
@@ -2703,7 +2703,7 @@ var CozyClient = /*#__PURE__*/function () {
2703
2703
  CozyClient.hooks = CozyClient.hooks || {};
2704
2704
  CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
2705
2705
 
2706
- CozyClient.version = "43.4.1";
2706
+ CozyClient.version = "43.5.0";
2707
2707
 
2708
2708
  _microee.default.mixin(CozyClient);
2709
2709
 
package/dist/types.js CHANGED
@@ -76,6 +76,98 @@ var _dsl = require("./queries/dsl");
76
76
  * @typedef {CozyClientDocument & KonnectorsDocument} IOCozyKonnector - An io.cozy.konnectors document
77
77
  */
78
78
 
79
+ /**
80
+ * @typedef {Object} Developer - name and url for the developer
81
+ * @property {string} name
82
+ * @property {string} url
83
+ */
84
+
85
+ /**
86
+ * @typedef {Object} Intent - (application specific) a list of intents provided by this app
87
+ * @property {string} action
88
+ * @property {string[]} type
89
+ * @property {string} href
90
+ */
91
+
92
+ /**
93
+ * @typedef {Object} Locale - an object with language slug as property, each name property is an object of localized informations
94
+ * @property {string} long_description
95
+ * @property {string[]} screenshots
96
+ * @property {string} short_description
97
+ */
98
+
99
+ /**
100
+ * @typedef {Object} Permission - a map of permissions needed by the app
101
+ * @property {string} type
102
+ * @property {string} [description]
103
+ * @property {string[]} [verbs]
104
+ * @property {string} [selector]
105
+ * @property {string[]} [values]
106
+ */
107
+
108
+ /**
109
+ * @typedef {Object} Route - (application specific) a map of routes for the app
110
+ * @property {string} folder
111
+ * @property {string} index
112
+ * @property {boolean} public
113
+ */
114
+
115
+ /**
116
+ * @typedef {Object} Service - (application specific) a map of the services associated with the app (see cozy-stack services doc for more details)
117
+ * @property {string} type
118
+ * @property {string} file
119
+ * @property {string} [debounce]
120
+ * @property {string} trigger
121
+ * @property {string} trigger_id
122
+ */
123
+
124
+ /**
125
+ * @typedef {Object} Terms - an object defining properties for terms that need to be displayed/accepted by the user when installing the application
126
+ * @property {string} url
127
+ * @property {string} version
128
+ */
129
+
130
+ /**
131
+ * @typedef {Object} AcceptDocumentsFromFlagship - The acceptance document details from cozy-flagship.
132
+ * @property {string[]} accepted_mime_types
133
+ * @property {number} max_number_of_files
134
+ * @property {number} max_size_per_file_in_MB
135
+ * @property {string} route_to_upload - The route provided by the cozy-app to trigger the upload user flow
136
+ */
137
+
138
+ /**
139
+ * @typedef {Object} AppsDocument
140
+ * See https://docs.cozy.io/en/cozy-doctypes/docs/io.cozy.apps/
141
+ *
142
+ * @property {AcceptDocumentsFromFlagship} [accept_documents_from_flagship] - The acceptance document details from flagship.
143
+ * @property {boolean} [accept_from_flagship] - Whether to accept file upload from cozy-flagship.
144
+ * @property {string[]} categories - array of categories for your apps (see authorized categories), it will be ['others'] by default if empty
145
+ * @property {string} checksum
146
+ * @property {string} created_at
147
+ * @property {Developer} developer - name and url for the developer
148
+ * @property {string} editor - the editor’s name to display on the cozy-bar
149
+ * @property {string} icon - path to the icon for the home
150
+ * @property {Intent[]} intents - (application specific) a list of intents provided by this app
151
+ * @property {string[]} langs - Languages available in the app
152
+ * @property {string} licence - the SPDX license identifier
153
+ * @property {Object.<string, Locale>} locales - an object with language slug as property, each name property is an object of localized informations
154
+ * @property {string} name - the name to display on the home
155
+ * @property {string} name_prefix - the prefix to display with the name
156
+ * @property {null} notifications
157
+ * @property {Object.<string, Permission>} permissions - a map of permissions needed by the app
158
+ * @property {Object.<string, Route>} routes - (application specific) a map of routes for the app
159
+ * @property {string[]} screenshots - an array of paths to the screenshots of the application
160
+ * @property {Object.<string, Service>} services - (application specific) a map of the services associated with the app
161
+ * @property {string} slug - the default slug that should never change (alpha-numeric lowercase)
162
+ * @property {string} source - where the files of the app can be downloaded
163
+ * @property {string} state
164
+ * @property {Terms} terms - an object defining properties for terms that need to be displayed/accepted by the user when installing the application
165
+ * @property {"webapp"} type - type of application
166
+ * @property {string} updated_at
167
+ * @property {string} version - the current version number
168
+ * @typedef {CozyClientDocument & AppsDocument} IOCozyApp - An io.cozy.apps document
169
+ */
170
+
79
171
  /**
80
172
  * @typedef {object} TriggersDocument
81
173
  * @property {String} [_id] - document identifier
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-client",
3
- "version": "43.4.1",
3
+ "version": "43.5.0",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.node.js",
6
6
  "browser": "dist/index.js",
@@ -75,5 +75,5 @@
75
75
  "react-native-ios11-devicecheck": "https://github.com/cozy/react-native-devicecheck#app-attest-v0.1"
76
76
  },
77
77
  "sideEffects": false,
78
- "gitHead": "aceb4eec10ed6dac61f5e6ee168be6559225ec89"
78
+ "gitHead": "650a5cc8243d765a77584091d786fba1f9c84de3"
79
79
  }
package/types/types.d.ts CHANGED
@@ -181,6 +181,182 @@ export type KonnectorsDocument = {
181
181
  * - An io.cozy.konnectors document
182
182
  */
183
183
  export type IOCozyKonnector = CozyClientDocument & KonnectorsDocument;
184
+ /**
185
+ * - name and url for the developer
186
+ */
187
+ export type Developer = {
188
+ name: string;
189
+ url: string;
190
+ };
191
+ /**
192
+ * - (application specific) a list of intents provided by this app
193
+ */
194
+ export type Intent = {
195
+ action: string;
196
+ type: string[];
197
+ href: string;
198
+ };
199
+ /**
200
+ * - an object with language slug as property, each name property is an object of localized informations
201
+ */
202
+ export type Locale = {
203
+ long_description: string;
204
+ screenshots: string[];
205
+ short_description: string;
206
+ };
207
+ /**
208
+ * - a map of permissions needed by the app
209
+ */
210
+ export type Permission = {
211
+ type: string;
212
+ description?: string;
213
+ verbs?: string[];
214
+ selector?: string;
215
+ values?: string[];
216
+ };
217
+ /**
218
+ * - (application specific) a map of routes for the app
219
+ */
220
+ export type Route = {
221
+ folder: string;
222
+ index: string;
223
+ public: boolean;
224
+ };
225
+ /**
226
+ * - (application specific) a map of the services associated with the app (see cozy-stack services doc for more details)
227
+ */
228
+ export type Service = {
229
+ type: string;
230
+ file: string;
231
+ debounce?: string;
232
+ trigger: string;
233
+ trigger_id: string;
234
+ };
235
+ /**
236
+ * - an object defining properties for terms that need to be displayed/accepted by the user when installing the application
237
+ */
238
+ export type Terms = {
239
+ url: string;
240
+ version: string;
241
+ };
242
+ /**
243
+ * - The acceptance document details from cozy-flagship.
244
+ */
245
+ export type AcceptDocumentsFromFlagship = {
246
+ accepted_mime_types: string[];
247
+ max_number_of_files: number;
248
+ max_size_per_file_in_MB: number;
249
+ /**
250
+ * - The route provided by the cozy-app to trigger the upload user flow
251
+ */
252
+ route_to_upload: string;
253
+ };
254
+ /**
255
+ * See https://docs.cozy.io/en/cozy-doctypes/docs/io.cozy.apps/
256
+ */
257
+ export type AppsDocument = {
258
+ /**
259
+ * - The acceptance document details from flagship.
260
+ */
261
+ accept_documents_from_flagship?: AcceptDocumentsFromFlagship;
262
+ /**
263
+ * - Whether to accept file upload from cozy-flagship.
264
+ */
265
+ accept_from_flagship?: boolean;
266
+ /**
267
+ * - array of categories for your apps (see authorized categories), it will be ['others'] by default if empty
268
+ */
269
+ categories: string[];
270
+ checksum: string;
271
+ created_at: string;
272
+ /**
273
+ * - name and url for the developer
274
+ */
275
+ developer: Developer;
276
+ /**
277
+ * - the editor’s name to display on the cozy-bar
278
+ */
279
+ editor: string;
280
+ /**
281
+ * - path to the icon for the home
282
+ */
283
+ icon: string;
284
+ /**
285
+ * - (application specific) a list of intents provided by this app
286
+ */
287
+ intents: Intent[];
288
+ /**
289
+ * - Languages available in the app
290
+ */
291
+ langs: string[];
292
+ /**
293
+ * - the SPDX license identifier
294
+ */
295
+ licence: string;
296
+ /**
297
+ * - an object with language slug as property, each name property is an object of localized informations
298
+ */
299
+ locales: {
300
+ [x: string]: Locale;
301
+ };
302
+ /**
303
+ * - the name to display on the home
304
+ */
305
+ name: string;
306
+ /**
307
+ * - the prefix to display with the name
308
+ */
309
+ name_prefix: string;
310
+ notifications: null;
311
+ /**
312
+ * - a map of permissions needed by the app
313
+ */
314
+ permissions: {
315
+ [x: string]: Permission;
316
+ };
317
+ /**
318
+ * - (application specific) a map of routes for the app
319
+ */
320
+ routes: {
321
+ [x: string]: Route;
322
+ };
323
+ /**
324
+ * - an array of paths to the screenshots of the application
325
+ */
326
+ screenshots: string[];
327
+ /**
328
+ * - (application specific) a map of the services associated with the app
329
+ */
330
+ services: {
331
+ [x: string]: Service;
332
+ };
333
+ /**
334
+ * - the default slug that should never change (alpha-numeric lowercase)
335
+ */
336
+ slug: string;
337
+ /**
338
+ * - where the files of the app can be downloaded
339
+ */
340
+ source: string;
341
+ state: string;
342
+ /**
343
+ * - an object defining properties for terms that need to be displayed/accepted by the user when installing the application
344
+ */
345
+ terms: Terms;
346
+ /**
347
+ * - type of application
348
+ */
349
+ type: "webapp";
350
+ updated_at: string;
351
+ /**
352
+ * - the current version number
353
+ */
354
+ version: string;
355
+ };
356
+ /**
357
+ * - An io.cozy.apps document
358
+ */
359
+ export type IOCozyApp = CozyClientDocument & AppsDocument;
184
360
  export type TriggersDocument = {
185
361
  /**
186
362
  * - document identifier