@griddo/core 11.2.7 → 11.2.9-rc.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.
@@ -1,7 +1,10 @@
1
1
  import type { UseFetchStateProps } from "./useFetch";
2
2
  import type { PickRename } from "../types/global";
3
3
  type Response<Areas extends string> = Record<Areas, {
4
- interest: string;
4
+ interest: {
5
+ id?: string;
6
+ label: string;
7
+ };
5
8
  weight: number;
6
9
  }>;
7
10
  type State<Areas extends string> = PickRename<UseFetchStateProps<Response<Areas>>, "data", "query">;
@@ -1,7 +1,10 @@
1
1
  import type { UseFetchStateProps } from "./useFetch";
2
2
  export interface Interest {
3
3
  area: string;
4
- interest: string;
4
+ interest: {
5
+ id?: string;
6
+ label: string;
7
+ };
5
8
  weight: number;
6
9
  }
7
10
  type UseSendInterestsReturn = [
@@ -18,7 +21,7 @@ type UseSendInterestsReturn = [
18
21
  *
19
22
  * // Send interests
20
23
  * setQuery({
21
- * interests: [{ area: "Area1", interest: "Interest1", weight: 1 }]
24
+ * interests: [{ area: "Area1", interest: {label: "Interest1", id: 1}, weight: 1 }]
22
25
  * });
23
26
  *
24
27
  */