cozy-client 48.1.1 → 48.3.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.
@@ -2830,7 +2830,7 @@ var CozyClient = /*#__PURE__*/function () {
2830
2830
  CozyClient.hooks = CozyClient.hooks || {};
2831
2831
  CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
2832
2832
 
2833
- CozyClient.version = "48.1.1";
2833
+ CozyClient.version = "48.3.0";
2834
2834
 
2835
2835
  _microee.default.mixin(CozyClient);
2836
2836
 
@@ -233,7 +233,7 @@
233
233
  "tax_timetable": {
234
234
  "number": "Reference tax number"
235
235
  },
236
- "country": "Beneficiary nationality",
236
+ "country": "Document issuing country",
237
237
  "refTaxIncome": "Reference tax income",
238
238
  "contractType": "Contract type",
239
239
  "noticePeriod": "Expiration alert",
@@ -233,7 +233,7 @@
233
233
  "tax_timetable": {
234
234
  "number": "Numéro fiscal de référence"
235
235
  },
236
- "country": "Nationalité du bénéficiaire",
236
+ "country": "Pays émetteur du document",
237
237
  "refTaxIncome": "Revenu fiscal de référence",
238
238
  "contractType": "Type de contrat",
239
239
  "noticePeriod": "Alerte d’expiration",
@@ -458,7 +458,7 @@ var formatInformationMetadataValue = function formatInformationMetadataValue(val
458
458
  }
459
459
 
460
460
  if (name === 'country' && (0, _countries.isValidCountryCodeTranslation)(lang, value)) {
461
- return tCountry("nationalities.".concat(value));
461
+ return tCountry("countries.".concat(value));
462
462
  }
463
463
 
464
464
  return value;
@@ -226,7 +226,8 @@ describe('Expiration', () => {
226
226
  it('should return value with suffix locale', () => {
227
227
  const res = paperModel.formatInformationMetadataValue('88', {
228
228
  name: 'noticePeriod',
229
- lang: 'en'
229
+ lang: 'en',
230
+ qualificationLabel: 'national_id_card'
230
231
  })
231
232
 
232
233
  expect(res).toEqual('88 days')
@@ -235,7 +236,8 @@ describe('Expiration', () => {
235
236
  it('should return "noInfo" value', () => {
236
237
  const res = paperModel.formatInformationMetadataValue('', {
237
238
  name: 'metadataName',
238
- lang: 'en'
239
+ lang: 'en',
240
+ qualificationLabel: 'national_id_card'
239
241
  })
240
242
 
241
243
  expect(res).toEqual('No information')
@@ -244,7 +246,8 @@ describe('Expiration', () => {
244
246
  it('should return value if not in other case', () => {
245
247
  const res = paperModel.formatInformationMetadataValue('metadataValue', {
246
248
  name: 'metadataName',
247
- lang: 'en'
249
+ lang: 'en',
250
+ qualificationLabel: 'national_id_card'
248
251
  })
249
252
 
250
253
  expect(res).toEqual('metadataValue')
@@ -253,10 +256,11 @@ describe('Expiration', () => {
253
256
  it('should return nationality', () => {
254
257
  const res = paperModel.formatInformationMetadataValue('FR', {
255
258
  name: 'country',
256
- lang: 'en'
259
+ lang: 'en',
260
+ qualificationLabel: 'national_id_card'
257
261
  })
258
262
 
259
- expect(res).toEqual('French')
263
+ expect(res).toEqual('France')
260
264
  })
261
265
  })
262
266
  })
package/dist/types.js CHANGED
@@ -456,8 +456,8 @@ var _dsl = require("./queries/dsl");
456
456
 
457
457
  /**
458
458
  * @typedef {object} NextcloudFile - An io.cozy.remote.nextcloud document after normalization
459
- * @property {string} [_id] - Id of the file
460
- * @property {string} [id] - Id of the file
459
+ * @property {string} _id - Id of the file
460
+ * @property {string} id - Id of the file
461
461
  * @property {NextcloudFilesDoctype} _type - Doctype of the folder
462
462
  * @property {string} name - Name of the file
463
463
  * @property {string} path - Path to the file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-client",
3
- "version": "48.1.1",
3
+ "version": "48.3.0",
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": "^48.0.0",
21
+ "cozy-stack-client": "^48.2.0",
22
22
  "date-fns": "2.29.3",
23
23
  "json-stable-stringify": "^1.0.1",
24
24
  "lodash": "^4.17.13",
@@ -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": "d56d11a4cd6c2bbb4df4b778f9bd2a699aaca849"
78
+ "gitHead": "c513017b1b4b13dc184dc17494a9779e366a937a"
79
79
  }
package/types/types.d.ts CHANGED
@@ -813,11 +813,11 @@ export type NextcloudFile = {
813
813
  /**
814
814
  * - Id of the file
815
815
  */
816
- _id?: string;
816
+ _id: string;
817
817
  /**
818
818
  * - Id of the file
819
819
  */
820
- id?: string;
820
+ id: string;
821
821
  /**
822
822
  * - Doctype of the folder
823
823
  */