@whop/sdk 0.0.27 → 0.0.29

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 (470) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/client.d.mts +9 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +9 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js +10 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +10 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/access-tokens.d.mts +19 -20
  12. package/resources/access-tokens.d.mts.map +1 -1
  13. package/resources/access-tokens.d.ts +19 -20
  14. package/resources/access-tokens.d.ts.map +1 -1
  15. package/resources/access-tokens.js +4 -4
  16. package/resources/access-tokens.mjs +4 -4
  17. package/resources/account-links.d.mts +15 -13
  18. package/resources/account-links.d.mts.map +1 -1
  19. package/resources/account-links.d.ts +15 -13
  20. package/resources/account-links.d.ts.map +1 -1
  21. package/resources/account-links.js +2 -3
  22. package/resources/account-links.js.map +1 -1
  23. package/resources/account-links.mjs +2 -3
  24. package/resources/account-links.mjs.map +1 -1
  25. package/resources/ai-chats.d.mts +38 -26
  26. package/resources/ai-chats.d.mts.map +1 -1
  27. package/resources/ai-chats.d.ts +38 -26
  28. package/resources/ai-chats.d.ts.map +1 -1
  29. package/resources/ai-chats.js +5 -5
  30. package/resources/ai-chats.mjs +5 -5
  31. package/resources/app-builds.d.mts +35 -33
  32. package/resources/app-builds.d.mts.map +1 -1
  33. package/resources/app-builds.d.ts +35 -33
  34. package/resources/app-builds.d.ts.map +1 -1
  35. package/resources/app-builds.js +7 -4
  36. package/resources/app-builds.js.map +1 -1
  37. package/resources/app-builds.mjs +7 -4
  38. package/resources/app-builds.mjs.map +1 -1
  39. package/resources/apps.d.mts +81 -56
  40. package/resources/apps.d.mts.map +1 -1
  41. package/resources/apps.d.ts +81 -56
  42. package/resources/apps.d.ts.map +1 -1
  43. package/resources/apps.js +7 -4
  44. package/resources/apps.js.map +1 -1
  45. package/resources/apps.mjs +7 -4
  46. package/resources/apps.mjs.map +1 -1
  47. package/resources/authorized-users.d.mts +32 -26
  48. package/resources/authorized-users.d.mts.map +1 -1
  49. package/resources/authorized-users.d.ts +32 -26
  50. package/resources/authorized-users.d.ts.map +1 -1
  51. package/resources/authorized-users.js +3 -2
  52. package/resources/authorized-users.js.map +1 -1
  53. package/resources/authorized-users.mjs +3 -2
  54. package/resources/authorized-users.mjs.map +1 -1
  55. package/resources/chat-channels.d.mts +27 -19
  56. package/resources/chat-channels.d.mts.map +1 -1
  57. package/resources/chat-channels.d.ts +27 -19
  58. package/resources/chat-channels.d.ts.map +1 -1
  59. package/resources/chat-channels.js +5 -3
  60. package/resources/chat-channels.js.map +1 -1
  61. package/resources/chat-channels.mjs +5 -3
  62. package/resources/chat-channels.mjs.map +1 -1
  63. package/resources/checkout-configurations.d.mts +55 -46
  64. package/resources/checkout-configurations.d.mts.map +1 -1
  65. package/resources/checkout-configurations.d.ts +55 -46
  66. package/resources/checkout-configurations.d.ts.map +1 -1
  67. package/resources/checkout-configurations.js +3 -2
  68. package/resources/checkout-configurations.js.map +1 -1
  69. package/resources/checkout-configurations.mjs +3 -2
  70. package/resources/checkout-configurations.mjs.map +1 -1
  71. package/resources/companies.d.mts +71 -46
  72. package/resources/companies.d.mts.map +1 -1
  73. package/resources/companies.d.ts +71 -46
  74. package/resources/companies.d.ts.map +1 -1
  75. package/resources/companies.js +7 -8
  76. package/resources/companies.js.map +1 -1
  77. package/resources/companies.mjs +7 -8
  78. package/resources/companies.mjs.map +1 -1
  79. package/resources/company-token-transactions.d.mts +80 -57
  80. package/resources/company-token-transactions.d.mts.map +1 -1
  81. package/resources/company-token-transactions.d.ts +80 -57
  82. package/resources/company-token-transactions.d.ts.map +1 -1
  83. package/resources/company-token-transactions.js +6 -3
  84. package/resources/company-token-transactions.js.map +1 -1
  85. package/resources/company-token-transactions.mjs +6 -3
  86. package/resources/company-token-transactions.mjs.map +1 -1
  87. package/resources/course-chapters.d.mts +24 -19
  88. package/resources/course-chapters.d.mts.map +1 -1
  89. package/resources/course-chapters.d.ts +24 -19
  90. package/resources/course-chapters.d.ts.map +1 -1
  91. package/resources/course-chapters.js +5 -5
  92. package/resources/course-chapters.mjs +5 -5
  93. package/resources/course-lesson-interactions.d.mts +7 -6
  94. package/resources/course-lesson-interactions.d.mts.map +1 -1
  95. package/resources/course-lesson-interactions.d.ts +7 -6
  96. package/resources/course-lesson-interactions.d.ts.map +1 -1
  97. package/resources/course-lesson-interactions.js +3 -2
  98. package/resources/course-lesson-interactions.js.map +1 -1
  99. package/resources/course-lesson-interactions.mjs +3 -2
  100. package/resources/course-lesson-interactions.mjs.map +1 -1
  101. package/resources/course-lessons.d.mts +126 -84
  102. package/resources/course-lessons.d.mts.map +1 -1
  103. package/resources/course-lessons.d.ts +126 -84
  104. package/resources/course-lessons.d.ts.map +1 -1
  105. package/resources/course-lessons.js +12 -8
  106. package/resources/course-lessons.js.map +1 -1
  107. package/resources/course-lessons.mjs +12 -8
  108. package/resources/course-lessons.mjs.map +1 -1
  109. package/resources/course-students.d.mts +38 -29
  110. package/resources/course-students.d.mts.map +1 -1
  111. package/resources/course-students.d.ts +38 -29
  112. package/resources/course-students.d.ts.map +1 -1
  113. package/resources/course-students.js +3 -2
  114. package/resources/course-students.js.map +1 -1
  115. package/resources/course-students.mjs +3 -2
  116. package/resources/course-students.mjs.map +1 -1
  117. package/resources/courses.d.mts +132 -91
  118. package/resources/courses.d.mts.map +1 -1
  119. package/resources/courses.d.ts +132 -91
  120. package/resources/courses.d.ts.map +1 -1
  121. package/resources/courses.js +9 -5
  122. package/resources/courses.js.map +1 -1
  123. package/resources/courses.mjs +9 -5
  124. package/resources/courses.mjs.map +1 -1
  125. package/resources/dispute-alerts.d.mts +325 -0
  126. package/resources/dispute-alerts.d.mts.map +1 -0
  127. package/resources/dispute-alerts.d.ts +325 -0
  128. package/resources/dispute-alerts.d.ts.map +1 -0
  129. package/resources/dispute-alerts.js +42 -0
  130. package/resources/dispute-alerts.js.map +1 -0
  131. package/resources/dispute-alerts.mjs +38 -0
  132. package/resources/dispute-alerts.mjs.map +1 -0
  133. package/resources/disputes.d.mts +156 -102
  134. package/resources/disputes.d.mts.map +1 -1
  135. package/resources/disputes.d.ts +156 -102
  136. package/resources/disputes.d.ts.map +1 -1
  137. package/resources/disputes.js +4 -2
  138. package/resources/disputes.js.map +1 -1
  139. package/resources/disputes.mjs +4 -2
  140. package/resources/disputes.mjs.map +1 -1
  141. package/resources/dm-channels.d.mts +29 -16
  142. package/resources/dm-channels.d.mts.map +1 -1
  143. package/resources/dm-channels.d.ts +29 -16
  144. package/resources/dm-channels.d.ts.map +1 -1
  145. package/resources/dm-channels.js +9 -5
  146. package/resources/dm-channels.js.map +1 -1
  147. package/resources/dm-channels.mjs +9 -5
  148. package/resources/dm-channels.mjs.map +1 -1
  149. package/resources/dm-members.d.mts +30 -21
  150. package/resources/dm-members.d.mts.map +1 -1
  151. package/resources/dm-members.d.ts +30 -21
  152. package/resources/dm-members.d.ts.map +1 -1
  153. package/resources/dm-members.js +9 -5
  154. package/resources/dm-members.js.map +1 -1
  155. package/resources/dm-members.mjs +9 -5
  156. package/resources/dm-members.mjs.map +1 -1
  157. package/resources/entries.d.mts +29 -21
  158. package/resources/entries.d.mts.map +1 -1
  159. package/resources/entries.d.ts +29 -21
  160. package/resources/entries.d.ts.map +1 -1
  161. package/resources/entries.js +7 -4
  162. package/resources/entries.js.map +1 -1
  163. package/resources/entries.mjs +7 -4
  164. package/resources/entries.mjs.map +1 -1
  165. package/resources/experiences.d.mts +53 -49
  166. package/resources/experiences.d.mts.map +1 -1
  167. package/resources/experiences.d.ts +53 -49
  168. package/resources/experiences.d.ts.map +1 -1
  169. package/resources/experiences.js +6 -9
  170. package/resources/experiences.js.map +1 -1
  171. package/resources/experiences.mjs +6 -9
  172. package/resources/experiences.mjs.map +1 -1
  173. package/resources/fee-markups.d.mts +32 -21
  174. package/resources/fee-markups.d.mts.map +1 -1
  175. package/resources/fee-markups.d.ts +32 -21
  176. package/resources/fee-markups.d.ts.map +1 -1
  177. package/resources/fee-markups.js +6 -3
  178. package/resources/fee-markups.js.map +1 -1
  179. package/resources/fee-markups.mjs +6 -3
  180. package/resources/fee-markups.mjs.map +1 -1
  181. package/resources/files.d.mts +21 -17
  182. package/resources/files.d.mts.map +1 -1
  183. package/resources/files.d.ts +21 -17
  184. package/resources/files.d.ts.map +1 -1
  185. package/resources/files.js +3 -2
  186. package/resources/files.js.map +1 -1
  187. package/resources/files.mjs +3 -2
  188. package/resources/files.mjs.map +1 -1
  189. package/resources/forum-posts.d.mts +62 -43
  190. package/resources/forum-posts.d.mts.map +1 -1
  191. package/resources/forum-posts.d.ts +62 -43
  192. package/resources/forum-posts.d.ts.map +1 -1
  193. package/resources/forum-posts.js +8 -4
  194. package/resources/forum-posts.js.map +1 -1
  195. package/resources/forum-posts.mjs +8 -4
  196. package/resources/forum-posts.mjs.map +1 -1
  197. package/resources/forums.d.mts +20 -12
  198. package/resources/forums.d.mts.map +1 -1
  199. package/resources/forums.d.ts +20 -12
  200. package/resources/forums.d.ts.map +1 -1
  201. package/resources/forums.js +5 -3
  202. package/resources/forums.js.map +1 -1
  203. package/resources/forums.mjs +5 -3
  204. package/resources/forums.mjs.map +1 -1
  205. package/resources/index.d.mts +4 -3
  206. package/resources/index.d.mts.map +1 -1
  207. package/resources/index.d.ts +4 -3
  208. package/resources/index.d.ts.map +1 -1
  209. package/resources/index.js +3 -1
  210. package/resources/index.js.map +1 -1
  211. package/resources/index.mjs +1 -0
  212. package/resources/index.mjs.map +1 -1
  213. package/resources/invoices.d.mts +108 -80
  214. package/resources/invoices.d.mts.map +1 -1
  215. package/resources/invoices.d.ts +108 -80
  216. package/resources/invoices.d.ts.map +1 -1
  217. package/resources/invoices.js +7 -4
  218. package/resources/invoices.js.map +1 -1
  219. package/resources/invoices.mjs +7 -4
  220. package/resources/invoices.mjs.map +1 -1
  221. package/resources/leads.d.mts +64 -42
  222. package/resources/leads.d.mts.map +1 -1
  223. package/resources/leads.d.ts +64 -42
  224. package/resources/leads.d.ts.map +1 -1
  225. package/resources/leads.js +6 -4
  226. package/resources/leads.js.map +1 -1
  227. package/resources/leads.mjs +6 -4
  228. package/resources/leads.mjs.map +1 -1
  229. package/resources/ledger-accounts.d.mts +10 -8
  230. package/resources/ledger-accounts.d.mts.map +1 -1
  231. package/resources/ledger-accounts.d.ts +10 -8
  232. package/resources/ledger-accounts.d.ts.map +1 -1
  233. package/resources/ledger-accounts.js +1 -1
  234. package/resources/ledger-accounts.mjs +1 -1
  235. package/resources/members.d.mts +18 -19
  236. package/resources/members.d.mts.map +1 -1
  237. package/resources/members.d.ts +18 -19
  238. package/resources/members.d.ts.map +1 -1
  239. package/resources/members.js +3 -2
  240. package/resources/members.js.map +1 -1
  241. package/resources/members.mjs +3 -2
  242. package/resources/members.mjs.map +1 -1
  243. package/resources/memberships.d.mts +69 -51
  244. package/resources/memberships.d.mts.map +1 -1
  245. package/resources/memberships.d.ts +69 -51
  246. package/resources/memberships.d.ts.map +1 -1
  247. package/resources/memberships.js +12 -8
  248. package/resources/memberships.js.map +1 -1
  249. package/resources/memberships.mjs +12 -8
  250. package/resources/memberships.mjs.map +1 -1
  251. package/resources/messages.d.mts +50 -32
  252. package/resources/messages.d.mts.map +1 -1
  253. package/resources/messages.d.ts +50 -32
  254. package/resources/messages.d.ts.map +1 -1
  255. package/resources/messages.js +9 -5
  256. package/resources/messages.js.map +1 -1
  257. package/resources/messages.mjs +9 -5
  258. package/resources/messages.mjs.map +1 -1
  259. package/resources/notifications.d.mts +33 -25
  260. package/resources/notifications.d.mts.map +1 -1
  261. package/resources/notifications.d.ts +33 -25
  262. package/resources/notifications.d.ts.map +1 -1
  263. package/resources/notifications.js +2 -1
  264. package/resources/notifications.js.map +1 -1
  265. package/resources/notifications.mjs +2 -1
  266. package/resources/notifications.mjs.map +1 -1
  267. package/resources/payment-methods.d.mts +212 -114
  268. package/resources/payment-methods.d.mts.map +1 -1
  269. package/resources/payment-methods.d.ts +212 -114
  270. package/resources/payment-methods.d.ts.map +1 -1
  271. package/resources/payment-methods.js +5 -10
  272. package/resources/payment-methods.js.map +1 -1
  273. package/resources/payment-methods.mjs +5 -10
  274. package/resources/payment-methods.mjs.map +1 -1
  275. package/resources/payments.d.mts +73 -40
  276. package/resources/payments.d.mts.map +1 -1
  277. package/resources/payments.d.ts +73 -40
  278. package/resources/payments.d.ts.map +1 -1
  279. package/resources/payments.js +23 -10
  280. package/resources/payments.js.map +1 -1
  281. package/resources/payments.mjs +23 -10
  282. package/resources/payments.mjs.map +1 -1
  283. package/resources/payout-methods.d.mts +44 -29
  284. package/resources/payout-methods.d.mts.map +1 -1
  285. package/resources/payout-methods.d.ts +44 -29
  286. package/resources/payout-methods.d.ts.map +1 -1
  287. package/resources/payout-methods.js +3 -2
  288. package/resources/payout-methods.js.map +1 -1
  289. package/resources/payout-methods.mjs +3 -2
  290. package/resources/payout-methods.mjs.map +1 -1
  291. package/resources/plans.d.mts +121 -90
  292. package/resources/plans.d.mts.map +1 -1
  293. package/resources/plans.d.ts +121 -90
  294. package/resources/plans.d.ts.map +1 -1
  295. package/resources/plans.js +9 -5
  296. package/resources/plans.js.map +1 -1
  297. package/resources/plans.mjs +9 -5
  298. package/resources/plans.mjs.map +1 -1
  299. package/resources/products.d.mts +76 -65
  300. package/resources/products.d.mts.map +1 -1
  301. package/resources/products.d.ts +76 -65
  302. package/resources/products.d.ts.map +1 -1
  303. package/resources/products.js +7 -5
  304. package/resources/products.js.map +1 -1
  305. package/resources/products.mjs +7 -5
  306. package/resources/products.mjs.map +1 -1
  307. package/resources/promo-codes.d.mts +41 -31
  308. package/resources/promo-codes.d.mts.map +1 -1
  309. package/resources/promo-codes.d.ts +41 -31
  310. package/resources/promo-codes.d.ts.map +1 -1
  311. package/resources/promo-codes.js +7 -4
  312. package/resources/promo-codes.js.map +1 -1
  313. package/resources/promo-codes.mjs +7 -4
  314. package/resources/promo-codes.mjs.map +1 -1
  315. package/resources/reactions.d.mts +24 -18
  316. package/resources/reactions.d.mts.map +1 -1
  317. package/resources/reactions.d.ts +24 -18
  318. package/resources/reactions.d.ts.map +1 -1
  319. package/resources/reactions.js +7 -4
  320. package/resources/reactions.js.map +1 -1
  321. package/resources/reactions.mjs +7 -4
  322. package/resources/reactions.mjs.map +1 -1
  323. package/resources/refunds.d.mts +43 -29
  324. package/resources/refunds.d.mts.map +1 -1
  325. package/resources/refunds.d.ts +43 -29
  326. package/resources/refunds.d.ts.map +1 -1
  327. package/resources/refunds.js +3 -2
  328. package/resources/refunds.js.map +1 -1
  329. package/resources/refunds.mjs +3 -2
  330. package/resources/refunds.mjs.map +1 -1
  331. package/resources/reviews.d.mts +66 -50
  332. package/resources/reviews.d.mts.map +1 -1
  333. package/resources/reviews.d.ts +66 -50
  334. package/resources/reviews.d.ts.map +1 -1
  335. package/resources/reviews.js +3 -2
  336. package/resources/reviews.js.map +1 -1
  337. package/resources/reviews.mjs +3 -2
  338. package/resources/reviews.mjs.map +1 -1
  339. package/resources/setup-intents.d.mts +61 -43
  340. package/resources/setup-intents.d.mts.map +1 -1
  341. package/resources/setup-intents.d.ts +61 -43
  342. package/resources/setup-intents.d.ts.map +1 -1
  343. package/resources/setup-intents.js +4 -10
  344. package/resources/setup-intents.js.map +1 -1
  345. package/resources/setup-intents.mjs +4 -10
  346. package/resources/setup-intents.mjs.map +1 -1
  347. package/resources/shared.d.mts +696 -389
  348. package/resources/shared.d.mts.map +1 -1
  349. package/resources/shared.d.ts +696 -389
  350. package/resources/shared.d.ts.map +1 -1
  351. package/resources/shipments.d.mts +26 -17
  352. package/resources/shipments.d.mts.map +1 -1
  353. package/resources/shipments.d.ts +26 -17
  354. package/resources/shipments.d.ts.map +1 -1
  355. package/resources/shipments.js +5 -3
  356. package/resources/shipments.js.map +1 -1
  357. package/resources/shipments.mjs +5 -3
  358. package/resources/shipments.mjs.map +1 -1
  359. package/resources/support-channels.d.mts +31 -19
  360. package/resources/support-channels.d.mts.map +1 -1
  361. package/resources/support-channels.d.ts +31 -19
  362. package/resources/support-channels.d.ts.map +1 -1
  363. package/resources/support-channels.js +5 -4
  364. package/resources/support-channels.js.map +1 -1
  365. package/resources/support-channels.mjs +5 -4
  366. package/resources/support-channels.mjs.map +1 -1
  367. package/resources/topups.d.mts +11 -9
  368. package/resources/topups.d.mts.map +1 -1
  369. package/resources/topups.d.ts +11 -9
  370. package/resources/topups.d.ts.map +1 -1
  371. package/resources/topups.js +2 -1
  372. package/resources/topups.js.map +1 -1
  373. package/resources/topups.mjs +2 -1
  374. package/resources/topups.mjs.map +1 -1
  375. package/resources/transfers.d.mts +35 -29
  376. package/resources/transfers.d.mts.map +1 -1
  377. package/resources/transfers.d.ts +35 -29
  378. package/resources/transfers.d.ts.map +1 -1
  379. package/resources/transfers.js +5 -3
  380. package/resources/transfers.js.map +1 -1
  381. package/resources/transfers.mjs +5 -3
  382. package/resources/transfers.mjs.map +1 -1
  383. package/resources/users.d.mts +20 -16
  384. package/resources/users.d.mts.map +1 -1
  385. package/resources/users.d.ts +20 -16
  386. package/resources/users.d.ts.map +1 -1
  387. package/resources/users.js +4 -3
  388. package/resources/users.js.map +1 -1
  389. package/resources/users.mjs +4 -3
  390. package/resources/users.mjs.map +1 -1
  391. package/resources/verifications.d.mts +6 -4
  392. package/resources/verifications.d.mts.map +1 -1
  393. package/resources/verifications.d.ts +6 -4
  394. package/resources/verifications.d.ts.map +1 -1
  395. package/resources/verifications.js +1 -1
  396. package/resources/verifications.mjs +1 -1
  397. package/resources/webhooks.d.mts +360 -98
  398. package/resources/webhooks.d.mts.map +1 -1
  399. package/resources/webhooks.d.ts +360 -98
  400. package/resources/webhooks.d.ts.map +1 -1
  401. package/resources/webhooks.js +3 -2
  402. package/resources/webhooks.js.map +1 -1
  403. package/resources/webhooks.mjs +3 -2
  404. package/resources/webhooks.mjs.map +1 -1
  405. package/resources/withdrawals.d.mts +53 -44
  406. package/resources/withdrawals.d.mts.map +1 -1
  407. package/resources/withdrawals.d.ts +53 -44
  408. package/resources/withdrawals.d.ts.map +1 -1
  409. package/resources/withdrawals.js +3 -2
  410. package/resources/withdrawals.js.map +1 -1
  411. package/resources/withdrawals.mjs +3 -2
  412. package/resources/withdrawals.mjs.map +1 -1
  413. package/src/client.ts +34 -3
  414. package/src/resources/access-tokens.ts +19 -20
  415. package/src/resources/account-links.ts +15 -13
  416. package/src/resources/ai-chats.ts +39 -26
  417. package/src/resources/app-builds.ts +35 -33
  418. package/src/resources/apps.ts +84 -56
  419. package/src/resources/authorized-users.ts +32 -26
  420. package/src/resources/chat-channels.ts +27 -19
  421. package/src/resources/checkout-configurations.ts +56 -46
  422. package/src/resources/companies.ts +75 -46
  423. package/src/resources/company-token-transactions.ts +81 -58
  424. package/src/resources/course-chapters.ts +24 -19
  425. package/src/resources/course-lesson-interactions.ts +7 -6
  426. package/src/resources/course-lessons.ts +126 -84
  427. package/src/resources/course-students.ts +38 -29
  428. package/src/resources/courses.ts +132 -91
  429. package/src/resources/dispute-alerts.ts +404 -0
  430. package/src/resources/disputes.ts +156 -102
  431. package/src/resources/dm-channels.ts +29 -16
  432. package/src/resources/dm-members.ts +30 -21
  433. package/src/resources/entries.ts +29 -21
  434. package/src/resources/experiences.ts +53 -49
  435. package/src/resources/fee-markups.ts +32 -21
  436. package/src/resources/files.ts +21 -17
  437. package/src/resources/forum-posts.ts +63 -43
  438. package/src/resources/forums.ts +20 -12
  439. package/src/resources/index.ts +11 -1
  440. package/src/resources/invoices.ts +112 -80
  441. package/src/resources/leads.ts +64 -42
  442. package/src/resources/ledger-accounts.ts +10 -8
  443. package/src/resources/members.ts +18 -19
  444. package/src/resources/memberships.ts +69 -51
  445. package/src/resources/messages.ts +51 -32
  446. package/src/resources/notifications.ts +33 -25
  447. package/src/resources/payment-methods.ts +212 -114
  448. package/src/resources/payments.ts +78 -39
  449. package/src/resources/payout-methods.ts +44 -29
  450. package/src/resources/plans.ts +121 -90
  451. package/src/resources/products.ts +219 -68
  452. package/src/resources/promo-codes.ts +41 -31
  453. package/src/resources/reactions.ts +24 -18
  454. package/src/resources/refunds.ts +45 -29
  455. package/src/resources/reviews.ts +66 -50
  456. package/src/resources/setup-intents.ts +61 -43
  457. package/src/resources/shared.ts +2649 -388
  458. package/src/resources/shipments.ts +26 -17
  459. package/src/resources/support-channels.ts +32 -19
  460. package/src/resources/topups.ts +11 -9
  461. package/src/resources/transfers.ts +35 -29
  462. package/src/resources/users.ts +20 -16
  463. package/src/resources/verifications.ts +6 -4
  464. package/src/resources/webhooks.ts +404 -95
  465. package/src/resources/withdrawals.ts +53 -43
  466. package/src/version.ts +1 -1
  467. package/version.d.mts +1 -1
  468. package/version.d.ts +1 -1
  469. package/version.js +1 -1
  470. package/version.mjs +1 -1
