@overmap-ai/core 1.0.69 → 1.0.71-active-project-state.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/overmap-core.js +59 -163
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +59 -163
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/services/AgentService.d.ts +2 -7
- package/dist/sdk/services/FormService.d.ts +3 -2
- package/dist/sdk/services/FormSubmissionService.d.ts +3 -2
- package/dist/sdk/services/GeoImageService.d.ts +1 -1
- package/dist/sdk/services/TeamService.d.ts +1 -1
- package/dist/sdk/services/WorkspaceService.d.ts +1 -1
- package/dist/store/slices/formRevisionSlice.d.ts +13 -13
- package/dist/store/slices/projectAccessSlice.d.ts +0 -1
- package/dist/store/slices/projectFileSlice.d.ts +1 -1
- package/dist/store/slices/projectSlice.d.ts +3 -18
- package/dist/typings/models/base.d.ts +1 -2
- package/dist/typings/models/forms.d.ts +1 -87
- package/dist/typings/models/license.d.ts +2 -2
- package/dist/typings/models/projects.d.ts +2 -4
- package/package.json +5 -3
|
@@ -2,13 +2,8 @@ import type { AgentUserConversation, OvermapRootState } from "../../typings";
|
|
|
2
2
|
import { BaseApiService } from "./BaseApiService";
|
|
3
3
|
import type { BaseSDK } from "../base";
|
|
4
4
|
export declare abstract class AgentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
5
|
-
startConversation(prompt: string): Promise<AgentUserConversation>;
|
|
6
|
-
|
|
7
|
-
* Prompt the agent with a message.
|
|
8
|
-
* @param prompt The message to prompt the agent with.
|
|
9
|
-
* @param conversationId If continuing an existing message, the UUID of that conversation.
|
|
10
|
-
*/
|
|
11
|
-
continueConversation(prompt: string, conversationId: AgentUserConversation["offline_id"]): Promise<void>;
|
|
5
|
+
startConversation(prompt: string, projectId: number): Promise<AgentUserConversation>;
|
|
6
|
+
continueConversation(prompt: string, conversationId: AgentUserConversation["offline_id"], projectId: number): Promise<void>;
|
|
12
7
|
fetchDetails(conversationId: AgentUserConversation["offline_id"]): Promise<void>;
|
|
13
8
|
rate(responseId: string, rating: 1 | 5): Promise<undefined>;
|
|
14
9
|
refreshStore(projectId: number): Promise<void>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { Form, FormRevision, FormRevisionAttachment, FormRevisionPayload,
|
|
1
|
+
import type { Form, FormRevision, FormRevisionAttachment, FormRevisionPayload, OvermapRootState, Stored, Created } from "../../typings";
|
|
2
2
|
import type { BaseSDK } from "../base";
|
|
3
3
|
import { BaseUploadService } from "./BaseUploadService";
|
|
4
|
+
import { ISerializedField } from "@overmap-ai/forms";
|
|
4
5
|
export declare abstract class FormService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
|
|
5
6
|
private bulkAddRevisionAttachments;
|
|
6
7
|
private add;
|
|
@@ -14,6 +15,6 @@ export declare abstract class FormService<TState extends OvermapRootState, TSDK
|
|
|
14
15
|
Promise<Created<FormRevision>>,
|
|
15
16
|
Promise<Created<FormRevisionAttachment>[]>
|
|
16
17
|
]>;
|
|
17
|
-
delete(
|
|
18
|
+
delete(id: string): Promise<undefined>;
|
|
18
19
|
refreshStore(projectId: number): Promise<void>;
|
|
19
20
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { Created,
|
|
1
|
+
import type { Created, FormSubmission, FormSubmissionAttachment, Offline, OvermapRootState, Payload, Stored } from "../../typings";
|
|
2
2
|
import type { PresignedUrlsResponse } from "../typings";
|
|
3
3
|
import type { BaseSDK } from "../base";
|
|
4
4
|
import { BaseUploadService } from "./BaseUploadService";
|
|
5
|
+
import { FieldValue } from "@overmap-ai/forms";
|
|
5
6
|
interface BulkAddRequestReturnValue {
|
|
6
7
|
submissions: Created<FormSubmission>[];
|
|
7
8
|
attachments: Created<FormSubmissionAttachment>[];
|
|
@@ -28,7 +29,7 @@ export declare abstract class FormSubmissionService<TState extends OvermapRootSt
|
|
|
28
29
|
Promise<Created<FormSubmissionAttachment>[]>,
|
|
29
30
|
Promise<void>
|
|
30
31
|
]>;
|
|
31
|
-
delete(
|
|
32
|
+
delete(id: string): Promise<undefined>;
|
|
32
33
|
refreshStore(projectId: number): Promise<void>;
|
|
33
34
|
}
|
|
34
35
|
export {};
|
|
@@ -6,6 +6,6 @@ export declare abstract class GeoImageService<TState extends OvermapRootState, T
|
|
|
6
6
|
add(payload: GeoImagePayload): Promise<OptimisticModelResult<GeoImage>>;
|
|
7
7
|
bulkAdd(payloads: BulkGeoImagePayload[], projectId: number): Promise<OptimisticMultipleModelResult<GeoImage>>;
|
|
8
8
|
update(payload: Offline<Partial<Pick<GeoImagePayload, "title" | "description">>>): OptimisticModelResult<GeoImage>;
|
|
9
|
-
delete(
|
|
9
|
+
delete(id: string): Promise<void>;
|
|
10
10
|
refreshStore(projectId: number): Promise<void>;
|
|
11
11
|
}
|
|
@@ -5,7 +5,7 @@ import type { BaseSDK } from "../base";
|
|
|
5
5
|
export declare abstract class TeamService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
6
6
|
add(payload: Payload<Team>): OptimisticModelResult<Team>;
|
|
7
7
|
update(payload: Offline<Partial<Payload<Team>>>): OptimisticModelResult<Team>;
|
|
8
|
-
delete(
|
|
8
|
+
delete(id: string): Promise<undefined>;
|
|
9
9
|
setMembers(teamId: string, members: User["id"][]): Promise<undefined>;
|
|
10
10
|
addMembers(teamId: string, members: User["id"][]): Promise<undefined>;
|
|
11
11
|
removeMembers(teamId: string, members: User["id"][]): Promise<undefined>;
|
|
@@ -5,6 +5,6 @@ import type { BaseSDK } from "../base";
|
|
|
5
5
|
export declare abstract class WorkspaceService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
6
6
|
add(payload: Payload<Workspace>): OptimisticModelResult<Workspace>;
|
|
7
7
|
update(payload: Offline<Partial<Payload<Workspace>>>): OptimisticModelResult<Workspace>;
|
|
8
|
-
delete(
|
|
8
|
+
delete(id: string): Promise<undefined>;
|
|
9
9
|
refreshStore(projectId: number): Promise<undefined>;
|
|
10
10
|
}
|
|
@@ -3,34 +3,34 @@ import type { Form, FormRevision, OvermapRootState, OvermapSelector, OvermapSele
|
|
|
3
3
|
import type { ModelState } from "../typings";
|
|
4
4
|
export type FormRevisionState = ModelState<Stored<FormRevision>>;
|
|
5
5
|
export declare const formRevisionsSlice: import("@reduxjs/toolkit").Slice<FormRevisionState, {
|
|
6
|
-
initializeFormRevisions: <TState extends ModelState<Stored<FormRevision<import(
|
|
7
|
-
payload: Stored<FormRevision<import(
|
|
6
|
+
initializeFormRevisions: <TState extends ModelState<Stored<FormRevision<import("@overmap-ai/forms").ISerializedField>>>>(state: TState, action: {
|
|
7
|
+
payload: Stored<FormRevision<import("@overmap-ai/forms").ISerializedField>>[];
|
|
8
8
|
type: string;
|
|
9
9
|
}) => void;
|
|
10
|
-
setFormRevision: <TState_1 extends ModelState<Stored<FormRevision<import(
|
|
11
|
-
payload: Stored<FormRevision<import(
|
|
10
|
+
setFormRevision: <TState_1 extends ModelState<Stored<FormRevision<import("@overmap-ai/forms").ISerializedField>>>>(state: TState_1, action: {
|
|
11
|
+
payload: Stored<FormRevision<import("@overmap-ai/forms").ISerializedField>>;
|
|
12
12
|
type: string;
|
|
13
13
|
}) => void;
|
|
14
|
-
addFormRevision: <TState_2 extends ModelState<Stored<FormRevision<import(
|
|
15
|
-
payload: Stored<FormRevision<import(
|
|
14
|
+
addFormRevision: <TState_2 extends ModelState<Stored<FormRevision<import("@overmap-ai/forms").ISerializedField>>>>(state: TState_2, action: {
|
|
15
|
+
payload: Stored<FormRevision<import("@overmap-ai/forms").ISerializedField>>;
|
|
16
16
|
type: string;
|
|
17
17
|
}) => void;
|
|
18
|
-
addFormRevisions: <TState_3 extends ModelState<Stored<FormRevision<import(
|
|
19
|
-
payload: Stored<FormRevision<import(
|
|
18
|
+
addFormRevisions: <TState_3 extends ModelState<Stored<FormRevision<import("@overmap-ai/forms").ISerializedField>>>>(state: TState_3, action: {
|
|
19
|
+
payload: Stored<FormRevision<import("@overmap-ai/forms").ISerializedField>>[];
|
|
20
20
|
type: string;
|
|
21
21
|
}) => void;
|
|
22
|
-
deleteFormRevision: <TState_4 extends ModelState<Stored<FormRevision<import(
|
|
22
|
+
deleteFormRevision: <TState_4 extends ModelState<Stored<FormRevision<import("@overmap-ai/forms").ISerializedField>>>>(state: TState_4, action: {
|
|
23
23
|
payload: string;
|
|
24
24
|
type: string;
|
|
25
25
|
}) => void;
|
|
26
|
-
deleteFormRevisions: <TState_5 extends ModelState<Stored<FormRevision<import(
|
|
26
|
+
deleteFormRevisions: <TState_5 extends ModelState<Stored<FormRevision<import("@overmap-ai/forms").ISerializedField>>>>(state: TState_5, action: {
|
|
27
27
|
payload: string[];
|
|
28
28
|
type: string;
|
|
29
29
|
}) => void;
|
|
30
30
|
}, "formRevisions">;
|
|
31
|
-
export declare const setFormRevision: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormRevision<import(
|
|
32
|
-
export declare const selectFormRevisionMapping: (state: OvermapRootState) => Record<string, Stored<FormRevision<import(
|
|
33
|
-
export declare const selectFormRevisions: ((state: OvermapRootState) => Stored<FormRevision<import(
|
|
31
|
+
export declare const setFormRevision: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormRevision<import("@overmap-ai/forms").ISerializedField>>, "formRevisions/setFormRevision">, initializeFormRevisions: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormRevision<import("@overmap-ai/forms").ISerializedField>>[], "formRevisions/initializeFormRevisions">, addFormRevision: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormRevision<import("@overmap-ai/forms").ISerializedField>>, "formRevisions/addFormRevision">, addFormRevisions: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormRevision<import("@overmap-ai/forms").ISerializedField>>[], "formRevisions/addFormRevisions">, deleteFormRevision: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "formRevisions/deleteFormRevision">, deleteFormRevisions: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "formRevisions/deleteFormRevisions">;
|
|
32
|
+
export declare const selectFormRevisionMapping: (state: OvermapRootState) => Record<string, Stored<FormRevision<import("@overmap-ai/forms").ISerializedField>>>;
|
|
33
|
+
export declare const selectFormRevisions: ((state: OvermapRootState) => Stored<FormRevision<import("@overmap-ai/forms").ISerializedField>>[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, Stored<FormRevision<import("@overmap-ai/forms").ISerializedField>>>) => Stored<FormRevision<import("@overmap-ai/forms").ISerializedField>>[], {
|
|
34
34
|
clearCache: () => void;
|
|
35
35
|
}> & {
|
|
36
36
|
clearCache: () => void;
|
|
@@ -24,7 +24,6 @@ export declare const initializeProjectAccesses: import("@reduxjs/toolkit").Actio
|
|
|
24
24
|
export declare const selectProjectAccessMapping: (state: OvermapRootState) => Record<string, ProjectAccess>;
|
|
25
25
|
export declare const selectProjectAccesses: OvermapSelector<Stored<ProjectAccess>[]>;
|
|
26
26
|
export declare const selectProjectAccessById: OvermapSelectorWithArgs<string, ProjectAccess | undefined>;
|
|
27
|
-
export declare const selectActiveProjectAccess: OvermapSelector<ProjectAccess | null>;
|
|
28
27
|
export declare const selectProjectAccessForUser: OvermapSelectorWithArgs<User, ProjectAccess | undefined>;
|
|
29
28
|
export declare const selectProjectAccessUserMapping: OvermapSelector<Record<string, ProjectAccess>>;
|
|
30
29
|
export declare const projectAccessReducer: Reducer<ProjectAccessState>;
|
|
@@ -35,7 +35,7 @@ export declare const projectFileSlice: import("@reduxjs/toolkit").Slice<ProjectF
|
|
|
35
35
|
}, "projectFiles">;
|
|
36
36
|
export declare const addOrReplaceProjectFiles: import("@reduxjs/toolkit").ActionCreatorWithPayload<ProjectFile[], "projectFiles/addOrReplaceProjectFiles">, addOrReplaceProjectFile: import("@reduxjs/toolkit").ActionCreatorWithPayload<ProjectFile, "projectFiles/addOrReplaceProjectFile">, setIsImportingProjectFile: import("@reduxjs/toolkit").ActionCreatorWithPayload<boolean, "projectFiles/setIsImportingProjectFile">, setActiveProjectFileId: import("@reduxjs/toolkit").ActionCreatorWithPayload<string | null, "projectFiles/setActiveProjectFileId">, saveActiveProjectFileBounds: import("@reduxjs/toolkit").ActionCreatorWithPayload<MultiPointGeometry, "projectFiles/saveActiveProjectFileBounds">, removeProjectFile: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "projectFiles/removeProjectFile">, removeProjectFilesOfProject: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "projectFiles/removeProjectFilesOfProject">, resetProjectFileObjectUrls: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"projectFiles/resetProjectFileObjectUrls">;
|
|
37
37
|
export declare const selectProjectFileMapping: (state: OvermapRootState) => Record<string, ProjectFile>;
|
|
38
|
-
export declare const selectProjectFiles: ((state: OvermapRootState) => ProjectFile[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, ProjectFile
|
|
38
|
+
export declare const selectProjectFiles: ((state: OvermapRootState) => ProjectFile[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, ProjectFile>) => ProjectFile[], {
|
|
39
39
|
clearCache: () => void;
|
|
40
40
|
}> & {
|
|
41
41
|
clearCache: () => void;
|
|
@@ -1,40 +1,25 @@
|
|
|
1
1
|
import { Reducer } from "@reduxjs/toolkit";
|
|
2
|
-
import type {
|
|
2
|
+
import type { OvermapSelector, OvermapSelectorWithArgs, Project, User } from "../../typings";
|
|
3
3
|
export interface ProjectState {
|
|
4
4
|
projects: Record<number, Project>;
|
|
5
|
-
activeProjectId: number | null;
|
|
6
5
|
}
|
|
7
6
|
export declare const projectSlice: import("@reduxjs/toolkit").Slice<ProjectState, {
|
|
8
7
|
setProjects: (state: import("immer/dist/internal.js").WritableDraft<ProjectState>, action: {
|
|
9
8
|
payload: Project[];
|
|
10
9
|
}) => void;
|
|
11
|
-
|
|
12
|
-
payload: number | null;
|
|
13
|
-
}) => void;
|
|
14
|
-
updateOrCreateProject: (state: import("immer/dist/internal.js").WritableDraft<ProjectState>, action: {
|
|
10
|
+
updateProject: (state: import("immer/dist/internal.js").WritableDraft<ProjectState>, action: {
|
|
15
11
|
payload: Project;
|
|
16
12
|
}) => void;
|
|
17
|
-
updateOrCreateProjects: (state: import("immer/dist/internal.js").WritableDraft<ProjectState>, action: {
|
|
18
|
-
payload: Project[];
|
|
19
|
-
}) => void;
|
|
20
13
|
deleteProject: (state: import("immer/dist/internal.js").WritableDraft<ProjectState>, action: {
|
|
21
14
|
payload: Project;
|
|
22
15
|
}) => void;
|
|
23
16
|
acceptProjectInvite: (state: import("immer/dist/internal.js").WritableDraft<ProjectState>, action: {
|
|
24
17
|
payload: number;
|
|
25
18
|
}) => void;
|
|
26
|
-
addActiveProjectIssuesCount: (state: import("immer/dist/internal.js").WritableDraft<ProjectState>, action: {
|
|
27
|
-
payload: number;
|
|
28
|
-
}) => void;
|
|
29
|
-
addActiveProjectFormSubmissionsCount: (state: import("immer/dist/internal.js").WritableDraft<ProjectState>, action: {
|
|
30
|
-
payload: number;
|
|
31
|
-
}) => void;
|
|
32
19
|
}, "projects">;
|
|
33
|
-
export declare const setProjects: import("@reduxjs/toolkit").ActionCreatorWithPayload<Project[], "projects/setProjects">,
|
|
20
|
+
export declare const setProjects: import("@reduxjs/toolkit").ActionCreatorWithPayload<Project[], "projects/setProjects">, updateProject: import("@reduxjs/toolkit").ActionCreatorWithPayload<Project, "projects/updateProject">, deleteProject: import("@reduxjs/toolkit").ActionCreatorWithPayload<Project, "projects/deleteProject">, acceptProjectInvite: import("@reduxjs/toolkit").ActionCreatorWithPayload<number, "projects/acceptProjectInvite">;
|
|
34
21
|
export declare const projectReducer: Reducer<ProjectState>;
|
|
35
22
|
export declare const selectProjectMapping: OvermapSelector<Record<number, Project>>;
|
|
36
|
-
export declare const selectActiveProjectId: (state: OvermapRootState) => number | null;
|
|
37
|
-
export declare const selectActiveProject: (state: OvermapRootState) => Project | null;
|
|
38
23
|
export declare const selectProjectById: OvermapSelectorWithArgs<number, Project | undefined>;
|
|
39
24
|
export declare const selectProjectUsersIds: OvermapSelector<number[]>;
|
|
40
25
|
export declare const selectProjectUsersAsMapping: OvermapSelector<Record<number, User>>;
|
|
@@ -30,8 +30,7 @@ export interface OptionalFileModel {
|
|
|
30
30
|
file?: string | null;
|
|
31
31
|
objectURL?: string;
|
|
32
32
|
}
|
|
33
|
-
export interface
|
|
34
|
-
user_owner: number;
|
|
33
|
+
export interface OwnedByOrganization {
|
|
35
34
|
organization_owner: number;
|
|
36
35
|
}
|
|
37
36
|
export interface SubmittedAtModel {
|
|
@@ -1,91 +1,6 @@
|
|
|
1
|
-
import { HTMLInputTypeAttribute } from "react";
|
|
2
1
|
import type { CreatedByModel, OfflineModel, Payload, SubmittedAtModel, TimestampedModel } from "./base";
|
|
3
2
|
import type { Attachment } from "./attachments";
|
|
4
|
-
|
|
5
|
-
label: string;
|
|
6
|
-
required: boolean;
|
|
7
|
-
image?: File | Promise<File>;
|
|
8
|
-
}
|
|
9
|
-
export interface SerializedCondition<TValue extends FieldValue = FieldValue> {
|
|
10
|
-
identifier: string;
|
|
11
|
-
value: TValue;
|
|
12
|
-
}
|
|
13
|
-
export interface SerializedFieldSection extends BaseSerializedObject {
|
|
14
|
-
label: string | null;
|
|
15
|
-
type: "section";
|
|
16
|
-
conditional: boolean;
|
|
17
|
-
condition: SerializedCondition | null;
|
|
18
|
-
fields: Exclude<ISerializedField, SerializedFieldSection>[];
|
|
19
|
-
}
|
|
20
|
-
interface BaseSerializedStringField extends BaseSerializedField {
|
|
21
|
-
minimum_length?: number;
|
|
22
|
-
maximum_length: number;
|
|
23
|
-
placeholder?: string;
|
|
24
|
-
}
|
|
25
|
-
export type StringInputType = Exclude<HTMLInputTypeAttribute, "checkbox" | "number" | "button">;
|
|
26
|
-
export interface SerializedStringField extends BaseSerializedStringField {
|
|
27
|
-
type: "string";
|
|
28
|
-
input_type?: StringInputType;
|
|
29
|
-
}
|
|
30
|
-
export interface SerializedQrField extends BaseSerializedField {
|
|
31
|
-
type: "qr";
|
|
32
|
-
}
|
|
33
|
-
export interface SerializedTextField extends BaseSerializedStringField {
|
|
34
|
-
type: "text";
|
|
35
|
-
}
|
|
36
|
-
export interface SerializedMultiStringField extends BaseSerializedStringField {
|
|
37
|
-
type: "multi-string";
|
|
38
|
-
}
|
|
39
|
-
export interface SerializedBooleanField extends BaseSerializedField {
|
|
40
|
-
type: "boolean";
|
|
41
|
-
}
|
|
42
|
-
export interface SerializedNumberField extends BaseSerializedField {
|
|
43
|
-
type: "number";
|
|
44
|
-
minimum: number | undefined;
|
|
45
|
-
maximum: number | undefined;
|
|
46
|
-
integers: boolean;
|
|
47
|
-
placeholder?: string;
|
|
48
|
-
}
|
|
49
|
-
export interface SerializedDateField extends BaseSerializedField {
|
|
50
|
-
type: "date";
|
|
51
|
-
}
|
|
52
|
-
export type SelectFieldOptionValue = string;
|
|
53
|
-
/** Represents an option in the select input. Not to be confused with the 'field options' of SelectField. */
|
|
54
|
-
export interface SelectFieldOption {
|
|
55
|
-
value: SelectFieldOptionValue;
|
|
56
|
-
label: string;
|
|
57
|
-
}
|
|
58
|
-
export interface SerializedSelectField extends BaseSerializedField {
|
|
59
|
-
type: "select";
|
|
60
|
-
options: SelectFieldOption[];
|
|
61
|
-
placeholder?: string;
|
|
62
|
-
}
|
|
63
|
-
export interface SerializedMultiSelectField extends BaseSerializedField {
|
|
64
|
-
type: "multi-select";
|
|
65
|
-
options: SelectFieldOption[];
|
|
66
|
-
placeholder?: string;
|
|
67
|
-
}
|
|
68
|
-
export interface SerializedUploadField extends BaseSerializedField {
|
|
69
|
-
type: "upload";
|
|
70
|
-
/** @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept */
|
|
71
|
-
extensions?: string[];
|
|
72
|
-
/** in bytes */
|
|
73
|
-
maximum_size?: number;
|
|
74
|
-
/** how many files the user can upload to this field
|
|
75
|
-
* @default 1
|
|
76
|
-
*/
|
|
77
|
-
maximum_files?: number;
|
|
78
|
-
}
|
|
79
|
-
export type ISerializedField = SerializedTextField | SerializedBooleanField | SerializedNumberField | SerializedDateField | SerializedStringField | SerializedSelectField | SerializedFieldSection | SerializedMultiStringField | SerializedMultiSelectField | SerializedUploadField | SerializedQrField;
|
|
80
|
-
export type ISerializedOnlyField = Exclude<ISerializedField, SerializedFieldSection>;
|
|
81
|
-
/** All the possible field values */
|
|
82
|
-
export type FieldValue = string | number | boolean | string[] | File[] | Date | null;
|
|
83
|
-
export type FieldTypeIdentifier = "string" | "text" | "boolean" | "number" | "date" | "select" | "custom" | "section" | "multi-string" | "multi-select" | "upload" | "qr";
|
|
84
|
-
export interface BaseSerializedObject<TIdentifier extends FieldTypeIdentifier = FieldTypeIdentifier> {
|
|
85
|
-
description?: string | null;
|
|
86
|
-
identifier: string;
|
|
87
|
-
type: TIdentifier;
|
|
88
|
-
}
|
|
3
|
+
import type { BaseSerializedObject, FieldValue, ISerializedField } from "@overmap-ai/forms";
|
|
89
4
|
export interface Form extends OfflineModel, SubmittedAtModel, CreatedByModel {
|
|
90
5
|
asset_type?: string;
|
|
91
6
|
issue_type?: string;
|
|
@@ -124,4 +39,3 @@ export interface FormRevisionAttachment extends Attachment {
|
|
|
124
39
|
revision: string;
|
|
125
40
|
field_identifier: string;
|
|
126
41
|
}
|
|
127
|
-
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { OfflineModel,
|
|
1
|
+
import type { OfflineModel, OwnedByOrganization } from "./base";
|
|
2
2
|
import type { LicenseLevel, LicenseStatus } from "../../enums";
|
|
3
3
|
export interface Transaction {
|
|
4
4
|
id: string;
|
|
5
5
|
}
|
|
6
|
-
export interface License extends OfflineModel,
|
|
6
|
+
export interface License extends OfflineModel, OwnedByOrganization {
|
|
7
7
|
project: number | null;
|
|
8
8
|
level: LicenseLevel;
|
|
9
9
|
status: LicenseStatus;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import type { Model, OfflineModel, SubmittedAtModel } from "./base";
|
|
1
|
+
import type { Model, OfflineModel, OwnedByOrganization, SubmittedAtModel } from "./base";
|
|
2
2
|
import type { FileWithNameModel } from "../files";
|
|
3
3
|
import type { BoundableModel, CanvasBoundableModel } from "./geo";
|
|
4
|
-
export interface Project extends Model, BoundableModel, CanvasBoundableModel {
|
|
4
|
+
export interface Project extends Model, BoundableModel, CanvasBoundableModel, OwnedByOrganization {
|
|
5
5
|
id: number;
|
|
6
6
|
name: string;
|
|
7
|
-
organization_owner: number | null;
|
|
8
|
-
user_owner: number | null;
|
|
9
7
|
invited?: boolean;
|
|
10
8
|
issues_count?: number;
|
|
11
9
|
form_submissions_count?: number;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Core functionality for Overmap",
|
|
4
4
|
"author": "Wôrdn Inc.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
|
-
"version": "1.0.
|
|
6
|
+
"version": "1.0.71-active-project-state.0",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/overmap-core.umd.cjs",
|
|
9
9
|
"module": "dist/overmap-core.js",
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
|
41
41
|
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
|
42
|
-
"@overmap-ai/blocks": "1.0.
|
|
42
|
+
"@overmap-ai/blocks": "^1.0.35-radio-card.2",
|
|
43
|
+
"@overmap-ai/forms": "^1.0.17-radio-field.16",
|
|
43
44
|
"@rollup/plugin-commonjs": "^25.0.4",
|
|
44
45
|
"@testing-library/dom": "^9.3.4",
|
|
45
46
|
"@testing-library/react": "^14.1.2",
|
|
@@ -86,7 +87,8 @@
|
|
|
86
87
|
"vitest": "^1.2.1"
|
|
87
88
|
},
|
|
88
89
|
"peerDependencies": {
|
|
89
|
-
"@overmap-ai/blocks": "1.0.
|
|
90
|
+
"@overmap-ai/blocks": "^1.0.35-radio-card.2",
|
|
91
|
+
"@overmap-ai/forms": "^1.0.17-radio-field.16",
|
|
90
92
|
"@tiptap/core": "^2.4.0",
|
|
91
93
|
"leaflet": "^1.9.0",
|
|
92
94
|
"react": ">=18.2.0 <20.0.0",
|