@cloudnux/core-cloud-provider 0.2.0 → 0.3.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/dist/index.d.ts +65 -67
- package/package.json +1 -3
package/dist/index.d.ts
CHANGED
|
@@ -131,77 +131,75 @@ interface EventMessage {
|
|
|
131
131
|
publishedAt: Date;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
interface
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Get detailed information about a specific place
|
|
144
|
-
* @param placeId ID of the place to get details for
|
|
145
|
-
* @returns Promise containing place details
|
|
146
|
-
*/
|
|
147
|
-
getPlaceDetails(placeId: string): Promise<PlaceDetails>;
|
|
134
|
+
interface LocationProviderConfig {
|
|
135
|
+
apiKey?: string;
|
|
136
|
+
region?: string;
|
|
137
|
+
language?: string;
|
|
138
|
+
countries?: string[];
|
|
139
|
+
timeout?: number;
|
|
140
|
+
retryAttempts?: number;
|
|
141
|
+
metadata?: Record<string, any>;
|
|
148
142
|
}
|
|
149
|
-
interface
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
maxLatitude: number;
|
|
156
|
-
};
|
|
157
|
-
/** Maximum number of results to return */
|
|
143
|
+
interface Coordinates {
|
|
144
|
+
lat: number;
|
|
145
|
+
lng: number;
|
|
146
|
+
}
|
|
147
|
+
interface SuggestionParams {
|
|
148
|
+
query: string;
|
|
158
149
|
maxResults?: number;
|
|
159
|
-
/** Filter results by category */
|
|
160
|
-
categories?: string[];
|
|
161
|
-
/** Language code for results */
|
|
162
150
|
language?: string;
|
|
151
|
+
countries?: string[];
|
|
152
|
+
biasPosition?: Coordinates;
|
|
153
|
+
placeTypes?: string[];
|
|
163
154
|
}
|
|
164
|
-
interface
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
/** Place address */
|
|
172
|
-
address?: string;
|
|
173
|
-
/** Geographic coordinates */
|
|
174
|
-
coordinates: {
|
|
175
|
-
latitude: number;
|
|
176
|
-
longitude: number;
|
|
177
|
-
};
|
|
178
|
-
/** Distance from search center if applicable */
|
|
155
|
+
interface LocationSuggestion {
|
|
156
|
+
title: string;
|
|
157
|
+
subtitle?: string;
|
|
158
|
+
coordinates?: Coordinates;
|
|
159
|
+
placeId?: string;
|
|
160
|
+
queryId?: string;
|
|
161
|
+
placeType?: string;
|
|
179
162
|
distance?: number;
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
163
|
+
provider: string;
|
|
164
|
+
rawData?: any;
|
|
165
|
+
}
|
|
166
|
+
interface ReverseGeocodeParams {
|
|
167
|
+
coordinates: Coordinates;
|
|
168
|
+
language?: string;
|
|
169
|
+
maxResults?: number;
|
|
170
|
+
}
|
|
171
|
+
interface LocationAddress {
|
|
172
|
+
fullAddress: string;
|
|
173
|
+
street?: string;
|
|
174
|
+
streetNumber?: string;
|
|
175
|
+
city?: string;
|
|
176
|
+
district?: string;
|
|
177
|
+
region?: string;
|
|
178
|
+
postalCode?: string;
|
|
179
|
+
country?: string;
|
|
180
|
+
countryCode?: string;
|
|
181
|
+
coordinates: Coordinates;
|
|
182
|
+
placeType?: string;
|
|
183
|
+
accuracy?: number;
|
|
184
|
+
provider: string;
|
|
185
|
+
rawData?: any;
|
|
186
|
+
}
|
|
187
|
+
interface LocationService {
|
|
188
|
+
/**
|
|
189
|
+
* Get autocomplete suggestions for search box
|
|
190
|
+
* Use case: User types "Stock..." → Show ["Stockholm", "Stockton", ...]
|
|
191
|
+
*/
|
|
192
|
+
getSuggestions(params: SuggestionParams): Promise<LocationSuggestion[]>;
|
|
193
|
+
/**
|
|
194
|
+
* Get address from coordinates (reverse geocoding)
|
|
195
|
+
* Use case: User clicks "Get my location" → Show "Drottninggatan 10, Stockholm"
|
|
196
|
+
*/
|
|
197
|
+
reverseGeocode(params: ReverseGeocodeParams): Promise<LocationAddress>;
|
|
198
|
+
/**
|
|
199
|
+
* Optional: Get detailed location info if suggestion doesn't have coordinates
|
|
200
|
+
* Use case: User selects suggestion → Need full coordinates
|
|
201
|
+
*/
|
|
202
|
+
getLocationDetails?(placeId: string): Promise<LocationAddress>;
|
|
205
203
|
}
|
|
206
204
|
|
|
207
205
|
interface StorageService {
|
|
@@ -381,4 +379,4 @@ interface CloudProvider {
|
|
|
381
379
|
createFunctionsService(): FunctionsService;
|
|
382
380
|
}
|
|
383
381
|
|
|
384
|
-
export { type BaseEntry, type CloudProvider, type Entry, type Entrypoint, ErrorCode, type EventBrokerService, type EventEntry, type EventFunctionContext, type EventMessage, type EventRequest, type EventResponse, type EventTrigger, type FunctionContext, type FunctionsService, type HTTPAuth, type HTTPRequest, type HTTPResponse, type HandlerType, type HttpEntry, type HttpFunctionContext, type HttpMethod, type HttpTrigger, type
|
|
382
|
+
export { type BaseEntry, type CloudProvider, type Coordinates, type Entry, type Entrypoint, ErrorCode, type EventBrokerService, type EventEntry, type EventFunctionContext, type EventMessage, type EventRequest, type EventResponse, type EventTrigger, type FunctionContext, type FunctionsService, type HTTPAuth, type HTTPRequest, type HTTPResponse, type HandlerType, type HttpEntry, type HttpFunctionContext, type HttpMethod, type HttpTrigger, type LocationAddress, type LocationProviderConfig, type LocationService, type LocationSuggestion, type MessageFilter, type PeekOptions, type PublishOptions, type ReadOptions, type ReverseGeocodeParams, type ScheduleEntry, type ScheduleFunctionContext, type ScheduleRequest, type ScheduleResponse, type ScheduleTrigger, type StorageService, type StorageWriteOptions, type StorageWriteResult, type SuggestionParams };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudnux/core-cloud-provider",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "CloudNux core interfaces and types for multi-cloud abstraction",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -37,8 +37,6 @@
|
|
|
37
37
|
"lint": "eslint . --max-warnings 0",
|
|
38
38
|
"lint:fix": "eslint . --fix",
|
|
39
39
|
"type-check": "tsc --noEmit",
|
|
40
|
-
"test": "vitest run",
|
|
41
|
-
"test:watch": "vitest",
|
|
42
40
|
"clean": "rm -rf dist"
|
|
43
41
|
},
|
|
44
42
|
"dependencies": {},
|