@@ -1,4 +1,5 @@
1
1
  import { APIResource } from "../core/resource.mjs";
2
+ import * as DisputeAlertsAPI from "./dispute-alerts.mjs";
2
3
  import * as DisputesAPI from "./disputes.mjs";
3
4
  import * as PaymentsAPI from "./payments.mjs";
4
5
  import * as PayoutMethodsAPI from "./payout-methods.mjs";
@@ -27,7 +28,7 @@ export declare class Webhooks extends APIResource {
27
28
  */
28
29
  create(body: WebhookCreateParams, options?: RequestOptions): APIPromise<WebhookCreateResponse>;
29
30
  /**
30
- * Retrieves a webhook by ID
31
+ * Retrieves the details of an existing webhook.
31
32
  *
32
33
  * Required permissions:
33
34
  *
@@ -57,7 +58,8 @@ export declare class Webhooks extends APIResource {
57
58
  */
58
59
  update(id: string, body?: WebhookUpdateParams | null | undefined, options?: RequestOptions): APIPromise<Webhook>;
59
60
  /**
60
- * Lists webhooks for a company
61
+ * Returns a paginated list of webhook endpoints configured for a company, ordered
62
+ * by most recently created.
61
63
  *
62
64
  * Required permissions:
63
65
  *
@@ -109,13 +111,13 @@ export interface Webhook {
109
111
  */
110
112
  id: string;
111
113
  /**
112
- * The API version for this webhook
114
+ * The API version used to format payloads sent to this webhook endpoint.
113
115
  */
114
116
  api_version: APIVersion;
115
117
  /**
116
- * Whether or not to send events for child resources. For example, if the webhook
117
- * is created for a Company, enabling this will only send events from the Company's
118
- * sub-merchants (child companies).
118
+ * Whether events are sent for child resources. For example, if the webhook is on a
119
+ * company, enabling this sends events only from the company's sub-merchants (child
120
+ * companies).
119
121
  */
120
122
  child_resource_events: boolean;
121
123
  /**
@@ -123,30 +125,30 @@ export interface Webhook {
123
125
  */
124
126
  created_at: string;
125
127
  /**
126
- * Whether or not this webhook is turned on or not
128
+ * Whether this webhook endpoint is currently active and receiving events.
127
129
  */
128
130
  enabled: boolean;
129
131
  /**
130
- * The number of events this webhooks is configured to receive
132
+ * The list of event types this webhook is subscribed to.
131
133
  */
132
134
  events: Array<WebhookEvent>;
133
135
  /**
134
- * The resource ID
136
+ * The ID of the resource (company or product) this webhook is attached to.
135
137
  */
136
138
  resource_id: string;
137
139
  /**
138
- * The list of events that can be tested with this webhook
140
+ * The subset of subscribed event types that support sending test payloads.
139
141
  */
140
142
  testable_events: Array<WebhookEvent>;
141
143
  /**
142
- * The URL the webhook events will be sent to
144
+ * The destination URL where webhook payloads are delivered via HTTP POST.
143
145
  */
144
146
  url: string;
145
147
  }
