@comapeo/core-react 4.2.1 → 5.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.
@@ -1,6 +1,8 @@
1
1
  import type { MapeoClientApi } from '@comapeo/ipc' with { 'resolution-mode': 'import' };
2
2
  import { type JSX, type ReactNode } from 'react';
3
- export declare const ClientApiContext: import("react").Context<import("@comapeo/ipc/dist/client.js", { with: { "resolution-mode": "import" } }).MapeoClientApi | null>;
3
+ export declare const ClientApiContext: import("react").Context<import("rpc-reflector/lib/types").ClientApi<Omit<import("@comapeo/core", { with: { "resolution-mode": "import" } }).MapeoManager, "getProject"> & {
4
+ getProject: (projectPublicId: string) => Promise<import("@comapeo/ipc/dist/client.js", { with: { "resolution-mode": "import" } }).MapeoProjectApi>;
5
+ }> | null>;
4
6
  /**
5
7
  * Create a context provider that holds a CoMapeo API client instance.
6
8
  *
@@ -23,7 +23,9 @@
23
23
  * ```
24
24
  *
25
25
  */
26
- export declare function useClientApi(): import("@comapeo/ipc/dist/client.js", { with: { "resolution-mode": "import" } }).MapeoClientApi;
26
+ export declare function useClientApi(): import("rpc-reflector/lib/types.js").ClientApi<Omit<import("@comapeo/core", { with: { "resolution-mode": "import" } }).MapeoManager, "getProject"> & {
27
+ getProject: (projectPublicId: string) => Promise<import("@comapeo/ipc/dist/client.js", { with: { "resolution-mode": "import" } }).MapeoProjectApi>;
28
+ }>;
27
29
  /**
28
30
  * Retrieve info about the current device.
29
31
  *
@@ -37,7 +39,7 @@ export declare function useClientApi(): import("@comapeo/ipc/dist/client.js", {
37
39
  export declare function useOwnDeviceInfo(): {
38
40
  data: {
39
41
  deviceId: string;
40
- deviceType: "UNRECOGNIZED" | "device_type_unspecified" | "mobile" | "tablet" | "desktop" | "selfHostedServer";
42
+ deviceType: import("@comapeo/core/dist/schema/client.js", { with: { "resolution-mode": "import" } }).DeviceInfoParam["deviceType"];
41
43
  } & Partial<import("@comapeo/core/dist/schema/client.js", { with: { "resolution-mode": "import" } }).DeviceInfoParam>;
42
44
  error: Error | null;
43
45
  isRefetching: boolean;
@@ -56,27 +56,7 @@ export declare function useSingleProject({ projectId }: {
56
56
  * ```
57
57
  */
58
58
  export declare function useManyProjects(): {
59
- data: (Pick<{
60
- schemaName: "projectSettings";
61
- name?: string | undefined;
62
- defaultPresets?: {
63
- point: string[];
64
- area: string[];
65
- vertex: string[];
66
- line: string[];
67
- relation: string[];
68
- } | undefined;
69
- configMetadata?: {
70
- name: string;
71
- buildDate: string;
72
- importDate: string;
73
- fileVersion: string;
74
- } | undefined;
75
- }, "name"> & {
76
- projectId: string;
77
- createdAt?: string | undefined;
78
- updatedAt?: string | undefined;
79
- })[];
59
+ data: import("@comapeo/core/dist/mapeo-manager.js", { with: { "resolution-mode": "import" } }).ListedProject[];
80
60
  error: Error | null;
81
61
  isRefetching: boolean;
82
62
  };
