@comapeo/core-react 1.0.1 → 2.0.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.
Files changed (64) hide show
  1. package/dist/commonjs/contexts/ClientApi.d.ts +14 -0
  2. package/dist/commonjs/contexts/ClientApi.js +16 -0
  3. package/dist/commonjs/hooks/client.d.ts +80 -0
  4. package/dist/commonjs/hooks/client.js +91 -0
  5. package/dist/{hooks → commonjs/hooks}/documents.d.ts +60 -5
  6. package/dist/commonjs/hooks/documents.js +192 -0
  7. package/dist/commonjs/hooks/invites.d.ts +51 -0
  8. package/dist/commonjs/hooks/invites.js +50 -0
  9. package/dist/commonjs/hooks/maps.js +37 -0
  10. package/dist/commonjs/hooks/projects.d.ts +334 -0
  11. package/dist/commonjs/hooks/projects.js +320 -0
  12. package/dist/commonjs/index.d.ts +12 -0
  13. package/dist/commonjs/index.js +69 -0
  14. package/dist/commonjs/lib/react-query/client.d.ts +61 -0
  15. package/dist/commonjs/lib/react-query/client.js +68 -0
  16. package/dist/{lib → commonjs/lib}/react-query/documents.d.ts +789 -706
  17. package/dist/commonjs/lib/react-query/documents.js +149 -0
  18. package/dist/commonjs/lib/react-query/invites.d.ts +71 -0
  19. package/dist/commonjs/lib/react-query/invites.js +85 -0
  20. package/dist/commonjs/lib/react-query/maps.d.ts +24 -0
  21. package/dist/commonjs/lib/react-query/maps.js +27 -0
  22. package/dist/commonjs/lib/react-query/projects.d.ts +332 -0
  23. package/dist/commonjs/lib/react-query/projects.js +235 -0
  24. package/dist/{lib → commonjs/lib}/react-query/shared.d.ts +5 -1
  25. package/dist/commonjs/lib/react-query/shared.js +23 -0
  26. package/dist/commonjs/package.json +3 -0
  27. package/dist/{contexts → esm/contexts}/ClientApi.d.ts +3 -3
  28. package/dist/{hooks → esm/hooks}/client.d.ts +23 -2
  29. package/dist/{hooks → esm/hooks}/client.js +21 -3
  30. package/dist/esm/hooks/documents.d.ts +167 -0
  31. package/dist/{hooks → esm/hooks}/documents.js +54 -3
  32. package/dist/esm/hooks/invites.d.ts +51 -0
  33. package/dist/esm/hooks/invites.js +44 -0
  34. package/dist/esm/hooks/maps.d.ts +33 -0
  35. package/dist/{hooks → esm/hooks}/maps.js +2 -2
  36. package/dist/{hooks → esm/hooks}/projects.d.ts +89 -6
  37. package/dist/{hooks → esm/hooks}/projects.js +59 -3
  38. package/dist/esm/index.d.ts +12 -0
  39. package/dist/esm/index.js +12 -0
  40. package/dist/esm/lib/react-query/client.d.ts +61 -0
  41. package/dist/esm/lib/react-query/client.js +59 -0
  42. package/dist/esm/lib/react-query/documents.d.ts +1584 -0
  43. package/dist/{lib → esm/lib}/react-query/documents.js +56 -2
  44. package/dist/esm/lib/react-query/invites.d.ts +71 -0
  45. package/dist/esm/lib/react-query/invites.js +76 -0
  46. package/dist/esm/lib/react-query/maps.d.ts +24 -0
  47. package/dist/{lib → esm/lib}/react-query/maps.js +6 -2
  48. package/dist/esm/lib/react-query/projects.d.ts +332 -0
  49. package/dist/{lib → esm/lib}/react-query/projects.js +84 -2
  50. package/dist/esm/lib/react-query/shared.d.ts +9 -0
  51. package/dist/{lib → esm/lib}/react-query/shared.js +7 -1
  52. package/dist/esm/package.json +3 -0
  53. package/docs/API.md +157 -258
  54. package/package.json +51 -37
  55. package/dist/index.d.ts +0 -11
  56. package/dist/index.js +0 -11
  57. package/dist/lib/react-query/client.d.ts +0 -30
  58. package/dist/lib/react-query/client.js +0 -29
  59. package/dist/lib/react-query/invites.d.ts +0 -12
  60. package/dist/lib/react-query/invites.js +0 -17
  61. package/dist/lib/react-query/maps.d.ts +0 -15
  62. package/dist/lib/react-query/projects.d.ts +0 -196
  63. /package/dist/{hooks → commonjs/hooks}/maps.d.ts +0 -0
  64. /package/dist/{contexts → esm/contexts}/ClientApi.js +0 -0
