@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
@@ -10,7 +10,8 @@ import { path } from '../internal/utils/path';
10
10
 
11
11
  export class Invoices extends APIResource {
12
12
  /**
13
- * Creates an invoice
13
+ * Create an invoice for a customer. The invoice can be charged automatically using
14
+ * a stored payment method, or sent to the customer for manual payment.
14
15
  *
15
16
  * Required permissions:
16
17
  *
@@ -34,7 +35,7 @@ export class Invoices extends APIResource {
34
35
  }
35
36
 
36
37
  /**
37
- * Retrieves an invoice by ID or token
38
+ * Retrieves the details of an existing invoice.
38
39
  *
39
40
  * Required permissions:
40
41
  *
@@ -46,7 +47,8 @@ export class Invoices extends APIResource {
46
47
  }
47
48
 
48
49
  /**
49
- * Lists invoices
50
+ * Returns a paginated list of invoices for a company, with optional filtering by
51
+ * product, status, collection method, and creation date.
50
52
  *
51
53
  * Required permissions:
52
54
  *
@@ -61,7 +63,8 @@ export class Invoices extends APIResource {
61
63
  }
62
64
 
63
65
  /**
64
- * Void an invoice
66
+ * Void an open invoice so it can no longer be paid. Voiding is permanent and
67
+ * cannot be undone.
65
68
  *
66
69
  * Required permissions:
67
70
  *
@@ -86,54 +89,60 @@ export type InvoiceCreateParams =
86
89
  export declare namespace InvoiceCreateParams {
87
90
  export interface CreateInvoiceInputWithProductAndMemberID {
88
91
  /**
89
- * The method of collection for this invoice. If using charge_automatically, you
90
- * must provide a payment_token.
92
+ * How the invoice should be collected. Use charge_automatically to charge a stored
93
+ * payment method, or send_invoice to email the customer.
91
94
  */
92
95
  collection_method: Shared.CollectionMethod;
93
96
 
94
97
  /**
95
- * The company ID to create this invoice for.
98
+ * The unique identifier of the company to create this invoice for.
96
99
  */
97
100
  company_id: string;
98
101
 
99
102
  /**
100
- * The date the invoice is due, if applicable.
103
+ * The date by which the invoice must be paid.
101
104
  */
102
105
  due_date: string;
103
106
 
104
107
  /**
105
- * The member ID to create this invoice for. Include this if you want to create an
106
- * invoice for an existing member. If you do not have a member ID, you must provide
107
- * an email_address and customer_name.
108
+ * The unique identifier of an existing member to create this invoice for. If not
109
+ * provided, you must supply an email_address and customer_name.
108
110
  */
109
111
  member_id: string;
110
112
 
111
113
  /**
112
- * The properties of the plan to create for this invoice.
114
+ * The plan attributes defining the price, currency, and billing interval for this
115
+ * invoice.
113
116
  */
114
117
  plan: CreateInvoiceInputWithProductAndMemberID.Plan;
115
118
 
116
119
  /**
117
- * The properties of the product to create for this invoice. Include this if you
118
- * want to create an invoice for a new product.
120
+ * The properties of the product to create for this invoice. Provide this to create
121
+ * a new product inline.
119
122
  */
120
123
  product: CreateInvoiceInputWithProductAndMemberID.Product;
121
124
 
122
125
  /**
123
- * Whether or not to charge the customer a buyer fee.
126
+ * The date and time when the invoice will be automatically finalized and charged.
127
+ * Only valid when collection_method is charge_automatically. If not provided, the
128
+ * charge will be processed immediately.
129
+ */
130
+ automatically_finalizes_at?: string | null;
131
+
132
+ /**
133
+ * Whether to charge the customer a buyer fee on this invoice.
124
134
  */
125
135
  charge_buyer_fee?: boolean | null;
126
136
 
127
137
  /**
128
- * The name of the customer to create this invoice for. This is required if you
129
- * want to create an invoice for a customer who does not have a member of your
130
- * company yet.
138
+ * The name of the customer. Required when creating an invoice for a customer who
139
+ * is not yet a member of the company.
131
140
  */
132
141
  customer_name?: string | null;
133
142
 
134
143
  /**
135
- * The payment method ID to use for this invoice. If using charge_automatically,
136
- * you must provide a payment_method_id.
144
+ * The unique identifier of the payment method to charge. Required when
145
+ * collection_method is charge_automatically.
137
146
  */
138
147
  payment_method_id?: string | null;
139
148
 
@@ -146,11 +155,12 @@ export declare namespace InvoiceCreateParams {
146
155
 
147
156
  export namespace CreateInvoiceInputWithProductAndMemberID {
148
157
  /**
149
- * The properties of the plan to create for this invoice.
158
+ * The plan attributes defining the price, currency, and billing interval for this
159
+ * invoice.
150
160
  */
151
161
  export interface Plan {
152
162
  /**
153
- * The interval at which the plan charges (renewal plans).
163
+ * The interval in days at which the plan charges (renewal plans).
154
164
  */
155
165
  billing_period?: number | null;
156
166
 
@@ -165,14 +175,15 @@ export declare namespace InvoiceCreateParams {
165
175
  description?: string | null;
166
176
 
167
177
  /**
168
- * The interval at which the plan charges (expiration plans).
178
+ * The number of days until the membership expires and revokes access (expiration
179
+ * plans). For example, 365 for a one-year access period.
169
180
  */
170
181
  expiration_days?: number | null;
171
182
 
172
183
  /**
173
184
  * An additional amount charged upon first purchase. Use only if a one time payment
174
185
  * OR you want to charge an additional amount on top of the renewal price. Provided
175
- * as a number in dollars. Eg: 10.43 for $10.43
186
+ * as a number in the specified currency. Eg: 10.43 for $10.43
176
187
  */
177
188
  initial_price?: number | null;
178
189
 
@@ -193,7 +204,7 @@ export declare namespace InvoiceCreateParams {
193
204
 
194
205
  /**
195
206
  * The amount the customer is charged every billing period. Use only if a recurring
196
- * payment. Provided as a number in dollars. Eg: 10.43 for $10.43
207
+ * payment. Provided as a number in the specified currency. Eg: 10.43 for $10.43
197
208
  */
198
209
  renewal_price?: number | null;
199
210
 
@@ -208,7 +219,8 @@ export declare namespace InvoiceCreateParams {
208
219
  trial_period_days?: number | null;
209
220
 
210
221
  /**
211
- * Limits/doesn't limit the number of units available for purchase.
222
+ * When true, the plan has unlimited stock (stock field is ignored). When false,
223
+ * purchases are limited by the stock field.
212
224
  */
213
225
  unlimited_stock?: boolean | null;
214
226
 
@@ -253,8 +265,8 @@ export declare namespace InvoiceCreateParams {
253
265
  }
254
266
 
255
267
  /**
256
- * The properties of the product to create for this invoice. Include this if you
257
- * want to create an invoice for a new product.
268
+ * The properties of the product to create for this invoice. Provide this to create
269
+ * a new product inline.
258
270
  */
259
271
  export interface Product {
260
272
  /**
@@ -271,53 +283,60 @@ export declare namespace InvoiceCreateParams {
271
283
 
272
284
  export interface CreateInvoiceInputWithProductAndEmailAddress {
273
285
  /**
274
- * The method of collection for this invoice. If using charge_automatically, you
275
- * must provide a payment_token.
286
+ * How the invoice should be collected. Use charge_automatically to charge a stored
287
+ * payment method, or send_invoice to email the customer.
276
288
  */
277
289
  collection_method: Shared.CollectionMethod;
278
290
 
279
291
  /**
280
- * The company ID to create this invoice for.
292
+ * The unique identifier of the company to create this invoice for.
281
293
  */
282
294
  company_id: string;
283
295
 
284
296
  /**
285
- * The date the invoice is due, if applicable.
297
+ * The date by which the invoice must be paid.
286
298
  */
287
299
  due_date: string;
288
300
 
289
301
  /**
290
- * The email address to create this invoice for. This is required if you want to
291
- * create an invoice for a user who does not have a member of your company yet.
302
+ * The email address of the customer. Required when creating an invoice for a
303
+ * customer who is not yet a member of the company.
292
304
  */
293
305
  email_address: string;
294
306
 
295
307
  /**
296
- * The properties of the plan to create for this invoice.
308
+ * The plan attributes defining the price, currency, and billing interval for this
309
+ * invoice.
297
310
  */
298
311
  plan: CreateInvoiceInputWithProductAndEmailAddress.Plan;
299
312
 
300
313
  /**
301
- * The properties of the product to create for this invoice. Include this if you
302
- * want to create an invoice for a new product.
314
+ * The properties of the product to create for this invoice. Provide this to create
315
+ * a new product inline.
303
316
  */
304
317
  product: CreateInvoiceInputWithProductAndEmailAddress.Product;
305
318
 
306
319
  /**
307
- * Whether or not to charge the customer a buyer fee.
320
+ * The date and time when the invoice will be automatically finalized and charged.
321
+ * Only valid when collection_method is charge_automatically. If not provided, the
322
+ * charge will be processed immediately.
323
+ */
324
+ automatically_finalizes_at?: string | null;
325
+
326
+ /**
327
+ * Whether to charge the customer a buyer fee on this invoice.
308
328
  */
309
329
  charge_buyer_fee?: boolean | null;
310
330
 
311
331
  /**
312
- * The name of the customer to create this invoice for. This is required if you
313
- * want to create an invoice for a customer who does not have a member of your
314
- * company yet.
332
+ * The name of the customer. Required when creating an invoice for a customer who
333
+ * is not yet a member of the company.
315
334
  */
316
335
  customer_name?: string | null;
317
336
 
318
337
  /**
319
- * The payment method ID to use for this invoice. If using charge_automatically,
320
- * you must provide a payment_method_id.
338
+ * The unique identifier of the payment method to charge. Required when
339
+ * collection_method is charge_automatically.
321
340
  */
322
341
  payment_method_id?: string | null;
323
342
 
@@ -330,11 +349,12 @@ export declare namespace InvoiceCreateParams {
330
349
 
331
350
  export namespace CreateInvoiceInputWithProductAndEmailAddress {
332
351
  /**
333
- * The properties of the plan to create for this invoice.
352
+ * The plan attributes defining the price, currency, and billing interval for this
353
+ * invoice.
334
354
  */
335
355
  export interface Plan {
336
356
  /**
337
- * The interval at which the plan charges (renewal plans).
357
+ * The interval in days at which the plan charges (renewal plans).
338
358
  */
339
359
  billing_period?: number | null;
340
360
 
@@ -349,14 +369,15 @@ export declare namespace InvoiceCreateParams {
349
369
  description?: string | null;
350
370
 
351
371
  /**
352
- * The interval at which the plan charges (expiration plans).
372
+ * The number of days until the membership expires and revokes access (expiration
373
+ * plans). For example, 365 for a one-year access period.
353
374
  */
354
375
  expiration_days?: number | null;
355
376
 
356
377
  /**
357
378
  * An additional amount charged upon first purchase. Use only if a one time payment
358
379
  * OR you want to charge an additional amount on top of the renewal price. Provided
359
- * as a number in dollars. Eg: 10.43 for $10.43
380
+ * as a number in the specified currency. Eg: 10.43 for $10.43
360
381
  */
361
382
  initial_price?: number | null;
362
383
 
@@ -377,7 +398,7 @@ export declare namespace InvoiceCreateParams {
377
398
 
378
399
  /**
379
400
  * The amount the customer is charged every billing period. Use only if a recurring
380
- * payment. Provided as a number in dollars. Eg: 10.43 for $10.43
401
+ * payment. Provided as a number in the specified currency. Eg: 10.43 for $10.43
381
402
  */
382
403
  renewal_price?: number | null;
383
404
 
@@ -392,7 +413,8 @@ export declare namespace InvoiceCreateParams {
392
413
  trial_period_days?: number | null;
393
414
 
394
415
  /**
395
- * Limits/doesn't limit the number of units available for purchase.
416
+ * When true, the plan has unlimited stock (stock field is ignored). When false,
417
+ * purchases are limited by the stock field.
396
418
  */
397
419
  unlimited_stock?: boolean | null;
398
420
 
@@ -437,8 +459,8 @@ export declare namespace InvoiceCreateParams {
437
459
  }
438
460
 
439
461
  /**
440
- * The properties of the product to create for this invoice. Include this if you
441
- * want to create an invoice for a new product.
462
+ * The properties of the product to create for this invoice. Provide this to create
463
+ * a new product inline.
442
464
  */
443
465
  export interface Product {
444
466
  /**
@@ -455,54 +477,59 @@ export declare namespace InvoiceCreateParams {
455
477
 
456
478
  export interface CreateInvoiceInputWithProductIDAndMemberID {
457
479
  /**
458
- * The method of collection for this invoice. If using charge_automatically, you
459
- * must provide a payment_token.
480
+ * How the invoice should be collected. Use charge_automatically to charge a stored
481
+ * payment method, or send_invoice to email the customer.
460
482
  */
461
483
  collection_method: Shared.CollectionMethod;
462
484
 
463
485
  /**
464
- * The company ID to create this invoice for.
486
+ * The unique identifier of the company to create this invoice for.
465
487
  */
466
488
  company_id: string;
467
489
 
468
490
  /**
469
- * The date the invoice is due, if applicable.
491
+ * The date by which the invoice must be paid.
470
492
  */
471
493
  due_date: string;
472
494
 
473
495
  /**
474
- * The member ID to create this invoice for. Include this if you want to create an
475
- * invoice for an existing member. If you do not have a member ID, you must provide
476
- * an email_address and customer_name.
496
+ * The unique identifier of an existing member to create this invoice for. If not
497
+ * provided, you must supply an email_address and customer_name.
477
498
  */
478
499
  member_id: string;
479
500
 
480
501
  /**
481
- * The properties of the plan to create for this invoice.
502
+ * The plan attributes defining the price, currency, and billing interval for this
503
+ * invoice.
482
504
  */
483
505
  plan: CreateInvoiceInputWithProductIDAndMemberID.Plan;
484
506
 
485
507
  /**
486
- * The product ID to create this invoice for. Include this if you want to create an
487
- * invoice for an existing product.
508
+ * The unique identifier of an existing product to create this invoice for.
488
509
  */
489
510
  product_id: string;
490
511
 
491
512
  /**
492
- * Whether or not to charge the customer a buyer fee.
513
+ * The date and time when the invoice will be automatically finalized and charged.
514
+ * Only valid when collection_method is charge_automatically. If not provided, the
515
+ * charge will be processed immediately.
516
+ */
517
+ automatically_finalizes_at?: string | null;
518
+
519
+ /**
520
+ * Whether to charge the customer a buyer fee on this invoice.
493
521
  */
494
522
  charge_buyer_fee?: boolean | null;
495
523
 
496
524
  /**
497
- * The name of the customer to create this invoice for. This is required if you
498
- * want to create an invoice for a customer who does not have a member of your
499
- * company yet.
525
+ * The name of the customer. Required when creating an invoice for a customer who
526
+ * is not yet a member of the company.
500
527
  */
501
528
  customer_name?: string | null;
502
529
 
503
530
  /**
504
- * The payment method ID to use for this invoice. If using charge_automatically,
505
- * you must provide a payment_method_id.
531
+ * The unique identifier of the payment method to charge. Required when
532
+ * collection_method is charge_automatically.
506
533
  */
507
534
  payment_method_id?: string | null;
508
535
 
@@ -515,11 +542,12 @@ export declare namespace InvoiceCreateParams {
515
542
 
516
543
  export namespace CreateInvoiceInputWithProductIDAndMemberID {
517
544
  /**
518
- * The properties of the plan to create for this invoice.
545
+ * The plan attributes defining the price, currency, and billing interval for this
546
+ * invoice.
519
547
  */
520
548
  export interface Plan {
521
549
  /**
522
- * The interval at which the plan charges (renewal plans).
550
+ * The interval in days at which the plan charges (renewal plans).
523
551
  */
524
552
  billing_period?: number | null;
525
553
 
@@ -534,14 +562,15 @@ export declare namespace InvoiceCreateParams {
534
562
  description?: string | null;
535
563
 
536
564
  /**
537
- * The interval at which the plan charges (expiration plans).
565
+ * The number of days until the membership expires and revokes access (expiration
566
+ * plans). For example, 365 for a one-year access period.
538
567
  */
539
568
  expiration_days?: number | null;
540
569
 
541
570
  /**
542
571
  * An additional amount charged upon first purchase. Use only if a one time payment
543
572
  * OR you want to charge an additional amount on top of the renewal price. Provided
544
- * as a number in dollars. Eg: 10.43 for $10.43
573
+ * as a number in the specified currency. Eg: 10.43 for $10.43
545
574
  */
546
575
  initial_price?: number | null;
547
576
 
@@ -562,7 +591,7 @@ export declare namespace InvoiceCreateParams {
562
591
 
563
592
  /**
564
593
  * The amount the customer is charged every billing period. Use only if a recurring
565
- * payment. Provided as a number in dollars. Eg: 10.43 for $10.43
594
+ * payment. Provided as a number in the specified currency. Eg: 10.43 for $10.43
566
595
  */
567
596
  renewal_price?: number | null;
568
597
 
@@ -577,7 +606,8 @@ export declare namespace InvoiceCreateParams {
577
606
  trial_period_days?: number | null;
578
607
 
579
608
  /**
580
- * Limits/doesn't limit the number of units available for purchase.
609
+ * When true, the plan has unlimited stock (stock field is ignored). When false,
610
+ * purchases are limited by the stock field.
581
611
  */
582
612
  unlimited_stock?: boolean | null;
583
613
 
@@ -624,53 +654,59 @@ export declare namespace InvoiceCreateParams {
624
654
 
625
655
  export interface CreateInvoiceInputWithProductIDAndEmailAddress {
626
656
  /**
627
- * The method of collection for this invoice. If using charge_automatically, you
628
- * must provide a payment_token.
657
+ * How the invoice should be collected. Use charge_automatically to charge a stored
658
+ * payment method, or send_invoice to email the customer.
629
659
  */
630
660
  collection_method: Shared.CollectionMethod;
631
661
 
632
662
  /**
633
- * The company ID to create this invoice for.
663
+ * The unique identifier of the company to create this invoice for.
634
664
  */
635
665
  company_id: string;
636
666
 
637
667
  /**
638
- * The date the invoice is due, if applicable.
668
+ * The date by which the invoice must be paid.
639
669
  */
640
670
  due_date: string;
641
671
 
642
672
  /**
643
- * The email address to create this invoice for. This is required if you want to
644
- * create an invoice for a user who does not have a member of your company yet.
673
+ * The email address of the customer. Required when creating an invoice for a
674
+ * customer who is not yet a member of the company.
645
675
  */
646
676
  email_address: string;
647
677
 
648
678
  /**
649
- * The properties of the plan to create for this invoice.
679
+ * The plan attributes defining the price, currency, and billing interval for this
680
+ * invoice.
650
681
  */
651
682
  plan: CreateInvoiceInputWithProductIDAndEmailAddress.Plan;
652
683
 
653
684
  /**
654
- * The product ID to create this invoice for. Include this if you want to create an
655
- * invoice for an existing product.
685
+ * The unique identifier of an existing product to create this invoice for.
656
686
  */
657
687
  product_id: string;
658
688
 
659
689
  /**
660
- * Whether or not to charge the customer a buyer fee.
690
+ * The date and time when the invoice will be automatically finalized and charged.
691
+ * Only valid when collection_method is charge_automatically. If not provided, the
692
+ * charge will be processed immediately.
693
+ */
694
+ automatically_finalizes_at?: string | null;
695
+
696
+ /**
697
+ * Whether to charge the customer a buyer fee on this invoice.
661
698
  */
662
699
  charge_buyer_fee?: boolean | null;
663
700
 
664
701
  /**
665
- * The name of the customer to create this invoice for. This is required if you
666
- * want to create an invoice for a customer who does not have a member of your
667
- * company yet.
702
+ * The name of the customer. Required when creating an invoice for a customer who
703
+ * is not yet a member of the company.
668
704
  */
669
705
  customer_name?: string | null;
670
706
 
671
707
  /**
672
- * The payment method ID to use for this invoice. If using charge_automatically,
673
- * you must provide a payment_method_id.
708
+ * The unique identifier of the payment method to charge. Required when
709
+ * collection_method is charge_automatically.
674
710
  */
675
711
  payment_method_id?: string | null;
676
712
 
@@ -683,11 +719,12 @@ export declare namespace InvoiceCreateParams {
683
719
 
684
720
  export namespace CreateInvoiceInputWithProductIDAndEmailAddress {
685
721
  /**
686
- * The properties of the plan to create for this invoice.
722
+ * The plan attributes defining the price, currency, and billing interval for this
723
+ * invoice.
687
724
  */
688
725
  export interface Plan {
689
726
  /**
690
- * The interval at which the plan charges (renewal plans).
727
+ * The interval in days at which the plan charges (renewal plans).
691
728
  */
692
729
  billing_period?: number | null;
693
730
 
@@ -702,14 +739,15 @@ export declare namespace InvoiceCreateParams {
702
739
  description?: string | null;
703
740
 
704
741
  /**
705
- * The interval at which the plan charges (expiration plans).
742
+ * The number of days until the membership expires and revokes access (expiration
743
+ * plans). For example, 365 for a one-year access period.
706
744
  */
707
745
  expiration_days?: number | null;
708
746
 
709
747
  /**
710
748
  * An additional amount charged upon first purchase. Use only if a one time payment
711
749
  * OR you want to charge an additional amount on top of the renewal price. Provided
712
- * as a number in dollars. Eg: 10.43 for $10.43
750
+ * as a number in the specified currency. Eg: 10.43 for $10.43
713
751
  */
714
752
  initial_price?: number | null;
715
753
 
@@ -730,7 +768,7 @@ export declare namespace InvoiceCreateParams {
730
768
 
731
769
  /**
732
770
  * The amount the customer is charged every billing period. Use only if a recurring
733
- * payment. Provided as a number in dollars. Eg: 10.43 for $10.43
771
+ * payment. Provided as a number in the specified currency. Eg: 10.43 for $10.43
734
772
  */
735
773
  renewal_price?: number | null;
736
774
 
@@ -745,7 +783,8 @@ export declare namespace InvoiceCreateParams {
745
783
  trial_period_days?: number | null;
746
784
 
747
785
  /**
748
- * Limits/doesn't limit the number of units available for purchase.
786
+ * When true, the plan has unlimited stock (stock field is ignored). When false,
787
+ * purchases are limited by the stock field.
749
788
  */
750
789
  unlimited_stock?: boolean | null;
751
790
 
@@ -793,7 +832,7 @@ export declare namespace InvoiceCreateParams {
793
832
 
794
833
  export interface InvoiceListParams extends CursorPageParams {
795
834
  /**
796
- * The ID of the company to list invoices for
835
+ * The unique identifier of the company to list invoices for.
797
836
  */
798
837
  company_id: string;
799
838
 
@@ -803,17 +842,17 @@ export interface InvoiceListParams extends CursorPageParams {
803
842
  before?: string | null;
804
843
 
805
844
  /**
806
- * Filter invoices by their collection method
845
+ * Filter invoices by their collection method.
807
846
  */
808
847
  collection_methods?: Array<Shared.CollectionMethod> | null;
809
848
 
810
849
  /**
811
- * The minimum creation date to filter by
850
+ * Only return invoices created after this timestamp.
812
851
  */
813
852
  created_after?: string | null;
814
853
 
815
854
  /**
816
- * The maximum creation date to filter by
855
+ * Only return invoices created before this timestamp.
817
856
  */
818
857
  created_before?: string | null;
819
858
 
@@ -838,12 +877,13 @@ export interface InvoiceListParams extends CursorPageParams {
838
877
  order?: 'id' | 'created_at' | 'due_date' | null;
839
878
 
840
879
  /**
841
- * Return only invoices created for these specific product ids
880
+ * Filter invoices to only those associated with these specific product
881
+ * identifiers.
842
882
  */
843
883
  product_ids?: Array<string> | null;
844
884
 
845
885
  /**
846
- * The statuses to filter the invoices by
886
+ * Filter invoices by their current status.
847
887
  */
848
888
  statuses?: Array<Shared.InvoiceStatus> | null;
849
889
  }