@comapeo/core-react 6.2.2 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/hooks/documents.d.ts +369 -52
- package/dist/commonjs/hooks/documents.js +3 -8
- package/dist/commonjs/lib/react-query/documents.d.ts +73 -158
- package/dist/commonjs/lib/react-query/documents.js +3 -3
- package/dist/esm/hooks/documents.d.ts +369 -52
- package/dist/esm/hooks/documents.js +3 -8
- package/dist/esm/lib/react-query/documents.d.ts +73 -158
- package/dist/esm/lib/react-query/documents.js +3 -3
- package/package.json +3 -3
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { DerivedDocFields } from '@comapeo/core/dist/datatype/index.js' with { 'resolution-mode': 'import' };
|
|
1
2
|
import type { MapeoProjectApi } from '@comapeo/ipc' with { 'resolution-mode': 'import' };
|
|
2
3
|
import { type QueryClient } from '@tanstack/react-query';
|
|
3
4
|
import { WriteableDocument, WriteableDocumentType, WriteableValue } from '../types.js';
|
|
@@ -57,9 +58,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
|
|
|
57
58
|
updatedAt: string;
|
|
58
59
|
links: string[];
|
|
59
60
|
deleted: boolean;
|
|
60
|
-
} & {
|
|
61
|
-
forks: string[];
|
|
62
|
-
})[] | ({
|
|
61
|
+
} & DerivedDocFields)[] | ({
|
|
63
62
|
schemaName: "observation";
|
|
64
63
|
lat?: number | undefined;
|
|
65
64
|
lon?: number | undefined;
|
|
@@ -89,9 +88,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
|
|
|
89
88
|
updatedAt: string;
|
|
90
89
|
links: string[];
|
|
91
90
|
deleted: boolean;
|
|
92
|
-
} & {
|
|
93
|
-
forks: string[];
|
|
94
|
-
})[] | ({
|
|
91
|
+
} & DerivedDocFields)[] | ({
|
|
95
92
|
schemaName: "preset";
|
|
96
93
|
name: string;
|
|
97
94
|
geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
|
|
@@ -115,9 +112,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
|
|
|
115
112
|
updatedAt: string;
|
|
116
113
|
links: string[];
|
|
117
114
|
deleted: boolean;
|
|
118
|
-
} & {
|
|
119
|
-
forks: string[];
|
|
120
|
-
})[] | ({
|
|
115
|
+
} & DerivedDocFields)[] | ({
|
|
121
116
|
schemaName: "field";
|
|
122
117
|
tagKey: string;
|
|
123
118
|
type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
|
|
@@ -138,9 +133,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
|
|
|
138
133
|
updatedAt: string;
|
|
139
134
|
links: string[];
|
|
140
135
|
deleted: boolean;
|
|
141
|
-
} & {
|
|
142
|
-
forks: string[];
|
|
143
|
-
})[] | ({
|
|
136
|
+
} & DerivedDocFields)[] | ({
|
|
144
137
|
schemaName: "remoteDetectionAlert";
|
|
145
138
|
detectionDateStart: string;
|
|
146
139
|
detectionDateEnd: string;
|
|
@@ -156,9 +149,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
|
|
|
156
149
|
updatedAt: string;
|
|
157
150
|
links: string[];
|
|
158
151
|
deleted: boolean;
|
|
159
|
-
} & {
|
|
160
|
-
forks: string[];
|
|
161
|
-
})[], Error, ({
|
|
152
|
+
} & DerivedDocFields)[], Error, ({
|
|
162
153
|
schemaName: "track";
|
|
163
154
|
locations: import("@comapeo/schema/dist/schema/track.js").Position[];
|
|
164
155
|
observationRefs: {
|
|
@@ -179,9 +170,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
|
|
|
179
170
|
updatedAt: string;
|
|
180
171
|
links: string[];
|
|
181
172
|
deleted: boolean;
|
|
182
|
-
} & {
|
|
183
|
-
forks: string[];
|
|
184
|
-
})[] | ({
|
|
173
|
+
} & DerivedDocFields)[] | ({
|
|
185
174
|
schemaName: "observation";
|
|
186
175
|
lat?: number | undefined;
|
|
187
176
|
lon?: number | undefined;
|
|
@@ -211,9 +200,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
|
|
|
211
200
|
updatedAt: string;
|
|
212
201
|
links: string[];
|
|
213
202
|
deleted: boolean;
|
|
214
|
-
} & {
|
|
215
|
-
forks: string[];
|
|
216
|
-
})[] | ({
|
|
203
|
+
} & DerivedDocFields)[] | ({
|
|
217
204
|
schemaName: "preset";
|
|
218
205
|
name: string;
|
|
219
206
|
geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
|
|
@@ -237,9 +224,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
|
|
|
237
224
|
updatedAt: string;
|
|
238
225
|
links: string[];
|
|
239
226
|
deleted: boolean;
|
|
240
|
-
} & {
|
|
241
|
-
forks: string[];
|
|
242
|
-
})[] | ({
|
|
227
|
+
} & DerivedDocFields)[] | ({
|
|
243
228
|
schemaName: "field";
|
|
244
229
|
tagKey: string;
|
|
245
230
|
type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
|
|
@@ -260,9 +245,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
|
|
|
260
245
|
updatedAt: string;
|
|
261
246
|
links: string[];
|
|
262
247
|
deleted: boolean;
|
|
263
|
-
} & {
|
|
264
|
-
forks: string[];
|
|
265
|
-
})[] | ({
|
|
248
|
+
} & DerivedDocFields)[] | ({
|
|
266
249
|
schemaName: "remoteDetectionAlert";
|
|
267
250
|
detectionDateStart: string;
|
|
268
251
|
detectionDateEnd: string;
|
|
@@ -278,9 +261,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
|
|
|
278
261
|
updatedAt: string;
|
|
279
262
|
links: string[];
|
|
280
263
|
deleted: boolean;
|
|
281
|
-
} & {
|
|
282
|
-
forks: string[];
|
|
283
|
-
})[], readonly ["@comapeo/core-react", "projects", string, D, {
|
|
264
|
+
} & DerivedDocFields)[], readonly ["@comapeo/core-react", "projects", string, D, {
|
|
284
265
|
readonly includeDeleted: boolean | undefined;
|
|
285
266
|
readonly lang: string | undefined;
|
|
286
267
|
}]>, "queryFn"> & {
|
|
@@ -305,9 +286,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
|
|
|
305
286
|
updatedAt: string;
|
|
306
287
|
links: string[];
|
|
307
288
|
deleted: boolean;
|
|
308
|
-
} & {
|
|
309
|
-
forks: string[];
|
|
310
|
-
})[] | ({
|
|
289
|
+
} & DerivedDocFields)[] | ({
|
|
311
290
|
schemaName: "observation";
|
|
312
291
|
lat?: number | undefined;
|
|
313
292
|
lon?: number | undefined;
|
|
@@ -337,9 +316,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
|
|
|
337
316
|
updatedAt: string;
|
|
338
317
|
links: string[];
|
|
339
318
|
deleted: boolean;
|
|
340
|
-
} & {
|
|
341
|
-
forks: string[];
|
|
342
|
-
})[] | ({
|
|
319
|
+
} & DerivedDocFields)[] | ({
|
|
343
320
|
schemaName: "preset";
|
|
344
321
|
name: string;
|
|
345
322
|
geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
|
|
@@ -363,9 +340,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
|
|
|
363
340
|
updatedAt: string;
|
|
364
341
|
links: string[];
|
|
365
342
|
deleted: boolean;
|
|
366
|
-
} & {
|
|
367
|
-
forks: string[];
|
|
368
|
-
})[] | ({
|
|
343
|
+
} & DerivedDocFields)[] | ({
|
|
369
344
|
schemaName: "field";
|
|
370
345
|
tagKey: string;
|
|
371
346
|
type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
|
|
@@ -386,9 +361,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
|
|
|
386
361
|
updatedAt: string;
|
|
387
362
|
links: string[];
|
|
388
363
|
deleted: boolean;
|
|
389
|
-
} & {
|
|
390
|
-
forks: string[];
|
|
391
|
-
})[] | ({
|
|
364
|
+
} & DerivedDocFields)[] | ({
|
|
392
365
|
schemaName: "remoteDetectionAlert";
|
|
393
366
|
detectionDateStart: string;
|
|
394
367
|
detectionDateEnd: string;
|
|
@@ -404,9 +377,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
|
|
|
404
377
|
updatedAt: string;
|
|
405
378
|
links: string[];
|
|
406
379
|
deleted: boolean;
|
|
407
|
-
} & {
|
|
408
|
-
forks: string[];
|
|
409
|
-
})[], readonly ["@comapeo/core-react", "projects", string, D, {
|
|
380
|
+
} & DerivedDocFields)[], readonly ["@comapeo/core-react", "projects", string, D, {
|
|
410
381
|
readonly includeDeleted: boolean | undefined;
|
|
411
382
|
readonly lang: string | undefined;
|
|
412
383
|
}], never> | undefined;
|
|
@@ -436,9 +407,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
|
|
|
436
407
|
updatedAt: string;
|
|
437
408
|
links: string[];
|
|
438
409
|
deleted: boolean;
|
|
439
|
-
} & {
|
|
440
|
-
forks: string[];
|
|
441
|
-
})[] | ({
|
|
410
|
+
} & DerivedDocFields)[] | ({
|
|
442
411
|
schemaName: "observation";
|
|
443
412
|
lat?: number | undefined;
|
|
444
413
|
lon?: number | undefined;
|
|
@@ -468,9 +437,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
|
|
|
468
437
|
updatedAt: string;
|
|
469
438
|
links: string[];
|
|
470
439
|
deleted: boolean;
|
|
471
|
-
} & {
|
|
472
|
-
forks: string[];
|
|
473
|
-
})[] | ({
|
|
440
|
+
} & DerivedDocFields)[] | ({
|
|
474
441
|
schemaName: "preset";
|
|
475
442
|
name: string;
|
|
476
443
|
geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
|
|
@@ -494,9 +461,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
|
|
|
494
461
|
updatedAt: string;
|
|
495
462
|
links: string[];
|
|
496
463
|
deleted: boolean;
|
|
497
|
-
} & {
|
|
498
|
-
forks: string[];
|
|
499
|
-
})[] | ({
|
|
464
|
+
} & DerivedDocFields)[] | ({
|
|
500
465
|
schemaName: "field";
|
|
501
466
|
tagKey: string;
|
|
502
467
|
type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
|
|
@@ -517,9 +482,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
|
|
|
517
482
|
updatedAt: string;
|
|
518
483
|
links: string[];
|
|
519
484
|
deleted: boolean;
|
|
520
|
-
} & {
|
|
521
|
-
forks: string[];
|
|
522
|
-
})[] | ({
|
|
485
|
+
} & DerivedDocFields)[] | ({
|
|
523
486
|
schemaName: "remoteDetectionAlert";
|
|
524
487
|
detectionDateStart: string;
|
|
525
488
|
detectionDateEnd: string;
|
|
@@ -535,9 +498,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
|
|
|
535
498
|
updatedAt: string;
|
|
536
499
|
links: string[];
|
|
537
500
|
deleted: boolean;
|
|
538
|
-
} &
|
|
539
|
-
forks: string[];
|
|
540
|
-
})[];
|
|
501
|
+
} & DerivedDocFields)[];
|
|
541
502
|
[dataTagErrorSymbol]: Error;
|
|
542
503
|
};
|
|
543
504
|
};
|
|
@@ -568,9 +529,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
|
|
|
568
529
|
updatedAt: string;
|
|
569
530
|
links: string[];
|
|
570
531
|
deleted: boolean;
|
|
571
|
-
} & {
|
|
572
|
-
forks: string[];
|
|
573
|
-
}) | ({
|
|
532
|
+
} & DerivedDocFields) | ({
|
|
574
533
|
schemaName: "observation";
|
|
575
534
|
lat?: number | undefined;
|
|
576
535
|
lon?: number | undefined;
|
|
@@ -600,9 +559,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
|
|
|
600
559
|
updatedAt: string;
|
|
601
560
|
links: string[];
|
|
602
561
|
deleted: boolean;
|
|
603
|
-
} & {
|
|
604
|
-
forks: string[];
|
|
605
|
-
}) | ({
|
|
562
|
+
} & DerivedDocFields) | ({
|
|
606
563
|
schemaName: "preset";
|
|
607
564
|
name: string;
|
|
608
565
|
geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
|
|
@@ -626,9 +583,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
|
|
|
626
583
|
updatedAt: string;
|
|
627
584
|
links: string[];
|
|
628
585
|
deleted: boolean;
|
|
629
|
-
} & {
|
|
630
|
-
forks: string[];
|
|
631
|
-
}) | ({
|
|
586
|
+
} & DerivedDocFields) | ({
|
|
632
587
|
schemaName: "field";
|
|
633
588
|
tagKey: string;
|
|
634
589
|
type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
|
|
@@ -649,9 +604,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
|
|
|
649
604
|
updatedAt: string;
|
|
650
605
|
links: string[];
|
|
651
606
|
deleted: boolean;
|
|
652
|
-
} & {
|
|
653
|
-
forks: string[];
|
|
654
|
-
}) | ({
|
|
607
|
+
} & DerivedDocFields) | ({
|
|
655
608
|
schemaName: "remoteDetectionAlert";
|
|
656
609
|
detectionDateStart: string;
|
|
657
610
|
detectionDateEnd: string;
|
|
@@ -667,9 +620,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
|
|
|
667
620
|
updatedAt: string;
|
|
668
621
|
links: string[];
|
|
669
622
|
deleted: boolean;
|
|
670
|
-
} & {
|
|
671
|
-
forks: string[];
|
|
672
|
-
}), Error, ({
|
|
623
|
+
} & DerivedDocFields), Error, ({
|
|
673
624
|
schemaName: "track";
|
|
674
625
|
locations: import("@comapeo/schema/dist/schema/track.js").Position[];
|
|
675
626
|
observationRefs: {
|
|
@@ -690,9 +641,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
|
|
|
690
641
|
updatedAt: string;
|
|
691
642
|
links: string[];
|
|
692
643
|
deleted: boolean;
|
|
693
|
-
} & {
|
|
694
|
-
forks: string[];
|
|
695
|
-
}) | ({
|
|
644
|
+
} & DerivedDocFields) | ({
|
|
696
645
|
schemaName: "observation";
|
|
697
646
|
lat?: number | undefined;
|
|
698
647
|
lon?: number | undefined;
|
|
@@ -722,9 +671,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
|
|
|
722
671
|
updatedAt: string;
|
|
723
672
|
links: string[];
|
|
724
673
|
deleted: boolean;
|
|
725
|
-
} & {
|
|
726
|
-
forks: string[];
|
|
727
|
-
}) | ({
|
|
674
|
+
} & DerivedDocFields) | ({
|
|
728
675
|
schemaName: "preset";
|
|
729
676
|
name: string;
|
|
730
677
|
geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
|
|
@@ -748,9 +695,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
|
|
|
748
695
|
updatedAt: string;
|
|
749
696
|
links: string[];
|
|
750
697
|
deleted: boolean;
|
|
751
|
-
} & {
|
|
752
|
-
forks: string[];
|
|
753
|
-
}) | ({
|
|
698
|
+
} & DerivedDocFields) | ({
|
|
754
699
|
schemaName: "field";
|
|
755
700
|
tagKey: string;
|
|
756
701
|
type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
|
|
@@ -771,9 +716,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
|
|
|
771
716
|
updatedAt: string;
|
|
772
717
|
links: string[];
|
|
773
718
|
deleted: boolean;
|
|
774
|
-
} & {
|
|
775
|
-
forks: string[];
|
|
776
|
-
}) | ({
|
|
719
|
+
} & DerivedDocFields) | ({
|
|
777
720
|
schemaName: "remoteDetectionAlert";
|
|
778
721
|
detectionDateStart: string;
|
|
779
722
|
detectionDateEnd: string;
|
|
@@ -789,9 +732,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
|
|
|
789
732
|
updatedAt: string;
|
|
790
733
|
links: string[];
|
|
791
734
|
deleted: boolean;
|
|
792
|
-
} & {
|
|
793
|
-
forks: string[];
|
|
794
|
-
}), readonly ["@comapeo/core-react", "projects", string, D, string, {
|
|
735
|
+
} & DerivedDocFields), readonly ["@comapeo/core-react", "projects", string, D, string, {
|
|
795
736
|
readonly lang: string | undefined;
|
|
796
737
|
}]>, "queryFn"> & {
|
|
797
738
|
queryFn?: import("@tanstack/react-query").QueryFunction<({
|
|
@@ -815,9 +756,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
|
|
|
815
756
|
updatedAt: string;
|
|
816
757
|
links: string[];
|
|
817
758
|
deleted: boolean;
|
|
818
|
-
} & {
|
|
819
|
-
forks: string[];
|
|
820
|
-
}) | ({
|
|
759
|
+
} & DerivedDocFields) | ({
|
|
821
760
|
schemaName: "observation";
|
|
822
761
|
lat?: number | undefined;
|
|
823
762
|
lon?: number | undefined;
|
|
@@ -847,9 +786,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
|
|
|
847
786
|
updatedAt: string;
|
|
848
787
|
links: string[];
|
|
849
788
|
deleted: boolean;
|
|
850
|
-
} & {
|
|
851
|
-
forks: string[];
|
|
852
|
-
}) | ({
|
|
789
|
+
} & DerivedDocFields) | ({
|
|
853
790
|
schemaName: "preset";
|
|
854
791
|
name: string;
|
|
855
792
|
geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
|
|
@@ -873,9 +810,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
|
|
|
873
810
|
updatedAt: string;
|
|
874
811
|
links: string[];
|
|
875
812
|
deleted: boolean;
|
|
876
|
-
} & {
|
|
877
|
-
forks: string[];
|
|
878
|
-
}) | ({
|
|
813
|
+
} & DerivedDocFields) | ({
|
|
879
814
|
schemaName: "field";
|
|
880
815
|
tagKey: string;
|
|
881
816
|
type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
|
|
@@ -896,9 +831,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
|
|
|
896
831
|
updatedAt: string;
|
|
897
832
|
links: string[];
|
|
898
833
|
deleted: boolean;
|
|
899
|
-
} & {
|
|
900
|
-
forks: string[];
|
|
901
|
-
}) | ({
|
|
834
|
+
} & DerivedDocFields) | ({
|
|
902
835
|
schemaName: "remoteDetectionAlert";
|
|
903
836
|
detectionDateStart: string;
|
|
904
837
|
detectionDateEnd: string;
|
|
@@ -914,9 +847,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
|
|
|
914
847
|
updatedAt: string;
|
|
915
848
|
links: string[];
|
|
916
849
|
deleted: boolean;
|
|
917
|
-
} & {
|
|
918
|
-
forks: string[];
|
|
919
|
-
}), readonly ["@comapeo/core-react", "projects", string, D, string, {
|
|
850
|
+
} & DerivedDocFields), readonly ["@comapeo/core-react", "projects", string, D, string, {
|
|
920
851
|
readonly lang: string | undefined;
|
|
921
852
|
}], never> | undefined;
|
|
922
853
|
} & {
|
|
@@ -944,9 +875,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
|
|
|
944
875
|
updatedAt: string;
|
|
945
876
|
links: string[];
|
|
946
877
|
deleted: boolean;
|
|
947
|
-
} & {
|
|
948
|
-
forks: string[];
|
|
949
|
-
}) | ({
|
|
878
|
+
} & DerivedDocFields) | ({
|
|
950
879
|
schemaName: "observation";
|
|
951
880
|
lat?: number | undefined;
|
|
952
881
|
lon?: number | undefined;
|
|
@@ -976,9 +905,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
|
|
|
976
905
|
updatedAt: string;
|
|
977
906
|
links: string[];
|
|
978
907
|
deleted: boolean;
|
|
979
|
-
} & {
|
|
980
|
-
forks: string[];
|
|
981
|
-
}) | ({
|
|
908
|
+
} & DerivedDocFields) | ({
|
|
982
909
|
schemaName: "preset";
|
|
983
910
|
name: string;
|
|
984
911
|
geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
|
|
@@ -1002,9 +929,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
|
|
|
1002
929
|
updatedAt: string;
|
|
1003
930
|
links: string[];
|
|
1004
931
|
deleted: boolean;
|
|
1005
|
-
} & {
|
|
1006
|
-
forks: string[];
|
|
1007
|
-
}) | ({
|
|
932
|
+
} & DerivedDocFields) | ({
|
|
1008
933
|
schemaName: "field";
|
|
1009
934
|
tagKey: string;
|
|
1010
935
|
type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
|
|
@@ -1025,9 +950,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
|
|
|
1025
950
|
updatedAt: string;
|
|
1026
951
|
links: string[];
|
|
1027
952
|
deleted: boolean;
|
|
1028
|
-
} & {
|
|
1029
|
-
forks: string[];
|
|
1030
|
-
}) | ({
|
|
953
|
+
} & DerivedDocFields) | ({
|
|
1031
954
|
schemaName: "remoteDetectionAlert";
|
|
1032
955
|
detectionDateStart: string;
|
|
1033
956
|
detectionDateEnd: string;
|
|
@@ -1043,9 +966,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
|
|
|
1043
966
|
updatedAt: string;
|
|
1044
967
|
links: string[];
|
|
1045
968
|
deleted: boolean;
|
|
1046
|
-
} &
|
|
1047
|
-
forks: string[];
|
|
1048
|
-
});
|
|
969
|
+
} & DerivedDocFields);
|
|
1049
970
|
[dataTagErrorSymbol]: Error;
|
|
1050
971
|
};
|
|
1051
972
|
};
|
|
@@ -1055,7 +976,7 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
|
|
|
1055
976
|
docType: D;
|
|
1056
977
|
versionId: string;
|
|
1057
978
|
lang?: string;
|
|
1058
|
-
}): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
979
|
+
}): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<({
|
|
1059
980
|
schemaName: "track";
|
|
1060
981
|
locations: import("@comapeo/schema/dist/schema/track.js").Position[];
|
|
1061
982
|
observationRefs: {
|
|
@@ -1076,7 +997,7 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
|
|
|
1076
997
|
updatedAt: string;
|
|
1077
998
|
links: string[];
|
|
1078
999
|
deleted: boolean;
|
|
1079
|
-
} | {
|
|
1000
|
+
} & DerivedDocFields) | ({
|
|
1080
1001
|
schemaName: "observation";
|
|
1081
1002
|
lat?: number | undefined;
|
|
1082
1003
|
lon?: number | undefined;
|
|
@@ -1106,7 +1027,7 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
|
|
|
1106
1027
|
updatedAt: string;
|
|
1107
1028
|
links: string[];
|
|
1108
1029
|
deleted: boolean;
|
|
1109
|
-
} | {
|
|
1030
|
+
} & DerivedDocFields) | ({
|
|
1110
1031
|
schemaName: "preset";
|
|
1111
1032
|
name: string;
|
|
1112
1033
|
geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
|
|
@@ -1130,7 +1051,7 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
|
|
|
1130
1051
|
updatedAt: string;
|
|
1131
1052
|
links: string[];
|
|
1132
1053
|
deleted: boolean;
|
|
1133
|
-
} | {
|
|
1054
|
+
} & DerivedDocFields) | ({
|
|
1134
1055
|
schemaName: "field";
|
|
1135
1056
|
tagKey: string;
|
|
1136
1057
|
type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
|
|
@@ -1151,7 +1072,7 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
|
|
|
1151
1072
|
updatedAt: string;
|
|
1152
1073
|
links: string[];
|
|
1153
1074
|
deleted: boolean;
|
|
1154
|
-
} | {
|
|
1075
|
+
} & DerivedDocFields) | ({
|
|
1155
1076
|
schemaName: "remoteDetectionAlert";
|
|
1156
1077
|
detectionDateStart: string;
|
|
1157
1078
|
detectionDateEnd: string;
|
|
@@ -1167,7 +1088,7 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
|
|
|
1167
1088
|
updatedAt: string;
|
|
1168
1089
|
links: string[];
|
|
1169
1090
|
deleted: boolean;
|
|
1170
|
-
}, Error, {
|
|
1091
|
+
} & DerivedDocFields), Error, ({
|
|
1171
1092
|
schemaName: "track";
|
|
1172
1093
|
locations: import("@comapeo/schema/dist/schema/track.js").Position[];
|
|
1173
1094
|
observationRefs: {
|
|
@@ -1188,7 +1109,7 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
|
|
|
1188
1109
|
updatedAt: string;
|
|
1189
1110
|
links: string[];
|
|
1190
1111
|
deleted: boolean;
|
|
1191
|
-
} | {
|
|
1112
|
+
} & DerivedDocFields) | ({
|
|
1192
1113
|
schemaName: "observation";
|
|
1193
1114
|
lat?: number | undefined;
|
|
1194
1115
|
lon?: number | undefined;
|
|
@@ -1218,7 +1139,7 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
|
|
|
1218
1139
|
updatedAt: string;
|
|
1219
1140
|
links: string[];
|
|
1220
1141
|
deleted: boolean;
|
|
1221
|
-
} | {
|
|
1142
|
+
} & DerivedDocFields) | ({
|
|
1222
1143
|
schemaName: "preset";
|
|
1223
1144
|
name: string;
|
|
1224
1145
|
geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
|
|
@@ -1242,7 +1163,7 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
|
|
|
1242
1163
|
updatedAt: string;
|
|
1243
1164
|
links: string[];
|
|
1244
1165
|
deleted: boolean;
|
|
1245
|
-
} | {
|
|
1166
|
+
} & DerivedDocFields) | ({
|
|
1246
1167
|
schemaName: "field";
|
|
1247
1168
|
tagKey: string;
|
|
1248
1169
|
type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
|
|
@@ -1263,7 +1184,7 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
|
|
|
1263
1184
|
updatedAt: string;
|
|
1264
1185
|
links: string[];
|
|
1265
1186
|
deleted: boolean;
|
|
1266
|
-
} | {
|
|
1187
|
+
} & DerivedDocFields) | ({
|
|
1267
1188
|
schemaName: "remoteDetectionAlert";
|
|
1268
1189
|
detectionDateStart: string;
|
|
1269
1190
|
detectionDateEnd: string;
|
|
@@ -1279,10 +1200,10 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
|
|
|
1279
1200
|
updatedAt: string;
|
|
1280
1201
|
links: string[];
|
|
1281
1202
|
deleted: boolean;
|
|
1282
|
-
}, readonly ["@comapeo/core-react", "projects", string, D, string, {
|
|
1203
|
+
} & DerivedDocFields), readonly ["@comapeo/core-react", "projects", string, D, string, {
|
|
1283
1204
|
readonly lang: string | undefined;
|
|
1284
1205
|
}]>, "queryFn"> & {
|
|
1285
|
-
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
1206
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<({
|
|
1286
1207
|
schemaName: "track";
|
|
1287
1208
|
locations: import("@comapeo/schema/dist/schema/track.js").Position[];
|
|
1288
1209
|
observationRefs: {
|
|
@@ -1303,7 +1224,7 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
|
|
|
1303
1224
|
updatedAt: string;
|
|
1304
1225
|
links: string[];
|
|
1305
1226
|
deleted: boolean;
|
|
1306
|
-
} | {
|
|
1227
|
+
} & DerivedDocFields) | ({
|
|
1307
1228
|
schemaName: "observation";
|
|
1308
1229
|
lat?: number | undefined;
|
|
1309
1230
|
lon?: number | undefined;
|
|
@@ -1333,7 +1254,7 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
|
|
|
1333
1254
|
updatedAt: string;
|
|
1334
1255
|
links: string[];
|
|
1335
1256
|
deleted: boolean;
|
|
1336
|
-
} | {
|
|
1257
|
+
} & DerivedDocFields) | ({
|
|
1337
1258
|
schemaName: "preset";
|
|
1338
1259
|
name: string;
|
|
1339
1260
|
geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
|
|
@@ -1357,7 +1278,7 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
|
|
|
1357
1278
|
updatedAt: string;
|
|
1358
1279
|
links: string[];
|
|
1359
1280
|
deleted: boolean;
|
|
1360
|
-
} | {
|
|
1281
|
+
} & DerivedDocFields) | ({
|
|
1361
1282
|
schemaName: "field";
|
|
1362
1283
|
tagKey: string;
|
|
1363
1284
|
type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
|
|
@@ -1378,7 +1299,7 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
|
|
|
1378
1299
|
updatedAt: string;
|
|
1379
1300
|
links: string[];
|
|
1380
1301
|
deleted: boolean;
|
|
1381
|
-
} | {
|
|
1302
|
+
} & DerivedDocFields) | ({
|
|
1382
1303
|
schemaName: "remoteDetectionAlert";
|
|
1383
1304
|
detectionDateStart: string;
|
|
1384
1305
|
detectionDateEnd: string;
|
|
@@ -1394,14 +1315,14 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
|
|
|
1394
1315
|
updatedAt: string;
|
|
1395
1316
|
links: string[];
|
|
1396
1317
|
deleted: boolean;
|
|
1397
|
-
}, readonly ["@comapeo/core-react", "projects", string, D, string, {
|
|
1318
|
+
} & DerivedDocFields), readonly ["@comapeo/core-react", "projects", string, D, string, {
|
|
1398
1319
|
readonly lang: string | undefined;
|
|
1399
1320
|
}], never> | undefined;
|
|
1400
1321
|
} & {
|
|
1401
1322
|
queryKey: readonly ["@comapeo/core-react", "projects", string, D, string, {
|
|
1402
1323
|
readonly lang: string | undefined;
|
|
1403
1324
|
}] & {
|
|
1404
|
-
[dataTagSymbol]: {
|
|
1325
|
+
[dataTagSymbol]: ({
|
|
1405
1326
|
schemaName: "track";
|
|
1406
1327
|
locations: import("@comapeo/schema/dist/schema/track.js").Position[];
|
|
1407
1328
|
observationRefs: {
|
|
@@ -1422,7 +1343,7 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
|
|
|
1422
1343
|
updatedAt: string;
|
|
1423
1344
|
links: string[];
|
|
1424
1345
|
deleted: boolean;
|
|
1425
|
-
} | {
|
|
1346
|
+
} & DerivedDocFields) | ({
|
|
1426
1347
|
schemaName: "observation";
|
|
1427
1348
|
lat?: number | undefined;
|
|
1428
1349
|
lon?: number | undefined;
|
|
@@ -1452,7 +1373,7 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
|
|
|
1452
1373
|
updatedAt: string;
|
|
1453
1374
|
links: string[];
|
|
1454
1375
|
deleted: boolean;
|
|
1455
|
-
} | {
|
|
1376
|
+
} & DerivedDocFields) | ({
|
|
1456
1377
|
schemaName: "preset";
|
|
1457
1378
|
name: string;
|
|
1458
1379
|
geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
|
|
@@ -1476,7 +1397,7 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
|
|
|
1476
1397
|
updatedAt: string;
|
|
1477
1398
|
links: string[];
|
|
1478
1399
|
deleted: boolean;
|
|
1479
|
-
} | {
|
|
1400
|
+
} & DerivedDocFields) | ({
|
|
1480
1401
|
schemaName: "field";
|
|
1481
1402
|
tagKey: string;
|
|
1482
1403
|
type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
|
|
@@ -1497,7 +1418,7 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
|
|
|
1497
1418
|
updatedAt: string;
|
|
1498
1419
|
links: string[];
|
|
1499
1420
|
deleted: boolean;
|
|
1500
|
-
} | {
|
|
1421
|
+
} & DerivedDocFields) | ({
|
|
1501
1422
|
schemaName: "remoteDetectionAlert";
|
|
1502
1423
|
detectionDateStart: string;
|
|
1503
1424
|
detectionDateEnd: string;
|
|
@@ -1513,52 +1434,46 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
|
|
|
1513
1434
|
updatedAt: string;
|
|
1514
1435
|
links: string[];
|
|
1515
1436
|
deleted: boolean;
|
|
1516
|
-
};
|
|
1437
|
+
} & DerivedDocFields);
|
|
1517
1438
|
[dataTagErrorSymbol]: Error;
|
|
1518
1439
|
};
|
|
1519
1440
|
};
|
|
1520
|
-
export declare function createDocumentMutationOptions<D extends WriteableDocumentType>({ docType, projectApi, projectId, queryClient, }: {
|
|
1441
|
+
export declare function createDocumentMutationOptions<D extends WriteableDocumentType, Result = WriteableDocument<D> & DerivedDocFields>({ docType, projectApi, projectId, queryClient, }: {
|
|
1521
1442
|
docType: D;
|
|
1522
1443
|
projectApi: MapeoProjectApi;
|
|
1523
1444
|
projectId: string;
|
|
1524
1445
|
queryClient: QueryClient;
|
|
1525
1446
|
}): {
|
|
1526
|
-
mutationFn: ({ value
|
|
1447
|
+
mutationFn: ({ value }: {
|
|
1527
1448
|
value: Omit<WriteableValue<D>, "schemaName">;
|
|
1528
|
-
}) => Promise<
|
|
1529
|
-
forks: Array<string>;
|
|
1530
|
-
}>;
|
|
1449
|
+
}) => Promise<Result>;
|
|
1531
1450
|
onSuccess: () => void;
|
|
1532
1451
|
networkMode: "always";
|
|
1533
1452
|
retry: false;
|
|
1534
1453
|
};
|
|
1535
|
-
export declare function updateDocumentMutationOptions<D extends WriteableDocumentType>({ docType, projectApi, projectId, queryClient, }: {
|
|
1454
|
+
export declare function updateDocumentMutationOptions<D extends WriteableDocumentType, Result = WriteableDocument<D> & DerivedDocFields>({ docType, projectApi, projectId, queryClient, }: {
|
|
1536
1455
|
docType: D;
|
|
1537
1456
|
projectApi: MapeoProjectApi;
|
|
1538
1457
|
projectId: string;
|
|
1539
1458
|
queryClient: QueryClient;
|
|
1540
1459
|
}): {
|
|
1541
|
-
mutationFn: ({ versionId, value
|
|
1460
|
+
mutationFn: ({ versionId, value }: {
|
|
1542
1461
|
versionId: string;
|
|
1543
1462
|
value: Omit<WriteableValue<D>, "schemaName">;
|
|
1544
|
-
}) => Promise<
|
|
1545
|
-
forks: Array<string>;
|
|
1546
|
-
}>;
|
|
1463
|
+
}) => Promise<Result>;
|
|
1547
1464
|
onSuccess: () => void;
|
|
1548
1465
|
networkMode: "always";
|
|
1549
1466
|
retry: false;
|
|
1550
1467
|
};
|
|
1551
|
-
export declare function deleteDocumentMutationOptions<D extends WriteableDocumentType>({ docType, projectApi, projectId, queryClient, }: {
|
|
1468
|
+
export declare function deleteDocumentMutationOptions<D extends WriteableDocumentType, Result = WriteableDocument<D> & DerivedDocFields>({ docType, projectApi, projectId, queryClient, }: {
|
|
1552
1469
|
docType: D;
|
|
1553
1470
|
projectApi: MapeoProjectApi;
|
|
1554
1471
|
projectId: string;
|
|
1555
1472
|
queryClient: QueryClient;
|
|
1556
1473
|
}): {
|
|
1557
|
-
mutationFn: ({ docId
|
|
1474
|
+
mutationFn: ({ docId }: {
|
|
1558
1475
|
docId: string;
|
|
1559
|
-
}) => Promise<
|
|
1560
|
-
forks: Array<string>;
|
|
1561
|
-
}>;
|
|
1476
|
+
}) => Promise<Result>;
|
|
1562
1477
|
onSuccess: () => void;
|
|
1563
1478
|
networkMode: "always";
|
|
1564
1479
|
retry: false;
|