smartystreets-javascript-sdk 8.2.0 → 8.2.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 (291) hide show
  1. package/LICENSE.md +183 -184
  2. package/README.md +145 -0
  3. package/dist/cjs/AgentSender.cjs +1 -1
  4. package/dist/cjs/BaseUrlSender.cjs +1 -1
  5. package/dist/cjs/Batch.cjs +1 -1
  6. package/dist/cjs/ClientBuilder.cjs +1 -1
  7. package/dist/cjs/CustomHeaderSender.cjs +1 -1
  8. package/dist/cjs/Errors.cjs +1 -1
  9. package/dist/cjs/HttpSender.cjs +1 -1
  10. package/dist/cjs/InputData.cjs +1 -1
  11. package/dist/cjs/LicenseSender.cjs +1 -1
  12. package/dist/cjs/Request.cjs +1 -1
  13. package/dist/cjs/Response.cjs +1 -1
  14. package/dist/cjs/RetrySender.cjs +1 -1
  15. package/dist/cjs/SigningSender.cjs +1 -1
  16. package/dist/cjs/StatusCodeSender.cjs +1 -1
  17. package/dist/cjs/index.cjs +1 -1
  18. package/dist/cjs/international_address_autocomplete/Client.cjs +1 -1
  19. package/dist/cjs/international_address_autocomplete/Lookup.cjs +1 -1
  20. package/dist/cjs/international_address_autocomplete/Suggestion.cjs +1 -1
  21. package/dist/cjs/international_postal_code/Client.cjs +1 -1
  22. package/dist/cjs/international_postal_code/Lookup.cjs +1 -1
  23. package/dist/cjs/international_postal_code/Result.cjs +1 -1
  24. package/dist/cjs/international_street/Candidate.cjs +1 -1
  25. package/dist/cjs/international_street/Client.cjs +1 -1
  26. package/dist/cjs/international_street/Lookup.cjs +1 -1
  27. package/dist/cjs/us_autocomplete_pro/Client.cjs +1 -1
  28. package/dist/cjs/us_autocomplete_pro/Lookup.cjs +1 -1
  29. package/dist/cjs/us_autocomplete_pro/Suggestion.cjs +1 -1
  30. package/dist/cjs/us_enrichment/Client.cjs +1 -1
  31. package/dist/cjs/us_enrichment/Lookup.cjs +1 -1
  32. package/dist/cjs/us_enrichment/Response.cjs +1 -1
  33. package/dist/cjs/us_extract/Address.cjs +1 -1
  34. package/dist/cjs/us_extract/Client.cjs +1 -1
  35. package/dist/cjs/us_extract/Lookup.cjs +1 -1
  36. package/dist/cjs/us_extract/Result.cjs +1 -1
  37. package/dist/cjs/us_reverse_geo/Client.cjs +1 -1
  38. package/dist/cjs/us_reverse_geo/Lookup.cjs +1 -1
  39. package/dist/cjs/us_reverse_geo/Response.cjs +1 -1
  40. package/dist/cjs/us_reverse_geo/Result.cjs +1 -1
  41. package/dist/cjs/us_street/Candidate.cjs +1 -1
  42. package/dist/cjs/us_street/Client.cjs +1 -1
  43. package/dist/cjs/us_street/Lookup.cjs +1 -1
  44. package/dist/cjs/us_zipcode/Client.cjs +1 -1
  45. package/dist/cjs/us_zipcode/Lookup.cjs +1 -1
  46. package/dist/cjs/us_zipcode/Result.cjs +1 -1
  47. package/dist/cjs/util/apiToSDKKeyMap.cjs +1 -1
  48. package/dist/cjs/util/buildClients.cjs +1 -1
  49. package/dist/cjs/util/buildInputData.cjs +1 -1
  50. package/dist/cjs/util/buildSmartyResponse.cjs +1 -1
  51. package/dist/cjs/util/buildUsStreetInputData.cjs +1 -1
  52. package/dist/cjs/util/sendBatch.cjs +1 -1
  53. package/dist/esm/AgentSender.mjs +1 -1
  54. package/dist/esm/BaseUrlSender.mjs +1 -1
  55. package/dist/esm/Batch.mjs +1 -1
  56. package/dist/esm/ClientBuilder.mjs +1 -1
  57. package/dist/esm/CustomHeaderSender.mjs +1 -1
  58. package/dist/esm/Errors.mjs +1 -1
  59. package/dist/esm/HttpSender.mjs +1 -1
  60. package/dist/esm/InputData.mjs +1 -1
  61. package/dist/esm/LicenseSender.mjs +1 -1
  62. package/dist/esm/Request.mjs +1 -1
  63. package/dist/esm/Response.mjs +1 -1
  64. package/dist/esm/RetrySender.mjs +1 -1
  65. package/dist/esm/SigningSender.mjs +1 -1
  66. package/dist/esm/StatusCodeSender.mjs +1 -1
  67. package/dist/esm/index.mjs +1 -1
  68. package/dist/esm/international_address_autocomplete/Client.mjs +1 -1
  69. package/dist/esm/international_address_autocomplete/Lookup.mjs +1 -1
  70. package/dist/esm/international_address_autocomplete/Suggestion.mjs +1 -1
  71. package/dist/esm/international_postal_code/Client.mjs +1 -1
  72. package/dist/esm/international_postal_code/Lookup.mjs +1 -1
  73. package/dist/esm/international_postal_code/Result.mjs +1 -1
  74. package/dist/esm/international_street/Candidate.mjs +1 -1
  75. package/dist/esm/international_street/Client.mjs +1 -1
  76. package/dist/esm/international_street/Lookup.mjs +1 -1
  77. package/dist/esm/us_autocomplete_pro/Client.mjs +1 -1
  78. package/dist/esm/us_autocomplete_pro/Lookup.mjs +1 -1
  79. package/dist/esm/us_autocomplete_pro/Suggestion.mjs +1 -1
  80. package/dist/esm/us_enrichment/Client.mjs +1 -1
  81. package/dist/esm/us_enrichment/Lookup.mjs +1 -1
  82. package/dist/esm/us_enrichment/Response.mjs +1 -1
  83. package/dist/esm/us_extract/Address.mjs +1 -1
  84. package/dist/esm/us_extract/Client.mjs +1 -1
  85. package/dist/esm/us_extract/Lookup.mjs +1 -1
  86. package/dist/esm/us_extract/Result.mjs +1 -1
  87. package/dist/esm/us_reverse_geo/Client.mjs +1 -1
  88. package/dist/esm/us_reverse_geo/Lookup.mjs +1 -1
  89. package/dist/esm/us_reverse_geo/Response.mjs +1 -1
  90. package/dist/esm/us_reverse_geo/Result.mjs +1 -1
  91. package/dist/esm/us_street/Candidate.mjs +1 -1
  92. package/dist/esm/us_street/Client.mjs +1 -1
  93. package/dist/esm/us_street/Lookup.mjs +1 -1
  94. package/dist/esm/us_zipcode/Client.mjs +1 -1
  95. package/dist/esm/us_zipcode/Lookup.mjs +1 -1
  96. package/dist/esm/us_zipcode/Result.mjs +1 -1
  97. package/dist/esm/util/apiToSDKKeyMap.mjs +1 -1
  98. package/dist/esm/util/buildClients.mjs +1 -1
  99. package/dist/esm/util/buildInputData.mjs +1 -1
  100. package/dist/esm/util/buildSmartyResponse.mjs +1 -1
  101. package/dist/esm/util/buildUsStreetInputData.mjs +1 -1
  102. package/dist/esm/util/sendBatch.mjs +1 -1
  103. package/dist/types/index.d.ts +180 -0
  104. package/dist/types/src/Batch.d.ts +12 -0
  105. package/dist/types/src/ClientBuilder.d.ts +55 -0
  106. package/dist/types/src/Errors.d.ts +59 -0
  107. package/dist/types/src/HttpSender.d.ts +11 -0
  108. package/dist/types/src/InputData.d.ts +9 -0
  109. package/dist/types/src/LicenseSender.d.ts +7 -0
  110. package/dist/types/src/Request.d.ts +9 -0
  111. package/dist/types/src/Response.d.ts +8 -0
  112. package/dist/types/{SigningSender.d.ts → src/SigningSender.d.ts} +1 -5
  113. package/dist/types/src/StatusCodeSender.d.ts +6 -0
  114. package/dist/types/src/international_address_autocomplete/Client.d.ts +7 -0
  115. package/dist/types/src/international_address_autocomplete/Lookup.d.ts +20 -0
  116. package/dist/types/src/international_address_autocomplete/Suggestion.d.ts +25 -0
  117. package/dist/types/src/international_postal_code/Client.d.ts +7 -0
  118. package/dist/types/src/international_postal_code/Lookup.d.ts +12 -0
  119. package/dist/types/src/international_postal_code/Result.d.ts +27 -0
  120. package/dist/types/src/international_street/Candidate.d.ts +250 -0
  121. package/dist/types/src/international_street/Client.d.ts +7 -0
  122. package/dist/types/src/international_street/Lookup.d.ts +24 -0
  123. package/dist/types/{types.d.ts → src/types.d.ts} +11 -1
  124. package/dist/types/src/us_autocomplete_pro/Client.d.ts +7 -0
  125. package/dist/types/src/us_autocomplete_pro/Lookup.d.ts +21 -0
  126. package/dist/types/src/us_autocomplete_pro/Suggestion.d.ts +19 -0
  127. package/dist/types/src/us_enrichment/Client.d.ts +11 -0
  128. package/dist/types/src/us_enrichment/Lookup.d.ts +13 -0
  129. package/dist/types/src/us_enrichment/Response.d.ts +1081 -0
  130. package/dist/types/src/us_extract/Address.d.ts +18 -0
  131. package/dist/types/src/us_extract/Client.d.ts +7 -0
  132. package/dist/types/src/us_extract/Lookup.d.ts +12 -0
  133. package/dist/types/src/us_extract/Result.d.ts +26 -0
  134. package/dist/types/src/us_reverse_geo/Client.d.ts +7 -0
  135. package/dist/types/src/us_reverse_geo/Lookup.d.ts +10 -0
  136. package/dist/types/src/us_reverse_geo/Response.d.ts +9 -0
  137. package/dist/types/src/us_reverse_geo/Result.d.ts +41 -0
  138. package/dist/types/src/us_street/Candidate.d.ts +189 -0
  139. package/dist/types/src/us_street/Client.d.ts +8 -0
  140. package/dist/types/src/us_street/Lookup.d.ts +24 -0
  141. package/dist/types/src/us_zipcode/Client.d.ts +8 -0
  142. package/dist/types/src/us_zipcode/Lookup.d.ts +11 -0
  143. package/dist/types/src/us_zipcode/Result.d.ts +67 -0
  144. package/dist/types/src/util/apiToSDKKeyMap.d.ts +13 -0
  145. package/dist/types/src/util/buildClients.d.ts +25 -0
  146. package/dist/types/src/util/buildInputData.d.ts +6 -0
  147. package/dist/types/src/util/buildSmartyResponse.d.ts +9 -0
  148. package/dist/types/src/util/buildUsStreetInputData.d.ts +2 -0
  149. package/dist/types/src/util/sendBatch.d.ts +5 -0
  150. package/dist/types/tests/fixtures/MockSleeper.d.ts +5 -0
  151. package/dist/types/tests/fixtures/mock_senders.d.ts +25 -0
  152. package/dist/types/tests/international_address_autocomplete/test_Client.d.ts +1 -0
  153. package/dist/types/tests/international_address_autocomplete/test_Lookup.d.ts +1 -0
  154. package/dist/types/tests/international_postal_code/test_Client.d.ts +1 -0
  155. package/dist/types/tests/international_postal_code/test_Lookup.d.ts +1 -0
  156. package/dist/types/tests/international_postal_code/test_Result.d.ts +1 -0
  157. package/dist/types/tests/international_street/test_Candidate.d.ts +1 -0
  158. package/dist/types/tests/international_street/test_Client.d.ts +1 -0
  159. package/dist/types/tests/international_street/test_Lookup.d.ts +1 -0
  160. package/dist/types/tests/test_AgentSender.d.ts +1 -0
  161. package/dist/types/tests/test_BaseUrlSender.d.ts +1 -0
  162. package/dist/types/tests/test_BasicAuthCredentials.d.ts +1 -0
  163. package/dist/types/tests/test_Batch.d.ts +1 -0
  164. package/dist/types/tests/test_ClientBuilder.d.ts +1 -0
  165. package/dist/types/tests/test_CustomHeaderSender.d.ts +1 -0
  166. package/dist/types/tests/test_CustomQuerySender.d.ts +1 -0
  167. package/dist/types/tests/test_ExtractExample.d.ts +1 -0
  168. package/dist/types/tests/test_HttpSender.d.ts +1 -0
  169. package/dist/types/tests/test_LicenseSender.d.ts +1 -0
  170. package/dist/types/tests/test_RetrySender.d.ts +1 -0
  171. package/dist/types/tests/test_SigningSender.d.ts +1 -0
  172. package/dist/types/tests/test_StatusCodeSender.d.ts +1 -0
  173. package/dist/types/tests/us_autocomplete_pro/test_Client.d.ts +1 -0
  174. package/dist/types/tests/us_autocomplete_pro/test_Lookup.d.ts +1 -0
  175. package/dist/types/tests/us_autocomplete_pro/test_Suggestion.d.ts +1 -0
  176. package/dist/types/tests/us_enrichment/test_Client.d.ts +1 -0
  177. package/dist/types/tests/us_enrichment/test_Lookup.d.ts +1 -0
  178. package/dist/types/tests/us_enrichment/test_Response.d.ts +1 -0
  179. package/dist/types/tests/us_extract/test_Address.d.ts +1 -0
  180. package/dist/types/tests/us_extract/test_Client.d.ts +1 -0
  181. package/dist/types/tests/us_extract/test_Lookup.d.ts +1 -0
  182. package/dist/types/tests/us_extract/test_Result.d.ts +1 -0
  183. package/dist/types/tests/us_reverse_geo/test_Client.d.ts +1 -0
  184. package/dist/types/tests/us_reverse_geo/test_Lookup.d.ts +1 -0
  185. package/dist/types/tests/us_reverse_geo/test_Response.d.ts +1 -0
  186. package/dist/types/tests/us_street/test_Candidate.d.ts +1 -0
  187. package/dist/types/tests/us_street/test_Client.d.ts +1 -0
  188. package/dist/types/tests/us_street/test_Lookup.d.ts +1 -0
  189. package/dist/types/tests/us_zipcode/test_Client.d.ts +1 -0
  190. package/dist/types/tests/us_zipcode/test_Result.d.ts +1 -0
  191. package/dist/types/tsconfig.tsbuildinfo +1 -0
  192. package/package.json +4 -5
  193. package/Readme.md +0 -11
  194. package/dist/cjs/_virtual/Batch.cjs +0 -1
  195. package/dist/cjs/_virtual/Candidate.cjs +0 -1
  196. package/dist/cjs/_virtual/Candidate2.cjs +0 -1
  197. package/dist/cjs/_virtual/ClientBuilder.cjs +0 -1
  198. package/dist/cjs/_virtual/Errors.cjs +0 -1
  199. package/dist/cjs/_virtual/Lookup.cjs +0 -1
  200. package/dist/cjs/_virtual/Lookup2.cjs +0 -1
  201. package/dist/cjs/_virtual/Lookup3.cjs +0 -1
  202. package/dist/cjs/_virtual/Lookup4.cjs +0 -1
  203. package/dist/cjs/_virtual/Lookup5.cjs +0 -1
  204. package/dist/cjs/_virtual/Lookup6.cjs +0 -1
  205. package/dist/cjs/_virtual/Lookup7.cjs +0 -1
  206. package/dist/cjs/_virtual/Lookup8.cjs +0 -1
  207. package/dist/cjs/_virtual/Lookup9.cjs +0 -1
  208. package/dist/cjs/_virtual/Response.cjs +0 -1
  209. package/dist/cjs/_virtual/Result.cjs +0 -1
  210. package/dist/cjs/_virtual/Result2.cjs +0 -1
  211. package/dist/cjs/_virtual/Result3.cjs +0 -1
  212. package/dist/cjs/_virtual/Suggestion.cjs +0 -1
  213. package/dist/cjs/_virtual/Suggestion2.cjs +0 -1
  214. package/dist/cjs/_virtual/_commonjsHelpers.cjs +0 -1
  215. package/dist/cjs/_virtual/buildClients.cjs +0 -1
  216. package/dist/esm/_virtual/Batch.mjs +0 -1
  217. package/dist/esm/_virtual/Candidate.mjs +0 -1
  218. package/dist/esm/_virtual/Candidate2.mjs +0 -1
  219. package/dist/esm/_virtual/ClientBuilder.mjs +0 -1
  220. package/dist/esm/_virtual/Errors.mjs +0 -1
  221. package/dist/esm/_virtual/Lookup.mjs +0 -1
  222. package/dist/esm/_virtual/Lookup2.mjs +0 -1
  223. package/dist/esm/_virtual/Lookup3.mjs +0 -1
  224. package/dist/esm/_virtual/Lookup4.mjs +0 -1
  225. package/dist/esm/_virtual/Lookup5.mjs +0 -1
  226. package/dist/esm/_virtual/Lookup6.mjs +0 -1
  227. package/dist/esm/_virtual/Lookup7.mjs +0 -1
  228. package/dist/esm/_virtual/Lookup8.mjs +0 -1
  229. package/dist/esm/_virtual/Lookup9.mjs +0 -1
  230. package/dist/esm/_virtual/Response.mjs +0 -1
  231. package/dist/esm/_virtual/Result.mjs +0 -1
  232. package/dist/esm/_virtual/Result2.mjs +0 -1
  233. package/dist/esm/_virtual/Result3.mjs +0 -1
  234. package/dist/esm/_virtual/Suggestion.mjs +0 -1
  235. package/dist/esm/_virtual/Suggestion2.mjs +0 -1
  236. package/dist/esm/_virtual/_commonjsHelpers.mjs +0 -1
  237. package/dist/esm/_virtual/buildClients.mjs +0 -1
  238. package/dist/tsconfig.tsbuildinfo +0 -1
  239. package/dist/types/Batch.d.ts +0 -19
  240. package/dist/types/ClientBuilder.d.ts +0 -126
  241. package/dist/types/Errors.d.ts +0 -42
  242. package/dist/types/HttpSender.d.ts +0 -22
  243. package/dist/types/InputData.d.ts +0 -10
  244. package/dist/types/LicenseSender.d.ts +0 -7
  245. package/dist/types/Request.d.ts +0 -13
  246. package/dist/types/Response.d.ts +0 -8
  247. package/dist/types/StatusCodeSender.d.ts +0 -6
  248. package/dist/types/international_address_autocomplete/Client.d.ts +0 -6
  249. package/dist/types/international_address_autocomplete/Lookup.d.ts +0 -15
  250. package/dist/types/international_address_autocomplete/Suggestion.d.ts +0 -14
  251. package/dist/types/international_postal_code/Client.d.ts +0 -15
  252. package/dist/types/international_postal_code/Lookup.d.ts +0 -17
  253. package/dist/types/international_postal_code/Result.d.ts +0 -18
  254. package/dist/types/international_street/Candidate.d.ts +0 -26
  255. package/dist/types/international_street/Client.d.ts +0 -10
  256. package/dist/types/international_street/Lookup.d.ts +0 -29
  257. package/dist/types/us_autocomplete_pro/Client.d.ts +0 -10
  258. package/dist/types/us_autocomplete_pro/Lookup.d.ts +0 -28
  259. package/dist/types/us_autocomplete_pro/Suggestion.d.ts +0 -14
  260. package/dist/types/us_enrichment/Client.d.ts +0 -10
  261. package/dist/types/us_enrichment/Lookup.d.ts +0 -13
  262. package/dist/types/us_enrichment/Response.d.ts +0 -20
  263. package/dist/types/us_extract/Address.d.ts +0 -13
  264. package/dist/types/us_extract/Client.d.ts +0 -10
  265. package/dist/types/us_extract/Lookup.d.ts +0 -23
  266. package/dist/types/us_extract/Result.d.ts +0 -19
  267. package/dist/types/us_reverse_geo/Client.d.ts +0 -10
  268. package/dist/types/us_reverse_geo/Lookup.d.ts +0 -16
  269. package/dist/types/us_reverse_geo/Response.d.ts +0 -8
  270. package/dist/types/us_reverse_geo/Result.d.ts +0 -13
  271. package/dist/types/us_street/Candidate.d.ts +0 -22
  272. package/dist/types/us_street/Client.d.ts +0 -15
  273. package/dist/types/us_street/Lookup.d.ts +0 -26
  274. package/dist/types/us_zipcode/Client.d.ts +0 -15
  275. package/dist/types/us_zipcode/Lookup.d.ts +0 -16
  276. package/dist/types/us_zipcode/Result.d.ts +0 -13
  277. package/dist/types/util/apiToSDKKeyMap.d.ts +0 -94
  278. package/dist/types/util/buildClients.d.ts +0 -10
  279. package/dist/types/util/buildInputData.d.ts +0 -2
  280. package/dist/types/util/buildSmartyResponse.d.ts +0 -2
  281. package/dist/types/util/buildUsStreetInputData.d.ts +0 -2
  282. package/dist/types/util/sendBatch.d.ts +0 -2
  283. /package/dist/types/{AgentSender.d.ts → src/AgentSender.d.ts} +0 -0
  284. /package/dist/types/{BaseUrlSender.d.ts → src/BaseUrlSender.d.ts} +0 -0
  285. /package/dist/types/{BasicAuthCredentials.d.ts → src/BasicAuthCredentials.d.ts} +0 -0
  286. /package/dist/types/{CustomHeaderSender.d.ts → src/CustomHeaderSender.d.ts} +0 -0
  287. /package/dist/types/{CustomQuerySender.d.ts → src/CustomQuerySender.d.ts} +0 -0
  288. /package/dist/types/{RetrySender.d.ts → src/RetrySender.d.ts} +0 -0
  289. /package/dist/types/{SharedCredentials.d.ts → src/SharedCredentials.d.ts} +0 -0
  290. /package/dist/types/{StaticCredentials.d.ts → src/StaticCredentials.d.ts} +0 -0
  291. /package/dist/types/{util → src/util}/Sleeper.d.ts +0 -0
