cozy-client 27.26.4 → 28.0.2

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.
@@ -2537,7 +2537,7 @@ var CozyClient = /*#__PURE__*/function () {
2537
2537
  CozyClient.hooks = CozyClient.hooks || {};
2538
2538
  CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
2539
2539
 
2540
- CozyClient.version = "27.26.4";
2540
+ CozyClient.version = "28.0.2";
2541
2541
 
2542
2542
  _microee.default.mixin(CozyClient);
2543
2543
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-client",
3
- "version": "27.26.4",
3
+ "version": "28.0.2",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.node.js",
6
6
  "browser": "dist/index.js",
@@ -18,10 +18,7 @@
18
18
  "@types/jest": "^26.0.20",
19
19
  "@types/lodash": "^4.14.170",
20
20
  "btoa": "^1.2.1",
21
- "cozy-device-helper": "^1.12.0",
22
- "cozy-flags": "2.7.1",
23
- "cozy-logger": "^1.6.0",
24
- "cozy-stack-client": "^27.26.0",
21
+ "cozy-stack-client": "^28.0.1",
25
22
  "json-stable-stringify": "^1.0.1",
26
23
  "lodash": "^4.17.13",
27
24
  "microee": "^0.0.6",
@@ -50,6 +47,8 @@
50
47
  "@testing-library/react-hooks": "3.7.0",
51
48
  "babel-plugin-search-and-replace": "1.1.0",
52
49
  "btoa": "1.2.1",
50
+ "cozy-device-helper": "^1.12.0",
51
+ "cozy-flags": "2.8.6",
53
52
  "cozy-logger": "1.7.0",
54
53
  "cozy-ui": "48.0.0",
55
54
  "date-fns": "2.27.0",
@@ -63,6 +62,9 @@
63
62
  "typescript": "4.1.5"
64
63
  },
65
64
  "peerDependencies": {
65
+ "cozy-device-helper": ">1.12.0",
66
+ "cozy-flags": ">2.8.6",
67
+ "cozy-logger": ">1.7.0",
66
68
  "cozy-ui": ">34.0.0",
67
69
  "react": "^16.7.0",
68
70
  "react-native": "^0.65.0",
@@ -71,5 +73,5 @@
71
73
  "react-native-ios11-devicecheck": "https://github.com/cozy/react-native-devicecheck#app-attest-v0.1"
72
74
  },
73
75
  "sideEffects": false,
74
- "gitHead": "7a3e9a815d5d8194ca13f893f4f3cb701a07d3a8"
76
+ "gitHead": "806a1dfa8abd8cf90306af37c32650b96e43583e"
75
77
  }
@@ -0,0 +1,3 @@
1
+ export function checkMeasureParams(measure: DACCMeasure): void;
2
+ export function sendMeasureToDACC(client: object, remoteDoctype: string, measure: DACCMeasure): Promise<void>;
3
+ import { DACCMeasure } from "../types";
package/types/types.d.ts CHANGED
@@ -86,7 +86,10 @@ export type QueryOptions = {
86
86
  export type FetchMoreAble = {
87
87
  fetchMore: Function;
88
88
  };
89
- export type UseQueryReturnValue = QueryState & FetchMoreAble;
89
+ export type FetchAble = {
90
+ fetch: Function;
91
+ };
92
+ export type UseQueryReturnValue = QueryState & FetchMoreAble & FetchAble;
90
93
  /**
91
94
  * A reference to a document
92
95
  */
@@ -342,6 +345,39 @@ export type FinanceLabels = "payment_proof_family_allowance" | "pay_sheet" | "ta
342
345
  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";
343
346
  export type ActivityLabels = "personal_sporting_licence" | "other_activity_document";
344
347
  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";
348
+ /**
349
+ * See https://github.com/cozy/DACC
350
+ */
351
+ export type DACCMeasure = {
352
+ /**
353
+ * - It must match an existing measure name on the DACC server
354
+ */
355
+ measureName: string;
356
+ /**
357
+ * - Start of the aggregation period. Should be in YYYY-MM-DD format
358
+ */
359
+ startDate: string;
360
+ /**
361
+ * - The measured value on the aggregation period
362
+ */
363
+ value: number;
364
+ /**
365
+ * - The slug of the app creating the measure
366
+ */
367
+ createdBy: string;
368
+ /**
369
+ * - Should be a {key: value} where the key is set in the measure definition.
370
+ */
371
+ group1: object;
372
+ /**
373
+ * - Should be a {key: value} where the key is set in the measure definition.
374
+ */
375
+ group2: object;
376
+ /**
377
+ * - Should be a {key: value} where the key is set in the measure definition.
378
+ */
379
+ group3: object;
380
+ };
345
381
  /**
346
382
  * Receives the URL to present to the user as a parameter, and should return a promise that resolves with the URL the user was redirected to after accepting the permissions.
347
383
  */