postgrid-node 0.5.0 → 0.6.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 (422) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/LICENSE +1 -1
  3. package/README.md +13 -10
  4. package/client.d.mts +30 -10
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +30 -10
  7. package/client.d.ts.map +1 -1
  8. package/client.js +56 -10
  9. package/client.js.map +1 -1
  10. package/client.mjs +57 -11
  11. package/client.mjs.map +1 -1
  12. package/internal/parse.d.mts.map +1 -1
  13. package/internal/parse.d.ts.map +1 -1
  14. package/internal/parse.js +5 -0
  15. package/internal/parse.js.map +1 -1
  16. package/internal/parse.mjs +5 -0
  17. package/internal/parse.mjs.map +1 -1
  18. package/internal/types.d.mts +6 -6
  19. package/internal/types.d.mts.map +1 -1
  20. package/internal/types.d.ts +6 -6
  21. package/internal/types.d.ts.map +1 -1
  22. package/internal/utils/env.js +2 -2
  23. package/internal/utils/env.js.map +1 -1
  24. package/internal/utils/env.mjs +2 -2
  25. package/internal/utils/env.mjs.map +1 -1
  26. package/internal/utils/log.d.mts.map +1 -1
  27. package/internal/utils/log.d.ts.map +1 -1
  28. package/internal/utils/log.js +3 -2
  29. package/internal/utils/log.js.map +1 -1
  30. package/internal/utils/log.mjs +3 -2
  31. package/internal/utils/log.mjs.map +1 -1
  32. package/internal/utils/query.d.mts +5 -0
  33. package/internal/utils/query.d.mts.map +1 -0
  34. package/internal/utils/query.d.ts +5 -0
  35. package/internal/utils/query.d.ts.map +1 -0
  36. package/internal/utils/query.js +23 -0
  37. package/internal/utils/query.js.map +1 -0
  38. package/internal/utils/query.mjs +20 -0
  39. package/internal/utils/query.mjs.map +1 -0
  40. package/internal/utils.d.mts +1 -0
  41. package/internal/utils.d.ts +1 -0
  42. package/internal/utils.js +1 -0
  43. package/internal/utils.js.map +1 -1
  44. package/internal/utils.mjs +1 -0
  45. package/package.json +7 -1
  46. package/resources/address-verification.d.mts +1689 -15
  47. package/resources/address-verification.d.mts.map +1 -1
  48. package/resources/address-verification.d.ts +1689 -15
  49. package/resources/address-verification.d.ts.map +1 -1
  50. package/resources/address-verification.js +200 -0
  51. package/resources/address-verification.js.map +1 -1
  52. package/resources/address-verification.mjs +200 -0
  53. package/resources/address-verification.mjs.map +1 -1
  54. package/resources/index.d.mts +3 -3
  55. package/resources/index.d.mts.map +1 -1
  56. package/resources/index.d.ts +3 -3
  57. package/resources/index.d.ts.map +1 -1
  58. package/resources/index.js.map +1 -1
  59. package/resources/index.mjs +1 -1
  60. package/resources/index.mjs.map +1 -1
  61. package/resources/intl-address-verification.d.mts +956 -35
  62. package/resources/intl-address-verification.d.mts.map +1 -1
  63. package/resources/intl-address-verification.d.ts +956 -35
  64. package/resources/intl-address-verification.d.ts.map +1 -1
  65. package/resources/intl-address-verification.js +121 -27
  66. package/resources/intl-address-verification.js.map +1 -1
  67. package/resources/intl-address-verification.mjs +121 -27
  68. package/resources/intl-address-verification.mjs.map +1 -1
  69. package/resources/print-mail/boxes.d.mts +995 -0
  70. package/resources/print-mail/boxes.d.mts.map +1 -0
  71. package/resources/print-mail/boxes.d.ts +995 -0
  72. package/resources/print-mail/boxes.d.ts.map +1 -0
  73. package/resources/print-mail/boxes.js +103 -0
  74. package/resources/print-mail/boxes.js.map +1 -0
  75. package/resources/print-mail/boxes.mjs +99 -0
  76. package/resources/print-mail/boxes.mjs.map +1 -0
  77. package/resources/print-mail/campaigns.d.mts +923 -34
  78. package/resources/print-mail/campaigns.d.mts.map +1 -1
  79. package/resources/print-mail/campaigns.d.ts +923 -34
  80. package/resources/print-mail/campaigns.d.ts.map +1 -1
  81. package/resources/print-mail/campaigns.js +10 -3
  82. package/resources/print-mail/campaigns.js.map +1 -1
  83. package/resources/print-mail/campaigns.mjs +10 -3
  84. package/resources/print-mail/campaigns.mjs.map +1 -1
  85. package/resources/print-mail/cheques.d.mts +35 -5
  86. package/resources/print-mail/cheques.d.mts.map +1 -1
  87. package/resources/print-mail/cheques.d.ts +35 -5
  88. package/resources/print-mail/cheques.d.ts.map +1 -1
  89. package/resources/print-mail/cheques.js +32 -0
  90. package/resources/print-mail/cheques.js.map +1 -1
  91. package/resources/print-mail/cheques.mjs +32 -0
  92. package/resources/print-mail/cheques.mjs.map +1 -1
  93. package/resources/print-mail/contacts.d.mts +138 -3
  94. package/resources/print-mail/contacts.d.mts.map +1 -1
  95. package/resources/print-mail/contacts.d.ts +138 -3
  96. package/resources/print-mail/contacts.d.ts.map +1 -1
  97. package/resources/print-mail/contacts.js.map +1 -1
  98. package/resources/print-mail/contacts.mjs.map +1 -1
  99. package/resources/print-mail/index.d.mts +12 -7
  100. package/resources/print-mail/index.d.mts.map +1 -1
  101. package/resources/print-mail/index.d.ts +12 -7
  102. package/resources/print-mail/index.d.ts.map +1 -1
  103. package/resources/print-mail/index.js +15 -5
  104. package/resources/print-mail/index.js.map +1 -1
  105. package/resources/print-mail/index.mjs +6 -1
  106. package/resources/print-mail/index.mjs.map +1 -1
  107. package/resources/print-mail/letters.d.mts +36 -6
  108. package/resources/print-mail/letters.d.mts.map +1 -1
  109. package/resources/print-mail/letters.d.ts +36 -6
  110. package/resources/print-mail/letters.d.ts.map +1 -1
  111. package/resources/print-mail/letters.js +32 -0
  112. package/resources/print-mail/letters.js.map +1 -1
  113. package/resources/print-mail/letters.mjs +32 -0
  114. package/resources/print-mail/letters.mjs.map +1 -1
  115. package/resources/print-mail/mailing-list-imports.d.mts +5 -1
  116. package/resources/print-mail/mailing-list-imports.d.mts.map +1 -1
  117. package/resources/print-mail/mailing-list-imports.d.ts +5 -1
  118. package/resources/print-mail/mailing-list-imports.d.ts.map +1 -1
  119. package/resources/print-mail/mailing-list-imports.js +4 -0
  120. package/resources/print-mail/mailing-list-imports.js.map +1 -1
  121. package/resources/print-mail/mailing-list-imports.mjs +4 -0
  122. package/resources/print-mail/mailing-list-imports.mjs.map +1 -1
  123. package/resources/print-mail/mailing-lists.d.mts +5 -1
  124. package/resources/print-mail/mailing-lists.d.mts.map +1 -1
  125. package/resources/print-mail/mailing-lists.d.ts +5 -1
  126. package/resources/print-mail/mailing-lists.d.ts.map +1 -1
  127. package/resources/print-mail/mailing-lists.js +4 -0
  128. package/resources/print-mail/mailing-lists.js.map +1 -1
  129. package/resources/print-mail/mailing-lists.mjs +4 -0
  130. package/resources/print-mail/mailing-lists.mjs.map +1 -1
  131. package/resources/print-mail/postcards.d.mts +63 -13
  132. package/resources/print-mail/postcards.d.mts.map +1 -1
  133. package/resources/print-mail/postcards.d.ts +63 -13
  134. package/resources/print-mail/postcards.d.ts.map +1 -1
  135. package/resources/print-mail/postcards.js +33 -0
  136. package/resources/print-mail/postcards.js.map +1 -1
  137. package/resources/print-mail/postcards.mjs +33 -0
  138. package/resources/print-mail/postcards.mjs.map +1 -1
  139. package/resources/print-mail/print-mail.d.mts +42 -159
  140. package/resources/print-mail/print-mail.d.mts.map +1 -1
  141. package/resources/print-mail/print-mail.d.ts +42 -159
  142. package/resources/print-mail/print-mail.d.ts.map +1 -1
  143. package/resources/print-mail/print-mail.js +36 -16
  144. package/resources/print-mail/print-mail.js.map +1 -1
  145. package/resources/print-mail/print-mail.mjs +36 -16
  146. package/resources/print-mail/print-mail.mjs.map +1 -1
  147. package/resources/print-mail/reports/exports.d.mts +7 -0
  148. package/resources/print-mail/reports/exports.d.mts.map +1 -1
  149. package/resources/print-mail/reports/exports.d.ts +7 -0
  150. package/resources/print-mail/reports/exports.d.ts.map +1 -1
  151. package/resources/print-mail/reports/exports.js +7 -0
  152. package/resources/print-mail/reports/exports.js.map +1 -1
  153. package/resources/print-mail/reports/exports.mjs +7 -0
  154. package/resources/print-mail/reports/exports.mjs.map +1 -1
  155. package/resources/print-mail/reports/reports.d.mts +7 -0
  156. package/resources/print-mail/reports/reports.d.mts.map +1 -1
  157. package/resources/print-mail/reports/reports.d.ts +7 -0
  158. package/resources/print-mail/reports/reports.d.ts.map +1 -1
  159. package/resources/print-mail/reports/reports.js +7 -0
  160. package/resources/print-mail/reports/reports.js.map +1 -1
  161. package/resources/print-mail/reports/reports.mjs +7 -0
  162. package/resources/print-mail/reports/reports.mjs.map +1 -1
  163. package/resources/print-mail/reports/samples.d.mts +7 -0
  164. package/resources/print-mail/reports/samples.d.mts.map +1 -1
  165. package/resources/print-mail/reports/samples.d.ts +7 -0
  166. package/resources/print-mail/reports/samples.d.ts.map +1 -1
  167. package/resources/print-mail/reports/samples.js +7 -0
  168. package/resources/print-mail/reports/samples.js.map +1 -1
  169. package/resources/print-mail/reports/samples.mjs +7 -0
  170. package/resources/print-mail/reports/samples.mjs.map +1 -1
  171. package/resources/print-mail/self-mailers.d.mts +25 -12
  172. package/resources/print-mail/self-mailers.d.mts.map +1 -1
  173. package/resources/print-mail/self-mailers.d.ts +25 -12
  174. package/resources/print-mail/self-mailers.d.ts.map +1 -1
  175. package/resources/print-mail/self-mailers.js +17 -0
  176. package/resources/print-mail/self-mailers.js.map +1 -1
  177. package/resources/print-mail/self-mailers.mjs +17 -0
  178. package/resources/print-mail/self-mailers.mjs.map +1 -1
  179. package/resources/print-mail/snap-packs.d.mts +1060 -0
  180. package/resources/print-mail/snap-packs.d.mts.map +1 -0
  181. package/resources/print-mail/snap-packs.d.ts +1060 -0
  182. package/resources/print-mail/snap-packs.d.ts.map +1 -0
  183. package/resources/print-mail/snap-packs.js +117 -0
  184. package/resources/print-mail/snap-packs.js.map +1 -0
  185. package/resources/print-mail/snap-packs.mjs +113 -0
  186. package/resources/print-mail/snap-packs.mjs.map +1 -0
  187. package/resources/print-mail/sub-organizations.d.mts +29 -17
  188. package/resources/print-mail/sub-organizations.d.mts.map +1 -1
  189. package/resources/print-mail/sub-organizations.d.ts +29 -17
  190. package/resources/print-mail/sub-organizations.d.ts.map +1 -1
  191. package/resources/print-mail/sub-organizations.js +26 -14
  192. package/resources/print-mail/sub-organizations.js.map +1 -1
  193. package/resources/print-mail/sub-organizations.mjs +26 -14
  194. package/resources/print-mail/sub-organizations.mjs.map +1 -1
  195. package/resources/print-mail/targeted-list-builds/filters.d.mts +92 -0
  196. package/resources/print-mail/targeted-list-builds/filters.d.mts.map +1 -0
  197. package/resources/print-mail/targeted-list-builds/filters.d.ts +92 -0
  198. package/resources/print-mail/targeted-list-builds/filters.d.ts.map +1 -0
  199. package/resources/print-mail/targeted-list-builds/filters.js +60 -0
  200. package/resources/print-mail/targeted-list-builds/filters.js.map +1 -0
  201. package/resources/print-mail/targeted-list-builds/filters.mjs +56 -0
  202. package/resources/print-mail/targeted-list-builds/filters.mjs.map +1 -0
  203. package/resources/print-mail/targeted-list-builds/index.d.mts +3 -0
  204. package/resources/print-mail/targeted-list-builds/index.d.mts.map +1 -0
  205. package/resources/print-mail/targeted-list-builds/index.d.ts +3 -0
  206. package/resources/print-mail/targeted-list-builds/index.d.ts.map +1 -0
  207. package/resources/print-mail/targeted-list-builds/index.js +9 -0
  208. package/resources/print-mail/targeted-list-builds/index.js.map +1 -0
  209. package/resources/print-mail/targeted-list-builds/index.mjs +4 -0
  210. package/resources/print-mail/targeted-list-builds/index.mjs.map +1 -0
  211. package/resources/print-mail/targeted-list-builds/targeted-list-builds.d.mts +1633 -0
  212. package/resources/print-mail/targeted-list-builds/targeted-list-builds.d.mts.map +1 -0
  213. package/resources/print-mail/targeted-list-builds/targeted-list-builds.d.ts +1633 -0
  214. package/resources/print-mail/targeted-list-builds/targeted-list-builds.d.ts.map +1 -0
  215. package/resources/print-mail/targeted-list-builds/targeted-list-builds.js +154 -0
  216. package/resources/print-mail/targeted-list-builds/targeted-list-builds.js.map +1 -0
  217. package/resources/print-mail/targeted-list-builds/targeted-list-builds.mjs +149 -0
  218. package/resources/print-mail/targeted-list-builds/targeted-list-builds.mjs.map +1 -0
  219. package/resources/print-mail/targeted-list-builds.d.mts +2 -0
  220. package/resources/print-mail/targeted-list-builds.d.mts.map +1 -0
  221. package/resources/print-mail/targeted-list-builds.d.ts +2 -0
  222. package/resources/print-mail/targeted-list-builds.d.ts.map +1 -0
  223. package/resources/print-mail/targeted-list-builds.js +6 -0
  224. package/resources/print-mail/targeted-list-builds.js.map +1 -0
  225. package/resources/print-mail/targeted-list-builds.mjs +3 -0
  226. package/resources/print-mail/targeted-list-builds.mjs.map +1 -0
  227. package/resources/print-mail/template-editor-sessions.d.mts +355 -0
  228. package/resources/print-mail/template-editor-sessions.d.mts.map +1 -0
  229. package/resources/print-mail/template-editor-sessions.d.ts +355 -0
  230. package/resources/print-mail/template-editor-sessions.d.ts.map +1 -0
  231. package/resources/print-mail/template-editor-sessions.js +78 -0
  232. package/resources/print-mail/template-editor-sessions.js.map +1 -0
  233. package/resources/print-mail/template-editor-sessions.mjs +74 -0
  234. package/resources/print-mail/template-editor-sessions.mjs.map +1 -0
  235. package/resources/print-mail/trackers.d.mts +409 -0
  236. package/resources/print-mail/trackers.d.mts.map +1 -0
  237. package/resources/print-mail/trackers.d.ts +409 -0
  238. package/resources/print-mail/trackers.d.ts.map +1 -0
  239. package/resources/print-mail/trackers.js +116 -0
  240. package/resources/print-mail/trackers.js.map +1 -0
  241. package/resources/print-mail/trackers.mjs +112 -0
  242. package/resources/print-mail/trackers.mjs.map +1 -0
  243. package/resources/print-mail/virtual-mailboxes/index.d.mts +3 -0
  244. package/resources/print-mail/virtual-mailboxes/index.d.mts.map +1 -0
  245. package/resources/print-mail/virtual-mailboxes/index.d.ts +3 -0
  246. package/resources/print-mail/virtual-mailboxes/index.d.ts.map +1 -0
  247. package/resources/print-mail/virtual-mailboxes/index.js +9 -0
  248. package/resources/print-mail/virtual-mailboxes/index.js.map +1 -0
  249. package/resources/print-mail/virtual-mailboxes/index.mjs +4 -0
  250. package/resources/print-mail/virtual-mailboxes/index.mjs.map +1 -0
  251. package/resources/print-mail/virtual-mailboxes/items.d.mts +235 -0
  252. package/resources/print-mail/virtual-mailboxes/items.d.mts.map +1 -0
  253. package/resources/print-mail/virtual-mailboxes/items.d.ts +235 -0
  254. package/resources/print-mail/virtual-mailboxes/items.d.ts.map +1 -0
  255. package/resources/print-mail/virtual-mailboxes/items.js +69 -0
  256. package/resources/print-mail/virtual-mailboxes/items.js.map +1 -0
  257. package/resources/print-mail/virtual-mailboxes/items.mjs +65 -0
  258. package/resources/print-mail/virtual-mailboxes/items.mjs.map +1 -0
  259. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.d.mts +334 -0
  260. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.d.mts.map +1 -0
  261. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.d.ts +334 -0
  262. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.d.ts.map +1 -0
  263. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.js +92 -0
  264. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.js.map +1 -0
  265. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.mjs +87 -0
  266. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.mjs.map +1 -0
  267. package/resources/print-mail/virtual-mailboxes.d.mts +2 -0
  268. package/resources/print-mail/virtual-mailboxes.d.mts.map +1 -0
  269. package/resources/print-mail/virtual-mailboxes.d.ts +2 -0
  270. package/resources/print-mail/virtual-mailboxes.d.ts.map +1 -0
  271. package/resources/print-mail/{order-profiles.js → virtual-mailboxes.js} +2 -2
  272. package/resources/print-mail/virtual-mailboxes.js.map +1 -0
  273. package/resources/print-mail/virtual-mailboxes.mjs +3 -0
  274. package/resources/print-mail/virtual-mailboxes.mjs.map +1 -0
  275. package/src/client.ts +116 -26
  276. package/src/internal/parse.ts +6 -0
  277. package/src/internal/types.ts +6 -8
  278. package/src/internal/utils/env.ts +2 -2
  279. package/src/internal/utils/log.ts +2 -1
  280. package/src/internal/utils/query.ts +23 -0
  281. package/src/internal/utils.ts +1 -0
  282. package/src/resources/address-verification.ts +2190 -24
  283. package/src/resources/index.ts +24 -5
  284. package/src/resources/intl-address-verification.ts +1219 -43
  285. package/src/resources/print-mail/boxes.ts +1324 -0
  286. package/src/resources/print-mail/campaigns.ts +1449 -59
  287. package/src/resources/print-mail/cheques.ts +42 -4
  288. package/src/resources/print-mail/contacts.ts +167 -4
  289. package/src/resources/print-mail/index.ts +79 -4
  290. package/src/resources/print-mail/letters.ts +43 -5
  291. package/src/resources/print-mail/mailing-list-imports.ts +5 -1
  292. package/src/resources/print-mail/mailing-lists.ts +5 -1
  293. package/src/resources/print-mail/postcards.ts +74 -12
  294. package/src/resources/print-mail/print-mail.ts +245 -239
  295. package/src/resources/print-mail/reports/exports.ts +7 -0
  296. package/src/resources/print-mail/reports/reports.ts +7 -0
  297. package/src/resources/print-mail/reports/samples.ts +7 -0
  298. package/src/resources/print-mail/self-mailers.ts +28 -12
  299. package/src/resources/print-mail/snap-packs.ts +1484 -0
  300. package/src/resources/print-mail/sub-organizations.ts +35 -23
  301. package/src/resources/print-mail/targeted-list-builds/filters.ts +113 -0
  302. package/src/resources/print-mail/targeted-list-builds/index.ts +16 -0
  303. package/src/resources/print-mail/targeted-list-builds/targeted-list-builds.ts +2158 -0
  304. package/{resources/print-mail/order-profiles.mjs → src/resources/print-mail/targeted-list-builds.ts} +2 -2
  305. package/src/resources/print-mail/template-editor-sessions.ts +435 -0
  306. package/src/resources/print-mail/trackers.ts +513 -0
  307. package/src/resources/print-mail/virtual-mailboxes/index.ts +22 -0
  308. package/src/resources/print-mail/virtual-mailboxes/items.ts +296 -0
  309. package/src/resources/print-mail/virtual-mailboxes/virtual-mailboxes.ts +434 -0
  310. package/src/resources/print-mail/{order-profiles.ts → virtual-mailboxes.ts} +1 -1
  311. package/src/version.ts +1 -1
  312. package/version.d.mts +1 -1
  313. package/version.d.ts +1 -1
  314. package/version.js +1 -1
  315. package/version.mjs +1 -1
  316. package/internal/qs/formats.d.mts +0 -7
  317. package/internal/qs/formats.d.mts.map +0 -1
  318. package/internal/qs/formats.d.ts +0 -7
  319. package/internal/qs/formats.d.ts.map +0 -1
  320. package/internal/qs/formats.js +0 -13
  321. package/internal/qs/formats.js.map +0 -1
  322. package/internal/qs/formats.mjs +0 -9
  323. package/internal/qs/formats.mjs.map +0 -1
  324. package/internal/qs/index.d.mts +0 -10
  325. package/internal/qs/index.d.mts.map +0 -1
  326. package/internal/qs/index.d.ts +0 -10
  327. package/internal/qs/index.d.ts.map +0 -1
  328. package/internal/qs/index.js +0 -14
  329. package/internal/qs/index.js.map +0 -1
  330. package/internal/qs/index.mjs +0 -10
  331. package/internal/qs/index.mjs.map +0 -1
  332. package/internal/qs/stringify.d.mts +0 -3
  333. package/internal/qs/stringify.d.mts.map +0 -1
  334. package/internal/qs/stringify.d.ts +0 -3
  335. package/internal/qs/stringify.d.ts.map +0 -1
  336. package/internal/qs/stringify.js +0 -277
  337. package/internal/qs/stringify.js.map +0 -1
  338. package/internal/qs/stringify.mjs +0 -274
  339. package/internal/qs/stringify.mjs.map +0 -1
  340. package/internal/qs/types.d.mts +0 -57
  341. package/internal/qs/types.d.mts.map +0 -1
  342. package/internal/qs/types.d.ts +0 -57
  343. package/internal/qs/types.d.ts.map +0 -1
  344. package/internal/qs/types.js +0 -3
  345. package/internal/qs/types.js.map +0 -1
  346. package/internal/qs/types.mjs +0 -2
  347. package/internal/qs/types.mjs.map +0 -1
  348. package/internal/qs/utils.d.mts +0 -15
  349. package/internal/qs/utils.d.mts.map +0 -1
  350. package/internal/qs/utils.d.ts +0 -15
  351. package/internal/qs/utils.d.ts.map +0 -1
  352. package/internal/qs/utils.js +0 -230
  353. package/internal/qs/utils.js.map +0 -1
  354. package/internal/qs/utils.mjs +0 -217
  355. package/internal/qs/utils.mjs.map +0 -1
  356. package/resources/print-mail/order-profiles/cheques.d.mts +0 -387
  357. package/resources/print-mail/order-profiles/cheques.d.mts.map +0 -1
  358. package/resources/print-mail/order-profiles/cheques.d.ts +0 -387
  359. package/resources/print-mail/order-profiles/cheques.d.ts.map +0 -1
  360. package/resources/print-mail/order-profiles/cheques.js +0 -98
  361. package/resources/print-mail/order-profiles/cheques.js.map +0 -1
  362. package/resources/print-mail/order-profiles/cheques.mjs +0 -94
  363. package/resources/print-mail/order-profiles/cheques.mjs.map +0 -1
  364. package/resources/print-mail/order-profiles/index.d.mts +0 -6
  365. package/resources/print-mail/order-profiles/index.d.mts.map +0 -1
  366. package/resources/print-mail/order-profiles/index.d.ts +0 -6
  367. package/resources/print-mail/order-profiles/index.d.ts.map +0 -1
  368. package/resources/print-mail/order-profiles/index.js +0 -15
  369. package/resources/print-mail/order-profiles/index.js.map +0 -1
  370. package/resources/print-mail/order-profiles/index.mjs +0 -7
  371. package/resources/print-mail/order-profiles/index.mjs.map +0 -1
  372. package/resources/print-mail/order-profiles/letters.d.mts +0 -324
  373. package/resources/print-mail/order-profiles/letters.d.mts.map +0 -1
  374. package/resources/print-mail/order-profiles/letters.d.ts +0 -324
  375. package/resources/print-mail/order-profiles/letters.d.ts.map +0 -1
  376. package/resources/print-mail/order-profiles/letters.js +0 -105
  377. package/resources/print-mail/order-profiles/letters.js.map +0 -1
  378. package/resources/print-mail/order-profiles/letters.mjs +0 -101
  379. package/resources/print-mail/order-profiles/letters.mjs.map +0 -1
  380. package/resources/print-mail/order-profiles/order-profiles.d.mts +0 -22
  381. package/resources/print-mail/order-profiles/order-profiles.d.mts.map +0 -1
  382. package/resources/print-mail/order-profiles/order-profiles.d.ts +0 -22
  383. package/resources/print-mail/order-profiles/order-profiles.d.ts.map +0 -1
  384. package/resources/print-mail/order-profiles/order-profiles.js +0 -29
  385. package/resources/print-mail/order-profiles/order-profiles.js.map +0 -1
  386. package/resources/print-mail/order-profiles/order-profiles.mjs +0 -24
  387. package/resources/print-mail/order-profiles/order-profiles.mjs.map +0 -1
  388. package/resources/print-mail/order-profiles/postcards.d.mts +0 -254
  389. package/resources/print-mail/order-profiles/postcards.d.mts.map +0 -1
  390. package/resources/print-mail/order-profiles/postcards.d.ts +0 -254
  391. package/resources/print-mail/order-profiles/postcards.d.ts.map +0 -1
  392. package/resources/print-mail/order-profiles/postcards.js +0 -97
  393. package/resources/print-mail/order-profiles/postcards.js.map +0 -1
  394. package/resources/print-mail/order-profiles/postcards.mjs +0 -93
  395. package/resources/print-mail/order-profiles/postcards.mjs.map +0 -1
  396. package/resources/print-mail/order-profiles/self-mailers.d.mts +0 -259
  397. package/resources/print-mail/order-profiles/self-mailers.d.mts.map +0 -1
  398. package/resources/print-mail/order-profiles/self-mailers.d.ts +0 -259
  399. package/resources/print-mail/order-profiles/self-mailers.d.ts.map +0 -1
  400. package/resources/print-mail/order-profiles/self-mailers.js +0 -95
  401. package/resources/print-mail/order-profiles/self-mailers.js.map +0 -1
  402. package/resources/print-mail/order-profiles/self-mailers.mjs +0 -91
  403. package/resources/print-mail/order-profiles/self-mailers.mjs.map +0 -1
  404. package/resources/print-mail/order-profiles.d.mts +0 -2
  405. package/resources/print-mail/order-profiles.d.mts.map +0 -1
  406. package/resources/print-mail/order-profiles.d.ts +0 -2
  407. package/resources/print-mail/order-profiles.d.ts.map +0 -1
  408. package/resources/print-mail/order-profiles.js.map +0 -1
  409. package/resources/print-mail/order-profiles.mjs.map +0 -1
  410. package/src/internal/qs/LICENSE.md +0 -13
  411. package/src/internal/qs/README.md +0 -3
  412. package/src/internal/qs/formats.ts +0 -10
  413. package/src/internal/qs/index.ts +0 -13
  414. package/src/internal/qs/stringify.ts +0 -385
  415. package/src/internal/qs/types.ts +0 -71
  416. package/src/internal/qs/utils.ts +0 -265
  417. package/src/resources/print-mail/order-profiles/cheques.ts +0 -589
  418. package/src/resources/print-mail/order-profiles/index.ts +0 -47
  419. package/src/resources/print-mail/order-profiles/letters.ts +0 -489
  420. package/src/resources/print-mail/order-profiles/order-profiles.ts +0 -113
  421. package/src/resources/print-mail/order-profiles/postcards.ts +0 -404
  422. package/src/resources/print-mail/order-profiles/self-mailers.ts +0 -415
