postgrid-node 0.5.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (422) hide show
  1. package/CHANGELOG.md +84 -0
  2. package/LICENSE +1 -1
  3. package/README.md +13 -10
  4. package/client.d.mts +30 -10
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +30 -10
  7. package/client.d.ts.map +1 -1
  8. package/client.js +56 -10
  9. package/client.js.map +1 -1
  10. package/client.mjs +57 -11
  11. package/client.mjs.map +1 -1
  12. package/internal/parse.d.mts.map +1 -1
  13. package/internal/parse.d.ts.map +1 -1
  14. package/internal/parse.js +5 -0
  15. package/internal/parse.js.map +1 -1
  16. package/internal/parse.mjs +5 -0
  17. package/internal/parse.mjs.map +1 -1
  18. package/internal/types.d.mts +6 -6
  19. package/internal/types.d.mts.map +1 -1
  20. package/internal/types.d.ts +6 -6
  21. package/internal/types.d.ts.map +1 -1
  22. package/internal/utils/env.js +2 -2
  23. package/internal/utils/env.js.map +1 -1
  24. package/internal/utils/env.mjs +2 -2
  25. package/internal/utils/env.mjs.map +1 -1
  26. package/internal/utils/log.d.mts.map +1 -1
  27. package/internal/utils/log.d.ts.map +1 -1
  28. package/internal/utils/log.js +3 -2
  29. package/internal/utils/log.js.map +1 -1
  30. package/internal/utils/log.mjs +3 -2
  31. package/internal/utils/log.mjs.map +1 -1
  32. package/internal/utils/query.d.mts +5 -0
  33. package/internal/utils/query.d.mts.map +1 -0
  34. package/internal/utils/query.d.ts +5 -0
  35. package/internal/utils/query.d.ts.map +1 -0
  36. package/internal/utils/query.js +23 -0
  37. package/internal/utils/query.js.map +1 -0
  38. package/internal/utils/query.mjs +20 -0
  39. package/internal/utils/query.mjs.map +1 -0
  40. package/internal/utils.d.mts +1 -0
  41. package/internal/utils.d.ts +1 -0
  42. package/internal/utils.js +1 -0
  43. package/internal/utils.js.map +1 -1
  44. package/internal/utils.mjs +1 -0
  45. package/package.json +7 -1
  46. package/resources/address-verification.d.mts +1689 -15
  47. package/resources/address-verification.d.mts.map +1 -1
  48. package/resources/address-verification.d.ts +1689 -15
  49. package/resources/address-verification.d.ts.map +1 -1
  50. package/resources/address-verification.js +200 -0
  51. package/resources/address-verification.js.map +1 -1
  52. package/resources/address-verification.mjs +200 -0
  53. package/resources/address-verification.mjs.map +1 -1
  54. package/resources/index.d.mts +3 -3
  55. package/resources/index.d.mts.map +1 -1
  56. package/resources/index.d.ts +3 -3
  57. package/resources/index.d.ts.map +1 -1
  58. package/resources/index.js.map +1 -1
  59. package/resources/index.mjs +1 -1
  60. package/resources/index.mjs.map +1 -1
  61. package/resources/intl-address-verification.d.mts +956 -35
  62. package/resources/intl-address-verification.d.mts.map +1 -1
  63. package/resources/intl-address-verification.d.ts +956 -35
  64. package/resources/intl-address-verification.d.ts.map +1 -1
  65. package/resources/intl-address-verification.js +121 -27
  66. package/resources/intl-address-verification.js.map +1 -1
  67. package/resources/intl-address-verification.mjs +121 -27
  68. package/resources/intl-address-verification.mjs.map +1 -1
  69. package/resources/print-mail/boxes.d.mts +995 -0
  70. package/resources/print-mail/boxes.d.mts.map +1 -0
  71. package/resources/print-mail/boxes.d.ts +995 -0
  72. package/resources/print-mail/boxes.d.ts.map +1 -0
  73. package/resources/print-mail/boxes.js +103 -0
  74. package/resources/print-mail/boxes.js.map +1 -0
  75. package/resources/print-mail/boxes.mjs +99 -0
  76. package/resources/print-mail/boxes.mjs.map +1 -0
  77. package/resources/print-mail/campaigns.d.mts +923 -34
  78. package/resources/print-mail/campaigns.d.mts.map +1 -1
  79. package/resources/print-mail/campaigns.d.ts +923 -34
  80. package/resources/print-mail/campaigns.d.ts.map +1 -1
  81. package/resources/print-mail/campaigns.js +10 -3
  82. package/resources/print-mail/campaigns.js.map +1 -1
  83. package/resources/print-mail/campaigns.mjs +10 -3
  84. package/resources/print-mail/campaigns.mjs.map +1 -1
  85. package/resources/print-mail/cheques.d.mts +35 -5
  86. package/resources/print-mail/cheques.d.mts.map +1 -1
  87. package/resources/print-mail/cheques.d.ts +35 -5
  88. package/resources/print-mail/cheques.d.ts.map +1 -1
  89. package/resources/print-mail/cheques.js +32 -0
  90. package/resources/print-mail/cheques.js.map +1 -1
  91. package/resources/print-mail/cheques.mjs +32 -0
  92. package/resources/print-mail/cheques.mjs.map +1 -1
  93. package/resources/print-mail/contacts.d.mts +138 -3
  94. package/resources/print-mail/contacts.d.mts.map +1 -1
  95. package/resources/print-mail/contacts.d.ts +138 -3
  96. package/resources/print-mail/contacts.d.ts.map +1 -1
  97. package/resources/print-mail/contacts.js.map +1 -1
  98. package/resources/print-mail/contacts.mjs.map +1 -1
  99. package/resources/print-mail/index.d.mts +12 -7
  100. package/resources/print-mail/index.d.mts.map +1 -1
  101. package/resources/print-mail/index.d.ts +12 -7
  102. package/resources/print-mail/index.d.ts.map +1 -1
  103. package/resources/print-mail/index.js +15 -5
  104. package/resources/print-mail/index.js.map +1 -1
  105. package/resources/print-mail/index.mjs +6 -1
  106. package/resources/print-mail/index.mjs.map +1 -1
  107. package/resources/print-mail/letters.d.mts +36 -6
  108. package/resources/print-mail/letters.d.mts.map +1 -1
  109. package/resources/print-mail/letters.d.ts +36 -6
  110. package/resources/print-mail/letters.d.ts.map +1 -1
  111. package/resources/print-mail/letters.js +32 -0
  112. package/resources/print-mail/letters.js.map +1 -1
  113. package/resources/print-mail/letters.mjs +32 -0
  114. package/resources/print-mail/letters.mjs.map +1 -1
  115. package/resources/print-mail/mailing-list-imports.d.mts +5 -1
  116. package/resources/print-mail/mailing-list-imports.d.mts.map +1 -1
  117. package/resources/print-mail/mailing-list-imports.d.ts +5 -1
  118. package/resources/print-mail/mailing-list-imports.d.ts.map +1 -1
  119. package/resources/print-mail/mailing-list-imports.js +4 -0
  120. package/resources/print-mail/mailing-list-imports.js.map +1 -1
  121. package/resources/print-mail/mailing-list-imports.mjs +4 -0
  122. package/resources/print-mail/mailing-list-imports.mjs.map +1 -1
  123. package/resources/print-mail/mailing-lists.d.mts +5 -1
  124. package/resources/print-mail/mailing-lists.d.mts.map +1 -1
  125. package/resources/print-mail/mailing-lists.d.ts +5 -1
  126. package/resources/print-mail/mailing-lists.d.ts.map +1 -1
  127. package/resources/print-mail/mailing-lists.js +4 -0
  128. package/resources/print-mail/mailing-lists.js.map +1 -1
  129. package/resources/print-mail/mailing-lists.mjs +4 -0
  130. package/resources/print-mail/mailing-lists.mjs.map +1 -1
  131. package/resources/print-mail/postcards.d.mts +63 -13
  132. package/resources/print-mail/postcards.d.mts.map +1 -1
  133. package/resources/print-mail/postcards.d.ts +63 -13
  134. package/resources/print-mail/postcards.d.ts.map +1 -1
  135. package/resources/print-mail/postcards.js +33 -0
  136. package/resources/print-mail/postcards.js.map +1 -1
  137. package/resources/print-mail/postcards.mjs +33 -0
  138. package/resources/print-mail/postcards.mjs.map +1 -1
  139. package/resources/print-mail/print-mail.d.mts +42 -159
  140. package/resources/print-mail/print-mail.d.mts.map +1 -1
  141. package/resources/print-mail/print-mail.d.ts +42 -159
  142. package/resources/print-mail/print-mail.d.ts.map +1 -1
  143. package/resources/print-mail/print-mail.js +36 -16
  144. package/resources/print-mail/print-mail.js.map +1 -1
  145. package/resources/print-mail/print-mail.mjs +36 -16
  146. package/resources/print-mail/print-mail.mjs.map +1 -1
  147. package/resources/print-mail/reports/exports.d.mts +7 -0
  148. package/resources/print-mail/reports/exports.d.mts.map +1 -1
  149. package/resources/print-mail/reports/exports.d.ts +7 -0
  150. package/resources/print-mail/reports/exports.d.ts.map +1 -1
  151. package/resources/print-mail/reports/exports.js +7 -0
  152. package/resources/print-mail/reports/exports.js.map +1 -1
  153. package/resources/print-mail/reports/exports.mjs +7 -0
  154. package/resources/print-mail/reports/exports.mjs.map +1 -1
  155. package/resources/print-mail/reports/reports.d.mts +7 -0
  156. package/resources/print-mail/reports/reports.d.mts.map +1 -1
  157. package/resources/print-mail/reports/reports.d.ts +7 -0
  158. package/resources/print-mail/reports/reports.d.ts.map +1 -1
  159. package/resources/print-mail/reports/reports.js +7 -0
  160. package/resources/print-mail/reports/reports.js.map +1 -1
  161. package/resources/print-mail/reports/reports.mjs +7 -0
  162. package/resources/print-mail/reports/reports.mjs.map +1 -1
  163. package/resources/print-mail/reports/samples.d.mts +7 -0
  164. package/resources/print-mail/reports/samples.d.mts.map +1 -1
  165. package/resources/print-mail/reports/samples.d.ts +7 -0
  166. package/resources/print-mail/reports/samples.d.ts.map +1 -1
  167. package/resources/print-mail/reports/samples.js +7 -0
  168. package/resources/print-mail/reports/samples.js.map +1 -1
  169. package/resources/print-mail/reports/samples.mjs +7 -0
  170. package/resources/print-mail/reports/samples.mjs.map +1 -1
  171. package/resources/print-mail/self-mailers.d.mts +25 -12
  172. package/resources/print-mail/self-mailers.d.mts.map +1 -1
  173. package/resources/print-mail/self-mailers.d.ts +25 -12
  174. package/resources/print-mail/self-mailers.d.ts.map +1 -1
  175. package/resources/print-mail/self-mailers.js +17 -0
  176. package/resources/print-mail/self-mailers.js.map +1 -1
  177. package/resources/print-mail/self-mailers.mjs +17 -0
  178. package/resources/print-mail/self-mailers.mjs.map +1 -1
  179. package/resources/print-mail/snap-packs.d.mts +1060 -0
  180. package/resources/print-mail/snap-packs.d.mts.map +1 -0
  181. package/resources/print-mail/snap-packs.d.ts +1060 -0
  182. package/resources/print-mail/snap-packs.d.ts.map +1 -0
  183. package/resources/print-mail/snap-packs.js +117 -0
  184. package/resources/print-mail/snap-packs.js.map +1 -0
  185. package/resources/print-mail/snap-packs.mjs +113 -0
  186. package/resources/print-mail/snap-packs.mjs.map +1 -0
  187. package/resources/print-mail/sub-organizations.d.mts +29 -17
  188. package/resources/print-mail/sub-organizations.d.mts.map +1 -1
  189. package/resources/print-mail/sub-organizations.d.ts +29 -17
  190. package/resources/print-mail/sub-organizations.d.ts.map +1 -1
  191. package/resources/print-mail/sub-organizations.js +26 -14
  192. package/resources/print-mail/sub-organizations.js.map +1 -1
  193. package/resources/print-mail/sub-organizations.mjs +26 -14
  194. package/resources/print-mail/sub-organizations.mjs.map +1 -1
  195. package/resources/print-mail/targeted-list-builds/filters.d.mts +92 -0
  196. package/resources/print-mail/targeted-list-builds/filters.d.mts.map +1 -0
  197. package/resources/print-mail/targeted-list-builds/filters.d.ts +92 -0
  198. package/resources/print-mail/targeted-list-builds/filters.d.ts.map +1 -0
  199. package/resources/print-mail/targeted-list-builds/filters.js +60 -0
  200. package/resources/print-mail/targeted-list-builds/filters.js.map +1 -0
  201. package/resources/print-mail/targeted-list-builds/filters.mjs +56 -0
  202. package/resources/print-mail/targeted-list-builds/filters.mjs.map +1 -0
  203. package/resources/print-mail/targeted-list-builds/index.d.mts +3 -0
  204. package/resources/print-mail/targeted-list-builds/index.d.mts.map +1 -0
  205. package/resources/print-mail/targeted-list-builds/index.d.ts +3 -0
  206. package/resources/print-mail/targeted-list-builds/index.d.ts.map +1 -0
  207. package/resources/print-mail/targeted-list-builds/index.js +9 -0
  208. package/resources/print-mail/targeted-list-builds/index.js.map +1 -0
  209. package/resources/print-mail/targeted-list-builds/index.mjs +4 -0
  210. package/resources/print-mail/targeted-list-builds/index.mjs.map +1 -0
  211. package/resources/print-mail/targeted-list-builds/targeted-list-builds.d.mts +1633 -0
  212. package/resources/print-mail/targeted-list-builds/targeted-list-builds.d.mts.map +1 -0
  213. package/resources/print-mail/targeted-list-builds/targeted-list-builds.d.ts +1633 -0
  214. package/resources/print-mail/targeted-list-builds/targeted-list-builds.d.ts.map +1 -0
  215. package/resources/print-mail/targeted-list-builds/targeted-list-builds.js +154 -0
  216. package/resources/print-mail/targeted-list-builds/targeted-list-builds.js.map +1 -0
  217. package/resources/print-mail/targeted-list-builds/targeted-list-builds.mjs +149 -0
  218. package/resources/print-mail/targeted-list-builds/targeted-list-builds.mjs.map +1 -0
  219. package/resources/print-mail/targeted-list-builds.d.mts +2 -0
  220. package/resources/print-mail/targeted-list-builds.d.mts.map +1 -0
  221. package/resources/print-mail/targeted-list-builds.d.ts +2 -0
  222. package/resources/print-mail/targeted-list-builds.d.ts.map +1 -0
  223. package/resources/print-mail/targeted-list-builds.js +6 -0
  224. package/resources/print-mail/targeted-list-builds.js.map +1 -0
  225. package/resources/print-mail/targeted-list-builds.mjs +3 -0
  226. package/resources/print-mail/targeted-list-builds.mjs.map +1 -0
  227. package/resources/print-mail/template-editor-sessions.d.mts +355 -0
  228. package/resources/print-mail/template-editor-sessions.d.mts.map +1 -0
  229. package/resources/print-mail/template-editor-sessions.d.ts +355 -0
  230. package/resources/print-mail/template-editor-sessions.d.ts.map +1 -0
  231. package/resources/print-mail/template-editor-sessions.js +78 -0
  232. package/resources/print-mail/template-editor-sessions.js.map +1 -0
  233. package/resources/print-mail/template-editor-sessions.mjs +74 -0
  234. package/resources/print-mail/template-editor-sessions.mjs.map +1 -0
  235. package/resources/print-mail/trackers.d.mts +409 -0
  236. package/resources/print-mail/trackers.d.mts.map +1 -0
  237. package/resources/print-mail/trackers.d.ts +409 -0
  238. package/resources/print-mail/trackers.d.ts.map +1 -0
  239. package/resources/print-mail/trackers.js +116 -0
  240. package/resources/print-mail/trackers.js.map +1 -0
  241. package/resources/print-mail/trackers.mjs +112 -0
  242. package/resources/print-mail/trackers.mjs.map +1 -0
  243. package/resources/print-mail/virtual-mailboxes/index.d.mts +3 -0
  244. package/resources/print-mail/virtual-mailboxes/index.d.mts.map +1 -0
  245. package/resources/print-mail/virtual-mailboxes/index.d.ts +3 -0
  246. package/resources/print-mail/virtual-mailboxes/index.d.ts.map +1 -0
  247. package/resources/print-mail/virtual-mailboxes/index.js +9 -0
  248. package/resources/print-mail/virtual-mailboxes/index.js.map +1 -0
  249. package/resources/print-mail/virtual-mailboxes/index.mjs +4 -0
  250. package/resources/print-mail/virtual-mailboxes/index.mjs.map +1 -0
  251. package/resources/print-mail/virtual-mailboxes/items.d.mts +235 -0
  252. package/resources/print-mail/virtual-mailboxes/items.d.mts.map +1 -0
  253. package/resources/print-mail/virtual-mailboxes/items.d.ts +235 -0
  254. package/resources/print-mail/virtual-mailboxes/items.d.ts.map +1 -0
  255. package/resources/print-mail/virtual-mailboxes/items.js +69 -0
  256. package/resources/print-mail/virtual-mailboxes/items.js.map +1 -0
  257. package/resources/print-mail/virtual-mailboxes/items.mjs +65 -0
  258. package/resources/print-mail/virtual-mailboxes/items.mjs.map +1 -0
  259. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.d.mts +334 -0
  260. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.d.mts.map +1 -0
  261. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.d.ts +334 -0
  262. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.d.ts.map +1 -0
  263. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.js +92 -0
  264. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.js.map +1 -0
  265. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.mjs +87 -0
  266. package/resources/print-mail/virtual-mailboxes/virtual-mailboxes.mjs.map +1 -0
  267. package/resources/print-mail/virtual-mailboxes.d.mts +2 -0
  268. package/resources/print-mail/virtual-mailboxes.d.mts.map +1 -0
  269. package/resources/print-mail/virtual-mailboxes.d.ts +2 -0
  270. package/resources/print-mail/virtual-mailboxes.d.ts.map +1 -0
  271. package/resources/print-mail/{order-profiles.js → virtual-mailboxes.js} +2 -2
  272. package/resources/print-mail/virtual-mailboxes.js.map +1 -0
  273. package/resources/print-mail/virtual-mailboxes.mjs +3 -0
  274. package/resources/print-mail/virtual-mailboxes.mjs.map +1 -0
  275. package/src/client.ts +116 -26
  276. package/src/internal/parse.ts +6 -0
  277. package/src/internal/types.ts +6 -8
  278. package/src/internal/utils/env.ts +2 -2
  279. package/src/internal/utils/log.ts +2 -1
  280. package/src/internal/utils/query.ts +23 -0
  281. package/src/internal/utils.ts +1 -0
  282. package/src/resources/address-verification.ts +2190 -24
  283. package/src/resources/index.ts +24 -5
  284. package/src/resources/intl-address-verification.ts +1219 -43
  285. package/src/resources/print-mail/boxes.ts +1324 -0
  286. package/src/resources/print-mail/campaigns.ts +1449 -59
  287. package/src/resources/print-mail/cheques.ts +42 -4
  288. package/src/resources/print-mail/contacts.ts +167 -4
  289. package/src/resources/print-mail/index.ts +79 -4
  290. package/src/resources/print-mail/letters.ts +43 -5
  291. package/src/resources/print-mail/mailing-list-imports.ts +5 -1
  292. package/src/resources/print-mail/mailing-lists.ts +5 -1
  293. package/src/resources/print-mail/postcards.ts +74 -12
  294. package/src/resources/print-mail/print-mail.ts +245 -239
  295. package/src/resources/print-mail/reports/exports.ts +7 -0
  296. package/src/resources/print-mail/reports/reports.ts +7 -0
  297. package/src/resources/print-mail/reports/samples.ts +7 -0
  298. package/src/resources/print-mail/self-mailers.ts +28 -12
  299. package/src/resources/print-mail/snap-packs.ts +1484 -0
  300. package/src/resources/print-mail/sub-organizations.ts +35 -23
  301. package/src/resources/print-mail/targeted-list-builds/filters.ts +113 -0
  302. package/src/resources/print-mail/targeted-list-builds/index.ts +16 -0
  303. package/src/resources/print-mail/targeted-list-builds/targeted-list-builds.ts +2158 -0
  304. package/{resources/print-mail/order-profiles.mjs → src/resources/print-mail/targeted-list-builds.ts} +2 -2
  305. package/src/resources/print-mail/template-editor-sessions.ts +435 -0
  306. package/src/resources/print-mail/trackers.ts +513 -0
  307. package/src/resources/print-mail/virtual-mailboxes/index.ts +22 -0
  308. package/src/resources/print-mail/virtual-mailboxes/items.ts +296 -0
  309. package/src/resources/print-mail/virtual-mailboxes/virtual-mailboxes.ts +434 -0
  310. package/src/resources/print-mail/{order-profiles.ts → virtual-mailboxes.ts} +1 -1
  311. package/src/version.ts +1 -1
  312. package/version.d.mts +1 -1
  313. package/version.d.ts +1 -1
  314. package/version.js +1 -1
  315. package/version.mjs +1 -1
  316. package/internal/qs/formats.d.mts +0 -7
  317. package/internal/qs/formats.d.mts.map +0 -1
  318. package/internal/qs/formats.d.ts +0 -7
  319. package/internal/qs/formats.d.ts.map +0 -1
  320. package/internal/qs/formats.js +0 -13
  321. package/internal/qs/formats.js.map +0 -1
  322. package/internal/qs/formats.mjs +0 -9
  323. package/internal/qs/formats.mjs.map +0 -1
  324. package/internal/qs/index.d.mts +0 -10
  325. package/internal/qs/index.d.mts.map +0 -1
  326. package/internal/qs/index.d.ts +0 -10
  327. package/internal/qs/index.d.ts.map +0 -1
  328. package/internal/qs/index.js +0 -14
  329. package/internal/qs/index.js.map +0 -1
  330. package/internal/qs/index.mjs +0 -10
  331. package/internal/qs/index.mjs.map +0 -1
  332. package/internal/qs/stringify.d.mts +0 -3
  333. package/internal/qs/stringify.d.mts.map +0 -1
  334. package/internal/qs/stringify.d.ts +0 -3
  335. package/internal/qs/stringify.d.ts.map +0 -1
  336. package/internal/qs/stringify.js +0 -277
  337. package/internal/qs/stringify.js.map +0 -1
  338. package/internal/qs/stringify.mjs +0 -274
  339. package/internal/qs/stringify.mjs.map +0 -1
  340. package/internal/qs/types.d.mts +0 -57
  341. package/internal/qs/types.d.mts.map +0 -1
  342. package/internal/qs/types.d.ts +0 -57
  343. package/internal/qs/types.d.ts.map +0 -1
  344. package/internal/qs/types.js +0 -3
  345. package/internal/qs/types.js.map +0 -1
  346. package/internal/qs/types.mjs +0 -2
  347. package/internal/qs/types.mjs.map +0 -1
  348. package/internal/qs/utils.d.mts +0 -15
  349. package/internal/qs/utils.d.mts.map +0 -1
  350. package/internal/qs/utils.d.ts +0 -15
  351. package/internal/qs/utils.d.ts.map +0 -1
  352. package/internal/qs/utils.js +0 -230
  353. package/internal/qs/utils.js.map +0 -1
  354. package/internal/qs/utils.mjs +0 -217
  355. package/internal/qs/utils.mjs.map +0 -1
  356. package/resources/print-mail/order-profiles/cheques.d.mts +0 -387
  357. package/resources/print-mail/order-profiles/cheques.d.mts.map +0 -1
  358. package/resources/print-mail/order-profiles/cheques.d.ts +0 -387
  359. package/resources/print-mail/order-profiles/cheques.d.ts.map +0 -1
  360. package/resources/print-mail/order-profiles/cheques.js +0 -98
  361. package/resources/print-mail/order-profiles/cheques.js.map +0 -1
  362. package/resources/print-mail/order-profiles/cheques.mjs +0 -94
  363. package/resources/print-mail/order-profiles/cheques.mjs.map +0 -1
  364. package/resources/print-mail/order-profiles/index.d.mts +0 -6
  365. package/resources/print-mail/order-profiles/index.d.mts.map +0 -1
  366. package/resources/print-mail/order-profiles/index.d.ts +0 -6
  367. package/resources/print-mail/order-profiles/index.d.ts.map +0 -1
  368. package/resources/print-mail/order-profiles/index.js +0 -15
  369. package/resources/print-mail/order-profiles/index.js.map +0 -1
  370. package/resources/print-mail/order-profiles/index.mjs +0 -7
  371. package/resources/print-mail/order-profiles/index.mjs.map +0 -1
  372. package/resources/print-mail/order-profiles/letters.d.mts +0 -324
  373. package/resources/print-mail/order-profiles/letters.d.mts.map +0 -1
  374. package/resources/print-mail/order-profiles/letters.d.ts +0 -324
  375. package/resources/print-mail/order-profiles/letters.d.ts.map +0 -1
  376. package/resources/print-mail/order-profiles/letters.js +0 -105
  377. package/resources/print-mail/order-profiles/letters.js.map +0 -1
  378. package/resources/print-mail/order-profiles/letters.mjs +0 -101
  379. package/resources/print-mail/order-profiles/letters.mjs.map +0 -1
  380. package/resources/print-mail/order-profiles/order-profiles.d.mts +0 -22
  381. package/resources/print-mail/order-profiles/order-profiles.d.mts.map +0 -1
  382. package/resources/print-mail/order-profiles/order-profiles.d.ts +0 -22
  383. package/resources/print-mail/order-profiles/order-profiles.d.ts.map +0 -1
  384. package/resources/print-mail/order-profiles/order-profiles.js +0 -29
  385. package/resources/print-mail/order-profiles/order-profiles.js.map +0 -1
  386. package/resources/print-mail/order-profiles/order-profiles.mjs +0 -24
  387. package/resources/print-mail/order-profiles/order-profiles.mjs.map +0 -1
  388. package/resources/print-mail/order-profiles/postcards.d.mts +0 -254
  389. package/resources/print-mail/order-profiles/postcards.d.mts.map +0 -1
  390. package/resources/print-mail/order-profiles/postcards.d.ts +0 -254
  391. package/resources/print-mail/order-profiles/postcards.d.ts.map +0 -1
  392. package/resources/print-mail/order-profiles/postcards.js +0 -97
  393. package/resources/print-mail/order-profiles/postcards.js.map +0 -1
  394. package/resources/print-mail/order-profiles/postcards.mjs +0 -93
  395. package/resources/print-mail/order-profiles/postcards.mjs.map +0 -1
  396. package/resources/print-mail/order-profiles/self-mailers.d.mts +0 -259
  397. package/resources/print-mail/order-profiles/self-mailers.d.mts.map +0 -1
  398. package/resources/print-mail/order-profiles/self-mailers.d.ts +0 -259
  399. package/resources/print-mail/order-profiles/self-mailers.d.ts.map +0 -1
  400. package/resources/print-mail/order-profiles/self-mailers.js +0 -95
  401. package/resources/print-mail/order-profiles/self-mailers.js.map +0 -1
  402. package/resources/print-mail/order-profiles/self-mailers.mjs +0 -91
  403. package/resources/print-mail/order-profiles/self-mailers.mjs.map +0 -1
  404. package/resources/print-mail/order-profiles.d.mts +0 -2
  405. package/resources/print-mail/order-profiles.d.mts.map +0 -1
  406. package/resources/print-mail/order-profiles.d.ts +0 -2
  407. package/resources/print-mail/order-profiles.d.ts.map +0 -1
  408. package/resources/print-mail/order-profiles.js.map +0 -1
  409. package/resources/print-mail/order-profiles.mjs.map +0 -1
  410. package/src/internal/qs/LICENSE.md +0 -13
  411. package/src/internal/qs/README.md +0 -3
  412. package/src/internal/qs/formats.ts +0 -10
  413. package/src/internal/qs/index.ts +0 -13
  414. package/src/internal/qs/stringify.ts +0 -385
  415. package/src/internal/qs/types.ts +0 -71
  416. package/src/internal/qs/utils.ts +0 -265
  417. package/src/resources/print-mail/order-profiles/cheques.ts +0 -589
  418. package/src/resources/print-mail/order-profiles/index.ts +0 -47
  419. package/src/resources/print-mail/order-profiles/letters.ts +0 -489
  420. package/src/resources/print-mail/order-profiles/order-profiles.ts +0 -113
  421. package/src/resources/print-mail/order-profiles/postcards.ts +0 -404
  422. package/src/resources/print-mail/order-profiles/self-mailers.ts +0 -415
