postgrid-node 0.5.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (422) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/LICENSE +1 -1
  3. package/README.md +13 -10
  4. package/client.d.mts +30 -10
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +30 -10
  7. package/client.d.ts.map +1 -1
  8. package/client.js +56 -10
  9. package/client.js.map +1 -1
  10. package/client.mjs +57 -11
  11. package/client.mjs.map +1 -1
  12. package/internal/parse.d.mts.map +1 -1
  13. package/internal/parse.d.ts.map +1 -1
  14. package/internal/parse.js +5 -0
  15. package/internal/parse.js.map +1 -1
  16. package/internal/parse.mjs +5 -0
  17. package/internal/parse.mjs.map +1 -1
  18. package/internal/types.d.mts +6 -6
  19. package/internal/types.d.mts.map +1 -1
  20. package/internal/types.d.ts +6 -6
  21. package/internal/types.d.ts.map +1 -1
  22. package/internal/utils/env.js +2 -2
  23. package/internal/utils/env.js.map +1 -1
  24. package/internal/utils/env.mjs +2 -2
  25. package/internal/utils/env.mjs.map +1 -1
  26. package/internal/utils/log.d.mts.map +1 -1
  27. package/internal/utils/log.d.ts.map +1 -1
  28. package/internal/utils/log.js +3 -2
  29. package/internal/utils/log.js.map +1 -1
  30. package/internal/utils/log.mjs +3 -2
  31. package/internal/utils/log.mjs.map +1 -1
  32. package/internal/utils/query.d.mts +5 -0
  33. package/internal/utils/query.d.mts.map +1 -0
  34. package/internal/utils/query.d.ts +5 -0
  35. package/internal/utils/query.d.ts.map +1 -0
  36. package/internal/utils/query.js +23 -0
  37. package/internal/utils/query.js.map +1 -0
  38. package/internal/utils/query.mjs +20 -0
  39. package/internal/utils/query.mjs.map +1 -0
  40. package/internal/utils.d.mts +1 -0
  41. package/internal/utils.d.ts +1 -0
  42. package/internal/utils.js +1 -0
  43. package/internal/utils.js.map +1 -1
  44. package/internal/utils.mjs +1 -0
  45. package/package.json +7 -1
  46. package/resources/address-verification.d.mts +1689 -15
  47. package/resources/address-verification.d.mts.map +1 -1
  48. package/resources/address-verification.d.ts +1689 -15
  49. package/resources/address-verification.d.ts.map +1 -1
  50. package/resources/address-verification.js +200 -0
  51. package/resources/address-verification.js.map +1 -1
  52. package/resources/address-verification.mjs +200 -0
  53. package/resources/address-verification.mjs.map +1 -1
  54. package/resources/index.d.mts +3 -3
  55. package/resources/index.d.mts.map +1 -1
  56. package/resources/index.d.ts +3 -3
  57. package/resources/index.d.ts.map +1 -1
  58. package/resources/index.js.map +1 -1
  59. package/resources/index.mjs +1 -1
  60. package/resources/index.mjs.map +1 -1
  61. package/resources/intl-address-verification.d.mts +956 -35
  62. package/resources/intl-address-verification.d.mts.map +1 -1
  63. package/resources/intl-address-verification.d.ts +956 -35
  64. package/resources/intl-address-verification.d.ts.map +1 -1
  65. package/resources/intl-address-verification.js +121 -27
  66. package/resources/intl-address-verification.js.map +1 -1
  67. package/resources/intl-address-verification.mjs +121 -27
  68. package/resources/intl-address-verification.mjs.map +1 -1
  69. package/resources/print-mail/boxes.d.mts +995 -0
  70. package/resources/print-mail/boxes.d.mts.map +1 -0
  71. package/resources/print-mail/boxes.d.ts +995 -0
  72. package/resources/print-mail/boxes.d.ts.map +1 -0
  73. package/resources/print-mail/boxes.js +103 -0
  74. package/resources/print-mail/boxes.js.map +1 -0
  75. package/resources/print-mail/boxes.mjs +99 -0
  76. package/resources/print-mail/boxes.mjs.map +1 -0
  77. package/resources/print-mail/campaigns.d.mts +923 -34
  78. package/resources/print-mail/campaigns.d.mts.map +1 -1
  79. package/resources/print-mail/campaigns.d.ts +923 -34
  80. package/resources/print-mail/campaigns.d.ts.map +1 -1
  81. package/resources/print-mail/campaigns.js +10 -3
  82. package/resources/print-mail/campaigns.js.map +1 -1
  83. package/resources/print-mail/campaigns.mjs +10 -3
  84. package/resources/print-mail/campaigns.mjs.map +1 -1
  85. package/resources/print-mail/cheques.d.mts +35 -5
  86. package/resources/print-mail/cheques.d.mts.map +1 -1
  87. package/resources/print-mail/cheques.d.ts +35 -5
  88. package/resources/print-mail/cheques.d.ts.map +1 -1
  89. package/resources/print-mail/cheques.js +32 -0
  90. package/resources/print-mail/cheques.js.map +1 -1
  91. package/resources/print-mail/cheques.mjs +32 -0
  92. package/resources/print-mail/cheques.mjs.map +1 -1
  93. package/resources/print-mail/contacts.d.mts +138 -3
  94. package/resources/print-mail/contacts.d.mts.map +1 -1
  95. package/resources/print-mail/contacts.d.ts +138 -3
  96. package/resources/print-mail/contacts.d.ts.map +1 -1
  97. package/resources/print-mail/contacts.js.map +1 -1
  98. package/resources/print-mail/contacts.mjs.map +1 -1
  99. package/resources/print-mail/index.d.mts +12 -7
  100. package/resources/print-mail/index.d.mts.map +1 -1
  101. package/resources/print-mail/index.d.ts +12 -7
  102. package/resources/print-mail/index.d.ts.map +1 -1
  103. package/resources/print-mail/index.js +15 -5
  104. package/resources/print-mail/index.js.map +1 -1
  105. package/resources/print-mail/index.mjs +6 -1
  106. package/resources/print-mail/index.mjs.map +1 -1
  107. package/resources/print-mail/letters.d.mts +36 -6
  108. package/resources/print-mail/letters.d.mts.map +1 -1
  109. package/resources/print-mail/letters.d.ts +36 -6
  110. package/resources/print-mail/letters.d.ts.map +1 -1
  111. package/resources/print-mail/letters.js +32 -0
  112. package/resources/print-mail/letters.js.map +1 -1
  113. package/resources/print-mail/letters.mjs +32 -0
  114. package/resources/print-mail/letters.mjs.map +1 -1
  115. package/resources/print-mail/mailing-list-imports.d.mts +5 -1
  116. package/resources/print-mail/mailing-list-imports.d.mts.map +1 -1
  117. package/resources/print-mail/mailing-list-imports.d.ts +5 -1
  118. package/resources/print-mail/mailing-list-imports.d.ts.map +1 -1
  119. package/resources/print-mail/mailing-list-imports.js +4 -0
  120. package/resources/print-mail/mailing-list-imports.js.map +1 -1
  121. package/resources/print-mail/mailing-list-imports.mjs +4 -0
  122. package/resources/print-mail/mailing-list-imports.mjs.map +1 -1
  123. package/resources/print-mail/mailing-lists.d.mts +5 -1
  124. package/resources/print-mail/mailing-lists.d.mts.map +1 -1
  125. package/resources/print-mail/mailing-lists.d.ts +5 -1
  126. package/resources/print-mail/mailing-lists.d.ts.map +1 -1
  127. package/resources/print-mail/mailing-lists.js +4 -0
  128. package/resources/print-mail/mailing-lists.js.map +1 -1
  129. package/resources/print-mail/mailing-lists.mjs +4 -0
  130. package/resources/print-mail/mailing-lists.mjs.map +1 -1
  131. package/resources/print-mail/postcards.d.mts +63 -13
  132. package/resources/print-mail/postcards.d.mts.map +1 -1
  133. package/resources/print-mail/postcards.d.ts +63 -13
  134. package/resources/print-mail/postcards.d.ts.map +1 -1
  135. package/resources/print-mail/postcards.js +33 -0
  136. package/resources/print-mail/postcards.js.map +1 -1
  137. package/resources/print-mail/postcards.mjs +33 -0
  138. package/resources/print-mail/postcards.mjs.map +1 -1
  139. package/resources/print-mail/print-mail.d.mts +42 -159
  140. package/resources/print-mail/print-mail.d.mts.map +1 -1
  141. package/resources/print-mail/print-mail.d.ts +42 -159
  142. package/resources/print-mail/print-mail.d.ts.map +1 -1
  143. package/resources/print-mail/print-mail.js +36 -16
  144. package/resources/print-mail/print-mail.js.map +1 -1
  145. package/resources/print-mail/print-mail.mjs +36 -16
  146. package/resources/print-mail/print-mail.mjs.map +1 -1
  147. package/resources/print-mail/reports/exports.d.mts +7 -0
  148. package/resources/print-mail/reports/exports.d.mts.map +1 -1
  149. package/resources/print-mail/reports/exports.d.ts +7 -0
  150. package/resources/print-mail/reports/exports.d.ts.map +1 -1
  151. package/resources/print-mail/reports/exports.js +7 -0
  152. package/resources/print-mail/reports/exports.js.map +1 -1
  153. package/resources/print-mail/reports/exports.mjs +7 -0
  154. package/resources/print-mail/reports/exports.mjs.map +1 -1
  155. package/resources/print-mail/reports/reports.d.mts +7 -0
  156. package/resources/print-mail/reports/reports.d.mts.map +1 -1
  157. package/resources/print-mail/reports/reports.d.ts +7 -0
  158. package/resources/print-mail/reports/reports.d.ts.map +1 -1
  159. package/resources/print-mail/reports/reports.js +7 -0
  160. package/resources/print-mail/reports/reports.js.map +1 -1
  161. package/resources/print-mail/reports/reports.mjs +7 -0
  162. package/resources/print-mail/reports/reports.mjs.map +1 -1
  163. package/resources/print-mail/reports/samples.d.mts +7 -0
  164. package/resources/print-mail/reports/samples.d.mts.map +1 -1
  165. package/resources/print-mail/reports/samples.d.ts +7 -0
  166. package/resources/print-mail/reports/samples.d.ts.map +1 -1
  167. package/resources/print-mail/reports/samples.js +7 -0
  168. package/resources/print-mail/reports/samples.js.map +1 -1
  169. package/resources/print-mail/reports/samples.mjs +7 -0
  170. package/resources/print-mail/reports/samples.mjs.map +1 -1
  171. package/resources/print-mail/self-mailers.d.mts +25 -12
  172. package/resources/print-mail/self-mailers.d.mts.map +1 -1
  173. package/resources/print-mail/self-mailers.d.ts +25 -12
  174. package/resources/print-mail/self-mailers.d.ts.map +1 -1
  175. package/resources/print-mail/self-mailers.js +17 -0
  176. package/resources/print-mail/self-mailers.js.map +1 -1
  177. package/resources/print-mail/self-mailers.mjs +17 -0
  178. package/resources/print-mail/self-mailers.mjs.map +1 -1
  179. package/resources/print-mail/snap-packs.d.mts +1060 -0
  180. package/resources/print-mail/snap-packs.d.mts.map +1 -0
  181. package/resources/print-mail/snap-packs.d.ts +1060 -0
  182. package/resources/print-mail/snap-packs.d.ts.map +1 -0
  183. package/resources/print-mail/snap-packs.js +117 -0
  184. package/resources/print-mail/snap-packs.js.map +1 -0
  185. package/resources/print-mail/snap-packs.mjs +113 -0
  186. package/resources/print-mail/snap-packs.mjs.map +1 -0
  187. package/resources/print-mail/sub-organizations.d.mts +29 -17
  188. package/resources/print-mail/sub-organizations.d.mts.map +1 -1
  189. package/resources/print-mail/sub-organizations.d.ts +29 -17
  190. package/resources/print-mail/sub-organizations.d.ts.map +1 -1
  191. package/resources/print-mail/sub-organizations.js +26 -14
  192. package/resources/print-mail/sub-organizations.js.map +1 -1
  193. package/resources/print-mail/sub-organizations.mjs +26 -14
  194. package/resources/print-mail/sub-organizations.mjs.map +1 -1
  195. package/resources/print-mail/targeted-list-builds/filters.d.mts +92 -0
  196. package/resources/print-mail/targeted-list-builds/filters.d.mts.map +1 -0
  197. package/resources/print-mail/targeted-list-builds/filters.d.ts +92 -0
  198. package/resources/print-mail/targeted-list-builds/filters.d.ts.map +1 -0
  199. package/resources/print-mail/targeted-list-builds/filters.js +60 -0
  200. package/resources/print-mail/targeted-list-builds/filters.js.map +1 -0
  201. package/resources/print-mail/targeted-list-builds/filters.mjs +56 -0
  202. package/resources/print-mail/targeted-list-builds/filters.mjs.map +1 -0
  203. package/resources/print-mail/targeted-list-builds/index.d.mts +3 -0
  204. package/resources/print-mail/targeted-list-builds/index.d.mts.map +1 -0
  205. package/resources/print-mail/targeted-list-builds/index.d.ts +3 -0
  206. package/resources/print-mail/targeted-list-builds/index.d.ts.map +1 -0
  207. package/resources/print-mail/targeted-list-builds/index.js +9 -0
  208. package/resources/print-mail/targeted-list-builds/index.js.map +1 -0
  209. package/resources/print-mail/targeted-list-builds/index.mjs +4 -0
  210. package/resources/print-mail/targeted-list-builds/index.mjs.map +1 -0
  211. package/resources/print-mail/targeted-list-builds/targeted-list-builds.d.mts +1633 -0
  212. package/resources/print-mail/targeted-list-builds/targeted-list-builds.d.mts.map +1 -0
  213. package/resources/print-mail/targeted-list-builds/targeted-list-builds.d.ts +1633 -0
  214. package/resources/print-mail/targeted-list-builds/targeted-list-builds.d.ts.map +1 -0
  215. package/resources/print-mail/targeted-list-builds/targeted-list-builds.js +154 -0
  216. package/resources/print-mail/targeted-list-builds/targeted-list-builds.js.map +1 -0
  217. package/resources/print-mail/targeted-list-builds/targeted-list-builds.mjs +149 -0
  218. package/resources/print-mail/targeted-list-builds/targeted-list-builds.mjs.map +1 -0
  219. package/resources/print-mail/targeted-list-builds.d.mts +2 -0
  220. package/resources/print-mail/targeted-list-builds.d.mts.map +1 -0
  221. package/resources/print-mail/targeted-list-builds.d.ts +2 -0
  222. package/resources/print-mail/targeted-list-builds.d.ts.map +1 -0
  223. package/resources/print-mail/targeted-list-builds.js +6 -0
  224. package/resources/print-mail/targeted-list-builds.js.map +1 -0
  225. package/resources/print-mail/targeted-list-builds.mjs +3 -0
  226. package/resources/print-mail/targeted-list-builds.mjs.map +1 -0
  227. package/resources/print-mail/template-editor-sessions.d.mts +355 -0
  228. package/resources/print-mail/template-editor-sessions.d.mts.map +1 -0
  229. package/resources/print-mail/template-editor-sessions.d.ts +355 -0
  230. package/resources/print-mail/template-editor-sessions.d.ts.map +1 -0
  231. package/resources/print-mail/template-editor-sessions.js +78 -0
  232. package/resources/print-mail/template-editor-sessions.js.map +1 -0
  233. package/resources/print-mail/template-editor-sessions.mjs +74 -0
  234. package/resources/print-mail/template-editor-sessions.mjs.map +1 -0
  235. package/resources/print-mail/trackers.d.mts +409 -0
  236. package/resources/print-mail/trackers.d.mts.map +1 -0
  237. package/resources/print-mail/trackers.d.ts +409 -0
  238. package/resources/print-mail/trackers.d.ts.map +1 -0
  239. package/resources/print-mail/trackers.js +116 -0
  240. package/resources/print-mail/trackers.js.map +1 -0
  241. package/resources/print-mail/trackers.mjs +112 -0
  242. package/resources/print-mail/trackers.mjs.map +1 -0
  243. package/resources/print-mail/virtual-mailboxes/index.d.mts +3 -0
  244. package/resources/print-mail/virtual-mailboxes/index.d.mts.map +1 -0
  245. package/resources/print-mail/virtual-mailboxes/index.d.ts +3 -0
  246. package/resources/print-mail/virtual-mailboxes/index.d.ts.map +1 -0
  247. package/resources/print-mail/virtual-mailboxes/index.js +9 -0
  248. package/resources/print-mail/virtual-mailboxes/index.js.map +1 -0
  249. package/resources/print-mail/virtual-mailboxes/index.mjs +4 -0
  250. package/resources/print-mail/virtual-mailboxes/index.mjs.map +1 -0
  251. package/resources/print-mail/virtual-mailboxes/items.d.mts +235 -0
  252. package/resources/print-mail/virtual-mailboxes/items.d.mts.map +1 -0
  253. package/resources/print-mail/virtual-mailboxes/items.d.ts +235 -0
  254. package/resources/print-mail/virtual-mailboxes/items.d.ts.map +1 -0
  255. package/resources/print-mail/virtual-mailboxes/items.js +69 -0
  256. package/resources/print-mail/virtual-mailboxes/items.js.map +1 -0
  257. package/resources/print-mail/virtual-mailboxes/items.mjs +65 -0
  258. package/resources/print-mail/virtual-mailboxes/items.mjs.map +1 -0
  259. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.d.mts +334 -0
  260. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.d.mts.map +1 -0
  261. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.d.ts +334 -0
  262. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.d.ts.map +1 -0
  263. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.js +92 -0
  264. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.js.map +1 -0
  265. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.mjs +87 -0
  266. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.mjs.map +1 -0
  267. package/resources/print-mail/virtual-mailboxes.d.mts +2 -0
  268. package/resources/print-mail/virtual-mailboxes.d.mts.map +1 -0
  269. package/resources/print-mail/virtual-mailboxes.d.ts +2 -0
  270. package/resources/print-mail/virtual-mailboxes.d.ts.map +1 -0
  271. package/resources/print-mail/{order-profiles.js → virtual-mailboxes.js} +2 -2
  272. package/resources/print-mail/virtual-mailboxes.js.map +1 -0
  273. package/resources/print-mail/virtual-mailboxes.mjs +3 -0
  274. package/resources/print-mail/virtual-mailboxes.mjs.map +1 -0
  275. package/src/client.ts +116 -26
  276. package/src/internal/parse.ts +6 -0
  277. package/src/internal/types.ts +6 -8
  278. package/src/internal/utils/env.ts +2 -2
  279. package/src/internal/utils/log.ts +2 -1
  280. package/src/internal/utils/query.ts +23 -0
  281. package/src/internal/utils.ts +1 -0
  282. package/src/resources/address-verification.ts +2190 -24
  283. package/src/resources/index.ts +24 -5
  284. package/src/resources/intl-address-verification.ts +1219 -43
  285. package/src/resources/print-mail/boxes.ts +1324 -0
  286. package/src/resources/print-mail/campaigns.ts +1449 -59
  287. package/src/resources/print-mail/cheques.ts +42 -4
  288. package/src/resources/print-mail/contacts.ts +167 -4
  289. package/src/resources/print-mail/index.ts +79 -4
  290. package/src/resources/print-mail/letters.ts +43 -5
  291. package/src/resources/print-mail/mailing-list-imports.ts +5 -1
  292. package/src/resources/print-mail/mailing-lists.ts +5 -1
  293. package/src/resources/print-mail/postcards.ts +74 -12
  294. package/src/resources/print-mail/print-mail.ts +245 -239
  295. package/src/resources/print-mail/reports/exports.ts +7 -0
  296. package/src/resources/print-mail/reports/reports.ts +7 -0
  297. package/src/resources/print-mail/reports/samples.ts +7 -0
  298. package/src/resources/print-mail/self-mailers.ts +28 -12
  299. package/src/resources/print-mail/snap-packs.ts +1484 -0
  300. package/src/resources/print-mail/sub-organizations.ts +35 -23
  301. package/src/resources/print-mail/targeted-list-builds/filters.ts +113 -0
  302. package/src/resources/print-mail/targeted-list-builds/index.ts +16 -0
  303. package/src/resources/print-mail/targeted-list-builds/targeted-list-builds.ts +2158 -0
  304. package/{resources/print-mail/order-profiles.mjs → src/resources/print-mail/targeted-list-builds.ts} +2 -2
  305. package/src/resources/print-mail/template-editor-sessions.ts +435 -0
  306. package/src/resources/print-mail/trackers.ts +513 -0
  307. package/src/resources/print-mail/virtual-mailboxes/index.ts +22 -0
  308. package/src/resources/print-mail/virtual-mailboxes/items.ts +296 -0
  309. package/src/resources/print-mail/virtual-mailboxes/virtual-mailboxes.ts +434 -0
  310. package/src/resources/print-mail/{order-profiles.ts → virtual-mailboxes.ts} +1 -1
  311. package/src/version.ts +1 -1
  312. package/version.d.mts +1 -1
  313. package/version.d.ts +1 -1
  314. package/version.js +1 -1
  315. package/version.mjs +1 -1
  316. package/internal/qs/formats.d.mts +0 -7
  317. package/internal/qs/formats.d.mts.map +0 -1
  318. package/internal/qs/formats.d.ts +0 -7
  319. package/internal/qs/formats.d.ts.map +0 -1
  320. package/internal/qs/formats.js +0 -13
  321. package/internal/qs/formats.js.map +0 -1
  322. package/internal/qs/formats.mjs +0 -9
  323. package/internal/qs/formats.mjs.map +0 -1
  324. package/internal/qs/index.d.mts +0 -10
  325. package/internal/qs/index.d.mts.map +0 -1
  326. package/internal/qs/index.d.ts +0 -10
  327. package/internal/qs/index.d.ts.map +0 -1
  328. package/internal/qs/index.js +0 -14
  329. package/internal/qs/index.js.map +0 -1
  330. package/internal/qs/index.mjs +0 -10
  331. package/internal/qs/index.mjs.map +0 -1
  332. package/internal/qs/stringify.d.mts +0 -3
  333. package/internal/qs/stringify.d.mts.map +0 -1
  334. package/internal/qs/stringify.d.ts +0 -3
  335. package/internal/qs/stringify.d.ts.map +0 -1
  336. package/internal/qs/stringify.js +0 -277
  337. package/internal/qs/stringify.js.map +0 -1
  338. package/internal/qs/stringify.mjs +0 -274
  339. package/internal/qs/stringify.mjs.map +0 -1
  340. package/internal/qs/types.d.mts +0 -57
  341. package/internal/qs/types.d.mts.map +0 -1
  342. package/internal/qs/types.d.ts +0 -57
  343. package/internal/qs/types.d.ts.map +0 -1
  344. package/internal/qs/types.js +0 -3
  345. package/internal/qs/types.js.map +0 -1
  346. package/internal/qs/types.mjs +0 -2
  347. package/internal/qs/types.mjs.map +0 -1
  348. package/internal/qs/utils.d.mts +0 -15
  349. package/internal/qs/utils.d.mts.map +0 -1
  350. package/internal/qs/utils.d.ts +0 -15
  351. package/internal/qs/utils.d.ts.map +0 -1
  352. package/internal/qs/utils.js +0 -230
  353. package/internal/qs/utils.js.map +0 -1
  354. package/internal/qs/utils.mjs +0 -217
  355. package/internal/qs/utils.mjs.map +0 -1
  356. package/resources/print-mail/order-profiles/cheques.d.mts +0 -387
  357. package/resources/print-mail/order-profiles/cheques.d.mts.map +0 -1
  358. package/resources/print-mail/order-profiles/cheques.d.ts +0 -387
  359. package/resources/print-mail/order-profiles/cheques.d.ts.map +0 -1
  360. package/resources/print-mail/order-profiles/cheques.js +0 -98
  361. package/resources/print-mail/order-profiles/cheques.js.map +0 -1
  362. package/resources/print-mail/order-profiles/cheques.mjs +0 -94
  363. package/resources/print-mail/order-profiles/cheques.mjs.map +0 -1
  364. package/resources/print-mail/order-profiles/index.d.mts +0 -6
  365. package/resources/print-mail/order-profiles/index.d.mts.map +0 -1
  366. package/resources/print-mail/order-profiles/index.d.ts +0 -6
  367. package/resources/print-mail/order-profiles/index.d.ts.map +0 -1
  368. package/resources/print-mail/order-profiles/index.js +0 -15
  369. package/resources/print-mail/order-profiles/index.js.map +0 -1
  370. package/resources/print-mail/order-profiles/index.mjs +0 -7
  371. package/resources/print-mail/order-profiles/index.mjs.map +0 -1
  372. package/resources/print-mail/order-profiles/letters.d.mts +0 -324
  373. package/resources/print-mail/order-profiles/letters.d.mts.map +0 -1
  374. package/resources/print-mail/order-profiles/letters.d.ts +0 -324
  375. package/resources/print-mail/order-profiles/letters.d.ts.map +0 -1
  376. package/resources/print-mail/order-profiles/letters.js +0 -105
  377. package/resources/print-mail/order-profiles/letters.js.map +0 -1
  378. package/resources/print-mail/order-profiles/letters.mjs +0 -101
  379. package/resources/print-mail/order-profiles/letters.mjs.map +0 -1
  380. package/resources/print-mail/order-profiles/order-profiles.d.mts +0 -22
  381. package/resources/print-mail/order-profiles/order-profiles.d.mts.map +0 -1
  382. package/resources/print-mail/order-profiles/order-profiles.d.ts +0 -22
  383. package/resources/print-mail/order-profiles/order-profiles.d.ts.map +0 -1
  384. package/resources/print-mail/order-profiles/order-profiles.js +0 -29
  385. package/resources/print-mail/order-profiles/order-profiles.js.map +0 -1
  386. package/resources/print-mail/order-profiles/order-profiles.mjs +0 -24
  387. package/resources/print-mail/order-profiles/order-profiles.mjs.map +0 -1
  388. package/resources/print-mail/order-profiles/postcards.d.mts +0 -254
  389. package/resources/print-mail/order-profiles/postcards.d.mts.map +0 -1
  390. package/resources/print-mail/order-profiles/postcards.d.ts +0 -254
  391. package/resources/print-mail/order-profiles/postcards.d.ts.map +0 -1
  392. package/resources/print-mail/order-profiles/postcards.js +0 -97
  393. package/resources/print-mail/order-profiles/postcards.js.map +0 -1
  394. package/resources/print-mail/order-profiles/postcards.mjs +0 -93
  395. package/resources/print-mail/order-profiles/postcards.mjs.map +0 -1
  396. package/resources/print-mail/order-profiles/self-mailers.d.mts +0 -259
  397. package/resources/print-mail/order-profiles/self-mailers.d.mts.map +0 -1
  398. package/resources/print-mail/order-profiles/self-mailers.d.ts +0 -259
  399. package/resources/print-mail/order-profiles/self-mailers.d.ts.map +0 -1
  400. package/resources/print-mail/order-profiles/self-mailers.js +0 -95
  401. package/resources/print-mail/order-profiles/self-mailers.js.map +0 -1
  402. package/resources/print-mail/order-profiles/self-mailers.mjs +0 -91
  403. package/resources/print-mail/order-profiles/self-mailers.mjs.map +0 -1
  404. package/resources/print-mail/order-profiles.d.mts +0 -2
  405. package/resources/print-mail/order-profiles.d.mts.map +0 -1
  406. package/resources/print-mail/order-profiles.d.ts +0 -2
  407. package/resources/print-mail/order-profiles.d.ts.map +0 -1
  408. package/resources/print-mail/order-profiles.js.map +0 -1
  409. package/resources/print-mail/order-profiles.mjs.map +0 -1
  410. package/src/internal/qs/LICENSE.md +0 -13
  411. package/src/internal/qs/README.md +0 -3
  412. package/src/internal/qs/formats.ts +0 -10
  413. package/src/internal/qs/index.ts +0 -13
  414. package/src/internal/qs/stringify.ts +0 -385
  415. package/src/internal/qs/types.ts +0 -71
  416. package/src/internal/qs/utils.ts +0 -265
  417. package/src/resources/print-mail/order-profiles/cheques.ts +0 -589
  418. package/src/resources/print-mail/order-profiles/index.ts +0 -47
  419. package/src/resources/print-mail/order-profiles/letters.ts +0 -489
  420. package/src/resources/print-mail/order-profiles/order-profiles.ts +0 -113
  421. package/src/resources/print-mail/order-profiles/postcards.ts +0 -404
  422. package/src/resources/print-mail/order-profiles/self-mailers.ts +0 -415
