@whop/sdk 0.0.26 → 0.0.28

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 (463) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/client.d.mts +10 -9
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +10 -9
  5. package/client.d.ts.map +1 -1
  6. package/client.js +16 -2
  7. package/client.js.map +1 -1
  8. package/client.mjs +16 -2
  9. package/client.mjs.map +1 -1
  10. package/package.json +3 -3
  11. package/resources/access-tokens.d.mts +34 -54
  12. package/resources/access-tokens.d.mts.map +1 -1
  13. package/resources/access-tokens.d.ts +34 -54
  14. package/resources/access-tokens.d.ts.map +1 -1
  15. package/resources/access-tokens.js +6 -8
  16. package/resources/access-tokens.js.map +1 -1
  17. package/resources/access-tokens.mjs +6 -8
  18. package/resources/access-tokens.mjs.map +1 -1
  19. package/resources/account-links.d.mts +15 -13
  20. package/resources/account-links.d.mts.map +1 -1
  21. package/resources/account-links.d.ts +15 -13
  22. package/resources/account-links.d.ts.map +1 -1
  23. package/resources/account-links.js +2 -3
  24. package/resources/account-links.js.map +1 -1
  25. package/resources/account-links.mjs +2 -3
  26. package/resources/account-links.mjs.map +1 -1
  27. package/resources/ai-chats.d.mts +70 -30
  28. package/resources/ai-chats.d.mts.map +1 -1
  29. package/resources/ai-chats.d.ts +70 -30
  30. package/resources/ai-chats.d.ts.map +1 -1
  31. package/resources/ai-chats.js +6 -6
  32. package/resources/ai-chats.js.map +1 -1
  33. package/resources/ai-chats.mjs +6 -6
  34. package/resources/ai-chats.mjs.map +1 -1
  35. package/resources/app-builds.d.mts +37 -35
  36. package/resources/app-builds.d.mts.map +1 -1
  37. package/resources/app-builds.d.ts +37 -35
  38. package/resources/app-builds.d.ts.map +1 -1
  39. package/resources/app-builds.js +7 -4
  40. package/resources/app-builds.js.map +1 -1
  41. package/resources/app-builds.mjs +7 -4
  42. package/resources/app-builds.mjs.map +1 -1
  43. package/resources/apps.d.mts +86 -60
  44. package/resources/apps.d.mts.map +1 -1
  45. package/resources/apps.d.ts +86 -60
  46. package/resources/apps.d.ts.map +1 -1
  47. package/resources/apps.js +7 -4
  48. package/resources/apps.js.map +1 -1
  49. package/resources/apps.mjs +7 -4
  50. package/resources/apps.mjs.map +1 -1
  51. package/resources/authorized-users.d.mts +38 -32
  52. package/resources/authorized-users.d.mts.map +1 -1
  53. package/resources/authorized-users.d.ts +38 -32
  54. package/resources/authorized-users.d.ts.map +1 -1
  55. package/resources/authorized-users.js +3 -2
  56. package/resources/authorized-users.js.map +1 -1
  57. package/resources/authorized-users.mjs +3 -2
  58. package/resources/authorized-users.mjs.map +1 -1
  59. package/resources/chat-channels.d.mts +28 -20
  60. package/resources/chat-channels.d.mts.map +1 -1
  61. package/resources/chat-channels.d.ts +28 -20
  62. package/resources/chat-channels.d.ts.map +1 -1
  63. package/resources/chat-channels.js +5 -3
  64. package/resources/chat-channels.js.map +1 -1
  65. package/resources/chat-channels.mjs +5 -3
  66. package/resources/chat-channels.mjs.map +1 -1
  67. package/resources/checkout-configurations.d.mts +75 -58
  68. package/resources/checkout-configurations.d.mts.map +1 -1
  69. package/resources/checkout-configurations.d.ts +75 -58
  70. package/resources/checkout-configurations.d.ts.map +1 -1
  71. package/resources/checkout-configurations.js +3 -2
  72. package/resources/checkout-configurations.js.map +1 -1
  73. package/resources/checkout-configurations.mjs +3 -2
  74. package/resources/checkout-configurations.mjs.map +1 -1
  75. package/resources/companies.d.mts +88 -56
  76. package/resources/companies.d.mts.map +1 -1
  77. package/resources/companies.d.ts +88 -56
  78. package/resources/companies.d.ts.map +1 -1
  79. package/resources/companies.js +9 -7
  80. package/resources/companies.js.map +1 -1
  81. package/resources/companies.mjs +9 -7
  82. package/resources/companies.mjs.map +1 -1
  83. package/resources/company-token-transactions.d.mts +90 -67
  84. package/resources/company-token-transactions.d.mts.map +1 -1
  85. package/resources/company-token-transactions.d.ts +90 -67
  86. package/resources/company-token-transactions.d.ts.map +1 -1
  87. package/resources/company-token-transactions.js +6 -3
  88. package/resources/company-token-transactions.js.map +1 -1
  89. package/resources/company-token-transactions.mjs +6 -3
  90. package/resources/company-token-transactions.mjs.map +1 -1
  91. package/resources/course-chapters.d.mts +27 -22
  92. package/resources/course-chapters.d.mts.map +1 -1
  93. package/resources/course-chapters.d.ts +27 -22
  94. package/resources/course-chapters.d.ts.map +1 -1
  95. package/resources/course-chapters.js +5 -5
  96. package/resources/course-chapters.mjs +5 -5
  97. package/resources/course-lesson-interactions.d.mts +7 -6
  98. package/resources/course-lesson-interactions.d.mts.map +1 -1
  99. package/resources/course-lesson-interactions.d.ts +7 -6
  100. package/resources/course-lesson-interactions.d.ts.map +1 -1
  101. package/resources/course-lesson-interactions.js +3 -2
  102. package/resources/course-lesson-interactions.js.map +1 -1
  103. package/resources/course-lesson-interactions.mjs +3 -2
  104. package/resources/course-lesson-interactions.mjs.map +1 -1
  105. package/resources/course-lessons.d.mts +141 -99
  106. package/resources/course-lessons.d.mts.map +1 -1
  107. package/resources/course-lessons.d.ts +141 -99
  108. package/resources/course-lessons.d.ts.map +1 -1
  109. package/resources/course-lessons.js +12 -8
  110. package/resources/course-lessons.js.map +1 -1
  111. package/resources/course-lessons.mjs +12 -8
  112. package/resources/course-lessons.mjs.map +1 -1
  113. package/resources/course-students.d.mts +44 -35
  114. package/resources/course-students.d.mts.map +1 -1
  115. package/resources/course-students.d.ts +44 -35
  116. package/resources/course-students.d.ts.map +1 -1
  117. package/resources/course-students.js +3 -2
  118. package/resources/course-students.js.map +1 -1
  119. package/resources/course-students.mjs +3 -2
  120. package/resources/course-students.mjs.map +1 -1
  121. package/resources/courses.d.mts +140 -99
  122. package/resources/courses.d.mts.map +1 -1
  123. package/resources/courses.d.ts +140 -99
  124. package/resources/courses.d.ts.map +1 -1
  125. package/resources/courses.js +9 -5
  126. package/resources/courses.js.map +1 -1
  127. package/resources/courses.mjs +9 -5
  128. package/resources/courses.mjs.map +1 -1
  129. package/resources/disputes.d.mts +176 -120
  130. package/resources/disputes.d.mts.map +1 -1
  131. package/resources/disputes.d.ts +176 -120
  132. package/resources/disputes.d.ts.map +1 -1
  133. package/resources/disputes.js +4 -2
  134. package/resources/disputes.js.map +1 -1
  135. package/resources/disputes.mjs +4 -2
  136. package/resources/disputes.mjs.map +1 -1
  137. package/resources/dm-channels.d.mts +29 -16
  138. package/resources/dm-channels.d.mts.map +1 -1
  139. package/resources/dm-channels.d.ts +29 -16
  140. package/resources/dm-channels.d.ts.map +1 -1
  141. package/resources/dm-channels.js +9 -5
  142. package/resources/dm-channels.js.map +1 -1
  143. package/resources/dm-channels.mjs +9 -5
  144. package/resources/dm-channels.mjs.map +1 -1
  145. package/resources/dm-members.d.mts +30 -21
  146. package/resources/dm-members.d.mts.map +1 -1
  147. package/resources/dm-members.d.ts +30 -21
  148. package/resources/dm-members.d.ts.map +1 -1
  149. package/resources/dm-members.js +9 -5
  150. package/resources/dm-members.js.map +1 -1
  151. package/resources/dm-members.mjs +9 -5
  152. package/resources/dm-members.mjs.map +1 -1
  153. package/resources/entries.d.mts +35 -27
  154. package/resources/entries.d.mts.map +1 -1
  155. package/resources/entries.d.ts +35 -27
  156. package/resources/entries.d.ts.map +1 -1
  157. package/resources/entries.js +7 -4
  158. package/resources/entries.js.map +1 -1
  159. package/resources/entries.mjs +7 -4
  160. package/resources/entries.mjs.map +1 -1
  161. package/resources/experiences.d.mts +58 -49
  162. package/resources/experiences.d.mts.map +1 -1
  163. package/resources/experiences.d.ts +58 -49
  164. package/resources/experiences.d.ts.map +1 -1
  165. package/resources/experiences.js +6 -5
  166. package/resources/experiences.js.map +1 -1
  167. package/resources/experiences.mjs +6 -5
  168. package/resources/experiences.mjs.map +1 -1
  169. package/resources/fee-markups.d.mts +38 -27
  170. package/resources/fee-markups.d.mts.map +1 -1
  171. package/resources/fee-markups.d.ts +38 -27
  172. package/resources/fee-markups.d.ts.map +1 -1
  173. package/resources/fee-markups.js +6 -3
  174. package/resources/fee-markups.js.map +1 -1
  175. package/resources/fee-markups.mjs +6 -3
  176. package/resources/fee-markups.mjs.map +1 -1
  177. package/resources/files.d.mts +23 -19
  178. package/resources/files.d.mts.map +1 -1
  179. package/resources/files.d.ts +23 -19
  180. package/resources/files.d.ts.map +1 -1
  181. package/resources/files.js +3 -2
  182. package/resources/files.js.map +1 -1
  183. package/resources/files.mjs +3 -2
  184. package/resources/files.mjs.map +1 -1
  185. package/resources/forum-posts.d.mts +68 -45
  186. package/resources/forum-posts.d.mts.map +1 -1
  187. package/resources/forum-posts.d.ts +68 -45
  188. package/resources/forum-posts.d.ts.map +1 -1
  189. package/resources/forum-posts.js +8 -4
  190. package/resources/forum-posts.js.map +1 -1
  191. package/resources/forum-posts.mjs +8 -4
  192. package/resources/forum-posts.mjs.map +1 -1
  193. package/resources/forums.d.mts +21 -13
  194. package/resources/forums.d.mts.map +1 -1
  195. package/resources/forums.d.ts +21 -13
  196. package/resources/forums.d.ts.map +1 -1
  197. package/resources/forums.js +5 -3
  198. package/resources/forums.js.map +1 -1
  199. package/resources/forums.mjs +5 -3
  200. package/resources/forums.mjs.map +1 -1
  201. package/resources/index.d.mts +3 -3
  202. package/resources/index.d.mts.map +1 -1
  203. package/resources/index.d.ts +3 -3
  204. package/resources/index.d.ts.map +1 -1
  205. package/resources/index.js.map +1 -1
  206. package/resources/index.mjs.map +1 -1
  207. package/resources/invoices.d.mts +136 -100
  208. package/resources/invoices.d.mts.map +1 -1
  209. package/resources/invoices.d.ts +136 -100
  210. package/resources/invoices.d.ts.map +1 -1
  211. package/resources/invoices.js +7 -4
  212. package/resources/invoices.js.map +1 -1
  213. package/resources/invoices.mjs +7 -4
  214. package/resources/invoices.mjs.map +1 -1
  215. package/resources/leads.d.mts +76 -54
  216. package/resources/leads.d.mts.map +1 -1
  217. package/resources/leads.d.ts +76 -54
  218. package/resources/leads.d.ts.map +1 -1
  219. package/resources/leads.js +6 -4
  220. package/resources/leads.js.map +1 -1
  221. package/resources/leads.mjs +6 -4
  222. package/resources/leads.mjs.map +1 -1
  223. package/resources/ledger-accounts.d.mts +19 -15
  224. package/resources/ledger-accounts.d.mts.map +1 -1
  225. package/resources/ledger-accounts.d.ts +19 -15
  226. package/resources/ledger-accounts.d.ts.map +1 -1
  227. package/resources/ledger-accounts.js +1 -1
  228. package/resources/ledger-accounts.mjs +1 -1
  229. package/resources/members.d.mts +27 -28
  230. package/resources/members.d.mts.map +1 -1
  231. package/resources/members.d.ts +27 -28
  232. package/resources/members.d.ts.map +1 -1
  233. package/resources/members.js +3 -2
  234. package/resources/members.js.map +1 -1
  235. package/resources/members.mjs +3 -2
  236. package/resources/members.mjs.map +1 -1
  237. package/resources/memberships.d.mts +85 -62
  238. package/resources/memberships.d.mts.map +1 -1
  239. package/resources/memberships.d.ts +85 -62
  240. package/resources/memberships.d.ts.map +1 -1
  241. package/resources/memberships.js +12 -8
  242. package/resources/memberships.js.map +1 -1
  243. package/resources/memberships.mjs +12 -8
  244. package/resources/memberships.mjs.map +1 -1
  245. package/resources/messages.d.mts +53 -35
  246. package/resources/messages.d.mts.map +1 -1
  247. package/resources/messages.d.ts +53 -35
  248. package/resources/messages.d.ts.map +1 -1
  249. package/resources/messages.js +9 -5
  250. package/resources/messages.js.map +1 -1
  251. package/resources/messages.mjs +9 -5
  252. package/resources/messages.mjs.map +1 -1
  253. package/resources/notifications.d.mts +33 -25
  254. package/resources/notifications.d.mts.map +1 -1
  255. package/resources/notifications.d.ts +33 -25
  256. package/resources/notifications.d.ts.map +1 -1
  257. package/resources/notifications.js +2 -1
  258. package/resources/notifications.js.map +1 -1
  259. package/resources/notifications.mjs +2 -1
  260. package/resources/notifications.mjs.map +1 -1
  261. package/resources/payment-methods.d.mts +212 -114
  262. package/resources/payment-methods.d.mts.map +1 -1
  263. package/resources/payment-methods.d.ts +212 -114
  264. package/resources/payment-methods.d.ts.map +1 -1
  265. package/resources/payment-methods.js +5 -10
  266. package/resources/payment-methods.js.map +1 -1
  267. package/resources/payment-methods.mjs +5 -10
  268. package/resources/payment-methods.mjs.map +1 -1
  269. package/resources/payments.d.mts +96 -56
  270. package/resources/payments.d.mts.map +1 -1
  271. package/resources/payments.d.ts +96 -56
  272. package/resources/payments.d.ts.map +1 -1
  273. package/resources/payments.js +23 -10
  274. package/resources/payments.js.map +1 -1
  275. package/resources/payments.mjs +23 -10
  276. package/resources/payments.mjs.map +1 -1
  277. package/resources/payout-methods.d.mts +50 -35
  278. package/resources/payout-methods.d.mts.map +1 -1
  279. package/resources/payout-methods.d.ts +50 -35
  280. package/resources/payout-methods.d.ts.map +1 -1
  281. package/resources/payout-methods.js +3 -2
  282. package/resources/payout-methods.js.map +1 -1
  283. package/resources/payout-methods.mjs +3 -2
  284. package/resources/payout-methods.mjs.map +1 -1
  285. package/resources/plans.d.mts +136 -95
  286. package/resources/plans.d.mts.map +1 -1
  287. package/resources/plans.d.ts +136 -95
  288. package/resources/plans.d.ts.map +1 -1
  289. package/resources/plans.js +9 -5
  290. package/resources/plans.js.map +1 -1
  291. package/resources/plans.mjs +9 -5
  292. package/resources/plans.mjs.map +1 -1
  293. package/resources/products.d.mts +80 -67
  294. package/resources/products.d.mts.map +1 -1
  295. package/resources/products.d.ts +80 -67
  296. package/resources/products.d.ts.map +1 -1
  297. package/resources/products.js +7 -5
  298. package/resources/products.js.map +1 -1
  299. package/resources/products.mjs +7 -5
  300. package/resources/products.mjs.map +1 -1
  301. package/resources/promo-codes.d.mts +60 -40
  302. package/resources/promo-codes.d.mts.map +1 -1
  303. package/resources/promo-codes.d.ts +60 -40
  304. package/resources/promo-codes.d.ts.map +1 -1
  305. package/resources/promo-codes.js +7 -4
  306. package/resources/promo-codes.js.map +1 -1
  307. package/resources/promo-codes.mjs +7 -4
  308. package/resources/promo-codes.mjs.map +1 -1
  309. package/resources/reactions.d.mts +25 -19
  310. package/resources/reactions.d.mts.map +1 -1
  311. package/resources/reactions.d.ts +25 -19
  312. package/resources/reactions.d.ts.map +1 -1
  313. package/resources/reactions.js +7 -4
  314. package/resources/reactions.js.map +1 -1
  315. package/resources/reactions.mjs +7 -4
  316. package/resources/reactions.mjs.map +1 -1
  317. package/resources/refunds.d.mts +57 -39
  318. package/resources/refunds.d.mts.map +1 -1
  319. package/resources/refunds.d.ts +57 -39
  320. package/resources/refunds.d.ts.map +1 -1
  321. package/resources/refunds.js +3 -2
  322. package/resources/refunds.js.map +1 -1
  323. package/resources/refunds.mjs +3 -2
  324. package/resources/refunds.mjs.map +1 -1
  325. package/resources/reviews.d.mts +76 -60
  326. package/resources/reviews.d.mts.map +1 -1
  327. package/resources/reviews.d.ts +76 -60
  328. package/resources/reviews.d.ts.map +1 -1
  329. package/resources/reviews.js +3 -2
  330. package/resources/reviews.js.map +1 -1
  331. package/resources/reviews.mjs +3 -2
  332. package/resources/reviews.mjs.map +1 -1
  333. package/resources/setup-intents.d.mts +77 -61
  334. package/resources/setup-intents.d.mts.map +1 -1
  335. package/resources/setup-intents.d.ts +77 -61
  336. package/resources/setup-intents.d.ts.map +1 -1
  337. package/resources/setup-intents.js +4 -10
  338. package/resources/setup-intents.js.map +1 -1
  339. package/resources/setup-intents.mjs +4 -10
  340. package/resources/setup-intents.mjs.map +1 -1
  341. package/resources/shared.d.mts +854 -509
  342. package/resources/shared.d.mts.map +1 -1
  343. package/resources/shared.d.ts +854 -509
  344. package/resources/shared.d.ts.map +1 -1
  345. package/resources/shipments.d.mts +30 -21
  346. package/resources/shipments.d.mts.map +1 -1
  347. package/resources/shipments.d.ts +30 -21
  348. package/resources/shipments.d.ts.map +1 -1
  349. package/resources/shipments.js +5 -3
  350. package/resources/shipments.js.map +1 -1
  351. package/resources/shipments.mjs +5 -3
  352. package/resources/shipments.mjs.map +1 -1
  353. package/resources/support-channels.d.mts +28 -20
  354. package/resources/support-channels.d.mts.map +1 -1
  355. package/resources/support-channels.d.ts +28 -20
  356. package/resources/support-channels.d.ts.map +1 -1
  357. package/resources/support-channels.js +5 -4
  358. package/resources/support-channels.js.map +1 -1
  359. package/resources/support-channels.mjs +5 -4
  360. package/resources/support-channels.mjs.map +1 -1
  361. package/resources/topups.d.mts +13 -9
  362. package/resources/topups.d.mts.map +1 -1
  363. package/resources/topups.d.ts +13 -9
  364. package/resources/topups.d.ts.map +1 -1
  365. package/resources/topups.js +2 -1
  366. package/resources/topups.js.map +1 -1
  367. package/resources/topups.mjs +2 -1
  368. package/resources/topups.mjs.map +1 -1
  369. package/resources/transfers.d.mts +37 -28
  370. package/resources/transfers.d.mts.map +1 -1
  371. package/resources/transfers.d.ts +37 -28
  372. package/resources/transfers.d.ts.map +1 -1
  373. package/resources/transfers.js +5 -3
  374. package/resources/transfers.js.map +1 -1
  375. package/resources/transfers.mjs +5 -3
  376. package/resources/transfers.mjs.map +1 -1
  377. package/resources/users.d.mts +60 -18
  378. package/resources/users.d.mts.map +1 -1
  379. package/resources/users.d.ts +60 -18
  380. package/resources/users.d.ts.map +1 -1
  381. package/resources/users.js +13 -2
  382. package/resources/users.js.map +1 -1
  383. package/resources/users.mjs +13 -2
  384. package/resources/users.mjs.map +1 -1
  385. package/resources/verifications.d.mts +7 -5
  386. package/resources/verifications.d.mts.map +1 -1
  387. package/resources/verifications.d.ts +7 -5
  388. package/resources/verifications.d.ts.map +1 -1
  389. package/resources/verifications.js +1 -1
  390. package/resources/verifications.mjs +1 -1
  391. package/resources/webhooks.d.mts +188 -133
  392. package/resources/webhooks.d.mts.map +1 -1
  393. package/resources/webhooks.d.ts +188 -133
  394. package/resources/webhooks.d.ts.map +1 -1
  395. package/resources/webhooks.js +3 -2
  396. package/resources/webhooks.js.map +1 -1
  397. package/resources/webhooks.mjs +3 -2
  398. package/resources/webhooks.mjs.map +1 -1
  399. package/resources/withdrawals.d.mts +60 -47
  400. package/resources/withdrawals.d.mts.map +1 -1
  401. package/resources/withdrawals.d.ts +60 -47
  402. package/resources/withdrawals.d.ts.map +1 -1
  403. package/resources/withdrawals.js +3 -2
  404. package/resources/withdrawals.js.map +1 -1
  405. package/resources/withdrawals.mjs +3 -2
  406. package/resources/withdrawals.mjs.map +1 -1
  407. package/src/client.ts +33 -11
  408. package/src/resources/access-tokens.ts +37 -59
  409. package/src/resources/account-links.ts +15 -13
  410. package/src/resources/ai-chats.ts +76 -30
  411. package/src/resources/app-builds.ts +37 -35
  412. package/src/resources/apps.ts +89 -60
  413. package/src/resources/authorized-users.ts +38 -32
  414. package/src/resources/chat-channels.ts +28 -20
  415. package/src/resources/checkout-configurations.ts +76 -58
  416. package/src/resources/companies.ts +94 -57
  417. package/src/resources/company-token-transactions.ts +91 -68
  418. package/src/resources/course-chapters.ts +27 -22
  419. package/src/resources/course-lesson-interactions.ts +7 -6
  420. package/src/resources/course-lessons.ts +141 -99
  421. package/src/resources/course-students.ts +44 -35
  422. package/src/resources/courses.ts +140 -99
  423. package/src/resources/disputes.ts +176 -120
  424. package/src/resources/dm-channels.ts +29 -16
  425. package/src/resources/dm-members.ts +30 -21
  426. package/src/resources/entries.ts +35 -27
  427. package/src/resources/experiences.ts +58 -49
  428. package/src/resources/fee-markups.ts +38 -27
  429. package/src/resources/files.ts +23 -19
  430. package/src/resources/forum-posts.ts +69 -45
  431. package/src/resources/forums.ts +21 -13
  432. package/src/resources/index.ts +4 -2
  433. package/src/resources/invoices.ts +140 -100
  434. package/src/resources/leads.ts +76 -54
  435. package/src/resources/ledger-accounts.ts +19 -15
  436. package/src/resources/members.ts +27 -28
  437. package/src/resources/memberships.ts +86 -62
  438. package/src/resources/messages.ts +53 -35
  439. package/src/resources/notifications.ts +33 -25
  440. package/src/resources/payment-methods.ts +212 -114
  441. package/src/resources/payments.ts +103 -55
  442. package/src/resources/payout-methods.ts +50 -35
  443. package/src/resources/plans.ts +136 -95
  444. package/src/resources/products.ts +219 -70
  445. package/src/resources/promo-codes.ts +60 -40
  446. package/src/resources/reactions.ts +25 -19
  447. package/src/resources/refunds.ts +59 -39
  448. package/src/resources/reviews.ts +76 -60
  449. package/src/resources/setup-intents.ts +77 -61
  450. package/src/resources/shared.ts +2797 -508
  451. package/src/resources/shipments.ts +30 -21
  452. package/src/resources/support-channels.ts +28 -20
  453. package/src/resources/topups.ts +13 -9
  454. package/src/resources/transfers.ts +37 -28
  455. package/src/resources/users.ts +72 -18
  456. package/src/resources/verifications.ts +7 -5
  457. package/src/resources/webhooks.ts +188 -133
  458. package/src/resources/withdrawals.ts +60 -46
  459. package/src/version.ts +1 -1
  460. package/version.d.mts +1 -1
  461. package/version.d.ts +1 -1
  462. package/version.js +1 -1
  463. package/version.mjs +1 -1
