@comapeo/core-react 1.1.0 → 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.
- package/dist/commonjs/hooks/client.d.ts +21 -0
- package/dist/commonjs/hooks/client.js +20 -0
- package/dist/commonjs/hooks/documents.d.ts +59 -4
- package/dist/commonjs/hooks/documents.js +54 -0
- package/dist/commonjs/hooks/invites.d.ts +51 -0
- package/dist/commonjs/hooks/invites.js +50 -0
- package/dist/commonjs/hooks/projects.d.ts +83 -0
- package/dist/commonjs/hooks/projects.js +62 -0
- package/dist/commonjs/index.d.ts +10 -9
- package/dist/commonjs/index.js +21 -21
- package/dist/commonjs/lib/react-query/client.d.ts +40 -9
- package/dist/commonjs/lib/react-query/client.js +32 -0
- package/dist/commonjs/lib/react-query/documents.d.ts +733 -650
- package/dist/commonjs/lib/react-query/documents.js +57 -0
- package/dist/commonjs/lib/react-query/invites.d.ts +63 -4
- package/dist/commonjs/lib/react-query/invites.js +63 -0
- package/dist/commonjs/lib/react-query/maps.d.ts +12 -3
- package/dist/commonjs/lib/react-query/maps.js +5 -1
- package/dist/commonjs/lib/react-query/projects.d.ts +183 -47
- package/dist/commonjs/lib/react-query/projects.js +88 -0
- package/dist/commonjs/lib/react-query/shared.d.ts +5 -1
- package/dist/commonjs/lib/react-query/shared.js +8 -1
- package/dist/esm/hooks/client.d.ts +21 -0
- package/dist/esm/hooks/client.js +20 -2
- package/dist/esm/hooks/documents.d.ts +59 -4
- package/dist/esm/hooks/documents.js +53 -2
- package/dist/esm/hooks/invites.d.ts +51 -0
- package/dist/esm/hooks/invites.js +44 -0
- package/dist/esm/hooks/projects.d.ts +83 -0
- package/dist/esm/hooks/projects.js +58 -2
- package/dist/esm/index.d.ts +10 -9
- package/dist/esm/index.js +10 -9
- package/dist/esm/lib/react-query/client.d.ts +40 -9
- package/dist/esm/lib/react-query/client.js +32 -2
- package/dist/esm/lib/react-query/documents.d.ts +733 -650
- package/dist/esm/lib/react-query/documents.js +56 -2
- package/dist/esm/lib/react-query/invites.d.ts +63 -4
- package/dist/esm/lib/react-query/invites.js +61 -2
- package/dist/esm/lib/react-query/maps.d.ts +12 -3
- package/dist/esm/lib/react-query/maps.js +5 -1
- package/dist/esm/lib/react-query/projects.d.ts +183 -47
- package/dist/esm/lib/react-query/projects.js +84 -2
- package/dist/esm/lib/react-query/shared.d.ts +5 -1
- package/dist/esm/lib/react-query/shared.js +7 -1
- package/docs/API.md +157 -258
- package/package.json +27 -28
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import type { MapeoProjectApi } from '@comapeo/ipc' with { 'resolution-mode': 'import' };
|
|
2
|
-
import type { MapeoDoc } from '@comapeo/schema' with { 'resolution-mode': 'import' };
|
|
3
|
-
|
|
4
|
-
export
|
|
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, }: {
|
|
5
12
|
projectId: string;
|
|
6
13
|
docType: D;
|
|
7
14
|
}): readonly ["@comapeo/core-react", "projects", string, D];
|
|
8
|
-
export declare function getManyDocumentsQueryKey<D extends
|
|
15
|
+
export declare function getManyDocumentsQueryKey<D extends WriteableDocumentType>({ projectId, docType, includeDeleted, lang, }: {
|
|
9
16
|
projectId: string;
|
|
10
17
|
docType: D;
|
|
11
18
|
includeDeleted?: boolean;
|
|
@@ -14,7 +21,7 @@ export declare function getManyDocumentsQueryKey<D extends DocumentType>({ proje
|
|
|
14
21
|
readonly includeDeleted: boolean | undefined;
|
|
15
22
|
readonly lang: string | undefined;
|
|
16
23
|
}];
|
|
17
|
-
export declare function getDocumentByDocIdQueryKey<D extends
|
|
24
|
+
export declare function getDocumentByDocIdQueryKey<D extends WriteableDocumentType>({ projectId, docType, docId, lang, }: {
|
|
18
25
|
projectId: string;
|
|
19
26
|
docType: D;
|
|
20
27
|
docId: string;
|
|
@@ -22,7 +29,7 @@ export declare function getDocumentByDocIdQueryKey<D extends DocumentType>({ pro
|
|
|
22
29
|
}): readonly ["@comapeo/core-react", "projects", string, D, string, {
|
|
23
30
|
readonly lang: string | undefined;
|
|
24
31
|
}];
|
|
25
|
-
export declare function getDocumentByVersionIdQueryKey<D extends
|
|
32
|
+
export declare function getDocumentByVersionIdQueryKey<D extends WriteableDocumentType>({ projectId, docType, versionId, lang, }: {
|
|
26
33
|
projectId: string;
|
|
27
34
|
docType: D;
|
|
28
35
|
versionId: string;
|
|
@@ -30,7 +37,7 @@ export declare function getDocumentByVersionIdQueryKey<D extends DocumentType>({
|
|
|
30
37
|
}): readonly ["@comapeo/core-react", "projects", string, D, string, {
|
|
31
38
|
readonly lang: string | undefined;
|
|
32
39
|
}];
|
|
33
|
-
export declare function documentsQueryOptions<D extends
|
|
40
|
+
export declare function documentsQueryOptions<D extends WriteableDocumentType>({ projectApi, projectId, docType, includeDeleted, lang, }: {
|
|
34
41
|
projectApi: MapeoProjectApi;
|
|
35
42
|
projectId: string;
|
|
36
43
|
docType: D;
|
|
@@ -56,14 +63,33 @@ export declare function documentsQueryOptions<D extends DocumentType>({ projectA
|
|
|
56
63
|
} & {
|
|
57
64
|
forks: string[];
|
|
58
65
|
})[] | ({
|
|
59
|
-
schemaName: "
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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: {
|
|
64
76
|
[k: string]: boolean | number | string | null | (boolean | number | string | null)[];
|
|
65
77
|
};
|
|
66
|
-
|
|
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;
|
|
67
93
|
docId: string;
|
|
68
94
|
versionId: string;
|
|
69
95
|
originalVersionId: string;
|
|
@@ -99,43 +125,6 @@ export declare function documentsQueryOptions<D extends DocumentType>({ projectA
|
|
|
99
125
|
deleted: boolean;
|
|
100
126
|
} & {
|
|
101
127
|
forks: string[];
|
|
102
|
-
})[] | ({
|
|
103
|
-
schemaName: "observation";
|
|
104
|
-
lat?: number | undefined;
|
|
105
|
-
lon?: number | undefined;
|
|
106
|
-
attachments: {
|
|
107
|
-
driveDiscoveryId: string;
|
|
108
|
-
name: string;
|
|
109
|
-
type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
|
|
110
|
-
hash: string;
|
|
111
|
-
}[];
|
|
112
|
-
tags: {
|
|
113
|
-
[k: string]: boolean | number | string | null | (boolean | number | string | null)[];
|
|
114
|
-
};
|
|
115
|
-
metadata?: {
|
|
116
|
-
manualLocation?: boolean;
|
|
117
|
-
position?: import("@comapeo/schema/dist/schema/observation.js").Position;
|
|
118
|
-
lastSavedPosition?: import("@comapeo/schema/dist/schema/observation.js").Position;
|
|
119
|
-
positionProvider?: {
|
|
120
|
-
gpsAvailable?: boolean;
|
|
121
|
-
passiveAvailable?: boolean;
|
|
122
|
-
locationServicesEnabled: boolean;
|
|
123
|
-
networkAvailable?: boolean;
|
|
124
|
-
};
|
|
125
|
-
} | undefined;
|
|
126
|
-
presetRef?: {
|
|
127
|
-
docId: string;
|
|
128
|
-
versionId: string;
|
|
129
|
-
} | undefined;
|
|
130
|
-
docId: string;
|
|
131
|
-
versionId: string;
|
|
132
|
-
originalVersionId: string;
|
|
133
|
-
createdAt: string;
|
|
134
|
-
updatedAt: string;
|
|
135
|
-
links: string[];
|
|
136
|
-
deleted: boolean;
|
|
137
|
-
} & {
|
|
138
|
-
forks: string[];
|
|
139
128
|
})[] | ({
|
|
140
129
|
schemaName: "field";
|
|
141
130
|
tagKey: string;
|
|
@@ -159,25 +148,6 @@ export declare function documentsQueryOptions<D extends DocumentType>({ projectA
|
|
|
159
148
|
deleted: boolean;
|
|
160
149
|
} & {
|
|
161
150
|
forks: string[];
|
|
162
|
-
})[], Error, ({
|
|
163
|
-
schemaName: "track";
|
|
164
|
-
locations: import("@comapeo/schema/dist/schema/track.js").Position[];
|
|
165
|
-
observationRefs: {
|
|
166
|
-
docId: string;
|
|
167
|
-
versionId: string;
|
|
168
|
-
}[];
|
|
169
|
-
tags: {
|
|
170
|
-
[k: string]: boolean | number | string | null | (boolean | number | string | null)[];
|
|
171
|
-
};
|
|
172
|
-
docId: string;
|
|
173
|
-
versionId: string;
|
|
174
|
-
originalVersionId: string;
|
|
175
|
-
createdAt: string;
|
|
176
|
-
updatedAt: string;
|
|
177
|
-
links: string[];
|
|
178
|
-
deleted: boolean;
|
|
179
|
-
} & {
|
|
180
|
-
forks: string[];
|
|
181
151
|
})[] | ({
|
|
182
152
|
schemaName: "remoteDetectionAlert";
|
|
183
153
|
detectionDateStart: string;
|
|
@@ -196,23 +166,16 @@ export declare function documentsQueryOptions<D extends DocumentType>({ projectA
|
|
|
196
166
|
deleted: boolean;
|
|
197
167
|
} & {
|
|
198
168
|
forks: string[];
|
|
199
|
-
})[]
|
|
200
|
-
schemaName: "
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
tags: import("@comapeo/schema/dist/schema/preset.js").Tags;
|
|
204
|
-
addTags: import("@comapeo/schema/dist/schema/preset.js").Tags1;
|
|
205
|
-
removeTags: import("@comapeo/schema/dist/schema/preset.js").Tags2;
|
|
206
|
-
fieldRefs: {
|
|
169
|
+
})[], Error, ({
|
|
170
|
+
schemaName: "track";
|
|
171
|
+
locations: import("@comapeo/schema/dist/schema/track.js").Position[];
|
|
172
|
+
observationRefs: {
|
|
207
173
|
docId: string;
|
|
208
174
|
versionId: string;
|
|
209
175
|
}[];
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
} | undefined;
|
|
214
|
-
terms: string[];
|
|
215
|
-
color?: string | undefined;
|
|
176
|
+
tags: {
|
|
177
|
+
[k: string]: boolean | number | string | null | (boolean | number | string | null)[];
|
|
178
|
+
};
|
|
216
179
|
docId: string;
|
|
217
180
|
versionId: string;
|
|
218
181
|
originalVersionId: string;
|
|
@@ -259,6 +222,32 @@ export declare function documentsQueryOptions<D extends DocumentType>({ projectA
|
|
|
259
222
|
deleted: boolean;
|
|
260
223
|
} & {
|
|
261
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[];
|
|
262
251
|
})[] | ({
|
|
263
252
|
schemaName: "field";
|
|
264
253
|
tagKey: string;
|
|
@@ -282,7 +271,28 @@ export declare function documentsQueryOptions<D extends DocumentType>({ projectA
|
|
|
282
271
|
deleted: boolean;
|
|
283
272
|
} & {
|
|
284
273
|
forks: string[];
|
|
285
|
-
})[]
|
|
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"> & {
|
|
286
296
|
queryFn?: import("@tanstack/react-query").QueryFunction<({
|
|
287
297
|
schemaName: "track";
|
|
288
298
|
locations: import("@comapeo/schema/dist/schema/track.js").Position[];
|
|
@@ -303,14 +313,33 @@ export declare function documentsQueryOptions<D extends DocumentType>({ projectA
|
|
|
303
313
|
} & {
|
|
304
314
|
forks: string[];
|
|
305
315
|
})[] | ({
|
|
306
|
-
schemaName: "
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
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: {
|
|
311
326
|
[k: string]: boolean | number | string | null | (boolean | number | string | null)[];
|
|
312
327
|
};
|
|
313
|
-
|
|
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;
|
|
314
343
|
docId: string;
|
|
315
344
|
versionId: string;
|
|
316
345
|
originalVersionId: string;
|
|
@@ -346,43 +375,6 @@ export declare function documentsQueryOptions<D extends DocumentType>({ projectA
|
|
|
346
375
|
deleted: boolean;
|
|
347
376
|
} & {
|
|
348
377
|
forks: string[];
|
|
349
|
-
})[] | ({
|
|
350
|
-
schemaName: "observation";
|
|
351
|
-
lat?: number | undefined;
|
|
352
|
-
lon?: number | undefined;
|
|
353
|
-
attachments: {
|
|
354
|
-
driveDiscoveryId: string;
|
|
355
|
-
name: string;
|
|
356
|
-
type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
|
|
357
|
-
hash: string;
|
|
358
|
-
}[];
|
|
359
|
-
tags: {
|
|
360
|
-
[k: string]: boolean | number | string | null | (boolean | number | string | null)[];
|
|
361
|
-
};
|
|
362
|
-
metadata?: {
|
|
363
|
-
manualLocation?: boolean;
|
|
364
|
-
position?: import("@comapeo/schema/dist/schema/observation.js").Position;
|
|
365
|
-
lastSavedPosition?: import("@comapeo/schema/dist/schema/observation.js").Position;
|
|
366
|
-
positionProvider?: {
|
|
367
|
-
gpsAvailable?: boolean;
|
|
368
|
-
passiveAvailable?: boolean;
|
|
369
|
-
locationServicesEnabled: boolean;
|
|
370
|
-
networkAvailable?: boolean;
|
|
371
|
-
};
|
|
372
|
-
} | undefined;
|
|
373
|
-
presetRef?: {
|
|
374
|
-
docId: string;
|
|
375
|
-
versionId: string;
|
|
376
|
-
} | undefined;
|
|
377
|
-
docId: string;
|
|
378
|
-
versionId: string;
|
|
379
|
-
originalVersionId: string;
|
|
380
|
-
createdAt: string;
|
|
381
|
-
updatedAt: string;
|
|
382
|
-
links: string[];
|
|
383
|
-
deleted: boolean;
|
|
384
|
-
} & {
|
|
385
|
-
forks: string[];
|
|
386
378
|
})[] | ({
|
|
387
379
|
schemaName: "field";
|
|
388
380
|
tagKey: string;
|
|
@@ -406,27 +398,6 @@ export declare function documentsQueryOptions<D extends DocumentType>({ projectA
|
|
|
406
398
|
deleted: boolean;
|
|
407
399
|
} & {
|
|
408
400
|
forks: string[];
|
|
409
|
-
})[], import("@tanstack/react-query").QueryKey, never> | undefined;
|
|
410
|
-
} & {
|
|
411
|
-
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, ({
|
|
412
|
-
schemaName: "track";
|
|
413
|
-
locations: import("@comapeo/schema/dist/schema/track.js").Position[];
|
|
414
|
-
observationRefs: {
|
|
415
|
-
docId: string;
|
|
416
|
-
versionId: string;
|
|
417
|
-
}[];
|
|
418
|
-
tags: {
|
|
419
|
-
[k: string]: boolean | number | string | null | (boolean | number | string | null)[];
|
|
420
|
-
};
|
|
421
|
-
docId: string;
|
|
422
|
-
versionId: string;
|
|
423
|
-
originalVersionId: string;
|
|
424
|
-
createdAt: string;
|
|
425
|
-
updatedAt: string;
|
|
426
|
-
links: string[];
|
|
427
|
-
deleted: boolean;
|
|
428
|
-
} & {
|
|
429
|
-
forks: string[];
|
|
430
401
|
})[] | ({
|
|
431
402
|
schemaName: "remoteDetectionAlert";
|
|
432
403
|
detectionDateStart: string;
|
|
@@ -445,95 +416,143 @@ export declare function documentsQueryOptions<D extends DocumentType>({ projectA
|
|
|
445
416
|
deleted: boolean;
|
|
446
417
|
} & {
|
|
447
418
|
forks: string[];
|
|
448
|
-
})[]
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
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
|
+
};
|
|
456
438
|
docId: string;
|
|
457
439
|
versionId: string;
|
|
458
|
-
|
|
459
|
-
|
|
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;
|
|
460
475
|
docId: string;
|
|
461
476
|
versionId: string;
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
deleted: boolean;
|
|
472
|
-
} & {
|
|
473
|
-
forks: string[];
|
|
474
|
-
})[] | ({
|
|
475
|
-
schemaName: "observation";
|
|
476
|
-
lat?: number | undefined;
|
|
477
|
-
lon?: number | undefined;
|
|
478
|
-
attachments: {
|
|
479
|
-
driveDiscoveryId: string;
|
|
477
|
+
originalVersionId: string;
|
|
478
|
+
createdAt: string;
|
|
479
|
+
updatedAt: string;
|
|
480
|
+
links: string[];
|
|
481
|
+
deleted: boolean;
|
|
482
|
+
} & {
|
|
483
|
+
forks: string[];
|
|
484
|
+
})[] | ({
|
|
485
|
+
schemaName: "preset";
|
|
480
486
|
name: string;
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
networkAvailable?: boolean;
|
|
496
|
-
};
|
|
497
|
-
} | undefined;
|
|
498
|
-
presetRef?: {
|
|
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;
|
|
499
501
|
docId: string;
|
|
500
502
|
versionId: string;
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
schemaName: "field";
|
|
513
|
-
tagKey: string;
|
|
514
|
-
type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
|
|
515
|
-
label: string;
|
|
516
|
-
appearance?: ("appearance_unspecified" | "singleline" | "multiline" | "UNRECOGNIZED") | undefined;
|
|
517
|
-
snakeCase?: boolean | undefined;
|
|
518
|
-
options?: {
|
|
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";
|
|
519
514
|
label: string;
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
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
|
+
};
|
|
535
554
|
};
|
|
536
|
-
export declare function documentByDocumentIdQueryOptions<D extends
|
|
555
|
+
export declare function documentByDocumentIdQueryOptions<D extends WriteableDocumentType>({ projectApi, projectId, docType, docId, lang, }: {
|
|
537
556
|
projectApi: MapeoProjectApi;
|
|
538
557
|
projectId: string;
|
|
539
558
|
docType: D;
|
|
@@ -559,14 +578,33 @@ export declare function documentByDocumentIdQueryOptions<D extends DocumentType>
|
|
|
559
578
|
} & {
|
|
560
579
|
forks: string[];
|
|
561
580
|
}) | ({
|
|
562
|
-
schemaName: "
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
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: {
|
|
567
591
|
[k: string]: boolean | number | string | null | (boolean | number | string | null)[];
|
|
568
592
|
};
|
|
569
|
-
|
|
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;
|
|
570
608
|
docId: string;
|
|
571
609
|
versionId: string;
|
|
572
610
|
originalVersionId: string;
|
|
@@ -602,43 +640,6 @@ export declare function documentByDocumentIdQueryOptions<D extends DocumentType>
|
|
|
602
640
|
deleted: boolean;
|
|
603
641
|
} & {
|
|
604
642
|
forks: string[];
|
|
605
|
-
}) | ({
|
|
606
|
-
schemaName: "observation";
|
|
607
|
-
lat?: number | undefined;
|
|
608
|
-
lon?: number | undefined;
|
|
609
|
-
attachments: {
|
|
610
|
-
driveDiscoveryId: string;
|
|
611
|
-
name: string;
|
|
612
|
-
type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
|
|
613
|
-
hash: string;
|
|
614
|
-
}[];
|
|
615
|
-
tags: {
|
|
616
|
-
[k: string]: boolean | number | string | null | (boolean | number | string | null)[];
|
|
617
|
-
};
|
|
618
|
-
metadata?: {
|
|
619
|
-
manualLocation?: boolean;
|
|
620
|
-
position?: import("@comapeo/schema/dist/schema/observation.js").Position;
|
|
621
|
-
lastSavedPosition?: import("@comapeo/schema/dist/schema/observation.js").Position;
|
|
622
|
-
positionProvider?: {
|
|
623
|
-
gpsAvailable?: boolean;
|
|
624
|
-
passiveAvailable?: boolean;
|
|
625
|
-
locationServicesEnabled: boolean;
|
|
626
|
-
networkAvailable?: boolean;
|
|
627
|
-
};
|
|
628
|
-
} | undefined;
|
|
629
|
-
presetRef?: {
|
|
630
|
-
docId: string;
|
|
631
|
-
versionId: string;
|
|
632
|
-
} | undefined;
|
|
633
|
-
docId: string;
|
|
634
|
-
versionId: string;
|
|
635
|
-
originalVersionId: string;
|
|
636
|
-
createdAt: string;
|
|
637
|
-
updatedAt: string;
|
|
638
|
-
links: string[];
|
|
639
|
-
deleted: boolean;
|
|
640
|
-
} & {
|
|
641
|
-
forks: string[];
|
|
642
643
|
}) | ({
|
|
643
644
|
schemaName: "field";
|
|
644
645
|
tagKey: string;
|
|
@@ -662,25 +663,6 @@ export declare function documentByDocumentIdQueryOptions<D extends DocumentType>
|
|
|
662
663
|
deleted: boolean;
|
|
663
664
|
} & {
|
|
664
665
|
forks: string[];
|
|
665
|
-
}), Error, ({
|
|
666
|
-
schemaName: "track";
|
|
667
|
-
locations: import("@comapeo/schema/dist/schema/track.js").Position[];
|
|
668
|
-
observationRefs: {
|
|
669
|
-
docId: string;
|
|
670
|
-
versionId: string;
|
|
671
|
-
}[];
|
|
672
|
-
tags: {
|
|
673
|
-
[k: string]: boolean | number | string | null | (boolean | number | string | null)[];
|
|
674
|
-
};
|
|
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
666
|
}) | ({
|
|
685
667
|
schemaName: "remoteDetectionAlert";
|
|
686
668
|
detectionDateStart: string;
|
|
@@ -699,23 +681,16 @@ export declare function documentByDocumentIdQueryOptions<D extends DocumentType>
|
|
|
699
681
|
deleted: boolean;
|
|
700
682
|
} & {
|
|
701
683
|
forks: string[];
|
|
702
|
-
})
|
|
703
|
-
schemaName: "
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
tags: import("@comapeo/schema/dist/schema/preset.js").Tags;
|
|
707
|
-
addTags: import("@comapeo/schema/dist/schema/preset.js").Tags1;
|
|
708
|
-
removeTags: import("@comapeo/schema/dist/schema/preset.js").Tags2;
|
|
709
|
-
fieldRefs: {
|
|
684
|
+
}), Error, ({
|
|
685
|
+
schemaName: "track";
|
|
686
|
+
locations: import("@comapeo/schema/dist/schema/track.js").Position[];
|
|
687
|
+
observationRefs: {
|
|
710
688
|
docId: string;
|
|
711
689
|
versionId: string;
|
|
712
690
|
}[];
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
} | undefined;
|
|
717
|
-
terms: string[];
|
|
718
|
-
color?: string | undefined;
|
|
691
|
+
tags: {
|
|
692
|
+
[k: string]: boolean | number | string | null | (boolean | number | string | null)[];
|
|
693
|
+
};
|
|
719
694
|
docId: string;
|
|
720
695
|
versionId: string;
|
|
721
696
|
originalVersionId: string;
|
|
@@ -762,6 +737,32 @@ export declare function documentByDocumentIdQueryOptions<D extends DocumentType>
|
|
|
762
737
|
deleted: boolean;
|
|
763
738
|
} & {
|
|
764
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[];
|
|
765
766
|
}) | ({
|
|
766
767
|
schemaName: "field";
|
|
767
768
|
tagKey: string;
|
|
@@ -785,7 +786,27 @@ export declare function documentByDocumentIdQueryOptions<D extends DocumentType>
|
|
|
785
786
|
deleted: boolean;
|
|
786
787
|
} & {
|
|
787
788
|
forks: string[];
|
|
788
|
-
})
|
|
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"> & {
|
|
789
810
|
queryFn?: import("@tanstack/react-query").QueryFunction<({
|
|
790
811
|
schemaName: "track";
|
|
791
812
|
locations: import("@comapeo/schema/dist/schema/track.js").Position[];
|
|
@@ -806,14 +827,33 @@ export declare function documentByDocumentIdQueryOptions<D extends DocumentType>
|
|
|
806
827
|
} & {
|
|
807
828
|
forks: string[];
|
|
808
829
|
}) | ({
|
|
809
|
-
schemaName: "
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
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: {
|
|
814
840
|
[k: string]: boolean | number | string | null | (boolean | number | string | null)[];
|
|
815
841
|
};
|
|
816
|
-
|
|
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;
|
|
817
857
|
docId: string;
|
|
818
858
|
versionId: string;
|
|
819
859
|
originalVersionId: string;
|
|
@@ -849,43 +889,6 @@ export declare function documentByDocumentIdQueryOptions<D extends DocumentType>
|
|
|
849
889
|
deleted: boolean;
|
|
850
890
|
} & {
|
|
851
891
|
forks: string[];
|
|
852
|
-
}) | ({
|
|
853
|
-
schemaName: "observation";
|
|
854
|
-
lat?: number | undefined;
|
|
855
|
-
lon?: number | undefined;
|
|
856
|
-
attachments: {
|
|
857
|
-
driveDiscoveryId: string;
|
|
858
|
-
name: string;
|
|
859
|
-
type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
|
|
860
|
-
hash: string;
|
|
861
|
-
}[];
|
|
862
|
-
tags: {
|
|
863
|
-
[k: string]: boolean | number | string | null | (boolean | number | string | null)[];
|
|
864
|
-
};
|
|
865
|
-
metadata?: {
|
|
866
|
-
manualLocation?: boolean;
|
|
867
|
-
position?: import("@comapeo/schema/dist/schema/observation.js").Position;
|
|
868
|
-
lastSavedPosition?: import("@comapeo/schema/dist/schema/observation.js").Position;
|
|
869
|
-
positionProvider?: {
|
|
870
|
-
gpsAvailable?: boolean;
|
|
871
|
-
passiveAvailable?: boolean;
|
|
872
|
-
locationServicesEnabled: boolean;
|
|
873
|
-
networkAvailable?: boolean;
|
|
874
|
-
};
|
|
875
|
-
} | undefined;
|
|
876
|
-
presetRef?: {
|
|
877
|
-
docId: string;
|
|
878
|
-
versionId: string;
|
|
879
|
-
} | undefined;
|
|
880
|
-
docId: string;
|
|
881
|
-
versionId: string;
|
|
882
|
-
originalVersionId: string;
|
|
883
|
-
createdAt: string;
|
|
884
|
-
updatedAt: string;
|
|
885
|
-
links: string[];
|
|
886
|
-
deleted: boolean;
|
|
887
|
-
} & {
|
|
888
|
-
forks: string[];
|
|
889
892
|
}) | ({
|
|
890
893
|
schemaName: "field";
|
|
891
894
|
tagKey: string;
|
|
@@ -909,27 +912,6 @@ export declare function documentByDocumentIdQueryOptions<D extends DocumentType>
|
|
|
909
912
|
deleted: boolean;
|
|
910
913
|
} & {
|
|
911
914
|
forks: string[];
|
|
912
|
-
}), import("@tanstack/react-query").QueryKey, never> | undefined;
|
|
913
|
-
} & {
|
|
914
|
-
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, ({
|
|
915
|
-
schemaName: "track";
|
|
916
|
-
locations: import("@comapeo/schema/dist/schema/track.js").Position[];
|
|
917
|
-
observationRefs: {
|
|
918
|
-
docId: string;
|
|
919
|
-
versionId: string;
|
|
920
|
-
}[];
|
|
921
|
-
tags: {
|
|
922
|
-
[k: string]: boolean | number | string | null | (boolean | number | string | null)[];
|
|
923
|
-
};
|
|
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
915
|
}) | ({
|
|
934
916
|
schemaName: "remoteDetectionAlert";
|
|
935
917
|
detectionDateStart: string;
|
|
@@ -948,95 +930,141 @@ export declare function documentByDocumentIdQueryOptions<D extends DocumentType>
|
|
|
948
930
|
deleted: boolean;
|
|
949
931
|
} & {
|
|
950
932
|
forks: string[];
|
|
951
|
-
})
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
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
|
+
};
|
|
959
950
|
docId: string;
|
|
960
951
|
versionId: string;
|
|
961
|
-
|
|
962
|
-
|
|
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;
|
|
963
987
|
docId: string;
|
|
964
988
|
versionId: string;
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
deleted: boolean;
|
|
975
|
-
} & {
|
|
976
|
-
forks: string[];
|
|
977
|
-
}) | ({
|
|
978
|
-
schemaName: "observation";
|
|
979
|
-
lat?: number | undefined;
|
|
980
|
-
lon?: number | undefined;
|
|
981
|
-
attachments: {
|
|
982
|
-
driveDiscoveryId: string;
|
|
989
|
+
originalVersionId: string;
|
|
990
|
+
createdAt: string;
|
|
991
|
+
updatedAt: string;
|
|
992
|
+
links: string[];
|
|
993
|
+
deleted: boolean;
|
|
994
|
+
} & {
|
|
995
|
+
forks: string[];
|
|
996
|
+
}) | ({
|
|
997
|
+
schemaName: "preset";
|
|
983
998
|
name: string;
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
networkAvailable?: boolean;
|
|
999
|
-
};
|
|
1000
|
-
} | undefined;
|
|
1001
|
-
presetRef?: {
|
|
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;
|
|
1002
1013
|
docId: string;
|
|
1003
1014
|
versionId: string;
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
schemaName: "field";
|
|
1016
|
-
tagKey: string;
|
|
1017
|
-
type: "type_unspecified" | "text" | "number" | "selectOne" | "selectMultiple" | "UNRECOGNIZED";
|
|
1018
|
-
label: string;
|
|
1019
|
-
appearance?: ("appearance_unspecified" | "singleline" | "multiline" | "UNRECOGNIZED") | undefined;
|
|
1020
|
-
snakeCase?: boolean | undefined;
|
|
1021
|
-
options?: {
|
|
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";
|
|
1022
1026
|
label: string;
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
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
|
+
};
|
|
1038
1066
|
};
|
|
1039
|
-
export declare function documentByVersionIdQueryOptions<D extends
|
|
1067
|
+
export declare function documentByVersionIdQueryOptions<D extends WriteableDocumentType>({ projectApi, projectId, docType, versionId, lang, }: {
|
|
1040
1068
|
projectApi: MapeoProjectApi;
|
|
1041
1069
|
projectId: string;
|
|
1042
1070
|
docType: D;
|
|
@@ -1059,46 +1087,6 @@ export declare function documentByVersionIdQueryOptions<D extends DocumentType>(
|
|
|
1059
1087
|
updatedAt: string;
|
|
1060
1088
|
links: string[];
|
|
1061
1089
|
deleted: boolean;
|
|
1062
|
-
} | {
|
|
1063
|
-
schemaName: "remoteDetectionAlert";
|
|
1064
|
-
detectionDateStart: string;
|
|
1065
|
-
detectionDateEnd: string;
|
|
1066
|
-
sourceId: string;
|
|
1067
|
-
metadata: {
|
|
1068
|
-
[k: string]: boolean | number | string | null | (boolean | number | string | null)[];
|
|
1069
|
-
};
|
|
1070
|
-
geometry: import("@comapeo/schema/dist/schema/remoteDetectionAlert.js").Geometry;
|
|
1071
|
-
docId: string;
|
|
1072
|
-
versionId: string;
|
|
1073
|
-
originalVersionId: string;
|
|
1074
|
-
createdAt: string;
|
|
1075
|
-
updatedAt: string;
|
|
1076
|
-
links: string[];
|
|
1077
|
-
deleted: boolean;
|
|
1078
|
-
} | {
|
|
1079
|
-
schemaName: "preset";
|
|
1080
|
-
name: string;
|
|
1081
|
-
geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
|
|
1082
|
-
tags: import("@comapeo/schema/dist/schema/preset.js").Tags;
|
|
1083
|
-
addTags: import("@comapeo/schema/dist/schema/preset.js").Tags1;
|
|
1084
|
-
removeTags: import("@comapeo/schema/dist/schema/preset.js").Tags2;
|
|
1085
|
-
fieldRefs: {
|
|
1086
|
-
docId: string;
|
|
1087
|
-
versionId: string;
|
|
1088
|
-
}[];
|
|
1089
|
-
iconRef?: {
|
|
1090
|
-
docId: string;
|
|
1091
|
-
versionId: string;
|
|
1092
|
-
} | undefined;
|
|
1093
|
-
terms: string[];
|
|
1094
|
-
color?: string | undefined;
|
|
1095
|
-
docId: string;
|
|
1096
|
-
versionId: string;
|
|
1097
|
-
originalVersionId: string;
|
|
1098
|
-
createdAt: string;
|
|
1099
|
-
updatedAt: string;
|
|
1100
|
-
links: string[];
|
|
1101
|
-
deleted: boolean;
|
|
1102
1090
|
} | {
|
|
1103
1091
|
schemaName: "observation";
|
|
1104
1092
|
lat?: number | undefined;
|
|
@@ -1134,6 +1122,30 @@ export declare function documentByVersionIdQueryOptions<D extends DocumentType>(
|
|
|
1134
1122
|
updatedAt: string;
|
|
1135
1123
|
links: string[];
|
|
1136
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;
|
|
1137
1149
|
} | {
|
|
1138
1150
|
schemaName: "field";
|
|
1139
1151
|
tagKey: string;
|
|
@@ -1155,23 +1167,6 @@ export declare function documentByVersionIdQueryOptions<D extends DocumentType>(
|
|
|
1155
1167
|
updatedAt: string;
|
|
1156
1168
|
links: string[];
|
|
1157
1169
|
deleted: boolean;
|
|
1158
|
-
}, Error, {
|
|
1159
|
-
schemaName: "track";
|
|
1160
|
-
locations: import("@comapeo/schema/dist/schema/track.js").Position[];
|
|
1161
|
-
observationRefs: {
|
|
1162
|
-
docId: string;
|
|
1163
|
-
versionId: string;
|
|
1164
|
-
}[];
|
|
1165
|
-
tags: {
|
|
1166
|
-
[k: string]: boolean | number | string | null | (boolean | number | string | null)[];
|
|
1167
|
-
};
|
|
1168
|
-
docId: string;
|
|
1169
|
-
versionId: string;
|
|
1170
|
-
originalVersionId: string;
|
|
1171
|
-
createdAt: string;
|
|
1172
|
-
updatedAt: string;
|
|
1173
|
-
links: string[];
|
|
1174
|
-
deleted: boolean;
|
|
1175
1170
|
} | {
|
|
1176
1171
|
schemaName: "remoteDetectionAlert";
|
|
1177
1172
|
detectionDateStart: string;
|
|
@@ -1188,23 +1183,16 @@ export declare function documentByVersionIdQueryOptions<D extends DocumentType>(
|
|
|
1188
1183
|
updatedAt: string;
|
|
1189
1184
|
links: string[];
|
|
1190
1185
|
deleted: boolean;
|
|
1191
|
-
}
|
|
1192
|
-
schemaName: "
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
tags: import("@comapeo/schema/dist/schema/preset.js").Tags;
|
|
1196
|
-
addTags: import("@comapeo/schema/dist/schema/preset.js").Tags1;
|
|
1197
|
-
removeTags: import("@comapeo/schema/dist/schema/preset.js").Tags2;
|
|
1198
|
-
fieldRefs: {
|
|
1186
|
+
}, Error, {
|
|
1187
|
+
schemaName: "track";
|
|
1188
|
+
locations: import("@comapeo/schema/dist/schema/track.js").Position[];
|
|
1189
|
+
observationRefs: {
|
|
1199
1190
|
docId: string;
|
|
1200
1191
|
versionId: string;
|
|
1201
1192
|
}[];
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
} | undefined;
|
|
1206
|
-
terms: string[];
|
|
1207
|
-
color?: string | undefined;
|
|
1193
|
+
tags: {
|
|
1194
|
+
[k: string]: boolean | number | string | null | (boolean | number | string | null)[];
|
|
1195
|
+
};
|
|
1208
1196
|
docId: string;
|
|
1209
1197
|
versionId: string;
|
|
1210
1198
|
originalVersionId: string;
|
|
@@ -1247,6 +1235,30 @@ export declare function documentByVersionIdQueryOptions<D extends DocumentType>(
|
|
|
1247
1235
|
updatedAt: string;
|
|
1248
1236
|
links: string[];
|
|
1249
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;
|
|
1250
1262
|
} | {
|
|
1251
1263
|
schemaName: "field";
|
|
1252
1264
|
tagKey: string;
|
|
@@ -1268,7 +1280,25 @@ export declare function documentByVersionIdQueryOptions<D extends DocumentType>(
|
|
|
1268
1280
|
updatedAt: string;
|
|
1269
1281
|
links: string[];
|
|
1270
1282
|
deleted: boolean;
|
|
1271
|
-
}
|
|
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"> & {
|
|
1272
1302
|
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
1273
1303
|
schemaName: "track";
|
|
1274
1304
|
locations: import("@comapeo/schema/dist/schema/track.js").Position[];
|
|
@@ -1286,46 +1316,6 @@ export declare function documentByVersionIdQueryOptions<D extends DocumentType>(
|
|
|
1286
1316
|
updatedAt: string;
|
|
1287
1317
|
links: string[];
|
|
1288
1318
|
deleted: boolean;
|
|
1289
|
-
} | {
|
|
1290
|
-
schemaName: "remoteDetectionAlert";
|
|
1291
|
-
detectionDateStart: string;
|
|
1292
|
-
detectionDateEnd: string;
|
|
1293
|
-
sourceId: string;
|
|
1294
|
-
metadata: {
|
|
1295
|
-
[k: string]: boolean | number | string | null | (boolean | number | string | null)[];
|
|
1296
|
-
};
|
|
1297
|
-
geometry: import("@comapeo/schema/dist/schema/remoteDetectionAlert.js").Geometry;
|
|
1298
|
-
docId: string;
|
|
1299
|
-
versionId: string;
|
|
1300
|
-
originalVersionId: string;
|
|
1301
|
-
createdAt: string;
|
|
1302
|
-
updatedAt: string;
|
|
1303
|
-
links: string[];
|
|
1304
|
-
deleted: boolean;
|
|
1305
|
-
} | {
|
|
1306
|
-
schemaName: "preset";
|
|
1307
|
-
name: string;
|
|
1308
|
-
geometry: ("point" | "vertex" | "line" | "area" | "relation")[];
|
|
1309
|
-
tags: import("@comapeo/schema/dist/schema/preset.js").Tags;
|
|
1310
|
-
addTags: import("@comapeo/schema/dist/schema/preset.js").Tags1;
|
|
1311
|
-
removeTags: import("@comapeo/schema/dist/schema/preset.js").Tags2;
|
|
1312
|
-
fieldRefs: {
|
|
1313
|
-
docId: string;
|
|
1314
|
-
versionId: string;
|
|
1315
|
-
}[];
|
|
1316
|
-
iconRef?: {
|
|
1317
|
-
docId: string;
|
|
1318
|
-
versionId: string;
|
|
1319
|
-
} | undefined;
|
|
1320
|
-
terms: string[];
|
|
1321
|
-
color?: string | undefined;
|
|
1322
|
-
docId: string;
|
|
1323
|
-
versionId: string;
|
|
1324
|
-
originalVersionId: string;
|
|
1325
|
-
createdAt: string;
|
|
1326
|
-
updatedAt: string;
|
|
1327
|
-
links: string[];
|
|
1328
|
-
deleted: boolean;
|
|
1329
1319
|
} | {
|
|
1330
1320
|
schemaName: "observation";
|
|
1331
1321
|
lat?: number | undefined;
|
|
@@ -1361,6 +1351,30 @@ export declare function documentByVersionIdQueryOptions<D extends DocumentType>(
|
|
|
1361
1351
|
updatedAt: string;
|
|
1362
1352
|
links: string[];
|
|
1363
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;
|
|
1364
1378
|
} | {
|
|
1365
1379
|
schemaName: "field";
|
|
1366
1380
|
tagKey: string;
|
|
@@ -1382,25 +1396,6 @@ export declare function documentByVersionIdQueryOptions<D extends DocumentType>(
|
|
|
1382
1396
|
updatedAt: string;
|
|
1383
1397
|
links: string[];
|
|
1384
1398
|
deleted: boolean;
|
|
1385
|
-
}, import("@tanstack/react-query").QueryKey, never> | undefined;
|
|
1386
|
-
} & {
|
|
1387
|
-
queryKey: import("@tanstack/react-query").DataTag<import("@tanstack/react-query").QueryKey, {
|
|
1388
|
-
schemaName: "track";
|
|
1389
|
-
locations: import("@comapeo/schema/dist/schema/track.js").Position[];
|
|
1390
|
-
observationRefs: {
|
|
1391
|
-
docId: string;
|
|
1392
|
-
versionId: string;
|
|
1393
|
-
}[];
|
|
1394
|
-
tags: {
|
|
1395
|
-
[k: string]: boolean | number | string | null | (boolean | number | string | null)[];
|
|
1396
|
-
};
|
|
1397
|
-
docId: string;
|
|
1398
|
-
versionId: string;
|
|
1399
|
-
originalVersionId: string;
|
|
1400
|
-
createdAt: string;
|
|
1401
|
-
updatedAt: string;
|
|
1402
|
-
links: string[];
|
|
1403
|
-
deleted: boolean;
|
|
1404
1399
|
} | {
|
|
1405
1400
|
schemaName: "remoteDetectionAlert";
|
|
1406
1401
|
detectionDateStart: string;
|
|
@@ -1417,85 +1412,173 @@ export declare function documentByVersionIdQueryOptions<D extends DocumentType>(
|
|
|
1417
1412
|
updatedAt: string;
|
|
1418
1413
|
links: string[];
|
|
1419
1414
|
deleted: boolean;
|
|
1420
|
-
}
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
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
|
+
};
|
|
1428
1432
|
docId: string;
|
|
1429
1433
|
versionId: string;
|
|
1430
|
-
|
|
1431
|
-
|
|
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;
|
|
1432
1467
|
docId: string;
|
|
1433
1468
|
versionId: string;
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
updatedAt: string;
|
|
1442
|
-
links: string[];
|
|
1443
|
-
deleted: boolean;
|
|
1444
|
-
} | {
|
|
1445
|
-
schemaName: "observation";
|
|
1446
|
-
lat?: number | undefined;
|
|
1447
|
-
lon?: number | undefined;
|
|
1448
|
-
attachments: {
|
|
1449
|
-
driveDiscoveryId: string;
|
|
1469
|
+
originalVersionId: string;
|
|
1470
|
+
createdAt: string;
|
|
1471
|
+
updatedAt: string;
|
|
1472
|
+
links: string[];
|
|
1473
|
+
deleted: boolean;
|
|
1474
|
+
} | {
|
|
1475
|
+
schemaName: "preset";
|
|
1450
1476
|
name: string;
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
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)[];
|
|
1466
1526
|
};
|
|
1467
|
-
|
|
1468
|
-
presetRef?: {
|
|
1527
|
+
geometry: import("@comapeo/schema/dist/schema/remoteDetectionAlert.js").Geometry;
|
|
1469
1528
|
docId: string;
|
|
1470
1529
|
versionId: string;
|
|
1471
|
-
|
|
1472
|
-
|
|
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, }: {
|
|
1473
1561
|
versionId: string;
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
}[] | undefined;
|
|
1490
|
-
universal?: boolean | undefined;
|
|
1491
|
-
placeholder?: string | undefined;
|
|
1492
|
-
helperText?: string | undefined;
|
|
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, }: {
|
|
1493
1577
|
docId: string;
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
createdAt: string;
|
|
1497
|
-
updatedAt: string;
|
|
1498
|
-
links: string[];
|
|
1499
|
-
deleted: boolean;
|
|
1578
|
+
}) => Promise<WriteableDocument<D> & {
|
|
1579
|
+
forks: Array<string>;
|
|
1500
1580
|
}>;
|
|
1581
|
+
onSuccess: () => void;
|
|
1582
|
+
networkMode: "always";
|
|
1583
|
+
retry: false;
|
|
1501
1584
|
};
|