@overmap-ai/core 1.0.73 → 1.0.74-model-indexes.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.
@@ -42,4 +42,3 @@ export * from './ProjectFileService';
42
42
  export * from './ProjectService';
43
43
  export * from './TeamService';
44
44
  export * from './UserService';
45
- export * from './WorkspaceService';
@@ -43,4 +43,3 @@ export * from './rehydratedSlice';
43
43
  export * from './teamSlice';
44
44
  export * from './userSlice';
45
45
  export * from './versioningSlice';
46
- export * from './workspaceSlice';
@@ -3,7 +3,7 @@ import { Reducer } from '@reduxjs/toolkit';
3
3
  import { default as request } from 'superagent';
4
4
  import { BaseSDK, OfflineMetaEffect, OutboxCoordinator, RequestDetails } from '../sdk';
5
5
  import { BaseState, OvermapRootState } from '../typings';
6
- 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, VersioningState, WorkspaceState } from './slices';
6
+ 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, VersioningState } from './slices';
7
7
  export declare const VERSION_REDUCER_KEY = "versioning";
8
8
  export declare const overmapReducers: {
9
9
  versioning: Reducer<VersioningState>;
@@ -32,7 +32,6 @@ export declare const overmapReducers: {
32
32
  formRevisionAttachmentReducer: Reducer<FormRevisionAttachmentState>;
33
33
  formSubmissionAttachmentReducer: Reducer<FormSubmissionAttachmentState>;
34
34
  formSubmissionReducer: Reducer<FormSubmissionState>;
35
- workspaceReducer: Reducer<WorkspaceState>;
36
35
  emailDomainsReducer: Reducer<EmailDomainState>;
37
36
  licenseReducer: Reducer<LicenseState>;
38
37
  documentsReducer: Reducer<DocumentState>;
@@ -1,8 +1,8 @@
1
1
  import { BaseSerializedObject, ISerializedField } from '@overmap-ai/forms';
2
- import { ColorModel, CreatedByModel, IconModel, OfflineModel, SubmittedAtModel, TimestampedModel } from './base';
2
+ import { ColorModel, CreatedByModel, IconModel, IndexedModel, OfflineModel, SubmittedAtModel, TimestampedModel } from './base';
3
3
  import { FieldsAttachmentModel, FieldsModel, FieldValuesModel } from './fields';
4
4
  import { CanvasMarkableModel, MarkableModel } from './geo';
5
- export interface Asset extends OfflineModel, TimestampedModel, SubmittedAtModel, CreatedByModel, MarkableModel, CanvasMarkableModel {
5
+ export interface Asset extends OfflineModel, TimestampedModel, SubmittedAtModel, CreatedByModel, MarkableModel, CanvasMarkableModel, IndexedModel {
6
6
  asset_type: string;
7
7
  created_at?: string;
8
8
  label: string | null;
@@ -16,7 +16,7 @@ export type Offline<T> = T & {
16
16
  offline_id: string;
17
17
  };
18
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">;
19
+ export type Payload<TModel> = Omit<TModel, "offline_id" | "created_at" | "updated_at" | "id" | "submitted_at" | "created_by" | "index">;
20
20
  export type MaybePayload<TModel extends OfflineModel> = Payload<TModel> & {
21
21
  offline_id?: string | null;
22
22
  };
@@ -42,3 +42,6 @@ export interface ColorModel {
42
42
  export interface CreatedByModel {
43
43
  created_by?: User["id"] | null;
44
44
  }
45
+ export interface IndexedModel {
46
+ index: number | null;
47
+ }
@@ -4,5 +4,5 @@ export interface Category extends OfflineModel, SubmittedAtModel, TimestampedMod
4
4
  name: string;
5
5
  description?: string;
6
6
  color: CSSColor;
7
- workspace: string;
7
+ project: number;
8
8
  }
@@ -1,5 +1,5 @@
1
1
  import { BaseSerializedObject, ISerializedField } from '@overmap-ai/forms';
2
- import { CreatedByModel, OfflineModel, Payload, SubmittedAtModel, TimestampedModel } from './base';
2
+ import { CreatedByModel, IndexedModel, OfflineModel, Payload, SubmittedAtModel, TimestampedModel } from './base';
3
3
  import { FieldsAttachmentModel, FieldsModel, FieldValuesAttachmentModel, FieldValuesModel } from './fields';
4
4
  export interface Form extends OfflineModel, SubmittedAtModel, CreatedByModel {
5
5
  organization: number;
@@ -10,7 +10,7 @@ export interface FormRevision<TFields extends BaseSerializedObject = ISerialized
10
10
  description?: string;
11
11
  }
12
12
  export type FormRevisionPayload = Omit<Payload<FormRevision>, "revision">;
13
- export interface FormSubmission extends OfflineModel, SubmittedAtModel, TimestampedModel, CreatedByModel, FieldValuesModel {
13
+ export interface FormSubmission extends OfflineModel, SubmittedAtModel, TimestampedModel, CreatedByModel, FieldValuesModel, IndexedModel {
14
14
  form_revision: string;
15
15
  project: number;
16
16
  issue?: string | null;
@@ -1,14 +1,14 @@
1
1
  import { FileWithNameModel } from '../files';
2
- import { CreatedByModel, OfflineModel, SubmittedAtModel } from './base';
2
+ import { CreatedByModel, IndexedModel, OfflineModel, Payload, SubmittedAtModel } from './base';
3
3
  import { CanvasMarkableModel, MarkableModel } from './geo';
4
- export interface GeoImage extends OfflineModel, SubmittedAtModel, CreatedByModel, MarkableModel, CanvasMarkableModel, FileWithNameModel {
4
+ export interface GeoImage extends OfflineModel, SubmittedAtModel, CreatedByModel, MarkableModel, CanvasMarkableModel, FileWithNameModel, IndexedModel {
5
5
  title?: string;
6
6
  description?: string;
7
7
  project: number;
8
8
  direction?: number;
9
9
  original_date?: string;
10
10
  }
11
- export type GeoImagePayload = Omit<GeoImage, "offline_id" | "submitted_at" | "created_by" | "file_name" | "file_sha1" | "file"> & {
11
+ export type GeoImagePayload = Omit<Payload<GeoImage>, "file_name" | "file_sha1" | "file"> & {
12
12
  file: File;
13
13
  };
14
14
  export type BulkGeoImagePayload = Omit<GeoImagePayload, "project">;
@@ -19,4 +19,3 @@ export * from './projects';
19
19
  export * from './store';
20
20
  export * from './teams';
21
21
  export * from './users';
22
- export * from './workspace';
@@ -1,11 +1,10 @@
1
1
  import { BaseSerializedObject, ISerializedField } from '@overmap-ai/forms';
2
2
  import { IssuePriority, IssueStatus, IssueUpdateChange } from '../../enums';
3
3
  import { CSSColor } from '../colors';
4
- import { CreatedByModel, Offline, OfflineModel, SubmittedAtModel, TimestampedModel } from './base';
4
+ import { CreatedByModel, IndexedModel, Offline, OfflineModel, SubmittedAtModel, TimestampedModel } from './base';
5
5
  import { FieldsAttachmentModel, FieldsModel, FieldValuesModel } from './fields';
6
6
  import { CanvasMarkableModel, MarkableModel } from './geo';
7
7
  import { User } from './users';
8
- import { WorkspaceIndexedModel } from './workspace';
9
8
  /**
10
9
  * Represents a model instance that has been submitted to the backend. Some properties (depending on which model, but in
11
10
  * all cases, the `offline_id`) are guaranteed to be set.
@@ -27,7 +26,7 @@ export type Stored<TModel> = Created<TModel> | Submitted<TModel>;
27
26
  * Represents the properties you can always expect on any object representing an issue. These are the minimal details
28
27
  * required when creating an issue.
29
28
  */
30
- export interface Issue extends OfflineModel, SubmittedAtModel, CreatedByModel, Pick<WorkspaceIndexedModel, "index_workspace">, MarkableModel, CanvasMarkableModel {
29
+ export interface Issue extends OfflineModel, SubmittedAtModel, CreatedByModel, MarkableModel, CanvasMarkableModel, IndexedModel {
31
30
  title?: string | null;
32
31
  description?: string | null;
33
32
  priority: IssuePriority;
@@ -36,6 +35,7 @@ export interface Issue extends OfflineModel, SubmittedAtModel, CreatedByModel, P
36
35
  due_date?: string | Date | null;
37
36
  category?: string | null;
38
37
  issue_type?: string | null;
38
+ project: number;
39
39
  }
40
40
  /**
41
41
  * These details need to be provided by the frontend code before submitting to the backend.
@@ -49,7 +49,7 @@ export interface SubmittedIssue extends OfflineModel, CreatedByModel {
49
49
  * These details exist on issues that have been successfully submitted, accepted, created, and serialized by the
50
50
  * backend, then downloaded by the frontend.
51
51
  */
52
- export interface CreatedIssue extends Issue, Pick<WorkspaceIndexedModel, "index"> {
52
+ export interface CreatedIssue extends Issue {
53
53
  title: Exclude<Issue["title"], undefined>;
54
54
  description: Exclude<Issue["description"], undefined>;
55
55
  assigned_to: Exclude<Issue["assigned_to"], undefined>;
@@ -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, WorkspaceState } from '../../store';
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';
3
3
  export interface BaseState {
4
4
  outboxReducer: OutboxState;
5
5
  offline: OfflineState;
@@ -33,7 +33,6 @@ export interface OvermapRootState extends BaseState {
33
33
  formSubmissionReducer: FormSubmissionState;
34
34
  formSubmissionAttachmentReducer: FormSubmissionAttachmentState;
35
35
  userReducer: UserState;
36
- workspaceReducer: WorkspaceState;
37
36
  emailDomainsReducer: EmailDomainState;
38
37
  licenseReducer: LicenseState;
39
38
  documentsReducer: DocumentState;
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.73",
6
+ "version": "1.0.74-model-indexes.1",
7
7
  "type": "module",
8
8
  "main": "dist/overmap-core.umd.cjs",
9
9
  "module": "dist/overmap-core.js",
@@ -1,10 +0,0 @@
1
- import { Offline, OvermapRootState, Payload, Workspace } from '../../typings';
2
- import { BaseSDK } from '../base';
3
- import { OptimisticModelResult } from '../typings';
4
- import { BaseApiService } from './BaseApiService';
5
- export declare abstract class WorkspaceService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
6
- add(payload: Payload<Workspace>): OptimisticModelResult<Workspace>;
7
- update(payload: Offline<Partial<Payload<Workspace>>>): OptimisticModelResult<Workspace>;
8
- delete(id: string): Promise<undefined>;
9
- refreshStore(projectId: number): Promise<undefined>;
10
- }
@@ -1,50 +0,0 @@
1
- import { Reducer } from '@reduxjs/toolkit';
2
- import { OvermapRootState, OvermapSelector, OvermapSelectorWithArgs, Stored, Workspace } from '../../typings';
3
- import { ModelState } from '../typings';
4
- export type WorkspaceState = ModelState<Stored<Workspace>>;
5
- export declare const workspaceSlice: import('@reduxjs/toolkit').Slice<WorkspaceState, {
6
- initializeWorkspaces: (state: ModelState<Stored<Workspace>>, action: {
7
- payload: Stored<Workspace>[];
8
- type: string;
9
- }) => void;
10
- setWorkspaces: (state: ModelState<Stored<Workspace>>, action: {
11
- payload: Stored<Workspace>[];
12
- type: string;
13
- }) => void;
14
- addWorkspace: (state: ModelState<Stored<Workspace>>, action: {
15
- payload: Stored<Workspace>;
16
- type: string;
17
- }) => void;
18
- updateWorkspace: (state: ModelState<Stored<Workspace>>, action: {
19
- payload: Stored<Workspace>;
20
- type: string;
21
- }) => void;
22
- deleteWorkspace: (state: ModelState<Stored<Workspace>>, action: import('@reduxjs/toolkit').PayloadAction<string>) => void;
23
- }, "workspace", "workspace", import('@reduxjs/toolkit').SliceSelectors<WorkspaceState>>;
24
- export declare const initializeWorkspaces: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<Workspace>[], "workspace/initializeWorkspaces">, setWorkspaces: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<Workspace>[], "workspace/setWorkspaces">, addWorkspace: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<Workspace>, "workspace/addWorkspace">, updateWorkspace: import('@reduxjs/toolkit').ActionCreatorWithPayload<Stored<Workspace>, "workspace/updateWorkspace">, deleteWorkspace: import('@reduxjs/toolkit').ActionCreatorWithPayload<string, "workspace/deleteWorkspace">;
25
- export declare const selectWorkspaceMapping: OvermapSelector<Record<string, Workspace>>;
26
- export declare const selectWorkspaces: ((state: OvermapRootState) => Workspace[]) & {
27
- clearCache: () => void;
28
- resultsCount: () => number;
29
- resetResultsCount: () => void;
30
- } & {
31
- resultFunc: (resultFuncArgs_0: Record<string, Workspace>) => Workspace[];
32
- memoizedResultFunc: ((resultFuncArgs_0: Record<string, Workspace>) => Workspace[]) & {
33
- clearCache: () => void;
34
- resultsCount: () => number;
35
- resetResultsCount: () => void;
36
- };
37
- lastResult: () => Workspace[];
38
- dependencies: [OvermapSelector<Record<string, Workspace>>];
39
- recomputations: () => number;
40
- resetRecomputations: () => void;
41
- dependencyRecomputations: () => number;
42
- resetDependencyRecomputations: () => void;
43
- } & {
44
- argsMemoize: typeof import('reselect').weakMapMemoize;
45
- memoize: typeof import('reselect').weakMapMemoize;
46
- };
47
- export declare const selectMainWorkspace: OvermapSelector<Workspace | undefined>;
48
- export declare const selectWorkspaceById: OvermapSelectorWithArgs<string, Stored<Workspace> | undefined>;
49
- export declare const selectPermittedWorkspaceIds: OvermapSelector<Set<string>>;
50
- export declare const workspaceReducer: Reducer<WorkspaceState>;
@@ -1,11 +0,0 @@
1
- import { CreatedByModel, Model, OfflineModel, SubmittedAtModel, TimestampedModel } from './base';
2
- export interface Workspace extends OfflineModel, TimestampedModel, SubmittedAtModel, CreatedByModel {
3
- name: string;
4
- project: number;
5
- abbreviation: string | null;
6
- permitted: boolean;
7
- }
8
- export interface WorkspaceIndexedModel extends Model {
9
- index: number | null;
10
- index_workspace: string;
11
- }