@@ -1,19 +1,28 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
+ import * as ChequesAPI from './cheques';
5
+ import * as LettersAPI from './letters';
4
6
  import { APIPromise } from '../../core/api-promise';
5
7
  import { PagePromise, SkipLimit, type SkipLimitParams } from '../../core/pagination';
6
8
  import { buildHeaders } from '../../internal/headers';
7
9
  import { RequestOptions } from '../../internal/request-options';
8
10
  import { path } from '../../internal/utils/path';
9
11
 
12
+ /**
13
+ * The campaigns API enables you to send out large volumes of fully
14
+ * personalized mail to a mailing list.
15
+ */
10
16
  export class Campaigns extends APIResource {
11
17
  /**
12
18
  * Create a new campaign.
13
19
  *
14
- * A campaign links a mailing list with a specific mail piece profile (letter,
15
- * postcard, cheque, or self-mailer) to send bulk mail. Upon creation, the campaign
16
- * enters the `drafting` status while assets are validated.
20
+ * A campaign links a mailing list with a specific mail piece configuration
21
+ * (letter, postcard, cheque, self-mailer, or snap pack) to send bulk mail. Only
22
+ * one collateral type can be set per campaign.
23
+ *
24
+ * Upon creation, the campaign enters the `drafting` status while assets are
25
+ * validated.
17
26
  *
18
27
  * @example
19
28
  * ```ts
@@ -173,9 +182,10 @@ export interface Campaign {
173
182
  updatedAt: string;
174
183
 
175
184
  /**
176
- * The ID of the cheque profile used for this campaign, if applicable.
185
+ * Inline cheque configuration for a campaign. All fields are optional since
186
+ * campaigns may be in a partial state during drafting.
177
187
  */
178
- chequeProfile?: string;
188
+ cheque?: Campaign.Cheque;
179
189
 
180
190
  /**
181
191
  * The ID of the default sender contact to use for orders if not specified per
@@ -196,9 +206,10 @@ export interface Campaign {
196
206
  errors?: Array<Campaign.Error>;
197
207
 
198
208
  /**
199
- * The ID of the letter profile used for this campaign, if applicable.
209
+ * Inline letter configuration for a campaign. All fields are optional since
210
+ * campaigns may be in a partial state during drafting.
200
211
  */
201
- letterProfile?: string;
212
+ letter?: Campaign.Letter;
202
213
 
203
214
  /**
204
215
  * See the section on Metadata.
@@ -212,9 +223,10 @@ export interface Campaign {
212
223
  orderPreviewURL?: string;
213
224
 
214
225
  /**
215
- * The ID of the postcard profile used for this campaign, if applicable.
226
+ * Inline postcard configuration for a campaign. All fields are optional since
227
+ * campaigns may be in a partial state during drafting.
216
228
  */
217
- postcardProfile?: string;
229
+ postcard?: Campaign.Postcard;
218
230
 
219
231
  /**
220
232
  * A temporary URL to download the processing report, available once the campaign
@@ -223,17 +235,144 @@ export interface Campaign {
223
235
  reportURL?: string;
224
236
 
225
237
  /**
226
- * The ID of the self-mailer profile used for this campaign, if applicable.
238
+ * Inline self-mailer configuration for a campaign. All fields are optional since
239
+ * campaigns may be in a partial state during drafting.
227
240
  */
228
- selfMailerProfile?: string;
241
+ selfMailer?: Campaign.SelfMailer;
229
242
 
230
243
  /**
231
244
  * The scheduled date and time for the campaign to be sent.
232
245
  */
233
246
  sendDate?: string;
247
+
248
+ /**
249
+ * Inline snap pack configuration for a campaign. All fields are optional since
250
+ * campaigns may be in a partial state during drafting.
251
+ */
252
+ snapPack?: Campaign.SnapPack;
234
253
  }
