whop_sdk 0.0.3 → 0.0.5

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 (267) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +47 -0
  3. data/README.md +1 -1
  4. data/lib/whop_sdk/client.rb +8 -0
  5. data/lib/whop_sdk/internal/transport/base_client.rb +7 -1
  6. data/lib/whop_sdk/internal/transport/pooled_net_requester.rb +6 -2
  7. data/lib/whop_sdk/models/access_level.rb +1 -1
  8. data/lib/whop_sdk/models/access_pass_type.rb +2 -1
  9. data/lib/whop_sdk/models/access_token_create_params.rb +67 -0
  10. data/lib/whop_sdk/models/access_token_create_response.rb +27 -0
  11. data/lib/whop_sdk/models/app_build_create_params.rb +53 -29
  12. data/lib/whop_sdk/models/app_update_params.rb +53 -29
  13. data/lib/whop_sdk/models/checkout_configuration_create_params.rb +119 -43
  14. data/lib/whop_sdk/models/company.rb +13 -1
  15. data/lib/whop_sdk/models/company_create_params.rb +46 -0
  16. data/lib/whop_sdk/models/company_list_params.rb +62 -0
  17. data/lib/whop_sdk/models/company_list_response.rb +175 -0
  18. data/lib/whop_sdk/models/course.rb +18 -1
  19. data/lib/whop_sdk/models/course_create_params.rb +94 -30
  20. data/lib/whop_sdk/models/course_lesson_create_params.rb +77 -1
  21. data/lib/whop_sdk/models/course_lesson_list_response.rb +43 -1
  22. data/lib/whop_sdk/models/course_lesson_update_params.rb +280 -83
  23. data/lib/whop_sdk/models/course_list_response.rb +18 -1
  24. data/lib/whop_sdk/models/course_student_list_params.rb +62 -0
  25. data/lib/whop_sdk/models/course_student_list_response.rb +97 -0
  26. data/lib/whop_sdk/models/course_student_retrieve_params.rb +14 -0
  27. data/lib/whop_sdk/models/course_student_retrieve_response.rb +149 -0
  28. data/lib/whop_sdk/models/course_update_params.rb +70 -28
  29. data/lib/whop_sdk/models/course_visibilities.rb +17 -0
  30. data/lib/whop_sdk/models/embed_type.rb +16 -0
  31. data/lib/whop_sdk/models/entry.rb +3 -3
  32. data/lib/whop_sdk/models/entry_list_response.rb +3 -3
  33. data/lib/whop_sdk/models/experience.rb +5 -6
  34. data/lib/whop_sdk/models/experience_update_params.rb +53 -29
  35. data/lib/whop_sdk/models/forum_post.rb +2 -2
  36. data/lib/whop_sdk/models/forum_post_create_params.rb +51 -27
  37. data/lib/whop_sdk/models/forum_post_list_response.rb +2 -2
  38. data/lib/whop_sdk/models/forum_post_update_params.rb +51 -27
  39. data/lib/whop_sdk/models/global_affiliate_status.rb +1 -1
  40. data/lib/whop_sdk/models/invoice_create_params.rb +50 -34
  41. data/lib/whop_sdk/models/invoice_list_params.rb +27 -40
  42. data/lib/whop_sdk/models/lesson.rb +59 -9
  43. data/lib/whop_sdk/models/member_list_params.rb +11 -11
  44. data/lib/whop_sdk/models/member_list_response.rb +3 -3
  45. data/lib/whop_sdk/models/member_retrieve_response.rb +3 -3
  46. data/lib/whop_sdk/models/membership_list_params.rb +9 -9
  47. data/lib/whop_sdk/models/message.rb +2 -2
  48. data/lib/whop_sdk/models/message_create_params.rb +51 -27
  49. data/lib/whop_sdk/models/message_list_response.rb +2 -2
  50. data/lib/whop_sdk/models/message_update_params.rb +51 -27
  51. data/lib/whop_sdk/models/payment.rb +13 -4
  52. data/lib/whop_sdk/models/payment_list_response.rb +13 -4
  53. data/lib/whop_sdk/models/payment_method_types.rb +2 -1
  54. data/lib/whop_sdk/models/plan.rb +54 -5
  55. data/lib/whop_sdk/models/plan_create_params.rb +99 -24
  56. data/lib/whop_sdk/models/plan_list_response.rb +57 -5
  57. data/lib/whop_sdk/models/plan_type.rb +1 -1
  58. data/lib/whop_sdk/models/plan_update_params.rb +97 -22
  59. data/lib/whop_sdk/models/product.rb +1 -1
  60. data/lib/whop_sdk/models/product_create_params.rb +6 -6
  61. data/lib/whop_sdk/models/product_list_item.rb +1 -1
  62. data/lib/whop_sdk/models/product_update_params.rb +57 -33
  63. data/lib/whop_sdk/models/promo_code.rb +3 -3
  64. data/lib/whop_sdk/models/promo_code_list_response.rb +3 -3
  65. data/lib/whop_sdk/models/transfer.rb +9 -1
  66. data/lib/whop_sdk/models/transfer_create_params.rb +9 -1
  67. data/lib/whop_sdk/models/transfer_list_response.rb +9 -1
  68. data/lib/whop_sdk/models.rb +14 -0
  69. data/lib/whop_sdk/resources/access_tokens.rb +46 -0
  70. data/lib/whop_sdk/resources/app_builds.rb +5 -3
  71. data/lib/whop_sdk/resources/apps.rb +4 -3
  72. data/lib/whop_sdk/resources/authorized_users.rb +2 -1
  73. data/lib/whop_sdk/resources/chat_channels.rb +9 -2
  74. data/lib/whop_sdk/resources/checkout_configurations.rb +8 -7
  75. data/lib/whop_sdk/resources/companies.rb +72 -1
  76. data/lib/whop_sdk/resources/course_chapters.rb +5 -3
  77. data/lib/whop_sdk/resources/course_lesson_interactions.rb +4 -3
  78. data/lib/whop_sdk/resources/course_lessons.rb +25 -7
  79. data/lib/whop_sdk/resources/course_students.rb +77 -0
  80. data/lib/whop_sdk/resources/courses.rb +24 -7
  81. data/lib/whop_sdk/resources/entries.rb +6 -3
  82. data/lib/whop_sdk/resources/experiences.rb +9 -7
  83. data/lib/whop_sdk/resources/forum_posts.rb +5 -4
  84. data/lib/whop_sdk/resources/forums.rb +3 -2
  85. data/lib/whop_sdk/resources/invoices.rb +22 -16
  86. data/lib/whop_sdk/resources/ledger_accounts.rb +6 -2
  87. data/lib/whop_sdk/resources/members.rb +6 -5
  88. data/lib/whop_sdk/resources/memberships.rb +10 -8
  89. data/lib/whop_sdk/resources/messages.rb +5 -4
  90. data/lib/whop_sdk/resources/payments.rb +7 -4
  91. data/lib/whop_sdk/resources/plans.rb +14 -8
  92. data/lib/whop_sdk/resources/products.rb +10 -8
  93. data/lib/whop_sdk/resources/promo_codes.rb +4 -2
  94. data/lib/whop_sdk/resources/reactions.rb +2 -1
  95. data/lib/whop_sdk/resources/reviews.rb +2 -1
  96. data/lib/whop_sdk/resources/shipments.rb +2 -1
  97. data/lib/whop_sdk/resources/support_channels.rb +2 -1
  98. data/lib/whop_sdk/resources/transfers.rb +5 -2
  99. data/lib/whop_sdk/resources/users.rb +9 -3
  100. data/lib/whop_sdk/version.rb +1 -1
  101. data/lib/whop_sdk.rb +14 -1
  102. data/manifest.yaml +1 -0
  103. data/rbi/whop_sdk/client.rbi +6 -0
  104. data/rbi/whop_sdk/internal/transport/base_client.rbi +5 -0
  105. data/rbi/whop_sdk/internal/transport/pooled_net_requester.rbi +6 -2
  106. data/rbi/whop_sdk/internal/type/base_model.rbi +8 -4
  107. data/rbi/whop_sdk/models/access_level.rbi +1 -1
  108. data/rbi/whop_sdk/models/access_pass_type.rbi +2 -1
  109. data/rbi/whop_sdk/models/access_token_create_params.rbi +126 -0
  110. data/rbi/whop_sdk/models/access_token_create_response.rbi +37 -0
  111. data/rbi/whop_sdk/models/app_build_create_params.rbi +80 -40
  112. data/rbi/whop_sdk/models/app_update_params.rbi +86 -37
  113. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +196 -68
  114. data/rbi/whop_sdk/models/company.rbi +10 -0
  115. data/rbi/whop_sdk/models/company_create_params.rbi +67 -0
  116. data/rbi/whop_sdk/models/company_list_params.rbi +83 -0
  117. data/rbi/whop_sdk/models/company_list_response.rbi +235 -0
  118. data/rbi/whop_sdk/models/course.rbi +21 -3
  119. data/rbi/whop_sdk/models/course_create_params.rbi +126 -38
  120. data/rbi/whop_sdk/models/course_lesson_create_params.rbi +126 -0
  121. data/rbi/whop_sdk/models/course_lesson_list_response.rbi +68 -0
  122. data/rbi/whop_sdk/models/course_lesson_update_params.rbi +449 -111
  123. data/rbi/whop_sdk/models/course_list_response.rbi +21 -3
  124. data/rbi/whop_sdk/models/course_student_list_params.rbi +83 -0
  125. data/rbi/whop_sdk/models/course_student_list_response.rbi +142 -0
  126. data/rbi/whop_sdk/models/course_student_retrieve_params.rbi +30 -0
  127. data/rbi/whop_sdk/models/course_student_retrieve_response.rbi +250 -0
  128. data/rbi/whop_sdk/models/course_update_params.rbi +104 -38
  129. data/rbi/whop_sdk/models/course_visibilities.rbi +23 -0
  130. data/rbi/whop_sdk/models/embed_type.rbi +20 -0
  131. data/rbi/whop_sdk/models/entry.rbi +3 -3
  132. data/rbi/whop_sdk/models/entry_list_response.rbi +3 -3
  133. data/rbi/whop_sdk/models/experience.rbi +7 -9
  134. data/rbi/whop_sdk/models/experience_update_params.rbi +84 -38
  135. data/rbi/whop_sdk/models/forum_post.rbi +2 -2
  136. data/rbi/whop_sdk/models/forum_post_create_params.rbi +85 -32
  137. data/rbi/whop_sdk/models/forum_post_list_response.rbi +2 -2
  138. data/rbi/whop_sdk/models/forum_post_update_params.rbi +85 -32
  139. data/rbi/whop_sdk/models/global_affiliate_status.rbi +1 -1
  140. data/rbi/whop_sdk/models/invoice_create_params.rbi +60 -46
  141. data/rbi/whop_sdk/models/invoice_list_params.rbi +26 -71
  142. data/rbi/whop_sdk/models/lesson.rbi +68 -10
  143. data/rbi/whop_sdk/models/member_list_params.rbi +10 -10
  144. data/rbi/whop_sdk/models/member_list_response.rbi +6 -6
  145. data/rbi/whop_sdk/models/member_retrieve_response.rbi +6 -6
  146. data/rbi/whop_sdk/models/membership_list_params.rbi +8 -8
  147. data/rbi/whop_sdk/models/message.rbi +2 -2
  148. data/rbi/whop_sdk/models/message_create_params.rbi +85 -32
  149. data/rbi/whop_sdk/models/message_list_response.rbi +2 -2
  150. data/rbi/whop_sdk/models/message_update_params.rbi +85 -32
  151. data/rbi/whop_sdk/models/payment.rbi +13 -3
  152. data/rbi/whop_sdk/models/payment_list_response.rbi +13 -3
  153. data/rbi/whop_sdk/models/payment_method_types.rbi +3 -1
  154. data/rbi/whop_sdk/models/plan.rbi +88 -4
  155. data/rbi/whop_sdk/models/plan_create_params.rbi +176 -34
  156. data/rbi/whop_sdk/models/plan_list_response.rbi +100 -4
  157. data/rbi/whop_sdk/models/plan_type.rbi +1 -1
  158. data/rbi/whop_sdk/models/plan_update_params.rbi +174 -32
  159. data/rbi/whop_sdk/models/product.rbi +1 -1
  160. data/rbi/whop_sdk/models/product_create_params.rbi +6 -6
  161. data/rbi/whop_sdk/models/product_list_item.rbi +1 -1
  162. data/rbi/whop_sdk/models/product_update_params.rbi +87 -43
  163. data/rbi/whop_sdk/models/promo_code.rbi +3 -3
  164. data/rbi/whop_sdk/models/promo_code_list_response.rbi +3 -3
  165. data/rbi/whop_sdk/models/transfer.rbi +8 -0
  166. data/rbi/whop_sdk/models/transfer_create_params.rbi +8 -0
  167. data/rbi/whop_sdk/models/transfer_list_response.rbi +8 -0
  168. data/rbi/whop_sdk/models.rbi +14 -0
  169. data/rbi/whop_sdk/resources/access_tokens.rbi +41 -0
  170. data/rbi/whop_sdk/resources/app_builds.rbi +15 -3
  171. data/rbi/whop_sdk/resources/apps.rbi +13 -2
  172. data/rbi/whop_sdk/resources/authorized_users.rbi +5 -1
  173. data/rbi/whop_sdk/resources/chat_channels.rbi +8 -1
  174. data/rbi/whop_sdk/resources/checkout_configurations.rbi +11 -8
  175. data/rbi/whop_sdk/resources/companies.rbi +68 -1
  176. data/rbi/whop_sdk/resources/course_chapters.rbi +11 -2
  177. data/rbi/whop_sdk/resources/course_lesson_interactions.rbi +7 -3
  178. data/rbi/whop_sdk/resources/course_lessons.rbi +62 -4
  179. data/rbi/whop_sdk/resources/course_students.rbi +69 -0
  180. data/rbi/whop_sdk/resources/courses.rbi +50 -4
  181. data/rbi/whop_sdk/resources/entries.rbi +15 -3
  182. data/rbi/whop_sdk/resources/experiences.rbi +21 -3
  183. data/rbi/whop_sdk/resources/forum_posts.rbi +18 -3
  184. data/rbi/whop_sdk/resources/forums.rbi +6 -1
  185. data/rbi/whop_sdk/resources/invoices.rbi +38 -23
  186. data/rbi/whop_sdk/resources/ledger_accounts.rbi +7 -2
  187. data/rbi/whop_sdk/resources/members.rbi +9 -5
  188. data/rbi/whop_sdk/resources/memberships.rbi +16 -5
  189. data/rbi/whop_sdk/resources/messages.rbi +18 -3
  190. data/rbi/whop_sdk/resources/payments.rbi +16 -3
  191. data/rbi/whop_sdk/resources/plans.rbi +40 -5
  192. data/rbi/whop_sdk/resources/products.rbi +21 -7
  193. data/rbi/whop_sdk/resources/promo_codes.rbi +10 -2
  194. data/rbi/whop_sdk/resources/reactions.rbi +5 -1
  195. data/rbi/whop_sdk/resources/reviews.rbi +5 -1
  196. data/rbi/whop_sdk/resources/shipments.rbi +5 -1
  197. data/rbi/whop_sdk/resources/support_channels.rbi +5 -1
  198. data/rbi/whop_sdk/resources/transfers.rbi +8 -1
  199. data/rbi/whop_sdk/resources/users.rbi +13 -2
  200. data/sig/whop_sdk/client.rbs +4 -0
  201. data/sig/whop_sdk/internal/transport/base_client.rbs +2 -0
  202. data/sig/whop_sdk/internal/transport/pooled_net_requester.rbs +4 -1
  203. data/sig/whop_sdk/models/access_token_create_params.rbs +56 -0
  204. data/sig/whop_sdk/models/access_token_create_response.rbs +15 -0
  205. data/sig/whop_sdk/models/app_build_create_params.rbs +29 -10
  206. data/sig/whop_sdk/models/app_update_params.rbs +29 -10
  207. data/sig/whop_sdk/models/checkout_configuration_create_params.rbs +72 -21
  208. data/sig/whop_sdk/models/company.rbs +5 -0
  209. data/sig/whop_sdk/models/company_create_params.rbs +41 -0
  210. data/sig/whop_sdk/models/company_list_params.rbs +51 -0
  211. data/sig/whop_sdk/models/company_list_response.rbs +109 -0
  212. data/sig/whop_sdk/models/course.rbs +13 -3
  213. data/sig/whop_sdk/models/course_create_params.rbs +49 -10
  214. data/sig/whop_sdk/models/course_lesson_create_params.rbs +46 -0
  215. data/sig/whop_sdk/models/course_lesson_list_response.rbs +25 -0
  216. data/sig/whop_sdk/models/course_lesson_update_params.rbs +162 -30
  217. data/sig/whop_sdk/models/course_list_response.rbs +13 -3
  218. data/sig/whop_sdk/models/course_student_list_params.rbs +51 -0
  219. data/sig/whop_sdk/models/course_student_list_response.rbs +64 -0
  220. data/sig/whop_sdk/models/course_student_retrieve_params.rbs +15 -0
  221. data/sig/whop_sdk/models/course_student_retrieve_response.rbs +106 -0
  222. data/sig/whop_sdk/models/course_update_params.rbs +40 -11
  223. data/sig/whop_sdk/models/course_visibilities.rbs +14 -0
  224. data/sig/whop_sdk/models/embed_type.rbs +14 -0
  225. data/sig/whop_sdk/models/experience_update_params.rbs +29 -10
  226. data/sig/whop_sdk/models/forum_post_create_params.rbs +29 -10
  227. data/sig/whop_sdk/models/forum_post_update_params.rbs +29 -10
  228. data/sig/whop_sdk/models/invoice_create_params.rbs +28 -18
  229. data/sig/whop_sdk/models/invoice_list_params.rbs +16 -33
  230. data/sig/whop_sdk/models/lesson.rbs +33 -8
  231. data/sig/whop_sdk/models/member_list_params.rbs +5 -5
  232. data/sig/whop_sdk/models/membership_list_params.rbs +5 -5
  233. data/sig/whop_sdk/models/message_create_params.rbs +29 -10
  234. data/sig/whop_sdk/models/message_update_params.rbs +29 -10
  235. data/sig/whop_sdk/models/payment.rbs +5 -0
  236. data/sig/whop_sdk/models/payment_list_response.rbs +5 -0
  237. data/sig/whop_sdk/models/payment_method_types.rbs +4 -2
  238. data/sig/whop_sdk/models/plan.rbs +32 -0
  239. data/sig/whop_sdk/models/plan_create_params.rbs +61 -10
  240. data/sig/whop_sdk/models/plan_list_response.rbs +32 -0
  241. data/sig/whop_sdk/models/plan_update_params.rbs +61 -10
  242. data/sig/whop_sdk/models/product_update_params.rbs +29 -10
  243. data/sig/whop_sdk/models/transfer.rbs +5 -0
  244. data/sig/whop_sdk/models/transfer_create_params.rbs +5 -0
  245. data/sig/whop_sdk/models/transfer_list_response.rbs +5 -0
  246. data/sig/whop_sdk/models.rbs +14 -0
  247. data/sig/whop_sdk/resources/access_tokens.rbs +15 -0
  248. data/sig/whop_sdk/resources/app_builds.rbs +1 -1
  249. data/sig/whop_sdk/resources/apps.rbs +1 -1
  250. data/sig/whop_sdk/resources/checkout_configurations.rbs +2 -2
  251. data/sig/whop_sdk/resources/companies.rbs +18 -0
  252. data/sig/whop_sdk/resources/course_lessons.rbs +10 -2
  253. data/sig/whop_sdk/resources/course_students.rbs +22 -0
  254. data/sig/whop_sdk/resources/courses.rbs +8 -2
  255. data/sig/whop_sdk/resources/experiences.rbs +1 -1
  256. data/sig/whop_sdk/resources/forum_posts.rbs +2 -2
  257. data/sig/whop_sdk/resources/invoices.rbs +8 -6
  258. data/sig/whop_sdk/resources/members.rbs +1 -1
  259. data/sig/whop_sdk/resources/memberships.rbs +1 -1
  260. data/sig/whop_sdk/resources/messages.rbs +2 -2
  261. data/sig/whop_sdk/resources/plans.rbs +4 -2
  262. data/sig/whop_sdk/resources/products.rbs +1 -1
  263. data/sig/whop_sdk/resources/transfers.rbs +1 -0
  264. metadata +41 -5
  265. data/lib/whop_sdk/models/invoice_create_response.rb +0 -27
  266. data/rbi/whop_sdk/models/invoice_create_response.rbi +0 -49
  267. data/sig/whop_sdk/models/invoice_create_response.rbs +0 -19
