whop_sdk 0.0.4 → 0.0.6

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 (233) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +40 -0
  3. data/README.md +4 -7
  4. data/lib/whop_sdk/client.rb +21 -6
  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/checkout_configuration_create_params.rb +4 -4
  12. data/lib/whop_sdk/models/company.rb +1 -0
  13. data/lib/whop_sdk/models/course.rb +18 -1
  14. data/lib/whop_sdk/models/course_create_params.rb +20 -1
  15. data/lib/whop_sdk/models/course_lesson_create_params.rb +77 -1
  16. data/lib/whop_sdk/models/course_lesson_list_response.rb +43 -1
  17. data/lib/whop_sdk/models/course_lesson_update_params.rb +77 -1
  18. data/lib/whop_sdk/models/course_list_response.rb +18 -1
  19. data/lib/whop_sdk/models/course_update_params.rb +19 -1
  20. data/lib/whop_sdk/models/course_visibilities.rb +17 -0
  21. data/lib/whop_sdk/models/dispute.rb +672 -0
  22. data/lib/whop_sdk/models/dispute_created_webhook_event.rb +48 -0
  23. data/lib/whop_sdk/models/dispute_list_params.rb +62 -0
  24. data/lib/whop_sdk/models/dispute_list_response.rb +187 -0
  25. data/lib/whop_sdk/models/dispute_retrieve_params.rb +14 -0
  26. data/lib/whop_sdk/models/dispute_statuses.rb +23 -0
  27. data/lib/whop_sdk/models/dispute_submit_evidence_params.rb +14 -0
  28. data/lib/whop_sdk/models/dispute_update_evidence_params.rb +342 -0
  29. data/lib/whop_sdk/models/dispute_updated_webhook_event.rb +48 -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/forum_post.rb +2 -2
  35. data/lib/whop_sdk/models/forum_post_list_response.rb +2 -2
  36. data/lib/whop_sdk/models/global_affiliate_status.rb +1 -1
  37. data/lib/whop_sdk/models/invoice_create_params.rb +2 -2
  38. data/lib/whop_sdk/models/invoice_list_params.rb +27 -40
  39. data/lib/whop_sdk/models/lesson.rb +43 -1
  40. data/lib/whop_sdk/models/member_list_params.rb +11 -11
  41. data/lib/whop_sdk/models/member_list_response.rb +3 -3
  42. data/lib/whop_sdk/models/member_retrieve_response.rb +3 -3
  43. data/lib/whop_sdk/models/membership_list_params.rb +9 -9
  44. data/lib/whop_sdk/models/message.rb +2 -2
  45. data/lib/whop_sdk/models/message_list_response.rb +2 -2
  46. data/lib/whop_sdk/models/notification_create_params.rb +88 -0
  47. data/lib/whop_sdk/models/notification_create_response.rb +19 -0
  48. data/lib/whop_sdk/models/payment.rb +3 -3
  49. data/lib/whop_sdk/models/payment_list_response.rb +3 -3
  50. data/lib/whop_sdk/models/plan.rb +6 -4
  51. data/lib/whop_sdk/models/plan_create_params.rb +2 -2
  52. data/lib/whop_sdk/models/plan_list_response.rb +6 -4
  53. data/lib/whop_sdk/models/plan_type.rb +1 -1
  54. data/lib/whop_sdk/models/product.rb +1 -1
  55. data/lib/whop_sdk/models/product_create_params.rb +6 -6
  56. data/lib/whop_sdk/models/product_list_item.rb +1 -1
  57. data/lib/whop_sdk/models/product_update_params.rb +4 -4
  58. data/lib/whop_sdk/models/promo_code.rb +3 -3
  59. data/lib/whop_sdk/models/promo_code_list_response.rb +3 -3
  60. data/lib/whop_sdk/models/unwrap_webhook_event.rb +5 -1
  61. data/lib/whop_sdk/models.rb +24 -0
  62. data/lib/whop_sdk/resources/access_tokens.rb +46 -0
  63. data/lib/whop_sdk/resources/app_builds.rb +4 -2
  64. data/lib/whop_sdk/resources/apps.rb +3 -2
  65. data/lib/whop_sdk/resources/authorized_users.rb +2 -1
  66. data/lib/whop_sdk/resources/chat_channels.rb +9 -2
  67. data/lib/whop_sdk/resources/checkout_configurations.rb +2 -1
  68. data/lib/whop_sdk/resources/companies.rb +2 -1
  69. data/lib/whop_sdk/resources/course_chapters.rb +5 -3
  70. data/lib/whop_sdk/resources/course_lesson_interactions.rb +2 -1
  71. data/lib/whop_sdk/resources/course_lessons.rb +19 -5
  72. data/lib/whop_sdk/resources/course_students.rb +2 -1
  73. data/lib/whop_sdk/resources/courses.rb +15 -5
  74. data/lib/whop_sdk/resources/disputes.rb +182 -0
  75. data/lib/whop_sdk/resources/entries.rb +6 -3
  76. data/lib/whop_sdk/resources/experiences.rb +8 -6
  77. data/lib/whop_sdk/resources/forum_posts.rb +3 -2
  78. data/lib/whop_sdk/resources/forums.rb +3 -2
  79. data/lib/whop_sdk/resources/invoices.rb +11 -5
  80. data/lib/whop_sdk/resources/ledger_accounts.rb +6 -2
  81. data/lib/whop_sdk/resources/members.rb +6 -5
  82. data/lib/whop_sdk/resources/memberships.rb +10 -8
  83. data/lib/whop_sdk/resources/messages.rb +3 -2
  84. data/lib/whop_sdk/resources/notifications.rb +53 -0
  85. data/lib/whop_sdk/resources/payments.rb +7 -4
  86. data/lib/whop_sdk/resources/plans.rb +6 -4
  87. data/lib/whop_sdk/resources/products.rb +9 -7
  88. data/lib/whop_sdk/resources/promo_codes.rb +4 -2
  89. data/lib/whop_sdk/resources/reactions.rb +2 -1
  90. data/lib/whop_sdk/resources/reviews.rb +2 -1
  91. data/lib/whop_sdk/resources/shipments.rb +2 -1
  92. data/lib/whop_sdk/resources/support_channels.rb +2 -1
  93. data/lib/whop_sdk/resources/transfers.rb +2 -1
  94. data/lib/whop_sdk/resources/users.rb +9 -3
  95. data/lib/whop_sdk/resources/webhooks.rb +1 -1
  96. data/lib/whop_sdk/version.rb +1 -1
  97. data/lib/whop_sdk.rb +19 -0
  98. data/manifest.yaml +1 -0
  99. data/rbi/whop_sdk/client.rbi +14 -2
  100. data/rbi/whop_sdk/internal/transport/base_client.rbi +5 -0
  101. data/rbi/whop_sdk/internal/transport/pooled_net_requester.rbi +6 -2
  102. data/rbi/whop_sdk/internal/type/base_model.rbi +8 -4
  103. data/rbi/whop_sdk/models/access_level.rbi +1 -1
  104. data/rbi/whop_sdk/models/access_pass_type.rbi +2 -1
  105. data/rbi/whop_sdk/models/access_token_create_params.rbi +126 -0
  106. data/rbi/whop_sdk/models/access_token_create_response.rbi +37 -0
  107. data/rbi/whop_sdk/models/checkout_configuration_create_params.rbi +4 -4
  108. data/rbi/whop_sdk/models/company.rbi +2 -0
  109. data/rbi/whop_sdk/models/course.rbi +21 -3
  110. data/rbi/whop_sdk/models/course_create_params.rbi +22 -0
  111. data/rbi/whop_sdk/models/course_lesson_create_params.rbi +126 -0
  112. data/rbi/whop_sdk/models/course_lesson_list_response.rbi +68 -0
  113. data/rbi/whop_sdk/models/course_lesson_update_params.rbi +126 -0
  114. data/rbi/whop_sdk/models/course_list_response.rbi +21 -3
  115. data/rbi/whop_sdk/models/course_update_params.rbi +20 -0
  116. data/rbi/whop_sdk/models/course_visibilities.rbi +23 -0
  117. data/rbi/whop_sdk/models/dispute.rbi +938 -0
  118. data/rbi/whop_sdk/models/dispute_created_webhook_event.rbi +72 -0
  119. data/rbi/whop_sdk/models/dispute_list_params.rbi +83 -0
  120. data/rbi/whop_sdk/models/dispute_list_response.rbi +287 -0
  121. data/rbi/whop_sdk/models/dispute_retrieve_params.rbi +27 -0
  122. data/rbi/whop_sdk/models/dispute_statuses.rbi +32 -0
  123. data/rbi/whop_sdk/models/dispute_submit_evidence_params.rbi +30 -0
  124. data/rbi/whop_sdk/models/dispute_update_evidence_params.rbi +566 -0
  125. data/rbi/whop_sdk/models/dispute_updated_webhook_event.rbi +72 -0
  126. data/rbi/whop_sdk/models/embed_type.rbi +20 -0
  127. data/rbi/whop_sdk/models/entry.rbi +3 -3
  128. data/rbi/whop_sdk/models/entry_list_response.rbi +3 -3
  129. data/rbi/whop_sdk/models/experience.rbi +7 -9
  130. data/rbi/whop_sdk/models/forum_post.rbi +2 -2
  131. data/rbi/whop_sdk/models/forum_post_list_response.rbi +2 -2
  132. data/rbi/whop_sdk/models/global_affiliate_status.rbi +1 -1
  133. data/rbi/whop_sdk/models/invoice_create_params.rbi +2 -2
  134. data/rbi/whop_sdk/models/invoice_list_params.rbi +26 -71
  135. data/rbi/whop_sdk/models/lesson.rbi +54 -0
  136. data/rbi/whop_sdk/models/member_list_params.rbi +10 -10
  137. data/rbi/whop_sdk/models/member_list_response.rbi +6 -6
  138. data/rbi/whop_sdk/models/member_retrieve_response.rbi +6 -6
  139. data/rbi/whop_sdk/models/membership_list_params.rbi +8 -8
  140. data/rbi/whop_sdk/models/message.rbi +2 -2
  141. data/rbi/whop_sdk/models/message_list_response.rbi +2 -2
  142. data/rbi/whop_sdk/models/notification_create_params.rbi +113 -0
  143. data/rbi/whop_sdk/models/notification_create_response.rbi +31 -0
  144. data/rbi/whop_sdk/models/payment.rbi +3 -3
  145. data/rbi/whop_sdk/models/payment_list_response.rbi +3 -3
  146. data/rbi/whop_sdk/models/plan.rbi +6 -4
  147. data/rbi/whop_sdk/models/plan_create_params.rbi +2 -2
  148. data/rbi/whop_sdk/models/plan_list_response.rbi +6 -4
  149. data/rbi/whop_sdk/models/plan_type.rbi +1 -1
  150. data/rbi/whop_sdk/models/product.rbi +1 -1
  151. data/rbi/whop_sdk/models/product_create_params.rbi +6 -6
  152. data/rbi/whop_sdk/models/product_list_item.rbi +1 -1
  153. data/rbi/whop_sdk/models/product_update_params.rbi +4 -4
  154. data/rbi/whop_sdk/models/promo_code.rbi +3 -3
  155. data/rbi/whop_sdk/models/promo_code_list_response.rbi +3 -3
  156. data/rbi/whop_sdk/models/unwrap_webhook_event.rbi +3 -1
  157. data/rbi/whop_sdk/models.rbi +24 -0
  158. data/rbi/whop_sdk/resources/access_tokens.rbi +41 -0
  159. data/rbi/whop_sdk/resources/app_builds.rbi +10 -2
  160. data/rbi/whop_sdk/resources/apps.rbi +6 -1
  161. data/rbi/whop_sdk/resources/authorized_users.rbi +5 -1
  162. data/rbi/whop_sdk/resources/chat_channels.rbi +8 -1
  163. data/rbi/whop_sdk/resources/checkout_configurations.rbi +5 -1
  164. data/rbi/whop_sdk/resources/companies.rbi +5 -1
  165. data/rbi/whop_sdk/resources/course_chapters.rbi +11 -2
  166. data/rbi/whop_sdk/resources/course_lesson_interactions.rbi +5 -1
  167. data/rbi/whop_sdk/resources/course_lessons.rbi +41 -2
  168. data/rbi/whop_sdk/resources/course_students.rbi +5 -1
  169. data/rbi/whop_sdk/resources/courses.rbi +28 -2
  170. data/rbi/whop_sdk/resources/disputes.rbi +194 -0
  171. data/rbi/whop_sdk/resources/entries.rbi +15 -3
  172. data/rbi/whop_sdk/resources/experiences.rbi +14 -2
  173. data/rbi/whop_sdk/resources/forum_posts.rbi +6 -1
  174. data/rbi/whop_sdk/resources/forums.rbi +6 -1
  175. data/rbi/whop_sdk/resources/invoices.rbi +20 -5
  176. data/rbi/whop_sdk/resources/ledger_accounts.rbi +7 -2
  177. data/rbi/whop_sdk/resources/members.rbi +9 -5
  178. data/rbi/whop_sdk/resources/memberships.rbi +16 -5
  179. data/rbi/whop_sdk/resources/messages.rbi +6 -1
  180. data/rbi/whop_sdk/resources/notifications.rbi +54 -0
  181. data/rbi/whop_sdk/resources/payments.rbi +16 -3
  182. data/rbi/whop_sdk/resources/plans.rbi +12 -3
  183. data/rbi/whop_sdk/resources/products.rbi +15 -6
  184. data/rbi/whop_sdk/resources/promo_codes.rbi +10 -2
  185. data/rbi/whop_sdk/resources/reactions.rbi +5 -1
  186. data/rbi/whop_sdk/resources/reviews.rbi +5 -1
  187. data/rbi/whop_sdk/resources/shipments.rbi +5 -1
  188. data/rbi/whop_sdk/resources/support_channels.rbi +5 -1
  189. data/rbi/whop_sdk/resources/transfers.rbi +5 -1
  190. data/rbi/whop_sdk/resources/users.rbi +13 -2
  191. data/rbi/whop_sdk/resources/webhooks.rbi +3 -1
  192. data/sig/whop_sdk/client.rbs +7 -1
  193. data/sig/whop_sdk/internal/transport/base_client.rbs +2 -0
  194. data/sig/whop_sdk/internal/transport/pooled_net_requester.rbs +4 -1
  195. data/sig/whop_sdk/models/access_token_create_params.rbs +56 -0
  196. data/sig/whop_sdk/models/access_token_create_response.rbs +15 -0
  197. data/sig/whop_sdk/models/company.rbs +2 -0
  198. data/sig/whop_sdk/models/course.rbs +13 -3
  199. data/sig/whop_sdk/models/course_create_params.rbs +11 -1
  200. data/sig/whop_sdk/models/course_lesson_create_params.rbs +46 -0
  201. data/sig/whop_sdk/models/course_lesson_list_response.rbs +25 -0
  202. data/sig/whop_sdk/models/course_lesson_update_params.rbs +46 -0
  203. data/sig/whop_sdk/models/course_list_response.rbs +13 -3
  204. data/sig/whop_sdk/models/course_update_params.rbs +11 -1
  205. data/sig/whop_sdk/models/course_visibilities.rbs +14 -0
  206. data/sig/whop_sdk/models/dispute.rbs +437 -0
  207. data/sig/whop_sdk/models/dispute_created_webhook_event.rbs +40 -0
  208. data/sig/whop_sdk/models/dispute_list_params.rbs +51 -0
  209. data/sig/whop_sdk/models/dispute_list_response.rbs +124 -0
  210. data/sig/whop_sdk/models/dispute_retrieve_params.rbs +15 -0
  211. data/sig/whop_sdk/models/dispute_statuses.rbs +30 -0
  212. data/sig/whop_sdk/models/dispute_submit_evidence_params.rbs +15 -0
  213. data/sig/whop_sdk/models/dispute_update_evidence_params.rbs +215 -0
  214. data/sig/whop_sdk/models/dispute_updated_webhook_event.rbs +40 -0
  215. data/sig/whop_sdk/models/embed_type.rbs +14 -0
  216. data/sig/whop_sdk/models/invoice_list_params.rbs +16 -33
  217. data/sig/whop_sdk/models/lesson.rbs +25 -0
  218. data/sig/whop_sdk/models/member_list_params.rbs +5 -5
  219. data/sig/whop_sdk/models/membership_list_params.rbs +5 -5
  220. data/sig/whop_sdk/models/notification_create_params.rbs +61 -0
  221. data/sig/whop_sdk/models/notification_create_response.rbs +13 -0
  222. data/sig/whop_sdk/models/unwrap_webhook_event.rbs +2 -0
  223. data/sig/whop_sdk/models.rbs +24 -0
  224. data/sig/whop_sdk/resources/access_tokens.rbs +15 -0
  225. data/sig/whop_sdk/resources/course_lessons.rbs +6 -0
  226. data/sig/whop_sdk/resources/courses.rbs +4 -0
  227. data/sig/whop_sdk/resources/disputes.rbs +46 -0
  228. data/sig/whop_sdk/resources/invoices.rbs +3 -1
  229. data/sig/whop_sdk/resources/members.rbs +1 -1
  230. data/sig/whop_sdk/resources/memberships.rbs +1 -1
  231. data/sig/whop_sdk/resources/notifications.rbs +19 -0
  232. data/sig/whop_sdk/resources/webhooks.rbs +3 -1
  233. metadata +56 -2
