@overmap-ai/core 1.0.60-model-adapter.1 → 1.0.60-move-active-states.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/enums/index.d.ts +0 -1
- package/dist/index.d.ts +0 -5
- package/dist/overmap-core.js +1398 -10611
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +1419 -10634
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/base.d.ts +11 -0
- package/dist/sdk/globals.d.ts +7 -0
- package/dist/sdk/index.d.ts +1 -0
- package/dist/sdk/sdk.d.ts +4 -51
- package/dist/sdk/services/AgentService.d.ts +4 -3
- package/dist/sdk/services/AssetAttachmentService.d.ts +4 -3
- package/dist/sdk/services/AssetService.d.ts +5 -4
- package/dist/sdk/services/AssetStageCompletionService.d.ts +5 -4
- package/dist/sdk/services/AssetStageService.d.ts +4 -3
- package/dist/sdk/services/AssetTypeAttachmentService.d.ts +4 -3
- package/dist/sdk/services/AssetTypeService.d.ts +5 -4
- package/dist/sdk/services/BaseApiService.d.ts +7 -4
- package/dist/sdk/services/BaseAttachmentService.d.ts +12 -7
- package/dist/sdk/services/BaseAuthService.d.ts +12 -0
- package/dist/sdk/services/BaseService.d.ts +15 -0
- package/dist/sdk/services/BaseUploadService.d.ts +8 -0
- package/dist/sdk/services/CategoryService.d.ts +5 -4
- package/dist/sdk/services/DocumentAttachmentService.d.ts +4 -3
- package/dist/sdk/services/DocumentService.d.ts +5 -4
- package/dist/sdk/services/EmailDomainsService.d.ts +4 -3
- package/dist/sdk/services/EmailVerificationService.d.ts +3 -2
- package/dist/sdk/services/FileService.d.ts +4 -1
- package/dist/sdk/services/GeoImageService.d.ts +11 -0
- package/dist/sdk/services/IssueAttachmentService.d.ts +4 -3
- package/dist/sdk/services/IssueCommentService.d.ts +5 -4
- package/dist/sdk/services/IssueService.d.ts +6 -5
- package/dist/sdk/services/IssueTypeService.d.ts +6 -5
- package/dist/sdk/services/IssueUpdateService.d.ts +4 -2
- package/dist/sdk/services/JWTAuthService.d.ts +36 -0
- package/dist/sdk/services/LicenseService.d.ts +4 -3
- package/dist/sdk/services/OrganizationAccessService.d.ts +4 -3
- package/dist/sdk/services/OrganizationService.d.ts +4 -4
- package/dist/sdk/services/ProjectAccessService.d.ts +4 -3
- package/dist/sdk/services/ProjectAttachmentService.d.ts +4 -3
- package/dist/sdk/services/ProjectFileService.d.ts +4 -2
- package/dist/sdk/services/ProjectService.d.ts +3 -2
- package/dist/sdk/services/TeamService.d.ts +6 -5
- package/dist/sdk/services/UserFormService.d.ts +5 -5
- package/dist/sdk/services/UserFormSubmissionService.d.ts +8 -9
- package/dist/sdk/services/UserService.d.ts +6 -0
- package/dist/sdk/services/WorkspaceService.d.ts +4 -1
- package/dist/sdk/services/index.d.ts +3 -2
- package/dist/sdk/typings.d.ts +8 -3
- package/dist/store/index.d.ts +0 -1
- package/dist/store/slices/agentsSlice.d.ts +4 -4
- package/dist/store/slices/assetAttachmentSlice.d.ts +6 -6
- package/dist/store/slices/assetSlice.d.ts +8 -8
- package/dist/store/slices/assetStageCompletionSlice.d.ts +3 -3
- package/dist/store/slices/assetStageSlice.d.ts +9 -9
- package/dist/store/slices/assetTypeAttachmentSlice.d.ts +6 -6
- package/dist/store/slices/assetTypeSlice.d.ts +8 -14
- package/dist/store/slices/authSlice.d.ts +3 -3
- package/dist/store/slices/categorySlice.d.ts +16 -72
- package/dist/store/slices/documentAttachmentSlice.d.ts +6 -6
- package/dist/store/slices/documentSlice.d.ts +20 -62
- package/dist/store/slices/emailDomainsSlice.d.ts +4 -4
- package/dist/store/slices/fileSlice.d.ts +2 -2
- package/dist/store/slices/formRevisionAttachmentSlice.d.ts +3 -3
- package/dist/store/slices/formRevisionSlice.d.ts +19 -61
- package/dist/store/slices/formSlice.d.ts +9 -8
- package/dist/store/slices/formSubmissionAttachmentSlice.d.ts +3 -3
- package/dist/store/slices/formSubmissionSlice.d.ts +11 -11
- package/dist/store/slices/geoImageSlice.d.ts +48 -0
- package/dist/store/slices/index.d.ts +2 -1
- package/dist/store/slices/issueAttachmentSlice.d.ts +6 -6
- package/dist/store/slices/issueCommentSlice.d.ts +3 -3
- package/dist/store/slices/issueSlice.d.ts +7 -17
- package/dist/store/slices/issueTypeSlice.d.ts +7 -7
- package/dist/store/slices/issueUpdateSlice.d.ts +3 -3
- package/dist/store/slices/licenseSlice.d.ts +7 -7
- package/dist/store/slices/organizationAccessSlice.d.ts +6 -6
- package/dist/store/slices/organizationSlice.d.ts +14 -25
- package/dist/store/slices/outboxSlice.d.ts +6 -4
- package/dist/store/slices/projectAccessSlice.d.ts +7 -7
- package/dist/store/slices/projectAttachmentSlice.d.ts +6 -6
- package/dist/store/slices/projectFileSlice.d.ts +8 -62
- package/dist/store/slices/projectSlice.d.ts +10 -10
- package/dist/store/slices/rehydratedSlice.d.ts +3 -2
- package/dist/store/slices/settingsSlice.d.ts +3 -24
- package/dist/store/slices/teamSlice.d.ts +6 -6
- package/dist/store/slices/userSlice.d.ts +5 -5
- package/dist/store/slices/workspaceSlice.d.ts +9 -56
- package/dist/store/store.d.ts +9 -91
- package/dist/typings/colors.d.ts +0 -3
- package/dist/typings/models/{components.d.ts → assets.d.ts} +2 -3
- package/dist/typings/models/forms.d.ts +87 -1
- package/dist/typings/models/geo.d.ts +18 -6
- package/dist/typings/models/geoImages.d.ts +14 -0
- package/dist/typings/models/index.d.ts +2 -1
- package/dist/typings/models/issues.d.ts +3 -4
- package/dist/typings/models/organizations.d.ts +0 -11
- package/dist/typings/models/projects.d.ts +3 -5
- package/dist/typings/models/store.d.ts +43 -4
- package/dist/typings/store.d.ts +6 -4
- package/dist/utils/colors.d.ts +0 -6
- package/dist/utils/coordinates.d.ts +5 -7
- package/dist/utils/file.d.ts +0 -6
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/utils.d.ts +3 -3
- package/package.json +13 -41
- package/dist/components/ColorPicker/ColorPicker.d.ts +0 -10
- package/dist/components/ColorPicker/index.d.ts +0 -1
- package/dist/components/FileBadge/FileBadge.d.ts +0 -8
- package/dist/components/FileBadge/index.d.ts +0 -1
- package/dist/components/FileCard/FileCard.d.ts +0 -8
- package/dist/components/FileCard/index.d.ts +0 -1
- package/dist/components/FileIcon/FileIcon.d.ts +0 -5
- package/dist/components/FileIcon/index.d.ts +0 -1
- package/dist/components/FileViewer/FileViewerProvider.d.ts +0 -2
- package/dist/components/FileViewer/context.d.ts +0 -5
- package/dist/components/FileViewer/index.d.ts +0 -3
- package/dist/components/FileViewer/typings.d.ts +0 -5
- package/dist/components/ImageCard/ImageCard.d.ts +0 -9
- package/dist/components/ImageCard/index.d.ts +0 -1
- package/dist/components/ImageMarkup/ImageMarkup.d.ts +0 -14
- package/dist/components/ImageMarkup/index.d.ts +0 -1
- package/dist/components/ImageViewer/ImageViewer.d.ts +0 -8
- package/dist/components/ImageViewer/constants.d.ts +0 -1
- package/dist/components/ImageViewer/index.d.ts +0 -2
- package/dist/components/PDFViewer/PDFViewer.d.ts +0 -8
- package/dist/components/PDFViewer/constants.d.ts +0 -1
- package/dist/components/PDFViewer/index.d.ts +0 -2
- package/dist/components/SpreadsheetViewer/SpreadsheetViewer.d.ts +0 -8
- package/dist/components/SpreadsheetViewer/constants.d.ts +0 -1
- package/dist/components/SpreadsheetViewer/index.d.ts +0 -2
- package/dist/components/index.d.ts +0 -10
- package/dist/contexts/hooks.d.ts +0 -2
- package/dist/contexts/index.d.ts +0 -3
- package/dist/contexts/overmap.d.ts +0 -12
- package/dist/contexts/sdk/globals.d.ts +0 -4
- package/dist/contexts/sdk/hooks.d.ts +0 -4
- package/dist/contexts/sdk/index.d.ts +0 -2
- package/dist/contexts/sdk/sdk.d.ts +0 -15
- package/dist/enums/map.d.ts +0 -6
- package/dist/forms/builder/DropDispatch.d.ts +0 -27
- package/dist/forms/builder/FieldActions.d.ts +0 -13
- package/dist/forms/builder/FieldBuilder.d.ts +0 -10
- package/dist/forms/builder/FieldSectionWithActions.d.ts +0 -11
- package/dist/forms/builder/FieldWithActions.d.ts +0 -10
- package/dist/forms/builder/FieldsEditor.d.ts +0 -6
- package/dist/forms/builder/FormBuilder.d.ts +0 -25
- package/dist/forms/builder/constants.d.ts +0 -18
- package/dist/forms/builder/hooks.d.ts +0 -7
- package/dist/forms/builder/index.d.ts +0 -2
- package/dist/forms/builder/typings.d.ts +0 -12
- package/dist/forms/builder/utils.d.ts +0 -24
- package/dist/forms/constants.d.ts +0 -2
- package/dist/forms/constantsJsx.d.ts +0 -9
- package/dist/forms/fields/BaseField/BaseField.d.ts +0 -52
- package/dist/forms/fields/BaseField/hooks.d.ts +0 -374
- package/dist/forms/fields/BaseField/index.d.ts +0 -4
- package/dist/forms/fields/BaseField/layouts.d.ts +0 -25
- package/dist/forms/fields/BaseField/typings.d.ts +0 -7
- package/dist/forms/fields/BooleanField/BooleanField.d.ts +0 -23
- package/dist/forms/fields/BooleanField/BooleanInput.d.ts +0 -4
- package/dist/forms/fields/BooleanField/index.d.ts +0 -2
- package/dist/forms/fields/CustomField/CustomField.d.ts +0 -24
- package/dist/forms/fields/CustomField/FieldInputClonerField/FieldInputCloner.d.ts +0 -8
- package/dist/forms/fields/CustomField/FieldInputClonerField/FieldInputClonerField.d.ts +0 -18
- package/dist/forms/fields/CustomField/FieldInputClonerField/index.d.ts +0 -3
- package/dist/forms/fields/CustomField/FieldInputClonerField/typings.d.ts +0 -5
- package/dist/forms/fields/CustomField/index.d.ts +0 -1
- package/dist/forms/fields/DateField/DateField.d.ts +0 -22
- package/dist/forms/fields/DateField/DateInput.d.ts +0 -4
- package/dist/forms/fields/DateField/index.d.ts +0 -2
- package/dist/forms/fields/FieldSection/FieldSection.d.ts +0 -33
- package/dist/forms/fields/FieldSection/FieldSectionLayout.d.ts +0 -7
- package/dist/forms/fields/FieldSection/index.d.ts +0 -1
- package/dist/forms/fields/MultiStringField/MultiStringField.d.ts +0 -40
- package/dist/forms/fields/MultiStringField/MultiStringInput.d.ts +0 -8
- package/dist/forms/fields/MultiStringField/index.d.ts +0 -2
- package/dist/forms/fields/NumberField/NumberField.d.ts +0 -46
- package/dist/forms/fields/NumberField/NumberInput.d.ts +0 -4
- package/dist/forms/fields/NumberField/index.d.ts +0 -2
- package/dist/forms/fields/QrField/QrField.d.ts +0 -21
- package/dist/forms/fields/QrField/QrInput.d.ts +0 -10
- package/dist/forms/fields/QrField/index.d.ts +0 -2
- package/dist/forms/fields/SelectField/BaseSelectField.d.ts +0 -34
- package/dist/forms/fields/SelectField/MultiSelectField.d.ts +0 -27
- package/dist/forms/fields/SelectField/MultiSelectInput.d.ts +0 -4
- package/dist/forms/fields/SelectField/SelectField.d.ts +0 -26
- package/dist/forms/fields/SelectField/SelectInput.d.ts +0 -4
- package/dist/forms/fields/SelectField/index.d.ts +0 -4
- package/dist/forms/fields/StringOrTextFields/StringField/StringField.d.ts +0 -26
- package/dist/forms/fields/StringOrTextFields/StringField/StringInput.d.ts +0 -4
- package/dist/forms/fields/StringOrTextFields/StringField/index.d.ts +0 -2
- package/dist/forms/fields/StringOrTextFields/StringOrTextField.d.ts +0 -34
- package/dist/forms/fields/StringOrTextFields/TextField/TextField.d.ts +0 -22
- package/dist/forms/fields/StringOrTextFields/TextField/TextInput.d.ts +0 -4
- package/dist/forms/fields/StringOrTextFields/TextField/index.d.ts +0 -2
- package/dist/forms/fields/StringOrTextFields/index.d.ts +0 -2
- package/dist/forms/fields/UploadField/UploadField.d.ts +0 -44
- package/dist/forms/fields/UploadField/UploadInput.d.ts +0 -4
- package/dist/forms/fields/UploadField/index.d.ts +0 -2
- package/dist/forms/fields/UploadField/utils.d.ts +0 -1
- package/dist/forms/fields/constants.d.ts +0 -106
- package/dist/forms/fields/hooks.d.ts +0 -6
- package/dist/forms/fields/index.d.ts +0 -12
- package/dist/forms/fields/typings.d.ts +0 -27
- package/dist/forms/fields/utils.d.ts +0 -17
- package/dist/forms/index.d.ts +0 -5
- package/dist/forms/renderer/FormBrowser/FormBrowser.d.ts +0 -11
- package/dist/forms/renderer/FormRenderer/FormRenderer.d.ts +0 -31
- package/dist/forms/renderer/FormSubmissionBrowser/FormSubmissionBrowser.d.ts +0 -28
- package/dist/forms/renderer/FormSubmissionViewer/FormSubmissionViewer.d.ts +0 -17
- package/dist/forms/renderer/PatchForm/Field.d.ts +0 -17
- package/dist/forms/renderer/PatchForm/Provider.d.ts +0 -29
- package/dist/forms/renderer/PatchForm/index.d.ts +0 -2
- package/dist/forms/renderer/index.d.ts +0 -5
- package/dist/forms/typings.d.ts +0 -103
- package/dist/forms/utils.d.ts +0 -9
- package/dist/sdk/services/AuthService.d.ts +0 -54
- package/dist/sdk/services/MainService.d.ts +0 -16
- package/dist/store/hooks.d.ts +0 -4
- package/dist/store/slices/mapSlice.d.ts +0 -23
- package/dist/style.css +0 -435
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FileService } from "./services";
|
|
2
|
+
import { ToolkitStore } from "@reduxjs/toolkit/dist/configureStore";
|
|
3
|
+
import { SDKRequest } from "./typings";
|
|
4
|
+
import { BaseState } from "../typings";
|
|
5
|
+
export declare abstract class BaseSDK<TState extends BaseState> {
|
|
6
|
+
readonly store: ToolkitStore<TState>;
|
|
7
|
+
abstract readonly files: FileService<TState, BaseSDK<TState>>;
|
|
8
|
+
protected constructor(store: ToolkitStore<TState>);
|
|
9
|
+
enqueueRequest<TResult>(requestDetails: SDKRequest, host: string, serviceName: string): Promise<TResult>;
|
|
10
|
+
private _enqueueRequest;
|
|
11
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ToolkitStore } from "@reduxjs/toolkit/dist/configureStore";
|
|
2
|
+
import { BaseState } from "../typings";
|
|
3
|
+
import { BaseSDK } from "./base";
|
|
4
|
+
export declare function setClientStore<TState extends BaseState>(store: ToolkitStore<TState>): void;
|
|
5
|
+
export declare function getClientStore(): ToolkitStore<BaseState> | undefined;
|
|
6
|
+
export declare function setClientSDK<TState extends BaseState>(sdkCtor: BaseSDK<TState>): void;
|
|
7
|
+
export declare function getClientSDK(): BaseSDK<BaseState> | undefined;
|
package/dist/sdk/index.d.ts
CHANGED
package/dist/sdk/sdk.d.ts
CHANGED
|
@@ -1,52 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseSDK } from "./base";
|
|
2
2
|
import { ToolkitStore } from "@reduxjs/toolkit/dist/configureStore";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
export declare
|
|
6
|
-
readonly API_URL: string;
|
|
7
|
-
readonly store: ToolkitStore<RootState>;
|
|
8
|
-
constructor(apiUrl: string, store: ToolkitStore<RootState>);
|
|
9
|
-
/**
|
|
10
|
-
* Enqueues an API request to the offline outbox.
|
|
11
|
-
* @param requestDetails An SDKRequest object containing the details of the request.
|
|
12
|
-
* @protected
|
|
13
|
-
*/
|
|
14
|
-
enqueueRequest<TResult>(requestDetails: SDKRequest): Promise<TResult>;
|
|
15
|
-
/**
|
|
16
|
-
* Enqueues an API request to the Redux Offline outbox
|
|
17
|
-
* @protected
|
|
18
|
-
*/
|
|
19
|
-
private _enqueueRequest;
|
|
20
|
-
agent: AgentService;
|
|
21
|
-
files: FileService;
|
|
22
|
-
auth: AuthService;
|
|
23
|
-
categories: CategoryService;
|
|
24
|
-
projectAccesses: ProjectAccessService;
|
|
25
|
-
organizations: OrganizationService;
|
|
26
|
-
organizationAccess: OrganizationAccessService;
|
|
27
|
-
issues: IssueService;
|
|
28
|
-
issueTypes: IssueTypeService;
|
|
29
|
-
issueComments: IssueCommentService;
|
|
30
|
-
issueUpdates: IssueUpdateService;
|
|
31
|
-
issueAttachments: IssueAttachmentService;
|
|
32
|
-
workspaces: WorkspaceService;
|
|
33
|
-
main: MainService;
|
|
34
|
-
assets: AssetService;
|
|
35
|
-
assetAttachments: AssetAttachmentService;
|
|
36
|
-
assetTypes: AssetTypeService;
|
|
37
|
-
assetTypeAttachments: AssetTypeAttachmentService;
|
|
38
|
-
assetStages: AssetStageService;
|
|
39
|
-
assetStageCompletions: AssetStageCompletionService;
|
|
40
|
-
userForms: UserFormService;
|
|
41
|
-
userFormSubmissions: UserFormSubmissionService;
|
|
42
|
-
projects: ProjectService;
|
|
43
|
-
projectFiles: ProjectFileService;
|
|
44
|
-
projectAttachments: ProjectAttachmentService;
|
|
45
|
-
emailVerification: EmailVerificationService;
|
|
46
|
-
emailDomains: EmailDomainsService;
|
|
47
|
-
licenses: LicenseService;
|
|
48
|
-
documents: DocumentService;
|
|
49
|
-
teams: TeamService;
|
|
50
|
-
documentAttachments: DocumentAttachmentService;
|
|
51
|
-
}
|
|
52
|
-
export declare const makeClient: (apiUrl: string, store: ToolkitStore<RootState>) => OvermapSDK;
|
|
3
|
+
import { BaseState } from "../typings";
|
|
4
|
+
import { OvermapSDKConstructor } from "./typings";
|
|
5
|
+
export declare const initSDK: <TState extends BaseState, TSDK extends BaseSDK<TState>>(store: ToolkitStore<TState>, sdk: OvermapSDKConstructor<TState, TSDK>) => TSDK;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { AgentUserConversation, OvermapRootState } from "../../typings";
|
|
1
2
|
import { BaseApiService } from "./BaseApiService";
|
|
2
|
-
import {
|
|
3
|
-
export declare class AgentService extends BaseApiService {
|
|
3
|
+
import type { BaseSDK } from "../base";
|
|
4
|
+
export declare abstract class AgentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
4
5
|
startConversation(prompt: string): Promise<AgentUserConversation>;
|
|
5
6
|
/**
|
|
6
7
|
* Prompt the agent with a message.
|
|
@@ -10,5 +11,5 @@ export declare class AgentService extends BaseApiService {
|
|
|
10
11
|
continueConversation(prompt: string, conversationId: AgentUserConversation["offline_id"]): Promise<void>;
|
|
11
12
|
fetchDetails(conversationId: AgentUserConversation["offline_id"]): Promise<void>;
|
|
12
13
|
rate(responseId: string, rating: 1 | 5): Promise<undefined>;
|
|
13
|
-
refreshStore(): Promise<void>;
|
|
14
|
+
refreshStore(projectId: number): Promise<void>;
|
|
14
15
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { BaseAttachmentService } from "./BaseAttachmentService";
|
|
2
|
-
import { AttachmentModel, AssetAttachment, Stored } from "../../typings";
|
|
2
|
+
import { AttachmentModel, AssetAttachment, Stored, OvermapRootState } from "../../typings";
|
|
3
3
|
import { OptimisticMultipleModelResult } from "../typings";
|
|
4
|
-
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
export declare abstract class AssetAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, AssetAttachment> {
|
|
5
6
|
attachmentModel: AttachmentModel;
|
|
6
7
|
initializeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetAttachment>[], "assetAttachments/initializeAssetAttachments">;
|
|
7
8
|
addAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetAttachment>[], "assetAttachments/addAssetAttachments">;
|
|
@@ -9,7 +10,7 @@ export declare class AssetAttachmentService extends BaseAttachmentService<string
|
|
|
9
10
|
removeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "assetAttachments/deleteAssetAttachments">;
|
|
10
11
|
removeAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "assetAttachments/deleteAssetAttachment">;
|
|
11
12
|
setAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetAttachment>, "assetAttachments/setAssetAttachment">;
|
|
12
|
-
selectAttachment: import('../../typings/store').
|
|
13
|
+
selectAttachment: import('../../typings/store').OvermapSelectorWithArgs<string, Stored<AssetAttachment>>;
|
|
13
14
|
private buildOfflineAttachment;
|
|
14
15
|
attachFilesToAsset(files: File[], assetId: string): Promise<OptimisticMultipleModelResult<AssetAttachment>>;
|
|
15
16
|
deleteAssetAttachment(attachmentId: string): Promise<void>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Asset, Created, Payload } from "../../typings";
|
|
1
|
+
import { Asset, Created, Payload, OvermapRootState } from "../../typings";
|
|
3
2
|
import { OptimisticModelResult } from "../typings";
|
|
4
|
-
|
|
3
|
+
import { BaseApiService } from "./BaseApiService";
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
export declare abstract class AssetService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
5
6
|
add(asset: Payload<Asset>, workspaceId: string): OptimisticModelResult<Asset>;
|
|
6
7
|
update(asset: Asset, workspaceId: string): OptimisticModelResult<Asset>;
|
|
7
8
|
remove(assetId: string): Promise<undefined>;
|
|
8
9
|
deleteAllAssetsOfAssetType(assetTypeId: string): Promise<undefined>;
|
|
9
10
|
bulkAdd(assetsToCreate: Payload<Asset>[], workspaceId: string, assetTypeId: string, batchSize: number): Promise<Created<Asset>[]>[];
|
|
10
|
-
refreshStore(): Promise<void>;
|
|
11
|
+
refreshStore(projectId: number): Promise<void>;
|
|
11
12
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { BaseApiService } from "./BaseApiService";
|
|
2
1
|
import { OptimisticModelResult } from "../typings";
|
|
3
|
-
import { AssetStageCompletion, Payload } from "../../typings";
|
|
4
|
-
|
|
2
|
+
import { AssetStageCompletion, OvermapRootState, Payload } from "../../typings";
|
|
3
|
+
import { BaseApiService } from "./BaseApiService";
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
export declare abstract class AssetStageCompletionService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
5
6
|
add(assetId: string, stageId: string): OptimisticModelResult<AssetStageCompletion>;
|
|
6
|
-
refreshStore(): Promise<void>;
|
|
7
|
+
refreshStore(projectId: number): Promise<void>;
|
|
7
8
|
/**
|
|
8
9
|
* Creates a collection of AssetStageCompletions, marking the referenced stages as completed for the referenced
|
|
9
10
|
* assets. It's REQUIRED that all assets referenced all have the SAME asset type.
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { AssetStage, AssetStagePayload, OvermapRootState, Payload } from "../../typings";
|
|
1
2
|
import { BaseApiService } from "./BaseApiService";
|
|
2
|
-
import {
|
|
3
|
-
export declare class AssetStageService extends BaseApiService {
|
|
3
|
+
import type { BaseSDK } from "../base";
|
|
4
|
+
export declare abstract class AssetStageService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
4
5
|
bulkCreateStages(stagesToSubmit: Payload<AssetStagePayload>[], assetTypeId: string, workspaceId: string): Promise<AssetStage[]>;
|
|
5
6
|
bulkUpdateStages(stagesToUpdate: AssetStage[], assetTypeId: string): Promise<AssetStage[]>;
|
|
6
7
|
bulkDelete(idsToDelete: string[]): Promise<undefined>;
|
|
7
8
|
update(assetStage: AssetStage): Promise<undefined>;
|
|
8
9
|
linkForm(stageId: string, formId: string): Promise<undefined>;
|
|
9
10
|
unlinkForm(stageId: string, formId: string): Promise<undefined>;
|
|
10
|
-
refreshStore(): Promise<undefined>;
|
|
11
|
+
refreshStore(projectId: number): Promise<undefined>;
|
|
11
12
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { BaseAttachmentService } from "./BaseAttachmentService";
|
|
2
|
-
import { AttachmentModel, AssetTypeAttachment, Stored } from "../../typings";
|
|
2
|
+
import { AttachmentModel, AssetTypeAttachment, Stored, OvermapRootState } from "../../typings";
|
|
3
3
|
import { OptimisticMultipleModelResult } from "../typings";
|
|
4
|
-
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
export declare abstract class AssetTypeAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, AssetTypeAttachment> {
|
|
5
6
|
attachmentModel: AttachmentModel;
|
|
6
7
|
initializeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetTypeAttachment>[], "assetTypeAttachments/initializeAssetTypeAttachments">;
|
|
7
8
|
addAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetTypeAttachment>[], "assetTypeAttachments/addAssetTypeAttachments">;
|
|
@@ -9,7 +10,7 @@ export declare class AssetTypeAttachmentService extends BaseAttachmentService<st
|
|
|
9
10
|
removeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "assetTypeAttachments/deleteAssetTypeAttachments">;
|
|
10
11
|
removeAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "assetTypeAttachments/deleteAssetTypeAttachment">;
|
|
11
12
|
setAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetTypeAttachment>, "assetTypeAttachments/setAssetTypeAttachment">;
|
|
12
|
-
selectAttachment: import('../../typings/store').
|
|
13
|
+
selectAttachment: import('../../typings/store').OvermapSelectorWithArgs<string, Stored<AssetTypeAttachment>>;
|
|
13
14
|
private buildOfflineAttachment;
|
|
14
15
|
attachFilesToAssetType(files: File[], assetTypeId: string): Promise<OptimisticMultipleModelResult<AssetTypeAttachment>>;
|
|
15
16
|
deleteAssetTypeAttachment(attachmentId: string): Promise<void>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AssetType, Payload } from "../../typings";
|
|
1
|
+
import { AssetType, OvermapRootState, Payload } from "../../typings";
|
|
3
2
|
import { OptimisticModelResult } from "../typings";
|
|
4
|
-
|
|
3
|
+
import { BaseApiService } from "./BaseApiService";
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
export declare abstract class AssetTypeService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
5
6
|
add(assetType: Payload<AssetType>): OptimisticModelResult<AssetType>;
|
|
6
7
|
update(assetType: AssetType): Promise<undefined>;
|
|
7
8
|
delete(assetTypeId: string): Promise<undefined>;
|
|
8
|
-
refreshStore(): Promise<void>;
|
|
9
|
+
refreshStore(projectId: number): Promise<void>;
|
|
9
10
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BaseSDK } from "../base";
|
|
2
|
+
import { BaseState } from "../../typings";
|
|
3
|
+
import { BaseAuthService } from "./BaseAuthService";
|
|
4
|
+
import { BaseService } from "./BaseService";
|
|
2
5
|
/**
|
|
3
6
|
* Abstract base class for building a service that can enqueue API requests
|
|
4
7
|
*/
|
|
5
|
-
export declare abstract class BaseApiService {
|
|
6
|
-
|
|
7
|
-
constructor(sdk:
|
|
8
|
+
export declare abstract class BaseApiService<TStore extends BaseState, TSDK extends BaseSDK<TStore>> extends BaseService<TStore, TSDK> {
|
|
9
|
+
readonly auth: BaseAuthService<TStore, TSDK>;
|
|
10
|
+
constructor(sdk: TSDK, auth: BaseAuthService<TStore, TSDK>);
|
|
8
11
|
}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import { ActionCreatorWithPayload } from "@reduxjs/toolkit";
|
|
2
|
-
import { BaseApiService } from "./BaseApiService";
|
|
3
2
|
import { OptimisticMultipleModelResult } from "../typings";
|
|
4
|
-
import { Attachment, AttachmentModel,
|
|
3
|
+
import { Attachment, AttachmentModel, OvermapRootState, OvermapSelectorWithArgs, Stored, Submitted } from "../../typings";
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
import { BaseUploadService } from "./BaseUploadService";
|
|
6
|
+
export interface FilePayload {
|
|
7
|
+
sha1: Attachment["file_sha1"];
|
|
8
|
+
file_type: string;
|
|
9
|
+
extension: string;
|
|
10
|
+
size: number;
|
|
11
|
+
}
|
|
5
12
|
export interface BuildOfflineAttachmentData<TModelId> {
|
|
6
13
|
file: File;
|
|
7
14
|
sha1: string;
|
|
@@ -10,7 +17,7 @@ export interface BuildOfflineAttachmentData<TModelId> {
|
|
|
10
17
|
description?: string;
|
|
11
18
|
modelId: TModelId;
|
|
12
19
|
}
|
|
13
|
-
export declare abstract class BaseAttachmentService<TModelId extends string | number, TAttachment extends Attachment> extends
|
|
20
|
+
export declare abstract class BaseAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>, TModelId extends string | number, TAttachment extends Attachment> extends BaseUploadService<TState, TSDK> {
|
|
14
21
|
abstract readonly attachmentModel: AttachmentModel;
|
|
15
22
|
abstract readonly initializeAttachments: ActionCreatorWithPayload<Submitted<TAttachment>[]>;
|
|
16
23
|
abstract readonly addAttachments: ActionCreatorWithPayload<Submitted<TAttachment>[]>;
|
|
@@ -18,10 +25,8 @@ export declare abstract class BaseAttachmentService<TModelId extends string | nu
|
|
|
18
25
|
abstract readonly removeAttachments: ActionCreatorWithPayload<string[]>;
|
|
19
26
|
abstract readonly setAttachment: ActionCreatorWithPayload<Stored<TAttachment>>;
|
|
20
27
|
abstract readonly removeAttachment: ActionCreatorWithPayload<string>;
|
|
21
|
-
abstract readonly selectAttachment:
|
|
22
|
-
private getNumberOfAttachmentsWithSha1;
|
|
23
|
-
private processPresignedUrls;
|
|
28
|
+
abstract readonly selectAttachment: OvermapSelectorWithArgs<string, Stored<TAttachment>>;
|
|
24
29
|
protected attachFiles(files: File[], modelId: TModelId, buildOfflineAttachment: (data: BuildOfflineAttachmentData<TModelId>) => Stored<TAttachment>): Promise<OptimisticMultipleModelResult<TAttachment>>;
|
|
25
30
|
protected deleteAttachment(attachmendId: string): Promise<void>;
|
|
26
|
-
refreshStore(): Promise<void>;
|
|
31
|
+
refreshStore(projectId: number): Promise<void>;
|
|
27
32
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Response, SuperAgentRequest } from "superagent";
|
|
2
|
+
import { BaseState } from "../../typings";
|
|
3
|
+
import type { BaseSDK } from "../base";
|
|
4
|
+
import { BaseService } from "./BaseService";
|
|
5
|
+
export declare abstract class BaseAuthService<TStore extends BaseState, TSDK extends BaseSDK<TStore>> extends BaseService<TStore, TSDK> {
|
|
6
|
+
protected constructor(sdk: TSDK);
|
|
7
|
+
abstract initAuth(payload: object): Promise<void>;
|
|
8
|
+
abstract clearAuth(): void;
|
|
9
|
+
abstract prepareAuth(): Promise<void>;
|
|
10
|
+
abstract getAuthHeader(): string;
|
|
11
|
+
abstract handleUnauthorized(request: SuperAgentRequest, response: Response): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AnyAction } from "@reduxjs/toolkit";
|
|
2
|
+
import type { BaseSDK } from "../base";
|
|
3
|
+
import { BaseState } from "../../typings";
|
|
4
|
+
import { SDKRequest } from "../typings";
|
|
5
|
+
export declare const CLASS_NAME_TO_SERVICE: Record<string, BaseService<BaseState, BaseSDK<BaseState>>>;
|
|
6
|
+
/**
|
|
7
|
+
* Abstract base class for building a service that can enqueue API requests
|
|
8
|
+
*/
|
|
9
|
+
export declare abstract class BaseService<TStore extends BaseState, TSDK extends BaseSDK<TStore>> {
|
|
10
|
+
protected readonly client: TSDK;
|
|
11
|
+
abstract readonly host: string;
|
|
12
|
+
protected constructor(sdk: TSDK);
|
|
13
|
+
protected enqueueRequest<TResult>(requestDetails: SDKRequest): Promise<TResult>;
|
|
14
|
+
protected dispatch(action: AnyAction): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseApiService } from "./BaseApiService";
|
|
2
|
+
import { PresignedUrlsResponse } from "../typings";
|
|
3
|
+
import { OvermapRootState } from "../../typings";
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
export declare abstract class BaseUploadService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
6
|
+
protected getNumberOfAttachmentsWithSha1(sha1: string): number;
|
|
7
|
+
protected processPresignedUrls(presignedUrls: PresignedUrlsResponse): void;
|
|
8
|
+
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Category, Offline, Payload } from "../../typings";
|
|
1
|
+
import { Category, Offline, OvermapRootState, Payload } from "../../typings";
|
|
3
2
|
import { OptimisticModelResult } from "../typings";
|
|
3
|
+
import { BaseApiService } from "./BaseApiService";
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
4
5
|
/**
|
|
5
6
|
* Handles the creation of Category Service
|
|
6
7
|
* TODO: Support editing and deleting categories
|
|
7
8
|
*/
|
|
8
|
-
export declare class CategoryService extends BaseApiService {
|
|
9
|
+
export declare abstract class CategoryService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
9
10
|
add(category: Omit<Payload<Category>, "workspace">, workspaceId: string): OptimisticModelResult<Category>;
|
|
10
11
|
update(category: Offline<Partial<Category>>, workspaceId: string): OptimisticModelResult<Category>;
|
|
11
12
|
remove(category: Category, workspaceId: string): Promise<undefined>;
|
|
12
|
-
refreshStore(): Promise<undefined>;
|
|
13
|
+
refreshStore(projectId: number): Promise<undefined>;
|
|
13
14
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { BaseAttachmentService } from "./BaseAttachmentService";
|
|
2
|
-
import { AttachmentModel, DocumentAttachment, Stored } from "../../typings";
|
|
2
|
+
import { AttachmentModel, DocumentAttachment, OvermapRootState, Stored } from "../../typings";
|
|
3
3
|
import { OptimisticMultipleModelResult } from "../typings";
|
|
4
|
-
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
export declare abstract class DocumentAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, DocumentAttachment> {
|
|
5
6
|
attachmentModel: AttachmentModel;
|
|
6
7
|
initializeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<DocumentAttachment>[], "documentAttachments/initializeDocumentAttachments">;
|
|
7
8
|
addAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<DocumentAttachment>[], "documentAttachments/addDocumentAttachments">;
|
|
@@ -9,7 +10,7 @@ export declare class DocumentAttachmentService extends BaseAttachmentService<str
|
|
|
9
10
|
removeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "documentAttachments/deleteDocumentAttachments">;
|
|
10
11
|
removeAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "documentAttachments/deleteDocumentAttachment">;
|
|
11
12
|
setAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<DocumentAttachment>, "documentAttachments/setDocumentAttachment">;
|
|
12
|
-
selectAttachment: import('../../typings/store').
|
|
13
|
+
selectAttachment: import('../../typings/store').OvermapSelectorWithArgs<string, Stored<DocumentAttachment>>;
|
|
13
14
|
private buildOfflineAttachment;
|
|
14
15
|
attachFilesToDocument(files: File[], documentId: string): Promise<OptimisticMultipleModelResult<DocumentAttachment>>;
|
|
15
16
|
deleteDocumentAttachment(attachmentId: string): Promise<void>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Document, DocumentPayload, MovePosition, Submitted } from "../../typings";
|
|
1
|
+
import { Document, DocumentPayload, MovePosition, OvermapRootState, Submitted } from "../../typings";
|
|
3
2
|
import { OptimisticModelResult } from "../typings";
|
|
4
|
-
|
|
3
|
+
import { BaseApiService } from "./BaseApiService";
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
export declare abstract class DocumentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
5
6
|
add(document: DocumentPayload): OptimisticModelResult<Document>;
|
|
6
7
|
update(document: Submitted<Partial<Document>>): OptimisticModelResult<Document>;
|
|
7
8
|
move(documentId: string, targetDocumentId: string | null, position: MovePosition): Promise<Document[]>;
|
|
8
9
|
delete(documentId: string): Promise<Document[]>;
|
|
9
|
-
refreshStore(): Promise<void>;
|
|
10
|
+
refreshStore(projectId: number, organizationId: number): Promise<void>;
|
|
10
11
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { EmailDomain, OvermapRootState } from "../../typings";
|
|
1
2
|
import { BaseApiService } from "./BaseApiService";
|
|
2
|
-
import {
|
|
3
|
-
export declare class EmailDomainsService extends BaseApiService {
|
|
3
|
+
import type { BaseSDK } from "../base";
|
|
4
|
+
export declare abstract class EmailDomainsService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
4
5
|
add(orgId: number, email: string): Promise<undefined>;
|
|
5
6
|
remove(emailDomain: EmailDomain): Promise<undefined>;
|
|
6
|
-
refreshStore(): Promise<undefined>;
|
|
7
|
+
refreshStore(organizationId: number): Promise<undefined>;
|
|
7
8
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseApiService } from "./BaseApiService";
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import type { BaseSDK } from "../base";
|
|
3
|
+
import { EmailVerificationPayload, EmailVerificationReturn, OvermapRootState, VerificationCode } from "../../typings";
|
|
4
|
+
export declare abstract class EmailVerificationService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
4
5
|
getVerificationCode(verificationCode: string): Promise<VerificationCode>;
|
|
5
6
|
validateVerificationCode(verificationCode: string, payload?: EmailVerificationPayload | undefined): Promise<EmailVerificationReturn>;
|
|
6
7
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { BaseApiService } from "./BaseApiService";
|
|
2
|
+
import type { BaseSDK } from "../base";
|
|
3
|
+
import { BaseState } from "../../typings";
|
|
2
4
|
export interface GetS3UrlSuccessResponse {
|
|
3
5
|
url: string;
|
|
4
6
|
fields: Record<string, string>;
|
|
@@ -15,7 +17,8 @@ interface DatabaseFileProperties {
|
|
|
15
17
|
*/
|
|
16
18
|
file: string;
|
|
17
19
|
}
|
|
18
|
-
export declare class FileService extends BaseApiService {
|
|
20
|
+
export declare abstract class FileService<TState extends BaseState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
21
|
+
host: string;
|
|
19
22
|
private _dbPromise;
|
|
20
23
|
private renewUploadUrl;
|
|
21
24
|
/**
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BulkGeoImagePayload, GeoImage, GeoImagePayload, Offline, OvermapRootState } from "../../typings";
|
|
2
|
+
import { OptimisticModelResult, OptimisticMultipleModelResult } from "../typings";
|
|
3
|
+
import type { BaseSDK } from "../base";
|
|
4
|
+
import { BaseUploadService } from "./BaseUploadService";
|
|
5
|
+
export declare abstract class GeoImageService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
|
|
6
|
+
add(payload: GeoImagePayload): Promise<OptimisticModelResult<GeoImage>>;
|
|
7
|
+
bulkAdd(payloads: BulkGeoImagePayload[], projectId: number): Promise<OptimisticMultipleModelResult<GeoImage>>;
|
|
8
|
+
update(payload: Offline<Partial<Pick<GeoImagePayload, "title" | "description">>>): OptimisticModelResult<GeoImage>;
|
|
9
|
+
delete(geoImageId: string): Promise<void>;
|
|
10
|
+
refreshStore(projectId: number): Promise<void>;
|
|
11
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { BaseAttachmentService } from "./BaseAttachmentService";
|
|
2
2
|
import { OptimisticMultipleModelResult } from "../typings";
|
|
3
|
-
import { AttachmentModel, IssueAttachment, Stored } from "../../typings";
|
|
4
|
-
|
|
3
|
+
import { AttachmentModel, IssueAttachment, OvermapRootState, Stored } from "../../typings";
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
export declare abstract class IssueAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, IssueAttachment> {
|
|
5
6
|
attachmentModel: AttachmentModel;
|
|
6
7
|
initializeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<IssueAttachment>[], "issueAttachments/initializeIssueAttachments">;
|
|
7
8
|
addAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<IssueAttachment>[], "issueAttachments/addIssueAttachments">;
|
|
@@ -9,7 +10,7 @@ export declare class IssueAttachmentService extends BaseAttachmentService<string
|
|
|
9
10
|
removeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "issueAttachments/deleteIssueAttachments">;
|
|
10
11
|
removeAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "issueAttachments/deleteIssueAttachment">;
|
|
11
12
|
setAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<IssueAttachment>, "issueAttachments/setIssueAttachment">;
|
|
12
|
-
selectAttachment: import('../../typings/store').
|
|
13
|
+
selectAttachment: import('../../typings/store').OvermapSelectorWithArgs<string, Stored<IssueAttachment>>;
|
|
13
14
|
private buildOfflineAttachment;
|
|
14
15
|
attachFilesToIssue(files: File[], issueId: string): Promise<OptimisticMultipleModelResult<IssueAttachment>>;
|
|
15
16
|
deleteIssueAttachment(attachmentId: string): Promise<void>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { IssueComment, Payload, Submitted } from "../../typings";
|
|
1
|
+
import { IssueComment, OvermapRootState, Payload, Submitted } from "../../typings";
|
|
3
2
|
import { OptimisticModelResult } from "../typings";
|
|
4
|
-
|
|
3
|
+
import { BaseApiService } from "./BaseApiService";
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
export declare abstract class IssueCommentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
5
6
|
add(comment: Omit<Payload<IssueComment>, "author" | "submitted_at">): OptimisticModelResult<IssueComment>;
|
|
6
7
|
update(comment: Submitted<IssueComment>): OptimisticModelResult<IssueComment>;
|
|
7
8
|
remove(offline_id: string): Promise<undefined>;
|
|
8
|
-
refreshStore(): Promise<void>;
|
|
9
|
+
refreshStore(projectId: number): Promise<void>;
|
|
9
10
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { BaseApiService } from "./BaseApiService";
|
|
2
1
|
import { OptimisticModelResult } from "../typings";
|
|
3
|
-
import { Issue, IssueType, Submitted } from "../../typings";
|
|
2
|
+
import { Issue, IssueType, OvermapRootState, Submitted } from "../../typings";
|
|
3
|
+
import { BaseApiService } from "./BaseApiService";
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
4
5
|
/**
|
|
5
6
|
* Handles CRUD operations on issues
|
|
6
7
|
*/
|
|
7
|
-
export declare class IssueService extends BaseApiService {
|
|
8
|
-
add(issue: Issue, issueType?: IssueType["offline_id"] | null): OptimisticModelResult<Issue>;
|
|
8
|
+
export declare abstract class IssueService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
9
|
+
add(issue: Issue, workspaceId: string, issueType?: IssueType["offline_id"] | null): OptimisticModelResult<Issue>;
|
|
9
10
|
update(issue: Submitted<Partial<Issue>>): OptimisticModelResult<Issue>;
|
|
10
11
|
remove(id: string): Promise<undefined>;
|
|
11
|
-
refreshStore(): Promise<undefined>;
|
|
12
|
+
refreshStore(projectId: number): Promise<undefined>;
|
|
12
13
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { BaseApiService } from "./BaseApiService";
|
|
2
1
|
import { OptimisticModelResult } from "../typings";
|
|
3
|
-
import { IssueType, IssueTypePayload, Offline } from "../../typings";
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { IssueType, IssueTypePayload, Offline, OvermapRootState } from "../../typings";
|
|
3
|
+
import { BaseApiService } from "./BaseApiService";
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
export declare abstract class IssueTypeService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
6
|
+
add(payload: IssueTypePayload, organizationId: number): OptimisticModelResult<IssueType>;
|
|
6
7
|
update(issueTypeFields: Offline<Partial<IssueType>>): OptimisticModelResult<IssueType>;
|
|
7
8
|
delete(issueTypeId: string): Promise<void>;
|
|
8
|
-
refreshStore(): Promise<void>;
|
|
9
|
+
refreshStore(organizationId: number): Promise<void>;
|
|
9
10
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { OvermapRootState } from "../../typings";
|
|
1
2
|
import { BaseApiService } from "./BaseApiService";
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
import type { BaseSDK } from "../base";
|
|
4
|
+
export declare abstract class IssueUpdateService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
5
|
+
refreshStore(projectId: number): Promise<void>;
|
|
4
6
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import request from "superagent";
|
|
2
|
+
import { BaseState } from "../../typings";
|
|
3
|
+
import type { BaseSDK } from "../base";
|
|
4
|
+
import { TokenPair } from "../typings";
|
|
5
|
+
import { BaseAuthService } from "./BaseAuthService";
|
|
6
|
+
/**
|
|
7
|
+
* Handles login, logout and renewing tokens
|
|
8
|
+
*/
|
|
9
|
+
export declare abstract class JWTService<TState extends BaseState, TSDK extends BaseSDK<TState>> extends BaseAuthService<TState, TSDK> {
|
|
10
|
+
protected abstract initTokensUrl: string;
|
|
11
|
+
protected abstract refreshTokensUrl: string;
|
|
12
|
+
protected abstract setTokens: (tokens: TokenPair) => void;
|
|
13
|
+
protected abstract clearTokens: () => void;
|
|
14
|
+
protected abstract getAccessToken: () => string;
|
|
15
|
+
protected abstract getRefreshToken: () => string;
|
|
16
|
+
/**
|
|
17
|
+
* Takes refresh token and gets a new token pair
|
|
18
|
+
* @async
|
|
19
|
+
* @param {string} refreshToken The refresh token used to get new tokens
|
|
20
|
+
* @returns {Promise<TokenPair>} The new access and refresh tokens
|
|
21
|
+
*/
|
|
22
|
+
private _getRenewedTokens;
|
|
23
|
+
/**
|
|
24
|
+
* Logs the user out
|
|
25
|
+
*/
|
|
26
|
+
clearAuth(): void;
|
|
27
|
+
/**
|
|
28
|
+
* Attempts to renew tokens
|
|
29
|
+
*/
|
|
30
|
+
renewTokens(): Promise<undefined>;
|
|
31
|
+
tokenIsExpiringSoon(): boolean;
|
|
32
|
+
getAuthHeader(): string;
|
|
33
|
+
prepareAuth(): Promise<undefined>;
|
|
34
|
+
handleUnauthorized(request: request.SuperAgentRequest, response: request.Response): Promise<void>;
|
|
35
|
+
initAuth(payload: object): Promise<undefined>;
|
|
36
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { License, OvermapRootState, Project, Transaction } from "../../typings";
|
|
1
2
|
import { BaseApiService } from "./BaseApiService";
|
|
2
|
-
import {
|
|
3
|
-
export declare class LicenseService extends BaseApiService {
|
|
4
|
-
fetchLicensesForOrganization(organizationId: number, showLoading?: boolean): Promise<License[]>;
|
|
3
|
+
import type { BaseSDK } from "../base";
|
|
4
|
+
export declare abstract class LicenseService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
5
5
|
getLicense(license: License): Promise<License>;
|
|
6
6
|
pauseLicense(license: License): Promise<License>;
|
|
7
7
|
resumeLicense(license: License): Promise<License>;
|
|
@@ -9,4 +9,5 @@ export declare class LicenseService extends BaseApiService {
|
|
|
9
9
|
attachLicenseToProject(license: License, project: Project): Promise<License>;
|
|
10
10
|
detachLicenseFromProject(license: License): Promise<License>;
|
|
11
11
|
getLatestTransaction(license: License): Promise<Transaction>;
|
|
12
|
+
refreshStore(projectId: number, organizationId: number): Promise<void>;
|
|
12
13
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { OrganizationAccess, OvermapRootState } from "../../typings";
|
|
1
2
|
import { BaseApiService } from "./BaseApiService";
|
|
2
|
-
import {
|
|
3
|
+
import type { BaseSDK } from "../base";
|
|
3
4
|
/**
|
|
4
5
|
* Handles the creation of OrganizationAccess Service
|
|
5
6
|
*/
|
|
6
|
-
export declare class OrganizationAccessService extends BaseApiService {
|
|
7
|
+
export declare abstract class OrganizationAccessService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
7
8
|
update(organizationAccess: OrganizationAccess): Promise<OrganizationAccess>;
|
|
8
9
|
remove(organizationAccess: OrganizationAccess): Promise<undefined>;
|
|
9
|
-
refreshStore(): Promise<void>;
|
|
10
|
+
refreshStore(organizationId: number): Promise<void>;
|
|
10
11
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Organization, OvermapRootState } from "../../typings";
|
|
2
2
|
import { BaseApiService } from "./BaseApiService";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
_processInitialOrganizationData(data: InitialOrganizationData, showLoading: boolean): void;
|
|
3
|
+
import type { BaseSDK } from "../base";
|
|
4
|
+
export declare abstract class OrganizationService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
6
5
|
create(name: string): Promise<Organization>;
|
|
7
6
|
update(organization: Organization): Promise<Organization>;
|
|
8
7
|
invite(organizationId: number, email: string): Promise<undefined>;
|
|
8
|
+
refreshStore(projectId: number, organizationId: number): Promise<void>;
|
|
9
9
|
}
|