cozy-client 46.1.1 → 46.2.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.
@@ -2705,7 +2705,7 @@ var CozyClient = /*#__PURE__*/function () {
2705
2705
  CozyClient.hooks = CozyClient.hooks || {};
2706
2706
  CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
2707
2707
 
2708
- CozyClient.version = "46.1.1";
2708
+ CozyClient.version = "46.2.0";
2709
2709
 
2710
2710
  _microee.default.mixin(CozyClient);
2711
2711
 
@@ -0,0 +1,324 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.iconLabelPairs = exports.THEME_OTHERS_LABELS = exports.THEME_INVOICE_LABELS = exports.THEME_FINANCE_LABELS = exports.THEME_ACTIVITY_LABELS = exports.THEME_TRANSPORT_LABELS = exports.THEME_HOME_LABELS = exports.THEME_HEALTH_LABELS = exports.THEME_WORK_STUDY_LABELS = exports.THEME_FAMILY_LABELS = exports.THEME_IDENTITY_LABELS = void 0;
7
+ // #region Qualification labels for each theme
8
+
9
+ /**
10
+ * @type {Array<import("../../types").IdentityLabel>}
11
+ */
12
+ var THEME_IDENTITY_LABELS = ['identity_photo', 'national_id_card', 'passport', 'residence_permit', 'electoral_card', 'family_record_book', 'birth_certificate', 'driver_license', 'citizen_registration_certificate', 'note_identity_document', 'other_identity_document'];
13
+ /**
14
+ * @type {Array<import("../../types").FamilyLabel>}
15
+ */
16
+
17
+ exports.THEME_IDENTITY_LABELS = THEME_IDENTITY_LABELS;
18
+ var THEME_FAMILY_LABELS = ['family_record_book', 'birth_certificate', 'wedding', 'pacs', 'single_parent_benefit', 'divorce', 'large_family_card', 'caf', 'payment_proof_family_allowance', 'note_family_document', 'other_family_document', 'person_insurance'];
19
+ /**
20
+ * @type {Array<import("../../types").WorkStudyLabels>}
21
+ */
22
+
23
+ exports.THEME_FAMILY_LABELS = THEME_FAMILY_LABELS;
24
+ var THEME_WORK_STUDY_LABELS = ['diploma', 'work_contract', 'pay_sheet', 'unemployment_benefit', 'employment_center_certificate', 'pension', 'work_disability_recognition', 'gradebook', 'student_card', 'school_attendance_certificate', 'school_insurance_certificate', 'resume', 'motivation_letter', 'expense_claim', 'note_work_document', 'other_work_document'];
25
+ /**
26
+ * @type {Array<import("../../types").HealthLabels>}
27
+ */
28
+
29
+ exports.THEME_WORK_STUDY_LABELS = THEME_WORK_STUDY_LABELS;
30
+ var THEME_HEALTH_LABELS = ['health_certificate', 'health_book', 'national_health_insurance_card', 'national_health_insurance_right_certificate', 'health_insurance_card', 'prescription', 'health_invoice', 'work_disability_recognition', 'pregnancy_medical_certificate', 'note_health_document', 'other_health_document'];
31
+ /**
32
+ * @type {Array<import("../../types").HomeLabels>}
33
+ */
34
+
35
+ exports.THEME_HEALTH_LABELS = THEME_HEALTH_LABELS;
36
+ var THEME_HOME_LABELS = ['phone_invoice', 'isp_invoice', 'telecom_invoice', 'energy_invoice', 'water_invoice', 'other_invoice', 'work_invoice', 'house_sale_agreeement', 'building_permit', 'technical_diagnostic_record', 'unfit_for_habitation_declaration', 'lease', 'rent_receipt', 'accommodation_proof', 'house_insurance', 'work_quote', 'condition_report', 'note_house_document', 'other_house_document', 'real_estate_insurance'];
37
+ /**
38
+ * @type {Array<import("../../types").TransportLabels>}
39
+ */
40
+
41
+ exports.THEME_HOME_LABELS = THEME_HOME_LABELS;
42
+ var THEME_TRANSPORT_LABELS = ['driver_license', 'vehicle_registration', 'car_insurance', 'transport_card', 'mechanic_invoice', 'transport_invoice', 'note_transport_document', 'other_transport_document'];
43
+ /**
44
+ * @type {Array<import("../../types").ActivityLabels>}
45
+ */
46
+
47
+ exports.THEME_TRANSPORT_LABELS = THEME_TRANSPORT_LABELS;
48
+ var THEME_ACTIVITY_LABELS = ['personal_sporting_licence', 'fidelity_card', 'library_card', 'note_activity_document', 'other_activity_document'];
49
+ /**
50
+ * @type {Array<import("../../types").FinanceLabels>}
51
+ */
52
+
53
+ exports.THEME_ACTIVITY_LABELS = THEME_ACTIVITY_LABELS;
54
+ var THEME_FINANCE_LABELS = ['fine', 'tax_return', 'tax_notice', 'tax_timetable', 'real_estate_tax', 'pay_sheet', 'receipt', 'single_parent_benefit', 'other_tax_document', 'bank_details', 'bank_statement', 'loan_agreement', 'payment_proof_family_allowance', 'note_finance', 'expense_claim', 'other_bank_document', 'other_revenue'];
55
+ /**
56
+ * @type {Array<import("../../types").InvoiceLabels>}
57
+ */
58
+
59
+ exports.THEME_FINANCE_LABELS = THEME_FINANCE_LABELS;
60
+ var THEME_INVOICE_LABELS = ['phone_invoice', 'isp_invoice', 'telecom_invoice', 'energy_invoice', 'water_invoice', 'appliance_invoice', 'web_service_invoice', 'restaurant_invoice', 'work_invoice', 'transport_invoice', 'health_invoice', 'note_invoice', 'expense_claim', 'energy_contract', 'grocery_invoice', 'other_invoice'];
61
+ /**
62
+ * @type {Array<import("../../types").OthersLabels>}
63
+ */
64
+
65
+ exports.THEME_INVOICE_LABELS = THEME_INVOICE_LABELS;
66
+ var THEME_OTHERS_LABELS = ['other_administrative_document']; // #endregion Qualification labels for each theme
67
+ // #region Qualifcation labels for each icon
68
+
69
+ /**
70
+ * @type {Array<import("../../types").iconPeopleLabels>}
71
+ */
72
+
73
+ exports.THEME_OTHERS_LABELS = THEME_OTHERS_LABELS;
74
+ var ICON_PEOPLE_LABELS = ['national_id_card', 'other_identity_document', 'resume', 'work_disability_recognition'];
75
+ /**
76
+ * @type {Array<import("../../types").iconWorkLabels>}
77
+ */
78
+
79
+ var ICON_WORK_LABELS = ['employment_center_certificate', 'motivation_letter', 'other_work_document', 'school_attendance_certificate', 'school_insurance_certificate', 'student_card', 'unemployment_benefit', 'work_contract'];
80
+ /**
81
+ * @type {Array<import("../../types").iconJusticeLabels>}
82
+ */
83
+
84
+ var ICON_JUSTICE_LABELS = ['fine'];
85
+ /**
86
+ * @type {Array<import("../../types").iconGlobeLabels>}
87
+ */
88
+
89
+ var ICON_GLOBE_LABELS = ['residence_permit'];
90
+ /**
91
+ * @type {Array<import("../../types").iconPlaneLabels>}
92
+ */
93
+
94
+ var ICON_PLANE_LABELS = ['passport'];
95
+ /**
96
+ * @type {Array<import("../../types").iconLibraryLabels>}
97
+ */
98
+
99
+ var ICON_LIBRARY_LABELS = ['library_card'];
100
+ /**
101
+ * @type {Array<import("../../types").iconImageLabels>}
102
+ */
103
+
104
+ var ICON_IMAGE_LABELS = ['identity_photo'];
105
+ /**
106
+ * @type {Array<import("../../types").iconShopLabels>}
107
+ */
108
+
109
+ var ICON_SHOP_LABELS = ['fidelity_card', 'grocery_invoice'];
110
+ /**
111
+ * @type {Array<import("../../types").iconGouvLabels>}
112
+ */
113
+
114
+ var ICON_GOUV_LABELS = ['electoral_card'];
115
+ /**
116
+ * @type {Array<import("../../types").iconSchoolLabels>}
117
+ */
118
+
119
+ var ICON_SCHOOL_LABELS = ['diploma', 'gradebook'];
120
+ /**
121
+ * @type {Array<import("../../types").iconChildLabels>}
122
+ */
123
+
124
+ var ICON_CHILD_LABELS = ['birth_certificate'];
125
+ /**
126
+ * @type {Array<import("../../types").iconEmailLabels>}
127
+ */
128
+
129
+ var ICON_EMAIL_LABELS = ['receipt'];
130
+ /**
131
+ * @type {Array<import("../../types").iconLaudryLabels>}
132
+ */
133
+
134
+ var ICON_LAUDRY_LABELS = ['appliance_invoice'];
135
+ /**
136
+ * @type {Array<import("../../types").iconHomeLabels>}
137
+ */
138
+
139
+ var ICON_HOME_LABELS = ['accommodation_proof', 'building_permit', 'condition_report', 'house_insurance', 'house_sale_agreeement', 'lease', 'mechanic_invoice', 'other_house_document', 'real_estate_insurance', 'rent_receipt', 'technical_diagnostic_record', 'unfit_for_habitation_declaration', 'work_invoice', 'work_quote'];
140
+ /**
141
+ * @type {Array<import("../../types").iconBenefitLabels>}
142
+ */
143
+
144
+ var ICON_BENEFIT_LABELS = ['loan_agreement', 'other_revenue', 'pay_sheet', 'payment_proof_family_allowance', 'pension'];
145
+ /**
146
+ * @type {Array<import("../../types").iconEuroLabels>}
147
+ */
148
+
149
+ var ICON_EURO_LABELS = ['other_bank_document'];
150
+ /**
151
+ * @type {Array<import("../../types").iconBankCheckLabels>}
152
+ */
153
+
154
+ var ICON_BANK_CHECK_LABELS = ['bank_details'];
155
+ /**
156
+ * @type {Array<import("../../types").iconBankLabels>}
157
+ */
158
+
159
+ var ICON_BANK_LABELS = ['other_administrative_document', 'other_tax_document', 'real_estate_tax', 'tax_notice', 'tax_return', 'tax_timetable'];
160
+ /**
161
+ * @type {Array<import("../../types").iconCarLabels>}
162
+ */
163
+
164
+ var ICON_CAR_LABELS = ['car_insurance', 'driver_license', 'other_transport_document', 'transport_card', 'transport_invoice', 'vehicle_registration'];
165
+ /**
166
+ * @type {Array<import("../../types").iconLightningLabels>}
167
+ */
168
+
169
+ var ICON_LIGHTNING_LABELS = ['energy_contract', 'energy_invoice'];
170
+ /**
171
+ * @type {Array<import("../../types").iconTelecomLabels>}
172
+ */
173
+
174
+ var ICON_TELECOM_LABELS = ['isp_invoice', 'telecom_invoice', 'web_service_invoice'];
175
+ /**
176
+ * @type {Array<import("../../types").iconTelephoneLabels>}
177
+ */
178
+
179
+ var ICON_TELEPHONE_LABELS = ['phone_invoice'];
180
+ /**
181
+ * @type {Array<import("../../types").iconWaterLabels>}
182
+ */
183
+
184
+ var ICON_WATER_LABELS = ['water_invoice'];
185
+ /**
186
+ * @type {Array<import("../../types").iconRemboursementLabels>}
187
+ */
188
+
189
+ var ICON_REMBOURSEMENT_LABELS = ['expense_claim'];
190
+ /**
191
+ * @type {Array<import("../../types").iconRestaurantLabels>}
192
+ */
193
+
194
+ var ICON_RESTAURANT_LABELS = ['restaurant_invoice'];
195
+ /**
196
+ * @type {Array<import("../../types").iconBillLabels>}
197
+ */
198
+
199
+ var ICON_BILL_LABELS = ['other_invoice'];
200
+ /**
201
+ * @type {Array<import("../../types").iconTeamLabels>}
202
+ */
203
+
204
+ var ICON_TEAM_LABELS = ['caf', 'citizen_registration_certificate', 'divorce', 'family_record_book', 'large_family_card', 'other_family_document', 'pacs', 'single_parent_benefit', 'wedding'];
205
+ /**
206
+ * @type {Array<import("../../types").iconFitnessLabels>}
207
+ */
208
+
209
+ var ICON_FITNESS_LABELS = ['other_activity_document', 'personal_sporting_licence'];
210
+ /**
211
+ * @type {Array<import("../../types").iconHeartLabels>}
212
+ */
213
+
214
+ var ICON_HEART_LABELS = ['health_book', 'health_certificate', 'health_insurance_card', 'health_invoice', 'national_health_insurance_card', 'national_health_insurance_right_certificate', 'other_health_document', 'person_insurance', 'pregnancy_medical_certificate', 'prescription'];
215
+ /**
216
+ * @type {Array<import("../../types").iconExchangeLabels>}
217
+ */
218
+
219
+ var ICON_EXCHANGE_LABELS = ['bank_statement'];
220
+ /**
221
+ * @type {Array<import("../../types").iconFileTypeNoteLabels>}
222
+ */
223
+
224
+ var ICON_FILE_TYPE_NOTE_LABELS = ['note_activity_document', 'note_family_document', 'note_finance', 'note_health_document', 'note_house_document', 'note_identity_document', 'note_invoice', 'note_transport_document', 'note_work_document'];
225
+ /**
226
+ * @type {Array<import("../../types").iconLabelPairs>}
227
+ */
228
+
229
+ var iconLabelPairs = [{
230
+ icon: 'bank-check',
231
+ labels: ICON_BANK_CHECK_LABELS
232
+ }, {
233
+ icon: 'bank',
234
+ labels: ICON_BANK_LABELS
235
+ }, {
236
+ icon: 'benefit',
237
+ labels: ICON_BENEFIT_LABELS
238
+ }, {
239
+ icon: 'bill',
240
+ labels: ICON_BILL_LABELS
241
+ }, {
242
+ icon: 'car',
243
+ labels: ICON_CAR_LABELS
244
+ }, {
245
+ icon: 'child',
246
+ labels: ICON_CHILD_LABELS
247
+ }, {
248
+ icon: 'email',
249
+ labels: ICON_EMAIL_LABELS
250
+ }, {
251
+ icon: 'euro',
252
+ labels: ICON_EURO_LABELS
253
+ }, {
254
+ icon: 'exchange',
255
+ labels: ICON_EXCHANGE_LABELS
256
+ }, {
257
+ icon: 'file-type-note',
258
+ labels: ICON_FILE_TYPE_NOTE_LABELS
259
+ }, {
260
+ icon: 'fitness',
261
+ labels: ICON_FITNESS_LABELS
262
+ }, {
263
+ icon: 'globe',
264
+ labels: ICON_GLOBE_LABELS
265
+ }, {
266
+ icon: 'gouv',
267
+ labels: ICON_GOUV_LABELS
268
+ }, {
269
+ icon: 'heart',
270
+ labels: ICON_HEART_LABELS
271
+ }, {
272
+ icon: 'home',
273
+ labels: ICON_HOME_LABELS
274
+ }, {
275
+ icon: 'image',
276
+ labels: ICON_IMAGE_LABELS
277
+ }, {
278
+ icon: 'justice',
279
+ labels: ICON_JUSTICE_LABELS
280
+ }, {
281
+ icon: 'laudry',
282
+ labels: ICON_LAUDRY_LABELS
283
+ }, {
284
+ icon: 'library',
285
+ labels: ICON_LIBRARY_LABELS
286
+ }, {
287
+ icon: 'lightning',
288
+ labels: ICON_LIGHTNING_LABELS
289
+ }, {
290
+ icon: 'people',
291
+ labels: ICON_PEOPLE_LABELS
292
+ }, {
293
+ icon: 'plane',
294
+ labels: ICON_PLANE_LABELS
295
+ }, {
296
+ icon: 'remboursement',
297
+ labels: ICON_REMBOURSEMENT_LABELS
298
+ }, {
299
+ icon: 'restaurant',
300
+ labels: ICON_RESTAURANT_LABELS
301
+ }, {
302
+ icon: 'school',
303
+ labels: ICON_SCHOOL_LABELS
304
+ }, {
305
+ icon: 'shop',
306
+ labels: ICON_SHOP_LABELS
307
+ }, {
308
+ icon: 'team',
309
+ labels: ICON_TEAM_LABELS
310
+ }, {
311
+ icon: 'telecom',
312
+ labels: ICON_TELECOM_LABELS
313
+ }, {
314
+ icon: 'telephone',
315
+ labels: ICON_TELEPHONE_LABELS
316
+ }, {
317
+ icon: 'water',
318
+ labels: ICON_WATER_LABELS
319
+ }, {
320
+ icon: 'work',
321
+ labels: ICON_WORK_LABELS
322
+ }]; // #endregion Qualifcation labels for each icon
323
+
324
+ exports.iconLabelPairs = iconLabelPairs;
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.themesList = void 0;
7
7
 
8
+ var _constants = require("./constants");
9
+
8
10
  var _qualification = require("./qualification");
9
11
 
10
12
  /**
@@ -25,113 +27,63 @@ var buildItemsByLabel = function buildItemsByLabel(labels) {
25
27
  return item;
26
28
  });
27
29
  };
28
- /**
29
- * @type {Array<import("../../types").IdentityLabel>}
30
- */
31
-
32
-
33
- var identityLabels = ['identity_photo', 'national_id_card', 'passport', 'residence_permit', 'electoral_card', 'family_record_book', 'birth_certificate', 'driver_license', 'citizen_registration_certificate', 'note_identity_document', 'other_identity_document'];
34
- /**
35
- * @type {Array<import("../../types").FamilyLabel>}
36
- */
37
-
38
- var familyLabels = ['family_record_book', 'birth_certificate', 'wedding', 'pacs', 'single_parent_benefit', 'divorce', 'large_family_card', 'caf', 'payment_proof_family_allowance', 'note_family_document', 'other_family_document', 'person_insurance'];
39
- /**
40
- * @type {Array<import("../../types").WorkStudyLabels>}
41
- */
42
-
43
- var workStudyLabels = ['diploma', 'work_contract', 'pay_sheet', 'unemployment_benefit', 'employment_center_certificate', 'pension', 'work_disability_recognition', 'gradebook', 'student_card', 'school_attendance_certificate', 'school_insurance_certificate', 'resume', 'motivation_letter', 'expense_claim', 'note_work_document', 'other_work_document'];
44
- /**
45
- * @type {Array<import("../../types").HealthLabels>}
46
- */
47
-
48
- var healthLabels = ['health_certificate', 'health_book', 'national_health_insurance_card', 'national_health_insurance_right_certificate', 'health_insurance_card', 'prescription', 'health_invoice', 'work_disability_recognition', 'pregnancy_medical_certificate', 'note_health_document', 'other_health_document'];
49
- /**
50
- * @type {Array<import("../../types").HomeLabels>}
51
- */
52
-
53
- var homeLabels = ['phone_invoice', 'isp_invoice', 'telecom_invoice', 'energy_invoice', 'water_invoice', 'other_invoice', 'work_invoice', 'house_sale_agreeement', 'building_permit', 'technical_diagnostic_record', 'unfit_for_habitation_declaration', 'lease', 'rent_receipt', 'accommodation_proof', 'house_insurance', 'work_quote', 'condition_report', 'note_house_document', 'other_house_document', 'real_estate_insurance'];
54
- /**
55
- * @type {Array<import("../../types").TransportLabels>}
56
- */
57
-
58
- var transportLabels = ['driver_license', 'vehicle_registration', 'car_insurance', 'transport_card', 'mechanic_invoice', 'transport_invoice', 'note_transport_document', 'other_transport_document'];
59
- /**
60
- * @type {Array<import("../../types").ActivityLabels>}
61
- */
62
-
63
- var activityLabels = ['personal_sporting_licence', 'fidelity_card', 'library_card', 'note_activity_document', 'other_activity_document'];
64
- /**
65
- * @type {Array<import("../../types").FinanceLabels>}
66
- */
67
-
68
- var financeLabels = ['fine', 'tax_return', 'tax_notice', 'tax_timetable', 'real_estate_tax', 'pay_sheet', 'receipt', 'single_parent_benefit', 'other_tax_document', 'bank_details', 'bank_statement', 'loan_agreement', 'payment_proof_family_allowance', 'note_finance', 'expense_claim', 'other_bank_document', 'other_revenue'];
69
- /**
70
- * @type {Array<import("../../types").InvoiceLabels>}
71
- */
72
-
73
- var invoiceLabels = ['phone_invoice', 'isp_invoice', 'telecom_invoice', 'energy_invoice', 'water_invoice', 'appliance_invoice', 'web_service_invoice', 'restaurant_invoice', 'work_invoice', 'transport_invoice', 'health_invoice', 'note_invoice', 'expense_claim', 'other_invoice'];
74
- /**
75
- * @type {Array<import("../../types").OthersLabels>}
76
- */
77
-
78
- var othersLabels = ['other_administrative_document'];
79
30
  /**
80
31
  * @type {import("../../types").ThemesList}
81
32
  */
82
33
 
34
+
83
35
  var themesList = [{
84
36
  id: 'theme1',
85
37
  label: 'identity',
86
38
  icon: 'people',
87
- items: buildItemsByLabel(identityLabels),
39
+ items: buildItemsByLabel(_constants.THEME_IDENTITY_LABELS),
88
40
  defaultItems: ['birth_certificate']
89
41
  }, {
90
42
  id: 'theme2',
91
43
  label: 'family',
92
44
  icon: 'team',
93
- items: buildItemsByLabel(familyLabels),
45
+ items: buildItemsByLabel(_constants.THEME_FAMILY_LABELS),
94
46
  defaultItems: ['family_record_book']
95
47
  }, {
96
48
  id: 'theme3',
97
49
  label: 'work_study',
98
50
  icon: 'company',
99
- items: buildItemsByLabel(workStudyLabels)
51
+ items: buildItemsByLabel(_constants.THEME_WORK_STUDY_LABELS)
100
52
  }, {
101
53
  id: 'theme4',
102
54
  label: 'health',
103
55
  icon: 'heart',
104
- items: buildItemsByLabel(healthLabels)
56
+ items: buildItemsByLabel(_constants.THEME_HEALTH_LABELS)
105
57
  }, {
106
58
  id: 'theme5',
107
59
  label: 'home',
108
60
  icon: 'home',
109
- items: buildItemsByLabel(homeLabels)
61
+ items: buildItemsByLabel(_constants.THEME_HOME_LABELS)
110
62
  }, {
111
63
  id: 'theme6',
112
64
  label: 'transport',
113
65
  icon: 'car',
114
- items: buildItemsByLabel(transportLabels),
66
+ items: buildItemsByLabel(_constants.THEME_TRANSPORT_LABELS),
115
67
  defaultItems: ['driver_license']
116
68
  }, {
117
69
  id: 'theme7',
118
70
  label: 'activity',
119
71
  icon: 'compass',
120
- items: buildItemsByLabel(activityLabels)
72
+ items: buildItemsByLabel(_constants.THEME_ACTIVITY_LABELS)
121
73
  }, {
122
74
  id: 'theme8',
123
75
  label: 'finance',
124
76
  icon: 'bank',
125
- items: buildItemsByLabel(financeLabels)
77
+ items: buildItemsByLabel(_constants.THEME_FINANCE_LABELS)
126
78
  }, {
127
79
  id: 'theme9',
128
80
  label: 'invoice',
129
81
  icon: 'bill',
130
- items: buildItemsByLabel(invoiceLabels)
82
+ items: buildItemsByLabel(_constants.THEME_INVOICE_LABELS)
131
83
  }, {
132
84
  id: 'theme10',
133
85
  label: 'others',
134
86
  icon: 'dots',
135
- items: buildItemsByLabel(othersLabels)
87
+ items: buildItemsByLabel(_constants.THEME_OTHERS_LABELS)
136
88
  }];
137
89
  exports.themesList = themesList;
@@ -7,7 +7,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
7
7
  Object.defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
- exports.getQualification = exports.setQualification = exports.Qualification = void 0;
10
+ exports.getIconByLabel = exports.getQualification = exports.setQualification = exports.Qualification = void 0;
11
11
 
12
12
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
13
 
@@ -23,12 +23,21 @@ var qualificationModel = _interopRequireWildcard(require("../../assets/qualifica
23
23
 
24
24
  var _logger = _interopRequireDefault(require("../../logger"));
25
25
 
26
+ var _constants = require("./constants");
27
+
28
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
29
+
30
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
31
+
32
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
33
+
26
34
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
27
35
 
28
36
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
29
37
 
30
38
  /**
31
39
  * @typedef {object} QualificationAttributes
40
+ * @property {string} [icon] - The qualification icon.
32
41
  * @property {string} [label] - The qualification label.
33
42
  * @property {string} [purpose] - The document purpose.
34
43
  * @property {string} [sourceCategory] - The activity field of the document source.
@@ -58,9 +67,14 @@ var Qualification = /*#__PURE__*/function () {
58
67
  });
59
68
 
60
69
  if (qualification) {
70
+ /**
71
+ * @type {string}
72
+ */
73
+ this.icon = attributes.icon || getIconByLabel(label);
61
74
  /**
62
75
  * @type {string?}
63
76
  */
77
+
64
78
  this.label = qualification.label;
65
79
  var purpose = attributes.purpose || qualification.purpose;
66
80
 
@@ -224,6 +238,20 @@ var Qualification = /*#__PURE__*/function () {
224
238
  subjects: subjects
225
239
  }));
226
240
  }
