trailpack-proxy-generics
Advanced tools
Comparing version 0.0.16 to 0.0.17
@@ -5,2 +5,14 @@ 'use strict' | ||
// TODO schema | ||
module.exports = joi.object() | ||
module.exports = joi.object().keys({ | ||
address_1: [joi.string().allow('').optional(), joi.allow(null)], | ||
address_2: [joi.string().allow('').optional(), joi.allow(null)], | ||
address_3: [joi.string().allow('').optional(), joi.allow(null)], | ||
company: [joi.string().allow('').optional(), joi.allow(null)], | ||
city: joi.string(), | ||
province: joi.string(), | ||
province_code: joi.string(), | ||
country: joi.string(), | ||
country_code: joi.string(), | ||
country_name: joi.string(), | ||
postal_code: joi.string() | ||
}).unknown() |
@@ -6,1 +6,5 @@ 'use strict' | ||
module.exports = joi.object() | ||
.keys({ | ||
latitude: joi.number(), | ||
longitude: joi.number() | ||
}) |
{ | ||
"name": "trailpack-proxy-generics", | ||
"version": "0.0.16", | ||
"version": "0.0.17", | ||
"description": "Generics - Trailpack for Proxy Engine", | ||
@@ -5,0 +5,0 @@ "homepage": "https://cali-style.com", |
@@ -60,3 +60,3 @@ # trailpack-proxy-generics | ||
## Currently Supported Generics | ||
### Email Provider (TODO) | ||
### Email Provider | ||
The Email Provider handles sending emails from different email providers eg. Mandrill, MailGun | ||
@@ -75,7 +75,7 @@ | ||
### Geolocation Provider (TODO) | ||
### Geolocation Provider | ||
The Geolocation Provider handles resolving geography | ||
#### GeolocationGenericService.locate | ||
Resolves the geolocation of an address | ||
Resolves the geolocation of an address, validates an address, normalizes an address. | ||
@@ -85,2 +85,3 @@ #### Creating a Geolocation Provider Generic | ||
#### Supported Geolocation Providers | ||
* [Google Maps](https://github.com/calistyle/proxy-generics-google-maps) | ||
@@ -177,3 +178,3 @@ ### Payment Processor | ||
### Data Store Provider (TODO) | ||
### Data Store Provider | ||
The Data Store provider handles uploads and downloads to a remote data store eg. AWS, Gcloud | ||
@@ -180,0 +181,0 @@ |
@@ -9,4 +9,7 @@ 'use strict' | ||
locate(data) { | ||
return Promise.resolve({}) | ||
return Promise.resolve({ | ||
latitude: 0.000000, | ||
longitude: 0.000000 | ||
}) | ||
} | ||
} |
@@ -12,3 +12,7 @@ 'use strict' | ||
it('should create an order', (done) => { | ||
GeolocationGenericService.locate({}) | ||
GeolocationGenericService.locate({ | ||
city: 'Cupertino', | ||
province_code: 'CA', | ||
country_code: 'US' | ||
}) | ||
.then(response => { | ||
@@ -15,0 +19,0 @@ done() |
69739
2209
201