resend-cli 1.2.1 → 1.3.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 (357) hide show
  1. package/README.md +25 -10
  2. package/dist/cli.cjs +539 -0
  3. package/package.json +31 -13
  4. package/.claude/settings.local.json +0 -5
  5. package/.claude/worktrees/emails-list/.claude/settings.local.json +0 -5
  6. package/.claude/worktrees/emails-list/.github/scripts/pr-title-check.js +0 -34
  7. package/.claude/worktrees/emails-list/.github/workflows/ci.yml +0 -32
  8. package/.claude/worktrees/emails-list/.github/workflows/pr-title-check.yml +0 -13
  9. package/.claude/worktrees/emails-list/.github/workflows/release.yml +0 -93
  10. package/.claude/worktrees/emails-list/CHANGELOG.md +0 -31
  11. package/.claude/worktrees/emails-list/LICENSE +0 -21
  12. package/.claude/worktrees/emails-list/README.md +0 -424
  13. package/.claude/worktrees/emails-list/biome.json +0 -36
  14. package/.claude/worktrees/emails-list/bun.lock +0 -76
  15. package/.claude/worktrees/emails-list/bunfig.toml +0 -2
  16. package/.claude/worktrees/emails-list/install.ps1 +0 -140
  17. package/.claude/worktrees/emails-list/install.sh +0 -301
  18. package/.claude/worktrees/emails-list/package.json +0 -43
  19. package/.claude/worktrees/emails-list/renovate.json +0 -6
  20. package/.claude/worktrees/emails-list/src/cli.ts +0 -74
  21. package/.claude/worktrees/emails-list/src/commands/api-keys/create.ts +0 -114
  22. package/.claude/worktrees/emails-list/src/commands/api-keys/delete.ts +0 -47
  23. package/.claude/worktrees/emails-list/src/commands/api-keys/index.ts +0 -26
  24. package/.claude/worktrees/emails-list/src/commands/api-keys/list.ts +0 -35
  25. package/.claude/worktrees/emails-list/src/commands/api-keys/utils.ts +0 -8
  26. package/.claude/worktrees/emails-list/src/commands/auth/index.ts +0 -20
  27. package/.claude/worktrees/emails-list/src/commands/auth/login.ts +0 -207
  28. package/.claude/worktrees/emails-list/src/commands/auth/logout.ts +0 -105
  29. package/.claude/worktrees/emails-list/src/commands/broadcasts/create.ts +0 -196
  30. package/.claude/worktrees/emails-list/src/commands/broadcasts/delete.ts +0 -46
  31. package/.claude/worktrees/emails-list/src/commands/broadcasts/get.ts +0 -59
  32. package/.claude/worktrees/emails-list/src/commands/broadcasts/index.ts +0 -43
  33. package/.claude/worktrees/emails-list/src/commands/broadcasts/list.ts +0 -60
  34. package/.claude/worktrees/emails-list/src/commands/broadcasts/send.ts +0 -56
  35. package/.claude/worktrees/emails-list/src/commands/broadcasts/update.ts +0 -95
  36. package/.claude/worktrees/emails-list/src/commands/broadcasts/utils.ts +0 -35
  37. package/.claude/worktrees/emails-list/src/commands/contact-properties/create.ts +0 -118
  38. package/.claude/worktrees/emails-list/src/commands/contact-properties/delete.ts +0 -48
  39. package/.claude/worktrees/emails-list/src/commands/contact-properties/get.ts +0 -46
  40. package/.claude/worktrees/emails-list/src/commands/contact-properties/index.ts +0 -48
  41. package/.claude/worktrees/emails-list/src/commands/contact-properties/list.ts +0 -68
  42. package/.claude/worktrees/emails-list/src/commands/contact-properties/update.ts +0 -88
  43. package/.claude/worktrees/emails-list/src/commands/contact-properties/utils.ts +0 -17
  44. package/.claude/worktrees/emails-list/src/commands/contacts/add-segment.ts +0 -78
  45. package/.claude/worktrees/emails-list/src/commands/contacts/create.ts +0 -122
  46. package/.claude/worktrees/emails-list/src/commands/contacts/delete.ts +0 -49
  47. package/.claude/worktrees/emails-list/src/commands/contacts/get.ts +0 -53
  48. package/.claude/worktrees/emails-list/src/commands/contacts/index.ts +0 -58
  49. package/.claude/worktrees/emails-list/src/commands/contacts/list.ts +0 -57
  50. package/.claude/worktrees/emails-list/src/commands/contacts/remove-segment.ts +0 -48
  51. package/.claude/worktrees/emails-list/src/commands/contacts/segments.ts +0 -39
  52. package/.claude/worktrees/emails-list/src/commands/contacts/topics.ts +0 -45
  53. package/.claude/worktrees/emails-list/src/commands/contacts/update-topics.ts +0 -90
  54. package/.claude/worktrees/emails-list/src/commands/contacts/update.ts +0 -77
  55. package/.claude/worktrees/emails-list/src/commands/contacts/utils.ts +0 -119
  56. package/.claude/worktrees/emails-list/src/commands/doctor.ts +0 -298
  57. package/.claude/worktrees/emails-list/src/commands/domains/create.ts +0 -83
  58. package/.claude/worktrees/emails-list/src/commands/domains/delete.ts +0 -42
  59. package/.claude/worktrees/emails-list/src/commands/domains/get.ts +0 -47
  60. package/.claude/worktrees/emails-list/src/commands/domains/index.ts +0 -35
  61. package/.claude/worktrees/emails-list/src/commands/domains/list.ts +0 -53
  62. package/.claude/worktrees/emails-list/src/commands/domains/update.ts +0 -75
  63. package/.claude/worktrees/emails-list/src/commands/domains/utils.ts +0 -44
  64. package/.claude/worktrees/emails-list/src/commands/domains/verify.ts +0 -38
  65. package/.claude/worktrees/emails-list/src/commands/emails/batch.ts +0 -140
  66. package/.claude/worktrees/emails-list/src/commands/emails/index.ts +0 -28
  67. package/.claude/worktrees/emails-list/src/commands/emails/list.ts +0 -73
  68. package/.claude/worktrees/emails-list/src/commands/emails/receiving/attachment.ts +0 -55
  69. package/.claude/worktrees/emails-list/src/commands/emails/receiving/attachments.ts +0 -68
  70. package/.claude/worktrees/emails-list/src/commands/emails/receiving/get.ts +0 -58
  71. package/.claude/worktrees/emails-list/src/commands/emails/receiving/index.ts +0 -28
  72. package/.claude/worktrees/emails-list/src/commands/emails/receiving/list.ts +0 -59
  73. package/.claude/worktrees/emails-list/src/commands/emails/receiving/utils.ts +0 -38
  74. package/.claude/worktrees/emails-list/src/commands/emails/send.ts +0 -189
  75. package/.claude/worktrees/emails-list/src/commands/open.ts +0 -24
  76. package/.claude/worktrees/emails-list/src/commands/segments/create.ts +0 -50
  77. package/.claude/worktrees/emails-list/src/commands/segments/delete.ts +0 -47
  78. package/.claude/worktrees/emails-list/src/commands/segments/get.ts +0 -38
  79. package/.claude/worktrees/emails-list/src/commands/segments/index.ts +0 -36
  80. package/.claude/worktrees/emails-list/src/commands/segments/list.ts +0 -58
  81. package/.claude/worktrees/emails-list/src/commands/segments/utils.ts +0 -7
  82. package/.claude/worktrees/emails-list/src/commands/teams/index.ts +0 -10
  83. package/.claude/worktrees/emails-list/src/commands/teams/list.ts +0 -35
  84. package/.claude/worktrees/emails-list/src/commands/teams/remove.ts +0 -83
  85. package/.claude/worktrees/emails-list/src/commands/teams/switch.ts +0 -73
  86. package/.claude/worktrees/emails-list/src/commands/topics/create.ts +0 -73
  87. package/.claude/worktrees/emails-list/src/commands/topics/delete.ts +0 -47
  88. package/.claude/worktrees/emails-list/src/commands/topics/get.ts +0 -42
  89. package/.claude/worktrees/emails-list/src/commands/topics/index.ts +0 -42
  90. package/.claude/worktrees/emails-list/src/commands/topics/list.ts +0 -34
  91. package/.claude/worktrees/emails-list/src/commands/topics/update.ts +0 -59
  92. package/.claude/worktrees/emails-list/src/commands/topics/utils.ts +0 -16
  93. package/.claude/worktrees/emails-list/src/commands/webhooks/create.ts +0 -128
  94. package/.claude/worktrees/emails-list/src/commands/webhooks/delete.ts +0 -49
  95. package/.claude/worktrees/emails-list/src/commands/webhooks/get.ts +0 -42
  96. package/.claude/worktrees/emails-list/src/commands/webhooks/index.ts +0 -44
  97. package/.claude/worktrees/emails-list/src/commands/webhooks/list.ts +0 -55
  98. package/.claude/worktrees/emails-list/src/commands/webhooks/update.ts +0 -83
  99. package/.claude/worktrees/emails-list/src/commands/webhooks/utils.ts +0 -36
  100. package/.claude/worktrees/emails-list/src/commands/whoami.ts +0 -71
  101. package/.claude/worktrees/emails-list/src/lib/actions.ts +0 -157
  102. package/.claude/worktrees/emails-list/src/lib/client.ts +0 -34
  103. package/.claude/worktrees/emails-list/src/lib/config.ts +0 -211
  104. package/.claude/worktrees/emails-list/src/lib/files.ts +0 -15
  105. package/.claude/worktrees/emails-list/src/lib/help-text.ts +0 -38
  106. package/.claude/worktrees/emails-list/src/lib/output.ts +0 -54
  107. package/.claude/worktrees/emails-list/src/lib/pagination.ts +0 -36
  108. package/.claude/worktrees/emails-list/src/lib/prompts.ts +0 -149
  109. package/.claude/worktrees/emails-list/src/lib/spinner.ts +0 -93
  110. package/.claude/worktrees/emails-list/src/lib/table.ts +0 -57
  111. package/.claude/worktrees/emails-list/src/lib/tty.ts +0 -28
  112. package/.claude/worktrees/emails-list/src/lib/version.ts +0 -4
  113. package/.claude/worktrees/emails-list/tests/commands/api-keys/create.test.ts +0 -195
  114. package/.claude/worktrees/emails-list/tests/commands/api-keys/delete.test.ts +0 -156
  115. package/.claude/worktrees/emails-list/tests/commands/api-keys/list.test.ts +0 -133
  116. package/.claude/worktrees/emails-list/tests/commands/auth/login.test.ts +0 -119
  117. package/.claude/worktrees/emails-list/tests/commands/auth/logout.test.ts +0 -146
  118. package/.claude/worktrees/emails-list/tests/commands/broadcasts/create.test.ts +0 -447
  119. package/.claude/worktrees/emails-list/tests/commands/broadcasts/delete.test.ts +0 -182
  120. package/.claude/worktrees/emails-list/tests/commands/broadcasts/get.test.ts +0 -146
  121. package/.claude/worktrees/emails-list/tests/commands/broadcasts/list.test.ts +0 -196
  122. package/.claude/worktrees/emails-list/tests/commands/broadcasts/send.test.ts +0 -161
  123. package/.claude/worktrees/emails-list/tests/commands/broadcasts/update.test.ts +0 -283
  124. package/.claude/worktrees/emails-list/tests/commands/contact-properties/create.test.ts +0 -250
  125. package/.claude/worktrees/emails-list/tests/commands/contact-properties/delete.test.ts +0 -183
  126. package/.claude/worktrees/emails-list/tests/commands/contact-properties/get.test.ts +0 -144
  127. package/.claude/worktrees/emails-list/tests/commands/contact-properties/list.test.ts +0 -180
  128. package/.claude/worktrees/emails-list/tests/commands/contact-properties/update.test.ts +0 -216
  129. package/.claude/worktrees/emails-list/tests/commands/contacts/add-segment.test.ts +0 -188
  130. package/.claude/worktrees/emails-list/tests/commands/contacts/create.test.ts +0 -270
  131. package/.claude/worktrees/emails-list/tests/commands/contacts/delete.test.ts +0 -192
  132. package/.claude/worktrees/emails-list/tests/commands/contacts/get.test.ts +0 -148
  133. package/.claude/worktrees/emails-list/tests/commands/contacts/list.test.ts +0 -175
  134. package/.claude/worktrees/emails-list/tests/commands/contacts/remove-segment.test.ts +0 -166
  135. package/.claude/worktrees/emails-list/tests/commands/contacts/segments.test.ts +0 -167
  136. package/.claude/worktrees/emails-list/tests/commands/contacts/topics.test.ts +0 -163
  137. package/.claude/worktrees/emails-list/tests/commands/contacts/update-topics.test.ts +0 -247
  138. package/.claude/worktrees/emails-list/tests/commands/contacts/update.test.ts +0 -205
  139. package/.claude/worktrees/emails-list/tests/commands/doctor.test.ts +0 -165
  140. package/.claude/worktrees/emails-list/tests/commands/domains/create.test.ts +0 -192
  141. package/.claude/worktrees/emails-list/tests/commands/domains/delete.test.ts +0 -156
  142. package/.claude/worktrees/emails-list/tests/commands/domains/get.test.ts +0 -137
  143. package/.claude/worktrees/emails-list/tests/commands/domains/list.test.ts +0 -164
  144. package/.claude/worktrees/emails-list/tests/commands/domains/update.test.ts +0 -223
  145. package/.claude/worktrees/emails-list/tests/commands/domains/verify.test.ts +0 -117
  146. package/.claude/worktrees/emails-list/tests/commands/emails/batch.test.ts +0 -313
  147. package/.claude/worktrees/emails-list/tests/commands/emails/list.test.ts +0 -196
  148. package/.claude/worktrees/emails-list/tests/commands/emails/receiving/attachment.test.ts +0 -140
  149. package/.claude/worktrees/emails-list/tests/commands/emails/receiving/attachments.test.ts +0 -168
  150. package/.claude/worktrees/emails-list/tests/commands/emails/receiving/get.test.ts +0 -140
  151. package/.claude/worktrees/emails-list/tests/commands/emails/receiving/list.test.ts +0 -181
  152. package/.claude/worktrees/emails-list/tests/commands/emails/send.test.ts +0 -309
  153. package/.claude/worktrees/emails-list/tests/commands/segments/create.test.ts +0 -163
  154. package/.claude/worktrees/emails-list/tests/commands/segments/delete.test.ts +0 -182
  155. package/.claude/worktrees/emails-list/tests/commands/segments/get.test.ts +0 -137
  156. package/.claude/worktrees/emails-list/tests/commands/segments/list.test.ts +0 -173
  157. package/.claude/worktrees/emails-list/tests/commands/teams/list.test.ts +0 -63
  158. package/.claude/worktrees/emails-list/tests/commands/teams/remove.test.ts +0 -103
  159. package/.claude/worktrees/emails-list/tests/commands/teams/switch.test.ts +0 -96
  160. package/.claude/worktrees/emails-list/tests/commands/topics/create.test.ts +0 -191
  161. package/.claude/worktrees/emails-list/tests/commands/topics/delete.test.ts +0 -156
  162. package/.claude/worktrees/emails-list/tests/commands/topics/get.test.ts +0 -125
  163. package/.claude/worktrees/emails-list/tests/commands/topics/list.test.ts +0 -124
  164. package/.claude/worktrees/emails-list/tests/commands/topics/update.test.ts +0 -177
  165. package/.claude/worktrees/emails-list/tests/commands/webhooks/create.test.ts +0 -224
  166. package/.claude/worktrees/emails-list/tests/commands/webhooks/delete.test.ts +0 -156
  167. package/.claude/worktrees/emails-list/tests/commands/webhooks/get.test.ts +0 -125
  168. package/.claude/worktrees/emails-list/tests/commands/webhooks/list.test.ts +0 -177
  169. package/.claude/worktrees/emails-list/tests/commands/webhooks/update.test.ts +0 -206
  170. package/.claude/worktrees/emails-list/tests/commands/whoami.test.ts +0 -99
  171. package/.claude/worktrees/emails-list/tests/helpers.ts +0 -93
  172. package/.claude/worktrees/emails-list/tests/lib/client.test.ts +0 -71
  173. package/.claude/worktrees/emails-list/tests/lib/config.test.ts +0 -414
  174. package/.claude/worktrees/emails-list/tests/lib/files.test.ts +0 -65
  175. package/.claude/worktrees/emails-list/tests/lib/help-text.test.ts +0 -97
  176. package/.claude/worktrees/emails-list/tests/lib/output.test.ts +0 -127
  177. package/.claude/worktrees/emails-list/tests/lib/prompts.test.ts +0 -178
  178. package/.claude/worktrees/emails-list/tests/lib/spinner.test.ts +0 -146
  179. package/.claude/worktrees/emails-list/tests/lib/table.test.ts +0 -63
  180. package/.claude/worktrees/emails-list/tests/lib/tty.test.ts +0 -85
  181. package/.claude/worktrees/emails-list/tsconfig.json +0 -14
  182. package/.github/scripts/pr-title-check.js +0 -34
  183. package/.github/workflows/ci.yml +0 -32
  184. package/.github/workflows/pr-title-check.yml +0 -13
  185. package/.github/workflows/release.yml +0 -120
  186. package/.github/workflows/test-install-windows.yml +0 -48
  187. package/CHANGELOG.md +0 -31
  188. package/biome.json +0 -36
  189. package/bun.lock +0 -76
  190. package/bunfig.toml +0 -2
  191. package/docs/agent-dx-gaps.md +0 -167
  192. package/docs/missing-commands.md +0 -58
  193. package/docs/production-readiness.md +0 -99
  194. package/docs/secure-key-storage.md +0 -174
  195. package/install.ps1 +0 -141
  196. package/install.sh +0 -301
  197. package/renovate.json +0 -4
  198. package/src/cli.ts +0 -82
  199. package/src/commands/api-keys/create.ts +0 -114
  200. package/src/commands/api-keys/delete.ts +0 -47
  201. package/src/commands/api-keys/index.ts +0 -26
  202. package/src/commands/api-keys/list.ts +0 -35
  203. package/src/commands/api-keys/utils.ts +0 -8
  204. package/src/commands/auth/index.ts +0 -20
  205. package/src/commands/auth/login.ts +0 -207
  206. package/src/commands/auth/logout.ts +0 -105
  207. package/src/commands/broadcasts/create.ts +0 -196
  208. package/src/commands/broadcasts/delete.ts +0 -46
  209. package/src/commands/broadcasts/get.ts +0 -59
  210. package/src/commands/broadcasts/index.ts +0 -43
  211. package/src/commands/broadcasts/list.ts +0 -60
  212. package/src/commands/broadcasts/send.ts +0 -56
  213. package/src/commands/broadcasts/update.ts +0 -95
  214. package/src/commands/broadcasts/utils.ts +0 -35
  215. package/src/commands/contact-properties/create.ts +0 -118
  216. package/src/commands/contact-properties/delete.ts +0 -48
  217. package/src/commands/contact-properties/get.ts +0 -46
  218. package/src/commands/contact-properties/index.ts +0 -48
  219. package/src/commands/contact-properties/list.ts +0 -68
  220. package/src/commands/contact-properties/update.ts +0 -88
  221. package/src/commands/contact-properties/utils.ts +0 -17
  222. package/src/commands/contacts/add-segment.ts +0 -78
  223. package/src/commands/contacts/create.ts +0 -122
  224. package/src/commands/contacts/delete.ts +0 -49
  225. package/src/commands/contacts/get.ts +0 -53
  226. package/src/commands/contacts/index.ts +0 -58
  227. package/src/commands/contacts/list.ts +0 -57
  228. package/src/commands/contacts/remove-segment.ts +0 -48
  229. package/src/commands/contacts/segments.ts +0 -39
  230. package/src/commands/contacts/topics.ts +0 -45
  231. package/src/commands/contacts/update-topics.ts +0 -90
  232. package/src/commands/contacts/update.ts +0 -77
  233. package/src/commands/contacts/utils.ts +0 -119
  234. package/src/commands/doctor.ts +0 -298
  235. package/src/commands/domains/create.ts +0 -83
  236. package/src/commands/domains/delete.ts +0 -42
  237. package/src/commands/domains/get.ts +0 -47
  238. package/src/commands/domains/index.ts +0 -35
  239. package/src/commands/domains/list.ts +0 -53
  240. package/src/commands/domains/update.ts +0 -75
  241. package/src/commands/domains/utils.ts +0 -44
  242. package/src/commands/domains/verify.ts +0 -38
  243. package/src/commands/emails/batch.ts +0 -140
  244. package/src/commands/emails/index.ts +0 -24
  245. package/src/commands/emails/receiving/attachment.ts +0 -55
  246. package/src/commands/emails/receiving/attachments.ts +0 -68
  247. package/src/commands/emails/receiving/get.ts +0 -58
  248. package/src/commands/emails/receiving/index.ts +0 -28
  249. package/src/commands/emails/receiving/list.ts +0 -59
  250. package/src/commands/emails/receiving/utils.ts +0 -38
  251. package/src/commands/emails/send.ts +0 -189
  252. package/src/commands/open.ts +0 -24
  253. package/src/commands/segments/create.ts +0 -50
  254. package/src/commands/segments/delete.ts +0 -47
  255. package/src/commands/segments/get.ts +0 -38
  256. package/src/commands/segments/index.ts +0 -36
  257. package/src/commands/segments/list.ts +0 -58
  258. package/src/commands/segments/utils.ts +0 -7
  259. package/src/commands/teams/index.ts +0 -10
  260. package/src/commands/teams/list.ts +0 -35
  261. package/src/commands/teams/remove.ts +0 -83
  262. package/src/commands/teams/switch.ts +0 -73
  263. package/src/commands/topics/create.ts +0 -73
  264. package/src/commands/topics/delete.ts +0 -47
  265. package/src/commands/topics/get.ts +0 -42
  266. package/src/commands/topics/index.ts +0 -42
  267. package/src/commands/topics/list.ts +0 -34
  268. package/src/commands/topics/update.ts +0 -59
  269. package/src/commands/topics/utils.ts +0 -16
  270. package/src/commands/webhooks/create.ts +0 -128
  271. package/src/commands/webhooks/delete.ts +0 -49
  272. package/src/commands/webhooks/get.ts +0 -42
  273. package/src/commands/webhooks/index.ts +0 -44
  274. package/src/commands/webhooks/list.ts +0 -55
  275. package/src/commands/webhooks/update.ts +0 -83
  276. package/src/commands/webhooks/utils.ts +0 -36
  277. package/src/commands/whoami.ts +0 -71
  278. package/src/lib/actions.ts +0 -157
  279. package/src/lib/client.ts +0 -37
  280. package/src/lib/config.ts +0 -211
  281. package/src/lib/files.ts +0 -15
  282. package/src/lib/help-text.ts +0 -38
  283. package/src/lib/output.ts +0 -54
  284. package/src/lib/pagination.ts +0 -36
  285. package/src/lib/prompts.ts +0 -149
  286. package/src/lib/spinner.ts +0 -93
  287. package/src/lib/table.ts +0 -57
  288. package/src/lib/tty.ts +0 -28
  289. package/src/lib/version.ts +0 -4
  290. package/tests/commands/api-keys/create.test.ts +0 -195
  291. package/tests/commands/api-keys/delete.test.ts +0 -156
  292. package/tests/commands/api-keys/list.test.ts +0 -133
  293. package/tests/commands/auth/login.test.ts +0 -119
  294. package/tests/commands/auth/logout.test.ts +0 -146
  295. package/tests/commands/broadcasts/create.test.ts +0 -447
  296. package/tests/commands/broadcasts/delete.test.ts +0 -182
  297. package/tests/commands/broadcasts/get.test.ts +0 -146
  298. package/tests/commands/broadcasts/list.test.ts +0 -196
  299. package/tests/commands/broadcasts/send.test.ts +0 -161
  300. package/tests/commands/broadcasts/update.test.ts +0 -283
  301. package/tests/commands/contact-properties/create.test.ts +0 -250
  302. package/tests/commands/contact-properties/delete.test.ts +0 -183
  303. package/tests/commands/contact-properties/get.test.ts +0 -144
  304. package/tests/commands/contact-properties/list.test.ts +0 -180
  305. package/tests/commands/contact-properties/update.test.ts +0 -216
  306. package/tests/commands/contacts/add-segment.test.ts +0 -188
  307. package/tests/commands/contacts/create.test.ts +0 -270
  308. package/tests/commands/contacts/delete.test.ts +0 -192
  309. package/tests/commands/contacts/get.test.ts +0 -148
  310. package/tests/commands/contacts/list.test.ts +0 -175
  311. package/tests/commands/contacts/remove-segment.test.ts +0 -166
  312. package/tests/commands/contacts/segments.test.ts +0 -167
  313. package/tests/commands/contacts/topics.test.ts +0 -163
  314. package/tests/commands/contacts/update-topics.test.ts +0 -247
  315. package/tests/commands/contacts/update.test.ts +0 -205
  316. package/tests/commands/doctor.test.ts +0 -165
  317. package/tests/commands/domains/create.test.ts +0 -192
  318. package/tests/commands/domains/delete.test.ts +0 -156
  319. package/tests/commands/domains/get.test.ts +0 -137
  320. package/tests/commands/domains/list.test.ts +0 -164
  321. package/tests/commands/domains/update.test.ts +0 -223
  322. package/tests/commands/domains/verify.test.ts +0 -117
  323. package/tests/commands/emails/batch.test.ts +0 -313
  324. package/tests/commands/emails/receiving/attachment.test.ts +0 -140
  325. package/tests/commands/emails/receiving/attachments.test.ts +0 -168
  326. package/tests/commands/emails/receiving/get.test.ts +0 -140
  327. package/tests/commands/emails/receiving/list.test.ts +0 -181
  328. package/tests/commands/emails/send.test.ts +0 -309
  329. package/tests/commands/segments/create.test.ts +0 -163
  330. package/tests/commands/segments/delete.test.ts +0 -182
  331. package/tests/commands/segments/get.test.ts +0 -137
  332. package/tests/commands/segments/list.test.ts +0 -173
  333. package/tests/commands/teams/list.test.ts +0 -63
  334. package/tests/commands/teams/remove.test.ts +0 -103
  335. package/tests/commands/teams/switch.test.ts +0 -96
  336. package/tests/commands/topics/create.test.ts +0 -191
  337. package/tests/commands/topics/delete.test.ts +0 -156
  338. package/tests/commands/topics/get.test.ts +0 -125
  339. package/tests/commands/topics/list.test.ts +0 -124
  340. package/tests/commands/topics/update.test.ts +0 -177
  341. package/tests/commands/webhooks/create.test.ts +0 -224
  342. package/tests/commands/webhooks/delete.test.ts +0 -156
  343. package/tests/commands/webhooks/get.test.ts +0 -125
  344. package/tests/commands/webhooks/list.test.ts +0 -177
  345. package/tests/commands/webhooks/update.test.ts +0 -206
  346. package/tests/commands/whoami.test.ts +0 -99
  347. package/tests/helpers.ts +0 -93
  348. package/tests/lib/client.test.ts +0 -71
  349. package/tests/lib/config.test.ts +0 -414
  350. package/tests/lib/files.test.ts +0 -65
  351. package/tests/lib/help-text.test.ts +0 -97
  352. package/tests/lib/output.test.ts +0 -127
  353. package/tests/lib/prompts.test.ts +0 -178
  354. package/tests/lib/spinner.test.ts +0 -146
  355. package/tests/lib/table.test.ts +0 -63
  356. package/tests/lib/tty.test.ts +0 -85
  357. package/tsconfig.json +0 -14
