smartystreets-javascript-sdk 7.4.0 → 8.0.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/cjs/BasicAuthCredentials.cjs +1 -0
- package/dist/cjs/ClientBuilder.cjs +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/package.json.cjs +1 -1
- package/dist/cjs/us_street/Candidate.cjs +1 -1
- package/dist/cjs/us_street/Client.cjs +1 -1
- package/dist/cjs/util/apiToSDKKeyMap.cjs +1 -1
- package/dist/cjs/util/buildUsStreetInputData.cjs +1 -0
- package/dist/cjs/util/sendBatch.cjs +1 -1
- package/dist/esm/BasicAuthCredentials.mjs +1 -0
- package/dist/esm/ClientBuilder.mjs +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/package.json.mjs +1 -1
- package/dist/esm/us_street/Candidate.mjs +1 -1
- package/dist/esm/us_street/Client.mjs +1 -1
- package/dist/esm/util/apiToSDKKeyMap.mjs +1 -1
- package/dist/esm/util/buildUsStreetInputData.mjs +1 -0
- package/dist/esm/util/sendBatch.mjs +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/BaseUrlSender.d.ts +7 -0
- package/dist/types/BasicAuthCredentials.d.ts +7 -0
- package/dist/types/Batch.d.ts +19 -0
- package/dist/types/CustomHeaderSender.d.ts +7 -0
- package/dist/types/CustomQuerySender.d.ts +7 -0
- package/dist/types/Errors.d.ts +42 -0
- package/dist/types/HttpSender.d.ts +22 -0
- package/dist/types/InputData.d.ts +10 -0
- package/dist/types/LicenseSender.d.ts +7 -0
- package/dist/types/Request.d.ts +13 -0
- package/dist/types/Response.d.ts +8 -0
- package/dist/types/RetrySender.d.ts +13 -0
- package/dist/types/SharedCredentials.d.ts +7 -0
- package/dist/types/SigningSender.d.ts +11 -0
- package/dist/types/StaticCredentials.d.ts +7 -0
- package/dist/types/StatusCodeSender.d.ts +6 -0
- package/dist/types/international_address_autocomplete/Client.d.ts +6 -0
- package/dist/types/international_address_autocomplete/Lookup.d.ts +15 -0
- package/dist/types/international_address_autocomplete/Suggestion.d.ts +14 -0
- package/dist/types/international_postal_code/Client.d.ts +15 -0
- package/dist/types/international_postal_code/Lookup.d.ts +17 -0
- package/dist/types/international_postal_code/Result.d.ts +18 -0
- package/dist/types/international_street/Candidate.d.ts +26 -0
- package/dist/types/international_street/Client.d.ts +10 -0
- package/dist/types/international_street/Lookup.d.ts +29 -0
- package/dist/types/types.d.ts +28 -0
- package/dist/types/us_autocomplete_pro/Client.d.ts +10 -0
- package/dist/types/us_autocomplete_pro/Lookup.d.ts +28 -0
- package/dist/types/us_autocomplete_pro/Suggestion.d.ts +14 -0
- package/dist/types/us_enrichment/Client.d.ts +10 -0
- package/dist/types/us_enrichment/Lookup.d.ts +13 -0
- package/dist/types/us_enrichment/Response.d.ts +20 -0
- package/dist/types/us_extract/Address.d.ts +13 -0
- package/dist/types/us_extract/Client.d.ts +10 -0
- package/dist/types/us_extract/Lookup.d.ts +23 -0
- package/dist/types/us_extract/Result.d.ts +19 -0
- package/dist/types/us_reverse_geo/Client.d.ts +10 -0
- package/dist/types/us_reverse_geo/Lookup.d.ts +16 -0
- package/dist/types/us_reverse_geo/Response.d.ts +8 -0
- package/dist/types/us_reverse_geo/Result.d.ts +13 -0
- package/dist/types/us_street/Candidate.d.ts +22 -0
- package/dist/types/us_street/Client.d.ts +15 -0
- package/dist/types/us_street/Lookup.d.ts +26 -0
- package/dist/types/us_zipcode/Client.d.ts +15 -0
- package/dist/types/us_zipcode/Lookup.d.ts +16 -0
- package/dist/types/us_zipcode/Result.d.ts +13 -0
- package/dist/types/util/Sleeper.d.ts +4 -0
- package/dist/types/util/apiToSDKKeyMap.d.ts +94 -0
- package/dist/types/util/buildInputData.d.ts +2 -0
- package/dist/types/util/buildSmartyResponse.d.ts +2 -0
- package/dist/types/util/buildUsStreetInputData.d.ts +2 -0
- package/dist/types/util/sendBatch.d.ts +2 -0
- package/package.json +6 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Request, Response, Sender, Sleeper } from "./types";
|
|
2
|
+
export default class RetrySender {
|
|
3
|
+
private maxRetries;
|
|
4
|
+
private statusToRetry;
|
|
5
|
+
private statusTooManyRequests;
|
|
6
|
+
private maxBackoffDuration;
|
|
7
|
+
private inner;
|
|
8
|
+
private sleeper;
|
|
9
|
+
constructor(maxRetries: number | undefined, inner: Sender, sleeper: Sleeper);
|
|
10
|
+
send(request: Request): Promise<Response>;
|
|
11
|
+
private backoff;
|
|
12
|
+
private rateLimitBackOff;
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Request, Response, Sender } from "./types.js";
|
|
2
|
+
interface Signer {
|
|
3
|
+
sign(request: Request): void;
|
|
4
|
+
}
|
|
5
|
+
export default class SigningSender {
|
|
6
|
+
private signer;
|
|
7
|
+
private sender;
|
|
8
|
+
constructor(innerSender: Sender, signer: Signer);
|
|
9
|
+
send(request: Request): Promise<Response>;
|
|
10
|
+
}
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export = Lookup;
|
|
2
|
+
declare class Lookup {
|
|
3
|
+
constructor({ search, addressId, country, maxResults, includeOnlyLocality, includeOnlyPostalCode }?: {
|
|
4
|
+
maxResults?: number | undefined;
|
|
5
|
+
});
|
|
6
|
+
result: any[];
|
|
7
|
+
search: any;
|
|
8
|
+
addressId: any;
|
|
9
|
+
country: any;
|
|
10
|
+
maxResults: number;
|
|
11
|
+
includeOnlyLocality: any;
|
|
12
|
+
includeOnlyPostalCode: any;
|
|
13
|
+
customParameters: {};
|
|
14
|
+
addCustomParameter(key: any, value: any): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export = Suggestion;
|
|
2
|
+
declare class Suggestion {
|
|
3
|
+
constructor(responseData: any);
|
|
4
|
+
street: any;
|
|
5
|
+
locality: any;
|
|
6
|
+
administrativeArea: any;
|
|
7
|
+
administrativeAreaShort: any;
|
|
8
|
+
administrativeAreaLong: any;
|
|
9
|
+
postalCode: any;
|
|
10
|
+
countryIso3: any;
|
|
11
|
+
entries: any;
|
|
12
|
+
addressText: any;
|
|
13
|
+
addressId: any;
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export = Client;
|
|
2
|
+
/**
|
|
3
|
+
* This client sends lookups to the Smarty International Postal Code API, <br>
|
|
4
|
+
* and attaches the results to the appropriate Lookup objects.
|
|
5
|
+
*/
|
|
6
|
+
declare class Client {
|
|
7
|
+
constructor(sender: any);
|
|
8
|
+
sender: any;
|
|
9
|
+
/**
|
|
10
|
+
* Sends a single lookup for validation.
|
|
11
|
+
* @param data A Lookup object
|
|
12
|
+
* @throws SmartyException
|
|
13
|
+
*/
|
|
14
|
+
send(lookup: any): Promise<any>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export = Lookup;
|
|
2
|
+
/**
|
|
3
|
+
* In addition to holding all of the input data for this lookup, this class also<br>
|
|
4
|
+
* will contain the result of the lookup after it comes back from the API.
|
|
5
|
+
* @see "https://www.smarty.com/docs/cloud/international-postal-code-api#http-request-input-fields"
|
|
6
|
+
*/
|
|
7
|
+
declare class Lookup {
|
|
8
|
+
constructor(country: any, postalCode: any, administrativeArea: any, locality: any, inputId: any);
|
|
9
|
+
inputId: any;
|
|
10
|
+
country: any;
|
|
11
|
+
postalCode: any;
|
|
12
|
+
administrativeArea: any;
|
|
13
|
+
locality: any;
|
|
14
|
+
result: any[];
|
|
15
|
+
customParameters: {};
|
|
16
|
+
addCustomParameter(key: any, value: any): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export = Result;
|
|
2
|
+
/**
|
|
3
|
+
* @see "https://www.smarty.com/docs/cloud/international-postal-code-api#output-fields"
|
|
4
|
+
*/
|
|
5
|
+
declare class Result {
|
|
6
|
+
constructor(responseData: any);
|
|
7
|
+
inputId: any;
|
|
8
|
+
administrativeArea: any;
|
|
9
|
+
superAdministrativeArea: any;
|
|
10
|
+
subAdministrativeArea: any;
|
|
11
|
+
locality: any;
|
|
12
|
+
dependentLocality: any;
|
|
13
|
+
dependentLocalityName: any;
|
|
14
|
+
doubleDependentLocality: any;
|
|
15
|
+
postalCode: any;
|
|
16
|
+
postalCodeExtra: any;
|
|
17
|
+
countryIso3: any;
|
|
18
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export = Candidate;
|
|
2
|
+
/**
|
|
3
|
+
* A candidate is a possible match for an address that was submitted.<br>
|
|
4
|
+
* A lookup can have multiple candidates if the address was ambiguous.
|
|
5
|
+
*
|
|
6
|
+
* @see "https://www.smarty.com/docs/cloud/international-street-api#root"
|
|
7
|
+
*/
|
|
8
|
+
declare class Candidate {
|
|
9
|
+
constructor(responseData: any);
|
|
10
|
+
organization: any;
|
|
11
|
+
address1: any;
|
|
12
|
+
address2: any;
|
|
13
|
+
address3: any;
|
|
14
|
+
address4: any;
|
|
15
|
+
address5: any;
|
|
16
|
+
address6: any;
|
|
17
|
+
address7: any;
|
|
18
|
+
address8: any;
|
|
19
|
+
address9: any;
|
|
20
|
+
address10: any;
|
|
21
|
+
address11: any;
|
|
22
|
+
address12: any;
|
|
23
|
+
components: {};
|
|
24
|
+
analysis: {};
|
|
25
|
+
metadata: {};
|
|
26
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export = Client;
|
|
2
|
+
/**
|
|
3
|
+
* This client sends lookups to the Smarty International Street API, <br>
|
|
4
|
+
* and attaches the results to the appropriate Lookup objects.
|
|
5
|
+
*/
|
|
6
|
+
declare class Client {
|
|
7
|
+
constructor(sender: any);
|
|
8
|
+
sender: any;
|
|
9
|
+
send(lookup: any): Promise<any>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export = Lookup;
|
|
2
|
+
/**
|
|
3
|
+
* In addition to holding all of the input data for this lookup, this class also<br>
|
|
4
|
+
* will contain the result of the lookup after it comes back from the API.
|
|
5
|
+
* <p><b>Note: </b><i>Lookups must have certain required fields set with non-blank values. <br>
|
|
6
|
+
* These can be found at the URL below.</i></p>
|
|
7
|
+
* @see "https://www.smarty.com/docs/cloud/international-street-api#http-input-fields"
|
|
8
|
+
*/
|
|
9
|
+
declare class Lookup {
|
|
10
|
+
constructor(country: any, freeform: any);
|
|
11
|
+
result: any[];
|
|
12
|
+
country: any;
|
|
13
|
+
freeform: any;
|
|
14
|
+
address1: any;
|
|
15
|
+
address2: any;
|
|
16
|
+
address3: any;
|
|
17
|
+
address4: any;
|
|
18
|
+
organization: any;
|
|
19
|
+
locality: any;
|
|
20
|
+
administrativeArea: any;
|
|
21
|
+
postalCode: any;
|
|
22
|
+
geocode: any;
|
|
23
|
+
language: any;
|
|
24
|
+
inputId: any;
|
|
25
|
+
ensureEnoughInfo(): boolean;
|
|
26
|
+
ensureValidData(): boolean;
|
|
27
|
+
customParameters: {};
|
|
28
|
+
addCustomParameter(key: any, value: any): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface Request {
|
|
2
|
+
baseUrl: string;
|
|
3
|
+
baseUrlParam: string;
|
|
4
|
+
payload: string | object | null;
|
|
5
|
+
headers: Record<string, string>;
|
|
6
|
+
parameters: Record<string, string | number>;
|
|
7
|
+
}
|
|
8
|
+
export interface Response {
|
|
9
|
+
statusCode: number;
|
|
10
|
+
payload: object[] | object | string | null;
|
|
11
|
+
error: Error | null;
|
|
12
|
+
headers: Record<string, string>;
|
|
13
|
+
}
|
|
14
|
+
export interface Sender {
|
|
15
|
+
send(request: Request): Promise<Response>;
|
|
16
|
+
}
|
|
17
|
+
export interface Sleeper {
|
|
18
|
+
sleep(seconds: number): Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
export interface MockSenderInstance extends Sender {
|
|
21
|
+
statusCodes: string[];
|
|
22
|
+
headers?: Record<string, unknown> | undefined;
|
|
23
|
+
error?: string | undefined;
|
|
24
|
+
currentStatusCodeIndex: number;
|
|
25
|
+
}
|
|
26
|
+
export interface MockSleeperInstance extends Sleeper {
|
|
27
|
+
sleepDurations: number[];
|
|
28
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export = Client;
|
|
2
|
+
/**
|
|
3
|
+
* This client sends lookups to the Smarty US Autocomplete Pro API, <br>
|
|
4
|
+
* and attaches the suggestions to the appropriate Lookup objects.
|
|
5
|
+
*/
|
|
6
|
+
declare class Client {
|
|
7
|
+
constructor(sender: any);
|
|
8
|
+
sender: any;
|
|
9
|
+
send(lookup: any): Promise<any>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export = Lookup;
|
|
2
|
+
/**
|
|
3
|
+
* In addition to holding all of the input data for this lookup, this class also<br>
|
|
4
|
+
* will contain the result of the lookup after it comes back from the API.
|
|
5
|
+
* @see "https://www.smarty.com/docs/cloud/us-autocomplete-api#pro-http-request-input-fields"
|
|
6
|
+
*/
|
|
7
|
+
declare class Lookup {
|
|
8
|
+
/**
|
|
9
|
+
* @param search The beginning of an address. This is required to be set.
|
|
10
|
+
*/
|
|
11
|
+
constructor(search: any);
|
|
12
|
+
result: any[];
|
|
13
|
+
search: any;
|
|
14
|
+
selected: any;
|
|
15
|
+
maxResults: any;
|
|
16
|
+
includeOnlyCities: any[];
|
|
17
|
+
includeOnlyStates: any[];
|
|
18
|
+
includeOnlyZIPCodes: any[];
|
|
19
|
+
excludeStates: any[];
|
|
20
|
+
preferCities: any[];
|
|
21
|
+
preferStates: any[];
|
|
22
|
+
preferZIPCodes: any[];
|
|
23
|
+
preferRatio: any;
|
|
24
|
+
preferGeolocation: any;
|
|
25
|
+
source: any;
|
|
26
|
+
customParameters: {};
|
|
27
|
+
addCustomParameter(key: any, value: any): void;
|
|
28
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export = Suggestion;
|
|
2
|
+
/**
|
|
3
|
+
* @see "https://www.smarty.com/docs/cloud/us-autocomplete-api#pro-http-response"
|
|
4
|
+
*/
|
|
5
|
+
declare class Suggestion {
|
|
6
|
+
constructor(responseData: any);
|
|
7
|
+
streetLine: any;
|
|
8
|
+
secondary: any;
|
|
9
|
+
city: any;
|
|
10
|
+
state: any;
|
|
11
|
+
zipcode: any;
|
|
12
|
+
entries: any;
|
|
13
|
+
source: any;
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export = Client;
|
|
2
|
+
declare class Client {
|
|
3
|
+
constructor(sender: any);
|
|
4
|
+
sender: any;
|
|
5
|
+
sendPrincipal(lookup: any): Promise<any>;
|
|
6
|
+
sendFinancial(lookup: any): Promise<any>;
|
|
7
|
+
sendGeo(lookup: any): Promise<any>;
|
|
8
|
+
sendSecondary(lookup: any): Promise<any>;
|
|
9
|
+
sendSecondaryCount(lookup: any): Promise<any>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export = Lookup;
|
|
2
|
+
declare class Lookup {
|
|
3
|
+
constructor(smartyKey: any, include: any, exclude: any, dataset: any, dataSubset: any);
|
|
4
|
+
smartyKey: any;
|
|
5
|
+
include: any;
|
|
6
|
+
exclude: any;
|
|
7
|
+
dataset: any;
|
|
8
|
+
dataSubset: any;
|
|
9
|
+
features: any;
|
|
10
|
+
response: {};
|
|
11
|
+
customParameters: {};
|
|
12
|
+
addCustomParameter(key: any, value: any): void;
|
|
13
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export class Response {
|
|
2
|
+
constructor(responseData: any);
|
|
3
|
+
smartyKey: any;
|
|
4
|
+
dataSetName: any;
|
|
5
|
+
dataSubsetName: any;
|
|
6
|
+
attributes: {};
|
|
7
|
+
}
|
|
8
|
+
export class FinancialResponse {
|
|
9
|
+
constructor(responseData: any);
|
|
10
|
+
smartyKey: any;
|
|
11
|
+
dataSetName: any;
|
|
12
|
+
dataSubsetName: any;
|
|
13
|
+
attributes: {};
|
|
14
|
+
}
|
|
15
|
+
export class GeoResponse {
|
|
16
|
+
constructor(responseData: any);
|
|
17
|
+
smartyKey: any;
|
|
18
|
+
dataSetName: any;
|
|
19
|
+
attributes: {};
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export = Address;
|
|
2
|
+
/**
|
|
3
|
+
* @see <a href="https://www.smarty.com/docs/cloud/us-extract-api#http-response-status">Smarty US Extract API docs</a>
|
|
4
|
+
*/
|
|
5
|
+
declare class Address {
|
|
6
|
+
constructor(responseData: any);
|
|
7
|
+
text: any;
|
|
8
|
+
verified: any;
|
|
9
|
+
line: any;
|
|
10
|
+
start: any;
|
|
11
|
+
end: any;
|
|
12
|
+
candidates: any;
|
|
13
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export = Lookup;
|
|
2
|
+
/**
|
|
3
|
+
* In addition to holding all of the input data for this lookup, this class also<br>
|
|
4
|
+
* will contain the result of the lookup after it comes back from the API.
|
|
5
|
+
* @see "https://www.smarty.com/docs/cloud/us-extract-api#http-request-input-fields"
|
|
6
|
+
*/
|
|
7
|
+
declare class Lookup {
|
|
8
|
+
/**
|
|
9
|
+
* @param text The text that is to have addresses extracted out of it for verification (required)
|
|
10
|
+
*/
|
|
11
|
+
constructor(text: any);
|
|
12
|
+
result: {
|
|
13
|
+
meta: {};
|
|
14
|
+
addresses: never[];
|
|
15
|
+
};
|
|
16
|
+
text: any;
|
|
17
|
+
html: any;
|
|
18
|
+
aggressive: any;
|
|
19
|
+
addressesHaveLineBreaks: any;
|
|
20
|
+
addressesPerLine: any;
|
|
21
|
+
customParameters: {};
|
|
22
|
+
addCustomParameter(key: any, value: any): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export = Result;
|
|
2
|
+
/**
|
|
3
|
+
* @see <a href="https://www.smarty.com/docs/cloud/us-extract-api#http-response-status">Smarty US Extract API docs</a>
|
|
4
|
+
*/
|
|
5
|
+
declare class Result {
|
|
6
|
+
constructor({ meta, addresses }: {
|
|
7
|
+
meta: any;
|
|
8
|
+
addresses: any;
|
|
9
|
+
});
|
|
10
|
+
meta: {
|
|
11
|
+
lines: any;
|
|
12
|
+
unicode: any;
|
|
13
|
+
addressCount: any;
|
|
14
|
+
verifiedCount: any;
|
|
15
|
+
bytes: any;
|
|
16
|
+
characterCount: any;
|
|
17
|
+
};
|
|
18
|
+
addresses: any;
|
|
19
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export = Client;
|
|
2
|
+
/**
|
|
3
|
+
* This client sends lookups to the Smarty US Reverse Geo API, <br>
|
|
4
|
+
* and attaches the results to the appropriate Lookup objects.
|
|
5
|
+
*/
|
|
6
|
+
declare class Client {
|
|
7
|
+
constructor(sender: any);
|
|
8
|
+
sender: any;
|
|
9
|
+
send(lookup: any): Promise<any>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export = Lookup;
|
|
2
|
+
/**
|
|
3
|
+
* In addition to holding all of the input data for this lookup, this class also<br>
|
|
4
|
+
* will contain the result of the lookup after it comes back from the API.
|
|
5
|
+
* @see "https://www.smarty.com/docs/cloud/us-street-api#input-fields"
|
|
6
|
+
*/
|
|
7
|
+
declare class Lookup {
|
|
8
|
+
constructor(latitude: any, longitude: any, source?: string);
|
|
9
|
+
latitude: any;
|
|
10
|
+
longitude: any;
|
|
11
|
+
source: string;
|
|
12
|
+
response: Response;
|
|
13
|
+
customParameters: {};
|
|
14
|
+
addCustomParameter(key: any, value: any): void;
|
|
15
|
+
}
|
|
16
|
+
import Response = require("./Response");
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export = Result;
|
|
2
|
+
/**
|
|
3
|
+
* A candidate is a possible match for an address that was submitted.<br>
|
|
4
|
+
* A lookup can have multiple candidates if the address was ambiguous.
|
|
5
|
+
*
|
|
6
|
+
* @see "https://www.smarty.com/docs/cloud/us-reverse-geo-api#result"
|
|
7
|
+
*/
|
|
8
|
+
declare class Result {
|
|
9
|
+
constructor(responseData: any);
|
|
10
|
+
distance: any;
|
|
11
|
+
address: {};
|
|
12
|
+
coordinate: {};
|
|
13
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export = Candidate;
|
|
2
|
+
/**
|
|
3
|
+
* A candidate is a possible match for an address that was submitted.<br>
|
|
4
|
+
* A lookup can have multiple candidates if the address was ambiguous, and<br>
|
|
5
|
+
* the maxCandidates field is set higher than 1.
|
|
6
|
+
*
|
|
7
|
+
* @see "https://www.smarty.com/docs/cloud/us-street-api#root"
|
|
8
|
+
*/
|
|
9
|
+
declare class Candidate {
|
|
10
|
+
constructor(responseData: any);
|
|
11
|
+
inputIndex: any;
|
|
12
|
+
candidateIndex: any;
|
|
13
|
+
addressee: any;
|
|
14
|
+
deliveryLine1: any;
|
|
15
|
+
deliveryLine2: any;
|
|
16
|
+
lastLine: any;
|
|
17
|
+
deliveryPointBarcode: any;
|
|
18
|
+
smartyKey: any;
|
|
19
|
+
components: {};
|
|
20
|
+
metadata: {};
|
|
21
|
+
analysis: {};
|
|
22
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export = Client;
|
|
2
|
+
/**
|
|
3
|
+
* This client sends lookups to the Smarty US Street API, <br>
|
|
4
|
+
* and attaches the results to the appropriate Lookup objects.
|
|
5
|
+
*/
|
|
6
|
+
declare class Client {
|
|
7
|
+
constructor(sender: any);
|
|
8
|
+
sender: any;
|
|
9
|
+
/**
|
|
10
|
+
* Sends up to 100 lookups for validation.
|
|
11
|
+
* @param data may be a Lookup object, or a Batch which must contain between 1 and 100 Lookup objects
|
|
12
|
+
* @throws SmartyException
|
|
13
|
+
*/
|
|
14
|
+
send(data: any): Promise<any>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export = Lookup;
|
|
2
|
+
/**
|
|
3
|
+
* In addition to holding all of the input data for this lookup, this class also<br>
|
|
4
|
+
* will contain the result of the lookup after it comes back from the API.
|
|
5
|
+
* @see "https://www.smarty.com/docs/cloud/us-street-api#input-fields"
|
|
6
|
+
*/
|
|
7
|
+
declare class Lookup {
|
|
8
|
+
constructor(street: any, street2: any, secondary: any, city: any, state: any, zipCode: any, lastLine: any, addressee: any, urbanization: any, match: any, maxCandidates: any, inputId: any, format: any, countySource: any);
|
|
9
|
+
street: any;
|
|
10
|
+
street2: any;
|
|
11
|
+
secondary: any;
|
|
12
|
+
city: any;
|
|
13
|
+
state: any;
|
|
14
|
+
zipCode: any;
|
|
15
|
+
lastLine: any;
|
|
16
|
+
addressee: any;
|
|
17
|
+
urbanization: any;
|
|
18
|
+
match: any;
|
|
19
|
+
maxCandidates: any;
|
|
20
|
+
inputId: any;
|
|
21
|
+
format: any;
|
|
22
|
+
countySource: any;
|
|
23
|
+
result: any[];
|
|
24
|
+
customParameters: {};
|
|
25
|
+
addCustomParameter(key: any, value: any): void;
|
|
26
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export = Client;
|
|
2
|
+
/**
|
|
3
|
+
* This client sends lookups to the Smarty US ZIP Code API, <br>
|
|
4
|
+
* and attaches the results to the appropriate Lookup objects.
|
|
5
|
+
*/
|
|
6
|
+
declare class Client {
|
|
7
|
+
constructor(sender: any);
|
|
8
|
+
sender: any;
|
|
9
|
+
/**
|
|
10
|
+
* Sends up to 100 lookups for validation.
|
|
11
|
+
* @param data May be a Lookup object, or a Batch which must contain between 1 and 100 Lookup objects
|
|
12
|
+
* @throws SmartyException
|
|
13
|
+
*/
|
|
14
|
+
send(data: any): Promise<any>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export = Lookup;
|
|
2
|
+
/**
|
|
3
|
+
* In addition to holding all of the input data for this lookup, this class also<br>
|
|
4
|
+
* will contain the result of the lookup after it comes back from the API.
|
|
5
|
+
* @see "https://www.smarty.com/docs/cloud/us-zipcode-api#http-request-input-fields"
|
|
6
|
+
*/
|
|
7
|
+
declare class Lookup {
|
|
8
|
+
constructor(city: any, state: any, zipCode: any, inputId: any);
|
|
9
|
+
city: any;
|
|
10
|
+
state: any;
|
|
11
|
+
zipCode: any;
|
|
12
|
+
inputId: any;
|
|
13
|
+
result: any[];
|
|
14
|
+
customParameters: {};
|
|
15
|
+
addCustomParameter(key: any, value: any): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export = Result;
|
|
2
|
+
/**
|
|
3
|
+
* @see "https://www.smarty.com/docs/cloud/us-zipcode-api#root"
|
|
4
|
+
*/
|
|
5
|
+
declare class Result {
|
|
6
|
+
constructor(responseData: any);
|
|
7
|
+
inputIndex: any;
|
|
8
|
+
status: any;
|
|
9
|
+
reason: any;
|
|
10
|
+
valid: boolean;
|
|
11
|
+
cities: any;
|
|
12
|
+
zipcodes: any;
|
|
13
|
+
}
|