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
@@ -32,6 +32,11 @@ module WhopSDK
32
32
  sig { returns(T.nilable(WhopSDK::Languages::OrSymbol)) }
33
33
  attr_accessor :language
34
34
 
35
+ # The decimal order position of the course within its experience. Use fractional
36
+ # values (e.g., 1.5) to place between existing courses.
37
+ sig { returns(T.nilable(String)) }
38
+ attr_accessor :order
39
+
35
40
  # Whether the course requires students to complete the previous lesson before
36
41
  # moving on to the next one
37
42
  sig { returns(T.nilable(T::Boolean)) }
@@ -42,20 +47,27 @@ module WhopSDK
42
47
  attr_accessor :tagline
43
48
 
44
49
  # The thumbnail for the course in png, jpeg, or gif format
45
- sig { returns(T.nilable(WhopSDK::CourseUpdateParams::Thumbnail)) }
46
- attr_reader :thumbnail
47
-
48
50
  sig do
49
- params(
50
- thumbnail: T.nilable(WhopSDK::CourseUpdateParams::Thumbnail::OrHash)
51
- ).void
51
+ returns(
52
+ T.nilable(
53
+ T.any(
54
+ WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID,
55
+ WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithID
56
+ )
57
+ )
58
+ )
52
59
  end
53
- attr_writer :thumbnail
60
+ attr_accessor :thumbnail
54
61
 
55
62
  # The title of the course
56
63
  sig { returns(T.nilable(String)) }
57
64
  attr_accessor :title
58
65
 
66
+ # The available visibilities for a course. Determines how / whether a course is
67
+ # visible to users.
68
+ sig { returns(T.nilable(WhopSDK::CourseVisibilities::OrSymbol)) }
69
+ attr_accessor :visibility
70
+
59
71
  sig do
60
72
  params(
61
73
  certificate_after_completion_enabled: T.nilable(T::Boolean),
@@ -64,10 +76,18 @@ module WhopSDK
64
76
  cover_image: T.nilable(String),
65
77
  description: T.nilable(String),
66
78
  language: T.nilable(WhopSDK::Languages::OrSymbol),
79
+ order: T.nilable(String),
67
80
  require_completing_lessons_in_order: T.nilable(T::Boolean),
68
81
  tagline: T.nilable(String),
69
- thumbnail: T.nilable(WhopSDK::CourseUpdateParams::Thumbnail::OrHash),
82
+ thumbnail:
83
+ T.nilable(
84
+ T.any(
85
+ WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID::OrHash,
86
+ WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithID::OrHash
87
+ )
88
+ ),
70
89
  title: T.nilable(String),
90
+ visibility: T.nilable(WhopSDK::CourseVisibilities::OrSymbol),
71
91
  request_options: WhopSDK::RequestOptions::OrHash
72
92
  ).returns(T.attached_class)
73
93
  end
@@ -83,6 +103,9 @@ module WhopSDK
83
103
  description: nil,
84
104
  # The available languages for a course
85
105
  language: nil,
106
+ # The decimal order position of the course within its experience. Use fractional
107
+ # values (e.g., 1.5) to place between existing courses.
108
+ order: nil,
86
109
  # Whether the course requires students to complete the previous lesson before
87
110
  # moving on to the next one
88
111
  require_completing_lessons_in_order: nil,
@@ -92,6 +115,9 @@ module WhopSDK
92
115
  thumbnail: nil,
93
116
  # The title of the course
94
117
  title: nil,
118
+ # The available visibilities for a course. Determines how / whether a course is
119
+ # visible to users.
120
+ visibility: nil,
95
121
  request_options: {}
96
122
  )
97
123
  end
@@ -104,10 +130,18 @@ module WhopSDK
104
130
  cover_image: T.nilable(String),
105
131
  description: T.nilable(String),
106
132
  language: T.nilable(WhopSDK::Languages::OrSymbol),
133
+ order: T.nilable(String),
107
134
  require_completing_lessons_in_order: T.nilable(T::Boolean),
108
135
  tagline: T.nilable(String),