@@ -1,42 +0,0 @@
1
- import { Command } from '@commander-js/extra-typings';
2
- import { runGet } from '../../lib/actions';
3
- import type { GlobalOpts } from '../../lib/client';
4
- import { buildHelpText } from '../../lib/help-text';
5
-
6
- export const getWebhookCommand = new Command('get')
7
- .description('Retrieve a webhook endpoint configuration by ID')
8
- .argument('<id>', 'Webhook UUID')
9
- .addHelpText(
10
- 'after',
11
- buildHelpText({
12
- context: `Note: The signing_secret is not returned by the get endpoint.
13
- To rotate secrets, delete the webhook and recreate it.`,
14
- output: ` {"object":"webhook","id":"<uuid>","endpoint":"<url>","events":["<event>"],"status":"enabled|disabled","created_at":"<iso-date>","signing_secret":"<whsec_...>"}`,
15
- errorCodes: ['auth_error', 'fetch_error'],
16
- examples: [
17
- 'resend webhooks get wh_abc123',
18
- 'resend webhooks get wh_abc123 --json',
19
- ],
20
- }),
21
- )
22
- .action(async (id, _opts, cmd) => {
23
- const globalOpts = cmd.optsWithGlobals() as GlobalOpts;
24
- await runGet(
25
- {
26
- spinner: {
27
- loading: 'Fetching webhook...',
28
- success: 'Webhook fetched',
29
- fail: 'Failed to fetch webhook',
30
- },
31
- sdkCall: (resend) => resend.webhooks.get(id),
32
- onInteractive: (d) => {
33
- console.log(`\n${d.endpoint}`);
34
- console.log(`ID: ${d.id}`);
35
- console.log(`Status: ${d.status}`);
36
- console.log(`Events: ${(d.events ?? []).join(', ') || '(none)'}`);
37
- console.log(`Created: ${d.created_at}`);
38
- },
39
- },
40
- globalOpts,
41
- );
42
- });
@@ -1,44 +0,0 @@
1
- import { Command } from '@commander-js/extra-typings';
2
- import { buildHelpText } from '../../lib/help-text';
3
- import { createWebhookCommand } from './create';
4
- import { deleteWebhookCommand } from './delete';
5
- import { getWebhookCommand } from './get';
6
- import { listWebhooksCommand } from './list';
7
- import { updateWebhookCommand } from './update';
8
-
9
- export const webhooksCommand = new Command('webhooks')
10
- .description('Manage webhook endpoints for real-time event notifications')
11
- .addHelpText(
12
- 'after',
13
- buildHelpText({
14
- context: `Webhooks let you receive real-time event notifications from Resend at an HTTPS endpoint.
15
- Payloads are signed with Svix headers for verification.
16
-
17
- As of January 2026, webhook events fire per-recipient. A batch email to 3 recipients
18
- generates 3 email.sent events. The "to" field remains an array for backward compatibility
19
- but contains one entry per event.
20
-
21
- Event categories (17 total):
22
- Email: email.sent, email.delivered, email.delivery_delayed, email.bounced,
23
- email.complained, email.opened, email.clicked, email.failed,
24
- email.scheduled, email.suppressed, email.received
25
- Contact: contact.created, contact.updated, contact.deleted
26
- Domain: domain.created, domain.updated, domain.deleted
27
-
28
- Signature verification (Svix):
29
- Each delivery includes headers: svix-id, svix-timestamp, svix-signature
30
- Verify payloads in your application using: resend.webhooks.verify({ payload, headers, webhookSecret })`,
31
- examples: [
32
- 'resend webhooks list',
33
- 'resend webhooks create --endpoint https://app.example.com/hooks/resend --events all',
34
- 'resend webhooks get wh_abc123',
35
- 'resend webhooks update wh_abc123 --status disabled',
36
- 'resend webhooks delete wh_abc123 --yes',
37
- ],
38
- }),
39
- )
40
- .addCommand(createWebhookCommand)
41
- .addCommand(getWebhookCommand)
42
- .addCommand(listWebhooksCommand, { isDefault: true })
43
- .addCommand(updateWebhookCommand)
44
- .addCommand(deleteWebhookCommand);
@@ -1,55 +0,0 @@
1
- import { Command } from '@commander-js/extra-typings';
2
- import { runList } from '../../lib/actions';
3
- import type { GlobalOpts } from '../../lib/client';
4
- import { buildHelpText } from '../../lib/help-text';
5
- import {
6
- buildPaginationOpts,
7
- parseLimitOpt,
8
- printPaginationHint,
9
- } from '../../lib/pagination';
10
- import { renderWebhooksTable } from './utils';
11
-
12
- export const listWebhooksCommand = new Command('list')
13
- .alias('ls')
14
- .description('List all registered webhook endpoints')
15
- .option('--limit <n>', 'Maximum number of webhooks to return (1-100)', '10')
16
- .option('--after <cursor>', 'Return webhooks after this cursor (next page)')
17
- .option(
18
- '--before <cursor>',
19
- 'Return webhooks before this cursor (previous page)',
20
- )
21
- .addHelpText(
22
- 'after',
23
- buildHelpText({
24
- context: `Pagination: use --after or --before with a webhook ID as the cursor.
25
- Only one of --after or --before may be used at a time.
26
- The response includes has_more: true when additional pages exist.`,
27
- output: ` {"object":"list","data":[{"id":"<uuid>","endpoint":"<url>","events":["<event>"],"status":"enabled","created_at":"<iso-date>"}],"has_more":false}`,
28
- errorCodes: ['auth_error', 'invalid_limit', 'list_error'],
29
- examples: [
30
- 'resend webhooks list',
31
- 'resend webhooks list --limit 25 --json',
32
- 'resend webhooks list --after wh_abc123 --json',
33
- ],
34
- }),
35
- )
36
- .action(async (opts, cmd) => {
37
- const globalOpts = cmd.optsWithGlobals() as GlobalOpts;
38
- const limit = parseLimitOpt(opts.limit, globalOpts);
39
- const paginationOpts = buildPaginationOpts(limit, opts.after, opts.before);
40
- await runList(
41
- {
42
- spinner: {
43
- loading: 'Fetching webhooks...',
44
- success: 'Webhooks fetched',
45
- fail: 'Failed to list webhooks',
46
- },
47
- sdkCall: (resend) => resend.webhooks.list(paginationOpts),
48
- onInteractive: (list) => {
49
- console.log(renderWebhooksTable(list.data));
50
- printPaginationHint(list);
51
- },
52
- },
53
- globalOpts,
54
- );
55
- });
@@ -1,83 +0,0 @@
1
- import { Command, Option } from '@commander-js/extra-typings';
2
- import type { WebhookEvent } from 'resend';
3
- import { runWrite } from '../../lib/actions';
4
- import type { GlobalOpts } from '../../lib/client';
5
- import { buildHelpText } from '../../lib/help-text';
6
- import { outputError } from '../../lib/output';
7
- import { ALL_WEBHOOK_EVENTS } from './utils';
8
-
9
- export const updateWebhookCommand = new Command('update')
10
- .description(
11
- "Update a webhook's endpoint URL, event subscriptions, or enabled status",
12
- )
13
- .argument('<id>', 'Webhook UUID')
14
- .option('--endpoint <endpoint>', 'New HTTPS URL for this webhook')
15
- .option(
16
- '--events <events...>',
17
- 'Replace the full event subscription list. Use "all" for all 17 events.',
18
- )
19
- .addOption(
20
- new Option(
21
- '--status <status>',
22
- 'Enable or disable event delivery for this webhook',
23
- ).choices(['enabled', 'disabled'] as const),
24
- )
25
- .addHelpText(
26
- 'after',
27
- buildHelpText({
28
- context: `At least one of --endpoint, --events, or --status must be provided.
29
-
30
- --events replaces the entire event list (it is not additive).
31
- Use "all" as a shorthand for all 17 event types.
32
-
33
- --status controls whether events are delivered to this endpoint:
34
- enabled Events are delivered (default on creation)
35
- disabled Events are suppressed without deleting the webhook`,
36
- output: ` {"object":"webhook","id":"<uuid>"}`,
37
- errorCodes: ['auth_error', 'no_changes', 'update_error'],
38
- examples: [
39
- 'resend webhooks update wh_abc123 --endpoint https://new-app.example.com/hooks/resend',
40
- 'resend webhooks update wh_abc123 --events email.sent email.bounced',
41
- 'resend webhooks update wh_abc123 --events all',
42
- 'resend webhooks update wh_abc123 --status disabled',
43
- 'resend webhooks update wh_abc123 --endpoint https://new-app.example.com/hooks/resend --events all --json',
44
- ],
45
- }),
46
- )
47
- .action(async (id, opts, cmd) => {
48
- const globalOpts = cmd.optsWithGlobals() as GlobalOpts;
49
-
50
- if (!opts.endpoint && !opts.events?.length && !opts.status) {
51
- outputError(
52
- {
53
- message:
54
- 'Provide at least one option to update: --endpoint, --events, or --status.',
55
- code: 'no_changes',
56
- },
57
- { json: globalOpts.json },
58
- );
59
- }
60
-
61
- const selectedEvents = opts.events?.includes('all')
62
- ? ALL_WEBHOOK_EVENTS
63
- : (opts.events as WebhookEvent[] | undefined);
64
-
65
- await runWrite(
66
- {
67
- spinner: {
68
- loading: 'Updating webhook...',
69
- success: 'Webhook updated',
70
- fail: 'Failed to update webhook',
71
- },
72
- sdkCall: (resend) =>
73
- resend.webhooks.update(id, {
74
- ...(opts.endpoint && { endpoint: opts.endpoint }),
75
- ...(selectedEvents?.length && { events: selectedEvents }),
76
- ...(opts.status && { status: opts.status }),
77
- }),
78
- errorCode: 'update_error',
79
- successMsg: `Webhook updated: ${id}`,
80
- },
81
- globalOpts,
82
- );
83
- });
@@ -1,36 +0,0 @@
1
- import type { Webhook, WebhookEvent } from 'resend';
2
- import { renderTable } from '../../lib/table';
3
-
4
- export const ALL_WEBHOOK_EVENTS: WebhookEvent[] = [
5
- 'email.sent',
6
- 'email.delivered',
7
- 'email.delivery_delayed',
8
- 'email.bounced',
9
- 'email.complained',
10
- 'email.opened',
11
- 'email.clicked',
12
- 'email.failed',
13
- 'email.scheduled',
14
- 'email.suppressed',
15
- 'email.received',
16
- 'contact.created',
17
- 'contact.updated',
18
- 'contact.deleted',
19
- 'domain.created',
20
- 'domain.updated',
21
- 'domain.deleted',
22
- ];
23
-
24
- export function renderWebhooksTable(webhooks: Webhook[]): string {
25
- const rows = webhooks.map((w) => {
26
- const eventsStr = (w.events ?? []).join(', ');
27
- const events =
28
- eventsStr.length > 60 ? `${eventsStr.slice(0, 57)}...` : eventsStr;
29
- return [w.endpoint, events, w.status, w.id];
30
- });
31
- return renderTable(
32
- ['Endpoint', 'Events', 'Status', 'ID'],
33
- rows,
34
- '(no webhooks)',
35
- );
36
- }
@@ -1,71 +0,0 @@
1
- import { Command } from '@commander-js/extra-typings';
2
- import type { GlobalOpts } from '../lib/client';
3
- import { maskKey, resolveApiKey, resolveTeamName } from '../lib/config';
4
- import { buildHelpText } from '../lib/help-text';
5
- import { outputError, outputResult } from '../lib/output';
6
- import { isInteractive } from '../lib/tty';
7
-
8
- export const whoamiCommand = new Command('whoami')
9
- .description('Show current authentication status')
10
- .addHelpText(
11
- 'after',
12
- buildHelpText({
13
- setup: true,
14
- context: `Local only — no network calls.
15
- Shows which team is active and where the API key comes from.`,
16
- output: ` {"authenticated":true,"team":"production","api_key":"re_...abcd","source":"config"}
17
- {"authenticated":false}`,
18
- examples: [
19
- 'resend whoami',
20
- 'resend whoami --json',
21
- 'resend whoami --team production',
22
- ],
23
- }),
24
- )
25
- .action((_opts, cmd) => {
26
- const globalOpts = cmd.optsWithGlobals() as GlobalOpts;
27
- const teamName = globalOpts.team;
28
- const resolved = resolveApiKey(globalOpts.apiKey, teamName);
29
-
30
- if (!resolved) {
31
- if (globalOpts.json || !isInteractive()) {
32
- outputResult(
33
- { authenticated: false },
34
- { json: globalOpts.json, exitCode: 1 },
35
- );
36
- // outputResult with exitCode calls process.exit, but TS doesn't know
37
- return;
38
- }
39
- outputError(
40
- {
41
- message: 'Not authenticated.\nRun `resend login` to get started.',
42
- code: 'not_authenticated',
43
- },
44
- { json: false },
45
- );
46
- return;
47
- }
48
-
49
- const team = resolved.team ?? resolveTeamName(teamName);
50
-
51
- if (globalOpts.json || !isInteractive()) {
52
- outputResult(
53
- {
54
- authenticated: true,
55
- team,
56
- api_key: maskKey(resolved.key),
57
- source: resolved.source,
58
- },
59
- { json: globalOpts.json },
60
- );
61
- return;
62
- }
63
-
64
- console.log('');
65
- console.log(` Team: ${team}`);
66
- console.log(` API Key: ${maskKey(resolved.key)}`);
67
- console.log(
68
- ` Source: ${resolved.source === 'config' ? 'config file' : resolved.source === 'env' ? 'environment variable' : 'flag'}`,
69
- );
70
- console.log('');
71
- });
@@ -1,157 +0,0 @@
1
- import type { Resend } from 'resend';
2
- import type { GlobalOpts } from './client';
3
- import { requireClient } from './client';
4
- import { outputResult } from './output';
5
- import { confirmDelete } from './prompts';
6
- import { withSpinner } from './spinner';
7
- import { isInteractive } from './tty';
8
-
9
- type SdkCall<T> = (
10
- resend: Resend,
11
- ) => Promise<{ data: T | null; error: { message: string } | null }>;
12
- type SpinnerMessages = { loading: string; success: string; fail: string };
13
-
14
- /**
15
- * Shared pattern for all get commands:
16
- * requireClient → withSpinner(fetch_error) → if/else output
17
- */
18
- export async function runGet<T>(
19
- config: {
20
- spinner: SpinnerMessages;
21
- sdkCall: SdkCall<T>;
22
- onInteractive: (data: T) => void;
23
- },
24
- globalOpts: GlobalOpts,
25
- ): Promise<void> {
26
- const resend = requireClient(globalOpts);
27
- const data = await withSpinner(
28
- config.spinner,
29
- () => config.sdkCall(resend),
30
- 'fetch_error',
31
- globalOpts,
32
- );
33
- if (!globalOpts.json && isInteractive()) {
34
- config.onInteractive(data);
35
- } else {
36
- outputResult(data, { json: globalOpts.json });
37
- }
38
- }
39
-
40
- /**
41
- * Shared pattern for all delete commands:
42
- * requireClient → confirmDelete (if needed) → withSpinner → if/else output
43
- */
44
- export async function runDelete(
45
- id: string,
46
- skipConfirm: boolean,
47
- config: {
48
- confirmMessage: string;
49
- spinner: SpinnerMessages;
50
- object: string;
51
- successMsg: string;
52
- sdkCall: SdkCall<unknown>;
53
- },
54
- globalOpts: GlobalOpts,
55
- ): Promise<void> {
56
- const resend = requireClient(globalOpts);
57
- if (!skipConfirm) {
58
- await confirmDelete(id, config.confirmMessage, globalOpts);
59
- }
60
- await withSpinner(
61
- config.spinner,
62
- () => config.sdkCall(resend),
63
- 'delete_error',
64
- globalOpts,
65
- );
66
- if (!globalOpts.json && isInteractive()) {
67
- console.log(config.successMsg);
68
- } else {
69
- outputResult(
70
- { object: config.object, id, deleted: true },
71
- { json: globalOpts.json },
72
- );
73
- }
74
- }
75
-
76
- /**
77
- * Shared pattern for create commands:
78
- * requireClient → withSpinner('create_error') → if/else output
79
- */
80
- export async function runCreate<T>(
81
- config: {
82
- spinner: SpinnerMessages;
83
- sdkCall: SdkCall<T>;
84
- onInteractive: (data: T) => void;
85
- },
86
- globalOpts: GlobalOpts,
87
- ): Promise<void> {
88
- const resend = requireClient(globalOpts);
89
- const data = await withSpinner(
90
- config.spinner,
91
- () => config.sdkCall(resend),
92
- 'create_error',
93
- globalOpts,
94
- );
95
- if (!globalOpts.json && isInteractive()) {
96
- config.onInteractive(data);
97
- } else {
98
- outputResult(data, { json: globalOpts.json });
99
- }
100
- }
101
-
102
- /**
103
- * Shared pattern for write commands (update/verify/remove-segment) where
104
- * interactive output is a single status message:
105
- * requireClient → withSpinner(errorCode) → if/else output
106
- */
107
- export async function runWrite<T>(
108
- config: {
109
- spinner: SpinnerMessages;
110
- sdkCall: SdkCall<T>;
111
- errorCode: string;
112
- successMsg: string;
113
- },
114
- globalOpts: GlobalOpts,
115
- ): Promise<void> {
116
- const resend = requireClient(globalOpts);
117
- const data = await withSpinner(
118
- config.spinner,
119
- () => config.sdkCall(resend),
120
- config.errorCode,
121
- globalOpts,
122
- );
123
- if (!globalOpts.json && isInteractive()) {
124
- console.log(config.successMsg);
125
- } else {
126
- outputResult(data, { json: globalOpts.json });
127
- }
128
- }
129
-
130
- /**
131
- * Shared pattern for all list commands:
132
- * requireClient → withSpinner → if/else output
133
- *
134
- * Callers pass pagination opts (if any) via the sdkCall closure.
135
- * The onInteractive callback handles table rendering and pagination hints.
136
- */
137
- export async function runList<T>(
138
- config: {
139
- spinner: SpinnerMessages;
140
- sdkCall: SdkCall<T>;
141
- onInteractive: (result: T) => void;
142
- },
143
- globalOpts: GlobalOpts,
144
- ): Promise<void> {
145
- const resend = requireClient(globalOpts);
146
- const result = await withSpinner(
147
- config.spinner,
148
- () => config.sdkCall(resend),
149
- 'list_error',
150
- globalOpts,
151
- );
152
- if (!globalOpts.json && isInteractive()) {
153
- config.onInteractive(result);
154
- } else {
155
- outputResult(result, { json: globalOpts.json });
156
- }
157
- }
@@ -1,34 +0,0 @@
1
- import { Resend } from 'resend';
2
- import { resolveApiKey } from './config';
3
- import { errorMessage, outputError } from './output';
4
-
5
- export type GlobalOpts = {
6
- apiKey?: string;
7
- json?: boolean;
8
- quiet?: boolean;
9
- team?: string;
10
- };
11
-
12
- export function createClient(flagValue?: string, teamName?: string): Resend {
13
- const resolved = resolveApiKey(flagValue, teamName);
14
- if (!resolved) {
15
- throw new Error(
16
- 'No API key found. Set RESEND_API_KEY, use --api-key, or run: resend login',
17
- );
18
- }
19
- return new Resend(resolved.key);
20
- }
21
-
22
- export function requireClient(opts: GlobalOpts): Resend {
23
- try {
24
- return createClient(opts.apiKey, opts.team);
25
- } catch (err) {
26
- outputError(
27
- {
28
- message: errorMessage(err, 'Failed to create client'),
29
- code: 'auth_error',
30
- },
31
- { json: opts.json },
32
- );
33
- }
34
- }