@@ -0,0 +1,1584 @@
1
+ import type { MapeoProjectApi } from '@comapeo/ipc' with { 'resolution-mode': 'import' };
2
+ import type { MapeoDoc, MapeoValue } from '@comapeo/schema' with { 'resolution-mode': 'import' };
3
+ import { type QueryClient } from '@tanstack/react-query';
4
+ export type WriteableDocumentType = Extract<MapeoDoc['schemaName'], 'field' | 'observation' | 'preset' | 'track' | 'remoteDetectionAlert'>;
5
+ export type WriteableValue<D extends WriteableDocumentType> = Extract<MapeoValue, {
6
+ schemaName: D;
7
+ }>;
8
+ export type WriteableDocument<D extends WriteableDocumentType> = Extract<MapeoDoc, {
9
+ schemaName: D;
10
+ }>;
11
+ export declare function getDocumentsQueryKey<D extends WriteableDocumentType>({ projectId, docType, }: {
12
+ projectId: string;
13
+ docType: D;
14
+ }): readonly ["@comapeo/core-react", "projects", string, D];
15
+ export declare function getManyDocumentsQueryKey<D extends WriteableDocumentType>({ projectId, docType, includeDeleted, lang, }: {
16
+ projectId: string;
17
+ docType: D;
18
+ includeDeleted?: boolean;
19
+ lang?: string;
20
+ }): readonly ["@comapeo/core-react", "projects", string, D, {
21
+ readonly includeDeleted: boolean | undefined;
22
+ readonly lang: string | undefined;
23
+ }];
24
+ export declare function getDocumentByDocIdQueryKey<D extends WriteableDocumentType>({ projectId, docType, docId, lang, }: {
25
+ projectId: string;
26
+ docType: D;
27
+ docId: string;
28
+ lang?: string;
29
+ }): readonly ["@comapeo/core-react", "projects", string, D, string, {
30
+ readonly lang: string | undefined;
31
+ }];
32
+ export declare function getDocumentByVersionIdQueryKey<D extends WriteableDocumentType>({ projectId, docType, versionId, lang, }: {
33
+ projectId: string;
34
+ docType: D;
35
+ versionId: string;
36
+ lang?: string;
37
+ }): readonly ["@comapeo/core-react", "projects", string, D, string, {
38
+ readonly lang: string | undefined;
39
+ }];
40
+ export declare function documentsQueryOptions<D extends WriteableDocumentType>({ projectApi, projectId, docType, includeDeleted, lang, }: {
41
+ projectApi: MapeoProjectApi;
42
+ projectId: string;
43
+ docType: D;
44
+ includeDeleted?: boolean;
45
+ lang?: string;
46
+ }): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<({
47
+ schemaName: "track";
48
+ locations: import("@comapeo/schema/dist/schema/track.js").Position[];
49
+ observationRefs: {
50
+ docId: string;
51
+ versionId: string;
52
+ }[];
53
+ tags: {
54
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
55
+ };
56
+ docId: string;
57
+ versionId: string;
58
+ originalVersionId: string;
59
+ createdAt: string;
60
+ updatedAt: string;
61
+ links: string[];
62
+ deleted: boolean;
63
+ } & {
64
+ forks: string[];
65
+ })[] | ({
66
+ schemaName: "observation";
67
+ lat?: number | undefined;
68
+ lon?: number | undefined;
69
+ attachments: {
70
+ driveDiscoveryId: string;
71
+ name: string;
72
+ type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
73
+ hash: string;
74
+ }[];
75
+ tags: {
76
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
77
+ };
78
+ metadata?: {
79
+ manualLocation?: boolean;
80
+ position?: import("@comapeo/schema/dist/schema/observation.js").Position;
81
+ lastSavedPosition?: import("@comapeo/schema/dist/schema/observation.js").Position;
82
+ positionProvider?: {
83
+ gpsAvailable?: boolean;
84
+ passiveAvailable?: boolean;
85
+ locationServicesEnabled: boolean;
86
+ networkAvailable?: boolean;
87
+ };
88
+ } | undefined;
89
+ presetRef?: {
90
+ docId: string;
91
+ versionId: string;
92
+ } | undefined;
93
+ docId: string;
94
+ versionId: string;
95
+ originalVersionId: string;
96
+ createdAt: string;
97
+ updatedAt: string;
98
+ links: string[];
99
+ deleted: boolean;
100
+ } & {
101
+ forks: string[];
102
+ })[] | ({
103
+ schemaName: "preset";
104
+ name: string;
105
+ geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
106
+ tags: import("@comapeo/schema/dist/schema/preset.js").Tags;
107
+ addTags: import("@comapeo/schema/dist/schema/preset.js").Tags1;
108
+ removeTags: import("@comapeo/schema/dist/schema/preset.js").Tags2;
109
+ fieldRefs: {
110
+ docId: string;
111
+ versionId: string;
112
+ }[];
113
+ iconRef?: {
114
+ docId: string;
115
+ versionId: string;
116
+ } | undefined;
117
+ terms: string[];
118
+ color?: string | undefined;
119
+ docId: string;
120
+ versionId: string;
121
+ originalVersionId: string;
122
+ createdAt: string;
123
+ updatedAt: string;
124
+ links: string[];
125
+ deleted: boolean;
126
+ } & {
127
+ forks: string[];
128
+ })[] | ({
129
+ schemaName: "field";
130
+ tagKey: string;
131
+ type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
132
+ label: string;
133
+ appearance?: ("appearance_unspecified" | "singleline" | "multiline" | "UNRECOGNIZED") | undefined;
134
+ snakeCase?: boolean | undefined;
135
+ options?: {
136
+ label: string;
137
+ value: string | boolean | number | null;
138
+ }[] | undefined;
139
+ universal?: boolean | undefined;
140
+ placeholder?: string | undefined;
141
+ helperText?: string | undefined;
142
+ docId: string;
143
+ versionId: string;
144
+ originalVersionId: string;
145
+ createdAt: string;
146
+ updatedAt: string;
147
+ links: string[];
148
+ deleted: boolean;
149
+ } & {
150
+ forks: string[];
151
+ })[] | ({
152
+ schemaName: "remoteDetectionAlert";
153
+ detectionDateStart: string;
154
+ detectionDateEnd: string;
155
+ sourceId: string;
156
+ metadata: {
157
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
158
+ };
159
+ geometry: import("@comapeo/schema/dist/schema/remoteDetectionAlert.js").Geometry;
160
+ docId: string;
161
+ versionId: string;
162
+ originalVersionId: string;
163
+ createdAt: string;
164
+ updatedAt: string;
165
+ links: string[];
166
+ deleted: boolean;
167
+ } & {
168
+ forks: string[];
169
+ })[], Error, ({
170
+ schemaName: "track";
171
+ locations: import("@comapeo/schema/dist/schema/track.js").Position[];
172
+ observationRefs: {
173
+ docId: string;
174
+ versionId: string;
175
+ }[];
176
+ tags: {
177
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
178
+ };
179
+ docId: string;
180
+ versionId: string;
181
+ originalVersionId: string;
182
+ createdAt: string;
183
+ updatedAt: string;
184
+ links: string[];
185
+ deleted: boolean;
186
+ } & {
187
+ forks: string[];
188
+ })[] | ({
189
+ schemaName: "observation";
190
+ lat?: number | undefined;
191
+ lon?: number | undefined;
192
+ attachments: {
193
+ driveDiscoveryId: string;
194
+ name: string;
195
+ type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
196
+ hash: string;
197
+ }[];
198
+ tags: {
199
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
200
+ };
201
+ metadata?: {
202
+ manualLocation?: boolean;
203
+ position?: import("@comapeo/schema/dist/schema/observation.js").Position;
204
+ lastSavedPosition?: import("@comapeo/schema/dist/schema/observation.js").Position;
205
+ positionProvider?: {
206
+ gpsAvailable?: boolean;
207
+ passiveAvailable?: boolean;
208
+ locationServicesEnabled: boolean;
209
+ networkAvailable?: boolean;
210
+ };
211
+ } | undefined;
212
+ presetRef?: {
213
+ docId: string;
214
+ versionId: string;
215
+ } | undefined;
216
+ docId: string;
217
+ versionId: string;
218
+ originalVersionId: string;
219
+ createdAt: string;
220
+ updatedAt: string;
221
+ links: string[];
222
+ deleted: boolean;
223
+ } & {
224
+ forks: string[];
225
+ })[] | ({
226
+ schemaName: "preset";
227
+ name: string;
228
+ geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
229
+ tags: import("@comapeo/schema/dist/schema/preset.js").Tags;
230
+ addTags: import("@comapeo/schema/dist/schema/preset.js").Tags1;
231
+ removeTags: import("@comapeo/schema/dist/schema/preset.js").Tags2;
232
+ fieldRefs: {
233
+ docId: string;
234
+ versionId: string;
235
+ }[];
236
+ iconRef?: {
237
+ docId: string;
238
+ versionId: string;
239
+ } | undefined;
240
+ terms: string[];
241
+ color?: string | undefined;
242
+ docId: string;
243
+ versionId: string;
244
+ originalVersionId: string;
245
+ createdAt: string;
246
+ updatedAt: string;
247
+ links: string[];
248
+ deleted: boolean;
249
+ } & {
250
+ forks: string[];
251
+ })[] | ({
252
+ schemaName: "field";
253
+ tagKey: string;
254
+ type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
255
+ label: string;
256
+ appearance?: ("appearance_unspecified" | "singleline" | "multiline" | "UNRECOGNIZED") | undefined;
257
+ snakeCase?: boolean | undefined;
258
+ options?: {
259
+ label: string;
260
+ value: string | boolean | number | null;
261
+ }[] | undefined;
262
+ universal?: boolean | undefined;
263
+ placeholder?: string | undefined;
264
+ helperText?: string | undefined;
265
+ docId: string;
266
+ versionId: string;
267
+ originalVersionId: string;
268
+ createdAt: string;
269
+ updatedAt: string;
270
+ links: string[];
271
+ deleted: boolean;
272
+ } & {
273
+ forks: string[];
274
+ })[] | ({
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
+ } & {
291
+ forks: string[];
292
+ })[], readonly ["@comapeo/core-react", "projects", string, D, {
293
+ readonly includeDeleted: boolean | undefined;
294
+ readonly lang: string | undefined;
295
+ }]>, "queryFn"> & {
296
+ queryFn?: import("@tanstack/react-query").QueryFunction<({
297
+ schemaName: "track";
298
+ locations: import("@comapeo/schema/dist/schema/track.js").Position[];
299
+ observationRefs: {
300
+ docId: string;
301
+ versionId: string;
302
+ }[];
303
+ tags: {
304
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
305
+ };
306
+ docId: string;
307
+ versionId: string;
308
+ originalVersionId: string;
309
+ createdAt: string;
310
+ updatedAt: string;
311
+ links: string[];
312
+ deleted: boolean;
313
+ } & {
314
+ forks: string[];
315
+ })[] | ({
316
+ schemaName: "observation";
317
+ lat?: number | undefined;
318
+ lon?: number | undefined;
319
+ attachments: {
320
+ driveDiscoveryId: string;
321
+ name: string;
322
+ type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
323
+ hash: string;
324
+ }[];
325
+ tags: {
326
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
327
+ };
328
+ metadata?: {
329
+ manualLocation?: boolean;
330
+ position?: import("@comapeo/schema/dist/schema/observation.js").Position;
331
+ lastSavedPosition?: import("@comapeo/schema/dist/schema/observation.js").Position;
332
+ positionProvider?: {
333
+ gpsAvailable?: boolean;
334
+ passiveAvailable?: boolean;
335
+ locationServicesEnabled: boolean;
336
+ networkAvailable?: boolean;
337
+ };
338
+ } | undefined;
339
+ presetRef?: {
340
+ docId: string;
341
+ versionId: string;
342
+ } | undefined;
343
+ docId: string;
344
+ versionId: string;
345
+ originalVersionId: string;
346
+ createdAt: string;
347
+ updatedAt: string;
348
+ links: string[];
349
+ deleted: boolean;
350
+ } & {
351
+ forks: string[];
352
+ })[] | ({
353
+ schemaName: "preset";
354
+ name: string;
355
+ geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
356
+ tags: import("@comapeo/schema/dist/schema/preset.js").Tags;
357
+ addTags: import("@comapeo/schema/dist/schema/preset.js").Tags1;
358
+ removeTags: import("@comapeo/schema/dist/schema/preset.js").Tags2;
359
+ fieldRefs: {
360
+ docId: string;
361
+ versionId: string;
362
+ }[];
363
+ iconRef?: {
364
+ docId: string;
365
+ versionId: string;
366
+ } | undefined;
367
+ terms: string[];
368
+ color?: string | undefined;
369
+ docId: string;
370
+ versionId: string;
371
+ originalVersionId: string;
372
+ createdAt: string;
373
+ updatedAt: string;
374
+ links: string[];
375
+ deleted: boolean;
376
+ } & {
377
+ forks: string[];
378
+ })[] | ({
379
+ schemaName: "field";
380
+ tagKey: string;
381
+ type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
382
+ label: string;
383
+ appearance?: ("appearance_unspecified" | "singleline" | "multiline" | "UNRECOGNIZED") | undefined;
384
+ snakeCase?: boolean | undefined;
385
+ options?: {
386
+ label: string;
387
+ value: string | boolean | number | null;
388
+ }[] | undefined;
389
+ universal?: boolean | undefined;
390
+ placeholder?: string | undefined;
391
+ helperText?: string | undefined;
392
+ docId: string;
393
+ versionId: string;
394
+ originalVersionId: string;
395
+ createdAt: string;
396
+ updatedAt: string;
397
+ links: string[];
398
+ deleted: boolean;
399
+ } & {
400
+ forks: string[];
401
+ })[] | ({
402
+ schemaName: "remoteDetectionAlert";
403
+ detectionDateStart: string;
404
+ detectionDateEnd: string;
405
+ sourceId: string;
406
+ metadata: {
407
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
408
+ };
409
+ geometry: import("@comapeo/schema/dist/schema/remoteDetectionAlert.js").Geometry;
410
+ docId: string;
411
+ versionId: string;
412
+ originalVersionId: string;
413
+ createdAt: string;
414
+ updatedAt: string;
415
+ links: string[];
416
+ deleted: boolean;
417
+ } & {
418
+ forks: string[];
419
+ })[], readonly ["@comapeo/core-react", "projects", string, D, {
420
+ readonly includeDeleted: boolean | undefined;
421
+ readonly lang: string | undefined;
422
+ }], never> | undefined;
423
+ } & {
424
+ queryKey: readonly ["@comapeo/core-react", "projects", string, D, {
425
+ readonly includeDeleted: boolean | undefined;
426
+ readonly lang: string | undefined;
427
+ }] & {
428
+ [dataTagSymbol]: ({
429
+ schemaName: "track";
430
+ locations: import("@comapeo/schema/dist/schema/track.js").Position[];
431
+ observationRefs: {
432
+ docId: string;
433
+ versionId: string;
434
+ }[];
435
+ tags: {
436
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
437
+ };
438
+ docId: string;
439
+ versionId: string;
440
+ originalVersionId: string;
441
+ createdAt: string;
442
+ updatedAt: string;
443
+ links: string[];
444
+ deleted: boolean;
445
+ } & {
446
+ forks: string[];
447
+ })[] | ({
448
+ schemaName: "observation";
449
+ lat?: number | undefined;
450
+ lon?: number | undefined;
451
+ attachments: {
452
+ driveDiscoveryId: string;
453
+ name: string;
454
+ type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
455
+ hash: string;
456
+ }[];
457
+ tags: {
458
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
459
+ };
460
+ metadata?: {
461
+ manualLocation?: boolean;
462
+ position?: import("@comapeo/schema/dist/schema/observation.js").Position;
463
+ lastSavedPosition?: import("@comapeo/schema/dist/schema/observation.js").Position;
464
+ positionProvider?: {
465
+ gpsAvailable?: boolean;
466
+ passiveAvailable?: boolean;
467
+ locationServicesEnabled: boolean;
468
+ networkAvailable?: boolean;
469
+ };
470
+ } | undefined;
471
+ presetRef?: {
472
+ docId: string;
473
+ versionId: string;
474
+ } | undefined;
475
+ docId: string;
476
+ versionId: string;
477
+ originalVersionId: string;
478
+ createdAt: string;
479
+ updatedAt: string;
480
+ links: string[];
481
+ deleted: boolean;
482
+ } & {
483
+ forks: string[];
484
+ })[] | ({
485
+ schemaName: "preset";
486
+ name: string;
487
+ geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
488
+ tags: import("@comapeo/schema/dist/schema/preset.js").Tags;
489
+ addTags: import("@comapeo/schema/dist/schema/preset.js").Tags1;
490
+ removeTags: import("@comapeo/schema/dist/schema/preset.js").Tags2;
491
+ fieldRefs: {
492
+ docId: string;
493
+ versionId: string;
494
+ }[];
495
+ iconRef?: {
496
+ docId: string;
497
+ versionId: string;
498
+ } | undefined;
499
+ terms: string[];
500
+ color?: string | undefined;
501
+ docId: string;
502
+ versionId: string;
503
+ originalVersionId: string;
504
+ createdAt: string;
505
+ updatedAt: string;
506
+ links: string[];
507
+ deleted: boolean;
508
+ } & {
509
+ forks: string[];
510
+ })[] | ({
511
+ schemaName: "field";
512
+ tagKey: string;
513
+ type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
514
+ label: string;
515
+ appearance?: ("appearance_unspecified" | "singleline" | "multiline" | "UNRECOGNIZED") | undefined;
516
+ snakeCase?: boolean | undefined;
517
+ options?: {
518
+ label: string;
519
+ value: string | boolean | number | null;
520
+ }[] | undefined;
521
+ universal?: boolean | undefined;
522
+ placeholder?: string | undefined;
523
+ helperText?: string | undefined;
524
+ docId: string;
525
+ versionId: string;
526
+ originalVersionId: string;
527
+ createdAt: string;
528
+ updatedAt: string;
529
+ links: string[];
530
+ deleted: boolean;
531
+ } & {
532
+ forks: string[];
533
+ })[] | ({
534
+ schemaName: "remoteDetectionAlert";
535
+ detectionDateStart: string;
536
+ detectionDateEnd: string;
537
+ sourceId: string;
538
+ metadata: {
539
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
540
+ };
541
+ geometry: import("@comapeo/schema/dist/schema/remoteDetectionAlert.js").Geometry;
542
+ docId: string;
543
+ versionId: string;
544
+ originalVersionId: string;
545
+ createdAt: string;
546
+ updatedAt: string;
547
+ links: string[];
548
+ deleted: boolean;
549
+ } & {
550
+ forks: string[];
551
+ })[];
552
+ [dataTagErrorSymbol]: Error;
553
+ };
554
+ };
555
+ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocumentType>({ projectApi, projectId, docType, docId, lang, }: {
556
+ projectApi: MapeoProjectApi;
557
+ projectId: string;
558
+ docType: D;
559
+ docId: string;
560
+ lang?: string;
561
+ }): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<({
562
+ schemaName: "track";
563
+ locations: import("@comapeo/schema/dist/schema/track.js").Position[];
564
+ observationRefs: {
565
+ docId: string;
566
+ versionId: string;
567
+ }[];
568
+ tags: {
569
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
570
+ };
571
+ docId: string;
572
+ versionId: string;
573
+ originalVersionId: string;
574
+ createdAt: string;
575
+ updatedAt: string;
576
+ links: string[];
577
+ deleted: boolean;
578
+ } & {
579
+ forks: string[];
580
+ }) | ({
581
+ schemaName: "observation";
582
+ lat?: number | undefined;
583
+ lon?: number | undefined;
584
+ attachments: {
585
+ driveDiscoveryId: string;
586
+ name: string;
587
+ type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
588
+ hash: string;
589
+ }[];
590
+ tags: {
591
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
592
+ };
593
+ metadata?: {
594
+ manualLocation?: boolean;
595
+ position?: import("@comapeo/schema/dist/schema/observation.js").Position;
596
+ lastSavedPosition?: import("@comapeo/schema/dist/schema/observation.js").Position;
597
+ positionProvider?: {
598
+ gpsAvailable?: boolean;
599
+ passiveAvailable?: boolean;
600
+ locationServicesEnabled: boolean;
601
+ networkAvailable?: boolean;
602
+ };
603
+ } | undefined;
604
+ presetRef?: {
605
+ docId: string;
606
+ versionId: string;
607
+ } | undefined;
608
+ docId: string;
609
+ versionId: string;
610
+ originalVersionId: string;
611
+ createdAt: string;
612
+ updatedAt: string;
613
+ links: string[];
614
+ deleted: boolean;
615
+ } & {
616
+ forks: string[];
617
+ }) | ({
618
+ schemaName: "preset";
619
+ name: string;
620
+ geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
621
+ tags: import("@comapeo/schema/dist/schema/preset.js").Tags;
622
+ addTags: import("@comapeo/schema/dist/schema/preset.js").Tags1;
623
+ removeTags: import("@comapeo/schema/dist/schema/preset.js").Tags2;
624
+ fieldRefs: {
625
+ docId: string;
626
+ versionId: string;
627
+ }[];
628
+ iconRef?: {
629
+ docId: string;
630
+ versionId: string;
631
+ } | undefined;
632
+ terms: string[];
633
+ color?: string | undefined;
634
+ docId: string;
635
+ versionId: string;
636
+ originalVersionId: string;
637
+ createdAt: string;
638
+ updatedAt: string;
639
+ links: string[];
640
+ deleted: boolean;
641
+ } & {
642
+ forks: string[];
643
+ }) | ({
644
+ schemaName: "field";
645
+ tagKey: string;
646
+ type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
647
+ label: string;
648
+ appearance?: ("appearance_unspecified" | "singleline" | "multiline" | "UNRECOGNIZED") | undefined;
649
+ snakeCase?: boolean | undefined;
650
+ options?: {
651
+ label: string;
652
+ value: string | boolean | number | null;
653
+ }[] | undefined;
654
+ universal?: boolean | undefined;
655
+ placeholder?: string | undefined;
656
+ helperText?: string | undefined;
657
+ docId: string;
658
+ versionId: string;
659
+ originalVersionId: string;
660
+ createdAt: string;
661
+ updatedAt: string;
662
+ links: string[];
663
+ deleted: boolean;
664
+ } & {
665
+ forks: string[];
666
+ }) | ({
667
+ schemaName: "remoteDetectionAlert";
668
+ detectionDateStart: string;
669
+ detectionDateEnd: string;
670
+ sourceId: string;
671
+ metadata: {
672
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
673
+ };
674
+ geometry: import("@comapeo/schema/dist/schema/remoteDetectionAlert.js").Geometry;
675
+ docId: string;
676
+ versionId: string;
677
+ originalVersionId: string;
678
+ createdAt: string;
679
+ updatedAt: string;
680
+ links: string[];
681
+ deleted: boolean;
682
+ } & {
683
+ forks: string[];
684
+ }), Error, ({
685
+ schemaName: "track";
686
+ locations: import("@comapeo/schema/dist/schema/track.js").Position[];
687
+ observationRefs: {
688
+ docId: string;
689
+ versionId: string;
690
+ }[];
691
+ tags: {
692
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
693
+ };
694
+ docId: string;
695
+ versionId: string;
696
+ originalVersionId: string;
697
+ createdAt: string;
698
+ updatedAt: string;
699
+ links: string[];
700
+ deleted: boolean;
701
+ } & {
702
+ forks: string[];
703
+ }) | ({
704
+ schemaName: "observation";
705
+ lat?: number | undefined;
706
+ lon?: number | undefined;
707
+ attachments: {
708
+ driveDiscoveryId: string;
709
+ name: string;
710
+ type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
711
+ hash: string;
712
+ }[];
713
+ tags: {
714
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
715
+ };
716
+ metadata?: {
717
+ manualLocation?: boolean;
718
+ position?: import("@comapeo/schema/dist/schema/observation.js").Position;
719
+ lastSavedPosition?: import("@comapeo/schema/dist/schema/observation.js").Position;
720
+ positionProvider?: {
721
+ gpsAvailable?: boolean;
722
+ passiveAvailable?: boolean;
723
+ locationServicesEnabled: boolean;
724
+ networkAvailable?: boolean;
725
+ };
726
+ } | undefined;
727
+ presetRef?: {
728
+ docId: string;
729
+ versionId: string;
730
+ } | undefined;
731
+ docId: string;
732
+ versionId: string;
733
+ originalVersionId: string;
734
+ createdAt: string;
735
+ updatedAt: string;
736
+ links: string[];
737
+ deleted: boolean;
738
+ } & {
739
+ forks: string[];
740
+ }) | ({
741
+ schemaName: "preset";
742
+ name: string;
743
+ geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
744
+ tags: import("@comapeo/schema/dist/schema/preset.js").Tags;
745
+ addTags: import("@comapeo/schema/dist/schema/preset.js").Tags1;
746
+ removeTags: import("@comapeo/schema/dist/schema/preset.js").Tags2;
747
+ fieldRefs: {
748
+ docId: string;
749
+ versionId: string;
750
+ }[];
751
+ iconRef?: {
752
+ docId: string;
753
+ versionId: string;
754
+ } | undefined;
755
+ terms: string[];
756
+ color?: string | undefined;
757
+ docId: string;
758
+ versionId: string;
759
+ originalVersionId: string;
760
+ createdAt: string;
761
+ updatedAt: string;
762
+ links: string[];
763
+ deleted: boolean;
764
+ } & {
765
+ forks: string[];
766
+ }) | ({
767
+ schemaName: "field";
768
+ tagKey: string;
769
+ type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
770
+ label: string;
771
+ appearance?: ("appearance_unspecified" | "singleline" | "multiline" | "UNRECOGNIZED") | undefined;
772
+ snakeCase?: boolean | undefined;
773
+ options?: {
774
+ label: string;
775
+ value: string | boolean | number | null;
776
+ }[] | undefined;
777
+ universal?: boolean | undefined;
778
+ placeholder?: string | undefined;
779
+ helperText?: string | undefined;
780
+ docId: string;
781
+ versionId: string;
782
+ originalVersionId: string;
783
+ createdAt: string;
784
+ updatedAt: string;
785
+ links: string[];
786
+ deleted: boolean;
787
+ } & {
788
+ forks: string[];
789
+ }) | ({
790
+ schemaName: "remoteDetectionAlert";
791
+ detectionDateStart: string;
792
+ detectionDateEnd: string;
793
+ sourceId: string;
794
+ metadata: {
795
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
796
+ };
797
+ geometry: import("@comapeo/schema/dist/schema/remoteDetectionAlert.js").Geometry;
798
+ docId: string;
799
+ versionId: string;
800
+ originalVersionId: string;
801
+ createdAt: string;
802
+ updatedAt: string;
803
+ links: string[];
804
+ deleted: boolean;
805
+ } & {
806
+ forks: string[];
807
+ }), readonly ["@comapeo/core-react", "projects", string, D, string, {
808
+ readonly lang: string | undefined;
809
+ }]>, "queryFn"> & {
810
+ queryFn?: import("@tanstack/react-query").QueryFunction<({
811
+ schemaName: "track";
812
+ locations: import("@comapeo/schema/dist/schema/track.js").Position[];
813
+ observationRefs: {
814
+ docId: string;
815
+ versionId: string;
816
+ }[];
817
+ tags: {
818
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
819
+ };
820
+ docId: string;
821
+ versionId: string;
822
+ originalVersionId: string;
823
+ createdAt: string;
824
+ updatedAt: string;
825
+ links: string[];
826
+ deleted: boolean;
827
+ } & {
828
+ forks: string[];
829
+ }) | ({
830
+ schemaName: "observation";
831
+ lat?: number | undefined;
832
+ lon?: number | undefined;
833
+ attachments: {
834
+ driveDiscoveryId: string;
835
+ name: string;
836
+ type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
837
+ hash: string;
838
+ }[];
839
+ tags: {
840
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
841
+ };
842
+ metadata?: {
843
+ manualLocation?: boolean;
844
+ position?: import("@comapeo/schema/dist/schema/observation.js").Position;
845
+ lastSavedPosition?: import("@comapeo/schema/dist/schema/observation.js").Position;
846
+ positionProvider?: {
847
+ gpsAvailable?: boolean;
848
+ passiveAvailable?: boolean;
849
+ locationServicesEnabled: boolean;
850
+ networkAvailable?: boolean;
851
+ };
852
+ } | undefined;
853
+ presetRef?: {
854
+ docId: string;
855
+ versionId: string;
856
+ } | undefined;
857
+ docId: string;
858
+ versionId: string;
859
+ originalVersionId: string;
860
+ createdAt: string;
861
+ updatedAt: string;
862
+ links: string[];
863
+ deleted: boolean;
864
+ } & {
865
+ forks: string[];
866
+ }) | ({
867
+ schemaName: "preset";
868
+ name: string;
869
+ geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
870
+ tags: import("@comapeo/schema/dist/schema/preset.js").Tags;
871
+ addTags: import("@comapeo/schema/dist/schema/preset.js").Tags1;
872
+ removeTags: import("@comapeo/schema/dist/schema/preset.js").Tags2;
873
+ fieldRefs: {
874
+ docId: string;
875
+ versionId: string;
876
+ }[];
877
+ iconRef?: {
878
+ docId: string;
879
+ versionId: string;
880
+ } | undefined;
881
+ terms: string[];
882
+ color?: string | undefined;
883
+ docId: string;
884
+ versionId: string;
885
+ originalVersionId: string;
886
+ createdAt: string;
887
+ updatedAt: string;
888
+ links: string[];
889
+ deleted: boolean;
890
+ } & {
891
+ forks: string[];
892
+ }) | ({
893
+ schemaName: "field";
894
+ tagKey: string;
895
+ type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
896
+ label: string;
897
+ appearance?: ("appearance_unspecified" | "singleline" | "multiline" | "UNRECOGNIZED") | undefined;
898
+ snakeCase?: boolean | undefined;
899
+ options?: {
900
+ label: string;
901
+ value: string | boolean | number | null;
902
+ }[] | undefined;
903
+ universal?: boolean | undefined;
904
+ placeholder?: string | undefined;
905
+ helperText?: string | undefined;
906
+ docId: string;
907
+ versionId: string;
908
+ originalVersionId: string;
909
+ createdAt: string;
910
+ updatedAt: string;
911
+ links: string[];
912
+ deleted: boolean;
913
+ } & {
914
+ forks: string[];
915
+ }) | ({
916
+ schemaName: "remoteDetectionAlert";
917
+ detectionDateStart: string;
918
+ detectionDateEnd: string;
919
+ sourceId: string;
920
+ metadata: {
921
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
922
+ };
923
+ geometry: import("@comapeo/schema/dist/schema/remoteDetectionAlert.js").Geometry;
924
+ docId: string;
925
+ versionId: string;
926
+ originalVersionId: string;
927
+ createdAt: string;
928
+ updatedAt: string;
929
+ links: string[];
930
+ deleted: boolean;
931
+ } & {
932
+ forks: string[];
933
+ }), readonly ["@comapeo/core-react", "projects", string, D, string, {
934
+ readonly lang: string | undefined;
935
+ }], never> | undefined;
936
+ } & {
937
+ queryKey: readonly ["@comapeo/core-react", "projects", string, D, string, {
938
+ readonly lang: string | undefined;
939
+ }] & {
940
+ [dataTagSymbol]: ({
941
+ schemaName: "track";
942
+ locations: import("@comapeo/schema/dist/schema/track.js").Position[];
943
+ observationRefs: {
944
+ docId: string;
945
+ versionId: string;
946
+ }[];
947
+ tags: {
948
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
949
+ };
950
+ docId: string;
951
+ versionId: string;
952
+ originalVersionId: string;
953
+ createdAt: string;
954
+ updatedAt: string;
955
+ links: string[];
956
+ deleted: boolean;
957
+ } & {
958
+ forks: string[];
959
+ }) | ({
960
+ schemaName: "observation";
961
+ lat?: number | undefined;
962
+ lon?: number | undefined;
963
+ attachments: {
964
+ driveDiscoveryId: string;
965
+ name: string;
966
+ type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
967
+ hash: string;
968
+ }[];
969
+ tags: {
970
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
971
+ };
972
+ metadata?: {
973
+ manualLocation?: boolean;
974
+ position?: import("@comapeo/schema/dist/schema/observation.js").Position;
975
+ lastSavedPosition?: import("@comapeo/schema/dist/schema/observation.js").Position;
976
+ positionProvider?: {
977
+ gpsAvailable?: boolean;
978
+ passiveAvailable?: boolean;
979
+ locationServicesEnabled: boolean;
980
+ networkAvailable?: boolean;
981
+ };
982
+ } | undefined;
983
+ presetRef?: {
984
+ docId: string;
985
+ versionId: string;
986
+ } | undefined;
987
+ docId: string;
988
+ versionId: string;
989
+ originalVersionId: string;
990
+ createdAt: string;
991
+ updatedAt: string;
992
+ links: string[];
993
+ deleted: boolean;
994
+ } & {
995
+ forks: string[];
996
+ }) | ({
997
+ schemaName: "preset";
998
+ name: string;
999
+ geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
1000
+ tags: import("@comapeo/schema/dist/schema/preset.js").Tags;
1001
+ addTags: import("@comapeo/schema/dist/schema/preset.js").Tags1;
1002
+ removeTags: import("@comapeo/schema/dist/schema/preset.js").Tags2;
1003
+ fieldRefs: {
1004
+ docId: string;
1005
+ versionId: string;
1006
+ }[];
1007
+ iconRef?: {
1008
+ docId: string;
1009
+ versionId: string;
1010
+ } | undefined;
1011
+ terms: string[];
1012
+ color?: string | undefined;
1013
+ docId: string;
1014
+ versionId: string;
1015
+ originalVersionId: string;
1016
+ createdAt: string;
1017
+ updatedAt: string;
1018
+ links: string[];
1019
+ deleted: boolean;
1020
+ } & {
1021
+ forks: string[];
1022
+ }) | ({
1023
+ schemaName: "field";
1024
+ tagKey: string;
1025
+ type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
1026
+ label: string;
1027
+ appearance?: ("appearance_unspecified" | "singleline" | "multiline" | "UNRECOGNIZED") | undefined;
1028
+ snakeCase?: boolean | undefined;
1029
+ options?: {
1030
+ label: string;
1031
+ value: string | boolean | number | null;
1032
+ }[] | undefined;
1033
+ universal?: boolean | undefined;
1034
+ placeholder?: string | undefined;
1035
+ helperText?: string | undefined;
1036
+ docId: string;
1037
+ versionId: string;
1038
+ originalVersionId: string;
1039
+ createdAt: string;
1040
+ updatedAt: string;
1041
+ links: string[];
1042
+ deleted: boolean;
1043
+ } & {
1044
+ forks: string[];
1045
+ }) | ({
1046
+ schemaName: "remoteDetectionAlert";
1047
+ detectionDateStart: string;
1048
+ detectionDateEnd: string;
1049
+ sourceId: string;
1050
+ metadata: {
1051
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
1052
+ };
1053
+ geometry: import("@comapeo/schema/dist/schema/remoteDetectionAlert.js").Geometry;
1054
+ docId: string;
1055
+ versionId: string;
1056
+ originalVersionId: string;
1057
+ createdAt: string;
1058
+ updatedAt: string;
1059
+ links: string[];
1060
+ deleted: boolean;
1061
+ } & {
1062
+ forks: string[];
1063
+ });
1064
+ [dataTagErrorSymbol]: Error;
1065
+ };
1066
+ };
1067
+ export declare function documentByVersionIdQueryOptions<D extends WriteableDocumentType>({ projectApi, projectId, docType, versionId, lang, }: {
1068
+ projectApi: MapeoProjectApi;
1069
+ projectId: string;
1070
+ docType: D;
1071
+ versionId: string;
1072
+ lang?: string;
1073
+ }): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
1074
+ schemaName: "track";
1075
+ locations: import("@comapeo/schema/dist/schema/track.js").Position[];
1076
+ observationRefs: {
1077
+ docId: string;
1078
+ versionId: string;
1079
+ }[];
1080
+ tags: {
1081
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
1082
+ };
1083
+ docId: string;
1084
+ versionId: string;
1085
+ originalVersionId: string;
1086
+ createdAt: string;
1087
+ updatedAt: string;
1088
+ links: string[];
1089
+ deleted: boolean;
1090
+ } | {
1091
+ schemaName: "observation";
1092
+ lat?: number | undefined;
1093
+ lon?: number | undefined;
1094
+ attachments: {
1095
+ driveDiscoveryId: string;
1096
+ name: string;
1097
+ type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
1098
+ hash: string;
1099
+ }[];
1100
+ tags: {
1101
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
1102
+ };
1103
+ metadata?: {
1104
+ manualLocation?: boolean;
1105
+ position?: import("@comapeo/schema/dist/schema/observation.js").Position;
1106
+ lastSavedPosition?: import("@comapeo/schema/dist/schema/observation.js").Position;
1107
+ positionProvider?: {
1108
+ gpsAvailable?: boolean;
1109
+ passiveAvailable?: boolean;
1110
+ locationServicesEnabled: boolean;
1111
+ networkAvailable?: boolean;
1112
+ };
1113
+ } | undefined;
1114
+ presetRef?: {
1115
+ docId: string;
1116
+ versionId: string;
1117
+ } | undefined;
1118
+ docId: string;
1119
+ versionId: string;
1120
+ originalVersionId: string;
1121
+ createdAt: string;
1122
+ updatedAt: string;
1123
+ links: string[];
1124
+ deleted: boolean;
1125
+ } | {
1126
+ schemaName: "preset";
1127
+ name: string;
1128
+ geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
1129
+ tags: import("@comapeo/schema/dist/schema/preset.js").Tags;
1130
+ addTags: import("@comapeo/schema/dist/schema/preset.js").Tags1;
1131
+ removeTags: import("@comapeo/schema/dist/schema/preset.js").Tags2;
1132
+ fieldRefs: {
1133
+ docId: string;
1134
+ versionId: string;
1135
+ }[];
1136
+ iconRef?: {
1137
+ docId: string;
1138
+ versionId: string;
1139
+ } | undefined;
1140
+ terms: string[];
1141
+ color?: string | undefined;
1142
+ docId: string;
1143
+ versionId: string;
1144
+ originalVersionId: string;
1145
+ createdAt: string;
1146
+ updatedAt: string;
1147
+ links: string[];
1148
+ deleted: boolean;
1149
+ } | {
1150
+ schemaName: "field";
1151
+ tagKey: string;
1152
+ type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
1153
+ label: string;
1154
+ appearance?: ("appearance_unspecified" | "singleline" | "multiline" | "UNRECOGNIZED") | undefined;
1155
+ snakeCase?: boolean | undefined;
1156
+ options?: {
1157
+ label: string;
1158
+ value: string | boolean | number | null;
1159
+ }[] | undefined;
1160
+ universal?: boolean | undefined;
1161
+ placeholder?: string | undefined;
1162
+ helperText?: string | undefined;
1163
+ docId: string;
1164
+ versionId: string;
1165
+ originalVersionId: string;
1166
+ createdAt: string;
1167
+ updatedAt: string;
1168
+ links: string[];
1169
+ deleted: boolean;
1170
+ } | {
1171
+ schemaName: "remoteDetectionAlert";
1172
+ detectionDateStart: string;
1173
+ detectionDateEnd: string;
1174
+ sourceId: string;
1175
+ metadata: {
1176
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
1177
+ };
1178
+ geometry: import("@comapeo/schema/dist/schema/remoteDetectionAlert.js").Geometry;
1179
+ docId: string;
1180
+ versionId: string;
1181
+ originalVersionId: string;
1182
+ createdAt: string;
1183
+ updatedAt: string;
1184
+ links: string[];
1185
+ deleted: boolean;
1186
+ }, Error, {
1187
+ schemaName: "track";
1188
+ locations: import("@comapeo/schema/dist/schema/track.js").Position[];
1189
+ observationRefs: {
1190
+ docId: string;
1191
+ versionId: string;
1192
+ }[];
1193
+ tags: {
1194
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
1195
+ };
1196
+ docId: string;
1197
+ versionId: string;
1198
+ originalVersionId: string;
1199
+ createdAt: string;
1200
+ updatedAt: string;
1201
+ links: string[];
1202
+ deleted: boolean;
1203
+ } | {
1204
+ schemaName: "observation";
1205
+ lat?: number | undefined;
1206
+ lon?: number | undefined;
1207
+ attachments: {
1208
+ driveDiscoveryId: string;
1209
+ name: string;
1210
+ type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
1211
+ hash: string;
1212
+ }[];
1213
+ tags: {
1214
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
1215
+ };
1216
+ metadata?: {
1217
+ manualLocation?: boolean;
1218
+ position?: import("@comapeo/schema/dist/schema/observation.js").Position;
1219
+ lastSavedPosition?: import("@comapeo/schema/dist/schema/observation.js").Position;
1220
+ positionProvider?: {
1221
+ gpsAvailable?: boolean;
1222
+ passiveAvailable?: boolean;
1223
+ locationServicesEnabled: boolean;
1224
+ networkAvailable?: boolean;
1225
+ };
1226
+ } | undefined;
1227
+ presetRef?: {
1228
+ docId: string;
1229
+ versionId: string;
1230
+ } | undefined;
1231
+ docId: string;
1232
+ versionId: string;
1233
+ originalVersionId: string;
1234
+ createdAt: string;
1235
+ updatedAt: string;
1236
+ links: string[];
1237
+ deleted: boolean;
1238
+ } | {
1239
+ schemaName: "preset";
1240
+ name: string;
1241
+ geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
1242
+ tags: import("@comapeo/schema/dist/schema/preset.js").Tags;
1243
+ addTags: import("@comapeo/schema/dist/schema/preset.js").Tags1;
1244
+ removeTags: import("@comapeo/schema/dist/schema/preset.js").Tags2;
1245
+ fieldRefs: {
1246
+ docId: string;
1247
+ versionId: string;
1248
+ }[];
1249
+ iconRef?: {
1250
+ docId: string;
1251
+ versionId: string;
1252
+ } | undefined;
1253
+ terms: string[];
1254
+ color?: string | undefined;
1255
+ docId: string;
1256
+ versionId: string;
1257
+ originalVersionId: string;
1258
+ createdAt: string;
1259
+ updatedAt: string;
1260
+ links: string[];
1261
+ deleted: boolean;
1262
+ } | {
1263
+ schemaName: "field";
1264
+ tagKey: string;
1265
+ type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
1266
+ label: string;
1267
+ appearance?: ("appearance_unspecified" | "singleline" | "multiline" | "UNRECOGNIZED") | undefined;
1268
+ snakeCase?: boolean | undefined;
1269
+ options?: {
1270
+ label: string;
1271
+ value: string | boolean | number | null;
1272
+ }[] | undefined;
1273
+ universal?: boolean | undefined;
1274
+ placeholder?: string | undefined;
1275
+ helperText?: string | undefined;
1276
+ docId: string;
1277
+ versionId: string;
1278
+ originalVersionId: string;
1279
+ createdAt: string;
1280
+ updatedAt: string;
1281
+ links: string[];
1282
+ deleted: boolean;
1283
+ } | {
1284
+ schemaName: "remoteDetectionAlert";
1285
+ detectionDateStart: string;
1286
+ detectionDateEnd: string;
1287
+ sourceId: string;
1288
+ metadata: {
1289
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
1290
+ };
1291
+ geometry: import("@comapeo/schema/dist/schema/remoteDetectionAlert.js").Geometry;
1292
+ docId: string;
1293
+ versionId: string;
1294
+ originalVersionId: string;
1295
+ createdAt: string;
1296
+ updatedAt: string;
1297
+ links: string[];
1298
+ deleted: boolean;
1299
+ }, readonly ["@comapeo/core-react", "projects", string, D, string, {
1300
+ readonly lang: string | undefined;
1301
+ }]>, "queryFn"> & {
1302
+ queryFn?: import("@tanstack/react-query").QueryFunction<{
1303
+ schemaName: "track";
1304
+ locations: import("@comapeo/schema/dist/schema/track.js").Position[];
1305
+ observationRefs: {
1306
+ docId: string;
1307
+ versionId: string;
1308
+ }[];
1309
+ tags: {
1310
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
1311
+ };
1312
+ docId: string;
1313
+ versionId: string;
1314
+ originalVersionId: string;
1315
+ createdAt: string;
1316
+ updatedAt: string;
1317
+ links: string[];
1318
+ deleted: boolean;
1319
+ } | {
1320
+ schemaName: "observation";
1321
+ lat?: number | undefined;
1322
+ lon?: number | undefined;
1323
+ attachments: {
1324
+ driveDiscoveryId: string;
1325
+ name: string;
1326
+ type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
1327
+ hash: string;
1328
+ }[];
1329
+ tags: {
1330
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
1331
+ };
1332
+ metadata?: {
1333
+ manualLocation?: boolean;
1334
+ position?: import("@comapeo/schema/dist/schema/observation.js").Position;
1335
+ lastSavedPosition?: import("@comapeo/schema/dist/schema/observation.js").Position;
1336
+ positionProvider?: {
1337
+ gpsAvailable?: boolean;
1338
+ passiveAvailable?: boolean;
1339
+ locationServicesEnabled: boolean;
1340
+ networkAvailable?: boolean;
1341
+ };
1342
+ } | undefined;
1343
+ presetRef?: {
1344
+ docId: string;
1345
+ versionId: string;
1346
+ } | undefined;
1347
+ docId: string;
1348
+ versionId: string;
1349
+ originalVersionId: string;
1350
+ createdAt: string;
1351
+ updatedAt: string;
1352
+ links: string[];
1353
+ deleted: boolean;
1354
+ } | {
1355
+ schemaName: "preset";
1356
+ name: string;
1357
+ geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
1358
+ tags: import("@comapeo/schema/dist/schema/preset.js").Tags;
1359
+ addTags: import("@comapeo/schema/dist/schema/preset.js").Tags1;
1360
+ removeTags: import("@comapeo/schema/dist/schema/preset.js").Tags2;
1361
+ fieldRefs: {
1362
+ docId: string;
1363
+ versionId: string;
1364
+ }[];
1365
+ iconRef?: {
1366
+ docId: string;
1367
+ versionId: string;
1368
+ } | undefined;
1369
+ terms: string[];
1370
+ color?: string | undefined;
1371
+ docId: string;
1372
+ versionId: string;
1373
+ originalVersionId: string;
1374
+ createdAt: string;
1375
+ updatedAt: string;
1376
+ links: string[];
1377
+ deleted: boolean;
1378
+ } | {
1379
+ schemaName: "field";
1380
+ tagKey: string;
1381
+ type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
1382
+ label: string;
1383
+ appearance?: ("appearance_unspecified" | "singleline" | "multiline" | "UNRECOGNIZED") | undefined;
1384
+ snakeCase?: boolean | undefined;
1385
+ options?: {
1386
+ label: string;
1387
+ value: string | boolean | number | null;
1388
+ }[] | undefined;
1389
+ universal?: boolean | undefined;
1390
+ placeholder?: string | undefined;
1391
+ helperText?: string | undefined;
1392
+ docId: string;
1393
+ versionId: string;
1394
+ originalVersionId: string;
1395
+ createdAt: string;
1396
+ updatedAt: string;
1397
+ links: string[];
1398
+ deleted: boolean;
1399
+ } | {
1400
+ schemaName: "remoteDetectionAlert";
1401
+ detectionDateStart: string;
1402
+ detectionDateEnd: string;
1403
+ sourceId: string;
1404
+ metadata: {
1405
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
1406
+ };
1407
+ geometry: import("@comapeo/schema/dist/schema/remoteDetectionAlert.js").Geometry;
1408
+ docId: string;
1409
+ versionId: string;
1410
+ originalVersionId: string;
1411
+ createdAt: string;
1412
+ updatedAt: string;
1413
+ links: string[];
1414
+ deleted: boolean;
1415
+ }, readonly ["@comapeo/core-react", "projects", string, D, string, {
1416
+ readonly lang: string | undefined;
1417
+ }], never> | undefined;
1418
+ } & {
1419
+ queryKey: readonly ["@comapeo/core-react", "projects", string, D, string, {
1420
+ readonly lang: string | undefined;
1421
+ }] & {
1422
+ [dataTagSymbol]: {
1423
+ schemaName: "track";
1424
+ locations: import("@comapeo/schema/dist/schema/track.js").Position[];
1425
+ observationRefs: {
1426
+ docId: string;
1427
+ versionId: string;
1428
+ }[];
1429
+ tags: {
1430
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
1431
+ };
1432
+ docId: string;
1433
+ versionId: string;
1434
+ originalVersionId: string;
1435
+ createdAt: string;
1436
+ updatedAt: string;
1437
+ links: string[];
1438
+ deleted: boolean;
1439
+ } | {
1440
+ schemaName: "observation";
1441
+ lat?: number | undefined;
1442
+ lon?: number | undefined;
1443
+ attachments: {
1444
+ driveDiscoveryId: string;
1445
+ name: string;
1446
+ type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
1447
+ hash: string;
1448
+ }[];
1449
+ tags: {
1450
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
1451
+ };
1452
+ metadata?: {
1453
+ manualLocation?: boolean;
1454
+ position?: import("@comapeo/schema/dist/schema/observation.js").Position;
1455
+ lastSavedPosition?: import("@comapeo/schema/dist/schema/observation.js").Position;
1456
+ positionProvider?: {
1457
+ gpsAvailable?: boolean;
1458
+ passiveAvailable?: boolean;
1459
+ locationServicesEnabled: boolean;
1460
+ networkAvailable?: boolean;
1461
+ };
1462
+ } | undefined;
1463
+ presetRef?: {
1464
+ docId: string;
1465
+ versionId: string;
1466
+ } | undefined;
1467
+ docId: string;
1468
+ versionId: string;
1469
+ originalVersionId: string;
1470
+ createdAt: string;
1471
+ updatedAt: string;
1472
+ links: string[];
1473
+ deleted: boolean;
1474
+ } | {
1475
+ schemaName: "preset";
1476
+ name: string;
1477
+ geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
1478
+ tags: import("@comapeo/schema/dist/schema/preset.js").Tags;
1479
+ addTags: import("@comapeo/schema/dist/schema/preset.js").Tags1;
1480
+ removeTags: import("@comapeo/schema/dist/schema/preset.js").Tags2;
1481
+ fieldRefs: {
1482
+ docId: string;
1483
+ versionId: string;
1484
+ }[];
1485
+ iconRef?: {
1486
+ docId: string;
1487
+ versionId: string;
1488
+ } | undefined;
1489
+ terms: string[];
1490
+ color?: string | undefined;
1491
+ docId: string;
1492
+ versionId: string;
1493
+ originalVersionId: string;
1494
+ createdAt: string;
1495
+ updatedAt: string;
1496
+ links: string[];
1497
+ deleted: boolean;
1498
+ } | {
1499
+ schemaName: "field";
1500
+ tagKey: string;
1501
+ type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
1502
+ label: string;
1503
+ appearance?: ("appearance_unspecified" | "singleline" | "multiline" | "UNRECOGNIZED") | undefined;
1504
+ snakeCase?: boolean | undefined;
1505
+ options?: {
1506
+ label: string;
1507
+ value: string | boolean | number | null;
1508
+ }[] | undefined;
1509
+ universal?: boolean | undefined;
1510
+ placeholder?: string | undefined;
1511
+ helperText?: string | undefined;
1512
+ docId: string;
1513
+ versionId: string;
1514
+ originalVersionId: string;
1515
+ createdAt: string;
1516
+ updatedAt: string;
1517
+ links: string[];
1518
+ deleted: boolean;
1519
+ } | {
1520
+ schemaName: "remoteDetectionAlert";
1521
+ detectionDateStart: string;
1522
+ detectionDateEnd: string;
1523
+ sourceId: string;
1524
+ metadata: {
1525
+ [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
1526
+ };
1527
+ geometry: import("@comapeo/schema/dist/schema/remoteDetectionAlert.js").Geometry;
1528
+ docId: string;
1529
+ versionId: string;
1530
+ originalVersionId: string;
1531
+ createdAt: string;
1532
+ updatedAt: string;
1533
+ links: string[];
1534
+ deleted: boolean;
1535
+ };
1536
+ [dataTagErrorSymbol]: Error;
1537
+ };
1538
+ };
1539
+ export declare function createDocumentMutationOptions<D extends WriteableDocumentType>({ docType, projectApi, projectId, queryClient, }: {
1540
+ docType: D;
1541
+ projectApi: MapeoProjectApi;
1542
+ projectId: string;
1543
+ queryClient: QueryClient;
1544
+ }): {
1545
+ mutationFn: ({ value, }: {
1546
+ value: Omit<WriteableValue<D>, "schemaName">;
1547
+ }) => Promise<WriteableDocument<D> & {
1548
+ forks: Array<string>;
1549
+ }>;
1550
+ onSuccess: () => void;
1551
+ networkMode: "always";
1552
+ retry: false;
1553
+ };
1554
+ export declare function updateDocumentMutationOptions<D extends WriteableDocumentType>({ docType, projectApi, projectId, queryClient, }: {
1555
+ docType: D;
1556
+ projectApi: MapeoProjectApi;
1557
+ projectId: string;
1558
+ queryClient: QueryClient;
1559
+ }): {
1560
+ mutationFn: ({ versionId, value, }: {
1561
+ versionId: string;
1562
+ value: Omit<WriteableValue<D>, "schemaName">;
1563
+ }) => Promise<WriteableDocument<D> & {
1564
+ forks: Array<string>;
1565
+ }>;
1566
+ onSuccess: () => void;
1567
+ networkMode: "always";
1568
+ retry: false;
1569
+ };
1570
+ export declare function deleteDocumentMutationOptions<D extends WriteableDocumentType>({ docType, projectApi, projectId, queryClient, }: {
1571
+ docType: D;
1572
+ projectApi: MapeoProjectApi;
1573
+ projectId: string;
1574
+ queryClient: QueryClient;
1575
+ }): {
1576
+ mutationFn: ({ docId, }: {
1577
+ docId: string;
1578
+ }) => Promise<WriteableDocument<D> & {
1579
+ forks: Array<string>;
1580
+ }>;
1581
+ onSuccess: () => void;
1582
+ networkMode: "always";
1583
+ retry: false;
1584
+ };