Update Hubspot toolkit to use Hubspot auth class (#375)
This commit is contained in:
parent
9346498edb
commit
3e35c70f85
3 changed files with 7 additions and 10 deletions
|
|
@ -1,15 +1,14 @@
|
||||||
from typing import Annotated, Any, Optional
|
from typing import Annotated, Any, Optional
|
||||||
|
|
||||||
from arcade.sdk import ToolContext, tool
|
from arcade.sdk import ToolContext, tool
|
||||||
from arcade.sdk.auth import OAuth2
|
from arcade.sdk.auth import Hubspot
|
||||||
|
|
||||||
from arcade_hubspot.enums import HubspotObject
|
from arcade_hubspot.enums import HubspotObject
|
||||||
from arcade_hubspot.models import HubspotCrmClient
|
from arcade_hubspot.models import HubspotCrmClient
|
||||||
|
|
||||||
|
|
||||||
@tool(
|
@tool(
|
||||||
requires_auth=OAuth2(
|
requires_auth=Hubspot(
|
||||||
id="hubspot",
|
|
||||||
scopes=[
|
scopes=[
|
||||||
"oauth",
|
"oauth",
|
||||||
"crm.objects.companies.read",
|
"crm.objects.companies.read",
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
from typing import Annotated, Any, Optional
|
from typing import Annotated, Any, Optional
|
||||||
|
|
||||||
from arcade.sdk import ToolContext, tool
|
from arcade.sdk import ToolContext, tool
|
||||||
from arcade.sdk.auth import OAuth2
|
from arcade.sdk.auth import Hubspot
|
||||||
|
|
||||||
from arcade_hubspot.enums import HubspotObject
|
from arcade_hubspot.enums import HubspotObject
|
||||||
from arcade_hubspot.models import HubspotCrmClient
|
from arcade_hubspot.models import HubspotCrmClient
|
||||||
|
|
@ -9,8 +9,7 @@ from arcade_hubspot.utils import clean_data
|
||||||
|
|
||||||
|
|
||||||
@tool(
|
@tool(
|
||||||
requires_auth=OAuth2(
|
requires_auth=Hubspot(
|
||||||
id="hubspot",
|
|
||||||
scopes=[
|
scopes=[
|
||||||
"oauth",
|
"oauth",
|
||||||
"crm.objects.contacts.read",
|
"crm.objects.contacts.read",
|
||||||
|
|
@ -61,8 +60,7 @@ async def get_contact_data_by_keywords(
|
||||||
|
|
||||||
|
|
||||||
@tool(
|
@tool(
|
||||||
requires_auth=OAuth2(
|
requires_auth=Hubspot(
|
||||||
id="hubspot",
|
|
||||||
scopes=["oauth", "crm.objects.contacts.write"],
|
scopes=["oauth", "crm.objects.contacts.write"],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "arcade_hubspot"
|
name = "arcade_hubspot"
|
||||||
version = "0.1.0"
|
version = "0.2.0"
|
||||||
description = "Arcade tools designed for LLMs to interact with Hubspot"
|
description = "Arcade tools designed for LLMs to interact with Hubspot"
|
||||||
authors = ["Arcade <dev@arcade.dev>"]
|
authors = ["Arcade <dev@arcade.dev>"]
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.10"
|
python = "^3.10"
|
||||||
arcade-ai = ">=1.0.5,<2.0"
|
arcade-ai = ">=1.3.2,<2.0"
|
||||||
httpx = "^0.27.2"
|
httpx = "^0.27.2"
|
||||||
|
|
||||||
[tool.poetry.dev-dependencies]
|
[tool.poetry.dev-dependencies]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue