smartystreets-javascript-sdk 7.3.1 → 7.4.1

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.
Files changed (67) hide show
  1. package/dist/cjs/ClientBuilder.cjs +1 -1
  2. package/dist/cjs/international_street/Candidate.cjs +1 -1
  3. package/dist/cjs/package.json.cjs +1 -1
  4. package/dist/cjs/us_enrichment/Lookup.cjs +1 -1
  5. package/dist/cjs/us_enrichment/Response.cjs +1 -1
  6. package/dist/cjs/us_street/Candidate.cjs +1 -1
  7. package/dist/esm/ClientBuilder.mjs +1 -1
  8. package/dist/esm/international_street/Candidate.mjs +1 -1
  9. package/dist/esm/package.json.mjs +1 -1
  10. package/dist/esm/us_enrichment/Lookup.mjs +1 -1
  11. package/dist/esm/us_enrichment/Response.mjs +1 -1
  12. package/dist/esm/us_street/Candidate.mjs +1 -1
  13. package/dist/tsconfig.tsbuildinfo +1 -0
  14. package/dist/types/AgentSender.d.ts +6 -0
  15. package/dist/types/BaseUrlSender.d.ts +7 -0
  16. package/dist/types/Batch.d.ts +19 -0
  17. package/dist/types/ClientBuilder.d.ts +112 -0
  18. package/dist/types/CustomHeaderSender.d.ts +7 -0
  19. package/dist/types/CustomQuerySender.d.ts +7 -0
  20. package/dist/types/Errors.d.ts +42 -0
  21. package/dist/types/HttpSender.d.ts +22 -0
  22. package/dist/types/InputData.d.ts +10 -0
  23. package/dist/types/LicenseSender.d.ts +7 -0
  24. package/dist/types/Request.d.ts +13 -0
  25. package/dist/types/Response.d.ts +8 -0
  26. package/dist/types/RetrySender.d.ts +13 -0
  27. package/dist/types/SharedCredentials.d.ts +7 -0
  28. package/dist/types/SigningSender.d.ts +11 -0
  29. package/dist/types/StaticCredentials.d.ts +7 -0
  30. package/dist/types/StatusCodeSender.d.ts +6 -0
  31. package/dist/types/international_address_autocomplete/Client.d.ts +6 -0
  32. package/dist/types/international_address_autocomplete/Lookup.d.ts +15 -0
  33. package/dist/types/international_address_autocomplete/Suggestion.d.ts +14 -0
  34. package/dist/types/international_postal_code/Client.d.ts +15 -0
  35. package/dist/types/international_postal_code/Lookup.d.ts +17 -0
  36. package/dist/types/international_postal_code/Result.d.ts +18 -0
  37. package/dist/types/international_street/Candidate.d.ts +26 -0
  38. package/dist/types/international_street/Client.d.ts +10 -0
  39. package/dist/types/international_street/Lookup.d.ts +29 -0
  40. package/dist/types/types.d.ts +28 -0
  41. package/dist/types/us_autocomplete_pro/Client.d.ts +10 -0
  42. package/dist/types/us_autocomplete_pro/Lookup.d.ts +28 -0
  43. package/dist/types/us_autocomplete_pro/Suggestion.d.ts +14 -0
  44. package/dist/types/us_enrichment/Client.d.ts +10 -0
  45. package/dist/types/us_enrichment/Lookup.d.ts +13 -0
  46. package/dist/types/us_enrichment/Response.d.ts +20 -0
  47. package/dist/types/us_extract/Address.d.ts +13 -0
  48. package/dist/types/us_extract/Client.d.ts +10 -0
  49. package/dist/types/us_extract/Lookup.d.ts +23 -0
  50. package/dist/types/us_extract/Result.d.ts +19 -0
  51. package/dist/types/us_reverse_geo/Client.d.ts +10 -0
  52. package/dist/types/us_reverse_geo/Lookup.d.ts +16 -0
  53. package/dist/types/us_reverse_geo/Response.d.ts +8 -0
  54. package/dist/types/us_reverse_geo/Result.d.ts +13 -0
  55. package/dist/types/us_street/Candidate.d.ts +22 -0
  56. package/dist/types/us_street/Client.d.ts +15 -0
  57. package/dist/types/us_street/Lookup.d.ts +26 -0
  58. package/dist/types/us_zipcode/Client.d.ts +15 -0
  59. package/dist/types/us_zipcode/Lookup.d.ts +16 -0
  60. package/dist/types/us_zipcode/Result.d.ts +13 -0
  61. package/dist/types/util/Sleeper.d.ts +4 -0
  62. package/dist/types/util/apiToSDKKeyMap.d.ts +92 -0
  63. package/dist/types/util/buildClients.d.ts +10 -0
  64. package/dist/types/util/buildInputData.d.ts +2 -0
  65. package/dist/types/util/buildSmartyResponse.d.ts +2 -0
  66. package/dist/types/util/sendBatch.d.ts +2 -0
  67. package/package.json +1 -1