@@ -35,6 +35,10 @@ module WhopSDK
35
35
  sig { returns(T.nilable(Float)) }
36
36
  attr_accessor :fee_amount
37
37
 
38
+ # A hash of metadata attached to the transfer
39
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
40
+ attr_accessor :metadata
41
+
38
42
  # The notes of the credit transaction transfer
39
43
  sig { returns(T.nilable(String)) }
40
44
  attr_accessor :notes
@@ -52,6 +56,7 @@ module WhopSDK
52
56
  currency: WhopSDK::Currency::OrSymbol,
53
57
  destination_ledger_account_id: String,
54
58
  fee_amount: T.nilable(Float),
59
+ metadata: T.nilable(T::Hash[Symbol, T.anything]),
55
60
  notes: T.nilable(String),
56
61
  origin_ledger_account_id: String
57
62
  ).returns(T.attached_class)
@@ -69,6 +74,8 @@ module WhopSDK
69
74
  destination_ledger_account_id:,
70
75
  # The decimal fee of the credit transaction transfer
71
76
  fee_amount:,
77
+ # A hash of metadata attached to the transfer
78
+ metadata:,
72
79
  # The notes of the credit transaction transfer
73
80
  notes:,
74
81
  # The ID of the origin ledger account
@@ -85,6 +92,7 @@ module WhopSDK
85
92
  currency: WhopSDK::Currency::TaggedSymbol,
