@overmap-ai/core 1.0.75 → 1.0.77-store-typing-improvements.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/overmap-core.js +4731 -3705
- package/dist/overmap-core.umd.cjs +11 -11
- package/dist/sdk/base.d.ts +1 -1
- package/dist/sdk/globals.d.ts +1 -1
- package/dist/sdk/sdk.d.ts +1 -1
- package/dist/sdk/services/AgentService.d.ts +7 -6
- package/dist/sdk/services/AssetAttachmentService.d.ts +10 -9
- package/dist/sdk/services/AssetProcedureAttachmentService.d.ts +40 -0
- package/dist/sdk/services/AssetProcedureFieldValuesAttachmentService.d.ts +16 -0
- package/dist/sdk/services/AssetProcedureFieldValuesService.d.ts +22 -0
- package/dist/sdk/services/AssetProcedureFieldsAttachmentService.d.ts +13 -0
- package/dist/sdk/services/AssetProcedureFieldsService.d.ts +9 -0
- package/dist/sdk/services/AssetProcedureInstanceService.d.ts +11 -0
- package/dist/sdk/services/AssetProcedureService.d.ts +11 -0
- package/dist/sdk/services/AssetService.d.ts +6 -5
- package/dist/sdk/services/AssetStageCompletionService.d.ts +5 -4
- package/dist/sdk/services/AssetStageService.d.ts +7 -6
- package/dist/sdk/services/AssetTypeAttachmentService.d.ts +10 -9
- package/dist/sdk/services/AssetTypeFieldValuesAttachmentService.d.ts +5 -4
- package/dist/sdk/services/AssetTypeFieldValuesService.d.ts +10 -9
- package/dist/sdk/services/AssetTypeFieldsAttachmentService.d.ts +4 -3
- package/dist/sdk/services/AssetTypeFieldsService.d.ts +3 -2
- package/dist/sdk/services/AssetTypeService.d.ts +5 -4
- package/dist/sdk/services/BaseApiService.d.ts +1 -1
- package/dist/sdk/services/BaseAttachmentService.d.ts +13 -12
- package/dist/sdk/services/BaseAuthService.d.ts +1 -1
- package/dist/sdk/services/BaseService.d.ts +1 -1
- package/dist/sdk/services/BaseUploadService.d.ts +2 -1
- package/dist/sdk/services/CategoryService.d.ts +5 -4
- package/dist/sdk/services/DocumentAttachmentService.d.ts +10 -9
- package/dist/sdk/services/DocumentService.d.ts +6 -5
- package/dist/sdk/services/EmailDomainsService.d.ts +4 -3
- package/dist/sdk/services/EmailVerificationService.d.ts +2 -1
- package/dist/sdk/services/FileService.d.ts +1 -1
- package/dist/sdk/services/FormRevisionAttachmentService.d.ts +4 -3
- package/dist/sdk/services/FormRevisionService.d.ts +3 -2
- package/dist/sdk/services/FormService.d.ts +4 -12
- package/dist/sdk/services/FormSubmissionAttachmentService.d.ts +5 -4
- package/dist/sdk/services/FormSubmissionService.d.ts +5 -9
- package/dist/sdk/services/GeoImageService.d.ts +6 -5
- package/dist/sdk/services/IssueAssociationService.d.ts +4 -3
- package/dist/sdk/services/IssueAttachmentService.d.ts +10 -9
- package/dist/sdk/services/IssueCommentAttachmentService.d.ts +10 -9
- package/dist/sdk/services/IssueCommentService.d.ts +5 -4
- package/dist/sdk/services/IssueService.d.ts +5 -4
- package/dist/sdk/services/IssueTypeAttachmentService.d.ts +10 -9
- package/dist/sdk/services/IssueTypeFieldValuesAttachmentService.d.ts +5 -4
- package/dist/sdk/services/IssueTypeFieldValuesService.d.ts +5 -4
- package/dist/sdk/services/IssueTypeFieldsAttachmentService.d.ts +4 -3
- package/dist/sdk/services/IssueTypeFieldsService.d.ts +3 -2
- package/dist/sdk/services/IssueTypeService.d.ts +5 -4
- package/dist/sdk/services/IssueUpdateService.d.ts +3 -2
- package/dist/sdk/services/JWTAuthService.d.ts +1 -1
- package/dist/sdk/services/LicenseService.d.ts +3 -2
- package/dist/sdk/services/OrganizationAccessService.d.ts +3 -5
- package/dist/sdk/services/OrganizationService.d.ts +4 -3
- package/dist/sdk/services/ProjectAccessService.d.ts +4 -6
- package/dist/sdk/services/ProjectAttachmentService.d.ts +12 -11
- package/dist/sdk/services/ProjectFileService.d.ts +4 -3
- package/dist/sdk/services/ProjectService.d.ts +6 -5
- package/dist/sdk/services/TeamService.d.ts +8 -7
- package/dist/sdk/services/UserService.d.ts +3 -2
- package/dist/sdk/services/index.d.ts +7 -0
- package/dist/sdk/typings.d.ts +2 -1
- package/dist/store/adapters/index.d.ts +3 -0
- package/dist/store/adapters/modelAdapter.d.ts +15 -0
- package/dist/store/adapters/selectionAdapter.d.ts +13 -0
- package/dist/store/adapters/typings.d.ts +6 -0
- package/dist/store/constants.d.ts +2 -0
- package/dist/store/index.d.ts +4 -2
- package/dist/store/migrations.d.ts +1 -1
- package/dist/store/reducers.d.ts +181 -0
- package/dist/store/slices/agentsSlice.d.ts +11 -11
- package/dist/store/slices/assetAttachmentSlice.d.ts +23 -17
- package/dist/store/slices/assetProcedureAttachmentSlice.d.ts +48 -0
- package/dist/store/slices/assetProcedureFieldValuesAttachmentSlice.d.ts +126 -0
- package/dist/store/slices/assetProcedureFieldValuesSlice.d.ts +126 -0
- package/dist/store/slices/assetProcedureFieldsAttachmentSlice.d.ts +125 -0
- package/dist/store/slices/assetProcedureFieldsSlice.d.ts +126 -0
- package/dist/store/slices/assetProcedureInstanceSlice.d.ts +127 -0
- package/dist/store/slices/assetProcedureSlice.d.ts +126 -0
- package/dist/store/slices/assetSlice.d.ts +81 -18
- package/dist/store/slices/assetStageCompletionSlice.d.ts +80 -17
- package/dist/store/slices/assetStageSlice.d.ts +85 -22
- package/dist/store/slices/assetTypeAttachmentSlice.d.ts +23 -17
- package/dist/store/slices/assetTypeFieldValuesAttachmentSlice.d.ts +80 -17
- package/dist/store/slices/assetTypeFieldValuesSlice.d.ts +81 -18
- package/dist/store/slices/assetTypeFieldsAttachmentSlice.d.ts +80 -17
- package/dist/store/slices/assetTypeFieldsSlice.d.ts +94 -31
- package/dist/store/slices/assetTypeSlice.d.ts +21 -15
- package/dist/store/slices/authSlice.d.ts +4 -4
- package/dist/store/slices/categorySlice.d.ts +71 -11
- package/dist/store/slices/documentAttachmentSlice.d.ts +23 -17
- package/dist/store/slices/documentSlice.d.ts +64 -7
- package/dist/store/slices/emailDomainsSlice.d.ts +72 -12
- package/dist/store/slices/fileSlice.d.ts +3 -3
- package/dist/store/slices/formRevisionAttachmentSlice.d.ts +21 -15
- package/dist/store/slices/formRevisionSlice.d.ts +88 -25
- package/dist/store/slices/formSlice.d.ts +74 -18
- package/dist/store/slices/formSubmissionAttachmentSlice.d.ts +21 -15
- package/dist/store/slices/formSubmissionSlice.d.ts +22 -16
- package/dist/store/slices/geoImageSlice.d.ts +80 -17
- package/dist/store/slices/index.d.ts +7 -0
- package/dist/store/slices/issueAssociationSlice.d.ts +79 -16
- package/dist/store/slices/issueAttachmentSlice.d.ts +21 -15
- package/dist/store/slices/issueCommentAttachmentSlice.d.ts +23 -17
- package/dist/store/slices/issueCommentSlice.d.ts +18 -12
- package/dist/store/slices/issueSlice.d.ts +18 -12
- package/dist/store/slices/issueTypeAttachmentSlice.d.ts +23 -17
- package/dist/store/slices/issueTypeFieldValuesAttachmentSlice.d.ts +80 -17
- package/dist/store/slices/issueTypeFieldValuesSlice.d.ts +80 -17
- package/dist/store/slices/issueTypeFieldsAttachmentSlice.d.ts +80 -17
- package/dist/store/slices/issueTypeFieldsSlice.d.ts +95 -32
- package/dist/store/slices/issueTypeSlice.d.ts +18 -15
- package/dist/store/slices/issueUpdateSlice.d.ts +17 -11
- package/dist/store/slices/licenseSlice.d.ts +10 -10
- package/dist/store/slices/organizationAccessSlice.d.ts +13 -10
- package/dist/store/slices/organizationSlice.d.ts +105 -13
- package/dist/store/slices/outboxSlice.d.ts +3 -3
- package/dist/store/slices/projectAccessSlice.d.ts +16 -10
- package/dist/store/slices/projectAttachmentSlice.d.ts +22 -16
- package/dist/store/slices/projectFileSlice.d.ts +80 -17
- package/dist/store/slices/projectSlice.d.ts +102 -19
- package/dist/store/slices/rehydratedSlice.d.ts +3 -3
- package/dist/store/slices/teamSlice.d.ts +16 -13
- package/dist/store/slices/userSlice.d.ts +49 -11
- package/dist/store/slices/versioningSlice.d.ts +1 -2
- package/dist/store/store.d.ts +1 -55
- package/dist/store/typings.d.ts +14 -3
- package/dist/typings/index.d.ts +0 -1
- package/dist/typings/models/agents.d.ts +2 -2
- package/dist/typings/models/assets.d.ts +36 -13
- package/dist/typings/models/attachments.d.ts +6 -3
- package/dist/typings/models/base.d.ts +60 -15
- package/dist/typings/models/categories.d.ts +3 -3
- package/dist/typings/models/documents.d.ts +4 -4
- package/dist/typings/models/emailDomain.d.ts +3 -3
- package/dist/typings/models/emailVerification.d.ts +5 -5
- package/dist/typings/models/fields.d.ts +4 -4
- package/dist/typings/models/forms.d.ts +8 -9
- package/dist/typings/models/geoImages.d.ts +4 -4
- package/dist/typings/models/index.d.ts +0 -3
- package/dist/typings/models/issueTypes.d.ts +3 -3
- package/dist/typings/models/issues.d.ts +13 -53
- package/dist/typings/models/license.d.ts +3 -3
- package/dist/typings/models/organizations.d.ts +9 -3
- package/dist/typings/models/projects.d.ts +11 -6
- package/dist/typings/models/store.d.ts +0 -54
- package/dist/typings/models/teams.d.ts +4 -4
- package/dist/typings/models/users.d.ts +2 -4
- package/dist/utils/offline.d.ts +3 -3
- package/dist/utils/utils.d.ts +3 -2
- package/package.json +5 -5
- package/dist/store/adapter.d.ts +0 -15
- package/dist/typings/models/access.d.ts +0 -12
- package/dist/typings/models/geo.d.ts +0 -13
- package/dist/typings/store.d.ts +0 -7
|
@@ -1,59 +1,20 @@
|
|
|
1
|
-
import { BaseSerializedObject, ISerializedField } from '@overmap-ai/forms';
|
|
2
1
|
import { IssuePriority, IssueStatus, IssueUpdateChange } from '../../enums';
|
|
3
|
-
import { COMMON_AUTO_FIELDS } from '../../utils';
|
|
4
2
|
import { CSSColor } from '../colors';
|
|
5
|
-
import { CreatedByModel, IndexedModel,
|
|
3
|
+
import { CanvasMarkableModel, CreatedByModel, IndexedModel, MarkableModel, SubmittedAtModel, TimestampedModel, UUIDModel } from './base';
|
|
6
4
|
import { FieldsAttachmentModel, FieldsModel, FieldValuesModel } from './fields';
|
|
7
|
-
import { CanvasMarkableModel, MarkableModel } from './geo';
|
|
8
5
|
import { User } from './users';
|
|
9
|
-
|
|
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];
|
|
19
|
-
/**
|
|
20
|
-
* Represents a model instance that has been submitted to the backend. Some properties (depending on which model, but in
|
|
21
|
-
* all cases, the `offline_id`) are guaranteed to be set.
|
|
22
|
-
*/
|
|
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
|
-
}>>;
|
|
29
|
-
/**
|
|
30
|
-
* Represents a model instance that has been submitted to the backend, accepted, then downloaded. Created models
|
|
31
|
-
* typically have additional properties that are only known once it has been processed and accepted by the API, such as
|
|
32
|
-
* the `created_at` timestamp, which is the time at which the data was written to the database.
|
|
33
|
-
*/
|
|
34
|
-
export type Created<TModel> = TModel;
|
|
35
|
-
/**
|
|
36
|
-
* Model instances that are stored in the Redux store can be already-created (and will likely be gotten with the initial
|
|
37
|
-
* data load), or to-be-created. In the former case, you will get a `Created<TModel>`. In the latter case, you will get
|
|
38
|
-
* a `Submitted<TModel>`.
|
|
39
|
-
*/
|
|
40
|
-
export type Stored<TModel> = Created<TModel> | Submitted<TModel>;
|
|
41
|
-
/**
|
|
42
|
-
* Represents the properties you can always expect on any object representing an issue. These are the minimal details
|
|
43
|
-
* required when creating an issue.
|
|
44
|
-
*/
|
|
45
|
-
export interface Issue extends OfflineModel, SubmittedAtModel, CreatedByModel, MarkableModel, CanvasMarkableModel, IndexedModel {
|
|
6
|
+
export interface Issue extends UUIDModel, SubmittedAtModel, CreatedByModel, MarkableModel, CanvasMarkableModel, IndexedModel {
|
|
46
7
|
title?: string | null;
|
|
47
8
|
description?: string | null;
|
|
48
9
|
priority: IssuePriority;
|
|
49
10
|
status: IssueStatus;
|
|
50
|
-
assigned_to?:
|
|
11
|
+
assigned_to?: User["id"] | null;
|
|
51
12
|
due_date?: string | Date | null;
|
|
52
13
|
category?: string | null;
|
|
53
14
|
issue_type: string;
|
|
54
|
-
project:
|
|
15
|
+
project: string;
|
|
55
16
|
}
|
|
56
|
-
export interface IssueComment extends
|
|
17
|
+
export interface IssueComment extends UUIDModel, SubmittedAtModel, TimestampedModel {
|
|
57
18
|
issue: string;
|
|
58
19
|
content: string;
|
|
59
20
|
author?: number;
|
|
@@ -64,7 +25,7 @@ export interface IssueUpdateChangeTypes {
|
|
|
64
25
|
category: {
|
|
65
26
|
name: string;
|
|
66
27
|
color: CSSColor;
|
|
67
|
-
|
|
28
|
+
uuid: UUIDModel["uuid"];
|
|
68
29
|
} | null;
|
|
69
30
|
description: string;
|
|
70
31
|
title: string;
|
|
@@ -74,27 +35,26 @@ export interface IssueUpdateChangeTypes {
|
|
|
74
35
|
} | null;
|
|
75
36
|
due_date: string;
|
|
76
37
|
}
|
|
77
|
-
export interface IssueUpdate extends
|
|
38
|
+
export interface IssueUpdate extends UUIDModel, CreatedByModel {
|
|
78
39
|
submitted_at: string;
|
|
79
|
-
issue:
|
|
40
|
+
issue: UUIDModel["uuid"];
|
|
80
41
|
changes: Partial<Record<IssueUpdateChange, IssueUpdateChangeTypes[IssueUpdateChange]>>;
|
|
81
42
|
}
|
|
82
|
-
export interface IssueAssociation extends
|
|
43
|
+
export interface IssueAssociation extends UUIDModel, SubmittedAtModel, CreatedByModel {
|
|
83
44
|
associated_issue: string;
|
|
84
45
|
issue?: string;
|
|
85
46
|
asset?: string;
|
|
86
47
|
}
|
|
87
|
-
export interface IssueTypeFields
|
|
48
|
+
export interface IssueTypeFields extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel, FieldsModel {
|
|
88
49
|
issue_type: string;
|
|
89
50
|
}
|
|
90
|
-
export interface IssueTypeFieldsAttachment extends
|
|
51
|
+
export interface IssueTypeFieldsAttachment extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel, FieldsAttachmentModel {
|
|
91
52
|
fields_revision: string;
|
|
92
53
|
}
|
|
93
|
-
export interface IssueTypeFieldValues extends
|
|
54
|
+
export interface IssueTypeFieldValues extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel, FieldValuesModel {
|
|
94
55
|
fields_revision: string;
|
|
95
56
|
issue: string;
|
|
96
57
|
}
|
|
97
|
-
export interface IssueTypeFieldValuesAttachment extends
|
|
58
|
+
export interface IssueTypeFieldValuesAttachment extends UUIDModel, SubmittedAtModel, TimestampedModel, CreatedByModel, FieldsAttachmentModel {
|
|
98
59
|
field_values: string;
|
|
99
60
|
}
|
|
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,19 @@
|
|
|
1
|
+
import { ProjectAccessLevel } from '../../enums';
|
|
1
2
|
import { FileWithNameModel } from '../files';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export interface Project extends
|
|
5
|
-
id: number;
|
|
3
|
+
import { BoundableModel, CanvasBoundableModel, OwnedByOrganization, SubmittedAtModel, UUIDModel } from './base';
|
|
4
|
+
import { User } from './users';
|
|
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: Project["uuid"];
|
|
14
|
+
}
|
|
15
|
+
export interface ProjectAccess extends UUIDModel {
|
|
16
|
+
user: User["id"];
|
|
17
|
+
project: Project["uuid"];
|
|
18
|
+
access_level: ProjectAccessLevel;
|
|
14
19
|
}
|
|
@@ -1,54 +0,0 @@
|
|
|
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, 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
|
-
export interface BaseState {
|
|
4
|
-
outboxReducer: OutboxState;
|
|
5
|
-
offline: OfflineState;
|
|
6
|
-
fileReducer: FileState;
|
|
7
|
-
authReducer: AuthState;
|
|
8
|
-
}
|
|
9
|
-
export interface OvermapRootState extends BaseState {
|
|
10
|
-
[VERSION_REDUCER_KEY]: VersioningState;
|
|
11
|
-
categoryReducer: CategoryState;
|
|
12
|
-
assetReducer: AssetState;
|
|
13
|
-
assetAttachmentReducer: AssetAttachmentState;
|
|
14
|
-
assetStageCompletionReducer: AssetStageCompletionState;
|
|
15
|
-
assetStageReducer: AssetStageState;
|
|
16
|
-
assetTypeReducer: AssetTypeState;
|
|
17
|
-
assetTypeAttachmentReducer: AssetTypeAttachmentState;
|
|
18
|
-
issueReducer: IssueState;
|
|
19
|
-
issueAttachmentReducer: IssueAttachmentState;
|
|
20
|
-
issueCommentReducer: IssueCommentState;
|
|
21
|
-
issueCommentAttachmentReducer: IssueCommentAttachmentState;
|
|
22
|
-
issueUpdateReducer: IssueUpdateState;
|
|
23
|
-
issueTypeReducer: IssueTypeState;
|
|
24
|
-
issueTypeAttachmentReducer: IssueTypeAttachmentState;
|
|
25
|
-
organizationReducer: OrganizationState;
|
|
26
|
-
projectReducer: ProjectState;
|
|
27
|
-
projectAttachmentReducer: ProjectAttachmentState;
|
|
28
|
-
projectAccessReducer: ProjectAccessState;
|
|
29
|
-
organizationAccessReducer: OrganizationAccessState;
|
|
30
|
-
projectFileReducer: ProjectFileState;
|
|
31
|
-
rehydratedReducer: RehydratedState;
|
|
32
|
-
formReducer: FormState;
|
|
33
|
-
formRevisionReducer: FormRevisionState;
|
|
34
|
-
formRevisionAttachmentReducer: FormRevisionAttachmentState;
|
|
35
|
-
formSubmissionReducer: FormSubmissionState;
|
|
36
|
-
formSubmissionAttachmentReducer: FormSubmissionAttachmentState;
|
|
37
|
-
userReducer: UserState;
|
|
38
|
-
emailDomainsReducer: EmailDomainState;
|
|
39
|
-
licenseReducer: LicenseState;
|
|
40
|
-
documentsReducer: DocumentState;
|
|
41
|
-
documentAttachmentReducer: DocumentAttachmentState;
|
|
42
|
-
teamReducer: TeamState;
|
|
43
|
-
agentsReducer: AgentsState;
|
|
44
|
-
geoImageReducer: GeoImageSliceState;
|
|
45
|
-
issueAssociationReducer: IssueAssociationSliceState;
|
|
46
|
-
issueTypeFieldsReducer: IssueTypeFieldsState;
|
|
47
|
-
issueTypeFieldValuesReducer: IssueTypeFieldValuesState;
|
|
48
|
-
issueTypeFieldsAttachmentReducer: IssueTypeFieldsAttachmentState;
|
|
49
|
-
issueTypeFieldValuesAttachmentReducer: IssueTypeFieldValuesAttachmentState;
|
|
50
|
-
assetTypeFieldsReducer: AssetTypeFieldsState;
|
|
51
|
-
assetTypeFieldValuesReducer: AssetTypeFieldValuesState;
|
|
52
|
-
assetTypeFieldsAttachmentReducer: AssetTypeFieldsAttachmentState;
|
|
53
|
-
assetTypeFieldValuesAttachmentReducer: AssetTypeFieldValuesAttachmentState;
|
|
54
|
-
}
|
|
@@ -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,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UUID, UUIDModel } from '../typings';
|
|
2
2
|
export declare const COMMON_AUTO_FIELDS: readonly ["created_at", "updated_at", "index", "revision"];
|
|
3
3
|
/**
|
|
4
4
|
* Adds a generated UUID to the "offline_id" key of the object.
|
|
5
5
|
* @param draft The model data to add the offline_id to
|
|
6
6
|
*/
|
|
7
|
-
export declare function offline<T>(draft: T):
|
|
7
|
+
export declare function offline<T>(draft: T): UUID<T>;
|
|
8
8
|
/**
|
|
9
9
|
* Converts an array of OfflineModel objects to a Record<string, TModel>, mapping an offline ID to the object with that
|
|
10
10
|
* offline ID.
|
|
11
11
|
* @param array An array of offline model instances
|
|
12
12
|
*/
|
|
13
|
-
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 {
|
|
1
|
+
import { OvermapRootState } from '../store';
|
|
2
|
+
import { IssueAttachment, UUIDModel } from '../typings';
|
|
2
3
|
type MemoizedSelectorWithArgs<TArgs, TRet> = (state: OvermapRootState, args: TArgs) => TRet;
|
|
3
4
|
export declare const restructureCreateSelectorWithArgs: <TArgs, TRet>(selector: MemoizedSelectorWithArgs<TArgs, TRet>) => (args: TArgs) => (state: OvermapRootState) => TRet;
|
|
4
|
-
export declare function onlyUniqueOfflineIds(value:
|
|
5
|
+
export declare function onlyUniqueOfflineIds(value: UUIDModel, index: number, self: UUIDModel[]): boolean;
|
|
5
6
|
export declare function onlyUniqueHashes(value: IssueAttachment, index: number, self: IssueAttachment[]): boolean;
|
|
6
7
|
export declare const emailRegex: RegExp;
|
|
7
8
|
export declare function createPayload<TPayload extends object>(payload: TPayload): TPayload;
|
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.
|
|
6
|
+
"version": "1.0.77-store-typing-improvements.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-react-flow-david-fixes.6",
|
|
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-react-flow-david-fixes.6",
|
|
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,12 +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
|
-
}
|
|
8
|
-
export interface OrganizationAccess extends OfflineModel {
|
|
9
|
-
user: number;
|
|
10
|
-
organization: number;
|
|
11
|
-
access_level: OrganizationAccessLevel;
|
|
12
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { MultiPoint, Point } from 'geojson';
|
|
2
|
-
export interface BoundableModel {
|
|
3
|
-
bounds?: MultiPoint;
|
|
4
|
-
}
|
|
5
|
-
export interface CanvasBoundableModel {
|
|
6
|
-
canvas_bounds?: MultiPoint;
|
|
7
|
-
}
|
|
8
|
-
export interface MarkableModel {
|
|
9
|
-
geo_marker?: Point;
|
|
10
|
-
}
|
|
11
|
-
export interface CanvasMarkableModel {
|
|
12
|
-
canvas_marker?: Point;
|
|
13
|
-
}
|
package/dist/typings/store.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { OvermapRootState } from './models';
|
|
2
|
-
export type SelectorWithArgs<TState, TArgs, TRet> = (args: TArgs) => (state: TState) => TRet;
|
|
3
|
-
export type Selector<TState, TRet> = (state: TState) => TRet;
|
|
4
|
-
export type OvermapSelectorWithArgs<TArgs, TRet> = SelectorWithArgs<OvermapRootState, TArgs, TRet>;
|
|
5
|
-
export type OvermapSelector<TRet> = Selector<OvermapRootState, TRet>;
|
|
6
|
-
export type Migrator = (state: Partial<OvermapRootState>) => Partial<OvermapRootState>;
|
|
7
|
-
export type Manifest = Record<number, Migrator>;
|