@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
@@ -23,7 +23,7 @@ export declare class Withdrawals extends APIResource {
23
23
  */
24
24
  create(body: WithdrawalCreateParams, options?: RequestOptions): APIPromise<Withdrawal>;
25
25
  /**
26
- * Retrieves a withdrawal by ID
26
+ * Retrieves the details of an existing withdrawal.
27
27
  *
28
28
  * Required permissions:
29
29
  *
@@ -39,7 +39,8 @@ export declare class Withdrawals extends APIResource {
39
39
  */
40
40
  retrieve(id: string, options?: RequestOptions): APIPromise<Withdrawal>;
41
41
  /**
42
- * Lists withdrawals
42
+ * Returns a paginated list of withdrawals for a company, with optional sorting and
43
+ * date filtering.
43
44
  *
44
45
  * Required permissions:
45
46
  *
@@ -59,8 +60,8 @@ export declare class Withdrawals extends APIResource {
59
60
  }
60
61
  export type WithdrawalListResponsesCursorPage = CursorPage<WithdrawalListResponse>;
61
62
  /**
62
- * A withdrawal represents a request to transfer funds from a company's ledger
63
- * account to an external payout method.
63
+ * A withdrawal represents a request to transfer funds from a ledger account to an
64
+ * external payout method.
64
65
  */
65
66
  export interface Withdrawal {
66
67
  /**
@@ -68,8 +69,8 @@ export interface Withdrawal {
68
69
  */
69
70
  id: string;
70
71
  /**
71
- * The withdrawal amount. Provided as a number in the specified currency. Eg:
72
- * 100.00 for $100.00 USD.
72
+ * The withdrawal amount as a decimal number in the specified currency (e.g.,
73
+ * 100.00 for $100.00 USD).
73
74
  */
74
75
  amount: number;
75
76
  /**
@@ -77,24 +78,26 @@ export interface Withdrawal {
77
78
  */
78
79
  created_at: string;
79
80
  /**
80
- * The currency of the withdrawal request.
81
+ * The three-letter ISO currency code for this withdrawal (e.g., 'usd', 'eur').
81
82
  */
82
83
  currency: Shared.Currency;
83
84
  /**
84
85
  * The different error codes a payout can be in.
85
86
  */
86
- error_code: 'account_closed' | 'account_does_not_exist' | 'account_information_invalid' | 'account_number_invalid_region' | 'account_frozen' | 'account_lookup_failed' | 'account_not_found' | 'amount_out_of_bounds' | 'attributes_not_validated' | 'b2b_payments_prohibited' | 'bank_statement_required' | 'compliance_review' | 'currency_not_supported' | 'deposit_canceled' | 'deposit_failed' | 'deposit_rejected' | 'destination_unavailable' | 'exceeded_account_limit' | 'expired_quote' | 'generic_payout_error' | 'technical_problem' | 'identification_number_invalid' | 'invalid_account_number' | 'invalid_bank_code' | 'invalid_beneficiary' | 'invalid_mailing_address' | 'invalid_branch_number' | 'invalid_branch_code' | 'invalid_phone_number' | 'invalid_routing_number' | 'invalid_swift_code' | 'invalid_company_details' | 'manual_cancelation' | 'misc_error' | 'missing_city_and_country' | 'missing_phone_number' | 'missing_remittance_info' | 'payee_name_invalid' | 'receiving_account_locked' | 'rejected_by_compliance' | 'rtp_not_supported' | 'non_transaction_account' | 'source_token_insufficient_funds' | 'ssn_invalid' | 'wallet_screenshot_required' | 'unsupported_region' | null;
87
+ error_code: 'account_closed' | 'account_does_not_exist' | 'account_information_invalid' | 'account_number_invalid_region' | 'account_frozen' | 'account_lookup_failed' | 'account_not_found' | 'amount_out_of_bounds' | 'attributes_not_validated' | 'b2b_payments_prohibited' | 'bank_statement_required' | 'compliance_review' | 'currency_not_supported' | 'deposit_canceled' | 'deposit_failed' | 'deposit_rejected' | 'destination_unavailable' | 'exceeded_account_limit' | 'expired_quote' | 'generic_payout_error' | 'technical_problem' | 'identification_number_invalid' | 'invalid_account_number' | 'invalid_bank_code' | 'invalid_beneficiary' | 'invalid_mailing_address' | 'invalid_branch_number' | 'invalid_branch_code' | 'invalid_phone_number' | 'invalid_routing_number' | 'invalid_swift_code' | 'invalid_company_details' | 'manual_cancelation' | 'misc_error' | 'missing_city_and_country' | 'missing_phone_number' | 'missing_remittance_info' | 'payee_name_invalid' | 'receiving_account_locked' | 'rejected_by_compliance' | 'rtp_not_supported' | 'non_transaction_account' | 'source_token_insufficient_funds' | 'ssn_invalid' | 'wallet_screenshot_required' | 'unsupported_region' | 'payout_provider_timeout' | null;
87
88
  /**
88
- * The error message for the withdrawal, if any.
89
+ * A human-readable message describing why the payout failed. Null if no error
90
+ * occurred.
89
91
  */
90
92
  error_message: string | null;
91
93
  /**
92
- * The estimated availability date for the withdrawal, if any.
94
+ * The estimated time at which the funds become available in the destination
95
+ * account. Null if no estimate is available. As a Unix timestamp.
93
96
  */
94
97
  estimated_availability: string | null;
95
98
  /**
96
- * The fee amount that was charged for the withdrawal. This is in the same currency
97
- * as the withdrawal amount.
99
+ * The fee charged for processing this withdrawal, in the same currency as the
100
+ * withdrawal amount.
98
101
  */
99
102
  fee_amount: number;
100
103
  /**
@@ -102,36 +105,37 @@ export interface Withdrawal {
102
105
  */
103
106
  fee_type: WithdrawalFeeTypes | null;
104
107
  /**
105
- * The ledger account associated with the withdrawal.
108
+ * The ledger account from which the withdrawal funds are sourced.
106
109
  */
107
110
  ledger_account: Withdrawal.LedgerAccount;
108
111
  /**
109
- * The markup fee that was charged for the withdrawal. This is in the same currency
110
- * as the withdrawal amount. This only applies to platform accounts using Whop
111
- * Rails.
112
+ * An additional markup fee charged for the withdrawal, in the same currency as the
113
+ * withdrawal amount. Only applies to platform accounts using Whop Rails.
112
114
  */
113
115
  markup_fee: number;
114
116
  /**
115
- * The payout token used for the withdrawal, if applicable.
117
+ * The saved payout destination used for this withdrawal (e.g., a bank account or
118
+ * PayPal address). Null if no payout token was used.
116
119
  */
117
120
  payout_token: Withdrawal.PayoutToken | null;
118
121
  /**
119
- * The speed of the withdrawal.
122
+ * The processing speed selected for this withdrawal ('standard' or 'instant').
120
123
  */
121
124
  speed: WithdrawalSpeeds;
122
125
  /**
123
- * Status of the withdrawal.
126
+ * The computed lifecycle status of the withdrawal, accounting for the state of
127
+ * associated payouts (e.g., 'requested', 'in_transit', 'completed', 'failed').
124
128
  */
125
129
  status: WithdrawalStatus;
126
130
  /**
127
- * The trace code for the payout, if applicable. Provided on ACH transactions when
128
- * available.
131
+ * The ACH trace number for tracking the payout through the banking network. Null
132
+ * if not available or not an ACH transaction.
129
133
  */
130
134
  trace_code: string | null;
131
135
  }
132
136
  export declare namespace Withdrawal {
133
137
  /**
134
- * The ledger account associated with the withdrawal.
138
+ * The ledger account from which the withdrawal funds are sourced.
135
139
  */
136
140
  interface LedgerAccount {
137
141
  /**
@@ -139,12 +143,17 @@ export declare namespace Withdrawal {
139
143
  */
140
144
  id: string;
141
145
  /**
142
- * The ID of the company associated with this ledger account.
146
+ * Represents a unique identifier that is Base64 obfuscated. It is often used to
147
+ * refetch an object or as key for a cache. The ID type appears in a JSON response
148
+ * as a String; however, it is not intended to be human-readable. When expected as
149
+ * an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`)
150
+ * input value will be accepted as an ID.
143
151
  */
144
152
  company_id: string | null;
145
153
  }
146
154
  /**
147
- * The payout token used for the withdrawal, if applicable.
155
+ * The saved payout destination used for this withdrawal (e.g., a bank account or
156
+ * PayPal address). Null if no payout token was used.
148
157
  */
149
158
  interface PayoutToken {
150
159
  /**
@@ -156,17 +165,17 @@ export declare namespace Withdrawal {
156
165
  */
157
166
  created_at: string;
158
167
  /**
159
- * The currency code of the payout destination. This is the currency that payouts
160
- * will be made in for this token.
168
+ * The three-letter ISO currency code that payouts are delivered in for this
169
+ * destination.
161
170
  */
162
171
  destination_currency_code: string;
163
172
  /**
164
- * An optional nickname for the payout token to help the user identify it. This is
165
- * not used by the provider and is only for the user's reference.
173
+ * A user-defined label to help identify this payout destination. Not sent to the
174
+ * provider. Null if no nickname has been set.
166
175
  */
167
176
  nickname: string | null;
168
177
  /**
169
- * The name of the payer associated with the payout token.
178
+ * The legal name of the account holder receiving payouts. Null if not provided.
170
179
  */
171
180
  payer_name: string | null;
172
181
  }
@@ -184,8 +193,8 @@ export type WithdrawalSpeeds = 'standard' | 'instant';
184
193
  */
185
194
  export type WithdrawalStatus = 'requested' | 'awaiting_payment' | 'in_transit' | 'completed' | 'failed' | 'canceled' | 'denied';
186
195
  /**
187
- * A withdrawal represents a request to transfer funds from a company's ledger
188
- * account to an external payout method.
196
+ * A withdrawal represents a request to transfer funds from a ledger account to an
197
+ * external payout method.
189
198
  */
190
199
  export interface WithdrawalListResponse {
191
200
  /**
@@ -193,8 +202,8 @@ export interface WithdrawalListResponse {
193
202
  */
194
203
  id: string;
195
204
  /**
196
- * The withdrawal amount. Provided as a number in the specified currency. Eg:
197
- * 100.00 for $100.00 USD.
205
+ * The withdrawal amount as a decimal number in the specified currency (e.g.,
206
+ * 100.00 for $100.00 USD).
198
207
  */
199
208
  amount: number;
200
209
  /**
@@ -202,12 +211,12 @@ export interface WithdrawalListResponse {
202
211
  */
203
212
  created_at: string;
204
213
  /**
205
- * The currency of the withdrawal request.
214
+ * The three-letter ISO currency code for this withdrawal (e.g., 'usd', 'eur').
206
215
  */
207
216
  currency: Shared.Currency;
208
217
  /**
209
- * The fee amount that was charged for the withdrawal. This is in the same currency
210
- * as the withdrawal amount.
218
+ * The fee charged for processing this withdrawal, in the same currency as the
219
+ * withdrawal amount.
211
220
  */
212
221
  fee_amount: number;
213
222
  /**
@@ -215,17 +224,17 @@ export interface WithdrawalListResponse {
215
224
  */
216
225
  fee_type: WithdrawalFeeTypes | null;
217
226
  /**
218
- * The markup fee that was charged for the withdrawal. This is in the same currency
219
- * as the withdrawal amount. This only applies to platform accounts using Whop
220
- * Rails.
227
+ * An additional markup fee charged for the withdrawal, in the same currency as the
228
+ * withdrawal amount. Only applies to platform accounts using Whop Rails.
221
229
  */
222
230
  markup_fee: number;
223
231
  /**
224
- * The speed of the withdrawal.
232
+ * The processing speed selected for this withdrawal ('standard' or 'instant').
225
233
  */
226
234
  speed: WithdrawalSpeeds;
227
235
  /**
228
- * Status of the withdrawal.
236
+ * The computed lifecycle status of the withdrawal, accounting for the state of
237
+ * associated payouts (e.g., 'requested', 'in_transit', 'completed', 'failed').
229
238
  */
230
239
  status: WithdrawalStatus;
231
240
  }
@@ -258,7 +267,7 @@ export interface WithdrawalCreateParams {
258
267
  }
259
268
  export interface WithdrawalListParams extends CursorPageParams {
260
269
  /**
261
- * The ID of the company to list withdrawals for
270
+ * The unique identifier of the company to list withdrawals for.
262
271
  */
263
272
  company_id: string;
264
273
  /**
@@ -266,11 +275,11 @@ export interface WithdrawalListParams extends CursorPageParams {
266
275
  */
267
276
  before?: string | null;
268
277
  /**
269
- * The minimum creation date to filter by
278
+ * Only return withdrawals created after this timestamp.
270
279
  */
271
280
  created_after?: string | null;
272
281
  /**
273
- * The maximum creation date to filter by
282
+ * Only return withdrawals created before this timestamp.
274
283
  */
275
284
  created_before?: string | null;
276
285
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"withdrawals.d.ts","sourceRoot":"","sources":["../src/resources/withdrawals.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;IAItF;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG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oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
@@ -27,7 +27,7 @@ class Withdrawals extends resource_1.APIResource {
27
27
  return this._client.post('/withdrawals', { body, ...options });
28
28
  }
29
29
  /**
30
- * Retrieves a withdrawal by ID
30
+ * Retrieves the details of an existing withdrawal.
31
31
  *
32
32
  * Required permissions:
33
33
  *
@@ -45,7 +45,8 @@ class Withdrawals extends resource_1.APIResource {
45
45
  return this._client.get((0, path_1.path) `/withdrawals/${id}`, options);
46
46
  }
47
47
  /**
48
- * Lists withdrawals
48
+ * Returns a paginated list of withdrawals for a company, with optional sorting and
49
+ * date filtering.
49
50
  *
50
51
  * Required permissions:
51
52
  *
@@ -1 +1 @@
1
- {"version":3,"file":"withdrawals.js","sourceRoot":"","sources":["../src/resources/withdrawals.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,gBAAgB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,IAAI,CACF,KAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,CAAA,uBAAkC,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5G,CAAC;CACF;AAhED,kCAgEC"}
1
+ {"version":3,"file":"withdrawals.js","sourceRoot":"","sources":["../src/resources/withdrawals.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,gBAAgB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CACF,KAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,CAAA,uBAAkC,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5G,CAAC;CACF;AAjED,kCAiEC"}
@@ -24,7 +24,7 @@ export class Withdrawals extends APIResource {
24
24
  return this._client.post('/withdrawals', { body, ...options });
25
25
  }
26
26
  /**
27
- * Retrieves a withdrawal by ID
27
+ * Retrieves the details of an existing withdrawal.
28
28
  *
29
29
  * Required permissions:
30
30
  *
@@ -42,7 +42,8 @@ export class Withdrawals extends APIResource {
42
42
  return this._client.get(path `/withdrawals/${id}`, options);
43
43
  }
44
44
  /**
45
- * Lists withdrawals
45
+ * Returns a paginated list of withdrawals for a company, with optional sorting and
46
+ * date filtering.
46
47
  *
47
48
  * Required permissions:
48
49
  *
@@ -1 +1 @@
1
- {"version":3,"file":"withdrawals.mjs","sourceRoot":"","sources":["../src/resources/withdrawals.ts"],"names":[],"mapp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,IAAI,CAAA,gBAAgB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CACF,KAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,CAAA,UAAkC,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5G,CAAC;CACF"}
package/src/client.ts CHANGED
@@ -78,12 +78,12 @@ import {
78
78
  CompanyUpdateParams,
79
79
  } from './resources/companies';
80
80
  import {
81
- BotTokenTransactionTypes,
82
81
  CompanyTokenTransaction,
83
82
  CompanyTokenTransactionCreateParams,
84
83
  CompanyTokenTransactionListParams,
85
84
  CompanyTokenTransactionListResponse,
86
85
  CompanyTokenTransactionListResponsesCursorPage,
86
+ CompanyTokenTransactionType,
87
87
  CompanyTokenTransactions,
88
88
  } from './resources/company-token-transactions';
89
89
  import {
@@ -137,6 +137,14 @@ import {
137
137
  Courses,
138
138
  Languages,
139
139
  } from './resources/courses';
140
+ import {
141
+ DisputeAlertListParams,
142
+ DisputeAlertListResponse,
143
+ DisputeAlertListResponsesCursorPage,
144
+ DisputeAlertRetrieveResponse,
145
+ DisputeAlertType,
146
+ DisputeAlerts,
147
+ } from './resources/dispute-alerts';
140
148
  import {
141
149
  Dispute,
142
150
  DisputeListParams,
@@ -302,6 +310,7 @@ import {
302
310
  Plans,
303
311
  } from './resources/plans';
304
312
  import {
313
+ IndustryGroups,
305
314
  ProductCreateParams,
306
315
  ProductDeleteResponse,
307
316
  ProductListParams,
@@ -393,6 +402,7 @@ import {
393
402
  import {
394
403
  APIVersion,
395
404
  CourseLessonInteractionCompletedWebhookEvent,
405
+ DisputeAlertCreatedWebhookEvent,
396
406
  DisputeCreatedWebhookEvent,
397
407
  DisputeUpdatedWebhookEvent,
398
408
  EntryApprovedWebhookEvent,
@@ -879,7 +889,7 @@ export class Whop {
879
889
  loggerFor(this).info(`${responseInfo} - ${retryMessage}`);
880
890
 
881
891
  const errText = await response.text().catch((err: any) => castToError(err).message);
882
- const errJSON = safeJSON(errText);
892
+ const errJSON = safeJSON(errText) as any;
883
893
  const errMessage = errJSON ? undefined : errText;
884
894
 
885
895
  loggerFor(this).debug(
@@ -1153,6 +1163,14 @@ export class Whop {
1153
1163
  (Symbol.iterator in body && 'next' in body && typeof body.next === 'function'))
1154
1164
  ) {
1155
1165
  return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body as AsyncIterable<Uint8Array>) };
1166
+ } else if (
1167
+ typeof body === 'object' &&
1168
+ headers.values.get('content-type') === 'application/x-www-form-urlencoded'
1169
+ ) {
1170
+ return {
1171
+ bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' },
1172
+ body: this.stringifyQuery(body as Record<string, unknown>),
1173
+ };
1156
1174
  } else {
1157
1175
  return this.#encoder({ body, headers });
1158
1176
  }
@@ -1228,6 +1246,7 @@ export class Whop {
1228
1246
  dmMembers: API.DmMembers = new API.DmMembers(this);
1229
1247
  aiChats: API.AIChats = new API.AIChats(this);
1230
1248
  dmChannels: API.DmChannels = new API.DmChannels(this);
1249
+ disputeAlerts: API.DisputeAlerts = new API.DisputeAlerts(this);
1231
1250
  }
1232
1251
 
1233
1252
  Whop.Apps = Apps;
@@ -1279,6 +1298,7 @@ Whop.CompanyTokenTransactions = CompanyTokenTransactions;
1279
1298
  Whop.DmMembers = DmMembers;
1280
1299
  Whop.AIChats = AIChats;
1281
1300
  Whop.DmChannels = DmChannels;
1301
+ Whop.DisputeAlerts = DisputeAlerts;
1282
1302
 
1283
1303
  export declare namespace Whop {
1284
1304
  export type RequestOptions = Opts.RequestOptions;
@@ -1310,6 +1330,7 @@ export declare namespace Whop {
1310
1330
 
1311
1331
  export {
1312
1332
  Products as Products,
1333
+ type IndustryGroups as IndustryGroups,
1313
1334
  type ProductDeleteResponse as ProductDeleteResponse,
1314
1335
  type ProductCreateParams as ProductCreateParams,
1315
1336
  type ProductUpdateParams as ProductUpdateParams,
@@ -1359,6 +1380,7 @@ export declare namespace Whop {
1359
1380
  type DisputeUpdatedWebhookEvent as DisputeUpdatedWebhookEvent,
1360
1381
  type RefundCreatedWebhookEvent as RefundCreatedWebhookEvent,
1361
1382
  type RefundUpdatedWebhookEvent as RefundUpdatedWebhookEvent,
1383
+ type DisputeAlertCreatedWebhookEvent as DisputeAlertCreatedWebhookEvent,
1362
1384
  type MembershipCancelAtPeriodEndChangedWebhookEvent as MembershipCancelAtPeriodEndChangedWebhookEvent,
1363
1385
  type UnwrapWebhookEvent as UnwrapWebhookEvent,
1364
1386
  type WebhookListResponsesCursorPage as WebhookListResponsesCursorPage,
@@ -1735,8 +1757,8 @@ export declare namespace Whop {
1735
1757
 
1736
1758
  export {
1737
1759
  CompanyTokenTransactions as CompanyTokenTransactions,
1738
- type BotTokenTransactionTypes as BotTokenTransactionTypes,
1739
1760
  type CompanyTokenTransaction as CompanyTokenTransaction,
1761
+ type CompanyTokenTransactionType as CompanyTokenTransactionType,
1740
1762
  type CompanyTokenTransactionListResponse as CompanyTokenTransactionListResponse,
1741
1763
  type CompanyTokenTransactionListResponsesCursorPage as CompanyTokenTransactionListResponsesCursorPage,
1742
1764
  type CompanyTokenTransactionCreateParams as CompanyTokenTransactionCreateParams,
@@ -1778,6 +1800,15 @@ export declare namespace Whop {
1778
1800
  type DmChannelListParams as DmChannelListParams,
1779
1801
  };
1780
1802
 
1803
+ export {
1804
+ DisputeAlerts as DisputeAlerts,
1805
+ type DisputeAlertType as DisputeAlertType,
1806
+ type DisputeAlertRetrieveResponse as DisputeAlertRetrieveResponse,
1807
+ type DisputeAlertListResponse as DisputeAlertListResponse,
1808
+ type DisputeAlertListResponsesCursorPage as DisputeAlertListResponsesCursorPage,
1809
+ type DisputeAlertListParams as DisputeAlertListParams,
1810
+ };
1811
+
1781
1812
  export type AccessLevel = API.AccessLevel;
1782
1813
  export type AccessPassType = API.AccessPassType;
1783
1814
  export type App = API.App;
@@ -6,10 +6,10 @@ import { RequestOptions } from '../internal/request-options';
6
6
 
7
7
  export class AccessTokens extends APIResource {
8
8
  /**
9
- * Create a short-lived access token to authenticate API requests. When using API
10
- * key authentication, provide company_id or user_id. When using OAuth
11
- * authentication, the user is derived from the token. This token should be used
12
- * with Whop's web and mobile embedded components.
9
+ * Create a short-lived access token for authenticating API requests. When using
10
+ * API key authentication, provide company_id or user_id. When using OAuth, the
11
+ * user is derived from the token. Use this token with Whop's web and mobile
12
+ * embedded components.
13
13
  *
14
14
  * @example
15
15
  * ```ts
@@ -25,47 +25,46 @@ export class AccessTokens extends APIResource {
25
25
  }
26
26
 
27
27
  /**
28
- * An object representing an access token used for authenticating API requests.
28
+ * A short-lived access token used to authenticate API requests on behalf of a
29
+ * user.
29
30
  */
30
31
  export interface AccessTokenCreateResponse {
31
32
  /**
32
- * The JWT access token string.
33
+ * The signed JWT access token string to include in API request Authorization
34
+ * headers.
33
35
  */
34
36
  token: string;
35
37
 
36
38
  /**
37
- * The expiration timestamp of the access token.
39
+ * The timestamp after which this access token is no longer valid and must be
40
+ * refreshed.
38
41
  */
39
42
  expires_at: string;
40
43
  }
41
44
 
42
45
  export interface AccessTokenCreateParams {
43
46
  /**
44
- * The ID of the Company to generate the token for. The API key must have
45
- * permission to access this Company, such as the being the company the API key
46
- * belongs to or a sub-merchant of it
47
+ * The unique identifier of the company to generate the token for, starting with
48
+ * 'biz\_'. The API key must have permission to access this company.
47
49
  */
48
50
  company_id?: string | null;
49
51
 
50
52
  /**
51
- * The expiration timestamp for the access token. If not provided, a default
52
- * expiration time of 1 hour will be used. The expiration can be set to a maximum
53
- * of 3 hours from the current time.
53
+ * The expiration timestamp for the access token. Defaults to 1 hour from now, with
54
+ * a maximum of 3 hours.
54
55
  */
55
56
  expires_at?: string | null;
56
57
 
57
58
  /**
58
- * Array of desired scoped actions for the access token. If sent as an empty array
59
- * or not provided, all permissions from the authenticating credential (API key or
60
- * OAuth token) will be available on the token. If sending an explicit list, they
61
- * must be a subset of the credential's existing permissions. Otherwise, an error
62
- * will be raised.
59
+ * An array of permission scopes to grant to the access token. If empty or omitted,
60
+ * all permissions from the authenticating credential are inherited. Must be a
61
+ * subset of the credential's permissions.
63
62
  */
64
63
  scoped_actions?: Array<string> | null;
65
64
 
66
65
  /**
67
- * The ID of the User to generate the token for. The API key must have permission
68
- * to access this User.
66
+ * The unique identifier of the user to generate the token for, starting with
67
+ * 'user\_'. The API key must have permission to access this user.
69
68
  */
70
69
  user_id?: string | null;
71
70
  }
@@ -6,9 +6,8 @@ import { RequestOptions } from '../internal/request-options';
6
6
 
7
7
  export class AccountLinks extends APIResource {
8
8
  /**
9
- * Generates a url that a user can be directed to in order to access their
10
- * sub-merchant account. For example, they can visit the hosted payouts portal or
11
- * the hosted KYC onboarding flow.
9
+ * Generate a URL that directs a sub-merchant to their account portal, such as the
10
+ * hosted payouts dashboard or the KYC onboarding flow.
12
11
  *
13
12
  * @example
14
13
  * ```ts
@@ -26,41 +25,44 @@ export class AccountLinks extends APIResource {
26
25
  }
27
26
 
28
27
  /**
29
- * An object representing a url that a user can be directed to to access their
30
- * account.
28
+ * A temporary, time-limited URL that grants a user access to an external account
29
+ * management page.
31
30
  */
32
31
  export interface AccountLinkCreateResponse {
33
32
  /**
34
- * The expiration timestamp of the url.
33
+ * The timestamp after which this account link URL is no longer valid.
35
34
  */
36
35
  expires_at: string;
37
36
 
38
37
  /**
39
- * The URL to navigate the user to.
38
+ * The temporary URL to redirect the user to for account access. Expires at the
39
+ * time specified by expires_at.
40
40
  */
41
41
  url: string;
42
42
  }
43
43
 
44
44
  export interface AccountLinkCreateParams {
45
45
  /**
46
- * The ID of the Company to generate the url for. The company must be a
47
- * sub-merchant of the API key's company.
46
+ * The unique identifier of the company to generate the link for, starting with
47
+ * 'biz\_'. Must be a sub-merchant of the API key's company.
48
48
  */
49
49
  company_id: string;
50
50
 
51
51
  /**
52
- * The URL to redirect to if the session expires and needs to be re-authenticated
53
- * due to the token expiring.
52
+ * The URL to redirect the user to if the session expires and needs to be
53
+ * re-authenticated, such as 'https://example.com/refresh'.
54
54
  */
55
55
  refresh_url: string;
56
56
 
57
57
  /**
58
- * The URL to redirect to when the customer wants to return to your site.
58
+ * The URL to redirect the user to when they want to return to your site, such as
59
+ * 'https://example.com/return'.
59
60
  */
60
61
  return_url: string;
61
62
 
62
63
  /**
63
- * The use case for which the link will be used.
64
+ * The purpose of the account link, such as hosted payouts portal or hosted KYC
65
+ * onboarding.
64
66
  */
65
67
  use_case: 'account_onboarding' | 'payouts_portal';
66
68
  }