Skip to content

Commit 1ee820b

Browse files
feat(generated): Changes to admin_portal and user_management (#749)
Co-authored-by: workos-sdk-automation[bot] <255426317+workos-sdk-automation[bot]@users.noreply.github.com>
1 parent a65c626 commit 1ee820b

6 files changed

Lines changed: 22 additions & 8 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
* [#749](https://github.com/workos/workos-python/pull/749) feat(generated)!: regenerate from spec (3 changes)
2+
3+
**Features**
4+
* **[user_management](https://workos.com/docs/reference/authkit/user)**:
5+
* Changed errors for endpoint `POST /user_management/users`
6+
* Changed errors for endpoint `POST /user_management/magic_auth`
7+
8+
**Fixes**
9+
* **[user_management](https://workos.com/docs/reference/authkit/user)**:
10+
* Changed errors for endpoint `POST /user_management/authenticate`

‎.last-synced-sha‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
81a34a1dfa516c1987aff4038af330436b53e151
1+
d430b394483f6e00ff7f9e2ca8d4340ff8f7aa54

‎.oagen-manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2297,7 +2297,7 @@
22972297
"service": "admin_portal"
22982298
},
22992299
"POST /portal/revoke_link": {
2300-
"sdkMethod": "create_revoke_link",
2300+
"sdkMethod": "revoke_link",
23012301
"service": "admin_portal"
23022302
},
23032303
"POST /radar/attempts": {

‎src/workos/admin_portal/_resource.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def generate_link(
8282
request_options=request_options,
8383
)
8484

85-
def create_revoke_link(
85+
def revoke_link(
8686
self,
8787
*,
8888
organization: str,
@@ -186,7 +186,7 @@ async def generate_link(
186186
request_options=request_options,
187187
)
188188

189-
async def create_revoke_link(
189+
async def revoke_link(
190190
self,
191191
*,
192192
organization: str,

‎src/workos/user_management/_resource.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,7 @@ def create_user(
12421242
12431243
Raises:
12441244
BadRequestError: If the request is malformed (400).
1245+
AuthorizationError: If the request is forbidden (403).
12451246
NotFoundError: If the resource is not found (404).
12461247
UnprocessableEntityError: If the request data is unprocessable (422).
12471248
AuthenticationError: If the API key is invalid (401).
@@ -2040,6 +2041,7 @@ def create_magic_auth(
20402041
20412042
Raises:
20422043
BadRequestError: If the request is malformed (400).
2044+
AuthorizationError: If the request is forbidden (403).
20432045
UnprocessableEntityError: If the request data is unprocessable (422).
20442046
RateLimitExceededError: If rate limited (429).
20452047
AuthenticationError: If the API key is invalid (401).
@@ -3994,6 +3996,7 @@ async def create_user(
39943996
39953997
Raises:
39963998
BadRequestError: If the request is malformed (400).
3999+
AuthorizationError: If the request is forbidden (403).
39974000
NotFoundError: If the resource is not found (404).
39984001
UnprocessableEntityError: If the request data is unprocessable (422).
39994002
AuthenticationError: If the API key is invalid (401).
@@ -4792,6 +4795,7 @@ async def create_magic_auth(
47924795
47934796
Raises:
47944797
BadRequestError: If the request is malformed (400).
4798+
AuthorizationError: If the request is forbidden (403).
47954799
UnprocessableEntityError: If the request data is unprocessable (422).
47964800
RateLimitExceededError: If rate limited (429).
47974801
AuthenticationError: If the API key is invalid (401).

‎tests/test_admin_portal.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ def test_generate_link(self, workos, httpx_mock):
3434
body = json.loads(request.content)
3535
assert body["organization"] == "test_organization"
3636

37-
def test_create_revoke_link(self, workos, httpx_mock):
37+
def test_revoke_link(self, workos, httpx_mock):
3838
httpx_mock.add_response(json={})
39-
workos.admin_portal.create_revoke_link(
39+
workos.admin_portal.revoke_link(
4040
organization="test_organization", external_user_id="test_external_user_id"
4141
)
4242
request = httpx_mock.get_request()
@@ -137,9 +137,9 @@ async def test_generate_link(self, async_workos, httpx_mock):
137137
assert request.url.path.endswith("/portal/generate_link")
138138

139139
@pytest.mark.asyncio
140-
async def test_create_revoke_link(self, async_workos, httpx_mock):
140+
async def test_revoke_link(self, async_workos, httpx_mock):
141141
httpx_mock.add_response(json={})
142-
await async_workos.admin_portal.create_revoke_link(
142+
await async_workos.admin_portal.revoke_link(
143143
organization="test_organization", external_user_id="test_external_user_id"
144144
)
145145
request = httpx_mock.get_request()

0 commit comments

Comments
 (0)