@overmap-ai/core 1.0.48 → 1.0.49-fix-error-messaging.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.
- package/dist/overmap-core.js +66 -49
- package/dist/overmap-core.js.map +1 -1
- package/dist/overmap-core.umd.cjs +66 -49
- package/dist/overmap-core.umd.cjs.map +1 -1
- package/dist/sdk/errors.d.ts +6 -3
- package/dist/sdk/services/CategoryService.d.ts +2 -2
- package/dist/sdk/services/ComponentStageCompletionService.d.ts +2 -2
- package/dist/sdk/services/WorkspaceService.d.ts +2 -2
- package/package.json +1 -1
package/dist/sdk/errors.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import request from "superagent";
|
|
2
2
|
export interface APIErrorOptions {
|
|
3
|
-
|
|
3
|
+
response?: request.Response;
|
|
4
|
+
innerError?: unknown;
|
|
5
|
+
message?: string;
|
|
6
|
+
discard?: boolean;
|
|
4
7
|
}
|
|
5
8
|
export declare class APIError extends Error {
|
|
6
9
|
status: number;
|
|
7
|
-
message: string;
|
|
8
10
|
response: request.Response | undefined;
|
|
11
|
+
message: string;
|
|
9
12
|
options: APIErrorOptions;
|
|
10
|
-
constructor(
|
|
13
|
+
constructor(options: APIErrorOptions);
|
|
11
14
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseApiService } from "./BaseApiService";
|
|
2
2
|
import { Category, Offline, Payload } from "../../typings";
|
|
3
|
-
import {
|
|
3
|
+
import { OptimisticGenericResult, OptimisticModelResult } from "../typings";
|
|
4
4
|
/**
|
|
5
5
|
* Handles the creation of Category Service
|
|
6
6
|
* TODO: Support editing and deleting categories
|
|
@@ -9,7 +9,7 @@ export declare class CategoryService extends BaseApiService {
|
|
|
9
9
|
add(category: Omit<Payload<Category>, "workspace">, workspaceId: string): OptimisticModelResult<Category>;
|
|
10
10
|
fetchAll(projectId: number): OptimisticGenericResult<Category[]>;
|
|
11
11
|
update(category: Offline<Partial<Category>>, workspaceId: string): OptimisticModelResult<Category>;
|
|
12
|
-
remove(category: Category, workspaceId: string):
|
|
12
|
+
remove(category: Category, workspaceId: string): Promise<undefined>;
|
|
13
13
|
/**
|
|
14
14
|
* Overwrites the store with whatever categories are on the server.
|
|
15
15
|
* @returns A promise that resolves to an empty result.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseApiService } from "./BaseApiService";
|
|
2
2
|
import { ComponentStageCompletion } from "../../store";
|
|
3
|
-
import {
|
|
3
|
+
import { OptimisticModelResult } from "../typings";
|
|
4
4
|
import { Payload } from "../../typings";
|
|
5
5
|
export declare class ComponentStageCompletionService extends BaseApiService {
|
|
6
6
|
add(componentId: string, stageId: string): OptimisticModelResult<ComponentStageCompletion>;
|
|
@@ -13,5 +13,5 @@ export declare class ComponentStageCompletionService extends BaseApiService {
|
|
|
13
13
|
* @param stageCompletions
|
|
14
14
|
*/
|
|
15
15
|
bulkAdd(componentTypeId: string, stageCompletions: Payload<ComponentStageCompletion>[]): Promise<void>;
|
|
16
|
-
bulkDelete(stageId: string, componentIds: string[]):
|
|
16
|
+
bulkDelete(stageId: string, componentIds: string[]): Promise<undefined>;
|
|
17
17
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Payload } from '../../typings/models/base';
|
|
2
2
|
import { Workspace } from '../../typings/models/workspace';
|
|
3
|
-
import {
|
|
3
|
+
import { OptimisticModelResult } from "../typings";
|
|
4
4
|
import { BaseApiService } from "./BaseApiService";
|
|
5
5
|
export declare class WorkspaceService extends BaseApiService {
|
|
6
6
|
add(workspace: Payload<Workspace>): OptimisticModelResult<Workspace>;
|
|
7
7
|
update(workspace: Workspace): OptimisticModelResult<Workspace>;
|
|
8
|
-
delete(workspaceId: string): Promise<
|
|
8
|
+
delete(workspaceId: string): Promise<undefined>;
|
|
9
9
|
}
|
package/package.json
CHANGED