@@ -27,6 +27,27 @@ module WhopSDK
27
27
  sig { returns(T.nilable(Integer)) }
28
28
  attr_accessor :days_from_course_start_until_unlock
29
29
 
30
+ # ID for the embed (YouTube video ID or Loom share ID)
31
+ sig { returns(T.nilable(String)) }
32
+ attr_accessor :embed_id
33
+
34
+ # The type of embed for a lesson
35
+ sig { returns(T.nilable(WhopSDK::EmbedType::OrSymbol)) }
36
+ attr_accessor :embed_type
37
+
38
+ # The thumbnail for the lesson in png, jpeg, or gif format
39
+ sig do
40
+ returns(
41
+ T.nilable(
42
+ T.any(
43
+ WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID,
44
+ WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID
45
+ )
46
+ )
47
+ )
48
+ end
49
+ attr_accessor :thumbnail
50
+
30
51
  # The title of the lesson
31
52
  sig { returns(T.nilable(String)) }
32
53
  attr_accessor :title
@@ -37,6 +58,15 @@ module WhopSDK
37
58
  lesson_type: WhopSDK::LessonTypes::OrSymbol,
38
59
  content: T.nilable(String),
39
60
  days_from_course_start_until_unlock: T.nilable(Integer),
61
+ embed_id: T.nilable(String),
62
+ embed_type: T.nilable(WhopSDK::EmbedType::OrSymbol),
63
+ thumbnail:
64
+ T.nilable(
65
+ T.any(
66
+ WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID::OrHash,
67
+ WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID::OrHash
68
+ )
69
+ ),
40
70
  title: T.nilable(String),