@@ -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,10 @@
1
+ export = Client;
2
+ /**
3
+ * This client sends lookups to the Smarty US Extract API, <br>
4
+ * and attaches the results to the Lookup objects.
5
+ */
6
+ declare class Client {
7
+ constructor(sender: any);
8
+ sender: any;
9
+ send(lookup: any): Promise<any>;
10
+ }
@@ -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,8 @@
1
+ export = Response;
2
+ /**
3
+ * The SmartyResponse contains the response from a call to the US Reverse Geo API.
4
+ */
5
+ declare class Response {
6
+ constructor(responseData: any);
7
+ results: any[];
8
+ }
@@ -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
+ }
@@ -0,0 +1,4 @@
1
+ export default class Sleeper {
2
+ constructor();
3
+ sleep(seconds: number): Promise<void>;
4
+ }
@@ -0,0 +1,92 @@
1
+ export namespace usStreet {
2
+ let street: string;
3
+ let street2: string;
4
+ let secondary: string;
5
+ let city: string;
6
+ let state: string;
7
+ let zipcode: string;
8
+ let lastline: string;
9
+ let addressee: string;
10
+ let urbanization: string;
11
+ let match: string;
12
+ let format: string;
13
+ let candidates: string;
14
+ let county_source: string;
15
+ }
16
+ export namespace usAutocompletePro {
17
+ let search: string;
18
+ let selected: string;
19
+ let max_results: string;
20
+ let include_only_cities: string;
21
+ let include_only_states: string;
22
+ let include_only_zip_codes: string;
23
+ let exclude_states: string;
24
+ let prefer_cities: string;
25
+ let prefer_states: string;
26
+ let prefer_zip_codes: string;
27
+ let prefer_ratio: string;
28
+ let prefer_geolocation: string;
29
+ let source: string;
30
+ }
31
+ export namespace usZipcode {
32
+ let city_1: string;
33
+ export { city_1 as city };
34
+ let state_1: string;
35
+ export { state_1 as state };
36
+ let zipcode_1: string;
37
+ export { zipcode_1 as zipcode };
38
+ }
39
+ export namespace internationalStreet {
40
+ let country: string;
41
+ let freeform: string;
42
+ let address1: string;
43
+ let address2: string;
44
+ let address3: string;
45
+ let address4: string;
46
+ let organization: string;
47
+ let locality: string;
48
+ let administrative_area: string;
49
+ let postal_code: string;
50
+ let geocode: string;
51
+ let language: string;
52
+ }
53
+ export namespace internationalAddressAutocomplete {
54
+ let search_1: string;
55
+ export { search_1 as search };
56
+ let country_1: string;
57
+ export { country_1 as country };
58
+ let max_results_1: string;
59
+ export { max_results_1 as max_results };
60
+ export let include_only_administrative_area: string;
61
+ export let include_only_locality: string;
62
+ export let include_only_postal_code: string;
63
+ }
64
+ export namespace usReverseGeo {
65
+ export let latitude: string;
66
+ export let longitude: string;
67
+ let source_1: string;
68
+ export { source_1 as source };
69
+ }
70
+ export namespace usExtract {
71
+ let html: string;
72
+ let aggressive: string;
73
+ let addr_line_breaks: string;
74
+ let addr_per_line: string;
75
+ }
76
+ export namespace usEnrichment {
77
+ let include: string;
78
+ let exclude: string;
79
+ let dataset: string;
80
+ let data_subset: string;
81
+ }
82
+ export namespace internationalPostalCode {
83
+ export let input_id: string;
84
+ let country_2: string;
85
+ export { country_2 as country };
86
+ let locality_1: string;
87
+ export { locality_1 as locality };
88
+ let administrative_area_1: string;
89
+ export { administrative_area_1 as administrative_area };
90
+ let postal_code_1: string;
91
+ export { postal_code_1 as postal_code };
92
+ }
@@ -0,0 +1,10 @@
1
+ declare function buildUsStreetApiClient(credentials: any): any;
2
+ declare function buildUsAutocompleteProApiClient(credentials: any): any;
3
+ declare function buildUsExtractApiClient(credentials: any): any;
4
+ declare function buildUsZipcodeApiClient(credentials: any): any;
5
+ declare function buildInternationalStreetApiClient(credentials: any): any;
6
+ declare function buildUsReverseGeoApiClient(credentials: any): any;
7
+ declare function buildInternationalAddressAutocompleteApiClient(credentials: any): any;
8
+ declare function buildUsEnrichmentApiClient(credentials: any): any;
9
+ declare function buildInternationalPostalCodeApiClient(credentials: any): any;
10
+ export { buildUsStreetApiClient as usStreet, buildUsAutocompleteProApiClient as usAutocompletePro, buildUsExtractApiClient as usExtract, buildUsZipcodeApiClient as usZipcode, buildInternationalStreetApiClient as internationalStreet, buildUsReverseGeoApiClient as usReverseGeo, buildInternationalAddressAutocompleteApiClient as internationalAddressAutocomplete, buildUsEnrichmentApiClient as usEnrichment, buildInternationalPostalCodeApiClient as internationalPostalCode };
@@ -0,0 +1,2 @@
1
+ declare function _exports(lookup: any, keyTranslationFormat: any): {};
2
+ export = _exports;
@@ -0,0 +1,2 @@
1
+ export function buildSmartyResponse(response: any, error: any): Response;
2
+ import Response = require("../Response.js");
@@ -0,0 +1,2 @@
1
+ declare function _exports(batch: any, sender: any, Result: any, keyTranslationFormat: any): Promise<any>;
2
+ export = _exports;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smartystreets-javascript-sdk",
3
- "version": "7.3.1",
3
+ "version": "7.4.1",
4
4
  "description": "Quick and easy Smarty address validation.",
5
5
  "keywords": [
6
6
  "smarty",