@@ -2,7 +2,167 @@ import { APIResource } from "../core/resource.js";
2
2
  import * as AddressVerificationAPI from "./address-verification.js";
3
3
  import { APIPromise } from "../core/api-promise.js";
4
4
  import { RequestOptions } from "../internal/request-options.js";
5
+ /**
6
+ * Standard Address Verification API.
7
+ *
8
+ * Provides endpoints to verify and standardize addresses across US and Canada,
9
+ * supporting both structured and freeform inputs.
10
+ *
11
+ * Note that this uses a different set of lookups than our international API.
12
+ */
5
13
  export declare class AddressVerification extends APIResource {
14
+ /**
15
+ * Resolves a partial street address into a list of full address candidates,
16
+ * optionally selecting a specific candidate by index and verifying it.
17
+ *
18
+ * **Basic usage** — omit `index`: returns an array of `CompletedAddressItem`
19
+ * results for the given `partialStreet`.
20
+ *
21
+ * **With `index`** — specify `index` to resolve a single candidate. Returns a
22
+ * single `CompletedAddressItem`.
23
+ *
24
+ * **With `index` + `verify=true`** — additionally runs the selected address
25
+ * through the USPS/Canada Post verifier and returns a `StandardVerifiedAddress`.
26
+ *
27
+ * - Uses 1 lookup per call (plus 1 more if geocoding a result).
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const response =
32
+ * await client.addressVerification.autocomplete({
33
+ * partialStreet: 'partialStreet',
34
+ * });
35
+ * ```
36
+ */
37
+ autocomplete(params: AddressVerificationAutocompleteParams, options?: RequestOptions): APIPromise<AddressVerificationAutocompleteResponse>;
38
+ /**
39
+ * Verify a batch of US or Canadian addresses in a single request. Each address can
40
+ * be freeform or structured, matching the same input formats accepted by the
41
+ * single verification endpoint.
42
+ *
43
+ * - Uses 1 lookup per address (plus 1 more per address if geocoding).
44
+ * - Requires a secret API key.
45
+ * - Returns results in the same order as the input addresses.
46
+ * - If an individual address fails, its result will contain an `error` field
47
+ * rather than a `verifiedAddress`.
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * const response =
52
+ * await client.addressVerification.batchVerification({
53
+ * addresses: [{ address: 'address' }],
54
+ * });
55
+ * ```
56
+ */
57
+ batchVerification(params: AddressVerificationBatchVerificationParams, options?: RequestOptions): APIPromise<AddressVerificationBatchVerificationResponse>;
58
+ /**
59
+ * Returns address completion previews for a partial street address, suitable for
60
+ * populating an autocomplete dropdown without consuming a lookup per keystroke.
61
+ *
62
+ * Each result contains a partial address preview (street, city, and — for non-US
63
+ * addresses — only the first 3 digits of the postal code, to avoid revealing the
64
+ * full code before a lookup is charged).
65
+ *
66
+ * - Does not consume a lookup.
67
+ * - Use `POST /completions` to resolve a full address once the user selects a
68
+ * result.
69
+ *
70
+ * @example
71
+ * ```ts
72
+ * const response =
73
+ * await client.addressVerification.getAutocompletePreviews({
74
+ * partialStreet: 'partialStreet',
75
+ * });
76
+ * ```
77
+ */
78
+ getAutocompletePreviews(query: AddressVerificationGetAutocompletePreviewsParams, options?: RequestOptions): APIPromise<AddressVerificationGetAutocompletePreviewsResponse>;
79
+ /**
80
+ * Returns your organization's current lookup usage and plan information. Useful
81
+ * for checking how many lookups you have consumed and whether you are on a paid
82
+ * plan.
83
+ *
84
+ * @example
85
+ * ```ts
86
+ * const response =
87
+ * await client.addressVerification.getLookupInfo();
88
+ * ```
89
+ */
90
+ getLookupInfo(options?: RequestOptions): APIPromise<AddressVerificationGetLookupInfoResponse>;
91
+ /**
92
+ * Looks up city, county, and other location metadata for a given US or Canadian
93
+ * postal code or ZIP code.
94
+ *
95
+ * A single postal code may map to multiple cities (e.g. a ZIP that spans several
96
+ * towns), so the response is an array.
97
+ *
98
+ * - Uses 1 lookup.
99
+ *
100
+ * @example
101
+ * ```ts
102
+ * const response =
103
+ * await client.addressVerification.lookupCityOrStateFromPostalOrZipCode(
104
+ * { postalOrZip: 'postalOrZip' },
105
+ * );
106
+ * ```
107
+ */
108
+ lookupCityOrStateFromPostalOrZipCode(body: AddressVerificationLookupCityOrStateFromPostalOrZipCodeParams, options?: RequestOptions): APIPromise<AddressVerificationLookupCityOrStateFromPostalOrZipCodeResponse>;
109
+ /**
110
+ * Looks up all ZIP codes that correspond to a given US city and state.
111
+ *
112
+ * - Currently only supported for US addresses (`countryCode: "US"`).
113
+ * - Uses 1 lookup.
114
+ *
115
+ * @example
116
+ * ```ts
117
+ * const response =
118
+ * await client.addressVerification.lookupZipCodeFromCityOrState(
119
+ * {
120
+ * city: 'city',
121
+ * countryCode: 'countryCode',
122
+ * state: 'state',
123
+ * },
124
+ * );
125
+ * ```
126
+ */
127
+ lookupZipCodeFromCityOrState(body: AddressVerificationLookupZipCodeFromCityOrStateParams, options?: RequestOptions): APIPromise<AddressVerificationLookupZipCodeFromCityOrStateResponse>;
128
+ /**
129
+ * Parses a freeform address string into its individual components (house number,
130
+ * street name, city, state, postal code, etc.).
131
+ *
132
+ * Useful for extracting structured data from a single-line address without running
133
+ * a full verification.
134
+ *
135
+ * - Uses 1 lookup.
136
+ *
137
+ * @example
138
+ * ```ts
139
+ * const response =
140
+ * await client.addressVerification.parseAnAddress({
141
+ * address: 'address',
142
+ * });
143
+ * ```
144
+ */
145
+ parseAnAddress(body: AddressVerificationParseAnAddressParams, options?: RequestOptions): APIPromise<AddressVerificationParseAnAddressResponse>;
146
+ /**
147
+ * Returns up to 3 verified address suggestions for a given input address.
148
+ *
149
+ * Useful as a fallback when `POST /verifications` returns a `failed` status —
150
+ * suggestions represent the closest matches found and may help the user identify
151
+ * the correct address.
152
+ *
153
+ * Accepts the same freeform or structured input formats as `POST /verifications`.
154
+ *
155
+ * - Uses 1 lookup per call (plus 1 more if geocoding).
156
+ *
157
+ * @example
158
+ * ```ts
159
+ * const response =
160
+ * await client.addressVerification.suggestAddresses({
161
+ * address: '1234 Elm St, Los Angeles, CA 90001, US',
162
+ * });
163
+ * ```
164
+ */
165
+ suggestAddresses(params: AddressVerificationSuggestAddressesParams, options?: RequestOptions): APIPromise<AddressVerificationSuggestAddressesResponse>;
6
166
  /**
7
167
  * 1. **Structured Address** — Verify and standardize a structured address (e.g.,
8
168
  * with `line1`, `city`, etc.).
@@ -44,6 +204,10 @@ export interface Errors {
44
204
  * Errors related to the second address line.
45
205
  */
46
206
  line2?: Array<string>;
207
+ /**
208
+ * Errors related to the postal or ZIP code.
209
+ */
210
+ postalOrZip?: Array<string>;
47
211
  /**
48
212
  * Errors related to the province or state.
49
213
  */
@@ -53,13 +217,163 @@ export interface Errors {
53
217
  * The verification status of an address.
54
218
  */
55
219
  export type Status = 'verified' | 'corrected' | 'failed';
56
- export interface AddressVerificationVerifyResponse {
57
- data: AddressVerificationVerifyResponse.Data;
220
+ export interface AddressVerificationAutocompleteResponse {
221
+ data: AddressVerificationAutocompleteResponse.CompletedAddressItem | Array<AddressVerificationAutocompleteResponse.UnionMember1> | AddressVerificationAutocompleteResponse.StandardVerifiedAddress;
58
222
  message: string;
59
223
  status: 'success' | 'error';
60
224
  }
61
- export declare namespace AddressVerificationVerifyResponse {
62
- interface Data {
225
+ export declare namespace AddressVerificationAutocompleteResponse {
226
+ interface CompletedAddressItem {
227
+ /**
228
+ * The resolved address components.
229
+ */
230
+ address: CompletedAddressItem.Address;
231
+ /**
232
+ * Errors encountered during address verification.
233
+ */
234
+ errors?: AddressVerificationAPI.Errors;
235
+ /**
236
+ * Geocoding result. Only present when `geocode=true` is supplied and an `index` is
237
+ * specified.
238
+ */
239
+ geocodeResult?: CompletedAddressItem.GeocodeResult;
240
+ }
241
+ namespace CompletedAddressItem {
242
+ /**
243
+ * The resolved address components.
244
+ */
245
+ interface Address {
246
+ /**
247
+ * The first line of the address.
248
+ */
249
+ address: string;
250
+ /**
251
+ * The second line of the address.
252
+ */
253
+ address2?: string;
254
+ /**
255
+ * The city.
256
+ */
257
+ city?: string;
258
+ /**
259
+ * The ISO 2-letter country code.
260
+ */
261
+ country?: string;
262
+ /**
263
+ * The postal code.
264
+ */
265
+ pc?: string;
266
+ /**
267
+ * The province or state abbreviation.
268
+ */
269
+ prov?: string;
270
+ }
271
+ /**
272
+ * Geocoding result. Only present when `geocode=true` is supplied and an `index` is
273
+ * specified.
274
+ */
275
+ interface GeocodeResult {
276
+ /**
277
+ * A real number from 0.00 to 1.00 which represents an
278
+ * [accuracy score](https://avdocs.postgrid.com/#accuracy-score)
279
+ */
280
+ accuracy: number;
281
+ /**
282
+ * A string representing the
283
+ * [accuracy type](https://avdocs.postgrid.com/#accuracy-type)
284
+ */
285
+ accuracyType: 'rooftop' | 'point' | 'range_interpolation' | 'nearest_rooftop_match' | 'intersection' | 'street_center' | 'place' | 'state';
286
+ /**
287
+ * Object that contains `lat`, `lng` properties with number values
288
+ */
289
+ location: GeocodeResult.Location;
290
+ }
291
+ namespace GeocodeResult {
292
+ /**
293
+ * Object that contains `lat`, `lng` properties with number values
294
+ */
295
+ interface Location {
296
+ lat: number;
297
+ lng: number;
298
+ }
299
+ }
300
+ }
301
+ interface UnionMember1 {
302
+ /**
303
+ * The resolved address components.
304
+ */
305
+ address: UnionMember1.Address;
306
+ /**
307
+ * Errors encountered during address verification.
308
+ */
309
+ errors?: AddressVerificationAPI.Errors;
310
+ /**
311
+ * Geocoding result. Only present when `geocode=true` is supplied and an `index` is
312
+ * specified.
313
+ */
314
+ geocodeResult?: UnionMember1.GeocodeResult;
315
+ }
316
+ namespace UnionMember1 {
317
+ /**
318
+ * The resolved address components.
319
+ */
320
+ interface Address {
321
+ /**
322
+ * The first line of the address.
323
+ */
324
+ address: string;
325
+ /**
326
+ * The second line of the address.
327
+ */
328
+ address2?: string;
329
+ /**
330
+ * The city.
331
+ */
332
+ city?: string;
333
+ /**
334
+ * The ISO 2-letter country code.
335
+ */
336
+ country?: string;
337
+ /**
338
+ * The postal code.
339
+ */
340
+ pc?: string;
341
+ /**
342
+ * The province or state abbreviation.
343
+ */
344
+ prov?: string;
345
+ }
346
+ /**
347
+ * Geocoding result. Only present when `geocode=true` is supplied and an `index` is
348
+ * specified.
349
+ */
350
+ interface GeocodeResult {
351
+ /**
352
+ * A real number from 0.00 to 1.00 which represents an
353
+ * [accuracy score](https://avdocs.postgrid.com/#accuracy-score)
354
+ */
355
+ accuracy: number;
356
+ /**
357
+ * A string representing the
358
+ * [accuracy type](https://avdocs.postgrid.com/#accuracy-type)
359
+ */
360
+ accuracyType: 'rooftop' | 'point' | 'range_interpolation' | 'nearest_rooftop_match' | 'intersection' | 'street_center' | 'place' | 'state';
361
+ /**
362
+ * Object that contains `lat`, `lng` properties with number values
363
+ */
364
+ location: GeocodeResult.Location;
365
+ }
366
+ namespace GeocodeResult {
367
+ /**
368
+ * Object that contains `lat`, `lng` properties with number values
369
+ */
370
+ interface Location {
371
+ lat: number;
372
+ lng: number;
373
+ }
374
+ }
375
+ }
376
+ interface StandardVerifiedAddress {
63
377
  /**
64
378
  * The city name of the address.
65
379
  */
@@ -89,7 +403,7 @@ export declare namespace AddressVerificationVerifyResponse {
89
403
  * an additional `details` field that follows the
90
404
  * [Address Details](https://avdocs.postgrid.com/#address-details) schema.
91
405
  */
92
- details?: Data.Details;
406
+ details?: StandardVerifiedAddress.Details;
93
407
  /**
94
408
  * Errors encountered during address verification.
95
409
  */
@@ -106,11 +420,15 @@ export declare namespace AddressVerificationVerifyResponse {
106
420
  * verification, batch verification, suggestions, and POST /completions endpoint.
107
421
  * Note that you must supply country when geocoding to get the result successfully.
108
422
  */
109
- geocodeResult?: Data.GeocodeResult;
423
+ geocodeResult?: StandardVerifiedAddress.GeocodeResult;
110
424
  /**
111
425
  * The second line of the address.
112
426
  */
113
427
  line2?: string;
428
+ /**
429
+ * The full name of the province or state.
430
+ */
431
+ provinceOrStateName?: string;
114
432
  /**
115
433
  * The verification status of an address.
116
434
  */
@@ -120,7 +438,7 @@ export declare namespace AddressVerificationVerifyResponse {
120
438
  */
121
439
  zipPlus4?: string;
122
440
  }
123
- namespace Data {
441
+ namespace StandardVerifiedAddress {
124
442
  /**
125
443
  * If you supply `includeDetails=true` as a query parameter, we will also populate
126
444
  * an additional `details` field that follows the
@@ -207,6 +525,10 @@ export declare namespace AddressVerificationVerifyResponse {
207
525
  * US Census consolidated metropolitan statistical area
208
526
  */
209
527
  usCensusCMSA?: string;
528
+ /**
529
+ * US Census FIPS code (US address only)
530
+ */
531
+ usCensusFIPS?: string;
210
532
  /**
211
533
  * US Census metropolitan area
212
534
  */
@@ -296,6 +618,10 @@ export declare namespace AddressVerificationVerifyResponse {
296
618
  * See [USPS DPV](https://avdocs.postgrid.com/#usps-dpv)
297
619
  */
298
620
  usMailingsSuiteLinkReturnCode?: string;
621
+ /**
622
+ * PostNet barcode for the address (US address only)
623
+ */
624
+ usPostnetBarcode?: string;
299
625
  /**
300
626
  * Lower legislative district for the US address
301
627
  */
@@ -348,6 +674,1354 @@ export declare namespace AddressVerificationVerifyResponse {
348
674
  }
349
675
  }
350
676
  }
677
+ export interface AddressVerificationBatchVerificationResponse {
678
+ data: AddressVerificationBatchVerificationResponse.Data;
679
+ message: string;
680
+ status: 'success' | 'error';
681
+ }
682
+ export declare namespace AddressVerificationBatchVerificationResponse {
683
+ interface Data {
684
+ results: Array<Data.Result>;
685
+ }
686
+ namespace Data {
687
+ interface Result {
688
+ /**
689
+ * An error message for this address. Present when verification failed.
690
+ */
691
+ error?: string;
692
+ /**
693
+ * The verified address result. Present when verification succeeded.
694
+ */
695
+ verifiedAddress?: Result.VerifiedAddress;
696
+ }
697
+ namespace Result {
698
+ /**
699
+ * The verified address result. Present when verification succeeded.
700
+ */
701
+ interface VerifiedAddress {
702
+ /**
703
+ * The city name of the address.
704
+ */
705
+ city: string;
706
+ /**
707
+ * The country code of the address.
708
+ */
709
+ country: string;
710
+ /**
711
+ * The first line of the address.
712
+ */
713
+ line1: string;
714
+ /**
715
+ * The postal code or ZIP code of the address.
716
+ */
717
+ postalOrZip: string;
718
+ /**
719
+ * The province or state of the address.
720
+ */
721
+ provinceOrState: string;
722
+ /**
723
+ * The country name of the address.
724
+ */
725
+ countryName?: string;
726
+ /**
727
+ * If you supply `includeDetails=true` as a query parameter, we will also populate
728
+ * an additional `details` field that follows the
729
+ * [Address Details](https://avdocs.postgrid.com/#address-details) schema.
730
+ */
731
+ details?: VerifiedAddress.Details;
732
+ /**
733
+ * Errors encountered during address verification.
734
+ */
735
+ errors?: AddressVerificationAPI.Errors;
736
+ /**
737
+ * The firm name of the address.
738
+ */
739
+ firmName?: string;
740
+ /**
741
+ * If the `geocode=true` query parameter is supplied, the response will include a
742
+ * geocodeResult which follows the
743
+ * [Geocoding](https://avdocs.postgrid.com/#geocoding) schema. You can request this
744
+ * feature be enabled by emailing `support@postgrid.com`. This includes our
745
+ * verification, batch verification, suggestions, and POST /completions endpoint.
746
+ * Note that you must supply country when geocoding to get the result successfully.
747
+ */
748
+ geocodeResult?: VerifiedAddress.GeocodeResult;
749
+ /**
750
+ * The second line of the address.
751
+ */
752
+ line2?: string;
753
+ /**
754
+ * The full name of the province or state.
755
+ */
756
+ provinceOrStateName?: string;
757
+ /**
758
+ * The verification status of an address.
759
+ */
760
+ status?: AddressVerificationAPI.Status;
761
+ /**
762
+ * The zip plus 4 code of the address.
763
+ */
764
+ zipPlus4?: string;
765
+ }
766
+ namespace VerifiedAddress {
767
+ /**
768
+ * If you supply `includeDetails=true` as a query parameter, we will also populate
769
+ * an additional `details` field that follows the
770
+ * [Address Details](https://avdocs.postgrid.com/#address-details) schema.
771
+ */
772
+ interface Details {
773
+ /**
774
+ * PO Box ID
775
+ */
776
+ boxID?: string;
777
+ /**
778
+ * County in the United States (US address only)
779
+ */
780
+ county?: string;
781
+ /**
782
+ * FIPS code for county (US address only)
783
+ */
784
+ countyNum?: string;
785
+ /**
786
+ * Delivery installation area name
787
+ */
788
+ deliveryInstallationAreaName?: string;
789
+ /**
790
+ * Delivery installation qualifier
791
+ */
792
+ deliveryInstallationQualifier?: string;
793
+ /**
794
+ * Delivery installation type
795
+ */
796
+ deliveryInstallationType?: string;
797
+ /**
798
+ * Any extra information relevant to the address
799
+ */
800
+ extraInfo?: string;
801
+ /**
802
+ * The post-direction of the street (after the street name, US addresses only)
803
+ */
804
+ postDirection?: string;
805
+ /**
806
+ * The pre-direction of the street (before the street name, US addresses only)
807
+ */
808
+ preDirection?: string;
809
+ /**
810
+ * Indicates that the address is residential (US address only)
811
+ */
812
+ residential?: boolean;
813
+ /**
814
+ * Rural route number
815
+ */
816
+ ruralRouteNumber?: string;
817
+ /**
818
+ * Rural route type
819
+ */
820
+ ruralRouteType?: string;
821
+ /**
822
+ * The direction of the street (N, S, E, W, etc)
823
+ */
824
+ streetDirection?: string;
825
+ /**
826
+ * Name of the street where the address is located
827
+ */
828
+ streetName?: string;
829
+ /**
830
+ * Street number (e.g. the 20 in 20 Bay St)
831
+ */
832
+ streetNumber?: string;
833
+ /**
834
+ * Type of the street (DR, ST, BLVD, etc)
835
+ */
836
+ streetType?: string;
837
+ /**
838
+ * The unit number/name
839
+ */
840
+ suiteID?: string;
841
+ /**
842
+ * The suite key
843
+ */
844
+ suiteKey?: string;
845
+ /**
846
+ * US Census block number
847
+ */
848
+ usCensusBlockNumber?: string;
849
+ /**
850
+ * US Census consolidated metropolitan statistical area
851
+ */
852
+ usCensusCMSA?: string;
853
+ /**
854
+ * US Census FIPS code (US address only)
855
+ */
856
+ usCensusFIPS?: string;
857
+ /**
858
+ * US Census metropolitan area
859
+ */
860
+ usCensusMA?: string;
861
+ /**
862
+ * US Census metropolitan statistical area
863
+ */
864
+ usCensusMSA?: string;
865
+ /**
866
+ * US Census primary metropolitan statistical area
867
+ */
868
+ usCensusPMSA?: string;
869
+ /**
870
+ * US Census tract number
871
+ */
872
+ usCensusTractNumber?: string;
873
+ /**
874
+ * US congressional district number
875
+ */
876
+ usCongressionalDistrictNumber?: string;
877
+ /**
878
+ * True if address location recognizes DST
879
+ */
880
+ usHasDaylightSavings?: boolean;
881
+ /**
882
+ * PostNet barcode digit
883
+ */
884
+ usMailingCheckDigit?: string;
885
+ /**
886
+ * 4-character code assigned to mail delivery route within a 5 digit zip code
887
+ */
888
+ usMailingsCarrierRoute?: string;
889
+ /**
890
+ * True if US address matches a high-rise default or rural route default in the
891
+ * USPS data
892
+ */
893
+ usMailingsDefaultFlag?: boolean;
894
+ /**
895
+ * Unique USPS identifier for the delivery point
896
+ */
897
+ usMailingsDeliveryPoint?: string;
898
+ /**
899
+ * See [USPS DPV](https://avdocs.postgrid.com/#usps-dpv)
900
+ */
901
+ usMailingsDpvConfirmationIndicator?: string;
902
+ /**
903
+ * Y if this is a commercial mail receiving agency, N otherwise
904
+ */
905
+ usMailingsDpvCrmaIndicator?: string;
906
+ /**
907
+ * See [USPS DPV](https://avdocs.postgrid.com/#usps-dpv)
908
+ */
909
+ usMailingsDpvFootnote1?: string;
910
+ /**
911
+ * See [USPS DPV](https://avdocs.postgrid.com/#usps-dpv)
912
+ */
913
+ usMailingsDpvFootnote2?: string;
914
+ /**
915
+ * See [USPS DPV](https://avdocs.postgrid.com/#usps-dpv)
916
+ */
917
+ usMailingsDpvFootnote3?: string;
918
+ /**
919
+ * A for ascending, D for descending
920
+ */
921
+ usMailingsElotAscDesc?: string;
922
+ /**
923
+ * eLOT sequence number
924
+ */
925
+ usMailingsElotSequenceNumber?: string;
926
+ /**
927
+ * Y if address is in early warning system database
928
+ */
929
+ usMailingsEWSFlag?: string;
930
+ /**
931
+ * Y if address converted by LACS
932
+ */
933
+ usMailingsLACSFlag?: string;
934
+ /**
935
+ * Corresponds to USPS LACSLink return code
936
+ */
937
+ usMailingsLACSReturnCode?: string;
938
+ /**
939
+ * See [USPS DPV](https://avdocs.postgrid.com/#usps-dpv)
940
+ */
941
+ usMailingsRecordTypeCode?: string;
942
+ /**
943
+ * See [USPS DPV](https://avdocs.postgrid.com/#usps-dpv)
944
+ */
945
+ usMailingsSuiteLinkReturnCode?: string;
946
+ /**
947
+ * PostNet barcode for the address (US address only)
948
+ */
949
+ usPostnetBarcode?: string;
950
+ /**
951
+ * Lower legislative district for the US address
952
+ */
953
+ usStateLegislativeLower?: string;
954
+ /**
955
+ * Upper legislative district for the US address
956
+ */
957
+ usStateLegislativeUpper?: string;
958
+ /**
959
+ * Time zone for the US address area
960
+ */
961
+ usTimeZone?: string;
962
+ /**
963
+ * Indicates that the address is vacant according to the USPS (US address only)
964
+ */
965
+ vacant?: boolean;
966
+ }
967
+ /**
968
+ * If the `geocode=true` query parameter is supplied, the response will include a
969
+ * geocodeResult which follows the
970
+ * [Geocoding](https://avdocs.postgrid.com/#geocoding) schema. You can request this
971
+ * feature be enabled by emailing `support@postgrid.com`. This includes our
972
+ * verification, batch verification, suggestions, and POST /completions endpoint.
973
+ * Note that you must supply country when geocoding to get the result successfully.
974
+ */
975
+ interface GeocodeResult {
976
+ /**
977
+ * A real number from 0.00 to 1.00 which represents an
978
+ * [accuracy score](https://avdocs.postgrid.com/#accuracy-score)
979
+ */
980
+ accuracy: number;
981
+ /**
982
+ * A string representing the
983
+ * [accuracy type](https://avdocs.postgrid.com/#accuracy-type)
984
+ */
985
+ accuracyType: 'rooftop' | 'point' | 'range_interpolation' | 'nearest_rooftop_match' | 'intersection' | 'street_center' | 'place' | 'state';
986
+ /**
987
+ * Object that contains `lat`, `lng` properties with number values
988
+ */
989
+ location: GeocodeResult.Location;
990
+ }
991
+ namespace GeocodeResult {
992
+ /**
993
+ * Object that contains `lat`, `lng` properties with number values
994
+ */
995
+ interface Location {
996
+ lat: number;
997
+ lng: number;
998
+ }
999
+ }
1000
+ }
1001
+ }
1002
+ }
1003
+ }
1004
+ export interface AddressVerificationGetAutocompletePreviewsResponse {
1005
+ data: Array<AddressVerificationGetAutocompletePreviewsResponse.Data>;
1006
+ message: string;
1007
+ status: 'success' | 'error';
1008
+ }
1009
+ export declare namespace AddressVerificationGetAutocompletePreviewsResponse {
1010
+ interface Data {
1011
+ /**
1012
+ * A partial view of the address, suitable for display in an autocomplete dropdown.
1013
+ */
1014
+ preview: Data.Preview;
1015
+ }
1016
+ namespace Data {
1017
+ /**
1018
+ * A partial view of the address, suitable for display in an autocomplete dropdown.
1019
+ */
1020
+ interface Preview {
1021
+ /**
1022
+ * The street address line.
1023
+ */
1024
+ address: string;
1025
+ /**
1026
+ * The city.
1027
+ */
1028
+ city?: string;
1029
+ /**
1030
+ * For US addresses, the full postal code. For non-US addresses, only the first 3
1031
+ * digits are returned to avoid consuming a lookup.
1032
+ */
1033
+ pc?: string;
1034
+ /**
1035
+ * The province or state abbreviation. Returned instead of `pc` when
1036
+ * `provInsteadOfPC=true`.
1037
+ */
1038
+ prov?: string;
1039
+ }
1040
+ }
1041
+ }
1042
+ export interface AddressVerificationGetLookupInfoResponse {
1043
+ data: AddressVerificationGetLookupInfoResponse.Data;
1044
+ message: string;
1045
+ status: 'success' | 'error';
1046
+ }
1047
+ export declare namespace AddressVerificationGetLookupInfoResponse {
1048
+ interface Data {
1049
+ /**
1050
+ * The maximum number of lookups allowed in the current billing period. `null`
1051
+ * indicates an unlimited plan.
1052
+ */
1053
+ freeLimit: number | null;
1054
+ /**
1055
+ * The number of lookups consumed in the current billing period.
1056
+ */
1057
+ used: number;
1058
+ }
1059
+ }
1060
+ export interface AddressVerificationLookupCityOrStateFromPostalOrZipCodeResponse {
1061
+ data: Array<AddressVerificationLookupCityOrStateFromPostalOrZipCodeResponse.Data>;
1062
+ message: string;
1063
+ status: 'success' | 'error';
1064
+ }
1065
+ export declare namespace AddressVerificationLookupCityOrStateFromPostalOrZipCodeResponse {
1066
+ interface Data {
1067
+ /**
1068
+ * The city name.
1069
+ */
1070
+ city: string;
1071
+ /**
1072
+ * The ISO 2-letter country code.
1073
+ */
1074
+ country: string;
1075
+ /**
1076
+ * The province or state abbreviation.
1077
+ */
1078
+ provinceOrState: string;
1079
+ /**
1080
+ * The county name (US addresses only).
1081
+ */
1082
+ county?: string;
1083
+ /**
1084
+ * The FIPS code for the county (US addresses only).
1085
+ */
1086
+ countyFIPS?: string;
1087
+ /**
1088
+ * Whether the location is mailable.
1089
+ */
1090
+ mailable?: boolean;
1091
+ /**
1092
+ * The USPS preferred city name for this postal code.
1093
+ */
1094
+ preferredCity?: string;
1095
+ /**
1096
+ * The USPS ZIP code class (e.g. `S` for standard, `P` for PO Box only).
1097
+ */
1098
+ zipClass?: string;
1099
+ }
1100
+ }
1101
+ export interface AddressVerificationLookupZipCodeFromCityOrStateResponse {
1102
+ data: AddressVerificationLookupZipCodeFromCityOrStateResponse.Data;
1103
+ message: string;
1104
+ status: 'success' | 'error';
1105
+ }
1106
+ export declare namespace AddressVerificationLookupZipCodeFromCityOrStateResponse {
1107
+ interface Data {
1108
+ zipCodes: Array<string>;
1109
+ }
1110
+ }
1111
+ export interface AddressVerificationParseAnAddressResponse {
1112
+ data: AddressVerificationParseAnAddressResponse.Data;
1113
+ message: string;
1114
+ status: 'success' | 'error';
1115
+ }
1116
+ export declare namespace AddressVerificationParseAnAddressResponse {
1117
+ interface Data {
1118
+ /**
1119
+ * The category of the location (e.g. restaurant).
1120
+ */
1121
+ category?: string;
1122
+ /**
1123
+ * The city name.
1124
+ */
1125
+ city?: string;
1126
+ /**
1127
+ * The borough within a city.
1128
+ */
1129
+ cityDistrict?: string;
1130
+ /**
1131
+ * The country.
1132
+ */
1133
+ country?: string;
1134
+ /**
1135
+ * The name of the location.
1136
+ */
1137
+ house?: string;
1138
+ /**
1139
+ * The house or street number.
1140
+ */
1141
+ houseNumber?: string;
1142
+ /**
1143
+ * The name of the island.
1144
+ */
1145
+ island?: string;
1146
+ /**
1147
+ * The floor.
1148
+ */
1149
+ level?: string;
1150
+ /**
1151
+ * Populated if the input query contains a near/in qualifier.
1152
+ */
1153
+ near?: string;
1154
+ /**
1155
+ * The postal office box.
1156
+ */
1157
+ poBox?: string;
1158
+ /**
1159
+ * The postal or ZIP code.
1160
+ */
1161
+ postcode?: string;
1162
+ /**
1163
+ * The street name.
1164
+ */
1165
+ road?: string;
1166
+ /**
1167
+ * The state or province.
1168
+ */
1169
+ state?: string;
1170
+ /**
1171
+ * The county.
1172
+ */
1173
+ stateDistrict?: string;
1174
+ /**
1175
+ * The unofficial neighborhood name.
1176
+ */
1177
+ suburb?: string;
1178
+ /**
1179
+ * The apartment, unit, office, lot, or other secondary unit designator.
1180
+ */
1181
+ unit?: string;
1182
+ }
1183
+ }
1184
+ export interface AddressVerificationSuggestAddressesResponse {
1185
+ data: Array<AddressVerificationSuggestAddressesResponse.Data>;
1186
+ message: string;
1187
+ status: 'success' | 'error';
1188
+ }
1189
+ export declare namespace AddressVerificationSuggestAddressesResponse {
1190
+ interface Data {
1191
+ /**
1192
+ * The city name of the address.
1193
+ */
1194
+ city: string;
1195
+ /**
1196
+ * The country code of the address.
1197
+ */
1198
+ country: string;
1199
+ /**
1200
+ * The first line of the address.
1201
+ */
1202
+ line1: string;
1203
+ /**
1204
+ * The postal code or ZIP code of the address.
1205
+ */
1206
+ postalOrZip: string;
1207
+ /**
1208
+ * The province or state of the address.
1209
+ */
1210
+ provinceOrState: string;
1211
+ /**
1212
+ * The country name of the address.
1213
+ */
1214
+ countryName?: string;
1215
+ /**
1216
+ * If you supply `includeDetails=true` as a query parameter, we will also populate
1217
+ * an additional `details` field that follows the
1218
+ * [Address Details](https://avdocs.postgrid.com/#address-details) schema.
1219
+ */
1220
+ details?: Data.Details;
1221
+ /**
1222
+ * Errors encountered during address verification.
1223
+ */
1224
+ errors?: AddressVerificationAPI.Errors;
1225
+ /**
1226
+ * The firm name of the address.
1227
+ */
1228
+ firmName?: string;
1229
+ /**
1230
+ * If the `geocode=true` query parameter is supplied, the response will include a
1231
+ * geocodeResult which follows the
1232
+ * [Geocoding](https://avdocs.postgrid.com/#geocoding) schema. You can request this
1233
+ * feature be enabled by emailing `support@postgrid.com`. This includes our
1234
+ * verification, batch verification, suggestions, and POST /completions endpoint.
1235
+ * Note that you must supply country when geocoding to get the result successfully.
1236
+ */
1237
+ geocodeResult?: Data.GeocodeResult;
1238
+ /**
1239
+ * The second line of the address.
1240
+ */
1241
+ line2?: string;
1242
+ /**
1243
+ * The full name of the province or state.
1244
+ */
1245
+ provinceOrStateName?: string;
1246
+ /**
1247
+ * The verification status of an address.
1248
+ */
1249
+ status?: AddressVerificationAPI.Status;
1250
+ /**
1251
+ * The zip plus 4 code of the address.
1252
+ */
1253
+ zipPlus4?: string;
1254
+ }
1255
+ namespace Data {
1256
+ /**
1257
+ * If you supply `includeDetails=true` as a query parameter, we will also populate
1258
+ * an additional `details` field that follows the
1259
+ * [Address Details](https://avdocs.postgrid.com/#address-details) schema.
1260
+ */
1261
+ interface Details {
1262
+ /**
1263
+ * PO Box ID
1264
+ */
1265
+ boxID?: string;
1266
+ /**
1267
+ * County in the United States (US address only)
1268
+ */
1269
+ county?: string;
1270
+ /**
1271
+ * FIPS code for county (US address only)
1272
+ */
1273
+ countyNum?: string;
1274
+ /**
1275
+ * Delivery installation area name
1276
+ */
1277
+ deliveryInstallationAreaName?: string;
1278
+ /**
1279
+ * Delivery installation qualifier
1280
+ */
1281
+ deliveryInstallationQualifier?: string;
1282
+ /**
1283
+ * Delivery installation type
1284
+ */
1285
+ deliveryInstallationType?: string;
1286
+ /**
1287
+ * Any extra information relevant to the address
1288
+ */
1289
+ extraInfo?: string;
1290
+ /**
1291
+ * The post-direction of the street (after the street name, US addresses only)
1292
+ */
1293
+ postDirection?: string;
1294
+ /**
1295
+ * The pre-direction of the street (before the street name, US addresses only)
1296
+ */
1297
+ preDirection?: string;
1298
+ /**
1299
+ * Indicates that the address is residential (US address only)
1300
+ */
1301
+ residential?: boolean;
1302
+ /**
1303
+ * Rural route number
1304
+ */
1305
+ ruralRouteNumber?: string;
1306
+ /**
1307
+ * Rural route type
1308
+ */
1309
+ ruralRouteType?: string;
1310
+ /**
1311
+ * The direction of the street (N, S, E, W, etc)
1312
+ */
1313
+ streetDirection?: string;
1314
+ /**
1315
+ * Name of the street where the address is located
1316
+ */
1317
+ streetName?: string;
1318
+ /**
1319
+ * Street number (e.g. the 20 in 20 Bay St)
1320
+ */
1321
+ streetNumber?: string;
1322
+ /**
1323
+ * Type of the street (DR, ST, BLVD, etc)
1324
+ */
1325
+ streetType?: string;
1326
+ /**
1327
+ * The unit number/name
1328
+ */
1329
+ suiteID?: string;
1330
+ /**
1331
+ * The suite key
1332
+ */
1333
+ suiteKey?: string;
1334
+ /**
1335
+ * US Census block number
1336
+ */
1337
+ usCensusBlockNumber?: string;
1338
+ /**
1339
+ * US Census consolidated metropolitan statistical area
1340
+ */
1341
+ usCensusCMSA?: string;
1342
+ /**
1343
+ * US Census FIPS code (US address only)
1344
+ */
1345
+ usCensusFIPS?: string;
1346
+ /**
1347
+ * US Census metropolitan area
1348
+ */
1349
+ usCensusMA?: string;
1350
+ /**
1351
+ * US Census metropolitan statistical area
1352
+ */
1353
+ usCensusMSA?: string;
1354
+ /**
1355
+ * US Census primary metropolitan statistical area
1356
+ */
1357
+ usCensusPMSA?: string;
1358
+ /**
1359
+ * US Census tract number
1360
+ */
1361
+ usCensusTractNumber?: string;
1362
+ /**
1363
+ * US congressional district number
1364
+ */
1365
+ usCongressionalDistrictNumber?: string;
1366
+ /**
1367
+ * True if address location recognizes DST
1368
+ */
1369
+ usHasDaylightSavings?: boolean;
1370
+ /**
1371
+ * PostNet barcode digit
1372
+ */
1373
+ usMailingCheckDigit?: string;
1374
+ /**
1375
+ * 4-character code assigned to mail delivery route within a 5 digit zip code
1376
+ */
1377
+ usMailingsCarrierRoute?: string;
1378
+ /**
1379
+ * True if US address matches a high-rise default or rural route default in the
1380
+ * USPS data
1381
+ */
1382
+ usMailingsDefaultFlag?: boolean;
1383
+ /**
1384
+ * Unique USPS identifier for the delivery point
1385
+ */
1386
+ usMailingsDeliveryPoint?: string;
1387
+ /**
1388
+ * See [USPS DPV](https://avdocs.postgrid.com/#usps-dpv)
1389
+ */
1390
+ usMailingsDpvConfirmationIndicator?: string;
1391
+ /**
1392
+ * Y if this is a commercial mail receiving agency, N otherwise
1393
+ */
1394
+ usMailingsDpvCrmaIndicator?: string;
1395
+ /**
1396
+ * See [USPS DPV](https://avdocs.postgrid.com/#usps-dpv)
1397
+ */
1398
+ usMailingsDpvFootnote1?: string;
1399
+ /**
1400
+ * See [USPS DPV](https://avdocs.postgrid.com/#usps-dpv)
1401
+ */
1402
+ usMailingsDpvFootnote2?: string;
1403
+ /**
1404
+ * See [USPS DPV](https://avdocs.postgrid.com/#usps-dpv)
1405
+ */
1406
+ usMailingsDpvFootnote3?: string;
1407
+ /**
1408
+ * A for ascending, D for descending
1409
+ */
1410
+ usMailingsElotAscDesc?: string;
1411
+ /**
1412
+ * eLOT sequence number
1413
+ */
1414
+ usMailingsElotSequenceNumber?: string;
1415
+ /**
1416
+ * Y if address is in early warning system database
1417
+ */
1418
+ usMailingsEWSFlag?: string;
1419
+ /**
1420
+ * Y if address converted by LACS
1421
+ */
1422
+ usMailingsLACSFlag?: string;
1423
+ /**
1424
+ * Corresponds to USPS LACSLink return code
1425
+ */
1426
+ usMailingsLACSReturnCode?: string;
1427
+ /**
1428
+ * See [USPS DPV](https://avdocs.postgrid.com/#usps-dpv)
1429
+ */
1430
+ usMailingsRecordTypeCode?: string;
1431
+ /**
1432
+ * See [USPS DPV](https://avdocs.postgrid.com/#usps-dpv)
1433
+ */
1434
+ usMailingsSuiteLinkReturnCode?: string;
1435
+ /**
1436
+ * PostNet barcode for the address (US address only)
1437
+ */
1438
+ usPostnetBarcode?: string;
1439
+ /**
1440
+ * Lower legislative district for the US address
1441
+ */
1442
+ usStateLegislativeLower?: string;
1443
+ /**
1444
+ * Upper legislative district for the US address
1445
+ */
1446
+ usStateLegislativeUpper?: string;
1447
+ /**
1448
+ * Time zone for the US address area
1449
+ */
1450
+ usTimeZone?: string;
1451
+ /**
1452
+ * Indicates that the address is vacant according to the USPS (US address only)
1453
+ */
1454
+ vacant?: boolean;
1455
+ }
1456
+ /**
1457
+ * If the `geocode=true` query parameter is supplied, the response will include a
1458
+ * geocodeResult which follows the
1459
+ * [Geocoding](https://avdocs.postgrid.com/#geocoding) schema. You can request this
1460
+ * feature be enabled by emailing `support@postgrid.com`. This includes our
1461
+ * verification, batch verification, suggestions, and POST /completions endpoint.
1462
+ * Note that you must supply country when geocoding to get the result successfully.
1463
+ */
1464
+ interface GeocodeResult {
1465
+ /**
1466
+ * A real number from 0.00 to 1.00 which represents an
1467
+ * [accuracy score](https://avdocs.postgrid.com/#accuracy-score)
1468
+ */
1469
+ accuracy: number;
1470
+ /**
1471
+ * A string representing the
1472
+ * [accuracy type](https://avdocs.postgrid.com/#accuracy-type)
1473
+ */
1474
+ accuracyType: 'rooftop' | 'point' | 'range_interpolation' | 'nearest_rooftop_match' | 'intersection' | 'street_center' | 'place' | 'state';
1475
+ /**
1476
+ * Object that contains `lat`, `lng` properties with number values
1477
+ */
1478
+ location: GeocodeResult.Location;
1479
+ }
1480
+ namespace GeocodeResult {
1481
+ /**
1482
+ * Object that contains `lat`, `lng` properties with number values
1483
+ */
1484
+ interface Location {
1485
+ lat: number;
1486
+ lng: number;
1487
+ }
1488
+ }
1489
+ }
1490
+ }
1491
+ export interface AddressVerificationVerifyResponse {
1492
+ data: AddressVerificationVerifyResponse.Data;
1493
+ message: string;
1494
+ status: 'success' | 'error';
1495
+ }
1496
+ export declare namespace AddressVerificationVerifyResponse {
1497
+ interface Data {
1498
+ /**
1499
+ * The city name of the address.
1500
+ */
1501
+ city: string;
1502
+ /**
1503
+ * The country code of the address.
1504
+ */
1505
+ country: string;
1506
+ /**
1507
+ * The first line of the address.
1508
+ */
1509
+ line1: string;
1510
+ /**
1511
+ * The postal code or ZIP code of the address.
1512
+ */
1513
+ postalOrZip: string;
1514
+ /**
1515
+ * The province or state of the address.
1516
+ */
1517
+ provinceOrState: string;
1518
+ /**
1519
+ * The country name of the address.
1520
+ */
1521
+ countryName?: string;
1522
+ /**
1523
+ * If you supply `includeDetails=true` as a query parameter, we will also populate
1524
+ * an additional `details` field that follows the
1525
+ * [Address Details](https://avdocs.postgrid.com/#address-details) schema.
1526
+ */
1527
+ details?: Data.Details;
1528
+ /**
1529
+ * Errors encountered during address verification.
1530
+ */
1531
+ errors?: AddressVerificationAPI.Errors;
1532
+ /**
1533
+ * The firm name of the address.
1534
+ */
1535
+ firmName?: string;
1536
+ /**
1537
+ * If the `geocode=true` query parameter is supplied, the response will include a
1538
+ * geocodeResult which follows the
1539
+ * [Geocoding](https://avdocs.postgrid.com/#geocoding) schema. You can request this
1540
+ * feature be enabled by emailing `support@postgrid.com`. This includes our
1541
+ * verification, batch verification, suggestions, and POST /completions endpoint.
1542
+ * Note that you must supply country when geocoding to get the result successfully.
1543
+ */
1544
+ geocodeResult?: Data.GeocodeResult;
1545
+ /**
1546
+ * The second line of the address.
1547
+ */
1548
+ line2?: string;
1549
+ /**
1550
+ * The full name of the province or state.
1551
+ */
1552
+ provinceOrStateName?: string;
1553
+ /**
1554
+ * The verification status of an address.
1555
+ */
1556
+ status?: AddressVerificationAPI.Status;
1557
+ /**
1558
+ * The zip plus 4 code of the address.
1559
+ */
1560
+ zipPlus4?: string;
1561
+ }
1562
+ namespace Data {
1563
+ /**
1564
+ * If you supply `includeDetails=true` as a query parameter, we will also populate
1565
+ * an additional `details` field that follows the
1566
+ * [Address Details](https://avdocs.postgrid.com/#address-details) schema.
1567
+ */
1568
+ interface Details {
1569
+ /**
1570
+ * PO Box ID
1571
+ */
1572
+ boxID?: string;
1573
+ /**
1574
+ * County in the United States (US address only)
1575
+ */
1576
+ county?: string;
1577
+ /**
1578
+ * FIPS code for county (US address only)
1579
+ */
1580
+ countyNum?: string;
1581
+ /**
1582
+ * Delivery installation area name
1583
+ */
1584
+ deliveryInstallationAreaName?: string;
1585
+ /**
1586
+ * Delivery installation qualifier
1587
+ */
1588
+ deliveryInstallationQualifier?: string;
1589
+ /**
1590
+ * Delivery installation type
1591
+ */
1592
+ deliveryInstallationType?: string;
1593
+ /**
1594
+ * Any extra information relevant to the address
1595
+ */
1596
+ extraInfo?: string;
1597
+ /**
1598
+ * The post-direction of the street (after the street name, US addresses only)
1599
+ */
1600
+ postDirection?: string;
1601
+ /**
1602
+ * The pre-direction of the street (before the street name, US addresses only)
1603
+ */
1604
+ preDirection?: string;
1605
+ /**
1606
+ * Indicates that the address is residential (US address only)
1607
+ */
1608
+ residential?: boolean;
1609
+ /**
1610
+ * Rural route number
1611
+ */
1612
+ ruralRouteNumber?: string;
1613
+ /**
1614
+ * Rural route type
1615
+ */
1616
+ ruralRouteType?: string;
1617
+ /**
1618
+ * The direction of the street (N, S, E, W, etc)
1619
+ */
1620
+ streetDirection?: string;
1621
+ /**
1622
+ * Name of the street where the address is located
1623
+ */
1624
+ streetName?: string;
1625
+ /**
1626
+ * Street number (e.g. the 20 in 20 Bay St)
1627
+ */
1628
+ streetNumber?: string;
1629
+ /**
1630
+ * Type of the street (DR, ST, BLVD, etc)
1631
+ */
1632
+ streetType?: string;
1633
+ /**
1634
+ * The unit number/name
1635
+ */
1636
+ suiteID?: string;
1637
+ /**
1638
+ * The suite key
1639
+ */
1640
+ suiteKey?: string;
1641
+ /**
1642
+ * US Census block number
1643
+ */
1644
+ usCensusBlockNumber?: string;
1645
+ /**
1646
+ * US Census consolidated metropolitan statistical area
1647
+ */
1648
+ usCensusCMSA?: string;
1649
+ /**
1650
+ * US Census FIPS code (US address only)
1651
+ */
1652
+ usCensusFIPS?: string;
1653
+ /**
1654
+ * US Census metropolitan area
1655
+ */
1656
+ usCensusMA?: string;
1657
+ /**
1658
+ * US Census metropolitan statistical area
1659
+ */
1660
+ usCensusMSA?: string;
1661
+ /**
1662
+ * US Census primary metropolitan statistical area
1663
+ */
1664
+ usCensusPMSA?: string;
1665
+ /**
1666
+ * US Census tract number
1667
+ */
1668
+ usCensusTractNumber?: string;
1669
+ /**
1670
+ * US congressional district number
1671
+ */
1672
+ usCongressionalDistrictNumber?: string;
1673
+ /**
1674
+ * True if address location recognizes DST
1675
+ */
1676
+ usHasDaylightSavings?: boolean;
1677
+ /**
1678
+ * PostNet barcode digit
1679
+ */
1680
+ usMailingCheckDigit?: string;
1681
+ /**
1682
+ * 4-character code assigned to mail delivery route within a 5 digit zip code
1683
+ */
1684
+ usMailingsCarrierRoute?: string;
1685
+ /**
1686
+ * True if US address matches a high-rise default or rural route default in the
1687
+ * USPS data
1688
+ */
1689
+ usMailingsDefaultFlag?: boolean;
1690
+ /**
1691
+ * Unique USPS identifier for the delivery point
1692
+ */
1693
+ usMailingsDeliveryPoint?: string;
1694
+ /**
1695
+ * See [USPS DPV](https://avdocs.postgrid.com/#usps-dpv)
1696
+ */
1697
+ usMailingsDpvConfirmationIndicator?: string;
1698
+ /**
1699
+ * Y if this is a commercial mail receiving agency, N otherwise
1700
+ */
1701
+ usMailingsDpvCrmaIndicator?: string;
1702
+ /**
1703
+ * See [USPS DPV](https://avdocs.postgrid.com/#usps-dpv)
1704
+ */
1705
+ usMailingsDpvFootnote1?: string;
1706
+ /**
1707
+ * See [USPS DPV](https://avdocs.postgrid.com/#usps-dpv)
1708
+ */
1709
+ usMailingsDpvFootnote2?: string;
1710
+ /**
1711
+ * See [USPS DPV](https://avdocs.postgrid.com/#usps-dpv)
1712
+ */
1713
+ usMailingsDpvFootnote3?: string;
1714
+ /**
1715
+ * A for ascending, D for descending
1716
+ */
1717
+ usMailingsElotAscDesc?: string;
1718
+ /**
1719
+ * eLOT sequence number
1720
+ */
1721
+ usMailingsElotSequenceNumber?: string;
1722
+ /**
1723
+ * Y if address is in early warning system database
1724
+ */
1725
+ usMailingsEWSFlag?: string;
1726
+ /**
1727
+ * Y if address converted by LACS
1728
+ */
1729
+ usMailingsLACSFlag?: string;
1730
+ /**
1731
+ * Corresponds to USPS LACSLink return code
1732
+ */
1733
+ usMailingsLACSReturnCode?: string;
1734
+ /**
1735
+ * See [USPS DPV](https://avdocs.postgrid.com/#usps-dpv)
1736
+ */
1737
+ usMailingsRecordTypeCode?: string;
1738
+ /**
1739
+ * See [USPS DPV](https://avdocs.postgrid.com/#usps-dpv)
1740
+ */
1741
+ usMailingsSuiteLinkReturnCode?: string;
1742
+ /**
1743
+ * PostNet barcode for the address (US address only)
1744
+ */
1745
+ usPostnetBarcode?: string;
1746
+ /**
1747
+ * Lower legislative district for the US address
1748
+ */
1749
+ usStateLegislativeLower?: string;
1750
+ /**
1751
+ * Upper legislative district for the US address
1752
+ */
1753
+ usStateLegislativeUpper?: string;
1754
+ /**
1755
+ * Time zone for the US address area
1756
+ */
1757
+ usTimeZone?: string;
1758
+ /**
1759
+ * Indicates that the address is vacant according to the USPS (US address only)
1760
+ */
1761
+ vacant?: boolean;
1762
+ }
1763
+ /**
1764
+ * If the `geocode=true` query parameter is supplied, the response will include a
1765
+ * geocodeResult which follows the
1766
+ * [Geocoding](https://avdocs.postgrid.com/#geocoding) schema. You can request this
1767
+ * feature be enabled by emailing `support@postgrid.com`. This includes our
1768
+ * verification, batch verification, suggestions, and POST /completions endpoint.
1769
+ * Note that you must supply country when geocoding to get the result successfully.
1770
+ */
1771
+ interface GeocodeResult {
1772
+ /**
1773
+ * A real number from 0.00 to 1.00 which represents an
1774
+ * [accuracy score](https://avdocs.postgrid.com/#accuracy-score)
1775
+ */
1776
+ accuracy: number;
1777
+ /**
1778
+ * A string representing the
1779
+ * [accuracy type](https://avdocs.postgrid.com/#accuracy-type)
1780
+ */
1781
+ accuracyType: 'rooftop' | 'point' | 'range_interpolation' | 'nearest_rooftop_match' | 'intersection' | 'street_center' | 'place' | 'state';
1782
+ /**
1783
+ * Object that contains `lat`, `lng` properties with number values
1784
+ */
1785
+ location: GeocodeResult.Location;
1786
+ }
1787
+ namespace GeocodeResult {
1788
+ /**
1789
+ * Object that contains `lat`, `lng` properties with number values
1790
+ */
1791
+ interface Location {
1792
+ lat: number;
1793
+ lng: number;
1794
+ }
1795
+ }
1796
+ }
1797
+ }
1798
+ export interface AddressVerificationAutocompleteParams {
1799
+ /**
1800
+ * Body param: The partial street address to complete (e.g. `"22 Bay"`).
1801
+ */
1802
+ partialStreet: string;
1803
+ /**
1804
+ * Query param
1805
+ */
1806
+ filterExact?: boolean;
1807
+ /**
1808
+ * Query param
1809
+ */
1810
+ geocode?: boolean;
1811
+ /**
1812
+ * Query param
1813
+ */
1814
+ includeDetails?: boolean;
1815
+ /**
1816
+ * Query param
1817
+ */
1818
+ index?: number;
1819
+ /**
1820
+ * Query param
1821
+ */
1822
+ limit?: number;
1823
+ /**
1824
+ * Query param
1825
+ */
1826
+ properCase?: boolean;
1827
+ /**
1828
+ * Query param
1829
+ */
1830
+ query_verifiedOnly?: boolean;
1831
+ /**
1832
+ * Query param
1833
+ */
1834
+ verify?: boolean;
1835
+ /**
1836
+ * Body param: Filter results to a specific city.
1837
+ */
1838
+ cityFilter?: string;
1839
+ /**
1840
+ * Body param: Filter results to a specific country code.
1841
+ */
1842
+ countryFilter?: string;
1843
+ /**
1844
+ * Body param: Filter results to a specific postal code prefix.
1845
+ */
1846
+ pcFilter?: string;
1847
+ /**
1848
+ * Body param: Filter results to a specific state or province abbreviation.
1849
+ */
1850
+ stateFilter?: string;
1851
+ /**
1852
+ * Body param: If true, only return addresses that passed USPS/Canada Post
1853
+ * verification.
1854
+ */
1855
+ body_verifiedOnly?: boolean;
1856
+ }
1857
+ export interface AddressVerificationBatchVerificationParams {
1858
+ /**
1859
+ * Body param: Array of addresses to verify. Each item can be a freeform string or
1860
+ * structured address object.
1861
+ */
1862
+ addresses: Array<AddressVerificationBatchVerificationParams.StandardFreeformAddressInput | AddressVerificationBatchVerificationParams.StandardStructuredAddressInput>;
1863
+ /**
1864
+ * Query param
1865
+ */
1866
+ geocode?: boolean;
1867
+ /**
1868
+ * Query param
1869
+ */
1870
+ includeDetails?: boolean;
1871
+ /**
1872
+ * Query param
1873
+ */
1874
+ properCase?: boolean;
1875
+ }
1876
+ export declare namespace AddressVerificationBatchVerificationParams {
1877
+ interface StandardFreeformAddressInput {
1878
+ /**
1879
+ * The address you want to verify, written on a single line.
1880
+ */
1881
+ address: string;
1882
+ }
1883
+ interface StandardStructuredAddressInput {
1884
+ address: StandardStructuredAddressInput.Address;
1885
+ }
1886
+ namespace StandardStructuredAddressInput {
1887
+ interface Address {
1888
+ /**
1889
+ * The city of the address.
1890
+ */
1891
+ city: string;
1892
+ /**
1893
+ * The country of your address, one of `ca` or `us`.
1894
+ */
1895
+ country: 'ca' | 'us';
1896
+ /**
1897
+ * The first line of the address.
1898
+ */
1899
+ line1: string;
1900
+ /**
1901
+ * The postal code or ZIP code of the address.
1902
+ */
1903
+ postalOrZip: string;
1904
+ /**
1905
+ * The province or state of the address.
1906
+ */
1907
+ provinceOrState: string;
1908
+ /**
1909
+ * The second line of the address.
1910
+ */
1911
+ line2?: string;
1912
+ /**
1913
+ * The optional firm/recipient name.
1914
+ */
1915
+ recipient?: string;
1916
+ }
1917
+ }
1918
+ }
1919
+ export interface AddressVerificationGetAutocompletePreviewsParams {
1920
+ partialStreet: string;
1921
+ cityFilter?: string;
1922
+ countryFilter?: string;
1923
+ filterExact?: boolean;
1924
+ limit?: number;
1925
+ pcFilter?: string;
1926
+ properCase?: boolean;
1927
+ provInsteadOfPC?: boolean;
1928
+ stateFilter?: string;
1929
+ verifiedOnly?: boolean;
1930
+ }
1931
+ export interface AddressVerificationLookupCityOrStateFromPostalOrZipCodeParams {
1932
+ postalOrZip: string;
1933
+ }
1934
+ export interface AddressVerificationLookupZipCodeFromCityOrStateParams {
1935
+ /**
1936
+ * The city name.
1937
+ */
1938
+ city: string;
1939
+ /**
1940
+ * The country code. Currently only `US` is supported.
1941
+ */
1942
+ countryCode: string;
1943
+ /**
1944
+ * The state abbreviation (e.g. `NY`).
1945
+ */
1946
+ state: string;
1947
+ }
1948
+ export interface AddressVerificationParseAnAddressParams {
1949
+ /**
1950
+ * The address you want to verify, written on a single line.
1951
+ */
1952
+ address: string;
1953
+ }
1954
+ export type AddressVerificationSuggestAddressesParams = AddressVerificationSuggestAddressesParams.StandardFreeformAddressInput | AddressVerificationSuggestAddressesParams.StandardStructuredAddressInput;
1955
+ export declare namespace AddressVerificationSuggestAddressesParams {
1956
+ interface StandardFreeformAddressInput {
1957
+ /**
1958
+ * Body param: The address you want to verify, written on a single line.
1959
+ */
1960
+ address: string;
1961
+ /**
1962
+ * Query param
1963
+ */
1964
+ geocode?: boolean;
1965
+ /**
1966
+ * Query param
1967
+ */
1968
+ includeDetails?: boolean;
1969
+ /**
1970
+ * Query param
1971
+ */
1972
+ properCase?: boolean;
1973
+ }
1974
+ interface StandardStructuredAddressInput {
1975
+ /**
1976
+ * Body param
1977
+ */
1978
+ address: StandardStructuredAddressInput.Address;
1979
+ /**
1980
+ * Query param
1981
+ */
1982
+ geocode?: boolean;
1983
+ /**
1984
+ * Query param
1985
+ */
1986
+ includeDetails?: boolean;
1987
+ /**
1988
+ * Query param
1989
+ */
1990
+ properCase?: boolean;
1991
+ }
1992
+ namespace StandardStructuredAddressInput {
1993
+ interface Address {
1994
+ /**
1995
+ * The city of the address.
1996
+ */
1997
+ city: string;
1998
+ /**
1999
+ * The country of your address, one of `ca` or `us`.
2000
+ */
2001
+ country: 'ca' | 'us';
2002
+ /**
2003
+ * The first line of the address.
2004
+ */
2005
+ line1: string;
2006
+ /**
2007
+ * The postal code or ZIP code of the address.
2008
+ */
2009
+ postalOrZip: string;
2010
+ /**
2011
+ * The province or state of the address.
2012
+ */
2013
+ provinceOrState: string;
2014
+ /**
2015
+ * The second line of the address.
2016
+ */
2017
+ line2?: string;
2018
+ /**
2019
+ * The optional firm/recipient name.
2020
+ */
2021
+ recipient?: string;
2022
+ }
2023
+ }
2024
+ }
351
2025
  export type AddressVerificationVerifyParams = AddressVerificationVerifyParams.StandardFreeformAddressInput | AddressVerificationVerifyParams.StandardStructuredAddressInput;
352
2026
  export declare namespace AddressVerificationVerifyParams {
353
2027
  interface StandardFreeformAddressInput {
@@ -356,33 +2030,33 @@ export declare namespace AddressVerificationVerifyParams {
356
2030
  */
357
2031
  address: string;
358
2032
  /**
359
- * Query param:
2033
+ * Query param
360
2034
  */
361
2035
  geocode?: boolean;
362
2036
  /**
363
- * Query param:
2037
+ * Query param
364
2038
  */
365
2039
  includeDetails?: boolean;
366
2040
  /**
367
- * Query param:
2041
+ * Query param
368
2042
  */
369
2043
  properCase?: boolean;
370
2044
  }
371
2045
  interface StandardStructuredAddressInput {
372
2046
  /**
373
- * Body param:
2047
+ * Body param
374
2048
  */
375
2049
  address: StandardStructuredAddressInput.Address;
376
2050
  /**
377
- * Query param:
2051
+ * Query param
378
2052
  */
379
2053
  geocode?: boolean;
380
2054
  /**
381
- * Query param:
2055
+ * Query param
382
2056
  */
383
2057
  includeDetails?: boolean;
384
2058
  /**
385
- * Query param:
2059
+ * Query param
386
2060
  */
387
2061
  properCase?: boolean;
388
2062
  }
@@ -420,6 +2094,6 @@ export declare namespace AddressVerificationVerifyParams {
420
2094
  }
421
2095
  }
422
2096
  export declare namespace AddressVerification {
423
- export { type Errors as Errors, type Status as Status, type AddressVerificationVerifyResponse as AddressVerificationVerifyResponse, type AddressVerificationVerifyParams as AddressVerificationVerifyParams, };
2097
+ export { type Errors as Errors, type Status as Status, type AddressVerificationAutocompleteResponse as AddressVerificationAutocompleteResponse, type AddressVerificationBatchVerificationResponse as AddressVerificationBatchVerificationResponse, type AddressVerificationGetAutocompletePreviewsResponse as AddressVerificationGetAutocompletePreviewsResponse, type AddressVerificationGetLookupInfoResponse as AddressVerificationGetLookupInfoResponse, type AddressVerificationLookupCityOrStateFromPostalOrZipCodeResponse as AddressVerificationLookupCityOrStateFromPostalOrZipCodeResponse, type AddressVerificationLookupZipCodeFromCityOrStateResponse as AddressVerificationLookupZipCodeFromCityOrStateResponse, type AddressVerificationParseAnAddressResponse as AddressVerificationParseAnAddressResponse, type AddressVerificationSuggestAddressesResponse as AddressVerificationSuggestAddressesResponse, type AddressVerificationVerifyResponse as AddressVerificationVerifyResponse, type AddressVerificationAutocompleteParams as AddressVerificationAutocompleteParams, type AddressVerificationBatchVerificationParams as AddressVerificationBatchVerificationParams, type AddressVerificationGetAutocompletePreviewsParams as AddressVerificationGetAutocompletePreviewsParams, type AddressVerificationLookupCityOrStateFromPostalOrZipCodeParams as AddressVerificationLookupCityOrStateFromPostalOrZipCodeParams, type AddressVerificationLookupZipCodeFromCityOrStateParams as AddressVerificationLookupZipCodeFromCityOrStateParams, type AddressVerificationParseAnAddressParams as AddressVerificationParseAnAddressParams, type AddressVerificationSuggestAddressesParams as AddressVerificationSuggestAddressesParams, type AddressVerificationVerifyParams as AddressVerificationVerifyParams, };
424
2098
  }
425
2099
  //# sourceMappingURL=address-verification.d.ts.map