@@ -5,7 +5,8 @@ import { CursorPage, type CursorPageParams, PagePromise } from "../core/paginati
5
5
  import { RequestOptions } from "../internal/request-options.mjs";
6
6
  export declare class PromoCodes extends APIResource {
7
7
  /**
8
- * Create a new promo code for a product or plan
8
+ * Create a new promo code that applies a discount at checkout. Can be scoped to
9
+ * specific products or plans.
9
10
  *
10
11
  * Required permissions:
11
12
  *
@@ -27,7 +28,7 @@ export declare class PromoCodes extends APIResource {
27
28
  */
28
29
  create(body: PromoCodeCreateParams, options?: RequestOptions): APIPromise<PromoCode>;
29
30
  /**
30
- * Retrieves a promo code by ID
31
+ * Retrieves the details of an existing promo code.
31
32
  *
32
33
  * Required permissions:
33
34
  *
@@ -43,7 +44,8 @@ export declare class PromoCodes extends APIResource {
43
44
  */
44
45
  retrieve(id: string, options?: RequestOptions): APIPromise<PromoCode>;
45
46
  /**
46
- * Lists promo codes for a company
47
+ * Returns a paginated list of promo codes belonging to a company, with optional
48
+ * filtering by product, plan, and status.
47
49
  *
48
50
  * Required permissions:
49
51
  *
@@ -62,7 +64,8 @@ export declare class PromoCodes extends APIResource {
62
64
  */
63
65
  list(query: PromoCodeListParams, options?: RequestOptions): PagePromise<PromoCodeListResponsesCursorPage, PromoCodeListResponse>;
64
66
  /**
65
- * Archive a promo code, preventing further use
67
+ * Archive a promo code, preventing it from being used in future checkouts.
68
+ * Existing memberships are not affected.
66
69
  *
67
70
  * Required permissions:
68
71
  *
@@ -79,15 +82,19 @@ export declare class PromoCodes extends APIResource {
79
82
  }
80
83
  export type PromoCodeListResponsesCursorPage = CursorPage<PromoCodeListResponse>;
81
84
  /**
82
- * An object representing a promo code for a plan.
85
+ * A promo code applies a discount to a plan during checkout. Promo codes can be
86
+ * percentage-based or fixed-amount, and can have usage limits and expiration
87
+ * dates.
83
88
  */
84
89
  export interface PromoCode {
85
90
  /**
86
- * The ID of the promo.
91
+ * The unique identifier for the promo code.
87
92
  */
88
93
  id: string;
89
94
  /**
90
- * The amount off (% or flat amount) for the promo.
95
+ * The discount amount. Interpretation depends on promo_type: if 'percentage', this
96
+ * is the percentage (e.g., 20 means 20% off); if 'flat_amount', this is dollars
97
+ * off (e.g., 10.00 means $10.00 off).
91
98
  */
92
99
  amount_off: number;
93
100
  /**
@@ -103,7 +110,7 @@ export interface PromoCode {
103
110
  */
104
111
  company: PromoCode.Company;
105
112
  /**
106
- * The timestamp of when the promo was created.
113
+ * The datetime the promo code was created.
107
114
  */
108
115
  created_at: string;
109
116
  /**
@@ -166,7 +173,7 @@ export declare namespace PromoCode {
166
173
  */
167
174
  interface Company {
168
175
  /**
169
- * The ID of the company
176
+ * The unique identifier for the company.
170
177
  */
171
178
  id: string;
172
179
  /**
@@ -179,11 +186,12 @@ export declare namespace PromoCode {
179
186
  */
180
187
  interface Product {
181
188
  /**
182
- * The internal ID of the public product.
189
+ * The unique identifier for the product.
183
190
  */
184
191
  id: string;
185
192
  /**
186
- * The title of the product. Use for Whop 4.0.
193
+ * The display name of the product shown to customers on the product page and in
194
+ * search results.
187
195
  */
188
196
  title: string;
189
197
  }
@@ -197,15 +205,19 @@ export type PromoCodeStatus = 'active' | 'inactive' | 'archived';
197
205
  */
198
206
  export type PromoDuration = 'forever' | 'once' | 'repeating';
199
207
  /**
200
- * An object representing a promo code for a plan.
208
+ * A promo code applies a discount to a plan during checkout. Promo codes can be
209
+ * percentage-based or fixed-amount, and can have usage limits and expiration
210
+ * dates.
201
211
  */
202
212
  export interface PromoCodeListResponse {
203
213
  /**
204
- * The ID of the promo.
214
+ * The unique identifier for the promo code.
205
215
  */
206
216
  id: string;
207
217
  /**
208
- * The amount off (% or flat amount) for the promo.
218
+ * The discount amount. Interpretation depends on promo_type: if 'percentage', this
219
+ * is the percentage (e.g., 20 means 20% off); if 'flat_amount', this is dollars
220
+ * off (e.g., 10.00 means $10.00 off).
209
221
  */
210
222
  amount_off: number;
211
223
  /**
@@ -217,7 +229,7 @@ export interface PromoCodeListResponse {
217
229
  */
218
230
  code: string | null;
219
231
  /**
220
- * The timestamp of when the promo was created.
232
+ * The datetime the promo code was created.
221
233
  */
222
234
  created_at: string;
223
235
  /**
@@ -280,11 +292,12 @@ export declare namespace PromoCodeListResponse {
280
292
  */
281
293
  interface Product {
282
294
  /**
283
- * The internal ID of the public product.
295
+ * The unique identifier for the product.
284
296
  */
285
297
  id: string;
286
298
  /**
287
- * The title of the product. Use for Whop 4.0.
299
+ * The display name of the product shown to customers on the product page and in
300
+ * search results.
288
301
  */
289
302
  title: string;
290
303
  }
@@ -295,72 +308,79 @@ export declare namespace PromoCodeListResponse {
295
308
  export type PromoCodeDeleteResponse = boolean;
296
309
  export interface PromoCodeCreateParams {
297
310
  /**
298
- * The amount off (% or flat amount) for the promo.
311
+ * The discount amount. When promo_type is percentage, this is the percent off
312
+ * (e.g., 20 for 20% off). When promo_type is flat_amount, this is the currency
313
+ * amount off (e.g., 10.00 for $10.00 off).
299
314
  */
300
315
  amount_off: number;
301
316
  /**
302
- * The monetary currency of the promo code.
317
+ * The three-letter ISO currency code for the promo code discount.
303
318
  */
304
319
  base_currency: Shared.Currency;
305
320
  /**
306
- * The specific code used to apply the promo at checkout.
321
+ * The alphanumeric code customers enter at checkout to apply the discount.
307
322
  */
308
323
  code: string;
309
324
  /**
310
- * The id of the company to create the promo code for.
325
+ * The unique identifier of the company to create this promo code for.
311
326
  */
312
327
  company_id: string;
313
328
  /**
314
- * Restricts promo use to only users who have never purchased from the company
315
- * before.
329
+ * Whether to restrict this promo code to only users who have never purchased from
330
+ * the company before.
316
331
  */
317
332
  new_users_only: boolean;
318
333
  /**
319
- * The number of months this promo code is applied and valid for.
334
+ * The number of billing months the discount remains active. For example, 3 means
335
+ * the discount applies to the first 3 billing cycles.
320
336
  */
321
337
  promo_duration_months: number;
322
338
  /**
323
- * The type (% or flat amount) of the promo.
339
+ * The discount type, either percentage or flat_amount.
324
340
  */
325
341
  promo_type: Shared.PromoType;
326
342
  /**
327
- * Restricts promo use to only users who have churned from the company before.
343
+ * Whether to restrict this promo code to only users who have previously churned
344
+ * from the company.
328
345
  */
329
346
  churned_users_only?: boolean | null;
330
347
  /**
331
- * Whether this promo code is for existing memberships only (cancelations)
348
+ * Whether this promo code can only be applied to existing memberships, such as for
349
+ * cancellation retention offers.
332
350
  */
333
351
  existing_memberships_only?: boolean | null;
334
352
  /**
335
- * The date/time of when the promo expires.
353
+ * The datetime when the promo code expires and can no longer be used. Null means
354
+ * it never expires.
336
355
  */
337
356
  expires_at?: string | null;
338
357
  /**
339
- * Restricts promo use to only be applied once per customer.
358
+ * Whether each customer can only use this promo code once.
340
359
  */
341
360
  one_per_customer?: boolean | null;
342
361
  /**
343
- * The IDs of the plans that the promo code applies to. If product_id is provided,
344
- * it will only apply to plans attached to that product
362
+ * The identifiers of plans this promo code applies to. When product_id is also
363
+ * provided, only plans attached to that product are included.
345
364
  */
346
365
  plan_ids?: Array<string> | null;
347
366
  /**
348
- * The product to lock the promo code to, if any. If provided will filter out any
349
- * plan ids not attached to this product
367
+ * The identifier of the product to scope this promo code to. When provided, the
368
+ * promo code only applies to plans attached to this product.
350
369
  */
351
370
  product_id?: string | null;
352
371
  /**
353
- * The quantity limit on the number of uses.
372
+ * The maximum number of times this promo code can be used. Ignored when
373
+ * unlimited_stock is true.
354
374
  */
355
375
  stock?: number | null;
356
376
  /**
357
- * Whether or not the promo code should have unlimited stock.
377
+ * Whether the promo code can be used an unlimited number of times.
358
378
  */
359
379
  unlimited_stock?: boolean | null;
360
380
  }
361
381
  export interface PromoCodeListParams extends CursorPageParams {
362
382
  /**
363
- * The ID of the company to list promo codes for
383
+ * The unique identifier of the company to list promo codes for.
364
384
  */
365
385
  company_id: string;
366
386
  /**
@@ -368,11 +388,11 @@ export interface PromoCodeListParams extends CursorPageParams {
368
388
  */
369
389
  before?: string | null;
370
390
  /**
371
- * The minimum creation date to filter by
391
+ * Only return promo codes created after this timestamp.
372
392
  */
373
393
  created_after?: string | null;
374
394
  /**
375
- * The maximum creation date to filter by
395
+ * Only return promo codes created before this timestamp.
376
396
  */
377
397
  created_before?: string | null;
378
398
  /**
@@ -384,11 +404,11 @@ export interface PromoCodeListParams extends CursorPageParams {
384
404
  */
385
405
  last?: number | null;
386
406
  /**
387
- * Filter promo codes by plan ID(s)
407
+ * Filter to only promo codes scoped to these plan identifiers.
388
408
  */
389
409
  plan_ids?: Array<string> | null;
390
410
  /**
391
- * Filter promo codes by product ID(s)
411
+ * Filter to only promo codes scoped to these product identifiers.
392
412
  */
393
413
  product_ids?: Array<string> | null;
394
414
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"promo-codes.d.mts","sourceRoot":"","sources":["../src/resources/promo-codes.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,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAIpF;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAIrE;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CACF,KAAK,EAAE,mBAAmB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,gCA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ACH"}
@@ -5,7 +5,8 @@ import { CursorPage, type CursorPageParams, PagePromise } from "../core/paginati
5
5
  import { RequestOptions } from "../internal/request-options.js";
6
6
  export declare class PromoCodes extends APIResource {
7
7
  /**
8
- * Create a new promo code for a product or plan
8
+ * Create a new promo code that applies a discount at checkout. Can be scoped to
9
+ * specific products or plans.
9
10
  *
10
11
  * Required permissions:
11
12
  *
@@ -27,7 +28,7 @@ export declare class PromoCodes extends APIResource {
27
28
  */
28
29
  create(body: PromoCodeCreateParams, options?: RequestOptions): APIPromise<PromoCode>;
29
30
  /**
30
- * Retrieves a promo code by ID
31
+ * Retrieves the details of an existing promo code.
31
32
  *
32
33
  * Required permissions:
33
34
  *
@@ -43,7 +44,8 @@ export declare class PromoCodes extends APIResource {
43
44
  */
44
45
  retrieve(id: string, options?: RequestOptions): APIPromise<PromoCode>;
45
46
  /**
46
- * Lists promo codes for a company
47
+ * Returns a paginated list of promo codes belonging to a company, with optional
48
+ * filtering by product, plan, and status.
47
49
  *
48
50
  * Required permissions:
49
51
  *
@@ -62,7 +64,8 @@ export declare class PromoCodes extends APIResource {
62
64
  */
63
65
  list(query: PromoCodeListParams, options?: RequestOptions): PagePromise<PromoCodeListResponsesCursorPage, PromoCodeListResponse>;
64
66
  /**
65
- * Archive a promo code, preventing further use
67
+ * Archive a promo code, preventing it from being used in future checkouts.
68
+ * Existing memberships are not affected.
66
69
  *
67
70
  * Required permissions:
68
71
  *
@@ -79,15 +82,19 @@ export declare class PromoCodes extends APIResource {
79
82
  }
80
83
  export type PromoCodeListResponsesCursorPage = CursorPage<PromoCodeListResponse>;
81
84
  /**
82
- * An object representing a promo code for a plan.
85
+ * A promo code applies a discount to a plan during checkout. Promo codes can be
86
+ * percentage-based or fixed-amount, and can have usage limits and expiration
87
+ * dates.
83
88
  */
84
89
  export interface PromoCode {
85
90
  /**
86
- * The ID of the promo.
91
+ * The unique identifier for the promo code.
87
92
  */
88
93
  id: string;
89
94
  /**
90
- * The amount off (% or flat amount) for the promo.
95
+ * The discount amount. Interpretation depends on promo_type: if 'percentage', this
96
+ * is the percentage (e.g., 20 means 20% off); if 'flat_amount', this is dollars
97
+ * off (e.g., 10.00 means $10.00 off).
91
98
  */
92
99
  amount_off: number;
93
100
  /**
@@ -103,7 +110,7 @@ export interface PromoCode {
103
110
  */
104
111
  company: PromoCode.Company;
105
112
  /**
106
- * The timestamp of when the promo was created.
113
+ * The datetime the promo code was created.
107
114
  */
108
115
  created_at: string;
109
116
  /**
@@ -166,7 +173,7 @@ export declare namespace PromoCode {
166
173
  */
167
174
  interface Company {
168
175
  /**
169
- * The ID of the company
176
+ * The unique identifier for the company.
170
177
  */
171
178
  id: string;
172
179
  /**
@@ -179,11 +186,12 @@ export declare namespace PromoCode {
179
186
  */
180
187
  interface Product {
181
188
  /**
182
- * The internal ID of the public product.
189
+ * The unique identifier for the product.
183
190
  */
184
191
  id: string;
185
192
  /**
186
- * The title of the product. Use for Whop 4.0.
193
+ * The display name of the product shown to customers on the product page and in
194
+ * search results.
187
195
  */
188
196
  title: string;
189
197
  }
@@ -197,15 +205,19 @@ export type PromoCodeStatus = 'active' | 'inactive' | 'archived';
197
205
  */
198
206
  export type PromoDuration = 'forever' | 'once' | 'repeating';
199
207
  /**
200
- * An object representing a promo code for a plan.
208
+ * A promo code applies a discount to a plan during checkout. Promo codes can be
209
+ * percentage-based or fixed-amount, and can have usage limits and expiration
210
+ * dates.
201
211
  */
202
212
  export interface PromoCodeListResponse {
203
213
  /**
204
- * The ID of the promo.
214
+ * The unique identifier for the promo code.
205
215
  */
206
216
  id: string;
207
217
  /**
208
- * The amount off (% or flat amount) for the promo.
218
+ * The discount amount. Interpretation depends on promo_type: if 'percentage', this
219
+ * is the percentage (e.g., 20 means 20% off); if 'flat_amount', this is dollars
220
+ * off (e.g., 10.00 means $10.00 off).
209
221
  */
210
222
  amount_off: number;
211
223
  /**
@@ -217,7 +229,7 @@ export interface PromoCodeListResponse {
217
229
  */
218
230
  code: string | null;
219
231
  /**
220
- * The timestamp of when the promo was created.
232
+ * The datetime the promo code was created.
221
233
  */
222
234
  created_at: string;
223
235
  /**
@@ -280,11 +292,12 @@ export declare namespace PromoCodeListResponse {
280
292
  */
281
293
  interface Product {
282
294
  /**
283
- * The internal ID of the public product.
295
+ * The unique identifier for the product.
284
296
  */
285
297
  id: string;
286
298
  /**
287
- * The title of the product. Use for Whop 4.0.
299
+ * The display name of the product shown to customers on the product page and in
300
+ * search results.
288
301
  */
289
302
  title: string;
290
303
  }
@@ -295,72 +308,79 @@ export declare namespace PromoCodeListResponse {
295
308
  export type PromoCodeDeleteResponse = boolean;
296
309
  export interface PromoCodeCreateParams {
297
310
  /**
298
- * The amount off (% or flat amount) for the promo.
311
+ * The discount amount. When promo_type is percentage, this is the percent off
312
+ * (e.g., 20 for 20% off). When promo_type is flat_amount, this is the currency
313
+ * amount off (e.g., 10.00 for $10.00 off).
299
314
  */
300
315
  amount_off: number;
301
316
  /**
302
- * The monetary currency of the promo code.
317
+ * The three-letter ISO currency code for the promo code discount.
303
318
  */
304
319
  base_currency: Shared.Currency;
305
320
  /**
306
- * The specific code used to apply the promo at checkout.
321
+ * The alphanumeric code customers enter at checkout to apply the discount.
307
322
  */
308
323
  code: string;
309
324
  /**
310
- * The id of the company to create the promo code for.
325
+ * The unique identifier of the company to create this promo code for.
311
326
  */
312
327
  company_id: string;
313
328
  /**
314
- * Restricts promo use to only users who have never purchased from the company
315
- * before.
329
+ * Whether to restrict this promo code to only users who have never purchased from
330
+ * the company before.
316
331
  */
317
332
  new_users_only: boolean;
318
333
  /**
319
- * The number of months this promo code is applied and valid for.
334
+ * The number of billing months the discount remains active. For example, 3 means
335
+ * the discount applies to the first 3 billing cycles.
320
336
  */
321
337
  promo_duration_months: number;
322
338
  /**
323
- * The type (% or flat amount) of the promo.
339
+ * The discount type, either percentage or flat_amount.
324
340
  */
325
341
  promo_type: Shared.PromoType;
326
342
  /**
327
- * Restricts promo use to only users who have churned from the company before.
343
+ * Whether to restrict this promo code to only users who have previously churned
344
+ * from the company.
328
345
  */
329
346
  churned_users_only?: boolean | null;
330
347
  /**
331
- * Whether this promo code is for existing memberships only (cancelations)
348
+ * Whether this promo code can only be applied to existing memberships, such as for
349
+ * cancellation retention offers.
332
350
  */
333
351
  existing_memberships_only?: boolean | null;
334
352
  /**
335
- * The date/time of when the promo expires.
353
+ * The datetime when the promo code expires and can no longer be used. Null means
354
+ * it never expires.
336
355
  */
337
356
  expires_at?: string | null;
338
357
  /**
339
- * Restricts promo use to only be applied once per customer.
358
+ * Whether each customer can only use this promo code once.
340
359
  */
341
360
  one_per_customer?: boolean | null;
342
361
  /**
343
- * The IDs of the plans that the promo code applies to. If product_id is provided,
344
- * it will only apply to plans attached to that product
362
+ * The identifiers of plans this promo code applies to. When product_id is also
363
+ * provided, only plans attached to that product are included.
345
364
  */
346
365
  plan_ids?: Array<string> | null;
347
366
  /**
348
- * The product to lock the promo code to, if any. If provided will filter out any
349
- * plan ids not attached to this product
367
+ * The identifier of the product to scope this promo code to. When provided, the
368
+ * promo code only applies to plans attached to this product.
350
369
  */
351
370
  product_id?: string | null;
352
371
  /**
353
- * The quantity limit on the number of uses.
372
+ * The maximum number of times this promo code can be used. Ignored when
373
+ * unlimited_stock is true.
354
374
  */
355
375
  stock?: number | null;
356
376
  /**
357
- * Whether or not the promo code should have unlimited stock.
377
+ * Whether the promo code can be used an unlimited number of times.
358
378
  */
359
379
  unlimited_stock?: boolean | null;
360
380
  }
361
381
  export interface PromoCodeListParams extends CursorPageParams {
362
382
  /**
363
- * The ID of the company to list promo codes for
383
+ * The unique identifier of the company to list promo codes for.
364
384
  */
365
385
  company_id: string;
366
386
  /**
@@ -368,11 +388,11 @@ export interface PromoCodeListParams extends CursorPageParams {
368
388
  */
369
389
  before?: string | null;
370
390
  /**
371
- * The minimum creation date to filter by
391
+ * Only return promo codes created after this timestamp.
372
392
  */
373
393
  created_after?: string | null;
374
394
  /**
375
- * The maximum creation date to filter by
395
+ * Only return promo codes created before this timestamp.
376
396
  */
377
397
  created_before?: string | null;
378
398
  /**
@@ -384,11 +404,11 @@ export interface PromoCodeListParams extends CursorPageParams {
384
404
  */
385
405
  last?: number | null;
386
406
  /**
387
- * Filter promo codes by plan ID(s)
407
+ * Filter to only promo codes scoped to these plan identifiers.
388
408
  */
389
409
  plan_ids?: Array<string> | null;
390
410
  /**
391
- * Filter promo codes by product ID(s)
411
+ * Filter to only promo codes scoped to these product identifiers.
392
412
  */
393
413
  product_ids?: Array<string> | null;
394
414
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"promo-codes.d.ts","sourceRoot":"","sources":["../src/resources/promo-codes.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,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAIpF;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAIrE;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CACF,KAAK,EAAE,mBAAmB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,gCAAgC,EAAE,qBAAqB,CAAC;IAIvE;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;CAGlF;AAED,MAAM,MAAM,gCAAgC,GAAG,UAAU,CAAC,qBAAqB,CAAC,CAAC;AAEjF;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;I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AAC;CAClC;AAED,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB;IAC3D;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAEhC;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAEnC;;OAEG;IACH,MAAM,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;CACjC;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
@@ -7,7 +7,8 @@ const pagination_1 = require("../core/pagination.js");
7
7
  const path_1 = require("../internal/utils/path.js");
8
8
  class PromoCodes extends resource_1.APIResource {
9
9
  /**
10
- * Create a new promo code for a product or plan
10
+ * Create a new promo code that applies a discount at checkout. Can be scoped to
11
+ * specific products or plans.
11
12
  *
12
13
  * Required permissions:
13
14
  *
@@ -31,7 +32,7 @@ class PromoCodes extends resource_1.APIResource {
31
32
  return this._client.post('/promo_codes', { body, ...options });
32
33
  }
33
34
  /**
34
- * Retrieves a promo code by ID
35
+ * Retrieves the details of an existing promo code.
35
36
  *
36
37
  * Required permissions:
37
38
  *
@@ -49,7 +50,8 @@ class PromoCodes extends resource_1.APIResource {
49
50
  return this._client.get((0, path_1.path) `/promo_codes/${id}`, options);
50
51
  }
51
52
  /**
52
- * Lists promo codes for a company
53
+ * Returns a paginated list of promo codes belonging to a company, with optional
54
+ * filtering by product, plan, and status.
53
55
  *
54
56
  * Required permissions:
55
57
  *
@@ -70,7 +72,8 @@ class PromoCodes extends resource_1.APIResource {
70
72
  return this._client.getAPIList('/promo_codes', (pagination_1.CursorPage), { query, ...options });
71
73
  }
72
74
  /**
73
- * Archive a promo code, preventing further use
75
+ * Archive a promo code, preventing it from being used in future checkouts.
76
+ * Existing memberships are not affected.
74
77
  *
75
78
  * Required permissions:
76
79
  *
@@ -1 +1 @@
1
- {"version":3,"file":"promo-codes.js","sourceRoot":"","sources":["../src/resources/promo-codes.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,UAAW,SAAQ,sBAAW;IACzC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,MAAM,CAAC,IAA2B,EAAE,OAAwB;QAC1D,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,KAA0B,EAC1B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC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