146
148
  /**
147
149
  * The different event types available
148
150
  */
149
- export type WebhookEvent = 'invoice.created' | 'invoice.paid' | 'invoice.past_due' | 'invoice.voided' | 'membership.activated' | 'membership.deactivated' | 'entry.created' | 'entry.approved' | 'entry.denied' | 'entry.deleted' | 'setup_intent.requires_action' | 'setup_intent.succeeded' | 'setup_intent.canceled' | 'withdrawal.created' | 'withdrawal.updated' | 'course_lesson_interaction.completed' | 'payout_method.created' | 'verification.succeeded' | 'payment.created' | 'payment.succeeded' | 'payment.failed' | 'payment.pending' | 'dispute.created' | 'dispute.updated' | 'refund.created' | 'refund.updated' | 'membership.cancel_at_period_end_changed';
151
+ export type WebhookEvent = 'invoice.created' | 'invoice.paid' | 'invoice.past_due' | 'invoice.voided' | 'membership.activated' | 'membership.deactivated' | 'entry.created' | 'entry.approved' | 'entry.denied' | 'entry.deleted' | 'setup_intent.requires_action' | 'setup_intent.succeeded' | 'setup_intent.canceled' | 'withdrawal.created' | 'withdrawal.updated' | 'course_lesson_interaction.completed' | 'payout_method.created' | 'verification.succeeded' | 'payment.created' | 'payment.succeeded' | 'payment.failed' | 'payment.pending' | 'dispute.created' | 'dispute.updated' | 'refund.created' | 'refund.updated' | 'dispute_alert.created' | 'membership.cancel_at_period_end_changed';
150
152
  /**
151
153
  * A webhook endpoint that receives event notifications for a company via HTTP
152
154
  * POST.
@@ -157,13 +159,13 @@ export interface WebhookCreateResponse {
157
159
  */