41
71
  request_options: WhopSDK::RequestOptions::OrHash
42
72
  ).returns(T.attached_class)
@@ -50,6 +80,12 @@ module WhopSDK
50
80
  content: nil,
51
81
  # Days from course start until unlock
52
82
  days_from_course_start_until_unlock: nil,
83
+ # ID for the embed (YouTube video ID or Loom share ID)
84
+ embed_id: nil,
85
+ # The type of embed for a lesson
86
+ embed_type: nil,
87
+ # The thumbnail for the lesson in png, jpeg, or gif format
88
+ thumbnail: nil,
53
89
  # The title of the lesson
54
90
  title: nil,
55
91
  request_options: {}
@@ -63,6 +99,15 @@ module WhopSDK
63
99
  lesson_type: WhopSDK::LessonTypes::OrSymbol,
64
100
  content: T.nilable(String),
65
101
  days_from_course_start_until_unlock: T.nilable(Integer),
102
+ embed_id: T.nilable(String),
103
+ embed_type: T.nilable(WhopSDK::EmbedType::OrSymbol),
104
+ thumbnail:
105
+ T.nilable(
106
+ T.any(
107
+ WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID,
108
+ WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID
109
+ )
110
+ ),
66
111
  title: T.nilable(String),
67
112
  request_options: WhopSDK::RequestOptions