235
254
 
236
255
  export namespace Campaign {
256
+ /**
257
+ * Inline cheque configuration for a campaign. All fields are optional since
258
+ * campaigns may be in a partial state during drafting.
259
+ */
260
+ export interface Cheque {
261
+ /**
262
+ * ID of the bank account to use for the cheque.
263
+ */
264
+ bankAccount?: string;
265
+
266
+ /**
267
+ * Enum representing the supported currency codes.
268
+ */
269
+ currencyCode?: 'CAD' | 'USD';
270
+
271
+ /**
272
+ * An optional description.
273
+ */
274
+ description?: string;
275
+
276
+ /**
277
+ * The custom envelope ID or `"standard"`.
278
+ */
279
+ envelope?: string;
280
+
281
+ /**
282
+ * Settings for the attached letter (e.g., color printing).
283
+ */
284
+ letterSettings?: Cheque.LetterSettings;
285
+
286
+ /**
287
+ * ID of a template for an optional attached letter. Cannot be used with
288
+ * `letterPDF`.
289
+ */
290
+ letterTemplate?: string;
291
+
292
+ /**
293
+ * A signed URL to the attached letter PDF, if any.
294
+ */
295
+ letterUploadedPDF?: string;
296
+
297
+ /**
298
+ * A publicly accessible URL for the logo to print on the cheque.
299
+ */
300
+ logo?: string;
301
+
302
+ /**
303
+ * Mailing class for the cheque.
304
+ */
305
+ mailingClass?:
306
+ | 'first_class'
307
+ | 'standard_class'
308
+ | 'express'
309
+ | 'certified'
310
+ | 'certified_return_receipt'
311
+ | 'registered'
312
+ | 'usps_first_class'
313
+ | 'usps_standard_class'
314
+ | 'usps_eddm'
315
+ | 'usps_express_2_day'
316
+ | 'usps_express_3_day'
317
+ | 'usps_first_class_certified'
318
+ | 'usps_first_class_certified_return_receipt'
319
+ | 'usps_first_class_registered'
320
+ | 'usps_express_3_day_signature_confirmation'
321
+ | 'usps_express_3_day_certified'
322
+ | 'usps_express_3_day_certified_return_receipt'
323
+ | 'ca_post_lettermail'
324
+ | 'ca_post_personalized'
325
+ | 'ca_post_neighbourhood_mail'
326
+ | 'ups_express_overnight'
327
+ | 'ups_express_2_day'
328
+ | 'ups_express_3_day'
329
+ | 'royal_mail_first_class'
330
+ | 'royal_mail_second_class'
331
+ | 'au_post_second_class';
332
+
333
+ /**
334
+ * Memo line text for the cheque.
335
+ */
336
+ memo?: string;
337
+
338
+ /**
339
+ * Default merge variables for the cheque.
340
+ */
341
+ mergeVariables?: { [key: string]: unknown };
342
+
343
+ /**
344
+ * Message included on the cheque stub.
345
+ */
346
+ message?: string;
347
+
348
+ /**
349
+ * Optional key-value metadata.
350
+ */
351
+ metadata?: { [key: string]: string };
352
+
353
+ /**
354
+ * ID of a return envelope to include.
355
+ */
356
+ returnEnvelope?: string;
357
+
358
+ /**
359
+ * Enum representing the supported cheque sizes.
360
+ */
361
+ size?: ChequesAPI.ChequeSize;
362
+ }
363
+
364
+ export namespace Cheque {
365
+ /**
366
+ * Settings for the attached letter (e.g., color printing).
367
+ */
368
+ export interface LetterSettings {
369
+ /**
370
+ * Whether to print the attached letter in color.
371
+ */
372
+ color?: boolean;
373
+ }
374
+ }
375
+
237
376
  /**
238
377
  * Details of a specific error encountered during campaign processing.
239
378
  */
@@ -248,6 +387,335 @@ export namespace Campaign {
248
387
  */
249
388
  type: 'processing_error' | 'internal_error';
250
389
  }
390
+
391
+ /**
392
+ * Inline letter configuration for a campaign. All fields are optional since
393
+ * campaigns may be in a partial state during drafting.
394
+ */
395
+ export interface Letter {
396
+ /**
397
+ * Enum representing the placement of the address on the letter.
398
+ */
399
+ addressPlacement?: LettersAPI.AddressPlacement;
400
+
401
+ /**
402
+ * Model representing an attached PDF.
403
+ */
404
+ attachedPDF?: LettersAPI.AttachedPdf;
405
+
406
+ /**
407
+ * Whether to print in color.
408
+ */
409
+ color?: boolean;
410
+
411
+ /**
412
+ * An optional description.
413
+ */
414
+ description?: string;
415
+
416
+ /**
417
+ * Whether to print on both sides of the paper.
418
+ */
419
+ doubleSided?: boolean;
420
+
421
+ /**
422
+ * The custom envelope ID or `"standard"`.
423
+ */
424
+ envelope?: string;
425
+
426
+ /**
427
+ * The type of envelope used for the letter.
428
+ */
429
+ envelopeType?: 'standard_double_window' | 'flat';
430
+
431
+ /**
432
+ * Mailing class for the letter.
433
+ */
434
+ mailingClass?:
435
+ | 'first_class'
436
+ | 'standard_class'
437
+ | 'express'
438
+ | 'certified'
439
+ | 'certified_return_receipt'
440
+ | 'registered'
441
+ | 'usps_first_class'
442
+ | 'usps_standard_class'
443
+ | 'usps_eddm'
444
+ | 'usps_express_2_day'
445
+ | 'usps_express_3_day'
446
+ | 'usps_first_class_certified'
447
+ | 'usps_first_class_certified_return_receipt'
448
+ | 'usps_first_class_registered'
449
+ | 'usps_express_3_day_signature_confirmation'
450
+ | 'usps_express_3_day_certified'
451
+ | 'usps_express_3_day_certified_return_receipt'
452
+ | 'ca_post_lettermail'
453
+ | 'ca_post_personalized'
454
+ | 'ca_post_neighbourhood_mail'
455
+ | 'ups_express_overnight'
456
+ | 'ups_express_2_day'
457
+ | 'ups_express_3_day'
458
+ | 'royal_mail_first_class'
459
+ | 'royal_mail_second_class'
460
+ | 'au_post_second_class';
461
+
462
+ /**
463
+ * Default merge variables for the letter.
464
+ */
465
+ mergeVariables?: { [key: string]: unknown };
466
+
467
+ /**
468
+ * Optional key-value metadata.
469
+ */
470
+ metadata?: { [key: string]: string };
471
+
472
+ /**
473
+ * Which page number should be perforated (if any).
474
+ */
475
+ perforatedPage?: 1;
476
+
477
+ /**
478
+ * ID of a return envelope to include.
479
+ */
480
+ returnEnvelope?: string;
481
+
482
+ /**
483
+ * Enum representing the supported letter sizes.
484
+ */
485
+ size?: LettersAPI.LetterSize;
486
+
487
+ /**
488
+ * ID of a template for the letter content. Cannot be used with `pdf`.
489
+ */
490
+ template?: string;
491
+
492
+ /**
493
+ * A signed URL to the uploaded PDF, if any.
494
+ */
495
+ uploadedPDF?: string;
496
+ }
497
+
498
+ /**
499
+ * Inline postcard configuration for a campaign. All fields are optional since
500
+ * campaigns may be in a partial state during drafting.
501
+ */
502
+ export interface Postcard {
503
+ /**
504
+ * ID of the template for the back side. Cannot be used with `pdf`.
505
+ */
506
+ backTemplate?: string;
507
+
508
+ /**
509
+ * An optional description.
510
+ */
511
+ description?: string;
512
+
513
+ /**
514
+ * ID of the template for the front side. Cannot be used with `pdf`.
515
+ */
516
+ frontTemplate?: string;
517
+
518
+ /**
519
+ * Mailing class for the postcard.
520
+ */
521
+ mailingClass?:
522
+ | 'first_class'
523
+ | 'standard_class'
524
+ | 'express'
525
+ | 'certified'
526
+ | 'certified_return_receipt'
527
+ | 'registered'
528
+ | 'usps_first_class'
529
+ | 'usps_standard_class'
530
+ | 'usps_eddm'
531
+ | 'usps_express_2_day'
532
+ | 'usps_express_3_day'
533
+ | 'usps_first_class_certified'
534
+ | 'usps_first_class_certified_return_receipt'
535
+ | 'usps_first_class_registered'
536
+ | 'usps_express_3_day_signature_confirmation'
537
+ | 'usps_express_3_day_certified'
538
+ | 'usps_express_3_day_certified_return_receipt'
539
+ | 'ca_post_lettermail'
540
+ | 'ca_post_personalized'
541
+ | 'ca_post_neighbourhood_mail'
542
+ | 'ups_express_overnight'
543
+ | 'ups_express_2_day'
544
+ | 'ups_express_3_day'
545
+ | 'royal_mail_first_class'
546
+ | 'royal_mail_second_class'
547
+ | 'au_post_second_class';
548
+
549
+ /**
550
+ * Default merge variables for the postcard.
551
+ */
552
+ mergeVariables?: { [key: string]: unknown };
553
+
554
+ /**
555
+ * Optional key-value metadata.
556
+ */
557
+ metadata?: { [key: string]: string };
558
+
559
+ /**
560
+ * Premium paper identifier. Use "standard" for regular stock or a premium*paper*\*
561
+ * ID.
562
+ */
563
+ paper?: string;
564
+
565
+ /**
566
+ * Enum representing the supported postcard sizes.
567
+ */
568
+ size?: '6x4' | '9x6' | '11x6';
569
+
570
+ /**
571
+ * A signed URL to the uploaded PDF, if any.
572
+ */
573
+ uploadedPDF?: string;
574
+ }
575
+
576
+ /**
577
+ * Inline self-mailer configuration for a campaign. All fields are optional since
578
+ * campaigns may be in a partial state during drafting.
579
+ */
580
+ export interface SelfMailer {
581
+ /**
582
+ * An optional description.
583
+ */
584
+ description?: string;
585
+
586
+ /**
587
+ * ID of the template for the inside. Cannot be used with `pdf`.
588
+ */
589
+ insideTemplate?: string;
590
+
591
+ /**
592
+ * Mailing class for the self-mailer.
593
+ */
594
+ mailingClass?:
595
+ | 'first_class'
596
+ | 'standard_class'
597
+ | 'express'
598
+ | 'certified'
599
+ | 'certified_return_receipt'
600
+ | 'registered'
601
+ | 'usps_first_class'
602
+ | 'usps_standard_class'
603
+ | 'usps_eddm'
604
+ | 'usps_express_2_day'
605
+ | 'usps_express_3_day'
606
+ | 'usps_first_class_certified'
607
+ | 'usps_first_class_certified_return_receipt'
608
+ | 'usps_first_class_registered'
609
+ | 'usps_express_3_day_signature_confirmation'
610
+ | 'usps_express_3_day_certified'
611
+ | 'usps_express_3_day_certified_return_receipt'
612
+ | 'ca_post_lettermail'
613
+ | 'ca_post_personalized'
614
+ | 'ca_post_neighbourhood_mail'
615
+ | 'ups_express_overnight'
616
+ | 'ups_express_2_day'
617
+ | 'ups_express_3_day'
618
+ | 'royal_mail_first_class'
619
+ | 'royal_mail_second_class'
620
+ | 'au_post_second_class';
621
+
622
+ /**
623
+ * Default merge variables for the self-mailer.
624
+ */
625
+ mergeVariables?: { [key: string]: unknown };
626
+
627
+ /**
628
+ * Optional key-value metadata.
629
+ */
630
+ metadata?: { [key: string]: string };
631
+
632
+ /**
633
+ * ID of the template for the outside. Cannot be used with `pdf`.
634
+ */
635
+ outsideTemplate?: string;
636
+
637
+ /**
638
+ * Enum representing the supported self-mailer sizes.
639
+ */
640
+ size?: '8.5x11_bifold' | '8.5x11_trifold' | '9.5x16_trifold';
641
+
642
+ /**
643
+ * A signed URL to the uploaded PDF, if any.
644
+ */
645
+ uploadedPDF?: string;
646
+ }
647
+
648
+ /**
649
+ * Inline snap pack configuration for a campaign. All fields are optional since
650
+ * campaigns may be in a partial state during drafting.
651
+ */
652
+ export interface SnapPack {
653
+ /**
654
+ * An optional description.
655
+ */
656
+ description?: string;
657
+
658
+ /**
659
+ * ID of the template for the inside. Cannot be used with `pdf`.
660
+ */
661
+ insideTemplate?: string;
662
+
663
+ /**
664
+ * Mailing class for the snap pack.
665
+ */
666
+ mailingClass?:
667
+ | 'first_class'
668
+ | 'standard_class'
669
+ | 'express'
670
+ | 'certified'
671
+ | 'certified_return_receipt'
672
+ | 'registered'
673
+ | 'usps_first_class'
674
+ | 'usps_standard_class'
675
+ | 'usps_eddm'
676
+ | 'usps_express_2_day'
677
+ | 'usps_express_3_day'
678
+ | 'usps_first_class_certified'
679
+ | 'usps_first_class_certified_return_receipt'
680
+ | 'usps_first_class_registered'
681
+ | 'usps_express_3_day_signature_confirmation'
682
+ | 'usps_express_3_day_certified'
683
+ | 'usps_express_3_day_certified_return_receipt'
684
+ | 'ca_post_lettermail'
685
+ | 'ca_post_personalized'
686
+ | 'ca_post_neighbourhood_mail'
687
+ | 'ups_express_overnight'
688
+ | 'ups_express_2_day'
689
+ | 'ups_express_3_day'
690
+ | 'royal_mail_first_class'
691
+ | 'royal_mail_second_class'
692
+ | 'au_post_second_class';
693
+
694
+ /**
695
+ * Default merge variables for the snap pack.
696
+ */
697
+ mergeVariables?: { [key: string]: unknown };
698
+
699
+ /**
700
+ * Optional key-value metadata.
701
+ */
702
+ metadata?: { [key: string]: string };
703
+
704
+ /**
705
+ * ID of the template for the outside. Cannot be used with `pdf`.
706
+ */
707
+ outsideTemplate?: string;
708
+
709
+ /**
710
+ * Enum representing the supported snap pack sizes.
711
+ */
712
+ size?: '8.5x11_bifold_v';
713
+
714
+ /**
715
+ * A signed URL to the uploaded PDF, if any.
716
+ */
717
+ uploadedPDF?: string;
718
+ }
251
719
  }