109
- thumbnail: T.nilable(WhopSDK::CourseUpdateParams::Thumbnail),
136
+ thumbnail:
137
+ T.nilable(
138
+ T.any(
139
+ WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID,
140
+ WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithID
141
+ )
142
+ ),
110
143
  title: T.nilable(String),
144
+ visibility: T.nilable(WhopSDK::CourseVisibilities::OrSymbol),
111
145
  request_options: WhopSDK::RequestOptions
112
146
  }
113
147
  )
@@ -240,52 +274,84 @@ module WhopSDK
240
274
  end
241
275
  end
242
276
 
243
- class Thumbnail < WhopSDK::Internal::Type::BaseModel
244
- OrHash =
277
+ # The thumbnail for the course in png, jpeg, or gif format
278
+ module Thumbnail
279
+ extend WhopSDK::Internal::Type::Union
280
+
281
+ Variants =
245
282
  T.type_alias do
246
283
  T.any(
247
- WhopSDK::CourseUpdateParams::Thumbnail,
248
- WhopSDK::Internal::AnyHash
284
+ WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID,
285
+ WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithID
249
286
  )
250
287
  end
251
288
 
252
- # The ID of an existing attachment object. Use this when updating a resource and
253
- # keeping a subset of the attachments. Don't use this unless you know what you're
254
- # doing.
255
- sig { returns(T.nilable(String)) }
256
- attr_accessor :id
289
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
290
+ OrHash =
291
+ T.type_alias do
292
+ T.any(
293
+ WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID,
294
+ WhopSDK::Internal::AnyHash
295
+ )
296
+ end
257
297
 
258
- # This ID should be used the first time you upload an attachment. It is the ID of
259
- # the direct upload that was created when uploading the file to S3 via the
260
- # mediaDirectUpload mutation.
261
- sig { returns(T.nilable(String)) }
262
- attr_accessor :direct_upload_id
298
+ # This ID should be used the first time you upload an attachment. It is the ID of
299
+ # the direct upload that was created when uploading the file to S3 via the
300
+ # mediaDirectUpload mutation.
301
+ sig { returns(String) }
302
+ attr_accessor :direct_upload_id
263
303
 
264
- # The thumbnail for the course in png, jpeg, or gif format
265
- sig do
266
- params(
267
- id: T.nilable(String),
268
- direct_upload_id: T.nilable(String)
269
- ).returns(T.attached_class)
304
+ # Input for an attachment
305
+ sig { params(direct_upload_id: String).returns(T.attached_class) }
306
+ def self.new(
307
+ # This ID should be used the first time you upload an attachment. It is the ID of
308
+ # the direct upload that was created when uploading the file to S3 via the
309
+ # mediaDirectUpload mutation.
310
+ direct_upload_id:
311
+ )
312
+ end
313
+
314
+ sig { override.returns({ direct_upload_id: String }) }
315
+ def to_hash
316
+ end
270
317
  end
271
- def self.new(
318
+
319
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
320
+ OrHash =
321
+ T.type_alias do
322
+ T.any(
323
+ WhopSDK::CourseUpdateParams::Thumbnail::AttachmentInputWithID,
324
+ WhopSDK::Internal::AnyHash
325
+ )
326
+ end
327
+
272
328
  # The ID of an existing attachment object. Use this when updating a resource and
273
329
  # keeping a subset of the attachments. Don't use this unless you know what you're
274
330
  # doing.
275
- id: nil,
276
- # This ID should be used the first time you upload an attachment. It is the ID of
277
- # the direct upload that was created when uploading the file to S3 via the
278
- # mediaDirectUpload mutation.
279
- direct_upload_id: nil
280
- )
331
+ sig { returns(String) }
332
+ attr_accessor :id
333
+
334
+ # Input for an attachment
335
+ sig { params(id: String).returns(T.attached_class) }
336
+ def self.new(
337
+ # The ID of an existing attachment object. Use this when updating a resource and
338
+ # keeping a subset of the attachments. Don't use this unless you know what you're
339
+ # doing.
340
+ id:
341
+ )
342
+ end
343
+
344
+ sig { override.returns({ id: String }) }
345
+ def to_hash
346
+ end
281
347
  end
282
348
 
283
349
  sig do