68
113
  }
@@ -70,6 +115,87 @@ module WhopSDK
70
115
  end
71
116
  def to_hash
72
117
  end
118
+
119
+ # The thumbnail for the lesson in png, jpeg, or gif format
120
+ module Thumbnail
121
+ extend WhopSDK::Internal::Type::Union
122
+
123
+ Variants =
124
+ T.type_alias do
125
+ T.any(
126
+ WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID,
127
+ WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID
128
+ )
129
+ end
130
+
131
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
132
+ OrHash =
133
+ T.type_alias do
134
+ T.any(
135
+ WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithDirectUploadID,
136
+ WhopSDK::Internal::AnyHash
137
+ )
138
+ end
139
+
140
+ # This ID should be used the first time you upload an attachment. It is the ID of
141
+ # the direct upload that was created when uploading the file to S3 via the
142
+ # mediaDirectUpload mutation.
143
+ sig { returns(String) }
144
+ attr_accessor :direct_upload_id
145
+
146
+ # Input for an attachment
147
+ sig { params(direct_upload_id: String).returns(T.attached_class) }
148
+ def self.new(
149
+ # This ID should be used the first time you upload an attachment. It is the ID of
150
+ # the direct upload that was created when uploading the file to S3 via the
151
+ # mediaDirectUpload mutation.
152
+ direct_upload_id:
153
+ )
154
+ end
155
+
156
+ sig { override.returns({ direct_upload_id: String }) }
157
+ def to_hash
158
+ end
159
+ end
160
+
161
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
162
+ OrHash =
163
+ T.type_alias do
164
+ T.any(
165
+ WhopSDK::CourseLessonCreateParams::Thumbnail::AttachmentInputWithID,
166
+ WhopSDK::Internal::AnyHash
167
+ )
168
+ end
169
+
170
+ # The ID of an existing attachment object. Use this when updating a resource and
171
+ # keeping a subset of the attachments. Don't use this unless you know what you're
172
+ # doing.
173
+ sig { returns(String) }
174
+ attr_accessor :id
175
+
176
+ # Input for an attachment
177
+ sig { params(id: String).returns(T.attached_class) }
178
+ def self.new(
179
+ # The ID of an existing attachment object. Use this when updating a resource and
180
+ # keeping a subset of the attachments. Don't use this unless you know what you're
181
+ # doing.
182
+ id:
183
+ )
184
+ end
185
+
186
+ sig { override.returns({ id: String }) }
187
+ def to_hash
188
+ end
189
+ end
190
+
191
+ sig do
192
+ override.returns(
193
+ T::Array[WhopSDK::CourseLessonCreateParams::Thumbnail::Variants]
194
+ )
195
+ end
196
+ def self.variants
197
+ end
198
+ end
73
199
  end