252
720
 
253
721
  export interface CampaignDeleteResponse {
@@ -266,9 +734,10 @@ export interface CampaignCreateParams {
266
734
  mailingList: string;
267
735
 
268
736
  /**
269
- * Body param: The ID of the cheque profile used for this campaign, if applicable.
737
+ * Body param: Inline cheque configuration for a campaign. All fields are optional
738
+ * since campaigns may be in a partial state during drafting.
270
739
  */
271
- chequeProfile?: string;
740
+ cheque?: CampaignCreateParams.Cheque;
272
741
 
273
742
  /**
274
743
  * Body param: The ID of the default sender contact to use for orders if not
@@ -283,9 +752,10 @@ export interface CampaignCreateParams {
283
752
  description?: string;
284
753
 
285
754
  /**
286
- * Body param: The ID of the letter profile used for this campaign, if applicable.
755
+ * Body param: Inline letter configuration for a campaign. All fields are optional
756
+ * since campaigns may be in a partial state during drafting.
287
757
  */
288
- letterProfile?: string;
758
+ letter?: CampaignCreateParams.Letter;
289
759
 
290
760
  /**
291
761
  * Body param: See the section on Metadata.
@@ -293,16 +763,16 @@ export interface CampaignCreateParams {
293
763
  metadata?: { [key: string]: unknown };
294
764
 
295
765
  /**
296
- * Body param: The ID of the postcard profile used for this campaign, if
297
- * applicable.
766
+ * Body param: Inline postcard configuration for a campaign. All fields are
767
+ * optional since campaigns may be in a partial state during drafting.
298
768
  */
299
- postcardProfile?: string;
769
+ postcard?: CampaignCreateParams.Postcard;
300
770
 
301
771
  /**
302
- * Body param: The ID of the self-mailer profile used for this campaign, if
303
- * applicable.
772
+ * Body param: Inline self-mailer configuration for a campaign. All fields are
773
+ * optional since campaigns may be in a partial state during drafting.
304
774
  */
305
- selfMailerProfile?: string;
775
+ selfMailer?: CampaignCreateParams.SelfMailer;
306
776
 
307
777
  /**
308
778
  * Body param: The scheduled date and time for the campaign to be sent.
@@ -310,57 +780,977 @@ export interface CampaignCreateParams {
310
780
  sendDate?: string;
311
781
 
312
782
  /**
313
- * Header param:
783
+ * Body param: Inline snap pack configuration for a campaign. All fields are
784
+ * optional since campaigns may be in a partial state during drafting.
314
785
  */
315
- 'idempotency-key'?: string;
316
- }
786
+ snapPack?: CampaignCreateParams.SnapPack;
317
787
 
318
- export interface CampaignUpdateParams {
319
788
  /**
320
- * The ID of the cheque profile to use. Setting this will remove other profile
321
- * types. Set to `null` to remove.
789
+ * Header param
322
790
  */
323
- chequeProfile?: string | null;
791
+ 'idempotency-key'?: string;
792
+ }
324
793
 
794
+ export namespace CampaignCreateParams {
325
795
  /**
326
- * The ID of the default sender contact. Set to `null` to remove.
796
+ * Inline cheque configuration for a campaign. All fields are optional since
797
+ * campaigns may be in a partial state during drafting.
327
798
  */
328
- defaultSenderContact?: string | null;
799
+ export interface Cheque {
800
+ /**
801
+ * ID of the bank account to use for the cheque.
802
+ */
803
+ bankAccount?: string;
329
804
 
330
- /**
331
- * An optional description for the campaign. Set to `null` to remove the existing
332
- * description.
333
- */
334
- description?: string | null;
805
+ /**
806
+ * Enum representing the supported currency codes.
807
+ */
808
+ currencyCode?: 'CAD' | 'USD';
335
809
 
336
- /**
337
- * The ID of the letter profile to use. Setting this will remove other profile
338
- * types. Set to `null` to remove.
339
- */
340
- letterProfile?: string | null;
810
+ /**
811
+ * An optional description.
812
+ */
813
+ description?: string;
341
814
 
342
- /**
343
- * The ID of the mailing list to associate with this campaign.
344
- */
345
- mailingList?: string;
815
+ /**
816
+ * The custom envelope ID or `"standard"`.
817
+ */
818
+ envelope?: string;
346
819
 
347
- /**
348
- * Optional key-value data associated with the campaign. Set to `null` to remove
349
- * existing metadata.
350
- */
351
- metadata?: { [key: string]: string } | null;
820
+ /**
821
+ * PDF file for an optional attached letter. Cannot be used with `letterTemplate`.
822
+ */
823
+ letterPDF?: string;
352
824
 
353
- /**
354
- * The ID of the postcard profile to use. Setting this will remove other profile
355
- * types. Set to `null` to remove.
356
- */
357
- postcardProfile?: string | null;
825
+ /**
826
+ * Settings for the attached letter (e.g., color printing).
827
+ */
828
+ letterSettings?: Cheque.LetterSettings;
358
829
 
359
- /**
360
- * The ID of the self-mailer profile to use. Setting this will remove other profile
361
- * types. Set to `null` to remove.
362
- */
363
- selfMailerProfile?: string | null;
830
+ /**
831
+ * ID of a template for an optional attached letter. Cannot be used with
832
+ * `letterPDF`.
833
+ */
834
+ letterTemplate?: string;
835
+
836
+ /**
837
+ * A publicly accessible URL for the logo to print on the cheque.
838
+ */
839
+ logo?: string;
840
+
841
+ /**
842
+ * Mailing class for the cheque.
843
+ */
844
+ mailingClass?:
845
+ | 'first_class'
846
+ | 'standard_class'
847
+ | 'express'
848
+ | 'certified'
849
+ | 'certified_return_receipt'
850
+ | 'registered'
851
+ | 'usps_first_class'
852
+ | 'usps_standard_class'
853
+ | 'usps_eddm'
854
+ | 'usps_express_2_day'
855
+ | 'usps_express_3_day'
856
+ | 'usps_first_class_certified'
857
+ | 'usps_first_class_certified_return_receipt'
858
+ | 'usps_first_class_registered'
859
+ | 'usps_express_3_day_signature_confirmation'
860
+ | 'usps_express_3_day_certified'
861
+ | 'usps_express_3_day_certified_return_receipt'
862
+ | 'ca_post_lettermail'
863
+ | 'ca_post_personalized'
864
+ | 'ca_post_neighbourhood_mail'
865
+ | 'ups_express_overnight'
866
+ | 'ups_express_2_day'
867
+ | 'ups_express_3_day'
868
+ | 'royal_mail_first_class'
869
+ | 'royal_mail_second_class'
870
+ | 'au_post_second_class';
871
+
872
+ /**
873
+ * Memo line text for the cheque.
874
+ */
875
+ memo?: string;
876
+
877
+ /**
878
+ * Default merge variables for the cheque.
879
+ */
880
+ mergeVariables?: { [key: string]: unknown };
881
+
882
+ /**
883
+ * Message included on the cheque stub.
884
+ */
885
+ message?: string;
886
+
887
+ /**
888
+ * Optional key-value metadata.
889
+ */
890
+ metadata?: { [key: string]: string };
891
+
892
+ /**
893
+ * ID of a return envelope to include.
894
+ */
895
+ returnEnvelope?: string;
896
+
897
+ /**
898
+ * Enum representing the supported cheque sizes.
899
+ */
900
+ size?: ChequesAPI.ChequeSize;
901
+ }
902
+
903
+ export namespace Cheque {
904
+ /**
905
+ * Settings for the attached letter (e.g., color printing).
906
+ */
907
+ export interface LetterSettings {
908
+ /**
909
+ * Whether to print the attached letter in color.
910
+ */
911
+ color?: boolean;
912
+ }
913
+ }
914
+
915
+ /**
916
+ * Inline letter configuration for a campaign. All fields are optional since
917
+ * campaigns may be in a partial state during drafting.
918
+ */
919
+ export interface Letter {
920
+ /**
921
+ * Enum representing the placement of the address on the letter.
922
+ */
923
+ addressPlacement?: LettersAPI.AddressPlacement;
924
+
925
+ /**
926
+ * Model representing an attached PDF.
927
+ */
928
+ attachedPDF?: LettersAPI.AttachedPdf;
929
+
930
+ /**
931
+ * Whether to print in color.
932
+ */
933
+ color?: boolean;
934
+
935
+ /**
936
+ * An optional description.
937
+ */
938
+ description?: string;
939
+
940
+ /**
941
+ * Whether to print on both sides of the paper.
942
+ */
943
+ doubleSided?: boolean;
944
+
945
+ /**
946
+ * The custom envelope ID or `"standard"`.
947
+ */
948
+ envelope?: string;
949
+
950
+ /**
951
+ * The type of envelope used for the letter.
952
+ */
953
+ envelopeType?: 'standard_double_window' | 'flat';
954
+
955
+ /**
956
+ * Mailing class for the letter.
957
+ */
958
+ mailingClass?:
959
+ | 'first_class'
960
+ | 'standard_class'
961
+ | 'express'
962
+ | 'certified'
963
+ | 'certified_return_receipt'
964
+ | 'registered'
965
+ | 'usps_first_class'
966
+ | 'usps_standard_class'
967
+ | 'usps_eddm'
968
+ | 'usps_express_2_day'
969
+ | 'usps_express_3_day'
970
+ | 'usps_first_class_certified'
971
+ | 'usps_first_class_certified_return_receipt'
972
+ | 'usps_first_class_registered'
973
+ | 'usps_express_3_day_signature_confirmation'
974
+ | 'usps_express_3_day_certified'
975
+ | 'usps_express_3_day_certified_return_receipt'
976
+ | 'ca_post_lettermail'
977
+ | 'ca_post_personalized'
978
+ | 'ca_post_neighbourhood_mail'
979
+ | 'ups_express_overnight'
980
+ | 'ups_express_2_day'
981
+ | 'ups_express_3_day'
982
+ | 'royal_mail_first_class'
983
+ | 'royal_mail_second_class'
984
+ | 'au_post_second_class';
985
+
986
+ /**
987
+ * Default merge variables for the letter.
988
+ */
989
+ mergeVariables?: { [key: string]: unknown };
990
+
991
+ /**
992
+ * Optional key-value metadata.
993
+ */
994
+ metadata?: { [key: string]: string };
995
+
996
+ /**
997
+ * A PDF file or URL for the letter content. Cannot be used with `template`.
998
+ */
999
+ pdf?: string;
1000
+
1001
+ /**
1002
+ * Which page number should be perforated (if any).
1003
+ */
1004
+ perforatedPage?: 1;
1005
+
1006
+ /**
1007
+ * ID of a return envelope to include.
1008
+ */
1009
+ returnEnvelope?: string;
1010
+
1011
+ /**
1012
+ * Enum representing the supported letter sizes.
1013
+ */
1014
+ size?: LettersAPI.LetterSize;
1015
+
1016
+ /**
1017
+ * ID of a template for the letter content. Cannot be used with `pdf`.
1018
+ */
1019
+ template?: string;
1020
+ }
1021
+
1022
+ /**
1023
+ * Inline postcard configuration for a campaign. All fields are optional since
1024
+ * campaigns may be in a partial state during drafting.
1025
+ */
1026
+ export interface Postcard {
1027
+ /**
1028
+ * ID of the template for the back side. Cannot be used with `pdf`.
1029
+ */
1030
+ backTemplate?: string;
1031
+
1032
+ /**
1033
+ * An optional description.
1034
+ */
1035
+ description?: string;
1036
+
1037
+ /**
1038
+ * ID of the template for the front side. Cannot be used with `pdf`.
1039
+ */
1040
+ frontTemplate?: string;
1041
+
1042
+ /**
1043
+ * Mailing class for the postcard.
1044
+ */
1045
+ mailingClass?:
1046
+ | 'first_class'
1047
+ | 'standard_class'
1048
+ | 'express'
1049
+ | 'certified'
1050
+ | 'certified_return_receipt'
1051
+ | 'registered'
1052
+ | 'usps_first_class'
1053
+ | 'usps_standard_class'
1054
+ | 'usps_eddm'
1055
+ | 'usps_express_2_day'
1056
+ | 'usps_express_3_day'
1057
+ | 'usps_first_class_certified'
1058
+ | 'usps_first_class_certified_return_receipt'
1059
+ | 'usps_first_class_registered'
1060
+ | 'usps_express_3_day_signature_confirmation'
1061
+ | 'usps_express_3_day_certified'
1062
+ | 'usps_express_3_day_certified_return_receipt'
1063
+ | 'ca_post_lettermail'
1064
+ | 'ca_post_personalized'
1065
+ | 'ca_post_neighbourhood_mail'
1066
+ | 'ups_express_overnight'
1067
+ | 'ups_express_2_day'
1068
+ | 'ups_express_3_day'
1069
+ | 'royal_mail_first_class'
1070
+ | 'royal_mail_second_class'
1071
+ | 'au_post_second_class';
1072
+
1073
+ /**
1074
+ * Default merge variables for the postcard.
1075
+ */
1076
+ mergeVariables?: { [key: string]: unknown };
1077
+
1078
+ /**
1079
+ * Optional key-value metadata.
1080
+ */
1081
+ metadata?: { [key: string]: string };
1082
+
1083
+ /**
1084
+ * Premium paper identifier. Use "standard" for regular stock or a premium*paper*\*
1085
+ * ID.
1086
+ */
1087
+ paper?: string;
1088
+
1089
+ /**
1090
+ * A 2-page PDF file for the postcard content (front and back). Cannot be used with
1091
+ * `frontTemplate`/`backTemplate`.
1092
+ */
1093
+ pdf?: string;
1094
+
1095
+ /**
1096
+ * Enum representing the supported postcard sizes.
1097
+ */
1098
+ size?: '6x4' | '9x6' | '11x6';
1099
+ }
1100
+
1101
+ /**
1102
+ * Inline self-mailer configuration for a campaign. All fields are optional since
1103
+ * campaigns may be in a partial state during drafting.
1104
+ */
1105
+ export interface SelfMailer {
1106
+ /**
1107
+ * An optional description.
1108
+ */
1109
+ description?: string;
1110
+
1111
+ /**
1112
+ * ID of the template for the inside. Cannot be used with `pdf`.
1113
+ */
1114
+ insideTemplate?: string;
1115
+
1116
+ /**
1117
+ * Mailing class for the self-mailer.
1118
+ */
1119
+ mailingClass?:
1120
+ | 'first_class'
1121
+ | 'standard_class'
1122
+ | 'express'
1123
+ | 'certified'
1124
+ | 'certified_return_receipt'
1125
+ | 'registered'
1126
+ | 'usps_first_class'
1127
+ | 'usps_standard_class'
1128
+ | 'usps_eddm'
1129
+ | 'usps_express_2_day'
1130
+ | 'usps_express_3_day'
1131
+ | 'usps_first_class_certified'
1132
+ | 'usps_first_class_certified_return_receipt'
1133
+ | 'usps_first_class_registered'
1134
+ | 'usps_express_3_day_signature_confirmation'
1135
+ | 'usps_express_3_day_certified'
1136
+ | 'usps_express_3_day_certified_return_receipt'
1137
+ | 'ca_post_lettermail'
1138
+ | 'ca_post_personalized'
1139
+ | 'ca_post_neighbourhood_mail'
1140
+ | 'ups_express_overnight'
1141
+ | 'ups_express_2_day'
1142
+ | 'ups_express_3_day'
1143
+ | 'royal_mail_first_class'
1144
+ | 'royal_mail_second_class'
1145
+ | 'au_post_second_class';
1146
+
1147
+ /**
1148
+ * Default merge variables for the self-mailer.
1149
+ */
1150
+ mergeVariables?: { [key: string]: unknown };
1151
+
1152
+ /**
1153
+ * Optional key-value metadata.
1154
+ */
1155
+ metadata?: { [key: string]: string };
1156
+
1157
+ /**
1158
+ * ID of the template for the outside. Cannot be used with `pdf`.
1159
+ */
1160
+ outsideTemplate?: string;
1161
+
1162
+ /**
1163
+ * A 2-page PDF file for the self-mailer content. Cannot be used with
1164
+ * `insideTemplate`/`outsideTemplate`.
1165
+ */
1166
+ pdf?: string;
1167
+
1168
+ /**
1169
+ * Enum representing the supported self-mailer sizes.
1170
+ */
1171
+ size?: '8.5x11_bifold' | '8.5x11_trifold' | '9.5x16_trifold';
1172
+ }
1173
+
1174
+ /**
1175
+ * Inline snap pack configuration for a campaign. All fields are optional since
1176
+ * campaigns may be in a partial state during drafting.
1177
+ */
1178
+ export interface SnapPack {
1179
+ /**
1180
+ * An optional description.
1181
+ */
1182
+ description?: string;
1183
+
1184
+ /**
1185
+ * ID of the template for the inside. Cannot be used with `pdf`.
1186
+ */
1187
+ insideTemplate?: string;
1188
+
1189
+ /**
1190
+ * Mailing class for the snap pack.
1191
+ */
1192
+ mailingClass?:
1193
+ | 'first_class'
1194
+ | 'standard_class'
1195
+ | 'express'
1196
+ | 'certified'
1197
+ | 'certified_return_receipt'
1198
+ | 'registered'
1199
+ | 'usps_first_class'
1200
+ | 'usps_standard_class'
1201
+ | 'usps_eddm'
1202
+ | 'usps_express_2_day'
1203
+ | 'usps_express_3_day'
1204
+ | 'usps_first_class_certified'
1205
+ | 'usps_first_class_certified_return_receipt'
1206
+ | 'usps_first_class_registered'
1207
+ | 'usps_express_3_day_signature_confirmation'
1208
+ | 'usps_express_3_day_certified'
1209
+ | 'usps_express_3_day_certified_return_receipt'
1210
+ | 'ca_post_lettermail'
1211
+ | 'ca_post_personalized'
1212
+ | 'ca_post_neighbourhood_mail'
1213
+ | 'ups_express_overnight'
1214
+ | 'ups_express_2_day'
1215
+ | 'ups_express_3_day'
1216
+ | 'royal_mail_first_class'
1217
+ | 'royal_mail_second_class'
1218
+ | 'au_post_second_class';
1219
+
1220
+ /**
1221
+ * Default merge variables for the snap pack.
1222
+ */
1223
+ mergeVariables?: { [key: string]: unknown };
1224
+
1225
+ /**
1226
+ * Optional key-value metadata.
1227
+ */
1228
+ metadata?: { [key: string]: string };
1229
+
1230
+ /**
1231
+ * ID of the template for the outside. Cannot be used with `pdf`.
1232
+ */
1233
+ outsideTemplate?: string;
1234
+
1235
+ /**
1236
+ * A 2-page PDF file for the snap pack content. Cannot be used with
1237
+ * `insideTemplate`/`outsideTemplate`.
1238
+ */
1239
+ pdf?: string;
1240
+
1241
+ /**
1242
+ * Enum representing the supported snap pack sizes.
1243
+ */
1244
+ size?: '8.5x11_bifold_v';
1245
+ }
1246
+ }
1247
+
1248
+ export interface CampaignUpdateParams {
1249
+ /**
1250
+ * Inline cheque configuration for a campaign. All fields are optional since
1251
+ * campaigns may be in a partial state during drafting.
1252
+ */
1253
+ cheque?: CampaignUpdateParams.Cheque | null;
1254
+
1255
+ /**
1256
+ * The ID of the default sender contact. Set to `null` to remove.
1257
+ */
1258
+ defaultSenderContact?: string | null;
1259
+
1260
+ /**
1261
+ * An optional description for the campaign. Set to `null` to remove the existing
1262
+ * description.
1263
+ */
1264
+ description?: string | null;
1265
+
1266
+ /**
1267
+ * Inline letter configuration for a campaign. All fields are optional since
1268
+ * campaigns may be in a partial state during drafting.
1269
+ */
1270
+ letter?: CampaignUpdateParams.Letter | null;
1271
+
1272
+ /**
1273
+ * The ID of the mailing list to associate with this campaign.
1274
+ */
1275
+ mailingList?: string;
1276
+
1277
+ /**
1278
+ * Optional key-value data associated with the campaign. Set to `null` to remove
1279
+ * existing metadata.
1280
+ */
1281
+ metadata?: { [key: string]: string } | null;
1282
+
1283
+ /**
1284
+ * Inline postcard configuration for a campaign. All fields are optional since
1285
+ * campaigns may be in a partial state during drafting.
1286
+ */
1287
+ postcard?: CampaignUpdateParams.Postcard | null;
1288
+
1289
+ /**
1290
+ * Inline self-mailer configuration for a campaign. All fields are optional since
1291
+ * campaigns may be in a partial state during drafting.
1292
+ */
1293
+ selfMailer?: CampaignUpdateParams.SelfMailer | null;
1294
+
1295
+ /**
1296
+ * Inline snap pack configuration for a campaign. All fields are optional since
1297
+ * campaigns may be in a partial state during drafting.
1298
+ */
1299
+ snapPack?: CampaignUpdateParams.SnapPack | null;
1300
+ }
1301
+
1302
+ export namespace CampaignUpdateParams {
1303
+ /**
1304
+ * Inline cheque configuration for a campaign. All fields are optional since
1305
+ * campaigns may be in a partial state during drafting.
1306
+ */
1307
+ export interface Cheque {
1308
+ /**
1309
+ * ID of the bank account to use for the cheque.
1310
+ */
1311
+ bankAccount?: string;
1312
+
1313
+ /**
1314
+ * Enum representing the supported currency codes.
1315
+ */
1316
+ currencyCode?: 'CAD' | 'USD';
1317
+
1318
+ /**
1319
+ * An optional description.
1320
+ */
1321
+ description?: string;
1322
+
1323
+ /**
1324
+ * The custom envelope ID or `"standard"`.
1325
+ */
1326
+ envelope?: string;
1327
+
1328
+ /**
1329
+ * PDF file for an optional attached letter. Cannot be used with `letterTemplate`.
1330
+ */
1331
+ letterPDF?: string;
1332
+
1333
+ /**
1334
+ * Settings for the attached letter (e.g., color printing).
1335
+ */
1336
+ letterSettings?: Cheque.LetterSettings;
1337
+
1338
+ /**
1339
+ * ID of a template for an optional attached letter. Cannot be used with
1340
+ * `letterPDF`.
1341
+ */
1342
+ letterTemplate?: string;
1343
+
1344
+ /**
1345
+ * A publicly accessible URL for the logo to print on the cheque.
1346
+ */
1347
+ logo?: string;
1348
+
1349
+ /**
1350
+ * Mailing class for the cheque.
1351
+ */
1352
+ mailingClass?:
1353
+ | 'first_class'
1354
+ | 'standard_class'
1355
+ | 'express'
1356
+ | 'certified'
1357
+ | 'certified_return_receipt'
1358
+ | 'registered'
1359
+ | 'usps_first_class'
1360
+ | 'usps_standard_class'
1361
+ | 'usps_eddm'
1362
+ | 'usps_express_2_day'
1363
+ | 'usps_express_3_day'
1364
+ | 'usps_first_class_certified'
1365
+ | 'usps_first_class_certified_return_receipt'
1366
+ | 'usps_first_class_registered'
1367
+ | 'usps_express_3_day_signature_confirmation'
1368
+ | 'usps_express_3_day_certified'
1369
+ | 'usps_express_3_day_certified_return_receipt'
1370
+ | 'ca_post_lettermail'
1371
+ | 'ca_post_personalized'
1372
+ | 'ca_post_neighbourhood_mail'
1373
+ | 'ups_express_overnight'
1374
+ | 'ups_express_2_day'
1375
+ | 'ups_express_3_day'
1376
+ | 'royal_mail_first_class'
1377
+ | 'royal_mail_second_class'
1378
+ | 'au_post_second_class';
1379
+
1380
+ /**
1381
+ * Memo line text for the cheque.
1382
+ */
1383
+ memo?: string;
1384
+
1385
+ /**
1386
+ * Default merge variables for the cheque.
1387
+ */
1388
+ mergeVariables?: { [key: string]: unknown };
1389
+
1390
+ /**
1391
+ * Message included on the cheque stub.
1392
+ */
1393
+ message?: string;
1394
+
1395
+ /**
1396
+ * Optional key-value metadata.
1397
+ */
1398
+ metadata?: { [key: string]: string };
1399
+
1400
+ /**
1401
+ * ID of a return envelope to include.
1402
+ */
1403
+ returnEnvelope?: string;
1404
+
1405
+ /**
1406
+ * Enum representing the supported cheque sizes.
1407
+ */
1408
+ size?: ChequesAPI.ChequeSize;
1409
+ }
1410
+
1411
+ export namespace Cheque {
1412
+ /**
1413
+ * Settings for the attached letter (e.g., color printing).
1414
+ */
1415
+ export interface LetterSettings {
1416
+ /**
1417
+ * Whether to print the attached letter in color.
1418
+ */
1419
+ color?: boolean;
1420
+ }
1421
+ }
1422
+
1423
+ /**
1424
+ * Inline letter configuration for a campaign. All fields are optional since
1425
+ * campaigns may be in a partial state during drafting.
1426
+ */
1427
+ export interface Letter {
1428
+ /**
1429
+ * Enum representing the placement of the address on the letter.
1430
+ */
1431
+ addressPlacement?: LettersAPI.AddressPlacement;
1432
+
1433
+ /**
1434
+ * Model representing an attached PDF.
1435
+ */
1436
+ attachedPDF?: LettersAPI.AttachedPdf;
1437
+
1438
+ /**
1439
+ * Whether to print in color.
1440
+ */
1441
+ color?: boolean;
1442
+
1443
+ /**
1444
+ * An optional description.
1445
+ */
1446
+ description?: string;
1447
+
1448
+ /**
1449
+ * Whether to print on both sides of the paper.
1450
+ */
1451
+ doubleSided?: boolean;
1452
+
1453
+ /**
1454
+ * The custom envelope ID or `"standard"`.
1455
+ */
1456
+ envelope?: string;
1457
+
1458
+ /**
1459
+ * The type of envelope used for the letter.
1460
+ */
1461
+ envelopeType?: 'standard_double_window' | 'flat';
1462
+
1463
+ /**
1464
+ * Mailing class for the letter.
1465
+ */
1466
+ mailingClass?:
1467
+ | 'first_class'
1468
+ | 'standard_class'
1469
+ | 'express'
1470
+ | 'certified'
1471
+ | 'certified_return_receipt'
1472
+ | 'registered'
1473
+ | 'usps_first_class'
1474
+ | 'usps_standard_class'
1475
+ | 'usps_eddm'
1476
+ | 'usps_express_2_day'
1477
+ | 'usps_express_3_day'
1478
+ | 'usps_first_class_certified'
1479
+ | 'usps_first_class_certified_return_receipt'
1480
+ | 'usps_first_class_registered'
1481
+ | 'usps_express_3_day_signature_confirmation'
1482
+ | 'usps_express_3_day_certified'
1483
+ | 'usps_express_3_day_certified_return_receipt'
1484
+ | 'ca_post_lettermail'
1485
+ | 'ca_post_personalized'
1486
+ | 'ca_post_neighbourhood_mail'
1487
+ | 'ups_express_overnight'
1488
+ | 'ups_express_2_day'
1489
+ | 'ups_express_3_day'
1490
+ | 'royal_mail_first_class'
1491
+ | 'royal_mail_second_class'
1492
+ | 'au_post_second_class';
1493
+
1494
+ /**
1495
+ * Default merge variables for the letter.
1496
+ */
1497
+ mergeVariables?: { [key: string]: unknown };
1498
+
1499
+ /**
1500
+ * Optional key-value metadata.
1501
+ */
1502
+ metadata?: { [key: string]: string };
1503
+
1504
+ /**
1505
+ * A PDF file or URL for the letter content. Cannot be used with `template`.
1506
+ */
1507
+ pdf?: string;
1508
+
1509
+ /**
1510
+ * Which page number should be perforated (if any).
1511
+ */
1512
+ perforatedPage?: 1;
1513
+
1514
+ /**
1515
+ * ID of a return envelope to include.
1516
+ */
1517
+ returnEnvelope?: string;
1518
+
1519
+ /**
1520
+ * Enum representing the supported letter sizes.
1521
+ */
1522
+ size?: LettersAPI.LetterSize;
1523
+
1524
+ /**
1525
+ * ID of a template for the letter content. Cannot be used with `pdf`.
1526
+ */
1527
+ template?: string;
1528
+ }
1529
+
1530
+ /**
1531
+ * Inline postcard configuration for a campaign. All fields are optional since
1532
+ * campaigns may be in a partial state during drafting.
1533
+ */
1534
+ export interface Postcard {
1535
+ /**
1536
+ * ID of the template for the back side. Cannot be used with `pdf`.
1537
+ */
1538
+ backTemplate?: string;
1539
+
1540
+ /**
1541
+ * An optional description.
1542
+ */
1543
+ description?: string;
1544
+
1545
+ /**
1546
+ * ID of the template for the front side. Cannot be used with `pdf`.
1547
+ */
1548
+ frontTemplate?: string;
1549
+
1550
+ /**
1551
+ * Mailing class for the postcard.
1552
+ */
1553
+ mailingClass?:
1554
+ | 'first_class'
1555
+ | 'standard_class'
1556
+ | 'express'
1557
+ | 'certified'
1558
+ | 'certified_return_receipt'
1559
+ | 'registered'
1560
+ | 'usps_first_class'
1561
+ | 'usps_standard_class'
1562
+ | 'usps_eddm'
1563
+ | 'usps_express_2_day'
1564
+ | 'usps_express_3_day'
1565
+ | 'usps_first_class_certified'
1566
+ | 'usps_first_class_certified_return_receipt'
1567
+ | 'usps_first_class_registered'
1568
+ | 'usps_express_3_day_signature_confirmation'
1569
+ | 'usps_express_3_day_certified'
1570
+ | 'usps_express_3_day_certified_return_receipt'
1571
+ | 'ca_post_lettermail'
1572
+ | 'ca_post_personalized'
1573
+ | 'ca_post_neighbourhood_mail'
1574
+ | 'ups_express_overnight'
1575
+ | 'ups_express_2_day'
1576
+ | 'ups_express_3_day'
1577
+ | 'royal_mail_first_class'
1578
+ | 'royal_mail_second_class'
1579
+ | 'au_post_second_class';
1580
+
1581
+ /**
1582
+ * Default merge variables for the postcard.
1583
+ */
1584
+ mergeVariables?: { [key: string]: unknown };
1585
+
1586
+ /**
1587
+ * Optional key-value metadata.
1588
+ */
1589
+ metadata?: { [key: string]: string };
1590
+
1591
+ /**
1592
+ * Premium paper identifier. Use "standard" for regular stock or a premium*paper*\*
1593
+ * ID.
1594
+ */
1595
+ paper?: string;
1596
+
1597
+ /**
1598
+ * A 2-page PDF file for the postcard content (front and back). Cannot be used with
1599
+ * `frontTemplate`/`backTemplate`.
1600
+ */
1601
+ pdf?: string;
1602
+
1603
+ /**
1604
+ * Enum representing the supported postcard sizes.
1605
+ */
1606
+ size?: '6x4' | '9x6' | '11x6';
1607
+ }
1608
+
1609
+ /**
1610
+ * Inline self-mailer configuration for a campaign. All fields are optional since
1611
+ * campaigns may be in a partial state during drafting.
1612
+ */
1613
+ export interface SelfMailer {
1614
+ /**
1615
+ * An optional description.
1616
+ */
1617
+ description?: string;
1618
+
1619
+ /**
1620
+ * ID of the template for the inside. Cannot be used with `pdf`.
1621
+ */
1622
+ insideTemplate?: string;
1623
+
1624
+ /**
1625
+ * Mailing class for the self-mailer.
1626
+ */
1627
+ mailingClass?:
1628
+ | 'first_class'
1629
+ | 'standard_class'
1630
+ | 'express'
1631
+ | 'certified'
1632
+ | 'certified_return_receipt'
1633
+ | 'registered'
1634
+ | 'usps_first_class'
1635
+ | 'usps_standard_class'
1636
+ | 'usps_eddm'
1637
+ | 'usps_express_2_day'
1638
+ | 'usps_express_3_day'
1639
+ | 'usps_first_class_certified'
1640
+ | 'usps_first_class_certified_return_receipt'
1641
+ | 'usps_first_class_registered'
1642
+ | 'usps_express_3_day_signature_confirmation'
1643
+ | 'usps_express_3_day_certified'
1644
+ | 'usps_express_3_day_certified_return_receipt'
1645
+ | 'ca_post_lettermail'
1646
+ | 'ca_post_personalized'
1647
+ | 'ca_post_neighbourhood_mail'
1648
+ | 'ups_express_overnight'
1649
+ | 'ups_express_2_day'
1650
+ | 'ups_express_3_day'
1651
+ | 'royal_mail_first_class'
1652
+ | 'royal_mail_second_class'
1653
+ | 'au_post_second_class';
1654
+
1655
+ /**
1656
+ * Default merge variables for the self-mailer.
1657
+ */
1658
+ mergeVariables?: { [key: string]: unknown };
1659
+
1660
+ /**
1661
+ * Optional key-value metadata.
1662
+ */
1663
+ metadata?: { [key: string]: string };
1664
+
1665
+ /**
1666
+ * ID of the template for the outside. Cannot be used with `pdf`.
1667
+ */
1668
+ outsideTemplate?: string;
1669
+
1670
+ /**
1671
+ * A 2-page PDF file for the self-mailer content. Cannot be used with
1672
+ * `insideTemplate`/`outsideTemplate`.
1673
+ */
1674
+ pdf?: string;
1675
+
1676
+ /**
1677
+ * Enum representing the supported self-mailer sizes.
1678
+ */
1679
+ size?: '8.5x11_bifold' | '8.5x11_trifold' | '9.5x16_trifold';
1680
+ }
1681
+
1682
+ /**
1683
+ * Inline snap pack configuration for a campaign. All fields are optional since
1684
+ * campaigns may be in a partial state during drafting.
1685
+ */
1686
+ export interface SnapPack {
1687
+ /**
1688
+ * An optional description.
1689
+ */
1690
+ description?: string;
1691
+
1692
+ /**
1693
+ * ID of the template for the inside. Cannot be used with `pdf`.
1694
+ */
1695
+ insideTemplate?: string;
1696
+
1697
+ /**
1698
+ * Mailing class for the snap pack.
1699
+ */
1700
+ mailingClass?:
1701
+ | 'first_class'
1702
+ | 'standard_class'
1703
+ | 'express'
1704
+ | 'certified'
1705
+ | 'certified_return_receipt'
1706
+ | 'registered'
1707
+ | 'usps_first_class'
1708
+ | 'usps_standard_class'
1709
+ | 'usps_eddm'
1710
+ | 'usps_express_2_day'
1711
+ | 'usps_express_3_day'
1712
+ | 'usps_first_class_certified'
1713
+ | 'usps_first_class_certified_return_receipt'
1714
+ | 'usps_first_class_registered'
1715
+ | 'usps_express_3_day_signature_confirmation'
1716
+ | 'usps_express_3_day_certified'
1717
+ | 'usps_express_3_day_certified_return_receipt'
1718
+ | 'ca_post_lettermail'
1719
+ | 'ca_post_personalized'
1720
+ | 'ca_post_neighbourhood_mail'
1721
+ | 'ups_express_overnight'
1722
+ | 'ups_express_2_day'
1723
+ | 'ups_express_3_day'
1724
+ | 'royal_mail_first_class'
1725
+ | 'royal_mail_second_class'
1726
+ | 'au_post_second_class';
1727
+
1728
+ /**
1729
+ * Default merge variables for the snap pack.
1730
+ */
1731
+ mergeVariables?: { [key: string]: unknown };
1732
+
1733
+ /**
1734
+ * Optional key-value metadata.
1735
+ */
1736
+ metadata?: { [key: string]: string };
1737
+
1738
+ /**
1739
+ * ID of the template for the outside. Cannot be used with `pdf`.
1740
+ */
1741
+ outsideTemplate?: string;
1742
+
1743
+ /**
1744
+ * A 2-page PDF file for the snap pack content. Cannot be used with
1745
+ * `insideTemplate`/`outsideTemplate`.
1746
+ */
1747
+ pdf?: string;
1748
+
1749
+ /**
1750
+ * Enum representing the supported snap pack sizes.
1751
+ */
1752
+ size?: '8.5x11_bifold_v';
1753
+ }
364
1754
  }
365
1755
 
366
1756
  export interface CampaignListParams extends SkipLimitParams {