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.
- whop_sdk/_client.py +65 -2
- whop_sdk/_version.py +1 -1
- whop_sdk/resources/__init__.py +98 -0
- whop_sdk/resources/checkout_configurations.py +16 -12
- whop_sdk/resources/course_chapters.py +602 -0
- whop_sdk/resources/course_lessons.py +722 -0
- whop_sdk/resources/courses.py +713 -0
- whop_sdk/resources/experiences.py +107 -0
- whop_sdk/resources/forum_posts.py +123 -1
- whop_sdk/resources/forums.py +446 -0
- whop_sdk/resources/members.py +429 -0
- whop_sdk/resources/memberships.py +16 -8
- whop_sdk/resources/messages.py +113 -1
- whop_sdk/resources/payments.py +3 -26
- whop_sdk/resources/plans.py +84 -6
- whop_sdk/resources/products.py +8 -16
- whop_sdk/resources/promo_codes.py +652 -0
- whop_sdk/resources/reviews.py +315 -0
- whop_sdk/types/__init__.py +64 -0
- whop_sdk/types/app_list_response.py +16 -1
- whop_sdk/types/assessment_question_types.py +7 -0
- whop_sdk/types/billing_reasons.py +9 -0
- whop_sdk/types/card_brands.py +24 -0
- whop_sdk/types/checkout_configuration_create_params.py +70 -7
- whop_sdk/types/checkout_configuration_list_response.py +12 -9
- whop_sdk/types/course.py +109 -0
- whop_sdk/types/course_chapter.py +32 -0
- whop_sdk/types/course_chapter_create_params.py +16 -0
- whop_sdk/types/course_chapter_delete_response.py +7 -0
- whop_sdk/types/course_chapter_list_params.py +25 -0
- whop_sdk/types/course_chapter_list_response.py +16 -0
- whop_sdk/types/course_chapter_update_params.py +12 -0
- whop_sdk/types/course_create_params.py +41 -0
- whop_sdk/types/course_delete_response.py +7 -0
- whop_sdk/types/course_lesson_create_params.py +27 -0
- whop_sdk/types/course_lesson_delete_response.py +7 -0
- whop_sdk/types/course_lesson_interaction_completed_webhook_event.py +26 -0
- whop_sdk/types/course_lesson_list_params.py +28 -0
- whop_sdk/types/course_lesson_list_response.py +35 -0
- whop_sdk/types/course_lesson_update_params.py +144 -0
- whop_sdk/types/course_list_params.py +28 -0
- whop_sdk/types/course_list_response.py +77 -0
- whop_sdk/types/course_update_params.py +89 -0
- whop_sdk/types/entry_approved_webhook_event.py +26 -0
- whop_sdk/types/entry_created_webhook_event.py +26 -0
- whop_sdk/types/entry_deleted_webhook_event.py +26 -0
- whop_sdk/types/entry_denied_webhook_event.py +26 -0
- whop_sdk/types/experience_duplicate_params.py +13 -0
- whop_sdk/types/experience_list_response.py +27 -1
- whop_sdk/types/forum_list_params.py +28 -0
- whop_sdk/types/forum_list_response.py +33 -0
- whop_sdk/types/forum_post_list_response.py +7 -0
- whop_sdk/types/forum_post_update_params.py +41 -0
- whop_sdk/types/forum_update_params.py +23 -0
- whop_sdk/types/invoice_create_params.py +10 -2
- whop_sdk/types/languages.py +30 -0
- whop_sdk/types/ledger_account_retrieve_response.py +15 -1
- whop_sdk/types/lesson.py +159 -0
- whop_sdk/types/lesson_types.py +7 -0
- whop_sdk/types/lesson_visibilities.py +7 -0
- whop_sdk/types/member_list_params.py +73 -0
- whop_sdk/types/member_list_response.py +65 -0
- whop_sdk/types/member_retrieve_response.py +79 -0
- whop_sdk/types/membership_activated_webhook_event.py +29 -0
- whop_sdk/types/membership_deactivated_webhook_event.py +29 -0
- whop_sdk/types/membership_list_params.py +7 -4
- whop_sdk/types/membership_list_response.py +12 -1
- whop_sdk/types/message_update_params.py +35 -0
- whop_sdk/types/payment_failed_webhook_event.py +26 -0
- whop_sdk/types/payment_list_params.py +2 -7
- whop_sdk/types/payment_list_response.py +23 -13
- whop_sdk/types/payment_method_types.py +92 -0
- whop_sdk/types/payment_pending_webhook_event.py +26 -0
- whop_sdk/types/payment_succeeded_webhook_event.py +26 -0
- whop_sdk/types/plan_create_params.py +29 -3
- whop_sdk/types/plan_list_response.py +9 -0
- whop_sdk/types/plan_update_params.py +18 -0
- whop_sdk/types/product_create_params.py +1 -24
- whop_sdk/types/product_update_params.py +12 -1
- whop_sdk/types/promo_code.py +90 -0
- whop_sdk/types/promo_code_create_params.py +70 -0
- whop_sdk/types/promo_code_delete_response.py +7 -0
- whop_sdk/types/promo_code_list_params.py +37 -0
- whop_sdk/types/promo_code_list_response.py +79 -0
- whop_sdk/types/promo_code_status.py +7 -0
- whop_sdk/types/promo_duration.py +7 -0
- whop_sdk/types/review_list_params.py +31 -0
- whop_sdk/types/review_list_response.py +78 -0
- whop_sdk/types/review_retrieve_response.py +103 -0
- whop_sdk/types/review_status.py +7 -0
- whop_sdk/types/shared/__init__.py +7 -0
- whop_sdk/types/shared/access_level.py +7 -0
- whop_sdk/types/shared/app.py +25 -1
- whop_sdk/types/shared/checkout_configuration.py +12 -9
- whop_sdk/types/shared/company.py +15 -1
- whop_sdk/types/shared/course_lesson_interaction.py +20 -1
- whop_sdk/types/shared/email_notification_preferences.py +7 -0
- whop_sdk/types/shared/experience.py +27 -1
- whop_sdk/types/shared/forum.py +33 -0
- whop_sdk/types/shared/forum_post.py +7 -0
- whop_sdk/types/shared/invoice.py +4 -1
- whop_sdk/types/shared/invoice_list_item.py +4 -1
- whop_sdk/types/shared/member_most_recent_actions.py +22 -0
- whop_sdk/types/shared/member_statuses.py +7 -0
- whop_sdk/types/shared/membership.py +12 -1
- whop_sdk/types/shared/payment.py +23 -13
- whop_sdk/types/shared/plan.py +9 -0
- whop_sdk/types/shared/product.py +8 -0
- whop_sdk/types/shared/product_list_item.py +8 -0
- whop_sdk/types/shared/who_can_comment_types.py +7 -0
- whop_sdk/types/shared/who_can_post_types.py +7 -0
- whop_sdk/types/shared_params/__init__.py +7 -0
- whop_sdk/types/shared_params/access_level.py +9 -0
- whop_sdk/types/shared_params/email_notification_preferences.py +9 -0
- whop_sdk/types/shared_params/member_most_recent_actions.py +24 -0
- whop_sdk/types/shared_params/member_statuses.py +9 -0
- whop_sdk/types/shared_params/promo_type.py +9 -0
- whop_sdk/types/shared_params/who_can_comment_types.py +9 -0
- whop_sdk/types/shared_params/who_can_post_types.py +9 -0
- whop_sdk/types/unwrap_webhook_event.py +24 -1
- whop_sdk/types/user_check_access_response.py +2 -3
- whop_sdk/types/user_retrieve_response.py +12 -1
- {whop_sdk-0.0.1.dist-info → whop_sdk-0.0.3.dist-info}/METADATA +2 -2
- {whop_sdk-0.0.1.dist-info → whop_sdk-0.0.3.dist-info}/RECORD +126 -50
- {whop_sdk-0.0.1.dist-info → whop_sdk-0.0.3.dist-info}/WHEEL +0 -0
- {whop_sdk-0.0.1.dist-info → whop_sdk-0.0.3.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
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__ = ["MemberMostRecentActions"]
|
|
6
|
+
|
|
7
|
+
MemberMostRecentActions: TypeAlias = Literal[
|
|
8
|
+
"canceling",
|
|
9
|
+
"churned",
|
|
10
|
+
"finished_split_pay",
|
|
11
|
+
"paused",
|
|
12
|
+
"paid_subscriber",
|
|
13
|
+
"paid_once",
|
|
14
|
+
"expiring",
|
|
15
|
+
"joined",
|
|
16
|
+
"drafted",
|
|
17
|
+
"left",
|
|
18
|
+
"trialing",
|
|
19
|
+
"pending_entry",
|
|
20
|
+
"renewing",
|
|
21
|
+
"past_due",
|
|
22
|
+
]
|
|
@@ -7,7 +7,7 @@ from .currency import Currency
|
|
|
7
7
|
from ..._models import BaseModel
|
|
8
8
|
from .membership_status import MembershipStatus
|
|
9
9
|
|
|
10
|
-
__all__ = ["Membership", "Company", "Member", "Plan", "PromoCode", "User"]
|
|
10
|
+
__all__ = ["Membership", "Company", "Member", "Plan", "Product", "PromoCode", "User"]
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
class Company(BaseModel):
|
|
@@ -28,6 +28,14 @@ class Plan(BaseModel):
|
|
|
28
28
|
"""The internal ID of the plan."""
|
|
29
29
|
|
|
30
30
|
|
|
31
|
+
class Product(BaseModel):
|
|
32
|
+
id: str
|
|
33
|
+
"""The internal ID of the public product."""
|
|
34
|
+
|
|
35
|
+
title: str
|
|
36
|
+
"""The title of the product. Use for Whop 4.0."""
|
|
37
|
+
|
|
38
|
+
|
|
31
39
|
class PromoCode(BaseModel):
|
|
32
40
|
id: str
|
|
33
41
|
"""The ID of the promo."""
|
|
@@ -92,6 +100,9 @@ class Membership(BaseModel):
|
|
|
92
100
|
plan: Plan
|
|
93
101
|
"""The Plan this Membership is for."""
|
|
94
102
|
|
|
103
|
+
product: Product
|
|
104
|
+
"""The Product this Membership grants access to."""
|
|
105
|
+
|
|
95
106
|
promo_code: Optional[PromoCode] = None
|
|
96
107
|
"""The Promo Code that is currently applied to this Membership."""
|
|
97
108
|
|
whop_sdk/types/shared/payment.py
CHANGED
|
@@ -6,8 +6,11 @@ from datetime import datetime
|
|
|
6
6
|
from .currency import Currency
|
|
7
7
|
from ..._models import BaseModel
|
|
8
8
|
from .promo_type import PromoType
|
|
9
|
+
from ..card_brands import CardBrands
|
|
9
10
|
from .receipt_status import ReceiptStatus
|
|
11
|
+
from ..billing_reasons import BillingReasons
|
|
10
12
|
from .membership_status import MembershipStatus
|
|
13
|
+
from ..payment_method_types import PaymentMethodTypes
|
|
11
14
|
from .friendly_receipt_status import FriendlyReceiptStatus
|
|
12
15
|
|
|
13
16
|
__all__ = ["Payment", "BillingAddress", "Company", "Member", "Membership", "Plan", "Product", "PromoCode", "User"]
|
|
@@ -93,7 +96,7 @@ class PromoCode(BaseModel):
|
|
|
93
96
|
"""The specific code used to apply the promo at checkout."""
|
|
94
97
|
|
|
95
98
|
number_of_intervals: Optional[int] = None
|
|
96
|
-
"""The number of
|
|
99
|
+
"""The number of months the promo is applied for."""
|
|
97
100
|
|
|
98
101
|
promo_type: PromoType
|
|
99
102
|
"""The type (% or flat amount) of the promo."""
|
|
@@ -126,11 +129,11 @@ class Payment(BaseModel):
|
|
|
126
129
|
billing_address: Optional[BillingAddress] = None
|
|
127
130
|
"""The address of the user who made the payment."""
|
|
128
131
|
|
|
129
|
-
billing_reason: Optional[
|
|
130
|
-
"""The
|
|
132
|
+
billing_reason: Optional[BillingReasons] = None
|
|
133
|
+
"""The reason why a specific payment was billed"""
|
|
131
134
|
|
|
132
|
-
card_brand: Optional[
|
|
133
|
-
"""
|
|
135
|
+
card_brand: Optional[CardBrands] = None
|
|
136
|
+
"""Possible card brands that a payment token can have"""
|
|
134
137
|
|
|
135
138
|
card_last4: Optional[str] = None
|
|
136
139
|
"""The last 4 digits of the card used to make the payment."""
|
|
@@ -162,11 +165,8 @@ class Payment(BaseModel):
|
|
|
162
165
|
paid_at: Optional[datetime] = None
|
|
163
166
|
"""The datetime the payment was paid"""
|
|
164
167
|
|
|
165
|
-
payment_method_type: Optional[
|
|
166
|
-
"""
|
|
167
|
-
|
|
168
|
-
Ex. klarna, affirm, card, cashapp
|
|
169
|
-
"""
|
|
168
|
+
payment_method_type: Optional[PaymentMethodTypes] = None
|
|
169
|
+
"""The different types of payment methods that can be used."""
|
|
170
170
|
|
|
171
171
|
plan: Optional[Plan] = None
|
|
172
172
|
"""The plan attached to this payment."""
|
|
@@ -178,7 +178,10 @@ class Payment(BaseModel):
|
|
|
178
178
|
"""The promo code used for this payment."""
|
|
179
179
|
|
|
180
180
|
refundable: bool
|
|
181
|
-
"""
|
|
181
|
+
"""
|
|
182
|
+
True only for payments that are `paid`, have not been fully refunded, and were
|
|
183
|
+
processed by a payment processor that allows refunds.
|
|
184
|
+
"""
|
|
182
185
|
|
|
183
186
|
refunded_amount: Optional[float] = None
|
|
184
187
|
"""The payment refund amount(if applicable)."""
|
|
@@ -187,7 +190,11 @@ class Payment(BaseModel):
|
|
|
187
190
|
"""When the payment was refunded (if applicable)."""
|
|
188
191
|
|
|
189
192
|
retryable: bool
|
|
190
|
-
"""
|
|
193
|
+
"""
|
|
194
|
+
True when the payment status is `open` and its membership is in one of the
|
|
195
|
+
retry-eligible states (`active`, `trialing`, `completed`, or `past_due`);
|
|
196
|
+
otherwise false. Used to decide if Whop can attempt the charge again.
|
|
197
|
+
"""
|
|
191
198
|
|
|
192
199
|
status: Optional[ReceiptStatus] = None
|
|
193
200
|
"""The status of a receipt"""
|
|
@@ -208,4 +215,7 @@ class Payment(BaseModel):
|
|
|
208
215
|
"""The user that made this payment."""
|
|
209
216
|
|
|
210
217
|
voidable: bool
|
|
211
|
-
"""
|
|
218
|
+
"""
|
|
219
|
+
True when the payment is tied to a membership in `past_due`, the payment status
|
|
220
|
+
is `open`, and the processor allows voiding payments; otherwise false.
|
|
221
|
+
"""
|
whop_sdk/types/shared/plan.py
CHANGED
|
@@ -110,12 +110,21 @@ class Plan(BaseModel):
|
|
|
110
110
|
renewal_price: float
|
|
111
111
|
"""The price a person has to pay for a plan on the renewal purchase."""
|
|
112
112
|
|
|
113
|
+
stock: Optional[int] = None
|
|
114
|
+
"""The number of units available for purchase. Only displayed to authorized actors"""
|
|
115
|
+
|
|
113
116
|
tax_type: TaxType
|
|
114
117
|
"""The tax type for the plan."""
|
|
115
118
|
|
|
119
|
+
title: Optional[str] = None
|
|
120
|
+
"""The title of the plan. This will be visible on the product page to customers."""
|
|
121
|
+
|
|
116
122
|
trial_period_days: Optional[int] = None
|
|
117
123
|
"""The number of free trial days added before a renewal plan."""
|
|
118
124
|
|
|
125
|
+
unlimited_stock: bool
|
|
126
|
+
"""Limits/doesn't limit the number of units available for purchase."""
|
|
127
|
+
|
|
119
128
|
updated_at: datetime
|
|
120
129
|
"""When the plan was last updated."""
|
|
121
130
|
|
whop_sdk/types/shared/product.py
CHANGED
|
@@ -72,6 +72,14 @@ class Product(BaseModel):
|
|
|
72
72
|
description: Optional[str] = None
|
|
73
73
|
"""A short description of what the company offers or does."""
|
|
74
74
|
|
|
75
|
+
external_identifier: Optional[str] = None
|
|
76
|
+
"""A unique identifier used to create or update products.
|
|
77
|
+
|
|
78
|
+
When provided on product creation endpoints, we’ll look up an existing product
|
|
79
|
+
by this identifier — if it exists, we’ll update it; if not, we’ll create a new
|
|
80
|
+
one.
|
|
81
|
+
"""
|
|
82
|
+
|
|
75
83
|
global_affiliate_percentage: Optional[float] = None
|
|
76
84
|
"""
|
|
77
85
|
The percentage of a transaction a user is eligible to earn from the whop
|
|
@@ -21,6 +21,14 @@ class ProductListItem(BaseModel):
|
|
|
21
21
|
created_at: datetime
|
|
22
22
|
"""When the product was created."""
|
|
23
23
|
|
|
24
|
+
external_identifier: Optional[str] = None
|
|
25
|
+
"""A unique identifier used to create or update products.
|
|
26
|
+
|
|
27
|
+
When provided on product creation endpoints, we’ll look up an existing product
|
|
28
|
+
by this identifier — if it exists, we’ll update it; if not, we’ll create a new
|
|
29
|
+
one.
|
|
30
|
+
"""
|
|
31
|
+
|
|
24
32
|
headline: Optional[str] = None
|
|
25
33
|
"""The headline of the product."""
|
|
26
34
|
|
|
@@ -5,7 +5,9 @@ from .tax_type import TaxType as TaxType
|
|
|
5
5
|
from .direction import Direction as Direction
|
|
6
6
|
from .plan_type import PlanType as PlanType
|
|
7
7
|
from .custom_cta import CustomCta as CustomCta
|
|
8
|
+
from .promo_type import PromoType as PromoType
|
|
8
9
|
from .visibility import Visibility as Visibility
|
|
10
|
+
from .access_level import AccessLevel as AccessLevel
|
|
9
11
|
from .app_statuses import AppStatuses as AppStatuses
|
|
10
12
|
from .entry_status import EntryStatus as EntryStatus
|
|
11
13
|
from .who_can_post import WhoCanPost as WhoCanPost
|
|
@@ -16,12 +18,17 @@ from .industry_types import IndustryTypes as IndustryTypes
|
|
|
16
18
|
from .invoice_status import InvoiceStatus as InvoiceStatus
|
|
17
19
|
from .receipt_status import ReceiptStatus as ReceiptStatus
|
|
18
20
|
from .release_method import ReleaseMethod as ReleaseMethod
|
|
21
|
+
from .member_statuses import MemberStatuses as MemberStatuses
|
|
19
22
|
from .access_pass_type import AccessPassType as AccessPassType
|
|
20
23
|
from .collection_method import CollectionMethod as CollectionMethod
|
|
21
24
|
from .membership_status import MembershipStatus as MembershipStatus
|
|
22
25
|
from .visibility_filter import VisibilityFilter as VisibilityFilter
|
|
23
26
|
from .app_build_statuses import AppBuildStatuses as AppBuildStatuses
|
|
27
|
+
from .who_can_post_types import WhoCanPostTypes as WhoCanPostTypes
|
|
24
28
|
from .app_build_platforms import AppBuildPlatforms as AppBuildPlatforms
|
|
25
29
|
from .authorized_user_roles import AuthorizedUserRoles as AuthorizedUserRoles
|
|
30
|
+
from .who_can_comment_types import WhoCanCommentTypes as WhoCanCommentTypes
|
|
26
31
|
from .friendly_receipt_status import FriendlyReceiptStatus as FriendlyReceiptStatus
|
|
27
32
|
from .global_affiliate_status import GlobalAffiliateStatus as GlobalAffiliateStatus
|
|
33
|
+
from .member_most_recent_actions import MemberMostRecentActions as MemberMostRecentActions
|
|
34
|
+
from .email_notification_preferences import EmailNotificationPreferences as EmailNotificationPreferences
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, TypeAlias
|
|
6
|
+
|
|
7
|
+
__all__ = ["AccessLevel"]
|
|
8
|
+
|
|
9
|
+
AccessLevel: TypeAlias = Literal["no_access", "admin", "customer"]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, TypeAlias
|
|
6
|
+
|
|
7
|
+
__all__ = ["EmailNotificationPreferences"]
|
|
8
|
+
|
|
9
|
+
EmailNotificationPreferences: TypeAlias = Literal["all_admin_posts", "only_weekly_summary", "none"]
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, TypeAlias
|
|
6
|
+
|
|
7
|
+
__all__ = ["MemberMostRecentActions"]
|
|
8
|
+
|
|
9
|
+
MemberMostRecentActions: TypeAlias = Literal[
|
|
10
|
+
"canceling",
|
|
11
|
+
"churned",
|
|
12
|
+
"finished_split_pay",
|
|
13
|
+
"paused",
|
|
14
|
+
"paid_subscriber",
|
|
15
|
+
"paid_once",
|
|
16
|
+
"expiring",
|
|
17
|
+
"joined",
|
|
18
|
+
"drafted",
|
|
19
|
+
"left",
|
|
20
|
+
"trialing",
|
|
21
|
+
"pending_entry",
|
|
22
|
+
"renewing",
|
|
23
|
+
"past_due",
|
|
24
|
+
]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, TypeAlias
|
|
6
|
+
|
|
7
|
+
__all__ = ["MemberStatuses"]
|
|
8
|
+
|
|
9
|
+
MemberStatuses: TypeAlias = Literal["drafted", "joined", "left"]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, TypeAlias
|
|
6
|
+
|
|
7
|
+
__all__ = ["PromoType"]
|
|
8
|
+
|
|
9
|
+
PromoType: TypeAlias = Literal["percentage", "flat_amount"]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, TypeAlias
|
|
6
|
+
|
|
7
|
+
__all__ = ["WhoCanCommentTypes"]
|
|
8
|
+
|
|
9
|
+
WhoCanCommentTypes: TypeAlias = Literal["everyone", "admins"]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing_extensions import Literal, TypeAlias
|
|
6
|
+
|
|
7
|
+
__all__ = ["WhoCanPostTypes"]
|
|
8
|
+
|
|
9
|
+
WhoCanPostTypes: TypeAlias = Literal["everyone", "admins"]
|
|
@@ -3,13 +3,36 @@
|
|
|
3
3
|
from typing import Union
|
|
4
4
|
from typing_extensions import TypeAlias
|
|
5
5
|
|
|
6
|
+
from .entry_denied_webhook_event import EntryDeniedWebhookEvent
|
|
6
7
|
from .invoice_paid_webhook_event import InvoicePaidWebhookEvent
|
|
8
|
+
from .entry_created_webhook_event import EntryCreatedWebhookEvent
|
|
9
|
+
from .entry_deleted_webhook_event import EntryDeletedWebhookEvent
|
|
10
|
+
from .entry_approved_webhook_event import EntryApprovedWebhookEvent
|
|
7
11
|
from .invoice_voided_webhook_event import InvoiceVoidedWebhookEvent
|
|
12
|
+
from .payment_failed_webhook_event import PaymentFailedWebhookEvent
|
|
8
13
|
from .invoice_created_webhook_event import InvoiceCreatedWebhookEvent
|
|
14
|
+
from .payment_pending_webhook_event import PaymentPendingWebhookEvent
|
|
9
15
|
from .invoice_past_due_webhook_event import InvoicePastDueWebhookEvent
|
|
16
|
+
from .payment_succeeded_webhook_event import PaymentSucceededWebhookEvent
|
|
17
|
+
from .membership_activated_webhook_event import MembershipActivatedWebhookEvent
|
|
18
|
+
from .membership_deactivated_webhook_event import MembershipDeactivatedWebhookEvent
|
|
19
|
+
from .course_lesson_interaction_completed_webhook_event import CourseLessonInteractionCompletedWebhookEvent
|
|
10
20
|
|
|
11
21
|
__all__ = ["UnwrapWebhookEvent"]
|
|
12
22
|
|
|
13
23
|
UnwrapWebhookEvent: TypeAlias = Union[
|
|
14
|
-
InvoiceCreatedWebhookEvent,
|
|
24
|
+
InvoiceCreatedWebhookEvent,
|
|
25
|
+
InvoicePaidWebhookEvent,
|
|
26
|
+
InvoicePastDueWebhookEvent,
|
|
27
|
+
InvoiceVoidedWebhookEvent,
|
|
28
|
+
MembershipActivatedWebhookEvent,
|
|
29
|
+
MembershipDeactivatedWebhookEvent,
|
|
30
|
+
EntryCreatedWebhookEvent,
|
|
31
|
+
EntryApprovedWebhookEvent,
|
|
32
|
+
EntryDeniedWebhookEvent,
|
|
33
|
+
EntryDeletedWebhookEvent,
|
|
34
|
+
CourseLessonInteractionCompletedWebhookEvent,
|
|
35
|
+
PaymentSucceededWebhookEvent,
|
|
36
|
+
PaymentFailedWebhookEvent,
|
|
37
|
+
PaymentPendingWebhookEvent,
|
|
15
38
|
]
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
from typing_extensions import Literal
|
|
4
|
-
|
|
5
3
|
from .._models import BaseModel
|
|
4
|
+
from .shared.access_level import AccessLevel
|
|
6
5
|
|
|
7
6
|
__all__ = ["UserCheckAccessResponse"]
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
class UserCheckAccessResponse(BaseModel):
|
|
11
|
-
access_level:
|
|
10
|
+
access_level: AccessLevel
|
|
12
11
|
"""The permission level of the user"""
|
|
13
12
|
|
|
14
13
|
has_access: bool
|
|
@@ -5,7 +5,15 @@ from datetime import datetime
|
|
|
5
5
|
|
|
6
6
|
from .._models import BaseModel
|
|
7
7
|
|
|
8
|
-
__all__ = ["UserRetrieveResponse"]
|
|
8
|
+
__all__ = ["UserRetrieveResponse", "ProfilePicture"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ProfilePicture(BaseModel):
|
|
12
|
+
url: Optional[str] = None
|
|
13
|
+
"""This is the URL you use to render optimized attachments on the client.
|
|
14
|
+
|
|
15
|
+
This should be used for apps.
|
|
16
|
+
"""
|
|
9
17
|
|
|
10
18
|
|
|
11
19
|
class UserRetrieveResponse(BaseModel):
|
|
@@ -21,5 +29,8 @@ class UserRetrieveResponse(BaseModel):
|
|
|
21
29
|
name: Optional[str] = None
|
|
22
30
|
"""The name of the user from their Whop account."""
|
|
23
31
|
|
|
32
|
+
profile_picture: Optional[ProfilePicture] = None
|
|
33
|
+
"""The user's profile picture"""
|
|
34
|
+
|
|
24
35
|
username: str
|
|
25
36
|
"""The username of the user from their Whop account."""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: whop-sdk
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.3
|
|
4
4
|
Summary: The official Python library for the Whop API
|
|
5
5
|
Project-URL: Homepage, https://github.com/whopio/whopsdk-python
|
|
6
6
|
Project-URL: Repository, https://github.com/whopio/whopsdk-python
|
|
@@ -30,7 +30,7 @@ Requires-Dist: sniffio
|
|
|
30
30
|
Requires-Dist: typing-extensions<5,>=4.10
|
|
31
31
|
Provides-Extra: aiohttp
|
|
32
32
|
Requires-Dist: aiohttp; extra == 'aiohttp'
|
|
33
|
-
Requires-Dist: httpx-aiohttp>=0.1.
|
|
33
|
+
Requires-Dist: httpx-aiohttp>=0.1.9; extra == 'aiohttp'
|
|
34
34
|
Provides-Extra: webhooks
|
|
35
35
|
Requires-Dist: standardwebhooks; extra == 'webhooks'
|
|
36
36
|
Description-Content-Type: text/markdown
|