74
200
  end
75
201
  end
@@ -23,6 +23,14 @@ module WhopSDK
23
23
  sig { returns(T.nilable(Integer)) }
24
24
  attr_accessor :days_from_course_start_until_unlock
25
25
 
26
+ # ID for the embed (YouTube video ID or Loom share ID)
27
+ sig { returns(T.nilable(String)) }
28
+ attr_accessor :embed_id
29
+
30
+ # The type of embed for a lesson
31
+ sig { returns(T.nilable(WhopSDK::EmbedType::TaggedSymbol)) }
32
+ attr_accessor :embed_type
33
+
26
34
  # The type of the lesson (text, video, pdf, multi, quiz, knowledge_check)
27
35
  sig { returns(WhopSDK::LessonTypes::TaggedSymbol) }
28
36
  attr_accessor :lesson_type
@@ -31,6 +39,22 @@ module WhopSDK
31
39
  sig { returns(Integer) }
32
40
  attr_accessor :order
33
41
 
42
+ # The thumbnail for the lesson
43
+ sig do
44
+ returns(T.nilable(WhopSDK::Models::CourseLessonListResponse::Thumbnail))
45
+ end
46
+ attr_reader :thumbnail
47
+
48
+ sig do
49
+ params(
50
+ thumbnail:
51
+ T.nilable(
52
+ WhopSDK::Models::CourseLessonListResponse::Thumbnail::OrHash
53
+ )
54
+ ).void
55
+ end
56
+ attr_writer :thumbnail
57
+
34
58
  # The title of the lesson
35
59
  sig { returns(String) }
36
60
  attr_accessor :title
@@ -46,8 +70,14 @@ module WhopSDK
46
70
  id: String,
47
71
  content: T.nilable(String),
48
72
  days_from_course_start_until_unlock: T.nilable(Integer),
73
+ embed_id: T.nilable(String),
74
+ embed_type: T.nilable(WhopSDK::EmbedType::OrSymbol),
49
75
  lesson_type: WhopSDK::LessonTypes::OrSymbol,
50
76
  order: Integer,
77
+ thumbnail:
78
+ T.nilable(
79
+ WhopSDK::Models::CourseLessonListResponse::Thumbnail::OrHash
80
+ ),
51
81
  title: String,
52
82
  visibility: WhopSDK::LessonVisibilities::OrSymbol
53
83
  ).returns(T.attached_class)
