postgrid-node 0.4.2 → 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 +93 -0
  2. package/LICENSE +1 -1
  3. package/README.md +15 -12
  4. package/client.d.mts +35 -15
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +35 -15
  7. package/client.d.ts.map +1 -1
  8. package/client.js +61 -15
  9. package/client.js.map +1 -1
  10. package/client.mjs +62 -16
  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 +9 -3
  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 +733 -59
  70. package/resources/print-mail/boxes.d.mts.map +1 -1
  71. package/resources/print-mail/boxes.d.ts +733 -59
  72. package/resources/print-mail/boxes.d.ts.map +1 -1
  73. package/resources/print-mail/boxes.js +19 -1
  74. package/resources/print-mail/boxes.js.map +1 -1
  75. package/resources/print-mail/boxes.mjs +19 -1
  76. package/resources/print-mail/boxes.mjs.map +1 -1
  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 +60 -11
  86. package/resources/print-mail/cheques.d.mts.map +1 -1
  87. package/resources/print-mail/cheques.d.ts +60 -11
  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 -8
  100. package/resources/print-mail/index.d.mts.map +1 -1
  101. package/resources/print-mail/index.d.ts +12 -8
  102. package/resources/print-mail/index.d.ts.map +1 -1
  103. package/resources/print-mail/index.js +13 -5
  104. package/resources/print-mail/index.js.map +1 -1
  105. package/resources/print-mail/index.mjs +5 -1
  106. package/resources/print-mail/index.mjs.map +1 -1
  107. package/resources/print-mail/letters.d.mts +62 -13
  108. package/resources/print-mail/letters.d.mts.map +1 -1
  109. package/resources/print-mail/letters.d.ts +62 -13
  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 +90 -21
  132. package/resources/print-mail/postcards.d.mts.map +1 -1
  133. package/resources/print-mail/postcards.d.ts +90 -21
  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 +41 -162
  140. package/resources/print-mail/print-mail.d.mts.map +1 -1
  141. package/resources/print-mail/print-mail.d.ts +41 -162
  142. package/resources/print-mail/print-mail.d.ts.map +1 -1
  143. package/resources/print-mail/print-mail.js +34 -18
  144. package/resources/print-mail/print-mail.js.map +1 -1
  145. package/resources/print-mail/print-mail.mjs +34 -18
  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 +52 -20
  172. package/resources/print-mail/self-mailers.d.mts.map +1 -1
  173. package/resources/print-mail/self-mailers.d.ts +52 -20
  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 +123 -33
  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 +1011 -99
  286. package/src/resources/print-mail/campaigns.ts +1449 -59
  287. package/src/resources/print-mail/cheques.ts +122 -10
  288. package/src/resources/print-mail/contacts.ts +167 -4
  289. package/src/resources/print-mail/index.ts +74 -11
  290. package/src/resources/print-mail/letters.ts +150 -12
  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 +208 -20
  294. package/src/resources/print-mail/print-mail.ts +239 -261
  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 +162 -20
  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 -388
  357. package/resources/print-mail/order-profiles/cheques.d.mts.map +0 -1
  358. package/resources/print-mail/order-profiles/cheques.d.ts +0 -388
  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 -325
  373. package/resources/print-mail/order-profiles/letters.d.mts.map +0 -1
  374. package/resources/print-mail/order-profiles/letters.d.ts +0 -325
  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 -255
  389. package/resources/print-mail/order-profiles/postcards.d.mts.map +0 -1
  390. package/resources/print-mail/order-profiles/postcards.d.ts +0 -255
  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 -260
  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 -260
  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 -486
  418. package/src/resources/print-mail/order-profiles/index.ts +0 -47
  419. package/src/resources/print-mail/order-profiles/letters.ts +0 -412
  420. package/src/resources/print-mail/order-profiles/order-profiles.ts +0 -113
  421. package/src/resources/print-mail/order-profiles/postcards.ts +0 -327
  422. package/src/resources/print-mail/order-profiles/self-mailers.ts +0 -338
