@whop/sdk 0.0.1-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (597) hide show
  1. package/CHANGELOG.md +108 -0
  2. package/LICENSE +201 -0
  3. package/README.md +399 -0
  4. package/api-promise.d.mts +2 -0
  5. package/api-promise.d.mts.map +1 -0
  6. package/api-promise.d.ts +2 -0
  7. package/api-promise.d.ts.map +1 -0
  8. package/api-promise.js +6 -0
  9. package/api-promise.js.map +1 -0
  10. package/api-promise.mjs +2 -0
  11. package/api-promise.mjs.map +1 -0
  12. package/client.d.mts +316 -0
  13. package/client.d.mts.map +1 -0
  14. package/client.d.ts +316 -0
  15. package/client.d.ts.map +1 -0
  16. package/client.js +536 -0
  17. package/client.js.map +1 -0
  18. package/client.mjs +532 -0
  19. package/client.mjs.map +1 -0
  20. package/core/api-promise.d.mts +46 -0
  21. package/core/api-promise.d.mts.map +1 -0
  22. package/core/api-promise.d.ts +46 -0
  23. package/core/api-promise.d.ts.map +1 -0
  24. package/core/api-promise.js +74 -0
  25. package/core/api-promise.js.map +1 -0
  26. package/core/api-promise.mjs +70 -0
  27. package/core/api-promise.mjs.map +1 -0
  28. package/core/error.d.mts +46 -0
  29. package/core/error.d.mts.map +1 -0
  30. package/core/error.d.ts +46 -0
  31. package/core/error.d.ts.map +1 -0
  32. package/core/error.js +113 -0
  33. package/core/error.js.map +1 -0
  34. package/core/error.mjs +97 -0
  35. package/core/error.mjs.map +1 -0
  36. package/core/pagination.d.mts +58 -0
  37. package/core/pagination.d.mts.map +1 -0
  38. package/core/pagination.d.ts +58 -0
  39. package/core/pagination.d.ts.map +1 -0
  40. package/core/pagination.js +101 -0
  41. package/core/pagination.js.map +1 -0
  42. package/core/pagination.mjs +95 -0
  43. package/core/pagination.mjs.map +1 -0
  44. package/core/resource.d.mts +6 -0
  45. package/core/resource.d.mts.map +1 -0
  46. package/core/resource.d.ts +6 -0
  47. package/core/resource.d.ts.map +1 -0
  48. package/core/resource.js +11 -0
  49. package/core/resource.js.map +1 -0
  50. package/core/resource.mjs +7 -0
  51. package/core/resource.mjs.map +1 -0
  52. package/core/uploads.d.mts +3 -0
  53. package/core/uploads.d.mts.map +1 -0
  54. package/core/uploads.d.ts +3 -0
  55. package/core/uploads.d.ts.map +1 -0
  56. package/core/uploads.js +6 -0
  57. package/core/uploads.js.map +1 -0
  58. package/core/uploads.mjs +2 -0
  59. package/core/uploads.mjs.map +1 -0
  60. package/error.d.mts +2 -0
  61. package/error.d.mts.map +1 -0
  62. package/error.d.ts +2 -0
  63. package/error.d.ts.map +1 -0
  64. package/error.js +6 -0
  65. package/error.js.map +1 -0
  66. package/error.mjs +2 -0
  67. package/error.mjs.map +1 -0
  68. package/index.d.mts +7 -0
  69. package/index.d.mts.map +1 -0
  70. package/index.d.ts +7 -0
  71. package/index.d.ts.map +1 -0
  72. package/index.js +32 -0
  73. package/index.js.map +1 -0
  74. package/index.mjs +8 -0
  75. package/index.mjs.map +1 -0
  76. package/internal/builtin-types.d.mts +73 -0
  77. package/internal/builtin-types.d.mts.map +1 -0
  78. package/internal/builtin-types.d.ts +73 -0
  79. package/internal/builtin-types.d.ts.map +1 -0
  80. package/internal/builtin-types.js +4 -0
  81. package/internal/builtin-types.js.map +1 -0
  82. package/internal/builtin-types.mjs +3 -0
  83. package/internal/builtin-types.mjs.map +1 -0
  84. package/internal/detect-platform.d.mts +15 -0
  85. package/internal/detect-platform.d.mts.map +1 -0
  86. package/internal/detect-platform.d.ts +15 -0
  87. package/internal/detect-platform.d.ts.map +1 -0
  88. package/internal/detect-platform.js +162 -0
  89. package/internal/detect-platform.js.map +1 -0
  90. package/internal/detect-platform.mjs +157 -0
  91. package/internal/detect-platform.mjs.map +1 -0
  92. package/internal/errors.d.mts +3 -0
  93. package/internal/errors.d.mts.map +1 -0
  94. package/internal/errors.d.ts +3 -0
  95. package/internal/errors.d.ts.map +1 -0
  96. package/internal/errors.js +41 -0
  97. package/internal/errors.js.map +1 -0
  98. package/internal/errors.mjs +36 -0
  99. package/internal/errors.mjs.map +1 -0
  100. package/internal/headers.d.mts +20 -0
  101. package/internal/headers.d.mts.map +1 -0
  102. package/internal/headers.d.ts +20 -0
  103. package/internal/headers.d.ts.map +1 -0
  104. package/internal/headers.js +79 -0
  105. package/internal/headers.js.map +1 -0
  106. package/internal/headers.mjs +74 -0
  107. package/internal/headers.mjs.map +1 -0
  108. package/internal/parse.d.mts +12 -0
  109. package/internal/parse.d.mts.map +1 -0
  110. package/internal/parse.d.ts +12 -0
  111. package/internal/parse.d.ts.map +1 -0
  112. package/internal/parse.js +35 -0
  113. package/internal/parse.js.map +1 -0
  114. package/internal/parse.mjs +32 -0
  115. package/internal/parse.mjs.map +1 -0
  116. package/internal/qs/formats.d.mts +7 -0
  117. package/internal/qs/formats.d.mts.map +1 -0
  118. package/internal/qs/formats.d.ts +7 -0
  119. package/internal/qs/formats.d.ts.map +1 -0
  120. package/internal/qs/formats.js +13 -0
  121. package/internal/qs/formats.js.map +1 -0
  122. package/internal/qs/formats.mjs +9 -0
  123. package/internal/qs/formats.mjs.map +1 -0
  124. package/internal/qs/index.d.mts +10 -0
  125. package/internal/qs/index.d.mts.map +1 -0
  126. package/internal/qs/index.d.ts +10 -0
  127. package/internal/qs/index.d.ts.map +1 -0
  128. package/internal/qs/index.js +14 -0
  129. package/internal/qs/index.js.map +1 -0
  130. package/internal/qs/index.mjs +10 -0
  131. package/internal/qs/index.mjs.map +1 -0
  132. package/internal/qs/stringify.d.mts +3 -0
  133. package/internal/qs/stringify.d.mts.map +1 -0
  134. package/internal/qs/stringify.d.ts +3 -0
  135. package/internal/qs/stringify.d.ts.map +1 -0
  136. package/internal/qs/stringify.js +277 -0
  137. package/internal/qs/stringify.js.map +1 -0
  138. package/internal/qs/stringify.mjs +274 -0
  139. package/internal/qs/stringify.mjs.map +1 -0
  140. package/internal/qs/types.d.mts +57 -0
  141. package/internal/qs/types.d.mts.map +1 -0
  142. package/internal/qs/types.d.ts +57 -0
  143. package/internal/qs/types.d.ts.map +1 -0
  144. package/internal/qs/types.js +3 -0
  145. package/internal/qs/types.js.map +1 -0
  146. package/internal/qs/types.mjs +2 -0
  147. package/internal/qs/types.mjs.map +1 -0
  148. package/internal/qs/utils.d.mts +15 -0
  149. package/internal/qs/utils.d.mts.map +1 -0
  150. package/internal/qs/utils.d.ts +15 -0
  151. package/internal/qs/utils.d.ts.map +1 -0
  152. package/internal/qs/utils.js +230 -0
  153. package/internal/qs/utils.js.map +1 -0
  154. package/internal/qs/utils.mjs +217 -0
  155. package/internal/qs/utils.mjs.map +1 -0
  156. package/internal/request-options.d.mts +75 -0
  157. package/internal/request-options.d.mts.map +1 -0
  158. package/internal/request-options.d.ts +75 -0
  159. package/internal/request-options.d.ts.map +1 -0
  160. package/internal/request-options.js +14 -0
  161. package/internal/request-options.js.map +1 -0
  162. package/internal/request-options.mjs +10 -0
  163. package/internal/request-options.mjs.map +1 -0
  164. package/internal/shim-types.d.mts +17 -0
  165. package/internal/shim-types.d.mts.map +1 -0
  166. package/internal/shim-types.d.ts +17 -0
  167. package/internal/shim-types.d.ts.map +1 -0
  168. package/internal/shim-types.js +4 -0
  169. package/internal/shim-types.js.map +1 -0
  170. package/internal/shim-types.mjs +3 -0
  171. package/internal/shim-types.mjs.map +1 -0
  172. package/internal/shims.d.mts +20 -0
  173. package/internal/shims.d.mts.map +1 -0
  174. package/internal/shims.d.ts +20 -0
  175. package/internal/shims.d.ts.map +1 -0
  176. package/internal/shims.js +92 -0
  177. package/internal/shims.js.map +1 -0
  178. package/internal/shims.mjs +85 -0
  179. package/internal/shims.mjs.map +1 -0
  180. package/internal/to-file.d.mts +45 -0
  181. package/internal/to-file.d.mts.map +1 -0
  182. package/internal/to-file.d.ts +45 -0
  183. package/internal/to-file.d.ts.map +1 -0
  184. package/internal/to-file.js +91 -0
  185. package/internal/to-file.js.map +1 -0
  186. package/internal/to-file.mjs +88 -0
  187. package/internal/to-file.mjs.map +1 -0
  188. package/internal/tslib.js +81 -0
  189. package/internal/tslib.mjs +17 -0
  190. package/internal/types.d.mts +69 -0
  191. package/internal/types.d.mts.map +1 -0
  192. package/internal/types.d.ts +69 -0
  193. package/internal/types.d.ts.map +1 -0
  194. package/internal/types.js +4 -0
  195. package/internal/types.js.map +1 -0
  196. package/internal/types.mjs +3 -0
  197. package/internal/types.mjs.map +1 -0
  198. package/internal/uploads.d.mts +42 -0
  199. package/internal/uploads.d.mts.map +1 -0
  200. package/internal/uploads.d.ts +42 -0
  201. package/internal/uploads.d.ts.map +1 -0
  202. package/internal/uploads.js +141 -0
  203. package/internal/uploads.js.map +1 -0
  204. package/internal/uploads.mjs +131 -0
  205. package/internal/uploads.mjs.map +1 -0
  206. package/internal/utils/base64.d.mts +3 -0
  207. package/internal/utils/base64.d.mts.map +1 -0
  208. package/internal/utils/base64.d.ts +3 -0
  209. package/internal/utils/base64.d.ts.map +1 -0
  210. package/internal/utils/base64.js +38 -0
  211. package/internal/utils/base64.js.map +1 -0
  212. package/internal/utils/base64.mjs +33 -0
  213. package/internal/utils/base64.mjs.map +1 -0
  214. package/internal/utils/bytes.d.mts +4 -0
  215. package/internal/utils/bytes.d.mts.map +1 -0
  216. package/internal/utils/bytes.d.ts +4 -0
  217. package/internal/utils/bytes.d.ts.map +1 -0
  218. package/internal/utils/bytes.js +31 -0
  219. package/internal/utils/bytes.js.map +1 -0
  220. package/internal/utils/bytes.mjs +26 -0
  221. package/internal/utils/bytes.mjs.map +1 -0
  222. package/internal/utils/env.d.mts +9 -0
  223. package/internal/utils/env.d.mts.map +1 -0
  224. package/internal/utils/env.d.ts +9 -0
  225. package/internal/utils/env.d.ts.map +1 -0
  226. package/internal/utils/env.js +22 -0
  227. package/internal/utils/env.js.map +1 -0
  228. package/internal/utils/env.mjs +18 -0
  229. package/internal/utils/env.mjs.map +1 -0
  230. package/internal/utils/log.d.mts +37 -0
  231. package/internal/utils/log.d.mts.map +1 -0
  232. package/internal/utils/log.d.ts +37 -0
  233. package/internal/utils/log.d.ts.map +1 -0
  234. package/internal/utils/log.js +85 -0
  235. package/internal/utils/log.js.map +1 -0
  236. package/internal/utils/log.mjs +79 -0
  237. package/internal/utils/log.mjs.map +1 -0
  238. package/internal/utils/path.d.mts +15 -0
  239. package/internal/utils/path.d.mts.map +1 -0
  240. package/internal/utils/path.d.ts +15 -0
  241. package/internal/utils/path.d.ts.map +1 -0
  242. package/internal/utils/path.js +79 -0
  243. package/internal/utils/path.js.map +1 -0
  244. package/internal/utils/path.mjs +74 -0
  245. package/internal/utils/path.mjs.map +1 -0
  246. package/internal/utils/sleep.d.mts +2 -0
  247. package/internal/utils/sleep.d.mts.map +1 -0
  248. package/internal/utils/sleep.d.ts +2 -0
  249. package/internal/utils/sleep.d.ts.map +1 -0
  250. package/internal/utils/sleep.js +7 -0
  251. package/internal/utils/sleep.js.map +1 -0
  252. package/internal/utils/sleep.mjs +3 -0
  253. package/internal/utils/sleep.mjs.map +1 -0
  254. package/internal/utils/uuid.d.mts +5 -0
  255. package/internal/utils/uuid.d.mts.map +1 -0
  256. package/internal/utils/uuid.d.ts +5 -0
  257. package/internal/utils/uuid.d.ts.map +1 -0
  258. package/internal/utils/uuid.js +19 -0
  259. package/internal/utils/uuid.js.map +1 -0
  260. package/internal/utils/uuid.mjs +15 -0
  261. package/internal/utils/uuid.mjs.map +1 -0
  262. package/internal/utils/values.d.mts +18 -0
  263. package/internal/utils/values.d.mts.map +1 -0
  264. package/internal/utils/values.d.ts +18 -0
  265. package/internal/utils/values.d.ts.map +1 -0
  266. package/internal/utils/values.js +112 -0
  267. package/internal/utils/values.js.map +1 -0
  268. package/internal/utils/values.mjs +94 -0
  269. package/internal/utils/values.mjs.map +1 -0
  270. package/internal/utils.d.mts +7 -0
  271. package/internal/utils.d.mts.map +1 -0
  272. package/internal/utils.d.ts +7 -0
  273. package/internal/utils.d.ts.map +1 -0
  274. package/internal/utils.js +11 -0
  275. package/internal/utils.js.map +1 -0
  276. package/internal/utils.mjs +8 -0
  277. package/internal/utils.mjs.map +1 -0
  278. package/lib/verify-user-token.d.mts +21 -0
  279. package/lib/verify-user-token.d.mts.map +1 -0
  280. package/lib/verify-user-token.d.ts +21 -0
  281. package/lib/verify-user-token.d.ts.map +1 -0
  282. package/lib/verify-user-token.js +69 -0
  283. package/lib/verify-user-token.js.map +1 -0
  284. package/lib/verify-user-token.mjs +64 -0
  285. package/lib/verify-user-token.mjs.map +1 -0
  286. package/package.json +160 -0
  287. package/pagination.d.mts +2 -0
  288. package/pagination.d.mts.map +1 -0
  289. package/pagination.d.ts +2 -0
  290. package/pagination.d.ts.map +1 -0
  291. package/pagination.js +6 -0
  292. package/pagination.js.map +1 -0
  293. package/pagination.mjs +2 -0
  294. package/pagination.mjs.map +1 -0
  295. package/resource.d.mts +2 -0
  296. package/resource.d.mts.map +1 -0
  297. package/resource.d.ts +2 -0
  298. package/resource.d.ts.map +1 -0
  299. package/resource.js +6 -0
  300. package/resource.js.map +1 -0
  301. package/resource.mjs +2 -0
  302. package/resource.mjs.map +1 -0
  303. package/resources/app-builds.d.mts +196 -0
  304. package/resources/app-builds.d.mts.map +1 -0
  305. package/resources/app-builds.d.ts +196 -0
  306. package/resources/app-builds.d.ts.map +1 -0
  307. package/resources/app-builds.js +84 -0
  308. package/resources/app-builds.js.map +1 -0
  309. package/resources/app-builds.mjs +80 -0
  310. package/resources/app-builds.mjs.map +1 -0
  311. package/resources/apps.d.mts +279 -0
  312. package/resources/apps.d.mts.map +1 -0
  313. package/resources/apps.d.ts +279 -0
  314. package/resources/apps.d.ts.map +1 -0
  315. package/resources/apps.js +77 -0
  316. package/resources/apps.js.map +1 -0
  317. package/resources/apps.mjs +73 -0
  318. package/resources/apps.mjs.map +1 -0
  319. package/resources/authorized-users.d.mts +136 -0
  320. package/resources/authorized-users.d.mts.map +1 -0
  321. package/resources/authorized-users.d.ts +136 -0
  322. package/resources/authorized-users.d.ts.map +1 -0
  323. package/resources/authorized-users.js +36 -0
  324. package/resources/authorized-users.js.map +1 -0
  325. package/resources/authorized-users.mjs +32 -0
  326. package/resources/authorized-users.mjs.map +1 -0
  327. package/resources/chat-channels.d.mts +158 -0
  328. package/resources/chat-channels.d.mts.map +1 -0
  329. package/resources/chat-channels.d.ts +158 -0
  330. package/resources/chat-channels.d.ts.map +1 -0
  331. package/resources/chat-channels.js +66 -0
  332. package/resources/chat-channels.js.map +1 -0
  333. package/resources/chat-channels.mjs +62 -0
  334. package/resources/chat-channels.mjs.map +1 -0
  335. package/resources/checkout-configurations.d.mts +319 -0
  336. package/resources/checkout-configurations.d.mts.map +1 -0
  337. package/resources/checkout-configurations.d.ts +319 -0
  338. package/resources/checkout-configurations.d.ts.map +1 -0
  339. package/resources/checkout-configurations.js +66 -0
  340. package/resources/checkout-configurations.js.map +1 -0
  341. package/resources/checkout-configurations.mjs +62 -0
  342. package/resources/checkout-configurations.mjs.map +1 -0
  343. package/resources/companies.d.mts +15 -0
  344. package/resources/companies.d.mts.map +1 -0
  345. package/resources/companies.d.ts +15 -0
  346. package/resources/companies.d.ts.map +1 -0
  347. package/resources/companies.js +20 -0
  348. package/resources/companies.js.map +1 -0
  349. package/resources/companies.mjs +16 -0
  350. package/resources/companies.mjs.map +1 -0
  351. package/resources/course-lesson-interactions.d.mts +61 -0
  352. package/resources/course-lesson-interactions.d.mts.map +1 -0
  353. package/resources/course-lesson-interactions.d.ts +61 -0
  354. package/resources/course-lesson-interactions.d.ts.map +1 -0
  355. package/resources/course-lesson-interactions.js +33 -0
  356. package/resources/course-lesson-interactions.js.map +1 -0
  357. package/resources/course-lesson-interactions.mjs +29 -0
  358. package/resources/course-lesson-interactions.mjs.map +1 -0
  359. package/resources/entries.d.mts +169 -0
  360. package/resources/entries.d.mts.map +1 -0
  361. package/resources/entries.d.ts +169 -0
  362. package/resources/entries.d.ts.map +1 -0
  363. package/resources/entries.js +55 -0
  364. package/resources/entries.js.map +1 -0
  365. package/resources/entries.mjs +51 -0
  366. package/resources/entries.mjs.map +1 -0
  367. package/resources/experiences.d.mts +277 -0
  368. package/resources/experiences.d.mts.map +1 -0
  369. package/resources/experiences.d.ts +277 -0
  370. package/resources/experiences.d.ts.map +1 -0
  371. package/resources/experiences.js +128 -0
  372. package/resources/experiences.js.map +1 -0
  373. package/resources/experiences.mjs +124 -0
  374. package/resources/experiences.mjs.map +1 -0
  375. package/resources/forum-posts.d.mts +242 -0
  376. package/resources/forum-posts.d.mts.map +1 -0
  377. package/resources/forum-posts.d.ts +242 -0
  378. package/resources/forum-posts.d.ts.map +1 -0
  379. package/resources/forum-posts.js +63 -0
  380. package/resources/forum-posts.js.map +1 -0
  381. package/resources/forum-posts.mjs +59 -0
  382. package/resources/forum-posts.mjs.map +1 -0
  383. package/resources/index.d.mts +25 -0
  384. package/resources/index.d.mts.map +1 -0
  385. package/resources/index.d.ts +25 -0
  386. package/resources/index.d.ts.map +1 -0
  387. package/resources/index.js +53 -0
  388. package/resources/index.js.map +1 -0
  389. package/resources/index.mjs +26 -0
  390. package/resources/index.mjs.map +1 -0
  391. package/resources/invoices.d.mts +296 -0
  392. package/resources/invoices.d.mts.map +1 -0
  393. package/resources/invoices.d.ts +296 -0
  394. package/resources/invoices.d.ts.map +1 -0
  395. package/resources/invoices.js +88 -0
  396. package/resources/invoices.js.map +1 -0
  397. package/resources/invoices.mjs +84 -0
  398. package/resources/invoices.mjs.map +1 -0
  399. package/resources/ledger-accounts.d.mts +116 -0
  400. package/resources/ledger-accounts.d.mts.map +1 -0
  401. package/resources/ledger-accounts.d.ts +116 -0
  402. package/resources/ledger-accounts.d.ts.map +1 -0
  403. package/resources/ledger-accounts.js +20 -0
  404. package/resources/ledger-accounts.js.map +1 -0
  405. package/resources/ledger-accounts.mjs +16 -0
  406. package/resources/ledger-accounts.mjs.map +1 -0
  407. package/resources/memberships.d.mts +287 -0
  408. package/resources/memberships.d.mts.map +1 -0
  409. package/resources/memberships.d.ts +287 -0
  410. package/resources/memberships.d.ts.map +1 -0
  411. package/resources/memberships.js +76 -0
  412. package/resources/memberships.js.map +1 -0
  413. package/resources/memberships.mjs +72 -0
  414. package/resources/memberships.mjs.map +1 -0
  415. package/resources/messages.d.mts +245 -0
  416. package/resources/messages.d.mts.map +1 -0
  417. package/resources/messages.d.ts +245 -0
  418. package/resources/messages.d.ts.map +1 -0
  419. package/resources/messages.js +41 -0
  420. package/resources/messages.js.map +1 -0
  421. package/resources/messages.mjs +37 -0
  422. package/resources/messages.mjs.map +1 -0
  423. package/resources/payments.d.mts +472 -0
  424. package/resources/payments.d.mts.map +1 -0
  425. package/resources/payments.d.ts +472 -0
  426. package/resources/payments.d.ts.map +1 -0
  427. package/resources/payments.js +129 -0
  428. package/resources/payments.js.map +1 -0
  429. package/resources/payments.mjs +125 -0
  430. package/resources/payments.mjs.map +1 -0
  431. package/resources/plans.d.mts +479 -0
  432. package/resources/plans.d.mts.map +1 -0
  433. package/resources/plans.d.ts +479 -0
  434. package/resources/plans.d.ts.map +1 -0
  435. package/resources/plans.js +104 -0
  436. package/resources/plans.js.map +1 -0
  437. package/resources/plans.mjs +100 -0
  438. package/resources/plans.mjs.map +1 -0
  439. package/resources/products.d.mts +425 -0
  440. package/resources/products.d.mts.map +1 -0
  441. package/resources/products.d.ts +425 -0
  442. package/resources/products.d.ts.map +1 -0
  443. package/resources/products.js +102 -0
  444. package/resources/products.js.map +1 -0
  445. package/resources/products.mjs +98 -0
  446. package/resources/products.mjs.map +1 -0
  447. package/resources/reactions.d.mts +105 -0
  448. package/resources/reactions.d.mts.map +1 -0
  449. package/resources/reactions.d.ts +105 -0
  450. package/resources/reactions.d.ts.map +1 -0
  451. package/resources/reactions.js +41 -0
  452. package/resources/reactions.js.map +1 -0
  453. package/resources/reactions.mjs +37 -0
  454. package/resources/reactions.mjs.map +1 -0
  455. package/resources/shared.d.mts +2309 -0
  456. package/resources/shared.d.mts.map +1 -0
  457. package/resources/shared.d.ts +2309 -0
  458. package/resources/shared.d.ts.map +1 -0
  459. package/resources/shared.js +4 -0
  460. package/resources/shared.js.map +1 -0
  461. package/resources/shared.mjs +3 -0
  462. package/resources/shared.mjs.map +1 -0
  463. package/resources/shipments.d.mts +159 -0
  464. package/resources/shipments.d.mts.map +1 -0
  465. package/resources/shipments.d.ts +159 -0
  466. package/resources/shipments.d.ts.map +1 -0
  467. package/resources/shipments.js +68 -0
  468. package/resources/shipments.js.map +1 -0
  469. package/resources/shipments.mjs +64 -0
  470. package/resources/shipments.mjs.map +1 -0
  471. package/resources/support-channels.d.mts +151 -0
  472. package/resources/support-channels.d.mts.map +1 -0
  473. package/resources/support-channels.d.ts +151 -0
  474. package/resources/support-channels.d.ts.map +1 -0
  475. package/resources/support-channels.js +69 -0
  476. package/resources/support-channels.js.map +1 -0
  477. package/resources/support-channels.mjs +65 -0
  478. package/resources/support-channels.mjs.map +1 -0
  479. package/resources/transfers.d.mts +158 -0
  480. package/resources/transfers.d.mts.map +1 -0
  481. package/resources/transfers.d.ts +158 -0
  482. package/resources/transfers.d.ts.map +1 -0
  483. package/resources/transfers.js +66 -0
  484. package/resources/transfers.js.map +1 -0
  485. package/resources/transfers.mjs +62 -0
  486. package/resources/transfers.mjs.map +1 -0
  487. package/resources/users.d.mts +58 -0
  488. package/resources/users.d.mts.map +1 -0
  489. package/resources/users.d.ts +58 -0
  490. package/resources/users.d.ts.map +1 -0
  491. package/resources/users.js +23 -0
  492. package/resources/users.js.map +1 -0
  493. package/resources/users.mjs +19 -0
  494. package/resources/users.mjs.map +1 -0
  495. package/resources/webhooks.d.mts +101 -0
  496. package/resources/webhooks.d.mts.map +1 -0
  497. package/resources/webhooks.d.ts +101 -0
  498. package/resources/webhooks.d.ts.map +1 -0
  499. package/resources/webhooks.js +20 -0
  500. package/resources/webhooks.js.map +1 -0
  501. package/resources/webhooks.mjs +16 -0
  502. package/resources/webhooks.mjs.map +1 -0
  503. package/resources.d.mts +2 -0
  504. package/resources.d.mts.map +1 -0
  505. package/resources.d.ts +2 -0
  506. package/resources.d.ts.map +1 -0
  507. package/resources.js +5 -0
  508. package/resources.js.map +1 -0
  509. package/resources.mjs +2 -0
  510. package/resources.mjs.map +1 -0
  511. package/src/api-promise.ts +2 -0
  512. package/src/client.ts +1197 -0
  513. package/src/core/README.md +3 -0
  514. package/src/core/api-promise.ts +92 -0
  515. package/src/core/error.ts +130 -0
  516. package/src/core/pagination.ts +161 -0
  517. package/src/core/resource.ts +11 -0
  518. package/src/core/uploads.ts +2 -0
  519. package/src/error.ts +2 -0
  520. package/src/index.ts +23 -0
  521. package/src/internal/README.md +3 -0
  522. package/src/internal/builtin-types.ts +93 -0
  523. package/src/internal/detect-platform.ts +196 -0
  524. package/src/internal/errors.ts +33 -0
  525. package/src/internal/headers.ts +97 -0
  526. package/src/internal/parse.ts +50 -0
  527. package/src/internal/qs/LICENSE.md +13 -0
  528. package/src/internal/qs/README.md +3 -0
  529. package/src/internal/qs/formats.ts +10 -0
  530. package/src/internal/qs/index.ts +13 -0
  531. package/src/internal/qs/stringify.ts +385 -0
  532. package/src/internal/qs/types.ts +71 -0
  533. package/src/internal/qs/utils.ts +265 -0
  534. package/src/internal/request-options.ts +91 -0
  535. package/src/internal/shim-types.ts +26 -0
  536. package/src/internal/shims.ts +107 -0
  537. package/src/internal/to-file.ts +154 -0
  538. package/src/internal/types.ts +95 -0
  539. package/src/internal/uploads.ts +187 -0
  540. package/src/internal/utils/base64.ts +40 -0
  541. package/src/internal/utils/bytes.ts +32 -0
  542. package/src/internal/utils/env.ts +18 -0
  543. package/src/internal/utils/log.ts +126 -0
  544. package/src/internal/utils/path.ts +88 -0
  545. package/src/internal/utils/sleep.ts +3 -0
  546. package/src/internal/utils/uuid.ts +17 -0
  547. package/src/internal/utils/values.ts +105 -0
  548. package/src/internal/utils.ts +8 -0
  549. package/src/lib/.keep +4 -0
  550. package/src/lib/verify-user-token.ts +121 -0
  551. package/src/pagination.ts +2 -0
  552. package/src/resource.ts +2 -0
  553. package/src/resources/app-builds.ts +242 -0
  554. package/src/resources/apps.ts +355 -0
  555. package/src/resources/authorized-users.ts +177 -0
  556. package/src/resources/chat-channels.ts +207 -0
  557. package/src/resources/checkout-configurations.ts +397 -0
  558. package/src/resources/companies.ts +20 -0
  559. package/src/resources/course-lesson-interactions.ts +85 -0
  560. package/src/resources/entries.ts +216 -0
  561. package/src/resources/experiences.ts +349 -0
  562. package/src/resources/forum-posts.ts +298 -0
  563. package/src/resources/index.ts +158 -0
  564. package/src/resources/invoices.ts +363 -0
  565. package/src/resources/ledger-accounts.ts +141 -0
  566. package/src/resources/memberships.ts +378 -0
  567. package/src/resources/messages.ts +303 -0
  568. package/src/resources/payments.ts +585 -0
  569. package/src/resources/plans.ts +594 -0
  570. package/src/resources/products.ts +527 -0
  571. package/src/resources/reactions.ts +139 -0
  572. package/src/resources/shared.ts +3086 -0
  573. package/src/resources/shipments.ts +200 -0
  574. package/src/resources/support-channels.ts +193 -0
  575. package/src/resources/transfers.ts +200 -0
  576. package/src/resources/users.ts +84 -0
  577. package/src/resources/webhooks.ts +144 -0
  578. package/src/resources.ts +1 -0
  579. package/src/tsconfig.json +11 -0
  580. package/src/uploads.ts +2 -0
  581. package/src/version.ts +1 -0
  582. package/uploads.d.mts +2 -0
  583. package/uploads.d.mts.map +1 -0
  584. package/uploads.d.ts +2 -0
  585. package/uploads.d.ts.map +1 -0
  586. package/uploads.js +6 -0
  587. package/uploads.js.map +1 -0
  588. package/uploads.mjs +2 -0
  589. package/uploads.mjs.map +1 -0
  590. package/version.d.mts +2 -0
  591. package/version.d.mts.map +1 -0
  592. package/version.d.ts +2 -0
  593. package/version.d.ts.map +1 -0
  594. package/version.js +5 -0
  595. package/version.js.map +1 -0
  596. package/version.mjs +2 -0
  597. package/version.mjs.map +1 -0