284
350
  override.returns(
285
- { id: T.nilable(String), direct_upload_id: T.nilable(String) }
351
+ T::Array[WhopSDK::CourseUpdateParams::Thumbnail::Variants]
286
352
  )
287
353
  end
288
- def to_hash
354
+ def self.variants
289
355
  end
290
356
  end
291
357
  end
@@ -0,0 +1,23 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # The available visibilities for a course. Determines how / whether a course is
6
+ # visible to users.
7
+ module CourseVisibilities
8
+ extend WhopSDK::Internal::Type::Enum
9
+
10
+ TaggedSymbol = T.type_alias { T.all(Symbol, WhopSDK::CourseVisibilities) }
11
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
12
+
13
+ VISIBLE = T.let(:visible, WhopSDK::CourseVisibilities::TaggedSymbol)
14
+ HIDDEN = T.let(:hidden, WhopSDK::CourseVisibilities::TaggedSymbol)
15
+
16
+ sig do
17
+ override.returns(T::Array[WhopSDK::CourseVisibilities::TaggedSymbol])
18
+ end
19
+ def self.values
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,20 @@
1
+ # typed: strong
2
+
3
+ module WhopSDK
4
+ module Models
5
+ # The type of embed for a lesson
6
+ module EmbedType
7
+ extend WhopSDK::Internal::Type::Enum
8
+
9
+ TaggedSymbol = T.type_alias { T.all(Symbol, WhopSDK::EmbedType) }
10
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
11
+
12
+ YOUTUBE = T.let(:youtube, WhopSDK::EmbedType::TaggedSymbol)
13
+ LOOM = T.let(:loom, WhopSDK::EmbedType::TaggedSymbol)
14
+
15
+ sig { override.returns(T::Array[WhopSDK::EmbedType::TaggedSymbol]) }
16
+ def self.values
17
+ end
18
+ end
19
+ end
20
+ end
@@ -25,7 +25,7 @@ module WhopSDK
25
25
  sig { params(plan: T.nilable(WhopSDK::Entry::Plan::OrHash)).void }
26
26
  attr_writer :plan
27
27
 
28
- # The access pass tied to this entry, if there is one.
28
+ # The product tied to this entry, if there is one.
29
29
  sig { returns(T.nilable(WhopSDK::Entry::Product)) }
30
30
  attr_reader :product
31
31
 
@@ -65,7 +65,7 @@ module WhopSDK
65
65
  custom_field_responses:,
66
66
  # The waitlist plan the entry if for.
67
67
  plan:,
68
- # The access pass tied to this entry, if there is one.
68
+ # The product tied to this entry, if there is one.
69
69
  product:,
70
70
  # The status of the entry.
71
71
  status:,
@@ -172,7 +172,7 @@ module WhopSDK
172
172
  sig { returns(String) }
173
173
  attr_accessor :title
174
174
 
175
- # The access pass tied to this entry, if there is one.
175
+ # The product tied to this entry, if there is one.
176
176
  sig { params(id: String, title: String).returns(T.attached_class) }
