@overmap-ai/core 1.0.65-asset-models-improvements.3 → 1.0.65-error-message-fix.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.
Files changed (75) hide show
  1. package/dist/enums/index.d.ts +0 -3
  2. package/dist/enums/issue.d.ts +0 -9
  3. package/dist/overmap-core.js +460 -556
  4. package/dist/overmap-core.js.map +1 -1
  5. package/dist/overmap-core.umd.cjs +449 -545
  6. package/dist/overmap-core.umd.cjs.map +1 -1
  7. package/dist/sdk/base.d.ts +1 -1
  8. package/dist/sdk/globals.d.ts +2 -2
  9. package/dist/sdk/sdk.d.ts +3 -3
  10. package/dist/sdk/services/AgentService.d.ts +1 -1
  11. package/dist/sdk/services/AssetAttachmentService.d.ts +2 -3
  12. package/dist/sdk/services/AssetService.d.ts +6 -5
  13. package/dist/sdk/services/AssetStageCompletionService.d.ts +12 -6
  14. package/dist/sdk/services/AssetStageService.d.ts +4 -5
  15. package/dist/sdk/services/AssetTypeAttachmentService.d.ts +2 -3
  16. package/dist/sdk/services/AssetTypeService.d.ts +4 -4
  17. package/dist/sdk/services/BaseApiService.d.ts +1 -1
  18. package/dist/sdk/services/BaseAttachmentService.d.ts +2 -3
  19. package/dist/sdk/services/BaseAuthService.d.ts +1 -1
  20. package/dist/sdk/services/BaseService.d.ts +2 -2
  21. package/dist/sdk/services/BaseUploadService.d.ts +2 -2
  22. package/dist/sdk/services/CategoryService.d.ts +2 -2
  23. package/dist/sdk/services/DocumentAttachmentService.d.ts +2 -3
  24. package/dist/sdk/services/DocumentService.d.ts +2 -2
  25. package/dist/sdk/services/EmailDomainsService.d.ts +1 -1
  26. package/dist/sdk/services/EmailVerificationService.d.ts +1 -1
  27. package/dist/sdk/services/FileService.d.ts +1 -1
  28. package/dist/sdk/services/FormService.d.ts +2 -1
  29. package/dist/sdk/services/FormSubmissionService.d.ts +3 -2
  30. package/dist/sdk/services/GeoImageService.d.ts +2 -2
  31. package/dist/sdk/services/IssueAttachmentService.d.ts +2 -3
  32. package/dist/sdk/services/IssueCommentService.d.ts +2 -2
  33. package/dist/sdk/services/IssueService.d.ts +2 -2
  34. package/dist/sdk/services/IssueTypeService.d.ts +2 -2
  35. package/dist/sdk/services/IssueUpdateService.d.ts +1 -1
  36. package/dist/sdk/services/JWTAuthService.d.ts +2 -2
  37. package/dist/sdk/services/LicenseService.d.ts +1 -1
  38. package/dist/sdk/services/OrganizationAccessService.d.ts +1 -1
  39. package/dist/sdk/services/OrganizationService.d.ts +1 -1
  40. package/dist/sdk/services/ProjectAccessService.d.ts +1 -1
  41. package/dist/sdk/services/ProjectAttachmentService.d.ts +2 -3
  42. package/dist/sdk/services/ProjectFileService.d.ts +3 -2
  43. package/dist/sdk/services/ProjectService.d.ts +2 -1
  44. package/dist/sdk/services/TeamService.d.ts +2 -2
  45. package/dist/sdk/services/UserService.d.ts +2 -2
  46. package/dist/sdk/services/WorkspaceService.d.ts +4 -2
  47. package/dist/store/slices/assetStageCompletionSlice.d.ts +11 -41
  48. package/dist/store/slices/assetStageSlice.d.ts +9 -20
  49. package/dist/store/slices/assetTypeSlice.d.ts +3 -27
  50. package/dist/typings/models/access.d.ts +9 -2
  51. package/dist/typings/models/agents.d.ts +1 -1
  52. package/dist/typings/models/assets.d.ts +9 -8
  53. package/dist/typings/models/attachments.d.ts +9 -2
  54. package/dist/typings/models/base.d.ts +2 -2
  55. package/dist/typings/models/categories.d.ts +2 -2
  56. package/dist/typings/models/documents.d.ts +1 -1
  57. package/dist/typings/models/emailDomain.d.ts +1 -1
  58. package/dist/typings/models/emailVerification.d.ts +2 -2
  59. package/dist/typings/models/forms.d.ts +2 -2
  60. package/dist/typings/models/geoImages.d.ts +3 -3
  61. package/dist/typings/models/issueTypes.d.ts +2 -2
  62. package/dist/typings/models/issues.d.ts +10 -1
  63. package/dist/typings/models/license.d.ts +15 -2
  64. package/dist/typings/models/organizations.d.ts +1 -1
  65. package/dist/typings/models/projects.d.ts +3 -3
  66. package/dist/typings/models/store.d.ts +1 -1
  67. package/dist/typings/models/teams.d.ts +3 -3
  68. package/dist/typings/models/users.d.ts +1 -1
  69. package/dist/typings/models/workspace.d.ts +1 -1
  70. package/dist/typings/store.d.ts +1 -1
  71. package/dist/utils/colors.d.ts +2 -0
  72. package/package.json +1 -1
  73. package/dist/enums/access.d.ts +0 -8
  74. package/dist/enums/attachments.d.ts +0 -7
  75. package/dist/enums/licenses.d.ts +0 -14