86
93
  destination_ledger_account_id: String,
87
94
  fee_amount: T.nilable(Float),
95
+ metadata: T.nilable(T::Hash[Symbol, T.anything]),
88
96
  notes: T.nilable(String),
89
97
  origin_ledger_account_id: String
90
98
  }
@@ -5,6 +5,8 @@ module WhopSDK
5
5
 
6
6
  AccessPassType = WhopSDK::Models::AccessPassType
7
7
 
8
+ AccessTokenCreateParams = WhopSDK::Models::AccessTokenCreateParams
9
+
8
10
  App = WhopSDK::Models::App
9
11
 
10
12
  AppBuild = WhopSDK::Models::AppBuild
@@ -70,6 +72,10 @@ module WhopSDK
70
72
 
71
73
  Company = WhopSDK::Models::Company
72
74
 
75
+ CompanyCreateParams = WhopSDK::Models::CompanyCreateParams
76
+
77
+ CompanyListParams = WhopSDK::Models::CompanyListParams
78
+
73
79
  CompanyRetrieveParams = WhopSDK::Models::CompanyRetrieveParams
74
80
 
75
81
  Course = WhopSDK::Models::Course
@@ -118,8 +124,14 @@ module WhopSDK
118
124
 
119
125
  CourseRetrieveParams = WhopSDK::Models::CourseRetrieveParams
