@overmap-ai/core 1.0.60-sdk-refactor.7 → 1.0.60-sdk-refactor.8

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.
@@ -1,17 +1,12 @@
1
- import { AnyAction } from "@reduxjs/toolkit";
2
1
  import type { BaseSDK } from "../base";
3
2
  import { BaseState } from "../../typings";
4
- import { SDKRequest } from "../typings";
5
3
  import { BaseAuthService } from "./BaseAuthService";
6
- export declare const CLASS_NAME_TO_SERVICE: Record<string, BaseApiService<BaseState, BaseSDK<BaseState>>>;
4
+ import { BaseService } from "./BaseService";
5
+ export declare const CLASS_NAME_TO_SERVICE: Record<string, BaseService<BaseState, BaseSDK<BaseState>>>;
7
6
  /**
8
7
  * Abstract base class for building a service that can enqueue API requests
9
8
  */
10
- export declare abstract class BaseApiService<TStore extends BaseState, TSDK extends BaseSDK<TStore>> {
11
- protected readonly client: TSDK;
12
- abstract readonly host: string;
9
+ export declare abstract class BaseApiService<TStore extends BaseState, TSDK extends BaseSDK<TStore>> extends BaseService<TStore, TSDK> {
13
10
  readonly auth: BaseAuthService<TStore, TSDK>;
14
11
  constructor(sdk: TSDK, auth: BaseAuthService<TStore, TSDK>);
15
- protected enqueueRequest<TResult>(requestDetails: SDKRequest): Promise<TResult>;
16
- protected dispatch(action: AnyAction): void;
17
12
  }
@@ -1,14 +1,9 @@
1
- import { AnyAction } from "@reduxjs/toolkit";
2
1
  import { Response, SuperAgentRequest } from "superagent";
3
2
  import { BaseState } from "../../typings";
4
3
  import type { BaseSDK } from "../base";
5
- import { SDKRequest } from "../typings";
6
- export declare abstract class BaseAuthService<TStore extends BaseState, TSDK extends BaseSDK<TStore>> {
7
- protected readonly client: TSDK;
8
- abstract readonly host: string;
9
- constructor(sdk: TSDK);
10
- protected enqueueRequest<TResult>(requestDetails: SDKRequest): Promise<TResult>;
11
- protected dispatch(action: AnyAction): void;
4
+ import { BaseService } from "./BaseService";
5
+ export declare abstract class BaseAuthService<TStore extends BaseState, TSDK extends BaseSDK<TStore>> extends BaseService<TStore, TSDK> {
6
+ protected constructor(sdk: TSDK);
12
7
  abstract initAuth(username: string, password: string): Promise<void>;
13
8
  abstract clearAuth(): void;
14
9
  abstract prepareAuth(): Promise<void>;
@@ -0,0 +1,15 @@
1
+ import { AnyAction } from "@reduxjs/toolkit";
2
+ import type { BaseSDK } from "../base";
3
+ import { BaseState } from "../../typings";
4
+ import { SDKRequest } from "../typings";
5
+ export declare const CLASS_NAME_TO_SERVICE: Record<string, BaseService<BaseState, BaseSDK<BaseState>>>;
6
+ /**
7
+ * Abstract base class for building a service that can enqueue API requests
8
+ */
9
+ export declare abstract class BaseService<TStore extends BaseState, TSDK extends BaseSDK<TStore>> {
10
+ protected readonly client: TSDK;
11
+ abstract readonly host: string;
12
+ protected constructor(sdk: TSDK);
13
+ protected enqueueRequest<TResult>(requestDetails: SDKRequest): Promise<TResult>;
14
+ protected dispatch(action: AnyAction): void;
15
+ }
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.7",
6
+ "version": "1.0.60-sdk-refactor.8",
7
7
  "type": "module",
8
8
  "main": "dist/overmap-core.umd.cjs",
9
9
  "module": "dist/overmap-core.js",