@overmap-ai/core 1.0.48-activity-history.1 → 1.0.48-activity-history.2

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/sdk/sdk.d.ts CHANGED
@@ -1,10 +1,11 @@
1
- import { AttachmentService, AuthService, CategoryService, ComponentService, ComponentStageCompletionService, ComponentStageService, ComponentTypeService, EmailVerificationService, FileService, IssueCommentService, IssueService, MainService, OrganizationAccessService, ProjectAccessService, ProjectFileService, ProjectService, UserFormService, UserFormSubmissionService, WorkspaceService, OrganizationService, EmailDomainsService, LicenseService, DocumentService, IssueUpdateService } from "./services";
1
+ import { AttachmentService, AuthService, CategoryService, ComponentService, ComponentStageCompletionService, ComponentStageService, ComponentTypeService, EmailVerificationService, FileService, IssueCommentService, IssueService, MainService, OrganizationAccessService, ProjectAccessService, ProjectFileService, ProjectService, UserFormService, UserFormSubmissionService, WorkspaceService, OrganizationService, EmailDomainsService, LicenseService, DocumentService, IssueUpdateService, AgentService } from "./services";
2
2
  import { ToolkitStore } from "@reduxjs/toolkit/dist/configureStore.js";
3
3
  import { RootState } from "../typings";