120
126
 
127
+ CourseStudentListParams = WhopSDK::Models::CourseStudentListParams
128
+
129
+ CourseStudentRetrieveParams = WhopSDK::Models::CourseStudentRetrieveParams
130
+
121
131
  CourseUpdateParams = WhopSDK::Models::CourseUpdateParams
122
132
 
133
+ CourseVisibilities = WhopSDK::Models::CourseVisibilities
134
+
123
135
  Currency = WhopSDK::Models::Currency
124
136
 
125
137
  CustomCta = WhopSDK::Models::CustomCta
@@ -130,6 +142,8 @@ module WhopSDK
130
142
 
131
143
  EmailNotificationPreferences = WhopSDK::Models::EmailNotificationPreferences
132
144
 
145
+ EmbedType = WhopSDK::Models::EmbedType
146
+
133
147
  Entry = WhopSDK::Models::Entry
134
148
 
135
149
  EntryApprovedWebhookEvent = WhopSDK::Models::EntryApprovedWebhookEvent
@@ -0,0 +1,41 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Resources
5
+ class AccessTokens
6
+ # Creates an access token for a user to access a specific resource. These access
7
+ # tokens are designed to be used with Whop's embedded components.
8
+ sig do
9
+ params(
10
+ scoped_actions: T::Array[String],
11
+ target_resource_id: String,
12
+ target_resource_type:
13
+ WhopSDK::AccessTokenCreateParams::TargetResourceType::OrSymbol,
14
+ expires_at: T.nilable(Time),
15
+ request_options: WhopSDK::RequestOptions::OrHash
16
+ ).returns(WhopSDK::Models::AccessTokenCreateResponse)
17
+ end
18
+ def create(
19
+ # Array of desired scoped actions for the access token. This list must be a subset
20
+ # of the API keys's existing permissions. Otherwise, an error will be raised.
21
+ scoped_actions:,
22
+ # The ID of the target resource (Company, User, etc.) for which the access token
23
+ # is being created.
24
+ target_resource_id:,
25
+ # The type of the target resource (company, user, product, experience, etc.).
26
+ target_resource_type:,
27
+ # The expiration timestamp for the access token. If not provided, a default
28
+ # expiration time of 1 hour will be used. The expiration can be set to a maximum
29
+ # of 3 hours from the current time.
30
+ expires_at: nil,
31
+ request_options: {}
32
+ )
33
+ end
34
+
35
+ # @api private
36
+ sig { params(client: WhopSDK::Client).returns(T.attached_class) }
37
+ def self.new(client:)
38
+ end
39
+ end
40
+ end
41
+ end
@@ -10,7 +10,11 @@ module WhopSDK
10
10
  # - `developer:manage_builds`
