@overmap-ai/core 1.0.71-fields.9 → 1.0.71-org-projs-only.1
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 +1062 -1970
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +1063 -1971
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/services/AssetAttachmentService.d.ts +8 -32
- package/dist/sdk/services/AssetTypeAttachmentService.d.ts +9 -32
- package/dist/sdk/services/BaseAttachmentService.d.ts +20 -18
- package/dist/sdk/services/BaseUploadService.d.ts +1 -2
- package/dist/sdk/services/DocumentAttachmentService.d.ts +8 -30
- package/dist/sdk/services/FormService.d.ts +15 -13
- package/dist/sdk/services/FormSubmissionService.d.ts +29 -10
- package/dist/sdk/services/GeoImageService.d.ts +1 -1
- package/dist/sdk/services/IssueAssociationService.d.ts +2 -2
- package/dist/sdk/services/IssueAttachmentService.d.ts +8 -31
- package/dist/sdk/services/IssueService.d.ts +3 -0
- package/dist/sdk/services/ProjectAttachmentService.d.ts +8 -31
- package/dist/sdk/services/TeamService.d.ts +1 -1
- package/dist/sdk/services/WorkspaceService.d.ts +1 -1
- package/dist/sdk/services/index.d.ts +0 -11
- package/dist/store/slices/formRevisionSlice.d.ts +15 -14
- package/dist/store/slices/formSlice.d.ts +5 -1
- package/dist/store/slices/formSubmissionSlice.d.ts +6 -0
- package/dist/store/slices/index.d.ts +0 -8
- package/dist/store/store.d.ts +1 -9
- package/dist/typings/files.d.ts +4 -8
- package/dist/typings/models/assets.d.ts +0 -15
- package/dist/typings/models/attachments.d.ts +6 -1
- package/dist/typings/models/forms.d.ts +113 -12
- package/dist/typings/models/index.d.ts +0 -1
- package/dist/typings/models/issues.d.ts +0 -15
- package/dist/typings/models/store.d.ts +1 -9
- package/dist/utils/file.d.ts +2 -2
- package/package.json +3 -5
- package/dist/sdk/services/AssetTypeFieldValuesAttachmentService.d.ts +0 -12
- package/dist/sdk/services/AssetTypeFieldValuesService.d.ts +0 -20
- package/dist/sdk/services/AssetTypeFieldsAttachmentService.d.ts +0 -12
- package/dist/sdk/services/AssetTypeFieldsService.d.ts +0 -8
- package/dist/sdk/services/FormRevisionAttachmentService.d.ts +0 -12
- package/dist/sdk/services/FormRevisionService.d.ts +0 -8
- package/dist/sdk/services/FormSubmissionAttachmentService.d.ts +0 -13
- package/dist/sdk/services/IssueTypeFieldValuesAttachmentService.d.ts +0 -13
- package/dist/sdk/services/IssueTypeFieldValuesService.d.ts +0 -10
- package/dist/sdk/services/IssueTypeFieldsAttachmentService.d.ts +0 -12
- package/dist/sdk/services/IssueTypeFieldsService.d.ts +0 -8
- package/dist/store/slices/assetTypeFieldValuesAttachmentSlice.d.ts +0 -52
- package/dist/store/slices/assetTypeFieldValuesSlice.d.ts +0 -53
- package/dist/store/slices/assetTypeFieldsAttachmentSlice.d.ts +0 -52
- package/dist/store/slices/assetTypeFieldsSlice.d.ts +0 -53
- package/dist/store/slices/issueTypeFieldValuesAttachmentSlice.d.ts +0 -52
- package/dist/store/slices/issueTypeFieldValuesSlice.d.ts +0 -52
- package/dist/store/slices/issueTypeFieldsAttachmentSlice.d.ts +0 -52
- package/dist/store/slices/issueTypeFieldsSlice.d.ts +0 -54
- package/dist/typings/models/fields.d.ts +0 -16
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { AssetAttachment,
|
|
1
|
+
import { BaseAttachmentService } from "./BaseAttachmentService";
|
|
2
|
+
import type { AssetAttachment, Stored, OvermapRootState } from "../../typings";
|
|
3
3
|
import type { OptimisticMultipleModelResult } from "../typings";
|
|
4
4
|
import type { BaseSDK } from "../base";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
name: string;
|
|
9
|
-
url: string;
|
|
5
|
+
import { AttachmentModel } from "../../enums";
|
|
6
|
+
export declare abstract class AssetAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, AssetAttachment> {
|
|
7
|
+
attachmentModel: AttachmentModel;
|
|
10
8
|
initializeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetAttachment>[], "assetAttachments/initializeAssetAttachments">;
|
|
11
9
|
addAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetAttachment>[], "assetAttachments/addAssetAttachments">;
|
|
12
10
|
updateAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetAttachment>[], "assetAttachments/updateAssetAttachments">;
|
|
@@ -14,29 +12,7 @@ export declare abstract class AssetAttachmentService<TState extends OvermapRootS
|
|
|
14
12
|
removeAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "assetAttachments/deleteAssetAttachment">;
|
|
15
13
|
setAttachment: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetAttachment>, "assetAttachments/setAssetAttachment">;
|
|
16
14
|
selectAttachment: import('../../typings/store').OvermapSelectorWithArgs<string, Stored<AssetAttachment> | undefined>;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
created_by: number | undefined;
|
|
21
|
-
file_name: string;
|
|
22
|
-
file_type: string;
|
|
23
|
-
submitted_at: string;
|
|
24
|
-
description: string | undefined;
|
|
25
|
-
asset: string;
|
|
26
|
-
}>;
|
|
27
|
-
protected buildAttachmentPayload(data: BuildAttachmentPayloadData<string>): {
|
|
28
|
-
asset: string;
|
|
29
|
-
modelId: string;
|
|
30
|
-
offline_id: string;
|
|
31
|
-
description: string | undefined;
|
|
32
|
-
file_sha1: string;
|
|
33
|
-
file_name: string;
|
|
34
|
-
file_extension: string;
|
|
35
|
-
};
|
|
36
|
-
bulkAdd(payloads: {
|
|
37
|
-
assetId: string;
|
|
38
|
-
file: File;
|
|
39
|
-
}[]): Promise<OptimisticMultipleModelResult<AssetAttachment>>;
|
|
40
|
-
delete(id: string): Promise<void>;
|
|
41
|
-
refreshStore(projectId: number): Promise<void>;
|
|
15
|
+
private buildOfflineAttachment;
|
|
16
|
+
attachFilesToAsset(files: File[], assetId: string): Promise<OptimisticMultipleModelResult<AssetAttachment>>;
|
|
17
|
+
deleteAssetAttachment(attachmentId: string): Promise<void>;
|
|
42
18
|
}
|
|
@@ -1,41 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { AssetTypeAttachment,
|
|
1
|
+
import { BaseAttachmentService } from "./BaseAttachmentService";
|
|
2
|
+
import type { AssetTypeAttachment, Stored, OvermapRootState } from "../../typings";
|
|
3
3
|
import type { OptimisticMultipleModelResult } from "../typings";
|
|
4
4
|
import type { BaseSDK } from "../base";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
url: string;
|
|
5
|
+
import { AttachmentModel } from "../../enums";
|
|
6
|
+
export declare abstract class AssetTypeAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, AssetTypeAttachment> {
|
|
7
|
+
attachmentModel: AttachmentModel;
|
|
8
|
+
initializeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetTypeAttachment>[], "assetTypeAttachments/initializeAssetTypeAttachments">;
|
|
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('../../typings/store').OvermapSelectorWithArgs<string, Stored<AssetTypeAttachment> | undefined>;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
created_by: number | undefined;
|
|
20
|
-
file_name: string;
|
|
21
|
-
file_type: string;
|
|
22
|
-
submitted_at: string;
|
|
23
|
-
description: string | undefined;
|
|
24
|
-
asset_type: string;
|
|
25
|
-
}>;
|
|
26
|
-
protected buildAttachmentPayload(data: BuildAttachmentPayloadData<string>): {
|
|
27
|
-
asset_type: string;
|
|
28
|
-
modelId: string;
|
|
29
|
-
offline_id: string;
|
|
30
|
-
description: string | undefined;
|
|
31
|
-
file_sha1: string;
|
|
32
|
-
file_name: string;
|
|
33
|
-
file_extension: string;
|
|
34
|
-
};
|
|
35
|
-
bulkAdd(payloads: {
|
|
36
|
-
assetTypeId: string;
|
|
37
|
-
file: File;
|
|
38
|
-
}[]): Promise<OptimisticMultipleModelResult<AssetTypeAttachment>>;
|
|
39
|
-
delete(attachmentId: string): Promise<void>;
|
|
40
|
-
refreshStore(projectId: number): Promise<void>;
|
|
15
|
+
private buildOfflineAttachment;
|
|
16
|
+
attachFilesToAssetType(files: File[], assetTypeId: string): Promise<OptimisticMultipleModelResult<AssetTypeAttachment>>;
|
|
17
|
+
deleteAssetTypeAttachment(attachmentId: string): Promise<void>;
|
|
41
18
|
}
|
|
@@ -1,37 +1,39 @@
|
|
|
1
1
|
import { ActionCreatorWithPayload } from "@reduxjs/toolkit";
|
|
2
2
|
import type { OptimisticMultipleModelResult } from "../typings";
|
|
3
|
-
import
|
|
3
|
+
import { AttachmentModel } from "../../enums";
|
|
4
|
+
import type { Attachment, OfflineModel, OvermapRootState, OvermapSelectorWithArgs, Stored, Submitted } from "../../typings";
|
|
4
5
|
import type { BaseSDK } from "../base";
|
|
5
6
|
import { BaseUploadService } from "./BaseUploadService";
|
|
6
|
-
export interface AttachmentPayload
|
|
7
|
+
export interface AttachmentPayload {
|
|
7
8
|
offline_id: OfflineModel["offline_id"];
|
|
9
|
+
name: Attachment["file_name"];
|
|
10
|
+
sha1: Attachment["file_sha1"];
|
|
8
11
|
description: Attachment["description"];
|
|
9
12
|
}
|
|
13
|
+
export interface FilePayload {
|
|
14
|
+
sha1: Attachment["file_sha1"];
|
|
15
|
+
file_type: string;
|
|
16
|
+
extension: string;
|
|
17
|
+
size: number;
|
|
18
|
+
}
|
|
10
19
|
export interface BuildOfflineAttachmentData<TModelId> {
|
|
11
20
|
file: File;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
21
|
+
sha1: string;
|
|
22
|
+
submittedAt: string;
|
|
23
|
+
createdBy?: number;
|
|
15
24
|
description?: string;
|
|
16
25
|
modelId: TModelId;
|
|
17
26
|
}
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
export declare abstract class BaseAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>, TModelId extends string | number, TAttachment extends Attachment, TAttachmentPayload extends AttachmentPayload> extends BaseUploadService<TState, TSDK> {
|
|
22
|
-
abstract readonly name: string;
|
|
23
|
-
abstract readonly url: string;
|
|
27
|
+
export declare abstract class BaseAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>, TModelId extends string | number, TAttachment extends Attachment> extends BaseUploadService<TState, TSDK> {
|
|
28
|
+
abstract readonly attachmentModel: AttachmentModel;
|
|
29
|
+
abstract readonly initializeAttachments: ActionCreatorWithPayload<Submitted<TAttachment>[]>;
|
|
24
30
|
abstract readonly addAttachments: ActionCreatorWithPayload<Submitted<TAttachment>[]>;
|
|
25
31
|
abstract readonly updateAttachments: ActionCreatorWithPayload<Submitted<TAttachment>[]>;
|
|
26
32
|
abstract readonly removeAttachments: ActionCreatorWithPayload<string[]>;
|
|
27
33
|
abstract readonly setAttachment: ActionCreatorWithPayload<Stored<TAttachment>>;
|
|
28
34
|
abstract readonly removeAttachment: ActionCreatorWithPayload<string>;
|
|
29
35
|
abstract readonly selectAttachment: OvermapSelectorWithArgs<string, Stored<TAttachment> | undefined>;
|
|
30
|
-
protected
|
|
31
|
-
protected
|
|
32
|
-
|
|
33
|
-
modelId: TModelId;
|
|
34
|
-
file: File;
|
|
35
|
-
}[]): Promise<OptimisticMultipleModelResult<TAttachment>>;
|
|
36
|
-
_delete(attachmendId: string): Promise<void>;
|
|
36
|
+
protected attachFiles(files: File[], modelId: TModelId, buildOfflineAttachment: (data: BuildOfflineAttachmentData<TModelId>) => Stored<TAttachment>): Promise<OptimisticMultipleModelResult<TAttachment>>;
|
|
37
|
+
protected deleteAttachment(attachmendId: string): Promise<void>;
|
|
38
|
+
refreshStore(projectId: number, _organizationId?: number): Promise<void>;
|
|
37
39
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { BaseApiService } from "./BaseApiService";
|
|
2
2
|
import type { PresignedUrlsResponse } from "../typings";
|
|
3
|
-
import type {
|
|
3
|
+
import type { OvermapRootState } from "../../typings";
|
|
4
4
|
import type { BaseSDK } from "../base";
|
|
5
5
|
export declare abstract class BaseUploadService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
6
6
|
protected getNumberOfAttachmentsWithSha1(sha1: string): number;
|
|
7
7
|
protected processPresignedUrls(presignedUrls: PresignedUrlsResponse): Record<string, Promise<undefined>>;
|
|
8
|
-
protected getFilePayload(file: File): Promise<FilePayload>;
|
|
9
8
|
}
|
|
@@ -1,42 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseAttachmentService } from "./BaseAttachmentService";
|
|
2
2
|
import type { DocumentAttachment, OvermapRootState, Stored } from "../../typings";
|
|
3
3
|
import type { OptimisticMultipleModelResult } from "../typings";
|
|
4
4
|
import type { BaseSDK } from "../base";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
url: string;
|
|
5
|
+
import { AttachmentModel } from "../../enums";
|
|
6
|
+
export declare abstract class DocumentAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, DocumentAttachment> {
|
|
7
|
+
attachmentModel: AttachmentModel;
|
|
8
|
+
initializeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<DocumentAttachment>[], "documentAttachments/initializeDocumentAttachments">;
|
|
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('../../typings/store').OvermapSelectorWithArgs<string, Stored<DocumentAttachment> | undefined>;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
created_by: number | undefined;
|
|
20
|
-
file_name: string;
|
|
21
|
-
file_type: string;
|
|
22
|
-
submitted_at: string;
|
|
23
|
-
description: string | undefined;
|
|
24
|
-
document: string;
|
|
25
|
-
}>;
|
|
26
|
-
protected buildAttachmentPayload(data: BuildAttachmentPayloadData<string>): {
|
|
27
|
-
document: string;
|
|
28
|
-
modelId: string;
|
|
29
|
-
offline_id: string;
|
|
30
|
-
description: string | undefined;
|
|
31
|
-
file_sha1: string;
|
|
32
|
-
file_name: string;
|
|
33
|
-
file_extension: string;
|
|
34
|
-
};
|
|
35
|
-
bulkAdd(payloads: {
|
|
36
|
-
documentId: string;
|
|
37
|
-
file: File;
|
|
38
|
-
}[]): Promise<OptimisticMultipleModelResult<DocumentAttachment>>;
|
|
39
|
-
delete(id: string): Promise<void>;
|
|
15
|
+
private buildOfflineAttachment;
|
|
16
|
+
attachFilesToDocument(files: File[], documentId: string): Promise<OptimisticMultipleModelResult<DocumentAttachment>>;
|
|
17
|
+
deleteDocumentAttachment(attachmentId: string): Promise<void>;
|
|
40
18
|
private makeReadable;
|
|
41
19
|
refreshStore(projectId: number, organizationId: number): Promise<void>;
|
|
42
20
|
}
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Form, FormRevision, FormRevisionAttachment, FormRevisionPayload, ISerializedField, OvermapRootState, Stored, Created } from "../../typings";
|
|
2
2
|
import type { BaseSDK } from "../base";
|
|
3
3
|
import { BaseUploadService } from "./BaseUploadService";
|
|
4
|
-
import { ISerializedField } from "@overmap-ai/forms";
|
|
5
|
-
/**
|
|
6
|
-
* Finds and separates image files from form revision fields. The image attribute is deleted from the field objects and
|
|
7
|
-
* is returned separately from the image files as they are stored in a different table.
|
|
8
|
-
*/
|
|
9
|
-
export declare const separateImageFromFields: (fields: ISerializedField[]) => Promise<{
|
|
10
|
-
fields: ISerializedField[];
|
|
11
|
-
images: Record<string, File>;
|
|
12
|
-
}>;
|
|
13
4
|
export declare abstract class FormService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
5
|
+
private bulkAddRevisionAttachments;
|
|
6
|
+
private add;
|
|
7
|
+
addForOrganization(organizationId: number, initialRevision: FormRevisionPayload): Promise<[Stored<Form>, Stored<FormRevision<ISerializedField>>, Stored<FormRevisionAttachment>[], Promise<Created<FormRevision<ISerializedField>>>, Promise<Created<FormRevisionAttachment>[]>]>;
|
|
8
|
+
addForProject(projectId: number, initialRevision: FormRevisionPayload): Promise<[Stored<Form>, Stored<FormRevision<ISerializedField>>, Stored<FormRevisionAttachment>[], Promise<Created<FormRevision<ISerializedField>>>, Promise<Created<FormRevisionAttachment>[]>]>;
|
|
9
|
+
addForIssueType(issueTypeId: string, initialRevision: FormRevisionPayload): Promise<[Stored<Form>, Stored<FormRevision<ISerializedField>>, Stored<FormRevisionAttachment>[], Promise<Created<FormRevision<ISerializedField>>>, Promise<Created<FormRevisionAttachment>[]>]>;
|
|
10
|
+
addForAssetType(assetTypeId: string, initialRevision: FormRevisionPayload): Promise<[Stored<Form>, Stored<FormRevision<ISerializedField>>, Stored<FormRevisionAttachment>[], Promise<Created<FormRevision<ISerializedField>>>, Promise<Created<FormRevisionAttachment>[]>]>;
|
|
11
|
+
createRevision(formId: string, revision: FormRevisionPayload): Promise<[
|
|
12
|
+
Stored<FormRevision>,
|
|
13
|
+
Stored<FormRevisionAttachment>[],
|
|
14
|
+
Promise<Created<FormRevision>>,
|
|
15
|
+
Promise<Created<FormRevisionAttachment>[]>
|
|
16
|
+
]>;
|
|
17
|
+
delete(formId: string): Promise<undefined>;
|
|
18
|
+
refreshStore(projectId: number): Promise<void>;
|
|
17
19
|
}
|
|
@@ -1,15 +1,34 @@
|
|
|
1
|
-
import type { FormSubmission, Offline, OvermapRootState, Payload } from "../../typings";
|
|
2
|
-
import type {
|
|
1
|
+
import type { Created, FieldValue, FormSubmission, FormSubmissionAttachment, Offline, OvermapRootState, Payload, Stored } from "../../typings";
|
|
2
|
+
import type { PresignedUrlsResponse } from "../typings";
|
|
3
3
|
import type { BaseSDK } from "../base";
|
|
4
4
|
import { BaseUploadService } from "./BaseUploadService";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
5
|
+
interface BulkAddRequestReturnValue {
|
|
6
|
+
submissions: Created<FormSubmission>[];
|
|
7
|
+
attachments: Created<FormSubmissionAttachment>[];
|
|
8
|
+
presigned_urls: PresignedUrlsResponse;
|
|
9
|
+
}
|
|
10
10
|
export declare abstract class FormSubmissionService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
private bulkAddSubmissionAttachments;
|
|
12
|
+
private bulkDeleteSubmissionAttachments;
|
|
13
|
+
add(payload: Payload<FormSubmission>): Promise<[
|
|
14
|
+
Stored<FormSubmission>,
|
|
15
|
+
Stored<FormSubmissionAttachment>[],
|
|
16
|
+
Promise<Created<FormSubmission>>,
|
|
17
|
+
Promise<Created<FormSubmissionAttachment>[]>
|
|
18
|
+
]>;
|
|
19
|
+
bulkAdd(args: {
|
|
20
|
+
formRevision: string;
|
|
21
|
+
commonFieldValues: Record<string, FieldValue>;
|
|
22
|
+
fieldValuesByAsset: Record<string, Record<string, FieldValue>>;
|
|
23
|
+
}, batchSize: number): Promise<Promise<BulkAddRequestReturnValue>[]>;
|
|
24
|
+
update(payload: Offline<Partial<Payload<FormSubmission>>>): Promise<[
|
|
25
|
+
Stored<FormSubmission>,
|
|
26
|
+
Stored<FormSubmissionAttachment>[],
|
|
27
|
+
Promise<Created<FormSubmission>>,
|
|
28
|
+
Promise<Created<FormSubmissionAttachment>[]>,
|
|
29
|
+
Promise<void>
|
|
30
|
+
]>;
|
|
31
|
+
delete(submissionId: string): Promise<undefined>;
|
|
14
32
|
refreshStore(projectId: number): Promise<void>;
|
|
15
33
|
}
|
|
34
|
+
export {};
|
|
@@ -6,6 +6,6 @@ export declare abstract class GeoImageService<TState extends OvermapRootState, T
|
|
|
6
6
|
add(payload: GeoImagePayload): Promise<OptimisticModelResult<GeoImage>>;
|
|
7
7
|
bulkAdd(payloads: BulkGeoImagePayload[], projectId: number): Promise<OptimisticMultipleModelResult<GeoImage>>;
|
|
8
8
|
update(payload: Offline<Partial<Pick<GeoImagePayload, "title" | "description">>>): OptimisticModelResult<GeoImage>;
|
|
9
|
-
delete(
|
|
9
|
+
delete(geoImageId: string): Promise<void>;
|
|
10
10
|
refreshStore(projectId: number): Promise<void>;
|
|
11
11
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { IssueAssociation, OvermapRootState, Payload } from "../../typings";
|
|
2
2
|
import type { OptimisticModelResult } from "../typings";
|
|
3
3
|
import type { BaseSDK } from "../base";
|
|
4
|
-
import {
|
|
5
|
-
export declare abstract class IssueAssociationService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends
|
|
4
|
+
import { BaseUploadService } from "./BaseUploadService";
|
|
5
|
+
export declare abstract class IssueAssociationService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
|
|
6
6
|
add(payload: Payload<IssueAssociation>): OptimisticModelResult<IssueAssociation>;
|
|
7
7
|
delete(id: string): Promise<void>;
|
|
8
8
|
refreshStore(projectId: number): Promise<void>;
|
|
@@ -1,41 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseAttachmentService } from "./BaseAttachmentService";
|
|
2
2
|
import type { OptimisticMultipleModelResult } from "../typings";
|
|
3
3
|
import type { IssueAttachment, OvermapRootState, Stored } from "../../typings";
|
|
4
4
|
import type { BaseSDK } from "../base";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
url: string;
|
|
5
|
+
import { AttachmentModel } from "../../enums";
|
|
6
|
+
export declare abstract class IssueAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, IssueAttachment> {
|
|
7
|
+
attachmentModel: AttachmentModel;
|
|
8
|
+
initializeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<IssueAttachment>[], "issueAttachments/initializeIssueAttachments">;
|
|
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('../../typings/store').OvermapSelectorWithArgs<string, Stored<IssueAttachment> | undefined>;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
created_by: number | undefined;
|
|
20
|
-
file_name: string;
|
|
21
|
-
file_type: string;
|
|
22
|
-
submitted_at: string;
|
|
23
|
-
description: string | undefined;
|
|
24
|
-
issue: string;
|
|
25
|
-
}>;
|
|
26
|
-
protected buildAttachmentPayload(data: BuildAttachmentPayloadData<string>): {
|
|
27
|
-
issue: string;
|
|
28
|
-
modelId: string;
|
|
29
|
-
offline_id: string;
|
|
30
|
-
description: string | undefined;
|
|
31
|
-
file_sha1: string;
|
|
32
|
-
file_name: string;
|
|
33
|
-
file_extension: string;
|
|
34
|
-
};
|
|
35
|
-
bulkAdd(payloads: {
|
|
36
|
-
issueId: string;
|
|
37
|
-
file: File;
|
|
38
|
-
}[]): Promise<OptimisticMultipleModelResult<IssueAttachment>>;
|
|
39
|
-
delete(id: string): Promise<void>;
|
|
40
|
-
refreshStore(projectId: number): Promise<void>;
|
|
15
|
+
private buildOfflineAttachment;
|
|
16
|
+
attachFilesToIssue(files: File[], issueId: string): Promise<OptimisticMultipleModelResult<IssueAttachment>>;
|
|
17
|
+
deleteIssueAttachment(attachmentId: string): Promise<void>;
|
|
41
18
|
}
|
|
@@ -2,6 +2,9 @@ import type { OptimisticModelResult } from "../typings";
|
|
|
2
2
|
import type { Issue, Offline, OvermapRootState, Payload } from "../../typings";
|
|
3
3
|
import { BaseApiService } from "./BaseApiService";
|
|
4
4
|
import type { BaseSDK } from "../base";
|
|
5
|
+
/**
|
|
6
|
+
* Handles CRUD operations on issues
|
|
7
|
+
*/
|
|
5
8
|
export declare abstract class IssueService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
6
9
|
add(payload: Payload<Issue>): OptimisticModelResult<Issue>;
|
|
7
10
|
update(payload: Offline<Partial<Payload<Issue>>>): OptimisticModelResult<Issue>;
|
|
@@ -1,41 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseAttachmentService } from "./BaseAttachmentService";
|
|
2
2
|
import type { OvermapRootState, ProjectAttachment, Stored } from "../../typings";
|
|
3
3
|
import type { OptimisticMultipleModelResult } from "../typings";
|
|
4
4
|
import type { BaseSDK } from "../base";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
url: string;
|
|
5
|
+
import { AttachmentModel } from "../../enums";
|
|
6
|
+
export declare abstract class ProjectAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, number, ProjectAttachment> {
|
|
7
|
+
attachmentModel: AttachmentModel;
|
|
8
|
+
initializeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<ProjectAttachment>[], "projectAttachments/initializeProjectAttachments">;
|
|
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('../../typings/store').OvermapSelectorWithArgs<string, ProjectAttachment | undefined>;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
created_by: number | undefined;
|
|
20
|
-
file_name: string;
|
|
21
|
-
file_type: string;
|
|
22
|
-
submitted_at: string;
|
|
23
|
-
description: string | undefined;
|
|
24
|
-
project: number;
|
|
25
|
-
}>;
|
|
26
|
-
protected buildAttachmentPayload(data: BuildAttachmentPayloadData<number>): {
|
|
27
|
-
project: number;
|
|
28
|
-
modelId: number;
|
|
29
|
-
offline_id: string;
|
|
30
|
-
description: string | undefined;
|
|
31
|
-
file_sha1: string;
|
|
32
|
-
file_name: string;
|
|
33
|
-
file_extension: string;
|
|
34
|
-
};
|
|
35
|
-
bulkAdd(payloads: {
|
|
36
|
-
projectId: number;
|
|
37
|
-
file: File;
|
|
38
|
-
}[]): Promise<OptimisticMultipleModelResult<ProjectAttachment>>;
|
|
39
|
-
delete(attachmentId: string): Promise<void>;
|
|
40
|
-
refreshStore(projectId: number): Promise<void>;
|
|
15
|
+
private buildOfflineAttachment;
|
|
16
|
+
attachFilesToProject(files: File[], projectId: number): Promise<OptimisticMultipleModelResult<ProjectAttachment>>;
|
|
17
|
+
deleteProjectAttachment(attachmentId: string): Promise<void>;
|
|
41
18
|
}
|
|
@@ -5,7 +5,7 @@ import type { BaseSDK } from "../base";
|
|
|
5
5
|
export declare abstract class TeamService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
6
6
|
add(payload: Payload<Team>): OptimisticModelResult<Team>;
|
|
7
7
|
update(payload: Offline<Partial<Payload<Team>>>): OptimisticModelResult<Team>;
|
|
8
|
-
delete(
|
|
8
|
+
delete(teamId: string): Promise<undefined>;
|
|
9
9
|
setMembers(teamId: string, members: User["id"][]): Promise<undefined>;
|
|
10
10
|
addMembers(teamId: string, members: User["id"][]): Promise<undefined>;
|
|
11
11
|
removeMembers(teamId: string, members: User["id"][]): Promise<undefined>;
|
|
@@ -5,6 +5,6 @@ import type { BaseSDK } from "../base";
|
|
|
5
5
|
export declare abstract class WorkspaceService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
6
6
|
add(payload: Payload<Workspace>): OptimisticModelResult<Workspace>;
|
|
7
7
|
update(payload: Offline<Partial<Payload<Workspace>>>): OptimisticModelResult<Workspace>;
|
|
8
|
-
delete(
|
|
8
|
+
delete(workspaceId: string): Promise<undefined>;
|
|
9
9
|
refreshStore(projectId: number): Promise<undefined>;
|
|
10
10
|
}
|
|
@@ -32,14 +32,3 @@ export * from "./TeamService";
|
|
|
32
32
|
export * from "./UserService";
|
|
33
33
|
export * from "./GeoImageService";
|
|
34
34
|
export * from "./IssueAssociationService";
|
|
35
|
-
export * from "./FormRevisionAttachmentService";
|
|
36
|
-
export * from "./FormSubmissionAttachmentService";
|
|
37
|
-
export * from "./FormRevisionService";
|
|
38
|
-
export * from "./AssetTypeFieldsAttachmentService";
|
|
39
|
-
export * from "./AssetTypeFieldsService";
|
|
40
|
-
export * from "./AssetTypeFieldValuesService";
|
|
41
|
-
export * from "./AssetTypeFieldValuesAttachmentService";
|
|
42
|
-
export * from "./IssueTypeFieldsAttachmentService";
|
|
43
|
-
export * from "./IssueTypeFieldsService";
|
|
44
|
-
export * from "./IssueTypeFieldValuesAttachmentService";
|
|
45
|
-
export * from "./IssueTypeFieldValuesService";
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import { Reducer } from "@reduxjs/toolkit";
|
|
2
|
-
import type { FormRevision, OvermapRootState, OvermapSelectorWithArgs, Stored } from "../../typings";
|
|
2
|
+
import type { Form, FormRevision, OvermapRootState, OvermapSelector, OvermapSelectorWithArgs, Stored } from "../../typings";
|
|
3
3
|
import type { ModelState } from "../typings";
|
|
4
4
|
export type FormRevisionState = ModelState<Stored<FormRevision>>;
|
|
5
5
|
export declare const formRevisionsSlice: import("@reduxjs/toolkit").Slice<FormRevisionState, {
|
|
6
|
-
initializeFormRevisions: <TState extends ModelState<Stored<FormRevision<import(
|
|
7
|
-
payload: Stored<FormRevision<import(
|
|
6
|
+
initializeFormRevisions: <TState extends ModelState<Stored<FormRevision<import('../../typings/models/forms').ISerializedField>>>>(state: TState, action: {
|
|
7
|
+
payload: Stored<FormRevision<import('../../typings/models/forms').ISerializedField>>[];
|
|
8
8
|
type: string;
|
|
9
9
|
}) => void;
|
|
10
|
-
setFormRevision: <TState_1 extends ModelState<Stored<FormRevision<import(
|
|
11
|
-
payload: Stored<FormRevision<import(
|
|
10
|
+
setFormRevision: <TState_1 extends ModelState<Stored<FormRevision<import('../../typings/models/forms').ISerializedField>>>>(state: TState_1, action: {
|
|
11
|
+
payload: Stored<FormRevision<import('../../typings/models/forms').ISerializedField>>;
|
|
12
12
|
type: string;
|
|
13
13
|
}) => void;
|
|
14
|
-
addFormRevision: <TState_2 extends ModelState<Stored<FormRevision<import(
|
|
15
|
-
payload: Stored<FormRevision<import(
|
|
14
|
+
addFormRevision: <TState_2 extends ModelState<Stored<FormRevision<import('../../typings/models/forms').ISerializedField>>>>(state: TState_2, action: {
|
|
15
|
+
payload: Stored<FormRevision<import('../../typings/models/forms').ISerializedField>>;
|
|
16
16
|
type: string;
|
|
17
17
|
}) => void;
|
|
18
|
-
addFormRevisions: <TState_3 extends ModelState<Stored<FormRevision<import(
|
|
19
|
-
payload: Stored<FormRevision<import(
|
|
18
|
+
addFormRevisions: <TState_3 extends ModelState<Stored<FormRevision<import('../../typings/models/forms').ISerializedField>>>>(state: TState_3, action: {
|
|
19
|
+
payload: Stored<FormRevision<import('../../typings/models/forms').ISerializedField>>[];
|
|
20
20
|
type: string;
|
|
21
21
|
}) => void;
|
|
22
|
-
deleteFormRevision: <TState_4 extends ModelState<Stored<FormRevision<import(
|
|
22
|
+
deleteFormRevision: <TState_4 extends ModelState<Stored<FormRevision<import('../../typings/models/forms').ISerializedField>>>>(state: TState_4, action: {
|
|
23
23
|
payload: string;
|
|
24
24
|
type: string;
|
|
25
25
|
}) => void;
|
|
26
|
-
deleteFormRevisions: <TState_5 extends ModelState<Stored<FormRevision<import(
|
|
26
|
+
deleteFormRevisions: <TState_5 extends ModelState<Stored<FormRevision<import('../../typings/models/forms').ISerializedField>>>>(state: TState_5, action: {
|
|
27
27
|
payload: string[];
|
|
28
28
|
type: string;
|
|
29
29
|
}) => void;
|
|
30
30
|
}, "formRevisions">;
|
|
31
|
-
export declare const setFormRevision: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormRevision<import(
|
|
32
|
-
export declare const selectFormRevisionMapping: (state: OvermapRootState) => Record<string, Stored<FormRevision<import(
|
|
33
|
-
export declare const selectFormRevisions: ((state: OvermapRootState) => Stored<FormRevision<import(
|
|
31
|
+
export declare const setFormRevision: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormRevision<import('../../typings/models/forms').ISerializedField>>, "formRevisions/setFormRevision">, initializeFormRevisions: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormRevision<import('../../typings/models/forms').ISerializedField>>[], "formRevisions/initializeFormRevisions">, addFormRevision: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormRevision<import('../../typings/models/forms').ISerializedField>>, "formRevisions/addFormRevision">, addFormRevisions: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<FormRevision<import('../../typings/models/forms').ISerializedField>>[], "formRevisions/addFormRevisions">, deleteFormRevision: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "formRevisions/deleteFormRevision">, deleteFormRevisions: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "formRevisions/deleteFormRevisions">;
|
|
32
|
+
export declare const selectFormRevisionMapping: (state: OvermapRootState) => Record<string, Stored<FormRevision<import('../../typings/models/forms').ISerializedField>>>;
|
|
33
|
+
export declare const selectFormRevisions: ((state: OvermapRootState) => Stored<FormRevision<import('../../typings/models/forms').ISerializedField>>[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, Stored<FormRevision<import('../../typings/models/forms').ISerializedField>>>) => Stored<FormRevision<import('../../typings/models/forms').ISerializedField>>[], {
|
|
34
34
|
clearCache: () => void;
|
|
35
35
|
}> & {
|
|
36
36
|
clearCache: () => void;
|
|
@@ -39,4 +39,5 @@ export declare const selectFormRevisionById: OvermapSelectorWithArgs<string, Sto
|
|
|
39
39
|
export declare const _selectLatestFormRevision: (formRevisions: FormRevisionState["instances"], formId: string) => Stored<FormRevision>;
|
|
40
40
|
export declare const selectLatestFormRevisionOfForm: OvermapSelectorWithArgs<string, Stored<FormRevision> | undefined>;
|
|
41
41
|
export declare const selectFormRevisionsOfForm: OvermapSelectorWithArgs<string, Stored<FormRevision>[]>;
|
|
42
|
+
export declare const selectLatestFormRevisionByForm: OvermapSelector<Record<Stored<Form>["offline_id"], Stored<FormRevision>>>;
|
|
42
43
|
export declare const formRevisionReducer: Reducer<FormRevisionState>;
|
|
@@ -43,5 +43,9 @@ export declare const selectForms: ((state: OvermapRootState) => Stored<Form>[])
|
|
|
43
43
|
}> & {
|
|
44
44
|
clearCache: () => void;
|
|
45
45
|
};
|
|
46
|
-
export declare const selectFormById: OvermapSelectorWithArgs<string, Stored<Form> | undefined>;
|
|
47
46
|
export declare const selectFilteredForms: OvermapSelectorWithArgs<FormSearchArgs, Stored<Form>[]>;
|
|
47
|
+
export declare const selectFormById: OvermapSelectorWithArgs<string, Stored<Form> | undefined>;
|
|
48
|
+
export declare const selectFormOfAssetType: OvermapSelectorWithArgs<string, Stored<Form> | undefined>;
|
|
49
|
+
export declare const selectFormOfIssueType: OvermapSelectorWithArgs<string, Stored<Form> | undefined>;
|
|
50
|
+
export declare const selectFormsCount: OvermapSelector<number>;
|
|
51
|
+
export declare const selectGeneralFormCount: OvermapSelector<number>;
|
|
@@ -45,6 +45,12 @@ export declare const selectFormSubmissionsMapping: OvermapSelector<FormSubmissio
|
|
|
45
45
|
export declare const selectFormSubmissions: OvermapSelector<Stored<FormSubmission>[]>;
|
|
46
46
|
export declare const selectFormSubmissionById: OvermapSelectorWithArgs<string, Stored<FormSubmission> | undefined>;
|
|
47
47
|
export declare const selectFormSubmissionsOfForm: OvermapSelectorWithArgs<string, Stored<FormSubmission>[]>;
|
|
48
|
+
export declare const selectFormSubmissionsByFormRevisions: OvermapSelector<Record<string, Stored<FormSubmission>[]>>;
|
|
49
|
+
export declare const selectSortedFormSubmissionsOfForm: OvermapSelectorWithArgs<string, Stored<FormSubmission>[]>;
|
|
48
50
|
export declare const selectFormSubmissionsOfIssue: (args: string) => (state: OvermapRootState) => Stored<FormSubmission>[];
|
|
51
|
+
export declare const selectAttachedFormSubmissionsOfIssue: (args: string) => (state: OvermapRootState) => Stored<FormSubmission>[];
|
|
52
|
+
export declare const selectFormSubmissionsByIssues: OvermapSelectorWithArgs<string[], Record<string, Stored<FormSubmission>[]>>;
|
|
49
53
|
export declare const selectFormSubmissionsOfAsset: (args: string) => (state: OvermapRootState) => Stored<FormSubmission>[];
|
|
54
|
+
export declare const selectAttachedFormSubmissionsOfAsset: (args: string) => (state: OvermapRootState) => Stored<FormSubmission>[];
|
|
55
|
+
export declare const selectFormSubmissionsByAssets: OvermapSelector<Record<string, Stored<FormSubmission>[]>>;
|
|
50
56
|
export declare const formSubmissionReducer: Reducer<FormSubmissionState>;
|
|
@@ -36,11 +36,3 @@ export * from "./issueAttachmentSlice";
|
|
|
36
36
|
export * from "./versioningSlice";
|
|
37
37
|
export * from "./geoImageSlice";
|
|
38
38
|
export * from "./issueAssociationSlice";
|
|
39
|
-
export * from "./issueTypeFieldsSlice";
|
|
40
|
-
export * from "./issueTypeFieldValuesSlice";
|
|
41
|
-
export * from "./issueTypeFieldsAttachmentSlice";
|
|
42
|
-
export * from "./issueTypeFieldValuesAttachmentSlice";
|
|
43
|
-
export * from "./assetTypeFieldsSlice";
|
|
44
|
-
export * from "./assetTypeFieldValuesSlice";
|
|
45
|
-
export * from "./assetTypeFieldsAttachmentSlice";
|
|
46
|
-
export * from "./assetTypeFieldValuesAttachmentSlice";
|