@@ -59,10 +89,16 @@ module WhopSDK
59
89
  content:,
60
90
  # Number of days from course start until the lesson is unlocked
61
91
  days_from_course_start_until_unlock:,
92
+ # ID for the embed (YouTube video ID or Loom share ID)
93
+ embed_id:,
94
+ # The type of embed for a lesson
95
+ embed_type:,
62
96
  # The type of the lesson (text, video, pdf, multi, quiz, knowledge_check)
63
97
  lesson_type:,
64
98
  # The order of the lesson within its chapter
65
99
  order:,
100
+ # The thumbnail for the lesson
101
+ thumbnail:,
66
102
  # The title of the lesson
67
103
  title:,
68
104
  # The visibility of the lesson. Determines how / whether this lesson is visible to
@@ -77,8 +113,12 @@ module WhopSDK
77
113
  id: String,
78
114
  content: T.nilable(String),
79
115
  days_from_course_start_until_unlock: T.nilable(Integer),
116
+ embed_id: T.nilable(String),
117
+ embed_type: T.nilable(WhopSDK::EmbedType::TaggedSymbol),
80
118
  lesson_type: WhopSDK::LessonTypes::TaggedSymbol,
81
119
  order: Integer,
120
+ thumbnail:
121
+ T.nilable(WhopSDK::Models::CourseLessonListResponse::Thumbnail),
82
122
  title: String,
83
123
  visibility: WhopSDK::LessonVisibilities::TaggedSymbol
84
124
  }
@@ -86,6 +126,34 @@ module WhopSDK
86
126
  end
87
127
  def to_hash
88
128
  end
129
+
130
+ class Thumbnail < WhopSDK::Internal::Type::BaseModel
131
+ OrHash =
132
+ T.type_alias do
133
+ T.any(
134
+ WhopSDK::Models::CourseLessonListResponse::Thumbnail,
135
+ WhopSDK::Internal::AnyHash
136
+ )
137
+ end
138
+
139
+ # This is the URL you use to render optimized attachments on the client. This
140
+ # should be used for apps.
141
+ sig { returns(T.nilable(String)) }
142
+ attr_accessor :url
143
+
144
+ # The thumbnail for the lesson
145
+ sig { params(url: T.nilable(String)).returns(T.attached_class) }
146
+ def self.new(
147
+ # This is the URL you use to render optimized attachments on the client. This
148
+ # should be used for apps.
149
+ url:
150
+ )
151
+ end
152
+
153
+ sig { override.returns({ url: T.nilable(String) }) }
154
+ def to_hash
155
+ end
156
+ end
89
157
  end
90
158
  end
91
159
  end
@@ -66,6 +66,14 @@ module WhopSDK
66
66
  sig { returns(T.nilable(Integer)) }
67
67
  attr_accessor :days_from_course_start_until_unlock
68
68
 
69
+ # ID for the embed (YouTube video ID or Loom share ID)
70
+ sig { returns(T.nilable(String)) }
71
+ attr_accessor :embed_id
72
+
73
+ # The type of embed for a lesson
74
+ sig { returns(T.nilable(WhopSDK::EmbedType::OrSymbol)) }
75
+ attr_accessor :embed_type
76
+
69
77
  # The available types for a lesson
70
78
  sig { returns(T.nilable(WhopSDK::LessonTypes::OrSymbol)) }
71
79
  attr_accessor :lesson_type
@@ -91,6 +99,19 @@ module WhopSDK
91
99
  sig { returns(T.nilable(String)) }
92
100
  attr_accessor :mux_asset_id
93
101
 
102
+ # The thumbnail for the lesson in png, jpeg, or gif format
103
+ sig do
104
+ returns(
105
+ T.nilable(
106
+ T.any(
107
+ WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID,
108
+ WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID
109
+ )
110
+ )
111
+ )
112
+ end
113
+ attr_accessor :thumbnail
114
+
94
115
  # The title of the lesson
95
116
  sig { returns(T.nilable(String)) }
96
117
  attr_accessor :title
@@ -123,6 +144,8 @@ module WhopSDK
123
144
  ),
124
145
  content: T.nilable(String),
125
146
  days_from_course_start_until_unlock: T.nilable(Integer),
147
+ embed_id: T.nilable(String),
148
+ embed_type: T.nilable(WhopSDK::EmbedType::OrSymbol),
126
149
  lesson_type: T.nilable(WhopSDK::LessonTypes::OrSymbol),
127
150
  main_pdf:
128
151
  T.nilable(
@@ -133,6 +156,13 @@ module WhopSDK
133
156
  ),
134
157
  max_attempts: T.nilable(Integer),
135
158
  mux_asset_id: T.nilable(String),
159
+ thumbnail:
160
+ T.nilable(
161
+ T.any(
162
+ WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID::OrHash,
163
+ WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID::OrHash
164
+ )
165
+ ),
136
166
  title: T.nilable(String),
137
167
  visibility: T.nilable(WhopSDK::LessonVisibilities::OrSymbol),
138
168
  request_options: WhopSDK::RequestOptions::OrHash
@@ -151,6 +181,10 @@ module WhopSDK
151
181
  content: nil,
152
182
  # Days from course start until unlock
