quantaroute-geocoding 1.0.3 β 1.1.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 +35 -16
- package/dist/client.d.ts +6 -49
- package/dist/client.js +1 -274
- package/dist/index.d.ts +2 -7
- package/dist/index.js +6 -10
- package/dist/location-lookup.d.ts +6 -22
- package/dist/location-lookup.js +1 -133
- package/dist/offline.d.ts +0 -21
- package/dist/offline.js +2 -27
- package/dist/rasp.d.ts +75 -0
- package/dist/rasp.js +533 -0
- package/dist/security.d.ts +17 -0
- package/dist/security.js +1 -0
- package/dist/types.d.ts +37 -9
- package/dist/types.js +0 -4
- package/package.json +13 -4
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/location-lookup.d.ts.map +0 -1
- package/dist/location-lookup.js.map +0 -1
- package/dist/offline.d.ts.map +0 -1
- package/dist/offline.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
package/README.md
CHANGED
|
@@ -4,13 +4,19 @@ A **unique** Node.js/TypeScript library for geocoding addresses to DigiPin codes
|
|
|
4
4
|
|
|
5
5
|
## π Unique Features
|
|
6
6
|
|
|
7
|
+
### π **Enterprise-Grade Security** - *Runtime Protection & Code Security*
|
|
8
|
+
- π‘οΈ **RASP Protection**: Runtime Application Self-Protection with anti-debugging, integrity checks, and behavior monitoring
|
|
9
|
+
- π **Secure API Key Storage**: Encrypted storage with Symbol-based properties
|
|
10
|
+
- π **Request Signing**: HMAC-SHA256 signatures prevent tampering
|
|
11
|
+
- π **Code Obfuscation**: Production builds are automatically obfuscated
|
|
12
|
+
|
|
7
13
|
### π― **NEW: Location Lookup API** - *Service that even government doesn't provide!*
|
|
8
14
|
- πΊοΈ **Administrative Boundary Lookup**: Get state, division, locality, pincode, district, delivery status from coordinates
|
|
9
|
-
-
|
|
10
|
-
- π **36,000+ Postal Boundaries**: Complete coverage across India
|
|
15
|
+
- π **19,000+ Pincode Boundaries (with 154,000 post offices)**: Complete coverage across India
|
|
11
16
|
- β‘ **Sub-100ms Response**: Cached responses with database fallback
|
|
12
17
|
- π― **Government-Level Precision**: Accuracy that official services don't offer
|
|
13
18
|
- π **Batch Processing**: Up to 100 locations per request
|
|
19
|
+
- π **Population Density Data**: Mean, min, and max population density from Meta's 30-meter gridded data. [Deprecated]
|
|
14
20
|
|
|
15
21
|
### π **Core Features**
|
|
16
22
|
- π **Online API Integration**: Full access to QuantaRoute Geocoding API
|
|
@@ -53,7 +59,6 @@ console.log(`Division: ${result.administrative_info.division}`); // New
|
|
|
53
59
|
console.log(`Locality: ${result.administrative_info.locality}`); // Nirman Bhawan SO
|
|
54
60
|
console.log(`District: ${result.administrative_info.district}`); // New Delhi
|
|
55
61
|
console.log(`Delivery: ${result.administrative_info.delivery}`); // Delivery
|
|
56
|
-
console.log(`Pop Density: ${result.administrative_info.mean_population_density}`); // 11234.56
|
|
57
62
|
console.log(`DigiPin: ${result.digipin}`); // 39J-438-TJC7
|
|
58
63
|
console.log(`Response Time: ${result.response_time_ms}ms`); // <100ms
|
|
59
64
|
|
|
@@ -65,7 +70,7 @@ console.log(`Division: ${digipinResult.administrative_info.division}`);
|
|
|
65
70
|
console.log(`Locality: ${digipinResult.administrative_info.locality}`);
|
|
66
71
|
console.log(`District: ${digipinResult.administrative_info.district}`);
|
|
67
72
|
|
|
68
|
-
// π Get live statistics (
|
|
73
|
+
// π Get live statistics (19,000+ boundaries with 154,000 post offices)
|
|
69
74
|
const stats = await client.getLocationStatistics();
|
|
70
75
|
console.log(`Total Boundaries: ${stats.totalBoundaries.toLocaleString()}`);
|
|
71
76
|
console.log(`Total States: ${stats.totalStates}`);
|
|
@@ -83,9 +88,14 @@ console.log(`Coordinates: ${geocodeResult.coordinates}`);
|
|
|
83
88
|
const coordResult = await client.coordinatesToDigiPin(28.6139, 77.2090);
|
|
84
89
|
console.log(`DigiPin: ${coordResult.digipin}`);
|
|
85
90
|
|
|
86
|
-
// Reverse geocode DigiPin
|
|
91
|
+
// Reverse geocode DigiPin - Get Nominatim/OpenStreetMap address with DigiPin (Our USP!)
|
|
87
92
|
const reverseResult = await client.reverseGeocode("39J-438-TJC7");
|
|
93
|
+
console.log(`DigiPin: ${reverseResult.digipin}`); // Always returned - Our USP!
|
|
88
94
|
console.log(`Coordinates: ${reverseResult.coordinates}`);
|
|
95
|
+
console.log(`Address: ${reverseResult.address}`);
|
|
96
|
+
console.log(`Display Name: ${reverseResult.displayName}`);
|
|
97
|
+
console.log(`Street: ${reverseResult.addressComponents.road}`);
|
|
98
|
+
console.log(`House Name: ${reverseResult.addressComponents.amenity || reverseResult.addressComponents.name}`);
|
|
89
99
|
```
|
|
90
100
|
|
|
91
101
|
### Offline Processing
|
|
@@ -258,9 +268,6 @@ interface LocationLookupResult {
|
|
|
258
268
|
country: string; // "India"
|
|
259
269
|
delivery?: string; // "Delivery"
|
|
260
270
|
district?: string; // "New Delhi"
|
|
261
|
-
mean_population_density?: number; // 11234.56
|
|
262
|
-
min_population_density?: number; // 5678.90
|
|
263
|
-
max_population_density?: number; // 15234.67
|
|
264
271
|
};
|
|
265
272
|
coordinates: {
|
|
266
273
|
latitude: number; // 28.6139
|
|
@@ -277,7 +284,7 @@ interface LocationLookupResult {
|
|
|
277
284
|
|
|
278
285
|
π― **Government-Level Precision**: Access to administrative boundaries that even government APIs don't provide at this level of detail and accessibility.
|
|
279
286
|
|
|
280
|
-
π **
|
|
287
|
+
π **19,000+ Boundaries (with 154,000 post offices)**: Complete coverage of Indian postal boundaries with sub-district level precision.
|
|
281
288
|
|
|
282
289
|
β‘ **Performance**: Sub-100ms cached responses, <500ms database queries.
|
|
283
290
|
|
|
@@ -399,9 +406,9 @@ const result: LocationLookupResult = await client.lookupLocationFromCoordinates(
|
|
|
399
406
|
|
|
400
407
|
| Tier | Requests/Minute | Monthly Limit | Batch Size | Boundaries |
|
|
401
408
|
|------|----------------|---------------|------------|------------|
|
|
402
|
-
| Free | 20 |
|
|
403
|
-
| Paid | 200 |
|
|
404
|
-
| Enterprise |
|
|
409
|
+
| Free | 20 | 25,000 | 50 | 19,000+ (with 154,000 post offices) |
|
|
410
|
+
| Paid | 200 | 50,000 | 100 | 19,000+ (with 154,000 post offices) |
|
|
411
|
+
| Enterprise | 10,000,000 | Unlimited | 100 | 19,000+ (with 154,000 post offices) |
|
|
405
412
|
|
|
406
413
|
**Performance Guarantees:**
|
|
407
414
|
- β‘ Cached responses: <100ms
|
|
@@ -433,7 +440,7 @@ Check out the `examples/` directory for more comprehensive examples:
|
|
|
433
440
|
|
|
434
441
|
β¨ **Government-Level Precision**: Administrative boundary data that even government APIs don't provide at this level of detail and accessibility.
|
|
435
442
|
|
|
436
|
-
π **Complete Coverage**:
|
|
443
|
+
π **Complete Coverage**: 19,000+ postal boundaries (with 154,000 post offices) across India with sub-district precision.
|
|
437
444
|
|
|
438
445
|
β‘ **Blazing Performance**: Sub-100ms cached responses, guaranteed <500ms database queries.
|
|
439
446
|
|
|
@@ -445,6 +452,19 @@ Check out the `examples/` directory for more comprehensive examples:
|
|
|
445
452
|
|
|
446
453
|
## Changelog
|
|
447
454
|
|
|
455
|
+
### [1.1.0] - 2025-11-25
|
|
456
|
+
#### π Security Enhancements (Major Update)
|
|
457
|
+
- π‘οΈ **RASP Protection**: Runtime Application Self-Protection with anti-debugging, integrity checks, and behavior monitoring
|
|
458
|
+
- π **Secure API Key Storage**: Encrypted storage with Symbol-based properties
|
|
459
|
+
- π **Request Signing**: HMAC-SHA256 signatures prevent tampering
|
|
460
|
+
- π **Code Obfuscation**: Production builds automatically obfuscated
|
|
461
|
+
- π« **Source Map Removal**: Prevents reverse engineering
|
|
462
|
+
|
|
463
|
+
### [1.0.4] - 2025-11-23
|
|
464
|
+
#### Added
|
|
465
|
+
- Enhanced reverse geocoding with detailed address components
|
|
466
|
+
- `address`, `displayName`, and `addressComponents` fields
|
|
467
|
+
|
|
448
468
|
### [1.0.3] - 2025-11-10
|
|
449
469
|
#### Added
|
|
450
470
|
- π **Webhook Management**: Register, list, delete, and test webhook endpoints
|
|
@@ -458,14 +478,13 @@ Check out the `examples/` directory for more comprehensive examples:
|
|
|
458
478
|
|
|
459
479
|
### [1.0.2] - 2025-11-01
|
|
460
480
|
#### Added
|
|
461
|
-
- π **Population Density Data**: Added mean, min, and max population density fields from Meta's 30-meter gridded data
|
|
481
|
+
- π **Population Density Data**: Added mean, min, and max population density fields from Meta's 30-meter gridded data [Deprecated]
|
|
462
482
|
- π **District Information**: Added district field for Indian district division as per official records
|
|
463
483
|
- β
**Delivery Status**: Added delivery field for pincode delivery status
|
|
464
484
|
- π **Complete Geographic Data**: Added state and country fields for comprehensive location information
|
|
465
485
|
|
|
466
486
|
#### Enhanced
|
|
467
|
-
- Improved administrative boundary data with complete coverage (
|
|
468
|
-
- All Location Lookup API responses now include population density and district information
|
|
487
|
+
- Improved administrative boundary data with complete coverage (19,000+ postal boundaries with 154,000 post offices)
|
|
469
488
|
|
|
470
489
|
### [1.0.1] - Previous Release
|
|
471
490
|
- Initial stable release with Location Lookup API
|
package/dist/client.d.ts
CHANGED
|
@@ -1,72 +1,29 @@
|
|
|
1
1
|
import { ClientConfig, GeocodeResult, ReverseGeocodeResult, LocationLookupResult, LocationStatistics, BatchLocationRequest, BatchLocationResult, WebhookEndpoint, CreateWebhookRequest, CreateWebhookResponse, TestWebhookResponse } from './types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*
|
|
5
|
-
* Revolutionary Node.js SDK for QuantaRoute Geocoding API with Location Lookup
|
|
6
|
-
*/
|
|
2
|
+
declare const CONFIG_SYMBOL: unique symbol;
|
|
3
|
+
declare const KEY_STORAGE_SYMBOL: unique symbol;
|
|
7
4
|
export declare class QuantaRouteClient {
|
|
8
5
|
private client;
|
|
9
|
-
private
|
|
6
|
+
private [CONFIG_SYMBOL];
|
|
7
|
+
private [KEY_STORAGE_SYMBOL];
|
|
10
8
|
constructor(config: ClientConfig);
|
|
11
9
|
private setupInterceptors;
|
|
10
|
+
private setupRequestSigning;
|
|
12
11
|
private makeRequest;
|
|
13
|
-
/**
|
|
14
|
-
* Geocode an address to DigiPin
|
|
15
|
-
*/
|
|
16
12
|
geocode(address: string): Promise<GeocodeResult>;
|
|
17
|
-
/**
|
|
18
|
-
* Convert coordinates to DigiPin
|
|
19
|
-
*/
|
|
20
13
|
coordinatesToDigiPin(latitude: number, longitude: number): Promise<GeocodeResult>;
|
|
21
|
-
/**
|
|
22
|
-
* Reverse geocode DigiPin to coordinates
|
|
23
|
-
*/
|
|
24
14
|
reverseGeocode(digipin: string): Promise<ReverseGeocodeResult>;
|
|
25
|
-
/**
|
|
26
|
-
* π REVOLUTIONARY: Get administrative boundaries from coordinates
|
|
27
|
-
*/
|
|
28
15
|
lookupLocationFromCoordinates(latitude: number, longitude: number): Promise<LocationLookupResult>;
|
|
29
|
-
/**
|
|
30
|
-
* π REVOLUTIONARY: Get administrative boundaries from DigiPin
|
|
31
|
-
*/
|
|
32
16
|
lookupLocationFromDigiPin(digipin: string): Promise<LocationLookupResult>;
|
|
33
|
-
/**
|
|
34
|
-
* π REVOLUTIONARY: Batch location lookup
|
|
35
|
-
*/
|
|
36
17
|
batchLocationLookup(locations: BatchLocationRequest[]): Promise<BatchLocationResult>;
|
|
37
|
-
/**
|
|
38
|
-
* π Get live location statistics
|
|
39
|
-
*/
|
|
40
18
|
getLocationStatistics(): Promise<LocationStatistics>;
|
|
41
|
-
/**
|
|
42
|
-
* Check API usage and limits
|
|
43
|
-
*/
|
|
44
19
|
getUsage(): Promise<any>;
|
|
45
|
-
/**
|
|
46
|
-
* Get API health status
|
|
47
|
-
*/
|
|
48
20
|
getHealth(): Promise<any>;
|
|
49
|
-
/**
|
|
50
|
-
* π Register a webhook endpoint
|
|
51
|
-
*/
|
|
52
21
|
registerWebhook(webhook: CreateWebhookRequest): Promise<CreateWebhookResponse>;
|
|
53
|
-
/**
|
|
54
|
-
* π List all webhook endpoints
|
|
55
|
-
*/
|
|
56
22
|
listWebhooks(): Promise<WebhookEndpoint[]>;
|
|
57
|
-
/**
|
|
58
|
-
* π Get a specific webhook endpoint (by finding it in the list)
|
|
59
|
-
*/
|
|
60
23
|
getWebhook(webhookId: string): Promise<WebhookEndpoint>;
|
|
61
|
-
/**
|
|
62
|
-
* π Delete a webhook endpoint
|
|
63
|
-
*/
|
|
64
24
|
deleteWebhook(webhookId: string): Promise<void>;
|
|
65
|
-
/**
|
|
66
|
-
* π Test a webhook endpoint
|
|
67
|
-
*/
|
|
68
25
|
testWebhook(webhookId: string): Promise<TestWebhookResponse>;
|
|
69
26
|
private validateCoordinates;
|
|
70
27
|
private validateDigiPin;
|
|
71
28
|
}
|
|
72
|
-
|
|
29
|
+
export {};
|