@@ -1 +1 @@
1
- var e,t;function a(){return t?e:(t=1,e={usStreet:{street:"street",street2:"street2",secondary:"secondary",city:"city",state:"state",zipcode:"zipCode",lastline:"lastLine",addressee:"addressee",urbanization:"urbanization",match:"match",format:"format",candidates:"maxCandidates",county_source:"countySource",input_id:"inputId"},usAutocompletePro:{search:"search",selected:"selected",max_results:"maxResults",include_only_cities:"includeOnlyCities",include_only_states:"includeOnlyStates",include_only_zip_codes:"includeOnlyZIPCodes",exclude_states:"excludeStates",prefer_cities:"preferCities",prefer_states:"preferStates",prefer_zip_codes:"preferZIPCodes",prefer_ratio:"preferRatio",prefer_geolocation:"preferGeolocation",source:"source"},usZipcode:{city:"city",state:"state",zipcode:"zipCode"},internationalStreet:{country:"country",freeform:"freeform",address1:"address1",address2:"address2",address3:"address3",address4:"address4",organization:"organization",locality:"locality",administrative_area:"administrativeArea",postal_code:"postalCode",geocode:"geocode",language:"language"},internationalAddressAutocomplete:{search:"search",country:"country",max_results:"maxResults",include_only_administrative_area:"includeOnlyAdministrativeArea",include_only_locality:"includeOnlyLocality",include_only_postal_code:"includeOnlyPostalCode"},usReverseGeo:{latitude:"latitude",longitude:"longitude",source:"source"},usExtract:{html:"html",aggressive:"aggressive",addr_line_breaks:"addressesHaveLineBreaks",addr_per_line:"addressesPerLine"},usEnrichment:{include:"include",exclude:"exclude",dataset:"dataset",data_subset:"dataSubset"},internationalPostalCode:{input_id:"inputId",country:"country",locality:"locality",administrative_area:"administrativeArea",postal_code:"postalCode"}})}export{a as __require};
1
+ const e={usStreet:{street:"street",street2:"street2",secondary:"secondary",city:"city",state:"state",zipcode:"zipCode",lastline:"lastLine",addressee:"addressee",urbanization:"urbanization",match:"match",format:"format",candidates:"maxCandidates",county_source:"countySource",input_id:"inputId"},usAutocompletePro:{search:"search",selected:"selected",max_results:"maxResults",include_only_cities:"includeOnlyCities",include_only_states:"includeOnlyStates",include_only_zip_codes:"includeOnlyZIPCodes",exclude_states:"excludeStates",prefer_cities:"preferCities",prefer_states:"preferStates",prefer_zip_codes:"preferZIPCodes",prefer_ratio:"preferRatio",prefer_geolocation:"preferGeolocation",source:"source"},usZipcode:{city:"city",state:"state",zipcode:"zipCode"},internationalStreet:{country:"country",freeform:"freeform",address1:"address1",address2:"address2",address3:"address3",address4:"address4",organization:"organization",locality:"locality",administrative_area:"administrativeArea",postal_code:"postalCode",geocode:"geocode",language:"language"},internationalAddressAutocomplete:{search:"search",country:"country",max_results:"maxResults",include_only_administrative_area:"includeOnlyAdministrativeArea",include_only_locality:"includeOnlyLocality",include_only_postal_code:"includeOnlyPostalCode"},usReverseGeo:{latitude:"latitude",longitude:"longitude",source:"source"},usExtract:{html:"html",aggressive:"aggressive",addr_line_breaks:"addressesHaveLineBreaks",addr_per_line:"addressesPerLine"},usEnrichment:{include:"include",exclude:"exclude",dataset:"dataset",data_subset:"dataSubset"},internationalPostalCode:{input_id:"inputId",country:"country",locality:"locality",administrative_area:"administrativeArea",postal_code:"postalCode"}};export{e as default};
@@ -1 +1 @@
1
- import{__require as t}from"../ClientBuilder.mjs";var n,e;function r(){if(e)return n;e=1;const r=t();function i(t){return new r(t)}return n={usStreet:function(t){return i(t).buildUsStreetApiClient()},usAutocompletePro:function(t){return i(t).buildUsAutocompleteProClient()},usExtract:function(t){return i(t).buildUsExtractClient()},usZipcode:function(t){return i(t).buildUsZipcodeClient()},internationalStreet:function(t){return i(t).buildInternationalStreetClient()},usReverseGeo:function(t){return i(t).buildUsReverseGeoClient()},internationalAddressAutocomplete:function(t){return i(t).buildInternationalAddressAutocompleteClient()},usEnrichment:function(t){return i(t).buildUsEnrichmentClient()},internationalPostalCode:function(t){return i(t).buildInternationalPostalCodeClient()}}}export{r as __require};
1
+ import t from"../ClientBuilder.mjs";function n(n){return new t(n)}var e={usStreet:function(t){return n(t).buildUsStreetApiClient()},usAutocompletePro:function(t){return n(t).buildUsAutocompleteProClient()},usExtract:function(t){return n(t).buildUsExtractClient()},usZipcode:function(t){return n(t).buildUsZipcodeClient()},internationalStreet:function(t){return n(t).buildInternationalStreetClient()},usReverseGeo:function(t){return n(t).buildUsReverseGeoClient()},internationalAddressAutocomplete:function(t){return n(t).buildInternationalAddressAutocompleteClient()},usEnrichment:function(t){return n(t).buildUsEnrichmentClient()},internationalPostalCode:function(t){return n(t).buildInternationalPostalCodeClient()}};export{e as default};
@@ -1 +1 @@
1
- import{__require as r}from"../InputData.mjs";var t,e;function a(){if(e)return t;e=1;const a=r();return t=(r,t)=>{var e;let n=new a(r);const o=Object.keys(null!==(e=r.customParameters)&&void 0!==e?e:{}).length>0;for(let r in t)n.add(r,t[r]);if(o)for(let t in r.customParameters)n.addCustomParameter(t,r.customParameters[t]);return n.data}}export{a as __require};
1
+ import t from"../InputData.mjs";function a(a,n){var o;const r=new t(a),e=null!==(o=a.customParameters)&&void 0!==o?o:{},s=Object.keys(e).length>0;for(const t in n)r.add(t,n[t]);if(s)for(const t in e)r.addCustomParameter(t,e[t]);return r.data}export{a as default};
@@ -1 +1 @@
1
- import{__require as r}from"../Response.mjs";var e,n;function t(){if(n)return e;n=1;const t=r();return e={buildSmartyResponse:function(r,e){return r?new t(r.status,r.data,r.error,r.headers):new t(void 0,void 0,e)}}}export{t as __require};
1
+ import e from"../Response.mjs";function r(r,n){return r?new e(r.status,r.data,r.error,r.headers):new e(0,null,n)}export{r as buildSmartyResponse};
@@ -1 +1 @@
1
- import{__require as e}from"./buildInputData.mjs";import{__require as t}from"./apiToSDKKeyMap.mjs";var r,a;function n(){if(a)return r;a=1;const n=e(),i=t().usStreet;return r=e=>{let t=e.match,r=e.maxCandidates;t||(t="enhanced"),"strict"===t&&(t=void 0),"enhanced"!==t||r||(r=5);const a=Object.assign({},e,{match:t,maxCandidates:r});return n(a,i)}}export{n as __require};
1
+ import t from"./buildInputData.mjs";import a from"./apiToSDKKeyMap.mjs";const e=a.usStreet;function n(a){let n=a.match,m=a.maxCandidates;n||(n="enhanced"),"enhanced"!==n||m||(m=5);const s=Object.assign({},a,{match:n,maxCandidates:m});return t(s,e)}export{n as default};
@@ -1 +1 @@
1
- import{__require as r}from"../Request.mjs";import{__require as e}from"../Errors.mjs";import{__require as t}from"./buildInputData.mjs";var n,o;function u(){if(o)return n;o=1;const u=r(),a=e(),s=t();return n=(r,e,t,n,o)=>{if(r.isEmpty())throw new a.BatchEmptyError;let i=new u;return 1===r.length()?i.parameters=m(r)[0]:i.payload=m(r),new Promise((n,o)=>{e.send(i).then(e=>{e.error&&o(e.error),n(function(r,e){return e.payload.map(e=>{let n=new t(e);r.getByIndex(n.inputIndex).result.push(n)}),r}(r,e))}).catch(o)});function m(r){return r.lookups.map(r=>o?o(r):s(r,n))}}}export{u as __require};
1
+ import r from"../Request.mjs";import{BatchEmptyError as t}from"../Errors.mjs";import e from"./buildInputData.mjs";function n(n,o,s,u,a){if(n.isEmpty())throw new t;const m=new r;return 1===n.length()?m.parameters=p(n)[0]:m.payload=p(n),new Promise((r,t)=>{o.send(m).then(e=>{if(e.error)return t(e.error);r(function(r,t){return t.payload.forEach(t=>{const e=new s(t);r.getByIndex(e.inputIndex).result.push(e)}),r}(n,e))}).catch(t)});function p(r){return r.lookups.map(r=>a?a(r):e(r,u))}}export{n as default};
@@ -0,0 +1,180 @@
1
+ /**
2
+ * this files is the entry point for rollup to bundle the library
3
+ * it exports all the classes and functions as named exports
4
+ */
5
+ import Batch from "./src/Batch.js";
6
+ import ClientBuilder from "./src/ClientBuilder.js";
7
+ import SharedCredentials from "./src/SharedCredentials.js";
8
+ import StaticCredentials from "./src/StaticCredentials.js";
9
+ import BasicAuthCredentials from "./src/BasicAuthCredentials.js";
10
+ import LookupUSStreet from "./src/us_street/Lookup.js";
11
+ import CandidateUSStreet from "./src/us_street/Candidate.js";
12
+ import LookupUSZipcode from "./src/us_zipcode/Lookup.js";
13
+ import ResultUSZipcode from "./src/us_zipcode/Result.js";
14
+ import LookupUSAutocompletePro from "./src/us_autocomplete_pro/Lookup.js";
15
+ import SuggestionUSAutocompletePro from "./src/us_autocomplete_pro/Suggestion.js";
16
+ import LookupUSExtract from "./src/us_extract/Lookup.js";
17
+ import ResultUSExtract from "./src/us_extract/Result.js";
18
+ import LookupInternationalStreet from "./src/international_street/Lookup.js";
19
+ import CandidateInternationalStreet from "./src/international_street/Candidate.js";
20
+ import LookupUSReverseGeo from "./src/us_reverse_geo/Lookup.js";
21
+ import LookupInternationalAddressAutocomplete from "./src/international_address_autocomplete/Lookup.js";
22
+ import SuggestionInternationalAddressAutocomplete from "./src/international_address_autocomplete/Suggestion.js";
23
+ import LookupUSEnrichment from "./src/us_enrichment/Lookup.js";
24
+ import LookupInternationalPostalCode from "./src/international_postal_code/Lookup.js";
25
+ import ResultInternationalPostalCode from "./src/international_postal_code/Result.js";
26
+ export type { Request, Response, Sender, Sleeper, Signer } from "./src/types.js";
27
+ export { SmartyError } from "./src/Errors.js";
28
+ export type { MatchStrategy, OutputFormat, CountySource } from "./src/us_street/Lookup.js";
29
+ export type { CoordinateLicense, MatchInfo } from "./src/us_street/Candidate.js";
30
+ export type { Geolocation } from "./src/us_autocomplete_pro/Lookup.js";
31
+ export type { Language, Geocode } from "./src/international_street/Lookup.js";
32
+ export declare const core: {
33
+ Batch: typeof Batch;
34
+ ClientBuilder: typeof ClientBuilder;
35
+ buildClient: {
36
+ usStreet: (credentials: SharedCredentials | StaticCredentials | BasicAuthCredentials) => import("./src/us_street/Client.js").default;
37
+ usAutocompletePro: (credentials: SharedCredentials | StaticCredentials | BasicAuthCredentials) => import("./src/us_autocomplete_pro/Client.js").default;
38
+ usExtract: (credentials: SharedCredentials | StaticCredentials | BasicAuthCredentials) => import("./src/us_extract/Client.js").default;
39
+ usZipcode: (credentials: SharedCredentials | StaticCredentials | BasicAuthCredentials) => import("./src/us_zipcode/Client.js").default;
40
+ internationalStreet: (credentials: SharedCredentials | StaticCredentials | BasicAuthCredentials) => import("./src/international_street/Client.js").default;
41
+ usReverseGeo: (credentials: SharedCredentials | StaticCredentials | BasicAuthCredentials) => import("./src/us_reverse_geo/Client.js").default;
42
+ internationalAddressAutocomplete: (credentials: SharedCredentials | StaticCredentials | BasicAuthCredentials) => import("./src/international_address_autocomplete/Client.js").default;
43
+ usEnrichment: (credentials: SharedCredentials | StaticCredentials | BasicAuthCredentials) => import("./src/us_enrichment/Client.js").default;
44
+ internationalPostalCode: (credentials: SharedCredentials | StaticCredentials | BasicAuthCredentials) => import("./src/international_postal_code/Client.js").default;
45
+ };
46
+ SharedCredentials: typeof SharedCredentials;
47
+ StaticCredentials: typeof StaticCredentials;
48
+ BasicAuthCredentials: typeof BasicAuthCredentials;
49
+ Errors: {
50
+ SmartyError: typeof import("./src/Errors.js").SmartyError;
51
+ BatchFullError: typeof import("./src/Errors.js").BatchFullError;
52
+ BatchEmptyError: typeof import("./src/Errors.js").BatchEmptyError;
53
+ UndefinedLookupError: typeof import("./src/Errors.js").UndefinedLookupError;
54
+ BadCredentialsError: typeof import("./src/Errors.js").BadCredentialsError;
55
+ PaymentRequiredError: typeof import("./src/Errors.js").PaymentRequiredError;
56
+ RequestEntityTooLargeError: typeof import("./src/Errors.js").RequestEntityTooLargeError;
57
+ BadRequestError: typeof import("./src/Errors.js").BadRequestError;
58
+ UnprocessableEntityError: typeof import("./src/Errors.js").UnprocessableEntityError;
59
+ TooManyRequestsError: typeof import("./src/Errors.js").TooManyRequestsError;
60
+ InternalServerError: typeof import("./src/Errors.js").InternalServerError;
61
+ ServiceUnavailableError: typeof import("./src/Errors.js").ServiceUnavailableError;
62
+ GatewayTimeoutError: typeof import("./src/Errors.js").GatewayTimeoutError;
63
+ DefaultError: typeof import("./src/Errors.js").DefaultError;
64
+ };
65
+ };
66
+ export declare const usStreet: {
67
+ Lookup: typeof LookupUSStreet;
68
+ Candidate: typeof CandidateUSStreet;
69
+ };
70
+ export declare const usZipcode: {
71
+ Lookup: typeof LookupUSZipcode;
72
+ Result: typeof ResultUSZipcode;
73
+ };
74
+ export declare const usAutocompletePro: {
75
+ Lookup: typeof LookupUSAutocompletePro;
76
+ Suggestion: typeof SuggestionUSAutocompletePro;
77
+ };
78
+ export declare const usExtract: {
79
+ Lookup: typeof LookupUSExtract;
80
+ Result: typeof ResultUSExtract;
81
+ };
82
+ export declare const internationalStreet: {
83
+ Lookup: typeof LookupInternationalStreet;
84
+ Candidate: typeof CandidateInternationalStreet;
85
+ };
86
+ export declare const usReverseGeo: {
87
+ Lookup: typeof LookupUSReverseGeo;
88
+ };
89
+ export declare const internationalAddressAutocomplete: {
90
+ Lookup: typeof LookupInternationalAddressAutocomplete;
91
+ Suggestion: typeof SuggestionInternationalAddressAutocomplete;
92
+ };
93
+ export declare const usEnrichment: {
94
+ Lookup: typeof LookupUSEnrichment;
95
+ Response: {
96
+ Response: typeof import("./src/us_enrichment/Response.js").Response;
97
+ FinancialResponse: typeof import("./src/us_enrichment/Response.js").FinancialResponse;
98
+ GeoResponse: typeof import("./src/us_enrichment/Response.js").GeoResponse;
99
+ };
100
+ };
101
+ export declare const internationalPostalCode: {
102
+ Lookup: typeof LookupInternationalPostalCode;
103
+ Result: typeof ResultInternationalPostalCode;
104
+ };
105
+ declare const _default: {
106
+ core: {
107
+ Batch: typeof Batch;
108
+ ClientBuilder: typeof ClientBuilder;
109
+ buildClient: {
110
+ usStreet: (credentials: SharedCredentials | StaticCredentials | BasicAuthCredentials) => import("./src/us_street/Client.js").default;
111
+ usAutocompletePro: (credentials: SharedCredentials | StaticCredentials | BasicAuthCredentials) => import("./src/us_autocomplete_pro/Client.js").default;
112
+ usExtract: (credentials: SharedCredentials | StaticCredentials | BasicAuthCredentials) => import("./src/us_extract/Client.js").default;
113
+ usZipcode: (credentials: SharedCredentials | StaticCredentials | BasicAuthCredentials) => import("./src/us_zipcode/Client.js").default;
114
+ internationalStreet: (credentials: SharedCredentials | StaticCredentials | BasicAuthCredentials) => import("./src/international_street/Client.js").default;
115
+ usReverseGeo: (credentials: SharedCredentials | StaticCredentials | BasicAuthCredentials) => import("./src/us_reverse_geo/Client.js").default;
116
+ internationalAddressAutocomplete: (credentials: SharedCredentials | StaticCredentials | BasicAuthCredentials) => import("./src/international_address_autocomplete/Client.js").default;
117
+ usEnrichment: (credentials: SharedCredentials | StaticCredentials | BasicAuthCredentials) => import("./src/us_enrichment/Client.js").default;
118
+ internationalPostalCode: (credentials: SharedCredentials | StaticCredentials | BasicAuthCredentials) => import("./src/international_postal_code/Client.js").default;
119
+ };
120
+ SharedCredentials: typeof SharedCredentials;
121
+ StaticCredentials: typeof StaticCredentials;
122
+ BasicAuthCredentials: typeof BasicAuthCredentials;
123
+ Errors: {
124
+ SmartyError: typeof import("./src/Errors.js").SmartyError;
125
+ BatchFullError: typeof import("./src/Errors.js").BatchFullError;
126
+ BatchEmptyError: typeof import("./src/Errors.js").BatchEmptyError;
127
+ UndefinedLookupError: typeof import("./src/Errors.js").UndefinedLookupError;
128
+ BadCredentialsError: typeof import("./src/Errors.js").BadCredentialsError;
129
+ PaymentRequiredError: typeof import("./src/Errors.js").PaymentRequiredError;
130
+ RequestEntityTooLargeError: typeof import("./src/Errors.js").RequestEntityTooLargeError;
131
+ BadRequestError: typeof import("./src/Errors.js").BadRequestError;
132
+ UnprocessableEntityError: typeof import("./src/Errors.js").UnprocessableEntityError;
133
+ TooManyRequestsError: typeof import("./src/Errors.js").TooManyRequestsError;
134
+ InternalServerError: typeof import("./src/Errors.js").InternalServerError;
135
+ ServiceUnavailableError: typeof import("./src/Errors.js").ServiceUnavailableError;
136
+ GatewayTimeoutError: typeof import("./src/Errors.js").GatewayTimeoutError;
137
+ DefaultError: typeof import("./src/Errors.js").DefaultError;
138
+ };
139
+ };
140
+ usStreet: {
141
+ Lookup: typeof LookupUSStreet;
142
+ Candidate: typeof CandidateUSStreet;
143
+ };
144
+ usZipcode: {
145
+ Lookup: typeof LookupUSZipcode;
146
+ Result: typeof ResultUSZipcode;
147
+ };
148
+ usAutocompletePro: {
149
+ Lookup: typeof LookupUSAutocompletePro;
150
+ Suggestion: typeof SuggestionUSAutocompletePro;
151
+ };
152
+ usExtract: {
153
+ Lookup: typeof LookupUSExtract;
154
+ Result: typeof ResultUSExtract;
155
+ };
156
+ internationalStreet: {
157
+ Lookup: typeof LookupInternationalStreet;
158
+ Candidate: typeof CandidateInternationalStreet;
159
+ };
160
+ usReverseGeo: {
161
+ Lookup: typeof LookupUSReverseGeo;
162
+ };
163
+ internationalAddressAutocomplete: {
164
+ Lookup: typeof LookupInternationalAddressAutocomplete;
165
+ Suggestion: typeof SuggestionInternationalAddressAutocomplete;
166
+ };
167
+ usEnrichment: {
168
+ Lookup: typeof LookupUSEnrichment;
169
+ Response: {
170
+ Response: typeof import("./src/us_enrichment/Response.js").Response;
171
+ FinancialResponse: typeof import("./src/us_enrichment/Response.js").FinancialResponse;
172
+ GeoResponse: typeof import("./src/us_enrichment/Response.js").GeoResponse;
173
+ };
174
+ };
175
+ internationalPostalCode: {
176
+ Lookup: typeof LookupInternationalPostalCode;
177
+ Result: typeof ResultInternationalPostalCode;
178
+ };
179
+ };
180
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import { BaseLookup } from "./types.js";
2
+ export default class Batch {
3
+ lookups: BaseLookup[];
4
+ constructor();
5
+ add(lookup: BaseLookup): void;
6
+ lookupsHasRoomForLookup(): boolean;
7
+ length(): number;
8
+ getByIndex(index: number): BaseLookup;
9
+ getByInputId(inputId: string | number): BaseLookup | undefined;
10
+ clear(): void;
11
+ isEmpty(): boolean;
12
+ }
@@ -0,0 +1,55 @@
1
+ import StaticCredentials from "./StaticCredentials.js";
2
+ import SharedCredentials from "./SharedCredentials.js";
3
+ import BasicAuthCredentials from "./BasicAuthCredentials.js";
4
+ import UsStreetClient from "./us_street/Client.js";
5
+ import UsZipcodeClient from "./us_zipcode/Client.js";
6
+ import UsAutocompleteProClient from "./us_autocomplete_pro/Client.js";
7
+ import UsExtractClient from "./us_extract/Client.js";
8
+ import InternationalStreetClient from "./international_street/Client.js";
9
+ import UsReverseGeoClient from "./us_reverse_geo/Client.js";
10
+ import InternationalAddressAutocompleteClient from "./international_address_autocomplete/Client.js";
11
+ import UsEnrichmentClient from "./us_enrichment/Client.js";
12
+ import InternationalPostalCodeClient from "./international_postal_code/Client.js";
13
+ import { Sender } from "./types.js";
14
+ type Signer = StaticCredentials | SharedCredentials | BasicAuthCredentials;
15
+ export default class ClientBuilder {
16
+ private signer;
17
+ private httpSender;
18
+ private maxRetries;
19
+ private maxTimeout;
20
+ private baseUrl;
21
+ private proxy;
22
+ private customHeaders;
23
+ private appendHeaders;
24
+ private debug;
25
+ private licenses;
26
+ private customQueries;
27
+ constructor(signer: Signer);
28
+ withMaxRetries(retries: number): ClientBuilder;
29
+ withMaxTimeout(timeout: number): ClientBuilder;
30
+ withSender(sender: Sender): ClientBuilder;
31
+ withBaseUrl(url: string): ClientBuilder;
32
+ withProxy(host: string, port: number, protocol: string, username?: string, password?: string): ClientBuilder;
33
+ withCustomHeaders(customHeaders: Record<string, string>): ClientBuilder;
34
+ withAppendedHeader(key: string, value: string, separator: string): ClientBuilder;
35
+ withDebug(): ClientBuilder;
36
+ withLicenses(licenses: string[]): ClientBuilder;
37
+ withCustomQuery(key: string, value: string): ClientBuilder;
38
+ withCustomCommaSeperatedQuery(key: string, value: string): ClientBuilder;
39
+ withFeatureComponentAnalysis(): ClientBuilder;
40
+ withFinancialHistory(): ClientBuilder;
41
+ withOccupantUse(): ClientBuilder;
42
+ withFeatureIANATimeZone(): ClientBuilder;
43
+ buildSender(): Sender;
44
+ buildClient<T>(baseUrl: string, ClientClass: new (sender: Sender) => T): T;
45
+ buildUsStreetApiClient(): UsStreetClient;
46
+ buildUsZipcodeClient(): UsZipcodeClient;
47
+ buildInternationalPostalCodeClient(): InternationalPostalCodeClient;
48
+ buildUsAutocompleteProClient(): UsAutocompleteProClient;
49
+ buildUsExtractClient(): UsExtractClient;
50
+ buildInternationalStreetClient(): InternationalStreetClient;
51
+ buildUsReverseGeoClient(): UsReverseGeoClient;
52
+ buildInternationalAddressAutocompleteClient(): InternationalAddressAutocompleteClient;
53
+ buildUsEnrichmentClient(): UsEnrichmentClient;
54
+ }
55
+ export {};
@@ -0,0 +1,59 @@
1
+ export declare class SmartyError extends Error {
2
+ constructor(message?: string);
3
+ }
4
+ export declare class DefaultError extends SmartyError {
5
+ constructor(message?: string | null);
6
+ }
7
+ export declare class BatchFullError extends SmartyError {
8
+ constructor();
9
+ }
10
+ export declare class BatchEmptyError extends SmartyError {
11
+ constructor();
12
+ }
13
+ export declare class UndefinedLookupError extends SmartyError {
14
+ constructor();
15
+ }
16
+ export declare class BadCredentialsError extends SmartyError {
17
+ constructor();
18
+ }
19
+ export declare class PaymentRequiredError extends SmartyError {
20
+ constructor();
21
+ }
22
+ export declare class RequestEntityTooLargeError extends SmartyError {
23
+ constructor();
24
+ }
25
+ export declare class BadRequestError extends SmartyError {
26
+ constructor();
27
+ }
28
+ export declare class UnprocessableEntityError extends SmartyError {
29
+ constructor(message: string);
30
+ }
31
+ export declare class TooManyRequestsError extends SmartyError {
32
+ constructor();
33
+ }
34
+ export declare class InternalServerError extends SmartyError {
35
+ constructor();
36
+ }
37
+ export declare class ServiceUnavailableError extends SmartyError {
38
+ constructor();
39
+ }
40
+ export declare class GatewayTimeoutError extends SmartyError {
41
+ constructor();
42
+ }
43
+ declare const _default: {
44
+ SmartyError: typeof SmartyError;
45
+ BatchFullError: typeof BatchFullError;
46
+ BatchEmptyError: typeof BatchEmptyError;
47
+ UndefinedLookupError: typeof UndefinedLookupError;
48
+ BadCredentialsError: typeof BadCredentialsError;
49
+ PaymentRequiredError: typeof PaymentRequiredError;
50
+ RequestEntityTooLargeError: typeof RequestEntityTooLargeError;
51
+ BadRequestError: typeof BadRequestError;
52
+ UnprocessableEntityError: typeof UnprocessableEntityError;
53
+ TooManyRequestsError: typeof TooManyRequestsError;
54
+ InternalServerError: typeof InternalServerError;
55
+ ServiceUnavailableError: typeof ServiceUnavailableError;
56
+ GatewayTimeoutError: typeof GatewayTimeoutError;
57
+ DefaultError: typeof DefaultError;
58
+ };
59
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import { AxiosProxyConfig, AxiosRequestConfig } from "axios";
2
+ import { Request as SmartyRequest, Response as SmartyResponse } from "./types.js";
3
+ export default class HttpSender {
4
+ private axiosInstance;
5
+ private timeout;
6
+ private proxyConfig;
7
+ constructor(timeout?: number, proxyConfig?: AxiosProxyConfig, debug?: boolean);
8
+ buildRequestConfig(request: SmartyRequest): AxiosRequestConfig;
9
+ send(request: SmartyRequest): Promise<SmartyResponse>;
10
+ private enableDebug;
11
+ }
@@ -0,0 +1,9 @@
1
+ export default class InputData {
2
+ lookup: Record<string, any>;
3
+ data: Record<string, string | number>;
4
+ constructor(lookup: Record<string, any>);
5
+ add(apiField: string, lookupField: string): void;
6
+ addCustomParameter(key: string, value: string): void;
7
+ formatData(field: string | number | string[]): string | number;
8
+ lookupFieldIsPopulated(lookupField: string): boolean;
9
+ }
@@ -0,0 +1,7 @@
1
+ import { Request, Response, Sender } from "./types.js";
2
+ export default class LicenseSender {
3
+ private sender;
4
+ private licenses;
5
+ constructor(innerSender: Sender, licenses: string[]);
6
+ send(request: Request): Promise<Response>;
7
+ }
@@ -0,0 +1,9 @@
1
+ import { Request as IRequest } from "./types.js";
2
+ export default class Request implements IRequest {
3
+ baseUrl: string;
4
+ baseUrlParam: string;
5
+ payload: string | object | null;
6
+ headers: Record<string, string>;
7
+ parameters: Record<string, string | number>;
8
+ constructor(payload?: string | object | null, headers?: Record<string, string>);
9
+ }
@@ -0,0 +1,8 @@
1
+ import { Response as IResponse } from "./types.js";
2
+ export default class Response implements IResponse {
3
+ statusCode: number;
4
+ payload: object[] | object | string | null;
5
+ error: Error | null;
6
+ headers: Record<string, string>;
7
+ constructor(statusCode: number, payload?: object[] | object | string | null, error?: Error | null, headers?: Record<string, string>);
8
+ }
@@ -1,11 +1,7 @@
1
- import { Request, Response, Sender } from "./types.js";
2
- interface Signer {
3
- sign(request: Request): void;
4
- }
1
+ import { Request, Response, Sender, Signer } from "./types.js";
5
2
  export default class SigningSender {
6
3
  private signer;
7
4
  private sender;
8
5
  constructor(innerSender: Sender, signer: Signer);
9
6
  send(request: Request): Promise<Response>;
10
7
  }