158
160
  id: string;
159
161
  /**
160
- * The API version for this webhook
162
+ * The API version used to format payloads sent to this webhook endpoint.
161
163
  */
162
164
  api_version: APIVersion;
163
165
  /**
164
- * Whether or not to send events for child resources. For example, if the webhook
165
- * is created for a Company, enabling this will only send events from the Company's
166
- * sub-merchants (child companies).
166
+ * Whether events are sent for child resources. For example, if the webhook is on a
167
+ * company, enabling this sends events only from the company's sub-merchants (child
168
+ * companies).
167
169
  */
168
170
  child_resource_events: boolean;
169
171
  /**
@@ -171,27 +173,28 @@ export interface WebhookCreateResponse {
171
173
  */
172
174
  created_at: string;
173
175
  /**
174
- * Whether or not this webhook is turned on or not
176
+ * Whether this webhook endpoint is currently active and receiving events.
175
177
  */
176
178
  enabled: boolean;
177
179
  /**
178
- * The number of events this webhooks is configured to receive
180
+ * The list of event types this webhook is subscribed to.
179
181
  */
180
182
  events: Array<WebhookEvent>;
181
183
  /**
182
- * The resource ID
184
+ * The ID of the resource (company or product) this webhook is attached to.
183
185
  */
184
186
  resource_id: string;
185
187
  /**
186
- * The list of events that can be tested with this webhook
188
+ * The subset of subscribed event types that support sending test payloads.
187
189
  */
188
190
  testable_events: Array<WebhookEvent>;
189
191
  /**
190
- * The URL the webhook events will be sent to
192
+ * The destination URL where webhook payloads are delivered via HTTP POST.
191
193
  */
192
194
  url: string;
193
195
  /**
194
- * A unique secret key that will be sent with each webhook event
196
+ * The secret key used to sign webhook payloads for verification. Include this in
197
+ * your HMAC validation logic.
195
198
  */
196
199
  webhook_secret: string;
197
200
  }
@@ -205,13 +208,13 @@ export interface WebhookListResponse {
205
208
  */
206
209
  id: string;
207
210
  /**
208
- * The API version for this webhook
211
+ * The API version used to format payloads sent to this webhook endpoint.
209
212
  */
210
213
  api_version: APIVersion;
211
214
  /**
212
- * Whether or not to send events for child resources. For example, if the webhook
213
- * is created for a Company, enabling this will only send events from the Company's
214
- * sub-merchants (child companies).
215
+ * Whether events are sent for child resources. For example, if the webhook is on a
216
+ * company, enabling this sends events only from the company's sub-merchants (child
217
+ * companies).
215
218
  */
216
219
  child_resource_events: boolean;
217
220
  /**
@@ -219,15 +222,15 @@ export interface WebhookListResponse {
219
222
  */
220
223
  created_at: string;
221
224
  /**
222
- * Whether or not this webhook is turned on or not
225
+ * Whether this webhook endpoint is currently active and receiving events.
223
226
  */
224
227
  enabled: boolean;
225
228
  /**
226
- * The number of events this webhooks is configured to receive
229
+ * The list of event types this webhook is subscribed to.
227
230
  */
228
231
  events: Array<WebhookEvent>;
229
232
  /**
230
- * The URL the webhook events will be sent to
233
+ * The destination URL where webhook payloads are delivered via HTTP POST.
231
234
  */
232
235
  url: string;
233
236
  }
