Skip to content

Commit

Permalink
chore: add assistants init files
Browse files Browse the repository at this point in the history
  • Loading branch information
tiwarishubham635 committed Oct 2, 2024
1 parent 0f81bbb commit 4687881
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
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

0 comments on commit 4687881

Please sign in to comment.