153
183
  days_from_course_start_until_unlock: nil,
184
+ # ID for the embed (YouTube video ID or Loom share ID)
185
+ embed_id: nil,
186
+ # The type of embed for a lesson
187
+ embed_type: nil,
154
188
  # The available types for a lesson
155
189
  lesson_type: nil,
156
190
  # The main PDF file for this lesson
@@ -159,6 +193,8 @@ module WhopSDK
159
193
  max_attempts: nil,
160
194
  # The ID of the Mux asset to attach to this lesson for video lessons
161
195
  mux_asset_id: nil,
196
+ # The thumbnail for the lesson in png, jpeg, or gif format
197
+ thumbnail: nil,
162
198
  # The title of the lesson
163
199
  title: nil,
164
200
  # The available visibilities for a lesson. Determines how / whether a lesson is
@@ -190,6 +226,8 @@ module WhopSDK
190
226
  ),
191
227
  content: T.nilable(String),
192
228
  days_from_course_start_until_unlock: T.nilable(Integer),
229
+ embed_id: T.nilable(String),
230
+ embed_type: T.nilable(WhopSDK::EmbedType::OrSymbol),
193
231
  lesson_type: T.nilable(WhopSDK::LessonTypes::OrSymbol),
194
232
  main_pdf:
195
233
  T.nilable(
@@ -200,6 +238,13 @@ module WhopSDK
200
238
  ),
201
239
  max_attempts: T.nilable(Integer),
202
240
  mux_asset_id: T.nilable(String),
241
+ thumbnail:
242
+ T.nilable(
243
+ T.any(
244
+ WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID,
245
+ WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID
246
+ )
247
+ ),
203
248
  title: T.nilable(String),
204
249
  visibility: T.nilable(WhopSDK::LessonVisibilities::OrSymbol),
205
250
  request_options: WhopSDK::RequestOptions
@@ -672,6 +717,87 @@ module WhopSDK
672
717
  def self.variants
673
718
  end
674
719
  end
720
+
721
+ # The thumbnail for the lesson in png, jpeg, or gif format
722
+ module Thumbnail
723
+ extend WhopSDK::Internal::Type::Union
724
+
725
+ Variants =
726
+ T.type_alias do
727
+ T.any(
728
+ WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID,
729
+ WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID
730
+ )
731
+ end
732
+
733
+ class AttachmentInputWithDirectUploadID < WhopSDK::Internal::Type::BaseModel
734
+ OrHash =
735
+ T.type_alias do
736
+ T.any(
737
+ WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithDirectUploadID,
738
+ WhopSDK::Internal::AnyHash
739
+ )
740
+ end
741
+
742
+ # This ID should be used the first time you upload an attachment. It is the ID of
743
+ # the direct upload that was created when uploading the file to S3 via the
744
+ # mediaDirectUpload mutation.
745
+ sig { returns(String) }
746
+ attr_accessor :direct_upload_id
747
+
748
+ # Input for an attachment
749
+ sig { params(direct_upload_id: String).returns(T.attached_class) }
750
+ def self.new(
751
+ # This ID should be used the first time you upload an attachment. It is the ID of
752
+ # the direct upload that was created when uploading the file to S3 via the
753
+ # mediaDirectUpload mutation.
754
+ direct_upload_id:
755
+ )
756
+ end
757
+
758
+ sig { override.returns({ direct_upload_id: String }) }
759
+ def to_hash
760
+ end
761
+ end
762
+
763
+ class AttachmentInputWithID < WhopSDK::Internal::Type::BaseModel
764
+ OrHash =
765
+ T.type_alias do
766
+ T.any(
767
+ WhopSDK::CourseLessonUpdateParams::Thumbnail::AttachmentInputWithID,
768
+ WhopSDK::Internal::AnyHash
769
+ )
770
+ end
771
+
772
+ # The ID of an existing attachment object. Use this when updating a resource and
773
+ # keeping a subset of the attachments. Don't use this unless you know what you're
774
+ # doing.
775
+ sig { returns(String) }
776
+ attr_accessor :id
777
+
778
+ # Input for an attachment
779
+ sig { params(id: String).returns(T.attached_class) }
780
+ def self.new(
781
+ # The ID of an existing attachment object. Use this when updating a resource and
782
+ # keeping a subset of the attachments. Don't use this unless you know what you're
783
+ # doing.
784
+ id:
785
+ )
786
+ end
787
+
788
+ sig { override.returns({ id: String }) }
789
+ def to_hash
790
+ end
791
+ end
792
+
793
+ sig do
794
+ override.returns(
795
+ T::Array[WhopSDK::CourseLessonUpdateParams::Thumbnail::Variants]
796
+ )
797
+ end
798
+ def self.variants
799
+ end
800
+ end
675
801
  end
676
802
  end
677
803
  end
@@ -30,6 +30,10 @@ module WhopSDK
30
30
  sig { returns(WhopSDK::Languages::TaggedSymbol) }
31
31
  attr_accessor :language
32
32
 
33
+ # The order of the course within its experience
34
+ sig { returns(String) }
35
+ attr_accessor :order
36
+
33
37
  # Whether the course requires students to complete the previous lesson before
34
38
  # moving on to the next one
