Skip to content

Commit

Permalink
Adding UDPRN searching for GBR (#15)
Browse files Browse the repository at this point in the history
* Adding UDPRN searching for GBR

---------

Co-authored-by: Patricia Schott <[email protected]>
  • Loading branch information
pschott and Patricia Schott authored Oct 30, 2023
1 parent f564eef commit 2c930cc
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 88 deletions.
4 changes: 2 additions & 2 deletions dist/js/experian-address-validation.js

Large diffs are not rendered by default.

10 changes: 4 additions & 6 deletions dist/lib/address-search.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import Request from './request';
import { AddressSearchOptions, AddressValidationMode } from './search-options';
import { AddressSearchOptions, AddressValidationSearchType, AddressValidationMode } from './search-options';
export default class AddressValidation {
options: AddressSearchOptions;
searchType: AddressValidationMode;
searchType: AddressValidationSearchType;
avMode: AddressValidationMode;
events: any;
request: Request;
private baseUrl;
Expand All @@ -13,8 +14,6 @@ export default class AddressValidation {
private stepInEndpoint;
private refineEndpoint;
private enrichmentEndpoint;
private what3WordCountries;
private what3WordsKeyword;
private picklist;
private inputs;
private lastSearchTerm;
Expand All @@ -26,10 +25,9 @@ export default class AddressValidation {
private lookupFn;
private keyUpFn;
private checkTabFn;
private isWhat3Words;
constructor(options: AddressSearchOptions);
setToken(token: string): void;
setSearchType(searchType: AddressValidationMode): void;
setSearchType(searchType: AddressValidationSearchType): void;
getEnrichmentData(globalAddressKey: string): void;
private setup;
private handleEnrichmentResult;
Expand Down
19 changes: 14 additions & 5 deletions dist/lib/search-options.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export interface AddressSearchOptions {
enabled: boolean;
token: string;
enableWhat3Words: boolean;
searchType: AddressValidationMode;
avMode: AddressValidationMode;
searchType: AddressValidationSearchType;
maxSuggestions: number;
language: string;
location: string;
Expand Down Expand Up @@ -40,14 +40,23 @@ export interface AddressSearchOptions {
lookupButton?: HTMLButtonElement;
};
}
export declare enum AddressValidationMode {
export declare enum AddressValidationSearchType {
AUTOCOMPLETE = "autocomplete",
SINGLELINE = "singleline",
VALIDATE = "validate"
}
export declare enum AddressValidationMode {
SEARCH = 1,
WHAT3WORDS = 2,
UDPRN = 3
}
export declare enum AddressValidationLookupKeywords {
WHAT3WORDS = "what3words",
UDPRN = "udprn"
}
export declare const defaults: {
enableWhat3Words: boolean;
searchType: AddressValidationMode;
avMode: AddressValidationMode;
searchType: AddressValidationSearchType;
input: {
placeholderText: string;
applyFocus: boolean;
Expand Down
Loading

0 comments on commit 2c930cc

Please sign in to comment.