@overmap-ai/core 1.0.74-remove-workspaces.0 → 1.0.74-standardizations.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/enums/access.d.ts +6 -4
- package/dist/overmap-core.js +4692 -3633
- package/dist/overmap-core.umd.cjs +9 -9
- package/dist/sdk/services/AgentService.d.ts +6 -6
- package/dist/sdk/services/AssetAttachmentService.d.ts +9 -9
- 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 +9 -9
- 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 +9 -9
- package/dist/sdk/services/DocumentService.d.ts +5 -5
- package/dist/sdk/services/EmailDomainsService.d.ts +3 -3
- 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 +10 -9
- 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/LicenseService.d.ts +2 -2
- package/dist/sdk/services/OrganizationAccessService.d.ts +2 -5
- package/dist/sdk/services/OrganizationService.d.ts +3 -3
- package/dist/sdk/services/ProjectAccessService.d.ts +3 -6
- package/dist/sdk/services/ProjectAttachmentService.d.ts +11 -11
- 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 -0
- package/dist/store/adapters/index.d.ts +2 -0
- package/dist/store/adapters/modelAdapter.d.ts +15 -0
- package/dist/store/adapters/selectionAdapter.d.ts +13 -0
- package/dist/store/index.d.ts +1 -1
- package/dist/store/slices/agentsSlice.d.ts +8 -9
- package/dist/store/slices/assetAttachmentSlice.d.ts +20 -19
- package/dist/store/slices/assetProcedureFieldValuesAttachmentSlice.d.ts +68 -0
- package/dist/store/slices/assetProcedureFieldValuesSlice.d.ts +68 -0
- package/dist/store/slices/assetProcedureFieldsAttachmentSlice.d.ts +67 -0
- package/dist/store/slices/assetProcedureFieldsSlice.d.ts +68 -0
- package/dist/store/slices/assetProcedureInstanceSlice.d.ts +69 -0
- package/dist/store/slices/assetProcedureSlice.d.ts +68 -0
- package/dist/store/slices/assetSlice.d.ts +21 -16
- package/dist/store/slices/assetStageCompletionSlice.d.ts +29 -24
- package/dist/store/slices/assetStageSlice.d.ts +29 -24
- package/dist/store/slices/assetTypeAttachmentSlice.d.ts +20 -19
- package/dist/store/slices/assetTypeFieldValuesAttachmentSlice.d.ts +20 -15
- package/dist/store/slices/assetTypeFieldValuesSlice.d.ts +21 -16
- package/dist/store/slices/assetTypeFieldsAttachmentSlice.d.ts +20 -15
- package/dist/store/slices/assetTypeFieldsSlice.d.ts +21 -16
- package/dist/store/slices/assetTypeSlice.d.ts +20 -15
- package/dist/store/slices/authSlice.d.ts +3 -3
- package/dist/store/slices/categorySlice.d.ts +10 -8
- package/dist/store/slices/documentAttachmentSlice.d.ts +20 -19
- package/dist/store/slices/documentSlice.d.ts +4 -5
- package/dist/store/slices/emailDomainsSlice.d.ts +15 -13
- package/dist/store/slices/fileSlice.d.ts +2 -2
- package/dist/store/slices/formRevisionAttachmentSlice.d.ts +19 -14
- package/dist/store/slices/formRevisionSlice.d.ts +18 -14
- package/dist/store/slices/formSlice.d.ts +14 -17
- package/dist/store/slices/formSubmissionAttachmentSlice.d.ts +19 -14
- package/dist/store/slices/formSubmissionSlice.d.ts +20 -15
- package/dist/store/slices/geoImageSlice.d.ts +28 -23
- package/dist/store/slices/index.d.ts +8 -0
- package/dist/store/slices/issueAssociationSlice.d.ts +18 -13
- package/dist/store/slices/issueAttachmentSlice.d.ts +18 -17
- package/dist/store/slices/issueCommentAttachmentSlice.d.ts +47 -0
- package/dist/store/slices/issueCommentSlice.d.ts +15 -10
- package/dist/store/slices/issueSlice.d.ts +15 -10
- package/dist/store/slices/issueTypeAttachmentSlice.d.ts +47 -0
- package/dist/store/slices/issueTypeFieldValuesAttachmentSlice.d.ts +20 -15
- package/dist/store/slices/issueTypeFieldValuesSlice.d.ts +20 -15
- package/dist/store/slices/issueTypeFieldsAttachmentSlice.d.ts +20 -15
- package/dist/store/slices/issueTypeFieldsSlice.d.ts +22 -17
- package/dist/store/slices/issueTypeSlice.d.ts +15 -13
- package/dist/store/slices/issueUpdateSlice.d.ts +14 -9
- package/dist/store/slices/licenseSlice.d.ts +12 -13
- package/dist/store/slices/organizationAccessSlice.d.ts +15 -13
- package/dist/store/slices/organizationSlice.d.ts +45 -11
- package/dist/store/slices/outboxSlice.d.ts +2 -2
- package/dist/store/slices/projectAccessSlice.d.ts +17 -12
- package/dist/store/slices/projectAttachmentSlice.d.ts +19 -18
- package/dist/store/slices/projectFileSlice.d.ts +19 -14
- package/dist/store/slices/projectSlice.d.ts +61 -15
- package/dist/store/slices/rehydratedSlice.d.ts +2 -2
- package/dist/store/slices/teamSlice.d.ts +13 -11
- package/dist/store/slices/userSlice.d.ts +47 -10
- package/dist/store/slices/versioningSlice.d.ts +1 -2
- package/dist/store/store.d.ts +53 -46
- package/dist/store/typings.d.ts +5 -2
- 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 +18 -13
- 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 -1
- package/dist/typings/models/issueTypes.d.ts +3 -3
- package/dist/typings/models/issues.d.ts +33 -45
- package/dist/typings/models/license.d.ts +3 -3
- package/dist/typings/models/organizations.d.ts +9 -3
- package/dist/typings/models/projects.d.ts +11 -5
- package/dist/typings/models/store.d.ts +9 -1
- package/dist/typings/models/teams.d.ts +4 -4
- package/dist/typings/models/users.d.ts +2 -4
- package/dist/utils/offline.d.ts +4 -3
- package/dist/utils/utils.d.ts +3 -2
- package/package.json +5 -5
- package/dist/store/adapter.d.ts +0 -15
- package/dist/typings/models/access.d.ts +0 -13
|
@@ -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,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,58 +42,29 @@ 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?: User["id"] | 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
59
|
author?: number;
|
|
65
60
|
}
|
|
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>;
|
|
72
|
-
}
|
|
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;
|
|
@@ -87,26 +74,27 @@ export interface IssueUpdateChangeTypes {
|
|
|
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,10 +1,10 @@
|
|
|
1
1
|
import { LicenseLevel, LicenseStatus } from '../../enums';
|
|
2
|
-
import {
|
|
2
|
+
import { OwnedByOrganization, UUIDModel } from './base';
|
|
3
3
|
export interface Transaction {
|
|
4
4
|
id: string;
|
|
5
5
|
}
|
|
6
|
-
export interface License extends
|
|
7
|
-
project:
|
|
6
|
+
export interface License extends UUIDModel, OwnedByOrganization {
|
|
7
|
+
project: string | null;
|
|
8
8
|
level: LicenseLevel;
|
|
9
9
|
status: LicenseStatus;
|
|
10
10
|
is_special: boolean;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { OrganizationAccessLevel } from '../../enums';
|
|
2
|
+
import { CreatedByModel, UUIDModel } from './base';
|
|
3
|
+
import { User } from './users';
|
|
4
|
+
export interface Organization extends UUIDModel, CreatedByModel {
|
|
4
5
|
name: string;
|
|
5
6
|
has_access: boolean;
|
|
6
7
|
}
|
|
8
|
+
export interface OrganizationAccess extends UUIDModel {
|
|
9
|
+
user: User["id"];
|
|
10
|
+
organization: string;
|
|
11
|
+
access_level: OrganizationAccessLevel;
|
|
12
|
+
}
|
|
@@ -1,14 +1,20 @@
|
|
|
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
|
-
|
|
5
|
-
|
|
5
|
+
import { User } from './users';
|
|
6
|
+
export interface Project extends UUIDModel, BoundableModel, CanvasBoundableModel, OwnedByOrganization {
|
|
6
7
|
name: string;
|
|
7
8
|
invited?: boolean;
|
|
8
9
|
issues_count?: number;
|
|
9
10
|
form_submissions_count?: number;
|
|
10
11
|
}
|
|
11
|
-
export interface ProjectFile extends
|
|
12
|
+
export interface ProjectFile extends UUIDModel, SubmittedAtModel, FileWithNameModel, BoundableModel, CanvasBoundableModel {
|
|
12
13
|
z_index: number;
|
|
13
|
-
project:
|
|
14
|
+
project: Project["uuid"];
|
|
15
|
+
}
|
|
16
|
+
export interface ProjectAccess extends UUIDModel {
|
|
17
|
+
user: User["id"];
|
|
18
|
+
project: Project["uuid"];
|
|
19
|
+
access_level: ProjectAccessLevel;
|
|
14
20
|
}
|
|
@@ -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, EmailDomainState, FileState, FormRevisionAttachmentState, FormRevisionState, FormState, FormSubmissionAttachmentState, FormSubmissionState, GeoImageSliceState, IssueAssociationSliceState, IssueAttachmentState, IssueCommentState, IssueState, IssueTypeFieldsAttachmentState, IssueTypeFieldsState, IssueTypeFieldValuesAttachmentState, IssueTypeFieldValuesState, IssueTypeState, IssueUpdateState, LicenseState, OrganizationAccessState, OrganizationState, OutboxState, ProjectAccessState, ProjectAttachmentState, ProjectFileState, ProjectState, RehydratedState, TeamState, UserState, VERSION_REDUCER_KEY, VersioningState } from '../../store';
|
|
2
|
+
import { AgentsState, AssetAttachmentState, AssetProcedureFieldsAttachmentState, AssetProcedureFieldsState, AssetProcedureFieldValuesAttachmentState, AssetProcedureFieldValuesState, AssetProcedureInstanceState, AssetProcedureState, AssetStageCompletionState, AssetStageState, AssetState, AssetTypeAttachmentState, AssetTypeFieldsAttachmentState, AssetTypeFieldsState, AssetTypeFieldValuesAttachmentState, AssetTypeFieldValuesState, AssetTypeState, AuthState, CategoryState, DocumentAttachmentState, DocumentState, EmailDomainState, FileState, FormRevisionAttachmentState, FormRevisionState, FormState, FormSubmissionAttachmentState, FormSubmissionState, GeoImageSliceState, IssueAssociationSliceState, IssueAttachmentState, IssueCommentAttachmentState, IssueCommentState, IssueState, IssueTypeAttachmentState, IssueTypeFieldsAttachmentState, IssueTypeFieldsState, IssueTypeFieldValuesAttachmentState, IssueTypeFieldValuesState, IssueTypeState, IssueUpdateState, LicenseState, 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;
|
|
@@ -49,4 +51,10 @@ export interface OvermapRootState extends BaseState {
|
|
|
49
51
|
assetTypeFieldValuesReducer: AssetTypeFieldValuesState;
|
|
50
52
|
assetTypeFieldsAttachmentReducer: AssetTypeFieldsAttachmentState;
|
|
51
53
|
assetTypeFieldValuesAttachmentReducer: AssetTypeFieldValuesAttachmentState;
|
|
54
|
+
assetProcedureReducer: AssetProcedureState;
|
|
55
|
+
assetProcedureInstanceReducer: AssetProcedureInstanceState;
|
|
56
|
+
assetProcedureFieldsReducer: AssetProcedureFieldsState;
|
|
57
|
+
assetProcedureFieldValuesReducer: AssetProcedureFieldValuesState;
|
|
58
|
+
assetProcedureFieldsAttachmentReducer: AssetProcedureFieldsAttachmentState;
|
|
59
|
+
assetProcedureFieldValuesAttachmentReducer: AssetProcedureFieldValuesAttachmentState;
|
|
52
60
|
}
|
|
@@ -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["
|
|
6
|
+
parent: Team["uuid"] | null;
|
|
7
|
+
organization: Organization["uuid"];
|
|
8
8
|
members: User["id"][];
|
|
9
9
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { OptionalFileModel } from './base';
|
|
1
|
+
import { IdModel, OptionalFileModel } from './base';
|
|
2
2
|
export interface Profile extends OptionalFileModel {
|
|
3
|
-
favourite_project_ids: number[];
|
|
4
3
|
tour_step: number;
|
|
5
4
|
}
|
|
6
|
-
export interface User {
|
|
7
|
-
id: number;
|
|
5
|
+
export interface User extends IdModel {
|
|
8
6
|
username: string;
|
|
9
7
|
email: string;
|
|
10
8
|
profile: Profile;
|
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 {};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Core functionality for Overmap",
|
|
4
4
|
"author": "Wôrdn Inc.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
|
-
"version": "1.0.74-
|
|
6
|
+
"version": "1.0.74-standardizations.0",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/overmap-core.umd.cjs",
|
|
9
9
|
"module": "dist/overmap-core.js",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"yarn": "^1.22.22"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@overmap-ai/blocks": "
|
|
39
|
-
"@overmap-ai/forms": "1.0.
|
|
38
|
+
"@overmap-ai/blocks": "1.0.40-alpha.1",
|
|
39
|
+
"@overmap-ai/forms": "1.0.32-lucide-icons.1",
|
|
40
40
|
"@rollup/plugin-commonjs": "^28.0.6",
|
|
41
41
|
"@tiptap/core": "^3.0.7",
|
|
42
42
|
"@types/add": "^2",
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
"vitest": "3.2.4"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
|
-
"@overmap-ai/blocks": "
|
|
81
|
-
"@overmap-ai/forms": "1.0.
|
|
80
|
+
"@overmap-ai/blocks": "1.0.40-alpha.1",
|
|
81
|
+
"@overmap-ai/forms": "1.0.32-lucide-icons.1",
|
|
82
82
|
"@tiptap/core": "^2.4.0",
|
|
83
83
|
"react": ">=18.2.0 <20.0.0",
|
|
84
84
|
"react-dom": ">=18.2.0 <20.0.0"
|
package/dist/store/adapter.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { PayloadAction } from '@reduxjs/toolkit';
|
|
2
|
-
import { ModelState } from './typings';
|
|
3
|
-
export interface OvermapModelAdapter<TModel> {
|
|
4
|
-
addOne: (state: ModelState<TModel>, action: PayloadAction<TModel>) => void;
|
|
5
|
-
addMany: (state: ModelState<TModel>, action: PayloadAction<TModel[]>) => void;
|
|
6
|
-
setOne: (state: ModelState<TModel>, action: PayloadAction<TModel>) => void;
|
|
7
|
-
setMany: (state: ModelState<TModel>, action: PayloadAction<TModel[]>) => void;
|
|
8
|
-
updateOne: (state: ModelState<TModel>, action: PayloadAction<TModel>) => void;
|
|
9
|
-
updateMany: (state: ModelState<TModel>, action: PayloadAction<TModel[]>) => void;
|
|
10
|
-
deleteOne: (state: ModelState<TModel>, action: PayloadAction<string>) => void;
|
|
11
|
-
deleteMany: (state: ModelState<TModel>, action: PayloadAction<string[]>) => void;
|
|
12
|
-
initialize: (state: ModelState<TModel>, action: PayloadAction<TModel[]>) => void;
|
|
13
|
-
getInitialState: <TState extends object>(state: TState) => TState & ModelState<TModel>;
|
|
14
|
-
}
|
|
15
|
-
export declare function createModelAdapter<TModel>(computeModelId: (model: TModel) => string): OvermapModelAdapter<TModel>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { OrganizationAccessLevel, ProjectAccessLevel } from '../../enums';
|
|
2
|
-
import { OfflineModel } from './base';
|
|
3
|
-
export interface ProjectAccess extends OfflineModel {
|
|
4
|
-
user: number;
|
|
5
|
-
project: number;
|
|
6
|
-
access_level: ProjectAccessLevel;
|
|
7
|
-
view_only: boolean;
|
|
8
|
-
}
|
|
9
|
-
export interface OrganizationAccess extends OfflineModel {
|
|
10
|
-
user: number;
|
|
11
|
-
organization: number;
|
|
12
|
-
access_level: OrganizationAccessLevel;
|
|
13
|
-
}
|