cozy-client 27.8.0 → 27.11.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.
- package/CHANGELOG.md +39 -0
- package/dist/CozyClient.js +1 -1
- package/dist/assets/qualifications.json +5 -0
- package/dist/flagship-certification/README.md +2 -2
- package/dist/models/document/documentTypeData.js +14 -4
- package/dist/models/document/locales/en.json +5 -3
- package/dist/models/document/locales/fr.json +5 -3
- package/dist/types.js +5 -3
- package/package.json +3 -3
- package/types/types.d.ts +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,45 @@
|
|
|
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
|
+
## [27.11.1](https://github.com/cozy/cozy-client/compare/v27.11.0...v27.11.1) (2022-01-14)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package cozy-client
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [27.11.0](https://github.com/cozy/cozy-client/compare/v27.10.0...v27.11.0) (2022-01-13)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* Change other_identity_document translations ([aebb1bf](https://github.com/cozy/cozy-client/commit/aebb1bff1721f17baf12b79c92440467b4549257))
|
|
20
|
+
* Move other_revenue in finance theme ([dcb54fa](https://github.com/cozy/cozy-client/commit/dcb54fa11eced184524d6c6c713636e8b7e2f06f))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# [27.10.0](https://github.com/cozy/cozy-client/compare/v27.9.0...v27.10.0) (2022-01-12)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
* Add activity theme ([44eb0a8](https://github.com/cozy/cozy-client/commit/44eb0a8d8b0bed4a5f081efe7cd42223d7935768))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
# [27.9.0](https://github.com/cozy/cozy-client/compare/v27.8.0...v27.9.0) (2022-01-12)
|
|
38
|
+
|
|
39
|
+
**Note:** Version bump only for package cozy-client
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
6
45
|
# [27.8.0](https://github.com/cozy/cozy-client/compare/v27.7.0...v27.8.0) (2022-01-11)
|
|
7
46
|
|
|
8
47
|
|
package/dist/CozyClient.js
CHANGED
|
@@ -2463,7 +2463,7 @@ var CozyClient = /*#__PURE__*/function () {
|
|
|
2463
2463
|
CozyClient.hooks = CozyClient.hooks || {};
|
|
2464
2464
|
CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
|
|
2465
2465
|
|
|
2466
|
-
CozyClient.version = "27.
|
|
2466
|
+
CozyClient.version = "27.11.1";
|
|
2467
2467
|
|
|
2468
2468
|
_microee.default.mixin(CozyClient);
|
|
2469
2469
|
|
|
@@ -429,6 +429,11 @@
|
|
|
429
429
|
"sourceCategory": "gov",
|
|
430
430
|
"sourceSubCategory": "sport",
|
|
431
431
|
"subjects": ["permit", "invoice"]
|
|
432
|
+
},
|
|
433
|
+
{
|
|
434
|
+
"label": "other_activity_document",
|
|
435
|
+
"sourceSubCategory": "sport",
|
|
436
|
+
"subjects": ["permit", "invoice"]
|
|
432
437
|
}
|
|
433
438
|
],
|
|
434
439
|
"purposeKnownValues": [
|
|
@@ -50,13 +50,13 @@ The `attestation`'s content is described in the `AppAttest`'s documentation: htt
|
|
|
50
50
|
|
|
51
51
|
## Client's configuration
|
|
52
52
|
|
|
53
|
-
In order to configure `flagship` certification on an app, the OAuth property of `cozy-client` must contain `shouldRequireFlagshipPermissions` property set to `true` and `certificationConfig` property filled with required API keys.
|
|
53
|
+
In order to configure `flagship` certification on an app, the OAuth property of `cozy-client` must contain `shouldRequireFlagshipPermissions` property set to `true` and `certificationConfig` property filled with required API keys. In that case, the OAuth client can claims "*" as scope
|
|
54
54
|
|
|
55
55
|
Example of `cozy-client` configuration:
|
|
56
56
|
```js
|
|
57
57
|
const client = await initClient(uri, {
|
|
58
58
|
scope: [
|
|
59
|
-
'
|
|
59
|
+
'*'
|
|
60
60
|
],
|
|
61
61
|
oauth: {
|
|
62
62
|
redirectURI: 'REDIRECT_URI',
|
|
@@ -32,7 +32,7 @@ var buildItemsByLabel = function buildItemsByLabel(labels) {
|
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
var identityLabels = ['identity_photo', 'national_id_card', 'passport', 'residence_permit', 'family_record_book', 'birth_certificate', 'driver_license', 'citizen_registration_certificate', '
|
|
35
|
+
var identityLabels = ['identity_photo', 'national_id_card', 'passport', 'residence_permit', 'family_record_book', 'birth_certificate', 'driver_license', 'citizen_registration_certificate', 'other_identity_document'];
|
|
36
36
|
/**
|
|
37
37
|
* @type {Array<FamilyLabel>}
|
|
38
38
|
*/
|
|
@@ -42,7 +42,7 @@ var familyLabels = ['family_record_book', 'birth_certificate', 'wedding', 'pacs'
|
|
|
42
42
|
* @type {Array<WorkStudyLabels>}
|
|
43
43
|
*/
|
|
44
44
|
|
|
45
|
-
var workStudyLabels = ['diploma', 'work_contract', 'pay_sheet', 'unemployment_benefit', 'pension', 'work_disability_recognition', '
|
|
45
|
+
var workStudyLabels = ['diploma', 'work_contract', 'pay_sheet', 'unemployment_benefit', 'pension', 'work_disability_recognition', 'gradebook', 'student_card', 'school_attendance_certificate', 'resume', 'motivation_letter', 'other_work_document'];
|
|
46
46
|
/**
|
|
47
47
|
* @type {Array<HealthLabels>}
|
|
48
48
|
*/
|
|
@@ -58,11 +58,16 @@ var homeLabels = ['phone_invoice', 'isp_invoice', 'telecom_invoice', 'energy_inv
|
|
|
58
58
|
*/
|
|
59
59
|
|
|
60
60
|
var transportLabels = ['driver_license', 'vehicle_registration', 'car_insurance', 'mechanic_invoice', 'transport_invoice', 'other_transport_document'];
|
|
61
|
+
/**
|
|
62
|
+
* @type {Array<ActivityLabels>}
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
var activityLabels = ['personal_sporting_licence', 'other_activity_document'];
|
|
61
66
|
/**
|
|
62
67
|
* @type {Array<FinanceLabels>}
|
|
63
68
|
*/
|
|
64
69
|
|
|
65
|
-
var financeLabels = ['tax_return', 'tax_notice', 'tax_timetable', 'receipt', 'other_tax_document', 'bank_details', 'bank_statement', 'loan_agreement', 'payment_proof_family_allowance', 'other_bank_document'];
|
|
70
|
+
var financeLabels = ['tax_return', 'tax_notice', 'tax_timetable', 'receipt', 'other_tax_document', 'bank_details', 'bank_statement', 'loan_agreement', 'payment_proof_family_allowance', 'other_bank_document', 'other_revenue'];
|
|
66
71
|
/**
|
|
67
72
|
* @type {Array<InvoiceLabels>}
|
|
68
73
|
*/
|
|
@@ -107,11 +112,16 @@ var themesList = [{
|
|
|
107
112
|
defaultItems: ['driver_license']
|
|
108
113
|
}, {
|
|
109
114
|
id: 'theme7',
|
|
115
|
+
label: 'activity',
|
|
116
|
+
icon: 'compass',
|
|
117
|
+
items: buildItemsByLabel(activityLabels)
|
|
118
|
+
}, {
|
|
119
|
+
id: 'theme8',
|
|
110
120
|
label: 'finance',
|
|
111
121
|
icon: 'bank',
|
|
112
122
|
items: buildItemsByLabel(financeLabels)
|
|
113
123
|
}, {
|
|
114
|
-
id: '
|
|
124
|
+
id: 'theme9',
|
|
115
125
|
label: 'invoice',
|
|
116
126
|
icon: 'bill',
|
|
117
127
|
items: buildItemsByLabel(invoiceLabels)
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"birth_certificate": "Birth certificate",
|
|
34
34
|
"citizen_registration_certificate": "Certificate of citizen registration",
|
|
35
35
|
"driver_license": "Driving license",
|
|
36
|
-
"other_identity_document": "Other identity",
|
|
36
|
+
"other_identity_document": "Other document of identity",
|
|
37
37
|
"wedding": "Wedding contract",
|
|
38
38
|
"pacs": "Civil union",
|
|
39
39
|
"divorce": "Divorce",
|
|
@@ -98,7 +98,8 @@
|
|
|
98
98
|
"other_bank_document": "Other banking document",
|
|
99
99
|
"invoices": "Invoices",
|
|
100
100
|
"personal_sporting_licence": "Sporting licence",
|
|
101
|
-
"other_invoice": "Other invoice"
|
|
101
|
+
"other_invoice": "Other invoice",
|
|
102
|
+
"other_activity_document": "Other sports document"
|
|
102
103
|
},
|
|
103
104
|
"themes": {
|
|
104
105
|
"identity": "Identity",
|
|
@@ -110,7 +111,8 @@
|
|
|
110
111
|
"invoice": "Invoice",
|
|
111
112
|
"others": "Others",
|
|
112
113
|
"undefined": "Undefined",
|
|
113
|
-
"finance": "Finance"
|
|
114
|
+
"finance": "Finance",
|
|
115
|
+
"activity": "Activities"
|
|
114
116
|
}
|
|
115
117
|
}
|
|
116
118
|
}
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"birth_certificate": "Certificat de naissance",
|
|
34
34
|
"citizen_registration_certificate": "Attestation de recensement citoyen",
|
|
35
35
|
"driver_license": "Permis",
|
|
36
|
-
"other_identity_document": "Autre identité",
|
|
36
|
+
"other_identity_document": "Autre document d'identité",
|
|
37
37
|
"wedding": "Contrat de mariage",
|
|
38
38
|
"pacs": "Attestation de PACS",
|
|
39
39
|
"divorce": "Attestation de divorce",
|
|
@@ -98,7 +98,8 @@
|
|
|
98
98
|
"other_bank_document": "Autre document bancaire",
|
|
99
99
|
"invoices": "Factures",
|
|
100
100
|
"personal_sporting_licence": "Licences sportives",
|
|
101
|
-
"other_invoice": "Autre facture"
|
|
101
|
+
"other_invoice": "Autre facture",
|
|
102
|
+
"other_activity_document": "Autre document sportif"
|
|
102
103
|
},
|
|
103
104
|
"themes": {
|
|
104
105
|
"identity": "Identité",
|
|
@@ -110,7 +111,8 @@
|
|
|
110
111
|
"invoice": "Factures",
|
|
111
112
|
"others": "Autres",
|
|
112
113
|
"undefined": "Indéfini",
|
|
113
|
-
"finance": "Finances"
|
|
114
|
+
"finance": "Finances",
|
|
115
|
+
"activity": "Activités & loisirs"
|
|
114
116
|
}
|
|
115
117
|
}
|
|
116
118
|
}
|
package/dist/types.js
CHANGED
|
@@ -280,7 +280,7 @@ var _dsl = require("./queries/dsl");
|
|
|
280
280
|
*
|
|
281
281
|
* @typedef {'family_record_book'|'birth_certificate'|'wedding'|'pacs'|'divorce'|'large_family_card'|'caf'|'other_family_document'|'payment_proof_family_allowance'} FamilyLabel
|
|
282
282
|
*
|
|
283
|
-
* @typedef {'diploma'|'work_contract'|'pay_sheet'|'unemployment_benefit'|'pension'|'
|
|
283
|
+
* @typedef {'diploma'|'work_contract'|'pay_sheet'|'unemployment_benefit'|'pension'|'gradebook'|'student_card'|'resume'|'motivation_letter'|'other_work_document'|'work_disability_recognition'|'school_attendance_certificate'} WorkStudyLabels
|
|
284
284
|
*
|
|
285
285
|
* @typedef {'health_certificate'|'health_book'|'national_health_insurance_card'|'health_insurance_card'|'prescription'|'health_invoice'|'national_health_insurance_right_certificate'|'work_disability_recognition'|'pregnancy_medical_certificate'|'other_health_document'} HealthLabels
|
|
286
286
|
*
|
|
@@ -288,11 +288,13 @@ var _dsl = require("./queries/dsl");
|
|
|
288
288
|
*
|
|
289
289
|
* @typedef {'driver_license'|'vehicle_registration'|'car_insurance'|'mechanic_invoice'|'transport_invoice'|'other_transport_document'} TransportLabels
|
|
290
290
|
*
|
|
291
|
-
* @typedef {'tax_return'|'tax_notice'|'tax_timetable'|'receipt'|'other_tax_document'|'bank_details'|'bank_statement'|'loan_agreement'|'other_bank_document'|'payment_proof_family_allowance'} FinanceLabels
|
|
291
|
+
* @typedef {'tax_return'|'tax_notice'|'tax_timetable'|'receipt'|'other_tax_document'|'bank_details'|'bank_statement'|'loan_agreement'|'other_bank_document'|'payment_proof_family_allowance'|'other_revenue'} FinanceLabels
|
|
292
292
|
*
|
|
293
293
|
* @typedef {'phone_invoice'|'isp_invoice'|'telecom_invoice'|'energy_invoice'|'water_invoice'|'appliance_invoice'|'web_service_invoice'|'restaurant_invoice'|'work_invoice'|'transport_invoice'|'health_invoice'|'other_invoice'} InvoiceLabels
|
|
294
294
|
*
|
|
295
|
-
* @typedef {
|
|
295
|
+
* @typedef {'personal_sporting_licence'|'other_activity_document'} ActivityLabels
|
|
296
|
+
*
|
|
297
|
+
* @typedef {IdentityLabel|FamilyLabel|WorkStudyLabels|HealthLabels|HomeLabels|TransportLabels|FinanceLabels|InvoiceLabels|ActivityLabels} ItemsLabels
|
|
296
298
|
*/
|
|
297
299
|
var _default = {};
|
|
298
300
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-client",
|
|
3
|
-
"version": "27.
|
|
3
|
+
"version": "27.11.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"main": "dist/index.node.js",
|
|
6
6
|
"browser": "dist/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"cozy-device-helper": "^1.12.0",
|
|
22
22
|
"cozy-flags": "2.7.1",
|
|
23
23
|
"cozy-logger": "^1.6.0",
|
|
24
|
-
"cozy-stack-client": "^27.
|
|
24
|
+
"cozy-stack-client": "^27.9.0",
|
|
25
25
|
"json-stable-stringify": "^1.0.1",
|
|
26
26
|
"lodash": "^4.17.13",
|
|
27
27
|
"microee": "^0.0.6",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"react-native-ios11-devicecheck": "https://github.com/cozy/react-native-devicecheck#app-attest-v0.1"
|
|
72
72
|
},
|
|
73
73
|
"sideEffects": false,
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "d20b420a04811685305698aa3baebef08a020e79"
|
|
75
75
|
}
|
package/types/types.d.ts
CHANGED
|
@@ -317,11 +317,12 @@ export type QualificationAttributes = {
|
|
|
317
317
|
};
|
|
318
318
|
export type IdentityLabel = "identity_photo" | "national_id_card" | "passport" | "residence_permit" | "family_record_book" | "birth_certificate" | "driver_license" | "other_identity_document" | "citizen_registration_certificate" | "personal_sporting_licence";
|
|
319
319
|
export type FamilyLabel = "family_record_book" | "birth_certificate" | "wedding" | "pacs" | "divorce" | "large_family_card" | "caf" | "other_family_document" | "payment_proof_family_allowance";
|
|
320
|
-
export type WorkStudyLabels = "resume" | "diploma" | "work_contract" | "pay_sheet" | "unemployment_benefit" | "pension" | "
|
|
320
|
+
export type WorkStudyLabels = "resume" | "diploma" | "work_contract" | "pay_sheet" | "unemployment_benefit" | "pension" | "gradebook" | "student_card" | "motivation_letter" | "other_work_document" | "work_disability_recognition" | "school_attendance_certificate";
|
|
321
321
|
export type HealthLabels = "work_disability_recognition" | "health_certificate" | "health_book" | "national_health_insurance_card" | "health_insurance_card" | "prescription" | "health_invoice" | "national_health_insurance_right_certificate" | "pregnancy_medical_certificate" | "other_health_document";
|
|
322
322
|
export type HomeLabels = "phone_invoice" | "isp_invoice" | "telecom_invoice" | "energy_invoice" | "water_invoice" | "house_sale_agreeement" | "building_permit" | "technical_diagnostic_record" | "lease" | "rent_receipt" | "house_insurance" | "work_quote" | "work_invoice" | "other_house_document" | "unfit_for_habitation_declaration" | "accommodation_proof";
|
|
323
323
|
export type TransportLabels = "driver_license" | "vehicle_registration" | "car_insurance" | "mechanic_invoice" | "transport_invoice" | "other_transport_document";
|
|
324
|
-
export type FinanceLabels = "payment_proof_family_allowance" | "tax_return" | "tax_notice" | "tax_timetable" | "receipt" | "other_tax_document" | "bank_details" | "bank_statement" | "loan_agreement" | "other_bank_document";
|
|
324
|
+
export type FinanceLabels = "payment_proof_family_allowance" | "tax_return" | "tax_notice" | "tax_timetable" | "receipt" | "other_tax_document" | "bank_details" | "bank_statement" | "loan_agreement" | "other_bank_document" | "other_revenue";
|
|
325
325
|
export type InvoiceLabels = "health_invoice" | "phone_invoice" | "isp_invoice" | "telecom_invoice" | "energy_invoice" | "water_invoice" | "work_invoice" | "transport_invoice" | "appliance_invoice" | "web_service_invoice" | "restaurant_invoice" | "other_invoice";
|
|
326
|
-
export type
|
|
326
|
+
export type ActivityLabels = "personal_sporting_licence" | "other_activity_document";
|
|
327
|
+
export type ItemsLabels = "resume" | "identity_photo" | "national_id_card" | "passport" | "residence_permit" | "family_record_book" | "birth_certificate" | "driver_license" | "other_identity_document" | "citizen_registration_certificate" | "personal_sporting_licence" | "wedding" | "pacs" | "divorce" | "large_family_card" | "caf" | "other_family_document" | "payment_proof_family_allowance" | "diploma" | "work_contract" | "pay_sheet" | "unemployment_benefit" | "pension" | "gradebook" | "student_card" | "motivation_letter" | "other_work_document" | "work_disability_recognition" | "school_attendance_certificate" | "health_certificate" | "health_book" | "national_health_insurance_card" | "health_insurance_card" | "prescription" | "health_invoice" | "national_health_insurance_right_certificate" | "pregnancy_medical_certificate" | "other_health_document" | "phone_invoice" | "isp_invoice" | "telecom_invoice" | "energy_invoice" | "water_invoice" | "house_sale_agreeement" | "building_permit" | "technical_diagnostic_record" | "lease" | "rent_receipt" | "house_insurance" | "work_quote" | "work_invoice" | "other_house_document" | "unfit_for_habitation_declaration" | "accommodation_proof" | "vehicle_registration" | "car_insurance" | "mechanic_invoice" | "transport_invoice" | "other_transport_document" | "tax_return" | "tax_notice" | "tax_timetable" | "receipt" | "other_tax_document" | "bank_details" | "bank_statement" | "loan_agreement" | "other_bank_document" | "other_revenue" | "appliance_invoice" | "web_service_invoice" | "restaurant_invoice" | "other_invoice" | "other_activity_document";
|
|
327
328
|
import { QueryDefinition } from "./queries/dsl";
|