177
177
  def self.new(
178
178
  # The internal ID of the public product.
@@ -27,7 +27,7 @@ module WhopSDK
27
27
  end
28
28
  attr_writer :plan
29
29
 
30
- # The access pass tied to this entry, if there is one.
30
+ # The product tied to this entry, if there is one.
31
31
  sig { returns(T.nilable(WhopSDK::Models::EntryListResponse::Product)) }
32
32
  attr_reader :product
33
33
 
@@ -71,7 +71,7 @@ module WhopSDK
71
71
  created_at:,
72
72
  # The waitlist plan the entry if for.
73
73
  plan:,
74
- # The access pass tied to this entry, if there is one.
74
+ # The product tied to this entry, if there is one.
75
75
  product:,
76
76
  # The status of the entry.
77
77
  status:,
@@ -138,7 +138,7 @@ module WhopSDK
138
138
  sig { returns(String) }
139
139
  attr_accessor :title
140
140
 
141
- # The access pass tied to this entry, if there is one.
141
+ # The product tied to this entry, if there is one.
142
142
  sig { params(id: String, title: String).returns(T.attached_class) }
143
143
  def self.new(
144
144
  # The internal ID of the public product.
@@ -43,10 +43,9 @@ module WhopSDK
43
43
  sig { returns(T.nilable(String)) }
44
44
  attr_accessor :order
45
45
 
46
- # The access passes that are associated with this experience. This should not be
47
- # used unless you are trying to list all access passes the experience has, for
48
- # some reason. You probably don't want to use this though and should be using
49
- # accessPass.
46
+ # The products that this experience is attached to. This defines which set of
47
+ # customers have access and can view this experience. If empty, this experience is
48
+ # only visible to authorized users of the company
50
49
  sig { returns(T::Array[WhopSDK::Experience::Product]) }
51
50
  attr_accessor :products
52
51
 
@@ -78,10 +77,9 @@ module WhopSDK
78
77
  name:,
79
78
  # The order of the experience in the section
80
79
  order:,
81
- # The access passes that are associated with this experience. This should not be
82
- # used unless you are trying to list all access passes the experience has, for
83
- # some reason. You probably don't want to use this though and should be using
84
- # accessPass.
80
+ # The products that this experience is attached to. This defines which set of
81
+ # customers have access and can view this experience. If empty, this experience is
82
+ # only visible to authorized users of the company
85
83
  products:
86
84
  )
87
85
  end
@@ -267,7 +265,7 @@ module WhopSDK
267
265
  sig { returns(String) }
268
266
  attr_accessor :title
269
267
 
270
- # An object representing a (sanitized) access pass.
268
+ # Represents a product on whop. Use products to sell anything on the platform.
271
269
  sig do
272
270
  params(id: String, route: String, title: String).returns(
273
271
  T.attached_class
@@ -20,15 +20,17 @@ module WhopSDK
20
20
  attr_accessor :access_level
21
21
 
22
22
  # The logo for the experience
23
- sig { returns(T.nilable(WhopSDK::ExperienceUpdateParams::Logo)) }
24
- attr_reader :logo
25
-
26
23
  sig do
27
- params(
28
- logo: T.nilable(WhopSDK::ExperienceUpdateParams::Logo::OrHash)
29
- ).void
24
+ returns(
25
+ T.nilable(
26
+ T.any(
27
+ WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithDirectUploadID,
28
+ WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithID
29
+ )
30
+ )
31
+ )
30
32
  end
31
- attr_writer :logo
33
+ attr_accessor :logo
32
34
 
33
35
  # The name of the experience.
34
36
  sig { returns(T.nilable(String)) }
@@ -46,7 +48,13 @@ module WhopSDK
46
48
  params(
47
49
  access_level:
48
50
  T.nilable(WhopSDK::ExperienceUpdateParams::AccessLevel::OrSymbol),
49
- logo: T.nilable(WhopSDK::ExperienceUpdateParams::Logo::OrHash),
51
+ logo:
52
+ T.nilable(
53
+ T.any(
54
+ WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithDirectUploadID::OrHash,
55
+ WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithID::OrHash
56
+ )
57
+ ),
50
58
  name: T.nilable(String),
51
59
  order: T.nilable(String),
52
60
  section_id: T.nilable(String),
@@ -73,7 +81,13 @@ module WhopSDK
73
81
  {
74
82
  access_level:
75
83
  T.nilable(WhopSDK::ExperienceUpdateParams::AccessLevel::OrSymbol),
76
- logo: T.nilable(WhopSDK::ExperienceUpdateParams::Logo),
84
+ logo:
85
+ T.nilable(
86
+ T.any(
87
+ WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithDirectUploadID,
88
+ WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithID
89
+ )
90
+ ),
77
91
  name: T.nilable(String),
78
92
  order: T.nilable(String),
79
93
  section_id: T.nilable(String),
@@ -114,52 +128,84 @@ module WhopSDK
114
128
  end
115
129
  end
116
130
 
117
- class Logo < WhopSDK::Internal::Type::BaseModel
118
- OrHash =
131
+ # The logo for the experience
132
+ module Logo
133
+ extend WhopSDK::Internal::Type::Union
134
+
135
+ Variants =
119
136
  T.type_alias do
120
137
  T.any(
121
- WhopSDK::ExperienceUpdateParams::Logo,
122
- WhopSDK::Internal::AnyHash
138
+ WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithDirectUploadID,
139
+ WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithID
123
140
  )
124
141
  end
125
142
 
126
- # The ID of an existing attachment object. Use this when updating a resource and
127
- # keeping a subset of the attachments. Don't use this unless you know what you're
128
- # doing.
129
- sig { returns(T.nilable(String)) }
130
- attr_accessor :id
143
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
144
+ OrHash =
145
+ T.type_alias do
146
+ T.any(
147
+ WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithDirectUploadID,
148
+ WhopSDK::Internal::AnyHash
149
+ )
150
+ end
131
151
 
132
- # This ID should be used the first time you upload an attachment. It is the ID of
133
- # the direct upload that was created when uploading the file to S3 via the
134
- # mediaDirectUpload mutation.
135
- sig { returns(T.nilable(String)) }
136
- attr_accessor :direct_upload_id
152
+ # This ID should be used the first time you upload an attachment. It is the ID of
153
+ # the direct upload that was created when uploading the file to S3 via the
154
+ # mediaDirectUpload mutation.
155
+ sig { returns(String) }
156
+ attr_accessor :direct_upload_id
157
+
158
+ # Input for an attachment
159
+ sig { params(direct_upload_id: String).returns(T.attached_class) }
160
+ def self.new(
161
+ # This ID should be used the first time you upload an attachment. It is the ID of
162
+ # the direct upload that was created when uploading the file to S3 via the
163
+ # mediaDirectUpload mutation.
164
+ direct_upload_id:
165
+ )
166
+ end
137
167
 
138
- # The logo for the experience
139
- sig do
140
- params(
141
- id: T.nilable(String),
142
- direct_upload_id: T.nilable(String)
143
- ).returns(T.attached_class)
168
+ sig { override.returns({ direct_upload_id: String }) }
169
+ def to_hash
170
+ end
144
171
  end
145
- def self.new(
172
+
173
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
174
+ OrHash =
175
+ T.type_alias do
176
+ T.any(
177
+ WhopSDK::ExperienceUpdateParams::Logo::AttachmentInputWithID,
178
+ WhopSDK::Internal::AnyHash
179
+ )
180
+ end
181
+
146
182
  # The ID of an existing attachment object. Use this when updating a resource and
147
183
  # keeping a subset of the attachments. Don't use this unless you know what you're
148
184
  # doing.
149
- id: nil,
150
- # This ID should be used the first time you upload an attachment. It is the ID of
151
- # the direct upload that was created when uploading the file to S3 via the
152
- # mediaDirectUpload mutation.
153
- direct_upload_id: nil
154
- )
185
+ sig { returns(String) }
186
+ attr_accessor :id
187
+
188
+ # Input for an attachment
189
+ sig { params(id: String).returns(T.attached_class) }
190
+ def self.new(
191
+ # The ID of an existing attachment object. Use this when updating a resource and
192
+ # keeping a subset of the attachments. Don't use this unless you know what you're
193
+ # doing.
194
+ id:
195
+ )
196
+ end
197
+
198
+ sig { override.returns({ id: String }) }
199
+ def to_hash
200
+ end
155
201
  end
156
202
 
157
203
  sig do
158
204
  override.returns(
159
- { id: T.nilable(String), direct_upload_id: T.nilable(String) }
205
+ T::Array[WhopSDK::ExperienceUpdateParams::Logo::Variants]
160
206
  )
161
207
  end
162
- def to_hash
208
+ def self.variants
163
209
  end
164
210
  end
165
211
  end
@@ -6,7 +6,7 @@ module WhopSDK
6
6
  OrHash =
7
7
  T.type_alias { T.any(WhopSDK::ForumPost, WhopSDK::Internal::AnyHash) }
8
8
 
9
- # The unique identifier for the entity
9
+ # The unique identifier of the resource.
10
10
  sig { returns(String) }
11
11
  attr_accessor :id
12
12
 
@@ -80,7 +80,7 @@ module WhopSDK
80
80
  ).returns(T.attached_class)
81
81
  end
82
82
  def self.new(
83
- # The unique identifier for the entity
83
+ # The unique identifier of the resource.
84
84
  id:,
85
85
  # The amount of comments on this post
86
86
  comment_count:,