4
4
  export declare class OvermapSDK {
5
5
  readonly API_URL: string;
6
6
  readonly store: ToolkitStore<RootState>;
7
7
  constructor(apiUrl: string, store: ToolkitStore<RootState>);
8
+ agent: AgentService;
8
9
  files: FileService;
9
10
  attachments: AttachmentService;
10
11
  auth: AuthService;
@@ -0,0 +1,39 @@
1
+ import { BaseApiService } from "./BaseApiService";
2
+ import { OptionalFileModel, Payload } from "../../typings";
3
+ import { JSONContent } from "@tiptap/core";
4
+ export interface AgentProfile extends OptionalFileModel {
5
+ /**
6
+ * The name of the agent.
7
+ */
8
+ name: string;
9
+ /**
10
+ * The description of the agent.
11
+ */
12
+ description: string;
13
+ }
14
+ export interface PromptAgentResponse {
15
+ /**
16
+ * The response from the agent.
17
+ */
18
+ response: JSONContent[];
19
+ /**
20
+ * The UUID of the conversation.
21
+ */
22
+ conversation_id: string;
23
+ /**
24
+ * The UUID of the response (used when submitting ratings)
25
+ */
26
+ response_id: string;
27
+ /**
28
+ * The profile of the agent. Only included in the first response in a conversation.
29
+ */
30
+ profile?: AgentProfile;
31
+ }
32
+ export declare class AgentService extends BaseApiService {
33
+ /**
34
+ * Prompt the agent with a message.
35
+ * @param request The message to prompt the agent with.
36
+ * @param conversationId If continuing an existing message, the UUID of that conversation.
37
+ */
38
+ prompt(request: Payload<string>, conversationId?: string): Promise<PromptAgentResponse>;
39
+ }
@@ -35,7 +35,7 @@ export declare class AuthService extends BaseApiService {
35
35
  /**
36
36
  * Attempts to renew tokens
37
37
  */
38
- renewTokens(): Promise<void>;
38
+ renewTokens(): Promise<undefined>;
39
39
  /**
40
40
  * Register a new user
41
41
  */
@@ -1,4 +1,4 @@
1
- import { BaseApiService } from "./BaseApiService.ts";
1
+ import { BaseApiService } from "./BaseApiService";
2
2
  import { License, Project, Transaction } from "../../typings";
3
3
  export declare class LicenseService extends BaseApiService {
4
4
  fetchLicensesForOrganization(organizationId: number, showLoading?: boolean): Promise<License[]>;
@@ -23,3 +23,4 @@ export * from "./EmailDomainsService";
23
23
  export * from "./OrganizationService";
24
24
  export * from "./LicenseService";
25
25
  export * from "./DocumentService";
26
+ export * from "./AgentService";
@@ -15,7 +15,7 @@ export declare const componentSlice: import("@reduxjs/toolkit").Slice<ComponentS
15
15
  payload: Component[];
16
16
  }) => void;
17
17
  setComponentAttachments: (state: ComponentState, action: {
18
- payload: import('../../typings/models/issues.ts').Created<ComponentAttachment>[];
18
+ payload: import('../../typings/models/issues').Created<ComponentAttachment>[];
19
19
  type: string;
20
20
  }) => void;
21
21
  addComponentAttachment: (state: ComponentState, action: {
@@ -59,5 +59,5 @@ export declare const selectAttachmentsOfComponentByType: (args: string) => (stat
59
59
  fileAttachments: Stored<ComponentAttachment>[];
60
60
  imageAttachments: Stored<ComponentAttachment>[];
61
61
  };
62
- export declare const addComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<Component, "components/addComponent">, updateComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<Component, "components/updateComponent">, removeComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "components/removeComponent">, addComponentsInBatches: import("@reduxjs/toolkit").ActionCreatorWithPayload<(Component | Submitted<Component>)[], "components/addComponentsInBatches">, setComponents: import("@reduxjs/toolkit").ActionCreatorWithPayload<Component[], "components/setComponents">, setComponentAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<import('../../typings/models/issues.ts').Created<ComponentAttachment>[], "components/setComponentAttachments">, addComponentAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<Submitted<ComponentAttachment>, "components/addComponentAttachment">, addComponentAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Submitted<ComponentAttachment>[], "components/addComponentAttachments">, updateComponentAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<Submitted<ComponentAttachment>, "components/updateComponentAttachment">, removeComponentAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "components/removeComponentAttachment">, removeComponentAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "components/removeComponentAttachments">, removeAllComponentsOfType: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "components/removeAllComponentsOfType">;
62
+ export declare const addComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<Component, "components/addComponent">, updateComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<Component, "components/updateComponent">, removeComponent: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "components/removeComponent">, addComponentsInBatches: import("@reduxjs/toolkit").ActionCreatorWithPayload<(Component | Submitted<Component>)[], "components/addComponentsInBatches">, setComponents: import("@reduxjs/toolkit").ActionCreatorWithPayload<Component[], "components/setComponents">, setComponentAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<import('../../typings/models/issues').Created<ComponentAttachment>[], "components/setComponentAttachments">, addComponentAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<Submitted<ComponentAttachment>, "components/addComponentAttachment">, addComponentAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Submitted<ComponentAttachment>[], "components/addComponentAttachments">, updateComponentAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<Submitted<ComponentAttachment>, "components/updateComponentAttachment">, removeComponentAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "components/removeComponentAttachment">, removeComponentAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "components/removeComponentAttachments">, removeAllComponentsOfType: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "components/removeAllComponentsOfType">;
63
63
  export declare const componentReducer: Reducer<ComponentState>;
@@ -13,19 +13,19 @@ export declare const componentTypeSlice: import("@reduxjs/toolkit").Slice<Compon
13
13
  payload: ComponentType[];
14
14
  }) => void;
15
15
  setComponentTypeAttachments: (state: ComponentTypeState, action: {
16
- payload: import('../../typings/models/issues.ts').Created<ComponentTypeAttachment>[];
16
+ payload: import('../../typings/models/issues').Created<ComponentTypeAttachment>[];
17
17
  type: string;
18
18
  }) => void;
19
19
  addComponentTypeAttachment: (state: ComponentTypeState, action: {
20
- payload: import('../../typings/models/issues.ts').Submitted<ComponentTypeAttachment>;
20
+ payload: import('../../typings/models/issues').Submitted<ComponentTypeAttachment>;
21
21
  type: string;
22
22
  }) => void;
23
23
  addComponentTypeAttachments: (state: ComponentTypeState, action: {
24
- payload: import('../../typings/models/issues.ts').Submitted<ComponentTypeAttachment>[];
24
+ payload: import('../../typings/models/issues').Submitted<ComponentTypeAttachment>[];
25
25
  type: string;
26
26
  }) => void;
27
27
  updateComponentTypeAttachment: (state: ComponentTypeState, action: {
28
- payload: import('../../typings/models/issues.ts').Submitted<ComponentTypeAttachment>;
28
+ payload: import('../../typings/models/issues').Submitted<ComponentTypeAttachment>;
29
29
  type: string;
30
30
  }) => void;
31
31
  removeComponentTypeAttachment: (state: ComponentTypeState, action: {
@@ -61,6 +61,6 @@ export declare const selectAttachmentsOfComponentTypeByType: (args: string) => (
61
61
  fileAttachments: Stored<ComponentTypeAttachment>[];
62
62
  imageAttachments: Stored<ComponentTypeAttachment>[];
63
63
  };
64
- export declare const addComponentType: import("@reduxjs/toolkit").ActionCreatorWithPayload<ComponentType, "componentTypes/addComponentType">, setComponentTypes: import("@reduxjs/toolkit").ActionCreatorWithPayload<ComponentType[], "componentTypes/setComponentTypes">, setComponentTypeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<import('../../typings/models/issues.ts').Created<ComponentTypeAttachment>[], "componentTypes/setComponentTypeAttachments">, addComponentTypeAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<import('../../typings/models/issues.ts').Submitted<ComponentTypeAttachment>, "componentTypes/addComponentTypeAttachment">, addComponentTypeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<import('../../typings/models/issues.ts').Submitted<ComponentTypeAttachment>[], "componentTypes/addComponentTypeAttachments">, updateComponentTypeAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<import('../../typings/models/issues.ts').Submitted<ComponentTypeAttachment>, "componentTypes/updateComponentTypeAttachment">, removeComponentTypeAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "componentTypes/removeComponentTypeAttachment">, removeComponentTypeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "componentTypes/removeComponentTypeAttachments">, toggleComponentTypeVisibility: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "componentTypes/toggleComponentTypeVisibility">, deleteComponentType: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "componentTypes/deleteComponentType">;
64
+ export declare const addComponentType: import("@reduxjs/toolkit").ActionCreatorWithPayload<ComponentType, "componentTypes/addComponentType">, setComponentTypes: import("@reduxjs/toolkit").ActionCreatorWithPayload<ComponentType[], "componentTypes/setComponentTypes">, setComponentTypeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<import('../../typings/models/issues').Created<ComponentTypeAttachment>[], "componentTypes/setComponentTypeAttachments">, addComponentTypeAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<import('../../typings/models/issues').Submitted<ComponentTypeAttachment>, "componentTypes/addComponentTypeAttachment">, addComponentTypeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<import('../../typings/models/issues').Submitted<ComponentTypeAttachment>[], "componentTypes/addComponentTypeAttachments">, updateComponentTypeAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<import('../../typings/models/issues').Submitted<ComponentTypeAttachment>, "componentTypes/updateComponentTypeAttachment">, removeComponentTypeAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "componentTypes/removeComponentTypeAttachment">, removeComponentTypeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "componentTypes/removeComponentTypeAttachments">, toggleComponentTypeVisibility: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "componentTypes/toggleComponentTypeVisibility">, deleteComponentType: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "componentTypes/deleteComponentType">;
65
65
  export declare const componentTypeReducer: Reducer<ComponentTypeState>;
66
66
  export {};
@@ -1,6 +1,5 @@
1
- import { License } from "../../typings/models/license.ts";
1
+ import { License, Selector, SelectorWithArgs } from "../../typings";
2
2
  import { Reducer } from "@reduxjs/toolkit";
3
- import { Selector, SelectorWithArgs } from "../../typings";
4
3
  export interface LicenseState {
5
4
  licenses: Record<string, License>;
6
5
  }
@@ -1,6 +1,6 @@
1
1
  import { Reducer } from "@reduxjs/toolkit";
2
2
  import { Selector, SelectorWithArgs } from '../../typings/store';
3
- import { User, Organization, License, Project } from "../../typings";
3
+ import { License, Organization, Project, User } from "../../typings";
4
4
  export interface OrganizationState {
5
5
  organizations: Record<number, Organization>;
6
6
  activeOrganizationId: number | null;
@@ -16,6 +16,11 @@ export interface FileObject {
16
16
  file: string;
17
17
  objectURL?: string;
18
18
  }
19
+ export interface OptionalFileModel {
20
+ file_sha1?: string | null;
21
+ file?: string | null;
22
+ objectURL?: string;
23
+ }
19
24
  export interface OwnedByUserOrOrganization {
20
25
  user_owner: number;
21
26
  organization_owner: number;
@@ -1,6 +1,5 @@
1
- export interface Profile {
2
- file_sha1?: string | null;
3
- file?: string | null;
1
+ import { OptionalFileModel } from "./base";
2
+ export interface Profile extends OptionalFileModel {
4
3
  favourite_project_ids: number[];
5
4
  tour_step: number;
6
5
  }
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.48-activity-history.1",
6
+ "version": "1.0.48-activity-history.2",
7
7
  "type": "module",
8
8
  "main": "dist/overmap-core.umd.cjs",
9
9
  "module": "dist/overmap-core.js",
@@ -109,13 +109,15 @@
109
109
  "vite": "^4.4.5",
110
110
  "vite-plugin-dts": "^3.5.2",
111
111
  "vite-plugin-externalize-deps": "^0.7.0",
112
- "vitest": "^1.2.1"
112
+ "vitest": "^1.2.1",
113
+ "@tiptap/core": "^2.4.0"
113
114
  },
114
115
  "peerDependencies": {
115
116
  "@overmap-ai/blocks": "1.0.8",
116
117
  "leaflet": "^1.9.0",
117
118
  "react": "^18.2.0",
118
119
  "react-dom": "^18.2.0",
120
+ "@tiptap/core": "^2.4.0",
119
121
  "react-redux": "^8.1.2"
120
122
  },
121
123
  "resolutions": {