11
11
  sig do
12
12
  params(
13
- attachment: WhopSDK::AppBuildCreateParams::Attachment::OrHash,
13
+ attachment:
14
+ T.any(
15
+ WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash,
16
+ WhopSDK::AppBuildCreateParams::Attachment::AttachmentInputWithID::OrHash
17
+ ),
14
18
  checksum: String,
15
19
  platform: WhopSDK::AppBuildPlatforms::OrSymbol,
16
20
  app_id: T.nilable(String),
@@ -51,7 +55,11 @@ module WhopSDK
51
55
  request_options: WhopSDK::RequestOptions::OrHash
52
56
  ).returns(WhopSDK::AppBuild)
53
57
  end
54
- def retrieve(id, request_options: {})
58
+ def retrieve(
59
+ # The ID of the app build
60
+ id,
61
+ request_options: {}
62
+ )
55
63
  end
56
64
 
57
65
  # Lists app builds for an app
@@ -103,7 +111,11 @@ module WhopSDK
103
111
  request_options: WhopSDK::RequestOptions::OrHash
104
112
  ).returns(WhopSDK::AppBuild)
105
113
  end
106
- def promote(id, request_options: {})
114
+ def promote(
115
+ # The ID of the app build to promote.
116
+ id,
117
+ request_options: {}
118
+ )
107
119
  end
108
120
 
109
121
  # @api private
@@ -39,7 +39,11 @@ module WhopSDK
39
39
  request_options: WhopSDK::RequestOptions::OrHash
40
40
  ).returns(WhopSDK::App)
41
41
  end
42
- def retrieve(id, request_options: {})
42
+ def retrieve(
43
+ # The ID of the app
44
+ id,
45
+ request_options: {}
46
+ )
43
47
  end
44
48
 
