Skip to content
Closed
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
50 changes: 50 additions & 0 deletions .oagen-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,16 @@
"src/workos/feature_flags/__init__.py",
"src/workos/feature_flags/_resource.py",
"src/workos/feature_flags/models/__init__.py",
"src/workos/flag_target_types/__init__.py",
"src/workos/flag_target_types/_resource.py",
"src/workos/flag_target_types/models/__init__.py",
"src/workos/flag_target_types/models/create_flag_target_type.py",
"src/workos/flag_target_types/models/flag_target_type.py",
"src/workos/flag_targets/__init__.py",
"src/workos/flag_targets/_resource.py",
"src/workos/flag_targets/models/__init__.py",
"src/workos/flag_targets/models/create_flag_target.py",
"src/workos/flag_targets/models/flag_target.py",
"src/workos/groups/__init__.py",
"src/workos/groups/_resource.py",
"src/workos/groups/models/__init__.py",
Expand Down Expand Up @@ -671,6 +681,8 @@
"src/workos/types/directory_sync/__init__.py",
"src/workos/types/events/__init__.py",
"src/workos/types/feature_flags/__init__.py",
"src/workos/types/flag_target_types/__init__.py",
"src/workos/types/flag_targets/__init__.py",
"src/workos/types/groups/__init__.py",
"src/workos/types/multi_factor_auth/__init__.py",
"src/workos/types/organization_domains/__init__.py",
Expand Down Expand Up @@ -950,6 +962,8 @@
"tests/fixtures/create_data_integration.json",
"tests/fixtures/create_data_key_request.json",
"tests/fixtures/create_data_key_response.json",
"tests/fixtures/create_flag_target.json",
"tests/fixtures/create_flag_target_type.json",
"tests/fixtures/create_group.json",
"tests/fixtures/create_group_membership.json",
"tests/fixtures/create_group_role_assignment.json",
Expand Down Expand Up @@ -1071,6 +1085,8 @@
"tests/fixtures/flag_rule_updated_context_previous_attribute_data.json",
"tests/fixtures/flag_rule_updated_data.json",
"tests/fixtures/flag_rule_updated_data_owner.json",
"tests/fixtures/flag_target.json",
"tests/fixtures/flag_target_type.json",
"tests/fixtures/flag_updated.json",
"tests/fixtures/flag_updated_context.json",
"tests/fixtures/flag_updated_context_actor.json",
Expand Down Expand Up @@ -1117,6 +1133,8 @@
"tests/fixtures/list_directory_user_with_groups.json",
"tests/fixtures/list_event_schema.json",
"tests/fixtures/list_flag.json",
"tests/fixtures/list_flag_target.json",
"tests/fixtures/list_flag_target_type.json",
"tests/fixtures/list_group.json",
"tests/fixtures/list_group_role_assignment.json",
"tests/fixtures/list_metadata.json",
Expand Down Expand Up @@ -1354,6 +1372,10 @@
"tests/test_events_models_round_trip.py",
"tests/test_feature_flags.py",
"tests/test_feature_flags_models_round_trip.py",
"tests/test_flag_target_types.py",
"tests/test_flag_target_types_models_round_trip.py",
"tests/test_flag_targets.py",
"tests/test_flag_targets_models_round_trip.py",
"tests/test_groups.py",
"tests/test_groups_models_round_trip.py",
"tests/test_multi_factor_auth.py",
Expand Down Expand Up @@ -2229,6 +2251,34 @@
"PUT /data-integrations/{slug}/client-credentials": {
"sdkMethod": "update_data_integration_client_credentials",
"service": "pipes"
},
"GET /flag_target_types": {
"sdkMethod": "list_flag_target_types",
"service": "flag_target_types"
},
"POST /flag_target_types": {
"sdkMethod": "create_flag_target_type",
"service": "flag_target_types"
},
"GET /flag_target_types/{id}": {
"sdkMethod": "get_flag_target_type",
"service": "flag_target_types"
},
"GET /flag_targets": {
"sdkMethod": "list_flag_targets",
"service": "flag_targets"
},
"POST /flag_targets": {
"sdkMethod": "create_flag_target",
"service": "flag_targets"
},
"GET /flag_targets/{id}": {
"sdkMethod": "get_flag_target",
"service": "flag_targets"
},
"DELETE /flag_targets/{id}": {
"sdkMethod": "delete_flag_target",
"service": "flag_targets"
}
}
}
22 changes: 22 additions & 0 deletions src/workos/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
from .directory_sync._resource import DirectorySync, AsyncDirectorySync
from .events._resource import Events, AsyncEvents
from .feature_flags._resource import FeatureFlags, AsyncFeatureFlags
from .flag_target_types._resource import FlagTargetTypes, AsyncFlagTargetTypes
from .organization_domains._resource import (
OrganizationDomains,
AsyncOrganizationDomains,
Expand All @@ -37,6 +38,7 @@
from .webhooks._resource import Webhooks, AsyncWebhooks
from .widgets._resource import Widgets, AsyncWidgets
from .audit_logs._resource import AuditLogs, AsyncAuditLogs
from .flag_targets._resource import FlagTargets, AsyncFlagTargets
from .passwordless import AsyncPasswordless, Passwordless
from .actions import Actions, AsyncActions
from .pkce import PKCE
Expand Down Expand Up @@ -95,6 +97,11 @@ def feature_flags(self) -> FeatureFlags:
"""Feature Flags API resources."""
return FeatureFlags(self)

@functools.cached_property
def flag_target_types(self) -> FlagTargetTypes:
"""Flag Target Types API resources."""
return FlagTargetTypes(self)

Comment on lines +101 to +104

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Document the new service namespaces

The new flag_target_types and flag_targets accessors are absent from the README’s available-resources map, so users relying on that map cannot discover these public APIs or their accessor names.

Knowledge Base Used:

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/workos/_client.py
Line: 101-104

Comment:
**Document the new service namespaces**

The new `flag_target_types` and `flag_targets` accessors are absent from the README’s available-resources map, so users relying on that map cannot discover these public APIs or their accessor names.

**Knowledge Base Used:**
- [Business platform products](https://app.greptile.com/workos/-/custom-context/knowledge-base/workos/workos-python/-/docs/business-platform-products.md)
- [SDK client and transport foundation](https://app.greptile.com/workos/-/custom-context/knowledge-base/workos/workos-python/-/docs/sdk-client-and-transport.md)

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No action taken—this is an automated review comment, not a human request.

@functools.cached_property
def organization_domains(self) -> OrganizationDomains:
"""Organization Domains API resources."""
Expand Down Expand Up @@ -160,6 +167,11 @@ def audit_logs(self) -> AuditLogs:
"""Audit Logs API resources."""
return AuditLogs(self)

@functools.cached_property
def flag_targets(self) -> FlagTargets:
"""Flag Targets API resources."""
return FlagTargets(self)

@functools.cached_property
def mfa(self) -> MultiFactorAuth:
"""Alias for multi_factor_auth."""
Expand Down Expand Up @@ -238,6 +250,11 @@ def feature_flags(self) -> AsyncFeatureFlags:
"""Feature Flags API resources."""
return AsyncFeatureFlags(self)

@functools.cached_property
def flag_target_types(self) -> AsyncFlagTargetTypes:
"""Flag Target Types API resources."""
return AsyncFlagTargetTypes(self)

@functools.cached_property
def organization_domains(self) -> AsyncOrganizationDomains:
"""Organization Domains API resources."""
Expand Down Expand Up @@ -303,6 +320,11 @@ def audit_logs(self) -> AsyncAuditLogs:
"""Audit Logs API resources."""
return AsyncAuditLogs(self)

@functools.cached_property
def flag_targets(self) -> AsyncFlagTargets:
"""Flag Targets API resources."""
return AsyncFlagTargets(self)

@functools.cached_property
def mfa(self) -> AsyncMultiFactorAuth:
"""Alias for multi_factor_auth."""
Expand Down
7 changes: 7 additions & 0 deletions src/workos/flag_target_types/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file is auto-generated by oagen. Do not edit.

from ._resource import (
FlagTargetTypes as FlagTargetTypes,
AsyncFlagTargetTypes as AsyncFlagTargetTypes,
)
from .models import *
Loading
Loading