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