45
49
  # Update an existing App
@@ -57,7 +61,13 @@ module WhopSDK
57
61
  description: T.nilable(String),
58
62
  discover_path: T.nilable(String),
59
63
  experience_path: T.nilable(String),
60
- icon: T.nilable(WhopSDK::AppUpdateParams::Icon::OrHash),
64
+ icon:
65
+ T.nilable(
66
+ T.any(
67
+ WhopSDK::AppUpdateParams::Icon::AttachmentInputWithDirectUploadID::OrHash,
68
+ WhopSDK::AppUpdateParams::Icon::AttachmentInputWithID::OrHash
69
+ )
70
+ ),
61
71
  name: T.nilable(String),
62
72
  required_scopes:
63
73
  T.nilable(
@@ -68,6 +78,7 @@ module WhopSDK
68
78
  ).returns(WhopSDK::App)
69
79
  end
70
80
  def update(
81
+ # The ID of the app
71
82
  id,
72
83
  # The description of the app for the app store in-depth app view.
73
84
  app_store_description: nil,
@@ -15,7 +15,11 @@ module WhopSDK
15
15
  request_options: WhopSDK::RequestOptions::OrHash
16
16
  ).returns(WhopSDK::Models::AuthorizedUserRetrieveResponse)
17
17
  end
18
- def retrieve(id, request_options: {})
18
+ def retrieve(
19
+ # The ID of the authorized user
20
+ id,
21
+ request_options: {}
22
+ )
19
23
  end
20
24
 
21
25
  # Lists authorized users
@@ -14,7 +14,12 @@ module WhopSDK
14
14
  request_options: WhopSDK::RequestOptions::OrHash
15
15
  ).returns(WhopSDK::ChatChannel)
16
16
  end
17
- def retrieve(id, request_options: {})
17
+ def retrieve(
18
+ # The ID of the chat channel to fetch, it can be an experience ID or a chat
19
+ # channel ID
20
+ id,
21
+ request_options: {}
22
+ )
18
23
  end
19
24
 
20
25
  # Updates a chat channel
@@ -35,6 +40,8 @@ module WhopSDK
35
40
  ).returns(WhopSDK::ChatChannel)
36
41
  end
37
42
  def update(
43
+ # The ID of the chat channel to update. Can be an experience ID or a chat feed
44
+ # external ID.
38
45
  id,
39
46
  # Whether media uploads are banned in this chat
40
47
  ban_media: nil,
@@ -13,24 +13,23 @@ module WhopSDK
13
13
  # - `access_pass:update`
14
14
  sig do
15
15
  params(
16
+ plan: WhopSDK::CheckoutConfigurationCreateParams::Plan::OrHash,
17
+ plan_id: String,
16
18
  affiliate_code: T.nilable(String),
17
19
  metadata: T.nilable(T::Hash[Symbol, T.anything]),
18
- plan:
19
- T.nilable(WhopSDK::CheckoutConfigurationCreateParams::Plan::OrHash),
20
- plan_id: T.nilable(String),
21
20
  redirect_url: T.nilable(String),
22
21
  request_options: WhopSDK::RequestOptions::OrHash
23
22
  ).returns(WhopSDK::CheckoutConfiguration)
24
23
  end
25
24
  def create(
25
+ # Pass this object to create a new plan for this checkout configuration
26
+ plan:,
27
+ # The ID of the plan to use for the checkout configuration
28
+ plan_id:,
26
29
  # The affiliate code to use for the checkout configuration
27
30
  affiliate_code: nil,
28
31
  # The metadata to use for the checkout configuration
29
32
  metadata: nil,
30
- # Pass this object to create a new plan for this checkout configuration
31
- plan: nil,
32
- # The ID of the plan to use for the checkout configuration
33
- plan_id: nil,
34
33
  # The URL to redirect the user to after the checkout configuration is created
35
34
  redirect_url: nil,
36
35
  request_options: {}
@@ -48,7 +47,11 @@ module WhopSDK
48
47
  request_options: WhopSDK::RequestOptions::OrHash
49
48
  ).returns(WhopSDK::CheckoutConfiguration)
50
49
  end
51
- def retrieve(id, request_options: {})
50
+ def retrieve(
51
+ # The ID of the checkout configuration
52
+ id,
53
+ request_options: {}
54
+ )
52
55
  end
53
56
 
54
57
  # Lists checkout configurations
@@ -3,6 +3,34 @@
3
3
  module WhopSDK
4
4
  module Resources
5
5
  class Companies
6
+ # Create a new sub company for your platform
7
+ #
8
+ # Required permissions:
9
+ #
10
+ # - `company:create_child`
11
+ # - `company:basic:read`
12
+ sig do
13
+ params(
14
+ email: String,
15
+ parent_company_id: String,
16
+ title: String,
17
+ metadata: T.nilable(T::Hash[Symbol, T.anything]),
18
+ request_options: WhopSDK::RequestOptions::OrHash
19
+ ).returns(WhopSDK::Company)
20
+ end
21
+ def create(
22
+ # The email of the user who the company will belong to.
23
+ email:,
24
+ # The company ID of the platform creating this company.
25
+ parent_company_id:,
26
+ # The name of the company being created.
27
+ title:,
28
+ # Additional metadata for the account
29
+ metadata: nil,
30
+ request_options: {}
31
+ )
32
+ end
33
+
6
34
  # Retrieves an company by ID or its url route
7
35
  #
8
36
  # Required permissions:
@@ -14,7 +42,46 @@ module WhopSDK
14
42
  request_options: WhopSDK::RequestOptions::OrHash
15
43
  ).returns(WhopSDK::Company)
16
44
  end