@@ -1,7 +1,7 @@
1
1
  import { FileService } from "./services";
2
2
  import { ToolkitStore } from "@reduxjs/toolkit/dist/configureStore";
3
3
  import { SDKRequest } from "./typings";
4
- import type { BaseState } from "../typings";
4
+ import { BaseState } from "../typings";
5
5
  export declare abstract class BaseSDK<TState extends BaseState> {
6
6
  readonly store: ToolkitStore<TState>;
7
7
  abstract readonly files: FileService<TState, BaseSDK<TState>>;
@@ -1,6 +1,6 @@
1
1
  import { ToolkitStore } from "@reduxjs/toolkit/dist/configureStore";
2
- import type { BaseState } from "../typings";
3
- import type { BaseSDK } from "./base";
2
+ import { BaseState } from "../typings";
3
+ import { BaseSDK } from "./base";
4
4
  export declare function setClientStore<TState extends BaseState>(store: ToolkitStore<TState>): void;
5
5
  export declare function getClientStore(): ToolkitStore<BaseState> | undefined;
6
6
  export declare function setClientSDK<TState extends BaseState>(sdkCtor: BaseSDK<TState>): void;
package/dist/sdk/sdk.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { BaseSDK } from "./base";
1
+ import { BaseSDK } from "./base";
2
2
  import { ToolkitStore } from "@reduxjs/toolkit/dist/configureStore";
3
- import type { BaseState } from "../typings";
4
- import type { OvermapSDKConstructor } from "./typings";
3
+ import { BaseState } from "../typings";
4
+ import { OvermapSDKConstructor } from "./typings";
5
5
  export declare const initSDK: <TState extends BaseState, TSDK extends BaseSDK<TState>>(store: ToolkitStore<TState>, sdk: OvermapSDKConstructor<TState, TSDK>) => TSDK;
@@ -1,4 +1,4 @@
1
- import type { AgentUserConversation, OvermapRootState } from "../../typings";
1
+ import { AgentUserConversation, OvermapRootState } from "../../typings";
2
2
  import { BaseApiService } from "./BaseApiService";
3
3
  import type { BaseSDK } from "../base";
4
4
  export declare abstract class AgentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
@@ -1,8 +1,7 @@
1
1
  import { BaseAttachmentService } from "./BaseAttachmentService";
2
- import type { AssetAttachment, Stored, OvermapRootState } from "../../typings";
3
- import type { OptimisticMultipleModelResult } from "../typings";
2
+ import { AttachmentModel, AssetAttachment, Stored, OvermapRootState } from "../../typings";
3
+ import { OptimisticMultipleModelResult } from "../typings";
4
4
  import type { BaseSDK } from "../base";
5
- import { AttachmentModel } from "../../enums";
6
5
  export declare abstract class AssetAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, AssetAttachment> {
7
6
  attachmentModel: AttachmentModel;
8
7
  initializeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetAttachment>[], "assetAttachments/initializeAssetAttachments">;
@@ -1,11 +1,12 @@
1
- import type { Asset, Created, Offline, OvermapRootState, Payload } from "../../typings";
2
- import type { OptimisticModelResult } from "../typings";
1
+ import { Asset, Created, Payload, OvermapRootState } from "../../typings";
2
+ import { OptimisticModelResult } from "../typings";
3
3
  import { BaseApiService } from "./BaseApiService";
4
4
  import type { BaseSDK } from "../base";
5
5
  export declare abstract class AssetService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
6
- add(payload: Payload<Asset>): OptimisticModelResult<Asset>;
7
- update(payload: Offline<Partial<Payload<Asset>>>): OptimisticModelResult<Asset>;
6
+ add(asset: Payload<Asset>, workspaceId: string): OptimisticModelResult<Asset>;
7
+ update(asset: Asset, workspaceId: string): OptimisticModelResult<Asset>;
8
8
  remove(assetId: string): Promise<undefined>;
9
- bulkAdd(payloads: Omit<Payload<Asset>, "asset_type">[], assetTypeId: string, batchSize: number): Promise<Created<Asset>[]>[];
9
+ deleteAllAssetsOfAssetType(assetTypeId: string): Promise<undefined>;
10
+ bulkAdd(assetsToCreate: Payload<Asset>[], workspaceId: string, assetTypeId: string, batchSize: number): Promise<Created<Asset>[]>[];
10
11
  refreshStore(projectId: number): Promise<void>;
11
12
  }
@@ -1,11 +1,17 @@
1
- import type { OptimisticModelResult, OptimisticMultipleModelResult } from "../typings";
2
- import type { AssetStageCompletion, OvermapRootState, Payload } from "../../typings";
1
+ import { OptimisticModelResult } from "../typings";
2
+ import { AssetStageCompletion, OvermapRootState, Payload } from "../../typings";
3
3
  import { BaseApiService } from "./BaseApiService";
4
4
  import type { BaseSDK } from "../base";
5
5
  export declare abstract class AssetStageCompletionService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
6
- add(payload: Payload<AssetStageCompletion>): OptimisticModelResult<AssetStageCompletion>;
7
- delete(id: string): Promise<undefined>;
8
- bulkAdd(payloads: Payload<AssetStageCompletion>[]): OptimisticMultipleModelResult<AssetStageCompletion>;
9
- bulkDelete(ids: string[]): Promise<undefined>;
6
+ add(assetId: string, stageId: string): OptimisticModelResult<AssetStageCompletion>;
10
7
  refreshStore(projectId: number): Promise<void>;
8
+ /**
9
+ * Creates a collection of AssetStageCompletions, marking the referenced stages as completed for the referenced
10
+ * assets. It's REQUIRED that all assets referenced all have the SAME asset type.
11
+ * @param assetTypeId The ID of the asset type for which we are completing stages (we can only complete
12
+ * stages for one asset type at a time)
13
+ * @param stageCompletions
14
+ */
15
+ bulkAdd(assetTypeId: string, stageCompletions: Payload<AssetStageCompletion>[]): Promise<void>;
16
+ bulkDelete(stageId: string, assetIds: string[]): Promise<undefined>;
11
17
  }
