@overmap-ai/core 1.0.75 → 1.0.77-store-typing-improvements.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/overmap-core.js +4731 -3705
- package/dist/overmap-core.umd.cjs +11 -11
- package/dist/sdk/base.d.ts +1 -1
- package/dist/sdk/globals.d.ts +1 -1
- package/dist/sdk/sdk.d.ts +1 -1
- package/dist/sdk/services/AgentService.d.ts +7 -6
- package/dist/sdk/services/AssetAttachmentService.d.ts +10 -9
- package/dist/sdk/services/AssetProcedureAttachmentService.d.ts +40 -0
- package/dist/sdk/services/AssetProcedureFieldValuesAttachmentService.d.ts +16 -0
- package/dist/sdk/services/AssetProcedureFieldValuesService.d.ts +22 -0
- package/dist/sdk/services/AssetProcedureFieldsAttachmentService.d.ts +13 -0
- package/dist/sdk/services/AssetProcedureFieldsService.d.ts +9 -0
- package/dist/sdk/services/AssetProcedureInstanceService.d.ts +11 -0
- package/dist/sdk/services/AssetProcedureService.d.ts +11 -0
- package/dist/sdk/services/AssetService.d.ts +6 -5
- package/dist/sdk/services/AssetStageCompletionService.d.ts +5 -4
- package/dist/sdk/services/AssetStageService.d.ts +7 -6
- package/dist/sdk/services/AssetTypeAttachmentService.d.ts +10 -9
- package/dist/sdk/services/AssetTypeFieldValuesAttachmentService.d.ts +5 -4
- package/dist/sdk/services/AssetTypeFieldValuesService.d.ts +10 -9
- package/dist/sdk/services/AssetTypeFieldsAttachmentService.d.ts +4 -3
- package/dist/sdk/services/AssetTypeFieldsService.d.ts +3 -2
- package/dist/sdk/services/AssetTypeService.d.ts +5 -4
- package/dist/sdk/services/BaseApiService.d.ts +1 -1
- package/dist/sdk/services/BaseAttachmentService.d.ts +13 -12
- package/dist/sdk/services/BaseAuthService.d.ts +1 -1
- package/dist/sdk/services/BaseService.d.ts +1 -1
- package/dist/sdk/services/BaseUploadService.d.ts +2 -1
- package/dist/sdk/services/CategoryService.d.ts +5 -4
- package/dist/sdk/services/DocumentAttachmentService.d.ts +10 -9
- package/dist/sdk/services/DocumentService.d.ts +6 -5
- package/dist/sdk/services/EmailDomainsService.d.ts +4 -3
- package/dist/sdk/services/EmailVerificationService.d.ts +2 -1
- package/dist/sdk/services/FileService.d.ts +1 -1
- package/dist/sdk/services/FormRevisionAttachmentService.d.ts +4 -3
- package/dist/sdk/services/FormRevisionService.d.ts +3 -2
- package/dist/sdk/services/FormService.d.ts +4 -12
- package/dist/sdk/services/FormSubmissionAttachmentService.d.ts +5 -4
- package/dist/sdk/services/FormSubmissionService.d.ts +5 -9
- package/dist/sdk/services/GeoImageService.d.ts +6 -5
- package/dist/sdk/services/IssueAssociationService.d.ts +4 -3
- package/dist/sdk/services/IssueAttachmentService.d.ts +10 -9
- package/dist/sdk/services/IssueCommentAttachmentService.d.ts +10 -9
- package/dist/sdk/services/IssueCommentService.d.ts +5 -4
- package/dist/sdk/services/IssueService.d.ts +5 -4
- package/dist/sdk/services/IssueTypeAttachmentService.d.ts +10 -9
- package/dist/sdk/services/IssueTypeFieldValuesAttachmentService.d.ts +5 -4
- package/dist/sdk/services/IssueTypeFieldValuesService.d.ts +5 -4
- package/dist/sdk/services/IssueTypeFieldsAttachmentService.d.ts +4 -3
- package/dist/sdk/services/IssueTypeFieldsService.d.ts +3 -2
- package/dist/sdk/services/IssueTypeService.d.ts +5 -4
- package/dist/sdk/services/IssueUpdateService.d.ts +3 -2
- package/dist/sdk/services/JWTAuthService.d.ts +1 -1
- package/dist/sdk/services/LicenseService.d.ts +3 -2
- package/dist/sdk/services/OrganizationAccessService.d.ts +3 -5
- package/dist/sdk/services/OrganizationService.d.ts +4 -3
- package/dist/sdk/services/ProjectAccessService.d.ts +4 -6
- package/dist/sdk/services/ProjectAttachmentService.d.ts +12 -11
- package/dist/sdk/services/ProjectFileService.d.ts +4 -3
- package/dist/sdk/services/ProjectService.d.ts +6 -5
- package/dist/sdk/services/TeamService.d.ts +8 -7
- package/dist/sdk/services/UserService.d.ts +3 -2
- package/dist/sdk/services/index.d.ts +7 -0
- package/dist/sdk/typings.d.ts +2 -1
- package/dist/store/adapters/index.d.ts +3 -0
- package/dist/store/adapters/modelAdapter.d.ts +15 -0
- package/dist/store/adapters/selectionAdapter.d.ts +13 -0
- package/dist/store/adapters/typings.d.ts +6 -0
- package/dist/store/constants.d.ts +2 -0
- package/dist/store/index.d.ts +4 -2
- package/dist/store/migrations.d.ts +1 -1
- package/dist/store/reducers.d.ts +181 -0
- package/dist/store/slices/agentsSlice.d.ts +11 -11
- package/dist/store/slices/assetAttachmentSlice.d.ts +23 -17
- package/dist/store/slices/assetProcedureAttachmentSlice.d.ts +48 -0
- package/dist/store/slices/assetProcedureFieldValuesAttachmentSlice.d.ts +126 -0
- package/dist/store/slices/assetProcedureFieldValuesSlice.d.ts +126 -0
- package/dist/store/slices/assetProcedureFieldsAttachmentSlice.d.ts +125 -0
- package/dist/store/slices/assetProcedureFieldsSlice.d.ts +126 -0
- package/dist/store/slices/assetProcedureInstanceSlice.d.ts +127 -0
- package/dist/store/slices/assetProcedureSlice.d.ts +126 -0
- package/dist/store/slices/assetSlice.d.ts +81 -18
- package/dist/store/slices/assetStageCompletionSlice.d.ts +80 -17
- package/dist/store/slices/assetStageSlice.d.ts +85 -22
- package/dist/store/slices/assetTypeAttachmentSlice.d.ts +23 -17
- package/dist/store/slices/assetTypeFieldValuesAttachmentSlice.d.ts +80 -17
- package/dist/store/slices/assetTypeFieldValuesSlice.d.ts +81 -18
- package/dist/store/slices/assetTypeFieldsAttachmentSlice.d.ts +80 -17
- package/dist/store/slices/assetTypeFieldsSlice.d.ts +94 -31
- package/dist/store/slices/assetTypeSlice.d.ts +21 -15
- package/dist/store/slices/authSlice.d.ts +4 -4
- package/dist/store/slices/categorySlice.d.ts +71 -11
- package/dist/store/slices/documentAttachmentSlice.d.ts +23 -17
- package/dist/store/slices/documentSlice.d.ts +64 -7
- package/dist/store/slices/emailDomainsSlice.d.ts +72 -12
- package/dist/store/slices/fileSlice.d.ts +3 -3
- package/dist/store/slices/formRevisionAttachmentSlice.d.ts +21 -15
- package/dist/store/slices/formRevisionSlice.d.ts +88 -25
- package/dist/store/slices/formSlice.d.ts +74 -18
- package/dist/store/slices/formSubmissionAttachmentSlice.d.ts +21 -15
- package/dist/store/slices/formSubmissionSlice.d.ts +22 -16
- package/dist/store/slices/geoImageSlice.d.ts +80 -17
- package/dist/store/slices/index.d.ts +7 -0
- package/dist/store/slices/issueAssociationSlice.d.ts +79 -16
- package/dist/store/slices/issueAttachmentSlice.d.ts +21 -15
- package/dist/store/slices/issueCommentAttachmentSlice.d.ts +23 -17
- package/dist/store/slices/issueCommentSlice.d.ts +18 -12
- package/dist/store/slices/issueSlice.d.ts +18 -12
- package/dist/store/slices/issueTypeAttachmentSlice.d.ts +23 -17
- package/dist/store/slices/issueTypeFieldValuesAttachmentSlice.d.ts +80 -17
- package/dist/store/slices/issueTypeFieldValuesSlice.d.ts +80 -17
- package/dist/store/slices/issueTypeFieldsAttachmentSlice.d.ts +80 -17
- package/dist/store/slices/issueTypeFieldsSlice.d.ts +95 -32
- package/dist/store/slices/issueTypeSlice.d.ts +18 -15
- package/dist/store/slices/issueUpdateSlice.d.ts +17 -11
- package/dist/store/slices/licenseSlice.d.ts +10 -10
- package/dist/store/slices/organizationAccessSlice.d.ts +13 -10
- package/dist/store/slices/organizationSlice.d.ts +105 -13
- package/dist/store/slices/outboxSlice.d.ts +3 -3
- package/dist/store/slices/projectAccessSlice.d.ts +16 -10
- package/dist/store/slices/projectAttachmentSlice.d.ts +22 -16
- package/dist/store/slices/projectFileSlice.d.ts +80 -17
- package/dist/store/slices/projectSlice.d.ts +102 -19
- package/dist/store/slices/rehydratedSlice.d.ts +3 -3
- package/dist/store/slices/teamSlice.d.ts +16 -13
- package/dist/store/slices/userSlice.d.ts +49 -11
- package/dist/store/slices/versioningSlice.d.ts +1 -2
- package/dist/store/store.d.ts +1 -55
- package/dist/store/typings.d.ts +14 -3
- package/dist/typings/index.d.ts +0 -1
- package/dist/typings/models/agents.d.ts +2 -2
- package/dist/typings/models/assets.d.ts +36 -13
- package/dist/typings/models/attachments.d.ts +6 -3
- package/dist/typings/models/base.d.ts +60 -15
- package/dist/typings/models/categories.d.ts +3 -3
- package/dist/typings/models/documents.d.ts +4 -4
- package/dist/typings/models/emailDomain.d.ts +3 -3
- package/dist/typings/models/emailVerification.d.ts +5 -5
- package/dist/typings/models/fields.d.ts +4 -4
- package/dist/typings/models/forms.d.ts +8 -9
- package/dist/typings/models/geoImages.d.ts +4 -4
- package/dist/typings/models/index.d.ts +0 -3
- package/dist/typings/models/issueTypes.d.ts +3 -3
- package/dist/typings/models/issues.d.ts +13 -53
- package/dist/typings/models/license.d.ts +3 -3
- package/dist/typings/models/organizations.d.ts +9 -3
- package/dist/typings/models/projects.d.ts +11 -6
- package/dist/typings/models/store.d.ts +0 -54
- package/dist/typings/models/teams.d.ts +4 -4
- package/dist/typings/models/users.d.ts +2 -4
- package/dist/utils/offline.d.ts +3 -3
- package/dist/utils/utils.d.ts +3 -2
- package/package.json +5 -5
- package/dist/store/adapter.d.ts +0 -15
- package/dist/typings/models/access.d.ts +0 -12
- package/dist/typings/models/geo.d.ts +0 -13
- package/dist/typings/store.d.ts +0 -7
package/dist/sdk/base.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ResultAction } from '@redux-offline/redux-offline/lib/types';
|
|
2
2
|
import { ActionCreatorWithPayload, Store, UnknownAction } from '@reduxjs/toolkit';
|
|
3
|
-
import { BaseState } from '../
|
|
3
|
+
import { BaseState } from '../store';
|
|
4
4
|
import { FileService } from './services';
|
|
5
5
|
import { SDKRequest } from './typings';
|
|
6
6
|
export declare abstract class BaseSDK<TState extends BaseState> {
|
package/dist/sdk/globals.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ResultAction } from '@redux-offline/redux-offline/lib/types';
|
|
2
2
|
import { Store, UnknownAction } from '@reduxjs/toolkit';
|
|
3
|
-
import { BaseState } from '../
|
|
3
|
+
import { BaseState } from '../store';
|
|
4
4
|
import { BaseSDK } from './base';
|
|
5
5
|
export declare function setClientStore<TState extends BaseState>(store: Store<TState>): void;
|
|
6
6
|
export declare function getClientStore(): Store<BaseState, UnknownAction | ResultAction> | undefined;
|
package/dist/sdk/sdk.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Store } from '@reduxjs/toolkit';
|
|
2
|
-
import { BaseState } from '../
|
|
2
|
+
import { BaseState } from '../store';
|
|
3
3
|
import { BaseSDK } from './base';
|
|
4
4
|
import { OvermapSDKConstructor } from './typings';
|
|
5
5
|
export declare const initSDK: <TState extends BaseState, TSDK extends BaseSDK<TState>>(store: Store<TState>, sdk: OvermapSDKConstructor<TState, TSDK>) => TSDK;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OvermapRootState } from '../../store';
|
|
2
|
+
import { AgentUserConversation, Project } from '../../typings';
|
|
2
3
|
import { BaseSDK } from '../base';
|
|
3
4
|
import { BaseApiService } from './BaseApiService';
|
|
4
5
|
export declare abstract class AgentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
5
|
-
startConversation(prompt: string,
|
|
6
|
-
continueConversation(prompt: string,
|
|
7
|
-
fetchDetails(
|
|
8
|
-
rate(
|
|
9
|
-
refreshStore(
|
|
6
|
+
startConversation(prompt: string, projectUuid: Project["uuid"]): Promise<AgentUserConversation>;
|
|
7
|
+
continueConversation(prompt: string, conversationUuid: AgentUserConversation["uuid"], projectUuid: Project["uuid"]): Promise<void>;
|
|
8
|
+
fetchDetails(conversationUuid: AgentUserConversation["uuid"]): Promise<void>;
|
|
9
|
+
rate(responseUuid: string, rating: 1 | 5): Promise<undefined>;
|
|
10
|
+
refreshStore(projectUuid: Project["uuid"]): Promise<void>;
|
|
10
11
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OvermapRootState } from '../../store';
|
|
2
|
+
import { Asset, AssetAttachment, Project, Stored } from '../../typings';
|
|
2
3
|
import { BaseSDK } from '../base';
|
|
3
4
|
import { OptimisticMultipleModelResult } from '../typings';
|
|
4
5
|
import { BaseAttachmentService, BuildAttachmentPayloadData, BuildOfflineAttachmentData } from './BaseAttachmentService';
|
|
5
|
-
export declare abstract class AssetAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK,
|
|
6
|
+
export declare abstract class AssetAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, AssetAttachment> {
|
|
6
7
|
name: string;
|
|
7
8
|
url: string;
|
|
8
9
|
initializeAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<AssetAttachment>[], "assetAttachments/initializeAssetAttachments">;
|
|
@@ -12,7 +13,7 @@ export declare abstract class AssetAttachmentService<TState extends OvermapRootS
|
|
|
12
13
|
removeAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, "assetAttachments/deleteAssetAttachment">;
|
|
13
14
|
setAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<AssetAttachment>, "assetAttachments/setAssetAttachment">;
|
|
14
15
|
selectAttachment: import('../..').OvermapSelectorWithArgs<string, Stored<AssetAttachment> | undefined>;
|
|
15
|
-
protected buildOfflineAttachment(data: BuildOfflineAttachmentData
|
|
16
|
+
protected buildOfflineAttachment(data: BuildOfflineAttachmentData): import('../..').UUID<{
|
|
16
17
|
file: string;
|
|
17
18
|
file_sha1: string;
|
|
18
19
|
created_by: number | undefined;
|
|
@@ -22,19 +23,19 @@ export declare abstract class AssetAttachmentService<TState extends OvermapRootS
|
|
|
22
23
|
description: string | undefined;
|
|
23
24
|
asset: string;
|
|
24
25
|
}>;
|
|
25
|
-
protected buildAttachmentPayload(data: BuildAttachmentPayloadData
|
|
26
|
+
protected buildAttachmentPayload(data: BuildAttachmentPayloadData): {
|
|
26
27
|
asset: string;
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
modelUuid: import('../..').UUIDModel["uuid"];
|
|
29
|
+
uuid: import('../..').UUIDModel["uuid"];
|
|
29
30
|
description: import('../..').Attachment["description"];
|
|
30
31
|
file_sha1: import('../..').FileWithNameModel["file_sha1"];
|
|
31
32
|
file_name: import('../..').FileWithNameModel["file_name"];
|
|
32
33
|
file_extension: string;
|
|
33
34
|
};
|
|
34
35
|
bulkAdd(payloads: {
|
|
35
|
-
|
|
36
|
+
assetUuid: Asset["uuid"];
|
|
36
37
|
file: File;
|
|
37
38
|
}[]): Promise<OptimisticMultipleModelResult<AssetAttachment>>;
|
|
38
|
-
delete(
|
|
39
|
-
refreshStore(
|
|
39
|
+
delete(uuid: AssetAttachment["uuid"]): Promise<void>;
|
|
40
|
+
refreshStore(projectUuid: Project["uuid"]): Promise<void>;
|
|
40
41
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { OvermapRootState } from '../../store';
|
|
2
|
+
import { AssetProcedure, AssetProcedureAttachment, Organization, Stored } from '../../typings';
|
|
3
|
+
import { BaseSDK } from '../base';
|
|
4
|
+
import { OptimisticMultipleModelResult } from '../typings';
|
|
5
|
+
import { BaseAttachmentService, BuildAttachmentPayloadData, BuildOfflineAttachmentData } from './BaseAttachmentService';
|
|
6
|
+
export declare abstract class AssetProcedureAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, AssetProcedureAttachment> {
|
|
7
|
+
name: string;
|
|
8
|
+
url: string;
|
|
9
|
+
addAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<AssetProcedureAttachment>[], "assetProcedureAttachments/addAssetProcedureAttachments">;
|
|
10
|
+
updateAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<AssetProcedureAttachment>[], "assetProcedureAttachments/updateAssetProcedureAttachments">;
|
|
11
|
+
removeAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<string[], "assetProcedureAttachments/deleteAssetProcedureAttachments">;
|
|
12
|
+
removeAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, "assetProcedureAttachments/deleteAssetProcedureAttachment">;
|
|
13
|
+
setAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<AssetProcedureAttachment>, "assetProcedureAttachments/setAssetProcedureAttachment">;
|
|
14
|
+
selectAttachment: import('../..').OvermapSelectorWithArgs<string, Stored<AssetProcedureAttachment> | undefined>;
|
|
15
|
+
protected buildOfflineAttachment(data: BuildOfflineAttachmentData): import('../..').UUID<{
|
|
16
|
+
file: string;
|
|
17
|
+
file_sha1: string;
|
|
18
|
+
created_by: number | undefined;
|
|
19
|
+
file_name: string;
|
|
20
|
+
file_type: string;
|
|
21
|
+
submitted_at: string;
|
|
22
|
+
description: string | undefined;
|
|
23
|
+
asset_procedure: string;
|
|
24
|
+
}>;
|
|
25
|
+
protected buildAttachmentPayload(data: BuildAttachmentPayloadData): {
|
|
26
|
+
asset_procedure: string;
|
|
27
|
+
modelUuid: import('../..').UUIDModel["uuid"];
|
|
28
|
+
uuid: import('../..').UUIDModel["uuid"];
|
|
29
|
+
description: import('../..').Attachment["description"];
|
|
30
|
+
file_sha1: import('../..').FileWithNameModel["file_sha1"];
|
|
31
|
+
file_name: import('../..').FileWithNameModel["file_name"];
|
|
32
|
+
file_extension: string;
|
|
33
|
+
};
|
|
34
|
+
bulkAdd(payloads: {
|
|
35
|
+
assetProcedureUuid: AssetProcedure["uuid"];
|
|
36
|
+
file: File;
|
|
37
|
+
}[]): Promise<OptimisticMultipleModelResult<AssetProcedureAttachment>>;
|
|
38
|
+
delete(uuid: AssetProcedureAttachment["uuid"]): Promise<void>;
|
|
39
|
+
refreshStore(organizationUuid: Organization["uuid"]): Promise<void>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { OvermapRootState } from '../../store';
|
|
2
|
+
import { AssetProcedureFieldValues, AssetProcedureFieldValuesAttachment, Created, Project, Stored } from '../../typings';
|
|
3
|
+
import { BaseSDK } from '../base';
|
|
4
|
+
import { BaseUploadService } from './BaseUploadService';
|
|
5
|
+
export declare abstract class AssetProcedureFieldValuesAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
|
|
6
|
+
bulkAdd(payloads: {
|
|
7
|
+
fieldValuesUuid: AssetProcedureFieldValues["uuid"];
|
|
8
|
+
fieldIdentifier: string;
|
|
9
|
+
file: File;
|
|
10
|
+
}[], batchSize?: number): Promise<[
|
|
11
|
+
Stored<AssetProcedureFieldValuesAttachment>[],
|
|
12
|
+
Promise<Created<AssetProcedureFieldValuesAttachment>[]>[]
|
|
13
|
+
]>;
|
|
14
|
+
bulkDelete(uuids: AssetProcedureFieldValuesAttachment["uuid"][]): Promise<void>;
|
|
15
|
+
refreshStore(projectUuid: Project["uuid"]): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SerializedFieldValues } from '@overmap-ai/forms';
|
|
2
|
+
import { OvermapRootState } from '../../store';
|
|
3
|
+
import { Asset, AssetProcedureFields, AssetProcedureFieldValues, AssetProcedureInstance, Created, Payload, Project, Stored, UUID } from '../../typings';
|
|
4
|
+
import { BaseSDK } from '../base';
|
|
5
|
+
import { OptimisticModelResult } from '../typings';
|
|
6
|
+
import { BaseApiService } from './BaseApiService';
|
|
7
|
+
export declare abstract class AssetProcedureFieldValuesService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
8
|
+
add(payload: Payload<AssetProcedureFieldValues>): OptimisticModelResult<AssetProcedureFieldValues>;
|
|
9
|
+
bulkAdd(payload: {
|
|
10
|
+
values: SerializedFieldValues;
|
|
11
|
+
payloads: {
|
|
12
|
+
values: SerializedFieldValues;
|
|
13
|
+
asset: Asset["uuid"];
|
|
14
|
+
fields_revision: AssetProcedureFields["uuid"];
|
|
15
|
+
asset_procedure_instance: AssetProcedureInstance["uuid"];
|
|
16
|
+
published_at: string;
|
|
17
|
+
}[];
|
|
18
|
+
}, batchSize?: number): [Stored<AssetProcedureFieldValues>[], Promise<Created<AssetProcedureFieldValues>[]>[]];
|
|
19
|
+
update(payload: UUID<Partial<Payload<AssetProcedureFieldValues>>>): OptimisticModelResult<AssetProcedureFieldValues>;
|
|
20
|
+
delete(uuid: AssetProcedureFieldValues["uuid"]): Promise<void>;
|
|
21
|
+
refreshStore(projectUuid: Project["uuid"]): Promise<void>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { OvermapRootState } from '../../store';
|
|
2
|
+
import { AssetProcedureFields, AssetProcedureFieldsAttachment, Organization } from '../../typings';
|
|
3
|
+
import { BaseSDK } from '../base';
|
|
4
|
+
import { OptimisticMultipleModelResult } from '../typings';
|
|
5
|
+
import { BaseUploadService } from './BaseUploadService';
|
|
6
|
+
export declare abstract class AssetProcedureFieldsAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
|
|
7
|
+
bulkAdd(payloads: {
|
|
8
|
+
fieldsRevisionUuid: AssetProcedureFields["uuid"];
|
|
9
|
+
fieldIdentifier: string;
|
|
10
|
+
file: File;
|
|
11
|
+
}[]): Promise<OptimisticMultipleModelResult<AssetProcedureFieldsAttachment>>;
|
|
12
|
+
refreshStore(organizationUuid: Organization["uuid"]): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OvermapRootState } from '../../store';
|
|
2
|
+
import { AssetProcedureFields, Organization, Payload } from '../../typings';
|
|
3
|
+
import { BaseSDK } from '../base';
|
|
4
|
+
import { OptimisticModelResult } from '../typings';
|
|
5
|
+
import { BaseApiService } from './BaseApiService';
|
|
6
|
+
export declare abstract class AssetProcedureFieldsService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
7
|
+
add(payload: Payload<AssetProcedureFields>): OptimisticModelResult<AssetProcedureFields>;
|
|
8
|
+
refreshStore(organizationUuid: Organization["uuid"]): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OvermapRootState } from '../../store';
|
|
2
|
+
import { AssetProcedureInstance, Payload, Project, UUID } from '../../typings';
|
|
3
|
+
import { BaseSDK } from '../base';
|
|
4
|
+
import { OptimisticModelResult } from '../typings';
|
|
5
|
+
import { BaseApiService } from './BaseApiService';
|
|
6
|
+
export declare abstract class AssetProcedureInstanceService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
7
|
+
add(payload: Payload<AssetProcedureInstance>): OptimisticModelResult<AssetProcedureInstance>;
|
|
8
|
+
update(payload: UUID<Partial<Payload<AssetProcedureInstance>>>): OptimisticModelResult<AssetProcedureInstance>;
|
|
9
|
+
remove(uuid: AssetProcedureInstance["uuid"]): Promise<undefined>;
|
|
10
|
+
refreshStore(projectUuid: Project["uuid"]): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OvermapRootState } from '../../store';
|
|
2
|
+
import { AssetProcedure, Organization, Payload, UUID } from '../../typings';
|
|
3
|
+
import { BaseSDK } from '../base';
|
|
4
|
+
import { OptimisticModelResult } from '../typings';
|
|
5
|
+
import { BaseApiService } from './BaseApiService';
|
|
6
|
+
export declare abstract class AssetProcedureService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
7
|
+
add(payload: Payload<AssetProcedure>): OptimisticModelResult<AssetProcedure>;
|
|
8
|
+
update(payload: UUID<Partial<Payload<AssetProcedure>>>): OptimisticModelResult<AssetProcedure>;
|
|
9
|
+
remove(uuid: AssetProcedure["uuid"]): Promise<undefined>;
|
|
10
|
+
refreshStore(organizationUuid: Organization["uuid"]): Promise<void>;
|
|
11
|
+
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OvermapRootState } from '../../store';
|
|
2
|
+
import { Asset, AssetType, Created, Payload, Project, UUID } from '../../typings';
|
|
2
3
|
import { BaseSDK } from '../base';
|
|
3
4
|
import { OptimisticModelResult } from '../typings';
|
|
4
5
|
import { BaseApiService } from './BaseApiService';
|
|
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
|
-
update(payload:
|
|
8
|
-
remove(
|
|
9
|
-
bulkAdd(payloads: Omit<Payload<Asset>, "asset_type" | "project">[],
|
|
10
|
-
refreshStore(
|
|
8
|
+
update(payload: UUID<Partial<Payload<Asset>>>): OptimisticModelResult<Asset>;
|
|
9
|
+
remove(uuid: Asset["uuid"]): Promise<undefined>;
|
|
10
|
+
bulkAdd(payloads: Omit<Payload<Asset>, "asset_type" | "project">[], assetTypeUuid: AssetType["uuid"], projectUuid: Project["uuid"], batchSize: number): Promise<Created<Asset>[]>[];
|
|
11
|
+
refreshStore(projectUuid: Project["uuid"]): Promise<void>;
|
|
11
12
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OvermapRootState } from '../../store';
|
|
2
|
+
import { AssetStageCompletion, Payload, Project } from '../../typings';
|
|
2
3
|
import { BaseSDK } from '../base';
|
|
3
4
|
import { OptimisticModelResult, OptimisticMultipleModelResult } from '../typings';
|
|
4
5
|
import { BaseApiService } from './BaseApiService';
|
|
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
|
-
delete(
|
|
8
|
+
delete(uuid: AssetStageCompletion["uuid"]): Promise<undefined>;
|
|
8
9
|
bulkAdd(payloads: Payload<AssetStageCompletion>[]): OptimisticMultipleModelResult<AssetStageCompletion>;
|
|
9
|
-
bulkDelete(
|
|
10
|
-
refreshStore(
|
|
10
|
+
bulkDelete(uuids: AssetStageCompletion["uuid"][]): Promise<undefined>;
|
|
11
|
+
refreshStore(projectUuid: Project["uuid"]): Promise<void>;
|
|
11
12
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OvermapRootState } from '../../store';
|
|
2
|
+
import { AssetProcedure, AssetStage, Organization, Payload, UUID } from '../../typings';
|
|
2
3
|
import { BaseSDK } from '../base';
|
|
3
4
|
import { OptimisticModelResult, OptimisticMultipleModelResult } from '../typings';
|
|
4
5
|
import { BaseApiService } from './BaseApiService';
|
|
5
6
|
export declare abstract class AssetStageService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
6
|
-
bulkAdd(stagesToSubmit: Omit<Payload<AssetStage>, "
|
|
7
|
-
bulkUpdate(stagesToUpdate: AssetStage[],
|
|
8
|
-
bulkDelete(
|
|
9
|
-
update(payload:
|
|
10
|
-
refreshStore(
|
|
7
|
+
bulkAdd(stagesToSubmit: Omit<Payload<AssetStage>, "asset_procedure">[], assetProcedureUuid: string): OptimisticMultipleModelResult<AssetStage>;
|
|
8
|
+
bulkUpdate(stagesToUpdate: AssetStage[], assetProcedureUuid: AssetProcedure["uuid"]): Promise<AssetStage[]>;
|
|
9
|
+
bulkDelete(uuids: AssetStage["uuid"][]): Promise<undefined>;
|
|
10
|
+
update(payload: UUID<Partial<Payload<AssetStage>>>): OptimisticModelResult<AssetStage>;
|
|
11
|
+
refreshStore(organizationUuid: Organization["uuid"]): Promise<undefined>;
|
|
11
12
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OvermapRootState } from '../../store';
|
|
2
|
+
import { AssetType, AssetTypeAttachment, Organization, Stored } from '../../typings';
|
|
2
3
|
import { BaseSDK } from '../base';
|
|
3
4
|
import { OptimisticMultipleModelResult } from '../typings';
|
|
4
5
|
import { BaseAttachmentService, BuildAttachmentPayloadData, BuildOfflineAttachmentData } from './BaseAttachmentService';
|
|
5
|
-
export declare abstract class AssetTypeAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK,
|
|
6
|
+
export declare abstract class AssetTypeAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, AssetTypeAttachment> {
|
|
6
7
|
name: string;
|
|
7
8
|
url: string;
|
|
8
9
|
addAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<AssetTypeAttachment>[], "assetTypeAttachments/addAssetTypeAttachments">;
|
|
@@ -11,7 +12,7 @@ export declare abstract class AssetTypeAttachmentService<TState extends OvermapR
|
|
|
11
12
|
removeAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, "assetTypeAttachments/deleteAssetTypeAttachment">;
|
|
12
13
|
setAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<AssetTypeAttachment>, "assetTypeAttachments/setAssetTypeAttachment">;
|
|
13
14
|
selectAttachment: import('../..').OvermapSelectorWithArgs<string, Stored<AssetTypeAttachment> | undefined>;
|
|
14
|
-
protected buildOfflineAttachment(data: BuildOfflineAttachmentData
|
|
15
|
+
protected buildOfflineAttachment(data: BuildOfflineAttachmentData): import('../..').UUID<{
|
|
15
16
|
file: string;
|
|
16
17
|
file_sha1: string;
|
|
17
18
|
created_by: number | undefined;
|
|
@@ -21,19 +22,19 @@ export declare abstract class AssetTypeAttachmentService<TState extends OvermapR
|
|
|
21
22
|
description: string | undefined;
|
|
22
23
|
asset_type: string;
|
|
23
24
|
}>;
|
|
24
|
-
protected buildAttachmentPayload(data: BuildAttachmentPayloadData
|
|
25
|
+
protected buildAttachmentPayload(data: BuildAttachmentPayloadData): {
|
|
25
26
|
asset_type: string;
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
modelUuid: import('../..').UUIDModel["uuid"];
|
|
28
|
+
uuid: import('../..').UUIDModel["uuid"];
|
|
28
29
|
description: import('../..').Attachment["description"];
|
|
29
30
|
file_sha1: import('../..').FileWithNameModel["file_sha1"];
|
|
30
31
|
file_name: import('../..').FileWithNameModel["file_name"];
|
|
31
32
|
file_extension: string;
|
|
32
33
|
};
|
|
33
34
|
bulkAdd(payloads: {
|
|
34
|
-
|
|
35
|
+
assetTypeUuid: AssetType["uuid"];
|
|
35
36
|
file: File;
|
|
36
37
|
}[]): Promise<OptimisticMultipleModelResult<AssetTypeAttachment>>;
|
|
37
|
-
delete(
|
|
38
|
-
refreshStore(
|
|
38
|
+
delete(uuid: AssetTypeAttachment["uuid"]): Promise<void>;
|
|
39
|
+
refreshStore(organizationUuid: Organization["uuid"]): Promise<void>;
|
|
39
40
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OvermapRootState } from '../../store';
|
|
2
|
+
import { AssetTypeFieldValues, AssetTypeFieldValuesAttachment, Created, Project, Stored } from '../../typings';
|
|
2
3
|
import { BaseSDK } from '../base';
|
|
3
4
|
import { BaseUploadService } from './BaseUploadService';
|
|
4
5
|
export declare abstract class AssetTypeFieldValuesAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
|
|
5
6
|
bulkAdd(payloads: {
|
|
6
|
-
|
|
7
|
+
fieldValuesUuid: AssetTypeFieldValues["uuid"];
|
|
7
8
|
fieldIdentifier: string;
|
|
8
9
|
file: File;
|
|
9
10
|
}[], batchSize?: number): Promise<[Stored<AssetTypeFieldValuesAttachment>[], Promise<Created<AssetTypeFieldValuesAttachment>[]>[]]>;
|
|
10
|
-
bulkDelete(
|
|
11
|
-
refreshStore(
|
|
11
|
+
bulkDelete(uuids: AssetTypeFieldValuesAttachment["uuid"][]): Promise<void>;
|
|
12
|
+
refreshStore(projectUuid: Project["uuid"]): Promise<void>;
|
|
12
13
|
}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { SerializedFieldValues } from '@overmap-ai/forms';
|
|
2
|
+
import { OvermapRootState } from '../../store';
|
|
3
|
+
import { Asset, AssetTypeFields, AssetTypeFieldValues, Created, Payload, Project, Stored, UUID } from '../../typings';
|
|
3
4
|
import { BaseSDK } from '../base';
|
|
4
5
|
import { OptimisticModelResult } from '../typings';
|
|
5
6
|
import { BaseApiService } from './BaseApiService';
|
|
6
7
|
export declare abstract class AssetTypeFieldValuesService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
7
8
|
add(payload: Payload<AssetTypeFieldValues>): OptimisticModelResult<AssetTypeFieldValues>;
|
|
8
9
|
bulkAdd(payload: {
|
|
9
|
-
values:
|
|
10
|
+
values: SerializedFieldValues;
|
|
10
11
|
payloads: {
|
|
11
|
-
values:
|
|
12
|
-
asset:
|
|
13
|
-
fields_revision:
|
|
12
|
+
values: SerializedFieldValues;
|
|
13
|
+
asset: Asset["uuid"];
|
|
14
|
+
fields_revision: AssetTypeFields["uuid"];
|
|
14
15
|
published_at: string;
|
|
15
16
|
}[];
|
|
16
17
|
}, batchSize?: number): [Stored<AssetTypeFieldValues>[], Promise<Created<AssetTypeFieldValues>[]>[]];
|
|
17
|
-
update(payload:
|
|
18
|
-
delete(
|
|
19
|
-
refreshStore(
|
|
18
|
+
update(payload: UUID<Partial<Payload<AssetTypeFieldValues>>>): OptimisticModelResult<AssetTypeFieldValues>;
|
|
19
|
+
delete(uuid: AssetTypeFieldValues["uuid"]): Promise<void>;
|
|
20
|
+
refreshStore(projectUuid: Project["uuid"]): Promise<void>;
|
|
20
21
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OvermapRootState } from '../../store';
|
|
2
|
+
import { AssetTypeFields, AssetTypeFieldsAttachment, Organization } from '../../typings';
|
|
2
3
|
import { BaseSDK } from '../base';
|
|
3
4
|
import { OptimisticMultipleModelResult } from '../typings';
|
|
4
5
|
import { BaseUploadService } from './BaseUploadService';
|
|
5
6
|
export declare abstract class AssetTypeFieldsAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
|
|
6
7
|
bulkAdd(payloads: {
|
|
7
|
-
|
|
8
|
+
fieldsRevisionUuid: AssetTypeFields["uuid"];
|
|
8
9
|
fieldIdentifier: string;
|
|
9
10
|
file: File;
|
|
10
11
|
}[]): Promise<OptimisticMultipleModelResult<AssetTypeFieldsAttachment>>;
|
|
11
|
-
refreshStore(organization:
|
|
12
|
+
refreshStore(organization: Organization["uuid"]): Promise<void>;
|
|
12
13
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OvermapRootState } from '../../store';
|
|
2
|
+
import { AssetTypeFields, Organization, Payload } from '../../typings';
|
|
2
3
|
import { BaseSDK } from '../base';
|
|
3
4
|
import { OptimisticModelResult } from '../typings';
|
|
4
5
|
import { BaseApiService } from './BaseApiService';
|
|
5
6
|
export declare abstract class AssetTypeFieldsService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
6
7
|
add(payload: Payload<AssetTypeFields>): OptimisticModelResult<AssetTypeFields>;
|
|
7
|
-
refreshStore(
|
|
8
|
+
refreshStore(organizationUuid: Organization["uuid"]): Promise<void>;
|
|
8
9
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OvermapRootState } from '../../store';
|
|
2
|
+
import { AssetType, Organization, Payload, UUID } from '../../typings';
|
|
2
3
|
import { BaseSDK } from '../base';
|
|
3
4
|
import { OptimisticModelResult } from '../typings';
|
|
4
5
|
import { BaseApiService } from './BaseApiService';
|
|
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
|
-
update(payload:
|
|
8
|
-
delete(
|
|
9
|
-
refreshStore(
|
|
8
|
+
update(payload: UUID<Partial<Payload<AssetType>>>): OptimisticModelResult<AssetType>;
|
|
9
|
+
delete(uuid: AssetType["uuid"]): Promise<undefined>;
|
|
10
|
+
refreshStore(organizationUuid: Organization["uuid"]): Promise<void>;
|
|
10
11
|
}
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { ActionCreatorWithPayload } from '@reduxjs/toolkit';
|
|
2
|
-
import {
|
|
2
|
+
import { OvermapRootState, OvermapSelectorWithArgs } from '../../store';
|
|
3
|
+
import { Attachment, FileModelPayload, Stored, Submitted, User, UUIDModel } from '../../typings';
|
|
3
4
|
import { BaseSDK } from '../base';
|
|
4
5
|
import { OptimisticMultipleModelResult } from '../typings';
|
|
5
6
|
import { BaseUploadService } from './BaseUploadService';
|
|
6
7
|
export interface AttachmentPayload extends FileModelPayload {
|
|
7
|
-
|
|
8
|
+
uuid: UUIDModel["uuid"];
|
|
8
9
|
description: Attachment["description"];
|
|
9
10
|
}
|
|
10
|
-
export interface BuildOfflineAttachmentData
|
|
11
|
+
export interface BuildOfflineAttachmentData {
|
|
11
12
|
file: File;
|
|
12
13
|
file_sha1: string;
|
|
13
14
|
submitted_at: string;
|
|
14
|
-
created_by?:
|
|
15
|
+
created_by?: User["id"];
|
|
15
16
|
description?: string;
|
|
16
|
-
|
|
17
|
+
modelUuid: UUIDModel["uuid"];
|
|
17
18
|
}
|
|
18
|
-
export interface BuildAttachmentPayloadData
|
|
19
|
-
|
|
19
|
+
export interface BuildAttachmentPayloadData extends AttachmentPayload {
|
|
20
|
+
modelUuid: UUIDModel["uuid"];
|
|
20
21
|
}
|
|
21
|
-
export declare abstract class BaseAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>,
|
|
22
|
+
export declare abstract class BaseAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>, TAttachment extends Attachment> extends BaseUploadService<TState, TSDK> {
|
|
22
23
|
abstract readonly name: string;
|
|
23
24
|
abstract readonly url: string;
|
|
24
25
|
abstract readonly addAttachments: ActionCreatorWithPayload<Stored<TAttachment>[]>;
|
|
@@ -27,11 +28,11 @@ export declare abstract class BaseAttachmentService<TState extends OvermapRootSt
|
|
|
27
28
|
abstract readonly setAttachment: ActionCreatorWithPayload<Stored<TAttachment>>;
|
|
28
29
|
abstract readonly removeAttachment: ActionCreatorWithPayload<string>;
|
|
29
30
|
abstract readonly selectAttachment: OvermapSelectorWithArgs<string, Stored<TAttachment> | undefined>;
|
|
30
|
-
protected abstract buildOfflineAttachment(data: BuildOfflineAttachmentData
|
|
31
|
-
protected abstract buildAttachmentPayload(data: BuildAttachmentPayloadData
|
|
31
|
+
protected abstract buildOfflineAttachment(data: BuildOfflineAttachmentData): Submitted<TAttachment>;
|
|
32
|
+
protected abstract buildAttachmentPayload(data: BuildAttachmentPayloadData): AttachmentPayload;
|
|
32
33
|
_bulkAdd(payloads: {
|
|
33
|
-
|
|
34
|
+
modelUuid: UUIDModel["uuid"];
|
|
34
35
|
file: File;
|
|
35
36
|
}[]): Promise<OptimisticMultipleModelResult<TAttachment>>;
|
|
36
|
-
_delete(
|
|
37
|
+
_delete(uuid: UUIDModel["uuid"]): Promise<void>;
|
|
37
38
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Response, SuperAgentRequest } from 'superagent';
|
|
2
|
-
import { BaseState } from '../../
|
|
2
|
+
import { BaseState } from '../../store';
|
|
3
3
|
import { BaseSDK } from '../base';
|
|
4
4
|
import { BaseService } from './BaseService';
|
|
5
5
|
export declare abstract class BaseAuthService<TStore extends BaseState, TSDK extends BaseSDK<TStore>> extends BaseService<TStore, TSDK> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ResultAction } from '@redux-offline/redux-offline/lib/types';
|
|
2
2
|
import { ActionCreatorWithPayload, UnknownAction } from '@reduxjs/toolkit';
|
|
3
|
-
import { BaseState } from '../../
|
|
3
|
+
import { BaseState } from '../../store';
|
|
4
4
|
import { BaseSDK } from '../base';
|
|
5
5
|
import { SDKRequest } from '../typings';
|
|
6
6
|
export declare const CLASS_NAME_TO_SERVICE: Record<string, BaseService<BaseState, BaseSDK<BaseState>>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OvermapRootState } from '../../store';
|
|
2
|
+
import { FilePayload } from '../../typings';
|
|
2
3
|
import { BaseSDK } from '../base';
|
|
3
4
|
import { PresignedUrlsResponse } from '../typings';
|
|
4
5
|
import { BaseApiService } from './BaseApiService';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OvermapRootState } from '../../store';
|
|
2
|
+
import { Category, Payload, Project, UUID } from '../../typings';
|
|
2
3
|
import { BaseSDK } from '../base';
|
|
3
4
|
import { OptimisticModelResult } from '../typings';
|
|
4
5
|
import { BaseApiService } from './BaseApiService';
|
|
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
|
-
update(payload:
|
|
8
|
-
remove(
|
|
9
|
-
refreshStore(
|
|
8
|
+
update(payload: UUID<Partial<Payload<Category>>>): OptimisticModelResult<Category>;
|
|
9
|
+
remove(uuid: Category["uuid"]): Promise<undefined>;
|
|
10
|
+
refreshStore(projectUuid: Project["uuid"]): Promise<undefined>;
|
|
10
11
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OvermapRootState } from '../../store';
|
|
2
|
+
import { Document, DocumentAttachment, Organization, Project, Stored } from '../../typings';
|
|
2
3
|
import { BaseSDK } from '../base';
|
|
3
4
|
import { OptimisticMultipleModelResult } from '../typings';
|
|
4
5
|
import { BaseAttachmentService, BuildAttachmentPayloadData, BuildOfflineAttachmentData } from './BaseAttachmentService';
|
|
5
|
-
export declare abstract class DocumentAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK,
|
|
6
|
+
export declare abstract class DocumentAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, DocumentAttachment> {
|
|
6
7
|
name: string;
|
|
7
8
|
url: string;
|
|
8
9
|
addAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<DocumentAttachment>[], "documentAttachments/addDocumentAttachments">;
|
|
@@ -11,7 +12,7 @@ export declare abstract class DocumentAttachmentService<TState extends OvermapRo
|
|
|
11
12
|
removeAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, "documentAttachments/deleteDocumentAttachment">;
|
|
12
13
|
setAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<DocumentAttachment>, "documentAttachments/setDocumentAttachment">;
|
|
13
14
|
selectAttachment: import('../..').OvermapSelectorWithArgs<string, Stored<DocumentAttachment> | undefined>;
|
|
14
|
-
protected buildOfflineAttachment(data: BuildOfflineAttachmentData
|
|
15
|
+
protected buildOfflineAttachment(data: BuildOfflineAttachmentData): import('../..').UUID<{
|
|
15
16
|
file: string;
|
|
16
17
|
file_sha1: string;
|
|
17
18
|
created_by: number | undefined;
|
|
@@ -21,20 +22,20 @@ export declare abstract class DocumentAttachmentService<TState extends OvermapRo
|
|
|
21
22
|
description: string | undefined;
|
|
22
23
|
document: string;
|
|
23
24
|
}>;
|
|
24
|
-
protected buildAttachmentPayload(data: BuildAttachmentPayloadData
|
|
25
|
+
protected buildAttachmentPayload(data: BuildAttachmentPayloadData): {
|
|
25
26
|
document: string;
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
modelUuid: import('../..').UUIDModel["uuid"];
|
|
28
|
+
uuid: import('../..').UUIDModel["uuid"];
|
|
28
29
|
description: import('../..').Attachment["description"];
|
|
29
30
|
file_sha1: import('../..').FileWithNameModel["file_sha1"];
|
|
30
31
|
file_name: import('../..').FileWithNameModel["file_name"];
|
|
31
32
|
file_extension: string;
|
|
32
33
|
};
|
|
33
34
|
bulkAdd(payloads: {
|
|
34
|
-
|
|
35
|
+
documentUuid: Document["uuid"];
|
|
35
36
|
file: File;
|
|
36
37
|
}[]): Promise<OptimisticMultipleModelResult<DocumentAttachment>>;
|
|
37
|
-
delete(
|
|
38
|
+
delete(uuid: DocumentAttachment["uuid"]): Promise<void>;
|
|
38
39
|
private makeReadable;
|
|
39
|
-
refreshStore(
|
|
40
|
+
refreshStore(projectUuid: Project["uuid"], organizationUuid: Organization["uuid"]): Promise<void>;
|
|
40
41
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OvermapRootState } from '../../store';
|
|
2
|
+
import { Document, MovePosition, Organization, Payload, Project, UUID } from '../../typings';
|
|
2
3
|
import { BaseSDK } from '../base';
|
|
3
4
|
import { OptimisticModelResult } from '../typings';
|
|
4
5
|
import { BaseApiService } from './BaseApiService';
|
|
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
|
-
update(payload:
|
|
8
|
-
move(
|
|
9
|
-
delete(
|
|
10
|
-
refreshStore(
|
|
8
|
+
update(payload: UUID<Partial<Payload<Document>>>): OptimisticModelResult<Document>;
|
|
9
|
+
move(documentUuid: Document["uuid"], targetDocumentUuid: Document["uuid"] | null, position: MovePosition): Promise<Document[]>;
|
|
10
|
+
delete(uuid: Document["uuid"]): Promise<Document[]>;
|
|
11
|
+
refreshStore(projectUuid: Project["uuid"], organizationUuid: Organization["uuid"]): Promise<void>;
|
|
11
12
|
}
|