@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.
- package/dist/commonjs/contexts/ClientApi.d.ts +3 -1
- package/dist/commonjs/hooks/client.d.ts +4 -2
- package/dist/commonjs/hooks/projects.d.ts +101 -21
- package/dist/commonjs/hooks/projects.js +26 -0
- package/dist/commonjs/index.d.ts +1 -1
- package/dist/commonjs/index.js +3 -1
- package/dist/commonjs/lib/react-query/client.d.ts +4 -4
- package/dist/commonjs/lib/react-query/documents.d.ts +60 -72
- package/dist/commonjs/lib/react-query/projects.d.ts +32 -83
- package/dist/commonjs/lib/react-query/projects.js +18 -0
- package/dist/esm/contexts/ClientApi.d.ts +3 -1
- package/dist/esm/hooks/client.d.ts +4 -2
- package/dist/esm/hooks/projects.d.ts +101 -21
- package/dist/esm/hooks/projects.js +25 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/lib/react-query/client.d.ts +4 -4
- package/dist/esm/lib/react-query/documents.d.ts +60 -72
- package/dist/esm/lib/react-query/projects.d.ts +32 -83
- package/dist/esm/lib/react-query/projects.js +16 -0
- package/docs/API.md +28 -0
- package/package.json +23 -23
|
@@ -45,91 +45,11 @@ export declare function getAttachmentUrlQueryKey({ projectId, blobId, }: {
|
|
|
45
45
|
}): readonly ["@comapeo/core-react", "projects", string, "attachments", BlobId];
|
|
46
46
|
export declare function projectsQueryOptions({ clientApi, }: {
|
|
47
47
|
clientApi: MapeoClientApi;
|
|
48
|
-
}): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<(
|
|
49
|
-
|
|
50
|
-
name?: string | undefined;
|
|
51
|
-
defaultPresets?: {
|
|
52
|
-
point: string[];
|
|
53
|
-
area: string[];
|
|
54
|
-
vertex: string[];
|
|
55
|
-
line: string[];
|
|
56
|
-
relation: string[];
|
|
57
|
-
} | undefined;
|
|
58
|
-
configMetadata?: {
|
|
59
|
-
name: string;
|
|
60
|
-
buildDate: string;
|
|
61
|
-
importDate: string;
|
|
62
|
-
fileVersion: string;
|
|
63
|
-
} | undefined;
|
|
64
|
-
}, "name"> & {
|
|
65
|
-
projectId: string;
|
|
66
|
-
createdAt?: string | undefined;
|
|
67
|
-
updatedAt?: string | undefined;
|
|
68
|
-
})[], Error, (Pick<{
|
|
69
|
-
schemaName: "projectSettings";
|
|
70
|
-
name?: string | undefined;
|
|
71
|
-
defaultPresets?: {
|
|
72
|
-
point: string[];
|
|
73
|
-
area: string[];
|
|
74
|
-
vertex: string[];
|
|
75
|
-
line: string[];
|
|
76
|
-
relation: string[];
|
|
77
|
-
} | undefined;
|
|
78
|
-
configMetadata?: {
|
|
79
|
-
name: string;
|
|
80
|
-
buildDate: string;
|
|
81
|
-
importDate: string;
|
|
82
|
-
fileVersion: string;
|
|
83
|
-
} | undefined;
|
|
84
|
-
}, "name"> & {
|
|
85
|
-
projectId: string;
|
|
86
|
-
createdAt?: string | undefined;
|
|
87
|
-
updatedAt?: string | undefined;
|
|
88
|
-
})[], readonly ["@comapeo/core-react", "projects"]>, "queryFn"> & {
|
|
89
|
-
queryFn?: import("@tanstack/react-query").QueryFunction<(Pick<{
|
|
90
|
-
schemaName: "projectSettings";
|
|
91
|
-
name?: string | undefined;
|
|
92
|
-
defaultPresets?: {
|
|
93
|
-
point: string[];
|
|
94
|
-
area: string[];
|
|
95
|
-
vertex: string[];
|
|
96
|
-
line: string[];
|
|
97
|
-
relation: string[];
|
|
98
|
-
} | undefined;
|
|
99
|
-
configMetadata?: {
|
|
100
|
-
name: string;
|
|
101
|
-
buildDate: string;
|
|
102
|
-
importDate: string;
|
|
103
|
-
fileVersion: string;
|
|
104
|
-
} | undefined;
|
|
105
|
-
}, "name"> & {
|
|
106
|
-
projectId: string;
|
|
107
|
-
createdAt?: string | undefined;
|
|
108
|
-
updatedAt?: string | undefined;
|
|
109
|
-
})[], readonly ["@comapeo/core-react", "projects"], never> | undefined;
|
|
48
|
+
}): import("@tanstack/react-query").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("@comapeo/core/dist/mapeo-manager.js", { with: { "resolution-mode": "import" } }).ListedProject[], Error, import("@comapeo/core/dist/mapeo-manager.js", { with: { "resolution-mode": "import" } }).ListedProject[], readonly ["@comapeo/core-react", "projects"]>, "queryFn"> & {
|
|
49
|
+
queryFn?: import("@tanstack/react-query").QueryFunction<import("@comapeo/core/dist/mapeo-manager.js", { with: { "resolution-mode": "import" } }).ListedProject[], readonly ["@comapeo/core-react", "projects"], never> | undefined;
|
|
110
50
|
} & {
|
|
111
51
|
queryKey: readonly ["@comapeo/core-react", "projects"] & {
|
|
112
|
-
[dataTagSymbol]: (
|
|
113
|
-
schemaName: "projectSettings";
|
|
114
|
-
name?: string | undefined;
|
|
115
|
-
defaultPresets?: {
|
|
116
|
-
point: string[];
|
|
117
|
-
area: string[];
|
|
118
|
-
vertex: string[];
|
|
119
|
-
line: string[];
|
|
120
|
-
relation: string[];
|
|
121
|
-
} | undefined;
|
|
122
|
-
configMetadata?: {
|
|
123
|
-
name: string;
|
|
124
|
-
buildDate: string;
|
|
125
|
-
importDate: string;
|
|
126
|
-
fileVersion: string;
|
|
127
|
-
} | undefined;
|
|
128
|
-
}, "name"> & {
|
|
129
|
-
projectId: string;
|
|
130
|
-
createdAt?: string | undefined;
|
|
131
|
-
updatedAt?: string | undefined;
|
|
132
|
-
})[];
|
|
52
|
+
[dataTagSymbol]: import("@comapeo/core/dist/mapeo-manager.js", { with: { "resolution-mode": "import" } }).ListedProject[];
|
|
133
53
|
[dataTagErrorSymbol]: Error;
|
|
134
54
|
};
|
|
135
55
|
};
|
|
@@ -384,3 +304,32 @@ export declare function setAutostopDataSyncTimeoutMutationOptions({ projectApi,
|
|
|
384
304
|
networkMode: "always";
|
|
385
305
|
retry: false;
|
|
386
306
|
};
|
|
307
|
+
export declare function exportGeoJSONMutationOptions({ projectApi, }: {
|
|
308
|
+
projectApi: MapeoProjectApi;
|
|
309
|
+
}): {
|
|
310
|
+
mutationFn: (opts: {
|
|
311
|
+
path: string;
|
|
312
|
+
exportOptions: {
|
|
313
|
+
observations?: boolean;
|
|
314
|
+
tracks?: boolean;
|
|
315
|
+
lang?: string;
|
|
316
|
+
};
|
|
317
|
+
}) => Promise<string>;
|
|
318
|
+
networkMode: "always";
|
|
319
|
+
retry: false;
|
|
320
|
+
};
|
|
321
|
+
export declare function exportZipFileMutationOptions({ projectApi, }: {
|
|
322
|
+
projectApi: MapeoProjectApi;
|
|
323
|
+
}): {
|
|
324
|
+
mutationFn: (opts: {
|
|
325
|
+
path: string;
|
|
326
|
+
exportOptions: {
|
|
327
|
+
observations?: boolean;
|
|
328
|
+
tracks?: boolean;
|
|
329
|
+
lang?: string;
|
|
330
|
+
attachments?: boolean;
|
|
331
|
+
};
|
|
332
|
+
}) => Promise<string>;
|
|
333
|
+
networkMode: "always";
|
|
334
|
+
retry: false;
|
|
335
|
+
};
|
|
@@ -30,6 +30,8 @@ exports.stopSyncMutationOptions = stopSyncMutationOptions;
|
|
|
30
30
|
exports.connectSyncServersMutationOptions = connectSyncServersMutationOptions;
|
|
31
31
|
exports.disconnectSyncServersMutationOptions = disconnectSyncServersMutationOptions;
|
|
32
32
|
exports.setAutostopDataSyncTimeoutMutationOptions = setAutostopDataSyncTimeoutMutationOptions;
|
|
33
|
+
exports.exportGeoJSONMutationOptions = exportGeoJSONMutationOptions;
|
|
34
|
+
exports.exportZipFileMutationOptions = exportZipFileMutationOptions;
|
|
33
35
|
const react_query_1 = require("@tanstack/react-query");
|
|
34
36
|
const shared_js_1 = require("./shared.js");
|
|
35
37
|
function getProjectsQueryKey() {
|
|
@@ -296,3 +298,19 @@ function setAutostopDataSyncTimeoutMutationOptions({ projectApi, }) {
|
|
|
296
298
|
},
|
|
297
299
|
};
|
|
298
300
|
}
|
|
301
|
+
function exportGeoJSONMutationOptions({ projectApi, }) {
|
|
302
|
+
return {
|
|
303
|
+
...(0, shared_js_1.baseMutationOptions)(),
|
|
304
|
+
mutationFn: async (opts) => {
|
|
305
|
+
return projectApi.exportGeoJSONFile(opts.path, opts.exportOptions);
|
|
306
|
+
},
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
function exportZipFileMutationOptions({ projectApi, }) {
|
|
310
|
+
return {
|
|
311
|
+
...(0, shared_js_1.baseMutationOptions)(),
|
|
312
|
+
mutationFn: async (opts) => {
|
|
313
|
+
return projectApi.exportZipFile(opts.path, opts.exportOptions);
|
|
314
|
+
},
|
|
315
|
+
};
|
|
316
|
+
}
|
|
@@ -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("
|
|
3
|
+
export declare const ClientApiContext: import("react").Context<import("rpc-reflector/lib/types.js").ClientApi<Omit<import("@comapeo/core").MapeoManager, "getProject"> & {
|
|
4
|
+
getProject: (projectPublicId: string) => Promise<import("@comapeo/ipc/dist/client.js").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("
|
|
26
|
+
export declare function useClientApi(): import("rpc-reflector/lib/types.js").ClientApi<Omit<import("@comapeo/core").MapeoManager, "getProject"> & {
|
|
27
|
+
getProject: (projectPublicId: string) => Promise<import("@comapeo/ipc/dist/client.js").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").Ma
|
|
|
37
39
|
export declare function useOwnDeviceInfo(): {
|
|
38
40
|
data: {
|
|
39
41
|
deviceId: string;
|
|
40
|
-
deviceType: "
|
|
42
|
+
deviceType: import("@comapeo/core/dist/schema/client.js").DeviceInfoParam["deviceType"];
|
|
41
43
|
} & Partial<import("@comapeo/core/dist/schema/client.js").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: (
|
|
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").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
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMutation, useQueryClient, useSuspenseQuery, } from '@tanstack/react-query';
|
|
2
2
|
import { useSyncExternalStore } from 'react';
|
|
3
|
-
import { addServerPeerMutationOptions, attachmentUrlQueryOptions, connectSyncServersMutationOptions, createBlobMutationOptions, createProjectMutationOptions, disconnectSyncServersMutationOptions, documentCreatedByQueryOptions, iconUrlQueryOptions, importProjectConfigMutationOptions, leaveProjectMutationOptions, projectByIdQueryOptions, projectMemberByIdQueryOptions, projectMembersQueryOptions, projectOwnRoleQueryOptions, projectSettingsQueryOptions, projectsQueryOptions, removeServerPeerMutationOptions, setAutostopDataSyncTimeoutMutationOptions, startSyncMutationOptions, stopSyncMutationOptions, updateProjectSettingsMutationOptions, } from '../lib/react-query/projects.js';
|
|
3
|
+
import { addServerPeerMutationOptions, attachmentUrlQueryOptions, connectSyncServersMutationOptions, createBlobMutationOptions, createProjectMutationOptions, disconnectSyncServersMutationOptions, documentCreatedByQueryOptions, exportGeoJSONMutationOptions, exportZipFileMutationOptions, iconUrlQueryOptions, importProjectConfigMutationOptions, leaveProjectMutationOptions, projectByIdQueryOptions, projectMemberByIdQueryOptions, projectMembersQueryOptions, projectOwnRoleQueryOptions, projectSettingsQueryOptions, projectsQueryOptions, removeServerPeerMutationOptions, setAutostopDataSyncTimeoutMutationOptions, startSyncMutationOptions, stopSyncMutationOptions, updateProjectSettingsMutationOptions, } from '../lib/react-query/projects.js';
|
|
4
4
|
import { SyncStore } from '../lib/sync.js';
|
|
5
5
|
import { useClientApi } from './client.js';
|
|
6
6
|
/**
|
|
@@ -425,3 +425,27 @@ export function useSetAutostopDataSyncTimeout({ projectId, }) {
|
|
|
425
425
|
? { error, mutate, mutateAsync, reset, status }
|
|
426
426
|
: { error: null, mutate, mutateAsync, reset, status };
|
|
427
427
|
}
|
|
428
|
+
/**
|
|
429
|
+
* Creates a GeoJson file with all the observations and/or tracks in the project.
|
|
430
|
+
*
|
|
431
|
+
* @param opts.projectId Public ID of the project to apply changes to.
|
|
432
|
+
*/
|
|
433
|
+
export function useExportGeoJSON({ projectId }) {
|
|
434
|
+
const { data: projectApi } = useSingleProject({ projectId });
|
|
435
|
+
const { error, mutate, mutateAsync, reset, status } = useMutation(exportGeoJSONMutationOptions({ projectApi }));
|
|
436
|
+
return status === 'error'
|
|
437
|
+
? { error, mutate, mutateAsync, reset, status }
|
|
438
|
+
: { error: null, mutate, mutateAsync, reset, status };
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* 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).
|
|
442
|
+
*
|
|
443
|
+
* @param opts.projectId Public ID of the project to apply changes to.
|
|
444
|
+
*/
|
|
445
|
+
export function useExportZipFile({ projectId }) {
|
|
446
|
+
const { data: projectApi } = useSingleProject({ projectId });
|
|
447
|
+
const { error, mutate, mutateAsync, reset, status } = useMutation(exportZipFileMutationOptions({ projectApi }));
|
|
448
|
+
return status === 'error'
|
|
449
|
+
? { error, mutate, mutateAsync, reset, status }
|
|
450
|
+
: { error: null, mutate, mutateAsync, reset, status };
|
|
451
|
+
}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -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';
|
package/dist/esm/index.js
CHANGED
|
@@ -3,4 +3,4 @@ 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';
|
|
@@ -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: "
|
|
11
|
+
deviceType: import("@comapeo/core/dist/schema/client.js").DeviceInfoParam["deviceType"];
|
|
12
12
|
} & Partial<import("@comapeo/core/dist/schema/client.js").DeviceInfoParam>, Error, {
|
|
13
13
|
deviceId: string;
|
|
14
|
-
deviceType: "
|
|
14
|
+
deviceType: import("@comapeo/core/dist/schema/client.js").DeviceInfoParam["deviceType"];
|
|
15
15
|
} & Partial<import("@comapeo/core/dist/schema/client.js").DeviceInfoParam>, readonly ["@comapeo/core-react", "client", "device_info"]>, "queryFn"> & {
|
|
16
16
|
queryFn?: import("@tanstack/react-query").QueryFunction<{
|
|
17
17
|
deviceId: string;
|
|
18
|
-
deviceType: "
|
|
18
|
+
deviceType: import("@comapeo/core/dist/schema/client.js").DeviceInfoParam["deviceType"];
|
|
19
19
|
} & Partial<import("@comapeo/core/dist/schema/client.js").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: "
|
|
24
|
+
deviceType: import("@comapeo/core/dist/schema/client.js").DeviceInfoParam["deviceType"];
|
|
25
25
|
} & Partial<import("@comapeo/core/dist/schema/client.js").DeviceInfoParam>;
|
|
26
26
|
[dataTagErrorSymbol]: Error;
|
|
27
27
|
};
|