@overmap-ai/core 1.0.60-sdk-refactor.0 → 1.0.60-sdk-refactor.2
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.map +1 -1
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/base.d.ts +2 -2
- package/dist/sdk/sdk.d.ts +2 -2
- package/dist/sdk/services/AgentService.d.ts +2 -1
- package/dist/sdk/services/AssetAttachmentService.d.ts +2 -1
- package/dist/sdk/services/AssetService.d.ts +2 -1
- package/dist/sdk/services/AssetStageCompletionService.d.ts +2 -1
- package/dist/sdk/services/AssetStageService.d.ts +2 -1
- package/dist/sdk/services/AssetTypeAttachmentService.d.ts +2 -1
- package/dist/sdk/services/AssetTypeService.d.ts +2 -1
- package/dist/sdk/services/AuthService.d.ts +3 -2
- package/dist/sdk/services/BaseApiService.d.ts +3 -3
- package/dist/sdk/services/BaseAttachmentService.d.ts +2 -1
- package/dist/sdk/services/CategoryService.d.ts +2 -1
- package/dist/sdk/services/DocumentAttachmentService.d.ts +2 -1
- package/dist/sdk/services/DocumentService.d.ts +2 -1
- package/dist/sdk/services/EmailDomainsService.d.ts +2 -1
- package/dist/sdk/services/EmailVerificationService.d.ts +2 -2
- package/dist/sdk/services/FileService.d.ts +3 -1
- package/dist/sdk/services/IssueAttachmentService.d.ts +2 -1
- package/dist/sdk/services/IssueCommentService.d.ts +2 -1
- package/dist/sdk/services/IssueService.d.ts +2 -1
- package/dist/sdk/services/IssueTypeService.d.ts +2 -1
- package/dist/sdk/services/IssueUpdateService.d.ts +2 -1
- package/dist/sdk/services/LicenseService.d.ts +2 -1
- package/dist/sdk/services/OrganizationAccessService.d.ts +2 -1
- package/dist/sdk/services/OrganizationService.d.ts +2 -1
- package/dist/sdk/services/ProjectAccessService.d.ts +2 -1
- package/dist/sdk/services/ProjectAttachmentService.d.ts +2 -1
- package/dist/sdk/services/ProjectFileService.d.ts +2 -1
- package/dist/sdk/services/ProjectService.d.ts +2 -1
- package/dist/sdk/services/TeamService.d.ts +2 -1
- package/dist/sdk/services/UserFormService.d.ts +2 -1
- package/dist/sdk/services/UserFormSubmissionService.d.ts +2 -1
- package/dist/sdk/services/WorkspaceService.d.ts +2 -1
- package/dist/sdk/typings.d.ts +1 -1
- package/package.json +1 -1
package/dist/sdk/base.d.ts
CHANGED
package/dist/sdk/sdk.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OvermapSDKConstructor } from "./index";
|
|
1
|
+
import { BaseSDK, OvermapSDKConstructor } from "./index";
|
|
2
2
|
import { ToolkitStore } from "@reduxjs/toolkit/dist/configureStore";
|
|
3
3
|
import { BaseState } from "../typings";
|
|
4
|
-
export declare const initSDK: <TState extends BaseState
|
|
4
|
+
export declare const initSDK: <TState extends BaseState, TSDK extends BaseSDK<TState>>(store: ToolkitStore<TState>, sdk: OvermapSDKConstructor<TState, TSDK>) => TSDK;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AgentUserConversation, OvermapRootState } from "../../typings";
|
|
2
2
|
import { BaseApiService } from "./BaseApiService";
|
|
3
|
-
|
|
3
|
+
import type { BaseSDK } from "../base";
|
|
4
|
+
export declare abstract class AgentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
4
5
|
startConversation(prompt: string): Promise<AgentUserConversation>;
|
|
5
6
|
/**
|
|
6
7
|
* Prompt the agent with a message.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { BaseAttachmentService } from "./BaseAttachmentService";
|
|
2
2
|
import { AttachmentModel, AssetAttachment, Stored, OvermapRootState } from "../../typings";
|
|
3
3
|
import { OptimisticMultipleModelResult } from "../typings";
|
|
4
|
-
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
export declare abstract class AssetAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, AssetAttachment> {
|
|
5
6
|
attachmentModel: AttachmentModel;
|
|
6
7
|
initializeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetAttachment>[], "assetAttachments/initializeAssetAttachments">;
|
|
7
8
|
addAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetAttachment>[], "assetAttachments/addAssetAttachments">;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Asset, Created, Payload, OvermapRootState } from "../../typings";
|
|
2
2
|
import { OptimisticModelResult } from "../typings";
|
|
3
3
|
import { BaseApiService } from "./BaseApiService";
|
|
4
|
-
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
export declare abstract class AssetService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
5
6
|
add(asset: Payload<Asset>, workspaceId: string): OptimisticModelResult<Asset>;
|
|
6
7
|
update(asset: Asset, workspaceId: string): OptimisticModelResult<Asset>;
|
|
7
8
|
remove(assetId: string): Promise<undefined>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { OptimisticModelResult } from "../typings";
|
|
2
2
|
import { AssetStageCompletion, OvermapRootState, Payload } from "../../typings";
|
|
3
3
|
import { BaseApiService } from "./BaseApiService";
|
|
4
|
-
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
export declare abstract class AssetStageCompletionService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
5
6
|
add(assetId: string, stageId: string): OptimisticModelResult<AssetStageCompletion>;
|
|
6
7
|
refreshStore(): Promise<void>;
|
|
7
8
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AssetStage, AssetStagePayload, OvermapRootState, Payload } from "../../typings";
|
|
2
2
|
import { BaseApiService } from "./BaseApiService";
|
|
3
|
-
|
|
3
|
+
import type { BaseSDK } from "../base";
|
|
4
|
+
export declare abstract class AssetStageService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
4
5
|
bulkCreateStages(stagesToSubmit: Payload<AssetStagePayload>[], assetTypeId: string, workspaceId: string): Promise<AssetStage[]>;
|
|
5
6
|
bulkUpdateStages(stagesToUpdate: AssetStage[], assetTypeId: string): Promise<AssetStage[]>;
|
|
6
7
|
bulkDelete(idsToDelete: string[]): Promise<undefined>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { BaseAttachmentService } from "./BaseAttachmentService";
|
|
2
2
|
import { AttachmentModel, AssetTypeAttachment, Stored, OvermapRootState } from "../../typings";
|
|
3
3
|
import { OptimisticMultipleModelResult } from "../typings";
|
|
4
|
-
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
export declare abstract class AssetTypeAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, AssetTypeAttachment> {
|
|
5
6
|
attachmentModel: AttachmentModel;
|
|
6
7
|
initializeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetTypeAttachment>[], "assetTypeAttachments/initializeAssetTypeAttachments">;
|
|
7
8
|
addAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<AssetTypeAttachment>[], "assetTypeAttachments/addAssetTypeAttachments">;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AssetType, OvermapRootState, Payload } from "../../typings";
|
|
2
2
|
import { OptimisticModelResult } from "../typings";
|
|
3
3
|
import { BaseApiService } from "./BaseApiService";
|
|
4
|
-
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
export declare abstract class AssetTypeService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
5
6
|
add(assetType: Payload<AssetType>): OptimisticModelResult<AssetType>;
|
|
6
7
|
update(assetType: AssetType): Promise<undefined>;
|
|
7
8
|
delete(assetTypeId: string): Promise<undefined>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { BaseApiService } from "./BaseApiService";
|
|
2
|
-
import { RegistrationPayload, RegistrationReturn } from "../../typings";
|
|
2
|
+
import { BaseState, RegistrationPayload, RegistrationReturn } from "../../typings";
|
|
3
|
+
import type { BaseSDK } from "../base";
|
|
3
4
|
/**
|
|
4
5
|
* Handles login, logout and renewing tokens
|
|
5
6
|
*/
|
|
6
|
-
export declare class AuthService extends BaseApiService {
|
|
7
|
+
export declare class AuthService<TSDK extends BaseSDK<BaseState>> extends BaseApiService<BaseState, TSDK> {
|
|
7
8
|
host: string;
|
|
8
9
|
private _getAccessToken;
|
|
9
10
|
private _getRefreshToken;
|
|
@@ -5,10 +5,10 @@ import { SDKRequest } from "../typings";
|
|
|
5
5
|
/**
|
|
6
6
|
* Abstract base class for building a service that can enqueue API requests
|
|
7
7
|
*/
|
|
8
|
-
export declare abstract class BaseApiService<TStore extends BaseState
|
|
9
|
-
protected readonly client:
|
|
8
|
+
export declare abstract class BaseApiService<TStore extends BaseState, TSDK extends BaseSDK<TStore>> {
|
|
9
|
+
protected readonly client: TSDK;
|
|
10
10
|
abstract readonly host: string;
|
|
11
|
-
constructor(sdk:
|
|
11
|
+
constructor(sdk: TSDK);
|
|
12
12
|
/**
|
|
13
13
|
* Enqueues an API request to the offline outbox.
|
|
14
14
|
* @param requestDetails An SDKRequest object containing the details of the request.
|
|
@@ -2,6 +2,7 @@ import { ActionCreatorWithPayload } from "@reduxjs/toolkit";
|
|
|
2
2
|
import { OptimisticMultipleModelResult } from "../typings";
|
|
3
3
|
import { Attachment, AttachmentModel, OvermapRootState, OvermapSelectorWithArgs, Stored, Submitted } from "../../typings";
|
|
4
4
|
import { BaseApiService } from "./BaseApiService";
|
|
5
|
+
import type { BaseSDK } from "../base";
|
|
5
6
|
export interface BuildOfflineAttachmentData<TModelId> {
|
|
6
7
|
file: File;
|
|
7
8
|
sha1: string;
|
|
@@ -10,7 +11,7 @@ export interface BuildOfflineAttachmentData<TModelId> {
|
|
|
10
11
|
description?: string;
|
|
11
12
|
modelId: TModelId;
|
|
12
13
|
}
|
|
13
|
-
export declare abstract class BaseAttachmentService<TState extends OvermapRootState, TModelId extends string | number, TAttachment extends Attachment> extends BaseApiService<TState> {
|
|
14
|
+
export declare abstract class BaseAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>, TModelId extends string | number, TAttachment extends Attachment> extends BaseApiService<TState, TSDK> {
|
|
14
15
|
abstract readonly attachmentModel: AttachmentModel;
|
|
15
16
|
abstract readonly initializeAttachments: ActionCreatorWithPayload<Submitted<TAttachment>[]>;
|
|
16
17
|
abstract readonly addAttachments: ActionCreatorWithPayload<Submitted<TAttachment>[]>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Category, Offline, OvermapRootState, Payload } from "../../typings";
|
|
2
2
|
import { OptimisticModelResult } from "../typings";
|
|
3
3
|
import { BaseApiService } from "./BaseApiService";
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
4
5
|
/**
|
|
5
6
|
* Handles the creation of Category Service
|
|
6
7
|
* TODO: Support editing and deleting categories
|
|
7
8
|
*/
|
|
8
|
-
export declare abstract class CategoryService<TState extends OvermapRootState
|
|
9
|
+
export declare abstract class CategoryService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
9
10
|
add(category: Omit<Payload<Category>, "workspace">, workspaceId: string): OptimisticModelResult<Category>;
|
|
10
11
|
update(category: Offline<Partial<Category>>, workspaceId: string): OptimisticModelResult<Category>;
|
|
11
12
|
remove(category: Category, workspaceId: string): Promise<undefined>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { BaseAttachmentService } from "./BaseAttachmentService";
|
|
2
2
|
import { AttachmentModel, DocumentAttachment, OvermapRootState, Stored } from "../../typings";
|
|
3
3
|
import { OptimisticMultipleModelResult } from "../typings";
|
|
4
|
-
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
export declare abstract class DocumentAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, DocumentAttachment> {
|
|
5
6
|
attachmentModel: AttachmentModel;
|
|
6
7
|
initializeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<DocumentAttachment>[], "documentAttachments/initializeDocumentAttachments">;
|
|
7
8
|
addAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<DocumentAttachment>[], "documentAttachments/addDocumentAttachments">;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Document, DocumentPayload, MovePosition, OvermapRootState, Submitted } from "../../typings";
|
|
2
2
|
import { OptimisticModelResult } from "../typings";
|
|
3
3
|
import { BaseApiService } from "./BaseApiService";
|
|
4
|
-
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
export declare abstract class DocumentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
5
6
|
add(document: DocumentPayload): OptimisticModelResult<Document>;
|
|
6
7
|
update(document: Submitted<Partial<Document>>): OptimisticModelResult<Document>;
|
|
7
8
|
move(documentId: string, targetDocumentId: string | null, position: MovePosition): Promise<Document[]>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EmailDomain, OvermapRootState } from "../../typings";
|
|
2
2
|
import { BaseApiService } from "./BaseApiService";
|
|
3
|
-
|
|
3
|
+
import type { BaseSDK } from "../base";
|
|
4
|
+
export declare abstract class EmailDomainsService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
4
5
|
add(orgId: number, email: string): Promise<undefined>;
|
|
5
6
|
remove(emailDomain: EmailDomain): Promise<undefined>;
|
|
6
7
|
refreshStore(): Promise<undefined>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseApiService } from "../../sdk";
|
|
1
|
+
import { BaseApiService, type BaseSDK } from "../../sdk";
|
|
2
2
|
import { EmailVerificationPayload, EmailVerificationReturn, OvermapRootState, VerificationCode } from "../../typings";
|
|
3
|
-
export declare abstract class EmailVerificationService<TState extends OvermapRootState
|
|
3
|
+
export declare abstract class EmailVerificationService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
4
4
|
getVerificationCode(verificationCode: string): Promise<VerificationCode>;
|
|
5
5
|
validateVerificationCode(verificationCode: string, payload?: EmailVerificationPayload | undefined): Promise<EmailVerificationReturn>;
|
|
6
6
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { BaseApiService } from "./BaseApiService";
|
|
2
|
+
import type { BaseSDK } from "../base";
|
|
3
|
+
import { BaseState } from "../../typings";
|
|
2
4
|
export interface GetS3UrlSuccessResponse {
|
|
3
5
|
url: string;
|
|
4
6
|
fields: Record<string, string>;
|
|
@@ -15,7 +17,7 @@ interface DatabaseFileProperties {
|
|
|
15
17
|
*/
|
|
16
18
|
file: string;
|
|
17
19
|
}
|
|
18
|
-
export declare class FileService extends BaseApiService {
|
|
20
|
+
export declare class FileService<TSDK extends BaseSDK<BaseState>> extends BaseApiService<BaseState, TSDK> {
|
|
19
21
|
host: string;
|
|
20
22
|
private _dbPromise;
|
|
21
23
|
private renewUploadUrl;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { BaseAttachmentService } from "./BaseAttachmentService";
|
|
2
2
|
import { OptimisticMultipleModelResult } from "../typings";
|
|
3
3
|
import { AttachmentModel, IssueAttachment, OvermapRootState, Stored } from "../../typings";
|
|
4
|
-
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
export declare abstract class IssueAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, string, IssueAttachment> {
|
|
5
6
|
attachmentModel: AttachmentModel;
|
|
6
7
|
initializeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<IssueAttachment>[], "issueAttachments/initializeIssueAttachments">;
|
|
7
8
|
addAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<IssueAttachment>[], "issueAttachments/addIssueAttachments">;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { IssueComment, OvermapRootState, Payload, Submitted } from "../../typings";
|
|
2
2
|
import { OptimisticModelResult } from "../typings";
|
|
3
3
|
import { BaseApiService } from "./BaseApiService";
|
|
4
|
-
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
export declare abstract class IssueCommentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
5
6
|
add(comment: Omit<Payload<IssueComment>, "author" | "submitted_at">): OptimisticModelResult<IssueComment>;
|
|
6
7
|
update(comment: Submitted<IssueComment>): OptimisticModelResult<IssueComment>;
|
|
7
8
|
remove(offline_id: string): Promise<undefined>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { OptimisticModelResult } from "../typings";
|
|
2
2
|
import { Issue, IssueType, OvermapRootState, Submitted } from "../../typings";
|
|
3
3
|
import { BaseApiService } from "./BaseApiService";
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
4
5
|
/**
|
|
5
6
|
* Handles CRUD operations on issues
|
|
6
7
|
*/
|
|
7
|
-
export declare abstract class IssueService<TState extends OvermapRootState
|
|
8
|
+
export declare abstract class IssueService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
8
9
|
add(issue: Issue, issueType?: IssueType["offline_id"] | null): OptimisticModelResult<Issue>;
|
|
9
10
|
update(issue: Submitted<Partial<Issue>>): OptimisticModelResult<Issue>;
|
|
10
11
|
remove(id: string): Promise<undefined>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { OptimisticModelResult } from "../typings";
|
|
2
2
|
import { IssueType, IssueTypePayload, Offline, OvermapRootState } from "../../typings";
|
|
3
3
|
import { BaseApiService } from "./BaseApiService";
|
|
4
|
-
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
export declare abstract class IssueTypeService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
5
6
|
add(payload: IssueTypePayload): OptimisticModelResult<IssueType>;
|
|
6
7
|
update(issueTypeFields: Offline<Partial<IssueType>>): OptimisticModelResult<IssueType>;
|
|
7
8
|
delete(issueTypeId: string): Promise<void>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { OvermapRootState } from "../../typings";
|
|
2
2
|
import { BaseApiService } from "./BaseApiService";
|
|
3
|
-
|
|
3
|
+
import type { BaseSDK } from "../base";
|
|
4
|
+
export declare abstract class IssueUpdateService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
4
5
|
refreshStore(): Promise<void>;
|
|
5
6
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { License, OvermapRootState, Project, Transaction } from "../../typings";
|
|
2
2
|
import { BaseApiService } from "./BaseApiService";
|
|
3
|
-
|
|
3
|
+
import type { BaseSDK } from "../base";
|
|
4
|
+
export declare abstract class LicenseService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
4
5
|
fetchLicensesForOrganization(organizationId: number, showLoading?: boolean): Promise<License[]>;
|
|
5
6
|
getLicense(license: License): Promise<License>;
|
|
6
7
|
pauseLicense(license: License): Promise<License>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { OrganizationAccess, OvermapRootState } from "../../typings";
|
|
2
2
|
import { BaseApiService } from "./BaseApiService";
|
|
3
|
+
import type { BaseSDK } from "../base";
|
|
3
4
|
/**
|
|
4
5
|
* Handles the creation of OrganizationAccess Service
|
|
5
6
|
*/
|
|
6
|
-
export declare abstract class OrganizationAccessService<TState extends OvermapRootState
|
|
7
|
+
export declare abstract class OrganizationAccessService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
7
8
|
update(organizationAccess: OrganizationAccess): Promise<OrganizationAccess>;
|
|
8
9
|
remove(organizationAccess: OrganizationAccess): Promise<undefined>;
|
|
9
10
|
refreshStore(): Promise<void>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { InitialOrganizationData, Organization, OvermapRootState } from "../../typings";
|
|
2
2
|
import { BaseApiService } from "./BaseApiService";
|
|
3
|
-
|
|
3
|
+
import type { BaseSDK } from "../base";
|
|
4
|
+
export declare abstract class OrganizationService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
4
5
|
fetchInitialOrganizationData(organizationId: number, showLoading: boolean): Promise<InitialOrganizationData>;
|
|
5
6
|
_processInitialOrganizationData(data: InitialOrganizationData, showLoading: boolean): void;
|
|
6
7
|
create(name: string): Promise<Organization>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { OvermapRootState, ProjectAccess } from "../../typings";
|
|
2
2
|
import { BaseApiService } from "./BaseApiService";
|
|
3
|
+
import type { BaseSDK } from "../base";
|
|
3
4
|
/**
|
|
4
5
|
* Handles the creation of ProjectAccess Service
|
|
5
6
|
*/
|
|
6
|
-
export declare abstract class ProjectAccessService<TState extends OvermapRootState
|
|
7
|
+
export declare abstract class ProjectAccessService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
7
8
|
fetchAll(projectId: number): Promise<ProjectAccess[]>;
|
|
8
9
|
update(projectAccess: ProjectAccess): Promise<ProjectAccess>;
|
|
9
10
|
remove(projectAccess: ProjectAccess): Promise<undefined>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { BaseAttachmentService } from "./BaseAttachmentService";
|
|
2
2
|
import { AttachmentModel, OvermapRootState, ProjectAttachment, Stored } from "../../typings";
|
|
3
3
|
import { OptimisticMultipleModelResult } from "../typings";
|
|
4
|
-
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
export declare abstract class ProjectAttachmentService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseAttachmentService<TState, TSDK, number, ProjectAttachment> {
|
|
5
6
|
attachmentModel: AttachmentModel;
|
|
6
7
|
initializeAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<ProjectAttachment>[], "projectAttachments/initializeProjectAttachments">;
|
|
7
8
|
addAttachments: import("@reduxjs/toolkit").ActionCreatorWithPayload<Stored<ProjectAttachment>[], "projectAttachments/addProjectAttachments">;
|
|
@@ -2,10 +2,11 @@ import { ProjectFile } from '../../typings/models/projects';
|
|
|
2
2
|
import { OptimisticGenericResult } from "../typings";
|
|
3
3
|
import { OvermapRootState } from "../../typings";
|
|
4
4
|
import { BaseApiService } from "./BaseApiService";
|
|
5
|
+
import type { BaseSDK } from "../base";
|
|
5
6
|
/**
|
|
6
7
|
* Handles creation and caching of ProjectFiles
|
|
7
8
|
*/
|
|
8
|
-
export declare abstract class ProjectFileService<TState extends OvermapRootState
|
|
9
|
+
export declare abstract class ProjectFileService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
9
10
|
refreshStore(): Promise<void>;
|
|
10
11
|
saveExisting(file: ProjectFile): Promise<ProjectFile>;
|
|
11
12
|
saveActive(): OptimisticGenericResult<ProjectFile>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Project } from '../../typings/models/projects';
|
|
2
2
|
import { OvermapRootState, Payload } from "../../typings";
|
|
3
3
|
import { BaseApiService } from "./BaseApiService";
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
4
5
|
interface JoinProjectResponse {
|
|
5
6
|
username: string;
|
|
6
7
|
}
|
|
7
|
-
export declare abstract class ProjectService<TState extends OvermapRootState
|
|
8
|
+
export declare abstract class ProjectService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
8
9
|
/**
|
|
9
10
|
* Creates a new project. Due to the nature of project creation,
|
|
10
11
|
* @param project A Payload<Project> object containing project attributes.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { OvermapRootState, Stored, Team, TeamPayload, User } from "../../typings";
|
|
2
2
|
import { OptimisticModelResult } from "../typings";
|
|
3
3
|
import { BaseApiService } from "./BaseApiService";
|
|
4
|
-
|
|
4
|
+
import type { BaseSDK } from "../base";
|
|
5
|
+
export declare abstract class TeamService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
5
6
|
add(teamPayload: TeamPayload): OptimisticModelResult<Team>;
|
|
6
7
|
update(team: Stored<Team>): OptimisticModelResult<Team>;
|
|
7
8
|
delete(teamId: string): Promise<undefined>;
|
|
@@ -3,7 +3,8 @@ import { OptimisticModelResult } from "../typings";
|
|
|
3
3
|
import { Created, Submitted, OvermapRootState } from "../../typings";
|
|
4
4
|
import { ISerializedField } from "../../forms";
|
|
5
5
|
import { BaseApiService } from "./BaseApiService";
|
|
6
|
-
|
|
6
|
+
import type { BaseSDK } from "../base";
|
|
7
|
+
export declare abstract class UserFormService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
7
8
|
private getAttachImagePromises;
|
|
8
9
|
private add;
|
|
9
10
|
addForOrganization(organizationId: number, initialRevision: UserFormRevisionPayload): Promise<[Submitted<UserForm>, Submitted<UserFormRevision<ISerializedField>>, Promise<Created<UserFormRevision<ISerializedField>>>, Promise<Created<UserFormRevision<ISerializedField>>>]>;
|
|
@@ -5,12 +5,13 @@ import { FieldValue } from '../../forms';
|
|
|
5
5
|
import { Created, OvermapRootState, Stored } from "../../typings";
|
|
6
6
|
import { GetS3UrlSuccessResponse } from "./FileService";
|
|
7
7
|
import { BaseApiService } from "./BaseApiService";
|
|
8
|
+
import type { BaseSDK } from "../base";
|
|
8
9
|
interface BulkAddRequestReturnValue {
|
|
9
10
|
submissions: Created<UserFormSubmission>[];
|
|
10
11
|
attachments: Created<UserFormSubmissionAttachment>[];
|
|
11
12
|
presigned_urls: Record<string, GetS3UrlSuccessResponse>;
|
|
12
13
|
}
|
|
13
|
-
export declare abstract class UserFormSubmissionService<TState extends OvermapRootState
|
|
14
|
+
export declare abstract class UserFormSubmissionService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
14
15
|
private getAttachFilesPromises;
|
|
15
16
|
add(payload: Offline<UserFormSubmissionPayload>): OptimisticModelResult<UserFormSubmission>;
|
|
16
17
|
bulkAdd(args: {
|
|
@@ -3,7 +3,8 @@ import { Workspace } from '../../typings/models/workspace';
|
|
|
3
3
|
import { OptimisticModelResult } from "../typings";
|
|
4
4
|
import { OvermapRootState } from "../../typings";
|
|
5
5
|
import { BaseApiService } from "./BaseApiService";
|
|
6
|
-
|
|
6
|
+
import type { BaseSDK } from "../base";
|
|
7
|
+
export declare abstract class WorkspaceService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
7
8
|
add(workspace: Payload<Workspace>): OptimisticModelResult<Workspace>;
|
|
8
9
|
update(workspace: Workspace): OptimisticModelResult<Workspace>;
|
|
9
10
|
delete(workspaceId: string): Promise<undefined>;
|
package/dist/sdk/typings.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { BaseState, Created, Model, Stored, Submitted } from "../typings";
|
|
|
5
5
|
import { DeferredPromise } from "../utils/async/DeferredPromise";
|
|
6
6
|
import { GetS3UrlResponse } from "./services";
|
|
7
7
|
import { BaseSDK } from "./base";
|
|
8
|
-
export type OvermapSDKConstructor<TState extends BaseState
|
|
8
|
+
export type OvermapSDKConstructor<TState extends BaseState, TSDK extends BaseSDK<TState>> = new (store: ToolkitStore<TState>) => TSDK;
|
|
9
9
|
export interface TokenPair {
|
|
10
10
|
accessToken: string;
|
|
11
11
|
refreshToken: string;
|
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.60-sdk-refactor.
|
|
6
|
+
"version": "1.0.60-sdk-refactor.2",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/overmap-core.umd.cjs",
|
|
9
9
|
"module": "dist/overmap-core.js",
|