Skip to content

Commit a3c10fb

Browse files
feat(api): api update
1 parent 9fc71d7 commit a3c10fb

File tree

7 files changed

+38
-2
lines changed

7 files changed

+38
-2
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 28
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-891522b3f4004be77ab6a692a434ca0a1f4743cef4205ec4e36e650ee88996db.yml
3-
openapi_spec_hash: 19007996418d4ec95fc8d7d3b7408580
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/arcade-ai%2Farcade-engine-ab21a947cd5811fed1cc0e1d438438c529d7cf0c3a9f5b76b6fc5d30ab647577.yml
3+
openapi_spec_hash: 5cc61fac0e5a22b922c5d8404791e4fa
44
config_hash: 6eb072febff9e7aba9cdeb6901761b97

src/arcadepy/resources/auth.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def authorize(
4848
*,
4949
auth_requirement: auth_authorize_params.AuthRequirement,
5050
user_id: str,
51+
force_verification: bool | NotGiven = NOT_GIVEN,
5152
next_uri: str | NotGiven = NOT_GIVEN,
5253
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5354
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -60,6 +61,9 @@ def authorize(
6061
Starts the authorization process for given authorization requirements
6162
6263
Args:
64+
force_verification: Optional: if true, the user will be forced to verify their identity (strict
65+
session check). TODO: Remove as soon as this is the default for everyone.
66+
6367
next_uri: Optional: if provided, the user will be redirected to this URI after
6468
authorization
6569
@@ -77,6 +81,7 @@ def authorize(
7781
{
7882
"auth_requirement": auth_requirement,
7983
"user_id": user_id,
84+
"force_verification": force_verification,
8085
"next_uri": next_uri,
8186
},
8287
auth_authorize_params.AuthAuthorizeParams,
@@ -219,6 +224,7 @@ async def authorize(
219224
*,
220225
auth_requirement: auth_authorize_params.AuthRequirement,
221226
user_id: str,
227+
force_verification: bool | NotGiven = NOT_GIVEN,
222228
next_uri: str | NotGiven = NOT_GIVEN,
223229
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
224230
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -231,6 +237,9 @@ async def authorize(
231237
Starts the authorization process for given authorization requirements
232238
233239
Args:
240+
force_verification: Optional: if true, the user will be forced to verify their identity (strict
241+
session check). TODO: Remove as soon as this is the default for everyone.
242+
234243
next_uri: Optional: if provided, the user will be redirected to this URI after
235244
authorization
236245
@@ -248,6 +257,7 @@ async def authorize(
248257
{
249258
"auth_requirement": auth_requirement,
250259
"user_id": user_id,
260+
"force_verification": force_verification,
251261
"next_uri": next_uri,
252262
},
253263
auth_authorize_params.AuthAuthorizeParams,

src/arcadepy/resources/tools/tools.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ def authorize(
135135
self,
136136
*,
137137
tool_name: str,
138+
force_verification: bool | NotGiven = NOT_GIVEN,
138139
next_uri: str | NotGiven = NOT_GIVEN,
139140
tool_version: str | NotGiven = NOT_GIVEN,
140141
user_id: str | NotGiven = NOT_GIVEN,
@@ -149,6 +150,9 @@ def authorize(
149150
Authorizes a user for a specific tool by name
150151
151152
Args:
153+
force_verification: Optional: if true, the user will be forced to verify their identity (strict
154+
session check). TODO: Remove as soon as this is the default for everyone.
155+
152156
next_uri: Optional: if provided, the user will be redirected to this URI after
153157
authorization
154158
@@ -169,6 +173,7 @@ def authorize(
169173
body=maybe_transform(
170174
{
171175
"tool_name": tool_name,
176+
"force_verification": force_verification,
172177
"next_uri": next_uri,
173178
"tool_version": tool_version,
174179
"user_id": user_id,
@@ -375,6 +380,7 @@ async def authorize(
375380
self,
376381
*,
377382
tool_name: str,
383+
force_verification: bool | NotGiven = NOT_GIVEN,
378384
next_uri: str | NotGiven = NOT_GIVEN,
379385
tool_version: str | NotGiven = NOT_GIVEN,
380386
user_id: str | NotGiven = NOT_GIVEN,
@@ -389,6 +395,9 @@ async def authorize(
389395
Authorizes a user for a specific tool by name
390396
391397
Args:
398+
force_verification: Optional: if true, the user will be forced to verify their identity (strict
399+
session check). TODO: Remove as soon as this is the default for everyone.
400+
392401
next_uri: Optional: if provided, the user will be redirected to this URI after
393402
authorization
394403
@@ -409,6 +418,7 @@ async def authorize(
409418
body=await async_maybe_transform(
410419
{
411420
"tool_name": tool_name,
421+
"force_verification": force_verification,
412422
"next_uri": next_uri,
413423
"tool_version": tool_version,
414424
"user_id": user_id,

src/arcadepy/types/auth_authorize_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ class AuthAuthorizeParams(TypedDict, total=False):
1313

1414
user_id: Required[str]
1515

16+
force_verification: bool
17+
"""
18+
Optional: if true, the user will be forced to verify their identity (strict
19+
session check). TODO: Remove as soon as this is the default for everyone.
20+
"""
21+
1622
next_uri: str
1723
"""
1824
Optional: if provided, the user will be redirected to this URI after

src/arcadepy/types/tool_authorize_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
class ToolAuthorizeParams(TypedDict, total=False):
1111
tool_name: Required[str]
1212

13+
force_verification: bool
14+
"""
15+
Optional: if true, the user will be forced to verify their identity (strict
16+
session check). TODO: Remove as soon as this is the default for everyone.
17+
"""
18+
1319
next_uri: str
1420
"""
1521
Optional: if provided, the user will be redirected to this URI after

tests/api_resources/test_auth.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def test_method_authorize_with_all_params(self, client: Arcade) -> None:
3535
"provider_type": "provider_type",
3636
},
3737
user_id="user_id",
38+
force_verification=True,
3839
next_uri="next_uri",
3940
)
4041
assert_matches_type(AuthorizationResponse, auth, path=["response"])
@@ -128,6 +129,7 @@ async def test_method_authorize_with_all_params(self, async_client: AsyncArcade)
128129
"provider_type": "provider_type",
129130
},
130131
user_id="user_id",
132+
force_verification=True,
131133
next_uri="next_uri",
132134
)
133135
assert_matches_type(AuthorizationResponse, auth, path=["response"])

tests/api_resources/test_tools.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def test_method_authorize(self, client: Arcade) -> None:
6969
def test_method_authorize_with_all_params(self, client: Arcade) -> None:
7070
tool = client.tools.authorize(
7171
tool_name="tool_name",
72+
force_verification=True,
7273
next_uri="next_uri",
7374
tool_version="tool_version",
7475
user_id="user_id",
@@ -241,6 +242,7 @@ async def test_method_authorize(self, async_client: AsyncArcade) -> None:
241242
async def test_method_authorize_with_all_params(self, async_client: AsyncArcade) -> None:
242243
tool = await async_client.tools.authorize(
243244
tool_name="tool_name",
245+
force_verification=True,
244246
next_uri="next_uri",
245247
tool_version="tool_version",
246248
user_id="user_id",

0 commit comments

Comments
 (0)