Skip to content

Commit bf5c90e

Browse files
committed
SDK regeneration (#854)
✅ SCIM Group Endpoints for Org Groups and Group Roles. Signed-off-by: Sourav Basu <sourav.basu@okta.com>
2 parents 7271f15 + 82c3190 commit bf5c90e

77 files changed

Lines changed: 8670 additions & 95 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.fern/replay.lock

Lines changed: 249 additions & 12 deletions
Large diffs are not rendered by default.

reference.md

Lines changed: 1326 additions & 72 deletions
Large diffs are not rendered by default.

src/auth0/management/__init__.py

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2198,14 +2198,19 @@
21982198
ListOrganizationClientGrantsOffsetPaginatedResponseContent,
21992199
ListOrganizationConnectionsOffsetPaginatedResponseContent,
22002200
ListOrganizationDiscoveryDomainsResponseContent,
2201+
ListOrganizationGroupRolesResponseContent,
2202+
ListOrganizationGroupsResponseContent,
22012203
ListOrganizationInvitationsOffsetPaginatedResponseContent,
2204+
ListOrganizationMemberEffectiveRolesResponseContent,
2205+
ListOrganizationMemberRoleSourceGroupsResponseContent,
22022206
ListOrganizationMemberRolesOffsetPaginatedResponseContent,
22032207
ListOrganizationMembersPaginatedResponseContent,
22042208
ListOrganizationsPaginatedResponseContent,
22052209
ListPhoneTemplatesResponseContent,
22062210
ListRateLimitPoliciesPaginatedResponseContent,
22072211
ListRefreshTokensPaginatedResponseContent,
22082212
ListResourceServerOffsetPaginatedResponseContent,
2213+
ListRoleGroupsResponseContent,
22092214
ListRolePermissionsOffsetPaginatedResponseContent,
22102215
ListRoleUsersPaginatedResponseContent,
22112216
ListRolesOffsetPaginatedResponseContent,
@@ -2221,9 +2226,13 @@
22212226
ListUserBlocksByIdentifierResponseContent,
22222227
ListUserBlocksResponseContent,
22232228
ListUserConnectedAccountsResponseContent,
2229+
ListUserEffectivePermissionRoleSourcesResponseContent,
2230+
ListUserEffectivePermissionsResponseContent,
2231+
ListUserEffectiveRolesResponseContent,
22242232
ListUserGrantsOffsetPaginatedResponseContent,
22252233
ListUserOrganizationsOffsetPaginatedResponseContent,
22262234
ListUserPermissionsOffsetPaginatedResponseContent,
2235+
ListUserRoleSourceGroupsResponseContent,
22272236
ListUserRolesOffsetPaginatedResponseContent,
22282237
ListUserSessionsPaginatedResponseContent,
22292238
ListUsersOffsetPaginatedResponseContent,
@@ -2313,6 +2322,8 @@
23132322
OrganizationInvitationInvitee,
23142323
OrganizationInvitationInviter,
23152324
OrganizationMember,
2325+
OrganizationMemberEffectiveRole,
2326+
OrganizationMemberEffectiveRoleSource,
23162327
OrganizationMemberRole,
23172328
OrganizationMetadata,
23182329
OrganizationUsageEnum,
@@ -2674,6 +2685,12 @@
26742685
UserAuthenticationMethodPropertiesEnum,
26752686
UserBlockIdentifier,
26762687
UserDateSchema,
2688+
UserEffectivePermissionResponseContent,
2689+
UserEffectivePermissionRoleSourceEnum,
2690+
UserEffectivePermissionRoleSourceResponseContent,
2691+
UserEffectivePermissionSourceEnum,
2692+
UserEffectiveRole,
2693+
UserEffectiveRoleSource,
26772694
UserEnrollmentAuthMethodEnum,
26782695
UserEnrollmentStatusEnum,
26792696
UserGrant,
@@ -4975,14 +4992,19 @@
49754992
"ListOrganizationClientGrantsOffsetPaginatedResponseContent": ".types",
49764993
"ListOrganizationConnectionsOffsetPaginatedResponseContent": ".types",
49774994
"ListOrganizationDiscoveryDomainsResponseContent": ".types",
4995+
"ListOrganizationGroupRolesResponseContent": ".types",
4996+
"ListOrganizationGroupsResponseContent": ".types",
49784997
"ListOrganizationInvitationsOffsetPaginatedResponseContent": ".types",
4998+
"ListOrganizationMemberEffectiveRolesResponseContent": ".types",
4999+
"ListOrganizationMemberRoleSourceGroupsResponseContent": ".types",
49795000
"ListOrganizationMemberRolesOffsetPaginatedResponseContent": ".types",
49805001
"ListOrganizationMembersPaginatedResponseContent": ".types",
49815002
"ListOrganizationsPaginatedResponseContent": ".types",
49825003
"ListPhoneTemplatesResponseContent": ".types",
49835004
"ListRateLimitPoliciesPaginatedResponseContent": ".types",
49845005
"ListRefreshTokensPaginatedResponseContent": ".types",
49855006
"ListResourceServerOffsetPaginatedResponseContent": ".types",
5007+
"ListRoleGroupsResponseContent": ".types",
49865008
"ListRolePermissionsOffsetPaginatedResponseContent": ".types",
49875009
"ListRoleUsersPaginatedResponseContent": ".types",
49885010
"ListRolesOffsetPaginatedResponseContent": ".types",
@@ -4998,9 +5020,13 @@
49985020
"ListUserBlocksByIdentifierResponseContent": ".types",
49995021
"ListUserBlocksResponseContent": ".types",
50005022
"ListUserConnectedAccountsResponseContent": ".types",
5023+
"ListUserEffectivePermissionRoleSourcesResponseContent": ".types",
5024+
"ListUserEffectivePermissionsResponseContent": ".types",
5025+
"ListUserEffectiveRolesResponseContent": ".types",
50015026
"ListUserGrantsOffsetPaginatedResponseContent": ".types",
50025027
"ListUserOrganizationsOffsetPaginatedResponseContent": ".types",
50035028
"ListUserPermissionsOffsetPaginatedResponseContent": ".types",
5029+
"ListUserRoleSourceGroupsResponseContent": ".types",
50045030
"ListUserRolesOffsetPaginatedResponseContent": ".types",
50055031
"ListUserSessionsPaginatedResponseContent": ".types",
50065032
"ListUsersOffsetPaginatedResponseContent": ".types",
@@ -5092,6 +5118,8 @@
50925118
"OrganizationInvitationInvitee": ".types",
50935119
"OrganizationInvitationInviter": ".types",
50945120
"OrganizationMember": ".types",
5121+
"OrganizationMemberEffectiveRole": ".types",
5122+
"OrganizationMemberEffectiveRoleSource": ".types",
50955123
"OrganizationMemberRole": ".types",
50965124
"OrganizationMetadata": ".types",
50975125
"OrganizationUsageEnum": ".types",
@@ -5459,6 +5487,12 @@
54595487
"UserAuthenticationMethodPropertiesEnum": ".types",
54605488
"UserBlockIdentifier": ".types",
54615489
"UserDateSchema": ".types",
5490+
"UserEffectivePermissionResponseContent": ".types",
5491+
"UserEffectivePermissionRoleSourceEnum": ".types",
5492+
"UserEffectivePermissionRoleSourceResponseContent": ".types",
5493+
"UserEffectivePermissionSourceEnum": ".types",
5494+
"UserEffectiveRole": ".types",
5495+
"UserEffectiveRoleSource": ".types",
54625496
"UserEnrollmentAuthMethodEnum": ".types",
54635497
"UserEnrollmentStatusEnum": ".types",
54645498
"UserGrant": ".types",
@@ -7760,14 +7794,19 @@ def __dir__():
77607794
"ListOrganizationClientGrantsOffsetPaginatedResponseContent",
77617795
"ListOrganizationConnectionsOffsetPaginatedResponseContent",
77627796
"ListOrganizationDiscoveryDomainsResponseContent",
7797+
"ListOrganizationGroupRolesResponseContent",
7798+
"ListOrganizationGroupsResponseContent",
77637799
"ListOrganizationInvitationsOffsetPaginatedResponseContent",
7800+
"ListOrganizationMemberEffectiveRolesResponseContent",
7801+
"ListOrganizationMemberRoleSourceGroupsResponseContent",
77647802
"ListOrganizationMemberRolesOffsetPaginatedResponseContent",
77657803
"ListOrganizationMembersPaginatedResponseContent",
77667804
"ListOrganizationsPaginatedResponseContent",
77677805
"ListPhoneTemplatesResponseContent",
77687806
"ListRateLimitPoliciesPaginatedResponseContent",
77697807
"ListRefreshTokensPaginatedResponseContent",
77707808
"ListResourceServerOffsetPaginatedResponseContent",
7809+
"ListRoleGroupsResponseContent",
77717810
"ListRolePermissionsOffsetPaginatedResponseContent",
77727811
"ListRoleUsersPaginatedResponseContent",
77737812
"ListRolesOffsetPaginatedResponseContent",
@@ -7783,9 +7822,13 @@ def __dir__():
77837822
"ListUserBlocksByIdentifierResponseContent",
77847823
"ListUserBlocksResponseContent",
77857824
"ListUserConnectedAccountsResponseContent",
7825+
"ListUserEffectivePermissionRoleSourcesResponseContent",
7826+
"ListUserEffectivePermissionsResponseContent",
7827+
"ListUserEffectiveRolesResponseContent",
77867828
"ListUserGrantsOffsetPaginatedResponseContent",
77877829
"ListUserOrganizationsOffsetPaginatedResponseContent",
77887830
"ListUserPermissionsOffsetPaginatedResponseContent",
7831+
"ListUserRoleSourceGroupsResponseContent",
77897832
"ListUserRolesOffsetPaginatedResponseContent",
77907833
"ListUserSessionsPaginatedResponseContent",
77917834
"ListUsersOffsetPaginatedResponseContent",
@@ -7877,6 +7920,8 @@ def __dir__():
78777920
"OrganizationInvitationInvitee",
78787921
"OrganizationInvitationInviter",
78797922
"OrganizationMember",
7923+
"OrganizationMemberEffectiveRole",
7924+
"OrganizationMemberEffectiveRoleSource",
78807925
"OrganizationMemberRole",
78817926
"OrganizationMetadata",
78827927
"OrganizationUsageEnum",
@@ -8244,6 +8289,12 @@ def __dir__():
82448289
"UserAuthenticationMethodPropertiesEnum",
82458290
"UserBlockIdentifier",
82468291
"UserDateSchema",
8292+
"UserEffectivePermissionResponseContent",
8293+
"UserEffectivePermissionRoleSourceEnum",
8294+
"UserEffectivePermissionRoleSourceResponseContent",
8295+
"UserEffectivePermissionSourceEnum",
8296+
"UserEffectiveRole",
8297+
"UserEffectiveRoleSource",
82478298
"UserEnrollmentAuthMethodEnum",
82488299
"UserEnrollmentStatusEnum",
82498300
"UserGrant",

src/auth0/management/core/pydantic_utilities.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,18 @@ def parse_sse_obj(sse: "ServerSentEvent", type_: Type[T]) -> T:
310310
return parse_obj_as(type_, sse_event)
311311

312312

313+
_type_adapter_cache: Dict[int, Any] = {}
314+
315+
316+
def _get_type_adapter(type_: Type[Any]) -> Any:
317+
key = id(type_)
318+
adapter = _type_adapter_cache.get(key)
319+
if adapter is None:
320+
adapter = pydantic.TypeAdapter(type_) # type: ignore[attr-defined]
321+
_type_adapter_cache[key] = adapter
322+
return adapter
323+
324+
313325
def parse_obj_as(type_: Type[T], object_: Any) -> T:
314326
# convert_and_respect_annotation_metadata is required for TypedDict aliasing.
315327
#
@@ -342,8 +354,8 @@ def parse_obj_as(type_: Type[T], object_: Any) -> T:
342354
else:
343355
dealiased_object = convert_and_respect_annotation_metadata(object_=object_, annotation=type_, direction="read")
344356
if IS_PYDANTIC_V2:
345-
adapter = pydantic.TypeAdapter(type_) # type: ignore[attr-defined]
346-
return adapter.validate_python(dealiased_object)
357+
adapter = _get_type_adapter(type_)
358+
return adapter.validate_python(dealiased_object) # type: ignore[no-any-return]
347359
return pydantic.parse_obj_as(type_, dealiased_object)
348360

349361

src/auth0/management/organizations/__init__.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
from importlib import import_module
77

88
if typing.TYPE_CHECKING:
9-
from . import client_grants, connections, discovery_domains, enabled_connections, invitations, members
9+
from . import client_grants, connections, discovery_domains, enabled_connections, groups, invitations, members
1010
_dynamic_imports: typing.Dict[str, str] = {
1111
"client_grants": ".client_grants",
1212
"connections": ".connections",
1313
"discovery_domains": ".discovery_domains",
1414
"enabled_connections": ".enabled_connections",
15+
"groups": ".groups",
1516
"invitations": ".invitations",
1617
"members": ".members",
1718
}
@@ -38,4 +39,12 @@ def __dir__():
3839
return sorted(lazy_attrs)
3940

4041

41-
__all__ = ["client_grants", "connections", "discovery_domains", "enabled_connections", "invitations", "members"]
42+
__all__ = [
43+
"client_grants",
44+
"connections",
45+
"discovery_domains",
46+
"enabled_connections",
47+
"groups",
48+
"invitations",
49+
"members",
50+
]

src/auth0/management/organizations/client.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from .connections.client import AsyncConnectionsClient, ConnectionsClient
2626
from .discovery_domains.client import AsyncDiscoveryDomainsClient, DiscoveryDomainsClient
2727
from .enabled_connections.client import AsyncEnabledConnectionsClient, EnabledConnectionsClient
28+
from .groups.client import AsyncGroupsClient, GroupsClient
2829
from .invitations.client import AsyncInvitationsClient, InvitationsClient
2930
from .members.client import AsyncMembersClient, MembersClient
3031
# this is used as the default value for optional parameters
@@ -41,6 +42,7 @@ def __init__(self, *, client_wrapper: SyncClientWrapper):
4142
self._enabled_connections: typing.Optional[EnabledConnectionsClient] = None
4243
self._invitations: typing.Optional[InvitationsClient] = None
4344
self._members: typing.Optional[MembersClient] = None
45+
self._groups: typing.Optional[GroupsClient] = None
4446

4547
@property
4648
def with_raw_response(self) -> RawOrganizationsClient:
@@ -389,6 +391,14 @@ def members(self):
389391
self._members = MembersClient(client_wrapper=self._client_wrapper)
390392
return self._members
391393

394+
@property
395+
def groups(self):
396+
if self._groups is None:
397+
from .groups.client import GroupsClient # noqa: E402
398+
399+
self._groups = GroupsClient(client_wrapper=self._client_wrapper)
400+
return self._groups
401+
392402

393403
class AsyncOrganizationsClient:
394404
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -400,6 +410,7 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper):
400410
self._enabled_connections: typing.Optional[AsyncEnabledConnectionsClient] = None
401411
self._invitations: typing.Optional[AsyncInvitationsClient] = None
402412
self._members: typing.Optional[AsyncMembersClient] = None
413+
self._groups: typing.Optional[AsyncGroupsClient] = None
403414