@@ -0,0 +1,2158 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../../core/resource';
4
+ import * as FiltersAPI from './filters';
5
+ import { FilterAutocompleteParams, FilterAutocompleteResponse, Filters } from './filters';
6
+ import { APIPromise } from '../../../core/api-promise';
7
+ import { PagePromise, SkipLimit, type SkipLimitParams } from '../../../core/pagination';
8
+ import { buildHeaders } from '../../../internal/headers';
9
+ import { RequestOptions } from '../../../internal/request-options';
10
+ import { path } from '../../../internal/utils/path';
11
+
12
+ /**
13
+ * **Beta:** the targeted list builds API is in beta and is subject to
14
+ * breaking changes. Endpoint shapes, status values, and filter fields may
15
+ * change without notice.
16
+ *
17
+ * The targeted list builds API lets you programmatically build mailing
18
+ * lists of US consumers (B2C) or US companies (B2B) that match a set of
19
+ * demographic, geographic, and firmographic filters.
20
+ *
21
+ * The lifecycle of a list build is:
22
+ *
23
+ * 1. Create a list build by supplying either `usConsumers` or `usCompanies`
24
+ * filters. A quote is generated asynchronously — poll the resource or
25
+ * wait for its `status` to become `quote_ready`.
26
+ * 2. Review the `quote` (total count and price per contact) and masked
27
+ * `previewRecords`. Adjust the filters with an update call if needed —
28
+ * this will regenerate the quote.
29
+ * 3. Confirm the build. This deducts the appropriate amount of list build
30
+ * credits from your organization (in live mode) and begins constructing
31
+ * the mailing list. `buildProgressPercent` reflects progress from 0 to
32
+ * 100.
33
+ * 4. Once `status` is `completed`, the ID of the resulting mailing list is
34
+ * available in the `mailingList` field and can be used like any other
35
+ * mailing list in the PostGrid API.
36
+ *
37
+ * Targeted list builds must be enabled on your organization before they
38
+ * can be used. Contact PostGrid support to request access.
39
+ */
40
+ export class TargetedListBuilds extends APIResource {
41
+ filters: FiltersAPI.Filters = new FiltersAPI.Filters(this._client);
42
+
43
+ /**
44
+ * Create a new targeted list build. A quote will be generated asynchronously based
45
+ * on the provided filters.
46
+ *
47
+ * @example
48
+ * ```ts
49
+ * const targetedListBuild =
50
+ * await client.printMail.targetedListBuilds.create({
51
+ * description: 'Q1 prospecting list',
52
+ * limit: 1000,
53
+ * metadata: { campaign: 'q1_prospecting' },
54
+ * usCompanies: {
55
+ * postalCodes: ['10001', '10002'],
56
+ * industries: ['software'],
57
+ * employeeCount: [10, 500],
58
+ * },
59
+ * });
60
+ * ```
61
+ */
62
+ create(
63
+ params: TargetedListBuildCreateParams,
64
+ options?: RequestOptions,
65
+ ): APIPromise<TargetedListBuildCreateResponse> {
66
+ const { 'idempotency-key': idempotencyKey, ...body } = params;
67
+ return this._client.post('/print-mail/v1/targeted_list_builds', {
68
+ body,
69
+ ...options,
70
+ headers: buildHeaders([
71
+ { ...(idempotencyKey != null ? { 'idempotency-key': idempotencyKey } : undefined) },
72
+ options?.headers,
73
+ ]),
74
+ });
75
+ }
76
+
77
+ /**
78
+ * Retrieve a specific targeted list build by its ID.
79
+ *
80
+ * @example
81
+ * ```ts
82
+ * const targetedListBuild =
83
+ * await client.printMail.targetedListBuilds.retrieve('id');
84
+ * ```
85
+ */
86
+ retrieve(id: string, options?: RequestOptions): APIPromise<TargetedListBuildRetrieveResponse> {
87
+ return this._client.get(path`/print-mail/v1/targeted_list_builds/${id}`, options);
88
+ }
89
+
90
+ /**
91
+ * Update an existing targeted list build. Only builds that have not yet been
92
+ * confirmed may be updated. Updating the filters or `limit` will reset the build's
93
+ * status back to `generating_quote` and a new quote will be generated.
94
+ *
95
+ * @example
96
+ * ```ts
97
+ * const targetedListBuild =
98
+ * await client.printMail.targetedListBuilds.update('id', {
99
+ * limit: 2000,
100
+ * usCompanies: {
101
+ * postalCodes: ['10001', '10002', '10003'],
102
+ * industries: ['software', 'fintech'],
103
+ * employeeCount: [50, 1000],
104
+ * },
105
+ * });
106
+ * ```
107
+ */
108
+ update(
109
+ id: string,
110
+ body: TargetedListBuildUpdateParams,
111
+ options?: RequestOptions,
112
+ ): APIPromise<TargetedListBuildUpdateResponse> {
113
+ return this._client.post(path`/print-mail/v1/targeted_list_builds/${id}`, { body, ...options });
114
+ }
115
+
116
+ /**
117
+ * Retrieve a paginated list of targeted list builds for the authenticated
118
+ * organization, ordered from most recently updated to least recently updated.
119
+ *
120
+ * @example
121
+ * ```ts
122
+ * // Automatically fetches more pages as needed.
123
+ * for await (const targetedListBuildListResponse of client.printMail.targetedListBuilds.list()) {
124
+ * // ...
125
+ * }
126
+ * ```
127
+ */
128
+ list(
129
+ query: TargetedListBuildListParams | null | undefined = {},
130
+ options?: RequestOptions,
131
+ ): PagePromise<TargetedListBuildListResponsesSkipLimit, TargetedListBuildListResponse> {
132
+ return this._client.getAPIList(
133
+ '/print-mail/v1/targeted_list_builds',
134
+ SkipLimit<TargetedListBuildListResponse>,
135
+ { query, ...options },
136
+ );
137
+ }
138
+
139
+ /**
140
+ * Delete a targeted list build. List builds can only be deleted before they have
141
+ * been confirmed — once a build has transitioned to `creating_list` or `completed`
142
+ * it cannot be deleted.
143
+ *
144
+ * @example
145
+ * ```ts
146
+ * const targetedListBuild =
147
+ * await client.printMail.targetedListBuilds.delete('id');
148
+ * ```
149
+ */
150
+ delete(id: string, options?: RequestOptions): APIPromise<TargetedListBuildDeleteResponse> {
151
+ return this._client.delete(path`/print-mail/v1/targeted_list_builds/${id}`, options);
152
+ }
153
+
154
+ /**
155
+ * Confirm a targeted list build whose quote is ready. This deducts the appropriate
156
+ * amount of list build credits from the organization (in live mode) and kicks off
157
+ * the asynchronous creation of the underlying mailing list.
158
+ *
159
+ * @example
160
+ * ```ts
161
+ * const response =
162
+ * await client.printMail.targetedListBuilds.confirm('id');
163
+ * ```
164
+ */
165
+ confirm(id: string, options?: RequestOptions): APIPromise<TargetedListBuildConfirmResponse> {
166
+ return this._client.post(path`/print-mail/v1/targeted_list_builds/${id}/confirm`, options);
167
+ }
168
+ }
169
+
170
+ export type TargetedListBuildListResponsesSkipLimit = SkipLimit<TargetedListBuildListResponse>;
171
+
172
+ /**
173
+ * A targeted list build represents a request to build a new mailing list by
174
+ * targeting US consumers or companies matching the provided filters. Once created,
175
+ * a quote is generated asynchronously. After reviewing the quote and preview
176
+ * records, you may confirm the build, which kicks off the creation of the
177
+ * underlying mailing list.
178
+ */
179
+ export interface TargetedListBuildCreateResponse {
180
+ /**
181
+ * A unique ID prefixed with targeted*list_build*
182
+ */
183
+ id: string;
184
+
185
+ /**
186
+ * The UTC time at which this resource was created.
187
+ */
188
+ createdAt: string;
189
+
190
+ /**
191
+ * `true` if this is a live mode resource else `false`.
192
+ */
193
+ live: boolean;
194
+
195
+ /**
196
+ * The ID of the organization that owns this list build.
197
+ */
198
+ organization: string;
199
+
200
+ /**
201
+ * Status of a targeted list build.
202
+ */
203
+ status: 'generating_quote' | 'quote_ready' | 'creating_list' | 'completed' | 'failed';
204
+
205
+ /**
206
+ * The UTC time at which this resource was last updated.
207
+ */
208
+ updatedAt: string;
209
+
210
+ /**
211
+ * A percentage from 0 to 100 representing how much of the build has completed.
212
+ * Only populated while `status` is `creating_list`.
213
+ */
214
+ buildProgressPercent?: number;
215
+
216
+ /**
217
+ * The UTC time at which the build finished successfully. Only present once
218
+ * `status` is `completed`.
219
+ */
220
+ completedAt?: string;
221
+
222
+ /**
223
+ * The UTC time at which the build was confirmed, if any.
224
+ */
225
+ confirmedAt?: string;
226
+
227
+ /**
228
+ * An optional string describing this resource. Will be visible in the API and the
229
+ * dashboard.
230
+ */
231
+ description?: string;
232
+
233
+ /**
234
+ * Any errors encountered while generating a quote or building the list.
235
+ */
236
+ errors?: Array<TargetedListBuildCreateResponse.Error>;
237
+
238
+ /**
239
+ * Maximum number of contacts to include in the built mailing list. If omitted, all
240
+ * matching contacts are included.
241
+ */
242
+ limit?: number;
243
+
244
+ /**
245
+ * The ID of the mailing list that was built. Present once `status` is `completed`.
246
+ */
247
+ mailingList?: string;
248
+
249
+ /**
250
+ * See the section on Metadata.
251
+ */
252
+ metadata?: { [key: string]: unknown };
253
+
254
+ /**
255
+ * A small number of masked sample records for the configured filters, populated
256
+ * alongside `quote`.
257
+ */
258
+ previewRecords?: Array<TargetedListBuildCreateResponse.PreviewRecord>;
259
+
260
+ /**
261
+ * Details of the quote generated for a targeted list build.
262
+ */
263
+ quote?: TargetedListBuildCreateResponse.Quote;
264
+
265
+ /**
266
+ * Filters used to target US companies (B2B) when building a list.
267
+ */
268
+ usCompanies?: TargetedListBuildCreateResponse.UsCompanies;
269
+
270
+ /**
271
+ * Filters used to target US consumers (B2C) when building a list.
272
+ *
273
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
274
+ * exclusive — you may supply at most one of them.
275
+ */
276
+ usConsumers?: TargetedListBuildCreateResponse.UsConsumers;
277
+ }
278
+
279
+ export namespace TargetedListBuildCreateResponse {
280
+ /**
281
+ * Details of an error encountered while processing a targeted list build.
282
+ */
283
+ export interface Error {
284
+ /**
285
+ * A human-readable message describing the error.
286
+ */
287
+ message: string;
288
+
289
+ /**
290
+ * Type of error encountered while generating a quote or building the list.
291
+ */
292
+ type: 'not_enough_info_to_quote' | 'insufficient_credits' | 'internal_service_error';
293
+ }
294
+
295
+ /**
296
+ * A single masked preview record returned with a quote so you can sanity check the
297
+ * kind of contacts that will end up in the mailing list before confirming the
298
+ * build.
299
+ */
300
+ export interface PreviewRecord {
301
+ /**
302
+ * The masked, comma-joined formatted address of the contact.
303
+ */
304
+ formattedAddress: string;
305
+
306
+ /**
307
+ * The masked name of the contact or business.
308
+ */
309
+ name: string;
310
+ }
311
+
312
+ /**
313
+ * Details of the quote generated for a targeted list build.
314
+ */
315
+ export interface Quote {
316
+ /**
317
+ * The number of contacts that will be included in the built mailing list. This
318
+ * accounts for any `limit` that was provided.
319
+ */
320
+ count: number;
321
+
322
+ /**
323
+ * The UTC time at which the quote was generated.
324
+ */
325
+ generatedAt: string;
326
+
327
+ /**
328
+ * The price per contact, in cents. Multiply by `count` to get the total cost of
329
+ * building the list.
330
+ */
331
+ pricePerContactCents: number;
332
+ }
333
+
334
+ /**
335
+ * Filters used to target US companies (B2B) when building a list.
336
+ */
337
+ export interface UsCompanies {
338
+ /**
339
+ * Required list of five-digit US ZIP codes to target.
340
+ */
341
+ postalCodes: Array<string>;
342
+
343
+ /**
344
+ * Filter by ownership structure of the company.
345
+ */
346
+ companyTypes?: Array<
347
+ 'public' | 'private' | 'educational' | 'government' | 'nonprofit' | 'public_subsidiary'
348
+ >;
349
+
350
+ /**
351
+ * Inclusive `[min, max]` range for the number of employees at the company. Values
352
+ * must be between 1 and 1,000,000.
353
+ */
354
+ employeeCount?: Array<number>;
355
+
356
+ /**
357
+ * Inclusive `[min, max]` range for the year the company was founded. Values must
358
+ * be between 1600 and 2100.
359
+ */
360
+ foundedYear?: Array<number>;
361
+
362
+ /**
363
+ * Filter by free-form industry names (see the autocomplete endpoint).
364
+ */
365
+ industries?: Array<string>;
366
+
367
+ /**
368
+ * Filter by six-digit [NAICS](https://www.census.gov/naics/) industry codes.
369
+ */
370
+ naicsCodes?: Array<string>;
371
+
372
+ /**
373
+ * Filter by free-form company tags (e.g., `"saas"`, `"b2b"`).
374
+ */
375
+ tags?: Array<string>;
376
+ }
377
+
378
+ /**
379
+ * Filters used to target US consumers (B2C) when building a list.
380
+ *
381
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
382
+ * exclusive — you may supply at most one of them.
383
+ */
384
+ export interface UsConsumers {
385
+ /**
386
+ * Inclusive `[min, max]` age range. Values must be between 18 and 80.
387
+ */
388
+ ageRange?: Array<number>;
389
+
390
+ /**
391
+ * A list of `"City, ST"` strings (e.g. `"New York, NY"`) to target.
392
+ */
393
+ cityStates?: Array<string>;
394
+
395
+ /**
396
+ * Filter by highest level of education completed.
397
+ */
398
+ educationLevels?: Array<'high_school' | 'college' | 'grad_school' | 'vocational_training'>;
399
+
400
+ /**
401
+ * Gender filter for US consumer list builds.
402
+ */
403
+ gender?: 'male' | 'female';
404
+
405
+ /**
406
+ * Inclusive `[min, max]` home value range, in US dollars. Values must be between 0
407
+ * and 1,000,000.
408
+ */
409
+ homeValueRange?: Array<number>;
410
+
411
+ /**
412
+ * Inclusive `[min, max]` annual household income range, in US dollars. Values must
413
+ * be between 0 and 200,000.
414
+ */
415
+ incomeRange?: Array<number>;
416
+
417
+ /**
418
+ * Inclusive `[min, max]` number of children in the household. Values must be
419
+ * between 0 and 8.
420
+ */
421
+ numChildrenRange?: Array<number>;
422
+
423
+ /**
424
+ * Filter by occupation classification.
425
+ */
426
+ occupations?: Array<
427
+ | 'professional_technical'
428
+ | 'administration_management'
429
+ | 'sales_service'
430
+ | 'clerical_white_collar'
431
+ | 'craftsmen_blue_collar'
432
+ | 'student'
433
+ | 'homemaker'
434
+ | 'retired'
435
+ | 'farmer'
436
+ | 'military'
437
+ | 'religious'
438
+ | 'self_employed'
439
+ | 'self_employed_professional_technical'
440
+ | 'self_employed_administration_management'
441
+ | 'self_employed_sales_service'
442
+ | 'self_employed_clerical_white_collar'
443
+ | 'self_employed_craftsmen_blue_collar'
444
+ | 'self_employed_student'
445
+ | 'self_employed_homemaker'
446
+ | 'self_employed_retired'
447
+ | 'self_employed_other'
448
+ | 'educator'
449
+ | 'financial_professional'
450
+ | 'legal_professional'
451
+ | 'medical_professional'
452
+ | 'other'
453
+ >;
454
+
455
+ /**
456
+ * A list of five-digit US ZIP codes to target.
457
+ */
458
+ zipCodes?: Array<string>;
459
+
460
+ /**
461
+ * A geographic filter that selects all ZIP codes within a given radius of a center
462
+ * ZIP code.
463
+ */
464
+ zipCodesAround?: UsConsumers.ZipCodesAround;
465
+ }
466
+
467
+ export namespace UsConsumers {
468
+ /**
469
+ * A geographic filter that selects all ZIP codes within a given radius of a center
470
+ * ZIP code.
471
+ */
472
+ export interface ZipCodesAround {
473
+ /**
474
+ * The radius in miles around `zipCode` to include. Between 0.1 and 100.
475
+ */
476
+ radiusInMiles: number;
477
+
478
+ /**
479
+ * The five-digit ZIP code at the center of the search circle.
480
+ */
481
+ zipCode: string;
482
+ }
483
+ }
484
+ }
485
+
486
+ /**
487
+ * A targeted list build represents a request to build a new mailing list by
488
+ * targeting US consumers or companies matching the provided filters. Once created,
489
+ * a quote is generated asynchronously. After reviewing the quote and preview
490
+ * records, you may confirm the build, which kicks off the creation of the
491
+ * underlying mailing list.
492
+ */
493
+ export interface TargetedListBuildRetrieveResponse {
494
+ /**
495
+ * A unique ID prefixed with targeted*list_build*
496
+ */
497
+ id: string;
498
+
499
+ /**
500
+ * The UTC time at which this resource was created.
501
+ */
502
+ createdAt: string;
503
+
504
+ /**
505
+ * `true` if this is a live mode resource else `false`.
506
+ */
507
+ live: boolean;
508
+
509
+ /**
510
+ * The ID of the organization that owns this list build.
511
+ */
512
+ organization: string;
513
+
514
+ /**
515
+ * Status of a targeted list build.
516
+ */
517
+ status: 'generating_quote' | 'quote_ready' | 'creating_list' | 'completed' | 'failed';
518
+
519
+ /**
520
+ * The UTC time at which this resource was last updated.
521
+ */
522
+ updatedAt: string;
523
+
524
+ /**
525
+ * A percentage from 0 to 100 representing how much of the build has completed.
526
+ * Only populated while `status` is `creating_list`.
527
+ */
528
+ buildProgressPercent?: number;
529
+
530
+ /**
531
+ * The UTC time at which the build finished successfully. Only present once
532
+ * `status` is `completed`.
533
+ */
534
+ completedAt?: string;
535
+
536
+ /**
537
+ * The UTC time at which the build was confirmed, if any.
538
+ */
539
+ confirmedAt?: string;
540
+
541
+ /**
542
+ * An optional string describing this resource. Will be visible in the API and the
543
+ * dashboard.
544
+ */
545
+ description?: string;
546
+
547
+ /**
548
+ * Any errors encountered while generating a quote or building the list.
549
+ */
550
+ errors?: Array<TargetedListBuildRetrieveResponse.Error>;
551
+
552
+ /**
553
+ * Maximum number of contacts to include in the built mailing list. If omitted, all
554
+ * matching contacts are included.
555
+ */
556
+ limit?: number;
557
+
558
+ /**
559
+ * The ID of the mailing list that was built. Present once `status` is `completed`.
560
+ */
561
+ mailingList?: string;
562
+
563
+ /**
564
+ * See the section on Metadata.
565
+ */
566
+ metadata?: { [key: string]: unknown };
567
+
568
+ /**
569
+ * A small number of masked sample records for the configured filters, populated
570
+ * alongside `quote`.
571
+ */
572
+ previewRecords?: Array<TargetedListBuildRetrieveResponse.PreviewRecord>;
573
+
574
+ /**
575
+ * Details of the quote generated for a targeted list build.
576
+ */
577
+ quote?: TargetedListBuildRetrieveResponse.Quote;
578
+
579
+ /**
580
+ * Filters used to target US companies (B2B) when building a list.
581
+ */
582
+ usCompanies?: TargetedListBuildRetrieveResponse.UsCompanies;
583
+
584
+ /**
585
+ * Filters used to target US consumers (B2C) when building a list.
586
+ *
587
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
588
+ * exclusive — you may supply at most one of them.
589
+ */
590
+ usConsumers?: TargetedListBuildRetrieveResponse.UsConsumers;
591
+ }
592
+
593
+ export namespace TargetedListBuildRetrieveResponse {
594
+ /**
595
+ * Details of an error encountered while processing a targeted list build.
596
+ */
597
+ export interface Error {
598
+ /**
599
+ * A human-readable message describing the error.
600
+ */
601
+ message: string;
602
+
603
+ /**
604
+ * Type of error encountered while generating a quote or building the list.
605
+ */
606
+ type: 'not_enough_info_to_quote' | 'insufficient_credits' | 'internal_service_error';
607
+ }
608
+
609
+ /**
610
+ * A single masked preview record returned with a quote so you can sanity check the
611
+ * kind of contacts that will end up in the mailing list before confirming the
612
+ * build.
613
+ */
614
+ export interface PreviewRecord {
615
+ /**
616
+ * The masked, comma-joined formatted address of the contact.
617
+ */
618
+ formattedAddress: string;
619
+
620
+ /**
621
+ * The masked name of the contact or business.
622
+ */
623
+ name: string;
624
+ }
625
+
626
+ /**
627
+ * Details of the quote generated for a targeted list build.
628
+ */
629
+ export interface Quote {
630
+ /**
631
+ * The number of contacts that will be included in the built mailing list. This
632
+ * accounts for any `limit` that was provided.
633
+ */
634
+ count: number;
635
+
636
+ /**
637
+ * The UTC time at which the quote was generated.
638
+ */
639
+ generatedAt: string;
640
+
641
+ /**
642
+ * The price per contact, in cents. Multiply by `count` to get the total cost of
643
+ * building the list.
644
+ */
645
+ pricePerContactCents: number;
646
+ }
647
+
648
+ /**
649
+ * Filters used to target US companies (B2B) when building a list.
650
+ */
651
+ export interface UsCompanies {
652
+ /**
653
+ * Required list of five-digit US ZIP codes to target.
654
+ */
655
+ postalCodes: Array<string>;
656
+
657
+ /**
658
+ * Filter by ownership structure of the company.
659
+ */
660
+ companyTypes?: Array<
661
+ 'public' | 'private' | 'educational' | 'government' | 'nonprofit' | 'public_subsidiary'
662
+ >;
663
+
664
+ /**
665
+ * Inclusive `[min, max]` range for the number of employees at the company. Values
666
+ * must be between 1 and 1,000,000.
667
+ */
668
+ employeeCount?: Array<number>;
669
+
670
+ /**
671
+ * Inclusive `[min, max]` range for the year the company was founded. Values must
672
+ * be between 1600 and 2100.
673
+ */
674
+ foundedYear?: Array<number>;
675
+
676
+ /**
677
+ * Filter by free-form industry names (see the autocomplete endpoint).
678
+ */
679
+ industries?: Array<string>;
680
+
681
+ /**
682
+ * Filter by six-digit [NAICS](https://www.census.gov/naics/) industry codes.
683
+ */
684
+ naicsCodes?: Array<string>;
685
+
686
+ /**
687
+ * Filter by free-form company tags (e.g., `"saas"`, `"b2b"`).
688
+ */
689
+ tags?: Array<string>;
690
+ }
691
+
692
+ /**
693
+ * Filters used to target US consumers (B2C) when building a list.
694
+ *
695
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
696
+ * exclusive — you may supply at most one of them.
697
+ */
698
+ export interface UsConsumers {
699
+ /**
700
+ * Inclusive `[min, max]` age range. Values must be between 18 and 80.
701
+ */
702
+ ageRange?: Array<number>;
703
+
704
+ /**
705
+ * A list of `"City, ST"` strings (e.g. `"New York, NY"`) to target.
706
+ */
707
+ cityStates?: Array<string>;
708
+
709
+ /**
710
+ * Filter by highest level of education completed.
711
+ */
712
+ educationLevels?: Array<'high_school' | 'college' | 'grad_school' | 'vocational_training'>;
713
+
714
+ /**
715
+ * Gender filter for US consumer list builds.
716
+ */
717
+ gender?: 'male' | 'female';
718
+
719
+ /**
720
+ * Inclusive `[min, max]` home value range, in US dollars. Values must be between 0
721
+ * and 1,000,000.
722
+ */
723
+ homeValueRange?: Array<number>;
724
+
725
+ /**
726
+ * Inclusive `[min, max]` annual household income range, in US dollars. Values must
727
+ * be between 0 and 200,000.
728
+ */
729
+ incomeRange?: Array<number>;
730
+
731
+ /**
732
+ * Inclusive `[min, max]` number of children in the household. Values must be
733
+ * between 0 and 8.
734
+ */
735
+ numChildrenRange?: Array<number>;
736
+
737
+ /**
738
+ * Filter by occupation classification.
739
+ */
740
+ occupations?: Array<
741
+ | 'professional_technical'
742
+ | 'administration_management'
743
+ | 'sales_service'
744
+ | 'clerical_white_collar'
745
+ | 'craftsmen_blue_collar'
746
+ | 'student'
747
+ | 'homemaker'
748
+ | 'retired'
749
+ | 'farmer'
750
+ | 'military'
751
+ | 'religious'
752
+ | 'self_employed'
753
+ | 'self_employed_professional_technical'
754
+ | 'self_employed_administration_management'
755
+ | 'self_employed_sales_service'
756
+ | 'self_employed_clerical_white_collar'
757
+ | 'self_employed_craftsmen_blue_collar'
758
+ | 'self_employed_student'
759
+ | 'self_employed_homemaker'
760
+ | 'self_employed_retired'
761
+ | 'self_employed_other'
762
+ | 'educator'
763
+ | 'financial_professional'
764
+ | 'legal_professional'
765
+ | 'medical_professional'
766
+ | 'other'
767
+ >;
768
+
769
+ /**
770
+ * A list of five-digit US ZIP codes to target.
771
+ */
772
+ zipCodes?: Array<string>;
773
+
774
+ /**
775
+ * A geographic filter that selects all ZIP codes within a given radius of a center
776
+ * ZIP code.
777
+ */
778
+ zipCodesAround?: UsConsumers.ZipCodesAround;
779
+ }
780
+
781
+ export namespace UsConsumers {
782
+ /**
783
+ * A geographic filter that selects all ZIP codes within a given radius of a center
784
+ * ZIP code.
785
+ */
786
+ export interface ZipCodesAround {
787
+ /**
788
+ * The radius in miles around `zipCode` to include. Between 0.1 and 100.
789
+ */
790
+ radiusInMiles: number;
791
+
792
+ /**
793
+ * The five-digit ZIP code at the center of the search circle.
794
+ */
795
+ zipCode: string;
796
+ }
797
+ }
798
+ }
799
+
800
+ /**
801
+ * A targeted list build represents a request to build a new mailing list by
802
+ * targeting US consumers or companies matching the provided filters. Once created,
803
+ * a quote is generated asynchronously. After reviewing the quote and preview
804
+ * records, you may confirm the build, which kicks off the creation of the
805
+ * underlying mailing list.
806
+ */
807
+ export interface TargetedListBuildUpdateResponse {
808
+ /**
809
+ * A unique ID prefixed with targeted*list_build*
810
+ */
811
+ id: string;
812
+
813
+ /**
814
+ * The UTC time at which this resource was created.
815
+ */
816
+ createdAt: string;
817
+
818
+ /**
819
+ * `true` if this is a live mode resource else `false`.
820
+ */
821
+ live: boolean;
822
+
823
+ /**
824
+ * The ID of the organization that owns this list build.
825
+ */
826
+ organization: string;
827
+
828
+ /**
829
+ * Status of a targeted list build.
830
+ */
831
+ status: 'generating_quote' | 'quote_ready' | 'creating_list' | 'completed' | 'failed';
832
+
833
+ /**
834
+ * The UTC time at which this resource was last updated.
835
+ */
836
+ updatedAt: string;
837
+
838
+ /**
839
+ * A percentage from 0 to 100 representing how much of the build has completed.
840
+ * Only populated while `status` is `creating_list`.
841
+ */
842
+ buildProgressPercent?: number;
843
+
844
+ /**
845
+ * The UTC time at which the build finished successfully. Only present once
846
+ * `status` is `completed`.
847
+ */
848
+ completedAt?: string;
849
+
850
+ /**
851
+ * The UTC time at which the build was confirmed, if any.
852
+ */
853
+ confirmedAt?: string;
854
+
855
+ /**
856
+ * An optional string describing this resource. Will be visible in the API and the
857
+ * dashboard.
858
+ */
859
+ description?: string;
860
+
861
+ /**
862
+ * Any errors encountered while generating a quote or building the list.
863
+ */
864
+ errors?: Array<TargetedListBuildUpdateResponse.Error>;
865
+
866
+ /**
867
+ * Maximum number of contacts to include in the built mailing list. If omitted, all
868
+ * matching contacts are included.
869
+ */
870
+ limit?: number;
871
+
872
+ /**
873
+ * The ID of the mailing list that was built. Present once `status` is `completed`.
874
+ */
875
+ mailingList?: string;
876
+
877
+ /**
878
+ * See the section on Metadata.
879
+ */
880
+ metadata?: { [key: string]: unknown };
881
+
882
+ /**
883
+ * A small number of masked sample records for the configured filters, populated
884
+ * alongside `quote`.
885
+ */
886
+ previewRecords?: Array<TargetedListBuildUpdateResponse.PreviewRecord>;
887
+
888
+ /**
889
+ * Details of the quote generated for a targeted list build.
890
+ */
891
+ quote?: TargetedListBuildUpdateResponse.Quote;
892
+
893
+ /**
894
+ * Filters used to target US companies (B2B) when building a list.
895
+ */
896
+ usCompanies?: TargetedListBuildUpdateResponse.UsCompanies;
897
+
898
+ /**
899
+ * Filters used to target US consumers (B2C) when building a list.
900
+ *
901
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
902
+ * exclusive — you may supply at most one of them.
903
+ */
904
+ usConsumers?: TargetedListBuildUpdateResponse.UsConsumers;
905
+ }
906
+
907
+ export namespace TargetedListBuildUpdateResponse {
908
+ /**
909
+ * Details of an error encountered while processing a targeted list build.
910
+ */
911
+ export interface Error {
912
+ /**
913
+ * A human-readable message describing the error.
914
+ */
915
+ message: string;
916
+
917
+ /**
918
+ * Type of error encountered while generating a quote or building the list.
919
+ */
920
+ type: 'not_enough_info_to_quote' | 'insufficient_credits' | 'internal_service_error';
921
+ }
922
+
923
+ /**
924
+ * A single masked preview record returned with a quote so you can sanity check the
925
+ * kind of contacts that will end up in the mailing list before confirming the
926
+ * build.
927
+ */
928
+ export interface PreviewRecord {
929
+ /**
930
+ * The masked, comma-joined formatted address of the contact.
931
+ */
932
+ formattedAddress: string;
933
+
934
+ /**
935
+ * The masked name of the contact or business.
936
+ */
937
+ name: string;
938
+ }
939
+
940
+ /**
941
+ * Details of the quote generated for a targeted list build.
942
+ */
943
+ export interface Quote {
944
+ /**
945
+ * The number of contacts that will be included in the built mailing list. This
946
+ * accounts for any `limit` that was provided.
947
+ */
948
+ count: number;
949
+
950
+ /**
951
+ * The UTC time at which the quote was generated.
952
+ */
953
+ generatedAt: string;
954
+
955
+ /**
956
+ * The price per contact, in cents. Multiply by `count` to get the total cost of
957
+ * building the list.
958
+ */
959
+ pricePerContactCents: number;
960
+ }
961
+
962
+ /**
963
+ * Filters used to target US companies (B2B) when building a list.
964
+ */
965
+ export interface UsCompanies {
966
+ /**
967
+ * Required list of five-digit US ZIP codes to target.
968
+ */
969
+ postalCodes: Array<string>;
970
+
971
+ /**
972
+ * Filter by ownership structure of the company.
973
+ */
974
+ companyTypes?: Array<
975
+ 'public' | 'private' | 'educational' | 'government' | 'nonprofit' | 'public_subsidiary'
976
+ >;
977
+
978
+ /**
979
+ * Inclusive `[min, max]` range for the number of employees at the company. Values
980
+ * must be between 1 and 1,000,000.
981
+ */
982
+ employeeCount?: Array<number>;
983
+
984
+ /**
985
+ * Inclusive `[min, max]` range for the year the company was founded. Values must
986
+ * be between 1600 and 2100.
987
+ */
988
+ foundedYear?: Array<number>;
989
+
990
+ /**
991
+ * Filter by free-form industry names (see the autocomplete endpoint).
992
+ */
993
+ industries?: Array<string>;
994
+
995
+ /**
996
+ * Filter by six-digit [NAICS](https://www.census.gov/naics/) industry codes.
997
+ */
998
+ naicsCodes?: Array<string>;
999
+
1000
+ /**
1001
+ * Filter by free-form company tags (e.g., `"saas"`, `"b2b"`).
1002
+ */
1003
+ tags?: Array<string>;
1004
+ }
1005
+
1006
+ /**
1007
+ * Filters used to target US consumers (B2C) when building a list.
1008
+ *
1009
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
1010
+ * exclusive — you may supply at most one of them.
1011
+ */
1012
+ export interface UsConsumers {
1013
+ /**
1014
+ * Inclusive `[min, max]` age range. Values must be between 18 and 80.
1015
+ */
1016
+ ageRange?: Array<number>;
1017
+
1018
+ /**
1019
+ * A list of `"City, ST"` strings (e.g. `"New York, NY"`) to target.
1020
+ */
1021
+ cityStates?: Array<string>;
1022
+
1023
+ /**
1024
+ * Filter by highest level of education completed.
1025
+ */
1026
+ educationLevels?: Array<'high_school' | 'college' | 'grad_school' | 'vocational_training'>;
1027
+
1028
+ /**
1029
+ * Gender filter for US consumer list builds.
1030
+ */
1031
+ gender?: 'male' | 'female';
1032
+
1033
+ /**
1034
+ * Inclusive `[min, max]` home value range, in US dollars. Values must be between 0
1035
+ * and 1,000,000.
1036
+ */
1037
+ homeValueRange?: Array<number>;
1038
+
1039
+ /**
1040
+ * Inclusive `[min, max]` annual household income range, in US dollars. Values must
1041
+ * be between 0 and 200,000.
1042
+ */
1043
+ incomeRange?: Array<number>;
1044
+
1045
+ /**
1046
+ * Inclusive `[min, max]` number of children in the household. Values must be
1047
+ * between 0 and 8.
1048
+ */
1049
+ numChildrenRange?: Array<number>;
1050
+
1051
+ /**
1052
+ * Filter by occupation classification.
1053
+ */
1054
+ occupations?: Array<
1055
+ | 'professional_technical'
1056
+ | 'administration_management'
1057
+ | 'sales_service'
1058
+ | 'clerical_white_collar'
1059
+ | 'craftsmen_blue_collar'
1060
+ | 'student'
1061
+ | 'homemaker'
1062
+ | 'retired'
1063
+ | 'farmer'
1064
+ | 'military'
1065
+ | 'religious'
1066
+ | 'self_employed'
1067
+ | 'self_employed_professional_technical'
1068
+ | 'self_employed_administration_management'
1069
+ | 'self_employed_sales_service'
1070
+ | 'self_employed_clerical_white_collar'
1071
+ | 'self_employed_craftsmen_blue_collar'
1072
+ | 'self_employed_student'
1073
+ | 'self_employed_homemaker'
1074
+ | 'self_employed_retired'
1075
+ | 'self_employed_other'
1076
+ | 'educator'
1077
+ | 'financial_professional'
1078
+ | 'legal_professional'
1079
+ | 'medical_professional'
1080
+ | 'other'
1081
+ >;
1082
+
1083
+ /**
1084
+ * A list of five-digit US ZIP codes to target.
1085
+ */
1086
+ zipCodes?: Array<string>;
1087
+
1088
+ /**
1089
+ * A geographic filter that selects all ZIP codes within a given radius of a center
1090
+ * ZIP code.
1091
+ */
1092
+ zipCodesAround?: UsConsumers.ZipCodesAround;
1093
+ }
1094
+
1095
+ export namespace UsConsumers {
1096
+ /**
1097
+ * A geographic filter that selects all ZIP codes within a given radius of a center
1098
+ * ZIP code.
1099
+ */
1100
+ export interface ZipCodesAround {
1101
+ /**
1102
+ * The radius in miles around `zipCode` to include. Between 0.1 and 100.
1103
+ */
1104
+ radiusInMiles: number;
1105
+
1106
+ /**
1107
+ * The five-digit ZIP code at the center of the search circle.
1108
+ */
1109
+ zipCode: string;
1110
+ }
1111
+ }
1112
+ }
1113
+
1114
+ /**
1115
+ * A targeted list build represents a request to build a new mailing list by
1116
+ * targeting US consumers or companies matching the provided filters. Once created,
1117
+ * a quote is generated asynchronously. After reviewing the quote and preview
1118
+ * records, you may confirm the build, which kicks off the creation of the
1119
+ * underlying mailing list.
1120
+ */
1121
+ export interface TargetedListBuildListResponse {
1122
+ /**
1123
+ * A unique ID prefixed with targeted*list_build*
1124
+ */
1125
+ id: string;
1126
+
1127
+ /**
1128
+ * The UTC time at which this resource was created.
1129
+ */
1130
+ createdAt: string;
1131
+
1132
+ /**
1133
+ * `true` if this is a live mode resource else `false`.
1134
+ */
1135
+ live: boolean;
1136
+
1137
+ /**
1138
+ * The ID of the organization that owns this list build.
1139
+ */
1140
+ organization: string;
1141
+
1142
+ /**
1143
+ * Status of a targeted list build.
1144
+ */
1145
+ status: 'generating_quote' | 'quote_ready' | 'creating_list' | 'completed' | 'failed';
1146
+
1147
+ /**
1148
+ * The UTC time at which this resource was last updated.
1149
+ */
1150
+ updatedAt: string;
1151
+
1152
+ /**
1153
+ * A percentage from 0 to 100 representing how much of the build has completed.
1154
+ * Only populated while `status` is `creating_list`.
1155
+ */
1156
+ buildProgressPercent?: number;
1157
+
1158
+ /**
1159
+ * The UTC time at which the build finished successfully. Only present once
1160
+ * `status` is `completed`.
1161
+ */
1162
+ completedAt?: string;
1163
+
1164
+ /**
1165
+ * The UTC time at which the build was confirmed, if any.
1166
+ */
1167
+ confirmedAt?: string;
1168
+
1169
+ /**
1170
+ * An optional string describing this resource. Will be visible in the API and the
1171
+ * dashboard.
1172
+ */
1173
+ description?: string;
1174
+
1175
+ /**
1176
+ * Any errors encountered while generating a quote or building the list.
1177
+ */
1178
+ errors?: Array<TargetedListBuildListResponse.Error>;
1179
+
1180
+ /**
1181
+ * Maximum number of contacts to include in the built mailing list. If omitted, all
1182
+ * matching contacts are included.
1183
+ */
1184
+ limit?: number;
1185
+
1186
+ /**
1187
+ * The ID of the mailing list that was built. Present once `status` is `completed`.
1188
+ */
1189
+ mailingList?: string;
1190
+
1191
+ /**
1192
+ * See the section on Metadata.
1193
+ */
1194
+ metadata?: { [key: string]: unknown };
1195
+
1196
+ /**
1197
+ * A small number of masked sample records for the configured filters, populated
1198
+ * alongside `quote`.
1199
+ */
1200
+ previewRecords?: Array<TargetedListBuildListResponse.PreviewRecord>;
1201
+
1202
+ /**
1203
+ * Details of the quote generated for a targeted list build.
1204
+ */
1205
+ quote?: TargetedListBuildListResponse.Quote;
1206
+
1207
+ /**
1208
+ * Filters used to target US companies (B2B) when building a list.
1209
+ */
1210
+ usCompanies?: TargetedListBuildListResponse.UsCompanies;
1211
+
1212
+ /**
1213
+ * Filters used to target US consumers (B2C) when building a list.
1214
+ *
1215
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
1216
+ * exclusive — you may supply at most one of them.
1217
+ */
1218
+ usConsumers?: TargetedListBuildListResponse.UsConsumers;
1219
+ }
1220
+
1221
+ export namespace TargetedListBuildListResponse {
1222
+ /**
1223
+ * Details of an error encountered while processing a targeted list build.
1224
+ */
1225
+ export interface Error {
1226
+ /**
1227
+ * A human-readable message describing the error.
1228
+ */
1229
+ message: string;
1230
+
1231
+ /**
1232
+ * Type of error encountered while generating a quote or building the list.
1233
+ */
1234
+ type: 'not_enough_info_to_quote' | 'insufficient_credits' | 'internal_service_error';
1235
+ }
1236
+
1237
+ /**
1238
+ * A single masked preview record returned with a quote so you can sanity check the
1239
+ * kind of contacts that will end up in the mailing list before confirming the
1240
+ * build.
1241
+ */
1242
+ export interface PreviewRecord {
1243
+ /**
1244
+ * The masked, comma-joined formatted address of the contact.
1245
+ */
1246
+ formattedAddress: string;
1247
+
1248
+ /**
1249
+ * The masked name of the contact or business.
1250
+ */
1251
+ name: string;
1252
+ }
1253
+
1254
+ /**
1255
+ * Details of the quote generated for a targeted list build.
1256
+ */
1257
+ export interface Quote {
1258
+ /**
1259
+ * The number of contacts that will be included in the built mailing list. This
1260
+ * accounts for any `limit` that was provided.
1261
+ */
1262
+ count: number;
1263
+
1264
+ /**
1265
+ * The UTC time at which the quote was generated.
1266
+ */
1267
+ generatedAt: string;
1268
+
1269
+ /**
1270
+ * The price per contact, in cents. Multiply by `count` to get the total cost of
1271
+ * building the list.
1272
+ */
1273
+ pricePerContactCents: number;
1274
+ }
1275
+
1276
+ /**
1277
+ * Filters used to target US companies (B2B) when building a list.
1278
+ */
1279
+ export interface UsCompanies {
1280
+ /**
1281
+ * Required list of five-digit US ZIP codes to target.
1282
+ */
1283
+ postalCodes: Array<string>;
1284
+
1285
+ /**
1286
+ * Filter by ownership structure of the company.
1287
+ */
1288
+ companyTypes?: Array<
1289
+ 'public' | 'private' | 'educational' | 'government' | 'nonprofit' | 'public_subsidiary'
1290
+ >;
1291
+
1292
+ /**
1293
+ * Inclusive `[min, max]` range for the number of employees at the company. Values
1294
+ * must be between 1 and 1,000,000.
1295
+ */
1296
+ employeeCount?: Array<number>;
1297
+
1298
+ /**
1299
+ * Inclusive `[min, max]` range for the year the company was founded. Values must
1300
+ * be between 1600 and 2100.
1301
+ */
1302
+ foundedYear?: Array<number>;
1303
+
1304
+ /**
1305
+ * Filter by free-form industry names (see the autocomplete endpoint).
1306
+ */
1307
+ industries?: Array<string>;
1308
+
1309
+ /**
1310
+ * Filter by six-digit [NAICS](https://www.census.gov/naics/) industry codes.
1311
+ */
1312
+ naicsCodes?: Array<string>;
1313
+
1314
+ /**
1315
+ * Filter by free-form company tags (e.g., `"saas"`, `"b2b"`).
1316
+ */
1317
+ tags?: Array<string>;
1318
+ }
1319
+
1320
+ /**
1321
+ * Filters used to target US consumers (B2C) when building a list.
1322
+ *
1323
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
1324
+ * exclusive — you may supply at most one of them.
1325
+ */
1326
+ export interface UsConsumers {
1327
+ /**
1328
+ * Inclusive `[min, max]` age range. Values must be between 18 and 80.
1329
+ */
1330
+ ageRange?: Array<number>;
1331
+
1332
+ /**
1333
+ * A list of `"City, ST"` strings (e.g. `"New York, NY"`) to target.
1334
+ */
1335
+ cityStates?: Array<string>;
1336
+
1337
+ /**
1338
+ * Filter by highest level of education completed.
1339
+ */
1340
+ educationLevels?: Array<'high_school' | 'college' | 'grad_school' | 'vocational_training'>;
1341
+
1342
+ /**
1343
+ * Gender filter for US consumer list builds.
1344
+ */
1345
+ gender?: 'male' | 'female';
1346
+
1347
+ /**
1348
+ * Inclusive `[min, max]` home value range, in US dollars. Values must be between 0
1349
+ * and 1,000,000.
1350
+ */
1351
+ homeValueRange?: Array<number>;
1352
+
1353
+ /**
1354
+ * Inclusive `[min, max]` annual household income range, in US dollars. Values must
1355
+ * be between 0 and 200,000.
1356
+ */
1357
+ incomeRange?: Array<number>;
1358
+
1359
+ /**
1360
+ * Inclusive `[min, max]` number of children in the household. Values must be
1361
+ * between 0 and 8.
1362
+ */
1363
+ numChildrenRange?: Array<number>;
1364
+
1365
+ /**
1366
+ * Filter by occupation classification.
1367
+ */
1368
+ occupations?: Array<
1369
+ | 'professional_technical'
1370
+ | 'administration_management'
1371
+ | 'sales_service'
1372
+ | 'clerical_white_collar'
1373
+ | 'craftsmen_blue_collar'
1374
+ | 'student'
1375
+ | 'homemaker'
1376
+ | 'retired'
1377
+ | 'farmer'
1378
+ | 'military'
1379
+ | 'religious'
1380
+ | 'self_employed'
1381
+ | 'self_employed_professional_technical'
1382
+ | 'self_employed_administration_management'
1383
+ | 'self_employed_sales_service'
1384
+ | 'self_employed_clerical_white_collar'
1385
+ | 'self_employed_craftsmen_blue_collar'
1386
+ | 'self_employed_student'
1387
+ | 'self_employed_homemaker'
1388
+ | 'self_employed_retired'
1389
+ | 'self_employed_other'
1390
+ | 'educator'
1391
+ | 'financial_professional'
1392
+ | 'legal_professional'
1393
+ | 'medical_professional'
1394
+ | 'other'
1395
+ >;
1396
+
1397
+ /**
1398
+ * A list of five-digit US ZIP codes to target.
1399
+ */
1400
+ zipCodes?: Array<string>;
1401
+
1402
+ /**
1403
+ * A geographic filter that selects all ZIP codes within a given radius of a center
1404
+ * ZIP code.
1405
+ */
1406
+ zipCodesAround?: UsConsumers.ZipCodesAround;
1407
+ }
1408
+
1409
+ export namespace UsConsumers {
1410
+ /**
1411
+ * A geographic filter that selects all ZIP codes within a given radius of a center
1412
+ * ZIP code.
1413
+ */
1414
+ export interface ZipCodesAround {
1415
+ /**
1416
+ * The radius in miles around `zipCode` to include. Between 0.1 and 100.
1417
+ */
1418
+ radiusInMiles: number;
1419
+
1420
+ /**
1421
+ * The five-digit ZIP code at the center of the search circle.
1422
+ */
1423
+ zipCode: string;
1424
+ }
1425
+ }
1426
+ }
1427
+
1428
+ export interface TargetedListBuildDeleteResponse {
1429
+ /**
1430
+ * A unique ID prefixed with targeted*list_build*
1431
+ */
1432
+ id: string;
1433
+
1434
+ deleted: true;
1435
+ }
1436
+
1437
+ /**
1438
+ * A targeted list build represents a request to build a new mailing list by
1439
+ * targeting US consumers or companies matching the provided filters. Once created,
1440
+ * a quote is generated asynchronously. After reviewing the quote and preview
1441
+ * records, you may confirm the build, which kicks off the creation of the
1442
+ * underlying mailing list.
1443
+ */
1444
+ export interface TargetedListBuildConfirmResponse {
1445
+ /**
1446
+ * A unique ID prefixed with targeted*list_build*
1447
+ */
1448
+ id: string;
1449
+
1450
+ /**
1451
+ * The UTC time at which this resource was created.
1452
+ */
1453
+ createdAt: string;
1454
+
1455
+ /**
1456
+ * `true` if this is a live mode resource else `false`.
1457
+ */
1458
+ live: boolean;
1459
+
1460
+ /**
1461
+ * The ID of the organization that owns this list build.
1462
+ */
1463
+ organization: string;
1464
+
1465
+ /**
1466
+ * Status of a targeted list build.
1467
+ */
1468
+ status: 'generating_quote' | 'quote_ready' | 'creating_list' | 'completed' | 'failed';
1469
+
1470
+ /**
1471
+ * The UTC time at which this resource was last updated.
1472
+ */
1473
+ updatedAt: string;
1474
+
1475
+ /**
1476
+ * A percentage from 0 to 100 representing how much of the build has completed.
1477
+ * Only populated while `status` is `creating_list`.
1478
+ */
1479
+ buildProgressPercent?: number;
1480
+
1481
+ /**
1482
+ * The UTC time at which the build finished successfully. Only present once
1483
+ * `status` is `completed`.
1484
+ */
1485
+ completedAt?: string;
1486
+
1487
+ /**
1488
+ * The UTC time at which the build was confirmed, if any.
1489
+ */
1490
+ confirmedAt?: string;
1491
+
1492
+ /**
1493
+ * An optional string describing this resource. Will be visible in the API and the
1494
+ * dashboard.
1495
+ */
1496
+ description?: string;
1497
+
1498
+ /**
1499
+ * Any errors encountered while generating a quote or building the list.
1500
+ */
1501
+ errors?: Array<TargetedListBuildConfirmResponse.Error>;
1502
+
1503
+ /**
1504
+ * Maximum number of contacts to include in the built mailing list. If omitted, all
1505
+ * matching contacts are included.
1506
+ */
1507
+ limit?: number;
1508
+
1509
+ /**
1510
+ * The ID of the mailing list that was built. Present once `status` is `completed`.
1511
+ */
1512
+ mailingList?: string;
1513
+
1514
+ /**
1515
+ * See the section on Metadata.
1516
+ */
1517
+ metadata?: { [key: string]: unknown };
1518
+
1519
+ /**
1520
+ * A small number of masked sample records for the configured filters, populated
1521
+ * alongside `quote`.
1522
+ */
1523
+ previewRecords?: Array<TargetedListBuildConfirmResponse.PreviewRecord>;
1524
+
1525
+ /**
1526
+ * Details of the quote generated for a targeted list build.
1527
+ */
1528
+ quote?: TargetedListBuildConfirmResponse.Quote;
1529
+
1530
+ /**
1531
+ * Filters used to target US companies (B2B) when building a list.
1532
+ */
1533
+ usCompanies?: TargetedListBuildConfirmResponse.UsCompanies;
1534
+
1535
+ /**
1536
+ * Filters used to target US consumers (B2C) when building a list.
1537
+ *
1538
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
1539
+ * exclusive — you may supply at most one of them.
1540
+ */
1541
+ usConsumers?: TargetedListBuildConfirmResponse.UsConsumers;
1542
+ }
1543
+
1544
+ export namespace TargetedListBuildConfirmResponse {
1545
+ /**
1546
+ * Details of an error encountered while processing a targeted list build.
1547
+ */
1548
+ export interface Error {
1549
+ /**
1550
+ * A human-readable message describing the error.
1551
+ */
1552
+ message: string;
1553
+
1554
+ /**
1555
+ * Type of error encountered while generating a quote or building the list.
1556
+ */
1557
+ type: 'not_enough_info_to_quote' | 'insufficient_credits' | 'internal_service_error';
1558
+ }
1559
+
1560
+ /**
1561
+ * A single masked preview record returned with a quote so you can sanity check the
1562
+ * kind of contacts that will end up in the mailing list before confirming the
1563
+ * build.
1564
+ */
1565
+ export interface PreviewRecord {
1566
+ /**
1567
+ * The masked, comma-joined formatted address of the contact.
1568
+ */
1569
+ formattedAddress: string;
1570
+
1571
+ /**
1572
+ * The masked name of the contact or business.
1573
+ */
1574
+ name: string;
1575
+ }
1576
+
1577
+ /**
1578
+ * Details of the quote generated for a targeted list build.
1579
+ */
1580
+ export interface Quote {
1581
+ /**
1582
+ * The number of contacts that will be included in the built mailing list. This
1583
+ * accounts for any `limit` that was provided.
1584
+ */
1585
+ count: number;
1586
+
1587
+ /**
1588
+ * The UTC time at which the quote was generated.
1589
+ */
1590
+ generatedAt: string;
1591
+
1592
+ /**
1593
+ * The price per contact, in cents. Multiply by `count` to get the total cost of
1594
+ * building the list.
1595
+ */
1596
+ pricePerContactCents: number;
1597
+ }
1598
+
1599
+ /**
1600
+ * Filters used to target US companies (B2B) when building a list.
1601
+ */
1602
+ export interface UsCompanies {
1603
+ /**
1604
+ * Required list of five-digit US ZIP codes to target.
1605
+ */
1606
+ postalCodes: Array<string>;
1607
+
1608
+ /**
1609
+ * Filter by ownership structure of the company.
1610
+ */
1611
+ companyTypes?: Array<
1612
+ 'public' | 'private' | 'educational' | 'government' | 'nonprofit' | 'public_subsidiary'
1613
+ >;
1614
+
1615
+ /**
1616
+ * Inclusive `[min, max]` range for the number of employees at the company. Values
1617
+ * must be between 1 and 1,000,000.
1618
+ */
1619
+ employeeCount?: Array<number>;
1620
+
1621
+ /**
1622
+ * Inclusive `[min, max]` range for the year the company was founded. Values must
1623
+ * be between 1600 and 2100.
1624
+ */
1625
+ foundedYear?: Array<number>;
1626
+
1627
+ /**
1628
+ * Filter by free-form industry names (see the autocomplete endpoint).
1629
+ */
1630
+ industries?: Array<string>;
1631
+
1632
+ /**
1633
+ * Filter by six-digit [NAICS](https://www.census.gov/naics/) industry codes.
1634
+ */
1635
+ naicsCodes?: Array<string>;
1636
+
1637
+ /**
1638
+ * Filter by free-form company tags (e.g., `"saas"`, `"b2b"`).
1639
+ */
1640
+ tags?: Array<string>;
1641
+ }
1642
+
1643
+ /**
1644
+ * Filters used to target US consumers (B2C) when building a list.
1645
+ *
1646
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
1647
+ * exclusive — you may supply at most one of them.
1648
+ */
1649
+ export interface UsConsumers {
1650
+ /**
1651
+ * Inclusive `[min, max]` age range. Values must be between 18 and 80.
1652
+ */
1653
+ ageRange?: Array<number>;
1654
+
1655
+ /**
1656
+ * A list of `"City, ST"` strings (e.g. `"New York, NY"`) to target.
1657
+ */
1658
+ cityStates?: Array<string>;
1659
+
1660
+ /**
1661
+ * Filter by highest level of education completed.
1662
+ */
1663
+ educationLevels?: Array<'high_school' | 'college' | 'grad_school' | 'vocational_training'>;
1664
+
1665
+ /**
1666
+ * Gender filter for US consumer list builds.
1667
+ */
1668
+ gender?: 'male' | 'female';
1669
+
1670
+ /**
1671
+ * Inclusive `[min, max]` home value range, in US dollars. Values must be between 0
1672
+ * and 1,000,000.
1673
+ */
1674
+ homeValueRange?: Array<number>;
1675
+
1676
+ /**
1677
+ * Inclusive `[min, max]` annual household income range, in US dollars. Values must
1678
+ * be between 0 and 200,000.
1679
+ */
1680
+ incomeRange?: Array<number>;
1681
+
1682
+ /**
1683
+ * Inclusive `[min, max]` number of children in the household. Values must be
1684
+ * between 0 and 8.
1685
+ */
1686
+ numChildrenRange?: Array<number>;
1687
+
1688
+ /**
1689
+ * Filter by occupation classification.
1690
+ */
1691
+ occupations?: Array<
1692
+ | 'professional_technical'
1693
+ | 'administration_management'
1694
+ | 'sales_service'
1695
+ | 'clerical_white_collar'
1696
+ | 'craftsmen_blue_collar'
1697
+ | 'student'
1698
+ | 'homemaker'
1699
+ | 'retired'
1700
+ | 'farmer'
1701
+ | 'military'
1702
+ | 'religious'
1703
+ | 'self_employed'
1704
+ | 'self_employed_professional_technical'
1705
+ | 'self_employed_administration_management'
1706
+ | 'self_employed_sales_service'
1707
+ | 'self_employed_clerical_white_collar'
1708
+ | 'self_employed_craftsmen_blue_collar'
1709
+ | 'self_employed_student'
1710
+ | 'self_employed_homemaker'
1711
+ | 'self_employed_retired'
1712
+ | 'self_employed_other'
1713
+ | 'educator'
1714
+ | 'financial_professional'
1715
+ | 'legal_professional'
1716
+ | 'medical_professional'
1717
+ | 'other'
1718
+ >;
1719
+
1720
+ /**
1721
+ * A list of five-digit US ZIP codes to target.
1722
+ */
1723
+ zipCodes?: Array<string>;
1724
+
1725
+ /**
1726
+ * A geographic filter that selects all ZIP codes within a given radius of a center
1727
+ * ZIP code.
1728
+ */
1729
+ zipCodesAround?: UsConsumers.ZipCodesAround;
1730
+ }
1731
+
1732
+ export namespace UsConsumers {
1733
+ /**
1734
+ * A geographic filter that selects all ZIP codes within a given radius of a center
1735
+ * ZIP code.
1736
+ */
1737
+ export interface ZipCodesAround {
1738
+ /**
1739
+ * The radius in miles around `zipCode` to include. Between 0.1 and 100.
1740
+ */
1741
+ radiusInMiles: number;
1742
+
1743
+ /**
1744
+ * The five-digit ZIP code at the center of the search circle.
1745
+ */
1746
+ zipCode: string;
1747
+ }
1748
+ }
1749
+ }
1750
+
1751
+ export interface TargetedListBuildCreateParams {
1752
+ /**
1753
+ * Body param: An optional string describing this resource. Will be visible in the
1754
+ * API and the dashboard.
1755
+ */
1756
+ description?: string;
1757
+
1758
+ /**
1759
+ * Body param: Maximum number of contacts to include in the built mailing list. If
1760
+ * omitted, all matching contacts are included.
1761
+ */
1762
+ limit?: number;
1763
+
1764
+ /**
1765
+ * Body param: See the section on Metadata.
1766
+ */
1767
+ metadata?: { [key: string]: unknown };
1768
+
1769
+ /**
1770
+ * Body param: Filters used to target US companies (B2B) when building a list.
1771
+ */
1772
+ usCompanies?: TargetedListBuildCreateParams.UsCompanies;
1773
+
1774
+ /**
1775
+ * Body param: Filters used to target US consumers (B2C) when building a list.
1776
+ *
1777
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
1778
+ * exclusive — you may supply at most one of them.
1779
+ */
1780
+ usConsumers?: TargetedListBuildCreateParams.UsConsumers;
1781
+
1782
+ /**
1783
+ * Header param
1784
+ */
1785
+ 'idempotency-key'?: string;
1786
+ }
1787
+
1788
+ export namespace TargetedListBuildCreateParams {
1789
+ /**
1790
+ * Filters used to target US companies (B2B) when building a list.
1791
+ */
1792
+ export interface UsCompanies {
1793
+ /**
1794
+ * Required list of five-digit US ZIP codes to target.
1795
+ */
1796
+ postalCodes: Array<string>;
1797
+
1798
+ /**
1799
+ * Filter by ownership structure of the company.
1800
+ */
1801
+ companyTypes?: Array<
1802
+ 'public' | 'private' | 'educational' | 'government' | 'nonprofit' | 'public_subsidiary'
1803
+ >;
1804
+
1805
+ /**
1806
+ * Inclusive `[min, max]` range for the number of employees at the company. Values
1807
+ * must be between 1 and 1,000,000.
1808
+ */
1809
+ employeeCount?: Array<number>;
1810
+
1811
+ /**
1812
+ * Inclusive `[min, max]` range for the year the company was founded. Values must
1813
+ * be between 1600 and 2100.
1814
+ */
1815
+ foundedYear?: Array<number>;
1816
+
1817
+ /**
1818
+ * Filter by free-form industry names (see the autocomplete endpoint).
1819
+ */
1820
+ industries?: Array<string>;
1821
+
1822
+ /**
1823
+ * Filter by six-digit [NAICS](https://www.census.gov/naics/) industry codes.
1824
+ */
1825
+ naicsCodes?: Array<string>;
1826
+
1827
+ /**
1828
+ * Filter by free-form company tags (e.g., `"saas"`, `"b2b"`).
1829
+ */
1830
+ tags?: Array<string>;
1831
+ }
1832
+
1833
+ /**
1834
+ * Filters used to target US consumers (B2C) when building a list.
1835
+ *
1836
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
1837
+ * exclusive — you may supply at most one of them.
1838
+ */
1839
+ export interface UsConsumers {
1840
+ /**
1841
+ * Inclusive `[min, max]` age range. Values must be between 18 and 80.
1842
+ */
1843
+ ageRange?: Array<number>;
1844
+
1845
+ /**
1846
+ * A list of `"City, ST"` strings (e.g. `"New York, NY"`) to target.
1847
+ */
1848
+ cityStates?: Array<string>;
1849
+
1850
+ /**
1851
+ * Filter by highest level of education completed.
1852
+ */
1853
+ educationLevels?: Array<'high_school' | 'college' | 'grad_school' | 'vocational_training'>;
1854
+
1855
+ /**
1856
+ * Gender filter for US consumer list builds.
1857
+ */
1858
+ gender?: 'male' | 'female';
1859
+
1860
+ /**
1861
+ * Inclusive `[min, max]` home value range, in US dollars. Values must be between 0
1862
+ * and 1,000,000.
1863
+ */
1864
+ homeValueRange?: Array<number>;
1865
+
1866
+ /**
1867
+ * Inclusive `[min, max]` annual household income range, in US dollars. Values must
1868
+ * be between 0 and 200,000.
1869
+ */
1870
+ incomeRange?: Array<number>;
1871
+
1872
+ /**
1873
+ * Inclusive `[min, max]` number of children in the household. Values must be
1874
+ * between 0 and 8.
1875
+ */
1876
+ numChildrenRange?: Array<number>;
1877
+
1878
+ /**
1879
+ * Filter by occupation classification.
1880
+ */
1881
+ occupations?: Array<
1882
+ | 'professional_technical'
1883
+ | 'administration_management'
1884
+ | 'sales_service'
1885
+ | 'clerical_white_collar'
1886
+ | 'craftsmen_blue_collar'
1887
+ | 'student'
1888
+ | 'homemaker'
1889
+ | 'retired'
1890
+ | 'farmer'
1891
+ | 'military'
1892
+ | 'religious'
1893
+ | 'self_employed'
1894
+ | 'self_employed_professional_technical'
1895
+ | 'self_employed_administration_management'
1896
+ | 'self_employed_sales_service'
1897
+ | 'self_employed_clerical_white_collar'
1898
+ | 'self_employed_craftsmen_blue_collar'
1899
+ | 'self_employed_student'
1900
+ | 'self_employed_homemaker'
1901
+ | 'self_employed_retired'
1902
+ | 'self_employed_other'
1903
+ | 'educator'
1904
+ | 'financial_professional'
1905
+ | 'legal_professional'
1906
+ | 'medical_professional'
1907
+ | 'other'
1908
+ >;
1909
+
1910
+ /**
1911
+ * A list of five-digit US ZIP codes to target.
1912
+ */
1913
+ zipCodes?: Array<string>;
1914
+
1915
+ /**
1916
+ * A geographic filter that selects all ZIP codes within a given radius of a center
1917
+ * ZIP code.
1918
+ */
1919
+ zipCodesAround?: UsConsumers.ZipCodesAround;
1920
+ }
1921
+
1922
+ export namespace UsConsumers {
1923
+ /**
1924
+ * A geographic filter that selects all ZIP codes within a given radius of a center
1925
+ * ZIP code.
1926
+ */
1927
+ export interface ZipCodesAround {
1928
+ /**
1929
+ * The radius in miles around `zipCode` to include. Between 0.1 and 100.
1930
+ */
1931
+ radiusInMiles: number;
1932
+
1933
+ /**
1934
+ * The five-digit ZIP code at the center of the search circle.
1935
+ */
1936
+ zipCode: string;
1937
+ }
1938
+ }
1939
+ }
1940
+
1941
+ export interface TargetedListBuildUpdateParams {
1942
+ /**
1943
+ * An optional string describing this resource. Will be visible in the API and the
1944
+ * dashboard.
1945
+ */
1946
+ description?: string;
1947
+
1948
+ /**
1949
+ * Maximum number of contacts to include in the built mailing list. If omitted, all
1950
+ * matching contacts are included.
1951
+ */
1952
+ limit?: number;
1953
+
1954
+ /**
1955
+ * See the section on Metadata.
1956
+ */
1957
+ metadata?: { [key: string]: unknown };
1958
+
1959
+ /**
1960
+ * Filters used to target US companies (B2B) when building a list.
1961
+ */
1962
+ usCompanies?: TargetedListBuildUpdateParams.UsCompanies;
1963
+
1964
+ /**
1965
+ * Filters used to target US consumers (B2C) when building a list.
1966
+ *
1967
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
1968
+ * exclusive — you may supply at most one of them.
1969
+ */
1970
+ usConsumers?: TargetedListBuildUpdateParams.UsConsumers;
1971
+ }
1972
+
1973
+ export namespace TargetedListBuildUpdateParams {
1974
+ /**
1975
+ * Filters used to target US companies (B2B) when building a list.
1976
+ */
1977
+ export interface UsCompanies {
1978
+ /**
1979
+ * Required list of five-digit US ZIP codes to target.
1980
+ */
1981
+ postalCodes: Array<string>;
1982
+
1983
+ /**
1984
+ * Filter by ownership structure of the company.
1985
+ */
1986
+ companyTypes?: Array<
1987
+ 'public' | 'private' | 'educational' | 'government' | 'nonprofit' | 'public_subsidiary'
1988
+ >;
1989
+
1990
+ /**
1991
+ * Inclusive `[min, max]` range for the number of employees at the company. Values
1992
+ * must be between 1 and 1,000,000.
1993
+ */
1994
+ employeeCount?: Array<number>;
1995
+
1996
+ /**
1997
+ * Inclusive `[min, max]` range for the year the company was founded. Values must
1998
+ * be between 1600 and 2100.
1999
+ */
2000
+ foundedYear?: Array<number>;
2001
+
2002
+ /**
2003
+ * Filter by free-form industry names (see the autocomplete endpoint).
2004
+ */
2005
+ industries?: Array<string>;
2006
+
2007
+ /**
2008
+ * Filter by six-digit [NAICS](https://www.census.gov/naics/) industry codes.
2009
+ */
2010
+ naicsCodes?: Array<string>;
2011
+
2012
+ /**
2013
+ * Filter by free-form company tags (e.g., `"saas"`, `"b2b"`).
2014
+ */
2015
+ tags?: Array<string>;
2016
+ }
2017
+
2018
+ /**
2019
+ * Filters used to target US consumers (B2C) when building a list.
2020
+ *
2021
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
2022
+ * exclusive — you may supply at most one of them.
2023
+ */
2024
+ export interface UsConsumers {
2025
+ /**
2026
+ * Inclusive `[min, max]` age range. Values must be between 18 and 80.
2027
+ */
2028
+ ageRange?: Array<number>;
2029
+
2030
+ /**
2031
+ * A list of `"City, ST"` strings (e.g. `"New York, NY"`) to target.
2032
+ */
2033
+ cityStates?: Array<string>;
2034
+
2035
+ /**
2036
+ * Filter by highest level of education completed.
2037
+ */
2038
+ educationLevels?: Array<'high_school' | 'college' | 'grad_school' | 'vocational_training'>;
2039
+
2040
+ /**
2041
+ * Gender filter for US consumer list builds.
2042
+ */
2043
+ gender?: 'male' | 'female';
2044
+
2045
+ /**
2046
+ * Inclusive `[min, max]` home value range, in US dollars. Values must be between 0
2047
+ * and 1,000,000.
2048
+ */
2049
+ homeValueRange?: Array<number>;
2050
+
2051
+ /**
2052
+ * Inclusive `[min, max]` annual household income range, in US dollars. Values must
2053
+ * be between 0 and 200,000.
2054
+ */
2055
+ incomeRange?: Array<number>;
2056
+
2057
+ /**
2058
+ * Inclusive `[min, max]` number of children in the household. Values must be
2059
+ * between 0 and 8.
2060
+ */
2061
+ numChildrenRange?: Array<number>;
2062
+
2063
+ /**
2064
+ * Filter by occupation classification.
2065
+ */
2066
+ occupations?: Array<
2067
+ | 'professional_technical'
2068
+ | 'administration_management'
2069
+ | 'sales_service'
2070
+ | 'clerical_white_collar'
2071
+ | 'craftsmen_blue_collar'
2072
+ | 'student'
2073
+ | 'homemaker'
2074
+ | 'retired'
2075
+ | 'farmer'
2076
+ | 'military'
2077
+ | 'religious'
2078
+ | 'self_employed'
2079
+ | 'self_employed_professional_technical'
2080
+ | 'self_employed_administration_management'
2081
+ | 'self_employed_sales_service'
2082
+ | 'self_employed_clerical_white_collar'
2083
+ | 'self_employed_craftsmen_blue_collar'
2084
+ | 'self_employed_student'
2085
+ | 'self_employed_homemaker'
2086
+ | 'self_employed_retired'
2087
+ | 'self_employed_other'
2088
+ | 'educator'
2089
+ | 'financial_professional'
2090
+ | 'legal_professional'
2091
+ | 'medical_professional'
2092
+ | 'other'
2093
+ >;
2094
+
2095
+ /**
2096
+ * A list of five-digit US ZIP codes to target.
2097
+ */
2098
+ zipCodes?: Array<string>;
2099
+
2100
+ /**
2101
+ * A geographic filter that selects all ZIP codes within a given radius of a center
2102
+ * ZIP code.
2103
+ */
2104
+ zipCodesAround?: UsConsumers.ZipCodesAround;
2105
+ }
2106
+
2107
+ export namespace UsConsumers {
2108
+ /**
2109
+ * A geographic filter that selects all ZIP codes within a given radius of a center
2110
+ * ZIP code.
2111
+ */
2112
+ export interface ZipCodesAround {
2113
+ /**
2114
+ * The radius in miles around `zipCode` to include. Between 0.1 and 100.
2115
+ */
2116
+ radiusInMiles: number;
2117
+
2118
+ /**
2119
+ * The five-digit ZIP code at the center of the search circle.
2120
+ */
2121
+ zipCode: string;
2122
+ }
2123
+ }
2124
+ }
2125
+
2126
+ export interface TargetedListBuildListParams extends SkipLimitParams {
2127
+ /**
2128
+ * You can supply any string to help narrow down the list of resources. For
2129
+ * example, if you pass `"New York"` (quoted), it will return resources that have
2130
+ * that string present somewhere in their response. Alternatively, you can supply a
2131
+ * structured search query. See the documentation on `StructuredSearchQuery` for
2132
+ * more details.
2133
+ */
2134
+ search?: string;
2135
+ }
2136
+
2137
+ TargetedListBuilds.Filters = Filters;
2138
+
2139
+ export declare namespace TargetedListBuilds {
2140
+ export {
2141
+ type TargetedListBuildCreateResponse as TargetedListBuildCreateResponse,
2142
+ type TargetedListBuildRetrieveResponse as TargetedListBuildRetrieveResponse,
2143
+ type TargetedListBuildUpdateResponse as TargetedListBuildUpdateResponse,
2144
+ type TargetedListBuildListResponse as TargetedListBuildListResponse,
2145
+ type TargetedListBuildDeleteResponse as TargetedListBuildDeleteResponse,
2146
+ type TargetedListBuildConfirmResponse as TargetedListBuildConfirmResponse,
2147
+ type TargetedListBuildListResponsesSkipLimit as TargetedListBuildListResponsesSkipLimit,
2148
+ type TargetedListBuildCreateParams as TargetedListBuildCreateParams,
2149
+ type TargetedListBuildUpdateParams as TargetedListBuildUpdateParams,
2150
+ type TargetedListBuildListParams as TargetedListBuildListParams,
2151
+ };
2152
+
2153
+ export {
2154
+ Filters as Filters,
2155
+ type FilterAutocompleteResponse as FilterAutocompleteResponse,
2156
+ type FilterAutocompleteParams as FilterAutocompleteParams,
2157
+ };
2158
+ }