@@ -0,0 +1,3086 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import * as Shared from './shared';
4
+ import { CursorPage } from '../core/pagination';
5
+
6
+ /**
7
+ * The different types an access pass can be.
8
+ */
9
+ export type AccessPassType = 'regular' | 'app' | 'experience_upsell' | 'api_only';
10
+
11
+ /**
12
+ * An object representing an app
13
+ */
14
+ export interface App {
15
+ /**
16
+ * The ID of the app
17
+ */
18
+ id: string;
19
+
20
+ /**
21
+ * The API key for the app
22
+ */
23
+ api_key: App.APIKey | null;
24
+
25
+ /**
26
+ * The base url of the app
27
+ */
28
+ base_url: string | null;
29
+
30
+ /**
31
+ * The company that owns the app
32
+ */
33
+ company: App.Company;
34
+
35
+ /**
36
+ * The creator of the app
37
+ */
38
+ creator: App.Creator;
39
+
40
+ /**
41
+ * The path part for a specific view of the app. This is the template part of the
42
+ * url after the base domain. Eg: /experiences/[experienceId]
43
+ */
44
+ dashboard_path: string | null;
45
+
46
+ /**
47
+ * The description of the app
48
+ */
49
+ description: string | null;
50
+
51
+ /**
52
+ * The path part for a specific view of the app. This is the template part of the
53
+ * url after the base domain. Eg: /experiences/[experienceId]
54
+ */
55
+ discover_path: string | null;
56
+
57
+ /**
58
+ * The unique part of the proxied domain for this app. Used to generate the base
59
+ * url used to display the app inside the whop platform. Refers to the id part in
60
+ * the final url: https://{domain_id}.apps.whop.com
61
+ */
62
+ domain_id: string;
63
+
64
+ /**
65
+ * The path part for a specific view of the app. This is the template part of the
66
+ * url after the base domain. Eg: /experiences/[experienceId]
67
+ */
68
+ experience_path: string | null;
69
+
70
+ /**
71
+ * The name of the app
72
+ */
73
+ name: string;
74
+
75
+ /**
76
+ * The set of permissions that an app requests to be granted when a user installs
77
+ * the app.
78
+ */
79
+ requested_permissions: Array<App.RequestedPermission>;
80
+
81
+ /**
82
+ * A collection of stats for the app.
83
+ */
84
+ stats: App.Stats | null;
85
+
86
+ /**
87
+ * If the status is live, the app is visible on Whop discovery. In order to be
88
+ * live, you need to set the name, icon, and description. Being unlisted or hidden
89
+ * means it's not visible on Whop but you can still install the app via direct
90
+ * link. To remove the app from whop discovery, you should set the status to
91
+ * unlisted.
92
+ */
93
+ status: AppStatuses;
94
+
95
+ /**
96
+ * Whether this app has been verified by Whop. Verified apps are endorsed by whop
97
+ * and are shown in the 'featured apps' section of the app store.
98
+ */
99
+ verified: boolean;
100
+ }
101
+
102
+ export namespace App {
103
+ /**
104
+ * The API key for the app
105
+ */
106
+ export interface APIKey {
107
+ /**
108
+ * The ID of this API key
109
+ */
110
+ id: string;
111
+
112
+ /**
113
+ * This is the API key used to authenticate requests
114
+ */
115
+ token: string;
116
+
117
+ /**
118
+ * When this API key was created at
119
+ */
120
+ created_at: string;
121
+ }
122
+
123
+ /**
124
+ * The company that owns the app
125
+ */
126
+ export interface Company {
127
+ /**
128
+ * The ID (tag) of the company.
129
+ */
130
+ id: string;
131
+
132
+ /**
133
+ * The title of the company.
134
+ */
135
+ title: string;
136
+ }
137
+
138
+ /**
139
+ * The creator of the app
140
+ */
141
+ export interface Creator {
142
+ /**
143
+ * The internal ID of the user.
144
+ */
145
+ id: string;
146
+
147
+ /**
148
+ * The name of the user from their Whop account.
149
+ */
150
+ name: string | null;
151
+
152
+ /**
153
+ * The username of the user from their Whop account.
154
+ */
155
+ username: string;
156
+ }
157
+
158
+ /**
159
+ * A permission that the app requests from the admin of a company during the oauth
160
+ * flow.
161
+ */
162
+ export interface RequestedPermission {
163
+ /**
164
+ * Whether the action is required for the app to function.
165
+ */
166
+ is_required: boolean;
167
+
168
+ /**
169
+ * The reason for requesting the action.
170
+ */
171
+ justification: string;
172
+
173
+ /**
174
+ * The action that the app will request off of users when a user installs the app.
175
+ */
176
+ permission_action: RequestedPermission.PermissionAction;
177
+ }
178
+
179
+ export namespace RequestedPermission {
180
+ /**
181
+ * The action that the app will request off of users when a user installs the app.
182
+ */
183
+ export interface PermissionAction {
184
+ /**
185
+ * The identifier of the action.
186
+ */
187
+ action: string;
188
+
189
+ /**
190
+ * The human readable name of the action.
191
+ */
192
+ name: string;
193
+ }
194
+ }
195
+
196
+ /**
197
+ * A collection of stats for the app.
198
+ */
199
+ export interface Stats {
200
+ /**
201
+ * This is the number of users that have spent time in this app in the last 24
202
+ * hours.
203
+ */
204
+ dau: number;
205
+
206
+ /**
207
+ * This is the number of users that have spent time in this app in the last 28
208
+ * days.
209
+ */
210
+ mau: number;
211
+
212
+ /**
213
+ * This how much time, in seconds, users have spent in this app in the last 24
214
+ * hours.
215
+ */
216
+ time_spent_last24_hours: number;
217
+
218
+ /**
219
+ * This is the number of users that have spent time in this app in the last 7 days.
220
+ */
221
+ wau: number;
222
+ }
223
+ }
224
+
225
+ /**
226
+ * An App Build object representing a build of an application
227
+ */
228
+ export interface AppBuild {
229
+ /**
230
+ * The ID of the app build. It will look like apbu_xxxxx.
231
+ */
232
+ id: string;
233
+
234
+ /**
235
+ * This is generated by the client and used to verify the integrity of the file
236
+ * that is submitted. It is a SHA256 hash of the app build file.
237
+ */
238
+ checksum: string;
239
+
240
+ /**
241
+ * When this app build was created.
242
+ */
243
+ created_at: string;
244
+
245
+ /**
246
+ * The URL to download the app build .zip file.
247
+ */
248
+ file_url: string;
249
+
250
+ /**
251
+ * Whether this app build is currently being used in production.
252
+ */
253
+ is_production: boolean;
254
+
255
+ /**
256
+ * The platform of the app build (ios, android, web)
257
+ */
258
+ platform: AppBuildPlatforms;
259
+
260
+ /**
261
+ * The review message for the app build, if any. This is populated when the build
262
+ * is rejected and there is a reason specified by the reviewer.
263
+ */
264
+ review_message: string | null;
265
+
266
+ /**
267
+ * The status of the app build (draft, approved, rejected, pending, etc)
268
+ */
269
+ status: AppBuildStatuses;
270
+
271
+ /**
272
+ * The supported app view types for the app build. These are the views that the
273
+ * developer has specified that this build supports.
274
+ */
275
+ supported_app_view_types: Array<AppViewType>;
276
+ }
277
+
278
+ /**
279
+ * The different platforms an app build can target.
280
+ */
281
+ export type AppBuildPlatforms = 'ios' | 'android' | 'web';
282
+
283
+ /**
284
+ * The different statuses an AppBuild can be in.
285
+ */
286
+ export type AppBuildStatuses = 'draft' | 'pending' | 'approved' | 'rejected';
287
+
288
+ /**
289
+ * The status of an experience interface
290
+ */
291
+ export type AppStatuses = 'live' | 'unlisted' | 'hidden';
292
+
293
+ /**
294
+ * The different types of an app view
295
+ */
296
+ export type AppViewType = 'hub' | 'discover' | 'dash' | 'dashboard' | 'analytics';
297
+
298
+ /**
299
+ * Possible roles an authorized user can have
300
+ */
301
+ export type AuthorizedUserRoles =
302
+ | 'owner'
303
+ | 'admin'
304
+ | 'sales_manager'
305
+ | 'moderator'
306
+ | 'app_manager'
307
+ | 'support'
308
+ | 'manager';
309
+
310
+ /**
311
+ * The different business types a company can be.
312
+ */
313
+ export type BusinessTypes =
314
+ | 'education_program'
315
+ | 'coaching'
316
+ | 'software'
317
+ | 'paid_group'
318
+ | 'newsletter'
319
+ | 'agency'
320
+ | 'physical_products'
321
+ | 'brick_and_mortar'
322
+ | 'events'
323
+ | 'coaching_and_courses'
324
+ | 'other'
325
+ | 'saas'
326
+ | 'course'
327
+ | 'community';
328
+
329
+ /**
330
+ * Represents a Chat feed
331
+ */
332
+ export interface ChatChannel {
333
+ /**
334
+ * The unique identifier for the entity
335
+ */
336
+ id: string;
337
+
338
+ /**
339
+ * Whether or not media is banned in this chat
340
+ */
341
+ ban_media: boolean;
342
+
343
+ /**
344
+ * Whether or not URLs are banned in this chat
345
+ */
346
+ ban_urls: boolean;
347
+
348
+ /**
349
+ * List of banned words in this chat
350
+ */
351
+ banned_words: Array<string>;
352
+
353
+ /**
354
+ * The experience for this chat
355
+ */
356
+ experience: ChatChannel.Experience;
357
+
358
+ /**
359
+ * The number of seconds a user needs to wait before posting again, if any
360
+ */
361
+ user_posts_cooldown_seconds: number | null;
362
+
363
+ /**
364
+ * Who can post on this chat
365
+ */
366
+ who_can_post: WhoCanPost;
367
+
368
+ /**
369
+ * Who can react on this chat
370
+ */
371
+ who_can_react: WhoCanReact;
372
+ }
373
+
374
+ export namespace ChatChannel {
375
+ /**
376
+ * The experience for this chat
377
+ */
378
+ export interface Experience {
379
+ /**
380
+ * The unique ID representing this experience
381
+ */
382
+ id: string;
383
+
384
+ /**
385
+ * The written name of the description.
386
+ */
387
+ name: string;
388
+ }
389
+ }
390
+
391
+ /**
392
+ * A checkout session
393
+ */
394
+ export interface CheckoutConfiguration {
395
+ /**
396
+ * The ID of the checkout session
397
+ */
398
+ id: string;
399
+
400
+ /**
401
+ * The affiliate code to use for the checkout session
402
+ */
403
+ affiliate_code: string;
404
+
405
+ /**
406
+ * The ID of the company to use for the checkout session
407
+ */
408
+ company_id: string;
409
+
410
+ /**
411
+ * The metadata to use for the checkout session
412
+ */
413
+ metadata: { [key: string]: unknown };
414
+
415
+ /**
416
+ * The plan to use for the checkout session
417
+ */
418
+ plan: CheckoutConfiguration.Plan;
419
+
420
+ /**
421
+ * The URL to redirect the user to after the checkout session is created
422
+ */
423
+ purchase_url: string;
424
+
425
+ /**
426
+ * The URL to redirect the user to after the checkout session is created
427
+ */
428
+ redirect_url: string;
429
+ }
430
+
431
+ export namespace CheckoutConfiguration {
432
+ /**
433
+ * The plan to use for the checkout session
434
+ */
435
+ export interface Plan {
436
+ /**
437
+ * The internal ID of the plan.
438
+ */
439
+ id: string;
440
+
441
+ /**
442
+ * The interval at which the plan charges (renewal plans).
443
+ */
444
+ billing_period: number | null;
445
+
446
+ /**
447
+ * The respective currency identifier for the plan.
448
+ */
449
+ currency: Shared.Currency;
450
+
451
+ /**
452
+ * The interval at which the plan charges (expiration plans).
453
+ */
454
+ expiration_days: number | null;
455
+
456
+ /**
457
+ * The price a person has to pay for a plan on the initial purchase.
458
+ */
459
+ initial_price: number;
460
+
461
+ /**
462
+ * Indicates if the plan is a one time payment or recurring.
463
+ */
464
+ plan_type: Shared.PlanType;
465
+
466
+ /**
467
+ * This is the release method the business uses to sell this plan.
468
+ */
469
+ release_method: Shared.ReleaseMethod;
470
+
471
+ /**
472
+ * The price a person has to pay for a plan on the renewal purchase.
473
+ */
474
+ renewal_price: number;
475
+
476
+ /**
477
+ * The number of free trial days added before a renewal plan.
478
+ */
479
+ trial_period_days: number | null;
480
+
481
+ /**
482
+ * Shows or hides the plan from public/business view.
483
+ */
484
+ visibility: Shared.Visibility;
485
+ }
486
+ }
487
+
488
+ /**
489
+ * The method of collection for an invoice.
490
+ */
491
+ export type CollectionMethod = 'send_invoice' | 'charge_automatically';
492
+
493
+ /**
494
+ * An object representing a (sanitized) company.
495
+ */
496
+ export interface Company {
497
+ /**
498
+ * The ID (tag) of the company.
499
+ */
500
+ id: string;
501
+
502
+ /**
503
+ * The different business types a company can be.
504
+ */
505
+ business_type: BusinessTypes | null;
506
+
507
+ /**
508
+ * When the company was created (signed up)
509
+ */
510
+ created_at: string;
511
+
512
+ /**
513
+ * The different industry types a company can be in.
514
+ */
515
+ industry_type: IndustryTypes | null;
516
+
517
+ /**
518
+ * The number of members in the company.
519
+ */
520
+ member_count: number;
521
+
522
+ /**
523
+ * The user who owns this company
524
+ */
525
+ owner_user: Company.OwnerUser;
526
+
527
+ /**
528
+ * The number of reviews that have been published for the company.
529
+ */
530
+ published_reviews_count: number;
531
+
532
+ /**
533
+ * The slug/route of the company on the Whop site.
534
+ */
535
+ route: string;
536
+
537
+ /**
538
+ * The social media accounts of the company
539
+ */
540
+ social_links: Array<Company.SocialLink>;
541
+
542
+ /**
543
+ * The title of the company.
544
+ */
545
+ title: string;
546
+
547
+ /**
548
+ * The time the company was last updated.
549
+ */
550
+ updated_at: string;
551
+
552
+ /**
553
+ * If the company is Whop Verified
554
+ */
555
+ verified: boolean;
556
+ }
557
+
558
+ export namespace Company {
559
+ /**
560
+ * The user who owns this company
561
+ */
562
+ export interface OwnerUser {
563
+ /**
564
+ * The internal ID of the user.
565
+ */
566
+ id: string;
567
+
568
+ /**
569
+ * The name of the user from their Whop account.
570
+ */
571
+ name: string | null;
572
+
573
+ /**
574
+ * The username of the user from their Whop account.
575
+ */
576
+ username: string;
577
+ }
578
+
579
+ /**
580
+ * A social link attached to a resource on the site.
581
+ */
582
+ export interface SocialLink {
583
+ /**
584
+ * The ID
585
+ */
586
+ id: string;
587
+
588
+ /**
589
+ * The URL
590
+ */
591
+ url: string;
592
+
593
+ /**
594
+ * The website
595
+ */
596
+ website: 'x' | 'instagram' | 'facebook' | 'tiktok' | 'youtube' | 'linkedin' | 'twitch' | 'website';
597
+ }
598
+ }
599
+
600
+ /**
601
+ * A lesson interaction tracking user progress in courses
602
+ */
603
+ export interface CourseLessonInteraction {
604
+ /**
605
+ * The ID of the lesson interaction
606
+ */
607
+ id: string;
608
+
609
+ /**
610
+ * Whether the lesson has been completed by the user
611
+ */
612
+ completed: boolean;
613
+
614
+ /**
615
+ * When the interaction was created
616
+ */
617
+ created_at: string;
618
+
619
+ /**
620
+ * The lesson this interaction is for
621
+ */
622
+ lesson: CourseLessonInteraction.Lesson;
623
+
624
+ /**
625
+ * The user who interacted with the lesson
626
+ */
627
+ user: CourseLessonInteraction.User;
628
+ }
629
+
630
+ export namespace CourseLessonInteraction {
631
+ /**
632
+ * The lesson this interaction is for
633
+ */
634
+ export interface Lesson {
635
+ /**
636
+ * The ID of the lesson
637
+ */
638
+ id: string;
639
+
640
+ /**
641
+ * The title of the lesson
642
+ */
643
+ title: string;
644
+ }
645
+
646
+ /**
647
+ * The user who interacted with the lesson
648
+ */
649
+ export interface User {
650
+ /**
651
+ * The internal ID of the user.
652
+ */
653
+ id: string;
654
+
655
+ /**
656
+ * The name of the user from their Whop account.
657
+ */
658
+ name: string | null;
659
+
660
+ /**
661
+ * The username of the user from their Whop account.
662
+ */
663
+ username: string;
664
+ }
665
+ }
666
+
667
+ /**
668
+ * A lesson interaction tracking user progress in courses
669
+ */
670
+ export interface CourseLessonInteractionListItem {
671
+ /**
672
+ * The ID of the lesson interaction
673
+ */
674
+ id: string;
675
+
676
+ /**
677
+ * Whether the lesson has been completed by the user
678
+ */
679
+ completed: boolean;
680
+
681
+ /**
682
+ * When the interaction was created
683
+ */
684
+ created_at: string;
685
+
686
+ /**
687
+ * The lesson this interaction is for
688
+ */
689
+ lesson: CourseLessonInteractionListItem.Lesson;
690
+
691
+ /**
692
+ * The user who interacted with the lesson
693
+ */
694
+ user: CourseLessonInteractionListItem.User;
695
+ }
696
+
697
+ export namespace CourseLessonInteractionListItem {
698
+ /**
699
+ * The lesson this interaction is for
700
+ */
701
+ export interface Lesson {
702
+ /**
703
+ * The ID of the lesson
704
+ */
705
+ id: string;
706
+
707
+ /**
708
+ * The title of the lesson
709
+ */
710
+ title: string;
711
+ }
712
+
713
+ /**
714
+ * The user who interacted with the lesson
715
+ */
716
+ export interface User {
717
+ /**
718
+ * The internal ID of the user.
719
+ */
720
+ id: string;
721
+
722
+ /**
723
+ * The name of the user from their Whop account.
724
+ */
725
+ name: string | null;
726
+
727
+ /**
728
+ * The username of the user from their Whop account.
729
+ */
730
+ username: string;
731
+ }
732
+ }
733
+
734
+ /**
735
+ * The available currencies on the platform
736
+ */
737
+ export type Currency =
738
+ | 'usd'
739
+ | 'sgd'
740
+ | 'inr'
741
+ | 'aud'
742
+ | 'brl'
743
+ | 'cad'
744
+ | 'dkk'
745
+ | 'eur'
746
+ | 'nok'
747
+ | 'gbp'
748
+ | 'sek'
749
+ | 'chf'
750
+ | 'hkd'
751
+ | 'huf'
752
+ | 'jpy'
753
+ | 'mxn'
754
+ | 'myr'
755
+ | 'pln'
756
+ | 'czk'
757
+ | 'nzd'
758
+ | 'aed'
759
+ | 'eth'
760
+ | 'ape'
761
+ | 'cop'
762
+ | 'ron'
763
+ | 'thb'
764
+ | 'bgn'
765
+ | 'idr'
766
+ | 'dop'
767
+ | 'php'
768
+ | 'try'
769
+ | 'krw'
770
+ | 'twd'
771
+ | 'vnd'
772
+ | 'pkr'
773
+ | 'clp'
774
+ | 'uyu'
775
+ | 'ars'
776
+ | 'zar'
777
+ | 'dzd'
778
+ | 'tnd'
779
+ | 'mad'
780
+ | 'kes'
781
+ | 'kwd'
782
+ | 'jod'
783
+ | 'all'
784
+ | 'xcd'
785
+ | 'amd'
786
+ | 'bsd'
787
+ | 'bhd'
788
+ | 'bob'
789
+ | 'bam'
790
+ | 'khr'
791
+ | 'crc'
792
+ | 'xof'
793
+ | 'egp'
794
+ | 'etb'
795
+ | 'gmd'
796
+ | 'ghs'
797
+ | 'gtq'
798
+ | 'gyd'
799
+ | 'ils'
800
+ | 'jmd'
801
+ | 'mop'
802
+ | 'mga'
803
+ | 'mur'
804
+ | 'mdl'
805
+ | 'mnt'
806
+ | 'nad'
807
+ | 'ngn'
808
+ | 'mkd'
809
+ | 'omr'
810
+ | 'pyg'
811
+ | 'pen'
812
+ | 'qar'
813
+ | 'rwf'
814
+ | 'sar'
815
+ | 'rsd'
816
+ | 'lkr'
817
+ | 'tzs'
818
+ | 'ttd'
819
+ | 'uzs'
820
+ | 'rub'
821
+ | 'btc';
822
+
823
+ /**
824
+ * The different types of custom CTAs that can be selected.
825
+ */
826
+ export type CustomCta =
827
+ | 'get_access'
828
+ | 'join'
829
+ | 'order_now'
830
+ | 'shop_now'
831
+ | 'call_now'
832
+ | 'donate_now'
833
+ | 'contact_us'
834
+ | 'sign_up'
835
+ | 'subscribe'
836
+ | 'purchase'
837
+ | 'get_offer'
838
+ | 'apply_now'
839
+ | 'complete_order';
840
+
841
+ /**
842
+ * The direction of the sort.
843
+ */
844
+ export type Direction = 'asc' | 'desc';
845
+
846
+ /**
847
+ * The types of post
848
+ */
849
+ export type DmsPostTypes = 'regular' | 'system' | 'automated';
850
+
851
+ /**
852
+ * An object representing an entry in a waitlist.
853
+ */
854
+ export interface Entry {
855
+ /**
856
+ * The internal ID of the entry.
857
+ */
858
+ id: string;
859
+
860
+ /**
861
+ * When the entry was created.
862
+ */
863
+ created_at: string | null;
864
+
865
+ /**
866
+ * Responses collected from the user when submitting their entry.
867
+ */
868
+ custom_field_responses: Array<Entry.CustomFieldResponse> | null;
869
+
870
+ /**
871
+ * The waitlist plan the entry if for.
872
+ */
873
+ plan: Entry.Plan | null;
874
+
875
+ /**
876
+ * The access pass tied to this entry, if there is one.
877
+ */
878
+ product: Entry.Product | null;
879
+
880
+ /**
881
+ * The status of the entry.
882
+ */
883
+ status: EntryStatus;
884
+
885
+ /**
886
+ * The user who created the entry.
887
+ */
888
+ user: Entry.User;
889
+ }
890
+
891
+ export namespace Entry {
892
+ /**
893
+ * The response from a custom field on checkout
894
+ */
895
+ export interface CustomFieldResponse {
896
+ /**
897
+ * The ID of the custom field item
898
+ */
899
+ id: string;
900
+
901
+ /**
902
+ * The response a user gave to the specific question or field.
903
+ */
904
+ answer: string;
905
+
906
+ /**
907
+ * The question asked by the custom field
908
+ */
909
+ question: string;
910
+ }
911
+
912
+ /**
913
+ * The waitlist plan the entry if for.
914
+ */
915
+ export interface Plan {
916
+ /**
917
+ * The internal ID of the plan.
918
+ */
919
+ id: string;
920
+ }
921
+
922
+ /**
923
+ * The access pass tied to this entry, if there is one.
924
+ */
925
+ export interface Product {
926
+ /**
927
+ * The internal ID of the public product.
928
+ */
929
+ id: string;
930
+
931
+ /**
932
+ * The title of the product. Use for Whop 4.0.
933
+ */
934
+ title: string;
935
+ }
936
+
937
+ /**
938
+ * The user who created the entry.
939
+ */
940
+ export interface User {
941
+ /**
942
+ * The internal ID of the user.
943
+ */
944
+ id: string;
945
+
946
+ /**
947
+ * The email of the user
948
+ */
949
+ email: string | null;
950
+
951
+ /**
952
+ * The name of the user from their Whop account.
953
+ */
954
+ name: string | null;
955
+
956
+ /**
957
+ * The username of the user from their Whop account.
958
+ */
959
+ username: string;
960
+ }
961
+ }
962
+
963
+ /**
964
+ * The status of an entry to a waitlist.
965
+ */
966
+ export type EntryStatus = 'drafted' | 'pending' | 'approved' | 'denied' | 'any';
967
+
968
+ /**
969
+ * An object representing an experience belonging to a company.
970
+ */
971
+ export interface Experience {
972
+ /**
973
+ * The unique ID representing this experience
974
+ */
975
+ id: string;
976
+
977
+ /**
978
+ * The experience interface for this experience.
979
+ */
980
+ app: Experience.App;
981
+
982
+ /**
983
+ * The company that owns this experience.
984
+ */
985
+ company: Experience.Company;
986
+
987
+ /**
988
+ * The timestamp of when this experience was created.
989
+ */
990
+ created_at: string;
991
+
992
+ /**
993
+ * The written name of the description.
994
+ */
995
+ name: string;
996
+
997
+ /**
998
+ * The order of the experience in the section
999
+ */
1000
+ order: string | null;
1001
+
1002
+ /**
1003
+ * The access passes that are associated with this experience. This should not be
1004
+ * used unless you are trying to list all access passes the experience has, for
1005
+ * some reason. You probably don't want to use this though and should be using
1006
+ * accessPass.
1007
+ */
1008
+ products: Array<Experience.Product>;
1009
+ }
1010
+
1011
+ export namespace Experience {
1012
+ /**
1013
+ * The experience interface for this experience.
1014
+ */
1015
+ export interface App {
1016
+ /**
1017
+ * The ID of the app
1018
+ */
1019
+ id: string;
1020
+
1021
+ /**
1022
+ * The name of the app
1023
+ */
1024
+ name: string;
1025
+ }
1026
+
1027
+ /**
1028
+ * The company that owns this experience.
1029
+ */
1030
+ export interface Company {
1031
+ /**
1032
+ * The ID (tag) of the company.
1033
+ */
1034
+ id: string;
1035
+
1036
+ /**
1037
+ * The slug/route of the company on the Whop site.
1038
+ */
1039
+ route: string;
1040
+
1041
+ /**
1042
+ * The title of the company.
1043
+ */
1044
+ title: string;
1045
+ }
1046
+
1047
+ /**
1048
+ * An object representing a (sanitized) access pass.
1049
+ */
1050
+ export interface Product {
1051
+ /**
1052
+ * The internal ID of the public product.
1053
+ */
1054
+ id: string;
1055
+
1056
+ /**
1057
+ * The route of the product.
1058
+ */
1059
+ route: string;
1060
+
1061
+ /**
1062
+ * The title of the product. Use for Whop 4.0.
1063
+ */
1064
+ title: string;
1065
+ }
1066
+ }
1067
+
1068
+ /**
1069
+ * Represents a post in forum
1070
+ */
1071
+ export interface ForumPost {
1072
+ /**
1073
+ * The unique identifier for the entity
1074
+ */
1075
+ id: string;
1076
+
1077
+ /**
1078
+ * The amount of comments on this post
1079
+ */
1080
+ comment_count: number;
1081
+
1082
+ /**
1083
+ * The content of the forum post in Markdown format
1084
+ */
1085
+ content: string | null;
1086
+
1087
+ /**
1088
+ * Whether the forum post has been edited
1089
+ */
1090
+ is_edited: boolean;
1091
+
1092
+ /**
1093
+ * Whether this forum post is pinned
1094
+ */
1095
+ is_pinned: boolean;
1096
+
1097
+ /**
1098
+ * Whether the user that sent the post is an admin of the company
1099
+ */
1100
+ is_poster_admin: boolean;
1101
+
1102
+ /**
1103
+ * The number of likes this post has received
1104
+ */
1105
+ like_count: number | null;
1106
+
1107
+ /**
1108
+ * The ID of the parent forum post, if applicable
1109
+ */
1110
+ parent_id: string | null;
1111
+
1112
+ /**
1113
+ * The title of the forum post
1114
+ */
1115
+ title: string | null;
1116
+
1117
+ /**
1118
+ * The user who created this forum post
1119
+ */
1120
+ user: ForumPost.User;
1121
+
1122
+ /**
1123
+ * The number of times this message has been viewed
1124
+ */
1125
+ view_count: number | null;
1126
+ }
1127
+
1128
+ export namespace ForumPost {
1129
+ /**
1130
+ * The user who created this forum post
1131
+ */
1132
+ export interface User {
1133
+ /**
1134
+ * The internal ID of the user.
1135
+ */
1136
+ id: string;
1137
+
1138
+ /**
1139
+ * The name of the user from their Whop account.
1140
+ */
1141
+ name: string | null;
1142
+
1143
+ /**
1144
+ * The username of the user from their Whop account.
1145
+ */
1146
+ username: string;
1147
+ }
1148
+ }
1149
+
1150
+ /**
1151
+ * The friendly status of a receipt
1152
+ */
1153
+ export type FriendlyReceiptStatus =
1154
+ | 'auto_refunded'
1155
+ | 'refunded'
1156
+ | 'partially_refunded'
1157
+ | 'dispute_warning'
1158
+ | 'open_resolution'
1159
+ | 'open_dispute'
1160
+ | 'failed'
1161
+ | 'price_too_low'
1162
+ | 'succeeded'
1163
+ | 'drafted'
1164
+ | 'uncollectible'
1165
+ | 'unresolved'
1166
+ | 'past_due'
1167
+ | 'pending'
1168
+ | 'incomplete'
1169
+ | 'canceled';
1170
+
1171
+ /**
1172
+ * The different statuses of the global affiliate program for an access pass.
1173
+ */
1174
+ export type GlobalAffiliateStatus = 'enabled' | 'disabled';
1175
+
1176
+ /**
1177
+ * The different industry types a company can be in.
1178
+ */
1179
+ export type IndustryTypes =
1180
+ | 'trading'
1181
+ | 'sports_betting'
1182
+ | 'reselling'
1183
+ | 'fitness'
1184
+ | 'amazon_fba'
1185
+ | 'real_estate'
1186
+ | 'kindle_book_publishing'
1187
+ | 'dating'
1188
+ | 'agencies'
1189
+ | 'health_and_wellness'
1190
+ | 'social_media'
1191
+ | 'sales'
1192
+ | 'business'
1193
+ | 'ecommerce'
1194
+ | 'video_games'
1195
+ | 'home_services'
1196
+ | 'ai'
1197
+ | 'public_speaking'
1198
+ | 'personal_finance'
1199
+ | 'careers'
1200
+ | 'travel'
1201
+ | 'clipping'
1202
+ | 'spirituality'
1203
+ | 'vas'
1204
+ | 'personal_development'
1205
+ | 'software'
1206
+ | 'other'
1207
+ | 'marketing_agency'
1208
+ | 'sales_agency'
1209
+ | 'ai_agency'
1210
+ | 'design_agency'
1211
+ | 'coaching_agency'
1212
+ | 'development_agency'
1213
+ | 'recruiting_agency'
1214
+ | 'customer_support_agency'
1215
+ | 'clipping_agency'
1216
+ | 'clothing'
1217
+ | 'supplements'
1218
+ | 'beauty_and_personal_care'
1219
+ | 'fitness_gear'
1220
+ | 'accessories'
1221
+ | 'home_goods'
1222
+ | 'electronics_and_gadgets'
1223
+ | 'food_and_beverages'
1224
+ | 'gym'
1225
+ | 'restaurant'
1226
+ | 'retail_store'
1227
+ | 'coffee_shop'
1228
+ | 'salon_spa'
1229
+ | 'medical_dentist_office'
1230
+ | 'hotel_lodging'
1231
+ | 'auto_repair_shop'
1232
+ | 'masterminds'
1233
+ | 'webinars'
1234
+ | 'bootcamps'
1235
+ | 'convention'
1236
+ | 'concerts'
1237
+ | 'meetups'
1238
+ | 'parties';
1239
+
1240
+ /**
1241
+ * A statement that defines an amount due by a customer.
1242
+ */
1243
+ export interface Invoice {
1244
+ /**
1245
+ * The ID of the invoice.
1246
+ */
1247
+ id: string;
1248
+
1249
+ /**
1250
+ * The date the invoice was created.
1251
+ */
1252
+ created_at: string;
1253
+
1254
+ /**
1255
+ * The plan that the invoice was created for.
1256
+ */
1257
+ current_plan: Invoice.CurrentPlan;
1258
+
1259
+ /**
1260
+ * The date the invoice is due.
1261
+ */
1262
+ due_date: string | null;
1263
+
1264
+ /**
1265
+ * The email address that the invoice was created for.
1266
+ */
1267
+ email_address: string | null;
1268
+
1269
+ /**
1270
+ * The token to fetch the invoice.
1271
+ */
1272
+ fetch_invoice_token: string;
1273
+
1274
+ /**
1275
+ * The number of the invoice.
1276
+ */
1277
+ number: string;
1278
+
1279
+ /**
1280
+ * The status of the invoice.
1281
+ */
1282
+ status: InvoiceStatus;
1283
+
1284
+ /**
1285
+ * The user that the invoice was created for.
1286
+ */
1287
+ user: Invoice.User | null;
1288
+ }
1289
+
1290
+ export namespace Invoice {
1291
+ /**
1292
+ * The plan that the invoice was created for.
1293
+ */
1294
+ export interface CurrentPlan {
1295
+ /**
1296
+ * The internal ID of the plan.
1297
+ */
1298
+ id: string;
1299
+
1300
+ /**
1301
+ * The respective currency identifier for the plan.
1302
+ */
1303
+ currency: Shared.Currency;
1304
+
1305
+ /**
1306
+ * The formatted price (including currency) for the plan.
1307
+ */
1308
+ formatted_price: string;
1309
+ }
1310
+
1311
+ /**
1312
+ * The user that the invoice was created for.
1313
+ */
1314
+ export interface User {
1315
+ /**
1316
+ * The internal ID of the user.
1317
+ */
1318
+ id: string;
1319
+
1320
+ /**
1321
+ * The name of the user from their Whop account.
1322
+ */
1323
+ name: string | null;
1324
+
1325
+ /**
1326
+ * The username of the user from their Whop account.
1327
+ */
1328
+ username: string;
1329
+ }
1330
+ }
1331
+
1332
+ /**
1333
+ * A statement that defines an amount due by a customer.
1334
+ */
1335
+ export interface InvoiceListItem {
1336
+ /**
1337
+ * The ID of the invoice.
1338
+ */
1339
+ id: string;
1340
+
1341
+ /**
1342
+ * The date the invoice was created.
1343
+ */
1344
+ created_at: string;
1345
+
1346
+ /**
1347
+ * The plan that the invoice was created for.
1348
+ */
1349
+ current_plan: InvoiceListItem.CurrentPlan;
1350
+
1351
+ /**
1352
+ * The date the invoice is due.
1353
+ */
1354
+ due_date: string | null;
1355
+
1356
+ /**
1357
+ * The email address that the invoice was created for.
1358
+ */
1359
+ email_address: string | null;
1360
+
1361
+ /**
1362
+ * The token to fetch the invoice.
1363
+ */
1364
+ fetch_invoice_token: string;
1365
+
1366
+ /**
1367
+ * The number of the invoice.
1368
+ */
1369
+ number: string;
1370
+
1371
+ /**
1372
+ * The status of the invoice.
1373
+ */
1374
+ status: InvoiceStatus;
1375
+
1376
+ /**
1377
+ * The user that the invoice was created for.
1378
+ */
1379
+ user: InvoiceListItem.User | null;
1380
+ }
1381
+
1382
+ export namespace InvoiceListItem {
1383
+ /**
1384
+ * The plan that the invoice was created for.
1385
+ */
1386
+ export interface CurrentPlan {
1387
+ /**
1388
+ * The internal ID of the plan.
1389
+ */
1390
+ id: string;
1391
+
1392
+ /**
1393
+ * The respective currency identifier for the plan.
1394
+ */
1395
+ currency: Shared.Currency;
1396
+
1397
+ /**
1398
+ * The formatted price (including currency) for the plan.
1399
+ */
1400
+ formatted_price: string;
1401
+ }
1402
+
1403
+ /**
1404
+ * The user that the invoice was created for.
1405
+ */
1406
+ export interface User {
1407
+ /**
1408
+ * The internal ID of the user.
1409
+ */
1410
+ id: string;
1411
+
1412
+ /**
1413
+ * The name of the user from their Whop account.
1414
+ */
1415
+ name: string | null;
1416
+
1417
+ /**
1418
+ * The username of the user from their Whop account.
1419
+ */
1420
+ username: string;
1421
+ }
1422
+ }
1423
+
1424
+ /**
1425
+ * The different statuses an invoice can be in
1426
+ */
1427
+ export type InvoiceStatus = 'open' | 'paid' | 'past_due' | 'void';
1428
+
1429
+ /**
1430
+ * A membership represents a purchase between a User and a Company for a specific
1431
+ * Product.
1432
+ */
1433
+ export interface Membership {
1434
+ /**
1435
+ * The ID of the membership
1436
+ */
1437
+ id: string;
1438
+
1439
+ /**
1440
+ * Whether this Membership is set to cancel at the end of the current billing
1441
+ * cycle. Only applies for memberships that have a renewal plan.
1442
+ */
1443
+ cancel_at_period_end: boolean;
1444
+
1445
+ /**
1446
+ * The epoch timestamp of when the customer initiated a cancellation.
1447
+ */
1448
+ canceled_at: string | null;
1449
+
1450
+ /**
1451
+ * The reason that the member canceled the membership (filled out by the member).
1452
+ */
1453
+ cancellation_reason: string | null;
1454
+
1455
+ /**
1456
+ * The Company this Membership belongs to.
1457
+ */
1458
+ company: Membership.Company;
1459
+
1460
+ /**
1461
+ * The timestamp, in seconds, that this Membership was created at.
1462
+ */
1463
+ created_at: string;
1464
+
1465
+ /**
1466
+ * The available currencies on the platform
1467
+ */
1468
+ currency: Currency | null;
1469
+
1470
+ /**
1471
+ * The license key for this Membership. This is only present if the membership
1472
+ * grants access to an instance of the Whop Software app.
1473
+ */
1474
+ license_key: string | null;
1475
+
1476
+ /**
1477
+ * The URL for the customer to manage their membership.
1478
+ */
1479
+ manage_url: string | null;
1480
+
1481
+ /**
1482
+ * The Member that this Membership belongs to.
1483
+ */
1484
+ member: Membership.Member | null;
1485
+
1486
+ /**
1487
+ * A JSON object used to store software licensing information. Ex. HWID
1488
+ */
1489
+ metadata: { [key: string]: unknown };
1490
+
1491
+ /**
1492
+ * Whether the membership's payments are currently paused.
1493
+ */
1494
+ payment_collection_paused: boolean;
1495
+
1496
+ /**
1497
+ * The Plan this Membership is for.
1498
+ */
1499
+ plan: Membership.Plan;
1500
+
1501
+ /**
1502
+ * The Promo Code that is currently applied to this Membership.
1503
+ */
1504
+ promo_code: Membership.PromoCode | null;
1505
+
1506
+ /**
1507
+ * The timestamp in seconds at which the current billing cycle for this
1508
+ * subscription ends. Only applies for memberships that have a renewal plan.
1509
+ */
1510
+ renewal_period_end: string | null;
1511
+
1512
+ /**
1513
+ * The timestamp in seconds at which the current billing cycle for this
1514
+ * subscription start. Only applies for memberships that have a renewal plan.
1515
+ */
1516
+ renewal_period_start: string | null;
1517
+
1518
+ /**
1519
+ * The status of the membership.
1520
+ */
1521
+ status: MembershipStatus;
1522
+
1523
+ /**
1524
+ * A timestamp of when the membership was last updated
1525
+ */
1526
+ updated_at: string;
1527
+
1528
+ /**
1529
+ * The user this membership belongs to
1530
+ */
1531
+ user: Membership.User | null;
1532
+ }
1533
+
1534
+ export namespace Membership {
1535
+ /**
1536
+ * The Company this Membership belongs to.
1537
+ */
1538
+ export interface Company {
1539
+ /**
1540
+ * The ID (tag) of the company.
1541
+ */
1542
+ id: string;
1543
+
1544
+ /**
1545
+ * The title of the company.
1546
+ */
1547
+ title: string;
1548
+ }
1549
+
1550
+ /**
1551
+ * The Member that this Membership belongs to.
1552
+ */
1553
+ export interface Member {
1554
+ /**
1555
+ * The ID of the member
1556
+ */
1557
+ id: string;
1558
+ }
1559
+
1560
+ /**
1561
+ * The Plan this Membership is for.
1562
+ */
1563
+ export interface Plan {
1564
+ /**
1565
+ * The internal ID of the plan.
1566
+ */
1567
+ id: string;
1568
+ }
1569
+
1570
+ /**
1571
+ * The Promo Code that is currently applied to this Membership.
1572
+ */
1573
+ export interface PromoCode {
1574
+ /**
1575
+ * The ID of the promo.
1576
+ */
1577
+ id: string;
1578
+ }
1579
+
1580
+ /**
1581
+ * The user this membership belongs to
1582
+ */
1583
+ export interface User {
1584
+ /**
1585
+ * The internal ID of the user.
1586
+ */
1587
+ id: string;
1588
+
1589
+ /**
1590
+ * The name of the user from their Whop account.
1591
+ */
1592
+ name: string | null;
1593
+
1594
+ /**
1595
+ * The username of the user from their Whop account.
1596
+ */
1597
+ username: string;
1598
+ }
1599
+ }
1600
+
1601
+ /**
1602
+ * The status of a membership
1603
+ */
1604
+ export type MembershipStatus =
1605
+ | 'trialing'
1606
+ | 'active'
1607
+ | 'past_due'
1608
+ | 'completed'
1609
+ | 'canceled'
1610
+ | 'expired'
1611
+ | 'unresolved'
1612
+ | 'drafted';
1613
+
1614
+ /**
1615
+ * Represents a message in a DM channel
1616
+ */
1617
+ export interface Message {
1618
+ /**
1619
+ * The unique identifier for the entity
1620
+ */
1621
+ id: string;
1622
+
1623
+ /**
1624
+ * The content of the message in Markdown format
1625
+ */
1626
+ content: string | null;
1627
+
1628
+ /**
1629
+ * The timestamp when the post was created
1630
+ */
1631
+ created_at: string;
1632
+
1633
+ /**
1634
+ * Whether the message has been edited
1635
+ */
1636
+ is_edited: boolean;
1637
+
1638
+ /**
1639
+ * Whether this message is pinned
1640
+ */
1641
+ is_pinned: boolean;
1642
+
1643
+ /**
1644
+ * The type of post
1645
+ */
1646
+ message_type: DmsPostTypes;
1647
+
1648
+ /**
1649
+ * The poll for this message
1650
+ */
1651
+ poll: Message.Poll | null;
1652
+
1653
+ /**
1654
+ * The reaction counts for this message
1655
+ */
1656
+ poll_votes: Array<Message.PollVote>;
1657
+
1658
+ /**
1659
+ * The reaction counts for this message
1660
+ */
1661
+ reaction_counts: Array<Message.ReactionCount>;
1662
+
1663
+ /**
1664
+ * The ID of the message this is replying to, if applicable
1665
+ */
1666
+ replying_to_message_id: string | null;
1667
+
1668
+ /**
1669
+ * The timestamp when the post was last updated
1670
+ */
1671
+ updated_at: string;
1672
+
1673
+ /**
1674
+ * The user who sent this message
1675
+ */
1676
+ user: Message.User;
1677
+
1678
+ /**
1679
+ * The number of times this message has been viewed
1680
+ */
1681
+ view_count: number | null;
1682
+ }
1683
+
1684
+ export namespace Message {
1685
+ /**
1686
+ * The poll for this message
1687
+ */
1688
+ export interface Poll {
1689
+ /**
1690
+ * The options for the poll
1691
+ */
1692
+ options: Array<Poll.Option> | null;
1693
+ }
1694
+
1695
+ export namespace Poll {
1696
+ /**
1697
+ * Represents a single poll option
1698
+ */
1699
+ export interface Option {
1700
+ /**
1701
+ * The ID of the poll option
1702
+ */
1703
+ id: string;
1704
+
1705
+ /**
1706
+ * The text of the poll option
1707
+ */
1708
+ text: string;
1709
+ }
1710
+ }
1711
+
1712
+ /**
1713
+ * Represents a reaction count for a feed post
1714
+ */
1715
+ export interface PollVote {
1716
+ /**
1717
+ * The number of users who reacted
1718
+ */
1719
+ count: number;
1720
+
1721
+ /**
1722
+ * The reaction that was used
1723
+ */
1724
+ option_id: string | null;
1725
+ }
1726
+
1727
+ /**
1728
+ * Represents a reaction count for a feed post
1729
+ */
1730
+ export interface ReactionCount {
1731
+ /**
1732
+ * The number of users who reacted
1733
+ */
1734
+ count: number;
1735
+
1736
+ /**
1737
+ * The emoji that was used in shortcode format (:heart:)
1738
+ */
1739
+ emoji: string | null;
1740
+ }
1741
+
1742
+ /**
1743
+ * The user who sent this message
1744
+ */
1745
+ export interface User {
1746
+ /**
1747
+ * The internal ID of the user.
1748
+ */
1749
+ id: string;
1750
+
1751
+ /**
1752
+ * The name of the user from their Whop account.
1753
+ */
1754
+ name: string | null;
1755
+
1756
+ /**
1757
+ * The username of the user from their Whop account.
1758
+ */
1759
+ username: string;
1760
+ }
1761
+ }
1762
+
1763
+ /**
1764
+ * Information about pagination in a connection.
1765
+ */
1766
+ export interface PageInfo {
1767
+ /**
1768
+ * When paginating forwards, the cursor to continue.
1769
+ */
1770
+ end_cursor: string | null;
1771
+
1772
+ /**
1773
+ * When paginating forwards, are there more items?
1774
+ */
1775
+ has_next_page: boolean;
1776
+
1777
+ /**
1778
+ * When paginating backwards, are there more items?
1779
+ */
1780
+ has_previous_page: boolean;
1781
+
1782
+ /**
1783
+ * When paginating backwards, the cursor to continue.
1784
+ */
1785
+ start_cursor: string | null;
1786
+ }
1787
+
1788
+ /**
1789
+ * An object representing a receipt for a membership.
1790
+ */
1791
+ export interface Payment {
1792
+ /**
1793
+ * The payment ID
1794
+ */
1795
+ id: string;
1796
+
1797
+ /**
1798
+ * How much the payment is for after fees
1799
+ */
1800
+ amount_after_fees: number;
1801
+
1802
+ /**
1803
+ * Whether this payment was auto refunded or not
1804
+ */
1805
+ auto_refunded: boolean;
1806
+
1807
+ /**
1808
+ * The address of the user who made the payment.
1809
+ */
1810
+ billing_address: Payment.BillingAddress | null;
1811
+
1812
+ /**
1813
+ * The billing reason
1814
+ */
1815
+ billing_reason: string | null;
1816
+
1817
+ /**
1818
+ * The type of card used as the payment method.
1819
+ */
1820
+ card_brand: string | null;
1821
+
1822
+ /**
1823
+ * The last 4 digits of the card used to make the payment.
1824
+ */
1825
+ card_last4: string | null;
1826
+
1827
+ /**
1828
+ * The company for the payment.
1829
+ */
1830
+ company: Payment.Company | null;
1831
+
1832
+ /**
1833
+ * The datetime the payment was created
1834
+ */
1835
+ created_at: string;
1836
+
1837
+ /**
1838
+ * The available currencies on the platform
1839
+ */
1840
+ currency: Currency | null;
1841
+
1842
+ /**
1843
+ * When an alert came in that this transaction will be disputed
1844
+ */
1845
+ dispute_alerted_at: string | null;
1846
+
1847
+ /**
1848
+ * If the payment failed, the reason for the failure.
1849
+ */
1850
+ failure_message: string | null;
1851
+
1852
+ /**
1853
+ * The time of the last payment attempt.
1854
+ */
1855
+ last_payment_attempt: string | null;
1856
+
1857
+ /**
1858
+ * The member attached to this payment.
1859
+ */
1860
+ member: Payment.Member | null;
1861
+
1862
+ /**
1863
+ * The membership attached to this payment.
1864
+ */
1865
+ membership: Payment.Membership | null;
1866
+
1867
+ /**
1868
+ * The datetime the payment was paid
1869
+ */
1870
+ paid_at: string | null;
1871
+
1872
+ /**
1873
+ * Returns the type of payment method used for the payment, if available. Ex.
1874
+ * klarna, affirm, card, cashapp
1875
+ */
1876
+ payment_method_type: string | null;
1877
+
1878
+ /**
1879
+ * The plan attached to this payment.
1880
+ */
1881
+ plan: Payment.Plan | null;
1882
+
1883
+ /**
1884
+ * The access pass attached to this payment.
1885
+ */
1886
+ product: Payment.Product | null;
1887
+
1888
+ /**
1889
+ * The promo code used for this payment.
1890
+ */
1891
+ promo_code: Payment.PromoCode | null;
1892
+
1893
+ /**
1894
+ * Whether the payment can be refunded.
1895
+ */
1896
+ refundable: boolean;
1897
+
1898
+ /**
1899
+ * The payment refund amount(if applicable).
1900
+ */
1901
+ refunded_amount: number | null;
1902
+
1903
+ /**
1904
+ * When the payment was refunded (if applicable).
1905
+ */
1906
+ refunded_at: string | null;
1907
+
1908
+ /**
1909
+ * Whether the payment can be retried.
1910
+ */
1911
+ retryable: boolean;
1912
+
1913
+ /**
1914
+ * The status of a receipt
1915
+ */
1916
+ status: ReceiptStatus | null;
1917
+
1918
+ /**
1919
+ * The friendly status of the payment.
1920
+ */
1921
+ substatus: FriendlyReceiptStatus;
1922
+
1923
+ /**
1924
+ * The subtotal to show to the creator (excluding buyer fees).
1925
+ */
1926
+ subtotal: number | null;
1927
+
1928
+ /**
1929
+ * The total to show to the creator (excluding buyer fees).
1930
+ */
1931
+ total: number | null;
1932
+
1933
+ /**
1934
+ * The total in USD to show to the creator (excluding buyer fees).
1935
+ */
1936
+ usd_total: number | null;
1937
+
1938
+ /**
1939
+ * The user that made this payment.
1940
+ */
1941
+ user: Payment.User | null;
1942
+
1943
+ /**
1944
+ * Whether the payment can be voided.
1945
+ */
1946
+ voidable: boolean;
1947
+ }
1948
+
1949
+ export namespace Payment {
1950
+ /**
1951
+ * The address of the user who made the payment.
1952
+ */
1953
+ export interface BillingAddress {
1954
+ /**
1955
+ * The city of the address.
1956
+ */
1957
+ city: string | null;
1958
+
1959
+ /**
1960
+ * The country of the address.
1961
+ */
1962
+ country: string | null;
1963
+
1964
+ /**
1965
+ * The line 1 of the address.
1966
+ */
1967
+ line1: string | null;
1968
+
1969
+ /**
1970
+ * The line 2 of the address.
1971
+ */
1972
+ line2: string | null;
1973
+
1974
+ /**
1975
+ * The name of the customer.
1976
+ */
1977
+ name: string | null;
1978
+
1979
+ /**
1980
+ * The postal code of the address.
1981
+ */
1982
+ postal_code: string | null;
1983
+
1984
+ /**
1985
+ * The state of the address.
1986
+ */
1987
+ state: string | null;
1988
+ }
1989
+
1990
+ /**
1991
+ * The company for the payment.
1992
+ */
1993
+ export interface Company {
1994
+ /**
1995
+ * The ID of the company
1996
+ */
1997
+ id: string;
1998
+
1999
+ /**
2000
+ * The slug/route of the company on the Whop site.
2001
+ */
2002
+ route: string;
2003
+
2004
+ /**
2005
+ * The written name of the company.
2006
+ */
2007
+ title: string;
2008
+ }
2009
+
2010
+ /**
2011
+ * The member attached to this payment.
2012
+ */
2013
+ export interface Member {
2014
+ /**
2015
+ * The ID of the member
2016
+ */
2017
+ id: string;
2018
+
2019
+ /**
2020
+ * The phone number for the member, if available.
2021
+ */
2022
+ phone: string | null;
2023
+ }
2024
+
2025
+ /**
2026
+ * The membership attached to this payment.
2027
+ */
2028
+ export interface Membership {
2029
+ /**
2030
+ * The internal ID of the membership.
2031
+ */
2032
+ id: string;
2033
+
2034
+ /**
2035
+ * The state of the membership.
2036
+ */
2037
+ status: Shared.MembershipStatus;
2038
+ }
2039
+
2040
+ /**
2041
+ * The plan attached to this payment.
2042
+ */
2043
+ export interface Plan {
2044
+ /**
2045
+ * The internal ID of the plan.
2046
+ */
2047
+ id: string;
2048
+ }
2049
+
2050
+ /**
2051
+ * The access pass attached to this payment.
2052
+ */
2053
+ export interface Product {
2054
+ /**
2055
+ * The internal ID of the public product.
2056
+ */
2057
+ id: string;
2058
+
2059
+ /**
2060
+ * The route of the product.
2061
+ */
2062
+ route: string;
2063
+
2064
+ /**
2065
+ * The title of the product. Use for Whop 4.0.
2066
+ */
2067
+ title: string;
2068
+ }
2069
+
2070
+ /**
2071
+ * The promo code used for this payment.
2072
+ */
2073
+ export interface PromoCode {
2074
+ /**
2075
+ * The ID of the promo.
2076
+ */
2077
+ id: string;
2078
+
2079
+ /**
2080
+ * The amount off (% or flat amount) for the promo.
2081
+ */
2082
+ amount_off: number;
2083
+
2084
+ /**
2085
+ * The monetary currency of the promo code.
2086
+ */
2087
+ base_currency: Shared.Currency;
2088
+
2089
+ /**
2090
+ * The specific code used to apply the promo at checkout.
2091
+ */
2092
+ code: string | null;
2093
+
2094
+ /**
2095
+ * The number of billing cycles the promo is applied for.
2096
+ */
2097
+ number_of_intervals: number | null;
2098
+
2099
+ /**
2100
+ * The type (% or flat amount) of the promo.
2101
+ */
2102
+ promo_type: Shared.PromoType;
2103
+ }
2104
+
2105
+ /**
2106
+ * The user that made this payment.
2107
+ */
2108
+ export interface User {
2109
+ /**
2110
+ * The internal ID of the user.
2111
+ */
2112
+ id: string;
2113
+
2114
+ /**
2115
+ * The email of the user
2116
+ */
2117
+ email: string | null;
2118
+
2119
+ /**
2120
+ * The name of the user from their Whop account.
2121
+ */
2122
+ name: string | null;
2123
+
2124
+ /**
2125
+ * The username of the user from their Whop account.
2126
+ */
2127
+ username: string;
2128
+ }
2129
+ }
2130
+
2131
+ /**
2132
+ * An object representing a (sanitized) plan of an access pass.
2133
+ */
2134
+ export interface Plan {
2135
+ /**
2136
+ * The internal ID of the plan.
2137
+ */
2138
+ id: string;
2139
+
2140
+ /**
2141
+ * The interval at which the plan charges (renewal plans).
2142
+ */
2143
+ billing_period: number | null;
2144
+
2145
+ /**
2146
+ * Whether or not the plan collects tax.
2147
+ */
2148
+ collect_tax: boolean;
2149
+
2150
+ /**
2151
+ * The company for the plan.
2152
+ */
2153
+ company: Plan.Company | null;
2154
+
2155
+ /**
2156
+ * When the plan was created.
2157
+ */
2158
+ created_at: string;
2159
+
2160
+ /**
2161
+ * The respective currency identifier for the plan.
2162
+ */
2163
+ currency: Currency;
2164
+
2165
+ /**
2166
+ * The custom fields for the plan.
2167
+ */
2168
+ custom_fields: Array<Plan.CustomField>;
2169
+
2170
+ /**
2171
+ * The description of the plan.
2172
+ */
2173
+ description: string | null;
2174
+
2175
+ /**
2176
+ * The interval at which the plan charges (expiration plans).
2177
+ */
2178
+ expiration_days: number | null;
2179
+
2180
+ /**
2181
+ * The price a person has to pay for a plan on the initial purchase.
2182
+ */
2183
+ initial_price: number;
2184
+
2185
+ /**
2186
+ * A personal description or notes section for the business.
2187
+ */
2188
+ internal_notes: string | null;
2189
+
2190
+ /**
2191
+ * The invoice associated with this plan.
2192
+ */
2193
+ invoice: Plan.Invoice | null;
2194
+
2195
+ /**
2196
+ * The number of members for the plan.
2197
+ */
2198
+ member_count: number | null;
2199
+
2200
+ /**
2201
+ * Indicates if the plan is a one time payment or recurring.
2202
+ */
2203
+ plan_type: PlanType;
2204
+
2205
+ /**
2206
+ * The access pass for the plan.
2207
+ */
2208
+ product: Plan.Product | null;
2209
+
2210
+ /**
2211
+ * The direct link to purchase the product.
2212
+ */
2213
+ purchase_url: string;
2214
+
2215
+ /**
2216
+ * This is the release method the business uses to sell this plan.
2217
+ */
2218
+ release_method: ReleaseMethod;
2219
+
2220
+ /**
2221
+ * The price a person has to pay for a plan on the renewal purchase.
2222
+ */
2223
+ renewal_price: number;
2224
+
2225
+ /**
2226
+ * The tax type for the plan.
2227
+ */
2228
+ tax_type: TaxType;
2229
+
2230
+ /**
2231
+ * The number of free trial days added before a renewal plan.
2232
+ */
2233
+ trial_period_days: number | null;
2234
+
2235
+ /**
2236
+ * When the plan was last updated.
2237
+ */
2238
+ updated_at: string;
2239
+
2240
+ /**
2241
+ * Shows or hides the plan from public/business view.
2242
+ */
2243
+ visibility: Visibility;
2244
+ }
2245
+
2246
+ export namespace Plan {
2247
+ /**
2248
+ * The company for the plan.
2249
+ */
2250
+ export interface Company {
2251
+ /**
2252
+ * The ID (tag) of the company.
2253
+ */
2254
+ id: string;
2255
+
2256
+ /**
2257
+ * The title of the company.
2258
+ */
2259
+ title: string;
2260
+ }
2261
+
2262
+ /**
2263
+ * An object representing a custom field for a plan.
2264
+ */
2265
+ export interface CustomField {
2266
+ /**
2267
+ * The internal ID of the given custom field
2268
+ */
2269
+ id: string;
2270
+
2271
+ /**
2272
+ * What type of input field to use.
2273
+ */
2274
+ field_type: 'text';
2275
+
2276
+ /**
2277
+ * The title/header of the custom field.
2278
+ */
2279
+ name: string;
2280
+
2281
+ /**
2282
+ * How the custom field should be ordered when rendered on the checkout page.
2283
+ */
2284
+ order: number | null;
2285
+
2286
+ /**
2287
+ * An example response displayed in the input field.
2288
+ */
2289
+ placeholder: string | null;
2290
+
2291
+ /**
2292
+ * Whether or not the custom field is required.
2293
+ */
2294
+ required: boolean;
2295
+ }
2296
+
2297
+ /**
2298
+ * The invoice associated with this plan.
2299
+ */
2300
+ export interface Invoice {
2301
+ /**
2302
+ * The ID of the invoice.
2303
+ */
2304
+ id: string;
2305
+ }
2306
+
2307
+ /**
2308
+ * The access pass for the plan.
2309
+ */
2310
+ export interface Product {
2311
+ /**
2312
+ * The internal ID of the public product.
2313
+ */
2314
+ id: string;
2315
+
2316
+ /**
2317
+ * The title of the product. Use for Whop 4.0.
2318
+ */
2319
+ title: string;
2320
+ }
2321
+ }
2322
+
2323
+ /**
2324
+ * The type of plan that can be attached to an access pass
2325
+ */
2326
+ export type PlanType = 'renewal' | 'one_time';
2327
+
2328
+ /**
2329
+ * An object representing a (sanitized) access pass.
2330
+ */
2331
+ export interface Product {
2332
+ /**
2333
+ * The internal ID of the public product.
2334
+ */
2335
+ id: string;
2336
+
2337
+ /**
2338
+ * The different business types a company can be.
2339
+ */
2340
+ business_type: BusinessTypes | null;
2341
+
2342
+ /**
2343
+ * A short type of the company that this product belongs to.
2344
+ */
2345
+ company: Product.Company;
2346
+
2347
+ /**
2348
+ * When the product was created.
2349
+ */
2350
+ created_at: string;
2351
+
2352
+ /**
2353
+ * The custom call to action for the product.
2354
+ */
2355
+ custom_cta: CustomCta;
2356
+
2357
+ /**
2358
+ * The custom call to action URL for the product, if any.
2359
+ */
2360
+ custom_cta_url: string | null;
2361
+
2362
+ /**
2363
+ * The custom statement descriptor for the product.
2364
+ */
2365
+ custom_statement_descriptor: string | null;
2366
+
2367
+ /**
2368
+ * A short description of what the company offers or does.
2369
+ */
2370
+ description: string | null;
2371
+
2372
+ /**
2373
+ * The percentage of a transaction a user is eligible to earn from the whop
2374
+ * marketplace global affiliate program.
2375
+ */
2376
+ global_affiliate_percentage: number | null;
2377
+
2378
+ /**
2379
+ * The status of the global affiliate program for this product.
2380
+ */
2381
+ global_affiliate_status: GlobalAffiliateStatus;
2382
+
2383
+ /**
2384
+ * The headline of the product.
2385
+ */
2386
+ headline: string | null;
2387
+
2388
+ /**
2389
+ * The different industry types a company can be in.
2390
+ */
2391
+ industry_type: IndustryTypes | null;
2392
+
2393
+ /**
2394
+ * The percentage of a transaction a user is eligible to earn from the whop
2395
+ * marketplace member affiliate program.
2396
+ */
2397
+ member_affiliate_percentage: number | null;
2398
+
2399
+ /**
2400
+ * The status of the member affiliate program for this product.
2401
+ */
2402
+ member_affiliate_status: GlobalAffiliateStatus;
2403
+
2404
+ /**
2405
+ * The number of active users for this product.
2406
+ */
2407
+ member_count: number;
2408
+
2409
+ /**
2410
+ * The user that owns the product (company owner).
2411
+ */
2412
+ owner_user: Product.OwnerUser;
2413
+
2414
+ /**
2415
+ * The product tax code for the product, if any.
2416
+ */
2417
+ product_tax_code: Product.ProductTaxCode | null;
2418
+
2419
+ /**
2420
+ * The number of reviews that have been published for the product.
2421
+ */
2422
+ published_reviews_count: number;
2423
+
2424
+ /**
2425
+ * The route of the product.
2426
+ */
2427
+ route: string;
2428
+
2429
+ /**
2430
+ * The title of the product. Use for Whop 4.0.
2431
+ */
2432
+ title: string;
2433
+
2434
+ /**
2435
+ * When the product was updated.
2436
+ */
2437
+ updated_at: string;
2438
+
2439
+ /**
2440
+ * Whether this product is Whop verified.
2441
+ */
2442
+ verified: boolean;
2443
+
2444
+ /**
2445
+ * This product will/will not be displayed publicly.
2446
+ */
2447
+ visibility: Visibility;
2448
+ }
2449
+
2450
+ export namespace Product {
2451
+ /**
2452
+ * A short type of the company that this product belongs to.
2453
+ */
2454
+ export interface Company {
2455
+ /**
2456
+ * The ID (tag) of the company.
2457
+ */
2458
+ id: string;
2459
+
2460
+ /**
2461
+ * The slug/route of the company on the Whop site.
2462
+ */
2463
+ route: string;
2464
+
2465
+ /**
2466
+ * The title of the company.
2467
+ */
2468
+ title: string;
2469
+ }
2470
+
2471
+ /**
2472
+ * The user that owns the product (company owner).
2473
+ */
2474
+ export interface OwnerUser {
2475
+ /**
2476
+ * The internal ID of the user.
2477
+ */
2478
+ id: string;
2479
+
2480
+ /**
2481
+ * The name of the user from their Whop account.
2482
+ */
2483
+ name: string | null;
2484
+
2485
+ /**
2486
+ * The username of the user from their Whop account.
2487
+ */
2488
+ username: string;
2489
+ }
2490
+
2491
+ /**
2492
+ * The product tax code for the product, if any.
2493
+ */
2494
+ export interface ProductTaxCode {
2495
+ /**
2496
+ * The internal ID of the product tax code.
2497
+ */
2498
+ id: string;
2499
+
2500
+ /**
2501
+ * The name of the product tax code.
2502
+ */
2503
+ name: string;
2504
+
2505
+ /**
2506
+ * The type of product this tax code applies to.
2507
+ */
2508
+ product_type: 'physical' | 'digital' | 'services';
2509
+ }
2510
+ }
2511
+
2512
+ /**
2513
+ * An object representing a (sanitized) access pass.
2514
+ */
2515
+ export interface ProductListItem {
2516
+ /**
2517
+ * The internal ID of the public product.
2518
+ */
2519
+ id: string;
2520
+
2521
+ /**
2522
+ * The different business types a company can be.
2523
+ */
2524
+ business_type: BusinessTypes | null;
2525
+
2526
+ /**
2527
+ * When the product was created.
2528
+ */
2529
+ created_at: string;
2530
+
2531
+ /**
2532
+ * The headline of the product.
2533
+ */
2534
+ headline: string | null;
2535
+
2536
+ /**
2537
+ * The different industry types a company can be in.
2538
+ */
2539
+ industry_type: IndustryTypes | null;
2540
+
2541
+ /**
2542
+ * The number of active users for this product.
2543
+ */
2544
+ member_count: number;
2545
+
2546
+ /**
2547
+ * The number of reviews that have been published for the product.
2548
+ */
2549
+ published_reviews_count: number;
2550
+
2551
+ /**
2552
+ * The route of the product.
2553
+ */
2554
+ route: string;
2555
+
2556
+ /**
2557
+ * The title of the product. Use for Whop 4.0.
2558
+ */
2559
+ title: string;
2560
+
2561
+ /**
2562
+ * When the product was updated.
2563
+ */
2564
+ updated_at: string;
2565
+
2566
+ /**
2567
+ * Whether this product is Whop verified.
2568
+ */
2569
+ verified: boolean;
2570
+
2571
+ /**
2572
+ * This product will/will not be displayed publicly.
2573
+ */
2574
+ visibility: Visibility;
2575
+ }
2576
+
2577
+ /**
2578
+ * The type of promo code used to discount a plan
2579
+ */
2580
+ export type PromoType = 'percentage' | 'flat_amount';
2581
+
2582
+ /**
2583
+ * Represents a reaction to a feed post
2584
+ */
2585
+ export interface Reaction {
2586
+ /**
2587
+ * The unique identifier for the entity
2588
+ */
2589
+ id: string;
2590
+
2591
+ /**
2592
+ * The emoji that was used in shortcode format (:heart:)
2593
+ */
2594
+ emoji: string | null;
2595
+
2596
+ /**
2597
+ * The ID of the post this reaction belongs to
2598
+ */
2599
+ resource_id: string;
2600
+
2601
+ /**
2602
+ * The user who reacted to the post
2603
+ */
2604
+ user: Reaction.User;
2605
+ }
2606
+
2607
+ export namespace Reaction {
2608
+ /**
2609
+ * The user who reacted to the post
2610
+ */
2611
+ export interface User {
2612
+ /**
2613
+ * The internal ID of the user.
2614
+ */
2615
+ id: string;
2616
+
2617
+ /**
2618
+ * The name of the user from their Whop account.
2619
+ */
2620
+ name: string | null;
2621
+
2622
+ /**
2623
+ * The username of the user from their Whop account.
2624
+ */
2625
+ username: string;
2626
+ }
2627
+ }
2628
+
2629
+ /**
2630
+ * The status of a receipt
2631
+ */
2632
+ export type ReceiptStatus = 'draft' | 'open' | 'paid' | 'pending' | 'uncollectible' | 'unresolved' | 'void';
2633
+
2634
+ /**
2635
+ * The methods of how a plan can be released.
2636
+ */
2637
+ export type ReleaseMethod = 'buy_now' | 'waitlist';
2638
+
2639
+ /**
2640
+ * A shipment
2641
+ */
2642
+ export interface Shipment {
2643
+ /**
2644
+ * The ID of the shipment
2645
+ */
2646
+ id: string;
2647
+
2648
+ /**
2649
+ * The carrier of the shipment
2650
+ */
2651
+ carrier: ShipmentCarrier;
2652
+
2653
+ /**
2654
+ * The date and time the shipment was created
2655
+ */
2656
+ created_at: string;
2657
+
2658
+ /**
2659
+ * The delivery estimate of the shipment
2660
+ */
2661
+ delivery_estimate: string | null;
2662
+
2663
+ /**
2664
+ * The payment of the shipment
2665
+ */
2666
+ payment: Shipment.Payment;
2667
+
2668
+ /**
2669
+ * The service of the shipment
2670
+ */
2671
+ service: string | null;
2672
+
2673
+ /**
2674
+ * The status of the shipment
2675
+ */
2676
+ status: ShipmentStatus;
2677
+
2678
+ /**
2679
+ * The substatus of a shipment
2680
+ */
2681
+ substatus: ShipmentSubstatus | null;
2682
+
2683
+ /**
2684
+ * The tracking code of the shipment
2685
+ */
2686
+ tracking_code: string;
2687
+
2688
+ /**
2689
+ * The date and time the shipment was last updated
2690
+ */
2691
+ updated_at: string;
2692
+ }
2693
+
2694
+ export namespace Shipment {
2695
+ /**
2696
+ * The payment of the shipment
2697
+ */
2698
+ export interface Payment {
2699
+ /**
2700
+ * The payment ID
2701
+ */
2702
+ id: string;
2703
+ }
2704
+ }
2705
+
2706
+ /**
2707
+ * The carrier of a shipment
2708
+ */
2709
+ export type ShipmentCarrier =
2710
+ | 'accurate'
2711
+ | 'amazon_mws'
2712
+ | 'amazon_shipping'
2713
+ | 'apc'
2714
+ | 'asendia_usa'
2715
+ | 'australia_post'
2716
+ | 'axlehire_v3'
2717
+ | 'better_trucks'
2718
+ | 'canada_post'
2719
+ | 'canpar'
2720
+ | 'columbus_last_mile'
2721
+ | 'chronopost'
2722
+ | 'cloud_sort'
2723
+ | 'courier_express'
2724
+ | 'couriers_please'
2725
+ | 'cs_logistics'
2726
+ | 'dai_post'
2727
+ | 'deutsche_post_uk'
2728
+ | 'deutsche_post'
2729
+ | 'dhl_ecommerce_asia'
2730
+ | 'dhl_ecs'
2731
+ | 'dhl_express'
2732
+ | 'dhl_paket'
2733
+ | 'door_dash'
2734
+ | 'dpd_nl'
2735
+ | 'dpd_uk'
2736
+ | 'dpd'
2737
+ | 'epost_global'
2738
+ | 'estafeta'
2739
+ | 'evri'
2740
+ | 'fastway'
2741
+ | 'fedex_cross_border'
2742
+ | 'fedex_default'
2743
+ | 'fedex_mailview'
2744
+ | 'fedex_smartpost'
2745
+ | 'fedex'
2746
+ | 'first_choice'
2747
+ | 'first_mile'
2748
+ | 'flexport'
2749
+ | 'gio'
2750
+ | 'gio_express'
2751
+ | 'gso'
2752
+ | 'hailify'
2753
+ | 'henry'
2754
+ | 'interlink_express'
2755
+ | 'jet'
2756
+ | 'kuroneko_yamato'
2757
+ | 'la_post'
2758
+ | 'lasership_v2'
2759
+ | 'loomis_express'
2760
+ | 'lso'
2761
+ | 'ontrac'
2762
+ | 'optima'
2763
+ | 'osm_worldwide'
2764
+ | 'parcelforce'
2765
+ | 'parcll'
2766
+ | 'passport_global'
2767
+ | 'post_nl'
2768
+ | 'purolator'
2769
+ | 'quick'
2770
+ | 'royal_mail'
2771
+ | 'omni_parcel'
2772
+ | 'sendle'
2773
+ | 'sf_express'
2774
+ | 'smart_kargo'
2775
+ | 'sonic'
2776
+ | 'spee_dee'
2777
+ | 'swyft'
2778
+ | 'tforce'
2779
+ | 'uds'
2780
+ | 'ups_iparcel'
2781
+ | 'ups_mail_innovations'
2782
+ | 'ups'
2783
+ | 'usps'
2784
+ | 'veho'
2785
+ | 'yanwen';
2786
+
2787
+ /**
2788
+ * The status of a shipment
2789
+ */
2790
+ export type ShipmentStatus =
2791
+ | 'unknown'
2792
+ | 'pre_transit'
2793
+ | 'in_transit'
2794
+ | 'out_for_delivery'
2795
+ | 'delivered'
2796
+ | 'available_for_pickup'
2797
+ | 'return_to_sender'
2798
+ | 'failure'
2799
+ | 'cancelled'
2800
+ | 'error';
2801
+
2802
+ /**
2803
+ * The substatus of a shipment
2804
+ */
2805
+ export type ShipmentSubstatus =
2806
+ | 'address_correction'
2807
+ | 'arrived_at_destination'
2808
+ | 'arrived_at_facility'
2809
+ | 'arrived_at_pickup_location'
2810
+ | 'awaiting_information'
2811
+ | 'substatus_cancelled'
2812
+ | 'damaged'
2813
+ | 'delayed'
2814
+ | 'delivery_exception'
2815
+ | 'departed_facility'
2816
+ | 'departed_origin_facility'
2817
+ | 'expired'
2818
+ | 'substatus_failure'
2819
+ | 'held'
2820
+ | 'substatus_in_transit'
2821
+ | 'label_created'
2822
+ | 'lost'
2823
+ | 'missorted'
2824
+ | 'substatus_out_for_delivery'
2825
+ | 'received_at_destination_facility'
2826
+ | 'received_at_origin_facility'
2827
+ | 'refused'
2828
+ | 'return'
2829
+ | 'status_update'
2830
+ | 'transferred_to_destination_carrier'
2831
+ | 'transit_exception'
2832
+ | 'substatus_unknown'
2833
+ | 'weather_delay';
2834
+
2835
+ /**
2836
+ * Represents a DM channel
2837
+ */
2838
+ export interface SupportChannel {
2839
+ /**
2840
+ * The unique identifier for the entity
2841
+ */
2842
+ id: string;
2843
+
2844
+ /**
2845
+ * The bot ID if this is a support chat
2846
+ */
2847
+ company_id: string | null;
2848
+
2849
+ /**
2850
+ * The custom name of the DM channel, if any
2851
+ */
2852
+ custom_name: string | null;
2853
+
2854
+ /**
2855
+ * The customer user if this is a support chat
2856
+ */
2857
+ customer_user: SupportChannel.CustomerUser | null;
2858
+
2859
+ /**
2860
+ * When the last message was sent
2861
+ */
2862
+ last_message_at: string | null;
2863
+
2864
+ /**
2865
+ * When the support ticket was resolved (null if unresolved)
2866
+ */
2867
+ resolved_at: string | null;
2868
+ }
2869
+
2870
+ export namespace SupportChannel {
2871
+ /**
2872
+ * The customer user if this is a support chat
2873
+ */
2874
+ export interface CustomerUser {
2875
+ /**
2876
+ * The internal ID of the user.
2877
+ */
2878
+ id: string;
2879
+
2880
+ /**
2881
+ * The name of the user from their Whop account.
2882
+ */
2883
+ name: string | null;
2884
+
2885
+ /**
2886
+ * The username of the user from their Whop account.
2887
+ */
2888
+ username: string;
2889
+ }
2890
+ }
2891
+
2892
+ /**
2893
+ * Whether or not the tax is included in a plan's price (or if it hasn't been set
2894
+ * up)
2895
+ */
2896
+ export type TaxType = 'inclusive' | 'exclusive' | 'unspecified';
2897
+
2898
+ /**
2899
+ * Credit Transaction Transfer
2900
+ */
2901
+ export interface Transfer {
2902
+ /**
2903
+ * The unique identifier of the credit transaction transfer
2904
+ */
2905
+ id: string;
2906
+
2907
+ /**
2908
+ * The amount of the credit transaction transfer
2909
+ */
2910
+ amount: number;
2911
+
2912
+ /**
2913
+ * The timestamp when the credit transaction transfer was created
2914
+ */
2915
+ created_at: string;
2916
+
2917
+ /**
2918
+ * The currency of the credit transaction transfer
2919
+ */
2920
+ currency: Currency;
2921
+
2922
+ /**
2923
+ * The recipient of the credit transaction transfer
2924
+ */
2925
+ destination: Transfer.User | null | Transfer.Company | null;
2926
+
2927
+ /**
2928
+ * The ID of the destination ledger account
2929
+ */
2930
+ destination_ledger_account_id: string;
2931
+
2932
+ /**
2933
+ * The decimal fee of the credit transaction transfer
2934
+ */
2935
+ fee_amount: number | null;
2936
+
2937
+ /**
2938
+ * The notes of the credit transaction transfer
2939
+ */
2940
+ notes: string | null;
2941
+
2942
+ /**
2943
+ * The sender of the credit transaction transfer
2944
+ */
2945
+ origin: Transfer.User | null | Transfer.Company | null;
2946
+
2947
+ /**
2948
+ * The ID of the origin ledger account
2949
+ */
2950
+ origin_ledger_account_id: string;
2951
+ }
2952
+
2953
+ export namespace Transfer {
2954
+ /**
2955
+ * An object representing a (sanitized) user of the site.
2956
+ */
2957
+ export interface User {
2958
+ /**
2959
+ * The internal ID of the user.
2960
+ */
2961
+ id: string;
2962
+
2963
+ /**
2964
+ * The name of the user from their Whop account.
2965
+ */
2966
+ name: string | null;
2967
+
2968
+ /**
2969
+ * The typename of this object
2970
+ */
2971
+ typename: 'User';
2972
+
2973
+ /**
2974
+ * The username of the user from their Whop account.
2975
+ */
2976
+ username: string;
2977
+ }
2978
+
2979
+ /**
2980
+ * An object representing a (sanitized) company.
2981
+ */
2982
+ export interface Company {
2983
+ /**
2984
+ * The ID (tag) of the company.
2985
+ */
2986
+ id: string;
2987
+
2988
+ /**
2989
+ * The slug/route of the company on the Whop site.
2990
+ */
2991
+ route: string;
2992
+
2993
+ /**
2994
+ * The title of the company.
2995
+ */
2996
+ title: string;
2997
+
2998
+ /**
2999
+ * The typename of this object
3000
+ */
3001
+ typename: 'Company';
3002
+ }
3003
+
3004
+ /**
3005
+ * An object representing a (sanitized) user of the site.
3006
+ */
3007
+ export interface User {
3008
+ /**
3009
+ * The internal ID of the user.
3010
+ */
3011
+ id: string;
3012
+
3013
+ /**
3014
+ * The name of the user from their Whop account.
3015
+ */
3016
+ name: string | null;
3017
+
3018
+ /**
3019
+ * The typename of this object
3020
+ */
3021
+ typename: 'User';
3022
+
3023
+ /**
3024
+ * The username of the user from their Whop account.
3025
+ */
3026
+ username: string;
3027
+ }
3028
+
3029
+ /**
3030
+ * An object representing a (sanitized) company.
3031
+ */
3032
+ export interface Company {
3033
+ /**
3034
+ * The ID (tag) of the company.
3035
+ */
3036
+ id: string;
3037
+
3038
+ /**
3039
+ * The slug/route of the company on the Whop site.
3040
+ */
3041
+ route: string;
3042
+
3043
+ /**
3044
+ * The title of the company.
3045
+ */
3046
+ title: string;
3047
+
3048
+ /**
3049
+ * The typename of this object
3050
+ */
3051
+ typename: 'Company';
3052
+ }
3053
+ }
3054
+
3055
+ /**
3056
+ * Visibility of a resource
3057
+ */
3058
+ export type Visibility = 'visible' | 'hidden' | 'archived' | 'quick_link';
3059
+
3060
+ /**
3061
+ * The different levels of visibility for resources
3062
+ */
3063
+ export type VisibilityFilter =
3064
+ | 'visible'
3065
+ | 'hidden'
3066
+ | 'archived'
3067
+ | 'quick_link'
3068
+ | 'all'
3069
+ | 'not_quick_link'
3070
+ | 'not_archived';
3071
+
3072
+ /**
3073
+ * Who can post on a chat feed
3074
+ */
3075
+ export type WhoCanPost = 'everyone' | 'admins';
3076
+
3077
+ /**
3078
+ * Who can react on a chat feed
3079
+ */
3080
+ export type WhoCanReact = 'everyone' | 'no_one';
3081
+
3082
+ export type InvoiceListItemsCursorPage = CursorPage<InvoiceListItem>;
3083
+
3084
+ export type CourseLessonInteractionListItemsCursorPage = CursorPage<CourseLessonInteractionListItem>;
3085
+
3086
+ export type ProductListItemsCursorPage = CursorPage<ProductListItem>;