@wemap/core 14.0.0-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.
- package/README.md +33 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +866 -0
- package/dist/src/CoreConfig.d.ts +97 -0
- package/dist/src/CoreConfig.d.ts.map +1 -0
- package/dist/src/helpers/SnippetParser.d.ts +179 -0
- package/dist/src/helpers/SnippetParser.d.ts.map +1 -0
- package/dist/src/schemas/types.d.ts +48 -0
- package/dist/src/schemas/types.d.ts.map +1 -0
- package/dist/src/services/HttpClient.d.ts +252 -0
- package/dist/src/services/HttpClient.d.ts.map +1 -0
- package/dist/src/services/LivemapService.d.ts +40 -0
- package/dist/src/services/LivemapService.d.ts.map +1 -0
- package/dist/src/types/common.d.ts +13 -0
- package/dist/src/types/common.d.ts.map +1 -0
- package/dist/src/utils/map.d.ts +28 -0
- package/dist/src/utils/map.d.ts.map +1 -0
- package/dist/src/utils/validators.d.ts +5 -0
- package/dist/src/utils/validators.d.ts.map +1 -0
- package/dist/vitest.config.d.ts +3 -0
- package/dist/vitest.config.d.ts.map +1 -0
- package/package.json +23 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { SnippetParser } from './helpers/SnippetParser';
|
|
2
|
+
/**
|
|
3
|
+
* Initialization options for the Core SDK
|
|
4
|
+
*/
|
|
5
|
+
export interface InitOptions {
|
|
6
|
+
/** The livemap ID (emmid) */
|
|
7
|
+
emmid: string;
|
|
8
|
+
/** Authentication token */
|
|
9
|
+
token: string;
|
|
10
|
+
/** Environment to use - defaults to 'production' */
|
|
11
|
+
env?: 'production' | 'development';
|
|
12
|
+
}
|
|
13
|
+
type Snippet = ReturnType<typeof SnippetParser.parse>;
|
|
14
|
+
/**
|
|
15
|
+
* Core configuration class for initializing the Wemap SDK
|
|
16
|
+
*
|
|
17
|
+
* This class handles SDK initialization, fetches livemap data from the API,
|
|
18
|
+
* and provides access to the global configuration.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* import { core } from '@wemap/core';
|
|
23
|
+
*
|
|
24
|
+
* // Initialize the SDK
|
|
25
|
+
* await core.init({
|
|
26
|
+
* emmid: 'your-emmid',
|
|
27
|
+
* token: 'your-token',
|
|
28
|
+
* env: 'production'
|
|
29
|
+
* });
|
|
30
|
+
*
|
|
31
|
+
* // Access configuration
|
|
32
|
+
* const config = CoreConfig.getConfig();
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare class CoreConfig {
|
|
36
|
+
private static snippet;
|
|
37
|
+
private livemapService;
|
|
38
|
+
private env;
|
|
39
|
+
/**
|
|
40
|
+
* Constructor for CoreConfig
|
|
41
|
+
*
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
constructor();
|
|
45
|
+
private getBaseUrl;
|
|
46
|
+
/**
|
|
47
|
+
* Initialize the core SDK
|
|
48
|
+
*
|
|
49
|
+
* Fetches livemap data from the API using the provided emmid and token.
|
|
50
|
+
* This must be called before using other SDK features that depend on configuration.
|
|
51
|
+
*
|
|
52
|
+
* @param initOptions - Initialization options
|
|
53
|
+
* @param initOptions.emmid - The livemap ID
|
|
54
|
+
* @param initOptions.token - Authentication token
|
|
55
|
+
* @param initOptions.env - Environment ('production' | 'development'), defaults to 'production'
|
|
56
|
+
* @throws {Error} If emmid or token are missing
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```typescript
|
|
60
|
+
* await core.init({
|
|
61
|
+
* emmid: 'abc123',
|
|
62
|
+
* token: 'xyz789',
|
|
63
|
+
* env: 'production'
|
|
64
|
+
* });
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
init(initOptions: InitOptions): Promise<void>;
|
|
68
|
+
/**
|
|
69
|
+
* Get the current global configuration
|
|
70
|
+
*
|
|
71
|
+
* @internal
|
|
72
|
+
*
|
|
73
|
+
* Returns the parsed livemap snippet data that was fetched during initialization.
|
|
74
|
+
* Returns an empty object if the SDK has not been initialized yet.
|
|
75
|
+
*
|
|
76
|
+
* @returns The current snippet configuration object
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```typescript
|
|
80
|
+
* const config = CoreConfig.getConfig();
|
|
81
|
+
* const vpsEndpoint = config?.arNavigationData?.providers?.vps?.endpoint;
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
static getConfig(): Snippet;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Default instance of CoreConfig for convenience
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```typescript
|
|
91
|
+
* import { core } from '@wemap/core';
|
|
92
|
+
* await core.init({ emmid: '...', token: '...' });
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
export declare const core: CoreConfig;
|
|
96
|
+
export {};
|
|
97
|
+
//# sourceMappingURL=CoreConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CoreConfig.d.ts","sourceRoot":"","sources":["../../src/CoreConfig.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,GAAG,CAAC,EAAE,YAAY,GAAG,aAAa,CAAC;CACpC;AAED,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,MAAM,CAAC,OAAO,CAAU;IAChC,OAAO,CAAC,cAAc,CAA+B;IACrD,OAAO,CAAC,GAAG,CAA8C;IAGzD;;;;OAIG;;IAKH,OAAO,CAAC,UAAU;IAIlB;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAsBnD;;;;;;;;;;;;;;;OAeG;IACH,MAAM,CAAC,SAAS,IAAI,OAAO;CAG5B;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,IAAI,YAAmB,CAAC"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { SchemaKey, SchemaProperty, MapObjectType } from '../schemas/types';
|
|
2
|
+
import { BoundingBox } from '@wemap/geo-legacy';
|
|
3
|
+
export declare class SnippetParser {
|
|
4
|
+
static snippet: Record<string, any>;
|
|
5
|
+
static mapObject: MapObjectType;
|
|
6
|
+
static getProperty<T extends SchemaKey>(name: T): SchemaProperty<T>;
|
|
7
|
+
static fillEmptyByDefault(values: Record<string, any>, properties?: Record<string, any>): {
|
|
8
|
+
[x: string]: any;
|
|
9
|
+
};
|
|
10
|
+
static parse(mapObject: MapObjectType): {
|
|
11
|
+
readonly arNavigationData: {
|
|
12
|
+
arRadius: any;
|
|
13
|
+
default: any;
|
|
14
|
+
audio: any;
|
|
15
|
+
cursorVisible: any;
|
|
16
|
+
cursorTimeout: any;
|
|
17
|
+
maxDistanceNavigation: any;
|
|
18
|
+
mapFooter: any;
|
|
19
|
+
indoor: {
|
|
20
|
+
accuracyThreshold: any;
|
|
21
|
+
end: {
|
|
22
|
+
geofence: any;
|
|
23
|
+
visibleDistance: any;
|
|
24
|
+
};
|
|
25
|
+
instructions: {
|
|
26
|
+
geofence: any;
|
|
27
|
+
maxDistance: any;
|
|
28
|
+
minAlt: any;
|
|
29
|
+
opacityDistanceStart: any;
|
|
30
|
+
realSizeScale: any;
|
|
31
|
+
scale: any;
|
|
32
|
+
audioDistance: any;
|
|
33
|
+
};
|
|
34
|
+
itinerary: {
|
|
35
|
+
sampling: any;
|
|
36
|
+
opacityDistanceEnd: any;
|
|
37
|
+
arrowTargetDistance: any;
|
|
38
|
+
};
|
|
39
|
+
mapmatching: {
|
|
40
|
+
network: any;
|
|
41
|
+
maxAngleBearing: any;
|
|
42
|
+
maxDistance: any;
|
|
43
|
+
minDistance: any;
|
|
44
|
+
useItineraryStartAsPosition: any;
|
|
45
|
+
useOrientationMatching: any;
|
|
46
|
+
useStrict: any;
|
|
47
|
+
hugeJumpDistance: any;
|
|
48
|
+
minStepsBetweenOrientationMatching: any;
|
|
49
|
+
minStepsForOrientationMatching: any;
|
|
50
|
+
lastProjectionsWindowSize: any;
|
|
51
|
+
lastProjectionsEdgeAngleThreshold: any;
|
|
52
|
+
disableMMCloseToATurnDistance: any;
|
|
53
|
+
};
|
|
54
|
+
multilevel: {
|
|
55
|
+
geofenceDisableNav: any;
|
|
56
|
+
};
|
|
57
|
+
pinpoints: {
|
|
58
|
+
scale: any;
|
|
59
|
+
updateDistance: any;
|
|
60
|
+
minDistance: any;
|
|
61
|
+
overlap: any;
|
|
62
|
+
label: any;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
outdoor: {
|
|
66
|
+
accuracyThreshold: any;
|
|
67
|
+
end: {
|
|
68
|
+
geofence: any;
|
|
69
|
+
visibleDistance: any;
|
|
70
|
+
};
|
|
71
|
+
instructions: {
|
|
72
|
+
geofence: any;
|
|
73
|
+
maxDistance: any;
|
|
74
|
+
minAlt: any;
|
|
75
|
+
opacityDistanceStart: any;
|
|
76
|
+
realSizeScale: any;
|
|
77
|
+
scale: any;
|
|
78
|
+
audioDistance: any;
|
|
79
|
+
};
|
|
80
|
+
itinerary: {
|
|
81
|
+
sampling: any;
|
|
82
|
+
opacityDistanceEnd: any;
|
|
83
|
+
arrowTargetDistance: any;
|
|
84
|
+
};
|
|
85
|
+
mapmatching: {
|
|
86
|
+
useItineraryStartAsPosition: any;
|
|
87
|
+
network: any;
|
|
88
|
+
maxAngleBearing: any;
|
|
89
|
+
maxDistance: any;
|
|
90
|
+
minDistance: any;
|
|
91
|
+
useOrientationMatching: any;
|
|
92
|
+
useStrict: any;
|
|
93
|
+
hugeJumpDistance: any;
|
|
94
|
+
minStepsBetweenOrientationMatching: any;
|
|
95
|
+
minStepsForOrientationMatching: any;
|
|
96
|
+
lastProjectionsWindowSize: any;
|
|
97
|
+
lastProjectionsEdgeAngleThreshold: any;
|
|
98
|
+
disableMMCloseToATurnDistance: any;
|
|
99
|
+
};
|
|
100
|
+
multilevel: {
|
|
101
|
+
geofenceDisableNav: any;
|
|
102
|
+
};
|
|
103
|
+
pinpoints: {
|
|
104
|
+
scale: any;
|
|
105
|
+
updateDistance: any;
|
|
106
|
+
minDistance: any;
|
|
107
|
+
overlap: any;
|
|
108
|
+
label: any;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
providers: {
|
|
112
|
+
blacklist: any;
|
|
113
|
+
gnssWifi: {
|
|
114
|
+
discardPositionsAbove: any;
|
|
115
|
+
enableHighAccuracy: any;
|
|
116
|
+
};
|
|
117
|
+
polestarkey: any;
|
|
118
|
+
straightLineDetector: {
|
|
119
|
+
stepsConsideredForStraightLine: any;
|
|
120
|
+
};
|
|
121
|
+
stepDetector: {
|
|
122
|
+
algorithm: any;
|
|
123
|
+
stepSizeMultiplier: any;
|
|
124
|
+
minMaxPeaks2: {
|
|
125
|
+
windowTime: any;
|
|
126
|
+
minTimeBetweenSteps: any;
|
|
127
|
+
maxFrequency: any;
|
|
128
|
+
minFrequency: any;
|
|
129
|
+
verticalAccPositivePeakThreshold: any;
|
|
130
|
+
verticalAccNegativePeakThreshold: any;
|
|
131
|
+
};
|
|
132
|
+
minMaxPeaks3: {
|
|
133
|
+
windowTime: any;
|
|
134
|
+
minTimeBetweenSteps: any;
|
|
135
|
+
maxFrequency: any;
|
|
136
|
+
minFrequency: any;
|
|
137
|
+
verticalAccPositivePeakThreshold: any;
|
|
138
|
+
verticalAccNegativePeakThreshold: any;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
useMapMatching: any;
|
|
142
|
+
usePositionSmoother: any;
|
|
143
|
+
useAllAbsolutePositions: any;
|
|
144
|
+
vps: {
|
|
145
|
+
endpoint: any;
|
|
146
|
+
minInclinationForRequest: any;
|
|
147
|
+
useInclination: any;
|
|
148
|
+
requestInterval: any;
|
|
149
|
+
useCoarsePose: any;
|
|
150
|
+
waitTimeMinInclinationForRequest: any;
|
|
151
|
+
};
|
|
152
|
+
whitelist: any;
|
|
153
|
+
};
|
|
154
|
+
visibleTags: any;
|
|
155
|
+
};
|
|
156
|
+
readonly aroundme: boolean;
|
|
157
|
+
readonly deepLinkingEnabled: any;
|
|
158
|
+
readonly dragging: any;
|
|
159
|
+
readonly emmid: number;
|
|
160
|
+
readonly handleBearing: any;
|
|
161
|
+
readonly initialBounds: BoundingBox;
|
|
162
|
+
readonly initialBearing: any;
|
|
163
|
+
readonly limit: number;
|
|
164
|
+
readonly locked: any;
|
|
165
|
+
readonly maxBounds: BoundingBox;
|
|
166
|
+
readonly maxZoom: any;
|
|
167
|
+
readonly minZoom: any;
|
|
168
|
+
readonly name: string;
|
|
169
|
+
readonly pitchEnabled: any;
|
|
170
|
+
readonly pitchStart: any;
|
|
171
|
+
readonly providersEnabled: any;
|
|
172
|
+
readonly routingMode: any;
|
|
173
|
+
readonly routingType: any;
|
|
174
|
+
readonly routingUrl: any;
|
|
175
|
+
readonly scrollWheelZoom: any;
|
|
176
|
+
readonly tilesStyle: any;
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=SnippetParser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SnippetParser.d.ts","sourceRoot":"","sources":["../../../src/helpers/SnippetParser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAiGhD,qBAAa,aAAa;IACxB,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IACzC,MAAM,CAAC,SAAS,EAAE,aAAa,CAAC;IAEhC,MAAM,CAAC,WAAW,CAAC,CAAC,SAAS,SAAS,EAAE,IAAI,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC;IAqBnE,MAAM,CAAC,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;IAuBvF,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCtC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { default as schema } from './livemap.snippet.json';
|
|
2
|
+
export type SchemaKey = keyof typeof schema['properties'];
|
|
3
|
+
type TypeMap = {
|
|
4
|
+
string: string;
|
|
5
|
+
boolean: boolean;
|
|
6
|
+
number: number;
|
|
7
|
+
integer: number;
|
|
8
|
+
};
|
|
9
|
+
type EnumType<T> = T extends readonly (infer U)[] ? U : any;
|
|
10
|
+
type Transform<T> = {
|
|
11
|
+
[K in keyof T]: T[K] extends {
|
|
12
|
+
properties: infer P;
|
|
13
|
+
} ? Transform<P> : T[K] extends {
|
|
14
|
+
default: infer D;
|
|
15
|
+
type: keyof TypeMap;
|
|
16
|
+
enum?: infer E;
|
|
17
|
+
} ? E extends readonly any[] ? EnumType<E> | (D extends null ? null : any) : D extends null ? TypeMap[T[K]['type']] | null : TypeMap[T[K]['type']] : any;
|
|
18
|
+
};
|
|
19
|
+
export type MapObjectType = {
|
|
20
|
+
author: {
|
|
21
|
+
name: string;
|
|
22
|
+
photo_url: string;
|
|
23
|
+
};
|
|
24
|
+
contribution_list: number | null;
|
|
25
|
+
count: number;
|
|
26
|
+
description: string;
|
|
27
|
+
height: string;
|
|
28
|
+
id: number;
|
|
29
|
+
introcard_avatar_url: string;
|
|
30
|
+
introcard_background_url: string;
|
|
31
|
+
is_empty: boolean;
|
|
32
|
+
is_template: boolean;
|
|
33
|
+
landing_area: 1 | 2 | 3;
|
|
34
|
+
language: string;
|
|
35
|
+
latitude: number;
|
|
36
|
+
latitude_delta: number;
|
|
37
|
+
longitude: number;
|
|
38
|
+
longitude_delta: number;
|
|
39
|
+
name: string;
|
|
40
|
+
preview_url: string;
|
|
41
|
+
snippet: Record<string, any>;
|
|
42
|
+
snippet_version: number;
|
|
43
|
+
user: number;
|
|
44
|
+
width: string;
|
|
45
|
+
};
|
|
46
|
+
export type SchemaProperty<T extends SchemaKey> = Transform<typeof schema['properties']>[T];
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/schemas/types.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,wBAAwB,CAAuB;AAElE,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,MAAM,CAAC,YAAY,CAAC,CAAC;AAE1D,KAAK,OAAO,GAAG;IACX,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,KAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,CAAC,MAAM,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,GAAG,CAAC;AAE5D,KAAK,SAAS,CAAC,CAAC,IAAI;KACf,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS;QAAE,UAAU,EAAE,MAAM,CAAC,CAAA;KAAE,GAClD,SAAS,CAAC,CAAC,CAAC,GACZ,CAAC,CAAC,CAAC,CAAC,SAAS;QAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAAC,IAAI,EAAE,MAAM,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAA;KAAE,GACtE,CAAC,SAAS,SAAS,GAAG,EAAE,GACxB,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,GAAG,GAAG,CAAC,GAC3C,CAAC,SAAS,IAAI,GACd,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,GAC5B,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GACrB,GAAG;CACR,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,MAAM,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB,EAAE,MAAM,CAAC;IAC7B,wBAAwB,EAAE,MAAM,CAAC;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,CAAA;AAED,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,SAAS,IAAI,SAAS,CAAC,OAAO,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP Client Service - Abstracts HTTP requests, error handling, headers, and parsing
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Configuration options for HttpClient
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export interface HttpClientConfig {
|
|
9
|
+
/** Base URL for all requests */
|
|
10
|
+
baseUrl: string;
|
|
11
|
+
/** Default headers to include in all requests */
|
|
12
|
+
defaultHeaders?: Record<string, string>;
|
|
13
|
+
/** Default timeout in milliseconds (defaults to 30000) */
|
|
14
|
+
timeout?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Options for making HTTP requests
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export interface RequestOptions {
|
|
21
|
+
/** HTTP method */
|
|
22
|
+
method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
23
|
+
/** Custom headers to include in the request */
|
|
24
|
+
headers?: Record<string, string>;
|
|
25
|
+
/** Request body (will be JSON stringified if object) */
|
|
26
|
+
body?: any;
|
|
27
|
+
/** Query parameters to append to the URL */
|
|
28
|
+
params?: Record<string, string | number | boolean>;
|
|
29
|
+
/** Request timeout in milliseconds (overrides default timeout) */
|
|
30
|
+
timeout?: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* HTTP response object
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
export interface HttpResponse<T = any> {
|
|
37
|
+
/** Response data (parsed based on content type) */
|
|
38
|
+
data: T;
|
|
39
|
+
/** HTTP status code */
|
|
40
|
+
status: number;
|
|
41
|
+
/** HTTP status text */
|
|
42
|
+
statusText: string;
|
|
43
|
+
/** Response headers */
|
|
44
|
+
headers: Headers;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* HTTP error class thrown by HttpClient
|
|
48
|
+
* @internal
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```typescript
|
|
52
|
+
* try {
|
|
53
|
+
* await httpClient.get('/api/data');
|
|
54
|
+
* } catch (error) {
|
|
55
|
+
* if (error instanceof HttpError) {
|
|
56
|
+
* console.error(`HTTP ${error.status}: ${error.statusText}`);
|
|
57
|
+
* console.error(error.data);
|
|
58
|
+
* }
|
|
59
|
+
* }
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
export declare class HttpError extends Error {
|
|
63
|
+
status: number;
|
|
64
|
+
statusText: string;
|
|
65
|
+
data?: any;
|
|
66
|
+
/**
|
|
67
|
+
* @param status - HTTP status code
|
|
68
|
+
* @param statusText - HTTP status text
|
|
69
|
+
* @param data - Response data (if available)
|
|
70
|
+
* @param message - Error message (optional, defaults to formatted status)
|
|
71
|
+
*/
|
|
72
|
+
constructor(status: number, statusText: string, data?: any, message?: string);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* HTTP Client for making API requests
|
|
76
|
+
* @internal
|
|
77
|
+
*
|
|
78
|
+
* Provides a convenient interface for making HTTP requests with automatic
|
|
79
|
+
* JSON parsing, error handling, timeout support, and header management.
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```typescript
|
|
83
|
+
* const client = new HttpClient({
|
|
84
|
+
* baseUrl: 'https://api.example.com',
|
|
85
|
+
* defaultHeaders: {
|
|
86
|
+
* 'Authorization': 'Bearer token'
|
|
87
|
+
* },
|
|
88
|
+
* timeout: 5000
|
|
89
|
+
* });
|
|
90
|
+
*
|
|
91
|
+
* // GET request
|
|
92
|
+
* const response = await client.get('/users');
|
|
93
|
+
* console.log(response.data);
|
|
94
|
+
*
|
|
95
|
+
* // POST request
|
|
96
|
+
* const result = await client.post('/users', { name: 'John' });
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
export declare class HttpClient {
|
|
100
|
+
private config;
|
|
101
|
+
/**
|
|
102
|
+
* Create a new HttpClient instance
|
|
103
|
+
*
|
|
104
|
+
* @param config - HttpClient configuration
|
|
105
|
+
*/
|
|
106
|
+
constructor(config: HttpClientConfig);
|
|
107
|
+
/**
|
|
108
|
+
* Update the base URL for all subsequent requests
|
|
109
|
+
*
|
|
110
|
+
* @param baseUrl - New base URL
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* ```typescript
|
|
114
|
+
* client.setBaseUrl('https://api.newdomain.com');
|
|
115
|
+
* ```
|
|
116
|
+
*/
|
|
117
|
+
setBaseUrl(baseUrl: string): void;
|
|
118
|
+
/**
|
|
119
|
+
* Update default headers (merges with existing headers)
|
|
120
|
+
*
|
|
121
|
+
* @param headers - Headers to add or update
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* ```typescript
|
|
125
|
+
* client.setDefaultHeaders({
|
|
126
|
+
* 'Authorization': 'Bearer new-token',
|
|
127
|
+
* 'X-Custom-Header': 'value'
|
|
128
|
+
* });
|
|
129
|
+
* ```
|
|
130
|
+
*/
|
|
131
|
+
setDefaultHeaders(headers: Record<string, string>): void;
|
|
132
|
+
/**
|
|
133
|
+
* Build URL with query parameters
|
|
134
|
+
*/
|
|
135
|
+
private buildUrl;
|
|
136
|
+
/**
|
|
137
|
+
* Merge headers with defaults
|
|
138
|
+
*/
|
|
139
|
+
private mergeHeaders;
|
|
140
|
+
/**
|
|
141
|
+
* Parse response body based on content type
|
|
142
|
+
*/
|
|
143
|
+
private parseResponse;
|
|
144
|
+
/**
|
|
145
|
+
* Handle HTTP errors
|
|
146
|
+
*/
|
|
147
|
+
private handleError;
|
|
148
|
+
/**
|
|
149
|
+
* Create abort controller for timeout
|
|
150
|
+
*/
|
|
151
|
+
private createAbortController;
|
|
152
|
+
/**
|
|
153
|
+
* Make an HTTP request
|
|
154
|
+
*
|
|
155
|
+
* This is the core method used by all other HTTP methods (get, post, etc.).
|
|
156
|
+
* It handles URL building, header merging, body serialization, and response parsing.
|
|
157
|
+
*
|
|
158
|
+
* @param endpoint - API endpoint (relative to baseUrl or absolute URL)
|
|
159
|
+
* @param options - Request options
|
|
160
|
+
* @returns Promise resolving to HttpResponse<T>
|
|
161
|
+
* @throws {HttpError} If the request fails or returns an error status
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* ```typescript
|
|
165
|
+
* const response = await client.request('/api/data', {
|
|
166
|
+
* method: 'POST',
|
|
167
|
+
* body: { key: 'value' },
|
|
168
|
+
* headers: { 'X-Custom': 'header' },
|
|
169
|
+
* params: { filter: 'active' }
|
|
170
|
+
* });
|
|
171
|
+
* ```
|
|
172
|
+
*/
|
|
173
|
+
request<T = any>(endpoint: string, options?: RequestOptions): Promise<HttpResponse<T>>;
|
|
174
|
+
/**
|
|
175
|
+
* Make a GET request
|
|
176
|
+
*
|
|
177
|
+
* @param endpoint - API endpoint
|
|
178
|
+
* @param options - Request options (method and body are excluded)
|
|
179
|
+
* @returns Promise resolving to HttpResponse<T>
|
|
180
|
+
*
|
|
181
|
+
* @example
|
|
182
|
+
* ```typescript
|
|
183
|
+
* const response = await client.get('/users', {
|
|
184
|
+
* params: { page: 1, limit: 10 }
|
|
185
|
+
* });
|
|
186
|
+
* ```
|
|
187
|
+
*/
|
|
188
|
+
get<T = any>(endpoint: string, options?: Omit<RequestOptions, 'method' | 'body'>): Promise<HttpResponse<T>>;
|
|
189
|
+
/**
|
|
190
|
+
* Make a POST request
|
|
191
|
+
*
|
|
192
|
+
* @param endpoint - API endpoint
|
|
193
|
+
* @param body - Request body (will be JSON stringified)
|
|
194
|
+
* @param options - Request options (method is excluded)
|
|
195
|
+
* @returns Promise resolving to HttpResponse<T>
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* ```typescript
|
|
199
|
+
* const response = await client.post('/users', {
|
|
200
|
+
* name: 'John',
|
|
201
|
+
* email: 'john@example.com'
|
|
202
|
+
* });
|
|
203
|
+
* ```
|
|
204
|
+
*/
|
|
205
|
+
post<T = any>(endpoint: string, body?: any, options?: Omit<RequestOptions, 'method'>): Promise<HttpResponse<T>>;
|
|
206
|
+
/**
|
|
207
|
+
* Make a PUT request
|
|
208
|
+
*
|
|
209
|
+
* @param endpoint - API endpoint
|
|
210
|
+
* @param body - Request body (will be JSON stringified)
|
|
211
|
+
* @param options - Request options (method is excluded)
|
|
212
|
+
* @returns Promise resolving to HttpResponse<T>
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* ```typescript
|
|
216
|
+
* const response = await client.put('/users/123', {
|
|
217
|
+
* name: 'John Updated'
|
|
218
|
+
* });
|
|
219
|
+
* ```
|
|
220
|
+
*/
|
|
221
|
+
put<T = any>(endpoint: string, body?: any, options?: Omit<RequestOptions, 'method'>): Promise<HttpResponse<T>>;
|
|
222
|
+
/**
|
|
223
|
+
* Make a PATCH request
|
|
224
|
+
*
|
|
225
|
+
* @param endpoint - API endpoint
|
|
226
|
+
* @param body - Request body (will be JSON stringified)
|
|
227
|
+
* @param options - Request options (method is excluded)
|
|
228
|
+
* @returns Promise resolving to HttpResponse<T>
|
|
229
|
+
*
|
|
230
|
+
* @example
|
|
231
|
+
* ```typescript
|
|
232
|
+
* const response = await client.patch('/users/123', {
|
|
233
|
+
* email: 'newemail@example.com'
|
|
234
|
+
* });
|
|
235
|
+
* ```
|
|
236
|
+
*/
|
|
237
|
+
patch<T = any>(endpoint: string, body?: any, options?: Omit<RequestOptions, 'method'>): Promise<HttpResponse<T>>;
|
|
238
|
+
/**
|
|
239
|
+
* Make a DELETE request
|
|
240
|
+
*
|
|
241
|
+
* @param endpoint - API endpoint
|
|
242
|
+
* @param options - Request options (method and body are excluded)
|
|
243
|
+
* @returns Promise resolving to HttpResponse<T>
|
|
244
|
+
*
|
|
245
|
+
* @example
|
|
246
|
+
* ```typescript
|
|
247
|
+
* const response = await client.delete('/users/123');
|
|
248
|
+
* ```
|
|
249
|
+
*/
|
|
250
|
+
delete<T = any>(endpoint: string, options?: Omit<RequestOptions, 'method' | 'body'>): Promise<HttpResponse<T>>;
|
|
251
|
+
}
|
|
252
|
+
//# sourceMappingURL=HttpClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HttpClient.d.ts","sourceRoot":"","sources":["../../../src/services/HttpClient.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { MapObjectType } from '../schemas/types';
|
|
2
|
+
/**
|
|
3
|
+
* Service for fetching livemap data from the Wemap API
|
|
4
|
+
* @internal
|
|
5
|
+
*
|
|
6
|
+
* This service handles communication with the Wemap API to retrieve
|
|
7
|
+
* livemap configuration and data.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```typescript
|
|
11
|
+
* const service = new LivemapService('https://api.getwemap.com/v3.0');
|
|
12
|
+
* const livemap = await service.fetchLivemap('your-emmid');
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export declare class LivemapService {
|
|
16
|
+
private httpClient;
|
|
17
|
+
/**
|
|
18
|
+
* Create a new LivemapService instance
|
|
19
|
+
*
|
|
20
|
+
* @param baseUrl - Base URL for the Wemap API
|
|
21
|
+
*/
|
|
22
|
+
constructor(baseUrl: string);
|
|
23
|
+
/**
|
|
24
|
+
* Fetch livemap data by ID
|
|
25
|
+
*
|
|
26
|
+
* Retrieves the complete livemap configuration and data for the given emmid.
|
|
27
|
+
*
|
|
28
|
+
* @param emmid - The livemap ID (emmid)
|
|
29
|
+
* @returns Promise resolving to the livemap data
|
|
30
|
+
* @throws {HttpError} If the request fails or the emmid is not found
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const livemap = await service.fetchLivemap('abc123');
|
|
35
|
+
* console.log(livemap.arNavigationData);
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
fetchLivemap(emmid: string): Promise<MapObjectType>;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=LivemapService.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LivemapService.d.ts","sourceRoot":"","sources":["../../../src/services/LivemapService.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD;;;;;;;;;;;;GAYG;AACH,qBAAa,cAAc;IACzB,OAAO,CAAC,UAAU,CAAa;IAE/B;;;;OAIG;gBACS,OAAO,EAAE,MAAM;IAM3B;;;;;;;;;;;;;;OAcG;IACG,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;CAK1D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Coordinates } from '@wemap/geo-legacy';
|
|
2
|
+
export type LatLngLike = Coordinates | {
|
|
3
|
+
lat: number;
|
|
4
|
+
lng: number;
|
|
5
|
+
alt?: number | null;
|
|
6
|
+
level?: number | null;
|
|
7
|
+
} | [number, number] | [number, number, number] | {
|
|
8
|
+
latitude: number;
|
|
9
|
+
longitude: number;
|
|
10
|
+
altitude?: number | null;
|
|
11
|
+
level?: number | null;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=common.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/types/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,MAAM,UAAU,GAClB,WAAW,GACX;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,GACxE,CAAC,MAAM,EAAE,MAAM,CAAC,GAChB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GACxB;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BoundingBox, Coordinates } from '@wemap/geo-legacy';
|
|
2
|
+
import { LatLngLike } from '../types/common';
|
|
3
|
+
export declare const defaultBounds: BoundingBox;
|
|
4
|
+
export declare const correctBounds: (bounds: BoundingBox) => BoundingBox;
|
|
5
|
+
/**
|
|
6
|
+
* Returns bounds for a rectangular area
|
|
7
|
+
* @param {Array|Object} coords [description]
|
|
8
|
+
* @return {[type]} [description]
|
|
9
|
+
*/
|
|
10
|
+
export declare const deltaToBounds: (coords?: {
|
|
11
|
+
latitude: number;
|
|
12
|
+
longitude: number;
|
|
13
|
+
latitude_delta: number;
|
|
14
|
+
longitude_delta: number;
|
|
15
|
+
} | null) => BoundingBox;
|
|
16
|
+
export declare const boundsToDelta: (bounds: any) => {
|
|
17
|
+
center_latitude: number;
|
|
18
|
+
center_longitude: number;
|
|
19
|
+
latitude_delta: number;
|
|
20
|
+
longitude_delta: number;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Transform a pinpoint to a Coordinates;
|
|
24
|
+
* @param {{lat: Number, lng: Number, alt?: Number} | {latitude: Number, longitude: Number, altitude?: Number}} object input
|
|
25
|
+
* @returns {Coordinates}
|
|
26
|
+
*/
|
|
27
|
+
export declare const latLngLikeToCoordinates: (object: LatLngLike) => Coordinates;
|
|
28
|
+
//# sourceMappingURL=map.d.ts.map
|