@ideal-postcodes/core-interface
Advanced tools
Comparing version 1.4.0 to 1.5.0
@@ -0,1 +1,8 @@ | ||
# [1.5.0](https://github.com/ideal-postcodes/core-interface/compare/1.4.0...1.5.0) (2020-02-05) | ||
### Features | ||
* **Keys:** Add ability to check licensee ([46d1cd6](https://github.com/ideal-postcodes/core-interface/commit/46d1cd63894d37f727ade827cb1a273fab3e3cf8)) | ||
# [1.4.0](https://github.com/ideal-postcodes/core-interface/compare/1.3.0...1.4.0) (2019-12-06) | ||
@@ -2,0 +9,0 @@ |
@@ -88,2 +88,7 @@ import { Agent, HttpResponse, Header } from "./agent"; | ||
api_key?: string; | ||
/** | ||
* Checks API Key and licensee combination. This checks whether a particular | ||
* licensee can use the API | ||
*/ | ||
licensee?: string; | ||
} | ||
@@ -90,0 +95,0 @@ export declare class Client { |
@@ -185,3 +185,11 @@ "use strict"; | ||
var _a = options.api_key, api_key = _a === void 0 ? this.api_key : _a, timeout = options.timeout; | ||
var queryOptions = { query: {}, header: {} }; | ||
var licensee = options.licensee; | ||
var query; | ||
if (licensee === undefined) { | ||
query = {}; | ||
} | ||
else { | ||
query = { licensee: licensee }; | ||
} | ||
var queryOptions = { query: query, header: {} }; | ||
if (timeout !== undefined) | ||
@@ -188,0 +196,0 @@ queryOptions.timeout = timeout; |
{ | ||
"name": "@ideal-postcodes/core-interface", | ||
"version": "1.4.0", | ||
"version": "1.5.0", | ||
"description": "Interface specification for javascript based API Clients to api.ideal-postcodes.co.uk", | ||
@@ -94,3 +94,3 @@ "author": { | ||
"@cablanchard/eslint-config": "~1.1.1", | ||
"@cablanchard/semantic-release": "~1.3.0", | ||
"@cablanchard/semantic-release": "~1.3.1", | ||
"@cablanchard/tsconfig": "1.0.0", | ||
@@ -104,4 +104,4 @@ "@cablanchard/tslint": "0.0.1", | ||
"@types/karma": "~3.0.3", | ||
"@types/mocha": "~5.2.7", | ||
"@types/node": "~12.12.0", | ||
"@types/mocha": "~7.0.1", | ||
"@types/node": "~13.7.0", | ||
"@types/prettier": "~1.19.0", | ||
@@ -114,3 +114,3 @@ "@types/puppeteer": "~2.0.0", | ||
"dotenv": "~8.2.0", | ||
"eslint": "~6.7.1", | ||
"eslint": "~6.8.0", | ||
"karma": "~4.4.0", | ||
@@ -123,15 +123,15 @@ "karma-cbt-launcher": "~0.4.6", | ||
"karma-typescript": "~4.1.0", | ||
"mocha": "~6.2.0", | ||
"nyc": "~14.1.1", | ||
"mocha": "~7.0.0", | ||
"nyc": "~15.0.0", | ||
"prettier": "~1.19.1", | ||
"puppeteer": "~2.0.0", | ||
"semantic-release": "~15.13.12", | ||
"sinon": "~7.5.0", | ||
"puppeteer": "~2.1.0", | ||
"semantic-release": "~15.14.0", | ||
"sinon": "~8.1.0", | ||
"source-map-support": "~0.5.10", | ||
"ts-node": "~8.5.0", | ||
"ts-node": "~8.6.1", | ||
"tslint": "~5.20.0", | ||
"type-zoo": "~3.4.0", | ||
"typedoc": "~0.15.0", | ||
"typedoc": "~0.16.2", | ||
"typescript": "~3.7.2" | ||
} | ||
} |
@@ -32,2 +32,3 @@ <h1 align="center"> | ||
- [Node.js Client Repository](https://github.com/ideal-postcodes/core-node) | ||
- [Axios-backed Client Repository](https://github.com/ideal-postcodes/core-axios) | ||
@@ -69,4 +70,6 @@ ## Documentation | ||
[Configuration options](https://core-interface.ideal-postcodes.dev/interfaces/config.html) | ||
[Client class docs](https://core-interface.ideal-postcodes.dev/classes/client.html) | ||
[Client configuration options](https://core-interface.ideal-postcodes.dev/interfaces/config.html) | ||
--- | ||
@@ -88,2 +91,4 @@ | ||
Invalid postcodes (i.e. postcode not found) return an empty array `[]` | ||
```javascript | ||
@@ -102,4 +107,6 @@ const postcode = "id11qd"; | ||
[Method options](https://core-interface.ideal-postcodes.dev/interfaces/lookuppostcodeoptions.html) | ||
[`client.lookupPostcode` docs](https://core-interface.ideal-postcodes.dev/classes/client.html#lookuppostcode) | ||
[`client.lookupPostcode` options](https://core-interface.ideal-postcodes.dev/interfaces/lookuppostcodeoptions.html) | ||
#### Search for an Address | ||
@@ -122,4 +129,6 @@ | ||
[Method options](https://core-interface.ideal-postcodes.dev/interfaces/lookupaddressoptions.html) | ||
[`client.lookupAddress` docs](https://core-interface.ideal-postcodes.dev/classes/client.html#lookupaddress) | ||
[`client.lookupAddress` options](https://core-interface.ideal-postcodes.dev/interfaces/lookupaddressoptions.html) | ||
#### Search for an Address by UDPRN | ||
@@ -144,4 +153,6 @@ | ||
[Method options](https://core-interface.ideal-postcodes.dev/interfaces/lookupudprnoptions.html) | ||
[`client.lookupUdprn` docs](https://core-interface.ideal-postcodes.dev/classes/client.html#lookupudprn) | ||
[`client.lookupUdprn` options](https://core-interface.ideal-postcodes.dev/interfaces/lookupudprnoptions.html) | ||
#### Search for an Address by UMPRN | ||
@@ -166,4 +177,6 @@ | ||
[Method options](https://core-interface.ideal-postcodes.dev/interfaces/lookupumprnoptions.html) | ||
[`client.lookupUmprn` docs](https://core-interface.ideal-postcodes.dev/classes/client.html#lookupumprn) | ||
[`client.lookupUmprn` options](https://core-interface.ideal-postcodes.dev/interfaces/lookupumprnoptions.html) | ||
#### Check Key Usability | ||
@@ -179,4 +192,6 @@ | ||
[Method options](https://core-interface.ideal-postcodes.dev/interfaces/checkkeyusabilityoptions.html) | ||
[`client.checkKeyUsability` docs](https://core-interface.ideal-postcodes.dev/classes/client.html#checkkeyusability) | ||
[`client.checkKeyUsability` options](https://core-interface.ideal-postcodes.dev/interfaces/checkkeyusabilityoptions.html) | ||
--- | ||
@@ -276,4 +291,6 @@ | ||
[See postcode resource API documentation](https://ideal-postcodes.co.uk/documentation/postcodes) | ||
[Postcode resource HTTP API documentation](https://ideal-postcodes.co.uk/documentation/postcodes) | ||
[Postcode resource docs](https://core-interface.ideal-postcodes.dev/interfaces/postcoderesource.html) | ||
#### Addresses | ||
@@ -296,4 +313,6 @@ | ||
[See addresses resource API documentation](https://ideal-postcodes.co.uk/documentation/addresses) | ||
[Address resource HTTP API documentation](https://ideal-postcodes.co.uk/documentation/addresses) | ||
[Address resource client docs](https://core-interface.ideal-postcodes.dev/interfaces/addressresource.html) | ||
#### Autocomplete | ||
@@ -316,4 +335,6 @@ | ||
[See autocomplete resource API documentation](https://ideal-postcodes.co.uk/documentation/autocomplete) | ||
[Autocomplete resource HTTP API documentation](https://ideal-postcodes.co.uk/documentation/autocomplete) | ||
[Autocomplete resource client docs](https://core-interface.ideal-postcodes.dev/interfaces/autocompleteresource.html) | ||
#### UDPRN | ||
@@ -333,4 +354,6 @@ | ||
[See UDPRN resource API documentation](https://ideal-postcodes.co.uk/documentation/udprn) | ||
[UDPRN resource HTTP API documentation](https://ideal-postcodes.co.uk/documentation/udprn) | ||
[UDPRN resource client docs](https://core-interface.ideal-postcodes.dev/interfaces/udprnresource.html) | ||
#### UMPRN | ||
@@ -350,4 +373,6 @@ | ||
[See UMPRN resource API documentation](https://ideal-postcodes.co.uk/documentation/umprn) | ||
[UMPRN resource HTTP API documentation](https://ideal-postcodes.co.uk/documentation/umprn) | ||
[UMPRN resource client docs](https://core-interface.ideal-postcodes.dev/interfaces/umprnresource.html) | ||
#### Keys | ||
@@ -364,2 +389,4 @@ | ||
[Method docs](https://core-interface.ideal-postcodes.dev/interfaces/keyresource.html#retrieve) | ||
Get private information on key (requires user_token) | ||
@@ -377,2 +404,4 @@ | ||
[Method docs](https://core-interface.ideal-postcodes.dev/interfaces/keyresource.html#retrieve) | ||
Get key usage data | ||
@@ -390,4 +419,8 @@ | ||
[See Keys resource API documentation](https://ideal-postcodes.co.uk/documentation/keys) | ||
[Method docs](https://core-interface.ideal-postcodes.dev/interfaces/keyresource.html#usage) | ||
[Keys resource HTTP API documentation](https://ideal-postcodes.co.uk/documentation/keys) | ||
[Key resource client docs](https://core-interface.ideal-postcodes.dev/interfaces/keyresource.html) | ||
--- | ||
@@ -438,4 +471,4 @@ | ||
- Class implementations for Ideal Postcodes API errors that inherit from `Error` | ||
- A parser that converts raw error data into one of these error instances | ||
- Class implementations for [Ideal Postcodes API errors](https://core-interface.ideal-postcodes.dev/classes/idpcapierror.html) that inherit from `Error` | ||
- A [parser](https://core-interface.ideal-postcodes.dev/globals.html#parse) that converts raw error data into one of these error instances | ||
@@ -446,3 +479,3 @@ #### Usage | ||
Errors that don't inherit from `IdealPostcodesError` would indicate some kind of error external to the API (e.g. bad network, request timeout). | ||
Errors that don't inherit from [`IdealPostcodesError`](https://core-interface.ideal-postcodes.dev/classes/idealpostcodeserror.html) would indicate some kind of error external to the API (e.g. bad network, request timeout). | ||
@@ -449,0 +482,0 @@ ```javascript |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
92351
1685
544