35
39
  sig { returns(T::Boolean) }
@@ -59,6 +63,11 @@ module WhopSDK
59
63
  sig { returns(Time) }
60
64
  attr_accessor :updated_at
61
65
 
66
+ # The visibility of the course. Determines how / whether this course is visible to
67
+ # users.
68
+ sig { returns(WhopSDK::CourseVisibilities::TaggedSymbol) }
69
+ attr_accessor :visibility
70
+
62
71
  # A course from the courses app
63
72
  sig do
64
73
  params(
@@ -67,12 +76,14 @@ module WhopSDK
67
76
  created_at: Time,
68
77
  description: T.nilable(String),
69
78
  language: WhopSDK::Languages::OrSymbol,
79
+ order: String,
70
80
  require_completing_lessons_in_order: T::Boolean,
71
81
  tagline: T.nilable(String),
72
82
  thumbnail:
73
83
  T.nilable(WhopSDK::Models::CourseListResponse::Thumbnail::OrHash),
74
84
  title: T.nilable(String),
75
- updated_at: Time
85
+ updated_at: Time,
86
+ visibility: WhopSDK::CourseVisibilities::OrSymbol
76
87
  ).returns(T.attached_class)
77
88
  end
78
89
  def self.new(
@@ -88,6 +99,8 @@ module WhopSDK
88
99
  # The language spoken in the video content of the course, used to generate closed
89
100
  # captions in the right language
90
101
  language:,
102
+ # The order of the course within its experience
103
+ order:,
91
104
  # Whether the course requires students to complete the previous lesson before
92
105
  # moving on to the next one
93
106
  require_completing_lessons_in_order:,
@@ -98,7 +111,10 @@ module WhopSDK
98
111
  # The title of the course
99
112
  title:,
100
113
  # The timestamp of when the course was last updated
101
- updated_at:
114
+ updated_at:,
115
+ # The visibility of the course. Determines how / whether this course is visible to
116
+ # users.
117
+ visibility:
102
118
  )
103
119
  end
104
120
 
@@ -110,12 +126,14 @@ module WhopSDK
110
126
  created_at: Time,
111
127
  description: T.nilable(String),
112
128
  language: WhopSDK::Languages::TaggedSymbol,
129
+ order: String,
113
130
  require_completing_lessons_in_order: T::Boolean,
114
131
  tagline: T.nilable(String),
115
132
  thumbnail:
116
133
  T.nilable(WhopSDK::Models::CourseListResponse::Thumbnail),
117
134
  title: T.nilable(String),
118
- updated_at: Time
135
+ updated_at: Time,
136
+ visibility: WhopSDK::CourseVisibilities::TaggedSymbol
119
137
  }
120
138
  )
121
139
  end
@@ -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)) }
@@ -58,6 +63,11 @@ module WhopSDK
58
63
  sig { returns(T.nilable(String)) }
59
64
  attr_accessor :title
60
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
+
61
71
  sig do
62
72
  params(
63
73
  certificate_after_completion_enabled: T.nilable(T::Boolean),
@@ -66,6 +76,7 @@ module WhopSDK
66
76
  cover_image: T.nilable(String),
67
77
  description: T.nilable(String),
68
78
  language: T.nilable(WhopSDK::Languages::OrSymbol),
79
+ order: T.nilable(String),
69
80
  require_completing_lessons_in_order: T.nilable(T::Boolean),
70
81
  tagline: T.nilable(String),
71
82
  thumbnail:
@@ -76,6 +87,7 @@ module WhopSDK
76
87
  )
77
88
  ),
78
89
  title: T.nilable(String),
90
+ visibility: T.nilable(WhopSDK::CourseVisibilities::OrSymbol),
79
91
  request_options: WhopSDK::RequestOptions::OrHash
80
92
  ).returns(T.attached_class)
81
93
  end
@@ -91,6 +103,9 @@ module WhopSDK
91
103
  description: nil,
92
104
  # The available languages for a course
93
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,
94
109
  # Whether the course requires students to complete the previous lesson before
95
110
  # moving on to the next one
96
111
  require_completing_lessons_in_order: nil,
@@ -100,6 +115,9 @@ module WhopSDK
100
115
  thumbnail: nil,
101
116
  # The title of the course
102
117
  title: nil,
118
+ # The available visibilities for a course. Determines how / whether a course is
119
+ # visible to users.
120
+ visibility: nil,
103
121
  request_options: {}
104
122
  )
105
123
  end
@@ -112,6 +130,7 @@ module WhopSDK
112
130
  cover_image: T.nilable(String),
113
131
  description: T.nilable(String),
114
132
  language: T.nilable(WhopSDK::Languages::OrSymbol),
133
+ order: T.nilable(String),
115
134
  require_completing_lessons_in_order: T.nilable(T::Boolean),
116
135
  tagline: T.nilable(String),
117
136
  thumbnail:
@@ -122,6 +141,7 @@ module WhopSDK
122
141
  )
123
142
  ),
124
143
  title: T.nilable(String),
144
+ visibility: T.nilable(WhopSDK::CourseVisibilities::OrSymbol),
125
145
  request_options: WhopSDK::RequestOptions
126
146
  }
127
147
  )
@@ -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