@overmap-ai/core 1.0.78-procedure-steps.6 → 1.0.78-session-auth.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/README.md +4 -4
- package/dist/overmap-core.js +2973 -2934
- package/dist/overmap-core.umd.cjs +7 -7
- package/dist/sdk/services/AssetService.d.ts +2 -1
- package/dist/sdk/services/BaseAuthService.d.ts +4 -5
- package/dist/sdk/services/JWTAuthService.d.ts +5 -4
- package/dist/sdk/services/SessionAuthService.d.ts +13 -0
- package/dist/sdk/services/index.d.ts +1 -0
- package/dist/typings/models/base.d.ts +1 -2
- package/package.json +115 -118
|
@@ -6,7 +6,8 @@ import { BaseApiService } from './BaseApiService';
|
|
|
6
6
|
export declare abstract class AssetService<TState extends OvermapRootState, TSDK extends BaseSDK<TState>> extends BaseApiService<TState, TSDK> {
|
|
7
7
|
add(payload: Payload<Asset>): OptimisticModelResult<Asset>;
|
|
8
8
|
update(payload: UUID<Partial<Payload<Asset>>>): OptimisticModelResult<Asset>;
|
|
9
|
-
|
|
9
|
+
delete(uuid: Asset["uuid"]): Promise<undefined>;
|
|
10
10
|
bulkAdd(payloads: Omit<Payload<Asset>, "asset_type" | "project">[], assetTypeUuid: AssetType["uuid"], projectUuid: Project["uuid"], batchSize: number): Promise<Created<Asset>[]>[];
|
|
11
|
+
bulkDelete(assetUuids: Asset["uuid"][]): Promise<void>;
|
|
11
12
|
refreshStore(projectUuid: Project["uuid"]): Promise<void>;
|
|
12
13
|
}
|
|
@@ -3,10 +3,9 @@ import { BaseState } from '../../store';
|
|
|
3
3
|
import { 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> {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
abstract
|
|
10
|
-
abstract getAuthHeader(): string;
|
|
6
|
+
clearAuth(): void;
|
|
7
|
+
protected initAuth(payload: object): Promise<void>;
|
|
8
|
+
prepareAuth(): Promise<void>;
|
|
9
|
+
abstract prepareRequest(request: SuperAgentRequest): SuperAgentRequest;
|
|
11
10
|
abstract handleUnauthorized(request: SuperAgentRequest, response: Response): Promise<void>;
|
|
12
11
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { default as request } from 'superagent';
|
|
1
|
+
import { default as request, SuperAgentRequest } from 'superagent';
|
|
2
2
|
import { BaseState } from '../../store';
|
|
3
3
|
import { BaseSDK } from '../base';
|
|
4
4
|
import { TokenPair } from '../typings';
|
|
@@ -6,7 +6,7 @@ import { BaseAuthService } from './BaseAuthService';
|
|
|
6
6
|
/**
|
|
7
7
|
* Handles login, logout and renewing tokens
|
|
8
8
|
*/
|
|
9
|
-
export declare abstract class
|
|
9
|
+
export declare abstract class JWTAuthService<TState extends BaseState, TSDK extends BaseSDK<TState>> extends BaseAuthService<TState, TSDK> {
|
|
10
10
|
protected abstract initTokensUrl: string;
|
|
11
11
|
protected abstract refreshTokensUrl: string;
|
|
12
12
|
protected abstract setTokens: (tokens: TokenPair) => void;
|
|
@@ -29,8 +29,9 @@ export declare abstract class JWTService<TState extends BaseState, TSDK extends
|
|
|
29
29
|
*/
|
|
30
30
|
renewTokens(): Promise<undefined>;
|
|
31
31
|
tokenIsExpiringSoon(): boolean;
|
|
32
|
-
getAuthHeader(): string;
|
|
33
32
|
prepareAuth(): Promise<undefined>;
|
|
33
|
+
private getAuthHeader;
|
|
34
|
+
prepareRequest(request: SuperAgentRequest): SuperAgentRequest;
|
|
34
35
|
handleUnauthorized(request: request.SuperAgentRequest, response: request.Response): Promise<void>;
|
|
35
|
-
initAuth(payload: object): Promise<void>;
|
|
36
|
+
protected initAuth(payload: object): Promise<void>;
|
|
36
37
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as request, SuperAgentRequest } from 'superagent';
|
|
2
|
+
import { BaseState } from '../../store';
|
|
3
|
+
import { BaseSDK } from '../base';
|
|
4
|
+
import { BaseAuthService } from './BaseAuthService';
|
|
5
|
+
/**
|
|
6
|
+
* Provides session-based authentication, which does not allow or require accessing tokens using JavaScript.
|
|
7
|
+
*/
|
|
8
|
+
export declare abstract class SessionAuthService<TState extends BaseState, TSDK extends BaseSDK<TState>> extends BaseAuthService<TState, TSDK> {
|
|
9
|
+
protected abstract loginUrl: string;
|
|
10
|
+
clearAuth(): void;
|
|
11
|
+
handleUnauthorized(_request: request.SuperAgentRequest, _response: request.Response): Promise<void>;
|
|
12
|
+
prepareRequest(request: SuperAgentRequest): SuperAgentRequest;
|
|
13
|
+
}
|
|
@@ -54,5 +54,6 @@ export * from './ProjectAccessService';
|
|
|
54
54
|
export * from './ProjectAttachmentService';
|
|
55
55
|
export * from './ProjectFileService';
|
|
56
56
|
export * from './ProjectService';
|
|
57
|
+
export * from './SessionAuthService';
|
|
57
58
|
export * from './TeamService';
|
|
58
59
|
export * from './UserService';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { IconType } from '@overmap-ai/blocks';
|
|
2
1
|
import { MultiPoint, Point } from 'geojson';
|
|
3
2
|
import { COMMON_AUTO_FIELDS } from '../../utils';
|
|
4
3
|
import { CSSColor } from '../colors';
|
|
@@ -64,7 +63,7 @@ export interface OwnedByOrganization {
|
|
|
64
63
|
organization_owner: string;
|
|
65
64
|
}
|
|
66
65
|
export interface IconModel {
|
|
67
|
-
icon:
|
|
66
|
+
icon: string;
|
|
68
67
|
}
|
|
69
68
|
export interface ColorModel {
|
|
70
69
|
color: CSSColor;
|
package/package.json
CHANGED
|
@@ -1,118 +1,115 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@overmap-ai/core",
|
|
3
|
-
"description": "Core functionality for Overmap",
|
|
4
|
-
"author": "Wôrdn Inc.",
|
|
5
|
-
"license": "UNLICENSED",
|
|
6
|
-
"version": "1.0.78-
|
|
7
|
-
"type": "module",
|
|
8
|
-
"main": "dist/overmap-core.umd.cjs",
|
|
9
|
-
"module": "dist/overmap-core.js",
|
|
10
|
-
"types": "dist/index.d.ts",
|
|
11
|
-
"scripts": {
|
|
12
|
-
"dev": "vite",
|
|
13
|
-
"build": "tsc --noEmit && vite build",
|
|
14
|
-
"lint": "tsc --noEmit && eslint --report-unused-disable-directives --max-warnings 0",
|
|
15
|
-
"lint:fix": "eslint --report-unused-disable-directives --max-warnings 0 --fix",
|
|
16
|
-
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md,html,sass,yaml}\"",
|
|
17
|
-
"preview": "vite preview",
|
|
18
|
-
"prepare": "husky",
|
|
19
|
-
"test": "npx vitest"
|
|
20
|
-
},
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"@redux-offline/redux-offline": "^2.6.0",
|
|
23
|
-
"@reduxjs/toolkit": "^2.8.2",
|
|
24
|
-
"color": "^4.2.3",
|
|
25
|
-
"dependency-graph": "^1.0.0",
|
|
26
|
-
"file-saver": "^2.0.5",
|
|
27
|
-
"idb": "^7.1.1",
|
|
28
|
-
"jwt-decode": "^3.1.2",
|
|
29
|
-
"localforage": "^1.10.0",
|
|
30
|
-
"redux": "^5.0.1",
|
|
31
|
-
"redux-persist": "^4.0.0",
|
|
32
|
-
"redux-persist-migrate": "^5.0.0",
|
|
33
|
-
"superagent": "^8.1.2",
|
|
34
|
-
"uuid": "^11.1.0"
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"@
|
|
39
|
-
"@
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"@types/
|
|
43
|
-
"@types/
|
|
44
|
-
"@types/
|
|
45
|
-
"@types/
|
|
46
|
-
"@types/
|
|
47
|
-
"@types/
|
|
48
|
-
"@types/
|
|
49
|
-
"@types/
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
52
|
-
"@
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"eslint": "^
|
|
56
|
-
"eslint-
|
|
57
|
-
"eslint-
|
|
58
|
-
"eslint-plugin-import-
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"vite": "^
|
|
75
|
-
"
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
"url": "
|
|
110
|
-
},
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
"yarn": "4.9.2"
|
|
117
|
-
}
|
|
118
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@overmap-ai/core",
|
|
3
|
+
"description": "Core functionality for Overmap",
|
|
4
|
+
"author": "Wôrdn Inc.",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"version": "1.0.78-session-auth.2",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "dist/overmap-core.umd.cjs",
|
|
9
|
+
"module": "dist/overmap-core.js",
|
|
10
|
+
"types": "dist/index.d.ts",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"dev": "vite",
|
|
13
|
+
"build": "tsc --noEmit && vite build",
|
|
14
|
+
"lint": "tsc --noEmit && eslint --report-unused-disable-directives --max-warnings 0",
|
|
15
|
+
"lint:fix": "eslint --report-unused-disable-directives --max-warnings 0 --fix",
|
|
16
|
+
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md,html,sass,yaml}\"",
|
|
17
|
+
"preview": "vite preview",
|
|
18
|
+
"prepare": "husky",
|
|
19
|
+
"test": "npx vitest"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@redux-offline/redux-offline": "^2.6.0",
|
|
23
|
+
"@reduxjs/toolkit": "^2.8.2",
|
|
24
|
+
"color": "^4.2.3",
|
|
25
|
+
"dependency-graph": "^1.0.0",
|
|
26
|
+
"file-saver": "^2.0.5",
|
|
27
|
+
"idb": "^7.1.1",
|
|
28
|
+
"jwt-decode": "^3.1.2",
|
|
29
|
+
"localforage": "^1.10.0",
|
|
30
|
+
"redux": "^5.0.1",
|
|
31
|
+
"redux-persist": "^4.0.0",
|
|
32
|
+
"redux-persist-migrate": "^5.0.0",
|
|
33
|
+
"superagent": "^8.1.2",
|
|
34
|
+
"uuid": "^11.1.0"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@overmap-ai/forms": "1.0.32-condition-manager.1",
|
|
38
|
+
"@rollup/plugin-commonjs": "^28.0.6",
|
|
39
|
+
"@tiptap/core": "^3.0.7",
|
|
40
|
+
"@types/add": "^2",
|
|
41
|
+
"@types/color": "^3.0.4",
|
|
42
|
+
"@types/file-saver": "^2.0.7",
|
|
43
|
+
"@types/geojson": "^7946.0.16",
|
|
44
|
+
"@types/jwt-decode": "^3.1.0",
|
|
45
|
+
"@types/node": "^20.12.11",
|
|
46
|
+
"@types/react": "^19.1.8",
|
|
47
|
+
"@types/react-dom": "^19.0.3",
|
|
48
|
+
"@types/superagent": "^4.1.18",
|
|
49
|
+
"@types/uuid": "^9.0.3",
|
|
50
|
+
"@vitejs/plugin-react-swc": "^3.11.0",
|
|
51
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
52
|
+
"@vitest/eslint-plugin": "^1.3.4",
|
|
53
|
+
"eslint": "^9.32.0",
|
|
54
|
+
"eslint-config-prettier": "^10.1.8",
|
|
55
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
56
|
+
"eslint-plugin-import-x": "^4.16.1",
|
|
57
|
+
"eslint-plugin-prettier": "^5.5.3",
|
|
58
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
59
|
+
"globals": "^16.3.0",
|
|
60
|
+
"happy-dom": "^15.10.2",
|
|
61
|
+
"husky": "^9.1.7",
|
|
62
|
+
"jiti": "^2.5.1",
|
|
63
|
+
"jsdom": "^23.2.0",
|
|
64
|
+
"lint-staged": "^15.1.0",
|
|
65
|
+
"prettier": "^3.6.2",
|
|
66
|
+
"react": "^19.1.0",
|
|
67
|
+
"react-dom": "^19.0.0",
|
|
68
|
+
"rollup": "^4.45.3",
|
|
69
|
+
"rollup-plugin-polyfill-node": "^0.13.0",
|
|
70
|
+
"typescript": "^5.2.2",
|
|
71
|
+
"typescript-eslint": "^8.38.0",
|
|
72
|
+
"vite": "^6.4.1",
|
|
73
|
+
"vite-plugin-dts": "^4.5.4",
|
|
74
|
+
"vite-plugin-externalize-deps": "^0.9.0",
|
|
75
|
+
"vitest": "3.2.4"
|
|
76
|
+
},
|
|
77
|
+
"peerDependencies": {
|
|
78
|
+
"@overmap-ai/forms": "1.0.32-condition-manager.1",
|
|
79
|
+
"@tiptap/core": "^2.4.0",
|
|
80
|
+
"react": ">=18.2.0 <20.0.0",
|
|
81
|
+
"react-dom": ">=18.2.0 <20.0.0"
|
|
82
|
+
},
|
|
83
|
+
"resolutions": {
|
|
84
|
+
"strip-ansi": "6.0.1",
|
|
85
|
+
"string-width": "4.2.2",
|
|
86
|
+
"wrap-ansi": "7.0.0"
|
|
87
|
+
},
|
|
88
|
+
"lint-staged": {
|
|
89
|
+
"src/**/*.{js,jsx,ts,tsx}": [
|
|
90
|
+
"yarn lint",
|
|
91
|
+
"yarn format"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
"files": [
|
|
95
|
+
"dist"
|
|
96
|
+
],
|
|
97
|
+
"keywords": [
|
|
98
|
+
"react",
|
|
99
|
+
"geospacial",
|
|
100
|
+
"map",
|
|
101
|
+
"components"
|
|
102
|
+
],
|
|
103
|
+
"homepage": "https://overmap.ai",
|
|
104
|
+
"repository": {
|
|
105
|
+
"type": "git",
|
|
106
|
+
"url": "git+https://github.com/hemora-app/overmap-core.git"
|
|
107
|
+
},
|
|
108
|
+
"bugs": {
|
|
109
|
+
"url": "https://github.com/hemora-app/overmap-core/issues"
|
|
110
|
+
},
|
|
111
|
+
"volta": {
|
|
112
|
+
"node": "22.17.0",
|
|
113
|
+
"yarn": "4.9.2"
|
|
114
|
+
}
|
|
115
|
+
}
|