@overmap-ai/core 1.0.53-add-agent-conversations.6 → 1.0.53-attachment-creation-flows.1
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/README.md +4 -4
- package/dist/overmap-core.js +1163 -1120
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +1129 -1086
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/sdk.d.ts +6 -2
- package/dist/sdk/services/AgentService.d.ts +30 -2
- package/dist/sdk/services/BaseAttachmentService.d.ts +31 -0
- package/dist/sdk/services/ComponentAttachmentService.d.ts +10 -0
- package/dist/sdk/services/ComponentTypeAttachmentService.d.ts +10 -0
- package/dist/sdk/services/DocumentAttachmentService.d.ts +10 -0
- package/dist/sdk/services/IssueAttachmentService.d.ts +10 -0
- package/dist/sdk/services/IssueService.d.ts +1 -1
- package/dist/sdk/services/ProjectAttachmentService.d.ts +10 -0
- package/dist/sdk/services/index.d.ts +5 -1
- package/dist/store/slices/categorySlice.d.ts +0 -1
- package/dist/store/slices/componentSlice.d.ts +15 -7
- package/dist/store/slices/componentTypeSlice.d.ts +16 -8
- package/dist/store/slices/documentSlice.d.ts +10 -3
- package/dist/store/slices/formRevisionSlice.d.ts +0 -1
- package/dist/store/slices/index.d.ts +0 -1
- package/dist/store/slices/issueSlice.d.ts +33 -22
- package/dist/store/slices/projectFileSlice.d.ts +0 -1
- package/dist/store/slices/projectSlice.d.ts +12 -3
- package/dist/store/slices/utils.d.ts +3 -2
- package/dist/store/slices/workspaceSlice.d.ts +0 -1
- package/dist/store/store.d.ts +1 -4
- package/dist/typings/models/attachments.d.ts +7 -0
- package/dist/typings/models/index.d.ts +0 -1
- package/dist/typings/models/projects.d.ts +4 -5
- package/dist/utils/utils.d.ts +0 -1
- package/package.json +153 -153
- package/dist/sdk/services/AttachmentService.d.ts +0 -46
- package/dist/store/slices/agentsSlice.d.ts +0 -15
- package/dist/typings/models/agents.d.ts +0 -44
package/dist/store/store.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { AnyAction, Reducer } from "redux";
|
|
|
3
3
|
import { Config, OfflineAction, OfflineMetadata, OfflineState } from "@redux-offline/redux-offline/lib/types";
|
|
4
4
|
import request from "superagent";
|
|
5
5
|
import { type OfflineMetaEffect, type OvermapSDK, RequestDetails } from "../sdk";
|
|
6
|
-
import { AuthState, CategoryState, ComponentStageCompletionState, ComponentStageState, ComponentState, ComponentTypeState, DocumentState, EmailDomainState, FileState, IssueState, IssueTypeState, LicenseState, MapState, OrganizationAccessState, OrganizationState, OutboxState, ProjectAccessState, ProjectFileState, ProjectState, RehydratedState, SettingState, FormState, FormRevisionState, FormSubmissionState, UserState, WorkspaceState, TeamState
|
|
6
|
+
import { AuthState, CategoryState, ComponentStageCompletionState, ComponentStageState, ComponentState, ComponentTypeState, DocumentState, EmailDomainState, FileState, IssueState, IssueTypeState, LicenseState, MapState, OrganizationAccessState, OrganizationState, OutboxState, ProjectAccessState, ProjectFileState, ProjectState, RehydratedState, SettingState, FormState, FormRevisionState, FormSubmissionState, UserState, WorkspaceState, TeamState } from "./slices";
|
|
7
7
|
import { VersioningState } from "./slices/versioningSlice";
|
|
8
8
|
import { RootState } from "../typings";
|
|
9
9
|
export declare const overmapReducers: {
|
|
@@ -35,7 +35,6 @@ export declare const overmapReducers: {
|
|
|
35
35
|
licenseReducer: Reducer<LicenseState>;
|
|
36
36
|
documentsReducer: Reducer<DocumentState>;
|
|
37
37
|
teamReducer: Reducer<TeamState>;
|
|
38
|
-
agentsReducer: Reducer<AgentsState>;
|
|
39
38
|
};
|
|
40
39
|
export declare const overmapReducer: Reducer<import("redux").CombinedState<{
|
|
41
40
|
versioning: VersioningState;
|
|
@@ -66,7 +65,6 @@ export declare const overmapReducer: Reducer<import("redux").CombinedState<{
|
|
|
66
65
|
licenseReducer: LicenseState;
|
|
67
66
|
documentsReducer: DocumentState;
|
|
68
67
|
teamReducer: TeamState;
|
|
69
|
-
agentsReducer: AgentsState;
|
|
70
68
|
}>, AnyAction>;
|
|
71
69
|
export declare const resetStore = "RESET";
|
|
72
70
|
export declare const rootReducer: Reducer<RootState>;
|
|
@@ -115,7 +113,6 @@ export declare const defaultStore: import("@reduxjs/toolkit/dist/configureStore"
|
|
|
115
113
|
licenseReducer: LicenseState;
|
|
116
114
|
documentsReducer: DocumentState;
|
|
117
115
|
teamReducer: TeamState;
|
|
118
|
-
agentsReducer: AgentsState;
|
|
119
116
|
} & {
|
|
120
117
|
offline: OfflineState;
|
|
121
118
|
}, AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<RootState, AnyAction>]>>;
|
|
@@ -22,6 +22,13 @@ export interface ProjectAttachment extends Attachment {
|
|
|
22
22
|
export interface DocumentAttachment extends Attachment {
|
|
23
23
|
document: Document["offline_id"];
|
|
24
24
|
}
|
|
25
|
+
export declare enum AttachmentModel {
|
|
26
|
+
Issue = "issue",
|
|
27
|
+
Component = "component",
|
|
28
|
+
ComponentType = "component_type",
|
|
29
|
+
Project = "project",
|
|
30
|
+
Document = "document"
|
|
31
|
+
}
|
|
25
32
|
/** to get an AttachmentPayload for a specific type, pass in the given AttachmentType
|
|
26
33
|
* ex. AttachmentPayload<IssueAttachment> */
|
|
27
34
|
export type AttachmentPayload<TAttachment> = Omit<TAttachment, "file" | "submitted_at" | "created_by"> & {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Model, OfflineModel } from "./base";
|
|
2
2
|
import L from "leaflet";
|
|
3
|
+
import { FileWithNameModel } from "../files";
|
|
3
4
|
export declare enum ProjectType {
|
|
4
5
|
PERSONAL = 0,
|
|
5
6
|
ORGANIZATION = 2
|
|
@@ -14,12 +15,10 @@ export interface Project extends Model {
|
|
|
14
15
|
issues_count?: number;
|
|
15
16
|
form_submissions_count?: number;
|
|
16
17
|
}
|
|
17
|
-
export interface ProjectFile extends
|
|
18
|
-
|
|
19
|
-
name: string;
|
|
18
|
+
export interface ProjectFile extends OfflineModel, FileWithNameModel {
|
|
19
|
+
submitted_at: string;
|
|
20
20
|
z_index: number;
|
|
21
21
|
bounds?: [L.LatLngTuple, L.LatLngTuple];
|
|
22
22
|
project: number;
|
|
23
|
-
objectURL?: string;
|
|
24
23
|
}
|
|
25
24
|
export type ProjectPayload = Omit<Project, "id" | "file" | "fileBlob">;
|
package/dist/utils/utils.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Coordinates, IssueAttachment, OfflineModel, RootState } from "../typings";
|
|
2
2
|
type MemoizedSelectorWithArgs<TArgs, TRet> = (state: RootState, args: TArgs) => TRet;
|
|
3
3
|
export declare const restructureCreateSelectorWithArgs: <TArgs, TRet>(selector: MemoizedSelectorWithArgs<TArgs, TRet>) => (args: TArgs) => (state: RootState) => TRet;
|
|
4
|
-
export declare const createSelectorWithArgs: <TArgs, TRet>(selector: MemoizedSelectorWithArgs<TArgs, TRet>) => (args: TArgs) => (state: RootState) => TRet;
|
|
5
4
|
export declare function onlyUniqueOfflineIds(value: OfflineModel, index: number, self: OfflineModel[]): boolean;
|
|
6
5
|
export declare function onlyUniqueHashes(value: IssueAttachment, index: number, self: IssueAttachment[]): boolean;
|
|
7
6
|
/**
|
package/package.json
CHANGED
|
@@ -1,153 +1,153 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@overmap-ai/core",
|
|
3
|
-
"description": "Core functionality for Overmap",
|
|
4
|
-
"author": "Wôrdn Inc.",
|
|
5
|
-
"license": "UNLICENSED",
|
|
6
|
-
"version": "1.0.53-
|
|
7
|
-
"type": "module",
|
|
8
|
-
"main": "dist/overmap-core.umd.cjs",
|
|
9
|
-
"module": "dist/overmap-core.js",
|
|
10
|
-
"types": "dist/index.d.ts",
|
|
11
|
-
"scripts": {
|
|
12
|
-
"dev": "vite",
|
|
13
|
-
"build": "tsc --noEmit && vite build",
|
|
14
|
-
"lint": "tsc --noEmit && eslint . --ext ts,tsx,js,jsx --report-unused-disable-directives --max-warnings 0",
|
|
15
|
-
"lint:fix": "eslint . --ext ts,tsx,js,jsx --report-unused-disable-directives --max-warnings 0 --fix",
|
|
16
|
-
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md,html,sass,yaml}\"",
|
|
17
|
-
"preview": "vite preview",
|
|
18
|
-
"prepare": "husky install",
|
|
19
|
-
"storybook": "storybook dev -p 6006",
|
|
20
|
-
"build-storybook": "storybook build",
|
|
21
|
-
"test": "npx vitest"
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@hello-pangea/dnd": "^16.5.0",
|
|
25
|
-
"@redux-offline/redux-offline": "^2.6.0",
|
|
26
|
-
"@reduxjs/toolkit": "^1.9.5",
|
|
27
|
-
"color": "^4.2.3",
|
|
28
|
-
"dependency-graph": "^1.0.0",
|
|
29
|
-
"eslint-plugin-vitest": "^0.3.20",
|
|
30
|
-
"file-saver": "^2.0.5",
|
|
31
|
-
"formik": "^2.4.5",
|
|
32
|
-
"idb": "^7.1.1",
|
|
33
|
-
"jwt-decode": "^3.1.2",
|
|
34
|
-
"leaflet-draw": "^1.0.4",
|
|
35
|
-
"leaflet.markercluster": "^1.5.3",
|
|
36
|
-
"linkify-react": "^4.1.3",
|
|
37
|
-
"linkifyjs": "^4.1.3",
|
|
38
|
-
"localforage": "^1.10.0",
|
|
39
|
-
"lodash.clonedeep": "^4.5.0",
|
|
40
|
-
"lodash.get": "^4.4.2",
|
|
41
|
-
"lodash.set": "^4.3.2",
|
|
42
|
-
"qr-scanner": "^1.4.2",
|
|
43
|
-
"react-leaflet": "^4.2.1",
|
|
44
|
-
"react-pdf": "^8.0.2",
|
|
45
|
-
"react-sketch-canvas": "^6.2.0",
|
|
46
|
-
"react-spreadsheet": "^0.9.4",
|
|
47
|
-
"redux-persist-migrate": "^5.0.0",
|
|
48
|
-
"superagent": "^8.1.2",
|
|
49
|
-
"uuid": "^9.0.0",
|
|
50
|
-
"xlsx": "^0.18.5"
|
|
51
|
-
},
|
|
52
|
-
"devDependencies": {
|
|
53
|
-
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
|
54
|
-
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
|
55
|
-
"@overmap-ai/blocks": "^1.0.29-alpha.1",
|
|
56
|
-
"@rollup/plugin-commonjs": "^25.0.4",
|
|
57
|
-
"@storybook/addon-essentials": "7.3.2",
|
|
58
|
-
"@storybook/addon-interactions": "7.3.2",
|
|
59
|
-
"@storybook/addon-links": "7.3.2",
|
|
60
|
-
"@storybook/addon-onboarding": "1.0.8",
|
|
61
|
-
"@storybook/blocks": "7.3.2",
|
|
62
|
-
"@storybook/react": "7.3.2",
|
|
63
|
-
"@storybook/react-vite": "7.3.2",
|
|
64
|
-
"@storybook/testing-library": "0.2.0",
|
|
65
|
-
"@testing-library/dom": "^9.3.4",
|
|
66
|
-
"@testing-library/react": "^14.1.2",
|
|
67
|
-
"@testing-library/user-event": "^14.5.2",
|
|
68
|
-
"@tiptap/core": "^2.4.0",
|
|
69
|
-
"@types/color": "^3.0.4",
|
|
70
|
-
"@types/file-saver": "^2.0.7",
|
|
71
|
-
"@types/jwt-decode": "^3.1.0",
|
|
72
|
-
"@types/leaflet": "^1.9.3",
|
|
73
|
-
"@types/lodash.clonedeep": "^4.5.9",
|
|
74
|
-
"@types/lodash.get": "^4.4.9",
|
|
75
|
-
"@types/lodash.set": "^4.3.9",
|
|
76
|
-
"@types/node": "^20.12.11",
|
|
77
|
-
"@types/react": "^18.3.1",
|
|
78
|
-
"@types/react-dom": "^18.2.7",
|
|
79
|
-
"@types/react-redux": "^7.1.26",
|
|
80
|
-
"@types/superagent": "^4.1.18",
|
|
81
|
-
"@types/uuid": "^9.0.3",
|
|
82
|
-
"@types/xlsx": "^0.0.36",
|
|
83
|
-
"@typescript-eslint/eslint-plugin": "^6.4.1",
|
|
84
|
-
"@typescript-eslint/parser": "^6.4.1",
|
|
85
|
-
"@vitejs/plugin-react-swc": "^3.3.2",
|
|
86
|
-
"@vitest/coverage-v8": "^1.2.1",
|
|
87
|
-
"eslint": "^8.47.0",
|
|
88
|
-
"eslint-config-prettier": "^9.0.0",
|
|
89
|
-
"eslint-plugin-import": "^2.28.1",
|
|
90
|
-
"eslint-plugin-prettier": "^5.0.0",
|
|
91
|
-
"eslint-plugin-react": "^7.33.2",
|
|
92
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
|
93
|
-
"eslint-plugin-react-refresh": "^0.4.3",
|
|
94
|
-
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
95
|
-
"eslint-plugin-storybook": "^0.6.13",
|
|
96
|
-
"happy-dom": "^13.3.1",
|
|
97
|
-
"husky": "^8.0.3",
|
|
98
|
-
"jsdom": "^23.2.0",
|
|
99
|
-
"leaflet": "^1.9.0",
|
|
100
|
-
"lint-staged": "^15.1.0",
|
|
101
|
-
"prettier": "^3.0.2",
|
|
102
|
-
"react": "^18.2.0",
|
|
103
|
-
"react-dom": "^18.2.0",
|
|
104
|
-
"react-hooks": "^1.0.1",
|
|
105
|
-
"react-redux": "^8.1.2",
|
|
106
|
-
"redux": "^4.2.1",
|
|
107
|
-
"rollup-plugin-polyfill-node": "^0.12.0",
|
|
108
|
-
"sass": "^1.66.1",
|
|
109
|
-
"storybook": "7.3.2",
|
|
110
|
-
"typescript": "^5.2.2",
|
|
111
|
-
"vite": "^4.4.5",
|
|
112
|
-
"vite-plugin-dts": "^3.5.2",
|
|
113
|
-
"vite-plugin-externalize-deps": "^0.7.0",
|
|
114
|
-
"vitest": "^1.2.1"
|
|
115
|
-
},
|
|
116
|
-
"peerDependencies": {
|
|
117
|
-
"@overmap-ai/blocks": "1.0.8",
|
|
118
|
-
"@tiptap/core": "^2.4.0",
|
|
119
|
-
"leaflet": "^1.9.0",
|
|
120
|
-
"react": "^18.2.0",
|
|
121
|
-
"react-dom": "^18.2.0",
|
|
122
|
-
"react-redux": "^8.1.2"
|
|
123
|
-
},
|
|
124
|
-
"resolutions": {
|
|
125
|
-
"//": "Workaround for eslint issue: https://github.com/eslint/eslint/discussions/17215",
|
|
126
|
-
"strip-ansi": "6.0.1",
|
|
127
|
-
"string-width": "4.2.2",
|
|
128
|
-
"wrap-ansi": "7.0.0"
|
|
129
|
-
},
|
|
130
|
-
"lint-staged": {
|
|
131
|
-
"src/**/*.{js,jsx,ts,tsx}": [
|
|
132
|
-
"yarn lint",
|
|
133
|
-
"yarn format"
|
|
134
|
-
]
|
|
135
|
-
},
|
|
136
|
-
"files": [
|
|
137
|
-
"dist"
|
|
138
|
-
],
|
|
139
|
-
"keywords": [
|
|
140
|
-
"react",
|
|
141
|
-
"geospacial",
|
|
142
|
-
"map",
|
|
143
|
-
"components"
|
|
144
|
-
],
|
|
145
|
-
"homepage": "https://overmap.ai",
|
|
146
|
-
"repository": {
|
|
147
|
-
"type": "git",
|
|
148
|
-
"url": "git+https://github.com/hemora-app/overmap-core.git"
|
|
149
|
-
},
|
|
150
|
-
"bugs": {
|
|
151
|
-
"url": "https://github.com/hemora-app/overmap-core/issues"
|
|
152
|
-
}
|
|
153
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@overmap-ai/core",
|
|
3
|
+
"description": "Core functionality for Overmap",
|
|
4
|
+
"author": "Wôrdn Inc.",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"version": "1.0.53-attachment-creation-flows.1",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "dist/overmap-core.umd.cjs",
|
|
9
|
+
"module": "dist/overmap-core.js",
|
|
10
|
+
"types": "dist/index.d.ts",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"dev": "vite",
|
|
13
|
+
"build": "tsc --noEmit && vite build",
|
|
14
|
+
"lint": "tsc --noEmit && eslint . --ext ts,tsx,js,jsx --report-unused-disable-directives --max-warnings 0",
|
|
15
|
+
"lint:fix": "eslint . --ext ts,tsx,js,jsx --report-unused-disable-directives --max-warnings 0 --fix",
|
|
16
|
+
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md,html,sass,yaml}\"",
|
|
17
|
+
"preview": "vite preview",
|
|
18
|
+
"prepare": "husky install",
|
|
19
|
+
"storybook": "storybook dev -p 6006",
|
|
20
|
+
"build-storybook": "storybook build",
|
|
21
|
+
"test": "npx vitest"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@hello-pangea/dnd": "^16.5.0",
|
|
25
|
+
"@redux-offline/redux-offline": "^2.6.0",
|
|
26
|
+
"@reduxjs/toolkit": "^1.9.5",
|
|
27
|
+
"color": "^4.2.3",
|
|
28
|
+
"dependency-graph": "^1.0.0",
|
|
29
|
+
"eslint-plugin-vitest": "^0.3.20",
|
|
30
|
+
"file-saver": "^2.0.5",
|
|
31
|
+
"formik": "^2.4.5",
|
|
32
|
+
"idb": "^7.1.1",
|
|
33
|
+
"jwt-decode": "^3.1.2",
|
|
34
|
+
"leaflet-draw": "^1.0.4",
|
|
35
|
+
"leaflet.markercluster": "^1.5.3",
|
|
36
|
+
"linkify-react": "^4.1.3",
|
|
37
|
+
"linkifyjs": "^4.1.3",
|
|
38
|
+
"localforage": "^1.10.0",
|
|
39
|
+
"lodash.clonedeep": "^4.5.0",
|
|
40
|
+
"lodash.get": "^4.4.2",
|
|
41
|
+
"lodash.set": "^4.3.2",
|
|
42
|
+
"qr-scanner": "^1.4.2",
|
|
43
|
+
"react-leaflet": "^4.2.1",
|
|
44
|
+
"react-pdf": "^8.0.2",
|
|
45
|
+
"react-sketch-canvas": "^6.2.0",
|
|
46
|
+
"react-spreadsheet": "^0.9.4",
|
|
47
|
+
"redux-persist-migrate": "^5.0.0",
|
|
48
|
+
"superagent": "^8.1.2",
|
|
49
|
+
"uuid": "^9.0.0",
|
|
50
|
+
"xlsx": "^0.18.5"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
|
54
|
+
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
|
55
|
+
"@overmap-ai/blocks": "^1.0.29-alpha.1",
|
|
56
|
+
"@rollup/plugin-commonjs": "^25.0.4",
|
|
57
|
+
"@storybook/addon-essentials": "7.3.2",
|
|
58
|
+
"@storybook/addon-interactions": "7.3.2",
|
|
59
|
+
"@storybook/addon-links": "7.3.2",
|
|
60
|
+
"@storybook/addon-onboarding": "1.0.8",
|
|
61
|
+
"@storybook/blocks": "7.3.2",
|
|
62
|
+
"@storybook/react": "7.3.2",
|
|
63
|
+
"@storybook/react-vite": "7.3.2",
|
|
64
|
+
"@storybook/testing-library": "0.2.0",
|
|
65
|
+
"@testing-library/dom": "^9.3.4",
|
|
66
|
+
"@testing-library/react": "^14.1.2",
|
|
67
|
+
"@testing-library/user-event": "^14.5.2",
|
|
68
|
+
"@tiptap/core": "^2.4.0",
|
|
69
|
+
"@types/color": "^3.0.4",
|
|
70
|
+
"@types/file-saver": "^2.0.7",
|
|
71
|
+
"@types/jwt-decode": "^3.1.0",
|
|
72
|
+
"@types/leaflet": "^1.9.3",
|
|
73
|
+
"@types/lodash.clonedeep": "^4.5.9",
|
|
74
|
+
"@types/lodash.get": "^4.4.9",
|
|
75
|
+
"@types/lodash.set": "^4.3.9",
|
|
76
|
+
"@types/node": "^20.12.11",
|
|
77
|
+
"@types/react": "^18.3.1",
|
|
78
|
+
"@types/react-dom": "^18.2.7",
|
|
79
|
+
"@types/react-redux": "^7.1.26",
|
|
80
|
+
"@types/superagent": "^4.1.18",
|
|
81
|
+
"@types/uuid": "^9.0.3",
|
|
82
|
+
"@types/xlsx": "^0.0.36",
|
|
83
|
+
"@typescript-eslint/eslint-plugin": "^6.4.1",
|
|
84
|
+
"@typescript-eslint/parser": "^6.4.1",
|
|
85
|
+
"@vitejs/plugin-react-swc": "^3.3.2",
|
|
86
|
+
"@vitest/coverage-v8": "^1.2.1",
|
|
87
|
+
"eslint": "^8.47.0",
|
|
88
|
+
"eslint-config-prettier": "^9.0.0",
|
|
89
|
+
"eslint-plugin-import": "^2.28.1",
|
|
90
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
91
|
+
"eslint-plugin-react": "^7.33.2",
|
|
92
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
93
|
+
"eslint-plugin-react-refresh": "^0.4.3",
|
|
94
|
+
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
95
|
+
"eslint-plugin-storybook": "^0.6.13",
|
|
96
|
+
"happy-dom": "^13.3.1",
|
|
97
|
+
"husky": "^8.0.3",
|
|
98
|
+
"jsdom": "^23.2.0",
|
|
99
|
+
"leaflet": "^1.9.0",
|
|
100
|
+
"lint-staged": "^15.1.0",
|
|
101
|
+
"prettier": "^3.0.2",
|
|
102
|
+
"react": "^18.2.0",
|
|
103
|
+
"react-dom": "^18.2.0",
|
|
104
|
+
"react-hooks": "^1.0.1",
|
|
105
|
+
"react-redux": "^8.1.2",
|
|
106
|
+
"redux": "^4.2.1",
|
|
107
|
+
"rollup-plugin-polyfill-node": "^0.12.0",
|
|
108
|
+
"sass": "^1.66.1",
|
|
109
|
+
"storybook": "7.3.2",
|
|
110
|
+
"typescript": "^5.2.2",
|
|
111
|
+
"vite": "^4.4.5",
|
|
112
|
+
"vite-plugin-dts": "^3.5.2",
|
|
113
|
+
"vite-plugin-externalize-deps": "^0.7.0",
|
|
114
|
+
"vitest": "^1.2.1"
|
|
115
|
+
},
|
|
116
|
+
"peerDependencies": {
|
|
117
|
+
"@overmap-ai/blocks": "1.0.8",
|
|
118
|
+
"@tiptap/core": "^2.4.0",
|
|
119
|
+
"leaflet": "^1.9.0",
|
|
120
|
+
"react": "^18.2.0",
|
|
121
|
+
"react-dom": "^18.2.0",
|
|
122
|
+
"react-redux": "^8.1.2"
|
|
123
|
+
},
|
|
124
|
+
"resolutions": {
|
|
125
|
+
"//": "Workaround for eslint issue: https://github.com/eslint/eslint/discussions/17215",
|
|
126
|
+
"strip-ansi": "6.0.1",
|
|
127
|
+
"string-width": "4.2.2",
|
|
128
|
+
"wrap-ansi": "7.0.0"
|
|
129
|
+
},
|
|
130
|
+
"lint-staged": {
|
|
131
|
+
"src/**/*.{js,jsx,ts,tsx}": [
|
|
132
|
+
"yarn lint",
|
|
133
|
+
"yarn format"
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
"files": [
|
|
137
|
+
"dist"
|
|
138
|
+
],
|
|
139
|
+
"keywords": [
|
|
140
|
+
"react",
|
|
141
|
+
"geospacial",
|
|
142
|
+
"map",
|
|
143
|
+
"components"
|
|
144
|
+
],
|
|
145
|
+
"homepage": "https://overmap.ai",
|
|
146
|
+
"repository": {
|
|
147
|
+
"type": "git",
|
|
148
|
+
"url": "git+https://github.com/hemora-app/overmap-core.git"
|
|
149
|
+
},
|
|
150
|
+
"bugs": {
|
|
151
|
+
"url": "https://github.com/hemora-app/overmap-core/issues"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { BaseApiService } from "./BaseApiService";
|
|
2
|
-
import type { OptimisticModelResult } from "../typings";
|
|
3
|
-
import { ComponentAttachment, ComponentTypeAttachment, Created, IssueAttachment, MaybeObjectURL, AttachmentPayload, Stored, ProjectAttachment, DocumentAttachment, Document } from "../../typings";
|
|
4
|
-
/**
|
|
5
|
-
* Handles creation and caching of attachments
|
|
6
|
-
*/
|
|
7
|
-
interface StoredAttachments {
|
|
8
|
-
issue_attachments: Stored<IssueAttachment>[];
|
|
9
|
-
component_attachments: Stored<ComponentAttachment>[];
|
|
10
|
-
component_type_attachments: Stored<ComponentTypeAttachment>[];
|
|
11
|
-
project_attachments: Stored<ProjectAttachment>[];
|
|
12
|
-
}
|
|
13
|
-
interface CreatedAttachments {
|
|
14
|
-
issue_attachments: Created<IssueAttachment>[];
|
|
15
|
-
component_attachments: Created<ComponentAttachment>[];
|
|
16
|
-
component_type_attachments: Created<ComponentTypeAttachment>[];
|
|
17
|
-
project_attachments: Created<ProjectAttachment>[];
|
|
18
|
-
document_attachments: Created<DocumentAttachment>[];
|
|
19
|
-
}
|
|
20
|
-
export declare class AttachmentService extends BaseApiService {
|
|
21
|
-
fetchAll(projectId: number): [StoredAttachments, Promise<CreatedAttachments>];
|
|
22
|
-
addIssueAttachment(attachmentPayload: AttachmentPayload<IssueAttachment>): Promise<OptimisticModelResult<IssueAttachment>>;
|
|
23
|
-
addComponentAttachment(attachmentPayload: AttachmentPayload<ComponentAttachment>): Promise<OptimisticModelResult<ComponentAttachment>>;
|
|
24
|
-
addComponentTypeAttachment(attachmentPayload: AttachmentPayload<ComponentTypeAttachment>): Promise<OptimisticModelResult<ComponentTypeAttachment>>;
|
|
25
|
-
addDocumentAttachment(attachmentPayload: AttachmentPayload<DocumentAttachment>): Promise<OptimisticModelResult<DocumentAttachment>>;
|
|
26
|
-
/** the outer Promise is needed to await the hashing of each file, which is required before offline use. If wanting to
|
|
27
|
-
* attach promise handlers to the request to add the attachment in the backend, apply it on the promise returned from the
|
|
28
|
-
* OptimisticModelResult. */
|
|
29
|
-
attachFilesToIssue(filesToSubmit: File[], issueId: string): Promise<OptimisticModelResult<IssueAttachment>>[];
|
|
30
|
-
attachFilesToComponent(filesToSubmit: File[], componentId: string): Promise<OptimisticModelResult<ComponentAttachment>>[];
|
|
31
|
-
attachFilesToComponentType(filesToSubmit: File[], componentTypeId: string): Promise<OptimisticModelResult<ComponentTypeAttachment>>[];
|
|
32
|
-
attachFilesToDocument(filesToSubmit: File[], documentId: Document["offline_id"]): Promise<OptimisticModelResult<DocumentAttachment>>[];
|
|
33
|
-
replaceIssueAttachmentFile(attachmentId: string, newFile: MaybeObjectURL<File>): Promise<OptimisticModelResult<IssueAttachment>>;
|
|
34
|
-
replaceComponentAttachmentFile(attachmentId: string, newFile: MaybeObjectURL<File>): Promise<OptimisticModelResult<ComponentAttachment>>;
|
|
35
|
-
replaceComponentTypeAttachmentFile(attachmentId: string, newFile: MaybeObjectURL<File>): Promise<OptimisticModelResult<ComponentTypeAttachment>>;
|
|
36
|
-
replaceDocumentAttachmentFile(attachmentId: string, newFile: MaybeObjectURL<File>): Promise<OptimisticModelResult<DocumentAttachment>>;
|
|
37
|
-
/**
|
|
38
|
-
* Deletes an attachment and associated data in the cloud, in the Redux store and the cache.
|
|
39
|
-
* @param issueAttachmentId
|
|
40
|
-
*/
|
|
41
|
-
deleteIssueAttachment(issueAttachmentId: string): Promise<undefined>;
|
|
42
|
-
deleteComponentAttachment(componentAttachmentId: string): Promise<undefined>;
|
|
43
|
-
deleteComponentTypeAttachment(componentTypeAttachmentId: string): Promise<undefined>;
|
|
44
|
-
deleteDocumentAttachment(documentAttachmentId: string): Promise<undefined>;
|
|
45
|
-
}
|
|
46
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { PayloadAction, Reducer } from "@reduxjs/toolkit";
|
|
2
|
-
import { AgentUserConversation, OfflineIdMapping, RootState, Selector } from "../../typings";
|
|
3
|
-
export interface AgentsState {
|
|
4
|
-
conversations: OfflineIdMapping<AgentUserConversation>;
|
|
5
|
-
}
|
|
6
|
-
export declare const agentsSlice: import("@reduxjs/toolkit").Slice<AgentsState, {
|
|
7
|
-
setConversations: (state: import("immer/dist/internal.js").WritableDraft<AgentsState>, action: PayloadAction<AgentUserConversation[]>) => void;
|
|
8
|
-
addConversation: (state: import("immer/dist/internal.js").WritableDraft<AgentsState>, action: PayloadAction<AgentUserConversation>) => void;
|
|
9
|
-
setConversation: (state: import("immer/dist/internal.js").WritableDraft<AgentsState>, action: PayloadAction<AgentUserConversation>) => void;
|
|
10
|
-
}, "agents">;
|
|
11
|
-
export declare const setConversations: import("@reduxjs/toolkit").ActionCreatorWithPayload<AgentUserConversation[], "agents/setConversations">, addConversation: import("@reduxjs/toolkit").ActionCreatorWithPayload<AgentUserConversation, "agents/addConversation">, setConversation: import("@reduxjs/toolkit").ActionCreatorWithPayload<AgentUserConversation, "agents/setConversation">;
|
|
12
|
-
export declare const selectConversationMapping: (state: RootState) => OfflineIdMapping<AgentUserConversation>;
|
|
13
|
-
export declare const selectConversations: Selector<AgentUserConversation[]>;
|
|
14
|
-
export declare const selectConversation: (args: string) => (state: RootState) => AgentUserConversation | undefined;
|
|
15
|
-
export declare const agentsReducer: Reducer<AgentsState>;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { JSONContent } from "@tiptap/core";
|
|
2
|
-
import { Offline, OptionalFileModel, TimestampedModel } from "./base";
|
|
3
|
-
export interface AgentProfile extends OptionalFileModel {
|
|
4
|
-
/**
|
|
5
|
-
* The name of the agent.
|
|
6
|
-
*/
|
|
7
|
-
name: string;
|
|
8
|
-
/**
|
|
9
|
-
* The description of the agent.
|
|
10
|
-
*/
|
|
11
|
-
description: string;
|
|
12
|
-
}
|
|
13
|
-
export interface PromptAgentResponse {
|
|
14
|
-
/**
|
|
15
|
-
* The response from the agent.
|
|
16
|
-
*/
|
|
17
|
-
response: JSONContent[];
|
|
18
|
-
/**
|
|
19
|
-
* The UUID of the conversation.
|
|
20
|
-
*/
|
|
21
|
-
conversation_id: string;
|
|
22
|
-
/**
|
|
23
|
-
* The UUID of the response (used when submitting ratings)
|
|
24
|
-
*/
|
|
25
|
-
response_id: string;
|
|
26
|
-
/**
|
|
27
|
-
* The profile of the agent. Only included in the first response in a conversation.
|
|
28
|
-
*/
|
|
29
|
-
profile?: AgentProfile;
|
|
30
|
-
}
|
|
31
|
-
export interface AgentProfile extends OptionalFileModel {
|
|
32
|
-
/**
|
|
33
|
-
* The name of the agent.
|
|
34
|
-
*/
|
|
35
|
-
name: string;
|
|
36
|
-
/**
|
|
37
|
-
* The description of the agent.
|
|
38
|
-
*/
|
|
39
|
-
description: string;
|
|
40
|
-
}
|
|
41
|
-
export type AgentUserConversation = Offline<Omit<TimestampedModel, "updated_at">> & {
|
|
42
|
-
profile?: AgentProfile | null;
|
|
43
|
-
tiptap_content: JSONContent[];
|
|
44
|
-
};
|