Repository navigation
feat(generated): Changes to sso #778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| * [#778](https://github.com/workos/workos-python/pull/778) feat(generated): regenerate from spec (1 change) | ||
|
|
||
| **Features** | ||
| * **[sso](https://workos.com/docs/reference/sso)**: | ||
| * Added enum `ConnectionsState` | ||
| * Added parameter `Connections.list.state` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| cd2274094c76488d1aef6d661898b31138af5f3e | ||
| d23707bf603250a73e6433561428e58fc2be036b |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # This file is auto-generated by oagen. Do not edit. | ||
|
|
||
| """Enumeration of connections state values.""" | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from enum import Enum | ||
| from typing import Literal, TypeAlias | ||
|
|
||
|
|
||
| class ConnectionsState(str, Enum): | ||
| """Known values for ConnectionsState.""" | ||
|
|
||
| ACTIVE = "active" | ||
| INACTIVE = "inactive" | ||
| VALIDATING = "validating" | ||
|
|
||
| @classmethod | ||
| def _missing_(cls, value: object) -> ConnectionsState | None: | ||
| if not isinstance(value, str): | ||
| return None | ||
| unknown = str.__new__(cls, value) | ||
| unknown._name_ = value.upper() | ||
| unknown._value_ = value | ||
| return unknown | ||
|
|
||
|
|
||
| ConnectionsStateLiteral: TypeAlias = Literal["active", "inactive", "validating"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -365,8 +365,6 @@ | |
| OrganizationRoleUpdated, | ||
| OrganizationRoleUpdatedData, | ||
| OrganizationSelectionRequiredErrorBody, | ||
| OrganizationSelectionRequiredErrorBodyWithOrganization, | ||
| OrganizationSelectionRequiredErrorBodyWithOrganizations, | ||
| OrganizationUpdated, | ||
| OrganizationUpdatedData, | ||
| OrganizationUpdatedDataDomain, | ||
|
|
@@ -607,67 +605,6 @@ def test_error_body_minimal_payload(self): | |
| serialized = instance.to_dict() | ||
| assert serialized["message"] == data["message"] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This removes four round-trip and minimal-payload tests for public models that remain in the SDK. No remaining test references Prompt To Fix With AIThis is a comment left during a code review.
Path: tests/test_common_models_round_trip.py
Line: 606
Comment:
**Existing model tests disappear**
This removes four round-trip and minimal-payload tests for public models that remain in the SDK. No remaining test references `OrganizationSelectionRequiredErrorBodyWithOrganizations`, so future changes to its nested organization list can break without these checks catching it. Keep these tests; the new SSO filter tests do not replace their coverage.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly. |
||
|
|
||
| def test_organization_selection_required_error_body_with_organizations_round_trip( | ||
| self, | ||
| ): | ||
| data = load_fixture( | ||
| "organization_selection_required_error_body_with_organizations.json" | ||
| ) | ||
| instance = OrganizationSelectionRequiredErrorBodyWithOrganizations.from_dict( | ||
| data | ||
| ) | ||
| serialized = instance.to_dict() | ||
| assert serialized == data | ||
| restored = OrganizationSelectionRequiredErrorBodyWithOrganizations.from_dict( | ||
| serialized | ||
| ) | ||
| assert restored.to_dict() == serialized | ||
|
|
||
| def test_organization_selection_required_error_body_with_organizations_minimal_payload( | ||
| self, | ||
| ): | ||
| data = { | ||
| "code": "organization_selection_required", | ||
| "message": "Request could not be processed.", | ||
| "organizations": [ | ||
| {"id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY", "name": "Acme Corp"} | ||
| ], | ||
| } | ||
| instance = OrganizationSelectionRequiredErrorBodyWithOrganizations.from_dict( | ||
| data | ||
| ) | ||
| serialized = instance.to_dict() | ||
| assert serialized["code"] == data["code"] | ||
| assert serialized["message"] == data["message"] | ||
| assert serialized["organizations"] == data["organizations"] | ||
|
|
||
| def test_organization_selection_required_error_body_with_organization_round_trip( | ||
| self, | ||
| ): | ||
| data = load_fixture( | ||
| "organization_selection_required_error_body_with_organization.json" | ||
| ) | ||
| instance = OrganizationSelectionRequiredErrorBodyWithOrganization.from_dict( | ||
| data | ||
| ) | ||
| serialized = instance.to_dict() | ||
| assert serialized == data | ||
| restored = OrganizationSelectionRequiredErrorBodyWithOrganization.from_dict( | ||
| serialized | ||
| ) | ||
| assert restored.to_dict() == serialized | ||
|
|
||
| def test_organization_selection_required_error_body_with_organization_minimal_payload( | ||
| self, | ||
| ): | ||
| data = {"id": "org_01EHWNCE74X7JSDV0X3SZ3KJNY", "name": "Acme Corp"} | ||
| instance = OrganizationSelectionRequiredErrorBodyWithOrganization.from_dict( | ||
| data | ||
| ) | ||
| serialized = instance.to_dict() | ||
| assert serialized["id"] == data["id"] | ||
| assert serialized["name"] == data["name"] | ||
|
|
||
| def test_error_body_with_code_field_errors_round_trip(self): | ||
| data = load_fixture("error_body_with_code_field_errors.json") | ||
| instance = ErrorBodyWithCodeFieldErrors.from_dict(data) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing the
*Literalexports breaks existing imports. For example,from workos.pipes.models import PipesOwnershipLiteralnow raisesImportError, even though the alias still exists in its source module. Applications using that import can fail to start after upgrading. This also affectsworkos.pipesandworkos.types.pipes, which copy the model exports.Restore these exports and the matching removals in the other model namespaces.
Knowledge Base Used: Pagination and shared types
Prompt To Fix With AI