11
- export {};
@@ -0,0 +1,6 @@
1
+ import { Request, Response, Sender } from "./types.js";
2
+ export default class StatusCodeSender {
3
+ private sender;
4
+ constructor(innerSender: Sender);
5
+ send(request: Request): Promise<Response>;
6
+ }
@@ -0,0 +1,7 @@
1
+ import { Sender } from "../types.js";
2
+ import Lookup from "./Lookup.js";
3
+ export default class Client {
4
+ private sender;
5
+ constructor(sender: Sender);
6
+ send(lookup: Lookup): Promise<Lookup>;
7
+ }
@@ -0,0 +1,20 @@
1
+ import Suggestion from "./Suggestion.js";
2
+ export default class Lookup {
3
+ result: Suggestion[];
4
+ search: string | undefined;
5
+ addressId: string | undefined;
6
+ country: string | undefined;
7
+ maxResults: number;
8
+ includeOnlyLocality: string | undefined;
9
+ includeOnlyPostalCode: string | undefined;
10
+ customParameters: Record<string, string>;
11
+ constructor({ search, addressId, country, maxResults, includeOnlyLocality, includeOnlyPostalCode, }?: {
12
+ search?: string;
13
+ addressId?: string;
14
+ country?: string;
15
+ maxResults?: number;
16
+ includeOnlyLocality?: string;
17
+ includeOnlyPostalCode?: string;
18
+ });
19
+ addCustomParameter(key: string, value: string): void;
20
+ }
@@ -0,0 +1,25 @@
1
+ export interface RawIntlAutocompleteSuggestion {
2
+ street?: string;
3
+ locality?: string;
4
+ administrative_area?: string;
5
+ administrative_area_short?: string;
6
+ administrative_area_long?: string;
7
+ postal_code?: string;
8
+ country_iso3?: string;
9
+ entries?: number;
10
+ address_text?: string;
11
+ address_id?: string;
12
+ }
13
+ export default class Suggestion {
14
+ street: string;
15
+ locality: string;
16
+ administrativeArea: string;
17
+ administrativeAreaShort: string;
18
+ administrativeAreaLong: string;
19
+ postalCode: string;
20
+ countryIso3: string;
21
+ entries: number;
22
+ addressText: string;
23
+ addressId: string;
24
+ constructor(responseData: RawIntlAutocompleteSuggestion);
25
+ }
@@ -0,0 +1,7 @@
1
+ import { Sender } from "../types.js";
2
+ import Lookup from "./Lookup.js";
3
+ export default class Client {
4
+ private sender;
5
+ constructor(sender: Sender);
6
+ send(lookup: Lookup): Promise<Lookup>;
7
+ }
@@ -0,0 +1,12 @@
1
+ import Result from "./Result.js";
2
+ export default class Lookup {
3
+ inputId: string | undefined;
4
+ country: string | undefined;
5
+ postalCode: string | undefined;
6
+ administrativeArea: string | undefined;
7
+ locality: string | undefined;
8
+ result: Result[];
9
+ customParameters: Record<string, string>;
10
+ constructor(country?: string, postalCode?: string, administrativeArea?: string, locality?: string, inputId?: string);
11
+ addCustomParameter(key: string, value: string): void;
12
+ }
@@ -0,0 +1,27 @@
1
+ export interface RawIntlPostalCodeResult {
2
+ input_id?: string;
3
+ administrative_area?: string;
4
+ super_administrative_area?: string;
5
+ sub_administrative_area?: string;
6
+ locality?: string;
7
+ dependent_locality?: string;
8
+ dependent_locality_name?: string;
9
+ double_dependent_locality?: string;
10
+ postal_code?: string;
11
+ postal_code_extra?: string;
12
+ country_iso_3?: string;
13
+ }
14
+ export default class Result {
15
+ inputId: string;
16
+ administrativeArea: string;
17
+ superAdministrativeArea: string;
18
+ subAdministrativeArea: string;
19
+ locality: string;
20
+ dependentLocality: string;
21
+ dependentLocalityName: string;
22
+ doubleDependentLocality: string;
23
+ postalCode: string;
24
+ postalCodeExtra: string;
25
+ countryIso3: string;
26
+ constructor(responseData: RawIntlPostalCodeResult);
27
+ }