17
- def retrieve(id, request_options: {})
45
+ def retrieve(
46
+ # The ID or route of the company
47
+ id,
48
+ request_options: {}
49
+ )
50
+ end
51
+
52
+ # Lists companies the current user has access to
53
+ #
54
+ # Required permissions:
55
+ #
56
+ # - `company:basic:read`
57
+ sig do
58
+ params(
59
+ parent_company_id: String,
60
+ after: T.nilable(String),
61
+ before: T.nilable(String),
62
+ direction: T.nilable(WhopSDK::Direction::OrSymbol),
63
+ first: T.nilable(Integer),
64
+ last: T.nilable(Integer),
65
+ request_options: WhopSDK::RequestOptions::OrHash
66
+ ).returns(
67
+ WhopSDK::Internal::CursorPage[WhopSDK::Models::CompanyListResponse]
68
+ )
69
+ end
70
+ def list(
71
+ # The ID of the parent company to list sub companies for
72
+ parent_company_id:,
73
+ # Returns the elements in the list that come after the specified cursor.
74
+ after: nil,
75
+ # Returns the elements in the list that come before the specified cursor.
76
+ before: nil,
77
+ # The direction of the sort.
78
+ direction: nil,
79
+ # Returns the first _n_ elements from the list.
80
+ first: nil,
81
+ # Returns the last _n_ elements from the list.
82
+ last: nil,
83
+ request_options: {}
84
+ )
18
85
  end
19
86
 
20
87
  # @api private
@@ -35,7 +35,11 @@ module WhopSDK
35
35
  request_options: WhopSDK::RequestOptions::OrHash
36
36
  ).returns(WhopSDK::CourseChapter)
37
37
  end
38
- def retrieve(id, request_options: {})
38
+ def retrieve(
39
+ # The ID of the chapter
40
+ id,
41
+ request_options: {}
42
+ )
39
43
  end
40
44
 
41
45
  # Updates a course chapter
@@ -51,6 +55,7 @@ module WhopSDK
51
55
  ).returns(WhopSDK::CourseChapter)
52
56
  end
53
57
  def update(
58
+ # The ID of the chapter to update
54
59
  id,
55
60
  # The title of the chapter
56
61
  title:,
@@ -103,7 +108,11 @@ module WhopSDK
103
108
  request_options: WhopSDK::RequestOptions::OrHash
104
109
  ).returns(T::Boolean)
105
110
  end
106
- def delete(id, request_options: {})
111
+ def delete(
112
+ # The ID of the chapter to delete
113
+ id,
114
+ request_options: {}
115
+ )
107
116
  end
108
117
 
109
118
  # @api private
@@ -7,23 +7,27 @@ module WhopSDK
7
7
  #
8
8
  # Required permissions:
9
9
  #
10
- # - `course_lesson_interaction:read`
11
10
  # - `courses:read`
11
+ # - `course_analytics:read`
12
12
  sig do
13
13
  params(
14
14
  id: String,
15
15
  request_options: WhopSDK::RequestOptions::OrHash
16
16
  ).returns(WhopSDK::CourseLessonInteraction)
17
17
  end
18
- def retrieve(id, request_options: {})
18
+ def retrieve(
19
+ # The ID of the course lesson interaction
20
+ id,
21
+ request_options: {}
22
+ )
19
23
  end
20
24
 
21
25
  # Lists course lesson interactions
22
26
  #
23
27
  # Required permissions:
24
28
  #
25
- # - `course_lesson_interaction:read`
26
29
  # - `courses:read`
30
+ # - `course_analytics:read`
27
31
  sig do
28
32
  params(
29
33
  after: T.nilable(String),
@@ -14,6 +14,15 @@ module WhopSDK
14
14
  lesson_type: WhopSDK::LessonTypes::OrSymbol,
15
15
  content: T.nilable(String),
16
16
  days_from_course_start_until_unlock: T.nilable(Integer),
17
+ embed_id: T.nilable(String),
18
+ embed_type: T.nilable(WhopSDK::EmbedType::OrSymbol),
19
+ thumbnail:
20
+ T.nilable(
21
+ T.any(
22
+ WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID::OrHash,
23
+ WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID::OrHash
24
+ )
25
+ ),
17
26
  title: T.nilable(String),
18
27
  request_options: WhopSDK::RequestOptions::OrHash
19
28
  ).returns(WhopSDK::Lesson)
@@ -27,6 +36,12 @@ module WhopSDK
27
36
  content: nil,
28
37
  # Days from course start until unlock
29
38
  days_from_course_start_until_unlock: nil,
39
+ # ID for the embed (YouTube video ID or Loom share ID)
40
+ embed_id: nil,
41
+ # The type of embed for a lesson
42
+ embed_type: nil,
43
+ # The thumbnail for the lesson in png, jpeg, or gif format
44
+ thumbnail: nil,
30
45
  # The title of the lesson
31
46
  title: nil,
32
47
  request_options: {}
@@ -44,7 +59,11 @@ module WhopSDK
44
59
  request_options: WhopSDK::RequestOptions::OrHash
45
60
  ).returns(WhopSDK::Lesson)
46
61
  end
47
- def retrieve(id, request_options: {})
62
+ def retrieve(
63
+ # The ID of the lesson
64
+ id,
65
+ request_options: {}
66
+ )
48
67
  end
49
68
 
50
69
  # Updates a course lesson
@@ -55,6 +74,10 @@ module WhopSDK
55
74
  sig do
