@comapeo/core-react 6.2.1 → 6.3.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,10 +1,4 @@
1
- import type { MapeoDoc } from '@comapeo/schema' with { 'resolution-mode': 'import' };
2
1
  import type { WriteableDocumentType } from '../lib/types.js';
3
- type ReadHookResult<D> = {
4
- data: D;
5
- error: Error | null;
6
- isRefetching: boolean;
7
- };
8
2
  /**
9
3
  * Retrieve a single document from the database based on the document's document ID.
10
4
  *
@@ -33,9 +27,125 @@ export declare function useSingleDocByDocId<D extends WriteableDocumentType>({ p
33
27
  docType: D;
34
28
  docId: string;
35
29
  lang?: string;
36
- }): ReadHookResult<Extract<MapeoDoc, {
37
- schemaName: D;
38
- }>>;
30
+ }): {
31
+ data: Extract<({
32
+ schemaName: "track";
33
+ locations: import("@comapeo/schema/dist/schema/track.js").Position[];
34
+ observationRefs: {
35
+ docId: string;
36
+ versionId: string;
37
+ }[];
38
+ tags: {
39
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
40
+ };
41
+ presetRef?: {
42
+ docId: string;
43
+ versionId: string;
44
+ } | undefined;
45
+ docId: string;
46
+ versionId: string;
47
+ originalVersionId: string;
48
+ createdAt: string;
49
+ updatedAt: string;
50
+ links: string[];
51
+ deleted: boolean;
52
+ } & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields) | ({
53
+ schemaName: "observation";
54
+ lat?: number | undefined;
55
+ lon?: number | undefined;
56
+ attachments: import("@comapeo/schema/dist/schema/observation.js").Attachment[];
57
+ tags: {
58
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
59
+ };
60
+ metadata?: {
61
+ manualLocation?: boolean;
62
+ position?: import("@comapeo/schema/dist/schema/observation.js").Position;
63
+ lastSavedPosition?: import("@comapeo/schema/dist/schema/observation.js").Position;
64
+ positionProvider?: {
65
+ gpsAvailable?: boolean;
66
+ passiveAvailable?: boolean;
67
+ locationServicesEnabled: boolean;
68
+ networkAvailable?: boolean;
69
+ };
70
+ } | undefined;
71
+ presetRef?: {
72
+ docId: string;
73
+ versionId: string;
74
+ } | undefined;
75
+ docId: string;
76
+ versionId: string;
77
+ originalVersionId: string;
78
+ createdAt: string;
79
+ updatedAt: string;
80
+ links: string[];
81
+ deleted: boolean;
82
+ } & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields) | ({
83
+ schemaName: "preset";
84
+ name: string;
85
+ geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
86
+ tags: import("@comapeo/schema/dist/schema/preset.js").Tags;
87
+ addTags: import("@comapeo/schema/dist/schema/preset.js").Tags1;
88
+ removeTags: import("@comapeo/schema/dist/schema/preset.js").Tags2;
89
+ fieldRefs: {
90
+ docId: string;
91
+ versionId: string;
92
+ }[];
93
+ iconRef?: {
94
+ docId: string;
95
+ versionId: string;
96
+ } | undefined;
97
+ terms: string[];
98
+ color?: string | undefined;
99
+ docId: string;
100
+ versionId: string;
101
+ originalVersionId: string;
102
+ createdAt: string;
103
+ updatedAt: string;
104
+ links: string[];
105
+ deleted: boolean;
106
+ } & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields) | ({
107
+ schemaName: "field";
108
+ tagKey: string;
109
+ type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
110
+ label: string;
111
+ appearance?: ("appearance_unspecified" | "singleline" | "multiline" | "UNRECOGNIZED") | undefined;
112
+ snakeCase?: boolean | undefined;
113
+ options?: {
114
+ label: string;
115
+ value: string | boolean | number | null;
116
+ }[] | undefined;
117
+ universal?: boolean | undefined;
118
+ placeholder?: string | undefined;
119
+ helperText?: string | undefined;
120
+ docId: string;
121
+ versionId: string;
122
+ originalVersionId: string;
123
+ createdAt: string;
124
+ updatedAt: string;
125
+ links: string[];
126
+ deleted: boolean;
127
+ } & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields) | ({
128
+ schemaName: "remoteDetectionAlert";
129
+ detectionDateStart: string;
130
+ detectionDateEnd: string;
131
+ sourceId: string;
132
+ metadata: {
133
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
134
+ };
135
+ geometry: import("@comapeo/schema/dist/schema/remoteDetectionAlert.js").Geometry;
136
+ docId: string;
137
+ versionId: string;
138
+ originalVersionId: string;
139
+ createdAt: string;
140
+ updatedAt: string;
141
+ links: string[];
142
+ deleted: boolean;
143
+ } & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields), {
144
+ schemaName: D;
145
+ }>;
146
+ error: Error | null;
147
+ isRefetching: boolean;
148
+ };
39
149
  /**
40
150
  * Retrieve a single document from the database based on the document's version ID.
41
151
  *
@@ -64,9 +174,125 @@ export declare function useSingleDocByVersionId<D extends WriteableDocumentType>
64
174
  docType: D;
65
175
  versionId: string;
66
176
  lang?: string;
67
- }): ReadHookResult<Extract<MapeoDoc, {
68
- schemaName: D;
69
- }>>;
177
+ }): {
178
+ data: Extract<({
179
+ schemaName: "track";
180
+ locations: import("@comapeo/schema/dist/schema/track.js").Position[];
181
+ observationRefs: {
182
+ docId: string;
183
+ versionId: string;
184
+ }[];
185
+ tags: {
186
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
187
+ };
188
+ presetRef?: {
189
+ docId: string;
190
+ versionId: string;
191
+ } | undefined;
192
+ docId: string;
193
+ versionId: string;
194
+ originalVersionId: string;
195
+ createdAt: string;
196
+ updatedAt: string;
197
+ links: string[];
198
+ deleted: boolean;
199
+ } & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields) | ({
200
+ schemaName: "observation";
201
+ lat?: number | undefined;
202
+ lon?: number | undefined;
203
+ attachments: import("@comapeo/schema/dist/schema/observation.js").Attachment[];
204
+ tags: {
205
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
206
+ };
207
+ metadata?: {
208
+ manualLocation?: boolean;
209
+ position?: import("@comapeo/schema/dist/schema/observation.js").Position;
210
+ lastSavedPosition?: import("@comapeo/schema/dist/schema/observation.js").Position;
211
+ positionProvider?: {
212
+ gpsAvailable?: boolean;
213
+ passiveAvailable?: boolean;
214
+ locationServicesEnabled: boolean;
215
+ networkAvailable?: boolean;
216
+ };
217
+ } | undefined;
218
+ presetRef?: {
219
+ docId: string;
220
+ versionId: string;
221
+ } | undefined;
222
+ docId: string;
223
+ versionId: string;
224
+ originalVersionId: string;
225
+ createdAt: string;
226
+ updatedAt: string;
227
+ links: string[];
228
+ deleted: boolean;
229
+ } & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields) | ({
230
+ schemaName: "preset";
231
+ name: string;
232
+ geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
233
+ tags: import("@comapeo/schema/dist/schema/preset.js").Tags;
234
+ addTags: import("@comapeo/schema/dist/schema/preset.js").Tags1;
235
+ removeTags: import("@comapeo/schema/dist/schema/preset.js").Tags2;
236
+ fieldRefs: {
237
+ docId: string;
238
+ versionId: string;
239
+ }[];
240
+ iconRef?: {
241
+ docId: string;
242
+ versionId: string;
243
+ } | undefined;
244
+ terms: string[];
245
+ color?: string | undefined;
246
+ docId: string;
247
+ versionId: string;
248
+ originalVersionId: string;
249
+ createdAt: string;
250
+ updatedAt: string;
251
+ links: string[];
252
+ deleted: boolean;
253
+ } & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields) | ({
254
+ schemaName: "field";
255
+ tagKey: string;
256
+ type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
257
+ label: string;
258
+ appearance?: ("appearance_unspecified" | "singleline" | "multiline" | "UNRECOGNIZED") | undefined;
259
+ snakeCase?: boolean | undefined;
260
+ options?: {
261
+ label: string;
262
+ value: string | boolean | number | null;
263
+ }[] | undefined;
264
+ universal?: boolean | undefined;
265
+ placeholder?: string | undefined;
266
+ helperText?: string | undefined;
267
+ docId: string;
268
+ versionId: string;
269
+ originalVersionId: string;
270
+ createdAt: string;
271
+ updatedAt: string;
272
+ links: string[];
273
+ deleted: boolean;
274
+ } & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields) | ({
275
+ schemaName: "remoteDetectionAlert";
276
+ detectionDateStart: string;
277
+ detectionDateEnd: string;
278
+ sourceId: string;
279
+ metadata: {
280
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
281
+ };
282
+ geometry: import("@comapeo/schema/dist/schema/remoteDetectionAlert.js").Geometry;
283
+ docId: string;
284
+ versionId: string;
285
+ originalVersionId: string;
286
+ createdAt: string;
287
+ updatedAt: string;
288
+ links: string[];
289
+ deleted: boolean;
290
+ } & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields), {
291
+ schemaName: D;
292
+ }>;
293
+ error: Error | null;
294
+ isRefetching: boolean;
295
+ };
70
296
  /**
71
297
  * Retrieve all documents of a specific `docType`.
72
298
  *
@@ -106,9 +332,125 @@ export declare function useManyDocs<D extends WriteableDocumentType>({ projectId
106
332
  docType: D;
107
333
  includeDeleted?: boolean;
108
334
  lang?: string;
109
- }): ReadHookResult<Array<Extract<MapeoDoc, {
110
- schemaName: D;
111
- }>>>;
335
+ }): {
336
+ data: Extract<({
337
+ schemaName: "track";
338
+ locations: import("@comapeo/schema/dist/schema/track.js").Position[];
339
+ observationRefs: {
340
+ docId: string;
341
+ versionId: string;
342
+ }[];
343
+ tags: {
344
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
345
+ };
346
+ presetRef?: {
347
+ docId: string;
348
+ versionId: string;
349
+ } | undefined;
350
+ docId: string;
351
+ versionId: string;
352
+ originalVersionId: string;
353
+ createdAt: string;
354
+ updatedAt: string;
355
+ links: string[];
356
+ deleted: boolean;
357
+ } & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields)[] | ({
358
+ schemaName: "observation";
359
+ lat?: number | undefined;
360
+ lon?: number | undefined;
361
+ attachments: import("@comapeo/schema/dist/schema/observation.js").Attachment[];
362
+ tags: {
363
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
364
+ };
365
+ metadata?: {
366
+ manualLocation?: boolean;
367
+ position?: import("@comapeo/schema/dist/schema/observation.js").Position;
368
+ lastSavedPosition?: import("@comapeo/schema/dist/schema/observation.js").Position;
369
+ positionProvider?: {
370
+ gpsAvailable?: boolean;
371
+ passiveAvailable?: boolean;
372
+ locationServicesEnabled: boolean;
373
+ networkAvailable?: boolean;
374
+ };
375
+ } | undefined;
376
+ presetRef?: {
377
+ docId: string;
378
+ versionId: string;
379
+ } | undefined;
380
+ docId: string;
381
+ versionId: string;
382
+ originalVersionId: string;
383
+ createdAt: string;
384
+ updatedAt: string;
385
+ links: string[];
386
+ deleted: boolean;
387
+ } & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields)[] | ({
388
+ schemaName: "preset";
389
+ name: string;
390
+ geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
391
+ tags: import("@comapeo/schema/dist/schema/preset.js").Tags;
392
+ addTags: import("@comapeo/schema/dist/schema/preset.js").Tags1;
393
+ removeTags: import("@comapeo/schema/dist/schema/preset.js").Tags2;
394
+ fieldRefs: {
395
+ docId: string;
396
+ versionId: string;
397
+ }[];
398
+ iconRef?: {
399
+ docId: string;
400
+ versionId: string;
401
+ } | undefined;
402
+ terms: string[];
403
+ color?: string | undefined;
404
+ docId: string;
405
+ versionId: string;
406
+ originalVersionId: string;
407
+ createdAt: string;
408
+ updatedAt: string;
409
+ links: string[];
410
+ deleted: boolean;
411
+ } & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields)[] | ({
412
+ schemaName: "field";
413
+ tagKey: string;
414
+ type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
415
+ label: string;
416
+ appearance?: ("appearance_unspecified" | "singleline" | "multiline" | "UNRECOGNIZED") | undefined;
417
+ snakeCase?: boolean | undefined;
418
+ options?: {
419
+ label: string;
420
+ value: string | boolean | number | null;
421
+ }[] | undefined;
422
+ universal?: boolean | undefined;
423
+ placeholder?: string | undefined;
424
+ helperText?: string | undefined;
425
+ docId: string;
426
+ versionId: string;
427
+ originalVersionId: string;
428
+ createdAt: string;
429
+ updatedAt: string;
430
+ links: string[];
431
+ deleted: boolean;
432
+ } & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields)[] | ({
433
+ schemaName: "remoteDetectionAlert";
434
+ detectionDateStart: string;
435
+ detectionDateEnd: string;
436
+ sourceId: string;
437
+ metadata: {
438
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
439
+ };
440
+ geometry: import("@comapeo/schema/dist/schema/remoteDetectionAlert.js").Geometry;
441
+ docId: string;
442
+ versionId: string;
443
+ originalVersionId: string;
444
+ createdAt: string;
445
+ updatedAt: string;
446
+ links: string[];
447
+ deleted: boolean;
448
+ } & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields)[], Array<{
449
+ schemaName: D;
450
+ }>>;
451
+ error: Error | null;
452
+ isRefetching: boolean;
453
+ };
112
454
  /**
113
455
  * Create a document for a project.
114
456
  *
@@ -120,28 +462,20 @@ export declare function useCreateDocument<D extends WriteableDocumentType>({ doc
120
462
  projectId: string;
121
463
  }): {
122
464
  error: Error;
123
- mutate: import("@tanstack/react-query").UseMutateFunction<import("../lib/types.js").WriteableDocument<D> & {
124
- forks: Array<string>;
125
- }, Error, {
465
+ mutate: import("@tanstack/react-query").UseMutateFunction<import("../lib/types.js").WriteableDocument<D> & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields, Error, {
126
466
  value: Omit<import("../lib/types.js").WriteableValue<D>, "schemaName">;
127
467
  }, unknown>;
128
- mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("../lib/types.js").WriteableDocument<D> & {
129
- forks: Array<string>;
130
- }, Error, {
468
+ mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("../lib/types.js").WriteableDocument<D> & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields, Error, {
131
469
  value: Omit<import("../lib/types.js").WriteableValue<D>, "schemaName">;
132
470
  }, unknown>;
133
471
  reset: () => void;
134
472
  status: "error";
135
473
  } | {
136
474
  error: null;
137
- mutate: import("@tanstack/react-query").UseMutateFunction<import("../lib/types.js").WriteableDocument<D> & {
138
- forks: Array<string>;
139
- }, Error, {
475
+ mutate: import("@tanstack/react-query").UseMutateFunction<import("../lib/types.js").WriteableDocument<D> & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields, Error, {
140
476
  value: Omit<import("../lib/types.js").WriteableValue<D>, "schemaName">;
141
477
  }, unknown>;
142
- mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("../lib/types.js").WriteableDocument<D> & {
143
- forks: Array<string>;
144
- }, Error, {
478
+ mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("../lib/types.js").WriteableDocument<D> & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields, Error, {
145
479
  value: Omit<import("../lib/types.js").WriteableValue<D>, "schemaName">;
146
480
  }, unknown>;
147
481
  reset: () => void;
@@ -158,15 +492,11 @@ export declare function useUpdateDocument<D extends WriteableDocumentType>({ doc
158
492
  projectId: string;
159
493
  }): {
160
494
  error: Error;
161
- mutate: import("@tanstack/react-query").UseMutateFunction<import("../lib/types.js").WriteableDocument<D> & {
162
- forks: Array<string>;
163
- }, Error, {
495
+ mutate: import("@tanstack/react-query").UseMutateFunction<import("../lib/types.js").WriteableDocument<D> & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields, Error, {
164
496
  versionId: string;
165
497
  value: Omit<import("../lib/types.js").WriteableValue<D>, "schemaName">;
166
498
  }, unknown>;
167
- mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("../lib/types.js").WriteableDocument<D> & {
168
- forks: Array<string>;
169
- }, Error, {
499
+ mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("../lib/types.js").WriteableDocument<D> & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields, Error, {
170
500
  versionId: string;
171
501
  value: Omit<import("../lib/types.js").WriteableValue<D>, "schemaName">;
172
502
  }, unknown>;
@@ -174,15 +504,11 @@ export declare function useUpdateDocument<D extends WriteableDocumentType>({ doc
174
504
  status: "error";
175
505
  } | {
176
506
  error: null;
177
- mutate: import("@tanstack/react-query").UseMutateFunction<import("../lib/types.js").WriteableDocument<D> & {
178
- forks: Array<string>;
179
- }, Error, {
507
+ mutate: import("@tanstack/react-query").UseMutateFunction<import("../lib/types.js").WriteableDocument<D> & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields, Error, {
180
508
  versionId: string;
181
509
  value: Omit<import("../lib/types.js").WriteableValue<D>, "schemaName">;
182
510
  }, unknown>;
183
- mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("../lib/types.js").WriteableDocument<D> & {
184
- forks: Array<string>;
185
- }, Error, {
511
+ mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("../lib/types.js").WriteableDocument<D> & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields, Error, {
186
512
  versionId: string;
187
513
  value: Omit<import("../lib/types.js").WriteableValue<D>, "schemaName">;
188
514
  }, unknown>;
@@ -200,31 +526,22 @@ export declare function useDeleteDocument<D extends WriteableDocumentType>({ doc
200
526
  projectId: string;
201
527
  }): {
202
528
  error: Error;
203
- mutate: import("@tanstack/react-query").UseMutateFunction<import("../lib/types.js").WriteableDocument<D> & {
204
- forks: Array<string>;
205
- }, Error, {
529
+ mutate: import("@tanstack/react-query").UseMutateFunction<import("../lib/types.js").WriteableDocument<D> & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields, Error, {
206
530
  docId: string;
207
531
  }, unknown>;
208
- mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("../lib/types.js").WriteableDocument<D> & {
209
- forks: Array<string>;
210
- }, Error, {
532
+ mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("../lib/types.js").WriteableDocument<D> & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields, Error, {
211
533
  docId: string;
212
534
  }, unknown>;
213
535
  reset: () => void;
214
536
  status: "error";
215
537
  } | {
216
538
  error: null;
217
- mutate: import("@tanstack/react-query").UseMutateFunction<import("../lib/types.js").WriteableDocument<D> & {
218
- forks: Array<string>;
219
- }, Error, {
539
+ mutate: import("@tanstack/react-query").UseMutateFunction<import("../lib/types.js").WriteableDocument<D> & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields, Error, {
220
540
  docId: string;
221
541
  }, unknown>;
222
- mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("../lib/types.js").WriteableDocument<D> & {
223
- forks: Array<string>;
224
- }, Error, {
542
+ mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("../lib/types.js").WriteableDocument<D> & import("@comapeo/core/dist/datatype/index.js", { with: { "resolution-mode": "import" } }).DerivedDocFields, Error, {
225
543
  docId: string;
226
544
  }, unknown>;
227
545
  reset: () => void;
228
546
  status: "pending" | "success" | "idle";
229
547
  };
230
- export {};
@@ -42,10 +42,7 @@ function useSingleDocByDocId({ projectId, docType, docId, lang, }) {
42
42
  lang,
43
43
  }));
44
44
  return {
45
- // @ts-expect-error - TS does not handle dependent types, so this will not
46
- // be narrowed properly within the function body. See for example
47
- // https://github.com/microsoft/TypeScript/issues/33014#event-15134418011
48
- data,
45
+ data: data,
49
46
  error,
50
47
  isRefetching,
51
48
  };
@@ -83,8 +80,7 @@ function useSingleDocByVersionId({ projectId, docType, versionId, lang, }) {
83
80
  lang,
84
81
  }));
85
82
  return {
86
- // @ts-expect-error - TS does not handle dependent types, see above
87
- data,
83
+ data: data,
88
84
  error,
89
85
  isRefetching,
90
86
  };
@@ -133,8 +129,7 @@ function useManyDocs({ projectId, docType, includeDeleted, lang, }) {
133
129
  lang,
134
130
  }));
135
131
  return {
136
- // @ts-expect-error - TS does not handle dependent types, see above
137
- data,
132
+ data: data,
138
133
  error,
139
134
  isRefetching,
140
135
  };
@@ -395,14 +395,14 @@ export declare function useUpdateProjectSettings({ projectId }: {
395
395
  projectId: string;
396
396
  }): {
397
397
  error: Error;
398
- mutate: import("@tanstack/react-query").UseMutateFunction<import("@comapeo/core/dist/mapeo-project.js", { with: { "resolution-mode": "import" } }).EditableProjectSettings, Error, import("@comapeo/core/dist/mapeo-project.js", { with: { "resolution-mode": "import" } }).EditableProjectSettings, unknown>;
399
- mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("@comapeo/core/dist/mapeo-project.js", { with: { "resolution-mode": "import" } }).EditableProjectSettings, Error, import("@comapeo/core/dist/mapeo-project.js", { with: { "resolution-mode": "import" } }).EditableProjectSettings, unknown>;
398
+ mutate: import("@tanstack/react-query").UseMutateFunction<import("@comapeo/core/dist/mapeo-project.js", { with: { "resolution-mode": "import" } }).EditableProjectSettings, Error, Partial<import("@comapeo/core/dist/mapeo-project.js", { with: { "resolution-mode": "import" } }).EditableProjectSettings>, unknown>;
399
+ mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("@comapeo/core/dist/mapeo-project.js", { with: { "resolution-mode": "import" } }).EditableProjectSettings, Error, Partial<import("@comapeo/core/dist/mapeo-project.js", { with: { "resolution-mode": "import" } }).EditableProjectSettings>, unknown>;
400
400
  reset: () => void;
401
401
  status: "error";
402
402
  } | {
403
403
  error: null;
404
- mutate: import("@tanstack/react-query").UseMutateFunction<import("@comapeo/core/dist/mapeo-project.js", { with: { "resolution-mode": "import" } }).EditableProjectSettings, Error, import("@comapeo/core/dist/mapeo-project.js", { with: { "resolution-mode": "import" } }).EditableProjectSettings, unknown>;
405
- mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("@comapeo/core/dist/mapeo-project.js", { with: { "resolution-mode": "import" } }).EditableProjectSettings, Error, import("@comapeo/core/dist/mapeo-project.js", { with: { "resolution-mode": "import" } }).EditableProjectSettings, unknown>;
404
+ mutate: import("@tanstack/react-query").UseMutateFunction<import("@comapeo/core/dist/mapeo-project.js", { with: { "resolution-mode": "import" } }).EditableProjectSettings, Error, Partial<import("@comapeo/core/dist/mapeo-project.js", { with: { "resolution-mode": "import" } }).EditableProjectSettings>, unknown>;
405
+ mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("@comapeo/core/dist/mapeo-project.js", { with: { "resolution-mode": "import" } }).EditableProjectSettings, Error, Partial<import("@comapeo/core/dist/mapeo-project.js", { with: { "resolution-mode": "import" } }).EditableProjectSettings>, unknown>;
406
406
  reset: () => void;
407
407
  status: "pending" | "success" | "idle";
408
408
  };