@@ -1,12 +1,11 @@
1
- import type { AssetStage, Offline, OvermapRootState, Payload } from "../../typings";
1
+ import { AssetStage, AssetStagePayload, OvermapRootState, Payload } from "../../typings";
2
2
  import { BaseApiService } from "./BaseApiService";
3
3
  import type { BaseSDK } from "../base";
4
- import { OptimisticModelResult, OptimisticMultipleModelResult } from "../typings";
5
4
  export declare abstract class AssetStageService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
6
- bulkAdd(stagesToSubmit: Omit<Payload<AssetStage>, "asset_type">[], assetTypeId: string): OptimisticMultipleModelResult<AssetStage>;
7
- bulkUpdate(stagesToUpdate: AssetStage[], assetTypeId: string): Promise<AssetStage[]>;
5
+ bulkCreateStages(stagesToSubmit: Payload<AssetStagePayload>[], assetTypeId: string, workspaceId: string): Promise<AssetStage[]>;
6
+ bulkUpdateStages(stagesToUpdate: AssetStage[], assetTypeId: string): Promise<AssetStage[]>;
8
7
  bulkDelete(idsToDelete: string[]): Promise<undefined>;
9
- update(payload: Offline<Partial<Payload<AssetStage>>>): OptimisticModelResult<AssetStage>;
8
+ update(assetStage: AssetStage): Promise<undefined>;
10
9
  linkForm(stageId: string, formId: string): Promise<undefined>;
11
10
  unlinkForm(stageId: string, formId: string): Promise<undefined>;
12
11
  refreshStore(projectId: number): Promise<undefined>;
@@ -1,8 +1,7 @@
1
1
  import { BaseAttachmentService } from "./BaseAttachmentService";
2
- import type { AssetTypeAttachment, Stored, OvermapRootState } from "../../typings";
3
- import type { OptimisticMultipleModelResult } from "../typings";
2
+ import { AttachmentModel, AssetTypeAttachment, Stored, OvermapRootState } from "../../typings";
3
+ import { OptimisticMultipleModelResult } from "../typings";
4
4
  import type { BaseSDK } from "../base";
5
- import { AttachmentModel } from "../../enums";
6
5
  export declare abstract class AssetTypeAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, AssetTypeAttachment> {
7
6
  attachmentModel: AttachmentModel;
8
7
  initializeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetTypeAttachment>[], "assetTypeAttachments/initializeAssetTypeAttachments">;
@@ -1,10 +1,10 @@
1
- import type { AssetType, Offline, OvermapRootState, Payload } from "../../typings";
2
- import type { OptimisticModelResult } from "../typings";
1
+ import { AssetType, OvermapRootState, Payload } from "../../typings";
2
+ import { OptimisticModelResult } from "../typings";
3
3
  import { BaseApiService } from "./BaseApiService";
4
4
  import type { BaseSDK } from "../base";
5
5
  export declare abstract class AssetTypeService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
6
- add(payload: Payload<AssetType>): OptimisticModelResult<AssetType>;
7
- update(payload: Offline<Partial<Payload<AssetType>>>): OptimisticModelResult<AssetType>;
6
+ add(assetType: Payload<AssetType>): OptimisticModelResult<AssetType>;
7
+ update(assetType: AssetType): Promise<undefined>;
8
8
  delete(assetTypeId: string): Promise<undefined>;
9
9
  refreshStore(projectId: number): Promise<void>;
10
10
  }
@@ -1,5 +1,5 @@
1
1
  import type { BaseSDK } from "../base";
2
- import type { BaseState } from "../../typings";
2
+ import { BaseState } from "../../typings";
3
3
  import { BaseAuthService } from "./BaseAuthService";
4
4
  import { BaseService } from "./BaseService";
