@comapeo/core-react 1.0.1 → 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/contexts/ClientApi.d.ts +14 -0
- package/dist/commonjs/contexts/ClientApi.js +16 -0
- package/dist/commonjs/hooks/client.d.ts +80 -0
- package/dist/commonjs/hooks/client.js +91 -0
- package/dist/{hooks → commonjs/hooks}/documents.d.ts +60 -5
- package/dist/commonjs/hooks/documents.js +192 -0
- package/dist/commonjs/hooks/invites.d.ts +51 -0
- package/dist/commonjs/hooks/invites.js +50 -0
- package/dist/commonjs/hooks/maps.js +37 -0
- package/dist/commonjs/hooks/projects.d.ts +334 -0
- package/dist/commonjs/hooks/projects.js +320 -0
- package/dist/commonjs/index.d.ts +12 -0
- package/dist/commonjs/index.js +69 -0
- package/dist/commonjs/lib/react-query/client.d.ts +61 -0
- package/dist/commonjs/lib/react-query/client.js +68 -0
- package/dist/{lib → commonjs/lib}/react-query/documents.d.ts +789 -706
- package/dist/commonjs/lib/react-query/documents.js +149 -0
- package/dist/commonjs/lib/react-query/invites.d.ts +71 -0
- package/dist/commonjs/lib/react-query/invites.js +85 -0
- package/dist/commonjs/lib/react-query/maps.d.ts +24 -0
- package/dist/commonjs/lib/react-query/maps.js +27 -0
- package/dist/commonjs/lib/react-query/projects.d.ts +332 -0
- package/dist/commonjs/lib/react-query/projects.js +235 -0
- package/dist/{lib → commonjs/lib}/react-query/shared.d.ts +5 -1
- package/dist/commonjs/lib/react-query/shared.js +23 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/{contexts → esm/contexts}/ClientApi.d.ts +3 -3
- package/dist/{hooks → esm/hooks}/client.d.ts +23 -2
- package/dist/{hooks → esm/hooks}/client.js +21 -3
- package/dist/esm/hooks/documents.d.ts +167 -0
- package/dist/{hooks → esm/hooks}/documents.js +54 -3
- package/dist/esm/hooks/invites.d.ts +51 -0
- package/dist/esm/hooks/invites.js +44 -0
- package/dist/esm/hooks/maps.d.ts +33 -0
- package/dist/{hooks → esm/hooks}/maps.js +2 -2
- package/dist/{hooks → esm/hooks}/projects.d.ts +89 -6
- package/dist/{hooks → esm/hooks}/projects.js +59 -3
- package/dist/esm/index.d.ts +12 -0
- package/dist/esm/index.js +12 -0
- package/dist/esm/lib/react-query/client.d.ts +61 -0
- package/dist/esm/lib/react-query/client.js +59 -0
- package/dist/esm/lib/react-query/documents.d.ts +1584 -0
- package/dist/{lib → esm/lib}/react-query/documents.js +56 -2
- package/dist/esm/lib/react-query/invites.d.ts +71 -0
- package/dist/esm/lib/react-query/invites.js +76 -0
- package/dist/esm/lib/react-query/maps.d.ts +24 -0
- package/dist/{lib → esm/lib}/react-query/maps.js +6 -2
- package/dist/esm/lib/react-query/projects.d.ts +332 -0
- package/dist/{lib → esm/lib}/react-query/projects.js +84 -2
- package/dist/esm/lib/react-query/shared.d.ts +9 -0
- package/dist/{lib → esm/lib}/react-query/shared.js +7 -1
- package/dist/esm/package.json +3 -0
- package/docs/API.md +157 -258
- package/package.json +51 -37
- package/dist/index.d.ts +0 -11
- package/dist/index.js +0 -11
- package/dist/lib/react-query/client.d.ts +0 -30
- package/dist/lib/react-query/client.js +0 -29
- package/dist/lib/react-query/invites.d.ts +0 -12
- package/dist/lib/react-query/invites.js +0 -17
- package/dist/lib/react-query/maps.d.ts +0 -15
- package/dist/lib/react-query/projects.d.ts +0 -196
- /package/dist/{hooks → commonjs/hooks}/maps.d.ts +0 -0
- /package/dist/{contexts → esm/contexts}/ClientApi.js +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comapeo/core-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "React wrapper for working with @comapeo/core",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -18,32 +18,46 @@
|
|
|
18
18
|
"Andrew Chou <achou@awana.digital>"
|
|
19
19
|
],
|
|
20
20
|
"type": "module",
|
|
21
|
-
"main": "./dist/index.js",
|
|
22
|
-
"types": "./dist/index.d.ts",
|
|
23
21
|
"exports": {
|
|
24
22
|
".": {
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
"import": {
|
|
24
|
+
"types": "./dist/esm/index.d.ts",
|
|
25
|
+
"default": "./dist/esm/index.js"
|
|
26
|
+
},
|
|
27
|
+
"require": {
|
|
28
|
+
"types": "./dist/commonjs/index.d.ts",
|
|
29
|
+
"default": "./dist/commonjs/index.js"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"./package.json": "./package.json"
|
|
28
33
|
},
|
|
34
|
+
"main": "./dist/commonjs/index.js",
|
|
35
|
+
"types": "./dist/commonjs/index.d.ts",
|
|
36
|
+
"module": "./dist/esm/index.js",
|
|
29
37
|
"files": [
|
|
30
38
|
"CHANGELOG.md",
|
|
31
39
|
"dist/",
|
|
32
40
|
"docs/API.md"
|
|
33
41
|
],
|
|
42
|
+
"tshy": {
|
|
43
|
+
"project": "./tsconfig.build.json",
|
|
44
|
+
"selfLink": false,
|
|
45
|
+
"exports": {
|
|
46
|
+
".": "./src/index.ts",
|
|
47
|
+
"./package.json": "./package.json"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
34
50
|
"scripts": {
|
|
35
|
-
"prepare": "husky",
|
|
51
|
+
"prepare:husky": "husky",
|
|
52
|
+
"prepare:tshy": "tshy",
|
|
53
|
+
"prepare": "npm-run-all --parallel prepare:*",
|
|
36
54
|
"lint:eslint": "eslint --cache .",
|
|
37
55
|
"lint:format": "prettier --cache --check .",
|
|
38
56
|
"lint": "npm-run-all --parallel --continue-on-error --print-label --aggregate-output lint:*",
|
|
39
57
|
"types": "tsc",
|
|
40
58
|
"test:unit": "vitest run",
|
|
41
59
|
"test": "npm-run-all --parallel --continue-on-error --print-label --aggregate-output types test:*",
|
|
42
|
-
"docs:generate": "tsdoc --src=src/contexts/*,src/hooks
|
|
43
|
-
"build:clean": "rimraf ./dist",
|
|
44
|
-
"build:npm": "tsc -p tsconfig.npm.json",
|
|
45
|
-
"build": "npm-run-all build:clean build:npm",
|
|
46
|
-
"prepack": "npm run build"
|
|
60
|
+
"docs:generate": "tsdoc --src=src/contexts/*,src/hooks/* --dest=docs/API.md --noemoji --types"
|
|
47
61
|
},
|
|
48
62
|
"peerDependencies": {
|
|
49
63
|
"@comapeo/core": "*",
|
|
@@ -53,30 +67,30 @@
|
|
|
53
67
|
"react": "^18 || ^19"
|
|
54
68
|
},
|
|
55
69
|
"devDependencies": {
|
|
56
|
-
"@eslint/compat": "
|
|
57
|
-
"@eslint/js": "
|
|
58
|
-
"@ianvs/prettier-plugin-sort-imports": "
|
|
59
|
-
"@mapeo/crypto": "
|
|
60
|
-
"@tanstack/eslint-plugin-query": "
|
|
61
|
-
"@testing-library/dom": "
|
|
62
|
-
"@testing-library/react": "
|
|
63
|
-
"@types/lint-staged": "
|
|
64
|
-
"@types/node": "
|
|
65
|
-
"@types/react": "
|
|
66
|
-
"@types/react-dom": "
|
|
67
|
-
"commit-and-tag-version": "
|
|
68
|
-
"eslint": "
|
|
69
|
-
"fastify": "
|
|
70
|
-
"globals": "
|
|
71
|
-
"husky": "
|
|
72
|
-
"lint-staged": "
|
|
73
|
-
"npm-run-all2": "
|
|
74
|
-
"prettier": "
|
|
75
|
-
"random-access-memory": "
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"typescript": "
|
|
79
|
-
"typescript-eslint": "
|
|
80
|
-
"vitest": "
|
|
70
|
+
"@eslint/compat": "1.2.5",
|
|
71
|
+
"@eslint/js": "9.18.0",
|
|
72
|
+
"@ianvs/prettier-plugin-sort-imports": "4.4.1",
|
|
73
|
+
"@mapeo/crypto": "1.0.0-alpha.10",
|
|
74
|
+
"@tanstack/eslint-plugin-query": "5.62.16",
|
|
75
|
+
"@testing-library/dom": "10.4.0",
|
|
76
|
+
"@testing-library/react": "16.1.0",
|
|
77
|
+
"@types/lint-staged": "13.3.0",
|
|
78
|
+
"@types/node": "22.10.5",
|
|
79
|
+
"@types/react": "19.0.6",
|
|
80
|
+
"@types/react-dom": "19.0.3",
|
|
81
|
+
"commit-and-tag-version": "12.5.0",
|
|
82
|
+
"eslint": "9.18.0",
|
|
83
|
+
"fastify": "4.29.0",
|
|
84
|
+
"globals": "15.14.0",
|
|
85
|
+
"husky": "9.1.7",
|
|
86
|
+
"lint-staged": "15.3.0",
|
|
87
|
+
"npm-run-all2": "7.0.2",
|
|
88
|
+
"prettier": "3.4.2",
|
|
89
|
+
"random-access-memory": "6.2.1",
|
|
90
|
+
"tsdoc-markdown": "1.1.0",
|
|
91
|
+
"tshy": "3.0.2",
|
|
92
|
+
"typescript": "5.7.3",
|
|
93
|
+
"typescript-eslint": "8.19.1",
|
|
94
|
+
"vitest": "2.1.8"
|
|
81
95
|
}
|
|
82
96
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from './contexts/ClientApi';
|
|
2
|
-
export * from './hooks/client';
|
|
3
|
-
export * from './hooks/documents';
|
|
4
|
-
export * from './hooks/maps';
|
|
5
|
-
export * from './hooks/projects';
|
|
6
|
-
export * from './lib/react-query/client';
|
|
7
|
-
export * from './lib/react-query/documents';
|
|
8
|
-
export * from './lib/react-query/invites';
|
|
9
|
-
export * from './lib/react-query/maps';
|
|
10
|
-
export * from './lib/react-query/projects';
|
|
11
|
-
export * from './lib/react-query/shared';
|
package/dist/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export * from './contexts/ClientApi';
|
|
2
|
-
export * from './hooks/client';
|
|
3
|
-
export * from './hooks/documents';
|
|
4
|
-
export * from './hooks/maps';
|
|
5
|
-
export * from './hooks/projects';
|
|
6
|
-
export * from './lib/react-query/client';
|
|
7
|
-
export * from './lib/react-query/documents';
|
|
8
|
-
export * from './lib/react-query/invites';
|
|
9
|
-
export * from './lib/react-query/maps';
|
|
10
|
-
export * from './lib/react-query/projects';
|
|
11
|
-
export * from './lib/react-query/shared';
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { MapeoClientApi } from '@comapeo/ipc';
|
|
2
|
-
export declare function getClientQueryKey(): readonly ["@comapeo/core-react", "client"];
|
|
3
|
-
export declare function getDeviceInfoQueryKey(): readonly ["@comapeo/core-react", "client", "device_info"];
|
|
4
|
-
export declare function getIsArchiveDeviceQueryKey(): readonly ["@comapeo/core-react", "client", "is_archive_device"];
|
|
5
|
-
export declare function deviceInfoQueryOptions({ clientApi, }: {
|
|
6
|
-
clientApi: MapeoClientApi;
|
|
7
|
-
}): import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<{
|
|
8
|
-
deviceId: string;
|
|
9
|
-
deviceType: "device_type_unspecified" | "mobile" | "tablet" | "desktop" | "selfHostedServer" | "UNRECOGNIZED";
|
|
10
|
-
} & Partial<import("@comapeo/core/dist/schema/client").DeviceInfoParam>, Error, {
|
|
11
|
-
deviceId: string;
|
|
12
|
-
deviceType: "device_type_unspecified" | "mobile" | "tablet" | "desktop" | "selfHostedServer" | "UNRECOGNIZED";
|
|
13
|
-
} & Partial<import("@comapeo/core/dist/schema/client").DeviceInfoParam>, import("@tanstack/query-core").QueryKey>, "queryFn"> & {
|
|
14
|
-
queryFn?: import("@tanstack/query-core").QueryFunction<{
|
|
15
|
-
deviceId: string;
|
|
16
|
-
deviceType: "device_type_unspecified" | "mobile" | "tablet" | "desktop" | "selfHostedServer" | "UNRECOGNIZED";
|
|
17
|
-
} & Partial<import("@comapeo/core/dist/schema/client").DeviceInfoParam>, import("@tanstack/query-core").QueryKey, never> | undefined;
|
|
18
|
-
} & {
|
|
19
|
-
queryKey: import("@tanstack/query-core").DataTag<import("@tanstack/query-core").QueryKey, {
|
|
20
|
-
deviceId: string;
|
|
21
|
-
deviceType: "device_type_unspecified" | "mobile" | "tablet" | "desktop" | "selfHostedServer" | "UNRECOGNIZED";
|
|
22
|
-
} & Partial<import("@comapeo/core/dist/schema/client").DeviceInfoParam>>;
|
|
23
|
-
};
|
|
24
|
-
export declare function isArchiveDeviceQueryOptions({ clientApi, }: {
|
|
25
|
-
clientApi: MapeoClientApi;
|
|
26
|
-
}): import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<boolean, Error, boolean, import("@tanstack/query-core").QueryKey>, "queryFn"> & {
|
|
27
|
-
queryFn?: import("@tanstack/query-core").QueryFunction<boolean, import("@tanstack/query-core").QueryKey, never> | undefined;
|
|
28
|
-
} & {
|
|
29
|
-
queryKey: import("@tanstack/query-core").DataTag<import("@tanstack/query-core").QueryKey, boolean>;
|
|
30
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { queryOptions } from '@tanstack/react-query';
|
|
2
|
-
import { baseQueryOptions, ROOT_QUERY_KEY } from './shared';
|
|
3
|
-
export function getClientQueryKey() {
|
|
4
|
-
return [ROOT_QUERY_KEY, 'client'];
|
|
5
|
-
}
|
|
6
|
-
export function getDeviceInfoQueryKey() {
|
|
7
|
-
return [ROOT_QUERY_KEY, 'client', 'device_info'];
|
|
8
|
-
}
|
|
9
|
-
export function getIsArchiveDeviceQueryKey() {
|
|
10
|
-
return [ROOT_QUERY_KEY, 'client', 'is_archive_device'];
|
|
11
|
-
}
|
|
12
|
-
export function deviceInfoQueryOptions({ clientApi, }) {
|
|
13
|
-
return queryOptions({
|
|
14
|
-
...baseQueryOptions(),
|
|
15
|
-
queryKey: getDeviceInfoQueryKey(),
|
|
16
|
-
queryFn: async () => {
|
|
17
|
-
return clientApi.getDeviceInfo();
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
export function isArchiveDeviceQueryOptions({ clientApi, }) {
|
|
22
|
-
return queryOptions({
|
|
23
|
-
...baseQueryOptions(),
|
|
24
|
-
queryKey: getIsArchiveDeviceQueryKey(),
|
|
25
|
-
queryFn: async () => {
|
|
26
|
-
return clientApi.getIsArchiveDevice();
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { MapeoClientApi } from '@comapeo/ipc';
|
|
2
|
-
export declare function getInvitesQueryKey(): readonly ["@comapeo/core-react", "invites"];
|
|
3
|
-
export declare function getPendingInvitesQueryKey(): readonly ["@comapeo/core-react", "invites", {
|
|
4
|
-
readonly status: "pending";
|
|
5
|
-
}];
|
|
6
|
-
export declare function pendingInvitesQueryOptions({ clientApi, }: {
|
|
7
|
-
clientApi: MapeoClientApi;
|
|
8
|
-
}): import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("@comapeo/core/dist/types").MapBuffers<import("@comapeo/core/dist/invite-api").InviteInternal>[], Error, import("@comapeo/core/dist/types").MapBuffers<import("@comapeo/core/dist/invite-api").InviteInternal>[], import("@tanstack/query-core").QueryKey>, "queryFn"> & {
|
|
9
|
-
queryFn?: import("@tanstack/query-core").QueryFunction<import("@comapeo/core/dist/types").MapBuffers<import("@comapeo/core/dist/invite-api").InviteInternal>[], import("@tanstack/query-core").QueryKey, never> | undefined;
|
|
10
|
-
} & {
|
|
11
|
-
queryKey: import("@tanstack/query-core").DataTag<import("@tanstack/query-core").QueryKey, import("@comapeo/core/dist/types").MapBuffers<import("@comapeo/core/dist/invite-api").InviteInternal>[]>;
|
|
12
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { queryOptions } from '@tanstack/react-query';
|
|
2
|
-
import { baseQueryOptions, ROOT_QUERY_KEY } from './shared';
|
|
3
|
-
export function getInvitesQueryKey() {
|
|
4
|
-
return [ROOT_QUERY_KEY, 'invites'];
|
|
5
|
-
}
|
|
6
|
-
export function getPendingInvitesQueryKey() {
|
|
7
|
-
return [ROOT_QUERY_KEY, 'invites', { status: 'pending' }];
|
|
8
|
-
}
|
|
9
|
-
export function pendingInvitesQueryOptions({ clientApi, }) {
|
|
10
|
-
return queryOptions({
|
|
11
|
-
...baseQueryOptions(),
|
|
12
|
-
queryKey: getPendingInvitesQueryKey(),
|
|
13
|
-
queryFn: async () => {
|
|
14
|
-
return clientApi.invite.getPending();
|
|
15
|
-
},
|
|
16
|
-
});
|
|
17
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { MapeoClientApi } from '@comapeo/ipc';
|
|
2
|
-
export declare function getMapsQueryKey(): readonly ["@comapeo/core-react", "maps"];
|
|
3
|
-
export declare function getStyleJsonUrlQueryKey({ refreshToken, }: {
|
|
4
|
-
refreshToken?: string;
|
|
5
|
-
}): readonly ["@comapeo/core-react", "maps", "stylejson_url", {
|
|
6
|
-
readonly refreshToken: string | undefined;
|
|
7
|
-
}];
|
|
8
|
-
export declare function mapStyleJsonUrlQueryOptions({ clientApi, refreshToken, }: {
|
|
9
|
-
clientApi: MapeoClientApi;
|
|
10
|
-
refreshToken?: string;
|
|
11
|
-
}): import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<string, Error, string, import("@tanstack/query-core").QueryKey>, "queryFn"> & {
|
|
12
|
-
queryFn?: import("@tanstack/query-core").QueryFunction<string, import("@tanstack/query-core").QueryKey, never> | undefined;
|
|
13
|
-
} & {
|
|
14
|
-
queryKey: import("@tanstack/query-core").DataTag<import("@tanstack/query-core").QueryKey, string>;
|
|
15
|
-
};
|
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
import type { BitmapOpts, SvgOpts } from '@comapeo/core/dist/icon-api';
|
|
2
|
-
import type { BlobId } from '@comapeo/core/dist/types.js';
|
|
3
|
-
import type { MapeoClientApi, MapeoProjectApi } from '@comapeo/ipc';
|
|
4
|
-
export declare function getProjectsQueryKey(): readonly ["@comapeo/core-react", "projects"];
|
|
5
|
-
export declare function getProjectByIdQueryKey({ projectId }: {
|
|
6
|
-
projectId: string;
|
|
7
|
-
}): readonly ["@comapeo/core-react", "projects", string];
|
|
8
|
-
export declare function getProjectSettingsQueryKey({ projectId, }: {
|
|
9
|
-
projectId: string;
|
|
10
|
-
}): readonly ["@comapeo/core-react", "projects", string, "project_settings"];
|
|
11
|
-
export declare function getProjectRoleQueryKey({ projectId }: {
|
|
12
|
-
projectId: string;
|
|
13
|
-
}): readonly ["@comapeo/core-react", "projects", string, "role"];
|
|
14
|
-
export declare function getMembersQueryKey({ projectId }: {
|
|
15
|
-
projectId: string;
|
|
16
|
-
}): readonly ["@comapeo/core-react", "projects", string, "members"];
|
|
17
|
-
export declare function getMemberByIdQueryKey({ projectId, deviceId, }: {
|
|
18
|
-
projectId: string;
|
|
19
|
-
deviceId: string;
|
|
20
|
-
}): readonly ["@comapeo/core-react", "projects", string, "members", string];
|
|
21
|
-
export declare function getIconUrlQueryKey({ projectId, iconId, ...mimeBasedOpts }: {
|
|
22
|
-
projectId: string;
|
|
23
|
-
iconId: string;
|
|
24
|
-
} & (BitmapOpts | SvgOpts)): readonly ["@comapeo/core-react", "projects", string, "icons", string, {
|
|
25
|
-
mimeType: Extract<import("@comapeo/core/dist/icon-api").IconVariant["mimeType"], "image/png">;
|
|
26
|
-
pixelDensity: Extract<import("@comapeo/core/dist/icon-api").IconVariant, {
|
|
27
|
-
mimeType: "image/png";
|
|
28
|
-
}>["pixelDensity"];
|
|
29
|
-
size: import("@comapeo/core/dist/icon-api").ValidSizes;
|
|
30
|
-
} | {
|
|
31
|
-
mimeType: Extract<import("@comapeo/core/dist/icon-api").IconVariant["mimeType"], "image/svg+xml">;
|
|
32
|
-
size: import("@comapeo/core/dist/icon-api").ValidSizes;
|
|
33
|
-
}];
|
|
34
|
-
export declare function getDocumentCreatedByQueryKey({ projectId, originalVersionId, }: {
|
|
35
|
-
projectId: string;
|
|
36
|
-
originalVersionId: string;
|
|
37
|
-
}): readonly ["@comapeo/core-react", "projects", string, "document_created_by", string];
|
|
38
|
-
export declare function getAttachmentUrlQueryKey({ projectId, blobId, }: {
|
|
39
|
-
projectId: string;
|
|
40
|
-
blobId: BlobId;
|
|
41
|
-
}): readonly ["@comapeo/core-react", "projects", string, "attachments", BlobId];
|
|
42
|
-
export declare function projectsQueryOptions({ clientApi, }: {
|
|
43
|
-
clientApi: MapeoClientApi;
|
|
44
|
-
}): import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<(Pick<{
|
|
45
|
-
schemaName: "projectSettings";
|
|
46
|
-
name?: string | undefined;
|
|
47
|
-
defaultPresets?: {
|
|
48
|
-
point: string[];
|
|
49
|
-
area: string[];
|
|
50
|
-
vertex: string[];
|
|
51
|
-
line: string[];
|
|
52
|
-
relation: string[];
|
|
53
|
-
} | undefined;
|
|
54
|
-
configMetadata?: {
|
|
55
|
-
name: string;
|
|
56
|
-
buildDate: string;
|
|
57
|
-
importDate: string;
|
|
58
|
-
fileVersion: string;
|
|
59
|
-
} | undefined;
|
|
60
|
-
}, "name"> & {
|
|
61
|
-
projectId: string;
|
|
62
|
-
createdAt?: string | undefined;
|
|
63
|
-
updatedAt?: string | undefined;
|
|
64
|
-
})[], Error, (Pick<{
|
|
65
|
-
schemaName: "projectSettings";
|
|
66
|
-
name?: string | undefined;
|
|
67
|
-
defaultPresets?: {
|
|
68
|
-
point: string[];
|
|
69
|
-
area: string[];
|
|
70
|
-
vertex: string[];
|
|
71
|
-
line: string[];
|
|
72
|
-
relation: string[];
|
|
73
|
-
} | undefined;
|
|
74
|
-
configMetadata?: {
|
|
75
|
-
name: string;
|
|
76
|
-
buildDate: string;
|
|
77
|
-
importDate: string;
|
|
78
|
-
fileVersion: string;
|
|
79
|
-
} | undefined;
|
|
80
|
-
}, "name"> & {
|
|
81
|
-
projectId: string;
|
|
82
|
-
createdAt?: string | undefined;
|
|
83
|
-
updatedAt?: string | undefined;
|
|
84
|
-
})[], import("@tanstack/query-core").QueryKey>, "queryFn"> & {
|
|
85
|
-
queryFn?: import("@tanstack/query-core").QueryFunction<(Pick<{
|
|
86
|
-
schemaName: "projectSettings";
|
|
87
|
-
name?: string | undefined;
|
|
88
|
-
defaultPresets?: {
|
|
89
|
-
point: string[];
|
|
90
|
-
area: string[];
|
|
91
|
-
vertex: string[];
|
|
92
|
-
line: string[];
|
|
93
|
-
relation: string[];
|
|
94
|
-
} | undefined;
|
|
95
|
-
configMetadata?: {
|
|
96
|
-
name: string;
|
|
97
|
-
buildDate: string;
|
|
98
|
-
importDate: string;
|
|
99
|
-
fileVersion: string;
|
|
100
|
-
} | undefined;
|
|
101
|
-
}, "name"> & {
|
|
102
|
-
projectId: string;
|
|
103
|
-
createdAt?: string | undefined;
|
|
104
|
-
updatedAt?: string | undefined;
|
|
105
|
-
})[], import("@tanstack/query-core").QueryKey, never> | undefined;
|
|
106
|
-
} & {
|
|
107
|
-
queryKey: import("@tanstack/query-core").DataTag<import("@tanstack/query-core").QueryKey, (Pick<{
|
|
108
|
-
schemaName: "projectSettings";
|
|
109
|
-
name?: string | undefined;
|
|
110
|
-
defaultPresets?: {
|
|
111
|
-
point: string[];
|
|
112
|
-
area: string[];
|
|
113
|
-
vertex: string[];
|
|
114
|
-
line: string[];
|
|
115
|
-
relation: string[];
|
|
116
|
-
} | undefined;
|
|
117
|
-
configMetadata?: {
|
|
118
|
-
name: string;
|
|
119
|
-
buildDate: string;
|
|
120
|
-
importDate: string;
|
|
121
|
-
fileVersion: string;
|
|
122
|
-
} | undefined;
|
|
123
|
-
}, "name"> & {
|
|
124
|
-
projectId: string;
|
|
125
|
-
createdAt?: string | undefined;
|
|
126
|
-
updatedAt?: string | undefined;
|
|
127
|
-
})[]>;
|
|
128
|
-
};
|
|
129
|
-
export declare function projectByIdQueryOptions({ clientApi, projectId, }: {
|
|
130
|
-
clientApi: MapeoClientApi;
|
|
131
|
-
projectId: string;
|
|
132
|
-
}): import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("rpc-reflector/lib/types").ClientApi<import("@comapeo/core/dist/mapeo-project").MapeoProject>, Error, import("rpc-reflector/lib/types").ClientApi<import("@comapeo/core/dist/mapeo-project").MapeoProject>, import("@tanstack/query-core").QueryKey>, "queryFn"> & {
|
|
133
|
-
queryFn?: import("@tanstack/query-core").QueryFunction<import("rpc-reflector/lib/types").ClientApi<import("@comapeo/core/dist/mapeo-project").MapeoProject>, import("@tanstack/query-core").QueryKey, never> | undefined;
|
|
134
|
-
} & {
|
|
135
|
-
queryKey: import("@tanstack/query-core").DataTag<import("@tanstack/query-core").QueryKey, import("rpc-reflector/lib/types").ClientApi<import("@comapeo/core/dist/mapeo-project").MapeoProject>>;
|
|
136
|
-
};
|
|
137
|
-
export declare function projectSettingsQueryOptions({ projectApi, projectId, }: {
|
|
138
|
-
projectApi: MapeoProjectApi;
|
|
139
|
-
projectId: string;
|
|
140
|
-
}): import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("@comapeo/core/dist/mapeo-project").EditableProjectSettings, Error, import("@comapeo/core/dist/mapeo-project").EditableProjectSettings, import("@tanstack/query-core").QueryKey>, "queryFn"> & {
|
|
141
|
-
queryFn?: import("@tanstack/query-core").QueryFunction<import("@comapeo/core/dist/mapeo-project").EditableProjectSettings, import("@tanstack/query-core").QueryKey, never> | undefined;
|
|
142
|
-
} & {
|
|
143
|
-
queryKey: import("@tanstack/query-core").DataTag<import("@tanstack/query-core").QueryKey, import("@comapeo/core/dist/mapeo-project").EditableProjectSettings>;
|
|
144
|
-
};
|
|
145
|
-
export declare function projectMembersQueryOptions({ projectApi, projectId, }: {
|
|
146
|
-
projectApi: MapeoProjectApi;
|
|
147
|
-
projectId: string;
|
|
148
|
-
}): import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("@comapeo/core/dist/member-api").MemberInfo[], Error, import("@comapeo/core/dist/member-api").MemberInfo[], import("@tanstack/query-core").QueryKey>, "queryFn"> & {
|
|
149
|
-
queryFn?: import("@tanstack/query-core").QueryFunction<import("@comapeo/core/dist/member-api").MemberInfo[], import("@tanstack/query-core").QueryKey, never> | undefined;
|
|
150
|
-
} & {
|
|
151
|
-
queryKey: import("@tanstack/query-core").DataTag<import("@tanstack/query-core").QueryKey, import("@comapeo/core/dist/member-api").MemberInfo[]>;
|
|
152
|
-
};
|
|
153
|
-
export declare function projectMemberByIdQueryOptions({ projectApi, projectId, deviceId, }: {
|
|
154
|
-
projectApi: MapeoProjectApi;
|
|
155
|
-
projectId: string;
|
|
156
|
-
deviceId: string;
|
|
157
|
-
}): import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("@comapeo/core/dist/member-api").MemberInfo, Error, import("@comapeo/core/dist/member-api").MemberInfo, import("@tanstack/query-core").QueryKey>, "queryFn"> & {
|
|
158
|
-
queryFn?: import("@tanstack/query-core").QueryFunction<import("@comapeo/core/dist/member-api").MemberInfo, import("@tanstack/query-core").QueryKey, never> | undefined;
|
|
159
|
-
} & {
|
|
160
|
-
queryKey: import("@tanstack/query-core").DataTag<import("@tanstack/query-core").QueryKey, import("@comapeo/core/dist/member-api").MemberInfo>;
|
|
161
|
-
};
|
|
162
|
-
export declare function projectOwnRoleQueryOptions({ projectApi, projectId, }: {
|
|
163
|
-
projectApi: MapeoProjectApi;
|
|
164
|
-
projectId: string;
|
|
165
|
-
}): import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<import("@comapeo/core/dist/roles").Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "08e4251e36f6e7ed">, Error, import("@comapeo/core/dist/roles").Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "08e4251e36f6e7ed">, import("@tanstack/query-core").QueryKey>, "queryFn"> & {
|
|
166
|
-
queryFn?: import("@tanstack/query-core").QueryFunction<import("@comapeo/core/dist/roles").Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "08e4251e36f6e7ed">, import("@tanstack/query-core").QueryKey, never> | undefined;
|
|
167
|
-
} & {
|
|
168
|
-
queryKey: import("@tanstack/query-core").DataTag<import("@tanstack/query-core").QueryKey, import("@comapeo/core/dist/roles").Role<"a12a6702b93bd7ff" | "f7c150f5a3a9a855" | "012fd2d431c0bf60" | "9e6d29263cba36c9" | "8ced989b1904606b" | "08e4251e36f6e7ed">>;
|
|
169
|
-
};
|
|
170
|
-
export declare function iconUrlQueryOptions({ projectApi, projectId, iconId, ...mimeBasedOpts }: {
|
|
171
|
-
projectApi: MapeoProjectApi;
|
|
172
|
-
projectId: string;
|
|
173
|
-
iconId: Parameters<MapeoProjectApi['$icons']['getIconUrl']>[0];
|
|
174
|
-
} & (BitmapOpts | SvgOpts)): import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<string, Error, string, import("@tanstack/query-core").QueryKey>, "queryFn"> & {
|
|
175
|
-
queryFn?: import("@tanstack/query-core").QueryFunction<string, import("@tanstack/query-core").QueryKey, never> | undefined;
|
|
176
|
-
} & {
|
|
177
|
-
queryKey: import("@tanstack/query-core").DataTag<import("@tanstack/query-core").QueryKey, string>;
|
|
178
|
-
};
|
|
179
|
-
export declare function documentCreatedByQueryOptions({ projectApi, projectId, originalVersionId, }: {
|
|
180
|
-
projectApi: MapeoProjectApi;
|
|
181
|
-
projectId: string;
|
|
182
|
-
originalVersionId: string;
|
|
183
|
-
}): import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<string, Error, string, import("@tanstack/query-core").QueryKey>, "queryFn"> & {
|
|
184
|
-
queryFn?: import("@tanstack/query-core").QueryFunction<string, import("@tanstack/query-core").QueryKey, never> | undefined;
|
|
185
|
-
} & {
|
|
186
|
-
queryKey: import("@tanstack/query-core").DataTag<import("@tanstack/query-core").QueryKey, string>;
|
|
187
|
-
};
|
|
188
|
-
export declare function attachmentUrlQueryOptions({ projectApi, projectId, blobId, }: {
|
|
189
|
-
projectApi: MapeoProjectApi;
|
|
190
|
-
projectId: string;
|
|
191
|
-
blobId: BlobId;
|
|
192
|
-
}): import("@tanstack/query-core").OmitKeyof<import("@tanstack/react-query").UseQueryOptions<string, Error, string, import("@tanstack/query-core").QueryKey>, "queryFn"> & {
|
|
193
|
-
queryFn?: import("@tanstack/query-core").QueryFunction<string, import("@tanstack/query-core").QueryKey, never> | undefined;
|
|
194
|
-
} & {
|
|
195
|
-
queryKey: import("@tanstack/query-core").DataTag<import("@tanstack/query-core").QueryKey, string>;
|
|
196
|
-
};
|
|
File without changes
|
|
File without changes
|