@@ -245,7 +248,9 @@ export interface InvoiceCreatedWebhookEvent {
245
248
  */
246
249
  api_version: 'v1';
247
250
  /**
248
- * A statement that defines an amount due by a customer.
251
+ * An invoice represents an itemized bill sent by a company to a customer for a
252
+ * specific product and plan, tracking the amount owed, due date, and payment
253
+ * status.
249
254
  */
250
255
  data: Shared.Invoice;
251
256
  /**
@@ -271,7 +276,9 @@ export interface InvoicePaidWebhookEvent {
271
276
  */
272
277
  api_version: 'v1';
273
278
  /**
274
- * A statement that defines an amount due by a customer.
279
+ * An invoice represents an itemized bill sent by a company to a customer for a
280
+ * specific product and plan, tracking the amount owed, due date, and payment
281
+ * status.
275
282
  */
276
283
  data: Shared.Invoice;
277
284
  /**
@@ -297,7 +304,9 @@ export interface InvoicePastDueWebhookEvent {
297
304
  */
298
305
  api_version: 'v1';
299
306
  /**
300
- * A statement that defines an amount due by a customer.
307
+ * An invoice represents an itemized bill sent by a company to a customer for a
308
+ * specific product and plan, tracking the amount owed, due date, and payment
309
+ * status.
301
310
  */
302
311
  data: Shared.Invoice;
303
312
  /**
@@ -323,7 +332,9 @@ export interface InvoiceVoidedWebhookEvent {
323
332
  */
324
333
  api_version: 'v1';
325
334
  /**
326
- * A statement that defines an amount due by a customer.
335
+ * An invoice represents an itemized bill sent by a company to a customer for a
336
+ * specific product and plan, tracking the amount owed, due date, and payment
337
+ * status.
327
338
  */
328
339
  data: Shared.Invoice;
329
340
  /**
@@ -507,7 +518,8 @@ export interface SetupIntentRequiresActionWebhookEvent {
507
518
  */
508
519
  api_version: 'v1';
509
520
  /**
510
- * A setup intent allows a user to save a payment method without making a purchase.
521
+ * A setup intent allows a user to save a payment method for future use without
522
+ * making an immediate purchase.
511
523
  */
512
524
  data: SetupIntentsAPI.SetupIntent;
513
525
  /**
@@ -533,7 +545,8 @@ export interface SetupIntentSucceededWebhookEvent {
533
545
  */
534
546
  api_version: 'v1';
535
547
  /**
536
- * A setup intent allows a user to save a payment method without making a purchase.
548
+ * A setup intent allows a user to save a payment method for future use without
549
+ * making an immediate purchase.
537
550
  */
538
551
  data: SetupIntentsAPI.SetupIntent;
539
552
  /**
@@ -559,7 +572,8 @@ export interface SetupIntentCanceledWebhookEvent {
559
572
  */
560
573
  api_version: 'v1';
561
574
  /**
562
- * A setup intent allows a user to save a payment method without making a purchase.
575
+ * A setup intent allows a user to save a payment method for future use without
576
+ * making an immediate purchase.
563
577
  */
564
578
  data: SetupIntentsAPI.SetupIntent;
565
579
  /**
@@ -585,8 +599,8 @@ export interface WithdrawalCreatedWebhookEvent {
585
599
  */
586
600
  api_version: 'v1';
587
601
  /**
588
- * A withdrawal represents a request to transfer funds from a company's ledger
589
- * account to an external payout method.
602
+ * A withdrawal represents a request to transfer funds from a ledger account to an
603
+ * external payout method.
590
604
  */
591
605
  data: WithdrawalsAPI.Withdrawal;
592
606
  /**
@@ -612,8 +626,8 @@ export interface WithdrawalUpdatedWebhookEvent {
612
626
  */
613
627
  api_version: 'v1';
614
628
  /**
615
- * A withdrawal represents a request to transfer funds from a company's ledger
616
- * account to an external payout method.
629
+ * A withdrawal represents a request to transfer funds from a ledger account to an
630
+ * external payout method.
617
631
  */
618
632
  data: WithdrawalsAPI.Withdrawal;
619
633
  /**
@@ -639,7 +653,8 @@ export interface CourseLessonInteractionCompletedWebhookEvent {
639
653
  */
640
654
  api_version: 'v1';
641
655
  /**
642
- * A lesson interaction tracking user progress in courses
656
+ * A record of a user's progress on a specific lesson, tracking whether they have
657
+ * completed it.
643
658
  */
644
659
  data: Shared.CourseLessonInteraction;
645
660
  /**
@@ -665,7 +680,8 @@ export interface PayoutMethodCreatedWebhookEvent {
665
680
  */
666
681
  api_version: 'v1';
667
682
  /**
668
- * An object representing an user's setup payout destination.
683
+ * A configured payout destination where a user receives earned funds, such as a
684
+ * bank account or digital wallet.
669
685
  */
670
686
  data: PayoutMethodCreatedWebhookEvent.Data;
671
687
  /**
@@ -683,7 +699,8 @@ export interface PayoutMethodCreatedWebhookEvent {
683
699
  }
684
700
  export declare namespace PayoutMethodCreatedWebhookEvent {
685
701
  /**
686
- * An object representing an user's setup payout destination.
702
+ * A configured payout destination where a user receives earned funds, such as a
703
+ * bank account or digital wallet.
687
704
  */
688
705
  interface Data {
689
706
  /**
@@ -691,12 +708,13 @@ export declare namespace PayoutMethodCreatedWebhookEvent {
691
708
  */
692
709
  id: string;
693
710
  /**
694
- * A reference to identify the payout destination, such as the last 4 digits of an
695
- * account number or an email address.
711
+ * A masked identifier for the payout destination, such as the last four digits of
712
+ * a bank account or an email address. Null if no reference is available.
696
713
  */
697
714
  account_reference: string | null;
698
715
  /**
699
- * The company associated with the payout token
716
+ * The company associated with this payout destination. Null if not linked to a
717
+ * specific company.
700
718
  */
701
719
  company: Data.Company | null;
702
720
  /**
@@ -704,31 +722,35 @@ export declare namespace PayoutMethodCreatedWebhookEvent {
704
722
  */
705
723
  created_at: string;
706
724
  /**
707
- * The currency code of the payout destination. This is the currency that payouts
708
- * will be made in for this token.
725
+ * The three-letter ISO currency code that payouts are delivered in for this
726
+ * destination.
709
727
  */
710
728
  currency: string;
711
729
  /**
712
- * The payout destination associated with the payout token
730
+ * The payout destination configuration linked to this token. Null if not yet
731
+ * configured.
713
732
  */
714
733
  destination: Data.Destination | null;
715
734
  /**
716
- * The name of the bank or financial institution.
735
+ * The name of the bank or financial institution receiving payouts. Null if not
736
+ * applicable or not provided.
717
737
  */
718
738
  institution_name: string | null;
719
739
  /**
720
- * Whether this payout token is the default for the payout account
740
+ * Whether this is the default payout destination for the associated payout
741
+ * account.
721
742
  */
722
743
  is_default: boolean;
723
744
  /**
724
- * An optional nickname for the payout token to help the user identify it. This is
725
- * not used by the provider and is only for the user's reference.
745
+ * A user-defined label to help identify this payout destination. Not sent to the
746
+ * provider. Null if no nickname has been set.
726
747
  */
727
748
  nickname: string | null;
728
749
  }
729
750
  namespace Data {
730
751
  /**
731
- * The company associated with the payout token
752
+ * The company associated with this payout destination. Null if not linked to a
753
+ * specific company.
732
754
  */
733
755
  interface Company {
734
756
  /**
@@ -737,7 +759,8 @@ export declare namespace PayoutMethodCreatedWebhookEvent {
737
759
  id: string;
738
760
  }
739
761
  /**
740
- * The payout destination associated with the payout token
762
+ * The payout destination configuration linked to this token. Null if not yet
763
+ * configured.
741
764
  */
742
765
  interface Destination {
743
766
  /**
@@ -765,7 +788,8 @@ export interface VerificationSucceededWebhookEvent {
765
788
  */
766
789
  api_version: 'v1';
767
790
  /**
768
- * An object representing an identity verification session
791
+ * An identity verification session used to confirm a person or entity's identity
792
+ * for payout account eligibility.
769
793
  */
770
794
  data: VerificationSucceededWebhookEvent.Data;
771
795
  /**
@@ -783,7 +807,8 @@ export interface VerificationSucceededWebhookEvent {
783
807
  }
784
808
  export declare namespace VerificationSucceededWebhookEvent {
785
809
  /**
786
- * An object representing an identity verification session
810
+ * An identity verification session used to confirm a person or entity's identity
811
+ * for payout account eligibility.
787
812
  */
788
813
  interface Data {
789
814
  /**
@@ -795,11 +820,12 @@ export declare namespace VerificationSucceededWebhookEvent {
795
820
  */
796
821
  last_error_code: VerificationsAPI.VerificationErrorCode | null;
797
822
  /**
798
- * The last error reason that occurred during the verification.
823
+ * A human-readable explanation of the most recent verification error. Null if no
824
+ * error has occurred.
799
825
  */
800
826
  last_error_reason: string | null;
801
827
  /**
802
- * The status of the verification.
828
+ * The current status of this verification session.
803
829
  */
804
830
  status: VerificationsAPI.VerificationStatus;
805
831
  }
@@ -814,8 +840,8 @@ export interface PaymentCreatedWebhookEvent {
814
840
  */
815
841
  api_version: 'v1';
816
842
  /**
817
- * A payment represents a completed or attempted charge for a membership. Payments
818
- * track the amount, status, currency, and payment method used.
843
+ * A payment represents a completed or attempted charge. Payments track the amount,
844
+ * status, currency, and payment method used.
819
845
  */
820
846
  data: Shared.Payment;
821
847
  /**
@@ -841,8 +867,8 @@ export interface PaymentSucceededWebhookEvent {
841
867
  */
842
868
  api_version: 'v1';
843
869
  /**
844
- * A payment represents a completed or attempted charge for a membership. Payments
845
- * track the amount, status, currency, and payment method used.
870
+ * A payment represents a completed or attempted charge. Payments track the amount,
871
+ * status, currency, and payment method used.
846
872
  */
847
873
  data: Shared.Payment;
848
874
  /**
@@ -868,8 +894,8 @@ export interface PaymentFailedWebhookEvent {
868
894
  */
869
895
  api_version: 'v1';
870
896
  /**
871
- * A payment represents a completed or attempted charge for a membership. Payments
872
- * track the amount, status, currency, and payment method used.
897
+ * A payment represents a completed or attempted charge. Payments track the amount,
898
+ * status, currency, and payment method used.
873
899
  */
874
900
  data: Shared.Payment;
875
901
  /**
@@ -895,8 +921,8 @@ export interface PaymentPendingWebhookEvent {
895
921
  */
896
922
  api_version: 'v1';
897
923
  /**
898
- * A payment represents a completed or attempted charge for a membership. Payments
899
- * track the amount, status, currency, and payment method used.
924
+ * A payment represents a completed or attempted charge. Payments track the amount,
925
+ * status, currency, and payment method used.
900
926
  */
901
927
  data: Shared.Payment;
902
928
  /**
@@ -1004,8 +1030,8 @@ export declare namespace RefundCreatedWebhookEvent {
1004
1030
  */
1005
1031
  id: string;
1006
1032
  /**
1007
- * The amount of the refund. Provided as a number in the specified currency. Eg:
1008
- * 10.43 for $10.43 USD.
1033
+ * The refunded amount as a decimal in the specified currency, such as 10.43 for
1034
+ * $10.43 USD.
1009
1035
  */
1010
1036
  amount: number;
1011
1037
  /**
@@ -1013,19 +1039,21 @@ export declare namespace RefundCreatedWebhookEvent {
1013
1039
  */
1014
1040
  created_at: string;
1015
1041
  /**
1016
- * The currency of the refund.
1042
+ * The three-letter ISO currency code for the refunded amount.
1017
1043
  */
1018
1044
  currency: Shared.Currency;
1019
1045
  /**
1020
- * The payment associated with the refund.
1046
+ * The original payment that this refund was issued against. Null if the payment is
1047
+ * no longer available.
1021
1048
  */
1022
1049
  payment: Data.Payment | null;
1023
1050
  /**
1024
- * The provider of the refund.
1051
+ * The payment provider that processed the refund.
1025
1052
  */
1026
1053
  provider: RefundsAPI.PaymentProvider;
1027
1054
  /**
1028
- * The time the refund was created by the provider.
1055
+ * The timestamp when the refund was created in the payment provider's system. Null
1056
+ * if not available from the provider.
1029
1057
  */
1030
1058
  provider_created_at: string | null;
1031
1059
  /**
@@ -1037,17 +1065,20 @@ export declare namespace RefundCreatedWebhookEvent {
1037
1065
  */
1038
1066
  reference_type: RefundsAPI.RefundReferenceType | null;
1039
1067
  /**
1040
- * The value of the reference.
1068
+ * The tracking reference value from the payment processor, used to trace the
1069
+ * refund through banking networks. Null if no reference was provided.
1041
1070
  */
1042
1071
  reference_value: string | null;
1043
1072
  /**
1044
- * The status of the refund.
1073
+ * The current processing status of the refund, such as pending, succeeded, or
1074
+ * failed.
1045
1075
  */
1046
1076
  status: RefundsAPI.RefundStatus;
1047
1077
  }
1048
1078
  namespace Data {
1049
1079
  /**
1050
- * The payment associated with the refund.
1080
+ * The original payment that this refund was issued against. Null if the payment is
1081
+ * no longer available.
1051
1082
  */
1052
1083
  interface Payment {
1053
1084
  /**
@@ -1063,7 +1094,8 @@ export declare namespace RefundCreatedWebhookEvent {
1063
1094
  */
1064
1095
  card_brand: PaymentsAPI.CardBrands | null;
1065
1096
  /**
1066
- * The last 4 digits of the card used to make the payment.
1097
+ * The last four digits of the card used to make this payment. Null if the payment
1098
+ * was not made with a card.
1067
1099
  */
1068
1100
  card_last4: string | null;
1069
1101
  /**
@@ -1087,7 +1119,8 @@ export declare namespace RefundCreatedWebhookEvent {
1087
1119
  */
1088
1120
  membership: Payment.Membership | null;
1089
1121
  /**
1090
- * The datetime the payment was paid
1122
+ * The time at which this payment was successfully collected. Null if the payment
1123
+ * has not yet succeeded. As a Unix timestamp.
1091
1124
  */
1092
1125
  paid_at: string | null;
1093
1126
  /**
@@ -1147,15 +1180,16 @@ export declare namespace RefundCreatedWebhookEvent {
1147
1180
  */
1148
1181
  id: string;
1149
1182
  /**
1150
- * The email of the user
1183
+ * The user's email address. Requires the member:email:read permission to access.
1184
+ * Null if not authorized.
1151
1185
  */
1152
1186
  email: string | null;
1153
1187
  /**
1154
- * The name of the user from their Whop account.
1188
+ * The user's display name shown on their public profile.
1155
1189
  */
1156
1190
  name: string | null;
1157
1191
  /**
1158
- * The username of the user from their Whop account.
1192
+ * The user's unique username shown on their public profile.
1159
1193
  */
1160
1194
  username: string;
1161
1195
  }
@@ -1200,8 +1234,8 @@ export declare namespace RefundUpdatedWebhookEvent {
1200
1234
  */
1201
1235
  id: string;
1202
1236
  /**
1203
- * The amount of the refund. Provided as a number in the specified currency. Eg:
1204
- * 10.43 for $10.43 USD.
1237
+ * The refunded amount as a decimal in the specified currency, such as 10.43 for
1238
+ * $10.43 USD.
1205
1239
  */
1206
1240
  amount: number;
1207
1241
  /**
@@ -1209,19 +1243,21 @@ export declare namespace RefundUpdatedWebhookEvent {
1209
1243
  */
1210
1244
  created_at: string;
1211
1245
  /**
1212
- * The currency of the refund.
1246
+ * The three-letter ISO currency code for the refunded amount.
1213
1247
  */
1214
1248
  currency: Shared.Currency;
1215
1249
  /**
1216
- * The payment associated with the refund.
1250
+ * The original payment that this refund was issued against. Null if the payment is
1251
+ * no longer available.
1217
1252
  */
1218
1253
  payment: Data.Payment | null;
1219
1254
  /**
1220
- * The provider of the refund.
1255
+ * The payment provider that processed the refund.
1221
1256
  */
1222
1257
  provider: RefundsAPI.PaymentProvider;
1223
1258
  /**
1224
- * The time the refund was created by the provider.
1259
+ * The timestamp when the refund was created in the payment provider's system. Null
1260
+ * if not available from the provider.
1225
1261
  */
1226
1262
  provider_created_at: string | null;
1227
1263
  /**
@@ -1233,17 +1269,240 @@ export declare namespace RefundUpdatedWebhookEvent {
1233
1269
  */
1234
1270
  reference_type: RefundsAPI.RefundReferenceType | null;
1235
1271
  /**
1236
- * The value of the reference.
1272
+ * The tracking reference value from the payment processor, used to trace the
1273
+ * refund through banking networks. Null if no reference was provided.
1237
1274
  */
1238
1275
  reference_value: string | null;
1239
1276
  /**
1240
- * The status of the refund.
1277
+ * The current processing status of the refund, such as pending, succeeded, or
1278
+ * failed.
1241
1279
  */
1242
1280
  status: RefundsAPI.RefundStatus;
1243
1281
  }
1244
1282
  namespace Data {
1245
1283
  /**
1246
- * The payment associated with the refund.
1284
+ * The original payment that this refund was issued against. Null if the payment is
1285
+ * no longer available.
1286
+ */
1287
+ interface Payment {
1288
+ /**
1289
+ * The unique identifier for the payment.
1290
+ */
1291
+ id: string;
1292
+ /**
1293
+ * The reason why a specific payment was billed
1294
+ */
1295
+ billing_reason: PaymentsAPI.BillingReasons | null;
1296
+ /**
1297
+ * Possible card brands that a payment token can have
1298
+ */
1299
+ card_brand: PaymentsAPI.CardBrands | null;
1300
+ /**
1301
+ * The last four digits of the card used to make this payment. Null if the payment
1302
+ * was not made with a card.
1303
+ */
1304
+ card_last4: string | null;
1305
+ /**
1306
+ * The datetime the payment was created.
1307
+ */
1308
+ created_at: string;
1309
+ /**
1310
+ * The available currencies on the platform
1311
+ */
1312
+ currency: Shared.Currency | null;
1313
+ /**
1314
+ * When an alert came in that this transaction will be disputed
1315
+ */
1316
+ dispute_alerted_at: string | null;
1317
+ /**
1318
+ * The member attached to this payment.
1319
+ */
1320
+ member: Payment.Member | null;
1321
+ /**
1322
+ * The membership attached to this payment.
1323
+ */
1324
+ membership: Payment.Membership | null;
1325
+ /**
1326
+ * The time at which this payment was successfully collected. Null if the payment
1327
+ * has not yet succeeded. As a Unix timestamp.
1328
+ */
1329
+ paid_at: string | null;
1330
+ /**
1331
+ * The different types of payment methods that can be used.
1332
+ */
1333
+ payment_method_type: PaymentsAPI.PaymentMethodTypes | null;
1334
+ /**
1335
+ * The subtotal to show to the creator (excluding buyer fees).
1336
+ */
1337
+ subtotal: number | null;
1338
+ /**
1339
+ * The total to show to the creator (excluding buyer fees).
1340
+ */
1341
+ total: number | null;
1342
+ /**
1343
+ * The total in USD to show to the creator (excluding buyer fees).
1344
+ */
1345
+ usd_total: number | null;
1346
+ /**
1347
+ * The user that made this payment.
1348
+ */
1349
+ user: Payment.User | null;
1350
+ }
1351
+ namespace Payment {
1352
+ /**
1353
+ * The member attached to this payment.
1354
+ */
1355
+ interface Member {
1356
+ /**
1357
+ * The unique identifier for the company member.
1358
+ */
1359
+ id: string;
1360
+ /**
1361
+ * The phone number for the member, if available.
1362
+ */
1363
+ phone: string | null;
1364
+ }
1365
+ /**
1366
+ * The membership attached to this payment.
1367
+ */
1368
+ interface Membership {
1369
+ /**
1370
+ * The unique identifier for the membership.
1371
+ */
1372
+ id: string;
1373
+ /**
1374
+ * The state of the membership.
1375
+ */
1376
+ status: Shared.MembershipStatus;
1377
+ }
1378
+ /**
1379
+ * The user that made this payment.
1380
+ */
1381
+ interface User {
1382
+ /**
1383
+ * The unique identifier for the user.
1384
+ */
1385
+ id: string;
1386
+ /**
1387
+ * The user's email address. Requires the member:email:read permission to access.
1388
+ * Null if not authorized.
1389
+ */
1390
+ email: string | null;
1391
+ /**
1392
+ * The user's display name shown on their public profile.
1393
+ */
1394
+ name: string | null;
1395
+ /**
1396
+ * The user's unique username shown on their public profile.
1397
+ */
1398
+ username: string;
1399
+ }
1400
+ }
1401
+ }
1402
+ }
1403
+ export interface DisputeAlertCreatedWebhookEvent {
1404
+ /**
1405
+ * A unique ID for every single webhook request
1406
+ */
1407
+ id: string;
1408
+ /**
1409
+ * The API version for this webhook
1410
+ */
1411
+ api_version: 'v1';
1412
+ /**
1413
+ * A dispute alert represents an early warning notification from a payment
1414
+ * processor about a potential dispute or chargeback.
1415
+ */
1416
+ data: DisputeAlertCreatedWebhookEvent.Data;
1417
+ /**
1418
+ * The timestamp in ISO 8601 format that the webhook was sent at on the server
1419
+ */
1420
+ timestamp: string;
1421
+ /**
1422
+ * The webhook event type
1423
+ */
1424
+ type: 'dispute_alert.created';
1425
+ /**
1426
+ * The company ID that this webhook event is associated with
1427
+ */
1428
+ company_id?: string | null;
1429
+ }
1430
+ export declare namespace DisputeAlertCreatedWebhookEvent {
1431
+ /**
1432
+ * A dispute alert represents an early warning notification from a payment
1433
+ * processor about a potential dispute or chargeback.
1434
+ */
1435
+ interface Data {
1436
+ /**
1437
+ * The unique identifier of the dispute alert.
1438
+ */
1439
+ id: string;
1440
+ /**
1441
+ * The type of the dispute alert.
1442
+ */
1443
+ alert_type: DisputeAlertsAPI.DisputeAlertType;
1444
+ /**
1445
+ * The alerted amount in the specified currency.
1446
+ */
1447
+ amount: number;
1448
+ /**
1449
+ * Whether this alert incurs a charge.
1450
+ */
1451
+ charge_for_alert: boolean;
1452
+ /**
1453
+ * The time the dispute alert was created.
1454
+ */
1455
+ created_at: string;
1456
+ /**
1457
+ * The three-letter ISO currency code for the alerted amount.
1458
+ */
1459
+ currency: Shared.Currency;
1460
+ /**
1461
+ * The dispute associated with the dispute alert.
1462
+ */
1463
+ dispute: Data.Dispute | null;
1464
+ /**
1465
+ * The payment associated with the dispute alert.
1466
+ */
1467
+ payment: Data.Payment | null;
1468
+ /**
1469
+ * The date of the original transaction.
1470
+ */
1471
+ transaction_date: string | null;
1472
+ }
1473
+ namespace Data {
1474
+ /**
1475
+ * The dispute associated with the dispute alert.
1476
+ */
1477
+ interface Dispute {
1478
+ /**
1479
+ * The unique identifier for the dispute.
1480
+ */
1481
+ id: string;
1482
+ /**
1483
+ * The disputed amount in the specified currency, formatted as a decimal.
1484
+ */
1485
+ amount: number;
1486
+ /**
1487
+ * The datetime the dispute was created.
1488
+ */
1489
+ created_at: string | null;
1490
+ /**
1491
+ * The three-letter ISO currency code for the disputed amount.
1492
+ */
1493
+ currency: Shared.Currency;
1494
+ /**
1495
+ * A human-readable reason for the dispute.
1496
+ */
1497
+ reason: string | null;
1498
+ /**
1499
+ * The current status of the dispute lifecycle, such as needs_response,
1500
+ * under_review, won, or lost.
1501
+ */
1502
+ status: DisputesAPI.DisputeStatuses;
1503
+ }
1504
+ /**
1505
+ * The payment associated with the dispute alert.
1247
1506
  */
1248
1507
  interface Payment {
1249
1508
  /**
@@ -1259,7 +1518,8 @@ export declare namespace RefundUpdatedWebhookEvent {
1259
1518
  */
1260
1519
  card_brand: PaymentsAPI.CardBrands | null;
1261
1520
  /**
1262
- * The last 4 digits of the card used to make the payment.
1521
+ * The last four digits of the card used to make this payment. Null if the payment
1522
+ * was not made with a card.
1263
1523
  */
1264
1524
  card_last4: string | null;
1265
1525
  /**
@@ -1283,7 +1543,8 @@ export declare namespace RefundUpdatedWebhookEvent {
1283
1543
  */
1284
1544
  membership: Payment.Membership | null;
1285
1545
  /**
1286
- * The datetime the payment was paid
1546
+ * The time at which this payment was successfully collected. Null if the payment
1547
+ * has not yet succeeded. As a Unix timestamp.
1287
1548
  */
1288
1549
  paid_at: string | null;
1289
1550
  /**
@@ -1343,15 +1604,16 @@ export declare namespace RefundUpdatedWebhookEvent {
1343
1604
  */
1344
1605
  id: string;
1345
1606
  /**
1346
- * The email of the user
1607
+ * The user's email address. Requires the member:email:read permission to access.
1608
+ * Null if not authorized.
1347
1609
  */
1348
1610
  email: string | null;
1349
1611
  /**
1350
- * The name of the user from their Whop account.
1612
+ * The user's display name shown on their public profile.
1351
1613
  */
1352
1614
  name: string | null;
1353
1615
  /**
1354
- * The username of the user from their Whop account.
1616
+ * The user's unique username shown on their public profile.
1355
1617
  */
1356
1618
  username: string;
1357
1619
  }
@@ -1385,7 +1647,7 @@ export interface MembershipCancelAtPeriodEndChangedWebhookEvent {
1385
1647
  */
1386
1648
  company_id?: string | null;
1387
1649
  }
1388
- export type UnwrapWebhookEvent = InvoiceCreatedWebhookEvent | InvoicePaidWebhookEvent | InvoicePastDueWebhookEvent | InvoiceVoidedWebhookEvent | MembershipActivatedWebhookEvent | MembershipDeactivatedWebhookEvent | EntryCreatedWebhookEvent | EntryApprovedWebhookEvent | EntryDeniedWebhookEvent | EntryDeletedWebhookEvent | SetupIntentRequiresActionWebhookEvent | SetupIntentSucceededWebhookEvent | SetupIntentCanceledWebhookEvent | WithdrawalCreatedWebhookEvent | WithdrawalUpdatedWebhookEvent | CourseLessonInteractionCompletedWebhookEvent | PayoutMethodCreatedWebhookEvent | VerificationSucceededWebhookEvent | PaymentCreatedWebhookEvent | PaymentSucceededWebhookEvent | PaymentFailedWebhookEvent | PaymentPendingWebhookEvent | DisputeCreatedWebhookEvent | DisputeUpdatedWebhookEvent | RefundCreatedWebhookEvent | RefundUpdatedWebhookEvent | MembershipCancelAtPeriodEndChangedWebhookEvent;
1650
+ export type UnwrapWebhookEvent = InvoiceCreatedWebhookEvent | InvoicePaidWebhookEvent | InvoicePastDueWebhookEvent | InvoiceVoidedWebhookEvent | MembershipActivatedWebhookEvent | MembershipDeactivatedWebhookEvent | EntryCreatedWebhookEvent | EntryApprovedWebhookEvent | EntryDeniedWebhookEvent | EntryDeletedWebhookEvent | SetupIntentRequiresActionWebhookEvent | SetupIntentSucceededWebhookEvent | SetupIntentCanceledWebhookEvent | WithdrawalCreatedWebhookEvent | WithdrawalUpdatedWebhookEvent | CourseLessonInteractionCompletedWebhookEvent | PayoutMethodCreatedWebhookEvent | VerificationSucceededWebhookEvent | PaymentCreatedWebhookEvent | PaymentSucceededWebhookEvent | PaymentFailedWebhookEvent | PaymentPendingWebhookEvent | DisputeCreatedWebhookEvent | DisputeUpdatedWebhookEvent | RefundCreatedWebhookEvent | RefundUpdatedWebhookEvent | DisputeAlertCreatedWebhookEvent | MembershipCancelAtPeriodEndChangedWebhookEvent;
1389
1651
  export interface WebhookCreateParams {
1390
1652
  /**
1391
1653
  * The URL to send the webhook to.
@@ -1438,7 +1700,7 @@ export interface WebhookUpdateParams {
1438
1700
  }
1439
1701
  export interface WebhookListParams extends CursorPageParams {
1440
1702
  /**
1441
- * The ID of the company to list webhooks for
1703
+ * The unique identifier of the company to list webhooks for.
1442
1704
  */
1443
1705
  company_id: string;
1444
1706
  /**
@@ -1455,6 +1717,6 @@ export interface WebhookListParams extends CursorPageParams {
1455
1717
  last?: number | null;
1456
1718
  }
1457
1719
  export declare namespace Webhooks {
1458
- export { type APIVersion as APIVersion, type Webhook as Webhook, type WebhookEvent as WebhookEvent, type WebhookCreateResponse as WebhookCreateResponse, type WebhookListResponse as WebhookListResponse, type WebhookDeleteResponse as WebhookDeleteResponse, type InvoiceCreatedWebhookEvent as InvoiceCreatedWebhookEvent, type InvoicePaidWebhookEvent as InvoicePaidWebhookEvent, type InvoicePastDueWebhookEvent as InvoicePastDueWebhookEvent, type InvoiceVoidedWebhookEvent as InvoiceVoidedWebhookEvent, type MembershipActivatedWebhookEvent as MembershipActivatedWebhookEvent, type MembershipDeactivatedWebhookEvent as MembershipDeactivatedWebhookEvent, type EntryCreatedWebhookEvent as EntryCreatedWebhookEvent, type EntryApprovedWebhookEvent as EntryApprovedWebhookEvent, type EntryDeniedWebhookEvent as EntryDeniedWebhookEvent, type EntryDeletedWebhookEvent as EntryDeletedWebhookEvent, type SetupIntentRequiresActionWebhookEvent as SetupIntentRequiresActionWebhookEvent, type SetupIntentSucceededWebhookEvent as SetupIntentSucceededWebhookEvent, type SetupIntentCanceledWebhookEvent as SetupIntentCanceledWebhookEvent, type WithdrawalCreatedWebhookEvent as WithdrawalCreatedWebhookEvent, type WithdrawalUpdatedWebhookEvent as WithdrawalUpdatedWebhookEvent, type CourseLessonInteractionCompletedWebhookEvent as CourseLessonInteractionCompletedWebhookEvent, type PayoutMethodCreatedWebhookEvent as PayoutMethodCreatedWebhookEvent, type VerificationSucceededWebhookEvent as VerificationSucceededWebhookEvent, type PaymentCreatedWebhookEvent as PaymentCreatedWebhookEvent, type PaymentSucceededWebhookEvent as PaymentSucceededWebhookEvent, type PaymentFailedWebhookEvent as PaymentFailedWebhookEvent, type PaymentPendingWebhookEvent as PaymentPendingWebhookEvent, type DisputeCreatedWebhookEvent as DisputeCreatedWebhookEvent, type DisputeUpdatedWebhookEvent as DisputeUpdatedWebhookEvent, type RefundCreatedWebhookEvent as RefundCreatedWebhookEvent, type RefundUpdatedWebhookEvent as RefundUpdatedWebhookEvent, type MembershipCancelAtPeriodEndChangedWebhookEvent as MembershipCancelAtPeriodEndChangedWebhookEvent, type UnwrapWebhookEvent as UnwrapWebhookEvent, type WebhookListResponsesCursorPage as WebhookListResponsesCursorPage, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookListParams as WebhookListParams, };
1720
+ export { type APIVersion as APIVersion, type Webhook as Webhook, type WebhookEvent as WebhookEvent, type WebhookCreateResponse as WebhookCreateResponse, type WebhookListResponse as WebhookListResponse, type WebhookDeleteResponse as WebhookDeleteResponse, type InvoiceCreatedWebhookEvent as InvoiceCreatedWebhookEvent, type InvoicePaidWebhookEvent as InvoicePaidWebhookEvent, type InvoicePastDueWebhookEvent as InvoicePastDueWebhookEvent, type InvoiceVoidedWebhookEvent as InvoiceVoidedWebhookEvent, type MembershipActivatedWebhookEvent as MembershipActivatedWebhookEvent, type MembershipDeactivatedWebhookEvent as MembershipDeactivatedWebhookEvent, type EntryCreatedWebhookEvent as EntryCreatedWebhookEvent, type EntryApprovedWebhookEvent as EntryApprovedWebhookEvent, type EntryDeniedWebhookEvent as EntryDeniedWebhookEvent, type EntryDeletedWebhookEvent as EntryDeletedWebhookEvent, type SetupIntentRequiresActionWebhookEvent as SetupIntentRequiresActionWebhookEvent, type SetupIntentSucceededWebhookEvent as SetupIntentSucceededWebhookEvent, type SetupIntentCanceledWebhookEvent as SetupIntentCanceledWebhookEvent, type WithdrawalCreatedWebhookEvent as WithdrawalCreatedWebhookEvent, type WithdrawalUpdatedWebhookEvent as WithdrawalUpdatedWebhookEvent, type CourseLessonInteractionCompletedWebhookEvent as CourseLessonInteractionCompletedWebhookEvent, type PayoutMethodCreatedWebhookEvent as PayoutMethodCreatedWebhookEvent, type VerificationSucceededWebhookEvent as VerificationSucceededWebhookEvent, type PaymentCreatedWebhookEvent as PaymentCreatedWebhookEvent, type PaymentSucceededWebhookEvent as PaymentSucceededWebhookEvent, type PaymentFailedWebhookEvent as PaymentFailedWebhookEvent, type PaymentPendingWebhookEvent as PaymentPendingWebhookEvent, type DisputeCreatedWebhookEvent as DisputeCreatedWebhookEvent, type DisputeUpdatedWebhookEvent as DisputeUpdatedWebhookEvent, type RefundCreatedWebhookEvent as RefundCreatedWebhookEvent, type RefundUpdatedWebhookEvent as RefundUpdatedWebhookEvent, type DisputeAlertCreatedWebhookEvent as DisputeAlertCreatedWebhookEvent, type MembershipCancelAtPeriodEndChangedWebhookEvent as MembershipCancelAtPeriodEndChangedWebhookEvent, type UnwrapWebhookEvent as UnwrapWebhookEvent, type WebhookListResponsesCursorPage as WebhookListResponsesCursorPage, type WebhookCreateParams as WebhookCreateParams, type WebhookUpdateParams as WebhookUpdateParams, type WebhookListParams as WebhookListParams, };
1459
1721
  }
1460
1722
  //# sourceMappingURL=webhooks.d.mts.map