postgrid-node 0.1.0-alpha.4 → 0.2.0

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