@@ -0,0 +1,995 @@
1
+ import { APIResource } from "../../core/resource.mjs";
2
+ import * as ContactsAPI from "./contacts.mjs";
3
+ import { APIPromise } from "../../core/api-promise.mjs";
4
+ import { PagePromise, SkipLimit, type SkipLimitParams } from "../../core/pagination.mjs";
5
+ import { RequestOptions } from "../../internal/request-options.mjs";
6
+ export declare class Boxes extends APIResource {
7
+ /**
8
+ * This endpoint allows you to create a box containing up to 100 cheques. A Box is
9
+ * mailed to a single destination.
10
+ *
11
+ * To create a box. You must specify:
12
+ *
13
+ * - `to`: The recipient (contact or contact ID)
14
+ * - `from`: The sender (contact or contact ID)
15
+ * - `cheques`: An array of cheques to go in the box
16
+ *
17
+ * For each cheque You must specify:
18
+ *
19
+ * - `to`: The recipient (contact or contact ID)
20
+ * - `from`: The sender (contact or contact ID)
21
+ * - `bankAccount`: The bank account ID
22
+ * - `amount`: The amount to be sent
23
+ * - `number`: The cheque number
24
+ *
25
+ * @example
26
+ * ```ts
27
+ * const box = await client.printMail.boxes.create({
28
+ * cheques: [
29
+ * {
30
+ * from: 'contact_456',
31
+ * to: 'contact_123',
32
+ * bankAccount: 'bank_abc',
33
+ * amount: 5000,
34
+ * number: 1042,
35
+ * },
36
+ * ],
37
+ * from: 'contact_456',
38
+ * to: 'contact_123',
39
+ * });
40
+ * ```
41
+ */
42
+ create(body: BoxCreateParams, options?: RequestOptions): APIPromise<BoxCreateResponse>;
43
+ /**
44
+ * Retrieve a box by ID.
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * const box = await client.printMail.boxes.retrieve('id');
49
+ * ```
50
+ */
51
+ retrieve(id: string, options?: RequestOptions): APIPromise<BoxRetrieveResponse>;
52
+ /**
53
+ * List all boxes.
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * // Automatically fetches more pages as needed.
58
+ * for await (const boxListResponse of client.printMail.boxes.list()) {
59
+ * // ...
60
+ * }
61
+ * ```
62
+ */
63
+ list(query?: BoxListParams | null | undefined, options?: RequestOptions): PagePromise<BoxListResponsesSkipLimit, BoxListResponse>;
64
+ /**
65
+ * Cancel a box by ID (cannot be undone).
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * const box = await client.printMail.boxes.delete('id');
70
+ * ```
71
+ */
72
+ delete(id: string, options?: RequestOptions): APIPromise<BoxDeleteResponse>;
73
+ /**
74
+ * Progresses a box's `status` to the next stage. This is only available in test
75
+ * mode and can be used to simulate how a live order would progress through the
76
+ * different statuses.
77
+ *
78
+ * Note: this will fail with an `invalid_progression_error` if the status is one of
79
+ * `completed` or `cancelled`.
80
+ *
81
+ * @example
82
+ * ```ts
83
+ * const response = await client.printMail.boxes.progressions(
84
+ * 'id',
85
+ * );
86
+ * ```
87
+ */
88
+ progressions(id: string, options?: RequestOptions): APIPromise<BoxProgressionsResponse>;
89
+ }
90
+ export type BoxListResponsesSkipLimit = SkipLimit<BoxListResponse>;
91
+ export interface BoxCreateResponse {
92
+ /**
93
+ * A unique ID prefixed with box\_
94
+ */
95
+ id: string;
96
+ /**
97
+ * The cheques inside this box (in read mode).
98
+ */
99
+ cheques: Array<BoxCreateResponse.Cheque>;
100
+ /**
101
+ * The UTC time at which this resource was created.
102
+ */
103
+ createdAt: string;
104
+ /**
105
+ * The contact of the 'from' field in read mode should be a fully expanded Contact.
106
+ */
107
+ from: ContactsAPI.Contact;
108
+ /**
109
+ * `true` if this is a live mode resource else `false`.
110
+ */
111
+ live: boolean;
112
+ /**
113
+ * The mailing class of this order. This determines the speed and cost of delivery.
114
+ * See `OrderMailingClass` for more details.
115
+ */
116
+ mailingClass: 'first_class' | 'standard_class' | 'express' | 'certified' | 'certified_return_receipt' | 'registered' | 'usps_first_class' | 'usps_standard_class' | 'usps_eddm' | 'usps_express_2_day' | 'usps_express_3_day' | 'usps_first_class_certified' | 'usps_first_class_certified_return_receipt' | 'usps_first_class_registered' | 'usps_express_3_day_signature_confirmation' | 'usps_express_3_day_certified' | 'usps_express_3_day_certified_return_receipt' | 'ca_post_lettermail' | 'ca_post_personalized' | 'ca_post_neighbourhood_mail' | 'ups_express_overnight' | 'ups_express_2_day' | 'ups_express_3_day' | 'royal_mail_first_class' | 'royal_mail_second_class' | 'au_post_second_class';
117
+ /**
118
+ * Always "box".
119
+ */
120
+ object: 'box';
121
+ /**
122
+ * This order will transition from `ready` to `printing` on the day after this
123
+ * date. For example, if this is a date on Tuesday, the order will transition to
124
+ * `printing` on Wednesday at midnight eastern time.
125
+ */
126
+ sendDate: string;
127
+ /**
128
+ * See `OrderStatus` for more details on the status of this order.
129
+ */
130
+ status: 'ready' | 'printing' | 'processed_for_delivery' | 'completed' | 'cancelled';
131
+ /**
132
+ * The recipient of this order. This will be provided even if you delete the
133
+ * underlying contact.
134
+ */
135
+ to: ContactsAPI.Contact;
136
+ /**
137
+ * The UTC time at which this resource was last updated.
138
+ */
139
+ updatedAt: string;
140
+ /**
141
+ * The cancellation details of this order. Populated if the order has been
142
+ * cancelled.
143
+ */
144
+ cancellation?: BoxCreateResponse.Cancellation;
145
+ /**
146
+ * An optional string describing this resource. Will be visible in the API and the
147
+ * dashboard.
148
+ */
149
+ description?: string;
150
+ /**
151
+ * The last date that the IMB status was updated. See `imbStatus` for more details.
152
+ */
153
+ imbDate?: string;
154
+ /**
155
+ * The Intelligent Mail Barcode (IMB) status of this order. Only populated for
156
+ * US-printed and US-destined orders. This is the most detailed way to track
157
+ * non-express/certified orders.
158
+ */
159
+ imbStatus?: 'entered_mail_stream' | 'out_for_delivery' | 'returned_to_sender';
160
+ /**
161
+ * The most recent ZIP code of the USPS facility that the order has been processed
162
+ * through. Only populated when an `imbStatus` is present.
163
+ */
164
+ imbZIPCode?: string;
165
+ /**
166
+ * These will be merged with the variables in the template or HTML you create this
167
+ * order with. The keys in this object should match the variable names in the
168
+ * template _exactly_ as they are case-sensitive. Note that these _do not_ apply to
169
+ * PDFs uploaded with the order.
170
+ */
171
+ mergeVariables?: {
172
+ [key: string]: unknown;
173
+ };
174
+ /**
175
+ * See the section on Metadata.
176
+ */
177
+ metadata?: {
178
+ [key: string]: unknown;
179
+ };
180
+ /**
181
+ * The tracking number of this order. Populated after an express/certified order
182
+ * has been processed for delivery.
183
+ */
184
+ trackingNumber?: string;
185
+ /**
186
+ * PostGrid renders a PDF preview for all orders. This should be inspected to
187
+ * ensure that the order is correct before it is sent out because it shows what
188
+ * will be printed and mailed to the recipient. Once the PDF preview is generated,
189
+ * this field will be returned by all `GET` endpoints which produce this order.
190
+ *
191
+ * This URL is a signed link to the PDF preview. It will expire after a short
192
+ * period of time. If you need to access this URL after it has expired, you can
193
+ * regenerate it by calling the `GET` endpoint again.
194
+ */
195
+ url?: string;
196
+ }
197
+ export declare namespace BoxCreateResponse {
198
+ interface Cheque {
199
+ /**
200
+ * The amount on the cheque.
201
+ */
202
+ amount: number;
203
+ /**
204
+ * The bank account (ID or reference) from which the cheque amount is drawn.
205
+ */
206
+ bankAccount: string;
207
+ from: ContactsAPI.Contact;
208
+ /**
209
+ * The cheque number.
210
+ */
211
+ number: number;
212
+ to: ContactsAPI.Contact;
213
+ /**
214
+ * A URL to a logo for the cheque (optional).
215
+ */
216
+ logoURL?: string;
217
+ /**
218
+ * The memo text on the cheque (optional).
219
+ */
220
+ memo?: string;
221
+ /**
222
+ * A set of dynamic merge variables for customizing the cheque or accompanying
223
+ * documents (optional).
224
+ */
225
+ mergeVariables?: {
226
+ [key: string]: unknown;
227
+ };
228
+ /**
229
+ * An optional message template to be printed on or with the cheque.
230
+ */
231
+ messageTemplate?: string;
232
+ }
233
+ /**
234
+ * The cancellation details of this order. Populated if the order has been
235
+ * cancelled.
236
+ */
237
+ interface Cancellation {
238
+ /**
239
+ * The reason for the cancellation.
240
+ */
241
+ reason: 'user_initiated' | 'invalid_content' | 'invalid_order_mailing_class';
242
+ /**
243
+ * The user ID who cancelled the order.
244
+ */
245
+ cancelledByUser?: string;
246
+ /**
247
+ * An optional note provided by the user who cancelled the order.
248
+ */
249
+ note?: string;
250
+ }
251
+ }
252
+ export interface BoxRetrieveResponse {
253
+ /**
254
+ * A unique ID prefixed with box\_
255
+ */
256
+ id: string;
257
+ /**
258
+ * The cheques inside this box (in read mode).
259
+ */
260
+ cheques: Array<BoxRetrieveResponse.Cheque>;
261
+ /**
262
+ * The UTC time at which this resource was created.
263
+ */
264
+ createdAt: string;
265
+ /**
266
+ * The contact of the 'from' field in read mode should be a fully expanded Contact.
267
+ */
268
+ from: ContactsAPI.Contact;
269
+ /**
270
+ * `true` if this is a live mode resource else `false`.
271
+ */
272
+ live: boolean;
273
+ /**
274
+ * The mailing class of this order. This determines the speed and cost of delivery.
275
+ * See `OrderMailingClass` for more details.
276
+ */
277
+ mailingClass: 'first_class' | 'standard_class' | 'express' | 'certified' | 'certified_return_receipt' | 'registered' | 'usps_first_class' | 'usps_standard_class' | 'usps_eddm' | 'usps_express_2_day' | 'usps_express_3_day' | 'usps_first_class_certified' | 'usps_first_class_certified_return_receipt' | 'usps_first_class_registered' | 'usps_express_3_day_signature_confirmation' | 'usps_express_3_day_certified' | 'usps_express_3_day_certified_return_receipt' | 'ca_post_lettermail' | 'ca_post_personalized' | 'ca_post_neighbourhood_mail' | 'ups_express_overnight' | 'ups_express_2_day' | 'ups_express_3_day' | 'royal_mail_first_class' | 'royal_mail_second_class' | 'au_post_second_class';
278
+ /**
279
+ * Always "box".
280
+ */
281
+ object: 'box';
282
+ /**
283
+ * This order will transition from `ready` to `printing` on the day after this
284
+ * date. For example, if this is a date on Tuesday, the order will transition to
285
+ * `printing` on Wednesday at midnight eastern time.
286
+ */
287
+ sendDate: string;
288
+ /**
289
+ * See `OrderStatus` for more details on the status of this order.
290
+ */
291
+ status: 'ready' | 'printing' | 'processed_for_delivery' | 'completed' | 'cancelled';
292
+ /**
293
+ * The recipient of this order. This will be provided even if you delete the
294
+ * underlying contact.
295
+ */
296
+ to: ContactsAPI.Contact;
297
+ /**
298
+ * The UTC time at which this resource was last updated.
299
+ */
300
+ updatedAt: string;
301
+ /**
302
+ * The cancellation details of this order. Populated if the order has been
303
+ * cancelled.
304
+ */
305
+ cancellation?: BoxRetrieveResponse.Cancellation;
306
+ /**
307
+ * An optional string describing this resource. Will be visible in the API and the
308
+ * dashboard.
309
+ */
310
+ description?: string;
311
+ /**
312
+ * The last date that the IMB status was updated. See `imbStatus` for more details.
313
+ */
314
+ imbDate?: string;
315
+ /**
316
+ * The Intelligent Mail Barcode (IMB) status of this order. Only populated for
317
+ * US-printed and US-destined orders. This is the most detailed way to track
318
+ * non-express/certified orders.
319
+ */
320
+ imbStatus?: 'entered_mail_stream' | 'out_for_delivery' | 'returned_to_sender';
321
+ /**
322
+ * The most recent ZIP code of the USPS facility that the order has been processed
323
+ * through. Only populated when an `imbStatus` is present.
324
+ */
325
+ imbZIPCode?: string;
326
+ /**
327
+ * These will be merged with the variables in the template or HTML you create this
328
+ * order with. The keys in this object should match the variable names in the
329
+ * template _exactly_ as they are case-sensitive. Note that these _do not_ apply to
330
+ * PDFs uploaded with the order.
331
+ */
332
+ mergeVariables?: {
333
+ [key: string]: unknown;
334
+ };
335
+ /**
336
+ * See the section on Metadata.
337
+ */
338
+ metadata?: {
339
+ [key: string]: unknown;
340
+ };
341
+ /**
342
+ * The tracking number of this order. Populated after an express/certified order
343
+ * has been processed for delivery.
344
+ */
345
+ trackingNumber?: string;
346
+ /**
347
+ * PostGrid renders a PDF preview for all orders. This should be inspected to
348
+ * ensure that the order is correct before it is sent out because it shows what
349
+ * will be printed and mailed to the recipient. Once the PDF preview is generated,
350
+ * this field will be returned by all `GET` endpoints which produce this order.
351
+ *
352
+ * This URL is a signed link to the PDF preview. It will expire after a short
353
+ * period of time. If you need to access this URL after it has expired, you can
354
+ * regenerate it by calling the `GET` endpoint again.
355
+ */
356
+ url?: string;
357
+ }
358
+ export declare namespace BoxRetrieveResponse {
359
+ interface Cheque {
360
+ /**
361
+ * The amount on the cheque.
362
+ */
363
+ amount: number;
364
+ /**
365
+ * The bank account (ID or reference) from which the cheque amount is drawn.
366
+ */
367
+ bankAccount: string;
368
+ from: ContactsAPI.Contact;
369
+ /**
370
+ * The cheque number.
371
+ */
372
+ number: number;
373
+ to: ContactsAPI.Contact;
374
+ /**
375
+ * A URL to a logo for the cheque (optional).
376
+ */
377
+ logoURL?: string;
378
+ /**
379
+ * The memo text on the cheque (optional).
380
+ */
381
+ memo?: string;
382
+ /**
383
+ * A set of dynamic merge variables for customizing the cheque or accompanying
384
+ * documents (optional).
385
+ */
386
+ mergeVariables?: {
387
+ [key: string]: unknown;
388
+ };
389
+ /**
390
+ * An optional message template to be printed on or with the cheque.
391
+ */
392
+ messageTemplate?: string;
393
+ }
394
+ /**
395
+ * The cancellation details of this order. Populated if the order has been
396
+ * cancelled.
397
+ */
398
+ interface Cancellation {
399
+ /**
400
+ * The reason for the cancellation.
401
+ */
402
+ reason: 'user_initiated' | 'invalid_content' | 'invalid_order_mailing_class';
403
+ /**
404
+ * The user ID who cancelled the order.
405
+ */
406
+ cancelledByUser?: string;
407
+ /**
408
+ * An optional note provided by the user who cancelled the order.
409
+ */
410
+ note?: string;
411
+ }
412
+ }
413
+ export interface BoxListResponse {
414
+ /**
415
+ * A unique ID prefixed with box\_
416
+ */
417
+ id: string;
418
+ /**
419
+ * The cheques inside this box (in read mode).
420
+ */
421
+ cheques: Array<BoxListResponse.Cheque>;
422
+ /**
423
+ * The UTC time at which this resource was created.
424
+ */
425
+ createdAt: string;
426
+ /**
427
+ * The contact of the 'from' field in read mode should be a fully expanded Contact.
428
+ */
429
+ from: ContactsAPI.Contact;
430
+ /**
431
+ * `true` if this is a live mode resource else `false`.
432
+ */
433
+ live: boolean;
434
+ /**
435
+ * The mailing class of this order. This determines the speed and cost of delivery.
436
+ * See `OrderMailingClass` for more details.
437
+ */
438
+ mailingClass: 'first_class' | 'standard_class' | 'express' | 'certified' | 'certified_return_receipt' | 'registered' | 'usps_first_class' | 'usps_standard_class' | 'usps_eddm' | 'usps_express_2_day' | 'usps_express_3_day' | 'usps_first_class_certified' | 'usps_first_class_certified_return_receipt' | 'usps_first_class_registered' | 'usps_express_3_day_signature_confirmation' | 'usps_express_3_day_certified' | 'usps_express_3_day_certified_return_receipt' | 'ca_post_lettermail' | 'ca_post_personalized' | 'ca_post_neighbourhood_mail' | 'ups_express_overnight' | 'ups_express_2_day' | 'ups_express_3_day' | 'royal_mail_first_class' | 'royal_mail_second_class' | 'au_post_second_class';
439
+ /**
440
+ * Always "box".
441
+ */
442
+ object: 'box';
443
+ /**
444
+ * This order will transition from `ready` to `printing` on the day after this
445
+ * date. For example, if this is a date on Tuesday, the order will transition to
446
+ * `printing` on Wednesday at midnight eastern time.
447
+ */
448
+ sendDate: string;
449
+ /**
450
+ * See `OrderStatus` for more details on the status of this order.
451
+ */
452
+ status: 'ready' | 'printing' | 'processed_for_delivery' | 'completed' | 'cancelled';
453
+ /**
454
+ * The recipient of this order. This will be provided even if you delete the
455
+ * underlying contact.
456
+ */
457
+ to: ContactsAPI.Contact;
458
+ /**
459
+ * The UTC time at which this resource was last updated.
460
+ */
461
+ updatedAt: string;
462
+ /**
463
+ * The cancellation details of this order. Populated if the order has been
464
+ * cancelled.
465
+ */
466
+ cancellation?: BoxListResponse.Cancellation;
467
+ /**
468
+ * An optional string describing this resource. Will be visible in the API and the
469
+ * dashboard.
470
+ */
471
+ description?: string;
472
+ /**
473
+ * The last date that the IMB status was updated. See `imbStatus` for more details.
474
+ */
475
+ imbDate?: string;
476
+ /**
477
+ * The Intelligent Mail Barcode (IMB) status of this order. Only populated for
478
+ * US-printed and US-destined orders. This is the most detailed way to track
479
+ * non-express/certified orders.
480
+ */
481
+ imbStatus?: 'entered_mail_stream' | 'out_for_delivery' | 'returned_to_sender';
482
+ /**
483
+ * The most recent ZIP code of the USPS facility that the order has been processed
484
+ * through. Only populated when an `imbStatus` is present.
485
+ */
486
+ imbZIPCode?: string;
487
+ /**
488
+ * These will be merged with the variables in the template or HTML you create this
489
+ * order with. The keys in this object should match the variable names in the
490
+ * template _exactly_ as they are case-sensitive. Note that these _do not_ apply to
491
+ * PDFs uploaded with the order.
492
+ */
493
+ mergeVariables?: {
494
+ [key: string]: unknown;
495
+ };
496
+ /**
497
+ * See the section on Metadata.
498
+ */
499
+ metadata?: {
500
+ [key: string]: unknown;
501
+ };
502
+ /**
503
+ * The tracking number of this order. Populated after an express/certified order
504
+ * has been processed for delivery.
505
+ */
506
+ trackingNumber?: string;
507
+ /**
508
+ * PostGrid renders a PDF preview for all orders. This should be inspected to
509
+ * ensure that the order is correct before it is sent out because it shows what
510
+ * will be printed and mailed to the recipient. Once the PDF preview is generated,
511
+ * this field will be returned by all `GET` endpoints which produce this order.
512
+ *
513
+ * This URL is a signed link to the PDF preview. It will expire after a short
514
+ * period of time. If you need to access this URL after it has expired, you can
515
+ * regenerate it by calling the `GET` endpoint again.
516
+ */
517
+ url?: string;
518
+ }
519
+ export declare namespace BoxListResponse {
520
+ interface Cheque {
521
+ /**
522
+ * The amount on the cheque.
523
+ */
524
+ amount: number;
525
+ /**
526
+ * The bank account (ID or reference) from which the cheque amount is drawn.
527
+ */
528
+ bankAccount: string;
529
+ from: ContactsAPI.Contact;
530
+ /**
531
+ * The cheque number.
532
+ */
533
+ number: number;
534
+ to: ContactsAPI.Contact;
535
+ /**
536
+ * A URL to a logo for the cheque (optional).
537
+ */
538
+ logoURL?: string;
539
+ /**
540
+ * The memo text on the cheque (optional).
541
+ */
542
+ memo?: string;
543
+ /**
544
+ * A set of dynamic merge variables for customizing the cheque or accompanying
545
+ * documents (optional).
546
+ */
547
+ mergeVariables?: {
548
+ [key: string]: unknown;
549
+ };
550
+ /**
551
+ * An optional message template to be printed on or with the cheque.
552
+ */
553
+ messageTemplate?: string;
554
+ }
555
+ /**
556
+ * The cancellation details of this order. Populated if the order has been
557
+ * cancelled.
558
+ */
559
+ interface Cancellation {
560
+ /**
561
+ * The reason for the cancellation.
562
+ */
563
+ reason: 'user_initiated' | 'invalid_content' | 'invalid_order_mailing_class';
564
+ /**
565
+ * The user ID who cancelled the order.
566
+ */
567
+ cancelledByUser?: string;
568
+ /**
569
+ * An optional note provided by the user who cancelled the order.
570
+ */
571
+ note?: string;
572
+ }
573
+ }
574
+ export interface BoxDeleteResponse {
575
+ /**
576
+ * A unique ID prefixed with box\_
577
+ */
578
+ id: string;
579
+ /**
580
+ * The cheques inside this box (in read mode).
581
+ */
582
+ cheques: Array<BoxDeleteResponse.Cheque>;
583
+ /**
584
+ * The UTC time at which this resource was created.
585
+ */
586
+ createdAt: string;
587
+ /**
588
+ * The contact of the 'from' field in read mode should be a fully expanded Contact.
589
+ */
590
+ from: ContactsAPI.Contact;
591
+ /**
592
+ * `true` if this is a live mode resource else `false`.
593
+ */
594
+ live: boolean;
595
+ /**
596
+ * The mailing class of this order. This determines the speed and cost of delivery.
597
+ * See `OrderMailingClass` for more details.
598
+ */
599
+ mailingClass: 'first_class' | 'standard_class' | 'express' | 'certified' | 'certified_return_receipt' | 'registered' | 'usps_first_class' | 'usps_standard_class' | 'usps_eddm' | 'usps_express_2_day' | 'usps_express_3_day' | 'usps_first_class_certified' | 'usps_first_class_certified_return_receipt' | 'usps_first_class_registered' | 'usps_express_3_day_signature_confirmation' | 'usps_express_3_day_certified' | 'usps_express_3_day_certified_return_receipt' | 'ca_post_lettermail' | 'ca_post_personalized' | 'ca_post_neighbourhood_mail' | 'ups_express_overnight' | 'ups_express_2_day' | 'ups_express_3_day' | 'royal_mail_first_class' | 'royal_mail_second_class' | 'au_post_second_class';
600
+ /**
601
+ * Always "box".
602
+ */
603
+ object: 'box';
604
+ /**
605
+ * This order will transition from `ready` to `printing` on the day after this
606
+ * date. For example, if this is a date on Tuesday, the order will transition to
607
+ * `printing` on Wednesday at midnight eastern time.
608
+ */
609
+ sendDate: string;
610
+ /**
611
+ * See `OrderStatus` for more details on the status of this order.
612
+ */
613
+ status: 'ready' | 'printing' | 'processed_for_delivery' | 'completed' | 'cancelled';
614
+ /**
615
+ * The recipient of this order. This will be provided even if you delete the
616
+ * underlying contact.
617
+ */
618
+ to: ContactsAPI.Contact;
619
+ /**
620
+ * The UTC time at which this resource was last updated.
621
+ */
622
+ updatedAt: string;
623
+ /**
624
+ * The cancellation details of this order. Populated if the order has been
625
+ * cancelled.
626
+ */
627
+ cancellation?: BoxDeleteResponse.Cancellation;
628
+ /**
629
+ * An optional string describing this resource. Will be visible in the API and the
630
+ * dashboard.
631
+ */
632
+ description?: string;
633
+ /**
634
+ * The last date that the IMB status was updated. See `imbStatus` for more details.
635
+ */
636
+ imbDate?: string;
637
+ /**
638
+ * The Intelligent Mail Barcode (IMB) status of this order. Only populated for
639
+ * US-printed and US-destined orders. This is the most detailed way to track
640
+ * non-express/certified orders.
641
+ */
642
+ imbStatus?: 'entered_mail_stream' | 'out_for_delivery' | 'returned_to_sender';
643
+ /**
644
+ * The most recent ZIP code of the USPS facility that the order has been processed
645
+ * through. Only populated when an `imbStatus` is present.
646
+ */
647
+ imbZIPCode?: string;
648
+ /**
649
+ * These will be merged with the variables in the template or HTML you create this
650
+ * order with. The keys in this object should match the variable names in the
651
+ * template _exactly_ as they are case-sensitive. Note that these _do not_ apply to
652
+ * PDFs uploaded with the order.
653
+ */
654
+ mergeVariables?: {
655
+ [key: string]: unknown;
656
+ };
657
+ /**
658
+ * See the section on Metadata.
659
+ */
660
+ metadata?: {
661
+ [key: string]: unknown;
662
+ };
663
+ /**
664
+ * The tracking number of this order. Populated after an express/certified order
665
+ * has been processed for delivery.
666
+ */
667
+ trackingNumber?: string;
668
+ /**
669
+ * PostGrid renders a PDF preview for all orders. This should be inspected to
670
+ * ensure that the order is correct before it is sent out because it shows what
671
+ * will be printed and mailed to the recipient. Once the PDF preview is generated,
672
+ * this field will be returned by all `GET` endpoints which produce this order.
673
+ *
674
+ * This URL is a signed link to the PDF preview. It will expire after a short
675
+ * period of time. If you need to access this URL after it has expired, you can
676
+ * regenerate it by calling the `GET` endpoint again.
677
+ */
678
+ url?: string;
679
+ }
680
+ export declare namespace BoxDeleteResponse {
681
+ interface Cheque {
682
+ /**
683
+ * The amount on the cheque.
684
+ */
685
+ amount: number;
686
+ /**
687
+ * The bank account (ID or reference) from which the cheque amount is drawn.
688
+ */
689
+ bankAccount: string;
690
+ from: ContactsAPI.Contact;
691
+ /**
692
+ * The cheque number.
693
+ */
694
+ number: number;
695
+ to: ContactsAPI.Contact;
696
+ /**
697
+ * A URL to a logo for the cheque (optional).
698
+ */
699
+ logoURL?: string;
700
+ /**
701
+ * The memo text on the cheque (optional).
702
+ */
703
+ memo?: string;
704
+ /**
705
+ * A set of dynamic merge variables for customizing the cheque or accompanying
706
+ * documents (optional).
707
+ */
708
+ mergeVariables?: {
709
+ [key: string]: unknown;
710
+ };
711
+ /**
712
+ * An optional message template to be printed on or with the cheque.
713
+ */
714
+ messageTemplate?: string;
715
+ }
716
+ /**
717
+ * The cancellation details of this order. Populated if the order has been
718
+ * cancelled.
719
+ */
720
+ interface Cancellation {
721
+ /**
722
+ * The reason for the cancellation.
723
+ */
724
+ reason: 'user_initiated' | 'invalid_content' | 'invalid_order_mailing_class';
725
+ /**
726
+ * The user ID who cancelled the order.
727
+ */
728
+ cancelledByUser?: string;
729
+ /**
730
+ * An optional note provided by the user who cancelled the order.
731
+ */
732
+ note?: string;
733
+ }
734
+ }
735
+ export interface BoxProgressionsResponse {
736
+ /**
737
+ * A unique ID prefixed with box\_
738
+ */
739
+ id: string;
740
+ /**
741
+ * The cheques inside this box (in read mode).
742
+ */
743
+ cheques: Array<BoxProgressionsResponse.Cheque>;
744
+ /**
745
+ * The UTC time at which this resource was created.
746
+ */
747
+ createdAt: string;
748
+ /**
749
+ * The contact of the 'from' field in read mode should be a fully expanded Contact.
750
+ */
751
+ from: ContactsAPI.Contact;
752
+ /**
753
+ * `true` if this is a live mode resource else `false`.
754
+ */
755
+ live: boolean;
756
+ /**
757
+ * The mailing class of this order. This determines the speed and cost of delivery.
758
+ * See `OrderMailingClass` for more details.
759
+ */
760
+ mailingClass: 'first_class' | 'standard_class' | 'express' | 'certified' | 'certified_return_receipt' | 'registered' | 'usps_first_class' | 'usps_standard_class' | 'usps_eddm' | 'usps_express_2_day' | 'usps_express_3_day' | 'usps_first_class_certified' | 'usps_first_class_certified_return_receipt' | 'usps_first_class_registered' | 'usps_express_3_day_signature_confirmation' | 'usps_express_3_day_certified' | 'usps_express_3_day_certified_return_receipt' | 'ca_post_lettermail' | 'ca_post_personalized' | 'ca_post_neighbourhood_mail' | 'ups_express_overnight' | 'ups_express_2_day' | 'ups_express_3_day' | 'royal_mail_first_class' | 'royal_mail_second_class' | 'au_post_second_class';
761
+ /**
762
+ * Always "box".
763
+ */
764
+ object: 'box';
765
+ /**
766
+ * This order will transition from `ready` to `printing` on the day after this
767
+ * date. For example, if this is a date on Tuesday, the order will transition to
768
+ * `printing` on Wednesday at midnight eastern time.
769
+ */
770
+ sendDate: string;
771
+ /**
772
+ * See `OrderStatus` for more details on the status of this order.
773
+ */
774
+ status: 'ready' | 'printing' | 'processed_for_delivery' | 'completed' | 'cancelled';
775
+ /**
776
+ * The recipient of this order. This will be provided even if you delete the
777
+ * underlying contact.
778
+ */
779
+ to: ContactsAPI.Contact;
780
+ /**
781
+ * The UTC time at which this resource was last updated.
782
+ */
783
+ updatedAt: string;
784
+ /**
785
+ * The cancellation details of this order. Populated if the order has been
786
+ * cancelled.
787
+ */
788
+ cancellation?: BoxProgressionsResponse.Cancellation;
789
+ /**
790
+ * An optional string describing this resource. Will be visible in the API and the
791
+ * dashboard.
792
+ */
793
+ description?: string;
794
+ /**
795
+ * The last date that the IMB status was updated. See `imbStatus` for more details.
796
+ */
797
+ imbDate?: string;
798
+ /**
799
+ * The Intelligent Mail Barcode (IMB) status of this order. Only populated for
800
+ * US-printed and US-destined orders. This is the most detailed way to track
801
+ * non-express/certified orders.
802
+ */
803
+ imbStatus?: 'entered_mail_stream' | 'out_for_delivery' | 'returned_to_sender';
804
+ /**
805
+ * The most recent ZIP code of the USPS facility that the order has been processed
806
+ * through. Only populated when an `imbStatus` is present.
807
+ */
808
+ imbZIPCode?: string;
809
+ /**
810
+ * These will be merged with the variables in the template or HTML you create this
811
+ * order with. The keys in this object should match the variable names in the
812
+ * template _exactly_ as they are case-sensitive. Note that these _do not_ apply to
813
+ * PDFs uploaded with the order.
814
+ */
815
+ mergeVariables?: {
816
+ [key: string]: unknown;
817
+ };
818
+ /**
819
+ * See the section on Metadata.
820
+ */
821
+ metadata?: {
822
+ [key: string]: unknown;
823
+ };
824
+ /**
825
+ * The tracking number of this order. Populated after an express/certified order
826
+ * has been processed for delivery.
827
+ */
828
+ trackingNumber?: string;
829
+ /**
830
+ * PostGrid renders a PDF preview for all orders. This should be inspected to
831
+ * ensure that the order is correct before it is sent out because it shows what
832
+ * will be printed and mailed to the recipient. Once the PDF preview is generated,
833
+ * this field will be returned by all `GET` endpoints which produce this order.
834
+ *
835
+ * This URL is a signed link to the PDF preview. It will expire after a short
836
+ * period of time. If you need to access this URL after it has expired, you can
837
+ * regenerate it by calling the `GET` endpoint again.
838
+ */
839
+ url?: string;
840
+ }
841
+ export declare namespace BoxProgressionsResponse {
842
+ interface Cheque {
843
+ /**
844
+ * The amount on the cheque.
845
+ */
846
+ amount: number;
847
+ /**
848
+ * The bank account (ID or reference) from which the cheque amount is drawn.
849
+ */
850
+ bankAccount: string;
851
+ from: ContactsAPI.Contact;
852
+ /**
853
+ * The cheque number.
854
+ */
855
+ number: number;
856
+ to: ContactsAPI.Contact;
857
+ /**
858
+ * A URL to a logo for the cheque (optional).
859
+ */
860
+ logoURL?: string;
861
+ /**
862
+ * The memo text on the cheque (optional).
863
+ */
864
+ memo?: string;
865
+ /**
866
+ * A set of dynamic merge variables for customizing the cheque or accompanying
867
+ * documents (optional).
868
+ */
869
+ mergeVariables?: {
870
+ [key: string]: unknown;
871
+ };
872
+ /**
873
+ * An optional message template to be printed on or with the cheque.
874
+ */
875
+ messageTemplate?: string;
876
+ }
877
+ /**
878
+ * The cancellation details of this order. Populated if the order has been
879
+ * cancelled.
880
+ */
881
+ interface Cancellation {
882
+ /**
883
+ * The reason for the cancellation.
884
+ */
885
+ reason: 'user_initiated' | 'invalid_content' | 'invalid_order_mailing_class';
886
+ /**
887
+ * The user ID who cancelled the order.
888
+ */
889
+ cancelledByUser?: string;
890
+ /**
891
+ * An optional note provided by the user who cancelled the order.
892
+ */
893
+ note?: string;
894
+ }
895
+ }
896
+ export interface BoxCreateParams {
897
+ /**
898
+ * The cheques to be mailed in the box. Only 100 cheques can be included in a box
899
+ * at a time.
900
+ */
901
+ cheques: Array<BoxCreateParams.Cheque>;
902
+ /**
903
+ * The 'from' (sender) of the entire box. Accepts inline ContactCreate or a
904
+ * contactID.
905
+ */
906
+ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string;
907
+ /**
908
+ * The recipient of this order. You can either supply the contact information
909
+ * inline here or provide a contact ID. PostGrid will automatically deduplicate
910
+ * contacts regardless of whether you provide the information inline here or call
911
+ * the contact creation endpoint.
912
+ */
913
+ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string;
914
+ /**
915
+ * An optional string describing this resource. Will be visible in the API and the
916
+ * dashboard.
917
+ */
918
+ description?: string;
919
+ /**
920
+ * The mailing class of this order. If not provided, automatically set to
921
+ * `first_class`.
922
+ */
923
+ mailingClass?: 'first_class' | 'standard_class' | 'express' | 'certified' | 'certified_return_receipt' | 'registered' | 'usps_first_class' | 'usps_standard_class' | 'usps_eddm' | 'usps_express_2_day' | 'usps_express_3_day' | 'usps_first_class_certified' | 'usps_first_class_certified_return_receipt' | 'usps_first_class_registered' | 'usps_express_3_day_signature_confirmation' | 'usps_express_3_day_certified' | 'usps_express_3_day_certified_return_receipt' | 'ca_post_lettermail' | 'ca_post_personalized' | 'ca_post_neighbourhood_mail' | 'ups_express_overnight' | 'ups_express_2_day' | 'ups_express_3_day' | 'royal_mail_first_class' | 'royal_mail_second_class' | 'au_post_second_class';
924
+ /**
925
+ * These will be merged with the variables in the template or HTML you create this
926
+ * order with. The keys in this object should match the variable names in the
927
+ * template _exactly_ as they are case-sensitive. Note that these _do not_ apply to
928
+ * PDFs uploaded with the order.
929
+ */
930
+ mergeVariables?: {
931
+ [key: string]: unknown;
932
+ };
933
+ /**
934
+ * See the section on Metadata.
935
+ */
936
+ metadata?: {
937
+ [key: string]: unknown;
938
+ };
939
+ /**
940
+ * This order will transition from `ready` to `printing` on the day after this
941
+ * date. You can use this parameter to schedule orders for a future date.
942
+ */
943
+ sendDate?: string;
944
+ }
945
+ export declare namespace BoxCreateParams {
946
+ interface Cheque {
947
+ /**
948
+ * The amount on the cheque.
949
+ */
950
+ amount: number;
951
+ /**
952
+ * The bank account (ID or reference) from which the cheque amount is drawn.
953
+ */
954
+ bankAccount: string;
955
+ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string;
956
+ /**
957
+ * The cheque number.
958
+ */
959
+ number: number;
960
+ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string;
961
+ /**
962
+ * A URL to a logo for the cheque (optional).
963
+ */
964
+ logoURL?: string;
965
+ /**
966
+ * The memo text on the cheque (optional).
967
+ */
968
+ memo?: string;
969
+ /**
970
+ * A set of dynamic merge variables for customizing the cheque or accompanying
971
+ * documents (optional).
972
+ */
973
+ mergeVariables?: {
974
+ [key: string]: unknown;
975
+ };
976
+ /**
977
+ * An optional message template to be printed on or with the cheque.
978
+ */
979
+ messageTemplate?: string;
980
+ }
981
+ }
982
+ export interface BoxListParams extends SkipLimitParams {
983
+ /**
984
+ * You can supply any string to help narrow down the list of resources. For
985
+ * example, if you pass `"New York"` (quoted), it will return resources that have
986
+ * that string present somewhere in their response. Alternatively, you can supply a
987
+ * structured search query. See the documentation on `StructuredSearchQuery` for
988
+ * more details.
989
+ */
990
+ search?: string;
991
+ }
992
+ export declare namespace Boxes {
993
+ export { type BoxCreateResponse as BoxCreateResponse, type BoxRetrieveResponse as BoxRetrieveResponse, type BoxListResponse as BoxListResponse, type BoxDeleteResponse as BoxDeleteResponse, type BoxProgressionsResponse as BoxProgressionsResponse, type BoxListResponsesSkipLimit as BoxListResponsesSkipLimit, type BoxCreateParams as BoxCreateParams, type BoxListParams as BoxListParams, };
994
+ }
995
+ //# sourceMappingURL=boxes.d.mts.map