@overmap-ai/core 1.0.71-mapbox.4 → 1.0.71-mapbox.6
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/constants/defaults.d.ts +2 -1
- package/dist/constants/index.d.ts +3 -3
- package/dist/enums/index.d.ts +5 -5
- package/dist/index.d.ts +6 -6
- package/dist/overmap-core.js +168 -305
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +177 -313
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/base.d.ts +8 -6
- package/dist/sdk/classes/OutboxCoordinator.d.ts +4 -4
- package/dist/sdk/classes/index.d.ts +1 -1
- package/dist/sdk/errors.d.ts +3 -1
- package/dist/sdk/globals.d.ts +7 -5
- package/dist/sdk/index.d.ts +6 -6
- package/dist/sdk/sdk.d.ts +6 -5
- package/dist/sdk/services/AgentService.d.ts +4 -3
- package/dist/sdk/services/AssetAttachmentService.d.ts +13 -12
- 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 +5 -4
- package/dist/sdk/services/AssetTypeAttachmentService.d.ts +13 -12
- package/dist/sdk/services/AssetTypeService.d.ts +5 -4
- package/dist/sdk/services/BaseApiService.d.ts +5 -4
- package/dist/sdk/services/BaseAttachmentService.d.ts +7 -6
- package/dist/sdk/services/BaseAuthService.d.ts +5 -4
- package/dist/sdk/services/BaseService.d.ts +7 -5
- package/dist/sdk/services/BaseUploadService.d.ts +5 -4
- package/dist/sdk/services/CategoryService.d.ts +5 -4
- package/dist/sdk/services/DocumentAttachmentService.d.ts +13 -12
- 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 +4 -3
- package/dist/sdk/services/FileService.d.ts +5 -4
- package/dist/sdk/services/FormService.d.ts +5 -4
- package/dist/sdk/services/FormSubmissionService.d.ts +6 -5
- package/dist/sdk/services/GeoImageService.d.ts +5 -4
- package/dist/sdk/services/IssueAssociationService.d.ts +5 -4
- package/dist/sdk/services/IssueAttachmentService.d.ts +13 -12
- package/dist/sdk/services/IssueCommentService.d.ts +5 -4
- package/dist/sdk/services/IssueService.d.ts +5 -4
- package/dist/sdk/services/IssueTypeService.d.ts +5 -4
- package/dist/sdk/services/IssueUpdateService.d.ts +4 -3
- package/dist/sdk/services/JWTAuthService.d.ts +7 -6
- 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 -3
- package/dist/sdk/services/ProjectAccessService.d.ts +4 -3
- package/dist/sdk/services/ProjectAttachmentService.d.ts +13 -12
- package/dist/sdk/services/ProjectFileService.d.ts +5 -4
- package/dist/sdk/services/ProjectService.d.ts +4 -3
- package/dist/sdk/services/TeamService.d.ts +5 -4
- package/dist/sdk/services/UserService.d.ts +4 -3
- package/dist/sdk/services/WorkspaceService.d.ts +5 -4
- package/dist/sdk/services/index.d.ts +34 -34
- package/dist/sdk/typings.d.ts +9 -8
- package/dist/store/adapter.d.ts +12 -11
- package/dist/store/index.d.ts +2 -2
- package/dist/store/migrations.d.ts +2 -1
- package/dist/store/slices/agentsSlice.d.ts +11 -10
- package/dist/store/slices/assetAttachmentSlice.d.ts +16 -21
- package/dist/store/slices/assetSlice.d.ts +35 -24
- package/dist/store/slices/assetStageCompletionSlice.d.ts +33 -22
- package/dist/store/slices/assetStageSlice.d.ts +36 -25
- package/dist/store/slices/assetTypeAttachmentSlice.d.ts +16 -21
- package/dist/store/slices/assetTypeSlice.d.ts +16 -21
- package/dist/store/slices/authSlice.d.ts +10 -9
- package/dist/store/slices/categorySlice.d.ts +30 -16
- package/dist/store/slices/documentAttachmentSlice.d.ts +16 -21
- package/dist/store/slices/documentSlice.d.ts +30 -13
- package/dist/store/slices/emailDomainsSlice.d.ts +29 -15
- package/dist/store/slices/fileSlice.d.ts +7 -6
- package/dist/store/slices/formRevisionAttachmentSlice.d.ts +16 -21
- package/dist/store/slices/formRevisionSlice.d.ts +37 -26
- package/dist/store/slices/formSlice.d.ts +35 -21
- package/dist/store/slices/formSubmissionAttachmentSlice.d.ts +16 -21
- package/dist/store/slices/formSubmissionSlice.d.ts +16 -21
- package/dist/store/slices/geoImageSlice.d.ts +35 -24
- package/dist/store/slices/index.d.ts +38 -38
- package/dist/store/slices/issueAssociationSlice.d.ts +35 -24
- package/dist/store/slices/issueAttachmentSlice.d.ts +16 -21
- package/dist/store/slices/issueCommentSlice.d.ts +13 -18
- package/dist/store/slices/issueSlice.d.ts +13 -18
- package/dist/store/slices/issueTypeSlice.d.ts +12 -14
- package/dist/store/slices/issueUpdateSlice.d.ts +13 -18
- package/dist/store/slices/licenseSlice.d.ts +10 -9
- package/dist/store/slices/organizationAccessSlice.d.ts +11 -13
- package/dist/store/slices/organizationSlice.d.ts +27 -10
- package/dist/store/slices/outboxSlice.d.ts +15 -15
- package/dist/store/slices/projectAccessSlice.d.ts +11 -16
- package/dist/store/slices/projectAttachmentSlice.d.ts +16 -21
- package/dist/store/slices/projectFileSlice.d.ts +61 -30
- package/dist/store/slices/projectSlice.d.ts +10 -9
- package/dist/store/slices/rehydratedSlice.d.ts +7 -6
- package/dist/store/slices/teamSlice.d.ts +12 -14
- package/dist/store/slices/userSlice.d.ts +14 -13
- package/dist/store/slices/versioningSlice.d.ts +3 -2
- package/dist/store/slices/workspaceSlice.d.ts +31 -17
- package/dist/store/store.d.ts +7 -7
- package/dist/typings/index.d.ts +6 -6
- package/dist/typings/models/access.d.ts +3 -2
- package/dist/typings/models/agents.d.ts +3 -2
- package/dist/typings/models/assets.d.ts +3 -2
- package/dist/typings/models/attachments.d.ts +3 -2
- package/dist/typings/models/base.d.ts +3 -2
- package/dist/typings/models/categories.d.ts +3 -2
- package/dist/typings/models/documents.d.ts +2 -1
- package/dist/typings/models/emailDomain.d.ts +2 -1
- package/dist/typings/models/emailVerification.d.ts +3 -2
- package/dist/typings/models/forms.d.ts +4 -3
- package/dist/typings/models/geo.d.ts +2 -1
- package/dist/typings/models/geoImages.d.ts +4 -3
- package/dist/typings/models/index.d.ts +21 -21
- package/dist/typings/models/issueTypes.d.ts +3 -2
- package/dist/typings/models/issues.d.ts +7 -6
- package/dist/typings/models/license.d.ts +3 -2
- package/dist/typings/models/organizations.d.ts +2 -1
- package/dist/typings/models/projects.d.ts +4 -3
- package/dist/typings/models/store.d.ts +3 -3
- package/dist/typings/models/teams.d.ts +4 -3
- package/dist/typings/models/users.d.ts +2 -1
- package/dist/typings/models/workspace.d.ts +2 -1
- package/dist/typings/search.d.ts +1 -1
- package/dist/typings/store.d.ts +2 -1
- package/dist/utils/async/DeferredPromise.d.ts +1 -1
- package/dist/utils/colors.d.ts +2 -1
- package/dist/utils/coordinates.d.ts +2 -1
- package/dist/utils/file.d.ts +2 -1
- package/dist/utils/forms.d.ts +2 -1
- package/dist/utils/index.d.ts +10 -10
- package/dist/utils/offline.d.ts +2 -1
- package/dist/utils/utils.d.ts +2 -1
- package/package.json +20 -21
package/dist/sdk/base.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { FileService } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { FileService } from './services';
|
|
2
|
+
import { SDKRequest } from './typings';
|
|
3
|
+
import { BaseState } from '../typings';
|
|
4
|
+
import { ActionCreatorWithPayload, Store, UnknownAction } from '@reduxjs/toolkit';
|
|
5
|
+
import { ResultAction } from '@redux-offline/redux-offline/lib/types';
|
|
6
|
+
|
|
5
7
|
export declare abstract class BaseSDK<TState extends BaseState> {
|
|
6
|
-
readonly store:
|
|
8
|
+
readonly store: Store<TState, UnknownAction | ResultAction | ActionCreatorWithPayload<any, any>>;
|
|
7
9
|
abstract readonly files: FileService<TState, BaseSDK<TState>>;
|
|
8
|
-
protected constructor(store:
|
|
10
|
+
protected constructor(store: Store<TState>);
|
|
9
11
|
enqueueRequest<TResult>(requestDetails: SDKRequest, host: string, serviceName: string): Promise<TResult>;
|
|
10
12
|
private _enqueueRequest;
|
|
11
13
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { DepGraph } from 'dependency-graph';
|
|
2
|
+
import { FullOfflineAction } from '../../store';
|
|
3
|
+
import { Outbox } from '@redux-offline/redux-offline/lib/types';
|
|
4
|
+
|
|
5
5
|
export declare class OutboxCoordinator {
|
|
6
6
|
graph: DepGraph<FullOfflineAction>;
|
|
7
7
|
requestAttemptCounter: Record<string, number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './OutboxCoordinator';
|
package/dist/sdk/errors.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import request from
|
|
1
|
+
import { default as request } from 'superagent';
|
|
2
|
+
|
|
2
3
|
export interface APIErrorOptions {
|
|
3
4
|
response?: request.Response;
|
|
4
5
|
innerError?: unknown;
|
|
5
6
|
message?: string;
|
|
6
7
|
discard?: boolean;
|
|
7
8
|
}
|
|
9
|
+
export declare const UNKNOWN_ERROR_MESSAGE = "An unknown error occurred";
|
|
8
10
|
export declare class APIError extends Error {
|
|
9
11
|
status: number;
|
|
10
12
|
response: request.Response | undefined;
|
package/dist/sdk/globals.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { Store, UnknownAction } from '@reduxjs/toolkit';
|
|
2
|
+
import { BaseState } from '../typings';
|
|
3
|
+
import { BaseSDK } from './base';
|
|
4
|
+
import { ResultAction } from '@redux-offline/redux-offline/lib/types';
|
|
5
|
+
|
|
6
|
+
export declare function setClientStore<TState extends BaseState>(store: Store<TState>): void;
|
|
7
|
+
export declare function getClientStore(): Store<BaseState, UnknownAction | ResultAction> | undefined;
|
|
6
8
|
export declare function setClientSDK<TState extends BaseState>(sdkCtor: BaseSDK<TState>): void;
|
|
7
9
|
export declare function getClientSDK(): BaseSDK<BaseState> | undefined;
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
1
|
+
export * from './classes';
|
|
2
|
+
export * from './errors';
|
|
3
|
+
export * from './base';
|
|
4
|
+
export * from './sdk';
|
|
5
|
+
export * from './services';
|
|
6
|
+
export * from './typings';
|
package/dist/sdk/sdk.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { BaseSDK } from './base';
|
|
2
|
+
import { BaseState } from '../typings';
|
|
3
|
+
import { OvermapSDKConstructor } from './typings';
|
|
4
|
+
import { Store } from '@reduxjs/toolkit';
|
|
5
|
+
|
|
6
|
+
export declare const initSDK: <TState extends BaseState, TSDK extends BaseSDK<TState>>(store: Store<TState>, sdk: OvermapSDKConstructor<TState, TSDK>) => TSDK;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { BaseApiService } from
|
|
3
|
-
import
|
|
1
|
+
import { AgentUserConversation, OvermapRootState } from '../../typings';
|
|
2
|
+
import { BaseApiService } from './BaseApiService';
|
|
3
|
+
import { BaseSDK } from '../base';
|
|
4
|
+
|
|
4
5
|
export declare abstract class AgentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
5
6
|
startConversation(prompt: string, projectId: number): Promise<AgentUserConversation>;
|
|
6
7
|
continueConversation(prompt: string, conversationId: AgentUserConversation["offline_id"], projectId: number): Promise<void>;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { BaseAttachmentService } from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { AttachmentModel } from
|
|
1
|
+
import { BaseAttachmentService } from './BaseAttachmentService';
|
|
2
|
+
import { AssetAttachment, Stored, OvermapRootState } from '../../typings';
|
|
3
|
+
import { OptimisticMultipleModelResult } from '../typings';
|
|
4
|
+
import { BaseSDK } from '../base';
|
|
5
|
+
import { AttachmentModel } from '../../enums';
|
|
6
|
+
|
|
6
7
|
export declare abstract class AssetAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, AssetAttachment> {
|
|
7
8
|
attachmentModel: AttachmentModel;
|
|
8
|
-
initializeAttachments: import(
|
|
9
|
-
addAttachments: import(
|
|
10
|
-
updateAttachments: import(
|
|
11
|
-
removeAttachments: import(
|
|
12
|
-
removeAttachment: import(
|
|
13
|
-
setAttachment: import(
|
|
14
|
-
selectAttachment: import('
|
|
9
|
+
initializeAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<AssetAttachment>[], "assetAttachments/initializeAssetAttachments">;
|
|
10
|
+
addAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<AssetAttachment>[], "assetAttachments/addAssetAttachments">;
|
|
11
|
+
updateAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<AssetAttachment>[], "assetAttachments/updateAssetAttachments">;
|
|
12
|
+
removeAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<string[], "assetAttachments/deleteAssetAttachments">;
|
|
13
|
+
removeAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, "assetAttachments/deleteAssetAttachment">;
|
|
14
|
+
setAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<AssetAttachment>, "assetAttachments/setAssetAttachment">;
|
|
15
|
+
selectAttachment: import('../..').OvermapSelectorWithArgs<string, Stored<AssetAttachment> | undefined>;
|
|
15
16
|
private buildOfflineAttachment;
|
|
16
17
|
attachFilesToAsset(files: File[], assetId: string): Promise<OptimisticMultipleModelResult<AssetAttachment>>;
|
|
17
18
|
deleteAssetAttachment(attachmentId: string): Promise<void>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { BaseApiService } from
|
|
4
|
-
import
|
|
1
|
+
import { Asset, Created, Offline, OvermapRootState, Payload } from '../../typings';
|
|
2
|
+
import { OptimisticModelResult } from '../typings';
|
|
3
|
+
import { BaseApiService } from './BaseApiService';
|
|
4
|
+
import { BaseSDK } from '../base';
|
|
5
|
+
|
|
5
6
|
export declare abstract class AssetService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
6
7
|
add(payload: Payload<Asset>): OptimisticModelResult<Asset>;
|
|
7
8
|
update(payload: Offline<Partial<Payload<Asset>>>): OptimisticModelResult<Asset>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { BaseApiService } from
|
|
4
|
-
import
|
|
1
|
+
import { OptimisticModelResult, OptimisticMultipleModelResult } from '../typings';
|
|
2
|
+
import { AssetStageCompletion, OvermapRootState, Payload } from '../../typings';
|
|
3
|
+
import { BaseApiService } from './BaseApiService';
|
|
4
|
+
import { BaseSDK } from '../base';
|
|
5
|
+
|
|
5
6
|
export declare abstract class AssetStageCompletionService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
6
7
|
add(payload: Payload<AssetStageCompletion>): OptimisticModelResult<AssetStageCompletion>;
|
|
7
8
|
delete(id: string): Promise<undefined>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { BaseApiService } from
|
|
3
|
-
import
|
|
4
|
-
import { OptimisticModelResult, OptimisticMultipleModelResult } from
|
|
1
|
+
import { AssetStage, Offline, OvermapRootState, Payload } from '../../typings';
|
|
2
|
+
import { BaseApiService } from './BaseApiService';
|
|
3
|
+
import { BaseSDK } from '../base';
|
|
4
|
+
import { OptimisticModelResult, OptimisticMultipleModelResult } from '../typings';
|
|
5
|
+
|
|
5
6
|
export declare abstract class AssetStageService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
6
7
|
bulkAdd(stagesToSubmit: Omit<Payload<AssetStage>, "asset_type">[], assetTypeId: string): OptimisticMultipleModelResult<AssetStage>;
|
|
7
8
|
bulkUpdate(stagesToUpdate: AssetStage[], assetTypeId: string): Promise<AssetStage[]>;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { BaseAttachmentService } from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { AttachmentModel } from
|
|
1
|
+
import { BaseAttachmentService } from './BaseAttachmentService';
|
|
2
|
+
import { AssetTypeAttachment, Stored, OvermapRootState } from '../../typings';
|
|
3
|
+
import { OptimisticMultipleModelResult } from '../typings';
|
|
4
|
+
import { BaseSDK } from '../base';
|
|
5
|
+
import { AttachmentModel } from '../../enums';
|
|
6
|
+
|
|
6
7
|
export declare abstract class AssetTypeAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, AssetTypeAttachment> {
|
|
7
8
|
attachmentModel: AttachmentModel;
|
|
8
|
-
initializeAttachments: import(
|
|
9
|
-
addAttachments: import(
|
|
10
|
-
updateAttachments: import(
|
|
11
|
-
removeAttachments: import(
|
|
12
|
-
removeAttachment: import(
|
|
13
|
-
setAttachment: import(
|
|
14
|
-
selectAttachment: import('
|
|
9
|
+
initializeAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<AssetTypeAttachment>[], "assetTypeAttachments/initializeAssetTypeAttachments">;
|
|
10
|
+
addAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<AssetTypeAttachment>[], "assetTypeAttachments/addAssetTypeAttachments">;
|
|
11
|
+
updateAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<AssetTypeAttachment>[], "assetTypeAttachments/updateAssetTypeAttachments">;
|
|
12
|
+
removeAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<string[], "assetTypeAttachments/deleteAssetTypeAttachments">;
|
|
13
|
+
removeAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, "assetTypeAttachments/deleteAssetTypeAttachment">;
|
|
14
|
+
setAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<AssetTypeAttachment>, "assetTypeAttachments/setAssetTypeAttachment">;
|
|
15
|
+
selectAttachment: import('../..').OvermapSelectorWithArgs<string, Stored<AssetTypeAttachment> | undefined>;
|
|
15
16
|
private buildOfflineAttachment;
|
|
16
17
|
attachFilesToAssetType(files: File[], assetTypeId: string): Promise<OptimisticMultipleModelResult<AssetTypeAttachment>>;
|
|
17
18
|
deleteAssetTypeAttachment(attachmentId: string): Promise<void>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { BaseApiService } from
|
|
4
|
-
import
|
|
1
|
+
import { AssetType, Offline, OvermapRootState, Payload } from '../../typings';
|
|
2
|
+
import { OptimisticModelResult } from '../typings';
|
|
3
|
+
import { BaseApiService } from './BaseApiService';
|
|
4
|
+
import { BaseSDK } from '../base';
|
|
5
|
+
|
|
5
6
|
export declare abstract class AssetTypeService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
6
7
|
add(payload: Payload<AssetType>): OptimisticModelResult<AssetType>;
|
|
7
8
|
update(payload: Offline<Partial<Payload<AssetType>>>): OptimisticModelResult<AssetType>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { BaseAuthService } from
|
|
4
|
-
import { BaseService } from
|
|
1
|
+
import { BaseSDK } from '../base';
|
|
2
|
+
import { BaseState } from '../../typings';
|
|
3
|
+
import { BaseAuthService } from './BaseAuthService';
|
|
4
|
+
import { BaseService } from './BaseService';
|
|
5
|
+
|
|
5
6
|
/**
|
|
6
7
|
* Abstract base class for building a service that can enqueue API requests
|
|
7
8
|
*/
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { ActionCreatorWithPayload } from
|
|
2
|
-
import
|
|
3
|
-
import { AttachmentModel } from
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { BaseUploadService } from
|
|
1
|
+
import { ActionCreatorWithPayload } from '@reduxjs/toolkit';
|
|
2
|
+
import { OptimisticMultipleModelResult } from '../typings';
|
|
3
|
+
import { AttachmentModel } from '../../enums';
|
|
4
|
+
import { Attachment, OfflineModel, OvermapRootState, OvermapSelectorWithArgs, Stored, Submitted } from '../../typings';
|
|
5
|
+
import { BaseSDK } from '../base';
|
|
6
|
+
import { BaseUploadService } from './BaseUploadService';
|
|
7
|
+
|
|
7
8
|
export interface AttachmentPayload {
|
|
8
9
|
offline_id: OfflineModel["offline_id"];
|
|
9
10
|
name: Attachment["file_name"];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Response, SuperAgentRequest } from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { BaseService } from
|
|
1
|
+
import { Response, SuperAgentRequest } from 'superagent';
|
|
2
|
+
import { BaseState } from '../../typings';
|
|
3
|
+
import { BaseSDK } from '../base';
|
|
4
|
+
import { BaseService } from './BaseService';
|
|
5
|
+
|
|
5
6
|
export declare abstract class BaseAuthService<TStore extends BaseState, TSDK extends BaseSDK<TStore>> extends BaseService<TStore, TSDK> {
|
|
6
7
|
protected constructor(sdk: TSDK);
|
|
7
8
|
abstract initAuth(payload: object): Promise<void>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { ActionCreatorWithPayload, UnknownAction } from '@reduxjs/toolkit';
|
|
2
|
+
import { BaseSDK } from '../base';
|
|
3
|
+
import { BaseState } from '../../typings';
|
|
4
|
+
import { SDKRequest } from '../typings';
|
|
5
|
+
import { ResultAction } from '@redux-offline/redux-offline/lib/types';
|
|
6
|
+
|
|
5
7
|
export declare const CLASS_NAME_TO_SERVICE: Record<string, BaseService<BaseState, BaseSDK<BaseState>>>;
|
|
6
8
|
/**
|
|
7
9
|
* Abstract base class for building a service that can enqueue API requests
|
|
@@ -11,5 +13,5 @@ export declare abstract class BaseService<TStore extends BaseState, TSDK extends
|
|
|
11
13
|
abstract readonly host: string;
|
|
12
14
|
protected constructor(sdk: TSDK);
|
|
13
15
|
protected enqueueRequest<TResult>(requestDetails: SDKRequest): Promise<TResult>;
|
|
14
|
-
protected dispatch(action:
|
|
16
|
+
protected dispatch(action: UnknownAction | ResultAction | ActionCreatorWithPayload<any, any>): void;
|
|
15
17
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { BaseApiService } from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { BaseApiService } from './BaseApiService';
|
|
2
|
+
import { PresignedUrlsResponse } from '../typings';
|
|
3
|
+
import { OvermapRootState } from '../../typings';
|
|
4
|
+
import { BaseSDK } from '../base';
|
|
5
|
+
|
|
5
6
|
export declare abstract class BaseUploadService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
6
7
|
protected getNumberOfAttachmentsWithSha1(sha1: string): number;
|
|
7
8
|
protected processPresignedUrls(presignedUrls: PresignedUrlsResponse): Record<string, Promise<undefined>>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { BaseApiService } from
|
|
4
|
-
import
|
|
1
|
+
import { Category, Offline, OvermapRootState, Payload } from '../../typings';
|
|
2
|
+
import { OptimisticModelResult } from '../typings';
|
|
3
|
+
import { BaseApiService } from './BaseApiService';
|
|
4
|
+
import { BaseSDK } from '../base';
|
|
5
|
+
|
|
5
6
|
export declare abstract class CategoryService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
6
7
|
add(payload: Payload<Category>): OptimisticModelResult<Category>;
|
|
7
8
|
update(payload: Offline<Partial<Payload<Category>>>): OptimisticModelResult<Category>;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { BaseAttachmentService } from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { AttachmentModel } from
|
|
1
|
+
import { BaseAttachmentService } from './BaseAttachmentService';
|
|
2
|
+
import { DocumentAttachment, OvermapRootState, Stored } from '../../typings';
|
|
3
|
+
import { OptimisticMultipleModelResult } from '../typings';
|
|
4
|
+
import { BaseSDK } from '../base';
|
|
5
|
+
import { AttachmentModel } from '../../enums';
|
|
6
|
+
|
|
6
7
|
export declare abstract class DocumentAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, DocumentAttachment> {
|
|
7
8
|
attachmentModel: AttachmentModel;
|
|
8
|
-
initializeAttachments: import(
|
|
9
|
-
addAttachments: import(
|
|
10
|
-
updateAttachments: import(
|
|
11
|
-
removeAttachments: import(
|
|
12
|
-
removeAttachment: import(
|
|
13
|
-
setAttachment: import(
|
|
14
|
-
selectAttachment: import('
|
|
9
|
+
initializeAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<DocumentAttachment>[], "documentAttachments/initializeDocumentAttachments">;
|
|
10
|
+
addAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<DocumentAttachment>[], "documentAttachments/addDocumentAttachments">;
|
|
11
|
+
updateAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<DocumentAttachment>[], "documentAttachments/updateDocumentAttachments">;
|
|
12
|
+
removeAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<string[], "documentAttachments/deleteDocumentAttachments">;
|
|
13
|
+
removeAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, "documentAttachments/deleteDocumentAttachment">;
|
|
14
|
+
setAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<DocumentAttachment>, "documentAttachments/setDocumentAttachment">;
|
|
15
|
+
selectAttachment: import('../..').OvermapSelectorWithArgs<string, Stored<DocumentAttachment> | undefined>;
|
|
15
16
|
private buildOfflineAttachment;
|
|
16
17
|
attachFilesToDocument(files: File[], documentId: string): Promise<OptimisticMultipleModelResult<DocumentAttachment>>;
|
|
17
18
|
deleteDocumentAttachment(attachmentId: string): Promise<void>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { BaseApiService } from
|
|
4
|
-
import
|
|
1
|
+
import { Document, MovePosition, Offline, OvermapRootState, Payload } from '../../typings';
|
|
2
|
+
import { OptimisticModelResult } from '../typings';
|
|
3
|
+
import { BaseApiService } from './BaseApiService';
|
|
4
|
+
import { BaseSDK } from '../base';
|
|
5
|
+
|
|
5
6
|
export declare abstract class DocumentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
6
7
|
add(payload: Payload<Document>): OptimisticModelResult<Document>;
|
|
7
8
|
update(payload: Offline<Partial<Payload<Document>>>): OptimisticModelResult<Document>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { BaseApiService } from
|
|
3
|
-
import
|
|
1
|
+
import { EmailDomain, OvermapRootState } from '../../typings';
|
|
2
|
+
import { BaseApiService } from './BaseApiService';
|
|
3
|
+
import { BaseSDK } from '../base';
|
|
4
|
+
|
|
4
5
|
export declare abstract class EmailDomainsService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
5
6
|
add(orgId: number, email: string): Promise<undefined>;
|
|
6
7
|
remove(emailDomain: EmailDomain): Promise<undefined>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { BaseApiService } from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { BaseApiService } from './BaseApiService';
|
|
2
|
+
import { BaseSDK } from '../base';
|
|
3
|
+
import { EmailVerificationPayload, EmailVerificationReturn, OvermapRootState, VerificationCode } from '../../typings';
|
|
4
|
+
|
|
4
5
|
export declare abstract class EmailVerificationService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
5
6
|
getVerificationCode(verificationCode: string): Promise<VerificationCode>;
|
|
6
7
|
validateVerificationCode(verificationCode: string, payload?: EmailVerificationPayload | undefined): Promise<EmailVerificationReturn>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { BaseApiService } from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { BaseApiService } from './BaseApiService';
|
|
2
|
+
import { BaseSDK } from '../base';
|
|
3
|
+
import { BaseState } from '../../typings';
|
|
4
|
+
|
|
4
5
|
export interface GetS3UrlSuccessResponse {
|
|
5
6
|
url: string;
|
|
6
7
|
fields: Record<string, string>;
|
|
@@ -43,6 +44,6 @@ export declare abstract class FileService<TState extends BaseState, TSDK extends
|
|
|
43
44
|
* @param downloadedName (Optional) The name to give the file after download. Set to the name of an attachment, for
|
|
44
45
|
* example.
|
|
45
46
|
*/
|
|
46
|
-
fetchFileFromUrl(url: string, expectedSha1: string, downloadedName?: string
|
|
47
|
+
fetchFileFromUrl(url: string, expectedSha1: string, downloadedName?: string): Promise<File>;
|
|
47
48
|
}
|
|
48
49
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { BaseUploadService } from
|
|
4
|
-
import { ISerializedField } from
|
|
1
|
+
import { Form, FormRevision, FormRevisionAttachment, FormRevisionPayload, OvermapRootState, Stored, Created } from '../../typings';
|
|
2
|
+
import { BaseSDK } from '../base';
|
|
3
|
+
import { BaseUploadService } from './BaseUploadService';
|
|
4
|
+
import { ISerializedField } from '@overmap-ai/forms';
|
|
5
|
+
|
|
5
6
|
export declare abstract class FormService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
|
|
6
7
|
private bulkAddRevisionAttachments;
|
|
7
8
|
private add;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { BaseUploadService } from
|
|
5
|
-
import { FieldValue } from
|
|
1
|
+
import { Created, FormSubmission, FormSubmissionAttachment, Offline, OvermapRootState, Payload, Stored } from '../../typings';
|
|
2
|
+
import { PresignedUrlsResponse } from '../typings';
|
|
3
|
+
import { BaseSDK } from '../base';
|
|
4
|
+
import { BaseUploadService } from './BaseUploadService';
|
|
5
|
+
import { FieldValue } from '@overmap-ai/forms';
|
|
6
|
+
|
|
6
7
|
interface BulkAddRequestReturnValue {
|
|
7
8
|
submissions: Created<FormSubmission>[];
|
|
8
9
|
attachments: Created<FormSubmissionAttachment>[];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { BaseUploadService } from
|
|
1
|
+
import { BulkGeoImagePayload, GeoImage, GeoImagePayload, Offline, OvermapRootState } from '../../typings';
|
|
2
|
+
import { OptimisticModelResult, OptimisticMultipleModelResult } from '../typings';
|
|
3
|
+
import { BaseSDK } from '../base';
|
|
4
|
+
import { BaseUploadService } from './BaseUploadService';
|
|
5
|
+
|
|
5
6
|
export declare abstract class GeoImageService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
|
|
6
7
|
add(payload: GeoImagePayload): Promise<OptimisticModelResult<GeoImage>>;
|
|
7
8
|
bulkAdd(payloads: BulkGeoImagePayload[], projectId: number): Promise<OptimisticMultipleModelResult<GeoImage>>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { BaseUploadService } from
|
|
1
|
+
import { IssueAssociation, OvermapRootState, Payload } from '../../typings';
|
|
2
|
+
import { OptimisticModelResult } from '../typings';
|
|
3
|
+
import { BaseSDK } from '../base';
|
|
4
|
+
import { BaseUploadService } from './BaseUploadService';
|
|
5
|
+
|
|
5
6
|
export declare abstract class IssueAssociationService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
|
|
6
7
|
add(payload: Payload<IssueAssociation>): OptimisticModelResult<IssueAssociation>;
|
|
7
8
|
delete(id: string): Promise<void>;
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { BaseAttachmentService } from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { AttachmentModel } from
|
|
1
|
+
import { BaseAttachmentService } from './BaseAttachmentService';
|
|
2
|
+
import { OptimisticMultipleModelResult } from '../typings';
|
|
3
|
+
import { IssueAttachment, OvermapRootState, Stored } from '../../typings';
|
|
4
|
+
import { BaseSDK } from '../base';
|
|
5
|
+
import { AttachmentModel } from '../../enums';
|
|
6
|
+
|
|
6
7
|
export declare abstract class IssueAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, IssueAttachment> {
|
|
7
8
|
attachmentModel: AttachmentModel;
|
|
8
|
-
initializeAttachments: import(
|
|
9
|
-
addAttachments: import(
|
|
10
|
-
updateAttachments: import(
|
|
11
|
-
removeAttachments: import(
|
|
12
|
-
removeAttachment: import(
|
|
13
|
-
setAttachment: import(
|
|
14
|
-
selectAttachment: import('
|
|
9
|
+
initializeAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<IssueAttachment>[], "issueAttachments/initializeIssueAttachments">;
|
|
10
|
+
addAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<IssueAttachment>[], "issueAttachments/addIssueAttachments">;
|
|
11
|
+
updateAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<IssueAttachment>[], "issueAttachments/updateIssueAttachments">;
|
|
12
|
+
removeAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<string[], "issueAttachments/deleteIssueAttachments">;
|
|
13
|
+
removeAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, "issueAttachments/deleteIssueAttachment">;
|
|
14
|
+
setAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<IssueAttachment>, "issueAttachments/setIssueAttachment">;
|
|
15
|
+
selectAttachment: import('../..').OvermapSelectorWithArgs<string, Stored<IssueAttachment> | undefined>;
|
|
15
16
|
private buildOfflineAttachment;
|
|
16
17
|
attachFilesToIssue(files: File[], issueId: string): Promise<OptimisticMultipleModelResult<IssueAttachment>>;
|
|
17
18
|
deleteIssueAttachment(attachmentId: string): Promise<void>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { BaseApiService } from
|
|
4
|
-
import
|
|
1
|
+
import { IssueComment, Offline, OvermapRootState, Payload } from '../../typings';
|
|
2
|
+
import { OptimisticModelResult } from '../typings';
|
|
3
|
+
import { BaseApiService } from './BaseApiService';
|
|
4
|
+
import { BaseSDK } from '../base';
|
|
5
|
+
|
|
5
6
|
export declare abstract class IssueCommentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
6
7
|
add(payload: Omit<Payload<IssueComment>, "author">): OptimisticModelResult<IssueComment>;
|
|
7
8
|
update(payload: Offline<Partial<Payload<IssueComment>>>): OptimisticModelResult<IssueComment>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { BaseApiService } from
|
|
4
|
-
import
|
|
1
|
+
import { OptimisticModelResult } from '../typings';
|
|
2
|
+
import { Issue, Offline, OvermapRootState, Payload } from '../../typings';
|
|
3
|
+
import { BaseApiService } from './BaseApiService';
|
|
4
|
+
import { BaseSDK } from '../base';
|
|
5
|
+
|
|
5
6
|
/**
|
|
6
7
|
* Handles CRUD operations on issues
|
|
7
8
|
*/
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { BaseApiService } from
|
|
4
|
-
import
|
|
1
|
+
import { OptimisticModelResult } from '../typings';
|
|
2
|
+
import { IssueType, Offline, OvermapRootState, Payload } from '../../typings';
|
|
3
|
+
import { BaseApiService } from './BaseApiService';
|
|
4
|
+
import { BaseSDK } from '../base';
|
|
5
|
+
|
|
5
6
|
export declare abstract class IssueTypeService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
6
7
|
add(payload: Payload<IssueType>): OptimisticModelResult<IssueType>;
|
|
7
8
|
update(payload: Offline<Partial<Payload<IssueType>>>): OptimisticModelResult<IssueType>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { BaseApiService } from
|
|
3
|
-
import
|
|
1
|
+
import { OvermapRootState } from '../../typings';
|
|
2
|
+
import { BaseApiService } from './BaseApiService';
|
|
3
|
+
import { BaseSDK } from '../base';
|
|
4
|
+
|
|
4
5
|
export declare abstract class IssueUpdateService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
5
6
|
refreshStore(projectId: number): Promise<void>;
|
|
6
7
|
}
|