56
75
  params(
57
76
  id: String,
77
+ assessment_completion_requirement:
78
+ T.nilable(
79
+ WhopSDK::CourseLessonUpdateParams::AssessmentCompletionRequirement::OrHash
80
+ ),
58
81
  assessment_questions:
59
82
  T.nilable(
60
83
  T::Array[
@@ -63,21 +86,44 @@ module WhopSDK
63
86
  ),
64
87
  attachments:
65
88
  T.nilable(
66
- T::Array[WhopSDK::CourseLessonUpdateParams::Attachment::OrHash]
89
+ T::Array[
90
+ T.any(
91
+ WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithDirectUploadID::OrHash,
92
+ WhopSDK::CourseLessonUpdateParams::Attachment::AttachmentInputWithID::OrHash
93
+ )
94
+ ]
67
95
  ),
68
96
  content: T.nilable(String),
69
97
  days_from_course_start_until_unlock: T.nilable(Integer),
98
+ embed_id: T.nilable(String),
99
+ embed_type: T.nilable(WhopSDK::EmbedType::OrSymbol),
70
100
  lesson_type: T.nilable(WhopSDK::LessonTypes::OrSymbol),
71
101
  main_pdf:
72
- T.nilable(WhopSDK::CourseLessonUpdateParams::MainPdf::OrHash),
102
+ T.nilable(
103
+ T.any(
104
+ WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithDirectUploadID::OrHash,
105
+ WhopSDK::CourseLessonUpdateParams::MainPdf::AttachmentInputWithID::OrHash
106
+ )
107
+ ),
108
+ max_attempts: T.nilable(Integer),
73
109
  mux_asset_id: T.nilable(String),
110
+ thumbnail:
111
+ T.nilable(
112
+ T.any(
113
+ WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID::OrHash,
114
+ WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID::OrHash
115
+ )
116
+ ),
74
117
  title: T.nilable(String),
75
118
  visibility: T.nilable(WhopSDK::LessonVisibilities::OrSymbol),
76
119
  request_options: WhopSDK::RequestOptions::OrHash
77
120
  ).returns(WhopSDK::Lesson)
78
121
  end
79
122
  def update(
123
+ # The ID of the lesson to update
80
124
  id,
125
+ # Completion requirements for quiz/knowledge check lessons
126
+ assessment_completion_requirement: nil,
81
127
  # Assessment questions for quiz/knowledge check lessons. Replaces all existing
82
128
  # questions.
83
129
  assessment_questions: nil,
@@ -88,12 +134,20 @@ module WhopSDK
88
134
  content: nil,
89
135
  # Days from course start until unlock
90
136
  days_from_course_start_until_unlock: nil,
137
+ # ID for the embed (YouTube video ID or Loom share ID)
138
+ embed_id: nil,
139
+ # The type of embed for a lesson
140
+ embed_type: nil,
91
141
  # The available types for a lesson
92
142
  lesson_type: nil,
93
143
  # The main PDF file for this lesson
94
144
  main_pdf: nil,
145
+ # Maximum number of attempts allowed for assessments
146
+ max_attempts: nil,
95
147
  # The ID of the Mux asset to attach to this lesson for video lessons
96
148
  mux_asset_id: nil,
149
+ # The thumbnail for the lesson in png, jpeg, or gif format
150
+ thumbnail: nil,
97
151
  # The title of the lesson
98
152
  title: nil,
99
153
  # The available visibilities for a lesson. Determines how / whether a lesson is
@@ -151,7 +205,11 @@ module WhopSDK
151
205
  request_options: WhopSDK::RequestOptions::OrHash
152
206
  ).returns(T::Boolean)
153
207
  end
154
- def delete(id, request_options: {})
208
+ def delete(
209
+ # The ID of the lesson to delete
210
+ id,
211
+ request_options: {}
212
+ )
155
213
  end
156
214
 
157
215
  # @api private
@@ -0,0 +1,69 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Resources
5
+ class CourseStudents
6
+ # Retrieves a course student by interaction ID
7
+ #
8
+ # Required permissions:
9
+ #
10
+ # - `courses:read`
11
+ # - `course_analytics:read`
12
+ sig do
13
+ params(
14
+ id: String,
15
+ request_options: WhopSDK::RequestOptions::OrHash
16
+ ).returns(WhopSDK::Models::CourseStudentRetrieveResponse)
17
+ end
18
+ def retrieve(
19
+ # The ID of the course student interaction
20
+ id,
21
+ request_options: {}
22
+ )
23
+ end
24
+
25
+ # Lists students for a course
26
+ #
27
+ # Required permissions:
28
+ #
29
+ # - `courses:read`
30
+ # - `course_analytics:read`
31
+ sig do
32
+ params(
33
+ course_id: String,
34
+ after: T.nilable(String),
35
+ before: T.nilable(String),
36
+ first: T.nilable(Integer),
37
+ keyword: T.nilable(String),
38
+ last: T.nilable(Integer),
39
+ request_options: WhopSDK::RequestOptions::OrHash
40
+ ).returns(
41
+ WhopSDK::Internal::CursorPage[
42
+ WhopSDK::Models::CourseStudentListResponse
43
+ ]
44
+ )
45
+ end
46
+ def list(
47
+ # The ID of the course
48
+ course_id:,
49
+ # Returns the elements in the list that come after the specified cursor.
50
+ after: nil,
51
+ # Returns the elements in the list that come before the specified cursor.
52
+ before: nil,
53
+ # Returns the first _n_ elements from the list.
54
+ first: nil,
55
+ # Filter students by name - returns students whose names match the keyword
56
+ keyword: nil,
57
+ # Returns the last _n_ elements from the list.
58
+ last: nil,
59
+ request_options: {}
60
+ )
61
+ end
62
+
63
+ # @api private
64
+ sig { params(client: WhopSDK::Client).returns(T.attached_class) }
65
+ def self.new(client:)
66
+ end
67
+ end
68
+ end
69
+ end