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
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
* [#749](https://github.com/workos/workos-python/pull/749) feat(generated)!: regenerate from spec (3 changes)

**Features**
* **[user_management](https://workos.com/docs/reference/authkit/user)**:
* Changed errors for endpoint `POST /user_management/users`
* Changed errors for endpoint `POST /user_management/magic_auth`

**Fixes**
* **[user_management](https://workos.com/docs/reference/authkit/user)**:
* Changed errors for endpoint `POST /user_management/authenticate`
2 changes: 1 addition & 1 deletion .last-synced-sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
81a34a1dfa516c1987aff4038af330436b53e151
d430b394483f6e00ff7f9e2ca8d4340ff8f7aa54
2 changes: 1 addition & 1 deletion .oagen-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2297,7 +2297,7 @@
"service": "admin_portal"
},
"POST /portal/revoke_link": {
"sdkMethod": "create_revoke_link",
"sdkMethod": "revoke_link",
"service": "admin_portal"
},
"POST /radar/attempts": {
Expand Down
4 changes: 2 additions & 2 deletions src/workos/admin_portal/_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def generate_link(
request_options=request_options,
)

def create_revoke_link(
def revoke_link(
self,
*,
organization: str,
Expand Down Expand Up @@ -186,7 +186,7 @@ async def generate_link(
request_options=request_options,
)

async def create_revoke_link(
async def revoke_link(
self,
*,
organization: str,
Expand Down
4 changes: 4 additions & 0 deletions src/workos/user_management/_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -1242,6 +1242,7 @@ def create_user(

Raises:
BadRequestError: If the request is malformed (400).
AuthorizationError: If the request is forbidden (403).
NotFoundError: If the resource is not found (404).
UnprocessableEntityError: If the request data is unprocessable (422).
AuthenticationError: If the API key is invalid (401).
Expand Down Expand Up @@ -2040,6 +2041,7 @@ def create_magic_auth(

Raises:
BadRequestError: If the request is malformed (400).
AuthorizationError: If the request is forbidden (403).
UnprocessableEntityError: If the request data is unprocessable (422).
RateLimitExceededError: If rate limited (429).
AuthenticationError: If the API key is invalid (401).
Expand Down Expand Up @@ -3994,6 +3996,7 @@ async def create_user(

Raises:
BadRequestError: If the request is malformed (400).
AuthorizationError: If the request is forbidden (403).
NotFoundError: If the resource is not found (404).
UnprocessableEntityError: If the request data is unprocessable (422).
AuthenticationError: If the API key is invalid (401).
Expand Down Expand Up @@ -4792,6 +4795,7 @@ async def create_magic_auth(

Raises:
BadRequestError: If the request is malformed (400).
AuthorizationError: If the request is forbidden (403).
UnprocessableEntityError: If the request data is unprocessable (422).
RateLimitExceededError: If rate limited (429).
AuthenticationError: If the API key is invalid (401).
Expand Down
8 changes: 4 additions & 4 deletions tests/test_admin_portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ def test_generate_link(self, workos, httpx_mock):
body = json.loads(request.content)
assert body["organization"] == "test_organization"

def test_create_revoke_link(self, workos, httpx_mock):
def test_revoke_link(self, workos, httpx_mock):
httpx_mock.add_response(json={})
workos.admin_portal.create_revoke_link(
workos.admin_portal.revoke_link(
organization="test_organization", external_user_id="test_external_user_id"
)
request = httpx_mock.get_request()
Expand Down Expand Up @@ -137,9 +137,9 @@ async def test_generate_link(self, async_workos, httpx_mock):
assert request.url.path.endswith("/portal/generate_link")

@pytest.mark.asyncio
async def test_create_revoke_link(self, async_workos, httpx_mock):
async def test_revoke_link(self, async_workos, httpx_mock):
httpx_mock.add_response(json={})
await async_workos.admin_portal.create_revoke_link(
await async_workos.admin_portal.revoke_link(
organization="test_organization", external_user_id="test_external_user_id"
)
request = httpx_mock.get_request()
Expand Down
Loading