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,1484 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as ContactsAPI from './contacts';
5
+ import { APIPromise } from '../../core/api-promise';
6
+ import { PagePromise, SkipLimit, type SkipLimitParams } from '../../core/pagination';
7
+ import { RequestOptions } from '../../internal/request-options';
8
+ import { path } from '../../internal/utils/path';
9
+
10
+ /**
11
+ * Snap packs are pressure-sealed mailers that resemble official documents
12
+ * and encourage higher open rates. They do not require envelopes and are
13
+ * opened by tearing along perforated edges. The sealed design keeps contents
14
+ * hidden until opened, making snap packs ideal for sensitive or important
15
+ * documents such as contracts, forms, or notices.
16
+ *
17
+ * You can request access to this feature by reaching out to
18
+ * support@postgrid.com
19
+ */
20
+ export class SnapPacks extends APIResource {
21
+ /**
22
+ * Create a snap pack. You can supply one of the following:
23
+ *
24
+ * - HTML content for the inside and outside of the snap pack
25
+ * - Template IDs for the inside and outside of the snap pack
26
+ * - A URL or file upload for a two-page PDF that matches the snap pack layout
27
+ *
28
+ * @example
29
+ * ```ts
30
+ * const snapPack = await client.printMail.snapPacks.create({
31
+ * from: 'contact_123',
32
+ * insideHTML: '<html>Inside</html>',
33
+ * outsideHTML: '<html>Outside</html>',
34
+ * size: '8.5x11_bifold_v',
35
+ * to: 'contact_456',
36
+ * });
37
+ * ```
38
+ */
39
+ create(body: SnapPackCreateParams, options?: RequestOptions): APIPromise<SnapPackCreateResponse> {
40
+ return this._client.post('/print-mail/v1/snap_packs', { body, ...options });
41
+ }
42
+
43
+ /**
44
+ * Retrieve a snap pack by ID.
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * const snapPack = await client.printMail.snapPacks.retrieve(
49
+ * 'id',
50
+ * );
51
+ * ```
52
+ */
53
+ retrieve(id: string, options?: RequestOptions): APIPromise<SnapPackRetrieveResponse> {
54
+ return this._client.get(path`/print-mail/v1/snap_packs/${id}`, options);
55
+ }
56
+
57
+ /**
58
+ * Get a list of snap packs.
59
+ *
60
+ * @example
61
+ * ```ts
62
+ * // Automatically fetches more pages as needed.
63
+ * for await (const snapPackListResponse of client.printMail.snapPacks.list()) {
64
+ * // ...
65
+ * }
66
+ * ```
67
+ */
68
+ list(
69
+ query: SnapPackListParams | null | undefined = {},
70
+ options?: RequestOptions,
71
+ ): PagePromise<SnapPackListResponsesSkipLimit, SnapPackListResponse> {
72
+ return this._client.getAPIList('/print-mail/v1/snap_packs', SkipLimit<SnapPackListResponse>, {
73
+ query,
74
+ ...options,
75
+ });
76
+ }
77
+
78
+ /**
79
+ * Cancel a snap pack by ID. Note that this operation cannot be undone and that
80
+ * only snap packs with a status of `ready` can be cancelled.
81
+ *
82
+ * @example
83
+ * ```ts
84
+ * const snapPack = await client.printMail.snapPacks.delete(
85
+ * 'id',
86
+ * );
87
+ * ```
88
+ */
89
+ delete(id: string, options?: RequestOptions): APIPromise<SnapPackDeleteResponse> {
90
+ return this._client.delete(path`/print-mail/v1/snap_packs/${id}`, options);
91
+ }
92
+
93
+ /**
94
+ * Progresses a snap pack's `status` to the next stage. This is only available in
95
+ * test mode and can be used to simulate how a live order would progress through
96
+ * the different statuses.
97
+ *
98
+ * Note: this will fail with an `invalid_progression_error` if the status is one of
99
+ * `completed` or `cancelled`.
100
+ *
101
+ * @example
102
+ * ```ts
103
+ * const response =
104
+ * await client.printMail.snapPacks.progressions('id');
105
+ * ```
106
+ */
107
+ progressions(id: string, options?: RequestOptions): APIPromise<SnapPackProgressionsResponse> {
108
+ return this._client.post(path`/print-mail/v1/snap_packs/${id}/progressions`, options);
109
+ }
110
+
111
+ /**
112
+ * Provides sizes and mailing classes available for the destination.
113
+ *
114
+ * @example
115
+ * ```ts
116
+ * const response =
117
+ * await client.printMail.snapPacks.retrieveCapabilities({
118
+ * returnCountryCode: 'returnCountryCode',
119
+ * });
120
+ * ```
121
+ */
122
+ retrieveCapabilities(
123
+ query: SnapPackRetrieveCapabilitiesParams,
124
+ options?: RequestOptions,
125
+ ): APIPromise<SnapPackRetrieveCapabilitiesResponse> {
126
+ return this._client.get('/print-mail/v1/snap_packs/capabilities', { query, ...options });
127
+ }
128
+ }
129
+
130
+ export type SnapPackListResponsesSkipLimit = SkipLimit<SnapPackListResponse>;
131
+
132
+ export interface SnapPackCreateResponse {
133
+ /**
134
+ * A unique ID prefixed with snap*pack*
135
+ */
136
+ id: string;
137
+
138
+ /**
139
+ * The UTC time at which this resource was created.
140
+ */
141
+ createdAt: string;
142
+
143
+ /**
144
+ * The contact information of the sender.
145
+ */
146
+ from: ContactsAPI.Contact;
147
+
148
+ /**
149
+ * `true` if this is a live mode resource else `false`.
150
+ */
151
+ live: boolean;
152
+
153
+ /**
154
+ * The mailing class of this order. This determines the speed and cost of delivery.
155
+ * See `OrderMailingClass` for more details.
156
+ */
157
+ mailingClass:
158
+ | 'first_class'
159
+ | 'standard_class'
160
+ | 'express'
161
+ | 'certified'
162
+ | 'certified_return_receipt'
163
+ | 'registered'
164
+ | 'usps_first_class'
165
+ | 'usps_standard_class'
166
+ | 'usps_eddm'
167
+ | 'usps_express_2_day'
168
+ | 'usps_express_3_day'
169
+ | 'usps_first_class_certified'
170
+ | 'usps_first_class_certified_return_receipt'
171
+ | 'usps_first_class_registered'
172
+ | 'usps_express_3_day_signature_confirmation'
173
+ | 'usps_express_3_day_certified'
174
+ | 'usps_express_3_day_certified_return_receipt'
175
+ | 'ca_post_lettermail'
176
+ | 'ca_post_personalized'
177
+ | 'ca_post_neighbourhood_mail'
178
+ | 'ups_express_overnight'
179
+ | 'ups_express_2_day'
180
+ | 'ups_express_3_day'
181
+ | 'royal_mail_first_class'
182
+ | 'royal_mail_second_class'
183
+ | 'au_post_second_class';
184
+
185
+ /**
186
+ * Always `snap_pack`.
187
+ */
188
+ object: 'snap_pack';
189
+
190
+ /**
191
+ * This order will transition from `ready` to `printing` on the day after this
192
+ * date. For example, if this is a date on Tuesday, the order will transition to
193
+ * `printing` on Wednesday at midnight eastern time.
194
+ */
195
+ sendDate: string;
196
+
197
+ /**
198
+ * Enum representing the supported snap pack sizes.
199
+ */
200
+ size: '8.5x11_bifold_v';
201
+
202
+ /**
203
+ * See `OrderStatus` for more details on the status of this order.
204
+ */
205
+ status: 'ready' | 'printing' | 'processed_for_delivery' | 'completed' | 'cancelled';
206
+
207
+ /**
208
+ * The recipient of this order. This will be provided even if you delete the
209
+ * underlying contact.
210
+ */
211
+ to: ContactsAPI.Contact;
212
+
213
+ /**
214
+ * The UTC time at which this resource was last updated.
215
+ */
216
+ updatedAt: string;
217
+
218
+ /**
219
+ * The cancellation details of this order. Populated if the order has been
220
+ * cancelled.
221
+ */
222
+ cancellation?: SnapPackCreateResponse.Cancellation;
223
+
224
+ /**
225
+ * An optional string describing this resource. Will be visible in the API and the
226
+ * dashboard.
227
+ */
228
+ description?: string;
229
+
230
+ /**
231
+ * The last date that the IMB status was updated. See `imbStatus` for more details.
232
+ */
233
+ imbDate?: string;
234
+
235
+ /**
236
+ * The Intelligent Mail Barcode (IMB) status of this order. Only populated for
237
+ * US-printed and US-destined orders. This is the most detailed way to track
238
+ * non-express/certified orders.
239
+ */
240
+ imbStatus?: 'entered_mail_stream' | 'out_for_delivery' | 'returned_to_sender';
241
+
242
+ /**
243
+ * The most recent ZIP code of the USPS facility that the order has been processed
244
+ * through. Only populated when an `imbStatus` is present.
245
+ */
246
+ imbZIPCode?: string;
247
+
248
+ /**
249
+ * The HTML content for the inside of the snap pack, when provided instead of a
250
+ * template or PDF.
251
+ */
252
+ insideHTML?: string;
253
+
254
+ /**
255
+ * The template ID for the inside of the snap pack, when provided instead of HTML
256
+ * or PDF.
257
+ */
258
+ insideTemplate?: string;
259
+
260
+ /**
261
+ * These will be merged with the variables in the template or HTML you create this
262
+ * order with. The keys in this object should match the variable names in the
263
+ * template _exactly_ as they are case-sensitive. Note that these _do not_ apply to
264
+ * PDFs uploaded with the order.
265
+ */
266
+ mergeVariables?: { [key: string]: unknown };
267
+
268
+ /**
269
+ * See the section on Metadata.
270
+ */
271
+ metadata?: { [key: string]: unknown };
272
+
273
+ /**
274
+ * The HTML content for the outside of the snap pack, when provided instead of a
275
+ * template or PDF.
276
+ */
277
+ outsideHTML?: string;
278
+
279
+ /**
280
+ * The template ID for the outside of the snap pack, when provided instead of HTML
281
+ * or PDF.
282
+ */
283
+ outsideTemplate?: string;
284
+
285
+ /**
286
+ * The tracking number of this order. Populated after an express/certified order
287
+ * has been processed for delivery.
288
+ */
289
+ trackingNumber?: string;
290
+
291
+ /**
292
+ * A signed URL to the uploaded PDF provided at creation time, if a PDF was
293
+ * supplied.
294
+ */
295
+ uploadedPDF?: string;
296
+
297
+ /**
298
+ * PostGrid renders a PDF preview for all orders. This should be inspected to
299
+ * ensure that the order is correct before it is sent out because it shows what
300
+ * will be printed and mailed to the recipient. Once the PDF preview is generated,
301
+ * this field will be returned by all `GET` endpoints which produce this order.
302
+ *
303
+ * This URL is a signed link to the PDF preview. It will expire after a short
304
+ * period of time. If you need to access this URL after it has expired, you can
305
+ * regenerate it by calling the `GET` endpoint again.
306
+ */
307
+ url?: string;
308
+ }
309
+
310
+ export namespace SnapPackCreateResponse {
311
+ /**
312
+ * The cancellation details of this order. Populated if the order has been
313
+ * cancelled.
314
+ */
315
+ export interface Cancellation {
316
+ /**
317
+ * The reason for the cancellation.
318
+ */
319
+ reason: 'user_initiated' | 'invalid_content' | 'invalid_order_mailing_class';
320
+
321
+ /**
322
+ * The user ID who cancelled the order.
323
+ */
324
+ cancelledByUser?: string;
325
+
326
+ /**
327
+ * An optional note provided by the user who cancelled the order.
328
+ */
329
+ note?: string;
330
+ }
331
+ }
332
+
333
+ export interface SnapPackRetrieveResponse {
334
+ /**
335
+ * A unique ID prefixed with snap*pack*
336
+ */
337
+ id: string;
338
+
339
+ /**
340
+ * The UTC time at which this resource was created.
341
+ */
342
+ createdAt: string;
343
+
344
+ /**
345
+ * The contact information of the sender.
346
+ */
347
+ from: ContactsAPI.Contact;
348
+
349
+ /**
350
+ * `true` if this is a live mode resource else `false`.
351
+ */
352
+ live: boolean;
353
+
354
+ /**
355
+ * The mailing class of this order. This determines the speed and cost of delivery.
356
+ * See `OrderMailingClass` for more details.
357
+ */
358
+ mailingClass:
359
+ | 'first_class'
360
+ | 'standard_class'
361
+ | 'express'
362
+ | 'certified'
363
+ | 'certified_return_receipt'
364
+ | 'registered'
365
+ | 'usps_first_class'
366
+ | 'usps_standard_class'
367
+ | 'usps_eddm'
368
+ | 'usps_express_2_day'
369
+ | 'usps_express_3_day'
370
+ | 'usps_first_class_certified'
371
+ | 'usps_first_class_certified_return_receipt'
372
+ | 'usps_first_class_registered'
373
+ | 'usps_express_3_day_signature_confirmation'
374
+ | 'usps_express_3_day_certified'
375
+ | 'usps_express_3_day_certified_return_receipt'
376
+ | 'ca_post_lettermail'
377
+ | 'ca_post_personalized'
378
+ | 'ca_post_neighbourhood_mail'
379
+ | 'ups_express_overnight'
380
+ | 'ups_express_2_day'
381
+ | 'ups_express_3_day'
382
+ | 'royal_mail_first_class'
383
+ | 'royal_mail_second_class'
384
+ | 'au_post_second_class';
385
+
386
+ /**
387
+ * Always `snap_pack`.
388
+ */
389
+ object: 'snap_pack';
390
+
391
+ /**
392
+ * This order will transition from `ready` to `printing` on the day after this
393
+ * date. For example, if this is a date on Tuesday, the order will transition to
394
+ * `printing` on Wednesday at midnight eastern time.
395
+ */
396
+ sendDate: string;
397
+
398
+ /**
399
+ * Enum representing the supported snap pack sizes.
400
+ */
401
+ size: '8.5x11_bifold_v';
402
+
403
+ /**
404
+ * See `OrderStatus` for more details on the status of this order.
405
+ */
406
+ status: 'ready' | 'printing' | 'processed_for_delivery' | 'completed' | 'cancelled';
407
+
408
+ /**
409
+ * The recipient of this order. This will be provided even if you delete the
410
+ * underlying contact.
411
+ */
412
+ to: ContactsAPI.Contact;
413
+
414
+ /**
415
+ * The UTC time at which this resource was last updated.
416
+ */
417
+ updatedAt: string;
418
+
419
+ /**
420
+ * The cancellation details of this order. Populated if the order has been
421
+ * cancelled.
422
+ */
423
+ cancellation?: SnapPackRetrieveResponse.Cancellation;
424
+
425
+ /**
426
+ * An optional string describing this resource. Will be visible in the API and the
427
+ * dashboard.
428
+ */
429
+ description?: string;
430
+
431
+ /**
432
+ * The last date that the IMB status was updated. See `imbStatus` for more details.
433
+ */
434
+ imbDate?: string;
435
+
436
+ /**
437
+ * The Intelligent Mail Barcode (IMB) status of this order. Only populated for
438
+ * US-printed and US-destined orders. This is the most detailed way to track
439
+ * non-express/certified orders.
440
+ */
441
+ imbStatus?: 'entered_mail_stream' | 'out_for_delivery' | 'returned_to_sender';
442
+
443
+ /**
444
+ * The most recent ZIP code of the USPS facility that the order has been processed
445
+ * through. Only populated when an `imbStatus` is present.
446
+ */
447
+ imbZIPCode?: string;
448
+
449
+ /**
450
+ * The HTML content for the inside of the snap pack, when provided instead of a
451
+ * template or PDF.
452
+ */
453
+ insideHTML?: string;
454
+
455
+ /**
456
+ * The template ID for the inside of the snap pack, when provided instead of HTML
457
+ * or PDF.
458
+ */
459
+ insideTemplate?: string;
460
+
461
+ /**
462
+ * These will be merged with the variables in the template or HTML you create this
463
+ * order with. The keys in this object should match the variable names in the
464
+ * template _exactly_ as they are case-sensitive. Note that these _do not_ apply to
465
+ * PDFs uploaded with the order.
466
+ */
467
+ mergeVariables?: { [key: string]: unknown };
468
+
469
+ /**
470
+ * See the section on Metadata.
471
+ */
472
+ metadata?: { [key: string]: unknown };
473
+
474
+ /**
475
+ * The HTML content for the outside of the snap pack, when provided instead of a
476
+ * template or PDF.
477
+ */
478
+ outsideHTML?: string;
479
+
480
+ /**
481
+ * The template ID for the outside of the snap pack, when provided instead of HTML
482
+ * or PDF.
483
+ */
484
+ outsideTemplate?: string;
485
+
486
+ /**
487
+ * The tracking number of this order. Populated after an express/certified order
488
+ * has been processed for delivery.
489
+ */
490
+ trackingNumber?: string;
491
+
492
+ /**
493
+ * A signed URL to the uploaded PDF provided at creation time, if a PDF was
494
+ * supplied.
495
+ */
496
+ uploadedPDF?: string;
497
+
498
+ /**
499
+ * PostGrid renders a PDF preview for all orders. This should be inspected to
500
+ * ensure that the order is correct before it is sent out because it shows what
501
+ * will be printed and mailed to the recipient. Once the PDF preview is generated,
502
+ * this field will be returned by all `GET` endpoints which produce this order.
503
+ *
504
+ * This URL is a signed link to the PDF preview. It will expire after a short
505
+ * period of time. If you need to access this URL after it has expired, you can
506
+ * regenerate it by calling the `GET` endpoint again.
507
+ */
508
+ url?: string;
509
+ }
510
+
511
+ export namespace SnapPackRetrieveResponse {
512
+ /**
513
+ * The cancellation details of this order. Populated if the order has been
514
+ * cancelled.
515
+ */
516
+ export interface Cancellation {
517
+ /**
518
+ * The reason for the cancellation.
519
+ */
520
+ reason: 'user_initiated' | 'invalid_content' | 'invalid_order_mailing_class';
521
+
522
+ /**
523
+ * The user ID who cancelled the order.
524
+ */
525
+ cancelledByUser?: string;
526
+
527
+ /**
528
+ * An optional note provided by the user who cancelled the order.
529
+ */
530
+ note?: string;
531
+ }
532
+ }
533
+
534
+ export interface SnapPackListResponse {
535
+ /**
536
+ * A unique ID prefixed with snap*pack*
537
+ */
538
+ id: string;
539
+
540
+ /**
541
+ * The UTC time at which this resource was created.
542
+ */
543
+ createdAt: string;
544
+
545
+ /**
546
+ * The contact information of the sender.
547
+ */
548
+ from: ContactsAPI.Contact;
549
+
550
+ /**
551
+ * `true` if this is a live mode resource else `false`.
552
+ */
553
+ live: boolean;
554
+
555
+ /**
556
+ * The mailing class of this order. This determines the speed and cost of delivery.
557
+ * See `OrderMailingClass` for more details.
558
+ */
559
+ mailingClass:
560
+ | 'first_class'
561
+ | 'standard_class'
562
+ | 'express'
563
+ | 'certified'
564
+ | 'certified_return_receipt'
565
+ | 'registered'
566
+ | 'usps_first_class'
567
+ | 'usps_standard_class'
568
+ | 'usps_eddm'
569
+ | 'usps_express_2_day'
570
+ | 'usps_express_3_day'
571
+ | 'usps_first_class_certified'
572
+ | 'usps_first_class_certified_return_receipt'
573
+ | 'usps_first_class_registered'
574
+ | 'usps_express_3_day_signature_confirmation'
575
+ | 'usps_express_3_day_certified'
576
+ | 'usps_express_3_day_certified_return_receipt'
577
+ | 'ca_post_lettermail'
578
+ | 'ca_post_personalized'
579
+ | 'ca_post_neighbourhood_mail'
580
+ | 'ups_express_overnight'
581
+ | 'ups_express_2_day'
582
+ | 'ups_express_3_day'
583
+ | 'royal_mail_first_class'
584
+ | 'royal_mail_second_class'
585
+ | 'au_post_second_class';
586
+
587
+ /**
588
+ * Always `snap_pack`.
589
+ */
590
+ object: 'snap_pack';
591
+
592
+ /**
593
+ * This order will transition from `ready` to `printing` on the day after this
594
+ * date. For example, if this is a date on Tuesday, the order will transition to
595
+ * `printing` on Wednesday at midnight eastern time.
596
+ */
597
+ sendDate: string;
598
+
599
+ /**
600
+ * Enum representing the supported snap pack sizes.
601
+ */
602
+ size: '8.5x11_bifold_v';
603
+
604
+ /**
605
+ * See `OrderStatus` for more details on the status of this order.
606
+ */
607
+ status: 'ready' | 'printing' | 'processed_for_delivery' | 'completed' | 'cancelled';
608
+
609
+ /**
610
+ * The recipient of this order. This will be provided even if you delete the
611
+ * underlying contact.
612
+ */
613
+ to: ContactsAPI.Contact;
614
+
615
+ /**
616
+ * The UTC time at which this resource was last updated.
617
+ */
618
+ updatedAt: string;
619
+
620
+ /**
621
+ * The cancellation details of this order. Populated if the order has been
622
+ * cancelled.
623
+ */
624
+ cancellation?: SnapPackListResponse.Cancellation;
625
+
626
+ /**
627
+ * An optional string describing this resource. Will be visible in the API and the
628
+ * dashboard.
629
+ */
630
+ description?: string;
631
+
632
+ /**
633
+ * The last date that the IMB status was updated. See `imbStatus` for more details.
634
+ */
635
+ imbDate?: string;
636
+
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
+ /**
645
+ * The most recent ZIP code of the USPS facility that the order has been processed
646
+ * through. Only populated when an `imbStatus` is present.
647
+ */
648
+ imbZIPCode?: string;
649
+
650
+ /**
651
+ * The HTML content for the inside of the snap pack, when provided instead of a
652
+ * template or PDF.
653
+ */
654
+ insideHTML?: string;
655
+
656
+ /**
657
+ * The template ID for the inside of the snap pack, when provided instead of HTML
658
+ * or PDF.
659
+ */
660
+ insideTemplate?: string;
661
+
662
+ /**
663
+ * These will be merged with the variables in the template or HTML you create this
664
+ * order with. The keys in this object should match the variable names in the
665
+ * template _exactly_ as they are case-sensitive. Note that these _do not_ apply to
666
+ * PDFs uploaded with the order.
667
+ */
668
+ mergeVariables?: { [key: string]: unknown };
669
+
670
+ /**
671
+ * See the section on Metadata.
672
+ */
673
+ metadata?: { [key: string]: unknown };
674
+
675
+ /**
676
+ * The HTML content for the outside of the snap pack, when provided instead of a
677
+ * template or PDF.
678
+ */
679
+ outsideHTML?: string;
680
+
681
+ /**
682
+ * The template ID for the outside of the snap pack, when provided instead of HTML
683
+ * or PDF.
684
+ */
685
+ outsideTemplate?: string;
686
+
687
+ /**
688
+ * The tracking number of this order. Populated after an express/certified order
689
+ * has been processed for delivery.
690
+ */
691
+ trackingNumber?: string;
692
+
693
+ /**
694
+ * A signed URL to the uploaded PDF provided at creation time, if a PDF was
695
+ * supplied.
696
+ */
697
+ uploadedPDF?: string;
698
+
699
+ /**
700
+ * PostGrid renders a PDF preview for all orders. This should be inspected to
701
+ * ensure that the order is correct before it is sent out because it shows what
702
+ * will be printed and mailed to the recipient. Once the PDF preview is generated,
703
+ * this field will be returned by all `GET` endpoints which produce this order.
704
+ *
705
+ * This URL is a signed link to the PDF preview. It will expire after a short
706
+ * period of time. If you need to access this URL after it has expired, you can
707
+ * regenerate it by calling the `GET` endpoint again.
708
+ */
709
+ url?: string;
710
+ }
711
+
712
+ export namespace SnapPackListResponse {
713
+ /**
714
+ * The cancellation details of this order. Populated if the order has been
715
+ * cancelled.
716
+ */
717
+ export interface Cancellation {
718
+ /**
719
+ * The reason for the cancellation.
720
+ */
721
+ reason: 'user_initiated' | 'invalid_content' | 'invalid_order_mailing_class';
722
+
723
+ /**
724
+ * The user ID who cancelled the order.
725
+ */
726
+ cancelledByUser?: string;
727
+
728
+ /**
729
+ * An optional note provided by the user who cancelled the order.
730
+ */
731
+ note?: string;
732
+ }
733
+ }
734
+
735
+ export interface SnapPackDeleteResponse {
736
+ /**
737
+ * A unique ID prefixed with snap*pack*
738
+ */
739
+ id: string;
740
+
741
+ /**
742
+ * The UTC time at which this resource was created.
743
+ */
744
+ createdAt: string;
745
+
746
+ /**
747
+ * The contact information of the sender.
748
+ */
749
+ from: ContactsAPI.Contact;
750
+
751
+ /**
752
+ * `true` if this is a live mode resource else `false`.
753
+ */
754
+ live: boolean;
755
+
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:
761
+ | 'first_class'
762
+ | 'standard_class'
763
+ | 'express'
764
+ | 'certified'
765
+ | 'certified_return_receipt'
766
+ | 'registered'
767
+ | 'usps_first_class'
768
+ | 'usps_standard_class'
769
+ | 'usps_eddm'
770
+ | 'usps_express_2_day'
771
+ | 'usps_express_3_day'
772
+ | 'usps_first_class_certified'
773
+ | 'usps_first_class_certified_return_receipt'
774
+ | 'usps_first_class_registered'
775
+ | 'usps_express_3_day_signature_confirmation'
776
+ | 'usps_express_3_day_certified'
777
+ | 'usps_express_3_day_certified_return_receipt'
778
+ | 'ca_post_lettermail'
779
+ | 'ca_post_personalized'
780
+ | 'ca_post_neighbourhood_mail'
781
+ | 'ups_express_overnight'
782
+ | 'ups_express_2_day'
783
+ | 'ups_express_3_day'
784
+ | 'royal_mail_first_class'
785
+ | 'royal_mail_second_class'
786
+ | 'au_post_second_class';
787
+
788
+ /**
789
+ * Always `snap_pack`.
790
+ */
791
+ object: 'snap_pack';
792
+
793
+ /**
794
+ * This order will transition from `ready` to `printing` on the day after this
795
+ * date. For example, if this is a date on Tuesday, the order will transition to
796
+ * `printing` on Wednesday at midnight eastern time.
797
+ */
798
+ sendDate: string;
799
+
800
+ /**
801
+ * Enum representing the supported snap pack sizes.
802
+ */
803
+ size: '8.5x11_bifold_v';
804
+
805
+ /**
806
+ * See `OrderStatus` for more details on the status of this order.
807
+ */
808
+ status: 'ready' | 'printing' | 'processed_for_delivery' | 'completed' | 'cancelled';
809
+
810
+ /**
811
+ * The recipient of this order. This will be provided even if you delete the
812
+ * underlying contact.
813
+ */
814
+ to: ContactsAPI.Contact;
815
+
816
+ /**
817
+ * The UTC time at which this resource was last updated.
818
+ */
819
+ updatedAt: string;
820
+
821
+ /**
822
+ * The cancellation details of this order. Populated if the order has been
823
+ * cancelled.
824
+ */
825
+ cancellation?: SnapPackDeleteResponse.Cancellation;
826
+
827
+ /**
828
+ * An optional string describing this resource. Will be visible in the API and the
829
+ * dashboard.
830
+ */
831
+ description?: string;
832
+
833
+ /**
834
+ * The last date that the IMB status was updated. See `imbStatus` for more details.
835
+ */
836
+ imbDate?: string;
837
+
838
+ /**
839
+ * The Intelligent Mail Barcode (IMB) status of this order. Only populated for
840
+ * US-printed and US-destined orders. This is the most detailed way to track
841
+ * non-express/certified orders.
842
+ */
843
+ imbStatus?: 'entered_mail_stream' | 'out_for_delivery' | 'returned_to_sender';
844
+
845
+ /**
846
+ * The most recent ZIP code of the USPS facility that the order has been processed
847
+ * through. Only populated when an `imbStatus` is present.
848
+ */
849
+ imbZIPCode?: string;
850
+
851
+ /**
852
+ * The HTML content for the inside of the snap pack, when provided instead of a
853
+ * template or PDF.
854
+ */
855
+ insideHTML?: string;
856
+
857
+ /**
858
+ * The template ID for the inside of the snap pack, when provided instead of HTML
859
+ * or PDF.
860
+ */
861
+ insideTemplate?: string;
862
+
863
+ /**
864
+ * These will be merged with the variables in the template or HTML you create this
865
+ * order with. The keys in this object should match the variable names in the
866
+ * template _exactly_ as they are case-sensitive. Note that these _do not_ apply to
867
+ * PDFs uploaded with the order.
868
+ */
869
+ mergeVariables?: { [key: string]: unknown };
870
+
871
+ /**
872
+ * See the section on Metadata.
873
+ */
874
+ metadata?: { [key: string]: unknown };
875
+
876
+ /**
877
+ * The HTML content for the outside of the snap pack, when provided instead of a
878
+ * template or PDF.
879
+ */
880
+ outsideHTML?: string;
881
+
882
+ /**
883
+ * The template ID for the outside of the snap pack, when provided instead of HTML
884
+ * or PDF.
885
+ */
886
+ outsideTemplate?: string;
887
+
888
+ /**
889
+ * The tracking number of this order. Populated after an express/certified order
890
+ * has been processed for delivery.
891
+ */
892
+ trackingNumber?: string;
893
+
894
+ /**
895
+ * A signed URL to the uploaded PDF provided at creation time, if a PDF was
896
+ * supplied.
897
+ */
898
+ uploadedPDF?: string;
899
+
900
+ /**
901
+ * PostGrid renders a PDF preview for all orders. This should be inspected to
902
+ * ensure that the order is correct before it is sent out because it shows what
903
+ * will be printed and mailed to the recipient. Once the PDF preview is generated,
904
+ * this field will be returned by all `GET` endpoints which produce this order.
905
+ *
906
+ * This URL is a signed link to the PDF preview. It will expire after a short
907
+ * period of time. If you need to access this URL after it has expired, you can
908
+ * regenerate it by calling the `GET` endpoint again.
909
+ */
910
+ url?: string;
911
+ }
912
+
913
+ export namespace SnapPackDeleteResponse {
914
+ /**
915
+ * The cancellation details of this order. Populated if the order has been
916
+ * cancelled.
917
+ */
918
+ export interface Cancellation {
919
+ /**
920
+ * The reason for the cancellation.
921
+ */
922
+ reason: 'user_initiated' | 'invalid_content' | 'invalid_order_mailing_class';
923
+
924
+ /**
925
+ * The user ID who cancelled the order.
926
+ */
927
+ cancelledByUser?: string;
928
+
929
+ /**
930
+ * An optional note provided by the user who cancelled the order.
931
+ */
932
+ note?: string;
933
+ }
934
+ }
935
+
936
+ export interface SnapPackProgressionsResponse {
937
+ /**
938
+ * A unique ID prefixed with snap*pack*
939
+ */
940
+ id: string;
941
+
942
+ /**
943
+ * The UTC time at which this resource was created.
944
+ */
945
+ createdAt: string;
946
+
947
+ /**
948
+ * The contact information of the sender.
949
+ */
950
+ from: ContactsAPI.Contact;
951
+
952
+ /**
953
+ * `true` if this is a live mode resource else `false`.
954
+ */
955
+ live: boolean;
956
+
957
+ /**
958
+ * The mailing class of this order. This determines the speed and cost of delivery.
959
+ * See `OrderMailingClass` for more details.
960
+ */
961
+ mailingClass:
962
+ | 'first_class'
963
+ | 'standard_class'
964
+ | 'express'
965
+ | 'certified'
966
+ | 'certified_return_receipt'
967
+ | 'registered'
968
+ | 'usps_first_class'
969
+ | 'usps_standard_class'
970
+ | 'usps_eddm'
971
+ | 'usps_express_2_day'
972
+ | 'usps_express_3_day'
973
+ | 'usps_first_class_certified'
974
+ | 'usps_first_class_certified_return_receipt'
975
+ | 'usps_first_class_registered'
976
+ | 'usps_express_3_day_signature_confirmation'
977
+ | 'usps_express_3_day_certified'
978
+ | 'usps_express_3_day_certified_return_receipt'
979
+ | 'ca_post_lettermail'
980
+ | 'ca_post_personalized'
981
+ | 'ca_post_neighbourhood_mail'
982
+ | 'ups_express_overnight'
983
+ | 'ups_express_2_day'
984
+ | 'ups_express_3_day'
985
+ | 'royal_mail_first_class'
986
+ | 'royal_mail_second_class'
987
+ | 'au_post_second_class';
988
+
989
+ /**
990
+ * Always `snap_pack`.
991
+ */
992
+ object: 'snap_pack';
993
+
994
+ /**
995
+ * This order will transition from `ready` to `printing` on the day after this
996
+ * date. For example, if this is a date on Tuesday, the order will transition to
997
+ * `printing` on Wednesday at midnight eastern time.
998
+ */
999
+ sendDate: string;
1000
+
1001
+ /**
1002
+ * Enum representing the supported snap pack sizes.
1003
+ */
1004
+ size: '8.5x11_bifold_v';
1005
+
1006
+ /**
1007
+ * See `OrderStatus` for more details on the status of this order.
1008
+ */
1009
+ status: 'ready' | 'printing' | 'processed_for_delivery' | 'completed' | 'cancelled';
1010
+
1011
+ /**
1012
+ * The recipient of this order. This will be provided even if you delete the
1013
+ * underlying contact.
1014
+ */
1015
+ to: ContactsAPI.Contact;
1016
+
1017
+ /**
1018
+ * The UTC time at which this resource was last updated.
1019
+ */
1020
+ updatedAt: string;
1021
+
1022
+ /**
1023
+ * The cancellation details of this order. Populated if the order has been
1024
+ * cancelled.
1025
+ */
1026
+ cancellation?: SnapPackProgressionsResponse.Cancellation;
1027
+
1028
+ /**
1029
+ * An optional string describing this resource. Will be visible in the API and the
1030
+ * dashboard.
1031
+ */
1032
+ description?: string;
1033
+
1034
+ /**
1035
+ * The last date that the IMB status was updated. See `imbStatus` for more details.
1036
+ */
1037
+ imbDate?: string;
1038
+
1039
+ /**
1040
+ * The Intelligent Mail Barcode (IMB) status of this order. Only populated for
1041
+ * US-printed and US-destined orders. This is the most detailed way to track
1042
+ * non-express/certified orders.
1043
+ */
1044
+ imbStatus?: 'entered_mail_stream' | 'out_for_delivery' | 'returned_to_sender';
1045
+
1046
+ /**
1047
+ * The most recent ZIP code of the USPS facility that the order has been processed
1048
+ * through. Only populated when an `imbStatus` is present.
1049
+ */
1050
+ imbZIPCode?: string;
1051
+
1052
+ /**
1053
+ * The HTML content for the inside of the snap pack, when provided instead of a
1054
+ * template or PDF.
1055
+ */
1056
+ insideHTML?: string;
1057
+
1058
+ /**
1059
+ * The template ID for the inside of the snap pack, when provided instead of HTML
1060
+ * or PDF.
1061
+ */
1062
+ insideTemplate?: string;
1063
+
1064
+ /**
1065
+ * These will be merged with the variables in the template or HTML you create this
1066
+ * order with. The keys in this object should match the variable names in the
1067
+ * template _exactly_ as they are case-sensitive. Note that these _do not_ apply to
1068
+ * PDFs uploaded with the order.
1069
+ */
1070
+ mergeVariables?: { [key: string]: unknown };
1071
+
1072
+ /**
1073
+ * See the section on Metadata.
1074
+ */
1075
+ metadata?: { [key: string]: unknown };
1076
+
1077
+ /**
1078
+ * The HTML content for the outside of the snap pack, when provided instead of a
1079
+ * template or PDF.
1080
+ */
1081
+ outsideHTML?: string;
1082
+
1083
+ /**
1084
+ * The template ID for the outside of the snap pack, when provided instead of HTML
1085
+ * or PDF.
1086
+ */
1087
+ outsideTemplate?: string;
1088
+
1089
+ /**
1090
+ * The tracking number of this order. Populated after an express/certified order
1091
+ * has been processed for delivery.
1092
+ */
1093
+ trackingNumber?: string;
1094
+
1095
+ /**
1096
+ * A signed URL to the uploaded PDF provided at creation time, if a PDF was
1097
+ * supplied.
1098
+ */
1099
+ uploadedPDF?: string;
1100
+
1101
+ /**
1102
+ * PostGrid renders a PDF preview for all orders. This should be inspected to
1103
+ * ensure that the order is correct before it is sent out because it shows what
1104
+ * will be printed and mailed to the recipient. Once the PDF preview is generated,
1105
+ * this field will be returned by all `GET` endpoints which produce this order.
1106
+ *
1107
+ * This URL is a signed link to the PDF preview. It will expire after a short
1108
+ * period of time. If you need to access this URL after it has expired, you can
1109
+ * regenerate it by calling the `GET` endpoint again.
1110
+ */
1111
+ url?: string;
1112
+ }
1113
+
1114
+ export namespace SnapPackProgressionsResponse {
1115
+ /**
1116
+ * The cancellation details of this order. Populated if the order has been
1117
+ * cancelled.
1118
+ */
1119
+ export interface Cancellation {
1120
+ /**
1121
+ * The reason for the cancellation.
1122
+ */
1123
+ reason: 'user_initiated' | 'invalid_content' | 'invalid_order_mailing_class';
1124
+
1125
+ /**
1126
+ * The user ID who cancelled the order.
1127
+ */
1128
+ cancelledByUser?: string;
1129
+
1130
+ /**
1131
+ * An optional note provided by the user who cancelled the order.
1132
+ */
1133
+ note?: string;
1134
+ }
1135
+ }
1136
+
1137
+ export interface SnapPackRetrieveCapabilitiesResponse {
1138
+ mailingClasses: Array<
1139
+ | 'first_class'
1140
+ | 'standard_class'
1141
+ | 'express'
1142
+ | 'certified'
1143
+ | 'certified_return_receipt'
1144
+ | 'registered'
1145
+ | 'usps_first_class'
1146
+ | 'usps_standard_class'
1147
+ | 'usps_eddm'
1148
+ | 'usps_express_2_day'
1149
+ | 'usps_express_3_day'
1150
+ | 'usps_first_class_certified'
1151
+ | 'usps_first_class_certified_return_receipt'
1152
+ | 'usps_first_class_registered'
1153
+ | 'usps_express_3_day_signature_confirmation'
1154
+ | 'usps_express_3_day_certified'
1155
+ | 'usps_express_3_day_certified_return_receipt'
1156
+ | 'ca_post_lettermail'
1157
+ | 'ca_post_personalized'
1158
+ | 'ca_post_neighbourhood_mail'
1159
+ | 'ups_express_overnight'
1160
+ | 'ups_express_2_day'
1161
+ | 'ups_express_3_day'
1162
+ | 'royal_mail_first_class'
1163
+ | 'royal_mail_second_class'
1164
+ | 'au_post_second_class'
1165
+ >;
1166
+
1167
+ sizes: Array<'8.5x11_bifold_v'>;
1168
+ }
1169
+
1170
+ export type SnapPackCreateParams =
1171
+ | SnapPackCreateParams.SnapPackCreateWithHTML
1172
+ | SnapPackCreateParams.SnapPackCreateWithTemplate
1173
+ | SnapPackCreateParams.SnapPackCreateWithPdf;
1174
+
1175
+ export declare namespace SnapPackCreateParams {
1176
+ export interface SnapPackCreateWithHTML {
1177
+ /**
1178
+ * The contact information of the sender. You can pass contact information inline
1179
+ * here just like you can for the `to` contact.
1180
+ */
1181
+ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string;
1182
+
1183
+ /**
1184
+ * The HTML content for the inside of the snap pack. You can supply _either_ this
1185
+ * or `insideTemplate` but not both.
1186
+ */
1187
+ insideHTML: string;
1188
+
1189
+ /**
1190
+ * The HTML content for the outside of the snap pack. You can supply _either_ this
1191
+ * or `outsideTemplate` but not both.
1192
+ */
1193
+ outsideHTML: string;
1194
+
1195
+ /**
1196
+ * Enum representing the supported snap pack sizes.
1197
+ */
1198
+ size: '8.5x11_bifold_v';
1199
+
1200
+ /**
1201
+ * The recipient of this order. You can either supply the contact information
1202
+ * inline here or provide a contact ID. PostGrid will automatically deduplicate
1203
+ * contacts regardless of whether you provide the information inline here or call
1204
+ * the contact creation endpoint.
1205
+ */
1206
+ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string;
1207
+
1208
+ /**
1209
+ * An optional string describing this resource. Will be visible in the API and the
1210
+ * dashboard.
1211
+ */
1212
+ description?: string;
1213
+
1214
+ /**
1215
+ * The mailing class of this order. If not provided, automatically set to
1216
+ * `first_class`.
1217
+ */
1218
+ mailingClass?:
1219
+ | 'first_class'
1220
+ | 'standard_class'
1221
+ | 'express'
1222
+ | 'certified'
1223
+ | 'certified_return_receipt'
1224
+ | 'registered'
1225
+ | 'usps_first_class'
1226
+ | 'usps_standard_class'
1227
+ | 'usps_eddm'
1228
+ | 'usps_express_2_day'
1229
+ | 'usps_express_3_day'
1230
+ | 'usps_first_class_certified'
1231
+ | 'usps_first_class_certified_return_receipt'
1232
+ | 'usps_first_class_registered'
1233
+ | 'usps_express_3_day_signature_confirmation'
1234
+ | 'usps_express_3_day_certified'
1235
+ | 'usps_express_3_day_certified_return_receipt'
1236
+ | 'ca_post_lettermail'
1237
+ | 'ca_post_personalized'
1238
+ | 'ca_post_neighbourhood_mail'
1239
+ | 'ups_express_overnight'
1240
+ | 'ups_express_2_day'
1241
+ | 'ups_express_3_day'
1242
+ | 'royal_mail_first_class'
1243
+ | 'royal_mail_second_class'
1244
+ | 'au_post_second_class';
1245
+
1246
+ /**
1247
+ * These will be merged with the variables in the template or HTML you create this
1248
+ * order with. The keys in this object should match the variable names in the
1249
+ * template _exactly_ as they are case-sensitive. Note that these _do not_ apply to
1250
+ * PDFs uploaded with the order.
1251
+ */
1252
+ mergeVariables?: { [key: string]: unknown };
1253
+
1254
+ /**
1255
+ * See the section on Metadata.
1256
+ */
1257
+ metadata?: { [key: string]: unknown };
1258
+
1259
+ /**
1260
+ * This order will transition from `ready` to `printing` on the day after this
1261
+ * date. You can use this parameter to schedule orders for a future date.
1262
+ */
1263
+ sendDate?: string;
1264
+ }
1265
+
1266
+ export interface SnapPackCreateWithTemplate {
1267
+ /**
1268
+ * The contact information of the sender. You can pass contact information inline
1269
+ * here just like you can for the `to` contact.
1270
+ */
1271
+ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string;
1272
+
1273
+ /**
1274
+ * The template ID for the inside of the snap pack. You can supply _either_ this or
1275
+ * `insideHTML` but not both.
1276
+ */
1277
+ insideTemplate: string;
1278
+
1279
+ /**
1280
+ * The template ID for the outside of the snap pack. You can supply _either_ this
1281
+ * or `outsideHTML` but not both.
1282
+ */
1283
+ outsideTemplate: string;
1284
+
1285
+ /**
1286
+ * Enum representing the supported snap pack sizes.
1287
+ */
1288
+ size: '8.5x11_bifold_v';
1289
+
1290
+ /**
1291
+ * The recipient of this order. You can either supply the contact information
1292
+ * inline here or provide a contact ID. PostGrid will automatically deduplicate
1293
+ * contacts regardless of whether you provide the information inline here or call
1294
+ * the contact creation endpoint.
1295
+ */
1296
+ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string;
1297
+
1298
+ /**
1299
+ * An optional string describing this resource. Will be visible in the API and the
1300
+ * dashboard.
1301
+ */
1302
+ description?: string;
1303
+
1304
+ /**
1305
+ * The mailing class of this order. If not provided, automatically set to
1306
+ * `first_class`.
1307
+ */
1308
+ mailingClass?:
1309
+ | 'first_class'
1310
+ | 'standard_class'
1311
+ | 'express'
1312
+ | 'certified'
1313
+ | 'certified_return_receipt'
1314
+ | 'registered'
1315
+ | 'usps_first_class'
1316
+ | 'usps_standard_class'
1317
+ | 'usps_eddm'
1318
+ | 'usps_express_2_day'
1319
+ | 'usps_express_3_day'
1320
+ | 'usps_first_class_certified'
1321
+ | 'usps_first_class_certified_return_receipt'
1322
+ | 'usps_first_class_registered'
1323
+ | 'usps_express_3_day_signature_confirmation'
1324
+ | 'usps_express_3_day_certified'
1325
+ | 'usps_express_3_day_certified_return_receipt'
1326
+ | 'ca_post_lettermail'
1327
+ | 'ca_post_personalized'
1328
+ | 'ca_post_neighbourhood_mail'
1329
+ | 'ups_express_overnight'
1330
+ | 'ups_express_2_day'
1331
+ | 'ups_express_3_day'
1332
+ | 'royal_mail_first_class'
1333
+ | 'royal_mail_second_class'
1334
+ | 'au_post_second_class';
1335
+
1336
+ /**
1337
+ * These will be merged with the variables in the template or HTML you create this
1338
+ * order with. The keys in this object should match the variable names in the
1339
+ * template _exactly_ as they are case-sensitive. Note that these _do not_ apply to
1340
+ * PDFs uploaded with the order.
1341
+ */
1342
+ mergeVariables?: { [key: string]: unknown };
1343
+
1344
+ /**
1345
+ * See the section on Metadata.
1346
+ */
1347
+ metadata?: { [key: string]: unknown };
1348
+
1349
+ /**
1350
+ * This order will transition from `ready` to `printing` on the day after this
1351
+ * date. You can use this parameter to schedule orders for a future date.
1352
+ */
1353
+ sendDate?: string;
1354
+ }
1355
+
1356
+ export interface SnapPackCreateWithPdf {
1357
+ /**
1358
+ * The contact information of the sender. You can pass contact information inline
1359
+ * here just like you can for the `to` contact.
1360
+ */
1361
+ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string;
1362
+
1363
+ /**
1364
+ * A URL or a multipart-uploaded two-page PDF (first page is the outside, second
1365
+ * page is the inside) that matches the selected snap pack size.
1366
+ */
1367
+ pdf: string;
1368
+
1369
+ /**
1370
+ * Enum representing the supported snap pack sizes.
1371
+ */
1372
+ size: '8.5x11_bifold_v';
1373
+
1374
+ /**
1375
+ * The recipient of this order. You can either supply the contact information
1376
+ * inline here or provide a contact ID. PostGrid will automatically deduplicate
1377
+ * contacts regardless of whether you provide the information inline here or call
1378
+ * the contact creation endpoint.
1379
+ */
1380
+ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string;
1381
+
1382
+ /**
1383
+ * An optional string describing this resource. Will be visible in the API and the
1384
+ * dashboard.
1385
+ */
1386
+ description?: string;
1387
+
1388
+ /**
1389
+ * The mailing class of this order. If not provided, automatically set to
1390
+ * `first_class`.
1391
+ */
1392
+ mailingClass?:
1393
+ | 'first_class'
1394
+ | 'standard_class'
1395
+ | 'express'
1396
+ | 'certified'
1397
+ | 'certified_return_receipt'
1398
+ | 'registered'
1399
+ | 'usps_first_class'
1400
+ | 'usps_standard_class'
1401
+ | 'usps_eddm'
1402
+ | 'usps_express_2_day'
1403
+ | 'usps_express_3_day'
1404
+ | 'usps_first_class_certified'
1405
+ | 'usps_first_class_certified_return_receipt'
1406
+ | 'usps_first_class_registered'
1407
+ | 'usps_express_3_day_signature_confirmation'
1408
+ | 'usps_express_3_day_certified'
1409
+ | 'usps_express_3_day_certified_return_receipt'
1410
+ | 'ca_post_lettermail'
1411
+ | 'ca_post_personalized'
1412
+ | 'ca_post_neighbourhood_mail'
1413
+ | 'ups_express_overnight'
1414
+ | 'ups_express_2_day'
1415
+ | 'ups_express_3_day'
1416
+ | 'royal_mail_first_class'
1417
+ | 'royal_mail_second_class'
1418
+ | 'au_post_second_class';
1419
+
1420
+ /**
1421
+ * These will be merged with the variables in the template or HTML you create this
1422
+ * order with. The keys in this object should match the variable names in the
1423
+ * template _exactly_ as they are case-sensitive. Note that these _do not_ apply to
1424
+ * PDFs uploaded with the order.
1425
+ */
1426
+ mergeVariables?: { [key: string]: unknown };
1427
+
1428
+ /**
1429
+ * See the section on Metadata.
1430
+ */
1431
+ metadata?: { [key: string]: unknown };
1432
+
1433
+ /**
1434
+ * This order will transition from `ready` to `printing` on the day after this
1435
+ * date. You can use this parameter to schedule orders for a future date.
1436
+ */
1437
+ sendDate?: string;
1438
+ }
1439
+ }
1440
+
1441
+ export interface SnapPackListParams extends SkipLimitParams {
1442
+ /**
1443
+ * You can supply any string to help narrow down the list of resources. For
1444
+ * example, if you pass `"New York"` (quoted), it will return resources that have
1445
+ * that string present somewhere in their response. Alternatively, you can supply a
1446
+ * structured search query. See the documentation on `StructuredSearchQuery` for
1447
+ * more details.
1448
+ */
1449
+ search?: string;
1450
+ }
1451
+
1452
+ export interface SnapPackRetrieveCapabilitiesParams {
1453
+ /**
1454
+ * The country code where mail may be returned to.
1455
+ */
1456
+ returnCountryCode: string;
1457
+
1458
+ /**
1459
+ * The country code of where the snap pack will be sent to. One of `mailingList` or
1460
+ * `destinationCountryCode` must be supplied but not both.
1461
+ */
1462
+ destinationCountryCode?: string;
1463
+
1464
+ /**
1465
+ * Sources destination countries from the provided mailing list. One of
1466
+ * `mailingList` or `destinationCountryCode` must be supplied but not both.
1467
+ */
1468
+ mailingList?: string;
1469
+ }
1470
+
1471
+ export declare namespace SnapPacks {
1472
+ export {
1473
+ type SnapPackCreateResponse as SnapPackCreateResponse,
1474
+ type SnapPackRetrieveResponse as SnapPackRetrieveResponse,
1475
+ type SnapPackListResponse as SnapPackListResponse,
1476
+ type SnapPackDeleteResponse as SnapPackDeleteResponse,
1477
+ type SnapPackProgressionsResponse as SnapPackProgressionsResponse,
1478
+ type SnapPackRetrieveCapabilitiesResponse as SnapPackRetrieveCapabilitiesResponse,
1479
+ type SnapPackListResponsesSkipLimit as SnapPackListResponsesSkipLimit,
1480
+ type SnapPackCreateParams as SnapPackCreateParams,
1481
+ type SnapPackListParams as SnapPackListParams,
1482
+ type SnapPackRetrieveCapabilitiesParams as SnapPackRetrieveCapabilitiesParams,
1483
+ };
1484
+ }