Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"standardwebhooks": ">=1.0.1,<2"
}
},
"originGitCommit": "f67e889b0539d8ba4d02f3a80f8c33b5cb41e378",
"originGitCommit": "aca262b24a27e2e67026e2661c5b9d2fe8e9a016",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "1.1.1",
Expand Down
8 changes: 7 additions & 1 deletion .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<dl>
<dd>

Create a short-lived access token for authenticating API requests. When using API key authentication, provide company_id or user_id. When using OAuth, the user is derived from the token. Use this token with Whop's web and mobile embedded components.
Create a short-lived access token for authenticating API requests. When using API key authentication, provide account_id or user_id. When using OAuth, the user is derived from the token. Use this token with Whop's web and mobile embedded components.
</dd>
</dl>
</dd>
Expand Down Expand Up @@ -5443,7 +5443,7 @@ client.ai_chats.create(
<dl>
<dd>

**current_company_id:** `typing.Optional[str]` — The unique identifier of the company to set as context for the AI chat (e.g., "biz_XXXXX").
**current_account_id:** `typing.Optional[str]` — The unique identifier of the account to set as context for the AI chat (e.g., "biz_XXXXX").

</dd>
</dl>
Expand Down Expand Up @@ -5656,7 +5656,7 @@ client.ai_chats.delete(
<dl>
<dd>

Update an AI chat's title, notification preferences, or associated company context.
Update an AI chat's title, notification preferences, or associated account context.

Required permissions:
- `ai_chat:update`
Expand Down Expand Up @@ -5708,7 +5708,7 @@ client.ai_chats.update(
<dl>
<dd>

**current_company_id:** `typing.Optional[str]` — The unique identifier of the company to set as context for the AI chat (e.g., "biz_XXXXX").
**current_account_id:** `typing.Optional[str]` — The unique identifier of the account to set as context for the AI chat (e.g., "biz_XXXXX").

</dd>
</dl>
Expand Down Expand Up @@ -19676,7 +19676,7 @@ client.forum_posts.list(
<dl>
<dd>

Create a new forum post or comment within an experience. Supports text content, attachments, polls, paywalling, and pinning. Pass experience_id 'public' with a company_id to post to a company's public forum.
Create a new forum post or comment within an experience. Supports text content, attachments, polls, paywalling, and pinning. Pass experience_id 'public' with an account_id to post to an account's public forum.

Required permissions:
- `forum:post:create`
Expand Down Expand Up @@ -19720,7 +19720,7 @@ client.forum_posts.create(
<dl>
<dd>

**experience_id:** `str` — The unique identifier of the experience to create this post in. For example, 'exp_xxxxx'. Pass 'public' along with company_id to automatically use the company's public forum.
**experience_id:** `str` — The unique identifier of the experience to create this post in. For example, 'exp_xxxxx'. Pass 'public' along with account_id to automatically use the account's public forum.

</dd>
</dl>
Expand Down Expand Up @@ -20350,7 +20350,7 @@ client.forums.update(
<dl>
<dd>

Returns a paginated list of identity profiles. When company_id is provided, lists IPs currently linked to that company's ledger. When omitted, lists IPs linked to any ledger the actor can read (including child companies under a parent).
Returns a paginated list of identity profiles. When account_id is provided, lists IPs currently linked to that account's ledger. When omitted, lists IPs linked to any ledger the actor can read (including child accounts under a parent).

Required permissions:
- `identity:read`
Expand Down Expand Up @@ -25404,7 +25404,7 @@ client.payment_methods.list(
<dl>
<dd>

**member_id:** `typing.Optional[str]` — The unique identifier of the member to list payment methods for. Omit this and company_id to list your own saved payment methods.
**member_id:** `typing.Optional[str]` — The unique identifier of the member to list payment methods for. Omit this and account_id to list your own saved payment methods.

</dd>
</dl>
Expand Down Expand Up @@ -25524,7 +25524,7 @@ client.payment_methods.list(
<dl>
<dd>

Retrieves the details of an existing payment method. Addresses a member's wallet when member_id or company_id is given, otherwise your own.
Retrieves the details of an existing payment method. Addresses a member's wallet when member_id or account_id is given, otherwise your own.

Required permissions:
- `member:payment_methods:read`
Expand Down Expand Up @@ -25578,7 +25578,7 @@ client.payment_methods.retrieve(
<dl>
<dd>

**member_id:** `typing.Optional[str]` — The unique identifier of the member. Provide either this or company_id, not both. Omit both to address your own saved payment methods.
**member_id:** `typing.Optional[str]` — The unique identifier of the member. Provide either this or account_id, not both. Omit both to address your own saved payment methods.

</dd>
</dl>
Expand Down Expand Up @@ -25672,7 +25672,7 @@ client.payment_methods.delete_payment_method(
<dl>
<dd>

**member_id:** `typing.Optional[str]` — The unique identifier of the member. Provide either this or company_id, not both. Omit both to address your own saved payment methods.
**member_id:** `typing.Optional[str]` — The unique identifier of the member. Provide either this or account_id, not both. Omit both to address your own saved payment methods.

</dd>
</dl>
Expand Down
4 changes: 2 additions & 2 deletions src/whop_sdk/access_tokens/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def create(
request_options: typing.Optional[RequestOptions] = None,
) -> AccessToken:
"""
Create a short-lived access token for authenticating API requests. When using API key authentication, provide company_id or user_id. When using OAuth, the user is derived from the token. Use this token with Whop's web and mobile embedded components.
Create a short-lived access token for authenticating API requests. When using API key authentication, provide account_id or user_id. When using OAuth, the user is derived from the token. Use this token with Whop's web and mobile embedded components.

Parameters
----------
Expand Down Expand Up @@ -107,7 +107,7 @@ async def create(
request_options: typing.Optional[RequestOptions] = None,
) -> AccessToken:
"""
Create a short-lived access token for authenticating API requests. When using API key authentication, provide company_id or user_id. When using OAuth, the user is derived from the token. Use this token with Whop's web and mobile embedded components.
Create a short-lived access token for authenticating API requests. When using API key authentication, provide account_id or user_id. When using OAuth, the user is derived from the token. Use this token with Whop's web and mobile embedded components.

Parameters
----------
Expand Down
4 changes: 2 additions & 2 deletions src/whop_sdk/access_tokens/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def create(
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[AccessToken]:
"""
Create a short-lived access token for authenticating API requests. When using API key authentication, provide company_id or user_id. When using OAuth, the user is derived from the token. Use this token with Whop's web and mobile embedded components.
Create a short-lived access token for authenticating API requests. When using API key authentication, provide account_id or user_id. When using OAuth, the user is derived from the token. Use this token with Whop's web and mobile embedded components.

Parameters
----------
Expand Down Expand Up @@ -188,7 +188,7 @@ async def create(
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[AccessToken]:
"""
Create a short-lived access token for authenticating API requests. When using API key authentication, provide company_id or user_id. When using OAuth, the user is derived from the token. Use this token with Whop's web and mobile embedded components.
Create a short-lived access token for authenticating API requests. When using API key authentication, provide account_id or user_id. When using OAuth, the user is derived from the token. Use this token with Whop's web and mobile embedded components.

Parameters
----------
Expand Down
36 changes: 18 additions & 18 deletions src/whop_sdk/ai_chats/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def create(
self,
*,
message_text: str,
current_company_id: typing.Optional[str] = OMIT,
current_account_id: typing.Optional[str] = OMIT,
message_attachments: typing.Optional[typing.Sequence[CreateAiChatsRequestMessageAttachmentsItem]] = OMIT,
message_source: typing.Optional[AiChatMessageSourceTypes] = OMIT,
suggestion_type: typing.Optional[str] = OMIT,
Expand All @@ -120,8 +120,8 @@ def create(
message_text : str
The text content of the first message to send to the AI agent.

current_company_id : typing.Optional[str]
The unique identifier of the company to set as context for the AI chat (e.g., "biz_XXXXX").
current_account_id : typing.Optional[str]
The unique identifier of the account to set as context for the AI chat (e.g., "biz_XXXXX").

message_attachments : typing.Optional[typing.Sequence[CreateAiChatsRequestMessageAttachmentsItem]]
A list of previously uploaded file attachments to include with the first message.
Expand Down Expand Up @@ -158,7 +158,7 @@ def create(
"""
_response = self._raw_client.create(
message_text=message_text,
current_company_id=current_company_id,
current_account_id=current_account_id,
message_attachments=message_attachments,
message_source=message_source,
suggestion_type=suggestion_type,
Expand Down Expand Up @@ -240,13 +240,13 @@ def update(
self,
id: str,
*,
current_company_id: typing.Optional[str] = OMIT,
current_account_id: typing.Optional[str] = OMIT,
notification_preference: typing.Optional[AiChatNotificationPreferences] = OMIT,
title: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AiChat:
"""
Update an AI chat's title, notification preferences, or associated company context.
Update an AI chat's title, notification preferences, or associated account context.

Required permissions:
- `ai_chat:update`
Expand All @@ -256,8 +256,8 @@ def update(
id : str
The unique identifier of the AI chat to update (e.g., "ai_chat_XXXXX").

current_company_id : typing.Optional[str]
The unique identifier of the company to set as context for the AI chat (e.g., "biz_XXXXX").
current_account_id : typing.Optional[str]
The unique identifier of the account to set as context for the AI chat (e.g., "biz_XXXXX").

notification_preference : typing.Optional[AiChatNotificationPreferences]
The notification preference for the AI chat.
Expand Down Expand Up @@ -288,7 +288,7 @@ def update(
"""
_response = self._raw_client.update(
id,
current_company_id=current_company_id,
current_account_id=current_account_id,
notification_preference=notification_preference,
title=title,
request_options=request_options,
Expand Down Expand Up @@ -390,7 +390,7 @@ async def create(
self,
*,
message_text: str,
current_company_id: typing.Optional[str] = OMIT,
current_account_id: typing.Optional[str] = OMIT,
message_attachments: typing.Optional[typing.Sequence[CreateAiChatsRequestMessageAttachmentsItem]] = OMIT,
message_source: typing.Optional[AiChatMessageSourceTypes] = OMIT,
suggestion_type: typing.Optional[str] = OMIT,
Expand All @@ -408,8 +408,8 @@ async def create(
message_text : str
The text content of the first message to send to the AI agent.

current_company_id : typing.Optional[str]
The unique identifier of the company to set as context for the AI chat (e.g., "biz_XXXXX").
current_account_id : typing.Optional[str]
The unique identifier of the account to set as context for the AI chat (e.g., "biz_XXXXX").

message_attachments : typing.Optional[typing.Sequence[CreateAiChatsRequestMessageAttachmentsItem]]
A list of previously uploaded file attachments to include with the first message.
Expand Down Expand Up @@ -454,7 +454,7 @@ async def main() -> None:
"""
_response = await self._raw_client.create(
message_text=message_text,
current_company_id=current_company_id,
current_account_id=current_account_id,
message_attachments=message_attachments,
message_source=message_source,
suggestion_type=suggestion_type,
Expand Down Expand Up @@ -552,13 +552,13 @@ async def update(
self,
id: str,
*,
current_company_id: typing.Optional[str] = OMIT,
current_account_id: typing.Optional[str] = OMIT,
notification_preference: typing.Optional[AiChatNotificationPreferences] = OMIT,
title: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AiChat:
"""
Update an AI chat's title, notification preferences, or associated company context.
Update an AI chat's title, notification preferences, or associated account context.

Required permissions:
- `ai_chat:update`
Expand All @@ -568,8 +568,8 @@ async def update(
id : str
The unique identifier of the AI chat to update (e.g., "ai_chat_XXXXX").

current_company_id : typing.Optional[str]
The unique identifier of the company to set as context for the AI chat (e.g., "biz_XXXXX").
current_account_id : typing.Optional[str]
The unique identifier of the account to set as context for the AI chat (e.g., "biz_XXXXX").

notification_preference : typing.Optional[AiChatNotificationPreferences]
The notification preference for the AI chat.
Expand Down Expand Up @@ -608,7 +608,7 @@ async def main() -> None:
"""
_response = await self._raw_client.update(
id,
current_company_id=current_company_id,
current_account_id=current_account_id,
notification_preference=notification_preference,
title=title,
request_options=request_options,
Expand Down
Loading
Loading