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,1633 @@
1
+ import { APIResource } from "../../../core/resource.mjs";
2
+ import * as FiltersAPI from "./filters.mjs";
3
+ import { FilterAutocompleteParams, FilterAutocompleteResponse, Filters } from "./filters.mjs";
4
+ import { APIPromise } from "../../../core/api-promise.mjs";
5
+ import { PagePromise, SkipLimit, type SkipLimitParams } from "../../../core/pagination.mjs";
6
+ import { RequestOptions } from "../../../internal/request-options.mjs";
7
+ /**
8
+ * **Beta:** the targeted list builds API is in beta and is subject to
9
+ * breaking changes. Endpoint shapes, status values, and filter fields may
10
+ * change without notice.
11
+ *
12
+ * The targeted list builds API lets you programmatically build mailing
13
+ * lists of US consumers (B2C) or US companies (B2B) that match a set of
14
+ * demographic, geographic, and firmographic filters.
15
+ *
16
+ * The lifecycle of a list build is:
17
+ *
18
+ * 1. Create a list build by supplying either `usConsumers` or `usCompanies`
19
+ * filters. A quote is generated asynchronously — poll the resource or
20
+ * wait for its `status` to become `quote_ready`.
21
+ * 2. Review the `quote` (total count and price per contact) and masked
22
+ * `previewRecords`. Adjust the filters with an update call if needed —
23
+ * this will regenerate the quote.
24
+ * 3. Confirm the build. This deducts the appropriate amount of list build
25
+ * credits from your organization (in live mode) and begins constructing
26
+ * the mailing list. `buildProgressPercent` reflects progress from 0 to
27
+ * 100.
28
+ * 4. Once `status` is `completed`, the ID of the resulting mailing list is
29
+ * available in the `mailingList` field and can be used like any other
30
+ * mailing list in the PostGrid API.
31
+ *
32
+ * Targeted list builds must be enabled on your organization before they
33
+ * can be used. Contact PostGrid support to request access.
34
+ */
35
+ export declare class TargetedListBuilds extends APIResource {
36
+ filters: FiltersAPI.Filters;
37
+ /**
38
+ * Create a new targeted list build. A quote will be generated asynchronously based
39
+ * on the provided filters.
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * const targetedListBuild =
44
+ * await client.printMail.targetedListBuilds.create({
45
+ * description: 'Q1 prospecting list',
46
+ * limit: 1000,
47
+ * metadata: { campaign: 'q1_prospecting' },
48
+ * usCompanies: {
49
+ * postalCodes: ['10001', '10002'],
50
+ * industries: ['software'],
51
+ * employeeCount: [10, 500],
52
+ * },
53
+ * });
54
+ * ```
55
+ */
56
+ create(params: TargetedListBuildCreateParams, options?: RequestOptions): APIPromise<TargetedListBuildCreateResponse>;
57
+ /**
58
+ * Retrieve a specific targeted list build by its ID.
59
+ *
60
+ * @example
61
+ * ```ts
62
+ * const targetedListBuild =
63
+ * await client.printMail.targetedListBuilds.retrieve('id');
64
+ * ```
65
+ */
66
+ retrieve(id: string, options?: RequestOptions): APIPromise<TargetedListBuildRetrieveResponse>;
67
+ /**
68
+ * Update an existing targeted list build. Only builds that have not yet been
69
+ * confirmed may be updated. Updating the filters or `limit` will reset the build's
70
+ * status back to `generating_quote` and a new quote will be generated.
71
+ *
72
+ * @example
73
+ * ```ts
74
+ * const targetedListBuild =
75
+ * await client.printMail.targetedListBuilds.update('id', {
76
+ * limit: 2000,
77
+ * usCompanies: {
78
+ * postalCodes: ['10001', '10002', '10003'],
79
+ * industries: ['software', 'fintech'],
80
+ * employeeCount: [50, 1000],
81
+ * },
82
+ * });
83
+ * ```
84
+ */
85
+ update(id: string, body: TargetedListBuildUpdateParams, options?: RequestOptions): APIPromise<TargetedListBuildUpdateResponse>;
86
+ /**
87
+ * Retrieve a paginated list of targeted list builds for the authenticated
88
+ * organization, ordered from most recently updated to least recently updated.
89
+ *
90
+ * @example
91
+ * ```ts
92
+ * // Automatically fetches more pages as needed.
93
+ * for await (const targetedListBuildListResponse of client.printMail.targetedListBuilds.list()) {
94
+ * // ...
95
+ * }
96
+ * ```
97
+ */
98
+ list(query?: TargetedListBuildListParams | null | undefined, options?: RequestOptions): PagePromise<TargetedListBuildListResponsesSkipLimit, TargetedListBuildListResponse>;
99
+ /**
100
+ * Delete a targeted list build. List builds can only be deleted before they have
101
+ * been confirmed — once a build has transitioned to `creating_list` or `completed`
102
+ * it cannot be deleted.
103
+ *
104
+ * @example
105
+ * ```ts
106
+ * const targetedListBuild =
107
+ * await client.printMail.targetedListBuilds.delete('id');
108
+ * ```
109
+ */
110
+ delete(id: string, options?: RequestOptions): APIPromise<TargetedListBuildDeleteResponse>;
111
+ /**
112
+ * Confirm a targeted list build whose quote is ready. This deducts the appropriate
113
+ * amount of list build credits from the organization (in live mode) and kicks off
114
+ * the asynchronous creation of the underlying mailing list.
115
+ *
116
+ * @example
117
+ * ```ts
118
+ * const response =
119
+ * await client.printMail.targetedListBuilds.confirm('id');
120
+ * ```
121
+ */
122
+ confirm(id: string, options?: RequestOptions): APIPromise<TargetedListBuildConfirmResponse>;
123
+ }
124
+ export type TargetedListBuildListResponsesSkipLimit = SkipLimit<TargetedListBuildListResponse>;
125
+ /**
126
+ * A targeted list build represents a request to build a new mailing list by
127
+ * targeting US consumers or companies matching the provided filters. Once created,
128
+ * a quote is generated asynchronously. After reviewing the quote and preview
129
+ * records, you may confirm the build, which kicks off the creation of the
130
+ * underlying mailing list.
131
+ */
132
+ export interface TargetedListBuildCreateResponse {
133
+ /**
134
+ * A unique ID prefixed with targeted*list_build*
135
+ */
136
+ id: string;
137
+ /**
138
+ * The UTC time at which this resource was created.
139
+ */
140
+ createdAt: string;
141
+ /**
142
+ * `true` if this is a live mode resource else `false`.
143
+ */
144
+ live: boolean;
145
+ /**
146
+ * The ID of the organization that owns this list build.
147
+ */
148
+ organization: string;
149
+ /**
150
+ * Status of a targeted list build.
151
+ */
152
+ status: 'generating_quote' | 'quote_ready' | 'creating_list' | 'completed' | 'failed';
153
+ /**
154
+ * The UTC time at which this resource was last updated.
155
+ */
156
+ updatedAt: string;
157
+ /**
158
+ * A percentage from 0 to 100 representing how much of the build has completed.
159
+ * Only populated while `status` is `creating_list`.
160
+ */
161
+ buildProgressPercent?: number;
162
+ /**
163
+ * The UTC time at which the build finished successfully. Only present once
164
+ * `status` is `completed`.
165
+ */
166
+ completedAt?: string;
167
+ /**
168
+ * The UTC time at which the build was confirmed, if any.
169
+ */
170
+ confirmedAt?: string;
171
+ /**
172
+ * An optional string describing this resource. Will be visible in the API and the
173
+ * dashboard.
174
+ */
175
+ description?: string;
176
+ /**
177
+ * Any errors encountered while generating a quote or building the list.
178
+ */
179
+ errors?: Array<TargetedListBuildCreateResponse.Error>;
180
+ /**
181
+ * Maximum number of contacts to include in the built mailing list. If omitted, all
182
+ * matching contacts are included.
183
+ */
184
+ limit?: number;
185
+ /**
186
+ * The ID of the mailing list that was built. Present once `status` is `completed`.
187
+ */
188
+ mailingList?: string;
189
+ /**
190
+ * See the section on Metadata.
191
+ */
192
+ metadata?: {
193
+ [key: string]: unknown;
194
+ };
195
+ /**
196
+ * A small number of masked sample records for the configured filters, populated
197
+ * alongside `quote`.
198
+ */
199
+ previewRecords?: Array<TargetedListBuildCreateResponse.PreviewRecord>;
200
+ /**
201
+ * Details of the quote generated for a targeted list build.
202
+ */
203
+ quote?: TargetedListBuildCreateResponse.Quote;
204
+ /**
205
+ * Filters used to target US companies (B2B) when building a list.
206
+ */
207
+ usCompanies?: TargetedListBuildCreateResponse.UsCompanies;
208
+ /**
209
+ * Filters used to target US consumers (B2C) when building a list.
210
+ *
211
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
212
+ * exclusive — you may supply at most one of them.
213
+ */
214
+ usConsumers?: TargetedListBuildCreateResponse.UsConsumers;
215
+ }
216
+ export declare namespace TargetedListBuildCreateResponse {
217
+ /**
218
+ * Details of an error encountered while processing a targeted list build.
219
+ */
220
+ interface Error {
221
+ /**
222
+ * A human-readable message describing the error.
223
+ */
224
+ message: string;
225
+ /**
226
+ * Type of error encountered while generating a quote or building the list.
227
+ */
228
+ type: 'not_enough_info_to_quote' | 'insufficient_credits' | 'internal_service_error';
229
+ }
230
+ /**
231
+ * A single masked preview record returned with a quote so you can sanity check the
232
+ * kind of contacts that will end up in the mailing list before confirming the
233
+ * build.
234
+ */
235
+ interface PreviewRecord {
236
+ /**
237
+ * The masked, comma-joined formatted address of the contact.
238
+ */
239
+ formattedAddress: string;
240
+ /**
241
+ * The masked name of the contact or business.
242
+ */
243
+ name: string;
244
+ }
245
+ /**
246
+ * Details of the quote generated for a targeted list build.
247
+ */
248
+ interface Quote {
249
+ /**
250
+ * The number of contacts that will be included in the built mailing list. This
251
+ * accounts for any `limit` that was provided.
252
+ */
253
+ count: number;
254
+ /**
255
+ * The UTC time at which the quote was generated.
256
+ */
257
+ generatedAt: string;
258
+ /**
259
+ * The price per contact, in cents. Multiply by `count` to get the total cost of
260
+ * building the list.
261
+ */
262
+ pricePerContactCents: number;
263
+ }
264
+ /**
265
+ * Filters used to target US companies (B2B) when building a list.
266
+ */
267
+ interface UsCompanies {
268
+ /**
269
+ * Required list of five-digit US ZIP codes to target.
270
+ */
271
+ postalCodes: Array<string>;
272
+ /**
273
+ * Filter by ownership structure of the company.
274
+ */
275
+ companyTypes?: Array<'public' | 'private' | 'educational' | 'government' | 'nonprofit' | 'public_subsidiary'>;
276
+ /**
277
+ * Inclusive `[min, max]` range for the number of employees at the company. Values
278
+ * must be between 1 and 1,000,000.
279
+ */
280
+ employeeCount?: Array<number>;
281
+ /**
282
+ * Inclusive `[min, max]` range for the year the company was founded. Values must
283
+ * be between 1600 and 2100.
284
+ */
285
+ foundedYear?: Array<number>;
286
+ /**
287
+ * Filter by free-form industry names (see the autocomplete endpoint).
288
+ */
289
+ industries?: Array<string>;
290
+ /**
291
+ * Filter by six-digit [NAICS](https://www.census.gov/naics/) industry codes.
292
+ */
293
+ naicsCodes?: Array<string>;
294
+ /**
295
+ * Filter by free-form company tags (e.g., `"saas"`, `"b2b"`).
296
+ */
297
+ tags?: Array<string>;
298
+ }
299
+ /**
300
+ * Filters used to target US consumers (B2C) when building a list.
301
+ *
302
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
303
+ * exclusive — you may supply at most one of them.
304
+ */
305
+ interface UsConsumers {
306
+ /**
307
+ * Inclusive `[min, max]` age range. Values must be between 18 and 80.
308
+ */
309
+ ageRange?: Array<number>;
310
+ /**
311
+ * A list of `"City, ST"` strings (e.g. `"New York, NY"`) to target.
312
+ */
313
+ cityStates?: Array<string>;
314
+ /**
315
+ * Filter by highest level of education completed.
316
+ */
317
+ educationLevels?: Array<'high_school' | 'college' | 'grad_school' | 'vocational_training'>;
318
+ /**
319
+ * Gender filter for US consumer list builds.
320
+ */
321
+ gender?: 'male' | 'female';
322
+ /**
323
+ * Inclusive `[min, max]` home value range, in US dollars. Values must be between 0
324
+ * and 1,000,000.
325
+ */
326
+ homeValueRange?: Array<number>;
327
+ /**
328
+ * Inclusive `[min, max]` annual household income range, in US dollars. Values must
329
+ * be between 0 and 200,000.
330
+ */
331
+ incomeRange?: Array<number>;
332
+ /**
333
+ * Inclusive `[min, max]` number of children in the household. Values must be
334
+ * between 0 and 8.
335
+ */
336
+ numChildrenRange?: Array<number>;
337
+ /**
338
+ * Filter by occupation classification.
339
+ */
340
+ occupations?: Array<'professional_technical' | 'administration_management' | 'sales_service' | 'clerical_white_collar' | 'craftsmen_blue_collar' | 'student' | 'homemaker' | 'retired' | 'farmer' | 'military' | 'religious' | 'self_employed' | 'self_employed_professional_technical' | 'self_employed_administration_management' | 'self_employed_sales_service' | 'self_employed_clerical_white_collar' | 'self_employed_craftsmen_blue_collar' | 'self_employed_student' | 'self_employed_homemaker' | 'self_employed_retired' | 'self_employed_other' | 'educator' | 'financial_professional' | 'legal_professional' | 'medical_professional' | 'other'>;
341
+ /**
342
+ * A list of five-digit US ZIP codes to target.
343
+ */
344
+ zipCodes?: Array<string>;
345
+ /**
346
+ * A geographic filter that selects all ZIP codes within a given radius of a center
347
+ * ZIP code.
348
+ */
349
+ zipCodesAround?: UsConsumers.ZipCodesAround;
350
+ }
351
+ namespace UsConsumers {
352
+ /**
353
+ * A geographic filter that selects all ZIP codes within a given radius of a center
354
+ * ZIP code.
355
+ */
356
+ interface ZipCodesAround {
357
+ /**
358
+ * The radius in miles around `zipCode` to include. Between 0.1 and 100.
359
+ */
360
+ radiusInMiles: number;
361
+ /**
362
+ * The five-digit ZIP code at the center of the search circle.
363
+ */
364
+ zipCode: string;
365
+ }
366
+ }
367
+ }
368
+ /**
369
+ * A targeted list build represents a request to build a new mailing list by
370
+ * targeting US consumers or companies matching the provided filters. Once created,
371
+ * a quote is generated asynchronously. After reviewing the quote and preview
372
+ * records, you may confirm the build, which kicks off the creation of the
373
+ * underlying mailing list.
374
+ */
375
+ export interface TargetedListBuildRetrieveResponse {
376
+ /**
377
+ * A unique ID prefixed with targeted*list_build*
378
+ */
379
+ id: string;
380
+ /**
381
+ * The UTC time at which this resource was created.
382
+ */
383
+ createdAt: string;
384
+ /**
385
+ * `true` if this is a live mode resource else `false`.
386
+ */
387
+ live: boolean;
388
+ /**
389
+ * The ID of the organization that owns this list build.
390
+ */
391
+ organization: string;
392
+ /**
393
+ * Status of a targeted list build.
394
+ */
395
+ status: 'generating_quote' | 'quote_ready' | 'creating_list' | 'completed' | 'failed';
396
+ /**
397
+ * The UTC time at which this resource was last updated.
398
+ */
399
+ updatedAt: string;
400
+ /**
401
+ * A percentage from 0 to 100 representing how much of the build has completed.
402
+ * Only populated while `status` is `creating_list`.
403
+ */
404
+ buildProgressPercent?: number;
405
+ /**
406
+ * The UTC time at which the build finished successfully. Only present once
407
+ * `status` is `completed`.
408
+ */
409
+ completedAt?: string;
410
+ /**
411
+ * The UTC time at which the build was confirmed, if any.
412
+ */
413
+ confirmedAt?: string;
414
+ /**
415
+ * An optional string describing this resource. Will be visible in the API and the
416
+ * dashboard.
417
+ */
418
+ description?: string;
419
+ /**
420
+ * Any errors encountered while generating a quote or building the list.
421
+ */
422
+ errors?: Array<TargetedListBuildRetrieveResponse.Error>;
423
+ /**
424
+ * Maximum number of contacts to include in the built mailing list. If omitted, all
425
+ * matching contacts are included.
426
+ */
427
+ limit?: number;
428
+ /**
429
+ * The ID of the mailing list that was built. Present once `status` is `completed`.
430
+ */
431
+ mailingList?: string;
432
+ /**
433
+ * See the section on Metadata.
434
+ */
435
+ metadata?: {
436
+ [key: string]: unknown;
437
+ };
438
+ /**
439
+ * A small number of masked sample records for the configured filters, populated
440
+ * alongside `quote`.
441
+ */
442
+ previewRecords?: Array<TargetedListBuildRetrieveResponse.PreviewRecord>;
443
+ /**
444
+ * Details of the quote generated for a targeted list build.
445
+ */
446
+ quote?: TargetedListBuildRetrieveResponse.Quote;
447
+ /**
448
+ * Filters used to target US companies (B2B) when building a list.
449
+ */
450
+ usCompanies?: TargetedListBuildRetrieveResponse.UsCompanies;
451
+ /**
452
+ * Filters used to target US consumers (B2C) when building a list.
453
+ *
454
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
455
+ * exclusive — you may supply at most one of them.
456
+ */
457
+ usConsumers?: TargetedListBuildRetrieveResponse.UsConsumers;
458
+ }
459
+ export declare namespace TargetedListBuildRetrieveResponse {
460
+ /**
461
+ * Details of an error encountered while processing a targeted list build.
462
+ */
463
+ interface Error {
464
+ /**
465
+ * A human-readable message describing the error.
466
+ */
467
+ message: string;
468
+ /**
469
+ * Type of error encountered while generating a quote or building the list.
470
+ */
471
+ type: 'not_enough_info_to_quote' | 'insufficient_credits' | 'internal_service_error';
472
+ }
473
+ /**
474
+ * A single masked preview record returned with a quote so you can sanity check the
475
+ * kind of contacts that will end up in the mailing list before confirming the
476
+ * build.
477
+ */
478
+ interface PreviewRecord {
479
+ /**
480
+ * The masked, comma-joined formatted address of the contact.
481
+ */
482
+ formattedAddress: string;
483
+ /**
484
+ * The masked name of the contact or business.
485
+ */
486
+ name: string;
487
+ }
488
+ /**
489
+ * Details of the quote generated for a targeted list build.
490
+ */
491
+ interface Quote {
492
+ /**
493
+ * The number of contacts that will be included in the built mailing list. This
494
+ * accounts for any `limit` that was provided.
495
+ */
496
+ count: number;
497
+ /**
498
+ * The UTC time at which the quote was generated.
499
+ */
500
+ generatedAt: string;
501
+ /**
502
+ * The price per contact, in cents. Multiply by `count` to get the total cost of
503
+ * building the list.
504
+ */
505
+ pricePerContactCents: number;
506
+ }
507
+ /**
508
+ * Filters used to target US companies (B2B) when building a list.
509
+ */
510
+ interface UsCompanies {
511
+ /**
512
+ * Required list of five-digit US ZIP codes to target.
513
+ */
514
+ postalCodes: Array<string>;
515
+ /**
516
+ * Filter by ownership structure of the company.
517
+ */
518
+ companyTypes?: Array<'public' | 'private' | 'educational' | 'government' | 'nonprofit' | 'public_subsidiary'>;
519
+ /**
520
+ * Inclusive `[min, max]` range for the number of employees at the company. Values
521
+ * must be between 1 and 1,000,000.
522
+ */
523
+ employeeCount?: Array<number>;
524
+ /**
525
+ * Inclusive `[min, max]` range for the year the company was founded. Values must
526
+ * be between 1600 and 2100.
527
+ */
528
+ foundedYear?: Array<number>;
529
+ /**
530
+ * Filter by free-form industry names (see the autocomplete endpoint).
531
+ */
532
+ industries?: Array<string>;
533
+ /**
534
+ * Filter by six-digit [NAICS](https://www.census.gov/naics/) industry codes.
535
+ */
536
+ naicsCodes?: Array<string>;
537
+ /**
538
+ * Filter by free-form company tags (e.g., `"saas"`, `"b2b"`).
539
+ */
540
+ tags?: Array<string>;
541
+ }
542
+ /**
543
+ * Filters used to target US consumers (B2C) when building a list.
544
+ *
545
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
546
+ * exclusive — you may supply at most one of them.
547
+ */
548
+ interface UsConsumers {
549
+ /**
550
+ * Inclusive `[min, max]` age range. Values must be between 18 and 80.
551
+ */
552
+ ageRange?: Array<number>;
553
+ /**
554
+ * A list of `"City, ST"` strings (e.g. `"New York, NY"`) to target.
555
+ */
556
+ cityStates?: Array<string>;
557
+ /**
558
+ * Filter by highest level of education completed.
559
+ */
560
+ educationLevels?: Array<'high_school' | 'college' | 'grad_school' | 'vocational_training'>;
561
+ /**
562
+ * Gender filter for US consumer list builds.
563
+ */
564
+ gender?: 'male' | 'female';
565
+ /**
566
+ * Inclusive `[min, max]` home value range, in US dollars. Values must be between 0
567
+ * and 1,000,000.
568
+ */
569
+ homeValueRange?: Array<number>;
570
+ /**
571
+ * Inclusive `[min, max]` annual household income range, in US dollars. Values must
572
+ * be between 0 and 200,000.
573
+ */
574
+ incomeRange?: Array<number>;
575
+ /**
576
+ * Inclusive `[min, max]` number of children in the household. Values must be
577
+ * between 0 and 8.
578
+ */
579
+ numChildrenRange?: Array<number>;
580
+ /**
581
+ * Filter by occupation classification.
582
+ */
583
+ occupations?: Array<'professional_technical' | 'administration_management' | 'sales_service' | 'clerical_white_collar' | 'craftsmen_blue_collar' | 'student' | 'homemaker' | 'retired' | 'farmer' | 'military' | 'religious' | 'self_employed' | 'self_employed_professional_technical' | 'self_employed_administration_management' | 'self_employed_sales_service' | 'self_employed_clerical_white_collar' | 'self_employed_craftsmen_blue_collar' | 'self_employed_student' | 'self_employed_homemaker' | 'self_employed_retired' | 'self_employed_other' | 'educator' | 'financial_professional' | 'legal_professional' | 'medical_professional' | 'other'>;
584
+ /**
585
+ * A list of five-digit US ZIP codes to target.
586
+ */
587
+ zipCodes?: Array<string>;
588
+ /**
589
+ * A geographic filter that selects all ZIP codes within a given radius of a center
590
+ * ZIP code.
591
+ */
592
+ zipCodesAround?: UsConsumers.ZipCodesAround;
593
+ }
594
+ namespace UsConsumers {
595
+ /**
596
+ * A geographic filter that selects all ZIP codes within a given radius of a center
597
+ * ZIP code.
598
+ */
599
+ interface ZipCodesAround {
600
+ /**
601
+ * The radius in miles around `zipCode` to include. Between 0.1 and 100.
602
+ */
603
+ radiusInMiles: number;
604
+ /**
605
+ * The five-digit ZIP code at the center of the search circle.
606
+ */
607
+ zipCode: string;
608
+ }
609
+ }
610
+ }
611
+ /**
612
+ * A targeted list build represents a request to build a new mailing list by
613
+ * targeting US consumers or companies matching the provided filters. Once created,
614
+ * a quote is generated asynchronously. After reviewing the quote and preview
615
+ * records, you may confirm the build, which kicks off the creation of the
616
+ * underlying mailing list.
617
+ */
618
+ export interface TargetedListBuildUpdateResponse {
619
+ /**
620
+ * A unique ID prefixed with targeted*list_build*
621
+ */
622
+ id: string;
623
+ /**
624
+ * The UTC time at which this resource was created.
625
+ */
626
+ createdAt: string;
627
+ /**
628
+ * `true` if this is a live mode resource else `false`.
629
+ */
630
+ live: boolean;
631
+ /**
632
+ * The ID of the organization that owns this list build.
633
+ */
634
+ organization: string;
635
+ /**
636
+ * Status of a targeted list build.
637
+ */
638
+ status: 'generating_quote' | 'quote_ready' | 'creating_list' | 'completed' | 'failed';
639
+ /**
640
+ * The UTC time at which this resource was last updated.
641
+ */
642
+ updatedAt: string;
643
+ /**
644
+ * A percentage from 0 to 100 representing how much of the build has completed.
645
+ * Only populated while `status` is `creating_list`.
646
+ */
647
+ buildProgressPercent?: number;
648
+ /**
649
+ * The UTC time at which the build finished successfully. Only present once
650
+ * `status` is `completed`.
651
+ */
652
+ completedAt?: string;
653
+ /**
654
+ * The UTC time at which the build was confirmed, if any.
655
+ */
656
+ confirmedAt?: string;
657
+ /**
658
+ * An optional string describing this resource. Will be visible in the API and the
659
+ * dashboard.
660
+ */
661
+ description?: string;
662
+ /**
663
+ * Any errors encountered while generating a quote or building the list.
664
+ */
665
+ errors?: Array<TargetedListBuildUpdateResponse.Error>;
666
+ /**
667
+ * Maximum number of contacts to include in the built mailing list. If omitted, all
668
+ * matching contacts are included.
669
+ */
670
+ limit?: number;
671
+ /**
672
+ * The ID of the mailing list that was built. Present once `status` is `completed`.
673
+ */
674
+ mailingList?: string;
675
+ /**
676
+ * See the section on Metadata.
677
+ */
678
+ metadata?: {
679
+ [key: string]: unknown;
680
+ };
681
+ /**
682
+ * A small number of masked sample records for the configured filters, populated
683
+ * alongside `quote`.
684
+ */
685
+ previewRecords?: Array<TargetedListBuildUpdateResponse.PreviewRecord>;
686
+ /**
687
+ * Details of the quote generated for a targeted list build.
688
+ */
689
+ quote?: TargetedListBuildUpdateResponse.Quote;
690
+ /**
691
+ * Filters used to target US companies (B2B) when building a list.
692
+ */
693
+ usCompanies?: TargetedListBuildUpdateResponse.UsCompanies;
694
+ /**
695
+ * Filters used to target US consumers (B2C) when building a list.
696
+ *
697
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
698
+ * exclusive — you may supply at most one of them.
699
+ */
700
+ usConsumers?: TargetedListBuildUpdateResponse.UsConsumers;
701
+ }
702
+ export declare namespace TargetedListBuildUpdateResponse {
703
+ /**
704
+ * Details of an error encountered while processing a targeted list build.
705
+ */
706
+ interface Error {
707
+ /**
708
+ * A human-readable message describing the error.
709
+ */
710
+ message: string;
711
+ /**
712
+ * Type of error encountered while generating a quote or building the list.
713
+ */
714
+ type: 'not_enough_info_to_quote' | 'insufficient_credits' | 'internal_service_error';
715
+ }
716
+ /**
717
+ * A single masked preview record returned with a quote so you can sanity check the
718
+ * kind of contacts that will end up in the mailing list before confirming the
719
+ * build.
720
+ */
721
+ interface PreviewRecord {
722
+ /**
723
+ * The masked, comma-joined formatted address of the contact.
724
+ */
725
+ formattedAddress: string;
726
+ /**
727
+ * The masked name of the contact or business.
728
+ */
729
+ name: string;
730
+ }
731
+ /**
732
+ * Details of the quote generated for a targeted list build.
733
+ */
734
+ interface Quote {
735
+ /**
736
+ * The number of contacts that will be included in the built mailing list. This
737
+ * accounts for any `limit` that was provided.
738
+ */
739
+ count: number;
740
+ /**
741
+ * The UTC time at which the quote was generated.
742
+ */
743
+ generatedAt: string;
744
+ /**
745
+ * The price per contact, in cents. Multiply by `count` to get the total cost of
746
+ * building the list.
747
+ */
748
+ pricePerContactCents: number;
749
+ }
750
+ /**
751
+ * Filters used to target US companies (B2B) when building a list.
752
+ */
753
+ interface UsCompanies {
754
+ /**
755
+ * Required list of five-digit US ZIP codes to target.
756
+ */
757
+ postalCodes: Array<string>;
758
+ /**
759
+ * Filter by ownership structure of the company.
760
+ */
761
+ companyTypes?: Array<'public' | 'private' | 'educational' | 'government' | 'nonprofit' | 'public_subsidiary'>;
762
+ /**
763
+ * Inclusive `[min, max]` range for the number of employees at the company. Values
764
+ * must be between 1 and 1,000,000.
765
+ */
766
+ employeeCount?: Array<number>;
767
+ /**
768
+ * Inclusive `[min, max]` range for the year the company was founded. Values must
769
+ * be between 1600 and 2100.
770
+ */
771
+ foundedYear?: Array<number>;
772
+ /**
773
+ * Filter by free-form industry names (see the autocomplete endpoint).
774
+ */
775
+ industries?: Array<string>;
776
+ /**
777
+ * Filter by six-digit [NAICS](https://www.census.gov/naics/) industry codes.
778
+ */
779
+ naicsCodes?: Array<string>;
780
+ /**
781
+ * Filter by free-form company tags (e.g., `"saas"`, `"b2b"`).
782
+ */
783
+ tags?: Array<string>;
784
+ }
785
+ /**
786
+ * Filters used to target US consumers (B2C) when building a list.
787
+ *
788
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
789
+ * exclusive — you may supply at most one of them.
790
+ */
791
+ interface UsConsumers {
792
+ /**
793
+ * Inclusive `[min, max]` age range. Values must be between 18 and 80.
794
+ */
795
+ ageRange?: Array<number>;
796
+ /**
797
+ * A list of `"City, ST"` strings (e.g. `"New York, NY"`) to target.
798
+ */
799
+ cityStates?: Array<string>;
800
+ /**
801
+ * Filter by highest level of education completed.
802
+ */
803
+ educationLevels?: Array<'high_school' | 'college' | 'grad_school' | 'vocational_training'>;
804
+ /**
805
+ * Gender filter for US consumer list builds.
806
+ */
807
+ gender?: 'male' | 'female';
808
+ /**
809
+ * Inclusive `[min, max]` home value range, in US dollars. Values must be between 0
810
+ * and 1,000,000.
811
+ */
812
+ homeValueRange?: Array<number>;
813
+ /**
814
+ * Inclusive `[min, max]` annual household income range, in US dollars. Values must
815
+ * be between 0 and 200,000.
816
+ */
817
+ incomeRange?: Array<number>;
818
+ /**
819
+ * Inclusive `[min, max]` number of children in the household. Values must be
820
+ * between 0 and 8.
821
+ */
822
+ numChildrenRange?: Array<number>;
823
+ /**
824
+ * Filter by occupation classification.
825
+ */
826
+ occupations?: Array<'professional_technical' | 'administration_management' | 'sales_service' | 'clerical_white_collar' | 'craftsmen_blue_collar' | 'student' | 'homemaker' | 'retired' | 'farmer' | 'military' | 'religious' | 'self_employed' | 'self_employed_professional_technical' | 'self_employed_administration_management' | 'self_employed_sales_service' | 'self_employed_clerical_white_collar' | 'self_employed_craftsmen_blue_collar' | 'self_employed_student' | 'self_employed_homemaker' | 'self_employed_retired' | 'self_employed_other' | 'educator' | 'financial_professional' | 'legal_professional' | 'medical_professional' | 'other'>;
827
+ /**
828
+ * A list of five-digit US ZIP codes to target.
829
+ */
830
+ zipCodes?: Array<string>;
831
+ /**
832
+ * A geographic filter that selects all ZIP codes within a given radius of a center
833
+ * ZIP code.
834
+ */
835
+ zipCodesAround?: UsConsumers.ZipCodesAround;
836
+ }
837
+ namespace UsConsumers {
838
+ /**
839
+ * A geographic filter that selects all ZIP codes within a given radius of a center
840
+ * ZIP code.
841
+ */
842
+ interface ZipCodesAround {
843
+ /**
844
+ * The radius in miles around `zipCode` to include. Between 0.1 and 100.
845
+ */
846
+ radiusInMiles: number;
847
+ /**
848
+ * The five-digit ZIP code at the center of the search circle.
849
+ */
850
+ zipCode: string;
851
+ }
852
+ }
853
+ }
854
+ /**
855
+ * A targeted list build represents a request to build a new mailing list by
856
+ * targeting US consumers or companies matching the provided filters. Once created,
857
+ * a quote is generated asynchronously. After reviewing the quote and preview
858
+ * records, you may confirm the build, which kicks off the creation of the
859
+ * underlying mailing list.
860
+ */
861
+ export interface TargetedListBuildListResponse {
862
+ /**
863
+ * A unique ID prefixed with targeted*list_build*
864
+ */
865
+ id: string;
866
+ /**
867
+ * The UTC time at which this resource was created.
868
+ */
869
+ createdAt: string;
870
+ /**
871
+ * `true` if this is a live mode resource else `false`.
872
+ */
873
+ live: boolean;
874
+ /**
875
+ * The ID of the organization that owns this list build.
876
+ */
877
+ organization: string;
878
+ /**
879
+ * Status of a targeted list build.
880
+ */
881
+ status: 'generating_quote' | 'quote_ready' | 'creating_list' | 'completed' | 'failed';
882
+ /**
883
+ * The UTC time at which this resource was last updated.
884
+ */
885
+ updatedAt: string;
886
+ /**
887
+ * A percentage from 0 to 100 representing how much of the build has completed.
888
+ * Only populated while `status` is `creating_list`.
889
+ */
890
+ buildProgressPercent?: number;
891
+ /**
892
+ * The UTC time at which the build finished successfully. Only present once
893
+ * `status` is `completed`.
894
+ */
895
+ completedAt?: string;
896
+ /**
897
+ * The UTC time at which the build was confirmed, if any.
898
+ */
899
+ confirmedAt?: string;
900
+ /**
901
+ * An optional string describing this resource. Will be visible in the API and the
902
+ * dashboard.
903
+ */
904
+ description?: string;
905
+ /**
906
+ * Any errors encountered while generating a quote or building the list.
907
+ */
908
+ errors?: Array<TargetedListBuildListResponse.Error>;
909
+ /**
910
+ * Maximum number of contacts to include in the built mailing list. If omitted, all
911
+ * matching contacts are included.
912
+ */
913
+ limit?: number;
914
+ /**
915
+ * The ID of the mailing list that was built. Present once `status` is `completed`.
916
+ */
917
+ mailingList?: string;
918
+ /**
919
+ * See the section on Metadata.
920
+ */
921
+ metadata?: {
922
+ [key: string]: unknown;
923
+ };
924
+ /**
925
+ * A small number of masked sample records for the configured filters, populated
926
+ * alongside `quote`.
927
+ */
928
+ previewRecords?: Array<TargetedListBuildListResponse.PreviewRecord>;
929
+ /**
930
+ * Details of the quote generated for a targeted list build.
931
+ */
932
+ quote?: TargetedListBuildListResponse.Quote;
933
+ /**
934
+ * Filters used to target US companies (B2B) when building a list.
935
+ */
936
+ usCompanies?: TargetedListBuildListResponse.UsCompanies;
937
+ /**
938
+ * Filters used to target US consumers (B2C) when building a list.
939
+ *
940
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
941
+ * exclusive — you may supply at most one of them.
942
+ */
943
+ usConsumers?: TargetedListBuildListResponse.UsConsumers;
944
+ }
945
+ export declare namespace TargetedListBuildListResponse {
946
+ /**
947
+ * Details of an error encountered while processing a targeted list build.
948
+ */
949
+ interface Error {
950
+ /**
951
+ * A human-readable message describing the error.
952
+ */
953
+ message: string;
954
+ /**
955
+ * Type of error encountered while generating a quote or building the list.
956
+ */
957
+ type: 'not_enough_info_to_quote' | 'insufficient_credits' | 'internal_service_error';
958
+ }
959
+ /**
960
+ * A single masked preview record returned with a quote so you can sanity check the
961
+ * kind of contacts that will end up in the mailing list before confirming the
962
+ * build.
963
+ */
964
+ interface PreviewRecord {
965
+ /**
966
+ * The masked, comma-joined formatted address of the contact.
967
+ */
968
+ formattedAddress: string;
969
+ /**
970
+ * The masked name of the contact or business.
971
+ */
972
+ name: string;
973
+ }
974
+ /**
975
+ * Details of the quote generated for a targeted list build.
976
+ */
977
+ interface Quote {
978
+ /**
979
+ * The number of contacts that will be included in the built mailing list. This
980
+ * accounts for any `limit` that was provided.
981
+ */
982
+ count: number;
983
+ /**
984
+ * The UTC time at which the quote was generated.
985
+ */
986
+ generatedAt: string;
987
+ /**
988
+ * The price per contact, in cents. Multiply by `count` to get the total cost of
989
+ * building the list.
990
+ */
991
+ pricePerContactCents: number;
992
+ }
993
+ /**
994
+ * Filters used to target US companies (B2B) when building a list.
995
+ */
996
+ interface UsCompanies {
997
+ /**
998
+ * Required list of five-digit US ZIP codes to target.
999
+ */
1000
+ postalCodes: Array<string>;
1001
+ /**
1002
+ * Filter by ownership structure of the company.
1003
+ */
1004
+ companyTypes?: Array<'public' | 'private' | 'educational' | 'government' | 'nonprofit' | 'public_subsidiary'>;
1005
+ /**
1006
+ * Inclusive `[min, max]` range for the number of employees at the company. Values
1007
+ * must be between 1 and 1,000,000.
1008
+ */
1009
+ employeeCount?: Array<number>;
1010
+ /**
1011
+ * Inclusive `[min, max]` range for the year the company was founded. Values must
1012
+ * be between 1600 and 2100.
1013
+ */
1014
+ foundedYear?: Array<number>;
1015
+ /**
1016
+ * Filter by free-form industry names (see the autocomplete endpoint).
1017
+ */
1018
+ industries?: Array<string>;
1019
+ /**
1020
+ * Filter by six-digit [NAICS](https://www.census.gov/naics/) industry codes.
1021
+ */
1022
+ naicsCodes?: Array<string>;
1023
+ /**
1024
+ * Filter by free-form company tags (e.g., `"saas"`, `"b2b"`).
1025
+ */
1026
+ tags?: Array<string>;
1027
+ }
1028
+ /**
1029
+ * Filters used to target US consumers (B2C) when building a list.
1030
+ *
1031
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
1032
+ * exclusive — you may supply at most one of them.
1033
+ */
1034
+ interface UsConsumers {
1035
+ /**
1036
+ * Inclusive `[min, max]` age range. Values must be between 18 and 80.
1037
+ */
1038
+ ageRange?: Array<number>;
1039
+ /**
1040
+ * A list of `"City, ST"` strings (e.g. `"New York, NY"`) to target.
1041
+ */
1042
+ cityStates?: Array<string>;
1043
+ /**
1044
+ * Filter by highest level of education completed.
1045
+ */
1046
+ educationLevels?: Array<'high_school' | 'college' | 'grad_school' | 'vocational_training'>;
1047
+ /**
1048
+ * Gender filter for US consumer list builds.
1049
+ */
1050
+ gender?: 'male' | 'female';
1051
+ /**
1052
+ * Inclusive `[min, max]` home value range, in US dollars. Values must be between 0
1053
+ * and 1,000,000.
1054
+ */
1055
+ homeValueRange?: Array<number>;
1056
+ /**
1057
+ * Inclusive `[min, max]` annual household income range, in US dollars. Values must
1058
+ * be between 0 and 200,000.
1059
+ */
1060
+ incomeRange?: Array<number>;
1061
+ /**
1062
+ * Inclusive `[min, max]` number of children in the household. Values must be
1063
+ * between 0 and 8.
1064
+ */
1065
+ numChildrenRange?: Array<number>;
1066
+ /**
1067
+ * Filter by occupation classification.
1068
+ */
1069
+ occupations?: Array<'professional_technical' | 'administration_management' | 'sales_service' | 'clerical_white_collar' | 'craftsmen_blue_collar' | 'student' | 'homemaker' | 'retired' | 'farmer' | 'military' | 'religious' | 'self_employed' | 'self_employed_professional_technical' | 'self_employed_administration_management' | 'self_employed_sales_service' | 'self_employed_clerical_white_collar' | 'self_employed_craftsmen_blue_collar' | 'self_employed_student' | 'self_employed_homemaker' | 'self_employed_retired' | 'self_employed_other' | 'educator' | 'financial_professional' | 'legal_professional' | 'medical_professional' | 'other'>;
1070
+ /**
1071
+ * A list of five-digit US ZIP codes to target.
1072
+ */
1073
+ zipCodes?: Array<string>;
1074
+ /**
1075
+ * A geographic filter that selects all ZIP codes within a given radius of a center
1076
+ * ZIP code.
1077
+ */
1078
+ zipCodesAround?: UsConsumers.ZipCodesAround;
1079
+ }
1080
+ namespace UsConsumers {
1081
+ /**
1082
+ * A geographic filter that selects all ZIP codes within a given radius of a center
1083
+ * ZIP code.
1084
+ */
1085
+ interface ZipCodesAround {
1086
+ /**
1087
+ * The radius in miles around `zipCode` to include. Between 0.1 and 100.
1088
+ */
1089
+ radiusInMiles: number;
1090
+ /**
1091
+ * The five-digit ZIP code at the center of the search circle.
1092
+ */
1093
+ zipCode: string;
1094
+ }
1095
+ }
1096
+ }
1097
+ export interface TargetedListBuildDeleteResponse {
1098
+ /**
1099
+ * A unique ID prefixed with targeted*list_build*
1100
+ */
1101
+ id: string;
1102
+ deleted: true;
1103
+ }
1104
+ /**
1105
+ * A targeted list build represents a request to build a new mailing list by
1106
+ * targeting US consumers or companies matching the provided filters. Once created,
1107
+ * a quote is generated asynchronously. After reviewing the quote and preview
1108
+ * records, you may confirm the build, which kicks off the creation of the
1109
+ * underlying mailing list.
1110
+ */
1111
+ export interface TargetedListBuildConfirmResponse {
1112
+ /**
1113
+ * A unique ID prefixed with targeted*list_build*
1114
+ */
1115
+ id: string;
1116
+ /**
1117
+ * The UTC time at which this resource was created.
1118
+ */
1119
+ createdAt: string;
1120
+ /**
1121
+ * `true` if this is a live mode resource else `false`.
1122
+ */
1123
+ live: boolean;
1124
+ /**
1125
+ * The ID of the organization that owns this list build.
1126
+ */
1127
+ organization: string;
1128
+ /**
1129
+ * Status of a targeted list build.
1130
+ */
1131
+ status: 'generating_quote' | 'quote_ready' | 'creating_list' | 'completed' | 'failed';
1132
+ /**
1133
+ * The UTC time at which this resource was last updated.
1134
+ */
1135
+ updatedAt: string;
1136
+ /**
1137
+ * A percentage from 0 to 100 representing how much of the build has completed.
1138
+ * Only populated while `status` is `creating_list`.
1139
+ */
1140
+ buildProgressPercent?: number;
1141
+ /**
1142
+ * The UTC time at which the build finished successfully. Only present once
1143
+ * `status` is `completed`.
1144
+ */
1145
+ completedAt?: string;
1146
+ /**
1147
+ * The UTC time at which the build was confirmed, if any.
1148
+ */
1149
+ confirmedAt?: string;
1150
+ /**
1151
+ * An optional string describing this resource. Will be visible in the API and the
1152
+ * dashboard.
1153
+ */
1154
+ description?: string;
1155
+ /**
1156
+ * Any errors encountered while generating a quote or building the list.
1157
+ */
1158
+ errors?: Array<TargetedListBuildConfirmResponse.Error>;
1159
+ /**
1160
+ * Maximum number of contacts to include in the built mailing list. If omitted, all
1161
+ * matching contacts are included.
1162
+ */
1163
+ limit?: number;
1164
+ /**
1165
+ * The ID of the mailing list that was built. Present once `status` is `completed`.
1166
+ */
1167
+ mailingList?: string;
1168
+ /**
1169
+ * See the section on Metadata.
1170
+ */
1171
+ metadata?: {
1172
+ [key: string]: unknown;
1173
+ };
1174
+ /**
1175
+ * A small number of masked sample records for the configured filters, populated
1176
+ * alongside `quote`.
1177
+ */
1178
+ previewRecords?: Array<TargetedListBuildConfirmResponse.PreviewRecord>;
1179
+ /**
1180
+ * Details of the quote generated for a targeted list build.
1181
+ */
1182
+ quote?: TargetedListBuildConfirmResponse.Quote;
1183
+ /**
1184
+ * Filters used to target US companies (B2B) when building a list.
1185
+ */
1186
+ usCompanies?: TargetedListBuildConfirmResponse.UsCompanies;
1187
+ /**
1188
+ * Filters used to target US consumers (B2C) when building a list.
1189
+ *
1190
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
1191
+ * exclusive — you may supply at most one of them.
1192
+ */
1193
+ usConsumers?: TargetedListBuildConfirmResponse.UsConsumers;
1194
+ }
1195
+ export declare namespace TargetedListBuildConfirmResponse {
1196
+ /**
1197
+ * Details of an error encountered while processing a targeted list build.
1198
+ */
1199
+ interface Error {
1200
+ /**
1201
+ * A human-readable message describing the error.
1202
+ */
1203
+ message: string;
1204
+ /**
1205
+ * Type of error encountered while generating a quote or building the list.
1206
+ */
1207
+ type: 'not_enough_info_to_quote' | 'insufficient_credits' | 'internal_service_error';
1208
+ }
1209
+ /**
1210
+ * A single masked preview record returned with a quote so you can sanity check the
1211
+ * kind of contacts that will end up in the mailing list before confirming the
1212
+ * build.
1213
+ */
1214
+ interface PreviewRecord {
1215
+ /**
1216
+ * The masked, comma-joined formatted address of the contact.
1217
+ */
1218
+ formattedAddress: string;
1219
+ /**
1220
+ * The masked name of the contact or business.
1221
+ */
1222
+ name: string;
1223
+ }
1224
+ /**
1225
+ * Details of the quote generated for a targeted list build.
1226
+ */
1227
+ interface Quote {
1228
+ /**
1229
+ * The number of contacts that will be included in the built mailing list. This
1230
+ * accounts for any `limit` that was provided.
1231
+ */
1232
+ count: number;
1233
+ /**
1234
+ * The UTC time at which the quote was generated.
1235
+ */
1236
+ generatedAt: string;
1237
+ /**
1238
+ * The price per contact, in cents. Multiply by `count` to get the total cost of
1239
+ * building the list.
1240
+ */
1241
+ pricePerContactCents: number;
1242
+ }
1243
+ /**
1244
+ * Filters used to target US companies (B2B) when building a list.
1245
+ */
1246
+ interface UsCompanies {
1247
+ /**
1248
+ * Required list of five-digit US ZIP codes to target.
1249
+ */
1250
+ postalCodes: Array<string>;
1251
+ /**
1252
+ * Filter by ownership structure of the company.
1253
+ */
1254
+ companyTypes?: Array<'public' | 'private' | 'educational' | 'government' | 'nonprofit' | 'public_subsidiary'>;
1255
+ /**
1256
+ * Inclusive `[min, max]` range for the number of employees at the company. Values
1257
+ * must be between 1 and 1,000,000.
1258
+ */
1259
+ employeeCount?: Array<number>;
1260
+ /**
1261
+ * Inclusive `[min, max]` range for the year the company was founded. Values must
1262
+ * be between 1600 and 2100.
1263
+ */
1264
+ foundedYear?: Array<number>;
1265
+ /**
1266
+ * Filter by free-form industry names (see the autocomplete endpoint).
1267
+ */
1268
+ industries?: Array<string>;
1269
+ /**
1270
+ * Filter by six-digit [NAICS](https://www.census.gov/naics/) industry codes.
1271
+ */
1272
+ naicsCodes?: Array<string>;
1273
+ /**
1274
+ * Filter by free-form company tags (e.g., `"saas"`, `"b2b"`).
1275
+ */
1276
+ tags?: Array<string>;
1277
+ }
1278
+ /**
1279
+ * Filters used to target US consumers (B2C) when building a list.
1280
+ *
1281
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
1282
+ * exclusive — you may supply at most one of them.
1283
+ */
1284
+ interface UsConsumers {
1285
+ /**
1286
+ * Inclusive `[min, max]` age range. Values must be between 18 and 80.
1287
+ */
1288
+ ageRange?: Array<number>;
1289
+ /**
1290
+ * A list of `"City, ST"` strings (e.g. `"New York, NY"`) to target.
1291
+ */
1292
+ cityStates?: Array<string>;
1293
+ /**
1294
+ * Filter by highest level of education completed.
1295
+ */
1296
+ educationLevels?: Array<'high_school' | 'college' | 'grad_school' | 'vocational_training'>;
1297
+ /**
1298
+ * Gender filter for US consumer list builds.
1299
+ */
1300
+ gender?: 'male' | 'female';
1301
+ /**
1302
+ * Inclusive `[min, max]` home value range, in US dollars. Values must be between 0
1303
+ * and 1,000,000.
1304
+ */
1305
+ homeValueRange?: Array<number>;
1306
+ /**
1307
+ * Inclusive `[min, max]` annual household income range, in US dollars. Values must
1308
+ * be between 0 and 200,000.
1309
+ */
1310
+ incomeRange?: Array<number>;
1311
+ /**
1312
+ * Inclusive `[min, max]` number of children in the household. Values must be
1313
+ * between 0 and 8.
1314
+ */
1315
+ numChildrenRange?: Array<number>;
1316
+ /**
1317
+ * Filter by occupation classification.
1318
+ */
1319
+ occupations?: Array<'professional_technical' | 'administration_management' | 'sales_service' | 'clerical_white_collar' | 'craftsmen_blue_collar' | 'student' | 'homemaker' | 'retired' | 'farmer' | 'military' | 'religious' | 'self_employed' | 'self_employed_professional_technical' | 'self_employed_administration_management' | 'self_employed_sales_service' | 'self_employed_clerical_white_collar' | 'self_employed_craftsmen_blue_collar' | 'self_employed_student' | 'self_employed_homemaker' | 'self_employed_retired' | 'self_employed_other' | 'educator' | 'financial_professional' | 'legal_professional' | 'medical_professional' | 'other'>;
1320
+ /**
1321
+ * A list of five-digit US ZIP codes to target.
1322
+ */
1323
+ zipCodes?: Array<string>;
1324
+ /**
1325
+ * A geographic filter that selects all ZIP codes within a given radius of a center
1326
+ * ZIP code.
1327
+ */
1328
+ zipCodesAround?: UsConsumers.ZipCodesAround;
1329
+ }
1330
+ namespace UsConsumers {
1331
+ /**
1332
+ * A geographic filter that selects all ZIP codes within a given radius of a center
1333
+ * ZIP code.
1334
+ */
1335
+ interface ZipCodesAround {
1336
+ /**
1337
+ * The radius in miles around `zipCode` to include. Between 0.1 and 100.
1338
+ */
1339
+ radiusInMiles: number;
1340
+ /**
1341
+ * The five-digit ZIP code at the center of the search circle.
1342
+ */
1343
+ zipCode: string;
1344
+ }
1345
+ }
1346
+ }
1347
+ export interface TargetedListBuildCreateParams {
1348
+ /**
1349
+ * Body param: An optional string describing this resource. Will be visible in the
1350
+ * API and the dashboard.
1351
+ */
1352
+ description?: string;
1353
+ /**
1354
+ * Body param: Maximum number of contacts to include in the built mailing list. If
1355
+ * omitted, all matching contacts are included.
1356
+ */
1357
+ limit?: number;
1358
+ /**
1359
+ * Body param: See the section on Metadata.
1360
+ */
1361
+ metadata?: {
1362
+ [key: string]: unknown;
1363
+ };
1364
+ /**
1365
+ * Body param: Filters used to target US companies (B2B) when building a list.
1366
+ */
1367
+ usCompanies?: TargetedListBuildCreateParams.UsCompanies;
1368
+ /**
1369
+ * Body param: Filters used to target US consumers (B2C) when building a list.
1370
+ *
1371
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
1372
+ * exclusive — you may supply at most one of them.
1373
+ */
1374
+ usConsumers?: TargetedListBuildCreateParams.UsConsumers;
1375
+ /**
1376
+ * Header param
1377
+ */
1378
+ 'idempotency-key'?: string;
1379
+ }
1380
+ export declare namespace TargetedListBuildCreateParams {
1381
+ /**
1382
+ * Filters used to target US companies (B2B) when building a list.
1383
+ */
1384
+ interface UsCompanies {
1385
+ /**
1386
+ * Required list of five-digit US ZIP codes to target.
1387
+ */
1388
+ postalCodes: Array<string>;
1389
+ /**
1390
+ * Filter by ownership structure of the company.
1391
+ */
1392
+ companyTypes?: Array<'public' | 'private' | 'educational' | 'government' | 'nonprofit' | 'public_subsidiary'>;
1393
+ /**
1394
+ * Inclusive `[min, max]` range for the number of employees at the company. Values
1395
+ * must be between 1 and 1,000,000.
1396
+ */
1397
+ employeeCount?: Array<number>;
1398
+ /**
1399
+ * Inclusive `[min, max]` range for the year the company was founded. Values must
1400
+ * be between 1600 and 2100.
1401
+ */
1402
+ foundedYear?: Array<number>;
1403
+ /**
1404
+ * Filter by free-form industry names (see the autocomplete endpoint).
1405
+ */
1406
+ industries?: Array<string>;
1407
+ /**
1408
+ * Filter by six-digit [NAICS](https://www.census.gov/naics/) industry codes.
1409
+ */
1410
+ naicsCodes?: Array<string>;
1411
+ /**
1412
+ * Filter by free-form company tags (e.g., `"saas"`, `"b2b"`).
1413
+ */
1414
+ tags?: Array<string>;
1415
+ }
1416
+ /**
1417
+ * Filters used to target US consumers (B2C) when building a list.
1418
+ *
1419
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
1420
+ * exclusive — you may supply at most one of them.
1421
+ */
1422
+ interface UsConsumers {
1423
+ /**
1424
+ * Inclusive `[min, max]` age range. Values must be between 18 and 80.
1425
+ */
1426
+ ageRange?: Array<number>;
1427
+ /**
1428
+ * A list of `"City, ST"` strings (e.g. `"New York, NY"`) to target.
1429
+ */
1430
+ cityStates?: Array<string>;
1431
+ /**
1432
+ * Filter by highest level of education completed.
1433
+ */
1434
+ educationLevels?: Array<'high_school' | 'college' | 'grad_school' | 'vocational_training'>;
1435
+ /**
1436
+ * Gender filter for US consumer list builds.
1437
+ */
1438
+ gender?: 'male' | 'female';
1439
+ /**
1440
+ * Inclusive `[min, max]` home value range, in US dollars. Values must be between 0
1441
+ * and 1,000,000.
1442
+ */
1443
+ homeValueRange?: Array<number>;
1444
+ /**
1445
+ * Inclusive `[min, max]` annual household income range, in US dollars. Values must
1446
+ * be between 0 and 200,000.
1447
+ */
1448
+ incomeRange?: Array<number>;
1449
+ /**
1450
+ * Inclusive `[min, max]` number of children in the household. Values must be
1451
+ * between 0 and 8.
1452
+ */
1453
+ numChildrenRange?: Array<number>;
1454
+ /**
1455
+ * Filter by occupation classification.
1456
+ */
1457
+ occupations?: Array<'professional_technical' | 'administration_management' | 'sales_service' | 'clerical_white_collar' | 'craftsmen_blue_collar' | 'student' | 'homemaker' | 'retired' | 'farmer' | 'military' | 'religious' | 'self_employed' | 'self_employed_professional_technical' | 'self_employed_administration_management' | 'self_employed_sales_service' | 'self_employed_clerical_white_collar' | 'self_employed_craftsmen_blue_collar' | 'self_employed_student' | 'self_employed_homemaker' | 'self_employed_retired' | 'self_employed_other' | 'educator' | 'financial_professional' | 'legal_professional' | 'medical_professional' | 'other'>;
1458
+ /**
1459
+ * A list of five-digit US ZIP codes to target.
1460
+ */
1461
+ zipCodes?: Array<string>;
1462
+ /**
1463
+ * A geographic filter that selects all ZIP codes within a given radius of a center
1464
+ * ZIP code.
1465
+ */
1466
+ zipCodesAround?: UsConsumers.ZipCodesAround;
1467
+ }
1468
+ namespace UsConsumers {
1469
+ /**
1470
+ * A geographic filter that selects all ZIP codes within a given radius of a center
1471
+ * ZIP code.
1472
+ */
1473
+ interface ZipCodesAround {
1474
+ /**
1475
+ * The radius in miles around `zipCode` to include. Between 0.1 and 100.
1476
+ */
1477
+ radiusInMiles: number;
1478
+ /**
1479
+ * The five-digit ZIP code at the center of the search circle.
1480
+ */
1481
+ zipCode: string;
1482
+ }
1483
+ }
1484
+ }
1485
+ export interface TargetedListBuildUpdateParams {
1486
+ /**
1487
+ * An optional string describing this resource. Will be visible in the API and the
1488
+ * dashboard.
1489
+ */
1490
+ description?: string;
1491
+ /**
1492
+ * Maximum number of contacts to include in the built mailing list. If omitted, all
1493
+ * matching contacts are included.
1494
+ */
1495
+ limit?: number;
1496
+ /**
1497
+ * See the section on Metadata.
1498
+ */
1499
+ metadata?: {
1500
+ [key: string]: unknown;
1501
+ };
1502
+ /**
1503
+ * Filters used to target US companies (B2B) when building a list.
1504
+ */
1505
+ usCompanies?: TargetedListBuildUpdateParams.UsCompanies;
1506
+ /**
1507
+ * Filters used to target US consumers (B2C) when building a list.
1508
+ *
1509
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
1510
+ * exclusive — you may supply at most one of them.
1511
+ */
1512
+ usConsumers?: TargetedListBuildUpdateParams.UsConsumers;
1513
+ }
1514
+ export declare namespace TargetedListBuildUpdateParams {
1515
+ /**
1516
+ * Filters used to target US companies (B2B) when building a list.
1517
+ */
1518
+ interface UsCompanies {
1519
+ /**
1520
+ * Required list of five-digit US ZIP codes to target.
1521
+ */
1522
+ postalCodes: Array<string>;
1523
+ /**
1524
+ * Filter by ownership structure of the company.
1525
+ */
1526
+ companyTypes?: Array<'public' | 'private' | 'educational' | 'government' | 'nonprofit' | 'public_subsidiary'>;
1527
+ /**
1528
+ * Inclusive `[min, max]` range for the number of employees at the company. Values
1529
+ * must be between 1 and 1,000,000.
1530
+ */
1531
+ employeeCount?: Array<number>;
1532
+ /**
1533
+ * Inclusive `[min, max]` range for the year the company was founded. Values must
1534
+ * be between 1600 and 2100.
1535
+ */
1536
+ foundedYear?: Array<number>;
1537
+ /**
1538
+ * Filter by free-form industry names (see the autocomplete endpoint).
1539
+ */
1540
+ industries?: Array<string>;
1541
+ /**
1542
+ * Filter by six-digit [NAICS](https://www.census.gov/naics/) industry codes.
1543
+ */
1544
+ naicsCodes?: Array<string>;
1545
+ /**
1546
+ * Filter by free-form company tags (e.g., `"saas"`, `"b2b"`).
1547
+ */
1548
+ tags?: Array<string>;
1549
+ }
1550
+ /**
1551
+ * Filters used to target US consumers (B2C) when building a list.
1552
+ *
1553
+ * The geographic filters (`zipCodesAround`, `cityStates`, `zipCodes`) are mutually
1554
+ * exclusive — you may supply at most one of them.
1555
+ */
1556
+ interface UsConsumers {
1557
+ /**
1558
+ * Inclusive `[min, max]` age range. Values must be between 18 and 80.
1559
+ */
1560
+ ageRange?: Array<number>;
1561
+ /**
1562
+ * A list of `"City, ST"` strings (e.g. `"New York, NY"`) to target.
1563
+ */
1564
+ cityStates?: Array<string>;
1565
+ /**
1566
+ * Filter by highest level of education completed.
1567
+ */
1568
+ educationLevels?: Array<'high_school' | 'college' | 'grad_school' | 'vocational_training'>;
1569
+ /**
1570
+ * Gender filter for US consumer list builds.
1571
+ */
1572
+ gender?: 'male' | 'female';
1573
+ /**
1574
+ * Inclusive `[min, max]` home value range, in US dollars. Values must be between 0
1575
+ * and 1,000,000.
1576
+ */
1577
+ homeValueRange?: Array<number>;
1578
+ /**
1579
+ * Inclusive `[min, max]` annual household income range, in US dollars. Values must
1580
+ * be between 0 and 200,000.
1581
+ */
1582
+ incomeRange?: Array<number>;
1583
+ /**
1584
+ * Inclusive `[min, max]` number of children in the household. Values must be
1585
+ * between 0 and 8.
1586
+ */
1587
+ numChildrenRange?: Array<number>;
1588
+ /**
1589
+ * Filter by occupation classification.
1590
+ */
1591
+ occupations?: Array<'professional_technical' | 'administration_management' | 'sales_service' | 'clerical_white_collar' | 'craftsmen_blue_collar' | 'student' | 'homemaker' | 'retired' | 'farmer' | 'military' | 'religious' | 'self_employed' | 'self_employed_professional_technical' | 'self_employed_administration_management' | 'self_employed_sales_service' | 'self_employed_clerical_white_collar' | 'self_employed_craftsmen_blue_collar' | 'self_employed_student' | 'self_employed_homemaker' | 'self_employed_retired' | 'self_employed_other' | 'educator' | 'financial_professional' | 'legal_professional' | 'medical_professional' | 'other'>;
1592
+ /**
1593
+ * A list of five-digit US ZIP codes to target.
1594
+ */
1595
+ zipCodes?: Array<string>;
1596
+ /**
1597
+ * A geographic filter that selects all ZIP codes within a given radius of a center
1598
+ * ZIP code.
1599
+ */
1600
+ zipCodesAround?: UsConsumers.ZipCodesAround;
1601
+ }
1602
+ namespace UsConsumers {
1603
+ /**
1604
+ * A geographic filter that selects all ZIP codes within a given radius of a center
1605
+ * ZIP code.
1606
+ */
1607
+ interface ZipCodesAround {
1608
+ /**
1609
+ * The radius in miles around `zipCode` to include. Between 0.1 and 100.
1610
+ */
1611
+ radiusInMiles: number;
1612
+ /**
1613
+ * The five-digit ZIP code at the center of the search circle.
1614
+ */
1615
+ zipCode: string;
1616
+ }
1617
+ }
1618
+ }
1619
+ export interface TargetedListBuildListParams extends SkipLimitParams {
1620
+ /**
1621
+ * You can supply any string to help narrow down the list of resources. For
1622
+ * example, if you pass `"New York"` (quoted), it will return resources that have
1623
+ * that string present somewhere in their response. Alternatively, you can supply a
1624
+ * structured search query. See the documentation on `StructuredSearchQuery` for
1625
+ * more details.
1626
+ */
1627
+ search?: string;
1628
+ }
1629
+ export declare namespace TargetedListBuilds {
1630
+ export { type TargetedListBuildCreateResponse as TargetedListBuildCreateResponse, type TargetedListBuildRetrieveResponse as TargetedListBuildRetrieveResponse, type TargetedListBuildUpdateResponse as TargetedListBuildUpdateResponse, type TargetedListBuildListResponse as TargetedListBuildListResponse, type TargetedListBuildDeleteResponse as TargetedListBuildDeleteResponse, type TargetedListBuildConfirmResponse as TargetedListBuildConfirmResponse, type TargetedListBuildListResponsesSkipLimit as TargetedListBuildListResponsesSkipLimit, type TargetedListBuildCreateParams as TargetedListBuildCreateParams, type TargetedListBuildUpdateParams as TargetedListBuildUpdateParams, type TargetedListBuildListParams as TargetedListBuildListParams, };
1631
+ export { Filters as Filters, type FilterAutocompleteResponse as FilterAutocompleteResponse, type FilterAutocompleteParams as FilterAutocompleteParams, };
1632
+ }
1633
+ //# sourceMappingURL=targeted-list-builds.d.mts.map