@overmap-ai/core 1.0.74-document-fix.0 → 1.0.74-gcs.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/enums/access.d.ts +6 -4
- package/dist/overmap-core.js +4328 -3553
- package/dist/overmap-core.umd.cjs +11 -11
- package/dist/sdk/services/AgentService.d.ts +6 -6
- package/dist/sdk/services/AssetAttachmentService.d.ts +10 -10
- package/dist/sdk/services/AssetProcedureFieldValuesAttachmentService.d.ts +15 -0
- package/dist/sdk/services/AssetProcedureFieldValuesService.d.ts +21 -0
- package/dist/sdk/services/AssetProcedureFieldsAttachmentService.d.ts +12 -0
- package/dist/sdk/services/AssetProcedureFieldsService.d.ts +8 -0
- package/dist/sdk/services/AssetProcedureInstanceService.d.ts +10 -0
- package/dist/sdk/services/AssetProcedureService.d.ts +10 -0
- package/dist/sdk/services/AssetService.d.ts +5 -5
- package/dist/sdk/services/AssetStageCompletionService.d.ts +4 -4
- package/dist/sdk/services/AssetStageService.d.ts +6 -6
- package/dist/sdk/services/AssetTypeAttachmentService.d.ts +10 -10
- package/dist/sdk/services/AssetTypeFieldValuesAttachmentService.d.ts +4 -4
- package/dist/sdk/services/AssetTypeFieldValuesService.d.ts +6 -6
- package/dist/sdk/services/AssetTypeFieldsAttachmentService.d.ts +3 -3
- package/dist/sdk/services/AssetTypeFieldsService.d.ts +2 -2
- package/dist/sdk/services/AssetTypeService.d.ts +4 -4
- package/dist/sdk/services/BaseAttachmentService.d.ts +14 -14
- package/dist/sdk/services/CategoryService.d.ts +4 -4
- package/dist/sdk/services/DocumentAttachmentService.d.ts +10 -10
- package/dist/sdk/services/DocumentService.d.ts +5 -5
- package/dist/sdk/services/FormRevisionAttachmentService.d.ts +3 -3
- package/dist/sdk/services/FormRevisionService.d.ts +2 -2
- package/dist/sdk/services/FormService.d.ts +3 -3
- package/dist/sdk/services/FormSubmissionAttachmentService.d.ts +4 -4
- package/dist/sdk/services/FormSubmissionService.d.ts +4 -4
- package/dist/sdk/services/GeoImageService.d.ts +5 -5
- package/dist/sdk/services/IssueAssociationService.d.ts +3 -3
- package/dist/sdk/services/IssueAttachmentService.d.ts +11 -10
- package/dist/sdk/services/IssueCommentAttachmentService.d.ts +40 -0
- package/dist/sdk/services/IssueCommentService.d.ts +4 -4
- package/dist/sdk/services/IssueService.d.ts +4 -4
- package/dist/sdk/services/IssueTypeAttachmentService.d.ts +40 -0
- package/dist/sdk/services/IssueTypeFieldValuesAttachmentService.d.ts +4 -4
- package/dist/sdk/services/IssueTypeFieldValuesService.d.ts +4 -4
- package/dist/sdk/services/IssueTypeFieldsAttachmentService.d.ts +3 -3
- package/dist/sdk/services/IssueTypeFieldsService.d.ts +2 -2
- package/dist/sdk/services/IssueTypeService.d.ts +4 -4
- package/dist/sdk/services/IssueUpdateService.d.ts +2 -2
- package/dist/sdk/services/OrganizationAccessService.d.ts +2 -2
- package/dist/sdk/services/OrganizationService.d.ts +3 -3
- package/dist/sdk/services/ProjectAccessService.d.ts +3 -3
- package/dist/sdk/services/ProjectAttachmentService.d.ts +12 -12
- package/dist/sdk/services/ProjectFileService.d.ts +3 -3
- package/dist/sdk/services/ProjectService.d.ts +5 -5
- package/dist/sdk/services/TeamService.d.ts +7 -7
- package/dist/sdk/services/UserService.d.ts +2 -2
- package/dist/sdk/services/index.d.ts +8 -2
- package/dist/store/slices/agentsSlice.d.ts +3 -4
- package/dist/store/slices/assetAttachmentSlice.d.ts +4 -9
- package/dist/store/slices/assetProcedureFieldValuesAttachmentSlice.d.ts +62 -0
- package/dist/store/slices/assetProcedureFieldValuesSlice.d.ts +62 -0
- package/dist/store/slices/assetProcedureFieldsAttachmentSlice.d.ts +61 -0
- package/dist/store/slices/assetProcedureFieldsSlice.d.ts +62 -0
- package/dist/store/slices/assetProcedureInstanceSlice.d.ts +63 -0
- package/dist/store/slices/assetProcedureSlice.d.ts +62 -0
- package/dist/store/slices/assetSlice.d.ts +5 -6
- package/dist/store/slices/assetStageCompletionSlice.d.ts +23 -24
- package/dist/store/slices/assetStageSlice.d.ts +13 -14
- package/dist/store/slices/assetTypeAttachmentSlice.d.ts +4 -9
- package/dist/store/slices/assetTypeFieldValuesAttachmentSlice.d.ts +4 -5
- package/dist/store/slices/assetTypeFieldValuesSlice.d.ts +5 -6
- package/dist/store/slices/assetTypeFieldsAttachmentSlice.d.ts +4 -5
- package/dist/store/slices/assetTypeFieldsSlice.d.ts +5 -6
- package/dist/store/slices/assetTypeSlice.d.ts +4 -5
- package/dist/store/slices/authSlice.d.ts +3 -3
- package/dist/store/slices/categorySlice.d.ts +2 -3
- package/dist/store/slices/documentAttachmentSlice.d.ts +4 -9
- package/dist/store/slices/documentSlice.d.ts +4 -5
- package/dist/store/slices/fileSlice.d.ts +2 -2
- package/dist/store/slices/formRevisionAttachmentSlice.d.ts +3 -4
- package/dist/store/slices/formRevisionSlice.d.ts +5 -7
- package/dist/store/slices/formSlice.d.ts +4 -10
- package/dist/store/slices/formSubmissionAttachmentSlice.d.ts +3 -4
- package/dist/store/slices/formSubmissionSlice.d.ts +4 -5
- package/dist/store/slices/geoImageSlice.d.ts +21 -22
- package/dist/store/slices/index.d.ts +8 -2
- package/dist/store/slices/issueAssociationSlice.d.ts +2 -3
- package/dist/store/slices/issueAttachmentSlice.d.ts +2 -7
- package/dist/store/slices/issueCommentAttachmentSlice.d.ts +41 -0
- package/dist/store/slices/issueCommentSlice.d.ts +2 -3
- package/dist/store/slices/issueSlice.d.ts +2 -3
- package/dist/store/slices/issueTypeAttachmentSlice.d.ts +41 -0
- package/dist/store/slices/issueTypeFieldValuesAttachmentSlice.d.ts +4 -5
- package/dist/store/slices/issueTypeFieldValuesSlice.d.ts +4 -5
- package/dist/store/slices/issueTypeFieldsAttachmentSlice.d.ts +4 -5
- package/dist/store/slices/issueTypeFieldsSlice.d.ts +6 -7
- package/dist/store/slices/issueTypeSlice.d.ts +6 -7
- package/dist/store/slices/issueUpdateSlice.d.ts +1 -2
- package/dist/store/slices/organizationAccessSlice.d.ts +12 -13
- package/dist/store/slices/organizationSlice.d.ts +39 -12
- package/dist/store/slices/outboxSlice.d.ts +2 -2
- package/dist/store/slices/projectAccessSlice.d.ts +11 -12
- package/dist/store/slices/projectAttachmentSlice.d.ts +3 -8
- package/dist/store/slices/projectFileSlice.d.ts +3 -4
- package/dist/store/slices/projectSlice.d.ts +55 -15
- package/dist/store/slices/rehydratedSlice.d.ts +2 -2
- package/dist/store/slices/teamSlice.d.ts +5 -6
- package/dist/store/slices/userSlice.d.ts +39 -18
- package/dist/store/slices/versioningSlice.d.ts +1 -2
- package/dist/store/store.d.ts +51 -46
- package/dist/typings/models/agents.d.ts +2 -2
- package/dist/typings/models/assets.d.ts +36 -12
- package/dist/typings/models/attachments.d.ts +9 -3
- package/dist/typings/models/base.d.ts +16 -14
- 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 +1 -1
- package/dist/typings/models/forms.d.ts +8 -8
- package/dist/typings/models/geoImages.d.ts +5 -4
- package/dist/typings/models/index.d.ts +0 -2
- package/dist/typings/models/issueTypes.d.ts +3 -3
- package/dist/typings/models/issues.d.ts +35 -47
- package/dist/typings/models/organizations.d.ts +8 -3
- package/dist/typings/models/projects.d.ts +10 -5
- package/dist/typings/models/store.d.ts +9 -3
- package/dist/typings/models/teams.d.ts +5 -5
- package/dist/typings/models/users.d.ts +8 -9
- package/dist/utils/offline.d.ts +4 -3
- package/dist/utils/utils.d.ts +3 -2
- package/package.json +5 -5
- package/dist/sdk/services/EmailDomainsService.d.ts +0 -8
- package/dist/sdk/services/LicenseService.d.ts +0 -13
- package/dist/store/slices/emailDomainsSlice.d.ts +0 -40
- package/dist/store/slices/licenseSlice.d.ts +0 -25
- package/dist/typings/models/access.d.ts +0 -13
- package/dist/typings/models/license.d.ts +0 -13
|
@@ -1,40 +1,64 @@
|
|
|
1
1
|
import { BaseSerializedObject, ISerializedField } from '@overmap-ai/forms';
|
|
2
|
-
import { ColorModel, CreatedByModel, IconModel,
|
|
2
|
+
import { ColorModel, CreatedByModel, IconModel, IndexedModel, SubmittedAtModel, TimestampedModel, UUIDModel } from './base';
|
|
3
3
|
import { FieldsAttachmentModel, FieldsModel, FieldValuesModel } from './fields';
|
|
4
4
|
import { CanvasMarkableModel, MarkableModel } from './geo';
|
|
5
|
-
export interface Asset extends
|
|
5
|
+
export interface Asset extends UUIDModel, TimestampedModel, SubmittedAtModel, CreatedByModel, MarkableModel, CanvasMarkableModel, IndexedModel {
|
|
6
6
|
asset_type: string;
|
|
7
|
-
created_at?: string;
|
|
8
7
|
label: string | null;
|
|
9
8
|
description?: string;
|
|
10
|
-
project:
|
|
9
|
+
project: string;
|
|
11
10
|
}
|
|
12
|
-
export interface AssetType extends
|
|
13
|
-
organization:
|
|
11
|
+
export interface AssetType extends UUIDModel, TimestampedModel, SubmittedAtModel, CreatedByModel, IconModel, ColorModel {
|
|
12
|
+
organization: string;
|
|
14
13
|
name?: string;
|
|
15
14
|
description?: string;
|
|
16
15
|
}
|
|
17
|
-
export interface
|
|
16
|
+
export interface AssetProcedure extends UUIDModel, TimestampedModel, SubmittedAtModel, CreatedByModel, IconModel, ColorModel {
|
|
17
|
+
organization: string;
|
|
18
|
+
name?: string | null;
|
|
19
|
+
description?: string | null;
|
|
20
|
+
}
|
|
21
|
+
export interface AssetProcedureInstance extends UUIDModel, TimestampedModel, SubmittedAtModel, CreatedByModel, IndexedModel {
|
|
22
|
+
asset_procedure: string;
|
|
18
23
|
asset_type: string;
|
|
24
|
+
project: string;
|
|
25
|
+
}
|
|
26
|
+
export interface AssetStage extends UUIDModel, TimestampedModel, SubmittedAtModel, CreatedByModel, ColorModel {
|
|
27
|
+
asset_procedure: string;
|
|
19
28
|
name?: string | null;
|
|
20
29
|
description?: string | null;
|
|
21
30
|
priority: number;
|
|
22
31
|
}
|
|
23
|
-
export interface AssetStageCompletion extends
|
|
32
|
+
export interface AssetStageCompletion extends UUIDModel, TimestampedModel, SubmittedAtModel, CreatedByModel {
|
|
24
33
|
asset: string;
|
|
25
34
|
stage: string;
|
|
35
|
+
asset_procedure_instance: string;
|
|
26
36
|
}
|
|
27
37
|
export type CompletedStagesMapping = Record<string, Record<string, string>>;
|
|
28
|
-
export interface AssetTypeFields<TFields extends BaseSerializedObject = ISerializedField> extends
|
|
38
|
+
export interface AssetTypeFields<TFields extends BaseSerializedObject = ISerializedField> extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel, FieldsModel<TFields> {
|
|
29
39
|
asset_type: string;
|
|
30
40
|
}
|
|
31
|
-
export interface AssetTypeFieldsAttachment extends
|
|
41
|
+
export interface AssetTypeFieldsAttachment extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel, FieldsAttachmentModel {
|
|
42
|
+
fields_revision: string;
|
|
43
|
+
}
|
|
44
|
+
export interface AssetTypeFieldValues extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel, FieldValuesModel {
|
|
45
|
+
fields_revision: string;
|
|
46
|
+
asset: string;
|
|
47
|
+
}
|
|
48
|
+
export interface AssetTypeFieldValuesAttachment extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel, FieldsAttachmentModel {
|
|
49
|
+
field_values: string;
|
|
50
|
+
}
|
|
51
|
+
export interface AssetProcedureFields<TFields extends BaseSerializedObject = ISerializedField> extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel, FieldsModel<TFields> {
|
|
52
|
+
asset_procedure: string;
|
|
53
|
+
}
|
|
54
|
+
export interface AssetProcedureFieldsAttachment extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel, FieldsAttachmentModel {
|
|
32
55
|
fields_revision: string;
|
|
33
56
|
}
|
|
34
|
-
export interface
|
|
57
|
+
export interface AssetProcedureFieldValues extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel, FieldValuesModel {
|
|
35
58
|
fields_revision: string;
|
|
59
|
+
asset_procedure_instance: string;
|
|
36
60
|
asset: string;
|
|
37
61
|
}
|
|
38
|
-
export interface
|
|
62
|
+
export interface AssetProcedureFieldValuesAttachment extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel, FieldsAttachmentModel {
|
|
39
63
|
field_values: string;
|
|
40
64
|
}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import { FileModel, FileWithNameModel } from '../files';
|
|
2
|
-
import { CreatedByModel,
|
|
3
|
-
export interface Attachment extends
|
|
2
|
+
import { CreatedByModel, SubmittedAtModel, UUIDModel } from './base';
|
|
3
|
+
export interface Attachment extends UUIDModel, SubmittedAtModel, FileWithNameModel, CreatedByModel {
|
|
4
4
|
description?: string;
|
|
5
5
|
file_type: string;
|
|
6
6
|
}
|
|
7
7
|
export interface IssueAttachment extends Attachment {
|
|
8
8
|
issue: string;
|
|
9
9
|
}
|
|
10
|
+
export interface IssueTypeAttachment extends Attachment {
|
|
11
|
+
issue_type: string;
|
|
12
|
+
}
|
|
13
|
+
export interface IssueCommentAttachment extends Attachment {
|
|
14
|
+
issue_comment: string;
|
|
15
|
+
}
|
|
10
16
|
export interface AssetAttachment extends Attachment {
|
|
11
17
|
asset: string;
|
|
12
18
|
}
|
|
@@ -14,7 +20,7 @@ export interface AssetTypeAttachment extends Attachment {
|
|
|
14
20
|
asset_type: string;
|
|
15
21
|
}
|
|
16
22
|
export interface ProjectAttachment extends Attachment {
|
|
17
|
-
project:
|
|
23
|
+
project: string;
|
|
18
24
|
}
|
|
19
25
|
export interface DocumentAttachment extends Attachment {
|
|
20
26
|
document: string;
|
|
@@ -1,25 +1,24 @@
|
|
|
1
|
+
import { IconType } from '@overmap-ai/blocks';
|
|
1
2
|
import { CSSColor } from '../colors';
|
|
3
|
+
import { CommonAutoFields } from './issues';
|
|
2
4
|
import { User } from './users';
|
|
3
5
|
export interface Model {
|
|
4
6
|
}
|
|
5
|
-
export interface
|
|
6
|
-
|
|
7
|
+
export interface UUIDModel extends Model {
|
|
8
|
+
uuid: string;
|
|
7
9
|
}
|
|
8
10
|
export interface SubmittedAtModel extends Model {
|
|
9
11
|
submitted_at: string;
|
|
10
12
|
}
|
|
11
13
|
export interface TimestampedModel extends Model {
|
|
12
|
-
created_at
|
|
13
|
-
updated_at
|
|
14
|
+
created_at: string;
|
|
15
|
+
updated_at: string;
|
|
14
16
|
}
|
|
15
|
-
export type
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
export type OfflineIdMapping<TModel extends OfflineModel> = Record<TModel["offline_id"], TModel>;
|
|
19
|
-
export type Payload<TModel> = Omit<TModel, "offline_id" | "created_at" | "updated_at" | "id" | "submitted_at" | "created_by">;
|
|
20
|
-
export type MaybePayload<TModel extends OfflineModel> = Payload<TModel> & {
|
|
21
|
-
offline_id?: string | null;
|
|
17
|
+
export type UUID<T> = T & {
|
|
18
|
+
uuid: string;
|
|
22
19
|
};
|
|
20
|
+
export type UUIDModelMapping<TModel extends UUIDModel> = Record<TModel["uuid"], TModel>;
|
|
21
|
+
export type Payload<TModel> = Omit<TModel, CommonAutoFields | "uuid" | "id" | "submitted_at" | "created_by">;
|
|
23
22
|
export interface FileObject {
|
|
24
23
|
file_sha1: string;
|
|
25
24
|
file: string;
|
|
@@ -31,14 +30,17 @@ export interface OptionalFileModel {
|
|
|
31
30
|
objectURL?: string;
|
|
32
31
|
}
|
|
33
32
|
export interface OwnedByOrganization {
|
|
34
|
-
organization_owner:
|
|
33
|
+
organization_owner: string;
|
|
35
34
|
}
|
|
36
35
|
export interface IconModel {
|
|
37
|
-
icon:
|
|
36
|
+
icon: IconType;
|
|
38
37
|
}
|
|
39
38
|
export interface ColorModel {
|
|
40
39
|
color: CSSColor;
|
|
41
40
|
}
|
|
42
41
|
export interface CreatedByModel {
|
|
43
|
-
created_by?: User["
|
|
42
|
+
created_by?: User["uuid"] | null;
|
|
43
|
+
}
|
|
44
|
+
export interface IndexedModel {
|
|
45
|
+
index: number;
|
|
44
46
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CSSColor } from '../colors';
|
|
2
|
-
import { CreatedByModel,
|
|
3
|
-
export interface Category extends
|
|
2
|
+
import { CreatedByModel, SubmittedAtModel, TimestampedModel, UUIDModel } from './base';
|
|
3
|
+
export interface Category extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel {
|
|
4
4
|
name: string;
|
|
5
5
|
description?: string;
|
|
6
6
|
color: CSSColor;
|
|
7
|
-
project:
|
|
7
|
+
project: string;
|
|
8
8
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ColorModel, CreatedByModel, IconModel,
|
|
2
|
-
export interface Document extends
|
|
1
|
+
import { ColorModel, CreatedByModel, IconModel, SubmittedAtModel, TimestampedModel, UUIDModel } from './base';
|
|
2
|
+
export interface Document extends UUIDModel, SubmittedAtModel, CreatedByModel, TimestampedModel, IconModel, ColorModel {
|
|
3
3
|
title: string | null;
|
|
4
4
|
description: string | null;
|
|
5
5
|
content: string | null;
|
|
6
6
|
parent_document: string | null;
|
|
7
7
|
children_documents: string[];
|
|
8
|
-
project?:
|
|
9
|
-
organization?:
|
|
8
|
+
project?: string;
|
|
9
|
+
organization?: string;
|
|
10
10
|
}
|
|
11
11
|
export type MovePosition = "left" | "right" | "left-child" | "right-child";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UUIDModel } from './base';
|
|
2
2
|
import { RegistrationPayload } from './users';
|
|
3
3
|
export type EmailVerificationPayload = undefined | RegistrationPayload | Omit<RegistrationPayload, "username" | "email">;
|
|
4
4
|
export interface EmailVerificationReturn {
|
|
5
5
|
username?: string;
|
|
6
|
-
project?:
|
|
6
|
+
project?: string;
|
|
7
7
|
}
|
|
8
8
|
export declare enum VerificationCodeType {
|
|
9
9
|
USER_REGISTRATION = 0,
|
|
@@ -13,10 +13,10 @@ export declare enum VerificationCodeType {
|
|
|
13
13
|
ADD_EMAIL_DOMAIN = 8,
|
|
14
14
|
RESET_PASSWORD = 10
|
|
15
15
|
}
|
|
16
|
-
export interface VerificationCode extends
|
|
16
|
+
export interface VerificationCode extends UUIDModel {
|
|
17
17
|
verification_code: string;
|
|
18
18
|
verification_type: VerificationCodeType;
|
|
19
19
|
organization?: number;
|
|
20
|
-
project?:
|
|
21
|
-
user?:
|
|
20
|
+
project?: string;
|
|
21
|
+
user?: string;
|
|
22
22
|
}
|
|
@@ -2,7 +2,7 @@ import { BaseSerializedObject, FieldValue, ISerializedField } from '@overmap-ai/
|
|
|
2
2
|
import { FileWithNameModel } from '../files';
|
|
3
3
|
export interface FieldsModel<TFields extends BaseSerializedObject = ISerializedField> {
|
|
4
4
|
fields: TFields[];
|
|
5
|
-
revision: number
|
|
5
|
+
revision: number;
|
|
6
6
|
}
|
|
7
7
|
export interface FieldValuesModel {
|
|
8
8
|
published_at?: string | null;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { BaseSerializedObject, ISerializedField } from '@overmap-ai/forms';
|
|
2
|
-
import { CreatedByModel,
|
|
2
|
+
import { CreatedByModel, IndexedModel, Payload, SubmittedAtModel, TimestampedModel, UUIDModel } from './base';
|
|
3
3
|
import { FieldsAttachmentModel, FieldsModel, FieldValuesAttachmentModel, FieldValuesModel } from './fields';
|
|
4
|
-
export interface Form extends
|
|
5
|
-
organization:
|
|
4
|
+
export interface Form extends UUIDModel, SubmittedAtModel, CreatedByModel {
|
|
5
|
+
organization: string;
|
|
6
6
|
}
|
|
7
|
-
export interface FormRevision<TFields extends BaseSerializedObject = ISerializedField> extends
|
|
7
|
+
export interface FormRevision<TFields extends BaseSerializedObject = ISerializedField> extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel, FieldsModel<TFields> {
|
|
8
8
|
form: string;
|
|
9
9
|
title: string;
|
|
10
10
|
description?: string;
|
|
11
11
|
}
|
|
12
12
|
export type FormRevisionPayload = Omit<Payload<FormRevision>, "revision">;
|
|
13
|
-
export interface FormSubmission extends
|
|
13
|
+
export interface FormSubmission extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel, FieldValuesModel, IndexedModel {
|
|
14
14
|
form_revision: string;
|
|
15
|
-
project:
|
|
15
|
+
project: string;
|
|
16
16
|
issue?: string | null;
|
|
17
17
|
asset?: string | null;
|
|
18
18
|
}
|
|
19
|
-
export interface FormSubmissionAttachment extends FieldValuesAttachmentModel {
|
|
19
|
+
export interface FormSubmissionAttachment extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel, FieldValuesAttachmentModel {
|
|
20
20
|
form_submission: string;
|
|
21
21
|
}
|
|
22
|
-
export interface FormRevisionAttachment extends FieldsAttachmentModel {
|
|
22
|
+
export interface FormRevisionAttachment extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel, FieldsAttachmentModel {
|
|
23
23
|
form_revision: string;
|
|
24
24
|
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { FileWithNameModel } from '../files';
|
|
2
|
-
import { CreatedByModel,
|
|
2
|
+
import { CreatedByModel, IndexedModel, Payload, SubmittedAtModel, UUIDModel } from './base';
|
|
3
3
|
import { CanvasMarkableModel, MarkableModel } from './geo';
|
|
4
|
-
|
|
4
|
+
import { Project } from './projects';
|
|
5
|
+
export interface GeoImage extends UUIDModel, SubmittedAtModel, CreatedByModel, MarkableModel, CanvasMarkableModel, FileWithNameModel, IndexedModel {
|
|
5
6
|
title?: string;
|
|
6
7
|
description?: string;
|
|
7
|
-
project:
|
|
8
|
+
project: Project["uuid"];
|
|
8
9
|
direction?: number;
|
|
9
10
|
original_date?: string;
|
|
10
11
|
}
|
|
11
|
-
export type GeoImagePayload = Omit<GeoImage
|
|
12
|
+
export type GeoImagePayload = Omit<Payload<GeoImage>, "file_name" | "file_sha1" | "file"> & {
|
|
12
13
|
file: File;
|
|
13
14
|
};
|
|
14
15
|
export type BulkGeoImagePayload = Omit<GeoImagePayload, "project">;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export * from './access';
|
|
2
1
|
export * from './agents';
|
|
3
2
|
export * from './assets';
|
|
4
3
|
export * from './attachments';
|
|
@@ -13,7 +12,6 @@ export * from './geo';
|
|
|
13
12
|
export * from './geoImages';
|
|
14
13
|
export * from './issues';
|
|
15
14
|
export * from './issueTypes';
|
|
16
|
-
export * from './license';
|
|
17
15
|
export * from './organizations';
|
|
18
16
|
export * from './projects';
|
|
19
17
|
export * from './store';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ColorModel, CreatedByModel, IconModel,
|
|
1
|
+
import { ColorModel, CreatedByModel, IconModel, SubmittedAtModel, UUIDModel } from './base';
|
|
2
2
|
import { Organization } from './organizations';
|
|
3
|
-
export interface IssueType extends
|
|
3
|
+
export interface IssueType extends UUIDModel, SubmittedAtModel, IconModel, ColorModel, CreatedByModel {
|
|
4
4
|
name?: string;
|
|
5
5
|
description?: string;
|
|
6
|
-
organization: Organization["
|
|
6
|
+
organization: Organization["uuid"];
|
|
7
7
|
}
|
|
@@ -1,21 +1,37 @@
|
|
|
1
1
|
import { BaseSerializedObject, ISerializedField } from '@overmap-ai/forms';
|
|
2
2
|
import { IssuePriority, IssueStatus, IssueUpdateChange } from '../../enums';
|
|
3
|
+
import { COMMON_AUTO_FIELDS } from '../../utils';
|
|
3
4
|
import { CSSColor } from '../colors';
|
|
4
|
-
import { CreatedByModel,
|
|
5
|
+
import { CreatedByModel, IndexedModel, SubmittedAtModel, TimestampedModel, UUIDModel } from './base';
|
|
5
6
|
import { FieldsAttachmentModel, FieldsModel, FieldValuesModel } from './fields';
|
|
6
7
|
import { CanvasMarkableModel, MarkableModel } from './geo';
|
|
7
8
|
import { User } from './users';
|
|
9
|
+
type FilteredKeys<T> = {
|
|
10
|
+
[P in keyof T]: T[P] extends never ? never : P;
|
|
11
|
+
}[keyof T];
|
|
12
|
+
type ExcludeNeverFields<O> = {
|
|
13
|
+
[K in FilteredKeys<O>]: O[K];
|
|
14
|
+
};
|
|
15
|
+
type PropertyUndefined<T> = {
|
|
16
|
+
[P in keyof T]?: T[P];
|
|
17
|
+
};
|
|
18
|
+
export type CommonAutoFields = (typeof COMMON_AUTO_FIELDS)[number];
|
|
8
19
|
/**
|
|
9
20
|
* Represents a model instance that has been submitted to the backend. Some properties (depending on which model, but in
|
|
10
21
|
* all cases, the `offline_id`) are guaranteed to be set.
|
|
11
22
|
*/
|
|
12
|
-
export type Submitted<TModel> =
|
|
23
|
+
export type Submitted<TModel> = Omit<TModel, CommonAutoFields> & PropertyUndefined<ExcludeNeverFields<{
|
|
24
|
+
created_at: "created_at" extends keyof TModel ? undefined : never;
|
|
25
|
+
updated_at: "updated_at" extends keyof TModel ? undefined : never;
|
|
26
|
+
index: "index" extends keyof TModel ? undefined : never;
|
|
27
|
+
revision: "revision" extends keyof TModel ? undefined : never;
|
|
28
|
+
}>>;
|
|
13
29
|
/**
|
|
14
30
|
* Represents a model instance that has been submitted to the backend, accepted, then downloaded. Created models
|
|
15
31
|
* typically have additional properties that are only known once it has been processed and accepted by the API, such as
|
|
16
32
|
* the `created_at` timestamp, which is the time at which the data was written to the database.
|
|
17
33
|
*/
|
|
18
|
-
export type Created<TModel> =
|
|
34
|
+
export type Created<TModel> = TModel;
|
|
19
35
|
/**
|
|
20
36
|
* Model instances that are stored in the Redux store can be already-created (and will likely be gotten with the initial
|
|
21
37
|
* data load), or to-be-created. In the former case, you will get a `Created<TModel>`. In the latter case, you will get
|
|
@@ -26,87 +42,59 @@ export type Stored<TModel> = Created<TModel> | Submitted<TModel>;
|
|
|
26
42
|
* Represents the properties you can always expect on any object representing an issue. These are the minimal details
|
|
27
43
|
* required when creating an issue.
|
|
28
44
|
*/
|
|
29
|
-
export interface Issue extends
|
|
45
|
+
export interface Issue extends UUIDModel, SubmittedAtModel, CreatedByModel, MarkableModel, CanvasMarkableModel, IndexedModel {
|
|
30
46
|
title?: string | null;
|
|
31
47
|
description?: string | null;
|
|
32
48
|
priority: IssuePriority;
|
|
33
49
|
status: IssueStatus;
|
|
34
|
-
assigned_to?:
|
|
50
|
+
assigned_to?: string | null;
|
|
35
51
|
due_date?: string | Date | null;
|
|
36
52
|
category?: string | null;
|
|
37
|
-
issue_type
|
|
38
|
-
project:
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* These details need to be provided by the frontend code before submitting to the backend.
|
|
42
|
-
*/
|
|
43
|
-
export interface SubmittedIssue extends OfflineModel, CreatedByModel {
|
|
44
|
-
submitted_at: string;
|
|
45
|
-
status: Exclude<Issue["status"], undefined>;
|
|
46
|
-
priority: Exclude<Issue["priority"], undefined>;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* These details exist on issues that have been successfully submitted, accepted, created, and serialized by the
|
|
50
|
-
* backend, then downloaded by the frontend.
|
|
51
|
-
*/
|
|
52
|
-
export interface CreatedIssue extends Issue {
|
|
53
|
-
title: Exclude<Issue["title"], undefined>;
|
|
54
|
-
description: Exclude<Issue["description"], undefined>;
|
|
55
|
-
assigned_to: Exclude<Issue["assigned_to"], undefined>;
|
|
56
|
-
due_date: Exclude<Issue["due_date"], undefined>;
|
|
57
|
-
category: Exclude<Issue["category"], undefined>;
|
|
58
|
-
geo_marker: Exclude<Issue["geo_marker"], undefined>;
|
|
59
|
-
created_at: string;
|
|
53
|
+
issue_type: string;
|
|
54
|
+
project: string;
|
|
60
55
|
}
|
|
61
|
-
export interface IssueComment extends
|
|
56
|
+
export interface IssueComment extends UUIDModel, SubmittedAtModel, TimestampedModel {
|
|
62
57
|
issue: string;
|
|
63
58
|
content: string;
|
|
64
|
-
author?:
|
|
65
|
-
}
|
|
66
|
-
export interface SubmittedIssueComment {
|
|
67
|
-
created_at: Exclude<IssueComment["created_at"], undefined>;
|
|
68
|
-
}
|
|
69
|
-
export interface CreatedIssueComment {
|
|
70
|
-
author: Exclude<IssueComment["author"], undefined>;
|
|
71
|
-
created_at: Exclude<IssueComment["created_at"], undefined>;
|
|
59
|
+
author?: string;
|
|
72
60
|
}
|
|
73
|
-
export type IssueCommentPayload = Omit<IssueComment, "author" | "created_at" | "offline_id">;
|
|
74
61
|
export interface IssueUpdateChangeTypes {
|
|
75
62
|
status: IssueStatus;
|
|
76
63
|
priority: IssuePriority;
|
|
77
64
|
category: {
|
|
78
65
|
name: string;
|
|
79
66
|
color: CSSColor;
|
|
80
|
-
|
|
67
|
+
uuid: UUIDModel["uuid"];
|
|
81
68
|
} | null;
|
|
82
69
|
description: string;
|
|
83
70
|
title: string;
|
|
84
71
|
assigned_to: {
|
|
85
72
|
full_name: string;
|
|
86
|
-
|
|
73
|
+
uuid: User["uuid"];
|
|
87
74
|
} | null;
|
|
88
75
|
due_date: string;
|
|
89
76
|
}
|
|
90
|
-
export interface IssueUpdate extends
|
|
77
|
+
export interface IssueUpdate extends UUIDModel, CreatedByModel {
|
|
91
78
|
submitted_at: string;
|
|
92
|
-
issue:
|
|
79
|
+
issue: UUIDModel["uuid"];
|
|
93
80
|
changes: Partial<Record<IssueUpdateChange, IssueUpdateChangeTypes[IssueUpdateChange]>>;
|
|
94
81
|
}
|
|
95
|
-
export interface IssueAssociation extends
|
|
82
|
+
export interface IssueAssociation extends UUIDModel, SubmittedAtModel, CreatedByModel {
|
|
96
83
|
associated_issue: string;
|
|
97
84
|
issue?: string;
|
|
98
85
|
asset?: string;
|
|
99
86
|
}
|
|
100
|
-
export interface IssueTypeFields<TFields extends BaseSerializedObject = ISerializedField> extends
|
|
87
|
+
export interface IssueTypeFields<TFields extends BaseSerializedObject = ISerializedField> extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel, FieldsModel<TFields> {
|
|
101
88
|
issue_type: string;
|
|
102
89
|
}
|
|
103
|
-
export interface IssueTypeFieldsAttachment extends
|
|
90
|
+
export interface IssueTypeFieldsAttachment extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel, FieldsAttachmentModel {
|
|
104
91
|
fields_revision: string;
|
|
105
92
|
}
|
|
106
|
-
export interface IssueTypeFieldValues extends
|
|
93
|
+
export interface IssueTypeFieldValues extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel, FieldValuesModel {
|
|
107
94
|
fields_revision: string;
|
|
108
95
|
issue: string;
|
|
109
96
|
}
|
|
110
|
-
export interface IssueTypeFieldValuesAttachment extends
|
|
97
|
+
export interface IssueTypeFieldValuesAttachment extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel, FieldsAttachmentModel {
|
|
111
98
|
field_values: string;
|
|
112
99
|
}
|
|
100
|
+
export {};
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { OrganizationAccessLevel } from '../../enums';
|
|
2
|
+
import { CreatedByModel, UUIDModel } from './base';
|
|
3
|
+
export interface Organization extends UUIDModel, CreatedByModel {
|
|
4
4
|
name: string;
|
|
5
5
|
has_access: boolean;
|
|
6
6
|
}
|
|
7
|
+
export interface OrganizationAccess extends UUIDModel {
|
|
8
|
+
user: string;
|
|
9
|
+
organization: string;
|
|
10
|
+
access_level: OrganizationAccessLevel;
|
|
11
|
+
}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
+
import { ProjectAccessLevel } from '../../enums';
|
|
1
2
|
import { FileWithNameModel } from '../files';
|
|
2
|
-
import {
|
|
3
|
+
import { OwnedByOrganization, SubmittedAtModel, UUIDModel } from './base';
|
|
3
4
|
import { BoundableModel, CanvasBoundableModel } from './geo';
|
|
4
|
-
export interface Project extends
|
|
5
|
-
id: number;
|
|
5
|
+
export interface Project extends UUIDModel, BoundableModel, CanvasBoundableModel, OwnedByOrganization {
|
|
6
6
|
name: string;
|
|
7
7
|
invited?: boolean;
|
|
8
8
|
issues_count?: number;
|
|
9
9
|
form_submissions_count?: number;
|
|
10
10
|
}
|
|
11
|
-
export interface ProjectFile extends
|
|
11
|
+
export interface ProjectFile extends UUIDModel, SubmittedAtModel, FileWithNameModel, BoundableModel, CanvasBoundableModel {
|
|
12
12
|
z_index: number;
|
|
13
|
-
project:
|
|
13
|
+
project: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ProjectAccess extends UUIDModel {
|
|
16
|
+
user: string;
|
|
17
|
+
project: string;
|
|
18
|
+
access_level: ProjectAccessLevel;
|
|
14
19
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OfflineState } from '@redux-offline/redux-offline/lib/types';
|
|
2
|
-
import { AgentsState, AssetAttachmentState, AssetStageCompletionState, AssetStageState, AssetState, AssetTypeAttachmentState, AssetTypeFieldsAttachmentState, AssetTypeFieldsState, AssetTypeFieldValuesAttachmentState, AssetTypeFieldValuesState, AssetTypeState, AuthState, CategoryState, DocumentAttachmentState, DocumentState,
|
|
2
|
+
import { AgentsState, AssetAttachmentState, AssetProcedureFieldsAttachmentState, AssetProcedureFieldsState, AssetProcedureFieldValuesAttachmentState, AssetProcedureFieldValuesState, AssetProcedureInstanceState, AssetProcedureState, AssetStageCompletionState, AssetStageState, AssetState, AssetTypeAttachmentState, AssetTypeFieldsAttachmentState, AssetTypeFieldsState, AssetTypeFieldValuesAttachmentState, AssetTypeFieldValuesState, AssetTypeState, AuthState, CategoryState, DocumentAttachmentState, DocumentState, FileState, FormRevisionAttachmentState, FormRevisionState, FormState, FormSubmissionAttachmentState, FormSubmissionState, GeoImageSliceState, IssueAssociationSliceState, IssueAttachmentState, IssueCommentAttachmentState, IssueCommentState, IssueState, IssueTypeAttachmentState, IssueTypeFieldsAttachmentState, IssueTypeFieldsState, IssueTypeFieldValuesAttachmentState, IssueTypeFieldValuesState, IssueTypeState, IssueUpdateState, OrganizationAccessState, OrganizationState, OutboxState, ProjectAccessState, ProjectAttachmentState, ProjectFileState, ProjectState, RehydratedState, TeamState, UserState, VERSION_REDUCER_KEY, VersioningState } from '../../store';
|
|
3
3
|
export interface BaseState {
|
|
4
4
|
outboxReducer: OutboxState;
|
|
5
5
|
offline: OfflineState;
|
|
@@ -18,8 +18,10 @@ export interface OvermapRootState extends BaseState {
|
|
|
18
18
|
issueReducer: IssueState;
|
|
19
19
|
issueAttachmentReducer: IssueAttachmentState;
|
|
20
20
|
issueCommentReducer: IssueCommentState;
|
|
21
|
+
issueCommentAttachmentReducer: IssueCommentAttachmentState;
|
|
21
22
|
issueUpdateReducer: IssueUpdateState;
|
|
22
23
|
issueTypeReducer: IssueTypeState;
|
|
24
|
+
issueTypeAttachmentReducer: IssueTypeAttachmentState;
|
|
23
25
|
organizationReducer: OrganizationState;
|
|
24
26
|
projectReducer: ProjectState;
|
|
25
27
|
projectAttachmentReducer: ProjectAttachmentState;
|
|
@@ -33,8 +35,6 @@ export interface OvermapRootState extends BaseState {
|
|
|
33
35
|
formSubmissionReducer: FormSubmissionState;
|
|
34
36
|
formSubmissionAttachmentReducer: FormSubmissionAttachmentState;
|
|
35
37
|
userReducer: UserState;
|
|
36
|
-
emailDomainsReducer: EmailDomainState;
|
|
37
|
-
licenseReducer: LicenseState;
|
|
38
38
|
documentsReducer: DocumentState;
|
|
39
39
|
documentAttachmentReducer: DocumentAttachmentState;
|
|
40
40
|
teamReducer: TeamState;
|
|
@@ -49,4 +49,10 @@ export interface OvermapRootState extends BaseState {
|
|
|
49
49
|
assetTypeFieldValuesReducer: AssetTypeFieldValuesState;
|
|
50
50
|
assetTypeFieldsAttachmentReducer: AssetTypeFieldsAttachmentState;
|
|
51
51
|
assetTypeFieldValuesAttachmentReducer: AssetTypeFieldValuesAttachmentState;
|
|
52
|
+
assetProcedureReducer: AssetProcedureState;
|
|
53
|
+
assetProcedureInstanceReducer: AssetProcedureInstanceState;
|
|
54
|
+
assetProcedureFieldsReducer: AssetProcedureFieldsState;
|
|
55
|
+
assetProcedureFieldValuesReducer: AssetProcedureFieldValuesState;
|
|
56
|
+
assetProcedureFieldsAttachmentReducer: AssetProcedureFieldsAttachmentState;
|
|
57
|
+
assetProcedureFieldValuesAttachmentReducer: AssetProcedureFieldValuesAttachmentState;
|
|
52
58
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ColorModel, IconModel,
|
|
1
|
+
import { ColorModel, IconModel, SubmittedAtModel, UUIDModel } from './base';
|
|
2
2
|
import { Organization } from './organizations';
|
|
3
3
|
import { User } from './users';
|
|
4
|
-
export interface Team extends
|
|
4
|
+
export interface Team extends UUIDModel, SubmittedAtModel, IconModel, ColorModel {
|
|
5
5
|
name: string;
|
|
6
|
-
parent:
|
|
7
|
-
organization: Organization["
|
|
8
|
-
members: User["
|
|
6
|
+
parent: UUIDModel["uuid"] | null;
|
|
7
|
+
organization: Organization["uuid"];
|
|
8
|
+
members: User["uuid"][];
|
|
9
9
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export interface User {
|
|
7
|
-
id: number;
|
|
8
|
-
username: string;
|
|
1
|
+
import { UUIDModel } from './base';
|
|
2
|
+
export interface User extends UUIDModel {
|
|
3
|
+
uuid: string;
|
|
4
|
+
first_name: string;
|
|
5
|
+
last_name: string;
|
|
9
6
|
email: string;
|
|
10
|
-
|
|
7
|
+
is_staff: boolean;
|
|
8
|
+
is_active: boolean;
|
|
9
|
+
date_joined: string;
|
|
11
10
|
}
|
|
12
11
|
export interface RegistrationPayload {
|
|
13
12
|
username: string;
|
package/dist/utils/offline.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UUID, UUIDModel } from '../typings';
|
|
2
|
+
export declare const COMMON_AUTO_FIELDS: readonly ["created_at", "updated_at", "index", "revision"];
|
|
2
3
|
/**
|
|
3
4
|
* Adds a generated UUID to the "offline_id" key of the object.
|
|
4
5
|
* @param draft The model data to add the offline_id to
|
|
5
6
|
*/
|
|
6
|
-
export declare function offline<T>(draft: T):
|
|
7
|
+
export declare function offline<T>(draft: T): UUID<T>;
|
|
7
8
|
/**
|
|
8
9
|
* Converts an array of OfflineModel objects to a Record<string, TModel>, mapping an offline ID to the object with that
|
|
9
10
|
* offline ID.
|
|
10
11
|
* @param array An array of offline model instances
|
|
11
12
|
*/
|
|
12
|
-
export declare function toOfflineIdRecord<TModel extends
|
|
13
|
+
export declare function toOfflineIdRecord<TModel extends UUIDModel>(array: TModel[]): Record<string, TModel>;
|
package/dist/utils/utils.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { IssueAttachment,
|
|
1
|
+
import { IssueAttachment, OvermapRootState, UUIDModel } from '../typings';
|
|
2
2
|
type MemoizedSelectorWithArgs<TArgs, TRet> = (state: OvermapRootState, args: TArgs) => TRet;
|
|
3
3
|
export declare const restructureCreateSelectorWithArgs: <TArgs, TRet>(selector: MemoizedSelectorWithArgs<TArgs, TRet>) => (args: TArgs) => (state: OvermapRootState) => TRet;
|
|
4
|
-
export declare function onlyUniqueOfflineIds(value:
|
|
4
|
+
export declare function onlyUniqueOfflineIds(value: UUIDModel, index: number, self: UUIDModel[]): boolean;
|
|
5
5
|
export declare function onlyUniqueHashes(value: IssueAttachment, index: number, self: IssueAttachment[]): boolean;
|
|
6
6
|
export declare const emailRegex: RegExp;
|
|
7
|
+
export declare function createPayload<TPayload extends object>(payload: TPayload): TPayload;
|
|
7
8
|
export {};
|