@@ -634,3 +614,103 @@ export declare function useSetAutostopDataSyncTimeout({ projectId, }: {
634
614
  reset: () => void;
635
615
  status: "pending" | "success" | "idle";
636
616
  };
617
+ /**
618
+ * Creates a GeoJson file with all the observations and/or tracks in the project.
619
+ *
620
+ * @param opts.projectId Public ID of the project to apply changes to.
621
+ */
622
+ export declare function useExportGeoJSON({ projectId }: {
623
+ projectId: string;
624
+ }): {
625
+ error: Error;
626
+ mutate: import("@tanstack/react-query").UseMutateFunction<string, Error, {
627
+ path: string;
628
+ exportOptions: {
629
+ observations?: boolean;
630
+ tracks?: boolean;
631
+ lang?: string;
632
+ };
633
+ }, unknown>;
634
+ mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<string, Error, {
635
+ path: string;
636
+ exportOptions: {
637
+ observations?: boolean;
638
+ tracks?: boolean;
639
+ lang?: string;
640
+ };
641
+ }, unknown>;
642
+ reset: () => void;
643
+ status: "error";
644
+ } | {
645
+ error: null;
646
+ mutate: import("@tanstack/react-query").UseMutateFunction<string, Error, {
647
+ path: string;
648
+ exportOptions: {
649
+ observations?: boolean;
650
+ tracks?: boolean;
651
+ lang?: string;
652
+ };
653
+ }, unknown>;
654
+ mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<string, Error, {
655
+ path: string;
656
+ exportOptions: {
657
+ observations?: boolean;
658
+ tracks?: boolean;
659
+ lang?: string;
660
+ };
661
+ }, unknown>;
662
+ reset: () => void;
663
+ status: "pending" | "success" | "idle";
664
+ };
665
+ /**
666
+ * Creates a zip file containing a GeoJson file with all the observations and/or tracks in the project and all associated attachments (photos and audio).
667
+ *
668
+ * @param opts.projectId Public ID of the project to apply changes to.
669
+ */
670
+ export declare function useExportZipFile({ projectId }: {
671
+ projectId: string;
672
+ }): {
673
+ error: Error;
674
+ mutate: import("@tanstack/react-query").UseMutateFunction<string, Error, {
675
+ path: string;
676
+ exportOptions: {
677
+ observations?: boolean;
678
+ tracks?: boolean;
679
+ lang?: string;
680
+ attachments?: boolean;
681
+ };
682
+ }, unknown>;
683
+ mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<string, Error, {
684
+ path: string;
685
+ exportOptions: {
686
+ observations?: boolean;
687
+ tracks?: boolean;
688
+ lang?: string;
689
+ attachments?: boolean;
690
+ };
691
+ }, unknown>;
692
+ reset: () => void;
693
+ status: "error";
694
+ } | {
695
+ error: null;
696
+ mutate: import("@tanstack/react-query").UseMutateFunction<string, Error, {
697
+ path: string;
698
+ exportOptions: {
699
+ observations?: boolean;
700
+ tracks?: boolean;
701
+ lang?: string;
702
+ attachments?: boolean;
703
+ };
704
+ }, unknown>;
705
+ mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<string, Error, {
706
+ path: string;
707
+ exportOptions: {
708
+ observations?: boolean;
709
+ tracks?: boolean;
710
+ lang?: string;
711
+ attachments?: boolean;
712
+ };
713
+ }, unknown>;
714
+ reset: () => void;
715
+ status: "pending" | "success" | "idle";
716
+ };
@@ -23,6 +23,8 @@ exports.useStopSync = useStopSync;
23
23
  exports.useConnectSyncServers = useConnectSyncServers;
24
24
  exports.useDisconnectSyncServers = useDisconnectSyncServers;
25
25
  exports.useSetAutostopDataSyncTimeout = useSetAutostopDataSyncTimeout;
26
+ exports.useExportGeoJSON = useExportGeoJSON;
27
+ exports.useExportZipFile = useExportZipFile;
26
28
  const react_query_1 = require("@tanstack/react-query");
27
29
  const react_1 = require("react");
28
30
  const projects_js_1 = require("../lib/react-query/projects.js");
@@ -450,3 +452,27 @@ function useSetAutostopDataSyncTimeout({ projectId, }) {
450
452
  ? { error, mutate, mutateAsync, reset, status }
451
453
  : { error: null, mutate, mutateAsync, reset, status };
452
454
  }
455
+ /**
456
+ * Creates a GeoJson file with all the observations and/or tracks in the project.
457
+ *
458
+ * @param opts.projectId Public ID of the project to apply changes to.
459
+ */
460
+ function useExportGeoJSON({ projectId }) {
461
+ const { data: projectApi } = useSingleProject({ projectId });
462
+ const { error, mutate, mutateAsync, reset, status } = (0, react_query_1.useMutation)((0, projects_js_1.exportGeoJSONMutationOptions)({ projectApi }));
463
+ return status === 'error'
464
+ ? { error, mutate, mutateAsync, reset, status }
465
+ : { error: null, mutate, mutateAsync, reset, status };
466
+ }
467
+ /**
468
+ * Creates a zip file containing a GeoJson file with all the observations and/or tracks in the project and all associated attachments (photos and audio).
469
+ *
470
+ * @param opts.projectId Public ID of the project to apply changes to.
471
+ */
472
+ function useExportZipFile({ projectId }) {
473
+ const { data: projectApi } = useSingleProject({ projectId });
474
+ const { error, mutate, mutateAsync, reset, status } = (0, react_query_1.useMutation)((0, projects_js_1.exportZipFileMutationOptions)({ projectApi }));
475
+ return status === 'error'
476
+ ? { error, mutate, mutateAsync, reset, status }
477
+ : { error: null, mutate, mutateAsync, reset, status };
478
+ }
@@ -3,6 +3,6 @@ export { useClientApi, useIsArchiveDevice, useOwnDeviceInfo, useSetIsArchiveDevi
3
3
  export { useCreateDocument, useDeleteDocument, useManyDocs, useSingleDocByDocId, useSingleDocByVersionId, useUpdateDocument, } from './hooks/documents.js';
4
4
  export { useAcceptInvite, useManyInvites, useRejectInvite, useRequestCancelInvite, useSendInvite, useSetUpInvitesListeners, useSingleInvite, } from './hooks/invites.js';
5
5
  export { useMapStyleUrl } from './hooks/maps.js';
6
- export { useAddServerPeer, useAttachmentUrl, useConnectSyncServers, useCreateBlob, useCreateProject, useDataSyncProgress, useDisconnectSyncServers, useDocumentCreatedBy, useIconUrl, useImportProjectConfig, useLeaveProject, useManyMembers, useManyProjects, useOwnRoleInProject, useProjectSettings, useRemoveServerPeer, useSetAutostopDataSyncTimeout, useSingleMember, useSingleProject, useStartSync, useStopSync, useSyncState, useUpdateProjectSettings, } from './hooks/projects.js';
6
+ export { useAddServerPeer, useAttachmentUrl, useConnectSyncServers, useCreateBlob, useCreateProject, useDataSyncProgress, useDisconnectSyncServers, useDocumentCreatedBy, useIconUrl, useImportProjectConfig, useLeaveProject, useManyMembers, useManyProjects, useOwnRoleInProject, useProjectSettings, useRemoveServerPeer, useSetAutostopDataSyncTimeout, useSingleMember, useSingleProject, useStartSync, useStopSync, useSyncState, useUpdateProjectSettings, useExportGeoJSON, useExportZipFile, } from './hooks/projects.js';
7
7
  export { type SyncState } from './lib/sync.js';
8
8
  export { type WriteableDocument, type WriteableDocumentType, type WriteableValue, } from './lib/types.js';
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useUpdateProjectSettings = exports.useSyncState = exports.useStopSync = exports.useStartSync = exports.useSingleProject = exports.useSingleMember = exports.useSetAutostopDataSyncTimeout = exports.useRemoveServerPeer = exports.useProjectSettings = exports.useOwnRoleInProject = exports.useManyProjects = exports.useManyMembers = exports.useLeaveProject = exports.useImportProjectConfig = exports.useIconUrl = exports.useDocumentCreatedBy = exports.useDisconnectSyncServers = exports.useDataSyncProgress = exports.useCreateProject = exports.useCreateBlob = exports.useConnectSyncServers = exports.useAttachmentUrl = exports.useAddServerPeer = exports.useMapStyleUrl = exports.useSingleInvite = exports.useSetUpInvitesListeners = exports.useSendInvite = exports.useRequestCancelInvite = exports.useRejectInvite = exports.useManyInvites = exports.useAcceptInvite = exports.useUpdateDocument = exports.useSingleDocByVersionId = exports.useSingleDocByDocId = exports.useManyDocs = exports.useDeleteDocument = exports.useCreateDocument = exports.useSetOwnDeviceInfo = exports.useSetIsArchiveDevice = exports.useOwnDeviceInfo = exports.useIsArchiveDevice = exports.useClientApi = exports.ClientApiProvider = exports.ClientApiContext = void 0;
3
+ exports.useExportZipFile = exports.useExportGeoJSON = exports.useUpdateProjectSettings = exports.useSyncState = exports.useStopSync = exports.useStartSync = exports.useSingleProject = exports.useSingleMember = exports.useSetAutostopDataSyncTimeout = exports.useRemoveServerPeer = exports.useProjectSettings = exports.useOwnRoleInProject = exports.useManyProjects = exports.useManyMembers = exports.useLeaveProject = exports.useImportProjectConfig = exports.useIconUrl = exports.useDocumentCreatedBy = exports.useDisconnectSyncServers = exports.useDataSyncProgress = exports.useCreateProject = exports.useCreateBlob = exports.useConnectSyncServers = exports.useAttachmentUrl = exports.useAddServerPeer = exports.useMapStyleUrl = exports.useSingleInvite = exports.useSetUpInvitesListeners = exports.useSendInvite = exports.useRequestCancelInvite = exports.useRejectInvite = exports.useManyInvites = exports.useAcceptInvite = exports.useUpdateDocument = exports.useSingleDocByVersionId = exports.useSingleDocByDocId = exports.useManyDocs = exports.useDeleteDocument = exports.useCreateDocument = exports.useSetOwnDeviceInfo = exports.useSetIsArchiveDevice = exports.useOwnDeviceInfo = exports.useIsArchiveDevice = exports.useClientApi = exports.ClientApiProvider = exports.ClientApiContext = void 0;
4
4
  var ClientApi_js_1 = require("./contexts/ClientApi.js");
5
5
  Object.defineProperty(exports, "ClientApiContext", { enumerable: true, get: function () { return ClientApi_js_1.ClientApiContext; } });
6
6
  Object.defineProperty(exports, "ClientApiProvider", { enumerable: true, get: function () { return ClientApi_js_1.ClientApiProvider; } });
@@ -51,3 +51,5 @@ Object.defineProperty(exports, "useStartSync", { enumerable: true, get: function
51
51
  Object.defineProperty(exports, "useStopSync", { enumerable: true, get: function () { return projects_js_1.useStopSync; } });
52
52
  Object.defineProperty(exports, "useSyncState", { enumerable: true, get: function () { return projects_js_1.useSyncState; } });
53
53
  Object.defineProperty(exports, "useUpdateProjectSettings", { enumerable: true, get: function () { return projects_js_1.useUpdateProjectSettings; } });
54
+ Object.defineProperty(exports, "useExportGeoJSON", { enumerable: true, get: function () { return projects_js_1.useExportGeoJSON; } });
55
+ Object.defineProperty(exports, "useExportZipFile", { enumerable: true, get: function () { return projects_js_1.useExportZipFile; } });
@@ -8,20 +8,20 @@ export declare function deviceInfoQueryOptions({ clientApi, }: {
8
8
  clientApi: MapeoClientApi;
9
9
  }): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
10
10
  deviceId: string;
11
- deviceType: "UNRECOGNIZED" | "device_type_unspecified" | "mobile" | "tablet" | "desktop" | "selfHostedServer";
11
+ deviceType: import("@comapeo/core/dist/schema/client.js", { with: { "resolution-mode": "import" } }).DeviceInfoParam["deviceType"];
12
12
  } & Partial<import("@comapeo/core/dist/schema/client.js", { with: { "resolution-mode": "import" } }).DeviceInfoParam>, Error, {
13
13
  deviceId: string;
14
- deviceType: "UNRECOGNIZED" | "device_type_unspecified" | "mobile" | "tablet" | "desktop" | "selfHostedServer";
14
+ deviceType: import("@comapeo/core/dist/schema/client.js", { with: { "resolution-mode": "import" } }).DeviceInfoParam["deviceType"];
15
15
  } & Partial<import("@comapeo/core/dist/schema/client.js", { with: { "resolution-mode": "import" } }).DeviceInfoParam>, readonly ["@comapeo/core-react", "client", "device_info"]>, "queryFn"> & {
16
16
  queryFn?: import("@tanstack/react-query").QueryFunction<{
17
17
  deviceId: string;
18
- deviceType: "UNRECOGNIZED" | "device_type_unspecified" | "mobile" | "tablet" | "desktop" | "selfHostedServer";
18
+ deviceType: import("@comapeo/core/dist/schema/client.js", { with: { "resolution-mode": "import" } }).DeviceInfoParam["deviceType"];
19
19
  } & Partial<import("@comapeo/core/dist/schema/client.js", { with: { "resolution-mode": "import" } }).DeviceInfoParam>, readonly ["@comapeo/core-react", "client", "device_info"], never> | undefined;
20
20
  } & {
21
21
  queryKey: readonly ["@comapeo/core-react", "client", "device_info"] & {
22
22
  [dataTagSymbol]: {
23
23
  deviceId: string;
24
- deviceType: "UNRECOGNIZED" | "device_type_unspecified" | "mobile" | "tablet" | "desktop" | "selfHostedServer";
24
+ deviceType: import("@comapeo/core/dist/schema/client.js", { with: { "resolution-mode": "import" } }).DeviceInfoParam["deviceType"];
25
25
  } & Partial<import("@comapeo/core/dist/schema/client.js", { with: { "resolution-mode": "import" } }).DeviceInfoParam>;
26
26
  [dataTagErrorSymbol]: Error;
27
27
  };
@@ -46,6 +46,10 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
46
46
  tags: {
47
47
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
48
48
  };
49
+ presetRef?: {
50
+ docId: string;
51
+ versionId: string;
52
+ } | undefined;
49
53
  docId: string;
50
54
  versionId: string;
51
55
  originalVersionId: string;
@@ -59,12 +63,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
59
63
  schemaName: "observation";
60
64
  lat?: number | undefined;
61
65
  lon?: number | undefined;
62
- attachments: {
63
- driveDiscoveryId: string;
64
- name: string;
65
- type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
66
- hash: string;
67
- }[];
66
+ attachments: import("@comapeo/schema/dist/schema/observation.js").Attachment[];
68
67
  tags: {
69
68
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
70
69
  };
@@ -169,6 +168,10 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
169
168
  tags: {
170
169
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
171
170
  };
171
+ presetRef?: {
172
+ docId: string;
173
+ versionId: string;
174
+ } | undefined;
172
175
  docId: string;
173
176
  versionId: string;
174
177
  originalVersionId: string;
@@ -182,12 +185,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
182
185
  schemaName: "observation";
183
186
  lat?: number | undefined;
184
187
  lon?: number | undefined;
185
- attachments: {
186
- driveDiscoveryId: string;
187
- name: string;
188
- type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
189
- hash: string;
190
- }[];
188
+ attachments: import("@comapeo/schema/dist/schema/observation.js").Attachment[];
191
189
  tags: {
192
190
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
193
191
  };
@@ -296,6 +294,10 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
296
294
  tags: {
297
295
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
298
296
  };
297
+ presetRef?: {
298
+ docId: string;
299
+ versionId: string;
300
+ } | undefined;
299
301
  docId: string;
300
302
  versionId: string;
301
303
  originalVersionId: string;
@@ -309,12 +311,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
309
311
  schemaName: "observation";
310
312
  lat?: number | undefined;
311
313
  lon?: number | undefined;
312
- attachments: {
313
- driveDiscoveryId: string;
314
- name: string;
315
- type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
316
- hash: string;
317
- }[];
314
+ attachments: import("@comapeo/schema/dist/schema/observation.js").Attachment[];
318
315
  tags: {
319
316
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
320
317
  };
@@ -428,6 +425,10 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
428
425
  tags: {
429
426
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
430
427
  };
428
+ presetRef?: {
429
+ docId: string;
430
+ versionId: string;
431
+ } | undefined;
431
432
  docId: string;
432
433
  versionId: string;
433
434
  originalVersionId: string;
@@ -441,12 +442,7 @@ export declare function documentsQueryOptions<D extends WriteableDocumentType>({
441
442
  schemaName: "observation";
442
443
  lat?: number | undefined;
443
444
  lon?: number | undefined;
444
- attachments: {
445
- driveDiscoveryId: string;
446
- name: string;
447
- type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
448
- hash: string;
449
- }[];
445
+ attachments: import("@comapeo/schema/dist/schema/observation.js").Attachment[];
450
446
  tags: {
451
447
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
452
448
  };
@@ -561,6 +557,10 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
561
557
  tags: {
562
558
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
563
559
  };
560
+ presetRef?: {
561
+ docId: string;
562
+ versionId: string;
563
+ } | undefined;
564
564
  docId: string;
565
565
  versionId: string;
566
566
  originalVersionId: string;
@@ -574,12 +574,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
574
574
  schemaName: "observation";
575
575
  lat?: number | undefined;
576
576
  lon?: number | undefined;
577
- attachments: {
578
- driveDiscoveryId: string;
579
- name: string;
580
- type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
581
- hash: string;
582
- }[];
577
+ attachments: import("@comapeo/schema/dist/schema/observation.js").Attachment[];
583
578
  tags: {
584
579
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
585
580
  };
@@ -684,6 +679,10 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
684
679
  tags: {
685
680
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
686
681
  };
682
+ presetRef?: {
683
+ docId: string;
684
+ versionId: string;
685
+ } | undefined;
687
686
  docId: string;
688
687
  versionId: string;
689
688
  originalVersionId: string;
@@ -697,12 +696,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
697
696
  schemaName: "observation";
698
697
  lat?: number | undefined;
699
698
  lon?: number | undefined;
700
- attachments: {
701
- driveDiscoveryId: string;
702
- name: string;
703
- type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
704
- hash: string;
705
- }[];
699
+ attachments: import("@comapeo/schema/dist/schema/observation.js").Attachment[];
706
700
  tags: {
707
701
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
708
702
  };
@@ -810,6 +804,10 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
810
804
  tags: {
811
805
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
812
806
  };
807
+ presetRef?: {
808
+ docId: string;
809
+ versionId: string;
810
+ } | undefined;
813
811
  docId: string;
814
812
  versionId: string;
815
813
  originalVersionId: string;
@@ -823,12 +821,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
823
821
  schemaName: "observation";
824
822
  lat?: number | undefined;
825
823
  lon?: number | undefined;
826
- attachments: {
827
- driveDiscoveryId: string;
828
- name: string;
829
- type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
830
- hash: string;
831
- }[];
824
+ attachments: import("@comapeo/schema/dist/schema/observation.js").Attachment[];
832
825
  tags: {
833
826
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
834
827
  };
@@ -940,6 +933,10 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
940
933
  tags: {
941
934
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
942
935
  };
936
+ presetRef?: {
937
+ docId: string;
938
+ versionId: string;
939
+ } | undefined;
943
940
  docId: string;
944
941
  versionId: string;
945
942
  originalVersionId: string;
@@ -953,12 +950,7 @@ export declare function documentByDocumentIdQueryOptions<D extends WriteableDocu
953
950
  schemaName: "observation";
954
951
  lat?: number | undefined;
955
952
  lon?: number | undefined;
956
- attachments: {
957
- driveDiscoveryId: string;
958
- name: string;
959
- type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
960
- hash: string;
961
- }[];
953
+ attachments: import("@comapeo/schema/dist/schema/observation.js").Attachment[];
962
954
  tags: {
963
955
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
964
956
  };
@@ -1073,6 +1065,10 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
1073
1065
  tags: {
1074
1066
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
1075
1067
  };
1068
+ presetRef?: {
1069
+ docId: string;
1070
+ versionId: string;
1071
+ } | undefined;
1076
1072
  docId: string;
1077
1073
  versionId: string;
1078
1074
  originalVersionId: string;
@@ -1084,12 +1080,7 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
1084
1080
  schemaName: "observation";
1085
1081
  lat?: number | undefined;
1086
1082
  lon?: number | undefined;
1087
- attachments: {
1088
- driveDiscoveryId: string;
1089
- name: string;
1090
- type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
1091
- hash: string;
1092
- }[];
1083
+ attachments: import("@comapeo/schema/dist/schema/observation.js").Attachment[];
1093
1084
  tags: {
1094
1085
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
1095
1086
  };
@@ -1186,6 +1177,10 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
1186
1177
  tags: {
1187
1178
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
1188
1179
  };
1180
+ presetRef?: {
1181
+ docId: string;
1182
+ versionId: string;
1183
+ } | undefined;
1189
1184
  docId: string;
1190
1185
  versionId: string;
1191
1186
  originalVersionId: string;
@@ -1197,12 +1192,7 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
1197
1192
  schemaName: "observation";
1198
1193
  lat?: number | undefined;
1199
1194
  lon?: number | undefined;
1200
- attachments: {
1201
- driveDiscoveryId: string;
1202
- name: string;
1203
- type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
1204
- hash: string;
1205
- }[];
1195
+ attachments: import("@comapeo/schema/dist/schema/observation.js").Attachment[];
1206
1196
  tags: {
1207
1197
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
1208
1198
  };
@@ -1302,6 +1292,10 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
1302
1292
  tags: {
1303
1293
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
1304
1294
  };
1295
+ presetRef?: {
1296
+ docId: string;
1297
+ versionId: string;
1298
+ } | undefined;
1305
1299
  docId: string;
1306
1300
  versionId: string;
1307
1301
  originalVersionId: string;
@@ -1313,12 +1307,7 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
1313
1307
  schemaName: "observation";
1314
1308
  lat?: number | undefined;
1315
1309
  lon?: number | undefined;
1316
- attachments: {
1317
- driveDiscoveryId: string;
1318
- name: string;
1319
- type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
1320
- hash: string;
1321
- }[];
1310
+ attachments: import("@comapeo/schema/dist/schema/observation.js").Attachment[];
1322
1311
  tags: {
1323
1312
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
1324
1313
  };
@@ -1422,6 +1411,10 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
1422
1411
  tags: {
1423
1412
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
1424
1413
  };
1414
+ presetRef?: {
1415
+ docId: string;
1416
+ versionId: string;
1417
+ } | undefined;
1425
1418
  docId: string;
1426
1419
  versionId: string;
1427
1420
  originalVersionId: string;
@@ -1433,12 +1426,7 @@ export declare function documentByVersionIdQueryOptions<D extends WriteableDocum
1433
1426
  schemaName: "observation";
1434
1427
  lat?: number | undefined;
1435
1428
  lon?: number | undefined;
1436
- attachments: {
1437
- driveDiscoveryId: string;
1438
- name: string;
1439
- type: "attachment_type_unspecified" | "photo" | "video" | "audio" | "UNRECOGNIZED";
1440
- hash: string;
1441
- }[];
1429
+ attachments: import("@comapeo/schema/dist/schema/observation.js").Attachment[];
1442
1430
  tags: {
1443
1431
  [k: string]: boolean | number | string | null | (boolean | number | string | null)[];
1444
1432
  };