@overmap-ai/core 1.0.71-mapbox.6 → 1.0.71-mapbox.8
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 +1913 -1079
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +1913 -1079
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/services/AssetAttachmentService.d.ts +29 -7
- package/dist/sdk/services/AssetService.d.ts +1 -1
- package/dist/sdk/services/AssetStageService.d.ts +1 -3
- package/dist/sdk/services/AssetTypeAttachmentService.d.ts +29 -8
- package/dist/sdk/services/AssetTypeFieldValuesAttachmentService.d.ts +13 -0
- package/dist/sdk/services/AssetTypeFieldValuesService.d.ts +21 -0
- package/dist/sdk/services/AssetTypeFieldsAttachmentService.d.ts +13 -0
- package/dist/sdk/services/AssetTypeFieldsService.d.ts +9 -0
- package/dist/sdk/services/AssetTypeService.d.ts +1 -1
- package/dist/sdk/services/BaseAttachmentService.d.ts +17 -19
- package/dist/sdk/services/BaseUploadService.d.ts +2 -1
- package/dist/sdk/services/DocumentAttachmentService.d.ts +27 -7
- package/dist/sdk/services/FormRevisionAttachmentService.d.ts +13 -0
- package/dist/sdk/services/FormRevisionService.d.ts +9 -0
- package/dist/sdk/services/FormService.d.ts +11 -14
- package/dist/sdk/services/FormSubmissionAttachmentService.d.ts +14 -0
- package/dist/sdk/services/FormSubmissionService.d.ts +8 -28
- package/dist/sdk/services/IssueAssociationService.d.ts +2 -2
- package/dist/sdk/services/IssueAttachmentService.d.ts +28 -7
- package/dist/sdk/services/IssueService.d.ts +0 -3
- package/dist/sdk/services/IssueTypeFieldValuesAttachmentService.d.ts +14 -0
- package/dist/sdk/services/IssueTypeFieldValuesService.d.ts +11 -0
- package/dist/sdk/services/IssueTypeFieldsAttachmentService.d.ts +13 -0
- package/dist/sdk/services/IssueTypeFieldsService.d.ts +9 -0
- package/dist/sdk/services/ProjectAttachmentService.d.ts +28 -7
- package/dist/sdk/services/index.d.ts +11 -0
- package/dist/store/slices/assetStageSlice.d.ts +0 -1
- package/dist/store/slices/assetTypeFieldValuesAttachmentSlice.d.ts +64 -0
- package/dist/store/slices/assetTypeFieldValuesSlice.d.ts +64 -0
- package/dist/store/slices/assetTypeFieldsAttachmentSlice.d.ts +63 -0
- package/dist/store/slices/assetTypeFieldsSlice.d.ts +64 -0
- package/dist/store/slices/formRevisionSlice.d.ts +1 -2
- package/dist/store/slices/formSlice.d.ts +1 -5
- package/dist/store/slices/formSubmissionSlice.d.ts +0 -6
- package/dist/store/slices/index.d.ts +8 -0
- package/dist/store/slices/issueTypeFieldValuesAttachmentSlice.d.ts +64 -0
- package/dist/store/slices/issueTypeFieldValuesSlice.d.ts +63 -0
- package/dist/store/slices/issueTypeFieldsAttachmentSlice.d.ts +63 -0
- package/dist/store/slices/issueTypeFieldsSlice.d.ts +65 -0
- package/dist/store/store.d.ts +9 -1
- package/dist/typings/files.d.ts +8 -4
- package/dist/typings/models/assets.d.ts +17 -2
- package/dist/typings/models/attachments.d.ts +1 -6
- package/dist/typings/models/fields.d.ts +17 -0
- package/dist/typings/models/forms.d.ts +12 -29
- package/dist/typings/models/index.d.ts +1 -0
- package/dist/typings/models/issues.d.ts +15 -0
- package/dist/typings/models/store.d.ts +9 -1
- package/dist/utils/file.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { BaseAttachmentService } from './BaseAttachmentService';
|
|
2
|
-
import { AssetAttachment,
|
|
1
|
+
import { BaseAttachmentService, BuildAttachmentPayloadData, BuildOfflineAttachmentData } from './BaseAttachmentService';
|
|
2
|
+
import { AssetAttachment, OvermapRootState, Stored } from '../../typings';
|
|
3
3
|
import { OptimisticMultipleModelResult } from '../typings';
|
|
4
4
|
import { BaseSDK } from '../base';
|
|
5
|
-
import { AttachmentModel } from '../../enums';
|
|
6
5
|
|
|
7
6
|
export declare abstract class AssetAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, AssetAttachment> {
|
|
8
|
-
|
|
7
|
+
name: string;
|
|
8
|
+
url: string;
|
|
9
9
|
initializeAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<AssetAttachment>[], "assetAttachments/initializeAssetAttachments">;
|
|
10
10
|
addAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<AssetAttachment>[], "assetAttachments/addAssetAttachments">;
|
|
11
11
|
updateAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<AssetAttachment>[], "assetAttachments/updateAssetAttachments">;
|
|
@@ -13,7 +13,29 @@ export declare abstract class AssetAttachmentService<TState extends OvermapRootS
|
|
|
13
13
|
removeAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, "assetAttachments/deleteAssetAttachment">;
|
|
14
14
|
setAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<AssetAttachment>, "assetAttachments/setAssetAttachment">;
|
|
15
15
|
selectAttachment: import('../..').OvermapSelectorWithArgs<string, Stored<AssetAttachment> | undefined>;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
protected buildOfflineAttachment(data: BuildOfflineAttachmentData<string>): import('../..').Offline<{
|
|
17
|
+
file: string;
|
|
18
|
+
file_sha1: string;
|
|
19
|
+
created_by: number | undefined;
|
|
20
|
+
file_name: string;
|
|
21
|
+
file_type: string;
|
|
22
|
+
submitted_at: string;
|
|
23
|
+
description: string | undefined;
|
|
24
|
+
asset: string;
|
|
25
|
+
}>;
|
|
26
|
+
protected buildAttachmentPayload(data: BuildAttachmentPayloadData<string>): {
|
|
27
|
+
asset: string;
|
|
28
|
+
modelId: string;
|
|
29
|
+
offline_id: import('../..').OfflineModel["offline_id"];
|
|
30
|
+
description: import('../..').Attachment["description"];
|
|
31
|
+
file_sha1: import('../..').FileWithNameModel["file_sha1"];
|
|
32
|
+
file_name: import('../..').FileWithNameModel["file_name"];
|
|
33
|
+
file_extension: string;
|
|
34
|
+
};
|
|
35
|
+
bulkAdd(payloads: {
|
|
36
|
+
assetId: string;
|
|
37
|
+
file: File;
|
|
38
|
+
}[]): Promise<OptimisticMultipleModelResult<AssetAttachment>>;
|
|
39
|
+
delete(id: string): Promise<void>;
|
|
40
|
+
refreshStore(projectId: number): Promise<void>;
|
|
19
41
|
}
|
|
@@ -7,6 +7,6 @@ export declare abstract class AssetService<TState extends OvermapRootState, TSDK
|
|
|
7
7
|
add(payload: Payload<Asset>): OptimisticModelResult<Asset>;
|
|
8
8
|
update(payload: Offline<Partial<Payload<Asset>>>): OptimisticModelResult<Asset>;
|
|
9
9
|
remove(id: string): Promise<undefined>;
|
|
10
|
-
bulkAdd(payloads: Omit<Payload<Asset>, "asset_type">[], assetTypeId: string, batchSize: number): Promise<Created<Asset>[]>[];
|
|
10
|
+
bulkAdd(payloads: Omit<Payload<Asset>, "asset_type" | "project">[], assetTypeId: string, projectId: number, batchSize: number): Promise<Created<Asset>[]>[];
|
|
11
11
|
refreshStore(projectId: number): Promise<void>;
|
|
12
12
|
}
|
|
@@ -8,7 +8,5 @@ export declare abstract class AssetStageService<TState extends OvermapRootState,
|
|
|
8
8
|
bulkUpdate(stagesToUpdate: AssetStage[], assetTypeId: string): Promise<AssetStage[]>;
|
|
9
9
|
bulkDelete(idsToDelete: string[]): Promise<undefined>;
|
|
10
10
|
update(payload: Offline<Partial<Payload<AssetStage>>>): OptimisticModelResult<AssetStage>;
|
|
11
|
-
|
|
12
|
-
unlinkForm(stageId: string, formId: string): Promise<undefined>;
|
|
13
|
-
refreshStore(projectId: number): Promise<undefined>;
|
|
11
|
+
refreshStore(organizationId: number): Promise<undefined>;
|
|
14
12
|
}
|
|
@@ -1,19 +1,40 @@
|
|
|
1
|
-
import { BaseAttachmentService } from './BaseAttachmentService';
|
|
2
|
-
import { AssetTypeAttachment,
|
|
1
|
+
import { BaseAttachmentService, BuildAttachmentPayloadData, BuildOfflineAttachmentData } from './BaseAttachmentService';
|
|
2
|
+
import { AssetTypeAttachment, OvermapRootState, Stored } from '../../typings';
|
|
3
3
|
import { OptimisticMultipleModelResult } from '../typings';
|
|
4
4
|
import { BaseSDK } from '../base';
|
|
5
|
-
import { AttachmentModel } from '../../enums';
|
|
6
5
|
|
|
7
6
|
export declare abstract class AssetTypeAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, AssetTypeAttachment> {
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
name: string;
|
|
8
|
+
url: string;
|
|
10
9
|
addAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<AssetTypeAttachment>[], "assetTypeAttachments/addAssetTypeAttachments">;
|
|
11
10
|
updateAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<AssetTypeAttachment>[], "assetTypeAttachments/updateAssetTypeAttachments">;
|
|
12
11
|
removeAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<string[], "assetTypeAttachments/deleteAssetTypeAttachments">;
|
|
13
12
|
removeAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, "assetTypeAttachments/deleteAssetTypeAttachment">;
|
|
14
13
|
setAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<AssetTypeAttachment>, "assetTypeAttachments/setAssetTypeAttachment">;
|
|
15
14
|
selectAttachment: import('../..').OvermapSelectorWithArgs<string, Stored<AssetTypeAttachment> | undefined>;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
protected buildOfflineAttachment(data: BuildOfflineAttachmentData<string>): import('../..').Offline<{
|
|
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_type: string;
|
|
24
|
+
}>;
|
|
25
|
+
protected buildAttachmentPayload(data: BuildAttachmentPayloadData<string>): {
|
|
26
|
+
asset_type: string;
|
|
27
|
+
modelId: string;
|
|
28
|
+
offline_id: import('../..').OfflineModel["offline_id"];
|
|
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
|
+
assetTypeId: string;
|
|
36
|
+
file: File;
|
|
37
|
+
}[]): Promise<OptimisticMultipleModelResult<AssetTypeAttachment>>;
|
|
38
|
+
delete(attachmentId: string): Promise<void>;
|
|
39
|
+
refreshStore(organizationId: number): Promise<void>;
|
|
19
40
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AssetTypeFieldValuesAttachment, Created, OvermapRootState, Stored } from '../../typings';
|
|
2
|
+
import { BaseSDK } from '../base';
|
|
3
|
+
import { BaseUploadService } from './BaseUploadService';
|
|
4
|
+
|
|
5
|
+
export declare abstract class AssetTypeFieldValuesAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
|
|
6
|
+
bulkAdd(payloads: {
|
|
7
|
+
fieldValuesId: string;
|
|
8
|
+
fieldIdentifier: string;
|
|
9
|
+
file: File;
|
|
10
|
+
}[], batchSize?: number): Promise<[Stored<AssetTypeFieldValuesAttachment>[], Promise<Created<AssetTypeFieldValuesAttachment>[]>[]]>;
|
|
11
|
+
bulkDelete(ids: string[]): Promise<void>;
|
|
12
|
+
refreshStore(projectId: number): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AssetTypeFieldValues, Created, Offline, OvermapRootState, Payload, Stored } from '../../typings';
|
|
2
|
+
import { BaseSDK } from '../base';
|
|
3
|
+
import { BaseApiService } from './BaseApiService';
|
|
4
|
+
import { OptimisticModelResult } from '../typings';
|
|
5
|
+
import { FieldValue } from '@overmap-ai/forms';
|
|
6
|
+
|
|
7
|
+
export declare abstract class AssetTypeFieldValuesService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
8
|
+
add(payload: Payload<AssetTypeFieldValues>): OptimisticModelResult<AssetTypeFieldValues>;
|
|
9
|
+
bulkAdd(payload: {
|
|
10
|
+
values: Record<string, FieldValue>;
|
|
11
|
+
payloads: {
|
|
12
|
+
values: Record<string, FieldValue>;
|
|
13
|
+
asset: string;
|
|
14
|
+
fields_revision: string;
|
|
15
|
+
published_at: string;
|
|
16
|
+
}[];
|
|
17
|
+
}, batchSize?: number): [Stored<AssetTypeFieldValues>[], Promise<Created<AssetTypeFieldValues>[]>[]];
|
|
18
|
+
update(payload: Offline<Partial<Payload<AssetTypeFieldValues>>>): OptimisticModelResult<AssetTypeFieldValues>;
|
|
19
|
+
delete(id: string): Promise<void>;
|
|
20
|
+
refreshStore(projectId: number): Promise<void>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AssetTypeFieldsAttachment, OvermapRootState } from '../../typings';
|
|
2
|
+
import { BaseSDK } from '../base';
|
|
3
|
+
import { BaseUploadService } from './BaseUploadService';
|
|
4
|
+
import { OptimisticMultipleModelResult } from '../typings';
|
|
5
|
+
|
|
6
|
+
export declare abstract class AssetTypeFieldsAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
|
|
7
|
+
bulkAdd(payloads: {
|
|
8
|
+
fieldsRevisionId: string;
|
|
9
|
+
fieldIdentifier: string;
|
|
10
|
+
file: File;
|
|
11
|
+
}[]): Promise<OptimisticMultipleModelResult<AssetTypeFieldsAttachment>>;
|
|
12
|
+
refreshStore(organization: number): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AssetTypeFields, OvermapRootState, Payload } from '../../typings';
|
|
2
|
+
import { BaseSDK } from '../base';
|
|
3
|
+
import { BaseApiService } from './BaseApiService';
|
|
4
|
+
import { OptimisticModelResult } from '../typings';
|
|
5
|
+
|
|
6
|
+
export declare abstract class AssetTypeFieldsService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
7
|
+
add(payload: Payload<AssetTypeFields>): OptimisticModelResult<AssetTypeFields>;
|
|
8
|
+
refreshStore(organizationId: number): Promise<void>;
|
|
9
|
+
}
|
|
@@ -7,5 +7,5 @@ export declare abstract class AssetTypeService<TState extends OvermapRootState,
|
|
|
7
7
|
add(payload: Payload<AssetType>): OptimisticModelResult<AssetType>;
|
|
8
8
|
update(payload: Offline<Partial<Payload<AssetType>>>): OptimisticModelResult<AssetType>;
|
|
9
9
|
delete(assetTypeId: string): Promise<undefined>;
|
|
10
|
-
refreshStore(
|
|
10
|
+
refreshStore(organizationId: number): Promise<void>;
|
|
11
11
|
}
|
|
@@ -1,40 +1,38 @@
|
|
|
1
1
|
import { ActionCreatorWithPayload } from '@reduxjs/toolkit';
|
|
2
2
|
import { OptimisticMultipleModelResult } from '../typings';
|
|
3
|
-
import {
|
|
4
|
-
import { Attachment, OfflineModel, OvermapRootState, OvermapSelectorWithArgs, Stored, Submitted } from '../../typings';
|
|
3
|
+
import { Attachment, FileModelPayload, OfflineModel, OvermapRootState, OvermapSelectorWithArgs, Stored, Submitted } from '../../typings';
|
|
5
4
|
import { BaseSDK } from '../base';
|
|
6
5
|
import { BaseUploadService } from './BaseUploadService';
|
|
7
6
|
|
|
8
|
-
export interface AttachmentPayload {
|
|
7
|
+
export interface AttachmentPayload extends FileModelPayload {
|
|
9
8
|
offline_id: OfflineModel["offline_id"];
|
|
10
|
-
name: Attachment["file_name"];
|
|
11
|
-
sha1: Attachment["file_sha1"];
|
|
12
9
|
description: Attachment["description"];
|
|
13
10
|
}
|
|
14
|
-
export interface FilePayload {
|
|
15
|
-
sha1: Attachment["file_sha1"];
|
|
16
|
-
file_type: string;
|
|
17
|
-
extension: string;
|
|
18
|
-
size: number;
|
|
19
|
-
}
|
|
20
11
|
export interface BuildOfflineAttachmentData<TModelId> {
|
|
21
12
|
file: File;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
file_sha1: string;
|
|
14
|
+
submitted_at: string;
|
|
15
|
+
created_by?: number;
|
|
25
16
|
description?: string;
|
|
26
17
|
modelId: TModelId;
|
|
27
18
|
}
|
|
19
|
+
export interface BuildAttachmentPayloadData<TModelId> extends AttachmentPayload {
|
|
20
|
+
modelId: TModelId;
|
|
21
|
+
}
|
|
28
22
|
export declare abstract class BaseAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>, TModelId extends string | number, TAttachment extends Attachment> extends BaseUploadService<TState, TSDK> {
|
|
29
|
-
abstract readonly
|
|
30
|
-
abstract readonly
|
|
23
|
+
abstract readonly name: string;
|
|
24
|
+
abstract readonly url: string;
|
|
31
25
|
abstract readonly addAttachments: ActionCreatorWithPayload<Submitted<TAttachment>[]>;
|
|
32
26
|
abstract readonly updateAttachments: ActionCreatorWithPayload<Submitted<TAttachment>[]>;
|
|
33
27
|
abstract readonly removeAttachments: ActionCreatorWithPayload<string[]>;
|
|
34
28
|
abstract readonly setAttachment: ActionCreatorWithPayload<Stored<TAttachment>>;
|
|
35
29
|
abstract readonly removeAttachment: ActionCreatorWithPayload<string>;
|
|
36
30
|
abstract readonly selectAttachment: OvermapSelectorWithArgs<string, Stored<TAttachment> | undefined>;
|
|
37
|
-
protected
|
|
38
|
-
protected
|
|
39
|
-
|
|
31
|
+
protected abstract buildOfflineAttachment(data: BuildOfflineAttachmentData<TModelId>): Stored<TAttachment>;
|
|
32
|
+
protected abstract buildAttachmentPayload(data: BuildAttachmentPayloadData<TModelId>): AttachmentPayload;
|
|
33
|
+
_bulkAdd(payloads: {
|
|
34
|
+
modelId: TModelId;
|
|
35
|
+
file: File;
|
|
36
|
+
}[]): Promise<OptimisticMultipleModelResult<TAttachment>>;
|
|
37
|
+
_delete(attachmendId: string): Promise<void>;
|
|
40
38
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { BaseApiService } from './BaseApiService';
|
|
2
2
|
import { PresignedUrlsResponse } from '../typings';
|
|
3
|
-
import { OvermapRootState } from '../../typings';
|
|
3
|
+
import { FilePayload, OvermapRootState } from '../../typings';
|
|
4
4
|
import { BaseSDK } from '../base';
|
|
5
5
|
|
|
6
6
|
export declare abstract class BaseUploadService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
7
7
|
protected getNumberOfAttachmentsWithSha1(sha1: string): number;
|
|
8
8
|
protected processPresignedUrls(presignedUrls: PresignedUrlsResponse): Record<string, Promise<undefined>>;
|
|
9
|
+
protected getFilePayload(file: File): Promise<FilePayload>;
|
|
9
10
|
}
|
|
@@ -1,21 +1,41 @@
|
|
|
1
|
-
import { BaseAttachmentService } from './BaseAttachmentService';
|
|
1
|
+
import { BaseAttachmentService, BuildAttachmentPayloadData, BuildOfflineAttachmentData } from './BaseAttachmentService';
|
|
2
2
|
import { DocumentAttachment, OvermapRootState, Stored } from '../../typings';
|
|
3
3
|
import { OptimisticMultipleModelResult } from '../typings';
|
|
4
4
|
import { BaseSDK } from '../base';
|
|
5
|
-
import { AttachmentModel } from '../../enums';
|
|
6
5
|
|
|
7
6
|
export declare abstract class DocumentAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, DocumentAttachment> {
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
name: string;
|
|
8
|
+
url: string;
|
|
10
9
|
addAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<DocumentAttachment>[], "documentAttachments/addDocumentAttachments">;
|
|
11
10
|
updateAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<DocumentAttachment>[], "documentAttachments/updateDocumentAttachments">;
|
|
12
11
|
removeAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<string[], "documentAttachments/deleteDocumentAttachments">;
|
|
13
12
|
removeAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, "documentAttachments/deleteDocumentAttachment">;
|
|
14
13
|
setAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<DocumentAttachment>, "documentAttachments/setDocumentAttachment">;
|
|
15
14
|
selectAttachment: import('../..').OvermapSelectorWithArgs<string, Stored<DocumentAttachment> | undefined>;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
protected buildOfflineAttachment(data: BuildOfflineAttachmentData<string>): import('../..').Offline<{
|
|
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
|
+
document: string;
|
|
24
|
+
}>;
|
|
25
|
+
protected buildAttachmentPayload(data: BuildAttachmentPayloadData<string>): {
|
|
26
|
+
document: string;
|
|
27
|
+
modelId: string;
|
|
28
|
+
offline_id: import('../..').OfflineModel["offline_id"];
|
|
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
|
+
documentId: string;
|
|
36
|
+
file: File;
|
|
37
|
+
}[]): Promise<OptimisticMultipleModelResult<DocumentAttachment>>;
|
|
38
|
+
delete(id: string): Promise<void>;
|
|
19
39
|
private makeReadable;
|
|
20
40
|
refreshStore(projectId: number, organizationId: number): Promise<void>;
|
|
21
41
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FormRevisionAttachment, OvermapRootState } from '../../typings';
|
|
2
|
+
import { BaseSDK } from '../base';
|
|
3
|
+
import { BaseUploadService } from './BaseUploadService';
|
|
4
|
+
import { OptimisticMultipleModelResult } from '../typings';
|
|
5
|
+
|
|
6
|
+
export declare abstract class FormRevisionAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
|
|
7
|
+
bulkAdd(payloads: {
|
|
8
|
+
revisionId: string;
|
|
9
|
+
fieldIdentifier: string;
|
|
10
|
+
file: File;
|
|
11
|
+
}[]): Promise<OptimisticMultipleModelResult<FormRevisionAttachment>>;
|
|
12
|
+
refreshStore(organizationId: number): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FormRevision, FormRevisionPayload, OvermapRootState } from '../../typings';
|
|
2
|
+
import { BaseSDK } from '../base';
|
|
3
|
+
import { BaseUploadService } from './BaseUploadService';
|
|
4
|
+
import { OptimisticModelResult } from '../typings';
|
|
5
|
+
|
|
6
|
+
export declare abstract class FormRevisionService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
|
|
7
|
+
add(payload: FormRevisionPayload): OptimisticModelResult<FormRevision>;
|
|
8
|
+
refreshStore(organizationId: number): Promise<void>;
|
|
9
|
+
}
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import { Form, FormRevision,
|
|
1
|
+
import { Created, Form, FormRevision, OvermapRootState, Payload, Stored } from '../../typings';
|
|
2
2
|
import { BaseSDK } from '../base';
|
|
3
3
|
import { BaseUploadService } from './BaseUploadService';
|
|
4
4
|
import { ISerializedField } from '@overmap-ai/forms';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Finds and separates image files from form revision fields. The image attribute is deleted from the field objects and
|
|
8
|
+
* is returned separately from the image files as they are stored in a different table.
|
|
9
|
+
*/
|
|
10
|
+
export declare const separateImageFromFields: (fields: ISerializedField[]) => Promise<{
|
|
11
|
+
fields: ISerializedField[];
|
|
12
|
+
images: Record<string, File>;
|
|
13
|
+
}>;
|
|
6
14
|
export declare abstract class FormService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
|
|
7
|
-
|
|
8
|
-
private add;
|
|
9
|
-
addForOrganization(organizationId: number, initialRevision: FormRevisionPayload): Promise<[Stored<Form>, Stored<FormRevision<ISerializedField>>, Stored<FormRevisionAttachment>[], Promise<Created<FormRevision<ISerializedField>>>, Promise<Created<FormRevisionAttachment>[]>]>;
|
|
10
|
-
addForProject(projectId: number, initialRevision: FormRevisionPayload): Promise<[Stored<Form>, Stored<FormRevision<ISerializedField>>, Stored<FormRevisionAttachment>[], Promise<Created<FormRevision<ISerializedField>>>, Promise<Created<FormRevisionAttachment>[]>]>;
|
|
11
|
-
addForIssueType(issueTypeId: string, initialRevision: FormRevisionPayload): Promise<[Stored<Form>, Stored<FormRevision<ISerializedField>>, Stored<FormRevisionAttachment>[], Promise<Created<FormRevision<ISerializedField>>>, Promise<Created<FormRevisionAttachment>[]>]>;
|
|
12
|
-
addForAssetType(assetTypeId: string, initialRevision: FormRevisionPayload): Promise<[Stored<Form>, Stored<FormRevision<ISerializedField>>, Stored<FormRevisionAttachment>[], Promise<Created<FormRevision<ISerializedField>>>, Promise<Created<FormRevisionAttachment>[]>]>;
|
|
13
|
-
createRevision(formId: string, revision: FormRevisionPayload): Promise<[
|
|
14
|
-
Stored<FormRevision>,
|
|
15
|
-
Stored<FormRevisionAttachment>[],
|
|
16
|
-
Promise<Created<FormRevision>>,
|
|
17
|
-
Promise<Created<FormRevisionAttachment>[]>
|
|
18
|
-
]>;
|
|
15
|
+
add(payload: Payload<Form>, initialRevision: Pick<FormRevision, "title" | "description" | "fields">): [Stored<Form>, Stored<FormRevision>, Promise<Created<FormRevision>>];
|
|
19
16
|
delete(id: string): Promise<undefined>;
|
|
20
|
-
refreshStore(
|
|
17
|
+
refreshStore(organizationId: number): Promise<void>;
|
|
21
18
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FormSubmissionAttachment, OvermapRootState } from '../../typings';
|
|
2
|
+
import { BaseSDK } from '../base';
|
|
3
|
+
import { BaseUploadService } from './BaseUploadService';
|
|
4
|
+
import { OptimisticMultipleModelResult } from '../typings';
|
|
5
|
+
|
|
6
|
+
export declare abstract class FormSubmissionAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
|
|
7
|
+
bulkAdd(payloads: {
|
|
8
|
+
submissionId: string;
|
|
9
|
+
fieldIdentifier: string;
|
|
10
|
+
file: File;
|
|
11
|
+
}[]): Promise<OptimisticMultipleModelResult<FormSubmissionAttachment>>;
|
|
12
|
+
bulkDelete(attachmentsIds: string[]): Promise<void>;
|
|
13
|
+
refreshStore(projectId: number): Promise<void>;
|
|
14
|
+
}
|
|
@@ -1,36 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { FormSubmission, Offline, OvermapRootState, Payload } from '../../typings';
|
|
2
|
+
import { OptimisticModelResult } from '../typings';
|
|
3
3
|
import { BaseSDK } from '../base';
|
|
4
4
|
import { BaseUploadService } from './BaseUploadService';
|
|
5
5
|
import { FieldValue } from '@overmap-ai/forms';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
7
|
+
export declare const separateFilesFromValues: (values: Record<string, FieldValue>) => {
|
|
8
|
+
values: Record<string, FieldValue>;
|
|
9
|
+
files: Record<string, File[]>;
|
|
10
|
+
};
|
|
12
11
|
export declare abstract class FormSubmissionService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
add(payload: Payload<FormSubmission>): Promise<[
|
|
16
|
-
Stored<FormSubmission>,
|
|
17
|
-
Stored<FormSubmissionAttachment>[],
|
|
18
|
-
Promise<Created<FormSubmission>>,
|
|
19
|
-
Promise<Created<FormSubmissionAttachment>[]>
|
|
20
|
-
]>;
|
|
21
|
-
bulkAdd(args: {
|
|
22
|
-
formRevision: string;
|
|
23
|
-
commonFieldValues: Record<string, FieldValue>;
|
|
24
|
-
fieldValuesByAsset: Record<string, Record<string, FieldValue>>;
|
|
25
|
-
}, batchSize: number): Promise<Promise<BulkAddRequestReturnValue>[]>;
|
|
26
|
-
update(payload: Offline<Partial<Payload<FormSubmission>>>): Promise<[
|
|
27
|
-
Stored<FormSubmission>,
|
|
28
|
-
Stored<FormSubmissionAttachment>[],
|
|
29
|
-
Promise<Created<FormSubmission>>,
|
|
30
|
-
Promise<Created<FormSubmissionAttachment>[]>,
|
|
31
|
-
Promise<void>
|
|
32
|
-
]>;
|
|
12
|
+
add(payload: Payload<FormSubmission>): OptimisticModelResult<FormSubmission>;
|
|
13
|
+
update(payload: Offline<Partial<Payload<FormSubmission>>>): OptimisticModelResult<FormSubmission>;
|
|
33
14
|
delete(id: string): Promise<undefined>;
|
|
34
15
|
refreshStore(projectId: number): Promise<void>;
|
|
35
16
|
}
|
|
36
|
-
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { IssueAssociation, OvermapRootState, Payload } from '../../typings';
|
|
2
2
|
import { OptimisticModelResult } from '../typings';
|
|
3
3
|
import { BaseSDK } from '../base';
|
|
4
|
-
import {
|
|
4
|
+
import { BaseApiService } from './BaseApiService';
|
|
5
5
|
|
|
6
|
-
export declare abstract class IssueAssociationService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends
|
|
6
|
+
export declare abstract class IssueAssociationService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
7
7
|
add(payload: Payload<IssueAssociation>): OptimisticModelResult<IssueAssociation>;
|
|
8
8
|
delete(id: string): Promise<void>;
|
|
9
9
|
refreshStore(projectId: number): Promise<void>;
|
|
@@ -1,19 +1,40 @@
|
|
|
1
|
-
import { BaseAttachmentService } from './BaseAttachmentService';
|
|
1
|
+
import { BaseAttachmentService, BuildAttachmentPayloadData, BuildOfflineAttachmentData } from './BaseAttachmentService';
|
|
2
2
|
import { OptimisticMultipleModelResult } from '../typings';
|
|
3
3
|
import { IssueAttachment, OvermapRootState, Stored } from '../../typings';
|
|
4
4
|
import { BaseSDK } from '../base';
|
|
5
|
-
import { AttachmentModel } from '../../enums';
|
|
6
5
|
|
|
7
6
|
export declare abstract class IssueAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, IssueAttachment> {
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
name: string;
|
|
8
|
+
url: string;
|
|
10
9
|
addAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<IssueAttachment>[], "issueAttachments/addIssueAttachments">;
|
|
11
10
|
updateAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<IssueAttachment>[], "issueAttachments/updateIssueAttachments">;
|
|
12
11
|
removeAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<string[], "issueAttachments/deleteIssueAttachments">;
|
|
13
12
|
removeAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, "issueAttachments/deleteIssueAttachment">;
|
|
14
13
|
setAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<IssueAttachment>, "issueAttachments/setIssueAttachment">;
|
|
15
14
|
selectAttachment: import('../..').OvermapSelectorWithArgs<string, Stored<IssueAttachment> | undefined>;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
protected buildOfflineAttachment(data: BuildOfflineAttachmentData<string>): import('../..').Offline<{
|
|
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
|
+
issue: string;
|
|
24
|
+
}>;
|
|
25
|
+
protected buildAttachmentPayload(data: BuildAttachmentPayloadData<string>): {
|
|
26
|
+
issue: string;
|
|
27
|
+
modelId: string;
|
|
28
|
+
offline_id: import('../..').OfflineModel["offline_id"];
|
|
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
|
+
issueId: string;
|
|
36
|
+
file: File;
|
|
37
|
+
}[]): Promise<OptimisticMultipleModelResult<IssueAttachment>>;
|
|
38
|
+
delete(id: string): Promise<void>;
|
|
39
|
+
refreshStore(projectId: number): Promise<void>;
|
|
19
40
|
}
|
|
@@ -3,9 +3,6 @@ import { Issue, Offline, OvermapRootState, Payload } from '../../typings';
|
|
|
3
3
|
import { BaseApiService } from './BaseApiService';
|
|
4
4
|
import { BaseSDK } from '../base';
|
|
5
5
|
|
|
6
|
-
/**
|
|
7
|
-
* Handles CRUD operations on issues
|
|
8
|
-
*/
|
|
9
6
|
export declare abstract class IssueService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
10
7
|
add(payload: Payload<Issue>): OptimisticModelResult<Issue>;
|
|
11
8
|
update(payload: Offline<Partial<Payload<Issue>>>): OptimisticModelResult<Issue>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IssueTypeFieldValuesAttachment, OvermapRootState } from '../../typings';
|
|
2
|
+
import { BaseSDK } from '../base';
|
|
3
|
+
import { BaseUploadService } from './BaseUploadService';
|
|
4
|
+
import { OptimisticMultipleModelResult } from '../typings';
|
|
5
|
+
|
|
6
|
+
export declare abstract class IssueTypeFieldValuesAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
|
|
7
|
+
bulkAdd(payloads: {
|
|
8
|
+
fieldValuesId: string;
|
|
9
|
+
fieldIdentifier: string;
|
|
10
|
+
file: File;
|
|
11
|
+
}[]): Promise<OptimisticMultipleModelResult<IssueTypeFieldValuesAttachment>>;
|
|
12
|
+
bulkDelete(attachmentsIds: string[]): Promise<void>;
|
|
13
|
+
refreshStore(projectId: number): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IssueTypeFieldValues, Offline, OvermapRootState, Payload } from '../../typings';
|
|
2
|
+
import { BaseSDK } from '../base';
|
|
3
|
+
import { BaseApiService } from './BaseApiService';
|
|
4
|
+
import { OptimisticModelResult } from '../typings';
|
|
5
|
+
|
|
6
|
+
export declare abstract class IssueTypeFieldValuesService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
7
|
+
add(payload: Payload<IssueTypeFieldValues>): OptimisticModelResult<IssueTypeFieldValues>;
|
|
8
|
+
update(payload: Offline<Partial<Payload<IssueTypeFieldValues>>>): OptimisticModelResult<IssueTypeFieldValues>;
|
|
9
|
+
delete(id: string): Promise<void>;
|
|
10
|
+
refreshStore(projectId: number): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IssueTypeFieldsAttachment, OvermapRootState } from '../../typings';
|
|
2
|
+
import { BaseSDK } from '../base';
|
|
3
|
+
import { BaseUploadService } from './BaseUploadService';
|
|
4
|
+
import { OptimisticMultipleModelResult } from '../typings';
|
|
5
|
+
|
|
6
|
+
export declare abstract class IssueTypeFieldsAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
|
|
7
|
+
bulkAdd(payloads: {
|
|
8
|
+
fieldsRevisionId: string;
|
|
9
|
+
fieldIdentifier: string;
|
|
10
|
+
file: File;
|
|
11
|
+
}[]): Promise<OptimisticMultipleModelResult<IssueTypeFieldsAttachment>>;
|
|
12
|
+
refreshStore(organizationId: number): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IssueTypeFields, OvermapRootState, Payload } from '../../typings';
|
|
2
|
+
import { BaseSDK } from '../base';
|
|
3
|
+
import { BaseApiService } from './BaseApiService';
|
|
4
|
+
import { OptimisticModelResult } from '../typings';
|
|
5
|
+
|
|
6
|
+
export declare abstract class IssueTypeFieldsService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
7
|
+
add(payload: Payload<IssueTypeFields>): OptimisticModelResult<IssueTypeFields>;
|
|
8
|
+
refreshStore(organizationId: number): Promise<void>;
|
|
9
|
+
}
|
|
@@ -1,19 +1,40 @@
|
|
|
1
|
-
import { BaseAttachmentService } from './BaseAttachmentService';
|
|
1
|
+
import { BaseAttachmentService, BuildAttachmentPayloadData, BuildOfflineAttachmentData } from './BaseAttachmentService';
|
|
2
2
|
import { OvermapRootState, ProjectAttachment, Stored } from '../../typings';
|
|
3
3
|
import { OptimisticMultipleModelResult } from '../typings';
|
|
4
4
|
import { BaseSDK } from '../base';
|
|
5
|
-
import { AttachmentModel } from '../../enums';
|
|
6
5
|
|
|
7
6
|
export declare abstract class ProjectAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, number, ProjectAttachment> {
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
name: string;
|
|
8
|
+
url: string;
|
|
10
9
|
addAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<ProjectAttachment>[], "projectAttachments/addProjectAttachments">;
|
|
11
10
|
updateAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<ProjectAttachment>[], "projectAttachments/updateProjectAttachments">;
|
|
12
11
|
removeAttachments: import('@reduxjs/toolkit').ActionCreatorWithPayload<string[], "projectAttachments/deleteProjectAttachments">;
|
|
13
12
|
removeAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, "projectAttachments/deleteProjectAttachment">;
|
|
14
13
|
setAttachment: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<ProjectAttachment>, "projectAttachments/setProjectAttachment">;
|
|
15
14
|
selectAttachment: import('../..').OvermapSelectorWithArgs<string, ProjectAttachment | undefined>;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
protected buildOfflineAttachment(data: BuildOfflineAttachmentData<number>): import('../..').Offline<{
|
|
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
|
+
project: number;
|
|
24
|
+
}>;
|
|
25
|
+
protected buildAttachmentPayload(data: BuildAttachmentPayloadData<number>): {
|
|
26
|
+
project: number;
|
|
27
|
+
modelId: number;
|
|
28
|
+
offline_id: import('../..').OfflineModel["offline_id"];
|
|
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
|
+
projectId: number;
|
|
36
|
+
file: File;
|
|
37
|
+
}[]): Promise<OptimisticMultipleModelResult<ProjectAttachment>>;
|
|
38
|
+
delete(attachmentId: string): Promise<void>;
|
|
39
|
+
refreshStore(projectId: number): Promise<void>;
|
|
19
40
|
}
|