Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add assistants init files #816

Merged
merged 1 commit into from
Oct 3, 2024
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
56 changes: 56 additions & 0 deletions twilio/rest/assistants/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
from warnings import warn

from twilio.rest.assistants import AssistantsBase
from twilio.rest.assistants.v1.assistant import AssistantList
from twilio.rest.assistants.v1.knowledge import KnowledgeList
from twilio.rest.assistants.v1.policy import PolicyList
from twilio.rest.assistants.v1.session import SessionList
from twilio.rest.assistants.v1.tool import ToolList


class Assistants(AssistantsBase):

@property
def assistants(self) -> AssistantList:
warn(
"assistants is deprecated. Use v1.assistants instead.",
DeprecationWarning,
stacklevel=2,
)
return self.v1.assistants

@property
def knowledge(self) -> KnowledgeList:
warn(
"knowledge is deprecated. Use v1.knowledge instead.",
DeprecationWarning,
stacklevel=2,
)
return self.v1.knowledge

@property
def policies(self) -> PolicyList:
warn(
"policies is deprecated. Use v1.policies instead.",
DeprecationWarning,
stacklevel=2,
)
return self.v1.policies

@property
def sessions(self) -> SessionList:
warn(
"sessions is deprecated. Use v1.sessions instead.",
DeprecationWarning,
stacklevel=2,
)
return self.v1.sessions

@property
def tools(self) -> ToolList:
warn(
"tools is deprecated. Use v1.tools instead.",
DeprecationWarning,
stacklevel=2,
)
return self.v1.tools
2 changes: 1 addition & 1 deletion twilio/rest/iam/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from twilio.rest.iam.v1.new_api_key import NewApiKeyList


class Accounts(IamBase):
class Iam(IamBase):
@property
def api_key(self) -> ApiKeyList:
warn(
Expand Down
Loading