From 41811c0aec1d7d07b0e7450c810a2b2e5ca03fcb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 14 Mar 2026 00:13:51 +0000 Subject: [PATCH 1/7] feat(api): api update --- .stats.yml | 4 ++-- src/whop_sdk/resources/ai_chats.py | 14 ++++++++++++-- src/whop_sdk/types/ai_chat.py | 7 +++++++ src/whop_sdk/types/ai_chat_list_response.py | 7 +++++++ src/whop_sdk/types/ai_chat_update_params.py | 5 ++++- tests/api_resources/test_ai_chats.py | 2 ++ 6 files changed, 34 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index d46615a..de832b9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 181 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-b6e1387ac58f903f887eae989de30273824663a9a752e7834b82b1036950c3d2.yml -openapi_spec_hash: 0bea29a304f3d57c44cc186478bef054 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-68099e376d518fbf1facf7d4af9b98a95bb1f812537b6723ddbe3fd47108a1ef.yml +openapi_spec_hash: a819ffd8f003b6f8b556936a9172e4fe config_hash: 7e9d4f2abf58b7918a0e103387d2a2e9 diff --git a/src/whop_sdk/resources/ai_chats.py b/src/whop_sdk/resources/ai_chats.py index 4eff698..ef15a86 100644 --- a/src/whop_sdk/resources/ai_chats.py +++ b/src/whop_sdk/resources/ai_chats.py @@ -146,6 +146,7 @@ def update( id: str, *, current_company_id: Optional[str] | Omit = omit, + notification_preference: Optional[Literal["all", "none"]] | Omit = omit, title: Optional[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -155,7 +156,8 @@ def update( timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AIChat: """ - Update an AI chat's title or associated company context. + Update an AI chat's title, notification preferences, or associated company + context. Required permissions: @@ -165,6 +167,8 @@ def update( current_company_id: The unique identifier of the company to set as context for the AI chat (e.g., "biz_XXXXX"). + notification_preference: The notification preference for an AI chat + title: The new display title for the AI chat thread (e.g., "Help with billing"). extra_headers: Send extra headers @@ -182,6 +186,7 @@ def update( body=maybe_transform( { "current_company_id": current_company_id, + "notification_preference": notification_preference, "title": title, }, ai_chat_update_params.AIChatUpdateParams, @@ -408,6 +413,7 @@ async def update( id: str, *, current_company_id: Optional[str] | Omit = omit, + notification_preference: Optional[Literal["all", "none"]] | Omit = omit, title: Optional[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -417,7 +423,8 @@ async def update( timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AIChat: """ - Update an AI chat's title or associated company context. + Update an AI chat's title, notification preferences, or associated company + context. Required permissions: @@ -427,6 +434,8 @@ async def update( current_company_id: The unique identifier of the company to set as context for the AI chat (e.g., "biz_XXXXX"). + notification_preference: The notification preference for an AI chat + title: The new display title for the AI chat thread (e.g., "Help with billing"). extra_headers: Send extra headers @@ -444,6 +453,7 @@ async def update( body=await async_maybe_transform( { "current_company_id": current_company_id, + "notification_preference": notification_preference, "title": title, }, ai_chat_update_params.AIChatUpdateParams, diff --git a/src/whop_sdk/types/ai_chat.py b/src/whop_sdk/types/ai_chat.py index 2ddbc6e..87c8d48 100644 --- a/src/whop_sdk/types/ai_chat.py +++ b/src/whop_sdk/types/ai_chat.py @@ -2,6 +2,7 @@ from typing import Optional from datetime import datetime +from typing_extensions import Literal from .._models import BaseModel @@ -38,6 +39,12 @@ class AIChat(BaseModel): message_count: int """The total number of messages exchanged in this conversation.""" + notification_preference: Literal["all", "none"] + """The notification preference for this AI chat. + + `all` delivers AI chat notifications and badges, while `none` mutes them. + """ + title: Optional[str] = None """A short descriptive title for this AI chat conversation. diff --git a/src/whop_sdk/types/ai_chat_list_response.py b/src/whop_sdk/types/ai_chat_list_response.py index af211b4..dbee060 100644 --- a/src/whop_sdk/types/ai_chat_list_response.py +++ b/src/whop_sdk/types/ai_chat_list_response.py @@ -2,6 +2,7 @@ from typing import Optional from datetime import datetime +from typing_extensions import Literal from .._models import BaseModel @@ -38,6 +39,12 @@ class AIChatListResponse(BaseModel): message_count: int """The total number of messages exchanged in this conversation.""" + notification_preference: Literal["all", "none"] + """The notification preference for this AI chat. + + `all` delivers AI chat notifications and badges, while `none` mutes them. + """ + title: Optional[str] = None """A short descriptive title for this AI chat conversation. diff --git a/src/whop_sdk/types/ai_chat_update_params.py b/src/whop_sdk/types/ai_chat_update_params.py index f3fc9bc..e6b9c52 100644 --- a/src/whop_sdk/types/ai_chat_update_params.py +++ b/src/whop_sdk/types/ai_chat_update_params.py @@ -3,7 +3,7 @@ from __future__ import annotations from typing import Optional -from typing_extensions import TypedDict +from typing_extensions import Literal, TypedDict __all__ = ["AIChatUpdateParams"] @@ -15,5 +15,8 @@ class AIChatUpdateParams(TypedDict, total=False): "biz_XXXXX"). """ + notification_preference: Optional[Literal["all", "none"]] + """The notification preference for an AI chat""" + title: Optional[str] """The new display title for the AI chat thread (e.g., "Help with billing").""" diff --git a/tests/api_resources/test_ai_chats.py b/tests/api_resources/test_ai_chats.py index 6de8558..d4d6bc2 100644 --- a/tests/api_resources/test_ai_chats.py +++ b/tests/api_resources/test_ai_chats.py @@ -124,6 +124,7 @@ def test_method_update_with_all_params(self, client: Whop) -> None: ai_chat = client.ai_chats.update( id="aich_xxxxxxxxxxxxx", current_company_id="current_company_id", + notification_preference="all", title="title", ) assert_matches_type(AIChat, ai_chat, path=["response"]) @@ -352,6 +353,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncWhop) -> N ai_chat = await async_client.ai_chats.update( id="aich_xxxxxxxxxxxxx", current_company_id="current_company_id", + notification_preference="all", title="title", ) assert_matches_type(AIChat, ai_chat, path=["response"]) From c9dd73fece709c673b37575a2e1e82ca9643f7d9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 14 Mar 2026 03:13:44 +0000 Subject: [PATCH 2/7] feat(api): api update --- .stats.yml | 4 ++-- src/whop_sdk/types/card_brands.py | 1 + src/whop_sdk/types/shared/payment.py | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index de832b9..c72b455 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 181 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-68099e376d518fbf1facf7d4af9b98a95bb1f812537b6723ddbe3fd47108a1ef.yml -openapi_spec_hash: a819ffd8f003b6f8b556936a9172e4fe +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-51fe2d63d75f83c0f00def45471fad9e54bc2a7fd96c30174e5b6e8ae9c1d276.yml +openapi_spec_hash: 3193908a280c7d880b22dd21f774c89d config_hash: 7e9d4f2abf58b7918a0e103387d2a2e9 diff --git a/src/whop_sdk/types/card_brands.py b/src/whop_sdk/types/card_brands.py index 9d8c7c1..1243eea 100644 --- a/src/whop_sdk/types/card_brands.py +++ b/src/whop_sdk/types/card_brands.py @@ -42,5 +42,6 @@ "codensa", "cabal", "hipercard", + "jcblankapay", "unknown", ] diff --git a/src/whop_sdk/types/shared/payment.py b/src/whop_sdk/types/shared/payment.py index c9403c4..009f035 100644 --- a/src/whop_sdk/types/shared/payment.py +++ b/src/whop_sdk/types/shared/payment.py @@ -166,6 +166,7 @@ class FinancingTransaction(BaseModel): "cancel", "verify", "chargeback", + "pre_chargeback", "three_d_secure", "fraud_screening", "authorization", From 8a74bd28a45ae766a17d696a405ec2dcd5f4918a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 15 Mar 2026 19:13:31 +0000 Subject: [PATCH 3/7] feat(api): api update --- .stats.yml | 4 +-- src/whop_sdk/types/setup_intent.py | 29 +++++++++++++++++++ .../types/setup_intent_list_response.py | 29 +++++++++++++++++++ 3 files changed, 60 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c72b455..aaf77fe 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 181 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-51fe2d63d75f83c0f00def45471fad9e54bc2a7fd96c30174e5b6e8ae9c1d276.yml -openapi_spec_hash: 3193908a280c7d880b22dd21f774c89d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/frostedinc%2Fwhopsdk-7f93e43332a2af6e92fec487446e4f8afef27be239763689838b85e0f2d64b5e.yml +openapi_spec_hash: 0240dc8a4d84e0941c2fa7f3e23a2038 config_hash: 7e9d4f2abf58b7918a0e103387d2a2e9 diff --git a/src/whop_sdk/types/setup_intent.py b/src/whop_sdk/types/setup_intent.py index 6c3f3ac..a79a2b7 100644 --- a/src/whop_sdk/types/setup_intent.py +++ b/src/whop_sdk/types/setup_intent.py @@ -16,6 +16,7 @@ "MemberUser", "PaymentMethod", "PaymentMethodCard", + "PaymentMethodMailingAddress", ] @@ -89,6 +90,31 @@ class PaymentMethodCard(BaseModel): """The last four digits of the card number. Null if not available.""" +class PaymentMethodMailingAddress(BaseModel): + """The mailing address associated with the payment method's user""" + + city: Optional[str] = None + """The city of the address.""" + + country: Optional[str] = None + """The country of the address.""" + + line1: Optional[str] = None + """The line 1 of the address.""" + + line2: Optional[str] = None + """The line 2 of the address.""" + + name: Optional[str] = None + """The name of the customer.""" + + postal_code: Optional[str] = None + """The postal code of the address.""" + + state: Optional[str] = None + """The state of the address.""" + + class PaymentMethod(BaseModel): """The saved payment method created by this setup intent. @@ -106,6 +132,9 @@ class PaymentMethod(BaseModel): created_at: datetime """The datetime the payment token was created.""" + mailing_address: Optional[PaymentMethodMailingAddress] = None + """The mailing address associated with the payment method's user""" + payment_method_type: PaymentMethodTypes """The payment method type of the payment method""" diff --git a/src/whop_sdk/types/setup_intent_list_response.py b/src/whop_sdk/types/setup_intent_list_response.py index cd30204..93d409a 100644 --- a/src/whop_sdk/types/setup_intent_list_response.py +++ b/src/whop_sdk/types/setup_intent_list_response.py @@ -16,6 +16,7 @@ "MemberUser", "PaymentMethod", "PaymentMethodCard", + "PaymentMethodMailingAddress", ] @@ -89,6 +90,31 @@ class PaymentMethodCard(BaseModel): """The last four digits of the card number. Null if not available.""" +class PaymentMethodMailingAddress(BaseModel): + """The mailing address associated with the payment method's user""" + + city: Optional[str] = None + """The city of the address.""" + + country: Optional[str] = None + """The country of the address.""" + + line1: Optional[str] = None + """The line 1 of the address.""" + + line2: Optional[str] = None + """The line 2 of the address.""" + + name: Optional[str] = None + """The name of the customer.""" + + postal_code: Optional[str] = None + """The postal code of the address.""" + + state: Optional[str] = None + """The state of the address.""" + + class PaymentMethod(BaseModel): """The saved payment method created by this setup intent. @@ -106,6 +132,9 @@ class PaymentMethod(BaseModel): created_at: datetime """The datetime the payment token was created.""" + mailing_address: Optional[PaymentMethodMailingAddress] = None + """The mailing address associated with the payment method's user""" + payment_method_type: PaymentMethodTypes """The payment method type of the payment method""" From 23cb4936ab4f00829d98f0a910e26f2ae26e5398 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 17:34:18 +0000 Subject: [PATCH 4/7] fix(pydantic): do not pass `by_alias` unless set --- src/whop_sdk/_compat.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/whop_sdk/_compat.py b/src/whop_sdk/_compat.py index 786ff42..e6690a4 100644 --- a/src/whop_sdk/_compat.py +++ b/src/whop_sdk/_compat.py @@ -2,7 +2,7 @@ from typing import TYPE_CHECKING, Any, Union, Generic, TypeVar, Callable, cast, overload from datetime import date, datetime -from typing_extensions import Self, Literal +from typing_extensions import Self, Literal, TypedDict import pydantic from pydantic.fields import FieldInfo @@ -131,6 +131,10 @@ def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str: return model.model_dump_json(indent=indent) +class _ModelDumpKwargs(TypedDict, total=False): + by_alias: bool + + def model_dump( model: pydantic.BaseModel, *, @@ -142,6 +146,9 @@ def model_dump( by_alias: bool | None = None, ) -> dict[str, Any]: if (not PYDANTIC_V1) or hasattr(model, "model_dump"): + kwargs: _ModelDumpKwargs = {} + if by_alias is not None: + kwargs["by_alias"] = by_alias return model.model_dump( mode=mode, exclude=exclude, @@ -149,7 +156,7 @@ def model_dump( exclude_defaults=exclude_defaults, # warnings are not supported in Pydantic v1 warnings=True if PYDANTIC_V1 else warnings, - by_alias=by_alias, + **kwargs, ) return cast( "dict[str, Any]", From 52face04bba526f4c009caa1dcc390d84da60840 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 19:03:02 +0000 Subject: [PATCH 5/7] fix(deps): bump minimum typing-extensions version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6d34f6e..4f2a59f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ authors = [ dependencies = [ "httpx>=0.23.0, <1", "pydantic>=1.9.0, <3", - "typing-extensions>=4.10, <5", + "typing-extensions>=4.14, <5", "anyio>=3.5.0, <5", "distro>=1.7.0, <2", "sniffio", From ca6b4cd8b46e7de115b37c833da3c40f87ca779a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 20:50:10 +0000 Subject: [PATCH 6/7] chore(internal): tweak CI branches --- .github/workflows/ci.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eefc48e..7234cce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,14 @@ name: CI on: push: - branches-ignore: - - 'generated' - - 'codegen/**' - - 'integrated/**' - - 'stl-preview-head/**' - - 'stl-preview-base/**' + branches: + - '**' + - '!integrated/**' + - '!stl-preview-head/**' + - '!stl-preview-base/**' + - '!generated' + - '!codegen/**' + - 'codegen/stl/**' pull_request: branches-ignore: - 'stl-preview-head/**' From 25c284d29956ff248f782ea312580f4b8f86ae61 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 20:50:53 +0000 Subject: [PATCH 7/7] release: 0.1.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 21 +++++++++++++++++++++ pyproject.toml | 2 +- src/whop_sdk/_version.py | 2 +- 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 09a565d..3d2ac0b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.0.34" + ".": "0.1.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 763b2f1..0ea3e09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## 0.1.0 (2026-03-16) + +Full Changelog: [v0.0.34...v0.1.0](https://github.com/whopio/whopsdk-python/compare/v0.0.34...v0.1.0) + +### Features + +* **api:** api update ([8a74bd2](https://github.com/whopio/whopsdk-python/commit/8a74bd28a45ae766a17d696a405ec2dcd5f4918a)) +* **api:** api update ([c9dd73f](https://github.com/whopio/whopsdk-python/commit/c9dd73fece709c673b37575a2e1e82ca9643f7d9)) +* **api:** api update ([41811c0](https://github.com/whopio/whopsdk-python/commit/41811c0aec1d7d07b0e7450c810a2b2e5ca03fcb)) + + +### Bug Fixes + +* **deps:** bump minimum typing-extensions version ([52face0](https://github.com/whopio/whopsdk-python/commit/52face04bba526f4c009caa1dcc390d84da60840)) +* **pydantic:** do not pass `by_alias` unless set ([23cb493](https://github.com/whopio/whopsdk-python/commit/23cb4936ab4f00829d98f0a910e26f2ae26e5398)) + + +### Chores + +* **internal:** tweak CI branches ([ca6b4cd](https://github.com/whopio/whopsdk-python/commit/ca6b4cd8b46e7de115b37c833da3c40f87ca779a)) + ## 0.0.34 (2026-03-13) Full Changelog: [v0.0.33...v0.0.34](https://github.com/whopio/whopsdk-python/compare/v0.0.33...v0.0.34) diff --git a/pyproject.toml b/pyproject.toml index 4f2a59f..7774c89 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "whop-sdk" -version = "0.0.34" +version = "0.1.0" description = "The official Python library for the Whop API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/whop_sdk/_version.py b/src/whop_sdk/_version.py index 75c990c..162053b 100644 --- a/src/whop_sdk/_version.py +++ b/src/whop_sdk/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "whop_sdk" -__version__ = "0.0.34" # x-release-please-version +__version__ = "0.1.0" # x-release-please-version