404415
@property
405416
def with_raw_response(self) -> AsyncRawOrganizationsClient:
@@ -796,3 +807,11 @@ def members(self):
796807

797808
self._members = AsyncMembersClient(client_wrapper=self._client_wrapper)
798809
return self._members
810+
811+
@property
812+
def groups(self):
813+
if self._groups is None:
814+
from .groups.client import AsyncGroupsClient # noqa: E402
815+
816+
self._groups = AsyncGroupsClient(client_wrapper=self._client_wrapper)
817+
return self._groups
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
# isort: skip_file
4+
5+
import typing
6+
from importlib import import_module
7+
8+
if typing.TYPE_CHECKING:
9+
from . import roles
10+
_dynamic_imports: typing.Dict[str, str] = {"roles": ".roles"}
11+
12+
13+
def __getattr__(attr_name: str) -> typing.Any:
14+
module_name = _dynamic_imports.get(attr_name)
15+
if module_name is None:
16+
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
17+
try:
18+
module = import_module(module_name, __package__)
19+
if module_name == f".{attr_name}":
20+
return module
21+
else:
22+
return getattr(module, attr_name)
23+
except ImportError as e:
24+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
25+
except AttributeError as e:
26+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
27+
28+
29+
def __dir__():
30+
lazy_attrs = list(_dynamic_imports.keys())
31+
return sorted(lazy_attrs)
32+
33+
34+
__all__ = ["roles"]

0 commit comments

Comments
 (0)