cozy-client 43.5.0 → 43.6.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.
- package/dist/CozyClient.js +1 -1
- package/dist/assets/qualifications.json +13 -0
- package/dist/models/document/documentTypeData.js +2 -2
- package/dist/models/document/locales/en.json +2 -0
- package/dist/models/document/locales/fr.json +2 -0
- package/dist/models/note.js +23 -8
- package/dist/types.js +2 -2
- package/package.json +2 -2
- package/types/models/note.d.ts +3 -1
- package/types/types.d.ts +3 -3
package/dist/CozyClient.js
CHANGED
|
@@ -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.
|
|
2706
|
+
CozyClient.version = "43.6.0";
|
|
2707
2707
|
|
|
2708
2708
|
_microee.default.mixin(CozyClient);
|
|
2709
2709
|
|
|
@@ -488,6 +488,19 @@
|
|
|
488
488
|
"sourceSubCategory": "sport",
|
|
489
489
|
"subjects": ["permit", "invoice"]
|
|
490
490
|
},
|
|
491
|
+
{
|
|
492
|
+
"label": "real_estate_insurance",
|
|
493
|
+
"purpose": "contract",
|
|
494
|
+
"sourceCategory": "insurance",
|
|
495
|
+
"sourceSubCategory": "real_estate",
|
|
496
|
+
"subjects": ["insurance"]
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"label": "person_insurance",
|
|
500
|
+
"purpose": "contract",
|
|
501
|
+
"sourceCategory": "insurance",
|
|
502
|
+
"subjects": ["insurance"]
|
|
503
|
+
},
|
|
491
504
|
{
|
|
492
505
|
"label": "other_administrative_document"
|
|
493
506
|
},
|
|
@@ -35,7 +35,7 @@ var identityLabels = ['identity_photo', 'national_id_card', 'passport', 'residen
|
|
|
35
35
|
* @type {Array<import("../../types").FamilyLabel>}
|
|
36
36
|
*/
|
|
37
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'];
|
|
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
39
|
/**
|
|
40
40
|
* @type {Array<import("../../types").WorkStudyLabels>}
|
|
41
41
|
*/
|
|
@@ -50,7 +50,7 @@ var healthLabels = ['health_certificate', 'health_book', 'national_health_insura
|
|
|
50
50
|
* @type {Array<import("../../types").HomeLabels>}
|
|
51
51
|
*/
|
|
52
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', 'note_house_document', 'other_house_document'];
|
|
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', 'note_house_document', 'other_house_document', 'real_estate_insurance'];
|
|
54
54
|
/**
|
|
55
55
|
* @type {Array<import("../../types").TransportLabels>}
|
|
56
56
|
*/
|
|
@@ -89,10 +89,12 @@
|
|
|
89
89
|
"pay_sheet": "Pay sheet |||| Pay sheets",
|
|
90
90
|
"payment_proof_family_allowance": "family allowance payment proof |||| family allowance payment proofs",
|
|
91
91
|
"pension": "Pension |||| Pensions",
|
|
92
|
+
"person_insurance": "Individual insurance certificate |||| Individual insurance certificates",
|
|
92
93
|
"personal_sporting_licence": "Sporting licence |||| Sporting licences",
|
|
93
94
|
"phone_invoice": "Phone invoice |||| Phone invoices",
|
|
94
95
|
"pregnancy_medical_certificate": "Certificate of pregnancy |||| Certificates of pregnancy",
|
|
95
96
|
"prescription": "Prescription |||| Prescriptions",
|
|
97
|
+
"real_estate_insurance" : "Real estate insurance certificate |||| Real estate insurance certificates",
|
|
96
98
|
"real_estate_tax": "Real estate tax |||| Real estate taxes",
|
|
97
99
|
"receipt": "Receipt |||| Receipts",
|
|
98
100
|
"rent_receipt": "Rent receipt |||| Rent receipts",
|
|
@@ -89,10 +89,12 @@
|
|
|
89
89
|
"pay_sheet": "Fiche de paie |||| Fiches de paie",
|
|
90
90
|
"payment_proof_family_allowance": "Attestation de paiement CAF |||| Attestations de paiement CAF",
|
|
91
91
|
"pension": "Retraite |||| Retraites",
|
|
92
|
+
"person_insurance": "Attestation d'assurance individuelle |||| Attestations d'assurance individuelle",
|
|
92
93
|
"personal_sporting_licence": "Licence sportive |||| Licences sportives",
|
|
93
94
|
"phone_invoice": "Facture de téléphone |||| Factures de téléphone",
|
|
94
95
|
"pregnancy_medical_certificate": "Certificat de grossesse |||| Certificats de grossesse",
|
|
95
96
|
"prescription": "Ordonnance |||| Ordonnances",
|
|
97
|
+
"real_estate_insurance" : "Attestation d'assurance immobilière |||| Attestations d'assurance immobilière",
|
|
96
98
|
"real_estate_tax": "Taxe foncière |||| Taxes foncières",
|
|
97
99
|
"receipt": "Accusé de réception |||| Accusés de réception",
|
|
98
100
|
"rent_receipt": "Quittance de loyer |||| Quittances de loyer",
|
package/dist/models/note.js
CHANGED
|
@@ -45,6 +45,8 @@ var generateUrlForNote = function generateUrlForNote(notesAppUrl, file) {
|
|
|
45
45
|
*
|
|
46
46
|
* @param {object} client CozyClient instance
|
|
47
47
|
* @param {object} file io.cozy.file object
|
|
48
|
+
* @param {object} options Options
|
|
49
|
+
* @param {string} [options.pathname] Pathname to use in the URL
|
|
48
50
|
* @returns {Promise<string>} url
|
|
49
51
|
*/
|
|
50
52
|
|
|
@@ -53,18 +55,31 @@ exports.generateUrlForNote = generateUrlForNote;
|
|
|
53
55
|
|
|
54
56
|
var fetchURL = /*#__PURE__*/function () {
|
|
55
57
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(client, file) {
|
|
56
|
-
var
|
|
58
|
+
var options,
|
|
59
|
+
_yield$client$getStac,
|
|
60
|
+
_yield$client$getStac2,
|
|
61
|
+
note_id,
|
|
62
|
+
subdomain,
|
|
63
|
+
protocol,
|
|
64
|
+
instance,
|
|
65
|
+
sharecode,
|
|
66
|
+
public_name,
|
|
67
|
+
_options$pathname,
|
|
68
|
+
searchParams,
|
|
69
|
+
_options$pathname2,
|
|
70
|
+
_args = arguments;
|
|
57
71
|
|
|
58
72
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
59
73
|
while (1) {
|
|
60
74
|
switch (_context.prev = _context.next) {
|
|
61
75
|
case 0:
|
|
62
|
-
|
|
76
|
+
options = _args.length > 2 && _args[2] !== undefined ? _args[2] : {};
|
|
77
|
+
_context.next = 3;
|
|
63
78
|
return client.getStackClient().collection('io.cozy.notes').fetchURL({
|
|
64
79
|
_id: file.id
|
|
65
80
|
});
|
|
66
81
|
|
|
67
|
-
case
|
|
82
|
+
case 3:
|
|
68
83
|
_yield$client$getStac = _context.sent;
|
|
69
84
|
_yield$client$getStac2 = _yield$client$getStac.data;
|
|
70
85
|
note_id = _yield$client$getStac2.note_id;
|
|
@@ -75,7 +90,7 @@ var fetchURL = /*#__PURE__*/function () {
|
|
|
75
90
|
public_name = _yield$client$getStac2.public_name;
|
|
76
91
|
|
|
77
92
|
if (!sharecode) {
|
|
78
|
-
_context.next =
|
|
93
|
+
_context.next = 18;
|
|
79
94
|
break;
|
|
80
95
|
}
|
|
81
96
|
|
|
@@ -85,21 +100,21 @@ var fetchURL = /*#__PURE__*/function () {
|
|
|
85
100
|
return _context.abrupt("return", (0, _helpers.generateWebLink)({
|
|
86
101
|
cozyUrl: "".concat(protocol, "://").concat(instance),
|
|
87
102
|
searchParams: searchParams,
|
|
88
|
-
pathname: '/public/',
|
|
103
|
+
pathname: (_options$pathname = options.pathname) !== null && _options$pathname !== void 0 ? _options$pathname : '/public/',
|
|
89
104
|
slug: 'notes',
|
|
90
105
|
subDomainType: subdomain
|
|
91
106
|
}));
|
|
92
107
|
|
|
93
|
-
case
|
|
108
|
+
case 18:
|
|
94
109
|
return _context.abrupt("return", (0, _helpers.generateWebLink)({
|
|
95
110
|
cozyUrl: "".concat(protocol, "://").concat(instance),
|
|
96
|
-
pathname: '',
|
|
111
|
+
pathname: (_options$pathname2 = options.pathname) !== null && _options$pathname2 !== void 0 ? _options$pathname2 : '',
|
|
97
112
|
slug: 'notes',
|
|
98
113
|
subDomainType: subdomain,
|
|
99
114
|
hash: "/n/".concat(note_id)
|
|
100
115
|
}));
|
|
101
116
|
|
|
102
|
-
case
|
|
117
|
+
case 19:
|
|
103
118
|
case "end":
|
|
104
119
|
return _context.stop();
|
|
105
120
|
}
|
package/dist/types.js
CHANGED
|
@@ -525,13 +525,13 @@ var _dsl = require("./queries/dsl");
|
|
|
525
525
|
/**
|
|
526
526
|
* @typedef {'identity_photo'|'national_id_card'|'passport'|'residence_permit'|'family_record_book'|'birth_certificate'|'driver_license'|'other_identity_document'|'citizen_registration_certificate'|'personal_sporting_licence'|'electoral_card'|'note_identity_document'} IdentityLabel
|
|
527
527
|
*
|
|
528
|
-
* @typedef {'family_record_book'|'birth_certificate'|'wedding'|'pacs'|'divorce'|'large_family_card'|'caf'|'other_family_document'|'payment_proof_family_allowance'|'single_parent_benefit'|'note_family_document'} FamilyLabel
|
|
528
|
+
* @typedef {'family_record_book'|'birth_certificate'|'wedding'|'pacs'|'divorce'|'large_family_card'|'caf'|'other_family_document'|'payment_proof_family_allowance'|'single_parent_benefit'|'note_family_document'|'person_insurance'} FamilyLabel
|
|
529
529
|
*
|
|
530
530
|
* @typedef {'diploma'|'work_contract'|'pay_sheet'|'unemployment_benefit'|'pension'|'gradebook'|'student_card'|'resume'|'motivation_letter'|'other_work_document'|'work_disability_recognition'|'school_attendance_certificate'|'employment_center_certificate'|'school_insurance_certificate'|'note_work_document'|'expense_claim'} WorkStudyLabels
|
|
531
531
|
*
|
|
532
532
|
* @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'|'note_health_document'} HealthLabels
|
|
533
533
|
*
|
|
534
|
-
* @typedef {'phone_invoice'|'isp_invoice'|'telecom_invoice'|'energy_invoice'|'water_invoice'|'other_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'|'note_house_document'} HomeLabels
|
|
534
|
+
* @typedef {'phone_invoice'|'isp_invoice'|'telecom_invoice'|'energy_invoice'|'water_invoice'|'other_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'|'note_house_document'|'real_estate_insurance'} HomeLabels
|
|
535
535
|
*
|
|
536
536
|
* @typedef {'driver_license'|'vehicle_registration'|'car_insurance'|'mechanic_invoice'|'transport_invoice'|'other_transport_document'|'transport_card'|'note_transport_document'} TransportLabels
|
|
537
537
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-client",
|
|
3
|
-
"version": "43.
|
|
3
|
+
"version": "43.6.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": "
|
|
78
|
+
"gitHead": "c9eaf3d5a902d852ac4c8ec6b2c72698833bf865"
|
|
79
79
|
}
|
package/types/models/note.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export function generatePrivateUrl(notesAppUrl: string, file: object, options?: {}): string;
|
|
2
2
|
export function generateUrlForNote(notesAppUrl: any, file: any): string;
|
|
3
|
-
export function fetchURL(client: object, file: object
|
|
3
|
+
export function fetchURL(client: object, file: object, options?: {
|
|
4
|
+
pathname: string;
|
|
5
|
+
}): Promise<string>;
|
package/types/types.d.ts
CHANGED
|
@@ -900,16 +900,16 @@ export type QualificationAttributes = {
|
|
|
900
900
|
subjects?: Array<string>;
|
|
901
901
|
};
|
|
902
902
|
export type IdentityLabel = "identity_photo" | "national_id_card" | "passport" | "residence_permit" | "family_record_book" | "birth_certificate" | "driver_license" | "other_identity_document" | "electoral_card" | "citizen_registration_certificate" | "personal_sporting_licence" | "note_identity_document";
|
|
903
|
-
export type FamilyLabel = "family_record_book" | "birth_certificate" | "wedding" | "pacs" | "divorce" | "large_family_card" | "caf" | "other_family_document" | "single_parent_benefit" | "payment_proof_family_allowance" | "note_family_document";
|
|
903
|
+
export type FamilyLabel = "family_record_book" | "birth_certificate" | "wedding" | "pacs" | "divorce" | "large_family_card" | "caf" | "other_family_document" | "single_parent_benefit" | "payment_proof_family_allowance" | "person_insurance" | "note_family_document";
|
|
904
904
|
export type WorkStudyLabels = "resume" | "diploma" | "work_contract" | "pay_sheet" | "employment_center_certificate" | "unemployment_benefit" | "pension" | "gradebook" | "student_card" | "motivation_letter" | "other_work_document" | "work_disability_recognition" | "school_attendance_certificate" | "school_insurance_certificate" | "expense_claim" | "note_work_document";
|
|
905
905
|
export type HealthLabels = "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" | "note_health_document";
|
|
906
|
-
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" | "note_house_document";
|
|
906
|
+
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" | "note_house_document";
|
|
907
907
|
export type TransportLabels = "driver_license" | "transport_card" | "vehicle_registration" | "car_insurance" | "mechanic_invoice" | "transport_invoice" | "other_transport_document" | "note_transport_document";
|
|
908
908
|
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" | "note_finance";
|
|
909
909
|
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";
|
|
910
910
|
export type ActivityLabels = "fidelity_card" | "library_card" | "personal_sporting_licence" | "other_activity_document" | "note_activity_document";
|
|
911
911
|
export type OthersLabels = "other_administrative_document" | "note_other";
|
|
912
|
-
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" | "other_administrative_document" | "expense_claim" | "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";
|
|
912
|
+
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" | "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";
|
|
913
913
|
/**
|
|
914
914
|
* See https://github.com/cozy/DACC
|
|
915
915
|
*/
|