241
+ /**
242
+ * Set icon to the qualification.
243
+ *
244
+ * @param {string} icon - The icon to set.
245
+ * @returns {Qualification} The Qualification object.
246
+ */
247
+
248
+ }, {
249
+ key: "setIcon",
250
+ value: function setIcon(icon) {
251
+ return new Qualification(this.label, _objectSpread(_objectSpread({}, this.toQualification()), {}, {
252
+ icon: icon
253
+ }));
254
+ }
227
255
  /**
228
256
  * Returns the qualification attributes
229
257
  *
@@ -234,6 +262,7 @@ var Qualification = /*#__PURE__*/function () {
234
262
  key: "toQualification",
235
263
  value: function toQualification() {
236
264
  return {
265
+ icon: this.icon,
237
266
  label: this.label,
238
267
  purpose: this.purpose,
239
268
  sourceCategory: this.sourceCategory,
@@ -268,12 +297,18 @@ Qualification.getByLabel = function (label) {
268
297
 
269
298
  var setQualification = function setQualification(document, qualification) {
270
299
  if (qualification.label) {
300
+ var result = qualification; // Throw an error if one of the attributes does not conform
301
+
271
302
  new Qualification(qualification.label).checkAttributes(qualification);
303
+
304
+ if (!qualification.icon) {
305
+ result = new Qualification(qualification.label, qualification).setIcon(getIconByLabel(qualification.label));
306
+ }
307
+
308
+ return (0, _set.default)(document, 'metadata.qualification', result);
272
309
  } else {
273
310
  throw new Error('You must set a label to qualify');
274
311
  }
275
-
276
- return (0, _set.default)(document, 'metadata.qualification', qualification);
277
312
  };
278
313
  /**
279
314
  * Helper to get the qualification from a document
@@ -297,5 +332,37 @@ var getQualification = function getQualification(document) {
297
332
 
298
333
  return null;
299
334
  };
335
+ /**
336
+ * Helper to get the icon name from a qualification label
337
+ *
338
+ * @param {string} label - The qualification label
339
+ * @returns {import('../../types').IconQualificationLabels|string} - The icon name
340
+ */
341
+
342
+
343
+ exports.getQualification = getQualification;
344
+
345
+ var getIconByLabel = function getIconByLabel(label) {
346
+ var _iterator = _createForOfIteratorHelper(_constants.iconLabelPairs),
347
+ _step;
348
+
349
+ try {
350
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
351
+ var pair = _step.value;
352
+
353
+ if (pair.labels.includes(label)) {
354
+ return pair.icon;
355
+ }
356
+ }
357
+ } catch (err) {
358
+ _iterator.e(err);
359
+ } finally {
360
+ _iterator.f();
361
+ }
362
+
363
+ _logger.default.info("The ".concat(label, " qualification does not seem to have an icon.\n Please open an issue on https://github.com/cozy/cozy-client/issues"));
364
+
365
+ return '';
366
+ };
300
367
 
301
- exports.getQualification = getQualification;
368
+ exports.getIconByLabel = getIconByLabel;
@@ -64,6 +64,7 @@ describe('document qualification', () => {
64
64
  })
65
65
  it('should get the file qualification', () => {
66
66
  const qualification = {
67
+ icon: 'telecom',
67
68
  label: 'isp_invoice',
68
69
  purpose: 'invoice',
69
70
  sourceCategory: 'telecom',
@@ -104,6 +105,7 @@ describe('document qualification', () => {
104
105
  metadata: {
105
106
  datetime: '2020-01-01T20:38:04Z',
106
107
  qualification: {
108
+ icon: 'heart',
107
109
  label: 'health_invoice',
108
110
  purpose: 'invoice',
109
111
  sourceCategory: 'health'
@@ -116,12 +118,14 @@ describe('document qualification', () => {
116
118
  .setSourceCategory('gov')
117
119
  .setSourceSubCategory('civil_registration')
118
120
  .setSubjects(['identity'])
121
+ .setIcon('people')
119
122
  setQualification(fileDoc, qualification)
120
123
  expect(fileDoc).toEqual({
121
124
  _id: '123',
122
125
  metadata: {
123
126
  datetime: '2020-01-01T20:38:04Z',
124
127
  qualification: {
128
+ icon: 'people',
125
129
  label: 'other_identity_document',
126
130
  purpose: 'attestation',
127
131
  sourceCategory: 'gov',
@@ -832,6 +832,7 @@ describe('File qualification', () => {
832
832
  metadata: {
833
833
  datetime: '2020-01-01T20:38:04Z',
834
834
  qualification: {
835
+ icon: 'heart',
835
836
  label: 'health_invoice',
836
837
  sourceCategory: 'health',
837
838
  purpose: 'invoice'
package/dist/types.js CHANGED
@@ -542,7 +542,7 @@ var _dsl = require("./queries/dsl");
542
542
  *
543
543
  * @typedef {'fine'|'tax_return'|'tax_notice'|'tax_timetable'|'pay_sheet'|'receipt'|'other_tax_document'|'bank_details'|'bank_statement'|'loan_agreement'|'other_bank_document'|'payment_proof_family_allowance'|'other_revenue'|'single_parent_benefit'|'real_estate_tax'|'note_finance'|'expense_claim'} FinanceLabels
544
544
  *
545
- * @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'|'note_invoice'|'expense_claim'} InvoiceLabels
545
+ * @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'|'note_invoice'|'expense_claim'|'energy_contract'|'grocery_invoice'} InvoiceLabels
546
546
  *
547
547
  * @typedef {'personal_sporting_licence'|'other_activity_document'|'fidelity_card'|'library_card'|'note_activity_document'} ActivityLabels
548
548
  *
@@ -551,6 +551,78 @@ var _dsl = require("./queries/dsl");
551
551
  * @typedef {IdentityLabel|FamilyLabel|WorkStudyLabels|HealthLabels|HomeLabels|TransportLabels|FinanceLabels|InvoiceLabels|ActivityLabels|OthersLabels} ItemsLabels
552
552
  */
553
553
 
554
+ /**
555
+ * @typedef {'national_id_card'|'other_identity_document'|'resume'|'work_disability_recognition'} iconPeopleLabels
556
+ *
557
+ * @typedef {'employment_center_certificate'|'motivation_letter'|'other_work_document'|'school_attendance_certificate'|'school_insurance_certificate'|'student_card'|'unemployment_benefit'|'work_contract'} iconWorkLabels
558
+ *
559
+ * @typedef {'fine'} iconJusticeLabels
560
+ *
561
+ * @typedef {'residence_permit'} iconGlobeLabels
562
+ *
563
+ * @typedef {'passport'} iconPlaneLabels
564
+ *
565
+ * @typedef {'library_card'} iconLibraryLabels
566
+ *
567
+ * @typedef {'identity_photo'} iconImageLabels
568
+ *
569
+ * @typedef {'fidelity_card'|'grocery_invoice'} iconShopLabels
570
+ *
571
+ * @typedef {'electoral_card'} iconGouvLabels
572
+ *
573
+ * @typedef {'diploma'|'gradebook'} iconSchoolLabels
574
+ *
575
+ * @typedef {'birth_certificate'} iconChildLabels
576
+ *
577
+ * @typedef {'receipt'} iconEmailLabels
578
+ *
579
+ * @typedef {'appliance_invoice'} iconLaudryLabels
580
+ *
581
+ * @typedef {'accommodation_proof'|'building_permit'|'condition_report'|'house_insurance'|'house_sale_agreeement'|'lease'|'mechanic_invoice'|'other_house_document'|'real_estate_insurance'|'rent_receipt'|'technical_diagnostic_record'|'unfit_for_habitation_declaration'|'work_invoice'|'work_quote'} iconHomeLabels
582
+ *
583
+ * @typedef {'loan_agreement'|'other_revenue'|'pay_sheet'|'payment_proof_family_allowance'|'pension'} iconBenefitLabels
584
+ *
585
+ * @typedef {'other_bank_document'} iconEuroLabels
586
+ *
587
+ * @typedef {'bank_details'} iconBankCheckLabels
588
+ *
589
+ * @typedef {'other_administrative_document'|'other_tax_document'|'real_estate_tax'|'tax_notice'|'tax_return'|'tax_timetable'} iconBankLabels
590
+ *
591
+ * @typedef {'car_insurance'|'driver_license'|'other_transport_document'|'transport_card'|'transport_invoice'|'vehicle_registration'} iconCarLabels
592
+ *
593
+ * @typedef {'energy_contract'|'energy_invoice'} iconLightningLabels
594
+ *
595
+ * @typedef {'isp_invoice'|'telecom_invoice'|'web_service_invoice'} iconTelecomLabels
596
+ *
597
+ * @typedef {'phone_invoice'} iconTelephoneLabels
598
+ *
599
+ * @typedef {'water_invoice'} iconWaterLabels
600
+ *
601
+ * @typedef {'expense_claim'} iconRemboursementLabels
602
+ *
603
+ * @typedef {'restaurant_invoice'} iconRestaurantLabels
604
+ *
605
+ * @typedef {'other_invoice'} iconBillLabels
606
+ *
607
+ * @typedef {'caf'|'citizen_registration_certificate'|'divorce'|'family_record_book'|'large_family_card'|'other_family_document'|'pacs'|'single_parent_benefit'|'wedding'} iconTeamLabels
608
+ *
609
+ * @typedef {'other_activity_document'|'personal_sporting_licence'} iconFitnessLabels
610
+ *
611
+ * @typedef {'health_book'|'health_certificate'|'health_insurance_card'|'health_invoice'|'national_health_insurance_card'|'national_health_insurance_right_certificate'|'other_health_document'|'person_insurance'|'pregnancy_medical_certificate'|'prescription'} iconHeartLabels
612
+ *
613
+ * @typedef {'bank_statement'} iconExchangeLabels
614
+ *
615
+ * @typedef {'note_activity_document'|'note_family_document'|'note_finance'|'note_health_document'|'note_house_document'|'note_identity_document'|'note_invoice'|'note_transport_document'|'note_work_document'} iconFileTypeNoteLabels
616
+ */
617
+
618
+ /**
619
+ * @typedef {'bank-check'|'bank'|'benefit'|'bill'|'car'|'child'|'email'|'euro'|'exchange'|'file-type-note'|'fitness'|'globe'|'gouv'|'heart'|'home'|'image'|'justice'|'laudry'|'library'|'lightning'|'people'|'plane'|'remboursement'|'restaurant'|'school'|'shop'|'team'|'telecom'|'telephone'|'water'|'work'} IconQualificationLabels
620
+ */
621
+
622
+ /**
623
+ * @typedef {{ icon: IconQualificationLabels, labels: Array<string> }} iconLabelPairs
624
+ */
625
+
554
626
  /**
555
627
  * @typedef {object} DACCMeasure
556
628
  * See https://github.com/cozy/DACC
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-client",
3
- "version": "46.1.1",
3
+ "version": "46.2.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": "1ed9d9c1d15c984365a301e5a01a06f064c93671"
78
+ "gitHead": "e355e47c34cce739a12e046682df2aef47721de8"
79
79
  }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @type {Array<import("../../types").IdentityLabel>}
3
+ */
4
+ export const THEME_IDENTITY_LABELS: Array<import("../../types").IdentityLabel>;
5
+ /**
6
+ * @type {Array<import("../../types").FamilyLabel>}
7
+ */
8
+ export const THEME_FAMILY_LABELS: Array<import("../../types").FamilyLabel>;
9
+ /**
10
+ * @type {Array<import("../../types").WorkStudyLabels>}
11
+ */
12
+ export const THEME_WORK_STUDY_LABELS: Array<import("../../types").WorkStudyLabels>;
13
+ /**
14
+ * @type {Array<import("../../types").HealthLabels>}
15
+ */
16
+ export const THEME_HEALTH_LABELS: Array<import("../../types").HealthLabels>;
17
+ /**
18
+ * @type {Array<import("../../types").HomeLabels>}
19
+ */
20
+ export const THEME_HOME_LABELS: Array<import("../../types").HomeLabels>;
21
+ /**
22
+ * @type {Array<import("../../types").TransportLabels>}
23
+ */
24
+ export const THEME_TRANSPORT_LABELS: Array<import("../../types").TransportLabels>;
25
+ /**
26
+ * @type {Array<import("../../types").ActivityLabels>}
27
+ */
28
+ export const THEME_ACTIVITY_LABELS: Array<import("../../types").ActivityLabels>;
29
+ /**
30
+ * @type {Array<import("../../types").FinanceLabels>}
31
+ */
32
+ export const THEME_FINANCE_LABELS: Array<import("../../types").FinanceLabels>;
33
+ /**
34
+ * @type {Array<import("../../types").InvoiceLabels>}
35
+ */
36
+ export const THEME_INVOICE_LABELS: Array<import("../../types").InvoiceLabels>;
37
+ /**
38
+ * @type {Array<import("../../types").OthersLabels>}
39
+ */
40
+ export const THEME_OTHERS_LABELS: Array<import("../../types").OthersLabels>;
41
+ /**
42
+ * @type {Array<import("../../types").iconLabelPairs>}
43
+ */
44
+ export const iconLabelPairs: Array<import("../../types").iconLabelPairs>;
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * @typedef {object} QualificationAttributes
3
+ * @property {string} [icon] - The qualification icon.
3
4
  * @property {string} [label] - The qualification label.
4
5
  * @property {string} [purpose] - The document purpose.
5
6
  * @property {string} [sourceCategory] - The activity field of the document source.
@@ -21,6 +22,10 @@ export class Qualification {
21
22
  * @param {QualificationAttributes} attributes - Qualification's attributes
22
23
  */
23
24
  constructor(label: string, attributes?: QualificationAttributes);
25
+ /**
26
+ * @type {string}
27
+ */
28
+ icon: string;
24
29
  /**
25
30
  * @type {string?}
26
31
  */
@@ -83,6 +88,13 @@ export class Qualification {
83
88
  * @returns {Qualification} The Qualification object.
84
89
  */
85
90
  setSubjects(subjects: any[]): Qualification;
91
+ /**
92
+ * Set icon to the qualification.
93
+ *
94
+ * @param {string} icon - The icon to set.
95
+ * @returns {Qualification} The Qualification object.
96
+ */
97
+ setIcon(icon: string): Qualification;
86
98
  /**
87
99
  * Returns the qualification attributes
88
100
  *
@@ -95,7 +107,12 @@ export namespace Qualification {
95
107
  }
96
108
  export function setQualification(document: object, qualification: Qualification): object;
97
109
  export function getQualification(document: object): Qualification | null;
110
+ export function getIconByLabel(label: string): import('../../types').IconQualificationLabels | string;
98
111
  export type QualificationAttributes = {
112
+ /**
113
+ * - The qualification icon.
114
+ */
115
+ icon?: string;
99
116
  /**
100
117
  * - The qualification label.
101
118
  */
package/types/types.d.ts CHANGED
@@ -912,7 +912,7 @@ export type Theme = {
912
912
  defaultItems?: Array<string>;
913
913
  };
914
914
  export type ThemesList = Theme[];
915
- export type ThemesLabels = "transport" | "identity" | "family" | "health" | "invoice" | "work_study" | "home" | "finance" | "others";
915
+ export type ThemesLabels = "transport" | "identity" | "family" | "health" | "invoice" | "home" | "work_study" | "finance" | "others";
916
916
  export type QualificationAttributes = {
917
917
  label: string;
918
918
  purpose?: string;
@@ -927,10 +927,46 @@ export type HealthLabels = "health_book" | "health_certificate" | "pregnancy_med
927
927
  export type HomeLabels = "house_sale_agreeement" | "building_permit" | "technical_diagnostic_record" | "lease" | "rent_receipt" | "house_insurance" | "work_quote" | "work_invoice" | "other_house_document" | "phone_invoice" | "isp_invoice" | "telecom_invoice" | "energy_invoice" | "water_invoice" | "other_invoice" | "unfit_for_habitation_declaration" | "accommodation_proof" | "real_estate_insurance" | "condition_report" | "note_house_document";
928
928
  export type TransportLabels = "driver_license" | "transport_card" | "vehicle_registration" | "car_insurance" | "mechanic_invoice" | "transport_invoice" | "other_transport_document" | "note_transport_document";
929
929
  export type FinanceLabels = "pay_sheet" | "single_parent_benefit" | "other_revenue" | "real_estate_tax" | "tax_return" | "tax_notice" | "tax_timetable" | "other_tax_document" | "bank_details" | "bank_statement" | "loan_agreement" | "other_bank_document" | "receipt" | "payment_proof_family_allowance" | "expense_claim" | "fine" | "note_finance";
930
- export type InvoiceLabels = "health_invoice" | "transport_invoice" | "work_invoice" | "phone_invoice" | "isp_invoice" | "telecom_invoice" | "energy_invoice" | "water_invoice" | "appliance_invoice" | "web_service_invoice" | "restaurant_invoice" | "other_invoice" | "expense_claim" | "note_invoice";
930
+ export type InvoiceLabels = "health_invoice" | "transport_invoice" | "work_invoice" | "phone_invoice" | "isp_invoice" | "telecom_invoice" | "energy_invoice" | "water_invoice" | "energy_contract" | "appliance_invoice" | "web_service_invoice" | "restaurant_invoice" | "grocery_invoice" | "other_invoice" | "expense_claim" | "note_invoice";
931
931
  export type ActivityLabels = "fidelity_card" | "library_card" | "personal_sporting_licence" | "other_activity_document" | "note_activity_document";
932
932
  export type OthersLabels = "other_administrative_document" | "note_other";
933
- export type ItemsLabels = "resume" | "identity_photo" | "national_id_card" | "passport" | "residence_permit" | "family_record_book" | "birth_certificate" | "driver_license" | "other_identity_document" | "wedding" | "pacs" | "divorce" | "large_family_card" | "caf" | "other_family_document" | "diploma" | "work_contract" | "pay_sheet" | "fidelity_card" | "library_card" | "single_parent_benefit" | "transport_card" | "electoral_card" | "employment_center_certificate" | "unemployment_benefit" | "pension" | "other_revenue" | "gradebook" | "student_card" | "motivation_letter" | "other_work_document" | "health_book" | "health_certificate" | "pregnancy_medical_certificate" | "work_disability_recognition" | "national_health_insurance_card" | "national_health_insurance_right_certificate" | "health_insurance_card" | "prescription" | "health_invoice" | "other_health_document" | "vehicle_registration" | "car_insurance" | "mechanic_invoice" | "transport_invoice" | "other_transport_document" | "house_sale_agreeement" | "real_estate_tax" | "building_permit" | "technical_diagnostic_record" | "lease" | "rent_receipt" | "house_insurance" | "work_quote" | "work_invoice" | "other_house_document" | "phone_invoice" | "isp_invoice" | "telecom_invoice" | "energy_invoice" | "water_invoice" | "appliance_invoice" | "web_service_invoice" | "restaurant_invoice" | "other_invoice" | "tax_return" | "tax_notice" | "tax_timetable" | "other_tax_document" | "bank_details" | "bank_statement" | "loan_agreement" | "other_bank_document" | "receipt" | "payment_proof_family_allowance" | "school_attendance_certificate" | "school_insurance_certificate" | "unfit_for_habitation_declaration" | "accommodation_proof" | "citizen_registration_certificate" | "personal_sporting_licence" | "other_activity_document" | "real_estate_insurance" | "person_insurance" | "other_administrative_document" | "expense_claim" | "fine" | "condition_report" | "note_identity_document" | "note_family_document" | "note_work_document" | "note_health_document" | "note_house_document" | "note_transport_document" | "note_activity_document" | "note_finance" | "note_invoice" | "note_other";
933
+ export type ItemsLabels = "resume" | "identity_photo" | "national_id_card" | "passport" | "residence_permit" | "family_record_book" | "birth_certificate" | "driver_license" | "other_identity_document" | "wedding" | "pacs" | "divorce" | "large_family_card" | "caf" | "other_family_document" | "diploma" | "work_contract" | "pay_sheet" | "fidelity_card" | "library_card" | "single_parent_benefit" | "transport_card" | "electoral_card" | "employment_center_certificate" | "unemployment_benefit" | "pension" | "other_revenue" | "gradebook" | "student_card" | "motivation_letter" | "other_work_document" | "health_book" | "health_certificate" | "pregnancy_medical_certificate" | "work_disability_recognition" | "national_health_insurance_card" | "national_health_insurance_right_certificate" | "health_insurance_card" | "prescription" | "health_invoice" | "other_health_document" | "vehicle_registration" | "car_insurance" | "mechanic_invoice" | "transport_invoice" | "other_transport_document" | "house_sale_agreeement" | "real_estate_tax" | "building_permit" | "technical_diagnostic_record" | "lease" | "rent_receipt" | "house_insurance" | "work_quote" | "work_invoice" | "other_house_document" | "phone_invoice" | "isp_invoice" | "telecom_invoice" | "energy_invoice" | "water_invoice" | "energy_contract" | "appliance_invoice" | "web_service_invoice" | "restaurant_invoice" | "grocery_invoice" | "other_invoice" | "tax_return" | "tax_notice" | "tax_timetable" | "other_tax_document" | "bank_details" | "bank_statement" | "loan_agreement" | "other_bank_document" | "receipt" | "payment_proof_family_allowance" | "school_attendance_certificate" | "school_insurance_certificate" | "unfit_for_habitation_declaration" | "accommodation_proof" | "citizen_registration_certificate" | "personal_sporting_licence" | "other_activity_document" | "real_estate_insurance" | "person_insurance" | "other_administrative_document" | "expense_claim" | "fine" | "condition_report" | "note_identity_document" | "note_family_document" | "note_work_document" | "note_health_document" | "note_house_document" | "note_transport_document" | "note_activity_document" | "note_finance" | "note_invoice" | "note_other";
934
+ export type iconPeopleLabels = "resume" | "national_id_card" | "other_identity_document" | "work_disability_recognition";
935
+ export type iconWorkLabels = "work_contract" | "employment_center_certificate" | "unemployment_benefit" | "student_card" | "motivation_letter" | "other_work_document" | "school_attendance_certificate" | "school_insurance_certificate";
936
+ export type iconJusticeLabels = "fine";
937
+ export type iconGlobeLabels = "residence_permit";
938
+ export type iconPlaneLabels = "passport";
939
+ export type iconLibraryLabels = "library_card";
940
+ export type iconImageLabels = "identity_photo";
941
+ export type iconShopLabels = "fidelity_card" | "grocery_invoice";
942
+ export type iconGouvLabels = "electoral_card";
943
+ export type iconSchoolLabels = "diploma" | "gradebook";
944
+ export type iconChildLabels = "birth_certificate";
945
+ export type iconEmailLabels = "receipt";
946
+ export type iconLaudryLabels = "appliance_invoice";
947
+ export type iconHomeLabels = "mechanic_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" | "real_estate_insurance" | "condition_report";
948
+ export type iconBenefitLabels = "pay_sheet" | "pension" | "other_revenue" | "loan_agreement" | "payment_proof_family_allowance";
949
+ export type iconEuroLabels = "other_bank_document";
950
+ export type iconBankCheckLabels = "bank_details";
951
+ export type iconBankLabels = "real_estate_tax" | "tax_return" | "tax_notice" | "tax_timetable" | "other_tax_document" | "other_administrative_document";
952
+ export type iconCarLabels = "driver_license" | "transport_card" | "vehicle_registration" | "car_insurance" | "transport_invoice" | "other_transport_document";
953
+ export type iconLightningLabels = "energy_invoice" | "energy_contract";
954
+ export type iconTelecomLabels = "isp_invoice" | "telecom_invoice" | "web_service_invoice";
955
+ export type iconTelephoneLabels = "phone_invoice";
956
+ export type iconWaterLabels = "water_invoice";
957
+ export type iconRemboursementLabels = "expense_claim";
958
+ export type iconRestaurantLabels = "restaurant_invoice";
959
+ export type iconBillLabels = "other_invoice";
960
+ export type iconTeamLabels = "family_record_book" | "wedding" | "pacs" | "divorce" | "large_family_card" | "caf" | "other_family_document" | "single_parent_benefit" | "citizen_registration_certificate";
961
+ export type iconFitnessLabels = "personal_sporting_licence" | "other_activity_document";
962
+ export type iconHeartLabels = "health_book" | "health_certificate" | "pregnancy_medical_certificate" | "national_health_insurance_card" | "national_health_insurance_right_certificate" | "health_insurance_card" | "prescription" | "health_invoice" | "other_health_document" | "person_insurance";
963
+ export type iconExchangeLabels = "bank_statement";
964
+ export type iconFileTypeNoteLabels = "note_identity_document" | "note_family_document" | "note_work_document" | "note_health_document" | "note_house_document" | "note_transport_document" | "note_activity_document" | "note_finance" | "note_invoice";
965
+ export type IconQualificationLabels = "image" | "work" | "car" | "telecom" | "water" | "bank" | "child" | "bank-check" | "benefit" | "bill" | "email" | "euro" | "exchange" | "file-type-note" | "fitness" | "globe" | "gouv" | "heart" | "home" | "justice" | "laudry" | "library" | "lightning" | "people" | "plane" | "remboursement" | "restaurant" | "school" | "shop" | "team" | "telephone";
966
+ export type iconLabelPairs = {
967
+ icon: IconQualificationLabels;
968
+ labels: Array<string>;
969
+ };
934
970
  /**
935
971
  * See https://github.com/cozy/DACC
936
972
  */