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
@@ -1,8 +1,5 @@
1
1
  import { APIResource } from "../../core/resource.mjs";
2
- import * as BoxesAPI from "./boxes.mjs";
3
2
  import * as ContactsAPI from "./contacts.mjs";
4
- import * as PrintMailAPI from "./print-mail.mjs";
5
- import * as OrderProfilesSelfMailersAPI from "./order-profiles/self-mailers.mjs";
6
3
  import { APIPromise } from "../../core/api-promise.mjs";
7
4
  import { PagePromise, SkipLimit, type SkipLimitParams } from "../../core/pagination.mjs";
8
5
  import { RequestOptions } from "../../internal/request-options.mjs";
@@ -61,6 +58,21 @@ export declare class SelfMailers extends APIResource {
61
58
  * ```
62
59
  */
63
60
  delete(id: string, options?: RequestOptions): APIPromise<SelfMailer>;
61
+ /**
62
+ * Progresses a self-mailer's `status` to the next stage. This is only available in
63
+ * test mode and can be used to simulate how a live order would progress through
64
+ * the different statuses.
65
+ *
66
+ * Note: this will fail with an `invalid_progression_error` if the status is one of
67
+ * `completed` or `cancelled`.
68
+ *
69
+ * @example
70
+ * ```ts
71
+ * const selfMailer =
72
+ * await client.printMail.selfMailers.progress('id');
73
+ * ```
74
+ */
75
+ progress(id: string, options?: RequestOptions): APIPromise<SelfMailer>;
64
76
  /**
65
77
  * Retrieve a self-mailer preview URL.
66
78
  *
@@ -99,7 +111,7 @@ export interface SelfMailer {
99
111
  * The mailing class of this order. This determines the speed and cost of delivery.
100
112
  * See `OrderMailingClass` for more details.
101
113
  */
102
- mailingClass: BoxesAPI.OrderMailingClass;
114
+ 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';
103
115
  /**
104
116
  * Always `self_mailer`.
105
117
  */
@@ -113,11 +125,11 @@ export interface SelfMailer {
113
125
  /**
114
126
  * Enum representing the supported self-mailer sizes.
115
127
  */
116
- size: OrderProfilesSelfMailersAPI.SelfMailerSize;
128
+ size: '8.5x11_bifold' | '8.5x11_trifold' | '9.5x16_trifold';
117
129
  /**
118
130
  * See `OrderStatus` for more details on the status of this order.
119
131
  */
120
- status: BoxesAPI.OrderStatus;
132
+ status: 'ready' | 'printing' | 'processed_for_delivery' | 'completed' | 'cancelled';
121
133
  /**
122
134
  * The recipient of this order. This will be provided even if you delete the
123
135
  * underlying contact.
@@ -131,7 +143,7 @@ export interface SelfMailer {
131
143
  * The cancellation details of this order. Populated if the order has been
132
144
  * cancelled.
133
145
  */
134
- cancellation?: BoxesAPI.Cancellation;
146
+ cancellation?: SelfMailer.Cancellation;
135
147
  /**
136
148
  * An optional string describing this resource. Will be visible in the API and the
137
149
  * dashboard.
@@ -146,7 +158,7 @@ export interface SelfMailer {
146
158
  * US-printed and US-destined orders. This is the most detailed way to track
147
159
  * non-express/certified orders.
148
160
  */
149
- imbStatus?: BoxesAPI.OrderImbStatus;
161
+ imbStatus?: 'entered_mail_stream' | 'out_for_delivery' | 'returned_to_sender';
150
162
  /**
151
163
  * The most recent ZIP code of the USPS facility that the order has been processed
152
164
  * through. Only populated when an `imbStatus` is present.
@@ -184,6 +196,26 @@ export interface SelfMailer {
184
196
  */
185
197
  url?: string;
186
198
  }
199
+ export declare namespace SelfMailer {
200
+ /**
201
+ * The cancellation details of this order. Populated if the order has been
202
+ * cancelled.
203
+ */
204
+ interface Cancellation {
205
+ /**
206
+ * The reason for the cancellation.
207
+ */
208
+ reason: 'user_initiated' | 'invalid_content' | 'invalid_order_mailing_class';
209
+ /**
210
+ * The user ID who cancelled the order.
211
+ */
212
+ cancelledByUser?: string;
213
+ /**
214
+ * An optional note provided by the user who cancelled the order.
215
+ */
216
+ note?: string;
217
+ }
218
+ }
187
219
  export interface SelfMailerRetrieveURLResponse {
188
220
  /**
189
221
  * A unique ID prefixed with self*mailer*
@@ -203,7 +235,7 @@ export declare namespace SelfMailerCreateParams {
203
235
  * The contact information of the sender. You can pass contact information inline
204
236
  * here just like you can for the `to`.
205
237
  */
206
- from: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
238
+ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string;
207
239
  /**
208
240
  * The HTML content for the inside of the self-mailer. You can supply _either_ this
209
241
  * or `insideTemplate` but not both.
@@ -217,14 +249,14 @@ export declare namespace SelfMailerCreateParams {
217
249
  /**
218
250
  * Enum representing the supported self-mailer sizes.
219
251
  */
220
- size: OrderProfilesSelfMailersAPI.SelfMailerSize;
252
+ size: '8.5x11_bifold' | '8.5x11_trifold' | '9.5x16_trifold';
221
253
  /**
222
254
  * The recipient of this order. You can either supply the contact information
223
255
  * inline here or provide a contact ID. PostGrid will automatically deduplicate
224
256
  * contacts regardless of whether you provide the information inline here or call
225
257
  * the contact creation endpoint.
226
258
  */
227
- to: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
259
+ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string;
228
260
  /**
229
261
  * An optional string describing this resource. Will be visible in the API and the
230
262
  * dashboard.
@@ -234,7 +266,7 @@ export declare namespace SelfMailerCreateParams {
234
266
  * The mailing class of this order. If not provided, automatically set to
235
267
  * `first_class`.
236
268
  */
237
- mailingClass?: BoxesAPI.OrderMailingClass;
269
+ 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';
238
270
  /**
239
271
  * These will be merged with the variables in the template or HTML you create this
240
272
  * order with. The keys in this object should match the variable names in the
@@ -273,7 +305,7 @@ export declare namespace SelfMailerCreateParams {
273
305
  * The contact information of the sender. You can pass contact information inline
274
306
  * here just like you can for the `to`.
275
307
  */
276
- from: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
308
+ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string;
277
309
  /**
278
310
  * A URL pointing to a 2 page PDF file. The first page is the inside of the
279
311
  * self-mailer and the second page is the outside (where the address will be
@@ -283,14 +315,14 @@ export declare namespace SelfMailerCreateParams {
283
315
  /**
284
316
  * Enum representing the supported self-mailer sizes.
285
317
  */
286
- size: OrderProfilesSelfMailersAPI.SelfMailerSize;
318
+ size: '8.5x11_bifold' | '8.5x11_trifold' | '9.5x16_trifold';
287
319
  /**
288
320
  * The recipient of this order. You can either supply the contact information
289
321
  * inline here or provide a contact ID. PostGrid will automatically deduplicate
290
322
  * contacts regardless of whether you provide the information inline here or call
291
323
  * the contact creation endpoint.
292
324
  */
293
- to: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
325
+ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string;
294
326
  /**
295
327
  * An optional string describing this resource. Will be visible in the API and the
296
328
  * dashboard.
@@ -300,7 +332,7 @@ export declare namespace SelfMailerCreateParams {
300
332
  * The mailing class of this order. If not provided, automatically set to
301
333
  * `first_class`.
302
334
  */
303
- mailingClass?: BoxesAPI.OrderMailingClass;
335
+ 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';
304
336
  /**
305
337
  * These will be merged with the variables in the template or HTML you create this
306
338
  * order with. The keys in this object should match the variable names in the
@@ -327,7 +359,7 @@ export declare namespace SelfMailerCreateParams {
327
359
  * The contact information of the sender. You can pass contact information inline
328
360
  * here just like you can for the `to`.
329
361
  */
330
- from: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
362
+ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string;
331
363
  /**
332
364
  * A 2 page PDF file. The first page is the inside of the self-mailer and the
333
365
  * second page is the outside (where the address will be stamped on).
@@ -336,14 +368,14 @@ export declare namespace SelfMailerCreateParams {
336
368
  /**
337
369
  * Enum representing the supported self-mailer sizes.
338
370
  */
339
- size: OrderProfilesSelfMailersAPI.SelfMailerSize;
371
+ size: '8.5x11_bifold' | '8.5x11_trifold' | '9.5x16_trifold';
340
372
  /**
341
373
  * The recipient of this order. You can either supply the contact information
342
374
  * inline here or provide a contact ID. PostGrid will automatically deduplicate
343
375
  * contacts regardless of whether you provide the information inline here or call
344
376
  * the contact creation endpoint.
345
377
  */
346
- to: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
378
+ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string;
347
379
  /**
348
380
  * An optional string describing this resource. Will be visible in the API and the
349
381
  * dashboard.
@@ -353,7 +385,7 @@ export declare namespace SelfMailerCreateParams {
353
385
  * The mailing class of this order. If not provided, automatically set to
354
386
  * `first_class`.
355
387
  */
356
- mailingClass?: BoxesAPI.OrderMailingClass;
388
+ 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';
357
389
  /**
358
390
  * These will be merged with the variables in the template or HTML you create this
359
391
  * order with. The keys in this object should match the variable names in the
@@ -1 +1 @@
1
- {"version":3,"file":"self-mailers.d.mts","sourceRoot":"","sources":["../../src/resources/print-mail/self-mailers.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,KAAK,WAAW;OAChB,KAAK,YAAY;OACjB,KAAK,2BAA2B;OAChC,EAAE,UAAU,EAAE;OACd,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE;OAChD,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;IAItF;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;IAItE;;;;;;;;;;OAUG;IACH,IAAI,CACF,KAAK,GAAE,oBAAoB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,oBAAoB,EAAE,UAAU,CAAC;IAOhD;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE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B,IAAI,6BAA6B,EACnE,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
@@ -1,8 +1,5 @@
1
1
  import { APIResource } from "../../core/resource.js";
2
- import * as BoxesAPI from "./boxes.js";
3
2
  import * as ContactsAPI from "./contacts.js";
4
- import * as PrintMailAPI from "./print-mail.js";
5
- import * as OrderProfilesSelfMailersAPI from "./order-profiles/self-mailers.js";
6
3
  import { APIPromise } from "../../core/api-promise.js";
7
4
  import { PagePromise, SkipLimit, type SkipLimitParams } from "../../core/pagination.js";
8
5
  import { RequestOptions } from "../../internal/request-options.js";
@@ -61,6 +58,21 @@ export declare class SelfMailers extends APIResource {
61
58
  * ```
62
59
  */
63
60
  delete(id: string, options?: RequestOptions): APIPromise<SelfMailer>;
61
+ /**
62
+ * Progresses a self-mailer's `status` to the next stage. This is only available in
63
+ * test mode and can be used to simulate how a live order would progress through
64
+ * the different statuses.
65
+ *
66
+ * Note: this will fail with an `invalid_progression_error` if the status is one of
67
+ * `completed` or `cancelled`.
68
+ *
69
+ * @example
70
+ * ```ts
71
+ * const selfMailer =
72
+ * await client.printMail.selfMailers.progress('id');
73
+ * ```
74
+ */
75
+ progress(id: string, options?: RequestOptions): APIPromise<SelfMailer>;
64
76
  /**
65
77
  * Retrieve a self-mailer preview URL.
66
78
  *
@@ -99,7 +111,7 @@ export interface SelfMailer {
99
111
  * The mailing class of this order. This determines the speed and cost of delivery.
100
112
  * See `OrderMailingClass` for more details.
101
113
  */
102
- mailingClass: BoxesAPI.OrderMailingClass;
114
+ 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';
103
115
  /**
104
116
  * Always `self_mailer`.
105
117
  */
@@ -113,11 +125,11 @@ export interface SelfMailer {
113
125
  /**
114
126
  * Enum representing the supported self-mailer sizes.
115
127
  */
116
- size: OrderProfilesSelfMailersAPI.SelfMailerSize;
128
+ size: '8.5x11_bifold' | '8.5x11_trifold' | '9.5x16_trifold';
117
129
  /**
118
130
  * See `OrderStatus` for more details on the status of this order.
119
131
  */
120
- status: BoxesAPI.OrderStatus;
132
+ status: 'ready' | 'printing' | 'processed_for_delivery' | 'completed' | 'cancelled';
121
133
  /**
122
134
  * The recipient of this order. This will be provided even if you delete the
123
135
  * underlying contact.
@@ -131,7 +143,7 @@ export interface SelfMailer {
131
143
  * The cancellation details of this order. Populated if the order has been
132
144
  * cancelled.
133
145
  */
134
- cancellation?: BoxesAPI.Cancellation;
146
+ cancellation?: SelfMailer.Cancellation;
135
147
  /**
136
148
  * An optional string describing this resource. Will be visible in the API and the
137
149
  * dashboard.
@@ -146,7 +158,7 @@ export interface SelfMailer {
146
158
  * US-printed and US-destined orders. This is the most detailed way to track
147
159
  * non-express/certified orders.
148
160
  */
149
- imbStatus?: BoxesAPI.OrderImbStatus;
161
+ imbStatus?: 'entered_mail_stream' | 'out_for_delivery' | 'returned_to_sender';
150
162
  /**
151
163
  * The most recent ZIP code of the USPS facility that the order has been processed
152
164
  * through. Only populated when an `imbStatus` is present.
@@ -184,6 +196,26 @@ export interface SelfMailer {
184
196
  */
185
197
  url?: string;
186
198
  }
199
+ export declare namespace SelfMailer {
200
+ /**
201
+ * The cancellation details of this order. Populated if the order has been
202
+ * cancelled.
203
+ */
204
+ interface Cancellation {
205
+ /**
206
+ * The reason for the cancellation.
207
+ */
208
+ reason: 'user_initiated' | 'invalid_content' | 'invalid_order_mailing_class';
209
+ /**
210
+ * The user ID who cancelled the order.
211
+ */
212
+ cancelledByUser?: string;
213
+ /**
214
+ * An optional note provided by the user who cancelled the order.
215
+ */
216
+ note?: string;
217
+ }
218
+ }
187
219
  export interface SelfMailerRetrieveURLResponse {
188
220
  /**
189
221
  * A unique ID prefixed with self*mailer*
@@ -203,7 +235,7 @@ export declare namespace SelfMailerCreateParams {
203
235
  * The contact information of the sender. You can pass contact information inline
204
236
  * here just like you can for the `to`.
205
237
  */
206
- from: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
238
+ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string;
207
239
  /**
208
240
  * The HTML content for the inside of the self-mailer. You can supply _either_ this
209
241
  * or `insideTemplate` but not both.
@@ -217,14 +249,14 @@ export declare namespace SelfMailerCreateParams {
217
249
  /**
218
250
  * Enum representing the supported self-mailer sizes.
219
251
  */
220
- size: OrderProfilesSelfMailersAPI.SelfMailerSize;
252
+ size: '8.5x11_bifold' | '8.5x11_trifold' | '9.5x16_trifold';
221
253
  /**
222
254
  * The recipient of this order. You can either supply the contact information
223
255
  * inline here or provide a contact ID. PostGrid will automatically deduplicate
224
256
  * contacts regardless of whether you provide the information inline here or call
225
257
  * the contact creation endpoint.
226
258
  */
227
- to: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
259
+ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string;
228
260
  /**
229
261
  * An optional string describing this resource. Will be visible in the API and the
230
262
  * dashboard.
@@ -234,7 +266,7 @@ export declare namespace SelfMailerCreateParams {
234
266
  * The mailing class of this order. If not provided, automatically set to
235
267
  * `first_class`.
236
268
  */
237
- mailingClass?: BoxesAPI.OrderMailingClass;
269
+ 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';
238
270
  /**
239
271
  * These will be merged with the variables in the template or HTML you create this
240
272
  * order with. The keys in this object should match the variable names in the
@@ -273,7 +305,7 @@ export declare namespace SelfMailerCreateParams {
273
305
  * The contact information of the sender. You can pass contact information inline
274
306
  * here just like you can for the `to`.
275
307
  */
276
- from: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
308
+ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string;
277
309
  /**
278
310
  * A URL pointing to a 2 page PDF file. The first page is the inside of the
279
311
  * self-mailer and the second page is the outside (where the address will be
@@ -283,14 +315,14 @@ export declare namespace SelfMailerCreateParams {
283
315
  /**
284
316
  * Enum representing the supported self-mailer sizes.
285
317
  */
286
- size: OrderProfilesSelfMailersAPI.SelfMailerSize;
318
+ size: '8.5x11_bifold' | '8.5x11_trifold' | '9.5x16_trifold';
287
319
  /**
288
320
  * The recipient of this order. You can either supply the contact information
289
321
  * inline here or provide a contact ID. PostGrid will automatically deduplicate
290
322
  * contacts regardless of whether you provide the information inline here or call
291
323
  * the contact creation endpoint.
292
324
  */
293
- to: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
325
+ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string;
294
326
  /**
295
327
  * An optional string describing this resource. Will be visible in the API and the
296
328
  * dashboard.
@@ -300,7 +332,7 @@ export declare namespace SelfMailerCreateParams {
300
332
  * The mailing class of this order. If not provided, automatically set to
301
333
  * `first_class`.
302
334
  */
303
- mailingClass?: BoxesAPI.OrderMailingClass;
335
+ 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';
304
336
  /**
305
337
  * These will be merged with the variables in the template or HTML you create this
306
338
  * order with. The keys in this object should match the variable names in the
@@ -327,7 +359,7 @@ export declare namespace SelfMailerCreateParams {
327
359
  * The contact information of the sender. You can pass contact information inline
328
360
  * here just like you can for the `to`.
329
361
  */
330
- from: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
362
+ from: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string;
331
363
  /**
332
364
  * A 2 page PDF file. The first page is the inside of the self-mailer and the
333
365
  * second page is the outside (where the address will be stamped on).
@@ -336,14 +368,14 @@ export declare namespace SelfMailerCreateParams {
336
368
  /**
337
369
  * Enum representing the supported self-mailer sizes.
338
370
  */
339
- size: OrderProfilesSelfMailersAPI.SelfMailerSize;
371
+ size: '8.5x11_bifold' | '8.5x11_trifold' | '9.5x16_trifold';
340
372
  /**
341
373
  * The recipient of this order. You can either supply the contact information
342
374
  * inline here or provide a contact ID. PostGrid will automatically deduplicate
343
375
  * contacts regardless of whether you provide the information inline here or call
344
376
  * the contact creation endpoint.
345
377
  */
346
- to: PrintMailAPI.ContactCreateWithFirstName | PrintMailAPI.ContactCreateWithCompanyName | string;
378
+ to: ContactsAPI.ContactCreateWithFirstName | ContactsAPI.ContactCreateWithCompanyName | string;
347
379
  /**
348
380
  * An optional string describing this resource. Will be visible in the API and the
349
381
  * dashboard.
@@ -353,7 +385,7 @@ export declare namespace SelfMailerCreateParams {
353
385
  * The mailing class of this order. If not provided, automatically set to
354
386
  * `first_class`.
355
387
  */
356
- mailingClass?: BoxesAPI.OrderMailingClass;
388
+ 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';
357
389
  /**
358
390
  * These will be merged with the variables in the template or HTML you create this
359
391
  * order with. The keys in this object should match the variable names in the
@@ -1 +1 @@
1
- {"version":3,"file":"self-mailers.d.ts","sourceRoot":"","sources":["../../src/resources/print-mail/self-mailers.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,KAAK,WAAW;OAChB,KAAK,YAAY;OACjB,KAAK,2BAA2B;OAChC,EAAE,UAAU,EAAE;OACd,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE;OAChD,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;IAItF;;;;;;;;OAQG;IACH,QAAQ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EAAE,MAAM,GAAG,OAAO,CAAA;SAAE,CAAC;QAEtC;;;WAGG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB;CACF;AAED,MAAM,WAAW,oBAAqB,SAAQ,eAAe;IAC3D;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
@@ -71,6 +71,23 @@ class SelfMailers extends resource_1.APIResource {
71
71
  delete(id, options) {
72
72
  return this._client.delete((0, path_1.path) `/print-mail/v1/self_mailers/${id}`, options);
73
73
  }
74
+ /**
75
+ * Progresses a self-mailer's `status` to the next stage. This is only available in
76
+ * test mode and can be used to simulate how a live order would progress through
77
+ * the different statuses.
78
+ *
79
+ * Note: this will fail with an `invalid_progression_error` if the status is one of
80
+ * `completed` or `cancelled`.
81
+ *
82
+ * @example
83
+ * ```ts
84
+ * const selfMailer =
85
+ * await client.printMail.selfMailers.progress('id');
86
+ * ```
87
+ */
88
+ progress(id, options) {
89
+ return this._client.post((0, path_1.path) `/print-mail/v1/self_mailers/${id}/progressions`, options);
90
+ }
74
91
  /**
75
92
  * Retrieve a self-mailer preview URL.
76
93
  *
@@ -1 +1 @@
1
- {"version":3,"file":"self-mailers.js","sourceRoot":"","sources":["../../src/resources/print-mail/self-mailers.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAMlD,yDAAqF;AAErF,uDAAiD;AAEjD,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,O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C,CAAC;IAChF,CAAC;IAED;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,+BAA+B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,6BAA6B,EAAE,CAAA,sBAAqB,CAAA,EAAE;YACnF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,+BAA+B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/E,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,+BAA+B,EAAE,eAAe,EAAE,OAAO,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,WAAW,CAAC,EAAU,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,+BAA+B,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAChF,CAAC;CACF;AA5GD,kCA4GC"}
@@ -68,6 +68,23 @@ export class SelfMailers extends APIResource {
68
68
  delete(id, options) {
69
69
  return this._client.delete(path `/print-mail/v1/self_mailers/${id}`, options);
70
70
  }
71
+ /**
72
+ * Progresses a self-mailer's `status` to the next stage. This is only available in
73
+ * test mode and can be used to simulate how a live order would progress through
74
+ * the different statuses.
75
+ *
76
+ * Note: this will fail with an `invalid_progression_error` if the status is one of
77
+ * `completed` or `cancelled`.
78
+ *
79
+ * @example
80
+ * ```ts
81
+ * const selfMailer =
82
+ * await client.printMail.selfMailers.progress('id');
83
+ * ```
84
+ */
85
+ progress(id, options) {
86
+ return this._client.post(path `/print-mail/v1/self_mailers/${id}/progressions`, options);
87
+ }
71
88
  /**
72
89
  * Retrieve a self-mailer preview URL.
73
90
  *
@@ -1 +1 @@
1
- {"version":3,"file":"self-mailers.mjs","sourceRoot":"","sources":["../../src/resources/print-mail/self-mailers.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAMf,EAAe,SAAS,EAAwB;OAEhD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,6BAA6B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAChF,CAAC;IAED;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,+BAA+B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;;;OAUG;IACH,IAAI,CACF,QAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,6BAA6B,EAAE,CAAA,SAAqB,CAAA,EAAE;YACnF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,+BAA+B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC/E,CAAC;IAED;;;;;;;;;;;;;OAaG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