whop-sdk 0.0.1__py3-none-any.whl → 0.0.3__py3-none-any.whl

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.

Potentially problematic release.


This version of whop-sdk might be problematic. Click here for more details.

Files changed (126) hide show
  1. whop_sdk/_client.py +65 -2
  2. whop_sdk/_version.py +1 -1
  3. whop_sdk/resources/__init__.py +98 -0
  4. whop_sdk/resources/checkout_configurations.py +16 -12
  5. whop_sdk/resources/course_chapters.py +602 -0
  6. whop_sdk/resources/course_lessons.py +722 -0
  7. whop_sdk/resources/courses.py +713 -0
  8. whop_sdk/resources/experiences.py +107 -0
  9. whop_sdk/resources/forum_posts.py +123 -1
  10. whop_sdk/resources/forums.py +446 -0
  11. whop_sdk/resources/members.py +429 -0
  12. whop_sdk/resources/memberships.py +16 -8
  13. whop_sdk/resources/messages.py +113 -1
  14. whop_sdk/resources/payments.py +3 -26
  15. whop_sdk/resources/plans.py +84 -6
  16. whop_sdk/resources/products.py +8 -16
  17. whop_sdk/resources/promo_codes.py +652 -0
  18. whop_sdk/resources/reviews.py +315 -0
  19. whop_sdk/types/__init__.py +64 -0
  20. whop_sdk/types/app_list_response.py +16 -1
  21. whop_sdk/types/assessment_question_types.py +7 -0
  22. whop_sdk/types/billing_reasons.py +9 -0
  23. whop_sdk/types/card_brands.py +24 -0
  24. whop_sdk/types/checkout_configuration_create_params.py +70 -7
  25. whop_sdk/types/checkout_configuration_list_response.py +12 -9
  26. whop_sdk/types/course.py +109 -0
  27. whop_sdk/types/course_chapter.py +32 -0
  28. whop_sdk/types/course_chapter_create_params.py +16 -0
  29. whop_sdk/types/course_chapter_delete_response.py +7 -0
  30. whop_sdk/types/course_chapter_list_params.py +25 -0
  31. whop_sdk/types/course_chapter_list_response.py +16 -0
  32. whop_sdk/types/course_chapter_update_params.py +12 -0
  33. whop_sdk/types/course_create_params.py +41 -0
  34. whop_sdk/types/course_delete_response.py +7 -0
  35. whop_sdk/types/course_lesson_create_params.py +27 -0
  36. whop_sdk/types/course_lesson_delete_response.py +7 -0
  37. whop_sdk/types/course_lesson_interaction_completed_webhook_event.py +26 -0
  38. whop_sdk/types/course_lesson_list_params.py +28 -0
  39. whop_sdk/types/course_lesson_list_response.py +35 -0
  40. whop_sdk/types/course_lesson_update_params.py +144 -0
  41. whop_sdk/types/course_list_params.py +28 -0
  42. whop_sdk/types/course_list_response.py +77 -0
  43. whop_sdk/types/course_update_params.py +89 -0
  44. whop_sdk/types/entry_approved_webhook_event.py +26 -0
  45. whop_sdk/types/entry_created_webhook_event.py +26 -0
  46. whop_sdk/types/entry_deleted_webhook_event.py +26 -0
  47. whop_sdk/types/entry_denied_webhook_event.py +26 -0
  48. whop_sdk/types/experience_duplicate_params.py +13 -0
  49. whop_sdk/types/experience_list_response.py +27 -1
  50. whop_sdk/types/forum_list_params.py +28 -0
  51. whop_sdk/types/forum_list_response.py +33 -0
  52. whop_sdk/types/forum_post_list_response.py +7 -0
  53. whop_sdk/types/forum_post_update_params.py +41 -0
  54. whop_sdk/types/forum_update_params.py +23 -0
  55. whop_sdk/types/invoice_create_params.py +10 -2
  56. whop_sdk/types/languages.py +30 -0
  57. whop_sdk/types/ledger_account_retrieve_response.py +15 -1
  58. whop_sdk/types/lesson.py +159 -0
  59. whop_sdk/types/lesson_types.py +7 -0
  60. whop_sdk/types/lesson_visibilities.py +7 -0
  61. whop_sdk/types/member_list_params.py +73 -0
  62. whop_sdk/types/member_list_response.py +65 -0
  63. whop_sdk/types/member_retrieve_response.py +79 -0
  64. whop_sdk/types/membership_activated_webhook_event.py +29 -0
  65. whop_sdk/types/membership_deactivated_webhook_event.py +29 -0
  66. whop_sdk/types/membership_list_params.py +7 -4
  67. whop_sdk/types/membership_list_response.py +12 -1
  68. whop_sdk/types/message_update_params.py +35 -0
  69. whop_sdk/types/payment_failed_webhook_event.py +26 -0
  70. whop_sdk/types/payment_list_params.py +2 -7
  71. whop_sdk/types/payment_list_response.py +23 -13
  72. whop_sdk/types/payment_method_types.py +92 -0
  73. whop_sdk/types/payment_pending_webhook_event.py +26 -0
  74. whop_sdk/types/payment_succeeded_webhook_event.py +26 -0
  75. whop_sdk/types/plan_create_params.py +29 -3
  76. whop_sdk/types/plan_list_response.py +9 -0
  77. whop_sdk/types/plan_update_params.py +18 -0
  78. whop_sdk/types/product_create_params.py +1 -24
  79. whop_sdk/types/product_update_params.py +12 -1
  80. whop_sdk/types/promo_code.py +90 -0
  81. whop_sdk/types/promo_code_create_params.py +70 -0
  82. whop_sdk/types/promo_code_delete_response.py +7 -0
  83. whop_sdk/types/promo_code_list_params.py +37 -0
  84. whop_sdk/types/promo_code_list_response.py +79 -0
  85. whop_sdk/types/promo_code_status.py +7 -0
  86. whop_sdk/types/promo_duration.py +7 -0
  87. whop_sdk/types/review_list_params.py +31 -0
  88. whop_sdk/types/review_list_response.py +78 -0
  89. whop_sdk/types/review_retrieve_response.py +103 -0
  90. whop_sdk/types/review_status.py +7 -0
  91. whop_sdk/types/shared/__init__.py +7 -0
  92. whop_sdk/types/shared/access_level.py +7 -0
  93. whop_sdk/types/shared/app.py +25 -1
  94. whop_sdk/types/shared/checkout_configuration.py +12 -9
  95. whop_sdk/types/shared/company.py +15 -1
  96. whop_sdk/types/shared/course_lesson_interaction.py +20 -1
  97. whop_sdk/types/shared/email_notification_preferences.py +7 -0
  98. whop_sdk/types/shared/experience.py +27 -1
  99. whop_sdk/types/shared/forum.py +33 -0
  100. whop_sdk/types/shared/forum_post.py +7 -0
  101. whop_sdk/types/shared/invoice.py +4 -1
  102. whop_sdk/types/shared/invoice_list_item.py +4 -1
  103. whop_sdk/types/shared/member_most_recent_actions.py +22 -0
  104. whop_sdk/types/shared/member_statuses.py +7 -0
  105. whop_sdk/types/shared/membership.py +12 -1
  106. whop_sdk/types/shared/payment.py +23 -13
  107. whop_sdk/types/shared/plan.py +9 -0
  108. whop_sdk/types/shared/product.py +8 -0
  109. whop_sdk/types/shared/product_list_item.py +8 -0
  110. whop_sdk/types/shared/who_can_comment_types.py +7 -0
  111. whop_sdk/types/shared/who_can_post_types.py +7 -0
  112. whop_sdk/types/shared_params/__init__.py +7 -0
  113. whop_sdk/types/shared_params/access_level.py +9 -0
  114. whop_sdk/types/shared_params/email_notification_preferences.py +9 -0
  115. whop_sdk/types/shared_params/member_most_recent_actions.py +24 -0
  116. whop_sdk/types/shared_params/member_statuses.py +9 -0
  117. whop_sdk/types/shared_params/promo_type.py +9 -0
  118. whop_sdk/types/shared_params/who_can_comment_types.py +9 -0
  119. whop_sdk/types/shared_params/who_can_post_types.py +9 -0
  120. whop_sdk/types/unwrap_webhook_event.py +24 -1
  121. whop_sdk/types/user_check_access_response.py +2 -3
  122. whop_sdk/types/user_retrieve_response.py +12 -1
  123. {whop_sdk-0.0.1.dist-info → whop_sdk-0.0.3.dist-info}/METADATA +2 -2
  124. {whop_sdk-0.0.1.dist-info → whop_sdk-0.0.3.dist-info}/RECORD +126 -50
  125. {whop_sdk-0.0.1.dist-info → whop_sdk-0.0.3.dist-info}/WHEEL +0 -0
  126. {whop_sdk-0.0.1.dist-info → whop_sdk-0.0.3.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,315 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import Optional
6
+
7
+ import httpx
8
+
9
+ from ..types import review_list_params
10
+ from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
11
+ from .._utils import maybe_transform
12
+ from .._compat import cached_property
13
+ from .._resource import SyncAPIResource, AsyncAPIResource
14
+ from .._response import (
15
+ to_raw_response_wrapper,
16
+ to_streamed_response_wrapper,
17
+ async_to_raw_response_wrapper,
18
+ async_to_streamed_response_wrapper,
19
+ )
20
+ from ..pagination import SyncCursorPage, AsyncCursorPage
21
+ from .._base_client import AsyncPaginator, make_request_options
22
+ from ..types.review_list_response import ReviewListResponse
23
+ from ..types.review_retrieve_response import ReviewRetrieveResponse
24
+
25
+ __all__ = ["ReviewsResource", "AsyncReviewsResource"]
26
+
27
+
28
+ class ReviewsResource(SyncAPIResource):
29
+ @cached_property
30
+ def with_raw_response(self) -> ReviewsResourceWithRawResponse:
31
+ """
32
+ This property can be used as a prefix for any HTTP method call to return
33
+ the raw response object instead of the parsed content.
34
+
35
+ For more information, see https://www.github.com/whopio/whopsdk-python#accessing-raw-response-data-eg-headers
36
+ """
37
+ return ReviewsResourceWithRawResponse(self)
38
+
39
+ @cached_property
40
+ def with_streaming_response(self) -> ReviewsResourceWithStreamingResponse:
41
+ """
42
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
43
+
44
+ For more information, see https://www.github.com/whopio/whopsdk-python#with_streaming_response
45
+ """
46
+ return ReviewsResourceWithStreamingResponse(self)
47
+
48
+ def retrieve(
49
+ self,
50
+ id: str,
51
+ *,
52
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
53
+ # The extra values given here take precedence over values defined on the client or passed to this method.
54
+ extra_headers: Headers | None = None,
55
+ extra_query: Query | None = None,
56
+ extra_body: Body | None = None,
57
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
58
+ ) -> ReviewRetrieveResponse:
59
+ """
60
+ Retrieve a review by its ID
61
+
62
+ Args:
63
+ extra_headers: Send extra headers
64
+
65
+ extra_query: Add additional query parameters to the request
66
+
67
+ extra_body: Add additional JSON properties to the request
68
+
69
+ timeout: Override the client-level default timeout for this request, in seconds
70
+ """
71
+ if not id:
72
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
73
+ return self._get(
74
+ f"/reviews/{id}",
75
+ options=make_request_options(
76
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
77
+ ),
78
+ cast_to=ReviewRetrieveResponse,
79
+ )
80
+
81
+ def list(
82
+ self,
83
+ *,
84
+ product_id: str,
85
+ after: Optional[str] | Omit = omit,
86
+ before: Optional[str] | Omit = omit,
87
+ first: Optional[int] | Omit = omit,
88
+ last: Optional[int] | Omit = omit,
89
+ max_stars: Optional[int] | Omit = omit,
90
+ min_stars: Optional[int] | Omit = omit,
91
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
92
+ # The extra values given here take precedence over values defined on the client or passed to this method.
93
+ extra_headers: Headers | None = None,
94
+ extra_query: Query | None = None,
95
+ extra_body: Body | None = None,
96
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
97
+ ) -> SyncCursorPage[ReviewListResponse]:
98
+ """
99
+ List all reviews
100
+
101
+ Args:
102
+ product_id: The ID of the product
103
+
104
+ after: Returns the elements in the list that come after the specified cursor.
105
+
106
+ before: Returns the elements in the list that come before the specified cursor.
107
+
108
+ first: Returns the first _n_ elements from the list.
109
+
110
+ last: Returns the last _n_ elements from the list.
111
+
112
+ max_stars: The maximum star rating of the review (inclusive)
113
+
114
+ min_stars: The minimum star rating of the review (inclusive)
115
+
116
+ extra_headers: Send extra headers
117
+
118
+ extra_query: Add additional query parameters to the request
119
+
120
+ extra_body: Add additional JSON properties to the request
121
+
122
+ timeout: Override the client-level default timeout for this request, in seconds
123
+ """
124
+ return self._get_api_list(
125
+ "/reviews",
126
+ page=SyncCursorPage[ReviewListResponse],
127
+ options=make_request_options(
128
+ extra_headers=extra_headers,
129
+ extra_query=extra_query,
130
+ extra_body=extra_body,
131
+ timeout=timeout,
132
+ query=maybe_transform(
133
+ {
134
+ "product_id": product_id,
135
+ "after": after,
136
+ "before": before,
137
+ "first": first,
138
+ "last": last,
139
+ "max_stars": max_stars,
140
+ "min_stars": min_stars,
141
+ },
142
+ review_list_params.ReviewListParams,
143
+ ),
144
+ ),
145
+ model=ReviewListResponse,
146
+ )
147
+
148
+
149
+ class AsyncReviewsResource(AsyncAPIResource):
150
+ @cached_property
151
+ def with_raw_response(self) -> AsyncReviewsResourceWithRawResponse:
152
+ """
153
+ This property can be used as a prefix for any HTTP method call to return
154
+ the raw response object instead of the parsed content.
155
+
156
+ For more information, see https://www.github.com/whopio/whopsdk-python#accessing-raw-response-data-eg-headers
157
+ """
158
+ return AsyncReviewsResourceWithRawResponse(self)
159
+
160
+ @cached_property
161
+ def with_streaming_response(self) -> AsyncReviewsResourceWithStreamingResponse:
162
+ """
163
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
164
+
165
+ For more information, see https://www.github.com/whopio/whopsdk-python#with_streaming_response
166
+ """
167
+ return AsyncReviewsResourceWithStreamingResponse(self)
168
+
169
+ async def retrieve(
170
+ self,
171
+ id: str,
172
+ *,
173
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
174
+ # The extra values given here take precedence over values defined on the client or passed to this method.
175
+ extra_headers: Headers | None = None,
176
+ extra_query: Query | None = None,
177
+ extra_body: Body | None = None,
178
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
179
+ ) -> ReviewRetrieveResponse:
180
+ """
181
+ Retrieve a review by its ID
182
+
183
+ Args:
184
+ extra_headers: Send extra headers
185
+
186
+ extra_query: Add additional query parameters to the request
187
+
188
+ extra_body: Add additional JSON properties to the request
189
+
190
+ timeout: Override the client-level default timeout for this request, in seconds
191
+ """
192
+ if not id:
193
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
194
+ return await self._get(
195
+ f"/reviews/{id}",
196
+ options=make_request_options(
197
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
198
+ ),
199
+ cast_to=ReviewRetrieveResponse,
200
+ )
201
+
202
+ def list(
203
+ self,
204
+ *,
205
+ product_id: str,
206
+ after: Optional[str] | Omit = omit,
207
+ before: Optional[str] | Omit = omit,
208
+ first: Optional[int] | Omit = omit,
209
+ last: Optional[int] | Omit = omit,
210
+ max_stars: Optional[int] | Omit = omit,
211
+ min_stars: Optional[int] | Omit = omit,
212
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
213
+ # The extra values given here take precedence over values defined on the client or passed to this method.
214
+ extra_headers: Headers | None = None,
215
+ extra_query: Query | None = None,
216
+ extra_body: Body | None = None,
217
+ timeout: float | httpx.Timeout | None | NotGiven = not_given,
218
+ ) -> AsyncPaginator[ReviewListResponse, AsyncCursorPage[ReviewListResponse]]:
219
+ """
220
+ List all reviews
221
+
222
+ Args:
223
+ product_id: The ID of the product
224
+
225
+ after: Returns the elements in the list that come after the specified cursor.
226
+
227
+ before: Returns the elements in the list that come before the specified cursor.
228
+
229
+ first: Returns the first _n_ elements from the list.
230
+
231
+ last: Returns the last _n_ elements from the list.
232
+
233
+ max_stars: The maximum star rating of the review (inclusive)
234
+
235
+ min_stars: The minimum star rating of the review (inclusive)
236
+
237
+ extra_headers: Send extra headers
238
+
239
+ extra_query: Add additional query parameters to the request
240
+
241
+ extra_body: Add additional JSON properties to the request
242
+
243
+ timeout: Override the client-level default timeout for this request, in seconds
244
+ """
245
+ return self._get_api_list(
246
+ "/reviews",
247
+ page=AsyncCursorPage[ReviewListResponse],
248
+ options=make_request_options(
249
+ extra_headers=extra_headers,
250
+ extra_query=extra_query,
251
+ extra_body=extra_body,
252
+ timeout=timeout,
253
+ query=maybe_transform(
254
+ {
255
+ "product_id": product_id,
256
+ "after": after,
257
+ "before": before,
258
+ "first": first,
259
+ "last": last,
260
+ "max_stars": max_stars,
261
+ "min_stars": min_stars,
262
+ },
263
+ review_list_params.ReviewListParams,
264
+ ),
265
+ ),
266
+ model=ReviewListResponse,
267
+ )
268
+
269
+
270
+ class ReviewsResourceWithRawResponse:
271
+ def __init__(self, reviews: ReviewsResource) -> None:
272
+ self._reviews = reviews
273
+
274
+ self.retrieve = to_raw_response_wrapper(
275
+ reviews.retrieve,
276
+ )
277
+ self.list = to_raw_response_wrapper(
278
+ reviews.list,
279
+ )
280
+
281
+
282
+ class AsyncReviewsResourceWithRawResponse:
283
+ def __init__(self, reviews: AsyncReviewsResource) -> None:
284
+ self._reviews = reviews
285
+
286
+ self.retrieve = async_to_raw_response_wrapper(
287
+ reviews.retrieve,
288
+ )
289
+ self.list = async_to_raw_response_wrapper(
290
+ reviews.list,
291
+ )
292
+
293
+
294
+ class ReviewsResourceWithStreamingResponse:
295
+ def __init__(self, reviews: ReviewsResource) -> None:
296
+ self._reviews = reviews
297
+
298
+ self.retrieve = to_streamed_response_wrapper(
299
+ reviews.retrieve,
300
+ )
301
+ self.list = to_streamed_response_wrapper(
302
+ reviews.list,
303
+ )
304
+
305
+
306
+ class AsyncReviewsResourceWithStreamingResponse:
307
+ def __init__(self, reviews: AsyncReviewsResource) -> None:
308
+ self._reviews = reviews
309
+
310
+ self.retrieve = async_to_streamed_response_wrapper(
311
+ reviews.retrieve,
312
+ )
313
+ self.list = async_to_streamed_response_wrapper(
314
+ reviews.list,
315
+ )
@@ -2,10 +2,13 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from .course import Course as Course
6
+ from .lesson import Lesson as Lesson
5
7
  from .shared import (
6
8
  App as App,
7
9
  Plan as Plan,
8
10
  Entry as Entry,
11
+ Forum as Forum,
9
12
  Company as Company,
10
13
  Invoice as Invoice,
11
14
  Message as Message,
@@ -27,6 +30,7 @@ from .shared import (
27
30
  Membership as Membership,
28
31
  Visibility as Visibility,
29
32
  WhoCanPost as WhoCanPost,
33
+ AccessLevel as AccessLevel,
30
34
  AppStatuses as AppStatuses,
31
35
  AppViewType as AppViewType,
32
36
  ChatChannel as ChatChannel,
@@ -39,40 +43,67 @@ from .shared import (
39
43
  ReceiptStatus as ReceiptStatus,
40
44
  ReleaseMethod as ReleaseMethod,
41
45
  AccessPassType as AccessPassType,
46
+ MemberStatuses as MemberStatuses,
42
47
  ShipmentStatus as ShipmentStatus,
43
48
  SupportChannel as SupportChannel,
44
49
  InvoiceListItem as InvoiceListItem,
45
50
  ProductListItem as ProductListItem,
46
51
  ShipmentCarrier as ShipmentCarrier,
52
+ WhoCanPostTypes as WhoCanPostTypes,
47
53
  AppBuildStatuses as AppBuildStatuses,
48
54
  CollectionMethod as CollectionMethod,
49
55
  MembershipStatus as MembershipStatus,
50
56
  VisibilityFilter as VisibilityFilter,
51
57
  AppBuildPlatforms as AppBuildPlatforms,
52
58
  ShipmentSubstatus as ShipmentSubstatus,
59
+ WhoCanCommentTypes as WhoCanCommentTypes,
53
60
  AuthorizedUserRoles as AuthorizedUserRoles,
54
61
  CheckoutConfiguration as CheckoutConfiguration,
55
62
  FriendlyReceiptStatus as FriendlyReceiptStatus,
56
63
  GlobalAffiliateStatus as GlobalAffiliateStatus,
57
64
  CourseLessonInteraction as CourseLessonInteraction,
65
+ MemberMostRecentActions as MemberMostRecentActions,
66
+ EmailNotificationPreferences as EmailNotificationPreferences,
58
67
  CourseLessonInteractionListItem as CourseLessonInteractionListItem,
59
68
  )
69
+ from .languages import Languages as Languages
70
+ from .promo_code import PromoCode as PromoCode
71
+ from .card_brands import CardBrands as CardBrands
72
+ from .lesson_types import LessonTypes as LessonTypes
73
+ from .review_status import ReviewStatus as ReviewStatus
74
+ from .course_chapter import CourseChapter as CourseChapter
75
+ from .promo_duration import PromoDuration as PromoDuration
60
76
  from .app_list_params import AppListParams as AppListParams
77
+ from .billing_reasons import BillingReasons as BillingReasons
61
78
  from .plan_list_params import PlanListParams as PlanListParams
62
79
  from .app_create_params import AppCreateParams as AppCreateParams
63
80
  from .app_list_response import AppListResponse as AppListResponse
64
81
  from .app_update_params import AppUpdateParams as AppUpdateParams
65
82
  from .entry_list_params import EntryListParams as EntryListParams
83
+ from .forum_list_params import ForumListParams as ForumListParams
84
+ from .promo_code_status import PromoCodeStatus as PromoCodeStatus
85
+ from .course_list_params import CourseListParams as CourseListParams
86
+ from .member_list_params import MemberListParams as MemberListParams
66
87
  from .plan_create_params import PlanCreateParams as PlanCreateParams
67
88
  from .plan_list_response import PlanListResponse as PlanListResponse
68
89
  from .plan_update_params import PlanUpdateParams as PlanUpdateParams
90
+ from .review_list_params import ReviewListParams as ReviewListParams
69
91
  from .entry_list_response import EntryListResponse as EntryListResponse
92
+ from .forum_list_response import ForumListResponse as ForumListResponse
93
+ from .forum_update_params import ForumUpdateParams as ForumUpdateParams
70
94
  from .invoice_list_params import InvoiceListParams as InvoiceListParams
95
+ from .lesson_visibilities import LessonVisibilities as LessonVisibilities
71
96
  from .message_list_params import MessageListParams as MessageListParams
72
97
  from .payment_list_params import PaymentListParams as PaymentListParams
73
98
  from .product_list_params import ProductListParams as ProductListParams
99
+ from .course_create_params import CourseCreateParams as CourseCreateParams
100
+ from .course_list_response import CourseListResponse as CourseListResponse
101
+ from .course_update_params import CourseUpdateParams as CourseUpdateParams
102
+ from .member_list_response import MemberListResponse as MemberListResponse
103
+ from .payment_method_types import PaymentMethodTypes as PaymentMethodTypes
74
104
  from .plan_delete_response import PlanDeleteResponse as PlanDeleteResponse
75
105
  from .reaction_list_params import ReactionListParams as ReactionListParams
106
+ from .review_list_response import ReviewListResponse as ReviewListResponse
76
107
  from .shipment_list_params import ShipmentListParams as ShipmentListParams
77
108
  from .transfer_list_params import TransferListParams as TransferListParams
78
109
  from .unwrap_webhook_event import UnwrapWebhookEvent as UnwrapWebhookEvent
@@ -81,14 +112,17 @@ from .invoice_create_params import InvoiceCreateParams as InvoiceCreateParams
81
112
  from .invoice_void_response import InvoiceVoidResponse as InvoiceVoidResponse
82
113
  from .message_create_params import MessageCreateParams as MessageCreateParams
83
114
  from .message_list_response import MessageListResponse as MessageListResponse
115
+ from .message_update_params import MessageUpdateParams as MessageUpdateParams
84
116
  from .payment_list_response import PaymentListResponse as PaymentListResponse
85
117
  from .payment_refund_params import PaymentRefundParams as PaymentRefundParams
86
118
  from .product_create_params import ProductCreateParams as ProductCreateParams
87
119
  from .product_update_params import ProductUpdateParams as ProductUpdateParams
120
+ from .course_delete_response import CourseDeleteResponse as CourseDeleteResponse
88
121
  from .entry_approve_response import EntryApproveResponse as EntryApproveResponse
89
122
  from .experience_list_params import ExperienceListParams as ExperienceListParams
90
123
  from .forum_post_list_params import ForumPostListParams as ForumPostListParams
91
124
  from .membership_list_params import MembershipListParams as MembershipListParams
125
+ from .promo_code_list_params import PromoCodeListParams as PromoCodeListParams
92
126
  from .reaction_create_params import ReactionCreateParams as ReactionCreateParams
93
127
  from .reaction_list_response import ReactionListResponse as ReactionListResponse
94
128
  from .shipment_create_params import ShipmentCreateParams as ShipmentCreateParams
@@ -109,27 +143,57 @@ from .experience_list_response import ExperienceListResponse as ExperienceListRe
109
143
  from .experience_update_params import ExperienceUpdateParams as ExperienceUpdateParams
110
144
  from .forum_post_create_params import ForumPostCreateParams as ForumPostCreateParams
111
145
  from .forum_post_list_response import ForumPostListResponse as ForumPostListResponse
146
+ from .forum_post_update_params import ForumPostUpdateParams as ForumPostUpdateParams
147
+ from .member_retrieve_response import MemberRetrieveResponse as MemberRetrieveResponse
112
148
  from .membership_cancel_params import MembershipCancelParams as MembershipCancelParams
113
149
  from .membership_list_response import MembershipListResponse as MembershipListResponse
114
150
  from .membership_update_params import MembershipUpdateParams as MembershipUpdateParams
151
+ from .promo_code_create_params import PromoCodeCreateParams as PromoCodeCreateParams
152
+ from .promo_code_list_response import PromoCodeListResponse as PromoCodeListResponse
153
+ from .review_retrieve_response import ReviewRetrieveResponse as ReviewRetrieveResponse
154
+ from .assessment_question_types import AssessmentQuestionTypes as AssessmentQuestionTypes
155
+ from .course_lesson_list_params import CourseLessonListParams as CourseLessonListParams
115
156
  from .chat_channel_list_response import ChatChannelListResponse as ChatChannelListResponse
116
157
  from .chat_channel_update_params import ChatChannelUpdateParams as ChatChannelUpdateParams
158
+ from .course_chapter_list_params import CourseChapterListParams as CourseChapterListParams
159
+ from .entry_denied_webhook_event import EntryDeniedWebhookEvent as EntryDeniedWebhookEvent
117
160
  from .experience_delete_response import ExperienceDeleteResponse as ExperienceDeleteResponse
118
161
  from .invoice_paid_webhook_event import InvoicePaidWebhookEvent as InvoicePaidWebhookEvent
162
+ from .promo_code_delete_response import PromoCodeDeleteResponse as PromoCodeDeleteResponse
119
163
  from .user_check_access_response import UserCheckAccessResponse as UserCheckAccessResponse
120
164
  from .authorized_user_list_params import AuthorizedUserListParams as AuthorizedUserListParams
165
+ from .course_lesson_create_params import CourseLessonCreateParams as CourseLessonCreateParams
166
+ from .course_lesson_list_response import CourseLessonListResponse as CourseLessonListResponse
167
+ from .course_lesson_update_params import CourseLessonUpdateParams as CourseLessonUpdateParams
168
+ from .entry_created_webhook_event import EntryCreatedWebhookEvent as EntryCreatedWebhookEvent
169
+ from .entry_deleted_webhook_event import EntryDeletedWebhookEvent as EntryDeletedWebhookEvent
170
+ from .experience_duplicate_params import ExperienceDuplicateParams as ExperienceDuplicateParams
121
171
  from .support_channel_list_params import SupportChannelListParams as SupportChannelListParams
172
+ from .course_chapter_create_params import CourseChapterCreateParams as CourseChapterCreateParams
173
+ from .course_chapter_list_response import CourseChapterListResponse as CourseChapterListResponse
174
+ from .course_chapter_update_params import CourseChapterUpdateParams as CourseChapterUpdateParams
175
+ from .entry_approved_webhook_event import EntryApprovedWebhookEvent as EntryApprovedWebhookEvent
122
176
  from .invoice_voided_webhook_event import InvoiceVoidedWebhookEvent as InvoiceVoidedWebhookEvent
177
+ from .payment_failed_webhook_event import PaymentFailedWebhookEvent as PaymentFailedWebhookEvent
123
178
  from .authorized_user_list_response import AuthorizedUserListResponse as AuthorizedUserListResponse
179
+ from .course_lesson_delete_response import CourseLessonDeleteResponse as CourseLessonDeleteResponse
124
180
  from .invoice_created_webhook_event import InvoiceCreatedWebhookEvent as InvoiceCreatedWebhookEvent
181
+ from .payment_pending_webhook_event import PaymentPendingWebhookEvent as PaymentPendingWebhookEvent
125
182
  from .support_channel_create_params import SupportChannelCreateParams as SupportChannelCreateParams
126
183
  from .support_channel_list_response import SupportChannelListResponse as SupportChannelListResponse
184
+ from .course_chapter_delete_response import CourseChapterDeleteResponse as CourseChapterDeleteResponse
127
185
  from .invoice_past_due_webhook_event import InvoicePastDueWebhookEvent as InvoicePastDueWebhookEvent
186
+ from .payment_succeeded_webhook_event import PaymentSucceededWebhookEvent as PaymentSucceededWebhookEvent
128
187
  from .ledger_account_retrieve_response import LedgerAccountRetrieveResponse as LedgerAccountRetrieveResponse
129
188
  from .authorized_user_retrieve_response import AuthorizedUserRetrieveResponse as AuthorizedUserRetrieveResponse
130
189
  from .checkout_configuration_list_params import CheckoutConfigurationListParams as CheckoutConfigurationListParams
190
+ from .membership_activated_webhook_event import MembershipActivatedWebhookEvent as MembershipActivatedWebhookEvent
131
191
  from .checkout_configuration_create_params import CheckoutConfigurationCreateParams as CheckoutConfigurationCreateParams
132
192
  from .checkout_configuration_list_response import CheckoutConfigurationListResponse as CheckoutConfigurationListResponse
193
+ from .membership_deactivated_webhook_event import MembershipDeactivatedWebhookEvent as MembershipDeactivatedWebhookEvent
133
194
  from .course_lesson_interaction_list_params import (
134
195
  CourseLessonInteractionListParams as CourseLessonInteractionListParams,
135
196
  )
197
+ from .course_lesson_interaction_completed_webhook_event import (
198
+ CourseLessonInteractionCompletedWebhookEvent as CourseLessonInteractionCompletedWebhookEvent,
199
+ )
@@ -5,7 +5,7 @@ from typing import Optional
5
5
  from .._models import BaseModel
6
6
  from .shared.app_statuses import AppStatuses
7
7
 
8
- __all__ = ["AppListResponse", "Company", "Creator"]
8
+ __all__ = ["AppListResponse", "Company", "Creator", "Icon"]
9
9
 
10
10
 
11
11
  class Company(BaseModel):
@@ -27,6 +27,14 @@ class Creator(BaseModel):
27
27
  """The username of the user from their Whop account."""
28
28
 
29
29
 
30
+ class Icon(BaseModel):
31
+ url: Optional[str] = None
32
+ """This is the URL you use to render optimized attachments on the client.
33
+
34
+ This should be used for apps.
35
+ """
36
+
37
+
30
38
  class AppListResponse(BaseModel):
31
39
  id: str
32
40
  """The ID of the app"""
@@ -71,6 +79,13 @@ class AppListResponse(BaseModel):
71
79
  /experiences/[experienceId]
72
80
  """
73
81
 
82
+ icon: Optional[Icon] = None
83
+ """The icon for the app.
84
+
85
+ This icon is shown on discovery, on the product page, on checkout, and as a
86
+ default icon for the experiences.
87
+ """
88
+
74
89
  name: str
75
90
  """The name of the app"""
76
91
 
@@ -0,0 +1,7 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal, TypeAlias
4
+
5
+ __all__ = ["AssessmentQuestionTypes"]
6
+
7
+ AssessmentQuestionTypes: TypeAlias = Literal["short_answer", "true_false", "multiple_choice", "multiple_select"]
@@ -0,0 +1,9 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal, TypeAlias
4
+
5
+ __all__ = ["BillingReasons"]
6
+
7
+ BillingReasons: TypeAlias = Literal[
8
+ "subscription_create", "subscription_cycle", "subscription_update", "one_time", "manual", "subscription"
9
+ ]
@@ -0,0 +1,24 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing_extensions import Literal, TypeAlias
4
+
5
+ __all__ = ["CardBrands"]
6
+
7
+ CardBrands: TypeAlias = Literal[
8
+ "mastercard",
9
+ "visa",
10
+ "amex",
11
+ "discover",
12
+ "unionpay",
13
+ "jcb",
14
+ "diners",
15
+ "link",
16
+ "troy",
17
+ "visadankort",
18
+ "visabancontact",
19
+ "china_union_pay",
20
+ "rupay",
21
+ "jcbrupay",
22
+ "elo",
23
+ "unknown",
24
+ ]
@@ -9,26 +9,29 @@ from .shared.currency import Currency
9
9
  from .shared.tax_type import TaxType
10
10
  from .shared.plan_type import PlanType
11
11
  from .shared.visibility import Visibility
12
+ from .shared.business_types import BusinessTypes
13
+ from .shared.industry_types import IndustryTypes
12
14
  from .shared.release_method import ReleaseMethod
15
+ from .shared.global_affiliate_status import GlobalAffiliateStatus
13
16
 
14
- __all__ = ["CheckoutConfigurationCreateParams", "Plan", "PlanCustomField", "PlanImage"]
17
+ __all__ = ["CheckoutConfigurationCreateParams", "Plan", "PlanCustomField", "PlanImage", "PlanProduct"]
15
18
 
16
19
 
17
20
  class CheckoutConfigurationCreateParams(TypedDict, total=False):
18
21
  affiliate_code: Optional[str]
19
- """The affiliate code to use for the checkout session"""
22
+ """The affiliate code to use for the checkout configuration"""
20
23
 
21
24
  metadata: Optional[Dict[str, object]]
22
- """The metadata to use for the checkout session"""
25
+ """The metadata to use for the checkout configuration"""
23
26
 
24
27
  plan: Optional[Plan]
25
- """Pass this object to create a new plan for this checkout session"""
28
+ """Pass this object to create a new plan for this checkout configuration"""
26
29
 
27
30
  plan_id: Optional[str]
28
- """The ID of the plan to use for the checkout session"""
31
+ """The ID of the plan to use for the checkout configuration"""
29
32
 
30
33
  redirect_url: Optional[str]
31
- """The URL to redirect the user to after the checkout session is created"""
34
+ """The URL to redirect the user to after the checkout configuration is created"""
32
35
 
33
36
 
34
37
  class PlanCustomField(TypedDict, total=False):
@@ -67,6 +70,59 @@ class PlanImage(TypedDict, total=False):
67
70
  """
68
71
 
69
72
 
73
+ class PlanProduct(TypedDict, total=False):
74
+ external_identifier: Required[str]
75
+ """A unique ID used to find or create a product.
76
+
77
+ When provided during creation, we will look for an existing product with this
78
+ external identifier — if found, it will be updated; otherwise, a new product
79
+ will be created.
80
+ """
81
+
82
+ title: Required[str]
83
+ """The title of the product."""
84
+
85
+ business_type: Optional[BusinessTypes]
86
+ """The different business types a company can be."""
87
+
88
+ collect_shipping_address: Optional[bool]
89
+ """Whether or not to collect shipping information at checkout from the customer."""
90
+
91
+ custom_statement_descriptor: Optional[str]
92
+ """The custom statement descriptor for the product i.e.
93
+
94
+ WHOP\\**SPORTS, must be between 5 and 22 characters, contain at least one letter,
95
+ and not contain any of the following characters: <, >, \\,, ', "
96
+ """
97
+
98
+ description: Optional[str]
99
+ """A written description of the product."""
100
+
101
+ global_affiliate_percentage: Optional[float]
102
+ """The percentage of the revenue that goes to the global affiliate program."""
103
+
104
+ global_affiliate_status: Optional[GlobalAffiliateStatus]
105
+ """The different statuses of the global affiliate program for an access pass."""
106
+
107
+ headline: Optional[str]
108
+ """The headline of the product."""
109
+
110
+ industry_type: Optional[IndustryTypes]
111
+ """The different industry types a company can be in."""
112
+
113
+ product_tax_code_id: Optional[str]
114
+ """The ID of the product tax code to apply to this product."""
115
+
116
+ redirect_purchase_url: Optional[str]
117
+ """The URL to redirect the customer to after a purchase."""
118
+
119
+ route: Optional[str]
120
+ """The route of the product."""
121
+
122
+ visibility: Optional[Visibility]
123
+ """Visibility of a resource"""
124
+
125
+
70
126
  class Plan(TypedDict, total=False):
71
127
  company_id: Required[str]
72
128
  """The company the plan should be created for."""
@@ -110,8 +166,15 @@ class Plan(TypedDict, total=False):
110
166
  plan_type: Optional[PlanType]
111
167
  """The type of plan that can be attached to an access pass"""
112
168
 
169
+ product: Optional[PlanProduct]
170
+ """Pass this object to create a new product for this plan.
171
+
172
+ We will use the product external identifier to find or create an existing
173
+ product.
174
+ """
175
+
113
176
  product_id: Optional[str]
114
- """The product the plan is related to."""
177
+ """The product the plan is related to. Either this or product is required."""
115
178
 
116
179
  release_method: Optional[ReleaseMethod]
117
180
  """The methods of how a plan can be released."""