5
5
  /**
@@ -1,7 +1,6 @@
1
1
  import { ActionCreatorWithPayload } from "@reduxjs/toolkit";
2
- import type { OptimisticMultipleModelResult } from "../typings";
3
- import { AttachmentModel } from "../../enums";
4
- import type { Attachment, OfflineModel, OvermapRootState, OvermapSelectorWithArgs, Stored, Submitted } from "../../typings";
2
+ import { OptimisticMultipleModelResult } from "../typings";
3
+ import { Attachment, AttachmentModel, OfflineModel, OvermapRootState, OvermapSelectorWithArgs, Stored, Submitted } from "../../typings";
5
4
  import type { BaseSDK } from "../base";
6
5
  import { BaseUploadService } from "./BaseUploadService";
7
6
  export interface AttachmentPayload {
@@ -1,5 +1,5 @@
1
1
  import { Response, SuperAgentRequest } from "superagent";
2
- import type { BaseState } from "../../typings";
2
+ import { BaseState } from "../../typings";
3
3
  import type { BaseSDK } from "../base";
4
4
  import { BaseService } from "./BaseService";
5
5
  export declare abstract class BaseAuthService<TStore extends BaseState, TSDK extends BaseSDK<TStore>> extends BaseService<TStore, TSDK> {
@@ -1,7 +1,7 @@
1
1
  import { AnyAction } from "@reduxjs/toolkit";
2
2
  import type { BaseSDK } from "../base";
3
- import type { BaseState } from "../../typings";
4
- import type { SDKRequest } from "../typings";
3
+ import { BaseState } from "../../typings";
4
+ import { SDKRequest } from "../typings";
5
5
  export declare const CLASS_NAME_TO_SERVICE: Record<string, BaseService<BaseState, BaseSDK<BaseState>>>;
6
6
  /**
7
7
  * Abstract base class for building a service that can enqueue API requests
@@ -1,6 +1,6 @@
1
1
  import { BaseApiService } from "./BaseApiService";
2
- import type { PresignedUrlsResponse } from "../typings";
3
- import type { OvermapRootState } from "../../typings";
2
+ import { PresignedUrlsResponse } from "../typings";
3
+ import { OvermapRootState } from "../../typings";
4
4
  import type { BaseSDK } from "../base";
5
5
  export declare abstract class BaseUploadService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
6
6
  protected getNumberOfAttachmentsWithSha1(sha1: string): number;
@@ -1,5 +1,5 @@
1
- import type { Category, Offline, OvermapRootState, Payload } from "../../typings";
2
- import type { OptimisticModelResult } from "../typings";
1
+ import { Category, Offline, OvermapRootState, Payload } from "../../typings";
2
+ import { OptimisticModelResult } from "../typings";
3
3
  import { BaseApiService } from "./BaseApiService";
4
4
  import type { BaseSDK } from "../base";
5
5
  /**
@@ -1,8 +1,7 @@
1
1
  import { BaseAttachmentService } from "./BaseAttachmentService";
2
- import type { DocumentAttachment, OvermapRootState, Stored } from "../../typings";
3
- import type { OptimisticMultipleModelResult } from "../typings";
2
+ import { AttachmentModel, DocumentAttachment, OvermapRootState, Stored } from "../../typings";
3
+ import { OptimisticMultipleModelResult } from "../typings";
4
4
  import type { BaseSDK } from "../base";
5
- import { AttachmentModel } from "../../enums";
6
5
  export declare abstract class DocumentAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, DocumentAttachment> {
7
6
  attachmentModel: AttachmentModel;
8
7
  initializeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<DocumentAttachment>[], "documentAttachments/initializeDocumentAttachments">;
@@ -1,5 +1,5 @@
1
- import type { Document, DocumentPayload, MovePosition, OvermapRootState, Submitted } from "../../typings";
2
- import type { OptimisticModelResult } from "../typings";
1
+ import { Document, DocumentPayload, MovePosition, OvermapRootState, Submitted } from "../../typings";
2
+ import { OptimisticModelResult } from "../typings";
3
3
  import { BaseApiService } from "./BaseApiService";
4
4
  import type { BaseSDK } from "../base";
5
5
  export declare abstract class DocumentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
@@ -1,4 +1,4 @@
1
- import type { EmailDomain, OvermapRootState } from "../../typings";
1
+ import { EmailDomain, OvermapRootState } from "../../typings";
2
2
  import { BaseApiService } from "./BaseApiService";
3
3
  import type { BaseSDK } from "../base";
4
4
  export declare abstract class EmailDomainsService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
@@ -1,6 +1,6 @@
1
1
  import { BaseApiService } from "./BaseApiService";
2
2
  import type { BaseSDK } from "../base";
3
- import type { EmailVerificationPayload, EmailVerificationReturn, OvermapRootState, VerificationCode } from "../../typings";
3
+ import { EmailVerificationPayload, EmailVerificationReturn, OvermapRootState, VerificationCode } from "../../typings";
4
4
  export declare abstract class EmailVerificationService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
5
5
  getVerificationCode(verificationCode: string): Promise<VerificationCode>;
6
6
  validateVerificationCode(verificationCode: string, payload?: EmailVerificationPayload | undefined): Promise<EmailVerificationReturn>;
@@ -1,6 +1,6 @@
1
1
  import { BaseApiService } from "./BaseApiService";
2
2
  import type { BaseSDK } from "../base";
3
- import type { BaseState } from "../../typings";
3
+ import { BaseState } from "../../typings";
4
4
  export interface GetS3UrlSuccessResponse {
5
5
  url: string;
6
6
  fields: Record<string, string>;
@@ -1,4 +1,5 @@
1
- import type { Created, Form, FormRevision, FormRevisionAttachment, FormRevisionPayload, ISerializedField, OvermapRootState, Stored } from "../../typings";
1
+ import { Form, FormRevision, FormRevisionAttachment, FormRevisionPayload, ISerializedField } from '../../typings/models/forms';
2
+ import { Created, OvermapRootState, Stored } from "../../typings";
2
3
  import type { BaseSDK } from "../base";
3
4
  import { BaseUploadService } from "./BaseUploadService";
4
5
  export declare abstract class FormService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
@@ -1,5 +1,6 @@
1
- import type { Created, FieldValue, FormSubmission, FormSubmissionAttachment, FormSubmissionPayload, Offline, OvermapRootState, Payload, Stored } from "../../typings";
2
- import type { PresignedUrlsResponse } from "../typings";
1
+ import { FieldValue, FormSubmission, FormSubmissionAttachment, FormSubmissionPayload } from '../../typings/models/forms';
2
+ import { PresignedUrlsResponse } from "../typings";
3
+ import { Created, Offline, OvermapRootState, Payload, Stored } from "../../typings";
3
4
  import type { BaseSDK } from "../base";
4
5
  import { BaseUploadService } from "./BaseUploadService";
5
6
  interface BulkAddRequestReturnValue {
@@ -1,5 +1,5 @@
1
- import type { BulkGeoImagePayload, GeoImage, GeoImagePayload, Offline, OvermapRootState } from "../../typings";
2
- import type { OptimisticModelResult, OptimisticMultipleModelResult } from "../typings";
1
+ import { BulkGeoImagePayload, GeoImage, GeoImagePayload, Offline, OvermapRootState } from "../../typings";
2
+ import { OptimisticModelResult, OptimisticMultipleModelResult } from "../typings";
3
3
  import type { BaseSDK } from "../base";
4
4
  import { BaseUploadService } from "./BaseUploadService";
5
5
  export declare abstract class GeoImageService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseUploadService<TState, TSDK> {
@@ -1,8 +1,7 @@
1
1
  import { BaseAttachmentService } from "./BaseAttachmentService";
2
- import type { OptimisticMultipleModelResult } from "../typings";
3
- import type { IssueAttachment, OvermapRootState, Stored } from "../../typings";
2
+ import { OptimisticMultipleModelResult } from "../typings";
3
+ import { AttachmentModel, IssueAttachment, OvermapRootState, Stored } from "../../typings";
4
4
  import type { BaseSDK } from "../base";
5
- import { AttachmentModel } from "../../enums";
6
5
  export declare abstract class IssueAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, IssueAttachment> {
7
6
  attachmentModel: AttachmentModel;
8
7
  initializeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<IssueAttachment>[], "issueAttachments/initializeIssueAttachments">;
@@ -1,5 +1,5 @@
1
- import type { IssueComment, OvermapRootState, Payload, Submitted } from "../../typings";
2
- import type { OptimisticModelResult } from "../typings";
1
+ import { IssueComment, OvermapRootState, Payload, Submitted } from "../../typings";
2
+ import { OptimisticModelResult } from "../typings";
3
3
  import { BaseApiService } from "./BaseApiService";
4
4
  import type { BaseSDK } from "../base";
5
5
  export declare abstract class IssueCommentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
@@ -1,5 +1,5 @@
1
- import type { OptimisticModelResult } from "../typings";
2
- import type { Issue, IssueType, OvermapRootState, Submitted } from "../../typings";
1
+ import { OptimisticModelResult } from "../typings";
2
+ import { Issue, IssueType, OvermapRootState, Submitted } from "../../typings";
3
3
  import { BaseApiService } from "./BaseApiService";
4
4
  import type { BaseSDK } from "../base";
5
5
  /**
@@ -1,5 +1,5 @@
1
- import type { OptimisticModelResult } from "../typings";
2
- import type { IssueType, IssueTypePayload, Offline, OvermapRootState } from "../../typings";
1
+ import { OptimisticModelResult } from "../typings";
2
+ import { IssueType, IssueTypePayload, Offline, OvermapRootState } from "../../typings";
3
3
  import { BaseApiService } from "./BaseApiService";
4
4
  import type { BaseSDK } from "../base";
5
5
  export declare abstract class IssueTypeService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
@@ -1,4 +1,4 @@
1
- import type { OvermapRootState } from "../../typings";
1
+ import { OvermapRootState } from "../../typings";
2
2
  import { BaseApiService } from "./BaseApiService";
3
3
  import type { BaseSDK } from "../base";
4
4
  export declare abstract class IssueUpdateService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
@@ -1,7 +1,7 @@
1
1
  import request from "superagent";
2
- import type { BaseState } from "../../typings";
2
+ import { BaseState } from "../../typings";
3
3
  import type { BaseSDK } from "../base";
4
- import type { TokenPair } from "../typings";
4
+ import { TokenPair } from "../typings";
5
5
  import { BaseAuthService } from "./BaseAuthService";
6
6
  /**
7
7
  * Handles login, logout and renewing tokens
@@ -1,4 +1,4 @@
1
- import type { License, OvermapRootState, Project, Transaction } from "../../typings";
1
+ import { License, OvermapRootState, Project, Transaction } from "../../typings";
2
2
  import { BaseApiService } from "./BaseApiService";
3
3
  import type { BaseSDK } from "../base";
4
4
  export declare abstract class LicenseService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
@@ -1,4 +1,4 @@
1
- import type { OrganizationAccess, OvermapRootState } from "../../typings";
1
+ import { OrganizationAccess, OvermapRootState } from "../../typings";
2
2
  import { BaseApiService } from "./BaseApiService";
3
3
  import type { BaseSDK } from "../base";
4
4
  /**
@@ -1,4 +1,4 @@
1
- import type { Organization, OvermapRootState } from "../../typings";
1
+ import { Organization, OvermapRootState } from "../../typings";
2
2
  import { BaseApiService } from "./BaseApiService";
3
3
  import type { BaseSDK } from "../base";
4
4
  export declare abstract class OrganizationService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
@@ -1,4 +1,4 @@
1
- import type { OvermapRootState, ProjectAccess } from "../../typings";
1
+ import { OvermapRootState, ProjectAccess } from "../../typings";
2
2
  import { BaseApiService } from "./BaseApiService";
3
3
  import type { BaseSDK } from "../base";
4
4
  /**
@@ -1,8 +1,7 @@
1
1
  import { BaseAttachmentService } from "./BaseAttachmentService";
2
- import type { OvermapRootState, ProjectAttachment, Stored } from "../../typings";
3
- import type { OptimisticMultipleModelResult } from "../typings";
2
+ import { AttachmentModel, OvermapRootState, ProjectAttachment, Stored } from "../../typings";
3
+ import { OptimisticMultipleModelResult } from "../typings";
4
4
  import type { BaseSDK } from "../base";
5
- import { AttachmentModel } from "../../enums";
6
5
  export declare abstract class ProjectAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, number, ProjectAttachment> {
7
6
  attachmentModel: AttachmentModel;
8
7
  initializeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<ProjectAttachment>[], "projectAttachments/initializeProjectAttachments">;
@@ -1,5 +1,6 @@
1
- import type { OvermapRootState, ProjectFile } from "../../typings";
2
- import type { OptimisticGenericResult } from "../typings";
1
+ import { ProjectFile } from '../../typings/models/projects';
2
+ import { OptimisticGenericResult } from "../typings";
3
+ import { OvermapRootState } from "../../typings";
3
4
  import { BaseApiService } from "./BaseApiService";
4
5
  import type { BaseSDK } from "../base";
5
6
  /**
@@ -1,4 +1,5 @@
1
- import type { OvermapRootState, Payload, Project } from "../../typings";
1
+ import { Project } from '../../typings/models/projects';
2
+ import { OvermapRootState, Payload } from "../../typings";
2
3
  import { BaseApiService } from "./BaseApiService";
3
4
  import type { BaseSDK } from "../base";
4
5
  interface JoinProjectResponse {
@@ -1,5 +1,5 @@
1
- import type { OvermapRootState, Stored, Team, TeamPayload, User } from "../../typings";
2
- import type { OptimisticModelResult } from "../typings";
1
+ import { OvermapRootState, Stored, Team, TeamPayload, User } from "../../typings";
2
+ import { OptimisticModelResult } from "../typings";
3
3
  import { BaseApiService } from "./BaseApiService";
4
4
  import type { BaseSDK } from "../base";
5
5
  export declare abstract class TeamService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
@@ -1,6 +1,6 @@
1
1
  import { BaseApiService } from "./BaseApiService";
2
- import type { OvermapRootState } from "../../typings";
3
- import type { BaseSDK } from "../base";
2
+ import { OvermapRootState } from "../../typings";
3
+ import { BaseSDK } from "../base";
4
4
  export declare abstract class UserService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
5
5
  refreshStore(projectId: number, organizationId: number): Promise<void>;
6
6
  }
@@ -1,5 +1,7 @@
1
- import type { OvermapRootState, Payload, Workspace } from "../../typings";
2
- import type { OptimisticModelResult } from "../typings";
1
+ import { Payload } from '../../typings/models/base';
2
+ import { Workspace } from '../../typings/models/workspace';
3
+ import { OptimisticModelResult } from "../typings";
4
+ import { OvermapRootState } from "../../typings";
3
5
  import { BaseApiService } from "./BaseApiService";
4
6
  import type { BaseSDK } from "../base";
5
7
  export declare abstract class WorkspaceService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
@@ -1,45 +1,15 @@
1
- import { Reducer } from "@reduxjs/toolkit";
2
- import { Asset, AssetStageCompletion, OvermapRootState, OvermapSelectorWithArgs, Stored } from "../../typings";
3
- import { ModelState } from "../typings";
4
- export type AssetStageCompletionState = ModelState<AssetStageCompletion>;
1
+ import { PayloadAction, Reducer } from "@reduxjs/toolkit";
2
+ import type { Asset, AssetStageCompletion, CompletedStagesMapping, OvermapRootState, OvermapSelectorWithArgs } from "../../typings";
3
+ export interface AssetStageCompletionState {
4
+ completionsByAssetId: CompletedStagesMapping;
5
+ }
5
6
  export declare const assetStageCompletionSlice: import("@reduxjs/toolkit").Slice<AssetStageCompletionState, {
6
- initializeAssetStageCompletions: <TState extends ModelState<AssetStageCompletion>>(state: TState, action: {
7
- payload: AssetStageCompletion[];
8
- type: string;
9
- }) => void;
10
- addAssetStageCompletion: <TState_1 extends ModelState<AssetStageCompletion>>(state: TState_1, action: {
11
- payload: AssetStageCompletion;
12
- type: string;
13
- }) => void;
14
- addAssetStageCompletions: <TState_2 extends ModelState<AssetStageCompletion>>(state: TState_2, action: {
15
- payload: AssetStageCompletion[];
16
- type: string;
17
- }) => void;
18
- updateAssetStageCompletion: <TState_3 extends ModelState<AssetStageCompletion>>(state: TState_3, action: {
19
- payload: AssetStageCompletion;
20
- type: string;
21
- }) => void;
22
- updateAssetStageCompletions: <TState_4 extends ModelState<AssetStageCompletion>>(state: TState_4, action: {
23
- payload: AssetStageCompletion[];
24
- type: string;
25
- }) => void;
26
- deleteAssetStageCompletion: <TState_5 extends ModelState<AssetStageCompletion>>(state: TState_5, action: {
27
- payload: string;
28
- type: string;
29
- }) => void;
30
- deleteAssetStageCompletions: <TState_6 extends ModelState<AssetStageCompletion>>(state: TState_6, action: {
31
- payload: string[];
32
- type: string;
33
- }) => void;
7
+ addStageCompletion: (state: import("immer/dist/internal.js").WritableDraft<AssetStageCompletionState>, action: PayloadAction<AssetStageCompletion>) => void;
8
+ addStageCompletions: (state: import("immer/dist/internal.js").WritableDraft<AssetStageCompletionState>, action: PayloadAction<CompletedStagesMapping>) => void;
9
+ removeStageCompletions: (state: import("immer/dist/internal.js").WritableDraft<AssetStageCompletionState>, action: PayloadAction<AssetStageCompletion[]>) => void;
10
+ setStageCompletions: (state: import("immer/dist/internal.js").WritableDraft<AssetStageCompletionState>, action: PayloadAction<CompletedStagesMapping>) => void;
34
11
  }, "assetStageCompletions">;
35
- export declare const initializeAssetStageCompletions: import("@reduxjs/toolkit").ActionCreatorWithPayload<AssetStageCompletion[], "assetStageCompletions/initializeAssetStageCompletions">, addAssetStageCompletion: import("@reduxjs/toolkit").ActionCreatorWithPayload<AssetStageCompletion, "assetStageCompletions/addAssetStageCompletion">, addAssetStageCompletions: import("@reduxjs/toolkit").ActionCreatorWithPayload<AssetStageCompletion[], "assetStageCompletions/addAssetStageCompletions">, updateAssetStageCompletion: import("@reduxjs/toolkit").ActionCreatorWithPayload<AssetStageCompletion, "assetStageCompletions/updateAssetStageCompletion">, updateAssetStageCompletions: import("@reduxjs/toolkit").ActionCreatorWithPayload<AssetStageCompletion[], "assetStageCompletions/updateAssetStageCompletions">, deleteAssetStageCompletion: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "assetStageCompletions/deleteAssetStageCompletion">, deleteAssetStageCompletions: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "assetStageCompletions/deleteAssetStageCompletions">;
36
- export declare const selectAssetStageCompletionMapping: (state: OvermapRootState) => Record<string, AssetStageCompletion>;
37
- export declare const selectCompletedStagesByAsset: ((state: OvermapRootState) => Record<string, Record<string, string>>) & import("reselect").OutputSelectorFields<(args_0: Record<string, AssetStageCompletion>) => Record<string, Record<string, string>>, {
38
- clearCache: () => void;
39
- }> & {
40
- clearCache: () => void;
41
- };
12
+ export declare const addStageCompletion: import("@reduxjs/toolkit").ActionCreatorWithPayload<AssetStageCompletion, "assetStageCompletions/addStageCompletion">, addStageCompletions: import("@reduxjs/toolkit").ActionCreatorWithPayload<CompletedStagesMapping, "assetStageCompletions/addStageCompletions">, removeStageCompletions: import("@reduxjs/toolkit").ActionCreatorWithPayload<AssetStageCompletion[], "assetStageCompletions/removeStageCompletions">, setStageCompletions: import("@reduxjs/toolkit").ActionCreatorWithPayload<CompletedStagesMapping, "assetStageCompletions/setStageCompletions">;
13
+ export declare const selectCompletedStages: (state: OvermapRootState) => CompletedStagesMapping;
42
14
  export declare const selectCompletedStageIdsForAsset: OvermapSelectorWithArgs<Asset, string[]>;
43
- export declare const selectAssetStageCompletionById: OvermapSelectorWithArgs<string, Stored<AssetStageCompletion> | undefined>;
44
- export declare const selectAssetStageCompletionsByIds: (args: string[]) => (state: OvermapRootState) => AssetStageCompletion[];
45
15
  export declare const assetStageCompletionReducer: Reducer<AssetStageCompletionState>;
@@ -3,45 +3,31 @@ import type { AssetStage, OvermapSelector, OvermapSelectorWithArgs, Stored } fro
3
3
  import type { ModelState } from "../typings";
4
4
  export type AssetStageState = ModelState<Stored<AssetStage>>;
5
5
  export declare const assetStageSlice: import("@reduxjs/toolkit").Slice<ModelState<Stored<AssetStage>>, {
6
- initializeAssetStages: <TState extends ModelState<Stored<AssetStage>>>(state: TState, action: {
6
+ initializeStages: <TState extends ModelState<Stored<AssetStage>>>(state: TState, action: {
7
7
  payload: Stored<AssetStage>[];
8
8
  type: string;
9
9
  }) => void;
10
- setAssetStage: <TState_1 extends ModelState<Stored<AssetStage>>>(state: TState_1, action: {
10
+ setStage: <TState_1 extends ModelState<Stored<AssetStage>>>(state: TState_1, action: {
11
11
  payload: Stored<AssetStage>;
12
12
  type: string;
13
13
  }) => void;
14
- setAssetStages: <TState_2 extends ModelState<Stored<AssetStage>>>(state: TState_2, action: {
14
+ addStages: <TState_2 extends ModelState<Stored<AssetStage>>>(state: TState_2, action: {
15
15
  payload: Stored<AssetStage>[];
16
16
  type: string;
17
17
  }) => void;
18
- addAssetStage: <TState_3 extends ModelState<Stored<AssetStage>>>(state: TState_3, action: {
18
+ updateStage: <TState_3 extends ModelState<Stored<AssetStage>>>(state: TState_3, action: {
19
19
  payload: Stored<AssetStage>;
20
20
  type: string;
21
21
  }) => void;
22
- addAssetStages: <TState_4 extends ModelState<Stored<AssetStage>>>(state: TState_4, action: {
22
+ updateStages: <TState_4 extends ModelState<Stored<AssetStage>>>(state: TState_4, action: {
23
23
  payload: Stored<AssetStage>[];
24
24
  type: string;
25
25
  }) => void;
26
- updateAssetStage: <TState_5 extends ModelState<Stored<AssetStage>>>(state: TState_5, action: {
27
- payload: Stored<AssetStage>;
28
- type: string;
29
- }) => void;
30
- updateAssetStages: <TState_6 extends ModelState<Stored<AssetStage>>>(state: TState_6, action: {
31
- payload: Stored<AssetStage>[];
32
- type: string;
33
- }) => void;
34
- deleteAssetStage: <TState_7 extends ModelState<Stored<AssetStage>>>(state: TState_7, action: {
35
- payload: string;
36
- type: string;
37
- }) => void;
38
- deleteAssetStages: <TState_8 extends ModelState<Stored<AssetStage>>>(state: TState_8, action: {
26
+ removeStages: <TState_5 extends ModelState<Stored<AssetStage>>>(state: TState_5, action: {
39
27
  payload: string[];
40
28
  type: string;
41
29
  }) => void;
42
30
  }, "assetStages">;
43
- export declare const initializeAssetStages: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetStage>[], "assetStages/initializeAssetStages">, setAssetStage: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetStage>, "assetStages/setAssetStage">, setAssetStages: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetStage>[], "assetStages/setAssetStages">, addAssetStage: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetStage>, "assetStages/addAssetStage">, addAssetStages: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetStage>[], "assetStages/addAssetStages">, updateAssetStage: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetStage>, "assetStages/updateAssetStage">, updateAssetStages: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetStage>[], "assetStages/updateAssetStages">, deleteAssetStage: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, "assetStages/deleteAssetStage">, deleteAssetStages: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "assetStages/deleteAssetStages">;
44
- export declare const assetStageReducer: Reducer<AssetStageState>;
45
31
  export declare const selectStageMapping: OvermapSelector<Record<AssetStage["offline_id"], AssetStage>>;
46
32
  export declare const selectAssetStageById: OvermapSelectorWithArgs<string, AssetStage | undefined>;
47
33
  export declare const selectAssetStages: ((state: import('../../typings/models/store').OvermapRootState) => AssetStage[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, AssetStage>) => AssetStage[], {
@@ -49,7 +35,10 @@ export declare const selectAssetStages: ((state: import('../../typings/models/st
49
35
  }> & {
50
36
  clearCache: () => void;
51
37
  };
38
+ export declare const selectStagesFromAssetTypeIds: OvermapSelectorWithArgs<string[], Record<string, AssetStage[]>>;
52
39
  export declare const selectAssetTypeStagesMapping: OvermapSelectorWithArgs<string, Record<string, AssetStage>>;
53
40
  export declare const selectStagesOfAssetType: OvermapSelectorWithArgs<string, AssetStage[]>;
54
41
  export declare const selectAssetStagesByIds: (args: string[]) => (state: import('../../typings/models/store').OvermapRootState) => Stored<AssetStage>[];
55
42
  export declare const selectStageFormIdsFromStageIds: OvermapSelectorWithArgs<string[], Record<string, string>>;
43
+ export declare const initializeStages: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetStage>[], "assetStages/initializeStages">, setStage: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetStage>, "assetStages/setStage">, addStages: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetStage>[], "assetStages/addStages">, updateStages: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetStage>[], "assetStages/updateStages">, removeStages: import("@reduxjs/toolkit").ActionCreatorWithPayload<string[], "assetStages/removeStages">, updateStage: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetStage>, "assetStages/updateStage">;
44
+ export declare const assetStageReducer: Reducer<AssetStageState>;